diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index dd29521..b72e9e4 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -61,6 +61,22 @@ jobs: - name: Verify solutions run: REQUIRE_COMPLETE=1 ./scripts/check-solutions.sh + javascript: + name: JavaScript bundles + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v5 + - uses: actions/setup-node@v4 + with: + node-version: 22 + cache: npm + - name: Install pinned dependencies + run: npm ci --ignore-scripts + - name: Rebuild local CodeMirror and Lezer bundles + run: npm run build:js + - name: Verify generated bundles are current + run: git diff --exit-code -- static/dist + spellcheck: name: Spell check (typos) runs-on: ubuntu-latest diff --git a/.gitignore b/.gitignore index 2d93843..5cf8c73 100644 --- a/.gitignore +++ b/.gitignore @@ -9,8 +9,9 @@ course.db course.db-wal course.db-shm -# Rust build artifacts +# Build artifacts and local dependencies /target/ +/node_modules/ exercises/*/target Cargo.lock diff --git a/_typos.toml b/_typos.toml index c893440..9b84570 100644 --- a/_typos.toml +++ b/_typos.toml @@ -5,6 +5,7 @@ extend-exclude = [ # Vendored / minified third-party assets we don't control. "static/js/htmx.min.js", + "static/dist/", "*.min.js", # Lock file: full of base32/hex hashes that look like typos. "Cargo.lock", diff --git a/docs/architecture.md b/docs/architecture.md index eff8965..ceec9c0 100644 --- a/docs/architecture.md +++ b/docs/architecture.md @@ -50,7 +50,9 @@ course/ │ ├── server.rs # Axum web server (default `cargo run`) │ └── cli.rs # `cargo course …` subcommands ├── templates/ # Askama templates rendered by the server -├── static/ # served at `/static/*` (assets, fonts, quiz.html) +├── static/ # served at `/static/*` (assets, local fonts, JS bundles) +├── package.json # pinned frontend deps + reproducible esbuild command +├── package-lock.json # exact frontend dependency graph └── target/ # cargo build output (ignored) ``` @@ -336,24 +338,26 @@ submissions. Served by `tower-http` `ServeDir` at `/static/*`. Notable: -- `static/quiz.html`: the chapter 18 quiz. Self-contained HTML/JS; - no backend involvement. The chapter's `main.rs` is essentially a - pointer to this file. + - `static/js/inline-editor.js`: shared CodeMirror 6 mount used by `templates/exercise.html`, `templates/dashboard.html`, and `templates/playground.html`. Owns Run/Format/Reset/Submit wiring, draft persistence, vim toggle (global across mounts), test result rendering, and the textarea fallback. Each call site supplies its own DOM (per the `data-role` contract documented at the top of the - module) and an optional `onRunSuccess` callback. + module) and an optional `onRunSuccess` callback. Templates load the + generated `static/dist/inline-editor.js`, not this source file directly. - `static/js/cm-theme.js`: the shared `proseHighlightStyle` / `proseEditorTheme` CodeMirror exports, read by `inline-editor.js` and `readonly-rust-editor.js` so all editors stay in sync with the - `--syn-*` CSS variables in `base.html`. + `--syn-*` CSS variables in `static/css/base.css`. - `static/js/readonly-rust-editor.js`: read-only CodeMirror viewer for Rust code blocks on admin and team pages, and the per-step "Reveal the full solution" viewer mounted lazily inside the hints disclosure on `templates/exercise.html`. +- `static/dist/`: checked-in, minified esbuild output for CodeMirror, + Lezer, Vim mode, and Rust highlighting. Rebuild with `npm run build:js`; + CI verifies the generated chunks match the source modules. - `static/assets/`: logos, screenshots. - `static/fonts/`: bundled webfonts. diff --git a/package-lock.json b/package-lock.json new file mode 100644 index 0000000..fe6e99b --- /dev/null +++ b/package-lock.json @@ -0,0 +1,666 @@ +{ + "name": "course", + "lockfileVersion": 3, + "requires": true, + "packages": { + "": { + "dependencies": { + "@codemirror/autocomplete": "6.18.0", + "@codemirror/commands": "6.6.0", + "@codemirror/lang-rust": "6.0.1", + "@codemirror/language": "6.10.2", + "@codemirror/state": "6.7.1", + "@codemirror/view": "6.43.7", + "@lezer/highlight": "1.2.0", + "@lezer/rust": "1.0.2", + "@replit/codemirror-vim": "6.2.1" + }, + "devDependencies": { + "esbuild": "0.25.8" + } + }, + "node_modules/@codemirror/autocomplete": { + "version": "6.18.0", + "resolved": "https://registry.npmjs.org/@codemirror/autocomplete/-/autocomplete-6.18.0.tgz", + "integrity": "sha512-5DbOvBbY4qW5l57cjDsmmpDh3/TeK1vXfTHa+BUMrRzdWdcxKZ4U4V7vQaTtOpApNU4kLS4FQ6cINtLg245LXA==", + "license": "MIT", + "dependencies": { + "@codemirror/language": "^6.0.0", + "@codemirror/state": "^6.0.0", + "@codemirror/view": "^6.17.0", + "@lezer/common": "^1.0.0" + }, + "peerDependencies": { + "@codemirror/language": "^6.0.0", + "@codemirror/state": "^6.0.0", + "@codemirror/view": "^6.0.0", + "@lezer/common": "^1.0.0" + } + }, + "node_modules/@codemirror/commands": { + "version": "6.6.0", + "resolved": "https://registry.npmjs.org/@codemirror/commands/-/commands-6.6.0.tgz", + "integrity": "sha512-qnY+b7j1UNcTS31Eenuc/5YJB6gQOzkUoNmJQc0rznwqSRpeaWWpjkWy2C/MPTcePpsKJEM26hXrOXl1+nceXg==", + "license": "MIT", + "dependencies": { + "@codemirror/language": "^6.0.0", + "@codemirror/state": "^6.4.0", + "@codemirror/view": "^6.27.0", + "@lezer/common": "^1.1.0" + } + }, + "node_modules/@codemirror/lang-rust": { + "version": "6.0.1", + "resolved": "https://registry.npmjs.org/@codemirror/lang-rust/-/lang-rust-6.0.1.tgz", + "integrity": "sha512-344EMWFBzWArHWdZn/NcgkwMvZIWUR1GEBdwG8FEp++6o6vT6KL9V7vGs2ONsKxxFUPXKI0SPcWhyYyl2zPYxQ==", + "license": "MIT", + "dependencies": { + "@codemirror/language": "^6.0.0", + "@lezer/rust": "^1.0.0" + } + }, + "node_modules/@codemirror/language": { + "version": "6.10.2", + "resolved": "https://registry.npmjs.org/@codemirror/language/-/language-6.10.2.tgz", + "integrity": "sha512-kgbTYTo0Au6dCSc/TFy7fK3fpJmgHDv1sG1KNQKJXVi+xBTEeBPY/M30YXiU6mMXeH+YIDLsbrT4ZwNRdtF+SA==", + "license": "MIT", + "dependencies": { + "@codemirror/state": "^6.0.0", + "@codemirror/view": "^6.23.0", + "@lezer/common": "^1.1.0", + "@lezer/highlight": "^1.0.0", + "@lezer/lr": "^1.0.0", + "style-mod": "^4.0.0" + } + }, + "node_modules/@codemirror/search": { + "version": "6.5.6", + "resolved": "https://registry.npmjs.org/@codemirror/search/-/search-6.5.6.tgz", + "integrity": "sha512-rpMgcsh7o0GuCDUXKPvww+muLA1pDJaFrpq/CCHtpQJYz8xopu4D1hPcKRoDD0YlF8gZaqTNIRa4VRBWyhyy7Q==", + "license": "MIT", + "peer": true, + "dependencies": { + "@codemirror/state": "^6.0.0", + "@codemirror/view": "^6.0.0", + "crelt": "^1.0.5" + } + }, + "node_modules/@codemirror/state": { + "version": "6.7.1", + "resolved": "https://registry.npmjs.org/@codemirror/state/-/state-6.7.1.tgz", + "integrity": "sha512-9QzNDgE4EYDnAHfrTlR2lwiPciiOymLtwKK+8yHQzCc7GXhAP9xdEbEJFy2IWB1j9UGUl9BsgMmTo/ImA02T7A==", + "license": "MIT", + "dependencies": { + "@marijn/find-cluster-break": "^1.0.0" + } + }, + "node_modules/@codemirror/view": { + "version": "6.43.7", + "resolved": "https://registry.npmjs.org/@codemirror/view/-/view-6.43.7.tgz", + "integrity": "sha512-FZsExxkoxnAN+d9TgqXLg5g4A1oQwzX9WlkOT5i2PKkcW7xx3Bmu0vs90g6fo9Mpdsb/l96dnAraQ8932aO4/g==", + "license": "MIT", + "dependencies": { + "@codemirror/state": "^6.7.0", + "crelt": "^1.0.6", + "style-mod": "^4.1.0", + "w3c-keyname": "^2.2.4" + } + }, + "node_modules/@esbuild/aix-ppc64": { + "version": "0.25.8", + "resolved": "https://registry.npmjs.org/@esbuild/aix-ppc64/-/aix-ppc64-0.25.8.tgz", + "integrity": "sha512-urAvrUedIqEiFR3FYSLTWQgLu5tb+m0qZw0NBEasUeo6wuqatkMDaRT+1uABiGXEu5vqgPd7FGE1BhsAIy9QVA==", + "cpu": [ + "ppc64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "aix" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/android-arm": { + "version": "0.25.8", + "resolved": "https://registry.npmjs.org/@esbuild/android-arm/-/android-arm-0.25.8.tgz", + "integrity": "sha512-RONsAvGCz5oWyePVnLdZY/HHwA++nxYWIX1atInlaW6SEkwq6XkP3+cb825EUcRs5Vss/lGh/2YxAb5xqc07Uw==", + "cpu": [ + "arm" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "android" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/android-arm64": { + "version": "0.25.8", + "resolved": "https://registry.npmjs.org/@esbuild/android-arm64/-/android-arm64-0.25.8.tgz", + "integrity": "sha512-OD3p7LYzWpLhZEyATcTSJ67qB5D+20vbtr6vHlHWSQYhKtzUYrETuWThmzFpZtFsBIxRvhO07+UgVA9m0i/O1w==", + "cpu": [ + "arm64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "android" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/android-x64": { + "version": "0.25.8", + "resolved": "https://registry.npmjs.org/@esbuild/android-x64/-/android-x64-0.25.8.tgz", + "integrity": "sha512-yJAVPklM5+4+9dTeKwHOaA+LQkmrKFX96BM0A/2zQrbS6ENCmxc4OVoBs5dPkCCak2roAD+jKCdnmOqKszPkjA==", + "cpu": [ + "x64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "android" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/darwin-arm64": { + "version": "0.25.8", + "resolved": "https://registry.npmjs.org/@esbuild/darwin-arm64/-/darwin-arm64-0.25.8.tgz", + "integrity": "sha512-Jw0mxgIaYX6R8ODrdkLLPwBqHTtYHJSmzzd+QeytSugzQ0Vg4c5rDky5VgkoowbZQahCbsv1rT1KW72MPIkevw==", + "cpu": [ + "arm64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "darwin" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/darwin-x64": { + "version": "0.25.8", + "resolved": "https://registry.npmjs.org/@esbuild/darwin-x64/-/darwin-x64-0.25.8.tgz", + "integrity": "sha512-Vh2gLxxHnuoQ+GjPNvDSDRpoBCUzY4Pu0kBqMBDlK4fuWbKgGtmDIeEC081xi26PPjn+1tct+Bh8FjyLlw1Zlg==", + "cpu": [ + "x64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "darwin" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/freebsd-arm64": { + "version": "0.25.8", + "resolved": "https://registry.npmjs.org/@esbuild/freebsd-arm64/-/freebsd-arm64-0.25.8.tgz", + "integrity": "sha512-YPJ7hDQ9DnNe5vxOm6jaie9QsTwcKedPvizTVlqWG9GBSq+BuyWEDazlGaDTC5NGU4QJd666V0yqCBL2oWKPfA==", + "cpu": [ + "arm64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "freebsd" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/freebsd-x64": { + "version": "0.25.8", + "resolved": "https://registry.npmjs.org/@esbuild/freebsd-x64/-/freebsd-x64-0.25.8.tgz", + "integrity": "sha512-MmaEXxQRdXNFsRN/KcIimLnSJrk2r5H8v+WVafRWz5xdSVmWLoITZQXcgehI2ZE6gioE6HirAEToM/RvFBeuhw==", + "cpu": [ + "x64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "freebsd" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/linux-arm": { + "version": "0.25.8", + "resolved": "https://registry.npmjs.org/@esbuild/linux-arm/-/linux-arm-0.25.8.tgz", + "integrity": "sha512-FuzEP9BixzZohl1kLf76KEVOsxtIBFwCaLupVuk4eFVnOZfU+Wsn+x5Ryam7nILV2pkq2TqQM9EZPsOBuMC+kg==", + "cpu": [ + "arm" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/linux-arm64": { + "version": "0.25.8", + "resolved": "https://registry.npmjs.org/@esbuild/linux-arm64/-/linux-arm64-0.25.8.tgz", + "integrity": "sha512-WIgg00ARWv/uYLU7lsuDK00d/hHSfES5BzdWAdAig1ioV5kaFNrtK8EqGcUBJhYqotlUByUKz5Qo6u8tt7iD/w==", + "cpu": [ + "arm64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/linux-ia32": { + "version": "0.25.8", + "resolved": "https://registry.npmjs.org/@esbuild/linux-ia32/-/linux-ia32-0.25.8.tgz", + "integrity": "sha512-A1D9YzRX1i+1AJZuFFUMP1E9fMaYY+GnSQil9Tlw05utlE86EKTUA7RjwHDkEitmLYiFsRd9HwKBPEftNdBfjg==", + "cpu": [ + "ia32" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/linux-loong64": { + "version": "0.25.8", + "resolved": "https://registry.npmjs.org/@esbuild/linux-loong64/-/linux-loong64-0.25.8.tgz", + "integrity": "sha512-O7k1J/dwHkY1RMVvglFHl1HzutGEFFZ3kNiDMSOyUrB7WcoHGf96Sh+64nTRT26l3GMbCW01Ekh/ThKM5iI7hQ==", + "cpu": [ + "loong64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/linux-mips64el": { + "version": "0.25.8", + "resolved": "https://registry.npmjs.org/@esbuild/linux-mips64el/-/linux-mips64el-0.25.8.tgz", + "integrity": "sha512-uv+dqfRazte3BzfMp8PAQXmdGHQt2oC/y2ovwpTteqrMx2lwaksiFZ/bdkXJC19ttTvNXBuWH53zy/aTj1FgGw==", + "cpu": [ + "mips64el" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/linux-ppc64": { + "version": "0.25.8", + "resolved": "https://registry.npmjs.org/@esbuild/linux-ppc64/-/linux-ppc64-0.25.8.tgz", + "integrity": "sha512-GyG0KcMi1GBavP5JgAkkstMGyMholMDybAf8wF5A70CALlDM2p/f7YFE7H92eDeH/VBtFJA5MT4nRPDGg4JuzQ==", + "cpu": [ + "ppc64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/linux-riscv64": { + "version": "0.25.8", + "resolved": "https://registry.npmjs.org/@esbuild/linux-riscv64/-/linux-riscv64-0.25.8.tgz", + "integrity": "sha512-rAqDYFv3yzMrq7GIcen3XP7TUEG/4LK86LUPMIz6RT8A6pRIDn0sDcvjudVZBiiTcZCY9y2SgYX2lgK3AF+1eg==", + "cpu": [ + "riscv64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/linux-s390x": { + "version": "0.25.8", + "resolved": "https://registry.npmjs.org/@esbuild/linux-s390x/-/linux-s390x-0.25.8.tgz", + "integrity": "sha512-Xutvh6VjlbcHpsIIbwY8GVRbwoviWT19tFhgdA7DlenLGC/mbc3lBoVb7jxj9Z+eyGqvcnSyIltYUrkKzWqSvg==", + "cpu": [ + "s390x" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/linux-x64": { + "version": "0.25.8", + "resolved": "https://registry.npmjs.org/@esbuild/linux-x64/-/linux-x64-0.25.8.tgz", + "integrity": "sha512-ASFQhgY4ElXh3nDcOMTkQero4b1lgubskNlhIfJrsH5OKZXDpUAKBlNS0Kx81jwOBp+HCeZqmoJuihTv57/jvQ==", + "cpu": [ + "x64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/netbsd-arm64": { + "version": "0.25.8", + "resolved": "https://registry.npmjs.org/@esbuild/netbsd-arm64/-/netbsd-arm64-0.25.8.tgz", + "integrity": "sha512-d1KfruIeohqAi6SA+gENMuObDbEjn22olAR7egqnkCD9DGBG0wsEARotkLgXDu6c4ncgWTZJtN5vcgxzWRMzcw==", + "cpu": [ + "arm64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "netbsd" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/netbsd-x64": { + "version": "0.25.8", + "resolved": "https://registry.npmjs.org/@esbuild/netbsd-x64/-/netbsd-x64-0.25.8.tgz", + "integrity": "sha512-nVDCkrvx2ua+XQNyfrujIG38+YGyuy2Ru9kKVNyh5jAys6n+l44tTtToqHjino2My8VAY6Lw9H7RI73XFi66Cg==", + "cpu": [ + "x64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "netbsd" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/openbsd-arm64": { + "version": "0.25.8", + "resolved": "https://registry.npmjs.org/@esbuild/openbsd-arm64/-/openbsd-arm64-0.25.8.tgz", + "integrity": "sha512-j8HgrDuSJFAujkivSMSfPQSAa5Fxbvk4rgNAS5i3K+r8s1X0p1uOO2Hl2xNsGFppOeHOLAVgYwDVlmxhq5h+SQ==", + "cpu": [ + "arm64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "openbsd" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/openbsd-x64": { + "version": "0.25.8", + "resolved": "https://registry.npmjs.org/@esbuild/openbsd-x64/-/openbsd-x64-0.25.8.tgz", + "integrity": "sha512-1h8MUAwa0VhNCDp6Af0HToI2TJFAn1uqT9Al6DJVzdIBAd21m/G0Yfc77KDM3uF3T/YaOgQq3qTJHPbTOInaIQ==", + "cpu": [ + "x64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "openbsd" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/openharmony-arm64": { + "version": "0.25.8", + "resolved": "https://registry.npmjs.org/@esbuild/openharmony-arm64/-/openharmony-arm64-0.25.8.tgz", + "integrity": "sha512-r2nVa5SIK9tSWd0kJd9HCffnDHKchTGikb//9c7HX+r+wHYCpQrSgxhlY6KWV1nFo1l4KFbsMlHk+L6fekLsUg==", + "cpu": [ + "arm64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "openharmony" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/sunos-x64": { + "version": "0.25.8", + "resolved": "https://registry.npmjs.org/@esbuild/sunos-x64/-/sunos-x64-0.25.8.tgz", + "integrity": "sha512-zUlaP2S12YhQ2UzUfcCuMDHQFJyKABkAjvO5YSndMiIkMimPmxA+BYSBikWgsRpvyxuRnow4nS5NPnf9fpv41w==", + "cpu": [ + "x64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "sunos" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/win32-arm64": { + "version": "0.25.8", + "resolved": "https://registry.npmjs.org/@esbuild/win32-arm64/-/win32-arm64-0.25.8.tgz", + "integrity": "sha512-YEGFFWESlPva8hGL+zvj2z/SaK+pH0SwOM0Nc/d+rVnW7GSTFlLBGzZkuSU9kFIGIo8q9X3ucpZhu8PDN5A2sQ==", + "cpu": [ + "arm64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "win32" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/win32-ia32": { + "version": "0.25.8", + "resolved": "https://registry.npmjs.org/@esbuild/win32-ia32/-/win32-ia32-0.25.8.tgz", + "integrity": "sha512-hiGgGC6KZ5LZz58OL/+qVVoZiuZlUYlYHNAmczOm7bs2oE1XriPFi5ZHHrS8ACpV5EjySrnoCKmcbQMN+ojnHg==", + "cpu": [ + "ia32" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "win32" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/win32-x64": { + "version": "0.25.8", + "resolved": "https://registry.npmjs.org/@esbuild/win32-x64/-/win32-x64-0.25.8.tgz", + "integrity": "sha512-cn3Yr7+OaaZq1c+2pe+8yxC8E144SReCQjN6/2ynubzYjvyqZjTXfQJpAcQpsdJq3My7XADANiYGHoFC69pLQw==", + "cpu": [ + "x64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "win32" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@lezer/common": { + "version": "1.2.1", + "resolved": "https://registry.npmjs.org/@lezer/common/-/common-1.2.1.tgz", + "integrity": "sha512-yemX0ZD2xS/73llMZIK6KplkjIjf2EvAHcinDi/TfJ9hS25G0388+ClHt6/3but0oOxinTcQHJLDXh6w1crzFQ==", + "license": "MIT" + }, + "node_modules/@lezer/highlight": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/@lezer/highlight/-/highlight-1.2.0.tgz", + "integrity": "sha512-WrS5Mw51sGrpqjlh3d4/fOwpEV2Hd3YOkp9DBt4k8XZQcoTHZFB7sx030A6OcahF4J1nDQAa3jXlTVVYH50IFA==", + "license": "MIT", + "dependencies": { + "@lezer/common": "^1.0.0" + } + }, + "node_modules/@lezer/lr": { + "version": "1.4.1", + "resolved": "https://registry.npmjs.org/@lezer/lr/-/lr-1.4.1.tgz", + "integrity": "sha512-CHsKq8DMKBf9b3yXPDIU4DbH+ZJd/sJdYOW2llbW/HudP5u0VS6Bfq1hLYfgU7uAYGFIyGGQIsSOXGPEErZiJw==", + "license": "MIT", + "dependencies": { + "@lezer/common": "^1.0.0" + } + }, + "node_modules/@lezer/rust": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/@lezer/rust/-/rust-1.0.2.tgz", + "integrity": "sha512-Lz5sIPBdF2FUXcWeCu1//ojFAZqzTQNRga0aYv6dYXqJqPfMdCAI0NzajWUd4Xijj1IKJLtjoXRPMvTKWBcqKg==", + "license": "MIT", + "dependencies": { + "@lezer/common": "^1.2.0", + "@lezer/highlight": "^1.0.0", + "@lezer/lr": "^1.0.0" + } + }, + "node_modules/@marijn/find-cluster-break": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/@marijn/find-cluster-break/-/find-cluster-break-1.0.3.tgz", + "integrity": "sha512-FY+MKLBoTsLNJF/eLWaOsXGdz6uh3Iu1axjPf6TUq92IYumcTcXWHoS747JARLkcdlJ/Waiaxc5wQfFO8jC6NA==", + "license": "MIT" + }, + "node_modules/@replit/codemirror-vim": { + "version": "6.2.1", + "resolved": "https://registry.npmjs.org/@replit/codemirror-vim/-/codemirror-vim-6.2.1.tgz", + "integrity": "sha512-qDAcGSHBYU5RrdO//qCmD8K9t6vbP327iCj/iqrkVnjbrpFhrjOt92weGXGHmTNRh16cUtkUZ7Xq7rZf+8HVow==", + "license": "MIT", + "peerDependencies": { + "@codemirror/commands": "^6.0.0", + "@codemirror/language": "^6.1.0", + "@codemirror/search": "^6.2.0", + "@codemirror/state": "^6.0.1", + "@codemirror/view": "^6.0.3" + } + }, + "node_modules/crelt": { + "version": "1.0.6", + "resolved": "https://registry.npmjs.org/crelt/-/crelt-1.0.6.tgz", + "integrity": "sha512-VQ2MBenTq1fWZUH9DJNGti7kKv6EeAuYr3cLwxUWhIu1baTaXh4Ib5W2CqHVqib4/MqbYGJqiL3Zb8GJZr3l4g==", + "license": "MIT" + }, + "node_modules/esbuild": { + "version": "0.25.8", + "resolved": "https://registry.npmjs.org/esbuild/-/esbuild-0.25.8.tgz", + "integrity": "sha512-vVC0USHGtMi8+R4Kz8rt6JhEWLxsv9Rnu/lGYbPR8u47B+DCBksq9JarW0zOO7bs37hyOK1l2/oqtbciutL5+Q==", + "dev": true, + "hasInstallScript": true, + "license": "MIT", + "bin": { + "esbuild": "bin/esbuild" + }, + "engines": { + "node": ">=18" + }, + "optionalDependencies": { + "@esbuild/aix-ppc64": "0.25.8", + "@esbuild/android-arm": "0.25.8", + "@esbuild/android-arm64": "0.25.8", + "@esbuild/android-x64": "0.25.8", + "@esbuild/darwin-arm64": "0.25.8", + "@esbuild/darwin-x64": "0.25.8", + "@esbuild/freebsd-arm64": "0.25.8", + "@esbuild/freebsd-x64": "0.25.8", + "@esbuild/linux-arm": "0.25.8", + "@esbuild/linux-arm64": "0.25.8", + "@esbuild/linux-ia32": "0.25.8", + "@esbuild/linux-loong64": "0.25.8", + "@esbuild/linux-mips64el": "0.25.8", + "@esbuild/linux-ppc64": "0.25.8", + "@esbuild/linux-riscv64": "0.25.8", + "@esbuild/linux-s390x": "0.25.8", + "@esbuild/linux-x64": "0.25.8", + "@esbuild/netbsd-arm64": "0.25.8", + "@esbuild/netbsd-x64": "0.25.8", + "@esbuild/openbsd-arm64": "0.25.8", + "@esbuild/openbsd-x64": "0.25.8", + "@esbuild/openharmony-arm64": "0.25.8", + "@esbuild/sunos-x64": "0.25.8", + "@esbuild/win32-arm64": "0.25.8", + "@esbuild/win32-ia32": "0.25.8", + "@esbuild/win32-x64": "0.25.8" + } + }, + "node_modules/style-mod": { + "version": "4.1.2", + "resolved": "https://registry.npmjs.org/style-mod/-/style-mod-4.1.2.tgz", + "integrity": "sha512-wnD1HyVqpJUI2+eKZ+eo1UwghftP6yuFheBqqe+bWCotBjC2K1YnteJILRMs3SM4V/0dLEW1SC27MWP5y+mwmw==", + "license": "MIT" + }, + "node_modules/w3c-keyname": { + "version": "2.2.8", + "resolved": "https://registry.npmjs.org/w3c-keyname/-/w3c-keyname-2.2.8.tgz", + "integrity": "sha512-dpojBhNsCNN7T82Tm7k26A6G9ML3NkhDsnw9n/eoxSRlVBB4CEtIQ/KTCLI2Fwf3ataSXRhYFkQi3SlnFwPvPQ==", + "license": "MIT" + } + } +} diff --git a/package.json b/package.json new file mode 100644 index 0000000..6bbe664 --- /dev/null +++ b/package.json @@ -0,0 +1,20 @@ +{ + "private": true, + "scripts": { + "build:js": "rm -rf static/dist && esbuild static/js/inline-editor.js static/js/readonly-rust-editor.js static/js/rust-highlight.js --bundle --splitting --format=esm --minify --outdir=static/dist --entry-names=[name] --chunk-names=chunks/[name]-[hash]" + }, + "devDependencies": { + "esbuild": "0.25.8" + }, + "dependencies": { + "@codemirror/autocomplete": "6.18.0", + "@codemirror/commands": "6.6.0", + "@codemirror/lang-rust": "6.0.1", + "@codemirror/language": "6.10.2", + "@codemirror/state": "6.7.1", + "@codemirror/view": "6.43.7", + "@lezer/highlight": "1.2.0", + "@lezer/rust": "1.0.2", + "@replit/codemirror-vim": "6.2.1" + } +} diff --git a/static/css/base.css b/static/css/base.css index 77733e7..c0f22d0 100644 --- a/static/css/base.css +++ b/static/css/base.css @@ -23,6 +23,13 @@ } /* ---------- Local fonts (served from /static/fonts) ---------- */ +@font-face { + font-family: "Inter"; + src: url("/static/fonts/Inter-roman-latin.woff2") format("woff2"); + font-weight: 400 700; + font-style: normal; + font-display: swap; +} @font-face { font-family: "Happy Headline"; src: url("/static/fonts/Happy-Headline.woff2") format("woff2"); @@ -1314,7 +1321,7 @@ html[data-theme="dark"] .theme-toggle .icon-moon { } /* The .rust-editor element starts as a styled
-like
box so the source is readable even if CodeMirror fails
- to load (network blocked, esm.sh down, etc.). Once the
+ to load (network blocked or a local chunk missing). Once the
read-only viewer mounts and adds a `.cm-editor` child,
we drop our padding/border so the editor's own chrome
isn't double-wrapped. */
diff --git a/static/dist/chunks/chunk-26SC7TXE.js b/static/dist/chunks/chunk-26SC7TXE.js
new file mode 100644
index 0000000..37c5d1f
--- /dev/null
+++ b/static/dist/chunks/chunk-26SC7TXE.js
@@ -0,0 +1 @@
+import{a as u}from"./chunk-7WUKGY2L.js";import{A as n,D as a,E as i,e as o,n as r,w as s}from"./chunk-CSOMSVJQ.js";var m=o.define({name:"rust",parser:u.configure({props:[s.add({IfExpression:n({except:/^\s*({|else\b)/}),"String BlockComment":()=>null,AttributeItem:e=>e.continue(),"Statement MatchArm":n()}),a.add(e=>{if(/(Block|edTokens|List)$/.test(e.name))return i;if(e.name=="BlockComment")return t=>({from:t.from+2,to:t.to-2})})]}),languageData:{commentTokens:{line:"//",block:{open:"/*",close:"*/"}},indentOnInput:/^\s*(?:\{|\})$/,closeBrackets:{stringPrefixes:["b","r","br"]}}});function f(){return new r(m)}export{m as a,f as b};
diff --git a/static/dist/chunks/chunk-6OYJTXGR.js b/static/dist/chunks/chunk-6OYJTXGR.js
new file mode 100644
index 0000000..38095f2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5,5f,8,2,3,,,n,,29,,2,6,,,2,,,2,,2,6j,,2,4,6,2,,2,r,2,2d,8,2,,,2,2y,,,,2,6,,,2t,3,2,4,,5,77,9,,2,6t,,a,2,,,4,,40,4,2,2,4,,w,a,14,6,2,4,8,,9,6,2,3,1a,d,,2,ba,7,,6,,,2a,m,2,7,,2,,2,3e,6,3,,,2,,7,,,20,2,3,,,,9n,2,f0b,5,1n,7,t4,,1r,4,29,,f5k,2,43q,,,3,4,5,8,8,2,7,u,4,44,3,1iz,1j,4,1e,8,,e,,m,5,,f,11s,7,,h,2,7,,2,,5,79,7,c5,4,15s,7,31,7,240,5,gx7k,2o,3k,6o".split(",").map(e=>e?parseInt(e,36):1);for(let e=0,t=0;e>1;if(s=Te[n])e=n+1;else return!0;if(e==t)return!1}}function be(s){return s>=127462&&s<=127487}var Ce=8205;function Me(s,e,t=!0,n=!0){return(t?Re:Xe)(s,e,n)}function Re(s,e,t){if(e==s.length)return e;e&&Be(s.charCodeAt(e))&&Fe(s.charCodeAt(e-1))&&e--;let n=oe(s,e);for(e+=Oe(n);e=0&&be(oe(s,l));)r++,l-=2;if(r%2==0)break;e+=2}else break}return e}function Xe(s,e,t){for(;e>1;){let n=Re(s,e-2,t);if(n=56320&&s<57344}function Fe(s){return s>=55296&&s<56320}function Oe(s){return s<65536?1:2}var m=class s{lineAt(e){if(e<0||e>this.length)throw new RangeError(`Invalid position ${e} in document of length ${this.length}`);return this.lineInner(e,!1,1,0)}line(e){if(e<1||e>this.lines)throw new RangeError(`Invalid line number ${e} in ${this.lines}-line document`);return this.lineInner(e,!0,1,0)}replace(e,t,n){[e,t]=$(this,e,t);let i=[];return this.decompose(0,e,i,2),n.length&&n.decompose(0,n.length,i,3),this.decompose(t,this.length,i,1),J.from(i,this.length-(t-e)+n.length)}append(e){return this.replace(this.length,this.length,e)}slice(e,t=this.length){[e,t]=$(this,e,t);let n=[];return this.decompose(e,t,n,0),J.from(n,t-e)}eq(e){if(e==this)return!0;if(e.length!=this.length||e.lines!=this.lines)return!1;let t=this.scanIdentical(e,1),n=this.length-this.scanIdentical(e,-1),i=new B(this),r=new B(e);for(let l=t,h=t;;){if(i.next(l),r.next(l),l=0,i.lineBreak!=r.lineBreak||i.done!=r.done||i.value!=r.value)return!1;if(h+=i.value.length,i.done||h>=n)return!0}}iter(e=1){return new B(this,e)}iterRange(e,t=this.length){return new Y(this,e,t)}iterLines(e,t){let n;if(e==null)n=this.iter();else{t==null&&(t=this.lines+1);let i=this.line(e).from;n=this.iterRange(i,Math.max(i,t==this.lines+1?this.length:t<=1?0:this.line(t-1).to))}return new _(n)}toString(){return this.sliceString(0)}toJSON(){let e=[];return this.flatten(e),e}constructor(){}static of(e){if(e.length==0)throw new RangeError("A document must have at least one line");return e.length==1&&!e[0]?s.empty:e.length<=32?new k(e):J.from(k.split(e,[]))}},k=class s extends m{constructor(e,t=Ye(e)){super(),this.text=e,this.length=t}get lines(){return this.text.length}get children(){return null}lineInner(e,t,n,i){for(let r=0;;r++){let l=this.text[r],h=i+l.length;if((t?n:h)>=e)return new ue(i,h,n,l);i=h+1,n++}}decompose(e,t,n,i){let r=e<=0&&t>=this.length?this:new s(Le(this.text,e,t),Math.min(t,this.length)-Math.max(0,e));if(i&1){let l=n.pop(),h=X(r.text,l.text.slice(),0,r.length);if(h.length<=32)n.push(new s(h,l.length+r.length));else{let o=h.length>>1;n.push(new s(h.slice(0,o)),new s(h.slice(o)))}}else n.push(r)}replace(e,t,n){if(!(n instanceof s))return super.replace(e,t,n);[e,t]=$(this,e,t);let i=X(this.text,X(n.text,Le(this.text,0,e)),t),r=this.length+n.length-(t-e);return i.length<=32?new s(i,r):J.from(s.split(i,[]),r)}sliceString(e,t=this.length,n=`
+`){[e,t]=$(this,e,t);let i="";for(let r=0,l=0;r<=t&&le&&l&&(i+=n),er&&(i+=h.slice(Math.max(0,e-r),t-r)),r=o+1}return i}flatten(e){for(let t of this.text)e.push(t)}scanIdentical(){return 0}static split(e,t){let n=[],i=-1;for(let r of e)n.push(r),i+=r.length+1,n.length==32&&(t.push(new s(n,i)),n=[],i=-1);return i>-1&&t.push(new s(n,i)),t}},J=class s extends m{constructor(e,t){super(),this.children=e,this.length=t,this.lines=0;for(let n of e)this.lines+=n.lines}lineInner(e,t,n,i){for(let r=0;;r++){let l=this.children[r],h=i+l.length,o=n+l.lines-1;if((t?o:h)>=e)return l.lineInner(e,t,n,i);i=h+1,n=o+1}}decompose(e,t,n,i){for(let r=0,l=0;l<=t&&r=l){let a=i&((l<=e?1:0)|(o>=t?2:0));l>=e&&o<=t&&!a?n.push(h):h.decompose(e-l,t-l,n,a)}l=o+1}}replace(e,t,n){if([e,t]=$(this,e,t),n.lines=r&&t<=h){let o=l.replace(e-r,t-r,n),a=this.lines-l.lines+o.lines;if(o.lines>4&&o.lines>a>>6){let f=this.children.slice();return f[i]=o,new s(f,this.length-(t-e)+n.length)}return super.replace(r,h,o)}r=h+1}return super.replace(e,t,n)}sliceString(e,t=this.length,n=`
+`){[e,t]=$(this,e,t);let i="";for(let r=0,l=0;re&&r&&(i+=n),el&&(i+=h.sliceString(e-l,t-l,n)),l=o+1}return i}flatten(e){for(let t of this.children)t.flatten(e)}scanIdentical(e,t){if(!(e instanceof s))return 0;let n=0,[i,r,l,h]=t>0?[0,0,this.children.length,e.children.length]:[this.children.length-1,e.children.length-1,-1,-1];for(;;i+=t,r+=t){if(i==l||r==h)return n;let o=this.children[i],a=e.children[r];if(o!=a)return n+o.scanIdentical(a,t);n+=o.length+1}}static from(e,t=e.reduce((n,i)=>n+i.length+1,-1)){let n=0;for(let c of e)n+=c.lines;if(n<32){let c=[];for(let g of e)g.flatten(c);return new k(c,t)}let i=Math.max(32,n>>5),r=i<<1,l=i>>1,h=[],o=0,a=-1,f=[];function u(c){let g;if(c.lines>r&&c instanceof s)for(let I of c.children)u(I);else c.lines>l&&(o>l||!o)?(d(),h.push(c)):c instanceof k&&o&&(g=f[f.length-1])instanceof k&&c.lines+g.lines<=32?(o+=c.lines,a+=c.length+1,f[f.length-1]=new k(g.text.concat(c.text),g.length+1+c.length)):(o+c.lines>i&&d(),o+=c.lines,a+=c.length+1,f.push(c))}function d(){o!=0&&(h.push(f.length==1?f[0]:s.from(f,a)),a=-1,o=f.length=0)}for(let c of e)u(c);return d(),h.length==1?h[0]:new s(h,t)}};m.empty=new k([""],0);function Ye(s){let e=-1;for(let t of s)e+=t.length+1;return e}function X(s,e,t=0,n=1e9){for(let i=0,r=0,l=!0;r=t&&(o>n&&(h=h.slice(0,n-i)),i0?1:(e instanceof k?e.text.length:e.children.length)<<1]}nextInner(e,t){for(this.done=this.lineBreak=!1;;){let n=this.nodes.length-1,i=this.nodes[n],r=this.offsets[n],l=r>>1,h=i instanceof k?i.text.length:i.children.length;if(l==(t>0?h:0)){if(n==0)return this.done=!0,this.value="",this;t>0&&this.offsets[n-1]++,this.nodes.pop(),this.offsets.pop()}else if((r&1)==(t>0?0:1)){if(this.offsets[n]+=t,e==0)return this.lineBreak=!0,this.value=`
+`,this;e--}else if(i instanceof k){let o=i.text[l+(t<0?-1:0)];if(this.offsets[n]+=t,o.length>Math.max(0,e))return this.value=e==0?o:t>0?o.slice(e):o.slice(0,o.length-e),this;e-=o.length}else{let o=i.children[l+(t<0?-1:0)];e>o.length?(e-=o.length,this.offsets[n]+=t):(t<0&&this.offsets[n]--,this.nodes.push(o),this.offsets.push(t>0?1:(o instanceof k?o.text.length:o.children.length)<<1))}}}next(e=0){return e<0&&(this.nextInner(-e,-this.dir),e=this.value.length),this.nextInner(e,this.dir)}},Y=class{constructor(e,t,n){this.value="",this.done=!1,this.cursor=new B(e,t>n?-1:1),this.pos=t>n?e.length:0,this.from=Math.min(t,n),this.to=Math.max(t,n)}nextInner(e,t){if(t<0?this.pos<=this.from:this.pos>=this.to)return this.value="",this.done=!0,this;e+=Math.max(0,t<0?this.pos-this.to:this.from-this.pos);let n=t<0?this.pos-this.from:this.to-this.pos;e>n&&(e=n),n-=e;let{value:i}=this.cursor.next(e);return this.pos+=(i.length+e)*t,this.value=i.length<=n?i:t<0?i.slice(i.length-n):i.slice(0,n),this.done=!this.value,this}next(e=0){return e<0?e=Math.max(e,this.from-this.pos):e>0&&(e=Math.min(e,this.to-this.pos)),this.nextInner(e,this.cursor.dir)}get lineBreak(){return this.cursor.lineBreak&&this.value!=""}},_=class{constructor(e){this.inner=e,this.afterBreak=!0,this.value="",this.done=!1}next(e=0){let{done:t,lineBreak:n,value:i}=this.inner.next(e);return t&&this.afterBreak?(this.value="",this.afterBreak=!1):t?(this.done=!0,this.value=""):n?this.afterBreak?this.value="":(this.afterBreak=!0,this.next()):(this.value=i,this.afterBreak=!1),this}get lineBreak(){return!1}};typeof Symbol<"u"&&(m.prototype[Symbol.iterator]=function(){return this.iter()},B.prototype[Symbol.iterator]=Y.prototype[Symbol.iterator]=_.prototype[Symbol.iterator]=function(){return this});var ue=class{constructor(e,t,n,i){this.from=e,this.to=t,this.number=n,this.text=i}get length(){return this.to-this.from}};function $(s,e,t){return e=Math.max(0,Math.min(s.length,e)),[e,Math.max(e,Math.min(s.length,t))]}function ee(s,e,t=!0,n=!0){return Me(s,e,t,n)}function _e(s){return s>=56320&&s<57344}function et(s){return s>=55296&&s<56320}function dt(s,e){let t=s.charCodeAt(e);if(!et(t)||e+1==s.length)return t;let n=s.charCodeAt(e+1);return _e(n)?(t-55296<<10)+(n-56320)+65536:t}function gt(s){return s<=65535?String.fromCharCode(s):(s-=65536,String.fromCharCode((s>>10)+55296,(s&1023)+56320))}function pt(s){return s<65536?1:2}var ce=/\r\n?|\n/,E=function(s){return s[s.Simple=0]="Simple",s[s.TrackDel=1]="TrackDel",s[s.TrackBefore=2]="TrackBefore",s[s.TrackAfter=3]="TrackAfter",s}(E||(E={})),F=class s{constructor(e){this.sections=e}get length(){let e=0;for(let t=0;te)return r+(e-i);r+=h}else{if(n!=E.Simple&&a>=e&&(n==E.TrackDel&&ie||n==E.TrackBefore&&ie))return null;if(a>e||a==e&&t<0&&!h)return e==i||t<0?r:r+o;r+=o}i=a}if(e>i)throw new RangeError(`Position ${e} is out of range for changeset of length ${i}`);return r}touchesRange(e,t=e){for(let n=0,i=0;n=0&&i<=t&&h>=e)return it?"cover":!0;i=h}return!1}toString(){let e="";for(let t=0;t=0?":"+i:"")}return e}toJSON(){return this.sections}static fromJSON(e){if(!Array.isArray(e)||e.length%2||e.some(t=>typeof t!="number"))throw new RangeError("Invalid JSON representation of ChangeDesc");return new s(e)}static create(e){return new s(e)}},P=class s extends F{constructor(e,t){super(e),this.inserted=t}apply(e){if(this.length!=e.length)throw new RangeError("Applying change set to a document with the wrong length");return de(this,(t,n,i,r,l)=>e=e.replace(i,i+(n-t),l),!1),e}mapDesc(e,t=!1){return ge(this,e,t,!0)}invert(e){let t=this.sections.slice(),n=[];for(let i=0,r=0;i=0){t[i]=h,t[i+1]=l;let o=i>>1;for(;n.length0&&b(n,t,r.text),r.forward(f),h+=f}let a=e[l++];for(;h>1].toJSON()))}return e}static of(e,t,n){let i=[],r=[],l=0,h=null;function o(f=!1){if(!f&&!i.length)return;ld||u<0||d>t)throw new RangeError(`Invalid change range ${u} to ${d} (in doc of length ${t})`);let g=c?typeof c=="string"?m.of(c.split(n||ce)):c:m.empty,I=g.length;if(u==d&&I==0)return;ul&&w(i,u-l,-1),w(i,d-u,I),b(r,i,g),l=d}}return a(e),o(!h),h}static empty(e){return new s(e?[e,-1]:[],[])}static fromJSON(e){if(!Array.isArray(e))throw new RangeError("Invalid JSON representation of ChangeSet");let t=[],n=[];for(let i=0;ih&&typeof l!="string"))throw new RangeError("Invalid JSON representation of ChangeSet");if(r.length==1)t.push(r[0],0);else{for(;n.length=0&&t<=0&&t==s[i+1]?s[i]+=e:i>=0&&e==0&&s[i]==0?s[i+1]+=t:n?(s[i]+=e,s[i+1]+=t):s.push(e,t)}function b(s,e,t){if(t.length==0)return;let n=e.length-2>>1;if(n>1])),!(t||l==s.sections.length||s.sections[l+1]<0);)h=s.sections[l++],o=s.sections[l++];e(i,a,r,f,u),i=a,r=f}}}function ge(s,e,t,n=!1){let i=[],r=n?[]:null,l=new L(s),h=new L(e);for(let o=-1;;){if(l.done&&h.len||h.done&&l.len)throw new Error("Mismatched change set lengths");if(l.ins==-1&&h.ins==-1){let a=Math.min(l.len,h.len);w(i,a,-1),l.forward(a),h.forward(a)}else if(h.ins>=0&&(l.ins<0||o==l.i||l.off==0&&(h.len=0&&o=0){let a=0,f=l.len;for(;f;)if(h.ins==-1){let u=Math.min(f,h.len);a+=u,f-=u,h.forward(u)}else if(h.ins==0&&h.leno||l.ins>=0&&l.len>o)&&(h||n.length>a),r.forward2(o),l.forward(o)}}}}var L=class{constructor(e){this.set=e,this.i=0,this.next()}next(){let{sections:e}=this.set;this.i>1;return t>=e.length?m.empty:e[t]}textBit(e){let{inserted:t}=this.set,n=this.i-2>>1;return n>=t.length&&!e?m.empty:t[n].slice(this.off,e==null?void 0:this.off+e)}forward(e){e==this.len?this.next():(this.len-=e,this.off+=e)}forward2(e){this.ins==-1?this.forward(e):e==this.ins?this.next():(this.ins-=e,this.off+=e)}},T=class s{constructor(e,t,n,i){this.from=e,this.to=t,this.flags=n,this.goalColumn=i}get anchor(){return this.flags&32?this.to:this.from}get head(){return this.flags&32?this.from:this.to}get empty(){return this.from==this.to}get assoc(){return this.flags&8?-1:this.flags&16?1:0}get undirectional(){return(this.flags&64)>0}get bidiLevel(){let e=this.flags&7;return e==7?null:e}map(e,t=-1){let n,i;return this.empty?n=i=e.mapPos(this.from,t):(n=e.mapPos(this.from,1),i=e.mapPos(this.to,-1)),n==this.from&&i==this.to?this:new s(n,i,this.flags,this.goalColumn)}extend(e,t=e,n=0){if(e<=this.anchor&&t>=this.anchor)return x.range(e,t,void 0,void 0,n);let i=Math.abs(e-this.anchor)>Math.abs(t-this.anchor)?e:t;return x.range(this.anchor,i,void 0,void 0,n)}eq(e,t=!1){return this.anchor==e.anchor&&this.head==e.head&&this.goalColumn==e.goalColumn&&(!t||!this.empty||this.assoc==e.assoc)}toJSON(){return{anchor:this.anchor,head:this.head}}static fromJSON(e){if(!e||typeof e.anchor!="number"||typeof e.head!="number")throw new RangeError("Invalid JSON representation for SelectionRange");return x.range(e.anchor,e.head)}static create(e,t,n,i){return new s(e,t,n,i)}},x=class s{constructor(e,t){this.ranges=e,this.mainIndex=t}map(e,t=-1){return e.empty?this:s.create(this.ranges.map(n=>n.map(e,t)),this.mainIndex)}eq(e,t=!1){if(this.ranges.length!=e.ranges.length||this.mainIndex!=e.mainIndex)return!1;for(let n=0;ne.toJSON()),main:this.mainIndex}}static fromJSON(e){if(!e||!Array.isArray(e.ranges)||typeof e.main!="number"||e.main>=e.ranges.length)throw new RangeError("Invalid JSON representation for EditorSelection");return new s(e.ranges.map(t=>T.fromJSON(t)),e.main)}static single(e,t=e){return new s([s.range(e,t)],0)}static create(e,t=0){if(e.length==0)throw new RangeError("A selection needs at least one range");for(let n=0,i=0;ii.from-r.from),t=e.indexOf(n);for(let i=1;ir.head?s.range(o,h):s.range(h,o))}}return new s(e,t)}};function qe(s,e){for(let t of s.ranges)if(t.to>e)throw new RangeError("Selection points outside of document")}var Ae=0,y=class s{constructor(e,t,n,i,r){this.combine=e,this.compareInput=t,this.compare=n,this.isStatic=i,this.id=Ae++,this.default=e([]),this.extensions=typeof r=="function"?r(this):r}get reader(){return this}static define(e={}){return new s(e.combine||(t=>t),e.compareInput||((t,n)=>t===n),e.compare||(e.combine?(t,n)=>t===n:Pe),!!e.static,e.enables)}of(e){return new N([],this,0,e)}compute(e,t){if(this.isStatic)throw new Error("Can't compute a static facet");return new N(e,this,1,t)}computeN(e,t){if(this.isStatic)throw new Error("Can't compute a static facet");return new N(e,this,2,t)}from(e,t){return t||(t=n=>n),this.compute([e],n=>t(n.field(e)))}};function Pe(s,e){return s==e||s.length==e.length&&s.every((t,n)=>t===e[n])}var N=class{constructor(e,t,n,i){this.dependencies=e,this.facet=t,this.type=n,this.value=i,this.id=Ae++}dynamicSlot(e){var t;let n=this.value,i=this.facet.compareInput,r=this.id,l=e[r]>>1,h=this.type==2,o=!1,a=!1,f=[];for(let u of this.dependencies)u=="doc"?o=!0:u=="selection"?a=!0:(((t=e[u.id])!==null&&t!==void 0?t:1)&1)==0&&f.push(e[u.id]);return{create(u){return u.values[l]=n(u),1},update(u,d){if(o&&d.docChanged||a&&(d.docChanged||d.selection)||pe(u,f)){let c=n(u);if(h?!De(c,u.values[l],i):!i(c,u.values[l]))return u.values[l]=c,1}return 0},reconfigure:(u,d)=>{let c,g=d.config.address[r];if(g!=null){let I=se(d,g);if(this.dependencies.every(p=>p instanceof y?d.facet(p)===u.facet(p):p instanceof q?d.field(p,!1)==u.field(p,!1):!0)||(h?De(c=n(u),I,i):i(c=n(u),I)))return u.values[l]=I,0}else c=n(u);return u.values[l]=c,1}}}get extension(){return this}};function De(s,e,t){if(s.length!=e.length)return!1;for(let n=0;ns[o.id]),i=t.map(o=>o.type),r=n.filter(o=>!(o&1)),l=s[e.id]>>1;function h(o){let a=[];for(let f=0;fn===i),e);return e.provide&&(t.provides=e.provide(t)),t}create(e){let t=e.facet(Z).find(n=>n.field==this);return(t?.create||this.createF)(e)}slot(e){let t=e[this.id]>>1;return{create:n=>(n.values[t]=this.create(n),1),update:(n,i)=>{let r=n.values[t],l=this.updateF(r,i);return this.compareF(r,l)?0:(n.values[t]=l,1)},reconfigure:(n,i)=>{let r=n.facet(Z),l=i.facet(Z),h;return(h=r.find(o=>o.field==this))&&h!=l.find(o=>o.field==this)?(n.values[t]=h.create(n),1):i.config.address[this.id]!=null?(n.values[t]=i.field(this),0):(n.values[t]=this.create(n),1)}}}init(e){return[this,Z.of({field:this,create:e})]}get extension(){return this}},M={lowest:4,low:3,default:2,high:1,highest:0};function W(s){return e=>new te(e,s)}var mt={highest:W(M.highest),high:W(M.high),default:W(M.default),low:W(M.low),lowest:W(M.lowest)},te=class{constructor(e,t){this.inner=e,this.prec=t}get extension(){return this}},ne=class s{of(e){return new G(this,e)}reconfigure(e){return s.reconfigure.of({compartment:this,extension:e})}get(e){return e.config.compartments.get(this)}},G=class{constructor(e,t){this.compartment=e,this.inner=t}get extension(){return this}},ie=class s{constructor(e,t,n,i,r,l){for(this.base=e,this.compartments=t,this.dynamicSlots=n,this.address=i,this.staticValues=r,this.facets=l,this.statusTemplate=[];this.statusTemplate.length>1]}static resolve(e,t,n){let i=[],r=Object.create(null),l=new Map;for(let d of nt(e,t,l))d instanceof q?i.push(d):(r[d.facet.id]||(r[d.facet.id]=[])).push(d);let h=Object.create(null),o=[],a=[];for(let d of i)h[d.id]=a.length<<1,a.push(c=>d.slot(c));let f=n?.config.facets;for(let d in r){let c=r[d],g=c[0].facet,I=f&&f[d]||[];if(c.every(p=>p.type==0))if(h[g.id]=o.length<<1|1,Pe(I,c))o.push(n.facet(g));else{let p=g.combine(c.map(he=>he.value));o.push(n&&g.compare(p,n.facet(g))?n.facet(g):p)}else{for(let p of c)p.type==0?(h[p.id]=o.length<<1|1,o.push(p.value)):(h[p.id]=a.length<<1,a.push(he=>p.dynamicSlot(he)));h[g.id]=a.length<<1,a.push(p=>tt(p,g,c))}}let u=a.map(d=>d(h));return new s(e,l,u,h,o,r)}};function nt(s,e,t){let n=[[],[],[],[],[]],i=new Map;function r(l,h){let o=i.get(l);if(o!=null){if(o<=h)return;let a=n[o].indexOf(l);a>-1&&n[o].splice(a,1),l instanceof G&&t.delete(l.compartment)}if(i.set(l,h),Array.isArray(l))for(let a of l)r(a,h);else if(l instanceof G){if(t.has(l.compartment))throw new RangeError("Duplicate use of compartment in extensions");let a=e.get(l.compartment)||l.inner;t.set(l.compartment,a),r(a,h)}else if(l instanceof te)r(l.inner,l.prec);else if(l instanceof q)n[h].push(l),l.provides&&r(l.provides,h);else if(l instanceof N)n[h].push(l),l.facet.extensions&&r(l.facet.extensions,M.default);else{let a=l.extension;if(!a)throw new Error(`Unrecognized extension value in extension set (${l}).`);if(a==l)throw new Error(`Unrecognized extension value in extension set (${l}). This sometimes happens because multiple instances of @codemirror/state are loaded, breaking instanceof checks.`);r(a,h)}}return r(s,M.default),n.reduce((l,h)=>l.concat(h))}function U(s,e){if(e&1)return 2;let t=e>>1,n=s.status[t];if(n==4)throw new Error("Cyclic dependency between fields and/or facets");if(n&2)return n;s.status[t]=4;let i=s.computeSlot(s,s.config.dynamicSlots[t]);return s.status[t]=2|i}function se(s,e){return e&1?s.config.staticValues[e>>1]:s.values[e>>1]}var ze=y.define(),me=y.define({combine:s=>s.some(e=>e),static:!0}),We=y.define({combine:s=>s.length?s[0]:void 0,static:!0}),Ue=y.define(),Ge=y.define(),He=y.define(),je=y.define({combine:s=>s.length?s[0]:!1}),D=class{constructor(e,t){this.type=e,this.value=t}static define(){return new we}},we=class{of(e){return new D(this,e)}},ve=class{constructor(e){this.map=e}of(e){return new v(this,e)}},v=class s{constructor(e,t){this.type=e,this.value=t}map(e){let t=this.type.map(this.value,e);return t===void 0?void 0:t==this.value?this:new s(this.type,t)}is(e){return this.type==e}static define(e={}){return new ve(e.map||(t=>t))}static mapEffects(e,t){if(!e.length)return e;let n=[];for(let i of e){let r=i.map(t);r&&n.push(r)}return n}};v.reconfigure=v.define();v.appendConfig=v.define();var S=class s{constructor(e,t,n,i,r,l){this.startState=e,this.changes=t,this.selection=n,this.effects=i,this.annotations=r,this.scrollIntoView=l,this._doc=null,this._state=null,n&&qe(n,t.newLength),r.some(h=>h.type==s.time)||(this.annotations=r.concat(s.time.of(Date.now())))}static create(e,t,n,i,r,l){return new s(e,t,n,i,r,l)}get newDoc(){return this._doc||(this._doc=this.changes.apply(this.startState.doc))}get newSelection(){return this.selection||this.startState.selection.map(this.changes)}get state(){return this._state||this.startState.applyTransaction(this),this._state}annotation(e){for(let t of this.annotations)if(t.type==e)return t.value}get docChanged(){return!this.changes.empty}get reconfigured(){return this.startState.config!=this.state.config}isUserEvent(e){let t=this.annotation(s.userEvent);return!!(t&&(t==e||t.length>e.length&&t.slice(0,e.length)==e&&t[e.length]=="."))}};S.time=D.define();S.userEvent=D.define();S.addToHistory=D.define();S.remote=D.define();function it(s,e){let t=[];for(let n=0,i=0;;){let r,l;if(n=s[n]))r=s[n++],l=s[n++];else if(i=0;i--){let r=n[i](s);r instanceof S?s=r:Array.isArray(r)&&r.length==1&&r[0]instanceof S?s=r[0]:s=Ke(e,V(r),!1)}return s}function rt(s){let e=s.startState,t=e.facet(He),n=s;for(let i=t.length-1;i>=0;i--){let r=t[i](s);r&&Object.keys(r).length&&(n=Ze(n,xe(e,r,s.changes.newLength),!0))}return n==s?s:S.create(e,s.changes,s.selection,n.effects,n.annotations,n.scrollIntoView)}var lt=[];function V(s){return s==null?lt:Array.isArray(s)?s:[s]}var C=function(s){return s[s.Word=0]="Word",s[s.Space=1]="Space",s[s.Other=2]="Other",s}(C||(C={})),ht=/[\u00df\u0587\u0590-\u05f4\u0600-\u06ff\u3040-\u309f\u30a0-\u30ff\u3400-\u4db5\u4e00-\u9fcc\uac00-\ud7af]/,ke;try{ke=new RegExp("[\\p{Alphabetic}\\p{Number}_]","u")}catch{}function ot(s){if(ke)return ke.test(s);for(let e=0;e"\x80"&&(t.toUpperCase()!=t.toLowerCase()||ht.test(t)))return!0}return!1}function at(s){return e=>{if(!/\S/.test(e))return C.Space;if(ot(e))return C.Word;for(let t=0;t-1)return C.Word;return C.Other}}var A=class s{constructor(e,t,n,i,r,l){this.config=e,this.doc=t,this.selection=n,this.values=i,this.status=e.statusTemplate.slice(),this.computeSlot=r,l&&(l._state=this);for(let h=0;hi.set(a,o)),t=null),i.set(h.value.compartment,h.value.extension)):h.is(v.reconfigure)?(t=null,n=h.value):h.is(v.appendConfig)&&(t=null,n=V(n).concat(h.value));let r;t?r=e.startState.values.slice():(t=ie.resolve(n,i,this),r=new s(t,this.doc,this.selection,t.dynamicSlots.map(()=>null),(o,a)=>a.reconfigure(o,this),null).values);let l=e.startState.facet(me)?e.newSelection:e.newSelection.asSingle();new s(t,e.newDoc,l,r,(h,o)=>o.update(h,e),e)}replaceSelection(e){return typeof e=="string"&&(e=this.toText(e)),this.changeByRange(t=>({changes:{from:t.from,to:t.to,insert:e},range:x.cursor(t.from+e.length)}))}changeByRange(e){let t=this.selection,n=e(t.ranges[0]),i=this.changes(n.changes),r=[n.range],l=V(n.effects);for(let h=1;hl.spec.fromJSON(h,o)))}}return s.create({doc:e.doc,selection:x.fromJSON(e.selection),extensions:t.extensions?i.concat([t.extensions]):i})}static create(e={}){let t=ie.resolve(e.extensions||[],new Map),n=e.doc instanceof m?e.doc:m.of((e.doc||"").split(t.staticFacet(s.lineSeparator)||ce)),i=e.selection?e.selection instanceof x?e.selection:x.single(e.selection.anchor,e.selection.head):x.single(0);return qe(i,n.length),t.staticFacet(me)||(i=i.asSingle()),new s(t,n,i,t.dynamicSlots.map(()=>null),(r,l)=>l.create(r),null)}get tabSize(){return this.facet(s.tabSize)}get lineBreak(){return this.facet(s.lineSeparator)||`
+`}get readOnly(){return this.facet(je)}phrase(e,...t){for(let n of this.facet(s.phrases))if(Object.prototype.hasOwnProperty.call(n,e)){e=n[e];break}return t.length&&(e=e.replace(/\$(\$|\d*)/g,(n,i)=>{if(i=="$")return"$";let r=+(i||1);return!r||r>t.length?n:t[r-1]})),e}languageDataAt(e,t,n=-1){let i=[];for(let r of this.facet(ze))for(let l of r(this,t,n))Object.prototype.hasOwnProperty.call(l,e)&&i.push(l[e]);return i}charCategorizer(e){let t=this.languageDataAt("wordChars",e);return at(t.length?t[0]:"")}wordAt(e){let{text:t,from:n,length:i}=this.doc.lineAt(e),r=this.charCategorizer(e),l=e-n,h=e-n;for(;l>0;){let o=ee(t,l,!1);if(r(t.slice(o,l))!=C.Word)break;l=o}for(;hs.length?s[0]:4});A.lineSeparator=We;A.readOnly=je;A.phrases=y.define({compare(s,e){let t=Object.keys(s),n=Object.keys(e);return t.length==n.length&&t.every(i=>s[i]==e[i])}});A.languageData=ze;A.changeFilter=Ue;A.transactionFilter=Ge;A.transactionExtender=He;ne.reconfigure=v.define();function wt(s,e,t={}){let n={};for(let i of s)for(let r of Object.keys(i)){let l=i[r],h=n[r];if(h===void 0)n[r]=l;else if(!(h===l||l===void 0))if(Object.hasOwnProperty.call(t,r))n[r]=t[r](h,l);else throw new Error("Config merge conflict for field "+r)}for(let i in e)n[i]===void 0&&(n[i]=e[i]);return n}var z=class{eq(e){return this==e}range(e,t=e){return H.create(e,t,this)}};z.prototype.startSide=z.prototype.endSide=0;z.prototype.point=!1;z.prototype.mapMode=E.TrackDel;function Ee(s,e){return s==e||s.constructor==e.constructor&&s.eq(e)}var H=class s{constructor(e,t,n){this.from=e,this.to=t,this.value=n}static create(e,t,n){return new s(e,t,n)}};function ye(s,e){return s.from-e.from||s.value.startSide-e.value.startSide}var Se=class s{constructor(e,t,n,i){this.from=e,this.to=t,this.value=n,this.maxPoint=i}get length(){return this.to[this.to.length-1]}findIndex(e,t,n,i=0){let r=n?this.to:this.from;for(let l=i,h=r.length;;){if(l==h)return l;let o=l+h>>1,a=r[o]-e||(n?this.value[o].endSide:this.value[o].startSide)-t;if(o==l)return a>=0?l:h;a>=0?h=o:l=o+1}}between(e,t,n,i){for(let r=this.findIndex(t,-1e9,!0),l=this.findIndex(n,1e9,!1,r);rc||d==c&&a.startSide>0&&a.endSide<=0)continue;(c-d||a.endSide-a.startSide)<0||(l<0&&(l=d),a.point&&(h=Math.max(h,c-d)),n.push(a),i.push(d-l),r.push(c-l))}return{mapped:n.length?new s(i,r,n,h):null,pos:l}}},O=class s{constructor(e,t,n,i){this.chunkPos=e,this.chunk=t,this.nextLayer=n,this.maxPoint=i}static create(e,t,n,i){return new s(e,t,n,i)}get length(){let e=this.chunk.length-1;return e<0?0:Math.max(this.chunkEnd(e),this.nextLayer.length)}get size(){if(this.isEmpty)return 0;let e=this.nextLayer.size;for(let t of this.chunk)e+=t.value.length;return e}chunkEnd(e){return this.chunkPos[e]+this.chunk[e].length}update(e){let{add:t=[],sort:n=!1,filterFrom:i=0,filterTo:r=this.length}=e,l=e.filter;if(t.length==0&&!l)return this;if(n&&(t=t.slice().sort(ye)),this.isEmpty)return t.length?s.of(t):this;let h=new le(this,null,-1).goto(0),o=0,a=[],f=new re;for(;h.value||o=0){let u=t[o++];f.addInner(u.from,u.to,u.value)||a.push(u)}else h.rangeIndex==1&&h.chunkIndexthis.chunkEnd(h.chunkIndex)||rh.to||r=r&&e<=r+l.length&&l.between(r,e-r,t-r,n)===!1)return}this.nextLayer.between(e,t,n)}}iter(e=0){return j.from([this]).goto(e)}get isEmpty(){return this.nextLayer==this}static iter(e,t=0){return j.from(e).goto(t)}static compare(e,t,n,i,r=-1){let l=e.filter(u=>u.maxPoint>0||!u.isEmpty&&u.maxPoint>=r),h=t.filter(u=>u.maxPoint>0||!u.isEmpty&&u.maxPoint>=r),o=Je(l,h,n),a=new R(l,o,r),f=new R(h,o,r);n.iterGaps((u,d,c)=>Ne(a,u,f,d,c,i)),n.empty&&n.length==0&&Ne(a,0,f,0,0,i)}static eq(e,t,n=0,i){i==null&&(i=999999999);let r=e.filter(f=>!f.isEmpty&&t.indexOf(f)<0),l=t.filter(f=>!f.isEmpty&&e.indexOf(f)<0);if(r.length!=l.length)return!1;if(!r.length)return!0;let h=Je(r,l),o=new R(r,h,0).goto(n),a=new R(l,h,0).goto(n);for(;;){if(o.to!=a.to||!Ie(o.active,a.active)||o.point&&(!a.point||!Ee(o.point,a.point)))return!1;if(o.to>i)return!0;o.next(),a.next()}}static spans(e,t,n,i,r=-1){let l=new R(e,null,r).goto(t),h=t,o=l.openStart;for(;;){let a=Math.min(l.to,n);if(l.point){let f=l.activeForPoint(l.to),u=l.pointFromh&&(i.span(h,a,l.active,o),o=l.openEnd(a));if(l.to>n)return o+(l.point&&l.to>n?1:0);h=l.to,l.next()}}static of(e,t=!1){let n=new re;for(let i of e instanceof H?[e]:t?ft(e):e)n.add(i.from,i.to,i.value);return n.finish()}static join(e){if(!e.length)return s.empty;let t=e[e.length-1];for(let n=e.length-2;n>=0;n--)for(let i=e[n];i!=s.empty;i=i.nextLayer)t=new s(i.chunkPos,i.chunk,t,Math.max(i.maxPoint,t.maxPoint));return t}};O.empty=new O([],[],null,-1);function ft(s){if(s.length>1)for(let e=s[0],t=1;t0)return s.slice().sort(ye);e=n}return s}O.empty.nextLayer=O.empty;var re=class s{finishChunk(e){this.chunks.push(new Se(this.from,this.to,this.value,this.maxPoint)),this.chunkPos.push(this.chunkStart),this.chunkStart=-1,this.setMaxPoint=Math.max(this.setMaxPoint,this.maxPoint),this.maxPoint=-1,e&&(this.from=[],this.to=[],this.value=[])}constructor(){this.chunks=[],this.chunkPos=[],this.chunkStart=-1,this.last=null,this.lastFrom=-1e9,this.lastTo=-1e9,this.from=[],this.to=[],this.value=[],this.maxPoint=-1,this.setMaxPoint=-1,this.nextLayer=null}add(e,t,n){this.addInner(e,t,n)||(this.nextLayer||(this.nextLayer=new s)).add(e,t,n)}addInner(e,t,n){let i=e-this.lastTo||n.startSide-this.last.endSide;if(i<=0&&(e-this.lastFrom||n.startSide-this.last.startSide)<0)throw new Error("Ranges must be added sorted by `from` position and `startSide`");return i<0?!1:(this.from.length==250&&this.finishChunk(!0),this.chunkStart<0&&(this.chunkStart=e),this.from.push(e-this.chunkStart),this.to.push(t-this.chunkStart),this.last=n,this.lastFrom=e,this.lastTo=t,this.value.push(n),n.point&&(this.maxPoint=Math.max(this.maxPoint,t-e)),!0)}addChunk(e,t){if((e-this.lastTo||t.value[0].startSide-this.last.endSide)<0)return!1;this.from.length&&this.finishChunk(!0),this.setMaxPoint=Math.max(this.setMaxPoint,t.maxPoint),this.chunks.push(t),this.chunkPos.push(e);let n=t.value.length-1;return this.last=t.value[n],this.lastFrom=t.from[n]+e,this.lastTo=t.to[n]+e,!0}finish(){return this.finishInner(O.empty)}finishInner(e){if(this.from.length&&this.finishChunk(!1),this.chunks.length==0)return e;let t=O.create(this.chunkPos,this.chunks,this.nextLayer?this.nextLayer.finishInner(e):e,this.setMaxPoint);return this.from=null,t}};function Je(s,e,t){let n=new Map;for(let r of s)for(let l=0;l=this.minPoint)break}}setRangeIndex(e){if(e==this.layer.chunk[this.chunkIndex].value.length){if(this.chunkIndex++,this.skip)for(;this.chunkIndex=n&&i.push(new le(l,t,n,r));return i.length==1?i[0]:new s(i)}get startSide(){return this.value?this.value.startSide:0}goto(e,t=-1e9){for(let n of this.heap)n.goto(e,t);for(let n=this.heap.length>>1;n>=0;n--)fe(this.heap,n);return this.next(),this}forward(e,t){for(let n of this.heap)n.forward(e,t);for(let n=this.heap.length>>1;n>=0;n--)fe(this.heap,n);(this.to-e||this.value.endSide-t)<0&&this.next()}next(){if(this.heap.length==0)this.from=this.to=1e9,this.value=null,this.rank=-1;else{let e=this.heap[0];this.from=e.from,this.to=e.to,this.value=e.value,this.rank=e.rank,e.value&&e.next(),fe(this.heap,0)}}};function fe(s,e){for(let t=s[e];;){let n=(e<<1)+1;if(n>=s.length)break;let i=s[n];if(n+1=0&&(i=s[n+1],n++),t.compare(i)<0)break;s[n]=t,s[e]=i,e=n}}var R=class{constructor(e,t,n){this.minPoint=n,this.active=[],this.activeTo=[],this.activeRank=[],this.minActive=-1,this.point=null,this.pointFrom=0,this.pointRank=0,this.to=-1e9,this.endSide=0,this.openStart=-1,this.cursor=j.from(e,t,n)}goto(e,t=-1e9){return this.cursor.goto(e,t),this.active.length=this.activeTo.length=this.activeRank.length=0,this.minActive=-1,this.to=e,this.endSide=t,this.openStart=-1,this.next(),this}forward(e,t){for(;this.minActive>-1&&(this.activeTo[this.minActive]-e||this.active[this.minActive].endSide-t)<0;)this.removeActive(this.minActive);this.cursor.forward(e,t)}removeActive(e){K(this.active,e),K(this.activeTo,e),K(this.activeRank,e),this.minActive=Ve(this.active,this.activeTo)}addActive(e){let t=0,{value:n,to:i,rank:r}=this.cursor;for(;t0;)t++;Q(this.active,t,n),Q(this.activeTo,t,i),Q(this.activeRank,t,r),e&&Q(e,t,this.cursor.from),this.minActive=Ve(this.active,this.activeTo)}next(){let e=this.to,t=this.point;this.point=null;let n=this.openStart<0?[]:null;for(;;){let i=this.minActive;if(i>-1&&(this.activeTo[i]-this.cursor.from||this.active[i].endSide-this.cursor.startSide)<0){if(this.activeTo[i]>e){this.to=this.activeTo[i],this.endSide=this.active[i].endSide;break}this.removeActive(i),n&&K(n,i)}else if(this.cursor.value)if(this.cursor.from>e){this.to=this.cursor.from,this.endSide=this.cursor.startSide;break}else{let r=this.cursor.value;if(!r.point)this.addActive(n),this.cursor.next();else if(t&&this.cursor.to==this.to&&this.cursor.from=0&&n[i]=0&&!(this.activeRank[n]e||this.activeTo[n]==e&&this.active[n].endSide>=this.point.endSide)&&t.push(this.active[n]);return t.reverse()}openEnd(e){let t=0;for(let n=this.activeTo.length-1;n>=0&&this.activeTo[n]>e;n--)t++;return t}};function Ne(s,e,t,n,i,r){s.goto(e),t.goto(n);let l=n+i,h=n,o=n-e,a=!!r.boundChange;for(let f=!1;;){let u=s.to+o-t.to,d=u||s.endSide-t.endSide,c=d<0?s.to+o:t.to,g=Math.min(c,l);if(s.point||t.point?(s.point&&t.point&&Ee(s.point,t.point)&&Ie(s.activeForPoint(s.to),t.activeForPoint(t.to))||r.comparePoint(h,g,s.point,t.point),f=!1):(f&&r.boundChange(h),g>h&&!Ie(s.active,t.active)&&r.compareRange(h,g,s.active,t.active),a&&gl)break;h=c,d<=0&&s.next(),d>=0&&t.next()}}function Ie(s,e){if(s.length!=e.length)return!1;for(let t=0;t=e;n--)s[n+1]=s[n];s[e]=t}function Ve(s,e){let t=-1,n=1e9;for(let i=0;i=e)return i;if(i==s.length)break;r+=s.charCodeAt(i)==9?t-r%t:1,i=ee(s,i)}return n===!0?-1:s.length}export{m as a,ue as b,ee as c,dt as d,gt as e,pt as f,E as g,F as h,P as i,T as j,x as k,y as l,q as m,mt as n,ne as o,D as p,we as q,ve as r,v as s,S as t,C as u,A as v,wt as w,z as x,H as y,O as z,re as A,vt as B,xt as C};
diff --git a/static/dist/chunks/chunk-7WUKGY2L.js b/static/dist/chunks/chunk-7WUKGY2L.js
new file mode 100644
index 0000000..da32bc8
--- /dev/null
+++ b/static/dist/chunks/chunk-7WUKGY2L.js
@@ -0,0 +1 @@
+import{a as Y,b as j,c as A,d as E,e as W,g as I,h as N,k as X}from"./chunk-CGTIGMIP.js";var x=class r{constructor(O,e,t,i,s,Q,n,a,P,h=0,$){this.p=O,this.stack=e,this.state=t,this.reducePos=i,this.pos=s,this.score=Q,this.buffer=n,this.bufferBase=a,this.curContext=P,this.lookAhead=h,this.parent=$}toString(){return`[${this.stack.filter((O,e)=>e%3==0).concat(this.state)}]@${this.pos}${this.score?"!"+this.score:""}`}static start(O,e,t=0){let i=O.parser.context;return new r(O,[],e,t,t,0,[],0,i?new b(i,i.start):null,0,null)}get context(){return this.curContext?this.curContext.context:null}pushState(O,e){this.stack.push(this.state,e,this.bufferBase+this.buffer.length),this.state=O}reduce(O){var e;let t=O>>19,i=O&65535,{parser:s}=this.p;this.reducePos=2e3&&!(!((e=this.p.parser.nodeSet.types[i])===null||e===void 0)&&e.isAnonymous)&&(a==this.p.lastBigReductionStart?(this.p.bigReductionCount++,this.p.lastBigReductionSize=P):this.p.lastBigReductionSizen;)this.stack.pop();this.reduceContext(i,a)}storeNode(O,e,t,i=4,s=!1){if(O==0&&(!this.stack.length||this.stack[this.stack.length-1]0&&Q.buffer[n-4]==0&&Q.buffer[n-1]>-1){if(e==t)return;if(Q.buffer[n-2]>=e){Q.buffer[n-2]=t;return}}}if(!s||this.pos==t)this.buffer.push(O,e,t,i);else{let Q=this.buffer.length;if(Q>0&&this.buffer[Q-4]!=0)for(;Q>0&&this.buffer[Q-2]>t;)this.buffer[Q]=this.buffer[Q-4],this.buffer[Q+1]=this.buffer[Q-3],this.buffer[Q+2]=this.buffer[Q-2],this.buffer[Q+3]=this.buffer[Q-1],Q-=4,i>4&&(i-=4);this.buffer[Q]=O,this.buffer[Q+1]=e,this.buffer[Q+2]=t,this.buffer[Q+3]=i}}shift(O,e,t,i){if(O&131072)this.pushState(O&65535,this.pos);else if((O&262144)==0){let s=O,{parser:Q}=this.p;(i>this.pos||e<=Q.maxNode)&&(this.pos=i,Q.stateFlag(s,1)||(this.reducePos=i)),this.pushState(s,t),this.shiftContext(e,t),e<=Q.maxNode&&this.buffer.push(e,t,i,4)}else this.pos=i,this.shiftContext(e,t),e<=this.p.parser.maxNode&&this.buffer.push(e,t,i,4)}apply(O,e,t,i){O&65536?this.reduce(O):this.shift(O,e,t,i)}useNode(O,e){let t=this.p.reused.length-1;(t<0||this.p.reused[t]!=O)&&(this.p.reused.push(O),t++);let i=this.pos;this.reducePos=this.pos=i+O.length,this.pushState(e,i),this.buffer.push(t,i,this.reducePos,-1),this.curContext&&this.updateContext(this.curContext.tracker.reuse(this.curContext.context,O,this,this.p.stream.reset(this.pos-O.length)))}split(){let O=this,e=O.buffer.length;for(;e>0&&O.buffer[e-2]>O.reducePos;)e-=4;let t=O.buffer.slice(e),i=O.bufferBase+e;for(;O&&i==O.bufferBase;)O=O.parent;return new r(this.p,this.stack.slice(),this.state,this.reducePos,this.pos,this.score,t,i,this.curContext,this.lookAhead,O)}recoverByDelete(O,e){let t=O<=this.p.parser.maxNode;t&&this.storeNode(O,this.pos,e,4),this.storeNode(0,this.pos,e,t?8:4),this.pos=this.reducePos=e,this.score-=190}canShift(O){for(let e=new R(this);;){let t=this.p.parser.stateSlot(e.state,4)||this.p.parser.hasAction(e.state,O);if(t==0)return!1;if((t&65536)==0)return!0;e.reduce(t)}}recoverByInsert(O){if(this.stack.length>=300)return[];let e=this.p.parser.nextStates(this.state);if(e.length>8||this.stack.length>=120){let i=[];for(let s=0,Q;sa&1&&n==Q)||i.push(e[s],Q)}e=i}let t=[];for(let i=0;i>19,i=e&65535,s=this.stack.length-t*3;if(s<0||O.getGoto(this.stack[s],i,!1)<0){let Q=this.findForcedReduction();if(Q==null)return!1;e=Q}this.storeNode(0,this.pos,this.pos,4,!0),this.score-=100}return this.reducePos=this.pos,this.reduce(e),!0}findForcedReduction(){let{parser:O}=this.p,e=[],t=(i,s)=>{if(!e.includes(i))return e.push(i),O.allActions(i,Q=>{if(!(Q&393216))if(Q&65536){let n=(Q>>19)-s;if(n>1){let a=Q&65535,P=this.stack.length-n*3;if(P>=0&&O.getGoto(this.stack[P],a,!1)>=0)return n<<19|65536|a}}else{let n=t(Q,s+1);if(n!=null)return n}})};return t(this.state,0)}forceAll(){for(;!this.p.parser.stateFlag(this.state,2);)if(!this.forceReduce()){this.storeNode(0,this.pos,this.pos,4,!0);break}return this}get deadEnd(){if(this.stack.length!=3)return!1;let{parser:O}=this.p;return O.data[O.stateSlot(this.state,1)]==65535&&!O.stateSlot(this.state,4)}restart(){this.storeNode(0,this.pos,this.pos,4,!0),this.state=this.stack[0],this.stack.length=0}sameState(O){if(this.state!=O.state||this.stack.length!=O.stack.length)return!1;for(let e=0;ethis.lookAhead&&(this.emitLookAhead(),this.lookAhead=O)}close(){this.curContext&&this.curContext.tracker.strict&&this.emitContext(),this.lookAhead>0&&this.emitLookAhead()}},b=class{constructor(O,e){this.tracker=O,this.context=e,this.hash=O.strict?O.hash(e):0}},R=class{constructor(O){this.start=O,this.state=O.state,this.stack=O.stack,this.base=this.stack.length}reduce(O){let e=O&65535,t=O>>19;t==0?(this.stack==this.start.stack&&(this.stack=this.stack.slice()),this.stack.push(this.state,0,0),this.base+=3):this.base-=(t-1)*3;let i=this.start.p.parser.getGoto(this.stack[this.base-3],e,!0);this.state=i}},y=class r{constructor(O,e,t){this.stack=O,this.pos=e,this.index=t,this.buffer=O.buffer,this.index==0&&this.maybeNext()}static create(O,e=O.bufferBase+O.buffer.length){return new r(O,e,e-O.bufferBase)}maybeNext(){let O=this.stack.parent;O!=null&&(this.index=this.stack.bufferBase-O.bufferBase,this.stack=O,this.buffer=O.buffer)}get id(){return this.buffer[this.index-4]}get start(){return this.buffer[this.index-3]}get end(){return this.buffer[this.index-2]}get size(){return this.buffer[this.index-1]}next(){this.index-=4,this.pos-=4,this.index==0&&this.maybeNext()}fork(){return new r(this.stack,this.pos,this.index)}};function g(r,O=Uint16Array){if(typeof r!="string")return r;let e=null;for(let t=0,i=0;t=92&&Q--,Q>=34&&Q--;let a=Q-32;if(a>=46&&(a-=46,n=!0),s+=a,n)break;s*=46}e?e[i++]=s:e=new O(s)}return e}var p=class{constructor(){this.start=-1,this.value=-1,this.end=-1,this.extended=-1,this.lookAhead=0,this.mask=0,this.context=0}},C=new p,T=class{constructor(O,e){this.input=O,this.ranges=e,this.chunk="",this.chunkOff=0,this.chunk2="",this.chunk2Pos=0,this.next=-1,this.token=C,this.rangeIndex=0,this.pos=this.chunkPos=e[0].from,this.range=e[0],this.end=e[e.length-1].to,this.readNext()}resolveOffset(O,e){let t=this.range,i=this.rangeIndex,s=this.pos+O;for(;st.to:s>=t.to;){if(i==this.ranges.length-1)return null;let Q=this.ranges[++i];s+=Q.from-t.to,t=Q}return s}clipPos(O){if(O>=this.range.from&&OO)return Math.max(O,e.from);return this.end}peek(O){let e=this.chunkOff+O,t,i;if(e>=0&&e=this.chunk2Pos&&tn.to&&(this.chunk2=this.chunk2.slice(0,n.to-t)),i=this.chunk2.charCodeAt(0)}}return t>=this.token.lookAhead&&(this.token.lookAhead=t+1),i}acceptToken(O,e=0){let t=e?this.resolveOffset(e,-1):this.pos;if(t==null||t=this.chunk2Pos&&this.posthis.range.to?O.slice(0,this.range.to-this.pos):O,this.chunkPos=this.pos,this.chunkOff=0}}readNext(){return this.chunkOff>=this.chunk.length&&(this.getChunk(),this.chunkOff==this.chunk.length)?this.next=-1:this.next=this.chunk.charCodeAt(this.chunkOff)}advance(O=1){for(this.chunkOff+=O;this.pos+O>=this.range.to;){if(this.rangeIndex==this.ranges.length-1)return this.setDone();O-=this.range.to-this.pos,this.range=this.ranges[++this.rangeIndex],this.pos=this.range.from}return this.pos+=O,this.pos>=this.token.lookAhead&&(this.token.lookAhead=this.pos+1),this.readNext()}setDone(){return this.pos=this.chunkPos=this.end,this.range=this.ranges[this.rangeIndex=this.ranges.length-1],this.chunk="",this.next=-1}reset(O,e){if(e?(this.token=e,e.start=O,e.lookAhead=O+1,e.value=e.extended=-1):this.token=C,this.pos!=O){if(this.pos=O,O==this.end)return this.setDone(),this;for(;O=this.range.to;)this.range=this.ranges[++this.rangeIndex];O>=this.chunkPos&&O=this.chunkPos&&e<=this.chunkPos+this.chunk.length)return this.chunk.slice(O-this.chunkPos,e-this.chunkPos);if(O>=this.chunk2Pos&&e<=this.chunk2Pos+this.chunk2.length)return this.chunk2.slice(O-this.chunk2Pos,e-this.chunk2Pos);if(O>=this.range.from&&e<=this.range.to)return this.input.read(O,e);let t="";for(let i of this.ranges){if(i.from>=e)break;i.to>O&&(t+=this.input.read(Math.max(i.from,O),Math.min(i.to,e)))}return t}},u=class{constructor(O,e){this.data=O,this.id=e}token(O,e){let{parser:t}=e.p;L(this.data,O,e,this.id,t.data,t.tokenPrecTable)}};u.prototype.contextual=u.prototype.fallback=u.prototype.extend=!1;var v=class{constructor(O,e,t){this.precTable=e,this.elseToken=t,this.data=typeof O=="string"?g(O):O}token(O,e){let t=O.pos,i=0;for(;;){let s=O.next<0,Q=O.resolveOffset(1,1);if(L(this.data,O,e,0,this.data,this.precTable),O.token.value>-1)break;if(this.elseToken==null)return;if(s||i++,Q==null)break;O.reset(Q,O.token)}i&&(O.reset(t,O.token),O.acceptToken(this.elseToken,i))}};v.prototype.contextual=u.prototype.fallback=u.prototype.extend=!1;var d=class{constructor(O,e={}){this.token=O,this.contextual=!!e.contextual,this.fallback=!!e.fallback,this.extend=!!e.extend}};function L(r,O,e,t,i,s){let Q=0,n=1<0){let S=r[l];if(a.allows(S)&&(O.token.value==-1||O.token.value==S||QO(S,O.token.value,i,s))){O.acceptToken(S);break}}let h=O.next,$=0,o=r[Q+2];if(O.next<0&&o>$&&r[P+o*3-3]==65535){Q=r[P+o*3-1];continue O}for(;$>1,S=P+l+(l<<1),z=r[S],tO=r[S+1]||65536;if(h=tO)$=l+1;else{Q=r[S+2],O.advance();continue O}}break}}function D(r,O,e){for(let t=O,i;(i=r[t])!=65535;t++)if(i==e)return t-O;return-1}function QO(r,O,e,t){let i=D(e,t,O);return i<0||D(e,t,r)O)&&!t.type.isError)return e<0?Math.max(0,Math.min(t.to-1,O-25)):Math.min(r.length,Math.max(t.from+1,O+25));if(e<0?t.prevSibling():t.nextSibling())break;if(!t.parent())return e<0?0:r.length}}var V=class{constructor(O,e){this.fragments=O,this.nodeSet=e,this.i=0,this.fragment=null,this.safeFrom=-1,this.safeTo=-1,this.trees=[],this.start=[],this.index=[],this.nextFragment()}nextFragment(){let O=this.fragment=this.i==this.fragments.length?null:this.fragments[this.i++];if(O){for(this.safeFrom=O.openStart?F(O.tree,O.from+O.offset,1)-O.offset:O.from,this.safeTo=O.openEnd?F(O.tree,O.to+O.offset,-1)-O.offset:O.to;this.trees.length;)this.trees.pop(),this.start.pop(),this.index.pop();this.trees.push(O.tree),this.start.push(-O.offset),this.index.push(0),this.nextStart=this.safeFrom}else this.nextStart=1e9}nodeAt(O){if(OO)return this.nextStart=Q,null;if(s instanceof W){if(Q==O){if(Q=Math.max(this.safeFrom,O)&&(this.trees.push(s),this.start.push(Q),this.index.push(0))}else this.index[e]++,this.nextStart=Q+s.length}}},m=class{constructor(O,e){this.stream=e,this.tokens=[],this.mainToken=null,this.actions=[],this.tokens=O.tokenizers.map(t=>new p)}getActions(O){let e=0,t=null,{parser:i}=O.p,{tokenizers:s}=i,Q=i.stateSlot(O.state,3),n=O.curContext?O.curContext.hash:0,a=0;for(let P=0;P$.end+25&&(a=Math.max($.lookAhead,a)),$.value!=0)){let o=e;if($.extended>-1&&(e=this.addActions(O,$.extended,$.end,e)),e=this.addActions(O,$.value,$.end,e),!h.extend&&(t=$,e>o))break}}for(;this.actions.length>e;)this.actions.pop();return a&&O.setLookAhead(a),!t&&O.pos==this.stream.end&&(t=new p,t.value=O.p.parser.eofTerm,t.start=t.end=O.pos,e=this.addActions(O,t.value,t.end,e)),this.mainToken=t,this.actions}getMainToken(O){if(this.mainToken)return this.mainToken;let e=new p,{pos:t,p:i}=O;return e.start=t,e.end=Math.min(t+1,i.stream.end),e.value=t==i.stream.end?i.parser.eofTerm:0,e}updateCachedToken(O,e,t){let i=this.stream.clipPos(t.pos);if(e.token(this.stream.reset(i,O),t),O.value>-1){let{parser:s}=t.p;for(let Q=0;Q=0&&t.p.parser.dialect.allows(n>>1)){(n&1)==0?O.value=n>>1:O.extended=n>>1;break}}}else O.value=0,O.end=this.stream.clipPos(i+1)}putAction(O,e,t,i){for(let s=0;sO.bufferLength*4?new V(t,O.nodeSet):null}get parsedPos(){return this.minStackPos}advance(){let O=this.stacks,e=this.minStackPos,t=this.stacks=[],i,s;if(this.bigReductionCount>300&&O.length==1){let[Q]=O;for(;Q.forceReduce()&&Q.stack.length&&Q.stack[Q.stack.length-2]>=this.lastBigReductionStart;);this.bigReductionCount=this.lastBigReductionSize=0}for(let Q=0;Qe)t.push(n);else{if(this.advanceStack(n,t,O))continue;{i||(i=[],s=[]),i.push(n);let a=this.tokens.getMainToken(n);s.push(a.value,a.end)}}break}}if(!t.length){let Q=i&&sO(i);if(Q)return f&&console.log("Finish with "+this.stackID(Q)),this.stackToTree(Q);if(this.parser.strict)throw f&&i&&console.log("Stuck with token "+(this.tokens.mainToken?this.parser.getName(this.tokens.mainToken.value):"none")),new SyntaxError("No parse at "+e);this.recovering||(this.recovering=5)}if(this.recovering&&i){let Q=this.stoppedAt!=null&&i[0].pos>this.stoppedAt?i[0]:this.runRecovery(i,s,t);if(Q)return f&&console.log("Force-finish "+this.stackID(Q)),this.stackToTree(Q.forceAll())}if(this.recovering){let Q=this.recovering==1?1:this.recovering*3;if(t.length>Q)for(t.sort((n,a)=>a.score-n.score);t.length>Q;)t.pop();t.some(n=>n.reducePos>e)&&this.recovering--}else if(t.length>1){O:for(let Q=0;Q500&&P.buffer.length>500)if((n.score-P.score||n.buffer.length-P.buffer.length)>0)t.splice(a--,1);else{t.splice(Q--,1);continue O}}}t.length>12&&t.splice(12,t.length-12)}this.minStackPos=t[0].pos;for(let Q=1;Q ":"";if(this.stoppedAt!=null&&i>this.stoppedAt)return O.forceReduce()?O:null;if(this.fragments){let P=O.curContext&&O.curContext.tracker.strict,h=P?O.curContext.hash:0;for(let $=this.fragments.nodeAt(i);$;){let o=this.parser.nodeSet.types[$.type.id]==$.type?s.getGoto(O.state,$.type.id):-1;if(o>-1&&$.length&&(!P||($.prop(Y.contextHash)||0)==h))return O.useNode($,o),f&&console.log(Q+this.stackID(O)+` (via reuse of ${s.getName($.type.id)})`),!0;if(!($ instanceof W)||$.children.length==0||$.positions[0]>0)break;let l=$.children[0];if(l instanceof W&&$.positions[0]==0)$=l;else break}}let n=s.stateSlot(O.state,4);if(n>0)return O.reduce(n),f&&console.log(Q+this.stackID(O)+` (via always-reduce ${s.getName(n&65535)})`),!0;if(O.stack.length>=8400)for(;O.stack.length>6e3&&O.forceReduce(););let a=this.tokens.getActions(O);for(let P=0;Pi?e.push(S):t.push(S)}return!1}advanceFully(O,e){let t=O.pos;for(;;){if(!this.advanceStack(O,null,null))return!1;if(O.pos>t)return H(O,e),!0}}runRecovery(O,e,t){let i=null,s=!1;for(let Q=0;Q ":"";if(n.deadEnd&&(s||(s=!0,n.restart(),f&&console.log(h+this.stackID(n)+" (restarted)"),this.advanceFully(n,t))))continue;let $=n.split(),o=h;for(let l=0;$.forceReduce()&&l<10&&(f&&console.log(o+this.stackID($)+" (via force-reduce)"),!this.advanceFully($,t));l++)f&&(o=this.stackID($)+" -> ");for(let l of n.recoverByInsert(a))f&&console.log(h+this.stackID(l)+" (via recover-insert)"),this.advanceFully(l,t);this.stream.end>n.pos?(P==n.pos&&(P++,a=0),n.recoverByDelete(a,P),f&&console.log(h+this.stackID(n)+` (via recover-delete ${this.parser.getName(a)})`),H(n,t)):(!i||i.scoreO.topRules[n][1]),i=[];for(let n=0;n=0)s(h,a,n[P++]);else{let $=n[P+-h];for(let o=-h;o>0;o--)s(n[P++],a,$);P++}}}this.nodeSet=new A(e.map((n,a)=>j.define({name:a>=this.minRepeatTerm?void 0:n,id:a,props:i[a],top:t.indexOf(a)>-1,error:a==0,skipped:O.skippedNodes&&O.skippedNodes.indexOf(a)>-1}))),O.propSources&&(this.nodeSet=this.nodeSet.extend(...O.propSources)),this.strict=!1,this.bufferLength=1024;let Q=g(O.tokenData);this.context=O.context,this.specializerSpecs=O.specialized||[],this.specialized=new Uint16Array(this.specializerSpecs.length);for(let n=0;ntypeof n=="number"?new u(Q,n):n),this.topRules=O.topRules,this.dialects=O.dialects||{},this.dynamicPrecedences=O.dynamicPrecedences||null,this.tokenPrecTable=O.tokenPrec,this.termNames=O.termNames||null,this.maxNode=this.nodeSet.types.length-1,this.dialect=this.parseDialect(),this.top=this.topRules[Object.keys(this.topRules)[0]]}createParse(O,e,t){let i=new k(this,O,e,t);for(let s of this.wrappers)i=s(i,O,e,t);return i}getGoto(O,e,t=!1){let i=this.goto;if(e>=i[0])return-1;for(let s=i[e+1];;){let Q=i[s++],n=Q&1,a=i[s++];if(n&&t)return a;for(let P=s+(Q>>1);s0}validAction(O,e){return!!this.allActions(O,t=>t==e?!0:null)}allActions(O,e){let t=this.stateSlot(O,4),i=t?e(t):void 0;for(let s=this.stateSlot(O,1);i==null;s+=3){if(this.data[s]==65535)if(this.data[s+1]==1)s=c(this.data,s+2);else break;i=e(c(this.data,s+1))}return i}nextStates(O){let e=[];for(let t=this.stateSlot(O,1);;t+=3){if(this.data[t]==65535)if(this.data[t+1]==1)t=c(this.data,t+2);else break;if((this.data[t+2]&1)==0){let i=this.data[t+1];e.some((s,Q)=>Q&1&&s==i)||e.push(this.data[t],i)}}return e}configure(O){let e=Object.assign(Object.create(r.prototype),this);if(O.props&&(e.nodeSet=this.nodeSet.extend(...O.props)),O.top){let t=this.topRules[O.top];if(!t)throw new RangeError(`Invalid top rule name ${O.top}`);e.top=t}return O.tokenizers&&(e.tokenizers=this.tokenizers.map(t=>{let i=O.tokenizers.find(s=>s.from==t);return i?i.to:t})),O.specializers&&(e.specializers=this.specializers.slice(),e.specializerSpecs=this.specializerSpecs.map((t,i)=>{let s=O.specializers.find(n=>n.from==t.external);if(!s)return t;let Q=Object.assign(Object.assign({},t),{external:s.to});return e.specializers[i]=J(Q),Q})),O.contextTracker&&(e.context=O.contextTracker),O.dialect&&(e.dialect=this.parseDialect(O.dialect)),O.strict!=null&&(e.strict=O.strict),O.wrap&&(e.wrappers=e.wrappers.concat(O.wrap)),O.bufferLength!=null&&(e.bufferLength=O.bufferLength),e}hasWrappers(){return this.wrappers.length>0}getName(O){return this.termNames?this.termNames[O]:String(O<=this.maxNode&&this.nodeSet.types[O].name||O)}get eofTerm(){return this.maxNode+1}get topNode(){return this.nodeSet.types[this.top[1]]}dynamicPrecedence(O){let e=this.dynamicPrecedences;return e==null?0:e[O]||0}parseDialect(O){let e=Object.keys(this.dialects),t=e.map(()=>!1);if(O)for(let s of O.split(" ")){let Q=e.indexOf(s);Q>=0&&(t[Q]=!0)}let i=null;for(let s=0;st)&&e.p.parser.stateFlag(e.state,2)&&(!O||O.scorer.external(e,t)<<1|O}return r.get}var nO=1,rO=2,aO=3,PO=4,$O=5,B=98,XO=101,hO=102,K=114,oO=69,w=48,M=46,lO=43,SO=45,OO=35,eO=34,fO=124,cO=60,uO=62;function G(r){return r>=48&&r<=57}function _(r){return G(r)||r==95}var pO=new d((r,O)=>{if(G(r.next)){let e=!1;do r.advance();while(_(r.next));if(r.next==M){if(e=!0,r.advance(),G(r.next))do r.advance();while(_(r.next));else if(r.next==M||r.next>127||/\w/.test(String.fromCharCode(r.next)))return}if(r.next==XO||r.next==oO){if(e=!0,r.advance(),(r.next==lO||r.next==SO)&&r.advance(),!_(r.next))return;do r.advance();while(_(r.next))}if(r.next==hO){let t=r.peek(1);if(t==w+3&&r.peek(2)==w+2||t==w+6&&r.peek(2)==w+4)r.advance(3),e=!0;else return}e&&r.acceptToken($O)}else if(r.next==B||r.next==K){if(r.next==B&&r.advance(),r.next!=K)return;r.advance();let e=0;for(;r.next==OO;)e++,r.advance();if(r.next!=eO)return;r.advance();O:for(;;){if(r.next<0)return;let t=r.next==eO;if(r.advance(),t){for(let i=0;i{r.next==fO&&r.acceptToken(nO,1)}),WO=new d(r=>{r.next==cO?r.acceptToken(rO,1):r.next==uO&&r.acceptToken(aO,1)}),gO=N({"const macro_rules struct union enum type fn impl trait let static":X.definitionKeyword,"mod use crate":X.moduleKeyword,"pub unsafe async mut extern default move":X.modifier,"for if else loop while match continue break return await":X.controlKeyword,"as in ref":X.operatorKeyword,"where _ crate super dyn":X.keyword,self:X.self,String:X.string,Char:X.character,RawString:X.special(X.string),Boolean:X.bool,Identifier:X.variableName,"CallExpression/Identifier":X.function(X.variableName),BoundIdentifier:X.definition(X.variableName),"FunctionItem/BoundIdentifier":X.function(X.definition(X.variableName)),LoopLabel:X.labelName,FieldIdentifier:X.propertyName,"CallExpression/FieldExpression/FieldIdentifier":X.function(X.propertyName),Lifetime:X.special(X.variableName),ScopeIdentifier:X.namespace,TypeIdentifier:X.typeName,"MacroInvocation/Identifier MacroInvocation/ScopedIdentifier/Identifier":X.macroName,"MacroInvocation/TypeIdentifier MacroInvocation/ScopedIdentifier/TypeIdentifier":X.macroName,'"!"':X.macroName,UpdateOp:X.updateOperator,LineComment:X.lineComment,BlockComment:X.blockComment,Integer:X.integer,Float:X.float,ArithOp:X.arithmeticOperator,LogicOp:X.logicOperator,BitOp:X.bitwiseOperator,CompareOp:X.compareOperator,"=":X.definitionOperator,".. ... => ->":X.punctuation,"( )":X.paren,"[ ]":X.squareBracket,"{ }":X.brace,". DerefOp":X.derefOperator,"&":X.operator,", ; ::":X.separator,"Attribute/...":X.meta}),zO={__proto__:null,self:28,super:32,crate:34,impl:46,true:72,false:72,pub:88,in:92,const:96,unsafe:104,async:108,move:110,if:114,let:118,ref:142,mut:144,_:198,else:200,match:204,as:248,return:252,await:262,break:270,continue:276,while:312,loop:316,for:320,macro_rules:327,mod:334,extern:342,struct:346,where:364,union:379,enum:382,type:390,default:395,fn:396,trait:412,use:420,static:438,dyn:476},_O=Z.deserialize({version:14,states:"$2xQ]Q_OOP$wOWOOO&sQWO'#CnO)WQWO'#I`OOQP'#I`'#I`OOQQ'#Ie'#IeO)hO`O'#C}OOQR'#Ih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q%y%{&P&o&p&r'](q)S)U)i)s)v)x)y*O*P*R*V*[*^*e*n*w*x+U+V+h+o+}-i-t-v.U.`.p.t.x.y/Z/[/{/}0`0r0w1O1Y1Z1y2a2h2j2m2s2v3V3u3{3|4R4U4_4e4t5`5d5v6R6Y6p6v6x7c7r8gR0k+ZR0j+ZQ'R!qQ)c%XQ+w&|R4y1PX'Q!q%X&|1PR+y&|R+x&|T/S*S4TT/R*S4TR.o)sR.n)sR){%p",nodeNames:"\u26A0 | < > RawString Float LineComment BlockComment SourceFile ] InnerAttribute ! [ MetaItem self Metavariable super crate Identifier ScopedIdentifier :: QualifiedScope AbstractType impl SelfType MetaType TypeIdentifier ScopedTypeIdentifier ScopeIdentifier TypeArgList TypeBinding = Lifetime String Escape Char Boolean Integer } { Block ; ConstItem Vis pub ( in ) const BoundIdentifier : UnsafeBlock unsafe AsyncBlock async move IfExpression if LetDeclaration let LiteralPattern ArithOp MetaPattern SelfPattern ScopedIdentifier TuplePattern ScopedTypeIdentifier , StructPattern FieldPatternList FieldPattern ref mut FieldIdentifier .. RefPattern SlicePattern CapturedPattern ReferencePattern & MutPattern RangePattern ... OrPattern MacroPattern ParenthesizedTokens TokenBinding Identifier TokenRepetition ArithOp BitOp LogicOp UpdateOp CompareOp -> => ArithOp BracketedTokens BracedTokens _ else MatchExpression match MatchBlock MatchArm Attribute Guard UnaryExpression ArithOp DerefOp LogicOp ReferenceExpression TryExpression BinaryExpression ArithOp ArithOp BitOp BitOp BitOp BitOp LogicOp LogicOp AssignmentExpression TypeCastExpression as ReturnExpression return RangeExpression CallExpression ArgList AwaitExpression await FieldExpression GenericFunction BreakExpression break LoopLabel ContinueExpression continue IndexExpression ArrayExpression TupleExpression MacroInvocation UnitExpression ClosureExpression ParamList Parameter Parameter ParenthesizedExpression StructExpression FieldInitializerList ShorthandFieldInitializer FieldInitializer BaseFieldInitializer MatchArm WhileExpression while LoopExpression loop ForExpression for MacroInvocation MacroDefinition macro_rules MacroRule EmptyStatement ModItem mod DeclarationList AttributeItem ForeignModItem extern StructItem struct TypeParamList ConstrainedTypeParameter TraitBounds HigherRankedTraitBound RemovedTraitBound OptionalTypeParameter ConstParameter WhereClause where LifetimeClause TypeBoundClause FieldDeclarationList FieldDeclaration OrderedFieldDeclarationList UnionItem union EnumItem enum EnumVariantList EnumVariant TypeItem type FunctionItem default fn ParamList Parameter SelfParameter VariadicParameter VariadicParameter ImplItem TraitItem trait AssociatedType LetDeclaration UseDeclaration use ScopedIdentifier UseAsClause ScopedIdentifier UseList ScopedUseList UseWildcard ExternCrateDeclaration StaticItem static ExpressionStatement ExpressionStatement GenericType FunctionType ForLifetimes ParamList VariadicParameter Parameter VariadicParameter Parameter ReferenceType PointerType TupleType UnitType ArrayType MacroInvocation EmptyType DynamicType dyn BoundedType",maxTerm:359,nodeProps:[["isolate",-4,4,6,7,33,""],["group",-42,4,5,14,15,16,17,18,19,33,35,36,37,40,51,53,56,101,107,111,112,113,122,123,125,127,128,130,132,133,134,137,139,140,141,142,143,144,148,149,155,157,159,"Expression",-16,22,24,25,26,27,222,223,230,231,232,233,234,235,236,237,239,"Type",-20,42,161,162,165,166,169,170,172,188,190,194,196,204,205,207,208,209,217,218,220,"Statement",-17,49,60,62,63,64,65,68,74,75,76,77,78,80,81,83,84,99,"Pattern"],["openedBy",9,"[",38,"{",47,"("],["closedBy",12,"]",39,"}",45,")"]],propSources:[gO],skippedNodes:[0,6,7,240],repeatNodeCount:32,tokenData:"$%h_R!XOX$nXY5gYZ6iZ]$n]^5g^p$npq5gqr7Xrs9cst:Rtu;Tuv>vvwAQwxCbxy!+Tyz!,Vz{!-X{|!/_|}!0g}!O!1i!O!P!3v!P!Q!8[!Q!R!Bw!R![!Dr![!]#+q!]!^#-{!^!_#.}!_!`#1b!`!a#3o!a!b#6S!b!c#7U!c!}#8W!}#O#:T#O#P#;V#P#Q#Cb#Q#R#Dd#R#S#8W#S#T$n#T#U#8W#U#V#El#V#f#8W#f#g#Ic#g#o#8W#o#p$ S#p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$nrs&[sz$nz{+O{!P$n!P!Q,z!Q#O$n#O#P&[#P;'S$n;'S;=`4s<%lO$n",tokenizers:[dO,WO,pO,0,1,2,3],topRules:{SourceFile:[0,8]},specialized:[{term:281,get:r=>zO[r]||-1}],tokenPrec:15596});export{_O as a};
diff --git a/static/dist/chunks/chunk-CGTIGMIP.js b/static/dist/chunks/chunk-CGTIGMIP.js
new file mode 100644
index 0000000..274fbe4
--- /dev/null
+++ b/static/dist/chunks/chunk-CGTIGMIP.js
@@ -0,0 +1 @@
+var De=0,ie=class{constructor(e,t){this.from=e,this.to=t}},k=class{constructor(e={}){this.id=De++,this.perNode=!!e.perNode,this.deserialize=e.deserialize||(()=>{throw new Error("This node type doesn't define a deserialize function")})}add(e){if(this.perNode)throw new RangeError("Can't add per-node props to node types");return typeof e!="function"&&(e=F.match(e)),t=>{let r=e(t);return r===void 0?null:[this,r]}}};k.closedBy=new k({deserialize:s=>s.split(" ")});k.openedBy=new k({deserialize:s=>s.split(" ")});k.group=new k({deserialize:s=>s.split(" ")});k.isolate=new k({deserialize:s=>{if(s&&s!="rtl"&&s!="ltr"&&s!="auto")throw new RangeError("Invalid value for isolate: "+s);return s||"auto"}});k.contextHash=new k({perNode:!0});k.lookAhead=new k({perNode:!0});k.mounted=new k({perNode:!0});var te=class{constructor(e,t,r){this.tree=e,this.overlay=t,this.parser=r}static get(e){return e&&e.props&&e.props[k.mounted.id]}},Le=Object.create(null),F=class s{constructor(e,t,r,i=0){this.name=e,this.props=t,this.id=r,this.flags=i}static define(e){let t=e.props&&e.props.length?Object.create(null):Le,r=(e.top?1:0)|(e.skipped?2:0)|(e.error?4:0)|(e.name==null?8:0),i=new s(e.name||"",t,e.id,r);if(e.props){for(let n of e.props)if(Array.isArray(n)||(n=n(i)),n){if(n[0].perNode)throw new RangeError("Can't store a per-node prop on a node type");t[n[0].id]=n[1]}}return i}prop(e){return this.props[e.id]}get isTop(){return(this.flags&1)>0}get isSkipped(){return(this.flags&2)>0}get isError(){return(this.flags&4)>0}get isAnonymous(){return(this.flags&8)>0}is(e){if(typeof e=="string"){if(this.name==e)return!0;let t=this.prop(k.group);return t?t.indexOf(e)>-1:!1}return this.id==e}static match(e){let t=Object.create(null);for(let r in e)for(let i of r.split(" "))t[i]=e[r];return r=>{for(let i=r.prop(k.group),n=-1;n<(i?i.length:0);n++){let l=t[n<0?r.name:i[n]];if(l)return l}}}};F.none=new F("",Object.create(null),0,8);var Ie=class s{constructor(e){this.types=e;for(let t=0;t0;for(let a=this.cursor(l|B.IncludeAnonymous);;){let u=!1;if(a.from<=n&&a.to>=i&&(!o&&a.type.isAnonymous||t(a)!==!1)){if(a.firstChild())continue;u=!0}for(;u&&r&&(o||!a.type.isAnonymous)&&r(a),!a.nextSibling();){if(!a.parent())return;u=!0}}}prop(e){return e.perNode?this.props?this.props[e.id]:void 0:this.type.prop(e)}get propValues(){let e=[];if(this.props)for(let t in this.props)e.push([+t,this.props[t]]);return e}balance(e={}){return this.children.length<=8?this:ve(F.none,this.children,this.positions,0,this.children.length,0,this.length,(t,r,i)=>new s(this.type,t,r,i,this.propValues),e.makeTree||((t,r,i)=>new s(F.none,t,r,i)))}static build(e){return Ue(e)}};J.empty=new J(F.none,[],[],0);var me=class s{constructor(e,t){this.buffer=e,this.index=t}get id(){return this.buffer[this.index-4]}get start(){return this.buffer[this.index-3]}get end(){return this.buffer[this.index-2]}get size(){return this.buffer[this.index-1]}get pos(){return this.index}next(){this.index-=4}fork(){return new s(this.buffer,this.index)}},K=class s{constructor(e,t,r){this.buffer=e,this.length=t,this.set=r}get type(){return F.none}toString(){let e=[];for(let t=0;t0));a=l[a+3]);return o}slice(e,t,r){let i=this.buffer,n=new Uint16Array(t-e),l=0;for(let o=e,a=0;o=e&&te;case 1:return t<=e&&r>e;case 2:return r>e;case 4:return!0}}function ne(s,e,t,r){for(var i;s.from==s.to||(t<1?s.from>=e:s.from>e)||(t>-1?s.to<=e:s.to0?o.length:-1;e!=u;e+=t){let m=o[e],y=a[e]+l.from;if(Ee(i,r,y,y+m.length)){if(m instanceof K){if(n&B.ExcludeBuffers)continue;let c=m.findChild(0,m.buffer.length,t,r-y,i);if(c>-1)return new se(new be(l,m,e,y),null,c)}else if(n&B.IncludeAnonymous||!m.type.isAnonymous||ke(m)){let c;if(!(n&B.IgnoreMounts)&&(c=te.get(m))&&!c.overlay)return new s(c.tree,y,e,l);let _=new s(m,y,e,l);return n&B.IncludeAnonymous||!_.type.isAnonymous?_:_.nextChild(t<0?m.children.length-1:0,t,r,i)}}}if(n&B.IncludeAnonymous||!l.type.isAnonymous||(l.index>=0?e=l.index+t:e=t<0?-1:l._parent._tree.children.length,l=l._parent,!l))return null}}get firstChild(){return this.nextChild(0,1,0,4)}get lastChild(){return this.nextChild(this._tree.children.length-1,-1,0,4)}childAfter(e){return this.nextChild(0,1,e,2)}childBefore(e){return this.nextChild(this._tree.children.length-1,-1,e,-2)}enter(e,t,r=0){let i;if(!(r&B.IgnoreOverlays)&&(i=te.get(this._tree))&&i.overlay){let n=e-this.from;for(let{from:l,to:o}of i.overlay)if((t>0?l<=n:l=n:o>n))return new s(i.tree,i.overlay[0].from+this.from,-1,this)}return this.nextChild(0,1,e,t,r)}nextSignificantParent(){let e=this;for(;e.type.isAnonymous&&e._parent;)e=e._parent;return e}get parent(){return this._parent?this._parent.nextSignificantParent():null}get nextSibling(){return this._parent&&this.index>=0?this._parent.nextChild(this.index+1,1,0,4):null}get prevSibling(){return this._parent&&this.index>=0?this._parent.nextChild(this.index-1,-1,0,4):null}get tree(){return this._tree}toTree(){return this._tree}toString(){return this._tree.toString()}};function Pe(s,e,t,r){let i=s.cursor(),n=[];if(!i.firstChild())return n;if(t!=null){for(let l=!1;!l;)if(l=i.type.is(t),!i.nextSibling())return n}for(;;){if(r!=null&&i.type.is(r))return n;if(i.type.is(e)&&n.push(i.node),!i.nextSibling())return r==null?n:[]}}function ye(s,e,t=e.length-1){for(let r=s.parent;t>=0;r=r.parent){if(!r)return!1;if(!r.type.isAnonymous){if(e[t]&&e[t]!=r.name)return!1;t--}}return!0}var be=class{constructor(e,t,r,i){this.parent=e,this.buffer=t,this.index=r,this.start=i}},se=class s extends ue{get name(){return this.type.name}get from(){return this.context.start+this.context.buffer.buffer[this.index+1]}get to(){return this.context.start+this.context.buffer.buffer[this.index+2]}constructor(e,t,r){super(),this.context=e,this._parent=t,this.index=r,this.type=e.buffer.set.types[e.buffer.buffer[r]]}child(e,t,r){let{buffer:i}=this.context,n=i.findChild(this.index+4,i.buffer[this.index+3],e,t-this.context.start,r);return n<0?null:new s(this.context,this,n)}get firstChild(){return this.child(1,0,4)}get lastChild(){return this.child(-1,0,4)}childAfter(e){return this.child(1,e,2)}childBefore(e){return this.child(-1,e,-2)}enter(e,t,r=0){if(r&B.ExcludeBuffers)return null;let{buffer:i}=this.context,n=i.findChild(this.index+4,i.buffer[this.index+3],t>0?1:-1,e-this.context.start,t);return n<0?null:new s(this.context,this,n)}get parent(){return this._parent||this.context.parent.nextSignificantParent()}externalSibling(e){return this._parent?null:this.context.parent.nextChild(this.context.index+e,e,0,4)}get nextSibling(){let{buffer:e}=this.context,t=e.buffer[this.index+3];return t<(this._parent?e.buffer[this._parent.index+3]:e.buffer.length)?new s(this.context,this._parent,t):this.externalSibling(1)}get prevSibling(){let{buffer:e}=this.context,t=this._parent?this._parent.index+4:0;return this.index==t?this.externalSibling(-1):new s(this.context,this._parent,e.findChild(t,this.index,-1,0,4))}get tree(){return null}toTree(){let e=[],t=[],{buffer:r}=this.context,i=this.index+4,n=r.buffer[this.index+3];if(n>i){let l=r.buffer[this.index+1];e.push(r.slice(i,n,l)),t.push(0)}return new J(this.type,e,t,this.to-this.from)}toString(){return this.context.buffer.childString(this.index)}};function Te(s){if(!s.length)return null;let e=0,t=s[0];for(let n=1;nt.from||l.to=e){let o=new D(l.tree,l.overlay[0].from+n.from,-1,n);(i||(i=[r])).push(ne(o,e,t,!1))}}return i?Te(i):r}var le=class{get name(){return this.type.name}constructor(e,t=0){if(this.mode=t,this.buffer=null,this.stack=[],this.index=0,this.bufferNode=null,e instanceof D)this.yieldNode(e);else{this._tree=e.context.parent,this.buffer=e.context;for(let r=e._parent;r;r=r._parent)this.stack.unshift(r.index);this.bufferNode=e,this.yieldBuf(e.index)}}yieldNode(e){return e?(this._tree=e,this.type=e.type,this.from=e.from,this.to=e.to,!0):!1}yieldBuf(e,t){this.index=e;let{start:r,buffer:i}=this.buffer;return this.type=t||i.set.types[i.buffer[e]],this.from=r+i.buffer[e+1],this.to=r+i.buffer[e+2],!0}yield(e){return e?e instanceof D?(this.buffer=null,this.yieldNode(e)):(this.buffer=e.context,this.yieldBuf(e.index,e.type)):!1}toString(){return this.buffer?this.buffer.buffer.childString(this.index):this._tree.toString()}enterChild(e,t,r){if(!this.buffer)return this.yield(this._tree.nextChild(e<0?this._tree._tree.children.length-1:0,e,t,r,this.mode));let{buffer:i}=this.buffer,n=i.findChild(this.index+4,i.buffer[this.index+3],e,t-this.buffer.start,r);return n<0?!1:(this.stack.push(this.index),this.yieldBuf(n))}firstChild(){return this.enterChild(1,0,4)}lastChild(){return this.enterChild(-1,0,4)}childAfter(e){return this.enterChild(1,e,2)}childBefore(e){return this.enterChild(-1,e,-2)}enter(e,t,r=this.mode){return this.buffer?r&B.ExcludeBuffers?!1:this.enterChild(1,e,t):this.yield(this._tree.enter(e,t,r))}parent(){if(!this.buffer)return this.yieldNode(this.mode&B.IncludeAnonymous?this._tree._parent:this._tree.parent);if(this.stack.length)return this.yieldBuf(this.stack.pop());let e=this.mode&B.IncludeAnonymous?this.buffer.parent:this.buffer.parent.nextSignificantParent();return this.buffer=null,this.yieldNode(e)}sibling(e){if(!this.buffer)return this._tree._parent?this.yield(this._tree.index<0?null:this._tree._parent.nextChild(this._tree.index+e,e,0,4,this.mode)):!1;let{buffer:t}=this.buffer,r=this.stack.length-1;if(e<0){let i=r<0?0:this.stack[r]+4;if(this.index!=i)return this.yieldBuf(t.findChild(i,this.index,-1,0,4))}else{let i=t.buffer[this.index+3];if(i<(r<0?t.buffer.length:t.buffer[this.stack[r]+3]))return this.yieldBuf(i)}return r<0?this.yield(this.buffer.parent.nextChild(this.buffer.index+e,e,0,4,this.mode)):!1}nextSibling(){return this.sibling(1)}prevSibling(){return this.sibling(-1)}atLastNode(e){let t,r,{buffer:i}=this;if(i){if(e>0){if(this.index-1)for(let n=t+e,l=e<0?-1:r._tree.children.length;n!=l;n+=e){let o=r._tree.children[n];if(this.mode&B.IncludeAnonymous||o instanceof K||!o.type.isAnonymous||ke(o))return!1}return!0}move(e,t){if(t&&this.enterChild(e,0,4))return!0;for(;;){if(this.sibling(e))return!0;if(this.atLastNode(e)||!this.parent())return!1}}next(e=!0){return this.move(1,e)}prev(e=!0){return this.move(-1,e)}moveTo(e,t=0){for(;(this.from==this.to||(t<1?this.from>=e:this.from>e)||(t>-1?this.to<=e:this.to=0;){for(let l=e;l;l=l._parent)if(l.index==i){if(i==this.index)return l;t=l,r=n+1;break e}i=this.stack[--n]}for(let i=r;i=0;n--){if(n<0)return ye(this.node,e,i);let l=r[t.buffer[this.stack[n]]];if(!l.isAnonymous){if(e[i]&&e[i]!=l.name)return!1;i--}}return!0}};function ke(s){return s.children.some(e=>e instanceof K||!e.type.isAnonymous||ke(e))}function Ue(s){var e;let{buffer:t,nodeSet:r,maxBufferLength:i=1024,reused:n=[],minRepeatType:l=r.types.length}=s,o=Array.isArray(t)?new me(t,t.length):t,a=r.types,u=0,m=0;function y(b,v,f,N,w,x){let{id:d,start:g,end:C,size:A}=o,P=m;for(;A<0;)if(o.next(),A==-1){let q=n[d];f.push(q),N.push(g-b);return}else if(A==-3){u=d;return}else if(A==-4){m=d;return}else throw new RangeError(`Unrecognized record size: ${A}`);let $=a[d],Z,Q,Se=g-b;if(C-g<=i&&(Q=T(o.pos-v,w))){let q=new Uint16Array(Q.size-Q.skip),M=o.pos-Q.size,j=q.length;for(;o.pos>M;)j=E(Q.start,q,j);Z=new K(q,C-Q.start,r),Se=Q.start-b}else{let q=o.pos-A;o.next();let M=[],j=[],X=d>=l?d:-1,ee=0,he=C;for(;o.pos>q;)X>=0&&o.id==X&&o.size>=0?(o.end<=he-i&&(I(M,j,g,ee,o.end,he,X,P),ee=M.length,he=o.end),o.next()):x>2500?c(g,q,M,j):y(g,q,M,j,X,x+1);if(X>=0&&ee>0&&ee-1&&ee>0){let _e=_($);Z=ve($,M,j,0,M.length,0,C-g,_e,_e)}else Z=O($,M,j,C-g,P-C)}f.push(Z),N.push(Se)}function c(b,v,f,N){let w=[],x=0,d=-1;for(;o.pos>v;){let{id:g,start:C,end:A,size:P}=o;if(P>4)o.next();else{if(d>-1&&C=0;A-=3)g[P++]=w[A],g[P++]=w[A+1]-C,g[P++]=w[A+2]-C,g[P++]=P;f.push(new K(g,w[2]-C,r)),N.push(C-b)}}function _(b){return(v,f,N)=>{let w=0,x=v.length-1,d,g;if(x>=0&&(d=v[x])instanceof J){if(!x&&d.type==b&&d.length==N)return d;(g=d.prop(k.lookAhead))&&(w=f[x]+d.length+g)}return O(b,v,f,N,w)}}function I(b,v,f,N,w,x,d,g){let C=[],A=[];for(;b.length>N;)C.push(b.pop()),A.push(v.pop()+f-w);b.push(O(r.types[d],C,A,x-w,g-x)),v.push(w-f)}function O(b,v,f,N,w=0,x){if(u){let d=[k.contextHash,u];x=x?[d].concat(x):[d]}if(w>25){let d=[k.lookAhead,w];x=x?[d].concat(x):[d]}return new J(b,v,f,N,x)}function T(b,v){let f=o.fork(),N=0,w=0,x=0,d=f.end-i,g={size:0,start:0,skip:0};e:for(let C=f.pos-b;f.pos>C;){let A=f.size;if(f.id==v&&A>=0){g.size=N,g.start=w,g.skip=x,x+=4,N+=4,f.next();continue}let P=f.pos-A;if(A<0||P=l?4:0,Z=f.start;for(f.next();f.pos>P;){if(f.size<0)if(f.size==-3)$+=4;else break e;else f.id>=l&&($+=4);f.next()}w=Z,N+=A,x+=$}return(v<0||N==b)&&(g.size=N,g.start=w,g.skip=x),g.size>4?g:void 0}function E(b,v,f){let{id:N,start:w,end:x,size:d}=o;if(o.next(),d>=0&&N4){let C=o.pos-(d-4);for(;o.pos>C;)f=E(b,v,f)}v[--f]=g,v[--f]=x-b,v[--f]=w-b,v[--f]=N}else d==-3?u=N:d==-4&&(m=N);return f}let z=[],S=[];for(;o.pos>0;)y(s.start||0,s.bufferStart||0,z,S,-1,0);let R=(e=s.length)!==null&&e!==void 0?e:z.length?S[0]+z[0].length:0;return new J(a[s.topID],z.reverse(),S.reverse(),R)}var ze=new WeakMap;function ae(s,e){if(!s.isAnonymous||e instanceof K||e.type!=s)return 1;let t=ze.get(e);if(t==null){t=1;for(let r of e.children){if(r.type!=s||!(r instanceof J)){t=1;break}t+=ae(s,r)}ze.set(e,t)}return t}function ve(s,e,t,r,i,n,l,o,a){let u=0;for(let I=r;I=m)break;v+=f}if(S==R+1){if(v>m){let f=I[R];_(f.children,f.positions,0,f.children.length,O[R]+z);continue}y.push(I[R])}else{let f=O[S-1]+I[S-1].length-b;y.push(ve(s,I,O,R,S,b,f,null,a))}c.push(b+z-n)}}return _(e,t,r,i,0),(o||a)(y,c,l)}var Me=class s{constructor(e,t,r,i,n=!1,l=!1){this.from=e,this.to=t,this.tree=r,this.offset=i,this.open=(n?1:0)|(l?2:0)}get openStart(){return(this.open&1)>0}get openEnd(){return(this.open&2)>0}static addTree(e,t=[],r=!1){let i=[new s(0,e.length,e,0,!1,r)];for(let n of t)n.to>e.length&&i.push(n);return i}static applyChanges(e,t,r=128){if(!t.length)return e;let i=[],n=1,l=e.length?e[0]:null;for(let o=0,a=0,u=0;;o++){let m=o=r)for(;l&&l.from=c.from||y<=c.to||u){let _=Math.max(c.from,a)-u,I=Math.min(c.to,y)-u;c=_>=I?null:new s(_,I,c.tree,c.offset+u,o>0,!!m)}if(c&&i.push(c),l.to>y)break;l=nnew ie(i.from,i.to)):[new ie(0,0)]:[new ie(0,e.length)],this.createParse(e,t||[],r)}parse(e,t,r){let i=this.startParse(e,t,r);for(;;){let n=i.advance();if(n)return n}}},we=class{constructor(e){this.string=e}get length(){return this.string.length}chunk(e){return this.string.slice(e)}get lineChunks(){return!1}read(e,t){return this.string.slice(e,t)}};var Qe=new k({perNode:!0});var We=0,W=class s{constructor(e,t,r){this.set=e,this.base=t,this.modified=r,this.id=We++}static define(e){if(e?.base)throw new Error("Can not derive from a modified tag");let t=new s([],null,[]);if(t.set.push(t),e)for(let r of e.set)t.set.push(r);return t}static defineModifier(){let e=new ge;return t=>t.modified.indexOf(e)>-1?t:ge.get(t.base||t,t.modified.concat(e).sort((r,i)=>r.id-i.id))}},qe=0,ge=class s{constructor(){this.instances=[],this.id=qe++}static get(e,t){if(!t.length)return e;let r=t[0].instances.find(o=>o.base==e&&Je(t,o.modified));if(r)return r;let i=[],n=new W(i,e,t);for(let o of t)o.instances.push(n);let l=Ke(t);for(let o of e.set)if(!o.modified.length)for(let a of l)i.push(s.get(o,a));return n}};function Je(s,e){return s.length==e.length&&s.every((t,r)=>t==e[r])}function Ke(s){let e=[[]];for(let t=0;tr.length-t.length)}function Ze(s){let e=Object.create(null);for(let t in s){let r=s[t];Array.isArray(r)||(r=[r]);for(let i of t.split(" "))if(i){let n=[],l=2,o=i;for(let y=0;;){if(o=="..."&&y>0&&y+3==i.length){l=1;break}let c=/^"(?:[^"\\]|\\.)*?"|[^\/!]+/.exec(o);if(!c)throw new RangeError("Invalid path: "+i);if(n.push(c[0]=="*"?"":c[0][0]=='"'?JSON.parse(c[0]):c[0]),y+=c[0].length,y==i.length)break;let _=i[y++];if(y==i.length&&_=="!"){l=0;break}if(_!="/")throw new RangeError("Invalid path: "+i);o=i.slice(y)}let a=n.length-1,u=n[a];if(!u)throw new RangeError("Invalid path: "+i);let m=new re(r,l,a>0?n.slice(0,a):null);e[u]=m.sort(e[u])}}return Fe.add(e)}var Fe=new k,re=class{constructor(e,t,r,i){this.tags=e,this.mode=t,this.context=r,this.next=i}get opaque(){return this.mode==0}get inherit(){return this.mode==1}sort(e){return!e||e.depth{let l=i;for(let o of n)for(let a of o.set){let u=t[a.id];if(u){l=l?l+" "+u:u;break}}return l},scope:r}}function Ge(s,e){let t=null;for(let r of s){let i=r.style(e);i&&(t=t?t+" "+i:i)}return t}function et(s,e,t,r=0,i=s.length){let n=new Ne(r,Array.isArray(e)?e:[e],t);n.highlightRange(s.cursor(),r,i,"",n.highlighters),n.flush(i)}var Ne=class{constructor(e,t,r){this.at=e,this.highlighters=t,this.span=r,this.class=""}startSpan(e,t){t!=this.class&&(this.flush(e),e>this.at&&(this.at=e),this.class=t)}flush(e){e>this.at&&this.class&&this.span(this.at,e,this.class)}highlightRange(e,t,r,i,n){let{type:l,from:o,to:a}=e;if(o>=r||a<=t)return;l.isTop&&(n=this.highlighters.filter(_=>!_.scope||_.scope(l)));let u=i,m=$e(e)||re.empty,y=Ge(n,m.tags);if(y&&(u&&(u+=" "),u+=y,m.mode==1&&(i+=(i?" ":"")+y)),this.startSpan(Math.max(t,o),u),m.opaque)return;let c=e.tree&&e.tree.prop(k.mounted);if(c&&c.overlay){let _=e.node.enter(c.overlay[0].from+o,1),I=this.highlighters.filter(T=>!T.scope||T.scope(c.tree.type)),O=e.firstChild();for(let T=0,E=o;;T++){let z=T=S||!e.nextSibling())););if(!z||S>r)break;E=z.to+o,E>t&&(this.highlightRange(_.cursor(),Math.max(t,z.from+o),Math.min(r,E),"",I),this.startSpan(Math.min(r,E),u))}O&&e.parent()}else if(e.firstChild()){c&&(i="");do if(!(e.to<=t)){if(e.from>=r)break;this.highlightRange(e,t,r,i,n),this.startSpan(Math.min(r,e.to),u)}while(e.nextSibling());e.parent()}}};function $e(s){let e=s.type.prop(Fe);for(;e&&e.context&&!s.matchContext(e.context);)e=e.next;return e||null}var h=W.define,pe=h(),V=h(),Re=h(V),je=h(V),G=h(),ce=h(G),Ae=h(G),U=h(),Y=h(U),L=h(),H=h(),Ce=h(),oe=h(Ce),de=h(),p={comment:pe,lineComment:h(pe),blockComment:h(pe),docComment:h(pe),name:V,variableName:h(V),typeName:Re,tagName:h(Re),propertyName:je,attributeName:h(je),className:h(V),labelName:h(V),namespace:h(V),macroName:h(V),literal:G,string:ce,docString:h(ce),character:h(ce),attributeValue:h(ce),number:Ae,integer:h(Ae),float:h(Ae),bool:h(G),regexp:h(G),escape:h(G),color:h(G),url:h(G),keyword:L,self:h(L),null:h(L),atom:h(L),unit:h(L),modifier:h(L),operatorKeyword:h(L),controlKeyword:h(L),definitionKeyword:h(L),moduleKeyword:h(L),operator:H,derefOperator:h(H),arithmeticOperator:h(H),logicOperator:h(H),bitwiseOperator:h(H),compareOperator:h(H),updateOperator:h(H),definitionOperator:h(H),typeOperator:h(H),controlOperator:h(H),punctuation:Ce,separator:h(Ce),bracket:oe,angleBracket:h(oe),squareBracket:h(oe),paren:h(oe),brace:h(oe),content:U,heading:Y,heading1:h(Y),heading2:h(Y),heading3:h(Y),heading4:h(Y),heading5:h(Y),heading6:h(Y),contentSeparator:h(U),list:h(U),quote:h(U),emphasis:h(U),strong:h(U),link:h(U),monospace:h(U),strikethrough:h(U),inserted:h(),deleted:h(),changed:h(),invalid:h(),meta:de,documentMeta:h(de),annotation:h(de),processingInstruction:h(de),definition:W.defineModifier(),constant:W.defineModifier(),function:W.defineModifier(),standard:W.defineModifier(),local:W.defineModifier(),special:W.defineModifier()},tt=Ve([{tag:p.link,class:"tok-link"},{tag:p.heading,class:"tok-heading"},{tag:p.emphasis,class:"tok-emphasis"},{tag:p.strong,class:"tok-strong"},{tag:p.keyword,class:"tok-keyword"},{tag:p.atom,class:"tok-atom"},{tag:p.bool,class:"tok-bool"},{tag:p.url,class:"tok-url"},{tag:p.labelName,class:"tok-labelName"},{tag:p.inserted,class:"tok-inserted"},{tag:p.deleted,class:"tok-deleted"},{tag:p.literal,class:"tok-literal"},{tag:p.string,class:"tok-string"},{tag:p.number,class:"tok-number"},{tag:[p.regexp,p.escape,p.special(p.string)],class:"tok-string2"},{tag:p.variableName,class:"tok-variableName"},{tag:p.local(p.variableName),class:"tok-variableName tok-local"},{tag:p.definition(p.variableName),class:"tok-variableName tok-definition"},{tag:p.special(p.variableName),class:"tok-variableName2"},{tag:p.definition(p.propertyName),class:"tok-propertyName tok-definition"},{tag:p.typeName,class:"tok-typeName"},{tag:p.namespace,class:"tok-namespace"},{tag:p.className,class:"tok-className"},{tag:p.macroName,class:"tok-macroName"},{tag:p.propertyName,class:"tok-propertyName"},{tag:p.operator,class:"tok-operator"},{tag:p.comment,class:"tok-comment"},{tag:p.meta,class:"tok-meta"},{tag:p.invalid,class:"tok-invalid"},{tag:p.punctuation,class:"tok-punctuation"}]);export{k as a,F as b,Ie as c,B as d,J as e,Me as f,Oe as g,Ze as h,Ve as i,et as j,p as k,tt as l};
diff --git a/static/dist/chunks/chunk-CSOMSVJQ.js b/static/dist/chunks/chunk-CSOMSVJQ.js
new file mode 100644
index 0000000..1c25e9e
--- /dev/null
+++ b/static/dist/chunks/chunk-CSOMSVJQ.js
@@ -0,0 +1,3 @@
+import{a as y,b as N,c as At,d as Ct,e as b,f as B,g as it,h as It,i as Dt,j as Ot,k as u}from"./chunk-CGTIGMIP.js";import{O as Tt,R as Pt,a as nt,b as rt,d,f as O,h as St,i as M,l as k}from"./chunk-IVRVZEPW.js";import{A as q,B as xt,l as v,m as $,n as Z,s as D,v as C,w as tt,z as et}from"./chunk-6OYJTXGR.js";var st,P=new y;function $t(n){return v.define({combine:n?t=>t.concat(n):void 0})}var ce=new y,p=class{constructor(t,e,r=[],i=""){this.data=t,this.name=i,C.prototype.hasOwnProperty("tree")||Object.defineProperty(C.prototype,"tree",{get(){return w(this)}}),this.parser=e,this.extension=[S.of(this),C.languageData.of((s,o,l)=>{let a=Mt(s,o,l),f=a.type.prop(P);if(!f)return[];let h=s.facet(f),c=a.type.prop(ce);if(c){let g=a.resolve(o-a.from,l);for(let m of c)if(m.test(g,s)){let x=s.facet(m.facet);return m.type=="replace"?x:x.concat(h)}}return h})].concat(r)}isActiveAt(t,e,r=-1){return Mt(t,e,r).type.prop(P)==this.data}findRegions(t){let e=t.facet(S);if(e?.data==this.data)return[{from:0,to:t.doc.length}];if(!e||!e.allowsNesting)return[];let r=[],i=(s,o)=>{if(s.prop(P)==this.data){r.push({from:o,to:o+s.length});return}let l=s.prop(y.mounted);if(l){if(l.tree.prop(P)==this.data){if(l.overlay)for(let a of l.overlay)r.push({from:a.from+o,to:a.to+o});else r.push({from:o,to:o+s.length});return}else if(l.overlay){let a=r.length;if(i(l.tree,l.overlay[0].from+o),r.length>a)return}}for(let a=0;ar.isTop?e:void 0)]}),t.name)}configure(t,e){return new n(this.data,this.parser.configure(t),e||this.name)}get allowsNesting(){return this.parser.hasWrappers()}};function w(n){let t=n.field(p.state,!1);return t?t.tree:b.empty}function de(n,t,e=50){var r;let i=(r=n.field(p.state,!1))===null||r===void 0?void 0:r.context;if(!i)return null;let s=i.viewport;i.updateViewport({from:0,to:t});let o=i.isDone(t)||i.work(e,t)?i.tree:null;return i.updateViewport(s),o}function ln(n,t=n.doc.length){var e;return((e=n.field(p.state,!1))===null||e===void 0?void 0:e.context.isDone(t))||!1}function an(n,t=n.viewport.to,e=100){let r=de(n.state,t,e);return r!=w(n.state)&&n.dispatch({}),!!r}function fn(n){var t;return((t=n.plugin(zt))===null||t===void 0?void 0:t.isWorking())||!1}var at=class{constructor(t){this.doc=t,this.cursorPos=0,this.string="",this.cursor=t.iter()}get length(){return this.doc.length}syncTo(t){return this.string=this.cursor.next(t-this.cursorPos).value,this.cursorPos=t+this.string.length,this.cursorPos-this.string.length}chunk(t){return this.syncTo(t),this.string}get lineChunks(){return!0}read(t,e){let r=this.cursorPos-this.string.length;return t=this.cursorPos?this.doc.sliceString(t,e):this.string.slice(t-r,e-r)}},L=null,E=class n{constructor(t,e,r=[],i,s,o,l,a){this.parser=t,this.state=e,this.fragments=r,this.tree=i,this.treeLen=s,this.viewport=o,this.skipped=l,this.scheduleOn=a,this.parse=null,this.tempSkipped=[]}static create(t,e,r){return new n(t,e,[],b.empty,0,r,[],null)}startParse(){return this.parser.startParse(new at(this.state.doc),this.fragments)}work(t,e){return e!=null&&e>=this.state.doc.length&&(e=void 0),this.tree!=b.empty&&this.isDone(e??this.state.doc.length)?(this.takeTree(),!0):this.withContext(()=>{var r;if(typeof t=="number"){let i=Date.now()+t;t=()=>Date.now()>i}for(this.parse||(this.parse=this.startParse()),e!=null&&(this.parse.stoppedAt==null||this.parse.stoppedAt>e)&&e=this.treeLen&&((this.parse.stoppedAt==null||this.parse.stoppedAt>t)&&this.parse.stopAt(t),this.withContext(()=>{for(;!(e=this.parse.advance()););}),this.treeLen=t,this.tree=e,this.fragments=this.withoutTempSkipped(B.addTree(this.tree,this.fragments,!0)),this.parse=null)}withContext(t){let e=L;L=this;try{return t()}finally{L=e}}withoutTempSkipped(t){for(let e;e=this.tempSkipped.pop();)t=Bt(t,e.from,e.to);return t}changes(t,e){let{fragments:r,tree:i,treeLen:s,viewport:o,skipped:l}=this;if(this.takeTree(),!t.empty){let a=[];if(t.iterChangedRanges((f,h,c,g)=>a.push({fromA:f,toA:h,fromB:c,toB:g})),r=B.applyChanges(r,a),i=b.empty,s=0,o={from:t.mapPos(o.from,-1),to:t.mapPos(o.to,1)},this.skipped.length){l=[];for(let f of this.skipped){let h=t.mapPos(f.from,1),c=t.mapPos(f.to,-1);ht.from&&(this.fragments=Bt(this.fragments,i,s),this.skipped.splice(r--,1))}return this.skipped.length>=e?!1:(this.reset(),!0)}reset(){this.parse&&(this.takeTree(),this.parse=null)}skipUntilInView(t,e){this.skipped.push({from:t,to:e})}static getSkippingParser(t){return new class extends it{createParse(e,r,i){let s=i[0].from,o=i[i.length-1].to;return{parsedPos:s,advance(){let a=L;if(a){for(let f of i)a.tempSkipped.push(f);t&&(a.scheduleOn=a.scheduleOn?Promise.all([a.scheduleOn,t]):t)}return this.parsedPos=o,new b(N.none,[],[],o-s)},stoppedAt:null,stopAt(){}}}}}isDone(t){t=Math.min(t,this.state.doc.length);let e=this.fragments;return this.treeLen>=t&&e.length&&e[0].from==0&&e[0].to>=t}static get(){return L}};function Bt(n,t,e){return B.applyChanges(n,[{fromA:t,toA:e,fromB:t,toB:e}])}var F=class n{constructor(t){this.context=t,this.tree=t.tree}apply(t){if(!t.docChanged&&this.tree==this.context.tree)return this;let e=this.context.changes(t.changes,t.state),r=this.context.treeLen==t.startState.doc.length?void 0:Math.max(t.changes.mapPos(this.context.treeLen),e.viewport.to);return e.work(20,r)||e.takeTree(),new n(e)}static init(t){let e=Math.min(3e3,t.doc.length),r=E.create(t.facet(S).parser,t,{from:0,to:e});return r.work(20,e)||r.takeTree(),new n(r)}};p.state=$.define({create:F.init,update(n,t){for(let e of t.effects)if(e.is(p.setState))return e.value;return t.startState.facet(S)!=t.state.facet(S)?F.init(t.state):n.apply(t)}});var qt=n=>{let t=setTimeout(()=>n(),500);return()=>clearTimeout(t)};typeof requestIdleCallback<"u"&&(qt=n=>{let t=-1,e=setTimeout(()=>{t=requestIdleCallback(n,{timeout:400})},100);return()=>t<0?clearTimeout(e):cancelIdleCallback(t)});var ot=typeof navigator<"u"&&(!((st=navigator.scheduling)===null||st===void 0)&&st.isInputPending)?()=>navigator.scheduling.isInputPending():null,zt=M.fromClass(class{constructor(t){this.view=t,this.working=null,this.workScheduled=0,this.chunkEnd=-1,this.chunkBudget=-1,this.work=this.work.bind(this),this.scheduleWork()}update(t){let e=this.view.state.field(p.state).context;(e.updateViewport(t.view.viewport)||this.view.viewport.to>e.treeLen)&&this.scheduleWork(),(t.docChanged||t.selectionSet)&&(this.view.hasFocus&&(this.chunkBudget+=50),this.scheduleWork()),this.checkAsyncSchedule(e)}scheduleWork(){if(this.working)return;let{state:t}=this.view,e=t.field(p.state);(e.tree!=e.context.tree||!e.context.isDone(t.doc.length))&&(this.working=qt(this.work))}work(t){this.working=null;let e=Date.now();if(this.chunkEndi+1e3,a=s.context.work(()=>ot&&ot()||Date.now()>o,i+(l?0:1e5));this.chunkBudget-=Date.now()-e,(a||this.chunkBudget<=0)&&(s.context.takeTree(),this.view.dispatch({effects:p.setState.of(new F(s.context))})),this.chunkBudget>0&&!(a&&!l)&&this.scheduleWork(),this.checkAsyncSchedule(s.context)}checkAsyncSchedule(t){t.scheduleOn&&(this.workScheduled++,t.scheduleOn.then(()=>this.scheduleWork()).catch(e=>St(this.view.state,e)).then(()=>this.workScheduled--),t.scheduleOn=null)}destroy(){this.working&&this.working()}isWorking(){return!!(this.working||this.workScheduled>0)}},{eventHandlers:{focus(){this.scheduleWork()}}}),S=v.define({combine(n){return n.length?n[0]:null},enables:n=>[p.state,zt,k.contentAttributes.compute([n],t=>{let e=t.facet(n);return e&&e.name?{"data-language":e.name}:{}})]}),Lt=class{constructor(t,e=[]){this.language=t,this.support=e,this.extension=[t,e]}},Rt=class n{constructor(t,e,r,i,s,o=void 0){this.name=t,this.alias=e,this.extensions=r,this.filename=i,this.loadFunc=s,this.support=o,this.loading=null}load(){return this.loading||(this.loading=this.loadFunc().then(t=>this.support=t,t=>{throw this.loading=null,t}))}static of(t){let{load:e,support:r}=t;if(!e){if(!r)throw new RangeError("Must pass either 'load' or 'support' to LanguageDescription.of");e=()=>Promise.resolve(r)}return new n(t.name,(t.alias||[]).concat(t.name).map(i=>i.toLowerCase()),t.extensions||[],t.filename,e,r)}static matchFilename(t,e){for(let i of t)if(i.filename&&i.filename.test(e))return i;let r=/\.([^.]+)$/.exec(e);if(r){for(let i of t)if(i.extensions.indexOf(r[1])>-1)return i}return null}static matchLanguageName(t,e,r=!0){e=e.toLowerCase();for(let i of t)if(i.alias.some(s=>s==e))return i;if(r)for(let i of t)for(let s of i.alias){let o=e.indexOf(s);if(o>-1&&(s.length>2||!/\w/.test(e[o-1])&&!/\w/.test(e[o+s.length])))return i}return null}},Gt=v.define(),Jt=v.define({combine:n=>{if(!n.length)return" ";let t=n[0];if(!t||/\S/.test(t)||Array.from(t).some(e=>e!=t[0]))throw new Error("Invalid indent unit: "+JSON.stringify(n[0]));return t}});function J(n){let t=n.facet(Jt);return t.charCodeAt(0)==9?n.tabSize*t.length:t.length}function _t(n,t){let e="",r=n.tabSize,i=n.facet(Jt)[0];if(i==" "){for(;t>=r;)e+=" ",t-=r;i=" "}for(let s=0;s=t?me(n,e,t):null}function un(n,t,e){let r=Object.create(null),i=new U(n,{overrideIndentation:o=>{var l;return(l=r[o])!==null&&l!==void 0?l:-1}}),s=[];for(let o=t;o<=e;){let l=n.doc.lineAt(o);o=l.to+1;let a=Kt(i,l.from);if(a==null)continue;/\S/.test(l.text)||(a=0);let f=/^\s*/.exec(l.text)[0],h=_t(n,a);f!=h&&(r[l.from]=a,s.push({from:l.from,to:l.from+f.length,insert:h}))}return n.changes(s)}var U=class{constructor(t,e={}){this.state=t,this.options=e,this.unit=J(t)}lineAt(t,e=1){let r=this.state.doc.lineAt(t),{simulateBreak:i,simulateDoubleBreak:s}=this.options;return i!=null&&i>=r.from&&i<=r.to?s&&i==t?{text:"",from:t}:(e<0?i-1&&(s+=o-this.countColumn(r,r.search(/\S|$/))),s}countColumn(t,e=t.length){return xt(t,this.state.tabSize,e)}lineIndent(t,e=1){let{text:r,from:i}=this.lineAt(t,e),s=this.options.overrideIndentation;if(s){let o=s(i);if(o>-1)return o}return this.countColumn(r,r.search(/\S|$/))}get simulatedBreak(){return this.options.simulateBreak||null}},pe=new y;function me(n,t,e){let r=t.resolveStack(e),i=r.node.enterUnfinishedNodesBefore(e);if(i!=r.node){let s=[];for(let o=i;o!=r.node;o=o.parent)s.push(o);for(let o=s.length-1;o>=0;o--)r={node:s[o],next:r}}return Qt(r,n,e)}function Qt(n,t,e){for(let r=n;r;r=r.next){let i=ke(r.node);if(i)return i(ft.create(t,e,r))}return 0}function ge(n){return n.pos==n.options.simulateBreak&&n.options.simulateDoubleBreak}function ke(n){let t=n.type.prop(pe);if(t)return t;let e=n.firstChild,r;if(e&&(r=e.type.prop(y.closedBy))){let i=n.lastChild,s=i&&r.indexOf(i.name)>-1;return o=>Xt(o,!0,1,void 0,s&&!ge(o)?i.from:void 0)}return n.parent==null?be:null}function be(){return 0}var ft=class n extends U{constructor(t,e,r){super(t.state,t.options),this.base=t,this.pos=e,this.context=r}get node(){return this.context.node}static create(t,e,r){return new n(t,e,r)}get textAfter(){return this.textAfterPos(this.pos)}get baseIndent(){return this.baseIndentFor(this.node)}baseIndentFor(t){let e=this.state.doc.lineAt(t.from);for(;;){let r=t.resolve(e.from);for(;r.parent&&r.parent.from==r.from;)r=r.parent;if(we(r,t))break;e=this.state.doc.lineAt(r.from)}return this.lineIndent(e.from)}continue(){return Qt(this.context.next,this.base,this.pos)}};function we(n,t){for(let e=t;e;e=e.parent)if(n==e)return!0;return!1}function ye(n){let t=n.node,e=t.childAfter(t.from),r=t.lastChild;if(!e)return null;let i=n.options.simulateBreak,s=n.state.doc.lineAt(e.from),o=i==null||i<=s.from?s.to:Math.min(s.to,i);for(let l=e.to;;){let a=t.childAfter(l);if(!a||a==r)return null;if(!a.type.isSkipped)return a.fromXt(r,t,e,n)}function Xt(n,t,e,r,i){let s=n.textAfter,o=s.match(/^\s*/)[0].length,l=r&&s.slice(o,o+r.length)==r||i==n.pos+o,a=t?ye(n):null;return a?l?n.column(a.from):n.column(a.to):n.baseIndent+(l?0:n.unit*e)}var dn=n=>n.baseIndent;function pn({except:n,units:t=1}={}){return e=>{let r=n&&n.test(e.textAfter);return e.baseIndent+(r?0:t*e.unit)}}var ve=200;function mn(){return C.transactionFilter.of(n=>{if(!n.docChanged||!n.isUserEvent("input.type")&&!n.isUserEvent("input.complete"))return n;let t=n.startState.languageDataAt("indentOnInput",n.startState.selection.main.head);if(!t.length)return n;let e=n.newDoc,{head:r}=n.newSelection.main,i=e.lineAt(r);if(r>i.from+ve)return n;let s=e.sliceString(i.from,r);if(!t.some(f=>f.test(s)))return n;let{state:o}=n,l=-1,a=[];for(let{head:f}of o.selection.ranges){let h=o.doc.lineAt(f);if(h.from==l)continue;l=h.from;let c=Kt(o,h.from);if(c==null)continue;let g=/^\s*/.exec(h.text)[0],m=_t(o,c);g!=m&&a.push({from:h.from,to:h.from+g.length,insert:m})}return a.length?[n,{changes:a,sequential:!0}]:n})}var xe=v.define(),Se=new y;function gn(n){let t=n.firstChild,e=n.lastChild;return t&&t.toe)continue;if(s&&l.from=t&&f.to>e&&(s=f)}}return s}function Pe(n){let t=n.lastChild;return t&&t.to==n.to&&t.type.isError}function W(n,t,e){for(let r of n.facet(xe)){let i=r(n,t,e);if(i)return i}return Te(n,t,e)}function Yt(n,t){let e=t.mapPos(n.from,1),r=t.mapPos(n.to,-1);return e>=r?void 0:{from:e,to:r}}var V=D.define({map:Yt}),I=D.define({map:Yt});function kt(n){let t=[];for(let{head:e}of n.state.selection.ranges)t.some(r=>r.from<=e&&r.to>=e)||t.push(n.lineBlockAt(e));return t}var T=$.define({create(){return d.none},update(n,t){n=n.map(t.changes);for(let e of t.effects)if(e.is(V)&&!Ae(n,e.value.from,e.value.to)){let{preparePlaceholder:r}=t.state.facet(wt),i=r?d.replace({widget:new ht(r(t.state,e.value))}):Et;n=n.update({add:[i.range(e.value.from,e.value.to)]})}else e.is(I)&&(n=n.update({filter:(r,i)=>e.value.from!=r||e.value.to!=i,filterFrom:e.value.from,filterTo:e.value.to}));if(t.selection){let e=!1,{head:r}=t.selection.main;n.between(r,r,(i,s)=>{ir&&(e=!0)}),e&&(n=n.update({filterFrom:r,filterTo:r,filter:(i,s)=>s<=r||i>=r}))}return n},provide:n=>k.decorations.from(n),toJSON(n,t){let e=[];return n.between(0,t.doc.length,(r,i)=>{e.push(r,i)}),e},fromJSON(n){if(!Array.isArray(n)||n.length%2)throw new RangeError("Invalid JSON for fold state");let t=[];for(let e=0;e{(!i||i.from>s)&&(i={from:s,to:o})}),i}function Ae(n,t,e){let r=!1;return n.between(t,t,(i,s)=>{i==t&&s==e&&(r=!0)}),r}function bt(n,t){return n.field(T,!1)?t:t.concat(D.appendConfig.of(Zt()))}var Ce=n=>{for(let t of kt(n)){let e=W(n.state,t.from,t.to);if(e)return n.dispatch({effects:bt(n.state,[V.of(e),_(n,e)])}),!0}return!1},Ie=n=>{if(!n.state.field(T,!1))return!1;let t=[];for(let e of kt(n)){let r=j(n.state,e.from,e.to);r&&t.push(I.of(r),_(n,r,!1))}return t.length&&n.dispatch({effects:t}),t.length>0};function _(n,t,e=!0){let r=n.state.doc.lineAt(t.from).number,i=n.state.doc.lineAt(t.to).number;return k.announce.of(`${n.state.phrase(e?"Folded lines":"Unfolded lines")} ${r} ${n.state.phrase("to")} ${i}.`)}var De=n=>{let{state:t}=n,e=[];for(let r=0;r{let t=n.state.field(T,!1);if(!t||!t.size)return!1;let e=[];return t.between(0,n.state.doc.length,(r,i)=>{e.push(I.of({from:r,to:i}))}),n.dispatch({effects:e}),!0};function Me(n,t){for(let e=t;;){let r=W(n.state,e.from,e.to);if(r&&r.to>t.from)return r;if(!e.from)return null;e=n.lineBlockAt(e.from-1)}}var bn=n=>{let t=[];for(let e of kt(n)){let r=j(n.state,e.from,e.to);if(r)t.push(I.of(r),_(n,r,!1));else{let i=Me(n,e);i&&t.push(V.of(i),_(n,i))}}return t.length>0&&n.dispatch({effects:bt(n.state,t)}),!!t.length},wn=[{key:"Ctrl-Shift-[",mac:"Cmd-Alt-[",run:Ce},{key:"Ctrl-Shift-]",mac:"Cmd-Alt-]",run:Ie},{key:"Ctrl-Alt-[",run:De},{key:"Ctrl-Alt-]",run:Oe}],Ne={placeholderDOM:null,preparePlaceholder:null,placeholderText:"\u2026"},wt=v.define({combine(n){return tt(n,Ne)}});function Zt(n){let t=[T,Le];return n&&t.push(wt.of(n)),t}function te(n,t){let{state:e}=n,r=e.facet(wt),i=o=>{let l=n.lineBlockAt(n.posAtDOM(o.target)),a=j(n.state,l.from,l.to);a&&n.dispatch({effects:I.of(a)}),o.preventDefault()};if(r.placeholderDOM)return r.placeholderDOM(n,i,t);let s=document.createElement("span");return s.textContent=r.placeholderText,s.setAttribute("aria-label",e.phrase("folded code")),s.title=e.phrase("unfold"),s.className="cm-foldPlaceholder",s.onclick=i,s}var Et=d.replace({widget:new class extends rt{toDOM(n){return te(n,null)}}}),ht=class extends rt{constructor(t){super(),this.value=t}eq(t){return this.value==t.value}toDOM(t){return te(t,this.value)}},Be={openText:"\u2304",closedText:"\u203A",markerDOM:null,domEventHandlers:{},foldingChanged:()=>!1},R=class extends Tt{constructor(t,e){super(),this.config=t,this.open=e}eq(t){return this.config==t.config&&this.open==t.open}toDOM(t){if(this.config.markerDOM)return this.config.markerDOM(this.open);let e=document.createElement("span");return e.textContent=this.open?this.config.openText:this.config.closedText,e.title=t.state.phrase(this.open?"Fold line":"Unfold line"),e}};function yn(n={}){let t=Object.assign(Object.assign({},Be),n),e=new R(t,!0),r=new R(t,!1),i=M.fromClass(class{constructor(o){this.from=o.viewport.from,this.markers=this.buildMarkers(o)}update(o){(o.docChanged||o.viewportChanged||o.startState.facet(S)!=o.state.facet(S)||o.startState.field(T,!1)!=o.state.field(T,!1)||w(o.startState)!=w(o.state)||t.foldingChanged(o))&&(this.markers=this.buildMarkers(o.view))}buildMarkers(o){let l=new q;for(let a of o.viewportLineBlocks){let f=j(o.state,a.from,a.to)?r:W(o.state,a.from,a.to)?e:null;f&&l.add(a.from,a.from,f)}return l.finish()}}),{domEventHandlers:s}=t;return[i,Pt({class:"cm-foldGutter",markers(o){var l;return((l=o.plugin(i))===null||l===void 0?void 0:l.markers)||et.empty},initialSpacer(){return new R(t,!1)},domEventHandlers:Object.assign(Object.assign({},s),{click:(o,l,a)=>{if(s.click&&s.click(o,l,a))return!0;let f=j(o.state,l.from,l.to);if(f)return o.dispatch({effects:I.of(f)}),!0;let h=W(o.state,l.from,l.to);return h?(o.dispatch({effects:V.of(h)}),!0):!1}})}),Zt()]}var Le=k.baseTheme({".cm-foldPlaceholder":{backgroundColor:"#eee",border:"1px solid #ddd",color:"#888",borderRadius:".2em",margin:"0 1px",padding:"0 1px",cursor:"pointer"},".cm-foldGutter span":{padding:"0 1px",cursor:"pointer"}}),K=class n{constructor(t,e){this.specs=t;let r;function i(l){let a=nt.newName();return(r||(r=Object.create(null)))["."+a]=l,a}let s=typeof e.all=="string"?e.all:e.all?i(e.all):void 0,o=e.scope;this.scope=o instanceof p?l=>l.prop(P)==o.data:o?l=>l==o:void 0,this.style=Dt(t.map(l=>({tag:l.tag,class:l.class||i(Object.assign({},l,{tag:null}))})),{all:s}).style,this.module=r?new nt(r):null,this.themeType=e.themeType}static define(t,e){return new n(t,e||{})}},ut=v.define(),ee=v.define({combine(n){return n.length?[n[0]]:null}});function G(n){let t=n.facet(ut);return t.length?t:n.facet(ee)}function vn(n,t){let e=[Re],r;return n instanceof K&&(n.module&&e.push(k.styleModule.of(n.module)),r=n.themeType),t?.fallback?e.push(ee.of(n)):r?e.push(ut.computeN([k.darkTheme],i=>i.facet(k.darkTheme)==(r=="dark")?[n]:[])):e.push(ut.of(n)),e}function xn(n,t,e){let r=G(n),i=null;if(r){for(let s of r)if(!s.scope||e&&s.scope(e)){let o=s.style(t);o&&(i=i?i+" "+o:o)}}return i}var ct=class{constructor(t){this.markCache=Object.create(null),this.tree=w(t.state),this.decorations=this.buildDeco(t,G(t.state)),this.decoratedTo=t.viewport.to}update(t){let e=w(t.state),r=G(t.state),i=r!=G(t.startState),{viewport:s}=t.view,o=t.changes.mapPos(this.decoratedTo,1);e.length=s.to?(this.decorations=this.decorations.map(t.changes),this.decoratedTo=o):(e!=this.tree||t.viewportChanged||i)&&(this.tree=e,this.decorations=this.buildDeco(t.view,r),this.decoratedTo=s.to)}buildDeco(t,e){if(!e||!this.tree.length)return d.none;let r=new q;for(let{from:i,to:s}of t.visibleRanges)Ot(this.tree,e,(o,l,a)=>{r.add(o,l,this.markCache[a]||(this.markCache[a]=d.mark({class:a})))},i,s);return r.finish()}},Re=Z.high(M.fromClass(ct,{decorations:n=>n.decorations})),Sn=K.define([{tag:u.meta,color:"#404740"},{tag:u.link,textDecoration:"underline"},{tag:u.heading,textDecoration:"underline",fontWeight:"bold"},{tag:u.emphasis,fontStyle:"italic"},{tag:u.strong,fontWeight:"bold"},{tag:u.strikethrough,textDecoration:"line-through"},{tag:u.keyword,color:"#708"},{tag:[u.atom,u.bool,u.url,u.contentSeparator,u.labelName],color:"#219"},{tag:[u.literal,u.inserted],color:"#164"},{tag:[u.string,u.deleted],color:"#a11"},{tag:[u.regexp,u.escape,u.special(u.string)],color:"#e40"},{tag:u.definition(u.variableName),color:"#00f"},{tag:u.local(u.variableName),color:"#30a"},{tag:[u.typeName,u.namespace],color:"#085"},{tag:u.className,color:"#167"},{tag:[u.special(u.variableName),u.macroName],color:"#256"},{tag:u.definition(u.propertyName),color:"#00c"},{tag:u.comment,color:"#940"},{tag:u.invalid,color:"#f00"}]),Ee=k.baseTheme({"&.cm-focused .cm-matchingBracket":{backgroundColor:"#328c8252"},"&.cm-focused .cm-nonmatchingBracket":{backgroundColor:"#bb555544"}}),ne=1e4,re="()[]{}",ie=v.define({combine(n){return tt(n,{afterCursor:!0,brackets:re,maxScanDistance:ne,renderMatch:We})}}),Fe=d.mark({class:"cm-matchingBracket"}),Ue=d.mark({class:"cm-nonmatchingBracket"});function We(n){let t=[],e=n.matched?Fe:Ue;return t.push(e.range(n.start.from,n.start.to)),n.end&&t.push(e.range(n.end.from,n.end.to)),t}var je=$.define({create(){return d.none},update(n,t){if(!t.docChanged&&!t.selection)return n;let e=[],r=t.state.facet(ie);for(let i of t.state.selection.ranges){if(!i.empty)continue;let s=z(t.state,i.head,-1,r)||i.head>0&&z(t.state,i.head-1,1,r)||r.afterCursor&&(z(t.state,i.head,1,r)||i.headk.decorations.from(n)}),He=[je,Ee];function Tn(n={}){return[ie.of(n),He]}var Ve=new y;function dt(n,t,e){let r=n.prop(t<0?y.openedBy:y.closedBy);if(r)return r;if(n.name.length==1){let i=e.indexOf(n.name);if(i>-1&&i%2==(t<0?1:0))return[e[i+t]]}return null}function pt(n){let t=n.type.prop(Ve);return t?t(n.node):n}function z(n,t,e,r={}){let i=r.maxScanDistance||ne,s=r.brackets||re,o=w(n),l=o.resolveInner(t,e);for(let a=l;a;a=a.parent){let f=dt(a.type,e,s);if(f&&a.from0?t>=h.from&&th.from&&t<=h.to))return $e(n,t,e,a,h,f,s)}}return qe(n,t,e,o,l.type,i,s)}function $e(n,t,e,r,i,s,o){let l=r.parent,a={from:i.from,to:i.to},f=0,h=l?.cursor();if(h&&(e<0?h.childBefore(r.from):h.childAfter(r.to)))do if(e<0?h.to<=r.from:h.from>=r.to){if(f==0&&s.indexOf(h.type.name)>-1&&h.from0)return null;let f={from:e<0?t-1:t,to:e>0?t+1:t},h=n.doc.iterRange(t,e>0?n.doc.length:0),c=0;for(let g=0;!h.next().done&&g<=s;){let m=h.value;e<0&&(g+=m.length);let x=t+g*e;for(let A=e>0?0:m.length-1,ue=e>0?m.length:-1;A!=ue;A+=e){let Y=o.indexOf(m[A]);if(!(Y<0||r.resolveInner(x+A,1).type!=i))if(Y%2==0==e>0)c++;else{if(c==1)return{start:f,end:{from:x+A,to:x+A+1},matched:Y>>1==a>>1};c--}}e>0&&(g+=m.length)}return h.done?{start:f,matched:!1}:null}function Ft(n,t,e,r=0,i=0){t==null&&(t=n.search(/[^\s\u00a0]/),t==-1&&(t=n.length));let s=i;for(let o=r;o=this.string.length}sol(){return this.pos==0}peek(){return this.string.charAt(this.pos)||void 0}next(){if(this.pose}eatSpace(){let t=this.pos;for(;/[\s\u00a0]/.test(this.string.charAt(this.pos));)++this.pos;return this.pos>t}skipToEnd(){this.pos=this.string.length}skipTo(t){let e=this.string.indexOf(t,this.pos);if(e>-1)return this.pos=e,!0}backUp(t){this.pos-=t}column(){return this.lastColumnPosr?o.toLowerCase():o,s=this.string.substr(this.pos,t.length);return i(s)==i(t)?(e!==!1&&(this.pos+=t.length),!0):null}else{let i=this.string.slice(this.pos).match(t);return i&&i.index>0?null:(i&&e!==!1&&(this.pos+=i[0].length),i)}}current(){return this.string.slice(this.start,this.pos)}};function ze(n){return{name:n.name||"",token:n.token,blankLine:n.blankLine||(()=>{}),startState:n.startState||(()=>!0),copyState:n.copyState||Ge,indent:n.indent||(()=>null),languageData:n.languageData||{},tokenTable:n.tokenTable||vt}}function Ge(n){if(typeof n!="object")return n;let t={};for(let e in n){let r=n[e];t[e]=r instanceof Array?r.slice():r}return t}var Ut=new WeakMap,Wt=class n extends p{constructor(t){let e=$t(t.languageData),r=ze(t),i,s=new class extends it{createParse(o,l,a){return new mt(i,o,l,a)}};super(e,s,[Gt.of((o,l)=>this.getIndent(o,l))],t.name),this.topNode=Qe(e),i=this,this.streamParser=r,this.stateAfter=new y({perNode:!0}),this.tokenTable=t.tokenTable?new X(r.tokenTable):Ke}static define(t){return new n(t)}getIndent(t,e){let r=w(t.state),i=r.resolve(e);for(;i&&i.type!=this.topNode;)i=i.parent;if(!i)return null;let s,{overrideIndentation:o}=t.options;o&&(s=Ut.get(t.state),s!=null&&s1e4)return null;for(;a=r&&e+t.length<=i&&t.prop(n.stateAfter);if(s)return{state:n.streamParser.copyState(s),pos:e+t.length};for(let o=t.children.length-1;o>=0;o--){let l=t.children[o],a=e+t.positions[o],f=l instanceof b&&a=t.length)return t;!i&&t.type==n.topNode&&(i=!0);for(let s=t.children.length-1;s>=0;s--){let o=t.positions[s],l=t.children[s],a;if(oe&&yt(n,i.tree,0-i.offset,e,o),a;if(l&&(a=se(n,i.tree,e+i.offset,l.pos+i.offset,!1)))return{state:l.state,tree:a}}return{state:n.streamParser.startState(r?J(r):4),tree:b.empty}}var mt=class{constructor(t,e,r,i){this.lang=t,this.input=e,this.fragments=r,this.ranges=i,this.stoppedAt=null,this.chunks=[],this.chunkPos=[],this.chunk=[],this.chunkReused=void 0,this.rangeIndex=0,this.to=i[i.length-1].to;let s=E.get(),o=i[0].from,{state:l,tree:a}=Je(t,r,o,s?.state);this.state=l,this.parsedPos=this.chunkStart=o+a.length;for(let f=0;f=e?this.finish():t&&this.parsedPos>=t.viewport.to?(t.skipUntilInView(this.parsedPos,e),this.finish()):null}stopAt(t){this.stoppedAt=t}lineAfter(t){let e=this.input.chunk(t);if(this.input.lineChunks)e==`
+`&&(e="");else{let r=e.indexOf(`
+`);r>-1&&(e=e.slice(0,r))}return t+e.length<=this.to?e:e.slice(0,this.to-t)}nextLine(){let t=this.parsedPos,e=this.lineAfter(t),r=t+e.length;for(let i=this.rangeIndex;;){let s=this.ranges[i].to;if(s>=r||(e=e.slice(0,s-(r-e.length)),i++,i==this.ranges.length))break;let o=this.ranges[i].from,l=this.lineAfter(o);e+=l,r=o+l.length}return{line:e,end:r}}skipGapsTo(t,e,r){for(;;){let i=this.ranges[this.rangeIndex].to,s=t+e;if(r>0?i>s:i>=s)break;let o=this.ranges[++this.rangeIndex].from;e+=o-i}return e}moveRangeIndex(){for(;this.ranges[this.rangeIndex].to1){s=this.skipGapsTo(e,s,1),e+=s;let o=this.chunk.length;s=this.skipGapsTo(r,s,-1),r+=s,i+=this.chunk.length-o}return this.chunk.push(t,e,r,i),s}parseLine(t){let{line:e,end:r}=this.nextLine(),i=0,{streamParser:s}=this.lang,o=new Q(e,t?t.state.tabSize:4,t?J(t.state):2);if(o.eol())s.blankLine(this.state,o.indentUnit);else for(;!o.eol();){let l=oe(s.token,o,this.state);if(l&&(i=this.emitToken(this.lang.tokenTable.resolve(l),this.parsedPos+o.start,this.parsedPos+o.pos,4,i)),o.start>1e4)break}this.parsedPos=r,this.moveRangeIndex(),this.parsedPost.start)return i}throw new Error("Stream parser failed to advance stream.")}var vt=Object.create(null),H=[N.none],_e=new At(H),jt=[],Ht=Object.create(null),le=Object.create(null);for(let[n,t]of[["variable","variableName"],["variable-2","variableName.special"],["string-2","string.special"],["def","variableName.definition"],["tag","tagName"],["attribute","attributeName"],["type","typeName"],["builtin","variableName.standard"],["qualifier","modifier"],["error","invalid"],["header","heading"],["property","propertyName"]])le[n]=ae(vt,t);var X=class{constructor(t){this.extra=t,this.table=Object.assign(Object.create(null),le)}resolve(t){return t?this.table[t]||(this.table[t]=ae(this.extra,t)):0}},Ke=new X(vt);function lt(n,t){jt.indexOf(n)>-1||(jt.push(n),console.warn(t))}function ae(n,t){let e=[];for(let l of t.split(" ")){let a=[];for(let f of l.split(".")){let h=n[f]||u[f];h?typeof h=="function"?a.length?a=a.map(h):lt(f,`Modifier ${f} used at start of tag`):a.length?lt(f,`Tag ${f} used as modifier`):a=Array.isArray(h)?h:[h]:lt(f,`Unknown highlighting tag ${f}`)}for(let f of a)e.push(f)}if(!e.length)return 0;let r=t.replace(/ /g,"_"),i=r+" "+e.map(l=>l.id),s=Ht[i];if(s)return s.id;let o=Ht[i]=N.define({id:H.length,name:r,props:[It({[r]:e})]});return H.push(o),o.id}function Qe(n){let t=N.define({id:H.length,name:"Document",props:[P.add(()=>n)],top:!0});return H.push(t),t}function fe(n){return n.length<=4096&&/[\u0590-\u05f4\u0600-\u06ff\u0700-\u08ac\ufb50-\ufdff]/.test(n)}function he(n){for(let t=n.iter();!t.next().done;)if(fe(t.value))return!0;return!1}function Xe(n){let t=!1;return n.iterChanges((e,r,i,s,o)=>{!t&&he(o)&&(t=!0)}),t}var gt=v.define({combine:n=>n.some(t=>t)});function Pn(n={}){let t=[Ye];return n.alwaysIsolate&&t.push(gt.of(!0)),t}var Ye=M.fromClass(class{constructor(n){this.always=n.state.facet(gt)||n.textDirection!=O.LTR||n.state.facet(k.perLineTextDirection),this.hasRTL=!this.always&&he(n.state.doc),this.tree=w(n.state),this.decorations=this.always||this.hasRTL?Vt(n,this.tree,this.always):d.none}update(n){let t=n.state.facet(gt)||n.view.textDirection!=O.LTR||n.state.facet(k.perLineTextDirection);if(!t&&!this.hasRTL&&Xe(n.changes)&&(this.hasRTL=!0),!t&&!this.hasRTL)return;let e=w(n.state);(t!=this.always||e!=this.tree||n.docChanged||n.viewportChanged)&&(this.tree=e,this.always=t,this.decorations=Vt(n.view,e,t))}},{provide:n=>{function t(e){var r,i;return(i=(r=e.plugin(n))===null||r===void 0?void 0:r.decorations)!==null&&i!==void 0?i:d.none}return[k.outerDecorations.of(t),Z.lowest(k.bidiIsolatedRanges.of(t))]}});function Vt(n,t,e){let r=new q,i=n.visibleRanges;e||(i=Ze(i,n.state.doc));for(let{from:s,to:o}of i)t.iterate({enter:l=>{let a=l.type.prop(y.isolate);a&&r.add(l.from,l.to,tn[a])},from:s,to:o});return r.finish()}function Ze(n,t){let e=t.iter(),r=0,i=[],s=null;for(let{from:o,to:l}of n)if(!(s&&s.to>o&&(o=s.to,o>=l)))for(r+e.value.lengtha-10?s.to=Math.min(l,f):i.push(s={from:a,to:Math.min(l,f)})),f>=l)break;r=f,e.next()}return i}var tn={rtl:d.mark({class:"cm-iso",inclusive:!0,attributes:{dir:"rtl"},bidiIsolate:O.RTL}),ltr:d.mark({class:"cm-iso",inclusive:!0,attributes:{dir:"ltr"},bidiIsolate:O.LTR}),auto:d.mark({class:"cm-iso",inclusive:!0,attributes:{dir:"auto"},bidiIsolate:null})};export{P as a,$t as b,ce as c,p as d,Nt as e,w as f,de as g,ln as h,an as i,fn as j,at as k,E as l,S as m,Lt as n,Rt as o,Gt as p,Jt as q,J as r,_t as s,Kt as t,un as u,U as v,pe as w,ft as x,cn as y,dn as z,pn as A,mn as B,xe as C,Se as D,gn as E,W as F,V as G,I as H,T as I,kn as J,Ce as K,Ie as L,De as M,Oe as N,bn as O,wn as P,Zt as Q,yn as R,K as S,vn as T,xn as U,Sn as V,Tn as W,Ve as X,z as Y,Q as Z,Wt as _,Pn as $};
diff --git a/static/dist/chunks/chunk-IVRVZEPW.js b/static/dist/chunks/chunk-IVRVZEPW.js
new file mode 100644
index 0000000..36e6268
--- /dev/null
+++ b/static/dist/chunks/chunk-IVRVZEPW.js
@@ -0,0 +1,7 @@
+import{A as ks,B as ni,C as me,a as K,c as ct,d as ii,f as xs,g as yt,i as si,k as v,l as C,m as de,n as ue,p as vs,s as G,t as Ss,u as Cs,v as Dt,w as pe,x as ge,z as E}from"./chunk-6OYJTXGR.js";var Ms=typeof Symbol>"u"?"__\u037C":Symbol.for("\u037C"),ri=typeof Symbol>"u"?"__styleSet"+Math.floor(Math.random()*1e8):Symbol("styleSet"),As=typeof globalThis<"u"?globalThis:typeof window<"u"?window:{},it=class{constructor(t,e){this.rules=[];let{finish:i}=e||{};function n(o){return/^@/.test(o)?[o]:o.split(/,\s*/)}function r(o,l,a,h){let c=[],f=/^@(\w+)\b/.exec(o[0]),d=f&&f[1]=="keyframes";if(f&&l==null)return a.push(o[0]+";");for(let u in l){let p=l[u];if(/&/.test(u))r(u.split(/,\s*/).map(g=>o.map(m=>g.replace(/&/,m))).reduce((g,m)=>g.concat(m)),p,a);else if(p&&typeof p=="object"){if(!f)throw new RangeError("The value of a property ("+u+") should be a primitive value.");r(n(u),p,c,d)}else p!=null&&c.push(u.replace(/_.*/,"").replace(/[A-Z]/g,g=>"-"+g.toLowerCase())+": "+p+";")}(c.length||d)&&a.push((i&&!f&&!h?o.map(i):o).join(", ")+" {"+c.join(" ")+"}")}for(let o in t)r(n(o),t[o],this.rules)}getRules(){return this.rules.join(`
+`)}static newName(){let t=As[Ms]||1;return As[Ms]=t+1,"\u037C"+t.toString(36)}static mount(t,e,i){let n=t[ri],r=i&&i.nonce;n?r&&n.setNonce(r):n=new oi(t,r),n.mount(Array.isArray(e)?e:[e],t)}},Ts=new Map,oi=class{constructor(t,e){let i=t.ownerDocument||t,n=i.defaultView;if(!t.head&&t.adoptedStyleSheets&&n.CSSStyleSheet){let r=Ts.get(i);if(r)return t[ri]=r;this.sheet=new n.CSSStyleSheet,Ts.set(i,this)}else this.styleTag=i.createElement("style"),e&&this.styleTag.setAttribute("nonce",e);this.modules=[],t[ri]=this}mount(t,e){let i=this.sheet,n=0,r=0;for(let o=0;o-1&&(this.modules.splice(a,1),r--,a=-1),a==-1){if(this.modules.splice(r++,0,l),i)for(let h=0;h",191:"?",192:"~",219:"{",220:"|",221:"}",222:'"'},wr=typeof navigator<"u"&&/Mac/.test(navigator.platform),xr=typeof navigator<"u"&&/MSIE \d|Trident\/(?:[7-9]|\d{2,})\..*rv:(\d+)/.exec(navigator.userAgent);for(H=0;H<10;H++)st[48+H]=st[96+H]=String(H);var H;for(H=1;H<=24;H++)st[H+111]="F"+H;var H;for(H=65;H<=90;H++)st[H]=String.fromCharCode(H+32),Ot[H]=String.fromCharCode(H);var H;for(be in st)Ot.hasOwnProperty(be)||(Ot[be]=st[be]);var be;function Ds(s){var t=wr&&s.metaKey&&s.shiftKey&&!s.ctrlKey&&!s.altKey||xr&&s.shiftKey&&s.key&&s.key.length==1||s.key=="Unidentified",e=!t&&s.key||(s.shiftKey?Ot:st)[s.keyCode]||s.key||"Unidentified";return e=="Esc"&&(e="Escape"),e=="Del"&&(e="Delete"),e=="Left"&&(e="ArrowLeft"),e=="Up"&&(e="ArrowUp"),e=="Right"&&(e="ArrowRight"),e=="Down"&&(e="ArrowDown"),e}function ft(){var s=arguments[0];typeof s=="string"&&(s=document.createElement(s));var t=1,e=arguments[1];if(e&&typeof e=="object"&&e.nodeType==null&&!Array.isArray(e)){for(var i in e)if(Object.prototype.hasOwnProperty.call(e,i)){var n=e[i];typeof n=="string"?s.setAttribute(i,n):n!=null&&(s[i]=n)}t++}for(;t2),y={mac:Bs||/Mac/.test(V.platform),windows:/Win/.test(V.platform),linux:/Linux|X11/.test(V.platform),ie:Qe,ie_version:pn?pi.documentMode||6:mi?+mi[1]:gi?+gi[1]:0,gecko:Ls,gecko_version:Ls?+(/Firefox\/(\d+)/.exec(V.userAgent)||[0,0])[1]:0,chrome:!!li,chrome_version:li?+li[1]:0,ios:Bs,android:/Android\b/.test(V.userAgent),webkit:Rs,webkit_version:Rs?+(/\bAppleWebKit\/(\d+)/.exec(V.userAgent)||[0,0])[1]:0,safari:bi,safari_version:bi?+(/\bVersion\/(\d+(\.\d+)?)/.exec(V.userAgent)||[0,0])[1]:0,tabSize:pi.documentElement.style.tabSize!=null?"tab-size":"-moz-tab-size"};function cs(s,t){for(let e in s)e=="class"&&t.class?t.class+=" "+s.class:e=="style"&&t.style?t.style+=";"+s.style:t[e]=s[e];return t}var Ee=Object.create(null);function fs(s,t,e){if(s==t)return!0;s||(s=Ee),t||(t=Ee);let i=Object.keys(s),n=Object.keys(t);if(i.length-(e&&i.indexOf(e)>-1?1:0)!=n.length-(e&&n.indexOf(e)>-1?1:0))return!1;for(let r of i)if(r!=e&&(n.indexOf(r)==-1||s[r]!==t[r]))return!1;return!0}function vr(s,t){for(let e=s.attributes.length-1;e>=0;e--){let i=s.attributes[e].name;t[i]==null&&s.removeAttribute(i)}for(let e in t){let i=t[e];e=="style"?s.style.cssText=i:s.getAttribute(e)!=i&&s.setAttribute(e,i)}}function Es(s,t,e){let i=!1;if(t)for(let n in t)e&&n in e||(i=!0,n=="style"?s.style.cssText="":s.removeAttribute(n));if(e)for(let n in e)t&&t[n]==e[n]||(i=!0,n=="style"?s.style.cssText=e[n]:s.setAttribute(n,e[n]));return i}function Sr(s){let t=Object.create(null);for(let e=0;e0?3e8:-4e8:e>0?1e8:-1e8,new St(t,e,e,i,t.widget||null,!1)}static replace(t){let e=!!t.block,i,n;if(t.isBlockGap)i=-5e8,n=4e8;else{let{start:r,end:o}=gn(t,e);i=(r?e?-3e8:-1:5e8)-1,n=(o?e?2e8:1:-6e8)+1}return new St(t,i,n,e,t.widget||null,!0)}static line(t){return new ie(t)}static set(t,e=!1){return E.of(t,e)}hasHeight(){return this.widget?this.widget.estimatedHeight>-1:!1}};T.none=E.empty;var ee=class s extends T{constructor(t){let{start:e,end:i}=gn(t);super(e?-1:5e8,i?1:-6e8,null,t),this.tagName=t.tagName||"span",this.attrs=t.class&&t.attributes?cs(t.attributes,{class:t.class}):t.class?{class:t.class}:t.attributes||Ee}eq(t){return this==t||t instanceof s&&this.tagName==t.tagName&&fs(this.attrs,t.attrs)}range(t,e=t){if(t>=e)throw new RangeError("Mark decorations may not be empty");return super.range(t,e)}};ee.prototype.point=!1;var ie=class s extends T{constructor(t){super(-2e8,-2e8,null,t)}eq(t){return t instanceof s&&this.spec.class==t.spec.class&&fs(this.spec.attributes,t.spec.attributes)}range(t,e=t){if(e!=t)throw new RangeError("Line decoration ranges must be zero-length");return super.range(t,e)}};ie.prototype.mapMode=yt.TrackBefore;ie.prototype.point=!0;var St=class s extends T{constructor(t,e,i,n,r,o){super(e,i,r,t),this.block=n,this.isReplace=o,this.mapMode=n?e<=0?yt.TrackBefore:yt.TrackAfter:yt.TrackDel}get type(){return this.startSide!=this.endSide?N.WidgetRange:this.startSide<=0?N.WidgetBefore:N.WidgetAfter}get heightRelevant(){return this.block||!!this.widget&&(this.widget.estimatedHeight>=5||this.widget.lineBreaks>0)}eq(t){return t instanceof s&&Cr(this.widget,t.widget)&&this.block==t.block&&this.startSide==t.startSide&&this.endSide==t.endSide}range(t,e=t){if(this.isReplace&&(t>e||t==e&&this.startSide>0&&this.endSide<=0))throw new RangeError("Invalid range for replacement decoration");if(!this.isReplace&&e!=t)throw new RangeError("Widget decorations can only have zero-length ranges");return super.range(t,e)}};St.prototype.point=!0;function gn(s,t=!1){let{inclusiveStart:e,inclusiveEnd:i}=s;return e==null&&(e=s.inclusive),i==null&&(i=s.inclusive),{start:e??t,end:i??t}}function Cr(s,t){return s==t||!!(s&&t&&s.compare(t))}function Pt(s,t,e,i=0){let n=e.length-1;n>=0&&e[n]+i>=s?e[n]=Math.max(e[n],t):e.push(s,t)}var He=class s extends ge{constructor(t,e,i){super(),this.tagName=t,this.attributes=e,this.rank=i}eq(t){return t==this||t instanceof s&&this.tagName==t.tagName&&fs(this.attributes,t.attributes)}static create(t){return new s(t.tagName,t.attributes||Ee,t.rank==null?50:Math.max(0,Math.min(t.rank,100)))}static set(t,e=!1){return E.of(t,e)}};He.prototype.startSide=He.prototype.endSide=-1;function se(s){let t;return s.nodeType==11?t=s.getSelection?s:s.ownerDocument:t=s,t.getSelection()}function yi(s,t){return t?s==t||s.contains(t.nodeType!=1?t.parentNode:t):!1}function jt(s,t){if(!t.anchorNode)return!1;try{return yi(s,t.anchorNode)}catch{return!1}}function Yt(s){return s.nodeType==3?re(s,0,s.nodeValue.length).getClientRects():s.nodeType==1?s.getClientRects():[]}function Xt(s,t,e,i){return e?Hs(s,t,e,i,-1)||Hs(s,t,e,i,1):!1}function pt(s){for(var t=0;;t++)if(s=s.previousSibling,!s)return t}function Pe(s){return s.nodeType==1&&/^(DIV|P|LI|UL|OL|BLOCKQUOTE|DD|DT|H\d|SECTION|PRE)$/.test(s.nodeName)}function Hs(s,t,e,i,n){for(;;){if(s==e&&t==i)return!0;if(t==(n<0?0:lt(s))){if(s.nodeName=="DIV")return!1;let r=s.parentNode;if(!r||r.nodeType!=1)return!1;t=pt(s)+(n<0?0:1),s=r}else if(s.nodeType==1){if(s=s.childNodes[t+(n<0?-1:0)],s.nodeType==1&&s.contentEditable=="false")return!1;t=n<0?lt(s):0}else return!1}}function lt(s){return s.nodeType==3?s.nodeValue.length:s.childNodes.length}function ne(s,t){let{left:e,right:i}=s;if(e==i)return s;let n=t?e:i;return{left:n,right:n,top:s.top,bottom:s.bottom}}function kr(s){let t=s.visualViewport;return t?{left:0,right:t.width,top:0,bottom:t.height}:{left:0,right:s.innerWidth,top:0,bottom:s.innerHeight}}function mn(s,t){let e=t.width/s.offsetWidth,i=t.height/s.offsetHeight;return(e>.995&&e<1.005||!isFinite(e)||Math.abs(t.width-s.offsetWidth)<1)&&(e=1),(i>.995&&i<1.005||!isFinite(i)||Math.abs(t.height-s.offsetHeight)<1)&&(i=1),{scaleX:e,scaleY:i}}function Mr(s,t,e,i,n,r,o,l){let a=s.ownerDocument,h=a.defaultView||window;for(let c=s,f=!1;c&&!f;)if(c.nodeType==1){let d,u=c==a.body,p=1,g=1;if(u)d=kr(h);else{if(/^(fixed|sticky)$/.test(getComputedStyle(c).position)&&(f=!0),c.scrollHeight<=c.clientHeight&&c.scrollWidth<=c.clientWidth){c=c.assignedSlot||c.parentNode;continue}let w=c.getBoundingClientRect();({scaleX:p,scaleY:g}=mn(c,w)),d={left:w.left,right:w.left+c.clientWidth*p,top:w.top,bottom:w.top+c.clientHeight*g}}let m=0,b=0;if(n=="nearest")t.top0&&t.bottom>d.bottom+b&&(b=t.bottom-d.bottom+o)):t.bottom>d.bottom-o&&(b=t.bottom-d.bottom+o,e<0&&t.top-b0&&t.right>d.right+m&&(m=t.right-d.right+r)):t.right>d.right-r&&(m=t.right-d.right+r,e<0&&t.leftd.bottom||t.leftd.right)&&(t={left:Math.max(t.left,d.left),right:Math.min(t.right,d.right),top:Math.max(t.top,d.top),bottom:Math.min(t.bottom,d.bottom)}),c=c.assignedSlot||c.parentNode}else if(c.nodeType==11)c=c.host;else break}function bn(s,t=!0){let e=s.ownerDocument,i=null,n=null;for(let r=s.parentNode;r&&!(r==e.body||(!t||i)&&n);)if(r.nodeType==1)!n&&r.scrollHeight>r.clientHeight&&(n=r),t&&!i&&r.scrollWidth>r.clientWidth&&(i=r),r=r.assignedSlot||r.parentNode;else if(r.nodeType==11)r=r.host;else break;return{x:i,y:n}}var wi=class{constructor(){this.anchorNode=null,this.anchorOffset=0,this.focusNode=null,this.focusOffset=0}eq(t){return this.anchorNode==t.anchorNode&&this.anchorOffset==t.anchorOffset&&this.focusNode==t.focusNode&&this.focusOffset==t.focusOffset}setRange(t){let{anchorNode:e,focusNode:i}=t;this.set(e,Math.min(t.anchorOffset,e?lt(e):0),i,Math.min(t.focusOffset,i?lt(i):0))}set(t,e,i,n){this.anchorNode=t,this.anchorOffset=e,this.focusNode=i,this.focusOffset=n}},wt=null;y.safari&&y.safari_version>=26&&(wt=!1);function yn(s){if(s.setActive)return s.setActive();if(wt)return s.focus(wt);let t=[];for(let e=s;e&&(t.push(e,e.scrollTop,e.scrollLeft),e!=e.ownerDocument);e=e.parentNode);if(s.focus(wt==null?{get preventScroll(){return wt={preventScroll:!0},!0}}:void 0),!wt){wt=!1;for(let e=0;eMath.max(0,s.document.documentElement.scrollHeight-s.innerHeight-4):s.scrollTop>Math.max(1,s.scrollHeight-s.clientHeight-4)}function xn(s,t){for(let e=s,i=t;;){if(e.nodeType==3&&i>0)return{node:e,offset:i};if(e.nodeType==1&&i>0){if(e.contentEditable=="false")return null;e=e.childNodes[i-1],i=lt(e)}else if(e.parentNode&&!Pe(e))i=pt(e),e=e.parentNode;else return null}}function vn(s,t){for(let e=s,i=t;;){if(e.nodeType==3&&i=e){if(l.level==i)return o;(r<0||(n!=0?n<0?l.frome:t[r].level>l.level))&&(r=o)}}if(r<0)throw new RangeError("Index out of range");return r}};function kn(s,t){if(s.length!=t.length)return!1;for(let e=0;e=0;g-=3)if(U[g+1]==-u){let m=U[g+2],b=m&2?n:m&4?m&1?r:n:0;b&&(L[f]=L[U[g]]=b),l=g;break}}else{if(U.length==189)break;U[l++]=f,U[l++]=d,U[l++]=a}else if((p=L[f])==2||p==1){let g=p==n;a=g?0:1;for(let m=l-3;m>=0;m-=3){let b=U[m+2];if(b&2)break;if(g)U[m+2]|=2;else{if(b&4)break;U[m+2]|=4}}}}}function Er(s,t,e,i){for(let n=0,r=i;n<=e.length;n++){let o=n?e[n-1].to:s,l=na;)p==m&&(p=e[--g].from,m=g?e[g-1].to:s),L[--p]=u;a=c}else r=h,a++}}}function vi(s,t,e,i,n,r,o){let l=i%2?2:1;if(i%2==n%2)for(let a=t,h=0;aa&&o.push(new j(a,g.from,u));let m=g.direction==Ct!=!(u%2);Si(s,m?i+1:i,n,g.inner,g.from,g.to,o),a=g.to}p=g.to}else{if(p==e||(c?L[p]!=l:L[p]==l))break;p++}d?vi(s,a,p,i+1,n,d,o):at;){let c=!0,f=!1;if(!h||a>r[h-1].to){let g=L[a-1];g!=l&&(c=!1,f=g==16)}let d=!c&&l==1?[]:null,u=c?i:i+1,p=a;t:for(;;)if(h&&p==r[h-1].to){if(f)break t;let g=r[--h];if(!c)for(let m=g.from,b=h;;){if(m==t)break t;if(b&&r[b-1].to==m)m=r[--b].from;else{if(L[m-1]==l)break t;break}}if(d)d.push(g);else{g.toL.length;)L[L.length]=256;let i=[],n=t==Ct?0:1;return Si(s,n,n,e,0,s.length,i),i}function An(s){return[new j(0,s,0)]}var Tn="";function Dn(s,t,e,i,n){var r;let o=i.head-s.from,l=j.find(t,o,(r=i.bidiLevel)!==null&&r!==void 0?r:-1,i.assoc),a=t[l],h=a.side(n,e);if(o==h){let d=l+=n?1:-1;if(d<0||d>=t.length)return null;a=t[l=d],o=a.side(!n,e),h=a.side(n,e)}let c=ct(s.text,o,a.forward(n,e));(ca.to)&&(c=h),Tn=s.text.slice(Math.min(o,c),Math.max(o,c));let f=l==(n?t.length-1:0)?null:t[l+(n?1:-1)];return f&&c==h&&f.level+(n?0:1)s.some(t=>t)}),Nn=C.define({combine:s=>s.some(t=>t)}),Wn=C.define(),$t=class s{constructor(t,e,i,n,r,o=!1){this.range=t,this.y=e,this.x=i,this.yMargin=n,this.xMargin=r,this.isSnapshot=o}map(t){return t.empty?this:new s(this.range.map(t),this.y,this.x,this.yMargin,this.xMargin,this.isSnapshot)}clip(t){return this.range.to<=t.doc.length?this:new s(v.cursor(t.doc.length),this.y,this.x,this.yMargin,this.xMargin,this.isSnapshot)}},ye=G.define({map:(s,t)=>s.map(t)}),Vn=G.define();function J(s,t,e){let i=s.facet(Bn);i.length?i[0](t):window.onerror&&window.onerror(String(t),e,void 0,void 0,t)||(e?console.error(e+":",t):console.error(t))}var nt=C.define({combine:s=>s.length?s[0]:!0}),Pr=0,Rt=C.define({combine(s){return s.filter((t,e)=>{for(let i=0;i{let a=[];return o&&a.push(Ze.of(h=>{let c=h.plugin(l);return c?o(c):T.none})),r&&a.push(r(l)),a})}static fromClass(t,e){return s.define((i,n)=>new t(i,n),e)}},Gt=class{constructor(t){this.spec=t,this.mustUpdate=null,this.value=null}get plugin(){return this.spec&&this.spec.plugin}update(t){if(this.value){if(this.mustUpdate){let e=this.mustUpdate;if(this.mustUpdate=null,this.value.update)try{this.value.update(e)}catch(i){if(J(e.state,i,"CodeMirror plugin crashed"),this.value.destroy)try{this.value.destroy()}catch{}this.deactivate()}}}else if(this.spec)try{this.value=this.spec.plugin.create(t,this.spec.arg)}catch(e){J(t.state,e,"CodeMirror plugin crashed"),this.deactivate()}return this}destroy(t){var e;if(!((e=this.value)===null||e===void 0)&&e.destroy)try{this.value.destroy()}catch(i){J(t.state,i,"CodeMirror plugin crashed")}}deactivate(){this.spec=this.value=null}},Fn=C.define(),Je=C.define(),Ze=C.define(),In=C.define(),gs=C.define(),ae=C.define(),zn=C.define();function Ns(s,t){let e=s.state.facet(zn);if(!e.length)return e;let i=e.map(r=>r instanceof Function?r(s):r),n=[];return E.spans(i,t.from,t.to,{point(){},span(r,o,l,a){let h=r-t.from,c=o-t.from,f=n;for(let d=l.length-1;d>=0;d--,a--){let u=l[d].spec.bidiIsolate,p;if(u==null&&(u=Hr(t.text,h,c)),a>0&&f.length&&(p=f[f.length-1]).to==h&&p.direction==u)p.to=c,f=p.inner;else{let g={from:h,to:c,direction:u,inner:[]};f.push(g),f=g.inner}}}}),n}var Kn=C.define();function ms(s){let t=0,e=0,i=0,n=0;for(let r of s.state.facet(Kn)){let o=r(s);o&&(o.left!=null&&(t=Math.max(t,o.left)),o.right!=null&&(e=Math.max(e,o.right)),o.top!=null&&(i=Math.max(i,o.top)),o.bottom!=null&&(n=Math.max(n,o.bottom)))}return{left:t,right:e,top:i,bottom:n}}var Kt=C.define(),Y=class s{constructor(t,e,i,n){this.fromA=t,this.toA=e,this.fromB=i,this.toB=n}join(t){return new s(Math.min(this.fromA,t.fromA),Math.max(this.toA,t.toA),Math.min(this.fromB,t.fromB),Math.max(this.toB,t.toB))}addToSet(t){let e=t.length,i=this;for(;e>0;e--){let n=t[e-1];if(!(n.fromA>i.toA)){if(n.toAn.push(new Y(r,o,l,a))),this.changedRanges=n}static create(t,e,i){return new s(t,e,i)}get viewportChanged(){return(this.flags&4)>0}get viewportMoved(){return(this.flags&8)>0}get heightChanged(){return(this.flags&2)>0}get geometryChanged(){return this.docChanged||(this.flags&18)>0}get focusChanged(){return(this.flags&1)>0}get docChanged(){return!this.changes.empty}get selectionSet(){return this.transactions.some(t=>t.selection)}get empty(){return this.flags==0&&this.transactions.length==0}},Nr=[],R=class{constructor(t,e,i=0){this.dom=t,this.length=e,this.flags=i,this.parent=null,t.cmTile=this}get breakAfter(){return this.flags&1}get children(){return Nr}isWidget(){return!1}get isHidden(){return!1}isComposite(){return!1}isLine(){return!1}isText(){return!1}isBlock(){return!1}get domAttrs(){return null}sync(t){if(this.flags|=2,this.flags&4){this.flags&=-5;let e=this.domAttrs;e&&vr(this.dom,e)}}toString(){return this.constructor.name+(this.children.length?`(${this.children})`:"")+(this.breakAfter?"#":"")}destroy(){this.parent=null}setDOM(t){this.dom=t,t.cmTile=this}get posAtStart(){return this.parent?this.parent.posBefore(this):0}get posAtEnd(){return this.posAtStart+this.length}posBefore(t,e=this.posAtStart){let i=e;for(let n of this.children){if(n==t)return i;i+=n.length+n.breakAfter}throw new RangeError("Invalid child in posBefore")}posAfter(t){return this.posBefore(t)+t.length}covers(t){return!0}coordsIn(t,e,i){return null}domPosFor(t,e){let i=pt(this.dom),n=this.length?t>0:e>0;return new Q(this.parent.dom,i+(n?1:0),t==0||t==this.length)}markDirty(t){this.flags&=-3,t&&(this.flags|=4),this.parent&&this.parent.flags&2&&this.parent.markDirty(!1)}get overrideDOMText(){return null}get root(){for(let t=this;t;t=t.parent)if(t instanceof Vt)return t;return null}static get(t){return t.cmTile}},Wt=class extends R{constructor(t){super(t,0),this._children=[]}isComposite(){return!0}get children(){return this._children}get lastChild(){return this.children.length?this.children[this.children.length-1]:null}append(t){this.children.push(t),t.parent=this}sync(t){if(this.flags&2)return;super.sync(t);let e=this.dom,i=null,n,r=t?.node==e?t:null,o=0;for(let l of this.children){if(l.sync(t),o+=l.length+l.breakAfter,n=i?i.nextSibling:e.firstChild,r&&n!=l.dom&&(r.written=!0),l.dom.parentNode==e)for(;n&&n!=l.dom;)n=Ws(n);else e.insertBefore(l.dom,n);i=l.dom}for(n=i?i.nextSibling:e.firstChild,r&&n&&(r.written=!0);n;)n=Ws(n);this.length=o}};function Ws(s){let t=s.nextSibling;return s.parentNode.removeChild(s),t}var Vt=class extends Wt{constructor(t,e){super(e),this.view=t}owns(t){for(;t;t=t.parent)if(t==this)return!0;return!1}isBlock(){return!0}nearest(t){for(;;){if(!t)return null;let e=R.get(t);if(e&&this.owns(e))return e;t=t.parentNode}}blockTiles(t){for(let e=[],i=this,n=0,r=0;;)if(n==i.children.length){if(!e.length)return;i=i.parent,i.breakAfter&&r++,n=e.pop()}else{let o=i.children[n++];if(o instanceof rt)e.push(n),i=o,n=0;else{let l=r+o.length,a=t(o,r);if(a!==void 0)return a;r=l+o.breakAfter}}}resolveBlock(t,e){let i,n=-1,r,o=-1;if(this.blockTiles((l,a)=>{let h=a+l.length;if(t>=a&&t<=h){if(l.isWidget()&&e>=-1&&e<=1){if(l.flags&32)return!0;l.flags&16&&(i=void 0)}(at||t==a&&(e>1?l.length:l.covers(-1)))&&(!r||!l.isWidget()&&r.isWidget())&&(r=l,o=t-a)}}),!i&&!r)throw new Error("No tile at position "+t);return i&&e<0||!r?{tile:i,offset:n}:{tile:r,offset:o}}},rt=class s extends Wt{constructor(t,e){super(t),this.wrapper=e}isBlock(){return!0}covers(t){return this.children.length?t<0?this.children[0].covers(-1):this.lastChild.covers(1):!1}get domAttrs(){return this.wrapper.attributes}static of(t,e){let i=new s(e||document.createElement(t.tagName),t);return e||(i.flags|=4),i}},Ft=class s extends Wt{constructor(t,e){super(t),this.attrs=e}isLine(){return!0}static start(t,e,i){let n=new s(e||document.createElement("div"),t);return(!e||!i)&&(n.flags|=4),n}get domAttrs(){return this.attrs}resolveInline(t,e,i){let n=null,r=-1,o=null,l=-1;function a(c,f){for(let d=0,u=0;d=f&&(p.isComposite()?a(p,f-u):(!o||o.isHidden&&(e>0&&!(o.flags&32)||i&&Vr(o,p)))&&(g>f||p.flags&32&&e<=1)?(o=p,l=f-u):(u=-1)&&(n=p,r=f-u)),u=g}}a(this,t);let h=(e<0?n:o)||n||o;return h?{tile:h,offset:h==n?r:l}:null}coordsIn(t,e,i){let n=this.resolveInline(t,e,!0);return n?n.tile.coordsIn(Math.max(0,n.offset),e,i):Wr(this)}domIn(t,e){let i=this.resolveInline(t,e);if(i){let{tile:n,offset:r}=i;if(this.dom.contains(n.dom))return n.isText()?new Q(n.dom,Math.min(n.dom.nodeValue.length,r)):n.domPosFor(r,n.flags&16?1:n.flags&32?-1:e);let o=i.tile.parent,l=!1;for(let a of o.children){if(l)return new Q(a.dom,0);a==i.tile&&(l=!0)}}return new Q(this.dom,0)}};function Wr(s){let t=s.dom.lastChild;if(!t)return s.dom.getBoundingClientRect();let e=Yt(t);return e[e.length-1]||null}function Vr(s,t){let e=s.coordsIn(0,1),i=t.coordsIn(0,1);return e&&i&&i.topn&&(t=n);let r=t,o=t,l=0;t==0&&e<0||t==n&&e>=0?y.chrome||y.gecko||(t?(r--,l=1):o=0)?0:a.length-1];return y.safari&&!l&&h.width==0&&(h=Array.prototype.find.call(a,c=>c.width)||h),i==null?h:ne(h,(l?l>0:e<0)==i)}static of(t,e){let i=new s(e||document.createTextNode(t),t);return e||(i.flags|=2),i}},kt=class s extends R{constructor(t,e,i,n){super(t,e,n),this.widget=i}isWidget(){return!0}get isHidden(){return this.widget.isHidden}covers(t){return this.flags&48?!1:(this.flags&(t<0?64:128))>0}coordsIn(t,e){return this.coordsInWidget(t,e,!1)}coordsInWidget(t,e,i){let n=this.widget.coordsAt(this.dom,t,e);if(n)return n;if(i)return ne(this.dom.getBoundingClientRect(),this.length?t==0:e<=0);{let r=this.dom.getClientRects(),o=null;if(!r.length)return null;let l=this.flags&16?!0:this.flags&32?!1:t>0;for(let a=l?r.length-1:0;o=r[a],!(t>0?a==0:a==r.length-1||o.top0==i)}},ki=class{constructor(t){this.index=0,this.beforeBreak=!1,this.parents=[],this.tile=t}advance(t,e,i){let{tile:n,index:r,beforeBreak:o,parents:l}=this;for(;t||e>0;)if(n.isComposite())if(o){if(!t)break;i&&i.break(),t--,o=!1}else if(r==n.children.length){if(!t&&!l.length)break;i&&i.leave(n),o=!!n.breakAfter,{tile:n,index:r}=l.pop(),r++}else{let a=n.children[r],h=a.breakAfter;(e>0?a.length<=t:a.length=0;l--){let a=e.marks[l],h=n.lastChild;if(h instanceof I&&h.mark.eq(a.mark))h.dom!=a.dom&&h.setDOM(ai(a.dom)),n=h;else{if(this.cache.reused.get(a)){let f=R.get(a.dom);f&&f.setDOM(ai(a.dom))}let c=I.of(a.mark,a.dom);n.append(c),n=c}this.cache.reused.set(a,2)}let r=R.get(t.text);r&&this.cache.reused.set(r,2);let o=new xt(t.text,t.text.nodeValue);o.flags|=8,this.pos=t.range.toB,n.append(o)}addInlineWidget(t,e,i){let n=this.afterWidget&&t.flags&48&&(this.afterWidget.flags&48)==(t.flags&48);n||this.flushBuffer();let r=this.ensureMarks(e,i);!n&&!(t.flags&16)&&r.append(this.getBuffer(1)),r.append(t),this.pos+=t.length,this.afterWidget=t}addMark(t,e,i){this.flushBuffer(),this.ensureMarks(e,i).append(t),this.pos+=t.length,this.afterWidget=null}addBlockWidget(t){this.getBlockPos().append(t),this.pos+=t.length,this.lastBlock=t,this.endLine()}continueWidget(t){let e=this.afterWidget||this.lastBlock;e.length+=t,this.pos+=t}addLineStart(t,e){var i;t||(t=qn);let n=Ft.start(t,e||((i=this.cache.find(Ft))===null||i===void 0?void 0:i.dom),!!e);this.getBlockPos().append(this.lastBlock=this.curLine=n)}addLine(t){this.getBlockPos().append(t),this.pos+=t.length,this.lastBlock=t,this.endLine()}addBreak(){this.lastBlock.flags|=1,this.endLine(),this.pos++}addLineStartIfNotCovered(t){this.blockPosCovered()||this.addLineStart(t)}ensureLine(t){this.curLine||this.addLineStart(t)}ensureMarks(t,e){var i;let n=this.curLine;for(let r=t.length-1;r>=0;r--){let o=t[r],l;if(e>0&&(l=n.lastChild)&&l instanceof I&&l.mark.eq(o))n=l,e--;else{let a=I.of(o,(i=this.cache.find(I,h=>h.mark.eq(o)))===null||i===void 0?void 0:i.dom);n.append(a),n=a,e=0}}return n}endLine(){if(this.curLine){this.flushBuffer();let t=this.curLine.lastChild;(!t||!Vs(this.curLine,!1)||t.dom.nodeName!="BR"&&t.isWidget()&&!(y.ios&&Vs(this.curLine,!0)))&&this.curLine.append(this.cache.findWidget(hi,0,32)||new kt(hi.toDOM(),0,hi,32)),this.curLine=this.afterWidget=null}}updateBlockWrappers(){this.wrapperPos>this.pos+1e4&&(this.blockWrappers.goto(this.pos),this.wrappers.length=0);for(let t=this.wrappers.length-1;t>=0;t--)this.wrappers[t].to=this.pos){let e=t.rank*102+t.value.rank,i=new Mi(t.from,t.to,t.value,e),n=this.wrappers.length;for(;n>0&&(this.wrappers[n-1].rank-i.rank||this.wrappers[n-1].to-i.to)<0;)n--;this.wrappers.splice(n,0,i)}this.wrapperPos=this.pos}getBlockPos(){var t;this.updateBlockWrappers();let e=this.root;for(let i of this.wrappers){let n=e.lastChild;if(i.fromo.wrapper.eq(i.wrapper)))===null||t===void 0?void 0:t.dom);e.append(r),e=r}}return e}blockPosCovered(){let t=this.lastBlock;return t!=null&&!t.breakAfter&&(!t.isWidget()||(t.flags&160)>0)}getBuffer(t){let e=2|(t<0?16:32),i=this.cache.find(It,void 0,1);return i&&(i.flags=e),i||new It(e)}flushBuffer(){this.afterWidget&&!(this.afterWidget.flags&32)&&(this.afterWidget.parent.append(this.getBuffer(-1)),this.afterWidget=null)}},Ti=class{constructor(t){this.skipCount=0,this.text="",this.textOff=0,this.cursor=t.iter()}skip(t){this.textOff+t<=this.text.length?this.textOff+=t:(this.skipCount+=t-(this.text.length-this.textOff),this.text="",this.textOff=0)}next(t){if(this.textOff==this.text.length){let{value:n,lineBreak:r,done:o}=this.cursor.next(this.skipCount);if(this.skipCount=0,o)throw new Error("Ran out of text content when drawing inline views");this.text=n;let l=this.textOff=Math.min(t,n.length);return r?null:n.slice(0,l)}let e=Math.min(this.text.length,this.textOff+t),i=this.text.slice(this.textOff,e);return this.textOff=e,i}},We=[kt,Ft,xt,I,It,rt,Vt];for(let s=0;s[]),this.index=We.map(()=>0),this.reused=new Map}add(t){let e=t.constructor.bucket,i=this.buckets[e];i.length<6?i.push(t):i[this.index[e]=(this.index[e]+1)%6]=t}find(t,e,i=2){let n=t.bucket,r=this.buckets[n],o=this.index[n];for(let l=0;l{if(this.cache.add(o),o.isComposite())return!1},enter:o=>this.cache.add(o),leave:()=>{},break:()=>{}}}run(t,e){let i=e&&this.getCompositionContext(e.text);for(let n=0,r=0,o=0;;){let l=on){let h=a-n;this.preserve(h,!o,!l),n=a,r+=h}if(!l)break;e&&l.fromA<=e.range.fromA&&l.toA>=e.range.toA?(this.forward(l.fromA,e.range.fromA,e.range.fromA{if(o.isWidget())if(this.openWidget)this.builder.continueWidget(a-l);else{let h=a>0||l{o.isLine()?this.builder.addLineStart(o.attrs,this.cache.maybeReuse(o)):(this.cache.add(o),o instanceof I&&n.unshift(o.mark)),this.openWidget=!1},leave:o=>{o.isLine()?n.length&&(n.length=r=0):o instanceof I&&(n.shift(),r=Math.min(r,n.length))},break:()=>{this.builder.addBreak(),this.openWidget=!1}}),this.text.skip(t)}emit(t,e){let i=null,n=this.builder,r=-1,o=E.spans(this.decorations,t,e,{point:(l,a,h,c,f,d)=>{if(h instanceof St){if(this.disallowBlockEffectsFor[d]){if(h.block)throw new RangeError("Block decorations may not be specified via plugins");if(a>this.view.state.doc.lineAt(l).to)throw new RangeError("Decorations that replace line breaks may not be specified via plugins")}if(r=c.length,f>c.length)n.continueWidget(a-l);else{let u=h.widget||(h.block?gt.block:gt.inline),p=Fr(h),g=this.cache.findWidget(u,a-l,p)||kt.of(u,this.view,a-l,p);h.block?(h.startSide>0&&n.addLineStartIfNotCovered(i),n.addBlockWidget(g)):(n.ensureLine(i),n.addInlineWidget(g,c,f))}i=null}else i=Ir(i,h);a>l&&this.text.skip(a-l)},span:(l,a,h,c)=>{for(let f=l;f-1&&(this.openWidget=o>r),this.openWidget||n.addLineStartIfNotCovered(i),this.openMarks=o}forward(t,e,i=1){e-t<=10?this.old.advance(e-t,i,this.reuseWalker):(this.old.advance(5,-1,this.reuseWalker),this.old.advance(e-t-10,-1),this.old.advance(5,i,this.reuseWalker))}getCompositionContext(t){let e=[],i=null;for(let n=t.parentNode;;n=n.parentNode){let r=R.get(n);if(n==this.view.contentDOM)break;r instanceof I?e.push(r):r?.isLine()?i=r:r instanceof rt||(n.nodeName=="DIV"&&!i&&n!=this.view.contentDOM?i=new Ft(n,qn):i||e.push(I.of(new ee({tagName:n.nodeName.toLowerCase(),attributes:Sr(n)}),n)))}return{line:i,marks:e}}};function Vs(s,t){let e=i=>{for(let n of i.children)if((t?n.isText():n.length)||e(n))return!0;return!1};return e(s)}function Fr(s){let t=s.isReplace?(s.startSide<0?64:0)|(s.endSide>0?128:0):s.startSide>0?32:16;return s.block&&(t|=256),t}var qn={class:"cm-line"};function Ir(s,t){let e=t.spec.attributes,i=t.spec.class;return!e&&!i||(s||(s={class:"cm-line"}),e&&cs(e,s),i&&(s.class+=" "+i)),s}function zr(s){let t=[];for(let e=s.parents.length;e>1;e--){let i=e==s.parents.length?s.tile:s.parents[e].tile;i instanceof I&&t.push(i.mark)}return t}function ai(s){let t=R.get(s);return t&&t.setDOM(s.cloneNode()),s}var gt=class extends ot{constructor(t){super(),this.tag=t}eq(t){return t.tag==this.tag}toDOM(){return document.createElement(this.tag)}updateDOM(t){return t.nodeName.toLowerCase()==this.tag}get isHidden(){return!0}};gt.inline=new gt("span");gt.block=new gt("div");var hi=new class extends ot{toDOM(){return document.createElement("br")}get isHidden(){return!0}get editable(){return!0}},Ve=class{constructor(t){this.view=t,this.decorations=[],this.blockWrappers=[],this.dynamicDecorationMap=[!1],this.domChanged=null,this.hasComposition=null,this.editContextFormatting=T.none,this.lastCompositionAfterCursor=!1,this.minWidth=0,this.minWidthFrom=0,this.minWidthTo=0,this.impreciseAnchor=null,this.impreciseHead=null,this.forceSelection=!1,this.lastUpdate=Date.now(),this.updateDeco(),this.tile=new Vt(t,t.contentDOM),this.updateInner([new Y(0,0,0,t.state.doc.length)],null)}update(t){var e;let i=t.changedRanges;this.minWidth>0&&i.length&&(i.every(({fromA:c,toA:f})=>fthis.minWidthTo)?(this.minWidthFrom=t.changes.mapPos(this.minWidthFrom,1),this.minWidthTo=t.changes.mapPos(this.minWidthTo,1)):this.minWidth=this.minWidthFrom=this.minWidthTo=0),this.updateEditContextFormatting(t);let n=-1;this.view.inputState.composing>=0&&!this.view.observer.editContext&&(!((e=this.domChanged)===null||e===void 0)&&e.newSel?n=this.domChanged.newSel.head:!Gr(t.changes,this.hasComposition)&&!t.selectionSet&&(n=t.state.selection.main.head));let r=n>-1?qr(this.view,t.changes,n):null;if(this.domChanged=null,this.hasComposition){let{from:c,to:f}=this.hasComposition;i=new Y(c,f,t.changes.mapPos(c,-1),t.changes.mapPos(f,1)).addToSet(i.slice())}this.hasComposition=r?{from:r.range.fromB,to:r.range.toB}:null,(y.ie||y.chrome)&&!r&&t&&t.state.doc.lines!=t.startState.doc.lines&&(this.forceSelection=!0);let o=this.decorations,l=this.blockWrappers;this.updateDeco();let a=Yr(o,this.decorations,t.changes);a.length&&(i=Y.extendWithRanges(i,a));let h=Xr(l,this.blockWrappers,t.changes);return h.length&&(i=Y.extendWithRanges(i,h)),r&&!i.some(c=>c.fromA<=r.range.fromA&&c.toA>=r.range.toA)&&(i=r.range.addToSet(i.slice())),this.tile.flags&2&&i.length==0?!1:(this.updateInner(i,r),t.transactions.length&&(this.lastUpdate=Date.now()),!0)}updateInner(t,e){this.view.viewState.mustMeasureContent=!0;let{observer:i}=this.view;i.ignore(()=>{if(e||t.length){let o=this.tile,l=new Oi(this.view,o,this.blockWrappers,this.decorations,this.dynamicDecorationMap);e&&R.get(e.text)&&l.cache.reused.set(R.get(e.text),2),this.tile=l.run(t,e),Li(o,l.cache.reused)}this.tile.dom.style.height=this.view.viewState.contentHeight/this.view.scaleY+"px",this.tile.dom.style.flexBasis=this.minWidth?this.minWidth+"px":"";let r=y.chrome||y.ios?{node:i.selectionRange.focusNode,written:!1}:void 0;this.tile.sync(r),r&&(r.written||i.selectionRange.focusNode!=r.node||!this.tile.dom.contains(r.node))&&(this.forceSelection=!0),this.tile.dom.style.height=""});let n=[];if(this.view.viewport.from||this.view.viewport.to-1)&&jt(i,this.view.observer.selectionRange)&&!(n&&i.contains(n));if(!(r||e||o))return;let l=this.forceSelection;this.forceSelection=!1;let a=this.view.state.selection.main,h,c;if(a.empty?c=h=this.inlineDOMNearPos(a.anchor,a.assoc||1):(c=this.inlineDOMNearPos(a.head,a.head==a.from?1:-1),h=this.inlineDOMNearPos(a.anchor,a.anchor==a.from?1:-1)),y.gecko&&a.empty&&!this.hasComposition&&Kr(h)){let d=document.createTextNode("");this.view.observer.ignore(()=>h.node.insertBefore(d,h.node.childNodes[h.offset]||null)),h=c=new Q(d,0),l=!0}let f=this.view.observer.selectionRange;(l||!f.focusNode||(!Xt(h.node,h.offset,f.anchorNode,f.anchorOffset)||!Xt(c.node,c.offset,f.focusNode,f.focusOffset))&&!this.suppressWidgetCursorChange(f,a))&&(this.view.observer.ignore(()=>{y.android&&y.chrome&&i.contains(f.focusNode)&&$r(f.focusNode,i)&&(i.blur(),i.focus({preventScroll:!0}));let d=se(this.view.root);if(d)if(a.empty){if(y.gecko){let u=_r(h.node,h.offset);if(u&&u!=3){let p=(u==1?xn:vn)(h.node,h.offset);p&&(h=new Q(p.node,p.offset))}}d.collapse(h.node,h.offset),a.bidiLevel!=null&&d.caretBidiLevel!==void 0&&(d.caretBidiLevel=a.bidiLevel)}else if(d.extend){d.collapse(h.node,h.offset);try{d.extend(c.node,c.offset)}catch{}}else{let u=document.createRange();a.anchor>a.head&&([h,c]=[c,h]),u.setEnd(c.node,c.offset),u.setStart(h.node,h.offset),d.removeAllRanges(),d.addRange(u)}o&&this.view.root.activeElement==i&&(i.blur(),n&&n.focus())}),this.view.observer.setSelectionRange(h,c)),this.impreciseAnchor=h.precise?null:new Q(f.anchorNode,f.anchorOffset),this.impreciseHead=c.precise?null:new Q(f.focusNode,f.focusOffset)}suppressWidgetCursorChange(t,e){return this.hasComposition&&e.empty&&Xt(t.focusNode,t.focusOffset,t.anchorNode,t.anchorOffset)&&this.posFromDOM(t.focusNode,t.focusOffset)==e.head}enforceCursorAssoc(){if(this.hasComposition)return;let{view:t}=this,e=t.state.selection.main,i=se(t.root),{anchorNode:n,anchorOffset:r}=t.observer.selectionRange;if(!i||!e.empty||!e.assoc||!i.modify)return;let o=this.lineAt(e.head,e.assoc);if(!o)return;let l=o.posAtStart;if(e.head==l||e.head==l+o.length)return;let a=this.coordsAt(e.head,-1),h=this.coordsAt(e.head,1);if(!a||!h||a.bottom>h.top)return;let c=this.domAtPos(e.head+e.assoc,e.assoc);i.collapse(c.node,c.offset),i.modify("move",e.assoc<0?"forward":"backward","lineboundary"),t.observer.readSelectionRange();let f=t.observer.selectionRange;t.docView.posFromDOM(f.anchorNode,f.anchorOffset)!=e.from&&i.collapse(n,r)}posFromDOM(t,e){let i=this.tile.nearest(t);if(!i)return this.tile.dom.compareDocumentPosition(t)&2?0:this.view.state.doc.length;let n=i.posAtStart;if(i.isComposite()){let r;if(t==i.dom)r=i.dom.childNodes[e];else{let o=lt(t)==0?0:e==0?-1:1;for(;;){let l=t.parentNode;if(l==i.dom)break;o==0&&l.firstChild!=l.lastChild&&(t==l.firstChild?o=-1:o=1),t=l}o<0?r=t:r=t.nextSibling}if(r==i.dom.firstChild)return n;for(;r&&!R.get(r);)r=r.nextSibling;if(!r)return n+i.length;for(let o=0,l=n;;o++){let a=i.children[o];if(a.dom==r)return l;l+=a.length+a.breakAfter}}else return i.isText()?t==i.dom?n+e:n+(e?i.length:0):n}domAtPos(t,e){let{tile:i,offset:n}=this.tile.resolveBlock(t,e);return i.isWidget()?i.domPosFor(n,e):i.domIn(n,e)}inlineDOMNearPos(t,e){let i,n=-1,r=!1,o,l=-1,a=!1;return this.tile.blockTiles((h,c)=>{if(h.isWidget()){if(h.flags&32&&c>=t)return!0;h.flags&16&&(r=!0)}else{let f=c+h.length;if(c<=t&&(i=h,n=t-c,r=f=t&&!o&&(o=h,l=t-c,a=c>t),c>t&&o)return!0}}),!i&&!o?this.domAtPos(t,e):(r&&o?i=null:a&&i&&(o=null),i&&e<0||!o?i.domIn(n,e):o.domIn(l,e))}coordsAt(t,e,i){let{tile:n,offset:r}=this.tile.resolveBlock(t,e);return n.isWidget()?n.widget instanceof Ut?null:n.coordsInWidget(r,e,!0):n.coordsIn(r,e,i)}lineAt(t,e){let{tile:i}=this.tile.resolveBlock(t,e);return i.isLine()?i:null}coordsForChar(t){let{tile:e,offset:i}=this.tile.resolveBlock(t,1);if(!e.isLine())return null;function n(r,o){if(r.isComposite())for(let l of r.children){if(l.length>=o){let a=n(l,o);if(a)return a}if(o-=l.length,o<0)break}else if(r.isText()&&oMath.max(this.view.scrollDOM.clientWidth,this.minWidth)+1,l=-1,a=this.view.textDirection==B.LTR,h=0,c=(f,d,u)=>{for(let p=0;pn);p++){let g=f.children[p],m=d+g.length,b=g.dom.getBoundingClientRect(),{height:w}=b;if(u&&!p&&(h+=b.top-u.top),g instanceof rt)m>i&&c(g,d,b);else if(d>=i&&(h>0&&e.push(-h),e.push(w+h),h=0,o)){let S=g.dom.lastChild,A=S?Yt(S):[];if(A.length){let k=A[A.length-1],x=a?k.right-b.left:b.right-k.left;x>l&&(l=x,this.minWidth=r,this.minWidthFrom=d,this.minWidthTo=m)}}u&&p==f.children.length-1&&(h+=u.bottom-b.bottom),d=m+g.breakAfter}};return c(this.tile,0,null),e}textDirectionAt(t){let{tile:e}=this.tile.resolveBlock(t,1);return getComputedStyle(e.dom).direction=="rtl"?B.RTL:B.LTR}measureTextSize(){let t=this.tile.blockTiles(o=>{if(o.isLine()&&o.children.length&&o.length<=20){let l=0,a;for(let h of o.children){if(!h.isText()||/[^ -~]/.test(h.text))return;let c=Yt(h.dom);if(c.length!=1)return;l+=c[0].width,a=c[0].height}if(l)return{lineHeight:o.dom.getBoundingClientRect().height,charWidth:l/o.length,textHeight:a}}});if(t)return t;let e=document.createElement("div"),i,n,r;return e.className="cm-line",e.style.width="99999px",e.style.position="absolute",e.textContent="abc def ghi jkl mno pqr stu",this.view.observer.ignore(()=>{this.tile.dom.appendChild(e);let o=Yt(e.firstChild)[0];i=e.getBoundingClientRect().height,n=o&&o.width?o.width/27:7,r=o&&o.height?o.height:i,e.remove()}),{lineHeight:i,charWidth:n,textHeight:r}}computeBlockGapDeco(){let t=[],e=this.view.viewState;for(let i=0,n=0;;n++){let r=n==e.viewports.length?null:e.viewports[n],o=r?r.from-1:this.view.state.doc.length;if(o>i){let l=(e.lineBlockAt(o).bottom-e.lineBlockAt(i).top)/this.view.scaleY;t.push(T.replace({widget:new Ut(l),block:!0,inclusive:!0,isBlockGap:!0}).range(i,o))}if(!r)break;i=r.to+1}return T.set(t)}updateDeco(){let t=1,e=this.view.state.facet(Ze).map(r=>(this.dynamicDecorationMap[t++]=typeof r=="function")?r(this.view):r),i=!1,n=this.view.state.facet(gs).map((r,o)=>{let l=typeof r=="function";return l&&(i=!0),l?r(this.view):r});for(n.length&&(this.dynamicDecorationMap[t++]=i,e.push(E.join(n))),this.decorations=[this.editContextFormatting,...e,this.computeBlockGapDeco(),this.view.viewState.lineGapDeco];ttypeof r=="function"?r(this.view):r)}scrollIntoView(t){if(t.isSnapshot){let h=this.view.viewState.lineBlockAt(t.range.head);this.view.scrollDOM.scrollTop=h.top-t.yMargin,this.view.scrollDOM.scrollLeft=t.xMargin;return}for(let h of this.view.state.facet(Wn))try{if(h(this.view,t.range,t))return!0}catch(c){J(this.view.state,c,"scroll handler")}let{range:e}=t,i=this.coordsAt(e.head,e.assoc||(e.head>e.anchor?-1:1)),n;if(!i)return;!e.empty&&(n=this.coordsAt(e.anchor,e.anchor>e.head?-1:1))&&(i={left:Math.min(i.left,n.left),top:Math.min(i.top,n.top),right:Math.max(i.right,n.right),bottom:Math.max(i.bottom,n.bottom)});let r=ms(this.view),o={left:i.left-r.left,top:i.top-r.top,right:i.right+r.right,bottom:i.bottom+r.bottom},{offsetWidth:l,offsetHeight:a}=this.view.scrollDOM;if(Mr(this.view.scrollDOM,o,e.head1&&(i.top>window.pageYOffset+window.visualViewport.offsetTop+window.visualViewport.height||i.bottomi.isWidget()||i.children.some(e);return e(this.tile.resolveBlock(t,1).tile)}destroy(){Li(this.tile)}};function Li(s,t){let e=t?.get(s);if(e!=1){e==null&&s.destroy();for(let i of s.children)Li(i,t)}}function Kr(s){return s.node.nodeType==1&&s.node.firstChild&&(s.offset==0||s.node.childNodes[s.offset-1].contentEditable=="false")&&(s.offset==s.node.childNodes.length||s.node.childNodes[s.offset].contentEditable=="false")}function _n(s,t){let e=s.observer.selectionRange;if(!e.focusNode)return null;let i=xn(e.focusNode,e.focusOffset),n=vn(e.focusNode,e.focusOffset),r=i||n;if(n&&i&&n.node!=i.node){let l=R.get(n.node);if(!l||l.isText()&&l.text!=n.node.nodeValue)r=n;else if(s.docView.lastCompositionAfterCursor){let a=R.get(i.node);!a||a.isText()&&a.text!=i.node.nodeValue||(r=n)}}if(s.docView.lastCompositionAfterCursor=r!=i,!r)return null;let o=t-r.offset;return{from:o,to:o+r.node.nodeValue.length,node:r.node}}function qr(s,t,e){let i=_n(s,e);if(!i)return null;let{node:n,from:r,to:o}=i,l=n.nodeValue;if(/[\n\r]/.test(l)||s.state.doc.sliceString(i.from,i.to)!=l)return null;let a=t.invertedDesc;return{range:new Y(a.mapPos(r),a.mapPos(o),r,o),text:n}}function _r(s,t){return s.nodeType!=1?0:(t&&s.childNodes[t-1].contentEditable=="false"?1:0)|(t{it.from&&(e=!0)}),e}var Ut=class extends ot{constructor(t){super(),this.height=t}toDOM(){let t=document.createElement("div");return t.className="cm-gap",this.updateDOM(t),t}eq(t){return t.height==this.height}updateDOM(t){return t.style.height=this.height+"px",!0}get editable(){return!0}get estimatedHeight(){return this.height}ignoreEvent(){return!1}};function Ur(s,t,e=1){let i=s.charCategorizer(t),n=s.doc.lineAt(t),r=t-n.from;if(n.length==0)return v.cursor(t);r==0?e=1:r==n.length&&(e=-1);let o=r,l=r;e<0?o=ct(n.text,r,!1):l=ct(n.text,r);let a=i(n.text.slice(o,l));for(;o>0;){let h=ct(n.text,o,!1);if(i(n.text.slice(h,o))!=a)break;o=h}for(;ls.defaultLineHeight*1.5){let l=s.viewState.heightOracle.textHeight,a=Math.floor((n-e.top-(s.defaultLineHeight-l)*.5)/l);r+=a*s.viewState.heightOracle.lineLength}let o=s.state.sliceDoc(e.from,e.to);return e.from+me(o,r,s.state.tabSize)}function Bi(s,t,e){let i=s.lineBlockAt(t);if(Array.isArray(i.type)){let n;for(let r of i.type){if(r.from>t)break;if(!(r.tot)return r;(!n||r.type==N.Text&&(n.type!=r.type||(e<0?r.fromt)))&&(n=r)}}return n||i}return i}function Jr(s,t,e,i){let n=Bi(s,t.head,t.assoc||-1),r=!i||n.type!=N.Text||!(s.lineWrapping||n.widgetLineBreaks)?null:s.coordsAtPos(t.assoc<0&&t.head>n.from?t.head-1:t.head);if(r){let o=s.dom.getBoundingClientRect(),l=s.textDirectionAt(n.from),a=s.posAtCoords({x:e==(l==B.LTR)?o.right-1:o.left+1,y:(r.top+r.bottom)/2});if(a!=null)return v.cursor(a,e?-1:1)}return v.cursor(e?n.to:n.from,e?-1:1)}function Fs(s,t,e,i){let n=s.state.doc.lineAt(t.head),r=s.bidiSpans(n),o=s.textDirectionAt(n.from);for(let l=t,a=null;;){let h=Dn(n,r,o,l,e),c=Tn;if(!h){if(n.number==(e?s.state.doc.lines:1))return l;c=`
+`,n=s.state.doc.line(n.number+(e?1:-1)),r=s.bidiSpans(n),h=s.visualLineSide(n,!e)}if(a){if(!a(c))return l}else{if(!i)return h;a=i(c)}l=h}}function Zr(s,t,e){let i=s.state.charCategorizer(t),n=i(e);return r=>{let o=i(r);return n==Cs.Space&&(n=o),n==o}}function to(s,t,e,i){let n=t.head,r=e?1:-1;if(n==(e?s.state.doc.length:0))return v.cursor(n,t.assoc);let o=t.goalColumn,l,a=s.contentDOM.getBoundingClientRect(),h=s.coordsAtPos(n,t.assoc||((t.empty?e:t.head==t.from)?1:-1)),c=s.documentTop;if(h)o==null&&(o=h.left-a.left),l=r<0?h.top:h.bottom;else{let p=s.viewState.lineBlockAt(n);o==null&&(o=Math.min(a.right-a.left,s.defaultCharacterWidth*(n-p.from))),l=(r<0?p.top:p.bottom)+c}let f=a.left+o,d=s.viewState.heightOracle.textHeight>>1,u=i??d;for(let p=0;;p+=d){let g=l+(u+p)*r,m=Ei(s,{x:f,y:g},!1,r);if(e?g>a.bottom:gl:w{if(t>r&&tn(s)),e.from,t.head>e.from?-1:1);return i==e.from?e:v.cursor(i,is.viewState.docHeight)return new _(s.state.doc.length,-1);if(h=s.elementAtHeight(a),i==null)break;if(h.type==N.Text){if(i<0?h.tos.viewport.to)break;let d=s.docView.coordsAt(i<0?h.from:h.to,i>0?-1:1);if(d&&(i<0?d.top<=a+r:d.bottom>=a+r))break}let f=s.viewState.heightOracle.textHeight/2;a=i>0?h.bottom+f:h.top-f}if(s.viewport.from>=h.to||s.viewport.to<=h.from){if(e)return null;if(h.type==N.Text){let f=Qr(s,n,h,o,l);return new _(f,f==h.from?1:-1)}}if(h.type!=N.Text)return a<(h.top+h.bottom)/2?new _(h.from,1):new _(h.to,-1);let c=s.docView.lineAt(h.from,2);return(!c||c.length!=h.length)&&(c=s.docView.lineAt(h.from,-2)),new Hi(s,o,l,s.textDirectionAt(h.from)).scanTile(c,h.from)}var Hi=class{constructor(t,e,i,n){this.view=t,this.x=e,this.y=i,this.baseDir=n,this.line=null,this.spans=null}bidiSpansAt(t){return(!this.line||this.line.from>t||this.line.to1||i.length&&(i[0].level!=this.baseDir||i[0].to+n.from>1;e:if(o.has(g)){let b=n+Math.floor(Math.random()*p);for(let w=0;w1)){if(w.bottomthis.y)(!h||h.top>w.top)&&(h=w),S=-1;else{let A=w.left>this.x?this.x-w.left:w.right(p+p+g)/3)return this.y=a.bottom-1,this.scan(t,e,!0);if(h&&h.top<(p+g+g)/3)return this.y=h.top+1,this.scan(t,e,!0)}let u=(l?this.dirAt(t[c],1):this.baseDir)==B.LTR;return{i:c,after:this.x>(d.left+d.right)/2==u}}scanText(t,e){let i=[];for(let r=0;r{let o=i[r]-e,l=i[r+1]-e;return re(t.dom,o,l).getClientRects()});return n.after?new _(i[n.i+1],-1):new _(i[n.i],1)}scanTile(t,e){if(!t.length)return new _(e,1);if(t.children.length==1){let l=t.children[0];if(l.isText())return this.scanText(l,e);if(l.isComposite())return this.scanTile(l,e)}let i=[e];for(let l=0,a=e;l{let a=t.children[l];return a.flags&48?null:(a.dom.nodeType==1?a.dom:re(a.dom,0,a.length)).getClientRects()}),r=t.children[n.i],o=i[n.i];return r.isText()?this.scanText(r,o):r.isComposite()?this.scanTile(r,o):n.after?new _(i[n.i+1],-1):new _(o,1)}},Lt="\uFFFF",Pi=class{constructor(t,e){this.points=t,this.view=e,this.text="",this.lineSeparator=e.state.facet(Dt.lineSeparator)}append(t){this.text+=t}lineBreak(){this.text+=Lt}readRange(t,e){if(!t)return this;let i=t.parentNode;for(let n=t;;){this.findPointBefore(i,n);let r=this.text.length;this.readNode(n);let o=R.get(n),l=n.nextSibling;if(l==e){o?.breakAfter&&!l&&i!=this.view.contentDOM&&this.lineBreak();break}let a=R.get(l);(o&&a?o.breakAfter:(o?o.breakAfter:Pe(n))||Pe(l)&&(n.nodeName!="BR"||o?.isWidget())&&this.text.length>r)&&!io(l,e)&&this.lineBreak(),n=l}return this.findPointBefore(i,e),this}readTextNode(t){let e=t.nodeValue;for(let i of this.points)i.node==t&&(i.pos=this.text.length+Math.min(i.offset,e.length));for(let i=0,n=this.lineSeparator?null:/\r\n?|\n/g;;){let r=-1,o=1,l;if(this.lineSeparator?(r=e.indexOf(this.lineSeparator,i),o=this.lineSeparator.length):(l=n.exec(e))&&(r=l.index,o=l[0].length),this.append(e.slice(i,r<0?e.length:r)),r<0)break;if(this.lineBreak(),o>1)for(let a of this.points)a.node==t&&a.pos>this.text.length&&(a.pos-=o-1);i=r+o}}readNode(t){let e=R.get(t),i=e&&e.overrideDOMText;if(i!=null){this.findPointInside(t,i.length);for(let n=i.iter();!n.next().done;)n.lineBreak?this.lineBreak():this.append(n.value)}else t.nodeType==3?this.readTextNode(t):t.nodeName=="BR"?t.nextSibling&&this.lineBreak():t.nodeType==1&&this.readRange(t.firstChild,null)}findPointBefore(t,e){for(let i of this.points)i.node==t&&t.childNodes[i.offset]==e&&(i.pos=this.text.length)}findPointInside(t,e){for(let i of this.points)(t.nodeType==3?i.node==t:t.contains(i.node))&&(i.pos=this.text.length+(eo(t,i.node,i.offset)?e:0))}};function eo(s,t,e){for(;;){if(!t||e-1;let{impreciseHead:r,impreciseAnchor:o}=t.docView,l=t.state.selection;if(t.state.readOnly&&e>-1)this.newSel=null;else if(e>-1&&(this.bounds=Yn(t.docView.tile,e,i,0))){let a=r||o?[]:no(t),h=new Pi(a,t);h.readRange(this.bounds.startDOM,this.bounds.endDOM),this.text=h.text,this.newSel=ro(a,this.bounds.from)}else{let a=t.observer.selectionRange,h=r&&r.node==a.focusNode&&r.offset==a.focusOffset||!yi(t.contentDOM,a.focusNode)?l.main.head:t.docView.posFromDOM(a.focusNode,a.focusOffset),c=o&&o.node==a.anchorNode&&o.offset==a.anchorOffset||!yi(t.contentDOM,a.anchorNode)?l.main.anchor:t.docView.posFromDOM(a.anchorNode,a.anchorOffset),f=t.viewport;if((y.ios||y.chrome)&&h!=c&&Math.min(h,c)<=l.main.from&&Math.max(h,c)>=l.main.to&&(f.from>0||f.to-1&&l.ranges.length>1)this.newSel=l.replaceRange(v.range(c,h));else if(t.lineWrapping&&c==h&&!(l.main.empty&&l.main.head==h)&&t.inputState.lastTouchTime>Date.now()-100){let d=t.coordsAtPos(h,-1),u=0;d&&(u=t.inputState.lastTouchY<=d.bottom?-1:1),this.newSel=v.create([v.cursor(h,u)])}else this.newSel=v.single(c,h)}}};function Yn(s,t,e,i){if(s.isComposite()){let n=-1,r=-1,o=-1,l=-1;for(let a=0,h=i,c=i;ae)return Yn(f,t,e,h);if(d>=t&&n==-1&&(n=a,r=h),h>e&&f.dom.parentNode==s.dom){o=a,l=c;break}c=d,h=d+f.breakAfter}return{from:r,to:l<0?i+s.length:l,startDOM:(n?s.children[n-1].dom.nextSibling:null)||s.dom.firstChild,endDOM:o=0?s.children[o].dom:null}}else return s.isText()?{from:i,to:i+s.length,startDOM:s.dom,endDOM:s.dom.nextSibling}:null}function Xn(s,t){let e,{newSel:i}=t,{state:n}=s,r=n.selection.main,o=s.inputState.lastKeyTime>Date.now()-100?s.inputState.lastKeyCode:-1;if(t.bounds){let{from:l,to:a}=t.bounds,h=r.from,c=null;(o===8||y.android&&t.text.length=l&&r.to<=a&&(t.typeOver||f!=t.text)&&f.slice(0,r.from-l)==t.text.slice(0,r.from-l)&&f.slice(r.to-l)==t.text.slice(d=t.text.length-(f.length-(r.to-l)))?e={from:r.from,to:r.to,insert:K.of(t.text.slice(r.from-l,d).split(Lt))}:(u=$n(f,t.text,h-l,c))&&(y.chrome&&o==13&&u.toB==u.from+2&&t.text.slice(u.from,u.toB)==Lt+Lt&&u.toB--,e={from:l+u.from,to:l+u.toA,insert:K.of(t.text.slice(u.from,u.toB).split(Lt))})}else i&&(!s.hasFocus&&n.facet(nt)||Ie(i,r))&&(i=null);if(!e&&!i)return!1;if((y.mac||y.android)&&e&&e.from==e.to&&e.from==r.head-1&&/^\. ?$/.test(e.insert.toString())&&s.contentDOM.getAttribute("autocorrect")=="off"?(i&&e.insert.length==2&&(i=v.single(i.main.anchor-1,i.main.head-1)),e={from:e.from,to:e.to,insert:K.of([e.insert.toString().replace("."," ")])}):n.doc.lineAt(r.from).toDate.now()-50?e={from:r.from,to:r.to,insert:n.toText(s.inputState.insertingText)}:y.chrome&&e&&e.from==e.to&&e.from==r.head&&e.insert.toString()==`
+ `&&s.lineWrapping&&(i&&(i=v.single(i.main.anchor-1,i.main.head-1)),e={from:r.from,to:r.to,insert:K.of([" "])}),e)return bs(s,e,i,o);if(i&&!Ie(i,r)){let l=!1,a="select";return s.inputState.lastSelectionTime>Date.now()-50&&(s.inputState.lastSelectionOrigin=="select"&&(l=!0),a=s.inputState.lastSelectionOrigin,a=="select.pointer"&&(i=jn(n.facet(ae).map(h=>h(s)),i))),s.dispatch({selection:i,scrollIntoView:l,userEvent:a}),!0}else return!1}function bs(s,t,e,i=-1){if(y.ios&&s.inputState.flushIOSKey(t))return!0;let n=s.state.selection.main;if(y.android&&(t.to==n.to&&(t.from==n.from||t.from==n.from-1&&s.state.sliceDoc(t.from,n.from)==" ")&&t.insert.length==1&&t.insert.lines==2&&Nt(s.contentDOM,"Enter",13)||(t.from==n.from-1&&t.to==n.to&&t.insert.length==0||i==8&&t.insert.lengthn.head)&&Nt(s.contentDOM,"Backspace",8)||t.from==n.from&&t.to==n.to+1&&t.insert.length==0&&Nt(s.contentDOM,"Delete",46)))return!0;let r=t.insert.toString();s.inputState.composing>=0&&s.inputState.composing++;let o,l=()=>o||(o=so(s,t,e));return s.state.facet(En).some(a=>a(s,t.from,t.to,r,l))||s.dispatch(l()),!0}function so(s,t,e){let i,n=s.state,r=n.selection.main,o=-1;if(t.from==t.to&&t.from