neondeck 1.0.0-beta.4
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/CHANGELOG.md +22 -0
- package/DEVELOPMENT.md +310 -0
- package/LICENSE +21 -0
- package/README.md +128 -0
- package/SOUL.md +8 -0
- package/bin/neondeck.mjs +27 -0
- package/config/dashboard.json +208 -0
- package/config/dashboard.schema.json +207 -0
- package/dist/SOUL.md +8 -0
- package/dist/assets/app-BuuvLo98.js +3620 -0
- package/dist/assets/app-BuuvLo98.js.map +1 -0
- package/dist/assets/autopilot-CKgEx8yQ.js +68025 -0
- package/dist/assets/autopilot-CKgEx8yQ.js.map +1 -0
- package/dist/assets/briefing-DYVbJaqk.js +2 -0
- package/dist/assets/briefing-DoO-fJr1.js +22 -0
- package/dist/assets/briefing-DoO-fJr1.js.map +1 -0
- package/dist/assets/command-run-B2TWLpLL.js +20 -0
- package/dist/assets/command-run-B2TWLpLL.js.map +1 -0
- package/dist/assets/command-run-CzQra_Y7.js +2 -0
- package/dist/assets/display-assistant-CbCRBSYM.js +389 -0
- package/dist/assets/display-assistant-CbCRBSYM.js.map +1 -0
- package/dist/assets/fix-pr-ci-BlUl-2ht.js +46 -0
- package/dist/assets/fix-pr-ci-BlUl-2ht.js.map +1 -0
- package/dist/assets/fix-pr-ci-Dl1wpKXp.js +2 -0
- package/dist/assets/migrations/20260710061339_neondeck_pre_1_0_baseline/migration.sql +748 -0
- package/dist/assets/migrations/20260710061339_neondeck_pre_1_0_baseline/snapshot.json +7240 -0
- package/dist/assets/prepare-pr-worktree-CLzccRYh.js +2 -0
- package/dist/assets/prepare-pr-worktree-DxyTygiU.js +17 -0
- package/dist/assets/prepare-pr-worktree-DxyTygiU.js.map +1 -0
- package/dist/assets/push-pr-autofix-BFNSEASU.js +2 -0
- package/dist/assets/push-pr-autofix-DlVjw1IN.js +17 -0
- package/dist/assets/push-pr-autofix-DlVjw1IN.js.map +1 -0
- package/dist/assets/review-pr-for-human-B2j8wz2L.js +2 -0
- package/dist/assets/review-pr-for-human-DcGE-7wb.js +708 -0
- package/dist/assets/review-pr-for-human-DcGE-7wb.js.map +1 -0
- package/dist/assets/safety-CawD9GxD.js +2499 -0
- package/dist/assets/safety-CawD9GxD.js.map +1 -0
- package/dist/assets/scheduled-agent-instruction-CQgogBv3.js +22 -0
- package/dist/assets/scheduled-agent-instruction-CQgogBv3.js.map +1 -0
- package/dist/assets/scheduled-agent-instruction-Dr2ebZRD.js +2 -0
- package/dist/assets/scheduler-tick-Cy26qBld.js +105 -0
- package/dist/assets/scheduler-tick-Cy26qBld.js.map +1 -0
- package/dist/assets/skills/github-gh/SKILL.md +56 -0
- package/dist/assets/skills/neon-ci-fix/SKILL.md +15 -0
- package/dist/assets/skills/neon-docs-fix/SKILL.md +15 -0
- package/dist/assets/skills/neon-issue-triage/SKILL.md +13 -0
- package/dist/assets/skills/neon-pr-review/SKILL.md +19 -0
- package/dist/assets/skills/neondeck/SKILL.md +123 -0
- package/dist/assets/skills/neondeck-handoff/SKILL.md +31 -0
- package/dist/assets/triage-pr-event-BlE3GKNR.js +17 -0
- package/dist/assets/triage-pr-event-BlE3GKNR.js.map +1 -0
- package/dist/assets/triage-pr-event-hxUP587F.js +2 -0
- package/dist/assets/verify-then-push-pr-autofix-CIl5ZwZm.js +2 -0
- package/dist/assets/verify-then-push-pr-autofix-Djy0UFUv.js +75 -0
- package/dist/assets/verify-then-push-pr-autofix-Djy0UFUv.js.map +1 -0
- package/dist/config/dashboard.json +208 -0
- package/dist/config/dashboard.schema.json +207 -0
- package/dist/server.mjs +582 -0
- package/dist/server.mjs.map +1 -0
- package/dist/skills/github-gh/SKILL.md +56 -0
- package/dist/skills/neon-ci-fix/SKILL.md +15 -0
- package/dist/skills/neon-docs-fix/SKILL.md +15 -0
- package/dist/skills/neon-issue-triage/SKILL.md +13 -0
- package/dist/skills/neon-pr-review/SKILL.md +19 -0
- package/dist/skills/neondeck/SKILL.md +123 -0
- package/dist/skills/neondeck-handoff/SKILL.md +31 -0
- package/drizzle.config.ts +7 -0
- package/package.json +155 -0
- package/shared/patch-anchors.ts +78 -0
- package/src/agents/busywork-workflow.ts +24 -0
- package/src/agents/display-assistant.ts +134 -0
- package/src/agents/pr-review-assistant.ts +25 -0
- package/src/agents/scheduler-workflow.ts +20 -0
- package/src/agents/support/tools.ts +346 -0
- package/src/app.ts +1 -0
- package/src/cli/index.ts +560 -0
- package/src/cli/learning.ts +44 -0
- package/src/cli/mcp.ts +496 -0
- package/src/cli/modules.ts +107 -0
- package/src/cli/onboarding.ts +667 -0
- package/src/cli/options.ts +103 -0
- package/src/cli/output.ts +399 -0
- package/src/cli/preapprovals.ts +204 -0
- package/src/cli/prompts.ts +108 -0
- package/src/cli/types.ts +59 -0
- package/src/db.ts +41 -0
- package/src/desktop/open.ts +698 -0
- package/src/desktop/service.ts +863 -0
- package/src/domains/mcp/actions.ts +420 -0
- package/src/domains/mcp/config.ts +501 -0
- package/src/domains/mcp/format.ts +35 -0
- package/src/domains/mcp/gate.ts +188 -0
- package/src/domains/mcp/index.ts +9 -0
- package/src/domains/mcp/instructions.ts +18 -0
- package/src/domains/mcp/oauth.ts +1063 -0
- package/src/domains/mcp/policy.ts +15 -0
- package/src/domains/mcp/registry.ts +461 -0
- package/src/domains/mcp/schemas.ts +171 -0
- package/src/domains/mcp/stdio.ts +451 -0
- package/src/domains/mcp/store.ts +905 -0
- package/src/domains/mcp/tools.ts +119 -0
- package/src/lib/action-result.ts +51 -0
- package/src/lib/exec.ts +118 -0
- package/src/lib/git.ts +20 -0
- package/src/lib/report-html.ts +193 -0
- package/src/lib/sqlite.ts +51 -0
- package/src/lib/valibot.ts +33 -0
- package/src/modules/app-state/index.ts +5 -0
- package/src/modules/app-state/native-notifications.ts +76 -0
- package/src/modules/app-state/notification-events.ts +45 -0
- package/src/modules/app-state/notifications.ts +276 -0
- package/src/modules/app-state/types.ts +42 -0
- package/src/modules/app-state/workflow-summaries.ts +201 -0
- package/src/modules/autonomous-audit/index.ts +225 -0
- package/src/modules/autopilot/actions.ts +165 -0
- package/src/modules/autopilot/admissions.ts +865 -0
- package/src/modules/autopilot/approvals.ts +59 -0
- package/src/modules/autopilot/ci-fix-run.ts +1332 -0
- package/src/modules/autopilot/ci-fix.ts +692 -0
- package/src/modules/autopilot/comments.ts +426 -0
- package/src/modules/autopilot/fixtures.ts +344 -0
- package/src/modules/autopilot/github-facts.ts +303 -0
- package/src/modules/autopilot/index.ts +64 -0
- package/src/modules/autopilot/notifications.ts +271 -0
- package/src/modules/autopilot/push-support.ts +288 -0
- package/src/modules/autopilot/push.ts +661 -0
- package/src/modules/autopilot/recovery.ts +656 -0
- package/src/modules/autopilot/review-feedback.ts +651 -0
- package/src/modules/autopilot/review-support.ts +524 -0
- package/src/modules/autopilot/revision-run.ts +445 -0
- package/src/modules/autopilot/schemas.ts +485 -0
- package/src/modules/autopilot/state-mappers.ts +512 -0
- package/src/modules/autopilot/state-schemas.ts +451 -0
- package/src/modules/autopilot/state-store.ts +183 -0
- package/src/modules/autopilot/state.ts +255 -0
- package/src/modules/autopilot/triage-support.ts +234 -0
- package/src/modules/autopilot/triage.ts +156 -0
- package/src/modules/autopilot/utils.ts +145 -0
- package/src/modules/autopilot/worktree.ts +622 -0
- package/src/modules/autopilot-policy/config.ts +110 -0
- package/src/modules/autopilot-policy/index.ts +4 -0
- package/src/modules/autopilot-policy/risk.ts +359 -0
- package/src/modules/autopilot-policy/schemas.ts +284 -0
- package/src/modules/autopilot-policy/service.ts +304 -0
- package/src/modules/commands/actions.ts +112 -0
- package/src/modules/commands/handlers/index.ts +3 -0
- package/src/modules/commands/handlers/misc.ts +441 -0
- package/src/modules/commands/handlers/queue.ts +694 -0
- package/src/modules/commands/handlers/repo.ts +339 -0
- package/src/modules/commands/index.ts +5 -0
- package/src/modules/commands/registry.ts +157 -0
- package/src/modules/commands/runner.ts +152 -0
- package/src/modules/commands/schemas.ts +107 -0
- package/src/modules/commands/summaries.ts +92 -0
- package/src/modules/commands/utils.ts +113 -0
- package/src/modules/config/actions.ts +253 -0
- package/src/modules/config/events.ts +80 -0
- package/src/modules/config/files.ts +9 -0
- package/src/modules/config/history.ts +74 -0
- package/src/modules/config/index.ts +9 -0
- package/src/modules/config/mutations/dashboard.ts +319 -0
- package/src/modules/config/mutations/execution.ts +89 -0
- package/src/modules/config/mutations/models.ts +467 -0
- package/src/modules/config/mutations/providers.ts +163 -0
- package/src/modules/config/mutations/repos.ts +620 -0
- package/src/modules/config/read.ts +135 -0
- package/src/modules/config/result.ts +66 -0
- package/src/modules/config/schemas.ts +181 -0
- package/src/modules/docs-drift/index.ts +1 -0
- package/src/modules/docs-drift/service.ts +863 -0
- package/src/modules/execution/actions.ts +35 -0
- package/src/modules/execution/approvals.ts +322 -0
- package/src/modules/execution/exedev/checkouts.ts +356 -0
- package/src/modules/execution/exedev/context.ts +286 -0
- package/src/modules/execution/index.ts +7 -0
- package/src/modules/execution/policy.ts +102 -0
- package/src/modules/execution/run.ts +589 -0
- package/src/modules/execution/schemas.ts +116 -0
- package/src/modules/execution/scope.ts +137 -0
- package/src/modules/execution/store.ts +320 -0
- package/src/modules/execution/utils.ts +105 -0
- package/src/modules/execution-policy/index.ts +424 -0
- package/src/modules/flue/execution-context.ts +41 -0
- package/src/modules/github/actions.ts +334 -0
- package/src/modules/github/checks.ts +484 -0
- package/src/modules/github/client.ts +110 -0
- package/src/modules/github/comments.ts +204 -0
- package/src/modules/github/errors.ts +50 -0
- package/src/modules/github/index.ts +92 -0
- package/src/modules/github/issues.ts +116 -0
- package/src/modules/github/pr-file-cache.ts +264 -0
- package/src/modules/github/pull-requests.ts +384 -0
- package/src/modules/github/queue.ts +342 -0
- package/src/modules/github/reviews.ts +1421 -0
- package/src/modules/github/schemas.ts +794 -0
- package/src/modules/github/state-truncation.ts +31 -0
- package/src/modules/handoff/index.ts +2 -0
- package/src/modules/handoff/schemas.ts +61 -0
- package/src/modules/handoff/service.ts +587 -0
- package/src/modules/hygiene/index.ts +1 -0
- package/src/modules/hygiene/service.ts +513 -0
- package/src/modules/kilo/actions.ts +229 -0
- package/src/modules/kilo/ci-fix-run-reconcile.ts +299 -0
- package/src/modules/kilo/docs-drift-boundary.ts +178 -0
- package/src/modules/kilo/index.ts +8 -0
- package/src/modules/kilo/notifications.ts +295 -0
- package/src/modules/kilo/process.ts +637 -0
- package/src/modules/kilo/results/actions.ts +66 -0
- package/src/modules/kilo/results/gates.ts +227 -0
- package/src/modules/kilo/results/index.ts +23 -0
- package/src/modules/kilo/results/schemas.ts +112 -0
- package/src/modules/kilo/results/service.ts +512 -0
- package/src/modules/kilo/results/state.ts +508 -0
- package/src/modules/kilo/results/verify.ts +328 -0
- package/src/modules/kilo/revision-reconcile.ts +187 -0
- package/src/modules/kilo/runtime-facts.ts +128 -0
- package/src/modules/kilo/schemas.ts +265 -0
- package/src/modules/kilo/service.ts +714 -0
- package/src/modules/kilo/sessions-adapters.ts +343 -0
- package/src/modules/kilo/sessions.ts +446 -0
- package/src/modules/kilo/store.ts +689 -0
- package/src/modules/kilo/utils.ts +166 -0
- package/src/modules/learning/automation-health.ts +441 -0
- package/src/modules/learning/automation-memory.ts +179 -0
- package/src/modules/learning/index.ts +6 -0
- package/src/modules/learning/observability.ts +616 -0
- package/src/modules/learning/operator.ts +404 -0
- package/src/modules/learning/reviews/agents.ts +33 -0
- package/src/modules/learning/reviews/complete.ts +321 -0
- package/src/modules/learning/reviews/context.ts +145 -0
- package/src/modules/learning/reviews/events.ts +306 -0
- package/src/modules/learning/reviews/index.ts +6 -0
- package/src/modules/learning/reviews/pr-cadence.ts +157 -0
- package/src/modules/learning/reviews/pr-context.ts +749 -0
- package/src/modules/learning/reviews/prepare.ts +387 -0
- package/src/modules/learning/reviews/schemas.ts +184 -0
- package/src/modules/learning/reviews/store.ts +405 -0
- package/src/modules/learning/skill-patches/actions.ts +86 -0
- package/src/modules/learning/skill-patches/index.ts +3 -0
- package/src/modules/learning/skill-patches/schemas.ts +60 -0
- package/src/modules/learning/skill-patches/service.ts +571 -0
- package/src/modules/learning/skill-patches/support.ts +417 -0
- package/src/modules/memory/actions.ts +183 -0
- package/src/modules/memory/candidates.ts +525 -0
- package/src/modules/memory/events.ts +2 -0
- package/src/modules/memory/index.ts +6 -0
- package/src/modules/memory/prompt.ts +214 -0
- package/src/modules/memory/schemas.ts +170 -0
- package/src/modules/memory/service.ts +578 -0
- package/src/modules/memory/store.ts +489 -0
- package/src/modules/pr-events/actions.ts +191 -0
- package/src/modules/pr-events/index.ts +45 -0
- package/src/modules/pr-events/schemas.ts +186 -0
- package/src/modules/pr-events/service.ts +1414 -0
- package/src/modules/pr-events/target.ts +222 -0
- package/src/modules/pr-events/utils.ts +85 -0
- package/src/modules/pr-events/watermarks.ts +308 -0
- package/src/modules/pr-local-diffs/index.ts +334 -0
- package/src/modules/pr-review-assist/actions.ts +199 -0
- package/src/modules/pr-review-assist/index.ts +3 -0
- package/src/modules/pr-review-assist/schemas.ts +74 -0
- package/src/modules/pr-review-assist/service.ts +656 -0
- package/src/modules/prepared-diffs/actions.ts +132 -0
- package/src/modules/prepared-diffs/index.ts +53 -0
- package/src/modules/prepared-diffs/schemas.ts +255 -0
- package/src/modules/prepared-diffs/service.ts +777 -0
- package/src/modules/prepared-diffs/store.ts +606 -0
- package/src/modules/reports/index.ts +1 -0
- package/src/modules/reports/service.ts +322 -0
- package/src/modules/repos/index.ts +3 -0
- package/src/modules/repos/model-discovery.ts +233 -0
- package/src/modules/repos/providers.ts +194 -0
- package/src/modules/repos/registry.ts +232 -0
- package/src/modules/runtime/agent-config.ts +167 -0
- package/src/modules/runtime/doctor.ts +528 -0
- package/src/modules/runtime/env.ts +123 -0
- package/src/modules/runtime/index.ts +12 -0
- package/src/modules/runtime/local-api-auth.ts +43 -0
- package/src/modules/runtime/metrics.ts +211 -0
- package/src/modules/runtime/skills-actions.ts +141 -0
- package/src/modules/runtime/skills.ts +689 -0
- package/src/modules/runtime/soul.ts +68 -0
- package/src/modules/runtime/status-database.ts +252 -0
- package/src/modules/runtime/status-schema.ts +149 -0
- package/src/modules/runtime/status.ts +482 -0
- package/src/modules/runtime/subagents.ts +37 -0
- package/src/modules/runtime/utility-model.ts +47 -0
- package/src/modules/safety/index.ts +3 -0
- package/src/modules/safety/policy-entries.ts +2432 -0
- package/src/modules/safety/schemas.ts +63 -0
- package/src/modules/safety/service.ts +58 -0
- package/src/modules/safety/tools.ts +15 -0
- package/src/modules/scheduled-tasks/actions.ts +113 -0
- package/src/modules/scheduled-tasks/dispatch.ts +105 -0
- package/src/modules/scheduled-tasks/index.ts +6 -0
- package/src/modules/scheduled-tasks/schemas.ts +91 -0
- package/src/modules/scheduled-tasks/service.ts +296 -0
- package/src/modules/scheduled-tasks/store.ts +814 -0
- package/src/modules/scheduled-tasks/triggers.ts +87 -0
- package/src/modules/scheduler/actions.ts +37 -0
- package/src/modules/scheduler/dispatch.ts +126 -0
- package/src/modules/scheduler/index.ts +4 -0
- package/src/modules/scheduler/lease.ts +247 -0
- package/src/modules/scheduler/pr-watch-event-deltas.ts +367 -0
- package/src/modules/scheduler/pr-watch-events.ts +834 -0
- package/src/modules/scheduler/schemas.ts +79 -0
- package/src/modules/scheduler/service.ts +228 -0
- package/src/modules/scheduler/utils.ts +106 -0
- package/src/modules/scheduler/workflow-invocation.ts +40 -0
- package/src/modules/sessions/actions.ts +213 -0
- package/src/modules/sessions/active-session.ts +46 -0
- package/src/modules/sessions/agent-context.ts +146 -0
- package/src/modules/sessions/approval-nudges.ts +156 -0
- package/src/modules/sessions/events.ts +58 -0
- package/src/modules/sessions/index.ts +10 -0
- package/src/modules/sessions/queries.ts +252 -0
- package/src/modules/sessions/references.ts +113 -0
- package/src/modules/sessions/schemas.ts +263 -0
- package/src/modules/sessions/service.ts +845 -0
- package/src/modules/sessions/store.ts +559 -0
- package/src/modules/sessions/summaries.ts +129 -0
- package/src/modules/sessions/utils.ts +18 -0
- package/src/modules/watches/actions.ts +115 -0
- package/src/modules/watches/index.ts +6 -0
- package/src/modules/watches/polling.ts +245 -0
- package/src/modules/watches/references.ts +293 -0
- package/src/modules/watches/schemas.ts +156 -0
- package/src/modules/watches/service.ts +558 -0
- package/src/modules/watches/store.ts +398 -0
- package/src/modules/watches/utils.ts +51 -0
- package/src/modules/worktree-verification/index.ts +256 -0
- package/src/modules/worktrees/access.ts +129 -0
- package/src/modules/worktrees/actions.ts +108 -0
- package/src/modules/worktrees/cleanup.ts +98 -0
- package/src/modules/worktrees/errors.ts +38 -0
- package/src/modules/worktrees/git.ts +48 -0
- package/src/modules/worktrees/index.ts +5 -0
- package/src/modules/worktrees/locks.ts +192 -0
- package/src/modules/worktrees/paths.ts +209 -0
- package/src/modules/worktrees/queries.ts +31 -0
- package/src/modules/worktrees/schemas.ts +234 -0
- package/src/modules/worktrees/service.ts +657 -0
- package/src/modules/worktrees/store.ts +414 -0
- package/src/repo-edit/actions.ts +129 -0
- package/src/repo-edit/audit.ts +180 -0
- package/src/repo-edit/fuzzy-replace.ts +256 -0
- package/src/repo-edit/git.ts +784 -0
- package/src/repo-edit/index.ts +4 -0
- package/src/repo-edit/locks.ts +27 -0
- package/src/repo-edit/patch-parser.ts +212 -0
- package/src/repo-edit/patch-service.ts +572 -0
- package/src/repo-edit/path-safety.ts +294 -0
- package/src/repo-edit/schemas.ts +220 -0
- package/src/repo-edit/service.ts +488 -0
- package/src/repo-edit/support.ts +459 -0
- package/src/runtime-home/app-db/index.ts +73 -0
- package/src/runtime-home/app-db/migrate.ts +491 -0
- package/src/runtime-home/app-db/migrations/20260710061339_neondeck_pre_1_0_baseline/migration.sql +748 -0
- package/src/runtime-home/app-db/migrations/20260710061339_neondeck_pre_1_0_baseline/snapshot.json +7240 -0
- package/src/runtime-home/app-db/reconcile.ts +155 -0
- package/src/runtime-home/app-db/schema.ts +1118 -0
- package/src/runtime-home/bootstrap.ts +171 -0
- package/src/runtime-home/defaults.ts +42 -0
- package/src/runtime-home/files.ts +193 -0
- package/src/runtime-home/index.ts +68 -0
- package/src/runtime-home/paths.ts +75 -0
- package/src/runtime-home/schemas.ts +485 -0
- package/src/sandboxes/exedev.ts +676 -0
- package/src/server/app.ts +5 -0
- package/src/server/autopilot-push-dispatch.ts +326 -0
- package/src/server/create-app.ts +160 -0
- package/src/server/events/config-stream.ts +67 -0
- package/src/server/events/notification-stream.ts +49 -0
- package/src/server/events/session-stream.ts +49 -0
- package/src/server/http.ts +56 -0
- package/src/server/learning-hooks.ts +430 -0
- package/src/server/middleware.ts +81 -0
- package/src/server/routes/autopilot.ts +318 -0
- package/src/server/routes/commands.ts +12 -0
- package/src/server/routes/config.ts +124 -0
- package/src/server/routes/execution.ts +71 -0
- package/src/server/routes/github.ts +372 -0
- package/src/server/routes/handoff.ts +69 -0
- package/src/server/routes/kilo.ts +179 -0
- package/src/server/routes/learning.ts +384 -0
- package/src/server/routes/mcp.ts +301 -0
- package/src/server/routes/memory.ts +99 -0
- package/src/server/routes/metrics.ts +12 -0
- package/src/server/routes/notifications.ts +48 -0
- package/src/server/routes/repo-edit.ts +115 -0
- package/src/server/routes/reports.ts +127 -0
- package/src/server/routes/repos.ts +50 -0
- package/src/server/routes/runtime.ts +48 -0
- package/src/server/routes/safety.ts +13 -0
- package/src/server/routes/scheduled-tasks.ts +58 -0
- package/src/server/routes/scheduler.ts +13 -0
- package/src/server/routes/sessions.ts +216 -0
- package/src/server/routes/skills.ts +103 -0
- package/src/server/routes/watches.ts +81 -0
- package/src/server/routes/workflows.ts +21 -0
- package/src/server/routes/worktrees.ts +64 -0
- package/src/server/scheduler-workflow.ts +541 -0
- package/src/server/serve.ts +100 -0
- package/src/setup.ts +162 -0
- package/src/skills/github-gh/SKILL.md +56 -0
- package/src/skills/neon-ci-fix/SKILL.md +15 -0
- package/src/skills/neon-docs-fix/SKILL.md +15 -0
- package/src/skills/neon-issue-triage/SKILL.md +13 -0
- package/src/skills/neon-pr-review/SKILL.md +19 -0
- package/src/skills/neondeck/SKILL.md +123 -0
- package/src/skills/neondeck-handoff/SKILL.md +31 -0
- package/src/workflows/briefing.ts +14 -0
- package/src/workflows/command-run.ts +15 -0
- package/src/workflows/comment-pr-autofix-result.ts +10 -0
- package/src/workflows/curate_learning_store.ts +37 -0
- package/src/workflows/dev-doctor.ts +10 -0
- package/src/workflows/fix-pr-ci-failure.ts +10 -0
- package/src/workflows/fix-pr-ci.ts +15 -0
- package/src/workflows/fix-pr-review-feedback.ts +10 -0
- package/src/workflows/handoff_to_kilo.ts +10 -0
- package/src/workflows/prepare-pr-worktree.ts +10 -0
- package/src/workflows/promote_kilo_result.ts +10 -0
- package/src/workflows/push-pr-autofix.ts +10 -0
- package/src/workflows/reconcile_kilo_task.ts +10 -0
- package/src/workflows/review-pr-for-human.ts +15 -0
- package/src/workflows/review_conversation_for_learning.ts +37 -0
- package/src/workflows/review_kilo_result.ts +10 -0
- package/src/workflows/review_pr_batch_for_learning.ts +37 -0
- package/src/workflows/scheduled-agent-instruction.ts +16 -0
- package/src/workflows/scheduler-tick.ts +10 -0
- package/src/workflows/summarize_kilo_session.ts +25 -0
- package/src/workflows/triage-pr-event.ts +10 -0
- package/src/workflows/verify-pr-worktree.ts +10 -0
- package/src/workflows/verify-then-push-pr-autofix.ts +82 -0
- package/src/workflows/verify_kilo_result.ts +10 -0
- package/src/workflows/watch-pr.ts +10 -0
- package/web/dist/assets/GitHubPrReview-QK9oqeDs.js +2 -0
- package/web/dist/assets/MultiFileView-CMm6tA9f.js +2970 -0
- package/web/dist/assets/abap-CLvhMVsD.js +1 -0
- package/web/dist/assets/actionscript-3--17pq3dv.js +1 -0
- package/web/dist/assets/ada-C5qYipkI.js +1 -0
- package/web/dist/assets/andromeeda-vGVdxbeo.js +1 -0
- package/web/dist/assets/angular-html-BVBpGdXr.js +1 -0
- package/web/dist/assets/angular-ts-BfdufMKP.js +1 -0
- package/web/dist/assets/apache-U0d_L8uA.js +1 -0
- package/web/dist/assets/apex-VAyPSnFM.js +1 -0
- package/web/dist/assets/apl-DWBSSoBH.js +1 -0
- package/web/dist/assets/applescript-CCn79oCD.js +1 -0
- package/web/dist/assets/ara-4CJ0cIlV.js +1 -0
- package/web/dist/assets/asciidoc-DE70LPWp.js +1 -0
- package/web/dist/assets/asm-Cmm7eHzH.js +1 -0
- package/web/dist/assets/astro-3LtMP0Sq.js +1 -0
- package/web/dist/assets/aurora-x-CDeNXAV0.js +1 -0
- package/web/dist/assets/awk-BWXHIvNe.js +1 -0
- package/web/dist/assets/ayu-dark-DluEY0Gj.js +1 -0
- package/web/dist/assets/ayu-light-C3h-C4tm.js +1 -0
- package/web/dist/assets/ayu-mirage-Bqwy1Gya.js +1 -0
- package/web/dist/assets/ballerina-B7ZEbQpA.js +1 -0
- package/web/dist/assets/bat-Bo4NYOV-.js +1 -0
- package/web/dist/assets/beancount-D-usSTwE.js +1 -0
- package/web/dist/assets/berry-DKpUyyne.js +1 -0
- package/web/dist/assets/bibtex-Ci_nEsc7.js +1 -0
- package/web/dist/assets/bicep-CUHmPFLl.js +1 -0
- package/web/dist/assets/bird2-C6vDhewU.js +1 -0
- package/web/dist/assets/blade-llJRbbtR.js +1 -0
- package/web/dist/assets/bsl-BkkzgIyY.js +1 -0
- package/web/dist/assets/c-Wt1voDr2.js +1 -0
- package/web/dist/assets/c3-BFHwR3_K.js +1 -0
- package/web/dist/assets/cadence-CQ2zXKGN.js +1 -0
- package/web/dist/assets/cairo-DLTphjLi.js +1 -0
- package/web/dist/assets/catppuccin-frappe-3VR1Za6u.js +1 -0
- package/web/dist/assets/catppuccin-latte-DwIHMF0Q.js +1 -0
- package/web/dist/assets/catppuccin-macchiato-DYnBP6_5.js +1 -0
- package/web/dist/assets/catppuccin-mocha-DYhrFGRu.js +1 -0
- package/web/dist/assets/clarity-SemFz856.js +1 -0
- package/web/dist/assets/clojure-DqKBuwfJ.js +1 -0
- package/web/dist/assets/cmake-Bj61d0ZC.js +1 -0
- package/web/dist/assets/cobol-x_HIyl2P.js +1 -0
- package/web/dist/assets/codeowners-C8r90Shi.js +1 -0
- package/web/dist/assets/codeql-oeQT6MSM.js +1 -0
- package/web/dist/assets/coffee-CThvmt4R.js +1 -0
- package/web/dist/assets/common-lisp-Cv5bFMCO.js +1 -0
- package/web/dist/assets/coq-BrsZFFmf.js +1 -0
- package/web/dist/assets/cpp-NtAeskI3.js +1 -0
- package/web/dist/assets/crystal-DNu_sX0G.js +1 -0
- package/web/dist/assets/csharp-oqKa8noW.js +1 -0
- package/web/dist/assets/css-DJp_X0uY.js +1 -0
- package/web/dist/assets/csv-Dx-8-gkx.js +1 -0
- package/web/dist/assets/cue-CE9AQfxI.js +1 -0
- package/web/dist/assets/cypher-ClKdZ_lG.js +1 -0
- package/web/dist/assets/d-qD-0Kul2.js +1 -0
- package/web/dist/assets/dark-plus-Cs2F2srj.js +1 -0
- package/web/dist/assets/dart-CnvKMtbv.js +1 -0
- package/web/dist/assets/dax-BkyTk9wS.js +1 -0
- package/web/dist/assets/desktop-Dlh5hvp9.js +1 -0
- package/web/dist/assets/diff-woXpYk--.js +1 -0
- package/web/dist/assets/docker-IyjqRm3v.js +1 -0
- package/web/dist/assets/dotenv-_5a1GRtc.js +1 -0
- package/web/dist/assets/dracula-BHWKrbxM.js +1 -0
- package/web/dist/assets/dracula-soft-5eyTD99u.js +1 -0
- package/web/dist/assets/dream-maker-DW3nJb8Q.js +1 -0
- package/web/dist/assets/edge-ozw5tpLl.js +1 -0
- package/web/dist/assets/elixir-VhA6FeZt.js +1 -0
- package/web/dist/assets/elm-dREJmIFz.js +1 -0
- package/web/dist/assets/emacs-lisp-B4R74twV.js +1 -0
- package/web/dist/assets/erb-CIg6G69l.js +1 -0
- package/web/dist/assets/erlang-Cphh6RMH.js +1 -0
- package/web/dist/assets/everforest-dark-sB-x3p7T.js +1 -0
- package/web/dist/assets/everforest-light-Df2xbC6M.js +1 -0
- package/web/dist/assets/fennel-DQxkIbk2.js +1 -0
- package/web/dist/assets/fish-BJitypiv.js +1 -0
- package/web/dist/assets/fluent-C03EYrpw.js +1 -0
- package/web/dist/assets/fortran-fixed-form-DEKoE2YW.js +1 -0
- package/web/dist/assets/fortran-free-form-CYNrtFtB.js +1 -0
- package/web/dist/assets/fsharp-D13ZGOAj.js +1 -0
- package/web/dist/assets/gdresource-C0sCabJj.js +1 -0
- package/web/dist/assets/gdscript-Cp2uCuqX.js +1 -0
- package/web/dist/assets/gdshader-CBce3t8t.js +1 -0
- package/web/dist/assets/genie-CV2tkWYe.js +1 -0
- package/web/dist/assets/gherkin-DExj1W_8.js +1 -0
- package/web/dist/assets/git-commit-BSykSTBG.js +1 -0
- package/web/dist/assets/git-rebase-B44mJPta.js +1 -0
- package/web/dist/assets/github-dark-C-LZuMrd.js +1 -0
- package/web/dist/assets/github-dark-default-DXG-b-1a.js +1 -0
- package/web/dist/assets/github-dark-dimmed-Bx1FflLF.js +1 -0
- package/web/dist/assets/github-dark-high-contrast-B_tTalzw.js +1 -0
- package/web/dist/assets/github-light-EUqPIrTm.js +1 -0
- package/web/dist/assets/github-light-default-BXViO-2h.js +1 -0
- package/web/dist/assets/github-light-high-contrast-B68TUdTA.js +1 -0
- package/web/dist/assets/gleam-CSRkHgEL.js +1 -0
- package/web/dist/assets/glimmer-js-vH_gHG0-.js +1 -0
- package/web/dist/assets/glimmer-ts--abOzSAQ.js +1 -0
- package/web/dist/assets/glsl-Dv5r7kPw.js +1 -0
- package/web/dist/assets/gn-ilITqXS6.js +1 -0
- package/web/dist/assets/gnuplot-7GGW24-e.js +1 -0
- package/web/dist/assets/go-rLFTqkRN.js +1 -0
- package/web/dist/assets/graphql-CB4jsw2E.js +1 -0
- package/web/dist/assets/groovy-CacY0gHj.js +1 -0
- package/web/dist/assets/gruvbox-dark-hard-C820rvS2.js +1 -0
- package/web/dist/assets/gruvbox-dark-medium-BPjhmG05.js +1 -0
- package/web/dist/assets/gruvbox-dark-soft-MrdJrrXF.js +1 -0
- package/web/dist/assets/gruvbox-light-hard-BC_s9l72.js +1 -0
- package/web/dist/assets/gruvbox-light-medium-BAWPOn9u.js +1 -0
- package/web/dist/assets/gruvbox-light-soft-BSMLrYjP.js +1 -0
- package/web/dist/assets/hack-DvEYX148.js +1 -0
- package/web/dist/assets/haml-zE6W3STP.js +1 -0
- package/web/dist/assets/handlebars-CzBR2SDs.js +1 -0
- package/web/dist/assets/haskell-D8IpX4py.js +1 -0
- package/web/dist/assets/haxe-OTjmBuCE.js +1 -0
- package/web/dist/assets/hcl-Dh228itO.js +1 -0
- package/web/dist/assets/hjson-CxZEssPk.js +1 -0
- package/web/dist/assets/hlsl-Cvrh5tZx.js +1 -0
- package/web/dist/assets/horizon-CE9ld1lL.js +1 -0
- package/web/dist/assets/horizon-bright-DSNQnXHK.js +1 -0
- package/web/dist/assets/houston-CsvMBhTu.js +1 -0
- package/web/dist/assets/html-C8UlPnhE.js +1 -0
- package/web/dist/assets/html-derivative-CY6NRz-J.js +1 -0
- package/web/dist/assets/http-Cyd7bS_S.js +1 -0
- package/web/dist/assets/hurl-CWPsiEpf.js +1 -0
- package/web/dist/assets/hxml-B0Qn7Nwc.js +1 -0
- package/web/dist/assets/hy-CZbG8q4J.js +1 -0
- package/web/dist/assets/imba-DsUTQ-LC.js +1 -0
- package/web/dist/assets/index-DqZpo0Jd.js +44 -0
- package/web/dist/assets/index-_jKCE4ks.css +2 -0
- package/web/dist/assets/ini-B5eOa1yu.js +1 -0
- package/web/dist/assets/java-CGc3VwQr.js +1 -0
- package/web/dist/assets/javascript-CUt1pgmJ.js +1 -0
- package/web/dist/assets/jinja-CD-Z-FLd.js +1 -0
- package/web/dist/assets/jison-imPNup1l.js +1 -0
- package/web/dist/assets/json-Bg9ijW3F.js +1 -0
- package/web/dist/assets/json5-BR5RXkoi.js +1 -0
- package/web/dist/assets/jsonc-CYpm1nAK.js +1 -0
- package/web/dist/assets/jsonl-CmCQp5Yx.js +1 -0
- package/web/dist/assets/jsonnet-CJTPZ8u_.js +1 -0
- package/web/dist/assets/jssm-DXw9l8Rf.js +1 -0
- package/web/dist/assets/jsx-CY6oMTks.js +1 -0
- package/web/dist/assets/julia-Dc3O-irA.js +1 -0
- package/web/dist/assets/just-BhOq_Kbv.js +1 -0
- package/web/dist/assets/kanagawa-dragon-CXtmUGW6.js +1 -0
- package/web/dist/assets/kanagawa-lotus-BN08jTvb.js +1 -0
- package/web/dist/assets/kanagawa-wave-CTweb8Dz.js +1 -0
- package/web/dist/assets/kdl-CsD5j6eV.js +1 -0
- package/web/dist/assets/kotlin-DhhofPvG.js +1 -0
- package/web/dist/assets/kusto-C7mF5XQf.js +1 -0
- package/web/dist/assets/laserwave-C_8bwKvT.js +1 -0
- package/web/dist/assets/latex-Cu4Y1d5w.js +1 -0
- package/web/dist/assets/lean-CewbzKMR.js +1 -0
- package/web/dist/assets/less-DVTAwKKz.js +1 -0
- package/web/dist/assets/light-plus-DVQuIRkW.js +1 -0
- package/web/dist/assets/liquid-CvXMrjlQ.js +1 -0
- package/web/dist/assets/llvm-Cm23YOpf.js +1 -0
- package/web/dist/assets/log-BNLmms1o.js +1 -0
- package/web/dist/assets/logo-Cluzi2Zq.js +1 -0
- package/web/dist/assets/lua-BjLEUjKY.js +1 -0
- package/web/dist/assets/luau-FMPmPwt6.js +1 -0
- package/web/dist/assets/make-Dixweg8N.js +1 -0
- package/web/dist/assets/markdown-BYOwaDjH.js +1 -0
- package/web/dist/assets/marko-DvhNOisQ.js +1 -0
- package/web/dist/assets/material-theme-Bm3Qr25_.js +1 -0
- package/web/dist/assets/material-theme-darker-2IIEA8gg.js +1 -0
- package/web/dist/assets/material-theme-lighter-uhdI0v04.js +1 -0
- package/web/dist/assets/material-theme-ocean-CHQ94UKr.js +1 -0
- package/web/dist/assets/material-theme-palenight-B5W6OYN7.js +1 -0
- package/web/dist/assets/matlab-D7qyCx1q.js +1 -0
- package/web/dist/assets/mdc-Bm9TpL1X.js +1 -0
- package/web/dist/assets/mdx-DQZ5AkYe.js +1 -0
- package/web/dist/assets/mermaid-Bk4SNUv9.js +1 -0
- package/web/dist/assets/min-dark-BSWPekZh.js +1 -0
- package/web/dist/assets/min-light-DDpmG2fV.js +1 -0
- package/web/dist/assets/mipsasm-BMqwQI7S.js +1 -0
- package/web/dist/assets/mojo-BgCJLMeH.js +1 -0
- package/web/dist/assets/monokai-CdkpiU2Y.js +1 -0
- package/web/dist/assets/moonbit-CaWjb8XO.js +1 -0
- package/web/dist/assets/move-B1IS1UjX.js +1 -0
- package/web/dist/assets/narrat-_X_XdTYD.js +1 -0
- package/web/dist/assets/nextflow-BJtWHP5T.js +1 -0
- package/web/dist/assets/nextflow-groovy-DJMQeKeT.js +1 -0
- package/web/dist/assets/nginx-Bhc82uuv.js +1 -0
- package/web/dist/assets/night-owl-DhmEMT88.js +1 -0
- package/web/dist/assets/night-owl-light-eJ-hLW7d.js +1 -0
- package/web/dist/assets/nim-DXTVBFnF.js +1 -0
- package/web/dist/assets/nix-IvuFDN5E.js +1 -0
- package/web/dist/assets/nord-Cb4Vim4T.js +1 -0
- package/web/dist/assets/nushell-DcLAeLz5.js +1 -0
- package/web/dist/assets/objective-c-D1A_Heim.js +1 -0
- package/web/dist/assets/objective-cpp-BsSzOQcm.js +1 -0
- package/web/dist/assets/ocaml-O90oeIOV.js +1 -0
- package/web/dist/assets/odin-B1RWQWA5.js +1 -0
- package/web/dist/assets/one-dark-pro-CLwyXe_n.js +1 -0
- package/web/dist/assets/one-light-D7Lr4KcI.js +1 -0
- package/web/dist/assets/openscad-BUDT5pXO.js +1 -0
- package/web/dist/assets/pascal-4ZHwLPI5.js +1 -0
- package/web/dist/assets/perl-C7veXV9z.js +1 -0
- package/web/dist/assets/php-BRiuMnnr.js +1 -0
- package/web/dist/assets/pierre-dark-CpLgRqie.js +1 -0
- package/web/dist/assets/pierre-dark-protanopia-deuteranopia-B35FxJx-.js +1 -0
- package/web/dist/assets/pierre-dark-soft-kZQmAZld.js +1 -0
- package/web/dist/assets/pierre-dark-tritanopia-CpjhbsIL.js +1 -0
- package/web/dist/assets/pierre-dark-vibrant-CpQYzh95.js +1 -0
- package/web/dist/assets/pierre-light-CoaEpmwp.js +1 -0
- package/web/dist/assets/pierre-light-protanopia-deuteranopia-0fSaH845.js +1 -0
- package/web/dist/assets/pierre-light-soft-lWLdNTOI.js +1 -0
- package/web/dist/assets/pierre-light-tritanopia-CEbqgOJL.js +1 -0
- package/web/dist/assets/pierre-light-vibrant-D80Fkn33.js +1 -0
- package/web/dist/assets/pkl-ot-7Btpt.js +1 -0
- package/web/dist/assets/plastic-DQwYfKfQ.js +1 -0
- package/web/dist/assets/plsql-DGHpHOYJ.js +1 -0
- package/web/dist/assets/po-BiJDBrnU.js +1 -0
- package/web/dist/assets/poimandres-DRFjx7u4.js +1 -0
- package/web/dist/assets/polar-C7UOKdEL.js +1 -0
- package/web/dist/assets/postcss-BXeXVLqQ.js +1 -0
- package/web/dist/assets/powerquery-DNMTfnFr.js +1 -0
- package/web/dist/assets/powershell-DshXNtvi.js +1 -0
- package/web/dist/assets/prisma-BsRQq5mF.js +1 -0
- package/web/dist/assets/prolog-iXnhIJG7.js +1 -0
- package/web/dist/assets/proto-DB4EqR-F.js +1 -0
- package/web/dist/assets/pug-C5hz5LQ7.js +1 -0
- package/web/dist/assets/puppet-CDv2pdJW.js +1 -0
- package/web/dist/assets/purescript-9MfHhQsQ.js +1 -0
- package/web/dist/assets/python-gzcpVVnB.js +1 -0
- package/web/dist/assets/qml-BdUV3aTS.js +1 -0
- package/web/dist/assets/qmldir-DCQb3MpD.js +1 -0
- package/web/dist/assets/qss-Fe1Jh2GI.js +1 -0
- package/web/dist/assets/r-8R7vtdQc.js +1 -0
- package/web/dist/assets/racket-DcIDlBhZ.js +1 -0
- package/web/dist/assets/raku-B3gFvitq.js +1 -0
- package/web/dist/assets/razor-DRL52XO2.js +1 -0
- package/web/dist/assets/red-CJ3rzSJv.js +1 -0
- package/web/dist/assets/reg-CRGYupPL.js +1 -0
- package/web/dist/assets/regexp-Omp9DhTb.js +1 -0
- package/web/dist/assets/rel-BtDbiS_P.js +1 -0
- package/web/dist/assets/riscv-Ckw8ddFX.js +1 -0
- package/web/dist/assets/rolldown-runtime-QTnfLwEv.js +1 -0
- package/web/dist/assets/ron-VUp2lXgN.js +1 -0
- package/web/dist/assets/rose-pine-BthvhNj6.js +1 -0
- package/web/dist/assets/rose-pine-dawn-Dg85fqjY.js +1 -0
- package/web/dist/assets/rose-pine-moon-hon4tzzS.js +1 -0
- package/web/dist/assets/rosmsg-CAekHB0j.js +1 -0
- package/web/dist/assets/rst-BHX71KW9.js +1 -0
- package/web/dist/assets/ruby-B--HzjGU.js +1 -0
- package/web/dist/assets/rust-Cfkwpbl8.js +1 -0
- package/web/dist/assets/sas-DrLaYOK_.js +1 -0
- package/web/dist/assets/sass-DXrisJhu.js +1 -0
- package/web/dist/assets/scala-DKOlJaKm.js +1 -0
- package/web/dist/assets/scheme-DQCgrYNe.js +1 -0
- package/web/dist/assets/scss-DdSxiZKl.js +1 -0
- package/web/dist/assets/sdbl-bTVj8UrX.js +1 -0
- package/web/dist/assets/shaderlab-TOUzSsQk.js +1 -0
- package/web/dist/assets/shellscript-DwcUjJBL.js +1 -0
- package/web/dist/assets/shellsession-CPZkydE6.js +1 -0
- package/web/dist/assets/slack-dark-DnToyrRv.js +1 -0
- package/web/dist/assets/slack-ochin-B2OO5cIa.js +1 -0
- package/web/dist/assets/smalltalk-B16xEiuN.js +1 -0
- package/web/dist/assets/snazzy-light-4G7pJPwS.js +1 -0
- package/web/dist/assets/solarized-dark-DV17i1UV.js +1 -0
- package/web/dist/assets/solarized-light-DSh2HLQt.js +1 -0
- package/web/dist/assets/solidity-CKzVLygQ.js +1 -0
- package/web/dist/assets/soy-Br5FhD7c.js +1 -0
- package/web/dist/assets/sparql-D_iOobhT.js +1 -0
- package/web/dist/assets/splunk-BC2Px7Mm.js +1 -0
- package/web/dist/assets/sql-DNssxck8.js +1 -0
- package/web/dist/assets/ssh-config-BgfXC-Er.js +1 -0
- package/web/dist/assets/stata-DXn1tqOr.js +1 -0
- package/web/dist/assets/stylus-B6D30XZt.js +1 -0
- package/web/dist/assets/surfaces-B8Ko8AJ3.js +1 -0
- package/web/dist/assets/surrealql-IeLNQw0f.js +1 -0
- package/web/dist/assets/svelte-DOdLCIlh.js +1 -0
- package/web/dist/assets/swift-DonLKvLd.js +1 -0
- package/web/dist/assets/synthwave-84-nFMaYfgc.js +1 -0
- package/web/dist/assets/system-verilog-DJ5XKQeo.js +1 -0
- package/web/dist/assets/systemd-BxMlprV5.js +1 -0
- package/web/dist/assets/talonscript-CohzipZa.js +1 -0
- package/web/dist/assets/tasl-DMoTqEGO.js +1 -0
- package/web/dist/assets/tcl-CZd0xW_V.js +1 -0
- package/web/dist/assets/templ-CIwIngms.js +1 -0
- package/web/dist/assets/terraform-DswuEJGm.js +1 -0
- package/web/dist/assets/tex-D8QMumu5.js +1 -0
- package/web/dist/assets/tokyo-night-oM2G3aXe.js +1 -0
- package/web/dist/assets/toml-CcmNWLt0.js +1 -0
- package/web/dist/assets/ts-tags-BMVY4q-l.js +1 -0
- package/web/dist/assets/tsv-sltzmVWM.js +1 -0
- package/web/dist/assets/tsx-5Eka4NBX.js +1 -0
- package/web/dist/assets/turtle-ByJddavk.js +1 -0
- package/web/dist/assets/twig-C8o_5mgw.js +1 -0
- package/web/dist/assets/typescript-DOu2WMV5.js +1 -0
- package/web/dist/assets/typespec-BRdr0IET.js +1 -0
- package/web/dist/assets/typst-DI99ib-x.js +1 -0
- package/web/dist/assets/v-DETTlOr0.js +1 -0
- package/web/dist/assets/vala-zf12oZj6.js +1 -0
- package/web/dist/assets/vb-Djn5o6TS.js +1 -0
- package/web/dist/assets/verilog-CiiDBU1e.js +1 -0
- package/web/dist/assets/vesper-DdrHHSXu.js +1 -0
- package/web/dist/assets/vhdl-BroJfC0k.js +1 -0
- package/web/dist/assets/viml-DvXPmvsu.js +1 -0
- package/web/dist/assets/vitesse-black-fwtXNY1n.js +1 -0
- package/web/dist/assets/vitesse-dark-BZCL-v6S.js +1 -0
- package/web/dist/assets/vitesse-light-VbXTXTou.js +1 -0
- package/web/dist/assets/vue-BU18DNDL.js +1 -0
- package/web/dist/assets/vue-html-BeluIYX0.js +1 -0
- package/web/dist/assets/vue-vine-DGUAbOCX.js +1 -0
- package/web/dist/assets/vyper-CgoNMtux.js +1 -0
- package/web/dist/assets/wasm-BnjxR4X6.js +1 -0
- package/web/dist/assets/wasm-ByWQv1Qj.js +1 -0
- package/web/dist/assets/wenyan-C8pVoKbM.js +1 -0
- package/web/dist/assets/wgsl-BsKzXJz4.js +1 -0
- package/web/dist/assets/wikitext-ClFFjSW2.js +1 -0
- package/web/dist/assets/wit-DdvCle-K.js +1 -0
- package/web/dist/assets/wolfram-DLL8P-h_.js +1 -0
- package/web/dist/assets/worker-CBKQOXEl.js +160 -0
- package/web/dist/assets/xml-DIqSwXR3.js +1 -0
- package/web/dist/assets/xsl-Ct_-YIAy.js +1 -0
- package/web/dist/assets/yaml-DTtCYNlS.js +1 -0
- package/web/dist/assets/zenscript-BnlCZFoB.js +1 -0
- package/web/dist/assets/zig-CMLA9XwU.js +1 -0
- package/web/dist/icons/neondeck-icon-192.png +0 -0
- package/web/dist/icons/neondeck-icon-512.png +0 -0
- package/web/dist/icons/neondeck-icon.svg +41 -0
- package/web/dist/icons/neondeck-maskable-512.png +0 -0
- package/web/dist/index.html +24 -0
- package/web/dist/manifest.webmanifest +28 -0
|
@@ -0,0 +1,2970 @@
|
|
|
1
|
+
const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/angular-html-BVBpGdXr.js","assets/rolldown-runtime-QTnfLwEv.js","assets/html-C8UlPnhE.js","assets/javascript-CUt1pgmJ.js","assets/css-DJp_X0uY.js","assets/angular-ts-BfdufMKP.js","assets/scss-DdSxiZKl.js","assets/apl-DWBSSoBH.js","assets/xml-DIqSwXR3.js","assets/java-CGc3VwQr.js","assets/json-Bg9ijW3F.js","assets/astro-3LtMP0Sq.js","assets/typescript-DOu2WMV5.js","assets/postcss-BXeXVLqQ.js","assets/tsx-5Eka4NBX.js","assets/blade-llJRbbtR.js","assets/html-derivative-CY6NRz-J.js","assets/sql-DNssxck8.js","assets/bsl-BkkzgIyY.js","assets/sdbl-bTVj8UrX.js","assets/c-Wt1voDr2.js","assets/cairo-DLTphjLi.js","assets/python-gzcpVVnB.js","assets/cobol-x_HIyl2P.js","assets/coffee-CThvmt4R.js","assets/cpp-NtAeskI3.js","assets/regexp-Omp9DhTb.js","assets/glsl-Dv5r7kPw.js","assets/crystal-DNu_sX0G.js","assets/shellscript-DwcUjJBL.js","assets/edge-ozw5tpLl.js","assets/elixir-VhA6FeZt.js","assets/elm-dREJmIFz.js","assets/erb-CIg6G69l.js","assets/ruby-B--HzjGU.js","assets/haml-zE6W3STP.js","assets/graphql-CB4jsw2E.js","assets/jsx-CY6oMTks.js","assets/lua-BjLEUjKY.js","assets/yaml-DTtCYNlS.js","assets/erlang-Cphh6RMH.js","assets/markdown-BYOwaDjH.js","assets/fortran-fixed-form-DEKoE2YW.js","assets/fortran-free-form-CYNrtFtB.js","assets/fsharp-D13ZGOAj.js","assets/gdresource-C0sCabJj.js","assets/gdshader-CBce3t8t.js","assets/gdscript-Cp2uCuqX.js","assets/git-commit-BSykSTBG.js","assets/diff-woXpYk--.js","assets/git-rebase-B44mJPta.js","assets/glimmer-js-vH_gHG0-.js","assets/glimmer-ts--abOzSAQ.js","assets/hack-DvEYX148.js","assets/handlebars-CzBR2SDs.js","assets/http-Cyd7bS_S.js","assets/hurl-CWPsiEpf.js","assets/csv-Dx-8-gkx.js","assets/hxml-B0Qn7Nwc.js","assets/haxe-OTjmBuCE.js","assets/jinja-CD-Z-FLd.js","assets/jison-imPNup1l.js","assets/julia-Dc3O-irA.js","assets/r-8R7vtdQc.js","assets/just-BhOq_Kbv.js","assets/perl-C7veXV9z.js","assets/latex-Cu4Y1d5w.js","assets/tex-D8QMumu5.js","assets/liquid-CvXMrjlQ.js","assets/marko-DvhNOisQ.js","assets/less-DVTAwKKz.js","assets/mdc-Bm9TpL1X.js","assets/nextflow-BJtWHP5T.js","assets/nextflow-groovy-DJMQeKeT.js","assets/nginx-Bhc82uuv.js","assets/nim-DXTVBFnF.js","assets/php-BRiuMnnr.js","assets/pug-C5hz5LQ7.js","assets/qml-BdUV3aTS.js","assets/razor-DRL52XO2.js","assets/csharp-oqKa8noW.js","assets/rst-BHX71KW9.js","assets/cmake-Bj61d0ZC.js","assets/sas-DrLaYOK_.js","assets/shaderlab-TOUzSsQk.js","assets/hlsl-Cvrh5tZx.js","assets/shellsession-CPZkydE6.js","assets/soy-Br5FhD7c.js","assets/sparql-D_iOobhT.js","assets/turtle-ByJddavk.js","assets/stata-DXn1tqOr.js","assets/surrealql-IeLNQw0f.js","assets/svelte-DOdLCIlh.js","assets/templ-CIwIngms.js","assets/go-rLFTqkRN.js","assets/ts-tags-BMVY4q-l.js","assets/twig-C8o_5mgw.js","assets/vue-BU18DNDL.js","assets/vue-html-BeluIYX0.js","assets/vue-vine-DGUAbOCX.js","assets/stylus-B6D30XZt.js","assets/xsl-Ct_-YIAy.js"])))=>i.map(i=>d[i]);
|
|
2
|
+
import{n as e,r as t,t as n}from"./rolldown-runtime-QTnfLwEv.js";import{E as r,T as i,_ as a,c as o,d as s,f as c,g as l,l as u,m as d,p as f,s as p,u as m,v as h}from"./index-DqZpo0Jd.js";var g=t(r(),1),_=i(),v=/^diff --git a\/(.+?) b\/(.+)$/gm;function y(e){return!!(e&&e.trim().length>0)}function b(e){if(!e)return[];let t=[];for(let n of e.matchAll(v)){let e=n[2]??n[1];e&&t.push(e)}return[...new Set(t)]}function x(e){let t=e??``;if(!y(t))return[];let n=[...t.matchAll(v)];return n.length===0?[{additions:0,deletions:0,path:`patch.diff`,status:`M`,patch:null,message:`Patch is not in canonical git diff format.`}]:n.map((e,r)=>{let i=e.index??0,a=n[r+1]?.index??t.length,o=t.slice(i,a).trimEnd(),s=e[2]??e[1]??`patch.diff`;return{additions:T(o,`+`),binary:/Binary files .+ differ/.test(o),deletions:T(o,`-`),generatedLike:!1,path:s,status:E(o),patch:`${o}\n`,truncated:!1}})}function S(e){return`${e} file${e===1?``:`s`}`}function C(e){return e.binary?`binary`:`+${Number.isFinite(e.additions)?e.additions:0} -${Number.isFinite(e.deletions)?e.deletions:0}`}function ee(e){return e.find(e=>y(e.patch))?.path??e[0]?.path}function w(e){return e.binary?`binary file`:e.truncated?`patch truncated`:y(e.patch)?null:e.message??`No patch available for this file.`}function T(e,t){let n=t===`+`?`+++`:`---`;return e.split(`
|
|
3
|
+
`).filter(e=>e.startsWith(t)&&!e.startsWith(n)).length}function E(e){return/^new file mode /m.test(e)?`A`:/^deleted file mode /m.test(e)?`D`:/^---\s+\/dev\/null$/m.test(e)?`A`:/^\+\+\+\s+\/dev\/null$/m.test(e)?`D`:/^rename from /m.test(e)?`R`:`M`}var D=`file-tree-container`,O=`data-file-tree-style`,k=`data-file-tree-unsafe-css`,A=`data-file-tree-scrollbar-measure`,j=`data-file-tree-scrollbar-gutter-measured`,M=`--trees-scrollbar-gutter-measured`,N=`header`,te=`context-menu`,ne=`context-menu-trigger`,re=typeof window>`u`?g.useEffect:g.useLayoutEffect;function ie(e,t,n){let r=e==null?null:(0,_.jsx)(`div`,{slot:N,children:e}),i=t!=null&&n!=null?(0,_.jsx)(`div`,{slot:te,children:t(n.item,n.context)}):null;return r==null&&i==null?null:(0,_.jsxs)(_.Fragment,{children:[r,i]})}function ae(e,t){return typeof window>`u`&&t!=null?(0,_.jsxs)(_.Fragment,{children:[(0,_.jsx)(`template`,{shadowrootmode:`open`,dangerouslySetInnerHTML:{__html:t.shadowHtml}}),e]}):(0,_.jsx)(_.Fragment,{children:e})}function oe(e){let t=e.shadowRoot;return t?.querySelector(`[data-file-tree-id]`)instanceof HTMLElement||t?.querySelector(`[data-file-tree-id]`)instanceof SVGElement?!0:e.querySelector(`template[shadowrootmode="open"]`)instanceof HTMLTemplateElement}function se(e,t,n,r,i){let a={...e??{}};if(t!=null&&delete a.header,n){let t=e?.contextMenu,n=t?.onClose,o=t?.onOpen;a.contextMenu={...t??{},enabled:!0,onClose:()=>{n?.(),r()},onOpen:(e,t)=>{i(e,t),o?.(e,t)}},delete a.contextMenu.render}return a.header!=null||a.contextMenu!=null?a:void 0}function ce({header:e,id:t,model:n,preloadedData:r,renderContextMenu:i,...a}){let[o,s]=(0,g.useState)(null),[c,l]=(0,g.useState)(null),u=(0,g.useRef)(n.getComposition()),d=(0,g.useRef)(n);d.current!==n&&(d.current=n,u.current=n.getComposition());let f=i!=null,p=(0,g.useCallback)(()=>{s(null)},[]),m=(0,g.useCallback)((e,t)=>{s({context:t,item:e})},[]),h=u.current,v=(0,g.useMemo)(()=>se(h,e,f,p,m),[h,p,m,f,e]),y=(0,g.useCallback)(e=>{l(e)},[]);(0,g.useEffect)(()=>{f||s(null)},[f]),re(()=>{n.setComposition(v)},[v,n]),re(()=>{if(c!=null)return r!=null&&oe(c)?n.hydrate({fileTreeContainer:c}):n.render({fileTreeContainer:c}),()=>{n.unmount(),n.setComposition(h)}},[h,c,n,r]);let b=ae(ie(e,i,o),r),x=t??r?.id,S={"--trees-item-height":`${String(n.getItemHeight())}px`,"--trees-density-override":n.getDensityFactor(),...a.style};return(0,_.jsx)(D,{...a,id:x,ref:y,style:S,suppressHydrationWarning:r!=null,children:b})}var le=`<svg data-icon-sprite aria-hidden="true" width="0" height="0">
|
|
4
|
+
<symbol id="file-tree-icon-chevron" viewBox="0 0 16 16">
|
|
5
|
+
<path d="M12.4697 5.46973C12.7626 5.17684 13.2374 5.17684 13.5303 5.46973C13.8232 5.76262 13.8232 6.23738 13.5303 6.53028L8.53028 11.5303C8.23738 11.8232 7.76262 11.8232 7.46973 11.5303L2.46973 6.53028C2.17684 6.23738 2.17684 5.76262 2.46973 5.46973C2.76262 5.17684 3.23738 5.17684 3.53028 5.46973L8 9.93946L12.4697 5.46973Z" fill="currentcolor"/>
|
|
6
|
+
</symbol>
|
|
7
|
+
<symbol id="file-tree-icon-dot" viewBox="0 0 6 6">
|
|
8
|
+
<circle cx="3" cy="3" r="3" />
|
|
9
|
+
</symbol>
|
|
10
|
+
<symbol id="file-tree-icon-file" viewBox="0 0 16 16">
|
|
11
|
+
<path fill="currentColor" d="M8 1v3a3 3 0 0 0 3 3h3v5.5a2.5 2.5 0 0 1-2.5 2.5h-7A2.5 2.5 0 0 1 2 12.5v-9A2.5 2.5 0 0 1 4.5 1z" class="bg" opacity=".5"/>
|
|
12
|
+
<path fill="currentColor" d="M9.5 1a.5.5 0 0 1 .354.146l4 4A.5.5 0 0 1 14 5.5V6h-3a2 2 0 0 1-2-2V1z" class="fg"/>
|
|
13
|
+
</symbol>
|
|
14
|
+
<symbol id="file-tree-icon-lock" viewBox="0 0 16 16">
|
|
15
|
+
<path fill="currentcolor" d="M4 5.336V4a4 4 0 1 1 8 0v1.336c1.586.54 2 1.843 2 4.664v1c0 4.118-.883 5-5 5H7c-4.117 0-5-.883-5-5v-1c0-2.821.414-4.124 2-4.664M5.5 4v1.054Q6.166 4.998 7 5h2q.834-.002 1.5.054V4a2.5 2.5 0 0 0-5 0m-2 6v1c0 .995.055 1.692.167 2.193.107.483.246.686.35.79s.307.243.79.35c.5.112 1.198.167 2.193.167h2c.995 0 1.692-.055 2.193-.166.483-.108.686-.247.79-.35.104-.105.243-.308.35-.791.112-.5.167-1.198.167-2.193v-1c0-.995-.055-1.692-.166-2.193-.108-.483-.247-.686-.35-.79-.105-.104-.308-.243-.791-.35C10.693 6.555 9.995 6.5 9 6.5H7c-.995 0-1.692.055-2.193.167-.483.107-.686.246-.79.35s-.243.307-.35.79C3.555 8.307 3.5 9.005 3.5 10" />
|
|
16
|
+
</symbol>
|
|
17
|
+
<symbol id="file-tree-icon-ellipsis" viewBox="0 0 16 16">
|
|
18
|
+
<path d="M5 8.5a1.5 1.5 0 1 1-3 0 1.5 1.5 0 0 1 3 0M9.5 8.5a1.5 1.5 0 1 1-3 0 1.5 1.5 0 0 1 3 0M14 8.5a1.5 1.5 0 1 1-3 0 1.5 1.5 0 0 1 3 0" />
|
|
19
|
+
</symbol>
|
|
20
|
+
</svg>`,ue=`<symbol id="file-tree-builtin-astro" viewBox="0 0 16 16">
|
|
21
|
+
<path fill="currentColor" d="M6.08 13.92c-.63-.57-.81-1.79-.55-2.67.45.56 1.08.73 1.73.83 1 .15 1.99.1 2.92-.37l.32-.19q.13.38.08.78a2.1 2.1 0 0 1-.9 1.5q-.3.24-.61.43c-.64.44-.81.95-.57 1.69l.02.08a1.7 1.7 0 0 1-.74-.64 2 2 0 0 1-.3-.98q0-.27-.02-.52-.07-.61-.61-.62a.7.7 0 0 0-.75.6z" class="bg" opacity=".6"/>
|
|
22
|
+
<path fill="currentColor" d="M2.5 11.1s1.86-.9 3.72-.9l1.4-4.39c.05-.21.2-.36.38-.36s.33.15.38.36l1.4 4.38c2.2 0 3.72.92 3.72.92l-3.16-8.69q-.13-.4-.45-.42H6.11q-.3.02-.45.42z" class="fg"/>
|
|
23
|
+
</symbol>`,de=`<symbol id="file-tree-builtin-babel" viewBox="0 0 16 16">
|
|
24
|
+
<path fill="currentColor" fill-rule="evenodd" d="M9.49.5q1.92.05 2.66.54 1.27.6 1.35 1.52v.23a4 4 0 0 1-.53 1.9l-1.38 1.24q-.74.38-.72.63c.77.82 1.33 1.29.85 2.42q-.47 1.1-2.04 2.28c-.5.32-1.88 1.35-2.96 1.86-1.64.77-3.1 1.4-4.65 1.89-.51.16-1.5.16-1.5.16L.5 15A76 76 0 0 0 5.76 3.49q-.1-.08-.1-.2.1 0 .32-.35l-.03-.09q-1.17.39-2.38 1.3l-.13.03q0-.1-.21-.16-.46.31-.82.7l-.13-.19.16-.06-.03-.16-.34.29L2 4.5q.36-.48.72-.54l.04-.1V3.8q.16 0 .15-.06l.13-.06a6 6 0 0 0 1.13-.9v-.03H4.1l-.12.07q0-.1-.1-.1l-.15.07-.04-.1q.93-.52 1.63-1.05Q7.89.65 9.5.5M8.46 7.83l-.32.04c-1.31.54-2.31.82-2.91.88a71 71 0 0 0-2.2 4.54h.07q.58-.04 3.04-1.42.13 0 1.66-1.05L9.18 9.7v.03q.45-.2.81-1.3v-.2q-.5-.46-1.53-.4m.28-5.75c-.5.1-.75.19-.72.38l-1.16 2.6q-.17.1-.34.95-.3.48-.25.77v.1l.22.05A15 15 0 0 1 8.86 6c1.1-.71 2.12-1.38 2.8-2.54q.24-.33.21-.54-.02-.33-.4-.54c-.54 0-1.07-.34-1.63-.28l-.94-.03z" clip-rule="evenodd"/>
|
|
25
|
+
</symbol>`,fe=`<symbol id="file-tree-builtin-bash" viewBox="0 0 16 16">
|
|
26
|
+
<path fill="currentColor" d="M8 1C2.24 1 1 2.24 1 8s1.24 7 7 7 7-1.24 7-7-1.24-7-7-7" class="bg" opacity=".2"/>
|
|
27
|
+
<path fill="currentColor" d="M11.5 11a.5.5 0 0 1 0 1h-3a.5.5 0 0 1 0-1zM7 6.75C7 6.42 6.64 6 6 6s-1 .42-1 .75q-.01.25.22.41.26.21.89.35.74.14 1.28.53c.37.29.61.7.61 1.21 0 .87-.68 1.5-1.5 1.7v.55a.5.5 0 0 1-1 0v-.56c-.82-.18-1.5-.82-1.5-1.69a.5.5 0 0 1 1 0c0 .33.36.75 1 .75s1-.42 1-.75q.01-.25-.22-.41a2 2 0 0 0-.89-.35q-.74-.14-1.28-.53A1.5 1.5 0 0 1 4 6.75c0-.87.68-1.5 1.5-1.7V4.5a.5.5 0 0 1 1 0v.56c.82.18 1.5.82 1.5 1.69a.5.5 0 0 1-1 0" class="fg-stroke"/>
|
|
28
|
+
</symbol>`,pe=`<symbol id="file-tree-builtin-biome" viewBox="0 0 16 16">
|
|
29
|
+
<path fill="currentColor" d="M8 2 4.88 7.35a7 7 0 0 1 3.7-.13l1.04.25-.99 4.16-1.05-.25a2.7 2.7 0 0 0-3.07 1.45l-.98-.47a4 4 0 0 1 1.07-1.31 3.8 3.8 0 0 1 3.23-.71l.5-2.08a6 6 0 0 0-5.07 1.12A5.9 5.9 0 0 0 1 14h14z"/>
|
|
30
|
+
</symbol>`,me=`<symbol id="file-tree-builtin-bootstrap" viewBox="0 0 16 16">
|
|
31
|
+
<path fill="currentColor" fill-rule="evenodd" d="M11.72 1.5A2.5 2.5 0 0 1 14.2 4q.02 1.08.3 2.09c.22.73.56 1.24 1.08 1.45.22.08.4.27.4.5s-.18.43-.4.51q-.76.34-1.08 1.45c-.2.65-.27 1.32-.3 2a2.5 2.5 0 0 1-2.48 2.5H4.25A2.6 2.6 0 0 1 1.7 12c-.04-.85-.1-1.68-.22-2.04C1.26 9.23.92 8.7.4 8.5.18 8.42 0 8.23 0 8s.18-.42.4-.5q.77-.35 1.09-1.46c.1-.36.17-1.19.2-2.04a2.6 2.6 0 0 1 2.56-2.5z" class="bg" clip-rule="evenodd" opacity=".2"/>
|
|
32
|
+
<path fill="currentColor" fill-rule="evenodd" d="M8.47 4.54c1.23 0 2.04.68 2.04 1.73 0 .73-.55 1.39-1.24 1.5v.04c.94.1 1.58.77 1.58 1.7 0 1.2-.9 1.95-2.37 1.95H5.97a.3.3 0 0 1-.2-.08.3.3 0 0 1-.08-.2V4.82a.3.3 0 0 1 .08-.2.3.3 0 0 1 .2-.08zm-1.7 6.04h1.49q1.47-.01 1.49-1.15Q9.74 8.31 8.2 8.3H6.77zm0-5.16v2.06h1.21c.93 0 1.45-.38 1.45-1.06 0-.65-.44-1-1.22-1z" class="fg" clip-rule="evenodd"/>
|
|
33
|
+
</symbol>`,he=`<symbol id="file-tree-builtin-browserslist" viewBox="0 0 16 16">
|
|
34
|
+
<path fill="currentColor" d="M8.88 6.96c0 3.82 3.72 4.7 5.7 3.74-.23.9-1.04 1.67-2.35 1.93-.02.4.42 1.28.82 1.63-.9.35-1.94-.12-2.51-.48a5 5 0 0 0-.32 1.87c-.68 0-1.57-1-1.8-1.37-.3.18-.85 1.15-.96 1.72a2.4 2.4 0 0 1-.81-.86 2.4 2.4 0 0 1-.3-1.15c-.38.27-1.48.95-1.99 1.18-.25-.58-.15-1.3 0-2.06-.21.12-1.8.27-2.43.12.32-.36.75-1.19.94-1.57A4.5 4.5 0 0 1 .44 10.6c.48-.22.97-.53 1.49-1.06C1.26 9.17.24 8.64 0 7.7a6 6 0 0 0 1.79-.32C1.28 7.08.44 6.15.6 5.01c.42.21 1.3.37 1.73.3a3.4 3.4 0 0 1-.25-2.75 5 5 0 0 0 1.48 1c-.08-.8.3-2.31.8-2.71.2.46.73 1.21 1.08 1.4.09-.61.87-2.06 1.57-2.25 0 .5.27 1.4.5 1.67.51-.54 2.25-1.44 3.64-1.13-.43.45-.75.61-.86.98 1.05 0 2.78.34 4.27 1.93-2.34-.89-5.69.56-5.69 3.5" class="bg" opacity=".5"/>
|
|
35
|
+
<path fill="currentColor" d="M11.21 3.59a4.1 4.1 0 0 0 2.47 2.89c.24-.22.61-.38.95-.19.76.44.2 1.26-.34 1.66l-.07.06a13 13 0 0 1-4.49 1.61l-.3-.43a10.5 10.5 0 0 0 4.13-1.31 1 1 0 0 0 .23-.25.5.5 0 0 0-.21-.69l-.15-.06a4.5 4.5 0 0 1-1.77-1.31 4.5 4.5 0 0 1-.88-1.77q.2-.12.43-.21"/>
|
|
36
|
+
<path fill="currentColor" d="M10.36 5.18a.4.4 0 0 0-.03.38c.09.2.3.3.46.23s.24-.3.15-.5l-.01-.02q.23.13.34.39a.83.83 0 0 1-.43 1.08.8.8 0 0 1-1.08-.43.83.83 0 0 1 .6-1.13"/>
|
|
37
|
+
</symbol>`,ge=`<symbol id="file-tree-builtin-bun" viewBox="0 0 16 16">
|
|
38
|
+
<path fill="currentColor" d="M8 14c3.87 0 7-2.46 7-5.49 0-1.88-1.2-3.53-3.04-4.52q-1.1-.61-1.84-1.07C9.2 2.35 8.64 2 8 2s-1.36.45-2.31 1.03A29 29 0 0 1 4.04 4C2.2 4.98 1 6.63 1 8.51 1 11.54 4.13 14 8 14M7.18 3.88q.3-.66.3-1.37c0-.08.11-.1.13-.01.38 1.57-.53 2.35-1.2 2.61-.08.03-.12-.07-.06-.12a3 3 0 0 0 .83-1.12m1.2-.05a3 3 0 0 0-.45-1.3V2.5c-.04-.07.05-.15.1-.1 1.15 1.2.77 2.3.33 2.87-.05.05-.13 0-.11-.08q.21-.67.13-1.37m1.04-.32a3 3 0 0 0-.94-1.02v-.01c-.06-.05-.01-.16.07-.12 1.51.61 1.61 1.8 1.43 2.5l-.03.03a.07.07 0 0 1-.1-.06 3 3 0 0 0-.43-1.32m-2.97.32c-.36.3-.74.43-1.2.56q-.11 0-.1-.1a3.5 3.5 0 0 0 1.76-1.57s.09-.07.1.04c0 .18-.2.76-.56 1.07m2.89 6.36q-.13.52-.55.88a1.3 1.3 0 0 1-.75.35 1.3 1.3 0 0 1-.77-.35 1.7 1.7 0 0 1-.54-.88.13.13 0 0 1 .15-.15h2.31a.14.14 0 0 1 .15.15M6.15 8.95a1.1 1.1 0 0 1-1.39-.14A1.1 1.1 0 0 1 5.12 7a1.1 1.1 0 0 1 1.2.25 1.1 1.1 0 0 1-.17 1.69m4.96 0a1.1 1.1 0 0 1-1.4-.14 1.1 1.1 0 0 1 .37-1.8 1.1 1.1 0 0 1 1.2.25 1.1 1.1 0 0 1 .24 1.2 1 1 0 0 1-.41.5"/>
|
|
39
|
+
</symbol>`,_e=`<symbol id="file-tree-builtin-c" viewBox="0 0 16 16">
|
|
40
|
+
<path fill="currentColor" fill-rule="evenodd" d="M8 1q.084 0 .166.021.098.023.186.075c1.055.624 4.22 2.486 5.277 3.11.085.05.15.112.209.192h-.002l.028.037a.5.5 0 0 1 .103.21q.031.102.033.21v6.29a.71.71 0 0 1-.347.616l-5.307 3.144a.68.68 0 0 1-.693 0l-5.307-3.144A.72.72 0 0 1 2 11.145V4.832a.71.71 0 0 1 .346-.612l5.288-3.126A.7.7 0 0 1 7.992 1zm2.901 4.349a3.75 3.75 0 1 0 0 5.302l-1.06-1.06a2.25 2.25 0 1 1 0-3.182z" clip-rule="evenodd"/>
|
|
41
|
+
</symbol>`,ve=`<symbol id="file-tree-builtin-claude" viewBox="0 0 16 16">
|
|
42
|
+
<path fill="currentColor" d="M3.75 10.31 6.5 8.77l.04-.14-.04-.07h-.14l-.46-.03-1.57-.04-1.38-.07-1.33-.07-.34-.07L1 7.86l.03-.21.28-.18.4.03.89.07 1.33.08.97.06 1.43.16h.22l.03-.1-.07-.05-.06-.06-1.39-.92-1.48-.98-.79-.57-.42-.28-.2-.28-.1-.6.39-.41.52.04.12.03.52.4 1.12.86L6.2 6.04l.2.17.09-.06.01-.04-.1-.15-.76-1.46-.85-1.46-.37-.6-.1-.36a1 1 0 0 1-.06-.42l.42-.59.25-.07.6.08.22.2.36.84.58 1.3.9 1.77.29.53.14.47.04.14h.1v-.07l.07-1 .14-1.22.14-1.57.04-.45.23-.53.42-.28.36.15.28.41-.04.25-.16 1.08-.36 1.7-.21 1.14h.12l.14-.15.58-.76.97-1.2.42-.5.5-.51.32-.25h.6l.44.66-.2.68-.61.79-.52.65-.74 1-.45.8.04.05h.1l1.68-.36.9-.16 1.06-.18.5.23.05.22-.2.48-1.15.28-1.34.28-2 .46-.04.01.03.04.9.09.4.03h.94l1.77.14.46.28.27.37-.04.28-.72.37-.95-.23-2.24-.53-.76-.18h-.11v.06l.64.63L12 10.86l1.48 1.35.07.34-.18.28-.2-.03-1.29-.98-.5-.42-1.12-.95h-.07v.1l.25.38 1.37 2.05.07.63-.1.2-.36.14-.38-.08-.8-1.12-.85-1.26-.66-1.15-.07.05-.4 4.23-.19.21-.42.17-.35-.28-.2-.42.2-.87.23-1.12.18-.9.17-1.1.1-.36v-.03h-.1l-.84 1.16-1.27 1.72-1 1.07-.24.1-.42-.22.04-.39.22-.32 1.4-1.8.84-1.1.57-.64-.02-.07h-.04l-3.7 2.4-.66.09-.28-.28.03-.42.14-.14 1.12-.77z"/>
|
|
43
|
+
</symbol>`,ye=`<symbol id="file-tree-builtin-cpp" viewBox="0 0 16 16">
|
|
44
|
+
<path fill="currentColor" fill-rule="evenodd" d="M8 1q.084 0 .166.021.098.023.186.075c1.055.624 4.22 2.486 5.277 3.11.085.05.15.112.209.192h-.002l.028.037a.5.5 0 0 1 .103.21q.031.102.033.21v6.29a.71.71 0 0 1-.347.616l-5.307 3.144a.68.68 0 0 1-.693 0l-5.307-3.144A.72.72 0 0 1 2 11.145V4.832a.71.71 0 0 1 .346-.612l5.288-3.126A.7.7 0 0 1 7.992 1zm2.901 4.349a3.75 3.75 0 1 0 0 5.302l-1.06-1.06a2.25 2.25 0 1 1 0-3.182z" clip-rule="evenodd"/>
|
|
45
|
+
</symbol>`,be=`<symbol id="file-tree-builtin-css" viewBox="0 0 16 16">
|
|
46
|
+
<path fill="currentColor" d="M8 15c-5.76 0-7-1.24-7-7V2a1 1 0 0 1 1-1h6c5.77 0 7 1.24 7 7s-1.24 7-7 7" class="vector" opacity=".2"/>
|
|
47
|
+
<path fill="currentColor" d="M10.1 9.19h.73c.03.49.22.6 1 .6.76 0 .93-.12.93-.68 0-.52-.17-.67-.94-.85-1.38-.3-1.68-.56-1.68-1.47 0-1.05.3-1.29 1.67-1.29 1.29 0 1.57.2 1.6 1.13h-.74c-.01-.34-.17-.42-.85-.42-.77 0-.94.1-.94.58 0 .42.17.55.96.73 1.36.3 1.66.58 1.66 1.59 0 1.14-.31 1.39-1.73 1.39-1.39 0-1.69-.24-1.67-1.31m-3.9 0h.74c.03.49.21.6.99.6.76 0 .93-.12.93-.68 0-.52-.17-.67-.93-.85-1.39-.3-1.69-.56-1.69-1.47 0-1.05.3-1.29 1.67-1.29 1.3 0 1.58.2 1.6 1.13h-.73c-.02-.34-.18-.42-.85-.42-.78 0-.95.1-.95.58 0 .42.17.55.96.73 1.37.3 1.67.58 1.67 1.59 0 1.14-.32 1.39-1.74 1.39-1.38 0-1.68-.24-1.66-1.31m-1.22 0h.75c-.09 1.07-.37 1.31-1.56 1.31-1.37 0-1.68-.45-1.68-2.5 0-1.96.36-2.5 1.68-2.5 1.16 0 1.44.25 1.52 1.35h-.76c-.08-.52-.22-.64-.76-.64-.74 0-.9.33-.9 1.78 0 1.47.16 1.8.9 1.8.58 0 .74-.11.8-.6"/>
|
|
48
|
+
</symbol>`,xe=`<symbol id="file-tree-builtin-database" viewBox="0 0 16 16">
|
|
49
|
+
<path fill="currentColor" d="M14.953 9.733a12.4 12.4 0 0 1-.244 1.936c-.207.933-.532 1.58-.996 2.044s-1.11.789-2.044.996C10.73 14.918 9.533 15 8 15s-2.73-.082-3.669-.291c-.933-.207-1.58-.532-2.044-.996s-.789-1.11-.996-2.044c-.122-.547-.2-1.182-.244-1.92q.23.364.532.667c.64.639 1.482 1.031 2.533 1.265 1.046.232 2.33.315 3.884.315 1.555 0 2.838-.083 3.884-.315 1.051-.234 1.893-.626 2.532-1.265a4 4 0 0 0 .541-.683"/>
|
|
50
|
+
<path fill="currentColor" d="M14.93 5.924c-.046.663-.118 1.24-.23 1.743-.207.932-.532 1.579-.995 2.042s-1.11.789-2.042.996c-.938.209-2.135.291-3.667.291-1.531 0-2.729-.082-3.667-.29-.932-.208-1.579-.534-2.042-.997s-.789-1.11-.996-2.042a12 12 0 0 1-.227-1.683l.016-.188a4 4 0 0 0 .5.62c.638.639 1.48 1.031 2.532 1.265 1.046.232 2.33.315 3.884.315 1.555 0 2.838-.083 3.884-.315 1.051-.234 1.893-.626 2.532-1.265.192-.192.357-.404.506-.633z"/>
|
|
51
|
+
<path fill="currentColor" d="M8 1c1.533 0 2.73.082 3.669.291.933.207 1.58.533 2.044.996.403.404.904.944.91 1.695.004.764-.509 1.318-.918 1.727-.463.463-1.11.789-2.042.996-.938.209-2.135.291-3.667.291-1.531 0-2.729-.082-3.667-.29-.932-.208-1.579-.534-2.042-.997-.406-.406-.915-.953-.915-1.71 0-.758.509-1.305.915-1.712.464-.463 1.11-.789 2.044-.996C5.27 1.082 6.467 1 8 1"/>
|
|
52
|
+
</symbol>`,Se=`<symbol id="file-tree-builtin-default" viewBox="0 0 16 16">
|
|
53
|
+
<path fill="currentColor" d="M8 1v3a3 3 0 0 0 3 3h3v5.5a2.5 2.5 0 0 1-2.5 2.5h-7A2.5 2.5 0 0 1 2 12.5v-9A2.5 2.5 0 0 1 4.5 1z" class="bg" opacity=".4"/>
|
|
54
|
+
<path fill="currentColor" d="M9.5 1a.5.5 0 0 1 .354.146l4 4A.5.5 0 0 1 14 5.5V6h-3a2 2 0 0 1-2-2V1z" class="fg"/>
|
|
55
|
+
</symbol>`,Ce=`<symbol id="file-tree-builtin-docker" viewBox="0 0 16 16">
|
|
56
|
+
<path fill="currentColor" d="M15.85 6.54c-.05-.04-.45-.36-1.31-.36q-.34 0-.68.06a2.7 2.7 0 0 0-1.14-1.79l-.23-.14-.15.23a3 3 0 0 0-.4 1q-.24 1.01.26 1.84c-.4.24-1.03.3-1.17.3H.5a.5.5 0 0 0-.5.52q-.01 1.46.46 2.83.55 1.5 1.6 2.18c.79.5 2.08.79 3.54.79q.96 0 1.94-.18a8 8 0 0 0 2.55-.97 7 7 0 0 0 1.73-1.5 10 10 0 0 0 1.7-3.06h.15a2.4 2.4 0 0 0 1.8-.7 2 2 0 0 0 .47-.74l.06-.2z"/>
|
|
57
|
+
<path fill="currentColor" d="M1.48 7.36h1.4a.14.14 0 0 0 .14-.13V5.91q-.01-.12-.13-.14H1.48a.13.13 0 0 0-.13.14v1.32q.02.13.13.13m1.94 0h1.41a.14.14 0 0 0 .13-.13V5.91q-.01-.12-.13-.14h-1.4a.13.13 0 0 0-.13.14v1.32q0 .13.12.13m1.98 0h1.4q.13 0 .14-.13V5.91a.13.13 0 0 0-.14-.14H5.4q-.1.01-.12.14v1.32q0 .13.12.13m1.95 0h1.42q.1 0 .12-.13V5.91q0-.12-.12-.14H7.35q-.1.01-.12.14v1.32q.01.13.12.13M3.42 5.5h1.41c.07 0 .13-.08.13-.15V4.03a.13.13 0 0 0-.13-.14h-1.4q-.12 0-.13.14v1.31q0 .13.12.15m1.98 0h1.4c.08 0 .14-.08.14-.15V4.03q0-.13-.14-.14H5.4q-.1 0-.12.14v1.31q0 .13.12.15m1.95 0h1.42c.06 0 .12-.08.12-.15V4.03q-.01-.13-.12-.14H7.35q-.1 0-.12.14v1.31q.01.13.12.15m0-1.9h1.42q.1-.02.12-.14v-1.3Q8.88 2 8.77 2H7.35q-.1 0-.12.14v1.3q.01.13.12.14m1.97 3.78h1.4a.13.13 0 0 0 .14-.13V5.91q-.01-.12-.13-.14H9.32q-.1.01-.12.14v1.32q.01.13.12.13" opacity=".5"/>
|
|
58
|
+
</symbol>`,we=`<symbol id="file-tree-builtin-eslint" viewBox="0 0 16 16">
|
|
59
|
+
<path fill="currentColor" d="M11.16 6.1 8.12 4.35a.3.3 0 0 0-.24 0L4.84 6.1a.3.3 0 0 0-.12.2v3.5q0 .14.12.22l3.04 1.74q.12.08.24 0l3.04-1.74a.2.2 0 0 0 .13-.22V6.3a.3.3 0 0 0-.13-.2" opacity=".5"/>
|
|
60
|
+
<path fill="currentColor" d="m.1 7.69 3.63-6.3A.8.8 0 0 1 4.37 1h7.26c.26 0 .5.17.64.4l3.63 6.27a.8.8 0 0 1 0 .75l-3.63 6.24a.7.7 0 0 1-.64.34H4.37a.7.7 0 0 1-.64-.34L.1 8.41a.7.7 0 0 1 0-.72m3 3.02q.01.15.14.23l4.63 2.66q.13.06.26 0l4.63-2.66a.3.3 0 0 0 .14-.23V5.4a.3.3 0 0 0-.14-.23L8.13 2.52a.3.3 0 0 0-.26 0L3.24 5.17a.3.3 0 0 0-.14.23z"/>
|
|
61
|
+
</symbol>`,Te=`<symbol id="file-tree-builtin-font" viewBox="0 0 16 16">
|
|
62
|
+
<path fill="currentColor" d="M12.3 13c-1.59 0-2.68-.99-2.68-2.5 0-1.43 1-2.34 2.88-2.35h2.16v-.83c0-1.08-.62-1.68-1.73-1.68-1.05 0-1.66.54-1.73 1.36H9.93c.09-1.43 1.06-2.48 3.05-2.48 1.75 0 3.02.95 3.02 2.68v5.66h-1.29v-1.02h-.04c-.41.66-1.16 1.16-2.37 1.16m.36-1.12c1.14 0 2-.72 2-1.74v-.96H12.6c-1.12 0-1.6.54-1.6 1.28 0 .97.8 1.42 1.66 1.42m-11.24.98H0L3.8 2h1.39l3.8 10.86H7.54l-1.08-3.2H2.5zm3.09-9.25h-.04l-1.6 4.95H6.1z"/>
|
|
63
|
+
</symbol>`,Ee=`<symbol id="file-tree-builtin-git" viewBox="0 0 16 16">
|
|
64
|
+
<path fill="currentColor" d="M14.74 7.38 8.62 1.26a.9.9 0 0 0-1.27 0L6.08 2.53l1.61 1.61a1.07 1.07 0 0 1 1.36 1.37l1.55 1.55a1.07 1.07 0 0 1 1.1 1.77 1.07 1.07 0 0 1-1.74-1.16L8.5 6.22v3.8a1.07 1.07 0 1 1-.89-.02V6.15a1.07 1.07 0 0 1-.58-1.4l-1.58-1.6-4.2 4.2a.9.9 0 0 0 0 1.27l6.12 6.12a.9.9 0 0 0 1.27 0l6.09-6.09a.9.9 0 0 0 0-1.27"/>
|
|
65
|
+
</symbol>`,De=`<symbol id="file-tree-builtin-go" viewBox="0 0 16 16">
|
|
66
|
+
<path fill="currentColor" fill-rule="evenodd" d="M4.41 4.57A3.2 3.2 0 0 1 6.87 5q.74.49 1.08 1.29.08.12-.1.16l-1.55.4c-.14.03-.15.04-.27-.1a1 1 0 0 0-.44-.34 1.6 1.6 0 0 0-1.68.14q-.95.61-.94 1.73c0 .73.52 1.33 1.25 1.43q.95.1 1.58-.6l.25-.34h-1.8c-.19 0-.24-.12-.17-.27.12-.28.34-.76.47-1a.3.3 0 0 1 .24-.14h2.98a4 4 0 0 1 .64-1.19 4 4 0 0 1 2.6-1.52 3.5 3.5 0 0 1 2.64.46q1.13.73 1.31 2.04a3.5 3.5 0 0 1-1.06 3.09q-.93.92-2.23 1.17l-.74.08a3.5 3.5 0 0 1-2.27-.8 3 3 0 0 1-.93-1.42 4 4 0 0 1-.39.61 4 4 0 0 1-2.64 1.56 3.3 3.3 0 0 1-2.5-.6 3 3 0 0 1-1.18-2.03 3.5 3.5 0 0 1 .8-2.67 4 4 0 0 1 2.6-1.58M13.1 7.5a1.53 1.53 0 0 0-1.9-1.21q-1.3.3-1.62 1.59a1.5 1.5 0 0 0 .85 1.72q.77.33 1.52-.05a2 2 0 0 0 1.18-1.74q0-.17-.03-.3" clip-rule="evenodd"/>
|
|
67
|
+
</symbol>`,Oe=`<symbol id="file-tree-builtin-graphql" viewBox="0 0 16 16">
|
|
68
|
+
<path fill="currentColor" fill-rule="evenodd" d="M8 1a1.25 1.25 0 0 1 1.18 1.65l2.8 1.61q.33-.25.77-.26a1.25 1.25 0 0 1 .48 2.4v3.2a1.25 1.25 0 1 1-1.25 2.13l-2.8 1.62A1.25 1.25 0 0 1 8 15a1.25 1.25 0 0 1-1.18-1.65l-2.8-1.62q-.33.26-.77.27a1.25 1.25 0 0 1-.48-2.4V6.4a1.25 1.25 0 1 1 1.25-2.14l2.8-1.61A1.25 1.25 0 0 1 8 1M4.44 11.14l-.06.13 2.75 1.58a1.25 1.25 0 0 1 1.74 0l2.74-1.58-.05-.13zm3.89-7.68a1.3 1.3 0 0 1-.66 0L4.03 9.77q.37.3.45.78h7.04q.08-.48.45-.78zM4.38 4.73a1.24 1.24 0 0 1-1.02 1.76v3.02l.13.01 3.67-6.35-.03-.02zm4.46-1.56 3.67 6.35.13-.01V6.49a1.25 1.25 0 0 1-1.03-1.76L8.87 3.15z" clip-rule="evenodd"/>
|
|
69
|
+
</symbol>`,ke=`<symbol id="file-tree-builtin-html" viewBox="0 0 16 16">
|
|
70
|
+
<path fill="currentColor" d="M8 1C2.24 1 1 2.24 1 8s1.24 7 7 7 7-1.24 7-7-1.24-7-7-7" class="bg" opacity=".2"/>
|
|
71
|
+
<path fill="currentColor" d="M10.48 3.76a.5.5 0 0 1 .4.58L10.6 5.8h1.14a.5.5 0 0 1 0 1h-1.32L10 9.2h1.08a.5.5 0 0 1 0 1H9.8l-.3 1.64a.5.5 0 1 1-.98-.18l.27-1.46H6.4l-.3 1.64a.5.5 0 1 1-.98-.18l.27-1.46H4.25a.5.5 0 0 1 0-1h1.32L6 6.8H4.93a.5.5 0 0 1 0-1H6.2l.3-1.64a.5.5 0 1 1 .98.18L7.2 5.8h2.4l.3-1.64a.5.5 0 0 1 .58-.4M6.58 9.2h2.4l.44-2.4h-2.4z" class="fg"/>
|
|
72
|
+
</symbol>`,Ae=`<symbol id="file-tree-builtin-image" viewBox="0 0 16 16">
|
|
73
|
+
<path fill="currentColor" d="M12.5 2A2.5 2.5 0 0 1 15 4.5v4.67l-4.05-3.54-4.08 4.08-3-2L1 10.6V4.5A2.5 2.5 0 0 1 3.5 2z" opacity=".3"/>
|
|
74
|
+
<path fill="currentColor" d="M15 10.5v1a2.5 2.5 0 0 1-2.5 2.5h-9a2.5 2.5 0 0 1-2.46-2.04L4 9l3 2 4-4zm-7-5a1.5 1.5 0 1 1-3 0 1.5 1.5 0 0 1 3 0"/>
|
|
75
|
+
</symbol>`,P=`<symbol id="file-tree-builtin-javascript" viewBox="0 0 16 16">
|
|
76
|
+
<path fill="currentColor" d="M8 1C2.24 1 1 2.24 1 8s1.24 7 7 7 7-1.24 7-7-1.24-7-7-7" class="bg" opacity=".2"/>
|
|
77
|
+
<path fill="currentColor" d="M8.1 9.64h.95c.04.62.28.76 1.28.76s1.2-.14 1.2-.85c0-.66-.2-.85-1.2-1.07-1.79-.38-2.18-.7-2.18-1.86C8.15 5.3 8.54 5 10.31 5c1.67 0 2.04.26 2.07 1.42h-.95c-.02-.43-.23-.53-1.1-.53-1 0-1.22.14-1.22.74 0 .52.22.7 1.24.92 1.76.38 2.15.73 2.15 2 0 1.44-.4 1.75-2.24 1.75-1.8 0-2.18-.3-2.15-1.66M3.5 9.5h.98c0 .76.15.92.85.92.77 0 .94-.18.94-1.02V5.1h1v4.34c0 1.54-.35 1.87-1.92 1.87-1.55 0-1.89-.32-1.86-1.8"/>
|
|
78
|
+
</symbol>`,je=`<symbol id="file-tree-builtin-json" viewBox="0 0 16 16">
|
|
79
|
+
<path fill="currentColor" d="M13.25 11.5V9.75a.5.5 0 0 1 .36-.48l.55-.15a1.16 1.16 0 0 0 0-2.24l-.55-.15a.5.5 0 0 1-.36-.48V4.5a2.5 2.5 0 0 0-2.5-2.5h-.25a.5.5 0 0 0 0 1h.25a1.5 1.5 0 0 1 1.5 1.5v1.75a1.5 1.5 0 0 0 1.09 1.44l.54.15a.16.16 0 0 1 0 .32l-.54.15a1.5 1.5 0 0 0-1.09 1.44v1.75a1.5 1.5 0 0 1-1.5 1.5h-.25a.5.5 0 0 0 0 1h.25a2.5 2.5 0 0 0 2.5-2.5m-10.5 0V9.75a.5.5 0 0 0-.36-.48l-.55-.15a1.16 1.16 0 0 1 0-2.24l.55-.15a.5.5 0 0 0 .36-.48V4.5A2.5 2.5 0 0 1 5.25 2h.25a.5.5 0 0 1 0 1h-.25a1.5 1.5 0 0 0-1.5 1.5v1.75a1.5 1.5 0 0 1-1.09 1.44l-.54.15a.16.16 0 0 0 0 .32l.54.15a1.5 1.5 0 0 1 1.09 1.45v1.74a1.5 1.5 0 0 0 1.5 1.5h.25a.5.5 0 0 1 0 1h-.25a2.5 2.5 0 0 1-2.5-2.5"/>
|
|
80
|
+
</symbol>`,Me=`<symbol id="file-tree-builtin-markdown" viewBox="0 0 16 16">
|
|
81
|
+
<path fill="currentColor" d="M1 12V4h2l2 2.5L7 4h2v8H7V7.5l-2 2-2-2V12zm9-3 3 3.5L16 9h-2V4h-2v5z"/>
|
|
82
|
+
</symbol>`,Ne=`<symbol id="file-tree-builtin-mcp" viewBox="0 0 16 16">
|
|
83
|
+
<path fill="currentColor" d="M9.26-.04a3 3 0 0 1 2 .82 2.8 2.8 0 0 1 .8 2.35 2.9 2.9 0 0 1 2.41.8l.03.02a2.74 2.74 0 0 1 0 3.94l-5.8 5.69-.04.06-.02.07q0 .04.02.07.01.04.04.06l1.2 1.17a.55.55 0 0 1 0 .79.6.6 0 0 1-.81 0l-1.2-1.17a1.3 1.3 0 0 1 0-1.84L13.7 7.1a1.65 1.65 0 0 0 .37-1.82 2 2 0 0 0-.37-.54l-.03-.03a1.73 1.73 0 0 0-2.4 0L6.47 9.4l-.07.06a.58.58 0 0 1-.92-.18.6.6 0 0 1 .12-.6l4.85-4.76a1.65 1.65 0 0 0 0-2.36 1.73 1.73 0 0 0-2.4 0l-6.43 6.3a.6.6 0 0 1-.8 0 .55.55 0 0 1 0-.8L7.25.79a3 3 0 0 1 2-.82"/>
|
|
84
|
+
<path fill="currentColor" d="M9.26 2.19a.6.6 0 0 1 .52.34.6.6 0 0 1 0 .43l-.12.18L4.9 7.79a1.65 1.65 0 0 0 0 2.36 1.73 1.73 0 0 0 2.4 0l4.75-4.66a.58.58 0 0 1 .93.18.6.6 0 0 1-.12.61l-4.75 4.66a2.9 2.9 0 0 1-4.01 0 2.75 2.75 0 0 1-.62-3.04A3 3 0 0 1 4.1 7l4.74-4.65a.6.6 0 0 1 .4-.16"/>
|
|
85
|
+
</symbol>`,Pe=`<symbol id="file-tree-builtin-nextjs" viewBox="0 0 16 16">
|
|
86
|
+
<defs>
|
|
87
|
+
<linearGradient id="a" x1="4.522" x2="14" y1="3.943" y2="16" gradientUnits="userSpaceOnUse">
|
|
88
|
+
<stop stop-color="currentColor"/>
|
|
89
|
+
<stop offset="1" stop-color="currentColor" stop-opacity="0"/>
|
|
90
|
+
</linearGradient>
|
|
91
|
+
</defs>
|
|
92
|
+
<path fill="currentColor" d="M3 2h1.522v9.09H3z"/>
|
|
93
|
+
<path fill="url(#a)" d="M4.903 2 15 15.075q-.565.5-1.195.925L4.522 3.943z"/>
|
|
94
|
+
<path fill="currentColor" d="M12.172 2h-1.508v9.094h1.508z"/>
|
|
95
|
+
</symbol>`,Fe=`<symbol id="file-tree-builtin-npm" viewBox="0 0 16 16">
|
|
96
|
+
<path fill="currentColor" d="M2 1a1 1 0 0 0-1 1v12a1 1 0 0 0 1 1h12a1 1 0 0 0 1-1V2a1 1 0 0 0-1-1z" class="vector" opacity=".2"/>
|
|
97
|
+
<path fill="currentColor" d="M10.5 13H13V3H3v10h5V5.5h2.5z"/>
|
|
98
|
+
</symbol>`,Ie=`<symbol id="file-tree-builtin-oxc" viewBox="0 0 16 16">
|
|
99
|
+
<path fill="currentColor" d="M9.5 1a.5.5 0 0 1 .5.5V3h3.5a.5.5 0 0 1 .38.83L10.5 7.69v1.44q.41.04.95-.16a4 4 0 0 0 .72-.35l.04-.03h.01a.5.5 0 0 1 .67.1l2 2.5a.5.5 0 0 1 0 .62c-.76.96-3.14 2.69-6.89 2.69s-6.13-1.73-6.89-2.69a.5.5 0 0 1 0-.62l2-2.5a.5.5 0 0 1 .67-.1l.05.03.16.09q.22.13.56.26.54.2.95.16V7.69L2.12 3.83A.5.5 0 0 1 2.5 3H6V1.5a.5.5 0 0 1 .5-.5zM7 3.5a.5.5 0 0 1-.5.5H3.6l2.78 3.17a.5.5 0 0 1 .12.33v2a.5.5 0 0 1-.28.45c-.7.35-1.5.15-2.02-.05a5 5 0 0 1-.58-.26l-1.46 1.84c.82.78 2.8 2.02 5.84 2.02s5.02-1.24 5.84-2.02l-1.46-1.83a5 5 0 0 1-.58.26c-.52.2-1.33.39-2.02.04a.5.5 0 0 1-.28-.45v-2a.5.5 0 0 1 .12-.33L12.4 4H9.5a.5.5 0 0 1-.5-.5V2H7z"/>
|
|
100
|
+
</symbol>`,Le=`<symbol id="file-tree-builtin-postcss" viewBox="0 0 16 16">
|
|
101
|
+
<path fill="currentColor" d="M14.5 8a6.5 6.5 0 0 0-5.9-6.47l5.42 8.93A7 7 0 0 0 14.5 8M2.88 12A6.5 6.5 0 0 0 8 14.5c2.08 0 3.93-.98 5.12-2.5zm8.62-1h1.68L11.5 8.24zm-1-.55a4 4 0 0 1-.7.55h.7zM8 5.5a2.5 2.5 0 1 0 0 5 2.5 2.5 0 0 0 0-5M5.5 11h.7a4 4 0 0 1-.7-.55zm-2.68 0H4.5V8.24zm3.76-6.2A4 4 0 0 1 8 4.5q.76 0 1.42.3L8 2.46zM1.5 8q0 1.31.48 2.46L7.4 1.53A6.5 6.5 0 0 0 1.5 8m14 0a7.5 7.5 0 0 1-.99 3.72l-.01.03-.02.03A7.5 7.5 0 0 1 8 15.5a7.5 7.5 0 0 1-6.5-3.75l-.01-.03A7.5 7.5 0 1 1 15.5 8"/>
|
|
102
|
+
</symbol>`,Re=`<symbol id="file-tree-builtin-prettier" viewBox="0 0 16 16">
|
|
103
|
+
<path fill="currentColor" d="M6 12v1H4.93v-1zm1-2v1H2v-1zm6-4v1h-3V6zm-1-4v1H9V2z"/>
|
|
104
|
+
<path fill="currentColor" d="M11.5 10v1H8v-1zM5 6v1H2V6zm5-2v1H9V4z" opacity=".8"/>
|
|
105
|
+
<path fill="currentColor" d="M6 14v1H2v-1zm-.5-6v1H2V8zM13 4v1h-3V4zM4.93 2v1H2V2z" opacity=".6"/>
|
|
106
|
+
<path fill="currentColor" d="M4.93 12v1H2v-1zM13 8v1H9V8zM5.5 4v1H2V4zM9 2v1H4.93V2z" opacity=".4"/>
|
|
107
|
+
</symbol>`,ze=`<symbol id="file-tree-builtin-python" viewBox="0 0 16 16">
|
|
108
|
+
<path fill="currentColor" d="M8.33 8.4H10c1.16 0 1.9-.73 1.9-1.86V5.08q0-.24.25-.24h.74c.75 0 1.33.32 1.66.97q.4.73.41 1.46c.09.9.09 1.78-.24 2.67-.25.73-.75 1.3-1.58 1.46h-4.8c-.08 0-.25 0-.25.08v.4s.17.09.25.09h2.82q.34-.02.33.32v1.06c0 .56-.25.97-.75 1.13-.41.16-.83.33-1.24.4a7 7 0 0 1-2.98-.07 3 3 0 0 1-1.16-.49c-.33-.32-.58-.65-.5-1.14v-2.91c0-1.13.67-1.78 1.82-1.78q.89-.1 1.66-.08m2.32 4.86a.65.65 0 0 0-.66-.65c-.34 0-.67.33-.67.65s.33.57.67.65a.65.65 0 0 0 .66-.65" class="bg" opacity=".8"/>
|
|
109
|
+
<path fill="currentColor" d="M7.67 7.6H6c-1.16 0-1.9.73-1.9 1.86v1.46q0 .24-.25.24h-.74c-.75 0-1.33-.32-1.66-.97a3 3 0 0 1-.41-1.46 6 6 0 0 1 .24-2.67c.25-.73.75-1.3 1.58-1.46h4.8c.08 0 .25 0 .25-.08v-.4s-.17-.09-.25-.09H4.85c-.24 0-.33-.08-.33-.32V2.65c0-.56.25-.97.75-1.13.41-.16.83-.33 1.24-.4a7 7 0 0 1 2.98.07c.41.09.83.25 1.16.49.33.32.58.65.5 1.13v2.92c0 1.14-.67 1.78-1.82 1.78-.58.08-1.16.08-1.66.08M5.35 2.73c0 .33.25.65.66.65.33 0 .66-.32.66-.65 0-.32-.33-.56-.66-.64a.65.65 0 0 0-.66.64" class="fg"/>
|
|
110
|
+
</symbol>`,Be=`<symbol id="file-tree-builtin-react" viewBox="0 0 16 16">
|
|
111
|
+
<path fill="currentColor" d="M8 6.65c.73 0 1.31.6 1.31 1.35S8.73 9.35 8 9.35 6.69 8.75 6.69 8 7.27 6.65 8 6.65"/>
|
|
112
|
+
<path fill="currentColor" fill-rule="evenodd" d="M8 2.55c1.3-.99 2.59-1.34 3.5-.8.92.55 1.27 1.87 1.08 3.53C14.06 5.94 15 6.9 15 8s-.94 2.06-2.42 2.72c.19 1.65-.16 2.98-1.08 3.52-.91.55-2.2.2-3.5-.8-1.3 1-2.58 1.35-3.5.8-.91-.54-1.27-1.87-1.08-3.52C1.94 10.06 1 9.1 1 8s.94-2.06 2.42-2.72c-.19-1.66.17-2.98 1.08-3.52s2.2-.2 3.5.8M4.26 11.2c-.08 1.34.28 2.03.68 2.26s1.15.22 2.25-.52l.11-.09a12 12 0 0 1-1.24-1.39 11 11 0 0 1-1.8-.41zm7.47-.15q-.83.27-1.79.41-.6.8-1.24 1.4l.11.08c1.1.74 1.86.76 2.25.52.4-.23.76-.92.68-2.26zm-3.04.54a14 14 0 0 1-1.38 0q.34.38.69.7.35-.32.7-.7M8 5.29q-.76 0-1.47.1A13 13 0 0 0 5.07 8a14 14 0 0 0 1.46 2.62 13 13 0 0 0 2.94 0A13 13 0 0 0 10.93 8a14 14 0 0 0-1.46-2.62A13 13 0 0 0 8 5.3M4.64 9.18q-.15.5-.25.96.44.16.94.27a15 15 0 0 1-.7-1.23m6.73 0a15 15 0 0 1-.7 1.23q.5-.11.95-.27a10 10 0 0 0-.25-.96M3.44 6.26C2.27 6.86 1.87 7.53 1.87 8s.4 1.14 1.57 1.74l.13.07q.18-.88.55-1.81a12 12 0 0 1-.55-1.8q-.07.02-.13.06m8.99-.07A12 12 0 0 1 11.88 8q.36.94.55 1.8l.13-.06c1.17-.6 1.56-1.27 1.56-1.74s-.39-1.14-1.56-1.74zm-7.1-.6q-.5.11-.94.27.1.46.25.96a15 15 0 0 1 .69-1.23m5.34 0a15 15 0 0 1 .7 1.23q.14-.5.24-.96-.44-.15-.94-.27M7.18 3.06c-1.09-.74-1.85-.76-2.24-.52s-.76.92-.69 2.26l.01.15a11 11 0 0 1 1.8-.41q.6-.8 1.24-1.4zm3.88-.52c-.4-.24-1.15-.22-2.25.52l-.12.08q.65.6 1.25 1.4.96.15 1.8.41v-.14c.08-1.35-.28-2.04-.68-2.27M8 3.7a10 10 0 0 0-.7.7 14 14 0 0 1 1.4 0 10 10 0 0 0-.7-.7" clip-rule="evenodd"/>
|
|
113
|
+
</symbol>`,Ve=`<symbol id="file-tree-builtin-ruby" viewBox="0 0 16 16">
|
|
114
|
+
<path fill="currentColor" fill-rule="evenodd" d="M11.04 2c.48 0 .92.23 1.18.6l2.54 3.65c.37.52.3 1.23-.15 1.69l-5.58 5.64a1.47 1.47 0 0 1-2.06 0L1.39 7.94a1.3 1.3 0 0 1-.15-1.7l2.54-3.63q.2-.3.5-.45.33-.16.68-.16zm.84 2.17a.5.5 0 0 0-.7-.05L8 6.84 4.83 4.12a.5.5 0 0 0-.65.76L6.65 7H3.5a.5.5 0 0 0 0 1h9a.5.5 0 0 0 0-1H9.35l2.48-2.12a.5.5 0 0 0 .05-.7" clip-rule="evenodd"/>
|
|
115
|
+
</symbol>`,He=`<symbol id="file-tree-builtin-rust" viewBox="0 0 16 16">
|
|
116
|
+
<path fill="currentColor" fill-rule="evenodd" d="M8 .8a.2.2 0 0 1 .18.1l.38.6.16.02.5-.53.01-.01a.2.2 0 0 1 .33.08l.25.68.16.05.59-.43h.02a.2.2 0 0 1 .3.14l.12.71.15.08.65-.3a.2.2 0 0 1 .2.02.2.2 0 0 1 .1.18l-.03.72.12.1.71-.16a.2.2 0 0 1 .25.25l-.17.7q.06.06.1.13l.73-.03A.2.2 0 0 1 14 4a.2.2 0 0 1 .02.2l-.3.66.08.14.71.12a.2.2 0 0 1 .14.32l-.43.59.05.16.68.25a.2.2 0 0 1 .07.35l-.53.49.01.16.62.38a.2.2 0 0 1 0 .36l-.62.38-.01.16.53.5a.2.2 0 0 1-.07.34l-.68.25-.05.16.43.59a.2.2 0 0 1-.14.32l-.72.12-.07.15.3.65a.2.2 0 0 1-.02.2.2.2 0 0 1-.18.1l-.72-.03-.1.13.16.7a.2.2 0 0 1-.25.25l-.7-.17-.13.1.03.73a.2.2 0 0 1-.1.18.2.2 0 0 1-.2.02l-.66-.3-.14.08-.12.71a.2.2 0 0 1-.32.14l-.59-.43-.16.05-.25.68a.2.2 0 0 1-.34.07l-.5-.53-.16.01-.38.62a.2.2 0 0 1-.36 0l-.38-.62-.16-.01-.5.53a.2.2 0 0 1-.34-.07l-.25-.68-.16-.05-.59.43a.2.2 0 0 1-.32-.14L5 13.78l-.15-.07-.65.3a.2.2 0 0 1-.2-.02.2.2 0 0 1-.1-.18l.03-.72-.13-.1-.7.16a.2.2 0 0 1-.25-.25l.17-.7-.1-.13-.73.03a.2.2 0 0 1-.2-.3l.3-.66-.08-.14-.71-.12a.2.2 0 0 1-.14-.32l.43-.59-.05-.16-.68-.25A.2.2 0 0 1 1 9.22l.53-.5-.02-.16-.6-.38A.2.2 0 0 1 .8 8a.2.2 0 0 1 .1-.18l.6-.38.02-.16-.53-.5a.2.2 0 0 1 .07-.34l.68-.25.05-.16-.43-.59a.2.2 0 0 1 .14-.32L2.2 5l.08-.15L2 4.2a.2.2 0 0 1 .2-.3l.72.03.1-.13-.16-.7a.2.2 0 0 1 .25-.25l.7.16.13-.1-.03-.72A.2.2 0 0 1 4 2a.2.2 0 0 1 .2-.02l.65.3L5 2.2l.12-.71v-.03a.2.2 0 0 1 .32-.1l.59.41.16-.04.25-.68.01-.02A.2.2 0 0 1 6.8.99l.49.53.16-.02.38-.61.02-.02A.2.2 0 0 1 8 .79M6.8 9.45h1.26l.06.01q.03.01.03.05v1.52q0 .07-.09.06h-4.5A5.4 5.4 0 0 0 8 13.42a5.4 5.4 0 0 0 4.45-2.33h-2.42c-.36 0-.68-.5-.77-.75-.08-.22-.2-.91-.25-1.12-.15-.61-.59-.71-.78-.73H6.8zM8 2.58a5.4 5.4 0 0 0-4.07 1.85h5.74l.17.02c.23.03.6.12.96.35.34.23.83.68.83 1.4 0 .66-.55 1.16-1.08 1.5.42.33.7.53.86 1.44.04.17.34.32.62.29.29-.03.62-.16.62-.75v-.24q0-.1.07-.1h.68A5.43 5.43 0 0 0 8 2.59M2.96 6.03a5.4 5.4 0 0 0-.19 3.37h1.66V6.03zM6.8 7.06h1.66c.35 0 .77-.12.77-.47 0-.42-.55-.53-.65-.53H6.8z" clip-rule="evenodd"/>
|
|
117
|
+
</symbol>`,Ue=`<symbol id="file-tree-builtin-sass" viewBox="0 0 16 16">
|
|
118
|
+
<path fill="currentColor" fill-rule="evenodd" d="M8.08 1.44c2.41-.91 4.96-.37 5.35 1.27.39 1.62-.92 3.56-2.6 4.25a5 5 0 0 1-3.26.35c-.58-.2-.92-.62-1-.85-.03-.09-.09-.24 0-.3.05-.03.08-.02.22.15s.7.6 1.75.48c2.78-.34 4.45-2.64 3.92-3.88-.37-.87-2.5-1.26-5.18.16C4.03 4.81 3.85 6.24 3.82 6.8c-.08 1.5 1.73 2.28 2.7 3.4q.04.03.07.08c.3-.12.7-.19 1.35-.2 1.58-.03 2.47 1.08 2.43 2.08-.03.78-.7 1.1-.82 1.13-.1.01-.14.02-.15-.06q-.03-.06.13-.15c.16-.09.42-.3.48-.72.05-.43-.24-1.44-1.76-1.63a3 3 0 0 0-1.33.08c.27.62.32 1.87-.29 2.83-.63 1-1.8 1.61-2.93 1.27-.37-.1-.93-.92-.45-2.05.46-1.07 2.4-2.12 2.66-2.26-.9-.83-3.08-1.95-3.4-3.65-.08-.49.13-1.65 1.46-2.98a12 12 0 0 1 4.11-2.52m-1.88 9.7c-.01.01-.9.47-1.52 1.17-.59.66-.75 1.48-.43 1.69.3.18 1-.04 1.51-.62a3 3 0 0 0 .5-.9q.2-.64.02-1.39z" clip-rule="evenodd"/>
|
|
119
|
+
</symbol>`,We=`<symbol id="file-tree-builtin-stylelint" viewBox="0 0 16 16">
|
|
120
|
+
<path fill="currentColor" d="M4 3v3.5l1.5-1L7 15 .5 6l1-1.5L0 3l2.5-2h1zm12 0-1.5 1.5 1 1.5L9 15l1.5-9.5 1.5 1V3l.5-2h1zm-8 8.5a.5.5 0 1 1 0 1 .5.5 0 0 1 0-1m0-3a.5.5 0 1 1 0 1 .5.5 0 0 1 0-1m0-3a.5.5 0 1 1 0 1 .5.5 0 0 1 0-1"/>
|
|
121
|
+
<path fill="currentColor" d="M6.5 2.5V4l-2 1.5v-4zm5 3L9.5 4V2.5l2-1zM9 4H7V2.5h2z"/>
|
|
122
|
+
</symbol>`,Ge=`<symbol id="file-tree-builtin-svelte" viewBox="0 0 16 16">
|
|
123
|
+
<path fill="currentColor" d="m3.98 3.7 3.36-2.08a4.5 4.5 0 0 1 5.9 1.23 4 4 0 0 1 .7 3.02q-.16.75-.58 1.4c.42.77.56 1.66.4 2.52a3.7 3.7 0 0 1-1.57 2.4l-.17.1-3.36 2.09a4.5 4.5 0 0 1-5.9-1.23 4 4 0 0 1-.66-1.44 4 4 0 0 1-.04-1.58 4 4 0 0 1 .58-1.4 4 4 0 0 1-.4-2.52 3.7 3.7 0 0 1 1.57-2.4zl3.36-2.08zm7.87 0a2.7 2.7 0 0 0-1.26-.95 2.7 2.7 0 0 0-1.6-.07 3 3 0 0 0-.52.2l-.16.09-3.36 2.08a2 2 0 0 0-.69.64 2 2 0 0 0-.36.86 2.3 2.3 0 0 0 .42 1.81A2.7 2.7 0 0 0 7.18 9.4q.28-.06.53-.2l.16-.09 1.28-.79.2-.09a.8.8 0 0 1 .87.31.7.7 0 0 1 .13.55.7.7 0 0 1-.24.4l-.08.05-3.36 2.08-.2.09a1 1 0 0 1-.49-.02 1 1 0 0 1-.38-.3 1 1 0 0 1-.13-.37v-.1l.01-.13-.13-.03a4 4 0 0 1-1.1-.5l-.2-.14-.18-.12-.07.18-.08.3a2.3 2.3 0 0 0 .43 1.82q.45.64 1.19.93.73.28 1.51.14l.16-.04q.27-.07.52-.2l.16-.09 3.36-2.08q.4-.25.69-.64.27-.4.36-.86a2.3 2.3 0 0 0-.42-1.82 2.7 2.7 0 0 0-1.27-.95 2.7 2.7 0 0 0-1.6-.08q-.27.07-.52.2l-.16.1-1.28.79-.2.09a1 1 0 0 1-.49-.03 1 1 0 0 1-.38-.29.7.7 0 0 1-.13-.54.7.7 0 0 1 .24-.4l.08-.06L9.33 4.4l.2-.1a.8.8 0 0 1 .87.32 1 1 0 0 1 .13.38v.22l.11.04q.6.18 1.12.5l.2.14.17.12.06-.19.08-.3a2.3 2.3 0 0 0-.42-1.81z"/>
|
|
124
|
+
</symbol>`,Ke=`<symbol id="file-tree-builtin-svg" viewBox="0 0 16 16">
|
|
125
|
+
<path fill="currentColor" d="M5 7a2 2 0 0 1 2-2h6a2 2 0 0 1 2 2v6a2 2 0 0 1-2 2H7a2 2 0 0 1-2-2z"/>
|
|
126
|
+
<path fill="currentColor" d="M6 1a5 5 0 0 1 4.58 3H7a3 3 0 0 0-3 3v3.58A5 5 0 0 1 6 1" opacity=".5"/>
|
|
127
|
+
</symbol>`,qe=`<symbol id="file-tree-builtin-svgo" viewBox="0 0 16 16">
|
|
128
|
+
<path fill="currentColor" d="M9.43 4.8A.6.6 0 1 1 9.19 6l-.56.96a1.2 1.2 0 0 1 .32 1.58l.7.53a.89.89 0 1 1-.17.22l-.7-.52a1.2 1.2 0 0 1-1.4.25l-.56.87a.75.75 0 1 1-.57-.2 1 1 0 0 1 .32.05l.56-.87a1.2 1.2 0 0 1-.4-1.24l-1.2-.47a.56.56 0 1 1 .1-.28v.02l1.2.47a1.2 1.2 0 0 1 1.56-.55l.56-.97a.6.6 0 0 1-.15-.64.6.6 0 0 1 .63-.4"/>
|
|
129
|
+
<path fill="currentColor" fill-rule="evenodd" d="M9.17 1q.16.63.27 1.26a6 6 0 0 1 1.61.67q.52-.38 1.08-.71l1.65 1.64q-.32.56-.68 1.05.48.78.72 1.67.6.09 1.18.25v2.32q-.55.15-1.11.24a6 6 0 0 1-.7 1.82q.31.44.59.91l-1.65 1.65-.85-.55a6 6 0 0 1-1.9.83q-.08.47-.2.95H6.84q-.12-.46-.2-.93a6 6 0 0 1-1.96-.81q-.39.27-.8.51l-1.65-1.65q.25-.43.53-.84a6 6 0 0 1-.75-1.9L1 9.16V6.83q.54-.14 1.09-.24a6 6 0 0 1 .77-1.74q-.33-.47-.63-.98l1.65-1.65q.54.32 1.03.68a6 6 0 0 1 1.66-.66q.1-.61.26-1.24zM7.96 3.73a4 4 0 0 0-1.74.36 4.5 4.5 0 0 0-2.3 2.3 4.4 4.4 0 0 0-.1 3.29l.03.06a4.4 4.4 0 0 0 2.4 2.47 4.4 4.4 0 0 0 3.48-.02l.03-.02a4.4 4.4 0 0 0 2.3-2.42l.06-.14a4.4 4.4 0 0 0-.2-3.4 4.4 4.4 0 0 0-2.13-2.07L9.47 4a4 4 0 0 0-1.51-.27" clip-rule="evenodd"/>
|
|
130
|
+
</symbol>`,Je=`<symbol id="file-tree-builtin-swift" viewBox="0 0 16 16">
|
|
131
|
+
<path fill="currentColor" d="M9.63 1c6.15 4.35 4.16 9.15 4.16 9.15s1.75 2.05 1.04 3.85c0 0-.72-1.26-1.93-1.26-1.17 0-1.85 1.26-4.2 1.26C3.47 14 1 9.46 1 9.46c4.71 3.22 7.93.94 7.93.94C6.8 9.12 2.29 3 2.29 3c3.93 3.47 5.63 4.39 5.63 4.39-1.01-.87-3.86-5.13-3.86-5.13C6.34 4.66 10.86 8 10.86 8c1.28-3.7-1.23-7-1.23-7"/>
|
|
132
|
+
</symbol>`,Ye=`<symbol id="file-tree-builtin-table" viewBox="0 0 16 16">
|
|
133
|
+
<path fill="currentColor" d="M8 4a3 3 0 0 0 3 3h3v5.5a2.5 2.5 0 0 1-2.5 2.5h-7A2.5 2.5 0 0 1 2 12.5v-9A2.5 2.5 0 0 1 4.5 1H8z" class="bg" opacity=".4"/>
|
|
134
|
+
<path fill="currentColor" d="M11.5 8a.5.5 0 0 1 .5.5v4a.5.5 0 0 1-.5.5h-7a.5.5 0 0 1-.5-.5v-4a.5.5 0 0 1 .5-.5zM5 12h2.5v-1H5zm3.5 0H11v-1H8.5zM5 10h2.5V9H5zm3.5 0H11V9H8.5zm1-9a.5.5 0 0 1 .354.146l4 4A.5.5 0 0 1 14 5.5V6h-3a2 2 0 0 1-2-2V1z" class="fg"/>
|
|
135
|
+
</symbol>`,Xe=`<symbol id="file-tree-builtin-tailwind" viewBox="0 0 16 16">
|
|
136
|
+
<path fill="currentColor" fill-rule="evenodd" d="M8 4Q5.2 4 4.5 6.67q1.05-1.34 2.45-1c.53.12.91.5 1.33.9C8.98 7.23 9.77 8 11.5 8q2.8 0 3.5-2.67-1.05 1.34-2.45 1c-.53-.12-.91-.5-1.33-.9C10.52 4.77 9.73 4 8 4M4.5 8Q1.7 8 1 10.67q1.05-1.34 2.45-1c.53.12.91.5 1.33.9C5.48 11.23 6.26 12 8 12q2.8 0 3.5-2.67-1.05 1.34-2.45 1c-.53-.12-.91-.5-1.33-.9C7.02 8.77 6.24 8 4.5 8" clip-rule="evenodd"/>
|
|
137
|
+
</symbol>`,Ze=`<symbol id="file-tree-builtin-terraform" viewBox="0 0 16 16">
|
|
138
|
+
<path fill="currentColor" d="M1 0v5.05l4.35 2.53V2.53zm9.18 5.34L5.83 2.82v5.05l4.35 2.53zm.47 5.06V5.34L15 2.82v5.05zm-.48 5.6-4.35-2.53V8.42l4.35 2.53z"/>
|
|
139
|
+
</symbol>`,Qe=`<symbol id="file-tree-builtin-text" viewBox="0 0 16 16">
|
|
140
|
+
<path fill="currentColor" fill-rule="evenodd" d="M8 4a3 3 0 0 0 3 3h3v5.5a2.5 2.5 0 0 1-2.5 2.5h-7A2.5 2.5 0 0 1 2 12.5v-9A2.5 2.5 0 0 1 4.5 1H8z" class="bg" clip-rule="evenodd" opacity=".4"/>
|
|
141
|
+
<path fill="currentColor" d="M8.5 11a.5.5 0 0 1 0 1h-3a.5.5 0 0 1 0-1zm2-2a.5.5 0 0 1 0 1h-5a.5.5 0 0 1 0-1zm-1-8a.5.5 0 0 1 .354.146l4 4A.5.5 0 0 1 14 5.5V6h-3a2 2 0 0 1-2-2V1z"/>
|
|
142
|
+
</symbol>`,$e=`<symbol id="file-tree-builtin-typescript" viewBox="0 0 16 16">
|
|
143
|
+
<path fill="currentColor" d="M8 1C2.24 1 1 2.24 1 8s1.24 7 7 7 7-1.24 7-7-1.24-7-7-7" class="bg" opacity=".2"/>
|
|
144
|
+
<path fill="currentColor" d="M8.1 9.64h.95c.04.62.28.76 1.28.76s1.2-.14 1.2-.85c0-.66-.2-.85-1.2-1.07-1.79-.38-2.18-.7-2.18-1.86C8.15 5.3 8.54 5 10.31 5c1.67 0 2.04.26 2.07 1.42h-.95c-.02-.43-.23-.53-1.1-.53-1 0-1.22.14-1.22.74 0 .52.22.7 1.24.92 1.76.38 2.15.73 2.15 2 0 1.44-.4 1.75-2.24 1.75-1.8 0-2.18-.3-2.15-1.66m-3 1.57V5.99H3.5v-.9h4.21v.9H6.1v5.22z"/>
|
|
145
|
+
</symbol>`,et=`<symbol id="file-tree-builtin-vite" viewBox="0 0 16 16">
|
|
146
|
+
<path fill="currentColor" d="M8.57 14.87c-.18.26-.55.11-.55-.22v-3.18l-.05-.27-.13-.22-.2-.15-.24-.06H4.29c-.26 0-.4-.32-.26-.55L6.08 7c.3-.46 0-1.1-.5-1.1H1.8c-.25 0-.4-.32-.25-.56l2.65-4.2A.3.3 0 0 1 4.46 1h7.9c.26 0 .4.32.26.55l-2.05 3.23c-.29.46 0 1.1.5 1.1h3.12c.26 0 .4.34.24.57z"/>
|
|
147
|
+
</symbol>`,tt=`<symbol id="file-tree-builtin-vscode" viewBox="0 0 16 16">
|
|
148
|
+
<path fill="currentColor" d="m5.11 9.68-2.4 1.84a.6.6 0 0 1-.75-.04l-.77-.7a.6.6 0 0 1 0-.87L3.28 8zm5.52-8.42a.51.51 0 0 1 .87.36V4.8L7.32 8 5.1 6.32z" opacity=".75"/>
|
|
149
|
+
<path fill="currentColor" d="M11.1 14.99h.03zM1.96 4.52a.6.6 0 0 1 .75-.04l8.8 6.71v3.19a.51.51 0 0 1-.88.36L1.19 6.1a.6.6 0 0 1 0-.87z" opacity=".65"/>
|
|
150
|
+
<path fill="currentColor" d="M11.62 14.91a.9.9 0 0 1-1-.17.51.51 0 0 0 .88-.36V1.62a.51.51 0 0 0-.87-.36.9.9 0 0 1 1-.17l2.87 1.39a.9.9 0 0 1 .5.8v9.44a.9.9 0 0 1-.5.8z"/>
|
|
151
|
+
</symbol>`,nt=`<symbol id="file-tree-builtin-vue" viewBox="0 0 16 16">
|
|
152
|
+
<path fill="currentColor" d="M9.62 2.25 8 5.02 6.38 2.25H1l7 12 7-12z" opacity=".5"/>
|
|
153
|
+
<path fill="currentColor" d="M9.54 2.25 8 4.95l-1.54-2.7H4l4 7 4-7z"/>
|
|
154
|
+
</symbol>`,rt=`<symbol id="file-tree-builtin-wasm" viewBox="0 0 16 16">
|
|
155
|
+
<path fill="currentColor" d="M13 1a2 2 0 0 1 2 2v10a2 2 0 0 1-2 2H3a2 2 0 0 1-2-2V3a2 2 0 0 1 2-2h3a2 2 0 1 0 4 0z" class="subtract" opacity=".2"/>
|
|
156
|
+
<path fill="currentColor" d="M4.64 11.4h.02l.8-3.4h.91l.73 3.45L7.88 8h.96l-1.25 5h-.97L5.9 9.6 5.1 13h-1L3 8h.98z"/>
|
|
157
|
+
<path fill="currentColor" fill-rule="evenodd" d="M13 13h-1.02l-.33-1.11H9.9L9.64 13h-.97l1.26-5h1.54zm-2.49-3.77-.42 1.84h1.32l-.49-1.84z" clip-rule="evenodd"/>
|
|
158
|
+
</symbol>`,it=`<symbol id="file-tree-builtin-webpack" viewBox="0 0 16 16">
|
|
159
|
+
<path fill="currentColor" d="M14.1 11.79 8.26 15v-2.5l3.64-1.94zm.4-.35V4.73l-2.14 1.2v4.3zm-12.6.35L7.74 15v-2.5L4.1 10.56zm-.4-.35V4.73l2.14 1.2v4.3zm.25-7.15 6-3.29v2.42L3.9 5.47l-.03.01zm12.5 0L8.25 1v2.42l3.85 2.05.03.01z" class="bg" opacity=".4"/>
|
|
160
|
+
<path fill="currentColor" d="m7.74 11.93-3.59-1.92v-3.8l3.6 2.02zm.52 0 3.59-1.92v-3.8l-3.6 2.02zM4.4 5.77 8 3.85l3.6 1.93L8 7.8z" class="fg"/>
|
|
161
|
+
</symbol>`,at=`<symbol id="file-tree-builtin-yml" viewBox="0 0 16 16">
|
|
162
|
+
<path fill="currentColor" d="M7.5 2A1.5 1.5 0 0 1 9 3.5v3A1.5 1.5 0 0 1 7.5 8h-2v2A1.5 1.5 0 0 0 7 11.5v-1A1.5 1.5 0 0 1 8.5 9h5a1.5 1.5 0 0 1 1.5 1.5v3a1.5 1.5 0 0 1-1.5 1.5h-5A1.5 1.5 0 0 1 7 13.5v-1A2.5 2.5 0 0 1 4.5 10V8h-2A1.5 1.5 0 0 1 1 6.5v-3A1.5 1.5 0 0 1 2.5 2zm1 8a.5.5 0 0 0-.5.5v3a.5.5 0 0 0 .5.5h5a.5.5 0 0 0 .5-.5v-3a.5.5 0 0 0-.5-.5zm-6-7a.5.5 0 0 0-.5.5v3a.5.5 0 0 0 .5.5h5a.5.5 0 0 0 .5-.5v-3a.5.5 0 0 0-.5-.5z"/>
|
|
163
|
+
</symbol>`,ot=`<symbol id="file-tree-builtin-zig" viewBox="0 0 16 16">
|
|
164
|
+
<path fill="currentColor" d="m14.73 1.5-7.29 8.82h4.17l-1.73 2.04H5.76L1.27 14.5l7.3-8.91H4.39l1.73-2.05h4.12z"/>
|
|
165
|
+
<path fill="currentColor" d="M5.21 3.54 3.56 5.6h-.55v4.73h.83L2.1 12.36H1V3.54zm9.79 0v8.82h-4.3l1.74-2.04h.55V5.68h-.83l1.74-2.14z"/>
|
|
166
|
+
</symbol>`,st=[fe,_e,ye,be,xe,Se,Te,Ee,De,ke,Ae,P,je,Me,Ne,ze,Ve,He,Je,Ye,Qe,$e,`<symbol id="file-tree-builtin-zip" viewBox="0 0 16 16">
|
|
167
|
+
<path fill="currentColor" d="M4.585 2a2 2 0 0 1 1.028.285l1.788 1.072a1 1 0 0 0 .514.143H12A2 2 0 0 1 13.935 5H0V4a2 2 0 0 1 2-2z" class="bg" opacity=".5"/>
|
|
168
|
+
<path fill="currentColor" fill-rule="evenodd" d="M14 12a2 2 0 0 1-2 2H2a2 2 0 0 1-2-2v-1.25h1v-1H0V6h14zM9.9 8.25c-.883 0-1.9.5-1.9.5H7v1h1v1s1.017.5 1.9.5c.884 0 1.6-.672 1.6-1.5s-.716-1.5-1.6-1.5M2 9.75v1h1v-1zm2 0v1h1v-1zm2 0v1h1v-1zm-5-1v1h1v-1zm2 0v1h1v-1zm2 0v1h1v-1z" class="fg" clip-rule="evenodd"/>
|
|
169
|
+
</symbol>`],ct=[ue,de,pe,me,he,ge,ve,Ce,we,Oe,Pe,Fe,Ie,Le,Re,Be,Ue,We,Ge,Ke,qe,Xe,Ze,et,tt,nt,rt,it,at,ot];function lt(e,t){return t.length===0?e:e.replace(`</svg>`,`\n ${t.join(`
|
|
170
|
+
`)}\n</svg>`)}var ut=lt(le,st),dt={minimal:le,standard:ut,complete:lt(ut,ct)},ft={".babelrc":`babel`,".babelrc.json":`babel`,".bash_profile":`bash`,".bashrc":`bash`,".browserslistrc":`browserslist`,".dockerignore":`docker`,".eslintignore":`eslint`,".eslintrc":`eslint`,".eslintrc.cjs":`eslint`,".eslintrc.js":`eslint`,".eslintrc.json":`eslint`,".eslintrc.yaml":`eslint`,".eslintrc.yml":`eslint`,".gitattributes":`git`,".gitignore":`git`,".gitkeep":`git`,".gitmodules":`git`,".oxlintrc.json":`oxc`,".postcssrc":`postcss`,".postcssrc.json":`postcss`,".postcssrc.yaml":`postcss`,".postcssrc.yml":`postcss`,".prettierignore":`prettier`,".prettierrc":`prettier`,".prettierrc.cjs":`prettier`,".prettierrc.js":`prettier`,".prettierrc.json":`prettier`,".prettierrc.mjs":`prettier`,".prettierrc.toml":`prettier`,".prettierrc.yaml":`prettier`,".prettierrc.yml":`prettier`,".stylelintignore":`stylelint`,".stylelintrc":`stylelint`,".stylelintrc.cjs":`stylelint`,".stylelintrc.js":`stylelint`,".stylelintrc.json":`stylelint`,".stylelintrc.mjs":`stylelint`,".stylelintrc.yaml":`stylelint`,".stylelintrc.yml":`stylelint`,".terraform.lock.hcl":`terraform`,".zprofile":`bash`,".zshenv":`bash`,".zshrc":`bash`,"babel.config.cjs":`babel`,"babel.config.js":`babel`,"babel.config.json":`babel`,"babel.config.mjs":`babel`,"biome.json":`biome`,"biome.jsonc":`biome`,"bootstrap.bundle.js":`bootstrap`,"bootstrap.bundle.min.js":`bootstrap`,"bootstrap.css":`bootstrap`,"bootstrap.js":`bootstrap`,"bootstrap.min.css":`bootstrap`,"bootstrap.min.js":`bootstrap`,"bun.lock":`bun`,"bun.lockb":`bun`,"bunfig.toml":`bun`,"claude.md":`claude`,"compose.yaml":`docker`,"compose.yml":`docker`,"docker-compose.override.yml":`docker`,"docker-compose.yaml":`docker`,"docker-compose.yml":`docker`,dockerfile:`docker`,"eslint.config.cjs":`eslint`,"eslint.config.js":`eslint`,"eslint.config.mjs":`eslint`,"eslint.config.mts":`eslint`,"eslint.config.ts":`eslint`,gemfile:`ruby`,"next.config.js":`nextjs`,"next.config.mjs":`nextjs`,"next.config.mts":`nextjs`,"next.config.ts":`nextjs`,"postcss.config.cjs":`postcss`,"postcss.config.js":`postcss`,"postcss.config.mjs":`postcss`,"postcss.config.ts":`postcss`,"prettier.config.cjs":`prettier`,"prettier.config.js":`prettier`,"prettier.config.mjs":`prettier`,rakefile:`ruby`,"readme.md":`markdown`,"stylelint.config.cjs":`stylelint`,"stylelint.config.js":`stylelint`,"stylelint.config.mjs":`stylelint`,"svgo.config.cjs":`svgo`,"svgo.config.js":`svgo`,"svgo.config.mjs":`svgo`,"svgo.config.ts":`svgo`,"tailwind.config.cjs":`tailwind`,"tailwind.config.js":`tailwind`,"tailwind.config.mjs":`tailwind`,"tailwind.config.ts":`tailwind`,"vite.config.js":`vite`,"vite.config.mjs":`vite`,"vite.config.mts":`vite`,"vite.config.ts":`vite`,"webpack.config.babel.js":`webpack`,"webpack.config.cjs":`webpack`,"webpack.config.js":`webpack`,"webpack.config.mjs":`webpack`,"webpack.config.ts":`webpack`},F={"7z":`zip`,astro:`astro`,AUTHORS:`text`,avif:`image`,bash:`bash`,bmp:`image`,bz2:`zip`,c:`c`,cc:`cpp`,cfg:`text`,CHANGELOG:`text`,cjs:`javascript`,"code-workspace":`vscode`,conf:`text`,CONTRIBUTORS:`text`,cpp:`cpp`,csh:`bash`,css:`css`,csv:`table`,cts:`typescript`,cxx:`cpp`,db:`database`,editorconfig:`text`,env:`text`,"env.development":`text`,"env.local":`text`,"env.production":`text`,eot:`font`,erb:`ruby`,fish:`bash`,gemspec:`ruby`,gif:`image`,go:`go`,gql:`graphql`,graphql:`graphql`,gz:`zip`,h:`c`,hh:`cpp`,hpp:`cpp`,htm:`html`,html:`html`,hxx:`cpp`,icns:`image`,ico:`image`,ini:`text`,inl:`cpp`,jar:`zip`,jpeg:`image`,jpg:`image`,js:`javascript`,json:`json`,json5:`json`,jsonc:`json`,jsonl:`json`,jsx:`javascript`,ksh:`bash`,less:`css`,LICENSE:`text`,log:`text`,markdown:`markdown`,mcp:`mcp`,md:`markdown`,mdx:`markdown`,"mdx.tsx":`markdown`,mjs:`javascript`,mm:`cpp`,mts:`typescript`,ods:`table`,otf:`font`,png:`image`,postcss:`css`,py:`python`,pyi:`python`,pyw:`python`,pyx:`python`,rake:`ruby`,rar:`zip`,rb:`ruby`,rs:`rust`,rst:`text`,rtf:`text`,sass:`css`,scss:`css`,sh:`bash`,sql:`database`,sqlite:`database`,sqlite3:`database`,styl:`css`,svelte:`svelte`,svg:`svg`,swift:`swift`,tar:`zip`,tf:`terraform`,tfstate:`terraform`,tfvars:`terraform`,tgz:`zip`,tif:`image`,tiff:`image`,ts:`typescript`,tsv:`table`,tsx:`typescript`,ttf:`font`,txt:`text`,vue:`vue`,war:`zip`,wasm:`wasm`,wast:`wasm`,wat:`wasm`,webp:`image`,woff:`font`,woff2:`font`,xhtml:`html`,xls:`table`,xlsx:`table`,xz:`zip`,yaml:`yml`,yml:`yml`,zig:`zig`,zip:`zip`,zsh:`bash`},I={jsx:`react`,sass:`sass`,scss:`sass`,tsx:`react`},pt=new Set([`bash`,`c`,`cpp`,`css`,`database`,`default`,`font`,`git`,`go`,`html`,`image`,`javascript`,`json`,`markdown`,`mcp`,`python`,`ruby`,`rust`,`swift`,`table`,`text`,`typescript`,`zip`]),mt=new Set([`complete`]);function ht(e){return dt[e===`none`?`minimal`:e]}function gt(e){return`file-tree-builtin-${e}`}function _t(e){return e!==`none`&&mt.has(e)}function vt(e,t,n){if(e===`minimal`||e===`none`)return;let r=e===`complete`,i=ft[t.toLowerCase()];if(i!=null&&(r||pt.has(i)))return i;for(let e of n){if(r){let t=I[e];if(t!=null)return t}let t=F[e];if(t!=null&&(r||pt.has(t)))return t}return`default`}function yt(e){return e.spriteSheet!=null||e.remap!=null||e.byFileName!=null||e.byFileExtension!=null||e.byFileNameContains!=null}function bt(e){return e==null?{set:`complete`,colored:!0}:typeof e==`string`?{set:e,colored:!0}:{...e,set:e.set??(yt(e)?`none`:`complete`),colored:e.colored??!0}}var xt={compact:{itemHeight:24,factor:.8},default:{itemHeight:30,factor:1},relaxed:{itemHeight:36,factor:1.2}};function L(e,t){if(typeof e==`number`)return{itemHeight:t??xt.default.itemHeight,factor:e};let n=xt[e??`default`];return{itemHeight:t??n.itemHeight,factor:n.factor}}var St=xt.default.itemHeight,Ct=`@layer base {
|
|
171
|
+
:host {
|
|
172
|
+
--trees-accent: var(--trees-accent-override, #009fff);
|
|
173
|
+
--trees-fg: var(--trees-fg-override, var(--trees-theme-sidebar-fg, light-dark(#6c6c71, #adadb1)));
|
|
174
|
+
--trees-fg-muted: var(--trees-fg-muted-override, var(--trees-theme-sidebar-header-fg, light-dark(#84848a, #84848a)));
|
|
175
|
+
--trees-bg: var(--trees-bg-override, var(--trees-theme-sidebar-bg, light-dark(#f8f8f8, #141415)));
|
|
176
|
+
--trees-bg-muted: var(--trees-bg-muted-override, var(--trees-theme-list-hover-bg, light-dark(color-mix(in lab,
|
|
177
|
+
var(--trees-accent) var(--trees-bg-alpha-light, 8%),
|
|
178
|
+
var(--trees-bg)), color-mix(in lab,
|
|
179
|
+
var(--trees-accent) var(--trees-bg-alpha-dark, 10%),
|
|
180
|
+
var(--trees-bg)))));
|
|
181
|
+
--trees-input-bg: var(--trees-input-bg-override, light-dark(#f8f8f8, #070707));
|
|
182
|
+
--trees-added-light: #16a994;
|
|
183
|
+
--trees-added-dark: #00cab1;
|
|
184
|
+
--trees-ignored-light: #adadb1;
|
|
185
|
+
--trees-ignored-dark: #4a4a4e;
|
|
186
|
+
--trees-modified-light: #1ca1c7;
|
|
187
|
+
--trees-modified-dark: #08c0ef;
|
|
188
|
+
--trees-renamed-light: #d5a910;
|
|
189
|
+
--trees-renamed-dark: #ffd452;
|
|
190
|
+
--trees-untracked-light: #16a994;
|
|
191
|
+
--trees-untracked-dark: #00cab1;
|
|
192
|
+
--trees-deleted-light: #ff2e3f;
|
|
193
|
+
--trees-deleted-dark: #ff6762;
|
|
194
|
+
--trees-border-color: var(--trees-border-color-override, var(--trees-theme-sidebar-border, light-dark(#eeeeef, #070707)));
|
|
195
|
+
--trees-indent-guide-bg: var(--trees-indent-guide-bg-override, color-mix(in lab, var(--trees-fg-muted) 25%, transparent));
|
|
196
|
+
--trees-density: var(--trees-density-override, 1);
|
|
197
|
+
--trees-border-radius: var(--trees-border-radius-override, calc(6px * var(--trees-density)));
|
|
198
|
+
--trees-font-family: var(--trees-font-family-override, system-ui);
|
|
199
|
+
--trees-font-size: var(--trees-font-size-override, 13px);
|
|
200
|
+
--trees-font-weight-regular: var(--trees-font-weight-regular-override, 400);
|
|
201
|
+
--trees-font-weight-semibold: var(--trees-font-weight-semibold-override, 600);
|
|
202
|
+
--trees-focus-ring-color: var(--trees-focus-ring-color-override, var(--trees-theme-focus-ring, var(--trees-accent)));
|
|
203
|
+
--trees-focus-ring-width: var(--trees-focus-ring-width-override, 1px);
|
|
204
|
+
--trees-focus-ring-offset: var(--trees-focus-ring-offset-override, -1px);
|
|
205
|
+
--trees-search-fg: var(--trees-search-fg-override, var(--trees-theme-input-fg, var(--trees-fg)));
|
|
206
|
+
--trees-search-font-weight: var(--trees-search-font-weight-override, 600);
|
|
207
|
+
--trees-search-bg: var(--trees-search-bg-override, var(--trees-theme-input-bg, var(--trees-input-bg)));
|
|
208
|
+
--trees-scrollbar-thumb: var(--trees-scrollbar-thumb-override, var(--trees-theme-scrollbar-thumb, color-mix(in lab, var(--trees-fg) 25%, var(--trees-bg))));
|
|
209
|
+
--trees-selected-fg: var(--trees-selected-fg-override, var(--trees-theme-list-active-selection-fg, var(--trees-fg)));
|
|
210
|
+
--trees-selected-bg: var(--trees-selected-bg-override, var(--trees-theme-list-active-selection-bg, light-dark(color-mix(in lab, var(--trees-accent) 12%, var(--trees-bg)), color-mix(in lab, var(--trees-accent) 15%, var(--trees-bg)))));
|
|
211
|
+
--trees-selected-focused-border-color: var(--trees-selected-focused-border-color-override, var(--trees-theme-focus-ring, var(--trees-accent)));
|
|
212
|
+
--trees-status-added: var(--trees-status-added-override, var(--trees-theme-git-added-fg, light-dark(var(--trees-added-light), var(--trees-added-dark))));
|
|
213
|
+
--trees-status-ignored: var(--trees-status-ignored-override, var(--trees-theme-git-ignored-fg, light-dark(var(--trees-ignored-light), var(--trees-ignored-dark))));
|
|
214
|
+
--trees-status-modified: var(--trees-status-modified-override, var(--trees-theme-git-modified-fg, light-dark(var(--trees-modified-light), var(--trees-modified-dark))));
|
|
215
|
+
--trees-status-renamed: var(--trees-status-renamed-override, var(--trees-theme-git-renamed-fg, light-dark(var(--trees-renamed-light), var(--trees-renamed-dark))));
|
|
216
|
+
--trees-status-untracked: var(--trees-status-untracked-override, var(--trees-theme-git-untracked-fg, light-dark(var(--trees-untracked-light), var(--trees-untracked-dark))));
|
|
217
|
+
--trees-status-deleted: var(--trees-status-deleted-override, var(--trees-theme-git-deleted-fg, light-dark(var(--trees-deleted-light), var(--trees-deleted-dark))));
|
|
218
|
+
--trees-git-modified-color: var(--trees-git-modified-color-override, var(--trees-status-modified));
|
|
219
|
+
--trees-git-added-color: var(--trees-git-added-color-override, var(--trees-status-added));
|
|
220
|
+
--trees-git-ignored-color: var(--trees-git-ignored-color-override, var(--trees-status-ignored));
|
|
221
|
+
--trees-git-deleted-color: var(--trees-git-deleted-color-override, var(--trees-status-deleted));
|
|
222
|
+
--trees-git-renamed-color: var(--trees-git-renamed-color-override, var(--trees-status-renamed));
|
|
223
|
+
--trees-git-untracked-color: var(--trees-git-untracked-color-override, var(--trees-status-untracked));
|
|
224
|
+
--trees-icon-gray: light-dark(#84848a, #adadb1);
|
|
225
|
+
--trees-icon-red: light-dark(#d52c36, #ff6762);
|
|
226
|
+
--trees-icon-vermilion: light-dark(#ff8c5b, #d5512f);
|
|
227
|
+
--trees-icon-orange: light-dark(#d47628, #ffa359);
|
|
228
|
+
--trees-icon-yellow: light-dark(#d5a910, #ffd452);
|
|
229
|
+
--trees-icon-green: light-dark(#199f43, #5ecc71);
|
|
230
|
+
--trees-icon-teal: light-dark(#17a5af, #64d1db);
|
|
231
|
+
--trees-icon-cyan: light-dark(#1ca1c7, #68cdf2);
|
|
232
|
+
--trees-icon-blue: light-dark(#1a85d4, #69b1ff);
|
|
233
|
+
--trees-icon-indigo: light-dark(#693acf, #9d6afb);
|
|
234
|
+
--trees-icon-purple: light-dark(#a631be, #d568ea);
|
|
235
|
+
--trees-icon-pink: light-dark(#d32a61, #ff678d);
|
|
236
|
+
--trees-icon-mauve: light-dark(#594c5b, #79697b);
|
|
237
|
+
--trees-file-icon-color-default: var(--trees-file-icon-color, var(--trees-icon-gray));
|
|
238
|
+
--trees-file-icon-color-astro: var(--trees-file-icon-color, var(--trees-icon-purple));
|
|
239
|
+
--trees-file-icon-color-babel: var(--trees-file-icon-color, var(--trees-icon-yellow));
|
|
240
|
+
--trees-file-icon-color-bash: var(--trees-file-icon-color, var(--trees-icon-green));
|
|
241
|
+
--trees-file-icon-color-biome: var(--trees-file-icon-color, var(--trees-icon-blue));
|
|
242
|
+
--trees-file-icon-color-bootstrap: var(--trees-file-icon-color, var(--trees-icon-indigo));
|
|
243
|
+
--trees-file-icon-color-browserslist: var(--trees-file-icon-color, var(--trees-icon-yellow));
|
|
244
|
+
--trees-file-icon-color-bun: var(--trees-file-icon-color, var(--trees-icon-mauve));
|
|
245
|
+
--trees-file-icon-color-c: var(--trees-file-icon-color, var(--trees-icon-blue));
|
|
246
|
+
--trees-file-icon-color-cpp: var(--trees-file-icon-color, var(--trees-icon-blue));
|
|
247
|
+
--trees-file-icon-color-claude: var(--trees-file-icon-color, var(--trees-icon-orange));
|
|
248
|
+
--trees-file-icon-color-css: var(--trees-file-icon-color, var(--trees-icon-indigo));
|
|
249
|
+
--trees-file-icon-color-database: var(--trees-file-icon-color, var(--trees-icon-purple));
|
|
250
|
+
--trees-file-icon-color-docker: var(--trees-file-icon-color, var(--trees-icon-blue));
|
|
251
|
+
--trees-file-icon-color-eslint: var(--trees-file-icon-color, var(--trees-icon-indigo));
|
|
252
|
+
--trees-file-icon-color-git: var(--trees-file-icon-vermilion, var(--trees-icon-vermilion));
|
|
253
|
+
--trees-file-icon-color-go: var(--trees-file-icon-color, var(--trees-icon-cyan));
|
|
254
|
+
--trees-file-icon-color-graphql: var(--trees-file-icon-color, var(--trees-icon-pink));
|
|
255
|
+
--trees-file-icon-color-html: var(--trees-file-icon-color, var(--trees-icon-orange));
|
|
256
|
+
--trees-file-icon-color-image: var(--trees-file-icon-color, var(--trees-icon-pink));
|
|
257
|
+
--trees-file-icon-color-javascript: var(--trees-file-icon-color, var(--trees-icon-yellow));
|
|
258
|
+
--trees-file-icon-color-json: var(--trees-file-icon-color, var(--trees-icon-orange));
|
|
259
|
+
--trees-file-icon-color-markdown: var(--trees-file-icon-color, var(--trees-icon-green));
|
|
260
|
+
--trees-file-icon-color-mcp: var(--trees-file-icon-color, var(--trees-icon-teal));
|
|
261
|
+
--trees-file-icon-color-npm: var(--trees-file-icon-color, var(--trees-icon-red));
|
|
262
|
+
--trees-file-icon-color-oxc: var(--trees-file-icon-cyan, var(--trees-icon-cyan));
|
|
263
|
+
--trees-file-icon-color-postcss: var(--trees-file-icon-color, var(--trees-icon-red));
|
|
264
|
+
--trees-file-icon-color-prettier: var(--trees-file-icon-color, var(--trees-icon-teal));
|
|
265
|
+
--trees-file-icon-color-python: var(--trees-file-icon-color, var(--trees-icon-blue));
|
|
266
|
+
--trees-file-icon-color-react: var(--trees-file-icon-color, var(--trees-icon-cyan));
|
|
267
|
+
--trees-file-icon-color-ruby: var(--trees-file-icon-color, var(--trees-icon-red));
|
|
268
|
+
--trees-file-icon-color-rust: var(--trees-file-icon-color, var(--trees-icon-orange));
|
|
269
|
+
--trees-file-icon-color-sass: var(--trees-file-icon-color, var(--trees-icon-pink));
|
|
270
|
+
--trees-file-icon-color-svg: var(--trees-file-icon-color, var(--trees-icon-orange));
|
|
271
|
+
--trees-file-icon-color-svelte: var(--trees-file-icon-color, var(--trees-icon-red));
|
|
272
|
+
--trees-file-icon-color-svgo: var(--trees-file-icon-color, var(--trees-icon-green));
|
|
273
|
+
--trees-file-icon-color-swift: var(--trees-file-icon-color, var(--trees-icon-orange));
|
|
274
|
+
--trees-file-icon-color-table: var(--trees-file-icon-color, var(--trees-icon-teal));
|
|
275
|
+
--trees-file-icon-color-text: var(--trees-file-icon-color, var(--trees-icon-gray));
|
|
276
|
+
--trees-file-icon-color-tailwind: var(--trees-file-icon-color, var(--trees-icon-cyan));
|
|
277
|
+
--trees-file-icon-color-terraform: var(--trees-file-icon-color, var(--trees-icon-indigo));
|
|
278
|
+
--trees-file-icon-color-typescript: var(--trees-file-icon-color, var(--trees-icon-blue));
|
|
279
|
+
--trees-file-icon-color-vite: var(--trees-file-icon-color, var(--trees-icon-purple));
|
|
280
|
+
--trees-file-icon-color-vscode: var(--trees-file-icon-color, var(--trees-icon-blue));
|
|
281
|
+
--trees-file-icon-color-vue: var(--trees-file-icon-color, var(--trees-icon-green));
|
|
282
|
+
--trees-file-icon-color-wasm: var(--trees-file-icon-color, var(--trees-icon-indigo));
|
|
283
|
+
--trees-file-icon-color-webpack: var(--trees-file-icon-color, var(--trees-icon-blue));
|
|
284
|
+
--trees-file-icon-color-yml: var(--trees-file-icon-color, var(--trees-icon-red));
|
|
285
|
+
--trees-file-icon-color-zig: var(--trees-file-icon-color, var(--trees-icon-orange));
|
|
286
|
+
--trees-file-icon-color-zip: var(--trees-file-icon-color, var(--trees-icon-orange));
|
|
287
|
+
--trees-level-gap: var(--trees-level-gap-override, calc(8px * var(--trees-density)));
|
|
288
|
+
--trees-item-padding-x: var(--trees-item-padding-x-override, calc(8px * var(--trees-density)));
|
|
289
|
+
--trees-item-margin-x: var(--trees-item-margin-x-override, calc(2px * var(--trees-density)));
|
|
290
|
+
--trees-item-row-gap: var(--trees-item-row-gap-override, calc(6px * var(--trees-density)));
|
|
291
|
+
--trees-icon-width: var(--trees-icon-width-override, 16px);
|
|
292
|
+
--trees-icon-nudge: var(--trees-icon-nudge-override, calc(1px * var(--trees-density)));
|
|
293
|
+
--trees-row-height: var(--trees-item-height, 30px);
|
|
294
|
+
--trees-git-lane-width: var(--trees-git-lane-width-override, 12px);
|
|
295
|
+
--trees-action-lane-width: var(--trees-action-lane-width-override, calc(var(--trees-icon-width) + 2px));
|
|
296
|
+
--trees-context-menu-trigger-inline-offset: calc(var(--trees-padding-inline) + var(--trees-item-padding-x) -
|
|
297
|
+
var(--trees-focus-ring-width));
|
|
298
|
+
--trees-scrollbar-gutter: var(--trees-scrollbar-gutter-override, 6px);
|
|
299
|
+
--trees-padding-inline: var(--trees-padding-inline-override, 16px);
|
|
300
|
+
color-scheme: light dark;
|
|
301
|
+
font-size: var(--trees-font-size);
|
|
302
|
+
color: var(--trees-fg);
|
|
303
|
+
background-color: var(--trees-bg);
|
|
304
|
+
--truncate-marker-background-color: var(--trees-bg);
|
|
305
|
+
--truncate-marker-background-overlay-color: transparent;
|
|
306
|
+
font-family: var(--trees-font-family);
|
|
307
|
+
font-weight: var(--trees-font-weight-regular);
|
|
308
|
+
flex-direction: column;
|
|
309
|
+
display: flex;
|
|
310
|
+
}
|
|
311
|
+
|
|
312
|
+
:host([data-file-tree-virtualized="true"]) {
|
|
313
|
+
height: 100%;
|
|
314
|
+
overflow: hidden;
|
|
315
|
+
}
|
|
316
|
+
|
|
317
|
+
[data-file-tree-virtualized-wrapper="true"], [data-file-tree-virtualized-root="true"] {
|
|
318
|
+
flex-direction: column;
|
|
319
|
+
height: 100%;
|
|
320
|
+
display: flex;
|
|
321
|
+
overflow: hidden;
|
|
322
|
+
}
|
|
323
|
+
|
|
324
|
+
[data-file-tree-virtualized-scroll="true"], [data-file-tree-scrollbar-measure="true"] {
|
|
325
|
+
--trees-scrollbar-thumb-current: transparent;
|
|
326
|
+
scrollbar-gutter: stable;
|
|
327
|
+
overflow-y: auto;
|
|
328
|
+
|
|
329
|
+
&:hover {
|
|
330
|
+
--trees-scrollbar-thumb-current: var(--trees-scrollbar-thumb);
|
|
331
|
+
}
|
|
332
|
+
|
|
333
|
+
&::-webkit-scrollbar {
|
|
334
|
+
width: var(--trees-scrollbar-gutter);
|
|
335
|
+
height: var(--trees-scrollbar-gutter);
|
|
336
|
+
}
|
|
337
|
+
|
|
338
|
+
&::-webkit-scrollbar-track {
|
|
339
|
+
background: none;
|
|
340
|
+
}
|
|
341
|
+
|
|
342
|
+
&::-webkit-scrollbar-thumb {
|
|
343
|
+
background-color: var(--trees-scrollbar-thumb-current);
|
|
344
|
+
border-radius: calc(var(--trees-scrollbar-gutter) / 2);
|
|
345
|
+
background-clip: content-box;
|
|
346
|
+
border: 1px solid #0000;
|
|
347
|
+
}
|
|
348
|
+
|
|
349
|
+
&::-webkit-scrollbar-corner {
|
|
350
|
+
background-color: #0000;
|
|
351
|
+
}
|
|
352
|
+
}
|
|
353
|
+
|
|
354
|
+
[data-file-tree-scrollbar-measure="true"] {
|
|
355
|
+
visibility: hidden;
|
|
356
|
+
pointer-events: none;
|
|
357
|
+
width: 100px;
|
|
358
|
+
height: 100px;
|
|
359
|
+
position: absolute;
|
|
360
|
+
top: 0;
|
|
361
|
+
left: 0;
|
|
362
|
+
}
|
|
363
|
+
|
|
364
|
+
@supports ((-moz-appearance: none)) {
|
|
365
|
+
[data-file-tree-virtualized-scroll="true"], [data-file-tree-scrollbar-measure="true"] {
|
|
366
|
+
scrollbar-width: thin;
|
|
367
|
+
scrollbar-color: var(--trees-scrollbar-thumb-current) transparent;
|
|
368
|
+
}
|
|
369
|
+
}
|
|
370
|
+
|
|
371
|
+
[data-file-tree-virtualized-scroll="true"] {
|
|
372
|
+
min-height: 0;
|
|
373
|
+
padding-inline: max(calc(var(--trees-padding-inline) - var(--trees-item-margin-x)),
|
|
374
|
+
0px)
|
|
375
|
+
/* NOTE(amadeus): We can assume that all Webkit based browser gutters
|
|
376
|
+
* will align to the value of '--trees-scrollbar-gutter', however if not, then
|
|
377
|
+
* \`--trees-scrollbar-gutter-measured\` should correct it. Mostly we are
|
|
378
|
+
* hoping to avoid SSR alignment jumps if possible. In non-SSR'd environments
|
|
379
|
+
* \`--trees-scrollbar-gutter-measured\` should always be immediately available.
|
|
380
|
+
*/
|
|
381
|
+
max(calc(var(--trees-padding-inline) - var(--trees-item-margin-x) -
|
|
382
|
+
var(--trees-scrollbar-gutter-measured, var(--trees-scrollbar-gutter))),
|
|
383
|
+
0px);
|
|
384
|
+
flex: 1 1 0;
|
|
385
|
+
position: relative;
|
|
386
|
+
overflow-y: auto;
|
|
387
|
+
}
|
|
388
|
+
|
|
389
|
+
@supports ((-moz-appearance: none)) {
|
|
390
|
+
[data-file-tree-virtualized-scroll="true"] {
|
|
391
|
+
padding-inline: max(calc(var(--trees-padding-inline) - var(--trees-item-margin-x)),
|
|
392
|
+
0px)
|
|
393
|
+
/* NOTE(amadeus): However on Firefox it can vary a little bit, but most
|
|
394
|
+
* likely the majority of cases will default to a 0px width scrollbar lets
|
|
395
|
+
* inherit that first to avoid SSR jumps. In non-SSR'd environments
|
|
396
|
+
* \`--trees-scrollbar-gutter-measured\` should always be immediately available.
|
|
397
|
+
*/
|
|
398
|
+
max(calc(var(--trees-padding-inline) - var(--trees-item-margin-x) -
|
|
399
|
+
var(--trees-scrollbar-gutter-measured, 0px)),
|
|
400
|
+
0px);
|
|
401
|
+
}
|
|
402
|
+
}
|
|
403
|
+
|
|
404
|
+
[data-file-tree-sticky-overlay="true"] {
|
|
405
|
+
z-index: 4;
|
|
406
|
+
pointer-events: none;
|
|
407
|
+
height: 0;
|
|
408
|
+
position: sticky;
|
|
409
|
+
top: 0;
|
|
410
|
+
overflow: visible;
|
|
411
|
+
}
|
|
412
|
+
|
|
413
|
+
[data-file-tree-virtualized-root="true"][data-scroll-at-top="true"]:not([data-overlay-reveal]) [data-file-tree-sticky-overlay="true"] {
|
|
414
|
+
visibility: hidden;
|
|
415
|
+
}
|
|
416
|
+
|
|
417
|
+
[data-file-tree-sticky-overlay-content="true"] {
|
|
418
|
+
background-color: var(--trees-bg);
|
|
419
|
+
pointer-events: none;
|
|
420
|
+
position: relative;
|
|
421
|
+
}
|
|
422
|
+
|
|
423
|
+
[data-file-tree-virtualized-list="true"] {
|
|
424
|
+
background-color: var(--trees-bg);
|
|
425
|
+
overflow-anchor: none;
|
|
426
|
+
width: 100%;
|
|
427
|
+
min-height: 100%;
|
|
428
|
+
position: relative;
|
|
429
|
+
|
|
430
|
+
&[data-is-scrolling] {
|
|
431
|
+
pointer-events: none;
|
|
432
|
+
}
|
|
433
|
+
}
|
|
434
|
+
|
|
435
|
+
[data-file-tree-virtualized-sticky-offset="true"] {
|
|
436
|
+
contain: layout size;
|
|
437
|
+
}
|
|
438
|
+
|
|
439
|
+
[data-file-tree-virtualized-sticky="true"] {
|
|
440
|
+
isolation: isolate;
|
|
441
|
+
will-change: transform;
|
|
442
|
+
flex-direction: column;
|
|
443
|
+
width: 100%;
|
|
444
|
+
display: flex;
|
|
445
|
+
position: sticky;
|
|
446
|
+
top: 0;
|
|
447
|
+
}
|
|
448
|
+
|
|
449
|
+
[data-file-tree-search-container] {
|
|
450
|
+
padding: 0;
|
|
451
|
+
padding-inline: var(--trees-padding-inline);
|
|
452
|
+
margin-bottom: var(--trees-item-row-gap);
|
|
453
|
+
display: flex;
|
|
454
|
+
}
|
|
455
|
+
|
|
456
|
+
[data-file-tree-search-input] {
|
|
457
|
+
--trees-focus-ring-width: 2px;
|
|
458
|
+
font-family: var(--trees-font-family);
|
|
459
|
+
font-size: var(--trees-font-size);
|
|
460
|
+
height: var(--trees-row-height);
|
|
461
|
+
padding-inline: var(--trees-item-padding-x);
|
|
462
|
+
line-height: var(--trees-row-height);
|
|
463
|
+
color: var(--trees-search-fg);
|
|
464
|
+
background-color: var(--trees-search-bg);
|
|
465
|
+
border: 1px solid var(--trees-border-color);
|
|
466
|
+
border-radius: var(--trees-border-radius);
|
|
467
|
+
outline: none;
|
|
468
|
+
flex: 1;
|
|
469
|
+
margin-block: 1px;
|
|
470
|
+
|
|
471
|
+
&::placeholder {
|
|
472
|
+
color: color-mix(in lab,
|
|
473
|
+
var(--trees-search-fg) 65%,
|
|
474
|
+
var(--trees-search-bg));
|
|
475
|
+
}
|
|
476
|
+
|
|
477
|
+
&:focus-visible, &[data-file-tree-search-input-fake-focus="true"] {
|
|
478
|
+
outline: var(--trees-focus-ring-width) solid var(--trees-focus-ring-color);
|
|
479
|
+
outline-offset: var(--trees-focus-ring-offset);
|
|
480
|
+
}
|
|
481
|
+
}
|
|
482
|
+
|
|
483
|
+
[role="tree"] {
|
|
484
|
+
gap: var(--trees-gap-override, 0);
|
|
485
|
+
flex-direction: column;
|
|
486
|
+
display: flex;
|
|
487
|
+
position: relative;
|
|
488
|
+
}
|
|
489
|
+
|
|
490
|
+
[data-type="item"] {
|
|
491
|
+
color: inherit;
|
|
492
|
+
font-family: var(--trees-font-family);
|
|
493
|
+
font-size: var(--trees-font-size);
|
|
494
|
+
text-align: start;
|
|
495
|
+
background-color: var(--trees-bg);
|
|
496
|
+
padding: 0 var(--trees-item-padding-x);
|
|
497
|
+
margin: 0 var(--trees-item-margin-x);
|
|
498
|
+
cursor: pointer;
|
|
499
|
+
user-select: none;
|
|
500
|
+
-webkit-touch-callout: none;
|
|
501
|
+
touch-action: manipulation;
|
|
502
|
+
flex: 0 0 var(--trees-row-height);
|
|
503
|
+
height: var(--trees-row-height);
|
|
504
|
+
line-height: var(--trees-row-height);
|
|
505
|
+
align-items: center;
|
|
506
|
+
gap: var(--trees-item-row-gap);
|
|
507
|
+
border-radius: var(--trees-border-radius);
|
|
508
|
+
--truncate-marker-background-color: var(--trees-bg);
|
|
509
|
+
--truncate-marker-background-overlay-color: transparent;
|
|
510
|
+
--truncate-marker-block-inset: 0px;
|
|
511
|
+
border: none;
|
|
512
|
+
outline: none;
|
|
513
|
+
display: flex;
|
|
514
|
+
position: relative;
|
|
515
|
+
|
|
516
|
+
&:hover, &[data-item-context-hover="true"] {
|
|
517
|
+
background-color: var(--trees-bg-muted);
|
|
518
|
+
--truncate-marker-background-overlay-color: var(--trees-bg-muted);
|
|
519
|
+
}
|
|
520
|
+
|
|
521
|
+
&[data-item-focused="true"], &:focus-visible {
|
|
522
|
+
z-index: 2;
|
|
523
|
+
|
|
524
|
+
& [data-item-flattened-subitems] {
|
|
525
|
+
--truncate-marker-block-inset: var(--trees-focus-ring-width);
|
|
526
|
+
}
|
|
527
|
+
|
|
528
|
+
&:before {
|
|
529
|
+
content: "";
|
|
530
|
+
border-radius: var(--trees-border-radius);
|
|
531
|
+
outline: var(--trees-focus-ring-width) solid
|
|
532
|
+
var(--trees-focus-ring-color);
|
|
533
|
+
outline-offset: var(--trees-focus-ring-offset);
|
|
534
|
+
pointer-events: none;
|
|
535
|
+
display: block;
|
|
536
|
+
position: absolute;
|
|
537
|
+
inset: 0;
|
|
538
|
+
}
|
|
539
|
+
|
|
540
|
+
&[data-item-selected="true"]:before {
|
|
541
|
+
outline-color: var(--trees-selected-focused-border-color);
|
|
542
|
+
}
|
|
543
|
+
}
|
|
544
|
+
|
|
545
|
+
&[data-item-selected="true"] {
|
|
546
|
+
color: var(--trees-selected-fg);
|
|
547
|
+
background-color: var(--trees-selected-bg);
|
|
548
|
+
--truncate-marker-background-overlay-color: var(--trees-selected-bg);
|
|
549
|
+
z-index: 3;
|
|
550
|
+
|
|
551
|
+
& [data-item-section="icon"] {
|
|
552
|
+
color: var(--trees-selected-fg);
|
|
553
|
+
}
|
|
554
|
+
}
|
|
555
|
+
|
|
556
|
+
&[data-item-search-match="true"] {
|
|
557
|
+
font-weight: var(--trees-search-font-weight);
|
|
558
|
+
}
|
|
559
|
+
}
|
|
560
|
+
|
|
561
|
+
[data-type="item"][data-file-tree-sticky-row="true"] {
|
|
562
|
+
pointer-events: auto;
|
|
563
|
+
}
|
|
564
|
+
|
|
565
|
+
[data-file-tree-virtualized-root="true"][data-is-scrolling] [data-type="item"][data-file-tree-sticky-row="true"] {
|
|
566
|
+
pointer-events: none;
|
|
567
|
+
}
|
|
568
|
+
|
|
569
|
+
[data-file-tree-virtualized-root="true"][data-is-scrolling] [data-type="item"][data-file-tree-sticky-row="true"]:hover:not([data-item-selected="true"]), [data-file-tree-virtualized-root="true"][data-is-scrolling] [data-type="item"][data-file-tree-sticky-row="true"][data-item-context-hover="true"]:not([data-item-selected="true"]) {
|
|
570
|
+
background-color: var(--trees-bg);
|
|
571
|
+
--truncate-marker-background-overlay-color: transparent;
|
|
572
|
+
}
|
|
573
|
+
|
|
574
|
+
[data-item-selected="true"]:has( + [data-item-selected="true"]) {
|
|
575
|
+
border-bottom-right-radius: 0;
|
|
576
|
+
border-bottom-left-radius: 0;
|
|
577
|
+
}
|
|
578
|
+
|
|
579
|
+
[data-item-selected="true"] + [data-item-selected="true"] {
|
|
580
|
+
border-top-left-radius: 0;
|
|
581
|
+
border-top-right-radius: 0;
|
|
582
|
+
}
|
|
583
|
+
|
|
584
|
+
[data-item-flattened-subitems] {
|
|
585
|
+
align-items: center;
|
|
586
|
+
gap: 2px;
|
|
587
|
+
display: inline-flex;
|
|
588
|
+
}
|
|
589
|
+
|
|
590
|
+
[data-item-flattened-subitem]:hover, [data-item-flattened-subitem-drag-target="true"] {
|
|
591
|
+
text-decoration: underline;
|
|
592
|
+
}
|
|
593
|
+
|
|
594
|
+
[data-item-section="icon"] {
|
|
595
|
+
color: var(--trees-fg-muted);
|
|
596
|
+
fill: currentColor;
|
|
597
|
+
width: var(--trees-icon-width);
|
|
598
|
+
flex-shrink: 0;
|
|
599
|
+
justify-content: center;
|
|
600
|
+
align-items: center;
|
|
601
|
+
display: flex;
|
|
602
|
+
}
|
|
603
|
+
|
|
604
|
+
:where([data-item-section="icon"] > [data-icon-token]) {
|
|
605
|
+
color: var(--trees-fg-muted);
|
|
606
|
+
}
|
|
607
|
+
|
|
608
|
+
[data-file-tree-colored-icons="true"] {
|
|
609
|
+
& [data-icon-token="astro"] {
|
|
610
|
+
color: var(--trees-file-icon-color-astro);
|
|
611
|
+
}
|
|
612
|
+
|
|
613
|
+
& [data-icon-token="babel"] {
|
|
614
|
+
color: var(--trees-file-icon-color-babel);
|
|
615
|
+
}
|
|
616
|
+
|
|
617
|
+
& [data-icon-token="bash"] {
|
|
618
|
+
color: var(--trees-file-icon-color-bash);
|
|
619
|
+
}
|
|
620
|
+
|
|
621
|
+
& [data-icon-token="biome"] {
|
|
622
|
+
color: var(--trees-file-icon-color-biome);
|
|
623
|
+
}
|
|
624
|
+
|
|
625
|
+
& [data-icon-token="bootstrap"] {
|
|
626
|
+
color: var(--trees-file-icon-color-bootstrap);
|
|
627
|
+
}
|
|
628
|
+
|
|
629
|
+
& [data-icon-token="browserslist"] {
|
|
630
|
+
color: var(--trees-file-icon-color-browserslist);
|
|
631
|
+
}
|
|
632
|
+
|
|
633
|
+
& [data-icon-token="bun"] {
|
|
634
|
+
color: var(--trees-file-icon-color-bun);
|
|
635
|
+
}
|
|
636
|
+
|
|
637
|
+
& [data-icon-token="c"] {
|
|
638
|
+
color: var(--trees-file-icon-color-c);
|
|
639
|
+
}
|
|
640
|
+
|
|
641
|
+
& [data-icon-token="cpp"] {
|
|
642
|
+
color: var(--trees-file-icon-color-cpp);
|
|
643
|
+
}
|
|
644
|
+
|
|
645
|
+
& [data-icon-token="claude"] {
|
|
646
|
+
color: var(--trees-file-icon-color-claude);
|
|
647
|
+
}
|
|
648
|
+
|
|
649
|
+
& [data-icon-token="css"] {
|
|
650
|
+
color: var(--trees-file-icon-color-css);
|
|
651
|
+
}
|
|
652
|
+
|
|
653
|
+
& [data-icon-token="database"] {
|
|
654
|
+
color: var(--trees-file-icon-color-database);
|
|
655
|
+
}
|
|
656
|
+
|
|
657
|
+
& [data-icon-token="default"] {
|
|
658
|
+
color: var(--trees-file-icon-color-default);
|
|
659
|
+
}
|
|
660
|
+
|
|
661
|
+
& [data-icon-token="docker"] {
|
|
662
|
+
color: var(--trees-file-icon-color-docker);
|
|
663
|
+
}
|
|
664
|
+
|
|
665
|
+
& [data-icon-token="eslint"] {
|
|
666
|
+
color: var(--trees-file-icon-color-eslint);
|
|
667
|
+
}
|
|
668
|
+
|
|
669
|
+
& [data-icon-token="git"] {
|
|
670
|
+
color: var(--trees-file-icon-color-git);
|
|
671
|
+
}
|
|
672
|
+
|
|
673
|
+
& [data-icon-token="go"] {
|
|
674
|
+
color: var(--trees-file-icon-color-go);
|
|
675
|
+
}
|
|
676
|
+
|
|
677
|
+
& [data-icon-token="graphql"] {
|
|
678
|
+
color: var(--trees-file-icon-color-graphql);
|
|
679
|
+
}
|
|
680
|
+
|
|
681
|
+
& [data-icon-token="html"] {
|
|
682
|
+
color: var(--trees-file-icon-color-html);
|
|
683
|
+
}
|
|
684
|
+
|
|
685
|
+
& [data-icon-token="image"] {
|
|
686
|
+
color: var(--trees-file-icon-color-image);
|
|
687
|
+
}
|
|
688
|
+
|
|
689
|
+
& [data-icon-token="javascript"] {
|
|
690
|
+
color: var(--trees-file-icon-color-javascript);
|
|
691
|
+
}
|
|
692
|
+
|
|
693
|
+
& [data-icon-token="json"] {
|
|
694
|
+
color: var(--trees-file-icon-color-json);
|
|
695
|
+
}
|
|
696
|
+
|
|
697
|
+
& [data-icon-token="markdown"] {
|
|
698
|
+
color: var(--trees-file-icon-color-markdown);
|
|
699
|
+
}
|
|
700
|
+
|
|
701
|
+
& [data-icon-token="mcp"] {
|
|
702
|
+
color: var(--trees-file-icon-color-mcp);
|
|
703
|
+
}
|
|
704
|
+
|
|
705
|
+
& [data-icon-token="npm"] {
|
|
706
|
+
color: var(--trees-file-icon-color-npm);
|
|
707
|
+
}
|
|
708
|
+
|
|
709
|
+
& [data-icon-token="oxc"] {
|
|
710
|
+
color: var(--trees-file-icon-color-oxc);
|
|
711
|
+
}
|
|
712
|
+
|
|
713
|
+
& [data-icon-token="postcss"] {
|
|
714
|
+
color: var(--trees-file-icon-color-postcss);
|
|
715
|
+
}
|
|
716
|
+
|
|
717
|
+
& [data-icon-token="prettier"] {
|
|
718
|
+
color: var(--trees-file-icon-color-prettier);
|
|
719
|
+
}
|
|
720
|
+
|
|
721
|
+
& [data-icon-token="python"] {
|
|
722
|
+
color: var(--trees-file-icon-color-python);
|
|
723
|
+
}
|
|
724
|
+
|
|
725
|
+
& [data-icon-token="react"] {
|
|
726
|
+
color: var(--trees-file-icon-color-react);
|
|
727
|
+
}
|
|
728
|
+
|
|
729
|
+
& [data-icon-token="ruby"] {
|
|
730
|
+
color: var(--trees-file-icon-color-ruby);
|
|
731
|
+
}
|
|
732
|
+
|
|
733
|
+
& [data-icon-token="rust"] {
|
|
734
|
+
color: var(--trees-file-icon-color-rust);
|
|
735
|
+
}
|
|
736
|
+
|
|
737
|
+
& [data-icon-token="sass"] {
|
|
738
|
+
color: var(--trees-file-icon-color-sass);
|
|
739
|
+
}
|
|
740
|
+
|
|
741
|
+
& [data-icon-token="svg"] {
|
|
742
|
+
color: var(--trees-file-icon-color-svg);
|
|
743
|
+
}
|
|
744
|
+
|
|
745
|
+
& [data-icon-token="svelte"] {
|
|
746
|
+
color: var(--trees-file-icon-color-svelte);
|
|
747
|
+
}
|
|
748
|
+
|
|
749
|
+
& [data-icon-token="svgo"] {
|
|
750
|
+
color: var(--trees-file-icon-color-svgo);
|
|
751
|
+
}
|
|
752
|
+
|
|
753
|
+
& [data-icon-token="swift"] {
|
|
754
|
+
color: var(--trees-file-icon-color-swift);
|
|
755
|
+
}
|
|
756
|
+
|
|
757
|
+
& [data-icon-token="table"] {
|
|
758
|
+
color: var(--trees-file-icon-color-table);
|
|
759
|
+
}
|
|
760
|
+
|
|
761
|
+
& [data-icon-token="text"] {
|
|
762
|
+
color: var(--trees-file-icon-color-text);
|
|
763
|
+
}
|
|
764
|
+
|
|
765
|
+
& [data-icon-token="tailwind"] {
|
|
766
|
+
color: var(--trees-file-icon-color-tailwind);
|
|
767
|
+
}
|
|
768
|
+
|
|
769
|
+
& [data-icon-token="terraform"] {
|
|
770
|
+
color: var(--trees-file-icon-color-terraform);
|
|
771
|
+
}
|
|
772
|
+
|
|
773
|
+
& [data-icon-token="typescript"] {
|
|
774
|
+
color: var(--trees-file-icon-color-typescript);
|
|
775
|
+
}
|
|
776
|
+
|
|
777
|
+
& [data-icon-token="vite"] {
|
|
778
|
+
color: var(--trees-file-icon-color-vite);
|
|
779
|
+
}
|
|
780
|
+
|
|
781
|
+
& [data-icon-token="vscode"] {
|
|
782
|
+
color: var(--trees-file-icon-color-vscode);
|
|
783
|
+
}
|
|
784
|
+
|
|
785
|
+
& [data-icon-token="vue"] {
|
|
786
|
+
color: var(--trees-file-icon-color-vue);
|
|
787
|
+
}
|
|
788
|
+
|
|
789
|
+
& [data-icon-token="wasm"] {
|
|
790
|
+
color: var(--trees-file-icon-color-wasm);
|
|
791
|
+
}
|
|
792
|
+
|
|
793
|
+
& [data-icon-token="webpack"] {
|
|
794
|
+
color: var(--trees-file-icon-color-webpack);
|
|
795
|
+
}
|
|
796
|
+
|
|
797
|
+
& [data-icon-token="yml"] {
|
|
798
|
+
color: var(--trees-file-icon-color-yml);
|
|
799
|
+
}
|
|
800
|
+
|
|
801
|
+
& [data-icon-token="zig"] {
|
|
802
|
+
color: var(--trees-file-icon-color-zig);
|
|
803
|
+
}
|
|
804
|
+
|
|
805
|
+
& [data-icon-token="zip"] {
|
|
806
|
+
color: var(--trees-file-icon-color-zip);
|
|
807
|
+
}
|
|
808
|
+
}
|
|
809
|
+
|
|
810
|
+
[data-icon-name="file-tree-icon-chevron"] {
|
|
811
|
+
&[data-align-capitals="false"] {
|
|
812
|
+
transform: translate(0, var(--trees-icon-nudge));
|
|
813
|
+
}
|
|
814
|
+
|
|
815
|
+
&[data-align-capitals="true"] {
|
|
816
|
+
transform: translate(0);
|
|
817
|
+
}
|
|
818
|
+
}
|
|
819
|
+
|
|
820
|
+
[data-item-section="content"] {
|
|
821
|
+
text-align: start;
|
|
822
|
+
text-overflow: ellipsis;
|
|
823
|
+
flex: 0 auto;
|
|
824
|
+
min-width: 0;
|
|
825
|
+
max-width: 100%;
|
|
826
|
+
overflow: hidden;
|
|
827
|
+
}
|
|
828
|
+
|
|
829
|
+
[data-item-section="decoration"] {
|
|
830
|
+
text-align: end;
|
|
831
|
+
min-width: 0;
|
|
832
|
+
color: var(--trees-fg-muted);
|
|
833
|
+
flex: 1 1 0;
|
|
834
|
+
justify-content: flex-end;
|
|
835
|
+
display: flex;
|
|
836
|
+
overflow: hidden;
|
|
837
|
+
}
|
|
838
|
+
|
|
839
|
+
[data-item-section="decoration"] > span {
|
|
840
|
+
text-overflow: ellipsis;
|
|
841
|
+
white-space: nowrap;
|
|
842
|
+
justify-content: flex-end;
|
|
843
|
+
align-items: center;
|
|
844
|
+
min-width: 0;
|
|
845
|
+
max-width: 100%;
|
|
846
|
+
display: inline-flex;
|
|
847
|
+
overflow: hidden;
|
|
848
|
+
}
|
|
849
|
+
|
|
850
|
+
[data-item-section="git"], [data-item-section="action"] {
|
|
851
|
+
flex: none;
|
|
852
|
+
justify-content: center;
|
|
853
|
+
align-items: center;
|
|
854
|
+
display: flex;
|
|
855
|
+
}
|
|
856
|
+
|
|
857
|
+
[data-item-section="git"] {
|
|
858
|
+
width: var(--trees-git-lane-width);
|
|
859
|
+
}
|
|
860
|
+
|
|
861
|
+
[data-item-section="action"] {
|
|
862
|
+
width: var(--trees-action-lane-width);
|
|
863
|
+
color: var(--trees-fg-muted);
|
|
864
|
+
fill: currentColor;
|
|
865
|
+
pointer-events: none;
|
|
866
|
+
}
|
|
867
|
+
|
|
868
|
+
[data-item-section="git"] > span, [data-item-section="action"] > span {
|
|
869
|
+
justify-content: center;
|
|
870
|
+
align-items: center;
|
|
871
|
+
width: 100%;
|
|
872
|
+
display: inline-flex;
|
|
873
|
+
}
|
|
874
|
+
|
|
875
|
+
[data-item-action-affordance="decorative"] {
|
|
876
|
+
opacity: .85;
|
|
877
|
+
}
|
|
878
|
+
|
|
879
|
+
[data-item-rename-input] {
|
|
880
|
+
appearance: none;
|
|
881
|
+
width: 100%;
|
|
882
|
+
min-width: 0;
|
|
883
|
+
height: calc(var(--trees-row-height) - 4px);
|
|
884
|
+
font-family: inherit;
|
|
885
|
+
font-size: inherit;
|
|
886
|
+
color: inherit;
|
|
887
|
+
box-sizing: border-box;
|
|
888
|
+
background-color: #0000;
|
|
889
|
+
border: 0;
|
|
890
|
+
outline: none;
|
|
891
|
+
padding-inline: 6px;
|
|
892
|
+
}
|
|
893
|
+
|
|
894
|
+
[data-item-section="content"]:has([data-item-rename-input]) ~ [data-item-section="action"], [data-item-section="content"]:has([data-item-rename-input]) ~ [data-item-section="decoration"] {
|
|
895
|
+
display: none;
|
|
896
|
+
}
|
|
897
|
+
|
|
898
|
+
[aria-expanded="false"][data-item-type="folder"] > [data-item-section="icon"] > [data-icon-name="file-tree-icon-chevron"] {
|
|
899
|
+
&[data-align-capitals="true"] {
|
|
900
|
+
transform: rotate(-90deg)
|
|
901
|
+
translate(calc(var(--trees-icon-nudge) / 2),
|
|
902
|
+
calc(var(--trees-icon-nudge) / 2));
|
|
903
|
+
}
|
|
904
|
+
|
|
905
|
+
&[data-align-capitals="false"] {
|
|
906
|
+
transform: rotate(-90deg)
|
|
907
|
+
translate(calc(var(--trees-icon-nudge) / 2 * -1),
|
|
908
|
+
calc(var(--trees-icon-nudge) / 2));
|
|
909
|
+
}
|
|
910
|
+
}
|
|
911
|
+
|
|
912
|
+
[data-item-section="spacing"] {
|
|
913
|
+
height: var(--trees-row-height);
|
|
914
|
+
padding-left: calc(calc(var(--trees-icon-width) / 2) - .5px);
|
|
915
|
+
flex-direction: row;
|
|
916
|
+
justify-content: center;
|
|
917
|
+
align-items: center;
|
|
918
|
+
display: flex;
|
|
919
|
+
|
|
920
|
+
&:empty {
|
|
921
|
+
padding-left: 0;
|
|
922
|
+
}
|
|
923
|
+
}
|
|
924
|
+
|
|
925
|
+
[data-item-section="spacing-item"] {
|
|
926
|
+
border-left: 1px solid var(--trees-indent-guide-bg);
|
|
927
|
+
height: 100%;
|
|
928
|
+
margin-right: calc(var(--trees-level-gap) - 1px);
|
|
929
|
+
opacity: 0;
|
|
930
|
+
transition: opacity .15s;
|
|
931
|
+
display: inline-block;
|
|
932
|
+
transform: translateX(-.25px);
|
|
933
|
+
|
|
934
|
+
& + & {
|
|
935
|
+
margin-left: calc(var(--trees-item-row-gap) + calc(var(--trees-icon-width) / 2) - .5px);
|
|
936
|
+
}
|
|
937
|
+
}
|
|
938
|
+
|
|
939
|
+
:host(:hover) [data-item-section="spacing-item"] {
|
|
940
|
+
opacity: .75;
|
|
941
|
+
}
|
|
942
|
+
|
|
943
|
+
[data-item-contains-git-change="true"] > [data-item-section="git"] {
|
|
944
|
+
color: var(--trees-git-modified-color);
|
|
945
|
+
opacity: .5;
|
|
946
|
+
fill: currentColor;
|
|
947
|
+
}
|
|
948
|
+
|
|
949
|
+
[data-item-git-status] {
|
|
950
|
+
& > :where([data-item-section="icon"]) > :where(:not([data-icon-name="file-tree-icon-chevron"])), & > [data-item-section="content"] {
|
|
951
|
+
color: var(--trees-item-git-status-color);
|
|
952
|
+
}
|
|
953
|
+
|
|
954
|
+
& > [data-item-section="git"] {
|
|
955
|
+
color: var(--trees-item-git-status-color);
|
|
956
|
+
font-weight: var(--trees-font-weight-semibold);
|
|
957
|
+
}
|
|
958
|
+
}
|
|
959
|
+
|
|
960
|
+
[data-item-git-status="added"] {
|
|
961
|
+
--trees-item-git-status-color: var(--trees-git-added-color);
|
|
962
|
+
}
|
|
963
|
+
|
|
964
|
+
[data-item-git-status="deleted"] {
|
|
965
|
+
--trees-item-git-status-color: var(--trees-git-deleted-color);
|
|
966
|
+
}
|
|
967
|
+
|
|
968
|
+
[data-item-git-status="ignored"] {
|
|
969
|
+
--trees-item-git-status-color: var(--trees-git-ignored-color);
|
|
970
|
+
|
|
971
|
+
& > [data-item-section="icon"] {
|
|
972
|
+
opacity: .5;
|
|
973
|
+
}
|
|
974
|
+
}
|
|
975
|
+
|
|
976
|
+
[data-item-section="git"] [data-icon-name="file-tree-icon-dot"] {
|
|
977
|
+
transform: translateY(calc(.65ex - 50%));
|
|
978
|
+
}
|
|
979
|
+
|
|
980
|
+
[data-item-git-status="modified"] {
|
|
981
|
+
--trees-item-git-status-color: var(--trees-git-modified-color);
|
|
982
|
+
}
|
|
983
|
+
|
|
984
|
+
[data-item-git-status="renamed"] {
|
|
985
|
+
--trees-item-git-status-color: var(--trees-git-renamed-color);
|
|
986
|
+
}
|
|
987
|
+
|
|
988
|
+
[data-item-git-status="untracked"] {
|
|
989
|
+
--trees-item-git-status-color: var(--trees-git-untracked-color);
|
|
990
|
+
}
|
|
991
|
+
|
|
992
|
+
[data-item-drag-target="true"] {
|
|
993
|
+
background-color: var(--trees-selected-bg);
|
|
994
|
+
}
|
|
995
|
+
|
|
996
|
+
[data-item-dragging="true"] {
|
|
997
|
+
opacity: .5;
|
|
998
|
+
}
|
|
999
|
+
|
|
1000
|
+
[data-item-section="lock"] {
|
|
1001
|
+
color: var(--trees-fg-muted);
|
|
1002
|
+
flex: none;
|
|
1003
|
+
align-items: center;
|
|
1004
|
+
margin-left: auto;
|
|
1005
|
+
display: flex;
|
|
1006
|
+
}
|
|
1007
|
+
|
|
1008
|
+
[data-item-section="lock"] svg {
|
|
1009
|
+
display: block;
|
|
1010
|
+
}
|
|
1011
|
+
|
|
1012
|
+
[data-type="header-slot"] {
|
|
1013
|
+
flex: none;
|
|
1014
|
+
display: block;
|
|
1015
|
+
}
|
|
1016
|
+
|
|
1017
|
+
[data-type="context-menu-wash"] {
|
|
1018
|
+
z-index: 3;
|
|
1019
|
+
touch-action: none;
|
|
1020
|
+
background-color: #0000;
|
|
1021
|
+
position: absolute;
|
|
1022
|
+
inset: 0;
|
|
1023
|
+
}
|
|
1024
|
+
|
|
1025
|
+
[data-type="context-menu-anchor"] {
|
|
1026
|
+
top: 0;
|
|
1027
|
+
right: var(--trees-context-menu-trigger-inline-offset);
|
|
1028
|
+
z-index: 4;
|
|
1029
|
+
align-items: center;
|
|
1030
|
+
display: none;
|
|
1031
|
+
position: absolute;
|
|
1032
|
+
|
|
1033
|
+
&[data-visible="true"] {
|
|
1034
|
+
display: flex;
|
|
1035
|
+
}
|
|
1036
|
+
}
|
|
1037
|
+
|
|
1038
|
+
[data-file-tree-virtualized-root="true"][data-is-scrolling] [data-type="context-menu-anchor"] {
|
|
1039
|
+
display: none;
|
|
1040
|
+
}
|
|
1041
|
+
|
|
1042
|
+
[data-type="context-menu-anchor"] > slot[name="context-menu"] {
|
|
1043
|
+
flex: 0 0 0;
|
|
1044
|
+
width: 0;
|
|
1045
|
+
min-width: 0;
|
|
1046
|
+
display: block;
|
|
1047
|
+
overflow: visible;
|
|
1048
|
+
}
|
|
1049
|
+
|
|
1050
|
+
[data-type="context-menu-trigger"] {
|
|
1051
|
+
all: unset;
|
|
1052
|
+
width: var(--trees-action-lane-width);
|
|
1053
|
+
color: var(--trees-fg-muted);
|
|
1054
|
+
fill: currentColor;
|
|
1055
|
+
cursor: pointer;
|
|
1056
|
+
font-family: var(--trees-font-family);
|
|
1057
|
+
font-size: var(--trees-font-size);
|
|
1058
|
+
border-top-right-radius: var(--trees-border-radius);
|
|
1059
|
+
border-bottom-right-radius: var(--trees-border-radius);
|
|
1060
|
+
margin: var(--trees-focus-ring-width);
|
|
1061
|
+
height: calc(var(--trees-row-height) - var(--trees-focus-ring-width) * 2);
|
|
1062
|
+
border-width: 0;
|
|
1063
|
+
justify-content: center;
|
|
1064
|
+
align-items: center;
|
|
1065
|
+
transition: color .12s;
|
|
1066
|
+
display: flex;
|
|
1067
|
+
}
|
|
1068
|
+
|
|
1069
|
+
[data-type="context-menu-trigger"]:hover, [data-type="context-menu-trigger"][aria-expanded="true"] {
|
|
1070
|
+
color: var(--trees-fg);
|
|
1071
|
+
}
|
|
1072
|
+
|
|
1073
|
+
[data-truncate-container] {
|
|
1074
|
+
--truncate-internal-marker-fade-width: var(--truncate-marker-fade-width, 2px);
|
|
1075
|
+
--truncate-internal-marker-gap: var(--truncate-marker-gap, 0px);
|
|
1076
|
+
--truncate-internal-marker-opacity: var(--truncate-marker-opacity, 50%);
|
|
1077
|
+
--truncate-internal-middle-marker-opacity: var(--truncate-middle-marker-opacity, 80%);
|
|
1078
|
+
--truncate-internal-marker-background-color: var(--truncate-marker-background-color, light-dark(#fff, #000));
|
|
1079
|
+
--truncate-internal-marker-background-overlay-color: var(--truncate-marker-background-overlay-color, transparent);
|
|
1080
|
+
--truncate-internal-marker-block-inset: var(--truncate-marker-block-inset, 0px);
|
|
1081
|
+
--truncate-internal-marker-fade-out-duration: var(--truncate-marker-fade-out-duration, 0s);
|
|
1082
|
+
--truncate-internal-marker-fade-in-duration: var(--truncate-marker-fade-in-duration, .1s);
|
|
1083
|
+
--truncate-internal-fade-marker-color: var(--truncate-fade-marker-color, #000);
|
|
1084
|
+
--truncate-internal-fade-marker-width: var(--truncate-fade-marker-width, .2lh);
|
|
1085
|
+
--truncate-internal-single-line-height: 1lh;
|
|
1086
|
+
height: var(--truncate-internal-single-line-height);
|
|
1087
|
+
min-width: 0;
|
|
1088
|
+
margin-top: -1px;
|
|
1089
|
+
margin-bottom: -1px;
|
|
1090
|
+
overflow: hidden;
|
|
1091
|
+
}
|
|
1092
|
+
|
|
1093
|
+
[data-truncate-marker] {
|
|
1094
|
+
height: var(--truncate-internal-single-line-height);
|
|
1095
|
+
padding-block: var(--truncate-internal-marker-block-inset);
|
|
1096
|
+
box-sizing: border-box;
|
|
1097
|
+
z-index: 2;
|
|
1098
|
+
color: color-mix(in srgb,
|
|
1099
|
+
currentColor var(--truncate-internal-marker-opacity),
|
|
1100
|
+
transparent);
|
|
1101
|
+
opacity: 0;
|
|
1102
|
+
transition: opacity var(--truncate-internal-marker-fade-out-duration)
|
|
1103
|
+
ease-in-out;
|
|
1104
|
+
background-clip: content-box;
|
|
1105
|
+
align-items: center;
|
|
1106
|
+
display: flex;
|
|
1107
|
+
position: absolute;
|
|
1108
|
+
}
|
|
1109
|
+
|
|
1110
|
+
@container measure (height > 1lh) {
|
|
1111
|
+
[data-truncate-marker] {
|
|
1112
|
+
opacity: 1;
|
|
1113
|
+
transition: opacity var(--truncate-internal-marker-fade-in-duration)
|
|
1114
|
+
ease-in-out;
|
|
1115
|
+
}
|
|
1116
|
+
}
|
|
1117
|
+
|
|
1118
|
+
[data-truncate-grid] {
|
|
1119
|
+
display: grid;
|
|
1120
|
+
position: relative;
|
|
1121
|
+
}
|
|
1122
|
+
|
|
1123
|
+
[data-truncate-content="visible"] {
|
|
1124
|
+
white-space: nowrap;
|
|
1125
|
+
}
|
|
1126
|
+
|
|
1127
|
+
[data-truncate-content="overflow"] {
|
|
1128
|
+
opacity: 0;
|
|
1129
|
+
pointer-events: none;
|
|
1130
|
+
user-select: none;
|
|
1131
|
+
word-break: break-all;
|
|
1132
|
+
margin-top: calc(-1 * var(--truncate-internal-single-line-height));
|
|
1133
|
+
}
|
|
1134
|
+
|
|
1135
|
+
[data-truncate-marker-cell] {
|
|
1136
|
+
user-select: none;
|
|
1137
|
+
pointer-events: none;
|
|
1138
|
+
overflow: visible;
|
|
1139
|
+
container: measure / size;
|
|
1140
|
+
}
|
|
1141
|
+
|
|
1142
|
+
[data-truncate-container="truncate"] {
|
|
1143
|
+
& [data-truncate-grid] {
|
|
1144
|
+
grid-template-columns: minmax(0, max-content) 0;
|
|
1145
|
+
}
|
|
1146
|
+
|
|
1147
|
+
& [data-truncate-marker] {
|
|
1148
|
+
right: 0;
|
|
1149
|
+
}
|
|
1150
|
+
|
|
1151
|
+
& [data-truncate-fade] {
|
|
1152
|
+
margin-right: calc(-2 * var(--truncate-internal-fade-marker-width));
|
|
1153
|
+
}
|
|
1154
|
+
}
|
|
1155
|
+
|
|
1156
|
+
[data-truncate-container="fruncate"] {
|
|
1157
|
+
& [data-truncate-grid] {
|
|
1158
|
+
grid-template-columns: 0 minmax(0, max-content) auto;
|
|
1159
|
+
}
|
|
1160
|
+
|
|
1161
|
+
& [data-truncate-content] {
|
|
1162
|
+
direction: rtl;
|
|
1163
|
+
}
|
|
1164
|
+
|
|
1165
|
+
& [data-truncate-content] > span {
|
|
1166
|
+
unicode-bidi: plaintext;
|
|
1167
|
+
}
|
|
1168
|
+
|
|
1169
|
+
& [data-truncate-fade] {
|
|
1170
|
+
margin-left: calc(-2 * var(--truncate-internal-fade-marker-width));
|
|
1171
|
+
}
|
|
1172
|
+
}
|
|
1173
|
+
|
|
1174
|
+
[data-truncate-variant="default"] {
|
|
1175
|
+
& [data-truncate-marker] {
|
|
1176
|
+
background-color: var(--truncate-internal-marker-background-color);
|
|
1177
|
+
background-image: linear-gradient(var(--truncate-internal-marker-background-overlay-color),
|
|
1178
|
+
var(--truncate-internal-marker-background-overlay-color));
|
|
1179
|
+
}
|
|
1180
|
+
|
|
1181
|
+
& [data-truncate-marker]:after, & [data-truncate-marker]:before {
|
|
1182
|
+
content: "";
|
|
1183
|
+
width: calc(var(--truncate-internal-marker-fade-width) +
|
|
1184
|
+
var(--truncate-internal-marker-gap));
|
|
1185
|
+
height: max(0px,
|
|
1186
|
+
calc(var(--truncate-internal-single-line-height) -
|
|
1187
|
+
var(--truncate-internal-marker-block-inset) * 2));
|
|
1188
|
+
background-color: var(--truncate-internal-marker-background-color);
|
|
1189
|
+
background-image: linear-gradient(var(--truncate-internal-marker-background-overlay-color),
|
|
1190
|
+
var(--truncate-internal-marker-background-overlay-color));
|
|
1191
|
+
-webkit-mask-image: linear-gradient(var(--truncate-internal-fade-dir),
|
|
1192
|
+
#000 0%,
|
|
1193
|
+
#000 var(--truncate-internal-marker-gap),
|
|
1194
|
+
transparent 100%);
|
|
1195
|
+
mask-image: linear-gradient(var(--truncate-internal-fade-dir),
|
|
1196
|
+
#000 0%,
|
|
1197
|
+
#000 var(--truncate-internal-marker-gap),
|
|
1198
|
+
transparent 100%);
|
|
1199
|
+
position: absolute;
|
|
1200
|
+
inset-block-start: var(--truncate-internal-marker-block-inset);
|
|
1201
|
+
}
|
|
1202
|
+
|
|
1203
|
+
& [data-truncate-marker]:after {
|
|
1204
|
+
--truncate-internal-fade-dir: to right;
|
|
1205
|
+
right: calc(-1 *
|
|
1206
|
+
(
|
|
1207
|
+
var(--truncate-internal-marker-fade-width) +
|
|
1208
|
+
var(--truncate-internal-marker-gap)
|
|
1209
|
+
));
|
|
1210
|
+
}
|
|
1211
|
+
|
|
1212
|
+
& [data-truncate-marker]:before {
|
|
1213
|
+
--truncate-internal-fade-dir: to left;
|
|
1214
|
+
left: calc(-1 *
|
|
1215
|
+
(
|
|
1216
|
+
var(--truncate-internal-marker-fade-width) +
|
|
1217
|
+
var(--truncate-internal-marker-gap)
|
|
1218
|
+
));
|
|
1219
|
+
}
|
|
1220
|
+
}
|
|
1221
|
+
|
|
1222
|
+
[data-truncate-variant="fade"] {
|
|
1223
|
+
& [data-truncate-marker] {
|
|
1224
|
+
background: none;
|
|
1225
|
+
}
|
|
1226
|
+
}
|
|
1227
|
+
|
|
1228
|
+
[data-truncate-fade] {
|
|
1229
|
+
box-shadow: 0 0 calc(var(--truncate-internal-fade-marker-width) / 2)
|
|
1230
|
+
var(--truncate-internal-fade-marker-color),
|
|
1231
|
+
0 0 var(--truncate-internal-fade-marker-width)
|
|
1232
|
+
var(--truncate-internal-fade-marker-color);
|
|
1233
|
+
width: calc(var(--truncate-internal-fade-marker-width) * 2);
|
|
1234
|
+
height: calc(var(--truncate-internal-single-line-height) -
|
|
1235
|
+
(var(--truncate-internal-fade-marker-width) * 2));
|
|
1236
|
+
margin: var(--truncate-internal-fade-marker-width) 0;
|
|
1237
|
+
}
|
|
1238
|
+
|
|
1239
|
+
[data-truncate-group-container="middle"] {
|
|
1240
|
+
& [data-truncate-container] {
|
|
1241
|
+
--truncate-marker-opacity: var(--truncate-internal-middle-marker-opacity);
|
|
1242
|
+
}
|
|
1243
|
+
|
|
1244
|
+
min-width: 0;
|
|
1245
|
+
display: flex;
|
|
1246
|
+
|
|
1247
|
+
& > div {
|
|
1248
|
+
min-width: 0;
|
|
1249
|
+
}
|
|
1250
|
+
|
|
1251
|
+
& > div[data-truncate-segment-priority="1"] {
|
|
1252
|
+
flex: 0 1 max-content;
|
|
1253
|
+
}
|
|
1254
|
+
|
|
1255
|
+
& > div[data-truncate-segment-priority="2"] {
|
|
1256
|
+
flex: 0 999999 max-content;
|
|
1257
|
+
}
|
|
1258
|
+
}
|
|
1259
|
+
}
|
|
1260
|
+
|
|
1261
|
+
@layer theme, unsafe;
|
|
1262
|
+
`,R=`@layer base, unsafe;`;function wt(e){return`${R}
|
|
1263
|
+
@layer base {
|
|
1264
|
+
${e}
|
|
1265
|
+
}`}function Tt(e){return`${R}
|
|
1266
|
+
@layer unsafe {
|
|
1267
|
+
${e}
|
|
1268
|
+
}`}var Et=new WeakMap;function Dt(e){let t=Et.get(e);if(t!=null)return t;let n=document.createElement(`div`);n.setAttribute(A,`true`);let r=document.createElement(`div`);r.style.position=`relative`,r.style.height=`200%`,n.appendChild(r),e.appendChild(n);let i=Math.max(n.offsetWidth-n.clientWidth,0);return n.remove(),Et.set(e,i),i}function Ot(e,t){if(!e.isConnected)return;let n=Dt(t);if(n==null)return;let r=t.querySelector(`style[${j}]`),i=r instanceof HTMLStyleElement?r:document.createElement(`style`);r instanceof HTMLStyleElement||(i.setAttribute(j,``),t.appendChild(i)),i.textContent=`:host { ${M}: ${n}px; }`}var kt;function At(e){if(typeof CSSStyleSheet<`u`&&typeof CSSStyleSheet.prototype.replaceSync==`function`&&`adoptedStyleSheets`in e){kt??(kt=new CSSStyleSheet,kt.replaceSync(wt(Ct)));let t=!1;try{e.adoptedStyleSheets=[kt],t=!0}catch{}if(t){e.querySelector(`style[${O}]`)?.remove();return}}if(e.querySelector(`style[data-file-tree-style]`)==null){let t=document.createElement(`style`);t.setAttribute(O,``),t.textContent=wt(Ct),e.prepend(t)}}function jt(e,t){Mt(e,t),At(t),Ot(e,t)}function Mt(e,t){let n=e.querySelector(`template[shadowrootmode="open"], template[data-file-tree-shadowrootmode="open"]`);n instanceof HTMLTemplateElement&&(t.childNodes.length>0||(t.appendChild(n.content.cloneNode(!0)),n.hasAttribute(`shadowrootmode`)&&n.remove()))}if(typeof HTMLElement<`u`&&customElements.get(`file-tree-container`)==null){class e extends HTMLElement{constructor(){super()}connectedCallback(){let e=this.shadowRoot??this.attachShadow({mode:`open`});jt(this,e)}}if(customElements.define(D,e),typeof document<`u`)for(let e of Array.from(document.querySelectorAll(D)))e instanceof HTMLElement&&jt(e,e.shadowRoot??e.attachShadow({mode:`open`}))}var Nt=5,Pt=1<<Nt,Ft=Pt*4;function It(){return{childIdByNameId:new Map,childIds:[],childPositionById:new Map,childVisibleChunkSums:null,totalChildSubtreeNodeCount:0,totalChildVisibleSubtreeCount:0}}function Lt(){return{childIdByNameId:null,childIds:[],childPositionById:null,childVisibleChunkSums:null,totalChildSubtreeNodeCount:0,totalChildVisibleSubtreeCount:0}}function Rt(e,t){if(t.childIdByNameId!=null)return t.childIdByNameId;let n=new Map;for(let r of t.childIds){let t=e[r];t!=null&&n.set(t.nameId,r)}return t.childIdByNameId=n,n}function zt(e){if(e.childPositionById!=null)return e.childPositionById;let t=new Map;for(let n=0;n<e.childIds.length;n++){let r=e.childIds[n];r!=null&&t.set(r,n)}return e.childPositionById=t,t}function Bt(e,t){e.childPositionById!=null&&e.childPositionById.set(t,e.childIds.length),e.childIds.push(t)}function Vt(e,t){if(e.childPositionById!=null)for(let n=t;n<e.childIds.length;n++){let t=e.childIds[n];t!=null&&e.childPositionById.set(t,n)}}function Ht(e,t){let n=0,r=0;for(let i of t.childIds){let t=e[i];t!=null&&(n+=t.subtreeNodeCount,r+=t.visibleSubtreeCount)}t.totalChildSubtreeNodeCount=n,t.totalChildVisibleSubtreeCount=r,Kt(e,t)}function Ut(e,t,n,r){if(e.totalChildSubtreeNodeCount+=n,e.totalChildVisibleSubtreeCount+=r,e.childVisibleChunkSums==null||r===0)return;let i=zt(e).get(t);if(i===void 0)return;let a=i>>Nt;e.childVisibleChunkSums[a]+=r}function Wt(e,t,n){let r=t.childVisibleChunkSums;if(r!=null){let i=n,a=0;for(let o of r){if(i<o){let r=qt(e,t,a,i);return{...r,childVisibleIndex:n-r.localVisibleIndex}}i-=o,a+=Pt}throw Error(`Visible child index ${String(n)} is out of range`)}let i=n;for(let r=0;r<t.childIds.length;r++){let a=t.childIds[r];if(a==null)continue;let o=e[a];if(o!=null){if(i<o.visibleSubtreeCount)return{childIndex:r,childVisibleIndex:n-i,localVisibleIndex:i};i-=o.visibleSubtreeCount}}throw Error(`Visible child index ${String(n)} is out of range`)}function Gt(e,t,n){let r=0,i=t.childVisibleChunkSums,a=0;if(i!=null){let e=n>>Nt;for(let t=0;t<e;t+=1)r+=i[t]??0;a=e<<Nt}for(let i=a;i<n;i+=1){let n=t.childIds[i];if(n==null)continue;let a=e[n];a!=null&&(r+=a.visibleSubtreeCount)}return r}function Kt(e,t){if(t.childIds.length<Ft){t.childVisibleChunkSums=null;return}let n=Math.ceil(t.childIds.length/Pt),r=new Int32Array(n);for(let n=0;n<t.childIds.length;n++){let i=t.childIds[n];if(i==null)continue;let a=e[i];a!=null&&(r[n>>Nt]+=a.visibleSubtreeCount)}t.childVisibleChunkSums=r}function qt(e,t,n,r){let i=Math.min(t.childIds.length,n+Pt),a=r;for(let r=n;r<i;r++){let n=t.childIds[r];if(n==null)continue;let i=e[n];if(i!=null){if(a<i.visibleSubtreeCount)return{childIndex:r,localVisibleIndex:a};a-=i.visibleSubtreeCount}}throw Error(`Visible child index ${String(r)} is out of range`)}var Jt=7,Yt=3,Xt=1<<Yt,Zt=4;function Qt(e,t,n=0){return e<<Zt|n<<Yt|t}function $t(e){return e.depthAndFlags>>>Zt}function en(e){return(e.depthAndFlags&Xt)>>Yt}function z(e){return(e.depthAndFlags&Xt)!==0}function tn(e){return e.depthAndFlags&Jt}function B(e,t){return(tn(e)&t)!==0}function nn(e,t){e.depthAndFlags|=t}function rn(e,t){e.depthAndFlags=Qt(t,tn(e),en(e))}var an=Symbol(`benchmarkInstrumentation`);function on(e,t){return t==null||Object.defineProperty(e,an,{configurable:!0,enumerable:!1,value:t,writable:!1}),e}function sn(e){return e==null?null:e[an]??null}function V(e,t,n){return e==null?n():e.measurePhase(t,n)}function cn(e,t,n){!Number.isFinite(n)||e==null||e.setCounter(t,n)}function ln(e){return e>=48&&e<=57}function un(e){let t=[],n=0,r=0;for(;r<e.length;){for(;r<e.length&&!ln(e.charCodeAt(r));)r+=1;if(r>=e.length)break;r>n&&t.push(e.slice(n,r));let i=0;for(;r<e.length&&ln(e.charCodeAt(r));)i=i*10+(e.charCodeAt(r)-48),r+=1;t.push(i),n=r}return(n<e.length||t.length===0)&&t.push(e.slice(n)),t}function dn(e){let t=e.toLowerCase();return{lowerValue:t,tokens:un(t)}}function fn(e,t){let n=Math.min(e.length,t.length);for(let r=0;r<n;r++){let n=e[r],i=t[r];if(n===i)continue;if(typeof n==`number`&&typeof i==`number`)return n<i?-1:1;let a=String(n),o=String(i);if(a!==o)return a<o?-1:1}return e.length===t.length?0:e.length<t.length?-1:1}function pn(e,t){if(e.tokens.length===1&&t.tokens.length===1&&typeof e.tokens[0]==`string`&&typeof t.tokens[0]==`string`)return e.lowerValue===t.lowerValue?0:e.lowerValue<t.lowerValue?-1:1;let n=fn(e.tokens,t.tokens);return n===0?e.lowerValue===t.lowerValue?0:e.lowerValue<t.lowerValue?-1:1:n}function mn(e,t,n){let r=pn(n(e),n(t));return r===0?e===t?0:e<t?-1:1:r}function hn(e,t){return mn(e,t,dn)}function gn(e,t){return t===e.segments.length-1?+!!e.isDirectory:1}function _n(e,t){let n=Math.min(e.segments.length,t.segments.length);for(let r=0;r<n;r++){let n=e.segments[r],i=t.segments[r];if(n===i)continue;let a=gn(e,r);return a===gn(t,r)?hn(n,i):a===1?-1:1}return e.segments.length===t.segments.length?e.isDirectory===t.isDirectory?0:e.isDirectory?-1:1:e.segments.length<t.segments.length?-1:1}function vn(e,t){return _n(e,t)}function yn(e,t,n){let r=e=>{let t=n.get(e);if(t!=null)return t;let r=dn(e);return n.set(e,r),r},i=Math.min(e.segments.length,t.segments.length);for(let n=0;n<i;n++){let i=e.segments[n],a=t.segments[n];if(i===a)continue;let o=gn(e,n);return o===gn(t,n)?mn(i,a,r):o===1?-1:1}return e.segments.length===t.segments.length?e.isDirectory===t.isDirectory?0:e.isDirectory?-1:1:e.segments.length<t.segments.length?-1:1}function bn(e,t){let n=e.sortKeyById[t];if(n!==void 0)return n;let r=e.valueById[t],i=dn(r);return e.sortKeyById[t]=i,i}function xn(e={}){return{flattenEmptyDirectories:e.flattenEmptyDirectories!==!1,sort:e.sort??`default`}}function Sn(e){let t=e.length>0&&e.charCodeAt(e.length-1)===47,n=t?e.length-1:e.length,r=[],i=0;for(let t=0;t<n;t++)e.charCodeAt(t)===47&&(r.push(e.slice(i,t)),i=t+1);return r.push(e.slice(i,n)),{hasTrailingSlash:t,segments:r}}function Cn(e){let{hasTrailingSlash:t,segments:n}=Sn(e);return{basename:n[n.length-1]??``,isDirectory:t,path:e,segments:n}}function wn(e){if(e.length===0)return{requiresDirectory:!1,segments:[]};let{hasTrailingSlash:t,segments:n}=Sn(e);return{requiresDirectory:t,segments:n}}function Tn(){let e=new Map;return e.set(``,0),{idByValue:e,valueById:[``],sortKeyById:[dn(``)]}}function En(e,t){let n=e.idByValue.get(t);if(n!==void 0)return n;let r=e.valueById.length;return e.idByValue.set(t,r),e.valueById.push(t),r}function Dn(e,t){let n=e.valueById[t];if(n===void 0)throw Error(`Unknown segment ID: ${String(t)}`);return n}var On=Symbol(`pathStorePreparedInputKind`);function kn(e,t){return e[On]=t,e}function An(e){return{basename:e.basename,depth:e.segments.length,isDirectory:e.isDirectory,path:e.path,segments:e.segments}}function jn(e,t,n){return n==="default"?vn(e,t):n(An(e),An(t))}function Mn(){return{depthAndFlags:Qt(0,3,1),nameId:0,parentId:0,subtreeNodeCount:1,visibleSubtreeCount:1}}function Nn(e,t){let n=Math.min(e.length,t.length);for(let r=0;r<n;r++)if(e[r]!==t[r])return r;return n}function Pn(e){return e.isDirectory?e.segments.length:e.segments.length-1}function Fn(e){return Array.isArray(e)&&e.every(e=>typeof e==`object`&&!!e&&typeof e.path==`string`&&Array.isArray(e.segments)&&typeof e.basename==`string`&&typeof e.isDirectory==`boolean`)}function In(e){return Array.isArray(e)&&e.every(e=>typeof e==`string`)}function Ln(e,t={}){return Un(e,t).map(e=>e.path)}function Rn(e,t={}){let n=Un(e,t);return kn({paths:n.map(e=>e.path),preparedPaths:n},`prepared`)}function zn(e){let t=e.length,n=!1;for(let r=0;r<t;r+=1){let t=e[r];if(t.length>0&&t.charCodeAt(t.length-1)===47){n=!0;break}}return kn({paths:e,presortedPaths:e,presortedPathsContainDirectories:n},`presorted`)}function Bn(e){let t=e,n=t.preparedPaths;if(t[On]===`prepared`&&n!=null)return n;if(!Fn(n))throw Error(`preparedInput must come from PathStore.prepareInput()`);return n}function Vn(e){let t=e;return t[On]===`presorted`&&t.presortedPaths!=null||In(t.presortedPaths)?t.presortedPaths:null}function Hn(e){let t=e;return typeof t.presortedPathsContainDirectories==`boolean`?t.presortedPathsContainDirectories:null}function Un(e,t={}){let n=xn(t),r=sn(t);cn(r,`workload.inputFiles`,e.length);let i=V(r,`store.preparePathEntries.parse`,()=>e.map(e=>Cn(e)));return V(r,`store.preparePathEntries.sort`,()=>i.sort((e,t)=>jn(e,t,n.sort))),i}var Wn=class{directories=new Map;directoryStack=[0];presortedDirectoryNodeIds=[];initialExpandedPathSet;createdDirectoriesAllExpanded=!1;createdDirectoryCount=0;lastPreparedPath=null;nodes=[Mn()];options;instrumentation;segmentSortKeyCache=new Map;segmentTable=Tn();hasDeferredDirectoryIndexes=!1;constructor(e={}){this.instrumentation=sn(e),this.options=xn(e);let t=e.initialExpandedPaths??null;if(t==null||t.length===0)this.initialExpandedPathSet=null;else{let e=new Set,n=t.length;for(let r=0;r<n;r+=1){let n=t[r],i=n.length;e.add(i>0&&n.charCodeAt(i-1)===47?n.slice(0,i-1):n)}this.initialExpandedPathSet=e,this.createdDirectoriesAllExpanded=!0}this.directories.set(0,It())}appendPaths(e){return V(this.instrumentation,`store.builder.appendPaths.parse`,()=>this.appendPreparedPaths(e.map(e=>Cn(e))))}appendPreparedPaths(e,t=!0){return this.createdDirectoriesAllExpanded=!1,V(this.instrumentation,`store.builder.appendPreparedPaths`,()=>{for(let n of e)this.appendPreparedPath(n,t)}),this}appendPresortedPaths(e,t=null){return V(this.instrumentation,`store.builder.appendPresortedPaths`,()=>{if(t===!1){this.appendPresortedFilePaths(e);return}this.createdDirectoriesAllExpanded=!1;let n=null,r=0,i=this.nodes,a=this.segmentTable,o=a.idByValue,s=a.valueById,c=this.directoryStack,l=0,u=``,d=0;for(let t of e){if(n===t)throw Error(`Duplicate path: "${t}"`);let e=t.length>0&&t.charCodeAt(t.length-1)===47,a=e?t.length-1:t.length,f=0,p=0;if(n!=null)if(u.length>0&&t.length>u.length&&t.startsWith(u))f=d,p=u.length;else{let r=Math.min(a,n.length),i=!0;for(let e=0;e<r;e++){let r=t.charCodeAt(e);if(r!==n.charCodeAt(e)){i=!1;break}r===47&&(f++,p=e+1)}i&&e&&r===a&&n.length>a&&n.charCodeAt(a)===47&&(f++,p=a+1)}l=f,r=f;let m=p,h=t.indexOf(`/`,m);for(;h>=0&&h<a;){let e=c[l];if(e===void 0)throw Error(`Directory stack underflow while building the path store`);r++;let n=t.slice(m,h),a=o.get(n);a===void 0&&(a=s.length,o.set(n,a),s.push(n));let u=i.length;i.push({depthAndFlags:Qt(r,0,1),nameId:a,parentId:e,subtreeNodeCount:1,visibleSubtreeCount:1}),this.recordCreatedDirectoryPath(t.slice(0,h)),l++,c[l]=u,m=h+1,h=t.indexOf(`/`,m)}if(e){if(m<a){let e=c[l];if(e===void 0)throw Error(`Unable to resolve directory parent for "${t}"`);r++;let n=t.slice(m,a),u=o.get(n);u===void 0&&(u=s.length,o.set(n,u),s.push(n));let d=i.length;i.push({depthAndFlags:Qt(r,0,1),nameId:u,parentId:e,subtreeNodeCount:1,visibleSubtreeCount:1}),l++,c[l]=d}let e=c[l];if(e===void 0)throw Error(`Unable to resolve directory node for "${t}"`);this.promoteDirectoryToExplicit(e,t)}else{let e=c[l];if(e===void 0)throw Error(`Unable to resolve file parent for "${t}"`);let n=t.slice(m),a=o.get(n);a===void 0&&(a=s.length,o.set(n,a),s.push(n)),i.push({depthAndFlags:Qt(r+1,0),nameId:a,parentId:e,subtreeNodeCount:1,visibleSubtreeCount:1})}m!==u.length&&(u=t.substring(0,m),d=r),n=t}c.length=l+1,n!=null&&(this.lastPreparedPath=Cn(n)),this.hasDeferredDirectoryIndexes=!0}),this}appendPresortedFilePaths(e){let t=null,n=0,r=this.nodes,i=this.segmentTable,a=i.idByValue,o=i.valueById,s=this.directoryStack,c=0,l=``,u=0;for(let i of e){if(t===i)throw Error(`Duplicate path: "${i}"`);let e=i.length,d=0,f=0;if(t!=null)if(l.length>0&&i.length>l.length&&i.startsWith(l))d=u,f=l.length;else{let n=Math.min(e,t.length);for(let e=0;e<n;e++){let n=i.charCodeAt(e);if(n!==t.charCodeAt(e))break;n===47&&(d++,f=e+1)}}c=d,n=d;let p=f,m=i.indexOf(`/`,p);for(;m>=0;){let e=s[c];if(e===void 0)throw Error(`Directory stack underflow while building the path store`);n++;let t=i.slice(p,m),l=a.get(t);l===void 0&&(l=o.length,a.set(t,l),o.push(t));let u=r.length;r.push({depthAndFlags:Qt(n,0,1),nameId:l,parentId:e,subtreeNodeCount:1,visibleSubtreeCount:1}),this.recordCreatedDirectoryPath(i.slice(0,m)),this.presortedDirectoryNodeIds.push(u),c++,s[c]=u,p=m+1,m=i.indexOf(`/`,p)}let h=s[c];if(h===void 0)throw Error(`Unable to resolve file parent for "${i}"`);let g=i.slice(p),_=a.get(g);_===void 0&&(_=o.length,a.set(g,_),o.push(g)),r.push({depthAndFlags:Qt(n+1,0),nameId:_,parentId:h,subtreeNodeCount:1,visibleSubtreeCount:1}),p!==l.length&&(l=i.substring(0,p),u=n),t=i}s.length=c+1,t!=null&&(this.lastPreparedPath=Cn(t)),this.hasDeferredDirectoryIndexes=!0}finish(e={}){let t=e.skipSubtreeCountPass===!0;return this.hasDeferredDirectoryIndexes?(V(this.instrumentation,`store.builder.buildDirectoryIndexes`,()=>this.buildPresortedFinish(t)),this.hasDeferredDirectoryIndexes=!1):t||V(this.instrumentation,`store.builder.computeSubtreeCounts`,()=>this.computeSubtreeCounts(0)),{directories:this.directories,nodes:this.nodes,options:this.options,rootId:0,segmentTable:this.segmentTable,presortedDirectoryNodeIds:this.presortedDirectoryNodeIds.length>0?this.presortedDirectoryNodeIds:null}}didMatchAllInitialExpandedPaths(){return this.createdDirectoriesAllExpanded&&this.initialExpandedPathSet!=null&&this.createdDirectoryCount===this.initialExpandedPathSet.size}appendPreparedPath(e,t){if(this.hasDeferredDirectoryIndexes&&=(this.buildDirectoryIndexes(),!1),this.lastPreparedPath!=null){if(e.path===this.lastPreparedPath.path)throw Error(`Duplicate path: "${e.path}"`);if(t&&(this.options.sort==="default"?yn(this.lastPreparedPath,e,this.segmentSortKeyCache):jn(this.lastPreparedPath,e,this.options.sort))>0)throw Error(`Builder input must be sorted before appendPaths(): "${e.path}"`)}let n=this.lastPreparedPath,r=Pn(e),i=n==null?0:Pn(n),a=n==null?0:Nn(n.segments,e.segments),o=Math.min(a,r,i);this.directoryStack.length=o+1;for(let n=o;n<r;n++){let r=this.directoryStack[this.directoryStack.length-1];if(r===void 0)throw Error(`Directory stack underflow while building the path store`);let i=t?this.getOrCreateDirectoryChild(r,e.segments[n]):this.createDirectoryChild(r,e.segments[n]);this.directoryStack.push(i)}if(e.isDirectory){let t=this.directoryStack[this.directoryStack.length-1];if(t===void 0)throw Error(`Unable to resolve directory node for "${e.path}"`);this.promoteDirectoryToExplicit(t,e.path),this.lastPreparedPath=e;return}let s=this.directoryStack[this.directoryStack.length-1];if(s===void 0)throw Error(`Unable to resolve file parent for "${e.path}"`);t?this.createFileChild(s,e.basename,e.path):this.createFileChildUnchecked(s,e.basename),this.lastPreparedPath=e}recordCreatedDirectoryPath(e){!this.createdDirectoriesAllExpanded||this.initialExpandedPathSet==null||(this.createdDirectoryCount+=1,this.initialExpandedPathSet.has(e)||(this.createdDirectoriesAllExpanded=!1))}createFileChild(e,t,n){let r=En(this.segmentTable,t),i=this.getDirectoryIndex(e),a=i.childIdByNameId;if(a!=null&&a.get(r)!==void 0)throw Error(`Path collides with an existing entry: "${n}"`);let o=this.nodes[e];if(o===void 0)throw Error(`Unknown parent node ID: ${String(e)}`);let s=this.nodes.length;return this.nodes.push({depthAndFlags:Qt($t(o)+1,0),nameId:r,parentId:e,subtreeNodeCount:1,visibleSubtreeCount:1}),a?.set(r,s),Bt(i,s),s}createFileChildUnchecked(e,t){let n=En(this.segmentTable,t),r=this.getDirectoryIndex(e),i=this.nodes[e];if(i===void 0)throw Error(`Unknown parent node ID: ${String(e)}`);let a=this.nodes.length;return this.nodes.push({depthAndFlags:Qt($t(i)+1,0),nameId:n,parentId:e,subtreeNodeCount:1,visibleSubtreeCount:1}),r.childIdByNameId!=null&&r.childIdByNameId.set(n,a),Bt(r,a),a}getOrCreateDirectoryChild(e,t){let n=En(this.segmentTable,t),r=this.getDirectoryIndex(e);if(r.childIdByNameId!=null){let e=r.childIdByNameId.get(n);if(e!==void 0){let n=this.nodes[e];if(n!=null&&!z(n))throw Error(`Path collides with an existing file while creating directory "${t}"`);return e}}let i=this.nodes[e];if(i===void 0)throw Error(`Unknown parent node ID: ${String(e)}`);let a=this.nodes.length;return this.nodes.push({depthAndFlags:Qt($t(i)+1,0,1),nameId:n,parentId:e,subtreeNodeCount:1,visibleSubtreeCount:1}),r.childIdByNameId!=null&&r.childIdByNameId.set(n,a),Bt(r,a),this.directories.set(a,It()),a}createDirectoryChild(e,t){let n=En(this.segmentTable,t),r=this.getDirectoryIndex(e),i=this.nodes[e];if(i===void 0)throw Error(`Unknown parent node ID: ${String(e)}`);let a=this.nodes.length;return this.nodes.push({depthAndFlags:Qt($t(i)+1,0,1),nameId:n,parentId:e,subtreeNodeCount:1,visibleSubtreeCount:1}),r.childIdByNameId!=null&&r.childIdByNameId.set(n,a),Bt(r,a),this.directories.set(a,It()),a}promoteDirectoryToExplicit(e,t){let n=this.nodes[e];if(n===void 0)throw Error(`Unknown directory node ID: ${String(e)}`);if(!z(n))throw Error(`Path is not a directory: "${t}"`);if(B(n,1))throw Error(`Duplicate path: "${t}"`);nn(n,1)}getDirectoryIndex(e){let t=this.directories.get(e);if(t!==void 0)return t;throw Error(`Unknown directory child index for node ${String(e)}`)}buildPresortedFinish(e){let t=this.nodes,n=this.directories;n.set(0,Lt());let r=-1,i=null;for(let e=1;e<t.length;e++){let a=t[e];if(a==null)continue;if(z(a)){let t=Lt();n.set(e,t),r=e,i=t}let o;a.parentId===r?o=i:(o=n.get(a.parentId),r=a.parentId,i=o??null),o?.childIds.push(e)}if(!e)for(let e=t.length-1;e>=1;e--){let n=t[e];if(n==null)continue;let r=t[n.parentId];r!=null&&(r.subtreeNodeCount+=n.subtreeNodeCount,r.visibleSubtreeCount+=n.visibleSubtreeCount)}}buildDirectoryIndexes(){let e=this.nodes;for(let t=1;t<e.length;t++){let n=e[t];if(n==null)continue;z(n)&&this.directories.set(t,It());let r=this.directories.get(n.parentId);r!=null&&(r.childIdByNameId!=null&&r.childIdByNameId.set(n.nameId,t),Bt(r,t))}}computeSubtreeCounts(e){let t=this.nodes[e];if(t===void 0)throw Error(`Unknown node ID: ${String(e)}`);if(!z(t))return t.subtreeNodeCount=1,t.visibleSubtreeCount=1,1;let n=this.getDirectoryIndex(e),r=1;for(let e of n.childIds)r+=this.computeSubtreeCounts(e);return Ht(this.nodes,n),t.subtreeNodeCount=r,t.visibleSubtreeCount=r,r}};function Gn(e,t=`closed`,n=null){let r=qn(t);return{activeNodeCount:e.nodes.length-1,collapsedDirectoryIds:new Set,collapseNewDirectoriesByDefault:!1,defaultExpansion:r,directoriesOpenByDefault:r===`open`,hasCollapsedDirectoryOverrides:!1,directoryLoadInfoById:new Map,expandedDirectoryIds:new Set,instrumentation:n,listeners:new Map,pathCacheByNodeId:new Map([[e.rootId,{path:``,version:0}]]),pathCacheVersion:0,snapshot:e,transactionStack:[]}}function Kn(){return{affectedAncestorIds:new Set,affectedNodeIds:new Set,events:[]}}function qn(e){if(typeof e!=`number`)return e;if(!Number.isInteger(e)||e<0)throw Error(`initialExpansion must be "open", "closed", or a non-negative integer depth. Received: ${String(e)}`);return e}function Jn(e,t){return B(t,2)||e.defaultExpansion===`open`?!0:e.defaultExpansion===`closed`?!1:$t(t)<=e.defaultExpansion}function Yn(e,t,n=e.snapshot.nodes[t]){return n==null||!z(n)?!1:e.directoriesOpenByDefault&&!e.hasCollapsedDirectoryOverrides?!0:e.collapsedDirectoryIds.has(t)?!1:e.expandedDirectoryIds.has(t)?!0:Jn(e,n)}function Xn(e,t,n,r=e.snapshot.nodes[t]){if(r==null||!z(r))return;let i=Jn(e,r);if(n){if(i){e.collapsedDirectoryIds.delete(t),e.hasCollapsedDirectoryOverrides=e.collapsedDirectoryIds.size>0;return}e.expandedDirectoryIds.add(t);return}if(i){e.collapsedDirectoryIds.add(t),e.hasCollapsedDirectoryOverrides=!0;return}e.expandedDirectoryIds.delete(t)}function Zn(e,t){let n=e.directoryLoadInfoById.get(t);if(n!=null)return n;let r={activeAttemptId:null,errorMessage:null,nextAttemptId:1,state:`loaded`};return e.directoryLoadInfoById.set(t,r),r}function Qn(e,t){return e.directoryLoadInfoById.get(t)?.state??`loaded`}function $n(e,t){let n=Zn(e,t);if(n.state===`loading`&&n.activeAttemptId!=null)return{attemptId:n.activeAttemptId,nodeId:t,reused:!0};let r=n.nextAttemptId;return n.activeAttemptId=r,n.errorMessage=null,n.nextAttemptId+=1,n.state=`loading`,{attemptId:r,nodeId:t,reused:!1}}function er(e,t){let n=Zn(e,t);n.activeAttemptId=null,n.errorMessage=null,n.state=`unloaded`}function tr(e,t,n){let r=e.directoryLoadInfoById.get(t);return r==null||r.activeAttemptId!==n?!1:(r.activeAttemptId=null,r.errorMessage=null,r.state=`loaded`,!0)}function nr(e,t,n){return e.directoryLoadInfoById.get(t)?.activeAttemptId===n}function rr(e,t,n,r){let i=e.directoryLoadInfoById.get(t);return i==null||i.activeAttemptId!==n?!1:(i.activeAttemptId=null,i.errorMessage=r??null,i.state=`error`,!0)}function ir(e,t){e.directoryLoadInfoById.delete(t)}function ar(e,t,n){let r=n,i=e.listeners.get(t);return i==null?e.listeners.set(t,new Set([r])):i.add(r),()=>{let n=e.listeners.get(t);n!=null&&(n.delete(r),n.size===0&&e.listeners.delete(t))}}function or(e){return{affectedAncestorIds:e.affectedAncestorIds??[],affectedNodeIds:e.affectedNodeIds??[],canonicalChanged:!0,operation:`add`,path:e.path,projectionChanged:e.projectionChanged,visibleCountDelta:null}}function sr(e){return{affectedAncestorIds:e.affectedAncestorIds??[],affectedNodeIds:e.affectedNodeIds??[],canonicalChanged:!0,operation:`remove`,path:e.path,projectionChanged:e.projectionChanged,recursive:e.recursive,visibleCountDelta:null}}function cr(e){return{affectedAncestorIds:e.affectedAncestorIds??[],affectedNodeIds:e.affectedNodeIds??[],canonicalChanged:!0,from:e.from,operation:`move`,projectionChanged:e.projectionChanged,to:e.to,visibleCountDelta:null}}function lr(e){return{affectedAncestorIds:e.affectedAncestorIds??[],affectedNodeIds:e.affectedNodeIds??[],canonicalChanged:!1,operation:`expand`,path:e.path,projectionChanged:!0,visibleCountDelta:null}}function ur(e){return{affectedAncestorIds:e.affectedAncestorIds??[],affectedNodeIds:e.affectedNodeIds??[],canonicalChanged:!1,operation:`collapse`,path:e.path,projectionChanged:!0,visibleCountDelta:null}}function dr(e){return{affectedAncestorIds:e.affectedAncestorIds??[],affectedNodeIds:e.affectedNodeIds??[],canonicalChanged:!1,operation:`mark-directory-unloaded`,path:e.path,projectionChanged:e.projectionChanged,visibleCountDelta:null}}function fr(e){return{affectedAncestorIds:e.affectedAncestorIds??[],affectedNodeIds:e.affectedNodeIds??[],attemptId:e.attemptId,canonicalChanged:!1,operation:`begin-child-load`,path:e.path,projectionChanged:e.projectionChanged,reused:e.reused,visibleCountDelta:null}}function pr(e){return{affectedAncestorIds:e.affectedAncestorIds??[],affectedNodeIds:e.affectedNodeIds??[],attemptId:e.attemptId,canonicalChanged:e.childEvents.some(e=>e.canonicalChanged),childEvents:e.childEvents,operation:`apply-child-patch`,path:e.path,projectionChanged:e.projectionChanged,visibleCountDelta:null}}function mr(e){return{affectedAncestorIds:e.affectedAncestorIds??[],affectedNodeIds:e.affectedNodeIds??[],attemptId:e.attemptId,canonicalChanged:!1,operation:`complete-child-load`,path:e.path,projectionChanged:e.projectionChanged,stale:e.stale,visibleCountDelta:null}}function hr(e){return{affectedAncestorIds:e.affectedAncestorIds??[],affectedNodeIds:e.affectedNodeIds??[],attemptId:e.attemptId,canonicalChanged:!1,errorMessage:e.errorMessage,operation:`fail-child-load`,path:e.path,projectionChanged:e.projectionChanged,stale:e.stale,visibleCountDelta:null}}function gr(e){return{activeNodeCountAfter:e.activeNodeCountAfter,activeNodeCountBefore:e.activeNodeCountBefore,affectedAncestorIds:e.affectedAncestorIds??[],affectedNodeIds:e.affectedNodeIds??[],cachedPathEntryCountAfter:e.cachedPathEntryCountAfter,cachedPathEntryCountBefore:e.cachedPathEntryCountBefore,canonicalChanged:!1,idsPreserved:e.idsPreserved,loadInfoEntryCountAfter:e.loadInfoEntryCountAfter,loadInfoEntryCountBefore:e.loadInfoEntryCountBefore,mode:e.mode,operation:`cleanup`,projectionChanged:e.projectionChanged,reclaimedCachedPathEntryCount:e.reclaimedCachedPathEntryCount,reclaimedLoadInfoEntryCount:e.reclaimedLoadInfoEntryCount,reclaimedNodeSlotCount:e.reclaimedNodeSlotCount,reclaimedSegmentCount:e.reclaimedSegmentCount,segmentCountAfter:e.segmentCountAfter,segmentCountBefore:e.segmentCountBefore,totalNodeSlotCountAfter:e.totalNodeSlotCountAfter,totalNodeSlotCountBefore:e.totalNodeSlotCountBefore,visibleCountDelta:null}}function _r(e,t,n){return{...n,visibleCountDelta:Or(e)-t}}function vr(e,t){let n=Or(e),r=Kn();e.transactionStack.push(r);try{t()}catch(t){throw xr(e,r,!1),t}xr(e,r,!0,Or(e)-n)}function yr(e,t){let n=e.instrumentation;if(n==null){br(e,t);return}V(n,`store.events.record`,()=>br(e,t))}function br(e,t){let n=e.transactionStack[e.transactionStack.length-1]??null;if(n==null){Er(e,t);return}n.events.push(t),Tr(n,t)}function xr(e,t,n,r=null){if(e.transactionStack.pop()!==t)throw Error(`Transaction stack underflow`);if(!n)return;let i=e.transactionStack[e.transactionStack.length-1]??null;if(i!=null){let n=e.instrumentation;n==null?wr(i,t):V(n,`store.events.batch.merge`,()=>wr(i,t));return}let a=Sr(t,r),o=e.instrumentation;if(o==null){Er(e,a);return}V(o,`store.events.batch.commit`,()=>Er(e,a))}function Sr(e,t){return{affectedAncestorIds:[...e.affectedAncestorIds],affectedNodeIds:[...e.affectedNodeIds],canonicalChanged:e.events.some(e=>e.canonicalChanged),events:[...e.events],operation:`batch`,projectionChanged:e.events.some(e=>e.projectionChanged),visibleCountDelta:t}}function Cr(e,t){for(let n of t.affectedAncestorIds)e.affectedAncestorIds.add(n);for(let n of t.affectedNodeIds)e.affectedNodeIds.add(n)}function wr(e,t){for(let n of t.events)e.events.push(n);Cr(e,t)}function Tr(e,t){for(let n of t.affectedNodeIds)e.affectedNodeIds.add(n);for(let n of t.affectedAncestorIds)e.affectedAncestorIds.add(n)}function Er(e,t){let n=e.instrumentation;if(n==null){Dr(e,t);return}V(n,`store.events.emit`,()=>Dr(e,t))}function Dr(e,t){e.listeners.get(t.operation)?.forEach(e=>e(t)),e.listeners.get(`*`)?.forEach(e=>e(t))}function Or(e){return e.snapshot.nodes[e.snapshot.rootId]?.visibleSubtreeCount??0}function kr(e,t){if(e.snapshot.options.flattenEmptyDirectories!==!0)return null;let n=e.snapshot.nodes[t];if(n==null||!z(n)||B(n,2))return null;let r=e.snapshot.directories.get(t);if(r==null||r.childIds.length!==1)return null;let i=r.childIds[0];if(i==null)return null;let a=e.snapshot.nodes[i];return a==null||!z(a)?null:i}function Ar(e,t){let n=t;for(;;){let t=kr(e,n);if(t==null)return n;n=t}}function jr(e,t){let n=[t],r=t;for(;;){let t=kr(e,r);if(t==null)return n;n.push(t),r=t}}function Mr(e,t){let n=t==null?e.snapshot.rootId:Vr(e,t);return n==null?[]:Ur(e,n)}function Nr(e,t){let n=Cn(t),r=n.isDirectory?n.segments:n.segments.slice(0,-1),i=ii(e,ri(e,r)),{createdNodeIds:a,directoryId:o}=Wr(e,r),s=new Set(a),c=o;if(n.isDirectory){let n=W(e,o);if(B(n,1))throw Error(`Path already exists: "${t}"`);nn(n,1),e.pathCacheByNodeId.set(o,{path:t,version:e.pathCacheVersion}),s.add(o)}else c=Kr(e,o,n.basename),s.add(c);Rr(e,o);let l=ii(e,o);return or({affectedAncestorIds:Br(e,c),affectedNodeIds:[...s],path:t,projectionChanged:ai(i,l)})}function Pr(e,t,n){let r=Vr(e,t);if(r==null)throw Error(`Path does not exist: "${t}"`);let i=W(e,r);if(B(i,2))throw Error(`The root node cannot be removed`);if(z(i)&&U(e,r).childIds.length>0&&n.recursive!==!0)throw Error(`Cannot remove a non-empty directory without recursive: "${t}"`);let a=i.parentId,o=ii(e,a),s=ti(e,r);Yr(e,a,r,i.nameId),ni(e,a),Rr(e,a);let c=ii(e,a);return sr({affectedAncestorIds:Br(e,a),affectedNodeIds:s,path:t,projectionChanged:ai(o,c),recursive:n.recursive===!0})}function Fr(e,t,n,r){let i=Vr(e,t);if(i==null)throw Error(`Source path does not exist: "${t}"`);let a=W(e,i);if(B(a,2))throw Error(`The root node cannot be moved`);let o=r.collision??`error`,s=$r(e,i,n),c=ii(e,a.parentId),l=ii(e,s.parentId),u=Dn(e.snapshot.segmentTable,a.nameId),d=En(e.snapshot.segmentTable,s.basename);if(s.parentId===a.parentId&&u===s.basename)return null;if(z(a)&&li(e,i,s.parentId))throw Error(`Cannot move a directory into one of its descendants`);let f=Rt(e.snapshot.nodes,U(e,s.parentId)).get(d),p=s.existingNodeId??f??null;if(p!=null&&p!==i&&ei(e,p,o,en(a))===`skip`)return null;let m=a.parentId;Yr(e,m,i,a.nameId),a.parentId=s.parentId,a.nameId=d,e.pathCacheByNodeId.delete(i),ci(e,i),Jr(e,s.parentId,i),ni(e,m),e.pathCacheVersion++,Rr(e,m),s.parentId!==m&&Rr(e,s.parentId);let h=ii(e,m),g=ii(e,s.parentId);return cr({affectedAncestorIds:[...new Set([...Br(e,m),...Br(e,s.parentId)])],affectedNodeIds:[i],from:t,projectionChanged:oi([c,l],[h,g]),to:H(e,i)})}function Ir(e,t){let n=e.pathCacheByNodeId.get(t);return n!=null&&n.version===e.pathCacheVersion?n.path:null}function Lr(e,t,n){return e.pathCacheByNodeId.set(t,{path:n,version:e.pathCacheVersion}),n}function H(e,t){let n=W(e,t),r=Ir(e,t);if(r!=null)return r;if(B(n,2))return Lr(e,t,``);let i=H(e,n.parentId),a=Dn(e.snapshot.segmentTable,n.nameId),o=i.length===0?a:`${i}${a}`;return Lr(e,t,z(n)?`${o}/`:o)}function Rr(e,t){let n=e.instrumentation;if(n==null){di(e,t);return}V(n,`store.recomputeCountsUpwardFrom`,()=>di(e,t))}function zr(e,t){let n=[[t,0]],{nodes:r,directories:i}=e.snapshot;for(;n.length>0;){let t=n[n.length-1],a=t[0],o=r[a];if(o==null||!z(o)){ui(e,a,o,!0),n.pop();continue}let s=i.get(a);if(s==null||t[1]>=s.childIds.length){ui(e,a,o,!0),n.pop();continue}let c=s.childIds[t[1]++];n.push([c,0])}}function Br(e,t){let n=[],r=t;for(;r!=null;){let t=W(e,r);if(n.push(r),r===e.snapshot.rootId)break;r=t.parentId}return n}function Vr(e,t){if(t.length===0)return e.snapshot.rootId;let n=wn(t);return Hr(e,n.segments,n.requiresDirectory)}function Hr(e,t,n){let r=e.snapshot.rootId;for(let n of t){let t=e.snapshot.segmentTable.idByValue.get(n);if(t===void 0)return null;let i=U(e,r),a=Rt(e.snapshot.nodes,i).get(t);if(a===void 0)return null;r=a}let i=W(e,r);return n&&!z(i)?null:r}function U(e,t){let n=e.snapshot.directories.get(t);if(n===void 0)throw Error(`Unknown directory child index for node ${String(t)}`);return n}function W(e,t){let n=e.snapshot.nodes[t];if(n===void 0||B(n,4))throw Error(`Unknown node ID: ${String(t)}`);return n}function Ur(e,t){let n=e.snapshot.nodes[t];if(n===void 0||B(n,4))return[];if(!z(n))return[H(e,t)];if(U(e,t).childIds.length===0)return B(n,1)&&!B(n,2)?[H(e,t)]:[];let r=[],i=[{childIndex:0,nodeId:t}];for(;i.length>0;){let t=i[i.length-1];if(t==null)break;let n=e.snapshot.nodes[t.nodeId];if(n===void 0||B(n,4)){i.pop();continue}if(!z(n)){r.push(H(e,t.nodeId)),i.pop();continue}let a=U(e,t.nodeId);if(a.childIds.length===0){B(n,1)&&!B(n,2)&&r.push(H(e,t.nodeId)),i.pop();continue}let o=a.childIds[t.childIndex];if(o==null){i.pop();continue}t.childIndex++,i.push({childIndex:0,nodeId:o})}return r}function Wr(e,t){let n=[],r=e.snapshot.rootId;for(let i of t){let t=En(e.snapshot.segmentTable,i),a=U(e,r),o=Rt(e.snapshot.nodes,a).get(t);if(o!==void 0){if(!z(W(e,o)))throw Error(`Cannot create a directory that collides with an existing file: "${i}"`);r=o;continue}r=Gr(e,r,t),n.push(r)}return{createdNodeIds:n,directoryId:r}}function Gr(e,t,n){let r=W(e,t),i=e.snapshot.nodes.length;return e.snapshot.nodes.push({depthAndFlags:Qt($t(r)+1,0,1),nameId:n,parentId:t,subtreeNodeCount:1,visibleSubtreeCount:1}),e.snapshot.directories.set(i,It()),Jr(e,t,i),e.collapseNewDirectoriesByDefault&&(e.collapsedDirectoryIds.add(i),e.hasCollapsedDirectoryOverrides=!0),e.activeNodeCount++,i}function Kr(e,t,n){let r=En(e.snapshot.segmentTable,n),i=U(e,t);if(Rt(e.snapshot.nodes,i).has(r))throw Error(`Path already exists: "${pi(e,t,n)}"`);let a=W(e,t),o=e.snapshot.nodes.length;return e.snapshot.nodes.push({depthAndFlags:Qt($t(a)+1,0),nameId:r,parentId:t,subtreeNodeCount:1,visibleSubtreeCount:1}),Jr(e,t,o),e.activeNodeCount++,o}function qr(e,t,n){let r=0,i=t.childIds.length;for(;r<i;){let a=r+i>>>1,o=t.childIds[a];if(o==null){i=a;continue}Xr(e,n,o)<0?i=a:r=a+1}return r}function Jr(e,t,n){let r=U(e,t),i=W(e,n);Rt(e.snapshot.nodes,r).set(i.nameId,n),Ut(r,n,i.subtreeNodeCount,i.visibleSubtreeCount);let a=qr(e,r,n);r.childIds.splice(a,0,n),Vt(r,a),Kt(e.snapshot.nodes,r)}function Yr(e,t,n,r){let i=U(e,t),a=zt(i),o=a.get(n)??-1;Rt(e.snapshot.nodes,i).delete(r),a.delete(n);let s=e.snapshot.nodes[n];s!=null&&Ut(i,n,-s.subtreeNodeCount,-s.visibleSubtreeCount),o>=0&&(i.childIds.splice(o,1),Vt(i,o),Kt(e.snapshot.nodes,i))}function Xr(e,t,n){let r=e.snapshot.options.sort;return r==="default"?Zr(e,t,n):r(Qr(e,t),Qr(e,n))}function Zr(e,t,n){let r=W(e,t),i=W(e,n),a=z(r);if(a!==z(i))return a?-1:1;let o=pn(bn(e.snapshot.segmentTable,r.nameId),bn(e.snapshot.segmentTable,i.nameId));if(o!==0)return o;let s=Dn(e.snapshot.segmentTable,r.nameId),c=Dn(e.snapshot.segmentTable,i.nameId);return s===c?t<n?-1:1:s<c?-1:1}function Qr(e,t){let n=W(e,t),r=H(e,t),i=z(n),a=i?r.slice(0,-1):r;return{basename:Dn(e.snapshot.segmentTable,n.nameId),depth:$t(n),isDirectory:i,path:r,segments:a.length===0?[]:a.split(`/`)}}function $r(e,t,n){let r=W(e,t),i=Vr(e,n);if(i!=null){let t=W(e,i);if(z(t))return{basename:Dn(e.snapshot.segmentTable,r.nameId),existingNodeId:null,parentId:i};let a=wn(n).segments;return{basename:a[a.length-1]??``,existingNodeId:i,parentId:t.parentId}}let a=wn(n),o=a.segments[a.segments.length-1]??``,s=a.segments.slice(0,-1),c=s.length===0?e.snapshot.rootId:Hr(e,s,!0);if(c==null)throw Error(`Destination parent does not exist: "${n}"`);return{basename:o,existingNodeId:null,parentId:c}}function ei(e,t,n,r){if(n===`skip`)return`skip`;if(n===`error`)throw Error(`Destination already exists: "${H(e,t)}"`);let i=W(e,t);if(en(i)!==r)throw Error(`replace collision requires the same source and destination kinds`);if(z(i)&&U(e,t).childIds.length>0)throw Error(`replace collision does not support non-empty directories`);let a=i.parentId,o=i.nameId;return ti(e,t),Yr(e,a,t,o),ni(e,a),Rr(e,a),`handled`}function ti(e,t){let n=[],r=[{nodeId:t,visitedChildren:!1}];for(;r.length>0;){let t=r.pop();if(t==null)break;let i=W(e,t.nodeId);if(t.visitedChildren||!z(i)){z(i)&&e.snapshot.directories.delete(t.nodeId),nn(i,4),e.pathCacheByNodeId.delete(t.nodeId),e.collapsedDirectoryIds.delete(t.nodeId)&&(e.hasCollapsedDirectoryOverrides=e.collapsedDirectoryIds.size>0),e.expandedDirectoryIds.delete(t.nodeId),ir(e,t.nodeId),e.activeNodeCount--,n.push(t.nodeId);continue}r.push({nodeId:t.nodeId,visitedChildren:!0});let a=U(e,t.nodeId);for(let e=a.childIds.length-1;e>=0;e--){let t=a.childIds[e];t!=null&&r.push({nodeId:t,visitedChildren:!1})}}return n}function ni(e,t){let n=t;for(;n!=null;){let t=W(e,n);if(!z(t)||B(t,2)||U(e,n).childIds.length>0)return;nn(t,1),n=t.parentId===n?null:t.parentId}}function ri(e,t){let n=e.snapshot.rootId;for(let r of t){let t=e.snapshot.segmentTable.idByValue.get(r);if(t==null)break;let i=Rt(e.snapshot.nodes,U(e,n)).get(t);if(i==null||!z(W(e,i)))break;n=i}return n}function ii(e,t){let n=si(e,t);if(n==null)return null;let r=Ar(e,n),i=W(e,r),a=n===r?null:jr(e,n).map(t=>H(e,t));return JSON.stringify({flattenedSegmentPaths:a,hasChildren:U(e,r).childIds.length>0,path:H(e,r),terminalKind:en(i)})}function ai(e,t){return oi([e],[t])}function oi(e,t){for(let n=0;n<e.length;n+=1){let r=e[n],i=t[n];if(r==null||i==null||r!==i)return!0}return!1}function si(e,t){let n=t;for(;n!=null;){let t=W(e,n);if(!z(t)||B(t,2))return null;if(!Yn(e,n,t))return n;n=t.parentId}return null}function ci(e,t){let n=W(e,t);if(rn(n,(t===e.snapshot.rootId?-1:$t(W(e,n.parentId)))+1),!z(n))return;let r=U(e,t);for(let t of r.childIds)ci(e,t)}function li(e,t,n){let r=n;for(;r!=null;){if(r===t)return!0;let n=W(e,r);if(r===e.snapshot.rootId)return!1;r=n.parentId}return!1}function ui(e,t,n=W(e,t),r=!1){let i=e.instrumentation;if(i==null){fi(e,t,n,r);return}V(i,`store.recomputeNodeCounts`,()=>fi(e,t,n,r))}function di(e,t){let n=t;for(;n!=null;){let t=W(e,n),r=t.subtreeNodeCount,i=t.visibleSubtreeCount;if(ui(e,n,t),n===e.snapshot.rootId)return;let a=t.subtreeNodeCount-r,o=t.visibleSubtreeCount-i,s=t.parentId;(a!==0||o!==0)&&Ut(U(e,s),n,a,o),n=s}}function fi(e,t,n,r){if(!z(n)){n.subtreeNodeCount=1,n.visibleSubtreeCount=1;return}let i=U(e,t);if(r){let t=e.instrumentation;t==null?Ht(e.snapshot.nodes,i):V(t,`store.recomputeNodeCounts.rebuildChildAggregates`,()=>Ht(e.snapshot.nodes,i))}let a=1+i.totalChildSubtreeNodeCount,o=i.totalChildVisibleSubtreeCount;if(n.subtreeNodeCount=a,B(n,2)){n.visibleSubtreeCount=o;return}n.visibleSubtreeCount=kr(e,t)==null?Yn(e,t,n)?1+o:1:o}function pi(e,t,n){let r=H(e,t);return r.length===0?n:`${r}${n}`}function mi(e){return e!=null&&!B(e,4)}function hi(e,t){let n=e.snapshot.nodes[t];return!mi(n)||!z(n)||B(n,2)?null:n}function gi(e){let t=0;for(let[n,r]of e.pathCacheByNodeId)r.version===e.pathCacheVersion&&mi(e.snapshot.nodes[n])&&(t+=1);return t}function _i(e){return Math.max(0,e.valueById.length-1)}function vi(e){return{activeNodeCount:e.activeNodeCount,cachedPathEntryCount:gi(e),loadInfoEntryCount:e.directoryLoadInfoById.size,segmentCount:_i(e.snapshot.segmentTable),totalNodeSlotCount:Math.max(0,e.snapshot.nodes.length-1)}}function yi(e,t,n,r){return{activeNodeCountAfter:r.activeNodeCount,activeNodeCountBefore:n.activeNodeCount,cachedPathEntryCountAfter:r.cachedPathEntryCount,cachedPathEntryCountBefore:n.cachedPathEntryCount,idsPreserved:t,loadInfoEntryCountAfter:r.loadInfoEntryCount,loadInfoEntryCountBefore:n.loadInfoEntryCount,mode:e,reclaimedCachedPathEntryCount:n.cachedPathEntryCount-r.cachedPathEntryCount,reclaimedLoadInfoEntryCount:n.loadInfoEntryCount-r.loadInfoEntryCount,reclaimedNodeSlotCount:n.totalNodeSlotCount-r.totalNodeSlotCount,reclaimedSegmentCount:n.segmentCount-r.segmentCount,segmentCountAfter:r.segmentCount,segmentCountBefore:n.segmentCount,totalNodeSlotCountAfter:r.totalNodeSlotCount,totalNodeSlotCountBefore:n.totalNodeSlotCount}}function bi(e){let t=[],n=[];for(let n of e.collapsedDirectoryIds)hi(e,n)!=null&&t.push(H(e,n));for(let t of e.expandedDirectoryIds)hi(e,t)!=null&&n.push(H(e,t));return{collapsedPaths:t,expandedPaths:n}}function xi(e){let t=[];for(let[n,r]of e.directoryLoadInfoById)hi(e,n)==null||Qn(e,n)===`loaded`||t.push({info:{activeAttemptId:null,errorMessage:r.errorMessage,nextAttemptId:r.nextAttemptId,state:r.state},path:H(e,n)});return t}function Si(e,t){e.collapsedDirectoryIds.clear(),e.hasCollapsedDirectoryOverrides=!1,e.expandedDirectoryIds.clear();for(let n of t.expandedPaths){let t=Vr(e,n);t!=null&&Xn(e,t,!0,W(e,t))}for(let n of t.collapsedPaths){let t=Vr(e,n);t!=null&&Xn(e,t,!1,W(e,t))}}function Ci(e,t){e.directoryLoadInfoById.clear();for(let n of t){let t=Vr(e,n.path);t!=null&&hi(e,t)!=null&&e.directoryLoadInfoById.set(t,{activeAttemptId:null,errorMessage:n.info.errorMessage,nextAttemptId:n.info.nextAttemptId,state:n.info.state})}}function wi(e){e.pathCacheVersion+=1,e.pathCacheByNodeId.clear(),e.pathCacheByNodeId.set(e.snapshot.rootId,{path:``,version:e.pathCacheVersion})}function Ti(e){let t=e.snapshot.segmentTable,n=Tn();for(let r of e.snapshot.nodes)if(mi(r)){if(B(r,2)){r.nameId=0;continue}r.nameId=En(n,Dn(t,r.nameId))}e.snapshot.segmentTable=n}function Ei(e){for(let[t,n]of e.snapshot.directories){let r=e.snapshot.nodes[t];if(!mi(r)||!z(r)){e.snapshot.directories.delete(t);continue}let i=n.childIds.filter(n=>{let r=e.snapshot.nodes[n];return mi(r)&&r.parentId===t});n.childIds=i,n.childIdByNameId=new Map(i.map(t=>[W(e,t).nameId,t])),n.childPositionById=new Map(i.map((e,t)=>[e,t])),Ht(e.snapshot.nodes,n)}}function Di(e){let t=e.snapshot.nodes.length-1;for(;t>e.snapshot.rootId;){let n=e.snapshot.nodes[t];if(mi(n))break;--t}e.snapshot.nodes.length=t+1}function Oi(e){let t=bi(e),n=xi(e);V(e.instrumentation,`store.cleanup.stable.clearPathCaches`,()=>wi(e)),V(e.instrumentation,`store.cleanup.stable.rebuildSegmentTable`,()=>Ti(e)),V(e.instrumentation,`store.cleanup.stable.rebuildDirectoryIndexes`,()=>Ei(e)),V(e.instrumentation,`store.cleanup.stable.trimTrailingRemovedNodeSlots`,()=>Di(e)),V(e.instrumentation,`store.cleanup.stable.restoreExpansionOverrides`,()=>Si(e,t)),V(e.instrumentation,`store.cleanup.stable.restoreDirectoryLoadInfos`,()=>Ci(e,n)),V(e.instrumentation,`store.cleanup.stable.recomputeCounts`,()=>zr(e,e.snapshot.rootId))}function ki(e){let t=bi(e),n=xi(e),r=V(e.instrumentation,`store.cleanup.aggressive.listPaths`,()=>Mr(e)),i=on({...e.snapshot.options},e.instrumentation),a=V(e.instrumentation,`store.cleanup.aggressive.rebuildSnapshot`,()=>{let e=new Wn(i);return e.appendPaths(r),e.finish()});e.snapshot=a,e.activeNodeCount=a.nodes.length-1,e.pathCacheByNodeId=new Map([[a.rootId,{path:``,version:0}]]),e.pathCacheVersion=0,V(e.instrumentation,`store.cleanup.aggressive.restoreExpansionOverrides`,()=>Si(e,t)),V(e.instrumentation,`store.cleanup.aggressive.restoreDirectoryLoadInfos`,()=>Ci(e,n)),V(e.instrumentation,`store.cleanup.aggressive.recomputeCounts`,()=>zr(e,e.snapshot.rootId))}function Ai(e){for(let t of e.directoryLoadInfoById.values())if(t.state===`loading`&&t.activeAttemptId!=null)return!0;return!1}function ji(e,t){let n=vi(e);t===`stable`?V(e.instrumentation,`store.cleanup.stable`,()=>Oi(e)):V(e.instrumentation,`store.cleanup.aggressive`,()=>ki(e));let r=vi(e);return yi(t,t===`stable`,n,r)}var Mi=64;function Ni(e,t){let n=t+2;if(n<=e.length)return e;let r=e.length;for(;r<n;)r*=2;let i=new Int32Array(r);return i.fill(-1),i.set(e),i}function Pi(e){return W(e,e.snapshot.rootId).visibleSubtreeCount}function Fi(e,t,n,r){let i=W(e,t.terminalNodeId),a=Math.max(1,i.visibleSubtreeCount);return Math.min(r-1,n+a-1)}function Ii(e,t,n,r){return{ancestorPaths:r,index:t.index,posInSet:t.posInSet,row:ta(e,t.cursor),setSize:t.setSize,subtreeEndIndex:Fi(e,t.cursor,t.index,n)}}function Li(e,t,n,r,i,a){let o=U(e,t),{childIndex:s,childVisibleIndex:c,localVisibleIndex:l}=Wt(e.snapshot.nodes,o,n),u=o.childIds[s];if(u==null)throw Error(`Visible index ${String(n)} is out of range`);return Ri(e,u,l,r+c,i+1,s,o.childIds.length,a)}function Ri(e,t,n,r,i,a,o,s){if(!z(W(e,t))){if(n===0)return{ancestors:s,cursor:{headNodeId:t,terminalNodeId:t,visibleDepth:i},index:r,posInSet:a,setSize:o};throw Error(`Visible index ${String(n)} is out of range for file`)}let c=Yi(e,t,i);if(n===0)return{ancestors:s,cursor:c,index:r,posInSet:a,setSize:o};let l=W(e,c.terminalNodeId);if(!z(l)||!Yn(e,c.terminalNodeId,l))throw Error(`Visible index ${String(n)} is out of range for collapsed directory`);return Li(e,c.terminalNodeId,n-1,r+1,c.visibleDepth,[...s,{cursor:c,index:r,posInSet:a,setSize:o}])}function zi(e,t){let n=Pi(e);if(t<0||t>=n)return null;let r=Li(e,e.snapshot.rootId,t,0,-1,[]),i=r.ancestors.map(t=>H(e,t.cursor.terminalNodeId)),a=null;return{ancestorPaths:i,get ancestorRows(){if(a!=null)return a;let t=[],i=[];for(let a of r.ancestors){let r=Ii(e,a,n,[...i]);t.push(r),i.push(r.row.path)}return a=t,a},index:r.index,posInSet:r.posInSet,row:ta(e,r.cursor),setSize:r.setSize,subtreeEndIndex:Fi(e,r.cursor,r.index,n)}}function Bi(e,t,n){let r=e.instrumentation,i=Pi(e);if(i<=0||n<t)return[];let a=Math.max(0,Math.min(t,i-1)),o=Math.max(a,Math.min(n,i-1));if(r==null){if(a===0)return ea(e,o+1);let t=[],n=Ki(e,a);for(let r=a;r<=o&&n!=null;r++){let r=ta(e,n);t.push(r),n=Zi(e,n)}return t}let s=[],c=0,l=0,u=V(r,`store.getVisibleSlice.selectFirstRow`,()=>Ki(e,a));for(let t=a;t<=o&&u!=null;t++){let t=V(r,`store.getVisibleSlice.materializeRow`,()=>ta(e,u));s.push(t),t.isFlattened&&(c++,l+=t.flattenedSegments?.length??0),u=V(r,`store.getVisibleSlice.advanceCursor`,()=>Zi(e,u))}return cn(r,`workload.visibleRowsRead`,s.length),cn(r,`workload.flattenedRowsRead`,c),cn(r,`workload.flattenedSegmentsRead`,l),s}function Vi(e,t=Pi(e)){let n=e.instrumentation;return n==null?$i(e,t):V(n,`store.getVisibleTreeProjection`,()=>$i(e,t))}function Hi(e){return Qi(Vi(e))}function Ui(e,t){let n=Vr(e,t);if(n==null||n===e.snapshot.rootId||z(W(e,n))&&Ar(e,n)!==n)return null;let r=0,i=n,{nodes:a,rootId:o}=e.snapshot;for(;i!==o;){let t=W(e,i).parentId,n=U(e,t),s=zt(n).get(i);if(s==null)throw Error(`Child ${String(i)} was not found in its parent index`);if(r+=Gt(a,n,s),t!==o){let n=W(e,t),a=kr(e,t);if(!Yn(e,t,n)&&a!==i)return null;Ar(e,t)===t&&(r+=1)}i=t}return r}function Wi(e,t){let n=Vr(e,t);if(n==null)throw Error(`Path does not exist: "${t}"`);let r=W(e,n);if(!z(r))throw Error(`Path is not a directory: "${t}"`);return Yn(e,n,r)?null:(Xn(e,n,!0,r),Rr(e,n),lr({affectedAncestorIds:Br(e,n),affectedNodeIds:[n],path:t,projectionChanged:!0}))}function Gi(e,t){let n=Vr(e,t);if(n==null)throw Error(`Path does not exist: "${t}"`);let r=W(e,n);if(!z(r))throw Error(`Path is not a directory: "${t}"`);return Yn(e,n,r)?(Xn(e,n,!1,r),Rr(e,n),ur({affectedAncestorIds:Br(e,n),affectedNodeIds:[n],path:t,projectionChanged:!0})):null}function Ki(e,t){return t<0||t>=Pi(e)?null:qi(e,e.snapshot.rootId,t,-1)}function qi(e,t,n,r){let i=U(e,t),a=e.instrumentation,{childIndex:o,localVisibleIndex:s}=a==null?Wt(e.snapshot.nodes,i,n):V(a,`store.getVisibleSlice.selectChildIndex`,()=>Wt(e.snapshot.nodes,i,n)),c=i.childIds[o];if(c!=null)return Ji(e,c,s,r+1);throw Error(`Visible index ${String(n)} is out of range`)}function Ji(e,t,n,r){if(!z(W(e,t))){if(n===0)return{headNodeId:t,terminalNodeId:t,visibleDepth:r};throw Error(`Visible index ${String(n)} is out of range for file`)}let i=Yi(e,t,r);if(n===0)return i;let a=W(e,i.terminalNodeId);if(!z(a)||!Yn(e,i.terminalNodeId,a))throw Error(`Visible index ${String(n)} is out of range for collapsed directory`);return qi(e,i.terminalNodeId,n-1,i.visibleDepth)}function Yi(e,t,n){return z(W(e,t))?e.instrumentation==null?{headNodeId:t,terminalNodeId:Ar(e,t),visibleDepth:n}:{headNodeId:t,terminalNodeId:V(e.instrumentation,`store.getVisibleSlice.flatten.resolveTerminalDirectory`,()=>Ar(e,t)),visibleDepth:n}:{headNodeId:t,terminalNodeId:t,visibleDepth:n}}function Xi(e,t){let n=W(e,t);if(!z(n))return!0;let r=n.parentId;return r===e.snapshot.rootId?!0:kr(e,r)!==t}function Zi(e,t){let n=W(e,t.terminalNodeId);if(z(n)){let r=U(e,t.terminalNodeId);if(Yn(e,t.terminalNodeId,n)&&r.childIds.length>0){let n=r.childIds[0];return n==null?null:Ji(e,n,0,t.visibleDepth+1)}}let r=t.terminalNodeId,i=t.visibleDepth;for(;;){let t=W(e,r);if(r===e.snapshot.rootId)return null;let n=t.parentId,a=U(e,n),o=zt(a).get(r)??-1;if(o<0)throw Error(`Child ${String(r)} was not found in its parent index`);let s=a.childIds[o+1]??null;if(s!=null)return Ji(e,s,0,i);Xi(e,r)&&i--,r=n}}function Qi(e){let t=e.paths.length,n=Array(t);for(let r=0;r<t;r+=1){let t=e.getParentIndex(r);n[r]={index:r,parentPath:t>=0?e.paths[t]??null:null,path:e.paths[r]??``,posInSet:e.posInSetByIndex[r]??0,setSize:e.setSizeByIndex[r]??0}}return{getParentIndex:e.getParentIndex,rows:n,get visibleIndexByPath(){return e.visibleIndexByPath}}}function $i(e,t){let n=Array(t),r=new Int32Array(t),i=new Int32Array(t),a=new Int32Array(t),o=new Int32Array(Mi);o.fill(-1);let s=0,{nodes:c,directories:l,segmentTable:u}=e.snapshot,d=[[l.get(e.snapshot.rootId),0,-1,``]],f=e.snapshot.options.flattenEmptyDirectories,p=e.pathCacheByNodeId,m=e.pathCacheVersion,h=u.valueById;for(;d.length>0&&s<t;){let t=d[d.length-1],u=t[0];if(t[1]>=u.childIds.length){d.pop();continue}let g=t[1],_=u.childIds[t[1]++],v=c[_],y=t[2]+1,b=t[3];o=Ni(o,y);let x,S=_;if(z(v))S=f?Ar(e,_):_,x=S===_?`${b}${h[v.nameId]}/`:H(e,S);else{let e=p.get(_);x=e!=null&&e.version===m?e.path:`${b}${h[v.nameId]}`}r[s]=o[y],n[s]=x,i[s]=g,a[s]=u.childIds.length,o[y+1]=s,s+=1;let C=c[S];C!=null&&z(C)&&Yn(e,S,C)&&d.push([l.get(S),0,y,x])}s<t&&(n.length=s);let g=r.subarray(0,s),_=i.subarray(0,s),v=a.subarray(0,s),y=null;return{getParentIndex(e){return e<0||e>=s?-1:g[e]??-1},paths:n,posInSetByIndex:_,setSizeByIndex:v,get visibleIndexByPath(){if(y==null){y=new Map;for(let e=0;e<s;e+=1)y.set(n[e]??``,e)}return y}}}function ea(e,t){let n=Array(t),r=0,{nodes:i,directories:a,segmentTable:o}=e.snapshot,s=[[a.get(e.snapshot.rootId),0,-1]],c=o.valueById,l=e.snapshot.options.flattenEmptyDirectories,u=e.pathCacheByNodeId,d=e.pathCacheVersion;for(;s.length>0&&r<t;){let t=s[s.length-1],o=t[0];if(t[1]>=o.childIds.length){s.pop();continue}let f=o.childIds[t[1]++],p=i[f],m=t[2]+1;if(!z(p)){let t=u.get(f);n[r++]={depth:m,flattenedSegments:void 0,hasChildren:!1,id:f,isExpanded:!1,isFlattened:!1,isLoading:!1,kind:`file`,loadState:void 0,name:c[p.nameId],path:t!=null&&t.version===d?t.path:H(e,f)};continue}let h=l?Ar(e,f):f,g={headNodeId:f,terminalNodeId:h,visibleDepth:m};n[r++]=ta(e,g);let _=i[h];_!=null&&z(_)&&Yn(e,h,_)&&s.push([a.get(h),0,m])}return r<t&&(n.length=r),n}function ta(e,t){let n=W(e,t.terminalNodeId),r=z(n)?na(e,t):null,i=H(e,t.terminalNodeId),a=Dn(e.snapshot.segmentTable,n.nameId),o=z(n)&&U(e,t.terminalNodeId).childIds.length>0,s=t.headNodeId!==t.terminalNodeId,c=e.instrumentation,l=s?c==null?jr(e,t.headNodeId).map(n=>{let r=W(e,n);return{isTerminal:n===t.terminalNodeId,name:Dn(e.snapshot.segmentTable,r.nameId),nodeId:n,path:H(e,n)}}):V(c,`store.getVisibleSlice.flatten.collectSegments`,()=>jr(e,t.headNodeId).map(n=>{let r=W(e,n);return{isTerminal:n===t.terminalNodeId,name:Dn(e.snapshot.segmentTable,r.nameId),nodeId:n,path:H(e,n)}})):void 0;return{depth:t.visibleDepth,flattenedSegments:l,hasChildren:o,id:t.terminalNodeId,isExpanded:z(n)&&Yn(e,t.terminalNodeId,n),isFlattened:s,isLoading:r===`loading`,kind:z(n)?`directory`:`file`,loadState:r==null||r===`loaded`?void 0:r,name:a,path:i}}function na(e,t){if(t.headNodeId===t.terminalNodeId)return Qn(e,t.terminalNodeId);let n=jr(e,t.headNodeId),r=!1,i=!1;for(let t of n){let n=Qn(e,t);if(n===`loading`)return`loading`;if(n===`error`){i=!0;continue}n===`unloaded`&&(r=!0)}return i?`error`:r?`unloaded`:`loaded`}function ra(e){let{directories:t,nodes:n,options:r,rootId:i,presortedDirectoryNodeIds:a}=e.snapshot,o=r.flattenEmptyDirectories===!0,s=e=>{let r=n[e];if(r==null||!z(r))return;let i=t.get(e);if(i==null)throw Error(`Unknown directory child index for node ${String(e)}`);let a=i.childIds,s=a.length,c=0,l=0;for(let e=0;e<s;e++){let t=a[e];if(t==null)continue;let r=n[t];c+=r.subtreeNodeCount,l+=r.visibleSubtreeCount}i.totalChildSubtreeNodeCount=c,i.totalChildVisibleSubtreeCount=l,s>=128&&Kt(n,i),r.subtreeNodeCount=1+c;let u;if(o&&s===1){let e=n[a[0]];u=e!=null&&z(e)?l:1+l}else u=1+l;r.visibleSubtreeCount=u};if(a!=null)for(let e=a.length-1;e>=0;e--)s(a[e]);else for(let e=n.length-1;e>=1;e--)s(e);let c=n[i],l=t.get(i);if(c==null||l==null)return;let u=l.childIds,d=0,f=0;for(let e=0;e<u.length;e++){let t=u[e];if(t==null)continue;let r=n[t];d+=r.subtreeNodeCount,f+=r.visibleSubtreeCount}l.totalChildSubtreeNodeCount=d,l.totalChildVisibleSubtreeCount=f,Kt(n,l),c.subtreeNodeCount=1+d,c.visibleSubtreeCount=f}function ia(e){return e.initialExpansion===`open`&&(e.initialExpandedPaths==null||e.initialExpandedPaths.length===0)}var aa=class e{#e;constructor(e={}){let t=sn(e),n=V(t,`store.builder.create`,()=>new Wn(e));if(e.preparedInput!=null){let t=Vn(e.preparedInput);t==null?n.appendPreparedPaths(Bn(e.preparedInput),!1):n.appendPresortedPaths(t,Hn(e.preparedInput))}else{let r=e.paths??[];e.presorted===!0?n.appendPaths(r):n.appendPreparedPaths(V(t,`store.preparePathEntries`,()=>Un(r,e)))}let r=V(t,`store.builder.finish`,()=>n.finish({skipSubtreeCountPass:!0})),i=V(t,`store.state.detectAllDirectoriesExpanded`,()=>(e.initialExpansion??`closed`)===`closed`&&n.didMatchAllInitialExpandedPaths());this.#e=V(t,`store.state.create`,()=>Gn(r,i?`open`:e.initialExpansion??`closed`,t)),i&&(this.#e.collapseNewDirectoriesByDefault=!0);let a=i?this.#e.snapshot.directories.size-1:V(t,`store.state.initializeExpandedPaths`,()=>this.initializeExpandedPaths(e.initialExpandedPaths));i||ia(e)||(e.initialExpansion??`closed`)===`closed`&&a===this.#e.snapshot.directories.size-1||(e.initialExpandedPaths?.length??0)>0&&V(t,`store.state.checkAllDirectoriesExpanded`,()=>this.hasAllDirectoriesExpanded())?V(t,`store.state.initializeOpenVisibleCounts`,()=>ra(this.#e)):V(t,`store.state.recomputeCounts`,()=>zr(this.#e,this.#e.snapshot.rootId))}static preparePaths(e,t={}){return Ln(e,t)}static prepareInput(e,t={}){return Rn(e,t)}static preparePresortedInput(e){return zn(e)}list(e){return V(this.#e.instrumentation,`store.list`,()=>Mr(this.#e,e))}add(e){V(this.#e.instrumentation,`store.add`,()=>{let t=Pi(this.#e);yr(this.#e,_r(this.#e,t,Nr(this.#e,e)))})}remove(e,t={}){V(this.#e.instrumentation,`store.remove`,()=>{let n=Pi(this.#e);yr(this.#e,_r(this.#e,n,Pr(this.#e,e,t)))})}move(e,t,n={}){V(this.#e.instrumentation,`store.move`,()=>{let r=Pi(this.#e),i=Fr(this.#e,e,t,n);i!=null&&yr(this.#e,_r(this.#e,r,i))})}batch(e){vr(this.#e,()=>{if(typeof e==`function`){e(this);return}for(let t of e)switch(t.type){case`add`:this.add(t.path);break;case`remove`:this.remove(t.path,{recursive:t.recursive});break;case`move`:this.move(t.from,t.to,{collision:t.collision});break}})}getVisibleCount(){return V(this.#e.instrumentation,`store.getVisibleCount`,()=>Pi(this.#e))}getVisibleSlice(e,t){return V(this.#e.instrumentation,`store.getVisibleSlice`,()=>Bi(this.#e,e,t))}getVisibleRowContext(e){return V(this.#e.instrumentation,`store.getVisibleRowContext`,()=>zi(this.#e,e))}getVisibleTreeProjection(){return Hi(this.#e)}getVisibleTreeProjectionData(e){return Vi(this.#e,e)}getVisibleIndex(e){return V(this.#e.instrumentation,`store.getVisibleIndex`,()=>Ui(this.#e,e))}getPathInfo(e){return V(this.#e.instrumentation,`store.getPathInfo`,()=>{let t=Vr(this.#e,e);if(t==null)return null;let n=W(this.#e,t);return{depth:$t(n),kind:z(n)?`directory`:`file`,path:H(this.#e,t)}})}isExpanded(e){return V(this.#e.instrumentation,`store.isExpanded`,()=>{let t=this.requireDirectoryNodeId(e),n=W(this.#e,t);return Yn(this.#e,t,n)})}expand(e){V(this.#e.instrumentation,`store.expand`,()=>{let t=Pi(this.#e),n=Wi(this.#e,e);n!=null&&yr(this.#e,_r(this.#e,t,n))})}collapse(e){V(this.#e.instrumentation,`store.collapse`,()=>{let t=Pi(this.#e),n=Gi(this.#e,e);n!=null&&yr(this.#e,_r(this.#e,t,n))})}on(e,t){return ar(this.#e,e,t)}getDirectoryLoadState(e){let t=this.requireDirectoryNodeId(e);return Qn(this.#e,t)}markDirectoryUnloaded(e){V(this.#e.instrumentation,`store.markDirectoryUnloaded`,()=>{let t=this.requireDirectoryNodeId(e);if(U(this.#e,t).childIds.length>0)throw Error(`Cannot mark a directory with known children as unloaded: "${e}"`);let n=Pi(this.#e);er(this.#e,t),yr(this.#e,_r(this.#e,n,dr({affectedAncestorIds:Br(this.#e,t),affectedNodeIds:[t],path:e,projectionChanged:this.isDirectoryProjectionVisible(t)})))})}beginChildLoad(e){return V(this.#e.instrumentation,`store.beginChildLoad`,()=>{let t=this.requireDirectoryNodeId(e),n=Pi(this.#e),r=$n(this.#e,t);return yr(this.#e,_r(this.#e,n,fr({affectedAncestorIds:Br(this.#e,t),affectedNodeIds:[t],attemptId:r.attemptId,path:e,projectionChanged:this.isDirectoryProjectionVisible(t),reused:r.reused}))),r})}applyChildPatch(e,t){return V(this.#e.instrumentation,`store.applyChildPatch`,()=>{let n=this.resolveActiveDirectoryNodeId(e.nodeId);if(n==null||Qn(this.#e,n)!==`loading`||!nr(this.#e,n,e.attemptId))return!1;let r=H(this.#e,n);this.validateChildPatch(r,t);let i=Pi(this.#e),a=[];for(let e of t.operations){oa(r,e);let t=Pi(this.#e);switch(e.type){case`add`:a.push(_r(this.#e,t,Nr(this.#e,e.path)));break;case`remove`:a.push(_r(this.#e,t,Pr(this.#e,e.path,{recursive:e.recursive})));break;case`move`:{let n=Fr(this.#e,e.from,e.to,{collision:e.collision});n!=null&&a.push(_r(this.#e,t,n));break}}}let o=a.some(e=>e.projectionChanged)||this.isDirectoryProjectionVisible(n);return yr(this.#e,_r(this.#e,i,pr({affectedAncestorIds:Br(this.#e,n),affectedNodeIds:[n],attemptId:e.attemptId,childEvents:a,path:H(this.#e,n),projectionChanged:o}))),!0})}completeChildLoad(e){return V(this.#e.instrumentation,`store.completeChildLoad`,()=>{let t=this.resolveActiveDirectoryNodeId(e.nodeId);if(t==null)return!1;let n=Pi(this.#e),r=tr(this.#e,t,e.attemptId);return yr(this.#e,_r(this.#e,n,mr({affectedAncestorIds:Br(this.#e,t),affectedNodeIds:[t],attemptId:e.attemptId,path:H(this.#e,t),projectionChanged:this.isDirectoryProjectionVisible(t),stale:!r}))),r})}failChildLoad(e,t){return V(this.#e.instrumentation,`store.failChildLoad`,()=>{let n=this.resolveActiveDirectoryNodeId(e.nodeId);if(n==null)return!1;let r=Pi(this.#e),i=rr(this.#e,n,e.attemptId,t);return yr(this.#e,_r(this.#e,r,hr({affectedAncestorIds:Br(this.#e,n),affectedNodeIds:[n],attemptId:e.attemptId,errorMessage:t,path:H(this.#e,n),projectionChanged:this.isDirectoryProjectionVisible(n),stale:!i}))),i})}cleanup(e={}){return V(this.#e.instrumentation,`store.cleanup`,()=>{if(this.#e.transactionStack.length>0)throw Error(`Cleanup cannot run during an open batch or transaction.`);if(Ai(this.#e))throw Error(`Cleanup cannot run while directory loads are active.`);let t=Pi(this.#e),n=ji(this.#e,e.mode??`stable`);return yr(this.#e,_r(this.#e,t,gr({...n,affectedAncestorIds:[],affectedNodeIds:[],projectionChanged:n.idsPreserved===!1}))),n})}getNodeCount(){return this.#e.activeNodeCount}initializeExpandedPaths(e){if(e==null||e.length===0)return 0;let t=0,n=[],r=[],i=0,a=null,o=this.#e.snapshot.segmentTable,s=o.valueById,c=this.#e.snapshot.nodes,l=new Map;for(let u of e){a!=null&&u<a&&(a=null,i=0,n.length=0,r.length=0);let e=u.length>0&&u.charCodeAt(u.length-1)===47?u.length-1:u.length;if(e===0){a=u,i=e,n.length=0,r.length=0;continue}let d=0,f=0;if(a!=null){let t=Math.min(e,i),n=!0;for(let e=0;e<t;e+=1){let t=u.charCodeAt(e);if(t!==a.charCodeAt(e)){n=!1;break}t===47&&(d+=1,f=e+1)}n&&(t===i&&e>t&&u.charCodeAt(t)===47?(d+=1,f=t+1):t===e&&i>t&&a.charCodeAt(t)===47&&(d+=1,f=e+1)),d=Math.min(d,r.length)}let p=d===0?this.#e.snapshot.rootId:r[d-1]??this.#e.snapshot.rootId,m=d,h=!0,g=f;for(;g<=e;){let t=u.indexOf(`/`,g),i=t===-1||t>e?e:t,a=u.slice(g,i),f=U(this.#e,p).childIds,_=m===d?n[m]??0:0,v=_,y,b=l.get(a)??dn(a);l.set(a,b);let x=(e,t)=>{for(v=e;v<t;v+=1){let e=f[v],t=c[e],n=s[t.nameId];if(n===a)return y=e,!0;let r=pn(bn(o,t.nameId),b);if(r>0||r===0&&n>a)return!1}return!1};if(!x(_,f.length)&&_>0&&x(0,_),y===void 0){h=!1;break}if(!z(W(this.#e,y))){h=!1;break}if(n[m]=v,r[m]=y,p=y,m+=1,i===e)break;g=i+1}if(a=u,i=e,n.length=m,r.length=m,!h){a=null,i=0,n.length=0,r.length=0;continue}for(let e=d;e<m;e+=1){let n=r[e];if(n==null)continue;let i=W(this.#e,n);Yn(this.#e,n,i)||(Xn(this.#e,n,!0,i),t+=1)}}return t}hasAllDirectoriesExpanded(){for(let e of this.#e.snapshot.directories.keys()){if(e===this.#e.snapshot.rootId)continue;let t=W(this.#e,e);if(!Yn(this.#e,e,t))return!1}return!0}requireDirectoryNodeId(e){let t=Vr(this.#e,e);if(t==null)throw Error(`Path does not exist: "${e}"`);if(!z(W(this.#e,t)))throw Error(`Path is not a directory: "${e}"`);return t}resolveActiveDirectoryNodeId(e){try{if(!z(W(this.#e,e)))throw Error(`Node is not a directory: ${String(e)}`);return e}catch{return null}}isDirectoryProjectionVisible(e){let t=e;for(;t!==this.#e.snapshot.rootId;){let e=W(this.#e,t).parentId;if(e!==this.#e.snapshot.rootId){let n=W(this.#e,e),r=kr(this.#e,e);if(!Yn(this.#e,e,n)&&r!==t)return!1}t=e}return!0}validateChildPatch(t,n){new e({paths:this.list(t),presorted:!0,sort:this.#e.snapshot.options.sort}).batch(n.operations)}};function oa(e,t){switch(t.type){case`add`:case`remove`:if(!t.path.startsWith(e)||t.path===e)throw Error(`Child patch operation must stay within ${e}: "${t.path}"`);break;case`move`:if(!t.from.startsWith(e)||!t.to.startsWith(e)||t.from===e||t.to===e)throw Error(`Child patch move must stay within ${e}: "${t.from}" -> "${t.to}"`);break}}var sa=e=>e.startsWith(`f::`)?e.slice(3):e;function ca(e){let t=e.lastIndexOf(`/`);return t<0?{parentPath:``,baseName:e}:{parentPath:e.slice(0,t),baseName:e.slice(t+1)}}function la(e,t){return e===``?t:`${e}/${t}`}function ua({files:e,path:t,isFolder:n,nextBasename:r}){let i=sa(t),a=r.trim();if(a.length===0)return{error:`Name cannot be empty.`};if(a.includes(`/`))return{error:`Name cannot include "/".`};let{parentPath:o,baseName:s}=ca(i);if(a===s)return{nextFiles:e,sourcePath:i,destinationPath:i,isFolder:n};let c=la(o,a),l=Array(e.length),u=new Set;if(!n){let t=`${c}/`,r=!1;for(let n=0;n<e.length;n++){let a=e[n];if(a!==i&&a.startsWith(t))return{error:`"${c}" already exists.`};let o=a===i?c:a;if(u.has(o))return{error:`"${c}" already exists.`};u.add(o),l[n]=o,a===i&&(r=!0)}return r?{nextFiles:l,sourcePath:i,destinationPath:c,isFolder:n}:{error:`Could not find the selected file to rename.`}}let d=`${i}/`,f=`${c}/`,p=0;for(let t=0;t<e.length;t++){let n=e[t],r=n===i||n.startsWith(d);if(!r&&(n===c||n.startsWith(f)))return{error:`"${c}" already exists.`};let a=r?`${c}${n.slice(i.length)}`:n;if(u.has(a))return{error:`"${c}" already exists.`};u.add(a),l[t]=a,r&&p++}return p===0?{error:`Could not find the selected folder to rename.`}:{nextFiles:l,sourcePath:i,destinationPath:c,isFolder:n}}function da(e){return e.endsWith(`/`)}function fa(e){let t=e.endsWith(`/`)?e.slice(0,-1):e,n=t.lastIndexOf(`/`),r=n<0?t:t.slice(n+1);return e.endsWith(`/`)?`${r}/`:r}function pa(e){let t=[],n=new Set;for(let r of e)n.has(r)||(n.add(r),t.push(r));let r=new Set;for(let e of t.toSorted((e,t)=>e.length===t.length?e.localeCompare(t):e.length-t.length)){let t=(e.endsWith(`/`)?e.slice(0,-1):e).split(`/`),n=!1;for(let e=0;e<t.length-1;e+=1){let i=`${t.slice(0,e+1).join(`/`)}/`;if(r.has(i)){n=!0;break}}n||r.add(e)}return t.filter(e=>r.has(e))}function ma(e,t){return t.includes(e)?pa(t):[e]}function ha(e,t){return e===t?!0:e==null||t==null?!1:e.kind===t.kind&&e.directoryPath===t.directoryPath&&e.flattenedSegmentPath===t.flattenedSegmentPath&&e.hoveredPath===t.hoveredPath}function ga(e,t){return{draggedPaths:e,target:t}}function _a(e,t){if(t.kind!==`directory`||t.directoryPath==null)return!1;for(let n of e)if(da(n)&&(t.directoryPath===n||t.directoryPath.startsWith(n)))return!0;return!1}function va(e,t){return t.kind===`root`||t.directoryPath==null?fa(e):t.directoryPath}function ya(e,t){let n=e.map(e=>{let n=va(e,t);return n===e?null:{from:e,to:n,type:`move`}}).filter(e=>e!=null);return n.length===0?null:{operations:n,result:{draggedPaths:e,operation:n.length===1?`move`:`batch`,target:t}}}function ba(e,t){if(e===t)return!0;if(e.length!==t.length)return!1;for(let n=0;n<e.length;n+=1)if(e[n]!==t[n])return!1;return!0}function xa(e,t,n){let{paths:r,preparedInput:i}=e;if(i==null){if(r==null)throw Error(`FileTree requires paths or preparedInput`);return{paths:r,preparedInput:void 0}}let a=i.paths;if(r==null)return{paths:a,preparedInput:i};if(!ba(aa.preparePaths(r,n==null?{}:{sort:n}),a))throw Error(`FileTree ${t} received paths and preparedInput for different path lists`);return{paths:a,preparedInput:i}}function Sa(e){return e.operation===`add`||e.operation===`remove`||e.operation===`move`||e.operation===`batch`}function Ca(e,t,n){if(e===t)return n;let r=t.endsWith(`/`)?t:`${t}/`;return e.startsWith(r)?`${n.endsWith(`/`)?n:`${n}/`}${e.slice(r.length)}`:e}function wa(e,t){if(e===t)return!0;let n=t.endsWith(`/`)?t:`${t}/`;return e.startsWith(n)}function Ta(e,t,n=!1){if(e==null)return null;switch(t.operation){case`add`:case`expand`:case`collapse`:case`mark-directory-unloaded`:case`begin-child-load`:case`apply-child-patch`:case`complete-child-load`:case`fail-child-load`:case`cleanup`:return e;case`remove`:return wa(e,t.path)?n?e:null:e;case`move`:return Ca(e,t.from,t.to);case`batch`:{let r=e;for(let e of t.events)if(r=Ta(r,e,n),r==null)return null;return r}}}function Ea(e){return{canonicalChanged:e.canonicalChanged,projectionChanged:e.projectionChanged,visibleCountDelta:e.visibleCountDelta}}function Da(e){switch(e.operation){case`add`:return{...Ea(e),operation:`add`,path:e.path};case`remove`:return{...Ea(e),operation:`remove`,path:e.path,recursive:e.recursive};case`move`:return{...Ea(e),from:e.from,operation:`move`,to:e.to}}}function Oa(e){return{...Ea(e),events:e.events.filter(e=>e.operation===`add`||e.operation===`remove`||e.operation===`move`).map(e=>Da(e)),operation:`batch`}}function ka(e){switch(e.operation){case`add`:case`remove`:case`move`:return Da(e);case`batch`:return Oa(e);default:return null}}function Aa(e,t){if(e.size!==t.length)return!1;for(let n of t)if(!e.has(n))return!1;return!0}function ja(e){let t=e.endsWith(`/`)?e.slice(0,-1):e;if(t.length===0)return[];let n=t.split(`/`);return n.slice(0,-1).map((e,t)=>`${n.slice(0,t+1).join(`/`)}/`)}function Ma(e){return ja(e).at(-1)??null}function Na(e,t){return t==null?e:e.startsWith(t)?e.slice(t.length):e}function Pa(e){return e.endsWith(`/`)}var Fa=e=>e.toLowerCase();function Ia(e){let t=e.endsWith(`/`)?e.slice(0,-1):e,n=t.lastIndexOf(`/`);return n<0?t:t.slice(n+1)}function La(e){return e.endsWith(`/`)?e.slice(0,-1):e}function Ra(e,t){return t&&!e.endsWith(`/`)?`${e}/`:e}var za=e=>{let t=e.trim();return t.length===0?``:(t.includes(`\\`)?t.replaceAll(`\\`,`/`):t).toLowerCase()},Ba=Symbol(`FILE_TREE_RENAME_VIEW`),Va=512,Ha=512;function Ua(e){return e===`top`||e===`center`?e:`nearest`}function Wa(e,t,n){if(e===0)return-1;if(n!=null){let e=t(n);if(e!=null)return e;let r=ja(n);for(let e=r.length-1;e>=0;--e){let n=r[e];if(n==null)continue;let i=t(n);if(i!=null)return i}}return 0}function Ga(e,t,n){if(e.paths.length===0)return{focusedIndex:-1,getParentIndex:e.getParentIndex,paths:e.paths,posInSetByIndex:e.posInSetByIndex,setSizeByIndex:e.setSizeByIndex};if(t==null)return{focusedIndex:0,getParentIndex:e.getParentIndex,paths:e.paths,posInSetByIndex:e.posInSetByIndex,setSizeByIndex:e.setSizeByIndex};let r=n??(t=>e.visibleIndexByPath.get(t)??null);return{focusedIndex:Wa(e.paths.length,r,t),getParentIndex:e.getParentIndex,paths:e.paths,posInSetByIndex:e.posInSetByIndex,setSizeByIndex:e.setSizeByIndex}}var Ka=class e{static{Object.defineProperty(e.prototype,Ba,{configurable:!0,value(){return{cancel:()=>{this.#q()},commit:()=>{this.#J()},getPath:()=>this.#T,getValue:()=>this.#E,isActive:()=>this.#T!=null,setValue:e=>{this.#Y(e)}}},writable:!0})}#e;#t=new Set;#n=new Map;#r=null;#i=null;#a=new Map;#o=new Map;#s=-1;#c=null;#l=!1;#u=e=>-1;#d=new Map;#f=null;#p=null;#m=null;#h=null;#g=null;#_;#v;#y;#b=[];#x=new Int32Array;#S=new Int32Array;#C=void 0;#w=!1;#T=null;#E=``;#D=!1;#O=new Set;#k=[];#A;#j=null;#M=null;#N=null;#P=null;#F=null;#I=null;#L=null;#R=0;#z=null;#B=new Set;#V=0;#H;#U=0;#W=!1;#G=0;#K;constructor(e){let{dragAndDrop:t,fileTreeSearchMode:n,initialSearchQuery:r,initialSelectedPaths:i,renaming:a,onSearchChange:o,paths:s,preparedInput:c,...l}=e,u=xa({paths:s,preparedInput:c},`constructor`,l.sort);this.#e=l,t!=null&&t!==!1&&(this.#r=t===!0?{}:t),this.#w=a!=null&&a!==!1,a!=null&&a!==!1&&a!==!0&&(this.#C=a.canRename,this.#v=a.onError,this.#_=a.onRename),this.#y=o,this.#A=n??`hide-non-matches`,this.#H=this.#le(u.paths,u.preparedInput);let d=i?.map(e=>this.#Ne(e)).filter(e=>e!=null)??[],f=d.at(-1)??null;d.length>0&&(this.#B=new Set(d),this.#z=f,this.#V=1),this.#je(f,!1),r!=null&&this.#Te(r,!1),this.#K=this.#Re()}destroy(){this.#K?.(),this.#K=null,this.#n.clear(),this.#t.clear(),this.#d.clear(),this.#i=null,this.#he()}focusFirstItem(){this.#be().length>0&&this.#Fe(0)}focusLastItem(){this.#G<=0||(this.#Ie(),this.#Fe(this.#G-1))}focusNextItem(){this.#Ae(1)}focusParentItem(){if(this.#c==null)return;let e=Ma(this.#c);if(e==null)return;let t=this.#Z(e);t>=0&&this.#Fe(t)}focusPath(e){let t=this.#H.getPathInfo(e)?.path??null;if(t==null)return;this.#Ie();let n=this.#Z(t);n>=0&&this.#Fe(n)}scrollToPath(e,t){let n=this.#H.getPathInfo(e)?.path??null;if(n==null)return;this.#Ie();let r=this.#xe(n);r<0||this.#Me(r)!=null&&(t?.focus!==!1&&this.#Fe(r,!1),this.#L={id:this.#R+=1,offset:Ua(t?.offset),visibleIndex:r},this.#De())}focusMountedPathFromInput(e){let t=this.#H.getPathInfo(e)?.path??null;if(t==null)return;let n=this.#Z(t);n>=0&&this.#Fe(n)}focusNearestPath(e){let t=this.resolveNearestVisiblePath(e);if(t==null)return null;let n=this.#Z(t);return n>=0?(this.#Fe(n),this.#be()[n]??t):null}focusPreviousItem(){this.#Ae(-1)}getFocusedIndex(){return this.#s}getFocusedItem(){return this.#c==null?null:this.#Q(this.#c)}getFocusedPath(){return this.#c}getScrollRequest(){return this.#L}clearScrollRequest(e){this.#L?.id===e&&(this.#L=null)}resolveNearestVisiblePath(e){let t=this.#be();if(this.#G===0)return null;if(e==null)return this.#c??t[0]??null;let n=this.#H.getPathInfo(e)?.path??e,r=this.#Z(n);return r>=0?t[r]??n:this.#X(n)??this.#c??t[0]??null}getSelectedPaths(){return[...this.#B]}getSelectionVersion(){return this.#V}getVisibleCount(){return this.#G}getVisibleRows(e,t){if(t<e||this.#G===0)return[];let n=Math.max(0,e),r=Math.min(this.#G-1,t);if(r<n)return[];let i=r-n+1;if(this.#F==null&&!this.#l&&r>=this.#b.length&&i<=Ha){let e=[];for(let t=n;t<=r;t+=1){let n=this.#H.getVisibleRowContext(t);if(n==null)break;e.push(this.#ee(n))}return e}if(!this.#l&&r>=this.#b.length&&this.#Ie(),this.#F!=null){let e=Array.from({length:r-n+1},(e,t)=>this.#Se(n+t)),t=new Map,i=e[0]??-1,a=i;for(let n=1;n<=e.length;n+=1){let r=e[n];if(r!=null&&r===a+1){a=r;continue}if(i>=0&&this.#H.getVisibleSlice(i,a).forEach((e,n)=>{t.set(i+n,e)}),r==null){i=-1,a=-1;continue}i=r,a=r}return Array.from({length:r-n+1},(e,r)=>{let i=n+r,a=this.#Se(i),o=t.get(a),s=this.#b[a];if(o==null||s==null)throw Error(`Missing projection row for filtered visible index ${String(i)}`);return this.#$(o,i,a,{ancestorPaths:this.#re(a),path:s})})}return this.#H.getVisibleSlice(n,r).map((e,t)=>{let r=n+t,i=this.#b[r];if(i==null)throw Error(`Missing projection path for visible index ${String(r)}`);return this.#$(e,r,r,{ancestorPaths:this.#re(r),path:i})})}getStickyRowCandidates(e,t){if(this.#F!=null)return null;if(this.#G===0||e<=0||t<=0)return[];let n=[];for(let r=0;r<this.#G;r+=1){let i=e+r*t,a=Math.min(this.#G-1,Math.floor(i/t)),o=this.#te(a,r)??(a>0?this.#te(a-1,r):void 0);if(o==null)break;n.push({row:this.#ee(o),subtreeEndIndex:o.subtreeEndIndex})}return n}getItem(e){let t=this.#H.getPathInfo(e);return t==null?null:this.#Q(t.path,t)}resolveMountedDirectoryPathFromInput(e){let t=this.#H.getPathInfo(e);return t?.kind===`directory`?t.path:null}toggleMountedDirectoryFromInput(e){let t=this.resolveMountedDirectoryPathFromInput(e);t!=null&&this.#ze(t)}selectAllVisiblePaths(){this.#Ie();let e=[...this.#be()];this.#ae(e,this.#c??this.#z)}selectOnlyPath(e){let t=this.#Ne(e);t!=null&&this.#ae([t],t)}selectOnlyMountedPathFromInput(e){this.#ae([e],e)}selectPath(e){let t=this.#Ne(e);t==null||this.#B.has(t)||this.#ae([...this.#B,t])}deselectPath(e){let t=this.#Ne(e);t==null||!this.#B.has(t)||this.#ae([...this.#B].filter(e=>e!==t))}toggleFocusedSelection(){this.#c!=null&&this.togglePathSelectionFromInput(this.#c)}togglePathSelection(e){let t=this.#Ne(e);if(t!=null){if(this.#B.has(t)){this.deselectPath(t);return}this.selectPath(t)}}togglePathSelectionFromInput(e){let t=this.#Ne(e);if(t!=null){if(this.#B.has(t)){this.#ae([...this.#B].filter(e=>e!==t),t);return}this.#ae([...this.#B,t],t)}}selectPathRange(e,t){let n=this.#Ne(e);if(n==null)return;this.#Ie();let r=this.#z,i=r==null?-1:this.#Ce(r),a=this.#Ce(n);if(i===-1||a===-1){let e=t?[...this.#B,n]:[n];this.#ae(e,n);return}let[o,s]=i<=a?[i,a]:[a,i],c=this.#be().slice(o,s+1),l=t?[...this.#B,...c]:c;this.#ae(l,r)}extendSelectionFromFocused(e){if(this.#c==null)return;let t=this.#s;if(t===-1)return;let n=Math.min(this.#G-1,Math.max(0,t+e));if(n===t)return;!this.#l&&n>=this.#b.length&&this.#Ie();let r=this.#be(),i=r[t]??null,a=r[n]??null;if(i==null||a==null)return;let o=new Set(this.#B);o.has(i)&&o.has(a)?o.delete(i):o.add(a),this.#ae([...o],this.#z??i,!1),this.#Fe(n)}getDragAndDropConfig(){return this.#r}isDragAndDropEnabled(){return this.#r!=null}getDragSession(){return this.#i==null?null:{draggedPaths:[...this.#i.draggedPaths],primaryPath:this.#i.primaryPath,target:this.#i.target==null?null:{...this.#i.target}}}startDrag(e){if(this.#r==null)return!1;let t=this.#Ne(e);if(t==null||this.#M!=null&&this.#M.length>0)return!1;let n=this.getSelectedPaths(),r=ma(t,n);return this.#r.canDrag?.(r)===!1?!1:(n.includes(t)||this.#ae([t],t,!1),this.#Pe(t),this.#i={draggedPaths:r,primaryPath:t,target:null},this.#De(),!0)}setDragTarget(e){let t=this.#i;if(t==null)return;let n=e;if(n!=null){let e=ga(t.draggedPaths,n);(_a(t.draggedPaths,n)||this.#r?.canDrop?.(e)===!1)&&(n=null)}ha(t.target,n)||(this.#i={...t,target:n},this.#De())}cancelDrag(){this.#i!=null&&(this.#i=null,this.#De())}completeDrag(){let e=this.#i;if(e==null)return!1;this.#i=null;let t=e.target==null?null:{...e.target};if(t==null)return this.#De(),!1;let n=ga(e.draggedPaths,t);if(_a(e.draggedPaths,t)||this.#r?.canDrop?.(n)===!1)return this.#De(),!1;let r=ya(e.draggedPaths,t);if(r==null)return this.#De(),!1;try{if(r.operations.length===1){let e=r.operations[0];if(e==null||e.type!==`move`)throw Error(`Expected a single move operation for one-item drops`);this.#H.move(e.from,e.to,{collision:e.collision})}else this.#ce(r.operations),this.#H.batch(r.operations)}catch(e){return this.#De(),this.#r?.onDropError?.(e instanceof Error?e.message:String(e),n),!1}return this.#r?.onDropComplete?.(r.result),!0}subscribe(e){return this.#t.add(e),e(),()=>{this.#t.delete(e)}}add(e){this.#H.add(e)}remove(e,t={}){this.#H.remove(e,t)}move(e,t,n={}){this.#H.move(e,t,n)}batch(e){this.#H.batch(e)}onMutation(e,t){let n=e,r=t,i=this.#n.get(n);return i??(i=new Set,this.#n.set(n,i)),i.add(r),()=>{let e=this.#n.get(n);e?.delete(r),e?.size===0&&this.#n.delete(n)}}setSearch(e){this.#Te(e,!0)}openSearch(e=``){this.#Te(e,!0)}closeSearch(){this.#Te(null,!0)}isSearchOpen(){return this.#M!==null}getSearchValue(){return this.#M??``}getSearchMatchingPaths(){return this.#k}focusNextSearchMatch(){this.#we(1)}focusPreviousSearchMatch(){this.#we(-1)}startRenaming(e=this.#c??``,t={}){if(!this.#w)return!1;let n=this.#H.getPathInfo(e);if(n==null)return!1;let r=n.path,i=Pa(r),a=La(r);if(this.#C?.({isFolder:i,path:a})===!1)return!1;for(let e of ja(r))this.#H.isExpanded(e)||this.#H.expand(e);return this.#ae([r],r,!1),this.#M!=null&&(this.#Te(null,!1),this.#y?.(this.#M)),this.#Pe(r),this.#T=r,this.#E=Ia(r),this.#D=t.removeIfCanceled??!1,this.#De(),!0}#q(){if(this.#T==null)return;let e=this.#T,t=this.#D;if(this.#T=null,this.#E=``,this.#D=!1,t){this.remove(e,Pa(e)?{recursive:!0}:void 0);return}this.#Pe(e),this.#De()}#J(){let e=this.#T;if(e==null)return;if(this.#D&&this.#E.trim().length===0){this.#T=null,this.#E=``,this.#D=!1,this.remove(e,Pa(e)?{recursive:!0}:void 0);return}let t=Pa(e),n=ua({files:this.#H.list(),isFolder:t,nextBasename:this.#E,path:La(e)});if(this.#T=null,this.#E=``,this.#D=!1,`error`in n){this.#Pe(e),this.#v?.(n.error),this.#De();return}if(n.sourcePath===n.destinationPath){this.#Pe(e),this.#De();return}this.#_?.({destinationPath:n.destinationPath,isFolder:n.isFolder,sourcePath:n.sourcePath}),this.move(Ra(n.sourcePath,t),Ra(n.destinationPath,t))}#Y(e){this.#T==null||this.#E===e||(this.#E=e,this.#De())}resetPaths(e,t={}){let n=!Array.isArray(e),r=n?void 0:e,i=n?e:t,a=this.#H.list().length,o=this.#G,s=xa({paths:r,preparedInput:i.preparedInput},`resetPaths`,this.#e.sort),c=this.#le(s.paths,s.preparedInput,i.initialExpandedPaths),l=this.#c,u=this.#T,d=this.getSelectedPaths(),f=this.#z;this.#K?.(),this.#H=c,this.#d.clear(),this.#he();let p=d.map(e=>c.getPathInfo(e)?.path??null).filter(e=>e!=null),m=!Aa(this.#B,p);this.#B=new Set(p),m&&(this.#V+=1),this.#z=f==null?null:c.getPathInfo(f)?.path??null,this.#T=u==null?null:c.getPathInfo(u)?.path??null,this.#T??(this.#E=``,this.#D=!1),this.#je(l,l!=null||p.length>0||this.#z!=null),this.#K=this.#Re(),this.#De(),this.#Oe({canonicalChanged:!0,operation:`reset`,pathCountAfter:s.paths.length,pathCountBefore:a,projectionChanged:!0,usedPreparedInput:i.preparedInput!=null,visibleCountDelta:this.#G-o})}#X(e){this.#Ie();let t=Ma(e),n=Na(e,t),r=null,i=null;for(let e of this.#be()){if(Ma(e)!==t)continue;let a=Na(e,t);if(a<n){r=e;continue}if(a>n){i=e;break}}return r??i}#Z(e){let t=this.#Ce(e);if(t!==-1)return t;let n=ja(e);for(let e=n.length-1;e>=0;--e){let t=n[e];if(t==null)continue;let r=this.#Ce(t);if(r!==-1)return r}return this.#be().length>0?0:-1}#Q(e,t){let n=this.#d.get(e);if(n!=null)return n;let r=t??this.#H.getPathInfo(e);if(r==null)return null;let i=r.kind===`directory`?this.#oe(r.path):this.#se(r.path);return this.#d.set(r.path,i),i}#$(e,t,n,r){return{ancestorPaths:r.ancestorPaths,depth:e.depth,flattenedSegments:e.flattenedSegments?.map(e=>({isTerminal:e.isTerminal,name:e.name,path:e.path})),hasChildren:e.hasChildren,index:t,isExpanded:e.isExpanded,isFlattened:e.isFlattened,isFocused:r.path===this.#c,isSelected:this.#B.has(r.path),kind:e.kind,level:e.depth,name:e.name,path:r.path,posInSet:r.posInSet??this.#x[n]??0,setSize:r.setSize??this.#S[n]??0}}#ee(e){return this.#$(e.row,e.index,e.index,{ancestorPaths:e.ancestorPaths,path:e.row.path,posInSet:e.posInSet,setSize:e.setSize})}#te(e,t){let n=this.#H.getVisibleRowContext(e);return n==null?void 0:n.ancestorRows[t]??(t===n.ancestorRows.length&&n.row.kind===`directory`&&n.row.isExpanded?n:void 0)}#ne(e){let t=this.#a.get(e);if(t!=null)return t;let n=this.#u(e),r=n<0?[]:[...this.#ne(n),n];return this.#a.set(e,r),r}#re(e){let t=this.#o.get(e);if(t!=null)return t;let n=this.#ne(e).map(e=>this.#b[e]??``).filter(e=>e!==``);return this.#o.set(e,n),n}#ie(e){this.#H.collapse(e)}#ae(e,t=this.#z,n=!0){let r=[...new Set(e)],i=!Aa(this.#B,r),a=this.#z!==t;!i&&!a||(this.#B=new Set(r),this.#z=t,i&&(this.#V+=1),n&&this.#De())}#oe(e){return{collapse:()=>{this.#ie(e)},deselect:()=>{this.deselectPath(e)},expand:()=>{this.#ke(e)},focus:()=>{this.focusPath(e)},getPath:()=>e,isDirectory:()=>!0,isExpanded:()=>this.#H.isExpanded(e),isFocused:()=>this.#c===e,isSelected:()=>this.#B.has(e),select:()=>{this.selectPath(e)},toggleSelect:()=>{this.togglePathSelection(e)},toggle:()=>{this.#ze(e)}}}#se(e){return{deselect:()=>{this.deselectPath(e)},focus:()=>{this.focusPath(e)},getPath:()=>e,isDirectory:()=>!1,isFocused:()=>this.#c===e,isSelected:()=>this.#B.has(e),select:()=>{this.selectPath(e)},toggleSelect:()=>{this.togglePathSelection(e)}}}#ce(e){let t=this.#H.list();this.#le(t).batch(e)}#le(e,t,n){return new aa({...this.#e,paths:e,preparedInput:t??void 0,...n===void 0?{}:{initialExpandedPaths:n}})}#ue(){return this.#h??=this.#H.list(),this.#h}#de(){if(this.#m!=null)return this.#m;let e=new Set;for(let t of this.#ue()){e.add(t);for(let n of ja(t))e.add(n)}return this.#m=[...e].sort(),this.#m}#fe(){return this.#g??=this.#ue().map(Fa),this.#g}#pe(){return this.#f??=this.#de().filter(e=>e.endsWith(`/`)),this.#f}#me(){return this.#p??=this.#pe().map(Fa),this.#p}#he(){this.#f=null,this.#p=null,this.#m=null,this.#h=null,this.#g=null}#ge(){return this.#pe().filter(e=>this.#H.isExpanded(e))}#_e(e){let t=new Set(this.#j??[]);if(e)for(let e of this.#B)for(let n of ja(e))t.add(n);this.#ve(t)}#ve(e){this.#W=!0;try{for(let t of this.#pe()){let n=e.has(t),r=this.#H.isExpanded(t);n&&!r?this.#H.expand(t):!n&&r&&this.#H.collapse(t)}}finally{this.#W=!1}}#ye(){if(this.#M==null||this.#M.length===0){this.#k=[],this.#F=null,this.#I=null,this.#P=null,this.#G=this.#U;return}let e=this.#b;if(this.#k=e.filter(e=>this.#O.has(e)),this.#A!==`hide-non-matches`||this.#O.size===0){this.#F=null,this.#I=null,this.#P=null,this.#G=this.#U;return}let t=[],n=[],r=new Map;for(let[i,a]of e.entries())this.#N?.has(a)===!0&&(r.set(a,n.length),t.push(i),n.push(a));this.#F=t,this.#I=n,this.#P=r,this.#G=n.length}#be(){return this.#I??this.#b}#xe(e){return this.#I==null?this.#H.getVisibleIndex(e)??-1:this.#P?.get(e)??-1}#Se(e){return this.#F?.[e]??e}#Ce(e){return this.#P?.get(e)??this.#H.getVisibleIndex(e)??-1}#we(e){let t=this.#k;if(t.length===0)return;let n=this.#c,r=n==null?-1:t.indexOf(n),i=t[r<0?e>0?0:t.length-1:Math.min(t.length-1,Math.max(0,r+e))];i!=null&&this.focusPath(i)}#Te(e,t){let n=e==null?null:za(e),r=this.#M;if(r!==n){if(r==null&&n!=null&&(this.#j=this.#ge()),this.#M=n,n==null)this.#_e(!0),this.#j=null,this.#O.clear(),this.#N=null,this.#je(this.#c,!0);else if(n.length===0)this.#_e(!1),this.#O.clear(),this.#N=null,this.#je(this.#c,!0);else{let e=this.#Ee();this.#je(e,!0)}t&&(this.#y?.(this.#M),this.#De())}}#Ee(){if(this.#M==null||this.#M.length===0)return this.#O.clear(),this.#c;let e=this.#M,t=this.#ue(),n=this.#fe(),r=[],i=new Set,a=null;for(let o=0;o<t.length;o+=1){if(!n[o].includes(e))continue;let s=t[o];r.push(s),i.add(s),a??=s}let o=this.#pe(),s=this.#me();for(let t=0;t<o.length;t+=1){if(!s[t].includes(e))continue;let n=o[t];i.has(n)||(r.push(n),i.add(n),a??=n)}this.#O=i;let c=this.#A===`hide-non-matches`&&r.length>0?new Set:null;this.#N=c;let l=this.#A===`expand-matches`?new Set(this.#j??[]):new Set;for(let e of r){c?.add(e),e.endsWith(`/`)&&l.add(e);for(let t of ja(e))l.add(t),c?.add(t)}return this.#ve(l),a??this.#c}#De(){for(let e of this.#t)e()}#Oe(e){this.#n.get(e.operation)?.forEach(t=>{t(e)}),this.#n.get(`*`)?.forEach(t=>{t(e)})}#ke(e){for(let t of ja(e))this.#H.isExpanded(t)||this.#H.expand(t);this.#H.isExpanded(e)||this.#H.expand(e)}#Ae(e){let t=this.#G;if(t===0)return;let n=this.#s===-1?0:this.#s,r=Math.min(t-1,Math.max(0,n+e));(r!==n||this.#s===-1)&&(!this.#l&&this.#F==null&&r>=this.#b.length&&this.#Ie(),this.#Fe(r))}#je(e,t=!0){let n=this.#H.getVisibleCount();this.#U=n;let r=Ga(this.#H.getVisibleTreeProjectionData(t?void 0:Math.min(n,Va)),e,t?e=>this.#H.getVisibleIndex(e):void 0);this.#a.clear(),this.#o.clear(),this.#l=r.paths.length>=n,this.#u=r.getParentIndex,this.#b=r.paths,this.#x=r.posInSetByIndex,this.#S=r.setSizeByIndex,this.#ye(),this.#s=e==null?this.#be().length>0?0:-1:this.#Z(e),this.#c=this.#s<0?null:this.#Me(this.#s)}#Me(e){return this.#be()[e]??(this.#F==null?this.#H.getVisibleRowContext(e)?.row.path??null:null)}#Ne(e){return this.#H.getPathInfo(e)?.path??null}#Pe(e){if(e==null)return;let t=this.#Z(e);t>=0&&this.#Fe(t,!1)}#Fe(e,t=!0){let n=this.#Me(e);n!=null&&(this.#s===e&&this.#c===n||(this.#s=e,this.#c=n,t&&this.#De()))}#Ie(){this.#l||this.#je(this.#c,!0)}#Le(e){let t=Ta(this.#T,e);t==null&&this.#T!=null&&(this.#E=``),this.#T=t;let n=Ta(this.#c,e,!0),r=[...this.#B].map(t=>Ta(t,e)).filter(e=>e!=null).map(e=>this.#H.getPathInfo(e)?.path??null).filter(e=>e!=null),i=Ta(this.#z,e),a=i==null?null:this.#H.getPathInfo(i)?.path??null,o=[...new Set(r)];return Aa(this.#B,o)||(this.#B=new Set(o),this.#V+=1),this.#z=a,n}#Re(){return this.#H.on(`*`,e=>{if(this.#W)return;e.canonicalChanged&&(this.#d.clear(),this.#he()),this.#i!=null&&Sa(e)&&(this.#i=null);let t=Sa(e)?this.#Le(e):this.#c,n=this.#M!=null&&this.#M.length>0?this.#Ee():this.#M===``?this.#c:t,r=this.#M!=null||e.operation!==`expand`&&e.operation!==`collapse`;this.#je(n,r),this.#De();let i=ka(e);i!=null&&this.#Oe(i)})}#ze(e){if(this.#H.isExpanded(e)){this.#ie(e);return}this.#ke(e)}},qa=e=>{if(e==null||e.length===0)return`0`;let t=`${e.length}`;for(let n of e)t+=`\0${n.path}\0${n.status}`;return t};function Ja(e){let t=e.endsWith(`/`),n=``,r=-1;for(let t=0;t<=e.length;t+=1){if(!(e[t]===`/`||t===e.length)){r===-1&&(r=t);continue}r!==-1&&(n!==``&&(n+=`/`),n+=e.slice(r,t),r=-1)}return n===``?null:{isDirectory:t,path:n}}function Ya(e){let t=e.endsWith(`/`)?e.slice(0,-1):e;if(t.length===0)return[];let n=[],r=0;for(;;){let e=t.indexOf(`/`,r);if(e===-1)break;n.push(t.slice(0,e+1)),r=e+1}return n}function Xa(e,t){return t?`${e}/`:e}function Za(e,t=null){let n=qa(e==null?void 0:[...e]);if(n===`0`)return null;if(t?.signature===n)return t;let r=new Map,i=new Set,a=new Set,o=new Map;for(let t of e??[]){let e=$a(t);e!=null&&no({canonicalPath:e.canonicalPath,changeCountByDirectoryPath:o,directoriesWithChanges:i,ignoredDirectoryPaths:a,isDirectory:e.isDirectory,status:t.status,statusByPath:r})}return r.size===0?null:{changeCountByDirectoryPath:o,directoriesWithChanges:i,ignoredDirectoryPaths:a,signature:n,statusByPath:r}}function Qa(e,t){let n=t?.remove??[],r=t?.set??[];if(n.length===0&&r.length===0)return e;let i=new Map(e?.statusByPath),a=new Set(e?.directoriesWithChanges),o=new Set(e?.ignoredDirectoryPaths),s=new Map(e?.changeCountByDirectoryPath),c=!1;for(let e of n){let t=eo(e);t!=null&&(c=to({canonicalPath:t.canonicalPath,changeCountByDirectoryPath:s,directoriesWithChanges:a,ignoredDirectoryPaths:o,statusByPath:i})||c)}for(let e of r){let t=$a(e);t!=null&&(c=no({canonicalPath:t.canonicalPath,changeCountByDirectoryPath:s,directoriesWithChanges:a,ignoredDirectoryPaths:o,isDirectory:t.isDirectory,status:e.status,statusByPath:i})||c)}return c?i.size===0?null:{changeCountByDirectoryPath:s,directoriesWithChanges:a,ignoredDirectoryPaths:o,signature:ao(i),statusByPath:i}:e}function $a(e){return eo(e.path)}function eo(e){let t=Ja(e);if(t!=null)return{canonicalPath:Xa(t.path,t.isDirectory),isDirectory:t.isDirectory}}function to({canonicalPath:e,changeCountByDirectoryPath:t,directoriesWithChanges:n,ignoredDirectoryPaths:r,statusByPath:i}){let a=i.get(e);return a==null?!1:(i.delete(e),a===`ignored`&&e.endsWith(`/`)&&r.delete(e),io(t,n,e),!0)}function no({canonicalPath:e,changeCountByDirectoryPath:t,directoriesWithChanges:n,ignoredDirectoryPaths:r,isDirectory:i,status:a,statusByPath:o}){let s=o.get(e);return s===a?!1:(s??ro(t,n,e),o.set(e,a),a===`ignored`&&i?r.add(e):i&&r.delete(e),!0)}function ro(e,t,n){for(let r of Ya(n))e.set(r,(e.get(r)??0)+1),t.add(r)}function io(e,t,n){for(let r of Ya(n)){let n=(e.get(r)??0)-1;n>0?e.set(r,n):(e.delete(r),t.delete(r))}}function ao(e){let t=`${e.size}`;for(let[n,r]of e)t+=`\0${n}\0${r}`;return t}var oo=e=>e.trim().toLowerCase(),so=e=>e.split(`/`).at(-1)??e,co=e=>{let t=e.toLowerCase().split(`.`),n=[];for(let e=1;e<t.length;e+=1)n.push(t.slice(e).join(`.`));return n};function lo(e,t){return typeof e==`string`?{name:e,remappedFrom:t}:{...e,remappedFrom:t}}function uo(e){let t=bt(e),n=t.remap,r=new Map;for(let[e,n]of Object.entries(t.byFileName??{}))r.set(e.toLowerCase(),n);let i=new Map;for(let[e,n]of Object.entries(t.byFileExtension??{}))i.set(oo(e),n);let a=Object.entries(t.byFileNameContains??{}).map(([e,t])=>[e.toLowerCase(),t]);return{resolveIcon:(e,o)=>{if(e===`file-tree-icon-file`&&o!=null){let s=so(o),c=s.toLowerCase(),l=r.get(c);if(l!=null)return lo(l,e);for(let[t,n]of a)if(c.includes(t))return lo(n,e);let u=co(s);for(let t of u){let n=i.get(t);if(n!=null)return lo(n,e)}let d=vt(t.set,s,u);if(d!=null&&t.set!==`none`){if(d==="default"){let t=n?.[e];if(t!=null)return lo(t,e)}return{name:gt(d),remappedFrom:e,token:d}}}let s=n?.[e];return s==null?{name:e}:lo(s,e)}}}var G,fo,po,mo,ho,go,_o,vo,yo,bo,xo={},So=[],Co=Array.isArray,wo=So.slice,To=Object.assign;function Eo(e){e&&e.parentNode&&e.remove()}function Do(e,t,n){var r,i,a,o={};for(a in t)a==`key`?r=t[a]:a==`ref`&&typeof e!=`function`?i=t[a]:o[a]=t[a];return arguments.length>2&&(o.children=arguments.length>3?wo.call(arguments,2):n),Oo(e,o,r,i,null)}function Oo(e,t,n,r,i){var a={type:e,props:t,key:n,ref:r,__k:null,__:null,__b:0,__e:null,__c:null,constructor:void 0,__v:i??++fo,__i:-1,__u:0};return i==null&&G.vnode!=null&&G.vnode(a),a}function ko(e){return e.children}function Ao(e,t){this.props=e,this.context=t,this.__g=0}function jo(e,t){if(t==null)return e.__?jo(e.__,e.__i+1):null;for(var n;t<e.__k.length;t++)if((n=e.__k[t])!=null&&n.__e!=null)return n.__e;return typeof e.type==`function`?jo(e):null}function Mo(e){var t,n;if((e=e.__)!=null&&e.__c!=null){for(e.__e=null,t=0;t<e.__k.length;t++)if((n=e.__k[t])!=null&&n.__e!=null){e.__e=n.__e;break}return Mo(e)}}function No(e){(8&e.__g||!(e.__g|=8)||!po.push(e)||ho++)&&mo==G.debounceRendering||((mo=G.debounceRendering)||queueMicrotask)(Po)}function Po(){for(var e,t,n,r,i,a,o,s,c=1;po.length;)po.length>c&&po.sort(go),e=po.shift(),c=po.length,8&e.__g&&(n=void 0,i=(r=(t=e).__v).__e,a=[],o=[],(s=t.__P)&&((n=To({},r)).__v=r.__v+1,G.vnode&&G.vnode(n),Ho(s,n,r,t.__n,s.namespaceURI,32&r.__u?[i]:null,a,i??jo(r),!!(32&r.__u),o,s.ownerDocument),n.__v=r.__v,n.__.__k[n.__i]=n,Wo(a,n,o),n.__e!=i&&Mo(n)));ho=0}function Fo(e,t,n,r,i,a,o,s,c,l,u,d){var f,p,m,h,g,_,v,y=r&&r.__k||So,b=t.length;for(c=Io(n,t,y,c,b),f=0;f<b;f++)(m=n.__k[f])!=null&&(p=m.__i==-1?xo:y[m.__i]||xo,m.__i=f,_=Ho(e,m,p,i,a,o,s,c,l,u,d),h=m.__e,m.ref&&p.ref!=m.ref&&(p.ref&&qo(p.ref,null,m),u.push(m.ref,m.__c||h,m)),g==null&&h!=null&&(g=h),(v=!!(4&m.__u))||p.__k===m.__k?c=Lo(m,c,e,v):typeof m.type==`function`&&_!==void 0?c=_:h&&(c=h.nextSibling),m.__u&=-7);return n.__e=g,c}function Io(e,t,n,r,i){var a,o,s,c,l,u=n.length,d=u,f=0;for(e.__k=Array(i),a=0;a<i;a++)(o=t[a])!=null&&typeof o!=`boolean`&&typeof o!=`function`?(c=a+f,(o=e.__k[a]=typeof o==`string`||typeof o==`number`||typeof o==`bigint`||o.constructor==String?Oo(null,o,null,null,null):Co(o)?Oo(ko,{children:o},null,null,null):o.constructor==null&&o.__b>0?Oo(o.type,o.props,o.key,o.ref?o.ref:null,o.__v):o).__=e,o.__b=e.__b+1,s=null,(l=o.__i=Ro(o,n,c,d))!=-1&&(d--,(s=n[l])&&(s.__u|=2)),s==null||s.__v==null?(l==-1&&(i>u?f--:i<u&&f++),typeof o.type!=`function`&&(o.__u|=4)):l!=c&&(l==c-1?f--:l==c+1?f++:(l>c?f--:f++,o.__u|=4))):e.__k[a]=null;if(d)for(a=0;a<u;a++)(s=n[a])!=null&&!(2&s.__u)&&(s.__e==r&&(r=jo(s)),Jo(s,s));return r}function Lo(e,t,n,r){var i,a;if(typeof e.type==`function`){for(i=e.__k,a=0;i&&a<i.length;a++)i[a]&&(i[a].__=e,t=Lo(i[a],t,n,r));return t}e.__e!=t&&(r&&(t&&e.type&&!t.parentNode&&(t=jo(e)),n.insertBefore(e.__e,t||null)),t=e.__e);do t&&=t.nextSibling;while(t!=null&&t.nodeType==8);return t}function Ro(e,t,n,r){var i,a,o,s=e.key,c=e.type,l=t[n],u=l!=null&&(2&l.__u)==0;if(l===null&&e.key==null||u&&s==l.key&&c==l.type)return n;if(r>+!!u){for(i=n-1,a=n+1;i>=0||a<t.length;)if((l=t[o=i>=0?i--:a++])!=null&&!(2&l.__u)&&s==l.key&&c==l.type)return o}return-1}function zo(e,t,n){t[0]==`-`?e.setProperty(t,n??``):e[t]=n??``}function Bo(e,t,n,r,i){var a;n:if(t==`style`)if(typeof n==`string`)e.style.cssText=n;else{if(typeof r==`string`&&(e.style.cssText=r=``),r)for(t in r)n&&t in n||zo(e.style,t,``);if(n)for(t in n)r&&n[t]==r[t]||zo(e.style,t,n[t])}else if(t[0]==`o`&&t[1]==`n`)a=t!=(t=t.replace(_o,`$1`)),(t=t.slice(2))[0].toLowerCase()!=t[0]&&(t=t.toLowerCase()),e.__l||={},e.__l[t+a]=n,n?r?n.l=r.l:(n.l=vo,e.addEventListener(t,a?bo:yo,a)):e.removeEventListener(t,a?bo:yo,a);else{if(i==`http://www.w3.org/2000/svg`)t=t.replace(/xlink(H|:h)/,`h`).replace(/sName$/,`s`);else if(t!=`width`&&t!=`height`&&t!=`href`&&t!=`list`&&t!=`form`&&t!=`tabIndex`&&t!=`download`&&t!=`rowSpan`&&t!=`colSpan`&&t!=`role`&&t!=`popover`&&t in e)try{e[t]=n??``;break n}catch{}typeof n==`function`||(n==null||!1===n&&t[4]!=`-`?e.removeAttribute(t):e.setAttribute(t,t==`popover`&&n==1?``:n))}}function Vo(e){return function(t){if(this.__l){var n=this.__l[t.type+e];if(t.u==null)t.u=vo++;else if(t.u<n.l)return;return n(G.event?G.event(t):t)}}}function Ho(e,t,n,r,i,a,o,s,c,l,u){var d,f,p,m,h,g,_,v,y,b,x,S,C,ee,w,T,E,D,O,k,A,j=t.type;if(t.constructor!=null)return null;128&n.__u&&(c=!!(32&n.__u),n.__c.__z&&(s=t.__e=n.__e=(a=n.__c.__z)[0],n.__c.__z=null)),(d=G.__b)&&d(t);n:if(typeof j==`function`)try{if(v=t.props,y=`prototype`in j&&j.prototype.render,b=(d=j.contextType)&&r[d.__c],x=d?b?b.props.value:d.__:r,n.__c?2&(f=t.__c=n.__c).__g&&(f.__g|=1,_=!0):(y?t.__c=f=new j(v,x):(t.__c=f=new Ao(v,x),f.constructor=j,f.render=Yo),b&&b.sub(f),f.props=v,f.state||={},f.context=x,f.__n=r,p=!0,f.__g|=8,f.__h=[],f._sb=[]),y&&f.__s==null&&(f.__s=f.state),y&&j.getDerivedStateFromProps!=null&&(f.__s==f.state&&(f.__s=To({},f.__s)),To(f.__s,j.getDerivedStateFromProps(v,f.__s))),m=f.props,h=f.state,f.__v=t,p)y&&j.getDerivedStateFromProps==null&&f.componentWillMount!=null&&f.componentWillMount(),y&&f.componentDidMount!=null&&f.__h.push(f.componentDidMount);else{if(y&&j.getDerivedStateFromProps==null&&v!==m&&f.componentWillReceiveProps!=null&&f.componentWillReceiveProps(v,x),!(4&f.__g)&&f.shouldComponentUpdate!=null&&!1===f.shouldComponentUpdate(v,f.__s,x)||t.__v==n.__v){for(t.__v!=n.__v&&(f.props=v,f.state=f.__s,f.__g&=-9),t.__e=n.__e,t.__k=n.__k,t.__k.some(function(e){e&&(e.__=t)}),S=0;S<f._sb.length;S++)f.__h.push(f._sb[S]);f._sb=[],f.__h.length&&o.push(f);break n}f.componentWillUpdate!=null&&f.componentWillUpdate(v,f.__s,x),y&&f.componentDidUpdate!=null&&f.__h.push(function(){f.componentDidUpdate(m,h,g)})}if(f.context=x,f.props=v,f.__P=e,f.__g&=-5,C=G.__r,ee=0,y){for(f.state=f.__s,f.__g&=-9,C&&C(t),d=f.render(f.props,f.state,f.context),w=0;w<f._sb.length;w++)f.__h.push(f._sb[w]);f._sb=[]}else do f.__g&=-9,C&&C(t),d=f.render(f.props,f.state,f.context),f.state=f.__s;while(8&f.__g&&++ee<25);f.state=f.__s,f.getChildContext!=null&&(r=To({},r,f.getChildContext())),y&&!p&&f.getSnapshotBeforeUpdate!=null&&(g=f.getSnapshotBeforeUpdate(m,h)),T=d,d!=null&&d.type===ko&&d.key==null&&(T=Go(d.props.children)),s=Fo(e,Co(T)?T:[T],t,n,r,i,a,o,s,c,l,u),t.__u&=-161,f.__h.length&&o.push(f),_&&(f.__g&=-4)}catch(e){if(t.__v=null,c||a!=null)if(e.then){for(E=0,D=!1,t.__u|=c?160:128,t.__c.__z=[],O=0;O<a.length;O++)(k=a[O])==null||D||(k.nodeType==8&&k.data==`$s`?(E>0&&t.__c.__z.push(k),E++,a[O]=null):k.nodeType==8&&k.data==`/$s`?(--E>0&&t.__c.__z.push(k),D=E===0,s=a[O],a[O]=null):E>0&&(t.__c.__z.push(k),a[O]=null));if(!D){for(;s&&s.nodeType==8&&s.nextSibling;)s=s.nextSibling;a[a.indexOf(s)]=null,t.__c.__z=[s]}t.__e=s}else{for(A=a.length;A--;)Eo(a[A]);Uo(t)}else t.__e=n.__e,t.__k=n.__k,e.then||Uo(t);G.__e(e,t,n)}else s=t.__e=Ko(n.__e,t,n,r,i,a,o,c,l,u);return(d=G.diffed)&&d(t),128&t.__u?void 0:s}function Uo(e){e&&e.__c&&(e.__c.__g|=4),e&&e.__k&&e.__k.forEach(Uo)}function Wo(e,t,n){for(var r=0;r<n.length;r++)qo(n[r],n[++r],n[++r]);G.__c&&G.__c(t,e),e.some(function(t){try{e=t.__h,t.__h=[],e.some(function(e){e.call(t)})}catch(e){G.__e(e,t.__v)}})}function Go(e){return typeof e!=`object`||!e||e.__b&&e.__b>0?e:Co(e)?e.map(Go):To({},e)}function Ko(e,t,n,r,i,a,o,s,c,l){var u,d,f,p,m,h,g,_,v=n.props,y=t.props,b=t.type;if(b==`svg`?i=`http://www.w3.org/2000/svg`:b==`math`?i=`http://www.w3.org/1998/Math/MathML`:i||=`http://www.w3.org/1999/xhtml`,a!=null){for(u=0;u<a.length;u++)if((m=a[u])&&`setAttribute`in m==!!b&&(b?m.localName==b:m.nodeType==3)){e=m,a[u]=null;break}}if(e==null){if(b==null)return l.createTextNode(y);e=l.createElementNS(i,b,y.is&&y),s&&=(G.__m&&G.__m(t,a),!1),a=null}if(b==null)v===y||s&&e.data==y||(e.data=y);else{if(a&&=wo.call(e.childNodes),v=n.props||xo,!s&&a!=null)for(v={},u=0;u<e.attributes.length;u++)v[(m=e.attributes[u]).name]=m.value;for(u in v)if(m=v[u],u!=`children`){if(u==`dangerouslySetInnerHTML`)f=m;else if(!(u in y)){if(u==`value`&&`defaultValue`in y||u==`checked`&&`defaultChecked`in y)continue;Bo(e,u,null,m,i)}}for(u in _=1&n.__u,y)m=y[u],u==`children`?p=m:u==`dangerouslySetInnerHTML`?d=m:u==`value`?h=m:u==`checked`?g=m:s&&typeof m!=`function`||v[u]===m&&!_||Bo(e,u,m,v[u],i);if(d)s||f&&(d.__html==f.__html||d.__html==e.innerHTML)||(e.innerHTML=d.__html),t.__k=[];else if(f&&(e.innerHTML=``),Fo(b==`template`?e.content:e,Co(p)?p:[p],t,n,r,b==`foreignObject`?`http://www.w3.org/1999/xhtml`:i,a,o,a?a[0]:n.__k&&jo(n,0),s,c,l),a!=null)for(u=a.length;u--;)Eo(a[u]);s||(u=`value`,b==`progress`&&h==null?e.removeAttribute(`value`):h==null||h===e[u]&&(b!==`progress`||h)||Bo(e,u,h,v[u],i),u=`checked`,g!=null&&g!=e[u]&&Bo(e,u,g,v[u],i))}return e}function qo(e,t,n){try{if(typeof e==`function`){var r=typeof e.__u==`function`;r&&e.__u(),r&&t==null||(e.__u=e(t))}else e.current=t}catch(e){G.__e(e,n)}}function Jo(e,t,n){var r,i;if(G.unmount&&G.unmount(e),(r=e.ref)&&(r.current&&r.current!=e.__e||qo(r,null,t)),(r=e.__c)!=null){if(r.componentWillUnmount)try{r.componentWillUnmount()}catch(e){G.__e(e,t)}r.__P=null}if(r=e.__k)for(i=0;i<r.length;i++)r[i]&&Jo(r[i],t,n||typeof e.type!=`function`);n||Eo(e.__e),e.__e&&e.__e.__l&&(e.__e.__l=null),e.__e=e.__c=e.__=null}function Yo(e,t,n){return this.constructor(e,n)}function Xo(e,t){var n,r,i,a;t==document&&(t=document.documentElement),G.__&&G.__(e,t),r=(n=!!(e&&32&e.__u))?null:t.__k,e=t.__k=Do(ko,null,[e]),i=[],a=[],Ho(t,e,r||xo,xo,t.namespaceURI,r?null:t.firstChild?wo.call(t.childNodes):null,i,r?r.__e:t.firstChild,n,a,t.ownerDocument),Wo(i,e,a)}function Zo(e,t){e.__u|=32,Xo(e,t)}G={__e:function(e,t,n,r){for(var i,a,o;t=t.__;)if((i=t.__c)&&!(1&i.__g)){i.__g|=4;try{if((a=i.constructor)&&a.getDerivedStateFromError!=null&&(i.setState(a.getDerivedStateFromError(e)),o=8&i.__g),i.componentDidCatch!=null&&(i.componentDidCatch(e,r||{}),o=8&i.__g),o)return void(i.__g|=2)}catch(t){e=t}}throw ho=0,e}},fo=0,Ao.prototype.setState=function(e,t){var n=this.__s!=null&&this.__s!=this.state?this.__s:this.__s=To({},this.state);typeof e==`function`&&(e=e(To({},n),this.props)),e&&To(n,e),e!=null&&this.__v&&(t&&this._sb.push(t),No(this))},Ao.prototype.forceUpdate=function(e){this.__v&&(this.__g|=4,e&&this.__h.push(e),No(this))},Ao.prototype.render=ko,po=[],ho=0,go=function(e,t){return e.__v.__b-t.__v.__b},_o=/(PointerCapture)$|Capture$/i,vo=0,yo=Vo(!1),bo=Vo(!0);var Qo=0;Array.isArray;function K(e,t,n,r,i,a){t||={};var o,s,c=t;if(`ref`in c&&typeof e!=`function`)for(s in c={},t)s==`ref`?o=t[s]:c[s]=t[s];var l={type:e,props:c,key:n,ref:o,__k:null,__:null,__b:0,__e:null,__c:null,constructor:void 0,__v:--Qo,__i:-1,__u:0,__source:i,__self:a};return G.vnode&&G.vnode(l),l}var $o=16,es=16,ts={};function ns({name:e,remappedFrom:t,token:n,width:r,height:i,viewBox:a,label:o,alignCapitals:s=!1}){"use no memo";let c=`#${e.replace(/^#/,``)}`,{width:l,height:u,viewBox:d}=ts[e]??{width:$o,height:es},f=r??l,p=i??u,m=a??d??`0 0 ${l} ${u}`;return K(`svg`,{"data-icon-name":t??e,"data-icon-token":n,"data-align-capitals":s,...o==null?{"aria-hidden":!0}:{"aria-label":o,role:`img`},viewBox:m,width:f,height:p,children:K(`use`,{href:c})})}var rs=e=>e!==void 0&&/\s/.test(e),is=(e,t)=>{let n=t=>rs(e[t-1])||rs(e[t]);if(!n(t))return t;for(let r=1;r<e.length;r++){let i=t-r;if(i>0&&!n(i))return i;let a=t+r;if(a<e.length&&!n(a))return a}return t},as=e=>is(e,Math.ceil(e.length/2)),os=e=>{if(e.length<2)return[e,``];let t=as(e);return[e.slice(0,t),e.slice(t)]},ss=e=>{if(e.length<4)return[e,``];let t=e.lastIndexOf(`.`)+1,n=e.length-t>10,r=t>=1&&!n?t:as(e);return[e.slice(0,r),e.slice(r)]},cs=e=>{if(e.length<4)return[e,``];let t=e.lastIndexOf(`/`)+1,n=e.length-t>25,r=t>=1&&!n?t:Math.ceil(e.length/2);return[e.slice(0,r),e.slice(r)]},ls=(e,{splitIndex:t}={})=>{if(typeof t!=`number`){let t=Math.ceil(e.length/2);return[e.slice(0,t),e.slice(t)]}return[e.slice(0,t),e.slice(t)]},us=(e,{splitOffset:t}={})=>{if(typeof t!=`number`||t<=0||t>=e.length){let t=Math.ceil(e.length/2);return[e.slice(0,t),e.slice(t)]}let n=e.length-t;return[e.slice(0,n),e.slice(n)]},ds=(e,{splitOffset:t}={})=>{if(typeof t!=`number`||t<=0||t>=e.length){let t=Math.ceil(e.length/2);return[e.slice(0,t),e.slice(t)]}let n=t;return[e.slice(0,n),e.slice(n)]};function fs({children:e,marker:t,variant:n=`default`}){"use no memo";return K(`div`,{"aria-hidden":!0,"data-truncate-marker-cell":!0,children:K(`div`,{"data-truncate-marker":!0,children:typeof t==`function`?t({children:e}):n===`fade`?K(`span`,{"data-truncate-fade":!0}):t})})}function ps(e){"use no memo";let{mode:t,children:n}=e;return K(`div`,{children:[K(`div`,{"data-truncate-content":`visible`,children:t===`fruncate`?K(`span`,{children:n}):n}),K(`div`,{"data-truncate-content":`overflow`,"aria-hidden":!0,children:t===`fruncate`?K(`span`,{children:n}):n})]})}function ms({children:e,mode:t=`truncate`,marker:n=`…`,variant:r=`default`,...i}){"use no memo";let a=K(ps,{mode:t,children:e},`content`),o=K(fs,{marker:n,mode:t,variant:r},`marker`),s=K(`div`,{"data-truncate-fill":!0},`fill`);return K(`div`,{"data-truncate-container":t,"data-truncate-variant":r,...i,children:K(`div`,{"data-truncate-grid":!0,children:t===`truncate`?[a,o]:[o,a,s]})})}function hs({children:e,...t}){"use no memo";return K(ms,{mode:`truncate`,...t,children:e})}function gs({children:e,...t}){"use no memo";return K(ms,{mode:`fruncate`,...t,children:e})}function _s({children:e,contents:t,priority:n=`end`,split:r=`center`,minimumLength:i=12,className:a,style:o,...s}){"use no memo";let c=null,l=null;if(Array.isArray(t)){if(t.length!==2)return console.error(`MiddleTruncate: contents must be an array of two items`),null;c=K(hs,{...s,children:t[0]}),l=K(gs,{...s,children:t[1]})}else{if(typeof e!=`string`)return console.error(`MiddleTruncate: children must be a string`),null;if(e.length===0)return K(`div`,{className:a,style:o});if(e.length<i)return K(n===`end`?gs:hs,{...s,className:a,style:o,children:e});let t=null,u=null,d=null;if(typeof r==`string`)r===`center`?t=os:r===`extension`?t=ss:r===`leaf-path`&&(t=cs);else if(typeof r==`number`)t=ls,u=r;else if(Array.isArray(r)){let[e,n]=r;d=n,e===`last`?t=us:e===`first`&&(t=ds)}else typeof r==`function`&&(t=r);t??=os;let[f,p]=t(e,{priority:n,variant:s.variant,splitIndex:typeof u==`number`?u:void 0,splitOffset:typeof d==`number`?d:void 0}),m=f.length>=p.length,h=n===`equal`&&!m,g=n===`equal`&&m,_={},v={};h&&(_.marker=``),g&&(v.marker=``),c=K(hs,{...s,..._,children:f}),l=K(gs,{...s,...v,children:p})}return K(`div`,{"data-truncate-group-container":`middle`,className:a,style:o,children:[K(`div`,{"data-truncate-segment-priority":n===`start`||n===`equal`?`1`:`2`,children:c}),K(`div`,{"data-truncate-segment-priority":n===`end`||n===`equal`?`1`:`2`,children:l})]})}var vs={endIndex:-1,startIndex:-1};function ys(e,t,n){return Math.min(Math.max(e,t),n)}function bs(e,t){return e<0||t<e?vs:{endIndex:t,startIndex:e}}function xs(e){return e.startIndex<0||e.endIndex<e.startIndex}function Ss(e,t){return xs(e)?0:(e.endIndex-e.startIndex+1)*t}function Cs(e,t,n){if(t<=0)return-1;let r=t*n;return e<=0?0:e>=r?t:Math.floor(e/n)}function ws(e,t,n){return t<=0||e<=0?-1:e>=t*n?t-1:Math.ceil(e/n)-1}function Ts(e){let t=new Map;return e.forEach((e,n)=>{if(e.kind!==`directory`||!e.isExpanded)return;let r=e.ancestorPaths.length,i=t.get(r);if(i==null){t.set(r,[n]);return}i.push(n)}),t}function Es(e,t){let n=0,r=e.length-1,i=-1;for(;n<=r;){let a=Math.floor((n+r)/2),o=e[a];if(o==null)break;if(o<=t){i=a,n=a+1;continue}r=a-1}return i}function Ds(e){let t=new Map,n=[];for(let r=0;r<e.length;r+=1){let i=e[r];if(i==null)continue;let a=i.kind===`directory`&&i.isExpanded?[...i.ancestorPaths,i.path]:i.ancestorPaths,o=0;for(;o<n.length&&o<a.length&&n[o]===a[o];)o+=1;for(let e=n.length-1;e>=o;--e){let i=n[e];i!=null&&t.set(i,r-1)}n.length=o;for(let e=o;e<a.length;e+=1){let t=a[e];t!=null&&n.push(t)}}let r=e.length-1;for(let e of n)t.set(e,r);return t}function Os(e,t,n){if(e.length===0||t<=0)return[];let r=Ds(e),i=Ts(e),a=[];for(let r=0;r<e.length;r+=1){let o=i.get(r);if(o==null||o.length===0)break;let s=t+r*n,c=Es(o,Math.min(e.length-1,Math.floor(s/n))),l=null;for(;c>=0;){let t=o[c],n=t==null?null:e[t]??null;if(n!=null&&(r===0||n.ancestorPaths[r-1]===a[r-1]?.path)){l=n;break}--c}if(l==null)break;a.push(l)}return a.map((i,a)=>{let o=a*n,s=(r.get(i.path)??e.length-1)+1;if(s>=e.length)return{row:i,top:o};let c=s*n-t;return{row:i,top:Math.min(o,c-n)}}).filter(e=>e.top+n>0)}function ks(e,t){let n=t.totalRowCount??e.length,r=n*t.itemHeight,i=Math.max(0,t.viewportHeight),a=Math.max(0,Math.floor(t.overscan)),o=Math.max(0,r-i),s=ys(t.scrollTop,0,o),c=t.stickyRows??Os(e,s,t.itemHeight),l=c.reduce((e,n)=>Math.max(e,n.top+t.itemHeight),0),u=Math.min(r,s+l),d=Math.max(0,i-l),f=Math.max(0,r-u),p=Cs(s,n,t.itemHeight),m=Cs(u,n,t.itemHeight),h=l<=0||p<0||p>=n?-1:p,g=h===-1?-1:Math.min(n-1,m-1),_=h===-1||g<h?0:g-h+1,v=d<=0||m>=n?vs:bs(m,ws(u+d,n,t.itemHeight)),y=g+1,b=xs(v)?vs:bs(Math.max(y,v.startIndex-a),Math.min(n-1,v.endIndex+a)),x=Ss(b,t.itemHeight);return{occlusion:{firstOccludedIndex:h,lastOccludedIndex:g,occludedCount:_},physical:{itemHeight:t.itemHeight,maxScrollTop:o,overscan:a,scrollTop:s,totalHeight:r,totalRowCount:n,viewportHeight:i},projected:{contentHeight:f,paneHeight:d,paneTop:u},sticky:{height:l,rows:c},visible:v,window:{endIndex:b.endIndex,height:x,offsetTop:xs(b)?0:b.startIndex*t.itemHeight,startIndex:b.startIndex}}}var As={added:`A`,deleted:`D`,ignored:null,modified:`M`,renamed:`R`,untracked:`U`},js={added:`Git status: added`,deleted:`Git status: deleted`,ignored:`Git status: ignored`,modified:`Git status: modified`,renamed:`Git status: renamed`,untracked:`Git status: untracked`},Ms=`Contains git status items`;function Ns(e){return e.current?!0:(e.current=!0,!1)}function Ps(e){let{currentScrollTop:t,focusedIndex:n,itemHeight:r,topInset:i=0,viewportHeight:a}=e;if(n<0)return null;let o=Math.max(0,i),s=n*r,c=s+r;if(s<t+o){let e=Math.max(0,s-o);return e===t?null:e}if(c>t+a){let e=c-a;return e===t?null:e}return null}function Fs(e){let{currentScrollTop:t,focusedIndex:n,itemHeight:r,offset:i,topInset:a=0,totalHeight:o,viewportHeight:s}=e;if(i===`nearest`)return Ps({currentScrollTop:t,focusedIndex:n,itemHeight:r,topInset:a,viewportHeight:s});if(n<0)return null;let c=Math.max(0,a),l=n*r,u=Math.max(0,s-c),d=i===`center`?c+Math.max(0,(u-r)/2):c,f=Math.max(0,o-s),p=Math.max(0,Math.min(l-d,f));return p===t?null:p}function Is(e){let{currentScrollTop:t,focusedIndex:n,itemHeight:r,targetViewportOffset:i,totalHeight:a,viewportHeight:o}=e;if(n<0)return null;let s=Math.max(0,i),c=n*r,l=c+r,u=t+s,d=t+o;if(c>=u&&l<=d)return null;let f=Math.max(0,a-o),p=Math.max(0,Math.min(c-s,f));return p===t?null:p}function Ls(e){if(e==null||!e.isConnected||e===document.body||e===document.documentElement)return!1;e.focus({preventScroll:!0});let t=e.getRootNode();return t instanceof ShadowRoot?t.activeElement===e:document.activeElement===e}function Rs(e){let t=e.getRootNode();if(t instanceof ShadowRoot){let e=t.activeElement;return e instanceof HTMLElement?e:null}let n=document.activeElement;return n instanceof HTMLElement&&e.contains(n)?n:null}function zs(e,t){if(e==null)return t;let n=e.getBoundingClientRect().height;return n>0?n:e.clientHeight>0?e.clientHeight:t}function Bs(e,t){return e!=null&&e>0?e:t}function Vs(e){let t=e.borderBoxSize,n=Array.isArray(t)?t[0]:t;return n!=null&&Number.isFinite(n.blockSize)&&n.blockSize>0?n.blockSize:e.contentRect.height>0?e.contentRect.height:null}function Hs(e,t,n,r,i=0){let a=Ps({currentScrollTop:e.scrollTop,focusedIndex:t,itemHeight:n,topInset:i,viewportHeight:r});return a==null?!1:(e.scrollTop=a,!0)}function Us(e,t,n,r,i,a,o=0){let s=Fs({currentScrollTop:e.scrollTop,focusedIndex:t,itemHeight:n,offset:a,topInset:o,totalHeight:i,viewportHeight:r});return s==null?!1:(e.scrollTop=s,!0)}function Ws(e,t,n,r,i,a){let o=Is({currentScrollTop:e.scrollTop,focusedIndex:t,itemHeight:n,targetViewportOffset:a,totalHeight:i,viewportHeight:r});return o==null?!1:(e.scrollTop=o,!0)}function Gs(e,t,n,r){return n.end<n.start?null:e<n.start?-t:e>n.end?r:null}function Ks(e){let{renamingPath:t,previousRenamingPath:n,hasRenderedInput:r}=e;return t==null?`reset`:r?n===t?`ignore`:`focus-input`:`reveal-canonical`}function qs({ariaLabel:e,isFlattened:t=!1,ref:n,value:r,onBlur:i,onInput:a}){return K(`input`,{ref:n,"data-item-rename-input":!0,...t?{"data-item-flattened-rename-input":!0}:{},"aria-label":e,value:r,onBlur:i,onInput:a,onClick:e=>e.stopPropagation(),onMouseDown:e=>e.stopPropagation(),onPointerDown:e=>e.stopPropagation()})}function Js(e){let{row:t,mode:n,targetPath:r,ariaLabel:i,domId:a,isParked:o,itemHeight:s,features:c,state:l,extraStyle:u}=e,d=n===`sticky`,f=t.ancestorPaths.at(-1)??``,p={};return l.isFocusRinged&&(p[`data-item-focused`]=!0),t.isSelected&&(p[`data-item-selected`]=!0),l.isContextHovered&&(p[`data-item-context-hover`]=`true`),l.isDragTarget&&(p[`data-item-drag-target`]=!0),l.isDragging&&(p[`data-item-dragging`]=!0),l.effectiveGitStatus!=null&&(p[`data-item-git-status`]=l.effectiveGitStatus),l.containsGitChange&&(p[`data-item-contains-git-change`]=`true`),{"aria-expanded":!d&&t.kind===`directory`?t.isExpanded:void 0,"aria-haspopup":c.contextMenuEnabled?`menu`:void 0,"aria-label":i,"aria-level":d?void 0:t.level+1,"aria-posinset":d?void 0:t.posInSet+1,"aria-selected":d?void 0:t.isSelected?`true`:`false`,"aria-setsize":d?void 0:t.setSize,"data-file-tree-sticky-path":d?r:void 0,"data-file-tree-sticky-row":d?`true`:void 0,"data-item-context-menu-button-visibility":c.actionLaneEnabled?c.contextMenuButtonVisibility:void 0,"data-item-context-menu-trigger-mode":c.contextMenuEnabled?c.contextMenuTriggerMode:void 0,"data-item-has-context-menu-action-lane":c.actionLaneEnabled?`true`:void 0,"data-item-has-git-lane":c.gitLaneActive?`true`:void 0,"data-item-parent-path":f.length>0?f:void 0,"data-item-parked":o?`true`:void 0,"data-item-path":r,"data-item-type":t.kind===`directory`?`folder`:`file`,"data-type":`item`,id:d?void 0:a,role:d?void 0:`treeitem`,style:{minHeight:`${s}px`,...u},tabIndex:!d&&t.isFocused?0:-1,...p}}function Ys(e){let{event:t,mode:n,isSearchOpen:r,isDirectory:i}=e,a=t.ctrlKey||t.metaKey,o=t.shiftKey||a,s=t.shiftKey?{additive:a,kind:`range`}:a?{kind:`toggle`}:{kind:`single`};return{closeSearch:r,revealCanonical:n===`sticky`,selection:s,toggleDirectory:!o&&i}}var Xs,q,Zs,Qs,$s=Object.is,ec=0,tc=[],J=G,nc=J.__b,rc=J.__r,ic=J.diffed,ac=J.__c,oc=J.unmount,sc=J.__;function cc(e,t){J.__h&&J.__h(q,e,ec||t),ec=0;var n=q.__H||={__:[],__h:[]};return e>=n.__.length&&n.__.push({}),n.__[e]}function lc(e){return ec=1,uc(xc,e)}function uc(e,t,n){var r=cc(Xs++,2);if(r.t=e,!r.__c&&(r.__=[n?n(t):xc(void 0,t),function(e){var t=r.__N?r.__N[0]:r.__[0],n=r.t(t,e);$s(t,n)||(r.__N=[n,r.__[1]],r.__c.setState({}))}],r.__c=q,!q.__f)){var i=function(e,t,n){if(!r.__c.__H)return!0;var i=r.__c.__H.__.filter(function(e){return!!e.__c});if(i.every(function(e){return!e.__N}))return!a||a.call(this,e,t,n);var o=r.__c.props!==e;return i.forEach(function(e){if(e.__N){var t=e.__[0];e.__=e.__N,e.__N=void 0,$s(t,e.__[0])||(o=!0)}}),a&&a.call(this,e,t,n)||o};q.__f=!0;var a=q.shouldComponentUpdate,o=q.componentWillUpdate;q.componentWillUpdate=function(e,t,n){if(4&this.__g){var r=a;a=void 0,i(e,t,n),a=r}o&&o.call(this,e,t,n)},q.shouldComponentUpdate=i}return r.__N||r.__}function dc(e,t){var n=cc(Xs++,3);!J.__s&&bc(n.__H,t)&&(n.__=e,n.u=t,q.__H.__h.push(n))}function fc(e,t){var n=cc(Xs++,4);!J.__s&&bc(n.__H,t)&&(n.__=e,n.u=t,q.__h.push(n))}function Y(e){return ec=5,pc(function(){return{current:e}},[])}function pc(e,t){var n=cc(Xs++,7);return bc(n.__H,t)&&(n.__=e(),n.__H=t,n.__h=e),n.__}function mc(e,t){return ec=8,pc(function(){return e},t)}function hc(){for(var e;e=tc.shift();)if(e.__P&&e.__H)try{e.__H.__h.forEach(vc),e.__H.__h.forEach(yc),e.__H.__h=[]}catch(t){e.__H.__h=[],J.__e(t,e.__v)}}J.__b=function(e){q=null,nc&&nc(e)},J.__=function(e,t){e&&t.__k&&t.__k.__m&&(e.__m=t.__k.__m),sc&&sc(e,t)},J.__r=function(e){rc&&rc(e),Xs=0;var t=(q=e.__c).__H;t&&(Zs===q?(t.__h=[],q.__h=[],t.__.forEach(function(e){e.__N&&(e.__=e.__N),e.u=e.__N=void 0})):(t.__h.forEach(vc),t.__h.forEach(yc),t.__h=[],Xs=0)),Zs=q},J.diffed=function(e){ic&&ic(e);var t=e.__c;t&&t.__H&&(t.__H.__h.length&&(tc.push(t)!==1&&Qs===J.requestAnimationFrame||((Qs=J.requestAnimationFrame)||_c)(hc)),t.__H.__.forEach(function(e){e.u&&(e.__H=e.u),e.u=void 0})),Zs=q=null},J.__c=function(e,t){t.some(function(e){try{e.__h.forEach(vc),e.__h=e.__h.filter(function(e){return!e.__||yc(e)})}catch(n){t.some(function(e){e.__h&&=[]}),t=[],J.__e(n,e.__v)}}),ac&&ac(e,t)},J.unmount=function(e){oc&&oc(e);var t,n=e.__c;n&&n.__H&&(n.__H.__.forEach(function(e){try{vc(e)}catch(e){t=e}}),n.__H=void 0,t&&J.__e(t,n.__v))};var gc=typeof requestAnimationFrame==`function`;function _c(e){var t,n=function(){clearTimeout(r),gc&&cancelAnimationFrame(t),setTimeout(e)},r=setTimeout(n,35);gc&&(t=requestAnimationFrame(n))}function vc(e){var t=q,n=e.__c;typeof n==`function`&&(e.__c=void 0,n()),q=t}function yc(e){var t=q;e.__c=e.__(),q=t}function bc(e,t){return!e||e.length!==t.length||t.some(function(t,n){return!$s(t,e[n])})}function xc(e,t){return typeof t==`function`?t(e):t}function Sc(e,t=null,n=null){"use no memo";let r=e.flattenedSegments;return r==null||r.length===0?t??e.name:K(`span`,{"data-item-flattened-subitems":!0,children:r.map((e,i)=>{let a=i===r.length-1;return K(ko,{children:[K(`span`,{"data-item-flattened-subitem":e.path,"data-item-flattened-subitem-drag-target":n===e.path?`true`:void 0,children:a&&t!=null?t:K(hs,{children:e.name})}),i<r.length-1?` / `:``]},e.path)})})}function Cc(e){return e.isFlattened?e.flattenedSegments?.findLast(e=>e.isTerminal)?.path??e.path:e.path}function wc(e){let t=e.flattenedSegments;return t==null||t.length===0?e.name:t.map(e=>e.name).join(` / `)}function Tc(e,t,n,r){return e.map((e,i)=>{let a=i*n,o=e.subtreeEndIndex+1;if(o>=r)return{row:e.row,top:a};let s=o*n-t;return{row:e.row,top:Math.min(a,s-n)}}).filter(e=>e.top+n>0)}function Ec({controller:e,itemHeight:t,overscan:n,scrollTop:r,stickyFolders:i,viewportHeight:a}){let o=e.getVisibleCount(),s=i&&o>0?e.getStickyRowCandidates(r,t):[],c=s==null&&i&&o>0?e.getVisibleRows(0,o-1):[],l=ks(c,{itemHeight:t,overscan:n,scrollTop:r,stickyRows:s==null?void 0:Tc(s,r,t,o),totalRowCount:o,viewportHeight:a}),u=i&&r<=0&&o>0?e.getStickyRowCandidates(1,t):[],d=u!=null&&r<=0?Tc(u,1,t,o):i&&r<=0&&c.length>0?Os(c,1,t):l.sticky.rows;return{overlayHeight:d.reduce((e,n)=>Math.max(e,n.top+t),0),overlayRows:d,snapshot:l,visibleRows:c}}var Dc=400,Oc=10,kc=40,Ac=18;function jc(e,t,n){let r=e,i=document.elementFromPoint?.bind(document)??null,a=r.elementFromPoint?.(t,n)??i?.(t,n)??null;return e instanceof ShadowRoot&&(a==null||!e.contains(a))?Mc(e,t,n):a instanceof HTMLElement?a:null}function Mc(e,t,n){let r=Array.from(e.querySelectorAll(`[data-type="item"], [data-item-flattened-subitem]`));for(let e=r.length-1;e>=0;e--){let i=r[e],a=i.getBoundingClientRect();if(t>=a.left&&t<=a.right&&n>=a.top&&n<=a.bottom)return i}return null}function Nc(e){let t=e?.closest?.(`[data-type="item"]`);if(!(t instanceof HTMLElement))return null;let n=t.dataset.itemPath??null;if(n==null)return null;let r=e?.closest?.(`[data-item-flattened-subitem]`),i=r instanceof HTMLElement?r.getAttribute(`data-item-flattened-subitem`)??null:null;if(i!=null&&i.endsWith(`/`))return{directoryPath:i,flattenedSegmentPath:i,hoveredPath:n,kind:`directory`};if(t.dataset.itemType===`folder`)return{directoryPath:n,flattenedSegmentPath:null,hoveredPath:n,kind:`directory`};let a=t.dataset.itemParentPath??null;return a==null||a.length===0?{directoryPath:null,flattenedSegmentPath:null,hoveredPath:n,kind:`root`}:{directoryPath:a,flattenedSegmentPath:null,hoveredPath:n,kind:`directory`}}function Pc(e){let t=e.cloneNode(!0);return t.removeAttribute(`id`),t.dataset.fileTreeDragPreview=`true`,t.setAttribute(`aria-hidden`,`true`),t.tabIndex=-1,Object.assign(t.style,{boxShadow:`0 4px 12px rgba(0, 0, 0, 0.15)`,left:`0px`,margin:`0`,pointerEvents:`none`,position:`fixed`,top:`0px`,willChange:`transform`,zIndex:`10000`}),t}function Fc(){return navigator.vendor!==`Apple Computer, Inc.`}function Ic(e,t){let n=e-t.top;if(n<kc)return-Math.ceil((kc-Math.max(0,n))/kc*Ac);let r=t.bottom-e;return r<kc?Math.ceil((kc-Math.max(0,r))/kc*Ac):0}function Lc(e,t){if(e!=null){let t=As[e];return t==null?null:{text:t,title:js[e]}}return t?{icon:{name:`file-tree-icon-dot`,width:6,height:6},title:Ms}:null}function Rc(e,t,n){if(t==null||t.size===0)return null;let r=[];for(let i=e.length-1;i>=0;--i){let a=e[i],o=n.get(a);if(o!=null){for(let e of r)n.set(e,o);return o?`ignored`:null}if(t.has(a)){n.set(a,!0);for(let e of r)n.set(e,!0);return`ignored`}r.push(a)}for(let e of r)n.set(e,!1);return null}function zc(e){return e!=null&&`toggle`in e}function Bc(e){return e.code===`Space`||e.key===` `||e.key===`Spacebar`}function Vc(e){return e.key.length===1&&/^[\p{L}\p{N}]$/u.test(e.key)&&!e.ctrlKey&&!e.metaKey&&!e.altKey}function Hc(e){return e==null?``:`[data-item-section="spacing-item"][data-ancestor-path="${e.replaceAll(`\\`,`\\\\`).replaceAll(`"`,`\\"`)}"] { opacity: 1; }`}function Uc(e){return e.shiftKey&&e.key===`F10`||e.key===`ContextMenu`}function Wc(e,t){return t&&Uc(e)||(e.ctrlKey||e.metaKey)&&Bc(e)?!0:e.key===`ArrowDown`||e.key===`ArrowLeft`||e.key===`ArrowRight`||e.key===`ArrowUp`}var Gc=new Set([`ArrowDown`,`ArrowLeft`,`ArrowRight`,`ArrowUp`,`End`,`Home`,`PageDown`,`PageUp`]);function Kc(e){for(let t of e.composedPath())if(t instanceof HTMLElement&&(t.dataset.fileTreeContextMenuRoot===`true`||t.dataset.type===`context-menu-anchor`||t.dataset.type===`context-menu-trigger`||t.getAttribute(`slot`)===`context-menu`))return!0;return!1}function qc(e){return{bottom:e.bottom,height:e.height,left:e.left,right:e.right,top:e.top,width:e.width,x:e.x,y:e.y}}function Jc(e,t){return{bottom:t,height:0,left:e,right:e,top:t,width:0,x:e,y:t}}function Yc(e,t){if(e==null)return t.offsetTop;let n=t.getBoundingClientRect(),r=e.getBoundingClientRect();return n.top-r.top}function Xc(e,t,n){if(n==null){e.delete(t);return}e.set(t,n)}function Zc(e,t,n){if(e==null)return null;let r=t.get(e)??null;if(r!=null)return r;let i=n.get(e)??null;return i?.dataset.itemParked===`true`?null:i}function Qc(e){if(e==null)return[];let t=[];for(let n of e.querySelectorAll(`button[data-file-tree-sticky-row="true"]`)){if(!(n instanceof HTMLElement))continue;let e=n.dataset.fileTreeStickyPath;e!=null&&t.push(e)}return t}function $c(e,t){if(e==null||t==null)return null;for(let n of e.querySelectorAll(`button[data-item-focused="true"][data-item-parked="true"]`))if(n instanceof HTMLElement&&n.dataset.itemPath===t)return n;return null}function el(e,t,n,r,i,a,o){let s=Math.max(0,a-i),c=t?.getBoundingClientRect()??null,l=c==null||n==null?null:n.getBoundingClientRect().top-c.top,u=$c(e,r),d=c==null||u==null?null:u.getBoundingClientRect().top-c.top;return Math.max(0,Math.min(d??Math.max(l??0,s),Math.max(0,o-i)))}function tl(e,t){return{kind:e.kind,name:wc(e),path:t}}function nl(e){return e==null?void 0:`${e}__tree`}function rl(e,t,n){if(e!=null)return`${e}__focused-item-${encodeURIComponent(t)}${n?`__parked`:``}`}function il(e){return e===`file-tree-icon-chevron`||e===`file-tree-icon-dot`||e===`file-tree-icon-file`||e===`file-tree-icon-lock`}function al(e,t){if(e==null)return null;if(`text`in e)return K(`span`,{title:e.title,children:e.text});let n=typeof e.icon==`string`?il(e.icon)?t(e.icon):{name:e.icon}:il(e.icon.name)?(()=>{let n=t(e.icon.name),{name:r,...i}=e.icon;return{...n,...i}})():e.icon;return K(`span`,{title:e.title,children:K(ns,{...n})})}function ol(e){e!=null&&Ls(e.querySelector([`button:not([disabled])`,`[href]`,`input:not([disabled])`,`select:not([disabled])`,`textarea:not([disabled])`,`[tabindex]:not([tabindex="-1"])`].join(`, `))??e)}function sl(e,t,{actionLaneEnabled:n=!1,customDecoration:r=null,decorationLaneEnabled:i=!1,dragTargetFlattenedSegmentPath:a=null,gitDecoration:o=null,gitLaneActive:s=!1,renameInput:c=null,showDecorativeActionAffordance:l=!1}={}){let u=Cc(e);return K(ko,{children:[e.depth>0?K(`div`,{"data-item-section":`spacing`,children:Array.from({length:e.depth}).map((t,n)=>K(`div`,{"data-item-section":`spacing-item`,"data-ancestor-path":e.ancestorPaths[n]},n))}):null,K(`div`,{"data-item-section":`icon`,children:e.kind===`directory`?K(ns,{...t(`file-tree-icon-chevron`)}):K(ns,{...t(`file-tree-icon-file`,u)})}),K(`div`,{"data-item-section":`content`,children:e.isFlattened?Sc(e,c,a):c??K(_s,{minimumLength:5,split:`extension`,children:e.name})}),i?K(`div`,{"data-item-section":`decoration`,children:r==null?null:al(r,t)}):null,s?K(`div`,{"data-item-section":`git`,children:al(o,t)}):null,n?K(`div`,{"data-item-section":`action`,children:l?K(`span`,{"aria-hidden":`true`,"data-item-action-affordance":`decorative`,children:K(ns,{...t(`file-tree-icon-ellipsis`)})}):null}):null]})}function cl(e,t,n,r={}){let{controller:i,renameView:a,visualFocusPath:o,contextHoverPath:s,draggedPathSet:c,dragTarget:l,dragAndDropEnabled:u,shouldSuppressContextMenu:d,handleRowDragStart:f,handleRowDragEnd:p,handleRowTouchStart:m,instanceId:h,itemHeight:g,gitStatusByPath:_,ignoredGitDirectories:v,ignoredInheritanceCache:y,directoriesWithGitChanges:b,gitLaneActive:x,contextMenuEnabled:S,contextMenuTriggerMode:C,contextMenuButtonTriggerEnabled:ee,contextMenuButtonVisibility:w,contextMenuRightClickEnabled:T,registerRenameInput:E,registerButton:D,resolveIcon:O,renderDecorationForRow:k,openContextMenuForRow:A,onRowClick:j,onKeyDown:M}=e,N=Cc(t),{isParked:te=!1,mode:ne=`flow`,style:re}=r,ie=ne===`sticky`,ae=_?.get(N)??null??Rc(t.ancestorPaths,v,y),oe=t.kind===`directory`&&(b?.has(N)??!1),se=k(t,N),ce=Lc(ae,oe),le=S&&ee,ue=se!=null||x||le,de=le&&w===`always`,fe=a.getPath()===N,pe=fe?a.getValue():``,me=ie||!fe?null:K(qs,{ref:E,ariaLabel:`Rename ${wc(t)}`,isFlattened:t.isFlattened,value:pe,onBlur:()=>{a.commit()},onInput:e=>{a.setValue(e.currentTarget.value)}}),he=sl(t,O,{actionLaneEnabled:le,customDecoration:se,decorationLaneEnabled:ue,dragTargetFlattenedSegmentPath:l?.flattenedSegmentPath??null,gitDecoration:ce,gitLaneActive:x,renameInput:me,showDecorativeActionAffordance:de}),ge={...Js({ariaLabel:wc(t),domId:t.isFocused?rl(h,N,te):void 0,extraStyle:re,features:{actionLaneEnabled:le,contextMenuButtonVisibility:le?w:null,contextMenuEnabled:S,contextMenuTriggerMode:S?C:null,gitLaneActive:x},isParked:te,itemHeight:g,mode:ne,row:t,state:{containsGitChange:oe,effectiveGitStatus:ae,isContextHovered:s===N,isDragTarget:l?.kind===`directory`&&l.directoryPath===N,isDragging:c?.has(N)===!0,isFocusRinged:t.isFocused&&o===N},targetPath:N}),key:n,onContextMenu:S||u?e=>{if(d()){e.preventDefault();return}S&&(e.preventDefault(),T&&(i.focusMountedPathFromInput(N),A(t,N,{anchorRect:Jc(e.clientX,e.clientY),source:`right-click`})))}:void 0,onFocus:ie?void 0:()=>{i.focusMountedPathFromInput(N)},onKeyDown:ie?void 0:M,ref:e=>{D(N,e)}};return!ie&&fe?K(`div`,{...ge,children:he}):K(`button`,{...ge,type:`button`,draggable:u&&!te,onDragEnd:u&&!te?p:void 0,onDragStart:u&&!te?e=>{f(e,t,N)}:void 0,onMouseDown:e=>{if(ie){e.preventDefault();return}i.isSearchOpen()&&e.preventDefault()},onTouchStart:u&&!te?e=>{m(e,t,N)}:void 0,onClick:e=>{j(e,t,N,ne)},children:he})}function ll(e,t,n){return t.end<t.start?[]:e.controller.getVisibleRows(t.start,t.end).filter(e=>!n.has(Cc(e))).map((n,r)=>cl(e,n,t.start+r))}function ul({composition:e,controller:t,gitStatusByPath:n,ignoredGitDirectories:r,directoriesWithGitChanges:i,icons:a,instanceId:o,itemHeight:s=St,overscan:c=10,renamingEnabled:l=!1,renderRowDecoration:u,searchBlurBehavior:d=`close`,searchEnabled:f=!1,searchFakeFocus:p=!1,slotHost:m,stickyFolders:h=!1,initialViewportHeight:g=420}){"use no memo";let _=Y(null),v=Y(null),y=Y(!1),b=Y(null),x=Y(null),S=Y(null),C=Y(null),ee=Y(null),w=Y(new Map),T=Y(new Map),E=Y(()=>{}),D=Y(null),O=Y(0),k=Y(!1),A=Y(null);A.current!==t&&(k.current=!1,A.current=t);let j=Y(!1),M=Y(null),re=Y(null),ie=Y(!1),ae=Y(null),oe=Y(null),se=Y(null),ce=Y(null),le=Y(null),ue=Y(null),de=Y(null),fe=Y(null),pe=Y(!1),me=Y(null),he=Y(null),ge=Y(null),_e=Y(null),ve=pc(()=>new Map,[]),[,ye]=lc(0),be=Y(!1),[xe,Se]=lc(null),[Ce,we]=lc(null),[Te,Ee]=lc(null),[De,Oe]=lc(null),[ke,Ae]=lc(0),[P,je]=lc(null),Me=Y(P);Me.current=P;let Ne=Y(null),Pe=Y(null),Fe=Y(null),Ie=Y(null),Le=Y(null),Re=Y(!1),ze=()=>{Pe.current=null,Fe.current=null,Ie.current=null},Be=(e,t)=>{Pe.current=e,Fe.current=null,Ie.current=t==null?null:{path:e,scrollTop:t}},Ve=(e,t)=>{Pe.current=null,Fe.current={path:e,viewportOffset:t},Ie.current=null},He=Y(d===`retain`&&t.isSearchOpen()),[Ue,We]=lc(p);dc(()=>{p||We(!1)},[p]);let Ge=Y(!1),Ke=mc(()=>{Ge.current=!0,We(e=>e&&!1)},[]),[qe,Je]=lc(()=>Ec({controller:t,itemHeight:s,overscan:c,scrollTop:0,stickyFolders:h,viewportHeight:g})),[Ye,Xe]=lc(!1);dc(()=>{Xe(!0)},[]);let Ze=e?.contextMenu?.enabled===!0||e?.contextMenu?.render!=null||e?.contextMenu?.onOpen!=null||e?.contextMenu?.onClose!=null,Qe=e?.contextMenu?.triggerMode??(Ze?`right-click`:`both`),$e=Qe===`both`||Qe===`button`,et=e?.contextMenu?.buttonVisibility??`when-needed`,tt=Qe===`both`||Qe===`right-click`;fc(()=>{let e=S.current;if(e==null)return;let t=e=>{if(!(e instanceof CustomEvent))return;let t=e.detail?.path??null;Le.current=t,we(t),Oe(t==null?null:`pointer`)},n=e=>{e instanceof CustomEvent&&(Re.current=e.detail?.disabled===!0)};return e.addEventListener(`file-tree-debug-set-context-menu-trigger`,t),e.addEventListener(`file-tree-debug-set-scroll-suppression`,n),()=>{e.removeEventListener(`file-tree-debug-set-context-menu-trigger`,t),e.removeEventListener(`file-tree-debug-set-scroll-suppression`,n)}},[]);let nt=mc((e,t)=>{Xc(w.current,e,t)},[]),rt=mc((e,t)=>{Xc(T.current,e,t)},[]),it=mc(e=>{x.current=e},[]),at=mc(e=>Zc(e,T.current,w.current),[]),ot=n!=null||r!=null||i!=null,{resolveIcon:st}=pc(()=>uo(a),[a]),ct=t[Ba](),lt=ct.getPath(),ut=lt!=null,dt=t.isSearchOpen(),ft=t.getSearchValue(),F=t.getFocusedPath(),I=t.getFocusedIndex(),pt=t.getScrollRequest(),mt=t.isDragAndDropEnabled(),ht=t.getDragSession(),gt=pc(()=>ht==null?null:new Set(ht.draggedPaths),[ht]),_t=ht?.target??null,vt=ht?.primaryPath??null,yt=nl(o),{overlayHeight:bt,overlayRows:xt,snapshot:L,visibleRows:Ct}=qe,R=L.physical.viewportHeight,wt=pc(()=>({end:L.window.endIndex,start:L.window.startIndex}),[L.window.endIndex,L.window.startIndex]),Tt=xt,Et=L.sticky.rows,Dt=L.physical.totalHeight,Ot=L.sticky.height,kt=pc(()=>new Set(Et.map(e=>Cc(e.row))),[Et]),At=I>=0&&I>=wt.start&&I<=wt.end,jt=mc((e,t)=>u?.({item:tl(e,t),row:e})??null,[u]),Mt=mc(e=>Ls(e==null?null:w.current.get(e)??null)?!0:Ls(S.current),[]),Nt=mc(e=>{Mt(t.focusNearestPath(e))},[t,Mt]),Pt=Y(Nt);Pt.current=Nt;let Ft=Y(!0),It=Y(()=>{}),Lt=mc((t=!0)=>{let n=Me.current;n!=null&&(Ft.current=Ft.current&&t,je(null),e?.contextMenu?.onClose?.(),Ft.current&&Nt(n.path))},[e?.contextMenu,Nt]);It.current=Lt;let Rt=mc(e=>{let t=e==null?null:Yc(S.current,e);Ee(e=>e===t?e:t)},[]),zt=mc((e,n,r)=>{let i=t.getItem(n);if(i==null)return;let a=at(n);if(a?.dataset.fileTreeStickyRow===`true`){let e=C.current;Be(n,e?.scrollTop??null),j.current=!0,Se(e=>e===n?e:n)}i.focus(),Rt(a),Ft.current=!0,je({anchorRect:r?.anchorRect??null,item:tl(e,n),path:n,source:r?.source??`keyboard`})},[t,at,Rt]),Bt=mc(e=>{if(l){if(t.isSearchOpen()){let e=C.current,t=zs(e,R);ae.current=I<0||e==null?null:Math.max(0,Math.min(I*s-e.scrollTop,Math.max(0,t-s))),ie.current=!0}t.startRenaming(e)!==!1&&(Oe(`focus`),ye(e=>e+1))}},[t,I,s,l,R]),Vt=mc((e,{restoreTreeFocus:n=!0,targetOffset:r=`live-overlay`}={})=>{let i=C.current;if(i==null)return!1;t.focusPath(e);let a=t.getFocusedIndex();if(a<0)return!1;let o=t.getVisibleRows(a,a)[0]??null;if(o==null)return!1;let l=zs(i,R),u=t.getVisibleCount()*s,d=r===`sticky-parents`?o.ancestorPaths.length*s:Ec({controller:t,itemHeight:s,overscan:c,scrollTop:i.scrollTop,stickyFolders:h,viewportHeight:l}).snapshot.sticky.height;return j.current=!0,Ws(i,a,s,l,u,d),E.current(),Ne.current=n?e:null,!0},[t,s,c,R,h]),Ht=()=>y.current===!0||_e.current!=null||pe.current===!0,Ut=e=>typeof window.requestAnimationFrame==`function`?window.requestAnimationFrame(()=>{e()}):window.setTimeout(e,16),Wt=e=>{if(e!=null){if(typeof window.cancelAnimationFrame==`function`){window.cancelAnimationFrame(e);return}window.clearTimeout(e)}},Gt=()=>{ce.current!=null&&(clearTimeout(ce.current),ce.current=null),se.current=null},Kt=()=>{ue.current?.remove(),ue.current=null},qt=()=>{Wt(oe.current),oe.current=null,le.current=null},Jt=e=>{let t=S.current?.getRootNode();if(t instanceof ShadowRoot){t.append(e);return}document.body.append(e)},Yt=()=>{fe.current?.(),fe.current=null,_e.current!=null&&(clearTimeout(_e.current),_e.current=null),pe.current=!1,me.current=null,ge.current=null,he.current!=null&&(he.current.setAttribute(`draggable`,`true`),he.current.style.removeProperty(`touch-action`),he.current=null),Kt(),Gt(),qt(),de.current=null},Xt=(e,n)=>{let r=S.current?.getRootNode(),i=Nc(jc(r instanceof ShadowRoot?r:document,e,n));return t.setDragTarget(i),t.getDragSession()?.target??null},Zt=e=>{let n=t.getDragAndDropConfig()?.openOnDropDelay??800;if(e==null||e.kind!==`directory`||e.directoryPath==null||n<=0){Gt();return}let r=t.getItem(e.directoryPath),i=zc(r)?r:null;if(i==null||i.isExpanded()){Gt();return}let a=`${e.directoryPath}::${e.flattenedSegmentPath??``}`;se.current!==a&&(Gt(),se.current=a,ce.current=setTimeout(()=>{let n=t.getDragSession()?.target;n?.kind!==`directory`||n.directoryPath!==e.directoryPath||n.flattenedSegmentPath!==e.flattenedSegmentPath||i.expand()},n))},Qt=()=>{oe.current=null;let e=le.current,n=C.current;if(e==null||n==null||t.getDragSession()==null)return;let r=n.getBoundingClientRect(),i=Ic(e.clientY,r);if(i===0)return;let a=Math.max(0,n.scrollHeight-n.clientHeight),o=Math.max(0,Math.min(a,n.scrollTop+i));o!==n.scrollTop&&(n.scrollTop=o,E.current()),Zt(Xt(e.clientX,e.clientY)),oe.current=Ut(Qt)},$t=(e,t)=>{le.current={clientX:e,clientY:t},oe.current??=Ut(Qt)},en=(e,n,r)=>{let i=e.currentTarget;if(i!=null){if(Yt(),Kt(),Gt(),qt(),t.startDrag(r)===!1){e.preventDefault();return}if(de.current=n,e.dataTransfer!=null&&(e.dataTransfer.effectAllowed=`move`,e.dataTransfer.dropEffect=`move`,e.dataTransfer.setData(`text/plain`,r),Fc())){let t=Pc(i),n=i.getBoundingClientRect();Object.assign(t.style,{height:`${n.height}px`,opacity:`0.85`,transform:`translate3d(-9999px, 0px, 0)`,width:`${n.width}px`}),Jt(t),ue.current=t,e.dataTransfer.setDragImage(t,Math.max(0,e.clientX-n.left),Math.max(0,e.clientY-n.top))}}},z=()=>{Kt(),Gt(),qt(),de.current=null,t.cancelDrag()},tn=(e,n,r)=>{if(_e.current!=null||pe.current)return;let i=e.touches[0],a=e.currentTarget;if(i==null||a==null)return;ge.current={clientX:i.clientX,clientY:i.clientY},he.current=a,a.setAttribute(`draggable`,`false`);let o=(e={})=>{let t=e.restoreNativeDraggable??!pe.current;_e.current!=null&&(clearTimeout(_e.current),_e.current=null),document.removeEventListener(`touchmove`,s),document.removeEventListener(`touchend`,c),document.removeEventListener(`touchcancel`,c),fe.current===o&&(fe.current=null),t&&(a.setAttribute(`draggable`,`true`),he.current===a&&(he.current=null),ge.current=null)},s=e=>{let t=e.touches[0],n=ge.current;if(t==null||n==null)return;let r=t.clientX-n.clientX,i=t.clientY-n.clientY;r*r+i*i<=Oc*Oc||o()},c=()=>{o()};document.addEventListener(`touchmove`,s,{passive:!0}),document.addEventListener(`touchend`,c),document.addEventListener(`touchcancel`,c),fe.current=o,_e.current=setTimeout(()=>{if(o({restoreNativeDraggable:!1}),t.startDrag(r)===!1){a.setAttribute(`draggable`,`true`),he.current===a&&(he.current=null),ge.current=null;return}pe.current=!0,he.current=a,a.setAttribute(`draggable`,`false`),a.style.setProperty(`touch-action`,`none`),de.current=n;let e=a.getBoundingClientRect(),s=Pc(a);Object.assign(s.style,{height:`${e.height}px`,opacity:`0.85`,transform:`translate3d(${e.left}px, ${e.top}px, 0)`,width:`${e.width}px`}),Jt(s),ue.current=s,me.current={x:i.clientX-e.left,y:i.clientY-e.top};let c=e=>{let t=e.touches[0];if(t==null)return;e.preventDefault();let n=me.current;n!=null&&ue.current!=null&&(ue.current.style.transform=`translate3d(${t.clientX-n.x}px, ${t.clientY-n.y}px, 0)`),Zt(Xt(t.clientX,t.clientY)),$t(t.clientX,t.clientY)},l=e=>{let n=e.changedTouches[0];n!=null&&Xt(n.clientX,n.clientY),t.completeDrag(),Yt()},u=()=>{t.cancelDrag(),Yt()};fe.current=()=>{document.removeEventListener(`touchmove`,c),document.removeEventListener(`touchend`,l),document.removeEventListener(`touchcancel`,u)},document.addEventListener(`touchmove`,c,{passive:!1}),document.addEventListener(`touchend`,l),document.addEventListener(`touchcancel`,u)},Dc)},B=e=>{if(P!=null){if(e.key===`Escape`){Lt(),e.preventDefault(),e.stopPropagation();return}Gc.has(e.key)&&(e.preventDefault(),e.stopPropagation());return}if(ct.isActive()){if(e.key===`Escape`)ct.cancel();else if(e.key===`Enter`)ct.commit();else return;Oe(`focus`),ye(e=>e+1),e.preventDefault(),e.stopPropagation();return}if(l&&e.key===`F2`){Bt(F??void 0),e.preventDefault(),e.stopPropagation();return}if(dt){if(e.key===`Escape`)ie.current=!1,ae.current=null,t.closeSearch();else if(e.key===`Enter`){let e=t.getFocusedPath();e!=null&&t.selectOnlyPath(e);let n=C.current,r=zs(n,R);ae.current=I<0||n==null?null:Math.max(0,Math.min(I*s-n.scrollTop,Math.max(0,r-s))),ie.current=!0,t.closeSearch()}else if(e.key===`ArrowDown`)t.focusNextSearchMatch();else if(e.key===`ArrowUp`)t.focusPreviousSearchMatch();else return;Oe(`focus`),ye(e=>e+1),e.preventDefault(),e.stopPropagation();return}if(f&&Vc(e)){t.openSearch(e.key),ye(e=>e+1),e.preventDefault(),e.stopPropagation();return}let n=Ze&&Uc(e),r=Wc(e,Ze),i=r&&S.current!=null?Rs(S.current):null,a=r?new Set(Qc(S.current)):new Set,o=i?.dataset.fileTreeStickyPath??null,c=i?.dataset.fileTreeStickyRow===`true`&&o!=null;if(c&&o!==F&&a.has(o)){let e=C.current;Be(o,e?.scrollTop??null),t.focusPath(o)}let u=t.getFocusedPath(),d=t.getFocusedIndex(),p=t.getFocusedItem();if(p==null)return;let m=zc(p)?p:null,h=u!=null&&(kt.has(u)||c&&o===u&&a.has(u)),g=e.key===`ArrowDown`||e.key===`ArrowUp`||e.key===`ArrowRight`&&m!=null&&m.isExpanded(),_=e.key===`ArrowLeft`&&h&&m!=null&&m.isExpanded(),v=C.current,y=!0;if(e.shiftKey&&e.key===`ArrowDown`)t.extendSelectionFromFocused(1);else if(e.shiftKey&&e.key===`ArrowUp`)t.extendSelectionFromFocused(-1);else if(n&&u!=null&&d>=0){let e=t.getVisibleRows(d,d)[0]??null,n=Zc(u,T.current,w.current);e==null||n==null?y=!1:zt(e,u)}else if((e.ctrlKey||e.metaKey)&&Bc(e))t.toggleFocusedSelection();else if((e.ctrlKey||e.metaKey)&&e.key.toLowerCase()===`a`)t.selectAllVisiblePaths();else switch(e.key){case`ArrowDown`:t.focusNextItem();break;case`ArrowUp`:t.focusPreviousItem();break;case`ArrowRight`:m==null||m.isExpanded()?t.focusNextItem():m.expand();break;case`ArrowLeft`:m!=null&&m.isExpanded()?m.collapse():t.focusParentItem();break;case`Home`:t.focusFirstItem();break;case`End`:t.focusLastItem();break;default:y=!1}if(!y)return;Oe(`focus`);let b=t.getFocusedPath(),x=b!=null&&(kt.has(b)||a.has(b)),ee=g&&b!==u,E=n&&c&&o===u&&b===u;if((h||E)&&b!=null&&(ee&&x||E))Be(b,v?.scrollTop??null),j.current=!0,Se(e=>e===b?e:b);else{let t=e.key===`ArrowUp`&&h&&b!==u;b!=null&&(t||_&&b===u)?(Ve(b,el(S.current,v,i,u,s,Ot,R)),j.current=!0,Se(e=>e===b?e:b)):ze()}ye(e=>e+1),e.preventDefault(),e.stopPropagation()};fc(()=>{if(!(!f||!dt)){if(He.current){He.current=!1;return}Ls(ee.current)}},[dt,f]),fc(()=>{let e=x.current;switch(Ks({hasRenderedInput:e!=null,previousRenamingPath:re.current,renamingPath:lt})){case`reset`:re.current=null;return;case`reveal-canonical`:lt!=null&&Vt(lt,{restoreTreeFocus:!1,targetOffset:`live-overlay`});return;case`ignore`:return;case`focus-input`:e!=null&&(Ne.current=null,re.current=lt,Ls(e),e.select());return}},[wt.end,wt.start,lt,Vt,kt]),fc(()=>{let e=S.current;if(e==null)return;let t=null,n=()=>{t!=null&&(clearTimeout(t),t=null)},r=()=>{let t=Rs(e)?.dataset.itemPath??null;Se(e=>e===t?e:t)},i=()=>{n(),j.current=!0,r()},a=i=>{let a=i.relatedTarget;if(a==null){n(),t=setTimeout(()=>{if(t=null,Rs(e)!=null){r();return}j.current=!1,Se(null)},0);return}if(!(a instanceof Node)||!e.contains(a)){n(),j.current=!1,Se(null);return}let o=a instanceof HTMLElement?a.dataset.itemPath??null:null;Se(e=>e===o?e:o)};return e.addEventListener(`focusin`,i),e.addEventListener(`focusout`,a),()=>{n(),e.removeEventListener(`focusin`,i),e.removeEventListener(`focusout`,a)}},[]),fc(()=>{let e=S.current;e!=null&&(L.physical.scrollTop<=0?e.dataset.scrollAtTop=`true`:delete e.dataset.scrollAtTop)},[L.physical.scrollTop]),fc(()=>{let e=null,n=C.current,r=b.current,i=S.current;if(n==null)return;D.current=zs(n,g);let a=()=>{let e=t.getVisibleCount(),r=Bs(D.current,g),i=Math.max(0,e*s-r);n.scrollTop>i&&(n.scrollTop=i),Je(Ec({controller:t,itemHeight:s,overscan:c,scrollTop:Math.min(n.scrollTop,i),stickyFolders:h,viewportHeight:r}))};if(!k.current){k.current=!0;let e=t.getFocusedIndex();if(e>=0){let r=Bs(D.current,g),i=t.getVisibleRows(e,e)[0]??null;Hs(n,e,s,r,h&&i!=null?Math.max(0,Math.min(i.ancestorPaths.length*s,Math.max(0,r-s))):0)}}E.current=a;let o=t.subscribe(()=>{Ns(be)&&ye(e=>e+1),a()}),l=()=>{Re.current!==!0&&(r!=null&&(r.dataset.isScrolling??=``),i!=null&&(i.dataset.isScrolling??=``),y.current=!0,e!=null&&clearTimeout(e),e=setTimeout(()=>{r!=null&&delete r.dataset.isScrolling,i!=null&&delete i.dataset.isScrolling,y.current=!1,Ae(e=>e+1),e=null},50))},u=null,d=()=>{i!=null&&delete i.dataset.overlayReveal,u!=null&&(clearTimeout(u),u=null)},f=()=>{i==null||Re.current===!0||n.scrollTop>0||(i.dataset.overlayReveal=`true`,u!=null&&clearTimeout(u),u=setTimeout(()=>{d()},200))},p=()=>{if(a(),n.scrollTop>0&&d(),Me.current!=null&&y.current&&It.current(),Re.current===!0){y.current=!1;return}we(e=>e==null?e:null),l()},m=()=>{l(),f()},_=new Set([`ArrowUp`,`ArrowDown`,`ArrowLeft`,`ArrowRight`,`PageUp`,`PageDown`,`Home`,`End`,` `,`Spacebar`]),v=e=>{_.has(e.key)&&m()};n.addEventListener(`scroll`,p,{passive:!0}),n.addEventListener(`wheel`,m,{passive:!0}),n.addEventListener(`touchmove`,m,{passive:!0}),n.addEventListener(`keydown`,v);let x=typeof ResizeObserver<`u`?new ResizeObserver(e=>{D.current=(e[0]==null?null:Vs(e[0]))??zs(n,g),a()}):null;return x?.observe(n),()=>{E.current=()=>{},o(),n.removeEventListener(`scroll`,p),n.removeEventListener(`wheel`,m),n.removeEventListener(`touchmove`,m),n.removeEventListener(`keydown`,v),e!=null&&clearTimeout(e),u!=null&&clearTimeout(u),r!=null&&delete r.dataset.isScrolling,i!=null&&(delete i.dataset.isScrolling,delete i.dataset.overlayReveal),y.current=!1,D.current=null,x?.disconnect()}},[t,g,s,c,h]),fc(()=>{Ze||P==null||Lt(!1)},[Lt,Ze,P]);let nn=pc(()=>P==null?null:`${P.path}::${P.source}`,[P]);fc(()=>{if(nn==null){m?.clearSlotContent(te);return}let t=Me.current;if(t==null)return;let n=v.current??_.current;if(n==null)return;let r={anchorElement:n,anchorRect:t.anchorRect??qc(n.getBoundingClientRect()),close:e=>{It.current(e?.restoreFocus??!0)},restoreFocus:()=>{Ft.current&&Pt.current(Me.current?.path??null)}},i=e?.contextMenu?.render?.(t.item,r)??null;return m?.setSlotContent(te,i),e?.contextMenu?.onOpen?.(t.item,r),ol(i),queueMicrotask(()=>{i==null||!i.isConnected||document.activeElement===i&&ol(i)}),()=>{m?.clearSlotContent(te)}},[nn,e?.contextMenu,m]),fc(()=>{P!=null&&t.getItem(P.path)==null&&Lt()},[Lt,P,t]),fc(()=>{if(P==null)return;let e=S.current?.getRootNode(),t=e instanceof ShadowRoot?e.host:S.current,n=e=>{let n=e.target;n instanceof Node&&(Kc(e)||_.current?.contains(n)!==!0&&t?.contains(n)!==!0&&Lt())},r=e=>{e.key===`Escape`&&(e.preventDefault(),e.stopPropagation(),Lt())};return document.addEventListener(`mousedown`,n,!0),document.addEventListener(`keydown`,r,!0),()=>{document.removeEventListener(`mousedown`,n,!0),document.removeEventListener(`keydown`,r,!0)}},[Lt,P]),fc(()=>{let e=C.current,n=S.current;if(e==null||n==null){M.current=F;return}let r=F==null?null:w.current.get(F)??null,i=Rs(n),a=i?.dataset.itemPath??null,o=ut&&x.current===i,c=f&&ee.current===i,l=ie.current&&!dt,u=ae.current??0,d=Ne.current,p=Pe.current,m=Fe.current,g=Ie.current,_=i!=null,v=j.current||_,y=M.current!==F,b=p!=null&&p===F&&F!=null,T=!1,D=!1;if(pt!=null&&pt.id!==O.current){O.current=pt.id;let n=pt.visibleIndex,r=t.getVisibleRows(n,n)[0]??null;if(r!=null){let t=h?Math.max(0,Math.min(r.ancestorPaths.length*s,Math.max(0,R-s))):Ot;T=!0,D=Us(e,n,s,R,Dt,pt.offset,t)}t.clearScrollRequest(pt.id)}let k=!T&&l&&Ws(e,I,s,R,Dt,u),A=!T&&d!=null&&d===F&&Ws(e,I,s,R,Dt,Ot),N=!T&&m!=null&&m.path===F&&Ws(e,I,s,R,Dt,m.viewportOffset),te=!T&&g!=null&&g.path===F&&e.scrollTop!==g.scrollTop;if(te&&(e.scrollTop=g.scrollTop),(te||D||A||N||k||v&&y&&d!==F&&!b&&Hs(e,I,s,R,Ot))&&E.current(),T){M.current=F;return}if(!v){M.current=F;return}if(o){M.current=F;return}if(c&&!l){M.current=F;return}if(r==null){l&&I>=0&&(Ws(e,I,s,R,Dt,u),E.current()),M.current=F;return}(y||l||d===F||p===F||m?.path===F||g?.path===F||a==null||a!==F)&&(Ls(r),d===F&&(Ne.current=null),p===F&&(Pe.current=null),m?.path===F&&(Fe.current=null),g?.path===F&&(Ie.current=null),ie.current=!1,ae.current=null),M.current=F},[t,I,F,At,s,ut,dt,wt,R,f,pt,h,Ot,Dt,Ct]);let rn=I>=0&&I>=L.visible.startIndex&&I<=L.visible.endIndex,an=F!=null&&Tt.some(e=>Cc(e.row)===F),on=rn||an,sn=$e&&j.current===!0&&on?F:null,V=De===`pointer`?Ce:null,cn=P?.path??Le.current??V??sn??Ce,ln=P?.source===`right-click`;fc(()=>{y.current&&P==null||Rt(at(cn))},[P,at,wt,R,ke,Tt,cn,Rt,Ct]);let un=mc(e=>{if(y.current||Kc(e))return;let t=e.target;if(!(t instanceof HTMLElement)||t.closest?.(`[data-type="context-menu-trigger"]`)!=null)return;let n=t.closest?.(`[data-file-tree-sticky-row="true"]`),r=t.closest?.(`[data-type="item"]`),i=n instanceof HTMLElement?n.dataset.fileTreeStickyPath??null:r instanceof HTMLElement?r.dataset.itemPath??null:null;i!=null&&Oe(e=>e===`pointer`?e:`pointer`),we(e=>e===i?e:i)},[]),dn=mc(()=>{we(null)},[]);fc(()=>{if(!mt)return;let e=()=>{Yt(),t.cancelDrag()};return window.addEventListener(`dragend`,e),()=>{window.removeEventListener(`dragend`,e),Yt(),t.cancelDrag()}},[t,mt]);let fn=e=>{if(!mt||t.getDragSession()==null||pe.current)return;let n=Nc(e.target instanceof HTMLElement?e.target:null);t.setDragTarget(n),Zt(t.getDragSession()?.target??null),$t(e.clientX,e.clientY),e.dataTransfer!=null&&(e.dataTransfer.dropEffect=`move`),e.preventDefault()},pn=e=>{if(!mt||t.getDragSession()==null||pe.current)return;let n=e.relatedTarget;n instanceof Node&&S.current?.contains(n)===!0||(Gt(),qt(),t.setDragTarget(null))},mn=e=>{!mt||t.getDragSession()==null||pe.current||(e.preventDefault(),Xt(e.clientX,e.clientY),t.completeDrag(),Kt(),Gt(),qt(),de.current=null)},hn=L.window.height,gn=L.window.offsetTop,_n=Math.min(0,R-hn),vn=Math.min(0,R-hn-Ot),yn=xe===F||ie.current,bn=F!=null&&yn&&!At&&I>=0?Ct[I]??t.getVisibleRows(I,I)[0]??null:null,xn=bn==null?null:Gs(I,s,wt,hn),Sn=de.current,Cn=vt!=null&&Sn!=null&&Sn.path===vt&&Sn.index>=wt.start&&Sn.index<=wt.end,wn=vt!=null&&Sn!=null&&Sn.path===vt&&!Cn&&Sn.path!==bn?.path?Sn:null,Tn=wn==null?null:Gs(wn.index,s,wt,hn),En=Hc((I>=0?Ct[I]??t.getVisibleRows(I,I)[0]??null:null)?.ancestorPaths.at(-1)??null),Dn=dt&&F!=null?rl(o,F,!At):void 0,On=P?.path??(dt?F:xe),kn=P?.path??Ce,An=at(cn),jn=Ze&&$e&&!ln&&!ut&&An!=null&&Te!=null&&cn!=null,Mn=Ze&&(jn||P!=null),Nn=P?.anchorRect,Pn=Nn==null&&An!=null&&Te!=null&&(P!=null||jn)?Te:null,Fn=Nn==null?Pn==null?void 0:{top:`${Pn}px`}:{left:`${Nn.left}px`,position:`fixed`,right:`auto`,top:`${Nn.top}px`},In=ln?{opacity:`0`}:void 0,Ln=mc((e,n,r,i)=>{let a=Ys({event:{ctrlKey:e.ctrlKey,metaKey:e.metaKey,shiftKey:e.shiftKey},isDirectory:n.kind===`directory`,isSearchOpen:dt,mode:i}),o=a.toggleDirectory&&n.kind===`directory`,s=o?t.resolveMountedDirectoryPathFromInput(r):null;if(o&&s==null)return;let c=s??r;switch(a.selection.kind){case`range`:t.selectPathRange(c,a.selection.additive);break;case`toggle`:t.togglePathSelectionFromInput(c);break;case`single`:t.selectOnlyMountedPathFromInput(c);break}let l=e.currentTarget instanceof HTMLElement?e.currentTarget:null,u=n.index>=L.visible.startIndex&&n.index<=L.visible.endIndex,d=i===`flow`&&u&&l!=null&&l.dataset.itemParked!==`true`;t.focusMountedPathFromInput(c),d&&(j.current=!0,Se(e=>e===c?e:c),Oe(`focus`)),o&&t.toggleMountedDirectoryFromInput(c),a.closeSearch&&t.closeSearch(),a.revealCanonical&&Vt(c,{targetOffset:`sticky-parents`})},[t,dt,L.visible.endIndex,L.visible.startIndex,Vt]),Rn=()=>{if(y.current||!$e||cn==null||An==null)return;let e=t.getItem(cn);e!=null&&(Rt(An),Ft.current=!0,je({anchorRect:null,item:{kind:e.isDirectory()?`directory`:`file`,name:An.getAttribute(`aria-label`)??cn,path:e.getPath()},path:e.getPath(),source:`button`}))},zn={contextHoverPath:kn,contextMenuButtonTriggerEnabled:$e,contextMenuButtonVisibility:et,contextMenuEnabled:Ze,contextMenuRightClickEnabled:tt,contextMenuTriggerMode:Qe,controller:t,directoriesWithGitChanges:i,dragAndDropEnabled:mt,draggedPathSet:gt,dragTarget:_t,gitLaneActive:ot,gitStatusByPath:n,handleRowDragEnd:z,handleRowDragStart:en,handleRowTouchStart:tn,ignoredGitDirectories:r,ignoredInheritanceCache:ve,instanceId:o,itemHeight:s,onKeyDown:B,onRowClick:Ln,openContextMenuForRow:zt,registerButton:nt,registerRenameInput:it,renameView:ct,renderDecorationForRow:jt,resolveIcon:st,shouldSuppressContextMenu:Ht,visualFocusPath:On},Bn={...zn,registerButton:rt};return K(`div`,{ref:S,id:yt,"data-file-tree-context-menu-button-visibility":Ze&&$e?et:void 0,"data-file-tree-context-menu-trigger-mode":Ze?Qe:void 0,"data-file-tree-has-context-menu-action-lane":Ze&&$e?`true`:void 0,"data-file-tree-has-git-lane":ot?`true`:void 0,"data-file-tree-virtualized-root":`true`,onDragLeave:mt?pn:void 0,onDragOver:mt?fn:void 0,onDrop:mt?mn:void 0,onKeyDown:B,onPointerLeave:Ze?dn:void 0,onPointerOver:Ze?un:void 0,role:`tree`,tabIndex:-1,style:{outline:`none`,position:`relative`},children:[K(`style`,{"data-file-tree-guide-style":`true`,dangerouslySetInnerHTML:{__html:En}}),K(`slot`,{name:N,"data-type":`header-slot`}),f?K(`div`,{"data-file-tree-search-container":!0,"data-open":dt?`true`:`false`,children:K(`input`,{ref:ee,"aria-activedescendant":Dn,"aria-controls":yt,placeholder:`Search…`,"data-file-tree-search-input":!0,"data-file-tree-search-input-fake-focus":Ue?`true`:void 0,value:ft,onBlur:()=>{d===`retain`&&!Ge.current||t.closeSearch()},onFocus:Ke,onPointerDown:Ke,onInput:e=>{Ke();let n=e.currentTarget;t.setSearch(n.value)}})}):null,K(`div`,{ref:C,"data-file-tree-virtualized-scroll":`true`,children:[h&&Ye&&Tt.length>0?K(`div`,{"aria-hidden":`true`,"data-file-tree-sticky-overlay":`true`,children:K(`div`,{"data-file-tree-sticky-overlay-content":`true`,style:{height:`${bt}px`},children:Tt.map((e,t)=>cl(Bn,e.row,`sticky:${Cc(e.row)}`,{mode:`sticky`,style:{left:`0`,position:`absolute`,right:`0`,top:`${e.top}px`,zIndex:`${Tt.length-t}`}}))})}):null,K(`div`,{ref:b,"data-file-tree-virtualized-list":`true`,style:{height:`${Dt}px`},children:[K(`div`,{"data-file-tree-virtualized-sticky-offset":`true`,"aria-hidden":`true`,style:{height:`${gn}px`}}),K(`div`,{"data-file-tree-virtualized-sticky":`true`,style:{height:`${hn}px`,top:`${_n}px`,bottom:`${vn}px`},children:[ll(zn,wt,kt),bn!=null&&xn!=null?cl(zn,bn,`parked:${bn.path}`,{isParked:!0,style:{left:`0`,opacity:`0`,pointerEvents:vt===bn.path?`none`:void 0,position:`absolute`,right:`0`,top:`${xn}px`}}):null,wn!=null&&Tn!=null?cl(zn,wn,`parked-drag:${wn.path}`,{isParked:!0,style:{left:`0`,opacity:`0`,pointerEvents:`none`,position:`absolute`,right:`0`,top:`${Tn}px`}}):null]})]})]}),Ze?K(`div`,{ref:_,"data-type":`context-menu-anchor`,"data-visible":Mn?`true`:`false`,style:Fn,children:[K(`button`,{ref:v,type:`button`,"data-type":ne,"aria-label":`Options`,"aria-haspopup":`menu`,"aria-expanded":P==null?`false`:`true`,"data-visible":jn?`true`:`false`,onMouseDown:e=>{e.preventDefault()},onClick:e=>{if(e.preventDefault(),e.stopPropagation(),P!=null){Lt();return}Rn()},tabIndex:-1,style:In,children:K(ns,{...st(`file-tree-icon-ellipsis`)})}),P==null?null:K(`slot`,{name:te})]}):null,P==null?null:K(`div`,{"data-type":`context-menu-wash`,"aria-hidden":`true`,onMouseDownCapture:e=>{e.preventDefault(),Lt()},onTouchStartCapture:e=>{e.preventDefault(),e.stopPropagation(),Lt()},onTouchMoveCapture:e=>{e.preventDefault(),e.stopPropagation()},onWheelCapture:e=>{e.preventDefault(),e.stopPropagation()}})]})}var dl={hydrateRoot:(e,t)=>{Zo(Do(ul,t),e)},renderRoot:(e,t)=>{Xo(Do(ul,t),e)},unmountRoot:e=>{Xo(null,e)}};function fl(e,t){dl.renderRoot(e,t)}function pl(e,t){dl.hydrateRoot(e,t)}function ml(e){dl.unmountRoot(e)}var hl=class{#e=new Map;#t=null;clearAll(){for(let e of this.#e.values())e.remove();this.#e.clear()}clearSlotContent(e){let t=this.#n(e);t!=null&&(t.remove(),this.#e.delete(e))}setHost(e){if(this.#t=e,e!=null){this.#i(e);for(let[e,t]of this.#e)this.#r(e,t)}}setSlotContent(e,t){let n=this.#n(e);if(n===t){t!=null&&(this.#e.set(e,t),this.#r(e,t));return}if(n?.remove(),t==null){this.#e.delete(e);return}this.#e.set(e,t),this.#r(e,t)}setSlotHtml(e,t){let n=t?.trim()??``;if(n.length===0){this.setSlotContent(e,null);return}let r=this.#n(e);if(r!=null&&r.innerHTML===n){this.#e.set(e,r),this.#r(e,r);return}let i=document.createElement(`div`);i.innerHTML=n,this.setSlotContent(e,i)}#n(e){let t=this.#e.get(e)??null;if(t!=null)return t;let n=this.#t;if(n==null)return null;for(let t of Array.from(n.children))if(t instanceof HTMLElement&&t.dataset.fileTreeManagedSlot===e)return t;return null}#r(e,t){t.slot=e,t.dataset.fileTreeManagedSlot=e,this.#t!=null&&t.parentNode!==this.#t&&this.#t.appendChild(t)}#i(e){for(let t of Array.from(e.children)){if(!(t instanceof HTMLElement))continue;let e=t.dataset.fileTreeManagedSlot;e==null||this.#e.has(e)||this.#e.set(e,t)}}},gl=`__c`,_l=`__k`,vl=`__d`,yl=`__s`,bl=/[\s\n\\/='"\0<>]/,xl=/^(xlink|xmlns|xml)([A-Z])/,Sl=/^(?:accessK|auto[A-Z]|cell|ch|col|cont|cross|dateT|encT|form[A-Z]|frame|hrefL|inputM|maxL|minL|noV|playsI|popoverT|readO|rowS|src[A-Z]|tabI|useM|item[A-Z])/,Cl=/^ac|^ali|arabic|basel|cap|clipPath$|clipRule$|color|dominant|enable|fill|flood|font|glyph[^R]|horiz|image|letter|lighting|marker[^WUH]|overline|panose|pointe|paint|rendering|shape|stop|strikethrough|stroke|text[^L]|transform|underline|unicode|units|^v[^i]|^w|^xH/,wl=new Set([`draggable`,`spellcheck`]);function Tl(e){e.__g===void 0?e[vl]=!0:e.__g|=8}function El(e){e.__g===void 0?e[vl]=!1:e.__g&=-9}function Dl(e){return e.__g===void 0?!0===e[vl]:!!(8&e.__g)}var Ol=/["&<]/;function kl(e){if(e.length===0||!1===Ol.test(e))return e;for(var t=0,n=0,r=``,i=``;n<e.length;n++){switch(e.charCodeAt(n)){case 34:i=`"`;break;case 38:i=`&`;break;case 60:i=`<`;break;default:continue}n!==t&&(r+=e.slice(t,n)),r+=i,t=n+1}return n!==t&&(r+=e.slice(t,n)),r}var Al={},jl=new Set(`animation-iteration-count.border-image-outset.border-image-slice.border-image-width.box-flex.box-flex-group.box-ordinal-group.column-count.fill-opacity.flex.flex-grow.flex-negative.flex-order.flex-positive.flex-shrink.flood-opacity.font-weight.grid-column.grid-row.line-clamp.line-height.opacity.order.orphans.stop-opacity.stroke-dasharray.stroke-dashoffset.stroke-miterlimit.stroke-opacity.stroke-width.tab-size.widows.z-index.zoom`.split(`.`)),Ml=/[A-Z]/g;function Nl(e){var t=``;for(var n in e){var r=e[n];if(r!=null&&r!==``){var i=n[0]==`-`?n:Al[n]||(Al[n]=n.replace(Ml,`-$&`).toLowerCase()),a=`;`;typeof r!=`number`||i.startsWith(`--`)||jl.has(i)||(a=`px;`),t=t+i+`:`+r+a}}return t||void 0}function Pl(){this.__d=!0}function Fl(e,t){return{__v:e,context:t,props:e.props,setState:Pl,forceUpdate:Pl,__d:!0,__h:[]}}function Il(e,t,n){if(!e.s){if(n instanceof Ll){if(!n.s)return void(n.o=Il.bind(null,e,t));1&t&&(t=n.s),n=n.v}if(n&&n.then)return void n.then(Il.bind(null,e,t),Il.bind(null,e,2));e.s=t,e.v=n;let r=e.o;r&&r(e)}}var Ll=function(){function e(){}return e.prototype.then=function(t,n){var r=new e,i=this.s;if(i){var a=1&i?t:n;if(a){try{Il(r,1,a(this.v))}catch(e){Il(r,2,e)}return r}return this}return this.o=function(e){try{var i=e.v;1&e.s?Il(r,1,t?t(i):i):n?Il(r,1,n(i)):Il(r,2,i)}catch(e){Il(r,2,e)}},r},e}(),Rl,zl,Bl,Vl,Hl={},Ul=Array.isArray,Wl=Object.assign,Gl=``,Kl=`<!--$s-->`,ql=`<!--/$s-->`;function Jl(e,t){var n,r=e.type,i=!0;return e[gl]?(i=!1,(n=e[gl]).state=n[yl]):n=new r(e.props,t),e[gl]=n,n.__v=e,n.props=e.props,n.context=t,Tl(n),n.state??=Hl,n[yl]??(n[yl]=n.state),r.getDerivedStateFromProps?n.state=Wl({},n.state,r.getDerivedStateFromProps(n.props,n.state)):i&&n.componentWillMount?(n.componentWillMount(),n.state=n[yl]===n.state?n.state:n[yl]):!i&&n.componentWillUpdate&&n.componentWillUpdate(),Bl&&Bl(e),n.render(n.props,n.state,t)}function Yl(e,t,n,r,i,a,o){if(e==null||!0===e||!1===e||e===Gl)return Gl;var s=typeof e;if(s!=`object`)return s==`function`?Gl:s==`string`?kl(e):e+Gl;if(Ul(e)){var c,l=Gl;i[_l]=e;for(var u=e.length,d=0;d<u;d++){var f=e[d];if(f!=null&&typeof f!=`boolean`){var p,m=Yl(f,t,n,r,i,a,o);typeof m==`string`?l+=m:(c||=Array(u),l&&c.push(l),l=Gl,Ul(m)?(p=c).push.apply(p,m):c.push(m))}}return c?(l&&c.push(l),c):l}if(e.constructor!==void 0)return Gl;e.__=i,Rl&&Rl(e);var h=e.type,g=e.props;if(typeof h==`function`){var _,v,y,b=t;if(h===ko){if(`tpl`in g){for(var x=Gl,S=0;S<g.tpl.length;S++)if(x+=g.tpl[S],g.exprs&&S<g.exprs.length){var C=g.exprs[S];if(C==null)continue;typeof C!=`object`||C.constructor!==void 0&&!Ul(C)?x+=C:x+=Yl(C,t,n,r,e,a,o)}return x}if(`UNSTABLE_comment`in g)return`<!--`+kl(g.UNSTABLE_comment)+`-->`;v=g.children}else{if((_=h.contextType)!=null){var ee=t[_.__c];b=ee?ee.props.value:_.__}var w=h.prototype&&typeof h.prototype.render==`function`;if(w)v=Jl(e,b),y=e[gl];else{e[gl]=y=Fl(e,b);for(var T=0;Dl(y)&&T++<25;){El(y),Bl&&Bl(e);try{v=h.call(y,g,b)}catch(t){throw a&&t&&typeof t.then==`function`&&(e._suspended=!0),t}}Tl(y)}if(y.getChildContext!=null&&(t=Wl({},t,y.getChildContext())),w&&G.errorBoundaries&&(h.getDerivedStateFromError||y.componentDidCatch)){v=v!=null&&v.type===ko&&v.key==null&&v.props.tpl==null?v.props.children:v;try{return Yl(v,t,n,r,e,a,!1)}catch(i){return h.getDerivedStateFromError&&(y[yl]=h.getDerivedStateFromError(i)),y.componentDidCatch&&y.componentDidCatch(i,Hl),Dl(y)?(v=Jl(e,t),(y=e[gl]).getChildContext!=null&&(t=Wl({},t,y.getChildContext())),Yl(v=v!=null&&v.type===ko&&v.key==null&&v.props.tpl==null?v.props.children:v,t,n,r,e,a,o)):Gl}finally{zl&&zl(e),Vl&&Vl(e)}}}v=v!=null&&v.type===ko&&v.key==null&&v.props.tpl==null?v.props.children:v;try{var E=Yl(v,t,n,r,e,a,o);return zl&&zl(e),G.unmount&&G.unmount(e),e._suspended?typeof E==`string`?Kl+E+ql:Ul(E)?(E.unshift(Kl),E.push(ql),E):E.then(function(e){return Kl+e+ql}):E}catch(i){if(!a&&o&&o.onError){var D=function i(s){return o.onError(s,e,function(e,s){try{return Yl(e,t,n,r,s,a,o)}catch(e){return i(e)}})}(i);if(D!==void 0)return D;var O=G.__e;return O&&O(i,e),Gl}if(!a||!i||typeof i.then!=`function`)throw i;return i.then(function i(){try{var s=Yl(v,t,n,r,e,a,o);return e._suspended?Kl+s+ql:s}catch(e){if(!e||typeof e.then!=`function`)throw e;return e.then(i)}})}}var k,A=`<`+h,j=Gl;for(var M in g){var N=g[M];if(typeof(N=Zl(N)?N.value:N)!=`function`||M===`class`||M===`className`){switch(M){case`children`:k=N;continue;case`key`:case`ref`:case`__self`:case`__source`:continue;case`htmlFor`:if(`for`in g)continue;M=`for`;break;case`className`:if(`class`in g)continue;M=`class`;break;case`defaultChecked`:M=`checked`;break;case`defaultSelected`:M=`selected`;break;case`defaultValue`:case`value`:switch(M=`value`,h){case`textarea`:k=N;continue;case`select`:r=N;continue;case`option`:r!=N||`selected`in g||(A+=` selected`)}break;case`dangerouslySetInnerHTML`:j=N&&N.__html;continue;case`style`:typeof N==`object`&&(N=Nl(N));break;case`acceptCharset`:M=`accept-charset`;break;case`httpEquiv`:M=`http-equiv`;break;default:if(xl.test(M))M=M.replace(xl,`$1:$2`).toLowerCase();else{if(bl.test(M))continue;M[4]!==`-`&&!wl.has(M)||N==null?n?Cl.test(M)&&(M=M===`panose1`?`panose-1`:M.replace(/([A-Z])/g,`-$1`).toLowerCase()):Sl.test(M)&&(M=M.toLowerCase()):N+=Gl}}N!=null&&!1!==N&&(A=!0===N||N===Gl?A+` `+M:A+` `+M+`="`+(typeof N==`string`?kl(N):N+Gl)+`"`)}}if(bl.test(h))throw Error(h+` is not a valid HTML tag name in `+A+`>`);if(j||(typeof k==`string`?j=kl(k):k!=null&&!1!==k&&!0!==k&&(j=Yl(k,t,h===`svg`||h!==`foreignObject`&&n,r,e,a,o))),zl&&zl(e),Vl&&Vl(e),!j&&Xl.has(h))return A+`/>`;var te=`</`+h+`>`,ne=A+`>`;return Ul(j)?[ne].concat(j,[te]):typeof j==`string`?ne+j+te:[ne,j,te]}var Xl=new Set([`area`,`base`,`br`,`col`,`command`,`embed`,`hr`,`img`,`input`,`keygen`,`link`,`meta`,`param`,`source`,`track`,`wbr`]);function Zl(e){return typeof e==`object`&&!!e&&typeof e.peek==`function`&&`value`in e}var Ql=0;function $l(e){return e!=null&&e.length>0?e:(Ql+=1,`pst_ft_${Ql}`)}function eu({initialVisibleRowCount:e,itemHeight:t}){return e==null?420:Math.max(0,e)*(t??St)}function tu(e){if(typeof document>`u`)return;let t=document.createElement(`div`);t.innerHTML=e;let n=t.querySelector(`svg`);return n instanceof SVGElement?n:void 0}function nu(e){return e.querySelector(`#file-tree-icon-chevron`)instanceof SVGElement&&e.querySelector(`#file-tree-icon-file`)instanceof SVGElement&&e.querySelector(`#file-tree-icon-dot`)instanceof SVGElement&&e.querySelector(`#file-tree-icon-lock`)instanceof SVGElement}function ru(e){return Array.from(e.children).filter(e=>e instanceof SVGElement)}var iu=class{static LoadedCustomComponent=!0;#e;#t;#n;#r;#i;#a;#o;#s;#c;#l=new hl;#u;#d;#f;#p;#m;#h;#g;#_;#v;#y=null;#b;#x=!1;#S=!1;constructor(e){let{composition:t,density:n,fileTreeSearchMode:r,gitStatus:i,id:a,initialSearchQuery:o,icons:s,itemHeight:c,onSearchChange:l,onSelectionChange:u,overscan:d,renderRowDecoration:f,renaming:p,search:m,searchBlurBehavior:h,searchFakeFocus:g,stickyFolders:_,unsafeCSS:v,initialVisibleRowCount:y,...b}=e;this.#e=t,this.#n=$l(a),this.#p=Za(i),this.#m=s,this.#h=v,this.#r=u,this.#i=f,this.#a=p!=null&&p!==!1,this.#o=h,this.#s=m===!0,this.#c=g===!0,this.#u=L(n,c),this.#d={itemHeight:this.#u.itemHeight,overscan:d,stickyFolders:_,initialVisibleRowCount:y},this.#t=new Ka({...b,fileTreeSearchMode:r,initialSearchQuery:o,onSearchChange:l,renaming:p}),this.#v=this.#t.getSelectionVersion(),this.#y=this.#r==null?null:this.subscribe(()=>{this.#D()})}unmount(){this.#b!=null&&(ml(this.#b),delete this.#b.dataset.fileTreeVirtualizedWrapper,this.#b=void 0),this.#l.clearAll(),this.#l.setHost(null),this.#f!=null&&(delete this.#f.dataset.fileTreeVirtualized,this.#I(this.#f),this.#f=void 0)}cleanUp(){this.unmount(),this.#y?.(),this.#y=null,this.#t.destroy()}getFileTreeContainer(){return this.#f}getItem(e){return this.#t.getItem(e)}getFocusedItem(){return this.#t.getFocusedItem()}getFocusedPath(){return this.#t.getFocusedPath()}getSelectedPaths(){return this.#t.getSelectedPaths()}getComposition(){return this.#e}getItemHeight(){return this.#u.itemHeight}getDensityFactor(){return this.#u.factor}subscribe(e){let t=!1;return this.#t.subscribe(()=>{if(!t){t=!0;return}e()})}focusPath(e){this.#t.focusPath(e)}scrollToPath(e,t){this.#t.scrollToPath(e,t)}focusNearestPath(e){return this.#t.focusNearestPath(e)}add(e){this.#t.add(e)}batch(e){this.#t.batch(e)}applyGitStatusPatch(e){let t=Qa(this.#p,e);if(t===this.#p)return;this.#p=t;let n=this.#T();n!=null&&fl(n.wrapper,this.#w())}move(e,t,n){this.#t.move(e,t,n)}onMutation(e,t){return this.#t.onMutation(e,t)}setSearch(e){this.#t.setSearch(e)}openSearch(e){this.#t.openSearch(e)}closeSearch(){this.#t.closeSearch()}isSearchOpen(){return this.#t.isSearchOpen()}getSearchValue(){return this.#t.getSearchValue()}getSearchMatchingPaths(){return this.#t.getSearchMatchingPaths()}focusNextSearchMatch(){this.#t.focusNextSearchMatch()}focusPreviousSearchMatch(){this.#t.focusPreviousSearchMatch()}startRenaming(e,t){return this.#t.startRenaming(e,t)}remove(e,t){this.#t.remove(e,t)}resetPaths(e,t){Array.isArray(e)?this.#t.resetPaths(e,t):this.#t.resetPaths(e)}setComposition(e){this.#e=e;let t=this.#T();t!=null&&(this.#O(),fl(t.wrapper,this.#w()))}setGitStatus(e){let t=Za(e,this.#p);if(t===this.#p)return;this.#p=t;let n=this.#T();n!=null&&fl(n.wrapper,this.#w())}setIcons(e){this.#m=e;let t=this.#T();t!=null&&(this.#E(t.host,t.wrapper),fl(t.wrapper,this.#w()))}hydrate({fileTreeContainer:e}){let t=this.#P(e),n=this.#N(t);this.#O(),pl(n,this.#w())}render({containerWrapper:e,fileTreeContainer:t}){let n=this.#P(t??this.#f,e),r=this.#N(n);this.#O(),fl(r,this.#w())}#C(){return{initialViewportHeight:eu({initialVisibleRowCount:this.#d.initialVisibleRowCount,itemHeight:this.#d.itemHeight}),itemHeight:this.#d.itemHeight,overscan:this.#d.overscan,stickyFolders:this.#d.stickyFolders}}#w(){return{composition:this.#e,controller:this.#t,gitStatusByPath:this.#p?.statusByPath,ignoredGitDirectories:this.#p?.ignoredDirectoryPaths,directoriesWithGitChanges:this.#p?.directoriesWithChanges,icons:this.#m,instanceId:this.#n,renamingEnabled:this.#a,renderRowDecoration:this.#i,searchBlurBehavior:this.#o,searchEnabled:this.#s,searchFakeFocus:this.#c,slotHost:this.#l,...this.#C()}}#T(){let e=this.#f,t=this.#b;return e==null||t==null?null:{host:e,wrapper:t}}#E(e,t){let n=e.shadowRoot;n!=null&&(this.#k(n),this.#A(n)),this.#j(t)}#D(){let e=this.#r;if(e==null)return;let t=this.#t.getSelectionVersion();t!==this.#v&&(this.#v=t,e(this.#t.getSelectedPaths()))}#O(){let e=this.#e?.header?.render;if(e!=null){this.#l.setSlotContent(N,e());return}this.#l.setSlotHtml(N,this.#e?.header?.html??null)}#k(e){let t=ru(e).find(e=>nu(e)),n=tu(ht(bt(this.#m).set));n!=null&&(t!=null&&t.outerHTML===n.outerHTML||(t==null?e.prepend(n):t.replaceWith(n)))}#A(e){let t=ru(e),n=t.find(e=>nu(e)),r=t.filter(e=>e!==n),i=bt(this.#m).spriteSheet?.trim()??``;if(i.length===0){for(let e of r)e.remove();return}let a=tu(i);if(a==null){for(let e of r)e.remove();return}if(!(r.length===1&&r[0].outerHTML===a.outerHTML)){for(let e of r)e.remove();e.appendChild(a)}}#j(e){let t=bt(this.#m);t.colored&&_t(t.set)?e.dataset.fileTreeColoredIcons=`true`:delete e.dataset.fileTreeColoredIcons}#M(e){let t=e.querySelector(`style[${k}]`);if(this.#g==null&&t instanceof HTMLStyleElement&&(this.#g=t),this.#h==null||this.#h===``){this.#g?.remove(),this.#g=void 0,this.#_=void 0;return}this.#g?.parentNode===e&&this.#_===this.#h||(this.#g??=document.createElement(`style`),this.#g.setAttribute(k,``),this.#g.parentNode!==e&&e.appendChild(this.#g),this.#g.textContent=Tt(this.#h),this.#_=this.#h)}#N(e){if(this.#b!=null)return this.#b;let t=e.shadowRoot;if(t==null)throw Error(`FileTree requires a shadow root`);let n=Array.from(t.children).filter(e=>e instanceof HTMLDivElement&&typeof e.dataset.fileTreeId==`string`&&e.dataset.fileTreeId.length>0),r=n.find(e=>e.dataset.fileTreeId===this.#n)??n[0];return r!=null&&(this.#n=r.dataset.fileTreeId??this.#n),this.#b=r??document.createElement(`div`),this.#b.dataset.fileTreeId=this.#n,this.#b.dataset.fileTreeVirtualizedWrapper=`true`,this.#E(e,this.#b),this.#b.parentNode!==t&&t.appendChild(this.#b),this.#b}#P(e,t){let n=e??this.#f??document.createElement(`file-tree-container`);t!=null&&n.parentNode!==t&&t.appendChild(n);let r=n.shadowRoot??n.attachShadow({mode:`open`});return jt(n,r),this.#M(r),n.dataset.fileTreeVirtualized=`true`,n.style.display=`flex`,this.#F(n),this.#l.setHost(n),this.#f=n,n}#F(e){e.style.getPropertyValue(`--trees-item-height`)===``&&(e.style.setProperty(`--trees-item-height`,`${String(this.#u.itemHeight)}px`),this.#x=!0),e.style.getPropertyValue(`--trees-density-override`)===``&&(e.style.setProperty(`--trees-density-override`,String(this.#u.factor)),this.#S=!0)}#I(e){this.#x&&=(e.style.removeProperty(`--trees-item-height`),!1),this.#S&&=(e.style.removeProperty(`--trees-density-override`),!1)}};function au(e){let[t]=(0,g.useState)(()=>new iu(e)),n=(0,g.useRef)({timeout:null,model:t});return(0,g.useEffect)(()=>{let{current:e}=n;return e.timeout!=null&&(clearTimeout(e.timeout),e.timeout=null),()=>{e.timeout=setTimeout(()=>e.model.cleanUp(),1)}},[]),{model:t}}function ou(e,t={}){return aa.prepareInput(e,t)}var su=120;function cu({files:e,selectedPath:t,onSelectPath:n}){let r=(0,g.useMemo)(()=>e.map(e=>e.path),[e]),i=(0,g.useMemo)(()=>e.map(e=>du(e)).filter(e=>!!e),[e]),a=(0,g.useMemo)(()=>ou(r),[r]),o=r.length>su?`closed`:`open`,s=(0,g.useMemo)(()=>pu(r),[r]);return r.length===0?null:(0,_.jsx)(lu,{files:e,gitStatus:i,initialExpansion:o,onSelectPath:n,paths:r,preparedInput:a,selectedPath:t},s)}function lu({files:e,gitStatus:t,initialExpansion:n,onSelectPath:r,paths:i,preparedInput:a,selectedPath:o}){let s=(0,g.useMemo)(()=>new Set(i),[i]),{model:c}=au({flattenEmptyDirectories:!0,gitStatus:t,initialExpansion:n,initialSelectedPaths:o?[o]:[],itemHeight:24,onSelectionChange(e){let t=[...e].reverse().find(e=>s.has(e));t&&r(t)},preparedInput:a,search:!0,searchBlurBehavior:`retain`,unsafeCSS:fu});return(0,g.useEffect)(()=>{if(!o)return;for(let e of c.getSelectedPaths())e!==o&&c.getItem(e)?.deselect();let e=c.getItem(o);e?.isSelected()||e?.select(),c.scrollToPath(o,{focus:!1,offset:`nearest`})},[c,o]),(0,g.useEffect)(()=>{c.setGitStatus(t)},[t,c]),(0,_.jsx)(`div`,{className:`diff-tree-host`,children:(0,_.jsx)(ce,{"aria-label":`Changed files`,header:(0,_.jsx)(uu,{files:e}),model:c,style:{height:`100%`}})})}function uu({files:e}){let t=e.reduce((e,t)=>e+(t.additions??0),0),n=e.reduce((e,t)=>e+(t.deletions??0),0),r=e.length>su;return(0,_.jsxs)(`div`,{className:`flex items-center justify-between gap-2 border-b border-line px-2 py-1.5 font-mono text-[10px] text-muted`,children:[(0,_.jsx)(`span`,{children:`files`}),(0,_.jsxs)(`span`,{className:`text-primary`,children:[`+`,t,` -`,n,r?(0,_.jsx)(`span`,{className:`text-muted`,children:` - large set`}):null]})]})}function du(e){let t=e.status.toLowerCase();return t===`a`||t===`added`?{path:e.path,status:`added`}:t===`d`||t===`deleted`||t===`removed`?{path:e.path,status:`deleted`}:t===`r`||t===`renamed`?{path:e.path,status:`renamed`}:t===`??`||t===`untracked`?{path:e.path,status:`untracked`}:t?{path:e.path,status:`modified`}:null}var fu=`
|
|
1269
|
+
:host {
|
|
1270
|
+
--trees-bg-override: transparent;
|
|
1271
|
+
--trees-fg-override: var(--ink);
|
|
1272
|
+
--trees-fg-muted-override: var(--muted);
|
|
1273
|
+
--trees-border-color-override: var(--line);
|
|
1274
|
+
--trees-font-family-override: var(--font-mono);
|
|
1275
|
+
--trees-font-size-override: calc(10px * var(--deck-text-scale));
|
|
1276
|
+
--trees-selected-bg-override: color-mix(in srgb, var(--primary) 18%, transparent);
|
|
1277
|
+
--trees-bg-muted-override: color-mix(in srgb, var(--primary) 9%, transparent);
|
|
1278
|
+
display: block;
|
|
1279
|
+
height: 100%;
|
|
1280
|
+
min-height: 0;
|
|
1281
|
+
}
|
|
1282
|
+
button[data-type='item'] {
|
|
1283
|
+
border-radius: 0;
|
|
1284
|
+
}
|
|
1285
|
+
input {
|
|
1286
|
+
border-radius: 0;
|
|
1287
|
+
border-color: var(--trees-border-color-override);
|
|
1288
|
+
background: var(--trees-bg-muted-override);
|
|
1289
|
+
color: var(--trees-fg-override);
|
|
1290
|
+
font-family: var(--trees-font-family-override);
|
|
1291
|
+
}
|
|
1292
|
+
input::placeholder {
|
|
1293
|
+
color: var(--trees-fg-muted-override);
|
|
1294
|
+
}
|
|
1295
|
+
input:focus {
|
|
1296
|
+
outline: 1px solid var(--trees-selected-bg-override);
|
|
1297
|
+
outline-offset: 0;
|
|
1298
|
+
}
|
|
1299
|
+
`;function pu(e){let t=2166136261;for(let n of e)for(let e=0;e<n.length;e+=1)t^=n.charCodeAt(e),t=Math.imul(t,16777619);return`${e.length}:${t>>>0}`}var mu=`diffs-container`;(()=>{try{return!1}catch{return!1}})();var hu=/(?=^From [a-f0-9]+ .+$)/m,gu=/(?=^diff --git)/gm,_u=/(?<=\n)/,vu=/^(---|\+\+\+)\s+([^\t\r\n]+)/,yu=/^(---|\+\+\+)\s+[ab]\/([^\t\r\n]+)/,bu=/^diff --git (?:"a\/(.+?)"|a\/(.+?)) (?:"b\/(.+?)"|b\/(.+?))$/,xu=/^index ([0-9a-f]+)\.\.([0-9a-f]+)(?: (\d+))?$/i,Su=`header-prefix`,Cu=`header-metadata`,wu=`header-custom`,Tu={dark:`pierre-dark`,light:`pierre-light`},Eu=`data-theme-css`,Du=`data-unsafe-css`,Ou=`data-diffs-scrollbar-measure`,ku=`--diffs-scrollbar-gutter-measured`,Au=1e5,ju={hunkLineCount:50,lineHeight:20,diffHeaderHeight:44,spacing:8};({...ju});var Mu=Object.freeze({fromStart:0,fromEnd:0}),Nu={startingLine:0,totalLines:1/0,bufferBefore:0,bufferAfter:0},Pu={startingLine:0,totalLines:0,bufferBefore:0,bufferAfter:0};function Fu(e,t){return e==null||t==null||typeof e==`string`||typeof t==`string`?e===t:e.dark===t.dark&&e.light===t.light}var Iu=new Set;function Lu(e){return typeof e==`object`&&e&&`default`in e?e.default:e}var Ru=class extends Error{constructor(e){super(`Theme "${e}" is already registered`),this.name=`DuplicateThemeError`}},zu=class extends Error{constructor(e){super(`No loader registered for theme "${e}"`),this.name=`UnregisteredThemeError`}},Bu=class extends Error{constructor(e){super(`Theme "${e}" has not been resolved`),this.name=`UnresolvedThemeError`}};function Vu(){let e=new Map,t=new Map,n=new Map,r=0;function i(t,n){if(e.has(t))throw new Ru(t);e.set(t,n)}function a(t,n){return e.has(t)?!1:(e.set(t,n),!0)}function o(t){return e.has(t)}function s(i){let a=t.get(i);if(a!==void 0)return Promise.resolve(a);let o=n.get(i);if(o!==void 0)return o;let s=e.get(i);if(s===void 0)return Promise.reject(new zu(i));let c=r,l=s().then(e=>{let a=Lu(e);return c===r&&t.set(i,a),n.get(i)===l&&n.delete(i),a}).catch(e=>{throw n.get(i)===l&&n.delete(i),e});return n.set(i,l),l}function c(e){return Promise.all(e.map(e=>s(e)))}function l(e,n){t.set(e,n)}function u(e){for(let[t,n]of e)l(t,n)}function d(e){return t.get(e)}function f(e){let n=[];for(let r of e){let e=t.get(r);if(e===void 0)throw new Bu(r);n.push(e)}return n}function p(e){return t.has(e)}function m(e){for(let n of e)if(!t.has(n))return!1;return!0}function h(e){let n=t.get(e);return n===void 0?s(e):n}function g(){r++,t.clear(),n.clear()}return{clearResolvedThemes:g,getResolvedOrResolveTheme:h,getResolvedTheme:d,getResolvedThemes:f,hasRegisteredTheme:o,hasResolvedTheme:p,hasResolvedThemes:m,registerTheme:i,registerThemeIfAbsent:a,resolveTheme:s,resolveThemes:c,seedResolvedTheme:l,seedResolvedThemes:u}}var Hu=Vu();function Uu(e,t){e=Array.isArray(e)?e:[e];for(let n of e){let e;if(typeof n==`string`){if(e=Hu.getResolvedTheme(n),e==null)throw Error(`loadResolvedThemes: ${n} is not resolved, you must resolve it before calling loadResolvedThemes`)}else e=n,n=n.name,Hu.getResolvedTheme(n)??Hu.seedResolvedTheme(n,e);Iu.has(n)||(Iu.add(n),t.loadThemeSync(e))}}var Wu=new Map,Gu=new Map,Ku=new Map,qu=new Set;function Ju(e,t){e=Array.isArray(e)?e:[e];for(let n of e){if(qu.has(n.name))continue;let e=Wu.get(n.name);e??(e=n,Wu.set(n.name,e)),qu.add(e.name),t.loadLanguageSync(e.data)}}function Yu(){return typeof WorkerGlobalScope<`u`&&typeof self<`u`&&self instanceof WorkerGlobalScope}var Xu=[{id:`abap`,name:`ABAP`,import:(()=>d(()=>import(`./abap-CLvhMVsD.js`),[]))},{id:`actionscript-3`,name:`ActionScript`,import:(()=>d(()=>import(`./actionscript-3--17pq3dv.js`),[]))},{id:`ada`,name:`Ada`,import:(()=>d(()=>import(`./ada-C5qYipkI.js`),[]))},{id:`angular-html`,name:`Angular HTML`,import:(()=>d(()=>import(`./angular-html-BVBpGdXr.js`).then(e=>e.n),__vite__mapDeps([0,1,2,3,4])))},{id:`angular-ts`,name:`Angular TypeScript`,import:(()=>d(()=>import(`./angular-ts-BfdufMKP.js`),__vite__mapDeps([5,0,1,2,3,4,6])))},{id:`apache`,name:`Apache Conf`,import:(()=>d(()=>import(`./apache-U0d_L8uA.js`),[]))},{id:`apex`,name:`Apex`,import:(()=>d(()=>import(`./apex-VAyPSnFM.js`),[]))},{id:`apl`,name:`APL`,import:(()=>d(()=>import(`./apl-DWBSSoBH.js`),__vite__mapDeps([7,3,1,4,2,8,9,10])))},{id:`applescript`,name:`AppleScript`,import:(()=>d(()=>import(`./applescript-CCn79oCD.js`),[]))},{id:`ara`,name:`Ara`,import:(()=>d(()=>import(`./ara-4CJ0cIlV.js`),[]))},{id:`asciidoc`,name:`AsciiDoc`,aliases:[`adoc`],import:(()=>d(()=>import(`./asciidoc-DE70LPWp.js`),[]))},{id:`asm`,name:`Assembly`,import:(()=>d(()=>import(`./asm-Cmm7eHzH.js`),[]))},{id:`astro`,name:`Astro`,import:(()=>d(()=>import(`./astro-3LtMP0Sq.js`),__vite__mapDeps([11,3,1,4,10,12,13,14])))},{id:`awk`,name:`AWK`,import:(()=>d(()=>import(`./awk-BWXHIvNe.js`),[]))},{id:`ballerina`,name:`Ballerina`,import:(()=>d(()=>import(`./ballerina-B7ZEbQpA.js`),[]))},{id:`bat`,name:`Batch File`,aliases:[`batch`],import:(()=>d(()=>import(`./bat-Bo4NYOV-.js`),[]))},{id:`beancount`,name:`Beancount`,import:(()=>d(()=>import(`./beancount-D-usSTwE.js`),[]))},{id:`berry`,name:`Berry`,aliases:[`be`],import:(()=>d(()=>import(`./berry-DKpUyyne.js`),[]))},{id:`bibtex`,name:`BibTeX`,import:(()=>d(()=>import(`./bibtex-Ci_nEsc7.js`),[]))},{id:`bicep`,name:`Bicep`,import:(()=>d(()=>import(`./bicep-CUHmPFLl.js`),[]))},{id:`bird2`,name:`BIRD2 Configuration`,aliases:[`bird`],import:(()=>d(()=>import(`./bird2-C6vDhewU.js`),[]))},{id:`blade`,name:`Blade`,import:(()=>d(()=>import(`./blade-llJRbbtR.js`),__vite__mapDeps([15,3,1,4,2,8,9,10,16,17])))},{id:`bsl`,name:`1C (Enterprise)`,aliases:[`1c`],import:(()=>d(()=>import(`./bsl-BkkzgIyY.js`),__vite__mapDeps([18,19])))},{id:`c`,name:`C`,import:(()=>d(()=>import(`./c-Wt1voDr2.js`).then(e=>e.n),__vite__mapDeps([20,1])))},{id:`c3`,name:`C3`,import:(()=>d(()=>import(`./c3-BFHwR3_K.js`),[]))},{id:`cadence`,name:`Cadence`,aliases:[`cdc`],import:(()=>d(()=>import(`./cadence-CQ2zXKGN.js`),[]))},{id:`cairo`,name:`Cairo`,import:(()=>d(()=>import(`./cairo-DLTphjLi.js`),__vite__mapDeps([21,22])))},{id:`clarity`,name:`Clarity`,import:(()=>d(()=>import(`./clarity-SemFz856.js`),[]))},{id:`clojure`,name:`Clojure`,aliases:[`clj`],import:(()=>d(()=>import(`./clojure-DqKBuwfJ.js`),[]))},{id:`cmake`,name:`CMake`,import:(()=>d(()=>import(`./cmake-Bj61d0ZC.js`),[]))},{id:`cobol`,name:`COBOL`,import:(()=>d(()=>import(`./cobol-x_HIyl2P.js`),__vite__mapDeps([23,2,1,3,4,9])))},{id:`codeowners`,name:`CODEOWNERS`,import:(()=>d(()=>import(`./codeowners-C8r90Shi.js`),[]))},{id:`codeql`,name:`CodeQL`,aliases:[`ql`],import:(()=>d(()=>import(`./codeql-oeQT6MSM.js`),[]))},{id:`coffee`,name:`CoffeeScript`,aliases:[`coffeescript`],import:(()=>d(()=>import(`./coffee-CThvmt4R.js`),__vite__mapDeps([24,3,1])))},{id:`common-lisp`,name:`Common Lisp`,aliases:[`lisp`],import:(()=>d(()=>import(`./common-lisp-Cv5bFMCO.js`),[]))},{id:`coq`,name:`Coq`,import:(()=>d(()=>import(`./coq-BrsZFFmf.js`),[]))},{id:`cpp`,name:`C++`,aliases:[`c++`],import:(()=>d(()=>import(`./cpp-NtAeskI3.js`).then(e=>e.n),__vite__mapDeps([25,1,17,26,27,20])))},{id:`crystal`,name:`Crystal`,import:(()=>d(()=>import(`./crystal-DNu_sX0G.js`),__vite__mapDeps([28,3,1,4,2,17,20,29])))},{id:`csharp`,name:`C#`,aliases:[`c#`,`cs`],import:(()=>d(()=>import(`./csharp-oqKa8noW.js`),[]))},{id:`css`,name:`CSS`,import:(()=>d(()=>import(`./css-DJp_X0uY.js`).then(e=>e.n),__vite__mapDeps([4,1])))},{id:`csv`,name:`CSV`,import:(()=>d(()=>import(`./csv-Dx-8-gkx.js`),[]))},{id:`cue`,name:`CUE`,import:(()=>d(()=>import(`./cue-CE9AQfxI.js`),[]))},{id:`cypher`,name:`Cypher`,aliases:[`cql`],import:(()=>d(()=>import(`./cypher-ClKdZ_lG.js`),[]))},{id:`d`,name:`D`,import:(()=>d(()=>import(`./d-qD-0Kul2.js`),[]))},{id:`dart`,name:`Dart`,import:(()=>d(()=>import(`./dart-CnvKMtbv.js`),[]))},{id:`dax`,name:`DAX`,import:(()=>d(()=>import(`./dax-BkyTk9wS.js`),[]))},{id:`desktop`,name:`Desktop`,import:(()=>d(()=>import(`./desktop-Dlh5hvp9.js`),[]))},{id:`diff`,name:`Diff`,import:(()=>d(()=>import(`./diff-woXpYk--.js`),[]))},{id:`docker`,name:`Dockerfile`,aliases:[`dockerfile`],import:(()=>d(()=>import(`./docker-IyjqRm3v.js`),[]))},{id:`dotenv`,name:`dotEnv`,import:(()=>d(()=>import(`./dotenv-_5a1GRtc.js`),[]))},{id:`dream-maker`,name:`Dream Maker`,import:(()=>d(()=>import(`./dream-maker-DW3nJb8Q.js`),[]))},{id:`edge`,name:`Edge`,import:(()=>d(()=>import(`./edge-ozw5tpLl.js`),__vite__mapDeps([30,2,1,3,4,12,16])))},{id:`elixir`,name:`Elixir`,import:(()=>d(()=>import(`./elixir-VhA6FeZt.js`),__vite__mapDeps([31,2,1,3,4])))},{id:`elm`,name:`Elm`,import:(()=>d(()=>import(`./elm-dREJmIFz.js`),__vite__mapDeps([32,27,1,20])))},{id:`emacs-lisp`,name:`Emacs Lisp`,aliases:[`elisp`],import:(()=>d(()=>import(`./emacs-lisp-B4R74twV.js`),[]))},{id:`erb`,name:`ERB`,import:(()=>d(()=>import(`./erb-CIg6G69l.js`),__vite__mapDeps([33,2,1,3,4,34,8,9,17,20,25,26,27,29,35,36,12,14,37,38,39])))},{id:`erlang`,name:`Erlang`,aliases:[`erl`],import:(()=>d(()=>import(`./erlang-Cphh6RMH.js`),__vite__mapDeps([40,41])))},{id:`fennel`,name:`Fennel`,import:(()=>d(()=>import(`./fennel-DQxkIbk2.js`),[]))},{id:`fish`,name:`Fish`,import:(()=>d(()=>import(`./fish-BJitypiv.js`),[]))},{id:`fluent`,name:`Fluent`,aliases:[`ftl`],import:(()=>d(()=>import(`./fluent-C03EYrpw.js`),[]))},{id:`fortran-fixed-form`,name:`Fortran (Fixed Form)`,aliases:[`f`,`for`,`f77`],import:(()=>d(()=>import(`./fortran-fixed-form-DEKoE2YW.js`),__vite__mapDeps([42,43])))},{id:`fortran-free-form`,name:`Fortran (Free Form)`,aliases:[`f90`,`f95`,`f03`,`f08`,`f18`],import:(()=>d(()=>import(`./fortran-free-form-CYNrtFtB.js`),[]))},{id:`fsharp`,name:`F#`,aliases:[`f#`,`fs`],import:(()=>d(()=>import(`./fsharp-D13ZGOAj.js`),__vite__mapDeps([44,41])))},{id:`gdresource`,name:`GDResource`,aliases:[`tscn`,`tres`],import:(()=>d(()=>import(`./gdresource-C0sCabJj.js`),__vite__mapDeps([45,46,47])))},{id:`gdscript`,name:`GDScript`,aliases:[`gd`],import:(()=>d(()=>import(`./gdscript-Cp2uCuqX.js`),[]))},{id:`gdshader`,name:`GDShader`,import:(()=>d(()=>import(`./gdshader-CBce3t8t.js`),[]))},{id:`genie`,name:`Genie`,import:(()=>d(()=>import(`./genie-CV2tkWYe.js`),[]))},{id:`gherkin`,name:`Gherkin`,import:(()=>d(()=>import(`./gherkin-DExj1W_8.js`),[]))},{id:`git-commit`,name:`Git Commit Message`,import:(()=>d(()=>import(`./git-commit-BSykSTBG.js`),__vite__mapDeps([48,49])))},{id:`git-rebase`,name:`Git Rebase Message`,import:(()=>d(()=>import(`./git-rebase-B44mJPta.js`),__vite__mapDeps([50,29,1])))},{id:`gleam`,name:`Gleam`,import:(()=>d(()=>import(`./gleam-CSRkHgEL.js`),[]))},{id:`glimmer-js`,name:`Glimmer JS`,aliases:[`gjs`],import:(()=>d(()=>import(`./glimmer-js-vH_gHG0-.js`),__vite__mapDeps([51,3,1,4,2,12])))},{id:`glimmer-ts`,name:`Glimmer TS`,aliases:[`gts`],import:(()=>d(()=>import(`./glimmer-ts--abOzSAQ.js`),__vite__mapDeps([52,3,1,4,2,12])))},{id:`glsl`,name:`GLSL`,import:(()=>d(()=>import(`./glsl-Dv5r7kPw.js`).then(e=>e.n),__vite__mapDeps([27,1,20])))},{id:`gn`,name:`GN`,import:(()=>d(()=>import(`./gn-ilITqXS6.js`),[]))},{id:`gnuplot`,name:`Gnuplot`,import:(()=>d(()=>import(`./gnuplot-7GGW24-e.js`),[]))},{id:`go`,name:`Go`,import:(()=>d(()=>import(`./go-rLFTqkRN.js`),[]))},{id:`graphql`,name:`GraphQL`,aliases:[`gql`],import:(()=>d(()=>import(`./graphql-CB4jsw2E.js`).then(e=>e.n),__vite__mapDeps([36,1,3,12,14,37])))},{id:`groovy`,name:`Groovy`,import:(()=>d(()=>import(`./groovy-CacY0gHj.js`),[]))},{id:`hack`,name:`Hack`,import:(()=>d(()=>import(`./hack-DvEYX148.js`),__vite__mapDeps([53,2,1,3,4,17])))},{id:`haml`,name:`Ruby Haml`,import:(()=>d(()=>import(`./haml-zE6W3STP.js`).then(e=>e.n),__vite__mapDeps([35,1,3,4])))},{id:`handlebars`,name:`Handlebars`,aliases:[`hbs`],import:(()=>d(()=>import(`./handlebars-CzBR2SDs.js`),__vite__mapDeps([54,3,1,4,2,39])))},{id:`haskell`,name:`Haskell`,aliases:[`hs`],import:(()=>d(()=>import(`./haskell-D8IpX4py.js`),[]))},{id:`haxe`,name:`Haxe`,import:(()=>d(()=>import(`./haxe-OTjmBuCE.js`),[]))},{id:`hcl`,name:`HashiCorp HCL`,import:(()=>d(()=>import(`./hcl-Dh228itO.js`),[]))},{id:`hjson`,name:`Hjson`,import:(()=>d(()=>import(`./hjson-CxZEssPk.js`),[]))},{id:`hlsl`,name:`HLSL`,import:(()=>d(()=>import(`./hlsl-Cvrh5tZx.js`),[]))},{id:`html`,name:`HTML`,import:(()=>d(()=>import(`./html-C8UlPnhE.js`).then(e=>e.n),__vite__mapDeps([2,1,3,4])))},{id:`html-derivative`,name:`HTML (Derivative)`,import:(()=>d(()=>import(`./html-derivative-CY6NRz-J.js`),__vite__mapDeps([16,2,1,3,4])))},{id:`http`,name:`HTTP`,import:(()=>d(()=>import(`./http-Cyd7bS_S.js`),__vite__mapDeps([55,8,1,9,10,29,36,3,12,14,37])))},{id:`hurl`,name:`Hurl`,import:(()=>d(()=>import(`./hurl-CWPsiEpf.js`),__vite__mapDeps([56,8,1,9,57,36,3,12,14,37])))},{id:`hxml`,name:`HXML`,import:(()=>d(()=>import(`./hxml-B0Qn7Nwc.js`),__vite__mapDeps([58,59])))},{id:`hy`,name:`Hy`,import:(()=>d(()=>import(`./hy-CZbG8q4J.js`),[]))},{id:`imba`,name:`Imba`,import:(()=>d(()=>import(`./imba-DsUTQ-LC.js`),[]))},{id:`ini`,name:`INI`,aliases:[`properties`],import:(()=>d(()=>import(`./ini-B5eOa1yu.js`),[]))},{id:`java`,name:`Java`,import:(()=>d(()=>import(`./java-CGc3VwQr.js`).then(e=>e.n),__vite__mapDeps([9,1])))},{id:`javascript`,name:`JavaScript`,aliases:[`js`,`cjs`,`mjs`],import:(()=>d(()=>import(`./javascript-CUt1pgmJ.js`).then(e=>e.n),__vite__mapDeps([3,1])))},{id:`jinja`,name:`Jinja`,import:(()=>d(()=>import(`./jinja-CD-Z-FLd.js`),__vite__mapDeps([60,2,1,3,4])))},{id:`jison`,name:`Jison`,import:(()=>d(()=>import(`./jison-imPNup1l.js`),__vite__mapDeps([61,3,1])))},{id:`json`,name:`JSON`,import:(()=>d(()=>import(`./json-Bg9ijW3F.js`).then(e=>e.n),__vite__mapDeps([10,1])))},{id:`json5`,name:`JSON5`,import:(()=>d(()=>import(`./json5-BR5RXkoi.js`),[]))},{id:`jsonc`,name:`JSON with Comments`,import:(()=>d(()=>import(`./jsonc-CYpm1nAK.js`),[]))},{id:`jsonl`,name:`JSON Lines`,import:(()=>d(()=>import(`./jsonl-CmCQp5Yx.js`),[]))},{id:`jsonnet`,name:`Jsonnet`,import:(()=>d(()=>import(`./jsonnet-CJTPZ8u_.js`),[]))},{id:`jssm`,name:`JSSM`,aliases:[`fsl`],import:(()=>d(()=>import(`./jssm-DXw9l8Rf.js`),[]))},{id:`jsx`,name:`JSX`,import:(()=>d(()=>import(`./jsx-CY6oMTks.js`).then(e=>e.n),__vite__mapDeps([37,1])))},{id:`julia`,name:`Julia`,aliases:[`jl`],import:(()=>d(()=>import(`./julia-Dc3O-irA.js`),__vite__mapDeps([62,3,1,17,22,25,26,27,20,63])))},{id:`just`,name:`Just`,import:(()=>d(()=>import(`./just-BhOq_Kbv.js`),__vite__mapDeps([64,3,1,12,22,29,34,4,2,8,9,17,20,25,26,27,35,36,14,37,38,39,65])))},{id:`kdl`,name:`KDL`,import:(()=>d(()=>import(`./kdl-CsD5j6eV.js`),[]))},{id:`kotlin`,name:`Kotlin`,aliases:[`kt`,`kts`],import:(()=>d(()=>import(`./kotlin-DhhofPvG.js`),[]))},{id:`kusto`,name:`Kusto`,aliases:[`kql`],import:(()=>d(()=>import(`./kusto-C7mF5XQf.js`),[]))},{id:`latex`,name:`LaTeX`,import:(()=>d(()=>import(`./latex-Cu4Y1d5w.js`),__vite__mapDeps([66,67,63,1])))},{id:`lean`,name:`Lean 4`,aliases:[`lean4`],import:(()=>d(()=>import(`./lean-CewbzKMR.js`),[]))},{id:`less`,name:`Less`,import:(()=>d(()=>import(`./less-DVTAwKKz.js`),[]))},{id:`liquid`,name:`Liquid`,import:(()=>d(()=>import(`./liquid-CvXMrjlQ.js`),__vite__mapDeps([68,3,1,4,2,10])))},{id:`llvm`,name:`LLVM IR`,import:(()=>d(()=>import(`./llvm-Cm23YOpf.js`),[]))},{id:`log`,name:`Log file`,import:(()=>d(()=>import(`./log-BNLmms1o.js`),[]))},{id:`logo`,name:`Logo`,import:(()=>d(()=>import(`./logo-Cluzi2Zq.js`),[]))},{id:`lua`,name:`Lua`,import:(()=>d(()=>import(`./lua-BjLEUjKY.js`).then(e=>e.n),__vite__mapDeps([38,1,20])))},{id:`luau`,name:`Luau`,import:(()=>d(()=>import(`./luau-FMPmPwt6.js`),[]))},{id:`make`,name:`Makefile`,aliases:[`makefile`],import:(()=>d(()=>import(`./make-Dixweg8N.js`),[]))},{id:`markdown`,name:`Markdown`,aliases:[`md`],import:(()=>d(()=>import(`./markdown-BYOwaDjH.js`),[]))},{id:`marko`,name:`Marko`,import:(()=>d(()=>import(`./marko-DvhNOisQ.js`),__vite__mapDeps([69,4,1,6,12,70])))},{id:`matlab`,name:`MATLAB`,import:(()=>d(()=>import(`./matlab-D7qyCx1q.js`),[]))},{id:`mdc`,name:`MDC`,import:(()=>d(()=>import(`./mdc-Bm9TpL1X.js`),__vite__mapDeps([71,16,2,1,3,4,39,41])))},{id:`mdx`,name:`MDX`,import:(()=>d(()=>import(`./mdx-DQZ5AkYe.js`),[]))},{id:`mermaid`,name:`Mermaid`,aliases:[`mmd`],import:(()=>d(()=>import(`./mermaid-Bk4SNUv9.js`),[]))},{id:`mipsasm`,name:`MIPS Assembly`,aliases:[`mips`],import:(()=>d(()=>import(`./mipsasm-BMqwQI7S.js`),[]))},{id:`mojo`,name:`Mojo`,import:(()=>d(()=>import(`./mojo-BgCJLMeH.js`),[]))},{id:`moonbit`,name:`MoonBit`,aliases:[`mbt`,`mbti`],import:(()=>d(()=>import(`./moonbit-CaWjb8XO.js`),[]))},{id:`move`,name:`Move`,import:(()=>d(()=>import(`./move-B1IS1UjX.js`),[]))},{id:`narrat`,name:`Narrat Language`,aliases:[`nar`],import:(()=>d(()=>import(`./narrat-_X_XdTYD.js`),[]))},{id:`nextflow`,name:`Nextflow`,aliases:[`nf`],import:(()=>d(()=>import(`./nextflow-BJtWHP5T.js`),__vite__mapDeps([72,73])))},{id:`nextflow-groovy`,name:`Nextflow Groovy`,import:(()=>d(()=>import(`./nextflow-groovy-DJMQeKeT.js`),[]))},{id:`nginx`,name:`Nginx`,import:(()=>d(()=>import(`./nginx-Bhc82uuv.js`),__vite__mapDeps([74,38,1,20])))},{id:`nim`,name:`Nim`,import:(()=>d(()=>import(`./nim-DXTVBFnF.js`),__vite__mapDeps([75,3,1,4,2,8,9,20,27,41])))},{id:`nix`,name:`Nix`,import:(()=>d(()=>import(`./nix-IvuFDN5E.js`),[]))},{id:`nushell`,name:`nushell`,aliases:[`nu`],import:(()=>d(()=>import(`./nushell-DcLAeLz5.js`),[]))},{id:`objective-c`,name:`Objective-C`,aliases:[`objc`],import:(()=>d(()=>import(`./objective-c-D1A_Heim.js`),[]))},{id:`objective-cpp`,name:`Objective-C++`,import:(()=>d(()=>import(`./objective-cpp-BsSzOQcm.js`),[]))},{id:`ocaml`,name:`OCaml`,import:(()=>d(()=>import(`./ocaml-O90oeIOV.js`),[]))},{id:`odin`,name:`Odin`,import:(()=>d(()=>import(`./odin-B1RWQWA5.js`),[]))},{id:`openscad`,name:`OpenSCAD`,aliases:[`scad`],import:(()=>d(()=>import(`./openscad-BUDT5pXO.js`),[]))},{id:`pascal`,name:`Pascal`,import:(()=>d(()=>import(`./pascal-4ZHwLPI5.js`),[]))},{id:`perl`,name:`Perl`,import:(()=>d(()=>import(`./perl-C7veXV9z.js`),__vite__mapDeps([65,3,1,4,2,8,9,17])))},{id:`php`,name:`PHP`,import:(()=>d(()=>import(`./php-BRiuMnnr.js`),__vite__mapDeps([76,3,1,4,2,8,9,10,17])))},{id:`pkl`,name:`Pkl`,import:(()=>d(()=>import(`./pkl-ot-7Btpt.js`),[]))},{id:`plsql`,name:`PL/SQL`,import:(()=>d(()=>import(`./plsql-DGHpHOYJ.js`),[]))},{id:`po`,name:`Gettext PO`,aliases:[`pot`,`potx`],import:(()=>d(()=>import(`./po-BiJDBrnU.js`),[]))},{id:`polar`,name:`Polar`,import:(()=>d(()=>import(`./polar-C7UOKdEL.js`),[]))},{id:`postcss`,name:`PostCSS`,import:(()=>d(()=>import(`./postcss-BXeXVLqQ.js`),[]))},{id:`powerquery`,name:`PowerQuery`,import:(()=>d(()=>import(`./powerquery-DNMTfnFr.js`),[]))},{id:`powershell`,name:`PowerShell`,aliases:[`ps`,`ps1`],import:(()=>d(()=>import(`./powershell-DshXNtvi.js`),[]))},{id:`prisma`,name:`Prisma`,import:(()=>d(()=>import(`./prisma-BsRQq5mF.js`),[]))},{id:`prolog`,name:`Prolog`,import:(()=>d(()=>import(`./prolog-iXnhIJG7.js`),[]))},{id:`proto`,name:`Protocol Buffer 3`,aliases:[`protobuf`],import:(()=>d(()=>import(`./proto-DB4EqR-F.js`),[]))},{id:`pug`,name:`Pug`,aliases:[`jade`],import:(()=>d(()=>import(`./pug-C5hz5LQ7.js`),__vite__mapDeps([77,3,1,4,2])))},{id:`puppet`,name:`Puppet`,import:(()=>d(()=>import(`./puppet-CDv2pdJW.js`),[]))},{id:`purescript`,name:`PureScript`,import:(()=>d(()=>import(`./purescript-9MfHhQsQ.js`),[]))},{id:`python`,name:`Python`,aliases:[`py`],import:(()=>d(()=>import(`./python-gzcpVVnB.js`),[]))},{id:`qml`,name:`QML`,import:(()=>d(()=>import(`./qml-BdUV3aTS.js`),__vite__mapDeps([78,3,1])))},{id:`qmldir`,name:`QML Directory`,import:(()=>d(()=>import(`./qmldir-DCQb3MpD.js`),[]))},{id:`qss`,name:`Qt Style Sheets`,import:(()=>d(()=>import(`./qss-Fe1Jh2GI.js`),[]))},{id:`r`,name:`R`,import:(()=>d(()=>import(`./r-8R7vtdQc.js`).then(e=>e.n),__vite__mapDeps([63,1])))},{id:`racket`,name:`Racket`,import:(()=>d(()=>import(`./racket-DcIDlBhZ.js`),[]))},{id:`raku`,name:`Raku`,aliases:[`perl6`],import:(()=>d(()=>import(`./raku-B3gFvitq.js`),[]))},{id:`razor`,name:`ASP.NET Razor`,import:(()=>d(()=>import(`./razor-DRL52XO2.js`),__vite__mapDeps([79,2,1,3,4,80])))},{id:`reg`,name:`Windows Registry Script`,import:(()=>d(()=>import(`./reg-CRGYupPL.js`),[]))},{id:`regexp`,name:`RegExp`,aliases:[`regex`],import:(()=>d(()=>import(`./regexp-Omp9DhTb.js`).then(e=>e.n),__vite__mapDeps([26,1])))},{id:`rel`,name:`Rel`,import:(()=>d(()=>import(`./rel-BtDbiS_P.js`),[]))},{id:`riscv`,name:`RISC-V`,import:(()=>d(()=>import(`./riscv-Ckw8ddFX.js`),[]))},{id:`ron`,name:`RON`,import:(()=>d(()=>import(`./ron-VUp2lXgN.js`),[]))},{id:`rosmsg`,name:`ROS Interface`,import:(()=>d(()=>import(`./rosmsg-CAekHB0j.js`),[]))},{id:`rst`,name:`reStructuredText`,import:(()=>d(()=>import(`./rst-BHX71KW9.js`),__vite__mapDeps([81,3,1,16,2,4,22,82,25,17,26,27,20,29,39,34,8,9,35,36,12,14,37,38])))},{id:`ruby`,name:`Ruby`,aliases:[`rb`],import:(()=>d(()=>import(`./ruby-B--HzjGU.js`),__vite__mapDeps([34,3,1,4,2,8,9,17,20,25,26,27,29,35,36,12,14,37,38,39])))},{id:`rust`,name:`Rust`,aliases:[`rs`],import:(()=>d(()=>import(`./rust-Cfkwpbl8.js`),[]))},{id:`sas`,name:`SAS`,import:(()=>d(()=>import(`./sas-DrLaYOK_.js`),__vite__mapDeps([83,17,1])))},{id:`sass`,name:`Sass`,import:(()=>d(()=>import(`./sass-DXrisJhu.js`),[]))},{id:`scala`,name:`Scala`,import:(()=>d(()=>import(`./scala-DKOlJaKm.js`),[]))},{id:`scheme`,name:`Scheme`,import:(()=>d(()=>import(`./scheme-DQCgrYNe.js`),[]))},{id:`scss`,name:`SCSS`,import:(()=>d(()=>import(`./scss-DdSxiZKl.js`).then(e=>e.n),__vite__mapDeps([6,1,4])))},{id:`sdbl`,name:`1C (Query)`,aliases:[`1c-query`],import:(()=>d(()=>import(`./sdbl-bTVj8UrX.js`),[]))},{id:`shaderlab`,name:`ShaderLab`,aliases:[`shader`],import:(()=>d(()=>import(`./shaderlab-TOUzSsQk.js`),__vite__mapDeps([84,85])))},{id:`shellscript`,name:`Shell`,aliases:[`bash`,`sh`,`shell`,`zsh`],import:(()=>d(()=>import(`./shellscript-DwcUjJBL.js`).then(e=>e.n),__vite__mapDeps([29,1])))},{id:`shellsession`,name:`Shell Session`,aliases:[`console`],import:(()=>d(()=>import(`./shellsession-CPZkydE6.js`),__vite__mapDeps([86,29,1])))},{id:`smalltalk`,name:`Smalltalk`,import:(()=>d(()=>import(`./smalltalk-B16xEiuN.js`),[]))},{id:`solidity`,name:`Solidity`,import:(()=>d(()=>import(`./solidity-CKzVLygQ.js`),[]))},{id:`soy`,name:`Closure Templates`,aliases:[`closure-templates`],import:(()=>d(()=>import(`./soy-Br5FhD7c.js`),__vite__mapDeps([87,2,1,3,4])))},{id:`sparql`,name:`SPARQL`,import:(()=>d(()=>import(`./sparql-D_iOobhT.js`),__vite__mapDeps([88,89])))},{id:`splunk`,name:`Splunk Query Language`,aliases:[`spl`],import:(()=>d(()=>import(`./splunk-BC2Px7Mm.js`),[]))},{id:`sql`,name:`SQL`,import:(()=>d(()=>import(`./sql-DNssxck8.js`).then(e=>e.n),__vite__mapDeps([17,1])))},{id:`ssh-config`,name:`SSH Config`,import:(()=>d(()=>import(`./ssh-config-BgfXC-Er.js`),[]))},{id:`stata`,name:`Stata`,import:(()=>d(()=>import(`./stata-DXn1tqOr.js`),__vite__mapDeps([90,17,1])))},{id:`stylus`,name:`Stylus`,aliases:[`styl`],import:(()=>d(()=>import(`./stylus-B6D30XZt.js`),[]))},{id:`surrealql`,name:`SurrealQL`,aliases:[`surql`],import:(()=>d(()=>import(`./surrealql-IeLNQw0f.js`),__vite__mapDeps([91,3,1])))},{id:`svelte`,name:`Svelte`,import:(()=>d(()=>import(`./svelte-DOdLCIlh.js`),__vite__mapDeps([92,3,1,4,12,13])))},{id:`swift`,name:`Swift`,import:(()=>d(()=>import(`./swift-DonLKvLd.js`),[]))},{id:`system-verilog`,name:`SystemVerilog`,import:(()=>d(()=>import(`./system-verilog-DJ5XKQeo.js`),[]))},{id:`systemd`,name:`Systemd Units`,import:(()=>d(()=>import(`./systemd-BxMlprV5.js`),[]))},{id:`talonscript`,name:`TalonScript`,aliases:[`talon`],import:(()=>d(()=>import(`./talonscript-CohzipZa.js`),[]))},{id:`tasl`,name:`Tasl`,import:(()=>d(()=>import(`./tasl-DMoTqEGO.js`),[]))},{id:`tcl`,name:`Tcl`,import:(()=>d(()=>import(`./tcl-CZd0xW_V.js`),[]))},{id:`templ`,name:`Templ`,import:(()=>d(()=>import(`./templ-CIwIngms.js`),__vite__mapDeps([93,3,1,4,94])))},{id:`terraform`,name:`Terraform`,aliases:[`tf`,`tfvars`],import:(()=>d(()=>import(`./terraform-DswuEJGm.js`),[]))},{id:`tex`,name:`TeX`,import:(()=>d(()=>import(`./tex-D8QMumu5.js`),__vite__mapDeps([67,63,1])))},{id:`toml`,name:`TOML`,import:(()=>d(()=>import(`./toml-CcmNWLt0.js`),[]))},{id:`ts-tags`,name:`TypeScript with Tags`,aliases:[`lit`],import:(()=>d(()=>import(`./ts-tags-BMVY4q-l.js`),__vite__mapDeps([95,3,1,4,2,8,9,12,17,27,20])))},{id:`tsv`,name:`TSV`,import:(()=>d(()=>import(`./tsv-sltzmVWM.js`),[]))},{id:`tsx`,name:`TSX`,import:(()=>d(()=>import(`./tsx-5Eka4NBX.js`).then(e=>e.n),__vite__mapDeps([14,1])))},{id:`turtle`,name:`Turtle`,import:(()=>d(()=>import(`./turtle-ByJddavk.js`),[]))},{id:`twig`,name:`Twig`,import:(()=>d(()=>import(`./twig-C8o_5mgw.js`),__vite__mapDeps([96,3,1,4,6,22,34,2,8,9,17,20,25,26,27,29,35,36,12,14,37,38,39,76,10])))},{id:`typescript`,name:`TypeScript`,aliases:[`ts`,`cts`,`mts`],import:(()=>d(()=>import(`./typescript-DOu2WMV5.js`).then(e=>e.n),__vite__mapDeps([12,1])))},{id:`typespec`,name:`TypeSpec`,aliases:[`tsp`],import:(()=>d(()=>import(`./typespec-BRdr0IET.js`),[]))},{id:`typst`,name:`Typst`,aliases:[`typ`],import:(()=>d(()=>import(`./typst-DI99ib-x.js`),[]))},{id:`v`,name:`V`,import:(()=>d(()=>import(`./v-DETTlOr0.js`),[]))},{id:`vala`,name:`Vala`,import:(()=>d(()=>import(`./vala-zf12oZj6.js`),[]))},{id:`vb`,name:`Visual Basic`,aliases:[`cmd`],import:(()=>d(()=>import(`./vb-Djn5o6TS.js`),[]))},{id:`verilog`,name:`Verilog`,import:(()=>d(()=>import(`./verilog-CiiDBU1e.js`),[]))},{id:`vhdl`,name:`VHDL`,import:(()=>d(()=>import(`./vhdl-BroJfC0k.js`),[]))},{id:`viml`,name:`Vim Script`,aliases:[`vim`,`vimscript`],import:(()=>d(()=>import(`./viml-DvXPmvsu.js`),[]))},{id:`vue`,name:`Vue`,import:(()=>d(()=>import(`./vue-BU18DNDL.js`),__vite__mapDeps([97,3,1,4,2,10,12,16])))},{id:`vue-html`,name:`Vue HTML`,import:(()=>d(()=>import(`./vue-html-BeluIYX0.js`),__vite__mapDeps([98,3,1])))},{id:`vue-vine`,name:`Vue Vine`,import:(()=>d(()=>import(`./vue-vine-DGUAbOCX.js`),__vite__mapDeps([99,3,1,4,6,13,70,100])))},{id:`vyper`,name:`Vyper`,aliases:[`vy`],import:(()=>d(()=>import(`./vyper-CgoNMtux.js`),[]))},{id:`wasm`,name:`WebAssembly`,import:(()=>d(()=>import(`./wasm-ByWQv1Qj.js`),[]))},{id:`wenyan`,name:`Wenyan`,aliases:[`文言`],import:(()=>d(()=>import(`./wenyan-C8pVoKbM.js`),[]))},{id:`wgsl`,name:`WGSL`,import:(()=>d(()=>import(`./wgsl-BsKzXJz4.js`),[]))},{id:`wikitext`,name:`Wikitext`,aliases:[`mediawiki`,`wiki`],import:(()=>d(()=>import(`./wikitext-ClFFjSW2.js`),[]))},{id:`wit`,name:`WebAssembly Interface Types`,import:(()=>d(()=>import(`./wit-DdvCle-K.js`),[]))},{id:`wolfram`,name:`Wolfram`,aliases:[`wl`],import:(()=>d(()=>import(`./wolfram-DLL8P-h_.js`),[]))},{id:`xml`,name:`XML`,import:(()=>d(()=>import(`./xml-DIqSwXR3.js`).then(e=>e.n),__vite__mapDeps([8,1,9])))},{id:`xsl`,name:`XSL`,import:(()=>d(()=>import(`./xsl-Ct_-YIAy.js`),__vite__mapDeps([101,8,1,9])))},{id:`yaml`,name:`YAML`,aliases:[`yml`],import:(()=>d(()=>import(`./yaml-DTtCYNlS.js`).then(e=>e.n),__vite__mapDeps([39,1])))},{id:`zenscript`,name:`ZenScript`,import:(()=>d(()=>import(`./zenscript-BnlCZFoB.js`),[]))},{id:`zig`,name:`Zig`,import:(()=>d(()=>import(`./zig-CMLA9XwU.js`),[]))}],Zu=Object.fromEntries(Xu.map(e=>[e.id,e.import])),Qu=Object.fromEntries(Xu.flatMap(e=>e.aliases?.map(t=>[t,e.import])||[])),$u={...Zu,...Qu},ed=Object.defineProperty,td=Object.getOwnPropertyDescriptor,nd=Object.getOwnPropertyNames,rd=Object.prototype.hasOwnProperty,id=(e,t)=>{let n={};for(var r in e)ed(n,r,{get:e[r],enumerable:!0});return t||ed(n,Symbol.toStringTag,{value:`Module`}),n},ad=(e,t,n,r)=>{if(t&&typeof t==`object`||typeof t==`function`)for(var i=nd(t),a=0,o=i.length,s;a<o;a++)s=i[a],!rd.call(e,s)&&s!==n&&ed(e,s,{get:(e=>t[e]).bind(null,s),enumerable:!(r=td(t,s))||r.enumerable});return e},od=(e,t,n)=>(ad(e,t,`default`),n&&ad(n,t,`default`)),sd=e({createOnigurumaEngine:()=>Fd,getDefaultWasmLoader:()=>Pd,loadWasm:()=>Od,setDefaultWasmLoader:()=>Nd}),cd=class extends Error{constructor(e){super(e),this.name=`ShikiError`}};function ld(){return 2147483648}function ud(){return typeof performance<`u`?performance.now():Date.now()}var dd=(e,t)=>e+(t-e%t)%t;async function fd(e){let t,n,r={};function i(e){n=e,r.HEAPU8=new Uint8Array(e),r.HEAPU32=new Uint32Array(e)}function a(e,t,n){r.HEAPU8.copyWithin(e,t,t+n)}function o(e){try{return t.grow(e-n.byteLength+65535>>>16),i(t.buffer),1}catch{}}function s(e){let t=r.HEAPU8.length;e>>>=0;let n=ld();if(e>n)return!1;for(let r=1;r<=4;r*=2){let i=t*(1+.2/r);if(i=Math.min(i,e+100663296),o(Math.min(n,dd(Math.max(e,i),65536))))return!0}return!1}let c=typeof TextDecoder<`u`?new TextDecoder(`utf8`):void 0;function l(e,t,n=1024){let r=t+n,i=t;for(;e[i]&&!(i>=r);)++i;if(i-t>16&&e.buffer&&c)return c.decode(e.subarray(t,i));let a=``;for(;t<i;){let n=e[t++];if(!(n&128)){a+=String.fromCharCode(n);continue}let r=e[t++]&63;if((n&224)==192){a+=String.fromCharCode((n&31)<<6|r);continue}let i=e[t++]&63;if(n=(n&240)==224?(n&15)<<12|r<<6|i:(n&7)<<18|r<<12|i<<6|e[t++]&63,n<65536)a+=String.fromCharCode(n);else{let e=n-65536;a+=String.fromCharCode(55296|e>>10,56320|e&1023)}}return a}function u(e,t){return e?l(r.HEAPU8,e,t):``}let d={emscripten_get_now:ud,emscripten_memcpy_big:a,emscripten_resize_heap:s,fd_write:()=>0};async function f(){let n=await e({env:d,wasi_snapshot_preview1:d});t=n.memory,i(t.buffer),Object.assign(r,n),r.UTF8ToString=u}return await f(),r}var pd=Object.defineProperty,md=(e,t,n)=>t in e?pd(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,hd=(e,t,n)=>md(e,typeof t==`symbol`?t:t+``,n),gd=null;function _d(e){throw new cd(e.UTF8ToString(e.getLastOnigError()))}var vd=class e{constructor(t){hd(this,`utf16Length`),hd(this,`utf8Length`),hd(this,`utf16Value`),hd(this,`utf8Value`),hd(this,`utf16OffsetToUtf8`),hd(this,`utf8OffsetToUtf16`);let n=t.length,r=e._utf8ByteLength(t),i=r!==n,a=i?new Uint32Array(n+1):null;i&&(a[n]=r);let o=i?new Uint32Array(r+1):null;i&&(o[r]=n);let s=new Uint8Array(r),c=0;for(let e=0;e<n;e++){let r=t.charCodeAt(e),l=r,u=!1;if(r>=55296&&r<=56319&&e+1<n){let n=t.charCodeAt(e+1);n>=56320&&n<=57343&&(l=(r-55296<<10)+65536|n-56320,u=!0)}i&&(a[e]=c,u&&(a[e+1]=c),l<=127?o[c+0]=e:l<=2047?(o[c+0]=e,o[c+1]=e):l<=65535?(o[c+0]=e,o[c+1]=e,o[c+2]=e):(o[c+0]=e,o[c+1]=e,o[c+2]=e,o[c+3]=e)),l<=127?s[c++]=l:l<=2047?(s[c++]=192|(l&1984)>>>6,s[c++]=128|(l&63)>>>0):l<=65535?(s[c++]=224|(l&61440)>>>12,s[c++]=128|(l&4032)>>>6,s[c++]=128|(l&63)>>>0):(s[c++]=240|(l&1835008)>>>18,s[c++]=128|(l&258048)>>>12,s[c++]=128|(l&4032)>>>6,s[c++]=128|(l&63)>>>0),u&&e++}this.utf16Length=n,this.utf8Length=r,this.utf16Value=t,this.utf8Value=s,this.utf16OffsetToUtf8=a,this.utf8OffsetToUtf16=o}static _utf8ByteLength(e){let t=0;for(let n=0,r=e.length;n<r;n++){let i=e.charCodeAt(n),a=i,o=!1;if(i>=55296&&i<=56319&&n+1<r){let t=e.charCodeAt(n+1);t>=56320&&t<=57343&&(a=(i-55296<<10)+65536|t-56320,o=!0)}a<=127?t+=1:a<=2047?t+=2:a<=65535?t+=3:t+=4,o&&n++}return t}createString(e){let t=e.omalloc(this.utf8Length);return e.HEAPU8.set(this.utf8Value,t),t}},yd=class e{constructor(t){if(hd(this,`id`,++e.LAST_ID),hd(this,`_onigBinding`),hd(this,`content`),hd(this,`utf16Length`),hd(this,`utf8Length`),hd(this,`utf16OffsetToUtf8`),hd(this,`utf8OffsetToUtf16`),hd(this,`ptr`),!gd)throw new cd(`Must invoke loadWasm first.`);this._onigBinding=gd,this.content=t;let n=new vd(t);this.utf16Length=n.utf16Length,this.utf8Length=n.utf8Length,this.utf16OffsetToUtf8=n.utf16OffsetToUtf8,this.utf8OffsetToUtf16=n.utf8OffsetToUtf16,this.utf8Length<1e4&&!e._sharedPtrInUse?(e._sharedPtr||=gd.omalloc(1e4),e._sharedPtrInUse=!0,gd.HEAPU8.set(n.utf8Value,e._sharedPtr),this.ptr=e._sharedPtr):this.ptr=n.createString(gd)}convertUtf8OffsetToUtf16(e){return this.utf8OffsetToUtf16?e<0?0:e>this.utf8Length?this.utf16Length:this.utf8OffsetToUtf16[e]:e}convertUtf16OffsetToUtf8(e){return this.utf16OffsetToUtf8?e<0?0:e>this.utf16Length?this.utf8Length:this.utf16OffsetToUtf8[e]:e}dispose(){this.ptr===e._sharedPtr?e._sharedPtrInUse=!1:this._onigBinding.ofree(this.ptr)}};hd(yd,`LAST_ID`,0),hd(yd,`_sharedPtr`,0),hd(yd,`_sharedPtrInUse`,!1);var bd=yd,xd=class{constructor(e){if(hd(this,`_onigBinding`),hd(this,`_ptr`),!gd)throw new cd(`Must invoke loadWasm first.`);let t=[],n=[];for(let r=0,i=e.length;r<i;r++){let i=new vd(e[r]);t[r]=i.createString(gd),n[r]=i.utf8Length}let r=gd.omalloc(4*e.length);gd.HEAPU32.set(t,r/4);let i=gd.omalloc(4*e.length);gd.HEAPU32.set(n,i/4);let a=gd.createOnigScanner(r,i,e.length);for(let n=0,r=e.length;n<r;n++)gd.ofree(t[n]);gd.ofree(i),gd.ofree(r),a===0&&_d(gd),this._onigBinding=gd,this._ptr=a}dispose(){this._onigBinding.freeOnigScanner(this._ptr)}findNextMatchSync(e,t,n){let r=0;if(typeof n==`number`&&(r=n),typeof e==`string`){e=new bd(e);let n=this._findNextMatchSync(e,t,!1,r);return e.dispose(),n}return this._findNextMatchSync(e,t,!1,r)}_findNextMatchSync(e,t,n,r){let i=this._onigBinding,a=i.findNextOnigScannerMatch(this._ptr,e.id,e.ptr,e.utf8Length,e.convertUtf16OffsetToUtf8(t),r);if(a===0)return null;let o=i.HEAPU32,s=a/4,c=o[s++],l=o[s++],u=[];for(let t=0;t<l;t++){let n=e.convertUtf8OffsetToUtf16(o[s++]),r=e.convertUtf8OffsetToUtf16(o[s++]);u[t]={start:n,end:r,length:r-n}}return{index:c,captureIndices:u}}};function Sd(e){return typeof e.instantiator==`function`}function Cd(e){return typeof e.default==`function`}function wd(e){return e.data!==void 0}function Td(e){return typeof Response<`u`&&e instanceof Response}function Ed(e){return typeof ArrayBuffer<`u`&&(e instanceof ArrayBuffer||ArrayBuffer.isView(e))||typeof Buffer<`u`&&Buffer.isBuffer?.(e)||typeof SharedArrayBuffer<`u`&&e instanceof SharedArrayBuffer||typeof Uint32Array<`u`&&e instanceof Uint32Array}var Dd;function Od(e){if(Dd)return Dd;async function t(){gd=await fd(async t=>{let n=e;return n=await n,typeof n==`function`&&(n=await n(t)),typeof n==`function`&&(n=await n(t)),Sd(n)?n=await n.instantiator(t):Cd(n)?n=await n.default(t):(wd(n)&&(n=n.data),Td(n)?n=typeof WebAssembly.instantiateStreaming==`function`?await Ad(n)(t):await jd(n)(t):Ed(n)||n instanceof WebAssembly.Module?n=await kd(n)(t):`default`in n&&n.default instanceof WebAssembly.Module&&(n=await kd(n.default)(t))),`instance`in n&&(n=n.instance),`exports`in n&&(n=n.exports),n})}return Dd=t(),Dd}function kd(e){return t=>WebAssembly.instantiate(e,t)}function Ad(e){return t=>WebAssembly.instantiateStreaming(e,t)}function jd(e){return async t=>{let n=await e.arrayBuffer();return WebAssembly.instantiate(n,t)}}var Md;function Nd(e){Md=e}function Pd(){return Md}async function Fd(e){return e&&await Od(e),{createScanner(e){return new xd(e.map(e=>typeof e==`string`?e:e.source))},createString(e){return new bd(e)}}}var Id=id({});od(Id,sd);var Ld=Object.fromEntries([{id:`andromeeda`,displayName:`Andromeeda`,type:`dark`,import:(()=>d(()=>import(`./andromeeda-vGVdxbeo.js`),[]))},{id:`aurora-x`,displayName:`Aurora X`,type:`dark`,import:(()=>d(()=>import(`./aurora-x-CDeNXAV0.js`),[]))},{id:`ayu-dark`,displayName:`Ayu Dark`,type:`dark`,import:(()=>d(()=>import(`./ayu-dark-DluEY0Gj.js`),[]))},{id:`ayu-light`,displayName:`Ayu Light`,type:`light`,import:(()=>d(()=>import(`./ayu-light-C3h-C4tm.js`),[]))},{id:`ayu-mirage`,displayName:`Ayu Mirage`,type:`dark`,import:(()=>d(()=>import(`./ayu-mirage-Bqwy1Gya.js`),[]))},{id:`catppuccin-frappe`,displayName:`Catppuccin Frappé`,type:`dark`,import:(()=>d(()=>import(`./catppuccin-frappe-3VR1Za6u.js`),[]))},{id:`catppuccin-latte`,displayName:`Catppuccin Latte`,type:`light`,import:(()=>d(()=>import(`./catppuccin-latte-DwIHMF0Q.js`),[]))},{id:`catppuccin-macchiato`,displayName:`Catppuccin Macchiato`,type:`dark`,import:(()=>d(()=>import(`./catppuccin-macchiato-DYnBP6_5.js`),[]))},{id:`catppuccin-mocha`,displayName:`Catppuccin Mocha`,type:`dark`,import:(()=>d(()=>import(`./catppuccin-mocha-DYhrFGRu.js`),[]))},{id:`dark-plus`,displayName:`Dark Plus`,type:`dark`,import:(()=>d(()=>import(`./dark-plus-Cs2F2srj.js`),[]))},{id:`dracula`,displayName:`Dracula Theme`,type:`dark`,import:(()=>d(()=>import(`./dracula-BHWKrbxM.js`),[]))},{id:`dracula-soft`,displayName:`Dracula Theme Soft`,type:`dark`,import:(()=>d(()=>import(`./dracula-soft-5eyTD99u.js`),[]))},{id:`everforest-dark`,displayName:`Everforest Dark`,type:`dark`,import:(()=>d(()=>import(`./everforest-dark-sB-x3p7T.js`),[]))},{id:`everforest-light`,displayName:`Everforest Light`,type:`light`,import:(()=>d(()=>import(`./everforest-light-Df2xbC6M.js`),[]))},{id:`github-dark`,displayName:`GitHub Dark`,type:`dark`,import:(()=>d(()=>import(`./github-dark-C-LZuMrd.js`),[]))},{id:`github-dark-default`,displayName:`GitHub Dark Default`,type:`dark`,import:(()=>d(()=>import(`./github-dark-default-DXG-b-1a.js`),[]))},{id:`github-dark-dimmed`,displayName:`GitHub Dark Dimmed`,type:`dark`,import:(()=>d(()=>import(`./github-dark-dimmed-Bx1FflLF.js`),[]))},{id:`github-dark-high-contrast`,displayName:`GitHub Dark High Contrast`,type:`dark`,import:(()=>d(()=>import(`./github-dark-high-contrast-B_tTalzw.js`),[]))},{id:`github-light`,displayName:`GitHub Light`,type:`light`,import:(()=>d(()=>import(`./github-light-EUqPIrTm.js`),[]))},{id:`github-light-default`,displayName:`GitHub Light Default`,type:`light`,import:(()=>d(()=>import(`./github-light-default-BXViO-2h.js`),[]))},{id:`github-light-high-contrast`,displayName:`GitHub Light High Contrast`,type:`light`,import:(()=>d(()=>import(`./github-light-high-contrast-B68TUdTA.js`),[]))},{id:`gruvbox-dark-hard`,displayName:`Gruvbox Dark Hard`,type:`dark`,import:(()=>d(()=>import(`./gruvbox-dark-hard-C820rvS2.js`),[]))},{id:`gruvbox-dark-medium`,displayName:`Gruvbox Dark Medium`,type:`dark`,import:(()=>d(()=>import(`./gruvbox-dark-medium-BPjhmG05.js`),[]))},{id:`gruvbox-dark-soft`,displayName:`Gruvbox Dark Soft`,type:`dark`,import:(()=>d(()=>import(`./gruvbox-dark-soft-MrdJrrXF.js`),[]))},{id:`gruvbox-light-hard`,displayName:`Gruvbox Light Hard`,type:`light`,import:(()=>d(()=>import(`./gruvbox-light-hard-BC_s9l72.js`),[]))},{id:`gruvbox-light-medium`,displayName:`Gruvbox Light Medium`,type:`light`,import:(()=>d(()=>import(`./gruvbox-light-medium-BAWPOn9u.js`),[]))},{id:`gruvbox-light-soft`,displayName:`Gruvbox Light Soft`,type:`light`,import:(()=>d(()=>import(`./gruvbox-light-soft-BSMLrYjP.js`),[]))},{id:`horizon`,displayName:`Horizon`,type:`dark`,import:(()=>d(()=>import(`./horizon-CE9ld1lL.js`),[]))},{id:`horizon-bright`,displayName:`Horizon Bright`,type:`light`,import:(()=>d(()=>import(`./horizon-bright-DSNQnXHK.js`),[]))},{id:`houston`,displayName:`Houston`,type:`dark`,import:(()=>d(()=>import(`./houston-CsvMBhTu.js`),[]))},{id:`kanagawa-dragon`,displayName:`Kanagawa Dragon`,type:`dark`,import:(()=>d(()=>import(`./kanagawa-dragon-CXtmUGW6.js`),[]))},{id:`kanagawa-lotus`,displayName:`Kanagawa Lotus`,type:`light`,import:(()=>d(()=>import(`./kanagawa-lotus-BN08jTvb.js`),[]))},{id:`kanagawa-wave`,displayName:`Kanagawa Wave`,type:`dark`,import:(()=>d(()=>import(`./kanagawa-wave-CTweb8Dz.js`),[]))},{id:`laserwave`,displayName:`LaserWave`,type:`dark`,import:(()=>d(()=>import(`./laserwave-C_8bwKvT.js`),[]))},{id:`light-plus`,displayName:`Light Plus`,type:`light`,import:(()=>d(()=>import(`./light-plus-DVQuIRkW.js`),[]))},{id:`material-theme`,displayName:`Material Theme`,type:`dark`,import:(()=>d(()=>import(`./material-theme-Bm3Qr25_.js`),[]))},{id:`material-theme-darker`,displayName:`Material Theme Darker`,type:`dark`,import:(()=>d(()=>import(`./material-theme-darker-2IIEA8gg.js`),[]))},{id:`material-theme-lighter`,displayName:`Material Theme Lighter`,type:`light`,import:(()=>d(()=>import(`./material-theme-lighter-uhdI0v04.js`),[]))},{id:`material-theme-ocean`,displayName:`Material Theme Ocean`,type:`dark`,import:(()=>d(()=>import(`./material-theme-ocean-CHQ94UKr.js`),[]))},{id:`material-theme-palenight`,displayName:`Material Theme Palenight`,type:`dark`,import:(()=>d(()=>import(`./material-theme-palenight-B5W6OYN7.js`),[]))},{id:`min-dark`,displayName:`Min Dark`,type:`dark`,import:(()=>d(()=>import(`./min-dark-BSWPekZh.js`),[]))},{id:`min-light`,displayName:`Min Light`,type:`light`,import:(()=>d(()=>import(`./min-light-DDpmG2fV.js`),[]))},{id:`monokai`,displayName:`Monokai`,type:`dark`,import:(()=>d(()=>import(`./monokai-CdkpiU2Y.js`),[]))},{id:`night-owl`,displayName:`Night Owl`,type:`dark`,import:(()=>d(()=>import(`./night-owl-DhmEMT88.js`),[]))},{id:`night-owl-light`,displayName:`Night Owl Light`,type:`light`,import:(()=>d(()=>import(`./night-owl-light-eJ-hLW7d.js`),[]))},{id:`nord`,displayName:`Nord`,type:`dark`,import:(()=>d(()=>import(`./nord-Cb4Vim4T.js`),[]))},{id:`one-dark-pro`,displayName:`One Dark Pro`,type:`dark`,import:(()=>d(()=>import(`./one-dark-pro-CLwyXe_n.js`),[]))},{id:`one-light`,displayName:`One Light`,type:`light`,import:(()=>d(()=>import(`./one-light-D7Lr4KcI.js`),[]))},{id:`plastic`,displayName:`Plastic`,type:`dark`,import:(()=>d(()=>import(`./plastic-DQwYfKfQ.js`),[]))},{id:`poimandres`,displayName:`Poimandres`,type:`dark`,import:(()=>d(()=>import(`./poimandres-DRFjx7u4.js`),[]))},{id:`red`,displayName:`Red`,type:`dark`,import:(()=>d(()=>import(`./red-CJ3rzSJv.js`),[]))},{id:`rose-pine`,displayName:`Rosé Pine`,type:`dark`,import:(()=>d(()=>import(`./rose-pine-BthvhNj6.js`),[]))},{id:`rose-pine-dawn`,displayName:`Rosé Pine Dawn`,type:`light`,import:(()=>d(()=>import(`./rose-pine-dawn-Dg85fqjY.js`),[]))},{id:`rose-pine-moon`,displayName:`Rosé Pine Moon`,type:`dark`,import:(()=>d(()=>import(`./rose-pine-moon-hon4tzzS.js`),[]))},{id:`slack-dark`,displayName:`Slack Dark`,type:`dark`,import:(()=>d(()=>import(`./slack-dark-DnToyrRv.js`),[]))},{id:`slack-ochin`,displayName:`Slack Ochin`,type:`light`,import:(()=>d(()=>import(`./slack-ochin-B2OO5cIa.js`),[]))},{id:`snazzy-light`,displayName:`Snazzy Light`,type:`light`,import:(()=>d(()=>import(`./snazzy-light-4G7pJPwS.js`),[]))},{id:`solarized-dark`,displayName:`Solarized Dark`,type:`dark`,import:(()=>d(()=>import(`./solarized-dark-DV17i1UV.js`),[]))},{id:`solarized-light`,displayName:`Solarized Light`,type:`light`,import:(()=>d(()=>import(`./solarized-light-DSh2HLQt.js`),[]))},{id:`synthwave-84`,displayName:`Synthwave '84`,type:`dark`,import:(()=>d(()=>import(`./synthwave-84-nFMaYfgc.js`),[]))},{id:`tokyo-night`,displayName:`Tokyo Night`,type:`dark`,import:(()=>d(()=>import(`./tokyo-night-oM2G3aXe.js`),[]))},{id:`vesper`,displayName:`Vesper`,type:`dark`,import:(()=>d(()=>import(`./vesper-DdrHHSXu.js`),[]))},{id:`vitesse-black`,displayName:`Vitesse Black`,type:`dark`,import:(()=>d(()=>import(`./vitesse-black-fwtXNY1n.js`),[]))},{id:`vitesse-dark`,displayName:`Vitesse Dark`,type:`dark`,import:(()=>d(()=>import(`./vitesse-dark-BZCL-v6S.js`),[]))},{id:`vitesse-light`,displayName:`Vitesse Light`,type:`light`,import:(()=>d(()=>import(`./vitesse-light-VbXTXTou.js`),[]))}].map(e=>[e.id,e.import])),X=class extends Error{constructor(e){super(e),this.name=`ShikiError`}};function Rd(e){return zd(e)}function zd(e){return Array.isArray(e)?Bd(e):e instanceof RegExp?e:typeof e==`object`?Vd(e):e}function Bd(e){let t=[];for(let n=0,r=e.length;n<r;n++)t[n]=zd(e[n]);return t}function Vd(e){let t={};for(let n in e)t[n]=zd(e[n]);return t}function Hd(e,...t){return t.forEach(t=>{for(let n in t)e[n]=t[n]}),e}function Ud(e){let t=~e.lastIndexOf(`/`)||~e.lastIndexOf(`\\`);return t===0?e:~t===e.length-1?Ud(e.substring(0,e.length-1)):e.substr(~t+1)}var Wd=/\$(\d+)|\${(\d+):\/(downcase|upcase)}/g,Gd=class{static hasCaptures(e){return e===null?!1:(Wd.lastIndex=0,Wd.test(e))}static replaceCaptures(e,t,n){return e.replace(Wd,(e,r,i,a)=>{let o=n[parseInt(r||i,10)];if(o){let e=t.substring(o.start,o.end);for(;e[0]===`.`;)e=e.substring(1);switch(a){case`downcase`:return e.toLowerCase();case`upcase`:return e.toUpperCase();default:return e}}else return e})}};function Kd(e,t){return e<t?-1:+(e>t)}function qd(e,t){if(e===null&&t===null)return 0;if(!e)return-1;if(!t)return 1;let n=e.length,r=t.length;if(n===r){for(let r=0;r<n;r++){let n=Kd(e[r],t[r]);if(n!==0)return n}return 0}return n-r}function Jd(e){return!!(/^#[0-9a-f]{6}$/i.test(e)||/^#[0-9a-f]{8}$/i.test(e)||/^#[0-9a-f]{3}$/i.test(e)||/^#[0-9a-f]{4}$/i.test(e))}function Yd(e){return e.replace(/[\-\\\{\}\*\+\?\|\^\$\.\,\[\]\(\)\#\s]/g,`\\$&`)}var Xd=class{constructor(e){this.fn=e}cache=new Map;get(e){if(this.cache.has(e))return this.cache.get(e);let t=this.fn(e);return this.cache.set(e,t),t}},Zd=class{constructor(e,t,n){this._colorMap=e,this._defaults=t,this._root=n}static createFromRawTheme(e,t){return this.createFromParsedTheme(nf(e),t)}static createFromParsedTheme(e,t){return of(e,t)}_cachedMatchRoot=new Xd(e=>this._root.match(e));getColorMap(){return this._colorMap.getColorMap()}getDefaults(){return this._defaults}match(e){if(e===null)return this._defaults;let t=e.scopeName,n=this._cachedMatchRoot.get(t).find(t=>$d(e.parent,t.parentScopes));return n?new tf(n.fontStyle,n.foreground,n.background):null}},Qd=class e{constructor(e,t){this.parent=e,this.scopeName=t}static push(t,n){for(let r of n)t=new e(t,r);return t}static from(...t){let n=null;for(let r=0;r<t.length;r++)n=new e(n,t[r]);return n}push(t){return new e(this,t)}getSegments(){let e=this,t=[];for(;e;)t.push(e.scopeName),e=e.parent;return t.reverse(),t}toString(){return this.getSegments().join(` `)}extends(e){return this===e?!0:this.parent===null?!1:this.parent.extends(e)}getExtensionIfDefined(e){let t=[],n=this;for(;n&&n!==e;)t.push(n.scopeName),n=n.parent;return n===e?t.reverse():void 0}};function $d(e,t){if(t.length===0)return!0;for(let n=0;n<t.length;n++){let r=t[n],i=!1;if(r===`>`){if(n===t.length-1)return!1;r=t[++n],i=!0}for(;e&&!ef(e.scopeName,r);){if(i)return!1;e=e.parent}if(!e)return!1;e=e.parent}return!0}function ef(e,t){return t===e||e.startsWith(t)&&e[t.length]===`.`}var tf=class{constructor(e,t,n){this.fontStyle=e,this.foregroundId=t,this.backgroundId=n}};function nf(e){if(!e||!e.settings||!Array.isArray(e.settings))return[];let t=e.settings,n=[],r=0;for(let e=0,i=t.length;e<i;e++){let i=t[e];if(!i.settings)continue;let a;if(typeof i.scope==`string`){let e=i.scope;e=e.replace(/^[,]+/,``),e=e.replace(/[,]+$/,``),a=e.split(`,`)}else a=Array.isArray(i.scope)?i.scope:[``];let o=-1;if(typeof i.settings.fontStyle==`string`){o=0;let e=i.settings.fontStyle.split(` `);for(let t=0,n=e.length;t<n;t++)switch(e[t]){case`italic`:o|=1;break;case`bold`:o|=2;break;case`underline`:o|=4;break;case`strikethrough`:o|=8;break}}let s=null;typeof i.settings.foreground==`string`&&Jd(i.settings.foreground)&&(s=i.settings.foreground);let c=null;typeof i.settings.background==`string`&&Jd(i.settings.background)&&(c=i.settings.background);for(let t=0,i=a.length;t<i;t++){let i=a[t].trim().split(` `),l=i[i.length-1],u=null;i.length>1&&(u=i.slice(0,i.length-1),u.reverse()),n[r++]=new rf(l,u,e,o,s,c)}}return n}var rf=class{constructor(e,t,n,r,i,a){this.scope=e,this.parentScopes=t,this.index=n,this.fontStyle=r,this.foreground=i,this.background=a}},af=(e=>(e[e.NotSet=-1]=`NotSet`,e[e.None=0]=`None`,e[e.Italic=1]=`Italic`,e[e.Bold=2]=`Bold`,e[e.Underline=4]=`Underline`,e[e.Strikethrough=8]=`Strikethrough`,e))(af||{});function of(e,t){e.sort((e,t)=>{let n=Kd(e.scope,t.scope);return n!==0||(n=qd(e.parentScopes,t.parentScopes),n!==0)?n:e.index-t.index});let n=0,r=`#000000`,i=`#ffffff`;for(;e.length>=1&&e[0].scope===``;){let t=e.shift();t.fontStyle!==-1&&(n=t.fontStyle),t.foreground!==null&&(r=t.foreground),t.background!==null&&(i=t.background)}let a=new sf(t),o=new tf(n,a.getId(r),a.getId(i)),s=new uf(new lf(0,null,-1,0,0),[]);for(let t=0,n=e.length;t<n;t++){let n=e[t];s.insert(0,n.scope,n.parentScopes,n.fontStyle,a.getId(n.foreground),a.getId(n.background))}return new Zd(a,o,s)}var sf=class{_isFrozen;_lastColorId;_id2color;_color2id;constructor(e){if(this._lastColorId=0,this._id2color=[],this._color2id=Object.create(null),Array.isArray(e)){this._isFrozen=!0;for(let t=0,n=e.length;t<n;t++)this._color2id[e[t]]=t,this._id2color[t]=e[t]}else this._isFrozen=!1}getId(e){if(e===null)return 0;e=e.toUpperCase();let t=this._color2id[e];if(t)return t;if(this._isFrozen)throw Error(`Missing color in color map - ${e}`);return t=++this._lastColorId,this._color2id[e]=t,this._id2color[t]=e,t}getColorMap(){return this._id2color.slice(0)}},cf=Object.freeze([]),lf=class e{scopeDepth;parentScopes;fontStyle;foreground;background;constructor(e,t,n,r,i){this.scopeDepth=e,this.parentScopes=t||cf,this.fontStyle=n,this.foreground=r,this.background=i}clone(){return new e(this.scopeDepth,this.parentScopes,this.fontStyle,this.foreground,this.background)}static cloneArr(e){let t=[];for(let n=0,r=e.length;n<r;n++)t[n]=e[n].clone();return t}acceptOverwrite(e,t,n,r){this.scopeDepth>e?console.log(`how did this happen?`):this.scopeDepth=e,t!==-1&&(this.fontStyle=t),n!==0&&(this.foreground=n),r!==0&&(this.background=r)}},uf=class e{constructor(e,t=[],n={}){this._mainRule=e,this._children=n,this._rulesWithParentScopes=t}_rulesWithParentScopes;static _cmpBySpecificity(e,t){if(e.scopeDepth!==t.scopeDepth)return t.scopeDepth-e.scopeDepth;let n=0,r=0;for(;e.parentScopes[n]===`>`&&n++,t.parentScopes[r]===`>`&&r++,!(n>=e.parentScopes.length||r>=t.parentScopes.length);){let i=t.parentScopes[r].length-e.parentScopes[n].length;if(i!==0)return i;n++,r++}return t.parentScopes.length-e.parentScopes.length}match(t){if(t!==``){let e=t.indexOf(`.`),n,r;if(e===-1?(n=t,r=``):(n=t.substring(0,e),r=t.substring(e+1)),this._children.hasOwnProperty(n))return this._children[n].match(r)}let n=this._rulesWithParentScopes.concat(this._mainRule);return n.sort(e._cmpBySpecificity),n}insert(t,n,r,i,a,o){if(n===``){this._doInsertHere(t,r,i,a,o);return}let s=n.indexOf(`.`),c,l;s===-1?(c=n,l=``):(c=n.substring(0,s),l=n.substring(s+1));let u;this._children.hasOwnProperty(c)?u=this._children[c]:(u=new e(this._mainRule.clone(),lf.cloneArr(this._rulesWithParentScopes)),this._children[c]=u),u.insert(t+1,l,r,i,a,o)}_doInsertHere(e,t,n,r,i){if(t===null){this._mainRule.acceptOverwrite(e,n,r,i);return}for(let a=0,o=this._rulesWithParentScopes.length;a<o;a++){let o=this._rulesWithParentScopes[a];if(qd(o.parentScopes,t)===0){o.acceptOverwrite(e,n,r,i);return}}n===-1&&(n=this._mainRule.fontStyle),r===0&&(r=this._mainRule.foreground),i===0&&(i=this._mainRule.background),this._rulesWithParentScopes.push(new lf(e,t,n,r,i))}},df=class e{static toBinaryStr(e){return e.toString(2).padStart(32,`0`)}static print(t){let n=e.getLanguageId(t),r=e.getTokenType(t),i=e.getFontStyle(t),a=e.getForeground(t),o=e.getBackground(t);console.log({languageId:n,tokenType:r,fontStyle:i,foreground:a,background:o})}static getLanguageId(e){return(e&255)>>>0}static getTokenType(e){return(e&768)>>>8}static containsBalancedBrackets(e){return(e&1024)!=0}static getFontStyle(e){return(e&30720)>>>11}static getForeground(e){return(e&16744448)>>>15}static getBackground(e){return(e&4278190080)>>>24}static set(t,n,r,i,a,o,s){let c=e.getLanguageId(t),l=e.getTokenType(t),u=+!!e.containsBalancedBrackets(t),d=e.getFontStyle(t),f=e.getForeground(t),p=e.getBackground(t);return n!==0&&(c=n),r!==8&&(l=pf(r)),i!==null&&(u=+!!i),a!==-1&&(d=a),o!==0&&(f=o),s!==0&&(p=s),(c<<0|l<<8|u<<10|d<<11|f<<15|p<<24)>>>0}};function ff(e){return e}function pf(e){return e}function mf(e,t){let n=[],r=gf(e),i=r.next();for(;i!==null;){let e=0;if(i.length===2&&i.charAt(1)===`:`){switch(i.charAt(0)){case`R`:e=1;break;case`L`:e=-1;break;default:console.log(`Unknown priority ${i} in scope selector`)}i=r.next()}let t=o();if(n.push({matcher:t,priority:e}),i!==`,`)break;i=r.next()}return n;function a(){if(i===`-`){i=r.next();let e=a();return t=>!!e&&!e(t)}if(i===`(`){i=r.next();let e=s();return i===`)`&&(i=r.next()),e}if(hf(i)){let e=[];do e.push(i),i=r.next();while(hf(i));return n=>t(e,n)}return null}function o(){let e=[],t=a();for(;t;)e.push(t),t=a();return t=>e.every(e=>e(t))}function s(){let e=[],t=o();for(;t&&(e.push(t),i===`|`||i===`,`);){do i=r.next();while(i===`|`||i===`,`);t=o()}return t=>e.some(e=>e(t))}}function hf(e){return!!e&&!!e.match(/[\w\.:]+/)}function gf(e){let t=/([LR]:|[\w\.:][\w\.:\-]*|[\,\|\-\(\)])/g,n=t.exec(e);return{next:()=>{if(!n)return null;let r=n[0];return n=t.exec(e),r}}}function _f(e){typeof e.dispose==`function`&&e.dispose()}var vf=class{constructor(e){this.scopeName=e}toKey(){return this.scopeName}},yf=class{constructor(e,t){this.scopeName=e,this.ruleName=t}toKey(){return`${this.scopeName}#${this.ruleName}`}},bf=class{_references=[];_seenReferenceKeys=new Set;get references(){return this._references}visitedRule=new Set;add(e){let t=e.toKey();this._seenReferenceKeys.has(t)||(this._seenReferenceKeys.add(t),this._references.push(e))}},xf=class{constructor(e,t){this.repo=e,this.initialScopeName=t,this.seenFullScopeRequests.add(this.initialScopeName),this.Q=[new vf(this.initialScopeName)]}seenFullScopeRequests=new Set;seenPartialScopeRequests=new Set;Q;processQueue(){let e=this.Q;this.Q=[];let t=new bf;for(let n of e)Sf(n,this.initialScopeName,this.repo,t);for(let e of t.references)if(e instanceof vf){if(this.seenFullScopeRequests.has(e.scopeName))continue;this.seenFullScopeRequests.add(e.scopeName),this.Q.push(e)}else{if(this.seenFullScopeRequests.has(e.scopeName)||this.seenPartialScopeRequests.has(e.toKey()))continue;this.seenPartialScopeRequests.add(e.toKey()),this.Q.push(e)}}};function Sf(e,t,n,r){let i=n.lookup(e.scopeName);if(!i){if(e.scopeName===t)throw Error(`No grammar provided for <${t}>`);return}let a=n.lookup(t);e instanceof vf?wf({baseGrammar:a,selfGrammar:i},r):Cf(e.ruleName,{baseGrammar:a,selfGrammar:i,repository:i.repository},r);let o=n.injections(e.scopeName);if(o)for(let e of o)r.add(new vf(e))}function Cf(e,t,n){if(t.repository&&t.repository[e]){let r=t.repository[e];Tf([r],t,n)}}function wf(e,t){e.selfGrammar.patterns&&Array.isArray(e.selfGrammar.patterns)&&Tf(e.selfGrammar.patterns,{...e,repository:e.selfGrammar.repository},t),e.selfGrammar.injections&&Tf(Object.values(e.selfGrammar.injections),{...e,repository:e.selfGrammar.repository},t)}function Tf(e,t,n){for(let r of e){if(n.visitedRule.has(r))continue;n.visitedRule.add(r);let e=r.repository?Hd({},t.repository,r.repository):t.repository;Array.isArray(r.patterns)&&Tf(r.patterns,{...t,repository:e},n);let i=r.include;if(!i)continue;let a=jf(i);switch(a.kind){case 0:wf({...t,selfGrammar:t.baseGrammar},n);break;case 1:wf(t,n);break;case 2:Cf(a.ruleName,{...t,repository:e},n);break;case 3:case 4:let r=a.scopeName===t.selfGrammar.scopeName?t.selfGrammar:a.scopeName===t.baseGrammar.scopeName?t.baseGrammar:void 0;if(r){let i={baseGrammar:t.baseGrammar,selfGrammar:r,repository:e};a.kind===4?Cf(a.ruleName,i,n):wf(i,n)}else a.kind===4?n.add(new yf(a.scopeName,a.ruleName)):n.add(new vf(a.scopeName));break}}}var Ef=class{kind=0},Df=class{kind=1},Of=class{constructor(e){this.ruleName=e}kind=2},kf=class{constructor(e){this.scopeName=e}kind=3},Af=class{constructor(e,t){this.scopeName=e,this.ruleName=t}kind=4};function jf(e){if(e===`$base`)return new Ef;if(e===`$self`)return new Df;let t=e.indexOf(`#`);return t===-1?new kf(e):t===0?new Of(e.substring(1)):new Af(e.substring(0,t),e.substring(t+1))}var Mf=/\\(\d+)/,Nf=/\\(\d+)/g,Pf=-1,Ff=-2;function If(e){return e}function Lf(e){return e}var Rf=class{$location;id;_nameIsCapturing;_name;_contentNameIsCapturing;_contentName;constructor(e,t,n,r){this.$location=e,this.id=t,this._name=n||null,this._nameIsCapturing=Gd.hasCaptures(this._name),this._contentName=r||null,this._contentNameIsCapturing=Gd.hasCaptures(this._contentName)}get debugName(){let e=this.$location?`${Ud(this.$location.filename)}:${this.$location.line}`:`unknown`;return`${this.constructor.name}#${this.id} @ ${e}`}getName(e,t){return!this._nameIsCapturing||this._name===null||e===null||t===null?this._name:Gd.replaceCaptures(this._name,e,t)}getContentName(e,t){return!this._contentNameIsCapturing||this._contentName===null?this._contentName:Gd.replaceCaptures(this._contentName,e,t)}},zf=class extends Rf{retokenizeCapturedWithRuleId;constructor(e,t,n,r,i){super(e,t,n,r),this.retokenizeCapturedWithRuleId=i}dispose(){}collectPatterns(e,t){throw Error(`Not supported!`)}compile(e,t){throw Error(`Not supported!`)}compileAG(e,t,n,r){throw Error(`Not supported!`)}},Bf=class extends Rf{_match;captures;_cachedCompiledPatterns;constructor(e,t,n,r,i){super(e,t,n,null),this._match=new Gf(r,this.id),this.captures=i,this._cachedCompiledPatterns=null}dispose(){this._cachedCompiledPatterns&&=(this._cachedCompiledPatterns.dispose(),null)}get debugMatchRegExp(){return`${this._match.source}`}collectPatterns(e,t){t.push(this._match)}compile(e,t){return this._getCachedCompiledPatterns(e).compile(e)}compileAG(e,t,n,r){return this._getCachedCompiledPatterns(e).compileAG(e,n,r)}_getCachedCompiledPatterns(e){return this._cachedCompiledPatterns||(this._cachedCompiledPatterns=new Kf,this.collectPatterns(e,this._cachedCompiledPatterns)),this._cachedCompiledPatterns}},Vf=class extends Rf{hasMissingPatterns;patterns;_cachedCompiledPatterns;constructor(e,t,n,r,i){super(e,t,n,r),this.patterns=i.patterns,this.hasMissingPatterns=i.hasMissingPatterns,this._cachedCompiledPatterns=null}dispose(){this._cachedCompiledPatterns&&=(this._cachedCompiledPatterns.dispose(),null)}collectPatterns(e,t){for(let n of this.patterns)e.getRule(n).collectPatterns(e,t)}compile(e,t){return this._getCachedCompiledPatterns(e).compile(e)}compileAG(e,t,n,r){return this._getCachedCompiledPatterns(e).compileAG(e,n,r)}_getCachedCompiledPatterns(e){return this._cachedCompiledPatterns||(this._cachedCompiledPatterns=new Kf,this.collectPatterns(e,this._cachedCompiledPatterns)),this._cachedCompiledPatterns}},Hf=class extends Rf{_begin;beginCaptures;_end;endHasBackReferences;endCaptures;applyEndPatternLast;hasMissingPatterns;patterns;_cachedCompiledPatterns;constructor(e,t,n,r,i,a,o,s,c,l){super(e,t,n,r),this._begin=new Gf(i,this.id),this.beginCaptures=a,this._end=new Gf(o||``,-1),this.endHasBackReferences=this._end.hasBackReferences,this.endCaptures=s,this.applyEndPatternLast=c||!1,this.patterns=l.patterns,this.hasMissingPatterns=l.hasMissingPatterns,this._cachedCompiledPatterns=null}dispose(){this._cachedCompiledPatterns&&=(this._cachedCompiledPatterns.dispose(),null)}get debugBeginRegExp(){return`${this._begin.source}`}get debugEndRegExp(){return`${this._end.source}`}getEndWithResolvedBackReferences(e,t){return this._end.resolveBackReferences(e,t)}collectPatterns(e,t){t.push(this._begin)}compile(e,t){return this._getCachedCompiledPatterns(e,t).compile(e)}compileAG(e,t,n,r){return this._getCachedCompiledPatterns(e,t).compileAG(e,n,r)}_getCachedCompiledPatterns(e,t){if(!this._cachedCompiledPatterns){this._cachedCompiledPatterns=new Kf;for(let t of this.patterns)e.getRule(t).collectPatterns(e,this._cachedCompiledPatterns);this.applyEndPatternLast?this._cachedCompiledPatterns.push(this._end.hasBackReferences?this._end.clone():this._end):this._cachedCompiledPatterns.unshift(this._end.hasBackReferences?this._end.clone():this._end)}return this._end.hasBackReferences&&(this.applyEndPatternLast?this._cachedCompiledPatterns.setSource(this._cachedCompiledPatterns.length()-1,t):this._cachedCompiledPatterns.setSource(0,t)),this._cachedCompiledPatterns}},Uf=class extends Rf{_begin;beginCaptures;whileCaptures;_while;whileHasBackReferences;hasMissingPatterns;patterns;_cachedCompiledPatterns;_cachedCompiledWhilePatterns;constructor(e,t,n,r,i,a,o,s,c){super(e,t,n,r),this._begin=new Gf(i,this.id),this.beginCaptures=a,this.whileCaptures=s,this._while=new Gf(o,Ff),this.whileHasBackReferences=this._while.hasBackReferences,this.patterns=c.patterns,this.hasMissingPatterns=c.hasMissingPatterns,this._cachedCompiledPatterns=null,this._cachedCompiledWhilePatterns=null}dispose(){this._cachedCompiledPatterns&&=(this._cachedCompiledPatterns.dispose(),null),this._cachedCompiledWhilePatterns&&=(this._cachedCompiledWhilePatterns.dispose(),null)}get debugBeginRegExp(){return`${this._begin.source}`}get debugWhileRegExp(){return`${this._while.source}`}getWhileWithResolvedBackReferences(e,t){return this._while.resolveBackReferences(e,t)}collectPatterns(e,t){t.push(this._begin)}compile(e,t){return this._getCachedCompiledPatterns(e).compile(e)}compileAG(e,t,n,r){return this._getCachedCompiledPatterns(e).compileAG(e,n,r)}_getCachedCompiledPatterns(e){if(!this._cachedCompiledPatterns){this._cachedCompiledPatterns=new Kf;for(let t of this.patterns)e.getRule(t).collectPatterns(e,this._cachedCompiledPatterns)}return this._cachedCompiledPatterns}compileWhile(e,t){return this._getCachedCompiledWhilePatterns(e,t).compile(e)}compileWhileAG(e,t,n,r){return this._getCachedCompiledWhilePatterns(e,t).compileAG(e,n,r)}_getCachedCompiledWhilePatterns(e,t){return this._cachedCompiledWhilePatterns||(this._cachedCompiledWhilePatterns=new Kf,this._cachedCompiledWhilePatterns.push(this._while.hasBackReferences?this._while.clone():this._while)),this._while.hasBackReferences&&this._cachedCompiledWhilePatterns.setSource(0,t||``),this._cachedCompiledWhilePatterns}},Wf=class e{static createCaptureRule(e,t,n,r,i){return e.registerRule(e=>new zf(t,e,n,r,i))}static getCompiledRuleId(t,n,r){return t.id||n.registerRule(i=>{if(t.id=i,t.match)return new Bf(t.$vscodeTextmateLocation,t.id,t.name,t.match,e._compileCaptures(t.captures,n,r));if(t.begin===void 0){t.repository&&(r=Hd({},r,t.repository));let i=t.patterns;return i===void 0&&t.include&&(i=[{include:t.include}]),new Vf(t.$vscodeTextmateLocation,t.id,t.name,t.contentName,e._compilePatterns(i,n,r))}return t.while?new Uf(t.$vscodeTextmateLocation,t.id,t.name,t.contentName,t.begin,e._compileCaptures(t.beginCaptures||t.captures,n,r),t.while,e._compileCaptures(t.whileCaptures||t.captures,n,r),e._compilePatterns(t.patterns,n,r)):new Hf(t.$vscodeTextmateLocation,t.id,t.name,t.contentName,t.begin,e._compileCaptures(t.beginCaptures||t.captures,n,r),t.end,e._compileCaptures(t.endCaptures||t.captures,n,r),t.applyEndPatternLast,e._compilePatterns(t.patterns,n,r))}),t.id}static _compileCaptures(t,n,r){let i=[];if(t){let a=0;for(let e in t){if(e===`$vscodeTextmateLocation`)continue;let t=parseInt(e,10);t>a&&(a=t)}for(let e=0;e<=a;e++)i[e]=null;for(let a in t){if(a===`$vscodeTextmateLocation`)continue;let o=parseInt(a,10),s=0;t[a].patterns&&(s=e.getCompiledRuleId(t[a],n,r)),i[o]=e.createCaptureRule(n,t[a].$vscodeTextmateLocation,t[a].name,t[a].contentName,s)}}return i}static _compilePatterns(t,n,r){let i=[];if(t)for(let a=0,o=t.length;a<o;a++){let o=t[a],s=-1;if(o.include){let t=jf(o.include);switch(t.kind){case 0:case 1:s=e.getCompiledRuleId(r[o.include],n,r);break;case 2:let i=r[t.ruleName];i&&(s=e.getCompiledRuleId(i,n,r));break;case 3:case 4:let a=t.scopeName,c=t.kind===4?t.ruleName:null,l=n.getExternalGrammar(a,r);if(l)if(c){let t=l.repository[c];t&&(s=e.getCompiledRuleId(t,n,l.repository))}else s=e.getCompiledRuleId(l.repository.$self,n,l.repository);break}}else s=e.getCompiledRuleId(o,n,r);if(s!==-1){let e=n.getRule(s),t=!1;if((e instanceof Vf||e instanceof Hf||e instanceof Uf)&&e.hasMissingPatterns&&e.patterns.length===0&&(t=!0),t)continue;i.push(s)}}return{patterns:i,hasMissingPatterns:(t?t.length:0)!==i.length}}},Gf=class e{source;ruleId;hasAnchor;hasBackReferences;_anchorCache;constructor(e,t){if(e&&typeof e==`string`){let t=e.length,n=0,r=[],i=!1;for(let a=0;a<t;a++)if(e.charAt(a)===`\\`&&a+1<t){let t=e.charAt(a+1);t===`z`?(r.push(e.substring(n,a)),r.push(`$(?!\\n)(?<!\\n)`),n=a+2):(t===`A`||t===`G`)&&(i=!0),a++}this.hasAnchor=i,n===0?this.source=e:(r.push(e.substring(n,t)),this.source=r.join(``))}else this.hasAnchor=!1,this.source=e;this.hasAnchor?this._anchorCache=this._buildAnchorCache():this._anchorCache=null,this.ruleId=t,typeof this.source==`string`?this.hasBackReferences=Mf.test(this.source):this.hasBackReferences=!1}clone(){return new e(this.source,this.ruleId)}setSource(e){this.source!==e&&(this.source=e,this.hasAnchor&&(this._anchorCache=this._buildAnchorCache()))}resolveBackReferences(e,t){if(typeof this.source!=`string`)throw Error(`This method should only be called if the source is a string`);let n=t.map(t=>e.substring(t.start,t.end));return Nf.lastIndex=0,this.source.replace(Nf,(e,t)=>Yd(n[parseInt(t,10)]||``))}_buildAnchorCache(){if(typeof this.source!=`string`)throw Error(`This method should only be called if the source is a string`);let e=[],t=[],n=[],r=[],i,a,o,s;for(i=0,a=this.source.length;i<a;i++)o=this.source.charAt(i),e[i]=o,t[i]=o,n[i]=o,r[i]=o,o===`\\`&&i+1<a&&(s=this.source.charAt(i+1),s===`A`?(e[i+1]=``,t[i+1]=``,n[i+1]=`A`,r[i+1]=`A`):s===`G`?(e[i+1]=``,t[i+1]=`G`,n[i+1]=``,r[i+1]=`G`):(e[i+1]=s,t[i+1]=s,n[i+1]=s,r[i+1]=s),i++);return{A0_G0:e.join(``),A0_G1:t.join(``),A1_G0:n.join(``),A1_G1:r.join(``)}}resolveAnchors(e,t){return!this.hasAnchor||!this._anchorCache||typeof this.source!=`string`?this.source:e?t?this._anchorCache.A1_G1:this._anchorCache.A1_G0:t?this._anchorCache.A0_G1:this._anchorCache.A0_G0}},Kf=class{_items;_hasAnchors;_cached;_anchorCache;constructor(){this._items=[],this._hasAnchors=!1,this._cached=null,this._anchorCache={A0_G0:null,A0_G1:null,A1_G0:null,A1_G1:null}}dispose(){this._disposeCaches()}_disposeCaches(){this._cached&&=(this._cached.dispose(),null),this._anchorCache.A0_G0&&(this._anchorCache.A0_G0.dispose(),this._anchorCache.A0_G0=null),this._anchorCache.A0_G1&&(this._anchorCache.A0_G1.dispose(),this._anchorCache.A0_G1=null),this._anchorCache.A1_G0&&(this._anchorCache.A1_G0.dispose(),this._anchorCache.A1_G0=null),this._anchorCache.A1_G1&&(this._anchorCache.A1_G1.dispose(),this._anchorCache.A1_G1=null)}push(e){this._items.push(e),this._hasAnchors=this._hasAnchors||e.hasAnchor}unshift(e){this._items.unshift(e),this._hasAnchors=this._hasAnchors||e.hasAnchor}length(){return this._items.length}setSource(e,t){this._items[e].source!==t&&(this._disposeCaches(),this._items[e].setSource(t))}compile(e){if(!this._cached){let t=this._items.map(e=>e.source);this._cached=new qf(e,t,this._items.map(e=>e.ruleId))}return this._cached}compileAG(e,t,n){return this._hasAnchors?t?n?(this._anchorCache.A1_G1||(this._anchorCache.A1_G1=this._resolveAnchors(e,t,n)),this._anchorCache.A1_G1):(this._anchorCache.A1_G0||(this._anchorCache.A1_G0=this._resolveAnchors(e,t,n)),this._anchorCache.A1_G0):n?(this._anchorCache.A0_G1||(this._anchorCache.A0_G1=this._resolveAnchors(e,t,n)),this._anchorCache.A0_G1):(this._anchorCache.A0_G0||(this._anchorCache.A0_G0=this._resolveAnchors(e,t,n)),this._anchorCache.A0_G0):this.compile(e)}_resolveAnchors(e,t,n){return new qf(e,this._items.map(e=>e.resolveAnchors(t,n)),this._items.map(e=>e.ruleId))}},qf=class{constructor(e,t,n){this.regExps=t,this.rules=n,this.scanner=e.createOnigScanner(t)}scanner;dispose(){typeof this.scanner.dispose==`function`&&this.scanner.dispose()}toString(){let e=[];for(let t=0,n=this.rules.length;t<n;t++)e.push(` - `+this.rules[t]+`: `+this.regExps[t]);return e.join(`
|
|
1300
|
+
`)}findNextMatchSync(e,t,n){let r=this.scanner.findNextMatchSync(e,t,n);return r?{ruleId:this.rules[r.index],captureIndices:r.captureIndices}:null}},Jf=class{constructor(e,t){this.languageId=e,this.tokenType=t}},Yf=class e{_defaultAttributes;_embeddedLanguagesMatcher;constructor(e,t){this._defaultAttributes=new Jf(e,8),this._embeddedLanguagesMatcher=new Xf(Object.entries(t||{}))}getDefaultAttributes(){return this._defaultAttributes}getBasicScopeAttributes(t){return t===null?e._NULL_SCOPE_METADATA:this._getBasicScopeAttributes.get(t)}static _NULL_SCOPE_METADATA=new Jf(0,0);_getBasicScopeAttributes=new Xd(e=>new Jf(this._scopeToLanguage(e),this._toStandardTokenType(e)));_scopeToLanguage(e){return this._embeddedLanguagesMatcher.match(e)||0}_toStandardTokenType(t){let n=t.match(e.STANDARD_TOKEN_TYPE_REGEXP);if(!n)return 8;switch(n[1]){case`comment`:return 1;case`string`:return 2;case`regex`:return 3;case`meta.embedded`:return 0}throw Error(`Unexpected match for standard token type!`)}static STANDARD_TOKEN_TYPE_REGEXP=/\b(comment|string|regex|meta\.embedded)\b/},Xf=class{values;scopesRegExp;constructor(e){if(e.length===0)this.values=null,this.scopesRegExp=null;else{this.values=new Map(e);let t=e.map(([e,t])=>Yd(e));t.sort(),t.reverse(),this.scopesRegExp=RegExp(`^((${t.join(`)|(`)}))($|\\.)`,``)}}match(e){if(!this.scopesRegExp)return;let t=e.match(this.scopesRegExp);if(t)return this.values.get(t[1])}};typeof process<`u`&&{}.VSCODE_TEXTMATE_DEBUG;var Zf=!1,Qf=class{constructor(e,t){this.stack=e,this.stoppedEarly=t}};function $f(e,t,n,r,i,a,o,s){let c=t.content.length,l=!1,u=-1;if(o){let o=ep(e,t,n,r,i,a);i=o.stack,r=o.linePos,n=o.isFirstLine,u=o.anchorPosition}let d=Date.now();for(;!l;){if(s!==0&&Date.now()-d>s)return new Qf(i,!0);f()}return new Qf(i,!1);function f(){let o=tp(e,t,n,r,i,u);if(!o){a.produce(i,c),l=!0;return}let s=o.captureIndices,d=o.matchedRuleId,f=s&&s.length>0?s[0].end>r:!1;if(d===Pf){let o=i.getRule(e);a.produce(i,s[0].start),i=i.withContentNameScopesList(i.nameScopesList),sp(e,t,n,i,a,o.endCaptures,s),a.produce(i,s[0].end);let d=i;if(i=i.parent,u=d.getAnchorPos(),!f&&d.getEnterPos()===r){i=d,a.produce(i,c),l=!0;return}}else{let o=e.getRule(d);a.produce(i,s[0].start);let p=i,m=o.getName(t.content,s),h=i.contentNameScopesList.pushAttributed(m,e);if(i=i.push(d,r,u,s[0].end===c,null,h,h),o instanceof Hf){let r=o;sp(e,t,n,i,a,r.beginCaptures,s),a.produce(i,s[0].end),u=s[0].end;let d=r.getContentName(t.content,s),m=h.pushAttributed(d,e);if(i=i.withContentNameScopesList(m),r.endHasBackReferences&&(i=i.withEndRule(r.getEndWithResolvedBackReferences(t.content,s))),!f&&p.hasSameRuleAs(i)){i=i.pop(),a.produce(i,c),l=!0;return}}else if(o instanceof Uf){let r=o;sp(e,t,n,i,a,r.beginCaptures,s),a.produce(i,s[0].end),u=s[0].end;let d=r.getContentName(t.content,s),m=h.pushAttributed(d,e);if(i=i.withContentNameScopesList(m),r.whileHasBackReferences&&(i=i.withEndRule(r.getWhileWithResolvedBackReferences(t.content,s))),!f&&p.hasSameRuleAs(i)){i=i.pop(),a.produce(i,c),l=!0;return}}else if(sp(e,t,n,i,a,o.captures,s),a.produce(i,s[0].end),i=i.pop(),!f){i=i.safePop(),a.produce(i,c),l=!0;return}}s[0].end>r&&(r=s[0].end,n=!1)}}function ep(e,t,n,r,i,a){let o=i.beginRuleCapturedEOL?0:-1,s=[];for(let t=i;t;t=t.pop()){let n=t.getRule(e);n instanceof Uf&&s.push({rule:n,stack:t})}for(let c=s.pop();c;c=s.pop()){let{ruleScanner:s,findOptions:l}=ap(c.rule,e,c.stack.endRule,n,r===o),u=s.findNextMatchSync(t,r,l);if(u){if(u.ruleId!==Ff){i=c.stack.pop();break}u.captureIndices&&u.captureIndices.length&&(a.produce(c.stack,u.captureIndices[0].start),sp(e,t,n,c.stack,a,c.rule.whileCaptures,u.captureIndices),a.produce(c.stack,u.captureIndices[0].end),o=u.captureIndices[0].end,u.captureIndices[0].end>r&&(r=u.captureIndices[0].end,n=!1))}else{i=c.stack.pop();break}}return{stack:i,linePos:r,anchorPosition:o,isFirstLine:n}}function tp(e,t,n,r,i,a){let o=np(e,t,n,r,i,a),s=e.getInjections();if(s.length===0)return o;let c=rp(s,e,t,n,r,i,a);if(!c)return o;if(!o)return c;let l=o.captureIndices[0].start,u=c.captureIndices[0].start;return u<l||c.priorityMatch&&u===l?c:o}function np(e,t,n,r,i,a){let{ruleScanner:o,findOptions:s}=ip(i.getRule(e),e,i.endRule,n,r===a),c=o.findNextMatchSync(t,r,s);return c?{captureIndices:c.captureIndices,matchedRuleId:c.ruleId}:null}function rp(e,t,n,r,i,a,o){let s=Number.MAX_VALUE,c=null,l,u=0,d=a.contentNameScopesList.getScopeNames();for(let a=0,f=e.length;a<f;a++){let f=e[a];if(!f.matcher(d))continue;let{ruleScanner:p,findOptions:m}=ip(t.getRule(f.ruleId),t,null,r,i===o),h=p.findNextMatchSync(n,i,m);if(!h)continue;let g=h.captureIndices[0].start;if(!(g>=s)&&(s=g,c=h.captureIndices,l=h.ruleId,u=f.priority,s===i))break}return c?{priorityMatch:u===-1,captureIndices:c,matchedRuleId:l}:null}function ip(e,t,n,r,i){return Zf?{ruleScanner:e.compile(t,n),findOptions:op(r,i)}:{ruleScanner:e.compileAG(t,n,r,i),findOptions:0}}function ap(e,t,n,r,i){return Zf?{ruleScanner:e.compileWhile(t,n),findOptions:op(r,i)}:{ruleScanner:e.compileWhileAG(t,n,r,i),findOptions:0}}function op(e,t){let n=0;return e||(n|=1),t||(n|=4),n}function sp(e,t,n,r,i,a,o){if(a.length===0)return;let s=t.content,c=Math.min(a.length,o.length),l=[],u=o[0].end;for(let t=0;t<c;t++){let c=a[t];if(c===null)continue;let d=o[t];if(d.length===0)continue;if(d.start>u)break;for(;l.length>0&&l[l.length-1].endPos<=d.start;)i.produceFromScopes(l[l.length-1].scopes,l[l.length-1].endPos),l.pop();if(l.length>0?i.produceFromScopes(l[l.length-1].scopes,d.start):i.produce(r,d.start),c.retokenizeCapturedWithRuleId){let t=c.getName(s,o),a=r.contentNameScopesList.pushAttributed(t,e),l=c.getContentName(s,o),u=a.pushAttributed(l,e),f=r.push(c.retokenizeCapturedWithRuleId,d.start,-1,!1,null,a,u),p=e.createOnigString(s.substring(0,d.end));$f(e,p,n&&d.start===0,d.start,f,i,!1,0),_f(p);continue}let f=c.getName(s,o);if(f!==null){let t=(l.length>0?l[l.length-1].scopes:r.contentNameScopesList).pushAttributed(f,e);l.push(new cp(t,d.end))}}for(;l.length>0;)i.produceFromScopes(l[l.length-1].scopes,l[l.length-1].endPos),l.pop()}var cp=class{scopes;endPos;constructor(e,t){this.scopes=e,this.endPos=t}};function lp(e,t,n,r,i,a,o,s){return new pp(e,t,n,r,i,a,o,s)}function up(e,t,n,r,i){let a=mf(t,dp),o=Wf.getCompiledRuleId(n,r,i.repository);for(let n of a)e.push({debugSelector:t,matcher:n.matcher,ruleId:o,grammar:i,priority:n.priority})}function dp(e,t){if(t.length<e.length)return!1;let n=0;return e.every(e=>{for(let r=n;r<t.length;r++)if(fp(t[r],e))return n=r+1,!0;return!1})}function fp(e,t){if(!e)return!1;if(e===t)return!0;let n=t.length;return e.length>n&&e.substr(0,n)===t&&e[n]===`.`}var pp=class{constructor(e,t,n,r,i,a,o,s){if(this._rootScopeName=e,this.balancedBracketSelectors=a,this._onigLib=s,this._basicScopeAttributesProvider=new Yf(n,r),this._rootId=-1,this._lastRuleId=0,this._ruleId2desc=[null],this._includedGrammars={},this._grammarRepository=o,this._grammar=mp(t,null),this._injections=null,this._tokenTypeMatchers=[],i)for(let e of Object.keys(i)){let t=mf(e,dp);for(let n of t)this._tokenTypeMatchers.push({matcher:n.matcher,type:i[e]})}}_rootId;_lastRuleId;_ruleId2desc;_includedGrammars;_grammarRepository;_grammar;_injections;_basicScopeAttributesProvider;_tokenTypeMatchers;get themeProvider(){return this._grammarRepository}dispose(){for(let e of this._ruleId2desc)e&&e.dispose()}createOnigScanner(e){return this._onigLib.createOnigScanner(e)}createOnigString(e){return this._onigLib.createOnigString(e)}getMetadataForScope(e){return this._basicScopeAttributesProvider.getBasicScopeAttributes(e)}_collectInjections(){let e={lookup:e=>e===this._rootScopeName?this._grammar:this.getExternalGrammar(e),injections:e=>this._grammarRepository.injections(e)},t=[],n=this._rootScopeName,r=e.lookup(n);if(r){let e=r.injections;if(e)for(let n in e)up(t,n,e[n],this,r);let i=this._grammarRepository.injections(n);i&&i.forEach(e=>{let n=this.getExternalGrammar(e);if(n){let e=n.injectionSelector;e&&up(t,e,n,this,n)}})}return t.sort((e,t)=>e.priority-t.priority),t}getInjections(){return this._injections===null&&(this._injections=this._collectInjections()),this._injections}registerRule(e){let t=++this._lastRuleId,n=e(If(t));return this._ruleId2desc[t]=n,n}getRule(e){return this._ruleId2desc[Lf(e)]}getExternalGrammar(e,t){if(this._includedGrammars[e])return this._includedGrammars[e];if(this._grammarRepository){let n=this._grammarRepository.lookup(e);if(n)return this._includedGrammars[e]=mp(n,t&&t.$base),this._includedGrammars[e]}}tokenizeLine(e,t,n=0){let r=this._tokenize(e,t,!1,n);return{tokens:r.lineTokens.getResult(r.ruleStack,r.lineLength),ruleStack:r.ruleStack,stoppedEarly:r.stoppedEarly}}tokenizeLine2(e,t,n=0){let r=this._tokenize(e,t,!0,n);return{tokens:r.lineTokens.getBinaryResult(r.ruleStack,r.lineLength),ruleStack:r.ruleStack,stoppedEarly:r.stoppedEarly}}_tokenize(e,t,n,r){this._rootId===-1&&(this._rootId=Wf.getCompiledRuleId(this._grammar.repository.$self,this,this._grammar.repository),this.getInjections());let i;if(!t||t===gp.NULL){i=!0;let e=this._basicScopeAttributesProvider.getDefaultAttributes(),n=this.themeProvider.getDefaults(),r=df.set(0,e.languageId,e.tokenType,null,n.fontStyle,n.foregroundId,n.backgroundId),a=this.getRule(this._rootId).getName(null,null),o;o=a?hp.createRootAndLookUpScopeName(a,r,this):hp.createRoot(`unknown`,r),t=new gp(null,this._rootId,-1,-1,!1,null,o,o)}else i=!1,t.reset();e+=`
|
|
1301
|
+
`;let a=this.createOnigString(e),o=a.content.length,s=new vp(n,e,this._tokenTypeMatchers,this.balancedBracketSelectors),c=$f(this,a,i,0,t,s,!0,r);return _f(a),{lineLength:o,lineTokens:s,ruleStack:c.stack,stoppedEarly:c.stoppedEarly}}};function mp(e,t){return e=Rd(e),e.repository=e.repository||{},e.repository.$self={$vscodeTextmateLocation:e.$vscodeTextmateLocation,patterns:e.patterns,name:e.scopeName},e.repository.$base=t||e.repository.$self,e}var hp=class e{constructor(e,t,n){this.parent=e,this.scopePath=t,this.tokenAttributes=n}static fromExtension(t,n){let r=t,i=t?.scopePath??null;for(let t of n)i=Qd.push(i,t.scopeNames),r=new e(r,i,t.encodedTokenAttributes);return r}static createRoot(t,n){return new e(null,new Qd(null,t),n)}static createRootAndLookUpScopeName(t,n,r){let i=r.getMetadataForScope(t),a=new Qd(null,t),o=r.themeProvider.themeMatch(a);return new e(null,a,e.mergeAttributes(n,i,o))}get scopeName(){return this.scopePath.scopeName}toString(){return this.getScopeNames().join(` `)}equals(t){return e.equals(this,t)}static equals(e,t){do{if(e===t||!e&&!t)return!0;if(!e||!t||e.scopeName!==t.scopeName||e.tokenAttributes!==t.tokenAttributes)return!1;e=e.parent,t=t.parent}while(!0)}static mergeAttributes(e,t,n){let r=-1,i=0,a=0;return n!==null&&(r=n.fontStyle,i=n.foregroundId,a=n.backgroundId),df.set(e,t.languageId,t.tokenType,null,r,i,a)}pushAttributed(t,n){if(t===null)return this;if(t.indexOf(` `)===-1)return e._pushAttributed(this,t,n);let r=t.split(/ /g),i=this;for(let t of r)i=e._pushAttributed(i,t,n);return i}static _pushAttributed(t,n,r){let i=r.getMetadataForScope(n),a=t.scopePath.push(n),o=r.themeProvider.themeMatch(a);return new e(t,a,e.mergeAttributes(t.tokenAttributes,i,o))}getScopeNames(){return this.scopePath.getSegments()}getExtensionIfDefined(e){let t=[],n=this;for(;n&&n!==e;)t.push({encodedTokenAttributes:n.tokenAttributes,scopeNames:n.scopePath.getExtensionIfDefined(n.parent?.scopePath??null)}),n=n.parent;return n===e?t.reverse():void 0}},gp=class e{constructor(e,t,n,r,i,a,o,s){this.parent=e,this.ruleId=t,this.beginRuleCapturedEOL=i,this.endRule=a,this.nameScopesList=o,this.contentNameScopesList=s,this.depth=this.parent?this.parent.depth+1:1,this._enterPos=n,this._anchorPos=r}_stackElementBrand=void 0;static NULL=new e(null,0,0,0,!1,null,null,null);_enterPos;_anchorPos;depth;equals(t){return t===null?!1:e._equals(this,t)}static _equals(e,t){return e===t?!0:this._structuralEquals(e,t)?hp.equals(e.contentNameScopesList,t.contentNameScopesList):!1}static _structuralEquals(e,t){do{if(e===t||!e&&!t)return!0;if(!e||!t||e.depth!==t.depth||e.ruleId!==t.ruleId||e.endRule!==t.endRule)return!1;e=e.parent,t=t.parent}while(!0)}clone(){return this}static _reset(e){for(;e;)e._enterPos=-1,e._anchorPos=-1,e=e.parent}reset(){e._reset(this)}pop(){return this.parent}safePop(){return this.parent?this.parent:this}push(t,n,r,i,a,o,s){return new e(this,t,n,r,i,a,o,s)}getEnterPos(){return this._enterPos}getAnchorPos(){return this._anchorPos}getRule(e){return e.getRule(this.ruleId)}toString(){let e=[];return this._writeString(e,0),`[`+e.join(`,`)+`]`}_writeString(e,t){return this.parent&&(t=this.parent._writeString(e,t)),e[t++]=`(${this.ruleId}, ${this.nameScopesList?.toString()}, ${this.contentNameScopesList?.toString()})`,t}withContentNameScopesList(e){return this.contentNameScopesList===e?this:this.parent.push(this.ruleId,this._enterPos,this._anchorPos,this.beginRuleCapturedEOL,this.endRule,this.nameScopesList,e)}withEndRule(t){return this.endRule===t?this:new e(this.parent,this.ruleId,this._enterPos,this._anchorPos,this.beginRuleCapturedEOL,t,this.nameScopesList,this.contentNameScopesList)}hasSameRuleAs(e){let t=this;for(;t&&t._enterPos===e._enterPos;){if(t.ruleId===e.ruleId)return!0;t=t.parent}return!1}toStateStackFrame(){return{ruleId:Lf(this.ruleId),beginRuleCapturedEOL:this.beginRuleCapturedEOL,endRule:this.endRule,nameScopesList:this.nameScopesList?.getExtensionIfDefined(this.parent?.nameScopesList??null)??[],contentNameScopesList:this.contentNameScopesList?.getExtensionIfDefined(this.nameScopesList)??[]}}static pushFrame(t,n){let r=hp.fromExtension(t?.nameScopesList??null,n.nameScopesList);return new e(t,If(n.ruleId),n.enterPos??-1,n.anchorPos??-1,n.beginRuleCapturedEOL,n.endRule,r,hp.fromExtension(r,n.contentNameScopesList))}},_p=class{balancedBracketScopes;unbalancedBracketScopes;allowAny=!1;constructor(e,t){this.balancedBracketScopes=e.flatMap(e=>e===`*`?(this.allowAny=!0,[]):mf(e,dp).map(e=>e.matcher)),this.unbalancedBracketScopes=t.flatMap(e=>mf(e,dp).map(e=>e.matcher))}get matchesAlways(){return this.allowAny&&this.unbalancedBracketScopes.length===0}get matchesNever(){return this.balancedBracketScopes.length===0&&!this.allowAny}match(e){for(let t of this.unbalancedBracketScopes)if(t(e))return!1;for(let t of this.balancedBracketScopes)if(t(e))return!0;return this.allowAny}},vp=class{constructor(e,t,n,r){this.balancedBracketSelectors=r,this._emitBinaryTokens=e,this._tokenTypeOverrides=n,this._lineText=null,this._tokens=[],this._binaryTokens=[],this._lastTokenEndIndex=0}_emitBinaryTokens;_lineText;_tokens;_binaryTokens;_lastTokenEndIndex;_tokenTypeOverrides;produce(e,t){this.produceFromScopes(e.contentNameScopesList,t)}produceFromScopes(e,t){if(this._lastTokenEndIndex>=t)return;if(this._emitBinaryTokens){let n=e?.tokenAttributes??0,r=!1;if(this.balancedBracketSelectors?.matchesAlways&&(r=!0),this._tokenTypeOverrides.length>0||this.balancedBracketSelectors&&!this.balancedBracketSelectors.matchesAlways&&!this.balancedBracketSelectors.matchesNever){let t=e?.getScopeNames()??[];for(let e of this._tokenTypeOverrides)e.matcher(t)&&(n=df.set(n,0,ff(e.type),null,-1,0,0));this.balancedBracketSelectors&&(r=this.balancedBracketSelectors.match(t))}if(r&&(n=df.set(n,0,8,r,-1,0,0)),this._binaryTokens.length>0&&this._binaryTokens[this._binaryTokens.length-1]===n){this._lastTokenEndIndex=t;return}this._binaryTokens.push(this._lastTokenEndIndex),this._binaryTokens.push(n),this._lastTokenEndIndex=t;return}let n=e?.getScopeNames()??[];this._tokens.push({startIndex:this._lastTokenEndIndex,endIndex:t,scopes:n}),this._lastTokenEndIndex=t}getResult(e,t){return this._tokens.length>0&&this._tokens[this._tokens.length-1].startIndex===t-1&&this._tokens.pop(),this._tokens.length===0&&(this._lastTokenEndIndex=-1,this.produce(e,t),this._tokens[this._tokens.length-1].startIndex=0),this._tokens}getBinaryResult(e,t){this._binaryTokens.length>0&&this._binaryTokens[this._binaryTokens.length-2]===t-1&&(this._binaryTokens.pop(),this._binaryTokens.pop()),this._binaryTokens.length===0&&(this._lastTokenEndIndex=-1,this.produce(e,t),this._binaryTokens[this._binaryTokens.length-2]=0);let n=new Uint32Array(this._binaryTokens.length);for(let e=0,t=this._binaryTokens.length;e<t;e++)n[e]=this._binaryTokens[e];return n}},yp=class{constructor(e,t){this._onigLib=t,this._theme=e}_grammars=new Map;_rawGrammars=new Map;_injectionGrammars=new Map;_theme;dispose(){for(let e of this._grammars.values())e.dispose()}setTheme(e){this._theme=e}getColorMap(){return this._theme.getColorMap()}addGrammar(e,t){this._rawGrammars.set(e.scopeName,e),t&&this._injectionGrammars.set(e.scopeName,t)}lookup(e){return this._rawGrammars.get(e)}injections(e){return this._injectionGrammars.get(e)}getDefaults(){return this._theme.getDefaults()}themeMatch(e){return this._theme.match(e)}grammarForScopeName(e,t,n,r,i){if(!this._grammars.has(e)){let a=this._rawGrammars.get(e);if(!a)return null;this._grammars.set(e,lp(e,a,t,n,r,i,this,this._onigLib))}return this._grammars.get(e)}},bp=class{_options;_syncRegistry;_ensureGrammarCache;constructor(e){this._options=e,this._syncRegistry=new yp(Zd.createFromRawTheme(e.theme,e.colorMap),e.onigLib),this._ensureGrammarCache=new Map}dispose(){this._syncRegistry.dispose()}setTheme(e,t){this._syncRegistry.setTheme(Zd.createFromRawTheme(e,t))}getColorMap(){return this._syncRegistry.getColorMap()}loadGrammarWithEmbeddedLanguages(e,t,n){return this.loadGrammarWithConfiguration(e,t,{embeddedLanguages:n})}loadGrammarWithConfiguration(e,t,n){return this._loadGrammar(e,t,n.embeddedLanguages,n.tokenTypes,new _p(n.balancedBracketSelectors||[],n.unbalancedBracketSelectors||[]))}loadGrammar(e){return this._loadGrammar(e,0,null,null,null)}_loadGrammar(e,t,n,r,i){let a=new xf(this._syncRegistry,e);for(;a.Q.length>0;)a.Q.map(e=>this._loadSingleGrammar(e.scopeName)),a.processQueue();return this._grammarForScopeName(e,t,n,r,i)}_loadSingleGrammar(e){this._ensureGrammarCache.has(e)||(this._doLoadSingleGrammar(e),this._ensureGrammarCache.set(e,!0))}_doLoadSingleGrammar(e){let t=this._options.loadGrammar(e);if(t){let n=typeof this._options.getInjections==`function`?this._options.getInjections(e):void 0;this._syncRegistry.addGrammar(t,n)}}addGrammar(e,t=[],n=0,r=null){return this._syncRegistry.addGrammar(e,t),this._grammarForScopeName(e.scopeName,n,r)}_grammarForScopeName(e,t=0,n=null,r=null,i=null){return this._syncRegistry.grammarForScopeName(e,t,n,r,i)}},xp=gp.NULL;function Sp(e,t){let n=typeof e==`string`?{}:{...e.colorReplacements},r=typeof e==`string`?e:e.name;for(let[e,i]of Object.entries(t?.colorReplacements||{}))typeof i==`string`?n[e]=i:e===r&&Object.assign(n,i);return n}function Cp(e,t){return e&&(t?.[e?.toLowerCase()]||e)}function wp(e){return Array.isArray(e)?e:[e]}async function Tp(e){return Promise.resolve(typeof e==`function`?e():e).then(e=>e.default||e)}function Ep(e){return!e||[`plaintext`,`txt`,`text`,`plain`].includes(e)}function Dp(e){return e===`ansi`||Ep(e)}function Op(e){return e===`none`}function kp(e){return Op(e)}var Ap=/(\r?\n)/g;function jp(e,t=!1){if(e.length===0)return[[``,0]];let n=e.split(Ap),r=0,i=[];for(let e=0;e<n.length;e+=2){let a=t?n[e]+(n[e+1]||``):n[e];i.push([a,r]),r+=n[e].length,r+=n[e+1]?.length||0}return i}var Mp={light:`#333333`,dark:`#bbbbbb`},Np={light:`#fffffe`,dark:`#1e1e1e`},Pp=`__shiki_resolved`;function Fp(e){if(e?.[Pp])return e;let t={...e};t.tokenColors&&!t.settings&&(t.settings=t.tokenColors,delete t.tokenColors),t.type||=`dark`,t.colorReplacements={...t.colorReplacements},t.settings||=[];let{bg:n,fg:r}=t;if(!n||!r){let e=t.settings?t.settings.find(e=>!e.name&&!e.scope):void 0;e?.settings?.foreground&&(r=e.settings.foreground),e?.settings?.background&&(n=e.settings.background),!r&&t?.colors?.[`editor.foreground`]&&(r=t.colors[`editor.foreground`]),!n&&t?.colors?.[`editor.background`]&&(n=t.colors[`editor.background`]),r||=t.type===`light`?Mp.light:Mp.dark,n||=t.type===`light`?Np.light:Np.dark,t.fg=r,t.bg=n}t.settings[0]&&t.settings[0].settings&&!t.settings[0].scope||t.settings.unshift({settings:{foreground:t.fg,background:t.bg}});let i=0,a=new Map;function o(e){if(a.has(e))return a.get(e);i+=1;let n=`#${i.toString(16).padStart(8,`0`).toLowerCase()}`;return t.colorReplacements?.[`#${n}`]?o(e):(a.set(e,n),n)}t.settings=t.settings.map(e=>{let n=e.settings?.foreground&&!e.settings.foreground.startsWith(`#`),r=e.settings?.background&&!e.settings.background.startsWith(`#`);if(!n&&!r)return e;let i={...e,settings:{...e.settings}};if(n){let n=o(e.settings.foreground);t.colorReplacements[n]=e.settings.foreground,i.settings.foreground=n}if(r){let n=o(e.settings.background);t.colorReplacements[n]=e.settings.background,i.settings.background=n}return i});for(let e of Object.keys(t.colors||{}))if((e===`editor.foreground`||e===`editor.background`||e.startsWith(`terminal.ansi`))&&!t.colors[e]?.startsWith(`#`)){let n=o(t.colors[e]);t.colorReplacements[n]=t.colors[e],t.colors[e]=n}return Object.defineProperty(t,Pp,{enumerable:!1,writable:!1,value:!0}),t}async function Ip(e){return[...new Set((await Promise.all(e.filter(e=>!Dp(e)).map(async e=>await Tp(e).then(e=>Array.isArray(e)?e:[e])))).flat())]}async function Lp(e){return(await Promise.all(e.map(async e=>kp(e)?null:Fp(await Tp(e))))).filter(e=>!!e)}function Rp(e,t){if(!t)return e;if(t[e]){let n=new Set([e]);for(;t[e];){if(e=t[e],n.has(e))throw new X(`Circular alias \`${[...n].join(` -> `)} -> ${e}\``);n.add(e)}}return e}var zp=class extends bp{_resolver;_themes;_langs;_alias;_resolvedThemes=new Map;_resolvedGrammars=new Map;_langMap=new Map;_langGraph=new Map;_textmateThemeCache=new WeakMap;_loadedThemesCache=null;_loadedLanguagesCache=null;constructor(e,t,n,r={}){super(e),this._resolver=e,this._themes=t,this._langs=n,this._alias=r,this._themes.map(e=>this.loadTheme(e)),this.loadLanguages(this._langs)}getTheme(e){return typeof e==`string`?this._resolvedThemes.get(e):this.loadTheme(e)}loadTheme(e){let t=Fp(e);return t.name&&(this._resolvedThemes.set(t.name,t),this._loadedThemesCache=null),t}getLoadedThemes(){return this._loadedThemesCache||=[...this._resolvedThemes.keys()],this._loadedThemesCache}setTheme(e){let t=this._textmateThemeCache.get(e);t||(t=Zd.createFromRawTheme(e),this._textmateThemeCache.set(e,t)),this._syncRegistry.setTheme(t)}getGrammar(e){return e=Rp(e,this._alias),this._resolvedGrammars.get(e)}loadLanguage(e){if(this.getGrammar(e.name))return;let t=new Set([...this._langMap.values()].filter(t=>t.embeddedLangsLazy?.includes(e.name)));this._resolver.addLanguage(e);let n={balancedBracketSelectors:e.balancedBracketSelectors||[`*`],unbalancedBracketSelectors:e.unbalancedBracketSelectors||[]};this._syncRegistry._rawGrammars.set(e.scopeName,e);let r=this.loadGrammarWithConfiguration(e.scopeName,1,n);if(r.name=e.name,this._resolvedGrammars.set(e.name,r),e.aliases&&e.aliases.forEach(t=>{this._alias[t]=e.name}),this._loadedLanguagesCache=null,t.size)for(let e of t)this._resolvedGrammars.delete(e.name),this._loadedLanguagesCache=null,this._syncRegistry?._injectionGrammars?.delete(e.scopeName),this._syncRegistry?._grammars?.delete(e.scopeName),this.loadLanguage(this._langMap.get(e.name))}dispose(){super.dispose(),this._resolvedThemes.clear(),this._resolvedGrammars.clear(),this._langMap.clear(),this._langGraph.clear(),this._loadedThemesCache=null}loadLanguages(e){for(let t of e)this.resolveEmbeddedLanguages(t);let t=[...this._langGraph.entries()],n=t.filter(([e,t])=>!t);if(n.length){let e=t.filter(([e,t])=>t?(t.embeddedLanguages||t.embeddedLangs)?.some(e=>n.map(([e])=>e).includes(e)):!1).filter(e=>!n.includes(e));throw new X(`Missing languages ${n.map(([e])=>`\`${e}\``).join(`, `)}, required by ${e.map(([e])=>`\`${e}\``).join(`, `)}`)}for(let[e,n]of t)this._resolver.addLanguage(n);for(let[e,n]of t)this.loadLanguage(n)}getLoadedLanguages(){return this._loadedLanguagesCache||=[...new Set([...this._resolvedGrammars.keys(),...Object.keys(this._alias)])],this._loadedLanguagesCache}resolveEmbeddedLanguages(e){this._langMap.set(e.name,e),this._langGraph.set(e.name,e);let t=e.embeddedLanguages??e.embeddedLangs;if(t)for(let e of t)this._langGraph.set(e,this._langMap.get(e))}},Bp=class{_langs=new Map;_scopeToLang=new Map;_injections=new Map;_onigLib;constructor(e,t){this._onigLib={createOnigScanner:t=>e.createScanner(t),createOnigString:t=>e.createString(t)},t.forEach(e=>this.addLanguage(e))}get onigLib(){return this._onigLib}getLangRegistration(e){return this._langs.get(e)}loadGrammar(e){return this._scopeToLang.get(e)}addLanguage(e){this._langs.set(e.name,e),e.aliases&&e.aliases.forEach(t=>{this._langs.set(t,e)}),this._scopeToLang.set(e.scopeName,e),e.injectTo&&e.injectTo.forEach(t=>{this._injections.get(t)||this._injections.set(t,[]),this._injections.get(t).push(e.scopeName)})}getInjections(e){let t=e.split(`.`),n=[];for(let e=1;e<=t.length;e++){let r=t.slice(0,e).join(`.`);n=[...n,...this._injections.get(r)||[]]}return n}},Vp=0;function Hp(e){Vp+=1,e.warnings!==!1&&Vp>=10&&Vp%10==0&&console.warn(`[Shiki] ${Vp} instances have been created. Shiki is supposed to be used as a singleton, consider refactoring your code to cache your highlighter instance; Or call \`highlighter.dispose()\` to release unused instances.`);let t=!1;if(!e.engine)throw new X("`engine` option is required for synchronous mode");let n=(e.langs||[]).flat(1),r=(e.themes||[]).flat(1).map(Fp),i=new zp(new Bp(e.engine,n),r,n,e.langAlias),a;function o(t){return Rp(t,e.langAlias)}function s(e){g();let t=i.getGrammar(typeof e==`string`?e:e.name);if(!t)throw new X(`Language \`${e}\` not found, you may need to load it first`);return t}function c(e){if(e===`none`)return{bg:``,fg:``,name:`none`,settings:[],type:`dark`};g();let t=i.getTheme(e);if(!t)throw new X(`Theme \`${e}\` not found, you may need to load it first`);return t}function l(e){g();let t=c(e);return a!==e&&(i.setTheme(t),a=e),{theme:t,colorMap:i.getColorMap()}}function u(){return g(),i.getLoadedThemes()}function d(){return g(),i.getLoadedLanguages()}function f(...e){g(),i.loadLanguages(e.flat(1))}async function p(...e){return f(await Ip(e))}function m(...e){g();for(let t of e.flat(1))i.loadTheme(t)}async function h(...e){return g(),m(await Lp(e))}function g(){if(t)throw new X(`Shiki instance has been disposed`)}function _(){t||(t=!0,i.dispose(),--Vp)}return{setTheme:l,getTheme:c,getLanguage:s,getLoadedThemes:u,getLoadedLanguages:d,resolveLangAlias:o,loadLanguage:p,loadLanguageSync:f,loadTheme:h,loadThemeSync:m,dispose:_,[Symbol.dispose]:_}}async function Up(e){e.engine||console.warn("`engine` option is required. Use `createOnigurumaEngine` or `createJavaScriptRegexEngine` to create an engine.");let[t,n,r]=await Promise.all([Lp(e.themes||[]),Ip(e.langs||[]),e.engine]);return Hp({...e,themes:t,langs:n,engine:r})}var Wp=new WeakMap;function Gp(e,t){Wp.set(e,t)}function Kp(e){return Wp.get(e)}var qp=class e{_stacks={};lang;get themes(){return Object.keys(this._stacks)}get theme(){return this.themes[0]}get _stack(){return this._stacks[this.theme]}static initial(t,n){return new e(Object.fromEntries(wp(n).map(e=>[e,xp])),t)}constructor(...e){if(e.length===2){let[t,n]=e;this.lang=n,this._stacks=t}else{let[t,n,r]=e;this.lang=n,this._stacks={[r]:t}}}getInternalStack(e=this.theme){return this._stacks[e]}getScopes(e=this.theme){return Jp(this._stacks[e])}toJSON(){return{lang:this.lang,theme:this.theme,themes:this.themes,scopes:this.getScopes()}}};function Jp(e){let t=[],n=new Set;function r(e){if(n.has(e))return;n.add(e);let i=e?.nameScopesList?.scopeName;i&&t.push(i),e.parent&&r(e.parent)}return r(e),t}function Yp(e,t){if(!(e instanceof qp))throw new X(`Invalid grammar state`);return e.getInternalStack(t)}var Xp=/,/,Zp=/ /;function Qp(e,t,n={}){let{theme:r=e.getLoadedThemes()[0]}=n;if(Ep(e.resolveLangAlias(n.lang||`text`))||Op(r))return jp(t).map(e=>[{content:e[0],offset:e[1]}]);let{theme:i,colorMap:a}=e.setTheme(r),o=e.getLanguage(n.lang||`text`);if(n.grammarState){if(n.grammarState.lang!==o.name)throw new X(`Grammar state language "${n.grammarState.lang}" does not match highlight language "${o.name}"`);if(!n.grammarState.themes.includes(i.name))throw new X(`Grammar state themes "${n.grammarState.themes}" do not contain highlight theme "${i.name}"`)}return em(t,o,i,a,n)}function $p(...e){if(e.length===2)return Kp(e[1]);let[t,n,r={}]=e,{lang:i=`text`,theme:a=t.getLoadedThemes()[0]}=r;if(Ep(i)||Op(a))throw new X(`Plain language does not have grammar state`);if(i===`ansi`)throw new X(`ANSI language does not have grammar state`);let{theme:o,colorMap:s}=t.setTheme(a),c=t.getLanguage(i);return new qp(tm(n,c,o,s,r).stateStack,c.name,o.name)}function em(e,t,n,r,i){let a=tm(e,t,n,r,i),o=new qp(a.stateStack,t.name,n.name);return Gp(a.tokens,o),a.tokens}function tm(e,t,n,r,i){let a=Sp(n,i),{tokenizeMaxLineLength:o=0,tokenizeTimeLimit:s=500}=i,c=jp(e),l=i.grammarState?Yp(i.grammarState,n.name)??xp:i.grammarContextCode==null?xp:tm(i.grammarContextCode,t,n,r,{...i,grammarState:void 0,grammarContextCode:void 0}).stateStack,u=[],d=[];for(let e=0,f=c.length;e<f;e++){let[f,p]=c[e];if(f===``){u=[],d.push([]);continue}if(o>0&&f.length>=o){u=[],d.push([{content:f,offset:p,color:``,fontStyle:0}]);continue}let m,h,g;i.includeExplanation&&(m=t.tokenizeLine(f,l,s),h=m.tokens,g=0);let _=t.tokenizeLine2(f,l,s),v=_.tokens.length/2;for(let e=0;e<v;e++){let t=_.tokens[2*e],o=e+1<v?_.tokens[2*e+2]:f.length;if(t===o)continue;let s=_.tokens[2*e+1],c=Cp(r[df.getForeground(s)],a),l=df.getFontStyle(s),d={content:f.substring(t,o),offset:p+t,color:c,fontStyle:l};if(i.includeExplanation){let e=[];if(i.includeExplanation!==`scopeName`)for(let t of n.settings){let n;switch(typeof t.scope){case`string`:n=t.scope.split(Xp).map(e=>e.trim());break;case`object`:n=t.scope;break;default:continue}e.push({settings:t,selectors:n.map(e=>e.split(Zp))})}d.explanation=[];let r=0;for(;t+r<o;){let t=h[g],n=f.substring(t.startIndex,t.endIndex);r+=n.length,d.explanation.push({content:n,scopes:i.includeExplanation===`scopeName`?nm(t.scopes):rm(e,t.scopes)}),g+=1}}u.push(d)}d.push(u),u=[],l=_.ruleStack}return{tokens:d,stateStack:l}}function nm(e){return e.map(e=>({scopeName:e}))}function rm(e,t){let n=[];for(let r=0,i=t.length;r<i;r++){let i=t[r];n[r]={scopeName:i,themeMatches:om(e,i,t.slice(0,r))}}return n}function im(e,t){return e===t||t.substring(0,e.length)===e&&t[e.length]===`.`}function am(e,t,n){if(!im(e.at(-1),t))return!1;let r=e.length-2,i=n.length-1;for(;r>=0&&i>=0;)im(e[r],n[i])&&--r,--i;return r===-1}function om(e,t,n){let r=[];for(let{selectors:i,settings:a}of e)for(let e of i)if(am(e,t,n)){r.push(a);break}return r}function sm(e,t,n,r=Qp){let i=Object.entries(n.themes).filter(e=>e[1]).map(e=>({color:e[0],theme:e[1]})),a=i.map(i=>{let a=r(e,t,{...n,theme:i.theme});return{tokens:a,state:Kp(a),theme:typeof i.theme==`string`?i.theme:i.theme.name}}),o=cm(...a.map(e=>e.tokens)),s=o[0].map((e,t)=>e.map((e,r)=>{let a={content:e.content,variants:{},offset:e.offset};return`includeExplanation`in n&&n.includeExplanation&&(a.explanation=e.explanation),o.forEach((e,n)=>{let{content:o,explanation:s,offset:c,...l}=e[t][r];a.variants[i[n].color]=l}),a})),c=a[0].state?new qp(Object.fromEntries(a.map(e=>[e.theme,e.state?.getInternalStack(e.theme)])),a[0].state.lang):void 0;return c&&Gp(s,c),s}function cm(...e){let t=e.map(()=>[]),n=e.length;for(let r=0;r<e[0].length;r++){let i=e.map(e=>e[r]),a=t.map(()=>[]);t.forEach((e,t)=>e.push(a[t]));let o=i.map(()=>0),s=i.map(e=>e[0]);for(;s.every(e=>e);){let e=Math.min(...s.map(e=>e.content.length));for(let t=0;t<n;t++){let n=s[t];n.content.length===e?(a[t].push(n),o[t]+=1,s[t]=i[t][o[t]]):(a[t].push({...n,content:n.content.slice(0,e)}),s[t]={...n,content:n.content.slice(e),offset:n.offset+e})}}}return t}var lm=[`area`,`base`,`basefont`,`bgsound`,`br`,`col`,`command`,`embed`,`frame`,`hr`,`image`,`img`,`input`,`keygen`,`link`,`meta`,`param`,`source`,`track`,`wbr`],um={}.hasOwnProperty;function dm(e,t){let n=t||{};function r(t,...n){let i=r.invalid,a=r.handlers;if(t&&um.call(t,e)){let n=String(t[e]);i=um.call(a,n)?a[n]:r.unknown}if(i)return i.call(this,t,...n)}return r.handlers=n.handlers||{},r.invalid=n.invalid,r.unknown=n.unknown,r}var fm=/["&'<>`]/g,pm=/[\uD800-\uDBFF][\uDC00-\uDFFF]/g,mm=/[\x01-\t\v\f\x0E-\x1F\x7F\x81\x8D\x8F\x90\x9D\xA0-\uFFFF]/g,hm=/[|\\{}()[\]^$+*?.]/g,gm=new WeakMap;function _m(e,t){if(e=e.replace(t.subset?vm(t.subset):fm,r),t.subset||t.escapeOnly)return e;return e.replace(pm,n).replace(mm,r);function n(e,n,r){return t.format((e.charCodeAt(0)-55296)*1024+e.charCodeAt(1)-56320+65536,r.charCodeAt(n+2),t)}function r(e,n,r){return t.format(e.charCodeAt(0),r.charCodeAt(n+1),t)}}function vm(e){let t=gm.get(e);return t||(t=ym(e),gm.set(e,t)),t}function ym(e){let t=[],n=-1;for(;++n<e.length;)t.push(e[n].replace(hm,`\\$&`));return RegExp(`(?:`+t.join(`|`)+`)`,`g`)}var bm=/[\dA-Fa-f]/;function xm(e,t,n){let r=`&#x`+e.toString(16).toUpperCase();return n&&t&&!bm.test(String.fromCharCode(t))?r:r+`;`}var Sm=/\d/;function Cm(e,t,n){let r=`&#`+String(e);return n&&t&&!Sm.test(String.fromCharCode(t))?r:r+`;`}var wm=`AElig.AMP.Aacute.Acirc.Agrave.Aring.Atilde.Auml.COPY.Ccedil.ETH.Eacute.Ecirc.Egrave.Euml.GT.Iacute.Icirc.Igrave.Iuml.LT.Ntilde.Oacute.Ocirc.Ograve.Oslash.Otilde.Ouml.QUOT.REG.THORN.Uacute.Ucirc.Ugrave.Uuml.Yacute.aacute.acirc.acute.aelig.agrave.amp.aring.atilde.auml.brvbar.ccedil.cedil.cent.copy.curren.deg.divide.eacute.ecirc.egrave.eth.euml.frac12.frac14.frac34.gt.iacute.icirc.iexcl.igrave.iquest.iuml.laquo.lt.macr.micro.middot.nbsp.not.ntilde.oacute.ocirc.ograve.ordf.ordm.oslash.otilde.ouml.para.plusmn.pound.quot.raquo.reg.sect.shy.sup1.sup2.sup3.szlig.thorn.times.uacute.ucirc.ugrave.uml.uuml.yacute.yen.yuml`.split(`.`),Tm={nbsp:`\xA0`,iexcl:`¡`,cent:`¢`,pound:`£`,curren:`¤`,yen:`¥`,brvbar:`¦`,sect:`§`,uml:`¨`,copy:`©`,ordf:`ª`,laquo:`«`,not:`¬`,shy:``,reg:`®`,macr:`¯`,deg:`°`,plusmn:`±`,sup2:`²`,sup3:`³`,acute:`´`,micro:`µ`,para:`¶`,middot:`·`,cedil:`¸`,sup1:`¹`,ordm:`º`,raquo:`»`,frac14:`¼`,frac12:`½`,frac34:`¾`,iquest:`¿`,Agrave:`À`,Aacute:`Á`,Acirc:`Â`,Atilde:`Ã`,Auml:`Ä`,Aring:`Å`,AElig:`Æ`,Ccedil:`Ç`,Egrave:`È`,Eacute:`É`,Ecirc:`Ê`,Euml:`Ë`,Igrave:`Ì`,Iacute:`Í`,Icirc:`Î`,Iuml:`Ï`,ETH:`Ð`,Ntilde:`Ñ`,Ograve:`Ò`,Oacute:`Ó`,Ocirc:`Ô`,Otilde:`Õ`,Ouml:`Ö`,times:`×`,Oslash:`Ø`,Ugrave:`Ù`,Uacute:`Ú`,Ucirc:`Û`,Uuml:`Ü`,Yacute:`Ý`,THORN:`Þ`,szlig:`ß`,agrave:`à`,aacute:`á`,acirc:`â`,atilde:`ã`,auml:`ä`,aring:`å`,aelig:`æ`,ccedil:`ç`,egrave:`è`,eacute:`é`,ecirc:`ê`,euml:`ë`,igrave:`ì`,iacute:`í`,icirc:`î`,iuml:`ï`,eth:`ð`,ntilde:`ñ`,ograve:`ò`,oacute:`ó`,ocirc:`ô`,otilde:`õ`,ouml:`ö`,divide:`÷`,oslash:`ø`,ugrave:`ù`,uacute:`ú`,ucirc:`û`,uuml:`ü`,yacute:`ý`,thorn:`þ`,yuml:`ÿ`,fnof:`ƒ`,Alpha:`Α`,Beta:`Β`,Gamma:`Γ`,Delta:`Δ`,Epsilon:`Ε`,Zeta:`Ζ`,Eta:`Η`,Theta:`Θ`,Iota:`Ι`,Kappa:`Κ`,Lambda:`Λ`,Mu:`Μ`,Nu:`Ν`,Xi:`Ξ`,Omicron:`Ο`,Pi:`Π`,Rho:`Ρ`,Sigma:`Σ`,Tau:`Τ`,Upsilon:`Υ`,Phi:`Φ`,Chi:`Χ`,Psi:`Ψ`,Omega:`Ω`,alpha:`α`,beta:`β`,gamma:`γ`,delta:`δ`,epsilon:`ε`,zeta:`ζ`,eta:`η`,theta:`θ`,iota:`ι`,kappa:`κ`,lambda:`λ`,mu:`μ`,nu:`ν`,xi:`ξ`,omicron:`ο`,pi:`π`,rho:`ρ`,sigmaf:`ς`,sigma:`σ`,tau:`τ`,upsilon:`υ`,phi:`φ`,chi:`χ`,psi:`ψ`,omega:`ω`,thetasym:`ϑ`,upsih:`ϒ`,piv:`ϖ`,bull:`•`,hellip:`…`,prime:`′`,Prime:`″`,oline:`‾`,frasl:`⁄`,weierp:`℘`,image:`ℑ`,real:`ℜ`,trade:`™`,alefsym:`ℵ`,larr:`←`,uarr:`↑`,rarr:`→`,darr:`↓`,harr:`↔`,crarr:`↵`,lArr:`⇐`,uArr:`⇑`,rArr:`⇒`,dArr:`⇓`,hArr:`⇔`,forall:`∀`,part:`∂`,exist:`∃`,empty:`∅`,nabla:`∇`,isin:`∈`,notin:`∉`,ni:`∋`,prod:`∏`,sum:`∑`,minus:`−`,lowast:`∗`,radic:`√`,prop:`∝`,infin:`∞`,ang:`∠`,and:`∧`,or:`∨`,cap:`∩`,cup:`∪`,int:`∫`,there4:`∴`,sim:`∼`,cong:`≅`,asymp:`≈`,ne:`≠`,equiv:`≡`,le:`≤`,ge:`≥`,sub:`⊂`,sup:`⊃`,nsub:`⊄`,sube:`⊆`,supe:`⊇`,oplus:`⊕`,otimes:`⊗`,perp:`⊥`,sdot:`⋅`,lceil:`⌈`,rceil:`⌉`,lfloor:`⌊`,rfloor:`⌋`,lang:`〈`,rang:`〉`,loz:`◊`,spades:`♠`,clubs:`♣`,hearts:`♥`,diams:`♦`,quot:`"`,amp:`&`,lt:`<`,gt:`>`,OElig:`Œ`,oelig:`œ`,Scaron:`Š`,scaron:`š`,Yuml:`Ÿ`,circ:`ˆ`,tilde:`˜`,ensp:` `,emsp:` `,thinsp:` `,zwnj:``,zwj:``,lrm:``,rlm:``,ndash:`–`,mdash:`—`,lsquo:`‘`,rsquo:`’`,sbquo:`‚`,ldquo:`“`,rdquo:`”`,bdquo:`„`,dagger:`†`,Dagger:`‡`,permil:`‰`,lsaquo:`‹`,rsaquo:`›`,euro:`€`},Em=[`cent`,`copy`,`divide`,`gt`,`lt`,`not`,`para`,`times`],Dm={}.hasOwnProperty,Om={},km;for(km in Tm)Dm.call(Tm,km)&&(Om[Tm[km]]=km);var Am=/[^\dA-Za-z]/;function jm(e,t,n,r){let i=String.fromCharCode(e);if(Dm.call(Om,i)){let e=Om[i],a=`&`+e;return n&&wm.includes(e)&&!Em.includes(e)&&(!r||t&&t!==61&&Am.test(String.fromCharCode(t)))?a:a+`;`}return``}function Mm(e,t,n){let r=xm(e,t,n.omitOptionalSemicolons),i;if((n.useNamedReferences||n.useShortestReferences)&&(i=jm(e,t,n.omitOptionalSemicolons,n.attribute)),(n.useShortestReferences||!i)&&n.useShortestReferences){let i=Cm(e,t,n.omitOptionalSemicolons);i.length<r.length&&(r=i)}return i&&(!n.useShortestReferences||i.length<r.length)?i:r}function Nm(e,t){return _m(e,Object.assign({format:Mm},t))}var Pm=/^>|^->|<!--|-->|--!>|<!-$/g,Fm=[`>`],Im=[`<`,`>`];function Lm(e,t,n,r){return r.settings.bogusComments?`<?`+Nm(e.value,Object.assign({},r.settings.characterReferences,{subset:Fm}))+`>`:`<!--`+e.value.replace(Pm,i)+`-->`;function i(e){return Nm(e,Object.assign({},r.settings.characterReferences,{subset:Im}))}}function Rm(e,t,n,r){return`<!`+(r.settings.upperDoctype?`DOCTYPE`:`doctype`)+(r.settings.tightDoctype?``:` `)+`html>`}var zm=Hm(1),Bm=Hm(-1),Vm=[];function Hm(e){return t;function t(t,n,r){let i=t?t.children:Vm,a=(n||0)+e,o=i[a];if(!r)for(;o&&c(o);)a+=e,o=i[a];return o}}var Um={}.hasOwnProperty;function Wm(e){return t;function t(t,n,r){return Um.call(e,t.tagName)&&e[t.tagName](t,n,r)}}var Gm=Wm({body:Jm,caption:Km,colgroup:Km,dd:Qm,dt:Zm,head:Km,html:qm,li:Xm,optgroup:eh,option:th,p:Ym,rp:$m,rt:$m,tbody:rh,td:oh,tfoot:ih,th:oh,thead:nh,tr:ah});function Km(e,t,n){let r=zm(n,t,!0);return!r||r.type!==`comment`&&!(r.type===`text`&&c(r.value.charAt(0)))}function qm(e,t,n){let r=zm(n,t);return!r||r.type!==`comment`}function Jm(e,t,n){let r=zm(n,t);return!r||r.type!==`comment`}function Ym(e,t,n){let r=zm(n,t);return r?r.type===`element`&&(r.tagName===`address`||r.tagName===`article`||r.tagName===`aside`||r.tagName===`blockquote`||r.tagName===`details`||r.tagName===`div`||r.tagName===`dl`||r.tagName===`fieldset`||r.tagName===`figcaption`||r.tagName===`figure`||r.tagName===`footer`||r.tagName===`form`||r.tagName===`h1`||r.tagName===`h2`||r.tagName===`h3`||r.tagName===`h4`||r.tagName===`h5`||r.tagName===`h6`||r.tagName===`header`||r.tagName===`hgroup`||r.tagName===`hr`||r.tagName===`main`||r.tagName===`menu`||r.tagName===`nav`||r.tagName===`ol`||r.tagName===`p`||r.tagName===`pre`||r.tagName===`section`||r.tagName===`table`||r.tagName===`ul`):!n||!(n.type===`element`&&(n.tagName===`a`||n.tagName===`audio`||n.tagName===`del`||n.tagName===`ins`||n.tagName===`map`||n.tagName===`noscript`||n.tagName===`video`))}function Xm(e,t,n){let r=zm(n,t);return!r||r.type===`element`&&r.tagName===`li`}function Zm(e,t,n){let r=zm(n,t);return!!(r&&r.type===`element`&&(r.tagName===`dt`||r.tagName===`dd`))}function Qm(e,t,n){let r=zm(n,t);return!r||r.type===`element`&&(r.tagName===`dt`||r.tagName===`dd`)}function $m(e,t,n){let r=zm(n,t);return!r||r.type===`element`&&(r.tagName===`rp`||r.tagName===`rt`)}function eh(e,t,n){let r=zm(n,t);return!r||r.type===`element`&&r.tagName===`optgroup`}function th(e,t,n){let r=zm(n,t);return!r||r.type===`element`&&(r.tagName===`option`||r.tagName===`optgroup`)}function nh(e,t,n){let r=zm(n,t);return!!(r&&r.type===`element`&&(r.tagName===`tbody`||r.tagName===`tfoot`))}function rh(e,t,n){let r=zm(n,t);return!r||r.type===`element`&&(r.tagName===`tbody`||r.tagName===`tfoot`)}function ih(e,t,n){return!zm(n,t)}function ah(e,t,n){let r=zm(n,t);return!r||r.type===`element`&&r.tagName===`tr`}function oh(e,t,n){let r=zm(n,t);return!r||r.type===`element`&&(r.tagName===`td`||r.tagName===`th`)}var sh=Wm({body:uh,colgroup:dh,head:lh,html:ch,tbody:fh});function ch(e){let t=zm(e,-1);return!t||t.type!==`comment`}function lh(e){let t=new Set;for(let n of e.children)if(n.type===`element`&&(n.tagName===`base`||n.tagName===`title`)){if(t.has(n.tagName))return!1;t.add(n.tagName)}let n=e.children[0];return!n||n.type===`element`}function uh(e){let t=zm(e,-1,!0);return!t||t.type!==`comment`&&!(t.type===`text`&&c(t.value.charAt(0)))&&!(t.type===`element`&&(t.tagName===`meta`||t.tagName===`link`||t.tagName===`script`||t.tagName===`style`||t.tagName===`template`))}function dh(e,t,n){let r=Bm(n,t),i=zm(e,-1,!0);return n&&r&&r.type===`element`&&r.tagName===`colgroup`&&Gm(r,n.children.indexOf(r),n)?!1:!!(i&&i.type===`element`&&i.tagName===`col`)}function fh(e,t,n){let r=Bm(n,t),i=zm(e,-1);return n&&r&&r.type===`element`&&(r.tagName===`thead`||r.tagName===`tbody`)&&Gm(r,n.children.indexOf(r),n)?!1:!!(i&&i.type===`element`&&i.tagName===`tr`)}var ph={name:[[`
|
|
1302
|
+
\f\r &/=>`.split(``),`
|
|
1303
|
+
\f\r "&'/=>\``.split(``)],[`\0
|
|
1304
|
+
\f\r "&'/<=>`.split(``),`\0
|
|
1305
|
+
\f\r "&'/<=>\``.split(``)]],unquoted:[[`
|
|
1306
|
+
\f\r &>`.split(``),`\0
|
|
1307
|
+
\f\r "&'<=>\``.split(``)],[`\0
|
|
1308
|
+
\f\r "&'<=>\``.split(``),`\0
|
|
1309
|
+
\f\r "&'<=>\``.split(``)]],single:[[`&'`.split(``),`"&'\``.split(``)],[`\0&'`.split(``),`\0"&'\``.split(``)]],double:[[`"&`.split(``),`"&'\``.split(``)],[`\0"&`.split(``),`\0"&'\``.split(``)]]};function mh(e,t,n,r){let i=r.schema,a=i.space===`svg`?!1:r.settings.omitOptionalTags,o=i.space===`svg`?r.settings.closeEmptyElements:r.settings.voids.includes(e.tagName.toLowerCase()),s=[],c;i.space===`html`&&e.tagName===`svg`&&(r.schema=m);let l=hh(r,e.properties),u=r.all(i.space===`html`&&e.tagName===`template`?e.content:e);return r.schema=i,u&&(o=!1),(l||!a||!sh(e,t,n))&&(s.push(`<`,e.tagName,l?` `+l:``),o&&(i.space===`svg`||r.settings.closeSelfClosing)&&(c=l.charAt(l.length-1),(!r.settings.tightSelfClosing||c===`/`||c&&c!==`"`&&c!==`'`)&&s.push(` `),s.push(`/`)),s.push(`>`)),s.push(u),!o&&(!a||!Gm(e,t,n))&&s.push(`</`+e.tagName+`>`),s.join(``)}function hh(e,t){let n=[],r=-1,i;if(t){for(i in t)if(t[i]!==null&&t[i]!==void 0){let r=gh(e,i,t[i]);r&&n.push(r)}}for(;++r<n.length;){let t=e.settings.tightAttributes?n[r].charAt(n[r].length-1):void 0;r!==n.length-1&&t!==`"`&&t!==`'`&&(n[r]+=` `)}return n.join(``)}function gh(e,t,n){let r=s(e.schema,t),i=e.settings.allowParseErrors&&e.schema.space===`html`?0:1,a=+!e.settings.allowDangerousCharacters,c=e.quote,l;if(r.overloadedBoolean&&(n===r.attribute||n===``)?n=!0:(r.boolean||r.overloadedBoolean)&&(typeof n!=`string`||n===r.attribute||n===``)&&(n=!!n),n==null||n===!1||typeof n==`number`&&Number.isNaN(n))return``;let u=Nm(r.attribute,Object.assign({},e.settings.characterReferences,{subset:ph.name[i][a]}));return n===!0||(n=Array.isArray(n)?(r.commaSeparated?f:o)(n,{padLeft:!e.settings.tightCommaSeparatedLists}):String(n),e.settings.collapseEmptyAttributes&&!n)?u:(e.settings.preferUnquoted&&(l=Nm(n,Object.assign({},e.settings.characterReferences,{attribute:!0,subset:ph.unquoted[i][a]}))),l!==n&&(e.settings.quoteSmart&&p(n,c)>p(n,e.alternative)&&(c=e.alternative),l=c+Nm(n,Object.assign({},e.settings.characterReferences,{subset:(c===`'`?ph.single:ph.double)[i][a],attribute:!0}))+c),u+(l&&`=`+l))}var _h=[`<`,`&`];function vh(e,t,n,r){return n&&n.type===`element`&&(n.tagName===`script`||n.tagName===`style`)?e.value:Nm(e.value,Object.assign({},r.settings.characterReferences,{subset:_h}))}function yh(e,t,n,r){return r.settings.allowDangerousHtml?e.value:vh(e,t,n,r)}function bh(e,t,n,r){return r.all(e)}var xh=dm(`type`,{invalid:Sh,unknown:Ch,handlers:{comment:Lm,doctype:Rm,element:mh,raw:yh,root:bh,text:vh}});function Sh(e){throw Error("Expected node, not `"+e+"`")}function Ch(e){throw Error("Cannot compile unknown node `"+e.type+"`")}var wh={},Th={},Eh=[];function Dh(e,t){let n=t||wh,r=n.quote||`"`,i=r===`"`?`'`:`"`;if(r!==`"`&&r!==`'`)throw Error("Invalid quote `"+r+"`, expected `'` or `\"`");return{one:Oh,all:kh,settings:{omitOptionalTags:n.omitOptionalTags||!1,allowParseErrors:n.allowParseErrors||!1,allowDangerousCharacters:n.allowDangerousCharacters||!1,quoteSmart:n.quoteSmart||!1,preferUnquoted:n.preferUnquoted||!1,tightAttributes:n.tightAttributes||!1,upperDoctype:n.upperDoctype||!1,tightDoctype:n.tightDoctype||!1,bogusComments:n.bogusComments||!1,tightCommaSeparatedLists:n.tightCommaSeparatedLists||!1,tightSelfClosing:n.tightSelfClosing||!1,collapseEmptyAttributes:n.collapseEmptyAttributes||!1,allowDangerousHtml:n.allowDangerousHtml||!1,voids:n.voids||lm,characterReferences:n.characterReferences||Th,closeSelfClosing:n.closeSelfClosing||!1,closeEmptyElements:n.closeEmptyElements||!1},schema:n.space===`svg`?m:u,quote:r,alternative:i}.one(Array.isArray(e)?{type:`root`,children:e}:e,void 0,void 0)}function Oh(e,t,n){return xh(e,t,n,this)}function kh(e){let t=[],n=e&&e.children||Eh,r=-1;for(;++r<n.length;)t[r]=this.one(n[r],r,e);return t.join(``)}var Ah=/\s+/g;function jh(e,t){if(!t)return e;e.properties||={},e.properties.class||=[],typeof e.properties.class==`string`&&(e.properties.class=e.properties.class.split(Ah)),Array.isArray(e.properties.class)||(e.properties.class=[]);let n=Array.isArray(t)?t:t.split(Ah);for(let t of n)t&&!e.properties.class.includes(t)&&e.properties.class.push(t);return e}var Mh=/:?lang=["']([^"']+)["']/g,Nh=/(?:```|~~~)([\w-]+)/g,Ph=/\\begin\{([\w-]+)\}/g,Fh=/<script\s+(?:type|lang)=["']([^"']+)["']/gi;function Ih(e){let t=jp(e,!0).map(([e])=>e);function n(n){if(n===e.length)return{line:t.length-1,character:t.at(-1).length};let r=n,i=0;for(let e of t){if(r<e.length)break;r-=e.length,i++}return{line:i,character:r}}function r(e,n){let r=0;for(let n=0;n<e;n++)r+=t[n].length;return r+=n,r}return{lines:t,indexToPos:n,posToIndex:r}}function Lh(e,t,n){let r=new Set;for(let t of e.matchAll(Mh)){let e=t[1].toLowerCase().trim();e&&r.add(e)}for(let t of e.matchAll(Nh)){let e=t[1].toLowerCase().trim();e&&r.add(e)}for(let t of e.matchAll(Ph)){let e=t[1].toLowerCase().trim();e&&r.add(e)}for(let t of e.matchAll(Fh)){let e=t[1].toLowerCase().trim(),n=e.includes(`/`)?e.split(`/`).pop():e;n&&r.add(n)}if(!n)return[...r];let i=n.getBundledLanguages();return[...r].filter(e=>e&&i[e])}var Rh=[`color`,`background-color`];function zh(e,t){let n=0,r=[];for(let i of t)i>n&&r.push({...e,content:e.content.slice(n,i),offset:e.offset+n}),n=i;return n<e.content.length&&r.push({...e,content:e.content.slice(n),offset:e.offset+n}),r}function Bh(e,t){let n=[...t instanceof Set?t:new Set(t)].sort((e,t)=>e-t);return n.length?e.map(e=>e.flatMap(e=>{let t=n.filter(t=>e.offset<t&&t<e.offset+e.content.length).map(t=>t-e.offset).sort((e,t)=>e-t);return t.length?zh(e,t):e})):e}function Vh(e,t,n,r,i=`css-vars`){let a={content:e.content,explanation:e.explanation,offset:e.offset},o=t.map(t=>Hh(e.variants[t])),s=new Set(o.flatMap(e=>Object.keys(e))),c={},l=(e,r)=>{let i=r===`color`?``:r===`background-color`?`-bg`:`-${r}`;return n+t[e]+(r===`color`?``:i)};return o.forEach((e,n)=>{for(let a of s){let s=e[a]||`inherit`;if(n===0&&r&&Rh.includes(a))if(r===`light-dark()`&&o.length>1){let e=t.findIndex(e=>e===`light`),r=t.findIndex(e=>e===`dark`);if(e===-1||r===-1)throw new X('When using `defaultColor: "light-dark()"`, you must provide both `light` and `dark` themes');c[a]=`light-dark(${o[e][a]||`inherit`}, ${o[r][a]||`inherit`})`,i===`css-vars`&&(c[l(n,a)]=s)}else c[a]=s;else i===`css-vars`&&(c[l(n,a)]=s)}}),a.htmlStyle=c,a}function Hh(e){let t={};if(e.color&&(t.color=e.color),e.bgColor&&(t[`background-color`]=e.bgColor),e.fontStyle){e.fontStyle&af.Italic&&(t[`font-style`]=`italic`),e.fontStyle&af.Bold&&(t[`font-weight`]=`bold`);let n=[];e.fontStyle&af.Underline&&n.push(`underline`),e.fontStyle&af.Strikethrough&&n.push(`line-through`),n.length&&(t[`text-decoration`]=n.join(` `))}return t}function Uh(e){return typeof e==`string`?e:Object.entries(e).map(([e,t])=>`${e}:${t}`).join(`;`)}function Wh(){let e=new WeakMap;function t(t){if(!e.has(t.meta)){let n=Ih(t.source);function r(e){if(typeof e==`number`){if(e<0||e>t.source.length)throw new X(`Invalid decoration offset: ${e}. Code length: ${t.source.length}`);return{...n.indexToPos(e),offset:e}}else{let t=n.lines[e.line];if(t===void 0)throw new X(`Invalid decoration position ${JSON.stringify(e)}. Lines length: ${n.lines.length}`);let r=e.character;if(r<0&&(r=t.length+r),r<0||r>t.length)throw new X(`Invalid decoration position ${JSON.stringify(e)}. Line ${e.line} length: ${t.length}`);return{...e,character:r,offset:n.posToIndex(e.line,r)}}}let i=(t.options.decorations||[]).map(e=>({...e,start:r(e.start),end:r(e.end)}));Gh(i),e.set(t.meta,{decorations:i,converter:n,source:t.source})}return e.get(t.meta)}return{name:`shiki:decorations`,tokens(e){if(this.options.decorations?.length)return Bh(e,t(this).decorations.flatMap(e=>[e.start.offset,e.end.offset]))},code(e){if(!this.options.decorations?.length)return;let n=t(this),r=[...e.children].filter(e=>e.type===`element`&&e.tagName===`span`);if(r.length!==n.converter.lines.length)throw new X(`Number of lines in code element (${r.length}) does not match the number of lines in the source (${n.converter.lines.length}). Failed to apply decorations.`);function i(e,t,n,i){let a=r[e],s=``,c=-1,l=-1;if(t===0&&(c=0),n===0&&(l=0),n===1/0&&(l=a.children.length),c===-1||l===-1)for(let e=0;e<a.children.length;e++)s+=Kh(a.children[e]),c===-1&&s.length===t&&(c=e+1),l===-1&&s.length===n&&(l=e+1);if(c===-1)throw new X(`Failed to find start index for decoration ${JSON.stringify(i.start)}`);if(l===-1)throw new X(`Failed to find end index for decoration ${JSON.stringify(i.end)}`);let u=a.children.slice(c,l);if(!i.alwaysWrap&&u.length===a.children.length)o(a,i,`line`);else if(!i.alwaysWrap&&u.length===1&&u[0].type===`element`)o(u[0],i,`token`);else{let e={type:`element`,tagName:`span`,properties:{},children:u};o(e,i,`wrapper`),a.children.splice(c,u.length,e)}}function a(e,t){r[e]=o(r[e],t,`line`)}function o(e,t,n){let r=t.properties||{},i=t.transform||(e=>e);return e.tagName=t.tagName||`span`,e.properties={...e.properties,...r,class:e.properties.class},t.properties?.class&&jh(e,t.properties.class),e=i(e,n)||e,e}let s=[],c=n.decorations.sort((e,t)=>t.start.offset-e.start.offset||e.end.offset-t.end.offset);for(let e of c){let{start:t,end:n}=e;if(t.line===n.line)i(t.line,t.character,n.character,e);else if(t.line<n.line){i(t.line,t.character,1/0,e);for(let r=t.line+1;r<n.line;r++)s.unshift(()=>a(r,e));i(n.line,0,n.character,e)}}s.forEach(e=>e())}}}function Gh(e){for(let t=0;t<e.length;t++){let n=e[t];if(n.start.offset>n.end.offset)throw new X(`Invalid decoration range: ${JSON.stringify(n.start)} - ${JSON.stringify(n.end)}`);for(let r=t+1;r<e.length;r++){let t=e[r],i=n.start.offset<=t.start.offset&&t.start.offset<n.end.offset,a=n.start.offset<t.end.offset&&t.end.offset<=n.end.offset,o=t.start.offset<=n.start.offset&&n.start.offset<t.end.offset,s=t.start.offset<n.end.offset&&n.end.offset<=t.end.offset;if(i||a||o||s){if(i&&a||o&&s||o&&n.start.offset===n.end.offset||a&&t.start.offset===t.end.offset)continue;throw new X(`Decorations ${JSON.stringify(n.start)} and ${JSON.stringify(t.start)} intersect.`)}}}}function Kh(e){return e.type===`text`?e.value:e.type===`element`?e.children.map(Kh).join(``):``}var qh=[Wh()];function Jh(e){let t=Yh(e.transformers||[]);return[...t.pre,...t.normal,...t.post,...qh]}function Yh(e){let t=[],n=[],r=[];for(let i of e)switch(i.enforce){case`pre`:t.push(i);break;case`post`:n.push(i);break;default:r.push(i)}return{pre:t,post:n,normal:r}}var Xh=[`black`,`red`,`green`,`yellow`,`blue`,`magenta`,`cyan`,`white`,`brightBlack`,`brightRed`,`brightGreen`,`brightYellow`,`brightBlue`,`brightMagenta`,`brightCyan`,`brightWhite`],Zh={1:`bold`,2:`dim`,3:`italic`,4:`underline`,7:`reverse`,8:`hidden`,9:`strikethrough`};function Qh(e,t){let n=e.indexOf(`\x1B`,t);if(n!==-1&&e[n+1]===`[`){let t=e.indexOf(`m`,n);if(t!==-1)return{sequence:e.substring(n+2,t).split(`;`),startPosition:n,position:t+1}}return{position:e.length}}function $h(e){let t=e.shift();if(t===`2`){let t=e.splice(0,3).map(e=>Number.parseInt(e));return t.length!==3||t.some(e=>Number.isNaN(e))?void 0:{type:`rgb`,rgb:t}}else if(t===`5`){let t=e.shift();if(t)return{type:`table`,index:Number(t)}}}function eg(e){let t=[];for(;e.length>0;){let n=e.shift();if(!n)continue;let r=Number.parseInt(n);if(!Number.isNaN(r))if(r===0)t.push({type:`resetAll`});else if(r<=9)Zh[r]&&t.push({type:`setDecoration`,value:Zh[r]});else if(r<=29){let e=Zh[r-20];e&&(t.push({type:`resetDecoration`,value:e}),e===`dim`&&t.push({type:`resetDecoration`,value:`bold`}))}else if(r<=37)t.push({type:`setForegroundColor`,value:{type:`named`,name:Xh[r-30]}});else if(r===38){let n=$h(e);n&&t.push({type:`setForegroundColor`,value:n})}else if(r===39)t.push({type:`resetForegroundColor`});else if(r<=47)t.push({type:`setBackgroundColor`,value:{type:`named`,name:Xh[r-40]}});else if(r===48){let n=$h(e);n&&t.push({type:`setBackgroundColor`,value:n})}else r===49?t.push({type:`resetBackgroundColor`}):r===53?t.push({type:`setDecoration`,value:`overline`}):r===55?t.push({type:`resetDecoration`,value:`overline`}):r>=90&&r<=97?t.push({type:`setForegroundColor`,value:{type:`named`,name:Xh[r-90+8]}}):r>=100&&r<=107&&t.push({type:`setBackgroundColor`,value:{type:`named`,name:Xh[r-100+8]}})}return t}function tg(){let e=null,t=null,n=new Set;return{parse(r){let i=[],a=0;do{let o=Qh(r,a),s=o.sequence?r.substring(a,o.startPosition):r.substring(a);if(s.length>0&&i.push({value:s,foreground:e,background:t,decorations:new Set(n)}),o.sequence){let r=eg(o.sequence);for(let i of r)i.type===`resetAll`?(e=null,t=null,n.clear()):i.type===`resetForegroundColor`?e=null:i.type===`resetBackgroundColor`?t=null:i.type===`resetDecoration`&&n.delete(i.value);for(let i of r)i.type===`setForegroundColor`?e=i.value:i.type===`setBackgroundColor`?t=i.value:i.type===`setDecoration`&&n.add(i.value)}a=o.position}while(a<r.length);return i}}}var ng={black:`#000000`,red:`#bb0000`,green:`#00bb00`,yellow:`#bbbb00`,blue:`#0000bb`,magenta:`#ff00ff`,cyan:`#00bbbb`,white:`#eeeeee`,brightBlack:`#555555`,brightRed:`#ff5555`,brightGreen:`#00ff00`,brightYellow:`#ffff55`,brightBlue:`#5555ff`,brightMagenta:`#ff55ff`,brightCyan:`#55ffff`,brightWhite:`#ffffff`};function rg(e=ng){function t(t){return e[t]}function n(e){return`#${e.map(e=>Math.max(0,Math.min(e,255)).toString(16).padStart(2,`0`)).join(``)}`}let r;function i(){if(r)return r;r=[];for(let e=0;e<Xh.length;e++)r.push(t(Xh[e]));let e=[0,95,135,175,215,255];for(let t=0;t<6;t++)for(let i=0;i<6;i++)for(let a=0;a<6;a++)r.push(n([e[t],e[i],e[a]]));let i=8;for(let e=0;e<24;e++,i+=10)r.push(n([i,i,i]));return r}function a(e){return i()[e]}function o(e){switch(e.type){case`named`:return t(e.name);case`rgb`:return n(e.rgb);case`table`:return a(e.index)}}return{value:o}}var ig=/#([0-9a-f]{3,8})/i,ag=/var\((--[\w-]+-ansi-[\w-]+)\)/,og={black:`#000000`,red:`#cd3131`,green:`#0DBC79`,yellow:`#E5E510`,blue:`#2472C8`,magenta:`#BC3FBC`,cyan:`#11A8CD`,white:`#E5E5E5`,brightBlack:`#666666`,brightRed:`#F14C4C`,brightGreen:`#23D18B`,brightYellow:`#F5F543`,brightBlue:`#3B8EEA`,brightMagenta:`#D670D6`,brightCyan:`#29B8DB`,brightWhite:`#FFFFFF`};function sg(e,t,n){let r=Sp(e,n),i=jp(t),a=rg(Object.fromEntries(Xh.map(t=>{let n=`terminal.ansi${t[0].toUpperCase()}${t.substring(1)}`;return[t,e.colors?.[n]||og[t]]}))),o=tg();return i.map(t=>o.parse(t[0]).map(n=>{let i,o;n.decorations.has(`reverse`)?(i=n.background?a.value(n.background):e.bg,o=n.foreground?a.value(n.foreground):e.fg):(i=n.foreground?a.value(n.foreground):e.fg,o=n.background?a.value(n.background):void 0),i=Cp(i,r),o=Cp(o,r),n.decorations.has(`dim`)&&(i=cg(i));let s=af.None;return n.decorations.has(`bold`)&&(s|=af.Bold),n.decorations.has(`italic`)&&(s|=af.Italic),n.decorations.has(`underline`)&&(s|=af.Underline),n.decorations.has(`strikethrough`)&&(s|=af.Strikethrough),{content:n.value,offset:t[1],color:i,bgColor:o,fontStyle:s}}))}function cg(e){let t=e.match(ig);if(t){let e=t[1];if(e.length===8){let t=Math.round(Number.parseInt(e.slice(6,8),16)/2).toString(16).padStart(2,`0`);return`#${e.slice(0,6)}${t}`}else if(e.length===6)return`#${e}80`;else if(e.length===4){let t=e[0],n=e[1],r=e[2],i=e[3];return`#${t}${t}${n}${n}${r}${r}${Math.round(Number.parseInt(`${i}${i}`,16)/2).toString(16).padStart(2,`0`)}`}else if(e.length===3){let t=e[0],n=e[1],r=e[2];return`#${t}${t}${n}${n}${r}${r}80`}}let n=e.match(ag);return n?`var(${n[1]}-dim)`:e}function lg(e,t,n={}){let r=e.resolveLangAlias(n.lang||`text`),{theme:i=e.getLoadedThemes()[0]}=n;if(!Ep(r)&&!Op(i)&&r===`ansi`){let{theme:r}=e.setTheme(i);return sg(r,t,n)}return Qp(e,t,n)}function ug(e,t,n){let r,i,a,o,s,c;if(`themes`in n){let{defaultColor:l=`light`,cssVariablePrefix:u=`--shiki-`,colorsRendering:d=`css-vars`}=n,f=Object.entries(n.themes).filter(e=>e[1]).map(e=>({color:e[0],theme:e[1]})).sort((e,t)=>e.color===l?-1:+(t.color===l));if(f.length===0)throw new X("`themes` option must not be empty");let p=sm(e,t,n,lg);if(c=Kp(p),l&&l!==`light-dark()`&&!f.some(e=>e.color===l))throw new X(`\`themes\` option must contain the defaultColor key \`${l}\``);let m=f.map(t=>e.getTheme(t.theme)),h=f.map(e=>e.color);a=p.map(e=>e.map(e=>Vh(e,h,u,l,d))),c&&Gp(a,c);let g=f.map(e=>Sp(e.theme,n));i=dg(f,m,g,u,l,`fg`,d),r=dg(f,m,g,u,l,`bg`,d),o=`shiki-themes ${m.map(e=>e.name).join(` `)}`,s=l?void 0:[i,r].join(`;`)}else if(`theme`in n){let s=Sp(n.theme,n);a=lg(e,t,n);let l=e.getTheme(n.theme);r=Cp(l.bg,s),i=Cp(l.fg,s),o=l.name,c=Kp(a)}else throw new X("Invalid options, either `theme` or `themes` must be provided");return{tokens:a,fg:i,bg:r,themeName:o,rootStyle:s,grammarState:c}}function dg(e,t,n,r,i,a,o){return e.map((s,c)=>{let l=Cp(t[c][a],n[c])||`inherit`,u=`${r+s.color}${a===`bg`?`-bg`:``}:${l}`;if(c===0&&i){if(i===`light-dark()`&&e.length>1){let r=e.findIndex(e=>e.color===`light`),i=e.findIndex(e=>e.color===`dark`);if(r===-1||i===-1)throw new X('When using `defaultColor: "light-dark()"`, you must provide both `light` and `dark` themes');return`light-dark(${Cp(t[r][a],n[r])||`inherit`}, ${Cp(t[i][a],n[i])||`inherit`});${u}`}return l}return o===`css-vars`?u:null}).filter(e=>!!e).join(`;`)}var fg=/^\s+$/,pg=/^(\s*)(.*?)(\s*)$/;function mg(e,t,n,r={meta:{},options:n,codeToHast:(t,n)=>mg(e,t,n),codeToTokens:(t,n)=>ug(e,t,n)}){let i=t;for(let e of Jh(n))i=e.preprocess?.call(r,i,n)||i;let{tokens:a,fg:o,bg:s,themeName:c,rootStyle:l,grammarState:u}=ug(e,i,n),{mergeWhitespaces:d=!0,mergeSameStyleTokens:f=!1}=n;d===!0?a=gg(a):d===`never`&&(a=_g(a)),f&&(a=vg(a));let p={...r,get source(){return i}};for(let e of Jh(n))a=e.tokens?.call(p,a)||a;return hg(a,{...n,fg:o,bg:s,themeName:c,rootStyle:n.rootStyle===!1?!1:n.rootStyle??l},p,u)}function hg(e,t,n,r=Kp(e)){let i=Jh(t),a=[],o={type:`root`,children:[]},{structure:s=`classic`,tabindex:c=`0`}=t,l={class:`shiki ${t.themeName||``}`};t.rootStyle!==!1&&(t.rootStyle==null?l.style=`background-color:${t.bg};color:${t.fg}`:l.style=t.rootStyle),c!==!1&&c!=null&&(l.tabindex=c.toString());for(let[e,n]of Object.entries(t.meta||{}))e.startsWith(`_`)||(l[e]=n);let u={type:`element`,tagName:`pre`,properties:l,children:[],data:t.data},d={type:`element`,tagName:`code`,properties:{},children:a},f=[],p={...n,structure:s,addClassToHast:jh,get source(){return n.source},get tokens(){return e},get options(){return t},get root(){return o},get pre(){return u},get code(){return d},get lines(){return f}};if(e.forEach((e,t)=>{t&&(s===`inline`?o.children.push({type:`element`,tagName:`br`,properties:{},children:[]}):s===`classic`&&a.push({type:`text`,value:`
|
|
1310
|
+
`}));let n={type:`element`,tagName:`span`,properties:{class:`line`},children:[]},r=0;for(let a of e){let e={type:`element`,tagName:`span`,properties:{...a.htmlAttrs},children:[{type:`text`,value:a.content}]},c=Uh(a.htmlStyle||Hh(a));c&&(e.properties.style=c);for(let o of i)e=o?.span?.call(p,e,t+1,r,n,a)||e;s===`inline`?o.children.push(e):s===`classic`&&n.children.push(e),r+=a.content.length}if(s===`classic`){for(let e of i)n=e?.line?.call(p,n,t+1)||n;f.push(n),a.push(n)}else s===`inline`&&f.push(n)}),s===`classic`){for(let e of i)d=e?.code?.call(p,d)||d;u.children.push(d);for(let e of i)u=e?.pre?.call(p,u)||u;o.children.push(u)}else if(s===`inline`){let e=[],t={type:`element`,tagName:`span`,properties:{class:`line`},children:[]};for(let n of o.children)n.type===`element`&&n.tagName===`br`?(e.push(t),t={type:`element`,tagName:`span`,properties:{class:`line`},children:[]}):(n.type===`element`||n.type===`text`)&&t.children.push(n);e.push(t);let n={type:`element`,tagName:`code`,properties:{},children:e};for(let e of i)n=e?.code?.call(p,n)||n;o.children=[];for(let e=0;e<n.children.length;e++){e>0&&o.children.push({type:`element`,tagName:`br`,properties:{},children:[]});let t=n.children[e];t.type===`element`&&o.children.push(...t.children)}}let m=o;for(let e of i)m=e?.root?.call(p,m)||m;return r&&Gp(m,r),m}function gg(e){return e.map(e=>{let t=[],n=``,r;return e.forEach((i,a)=>{let o=!(i.fontStyle&&(i.fontStyle&af.Underline||i.fontStyle&af.Strikethrough));o&&fg.test(i.content)&&e[a+1]?(r===void 0&&(r=i.offset),n+=i.content):n?(o?t.push({...i,offset:r,content:n+i.content}):t.push({content:n,offset:r},i),r=void 0,n=``):t.push(i)}),t})}function _g(e){return e.map(e=>e.flatMap(e=>{if(fg.test(e.content))return e;let t=e.content.match(pg);if(!t)return e;let[,n,r,i]=t;if(!n&&!i)return e;let a=[{...e,offset:e.offset+n.length,content:r}];return n&&a.unshift({content:n,offset:e.offset}),i&&a.push({content:i,offset:e.offset+n.length+r.length}),a}))}function vg(e){return e.map(e=>{let t=[];for(let n of e){if(t.length===0){t.push({...n});continue}let e=t.at(-1),r=Uh(e.htmlStyle||Hh(e)),i=Uh(n.htmlStyle||Hh(n)),a=e.fontStyle&&(e.fontStyle&af.Underline||e.fontStyle&af.Strikethrough),o=n.fontStyle&&(n.fontStyle&af.Underline||n.fontStyle&af.Strikethrough);!a&&!o&&r===i?e.content+=n.content:t.push({...n})}return t})}var yg=Dh;function bg(e,t,n){let r={meta:{},options:n,codeToHast:(t,n)=>mg(e,t,n),codeToTokens:(t,n)=>ug(e,t,n)},i=yg(mg(e,t,n,r));for(let e of Jh(n))i=e.postprocess?.call(r,i,n)||i;return i}async function xg(e){let t=await Up(e);return{getLastGrammarState:(...e)=>$p(t,...e),codeToTokensBase:(e,n)=>lg(t,e,n),codeToTokensWithThemes:(e,n)=>sm(t,e,n),codeToTokens:(e,n)=>ug(t,e,n),codeToHast:(e,n)=>mg(t,e,n),codeToHtml:(e,n)=>bg(t,e,n),getBundledLanguages:()=>({}),getBundledThemes:()=>({}),...t,getInternalContext:()=>t}}function Sg(e){let t=e.langs,n=e.themes,r=e.engine;async function i(e){function i(n){if(typeof n==`string`){if(n=e.langAlias?.[n]||n,Dp(n))return[];let r=t[n];if(!r)throw new X(`Language \`${n}\` is not included in this bundle. You may want to load it from external source.`);return r}return n}function a(e){if(kp(e))return`none`;if(typeof e==`string`){let t=n[e];if(!t)throw new X(`Theme \`${e}\` is not included in this bundle. You may want to load it from external source.`);return t}return e}let o=(e.themes??[]).map(e=>a(e)),s=(e.langs??[]).map(e=>i(e)),c=await xg({engine:e.engine??r(),...e,themes:o,langs:s});return{...c,loadLanguage(...e){return c.loadLanguage(...e.map(i))},loadTheme(...e){return c.loadTheme(...e.map(a))},getBundledLanguages(){return t},getBundledThemes(){return n}}}return i}function Cg(e){let t;async function n(n={}){if(t){let e=await t;return await Promise.all([e.loadTheme(...n.themes||[]),e.loadLanguage(...n.langs||[])]),e}else{t=e({...n,themes:[],langs:[]});let r=await t;return await Promise.all([r.loadTheme(...n.themes||[]),r.loadLanguage(...n.langs||[])]),r}}return n}function wg(e,t){let n=Cg(e);async function r(e,r){let i=await n({langs:[r.lang],themes:`theme`in r?[r.theme]:Object.values(r.themes)}),a=await t?.guessEmbeddedLanguages?.(e,r.lang,i);return a&&await i.loadLanguage(...a),i}return{getSingletonHighlighter(e){return n(e)},async codeToHtml(e,t){return(await r(e,t)).codeToHtml(e,t)},async codeToHast(e,t){return(await r(e,t)).codeToHast(e,t)},async codeToTokens(e,t){return(await r(e,t)).codeToTokens(e,t)},async codeToTokensBase(e,t){return(await r(e,t)).codeToTokensBase(e,t)},async codeToTokensWithThemes(e,t){return(await r(e,t)).codeToTokensWithThemes(e,t)},async getLastGrammarState(e,t){return(await n({langs:[t.lang],themes:[t.theme]})).getLastGrammarState(e,t)}}}var Tg=Sg({langs:$u,themes:Ld,engine:()=>(0,Id.createOnigurumaEngine)(d(()=>import(`./wasm-BnjxR4X6.js`),[]))}),{codeToHtml:Eg,codeToHast:Dg,codeToTokens:Og,codeToTokensBase:kg,codeToTokensWithThemes:Ag,getSingletonHighlighter:jg,getLastGrammarState:Mg}=wg(Tg,{guessEmbeddedLanguages:Lh}),Ng=4294967295,Pg=class{patterns;options;regexps;constructor(e,t={}){this.patterns=e,this.options=t;let{forgiving:n=!1,cache:r,regexConstructor:i}=t;if(!i)throw Error("Option `regexConstructor` is not provided");this.regexps=e.map(e=>{if(typeof e!=`string`)return e;let t=r?.get(e);if(t){if(t instanceof RegExp)return t;if(n)return null;throw t}try{let t=i(e);return r?.set(e,t),t}catch(t){if(r?.set(e,t),n)return null;throw t}})}findNextMatchSync(e,t,n){let r=typeof e==`string`?e:e.content,i=[];function a(e,t,n=0){return{index:e,captureIndices:t.indices.map(e=>e==null?{start:Ng,end:Ng,length:0}:{start:e[0]+n,end:e[1]+n,length:e[1]-e[0]})}}for(let e=0;e<this.regexps.length;e++){let n=this.regexps[e];if(n)try{n.lastIndex=t;let o=n.exec(r);if(!o)continue;if(o.index===t)return a(e,o,0);i.push([e,o,0])}catch(e){if(this.options.forgiving)continue;throw e}}if(i.length){let e=Math.min(...i.map(e=>e[1].index));for(let[t,n,r]of i)if(n.index===e)return a(t,n,r)}return null}};function Fg(e){if([...e].length!==1)throw Error(`Expected "${e}" to be a single code point`);return e.codePointAt(0)}function Ig(e,t,n){return e.has(t)||e.set(t,n),e.get(t)}var Lg=new Set([`alnum`,`alpha`,`ascii`,`blank`,`cntrl`,`digit`,`graph`,`lower`,`print`,`punct`,`space`,`upper`,`word`,`xdigit`]),Rg=String.raw;function zg(e,t){if(e==null)throw Error(t??`Value expected`);return e}var Bg=Rg`\[\^?`,Vg=`c.? | C(?:-.?)?|${Rg`[pP]\{(?:\^?[-\x20_]*[A-Za-z][-\x20\w]*\})?`}|${Rg`x[89A-Fa-f]\p{AHex}(?:\\x[89A-Fa-f]\p{AHex})*`}|${Rg`u(?:\p{AHex}{4})? | x\{[^\}]*\}? | x\p{AHex}{0,2}`}|${Rg`o\{[^\}]*\}?`}|${Rg`\d{1,3}`}`,Hg=/[?*+][?+]?|\{(?:\d+(?:,\d*)?|,\d+)\}\??/,Ug=new RegExp(Rg`
|
|
1311
|
+
\\ (?:
|
|
1312
|
+
${Vg}
|
|
1313
|
+
| [gk]<[^>]*>?
|
|
1314
|
+
| [gk]'[^']*'?
|
|
1315
|
+
| .
|
|
1316
|
+
)
|
|
1317
|
+
| \( (?:
|
|
1318
|
+
\? (?:
|
|
1319
|
+
[:=!>({]
|
|
1320
|
+
| <[=!]
|
|
1321
|
+
| <[^>]*>
|
|
1322
|
+
| '[^']*'
|
|
1323
|
+
| ~\|?
|
|
1324
|
+
| #(?:[^)\\]|\\.?)*
|
|
1325
|
+
| [^:)]*[:)]
|
|
1326
|
+
)?
|
|
1327
|
+
| \*[^\)]*\)?
|
|
1328
|
+
)?
|
|
1329
|
+
| (?:${Hg.source})+
|
|
1330
|
+
| ${Bg}
|
|
1331
|
+
| .
|
|
1332
|
+
`.replace(/\s+/g,``),`gsu`),Wg=new RegExp(Rg`
|
|
1333
|
+
\\ (?:
|
|
1334
|
+
${Vg}
|
|
1335
|
+
| .
|
|
1336
|
+
)
|
|
1337
|
+
| \[:(?:\^?\p{Alpha}+|\^):\]
|
|
1338
|
+
| ${Bg}
|
|
1339
|
+
| &&
|
|
1340
|
+
| .
|
|
1341
|
+
`.replace(/\s+/g,``),`gsu`);function Gg(e,t={}){let n={flags:``,...t,rules:{captureGroup:!1,singleline:!1,...t.rules}};if(typeof e!=`string`)throw Error(`String expected as pattern`);let r=x_(n.flags),i=[r.extended],a={captureGroup:n.rules.captureGroup,getCurrentModX(){return i.at(-1)},numOpenGroups:0,popModX(){i.pop()},pushModX(e){i.push(e)},replaceCurrentModX(e){i[i.length-1]=e},singleline:n.rules.singleline},o=[],s;for(Ug.lastIndex=0;s=Ug.exec(e);){let t=Kg(a,e,s[0],Ug.lastIndex);t.tokens?o.push(...t.tokens):t.token&&o.push(t.token),t.lastIndex!==void 0&&(Ug.lastIndex=t.lastIndex)}let c=[],l=0;o.filter(e=>e.type===`GroupOpen`).forEach(e=>{e.kind===`capturing`?e.number=++l:e.raw===`(`&&c.push(e)}),l||c.forEach((e,t)=>{e.kind=`capturing`,e.number=t+1});let u=l||c.length;return{tokens:o.map(e=>e.type===`EscapedNumber`?C_(e,u):e).flat(),flags:r}}function Kg(e,t,n,r){let[i,a]=n;if(n===`[`||n===`[^`){let e=qg(t,n,r);return{tokens:e.tokens,lastIndex:e.lastIndex}}if(i===`\\`){if(`AbBGyYzZ`.includes(a))return{token:Zg(n,n)};if(/^\\g[<']/.test(n)){if(!/^\\g(?:<[^>]+>|'[^']+')$/.test(n))throw Error(`Invalid group name "${n}"`);return{token:d_(n)}}if(/^\\k[<']/.test(n)){if(!/^\\k(?:<[^>]+>|'[^']+')$/.test(n))throw Error(`Invalid group name "${n}"`);return{token:Qg(n)}}if(a===`K`)return{token:a_(`keep`,n)};if(a===`N`||a===`R`)return{token:i_(`newline`,n,{negate:a===`N`})};if(a===`O`)return{token:i_(`any`,n)};if(a===`X`)return{token:i_(`text_segment`,n)};let e=Yg(n,{inCharClass:!1});return Array.isArray(e)?{tokens:e}:{token:e}}if(i===`(`){if(a===`*`)return{token:g_(n)};if(n===`(?{`)throw Error(`Unsupported callout "${n}"`);if(n.startsWith(`(?#`)){if(t[r]!==`)`)throw Error(`Unclosed comment group "(?#"`);return{lastIndex:r+1}}if(/^\(\?[-imx]+[:)]$/.test(n))return{token:h_(n,e)};if(e.pushModX(e.getCurrentModX()),e.numOpenGroups++,n===`(`&&!e.captureGroup||n===`(?:`)return{token:c_(`group`,n)};if(n===`(?>`)return{token:c_(`atomic`,n)};if(n===`(?=`||n===`(?!`||n===`(?<=`||n===`(?<!`)return{token:c_(n[2]===`<`?`lookbehind`:`lookahead`,n,{negate:n.endsWith(`!`)})};if(n===`(`&&e.captureGroup||n.startsWith(`(?<`)&&n.endsWith(`>`)||n.startsWith(`(?'`)&&n.endsWith(`'`))return{token:c_(`capturing`,n,{...n!==`(`&&{name:n.slice(3,-1)}})};if(n.startsWith(`(?~`)){if(n===`(?~|`)throw Error(`Unsupported absence function kind "${n}"`);return{token:c_(`absence_repeater`,n)}}throw Error(n===`(?(`?`Unsupported conditional "${n}"`:`Invalid or unsupported group option "${n}"`)}if(n===`)`){if(e.popModX(),e.numOpenGroups--,e.numOpenGroups<0)throw Error(`Unmatched ")"`);return{token:s_(n)}}if(e.getCurrentModX()){if(n===`#`){let e=t.indexOf(`
|
|
1342
|
+
`,r);return{lastIndex:e===-1?t.length:e}}if(/^\s$/.test(n)){let e=/\s+/y;return e.lastIndex=r,{lastIndex:e.exec(t)?e.lastIndex:r}}}return n===`.`?{token:i_(`dot`,n)}:n===`^`||n===`$`?{token:Zg(e.singleline?{"^":Rg`\A`,$:Rg`\Z`}[n]:n,n)}:n===`|`?{token:Xg(n)}:Hg.test(n)?{tokens:w_(n)}:{token:$g(Fg(n),n)}}function qg(e,t,n){let r=[r_(t[1]===`^`,t)],i=1,a;for(Wg.lastIndex=n;a=Wg.exec(e);){let e=a[0];if(e[0]===`[`&&e[1]!==`:`)i++,r.push(r_(e[1]===`^`,e));else if(e===`]`){if(r.at(-1).type===`CharacterClassOpen`)r.push($g(93,e));else if(i--,r.push(e_(e)),!i)break}else{let t=Jg(e);Array.isArray(t)?r.push(...t):r.push(t)}}return{tokens:r,lastIndex:Wg.lastIndex||e.length}}function Jg(e){if(e[0]===`\\`)return Yg(e,{inCharClass:!0});if(e[0]===`[`){let t=/\[:(?<negate>\^?)(?<name>[a-z]+):\]/.exec(e);if(!t||!Lg.has(t.groups.name))throw Error(`Invalid POSIX class "${e}"`);return i_(`posix`,e,{value:t.groups.name,negate:!!t.groups.negate})}return e===`-`?t_(e):e===`&&`?n_(e):$g(Fg(e),e)}function Yg(e,{inCharClass:t}){let n=e[1];if(n===`c`||n===`C`)return m_(e);if(`dDhHsSwW`.includes(n))return v_(e);if(e.startsWith(Rg`\o{`))throw Error(`Incomplete, invalid, or unsupported octal code point "${e}"`);if(/^\\[pP]\{/.test(e)){if(e.length===3)throw Error(`Incomplete or invalid Unicode property "${e}"`);return y_(e)}if(/^\\x[89A-Fa-f]\p{AHex}/u.test(e))try{let t=e.split(/\\x/).slice(1).map(e=>parseInt(e,16)),n=new TextDecoder(`utf-8`,{ignoreBOM:!0,fatal:!0}).decode(new Uint8Array(t)),r=new TextEncoder;return[...n].map(e=>{let t=[...r.encode(e)].map(e=>`\\x${e.toString(16)}`).join(``);return $g(Fg(e),t)})}catch{throw Error(`Multibyte code "${e}" incomplete or invalid in Oniguruma`)}if(n===`u`||n===`x`)return $g(S_(e),e);if(p_.has(n))return $g(p_.get(n),e);if(/\d/.test(n))return o_(t,e);if(e===`\\`)throw Error(Rg`Incomplete escape "\"`);if(n===`M`)throw Error(`Unsupported meta "${e}"`);if([...e].length===2)return $g(e.codePointAt(1),e);throw Error(`Unexpected escape "${e}"`)}function Xg(e){return{type:`Alternator`,raw:e}}function Zg(e,t){return{type:`Assertion`,kind:e,raw:t}}function Qg(e){return{type:`Backreference`,raw:e}}function $g(e,t){return{type:`Character`,value:e,raw:t}}function e_(e){return{type:`CharacterClassClose`,raw:e}}function t_(e){return{type:`CharacterClassHyphen`,raw:e}}function n_(e){return{type:`CharacterClassIntersector`,raw:e}}function r_(e,t){return{type:`CharacterClassOpen`,negate:e,raw:t}}function i_(e,t,n={}){return{type:`CharacterSet`,kind:e,...n,raw:t}}function a_(e,t,n={}){return e===`keep`?{type:`Directive`,kind:e,raw:t}:{type:`Directive`,kind:e,flags:zg(n.flags),raw:t}}function o_(e,t){return{type:`EscapedNumber`,inCharClass:e,raw:t}}function s_(e){return{type:`GroupClose`,raw:e}}function c_(e,t,n={}){return{type:`GroupOpen`,kind:e,...n,raw:t}}function l_(e,t,n,r){return{type:`NamedCallout`,kind:e,tag:t,arguments:n,raw:r}}function u_(e,t,n,r){return{type:`Quantifier`,kind:e,min:t,max:n,raw:r}}function d_(e){return{type:`Subroutine`,raw:e}}var f_=new Set([`COUNT`,`CMP`,`ERROR`,`FAIL`,`MAX`,`MISMATCH`,`SKIP`,`TOTAL_COUNT`]),p_=new Map([[`a`,7],[`b`,8],[`e`,27],[`f`,12],[`n`,10],[`r`,13],[`t`,9],[`v`,11]]);function m_(e){let t=e[1]===`c`?e[2]:e[3];if(!t||!/[A-Za-z]/.test(t))throw Error(`Unsupported control character "${e}"`);return $g(Fg(t.toUpperCase())-64,e)}function h_(e,t){let{on:n,off:r}=/^\(\?(?<on>[imx]*)(?:-(?<off>[-imx]*))?/.exec(e).groups;r??=``;let i=(t.getCurrentModX()||n.includes(`x`))&&!r.includes(`x`),a=b_(n),o=b_(r),s={};if(a&&(s.enable=a),o&&(s.disable=o),e.endsWith(`)`))return t.replaceCurrentModX(i),a_(`flags`,e,{flags:s});if(e.endsWith(`:`))return t.pushModX(i),t.numOpenGroups++,c_(`group`,e,{...(a||o)&&{flags:s}});throw Error(`Unexpected flag modifier "${e}"`)}function g_(e){let t=/\(\*(?<name>[A-Za-z_]\w*)?(?:\[(?<tag>(?:[A-Za-z_]\w*)?)\])?(?:\{(?<args>[^}]*)\})?\)/.exec(e);if(!t)throw Error(`Incomplete or invalid named callout "${e}"`);let{name:n,tag:r,args:i}=t.groups;if(!n)throw Error(`Invalid named callout "${e}"`);if(r===``)throw Error(`Named callout tag with empty value not allowed "${e}"`);let a=i?i.split(`,`).filter(e=>e!==``).map(e=>/^[+-]?\d+$/.test(e)?+e:e):[],[o,s,c]=a,l=f_.has(n)?n.toLowerCase():`custom`;switch(l){case`fail`:case`mismatch`:case`skip`:if(a.length>0)throw Error(`Named callout arguments not allowed "${a}"`);break;case`error`:if(a.length>1)throw Error(`Named callout allows only one argument "${a}"`);if(typeof o==`string`)throw Error(`Named callout argument must be a number "${o}"`);break;case`max`:if(!a.length||a.length>2)throw Error(`Named callout must have one or two arguments "${a}"`);if(typeof o==`string`&&!/^[A-Za-z_]\w*$/.test(o))throw Error(`Named callout argument one must be a tag or number "${o}"`);if(a.length===2&&(typeof s==`number`||!/^[<>X]$/.test(s)))throw Error(`Named callout optional argument two must be '<', '>', or 'X' "${s}"`);break;case`count`:case`total_count`:if(a.length>1)throw Error(`Named callout allows only one argument "${a}"`);if(a.length===1&&(typeof o==`number`||!/^[<>X]$/.test(o)))throw Error(`Named callout optional argument must be '<', '>', or 'X' "${o}"`);break;case`cmp`:if(a.length!==3)throw Error(`Named callout must have three arguments "${a}"`);if(typeof o==`string`&&!/^[A-Za-z_]\w*$/.test(o))throw Error(`Named callout argument one must be a tag or number "${o}"`);if(typeof s==`number`||!/^(?:[<>!=]=|[<>])$/.test(s))throw Error(`Named callout argument two must be '==', '!=', '>', '<', '>=', or '<=' "${s}"`);if(typeof c==`string`&&!/^[A-Za-z_]\w*$/.test(c))throw Error(`Named callout argument three must be a tag or number "${c}"`);break;case`custom`:throw Error(`Undefined callout name "${n}"`);default:throw Error(`Unexpected named callout kind "${l}"`)}return l_(l,r??null,i?.split(`,`)??null,e)}function __(e){let t=null,n,r;if(e[0]===`{`){let{minStr:i,maxStr:a}=/^\{(?<minStr>\d*)(?:,(?<maxStr>\d*))?/.exec(e).groups,o=1e5;if(+i>o||a&&+a>o)throw Error(`Quantifier value unsupported in Oniguruma`);if(n=+i,r=a===void 0?+i:a===``?1/0:+a,n>r&&(t=`possessive`,[n,r]=[r,n]),e.endsWith(`?`)){if(t===`possessive`)throw Error(`Unsupported possessive interval quantifier chain with "?"`);t=`lazy`}else t||=`greedy`}else n=+(e[0]===`+`),r=e[0]===`?`?1:1/0,t=e[1]===`+`?`possessive`:e[1]===`?`?`lazy`:`greedy`;return u_(t,n,r,e)}function v_(e){let t=e[1].toLowerCase();return i_({d:`digit`,h:`hex`,s:`space`,w:`word`}[t],e,{negate:e[1]!==t})}function y_(e){let{p:t,neg:n,value:r}=/^\\(?<p>[pP])\{(?<neg>\^?)(?<value>[^}]+)/.exec(e).groups;return i_(`property`,e,{value:r,negate:t===`P`&&!n||t===`p`&&!!n})}function b_(e){let t={};return e.includes(`i`)&&(t.ignoreCase=!0),e.includes(`m`)&&(t.dotAll=!0),e.includes(`x`)&&(t.extended=!0),Object.keys(t).length?t:null}function x_(e){let t={ignoreCase:!1,dotAll:!1,extended:!1,digitIsAscii:!1,posixIsAscii:!1,spaceIsAscii:!1,wordIsAscii:!1,textSegmentMode:null};for(let n=0;n<e.length;n++){let r=e[n];if(!`imxDPSWy`.includes(r))throw Error(`Invalid flag "${r}"`);if(r===`y`){if(!/^y{[gw]}/.test(e.slice(n)))throw Error(`Invalid or unspecified flag "y" mode`);t.textSegmentMode=e[n+2]===`g`?`grapheme`:`word`,n+=3;continue}t[{i:`ignoreCase`,m:`dotAll`,x:`extended`,D:`digitIsAscii`,P:`posixIsAscii`,S:`spaceIsAscii`,W:`wordIsAscii`}[r]]=!0}return t}function S_(e){if(/^(?:\\u(?!\p{AHex}{4})|\\x(?!\p{AHex}{1,2}|\{\p{AHex}{1,8}\}))/u.test(e))throw Error(`Incomplete or invalid escape "${e}"`);let t=e[2]===`{`?/^\\x\{\s*(?<hex>\p{AHex}+)/u.exec(e).groups.hex:e.slice(2);return parseInt(t,16)}function C_(e,t){let{raw:n,inCharClass:r}=e,i=n.slice(1);if(!r&&(i!==`0`&&i.length===1||i[0]!==`0`&&+i<=t))return[Qg(n)];let a=[],o=i.match(/^[0-7]+|\d/g);for(let e=0;e<o.length;e++){let t=o[e],r;if(e===0&&t!==`8`&&t!==`9`){if(r=parseInt(t,8),r>127)throw Error(Rg`Octal encoded byte above 177 unsupported "${n}"`)}else r=Fg(t);a.push($g(r,(e===0?`\\`:``)+t))}return a}function w_(e){let t=[],n=new RegExp(Hg,`gy`),r;for(;r=n.exec(e);){let e=r[0];if(e[0]===`{`){let r=/^\{(?<min>\d+),(?<max>\d+)\}\??$/.exec(e);if(r){let{min:i,max:a}=r.groups;if(+i>+a&&e.endsWith(`?`)){n.lastIndex--,t.push(__(e.slice(0,-1)));continue}}}t.push(__(e))}return t}function T_(e,t){if(!Array.isArray(e.body))throw Error(`Expected node with body array`);if(e.body.length!==1)return!1;let n=e.body[0];return!t||Object.keys(t).every(e=>t[e]===n[e])}function E_(e){return D_.has(e.type)}var D_=new Set([`AbsenceFunction`,`Backreference`,`CapturingGroup`,`Character`,`CharacterClass`,`CharacterSet`,`Group`,`Quantifier`,`Subroutine`]);function O_(e,t={}){let n={flags:``,normalizeUnknownPropertyNames:!1,skipBackrefValidation:!1,skipLookbehindValidation:!1,skipPropertyNameValidation:!1,unicodePropertyMap:null,...t,rules:{captureGroup:!1,singleline:!1,...t.rules}},r=Gg(e,{flags:n.flags,rules:{captureGroup:n.rules.captureGroup,singleline:n.rules.singleline}}),i=(e,t)=>{let n=r.tokens[a.nextIndex];switch(a.parent=e,a.nextIndex++,n.type){case`Alternator`:return R_();case`Assertion`:return k_(n);case`Backreference`:return A_(n,a);case`Character`:return H_(n.value,{useLastValid:!!t.isCheckingRangeEnd});case`CharacterClassHyphen`:return j_(n,a,t);case`CharacterClassOpen`:return M_(n,a,t);case`CharacterSet`:return N_(n,a);case`Directive`:return K_(n.kind,{flags:n.flags});case`GroupOpen`:return P_(n,a,t);case`NamedCallout`:return X_(n.kind,n.tag,n.arguments);case`Quantifier`:return F_(n,a);case`Subroutine`:return I_(n,a);default:throw Error(`Unexpected token type "${n.type}"`)}},a={capturingGroups:[],hasNumberedRef:!1,namedGroupsByName:new Map,nextIndex:0,normalizeUnknownPropertyNames:n.normalizeUnknownPropertyNames,parent:null,skipBackrefValidation:n.skipBackrefValidation,skipLookbehindValidation:n.skipLookbehindValidation,skipPropertyNameValidation:n.skipPropertyNameValidation,subroutines:[],tokens:r.tokens,unicodePropertyMap:n.unicodePropertyMap,walk:i},o=$_(q_(r.flags)),s=o.body[0];for(;a.nextIndex<r.tokens.length;){let e=i(s,{});e.type===`Alternative`?(o.body.push(e),s=e):s.body.push(e)}let{capturingGroups:c,hasNumberedRef:l,namedGroupsByName:u,subroutines:d}=a;if(l&&u.size&&!n.rules.captureGroup)throw Error(`Numbered backref/subroutine not allowed when using named capture`);for(let{ref:e}of d)if(typeof e==`number`){if(e>c.length)throw Error(`Subroutine uses a group number that's not defined`);e&&(c[e-1].isSubroutined=!0)}else if(u.has(e)){if(u.get(e).length>1)throw Error(Rg`Subroutine uses a duplicate group name "\g<${e}>"`);u.get(e)[0].isSubroutined=!0}else throw Error(Rg`Subroutine uses a group name that's not defined "\g<${e}>"`);return o}function k_({kind:e}){return z_(zg({"^":`line_start`,$:`line_end`,"\\A":`string_start`,"\\b":`word_boundary`,"\\B":`word_boundary`,"\\G":`search_start`,"\\y":`text_segment_boundary`,"\\Y":`text_segment_boundary`,"\\z":`string_end`,"\\Z":`string_end_newline`}[e],`Unexpected assertion kind "${e}"`),{negate:e===Rg`\B`||e===Rg`\Y`})}function A_({raw:e},t){let n=/^\\k[<']/.test(e),r=n?e.slice(3,-1):e.slice(1),i=(n,r=!1)=>{let i=t.capturingGroups.length,a=!1;if(n>i)if(t.skipBackrefValidation)a=!0;else throw Error(`Not enough capturing groups defined to the left "${e}"`);return t.hasNumberedRef=!0,B_(r?i+1-n:n,{orphan:a})};if(n){let n=/^(?<sign>-?)0*(?<num>[1-9]\d*)$/.exec(r);if(n)return i(+n.groups.num,!!n.groups.sign);if(/[-+]/.test(r))throw Error(`Invalid backref name "${e}"`);if(!t.namedGroupsByName.has(r))throw Error(`Group name not defined to the left "${e}"`);return B_(r)}return i(+r)}function j_(e,t,n){let{tokens:r,walk:i}=t,a=t.parent,o=a.body.at(-1),s=r[t.nextIndex];if(!n.isCheckingRangeEnd&&o&&o.type!==`CharacterClass`&&o.type!==`CharacterClassRange`&&s&&s.type!==`CharacterClassOpen`&&s.type!==`CharacterClassClose`&&s.type!==`CharacterClassIntersector`){let e=i(a,{...n,isCheckingRangeEnd:!0});if(o.type===`Character`&&e.type===`Character`)return a.body.pop(),W_(o,e);throw Error(`Invalid character class range`)}return H_(Fg(`-`))}function M_({negate:e},t,n){let{tokens:r,walk:i}=t,a=[U_()],o=r[t.nextIndex],s=uv(o);for(;s.type!==`CharacterClassClose`;){if(s.type===`CharacterClassIntersector`)a.push(U_()),t.nextIndex++;else{let e=a.at(-1);e.body.push(i(e,n))}s=uv(r[t.nextIndex],o)}let c=U_({negate:e});return a.length===1?c.body=a[0].body:(c.kind=`intersection`,c.body=a.map(e=>e.body.length===1?e.body[0]:e)),t.nextIndex++,c}function N_({kind:e,negate:t,value:n},r){let{normalizeUnknownPropertyNames:i,skipPropertyNameValidation:a,unicodePropertyMap:o}=r;if(e===`property`){let r=lv(n);if(Lg.has(r)&&!o?.has(r))e=`posix`,n=r;else return tv(n,{negate:t,normalizeUnknownPropertyNames:i,skipPropertyNameValidation:a,unicodePropertyMap:o})}return e===`posix`?Z_(n,{negate:t}):G_(e,{negate:t})}function P_(e,t,n){let{tokens:r,capturingGroups:i,namedGroupsByName:a,skipLookbehindValidation:o,walk:s}=t,c=nv(e),l=c.type===`AbsenceFunction`,u=ov(c),d=u&&c.negate;if(c.type===`CapturingGroup`&&(i.push(c),c.name&&Ig(a,c.name,[]).push(c)),l&&n.isInAbsenceFunction)throw Error(`Nested absence function not supported by Oniguruma`);let f=dv(r[t.nextIndex]);for(;f.type!==`GroupClose`;){if(f.type===`Alternator`)c.body.push(R_()),t.nextIndex++;else{let e=c.body.at(-1),t=s(e,{...n,isInAbsenceFunction:n.isInAbsenceFunction||l,isInLookbehind:n.isInLookbehind||u,isInNegLookbehind:n.isInNegLookbehind||d});if(e.body.push(t),(u||n.isInLookbehind)&&!o){let e=`Lookbehind includes a pattern not allowed by Oniguruma`;if(d||n.isInNegLookbehind){if(av(t)||t.type===`CapturingGroup`)throw Error(e)}else if(av(t)||ov(t)&&t.negate)throw Error(e)}}f=dv(r[t.nextIndex])}return t.nextIndex++,c}function F_({kind:e,min:t,max:n},r){let i=r.parent,a=i.body.at(-1);if(!a||!E_(a))throw Error(`Quantifier requires a repeatable token`);let o=Q_(e,t,n,a);return i.body.pop(),o}function I_({raw:e},t){let{capturingGroups:n,subroutines:r}=t,i=e.slice(3,-1),a=/^(?<sign>[-+]?)0*(?<num>[1-9]\d*)$/.exec(i);if(a){let e=+a.groups.num,r=n.length;if(t.hasNumberedRef=!0,i={"":e,"+":r+e,"-":r+1-e}[a.groups.sign],i<1)throw Error(`Invalid subroutine number`)}else i===`0`&&(i=0);let o=ev(i);return r.push(o),o}function L_(e,t){if(e!==`repeater`)throw Error(`Unexpected absence function kind "${e}"`);return{type:`AbsenceFunction`,kind:e,body:rv(t?.body)}}function R_(e){return{type:`Alternative`,body:iv(e?.body)}}function z_(e,t){let n={type:`Assertion`,kind:e};return(e===`word_boundary`||e===`text_segment_boundary`)&&(n.negate=!!t?.negate),n}function B_(e,t){let n=!!t?.orphan;return{type:`Backreference`,ref:e,...n&&{orphan:n}}}function V_(e,t){let n={name:void 0,isSubroutined:!1,...t};if(n.name!==void 0&&!sv(n.name))throw Error(`Group name "${n.name}" invalid in Oniguruma`);return{type:`CapturingGroup`,number:e,...n.name&&{name:n.name},...n.isSubroutined&&{isSubroutined:n.isSubroutined},body:rv(t?.body)}}function H_(e,t){let n={useLastValid:!1,...t};if(e>1114111){let t=e.toString(16);if(n.useLastValid)e=1114111;else throw Error(e>1310719?`Invalid code point out of range "\\x{${t}}"`:`Invalid code point out of range in JS "\\x{${t}}"`)}return{type:`Character`,value:e}}function U_(e){let t={kind:`union`,negate:!1,...e};return{type:`CharacterClass`,kind:t.kind,negate:t.negate,body:iv(e?.body)}}function W_(e,t){if(t.value<e.value)throw Error(`Character class range out of order`);return{type:`CharacterClassRange`,min:e,max:t}}function G_(e,t){let n=!!t?.negate,r={type:`CharacterSet`,kind:e};return(e===`digit`||e===`hex`||e===`newline`||e===`space`||e===`word`)&&(r.negate=n),(e===`text_segment`||e===`newline`&&!n)&&(r.variableLength=!0),r}function K_(e,t={}){if(e===`keep`)return{type:`Directive`,kind:e};if(e===`flags`)return{type:`Directive`,kind:e,flags:zg(t.flags)};throw Error(`Unexpected directive kind "${e}"`)}function q_(e){return{type:`Flags`,...e}}function J_(e){let t=e?.atomic,n=e?.flags;if(t&&n)throw Error(`Atomic group cannot have flags`);return{type:`Group`,...t&&{atomic:t},...n&&{flags:n},body:rv(e?.body)}}function Y_(e){let t={behind:!1,negate:!1,...e};return{type:`LookaroundAssertion`,kind:t.behind?`lookbehind`:`lookahead`,negate:t.negate,body:rv(e?.body)}}function X_(e,t,n){return{type:`NamedCallout`,kind:e,tag:t,arguments:n}}function Z_(e,t){let n=!!t?.negate;if(!Lg.has(e))throw Error(`Invalid POSIX class "${e}"`);return{type:`CharacterSet`,kind:`posix`,value:e,negate:n}}function Q_(e,t,n,r){if(t>n)throw Error(`Invalid reversed quantifier range`);return{type:`Quantifier`,kind:e,min:t,max:n,body:r}}function $_(e,t){return{type:`Regex`,body:rv(t?.body),flags:e}}function ev(e){return{type:`Subroutine`,ref:e}}function tv(e,t){let n={negate:!1,normalizeUnknownPropertyNames:!1,skipPropertyNameValidation:!1,unicodePropertyMap:null,...t},r=n.unicodePropertyMap?.get(lv(e));if(!r){if(n.normalizeUnknownPropertyNames)r=cv(e);else if(n.unicodePropertyMap&&!n.skipPropertyNameValidation)throw Error(Rg`Invalid Unicode property "\p{${e}}"`)}return{type:`CharacterSet`,kind:`property`,value:r??e,negate:n.negate}}function nv({flags:e,kind:t,name:n,negate:r,number:i}){switch(t){case`absence_repeater`:return L_(`repeater`);case`atomic`:return J_({atomic:!0});case`capturing`:return V_(i,{name:n});case`group`:return J_({flags:e});case`lookahead`:case`lookbehind`:return Y_({behind:t===`lookbehind`,negate:r});default:throw Error(`Unexpected group kind "${t}"`)}}function rv(e){if(e===void 0)e=[R_()];else if(!Array.isArray(e)||!e.length||!e.every(e=>e.type===`Alternative`))throw Error(`Invalid body; expected array of one or more Alternative nodes`);return e}function iv(e){if(e===void 0)e=[];else if(!Array.isArray(e)||!e.every(e=>!!e.type))throw Error(`Invalid body; expected array of nodes`);return e}function av(e){return e.type===`LookaroundAssertion`&&e.kind===`lookahead`}function ov(e){return e.type===`LookaroundAssertion`&&e.kind===`lookbehind`}function sv(e){return/^[\p{Alpha}\p{Pc}][^)]*$/u.test(e)}function cv(e){return e.trim().replace(/[- _]+/g,`_`).replace(/[A-Z][a-z]+(?=[A-Z])/g,`$&_`).replace(/[A-Za-z]+/g,e=>e[0].toUpperCase()+e.slice(1).toLowerCase())}function lv(e){return e.replace(/[- _]+/g,``).toLowerCase()}function uv(e,t){let n=t;return zg(e,`Unclosed character class${n?.type===`Character`&&n.value===93&&n.raw===`]`?` (started with "]")`:``}`)}function dv(e){return zg(e,`Unclosed group`)}function fv(e,t,n=null){function r(e,t){for(let n=0;n<e.length;n++){let r=i(e[n],t,n,e);n=Math.max(-1,n+r)}}function i(a,o=null,s=null,c=null){let l=0,u=!1,d={node:a,parent:o,key:s,container:c,root:e,remove(){pv(c).splice(Math.max(0,mv(s)+l),1),l--,u=!0},removeAllNextSiblings(){return pv(c).splice(mv(s)+1)},removeAllPrevSiblings(){let e=mv(s)+l;return l-=e,pv(c).splice(0,Math.max(0,e))},replaceWith(e,t={}){let n=!!t.traverse;c?c[Math.max(0,mv(s)+l)]=e:zg(o,`Can't replace root node`)[s]=e,n&&i(e,o,s,c),u=!0},replaceWithMultiple(e,t={}){let n=!!t.traverse;if(pv(c).splice(Math.max(0,mv(s)+l),1,...e),l+=e.length-1,n){let t=0;for(let n=0;n<e.length;n++)t+=i(e[n],o,mv(s)+n+t,c)}u=!0},skip(){u=!0}},{type:f}=a,p=t[`*`],m=t[f],h=typeof p==`function`?p:p?.enter,g=typeof m==`function`?m:m?.enter;if(h?.(d,n),g?.(d,n),!u)switch(f){case`AbsenceFunction`:case`Alternative`:case`CapturingGroup`:case`CharacterClass`:case`Group`:case`LookaroundAssertion`:r(a.body,a);break;case`Assertion`:case`Backreference`:case`Character`:case`CharacterSet`:case`Directive`:case`Flags`:case`NamedCallout`:case`Subroutine`:break;case`CharacterClassRange`:i(a.min,a,`min`),i(a.max,a,`max`);break;case`Quantifier`:i(a.body,a,`body`);break;case`Regex`:r(a.body,a),i(a.flags,a,`flags`);break;default:throw Error(`Unexpected node type "${f}"`)}return m?.exit?.(d,n),p?.exit?.(d,n),l}return i(e),e}function pv(e){if(!Array.isArray(e))throw Error(`Container expected`);return e}function mv(e){if(typeof e!=`number`)throw Error(`Numeric key expected`);return e}var hv=String.raw`\(\?(?:[:=!>A-Za-z\-]|<[=!]|\(DEFINE\))`;function gv(e,t){for(let n=0;n<e.length;n++)e[n]>=t&&e[n]++}function _v(e,t,n,r){return e.slice(0,t)+r+e.slice(t+n.length)}var vv=Object.freeze({DEFAULT:`DEFAULT`,CHAR_CLASS:`CHAR_CLASS`});function yv(e,t,n,r){let i=new RegExp(String.raw`${t}|(?<$skip>\[\^?|\\?.)`,`gsu`),a=[!1],o=0,s=``;for(let t of e.matchAll(i)){let{0:e,groups:{$skip:i}}=t;if(!i&&(!r||r===vv.DEFAULT==!o)){n instanceof Function?s+=n(t,{context:o?vv.CHAR_CLASS:vv.DEFAULT,negated:a[a.length-1]}):s+=n;continue}e[0]===`[`?(o++,a.push(e[1]===`^`)):e===`]`&&o&&(o--,a.pop()),s+=e}return s}function bv(e,t,n,r){yv(e,t,n,r)}function xv(e,t,n=0,r){if(!new RegExp(t,`su`).test(e))return null;let i=RegExp(`${t}|(?<$skip>\\\\?.)`,`gsu`);i.lastIndex=n;let a=0,o;for(;o=i.exec(e);){let{0:e,groups:{$skip:t}}=o;if(!t&&(!r||r===vv.DEFAULT==!a))return o;e===`[`?a++:e===`]`&&a&&a--,i.lastIndex==o.index&&i.lastIndex++}return null}function Sv(e,t,n){return!!xv(e,t,0,n)}function Cv(e,t){let n=/\\?./gsu;n.lastIndex=t;let r=e.length,i=0,a=1,o;for(;o=n.exec(e);){let[e]=o;if(e===`[`)i++;else if(i)e===`]`&&i--;else if(e===`(`)a++;else if(e===`)`&&(a--,!a)){r=o.index;break}}return e.slice(t,r)}var wv=new RegExp(String.raw`(?<noncapturingStart>${hv})|(?<capturingStart>\((?:\?<[^>]+>)?)|\\?.`,`gsu`);function Tv(e,t){let n=t?.hiddenCaptures??[],r=t?.captureTransfers??new Map;if(!/\(\?>/.test(e))return{pattern:e,captureTransfers:r,hiddenCaptures:n};let i=[0],a=[],o=0,s=0,c=NaN,l;do{l=!1;let t=0,u=0,d=!1,f;for(wv.lastIndex=Number.isNaN(c)?0:c+7;f=wv.exec(e);){let{0:p,index:m,groups:{capturingStart:h,noncapturingStart:g}}=f;if(p===`[`)t++;else if(t)p===`]`&&t--;else if(p===`(?>`&&!d)c=m,d=!0;else if(d&&g)u++;else if(h)d?u++:(o++,i.push(o+s));else if(p===`)`&&d){if(!u){s++;let t=o+s;if(e=`${e.slice(0,c)}(?:(?=(${e.slice(c+3,m)}))<$$${t}>)${e.slice(m+1)}`,l=!0,a.push(t),gv(n,t),r.size){let e=new Map;r.forEach((n,r)=>{e.set(r>=t?r+1:r,n.map(e=>e>=t?e+1:e))}),r=e}break}u--}}}while(l);return n.push(...a),e=yv(e,String.raw`\\(?<backrefNum>[1-9]\d*)|<\$\$(?<wrappedBackrefNum>\d+)>`,({0:e,groups:{backrefNum:t,wrappedBackrefNum:n}})=>{if(t){let n=+t;if(n>i.length-1)throw Error(`Backref "${e}" greater than number of captures`);return`\\${i[n]}`}return`\\${n}`},vv.DEFAULT),{pattern:e,captureTransfers:r,hiddenCaptures:n}}var Ev=String.raw`(?:[?*+]|\{\d+(?:,\d*)?\})`,Dv=new RegExp(String.raw`
|
|
1343
|
+
\\(?: \d+
|
|
1344
|
+
| c[A-Za-z]
|
|
1345
|
+
| [gk]<[^>]+>
|
|
1346
|
+
| [pPu]\{[^\}]+\}
|
|
1347
|
+
| u[A-Fa-f\d]{4}
|
|
1348
|
+
| x[A-Fa-f\d]{2}
|
|
1349
|
+
)
|
|
1350
|
+
| \((?: \? (?: [:=!>]
|
|
1351
|
+
| <(?:[=!]|[^>]+>)
|
|
1352
|
+
| [A-Za-z\-]+:
|
|
1353
|
+
| \(DEFINE\)
|
|
1354
|
+
))?
|
|
1355
|
+
| (?<qBase>${Ev})(?<qMod>[?+]?)(?<invalidQ>[?*+\{]?)
|
|
1356
|
+
| \\?.
|
|
1357
|
+
`.replace(/\s+/g,``),`gsu`);function Ov(e){if(!RegExp(`${Ev}\\+`).test(e))return{pattern:e};let t=[],n=null,r=null,i=``,a=0,o;for(Dv.lastIndex=0;o=Dv.exec(e);){let{0:s,index:c,groups:{qBase:l,qMod:u,invalidQ:d}}=o;if(s===`[`)a||(r=c),a++;else if(s===`]`)a?a--:r=null;else if(!a)if(u===`+`&&i&&!i.startsWith(`(`)){if(d)throw Error(`Invalid quantifier "${s}"`);let t=-1;if(/^\{\d+\}$/.test(l))e=_v(e,c+l.length,u,``);else{if(i===`)`||i===`]`){let t=i===`)`?n:r;if(t===null)throw Error(`Invalid unmatched "${i}"`);e=`${e.slice(0,t)}(?>${e.slice(t,c)}${l})${e.slice(c+s.length)}`}else e=`${e.slice(0,c-i.length)}(?>${i}${l})${e.slice(c+s.length)}`;t+=4}Dv.lastIndex+=t}else s[0]===`(`?t.push(c):s===`)`&&(n=t.length?t.pop():null);i=s}return{pattern:e}}var kv=String.raw,Av=kv`\(\?R=(?<rDepth>[^\)]+)\)|${kv`\\g<(?<gRNameOrNum>[^>&]+)&R=(?<gRDepth>[^>]+)>`}`,jv=kv`\(\?<(?![=!])(?<captureName>[^>]+)>`,Mv=kv`${jv}|(?<unnamed>\()(?!\?)`,Nv=new RegExp(kv`${jv}|${Av}|\(\?|\\?.`,`gsu`),Pv=`Cannot use multiple overlapping recursions`;function Fv(e,t){let{hiddenCaptures:n,mode:r}={hiddenCaptures:[],mode:`plugin`,...t},i=t?.captureTransfers??new Map;if(!new RegExp(Av,`su`).test(e))return{pattern:e,captureTransfers:i,hiddenCaptures:n};if(r===`plugin`&&Sv(e,kv`\(\?\(DEFINE\)`,vv.DEFAULT))throw Error(`DEFINE groups cannot be used with recursion`);let a=[],o=Sv(e,kv`\\[1-9]`,vv.DEFAULT),s=new Map,c=[],l=!1,u=0,d=0,f;for(Nv.lastIndex=0;f=Nv.exec(e);){let{0:t,groups:{captureName:p,rDepth:m,gRNameOrNum:h,gRDepth:g}}=f;if(t===`[`)u++;else if(u)t===`]`&&u--;else if(m){if(Iv(m),l)throw Error(Pv);if(o)throw Error(`${r===`external`?`Backrefs`:`Numbered backrefs`} cannot be used with global recursion`);let t=e.slice(0,f.index),s=e.slice(Nv.lastIndex);if(Sv(s,Av,vv.DEFAULT))throw Error(Pv);let c=m-1;e=Lv(t,s,c,!1,n,a,d),i=Bv(i,t,c,a.length,0,d);break}else if(h){Iv(g);let u=!1;for(let e of c)if(e.name===h||e.num===+h){if(u=!0,e.hasRecursedWithin)throw Error(Pv);break}if(!u)throw Error(kv`Recursive \g cannot be used outside the referenced group "${r===`external`?h:kv`\g<${h}&R=${g}>`}"`);let p=s.get(h),m=Cv(e,p);if(o&&Sv(m,kv`${jv}|\((?!\?)`,vv.DEFAULT))throw Error(`${r===`external`?`Backrefs`:`Numbered backrefs`} cannot be used with recursion of capturing groups`);let _=e.slice(p,f.index),v=m.slice(_.length+t.length),y=a.length,b=g-1,x=Lv(_,v,b,!0,n,a,d);i=Bv(i,_,b,a.length-y,y,d),e=`${e.slice(0,p)}${x}${e.slice(p+m.length)}`,Nv.lastIndex+=x.length-t.length-_.length-v.length,c.forEach(e=>e.hasRecursedWithin=!0),l=!0}else if(p)d++,s.set(String(d),Nv.lastIndex),s.set(p,Nv.lastIndex),c.push({num:d,name:p});else if(t[0]===`(`){let e=t===`(`;e&&(d++,s.set(String(d),Nv.lastIndex)),c.push(e?{num:d}:{})}else t===`)`&&c.pop()}return n.push(...a),{pattern:e,captureTransfers:i,hiddenCaptures:n}}function Iv(e){let t=`Max depth must be integer between 2 and 100; used ${e}`;if(!/^[1-9]\d*$/.test(e)||(e=+e,e<2||e>100))throw Error(t)}function Lv(e,t,n,r,i,a,o){let s=new Set;r&&bv(e+t,jv,({groups:{captureName:e}})=>{s.add(e)},vv.DEFAULT);let c=[n,r?s:null,i,a,o];return`${e}${Rv(`(?:${e}`,`forward`,...c)}(?:)${Rv(`${t})`,`backward`,...c)}${t}`}function Rv(e,t,n,r,i,a,o){let s=e=>t===`forward`?e+2:n-e+2-1,c=``;for(let t=0;t<n;t++){let n=s(t);c+=yv(e,kv`${Mv}|\\k<(?<backref>[^>]+)>`,({0:e,groups:{captureName:t,unnamed:s,backref:c}})=>{if(c&&r&&!r.has(c))return e;let l=`_$${n}`;if(s||t){let n=o+a.length+1;return a.push(n),zv(i,n),s?e:`(?<${t}${l}>`}return kv`\k<${c}${l}>`},vv.DEFAULT)}return c}function zv(e,t){for(let n=0;n<e.length;n++)e[n]>=t&&e[n]++}function Bv(e,t,n,r,i,a){if(e.size&&r){let o=0;bv(t,Mv,()=>o++,vv.DEFAULT);let s=a-o+i,c=new Map;return e.forEach((e,t)=>{let i=(r-o*n)/n,a=o*n,l=t>s+o?t+r:t,u=[];for(let t of e)if(t<=s)u.push(t);else if(t>s+o+i)u.push(t+r);else if(t<=s+o)for(let e=0;e<=n;e++)u.push(t+o*e);else for(let e=0;e<=n;e++)u.push(t+a+i*e);c.set(l,u)}),c}return e}var Vv=String.fromCodePoint,Z=String.raw,Hv={},Uv=globalThis.RegExp;Hv.flagGroups=(()=>{try{new Uv(`(?i:)`)}catch{return!1}return!0})(),Hv.unicodeSets=(()=>{try{new Uv(`[[]]`,`v`)}catch{return!1}return!0})(),Hv.bugFlagVLiteralHyphenIsRange=Hv.unicodeSets?(()=>{try{new Uv(Z`[\d\-a]`,`v`)}catch{return!0}return!1})():!1,Hv.bugNestedClassIgnoresNegation=Hv.unicodeSets&&new Uv(`[[^a]]`,`v`).test(`a`);function Wv(e,{enable:t,disable:n}){return{dotAll:!n?.dotAll&&!!(t?.dotAll||e.dotAll),ignoreCase:!n?.ignoreCase&&!!(t?.ignoreCase||e.ignoreCase)}}function Gv(e,t,n){return e.has(t)||e.set(t,n),e.get(t)}function Kv(e,t){return Jv[e]>=Jv[t]}function qv(e,t){if(e==null)throw Error(t??`Value expected`);return e}var Jv={ES2025:2025,ES2024:2024,ES2018:2018},Yv={auto:`auto`,ES2025:`ES2025`,ES2024:`ES2024`,ES2018:`ES2018`};function Xv(e={}){if({}.toString.call(e)!==`[object Object]`)throw Error(`Unexpected options`);if(e.target!==void 0&&!Yv[e.target])throw Error(`Unexpected target "${e.target}"`);let t={accuracy:`default`,avoidSubclass:!1,flags:``,global:!1,hasIndices:!1,lazyCompileLength:1/0,target:`auto`,verbose:!1,...e,rules:{allowOrphanBackrefs:!1,asciiWordBoundaries:!1,captureGroup:!1,recursionLimit:20,singleline:!1,...e.rules}};return t.target===`auto`&&(t.target=Hv.flagGroups?`ES2025`:Hv.unicodeSets?`ES2024`:`ES2018`),t}var Zv=`[ -\r ]`,Qv=new Set([Vv(304),Vv(305)]),$v=Z`[\p{L}\p{M}\p{N}\p{Pc}]`;function ey(e){if(Qv.has(e))return[e];let t=new Set,n=e.toLowerCase(),r=n.toUpperCase(),i=iy.get(n),a=ny.get(n),o=ry.get(n);return[...r].length===1&&t.add(r),o&&t.add(o),i&&t.add(i),t.add(n),a&&t.add(a),[...t]}var ty=new Map(`C Other
|
|
1358
|
+
Cc Control cntrl
|
|
1359
|
+
Cf Format
|
|
1360
|
+
Cn Unassigned
|
|
1361
|
+
Co Private_Use
|
|
1362
|
+
Cs Surrogate
|
|
1363
|
+
L Letter
|
|
1364
|
+
LC Cased_Letter
|
|
1365
|
+
Ll Lowercase_Letter
|
|
1366
|
+
Lm Modifier_Letter
|
|
1367
|
+
Lo Other_Letter
|
|
1368
|
+
Lt Titlecase_Letter
|
|
1369
|
+
Lu Uppercase_Letter
|
|
1370
|
+
M Mark Combining_Mark
|
|
1371
|
+
Mc Spacing_Mark
|
|
1372
|
+
Me Enclosing_Mark
|
|
1373
|
+
Mn Nonspacing_Mark
|
|
1374
|
+
N Number
|
|
1375
|
+
Nd Decimal_Number digit
|
|
1376
|
+
Nl Letter_Number
|
|
1377
|
+
No Other_Number
|
|
1378
|
+
P Punctuation punct
|
|
1379
|
+
Pc Connector_Punctuation
|
|
1380
|
+
Pd Dash_Punctuation
|
|
1381
|
+
Pe Close_Punctuation
|
|
1382
|
+
Pf Final_Punctuation
|
|
1383
|
+
Pi Initial_Punctuation
|
|
1384
|
+
Po Other_Punctuation
|
|
1385
|
+
Ps Open_Punctuation
|
|
1386
|
+
S Symbol
|
|
1387
|
+
Sc Currency_Symbol
|
|
1388
|
+
Sk Modifier_Symbol
|
|
1389
|
+
Sm Math_Symbol
|
|
1390
|
+
So Other_Symbol
|
|
1391
|
+
Z Separator
|
|
1392
|
+
Zl Line_Separator
|
|
1393
|
+
Zp Paragraph_Separator
|
|
1394
|
+
Zs Space_Separator
|
|
1395
|
+
ASCII
|
|
1396
|
+
ASCII_Hex_Digit AHex
|
|
1397
|
+
Alphabetic Alpha
|
|
1398
|
+
Any
|
|
1399
|
+
Assigned
|
|
1400
|
+
Bidi_Control Bidi_C
|
|
1401
|
+
Bidi_Mirrored Bidi_M
|
|
1402
|
+
Case_Ignorable CI
|
|
1403
|
+
Cased
|
|
1404
|
+
Changes_When_Casefolded CWCF
|
|
1405
|
+
Changes_When_Casemapped CWCM
|
|
1406
|
+
Changes_When_Lowercased CWL
|
|
1407
|
+
Changes_When_NFKC_Casefolded CWKCF
|
|
1408
|
+
Changes_When_Titlecased CWT
|
|
1409
|
+
Changes_When_Uppercased CWU
|
|
1410
|
+
Dash
|
|
1411
|
+
Default_Ignorable_Code_Point DI
|
|
1412
|
+
Deprecated Dep
|
|
1413
|
+
Diacritic Dia
|
|
1414
|
+
Emoji
|
|
1415
|
+
Emoji_Component EComp
|
|
1416
|
+
Emoji_Modifier EMod
|
|
1417
|
+
Emoji_Modifier_Base EBase
|
|
1418
|
+
Emoji_Presentation EPres
|
|
1419
|
+
Extended_Pictographic ExtPict
|
|
1420
|
+
Extender Ext
|
|
1421
|
+
Grapheme_Base Gr_Base
|
|
1422
|
+
Grapheme_Extend Gr_Ext
|
|
1423
|
+
Hex_Digit Hex
|
|
1424
|
+
IDS_Binary_Operator IDSB
|
|
1425
|
+
IDS_Trinary_Operator IDST
|
|
1426
|
+
ID_Continue IDC
|
|
1427
|
+
ID_Start IDS
|
|
1428
|
+
Ideographic Ideo
|
|
1429
|
+
Join_Control Join_C
|
|
1430
|
+
Logical_Order_Exception LOE
|
|
1431
|
+
Lowercase Lower
|
|
1432
|
+
Math
|
|
1433
|
+
Noncharacter_Code_Point NChar
|
|
1434
|
+
Pattern_Syntax Pat_Syn
|
|
1435
|
+
Pattern_White_Space Pat_WS
|
|
1436
|
+
Quotation_Mark QMark
|
|
1437
|
+
Radical
|
|
1438
|
+
Regional_Indicator RI
|
|
1439
|
+
Sentence_Terminal STerm
|
|
1440
|
+
Soft_Dotted SD
|
|
1441
|
+
Terminal_Punctuation Term
|
|
1442
|
+
Unified_Ideograph UIdeo
|
|
1443
|
+
Uppercase Upper
|
|
1444
|
+
Variation_Selector VS
|
|
1445
|
+
White_Space space
|
|
1446
|
+
XID_Continue XIDC
|
|
1447
|
+
XID_Start XIDS`.split(/\s/).map(e=>[lv(e),e])),ny=new Map([[`s`,Vv(383)],[Vv(383),`s`]]),ry=new Map([[Vv(223),Vv(7838)],[Vv(107),Vv(8490)],[Vv(229),Vv(8491)],[Vv(969),Vv(8486)]]),iy=new Map([sy(453),sy(456),sy(459),sy(498),...cy(8072,8079),...cy(8088,8095),...cy(8104,8111),sy(8124),sy(8140),sy(8188)]),ay=new Map([[`alnum`,Z`[\p{Alpha}\p{Nd}]`],[`alpha`,Z`\p{Alpha}`],[`ascii`,Z`\p{ASCII}`],[`blank`,Z`[\p{Zs}\t]`],[`cntrl`,Z`\p{Cc}`],[`digit`,Z`\p{Nd}`],[`graph`,Z`[\P{space}&&\P{Cc}&&\P{Cn}&&\P{Cs}]`],[`lower`,Z`\p{Lower}`],[`print`,Z`[[\P{space}&&\P{Cc}&&\P{Cn}&&\P{Cs}]\p{Zs}]`],[`punct`,Z`[\p{P}\p{S}]`],[`space`,Z`\p{space}`],[`upper`,Z`\p{Upper}`],[`word`,Z`[\p{Alpha}\p{M}\p{Nd}\p{Pc}]`],[`xdigit`,Z`\p{AHex}`]]);function oy(e,t){let n=[];for(let r=e;r<=t;r++)n.push(r);return n}function sy(e){let t=Vv(e);return[t.toLowerCase(),t]}function cy(e,t){return oy(e,t).map(e=>sy(e))}var ly=new Set([`Lower`,`Lowercase`,`Upper`,`Uppercase`,`Ll`,`Lowercase_Letter`,`Lt`,`Titlecase_Letter`,`Lu`,`Uppercase_Letter`]);function uy(e,t){let n={accuracy:`default`,asciiWordBoundaries:!1,avoidSubclass:!1,bestEffortTarget:`ES2025`,...t};my(e);let r={accuracy:n.accuracy,asciiWordBoundaries:n.asciiWordBoundaries,avoidSubclass:n.avoidSubclass,flagDirectivesByAlt:new Map,jsGroupNameMap:new Map,minTargetEs2024:Kv(n.bestEffortTarget,`ES2024`),passedLookbehind:!1,strategy:null,subroutineRefMap:new Map,supportedGNodes:new Set,digitIsAscii:e.flags.digitIsAscii,spaceIsAscii:e.flags.spaceIsAscii,wordIsAscii:e.flags.wordIsAscii};fv(e,dy,r);let i={dotAll:e.flags.dotAll,ignoreCase:e.flags.ignoreCase},a={currentFlags:i,prevFlags:null,globalFlags:i,groupOriginByCopy:new Map,groupsByName:new Map,multiplexCapturesToLeftByRef:new Map,openRefs:new Map,reffedNodesByReferencer:new Map,subroutineRefMap:r.subroutineRefMap};return fv(e,fy,a),fv(e,py,{groupsByName:a.groupsByName,highestOrphanBackref:0,numCapturesToLeft:0,reffedNodesByReferencer:a.reffedNodesByReferencer}),e._originMap=a.groupOriginByCopy,e._strategy=r.strategy,e}var dy={AbsenceFunction({node:e,parent:t,replaceWith:n}){let{body:r,kind:i}=e;if(i===`repeater`){let e=J_();e.body[0].body.push(Y_({negate:!0,body:r}),tv(`Any`));let i=J_();i.body[0].body.push(Q_(`greedy`,0,1/0,e)),n(Q(i,t),{traverse:!0})}else throw Error(`Unsupported absence function "(?~|"`)},Alternative:{enter({node:e,parent:t,key:n},{flagDirectivesByAlt:r}){let i=e.body.filter(e=>e.kind===`flags`);for(let e=n+1;e<t.body.length;e++){let n=t.body[e];Gv(r,n,[]).push(...i)}},exit({node:e},{flagDirectivesByAlt:t}){if(t.get(e)?.length){let n=xy(t.get(e));if(n){let t=J_({flags:n});t.body[0].body=e.body,e.body=[Q(t,e)]}}}},Assertion({node:e,parent:t,key:n,container:r,root:i,remove:a,replaceWith:o},s){let{kind:c,negate:l}=e,{asciiWordBoundaries:u,avoidSubclass:d,supportedGNodes:f,wordIsAscii:p}=s;if(c===`text_segment_boundary`)throw Error(`Unsupported text segment boundary "\\${l?`Y`:`y`}"`);if(c===`line_end`)o(Q(Y_({body:[R_({body:[z_(`string_end`)]}),R_({body:[H_(10)]})]}),t));else if(c===`line_start`)o(Q(Ay(Z`(?<=\A|\n(?!\z))`,{skipLookbehindValidation:!0}),t));else if(c===`search_start`)if(f.has(e))i.flags.sticky=!0,a();else{let e=r[n-1];if(e&&Dy(e))o(Q(Y_({negate:!0}),t));else if(d)throw Error(Z`Uses "\G" in a way that requires a subclass`);else o(My(z_(`string_start`),t)),s.strategy=`clip_search`}else if(!(c===`string_end`||c===`string_start`))if(c===`string_end_newline`)o(Q(Ay(Z`(?=\n?\z)`),t));else if(c===`word_boundary`){if(!p&&!u){let e=`(?:(?<=${$v})(?!${$v})|(?<!${$v})(?=${$v}))`,n=`(?:(?<=${$v})(?=${$v})|(?<!${$v})(?!${$v}))`;o(Q(Ay(l?n:e),t))}}else throw Error(`Unexpected assertion kind "${c}"`)},Backreference({node:e},{jsGroupNameMap:t}){let{ref:n}=e;typeof n==`string`&&!ky(n)&&(n=by(n,t),e.ref=n)},CapturingGroup({node:e},{jsGroupNameMap:t,subroutineRefMap:n}){let{name:r}=e;r&&!ky(r)&&(r=by(r,t),e.name=r),n.set(e.number,e),r&&n.set(r,e)},CharacterClassRange({node:e,parent:t,replaceWith:n}){t.kind===`intersection`&&n(Q(U_({body:[e]}),t),{traverse:!0})},CharacterSet({node:e,parent:t,replaceWith:n},{accuracy:r,minTargetEs2024:i,digitIsAscii:a,spaceIsAscii:o,wordIsAscii:s}){let{kind:c,negate:l,value:u}=e;if(a&&(c===`digit`||u===`digit`)){n(My(G_(`digit`,{negate:l}),t));return}if(o&&(c===`space`||u===`space`)){n(Q(jy(Ay(Zv),l),t));return}if(s&&(c===`word`||u===`word`)){n(My(G_(`word`,{negate:l}),t));return}if(c===`any`)n(My(tv(`Any`),t));else if(c===`digit`)n(My(tv(`Nd`,{negate:l}),t));else if(c!==`dot`)if(c===`text_segment`){if(r===`strict`)throw Error(Z`Use of "\X" requires non-strict accuracy`);let e=`\\p{Emoji}(?:\\p{EMod}|\\uFE0F\\u20E3?|[\\x{E0020}-\\x{E007E}]+\\x{E007F})?`,a=Z`\p{RI}{2}|${e}(?:\u200D${e})*`;n(Q(Ay(Z`(?>\r\n|${i?Z`\p{RGI_Emoji}`:a}|\P{M}\p{M}*)`,{skipPropertyNameValidation:!0}),t))}else if(c===`hex`)n(My(tv(`AHex`,{negate:l}),t));else if(c===`newline`)n(Q(Ay(l?`[^
|
|
1448
|
+
]`:`(?>\r
|
|
1449
|
+
?|[
|
|
1450
|
+
\v\f
\u2028\u2029])`),t));else if(c===`posix`)if(!i&&(u===`graph`||u===`print`)){if(r===`strict`)throw Error(`POSIX class "${u}" requires min target ES2024 or non-strict accuracy`);let e={graph:`!-~`,print:` -~`}[u];l&&(e=`\0-${Vv(e.codePointAt(0)-1)}${Vv(e.codePointAt(2)+1)}-\u{10FFFF}`),n(Q(Ay(`[${e}]`),t))}else n(Q(jy(Ay(ay.get(u)),l),t));else if(c===`property`)ty.has(lv(u))||(e.key=`sc`);else if(c===`space`)n(My(tv(`space`,{negate:l}),t));else if(c===`word`)n(Q(jy(Ay($v),l),t));else throw Error(`Unexpected character set kind "${c}"`)},Directive({node:e,parent:t,root:n,remove:r,replaceWith:i,removeAllPrevSiblings:a,removeAllNextSiblings:o}){let{kind:s,flags:c}=e;if(s===`flags`)if(!c.enable&&!c.disable)r();else{let e=J_({flags:c});e.body[0].body=o(),i(Q(e,t),{traverse:!0})}else if(s===`keep`){let e=n.body[0],r=n.body.length===1&&T_(e,{type:`Group`})&&e.body[0].body.length===1?e.body[0]:n;if(t.parent!==r||r.body.length>1)throw Error(Z`Uses "\K" in a way that's unsupported`);let o=Y_({behind:!0});o.body[0].body=a(),i(Q(o,t))}else throw Error(`Unexpected directive kind "${s}"`)},Flags({node:e,parent:t}){if(e.posixIsAscii)throw Error(`Unsupported flag "P"`);if(e.textSegmentMode===`word`)throw Error(`Unsupported flag "y{w}"`);[`digitIsAscii`,`extended`,`posixIsAscii`,`spaceIsAscii`,`wordIsAscii`,`textSegmentMode`].forEach(t=>delete e[t]),Object.assign(e,{global:!1,hasIndices:!1,multiline:!1,sticky:e.sticky??!1}),t.options={disable:{x:!0,n:!0},force:{v:!0}}},Group({node:e}){if(!e.flags)return;let{enable:t,disable:n}=e.flags;t?.extended&&delete t.extended,n?.extended&&delete n.extended,t?.dotAll&&n?.dotAll&&delete t.dotAll,t?.ignoreCase&&n?.ignoreCase&&delete t.ignoreCase,t&&!Object.keys(t).length&&delete e.flags.enable,n&&!Object.keys(n).length&&delete e.flags.disable,!e.flags.enable&&!e.flags.disable&&delete e.flags},LookaroundAssertion({node:e},t){let{kind:n}=e;n===`lookbehind`&&(t.passedLookbehind=!0)},NamedCallout({node:e,parent:t,replaceWith:n}){let{kind:r}=e;if(r===`fail`)n(Q(Y_({negate:!0}),t));else throw Error(`Unsupported named callout "(*${r.toUpperCase()}"`)},Quantifier({node:e}){if(e.body.type===`Quantifier`){let t=J_();t.body[0].body.push(e.body),e.body=Q(t,e)}},Regex:{enter({node:e},{supportedGNodes:t}){let n=[],r=!1,i=!1;for(let t of e.body)if(t.body.length===1&&t.body[0].kind===`search_start`)t.body.pop();else{let e=wy(t.body);e?(r=!0,Array.isArray(e)?n.push(...e):n.push(e)):i=!0}r&&!i&&n.forEach(e=>t.add(e))},exit(e,{accuracy:t,passedLookbehind:n,strategy:r}){if(t===`strict`&&n&&r)throw Error(Z`Uses "\G" in a way that requires non-strict accuracy`)}},Subroutine({node:e},{jsGroupNameMap:t}){let{ref:n}=e;typeof n==`string`&&!ky(n)&&(n=by(n,t),e.ref=n)}},fy={Backreference({node:e},{multiplexCapturesToLeftByRef:t,reffedNodesByReferencer:n}){let{orphan:r,ref:i}=e;r||n.set(e,[...t.get(i).map(({node:e})=>e)])},CapturingGroup:{enter({node:e,parent:t,replaceWith:n,skip:r},{groupOriginByCopy:i,groupsByName:a,multiplexCapturesToLeftByRef:o,openRefs:s,reffedNodesByReferencer:c}){let l=i.get(e);if(l&&s.has(e.number)){let r=My(vy(e.number),t);c.set(r,s.get(e.number)),n(r);return}s.set(e.number,e),o.set(e.number,[]),e.name&&Gv(o,e.name,[]);let u=o.get(e.name??e.number);for(let t=0;t<u.length;t++){let n=u[t];if(l===n.node||l&&l===n.origin||e===n.origin){u.splice(t,1);break}}if(o.get(e.number).push({node:e,origin:l}),e.name&&o.get(e.name).push({node:e,origin:l}),e.name){let t=Gv(a,e.name,new Map),n=!1;if(l)n=!0;else for(let e of t.values())if(!e.hasDuplicateNameToRemove){n=!0;break}a.get(e.name).set(e,{node:e,hasDuplicateNameToRemove:n})}},exit({node:e},{openRefs:t}){t.get(e.number)===e&&t.delete(e.number)}},Group:{enter({node:e},t){t.prevFlags=t.currentFlags,e.flags&&(t.currentFlags=Wv(t.currentFlags,e.flags))},exit(e,t){t.currentFlags=t.prevFlags}},Subroutine({node:e,parent:t,replaceWith:n},r){let{isRecursive:i,ref:a}=e;if(i){let n=t;for(;(n=n.parent)&&!(n.type===`CapturingGroup`&&(n.name===a||n.number===a)););r.reffedNodesByReferencer.set(e,n);return}let o=r.subroutineRefMap.get(a),s=a===0,c=s?vy(0):_y(o,r.groupOriginByCopy,null),l=c;if(!s){let e=xy(yy(o,e=>e.type===`Group`&&!!e.flags)),t=e?Wv(r.globalFlags,e):r.globalFlags;hy(t,r.currentFlags)||(l=J_({flags:Sy(t)}),l.body[0].body.push(c))}n(Q(l,t),{traverse:!s})}},py={Backreference({node:e,parent:t,replaceWith:n},r){if(e.orphan){r.highestOrphanBackref=Math.max(r.highestOrphanBackref,e.ref);return}let i=r.reffedNodesByReferencer.get(e).filter(t=>gy(t,e));i.length?i.length>1?n(Q(J_({atomic:!0,body:i.reverse().map(e=>R_({body:[B_(e.number)]}))}),t)):e.ref=i[0].number:n(Q(Y_({negate:!0}),t))},CapturingGroup({node:e},t){e.number=++t.numCapturesToLeft,e.name&&t.groupsByName.get(e.name).get(e).hasDuplicateNameToRemove&&delete e.name},Regex:{exit({node:e},t){let n=Math.max(t.highestOrphanBackref-t.numCapturesToLeft,0);for(let t=0;t<n;t++){let t=V_();e.body.at(-1).body.push(t)}}},Subroutine({node:e},t){!e.isRecursive||e.ref===0||(e.ref=t.reffedNodesByReferencer.get(e).number)}};function my(e){fv(e,{"*"({node:e,parent:t}){e.parent=t}})}function hy(e,t){return e.dotAll===t.dotAll&&e.ignoreCase===t.ignoreCase}function gy(e,t){let n=t;do{if(n.type===`Regex`)return!1;if(n.type===`Alternative`)continue;if(n===e)return!1;let t=Cy(n.parent);for(let r of t){if(r===n)break;if(r===e||Ty(r,e))return!0}}while(n=n.parent);throw Error(`Unexpected path`)}function _y(e,t,n,r){let i=Array.isArray(e)?[]:{};for(let[a,o]of Object.entries(e))a===`parent`?i.parent=Array.isArray(n)?r:n:o&&typeof o==`object`?i[a]=_y(o,t,i,n):(a===`type`&&o===`CapturingGroup`&&t.set(i,t.get(e)??e),i[a]=o);return i}function vy(e){let t=ev(e);return t.isRecursive=!0,t}function yy(e,t){let n=[];for(;e=e.parent;)(!t||t(e))&&n.push(e);return n}function by(e,t){if(t.has(e))return t.get(e);let n=`$${t.size}_${e.replace(/^[^$_\p{IDS}]|[^$\u200C\u200D\p{IDC}]/gu,`_`)}`;return t.set(e,n),n}function xy(e){let t=[`dotAll`,`ignoreCase`],n={enable:{},disable:{}};return e.forEach(({flags:e})=>{t.forEach(t=>{e.enable?.[t]&&(delete n.disable[t],n.enable[t]=!0),e.disable?.[t]&&(n.disable[t]=!0)})}),Object.keys(n.enable).length||delete n.enable,Object.keys(n.disable).length||delete n.disable,n.enable||n.disable?n:null}function Sy({dotAll:e,ignoreCase:t}){let n={};return(e||t)&&(n.enable={},e&&(n.enable.dotAll=!0),t&&(n.enable.ignoreCase=!0)),(!e||!t)&&(n.disable={},!e&&(n.disable.dotAll=!0),!t&&(n.disable.ignoreCase=!0)),n}function Cy(e){if(!e)throw Error(`Node expected`);let{body:t}=e;return Array.isArray(t)?t:t?[t]:null}function wy(e){let t=e.find(e=>e.kind===`search_start`||Oy(e,{negate:!1})||!Ey(e));if(!t)return null;if(t.kind===`search_start`)return t;if(t.type===`LookaroundAssertion`)return t.body[0].body[0];if(t.type===`CapturingGroup`||t.type===`Group`){let e=[];for(let n of t.body){let t=wy(n.body);if(!t)return null;Array.isArray(t)?e.push(...t):e.push(t)}return e}return null}function Ty(e,t){let n=Cy(e)??[];for(let e of n)if(e===t||Ty(e,t))return!0;return!1}function Ey({type:e}){return e===`Assertion`||e===`Directive`||e===`LookaroundAssertion`}function Dy(e){let t=[`Character`,`CharacterClass`,`CharacterSet`];return t.includes(e.type)||e.type===`Quantifier`&&e.min&&t.includes(e.body.type)}function Oy(e,t){let n={negate:null,...t};return e.type===`LookaroundAssertion`&&(n.negate===null||e.negate===n.negate)&&e.body.length===1&&T_(e.body[0],{type:`Assertion`,kind:`search_start`})}function ky(e){return/^[$_\p{IDS}][$\u200C\u200D\p{IDC}]*$/u.test(e)}function Ay(e,t){let n=O_(e,{...t,unicodePropertyMap:ty}).body;return n.length>1||n[0].body.length>1?J_({body:n}):n[0].body[0]}function jy(e,t){return e.negate=t,e}function My(e,t){return e.parent=t,e}function Q(e,t){return my(e),e.parent=t,e}function Ny(e,t){let n=Xv(t),r=Kv(n.target,`ES2024`),i=Kv(n.target,`ES2025`),a=n.rules.recursionLimit;if(!Number.isInteger(a)||a<2||a>20)throw Error(`Invalid recursionLimit; use 2-20`);let o=null,s=null;if(!i){let t=[e.flags.ignoreCase];fv(e,Py,{getCurrentModI:()=>t.at(-1),popModI(){t.pop()},pushModI(e){t.push(e)},setHasCasedChar(){t.at(-1)?o=!0:s=!0}})}let c={dotAll:e.flags.dotAll,ignoreCase:!!((e.flags.ignoreCase||o)&&!s)},l=e,u={accuracy:n.accuracy,appliedGlobalFlags:c,captureMap:new Map,currentFlags:{dotAll:e.flags.dotAll,ignoreCase:e.flags.ignoreCase},inCharClass:!1,lastNode:l,originMap:e._originMap,recursionLimit:a,useAppliedIgnoreCase:!!(!i&&o&&s),useFlagMods:i,useFlagV:r,verbose:n.verbose};function d(e){return u.lastNode=l,l=e,qv(Fy[e.type],`Unexpected node type "${e.type}"`)(e,u,d)}let f={pattern:e.body.map(d).join(`|`),flags:d(e.flags),options:{...e.options}};return r||(delete f.options.force.v,f.options.disable.v=!0,f.options.unicodeSetsPlugin=null),f._captureTransfers=new Map,f._hiddenCaptures=[],u.captureMap.forEach((e,t)=>{e.hidden&&f._hiddenCaptures.push(t),e.transferTo&&Gv(f._captureTransfers,e.transferTo,[]).push(t)}),f}var Py={"*":{enter({node:e},t){if(qy(e)){let n=t.getCurrentModI();t.pushModI(e.flags?Wv({ignoreCase:n},e.flags).ignoreCase:n)}},exit({node:e},t){qy(e)&&t.popModI()}},Backreference(e,t){t.setHasCasedChar()},Character({node:e},t){Vy(Vv(e.value))&&t.setHasCasedChar()},CharacterClassRange({node:e,skip:t},n){t(),Hy(e,{firstOnly:!0}).length&&n.setHasCasedChar()},CharacterSet({node:e},t){e.kind===`property`&&ly.has(e.value)&&t.setHasCasedChar()}},Fy={Alternative({body:e},t,n){return e.map(n).join(``)},Assertion({kind:e,negate:t}){if(e===`string_end`)return`$`;if(e===`string_start`)return`^`;if(e===`word_boundary`)return t?Z`\B`:Z`\b`;throw Error(`Unexpected assertion kind "${e}"`)},Backreference({ref:e},t){if(typeof e!=`number`)throw Error(`Unexpected named backref in transformed AST`);if(!t.useFlagMods&&t.accuracy===`strict`&&t.currentFlags.ignoreCase&&!t.captureMap.get(e).ignoreCase)throw Error(`Use of case-insensitive backref to case-sensitive group requires target ES2025 or non-strict accuracy`);return`\\`+e},CapturingGroup(e,t,n){let{body:r,name:i,number:a}=e,o={ignoreCase:t.currentFlags.ignoreCase},s=t.originMap.get(e);return s&&(o.hidden=!0,a>s.number&&(o.transferTo=s.number)),t.captureMap.set(a,o),`(${i?`?<${i}>`:``}${r.map(n).join(`|`)})`},Character({value:e},t){let n=Vv(e),r=Uy(e,{escDigit:t.lastNode.type===`Backreference`,inCharClass:t.inCharClass,useFlagV:t.useFlagV});if(r!==n)return r;if(t.useAppliedIgnoreCase&&t.currentFlags.ignoreCase&&Vy(n)){let e=ey(n);return t.inCharClass?e.join(``):e.length>1?`[${e.join(``)}]`:e[0]}return n},CharacterClass(e,t,n){let{kind:r,negate:i,parent:a}=e,{body:o}=e;if(r===`intersection`&&!t.useFlagV)throw Error(`Use of character class intersection requires min target ES2024`);Hv.bugFlagVLiteralHyphenIsRange&&t.useFlagV&&o.some(Yy)&&(o=[H_(45),...o.filter(e=>!Yy(e))]);let s=()=>`[${i?`^`:``}${o.map(n).join(r===`intersection`?`&&`:``)}]`;if(!t.inCharClass){if((!t.useFlagV||Hv.bugNestedClassIgnoresNegation)&&!i){let t=o.filter(e=>e.type===`CharacterClass`&&e.kind===`union`&&e.negate);if(t.length){let r=J_(),i=r.body[0];return r.parent=a,i.parent=r,o=o.filter(e=>!t.includes(e)),e.body=o,o.length?(e.parent=i,i.body.push(e)):r.body.pop(),t.forEach(e=>{let t=R_({body:[e]});e.parent=t,t.parent=r,r.body.push(t)}),n(r)}}t.inCharClass=!0;let r=s();return t.inCharClass=!1,r}let c=o[0];if(r===`union`&&!i&&c&&((!t.useFlagV||!t.verbose)&&a.kind===`union`&&!(Hv.bugFlagVLiteralHyphenIsRange&&t.useFlagV)||!t.verbose&&a.kind===`intersection`&&o.length===1&&c.type!==`CharacterClassRange`))return o.map(n).join(``);if(!t.useFlagV&&a.type===`CharacterClass`)throw Error(`Uses nested character class in a way that requires min target ES2024`);return s()},CharacterClassRange(e,t){let n=e.min.value,r=e.max.value,i={escDigit:!1,inCharClass:!0,useFlagV:t.useFlagV},a=Uy(n,i),o=Uy(r,i),s=new Set;return t.useAppliedIgnoreCase&&t.currentFlags.ignoreCase&&Wy(Hy(e)).forEach(e=>{s.add(Array.isArray(e)?`${Uy(e[0],i)}-${Uy(e[1],i)}`:Uy(e,i))}),`${a}-${o}${[...s].join(``)}`},CharacterSet({kind:e,negate:t,value:n,key:r},i){if(e===`dot`)return i.currentFlags.dotAll?i.appliedGlobalFlags.dotAll||i.useFlagMods?`.`:`[^]`:Z`[^\n]`;if(e===`digit`)return t?Z`\D`:Z`\d`;if(e===`property`){if(i.useAppliedIgnoreCase&&i.currentFlags.ignoreCase&&ly.has(n))throw Error(`Unicode property "${n}" can't be case-insensitive when other chars have specific case`);return`${t?Z`\P`:Z`\p`}{${r?`${r}=`:``}${n}}`}if(e===`word`)return t?Z`\W`:Z`\w`;throw Error(`Unexpected character set kind "${e}"`)},Flags(e,t){return(t.appliedGlobalFlags.ignoreCase?`i`:``)+(e.dotAll?`s`:``)+(e.sticky?`y`:``)},Group({atomic:e,body:t,flags:n,parent:r},i,a){let o=i.currentFlags;n&&(i.currentFlags=Wv(o,n));let s=t.map(a).join(`|`),c=!i.verbose&&t.length===1&&r.type!==`Quantifier`&&!e&&(!i.useFlagMods||!n)?s:`(?${Gy(e,n,i.useFlagMods)}${s})`;return i.currentFlags=o,c},LookaroundAssertion({body:e,kind:t,negate:n},r,i){return`(?${`${t===`lookahead`?``:`<`}${n?`!`:`=`}`}${e.map(i).join(`|`)})`},Quantifier(e,t,n){return n(e.body)+Ky(e)},Subroutine({isRecursive:e,ref:t},n){if(!e)throw Error(`Unexpected non-recursive subroutine in transformed AST`);let r=n.recursionLimit;return t===0?`(?R=${r})`:Z`\g<${t}&R=${r}>`}},Iy=new Set([`$`,`(`,`)`,`*`,`+`,`.`,`?`,`[`,`\\`,`]`,`^`,`{`,`|`,`}`]),Ly=new Set([`-`,`\\`,`]`,`^`,`[`]),Ry=new Set("()-/[\\]^{|}!#$%&*+,.:;<=>?@`~".split(``)),zy=new Map([[9,Z`\t`],[10,Z`\n`],[11,Z`\v`],[12,Z`\f`],[13,Z`\r`],[8232,Z`\u2028`],[8233,Z`\u2029`],[65279,Z`\uFEFF`]]),By=/^\p{Cased}$/u;function Vy(e){return By.test(e)}function Hy(e,t){let n=!!t?.firstOnly,r=e.min.value,i=e.max.value,a=[];if(r<65&&(i===65535||i>=131071)||r===65536&&i>=131071)return a;for(let e=r;e<=i;e++){let t=Vv(e);if(!Vy(t))continue;let o=ey(t).filter(e=>{let t=e.codePointAt(0);return t<r||t>i});if(o.length&&(a.push(...o),n))break}return a}function Uy(e,{escDigit:t,inCharClass:n,useFlagV:r}){if(zy.has(e))return zy.get(e);if(e<32||e>126&&e<160||e>262143||t&&Jy(e))return e>255?`\\u{${e.toString(16).toUpperCase()}}`:`\\x${e.toString(16).toUpperCase().padStart(2,`0`)}`;let i=n?r?Ry:Ly:Iy,a=Vv(e);return(i.has(a)?`\\`:``)+a}function Wy(e){let t=e.map(e=>e.codePointAt(0)).sort((e,t)=>e-t),n=[],r=null;for(let e=0;e<t.length;e++)t[e+1]===t[e]+1?r??=t[e]:r===null?n.push(t[e]):(n.push([r,t[e]]),r=null);return n}function Gy(e,t,n){if(e)return`>`;let r=``;if(t&&n){let{enable:e,disable:n}=t;r=(e?.ignoreCase?`i`:``)+(e?.dotAll?`s`:``)+(n?`-`:``)+(n?.ignoreCase?`i`:``)+(n?.dotAll?`s`:``)}return`${r}:`}function Ky({kind:e,max:t,min:n}){let r;return r=!n&&t===1?`?`:!n&&t===1/0?`*`:n===1&&t===1/0?`+`:n===t?`{${n}}`:`{${n},${t===1/0?``:t}}`,r+{greedy:``,lazy:`?`,possessive:`+`}[e]}function qy({type:e}){return e===`CapturingGroup`||e===`Group`||e===`LookaroundAssertion`}function Jy(e){return e>47&&e<58}function Yy({type:e,value:t}){return e===`Character`&&t===45}var Xy=class e extends RegExp{#e=new Map;#t=null;#n;#r=null;#i=null;rawOptions={};get source(){return this.#n||`(?:)`}constructor(t,n,r){let i=!!r?.lazyCompile;if(t instanceof RegExp){if(r)throw Error(`Cannot provide options when copying a regexp`);let i=t;super(i,n),this.#n=i.source,i instanceof e&&(this.#e=i.#e,this.#r=i.#r,this.#i=i.#i,this.rawOptions=i.rawOptions)}else{let e={hiddenCaptures:[],strategy:null,transfers:[],...r};super(i?``:t,n),this.#n=t,this.#e=Qy(e.hiddenCaptures,e.transfers),this.#i=e.strategy,this.rawOptions=r??{}}i||(this.#t=this)}exec(t){if(!this.#t){let{lazyCompile:t,...n}=this.rawOptions;this.#t=new e(this.#n,this.flags,n)}let n=this.global||this.sticky,r=this.lastIndex;if(this.#i===`clip_search`&&n&&r){this.lastIndex=0;let e=this.#a(t.slice(r));return e&&(Zy(e,r,t,this.hasIndices),this.lastIndex+=r),e}return this.#a(t)}#a(e){this.#t.lastIndex=this.lastIndex;let t=super.exec.call(this.#t,e);if(this.lastIndex=this.#t.lastIndex,!t||!this.#e.size)return t;let n=[...t];t.length=1;let r;this.hasIndices&&(r=[...t.indices],t.indices.length=1);let i=[0];for(let e=1;e<n.length;e++){let{hidden:a,transferTo:o}=this.#e.get(e)??{};if(a?i.push(null):(i.push(t.length),t.push(n[e]),this.hasIndices&&t.indices.push(r[e])),o&&n[e]!==void 0){let a=i[o];if(!a)throw Error(`Invalid capture transfer to "${a}"`);if(t[a]=n[e],this.hasIndices&&(t.indices[a]=r[e]),t.groups){this.#r||=$y(this.source);let i=this.#r.get(o);i&&(t.groups[i]=n[e],this.hasIndices&&(t.indices.groups[i]=r[e]))}}}return t}};function Zy(e,t,n,r){if(e.index+=t,e.input=n,r){let n=e.indices;for(let e=0;e<n.length;e++){let r=n[e];r&&(n[e]=[r[0]+t,r[1]+t])}let r=n.groups;r&&Object.keys(r).forEach(e=>{let n=r[e];n&&(r[e]=[n[0]+t,n[1]+t])})}}function Qy(e,t){let n=new Map;for(let t of e)n.set(t,{hidden:!0});for(let[e,r]of t)for(let t of r)Gv(n,t,{}).transferTo=e;return n}function $y(e){let t=/(?<capture>\((?:\?<(?![=!])(?<name>[^>]+)>|(?!\?)))|\\?./gsu,n=new Map,r=0,i=0,a;for(;a=t.exec(e);){let{0:e,groups:{capture:t,name:o}}=a;e===`[`?r++:r?e===`]`&&r--:t&&(i++,o&&n.set(i,o))}return n}function eb(e,t){let n=tb(e,t);return n.options?new Xy(n.pattern,n.flags,n.options):new RegExp(n.pattern,n.flags)}function tb(e,t){let n=Xv(t),r=uy(O_(e,{flags:n.flags,normalizeUnknownPropertyNames:!0,rules:{captureGroup:n.rules.captureGroup,singleline:n.rules.singleline},skipBackrefValidation:n.rules.allowOrphanBackrefs,unicodePropertyMap:ty}),{accuracy:n.accuracy,asciiWordBoundaries:n.rules.asciiWordBoundaries,avoidSubclass:n.avoidSubclass,bestEffortTarget:n.target}),i=Ny(r,n),a=Fv(i.pattern,{captureTransfers:i._captureTransfers,hiddenCaptures:i._hiddenCaptures,mode:`external`}),o=Tv(Ov(a.pattern).pattern,{captureTransfers:a.captureTransfers,hiddenCaptures:a.hiddenCaptures}),s={pattern:o.pattern,flags:`${n.hasIndices?`d`:``}${n.global?`g`:``}${i.flags}${i.options.disable.v?`u`:`v`}`};if(n.avoidSubclass){if(n.lazyCompileLength!==1/0)throw Error(`Lazy compilation requires subclass`)}else{let e=o.hiddenCaptures.sort((e,t)=>e-t),t=Array.from(o.captureTransfers),i=r._strategy,a=s.pattern.length>=n.lazyCompileLength;(e.length||t.length||i||a)&&(s.options={...e.length&&{hiddenCaptures:e},...t.length&&{transfers:t},...i&&{strategy:i},...a&&{lazyCompile:a}})}return s}function nb(e,t){return eb(e,{global:!0,hasIndices:!0,lazyCompileLength:3e3,rules:{allowOrphanBackrefs:!0,asciiWordBoundaries:!0,captureGroup:!0,recursionLimit:5,singleline:!0},...t})}function rb(e={}){let t={target:`auto`,cache:new Map,...e};return t.regexConstructor||=e=>nb(e,{target:t.target}),{createScanner(e){return new Pg(e,t)},createString(e){return{content:e}}}}async function ib(e){if(Yu())throw Error(`resolveLanguage("${e}") cannot be called from a worker context. Languages must be pre-resolved on the main thread and passed to the worker via the resolvedLanguages parameter.`);let t=Gu.get(e);if(t!=null)return t;try{let t=Ku.get(e);if(t==null&&Object.prototype.hasOwnProperty.call($u,e)&&(t=$u[e]),t==null)throw Error(`resolveLanguage: "${e}" not found in bundled or custom languages`);let n=t().then(({default:t})=>{let n={name:e,data:t};return Wu.has(e)||Wu.set(e,n),n});return Gu.set(e,n),await n}finally{Gu.delete(e)}}function ab(e){return Wu.get(e)??ib(e)}function ob(e){let t=[],n=new Set;for(let r of sb(e.themes)){let e=ub(r)?r.getThemes():[r];for(let r of e){if(n.has(r.name))throw Error(`Theme collection already contains theme "${r.name}"`);n.add(r.name),t.push(r)}}let r=Object.freeze([...t]),i=Object.freeze(r.filter(e=>e.colorScheme===`light`)),a=Object.freeze(r.filter(e=>e.colorScheme===`dark`)),o=new Map(r.map(e=>[e.name,e])),s=Object.freeze(r.map(e=>e.name)),c=Object.freeze(i.map(e=>e.name)),l=Object.freeze(a.map(e=>e.name));function u(e){if(e==null)return r;let{colorScheme:t,collection:n}=e;return n==null?t===`light`?i:t===`dark`?a:r:r.filter(e=>e.collection===n?t==null||e.colorScheme===t:!1)}return{getTheme(e){return o.get(e)},getThemes(e){return u(e)},getThemeNames(e){return e?.collection==null?e?.colorScheme===`light`?c:e?.colorScheme===`dark`?l:s:u(e).map(e=>e.name)},hasTheme(e){return o.has(e)},orderBy(e){return ob({themes:r.map((e,t)=>({descriptor:e,index:t})).sort((t,n)=>{let r=e(t.descriptor,n.descriptor);return r===0?t.index-n.index:r}).map(e=>e.descriptor)})},pick(e){let t=[],n=new Set;for(let r of e){if(n.has(r))throw Error(`Theme collection pick already includes theme "${r}"`);n.add(r);let e=o.get(r);if(e==null)throw Error(`Theme collection does not contain theme "${r}"`);t.push(e)}return ob({themes:t})},registerInto(e){for(let t of r)e.registerThemeIfAbsent(t.name,t.load)}}}function sb(e){return cb(e)?[e]:e}function cb(e){return ub(e)||lb(e)}function lb(e){return typeof e.name==`string`&&typeof e.load==`function`}function ub(e){return typeof e.getThemes==`function`}function db({name:e,load:t,colorScheme:n,collection:r,displayName:i}){return{name:e,colorScheme:n,collection:r,displayName:i,load:fb(t)}}function fb(e){return async()=>Fp(Lu(await e()))}var pb=`pierre`,mb=[`pierre-dark`,`pierre-dark-soft`,`pierre-dark-vibrant`,`pierre-dark-protanopia-deuteranopia`,`pierre-dark-tritanopia`],hb=[`pierre-light`,`pierre-light-soft`,`pierre-light-vibrant`,`pierre-light-protanopia-deuteranopia`,`pierre-light-tritanopia`],gb=[...hb,...mb],_b=new Set(hb);function vb(e){return _b.has(e)?`light`:`dark`}var yb={"pierre-dark":`Pierre Dark`,"pierre-dark-soft":`Pierre Dark Soft`,"pierre-dark-vibrant":`Pierre Dark Vibrant`,"pierre-dark-protanopia-deuteranopia":`Pierre Dark Protanopia & Deuteranopia`,"pierre-dark-tritanopia":`Pierre Dark Tritanopia`,"pierre-light":`Pierre Light`,"pierre-light-soft":`Pierre Light Soft`,"pierre-light-vibrant":`Pierre Light Vibrant`,"pierre-light-protanopia-deuteranopia":`Pierre Light Protanopia & Deuteranopia`,"pierre-light-tritanopia":`Pierre Light Tritanopia`},bb={"pierre-dark":()=>d(()=>import(`./pierre-dark-CpLgRqie.js`),[]),"pierre-dark-soft":()=>d(()=>import(`./pierre-dark-soft-kZQmAZld.js`),[]),"pierre-dark-vibrant":()=>d(()=>import(`./pierre-dark-vibrant-CpQYzh95.js`),[]),"pierre-dark-protanopia-deuteranopia":()=>d(()=>import(`./pierre-dark-protanopia-deuteranopia-B35FxJx-.js`),[]),"pierre-dark-tritanopia":()=>d(()=>import(`./pierre-dark-tritanopia-CpjhbsIL.js`),[]),"pierre-light":()=>d(()=>import(`./pierre-light-CoaEpmwp.js`),[]),"pierre-light-soft":()=>d(()=>import(`./pierre-light-soft-lWLdNTOI.js`),[]),"pierre-light-vibrant":()=>d(()=>import(`./pierre-light-vibrant-D80Fkn33.js`),[]),"pierre-light-protanopia-deuteranopia":()=>d(()=>import(`./pierre-light-protanopia-deuteranopia-0fSaH845.js`),[]),"pierre-light-tritanopia":()=>d(()=>import(`./pierre-light-tritanopia-CEbqgOJL.js`),[])};function xb(e){return db({name:e,collection:pb,colorScheme:vb(e),displayName:yb[e],load:bb[e]})}var Sb=ob({themes:gb.map(e=>xb(e))}),Cb=`shiki`,wb=[`ayu-light`,`catppuccin-latte`,`everforest-light`,`github-light`,`github-light-default`,`github-light-high-contrast`,`gruvbox-light-hard`,`gruvbox-light-medium`,`gruvbox-light-soft`,`horizon-bright`,`kanagawa-lotus`,`light-plus`,`material-theme-lighter`,`min-light`,`night-owl-light`,`one-light`,`rose-pine-dawn`,`slack-ochin`,`snazzy-light`,`solarized-light`,`vitesse-light`],Tb=`andromeeda.aurora-x.ayu-dark.ayu-mirage.catppuccin-frappe.catppuccin-macchiato.catppuccin-mocha.dark-plus.dracula.dracula-soft.everforest-dark.github-dark.github-dark-default.github-dark-dimmed.github-dark-high-contrast.gruvbox-dark-hard.gruvbox-dark-medium.gruvbox-dark-soft.horizon.houston.kanagawa-dragon.kanagawa-wave.laserwave.material-theme.material-theme-darker.material-theme-ocean.material-theme-palenight.min-dark.monokai.night-owl.nord.one-dark-pro.plastic.poimandres.red.rose-pine.rose-pine-moon.slack-dark.solarized-dark.synthwave-84.tokyo-night.vesper.vitesse-black.vitesse-dark`.split(`.`),Eb=new Set(wb);function Db(e){return Eb.has(e)?`light`:`dark`}var Ob={andromeeda:()=>d(()=>import(`./andromeeda-vGVdxbeo.js`),[]),"aurora-x":()=>d(()=>import(`./aurora-x-CDeNXAV0.js`),[]),"ayu-dark":()=>d(()=>import(`./ayu-dark-DluEY0Gj.js`),[]),"ayu-light":()=>d(()=>import(`./ayu-light-C3h-C4tm.js`),[]),"ayu-mirage":()=>d(()=>import(`./ayu-mirage-Bqwy1Gya.js`),[]),"catppuccin-frappe":()=>d(()=>import(`./catppuccin-frappe-3VR1Za6u.js`),[]),"catppuccin-latte":()=>d(()=>import(`./catppuccin-latte-DwIHMF0Q.js`),[]),"catppuccin-macchiato":()=>d(()=>import(`./catppuccin-macchiato-DYnBP6_5.js`),[]),"catppuccin-mocha":()=>d(()=>import(`./catppuccin-mocha-DYhrFGRu.js`),[]),"dark-plus":()=>d(()=>import(`./dark-plus-Cs2F2srj.js`),[]),dracula:()=>d(()=>import(`./dracula-BHWKrbxM.js`),[]),"dracula-soft":()=>d(()=>import(`./dracula-soft-5eyTD99u.js`),[]),"everforest-dark":()=>d(()=>import(`./everforest-dark-sB-x3p7T.js`),[]),"everforest-light":()=>d(()=>import(`./everforest-light-Df2xbC6M.js`),[]),"github-dark":()=>d(()=>import(`./github-dark-C-LZuMrd.js`),[]),"github-dark-default":()=>d(()=>import(`./github-dark-default-DXG-b-1a.js`),[]),"github-dark-dimmed":()=>d(()=>import(`./github-dark-dimmed-Bx1FflLF.js`),[]),"github-dark-high-contrast":()=>d(()=>import(`./github-dark-high-contrast-B_tTalzw.js`),[]),"github-light":()=>d(()=>import(`./github-light-EUqPIrTm.js`),[]),"github-light-default":()=>d(()=>import(`./github-light-default-BXViO-2h.js`),[]),"github-light-high-contrast":()=>d(()=>import(`./github-light-high-contrast-B68TUdTA.js`),[]),"gruvbox-dark-hard":()=>d(()=>import(`./gruvbox-dark-hard-C820rvS2.js`),[]),"gruvbox-dark-medium":()=>d(()=>import(`./gruvbox-dark-medium-BPjhmG05.js`),[]),"gruvbox-dark-soft":()=>d(()=>import(`./gruvbox-dark-soft-MrdJrrXF.js`),[]),"gruvbox-light-hard":()=>d(()=>import(`./gruvbox-light-hard-BC_s9l72.js`),[]),"gruvbox-light-medium":()=>d(()=>import(`./gruvbox-light-medium-BAWPOn9u.js`),[]),"gruvbox-light-soft":()=>d(()=>import(`./gruvbox-light-soft-BSMLrYjP.js`),[]),horizon:()=>d(()=>import(`./horizon-CE9ld1lL.js`),[]),"horizon-bright":()=>d(()=>import(`./horizon-bright-DSNQnXHK.js`),[]),houston:()=>d(()=>import(`./houston-CsvMBhTu.js`),[]),"kanagawa-dragon":()=>d(()=>import(`./kanagawa-dragon-CXtmUGW6.js`),[]),"kanagawa-lotus":()=>d(()=>import(`./kanagawa-lotus-BN08jTvb.js`),[]),"kanagawa-wave":()=>d(()=>import(`./kanagawa-wave-CTweb8Dz.js`),[]),laserwave:()=>d(()=>import(`./laserwave-C_8bwKvT.js`),[]),"light-plus":()=>d(()=>import(`./light-plus-DVQuIRkW.js`),[]),"material-theme":()=>d(()=>import(`./material-theme-Bm3Qr25_.js`),[]),"material-theme-darker":()=>d(()=>import(`./material-theme-darker-2IIEA8gg.js`),[]),"material-theme-lighter":()=>d(()=>import(`./material-theme-lighter-uhdI0v04.js`),[]),"material-theme-ocean":()=>d(()=>import(`./material-theme-ocean-CHQ94UKr.js`),[]),"material-theme-palenight":()=>d(()=>import(`./material-theme-palenight-B5W6OYN7.js`),[]),"min-dark":()=>d(()=>import(`./min-dark-BSWPekZh.js`),[]),"min-light":()=>d(()=>import(`./min-light-DDpmG2fV.js`),[]),monokai:()=>d(()=>import(`./monokai-CdkpiU2Y.js`),[]),"night-owl":()=>d(()=>import(`./night-owl-DhmEMT88.js`),[]),"night-owl-light":()=>d(()=>import(`./night-owl-light-eJ-hLW7d.js`),[]),nord:()=>d(()=>import(`./nord-Cb4Vim4T.js`),[]),"one-dark-pro":()=>d(()=>import(`./one-dark-pro-CLwyXe_n.js`),[]),"one-light":()=>d(()=>import(`./one-light-D7Lr4KcI.js`),[]),plastic:()=>d(()=>import(`./plastic-DQwYfKfQ.js`),[]),poimandres:()=>d(()=>import(`./poimandres-DRFjx7u4.js`),[]),red:()=>d(()=>import(`./red-CJ3rzSJv.js`),[]),"rose-pine":()=>d(()=>import(`./rose-pine-BthvhNj6.js`),[]),"rose-pine-dawn":()=>d(()=>import(`./rose-pine-dawn-Dg85fqjY.js`),[]),"rose-pine-moon":()=>d(()=>import(`./rose-pine-moon-hon4tzzS.js`),[]),"slack-dark":()=>d(()=>import(`./slack-dark-DnToyrRv.js`),[]),"slack-ochin":()=>d(()=>import(`./slack-ochin-B2OO5cIa.js`),[]),"snazzy-light":()=>d(()=>import(`./snazzy-light-4G7pJPwS.js`),[]),"solarized-dark":()=>d(()=>import(`./solarized-dark-DV17i1UV.js`),[]),"solarized-light":()=>d(()=>import(`./solarized-light-DSh2HLQt.js`),[]),"synthwave-84":()=>d(()=>import(`./synthwave-84-nFMaYfgc.js`),[]),"tokyo-night":()=>d(()=>import(`./tokyo-night-oM2G3aXe.js`),[]),vesper:()=>d(()=>import(`./vesper-DdrHHSXu.js`),[]),"vitesse-black":()=>d(()=>import(`./vitesse-black-fwtXNY1n.js`),[]),"vitesse-dark":()=>d(()=>import(`./vitesse-dark-BZCL-v6S.js`),[]),"vitesse-light":()=>d(()=>import(`./vitesse-light-VbXTXTou.js`),[])};function kb(e){return db({name:e,collection:Cb,colorScheme:Db(e),load:Ob[e]})}var Ab=ob({themes:Object.freeze([...wb.map(e=>kb(e)),...Tb.map(e=>kb(e))])});function jb(e){if(Yu())throw Error(`Theme "${e}" cannot be resolved from a worker context. Themes must be pre-resolved on the main thread and passed to the worker via the resolvedLanguages parameter.`);if(Hu.hasRegisteredTheme(e))return;let t=Ab.getTheme(e);if(t!=null){Hu.registerThemeIfAbsent(t.name,t.load);return}throw Error(`No valid theme loader registered for "${e}"`)}function Mb(e,t){if(t.name!==e)throw Error(`resolvedTheme: themeName: ${e} does not match theme.name: ${t.name}`)}async function Nb(e){jb(e);let t=await Hu.resolveTheme(e);return Mb(e,t),t}function Pb(e){return Hu.getResolvedTheme(e)??Nb(e)}var Fb;async function Ib({themes:e,langs:t,preferredHighlighter:n=`shiki-js`}){Fb??=Tg({themes:[],langs:[`text`],engine:n===`shiki-wasm`?Fd(d(()=>import(`./wasm-BnjxR4X6.js`),[])):rb()});let r=Rb(Fb)?await Fb:Fb;Fb=r;let i=[];for(let e of t){if(e===`text`||e===`ansi`)continue;let t=ab(e);`then`in t?i.push(t):Ju(t,r)}let a=[];for(let t of e){let e=Pb(t);`then`in e?a.push(e):Uu(e,Fb)}return(i.length>0||a.length>0)&&await Promise.all([Promise.all(i).then(e=>{Ju(e,r)}),Promise.all(a).then(e=>{Uu(e,r)})]),r}function Lb(){if(Fb!=null&&!(`then`in Fb))return Fb}function Rb(e=Fb){return e!=null&&`then`in e}for(let e of Sb.getThemes())Hu.registerThemeIfAbsent(e.name,e.load);function zb(e=Tu){let t=[];return typeof e==`string`?t.push(e):(t.push(e.dark),t.push(e.light)),t}function Bb(e){return Hu.hasResolvedThemes(e)}function Vb(e,t){return Fu(e.theme,t.theme)&&e.useTokenTransformer===t.useTokenTransformer&&e.tokenizeMaxLineLength===t.tokenizeMaxLineLength}function Hb(e,t){return e?.cacheKey===t?.cacheKey&&e?.contents===t?.contents&&e?.name===t?.name&&e?.lang===t?.lang}var Ub=new Map,Wb=0,Gb={"1c":`1c`,abap:`abap`,as:`actionscript-3`,ada:`ada`,adb:`ada`,ads:`ada`,adoc:`asciidoc`,asciidoc:`asciidoc`,"component.html":`angular-html`,"component.ts":`angular-ts`,conf:`nginx`,htaccess:`apache`,cls:`tex`,trigger:`apex`,apl:`apl`,applescript:`applescript`,scpt:`applescript`,ara:`ara`,asm:`asm`,s:`riscv`,astro:`astro`,awk:`awk`,bal:`ballerina`,sh:`zsh`,bash:`zsh`,bat:`cmd`,cmd:`cmd`,be:`berry`,beancount:`beancount`,bib:`bibtex`,bicep:`bicep`,"blade.php":`blade`,bsl:`bsl`,c:`c`,h:`objective-cpp`,cs:`csharp`,cpp:`cpp`,hpp:`cpp`,cc:`cpp`,cxx:`cpp`,hh:`cpp`,cdc:`cdc`,cairo:`cairo`,clar:`clarity`,clj:`clojure`,cljs:`clojure`,cljc:`clojure`,soy:`soy`,cmake:`cmake`,"CMakeLists.txt":`cmake`,cob:`cobol`,cbl:`cobol`,cobol:`cobol`,CODEOWNERS:`codeowners`,ql:`ql`,coffee:`coffeescript`,lisp:`lisp`,cl:`lisp`,lsp:`lisp`,log:`log`,v:`verilog`,cql:`cql`,cr:`crystal`,css:`css`,csv:`csv`,cue:`cue`,cypher:`cypher`,cyp:`cypher`,d:`d`,dart:`dart`,dax:`dax`,desktop:`desktop`,diff:`diff`,patch:`diff`,Dockerfile:`dockerfile`,dockerfile:`dockerfile`,env:`dotenv`,dm:`dream-maker`,edge:`edge`,el:`emacs-lisp`,ex:`elixir`,exs:`elixir`,elm:`elm`,erb:`erb`,erl:`erlang`,hrl:`erlang`,f:`fortran-fixed-form`,for:`fortran-fixed-form`,fs:`fsharp`,fsi:`fsharp`,fsx:`fsharp`,f03:`f03`,f08:`f08`,f18:`f18`,f77:`f77`,f90:`fortran-free-form`,f95:`fortran-free-form`,fnl:`fennel`,fish:`fish`,ftl:`ftl`,tres:`gdresource`,res:`gdresource`,gd:`gdscript`,gdshader:`gdshader`,gs:`genie`,feature:`gherkin`,COMMIT_EDITMSG:`git-commit`,"git-rebase-todo":`git-rebase`,gjs:`glimmer-js`,gleam:`gleam`,gts:`glimmer-ts`,glsl:`glsl`,vert:`glsl`,frag:`glsl`,shader:`shaderlab`,gp:`gnuplot`,plt:`gnuplot`,gnuplot:`gnuplot`,go:`go`,graphql:`graphql`,gql:`graphql`,groovy:`groovy`,gvy:`groovy`,hack:`hack`,haml:`haml`,hbs:`handlebars`,handlebars:`handlebars`,hs:`haskell`,lhs:`haskell`,hx:`haxe`,hcl:`hcl`,hjson:`hjson`,hlsl:`hlsl`,fx:`hlsl`,html:`html`,htm:`html`,http:`http`,rest:`http`,hxml:`hxml`,hy:`hy`,imba:`imba`,ini:`ini`,cfg:`ini`,jade:`pug`,pug:`pug`,java:`java`,js:`javascript`,mjs:`javascript`,cjs:`javascript`,jinja:`jinja`,jinja2:`jinja`,j2:`jinja`,jison:`jison`,jl:`julia`,json:`json`,json5:`json5`,jsonc:`jsonc`,jsonl:`jsonl`,jsonnet:`jsonnet`,libsonnet:`jsonnet`,jssm:`jssm`,jsx:`jsx`,kt:`kotlin`,kts:`kts`,kql:`kusto`,tex:`tex`,ltx:`tex`,lean:`lean4`,less:`less`,liquid:`liquid`,lit:`lit`,ll:`llvm`,logo:`logo`,lua:`lua`,luau:`luau`,Makefile:`makefile`,mk:`makefile`,makefile:`makefile`,md:`markdown`,markdown:`markdown`,marko:`marko`,m:`wolfram`,mat:`matlab`,mdc:`mdc`,mdx:`mdx`,wiki:`wikitext`,mediawiki:`wikitext`,mmd:`mermaid`,mermaid:`mermaid`,mips:`mipsasm`,mojo:`mojo`,"🔥":`mojo`,move:`move`,nar:`narrat`,nf:`nextflow`,nim:`nim`,nims:`nim`,nimble:`nim`,nix:`nix`,nu:`nushell`,mm:`objective-cpp`,ml:`ocaml`,mli:`ocaml`,mll:`ocaml`,mly:`ocaml`,pas:`pascal`,p:`pascal`,pl:`prolog`,pm:`perl`,t:`perl`,raku:`raku`,p6:`raku`,pl6:`raku`,php:`php`,phtml:`php`,pls:`plsql`,sql:`sql`,po:`po`,polar:`polar`,pcss:`postcss`,pot:`pot`,potx:`potx`,pq:`powerquery`,pqm:`powerquery`,ps1:`powershell`,psm1:`powershell`,psd1:`powershell`,prisma:`prisma`,pro:`prolog`,P:`prolog`,properties:`properties`,proto:`protobuf`,pp:`puppet`,purs:`purescript`,py:`python`,pyw:`python`,pyi:`python`,qml:`qml`,qmldir:`qmldir`,qss:`qss`,r:`r`,R:`r`,rkt:`racket`,rktl:`racket`,razor:`razor`,cshtml:`razor`,rb:`ruby`,rbw:`ruby`,reg:`reg`,regex:`regexp`,rel:`rel`,rs:`rust`,rst:`rst`,rake:`ruby`,gemspec:`ruby`,jbuilder:`ruby`,builder:`ruby`,rabl:`ruby`,arb:`ruby`,ru:`ruby`,podspec:`ruby`,Gemfile:`ruby`,Rakefile:`ruby`,Guardfile:`ruby`,Capfile:`ruby`,Berksfile:`ruby`,Brewfile:`ruby`,Vagrantfile:`ruby`,Thorfile:`ruby`,Appraisals:`ruby`,Dangerfile:`ruby`,sas:`sas`,sass:`sass`,scala:`scala`,sc:`scala`,scm:`scheme`,ss:`scheme`,sld:`scheme`,scss:`scss`,sdbl:`sdbl`,shadergraph:`shader`,st:`smalltalk`,sol:`solidity`,sparql:`sparql`,rq:`sparql`,spl:`splunk`,config:`ssh-config`,do:`stata`,ado:`stata`,dta:`stata`,styl:`stylus`,stylus:`stylus`,svelte:`svelte`,swift:`swift`,sv:`system-verilog`,svh:`system-verilog`,service:`systemd`,socket:`systemd`,device:`systemd`,timer:`systemd`,talon:`talonscript`,tasl:`tasl`,tcl:`tcl`,templ:`templ`,tf:`tf`,tfvars:`tfvars`,toml:`toml`,ts:`typescript`,tsp:`typespec`,tsv:`tsv`,tsx:`tsx`,ttl:`turtle`,twig:`twig`,typ:`typst`,vv:`v`,vala:`vala`,vapi:`vala`,vb:`vb`,vbs:`vb`,bas:`vb`,vh:`verilog`,vhd:`vhdl`,vhdl:`vhdl`,vim:`vimscript`,vue:`vue`,"vine.ts":`vue-vine`,vy:`vyper`,wasm:`wasm`,wat:`wasm`,wy:`文言`,wgsl:`wgsl`,wit:`wit`,wl:`wolfram`,nb:`wolfram`,xml:`xml`,xsl:`xsl`,xslt:`xsl`,yaml:`yaml`,yml:`yml`,zs:`zenscript`,zig:`zig`,zsh:`zsh`,sty:`tex`};function Kb(e){if(Ub.has(e))return Ub.get(e)??`text`;if(Gb[e]!=null)return Gb[e];let t=e.match(/\.([^/\\]+\.[^/\\]+)$/);if(t!=null){if(Ub.has(t[1]))return Ub.get(t[1])??`text`;if(Gb[t[1]]!=null)return Gb[t[1]]??`text`}let n=e.match(/\.([^.]+)$/)?.[1]??``;return Ub.has(n)?Ub.get(n)??`text`:Gb[n]??`text`}function qb(){return Wb}function Jb(){return Object.fromEntries(Ub)}function Yb(e){return(e.lang??Kb(e.name))===`text`}function Xb({lines:e,startingLine:t=0,totalLines:n=1/0,callback:r}){let i=Math.min(t+n,e.length),a=(()=>{let t=e.at(-1);return t===``||t===`
|
|
1451
|
+
`||t===`\r
|
|
1452
|
+
`||t===`\r`?Math.max(0,e.length-2):e.length-1})();for(let n=t;n<i;n++){let t=n===a;if(r({lineIndex:n,lineNumber:n+1,content:e[n],isLastLine:t})===!0||t)break}}function Zb(e){return e.replace(/\n$|\r\n$/,``)}function Qb(e){return{type:`text`,value:e}}function $({tagName:e,children:t=[],properties:n={}}){return{type:`element`,tagName:e,properties:n,children:t}}function $b({name:e,width:t=16,height:n=16,properties:r}){return $({tagName:`svg`,properties:{width:t,height:n,viewBox:`0 0 16 16`,...r},children:[$({tagName:`use`,properties:{href:`#${e.replace(/^#/,``)}`}})]})}function ex(e){let t=e.children[0];for(;t!=null;){if(t.type===`element`&&t.tagName===`code`)return t;t=`children`in t?t.children[0]:null}}function tx(e){return $({tagName:`div`,properties:{"data-gutter":``},children:e})}function nx(e,t,n,r={}){return $({tagName:`div`,properties:{"data-line-type":e,"data-column-number":t,"data-line-index":n,...r},children:t==null?void 0:[$({tagName:`span`,properties:{"data-line-number-content":``},children:[Qb(`${t}`)]})]})}function rx(e,t,n){return $({tagName:`div`,properties:{"data-gutter-buffer":t,"data-buffer-size":n,"data-line-type":t===`annotation`?void 0:e,style:t===`annotation`?`grid-row: span ${n};`:`grid-row: span ${n};min-height:calc(${n} * 1lh);`}})}function ix(e,t,n){let r=typeof n.lineInfo==`function`?n.lineInfo(t):n.lineInfo[t-1];if(r==null){let r=`processLine: line ${t}, contains no state.lineInfo`;throw console.error(r,{node:e,line:t,state:n}),Error(r)}return e.tagName=`div`,e.properties[`data-line`]=r.lineNumber,e.properties[`data-alt-line`]=r.altLineNumber,e.properties[`data-line-type`]=r.type,e.properties[`data-line-index`]=r.lineIndex,e.children.length===0&&e.children.push(Qb(`
|
|
1453
|
+
`)),e}var ax=Symbol(`no-token`),ox=Symbol(`multiple-tokens`);function sx(e){let t=cx(e);if(t!=null)return t;let n=ax,r=[],i=[],a,o=()=>{if(i.length===0||a==null){i=[],a=void 0;return}if(i.length===1){let e=i[0];if(e?.type===`element`){ux(e,a);for(let t of e.children)lx(t)}else lx(e);r.push(e),i=[],a=void 0;return}for(let e of i)lx(e);r.push($({tagName:`span`,properties:{"data-char":a},children:i})),i=[],a=void 0},s=e=>{if(e!==ax){if(e===ox){n=ox;return}if(n===ax){n=e;return}n!==e&&(n=ox)}};for(let t of e.children){let e=t.type===`element`?sx(t):ax;if(s(e),typeof e!=`number`){o(),r.push(t);continue}a!=null&&a!==e&&o(),a??=e,i.push(t)}return o(),e.children=r,n}function cx(e){let t=e.properties[`data-char`];if(typeof t==`number`)return t}function lx(e){if(e.type===`element`){e.properties[`data-char`]=void 0;for(let t of e.children)lx(t)}}function ux(e,t){e.properties[`data-char`]=t}function dx(e={}){let{classPrefix:t=`__shiki_`,classSuffix:n=``,classReplacer:r=e=>e}=e,i=new Map;function a(e){return Object.entries(e).map(([e,t])=>`${e}:${t}`).join(`;`)}function o(e){let o=t+fx(typeof e==`string`?e:a(e))+n;return o=r(o),i.has(o)||i.set(o,typeof e==`string`?e:{...e}),o}return{name:`@shikijs/transformers:style-to-class`,pre(e){if(!e.properties.style)return;let t=o(e.properties.style);delete e.properties.style,this.addClassToHast(e,t)},tokens(e){for(let t of e)for(let e of t){if(!e.htmlStyle)continue;let t=o(e.htmlStyle);e.htmlStyle={},e.htmlAttrs||={},e.htmlAttrs.class?e.htmlAttrs.class+=` ${t}`:e.htmlAttrs.class=t}},getClassRegistry(){return i},getCSS(){let e=``;for(let[t,n]of i.entries())e+=`.${t}{${typeof n==`string`?n:a(n)}}`;return e},clearRegistry(){i.clear()}}}function fx(e,t=0){let n=3735928559^t,r=1103547991^t;for(let t=0,i;t<e.length;t++)i=e.charCodeAt(t),n=Math.imul(n^i,2654435761),r=Math.imul(r^i,1597334677);return n=Math.imul(n^n>>>16,2246822507),n^=Math.imul(r^r>>>13,3266489909),r=Math.imul(r^r>>>16,2246822507),r^=Math.imul(n^n>>>13,3266489909),(4294967296*(2097151&r)+(n>>>0)).toString(36).slice(0,6)}function px(e=!1,t=!1){let n={lineInfo:[]},r=[{line(e){return delete e.properties.class,e},pre(t){let r=ex(t),i=[];if(r!=null){let t=1;for(let a of r.children)a.type===`element`&&(e&&sx(a),i.push(ix(a,t,n)),t++);r.children=i}return t},...e?{tokens(e){for(let t of e){let e=0;for(let n of t){let t=n;t.__lineChar??=e,e+=n.content.length}}},preprocess(e,t){t.mergeWhitespaces=`never`},span(e,t,n,r,i){if(i?.offset!=null&&i.content!=null){let t=i.__lineChar;return t!=null&&(e.properties[`data-char`]=t),e}return e}}:null}];return t&&r.push(hx,mx),{state:n,transformers:r,toClass:mx}}var mx=dx({classPrefix:`hl-`}),hx={name:`token-style-normalizer`,tokens(e){for(let t of e)for(let e of t){if(e.htmlStyle!=null)continue;let t={};e.color!=null&&(t.color=e.color),e.bgColor!=null&&(t[`background-color`]=e.bgColor),e.fontStyle!=null&&e.fontStyle!==0&&(e.fontStyle&1&&(t[`font-style`]=`italic`),e.fontStyle&2&&(t[`font-weight`]=`bold`),e.fontStyle&4&&(t[`text-decoration`]=`underline`)),Object.keys(t).length>0&&(e.htmlStyle=t)}}};function gx(e){return`--${e===`token`?`diffs-token`:`diffs`}-`}var _x=/^#(?:[0-9a-f]{3}0|[0-9a-f]{6}00)$/i,vx=/^0(?:\.0+)?%?$/;function yx(e){let t=e.indexOf(`(`);if(t<=0||!e.endsWith(`)`))return;let n=e.slice(0,t).trim();if(!/^(?:rgb|rgba|hsl|hsla|hwb|lab|lch|oklab|oklch|color)$/i.test(n))return;let r=e.slice(t+1,-1).trim();if(r.length===0)return;let i=r.lastIndexOf(`/`);if(i!==-1)return r.slice(i+1).trim();if(/^(?:rgba|hsla)$/i.test(n)){let e=r.split(`,`);if(e.length===4)return e[3]?.trim()}}function bx(e){let t=/^#([0-9a-f]{3}|[0-9a-f]{6}|[0-9a-f]{8})\b/i.exec(e.trim());if(t==null)return null;let n=t[1],r,i=1;return n.length===3?r=n.split(``).map(e=>e+e).join(``):n.length===6?r=n:(r=n.slice(0,6),i=parseInt(n.slice(6,8),16)/255),[parseInt(r.slice(0,2),16),parseInt(r.slice(2,4),16),parseInt(r.slice(4,6),16),i]}function xx(e){if(e==null)return null;let t=bx(e);if(t==null)return null;let n=t[0]/255,r=t[1]/255,i=t[2]/255,a=e=>e<=.03928?e/12.92:((e+.055)/1.055)**2.4;return .2126*a(n)+.7152*a(r)+.0722*a(i)}function Sx(e){if(e==null)return!1;let t=e.trim().toLowerCase();if(t===`transparent`||_x.test(t))return!0;let n=yx(t);return n!=null&&vx.test(n)}function Cx(e,t,n){if(t==null||n==null)return!1;let r=xx(e),i=xx(t),a=xx(n);return r==null||i==null||a==null?!1:Math.abs(r-a)<Math.abs(r-i)}var wx=new WeakMap;function Tx(e){let t=wx.get(e);if(t!=null)return t;let n=e.colors??{},r={...n},i=n[`editor.background`]??e.bg,a=n[`editor.foreground`]??e.fg,o=n[`sideBar.background`]??i,s=n[`sideBar.foreground`]??a;Ex(r,`editor.background`,i),Ex(r,`editor.foreground`,a),Ex(r,`sideBar.background`,o),Ex(r,`sideBar.foreground`,s),Ex(r,`input.background`,n[`input.background`]??o),Ex(r,`sideBarSectionHeader.foreground`,n[`sideBarSectionHeader.foreground`]??s),Ex(r,`list.activeSelectionForeground`,n[`list.activeSelectionForeground`]??s),Ex(r,`gitDecoration.addedResourceForeground`,Dx(n[`gitDecoration.addedResourceForeground`],n[`terminal.ansiGreen`],n[`editorGutter.addedBackground`])),Ex(r,`gitDecoration.modifiedResourceForeground`,Dx(n[`gitDecoration.modifiedResourceForeground`],n[`terminal.ansiBlue`],n[`editorGutter.modifiedBackground`])),Ex(r,`gitDecoration.deletedResourceForeground`,Dx(n[`gitDecoration.deletedResourceForeground`],n[`terminal.ansiRed`],n[`editorGutter.deletedBackground`]));let c=(Sx(n[`list.focusOutline`])?void 0:n[`list.focusOutline`])??(Sx(n.focusBorder)?void 0:n.focusBorder);c==null?delete r[`list.focusOutline`]:r[`list.focusOutline`]=c;let l=n[`list.hoverBackground`];l!=null&&(Ox(l,o)||Cx(l,o,s))&&delete r[`list.hoverBackground`];let u=Object.freeze({...e,colors:Object.freeze(r)});return wx.set(e,u),u}function Ex(e,t,n){n!=null&&n!==``&&(e[t]=n)}function Dx(...e){for(let t of e)if(t!=null&&t!==``)return t}function Ox(e,t){return t!=null&&e.toLowerCase()===t.toLowerCase()}function kx({theme:e=Tu,highlighter:t,prefix:n}){let r=``;if(typeof e==`string`){let i=t.getTheme(e),a=Tx(i);r+=`color:${a.fg};`,r+=`background-color:${a.bg};`,r+=`${gx(`global`)}fg:${a.fg};`,r+=`${gx(`global`)}bg:${a.bg};`,r+=Ax(i,n)}else{let n=t.getTheme(e.dark),i=Tx(n);r+=`${gx(`global`)}dark:${i.fg};`,r+=`${gx(`global`)}dark-bg:${i.bg};`,r+=Ax(n,`dark`),n=t.getTheme(e.light),i=Tx(n),r+=`${gx(`global`)}light:${i.fg};`,r+=`${gx(`global`)}light-bg:${i.bg};`,r+=Ax(n,`light`)}return r}function Ax(e,t){t=t==null?``:`${t}-`;let n=``,r=e.colors?.[`gitDecoration.addedResourceForeground`]??e.colors?.[`terminal.ansiGreen`];r!=null&&(n+=`${gx(`global`)}${t}addition-color:${r};`);let i=e.colors?.[`gitDecoration.deletedResourceForeground`]??e.colors?.[`terminal.ansiRed`];i!=null&&(n+=`${gx(`global`)}${t}deletion-color:${i};`);let a=e.colors?.[`gitDecoration.modifiedResourceForeground`]??e.colors?.[`terminal.ansiBlue`];return a!=null&&(n+=`${gx(`global`)}${t}modified-color:${a};`),n}function jx(e){let t=e.children[0];for(;t!=null;){if(t.type===`element`&&t.tagName===`code`)return t.children;t=`children`in t?t.children[0]:null}throw console.error(e),Error(`getLineNodes: Unable to find children`)}function Mx(e){return e===``?[]:e.split(_u)}var Nx={forcePlainText:!1};function Px(e,t,{theme:n=Tu,tokenizeMaxLineLength:r,useTokenTransformer:i},{forcePlainText:a,startingLine:o,totalLines:s,lines:c}=Nx){a?(o??=0,s??=1/0):(o=0,s=1/0);let l=o>0||s<1/0,{state:u,transformers:d}=px(i),f=a?`text`:e.lang??Kb(e.name),p=typeof n==`string`?t.getTheme(n).type:void 0,m=kx({theme:n,highlighter:t});u.lineInfo=e=>({type:`context`,lineIndex:e-1+o,lineNumber:e+o});let h=typeof n==`string`?{lang:f,theme:n,transformers:d,defaultColor:!1,cssVariablePrefix:gx(`token`),tokenizeMaxLineLength:r,tokenizeTimeLimit:0}:{lang:f,themes:n,transformers:d,defaultColor:!1,cssVariablePrefix:gx(`token`),tokenizeMaxLineLength:r,tokenizeTimeLimit:0},g=jx(t.codeToHast(l?Fx(c??Mx(e.contents),o,s):Zb(e.contents),h)),_=l?Array(o):g;return l&&_.push(...g),{code:_,themeStyles:m,baseThemeType:p}}function Fx(e,t,n){let r=``;return Xb({lines:e,startingLine:t,totalLines:n,callback({content:e}){r+=e}}),r}function Ix(e,t){return e===t||e?.cacheKey!=null&&e.cacheKey===t?.cacheKey}function Lx(e,t){return Fu(e.theme,t.theme)&&e.useTokenTransformer===t.useTokenTransformer&&e.tokenizeMaxLineLength===t.tokenizeMaxLineLength&&e.lineDiffType===t.lineDiffType&&e.maxLineDiffLength===t.maxLineDiffLength}function Rx(e){let t=e.lang??Kb(e.name),n=e.lang??(e.prevName==null?`text`:Kb(e.prevName));return t===`text`&&n===`text`}function zx(e){return{...ju,...e}}function Bx(e,t){let n=Vx(e,t);return t?n:e.diffHeaderHeight+n}function Vx(e,t){return e.paddingTop??(t?e.spacing:0)}function Hx(e){return e.paddingBottom??e.spacing}function Ux(e){switch(e){case`simple`:return 4;case`metadata`:case`line-info`:case`line-info-basic`:case`custom`:return 32}}function Wx({isPartial:e,rangeSize:t,expandedHunks:n,hunkIndex:r,collapsedContextThreshold:i}){let a=Math.max(t,0);if(a===0||e)return{fromStart:0,fromEnd:0,rangeSize:a,collapsedLines:a,renderAll:!1};if(n===!0||a<=i)return{fromStart:a,fromEnd:0,rangeSize:a,collapsedLines:0,renderAll:!0};let o=n?.get(r),s=Math.min(Math.max(o?.fromStart??0,0),a),c=Math.min(Math.max(o?.fromEnd??0,0),a),l=s+c,u=l>=a;return{fromStart:u?a:s,fromEnd:u?0:c,rangeSize:a,collapsedLines:Math.max(a-l,0),renderAll:u}}function Gx({fileDiff:e,errorPrefix:t}){let n=e.hunks[e.hunks.length-1];if(n==null||e.isPartial||e.additionLines.length===0||e.deletionLines.length===0)return 0;let r=e.additionLines.length-(n.additionLineIndex+n.additionCount),i=e.deletionLines.length-(n.deletionLineIndex+n.deletionCount);if(r<=0&&i<=0)return 0;if(r!==i)throw Error(`${t}: trailing context mismatch (additions=${r}, deletions=${i}) for ${e.name}`);return Math.min(r,i)}function Kx({fileDiff:e,hunkIndex:t,expandedHunks:n,collapsedContextThreshold:r,errorPrefix:i}){if(t!==e.hunks.length-1)return;let a=Gx({fileDiff:e,errorPrefix:i});if(a<=0)return;if(n===!0||a<=r)return{fromStart:a,fromEnd:0,rangeSize:a,collapsedLines:0,renderAll:!0};let o=n?.get(e.hunks.length),s=Math.min(Math.max(o?.fromStart??0,0),a);return{fromStart:s,fromEnd:0,rangeSize:a,collapsedLines:a-s,renderAll:s>=a}}function qx({type:e,metrics:t}){return t.hunkSeparatorHeight??Ux(e)}function Jx({type:e,metrics:t}){return e===`simple`||e===`metadata`||e===`line-info-basic`?0:t.spacing}function Yx({type:e,hunkIndex:t,hunkSpecs:n}){switch(e){case`simple`:return t>0;case`metadata`:return n!=null;case`line-info`:case`line-info-basic`:case`custom`:return!0}}function Xx(e){return e!==`simple`&&e!==`metadata`}function Zx({type:e,metrics:t,hunkIndex:n,hunkSpecs:r}){if(!Yx({type:e,hunkIndex:n,hunkSpecs:r}))return;let i=qx({type:e,metrics:t}),a=Jx({type:e,metrics:t}),o=n>0?a:0,s=a;return{height:i,gapBefore:o,gapAfter:s,totalHeight:o+i+s}}function Qx({type:e,metrics:t}){if(!Xx(e))return;let n=qx({type:e,metrics:t}),r=Jx({type:e,metrics:t});return{height:n,gapBefore:r,gapAfter:0,totalHeight:r+n}}function $x({diff:e,diffStyle:t,startingLine:n=0,totalLines:r=1/0,expandedHunks:i,collapsedContextThreshold:a=1,callback:o}){let s=eS({diff:e,diffStyle:t,startingLine:n,expandedHunks:i,collapsedContextThreshold:a}),c={viewportStart:n,viewportEnd:n+r,isWindowedHighlight:n>0||r<1/0,splitCount:s.splitCount,unifiedCount:s.unifiedCount,finalHunkIndex:e.hunks.length-1,shouldBreak(){if(!c.isWindowedHighlight)return!1;let e=c.unifiedCount>=n+r,i=c.splitCount>=n+r;return t===`unified`?e:(t===`split`||e)&&i},shouldSkip(e,r){if(!c.isWindowedHighlight)return!1;let i=c.unifiedCount+e<n,a=c.splitCount+r<n;return t===`unified`?i:(t===`split`||i)&&a},incrementCounts(e,n){(t===`unified`||t===`both`)&&(c.unifiedCount+=e),(t===`split`||t===`both`)&&(c.splitCount+=n)},isInWindow(e,n){if(!c.isWindowedHighlight)return!0;let r=c.isInUnifiedWindow(e),i=c.isInSplitWindow(n);return t===`unified`?r:t===`split`?i:r||i},isInUnifiedWindow(e){return!c.isWindowedHighlight||c.unifiedCount>=n-e&&c.unifiedCount<n+r},isInSplitWindow(e){return!c.isWindowedHighlight||c.splitCount>=n-e&&c.splitCount<n+r},emit(e,n=!1){return n||(t===`unified`?c.incrementCounts(1,0):t===`split`?c.incrementCounts(0,1):c.incrementCounts(1,1)),o(e)??!1}};hunkIterator:for(let n=s.hunkIndex;n<e.hunks.length;n++){let r=e.hunks[n];if(r==null)throw Error(`iterateOverDiff: invalid hunk index`);if(c.shouldBreak())break;let o=Wx({isPartial:e.isPartial,rangeSize:r.collapsedBefore,expandedHunks:i,hunkIndex:n,collapsedContextThreshold:a}),s=n===c.finalHunkIndex?Kx({fileDiff:e,hunkIndex:n,expandedHunks:i,collapsedContextThreshold:a,errorPrefix:`iterateOverDiff`}):void 0,l=o.fromStart+o.fromEnd;function u(e,n){return s==null||s.collapsedLines<=0||s.fromStart+s.fromEnd>0?0:t===`unified`?e===r.unifiedLineStart+r.unifiedLineCount-1?s.collapsedLines:0:n===r.splitLineStart+r.splitLineCount-1?s.collapsedLines:0}let d=o.collapsedLines===0;function f(){return d?0:(d=!0,o.collapsedLines)}if(c.shouldSkip(l,l))c.incrementCounts(l,l),f();else{let e=r.unifiedLineStart-o.rangeSize,i=r.splitLineStart-o.rangeSize,a=r.deletionLineIndex-o.rangeSize,s=r.additionLineIndex-o.rangeSize,l=r.deletionStart-o.rangeSize,u=r.additionStart-o.rangeSize;if(rS(c,o.fromStart,t,t=>c.emit({hunkIndex:n,hunk:r,collapsedBefore:0,collapsedAfter:0,type:`context-expanded`,deletionLine:{lineNumber:l+t,lineIndex:a+t,noEOFCR:!1,unifiedLineIndex:e+t,splitLineIndex:i+t},additionLine:{unifiedLineIndex:e+t,splitLineIndex:i+t,lineIndex:s+t,lineNumber:u+t,noEOFCR:!1}}))||(e=r.unifiedLineStart-o.fromEnd,i=r.splitLineStart-o.fromEnd,a=r.deletionLineIndex-o.fromEnd,s=r.additionLineIndex-o.fromEnd,l=r.deletionStart-o.fromEnd,u=r.additionStart-o.fromEnd,rS(c,o.fromEnd,t,t=>c.emit({hunkIndex:n,hunk:r,collapsedBefore:f(),collapsedAfter:0,type:`context-expanded`,deletionLine:{lineNumber:l+t,lineIndex:a+t,noEOFCR:!1,unifiedLineIndex:e+t,splitLineIndex:i+t},additionLine:{unifiedLineIndex:e+t,splitLineIndex:i+t,lineIndex:s+t,lineNumber:u+t,noEOFCR:!1}}),()=>{f()})))break hunkIterator}let p=r.unifiedLineStart,m=r.splitLineStart,h=r.deletionLineIndex,g=r.additionLineIndex,_=r.deletionStart,v=r.additionStart,y=r.hunkContent.at(-1);for(let e of r.hunkContent){if(c.shouldBreak())break hunkIterator;let i=e===y;if(e.type===`context`){if(c.shouldSkip(e.lines,e.lines))c.incrementCounts(e.lines,e.lines),f();else if(rS(c,e.lines,t,t=>{let a=i&&t===e.lines-1,o=p+t,s=m+t;return c.emit({hunkIndex:n,hunk:r,collapsedBefore:f(),collapsedAfter:u(o,s),type:`context`,deletionLine:{lineNumber:_+t,lineIndex:h+t,noEOFCR:a&&r.noEOFCRDeletions,unifiedLineIndex:o,splitLineIndex:s},additionLine:{unifiedLineIndex:o,splitLineIndex:s,lineIndex:g+t,lineNumber:v+t,noEOFCR:a&&r.noEOFCRAdditions}})},()=>{f()}))break hunkIterator;p+=e.lines,m+=e.lines,h+=e.lines,g+=e.lines,_+=e.lines,v+=e.lines}else{let a=Math.max(e.deletions,e.additions),o=e.deletions+e.additions;if(!c.shouldSkip(o,a)){let s=iS(c,e,t);(s[0]?.[0]??0)>0&&f();for(let[l,d]of s)for(let s=l;s<d;s++){let l=u(p+s,t===`unified`?m+(s<e.deletions?s:s-e.deletions):m+s);if(c.emit(aS({hunkIndex:n,hunk:r,collapsedBefore:f(),collapsedAfter:l,diffStyle:t,index:s,unifiedLineIndex:p,splitLineIndex:m,additionLineIndex:g,deletionLineIndex:h,additionLineNumber:v,deletionLineNumber:_,content:e,isLastContent:i,unifiedCount:o,splitCount:a}),!0))break hunkIterator}}f(),c.incrementCounts(o,a),p+=o,m+=a,h+=e.deletions,g+=e.additions,_+=e.deletions,v+=e.additions}}if(s!=null){let{collapsedLines:n,fromStart:r,fromEnd:i}=s,a=r+i;if(rS(c,a,t,t=>{let r=t===a-1;return c.emit({hunkIndex:e.hunks.length,hunk:void 0,collapsedBefore:0,collapsedAfter:r?n:0,type:`context-expanded`,deletionLine:{lineNumber:_+t,lineIndex:h+t,noEOFCR:!1,unifiedLineIndex:p+t,splitLineIndex:m+t},additionLine:{unifiedLineIndex:p+t,splitLineIndex:m+t,lineIndex:g+t,lineNumber:v+t,noEOFCR:!1}})},void 0,()=>c.shouldBreak()))break hunkIterator}}}function eS({diff:e,diffStyle:t,startingLine:n,expandedHunks:r,collapsedContextThreshold:i}){if(n<=0||t===`both`)return{hunkIndex:0,splitCount:0,unifiedCount:0};let a=tS({diff:e,expandedHunks:r,collapsedContextThreshold:i}),o=0,s=e.hunks.length-1,c=e.hunks.length;for(;o<=s;){let e=o+s>>1,r=a[e+1];if(r==null)throw Error(`iterateOverDiff: invalid hunk prefix index`);(t===`unified`?r.unifiedCount:r.splitCount)>n?(c=e,s=e-1):o=e+1}if(c>=e.hunks.length){let t=a[e.hunks.length];if(t==null)throw Error(`iterateOverDiff: invalid terminal hunk prefix index`);return{hunkIndex:e.hunks.length,splitCount:t.splitCount,unifiedCount:t.unifiedCount}}let l=a[c];if(l==null)throw Error(`iterateOverDiff: invalid selected hunk prefix index`);return{hunkIndex:c,splitCount:l.splitCount,unifiedCount:l.unifiedCount}}function tS({diff:e,expandedHunks:t,collapsedContextThreshold:n}){let r=0,i=0,a=e.hunks.length-1,o=[{splitCount:0,unifiedCount:0}];for(let s=0;s<e.hunks.length;s++){let c=e.hunks[s];if(c==null)throw Error(`iterateOverDiff: invalid hunk summary index`);let l=Wx({isPartial:e.isPartial,rangeSize:c.collapsedBefore,expandedHunks:t,hunkIndex:s,collapsedContextThreshold:n}),u=l.fromStart+l.fromEnd;r+=u+c.splitLineCount,i+=u+c.unifiedLineCount;let d=s===a?Kx({fileDiff:e,hunkIndex:s,expandedHunks:t,collapsedContextThreshold:n,errorPrefix:`iterateOverDiff`}):void 0;if(d!=null){let e=d.fromStart+d.fromEnd;r+=e,i+=e}o.push({splitCount:r,unifiedCount:i})}return o}function nS(e,t,n){if(!e.isWindowedHighlight||t<=0)return[0,t];let r=[];function i(n){let i=Math.max(0,e.viewportStart-n),a=Math.min(t,e.viewportEnd-n);a>i&&r.push([i,a])}if(n!==`split`&&i(e.unifiedCount),n!==`unified`&&i(e.splitCount),r.length===0)return[0,0];let a=r[0][0],o=r[0][1];for(let e=1;e<r.length;e++){let t=r[e];a=Math.min(a,t[0]),o=Math.max(o,t[1])}return[a,o]}function rS(e,t,n,r,i,a){let[o,s]=nS(e,t,n);o>0&&(e.incrementCounts(o,o),i?.());let c=o;for(;c<t;){if(a?.()===!0)return!0;if(c>=s){e.incrementCounts(t-c,t-c);break}if(e.isInWindow(0,0)){if(r(c)===!0)return!0}else e.incrementCounts(1,1);c++}return!1}function iS(e,t,n){if(!e.isWindowedHighlight)return[[0,n===`unified`?t.deletions+t.additions:Math.max(t.deletions,t.additions)]];let r=n!==`split`,i=n!==`unified`,a=n===`unified`?`unified`:`split`,o=[];function s(t,n){if(t+n<=e.viewportStart||t>=e.viewportEnd)return;let r=Math.max(0,e.viewportStart-t),i=Math.min(n,e.viewportEnd-t);return i>r?[r,i]:void 0}function c(e,n){return a===`split`?e:n===`additions`?[e[0]+t.deletions,e[1]+t.deletions]:e}function l(e,t){if(e==null)return;let[n,r]=c(e,t);r>n&&o.push([n,r])}if(r&&(l(s(e.unifiedCount,t.deletions),`deletions`),l(s(e.unifiedCount+t.deletions,t.additions),`additions`)),i&&(l(s(e.splitCount,t.deletions),`deletions`),l(s(e.splitCount,t.additions),`additions`)),o.length===0)return o;o.sort((e,t)=>e[0]-t[0]);let u=[o[0]];for(let[e,t]of o.slice(1)){let n=u[u.length-1];e<=n[1]?n[1]=Math.max(n[1],t):u.push([e,t])}return u}function aS({hunkIndex:e,hunk:t,collapsedAfter:n,collapsedBefore:r,diffStyle:i,index:a,unifiedLineIndex:o,splitLineIndex:s,additionLineIndex:c,deletionLineIndex:l,additionLineNumber:u,deletionLineNumber:d,content:f,isLastContent:p,unifiedCount:m,splitCount:h}){let g=a<f.deletions?o+a:void 0,_=i===`unified`?a>=f.deletions?o+a:void 0:a<f.additions?o+f.deletions+a:void 0,v=i===`unified`?s+(a<f.deletions?a:a-f.deletions):s+a,y=a<f.deletions?l+a:void 0,b=a<f.deletions?d+a:void 0,x=i===`unified`?a>=f.deletions?c+(a-f.deletions):void 0:a<f.additions?c+a:void 0,S=i===`unified`?a>=f.deletions?u+(a-f.deletions):void 0:a<f.additions?u+a:void 0,C=i===`unified`?p&&a===f.deletions-1&&t.noEOFCRDeletions:p&&a===h-1&&t.noEOFCRDeletions,ee=i===`unified`?p&&a===m-1&&t.noEOFCRAdditions:p&&a===h-1&&t.noEOFCRAdditions,w=y!=null&&b!=null&&g!=null?{lineNumber:b,lineIndex:y,noEOFCR:C,unifiedLineIndex:g,splitLineIndex:v}:void 0,T=x!=null&&S!=null&&_!=null?{unifiedLineIndex:_,splitLineIndex:v,lineIndex:x,lineNumber:S,noEOFCR:ee}:void 0;if(w==null&&T!=null)return{type:`change`,hunkIndex:e,hunk:t,collapsedAfter:n,collapsedBefore:r,deletionLine:void 0,additionLine:T};if(w!=null&&T==null)return{type:`change`,hunkIndex:e,hunk:t,collapsedAfter:n,collapsedBefore:r,deletionLine:w,additionLine:void 0};if(w==null||T==null)throw Error(`iterateOverDiff: missing change line data`);return{type:`change`,hunkIndex:e,hunk:t,collapsedAfter:n,collapsedBefore:r,deletionLine:w,additionLine:T}}var oS=class{diff(e,t,n={}){let r;typeof n==`function`?(r=n,n={}):`callback`in n&&(r=n.callback);let i=this.castInput(e,n),a=this.castInput(t,n),o=this.removeEmpty(this.tokenize(i,n)),s=this.removeEmpty(this.tokenize(a,n));return this.diffWithOptionsObj(o,s,n,r)}diffWithOptionsObj(e,t,n,r){let i=e=>{if(e=this.postProcess(e,n),r){setTimeout(function(){r(e)},0);return}else return e},a=t.length,o=e.length,s=1,c=a+o;n.maxEditLength!=null&&(c=Math.min(c,n.maxEditLength));let l=n.timeout??1/0,u=Date.now()+l,d=[{oldPos:-1,lastComponent:void 0}],f=this.extractCommon(d[0],t,e,0,n);if(d[0].oldPos+1>=o&&f+1>=a)return i(this.buildValues(d[0].lastComponent,t,e));let p=-1/0,m=1/0,h=()=>{for(let r=Math.max(p,-s);r<=Math.min(m,s);r+=2){let s,c=d[r-1],l=d[r+1];c&&(d[r-1]=void 0);let u=!1;if(l){let e=l.oldPos-r;u=l&&0<=e&&e<a}let h=c&&c.oldPos+1<o;if(!u&&!h){d[r]=void 0;continue}if(s=!h||u&&c.oldPos<l.oldPos?this.addToPath(l,!0,!1,0,n):this.addToPath(c,!1,!0,1,n),f=this.extractCommon(s,t,e,r,n),s.oldPos+1>=o&&f+1>=a)return i(this.buildValues(s.lastComponent,t,e))||!0;d[r]=s,s.oldPos+1>=o&&(m=Math.min(m,r-1)),f+1>=a&&(p=Math.max(p,r+1))}s++};if(r)(function e(){setTimeout(function(){if(s>c||Date.now()>u)return r(void 0);h()||e()},0)})();else for(;s<=c&&Date.now()<=u;){let e=h();if(e)return e}}addToPath(e,t,n,r,i){let a=e.lastComponent;return a&&!i.oneChangePerToken&&a.added===t&&a.removed===n?{oldPos:e.oldPos+r,lastComponent:{count:a.count+1,added:t,removed:n,previousComponent:a.previousComponent}}:{oldPos:e.oldPos+r,lastComponent:{count:1,added:t,removed:n,previousComponent:a}}}extractCommon(e,t,n,r,i){let a=t.length,o=n.length,s=e.oldPos,c=s-r,l=0;for(;c+1<a&&s+1<o&&this.equals(n[s+1],t[c+1],i);)c++,s++,l++,i.oneChangePerToken&&(e.lastComponent={count:1,previousComponent:e.lastComponent,added:!1,removed:!1});return l&&!i.oneChangePerToken&&(e.lastComponent={count:l,previousComponent:e.lastComponent,added:!1,removed:!1}),e.oldPos=s,c}equals(e,t,n){return n.comparator?n.comparator(e,t):e===t||!!n.ignoreCase&&e.toLowerCase()===t.toLowerCase()}removeEmpty(e){let t=[];for(let n=0;n<e.length;n++)e[n]&&t.push(e[n]);return t}castInput(e,t){return e}tokenize(e,t){return Array.from(e)}join(e){return e.join(``)}postProcess(e,t){return e}get useLongestToken(){return!1}buildValues(e,t,n){let r=[],i;for(;e;)r.push(e),i=e.previousComponent,delete e.previousComponent,e=i;r.reverse();let a=r.length,o=0,s=0,c=0;for(;o<a;o++){let e=r[o];if(e.removed)e.value=this.join(n.slice(c,c+e.count)),c+=e.count;else{if(!e.added&&this.useLongestToken){let r=t.slice(s,s+e.count);r=r.map(function(e,t){let r=n[c+t];return r.length>e.length?r:e}),e.value=this.join(r)}else e.value=this.join(t.slice(s,s+e.count));s+=e.count,e.added||(c+=e.count)}}return r}},sS=new class extends oS{};function cS(e,t,n){return sS.diff(e,t,n)}function lS(e,t){let n;for(n=0;n<e.length&&n<t.length;n++)if(e[n]!=t[n])return e.slice(0,n);return e.slice(0,n)}function uS(e,t){let n;if(!e||!t||e[e.length-1]!=t[t.length-1])return``;for(n=0;n<e.length&&n<t.length;n++)if(e[e.length-(n+1)]!=t[t.length-(n+1)])return e.slice(-n);return e.slice(-n)}function dS(e,t,n){if(e.slice(0,t.length)!=t)throw Error(`string ${JSON.stringify(e)} doesn't start with prefix ${JSON.stringify(t)}; this is a bug`);return n+e.slice(t.length)}function fS(e,t,n){if(!t)return e+n;if(e.slice(-t.length)!=t)throw Error(`string ${JSON.stringify(e)} doesn't end with suffix ${JSON.stringify(t)}; this is a bug`);return e.slice(0,-t.length)+n}function pS(e,t){return dS(e,t,``)}function mS(e,t){return fS(e,t,``)}function hS(e,t){return t.slice(0,gS(e,t))}function gS(e,t){let n=0;e.length>t.length&&(n=e.length-t.length);let r=t.length;e.length<t.length&&(r=e.length);let i=Array(r),a=0;i[0]=0;for(let e=1;e<r;e++){for(t[e]==t[a]?i[e]=i[a]:i[e]=a;a>0&&t[e]!=t[a];)a=i[a];t[e]==t[a]&&a++}a=0;for(let r=n;r<e.length;r++){for(;a>0&&e[r]!=t[a];)a=i[a];e[r]==t[a]&&a++}return a}function _S(e,t){let n=[];for(let r of Array.from(t.segment(e))){let e=r.segment;n.length&&/\s/.test(n[n.length-1])&&/\s/.test(e)?n[n.length-1]+=e:n.push(e)}return n}function vS(e,t){if(t)return bS(e,t)[1];let n;for(n=e.length-1;n>=0&&e[n].match(/\s/);n--);return e.substring(n+1)}function yS(e,t){if(t)return bS(e,t)[0];let n=e.match(/^\s*/);return n?n[0]:``}function bS(e,t){if(!t)return[yS(e),vS(e)];if(t.resolvedOptions().granularity!=`word`)throw Error(`The segmenter passed must have a granularity of "word"`);let n=_S(e,t),r=n[0],i=n[n.length-1];return[/\s/.test(r)?r:``,/\s/.test(i)?i:``]}var xS=`a-zA-Z0-9_\\u{AD}\\u{C0}-\\u{D6}\\u{D8}-\\u{F6}\\u{F8}-\\u{2C6}\\u{2C8}-\\u{2D7}\\u{2DE}-\\u{2FF}\\u{1E00}-\\u{1EFF}`,SS=RegExp(`[${xS}]+|\\s+|[^${xS}]`,`ug`);new class extends oS{equals(e,t,n){return n.ignoreCase&&(e=e.toLowerCase(),t=t.toLowerCase()),e.trim()===t.trim()}tokenize(e,t={}){let n;if(t.intlSegmenter){let r=t.intlSegmenter;if(r.resolvedOptions().granularity!=`word`)throw Error(`The segmenter passed must have a granularity of "word"`);n=_S(e,r)}else n=e.match(SS)||[];let r=[],i=null;return n.forEach(e=>{/\s/.test(e)?i==null?r.push(e):r.push(r.pop()+e):i!=null&&/\s/.test(i)?r[r.length-1]==i?r.push(r.pop()+e):r.push(i+e):r.push(e),i=e}),r}join(e){return e.map((e,t)=>t==0?e:e.replace(/^\s+/,``)).join(``)}postProcess(e,t){if(!e||t.oneChangePerToken)return e;let n=null,r=null,i=null;return e.forEach(e=>{e.added?r=e:e.removed?i=e:((r||i)&&CS(n,i,r,e,t.intlSegmenter),n=e,r=null,i=null)}),(r||i)&&CS(n,i,r,null,t.intlSegmenter),e}};function CS(e,t,n,r,i){if(t&&n){let[a,o]=bS(t.value,i),[s,c]=bS(n.value,i);if(e){let r=lS(a,s);e.value=fS(e.value,s,r),t.value=pS(t.value,r),n.value=pS(n.value,r)}if(r){let e=uS(o,c);r.value=dS(r.value,c,e),t.value=mS(t.value,e),n.value=mS(n.value,e)}}else if(n){if(e){let e=yS(n.value,i);n.value=n.value.substring(e.length)}if(r){let e=yS(r.value,i);r.value=r.value.substring(e.length)}}else if(e&&r){let n=yS(r.value,i),[a,o]=bS(t.value,i),s=lS(n,a);t.value=pS(t.value,s);let c=uS(pS(n,s),o);t.value=mS(t.value,c),r.value=dS(r.value,n,c),e.value=fS(e.value,n,n.slice(0,n.length-c.length))}else if(r){let e=yS(r.value,i),n=hS(vS(t.value,i),e);t.value=mS(t.value,n)}else if(e){let n=hS(vS(e.value,i),yS(t.value,i));t.value=pS(t.value,n)}}var wS=new class extends oS{tokenize(e){let t=RegExp(`(\\r?\\n)|[${xS}]+|[^\\S\\n\\r]+|[^${xS}]`,`ug`);return e.match(t)||[]}};function TS(e,t,n){return wS.diff(e,t,n)}var ES=new class extends oS{constructor(){super(...arguments),this.tokenize=OS}equals(e,t,n){return n.ignoreWhitespace?((!n.newlineIsToken||!e.includes(`
|
|
1454
|
+
`))&&(e=e.trim()),(!n.newlineIsToken||!t.includes(`
|
|
1455
|
+
`))&&(t=t.trim())):n.ignoreNewlineAtEof&&!n.newlineIsToken&&(e.endsWith(`
|
|
1456
|
+
`)&&(e=e.slice(0,-1)),t.endsWith(`
|
|
1457
|
+
`)&&(t=t.slice(0,-1))),super.equals(e,t,n)}};function DS(e,t,n){return ES.diff(e,t,n)}function OS(e,t){t.stripTrailingCr&&(e=e.replace(/\r\n/g,`
|
|
1458
|
+
`));let n=[],r=e.split(/(\n|\r\n)/);r[r.length-1]||r.pop();for(let e=0;e<r.length;e++){let i=r[e];e%2&&!t.newlineIsToken?n[n.length-1]+=i:n.push(i)}return n}function kS(e){return e==`.`||e==`!`||e==`?`}new class extends oS{tokenize(e){let t=[],n=0;for(let r=0;r<e.length;r++){if(r==e.length-1){t.push(e.slice(n));break}if(kS(e[r])&&e[r+1].match(/\s/)){for(t.push(e.slice(n,r+1)),r=n=r+1;e[r+1]?.match(/\s/);)r++;t.push(e.slice(n,r+1)),n=r+1}}return t}},new class extends oS{tokenize(e){return e.split(/([{}:;,]|\s+)/)}},new class extends oS{constructor(){super(...arguments),this.tokenize=OS}get useLongestToken(){return!0}castInput(e,t){let{undefinedReplacement:n,stringifyReplacer:r=(e,t)=>t===void 0?n:t}=t;return typeof e==`string`?e:JSON.stringify(AS(e,null,null,r),null,` `)}equals(e,t,n){return super.equals(e.replace(/,([\r\n])/g,`$1`),t.replace(/,([\r\n])/g,`$1`),n)}};function AS(e,t,n,r,i){t||=[],n||=[],r&&(e=r(i===void 0?``:i,e));let a;for(a=0;a<t.length;a+=1)if(t[a]===e)return n[a];let o;if(Object.prototype.toString.call(e)===`[object Array]`){for(t.push(e),o=Array(e.length),n.push(o),a=0;a<e.length;a+=1)o[a]=AS(e[a],t,n,r,String(a));return t.pop(),n.pop(),o}if(e&&e.toJSON&&(e=e.toJSON()),typeof e==`object`&&e){t.push(e),o={},n.push(o);let i=[],s;for(s in e)Object.prototype.hasOwnProperty.call(e,s)&&i.push(s);for(i.sort(),a=0;a<i.length;a+=1)s=i[a],o[s]=AS(e[s],t,n,r,s);t.pop(),n.pop()}else o=e;return o}new class extends oS{tokenize(e){return e.slice()}join(e){return e}removeEmpty(e){return e}};function jS(e){for(let t=0;t<e.length;t++)if(e[t]<` `||e[t]>`~`||e[t]===`"`||e[t]===`\\`)return!0;return!1}function MS(e){if(!jS(e))return e;let t=`"`,n=new TextEncoder().encode(e),r=0;for(;r<n.length;){let e=n[r];e===7?t+=`\\a`:e===8?t+=`\\b`:e===9?t+=`\\t`:e===10?t+=`\\n`:e===11?t+=`\\v`:e===12?t+=`\\f`:e===13?t+=`\\r`:e===34?t+=`\\"`:e===92?t+=`\\\\`:e>=32&&e<=126?t+=String.fromCharCode(e):t+=`\\`+e.toString(8).padStart(3,`0`),r++}return t+=`"`,t}var NS={includeIndex:!0,includeUnderline:!0,includeFileHeaders:!0};function PS(e,t,n,r,i,a,o){let s;s=o?typeof o==`function`?{callback:o}:o:{},s.context===void 0&&(s.context=4);let c=s.context;if(s.newlineIsToken)throw Error(`newlineIsToken may not be used with patch-generation functions, only with diffing functions`);if(s.callback){let{callback:e}=s;DS(n,r,Object.assign(Object.assign({},s),{callback:t=>{e(l(t))}}))}else return l(DS(n,r,s));function l(n){if(!n)return;n.push({value:``,lines:[]});function r(e){return e.map(function(e){return` `+e})}let o=[],s=0,l=0,u=[],d=1,f=1;for(let e=0;e<n.length;e++){let t=n[e],i=t.lines||LS(t.value);if(t.lines=i,t.added||t.removed){if(!s){let t=n[e-1];s=d,l=f,t&&(u=c>0?r(t.lines.slice(-c)):[],s-=u.length,l-=u.length)}for(let e of i)u.push((t.added?`+`:`-`)+e);t.added?f+=i.length:d+=i.length}else{if(s)if(i.length<=c*2&&e<n.length-2)for(let e of r(i))u.push(e);else{let e=Math.min(i.length,c);for(let t of r(i.slice(0,e)))u.push(t);let t={oldStart:s,oldLines:d-s+e,newStart:l,newLines:f-l+e,lines:u};o.push(t),s=0,l=0,u=[]}d+=i.length,f+=i.length}}for(let e of o)for(let t=0;t<e.lines.length;t++)e.lines[t].endsWith(`
|
|
1459
|
+
`)?e.lines[t]=e.lines[t].slice(0,-1):(e.lines.splice(t+1,0,`\`),t++);return{oldFileName:e,newFileName:t,oldHeader:i,newHeader:a,hunks:o}}}function FS(e,t){if(t||=NS,Array.isArray(e)){if(e.length>1&&!t.includeFileHeaders&&!e.every(e=>e.isGit))throw Error(`Cannot omit file headers on a multi-file patch. (The result would be unparseable; how would a tool trying to apply the patch know which changes are to which file?)`);return e.map(e=>FS(e,t)).join(`
|
|
1460
|
+
`)}let n=[];if(e.isGit){if(t=NS,!e.oldFileName)throw Error(`oldFileName must be specified for Git patches`);if(!e.newFileName)throw Error(`newFileName must be specified for Git patches`);let r=e.oldFileName,i=e.newFileName;e.isCreate&&r===`/dev/null`?r=i.replace(/^b\//,`a/`):e.isDelete&&i===`/dev/null`&&(i=r.replace(/^a\//,`b/`)),n.push(`diff --git `+MS(r)+` `+MS(i)),e.isDelete&&n.push(`deleted file mode `+(e.oldMode??`100644`)),e.isCreate&&n.push(`new file mode `+(e.newMode??`100644`)),e.oldMode&&e.newMode&&!e.isDelete&&!e.isCreate&&(n.push(`old mode `+e.oldMode),n.push(`new mode `+e.newMode)),e.isRename&&(n.push(`rename from `+MS((e.oldFileName??``).replace(/^a\//,``))),n.push(`rename to `+MS((e.newFileName??``).replace(/^b\//,``)))),e.isCopy&&(n.push(`copy from `+MS((e.oldFileName??``).replace(/^a\//,``))),n.push(`copy to `+MS((e.newFileName??``).replace(/^b\//,``))))}else t.includeIndex&&e.oldFileName==e.newFileName&&e.oldFileName!==void 0&&n.push(`Index: `+e.oldFileName),t.includeUnderline&&n.push(`===================================================================`);let r=e.hunks.length>0;t.includeFileHeaders&&e.oldFileName!==void 0&&e.newFileName!==void 0&&(!e.isGit||r)&&(n.push(`--- `+MS(e.oldFileName)+(e.oldHeader?` `+e.oldHeader:``)),n.push(`+++ `+MS(e.newFileName)+(e.newHeader?` `+e.newHeader:``)));for(let t=0;t<e.hunks.length;t++){let r=e.hunks[t],i=r.oldLines===0?r.oldStart-1:r.oldStart,a=r.newLines===0?r.newStart-1:r.newStart;n.push(`@@ -`+i+`,`+r.oldLines+` +`+a+`,`+r.newLines+` @@`);for(let e of r.lines)n.push(e)}return n.join(`
|
|
1461
|
+
`)+`
|
|
1462
|
+
`}function IS(e,t,n,r,i,a,o){if(typeof o==`function`&&(o={callback:o}),o?.callback){let{callback:s}=o;PS(e,t,n,r,i,a,Object.assign(Object.assign({},o),{callback:e=>{s(e?FS(e,o.headerOptions):void 0)}}))}else{let s=PS(e,t,n,r,i,a,o);return s?FS(s,o?.headerOptions):void 0}}function LS(e){let t=e.endsWith(`
|
|
1463
|
+
`),n=e.split(`
|
|
1464
|
+
`).map(e=>e+`
|
|
1465
|
+
`);return t?n.pop():n.push(n.pop().slice(0,-1)),n}function RS({line:e,spanStart:t,spanLength:n}){return{start:{line:e,character:t},end:{line:e,character:t+n},properties:{"data-diff-span":``},alwaysWrap:!0}}function zS({item:e,arr:t,enableJoin:n,isNeutral:r=!1,isLastItem:i=!1}){let a=t[t.length-1];if(a==null||i||!n){t.push([+!r,e.value]);return}let o=a[0]===0;if(r===o||r&&e.value.length===1&&!o){a[1]+=e.value;return}t.push([+!r,e.value])}var BS={forcePlainText:!1};function VS(e,t,n,{forcePlainText:r,startingLine:i,totalLines:a,expandedHunks:o,collapsedContextThreshold:s=1}=BS){r?(i??=0,a??=1/0):(i=0,a=1/0);let c=i>0||a<1/0,l=typeof n.theme==`string`?t.getTheme(n.theme).type:void 0,u=kx({theme:n.theme,highlighter:t}),d=r&&!c&&(e.unifiedLineCount>1e3||e.splitLineCount>1e3)?`none`:n.lineDiffType,f={deletionLines:[],additionLines:[]},{maxLineDiffLength:p}=n,m=!r&&!e.isPartial,h=r?o:void 0,g=new Map;function _(e){let t=m?0:e,n=g.get(t)??US();return g.set(t,n),n}function v(e,t,n,r){if(c){let e=n.at(-1);(e==null||e.targetIndex+e.count!==t)&&(e={targetIndex:t,originalOffset:r.length,count:0},n.push(e)),e.count++}r.push(e)}$x({diff:e,diffStyle:`both`,startingLine:i,totalLines:a,expandedHunks:c?h:!0,collapsedContextThreshold:s,callback:({hunkIndex:t,additionLine:n,deletionLine:r,type:i})=>{let a=_(t),o=n==null?r.splitLineIndex:n.splitLineIndex;i===`change`&&n!=null&&r!=null&&HS({additionLine:e.additionLines[n.lineIndex],deletionLine:e.deletionLines[r.lineIndex],deletionLineIndex:a.deletionContent.length,additionLineIndex:a.additionContent.length,deletionDecorations:a.deletionDecorations,additionDecorations:a.additionDecorations,lineDiffType:d,maxLineDiffLength:p}),r!=null&&(v(e.deletionLines[r.lineIndex],r.lineIndex,a.deletionSegments,a.deletionContent),a.deletionInfo.push({type:i===`change`?`change-deletion`:i,lineNumber:r.lineNumber,altLineNumber:i===`change`?void 0:n.lineNumber??void 0,lineIndex:`${r.unifiedLineIndex},${o}`})),n!=null&&(v(e.additionLines[n.lineIndex],n.lineIndex,a.additionSegments,a.additionContent),a.additionInfo.push({type:i===`change`?`change-addition`:i,lineNumber:n.lineNumber,altLineNumber:i===`change`?void 0:r.lineNumber??void 0,lineIndex:`${n.unifiedLineIndex},${o}`}))}});for(let i of g.values()){if(i.deletionContent.length===0&&i.additionContent.length===0)continue;let a={name:e.prevName??e.name,contents:i.deletionContent.value},o={name:e.name,contents:i.additionContent.value},{deletionLines:s,additionLines:c}=WS({deletionFile:a,deletionInfo:i.deletionInfo,deletionDecorations:i.deletionDecorations,additionFile:o,additionInfo:i.additionInfo,additionDecorations:i.additionDecorations,highlighter:t,options:n,languageOverride:r?`text`:e.lang});if(m){f.deletionLines=s,f.additionLines=c;continue}if(i.deletionSegments.length>0)for(let e of i.deletionSegments)for(let t=0;t<e.count;t++)f.deletionLines[e.targetIndex+t]=s[e.originalOffset+t];else f.deletionLines.push(...s);if(i.additionSegments.length>0)for(let e of i.additionSegments)for(let t=0;t<e.count;t++)f.additionLines[e.targetIndex+t]=c[e.originalOffset+t];else f.additionLines.push(...c)}return{code:f,themeStyles:u,baseThemeType:l}}function HS({deletionLine:e,additionLine:t,deletionLineIndex:n,additionLineIndex:r,deletionDecorations:i,additionDecorations:a,lineDiffType:o,maxLineDiffLength:s}){if(e==null||t==null||o===`none`||(e=Zb(e),t=Zb(t),e.length>s||t.length>s))return;let c=o===`char`?cS(e,t):TS(e,t),l=[],u=[],d=o===`word-alt`,f=c.at(-1);for(let e of c){let t=e===f;!e.added&&!e.removed?(zS({item:e,arr:l,enableJoin:d,isNeutral:!0,isLastItem:t}),zS({item:e,arr:u,enableJoin:d,isNeutral:!0,isLastItem:t})):e.removed?zS({item:e,arr:l,enableJoin:d,isLastItem:t}):zS({item:e,arr:u,enableJoin:d,isLastItem:t})}let p=0;for(let e of l)e[0]===1&&i.push(RS({line:n,spanStart:p,spanLength:e[1].length})),p+=e[1].length;p=0;for(let e of u)e[0]===1&&a.push(RS({line:r,spanStart:p,spanLength:e[1].length})),p+=e[1].length}function US(){return{deletionContent:{push(e){this.value+=e,this.length++},value:``,length:0},additionContent:{push(e){this.value+=e,this.length++},value:``,length:0},deletionInfo:[],additionInfo:[],deletionDecorations:[],additionDecorations:[],deletionSegments:[],additionSegments:[]}}function WS({deletionFile:e,additionFile:t,deletionInfo:n,additionInfo:r,highlighter:i,deletionDecorations:a,additionDecorations:o,languageOverride:s,options:{theme:c=Tu,...l}}){let u=s??Kb(e.name),d=s??Kb(t.name),{state:f,transformers:p}=px(l.useTokenTransformer),m=typeof c==`string`?{...l,lang:`text`,theme:c,transformers:p,decorations:void 0,defaultColor:!1,cssVariablePrefix:gx(`token`),tokenizeTimeLimit:0}:{...l,lang:`text`,themes:c,transformers:p,decorations:void 0,defaultColor:!1,cssVariablePrefix:gx(`token`),tokenizeTimeLimit:0};return{deletionLines:e.contents===``?[]:(m.lang=u,f.lineInfo=n,m.decorations=a,jx(i.codeToHast(Zb(e.contents),m))),additionLines:t.contents===``?[]:(m.lang=d,m.decorations=o,f.lineInfo=r,jx(i.codeToHast(Zb(t.contents),m)))}}function GS(e){let t=[];for(let n of e){let e=Wu.get(n);if(e==null)throw Error(`getResolvedLanguages: ${n} is not resolved. Please resolve languages before calling getResolvedLanguages`);t.push(e)}return t}function KS(e){for(let t of Array.isArray(e)?e:[e])if(!Wu.has(t))return!1;return!0}async function qS(e){let t=[],n=[];for(let r of e){if(r===`text`||r===`ansi`)continue;let e=ab(r)??ib(r);`then`in e?n.push(e):t.push(e)}return n.length>0&&await Promise.all(n).then(e=>{for(let n of e){if(n==null)throw Error(`resolvedLanguages: unable to resolve language`);t.push(n)}}),t}function JS(e){return Hu.getResolvedThemes(e)}async function YS(e){for(let t of e)jb(t);let t=await Hu.resolveThemes(e);for(let n=0;n<e.length;n++)Mb(e[n],t[n]);return t}var XS=t(n(((e,t)=>{(function(n,r){typeof e==`object`&&t!==void 0?r(e):typeof define==`function`&&define.amd?define([`exports`],r):r((n||=self).lru_map=n.lru_map||{})})(e,function(e){let t=Symbol(`newer`),n=Symbol(`older`);class r{constructor(e,t){typeof e!=`number`&&(t=e,e=0),this.size=0,this.limit=e,this.oldest=this.newest=void 0,this._keymap=new Map,t&&(this.assign(t),e<1&&(this.limit=this.size))}_markEntryAsUsed(e){e!==this.newest&&(e[t]&&(e===this.oldest&&(this.oldest=e[t]),e[t][n]=e[n]),e[n]&&(e[n][t]=e[t]),e[t]=void 0,e[n]=this.newest,this.newest&&(this.newest[t]=e),this.newest=e)}assign(e){let r,a=this.limit||Number.MAX_VALUE;this._keymap.clear();let o=e[Symbol.iterator]();for(let e=o.next();!e.done;e=o.next()){let o=new i(e.value[0],e.value[1]);if(this._keymap.set(o.key,o),r?(r[t]=o,o[n]=r):this.oldest=o,r=o,a--==0)throw Error(`overflow`)}this.newest=r,this.size=this._keymap.size}get(e){var t=this._keymap.get(e);return t?(this._markEntryAsUsed(t),t.value):void 0}set(e,r){var a=this._keymap.get(e);return a?(a.value=r,this._markEntryAsUsed(a),this):(this._keymap.set(e,a=new i(e,r)),this.newest?(this.newest[t]=a,a[n]=this.newest):this.oldest=a,this.newest=a,++this.size,this.size>this.limit&&this.shift(),this)}shift(){var e=this.oldest;if(e)return this.oldest[t]?(this.oldest=this.oldest[t],this.oldest[n]=void 0):(this.oldest=void 0,this.newest=void 0),e[t]=e[n]=void 0,this._keymap.delete(e.key),--this.size,[e.key,e.value]}find(e){let t=this._keymap.get(e);return t?t.value:void 0}has(e){return this._keymap.has(e)}delete(e){var r=this._keymap.get(e);return r?(this._keymap.delete(r.key),r[t]&&r[n]?(r[n][t]=r[t],r[t][n]=r[n]):r[t]?(r[t][n]=void 0,this.oldest=r[t]):r[n]?(r[n][t]=void 0,this.newest=r[n]):this.oldest=this.newest=void 0,this.size--,r.value):void 0}clear(){this.oldest=this.newest=void 0,this.size=0,this._keymap.clear()}keys(){return new o(this.oldest)}values(){return new s(this.oldest)}entries(){return this}[Symbol.iterator](){return new a(this.oldest)}forEach(e,n){typeof n!=`object`&&(n=this);let r=this.oldest;for(;r;)e.call(n,r.value,r.key,this),r=r[t]}toJSON(){for(var e=Array(this.size),n=0,r=this.oldest;r;)e[n++]={key:r.key,value:r.value},r=r[t];return e}toString(){for(var e=``,n=this.oldest;n;)e+=String(n.key)+`:`+n.value,n=n[t],n&&(e+=` < `);return e}}e.LRUMap=r;function i(e,r){this.key=e,this.value=r,this[t]=void 0,this[n]=void 0}function a(e){this.entry=e}a.prototype[Symbol.iterator]=function(){return this},a.prototype.next=function(){let e=this.entry;return e?(this.entry=e[t],{done:!1,value:[e.key,e.value]}):{done:!0,value:void 0}};function o(e){this.entry=e}o.prototype[Symbol.iterator]=function(){return this},o.prototype.next=function(){let e=this.entry;return e?(this.entry=e[t],{done:!1,value:e.key}):{done:!0,value:void 0}};function s(e){this.entry=e}s.prototype[Symbol.iterator]=function(){return this},s.prototype.next=function(){let e=this.entry;return e?(this.entry=e[t],{done:!1,value:e.value}):{done:!0,value:void 0}}})}))(),1),ZS=Symbol(`IGNORE_RESPONSE`),QS=class extends Error{constructor(){super(`WorkerPoolManager: operation canceled because the pool terminated`)}},$S=class{options;highlighter;preferredHighlighter;renderOptions;renderOptionsRequestVersion=0;renderOptionsVersion=0;initialized=!1;workers=[];queuedTasks=[];queuedTaskByInstance=new Map;taskByHighlightKey=new Map;activeTaskById=new Map;activeRequestByInstance=new Map;nextRequestId=0;themeSubscribers=new Set;workersFailed=!1;statSubscribers=new Set;fileCache;diffCache;_queuedBroadcast;lifecycleGeneration=0;constructor(e,{langs:t,theme:n=Tu,useTokenTransformer:r=!1,lineDiffType:i=`word-alt`,maxLineDiffLength:a=1e3,tokenizeMaxLineLength:o=1e3,preferredHighlighter:s=`shiki-js`}){this.options=e,this.preferredHighlighter=s,this.renderOptions={theme:n,useTokenTransformer:r,lineDiffType:i,maxLineDiffLength:a,tokenizeMaxLineLength:o},this.fileCache=new XS.default.LRUMap(e.totalASTLRUCacheSize??100),this.diffCache=new XS.default.LRUMap(e.totalASTLRUCacheSize??100),this.queueInitialization(t)}isWorkingPool(){return!this.workersFailed}getFileResultCache(e){return e.cacheKey==null?void 0:this.fileCache.get(e.cacheKey)}getDiffResultCache(e){return e.cacheKey==null?void 0:this.diffCache.get(e.cacheKey)}inspectCaches(){let{fileCache:e,diffCache:t}=this;return{fileCache:e,diffCache:t}}evictFileFromCache(e){try{return this.fileCache.delete(e)!==void 0}finally{this.queueBroadcastStateChanges()}}evictDiffFromCache(e){try{return this.diffCache.delete(e)!==void 0}finally{this.queueBroadcastStateChanges()}}async setRenderOptions({theme:e=this.renderOptions.theme??Tu,useTokenTransformer:t=this.renderOptions.useTokenTransformer??!1,lineDiffType:n=this.renderOptions.lineDiffType??`word-alt`,maxLineDiffLength:r=this.renderOptions.maxLineDiffLength??1e3,tokenizeMaxLineLength:i=this.renderOptions.tokenizeMaxLineLength??1e3}){let{lifecycleGeneration:a}=this,o=++this.renderOptionsRequestVersion,s=()=>this.isCurrentLifecycle(a)&&this.renderOptionsRequestVersion===o;try{let a={theme:e,useTokenTransformer:t,lineDiffType:n,maxLineDiffLength:r,tokenizeMaxLineLength:i};if(this.isInitialized()||await this.initialize(),!s()||Lx(a,this.renderOptions))return;let o=zb(e),c=[];if(Fu(a.theme,this.renderOptions.theme)||(c=Bb(o)?JS(o):await YS(o)),!s())return;if(this.highlighter!=null)Uu(c,this.highlighter);else{let e=await Ib({themes:o,langs:[`text`],preferredHighlighter:this.preferredHighlighter});if(!s())return;this.highlighter=e}let l=this.setRenderOptionsOnWorkers(a,c);this.renderOptions=a,this.renderOptionsVersion++,this.diffCache.clear(),this.fileCache.clear(),this.invalidateRenderTasks();for(let e of this.themeSubscribers)e.onThemeChange();await l}catch(e){if(e instanceof QS||!s())return;throw e}}getFileRenderOptions(){let{tokenizeMaxLineLength:e,theme:t,useTokenTransformer:n}=this.renderOptions;return{theme:t,useTokenTransformer:n,tokenizeMaxLineLength:e}}getDiffRenderOptions(){return{...this.renderOptions}}async setRenderOptionsOnWorkers(e,t){if(this.workersFailed)return;this.isInitialized()||await this.initialize();let n=[];for(let r of this.workers){if(!r.initialized)throw console.log({managedWorker:r}),Error(`setRenderOptionsOnWorkers: Somehow we have an uninitialized worker`);n.push(new Promise((n,i)=>{let a=this.generateRequestId(),o={type:`set-render-options`,id:a,request:{type:`set-render-options`,id:a,renderOptions:e,resolvedThemes:t},resolve:n,reject:i,requestStart:Date.now()};this.activeTaskById.set(a,o),r.pendingSetupRequestId=a,r.worker.postMessage(o.request)}))}await Promise.all(n)}subscribeToThemeChanges(e){return this.themeSubscribers.add(e),this.queueBroadcastStateChanges(),()=>{this.unsubscribeToThemeChanges(e),this.queueBroadcastStateChanges()}}unsubscribeToThemeChanges(e){this.themeSubscribers.delete(e),this.queueBroadcastStateChanges()}subscribeToStatChanges(e){return this.statSubscribers.add(e),e(this.getStats()),()=>{this.statSubscribers.delete(e)}}queueBroadcastStateChanges(){this._queuedBroadcast??=requestAnimationFrame(this._broadcastStateChanges)}_broadcastStateChanges=()=>{this._queuedBroadcast!=null&&(cancelAnimationFrame(this._queuedBroadcast),this._queuedBroadcast=void 0);let e=this.getStats();for(let t of this.statSubscribers)t(e)};cleanUpTasks(e){this.detachInstanceFromQueuedTasks(e);let t=this.activeRequestByInstance.get(e);if(t!=null){let n=this.activeTaskById.get(t);nC(n)?(this.detachInstanceFromRenderTask(n,e),!n.primeCache&&n.instances.size===0&&this.removeActiveTask(n)):this.activeTaskById.delete(t)}this.activeRequestByInstance.delete(e),this.queueBroadcastStateChanges()}isInitialized(){return this.initialized===!0}async initialize(e=[]){if(this.initialized!==!0)if(this.initialized===!1){let{lifecycleGeneration:t}=this;this.initialized=new Promise((n,r)=>{(async()=>{try{let r=zb(this.renderOptions.theme),i=[];if(i=Bb(r)?JS(r):await YS(r),!this.isCurrentLifecycle(t)){n();return}let a=[];if(a=KS(e)?GS(e):await qS(e),!this.isCurrentLifecycle(t)){n();return}let[o]=await Promise.all([Ib({themes:r,langs:[`text`,...e],preferredHighlighter:this.preferredHighlighter}),this.initializeWorkers(i,a)]);if(!this.isCurrentLifecycle(t)){this.terminateWorkers(),n();return}this.highlighter=o,this.initialized=!0,this.diffCache.clear(),this.fileCache.clear(),this.drainQueue(),this.queueBroadcastStateChanges(),n()}catch(e){if(e instanceof QS||!this.isCurrentLifecycle(t)){n();return}this.initialized=!1,this.workersFailed=!0,this.queueBroadcastStateChanges(),r(e)}})()}),this.queueBroadcastStateChanges()}else return this.initialized}async initializeWorkers(e,t){this.workersFailed=!1;let n=[],r=qb(),i=r>0?Jb():void 0;this.workers.length>0&&this.terminateWorkers();for(let a=0;a<(this.options.poolSize??8);a++){let a=this.options.workerFactory(),o={worker:a,requestId:void 0,pendingSetupRequestId:void 0,initialized:!1,langs:new Set([`text`,...t.map(({name:e})=>e)]),customExtensionsVersion:0};a.addEventListener(`message`,e=>{this.handleWorkerMessage(o,e.data)}),a.addEventListener(`error`,e=>console.error(`Worker error:`,e,o)),this.workers.push(o),n.push(new Promise((n,a)=>{let s=this.generateRequestId(),c={type:`initialize`,id:s,request:{type:`initialize`,id:s,renderOptions:this.renderOptions,preferredHighlighter:this.preferredHighlighter,resolvedThemes:e,resolvedLanguages:t,customExtensionsVersion:i==null?void 0:r,customExtensionMap:i},resolve(){o.initialized=!0,n()},reject:a,requestStart:Date.now()};this.activeTaskById.set(s,c),this.executeTask(o,c)}))}await Promise.all(n)}drainQueue=()=>{if(this._queuedDrain=void 0,!(this.initialized!==!0||this.queuedTasks.length===0)){for(let e=0;e<this.queuedTasks.length;){let t=this.queuedTasks[e];if(this.hasActiveRequest(t)){e++;continue}let n=tC(t),r=this.getAvailableWorker(n);if(r==null)break;this.queuedTasks.splice(e,1),this.assignWorkerToTask(t,r),this.resolveLanguagesAndExecuteTask(r,t,n)}this.queueBroadcastStateChanges()}};highlightFileAST(e,t){let n=this.getFileResultCache(t);Yb(t)||n!=null&&Vb(n.options,this.getFileRenderOptions())||this.hasMatchingFileInstanceTask(e,t)||this.submitTask(e,{type:`file`,file:t})}primeFileHighlightCache(e){if(e.cacheKey==null){console.warn(`WorkerPoolManager.primeFileHighlightCache: priming highlight cache requires file.cacheKey; skipping "${e.name}".`);return}let t=this.getFileResultCache(e),n=this.getFileHighlightKey(e);if(n==null||Yb(e)||t!=null&&Vb(t.options,this.getFileRenderOptions()))return;let r=this.getTaskByHighlightKey(n);r==null?this.submitCacheTask({type:`file`,file:e},n):r.primeCache=!0}getPlainFileAST(e,t,n,r){if(this.highlighter==null){this.queueInitialization();return}return Px(e,this.highlighter,this.renderOptions,{forcePlainText:!0,startingLine:t,totalLines:n,lines:r})}highlightDiffAST(e,t){let n=this.getDiffResultCache(t);Rx(t)||n!=null&&Lx(n.options,this.getDiffRenderOptions())||this.hasMatchingDiffInstanceTask(e,t)||this.submitTask(e,{type:`diff`,diff:t})}primeDiffHighlightCache(e){if(e.cacheKey==null){console.warn(`WorkerPoolManager.primeDiffHighlightCache: priming highlight cache requires diff.cacheKey; skipping "${e.prevName??e.name}" -> "${e.name}".`);return}let t=this.getDiffResultCache(e),n=this.getDiffHighlightKey(e);if(n==null||Rx(e)||t!=null&&Lx(t.options,this.getDiffRenderOptions()))return;let r=this.getTaskByHighlightKey(n);r==null?this.submitCacheTask({type:`diff`,diff:e},n):r.primeCache=!0}getPlainDiffAST(e,t,n,r,i){return this.highlighter==null?void 0:VS(e,this.highlighter,this.renderOptions,{forcePlainText:!0,startingLine:t,totalLines:n,expandedHunks:r,collapsedContextThreshold:i})}terminate(){this.lifecycleGeneration++,this.cancelActiveWorkerTasks(),this.terminateWorkers(),this.fileCache.clear(),this.diffCache.clear(),this.activeRequestByInstance.clear(),this.queuedTasks.length=0,this.queuedTaskByInstance.clear(),this.taskByHighlightKey.clear(),this.activeTaskById.clear(),this.highlighter=void 0,this.initialized=!1,this.workersFailed=!1,this.queueBroadcastStateChanges()}isCurrentLifecycle(e){return this.lifecycleGeneration===e}queueInitialization(e){this.initialize(e).catch(e=>{console.error(e)})}cancelActiveWorkerTasks(){let e=new QS;for(let t of this.activeTaskById.values())`reject`in t&&t.reject(e)}terminateWorkers(){for(let e of this.workers)e.worker.terminate();this.workers.length=0}getStats(){return{managerState:this.initialized===!1?`waiting`:this.initialized===!0?`initialized`:`initializing`,totalWorkers:this.workers.length,workersFailed:this.workersFailed,busyWorkers:this.workers.filter(e=>e.requestId!=null||e.pendingSetupRequestId!=null).length,queuedTasks:this.queuedTasks.length,activeTasks:this.activeTaskById.size,themeSubscribers:this.themeSubscribers.size,fileCacheSize:this.fileCache.size,diffCacheSize:this.diffCache.size}}submitTask(e,t){this.initialized===!1&&this.queueInitialization();let n=this.getHighlightKeyForRequest(t),r=n==null?void 0:this.getTaskByHighlightKey(n);if(r!=null){this.detachInstanceFromQueuedTasks(e,r),this.addInstanceToTask(r,e),this.queueBroadcastStateChanges();return}this.detachInstanceFromQueuedTasks(e);let i=this.generateRequestId(),a=Date.now(),{renderOptionsVersion:o}=this,s=(()=>{switch(t.type){case`file`:return{type:`file`,id:i,request:{...t,id:i},instances:new Set([e]),primeCache:!1,highlightKey:n,renderOptionsVersion:o,requestStart:a};case`diff`:return{type:`diff`,id:i,request:{...t,id:i},instances:new Set([e]),primeCache:!1,highlightKey:n,renderOptionsVersion:o,requestStart:a}}})();this.enqueueRenderTask(s,e)}submitCacheTask(e,t){this.initialized===!1&&this.queueInitialization();let n=this.generateRequestId(),r=Date.now(),{renderOptionsVersion:i}=this,a=(()=>{switch(e.type){case`file`:return{type:`file`,id:n,request:{...e,id:n},instances:new Set,primeCache:!0,highlightKey:t,renderOptionsVersion:i,requestStart:r};case`diff`:return{type:`diff`,id:n,request:{...e,id:n},instances:new Set,primeCache:!0,highlightKey:t,renderOptionsVersion:i,requestStart:r}}})();this.enqueueRenderTask(a)}enqueueRenderTask(e,t){this.queuedTasks.push(e),t!=null&&this.queuedTaskByInstance.set(t,e),e.highlightKey!=null&&this.taskByHighlightKey.set(e.highlightKey,e),this.queueDrain()}async resolveLanguagesAndExecuteTask(e,t,n){try{let r=n.filter(t=>!e.langs.has(t));if(r.length>0&&(KS(r)?t.request.resolvedLanguages=GS(r):t.request.resolvedLanguages=await qS(r)),!this.activeTaskById.has(t.id)){e.requestId===t.id&&(this.cleanWorkerAndTask(e,t),this.queueBroadcastStateChanges(),this.queuedTasks.length>0&&this.queueDrain());return}this.executeTask(e,t)}catch{this.cleanWorkerAndTask(e,t),this.queueBroadcastStateChanges(),this.queuedTasks.length>0&&this.queueDrain()}}handleWorkerMessage(e,t){let n=this.activeTaskById.get(t.id);try{if(n==null)throw ZS;if(t.type===`error`){let e=Error(t.error);if(t.stack&&(e.stack=t.stack),`reject`in n)n.reject(e);else if(nC(n))this.notifyHighlightError(n,e);else throw Error(`handleWorkerMessage: unknown task type`);throw e}else switch(t.requestType){case`initialize`:if(n.type!==`initialize`)throw Error(`handleWorkerMessage: task/response dont match`);this.syncCustomExtensionVersion(e,n.request),n.resolve();break;case`set-render-options`:if(n.type!==`set-render-options`)throw Error(`handleWorkerMessage: task/response dont match`);n.resolve();break;case`file`:{if(n.type!==`file`)throw Error(`handleWorkerMessage: task/response dont match`);let{result:r,options:i}=t;if(!this.isCurrentRenderTask(n)||!Vb(i,this.getFileRenderOptions()))throw ZS;let{request:a}=n;this.syncCustomExtensionVersion(e,a),a.file.cacheKey!=null&&this.fileCache.set(a.file.cacheKey,{result:r,options:i}),this.notifyFileInstances(n,r,i);break}case`diff`:{if(n.type!==`diff`)throw Error(`handleWorkerMessage: task/response dont match`);let{result:r,options:i}=t;if(!this.isCurrentRenderTask(n)||!Lx(i,this.getDiffRenderOptions()))throw ZS;let{request:a}=n;this.syncCustomExtensionVersion(e,a),a.diff.cacheKey!=null&&this.diffCache.set(a.diff.cacheKey,{result:r,options:i}),this.notifyDiffInstances(n,r,i);break}}}catch(e){e!==ZS&&console.error(e,n,t)}this.cleanWorkerAndTask(e,n,t.id),this.queueBroadcastStateChanges(),this.queuedTasks.length>0&&this.queueDrain()}_queuedDrain;queueDrain(){this._queuedDrain??(this._queuedDrain=Promise.resolve().then(this.drainQueue),this.queueBroadcastStateChanges())}assignWorkerToTask(e,t){t.requestId=e.id,nC(e)&&(this.clearQueuedInstanceRequests(e),this.trackInstanceRequests(e)),this.activeTaskById.set(e.id,e)}cleanWorkerAndTask(e,t,n=t?.id){e.requestId===n&&(e.requestId=void 0),e.pendingSetupRequestId===n&&(e.pendingSetupRequestId=void 0),t!=null&&(nC(t)&&(this.clearInstanceRequests(t),this.clearHighlightKey(t)),this.activeTaskById.delete(t.id))}executeTask(e,t){eC(t.request)&&this.maybeAttachCustomExtensions(e,t.request),this.activeTaskById.has(t.id)||this.assignWorkerToTask(t,e);for(let n of tC(t))e.langs.add(n);try{e.worker.postMessage(t.request)}catch(n){console.error(`Failed to post message to worker:`,n),nC(t)?this.notifyHighlightError(t,n):`reject`in t&&t.reject(n),this.cleanWorkerAndTask(e,t),this.queuedTasks.length>0&&this.queueDrain()}this.queueBroadcastStateChanges()}maybeAttachCustomExtensions(e,t){if(t.customExtensionsVersion!=null)return;let n=qb();e.customExtensionsVersion>=n||(t.customExtensionsVersion=n,t.customExtensionMap=Jb())}syncCustomExtensionVersion(e,t){t.customExtensionsVersion!=null&&(e.customExtensionsVersion=t.customExtensionsVersion)}getAvailableWorker(e){let t;for(let n of this.workers){if(n.requestId!=null||n.pendingSetupRequestId!=null||!n.initialized)continue;if(t=n,e.length===0)break;let r=!0;for(let t of e)if(!n.langs.has(t)){r=!1;break}if(r)break}return t}getFileHighlightKey(e){if(e.cacheKey!=null)return`file:${e.cacheKey}:${this.renderOptionsVersion}`}getDiffHighlightKey(e){if(e.cacheKey!=null)return`diff:${e.cacheKey}:${this.renderOptionsVersion}`}getHighlightKeyForRequest(e){switch(e.type){case`file`:return this.getFileHighlightKey(e.file);case`diff`:return this.getDiffHighlightKey(e.diff)}}hasActiveRequest(e){for(let t of rC(e))if(this.activeRequestByInstance.has(t))return!0;return!1}addInstanceToTask(e,t){e.type,e.instances.add(t),this.activeTaskById.has(e.id)?this.activeRequestByInstance.set(t,e.id):this.queuedTaskByInstance.set(t,e)}detachInstanceFromQueuedTasks(e,t){let n=this.queuedTaskByInstance.get(e);n==null||n===t||(this.queuedTaskByInstance.delete(e),this.detachInstanceFromRenderTask(n,e),!n.primeCache&&n.instances.size===0&&this.removeQueuedTask(n))}detachInstanceFromRenderTask(e,t){e.type,e.instances.delete(t)}removeQueuedTask(e){let t=this.queuedTasks.indexOf(e);t!==-1&&this.queuedTasks.splice(t,1),this.clearQueuedInstanceRequests(e),this.clearHighlightKey(e)}removeActiveTask(e){this.clearInstanceRequests(e),this.clearHighlightKey(e),this.activeTaskById.delete(e.id)}invalidateRenderTasks(){for(let e=this.queuedTasks.length-1;e>=0;e--){let t=this.queuedTasks[e];t.renderOptionsVersion!==this.renderOptionsVersion&&this.removeQueuedTask(t)}for(let e of Array.from(this.activeTaskById.values()))nC(e)&&e.renderOptionsVersion!==this.renderOptionsVersion&&this.removeActiveTask(e)}clearQueuedInstanceRequests(e){for(let t of rC(e))this.queuedTaskByInstance.get(t)===e&&this.queuedTaskByInstance.delete(t)}clearHighlightKey(e){e.highlightKey!=null&&this.taskByHighlightKey.get(e.highlightKey)===e&&this.taskByHighlightKey.delete(e.highlightKey)}trackInstanceRequests(e){for(let t of rC(e))this.activeRequestByInstance.set(t,e.id)}clearInstanceRequests(e){for(let t of rC(e))this.activeRequestByInstance.get(t)===e.id&&this.activeRequestByInstance.delete(t)}notifyFileInstances(e,t,n){for(let r of e.instances)this.activeRequestByInstance.get(r)===e.id&&r.onHighlightSuccess(e.request.file,t,n)}notifyDiffInstances(e,t,n){for(let r of e.instances)this.activeRequestByInstance.get(r)===e.id&&r.onHighlightSuccess(e.request.diff,t,n)}notifyHighlightError(e,t){for(let n of rC(e))this.activeRequestByInstance.get(n)===e.id&&n.onHighlightError(t)}hasMatchingFileInstanceTask(e,t){for(let n of this.iterateRenderTasks())if(n.type===`file`&&this.isCurrentRenderTask(n)&&n.instances.has(e)&&Hb(t,n.request.file))return!0;return!1}hasMatchingDiffInstanceTask(e,t){for(let n of this.iterateRenderTasks())if(n.type===`diff`&&this.isCurrentRenderTask(n)&&n.instances.has(e)&&Ix(n.request.diff,t))return!0;return!1}getTaskByHighlightKey(e){let t=this.taskByHighlightKey.get(e);return t!=null&&this.isCurrentRenderTask(t)?t:void 0}isCurrentRenderTask(e){return e.renderOptionsVersion===this.renderOptionsVersion}*iterateRenderTasks(){for(let e of this.queuedTasks)yield e;for(let e of this.activeTaskById.values())nC(e)&&(yield e)}generateRequestId(){return`req_${++this.nextRequestId}`}};function eC(e){return e.type===`initialize`||e.type===`file`||e.type===`diff`}function tC(e){let t=new Set;if(e.type===`initialize`||e.type===`set-render-options`)return[];switch(e.type){case`file`:t.add(e.request.file.lang??Kb(e.request.file.name));break;case`diff`:t.add(e.request.diff.lang??Kb(e.request.diff.name)),t.add(e.request.diff.lang??Kb(e.request.diff.prevName??`-`));break}return t.delete(`text`),Array.from(t)}function nC(e){return e?.type===`file`||e?.type===`diff`}function rC(e){return e.instances}var iC;function aC({poolOptions:e,highlighterOptions:t}){return iC??=new $S(e,t),iC}function oC(){iC!=null&&(iC.terminate(),iC=void 0)}var sC=(0,g.createContext)(void 0),cC=0;function lC({children:e,poolOptions:t,highlighterOptions:n}){let[r]=(0,g.useState)(()=>{if(!(typeof window>`u`))return aC({poolOptions:t,highlighterOptions:n})});return(0,g.useInsertionEffect)(()=>{if(r!=null)return cC++,()=>{cC--}},[r]),(0,g.useEffect)(()=>()=>{cC===0&&oC()},[]),(0,_.jsx)(sC.Provider,{value:r,children:e})}var uC=new TextEncoder,dC=new TextDecoder(`utf-8`,{ignoreBOM:!0}),fC=/[\uD800-\uDFFF]/,pC=1024,mC=new Uint8Array(pC);function hC(){mC.length!==pC&&(mC=new Uint8Array(pC))}function gC(e){if(e.length===0)return e;if(fC.test(e))return JSON.parse(JSON.stringify(e));let t=e.length*3;mC.length<t&&(mC=new Uint8Array(t));let{written:n}=uC.encodeInto(e,mC);return dC.decode(mC.subarray(0,n))}function _C(e,t,n){try{return vC(e,t,n)}finally{hC()}}function vC(e,t,n=!1){let r=IC(e),i=r?TC(e):EC(e),a,o=[];for(let e of i){if(r&&!gu.test(e)){if(a==null)a=gC(e);else if(n)throw Error(`parsePatchContent: unknown file blob`);else console.error(`parsePatchContent: unknown file blob:`,e);continue}else if(!r&&!DC(e)){if(a==null)a=gC(e);else if(n)throw Error(`parsePatchContent: unknown file blob`);else console.error(`parsePatchContent: unknown file blob:`,e);continue}let i=bC(e,{cacheKey:t==null?void 0:`${t}-${o.length}`,isGitDiff:r,throwOnError:n});i!=null&&o.push(i)}return{patchMetadata:a,files:o}}function yC(e,t){try{return bC(e,t)}finally{hC()}}function bC(e,{cacheKey:t,isGitDiff:n=gu.test(e),oldFile:r,newFile:i,throwOnError:a=!1}={}){let o=0,s=LC(e,`@@ `),c,l=r==null||i==null,u=0,d=0;for(let e of s){let s=wC(e),f=s[0];if(f==null){if(a)throw Error(`parsePatchContent: invalid hunk`);console.error(`parsePatchContent: invalid hunk`,e);continue}let p=NC(f),m=0,h=0;if(p==null||c==null){if(c!=null){if(a)throw Error(`parsePatchContent: Invalid hunk`);console.error(`parsePatchContent: Invalid hunk`,e);continue}c={name:``,type:`change`,hunks:[],splitLineCount:0,unifiedLineCount:0,isPartial:l,additionLines:!l&&r!=null&&i!=null?CC(i.contents):[],deletionLines:!l&&r!=null&&i!=null?CC(r.contents):[],cacheKey:zC(t)},c.additionLines.length===1&&i?.contents===``&&(c.additionLines.length=0),c.deletionLines.length===1&&r?.contents===``&&(c.deletionLines.length=0);for(let e of s){if(e.startsWith(`diff --git`)){let t=e.trim().match(bu),n=t?.[1]??t?.[2],r=t?.[3]??t?.[4];if(n==null||r==null){if(a)throw Error(`parsePatchContent: invalid git diff header`);console.error(`parsePatchContent: invalid git diff header`,e);continue}c.name=gC(r.trim()),n!==r&&(c.prevName=gC(n.trim()));continue}let t=e.startsWith(`---`)||e.startsWith(`+++`)?e.match(n?yu:vu):null;if(t!=null){let[,e,n]=t;if(e===`---`&&n!==`/dev/null`){let e=gC(n.trim());c.prevName=e,c.name=e}else e===`+++`&&n!==`/dev/null`&&(c.name=gC(n.trim()))}else if(n){if(e.startsWith(`new mode `)&&(c.mode=gC(e.slice(8).trim())),e.startsWith(`old mode `)&&(c.prevMode=gC(e.slice(8).trim())),e.startsWith(`new file mode`)&&(c.type=`new`,c.mode=gC(e.slice(13).trim())),e.startsWith(`deleted file mode`)&&(c.type=`deleted`,c.mode=gC(e.slice(17).trim())),e.startsWith(`similarity index`)&&(e.startsWith(`similarity index 100%`)?c.type=`rename-pure`:c.type=`rename-changed`),e.startsWith(`index `)){let[,t,n,r]=e.trim().match(xu)??[];t!=null&&(c.prevObjectId=gC(t)),n!=null&&(c.newObjectId=gC(n)),r!=null&&(c.mode=gC(r))}e.startsWith(`rename from `)&&(c.prevName=gC(e.slice(12).trim())),e.startsWith(`rename to `)&&(c.name=gC(e.slice(10).trim()))}}continue}let g,_;for(;s.length>0&&(s[s.length-1]===`
|
|
1466
|
+
`||s[s.length-1]===`\r`||s[s.length-1]===`\r
|
|
1467
|
+
`||s[s.length-1]===``);)s.pop();let{additionStart:v,deletionStart:y}=p;u=l?u:y-1,d=l?d:v-1;let b={collapsedBefore:0,splitLineCount:0,splitLineStart:0,unifiedLineCount:0,unifiedLineStart:0,additionCount:p.additionCount,additionStart:v,additionLines:m,deletionCount:p.deletionCount,deletionStart:y,deletionLines:h,deletionLineIndex:u,additionLineIndex:d,hunkContent:[],hunkContext:zC(p.hunkContext),hunkSpecs:gC(f),noEOFCRAdditions:!1,noEOFCRDeletions:!1},x=0,S=0;for(let e=1;e<s.length;e++){let t=s[e];if(x>=b.additionCount&&S>=b.deletionCount&&!t.startsWith(`\\`)){if(a&&jC(t)&&!MC(t))throw Error(`parsePatchContent: hunk has more lines than expected`);break}let n=t[0];if(n!==`+`&&n!==`-`&&n!==` `&&n!==`\\`){if(a)throw Error(`parsePatchContent: invalid hunk line`);console.error(`parseLineType: Invalid firstChar: "${n}", full line: "${t}"`),console.error(`processFile: invalid rawLine:`,t);continue}let r=BC(n);if(r===`addition`){if(a&&x>=b.additionCount)throw Error(`parsePatchContent: hunk has too many addition lines`);let e=VC(t);(g==null||g.type!==`change`)&&(g=HC(`change`,u,d),b.hunkContent.push(g)),d++,x++,l&&c.additionLines.push(e),g.additions++,m++,_=`addition`}else if(r===`deletion`){if(a&&S>=b.deletionCount)throw Error(`parsePatchContent: hunk has too many deletion lines`);let e=VC(t);(g==null||g.type!==`change`)&&(g=HC(`change`,u,d),b.hunkContent.push(g)),u++,S++,l&&c.deletionLines.push(e),g.deletions++,h++,_=`deletion`}else if(r===`context`){if(a&&(S>=b.deletionCount||x>=b.additionCount))throw Error(`parsePatchContent: hunk has too many context lines`);let e=VC(t);(g==null||g.type!==`context`)&&(g=HC(`context`,u,d),b.hunkContent.push(g)),d++,u++,x++,S++,l&&(c.deletionLines.push(e),c.additionLines.push(e)),g.lines++,_=`context`}else if(r===`metadata`&&g!=null){if(g.type===`context`?(b.noEOFCRAdditions=!0,b.noEOFCRDeletions=!0):_===`deletion`?b.noEOFCRDeletions=!0:_===`addition`&&(b.noEOFCRAdditions=!0),l&&(_===`addition`||_===`context`)){let e=c.additionLines.length-1;e>=0&&(c.additionLines[e]=Zb(c.additionLines[e]))}if(l&&(_===`deletion`||_===`context`)){let e=c.deletionLines.length-1;e>=0&&(c.deletionLines[e]=Zb(c.deletionLines[e]))}}}if(a&&(x!==b.additionCount||S!==b.deletionCount))throw Error(`parsePatchContent: hunk line count mismatch`);b.additionLines=m,b.deletionLines=h,b.collapsedBefore=Math.max(b.additionStart-1-o,0),c.hunks.push(b),o=b.additionStart+b.additionCount-1;for(let e of b.hunkContent)e.type===`context`?(b.splitLineCount+=e.lines,b.unifiedLineCount+=e.lines):(b.splitLineCount+=Math.max(e.additions,e.deletions),b.unifiedLineCount+=e.deletions+e.additions);b.splitLineStart=c.splitLineCount+b.collapsedBefore,b.unifiedLineStart=c.unifiedLineCount+b.collapsedBefore,c.splitLineCount+=b.collapsedBefore+b.splitLineCount,c.unifiedLineCount+=b.collapsedBefore+b.unifiedLineCount}if(c!=null){if(a&&l&&!n&&c.hunks.length===0)throw Error(`parsePatchContent: unified file has no hunks`);if(c.hunks.length>0&&!l&&c.additionLines.length>0&&c.deletionLines.length>0){let e=c.hunks[c.hunks.length-1],t=e.additionStart+e.additionCount-1,n=c.additionLines.length,r=Math.max(n-t,0);c.splitLineCount+=r,c.unifiedLineCount+=r}return n||(c.prevName!=null&&c.name!==c.prevName?c.hunks.length>0?c.type=`rename-changed`:c.type=`rename-pure`:(r==null||r.contents===``)&&i!=null&&i.contents!==``?c.type=`new`:r!=null&&r.contents!==``&&(i==null||i.contents===``)&&(c.type=`deleted`)),c.type!==`rename-pure`&&c.type!==`rename-changed`&&(c.prevName=void 0),c}}function xC(e,t,n=!1){let r=[],i=SC(e)?e.split(hu):[e];for(let e of i)try{r.push(_C(e,t==null?void 0:`${t}-${r.length}`,n))}catch(e){if(n)throw e;console.error(e)}return r}function SC(e){return e.startsWith(`From `)||e.includes(`
|
|
1468
|
+
From `)}function CC(e){let t=wC(e);for(let e=0;e<t.length;e++)t[e]=gC(t[e]);return t}function wC(e){if(e.length===0)return[``];let t=[],n=0;for(;;){let r=e.indexOf(`
|
|
1469
|
+
`,n);if(r===-1)break;t.push(e.slice(n,r+1)),n=r+1}return n<e.length&&t.push(e.slice(n)),t}function TC(e){return LC(e,`diff --git`)}function EC(e){if(e.length===0)return[``];let t=[],n=0,r=0,i=0,a=0,o=!1;for(;r<e.length;){let s=AC(e,r);if(i<=0&&a<=0){if(OC(e,r)){r>n&&t.push(e.slice(n,r)),n=r,o=!0,r=AC(e,s);continue}if(o&&e.startsWith(`@@ -`,r)){let t=NC(e.slice(r,s));t!=null&&(i=t.deletionCount,a=t.additionCount)}r=s;continue}let c=e[r];if(c===`\\`){r=s;continue}c===` `?(i=Math.max(i-1,0),a=Math.max(a-1,0)):c===`-`?i=Math.max(i-1,0):c===`+`&&(a=Math.max(a-1,0)),r=s}return t.push(e.slice(n)),t}function DC(e){return OC(e,0)}function OC(e,t){let n=AC(e,t);return kC(e,t,`---`)&&kC(e,n,`+++`)}function kC(e,t,n){if(!e.startsWith(n,t))return!1;let r=e[t+n.length];if(r!==` `&&r!==` `)return!1;for(let r=t+n.length+1;r<e.length;r++){let t=e[r];if(t===`
|
|
1470
|
+
`||t===`\r`)break;if(t!==` `&&t!==` `)return!0}return!1}function AC(e,t){let n=e.indexOf(`
|
|
1471
|
+
`,t);return n===-1?e.length:n+1}function jC(e){let t=e[0];return t===`+`||t===`-`||t===` `}function MC(e){if(!e.startsWith(`--`))return!1;for(let t=2;t<e.length;t++){let n=e[t];if(n!==` `&&n!==` `&&n!==`
|
|
1472
|
+
`&&n!==`\r`)return!1}return!0}function NC(e){if(!e.startsWith(`@@ -`))return;let t=4,n=PC(e,t);if(n==null)return;let r=n.value;t=n.endIndex;let i=1;if(e[t]===`,`){let n=PC(e,t+1);if(n==null)return;i=n.value,t=n.endIndex}if(e[t]!==` `||e[t+1]!==`+`)return;t+=2;let a=PC(e,t);if(a==null)return;let o=a.value;t=a.endIndex;let s=1;if(e[t]===`,`){let n=PC(e,t+1);if(n==null)return;s=n.value,t=n.endIndex}if(e[t]!==` `||e[t+1]!==`@`||e[t+2]!==`@`)return;let c,l=t+3;return e[l]===` `&&(c=FC(e.slice(l+1))),{additionCount:s,additionStart:o,deletionCount:i,deletionStart:r,hunkContext:c}}function PC(e,t){let n=t,r=0;for(;n<e.length;n++){let t=e.charCodeAt(n)-48;if(t<0||t>9)break;r=r*10+t}if(n!==t)return{value:r,endIndex:n}}function FC(e){return e.endsWith(`\r
|
|
1473
|
+
`)?e.slice(0,-2):e.endsWith(`
|
|
1474
|
+
`)?e.slice(0,-1):e}function IC(e){return e.startsWith(`diff --git`)||e.includes(`
|
|
1475
|
+
diff --git`)}function LC(e,t){if(e.length===0)return[``];let n=`\n${t}`,r=e.startsWith(t)?0:RC(e,n,0);if(r===-1)return[e];let i=[];r>0&&i.push(e.slice(0,r));let a=r;for(;;){let t=RC(e,n,a+1);if(t===-1)break;i.push(e.slice(a,t)),a=t}return i.push(e.slice(a)),i}function RC(e,t,n){let r=e.indexOf(t,n);return r===-1?-1:r+1}function zC(e){return e==null?e:gC(e)}function BC(e){return e===` `?`context`:e===`\\`?`metadata`:e===`+`?`addition`:`deletion`}function VC(e){let t=e.slice(1);return gC(t===``?`
|
|
1476
|
+
`:t)}function HC(e,t,n){return e===`change`?{type:`change`,additions:0,deletions:0,additionLineIndex:n,deletionLineIndex:t}:{type:`context`,lines:0,additionLineIndex:n,deletionLineIndex:t}}function UC(e){let t=xC(e);if(t.length!==1)throw console.error(t),Error(`PatchDiff: Provided patch must include only 1 patch, with 1 diff`);let{files:n}=t[0];if(n.length!==1)throw console.error(n),Error(`FileDiff: Provided patch must contain exactly 1 file diff`);return n[0]}function WC(e){return`annotation-${`side`in e?`${e.side}-`:``}${e.lineNumber}`}function GC({hunkIndex:e,lineIndex:t,conflictIndex:n}){return`merge-conflict-action-${e}-${t}-${n}`}function KC(e,t){let n=t.hunks[e.hunkIndex];if(n!=null)return{hunkIndex:e.hunkIndex,lineIndex:qC(n,e.startContentIndex)}}function qC(e,t){let n=e.unifiedLineStart;for(let r=0;r<t;r++){let t=e.hunkContent[r];n+=t.type===`context`?t.lines:t.deletions+t.additions}return n}var JC={position:`absolute`,top:0,bottom:0,textAlign:`center`,whiteSpace:`normal`,touchAction:`none`},YC={display:`contents`};function XC(){return null}function ZC({fileDiff:e,actions:t,renderCustomHeader:n,renderHeaderPrefix:r,renderHeaderMetadata:i,renderAnnotation:a,renderGutterUtility:o,renderMergeConflictUtility:s,lineAnnotations:c,getHoveredLine:l,getInstance:u}){let d=n?.(e),f=r?.(e),p=i?.(e);return(0,_.jsxs)(_.Fragment,{children:[d==null?(0,_.jsxs)(_.Fragment,{children:[f!=null&&(0,_.jsx)(`div`,{slot:`header-prefix`,children:f}),p!=null&&(0,_.jsx)(`div`,{slot:`header-metadata`,children:p})]}):(0,_.jsx)(`div`,{slot:wu,children:d}),a!=null&&c?.map((e,t)=>(0,_.jsx)(`div`,{slot:WC(e),children:a(e)},t)),t!=null&&s!=null&&u!=null&&t.map(t=>{if(t==null)return;let n=QC(t,e);return(0,_.jsx)(`div`,{slot:n,style:YC,children:s(t,u)},n)}),o!=null&&(0,_.jsx)(`div`,{slot:`gutter-utility-slot`,style:JC,children:o(l)})]})}function QC(e,t){let n=KC(e,t);return n==null?void 0:GC({hunkIndex:n.hunkIndex,lineIndex:n.lineIndex,conflictIndex:e.conflictIndex})}function $C(e,t){return typeof window>`u`&&t!=null?(0,_.jsxs)(_.Fragment,{children:[(0,_.jsx)(`template`,{shadowrootmode:`open`,dangerouslySetInnerHTML:{__html:t}}),e]}):(0,_.jsx)(_.Fragment,{children:e})}function ew(e,t,n){if(e===t||e==null||t==null)return e===t;let r=new Set(n),i=Object.keys(e),a=new Set(Object.keys(t));for(let n of i)if(a.delete(n),!r.has(n)&&(!(n in t)||e[n]!==t[n]))return!1;for(let e of Array.from(a))if(!r.has(e))return!1;return!0}function tw(e,t){let n=e?.theme??Tu,r=t?.theme??Tu,i=nw(e),a=nw(t);return Fu(n,r)&&ew(e,t,[`theme`,`parseDiffOptions`])&&ew(i,a)}function nw(e){if(e!=null&&`parseDiffOptions`in e)return e.parseDiffOptions}function rw(e){if(typeof HTMLStyleElement<`u`&&e instanceof HTMLStyleElement)return!0;let t=e.tagName??e.nodeName;return typeof t==`string`&&t.toLowerCase()===`style`}function iw(e,t){return e?.start===t?.start&&e?.end===t?.end&&e?.side===t?.side&&e?.endSide===t?.endSide}function aw(e,t){return e.lineNumber===t.lineNumber&&e.side===t.side}function ow(){return $({tagName:`button`,properties:{"data-utility-button":``,type:`button`},children:[$b({name:`diffs-icon-plus`,properties:{"data-icon":``}})]})}var sw=class{mode;options;hoveredLine;hoveredToken;pre;gutterUtilityLine;gutterUtilityContainer;gutterUtilityButton;gutterUtilitySlot;interactiveLinesAttr=!1;interactiveLineNumbersAttr=!1;hasPointerListeners=!1;hasDocumentPointerListeners=!1;selectedRange=null;proposedSelectedRange;renderedSelectionRange;selectionAnchor;queuedSelectionRender;pointerSession={mode:`idle`};constructor(e,t){this.mode=e,this.options=t}setOptions(e){this.options=e}cleanUp(){this.pre?.removeEventListener(`click`,this.handlePointerClick),this.pre?.removeEventListener(`pointerdown`,this.handlePointerDown),this.pre?.removeEventListener(`pointermove`,this.handlePointerMove),this.pre?.removeEventListener(`pointerleave`,this.handlePointerLeave),this.pre?.removeAttribute(`data-interactive-lines`),this.pre?.removeAttribute(`data-interactive-line-numbers`),this.pre=void 0,this.gutterUtilityContainer?.remove(),this.gutterUtilityLine=void 0,this.gutterUtilityContainer=void 0,this.gutterUtilityButton=void 0,this.gutterUtilitySlot=void 0,this.clearHoveredLine(),this.clearHoveredToken(),this.detachDocumentPointerListeners(),this.clearPointerSession(),this.queuedSelectionRender!=null&&(cancelAnimationFrame(this.queuedSelectionRender),this.queuedSelectionRender=void 0),this.interactiveLinesAttr=!1,this.interactiveLineNumbersAttr=!1,this.hasPointerListeners=!1}setup(e){this.setSelectionDirty();let{usesCustomGutterUtility:t=!1,enableGutterUtility:n=!1}=this.options;this.pre!==e&&(this.cleanUp(),this.pre=e),n?this.ensureGutterUtilityNode(t):this.gutterUtilityContainer!=null&&(this.gutterUtilityContainer.remove(),this.gutterUtilityLine=void 0,this.gutterUtilityContainer=void 0,this.gutterUtilityButton=void 0,this.gutterUtilitySlot=void 0,this.pointerSession.mode===`gutterSelecting`&&(this.clearPointerSession(),this.detachDocumentPointerListeners())),this.syncPointerListeners(e),this.updateInteractiveLineAttributes(),this.renderSelection(),this.placeUtility()}setSelectionDirty(){this.renderedSelectionRange=void 0}isSelectionDirty(){return this.renderedSelectionRange===null}setSelection(e,t){let n=!(e===this.selectedRange||iw(e??void 0,this.selectedRange??void 0));!this.isSelectionDirty()&&!n||(this.proposedSelectedRange=void 0,this.selectedRange=e,this.renderSelection(),this.placeUtility(),n&&t?.notify!==!1&&this.notifySelectionCommitted())}getSelection(){return this.selectedRange}getHoveredLine=()=>{let e=this.gutterUtilityLine??this.hoveredLine;if(e!=null){if(this.mode===`diff`&&e.type===`diff-line`)return{lineNumber:e.lineNumber,side:e.annotationSide};if(this.mode===`file`&&e.type===`line`)return{lineNumber:e.lineNumber}}};handlePointerClick=e=>{let{onHunkExpand:t,onLineClick:n,onLineNumberClick:r,onTokenClick:i,onMergeConflictActionClick:a}=this.options;t==null&&n==null&&r==null&&a==null&&i==null||this.options.onGutterUtilityClick!=null&&ww(e.composedPath())||(Tw(this.options.__debugPointerEvents,`click`,`FileDiff.DEBUG.handlePointerClick:`,e),this.handlePointerEvent({eventType:`click`,event:e}))};handlePointerMove=e=>{if(e.pointerType!==`mouse`)return;let{lineHoverHighlight:t=`disabled`,onLineEnter:n,onLineLeave:r,onTokenEnter:i,onTokenLeave:a,enableGutterUtility:o=!1}=this.options;t===`disabled`&&!o&&n==null&&r==null&&i==null&&a==null||(Tw(this.options.__debugPointerEvents,`move`,`FileDiff.DEBUG.handlePointerMove:`,e),this.handlePointerEvent({eventType:`move`,event:e}))};handlePointerLeave=e=>{let{__debugPointerEvents:t}=this.options;if(Tw(t,`move`,`FileDiff.DEBUG.handlePointerLeave: no event`),this.hoveredLine==null&&this.hoveredToken==null){Tw(t,`move`,`FileDiff.DEBUG.handlePointerLeave: returned early, no hovered line or token`);return}this.hoveredToken!=null&&(this.options.onTokenLeave?.(this.hoveredToken,e),this.clearHoveredToken()),this.hoveredLine!=null&&(this.options.onLineLeave?.({...this.hoveredLine,event:e}),this.clearHoveredLine()),this.placeUtility()};handlePointerEvent({eventType:e,event:t}){let{__debugPointerEvents:n}=this.options,r=t.composedPath();Tw(n,e,`FileDiff.DEBUG.handlePointerEvent:`,{eventType:e,composedPath:r});let i=this.resolvePointerTarget(r);Tw(n,e,`FileDiff.DEBUG.handlePointerEvent: resolvePointerTarget result:`,i);let{onLineClick:a,onLineNumberClick:o,onLineEnter:s,onLineLeave:c,onTokenClick:l,onTokenEnter:u,onTokenLeave:d,onHunkExpand:f,onMergeConflictActionClick:p}=this.options;switch(e){case`move`:{let e=fw(i)&&this.hoveredLine?.lineElement===i.lineElement;dw(i)&&this.hoveredToken?.tokenElement===i.tokenElement||(this.hoveredToken!=null&&(d?.(this.hoveredToken,t),this.clearHoveredToken()),dw(i)&&(this.setHoveredToken(this.toTokenEventBaseProps(i)),u?.(this.hoveredToken,t))),e||(this.hoveredLine!=null&&(c?.({...this.hoveredLine,event:t}),this.clearHoveredLine()),fw(i)?(this.setHoveredLine(this.toEventBaseProps(i)),this.placeUtility(),s?.({...this.hoveredLine,event:t})):this.placeUtility());break}case`click`:{if(i==null)break;if(mw(i)&&p!=null){p(i);break}if(pw(i)&&f!=null){f(i.hunkIndex,i.all||t.shiftKey?`both`:i.direction,i.all||t.shiftKey?1/0:void 0);break}if(!fw(i))break;dw(i)&&l!=null&&l(this.toTokenEventBaseProps(i),t);let e=this.toEventBaseProps(i);o!=null&&i.numberColumn?o({...e,event:t}):a?.({...e,event:t});break}}}syncPointerListeners(e){let{__debugPointerEvents:t,lineHoverHighlight:n=`disabled`,onLineClick:r,onLineNumberClick:i,onLineEnter:a,onLineLeave:o,onTokenClick:s,onTokenEnter:c,onTokenLeave:l,onHunkExpand:u,onMergeConflictActionClick:d,enableGutterUtility:f=!1,enableLineSelection:p=!1,onGutterUtilityClick:m}=this.options,h=m!=null,g=n!==`disabled`||r!=null||i!=null||a!=null||o!=null||s!=null||c!=null||l!=null||u!=null||d!=null||f||p||h;g&&!this.hasPointerListeners?(e.addEventListener(`click`,this.handlePointerClick),e.addEventListener(`pointerdown`,this.handlePointerDown),e.addEventListener(`pointermove`,this.handlePointerMove),e.addEventListener(`pointerleave`,this.handlePointerLeave),this.hasPointerListeners=!0,Tw(t,`click`,`FileDiff.DEBUG.attachEventListeners: Attaching click events for:`,(()=>{let e=[];return(t===`both`||t===`click`)&&(r!=null&&e.push(`onLineClick`),i!=null&&e.push(`onLineNumberClick`),u!=null&&e.push(`expandable hunk separators`),d!=null&&e.push(`merge conflict actions`)),e})()),Tw(t,`move`,`FileDiff.DEBUG.attachEventListeners: Attaching pointer move event`),Tw(t,`move`,`FileDiff.DEBUG.attachEventListeners: Attaching pointer leave event`)):!g&&this.hasPointerListeners&&(e.removeEventListener(`click`,this.handlePointerClick),e.removeEventListener(`pointerdown`,this.handlePointerDown),e.removeEventListener(`pointermove`,this.handlePointerMove),e.removeEventListener(`pointerleave`,this.handlePointerLeave),this.hasPointerListeners=!1);let _=this.pointerSession.mode===`selecting`||this.pointerSession.mode===`pendingSingleLineUnselect`,v=this.pointerSession.mode===`gutterSelecting`;(!p&&_||!h&&v)&&(this.clearPointerSession(),this.detachDocumentPointerListeners(),this.selectionAnchor=void 0,this.clearPendingSingleLineState())}updateInteractiveLineAttributes(){if(this.pre==null)return;let{onLineClick:e,onLineNumberClick:t,enableLineSelection:n=!1}=this.options,r=e!=null,i=t!=null||n;r&&!this.interactiveLinesAttr?(this.pre.setAttribute(`data-interactive-lines`,``),this.interactiveLinesAttr=!0):!r&&this.interactiveLinesAttr&&(this.pre.removeAttribute(`data-interactive-lines`),this.interactiveLinesAttr=!1),i&&!this.interactiveLineNumbersAttr?(this.pre.setAttribute(`data-interactive-line-numbers`,``),this.interactiveLineNumbersAttr=!0):!i&&this.interactiveLineNumbersAttr&&(this.pre.removeAttribute(`data-interactive-line-numbers`),this.interactiveLineNumbersAttr=!1)}handlePointerDown=e=>{if(e.pointerType===`mouse`&&e.button!==0||this.pre==null||this.pointerSession.mode!==`idle`)return;let t=e.composedPath();ww(t)&&this.options.onGutterUtilityClick!=null?this.startGutterSelectionFromPointerDown(e):(e.pointerType!==`mouse`&&this.revealUtilityFromGutterPath(t),this.startLineSelectionFromPointerDown(e))};startLineSelectionFromPointerDown(e){let{enableLineSelection:t=!1}=this.options;if(!t)return;let n=this.resolveSelectionInfo(e,{source:`event-path`,requireNumberColumn:!0});if(n==null)return;let{pre:r}=this;if(r==null)return;let{lineNumber:i,eventSide:a,lineIndex:o}=n;if(e.shiftKey&&this.selectedRange!=null){let t=this.getIndexesFromSelection(this.selectedRange,r.getAttribute(`data-diff-type`)===`split`);if(t==null)return;let n=t.start<=t.end?o>=t.start:o<=t.end;this.selectionAnchor={lineNumber:n?this.selectedRange.start:this.selectedRange.end,side:n?this.selectedRange.side:this.selectedRange.endSide??this.selectedRange.side},this.updateSelection(i,a,!1),this.notifySelectionStart(this.getCurrentSelectionRange()),this.pointerSession={mode:`selecting`,pointerId:e.pointerId},this.attachDocumentPointerListeners();return}if(this.selectedRange?.start===i&&this.selectedRange?.end===i){let t={lineNumber:i,side:a};this.selectionAnchor=t,this.pointerSession={mode:`pendingSingleLineUnselect`,pointerId:e.pointerId,anchor:t,pending:t},this.attachDocumentPointerListeners();return}this.options.controlledSelection===!0?this.proposedSelectedRange=null:this.selectedRange=null,this.placeUtility(),this.selectionAnchor={lineNumber:i,side:a},this.updateSelection(i,a,!1),this.notifySelectionStart(this.getCurrentSelectionRange()),this.pointerSession={mode:`selecting`,pointerId:e.pointerId},this.attachDocumentPointerListeners()}startGutterSelectionFromPointerDown(e){let{enableLineSelection:t=!1,onGutterUtilityClick:n}=this.options;if(n==null)return;let r=this.currentSelectionEnds(),i=r?.bottom??this.resolveSelectionPoint(e,{source:`event-path`,excludeUtility:!1}),a=r?.top??i;i==null||a==null||(e.preventDefault(),e.stopPropagation(),this.pointerSession={mode:`gutterSelecting`,pointerId:e.pointerId,anchor:a,current:i},t&&(this.selectionAnchor={lineNumber:a.lineNumber,side:a.side},this.updateSelection(i.lineNumber,i.side,!1),this.notifySelectionStart(this.getCurrentSelectionRange())),this.attachDocumentPointerListeners())}handleDocumentPointerMove=e=>{let{enableLineSelection:t=!1}=this.options;switch(this.pointerSession.mode){case`idle`:return;case`gutterSelecting`:{if(e.pointerId!==this.pointerSession.pointerId)return;e.preventDefault();let n=this.resolveSelectionPoint(e,{source:`coordinates-first`});if(n==null)return;this.pointerSession.current=n,t===!0&&this.updateSelection(n.lineNumber,n.side);return}case`selecting`:{if(e.pointerId!==this.pointerSession.pointerId)return;e.preventDefault();let t=this.resolveSelectionInfo(e,{source:`coordinates-first`,requireNumberColumn:!1});if(t==null||this.selectionAnchor==null)return;this.updateSelection(t.lineNumber,t.eventSide);return}case`pendingSingleLineUnselect`:{if(e.pointerId!==this.pointerSession.pointerId)return;e.preventDefault();let t=this.resolveSelectionInfo(e,{source:`coordinates-first`,requireNumberColumn:!1});if(t==null||this.selectionAnchor==null)return;let n={lineNumber:t.lineNumber,side:t.eventSide};if(aw(this.pointerSession.pending,n))return;this.updateSelection(t.lineNumber,t.eventSide,!1),this.notifySelectionStart(this.getCurrentSelectionRange()),this.notifySelectionChangeDelta(),this.pointerSession={mode:`selecting`,pointerId:e.pointerId};return}}};handleDocumentPointerUp=e=>{let{enableLineSelection:t=!1,onGutterUtilityClick:n}=this.options;switch(this.pointerSession.mode){case`idle`:return;case`gutterSelecting`:{if(e.pointerId!==this.pointerSession.pointerId)return;e.preventDefault();let r=this.resolveSelectionPoint(e,{source:`coordinates-first`});r!=null&&(this.pointerSession.current=r,t&&this.updateSelection(r.lineNumber,r.side)),n?.(this.buildSelectedLineRange(this.pointerSession.anchor,this.pointerSession.current)),this.selectionAnchor=void 0,t&&(this.notifySelectionEnd(this.getCurrentSelectionRange()),this.notifySelectionCommitted(),this.clearProposedSelection()),this.clearPointerSession(),this.detachDocumentPointerListeners();return}case`pendingSingleLineUnselect`:if(e.pointerId!==this.pointerSession.pointerId)return;e.preventDefault(),this.updateSelection(null,void 0,!1),this.selectionAnchor=void 0,this.clearPendingSingleLineState(),this.detachDocumentPointerListeners(),this.notifySelectionEnd(this.getCurrentSelectionRange()),this.notifySelectionCommitted(),this.clearProposedSelection();return;case`selecting`:if(e.pointerId!==this.pointerSession.pointerId)return;e.preventDefault(),this.selectionAnchor=void 0,this.detachDocumentPointerListeners(),this.clearPointerSession(),this.notifySelectionEnd(this.getCurrentSelectionRange()),this.notifySelectionCommitted(),this.clearProposedSelection()}};handleDocumentPointerCancel=e=>{switch(this.pointerSession.mode){case`idle`:return;case`gutterSelecting`:case`selecting`:case`pendingSingleLineUnselect`:if(`pointerId`in this.pointerSession&&e.pointerId!==this.pointerSession.pointerId)return;this.selectionAnchor=void 0,this.clearProposedSelection(),this.clearPendingSingleLineState(),this.clearPointerSession(),this.detachDocumentPointerListeners()}};clearHoveredLine(){this.hoveredLine!=null&&(this.hoveredLine.lineElement.removeAttribute(`data-hovered`),this.hoveredLine.numberElement.removeAttribute(`data-hovered`),this.hoveredLine=void 0)}setHoveredLine(e){let{lineHoverHighlight:t=`disabled`}=this.options;this.hoveredLine!=null&&this.clearHoveredLine(),this.hoveredLine=e,t!==`disabled`&&((t===`both`||t===`line`)&&this.hoveredLine.lineElement.setAttribute(`data-hovered`,``),(t===`both`||t===`number`)&&this.hoveredLine.numberElement.setAttribute(`data-hovered`,``))}clearHoveredToken(){this.hoveredToken!=null&&(this.hoveredToken=void 0)}setHoveredToken(e){this.hoveredToken!=null&&this.clearHoveredToken(),this.hoveredToken=e}ensureGutterUtilityNode(e){if(this.gutterUtilityContainer??(this.gutterUtilityContainer=document.createElement(`div`),this.gutterUtilityContainer.setAttribute(`data-gutter-utility-slot`,``)),e)this.gutterUtilityButton!=null&&(this.gutterUtilityButton.remove(),this.gutterUtilityButton=void 0),this.gutterUtilitySlot??(this.gutterUtilitySlot=document.createElement(`slot`),this.gutterUtilitySlot.name=`gutter-utility-slot`),this.gutterUtilitySlot.parentNode!==this.gutterUtilityContainer&&this.gutterUtilityContainer.replaceChildren(this.gutterUtilitySlot);else{if(this.gutterUtilitySlot?.remove(),this.gutterUtilitySlot=void 0,this.gutterUtilityButton==null){let e=document.createElement(`div`);e.innerHTML=Dh(ow());let t=e.firstElementChild;if(!(t instanceof HTMLButtonElement))throw Error(`InteractionManager.ensureGutterUtilityNode: Node element should be a button`);t.remove(),this.gutterUtilityButton=t}this.gutterUtilityButton.parentNode!==this.gutterUtilityContainer&&this.gutterUtilityContainer.replaceChildren(this.gutterUtilityButton)}}revealUtilityFromGutterPath(e){if(this.placeUtilityFromSelection())return;let t=this.resolvePointerTarget(e);uw(t)&&t.numberColumn&&this.showUtilityOnLine(this.toEventBaseProps(t))}placeUtility(){if(!this.placeUtilityFromSelection()){if(this.hoveredLine!=null){this.showUtilityOnLine(this.hoveredLine);return}this.hideUtility()}}placeUtilityFromSelection(){let e=this.currentSelectionEnds();if(e==null)return!1;let t=this.targetForSelectionPoint(e.bottom);return t==null?this.hideUtility():this.showUtilityOnLine(this.toEventBaseProps(t)),!0}showUtilityOnLine(e){this.gutterUtilityContainer!=null&&(this.gutterUtilityLine=e,e.numberElement.appendChild(this.gutterUtilityContainer))}hideUtility(){this.gutterUtilityContainer?.remove(),this.gutterUtilityLine=void 0}currentSelectionEnds(){let e=this.getCurrentSelectionRange();return e==null?void 0:this.selectionEnds(e)}selectionEnds(e){let t={lineNumber:e.start,side:e.side},n={lineNumber:e.end,side:e.endSide??e.side},r=this.selectionPointRowIndex(t),i=this.selectionPointRowIndex(n);if(!(r==null||i==null))return r>i?{top:n,bottom:t}:{top:t,bottom:n}}selectionPointRowIndex(e){let t=this.getLineIndex(e.lineNumber,e.side);if(t!=null)return this.isSplitDiff()?t[1]:t[0]}targetForSelectionPoint(e){if(this.pre==null)return;let t=this.getLineIndex(e.lineNumber,e.side);if(t==null)return;let n=this.mode===`diff`?`${t[0]},${t[1]}`:`${t[0]}`,r=this.pre.querySelectorAll(`[data-column-number="${e.lineNumber}"][data-line-index="${n}"]`);for(let t of r){if(!(t instanceof HTMLElement))continue;let n=this.resolvePointerTarget(_w(t));if(uw(n)&&!(this.mode===`diff`&&e.side!=null&&n.side!==e.side))return n}}attachDocumentPointerListeners(){this.hasDocumentPointerListeners||=(document.addEventListener(`pointermove`,this.handleDocumentPointerMove),document.addEventListener(`pointerup`,this.handleDocumentPointerUp),document.addEventListener(`pointercancel`,this.handleDocumentPointerCancel),!0)}detachDocumentPointerListeners(){this.hasDocumentPointerListeners&&=(document.removeEventListener(`pointermove`,this.handleDocumentPointerMove),document.removeEventListener(`pointerup`,this.handleDocumentPointerUp),document.removeEventListener(`pointercancel`,this.handleDocumentPointerCancel),!1)}clearPointerSession(){this.pointerSession={mode:`idle`}}clearPendingSingleLineState(){this.pointerSession.mode===`pendingSingleLineUnselect`&&(this.pointerSession={mode:`idle`})}selectionInfoFromPath(e,t){let n=this.resolvePointerTarget(e);if(uw(n)&&!(t&&!n.numberColumn)&&n.splitLineIndex!=null)return{lineIndex:n.splitLineIndex,lineNumber:n.lineNumber,eventSide:this.mode===`diff`?n.side:void 0}}resolveSelectionInfo(e,t){let n=this.resolveSelectionPath(e,t);return n==null?void 0:this.selectionInfoFromPath(n,t.requireNumberColumn)}selectionPointFromPath(e){let t=this.resolvePointerTarget(e);if(uw(t))return{lineNumber:t.lineNumber,side:this.mode===`diff`?t.side:void 0}}resolveSelectionPoint(e,t){let n=this.resolveSelectionPath(e,t);return n==null?void 0:this.selectionPointFromPath(n)}resolveSelectionPath(e,t){let n=t.excludeUtility!==!1;switch(t.source){case`event-path`:return this.pathFromEventPath(e.composedPath(),n);case`coordinates-first`:{let t=this.pathFromCoordinates(e,n);return t===void 0?this.pathFromEventPath(e.composedPath(),n):t??void 0}}}pathFromCoordinates(e,t){let n=this.hitTest(e);if(n!==void 0)return n===null?null:this.pathFromElement(n,t)??null}pathFromEventPath(e,t){if(!(t&&ww(e))){for(let n of e)if(n instanceof Element)return this.pathFromElement(n,t)}}pathFromElement(e,t){let n=_w(e);if(t&&ww(n))return;let r=vw(e);return r==null?this.pathFromAnnotationSlot(e):_w(r)}pathFromAnnotationSlot(e){let t=bw(yw(e));if(t==null)return;let n=this.targetForSelectionPoint(t);return n==null?void 0:_w(n.lineElement)}hitTest(e){if(!Number.isFinite(e.clientX)||!Number.isFinite(e.clientY))return;let t=this.pre?.getRootNode(),n=xw(t)?t:xw(document)?document:void 0;if(n!=null)return n.elementFromPoint(e.clientX,e.clientY)}getLineIndex(e,t){let{getLineIndex:n}=this.options;return n==null?[e-1,e-1]:n(e,t)}getCurrentSelectionRange(){return this.proposedSelectedRange===void 0?this.selectedRange:this.proposedSelectedRange}clearProposedSelection(){this.proposedSelectedRange=void 0}updateSelection(e,t,n=!0){let r=this.getCurrentSelectionRange(),i;if(e==null)i=null;else{let n=this.selectionAnchor?.side??t,r=this.selectionAnchor?.lineNumber??e;i=this.buildSelectionRange(r,e,n,t)}iw(r??void 0,i??void 0)||(this.options.controlledSelection===!0?this.proposedSelectedRange=i:(this.selectedRange=i,this.queuedSelectionRender??=requestAnimationFrame(this.renderSelection)),this.placeUtility(),n&&this.notifySelectionChangeDelta())}getIndexesFromSelection(e,t){if(this.pre==null)return;let n=this.getLineIndex(e.start,e.side),r=this.getLineIndex(e.end,e.endSide??e.side);return n!=null&&r!=null?{start:t?n[1]:n[0],end:t?r[1]:r[0]}:void 0}renderSelection=()=>{if(this.queuedSelectionRender!=null&&(cancelAnimationFrame(this.queuedSelectionRender),this.queuedSelectionRender=void 0),this.pre==null||this.renderedSelectionRange===this.selectedRange)return;let e=this.pre.querySelectorAll(`[data-selected-line]`);for(let t of e)t.removeAttribute(`data-selected-line`);if(this.renderedSelectionRange=this.selectedRange,this.selectedRange==null)return;let{children:t}=this.pre;if(t.length===0)return;if(t.length>2)throw console.error(t),Error(`InteractionManager.renderSelection: Somehow there are more than 2 code elements...`);let n=this.pre.getAttribute(`data-diff-type`)===`split`,r=this.getIndexesFromSelection(this.selectedRange,n);if(r==null)throw console.error({rowRange:r,selectedRange:this.selectedRange}),Error(`InteractionManager.renderSelection: No valid rowRange`);let i=r.start===r.end,a=Math.min(r.start,r.end),o=Math.max(r.start,r.end);for(let e of t){let[t,r]=e.children,s=r.children.length;if(s!==t.children.length)throw Error(`InteractionManager.renderSelection: gutter and content children dont match, something is wrong`);for(let e=0;e<s;e++){let s=r.children[e],c=t.children[e];if(!(s instanceof HTMLElement)||!(c instanceof HTMLElement))continue;let l=this.parseLineIndex(s,n);if((l??0)>o)break;if(l==null||l<a)continue;let u=i?`single`:l===a?`first`:l===o?`last`:``;s.setAttribute(`data-selected-line`,u),c.setAttribute(`data-selected-line`,u),c.nextSibling instanceof HTMLElement&&s.nextSibling instanceof HTMLElement&&(s.nextSibling.hasAttribute(`data-line-annotation`)||s.nextSibling.hasAttribute(`data-merge-conflict-actions`))&&(i?(u=`last`,s.setAttribute(`data-selected-line`,`first`)):l===a?u=``:l===o&&s.setAttribute(`data-selected-line`,``),s.nextSibling.setAttribute(`data-selected-line`,u),c.nextSibling.setAttribute(`data-selected-line`,u))}}};notifySelectionCommitted(){this.options.onLineSelected?.(this.getCurrentSelectionRange()??null)}notifySelectionChangeDelta(){this.options.onLineSelectionChange?.(this.getCurrentSelectionRange()??null)}notifySelectionStart(e){this.options.onLineSelectionStart?.(e)}notifySelectionEnd(e){this.options.onLineSelectionEnd?.(e)}toEventBaseProps(e){return this.mode===`file`?{type:`line`,lineElement:e.lineElement,lineNumber:e.lineNumber,numberColumn:e.numberColumn,numberElement:e.numberElement}:{type:`diff-line`,annotationSide:e.side,lineType:e.lineType,lineElement:e.lineElement,numberElement:e.numberElement,lineNumber:e.lineNumber,numberColumn:e.numberColumn}}toTokenEventBaseProps({lineCharEnd:e,lineCharStart:t,lineNumber:n,side:r,tokenElement:i,tokenText:a}){return this.mode===`file`?{type:`token`,lineCharEnd:e,lineCharStart:t,lineNumber:n,tokenElement:i,tokenText:a}:{type:`token`,lineCharEnd:e,lineCharStart:t,lineNumber:n,side:r,tokenElement:i,tokenText:a}}buildSelectedLineRange(e,t){return this.buildSelectionRange(e.lineNumber,t.lineNumber,e.side,t.side)}buildSelectionRange(e,t,n,r){return{start:e,end:t,...n==null?{}:{side:n},...n!==r&&r!=null?{endSide:r}:{}}}resolvePointerTarget(e){let t=!1,n,r,i,a,o,s,c,l,u,d;for(let f of e){if(!(f instanceof HTMLElement))continue;if(d==null&&f.hasAttribute(`data-merge-conflict-action`)){let e=f.getAttribute(`data-merge-conflict-action`)??void 0,t=f.getAttribute(`data-merge-conflict-conflict-index`)??void 0,n=t==null?NaN:Number.parseInt(t,10);hw(e)&&Number.isFinite(n)&&(d={kind:`merge-conflict-action`,resolution:e,conflictIndex:n})}if(s==null&&f.hasAttribute(`data-char`)){s=f;let e=f.getAttribute(`data-char`);if(e!=null){let t=Number.parseInt(e,10);if(!Number.isNaN(t)){let e=f.textContent??``,n=t+e.length;(e.trim()!==``||this.options.enableTokenInteractionsOnWhitespace===!0)&&(c={tokenElement:s,lineCharStart:t,lineCharEnd:n,tokenText:e});continue}}}let e=o==null?f.getAttribute(`data-column-number`)??void 0:void 0;if(e!=null){o=f,u=Number.parseInt(e,10),t=!0,n=Cw(f),a=f.getAttribute(`data-line-index`)??void 0;continue}let p=i==null?f.getAttribute(`data-line`)??void 0:void 0;if(p!=null){i=f,u=Number.parseInt(p,10),n=Cw(f),a=f.getAttribute(`data-line-index`)??void 0;continue}if(l==null&&(f.hasAttribute(`data-expand-button`)||f.hasAttribute(`data-unmodified-lines`))){l={hunkIndex:void 0,direction:f.hasAttribute(`data-expand-up`)?`up`:f.hasAttribute(`data-expand-down`)?`down`:`both`,all:f.hasAttribute(`data-expand-all-button`)};continue}let m=l==null?void 0:f.getAttribute(`data-expand-index`)??void 0;if(l!=null&&m!=null){let e=Number.parseInt(m,10);Number.isNaN(e)||(l.hunkIndex=e);continue}if(r==null&&f.hasAttribute(`data-code`)){r=f;break}}if(d!=null)return d;if(l?.hunkIndex!=null)return{type:`line-info`,hunkIndex:l.hunkIndex,direction:l.direction,all:l.all};if(i??=a==null?void 0:gw(r,`[data-line][data-line-index="${a}"]`),o??=a==null?void 0:gw(r,`[data-column-number][data-line-index="${a}"]`),r==null||i==null||o==null||n==null||u==null||Number.isNaN(u))return;let f=this.parseLineIndex(i,this.isSplitDiff());return c==null?this.mode===`file`?{kind:`line`,lineType:n,lineElement:i,lineNumber:u,numberColumn:t,numberElement:o,side:void 0,splitLineIndex:f}:{kind:`line`,lineType:n,lineElement:i,lineNumber:u,numberColumn:t,numberElement:o,side:Sw(n,r),splitLineIndex:f}:this.mode===`file`?{kind:`token`,lineType:n,lineElement:i,lineNumber:u,numberColumn:t,numberElement:o,side:void 0,splitLineIndex:f,...c}:{kind:`token`,lineType:n,lineElement:i,lineNumber:u,numberColumn:t,numberElement:o,side:Sw(n,r),splitLineIndex:f,...c}}isSplitDiff(){return this.pre?.getAttribute(`data-diff-type`)===`split`}parseLineIndex(e,t){let n=(e.getAttribute(`data-line-index`)??``).split(`,`).map(e=>Number.parseInt(e,10)).filter(e=>!Number.isNaN(e));if(t&&n.length===2)return n[1];if(!t)return n[0]}};function cw({enableTokenInteractionsOnWhitespace:e,enableGutterUtility:t,lineHoverHighlight:n,onGutterUtilityClick:r,onLineClick:i,onLineEnter:a,onLineLeave:o,onLineNumberClick:s,onTokenClick:c,onTokenEnter:l,onTokenLeave:u,renderGutterUtility:d,__debugPointerEvents:f,enableLineSelection:p,controlledSelection:m,onLineSelected:h,onLineSelectionStart:g,onLineSelectionChange:_,onLineSelectionEnd:v},y,b,x){return{enableTokenInteractionsOnWhitespace:e,enableGutterUtility:lw({enableGutterUtility:t,renderGutterUtility:d,onGutterUtilityClick:r}),usesCustomGutterUtility:d!=null,lineHoverHighlight:n,onGutterUtilityClick:r,onHunkExpand:y,onMergeConflictActionClick:x,onLineClick:i,onLineEnter:a,onLineLeave:o,onLineNumberClick:s,onTokenClick:c,onTokenEnter:l,onTokenLeave:u,__debugPointerEvents:f,enableLineSelection:p,controlledSelection:m,onLineSelected:h,onLineSelectionStart:g,onLineSelectionChange:_,onLineSelectionEnd:v,getLineIndex:b}}function lw({enableGutterUtility:e,renderGutterUtility:t,onGutterUtilityClick:n}){if(n!=null&&t!=null)throw Error(`Cannot use both 'onGutterUtilityClick' and 'renderGutterUtility'. Use only one gutter utility API.`);return e??!1}function uw(e){return e!=null&&`kind`in e&&e.kind===`line`}function dw(e){return e!=null&&`kind`in e&&e.kind===`token`}function fw(e){return uw(e)||dw(e)}function pw(e){return`type`in e&&e.type===`line-info`}function mw(e){return`kind`in e&&e.kind===`merge-conflict-action`}function hw(e){return e===`current`||e===`incoming`||e===`both`}function gw(e,t){let n=e?.querySelector(t);return n instanceof HTMLElement?n:void 0}function _w(e){let t=[],n=e;for(;n!=null;)t.push(n),n=n.parentNode;return t}function vw(e){let t=e.closest(`[data-line], [data-column-number]`);if(t instanceof HTMLElement)return t;let n=e.closest(`[data-line-annotation], [data-gutter-buffer="annotation"]`);if(!(n instanceof HTMLElement))return;let r=n.previousElementSibling;return r instanceof HTMLElement&&(r.hasAttribute(`data-line`)||r.hasAttribute(`data-column-number`))?r:void 0}function yw(e){let t=e.closest(`[slot^="annotation-"]`);if(t instanceof HTMLElement)return t.getAttribute(`slot`)??void 0;if(e instanceof HTMLElement){let t=e.getAttribute(`name`)??void 0;return t!=null&&t.startsWith(`annotation-`)?t:void 0}}function bw(e){if(e==null)return;let t=/^annotation-(?:(additions|deletions)-)?(\d+)$/.exec(e);if(t==null)return;let n=Number.parseInt(t[2],10);if(!(!Number.isFinite(n)||n<=0))return{lineNumber:n,side:t[1]}}function xw(e){return e!=null&&typeof e.elementFromPoint==`function`}function Sw(e,t){switch(e){case`change-deletion`:return`deletions`;case`change-addition`:return`additions`;default:return t.hasAttribute(`data-deletions`)?`deletions`:`additions`}}function Cw(e){let t=e.getAttribute(`data-line-type`);if(t!=null)switch(t){case`change-deletion`:case`change-addition`:case`context`:case`context-expanded`:return t;default:return}}function ww(e){for(let t of e)if(t instanceof HTMLElement&&(t.hasAttribute(`data-utility-button`)||t.hasAttribute(`data-gutter-utility-slot`)||t.getAttribute(`slot`)===`gutter-utility-slot`||t.getAttribute(`name`)===`gutter-utility-slot`))return!0;return!1}function Tw(e=`none`,t,...n){switch(e){case`none`:return;case`both`:break;case`click`:if(t!==`click`)return;break;case`move`:if(t!==`move`)return;break}console.log(...n)}var Ew=class e{static resizeObserver;static managersByElement=new Map;static getResizeObserver(){let t=e.resizeObserver??new ResizeObserver(e.handleSharedResizeEntries);return e.resizeObserver=t,t}static handleSharedResizeEntries(t){let n=new Map;for(let r of t){let t=e.managersByElement.get(r.target);if(t==null)continue;let i=n.get(t);i==null?n.set(t,[r]):i.push(r)}for(let[e,t]of n)e.handleResizeEntries(t)}observedNodes=new Map;setup(e,t){let n=new Set,r=0,i=new Map(this.observedNodes);this.observedNodes.clear();for(let t of e.children){if(r===2)break;let e=(()=>{if(t instanceof HTMLElement&&t.tagName===`CODE`)return t})();if(e==null)continue;r++;let n=i.get(e);if(n!=null&&n.type!==`code`)throw Error(`ResizeManager.setup: somehow a code node is being used for an annotation, should be impossible`);let a=e.firstElementChild;a instanceof HTMLElement||(a=null),n==null?(n={type:`code`,codeElement:e,numberElement:a,codeWidth:`auto`,numberWidth:0},this.observedNodes.set(e,n),this.observe(e),a!=null&&(this.observedNodes.set(a,n),this.observe(a))):(this.observedNodes.set(e,n),i.delete(e),n.numberElement===a?n.numberElement==null?n.numberWidth=0:(i.delete(n.numberElement),this.observedNodes.set(n.numberElement,n)):(n.numberElement!=null&&(this.unobserve(n.numberElement),i.delete(n.numberElement)),a!=null&&(this.observe(a),i.delete(a),this.observedNodes.set(a,n)),n.numberElement=a,n.numberWidth=0))}if(r>1&&!t){let t=e.querySelectorAll(`[data-line-annotation*=","]`),r=new Map;for(let e of t){if(!(e instanceof HTMLElement))continue;let t=e.getAttribute(`data-line-annotation`)??``;if(!/^-?\d+,-?\d+$/.test(t)){console.error(`DiffFileRenderer.setupResizeObserver: Invalid element or annotation`,{lineAnnotation:t,element:e});continue}let n=r.get(t);n??(n=[],r.set(t,n)),n.push(e)}for(let[e,t]of r){if(t.length!==2){console.error(`DiffFileRenderer.setupResizeObserver: Bad Pair`,e,t);continue}let[r,a]=t,o=r.firstElementChild,s=a.firstElementChild;if(!(r instanceof HTMLElement)||!(a instanceof HTMLElement)||!(o instanceof HTMLElement)||!(s instanceof HTMLElement))continue;let c=i.get(o);if(c!=null){this.observedNodes.set(o,c),this.observedNodes.set(s,c),i.delete(o),i.delete(s);continue}let l=o.getBoundingClientRect().height,u=s.getBoundingClientRect().height;c={type:`annotations`,column1:{container:r,child:o,childHeight:l},column2:{container:a,child:s,childHeight:u},currentHeight:`auto`},n.add({child1:o,child2:s,item:c,newHeight:Math.max(l,u)})}for(let e of n)this.applyNewHeight(e.item,e.newHeight),this.observedNodes.set(e.child1,e.item),this.observedNodes.set(e.child2,e.item),this.observe(e.child1),this.observe(e.child2);n.clear()}for(let[e,t]of i)this.unobserve(e),t.type===`code`?kw(t):Aw(t);i.clear()}cleanUp(){for(let e of this.observedNodes.keys())this.unobserve(e);this.observedNodes.clear()}observe(t){let{managersByElement:n}=e,r=n.get(t);if(r!==this){if(r!=null&&r!==this)throw Error(`ResizeManager.observe: element is already owned by another ResizeManager`);n.set(t,this),e.getResizeObserver().observe(t)}}unobserve(t){let{managersByElement:n,resizeObserver:r}=e,i=n.get(t);if(i!=null){if(i!==this)throw Error(`ResizeManager.unobserve: element is owned by another ResizeManager`);n.delete(t),r?.unobserve(t),r!=null&&n.size===0&&(r.disconnect(),e.resizeObserver=void 0)}}handleResizeEntries(e){let t=new Map,n=new Set;for(let r of e){let{target:e,borderBoxSize:i,contentBoxSize:a}=r;if(!(e instanceof HTMLElement)){console.error(`ResizeManager.handleResizeEntries: Invalid element for ResizeObserver`,r);continue}let o=this.observedNodes.get(e);if(o==null){console.error(`ResizeManager.handleResizeEntries: Not a valid observed node`,r);continue}if(o.type===`annotations`){let t=(()=>{if(e===o.column1.child)return o.column1;if(e===o.column2.child)return o.column2})();if(t==null){console.error(`ResizeManager.handleResizeEntries: Couldn't find a column for`,{item:o,target:e});continue}t.childHeight=i[0].blockSize,n.add(o)}else if(o.type===`code`){let n=t.get(o)??{},r=a[0].inlineSize;e===o.codeElement?n.codeInlineSize=r:e===o.numberElement&&(n.numberInlineSize=r),t.set(o,n)}}this.applyAnnotationUpdates(n),n.clear(),this.applyColumnUpdates(t),t.clear()}applyAnnotationUpdates(e){for(let t of e)this.applyNewHeight(t,Math.max(t.column1.childHeight,t.column2.childHeight))}applyColumnUpdates=e=>{for(let[t,n]of e){let e=n.codeInlineSize==null?t.codeWidth:Dw(n.codeInlineSize),r=n.numberInlineSize==null?t.numberWidth:Ow(n.numberInlineSize),i=e!==t.codeWidth,a=r!==t.numberWidth;if(!(!i&&!a)&&(t.codeWidth=e,t.numberWidth=r,i&&t.codeElement.style.setProperty(`--diffs-column-width`,`${typeof e==`number`?`${e}px`:`auto`}`),a&&t.codeElement.style.setProperty(`--diffs-column-number-width`,`${r===0?`auto`:`${r}px`}`),i||a&&e!==`auto`)){let n=typeof e==`number`?Math.max(e-r,0):0;t.codeElement.style.setProperty(`--diffs-column-content-width`,`${n>0?`${n}px`:`auto`}`)}}};applyNewHeight(e,t){t!==e.currentHeight&&(e.currentHeight=Math.max(t,0),e.column1.container.style.setProperty(`--diffs-annotation-min-height`,`${e.currentHeight}px`),e.column2.container.style.setProperty(`--diffs-annotation-min-height`,`${e.currentHeight}px`))}};function Dw(e){let t=Math.max(Math.floor(e),0);return t===0?`auto`:t}function Ow(e){return Math.max(Math.ceil(e),0)}function kw(e){e.codeElement.isConnected&&(e.codeElement.style.removeProperty(`--diffs-column-content-width`),e.codeElement.style.removeProperty(`--diffs-column-number-width`),e.codeElement.style.removeProperty(`--diffs-column-width`))}function Aw(e){e.column1.container.isConnected&&e.column1.container.style.removeProperty(`--diffs-annotation-min-height`),e.column2.container.isConnected&&e.column2.container.style.removeProperty(`--diffs-annotation-min-height`)}function jw(e,t){return e==null||t==null?e===t:e.startingLine===t.startingLine&&e.totalLines===t.totalLines&&e.bufferBefore===t.bufferBefore&&e.bufferAfter===t.bufferAfter}var Mw=`<svg data-icon-sprite aria-hidden="true" width="0" height="0">
|
|
1477
|
+
<symbol id="diffs-icon-arrow-right-short" viewBox="0 0 16 16">
|
|
1478
|
+
<path d="M8.47 4.22a.75.75 0 0 0 0 1.06l1.97 1.97H3.75a.75.75 0 0 0 0 1.5h6.69l-1.97 1.97a.75.75 0 1 0 1.06 1.06l3.25-3.25a.75.75 0 0 0 0-1.06L9.53 4.22a.75.75 0 0 0-1.06 0"/>
|
|
1479
|
+
</symbol>
|
|
1480
|
+
<symbol id="diffs-icon-brand-github" viewBox="0 0 16 16">
|
|
1481
|
+
<path d="M8 0c4.42 0 8 3.58 8 8a8.01 8.01 0 0 1-5.45 7.59c-.4.08-.55-.17-.55-.38 0-.27.01-1.13.01-2.2 0-.75-.25-1.23-.54-1.48 1.78-.2 3.65-.88 3.65-3.95 0-.88-.31-1.59-.82-2.15.08-.2.36-1.02-.08-2.12 0 0-.67-.22-2.2.82-.64-.18-1.32-.27-2-.27s-1.36.09-2 .27c-1.53-1.03-2.2-.82-2.2-.82-.44 1.1-.16 1.92-.08 2.12-.51.56-.82 1.28-.82 2.15 0 3.06 1.86 3.75 3.64 3.95-.23.2-.44.55-.51 1.07-.46.21-1.61.55-2.33-.66-.15-.24-.6-.83-1.23-.82-.67.01-.27.38.01.53.34.19.73.9.82 1.13.16.45.68 1.31 2.69.94 0 .67.01 1.3.01 1.49 0 .21-.15.45-.55.38A7.995 7.995 0 0 1 0 8c0-4.42 3.58-8 8-8"/>
|
|
1482
|
+
</symbol>
|
|
1483
|
+
<symbol id="diffs-icon-chevron" viewBox="0 0 16 16">
|
|
1484
|
+
<path d="M1.47 4.47a.75.75 0 0 1 1.06 0L8 9.94l5.47-5.47a.75.75 0 1 1 1.06 1.06l-6 6a.75.75 0 0 1-1.06 0l-6-6a.75.75 0 0 1 0-1.06"/>
|
|
1485
|
+
</symbol>
|
|
1486
|
+
<symbol id="diffs-icon-chevrons-narrow" viewBox="0 0 10 16">
|
|
1487
|
+
<path d="M4.47 2.22a.75.75 0 0 1 1.06 0l3.25 3.25a.75.75 0 0 1-1.06 1.06L5 3.81 2.28 6.53a.75.75 0 0 1-1.06-1.06zM1.22 9.47a.75.75 0 0 1 1.06 0L5 12.19l2.72-2.72a.75.75 0 0 1 1.06 1.06l-3.25 3.25a.75.75 0 0 1-1.06 0l-3.25-3.25a.75.75 0 0 1 0-1.06"/>
|
|
1488
|
+
</symbol>
|
|
1489
|
+
<symbol id="diffs-icon-diff-split" viewBox="0 0 16 16">
|
|
1490
|
+
<path d="M14 0H8.5v16H14a2 2 0 0 0 2-2V2a2 2 0 0 0-2-2m-1.5 6.5v1h1a.5.5 0 0 1 0 1h-1v1a.5.5 0 0 1-1 0v-1h-1a.5.5 0 0 1 0-1h1v-1a.5.5 0 0 1 1 0"/><path d="M2 0a2 2 0 0 0-2 2v12a2 2 0 0 0 2 2h5.5V0zm.5 7.5h3a.5.5 0 0 1 0 1h-3a.5.5 0 0 1 0-1" opacity=".3"/>
|
|
1491
|
+
</symbol>
|
|
1492
|
+
<symbol id="diffs-icon-diff-unified" viewBox="0 0 16 16">
|
|
1493
|
+
<path fill-rule="evenodd" d="M16 14a2 2 0 0 1-2 2H2a2 2 0 0 1-2-2V8.5h16zm-8-4a.5.5 0 0 0-.5.5v1h-1a.5.5 0 0 0 0 1h1v1a.5.5 0 0 0 1 0v-1h1a.5.5 0 0 0 0-1h-1v-1A.5.5 0 0 0 8 10" clip-rule="evenodd"/><path fill-rule="evenodd" d="M14 0a2 2 0 0 1 2 2v5.5H0V2a2 2 0 0 1 2-2zM6.5 3.5a.5.5 0 0 0 0 1h3a.5.5 0 0 0 0-1z" clip-rule="evenodd" opacity=".4"/>
|
|
1494
|
+
</symbol>
|
|
1495
|
+
<symbol id="diffs-icon-expand" viewBox="0 0 16 16">
|
|
1496
|
+
<path d="M3.47 5.47a.75.75 0 0 1 1.06 0L8 8.94l3.47-3.47a.75.75 0 1 1 1.06 1.06l-4 4a.75.75 0 0 1-1.06 0l-4-4a.75.75 0 0 1 0-1.06"/>
|
|
1497
|
+
</symbol>
|
|
1498
|
+
<symbol id="diffs-icon-expand-all" viewBox="0 0 16 16">
|
|
1499
|
+
<path d="M11.47 9.47a.75.75 0 1 1 1.06 1.06l-4 4a.75.75 0 0 1-1.06 0l-4-4a.75.75 0 1 1 1.06-1.06L8 12.94zM7.526 1.418a.75.75 0 0 1 1.004.052l4 4a.75.75 0 1 1-1.06 1.06L8 3.06 4.53 6.53a.75.75 0 1 1-1.06-1.06l4-4z"/>
|
|
1500
|
+
</symbol>
|
|
1501
|
+
<symbol id="diffs-icon-file-code" viewBox="0 0 16 16">
|
|
1502
|
+
<path d="M10.75 0c.199 0 .39.08.53.22l3.5 3.5c.14.14.22.331.22.53v9A2.75 2.75 0 0 1 12.25 16h-8.5A2.75 2.75 0 0 1 1 13.25V2.75A2.75 2.75 0 0 1 3.75 0zm-7 1.5c-.69 0-1.25.56-1.25 1.25v10.5c0 .69.56 1.25 1.25 1.25h8.5c.69 0 1.25-.56 1.25-1.25V5h-1.25A2.25 2.25 0 0 1 10 2.75V1.5z"/><path d="M7.248 6.19a.75.75 0 0 1 .063 1.058L5.753 9l1.558 1.752a.75.75 0 0 1-1.122.996l-2-2.25a.75.75 0 0 1 0-.996l2-2.25a.75.75 0 0 1 1.06-.063M8.69 7.248a.75.75 0 1 1 1.12-.996l2 2.25a.75.75 0 0 1 0 .996l-2 2.25a.75.75 0 1 1-1.12-.996L10.245 9z"/>
|
|
1503
|
+
</symbol>
|
|
1504
|
+
<symbol id="diffs-icon-plus" viewBox="0 0 16 16">
|
|
1505
|
+
<path d="M8 3a.75.75 0 0 1 .75.75v3.5h3.5a.75.75 0 0 1 0 1.5h-3.5v3.5a.75.75 0 0 1-1.5 0v-3.5h-3.5a.75.75 0 0 1 0-1.5h3.5v-3.5A.75.75 0 0 1 8 3"/>
|
|
1506
|
+
</symbol>
|
|
1507
|
+
<symbol id="diffs-icon-symbol-added" viewBox="0 0 16 16">
|
|
1508
|
+
<path d="M8 4a.75.75 0 0 1 .75.75v2.5h2.5a.75.75 0 0 1 0 1.5h-2.5v2.5a.75.75 0 0 1-1.5 0v-2.5h-2.5a.75.75 0 0 1 0-1.5h2.5v-2.5A.75.75 0 0 1 8 4"/><path d="M1.788 4.296c.196-.88.478-1.381.802-1.706s.826-.606 1.706-.802C5.194 1.588 6.387 1.5 8 1.5s2.806.088 3.704.288c.88.196 1.381.478 1.706.802s.607.826.802 1.706c.2.898.288 2.091.288 3.704s-.088 2.806-.288 3.704c-.195.88-.478 1.381-.802 1.706s-.826.607-1.706.802c-.898.2-2.091.288-3.704.288s-2.806-.088-3.704-.288c-.88-.195-1.381-.478-1.706-.802s-.606-.826-.802-1.706C1.588 10.806 1.5 9.613 1.5 8s.088-2.806.288-3.704M8 0C1.412 0 0 1.412 0 8s1.412 8 8 8 8-1.412 8-8-1.412-8-8-8"/>
|
|
1509
|
+
</symbol>
|
|
1510
|
+
<symbol id="diffs-icon-symbol-deleted" viewBox="0 0 16 16">
|
|
1511
|
+
<path d="M4 8a.75.75 0 0 1 .75-.75h6.5a.75.75 0 0 1 0 1.5h-6.5A.75.75 0 0 1 4 8"/><path d="M1.788 4.296c.196-.88.478-1.381.802-1.706s.826-.606 1.706-.802C5.194 1.588 6.387 1.5 8 1.5s2.806.088 3.704.288c.88.196 1.381.478 1.706.802s.607.826.802 1.706c.2.898.288 2.091.288 3.704s-.088 2.806-.288 3.704c-.195.88-.478 1.381-.802 1.706s-.826.607-1.706.802c-.898.2-2.091.288-3.704.288s-2.806-.088-3.704-.288c-.88-.195-1.381-.478-1.706-.802s-.606-.826-.802-1.706C1.588 10.806 1.5 9.613 1.5 8s.088-2.806.288-3.704M8 0C1.412 0 0 1.412 0 8s1.412 8 8 8 8-1.412 8-8-1.412-8-8-8"/>
|
|
1512
|
+
</symbol>
|
|
1513
|
+
<symbol id="diffs-icon-symbol-diffstat" viewBox="0 0 16 16">
|
|
1514
|
+
<path d="M1.788 4.296c.196-.88.478-1.381.802-1.706s.826-.606 1.706-.802C5.194 1.588 6.387 1.5 8 1.5s2.806.088 3.704.288c.88.196 1.381.478 1.706.802s.607.826.802 1.706c.2.898.288 2.091.288 3.704s-.088 2.806-.288 3.704c-.195.88-.478 1.381-.802 1.706s-.826.607-1.706.802c-.898.2-2.091.288-3.704.288s-2.806-.088-3.704-.288c-.88-.195-1.381-.478-1.706-.802s-.606-.826-.802-1.706C1.588 10.806 1.5 9.613 1.5 8s.088-2.806.288-3.704M8 0C1.412 0 0 1.412 0 8s1.412 8 8 8 8-1.412 8-8-1.412-8-8-8"/><path d="M8.75 4.296a.75.75 0 0 0-1.5 0V6.25h-2a.75.75 0 0 0 0 1.5h2v1.5h1.5v-1.5h2a.75.75 0 0 0 0-1.5h-2zM5.25 10a.75.75 0 0 0 0 1.5h5.5a.75.75 0 0 0 0-1.5z"/>
|
|
1515
|
+
</symbol>
|
|
1516
|
+
<symbol id="diffs-icon-symbol-ignored" viewBox="0 0 16 16">
|
|
1517
|
+
<path d="M1.5 8c0 1.613.088 2.806.288 3.704.196.88.478 1.381.802 1.706s.826.607 1.706.802c.898.2 2.091.288 3.704.288s2.806-.088 3.704-.288c.88-.195 1.381-.478 1.706-.802s.607-.826.802-1.706c.2-.898.288-2.091.288-3.704s-.088-2.806-.288-3.704c-.195-.88-.478-1.381-.802-1.706s-.826-.606-1.706-.802C10.806 1.588 9.613 1.5 8 1.5s-2.806.088-3.704.288c-.88.196-1.381.478-1.706.802s-.606.826-.802 1.706C1.588 5.194 1.5 6.387 1.5 8M0 8c0-6.588 1.412-8 8-8s8 1.412 8 8-1.412 8-8 8-8-1.412-8-8m11.53-2.47a.75.75 0 0 0-1.06-1.06l-6 6a.75.75 0 1 0 1.06 1.06z"/>
|
|
1518
|
+
</symbol>
|
|
1519
|
+
<symbol id="diffs-icon-symbol-modified" viewBox="0 0 16 16">
|
|
1520
|
+
<path d="M1.5 8c0 1.613.088 2.806.288 3.704.196.88.478 1.381.802 1.706s.826.607 1.706.802c.898.2 2.091.288 3.704.288s2.806-.088 3.704-.288c.88-.195 1.381-.478 1.706-.802s.607-.826.802-1.706c.2-.898.288-2.091.288-3.704s-.088-2.806-.288-3.704c-.195-.88-.478-1.381-.802-1.706s-.826-.606-1.706-.802C10.806 1.588 9.613 1.5 8 1.5s-2.806.088-3.704.288c-.88.196-1.381.478-1.706.802s-.606.826-.802 1.706C1.588 5.194 1.5 6.387 1.5 8M0 8c0-6.588 1.412-8 8-8s8 1.412 8 8-1.412 8-8 8-8-1.412-8-8m8 3a3 3 0 1 0 0-6 3 3 0 0 0 0 6"/>
|
|
1521
|
+
</symbol>
|
|
1522
|
+
<symbol id="diffs-icon-symbol-moved" viewBox="0 0 16 16">
|
|
1523
|
+
<path d="M1.788 4.296c.196-.88.478-1.381.802-1.706s.826-.606 1.706-.802C5.194 1.588 6.387 1.5 8 1.5s2.806.088 3.704.288c.88.196 1.381.478 1.706.802s.607.826.802 1.706c.2.898.288 2.091.288 3.704s-.088 2.806-.288 3.704c-.195.88-.478 1.381-.802 1.706s-.826.607-1.706.802c-.898.2-2.091.288-3.704.288s-2.806-.088-3.704-.288c-.88-.195-1.381-.478-1.706-.802s-.606-.826-.802-1.706C1.588 10.806 1.5 9.613 1.5 8s.088-2.806.288-3.704M8 0C1.412 0 0 1.412 0 8s1.412 8 8 8 8-1.412 8-8-1.412-8-8-8"/><path d="M8.495 4.695a.75.75 0 0 0-.05 1.06L10.486 8l-2.041 2.246a.75.75 0 0 0 1.11 1.008l2.5-2.75a.75.75 0 0 0 0-1.008l-2.5-2.75a.75.75 0 0 0-1.06-.051m-4 0a.75.75 0 0 0-.05 1.06l2.044 2.248-1.796 1.995a.75.75 0 0 0 1.114 1.004l2.25-2.5a.75.75 0 0 0-.002-1.007l-2.5-2.75a.75.75 0 0 0-1.06-.05"/>
|
|
1524
|
+
</symbol>
|
|
1525
|
+
<symbol id="diffs-icon-symbol-ref" viewBox="0 0 16 16">
|
|
1526
|
+
<path d="M1.5 8c0 1.613.088 2.806.288 3.704.196.88.478 1.381.802 1.706.286.286.71.54 1.41.73V1.86c-.7.19-1.124.444-1.41.73-.324.325-.606.826-.802 1.706C1.588 5.194 1.5 6.387 1.5 8m4 6.397c.697.07 1.522.103 2.5.103 1.613 0 2.806-.088 3.704-.288.88-.195 1.381-.478 1.706-.802s.607-.826.802-1.706c.2-.898.288-2.091.288-3.704s-.088-2.806-.288-3.704c-.195-.88-.478-1.381-.802-1.706s-.826-.606-1.706-.802C10.806 1.588 9.613 1.5 8 1.5c-.978 0-1.803.033-2.5.103zM0 8c0-6.588 1.412-8 8-8s8 1.412 8 8-1.412 8-8 8-8-1.412-8-8m7-2a1 1 0 0 1 1-1h3a1 1 0 0 1 1 1v1a1 1 0 0 1-1 1H8a1 1 0 0 1-1-1z"/>
|
|
1527
|
+
</symbol>
|
|
1528
|
+
</svg>`;function Nw(e,t){return e==null||t==null?e===t:Fw(e.customProperties,t.customProperties)&&e.type===t.type&&e.diffIndicators===t.diffIndicators&&e.disableBackground===t.disableBackground&&e.disableLineNumbers===t.disableLineNumbers&&e.overflow===t.overflow&&e.split===t.split&&e.totalLines===t.totalLines}var Pw={};function Fw(e=Pw,t=Pw){if(e===t)return!0;let n=Object.keys(e),r=Object.keys(t);if(n.length!==r.length)return!1;for(let r of n)if(e[r]!==t[r])return!1;return!0}function Iw(e){let t=document.createElement(`div`);return t.dataset.annotationSlot=``,t.slot=e,t.style.whiteSpace=`normal`,t}function Lw(){let e=document.createElement(`div`);return e.slot=`gutter-utility-slot`,e.style.position=`absolute`,e.style.top=`0`,e.style.bottom=`0`,e.style.textAlign=`center`,e.style.whiteSpace=`normal`,e.style.touchAction=`none`,e}function Rw(){let e=document.createElement(`style`);return e.setAttribute(Du,``),e}var zw;function Bw(e){if(zw!=null)return zw;let t=e.host;if(typeof HTMLElement<`u`&&t instanceof HTMLElement&&!t.isConnected)return;let n=document.createElement(`div`);n.setAttribute(`data-code`,``),n.setAttribute(Ou,`true`);let r=document.createElement(`div`);return r.style.position=`relative`,r.style.width=`200%`,r.style.height=`200%`,n.appendChild(r),e.appendChild(n),zw=Math.max(n.offsetHeight-n.clientHeight,0),n.remove(),zw}function Vw(e){return`${ku}: ${e==null?`var(--diffs-scrollbar-gutter-fallback)`:`${e}px`};`}var Hw=`@layer base {
|
|
1529
|
+
:host {
|
|
1530
|
+
--diffs-font-fallback: "SF Mono", Monaco, Consolas, "Ubuntu Mono", "Liberation Mono",
|
|
1531
|
+
"Courier New", monospace;
|
|
1532
|
+
--diffs-header-font-fallback: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue",
|
|
1533
|
+
"Noto Sans", "Liberation Sans", Arial, sans-serif;
|
|
1534
|
+
--diffs-mixer: light-dark(#000, #fff);
|
|
1535
|
+
--diffs-gap-fallback: 8px;
|
|
1536
|
+
--diffs-scrollbar-gutter-fallback: 6px;
|
|
1537
|
+
--diffs-scrollbar-gutter: var(--diffs-scrollbar-gutter-override, var(--diffs-scrollbar-gutter-measured, var(--diffs-scrollbar-gutter-fallback)));
|
|
1538
|
+
--diffs-added-light: #0dbe4e;
|
|
1539
|
+
--diffs-added-dark: #5ecc71;
|
|
1540
|
+
--diffs-modified-light: #009fff;
|
|
1541
|
+
--diffs-modified-dark: #69b1ff;
|
|
1542
|
+
--diffs-deleted-light: #ff2e3f;
|
|
1543
|
+
--diffs-deleted-dark: #ff6762;
|
|
1544
|
+
color-scheme: light dark;
|
|
1545
|
+
font-family: var(--diffs-header-font-family, var(--diffs-header-font-fallback));
|
|
1546
|
+
font-size: var(--diffs-font-size, 13px);
|
|
1547
|
+
line-height: var(--diffs-line-height, 20px);
|
|
1548
|
+
font-feature-settings: var(--diffs-font-features);
|
|
1549
|
+
--diffs-bg: light-dark(var(--diffs-light-bg, #fff), var(--diffs-dark-bg, #000));
|
|
1550
|
+
--diffs-bg-buffer: var(--diffs-bg-buffer-override, light-dark(color-mix(in lab, var(--diffs-bg) 92%, var(--diffs-mixer)), color-mix(in lab, var(--diffs-bg) 92%, var(--diffs-mixer))));
|
|
1551
|
+
--diffs-bg-context: var(--diffs-bg-context-override, light-dark(color-mix(in lab, var(--diffs-bg) 98.5%, var(--diffs-mixer)), color-mix(in lab, var(--diffs-bg) 92.5%, var(--diffs-mixer))));
|
|
1552
|
+
--diffs-bg-context-gutter: var(--diffs-bg-context-gutter-override, light-dark(color-mix(in lab, var(--diffs-bg-context) 90%, var(--diffs-bg)), color-mix(in lab, var(--diffs-bg-context) 45%, var(--diffs-bg))));
|
|
1553
|
+
--diffs-bg-separator: var(--diffs-bg-separator-override, light-dark(color-mix(in lab, var(--diffs-bg) 96%, var(--diffs-mixer)), color-mix(in lab, var(--diffs-bg) 85%, var(--diffs-mixer))));
|
|
1554
|
+
--diffs-fg: light-dark(var(--diffs-light, #000), var(--diffs-dark, #fff));
|
|
1555
|
+
--diffs-fg-number: var(--diffs-fg-number-override, light-dark(color-mix(in lab, var(--diffs-fg) 65%, var(--diffs-bg)), color-mix(in lab, var(--diffs-fg) 65%, var(--diffs-bg))));
|
|
1556
|
+
--diffs-fg-conflict-marker: var(--diffs-fg-conflict-marker-override, var(--diffs-fg-number));
|
|
1557
|
+
--diffs-deletion-base: var(--diffs-deletion-color-override, light-dark(var(--diffs-light-deletion-color, var(--diffs-deletion-color, var(--diffs-deleted-light))), var(--diffs-dark-deletion-color, var(--diffs-deletion-color, var(--diffs-deleted-dark)))));
|
|
1558
|
+
--diffs-addition-base: var(--diffs-addition-color-override, light-dark(var(--diffs-light-addition-color, var(--diffs-addition-color, var(--diffs-added-light))), var(--diffs-dark-addition-color, var(--diffs-addition-color, var(--diffs-added-dark)))));
|
|
1559
|
+
--diffs-modified-base: var(--diffs-modified-color-override, light-dark(var(--diffs-light-modified-color, var(--diffs-modified-color, var(--diffs-modified-light))), var(--diffs-dark-modified-color, var(--diffs-modified-color, var(--diffs-modified-dark)))));
|
|
1560
|
+
--diffs-bg-deletion: var(--diffs-bg-deletion-override, light-dark(color-mix(in lab, var(--diffs-bg) 88%, var(--diffs-deletion-base)), color-mix(in lab, var(--diffs-bg) 80%, var(--diffs-deletion-base))));
|
|
1561
|
+
--diffs-bg-deletion-emphasis: var(--diffs-bg-deletion-emphasis-override, light-dark(rgb(from var(--diffs-deletion-base) r g b / .15), rgb(from var(--diffs-deletion-base) r g b / .2)));
|
|
1562
|
+
--diffs-bg-addition: var(--diffs-bg-addition-override, light-dark(color-mix(in lab, var(--diffs-bg) 88%, var(--diffs-addition-base)), color-mix(in lab, var(--diffs-bg) 80%, var(--diffs-addition-base))));
|
|
1563
|
+
--diffs-bg-addition-emphasis: var(--diffs-bg-addition-emphasis-override, light-dark(rgb(from var(--diffs-addition-base) r g b / .15), rgb(from var(--diffs-addition-base) r g b / .2)));
|
|
1564
|
+
--diffs-selection-base: var(--diffs-modified-base);
|
|
1565
|
+
--diffs-selection-number-fg: light-dark(color-mix(in lab, var(--diffs-selection-base) 65%, var(--diffs-mixer)), color-mix(in lab, var(--diffs-selection-base) 75%, var(--diffs-mixer)));
|
|
1566
|
+
background-color: var(--diffs-bg);
|
|
1567
|
+
color: var(--diffs-fg);
|
|
1568
|
+
display: block;
|
|
1569
|
+
}
|
|
1570
|
+
|
|
1571
|
+
pre, code, [data-error-wrapper] {
|
|
1572
|
+
isolation: isolate;
|
|
1573
|
+
font-family: var(--diffs-font-family, var(--diffs-font-fallback));
|
|
1574
|
+
outline: none;
|
|
1575
|
+
margin: 0;
|
|
1576
|
+
padding: 0;
|
|
1577
|
+
display: block;
|
|
1578
|
+
}
|
|
1579
|
+
|
|
1580
|
+
pre, code {
|
|
1581
|
+
background-color: var(--diffs-bg);
|
|
1582
|
+
}
|
|
1583
|
+
|
|
1584
|
+
code {
|
|
1585
|
+
contain: content;
|
|
1586
|
+
}
|
|
1587
|
+
|
|
1588
|
+
*, :before, :after {
|
|
1589
|
+
box-sizing: border-box;
|
|
1590
|
+
}
|
|
1591
|
+
|
|
1592
|
+
[data-icon-sprite] {
|
|
1593
|
+
display: none;
|
|
1594
|
+
}
|
|
1595
|
+
|
|
1596
|
+
[data-diffs-header], [data-separator] {
|
|
1597
|
+
font-family: var(--diffs-header-font-family, var(--diffs-header-font-fallback));
|
|
1598
|
+
}
|
|
1599
|
+
|
|
1600
|
+
[data-diffs-header][data-sticky] {
|
|
1601
|
+
z-index: 1;
|
|
1602
|
+
background-color: var(--diffs-bg);
|
|
1603
|
+
position: sticky;
|
|
1604
|
+
top: 0;
|
|
1605
|
+
}
|
|
1606
|
+
|
|
1607
|
+
[data-file-info] {
|
|
1608
|
+
color: var(--fg);
|
|
1609
|
+
background-color: color-mix(in lab, var(--bg) 98%, var(--fg));
|
|
1610
|
+
border-block: 1px solid color-mix(in lab, var(--bg) 95%, var(--fg));
|
|
1611
|
+
padding: 10px;
|
|
1612
|
+
font-weight: 700;
|
|
1613
|
+
}
|
|
1614
|
+
|
|
1615
|
+
[data-diff], [data-file] {
|
|
1616
|
+
--diffs-grid-number-column-width: minmax(min-content, max-content);
|
|
1617
|
+
--diffs-code-grid: var(--diffs-grid-number-column-width) 1fr;
|
|
1618
|
+
|
|
1619
|
+
&[data-dehydrated] {
|
|
1620
|
+
--diffs-code-grid: var(--diffs-grid-number-column-width) minmax(0, 1fr);
|
|
1621
|
+
}
|
|
1622
|
+
|
|
1623
|
+
&:hover [data-code]::-webkit-scrollbar-thumb {
|
|
1624
|
+
background-color: var(--diffs-bg-context);
|
|
1625
|
+
}
|
|
1626
|
+
}
|
|
1627
|
+
|
|
1628
|
+
@supports (-webkit-touch-callout: none) {
|
|
1629
|
+
:host {
|
|
1630
|
+
--diffs-scrollbar-gutter-fallback: 0px;
|
|
1631
|
+
}
|
|
1632
|
+
}
|
|
1633
|
+
|
|
1634
|
+
[data-line] span {
|
|
1635
|
+
color: light-dark(var(--diffs-token-light, var(--diffs-light)), var(--diffs-token-dark, var(--diffs-dark)));
|
|
1636
|
+
background-color: light-dark(var(--diffs-token-light-bg, inherit), var(--diffs-token-dark-bg, inherit));
|
|
1637
|
+
font-weight: light-dark(var(--diffs-token-light-font-weight, inherit), var(--diffs-token-dark-font-weight, inherit));
|
|
1638
|
+
font-style: light-dark(var(--diffs-token-light-font-style, inherit), var(--diffs-token-dark-font-style, inherit));
|
|
1639
|
+
text-decoration: light-dark(var(--diffs-token-light-text-decoration, inherit), var(--diffs-token-dark-text-decoration, inherit));
|
|
1640
|
+
}
|
|
1641
|
+
|
|
1642
|
+
[data-line], [data-gutter-buffer], [data-column-number], [data-line-annotation], [data-no-newline], [data-merge-conflict], [data-merge-conflict-actions] {
|
|
1643
|
+
--diffs-computed-decoration-bg: var(--diffs-bg);
|
|
1644
|
+
--diffs-computed-diff-line-bg: var(--diffs-bg);
|
|
1645
|
+
--diffs-computed-selected-line-bg: var(--diffs-bg);
|
|
1646
|
+
color: var(--diffs-fg);
|
|
1647
|
+
background-color: var(--diffs-line-bg, var(--diffs-bg));
|
|
1648
|
+
|
|
1649
|
+
@media (pointer: fine) {
|
|
1650
|
+
&:where([data-hovered]) {
|
|
1651
|
+
--diffs-computed-hovered-line-bg: light-dark(color-mix(in lab,
|
|
1652
|
+
var(--diffs-computed-selected-line-bg) 97%,
|
|
1653
|
+
var(--diffs-bg-hover-override, var(--diffs-mixer))), color-mix(in lab,
|
|
1654
|
+
var(--diffs-computed-selected-line-bg) 91%,
|
|
1655
|
+
var(--diffs-bg-hover-override, var(--diffs-mixer))));
|
|
1656
|
+
--diffs-line-bg: var(--diffs-computed-hovered-line-bg, inherit);
|
|
1657
|
+
}
|
|
1658
|
+
}
|
|
1659
|
+
}
|
|
1660
|
+
|
|
1661
|
+
[data-line], [data-no-newline] {
|
|
1662
|
+
&[data-decoration-bg] {
|
|
1663
|
+
--mix-deco-light: 92%;
|
|
1664
|
+
--mix-deco-dark: 85%;
|
|
1665
|
+
|
|
1666
|
+
&[data-decoration-bg-depth="2"] {
|
|
1667
|
+
--mix-deco-light: 88%;
|
|
1668
|
+
--mix-deco-dark: 80%;
|
|
1669
|
+
}
|
|
1670
|
+
|
|
1671
|
+
&[data-decoration-bg-depth="3"] {
|
|
1672
|
+
--mix-deco-light: 85%;
|
|
1673
|
+
--mix-deco-dark: 78%;
|
|
1674
|
+
}
|
|
1675
|
+
|
|
1676
|
+
@media (pointer: fine) {
|
|
1677
|
+
&[data-hovered]:not([data-selected-line]) {
|
|
1678
|
+
--mix-deco-light: 85%;
|
|
1679
|
+
--mix-deco-dark: 85%;
|
|
1680
|
+
}
|
|
1681
|
+
|
|
1682
|
+
&[data-hovered]:not([data-selected-line])[data-decoration-bg-depth="2"] {
|
|
1683
|
+
--mix-deco-light: 83%;
|
|
1684
|
+
--mix-deco-dark: 83%;
|
|
1685
|
+
}
|
|
1686
|
+
|
|
1687
|
+
&[data-hovered]:not([data-selected-line])[data-decoration-bg-depth="3"] {
|
|
1688
|
+
--mix-deco-light: 81%;
|
|
1689
|
+
--mix-deco-dark: 81%;
|
|
1690
|
+
}
|
|
1691
|
+
}
|
|
1692
|
+
|
|
1693
|
+
--diffs-computed-decoration-bg: light-dark(color-mix(in lab,
|
|
1694
|
+
var(--diffs-bg) var(--mix-deco-light),
|
|
1695
|
+
var(--diffs-decoration-bg)), color-mix(in lab,
|
|
1696
|
+
var(--diffs-bg) var(--mix-deco-dark),
|
|
1697
|
+
var(--diffs-decoration-bg)));
|
|
1698
|
+
--diffs-computed-diff-line-bg: var(--diffs-computed-decoration-bg);
|
|
1699
|
+
--diffs-computed-selected-line-bg: var(--diffs-computed-decoration-bg);
|
|
1700
|
+
--diffs-line-bg: var(--diffs-computed-decoration-bg);
|
|
1701
|
+
}
|
|
1702
|
+
}
|
|
1703
|
+
|
|
1704
|
+
[data-line-annotation], [data-gutter-buffer="annotation"] {
|
|
1705
|
+
--diffs-annotation-bg: var(--diffs-bg-context);
|
|
1706
|
+
--diffs-computed-decoration-bg: var(--diffs-annotation-bg);
|
|
1707
|
+
--diffs-computed-diff-line-bg: var(--diffs-annotation-bg);
|
|
1708
|
+
--diffs-computed-selected-line-bg: var(--diffs-annotation-bg);
|
|
1709
|
+
--diffs-line-bg: var(--diffs-annotation-bg);
|
|
1710
|
+
}
|
|
1711
|
+
|
|
1712
|
+
[data-merge-conflict-actions], [data-gutter-buffer="merge-conflict-action"], [data-gutter-buffer="merge-conflict-marker-base"], [data-gutter-buffer="merge-conflict-marker-separator"], [data-merge-conflict="marker-base"], [data-merge-conflict="marker-separator"] {
|
|
1713
|
+
--diffs-computed-decoration-bg: var(--diffs-bg-context);
|
|
1714
|
+
--diffs-computed-diff-line-bg: var(--diffs-bg-context);
|
|
1715
|
+
--diffs-computed-selected-line-bg: var(--diffs-bg-context);
|
|
1716
|
+
--diffs-line-bg: var(--diffs-bg-context);
|
|
1717
|
+
}
|
|
1718
|
+
|
|
1719
|
+
[data-gutter-buffer="merge-conflict-marker-start"], [data-merge-conflict="marker-start"] {
|
|
1720
|
+
--diffs-computed-decoration-bg: light-dark(color-mix(in lab,
|
|
1721
|
+
var(--diffs-bg) 78%,
|
|
1722
|
+
var(--conflict-bg-current-header-override, var(--diffs-addition-base))), color-mix(in lab,
|
|
1723
|
+
var(--diffs-bg) 68%,
|
|
1724
|
+
var(--conflict-bg-current-header-override, var(--diffs-addition-base))));
|
|
1725
|
+
--diffs-computed-diff-line-bg: var(--diffs-computed-decoration-bg);
|
|
1726
|
+
--diffs-computed-selected-line-bg: var(--diffs-computed-decoration-bg);
|
|
1727
|
+
--diffs-line-bg: var(--diffs-computed-decoration-bg);
|
|
1728
|
+
}
|
|
1729
|
+
|
|
1730
|
+
[data-gutter-buffer="merge-conflict-marker-end"], [data-merge-conflict="marker-end"] {
|
|
1731
|
+
--diffs-computed-decoration-bg: light-dark(color-mix(in lab,
|
|
1732
|
+
var(--diffs-bg) 78%,
|
|
1733
|
+
var(--conflict-bg-incoming-header-override, var(--diffs-modified-base))), color-mix(in lab,
|
|
1734
|
+
var(--diffs-bg) 68%,
|
|
1735
|
+
var(--conflict-bg-incoming-header-override, var(--diffs-modified-base))));
|
|
1736
|
+
--diffs-computed-diff-line-bg: var(--diffs-computed-decoration-bg);
|
|
1737
|
+
--diffs-computed-selected-line-bg: var(--diffs-computed-decoration-bg);
|
|
1738
|
+
--diffs-line-bg: var(--diffs-computed-decoration-bg);
|
|
1739
|
+
}
|
|
1740
|
+
|
|
1741
|
+
[data-has-merge-conflict] [data-line-annotation], [data-has-merge-conflict] [data-gutter-buffer="annotation"] {
|
|
1742
|
+
--diffs-computed-decoration-bg: var(--diffs-bg);
|
|
1743
|
+
--diffs-computed-diff-line-bg: var(--diffs-bg);
|
|
1744
|
+
--diffs-computed-selected-line-bg: var(--diffs-bg);
|
|
1745
|
+
--diffs-line-bg: var(--diffs-bg);
|
|
1746
|
+
}
|
|
1747
|
+
|
|
1748
|
+
:where([data-background]) {
|
|
1749
|
+
& [data-gutter-buffer], & [data-column-number] {
|
|
1750
|
+
--mix-light: 91%;
|
|
1751
|
+
--mix-dark: 85%;
|
|
1752
|
+
}
|
|
1753
|
+
|
|
1754
|
+
& [data-line], & [data-no-newline] {
|
|
1755
|
+
--mix-light: 88%;
|
|
1756
|
+
--mix-dark: 80%;
|
|
1757
|
+
}
|
|
1758
|
+
|
|
1759
|
+
& [data-gutter-buffer], & [data-column-number], & [data-line], & [data-no-newline] {
|
|
1760
|
+
--diffs-diff-line-mix-target: var(--diffs-bg);
|
|
1761
|
+
|
|
1762
|
+
&[data-line-type="change-deletion"] {
|
|
1763
|
+
--diffs-diff-line-mix-target: var(--diffs-bg-deletion-override, var(--diffs-deletion-base));
|
|
1764
|
+
|
|
1765
|
+
@media (pointer: fine) {
|
|
1766
|
+
&[data-hovered] {
|
|
1767
|
+
--mix-light: 80%;
|
|
1768
|
+
--mix-dark: 75%;
|
|
1769
|
+
}
|
|
1770
|
+
}
|
|
1771
|
+
|
|
1772
|
+
&:where([data-gutter-buffer], [data-column-number]) {
|
|
1773
|
+
color: var(--diffs-fg-number-deletion-override, var(--diffs-deletion-base));
|
|
1774
|
+
--diffs-diff-line-mix-target: var(--diffs-bg-deletion-number-override, var(--diffs-deletion-base));
|
|
1775
|
+
}
|
|
1776
|
+
|
|
1777
|
+
--diffs-computed-diff-line-bg: light-dark(color-mix(in lab,
|
|
1778
|
+
var(--diffs-computed-decoration-bg) var(--mix-light),
|
|
1779
|
+
var(--diffs-diff-line-mix-target)), color-mix(in lab,
|
|
1780
|
+
var(--diffs-computed-decoration-bg) var(--mix-dark),
|
|
1781
|
+
var(--diffs-diff-line-mix-target)));
|
|
1782
|
+
--diffs-computed-selected-line-bg: var(--diffs-computed-diff-line-bg);
|
|
1783
|
+
--diffs-line-bg: var(--diffs-computed-diff-line-bg, inherit);
|
|
1784
|
+
}
|
|
1785
|
+
|
|
1786
|
+
&[data-line-type="change-addition"] {
|
|
1787
|
+
--diffs-diff-line-mix-target: var(--diffs-bg-addition-override, var(--diffs-addition-base));
|
|
1788
|
+
|
|
1789
|
+
@media (pointer: fine) {
|
|
1790
|
+
&[data-hovered] {
|
|
1791
|
+
--mix-light: 80%;
|
|
1792
|
+
--mix-dark: 70%;
|
|
1793
|
+
}
|
|
1794
|
+
}
|
|
1795
|
+
|
|
1796
|
+
&:where([data-gutter-buffer], [data-column-number]) {
|
|
1797
|
+
color: var(--diffs-fg-number-addition-override, var(--diffs-addition-base));
|
|
1798
|
+
--diffs-diff-line-mix-target: var(--diffs-bg-addition-number-override, var(--diffs-addition-base));
|
|
1799
|
+
}
|
|
1800
|
+
|
|
1801
|
+
--diffs-computed-diff-line-bg: light-dark(color-mix(in lab,
|
|
1802
|
+
var(--diffs-computed-decoration-bg) var(--mix-light),
|
|
1803
|
+
var(--diffs-diff-line-mix-target)), color-mix(in lab,
|
|
1804
|
+
var(--diffs-computed-decoration-bg) var(--mix-dark),
|
|
1805
|
+
var(--diffs-diff-line-mix-target)));
|
|
1806
|
+
--diffs-computed-selected-line-bg: var(--diffs-computed-diff-line-bg);
|
|
1807
|
+
--diffs-line-bg: var(--diffs-computed-diff-line-bg, inherit);
|
|
1808
|
+
}
|
|
1809
|
+
|
|
1810
|
+
&[data-merge-conflict="current"] {
|
|
1811
|
+
--diffs-diff-line-mix-target: var(--conflict-bg-current-override, var(--diffs-addition-base));
|
|
1812
|
+
|
|
1813
|
+
&:where([data-gutter-buffer], [data-column-number]) {
|
|
1814
|
+
color: var(--diffs-fg-number-addition-override, var(--diffs-addition-base));
|
|
1815
|
+
--diffs-diff-line-mix-target: var(--conflict-bg-current-number-override, var(--diffs-addition-base));
|
|
1816
|
+
}
|
|
1817
|
+
|
|
1818
|
+
@media (pointer: fine) {
|
|
1819
|
+
&[data-hovered] {
|
|
1820
|
+
--mix-light: 80%;
|
|
1821
|
+
--mix-dark: 70%;
|
|
1822
|
+
}
|
|
1823
|
+
}
|
|
1824
|
+
|
|
1825
|
+
--diffs-computed-diff-line-bg: light-dark(color-mix(in lab,
|
|
1826
|
+
var(--diffs-computed-decoration-bg) var(--mix-light),
|
|
1827
|
+
var(--diffs-diff-line-mix-target)), color-mix(in lab,
|
|
1828
|
+
var(--diffs-computed-decoration-bg) var(--mix-dark),
|
|
1829
|
+
var(--diffs-diff-line-mix-target)));
|
|
1830
|
+
--diffs-computed-selected-line-bg: var(--diffs-computed-diff-line-bg);
|
|
1831
|
+
--diffs-line-bg: var(--diffs-computed-diff-line-bg, inherit);
|
|
1832
|
+
}
|
|
1833
|
+
|
|
1834
|
+
&[data-merge-conflict="incoming"] {
|
|
1835
|
+
--diffs-diff-line-mix-target: var(--conflict-bg-incoming-override, var(--diffs-modified-base));
|
|
1836
|
+
|
|
1837
|
+
&:where([data-gutter-buffer], [data-column-number]) {
|
|
1838
|
+
color: var(--diffs-modified-base);
|
|
1839
|
+
--diffs-diff-line-mix-target: var(--conflict-bg-incoming-number-override, var(--diffs-modified-base));
|
|
1840
|
+
}
|
|
1841
|
+
|
|
1842
|
+
@media (pointer: fine) {
|
|
1843
|
+
&[data-hovered] {
|
|
1844
|
+
--mix-light: 80%;
|
|
1845
|
+
--mix-dark: 70%;
|
|
1846
|
+
}
|
|
1847
|
+
}
|
|
1848
|
+
|
|
1849
|
+
--diffs-computed-diff-line-bg: light-dark(color-mix(in lab,
|
|
1850
|
+
var(--diffs-computed-decoration-bg) var(--mix-light),
|
|
1851
|
+
var(--diffs-diff-line-mix-target)), color-mix(in lab,
|
|
1852
|
+
var(--diffs-computed-decoration-bg) var(--mix-dark),
|
|
1853
|
+
var(--diffs-diff-line-mix-target)));
|
|
1854
|
+
--diffs-computed-selected-line-bg: var(--diffs-computed-diff-line-bg);
|
|
1855
|
+
--diffs-line-bg: var(--diffs-computed-diff-line-bg, inherit);
|
|
1856
|
+
}
|
|
1857
|
+
}
|
|
1858
|
+
}
|
|
1859
|
+
|
|
1860
|
+
[data-gutter-buffer], [data-column-number], [data-line], [data-line-annotation], [data-merge-conflict], [data-merge-conflict-actions], [data-no-newline] {
|
|
1861
|
+
--diffs-selection-mix-target: var(--diffs-bg-selection-override, var(--diffs-selection-base));
|
|
1862
|
+
|
|
1863
|
+
&:where([data-line], [data-line-annotation], [data-merge-conflict], [data-merge-conflict-actions], [data-no-newline])[data-selected-line] {
|
|
1864
|
+
--mix-selection-light: 82%;
|
|
1865
|
+
--mix-selection-dark: 75%;
|
|
1866
|
+
|
|
1867
|
+
@media (pointer: fine) {
|
|
1868
|
+
&[data-hovered]:not([data-merge-conflict], [data-line-type="change-addition"], [data-line-type="change-deletion"]) {
|
|
1869
|
+
--mix-selection-light: 75%;
|
|
1870
|
+
--mix-selection-dark: 70%;
|
|
1871
|
+
}
|
|
1872
|
+
}
|
|
1873
|
+
}
|
|
1874
|
+
|
|
1875
|
+
&:where([data-gutter-buffer], [data-column-number])[data-selected-line] {
|
|
1876
|
+
--mix-selection-light: 75%;
|
|
1877
|
+
--mix-selection-dark: 60%;
|
|
1878
|
+
--diffs-selection-mix-target: var(--diffs-bg-selection-number-override, var(--diffs-selection-base));
|
|
1879
|
+
|
|
1880
|
+
@media (pointer: fine) {
|
|
1881
|
+
&[data-hovered]:not([data-merge-conflict], [data-line-type="change-addition"], [data-line-type="change-deletion"]) {
|
|
1882
|
+
--mix-selection-light: 70%;
|
|
1883
|
+
--mix-selection-dark: 55%;
|
|
1884
|
+
}
|
|
1885
|
+
}
|
|
1886
|
+
}
|
|
1887
|
+
|
|
1888
|
+
&[data-selected-line] {
|
|
1889
|
+
--diffs-computed-selected-line-bg: light-dark(color-mix(in lab,
|
|
1890
|
+
var(--diffs-computed-diff-line-bg) var(--mix-selection-light),
|
|
1891
|
+
var(--diffs-selection-mix-target)), color-mix(in lab,
|
|
1892
|
+
var(--diffs-computed-diff-line-bg) var(--mix-selection-dark),
|
|
1893
|
+
var(--diffs-selection-mix-target)));
|
|
1894
|
+
--diffs-line-bg: var(--diffs-computed-selected-line-bg, inherit);
|
|
1895
|
+
}
|
|
1896
|
+
}
|
|
1897
|
+
|
|
1898
|
+
[data-gutter-buffer], [data-column-number] {
|
|
1899
|
+
&[data-selected-line] {
|
|
1900
|
+
color: var(--diffs-selection-number-fg);
|
|
1901
|
+
}
|
|
1902
|
+
}
|
|
1903
|
+
|
|
1904
|
+
[data-no-newline] {
|
|
1905
|
+
user-select: none;
|
|
1906
|
+
|
|
1907
|
+
& span {
|
|
1908
|
+
opacity: .6;
|
|
1909
|
+
}
|
|
1910
|
+
}
|
|
1911
|
+
|
|
1912
|
+
[data-diff-type="split"][data-overflow="scroll"] {
|
|
1913
|
+
grid-template-columns: 1fr 1fr;
|
|
1914
|
+
display: grid;
|
|
1915
|
+
|
|
1916
|
+
& [data-additions] {
|
|
1917
|
+
border-left: 1px solid var(--diffs-bg);
|
|
1918
|
+
}
|
|
1919
|
+
|
|
1920
|
+
& [data-deletions] {
|
|
1921
|
+
border-right: 1px solid var(--diffs-bg);
|
|
1922
|
+
}
|
|
1923
|
+
}
|
|
1924
|
+
|
|
1925
|
+
[data-code] {
|
|
1926
|
+
grid-auto-flow: dense;
|
|
1927
|
+
grid-template-columns: var(--diffs-code-grid);
|
|
1928
|
+
overflow: var(--diffs-overflow-override, scroll) clip;
|
|
1929
|
+
overscroll-behavior-x: none;
|
|
1930
|
+
tab-size: var(--diffs-tab-size, 2);
|
|
1931
|
+
padding-top: var(--diffs-gap-block, var(--diffs-gap-fallback));
|
|
1932
|
+
padding-bottom: max(0px,
|
|
1933
|
+
calc(var(--diffs-gap-block, var(--diffs-gap-fallback)) -
|
|
1934
|
+
var(--diffs-scrollbar-gutter)));
|
|
1935
|
+
scrollbar-gutter: stable;
|
|
1936
|
+
align-self: flex-start;
|
|
1937
|
+
display: grid;
|
|
1938
|
+
}
|
|
1939
|
+
|
|
1940
|
+
[data-diffs-scrollbar-measure] {
|
|
1941
|
+
opacity: 0;
|
|
1942
|
+
pointer-events: none;
|
|
1943
|
+
scrollbar-gutter: auto;
|
|
1944
|
+
grid-template-columns: none;
|
|
1945
|
+
width: 100px;
|
|
1946
|
+
height: 100px;
|
|
1947
|
+
padding: 0;
|
|
1948
|
+
position: absolute;
|
|
1949
|
+
top: -200px;
|
|
1950
|
+
left: -200px;
|
|
1951
|
+
}
|
|
1952
|
+
|
|
1953
|
+
[data-container-size] {
|
|
1954
|
+
container-type: inline-size;
|
|
1955
|
+
}
|
|
1956
|
+
|
|
1957
|
+
[data-code]::-webkit-scrollbar {
|
|
1958
|
+
width: 0;
|
|
1959
|
+
height: var(--diffs-scrollbar-gutter);
|
|
1960
|
+
}
|
|
1961
|
+
|
|
1962
|
+
[data-code]::-webkit-scrollbar-track {
|
|
1963
|
+
background: none;
|
|
1964
|
+
}
|
|
1965
|
+
|
|
1966
|
+
[data-code]::-webkit-scrollbar-thumb {
|
|
1967
|
+
background-color: #0000;
|
|
1968
|
+
background-clip: content-box;
|
|
1969
|
+
border: 1px solid #0000;
|
|
1970
|
+
border-radius: 3px;
|
|
1971
|
+
}
|
|
1972
|
+
|
|
1973
|
+
[data-code]::-webkit-scrollbar-corner {
|
|
1974
|
+
background-color: #0000;
|
|
1975
|
+
}
|
|
1976
|
+
|
|
1977
|
+
@supports ((-moz-appearance: none)) {
|
|
1978
|
+
[data-code] {
|
|
1979
|
+
scrollbar-width: thin;
|
|
1980
|
+
scrollbar-color: var(--diffs-bg-context) transparent;
|
|
1981
|
+
padding-bottom: var(--diffs-gap-block, var(--diffs-gap-fallback));
|
|
1982
|
+
}
|
|
1983
|
+
}
|
|
1984
|
+
|
|
1985
|
+
[data-diffs-header] ~ [data-diff], [data-diffs-header] ~ [data-file] {
|
|
1986
|
+
& [data-code], &[data-overflow="wrap"] {
|
|
1987
|
+
padding-top: 0;
|
|
1988
|
+
}
|
|
1989
|
+
}
|
|
1990
|
+
|
|
1991
|
+
[data-gutter] {
|
|
1992
|
+
grid-template-rows: subgrid;
|
|
1993
|
+
grid-template-columns: subgrid;
|
|
1994
|
+
z-index: 3;
|
|
1995
|
+
background-color: var(--diffs-bg);
|
|
1996
|
+
grid-column: 1;
|
|
1997
|
+
display: grid;
|
|
1998
|
+
position: relative;
|
|
1999
|
+
|
|
2000
|
+
& [data-gutter-buffer], & [data-column-number] {
|
|
2001
|
+
border-right: var(--diffs-gap-style, 2px solid var(--diffs-bg));
|
|
2002
|
+
}
|
|
2003
|
+
}
|
|
2004
|
+
|
|
2005
|
+
[data-content] {
|
|
2006
|
+
grid-template-rows: subgrid;
|
|
2007
|
+
grid-template-columns: subgrid;
|
|
2008
|
+
background-color: var(--diffs-bg);
|
|
2009
|
+
grid-column: 2;
|
|
2010
|
+
min-width: 0;
|
|
2011
|
+
display: grid;
|
|
2012
|
+
}
|
|
2013
|
+
|
|
2014
|
+
[data-diff-type="split"][data-overflow="wrap"] {
|
|
2015
|
+
grid-auto-flow: dense;
|
|
2016
|
+
grid-template-columns: repeat(2, var(--diffs-code-grid));
|
|
2017
|
+
padding-block: var(--diffs-gap-block, var(--diffs-gap-fallback));
|
|
2018
|
+
display: grid;
|
|
2019
|
+
|
|
2020
|
+
& [data-deletions] {
|
|
2021
|
+
display: contents;
|
|
2022
|
+
|
|
2023
|
+
& [data-gutter] {
|
|
2024
|
+
grid-column: 1;
|
|
2025
|
+
}
|
|
2026
|
+
|
|
2027
|
+
& [data-content] {
|
|
2028
|
+
border-right: 1px solid var(--diffs-bg);
|
|
2029
|
+
grid-column: 2;
|
|
2030
|
+
}
|
|
2031
|
+
}
|
|
2032
|
+
|
|
2033
|
+
& [data-additions] {
|
|
2034
|
+
display: contents;
|
|
2035
|
+
|
|
2036
|
+
& [data-gutter] {
|
|
2037
|
+
border-left: 1px solid var(--diffs-bg);
|
|
2038
|
+
grid-column: 3;
|
|
2039
|
+
}
|
|
2040
|
+
|
|
2041
|
+
& [data-content] {
|
|
2042
|
+
grid-column: 4;
|
|
2043
|
+
}
|
|
2044
|
+
}
|
|
2045
|
+
}
|
|
2046
|
+
|
|
2047
|
+
[data-overflow="scroll"] [data-gutter] {
|
|
2048
|
+
position: sticky;
|
|
2049
|
+
left: 0;
|
|
2050
|
+
}
|
|
2051
|
+
|
|
2052
|
+
[data-interactive-lines] [data-line] {
|
|
2053
|
+
cursor: pointer;
|
|
2054
|
+
}
|
|
2055
|
+
|
|
2056
|
+
[data-interactive-line-numbers] [data-column-number] {
|
|
2057
|
+
cursor: pointer;
|
|
2058
|
+
touch-action: none;
|
|
2059
|
+
}
|
|
2060
|
+
|
|
2061
|
+
[data-content-buffer], [data-gutter-buffer] {
|
|
2062
|
+
user-select: none;
|
|
2063
|
+
min-height: 1lh;
|
|
2064
|
+
position: relative;
|
|
2065
|
+
}
|
|
2066
|
+
|
|
2067
|
+
[data-gutter-buffer] {
|
|
2068
|
+
padding-left: 2ch;
|
|
2069
|
+
padding-right: 1ch;
|
|
2070
|
+
|
|
2071
|
+
&:before {
|
|
2072
|
+
content: "";
|
|
2073
|
+
min-width: var(--diffs-min-number-column-width, var(--diffs-min-number-column-width-default, 3ch));
|
|
2074
|
+
display: block;
|
|
2075
|
+
}
|
|
2076
|
+
}
|
|
2077
|
+
|
|
2078
|
+
[data-gutter-buffer="annotation"] {
|
|
2079
|
+
--diffs-annotation-bg: var(--diffs-bg-context-gutter);
|
|
2080
|
+
min-height: 0;
|
|
2081
|
+
}
|
|
2082
|
+
|
|
2083
|
+
[data-gutter-buffer="buffer"] {
|
|
2084
|
+
--diffs-line-bg: var(--diffs-bg-context-gutter);
|
|
2085
|
+
}
|
|
2086
|
+
|
|
2087
|
+
[data-content-buffer] {
|
|
2088
|
+
background-position: 5px 0;
|
|
2089
|
+
background-size: 8px 8px;
|
|
2090
|
+
background-origin: border-box;
|
|
2091
|
+
background-image: repeating-linear-gradient(-45deg,
|
|
2092
|
+
transparent,
|
|
2093
|
+
transparent calc(3px * 1.414),
|
|
2094
|
+
var(--diffs-bg-buffer) calc(3px * 1.414),
|
|
2095
|
+
var(--diffs-bg-buffer) calc(4px * 1.414));
|
|
2096
|
+
grid-column: 1;
|
|
2097
|
+
}
|
|
2098
|
+
|
|
2099
|
+
[data-separator] {
|
|
2100
|
+
box-sizing: content-box;
|
|
2101
|
+
background-color: var(--diffs-bg);
|
|
2102
|
+
}
|
|
2103
|
+
|
|
2104
|
+
[data-separator="simple"] {
|
|
2105
|
+
min-height: 4px;
|
|
2106
|
+
}
|
|
2107
|
+
|
|
2108
|
+
[data-separator="line-info"], [data-separator="line-info-basic"], [data-separator="metadata"], [data-separator="simple"] {
|
|
2109
|
+
background-color: var(--diffs-bg-separator);
|
|
2110
|
+
}
|
|
2111
|
+
|
|
2112
|
+
[data-separator="line-info"], [data-separator="line-info-basic"], [data-separator="metadata"] {
|
|
2113
|
+
height: 32px;
|
|
2114
|
+
position: relative;
|
|
2115
|
+
}
|
|
2116
|
+
|
|
2117
|
+
[data-separator-wrapper] {
|
|
2118
|
+
user-select: none;
|
|
2119
|
+
fill: currentColor;
|
|
2120
|
+
background-color: var(--diffs-bg);
|
|
2121
|
+
align-items: center;
|
|
2122
|
+
height: 100%;
|
|
2123
|
+
display: flex;
|
|
2124
|
+
position: absolute;
|
|
2125
|
+
inset-inline: 0;
|
|
2126
|
+
}
|
|
2127
|
+
|
|
2128
|
+
[data-content] [data-separator-wrapper] {
|
|
2129
|
+
display: none;
|
|
2130
|
+
}
|
|
2131
|
+
|
|
2132
|
+
[data-separator="metadata"] [data-separator-wrapper] {
|
|
2133
|
+
background-color: var(--diffs-bg-separator);
|
|
2134
|
+
height: 100%;
|
|
2135
|
+
color: var(--diffs-fg-number);
|
|
2136
|
+
white-space: nowrap;
|
|
2137
|
+
text-overflow: ellipsis;
|
|
2138
|
+
min-width: min-content;
|
|
2139
|
+
padding-inline: 1ch;
|
|
2140
|
+
inset-inline: 100% auto;
|
|
2141
|
+
overflow: hidden;
|
|
2142
|
+
}
|
|
2143
|
+
|
|
2144
|
+
[data-separator="line-info"] {
|
|
2145
|
+
margin-block: var(--diffs-gap-block, var(--diffs-gap-fallback));
|
|
2146
|
+
|
|
2147
|
+
& [data-separator-wrapper] {
|
|
2148
|
+
min-width: 16px;
|
|
2149
|
+
}
|
|
2150
|
+
}
|
|
2151
|
+
|
|
2152
|
+
[data-separator="line-info-basic"], [data-separator="metadata"] {
|
|
2153
|
+
margin-block: 0;
|
|
2154
|
+
}
|
|
2155
|
+
|
|
2156
|
+
[data-separator="line-info"][data-separator-first] {
|
|
2157
|
+
margin-top: 0;
|
|
2158
|
+
}
|
|
2159
|
+
|
|
2160
|
+
[data-separator="line-info"][data-separator-last] {
|
|
2161
|
+
margin-bottom: 0;
|
|
2162
|
+
}
|
|
2163
|
+
|
|
2164
|
+
[data-expand-index] [data-separator-wrapper] {
|
|
2165
|
+
grid-template-columns: 32px auto;
|
|
2166
|
+
display: grid;
|
|
2167
|
+
}
|
|
2168
|
+
|
|
2169
|
+
[data-expand-index] [data-separator-wrapper][data-separator-multi-button] {
|
|
2170
|
+
grid-template-columns: 32px 32px auto;
|
|
2171
|
+
}
|
|
2172
|
+
|
|
2173
|
+
[data-expand-button], [data-separator-content] {
|
|
2174
|
+
background-color: var(--diffs-bg-separator);
|
|
2175
|
+
flex: none;
|
|
2176
|
+
align-items: center;
|
|
2177
|
+
display: flex;
|
|
2178
|
+
}
|
|
2179
|
+
|
|
2180
|
+
[data-expand-index] [data-separator-content]:hover {
|
|
2181
|
+
cursor: pointer;
|
|
2182
|
+
text-decoration: underline;
|
|
2183
|
+
}
|
|
2184
|
+
|
|
2185
|
+
[data-expand-button] {
|
|
2186
|
+
cursor: pointer;
|
|
2187
|
+
min-width: 32px;
|
|
2188
|
+
color: var(--diffs-fg-number);
|
|
2189
|
+
border-right: 2px solid var(--diffs-bg);
|
|
2190
|
+
flex-shrink: 0;
|
|
2191
|
+
justify-content: center;
|
|
2192
|
+
align-self: stretch;
|
|
2193
|
+
|
|
2194
|
+
&:hover {
|
|
2195
|
+
color: var(--diffs-fg);
|
|
2196
|
+
}
|
|
2197
|
+
|
|
2198
|
+
&[data-expand-all-button] {
|
|
2199
|
+
display: none;
|
|
2200
|
+
}
|
|
2201
|
+
}
|
|
2202
|
+
|
|
2203
|
+
[data-expand-down] [data-icon] {
|
|
2204
|
+
transform: scaleY(-1);
|
|
2205
|
+
}
|
|
2206
|
+
|
|
2207
|
+
[data-separator-content] {
|
|
2208
|
+
height: 100%;
|
|
2209
|
+
color: var(--diffs-fg-number);
|
|
2210
|
+
flex: auto;
|
|
2211
|
+
justify-content: flex-start;
|
|
2212
|
+
padding: 0 1ch;
|
|
2213
|
+
overflow: hidden;
|
|
2214
|
+
}
|
|
2215
|
+
|
|
2216
|
+
[data-separator="line-info"], [data-separator="line-info-basic"] {
|
|
2217
|
+
& [data-separator-content] {
|
|
2218
|
+
user-select: none;
|
|
2219
|
+
height: 100%;
|
|
2220
|
+
overflow: clip;
|
|
2221
|
+
}
|
|
2222
|
+
}
|
|
2223
|
+
|
|
2224
|
+
[data-unmodified-lines] {
|
|
2225
|
+
text-overflow: ellipsis;
|
|
2226
|
+
white-space: nowrap;
|
|
2227
|
+
flex: 0 auto;
|
|
2228
|
+
min-width: 0;
|
|
2229
|
+
display: block;
|
|
2230
|
+
overflow: hidden;
|
|
2231
|
+
}
|
|
2232
|
+
|
|
2233
|
+
@supports (width: 1cqi) {
|
|
2234
|
+
[data-unified] {
|
|
2235
|
+
& [data-separator="line-info"] [data-separator-wrapper] {
|
|
2236
|
+
padding-inline: var(--diffs-gap-inline, var(--diffs-gap-fallback));
|
|
2237
|
+
width: 100cqi;
|
|
2238
|
+
|
|
2239
|
+
& [data-separator-content] {
|
|
2240
|
+
border-radius: 6px;
|
|
2241
|
+
}
|
|
2242
|
+
}
|
|
2243
|
+
|
|
2244
|
+
& [data-separator="line-info"][data-expand-index] [data-separator-wrapper] [data-separator-content] {
|
|
2245
|
+
border-top-left-radius: unset;
|
|
2246
|
+
border-bottom-left-radius: unset;
|
|
2247
|
+
}
|
|
2248
|
+
}
|
|
2249
|
+
|
|
2250
|
+
[data-gutter] {
|
|
2251
|
+
& [data-separator="line-info"] [data-separator-wrapper] {
|
|
2252
|
+
padding-left: var(--diffs-gap-inline, var(--diffs-gap-fallback));
|
|
2253
|
+
}
|
|
2254
|
+
|
|
2255
|
+
& [data-separator="line-info"] [data-separator-content] {
|
|
2256
|
+
border-top-left-radius: 6px;
|
|
2257
|
+
border-bottom-left-radius: 6px;
|
|
2258
|
+
}
|
|
2259
|
+
|
|
2260
|
+
& [data-separator="line-info"][data-expand-index] [data-separator-content] {
|
|
2261
|
+
border-top-left-radius: unset;
|
|
2262
|
+
border-bottom-left-radius: unset;
|
|
2263
|
+
}
|
|
2264
|
+
}
|
|
2265
|
+
|
|
2266
|
+
[data-additions] {
|
|
2267
|
+
& [data-content] [data-separator="line-info"] {
|
|
2268
|
+
background-color: var(--diffs-bg);
|
|
2269
|
+
|
|
2270
|
+
& [data-separator-wrapper] {
|
|
2271
|
+
display: none;
|
|
2272
|
+
}
|
|
2273
|
+
}
|
|
2274
|
+
|
|
2275
|
+
& [data-gutter] [data-separator="line-info"] [data-separator-wrapper] {
|
|
2276
|
+
background-color: var(--diffs-bg-separator);
|
|
2277
|
+
border-top-right-radius: 6px;
|
|
2278
|
+
border-bottom-right-radius: 6px;
|
|
2279
|
+
height: 100%;
|
|
2280
|
+
display: block;
|
|
2281
|
+
|
|
2282
|
+
& [data-separator-content], & [data-expand-button] {
|
|
2283
|
+
display: none;
|
|
2284
|
+
}
|
|
2285
|
+
}
|
|
2286
|
+
}
|
|
2287
|
+
|
|
2288
|
+
[data-overflow="scroll"] [data-additions] [data-gutter] [data-separator="line-info"] [data-separator-wrapper] {
|
|
2289
|
+
width: calc(100cqi - var(--diffs-gap-inline, var(--diffs-gap-fallback)));
|
|
2290
|
+
}
|
|
2291
|
+
|
|
2292
|
+
[data-overflow="wrap"] [data-additions] [data-content] [data-separator="line-info"] [data-separator-wrapper] {
|
|
2293
|
+
background-color: var(--diffs-bg-separator);
|
|
2294
|
+
height: 100%;
|
|
2295
|
+
margin-right: var(--diffs-gap-inline, var(--diffs-gap-fallback));
|
|
2296
|
+
border-top-right-radius: 6px;
|
|
2297
|
+
border-bottom-right-radius: 6px;
|
|
2298
|
+
display: block;
|
|
2299
|
+
|
|
2300
|
+
& [data-separator-content], & [data-expand-button] {
|
|
2301
|
+
display: none;
|
|
2302
|
+
}
|
|
2303
|
+
}
|
|
2304
|
+
|
|
2305
|
+
[data-separator="line-info"] [data-separator-wrapper] {
|
|
2306
|
+
& [data-expand-both], & [data-expand-down], & [data-expand-up] {
|
|
2307
|
+
border-top-left-radius: 6px;
|
|
2308
|
+
border-bottom-left-radius: 6px;
|
|
2309
|
+
}
|
|
2310
|
+
}
|
|
2311
|
+
|
|
2312
|
+
@media (pointer: fine) {
|
|
2313
|
+
[data-separator="line-info"] [data-separator-wrapper] {
|
|
2314
|
+
&[data-separator-multi-button] {
|
|
2315
|
+
& [data-expand-up] {
|
|
2316
|
+
border-top-left-radius: 6px;
|
|
2317
|
+
border-bottom-left-radius: unset;
|
|
2318
|
+
}
|
|
2319
|
+
|
|
2320
|
+
& [data-expand-down] {
|
|
2321
|
+
border-bottom-left-radius: 6px;
|
|
2322
|
+
border-top-left-radius: unset;
|
|
2323
|
+
}
|
|
2324
|
+
}
|
|
2325
|
+
}
|
|
2326
|
+
}
|
|
2327
|
+
}
|
|
2328
|
+
|
|
2329
|
+
@media (pointer: coarse) {
|
|
2330
|
+
[data-separator="line-info-basic"] [data-separator-wrapper][data-separator-multi-button] {
|
|
2331
|
+
grid-template-columns: 34px 34px auto;
|
|
2332
|
+
|
|
2333
|
+
& [data-separator-content] {
|
|
2334
|
+
grid-column: unset;
|
|
2335
|
+
grid-row: unset;
|
|
2336
|
+
}
|
|
2337
|
+
}
|
|
2338
|
+
|
|
2339
|
+
@supports (width: 1cqi) {
|
|
2340
|
+
[data-separator="line-info"] [data-separator-wrapper] {
|
|
2341
|
+
& [data-expand-both], & [data-expand-down], & [data-expand-up] {
|
|
2342
|
+
border-top-left-radius: 6px;
|
|
2343
|
+
border-bottom-left-radius: 6px;
|
|
2344
|
+
}
|
|
2345
|
+
|
|
2346
|
+
&[data-separator-multi-button] {
|
|
2347
|
+
& [data-expand-up] {
|
|
2348
|
+
border-top-left-radius: 6px;
|
|
2349
|
+
border-bottom-left-radius: 6px;
|
|
2350
|
+
}
|
|
2351
|
+
|
|
2352
|
+
& [data-expand-down] {
|
|
2353
|
+
border-bottom-left-radius: unset;
|
|
2354
|
+
border-top-left-radius: unset;
|
|
2355
|
+
}
|
|
2356
|
+
}
|
|
2357
|
+
}
|
|
2358
|
+
}
|
|
2359
|
+
}
|
|
2360
|
+
|
|
2361
|
+
@media (pointer: fine) {
|
|
2362
|
+
[data-separator-wrapper][data-separator-multi-button] {
|
|
2363
|
+
grid-template-rows: 50% 50%;
|
|
2364
|
+
display: grid;
|
|
2365
|
+
|
|
2366
|
+
& [data-separator-content] {
|
|
2367
|
+
grid-area: 1 / 2 / -1;
|
|
2368
|
+
min-width: min-content;
|
|
2369
|
+
}
|
|
2370
|
+
|
|
2371
|
+
& [data-expand-button] {
|
|
2372
|
+
grid-column: 1;
|
|
2373
|
+
}
|
|
2374
|
+
}
|
|
2375
|
+
|
|
2376
|
+
[data-separator="line-info"] [data-separator-wrapper], [data-separator="line-info"] [data-separator-wrapper][data-separator-multi-button] {
|
|
2377
|
+
grid-template-columns: 34px auto;
|
|
2378
|
+
}
|
|
2379
|
+
|
|
2380
|
+
[data-separator="line-info-basic"][data-expand-index] [data-separator-wrapper] {
|
|
2381
|
+
grid-template-columns: 100% auto;
|
|
2382
|
+
}
|
|
2383
|
+
|
|
2384
|
+
[data-separator="line-info"], [data-separator="line-info-basic"] {
|
|
2385
|
+
& [data-separator-multi-button] {
|
|
2386
|
+
& [data-expand-up] {
|
|
2387
|
+
border-bottom: 1px solid var(--diffs-bg);
|
|
2388
|
+
border-right: 2px solid var(--diffs-bg);
|
|
2389
|
+
}
|
|
2390
|
+
|
|
2391
|
+
& [data-expand-down] {
|
|
2392
|
+
border-top: 1px solid var(--diffs-bg);
|
|
2393
|
+
border-right: 2px solid var(--diffs-bg);
|
|
2394
|
+
}
|
|
2395
|
+
}
|
|
2396
|
+
}
|
|
2397
|
+
}
|
|
2398
|
+
|
|
2399
|
+
[data-additions] [data-gutter] [data-separator-wrapper], [data-additions] [data-separator="line-info-basic"] [data-separator-wrapper], [data-content] [data-separator-wrapper] {
|
|
2400
|
+
display: none;
|
|
2401
|
+
}
|
|
2402
|
+
|
|
2403
|
+
[data-line-annotation] {
|
|
2404
|
+
min-height: var(--diffs-annotation-min-height, 0);
|
|
2405
|
+
z-index: 2;
|
|
2406
|
+
}
|
|
2407
|
+
|
|
2408
|
+
[data-merge-conflict-actions] {
|
|
2409
|
+
z-index: 2;
|
|
2410
|
+
}
|
|
2411
|
+
|
|
2412
|
+
[data-separator="custom"] {
|
|
2413
|
+
grid-template-columns: subgrid;
|
|
2414
|
+
display: grid;
|
|
2415
|
+
}
|
|
2416
|
+
|
|
2417
|
+
[data-line], [data-column-number], [data-no-newline] {
|
|
2418
|
+
padding-inline: 1ch;
|
|
2419
|
+
position: relative;
|
|
2420
|
+
}
|
|
2421
|
+
|
|
2422
|
+
[data-indicators="classic"] [data-line] {
|
|
2423
|
+
padding-inline-start: 2ch;
|
|
2424
|
+
}
|
|
2425
|
+
|
|
2426
|
+
[data-indicators="classic"] {
|
|
2427
|
+
& [data-line-type="change-addition"], & [data-line-type="change-deletion"] {
|
|
2428
|
+
&[data-no-newline], &[data-line] {
|
|
2429
|
+
&:before {
|
|
2430
|
+
user-select: none;
|
|
2431
|
+
width: 1ch;
|
|
2432
|
+
height: 1lh;
|
|
2433
|
+
display: inline-block;
|
|
2434
|
+
position: absolute;
|
|
2435
|
+
top: 0;
|
|
2436
|
+
left: 0;
|
|
2437
|
+
}
|
|
2438
|
+
}
|
|
2439
|
+
}
|
|
2440
|
+
|
|
2441
|
+
& [data-line-type="change-addition"] {
|
|
2442
|
+
&[data-line], &[data-no-newline] {
|
|
2443
|
+
&:before {
|
|
2444
|
+
content: "+";
|
|
2445
|
+
color: var(--diffs-addition-base);
|
|
2446
|
+
}
|
|
2447
|
+
}
|
|
2448
|
+
}
|
|
2449
|
+
|
|
2450
|
+
& [data-line-type="change-deletion"] {
|
|
2451
|
+
&[data-line], &[data-no-newline] {
|
|
2452
|
+
&:before {
|
|
2453
|
+
content: "-";
|
|
2454
|
+
color: var(--diffs-deletion-base);
|
|
2455
|
+
}
|
|
2456
|
+
}
|
|
2457
|
+
}
|
|
2458
|
+
}
|
|
2459
|
+
|
|
2460
|
+
[data-indicators="bars"] {
|
|
2461
|
+
& [data-line-type="change-deletion"], & [data-line-type="change-addition"] {
|
|
2462
|
+
&[data-column-number] {
|
|
2463
|
+
&:before {
|
|
2464
|
+
content: "";
|
|
2465
|
+
user-select: none;
|
|
2466
|
+
contain: strict;
|
|
2467
|
+
width: 4px;
|
|
2468
|
+
height: 100%;
|
|
2469
|
+
display: block;
|
|
2470
|
+
position: absolute;
|
|
2471
|
+
top: 0;
|
|
2472
|
+
left: 0;
|
|
2473
|
+
}
|
|
2474
|
+
}
|
|
2475
|
+
}
|
|
2476
|
+
|
|
2477
|
+
& [data-line-type="change-deletion"] {
|
|
2478
|
+
&[data-column-number] {
|
|
2479
|
+
&:before {
|
|
2480
|
+
background-image: linear-gradient(0deg,
|
|
2481
|
+
var(--diffs-bg-deletion) 50%,
|
|
2482
|
+
var(--diffs-deletion-base) 50%);
|
|
2483
|
+
background-repeat: repeat;
|
|
2484
|
+
background-size: 2px 2px;
|
|
2485
|
+
background-size: calc(1lh / round(1lh / 2px))
|
|
2486
|
+
calc(1lh / round(1lh / 2px));
|
|
2487
|
+
}
|
|
2488
|
+
}
|
|
2489
|
+
}
|
|
2490
|
+
|
|
2491
|
+
& [data-line-type="change-addition"] {
|
|
2492
|
+
&[data-column-number] {
|
|
2493
|
+
&:before {
|
|
2494
|
+
background-color: var(--diffs-addition-base);
|
|
2495
|
+
}
|
|
2496
|
+
}
|
|
2497
|
+
}
|
|
2498
|
+
}
|
|
2499
|
+
|
|
2500
|
+
[data-overflow="wrap"] {
|
|
2501
|
+
& [data-line], & [data-annotation-content] {
|
|
2502
|
+
white-space: pre-wrap;
|
|
2503
|
+
word-break: break-word;
|
|
2504
|
+
}
|
|
2505
|
+
}
|
|
2506
|
+
|
|
2507
|
+
[data-overflow="scroll"] [data-line] {
|
|
2508
|
+
white-space: pre;
|
|
2509
|
+
min-height: 1lh;
|
|
2510
|
+
}
|
|
2511
|
+
|
|
2512
|
+
[data-column-number] {
|
|
2513
|
+
box-sizing: content-box;
|
|
2514
|
+
text-align: right;
|
|
2515
|
+
user-select: none;
|
|
2516
|
+
color: var(--diffs-fg-number);
|
|
2517
|
+
padding-left: 2ch;
|
|
2518
|
+
}
|
|
2519
|
+
|
|
2520
|
+
[data-line-number-content] {
|
|
2521
|
+
min-width: var(--diffs-min-number-column-width, var(--diffs-min-number-column-width-default, 3ch));
|
|
2522
|
+
z-index: 1;
|
|
2523
|
+
display: inline-block;
|
|
2524
|
+
position: relative;
|
|
2525
|
+
}
|
|
2526
|
+
|
|
2527
|
+
[data-disable-line-numbers] {
|
|
2528
|
+
& [data-gutter-buffer], & [data-column-number] {
|
|
2529
|
+
min-width: 4px;
|
|
2530
|
+
padding: 0;
|
|
2531
|
+
|
|
2532
|
+
&:before {
|
|
2533
|
+
min-width: 0;
|
|
2534
|
+
}
|
|
2535
|
+
}
|
|
2536
|
+
|
|
2537
|
+
& [data-line-number-content] {
|
|
2538
|
+
display: none;
|
|
2539
|
+
}
|
|
2540
|
+
|
|
2541
|
+
& [data-gutter-utility-slot] {
|
|
2542
|
+
right: unset;
|
|
2543
|
+
justify-content: flex-start;
|
|
2544
|
+
left: 0;
|
|
2545
|
+
}
|
|
2546
|
+
|
|
2547
|
+
&[data-indicators="bars"] [data-gutter-utility-slot] {
|
|
2548
|
+
left: 6px;
|
|
2549
|
+
}
|
|
2550
|
+
}
|
|
2551
|
+
|
|
2552
|
+
[data-file][data-disable-line-numbers] {
|
|
2553
|
+
& [data-gutter-buffer], & [data-column-number] {
|
|
2554
|
+
border-right: 0;
|
|
2555
|
+
min-width: 0;
|
|
2556
|
+
}
|
|
2557
|
+
}
|
|
2558
|
+
|
|
2559
|
+
[data-diff-span] {
|
|
2560
|
+
box-decoration-break: clone;
|
|
2561
|
+
border-radius: 3px;
|
|
2562
|
+
}
|
|
2563
|
+
|
|
2564
|
+
[data-line-type="change-addition"] [data-diff-span] {
|
|
2565
|
+
background-color: var(--diffs-bg-addition-emphasis);
|
|
2566
|
+
}
|
|
2567
|
+
|
|
2568
|
+
[data-line-type="change-deletion"] [data-diff-span] {
|
|
2569
|
+
background-color: var(--diffs-bg-deletion-emphasis);
|
|
2570
|
+
}
|
|
2571
|
+
|
|
2572
|
+
[data-merge-conflict="marker-start"], [data-merge-conflict="marker-base"], [data-merge-conflict="marker-separator"], [data-merge-conflict="marker-end"] {
|
|
2573
|
+
color: var(--diffs-fg);
|
|
2574
|
+
padding-left: 1ch;
|
|
2575
|
+
}
|
|
2576
|
+
|
|
2577
|
+
[data-merge-conflict="marker-start"], [data-merge-conflict="marker-end"] {
|
|
2578
|
+
align-items: center;
|
|
2579
|
+
display: flex;
|
|
2580
|
+
|
|
2581
|
+
&:after {
|
|
2582
|
+
color: var(--diffs-fg-conflict-marker);
|
|
2583
|
+
font-size: .75rem;
|
|
2584
|
+
font-style: normal;
|
|
2585
|
+
line-height: 1.25rem;
|
|
2586
|
+
font-family: var(--diffs-header-font-family, var(--diffs-header-font-fallback));
|
|
2587
|
+
padding-left: 1ch;
|
|
2588
|
+
}
|
|
2589
|
+
}
|
|
2590
|
+
|
|
2591
|
+
[data-merge-conflict="marker-start"]:after {
|
|
2592
|
+
content: "(Current Change)";
|
|
2593
|
+
}
|
|
2594
|
+
|
|
2595
|
+
[data-merge-conflict="marker-end"]:after {
|
|
2596
|
+
content: "(Incoming Change)";
|
|
2597
|
+
}
|
|
2598
|
+
|
|
2599
|
+
[data-merge-conflict-actions-content] {
|
|
2600
|
+
min-height: 1.75rem;
|
|
2601
|
+
font-family: var(--diffs-header-font-family, var(--diffs-header-font-fallback));
|
|
2602
|
+
color: var(--diffs-fg);
|
|
2603
|
+
align-items: center;
|
|
2604
|
+
gap: .25rem;
|
|
2605
|
+
padding-inline: .5rem;
|
|
2606
|
+
font-size: .75rem;
|
|
2607
|
+
line-height: 1.2;
|
|
2608
|
+
display: flex;
|
|
2609
|
+
}
|
|
2610
|
+
|
|
2611
|
+
[data-merge-conflict-action] {
|
|
2612
|
+
appearance: none;
|
|
2613
|
+
color: var(--diffs-fg-number);
|
|
2614
|
+
font: inherit;
|
|
2615
|
+
cursor: pointer;
|
|
2616
|
+
background: none;
|
|
2617
|
+
border: 0;
|
|
2618
|
+
padding: 0;
|
|
2619
|
+
font-style: normal;
|
|
2620
|
+
}
|
|
2621
|
+
|
|
2622
|
+
[data-merge-conflict-action]:hover {
|
|
2623
|
+
color: var(--diffs-fg);
|
|
2624
|
+
}
|
|
2625
|
+
|
|
2626
|
+
[data-merge-conflict-action="current"]:hover {
|
|
2627
|
+
color: var(--diffs-addition-base);
|
|
2628
|
+
}
|
|
2629
|
+
|
|
2630
|
+
[data-merge-conflict-action="incoming"]:hover {
|
|
2631
|
+
color: var(--diffs-modified-base);
|
|
2632
|
+
}
|
|
2633
|
+
|
|
2634
|
+
[data-merge-conflict-action-separator] {
|
|
2635
|
+
color: var(--diffs-fg-number);
|
|
2636
|
+
opacity: .6;
|
|
2637
|
+
user-select: none;
|
|
2638
|
+
}
|
|
2639
|
+
|
|
2640
|
+
[data-diffs-header="default"] {
|
|
2641
|
+
background-color: var(--diffs-bg);
|
|
2642
|
+
justify-content: space-between;
|
|
2643
|
+
align-items: center;
|
|
2644
|
+
gap: var(--diffs-gap-inline, var(--diffs-gap-fallback));
|
|
2645
|
+
min-height: calc(1lh + (var(--diffs-gap-block, var(--diffs-gap-fallback)) * 3));
|
|
2646
|
+
z-index: 2;
|
|
2647
|
+
flex-direction: row;
|
|
2648
|
+
padding-inline: 16px;
|
|
2649
|
+
display: flex;
|
|
2650
|
+
position: relative;
|
|
2651
|
+
top: 0;
|
|
2652
|
+
}
|
|
2653
|
+
|
|
2654
|
+
[data-header-content] {
|
|
2655
|
+
align-items: center;
|
|
2656
|
+
gap: var(--diffs-gap-inline, var(--diffs-gap-fallback));
|
|
2657
|
+
white-space: nowrap;
|
|
2658
|
+
flex-direction: row;
|
|
2659
|
+
min-width: 0;
|
|
2660
|
+
display: flex;
|
|
2661
|
+
}
|
|
2662
|
+
|
|
2663
|
+
[data-header-content] [data-prev-name], [data-header-content] [data-title] {
|
|
2664
|
+
text-overflow: ellipsis;
|
|
2665
|
+
white-space: nowrap;
|
|
2666
|
+
direction: rtl;
|
|
2667
|
+
min-width: 0;
|
|
2668
|
+
overflow: hidden;
|
|
2669
|
+
}
|
|
2670
|
+
|
|
2671
|
+
[data-prev-name] {
|
|
2672
|
+
opacity: .7;
|
|
2673
|
+
}
|
|
2674
|
+
|
|
2675
|
+
[data-rename-icon] {
|
|
2676
|
+
fill: currentColor;
|
|
2677
|
+
flex-grow: 0;
|
|
2678
|
+
flex-shrink: 0;
|
|
2679
|
+
}
|
|
2680
|
+
|
|
2681
|
+
[data-diffs-header="default"] [data-metadata] {
|
|
2682
|
+
white-space: nowrap;
|
|
2683
|
+
align-items: center;
|
|
2684
|
+
gap: 1ch;
|
|
2685
|
+
display: flex;
|
|
2686
|
+
}
|
|
2687
|
+
|
|
2688
|
+
[data-diffs-header="default"] [data-additions-count] {
|
|
2689
|
+
font-family: var(--diffs-font-family, var(--diffs-font-fallback));
|
|
2690
|
+
color: var(--diffs-addition-base);
|
|
2691
|
+
}
|
|
2692
|
+
|
|
2693
|
+
[data-diffs-header="default"] [data-deletions-count] {
|
|
2694
|
+
font-family: var(--diffs-font-family, var(--diffs-font-fallback));
|
|
2695
|
+
color: var(--diffs-deletion-base);
|
|
2696
|
+
}
|
|
2697
|
+
|
|
2698
|
+
[data-change-icon] {
|
|
2699
|
+
fill: currentColor;
|
|
2700
|
+
flex-shrink: 0;
|
|
2701
|
+
}
|
|
2702
|
+
|
|
2703
|
+
[data-change-icon="change"], [data-change-icon="rename-pure"], [data-change-icon="rename-changed"] {
|
|
2704
|
+
color: var(--diffs-modified-base);
|
|
2705
|
+
}
|
|
2706
|
+
|
|
2707
|
+
[data-change-icon="new"] {
|
|
2708
|
+
color: var(--diffs-addition-base);
|
|
2709
|
+
}
|
|
2710
|
+
|
|
2711
|
+
[data-change-icon="deleted"] {
|
|
2712
|
+
color: var(--diffs-deletion-base);
|
|
2713
|
+
}
|
|
2714
|
+
|
|
2715
|
+
[data-change-icon="file"] {
|
|
2716
|
+
opacity: .6;
|
|
2717
|
+
}
|
|
2718
|
+
|
|
2719
|
+
[data-annotation-content] {
|
|
2720
|
+
z-index: 2;
|
|
2721
|
+
isolation: isolate;
|
|
2722
|
+
align-self: flex-start;
|
|
2723
|
+
min-width: 0;
|
|
2724
|
+
display: flow-root;
|
|
2725
|
+
position: relative;
|
|
2726
|
+
}
|
|
2727
|
+
|
|
2728
|
+
[data-overflow="scroll"] [data-annotation-content], [data-overflow="scroll"] [data-merge-conflict-actions-content] {
|
|
2729
|
+
width: var(--diffs-column-content-width, auto);
|
|
2730
|
+
left: var(--diffs-column-number-width, 0);
|
|
2731
|
+
position: sticky;
|
|
2732
|
+
}
|
|
2733
|
+
|
|
2734
|
+
[data-annotation-slot] {
|
|
2735
|
+
text-wrap-mode: wrap;
|
|
2736
|
+
word-break: normal;
|
|
2737
|
+
white-space-collapse: collapse;
|
|
2738
|
+
}
|
|
2739
|
+
|
|
2740
|
+
[data-gutter-utility-slot] {
|
|
2741
|
+
touch-action: none;
|
|
2742
|
+
justify-content: flex-end;
|
|
2743
|
+
display: flex;
|
|
2744
|
+
position: absolute;
|
|
2745
|
+
top: 0;
|
|
2746
|
+
bottom: 0;
|
|
2747
|
+
right: 0;
|
|
2748
|
+
}
|
|
2749
|
+
|
|
2750
|
+
[data-utility-button] {
|
|
2751
|
+
appearance: none;
|
|
2752
|
+
cursor: pointer;
|
|
2753
|
+
width: 1lh;
|
|
2754
|
+
height: 1lh;
|
|
2755
|
+
font-size: var(--diffs-font-size, 13px);
|
|
2756
|
+
line-height: var(--diffs-line-height, 20px);
|
|
2757
|
+
background-color: var(--diffs-modified-base);
|
|
2758
|
+
color: var(--diffs-bg);
|
|
2759
|
+
fill: currentColor;
|
|
2760
|
+
z-index: 4;
|
|
2761
|
+
touch-action: none;
|
|
2762
|
+
border: none;
|
|
2763
|
+
border-radius: 4px;
|
|
2764
|
+
justify-content: center;
|
|
2765
|
+
align-items: center;
|
|
2766
|
+
margin-right: calc(-1lh + 1ch);
|
|
2767
|
+
padding: 0;
|
|
2768
|
+
display: flex;
|
|
2769
|
+
position: relative;
|
|
2770
|
+
|
|
2771
|
+
&:before {
|
|
2772
|
+
content: "";
|
|
2773
|
+
display: block;
|
|
2774
|
+
position: absolute;
|
|
2775
|
+
inset: 0 0 0 -4px;
|
|
2776
|
+
}
|
|
2777
|
+
}
|
|
2778
|
+
|
|
2779
|
+
[data-decoration-bar-stack] {
|
|
2780
|
+
pointer-events: none;
|
|
2781
|
+
isolation: isolate;
|
|
2782
|
+
z-index: 1;
|
|
2783
|
+
background-color: var(--diffs-decoration-bar-color, transparent);
|
|
2784
|
+
box-sizing: content-box;
|
|
2785
|
+
border-left: 2px solid var(--diffs-bg);
|
|
2786
|
+
border-right: 2px solid var(--diffs-bg);
|
|
2787
|
+
width: 6px;
|
|
2788
|
+
position: absolute;
|
|
2789
|
+
top: 0;
|
|
2790
|
+
bottom: 0;
|
|
2791
|
+
right: -2px;
|
|
2792
|
+
|
|
2793
|
+
[data-decoration-bar-depth="1"] & {
|
|
2794
|
+
background-color: color-mix(in lab,
|
|
2795
|
+
var(--diffs-bg) 20%,
|
|
2796
|
+
var(--diffs-decoration-bar-color, transparent));
|
|
2797
|
+
}
|
|
2798
|
+
|
|
2799
|
+
[data-decoration-bar-depth="2"] & {
|
|
2800
|
+
background-color: color-mix(in lab,
|
|
2801
|
+
var(--diffs-bg) 45%,
|
|
2802
|
+
var(--diffs-decoration-bar-color, transparent));
|
|
2803
|
+
}
|
|
2804
|
+
|
|
2805
|
+
[data-decoration-bar-depth="3"] & {
|
|
2806
|
+
background-color: color-mix(in lab,
|
|
2807
|
+
var(--diffs-bg) 65%,
|
|
2808
|
+
var(--diffs-decoration-bar-color, transparent));
|
|
2809
|
+
}
|
|
2810
|
+
|
|
2811
|
+
[data-decoration-bar-start] & {
|
|
2812
|
+
border-top-left-radius: 5px;
|
|
2813
|
+
border-top-right-radius: 5px;
|
|
2814
|
+
}
|
|
2815
|
+
|
|
2816
|
+
[data-decoration-bar-end] & {
|
|
2817
|
+
z-index: 3;
|
|
2818
|
+
border-bottom-right-radius: 5px;
|
|
2819
|
+
border-bottom-left-radius: 5px;
|
|
2820
|
+
}
|
|
2821
|
+
}
|
|
2822
|
+
|
|
2823
|
+
[data-placeholder] {
|
|
2824
|
+
contain: strict;
|
|
2825
|
+
}
|
|
2826
|
+
|
|
2827
|
+
[data-error-wrapper] {
|
|
2828
|
+
padding: var(--diffs-gap-block, var(--diffs-gap-fallback))
|
|
2829
|
+
var(--diffs-gap-inline, var(--diffs-gap-fallback));
|
|
2830
|
+
scrollbar-width: none;
|
|
2831
|
+
max-height: 400px;
|
|
2832
|
+
overflow: auto;
|
|
2833
|
+
|
|
2834
|
+
& [data-error-message] {
|
|
2835
|
+
color: var(--diffs-deletion-base);
|
|
2836
|
+
font-size: 18px;
|
|
2837
|
+
font-weight: bold;
|
|
2838
|
+
}
|
|
2839
|
+
|
|
2840
|
+
& [data-error-stack] {
|
|
2841
|
+
color: var(--diffs-fg-number);
|
|
2842
|
+
}
|
|
2843
|
+
}
|
|
2844
|
+
}
|
|
2845
|
+
|
|
2846
|
+
@layer theme, rendered, unsafe;
|
|
2847
|
+
`,Uw=`@layer base, theme, rendered, unsafe;`,Ww=RegExp(`${Jw(ku)}\\s*:\\s*[^;]+;`);function Gw(e){return`${Uw}
|
|
2848
|
+
@layer unsafe {
|
|
2849
|
+
${e}
|
|
2850
|
+
}`}function Kw(e,t=`system`,n){return`${Uw}
|
|
2851
|
+
@layer rendered {
|
|
2852
|
+
:host {${t===`system`?``:`
|
|
2853
|
+
color-scheme: ${t};`}
|
|
2854
|
+
${Vw(n)}
|
|
2855
|
+
${e}
|
|
2856
|
+
}
|
|
2857
|
+
}`}function qw(e,t){let n=Vw(t);return e.replace(Ww,n)}function Jw(e){return e.replace(/[.*+?^${}()|[\]\\]/g,`\\$&`)}function Yw({code:e,pre:t,columnType:n,rowSpan:r,containerSize:i=!1}={}){return e??(e=document.createElement(`code`),e.setAttribute(`data-code`,``),n!=null&&e.setAttribute(`data-${n}`,``),t?.appendChild(e)),r==null?e.style.removeProperty(`grid-row`):e.style.setProperty(`grid-row`,`span ${r}`),i?e.setAttribute(`data-container-size`,``):e.removeAttribute(`data-container-size`),e}function Xw({shadowRoot:e,currentNode:t,themeCSS:n}){if(n.trim()===``){t?.remove();return}return t??=Zw(),t.textContent=n,t.parentNode!==e&&e.appendChild(t),t}function Zw(){let e=document.createElement(`style`);return e.setAttribute(Eu,``),e}function Qw(e,t){if(t==null)return;let n=e.shadowRoot??e.attachShadow({mode:`open`});n.innerHTML===``&&(n.innerHTML=t)}function $w(e,{type:t,diffIndicators:n,disableBackground:r,disableLineNumbers:i,overflow:a,split:o,totalLines:s,customProperties:c}){if(c!=null)for(let t in c){let n=c[t];n!=null&&e.setAttribute(t,`${n}`)}switch(t===`diff`?(e.setAttribute(`data-diff`,``),e.removeAttribute(`data-file`)):(e.setAttribute(`data-file`,``),e.removeAttribute(`data-diff`)),n){case`bars`:case`classic`:e.setAttribute(`data-indicators`,n);break;case`none`:e.removeAttribute(`data-indicators`);break}return i?e.setAttribute(`data-disable-line-numbers`,``):e.removeAttribute(`data-disable-line-numbers`),r?e.removeAttribute(`data-background`):e.setAttribute(`data-background`,``),t===`diff`?e.setAttribute(`data-diff-type`,o?`split`:`single`):e.removeAttribute(`data-diff-type`),e.setAttribute(`data-overflow`,a),e.style.setProperty(`--diffs-min-number-column-width-default`,`${`${s}`.length}ch`),e}if(typeof HTMLElement<`u`&&customElements.get(`diffs-container`)==null){let e;class t extends HTMLElement{constructor(){if(super(),this.shadowRoot!=null)return;let t=this.attachShadow({mode:`open`});e??(e=new CSSStyleSheet,e.replaceSync(Hw)),t.adoptedStyleSheets=[e]}connectedCallback(){Bw(this.shadowRoot??this.attachShadow({mode:`open`}))}}customElements.define(mu,t)}function eT(e,t,n,r=!1){let i=yC(IS(e.name,t.name,e.contents,t.contents,e.header,t.header,n),{cacheKey:(()=>{if(e.cacheKey!=null&&t.cacheKey!=null)return`${e.cacheKey}:${t.cacheKey}`})(),oldFile:e,newFile:t,throwOnError:r});if(i==null)throw Error(`parseDiffFrom: FileInvalid diff -- probably need to fix something -- if the files are the same maybe?`);return t.lang!=null&&(i.lang=t.lang),i}var tT=class{isDeletionsScrolling=!1;isAdditionsScrolling=!1;timeoutId=-1;codeDeletions;codeAdditions;enabled=!1;cleanUp(){this.enabled&&=(this.codeDeletions?.removeEventListener(`scroll`,this.handleDeletionsScroll),this.codeAdditions?.removeEventListener(`scroll`,this.handleAdditionsScroll),clearTimeout(this.timeoutId),this.codeDeletions=void 0,this.codeAdditions=void 0,!1)}setup(e,t,n){if(t==null||n==null)for(let r of e.children??[])r instanceof HTMLElement&&(`deletions`in r.dataset?t=r:`additions`in r.dataset&&(n=r));if(n==null||t==null){this.cleanUp();return}this.codeDeletions!==t&&(this.codeDeletions?.removeEventListener(`scroll`,this.handleDeletionsScroll),this.codeDeletions=t,t.addEventListener(`scroll`,this.handleDeletionsScroll,{passive:!0})),this.codeAdditions!==n&&(this.codeAdditions?.removeEventListener(`scroll`,this.handleAdditionsScroll),this.codeAdditions=n,n.addEventListener(`scroll`,this.handleAdditionsScroll,{passive:!0})),this.enabled=!0}handleDeletionsScroll=()=>{this.isAdditionsScrolling||(this.isDeletionsScrolling=!0,clearTimeout(this.timeoutId),this.timeoutId=setTimeout(()=>{this.isDeletionsScrolling=!1},300),this.codeAdditions?.scrollTo({left:this.codeDeletions?.scrollLeft}))};handleAdditionsScroll=()=>{this.isDeletionsScrolling||(this.isAdditionsScrolling=!0,clearTimeout(this.timeoutId),this.timeoutId=setTimeout(()=>{this.isAdditionsScrolling=!1},300),this.codeDeletions?.scrollTo({left:this.codeAdditions?.scrollLeft}))}},nT=`-1,-1`;function rT(e){return e?.some(e=>e.lineNumber===0)??!1}function iT(e){let t=e[0];return t!=null&&t.length>0?t:void 0}function aT(e){return e.startingLine===0&&e.totalLines>0}function oT(e){for(let t of Array.isArray(e)?e:[e])if(!(t===`text`||t===`ansi`)&&!qu.has(t))return!1;return!0}function sT(e){for(let t of zb(e))if(!Iu.has(t))return!1;return!0}function cT(e){return $({tagName:`div`,children:[$({tagName:`div`,children:e.annotations?.map(e=>$({tagName:`slot`,properties:{name:e}})),properties:{"data-annotation-content":``}})],properties:{"data-line-annotation":`${e.hunkIndex},${e.lineIndex}`}})}function lT(e,t){return $({tagName:`div`,children:e,properties:{"data-content":``,style:`grid-row: span ${t}`}})}function uT(e){switch(e){case`file`:return`diffs-icon-file-code`;case`change`:return`diffs-icon-symbol-modified`;case`new`:return`diffs-icon-symbol-added`;case`deleted`:return`diffs-icon-symbol-deleted`;case`rename-pure`:case`rename-changed`:return`diffs-icon-symbol-moved`}}function dT({fileOrDiff:e,mode:t,stickyHeader:n}){let r=`type`in e?e:void 0,i={"data-diffs-header":t,"data-change-type":r?.type,"data-sticky":n?``:void 0};return $({tagName:`div`,children:[t===`custom`?$({tagName:`slot`,properties:{name:wu}}):fT({name:e.name,prevName:`prevName`in e?e.prevName:void 0,iconType:r?.type??`file`}),...t===`custom`?[]:[pT(r)]],properties:i})}function fT({name:e,prevName:t,iconType:n}){let r=[$({tagName:`slot`,properties:{name:Su}}),$b({name:uT(n),properties:{"data-change-icon":n}})];return t!=null&&(r.push($({tagName:`div`,children:[$({tagName:`bdi`,children:[Qb(t)]})],properties:{"data-prev-name":``}})),r.push($b({name:`diffs-icon-arrow-right-short`,properties:{"data-rename-icon":``}}))),r.push($({tagName:`div`,children:[$({tagName:`bdi`,children:[Qb(e)]})],properties:{"data-title":``}})),$({tagName:`div`,children:r,properties:{"data-header-content":``}})}function pT(e){let t=[];if(e!=null){let n=0,r=0;for(let t of e.hunks)n+=t.additionLines,r+=t.deletionLines;(r>0||n===0)&&t.push($({tagName:`span`,children:[Qb(`-${r}`)],properties:{"data-deletions-count":``}})),(n>0||r===0)&&t.push($({tagName:`span`,children:[Qb(`+${n}`)],properties:{"data-additions-count":``}}))}return t.push($({tagName:`slot`,properties:{name:Cu}})),$({tagName:`div`,children:t,properties:{"data-metadata":``}})}function mT(e){return $({tagName:`pre`,properties:hT(e)})}function hT({diffIndicators:e,disableBackground:t,disableLineNumbers:n,overflow:r,split:i,totalLines:a,type:o,customProperties:s}){return{...s,"data-diff":o===`diff`?``:void 0,"data-file":o===`file`?``:void 0,"data-diff-type":o===`diff`?i?`split`:`single`:void 0,"data-overflow":r,"data-disable-line-numbers":n?``:void 0,"data-background":t?void 0:``,"data-indicators":e===`bars`||e===`classic`?e:void 0,style:`--diffs-min-number-column-width-default:${`${a}`.length}ch;`}}function gT(e,{theme:t,preferredHighlighter:n=`shiki-js`}){return{langs:[e??`text`],themes:zb(t),preferredHighlighter:n}}function _T(e){return e.useTokenTransformer===!0||e.onTokenClick!=null||e.onTokenEnter!=null||e.onTokenLeave!=null}function vT(e){return $({tagName:`div`,properties:{"data-content-buffer":``,"data-buffer-size":e,style:`grid-row: span ${e};min-height:calc(${e} * 1lh)`}})}function yT(e){return $({tagName:`div`,children:[$({tagName:`span`,children:[Qb(`No newline at end of file`)]})],properties:{"data-no-newline":``,"data-line-type":e,"data-column-content":``}})}function bT(e){return $({tagName:`div`,children:[$b({name:e===`both`?`diffs-icon-expand-all`:`diffs-icon-expand`,properties:{"data-icon":``}})],properties:{role:`button`,"data-expand-button":``,"data-expand-both":e===`both`?``:void 0,"data-expand-up":e===`up`?``:void 0,"data-expand-down":e===`down`?``:void 0}})}function xT({type:e,content:t,expandIndex:n,chunked:r=!1,slotName:i,isFirstHunk:a,isLastHunk:o}){let s=0,c=[];if(e===`metadata`&&t!=null&&c.push($({tagName:`div`,children:[Qb(t)],properties:{"data-separator-wrapper":``}})),(e===`line-info`||e===`line-info-basic`)&&t!=null){let e=[];n!=null&&(r?(a||(e.push(bT(`up`)),s++),o||(e.push(bT(`down`)),s++)):(e.push(bT(!a&&!o?`both`:a?`down`:`up`)),s++)),e.push($({tagName:`div`,children:[$({tagName:`span`,children:[Qb(t)],properties:{"data-unmodified-lines":``}})],properties:{"data-separator-content":``}})),r&&n!=null&&e.push($({tagName:`div`,children:[Qb(`Expand all`)],properties:{role:`button`,"data-expand-button":``,"data-expand-all-button":``}})),c.push($({tagName:`div`,children:e,properties:{"data-separator-wrapper":``,"data-separator-multi-button":s>1?``:void 0}}))}return e===`custom`&&i!=null&&c.push($({tagName:`slot`,properties:{name:i}})),$({tagName:`div`,children:c,properties:{"data-separator":c.length===0?`simple`:e,"data-expand-index":n,"data-separator-first":a?``:void 0,"data-separator-last":o?``:void 0}})}function ST(e,t){return`hunk-separator-${e}-${t}`}function CT(e){let t=e.at(-1);return t==null?0:Math.max(t.additionStart+t.additionCount,t.deletionStart+t.deletionCount)}function wT(e){return e.startingLine===0&&e.totalLines===1/0&&e.bufferBefore===0&&e.bufferAfter===0}var TT=-1,ET=class{options;onRenderUpdate;workerManager;__id=`diff-hunks-renderer:${++TT}`;highlighter;diff;expandedHunks=new Map;deletionAnnotations={};additionAnnotations={};computedLang=`text`;renderCache;constructor(e={theme:Tu},t,n){this.options=e,this.onRenderUpdate=t,this.workerManager=n,n?.isWorkingPool()!==!0&&(this.highlighter=sT(e.theme??Tu)?Lb():void 0)}cleanUp(){this.recycle(),this.expandedHunks.clear(),this.workerManager=void 0,this.onRenderUpdate=void 0}recycle(){this.highlighter=void 0,this.diff=void 0,this.clearRenderCache(),this.additionAnnotations={},this.deletionAnnotations={},this.workerManager?.cleanUpTasks(this)}clearRenderCache(){this.renderCache=void 0}setOptions(e){this.options=e}mergeOptions(e){this.options={...this.options,...e}}expandHunk(e,t,n=this.getOptionsWithDefaults().expansionLineCount){let r={...this.expandedHunks.get(e)??{fromStart:0,fromEnd:0}};(t===`up`||t===`both`)&&(r.fromStart+=n),(t===`down`||t===`both`)&&(r.fromEnd+=n),this.renderCache?.highlighted!==!0&&this.clearRenderCache(),this.expandedHunks.set(e,r)}getExpandedHunk(e){return this.expandedHunks.get(e)??Mu}getExpandedHunksMap(){return this.expandedHunks}setLineAnnotations(e){this.additionAnnotations={},this.deletionAnnotations={};for(let t of e){let e=(()=>{switch(t.side){case`deletions`:return this.deletionAnnotations;case`additions`:return this.additionAnnotations}})(),n=e[t.lineNumber]??[];e[t.lineNumber]=n,n.push(t)}}getUnifiedLineDecoration({lineType:e}){return{gutterLineType:e}}getSplitLineDecoration({side:e,type:t}){return t===`change`?{gutterLineType:e===`deletions`?`change-deletion`:`change-addition`}:{gutterLineType:t}}createAnnotationElement=e=>cT(e);getOptionsWithDefaults(){let{diffIndicators:e=`bars`,diffStyle:t=`split`,disableBackground:n=!1,disableFileHeader:r=!1,disableLineNumbers:i=!1,disableVirtualizationBuffers:a=!1,collapsed:o=!1,expandUnchanged:s=!1,collapsedContextThreshold:c=1,expansionLineCount:l=100,hunkSeparators:u=`line-info`,lineDiffType:d=`word-alt`,maxLineDiffLength:f=1e3,overflow:p=`scroll`,stickyHeader:m=!1,theme:h=Tu,headerRenderMode:g=`default`,tokenizeMaxLineLength:_=1e3,tokenizeMaxLength:v=Au,useTokenTransformer:y=!1,useCSSClasses:b=!1}=this.options;return{diffIndicators:e,diffStyle:t,disableBackground:n,disableFileHeader:r,disableLineNumbers:i,disableVirtualizationBuffers:a,collapsed:o,expandUnchanged:s,collapsedContextThreshold:c,expansionLineCount:l,hunkSeparators:u,lineDiffType:d,maxLineDiffLength:f,overflow:p,stickyHeader:m,theme:this.workerManager?.getDiffRenderOptions().theme??h,headerRenderMode:g,tokenizeMaxLineLength:_,tokenizeMaxLength:v,useTokenTransformer:y,useCSSClasses:b}}async initializeHighlighter(){return this.highlighter=await Ib(gT(this.computedLang,this.options)),this.highlighter}hydrate(e){if(e==null)return;this.diff=e;let{options:t}=this.getRenderOptions(e),n=FT(e,this.getTokenizeMaxLength()),r=this.workerManager?.getDiffResultCache(e);r!=null&&!Lx(t,r.options)&&(r=void 0),this.renderCache??={diff:e,highlighted:!n&&!Rx(e),options:t,result:n?void 0:r?.result,renderRange:void 0},this.workerManager?.isWorkingPool()===!0?this.renderCache.result==null&&!n&&this.workerManager.highlightDiffAST(this,this.diff):this.highlighter??(this.computedLang=e.lang??Kb(e.name),this.initializeHighlighter())}getRenderOptions(e){let t=(()=>{if(this.workerManager?.isWorkingPool()===!0)return this.workerManager.getDiffRenderOptions();let{theme:e,tokenizeMaxLineLength:t,lineDiffType:n,maxLineDiffLength:r}=this.getOptionsWithDefaults();return{theme:e,useTokenTransformer:_T(this.options),tokenizeMaxLineLength:t,lineDiffType:n,maxLineDiffLength:r}})();this.getOptionsWithDefaults();let{renderCache:n}=this;return n?.result==null||!Ix(e,n.diff)||!Lx(t,n.options)?{options:t,forceHighlight:!0}:{options:t,forceHighlight:!1}}renderDiff(e=this.renderCache?.diff,t=Nu){if(e==null)return;let{expandUnchanged:n=!1,collapsedContextThreshold:r}=this.getOptionsWithDefaults(),{options:i,forceHighlight:a}=this.getRenderOptions(e),o=this.getMatchingWorkerResultCache(e,i);o!=null&&!this.hasHighlightedRenderCache(e,i)&&(this.renderCache={diff:e,highlighted:!0,renderRange:void 0,...o},a=!1),this.renderCache??={diff:e,highlighted:!1,options:i,result:void 0,renderRange:void 0};let s=e.additionLines.length>0||e.deletionLines.length>0,c=!s||Rx(e)||FT(e,this.getTokenizeMaxLength()),l=!Ix(e,this.renderCache.diff),u=!jw(this.renderCache.renderRange,t);if(this.workerManager?.isWorkingPool()===!0)(c||this.renderCache.result==null||!this.renderCache.highlighted&&(l||u))&&(this.renderCache.diff=e,this.renderCache.options=i,this.renderCache.highlighted=!1,(this.renderCache.result==null||l||u||a)&&(this.renderCache.result=this.workerManager.getPlainDiffAST(e,t.startingLine,t.totalLines,wT(t)||n?!0:this.expandedHunks,r)),this.renderCache.renderRange=t),!c&&s&&(!this.renderCache.highlighted||a)&&this.workerManager.highlightDiffAST(this,e);else{this.computedLang=e.lang??Kb(e.name);let t=this.highlighter!=null&&sT(i.theme),n=this.highlighter!=null&&oT(this.computedLang),r=!c&&n;if(this.highlighter!=null&&t&&(a||c||!this.renderCache.highlighted&&r||this.renderCache.result==null)){let{result:t,options:i}=this.renderDiffWithHighlighter(e,this.highlighter,c||!n);this.renderCache={diff:e,options:i,highlighted:r,result:t,renderRange:void 0}}(!t||!c&&!n)&&this.asyncHighlight(e).then(({result:t,options:n})=>{this.renderCache!=null&&(this.renderCache.highlighted=!1),this.onHighlightSuccess(e,t,n,!c)})}return this.renderCache.result==null?void 0:this.processDiffResult(this.renderCache.diff,t,this.renderCache.result)}async asyncRender(e,t=Nu){let{result:n}=await this.asyncHighlight(e);return this.processDiffResult(e,t,n)}createPreElement(e,t,n){let{diffIndicators:r,disableBackground:i,disableLineNumbers:a,overflow:o}=this.getOptionsWithDefaults();return mT({type:`diff`,diffIndicators:r,disableBackground:i,disableLineNumbers:a,overflow:o,split:e,totalLines:t,customProperties:n})}async asyncHighlight(e){let t=FT(e,this.getTokenizeMaxLength());this.computedLang=t?`text`:e.lang??Kb(e.name);let n=this.highlighter!=null&&sT(this.options.theme??Tu),r=t||this.highlighter!=null&&oT(this.computedLang);return(this.highlighter==null||!n||!r)&&(this.highlighter=await this.initializeHighlighter()),this.renderDiffWithHighlighter(e,this.highlighter,t)}renderDiffWithHighlighter(e,t,n=!1){let{options:r}=this.getRenderOptions(e),{collapsedContextThreshold:i}=this.getOptionsWithDefaults();return{result:VS(e,t,r,{forcePlainText:n,expandedHunks:n?!0:void 0,collapsedContextThreshold:i}),options:r}}onHighlightSuccess(e,t,n,r=!0){if(this.renderCache==null)return;let i=!this.renderCache.highlighted||!Lx(this.renderCache.options,n)||!Ix(this.renderCache.diff,e);this.renderCache={diff:e,options:n,highlighted:r,result:t,renderRange:void 0},i&&this.onRenderUpdate?.()}getMatchingWorkerResultCache(e,t){let n=this.workerManager?.getDiffResultCache(e);if(!(n==null||!Lx(t,n.options)))return n}hasHighlightedRenderCache(e,t){let{renderCache:n}=this;return n?.result!=null&&n.highlighted&&Ix(e,n.diff)&&Lx(t,n.options)}onHighlightError(e){console.error(e)}getTokenizeMaxLength(){return this.options.tokenizeMaxLength??1e5}processDiffResult(e,t,{code:n,themeStyles:r,baseThemeType:i}){let{diffStyle:a,disableFileHeader:o,expandUnchanged:s,expansionLineCount:c,collapsedContextThreshold:l,hunkSeparators:u}=this.getOptionsWithDefaults();this.diff=e;let d=a===`unified`,f=[],p=[],m=[],h=[],{additionLines:g,deletionLines:_}=n,v={rowCount:0,hunkSeparators:u,additionsContentAST:f,deletionsContentAST:p,unifiedContentAST:m,unifiedGutterAST:tx(),deletionsGutterAST:tx(),additionsGutterAST:tx(),expansionLineCount:c,hunkData:h,incrementRowCount(e=1){v.rowCount+=e},pushToGutter(e,t){switch(e){case`unified`:v.unifiedGutterAST.children.push(t);break;case`deletions`:v.deletionsGutterAST.children.push(t);break;case`additions`:v.additionsGutterAST.children.push(t);break}}},y=Gx({fileDiff:e,errorPrefix:`DiffHunksRenderer.processDiffResult`}),b={size:0,side:void 0,increment(){this.size+=1},flush(){if(a!==`unified`){if(this.size<=0||this.side==null){this.side=void 0,this.size=0;return}this.side===`additions`?(v.pushToGutter(`additions`,rx(void 0,`buffer`,this.size)),f?.push(vT(this.size))):(v.pushToGutter(`deletions`,rx(void 0,`buffer`,this.size)),p?.push(vT(this.size))),this.size=0,this.side=void 0}}},x=(e,t,n,r,i)=>{v.pushToGutter(e,nx(t,n,r,i))};function S(e){b.flush(),a===`unified`?NT(`unified`,e,v):(NT(`deletions`,e,v),NT(`additions`,e,v))}this.pushFileLevelAnnotations(e,a,t,v),$x({diff:e,diffStyle:a,startingLine:t.startingLine,totalLines:t.totalLines,expandedHunks:s?!0:this.expandedHunks,collapsedContextThreshold:l,callback:({hunkIndex:t,hunk:n,collapsedBefore:r,collapsedAfter:i,additionLine:o,deletionLine:s,type:c})=>{let l=s==null?o.splitLineIndex:s.splitLineIndex,d=o==null?s.unifiedLineIndex:o.unifiedLineIndex;a===`split`&&c!==`change`&&b.flush(),r>0&&S({hunkIndex:t,collapsedLines:r,rangeSize:Math.max(n?.collapsedBefore??0,0),hunkSpecs:n?.hunkSpecs,isFirstHunk:t===0,isLastHunk:!1,isExpandable:!e.isPartial});let f=a===`unified`?d:l,p={type:c,hunkIndex:t,lineIndex:f,unifiedLineIndex:d,splitLineIndex:l,deletionLine:s,additionLine:o};if(a===`unified`){let n=this.getUnifiedInjectedRowsForLine?.(p);n?.before!=null&&AT(n.before,v);let r=s==null?void 0:_[s.lineIndex],i=o==null?void 0:g[o.lineIndex];if(r==null&&i==null){let t=`DiffHunksRenderer.processDiffResult: deletionLine and additionLine are null, something is wrong`;throw console.error(t,{file:e.name}),Error(t)}let a=c===`change`?o==null?`change-deletion`:`change-addition`:c,u=this.getUnifiedLineDecoration({type:c,lineType:a,additionLineIndex:o?.lineIndex,deletionLineIndex:s?.lineIndex});x(`unified`,u.gutterLineType,o==null?s.lineNumber:o.lineNumber,`${d},${l}`,u.gutterProperties),i==null?r!=null&&(r=PT(r,u.contentProperties)):i=PT(i,u.contentProperties),MT({diffStyle:`unified`,type:c,deletionLine:r,additionLine:i,unifiedSpan:this.getAnnotations(`unified`,s?.lineNumber,o?.lineNumber,t,f),createAnnotationElement:e=>this.createAnnotationElement(e),context:v}),n?.after!=null&&AT(n.after,v)}else{let n=this.getSplitInjectedRowsForLine?.(p);n?.before!=null&&jT(n.before,v,b);let r=s==null?void 0:_[s.lineIndex],i=o==null?void 0:g[o.lineIndex],a=this.getSplitLineDecoration({side:`deletions`,type:c,lineIndex:s?.lineIndex}),u=this.getSplitLineDecoration({side:`additions`,type:c,lineIndex:o?.lineIndex});if(r==null&&i==null){let t=`DiffHunksRenderer.processDiffResult: deletionLine and additionLine are null, something is wrong`;throw console.error(t,{file:e.name}),Error(t)}let d=(()=>{if(c===`change`){if(i==null)return`additions`;if(r==null)return`deletions`}})();if(d!=null){if(b.side!=null&&b.side!==d)throw Error(`DiffHunksRenderer.processDiffResult: iterateOverDiff, invalid pending splits`);b.side=d,b.increment()}let m=this.getAnnotations(`split`,s?.lineNumber,o?.lineNumber,t,f);if(m!=null&&b.size>0&&b.flush(),s!=null){let e=PT(r,a.contentProperties);x(`deletions`,a.gutterLineType,s.lineNumber,`${s.unifiedLineIndex},${l}`,a.gutterProperties),e!=null&&(r=e)}if(o!=null){let e=PT(i,u.contentProperties);x(`additions`,u.gutterLineType,o.lineNumber,`${o.unifiedLineIndex},${l}`,u.gutterProperties),e!=null&&(i=e)}MT({diffStyle:`split`,type:c,additionLine:i,deletionLine:r,...m,createAnnotationElement:e=>this.createAnnotationElement(e),context:v}),n?.after!=null&&jT(n.after,v,b)}let m=a===`split`&&n!=null&&l===n.splitLineStart+n.splitLineCount-1,h=m?n.noEOFCRDeletions:!1,C=m?n.noEOFCRAdditions:!1,ee=(s?.noEOFCR??!1)||h,w=(o?.noEOFCR??!1)||C;if(w||ee){if(a===`split`&&b.flush(),ee){let e=c===`context`||c===`context-expanded`?c:`change-deletion`;a===`unified`?(v.unifiedContentAST.push(yT(e)),v.pushToGutter(`unified`,rx(e,`metadata`,1))):(v.deletionsContentAST.push(yT(e)),v.pushToGutter(`deletions`,rx(e,`metadata`,1)),w||(v.pushToGutter(`additions`,rx(void 0,`buffer`,1)),v.additionsContentAST.push(vT(1))))}if(w){let e=c===`context`||c===`context-expanded`?c:`change-addition`;a===`unified`?(v.unifiedContentAST.push(yT(e)),v.pushToGutter(`unified`,rx(e,`metadata`,1))):(v.additionsContentAST.push(yT(e)),v.pushToGutter(`additions`,rx(e,`metadata`,1)),ee||(v.pushToGutter(`deletions`,rx(void 0,`buffer`,1)),v.deletionsContentAST.push(vT(1))))}v.incrementRowCount(1)}i>0&&u!==`simple`&&S({hunkIndex:c===`context-expanded`?t:t+1,collapsedLines:i,rangeSize:y,hunkSpecs:void 0,isFirstHunk:!1,isLastHunk:!0,isExpandable:!e.isPartial}),v.incrementRowCount(1)}}),a===`split`&&b.flush();let C=Math.max(CT(e.hunks),e.additionLines.length??0,e.deletionLines.length??0),ee=t.bufferBefore>0||t.bufferAfter>0,w=!d&&e.type!==`deleted`,T=!d&&e.type!==`new`,E=v.rowCount>0||ee;f=w&&E?f:void 0,p=T&&E?p:void 0,m=d&&E?m:void 0;let D=this.createPreElement(p!=null&&f!=null,C);return{unifiedGutterAST:d&&E?v.unifiedGutterAST.children:void 0,unifiedContentAST:m,deletionsGutterAST:T&&E?v.deletionsGutterAST.children:void 0,deletionsContentAST:p,additionsGutterAST:w&&E?v.additionsGutterAST.children:void 0,additionsContentAST:f,hunkData:h,preNode:D,themeStyles:r,baseThemeType:i,headerElement:o?void 0:this.renderHeader(this.diff),totalLines:C,rowCount:v.rowCount,bufferBefore:t.bufferBefore,bufferAfter:t.bufferAfter,css:``}}renderCodeAST(e,t){let n=e===`unified`?t.unifiedGutterAST:e===`deletions`?t.deletionsGutterAST:t.additionsGutterAST,r=e===`unified`?t.unifiedContentAST:e===`deletions`?t.deletionsContentAST:t.additionsContentAST;if(n==null||r==null)return;let i=tx(n);return i.properties.style=`grid-row: span ${t.rowCount}`,[i,lT(r,t.rowCount)]}renderFullAST(e,t=[]){let n=this.getOptionsWithDefaults().hunkSeparators===`line-info`,r=this.renderCodeAST(`unified`,e);if(r!=null)return t.push($({tagName:`code`,children:r,properties:{"data-code":``,"data-container-size":n?``:void 0,"data-unified":``}})),{...e.preNode,children:t};let i=this.renderCodeAST(`deletions`,e);i!=null&&t.push($({tagName:`code`,children:i,properties:{"data-code":``,"data-container-size":n?``:void 0,"data-deletions":``}}));let a=this.renderCodeAST(`additions`,e);return a!=null&&t.push($({tagName:`code`,children:a,properties:{"data-code":``,"data-container-size":n?``:void 0,"data-additions":``}})),{...e.preNode,children:t}}renderFullHTML(e,t=[]){return Dh(this.renderFullAST(e,t))}renderPartialHTML(e,t){return Dh(t==null?e:$({tagName:`code`,children:e,properties:{"data-code":``,"data-container-size":this.getOptionsWithDefaults().hunkSeparators===`line-info`?``:void 0,[`data-${t}`]:``}}))}pushFileLevelAnnotations(e,t,n,r){if(!aT(n))return;let i=e.type===`new`?[]:DT(iT(this.deletionAnnotations)),a=e.type===`deleted`?[]:DT(iT(this.additionAnnotations));if(i.length===0&&a.length===0)return;let{createAnnotationElement:o}=this;if(t===`unified`){MT({diffStyle:t,type:`context`,unifiedSpan:{type:`annotation`,hunkIndex:-1,lineIndex:-1,annotations:i.concat(a)},createAnnotationElement:o,context:r});return}MT({diffStyle:t,type:`context`,deletionSpan:{type:`annotation`,hunkIndex:-1,lineIndex:-1,annotations:i},additionSpan:{type:`annotation`,hunkIndex:-1,lineIndex:-1,annotations:a},createAnnotationElement:o,context:r})}getAnnotations(e,t,n,r,i){let a={type:`annotation`,hunkIndex:r,lineIndex:i,annotations:[]};if(t!=null)for(let e of this.deletionAnnotations[t]??[])a.annotations.push(WC(e));let o={type:`annotation`,hunkIndex:r,lineIndex:i,annotations:[]};if(n!=null)for(let t of this.additionAnnotations[n]??[])(e===`unified`?a:o).annotations.push(WC(t));if(e===`unified`)return a.annotations.length>0?a:void 0;if(!(o.annotations.length===0&&a.annotations.length===0))return{deletionSpan:a,additionSpan:o}}renderHeader(e){let{headerRenderMode:t,stickyHeader:n}=this.getOptionsWithDefaults();return dT({fileOrDiff:e,mode:t,stickyHeader:n})}};function DT(e){return e?.map(e=>WC(e))??[]}var OT=new Intl.PluralRules(`en-US`);function kT(e){return`${e} unmodified line${OT.select(e)===`one`?``:`s`}`}function AT(e,t){for(let n of e)t.unifiedContentAST.push(n.content),t.pushToGutter(`unified`,n.gutter),t.incrementRowCount(1)}function jT(e,t,n){for(let{deletion:r,addition:i}of e){if(r==null&&i==null)continue;let e=r!=null&&i!=null?void 0:r==null?`deletions`:`additions`;(e==null||n.side!==e)&&n.flush(),r!=null&&(t.deletionsContentAST.push(r.content),t.pushToGutter(`deletions`,r.gutter)),i!=null&&(t.additionsContentAST.push(i.content),t.pushToGutter(`additions`,i.gutter)),e!=null&&(n.side=e,n.increment()),t.incrementRowCount(1)}}function MT({diffStyle:e,type:t,deletionLine:n,additionLine:r,unifiedSpan:i,deletionSpan:a,additionSpan:o,createAnnotationElement:s,context:c}){let l=!1;if(e===`unified`){if(r==null?n!=null&&c.unifiedContentAST.push(n):c.unifiedContentAST.push(r),i!=null){let e=t===`change`?n==null?`change-addition`:`change-deletion`:t;c.unifiedContentAST.push(s(i)),c.pushToGutter(`unified`,rx(e,`annotation`,1)),l=!0}}else if(e===`split`){if(n!=null&&c.deletionsContentAST.push(n),r!=null&&c.additionsContentAST.push(r),a!=null){let e=t===`change`?n==null?`context`:`change-deletion`:t;c.deletionsContentAST.push(s(a)),c.pushToGutter(`deletions`,rx(e,`annotation`,1)),l=!0}if(o!=null){let e=t===`change`?r==null?`context`:`change-addition`:t;c.additionsContentAST.push(s(o)),c.pushToGutter(`additions`,rx(e,`annotation`,1)),l=!0}}l&&c.incrementRowCount(1)}function NT(e,{hunkIndex:t,collapsedLines:n,rangeSize:r,hunkSpecs:i,isFirstHunk:a,isLastHunk:o,isExpandable:s},c){if(n<=0)return;let l=e===`unified`?c.unifiedContentAST:e===`deletions`?c.deletionsContentAST:c.additionsContentAST;if(c.hunkSeparators===`metadata`){i!=null&&(c.pushToGutter(e,xT({type:`metadata`,content:i,isFirstHunk:a,isLastHunk:o})),l.push(xT({type:`metadata`,content:i,isFirstHunk:a,isLastHunk:o})),e!==`additions`&&c.incrementRowCount(1));return}if(c.hunkSeparators===`simple`){t>0&&(c.pushToGutter(e,xT({type:`simple`,isFirstHunk:a,isLastHunk:!1})),l.push(xT({type:`simple`,isFirstHunk:a,isLastHunk:!1})),e!==`additions`&&c.incrementRowCount(1));return}let u=ST(e,t),d=r>c.expansionLineCount,f=s?t:void 0;c.pushToGutter(e,xT({type:c.hunkSeparators,content:kT(n),expandIndex:f,chunked:d,slotName:u,isFirstHunk:a,isLastHunk:o})),l.push(xT({type:c.hunkSeparators,content:kT(n),expandIndex:f,chunked:d,slotName:u,isFirstHunk:a,isLastHunk:o})),e!==`additions`&&c.incrementRowCount(1),c.hunkData.push({slotName:u,hunkIndex:t,lines:n,type:e,expandable:s?{up:!a,down:!o,chunked:d}:void 0})}function PT(e,t){return e==null||e.type!==`element`||t==null?e:{...e,properties:{...e.properties,...t}}}function FT(e,t){return Math.max(e.additionLines.length,e.deletionLines.length)>t}function IT(e,t){return e.lineNumber===t.lineNumber&&e.side===t.side&&e.metadata===t.metadata}function LT(e,t){return e.slotName===t.slotName&&e.hunkIndex===t.hunkIndex&&e.lines===t.lines&&e.type===t.type&&e.expandable?.chunked===t.expandable?.chunked&&e.expandable?.up===t.expandable?.up&&e.expandable?.down===t.expandable?.down}function RT(e){return{theme:e?.theme,disableLineNumbers:e?.disableLineNumbers,overflow:e?.overflow,collapsed:e?.collapsed,disableFileHeader:e?.disableFileHeader,disableVirtualizationBuffers:e?.disableVirtualizationBuffers,stickyHeader:e?.stickyHeader,preferredHighlighter:e?.preferredHighlighter,useCSSClasses:e?.useCSSClasses,useTokenTransformer:e?.useTokenTransformer,tokenizeMaxLineLength:e?.tokenizeMaxLineLength,tokenizeMaxLength:e?.tokenizeMaxLength,diffStyle:e?.diffStyle,diffIndicators:e?.diffIndicators,disableBackground:e?.disableBackground,hunkSeparators:typeof e?.hunkSeparators==`function`?`custom`:e?.hunkSeparators,expandUnchanged:e?.expandUnchanged,collapsedContextThreshold:e?.collapsedContextThreshold,lineDiffType:e?.lineDiffType,maxLineDiffLength:e?.maxLineDiffLength,expansionLineCount:e?.expansionLineCount,headerRenderMode:e?.renderCustomHeader==null?`default`:`custom`}}var zT=-1,BT=class{options;workerManager;isContainerManaged;static LoadedCustomComponent=!0;__id=`file-diff:${++zT}`;type=`file-diff`;fileContainer;spriteSVG;pre;codeUnified;codeDeletions;codeAdditions;bufferBefore;bufferAfter;themeCSSStyle;appliedThemeCSS;hasAdoptedThemeCSS=!1;unsafeCSSStyle;appliedUnsafeCSS;gutterUtilityContent;headerElement;headerPrefix;headerMetadata;headerCustom;separatorCache=new Map;errorWrapper;placeHolder;hunksRenderer;resizeManager;scrollSyncManager;interactionManager;annotationCache=new Map;lineAnnotations=[];managersDirty=!1;deletionFile;additionFile;fileDiff;renderRange;appliedPreAttributes;lastRenderedHeaderHTML;cachedHeaderHTML;lastRowCount;mounted=!1;enabled=!0;constructor(e={theme:Tu},t,n=!1){this.options=e,this.workerManager=t,this.isContainerManaged=n,this.hunksRenderer=this.createHunksRenderer(e),this.resizeManager=new Ew,this.scrollSyncManager=new tT,this.interactionManager=new sw(`diff`,cw(e,typeof e.hunkSeparators==`function`||(e.hunkSeparators??`line-info`)===`line-info`||e.hunkSeparators===`line-info-basic`?this.handleExpandHunk:void 0,this.getLineIndex)),this.workerManager?.subscribeToThemeChanges(this),this.enabled=!0}handleHighlightRender=()=>{this.rerender()};getHunksRendererOptions(e){return RT(e)}createHunksRenderer(e){return new ET(this.getHunksRendererOptions(e),this.handleHighlightRender,this.workerManager)}getLineIndex=(e,t=`additions`)=>{if(this.fileDiff==null)return;let n=this.fileDiff.hunks.at(-1),r,i;hunkIterator:for(let a of this.fileDiff.hunks){let o=t===`deletions`?a.deletionStart:a.additionStart,s=t===`deletions`?a.deletionCount:a.additionCount,c=a.splitLineStart,l=a.unifiedLineStart;if(e<o){let t=o-e;r=Math.max(l-t,0),i=Math.max(c-t,0);break hunkIterator}if(e>=o+s){if(a===n){let t=e-(o+s);r=l+a.unifiedLineCount+t,i=c+a.splitLineCount+t;break hunkIterator}continue}for(let n of a.hunkContent)if(n.type===`context`)if(e<o+n.lines){let t=e-o;i=c+t,r=l+t;break hunkIterator}else o+=n.lines,c+=n.lines,l+=n.lines;else{let a=t===`deletions`?n.deletions:n.additions;if(e<o+a){let a=e-o;r=l+(t===`additions`?n.deletions:0)+a,i=c+a;break hunkIterator}else o+=a,c+=Math.max(n.deletions,n.additions),l+=n.deletions+n.additions}break hunkIterator}if(!(r==null||i==null))return[r,i]};setOptions(e){e!=null&&(this.options=e,this.cachedHeaderHTML=void 0,this.hunksRenderer.setOptions(this.getHunksRendererOptions(e)),this.syncInteractionOptions())}syncInteractionOptions(){this.interactionManager.setOptions(cw(this.options,typeof this.options.hunkSeparators==`function`||(this.options.hunkSeparators??`line-info`)===`line-info`||this.options.hunkSeparators===`line-info-basic`?this.handleExpandHunk:void 0,this.getLineIndex))}mergeOptions(e){this.options={...this.options,...e}}setThemeType(e){(this.options.themeType??`system`)!==e&&(this.mergeOptions({themeType:e}),this.applyCachedThemeState(e))}applyCachedThemeState(e){if(typeof this.options.theme==`string`||this.fileContainer==null||this.appliedThemeCSS==null)return!1;let t=this.appliedThemeCSS.baseThemeType??e;return this.appliedThemeCSS.themeType===t?!1:(this.applyThemeState(this.fileContainer,this.appliedThemeCSS.themeStyles,e,this.appliedThemeCSS.baseThemeType),!0)}hasThemeChanged(){return this.appliedThemeCSS!=null&&!Fu(this.appliedThemeCSS.theme,this.options.theme??Tu)}getHoveredLine=()=>this.interactionManager.getHoveredLine();setLineAnnotations(e){this.lineAnnotations=e}canPartiallyRender(e,t,n){return!(e||t||n||typeof this.options.hunkSeparators==`function`)}setSelectedLines(e,t){this.interactionManager.setSelection(e,t)}flushManagers(){if(!this.managersDirty||this.pre==null){this.managersDirty=!1;return}let{diffStyle:e=`split`,overflow:t=`scroll`}=this.options;this.interactionManager.setup(this.pre),this.resizeManager.setup(this.pre,t===`wrap`),t===`scroll`&&e===`split`?this.scrollSyncManager.setup(this.pre,this.codeDeletions,this.codeAdditions):this.scrollSyncManager.cleanUp(),this.managersDirty=!1}cleanUp(e=!1){this.emitPostRender(!0),this.resizeManager.cleanUp(),this.interactionManager.cleanUp(),this.scrollSyncManager.cleanUp(),this.managersDirty=!1,this.workerManager?.unsubscribeToThemeChanges(this),this.renderRange=void 0,this.isContainerManaged||this.fileContainer?.remove(),this.fileContainer=void 0,this.mounted=!1,e||(this.lineAnnotations=[]),this.clearAuxiliaryNodes(),this.annotationCache.clear(),this.pre=void 0,this.codeUnified=void 0,this.codeDeletions=void 0,this.codeAdditions=void 0,this.bufferBefore=void 0,this.bufferAfter=void 0,this.appliedPreAttributes=void 0,this.headerElement=void 0,this.headerPrefix=void 0,this.headerMetadata=void 0,this.headerCustom=void 0,this.placeHolder=void 0,this.lastRenderedHeaderHTML=void 0,e||(this.cachedHeaderHTML=void 0),this.errorWrapper=void 0,this.spriteSVG=void 0,this.lastRowCount=void 0,this.themeCSSStyle=void 0,this.appliedThemeCSS=void 0,this.hasAdoptedThemeCSS=!1,this.unsafeCSSStyle=void 0,this.appliedUnsafeCSS=void 0,e?this.hunksRenderer.recycle():(this.hunksRenderer.cleanUp(),this.workerManager=void 0,this.fileDiff=void 0,this.deletionFile=void 0,this.additionFile=void 0),this.enabled=!1}virtualizedSetup(){this.enabled=!0,this.workerManager?.subscribeToThemeChanges(this)}hydrate(e){let{fileContainer:t,prerenderedHTML:n,preventEmit:r=!1,lineAnnotations:i,oldFile:a,newFile:o,fileDiff:s}=e;this.hydrateElements(t,n),UT(this.pre,VT({fileDiff:s,oldFile:a,newFile:o}),this.options.collapsed)||WT(this.headerElement,HT({fileDiff:s,oldFile:a,newFile:o}),this.options.disableFileHeader)?this.render({...e,preventEmit:!0}):this.hydrationSetup({fileDiff:s,oldFile:a,newFile:o,lineAnnotations:i}),r||this.emitPostRender()}hydrateElements(e,t){this.fileContainer!==e&&this.emitPostRender(!0),Qw(e,t);for(let t of e.shadowRoot?.children??[]){if(t instanceof SVGElement){this.spriteSVG=t;continue}if(t instanceof HTMLElement){if(t instanceof HTMLPreElement){this.pre=t;for(let e of t.children)!(e instanceof HTMLElement)||e.tagName.toLowerCase()!==`code`||(`deletions`in e.dataset&&(this.codeDeletions=e),`additions`in e.dataset&&(this.codeAdditions=e),`unified`in e.dataset&&(this.codeUnified=e));continue}if(`diffsHeader`in t.dataset){this.headerElement=t;continue}if(t instanceof HTMLStyleElement&&t.hasAttribute(`data-theme-css`)){this.themeCSSStyle=t;continue}if(t instanceof HTMLStyleElement&&t.hasAttribute(`data-unsafe-css`)){this.unsafeCSSStyle=t,this.appliedUnsafeCSS=t.textContent;continue}}}this.pre!=null&&(this.syncCodeNodesFromPre(this.pre),this.pre.removeAttribute(`data-dehydrated`)),this.fileContainer=e,this.hydrateMeasuredScrollbar()}hydrationSetup({fileDiff:e,oldFile:t,newFile:n,lineAnnotations:r}){this.lineAnnotations=r??this.lineAnnotations,this.additionFile=n,this.deletionFile=t,this.fileDiff=e??(t!=null&&n!=null?eT(t,n,this.options.parseDiffOptions):void 0),this.pre!=null&&(this.syncInteractionOptions(),this.hunksRenderer.hydrate(this.fileDiff),this.renderAnnotations(),this.renderGutterUtility(),this.injectUnsafeCSS(),this.managersDirty=!0,this.flushManagers())}rerender(){!this.enabled||this.fileDiff==null&&this.additionFile==null&&this.deletionFile==null||this.render({forceRender:!0,renderRange:this.renderRange})}onThemeChange(){this.hunksRenderer.clearRenderCache(),this.rerender()}handleExpandHunk=(e,t,n)=>{this.expandHunk(e,t,n)};expandHunk=(e,t,n)=>{this.hunksRenderer.expandHunk(e,t,n),this.rerender()};render({oldFile:e,newFile:t,fileDiff:n,deferManagers:r=!1,forceRender:i=!1,preventEmit:a=!1,lineAnnotations:o,fileContainer:s,containerWrapper:c,renderRange:l}){if(!this.enabled)throw Error(`FileDiff.render: attempting to call render after cleaned up`);let{collapsed:u=!1,themeType:d=`system`}=this.options,f=u?void 0:l,p=this.hasThemeChanged(),m=e!=null&&t!=null&&(!Hb(e,this.deletionFile)||!Hb(t,this.additionFile)),h=n!=null&&n!==this.fileDiff,g=o!=null&&(o.length>0||this.lineAnnotations.length>0)?o!==this.lineAnnotations:!1;if(!u&&jw(f,this.renderRange)&&!i&&!g&&!p&&(n!=null&&n===this.fileDiff||n==null&&!m))return this.applyCachedThemeState(d);let{renderRange:_}=this;if(this.renderRange=f,this.deletionFile=e,this.additionFile=t,n==null?e!=null&&t!=null&&m&&(h=!0,this.fileDiff=eT(e,t,this.options.parseDiffOptions)):this.fileDiff=n,h&&(this.cachedHeaderHTML=void 0),o!=null&&this.setLineAnnotations(o),this.fileDiff==null)return!1;this.hunksRenderer.setOptions(this.getHunksRendererOptions(this.options)),this.syncInteractionOptions(),this.hunksRenderer.setLineAnnotations(this.lineAnnotations);let{disableErrorHandling:v=!1,disableFileHeader:y=!1}=this.options;if(y&&(this.headerElement!=null&&(this.headerElement.remove(),this.headerElement=void 0,this.lastRenderedHeaderHTML=void 0),this.clearHeaderSlots()),s=this.getOrCreateFileContainer(s,c),this.applyCachedThemeState(d),u){this.removeRenderedCode(),this.clearAuxiliaryNodes();try{let e=this.hunksRenderer.renderDiff(this.fileDiff,Pu);e!=null&&this.applyThemeState(s,e.themeStyles,d,e.baseThemeType),e?.headerElement!=null&&this.applyHeaderToDOM(e.headerElement,s),this.renderSeparators([]),this.injectUnsafeCSS()}catch(e){if(v)throw e;console.error(e),e instanceof Error&&this.applyErrorToDOM(e,s)}return a||this.emitPostRender(),!0}try{let e=this.getOrCreatePreNode(s);if(!(this.canPartiallyRender(i,g,m||h||p)&&this.applyPartialRender({previousRenderRange:_,renderRange:f}))){let t=this.hunksRenderer.renderDiff(this.fileDiff,f);if(t==null)return this.workerManager?.isInitialized()===!1&&this.workerManager.initialize().then(()=>this.rerender()),!1;this.applyThemeState(s,t.themeStyles,d,t.baseThemeType),t.headerElement!=null&&this.applyHeaderToDOM(t.headerElement,s),t.additionsContentAST!=null||t.deletionsContentAST!=null||t.unifiedContentAST!=null?this.applyHunksToDOM(e,t):this.pre!=null&&(this.pre.remove(),this.pre=void 0),this.renderSeparators(t.hunkData)}this.applyBuffers(e,f),this.injectUnsafeCSS(),this.renderAnnotations(),this.renderGutterUtility(),this.managersDirty=!0,r||this.flushManagers()}catch(e){if(v)throw e;console.error(e),e instanceof Error&&this.applyErrorToDOM(e,s)}return a||this.emitPostRender(),!0}emitPostRender(e=!1){let{fileContainer:t,options:{onPostRender:n}}=this;if(e){if(!this.mounted||(this.mounted=!1,t==null))return;this.options.onPostRender?.(t,this,`unmount`);return}if(t==null)return;let r=this.mounted?`update`:`mount`;this.mounted=!0,n?.(t,this,r)}removeRenderedCode(){this.resizeManager.cleanUp(),this.scrollSyncManager.cleanUp(),this.interactionManager.cleanUp(),this.bufferBefore?.remove(),this.bufferBefore=void 0,this.bufferAfter?.remove(),this.bufferAfter=void 0,this.codeUnified?.remove(),this.codeUnified=void 0,this.codeDeletions?.remove(),this.codeDeletions=void 0,this.codeAdditions?.remove(),this.codeAdditions=void 0,this.pre?.remove(),this.pre=void 0,this.appliedPreAttributes=void 0,this.lastRowCount=void 0}clearAuxiliaryNodes(){for(let{element:e}of this.separatorCache.values())e.remove();this.separatorCache.clear();for(let{element:e}of this.annotationCache.values())e.remove();this.annotationCache.clear(),this.gutterUtilityContent?.remove(),this.gutterUtilityContent=void 0}renderPlaceholder(e){if(this.fileContainer==null)return!1;if(this.emitPostRender(!0),this.cleanChildNodes(),this.placeHolder==null){let e=this.fileContainer.shadowRoot??this.fileContainer.attachShadow({mode:`open`});this.placeHolder=document.createElement(`div`),this.placeHolder.dataset.placeholder=``,e.appendChild(this.placeHolder)}return this.placeHolder.style.setProperty(`height`,`${e}px`),!0}primeHighlightCache(){let{fileDiff:e,workerManager:t}=this;if(e==null||t==null||Rx(e))return;let n=this.options.tokenizeMaxLength??1e5;Math.max(e.additionLines.length,e.deletionLines.length)>n||t.primeDiffHighlightCache(e)}cleanChildNodes(){this.resizeManager.cleanUp(),this.scrollSyncManager.cleanUp(),this.interactionManager.cleanUp(),this.clearAuxiliaryNodes(),this.bufferAfter?.remove(),this.bufferBefore?.remove(),this.codeAdditions?.remove(),this.codeDeletions?.remove(),this.codeUnified?.remove(),this.errorWrapper?.remove(),this.headerElement?.remove(),this.headerPrefix?.remove(),this.headerMetadata?.remove(),this.headerCustom?.remove(),this.pre?.remove(),this.spriteSVG?.remove(),this.themeCSSStyle?.remove(),this.unsafeCSSStyle?.remove(),this.bufferAfter=void 0,this.bufferBefore=void 0,this.codeAdditions=void 0,this.codeDeletions=void 0,this.codeUnified=void 0,this.errorWrapper=void 0,this.headerElement=void 0,this.headerPrefix=void 0,this.headerMetadata=void 0,this.headerCustom=void 0,this.pre=void 0,this.spriteSVG=void 0,this.themeCSSStyle=void 0,this.appliedThemeCSS=void 0,this.hasAdoptedThemeCSS=!1,this.unsafeCSSStyle=void 0,this.appliedUnsafeCSS=void 0,this.lastRenderedHeaderHTML=void 0,this.lastRowCount=void 0,this.mounted=!1}renderSeparators(e){let{hunkSeparators:t}=this.options;if(this.isContainerManaged||this.fileContainer==null||typeof t!=`function`){for(let{element:e}of this.separatorCache.values())e.remove();this.separatorCache.clear();return}let n=new Map(this.separatorCache);for(let r of e){let e=r.slotName,i=this.separatorCache.get(e);if(i==null||!LT(r,i.hunkData)){i?.element.remove();let n=document.createElement(`div`);n.style.display=`contents`,n.slot=r.slotName;let a=t(r,this);a!=null&&n.appendChild(a),this.fileContainer.appendChild(n),i={element:n,hunkData:r},this.separatorCache.set(e,i)}n.delete(e)}for(let[e,{element:t}]of n.entries())this.separatorCache.delete(e),t.remove()}renderAnnotations(){if(this.isContainerManaged||this.fileContainer==null){for(let{element:e}of this.annotationCache.values())e.remove();this.annotationCache.clear();return}let e=new Map(this.annotationCache),{renderAnnotation:t}=this.options;if(t!=null&&this.lineAnnotations.length>0)for(let[n,r]of this.lineAnnotations.entries()){let i=`${n}-${WC(r)}`,a=this.annotationCache.get(i);if(a==null||!IT(r,a.annotation)){a?.element.remove();let e=t(r);if(e==null)continue;a={element:Iw(WC(r)),annotation:r},a.element.appendChild(e),this.fileContainer.appendChild(a.element),this.annotationCache.set(i,a)}e.delete(i)}for(let[t,{element:n}]of e.entries())this.annotationCache.delete(t),n.remove()}renderGutterUtility(){let{renderGutterUtility:e}=this.options;if(this.fileContainer==null||e==null){this.gutterUtilityContent?.remove(),this.gutterUtilityContent=void 0;return}let t=e(this.interactionManager.getHoveredLine);if(t!=null&&this.gutterUtilityContent!=null)return;if(t==null){this.gutterUtilityContent?.remove(),this.gutterUtilityContent=void 0;return}let n=Lw();n.appendChild(t),this.fileContainer.appendChild(n),this.gutterUtilityContent=n}getOrCreateFileContainer(e,t){let{fileContainer:n}=this,r=e??n??document.createElement(`diffs-container`),i=n!==r;return i&&this.emitPostRender(!0),this.fileContainer=r,n!=null&&i&&(this.lastRenderedHeaderHTML=void 0,this.headerElement=void 0),t!=null&&this.fileContainer.parentNode!==t&&t.appendChild(this.fileContainer),i&&this.adoptReusableShellElements(this.fileContainer),this.ensureSpriteSVG(this.fileContainer),this.fileContainer}adoptReusableShellElements(e){let{shadowRoot:t}=e;if(t!=null)for(let e of t.children)e instanceof SVGElement?this.spriteSVG??=e:rw(e)&&e.hasAttribute(`data-theme-css`)?(this.themeCSSStyle??=e,this.hasAdoptedThemeCSS=!0):rw(e)&&e.hasAttribute(`data-unsafe-css`)&&(this.unsafeCSSStyle??=e,this.appliedUnsafeCSS??=this.options.unsafeCSS??void 0)}ensureSpriteSVG(e){let t=e.shadowRoot??e.attachShadow({mode:`open`});if(this.spriteSVG==null){let e=document.createElement(`div`);e.innerHTML=Mw;let t=e.firstChild;t instanceof SVGElement&&(this.spriteSVG=t)}this.spriteSVG!=null&&this.spriteSVG.parentNode!==t&&t.appendChild(this.spriteSVG)}getOrCreatePreNode(e){let t=e.shadowRoot??e.attachShadow({mode:`open`});return this.pre==null?(this.pre=document.createElement(`pre`),this.appliedPreAttributes=void 0,this.codeUnified=void 0,this.codeDeletions=void 0,this.codeAdditions=void 0,t.appendChild(this.pre)):this.pre.parentNode!==t&&(t.appendChild(this.pre),this.appliedPreAttributes=void 0),this.placeHolder?.remove(),this.placeHolder=void 0,this.pre}syncCodeNodesFromPre(e){this.codeUnified=void 0,this.codeDeletions=void 0,this.codeAdditions=void 0;for(let t of Array.from(e.children))t instanceof HTMLElement&&(t.hasAttribute(`data-unified`)?this.codeUnified=t:t.hasAttribute(`data-deletions`)?this.codeDeletions=t:t.hasAttribute(`data-additions`)&&(this.codeAdditions=t))}applyHeaderToDOM(e,t){this.cleanupErrorWrapper(),this.placeHolder?.remove(),this.placeHolder=void 0;let{fileDiff:n}=this,r=this.cachedHeaderHTML??Dh(e);if(this.cachedHeaderHTML=r,r!==this.lastRenderedHeaderHTML){let e=document.createElement(`div`);e.innerHTML=r;let n=e.firstElementChild;if(!(n instanceof HTMLElement))return;this.headerElement==null?t.shadowRoot?.prepend(n):t.shadowRoot?.replaceChild(n,this.headerElement),this.headerElement=n,this.lastRenderedHeaderHTML=r}if(this.isContainerManaged||n==null)return;let{renderCustomHeader:i,renderHeaderPrefix:a,renderHeaderMetadata:o}=this.options;if(i!=null){let e=i(n)??void 0;this.headerCustom=this.upsertHeaderSlotElement(t,this.headerCustom,wu,e),this.headerPrefix?.remove(),this.headerMetadata?.remove(),this.headerPrefix=void 0,this.headerMetadata=void 0;return}let s=a?.(n)??void 0,c=o?.(n)??void 0;this.headerPrefix=this.upsertHeaderSlotElement(t,this.headerPrefix,Su,s),this.headerMetadata=this.upsertHeaderSlotElement(t,this.headerMetadata,Cu,c),this.headerCustom?.remove(),this.headerCustom=void 0}clearHeaderSlots(){this.headerPrefix?.remove(),this.headerMetadata?.remove(),this.headerCustom?.remove(),this.headerPrefix=void 0,this.headerMetadata=void 0,this.headerCustom=void 0}upsertHeaderSlotElement(e,t,n,r){if(r==null){t?.remove();return}let i=t??this.createHeaderSlotElement(n);return t??e.appendChild(i),this.replaceHeaderSlotContent(i,r),i}replaceHeaderSlotContent(e,t){e.replaceChildren(),t instanceof Element?e.appendChild(t):e.innerText=`${t}`}createHeaderSlotElement(e){let t=document.createElement(`div`);return t.slot=e,t}injectUnsafeCSS(){let{unsafeCSS:e}=this.options,t=this.fileContainer?.shadowRoot;if(t!=null){if(e==null||e===``){this.unsafeCSSStyle!=null&&(this.unsafeCSSStyle.remove(),this.unsafeCSSStyle=void 0),this.appliedUnsafeCSS=void 0;return}this.unsafeCSSStyle?.parentNode===t&&this.appliedUnsafeCSS===e||(this.unsafeCSSStyle??=Rw(),this.unsafeCSSStyle.parentNode!==t&&t.appendChild(this.unsafeCSSStyle),this.unsafeCSSStyle.textContent=Gw(e),this.appliedUnsafeCSS=e)}}applyThemeState(e,t,n,r){let i=e.shadowRoot??e.attachShadow({mode:`open`}),a=r??n,o=this.options.theme??Tu,s=typeof o==`string`?o:{...o},c=Bw(i);if(this.themeCSSStyle?.parentNode===i&&this.appliedThemeCSS?.themeStyles===t&&this.appliedThemeCSS.themeType===a&&this.appliedThemeCSS.scrollbarGutter===c){this.appliedThemeCSS.theme=s;return}if(this.hasAdoptedThemeCSS&&this.themeCSSStyle?.parentNode===i){this.hasAdoptedThemeCSS=!1,this.appliedThemeCSS={theme:s,themeStyles:t,themeType:a,baseThemeType:r,scrollbarGutter:c};return}this.themeCSSStyle=Xw({shadowRoot:i,currentNode:this.themeCSSStyle,themeCSS:Kw(t,a,c)}),this.appliedThemeCSS=this.themeCSSStyle==null?void 0:{theme:s,themeStyles:t,themeType:a,baseThemeType:r,scrollbarGutter:c}}hydrateMeasuredScrollbar(){let e=this.fileContainer?.shadowRoot;e==null||this.themeCSSStyle==null||(this.themeCSSStyle.textContent=qw(this.themeCSSStyle.textContent??``,Bw(e)))}applyHunksToDOM(e,t){let{overflow:n=`scroll`}=this.options,r=(this.options.hunkSeparators??`line-info`)===`line-info`,i=n===`wrap`?t.rowCount:void 0;this.cleanupErrorWrapper(),this.applyPreNodeAttributes(e,t);let a=!1,o=[],s=this.hunksRenderer.renderCodeAST(`unified`,t),c=this.hunksRenderer.renderCodeAST(`deletions`,t),l=this.hunksRenderer.renderCodeAST(`additions`,t);s==null?c!=null||l!=null?(c==null?(this.codeDeletions?.remove(),this.codeDeletions=void 0):(a=this.codeDeletions==null||this.codeUnified!=null,this.codeUnified?.remove(),this.codeUnified=void 0,this.codeDeletions=Yw({code:this.codeDeletions,columnType:`deletions`,rowSpan:i,containerSize:r}),this.codeDeletions.innerHTML=this.hunksRenderer.renderPartialHTML(c),o.push(this.codeDeletions)),l==null?(this.codeAdditions?.remove(),this.codeAdditions=void 0):(a=a||this.codeAdditions==null||this.codeUnified!=null,this.codeUnified?.remove(),this.codeUnified=void 0,this.codeAdditions=Yw({code:this.codeAdditions,columnType:`additions`,rowSpan:i,containerSize:r}),this.codeAdditions.innerHTML=this.hunksRenderer.renderPartialHTML(l),o.push(this.codeAdditions))):(this.codeUnified?.remove(),this.codeUnified=void 0,this.codeDeletions?.remove(),this.codeDeletions=void 0,this.codeAdditions?.remove(),this.codeAdditions=void 0):(a=this.codeUnified==null||this.codeAdditions!=null||this.codeDeletions!=null,this.codeDeletions?.remove(),this.codeDeletions=void 0,this.codeAdditions?.remove(),this.codeAdditions=void 0,this.codeUnified=Yw({code:this.codeUnified,columnType:`unified`,rowSpan:i,containerSize:r}),this.codeUnified.innerHTML=this.hunksRenderer.renderPartialHTML(s),o.push(this.codeUnified)),o.length===0?e.textContent=``:a&&e.replaceChildren(...o),this.lastRowCount=t.rowCount}applyPartialRender({previousRenderRange:e,renderRange:t}){let{pre:n,codeUnified:r,codeAdditions:i,codeDeletions:a,options:{diffStyle:o=`split`}}=this;if(n==null||e==null||t==null||!Number.isFinite(e.totalLines)||!Number.isFinite(t.totalLines)||this.lastRowCount==null)return!1;let s=this.getCodeColumns(o,r,a,i);if(s==null)return!1;let c=e.startingLine,l=t.startingLine,u=c+e.totalLines,d=l+t.totalLines,f=Math.max(c,l),p=Math.min(u,d);if(p<=f)return!1;let m=Math.max(0,f-c),h=Math.max(0,u-p),g=this.trimColumns({columns:s,trimStart:m,trimEnd:h,previousStart:c,overlapStart:f,overlapEnd:p,diffStyle:o});if(g<0)throw Error(`applyPartialRender: failed to trim to overlap`);if(this.lastRowCount<g)throw Error(`applyPartialRender: trimmed beyond DOM row count`);let _=this.lastRowCount-g,v=(e,t)=>{if(!(t<=0||this.fileDiff==null))return this.hunksRenderer.renderDiff(this.fileDiff,{startingLine:e,totalLines:t,bufferBefore:0,bufferAfter:0})},y=v(l,Math.max(f-l,0));if(y==null&&l<f)return!1;let b=v(p,Math.max(d-p,0));if(b==null&&d>p)return!1;let x=(e,t)=>{if(e!=null){if(o===`unified`&&!Array.isArray(s))this.insertPartialHTML(o,s,e,t);else if(o===`split`&&Array.isArray(s))this.insertPartialHTML(o,s,e,t);else throw Error(`FileDiff.applyPartialRender.applyChunk: invalid chunk application`);_+=e.rowCount}};return this.cleanupErrorWrapper(),x(y,`afterbegin`),x(b,`beforeend`),this.lastRowCount!==_&&(this.applyRowSpan(o,s,_),this.lastRowCount=_),!0}insertPartialHTML(e,t,n,r){if(e===`unified`&&!Array.isArray(t)){let e=this.hunksRenderer.renderCodeAST(`unified`,n);this.renderPartialColumn(t,e,r)}else if(e===`split`&&Array.isArray(t)){let e=this.hunksRenderer.renderCodeAST(`deletions`,n),i=this.hunksRenderer.renderCodeAST(`additions`,n);this.renderPartialColumn(t[0],e,r),this.renderPartialColumn(t[1],i,r)}else throw Error(`FileDiff.insertPartialHTML: Invalid argument composition`)}renderPartialColumn(e,t,n){if(e==null||t==null)return;let r=GT(t[0]),i=GT(t[1]);if(r==null||i==null)throw Error(`FileDiff.insertPartialHTML: Unexpected AST structure`);let a=i.at(0);n===`beforeend`&&a?.type===`element`&&typeof a.properties[`data-buffer-size`]==`number`&&this.mergeBuffersIfNecessary(a.properties[`data-buffer-size`],e.content.children[e.content.children.length-1],e.gutter.children[e.gutter.children.length-1],r,i,!0);let o=i.at(-1);n===`afterbegin`&&o?.type===`element`&&typeof o.properties[`data-buffer-size`]==`number`&&this.mergeBuffersIfNecessary(o.properties[`data-buffer-size`],e.content.children[0],e.gutter.children[0],r,i,!1),e.gutter.insertAdjacentHTML(n,this.hunksRenderer.renderPartialHTML(r)),e.content.insertAdjacentHTML(n,this.hunksRenderer.renderPartialHTML(i))}mergeBuffersIfNecessary(e,t,n,r,i,a){if(!(t instanceof HTMLElement)||!(n instanceof HTMLElement))return;let o=this.getBufferSize(t.dataset);o!=null&&(a?(r.shift(),i.shift()):(r.pop(),i.pop()),this.updateBufferSize(t,o+e),this.updateBufferSize(n,o+e))}applyRowSpan(e,t,n){let r=e=>{e!=null&&(e.gutter.style.setProperty(`grid-row`,`span ${n}`),e.content.style.setProperty(`grid-row`,`span ${n}`))};if(e===`unified`&&!Array.isArray(t))r(t);else if(e===`split`&&Array.isArray(t))r(t[0]),r(t[1]);else throw Error(`dun fuuuuked up`)}trimColumnRows(e,t,n){let r=0,i=0,a=0,o=!1,s=n>=0;if(e==null)return 0;let c=Array.from(e.content.children),l=Array.from(e.gutter.children);if(c.length!==l.length)throw Error(`FileDiff.trimColumnRows: columns do not match`);for(;a<c.length&&!(t<=0&&!s&&!o);){let e=l[a],u=c[a];if(a++,!(e instanceof HTMLElement)||!(u instanceof HTMLElement))throw console.error({gutterElement:e,contentElement:u}),Error(`FileDiff.trimColumnRows: invalid row elements`);if(o&&(o=!1,e.dataset.gutterBuffer===`annotation`&&`lineAnnotation`in u.dataset||e.dataset.gutterBuffer===`metadata`&&`noNewline`in u.dataset)){e.remove(),u.remove(),i++;continue}if(`lineIndex`in e.dataset&&`lineIndex`in u.dataset){(t>0||s&&r>=n)&&(e.remove(),u.remove(),t>0&&(t--,t===0&&(o=!0)),i++),r++;continue}if(`separator`in e.dataset&&`separator`in u.dataset){(t>0||s&&r>=n)&&(e.remove(),u.remove(),i++);continue}if(e.dataset.gutterBuffer===`annotation`&&`lineAnnotation`in u.dataset){(t>0||s&&r>=n)&&(e.remove(),u.remove(),i++);continue}if(e.dataset.gutterBuffer===`metadata`&&`noNewline`in u.dataset){(t>0||s&&r>=n)&&(e.remove(),u.remove(),i++);continue}if(e.dataset.gutterBuffer===`buffer`&&`contentBuffer`in u.dataset){let a=this.getBufferSize(u.dataset);if(a==null)throw Error(`FileDiff.trimColumnRows: invalid element`);if(t>0){let n=Math.min(t,a),r=a-n;r>0?(this.updateBufferSize(e,r),this.updateBufferSize(u,r),i+=n):(e.remove(),u.remove(),i+=a),t-=n,t===0&&r===0&&(o=!0)}else if(s){let t=r,o=r+a-1;if(n<=t)e.remove(),u.remove(),i+=a;else if(n<=o){let t=o-n+1,r=a-t;this.updateBufferSize(e,r),this.updateBufferSize(u,r),i+=t}}r+=a;continue}throw console.error({gutterElement:e,contentElement:u}),Error(`FileDiff.trimColumnRows: unknown row elements`)}return i}trimColumns({columns:e,diffStyle:t,overlapEnd:n,overlapStart:r,previousStart:i,trimEnd:a,trimStart:o}){let s=Math.max(0,r-i),c=n-i;if(c<0)throw Error(`FileDiff.trimColumns: overlap ends before previous`);let l=o>0,u=a>0;if(!l&&!u)return 0;let d=l?s:0,f=u?c:-1;if(t===`unified`&&!Array.isArray(e))return this.trimColumnRows(e,d,f);if(t===`split`&&Array.isArray(e)){let t=this.trimColumnRows(e[0],d,f),n=this.trimColumnRows(e[1],d,f);if(e[0]!=null&&e[1]!=null&&t!==n)throw Error(`FileDiff.trimColumns: split columns out of sync`);return e[0]==null?n:t}else throw console.error({diffStyle:t,columns:e}),Error(`FileDiff.trimColumns: Invalid columns for diffType`)}getBufferSize(e){let t=Number.parseInt(e?.bufferSize??``,10);return Number.isNaN(t)?void 0:t}updateBufferSize(e,t){e.dataset.bufferSize=`${t}`,e.style.setProperty(`grid-row`,`span ${t}`),e.style.setProperty(`min-height`,`calc(${t} * 1lh)`)}getCodeColumns(e,t,n,r){function i(e){if(e==null)return;let t=e.children[0],n=e.children[1];if(!(!(t instanceof HTMLElement)||!(n instanceof HTMLElement)||t.dataset.gutter==null||n.dataset.content==null))return{gutter:t,content:n}}if(e===`unified`)return i(t);{let e=i(n),t=i(r);return e!=null||t!=null?[e,t]:void 0}}applyBuffers(e,t){if(t==null||this.shouldDisableVirtualizationBuffers()){this.bufferBefore!=null&&(this.bufferBefore.remove(),this.bufferBefore=void 0),this.bufferAfter!=null&&(this.bufferAfter.remove(),this.bufferAfter=void 0);return}t.bufferBefore>0?(this.bufferBefore??(this.bufferBefore=document.createElement(`div`),this.bufferBefore.dataset.virtualizerBuffer=`before`,e.before(this.bufferBefore)),this.bufferBefore.style.setProperty(`height`,`${t.bufferBefore}px`),this.bufferBefore.style.setProperty(`contain`,`strict`)):this.bufferBefore!=null&&(this.bufferBefore.remove(),this.bufferBefore=void 0),t.bufferAfter>0?(this.bufferAfter??(this.bufferAfter=document.createElement(`div`),this.bufferAfter.dataset.virtualizerBuffer=`after`,e.after(this.bufferAfter)),this.bufferAfter.style.setProperty(`height`,`${t.bufferAfter}px`),this.bufferAfter.style.setProperty(`contain`,`strict`)):this.bufferAfter!=null&&(this.bufferAfter.remove(),this.bufferAfter=void 0)}shouldDisableVirtualizationBuffers(){return this.options.disableVirtualizationBuffers??!1}applyPreNodeAttributes(e,{additionsContentAST:t,deletionsContentAST:n,totalLines:r},i){let{diffIndicators:a=`bars`,disableBackground:o=!1,disableLineNumbers:s=!1,overflow:c=`scroll`,diffStyle:l=`split`}=this.options,u={type:`diff`,diffIndicators:a,disableBackground:o,disableLineNumbers:s,overflow:c,split:l===`unified`?!1:t!=null&&n!=null,totalLines:r,customProperties:i};Nw(u,this.appliedPreAttributes)||($w(e,u),this.appliedPreAttributes=u)}applyErrorToDOM(e,t){this.cleanupErrorWrapper(),this.pre?.remove(),this.pre=void 0,this.appliedPreAttributes=void 0;let n=t.shadowRoot??t.attachShadow({mode:`open`});this.errorWrapper??=document.createElement(`div`),this.errorWrapper.dataset.errorWrapper=``,this.errorWrapper.textContent=``,n.appendChild(this.errorWrapper);let r=document.createElement(`div`);r.dataset.errorMessage=``,r.innerText=e.message,this.errorWrapper.appendChild(r);let i=document.createElement(`pre`);i.dataset.errorStack=``,i.innerText=e.stack??`No Error Stack`,this.errorWrapper.appendChild(i)}cleanupErrorWrapper(){this.errorWrapper?.remove(),this.errorWrapper=void 0}};function VT({fileDiff:e,oldFile:t,newFile:n}){return e!=null&&e.hunks.length>0||t!=null||n!=null}function HT({fileDiff:e,oldFile:t,newFile:n}){return e!=null||t!=null||n!=null}function UT(e,t,n=!1){return!n&&e==null&&t}function WT(e,t,n=!1){return e==null&&t&&!n}function GT(e){if(!(e==null||e.type!==`element`))return e.children??[]}function KT({fileDiff:e,metrics:t,disableFileHeader:n,hunkSeparators:r,expandUnchanged:i,expandedHunks:a,collapsedContextThreshold:o}){let s=Bx(t,n),c=s,l=i?!0:a,u=e.hunks.length-1;for(let n=0;n<e.hunks.length;n++){let i=e.hunks[n];if(i==null)throw Error(`computeEstimatedDiffHeights: invalid hunk index`);let a=Wx({isPartial:e.isPartial,rangeSize:i.collapsedBefore,expandedHunks:l,hunkIndex:n,collapsedContextThreshold:o}),d=(a.fromStart+a.fromEnd)*t.lineHeight;if(s+=d,c+=d,a.collapsedLines>0){let e=Zx({type:r,metrics:t,hunkIndex:n,hunkSpecs:i.hunkSpecs})?.totalHeight??0;s+=e,c+=e}s+=i.splitLineCount*t.lineHeight,c+=i.unifiedLineCount*t.lineHeight;let f=qT(i);s+=f.split*t.lineHeight,c+=f.unified*t.lineHeight;let p=n===u?Kx({fileDiff:e,hunkIndex:n,expandedHunks:l,collapsedContextThreshold:o,errorPrefix:`computeEstimatedDiffHeights`}):void 0;if(p!=null){let e=(p.fromStart+p.fromEnd)*t.lineHeight;if(s+=e,c+=e,p.collapsedLines>0){let e=Qx({type:r,metrics:t})?.totalHeight??0;s+=e,c+=e}}}if(e.hunks.length>0){let e=Hx(t);s+=e,c+=e}return{splitHeight:s,unifiedHeight:c}}function qT(e){if(!e.noEOFCRAdditions&&!e.noEOFCRDeletions)return{split:0,unified:0};let t=e.hunkContent.at(-1);if(t==null)return{split:0,unified:0};if(t.type===`context`){let e=+(t.lines>0);return{split:e,unified:e}}return JT(e,t)}function JT(e,t){let n=(t.deletions>0&&e.noEOFCRDeletions?1:0)+(t.additions>0&&e.noEOFCRAdditions?1:0),r=t.deletions>0&&e.noEOFCRDeletions,i=t.additions>0&&e.noEOFCRAdditions;return{split:r||i?1:0,unified:n}}var YT=5e3,XT=-1,ZT=class extends BT{__id=`little-virtualized-file-diff:${++XT}`;top;height=0;metrics;cache={heightDeltas:new Map,measuredHeightDeltaTotal:0,estimatedSplitHeight:void 0,estimatedUnifiedHeight:void 0,checkpoints:[],totalLines:0,fileAnnotationHeight:0};isVisible=!1;isSetup=!1;virtualizer;layoutDirty=!0;forceRenderOverride;currentCollapsed;constructor(e,t,n,r,i=!1){super(e,r,i),this.virtualizer=t,this.metrics=zx(n)}setMetrics(e,t=!1){let n=zx(e);!t&&ew(this.metrics,n)||(this.metrics=n,this.resetLayoutCache({includeEstimatedHeights:!0}))}setLineAnnotations(e){this.syncLineAnnotations(e)&&this.resetLayoutCache({includeEstimatedHeights:!1})}syncLineAnnotations(e){return e==null||e===this.lineAnnotations||e.length===0&&this.lineAnnotations.length===0?!1:(super.setLineAnnotations(e),!0)}setFileAnnotationHeight(e){let t=this.cache.fileAnnotationHeight;return e===t?!1:(this.cache.fileAnnotationHeight=e,this.cache.measuredHeightDeltaTotal+=e-t,!0)}hasFileAnnotations(e=this.fileDiff){return e==null||!rT(this.lineAnnotations)?!1:this.lineAnnotations.some(t=>t.lineNumber===0?e.type===`new`?t.side===`additions`:e.type===`deleted`?t.side===`deletions`:!0:!1)}getLineHeight(e,t=!1){return this.getEstimatedLineHeight(t)+(this.cache.heightDeltas.get(e)??0)}getEstimatedLineHeight(e=!1){let t=e?2:1;return this.metrics.lineHeight*t}setOptions(e){if(this.isAdvancedMode())throw Error(`VirtualizedFileDiff.setOptions cannot be used inside CodeView. Update CodeView options instead.`);if(e==null)return;let{options:t}=this,n=!tw(t,e),r=n&&aE(t,e);super.setOptions(e),r&&this.resetLayoutCache({forceSimpleRecompute:!0,includeEstimatedHeights:oE(t,e)}),n&&(this.forceRenderOverride=!0),n&&this.isSimpleMode()&&this.virtualizer.instanceChanged(this,r)}setThemeType(e){if(this.isAdvancedMode())throw Error(`VirtualizedFileDiff.setThemeType cannot be used inside CodeView. Update CodeView options instead.`);super.setThemeType(e)}resetLayoutCache({forceSimpleRecompute:e=!1,includeEstimatedHeights:t=!1}={}){this.layoutDirty=!0,this.cache.fileAnnotationHeight=0,this.cache.heightDeltas.size>0&&this.cache.heightDeltas.clear(),this.cache.measuredHeightDeltaTotal!==0&&(this.cache.measuredHeightDeltaTotal=0),this.cache.checkpoints.length>0&&(this.cache.checkpoints.length=0),this.cache.totalLines!==0&&(this.cache.totalLines=0),t&&(this.cache.estimatedSplitHeight=void 0,this.cache.estimatedUnifiedHeight=void 0),this.renderRange!=null&&(this.renderRange=void 0),e&&this.isSimpleMode()&&this.computeApproximateSize()}reconcileHeights(){let e=!1,{overflow:t=`scroll`}=this.options;if(this.fileContainer==null||this.fileDiff==null)return this.height!==0&&(e=!0),this.height=0,e;if(this.top=this.getVirtualizedTop(),t===`scroll`&&this.lineAnnotations.length===0&&!this.isResizeDebuggingEnabled())return e;let n=this.getDiffStyle(),r=n===`split`?[this.codeDeletions,this.codeAdditions]:[this.codeUnified],i=this.hasFileAnnotations(this.fileDiff);if(this.renderRange!=null&&i&&aT(this.renderRange)){let t=QT(r)??0;this.setFileAnnotationHeight(t)&&(e=!0)}else!i&&this.setFileAnnotationHeight(0)&&(e=!0);for(let t of r){if(t==null)continue;let r=t.children[1];if(r instanceof HTMLElement)for(let t of r.children){if(!(t instanceof HTMLElement))continue;let r=t.dataset.lineIndex;if(r==null)continue;let i=cE(r,n),a=t.getBoundingClientRect().height,o=!1;t.nextElementSibling instanceof HTMLElement&&(`lineAnnotation`in t.nextElementSibling.dataset||`noNewline`in t.nextElementSibling.dataset)&&(`noNewline`in t.nextElementSibling.dataset&&(o=!0),a+=t.nextElementSibling.getBoundingClientRect().height);let s=this.getEstimatedLineHeight(o),c=this.cache.heightDeltas.get(i)??0,l=a-s;l!==c&&(e=!0,this.cache.measuredHeightDeltaTotal+=l-c,l===0?this.cache.heightDeltas.delete(i):this.cache.heightDeltas.set(i,l))}}return(e||this.isResizeDebuggingEnabled())&&this.computeApproximateSize(!0),e}onRender=e=>this.fileContainer==null?!1:(e&&(this.top=this.getVirtualizedTop()),this.render());prepareCodeViewItem(e,t,n,r){let i=!Ix(this.fileDiff,e),a=this.syncLineAnnotations(r),o=n?.resetDiffLayoutCache===!0||i||a,s=i||n?.resetDiffLayoutCache===!0&&n.includeEstimatedDiffHeights;n?.metrics!=null&&(this.metrics=zx(n.metrics),o=!0,s=!0);let{collapsed:c=!1}=this.options;return this.currentCollapsed!==c&&(this.currentCollapsed=c,o=!0),o&&this.resetLayoutCache({includeEstimatedHeights:s}),this.fileDiff=e,this.top=t,this.computeApproximateSize(),this.height}getLinePosition(e,t=`additions`){if(this.fileDiff==null||e<1)return;let n=this.getLineIndex(e,t);if(n==null)return;let{disableFileHeader:r=!1,expandUnchanged:i=!1,collapsed:a=!1,collapsedContextThreshold:o=1}=this.options,s=this.getDiffStyle(),c=this.getHunkSeparatorType(),l=s===`split`?n[1]:n[0];this.approximateLayoutCheckpoints();let u=Bx(this.metrics,r),d=this.getLayoutCheckpointBeforeLineIndex(l),f=d?.top??u+this.cache.fileAnnotationHeight;if(a)return{top:u,height:0};let p;return $x({diff:this.fileDiff,diffStyle:s,startingLine:d?.renderedLineIndex??0,expandedHunks:i?!0:this.hunksRenderer.getExpandedHunksMap(),collapsedContextThreshold:o,callback:({hunkIndex:e,hunk:t,collapsedBefore:n,collapsedAfter:r,deletionLine:i,additionLine:a})=>{let o=s===`split`?a?.splitLineIndex??i?.splitLineIndex:a?.unifiedLineIndex??i?.unifiedLineIndex;if(o==null)throw Error(`VirtualizedFileDiff.getLinePosition: missing line index data`);if(n>0){let r=Zx({type:c,metrics:this.metrics,hunkIndex:e,hunkSpecs:t?.hunkSpecs});if(r!=null){if(f+=r.gapBefore,l>=o-n&&l<o)return p={top:f,height:r.height},!0;f+=r.height+r.gapAfter}}let u=this.getLineHeight(o,(a?.noEOFCR??!1)||(i?.noEOFCR??!1));if(o===l)return p={top:f,height:u},!0;if(f+=u,r>0){let e=Qx({type:c,metrics:this.metrics});if(e!=null){if(l>o&&l<=o+r)return p={top:f+e.gapBefore,height:e.height},!0;f+=e.totalHeight}}return!1}}),p}getNumericScrollAnchor(e){if(this.fileDiff==null)return;let{disableFileHeader:t=!1,expandUnchanged:n=!1,collapsed:r=!1,collapsedContextThreshold:i=1}=this.options;if(r)return;let a=this.getDiffStyle(),o=this.getHunkSeparatorType();this.approximateLayoutCheckpoints();let s=this.getLayoutCheckpointBeforeTop(e),c=s?.top??Bx(this.metrics,t)+this.cache.fileAnnotationHeight,l;return $x({diff:this.fileDiff,diffStyle:a,startingLine:s?.renderedLineIndex??0,expandedHunks:n?!0:this.hunksRenderer.getExpandedHunksMap(),collapsedContextThreshold:i,callback:({hunkIndex:t,hunk:n,collapsedBefore:r,collapsedAfter:i,deletionLine:s,additionLine:u})=>{let d=a===`split`?u?.splitLineIndex??s?.splitLineIndex:u?.unifiedLineIndex??s?.unifiedLineIndex;if(d==null)throw Error(`VirtualizedFileDiff.getNumericScrollAnchor: missing line index data`);if(r>0){let e=Zx({type:o,metrics:this.metrics,hunkIndex:t,hunkSpecs:n?.hunkSpecs});e!=null&&(c+=e.totalHeight)}if(c>=e&&(s==null?u!=null&&(l={lineNumber:u.lineNumber,side:`additions`,top:c}):l={lineNumber:s.lineNumber,side:`deletions`,top:c},l!=null))return!0;let f=this.getLineHeight(d,(u?.noEOFCR??!1)||(s?.noEOFCR??!1));if(c+=f,i>0){let e=Qx({type:o,metrics:this.metrics});e!=null&&(c+=e.totalHeight)}return!1}}),l}getVirtualizedHeight(){return this.height}getAdvancedStickySpecs(e){if(this.top==null||this.fileDiff==null)return;if(this.options.collapsed===!0)return{topOffset:this.top,height:this.height};let t=e==null?this.renderRange:this.computeRenderRangeFromWindow(this.fileDiff,this.top,e);if(t==null)return;let{bufferBefore:n,bufferAfter:r,totalLines:i}=t,a=0;if(i===0){let t=e??this.virtualizer.getWindowSpecs();this.top<t.top&&(a=r)}return{topOffset:this.top+n+a,height:this.height-(n+r)}}cleanUp(e=!1){this.fileContainer!=null&&this.isSimpleMode()&&this.getSimpleVirtualizer()?.disconnect(this.fileContainer),e||this.resetLayoutCache({includeEstimatedHeights:!0}),this.isSetup=!1,super.cleanUp(e)}expandHunk=(e,t,n)=>{this.hunksRenderer.expandHunk(e,t,n),this.forceRenderOverride=!0,this.resetLayoutCache({includeEstimatedHeights:!0}),this.isSimpleMode()&&this.computeApproximateSize(),this.virtualizer.instanceChanged(this,!0)};setVisibility(e){this.isAdvancedMode()||this.fileContainer==null||(this.renderRange=void 0,e&&!this.isVisible?(this.top=this.getVirtualizedTop(),this.isVisible=!0):!e&&this.isVisible&&(this.isVisible=!1,this.rerender()))}rerender(){!this.enabled||this.fileDiff==null&&this.additionFile==null&&this.deletionFile==null||(this.forceRenderOverride=!0,this.virtualizer.instanceChanged(this,!1))}computeApproximateSize(e=!1){let t=this.isResizeDebuggingEnabled();if(!e&&!this.layoutDirty&&!t)return;let n=this.height===0;if(this.height=0,this.cache.checkpoints=[],this.cache.totalLines=0,this.fileDiff==null){this.layoutDirty=!1;return}let{disableFileHeader:r=!1,collapsed:i=!1}=this.options,a=Bx(this.metrics,r);if(this.height+=a,i){this.layoutDirty=!1;return}this.height=this.getActiveEstimatedHeight()+this.cache.measuredHeightDeltaTotal,t&&!n&&this.validateComputedHeight(),this.layoutDirty=!1}getActiveEstimatedHeight(){this.ensureEstimatedDiffHeights();let e=this.getDiffStyle()===`split`?this.cache.estimatedSplitHeight:this.cache.estimatedUnifiedHeight;if(e==null)throw Error(`VirtualizedFileDiff.getActiveEstimatedHeight: missing estimated height`);return e}ensureEstimatedDiffHeights(){if(this.fileDiff==null){this.cache.estimatedSplitHeight=void 0,this.cache.estimatedUnifiedHeight=void 0;return}if(this.cache.estimatedSplitHeight!=null&&this.cache.estimatedUnifiedHeight!=null)return;let{disableFileHeader:e=!1,expandUnchanged:t=!1,collapsedContextThreshold:n=1}=this.options,{splitHeight:r,unifiedHeight:i}=KT({fileDiff:this.fileDiff,metrics:this.metrics,disableFileHeader:e,hunkSeparators:this.getHunkSeparatorType(),expandUnchanged:t,expandedHunks:this.hunksRenderer.getExpandedHunksMap(),collapsedContextThreshold:n});this.cache.estimatedSplitHeight=r,this.cache.estimatedUnifiedHeight=i}validateComputedHeight(){if(this.fileContainer==null||this.fileDiff==null)return;let e=this.fileContainer.getBoundingClientRect();e.height===this.height?console.log(`VirtualizedFileDiff.computeApproximateSize: computed height IS CORRECT`):console.log(`VirtualizedFileDiff.computeApproximateSize: computed height doesnt match`,{name:this.fileDiff.name,elementHeight:e.height,computedHeight:this.height})}render({fileContainer:e,oldFile:t,newFile:n,fileDiff:r,forceRender:i=!1,lineAnnotations:a,...o}={}){let{forceRenderOverride:s,isSetup:c}=this;this.forceRenderOverride=void 0;let l=this.syncLineAnnotations(a);if(l&&this.resetLayoutCache({includeEstimatedHeights:!1}),this.fileDiff??=r??(t!=null&&n!=null?eT(t,n,this.options.parseDiffOptions):void 0),e=this.getOrCreateFileContainer(e),this.fileDiff==null)return console.error(`VirtualizedFileDiff.render: attempting to virtually render when we dont have the correct data`),!1;if(c)this.top??=this.getVirtualizedTop();else{this.computeApproximateSize();let t=this.getSimpleVirtualizer();if(this.top??=this.getVirtualizedTop(),this.isAdvancedMode())this.isVisible=!0;else{if(t==null)throw Error(`VirtualizedFileDiff.render: simple virtualizer is not available`);t.connect(e,this),this.isVisible=t.isInstanceVisible(this.top??0,this.height)}this.isSetup=!0}if(!this.isVisible&&this.isSimpleMode())return this.renderPlaceholder(this.height);let u=this.virtualizer.getWindowSpecs(),d=this.top??0,f=this.computeRenderRangeFromWindow(this.fileDiff,d,u);return super.render({fileDiff:this.fileDiff,fileContainer:e,renderRange:f,oldFile:t,newFile:n,lineAnnotations:a,forceRender:(s??i)||l,...o})}syncVirtualizedTop(){this.top=this.getVirtualizedTop()}shouldDisableVirtualizationBuffers(){return this.isAdvancedMode()||super.shouldDisableVirtualizationBuffers()}isSimpleMode(){return this.virtualizer.type===`simple`}isAdvancedMode(){return this.virtualizer.type===`advanced`}getVirtualizedTop(){return this.virtualizer.type===`advanced`?this.virtualizer.getLocalTopForInstance(this):this.fileContainer==null?0:this.virtualizer.getOffsetInScrollContainer(this.fileContainer)}getSimpleVirtualizer(){return this.virtualizer.type===`simple`?this.virtualizer:void 0}isResizeDebuggingEnabled(){return this.getSimpleVirtualizer()?.config.resizeDebugging??!1}getDiffStyle(){return this.options.diffStyle??`split`}getHunkSeparatorType(){return sE(this.options.hunkSeparators)}approximateLayoutCheckpoints(){if(this.cache.checkpoints.length>0||this.fileDiff==null||this.fileDiff.hunks.length===0||this.options.collapsed===!0)return;let{disableFileHeader:e=!1,expandUnchanged:t=!1,collapsedContextThreshold:n=1}=this.options,r=this.fileDiff.hunks.length-1,i=this.getDiffStyle(),a=this.getHunkSeparatorType(),o=t?!0:this.hunksRenderer.getExpandedHunksMap(),s=$T(this.cache.heightDeltas),c=Bx(this.metrics,e)+this.cache.fileAnnotationHeight,l=0,u=({rowCount:e,startLineIndex:t,preSeparatorHeight:n=0,postSeparatorHeight:r=0,metadataOffsets:i=[]})=>{if(e<=0)return;let a=l,o=l+e,u=nE(a);for(;u<o;){let e=u-a,r=c+(e>0?n:0)+e*this.metrics.lineHeight+rE(i,e)*this.metrics.lineHeight+eE(s,t,t+e);this.cache.checkpoints.push({renderedLineIndex:u,lineIndex:t+e,top:r}),u+=YT}c+=n+e*this.metrics.lineHeight+i.length*this.metrics.lineHeight+eE(s,t,t+e)+r,l=o};for(let e=0;e<this.fileDiff.hunks.length;e++){let t=this.fileDiff.hunks[e];if(t==null)throw Error(`VirtualizedFileDiff.approximateLayoutCheckpoints: invalid hunk index`);let s=Wx({isPartial:this.fileDiff.isPartial,rangeSize:t.collapsedBefore,expandedHunks:o,hunkIndex:e,collapsedContextThreshold:n}),c=s.collapsedLines>0?Zx({type:a,metrics:this.metrics,hunkIndex:e,hunkSpecs:t.hunkSpecs})?.totalHeight??0:0;u({rowCount:s.fromStart,startLineIndex:(i===`split`?t.splitLineStart:t.unifiedLineStart)-s.rangeSize});let l=c;u({rowCount:s.fromEnd,startLineIndex:(i===`split`?t.splitLineStart:t.unifiedLineStart)-s.fromEnd,preSeparatorHeight:l}),s.fromEnd>0&&(l=0);let d=e===r?Kx({fileDiff:this.fileDiff,hunkIndex:e,expandedHunks:o,collapsedContextThreshold:n,errorPrefix:`VirtualizedFileDiff`}):void 0,f=d!=null&&d.collapsedLines>0?Qx({type:a,metrics:this.metrics})?.totalHeight??0:0,p=d==null?0:d.fromStart+d.fromEnd,m=i===`split`?t.splitLineCount:t.unifiedLineCount,h=i===`split`?t.splitLineStart:t.unifiedLineStart;u({rowCount:m,startLineIndex:h,preSeparatorHeight:l,postSeparatorHeight:p===0?f:0,metadataOffsets:iE({diffStyle:i,hunk:t,rowCount:m})}),d!=null&&p>0&&u({rowCount:p,startLineIndex:h+m,postSeparatorHeight:f})}this.cache.totalLines=l}getLayoutCheckpointBeforeLineIndex(e){if(e<=0||this.cache.checkpoints.length===0)return;let t=0,n=this.cache.checkpoints.length-1,r;for(;t<=n;){let i=t+n>>1,a=this.cache.checkpoints[i];if(a==null)throw Error(`VirtualizedFileDiff: invalid checkpoint index`);a.lineIndex<=e?(r=a,t=i+1):n=i-1}return r}getLayoutCheckpointBeforeTop(e,t){let n=0,r=this.cache.checkpoints.length-1,i=-1;for(;n<=r;){let t=n+r>>1,a=this.cache.checkpoints[t];if(a==null)throw Error(`VirtualizedFileDiff: invalid checkpoint index`);a.top<=e?(i=t,n=t+1):r=t-1}if(t==null)return i>=0?this.cache.checkpoints[i]:void 0;for(let e=i;e>=0;e--){let n=this.cache.checkpoints[e];if(n==null)throw Error(`VirtualizedFileDiff: invalid checkpoint index`);if(n.renderedLineIndex%t===0)return n}}getExpandedLineCount(e,t){let n=0;if(e.isPartial){for(let r of e.hunks)n+=t===`split`?r.splitLineCount:r.unifiedLineCount;return n}let{expandUnchanged:r=!1,collapsedContextThreshold:i=1}=this.options,a=r?!0:this.hunksRenderer.getExpandedHunksMap();for(let[r,o]of e.hunks.entries()){let s=t===`split`?o.splitLineCount:o.unifiedLineCount;n+=s;let c=Math.max(o.collapsedBefore,0),{fromStart:l,fromEnd:u,renderAll:d}=Wx({isPartial:e.isPartial,rangeSize:c,expandedHunks:a,hunkIndex:r,collapsedContextThreshold:i});c>0&&(n+=d?c:l+u)}let o=Kx({fileDiff:e,hunkIndex:e.hunks.length-1,expandedHunks:a,collapsedContextThreshold:i,errorPrefix:`VirtualizedFileDiff`});return o!=null&&(n+=o.fromStart+o.fromEnd),n}computeRenderRangeFromWindow(e,t,{top:n,bottom:r}){let{disableFileHeader:i=!1,expandUnchanged:a=!1,collapsedContextThreshold:o=1}=this.options,{hunkLineCount:s,lineHeight:c}=this.metrics,l=this.getDiffStyle(),u=this.getHunkSeparatorType(),d=this.height,f=this.cache.totalLines>0?this.cache.totalLines:this.getExpandedLineCount(e,l),p=Bx(this.metrics,i),m=e.hunks.length>0?Hx(this.metrics):0,{fileAnnotationHeight:h}=this.cache,g=p+h,_=Math.max(0,d-p-h-m),v=this.hasFileAnnotations(e),y=t+p,b=h>0&&v&&y<r&&y+h>n;if(t<n-d||t>r)return{startingLine:0,totalLines:0,bufferBefore:0,bufferAfter:d-p-m};if(f<=s||e.hunks.length===0)return{startingLine:0,totalLines:s,bufferBefore:0,bufferAfter:0};this.approximateLayoutCheckpoints(),f=this.cache.totalLines>0?this.cache.totalLines:f;let x=Math.ceil(Math.max(r-n,0)/c),S=Math.ceil(x/s)*s+s,C=S/s,ee=C,w=[],T=(n+r)/2,E=this.getLayoutCheckpointBeforeTop(Math.max(0,n-t-S*c*2),s),D=t+(E?.top??g),O=E?.renderedLineIndex??0,k,A,j;if($x({diff:e,diffStyle:l,startingLine:E?.renderedLineIndex??0,expandedHunks:a?!0:this.hunksRenderer.getExpandedHunksMap(),collapsedContextThreshold:o,callback:({hunkIndex:e,hunk:i,collapsedBefore:a,collapsedAfter:o,deletionLine:c,additionLine:d})=>{let f=d==null?c.splitLineIndex:d.splitLineIndex,p=d==null?c.unifiedLineIndex:d.unifiedLineIndex,m=(d?.noEOFCR??!1)||(c?.noEOFCR??!1),h=(a>0?Zx({type:u,metrics:this.metrics,hunkIndex:e,hunkSpecs:i?.hunkSpecs}):void 0)?.totalHeight??0;D+=h;let _=O%s===0,v=Math.floor(O/s);if(_&&(w[v]=D-(t+g+h),j!=null)){if(j<=0)return!0;j--}let y=this.getLineHeight(l===`split`?f:p,m);return D>n-y&&D<r&&(k??=v),A==null&&D+y>T&&(A=v),j==null&&D>=r&&_&&(j=ee),O++,D+=y,o>0&&(D+=Qx({type:u,metrics:this.metrics})?.totalHeight??0),!1}}),k==null)if(b)k=0,A=0;else return{startingLine:0,totalLines:0,bufferBefore:0,bufferAfter:d-p-m};A??=k;let M=Math.round(A-C/2),N=Math.max(0,Math.ceil(f/s)-C),te=Math.max(0,Math.min(M,N)),ne=te*s,re=M<0?S+M*s:S,ie=w[te]??0,ae=ne===0?0:h+ie,oe=te+re/s,se=oe<w.length?_-w[oe]:_-(D-t-g);return{startingLine:ne,totalLines:re,bufferBefore:ae,bufferAfter:Math.max(0,se)}}};function QT(e){let t;for(let n of e){if(n==null)continue;let e=n.children[1];if(e instanceof HTMLElement)for(let n of e.children)n instanceof HTMLElement&&n.dataset.lineAnnotation===nT&&(t=Math.max(t??0,n.getBoundingClientRect().height))}return t}function $T(e){let t=Array.from(e).sort((e,t)=>e[0]-t[0]),n=[],r=[0],i=0;for(let[e,a]of t)n.push(e),i+=a,r.push(i);return{lineIndexes:n,prefixTotals:r}}function eE({lineIndexes:e,prefixTotals:t},n,r){if(n>=r||e.length===0)return 0;let i=tE(e,n);return(t[tE(e,r)]??0)-(t[i]??0)}function tE(e,t){let n=0,r=e.length;for(;n<r;){let i=n+r>>1,a=e[i];if(a==null)throw Error(`VirtualizedFileDiff: invalid prefix index`);a<t?n=i+1:r=i}return n}function nE(e){return Math.ceil(e/YT)*YT}function rE(e,t){let n=0;for(let r of e)r<t&&n++;return n}function iE({diffStyle:e,hunk:t,rowCount:n}){if(n<=0||!t.noEOFCRAdditions&&!t.noEOFCRDeletions)return[];let r=t.hunkContent.at(-1);if(r==null)return[];if(r.type===`context`)return[n-1];let i=Math.max(r.deletions,r.additions),a=r.deletions+r.additions;if(e===`split`)return i>0&&(t.noEOFCRAdditions||t.noEOFCRDeletions)?[n-1]:[];let o=[],s=n-a;return r.deletions>0&&t.noEOFCRDeletions&&o.push(s+r.deletions-1),r.additions>0&&t.noEOFCRAdditions&&o.push(n-1),o}function aE(e,t){return(e.diffStyle??`split`)!==(t.diffStyle??`split`)||(e.overflow??`scroll`)!==(t.overflow??`scroll`)||(e.collapsed??!1)!==(t.collapsed??!1)||(e.disableLineNumbers??!1)!==(t.disableLineNumbers??!1)||(e.disableFileHeader??!1)!==(t.disableFileHeader??!1)||(e.diffIndicators??`bars`)!==(t.diffIndicators??`bars`)||(e.hunkSeparators??`line-info`)!==(t.hunkSeparators??`line-info`)||(e.expandUnchanged??!1)!==(t.expandUnchanged??!1)||(e.collapsedContextThreshold??1)!==(t.collapsedContextThreshold??1)||e.unsafeCSS!==t.unsafeCSS}function oE(e,t){return(e.disableFileHeader??!1)!==(t.disableFileHeader??!1)||(e.hunkSeparators??`line-info`)!==(t.hunkSeparators??`line-info`)||(e.expandUnchanged??!1)!==(t.expandUnchanged??!1)||(e.collapsedContextThreshold??1)!==(t.collapsedContextThreshold??1)}function sE(e){return typeof e==`function`?`custom`:e??`line-info`}function cE(e,t){let[n,r]=e.split(`,`).map(Number);return t===`split`?r:n}function lE(e){let t=(0,g.useRef)(e);return(0,g.useInsertionEffect)(()=>void(t.current=e)),(0,g.useCallback)((...e)=>t.current(...e),[])}var uE=(0,g.createContext)(void 0);function dE(){return(0,g.useContext)(uE)}var fE=typeof window>`u`?g.useEffect:g.useLayoutEffect;function pE({fileDiff:e,options:t,lineAnnotations:n,selectedLines:r,prerenderedHTML:i,metrics:a,hasGutterRenderUtility:o,hasCustomHeader:s,disableWorkerPool:c}){let l=dE(),u=r!==void 0,d=(0,g.useContext)(sC),f=(0,g.useRef)(null),p=lE(r=>{if(r!=null){if(f.current!=null)throw Error(`useFileDiffInstance: An instance should not already exist when a node is created`);l==null?f.current=new BT(mE({controlledSelection:u,hasCustomHeader:s,hasGutterRenderUtility:o,options:t}),c?void 0:d,!0):f.current=new ZT(mE({controlledSelection:u,hasCustomHeader:s,hasGutterRenderUtility:o,options:t}),l,a,c?void 0:d,!0),f.current.hydrate({fileDiff:e,fileContainer:r,lineAnnotations:n,prerenderedHTML:i})}else{if(f.current==null)throw Error(`useFileDiffInstance: A FileDiff instance should exist when unmounting`);f.current.cleanUp(),f.current=null}});return fE(()=>{let{current:i}=f;if(i==null)return;let a=mE({controlledSelection:u,hasCustomHeader:s,hasGutterRenderUtility:o,options:t}),c=!tw(i.options,a);i.setOptions(a),i.render({forceRender:c,fileDiff:e,lineAnnotations:n}),r!==void 0&&i.setSelectedLines(r)}),{ref:p,getHoveredLine:(0,g.useCallback)(()=>f.current?.getHoveredLine(),[])}}function mE({options:e,controlledSelection:t,hasCustomHeader:n,hasGutterRenderUtility:r}){return!t&&!r&&!n?e:{...e,controlledSelection:t,renderCustomHeader:n?XC:e?.renderCustomHeader,renderGutterUtility:r?XC:e?.renderGutterUtility}}function hE({patch:e,options:t,metrics:n,lineAnnotations:r,selectedLines:i,className:a,style:o,prerenderedHTML:s,renderAnnotation:c,renderCustomHeader:l,renderHeaderPrefix:u,renderHeaderMetadata:d,renderGutterUtility:f,disableWorkerPool:p=!1}){let m=gE(e),{ref:h,getHoveredLine:g}=pE({fileDiff:m,options:t,metrics:n,lineAnnotations:r,selectedLines:i,prerenderedHTML:s,hasGutterRenderUtility:f!=null,hasCustomHeader:l!=null,disableWorkerPool:p});return(0,_.jsx)(mu,{ref:h,className:a,style:o,children:$C(ZC({fileDiff:m,renderCustomHeader:l,renderHeaderPrefix:u,renderHeaderMetadata:d,renderAnnotation:c,lineAnnotations:r,renderGutterUtility:f,getHoveredLine:g}),s)})}function gE(e){return(0,g.useMemo)(()=>UC(e),[e])}var _E={theme:{dark:`pierre-dark`,light:`pierre-light`},diffStyle:`unified`,diffIndicators:`bars`,hunkSeparators:`line-info-basic`,lineDiffType:`word`,overflow:`wrap`,stickyHeader:!0,tokenizeMaxLineLength:1800,tokenizeMaxLength:22e4,useTokenTransformer:!0};function vE(e){return{..._E,themeType:e}}var yE=`
|
|
2858
|
+
:host {
|
|
2859
|
+
--diffs-font-family: var(--font-mono);
|
|
2860
|
+
--diffs-font-size: calc(10.5px * var(--deck-text-scale));
|
|
2861
|
+
--diffs-line-height: 1.55;
|
|
2862
|
+
color: var(--ink);
|
|
2863
|
+
}
|
|
2864
|
+
[data-neondeck-review-annotation] {
|
|
2865
|
+
border: 1px solid var(--line);
|
|
2866
|
+
background: color-mix(in srgb, var(--primary) 10%, var(--field));
|
|
2867
|
+
color: var(--ink);
|
|
2868
|
+
padding: 6px 8px;
|
|
2869
|
+
font-family: var(--font-sans);
|
|
2870
|
+
font-size: calc(10.5px * var(--deck-text-scale));
|
|
2871
|
+
line-height: 1.4;
|
|
2872
|
+
}
|
|
2873
|
+
[data-neondeck-review-annotation-title] {
|
|
2874
|
+
display: flex;
|
|
2875
|
+
justify-content: space-between;
|
|
2876
|
+
gap: 8px;
|
|
2877
|
+
color: var(--primary);
|
|
2878
|
+
font-family: var(--font-mono);
|
|
2879
|
+
font-size: calc(9.5px * var(--deck-text-scale));
|
|
2880
|
+
text-transform: uppercase;
|
|
2881
|
+
}
|
|
2882
|
+
[data-neondeck-review-annotation] p {
|
|
2883
|
+
margin: 4px 0 0;
|
|
2884
|
+
}
|
|
2885
|
+
[data-neondeck-review-annotation] a {
|
|
2886
|
+
color: var(--primary);
|
|
2887
|
+
display: inline-flex;
|
|
2888
|
+
font-family: var(--font-mono);
|
|
2889
|
+
font-size: calc(9.5px * var(--deck-text-scale));
|
|
2890
|
+
margin-top: 4px;
|
|
2891
|
+
text-decoration: none;
|
|
2892
|
+
}
|
|
2893
|
+
[data-neondeck-review-annotation].pr-review-draft-stale {
|
|
2894
|
+
border-color: color-mix(in srgb, var(--accent) 46%, var(--line));
|
|
2895
|
+
background: color-mix(in srgb, var(--accent) 10%, var(--field));
|
|
2896
|
+
}
|
|
2897
|
+
.pr-review-composer {
|
|
2898
|
+
display: grid;
|
|
2899
|
+
gap: 6px;
|
|
2900
|
+
}
|
|
2901
|
+
.pr-review-composer textarea {
|
|
2902
|
+
width: 100%;
|
|
2903
|
+
min-height: 54px;
|
|
2904
|
+
resize: vertical;
|
|
2905
|
+
border: 1px solid var(--line);
|
|
2906
|
+
background: var(--field);
|
|
2907
|
+
padding: 6px;
|
|
2908
|
+
color: var(--ink);
|
|
2909
|
+
font-family: var(--font-sans);
|
|
2910
|
+
font-size: calc(10.5px * var(--deck-text-scale));
|
|
2911
|
+
line-height: 1.4;
|
|
2912
|
+
outline: none;
|
|
2913
|
+
}
|
|
2914
|
+
.pr-review-composer textarea::placeholder {
|
|
2915
|
+
color: var(--deck-faint);
|
|
2916
|
+
opacity: 1;
|
|
2917
|
+
}
|
|
2918
|
+
.pr-review-composer textarea:focus {
|
|
2919
|
+
border-color: var(--primary);
|
|
2920
|
+
box-shadow: 0 0 0 1px var(--primary);
|
|
2921
|
+
}
|
|
2922
|
+
.pr-review-composer-actions,
|
|
2923
|
+
.pr-review-inline-actions {
|
|
2924
|
+
display: flex;
|
|
2925
|
+
min-width: 0;
|
|
2926
|
+
align-items: center;
|
|
2927
|
+
gap: 6px;
|
|
2928
|
+
flex-wrap: wrap;
|
|
2929
|
+
}
|
|
2930
|
+
.pr-review-composer-actions button,
|
|
2931
|
+
.pr-review-inline-actions button,
|
|
2932
|
+
.pr-review-inline-actions a {
|
|
2933
|
+
display: inline-flex;
|
|
2934
|
+
min-height: calc(24px * var(--deck-density-space));
|
|
2935
|
+
align-items: center;
|
|
2936
|
+
justify-content: center;
|
|
2937
|
+
border: 1px solid var(--line);
|
|
2938
|
+
background: var(--field);
|
|
2939
|
+
padding: 4px 6px;
|
|
2940
|
+
color: var(--ink);
|
|
2941
|
+
font-family: var(--font-mono);
|
|
2942
|
+
font-size: calc(9.5px * var(--deck-text-scale));
|
|
2943
|
+
line-height: 1;
|
|
2944
|
+
text-decoration: none;
|
|
2945
|
+
transition:
|
|
2946
|
+
background-color 160ms ease,
|
|
2947
|
+
border-color 160ms ease,
|
|
2948
|
+
color 160ms ease;
|
|
2949
|
+
white-space: nowrap;
|
|
2950
|
+
}
|
|
2951
|
+
.pr-review-composer-actions button:not(:disabled):hover,
|
|
2952
|
+
.pr-review-inline-actions button:not(:disabled):hover,
|
|
2953
|
+
.pr-review-inline-actions a:hover {
|
|
2954
|
+
border-color: var(--primary);
|
|
2955
|
+
background: color-mix(in srgb, var(--primary) 8%, var(--field));
|
|
2956
|
+
color: var(--primary-strong);
|
|
2957
|
+
}
|
|
2958
|
+
.pr-review-composer-actions button:focus-visible,
|
|
2959
|
+
.pr-review-inline-actions button:focus-visible,
|
|
2960
|
+
.pr-review-inline-actions a:focus-visible {
|
|
2961
|
+
border-color: var(--primary);
|
|
2962
|
+
box-shadow: 0 0 0 1px var(--primary);
|
|
2963
|
+
outline: none;
|
|
2964
|
+
}
|
|
2965
|
+
.pr-review-composer-actions button:disabled,
|
|
2966
|
+
.pr-review-inline-actions button:disabled {
|
|
2967
|
+
cursor: not-allowed;
|
|
2968
|
+
opacity: 0.45;
|
|
2969
|
+
}
|
|
2970
|
+
`;function bE(e){return new Worker(`/assets/worker-CBKQOXEl.js`,{name:e?.name})}var xE={workerFactory:()=>new bE,poolSize:CE(),totalASTLRUCacheSize:24},SE={langs:[`bash`,`css`,`diff`,`html`,`javascript`,`json`,`markdown`,`shellscript`,`sql`,`tsx`,`typescript`,`yaml`],theme:{dark:`pierre-dark`,light:`pierre-light`},useTokenTransformer:!0,tokenizeMaxLineLength:1800,lineDiffType:`word`,maxLineDiffLength:1e3};function CE(){return typeof navigator>`u`?2:Math.max(1,Math.min(4,navigator.hardwareConcurrency||2))}function wE({children:e}){return(0,_.jsx)(lC,{highlighterOptions:SE,poolOptions:xE,children:e})}function TE({patch:e,title:t=`Diff`,detail:n,tone:r=`primary`,meta:i,className:o,lineAnnotations:s,renderAnnotation:c,selectedLines:u,onSelectedLinesChange:d}){let f=DE();if(!y(e))return(0,_.jsx)(a,{label:`No patch content available.`});let p=b(e).length;return(0,_.jsxs)(`section`,{className:h(`diff-viewer-shell`,o),children:[(0,_.jsxs)(`header`,{className:`diff-viewer-header`,children:[(0,_.jsxs)(`div`,{className:`min-w-0`,children:[(0,_.jsx)(`p`,{className:h(`diff-viewer-title`,EE(r)),children:t}),n?(0,_.jsx)(`p`,{className:`diff-viewer-detail`,children:n}):null]}),(0,_.jsxs)(`div`,{className:`flex shrink-0 flex-wrap items-center justify-end gap-1.5`,children:[i,(0,_.jsx)(l,{children:S(p||1)})]})]}),(0,_.jsx)(hE,{className:`diff-patch`,lineAnnotations:s,options:{...vE(f),controlledSelection:u!==void 0,enableLineSelection:!!d,onLineSelectionEnd:d,unsafeCSS:yE},patch:e??``,renderAnnotation:c,selectedLines:u})]})}function EE(e){return e===`accent`?`text-accent`:e===`violet`?`text-violet`:`text-primary`}function DE(){let[e,t]=(0,g.useState)(()=>OE());return(0,g.useEffect)(()=>{let e=document.documentElement,n=new MutationObserver(()=>{t(OE())});return n.observe(e,{attributeFilter:[`data-theme`],attributes:!0}),t(OE()),()=>n.disconnect()},[]),e}function OE(){return typeof document>`u`?`dark`:document.documentElement.dataset.theme===`light`?`light`:`dark`}function kE({activePath:e,className:t,detail:n,emptyLabel:r=`No changed files.`,files:i,isLoadingPatch:o=!1,onActivePathChange:s,patchError:c,annotationsByPath:u,renderAnnotation:d,selectedLines:f,onSelectedLinesChange:p,footer:m,inspector:v,inspectorLabel:b=`Diff inspector`,title:x,tone:T=`primary`}){let E=(0,g.useId)(),[D,O]=(0,g.useState)(()=>ee(i)??null),k=e??D,A=i.find(e=>e.path===k)??i[0]??null,j=A?.patch??null;if((0,g.useEffect)(()=>{if(k&&i.some(e=>e.path===k))return;let e=ee(i)??null;O(e),e&&s&&s(e)},[i,s,k]),i.length===0)return(0,_.jsx)(a,{label:r});let M=e=>{O(e),s?.(e)},N=A?w(A):null;return(0,_.jsxs)(`section`,{className:h(`diff-multi-file`,v?`diff-multi-file-with-inspector`:void 0,t),children:[(0,_.jsx)(`aside`,{className:`diff-tree-pane`,children:(0,_.jsx)(cu,{files:i,onSelectPath:M,selectedPath:A?.path??null})}),(0,_.jsxs)(`div`,{className:`diff-file-column`,children:[(0,_.jsxs)(`div`,{className:`diff-file-selector`,children:[(0,_.jsx)(`label`,{className:`sr-only`,htmlFor:E,children:`Changed file`}),(0,_.jsx)(`select`,{className:`w-full border border-line bg-field px-2 py-1 font-mono text-[10px] text-ink outline-none transition-colors focus:border-primary focus:ring-1 focus:ring-primary`,id:E,onChange:e=>M(e.currentTarget.value),value:A?.path??``,children:i.map(e=>(0,_.jsx)(`option`,{value:e.path,children:e.path},e.path))})]}),(0,_.jsx)(wE,{children:(0,_.jsx)(TE,{className:`min-h-0 flex-1`,detail:n??A?.path,lineAnnotations:A?u?.[A.path]:void 0,meta:A?(0,_.jsxs)(_.Fragment,{children:[(0,_.jsx)(l,{children:A.status}),(0,_.jsx)(l,{children:C(A)})]}):(0,_.jsx)(l,{children:S(i.length)}),patch:y(j)?j:null,renderAnnotation:d,selectedLines:f,onSelectedLinesChange:p,title:x,tone:T})}),o?(0,_.jsx)(`p`,{className:`border-x border-b border-line bg-field px-2 py-1 font-mono text-[10px] text-muted`,children:`Loading patch...`}):null,c?(0,_.jsx)(`p`,{className:`border-x border-b border-line bg-field px-2 py-1 font-mono text-[10px] text-accent`,children:c}):null,N&&!o&&!c?(0,_.jsx)(`p`,{className:`border-x border-b border-line bg-field px-2 py-1 font-mono text-[10px] text-muted`,children:N}):null,m]}),v?(0,_.jsx)(`aside`,{"aria-label":b,className:`diff-inspector-pane`,children:v}):null]})}export{y as a,ee as i,wE as n,x as o,TE as r,kE as t};
|