diff --git a/.cargo/config.toml b/.cargo/config.toml new file mode 100644 index 0000000..af44f9c --- /dev/null +++ b/.cargo/config.toml @@ -0,0 +1,2 @@ +[alias] +gen-docs = "run -p embers-client --bin gen-docs --" diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 4217a8d..e3c1c29 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -2,6 +2,8 @@ name: CI on: push: + branches: + - main pull_request: env: @@ -36,8 +38,20 @@ jobs: sha256: ${{ env.FLATBUFFERS_SHA256 }} - uses: dtolnay/rust-toolchain@stable - uses: Swatinem/rust-cache@v2 + - name: Install mdBook + run: cargo install mdbook --version 0.5.2 --locked - name: Run unit and integration tests run: cargo test --workspace + - name: Regenerate config API docs + run: cargo gen-docs + - name: Verify checked-in config API docs + run: | + status="$(git status --porcelain -- docs/config-api)" + if [ -n "$status" ]; then + echo "Config API docs are out of date after regeneration:" + printf '%s\n' "$status" + exit 1 + fi pty-smoke: runs-on: ubuntu-latest diff --git a/Cargo.lock b/Cargo.lock index 9000285..fdb72f2 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -192,6 +192,15 @@ dependencies = [ "serde_core", ] +[[package]] +name = "block-buffer" +version = "0.10.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3078c7629b62d3f0439517fa394996acacc5cbc91c5a20d8c658e77abd503a71" +dependencies = [ + "generic-array", +] + [[package]] name = "bstr" version = "1.12.1" @@ -335,6 +344,15 @@ dependencies = [ "tiny-keccak", ] +[[package]] +name = "cpufeatures" +version = "0.2.17" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "59ed5838eebb26a2bb2e58f6d5b5316989ae9d08bab10e0e6d103e656d1b0280" +dependencies = [ + "libc", +] + [[package]] name = "criterion" version = "0.7.0" @@ -399,18 +417,104 @@ version = "0.2.4" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "460fbee9c2c2f33933d720630a6a0bac33ba7053db5344fac858d4b8952d77d5" +[[package]] +name = "crypto-common" +version = "0.1.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "78c8292055d1c1df0cce5d180393dc8cce0abec0a7102adb6c7b1eef6016d60a" +dependencies = [ + "generic-array", + "typenum", +] + [[package]] name = "cursor-icon" version = "1.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "f27ae1dd37df86211c42e150270f82743308803d90a6f6e6651cd730d5e1732f" +[[package]] +name = "darling" +version = "0.20.11" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "fc7f46116c46ff9ab3eb1597a45688b6715c6e628b5c133e288e709a29bcb4ee" +dependencies = [ + "darling_core", + "darling_macro", +] + +[[package]] +name = "darling_core" +version = "0.20.11" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0d00b9596d185e565c2207a0b01f8bd1a135483d02d9b7b0a54b11da8d53412e" +dependencies = [ + "fnv", + "ident_case", + "proc-macro2", + "quote", + "strsim", + "syn", +] + +[[package]] +name = "darling_macro" +version = "0.20.11" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "fc34b93ccb385b40dc71c6fceac4b2ad23662c7eeb248cf10d529b7e055b6ead" +dependencies = [ + "darling_core", + "quote", + "syn", +] + +[[package]] +name = "derive_builder" +version = "0.20.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "507dfb09ea8b7fa618fcf76e953f4f5e192547945816d5358edffe39f6f94947" +dependencies = [ + "derive_builder_macro", +] + +[[package]] +name = "derive_builder_core" +version = "0.20.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2d5bcf7b024d6835cfb3d473887cd966994907effbe9227e8c8219824d06c4e8" +dependencies = [ + "darling", + "proc-macro2", + "quote", + "syn", +] + +[[package]] +name = "derive_builder_macro" +version = "0.20.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ab63b0e2bf4d5928aff72e83a7dace85d7bba5fe12dcc3c5a572d78caffd3f3c" +dependencies = [ + "derive_builder_core", + "syn", +] + [[package]] name = "difflib" version = "0.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "6184e33543162437515c2e2b48714794e37845ec9851711914eec9d308f6ebe8" +[[package]] +name = "digest" +version = "0.10.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9ed9a281f7bc9b7576e61468ba615a66a5c8cfdff42420a70aa82701a3b1e292" +dependencies = [ + "block-buffer", + "crypto-common", +] + [[package]] name = "directories" version = "6.0.0" @@ -475,6 +579,7 @@ dependencies = [ "embers-protocol", "embers-test-support", "rhai", + "rhai-autodocs", "tempfile", "thiserror 2.0.18", "tokio", @@ -487,6 +592,7 @@ dependencies = [ name = "embers-core" version = "0.1.0" dependencies = [ + "serde", "thiserror 2.0.18", "tracing", "tracing-subscriber", @@ -511,6 +617,8 @@ dependencies = [ "embers-protocol", "portable-pty", "proptest", + "serde", + "serde_json", "tempfile", "tokio", "tracing", @@ -599,6 +707,16 @@ version = "0.3.32" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "cecba35d7ad927e23624b22ad55235f2239cfa44fd10428eecbeba6d6a717718" +[[package]] +name = "generic-array" +version = "0.14.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "85649ca51fd72272d7821adaf274ad91c288277713d9c18820d8499a7ff69e9a" +dependencies = [ + "typenum", + "version_check", +] + [[package]] name = "getrandom" version = "0.2.17" @@ -646,6 +764,22 @@ dependencies = [ "zerocopy", ] +[[package]] +name = "handlebars" +version = "6.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9b3f9296c208515b87bd915a2f5d1163d4b3f863ba83337d7713cf478055948e" +dependencies = [ + "derive_builder", + "log", + "num-order", + "pest", + "pest_derive", + "serde", + "serde_json", + "thiserror 2.0.18", +] + [[package]] name = "hashbrown" version = "0.15.5" @@ -688,6 +822,12 @@ version = "2.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "3d3067d79b975e8844ca9eb072e16b31c3c1c36928edf9c6789548c524d0d954" +[[package]] +name = "ident_case" +version = "1.0.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b9e0384b61958566e926dc50660321d12159025e767c18e043daf26b70104c39" + [[package]] name = "indexmap" version = "2.13.0" @@ -841,6 +981,21 @@ dependencies = [ "windows-sys 0.61.2", ] +[[package]] +name = "num-modular" +version = "0.6.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "17bb261bf36fa7d83f4c294f834e91256769097b3cb505d44831e0a179ac647f" + +[[package]] +name = "num-order" +version = "1.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "537b596b97c40fcf8056d153049eb22f481c17ebce72a513ec9286e4986d1bb6" +dependencies = [ + "num-modular", +] + [[package]] name = "num-traits" version = "0.2.19" @@ -900,6 +1055,49 @@ dependencies = [ "windows-link", ] +[[package]] +name = "pest" +version = "2.8.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e0848c601009d37dfa3430c4666e147e49cdcf1b92ecd3e63657d8a5f19da662" +dependencies = [ + "memchr", + "ucd-trie", +] + +[[package]] +name = "pest_derive" +version = "2.8.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "11f486f1ea21e6c10ed15d5a7c77165d0ee443402f0780849d1768e7d9d6fe77" +dependencies = [ + "pest", + "pest_generator", +] + +[[package]] +name = "pest_generator" +version = "2.8.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8040c4647b13b210a963c1ed407c1ff4fdfa01c31d6d2a098218702e6664f94f" +dependencies = [ + "pest", + "pest_meta", + "proc-macro2", + "quote", + "syn", +] + +[[package]] +name = "pest_meta" +version = "2.8.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "89815c69d36021a140146f26659a81d6c2afa33d216d736dd4be5381a7362220" +dependencies = [ + "pest", + "sha2", +] + [[package]] name = "pin-project-lite" version = "0.2.17" @@ -1208,12 +1406,26 @@ dependencies = [ "num-traits", "once_cell", "rhai_codegen", + "serde", + "serde_json", "smallvec", "smartstring", "thin-vec", "web-time", ] +[[package]] +name = "rhai-autodocs" +version = "0.11.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4e455384e45e5f96662c778bc03b8a644183d1266407c4a75ec5e5fbe686a944" +dependencies = [ + "handlebars", + "rhai", + "serde", + "serde_json", +] + [[package]] name = "rhai_codegen" version = "3.1.0" @@ -1351,6 +1563,17 @@ dependencies = [ "winapi", ] +[[package]] +name = "sha2" +version = "0.10.9" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a7507d819769d01a365ab707794a4084392c824f54a7a6a7862f8c3d0892b283" +dependencies = [ + "cfg-if", + "cpufeatures", + "digest", +] + [[package]] name = "sharded-slab" version = "0.1.7" @@ -1401,6 +1624,9 @@ name = "smallvec" version = "1.15.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "67b1b7a3b5fe4f1376887184045fcf45c69e92af734b7aaddc05fb777b6fbd03" +dependencies = [ + "serde", +] [[package]] name = "smartstring" @@ -1409,6 +1635,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "3fb72c633efbaa2dd666986505016c32c3044395ceaf881518399d2f4127ee29" dependencies = [ "autocfg", + "serde", "static_assertions", "version_check", ] @@ -1470,6 +1697,9 @@ name = "thin-vec" version = "0.2.14" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "144f754d318415ac792f9d69fc87abbbfc043ce2ef041c60f16ad828f638717d" +dependencies = [ + "serde", +] [[package]] name = "thiserror" @@ -1627,6 +1857,18 @@ dependencies = [ "tracing-log", ] +[[package]] +name = "typenum" +version = "1.19.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "562d481066bde0658276a35467c4af00bdc6ee726305698a55b86e61d7ad82bb" + +[[package]] +name = "ucd-trie" +version = "0.1.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2896d95c02a80c6d6a5d6e953d479f5ddf2dfdb6a244441010e373ac0fb88971" + [[package]] name = "unarray" version = "0.1.4" diff --git a/Cargo.toml b/Cargo.toml index e3c1662..79f1637 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -28,6 +28,9 @@ portable-pty = "0.9" predicates = "3" proptest = "1" rhai = "1" +rhai-autodocs = "0.11" +serde = { version = "1", features = ["derive"] } +serde_json = "1" tempfile = "3" thiserror = "2" tokio = { version = "1", features = ["fs", "io-util", "macros", "net", "process", "rt-multi-thread", "signal", "sync", "time"] } diff --git a/crates/embers-cli/Cargo.toml b/crates/embers-cli/Cargo.toml index d165813..6ea3cbc 100644 --- a/crates/embers-cli/Cargo.toml +++ b/crates/embers-cli/Cargo.toml @@ -1,6 +1,7 @@ [package] name = "embers-cli" autobins = false +autotests = false edition.workspace = true license.workspace = true rust-version.workspace = true @@ -32,3 +33,7 @@ assert_cmd.workspace = true embers-test-support = { path = "../embers-test-support" } predicates.workspace = true tempfile.workspace = true + +[[test]] +name = "integration" +path = "tests/integration.rs" diff --git a/crates/embers-cli/tests/integration.rs b/crates/embers-cli/tests/integration.rs new file mode 100644 index 0000000..0200199 --- /dev/null +++ b/crates/embers-cli/tests/integration.rs @@ -0,0 +1,7 @@ +mod interactive; +mod panes; +mod ping; +mod popups; +mod sessions; +mod support; +mod windows; diff --git a/crates/embers-cli/tests/interactive.rs b/crates/embers-cli/tests/interactive.rs index 3e8249b..44be61c 100644 --- a/crates/embers-cli/tests/interactive.rs +++ b/crates/embers-cli/tests/interactive.rs @@ -1,5 +1,3 @@ -mod support; - use std::fs; use std::path::Path; use std::time::Duration; @@ -8,14 +6,15 @@ use embers_core::PtySize; use embers_test_support::{PtyHarness, TestServer, cargo_bin, cargo_bin_path}; use tempfile::tempdir; -use support::run_cli; +use crate::support::run_cli; const STARTUP_TIMEOUT: Duration = Duration::from_secs(15); -const IO_TIMEOUT: Duration = Duration::from_secs(15); +const IO_TIMEOUT: Duration = Duration::from_secs(30); const FILE_WAIT_POLL: Duration = Duration::from_millis(50); const FILE_WAIT_ATTEMPTS: usize = 200; const SCROLLBACK_SETTLE_DELAY: Duration = Duration::from_millis(750); const QUIET_TIMEOUT: Duration = Duration::from_millis(500); +const PAGE_UP_ATTEMPTS: usize = 4; fn spawn_embers(args: &[&str]) -> PtyHarness { let binary = cargo_bin_path("embers"); @@ -85,13 +84,15 @@ async fn wait_for_pid(pid_path: &Path) -> String { } async fn populate_scrollback_or_wait(harness: &mut PtyHarness, lines: usize) { - let long_output = format!( - "printf '{}\\n'; echo DONE\r", - (1..=lines) - .map(|index| format!("line-{index}")) - .collect::>() - .join("\\n") - ); + harness + .write_all("echo READY\r") + .expect("write ready command"); + harness + .read_until_contains("READY", IO_TIMEOUT) + .unwrap_or_else(|error| panic!("pane ready handshake: {error}")); + + let long_output = + format!("i=1; while [ $i -le {lines} ]; do echo line-$i; i=$((i+1)); done; echo DONE\r"); harness .write_all(&long_output) .expect("write scrolling command"); @@ -104,6 +105,22 @@ async fn populate_scrollback_or_wait(harness: &mut PtyHarness, lines: usize) { tokio::time::sleep(SCROLLBACK_SETTLE_DELAY).await; } +fn page_up_until_visible(harness: &mut PtyHarness, needle: &str) { + let mut last_err = None; + for _ in 0..PAGE_UP_ATTEMPTS { + harness.write_all("\x1b[5~").expect("page up"); + match harness.read_until_contains(needle, IO_TIMEOUT) { + Ok(_) => return, + Err(error) => last_err = Some(error), + } + } + + let last_err = last_err + .map(|error| error.to_string()) + .unwrap_or_else(|| "no read error captured".to_owned()); + panic!("page up did not reveal `{needle}` within {PAGE_UP_ATTEMPTS} attempts: {last_err}"); +} + fn run_pane_command(harness: &mut PtyHarness, command: &str, expected: &str) -> String { harness .write_all(&format!("{command}\r")) @@ -218,11 +235,7 @@ async fn page_up_enters_local_scrollback_and_shows_indicator() { .expect("client starts and renders"); populate_scrollback_or_wait(&mut harness, 40).await; - harness.write_all("\x1b[5~").expect("page up"); - let output = harness - .read_until_contains("line-1", IO_TIMEOUT) - .expect("page up reveals earlier scrollback"); - assert!(output.contains("line-1")); + page_up_until_visible(&mut harness, "line-1"); harness.write_all("\x11").expect("quit client"); harness.wait().expect("client exits"); @@ -241,10 +254,7 @@ async fn local_selection_yank_emits_osc52_clipboard_sequence() { .expect("client starts and renders"); populate_scrollback_or_wait(&mut harness, 40).await; - harness.write_all("\x1b[5~").expect("page up"); - harness - .read_until_contains("line-1", IO_TIMEOUT) - .expect("page up reveals earlier scrollback"); + page_up_until_visible(&mut harness, "line-1"); harness.write_all("vly").expect("select and yank"); let output = harness .read_until_contains("]52;c;", IO_TIMEOUT) diff --git a/crates/embers-cli/tests/panes.rs b/crates/embers-cli/tests/panes.rs index 41b8c29..6c7456b 100644 --- a/crates/embers-cli/tests/panes.rs +++ b/crates/embers-cli/tests/panes.rs @@ -1,11 +1,9 @@ -mod support; - use std::time::Duration; use embers_test_support::{TestConnection, TestServer}; use tokio::time::sleep; -use support::{run_cli, session_snapshot_by_name, stdout}; +use crate::support::{run_cli, session_snapshot_by_name, stdout}; #[tokio::test(flavor = "multi_thread", worker_threads = 2)] async fn pane_commands_round_trip_through_cli() { diff --git a/crates/embers-cli/tests/popups.rs b/crates/embers-cli/tests/popups.rs index fc960bb..d80c0b9 100644 --- a/crates/embers-cli/tests/popups.rs +++ b/crates/embers-cli/tests/popups.rs @@ -1,8 +1,6 @@ -mod support; - use embers_test_support::{TestConnection, TestServer}; -use support::{run_cli, session_snapshot_by_name, stdout}; +use crate::support::{run_cli, session_snapshot_by_name, stdout}; #[tokio::test(flavor = "multi_thread", worker_threads = 2)] async fn popup_commands_round_trip_through_cli() { diff --git a/crates/embers-cli/tests/sessions.rs b/crates/embers-cli/tests/sessions.rs index 8568cfb..e2a1013 100644 --- a/crates/embers-cli/tests/sessions.rs +++ b/crates/embers-cli/tests/sessions.rs @@ -1,5 +1,3 @@ -mod support; - use std::fs; use std::path::Path; use std::time::Duration; @@ -10,7 +8,7 @@ use predicates::prelude::*; use embers_test_support::TestServer; use tempfile::tempdir; -use support::{cli_command, run_cli, stdout}; +use crate::support::{cli_command, run_cli, stdout}; async fn shutdown_spawned_server(socket_path: &Path) { let pid_path = socket_path.with_extension("pid"); diff --git a/crates/embers-cli/tests/windows.rs b/crates/embers-cli/tests/windows.rs index 755fbd1..170c60f 100644 --- a/crates/embers-cli/tests/windows.rs +++ b/crates/embers-cli/tests/windows.rs @@ -1,8 +1,6 @@ -mod support; - use embers_test_support::{TestConnection, TestServer}; -use support::{run_cli, session_snapshot_by_name, stdout}; +use crate::support::{run_cli, session_snapshot_by_name, stdout}; #[tokio::test(flavor = "multi_thread", worker_threads = 2)] async fn window_commands_round_trip_through_cli() { diff --git a/crates/embers-client/Cargo.toml b/crates/embers-client/Cargo.toml index 73bc4a8..cf9032f 100644 --- a/crates/embers-client/Cargo.toml +++ b/crates/embers-client/Cargo.toml @@ -1,5 +1,6 @@ [package] name = "embers-client" +autotests = false edition.workspace = true license.workspace = true rust-version.workspace = true @@ -11,7 +12,9 @@ base64.workspace = true directories.workspace = true embers-core = { path = "../embers-core" } embers-protocol = { path = "../embers-protocol" } -rhai.workspace = true +# `definitions_with_scope` used by scripting/documentation.rs is gated behind `internals`. +rhai = { workspace = true, features = ["internals", "metadata"] } +rhai-autodocs.workspace = true thiserror.workspace = true tokio.workspace = true tracing.workspace = true @@ -26,3 +29,7 @@ tempfile.workspace = true [[bench]] name = "search_yank" harness = false + +[[test]] +name = "integration" +path = "tests/integration.rs" diff --git a/crates/embers-client/src/bin/gen-docs.rs b/crates/embers-client/src/bin/gen-docs.rs new file mode 100644 index 0000000..ce5d6d5 --- /dev/null +++ b/crates/embers-client/src/bin/gen-docs.rs @@ -0,0 +1,20 @@ +use std::path::PathBuf; + +fn main() -> Result<(), Box> { + let output_dir = std::env::args_os() + .nth(1) + .map(PathBuf::from) + .unwrap_or_else(|| { + PathBuf::from(env!("CARGO_MANIFEST_DIR")) + .join("../../docs/config-api") + .canonicalize() + .unwrap_or_else(|_| { + PathBuf::from(env!("CARGO_MANIFEST_DIR")).join("../../docs/config-api") + }) + }); + + embers_client::scripting::generate_config_api_docs(&output_dir)?; + embers_client::scripting::build_mdbook(&output_dir)?; + println!("wrote config API docs to {}", output_dir.display()); + Ok(()) +} diff --git a/crates/embers-client/src/configured_client.rs b/crates/embers-client/src/configured_client.rs index fcf9861..31fa448 100644 --- a/crates/embers-client/src/configured_client.rs +++ b/crates/embers-client/src/configured_client.rs @@ -540,9 +540,6 @@ where }; self.focus_node(session_id, node_id).await } - Action::ResizeDirection { .. } => Err(MuxError::invalid_input( - "resize actions are not implemented yet", - )), Action::ScrollLineUp => { let leaf = self.focused_leaf(presentation)?; self.scroll_view_by(leaf.node_id, -1).await @@ -875,6 +872,7 @@ where geometry, title, focus, + close_on_empty, } => { self.client .request_message(ClientMessage::Floating(FloatingRequest::Create { @@ -885,7 +883,7 @@ where geometry: resolve_floating_geometry(geometry, viewport), title, focus, - close_on_empty: true, + close_on_empty, })) .await?; self.client.resync_all_sessions().await @@ -893,11 +891,6 @@ where Action::FocusBuffer { buffer_id } | Action::RevealBuffer { buffer_id } => { self.focus_buffer(session_id, buffer_id).await } - Action::ReplaceFloatingRoot { .. } - | Action::WrapNodeInSplit { .. } - | Action::WrapNodeInTabs { .. } => Err(MuxError::invalid_input(format!( - "action '{action:?}' is not supported by the live executor yet" - ))), other => Err(MuxError::invalid_input(format!( "action '{other:?}' is not supported by the live executor yet" ))), diff --git a/crates/embers-client/src/scripting/documentation.rs b/crates/embers-client/src/scripting/documentation.rs new file mode 100644 index 0000000..28ca215 --- /dev/null +++ b/crates/embers-client/src/scripting/documentation.rs @@ -0,0 +1,611 @@ +use std::collections::BTreeSet; +use std::error::Error; +use std::fs; +use std::path::Path; +use std::process::Command; + +use rhai::Engine; +use rhai_autodocs::{export, generate, item::Item, module::Documentation}; + +use super::context::Context; +use super::engine::{documentation_registration_scope, register_documented_registration_api}; +use super::runtime::{ + register_documented_registration_runtime_api, register_documented_runtime_api, runtime_scope, +}; +use super::types::ThemeSpec; + +struct PageSpec<'a> { + file: &'a str, + title: &'a str, + intro: &'a str, + receiver: Option<&'a str>, + names: &'a [&'a str], +} + +const REGISTRATION_PAGES: &[PageSpec<'_>] = &[ + PageSpec { + file: "registration-globals.md", + title: "Registration Globals", + intro: "Top-level functions available while the config file is being evaluated.", + receiver: None, + names: &[ + "set_leader", + "define_mode", + "bind", + "unbind", + "define_action", + "on", + ], + }, + PageSpec { + file: "registration-action.md", + title: "Action (Registration)", + intro: "Action builders available through the top-level `action` object during config evaluation and also inside runtime callbacks. Registration-time docs include the full builder surface used while declaring bindings and named actions.", + receiver: Some("ActionApi"), + names: &[], + }, + PageSpec { + file: "registration-tree.md", + title: "Tree (Registration)", + intro: "Tree builders available through the top-level `tree` object during config evaluation and also inside runtime callbacks.", + receiver: Some("TreeApi"), + names: &[], + }, + PageSpec { + file: "registration-system.md", + title: "System (Registration)", + intro: "System helpers available through the top-level `system` object during config evaluation and also inside runtime callbacks.", + receiver: Some("SystemApi"), + names: &[], + }, + PageSpec { + file: "registration-ui.md", + title: "UI (Registration)", + intro: "UI helpers available through the top-level `ui` object during config evaluation and also inside runtime callbacks.", + receiver: Some("UiApi"), + names: &[], + }, + PageSpec { + file: "mouse.md", + title: "Mouse", + intro: "Mouse registration methods available through the `mouse` config object.", + receiver: Some("MouseApi"), + names: &[], + }, + PageSpec { + file: "theme.md", + title: "Theme", + intro: "Theme registration methods available through the `theme` config object.", + receiver: Some("ThemeApi"), + names: &[], + }, + PageSpec { + file: "tabbar.md", + title: "Tabbar", + intro: "Tab bar registration methods available through the `tabbar` config object.", + receiver: Some("TabbarApi"), + names: &[], + }, +]; + +const RUNTIME_PAGES: &[PageSpec<'_>] = &[ + PageSpec { + file: "action.md", + title: "Action", + intro: "Action builders available through the runtime `action` object inside named actions and event handlers. This runtime page shows only the builders supported by the live executor.", + receiver: Some("ActionApi"), + names: &[], + }, + PageSpec { + file: "tree.md", + title: "Tree", + intro: "Tree builders available through the runtime `tree` object. The same helper surface is also available through the top-level `tree` object during config evaluation.", + receiver: Some("TreeApi"), + names: &[], + }, + PageSpec { + file: "context.md", + title: "Context", + intro: "State inspection helpers available on the action/event callback context argument.", + receiver: Some("Context"), + names: &[], + }, + PageSpec { + file: "mux.md", + title: "Mux", + intro: "State inspection helpers available through the runtime `mux` object when a live callback has mux context.", + receiver: Some("MuxApi"), + names: &[], + }, + PageSpec { + file: "event-info.md", + title: "EventInfo", + intro: "Event metadata available when a callback is triggered from an emitted event.", + receiver: Some("EventInfo"), + names: &[], + }, + PageSpec { + file: "session-ref.md", + title: "SessionRef", + intro: "Session reference helpers returned from context queries.", + receiver: Some("SessionRef"), + names: &[], + }, + PageSpec { + file: "buffer-ref.md", + title: "BufferRef", + intro: "Buffer inspection helpers returned from context queries.", + receiver: Some("BufferRef"), + names: &[], + }, + PageSpec { + file: "node-ref.md", + title: "NodeRef", + intro: "Node inspection helpers returned from context queries.", + receiver: Some("NodeRef"), + names: &[], + }, + PageSpec { + file: "floating-ref.md", + title: "FloatingRef", + intro: "Floating window inspection helpers returned from context queries.", + receiver: Some("FloatingRef"), + names: &[], + }, + PageSpec { + file: "tab-bar-context.md", + title: "TabBarContext", + intro: "Formatter helpers passed to the tab bar formatter callback.", + receiver: Some("TabBarContext"), + names: &[], + }, + PageSpec { + file: "tab-info.md", + title: "TabInfo", + intro: "Per-tab metadata used by the tab bar formatter.", + receiver: Some("TabInfo"), + names: &[], + }, + PageSpec { + file: "system-runtime.md", + title: "System", + intro: "System helpers available through the runtime `system` object. The same helper surface is also available through the top-level `system` object during config evaluation.", + receiver: Some("SystemApi"), + names: &[], + }, + PageSpec { + file: "ui.md", + title: "UI", + intro: "Tab bar rendering helpers available through the runtime `ui` object. The same helper surface is also available through the top-level `ui` object during config evaluation.", + receiver: Some("UiApi"), + names: &[], + }, + PageSpec { + file: "runtime-theme.md", + title: "Runtime Theme", + intro: "Palette lookup helpers available through the runtime `theme` object in formatter callbacks.", + receiver: Some("ThemeRuntimeApi"), + names: &[], + }, +]; + +pub fn generate_config_api_docs(output_dir: &Path) -> Result<(), Box> { + if output_dir.exists() { + fs::remove_dir_all(output_dir)?; + } + fs::create_dir_all(output_dir)?; + let defs_dir = output_dir.join("defs"); + fs::create_dir_all(&defs_dir)?; + let theme_dir = output_dir.join("theme"); + fs::create_dir_all(&theme_dir)?; + let registration_defs_path = defs_dir.join("registration.rhai"); + let runtime_defs_path = defs_dir.join("runtime.rhai"); + + let registration_engine = build_registration_docs_engine(); + let registration_scope = documentation_registration_scope(); + registration_engine + .definitions_with_scope(®istration_scope) + .include_standard_packages(false) + .write_to_file(®istration_defs_path)?; + + let runtime_engine = build_runtime_docs_engine(); + let runtime_scope = runtime_scope(Some(Context::default()), ThemeSpec::default()); + runtime_engine + .definitions_with_scope(&runtime_scope) + .include_standard_packages(false) + .write_to_file(&runtime_defs_path)?; + + let registration_docs = export::options() + .include_standard_packages(false) + .export(®istration_engine)?; + let runtime_docs = export::options() + .include_standard_packages(false) + .export(&runtime_engine)?; + + write_page_set(output_dir, ®istration_docs, REGISTRATION_PAGES)?; + write_page_set(output_dir, &runtime_docs, RUNTIME_PAGES)?; + fs::write(output_dir.join("index.md"), index_page())?; + fs::write(output_dir.join("example.md"), example_page())?; + fs::write(output_dir.join("SUMMARY.md"), summary_page())?; + fs::write(output_dir.join("book.toml"), book_toml())?; + fs::write( + theme_dir.join("rhai-autodocs-tabs.js"), + rhai_autodocs_tabs_js(), + )?; + fs::write(theme_dir.join("rhai-highlight.js"), rhai_highlight_js())?; + + Ok(()) +} + +fn build_registration_docs_engine() -> Engine { + let mut engine = Engine::new(); + engine.set_max_expr_depths(256, 256); + engine.set_max_operations(1_000_000); + register_documented_registration_api(&mut engine); + register_documented_registration_runtime_api(&mut engine); + engine +} + +fn build_runtime_docs_engine() -> Engine { + let mut engine = Engine::new(); + engine.set_max_expr_depths(256, 256); + engine.set_max_operations(1_000_000); + register_documented_runtime_api(&mut engine); + engine +} + +fn write_page_set( + output_dir: &Path, + docs: &Documentation, + pages: &[PageSpec<'_>], +) -> Result<(), Box> { + for page in pages { + let items = docs + .items + .iter() + .filter_map(|item| filter_item_for_page(item, page)) + .collect::>(); + if items.is_empty() { + return Err(format!( + "page '{}' ({}) matched no exported items", + page.title, page.file + ) + .into()); + } + + let page_doc = Documentation { + namespace: docs.namespace.clone(), + name: page.title.to_owned(), + sub_modules: Vec::new(), + documentation: page.intro.to_owned(), + items, + }; + let rendered = generate::mdbook().generate(&page_doc)?; + let content = rendered + .get(page.title) + .cloned() + .ok_or_else(|| format!("missing rendered page for {}", page.title))?; + fs::write(output_dir.join(page.file), content)?; + } + Ok(()) +} + +fn filter_item_for_page(item: &Item, page: &PageSpec<'_>) -> Option { + if let Some(receiver) = page.receiver { + let Item::Function { + root_metadata: _, + metadata, + name, + index, + } = item + else { + return None; + }; + + let filtered = metadata + .iter() + .filter(|metadata| { + metadata + .params + .as_ref() + .and_then(|params| params.first()) + .and_then(|param| param.get("type")) + .map(String::as_str) + .map(normalize_type_name) + .is_some_and(|ty| ty == receiver) + }) + .cloned() + .collect::>(); + if filtered.is_empty() { + return None; + } + let mut filtered = filtered; + filtered.sort_by(|left, right| left.signature.cmp(&right.signature)); + let root_metadata = filtered + .iter() + .find(|metadata| metadata.doc_comments.is_some()) + .cloned() + .unwrap_or_else(|| filtered[0].clone()); + + Some(Item::Function { + root_metadata, + metadata: filtered, + name: name.clone(), + index: *index, + }) + } else { + if !page.names.iter().any(|name| item_name(item) == *name) { + return None; + } + match item { + Item::Function { + metadata, + name, + index, + .. + } => { + let mut metadata = metadata.clone(); + metadata.sort_by(|left, right| left.signature.cmp(&right.signature)); + let root_metadata = metadata + .iter() + .find(|metadata| metadata.doc_comments.is_some()) + .cloned() + .unwrap_or_else(|| metadata[0].clone()); + Some(Item::Function { + root_metadata, + metadata, + name: name.clone(), + index: *index, + }) + } + Item::CustomType { .. } => Some(item.clone()), + } + } +} + +fn item_name(item: &Item) -> &str { + match item { + Item::Function { name, .. } => name, + Item::CustomType { metadata, .. } => &metadata.display_name, + } +} + +fn normalize_type_name(ty: &str) -> &str { + ty.trim_start_matches("&mut ") + .rsplit("::") + .next() + .unwrap_or(ty) +} + +fn index_page() -> String { + let mut files = BTreeSet::new(); + files.extend(REGISTRATION_PAGES.iter().map(|page| page.file)); + files.extend(RUNTIME_PAGES.iter().map(|page| page.file)); + let links = files + .into_iter() + .map(|file| format!("- [{}]({file})", file.trim_end_matches(".md"))) + .collect::>() + .join("\n"); + + format!( + "# Embers Config API\n\n\ +This reference is generated from the Rust-backed Rhai exports used by Embers.\n\n\ +There are two execution phases:\n\n\ +- registration time: the top-level config file where you declare modes, bindings, named actions, and visual settings\n\ +- runtime: named actions, event handlers, and tab bar formatters that run against live client state\n\n\ +Definition files live in [`defs/`](defs/).\n\n\ +## Pages\n\n\ +{links}\n\n\ +## Definitions\n\n\ +- [`registration.rhai`](defs/registration.rhai)\n\ +- [`runtime.rhai`](defs/runtime.rhai)\n\n\ +## Example\n\n\ +- [`example.md`](example.md)\n" + ) +} + +fn summary_page() -> String { + let registration_links = REGISTRATION_PAGES + .iter() + .map(|page| format!("- [{}]({})", page.title, page.file)) + .collect::>() + .join("\n"); + let runtime_links = RUNTIME_PAGES + .iter() + .map(|page| format!("- [{}]({})", page.title, page.file)) + .collect::>() + .join("\n"); + + format!( + "# Summary\n\n\ +- [Overview](index.md)\n\ +- [Example](example.md)\n\ +{registration_links}\n\ +{runtime_links}\n" + ) +} + +fn book_toml() -> &'static str { + r#"[book] +title = "Embers Config API" +language = "en" +src = "." + +[output.html] +default-theme = "light" +additional-js = ["theme/rhai-autodocs-tabs.js", "theme/rhai-highlight.js"] +"# +} + +fn rhai_autodocs_tabs_js() -> &'static str { + r#"window.openTab = function (evt, group, tab) { + document + .querySelectorAll('.tabcontent[group="' + group + '"]') + .forEach(function (content) { + content.style.display = "none"; + }); + + document + .querySelectorAll('.tablinks[group="' + group + '"]') + .forEach(function (link) { + link.classList.remove("active"); + }); + + const target = document.getElementById(group + "-" + tab); + if (target) { + target.style.display = "block"; + } + + if (evt && evt.currentTarget) { + evt.currentTarget.classList.add("active"); + } +};"# +} + +fn rhai_highlight_js() -> &'static str { + r#"(function () { + const hljsInstance = window.hljs; + if (!hljsInstance) { + return; + } + + hljsInstance.registerLanguage("rhai", function (hljs) { + return { + name: "Rhai", + aliases: ["rhai-script"], + keywords: { + keyword: + "if else switch do while loop for in break continue return throw try catch fn private let const import export as and or not", + literal: "true false null" + }, + contains: [ + hljs.C_LINE_COMMENT_MODE, + hljs.C_BLOCK_COMMENT_MODE, + hljs.APOS_STRING_MODE, + hljs.QUOTE_STRING_MODE, + hljs.C_NUMBER_MODE, + { + className: "literal", + begin: /#\{/, + end: /\}/ + }, + { + className: "function", + beginKeywords: "fn", + end: /[{;]/, + excludeEnd: true, + contains: [ + hljs.UNDERSCORE_TITLE_MODE, + { + className: "params", + begin: /\(/, + end: /\)/, + contains: [ + hljs.C_LINE_COMMENT_MODE, + hljs.C_BLOCK_COMMENT_MODE, + hljs.APOS_STRING_MODE, + hljs.QUOTE_STRING_MODE, + hljs.C_NUMBER_MODE + ] + } + ] + } + ] + }; + }); + + const highlightRhaiBlocks = function () { + document + .querySelectorAll("pre code.language-rhai, pre code.lang-rhai") + .forEach(function (block) { + if (typeof hljsInstance.highlightElement === "function") { + block.removeAttribute("data-highlighted"); + hljsInstance.highlightElement(block); + return; + } + + if (typeof hljsInstance.highlightBlock === "function") { + hljsInstance.highlightBlock(block); + } + }); + }; + + if (document.readyState === "loading") { + document.addEventListener("DOMContentLoaded", highlightRhaiBlocks); + } else { + highlightRhaiBlocks(); + } +})();"# +} + +pub fn build_mdbook(output_dir: &Path) -> Result<(), Box> { + let build_dir = output_dir.with_file_name(format!( + "{}-book", + output_dir + .file_name() + .and_then(|name| name.to_str()) + .unwrap_or("config-api") + )); + + if build_dir.exists() { + fs::remove_dir_all(&build_dir)?; + } + fs::create_dir_all(&build_dir)?; + + let status = Command::new("mdbook") + .arg("build") + .arg(output_dir) + .arg("--dest-dir") + .arg(&build_dir) + .status()?; + + if !status.success() { + return Err(format!("mdbook build failed for {}", output_dir.display()).into()); + } + + Ok(()) +} + +fn example_page() -> &'static str { + r##"# Example + +This is a trimmed example based on the repository fixture config. It shows the two main phases together. + +```rhai +set_leader(""); + +fn shell_tree(ctx) { + tree.buffer_spawn( + ["/bin/zsh"], + #{ + title: "shell", + cwd: if ctx.current_buffer() == () { () } else { ctx.current_buffer().cwd() } + } + ) +} + +fn split_below(ctx) { + action.split_with("horizontal", shell_tree(ctx)) +} + +fn format_tabs(ctx) { + let active = ctx.tabs()[ctx.active_index()]; + ui.bar([ + ui.segment(" " + active.title() + " ", #{ + fg: theme.color("active_fg"), + bg: theme.color("active_bg") + }) + ], [], []) +} + +define_action("split-below", split_below); +bind("normal", "\"", "split-below"); +theme.set_palette(#{ + active_fg: "#303446", + active_bg: "#c6d0f5" +}); +tabbar.set_formatter(format_tabs); +mouse.set_click_focus(true); +``` +"## +} diff --git a/crates/embers-client/src/scripting/engine.rs b/crates/embers-client/src/scripting/engine.rs index ad26634..edea286 100644 --- a/crates/embers-client/src/scripting/engine.rs +++ b/crates/embers-client/src/scripting/engine.rs @@ -1,9 +1,11 @@ +use std::cell::RefCell; use std::collections::BTreeMap; use std::sync::{Arc, Mutex}; +use rhai::plugin::*; use rhai::{ - CallFnOptions, Dynamic, Engine, EvalAltResult, FnPtr, ImmutableString, Map, NativeCallContext, - Position, + Array, CallFnOptions, Dynamic, Engine, EvalAltResult, FnPtr, ImmutableString, Map, + NativeCallContext, Position, }; use crate::config::ConfigOrigin; @@ -20,11 +22,22 @@ use super::runtime::{ use super::types::{ LoadedConfig, ModeHooks, MouseSettings, RgbColor, ScriptFunctionRef, ThemeSpec, }; -use super::{Action, Context, TabBarContext}; - -type RhaiResult = Result>; +use super::{Action, Context, RhaiResultOf, ScriptResult, TabBarContext}; type SharedRegistration = Arc>; +fn populate_common_registration_scope(scope: &mut rhai::Scope<'static>) { + scope.push("tabbar", TabbarApi::new()); + scope.push("theme", ThemeApi::new()); + scope.push("mouse", MouseApi::new()); +} + +thread_local! { + /// [`ACTIVE_REGISTRATION`] holds the current [`SharedRegistration`] for registration-time + /// Rhai callbacks on this thread. It is managed by [`with_active_registration`] and consumed + /// by [`clone_active_registration`]. + static ACTIVE_REGISTRATION: RefCell> = const { RefCell::new(None) }; +} + pub struct ScriptEngine { engine: Engine, loaded: LoadedConfig, @@ -43,13 +56,11 @@ impl ScriptEngine { let mut engine = Engine::new(); engine.set_max_expr_depths(256, 256); engine.set_max_operations(1_000_000); - register_api(&mut engine, registration.clone()); + register_api(&mut engine); register_runtime_api(&mut engine); let mut scope = registration_scope(); - scope.push_constant("tabbar", TabbarApi::new(registration.clone())); - scope.push_constant("theme", ThemeApi::new(registration.clone())); - scope.push_constant("mouse", MouseApi::new(registration.clone())); + populate_common_registration_scope(&mut scope); if !builtins.is_empty() { let builtins_source = LoadedConfigSource { @@ -61,18 +72,20 @@ impl ScriptEngine { let builtins_ast = engine .compile(builtins) .map_err(|error| ScriptError::compile(&builtins_source, error))?; - let _ = engine - .eval_ast_with_scope::(&mut scope, &builtins_ast) - .map_err(|error| ScriptError::runtime(&builtins_source, error))?; + let _ = with_active_registration(®istration, || { + engine.eval_ast_with_scope::(&mut scope, &builtins_ast) + }) + .map_err(|error| ScriptError::runtime(&builtins_source, error))?; } let ast = engine .compile(&source.source) .map_err(|error| ScriptError::compile(source, error))?; - let _ = engine - .eval_ast_with_scope::(&mut scope, &ast) - .map_err(|error| ScriptError::runtime(source, error))?; + let _ = with_active_registration(®istration, || { + engine.eval_ast_with_scope::(&mut scope, &ast) + }) + .map_err(|error| ScriptError::runtime(source, error))?; let loaded = registration .lock() @@ -350,6 +363,50 @@ impl RegistrationState { } } +/// Thread-local slot holding the current [`SharedRegistration`] while Rhai config callbacks run. +/// +/// [`with_active_registration`] is responsible for setting [`ACTIVE_REGISTRATION`] before +/// invoking registration-time API code and restoring the previous value afterward. +fn with_active_registration( + registration: &SharedRegistration, + callback: impl FnOnce() -> T, +) -> T { + ACTIVE_REGISTRATION.with(|active| { + struct RestoreRegistration<'a> { + active: &'a RefCell>, + previous: Option, + } + + impl Drop for RestoreRegistration<'_> { + fn drop(&mut self) { + self.active.replace(self.previous.take()); + } + } + + let previous = active.replace(Some(registration.clone())); + let _restore = RestoreRegistration { active, previous }; + + callback() + }) +} + +/// Clone the [`SharedRegistration`] currently stored in [`ACTIVE_REGISTRATION`]. +/// +/// This expects an active registration scope to have been established by +/// [`with_active_registration`]. Callers must use [`with_active_registration`] first, or +/// otherwise guarantee that [`ACTIVE_REGISTRATION`] has been populated before calling +/// [`clone_active_registration`]. +fn clone_active_registration(position: Position) -> ScriptResult { + ACTIVE_REGISTRATION.with(|active| { + active.borrow().as_ref().cloned().ok_or_else(|| { + runtime_error( + "registration API called without an active registration state", + position, + ) + }) + }) +} + fn validate_action_refs( source: &LoadedConfigSource, position: Position, @@ -399,17 +456,16 @@ enum BindingOperation { } #[derive(Clone)] -struct TabbarApi { - registration: SharedRegistration, -} +pub(crate) struct TabbarApi {} impl TabbarApi { - fn new(registration: SharedRegistration) -> Self { - Self { registration } + fn new() -> Self { + Self {} } - fn set_formatter(&mut self, position: Position, formatter: FnPtr) -> RhaiResult<()> { - let mut registration = self.registration.lock().expect("registration lock"); + fn set_formatter(&self, position: Position, formatter: FnPtr) -> ScriptResult<()> { + let registration = clone_active_registration(position)?; + let mut registration = registration.lock().expect("registration lock"); if registration.tab_bar_formatter.is_some() { return Err(runtime_error("tab bar formatter already defined", position)); } @@ -423,17 +479,16 @@ impl TabbarApi { } #[derive(Clone)] -struct ThemeApi { - registration: SharedRegistration, -} +pub(crate) struct ThemeApi {} impl ThemeApi { - fn new(registration: SharedRegistration) -> Self { - Self { registration } + fn new() -> Self { + Self {} } - fn set_palette(&mut self, position: Position, palette: Map) -> RhaiResult<()> { - let mut registration = self.registration.lock().expect("registration lock"); + fn set_palette(&self, position: Position, palette: Map) -> ScriptResult<()> { + let registration = clone_active_registration(position)?; + let mut registration = registration.lock().expect("registration lock"); for (name, value) in palette { let Some(value) = value.try_cast::() else { return Err(runtime_error( @@ -456,260 +511,333 @@ impl ThemeApi { } #[derive(Clone)] -struct MouseApi { - registration: SharedRegistration, -} +pub(crate) struct MouseApi {} impl MouseApi { - fn new(registration: SharedRegistration) -> Self { - Self { registration } + fn new() -> Self { + Self {} } - fn set_click_focus(&mut self, value: bool) { - self.registration + fn set_click_focus(&self, position: Position, value: bool) -> ScriptResult<()> { + clone_active_registration(position)? .lock() .expect("registration lock") .mouse .click_focus = value; + Ok(()) } - fn set_click_forward(&mut self, value: bool) { - self.registration + fn set_click_forward(&self, position: Position, value: bool) -> ScriptResult<()> { + clone_active_registration(position)? .lock() .expect("registration lock") .mouse .click_forward = value; + Ok(()) } - fn set_wheel_scroll(&mut self, value: bool) { - self.registration + fn set_wheel_scroll(&self, position: Position, value: bool) -> ScriptResult<()> { + clone_active_registration(position)? .lock() .expect("registration lock") .mouse .wheel_scroll = value; + Ok(()) } - fn set_wheel_forward(&mut self, value: bool) { - self.registration + fn set_wheel_forward(&self, position: Position, value: bool) -> ScriptResult<()> { + clone_active_registration(position)? .lock() .expect("registration lock") .mouse .wheel_forward = value; + Ok(()) } } -fn register_api(engine: &mut Engine, registration: SharedRegistration) { - engine.register_type_with_name::("TabbarApi"); - engine.register_type_with_name::("ThemeApi"); - engine.register_type_with_name::("MouseApi"); - - let leader_registration = registration.clone(); - engine.register_fn( - "set_leader", - move |context: NativeCallContext, notation: ImmutableString| -> RhaiResult<()> { - let sequence = parse_key_sequence(notation.as_str()) - .map_err(|error| runtime_error(error.to_string(), context.call_position()))?; - let mut registration = leader_registration.lock().expect("registration lock"); - if registration.leader.is_some() { - return Err(runtime_error( - "leader key is already defined", - context.call_position(), - )); - } - registration.leader = Some(sequence); - Ok(()) - }, - ); +#[export_module] +mod registration_globals { + use super::*; + + /// Set the leader sequence used in binding notations. + /// + /// # Example + /// + /// ```rhai + /// set_leader(""); + /// ``` + /// + /// # rhai-autodocs:index:1 + #[rhai_fn(return_raw, global, name = "set_leader")] + pub fn set_leader(ctx: NativeCallContext, notation: &str) -> RhaiResultOf<()> { + let sequence = parse_key_sequence(notation) + .map_err(|error| runtime_error(error.to_string(), ctx.call_position()))?; + let registration = clone_active_registration(ctx.call_position())?; + let mut registration = registration.lock().expect("registration lock"); + if registration.leader.is_some() { + return Err(runtime_error( + "leader key is already defined", + ctx.call_position(), + )); + } + registration.leader = Some(sequence); + Ok(()) + } - let mode_registration = registration.clone(); - engine.register_fn( - "define_mode", - move |context: NativeCallContext, mode_name: ImmutableString| -> RhaiResult<()> { - define_mode_impl( - &mode_registration, - context.call_position(), - mode_name, - Map::new(), - ) - }, - ); + #[rhai_fn(return_raw, global, name = "define_mode")] + pub fn define_mode(ctx: NativeCallContext, mode_name: &str) -> RhaiResultOf<()> { + define_mode_impl( + &clone_active_registration(ctx.call_position())?, + ctx.call_position(), + mode_name.into(), + Map::new(), + ) + } + + /// Define a custom input mode with hooks and fallback options. + /// + /// Supported options are `fallback`, `on_enter`, and `on_leave`. + /// + /// # rhai-autodocs:index:3 + #[rhai_fn(return_raw, global, name = "define_mode")] + pub fn define_mode_with_options( + ctx: NativeCallContext, + mode_name: &str, + options: Map, + ) -> RhaiResultOf<()> { + define_mode_impl( + &clone_active_registration(ctx.call_position())?, + ctx.call_position(), + mode_name.into(), + options, + ) + } + + /// Bind a key notation to an [`Action`], a string action name, or an array of actions. + /// + /// Use the `Action` overload for inline builders such as `action.focus_left()`, the string + /// overload for a named action registered with `define_action`, or an array to chain multiple + /// actions in sequence. + /// + /// # Example + /// + /// ```rhai + /// bind("normal", "ws", "workspace-split"); + /// ``` + /// + /// # rhai-autodocs:index:4 + #[rhai_fn(return_raw, global, name = "bind")] + pub fn bind_named( + ctx: NativeCallContext, + mode: &str, + notation: &str, + action_name: &str, + ) -> RhaiResultOf<()> { + register_binding( + &clone_active_registration(ctx.call_position())?, + ctx.call_position(), + mode.into(), + notation.into(), + vec![Action::RunNamedAction { + name: action_name.to_owned(), + }], + ) + } + + #[rhai_fn(return_raw, global, name = "bind")] + pub fn bind_action( + ctx: NativeCallContext, + mode: &str, + notation: &str, + action: Action, + ) -> RhaiResultOf<()> { + register_binding( + &clone_active_registration(ctx.call_position())?, + ctx.call_position(), + mode.into(), + notation.into(), + vec![action], + ) + } + + #[rhai_fn(return_raw, global, name = "bind")] + pub fn bind_actions( + ctx: NativeCallContext, + mode: &str, + notation: &str, + actions: Array, + ) -> RhaiResultOf<()> { + let target = actions + .into_iter() + .map(|action: Dynamic| { + action + .try_cast::() + .ok_or_else(|| runtime_error("bind expects Action values", ctx.call_position())) + }) + .collect::, _>>()?; + register_binding( + &clone_active_registration(ctx.call_position())?, + ctx.call_position(), + mode.into(), + notation.into(), + target, + ) + } + + /// Remove a previously bound key sequence. + /// + /// # rhai-autodocs:index:5 + #[rhai_fn(return_raw, global, name = "unbind")] + pub fn unbind(ctx: NativeCallContext, mode: &str, notation: &str) -> RhaiResultOf<()> { + register_unbinding( + &clone_active_registration(ctx.call_position())?, + ctx.call_position(), + mode.into(), + notation.into(), + ) + } + + /// Register a function pointer as a named action callable from bindings. + /// + /// # rhai-autodocs:index:6 + #[rhai_fn(return_raw, global, name = "define_action")] + pub fn define_action(ctx: NativeCallContext, name: &str, callback: FnPtr) -> RhaiResultOf<()> { + let registration = clone_active_registration(ctx.call_position())?; + let mut registration = registration.lock().expect("registration lock"); + if registration.named_actions.contains_key(name) { + return Err(runtime_error( + format!("action '{name}' is already defined"), + ctx.call_position(), + )); + } + registration.named_actions.insert( + name.to_owned(), + checked_function_ref(callback, "named action", ctx.call_position())?, + ); + Ok(()) + } - let mode_registration = registration.clone(); - engine.register_fn( - "define_mode", - move |context: NativeCallContext, - mode_name: ImmutableString, - options: Map| - -> RhaiResult<()> { - define_mode_impl( - &mode_registration, - context.call_position(), - mode_name, - options, - ) - }, - ); + /// Attach a callback to an emitted event such as `buffer_bell`. + /// + /// # rhai-autodocs:index:7 + #[rhai_fn(return_raw, global, name = "on")] + pub fn on(ctx: NativeCallContext, event_name: &str, callback: FnPtr) -> RhaiResultOf<()> { + clone_active_registration(ctx.call_position())? + .lock() + .expect("registration lock") + .event_handlers + .entry(event_name.to_owned()) + .or_default() + .push(checked_function_ref( + callback, + "event handler", + ctx.call_position(), + )?); + Ok(()) + } +} - let bind_registration = registration.clone(); - engine.register_fn( - "bind", - move |context: NativeCallContext, - mode: ImmutableString, - notation: ImmutableString, - action_name: ImmutableString| - -> RhaiResult<()> { - register_binding( - &bind_registration, - context.call_position(), - mode, - notation, - vec![Action::RunNamedAction { - name: action_name.to_string(), - }], - ) - }, - ); +#[export_module] +mod tabbar_registration_api { + use super::*; + + /// Register the function used to format the tab bar. + /// + /// # rhai-autodocs:index:20 + #[rhai_fn(return_raw, name = "set_formatter")] + pub fn set_formatter( + ctx: NativeCallContext, + tabbar: TabbarApi, + callback: FnPtr, + ) -> RhaiResultOf<()> { + tabbar.set_formatter(ctx.call_position(), callback) + } +} - let unbind_registration = registration.clone(); - engine.register_fn( - "unbind", - move |context: NativeCallContext, - mode: ImmutableString, - notation: ImmutableString| - -> RhaiResult<()> { - register_unbinding( - &unbind_registration, - context.call_position(), - mode, - notation, - ) - }, - ); +#[export_module] +mod theme_registration_api { + use super::*; - let bind_registration = registration.clone(); - engine.register_fn( - "bind", - move |context: NativeCallContext, - mode: ImmutableString, - notation: ImmutableString, - action: Action| - -> RhaiResult<()> { - register_binding( - &bind_registration, - context.call_position(), - mode, - notation, - vec![action], - ) - }, - ); + /// Add named colors to the theme palette. + /// + /// # rhai-autodocs:index:21 + #[rhai_fn(return_raw, name = "set_palette")] + pub fn set_palette(ctx: NativeCallContext, theme: ThemeApi, palette: Map) -> RhaiResultOf<()> { + theme.set_palette(ctx.call_position(), palette) + } +} - let bind_registration = registration.clone(); - engine.register_fn( - "bind", - move |context: NativeCallContext, - mode: ImmutableString, - notation: ImmutableString, - actions: rhai::Array| - -> RhaiResult<()> { - let target = actions - .into_iter() - .map(|action| { - action.try_cast::().ok_or_else(|| { - runtime_error("bind expects Action values", context.call_position()) - }) - }) - .collect::, _>>()?; - register_binding( - &bind_registration, - context.call_position(), - mode, - notation, - target, - ) - }, - ); +#[export_module] +mod mouse_registration_api { + use super::*; + + /// Toggle focus-on-click behavior. + /// + /// # rhai-autodocs:index:22 + #[rhai_fn(return_raw, name = "set_click_focus")] + pub fn set_click_focus( + ctx: NativeCallContext, + mouse: MouseApi, + value: bool, + ) -> RhaiResultOf<()> { + mouse.set_click_focus(ctx.call_position(), value) + } + + /// Toggle forwarding mouse clicks into the focused buffer. + /// + /// # rhai-autodocs:index:23 + #[rhai_fn(return_raw, name = "set_click_forward")] + pub fn set_click_forward( + ctx: NativeCallContext, + mouse: MouseApi, + value: bool, + ) -> RhaiResultOf<()> { + mouse.set_click_forward(ctx.call_position(), value) + } + + /// Toggle client-side wheel scrolling. + /// + /// # rhai-autodocs:index:24 + #[rhai_fn(return_raw, name = "set_wheel_scroll")] + pub fn set_wheel_scroll( + ctx: NativeCallContext, + mouse: MouseApi, + value: bool, + ) -> RhaiResultOf<()> { + mouse.set_wheel_scroll(ctx.call_position(), value) + } + + /// Toggle wheel event forwarding into the focused buffer. + /// + /// # rhai-autodocs:index:25 + #[rhai_fn(return_raw, name = "set_wheel_forward")] + pub fn set_wheel_forward( + ctx: NativeCallContext, + mouse: MouseApi, + value: bool, + ) -> RhaiResultOf<()> { + mouse.set_wheel_forward(ctx.call_position(), value) + } +} - let action_registration = registration.clone(); - engine.register_fn( - "define_action", - move |context: NativeCallContext, - name: ImmutableString, - callback: FnPtr| - -> RhaiResult<()> { - let mut registration = action_registration.lock().expect("registration lock"); - if registration.named_actions.contains_key(name.as_str()) { - return Err(runtime_error( - format!("action '{name}' is already defined"), - context.call_position(), - )); - } - registration.named_actions.insert( - name.into_owned(), - checked_function_ref(callback, "named action", context.call_position())?, - ); - Ok(()) - }, - ); +fn register_api(engine: &mut Engine) { + engine.register_type_with_name::("TabbarApi"); + engine.register_type_with_name::("ThemeApi"); + engine.register_type_with_name::("MouseApi"); + engine.register_global_module(rhai::exported_module!(registration_globals).into()); + engine.register_global_module(rhai::exported_module!(tabbar_registration_api).into()); + engine.register_global_module(rhai::exported_module!(theme_registration_api).into()); + engine.register_global_module(rhai::exported_module!(mouse_registration_api).into()); +} - let handler_registration = registration.clone(); - engine.register_fn( - "on", - move |context: NativeCallContext, - event_name: ImmutableString, - callback: FnPtr| - -> RhaiResult<()> { - handler_registration - .lock() - .expect("registration lock") - .event_handlers - .entry(event_name.into_owned()) - .or_default() - .push(checked_function_ref( - callback, - "event handler", - context.call_position(), - )?); - Ok(()) - }, - ); +pub(crate) fn register_documented_registration_api(engine: &mut Engine) { + register_api(engine); +} - engine.register_fn( - "set_formatter", - |context: NativeCallContext, tabbar: &mut TabbarApi, callback: FnPtr| -> RhaiResult<()> { - tabbar.set_formatter(context.call_position(), callback) - }, - ); - engine.register_fn( - "set_palette", - |context: NativeCallContext, theme: &mut ThemeApi, palette: Map| -> RhaiResult<()> { - theme.set_palette(context.call_position(), palette) - }, - ); - engine.register_fn( - "set_click_focus", - |_: NativeCallContext, mouse: &mut MouseApi, value: bool| { - mouse.set_click_focus(value); - }, - ); - engine.register_fn( - "set_click_forward", - |_: NativeCallContext, mouse: &mut MouseApi, value: bool| { - mouse.set_click_forward(value); - }, - ); - engine.register_fn( - "set_wheel_scroll", - |_: NativeCallContext, mouse: &mut MouseApi, value: bool| { - mouse.set_wheel_scroll(value); - }, - ); - engine.register_fn( - "set_wheel_forward", - |_: NativeCallContext, mouse: &mut MouseApi, value: bool| { - mouse.set_wheel_forward(value); - }, - ); +pub(crate) fn documentation_registration_scope() -> rhai::Scope<'static> { + let mut scope = registration_scope(); + populate_common_registration_scope(&mut scope); + scope } fn define_mode_impl( @@ -717,8 +845,8 @@ fn define_mode_impl( position: Position, mode_name: ImmutableString, mut options: Map, -) -> RhaiResult<()> { - let fallback_policy = parse_fallback_policy(options.remove("fallback"))?; +) -> ScriptResult<()> { + let fallback_policy = parse_fallback_policy(options.remove("fallback"), position)?; let on_enter = parse_optional_function_ref(options.remove("on_enter"), "mode on_enter", position)?; let on_leave = @@ -754,7 +882,7 @@ fn register_binding( mode: ImmutableString, notation: ImmutableString, target: Vec, -) -> RhaiResult<()> { +) -> ScriptResult<()> { let raw_sequence = parse_key_sequence(notation.as_str()) .map_err(|error| runtime_error(error.to_string(), position))?; registration @@ -776,7 +904,7 @@ fn register_unbinding( position: Position, mode: ImmutableString, notation: ImmutableString, -) -> RhaiResult<()> { +) -> ScriptResult<()> { let raw_sequence = parse_key_sequence(notation.as_str()) .map_err(|error| runtime_error(error.to_string(), position))?; registration @@ -791,7 +919,10 @@ fn register_unbinding( Ok(()) } -fn parse_fallback_policy(value: Option) -> RhaiResult { +fn parse_fallback_policy( + value: Option, + position: Position, +) -> ScriptResult { let Some(value) = value else { return Ok(FallbackPolicy::Ignore); }; @@ -801,7 +932,7 @@ fn parse_fallback_policy(value: Option) -> RhaiResult { let Some(value) = value.try_cast::() else { return Err(runtime_error( "mode fallback must be 'pass_to_buffer' or 'ignore'", - Position::NONE, + position, )); }; match value.as_str() { @@ -809,7 +940,7 @@ fn parse_fallback_policy(value: Option) -> RhaiResult { "ignore" => Ok(FallbackPolicy::Ignore), other => Err(runtime_error( format!("unknown fallback policy '{other}'"), - Position::NONE, + position, )), } } @@ -822,7 +953,7 @@ fn parse_optional_function_ref( value: Option, role: &str, position: Position, -) -> RhaiResult> { +) -> ScriptResult> { let Some(value) = value else { return Ok(None); }; @@ -842,7 +973,7 @@ fn checked_function_ref( callback: FnPtr, role: &str, position: Position, -) -> RhaiResult { +) -> ScriptResult { if callback.is_curried() { return Err(runtime_error( format!("{role} callbacks cannot capture curried arguments"), diff --git a/crates/embers-client/src/scripting/mod.rs b/crates/embers-client/src/scripting/mod.rs index 666f365..98bce13 100644 --- a/crates/embers-client/src/scripting/mod.rs +++ b/crates/embers-client/src/scripting/mod.rs @@ -1,4 +1,5 @@ mod context; +mod documentation; mod engine; mod error; mod harness; @@ -6,9 +7,13 @@ mod model; mod runtime; mod types; +pub(crate) type ScriptResult = Result>; +pub(crate) type RhaiResultOf = ScriptResult; + pub use context::{ BufferRef, Context, EventInfo, FloatingRef, NodeRef, SessionRef, TabBarContext, TabInfo, }; +pub use documentation::{build_mdbook, generate_config_api_docs}; pub use engine::ScriptEngine; pub use error::ScriptError; pub use harness::ScriptHarness; diff --git a/crates/embers-client/src/scripting/model.rs b/crates/embers-client/src/scripting/model.rs index a8a6957..e201d69 100644 --- a/crates/embers-client/src/scripting/model.rs +++ b/crates/embers-client/src/scripting/model.rs @@ -21,10 +21,6 @@ pub enum Action { FocusDirection { direction: NavigationDirection, }, - ResizeDirection { - direction: NavigationDirection, - amount: u16, - }, SelectTab { tabs_node_id: Option, index: usize, @@ -49,15 +45,6 @@ pub enum Action { node_id: Option, tree: TreeSpec, }, - WrapNodeInSplit { - node_id: Option, - direction: SplitDirection, - sibling: TreeSpec, - }, - WrapNodeInTabs { - node_id: Option, - tabs: TabsSpec, - }, InsertTabAfter { tabs_node_id: Option, title: Option, @@ -71,10 +58,6 @@ pub enum Action { OpenFloating { spec: FloatingSpec, }, - ReplaceFloatingRoot { - floating_id: Option, - tree: TreeSpec, - }, CloseFloating { floating_id: Option, }, @@ -96,6 +79,7 @@ pub enum Action { geometry: FloatingGeometrySpec, title: Option, focus: bool, + close_on_empty: bool, }, SendKeys { buffer_id: Option, diff --git a/crates/embers-client/src/scripting/runtime.rs b/crates/embers-client/src/scripting/runtime.rs index 024f456..e71f9f7 100644 --- a/crates/embers-client/src/scripting/runtime.rs +++ b/crates/embers-client/src/scripting/runtime.rs @@ -4,7 +4,10 @@ use std::os::unix::fs::PermissionsExt; use std::path::PathBuf; use embers_core::{BufferId, FloatingId, NodeId, Rect, SplitDirection}; -use rhai::{Array, Dynamic, Engine, EvalAltResult, ImmutableString, Map, Scope}; +use rhai::plugin::*; +use rhai::{ + Array, Dynamic, Engine, EvalAltResult, ImmutableString, Map, NativeCallContext, Position, Scope, +}; use crate::input::parse_key_sequence; use crate::presentation::NavigationDirection; @@ -17,28 +20,27 @@ use super::model::{ NotifyLevel, TabSpec, TabsSpec, TreeSpec, }; use super::types::{BarSegment, BarSpec, BarTarget, RgbColor, StyleSpec, ThemeSpec}; - -type RhaiResult = Result>; +use super::{RhaiResultOf, ScriptResult}; #[derive(Clone, Default)] -struct ActionApi; +pub(crate) struct ActionApi; #[derive(Clone, Default)] -struct TreeApi; +pub(crate) struct TreeApi; #[derive(Clone, Default)] -struct UiApi; +pub(crate) struct UiApi; #[derive(Clone)] -struct MuxApi { +pub(crate) struct MuxApi { context: Context, } #[derive(Clone, Default)] -struct SystemApi; +pub(crate) struct SystemApi; #[derive(Clone)] -struct ThemeRuntimeApi { +pub(crate) struct ThemeRuntimeApi { theme: ThemeSpec, } @@ -49,6 +51,36 @@ impl MuxApi { } pub fn register_runtime_api(engine: &mut Engine) { + register_documented_runtime_modules(engine); +} + +// Used by `documentation.rs` and the live runtime to register the shared exported API modules. +#[allow(dead_code)] +pub(crate) fn register_documented_runtime_api(engine: &mut Engine) { + register_documented_runtime_modules(engine); +} + +fn register_documented_runtime_modules(engine: &mut Engine) { + register_runtime_types(engine); + engine.register_global_module(rhai::exported_module!(documented_context_api).into()); + engine.register_global_module(rhai::exported_module!(documented_ref_api).into()); + engine.register_global_module(rhai::exported_module!(documented_action_api).into()); + engine.register_global_module(rhai::exported_module!(documented_tree_api).into()); + engine.register_global_module(rhai::exported_module!(documented_mux_api).into()); + engine.register_global_module(rhai::exported_module!(documented_system_api).into()); + engine.register_global_module(rhai::exported_module!(documented_ui_api).into()); + engine.register_global_module(rhai::exported_module!(documented_theme_runtime_api).into()); +} + +pub(crate) fn register_documented_registration_runtime_api(engine: &mut Engine) { + register_runtime_types(engine); + engine.register_global_module(rhai::exported_module!(documented_action_api).into()); + engine.register_global_module(rhai::exported_module!(documented_tree_api).into()); + engine.register_global_module(rhai::exported_module!(documented_system_api).into()); + engine.register_global_module(rhai::exported_module!(documented_ui_api).into()); +} + +fn register_runtime_types(engine: &mut Engine) { engine.register_type_with_name::("Action"); engine.register_type_with_name::("TreeSpec"); engine.register_type_with_name::("TabSpec"); @@ -71,36 +103,27 @@ pub fn register_runtime_api(engine: &mut Engine) { engine.register_type_with_name::("MuxApi"); engine.register_type_with_name::("SystemApi"); engine.register_type_with_name::("ThemeRuntimeApi"); - - register_context_api(engine); - register_ref_api(engine); - register_action_api(engine); - register_tree_api(engine); - register_mux_api(engine); - register_system_api(engine); - register_ui_api(engine); - register_theme_runtime_api(engine); } pub fn runtime_scope(context: Option, theme: ThemeSpec) -> Scope<'static> { let mut scope = Scope::new(); - scope.push_constant("system", SystemApi); - scope.push_constant("action", ActionApi); - scope.push_constant("tree", TreeApi); - scope.push_constant("ui", UiApi); - scope.push_constant("theme", ThemeRuntimeApi { theme }); + scope.push("system", SystemApi); + scope.push("action", ActionApi); + scope.push("tree", TreeApi); + scope.push("ui", UiApi); + scope.push("theme", ThemeRuntimeApi { theme }); if let Some(context) = context { - scope.push_constant("mux", MuxApi::new(context)); + scope.push("mux", MuxApi::new(context)); } scope } pub fn registration_scope() -> Scope<'static> { let mut scope = Scope::new(); - scope.push_constant("system", SystemApi); - scope.push_constant("action", ActionApi); - scope.push_constant("tree", TreeApi); - scope.push_constant("ui", UiApi); + scope.push("system", SystemApi); + scope.push("action", ActionApi); + scope.push("tree", TreeApi); + scope.push("ui", UiApi); scope } @@ -121,16 +144,8 @@ pub fn normalize_actions(result: Dynamic) -> Result, String> { fn validate_live_actions(actions: &[Action]) -> Result<(), String> { for action in actions { - match action { - Action::Chain(inner) => validate_live_actions(inner)?, - Action::ReplaceFloatingRoot { .. } - | Action::WrapNodeInSplit { .. } - | Action::WrapNodeInTabs { .. } => { - return Err(format!( - "action '{action:?}' is not supported by the live executor" - )); - } - _ => {} + if let Action::Chain(inner) = action { + validate_live_actions(inner)? } } @@ -143,203 +158,475 @@ pub fn normalize_bar(result: Dynamic) -> Result { .ok_or_else(|| "tab bar formatter must return a BarSpec".to_owned()) } -fn register_context_api(engine: &mut Engine) { - engine.register_fn("current_mode", |context: &mut Context| { +#[allow(dead_code)] +#[export_module] +mod documented_context_api { + use super::{ + Array, Context, Dynamic, NativeCallContext, dynamic_option_custom, parse_buffer_id, + parse_floating_id, parse_node_id, with_call_position, + }; + + /// Return the active input mode name. + #[rhai_fn(name = "current_mode")] + pub fn current_mode(context: &mut Context) -> String { context.current_mode().to_owned() - }); - engine.register_fn("event", |context: &mut Context| -> Dynamic { + } + + /// Return the current event payload, if any. + /// + /// ReturnType: `EventInfo | ()` + #[rhai_fn(name = "event")] + pub fn event(context: &mut Context) -> Dynamic { dynamic_option_custom(context.event()) - }); - engine.register_fn("current_session", |context: &mut Context| -> Dynamic { + } + + /// Return the current session reference, if any. + /// + /// ReturnType: `SessionRef | ()` + #[rhai_fn(name = "current_session")] + pub fn current_session(context: &mut Context) -> Dynamic { dynamic_option_custom(context.current_session()) - }); - engine.register_fn("current_node", |context: &mut Context| -> Dynamic { + } + + /// Return the currently focused node, if any. + /// + /// ReturnType: `NodeRef | ()` + #[rhai_fn(name = "current_node")] + pub fn current_node(context: &mut Context) -> Dynamic { dynamic_option_custom(context.current_node()) - }); - engine.register_fn("current_buffer", |context: &mut Context| -> Dynamic { + } + + /// Return the currently focused buffer, if any. + /// + /// ReturnType: `BufferRef | ()` + /// + /// # Example + /// + /// ```rhai + /// let buffer = ctx.current_buffer(); + /// if buffer != () { + /// print(buffer.title()); + /// } + /// ``` + #[rhai_fn(name = "current_buffer")] + pub fn current_buffer(context: &mut Context) -> Dynamic { dynamic_option_custom(context.current_buffer()) - }); - engine.register_fn("current_floating", |context: &mut Context| -> Dynamic { + } + + /// Return the currently focused floating window, if any. + /// + /// ReturnType: `FloatingRef | ()` + #[rhai_fn(name = "current_floating")] + pub fn current_floating(context: &mut Context) -> Dynamic { dynamic_option_custom(context.current_floating()) - }); - engine.register_fn("sessions", |context: &mut Context| -> Array { + } + + /// Return every visible session. + #[rhai_fn(name = "sessions")] + pub fn sessions(context: &mut Context) -> Array { context.sessions().into_iter().map(Dynamic::from).collect() - }); - engine.register_fn( - "find_buffer", - |context: &mut Context, buffer_id: i64| -> RhaiResult { + } + + /// Find a buffer by numeric id. Returns `()` when it does not exist. + /// + /// ReturnType: `BufferRef | ()` + #[rhai_fn(return_raw, name = "find_buffer")] + pub fn find_buffer( + ctx: NativeCallContext, + context: &mut Context, + buffer_id: i64, + ) -> RhaiResultOf { + with_call_position(ctx, || { Ok(dynamic_option_custom( context.find_buffer(parse_buffer_id(buffer_id)?), )) - }, - ); - engine.register_fn( - "find_node", - |context: &mut Context, node_id: i64| -> RhaiResult { + }) + } + + /// Find a node by numeric id. Returns `()` when it does not exist. + /// + /// ReturnType: `NodeRef | ()` + #[rhai_fn(return_raw, name = "find_node")] + pub fn find_node( + ctx: NativeCallContext, + context: &mut Context, + node_id: i64, + ) -> RhaiResultOf { + with_call_position(ctx, || { Ok(dynamic_option_custom( context.find_node(parse_node_id(node_id)?), )) - }, - ); - engine.register_fn( - "find_floating", - |context: &mut Context, floating_id: i64| -> RhaiResult { + }) + } + + /// Find a floating window by numeric id. Returns `()` when it does not exist. + /// + /// ReturnType: `FloatingRef | ()` + #[rhai_fn(return_raw, name = "find_floating")] + pub fn find_floating( + ctx: NativeCallContext, + context: &mut Context, + floating_id: i64, + ) -> RhaiResultOf { + with_call_position(ctx, || { Ok(dynamic_option_custom( context.find_floating(parse_floating_id(floating_id)?), )) - }, - ); - engine.register_fn("detached_buffers", |context: &mut Context| -> Array { + }) + } + + /// Return detached buffers in the current model snapshot. + #[rhai_fn(name = "detached_buffers")] + pub fn detached_buffers(context: &mut Context) -> Array { context .detached_buffers() .into_iter() .map(Dynamic::from) .collect() - }); - engine.register_fn("visible_buffers", |context: &mut Context| -> Array { + } + + /// Return visible buffers in the current model snapshot. + #[rhai_fn(name = "visible_buffers")] + pub fn visible_buffers(context: &mut Context) -> Array { context .visible_buffers() .into_iter() .map(Dynamic::from) .collect() - }); + } } -fn register_ref_api(engine: &mut Engine) { - engine.register_fn("name", |event: &mut EventInfo| event.name.clone()); - engine.register_fn("session_id", |event: &mut EventInfo| -> Dynamic { +#[allow(dead_code)] +#[export_module] +mod documented_ref_api { + use super::{ + Array, BufferRef, Dynamic, EventInfo, FloatingRef, Map, NativeCallContext, NodeRef, + SessionRef, TabBarContext, TabInfo, activity_name, dynamic_option_string, dynamic_u32, + dynamic_u64, float_geometry_map, node_kind_name, parse_count, rect_map, + split_direction_name, with_call_position, + }; + + /// Return the session id attached to an event, or `()`. + /// + /// ReturnType: `int | ()` + #[rhai_fn(name = "session_id")] + pub fn event_session_id(event: &mut EventInfo) -> Dynamic { event .session_id .map(|session_id| dynamic_u64(session_id.0)) .unwrap_or(Dynamic::UNIT) - }); - engine.register_fn("buffer_id", |event: &mut EventInfo| -> Dynamic { + } + + /// Return the buffer id attached to an event, or `()`. + /// + /// ReturnType: `int | ()` + #[rhai_fn(name = "buffer_id")] + pub fn event_buffer_id(event: &mut EventInfo) -> Dynamic { event .buffer_id .map(|buffer_id| dynamic_u64(buffer_id.0)) .unwrap_or(Dynamic::UNIT) - }); - engine.register_fn("node_id", |event: &mut EventInfo| -> Dynamic { + } + + /// Return the event name. + #[rhai_fn(name = "name")] + pub fn event_name(event: &mut EventInfo) -> String { + event.name.clone() + } + + /// Return the node id attached to an event, or `()`. + /// + /// ReturnType: `int | ()` + #[rhai_fn(name = "node_id")] + pub fn event_node_id(event: &mut EventInfo) -> Dynamic { event .node_id .map(|node_id| dynamic_u64(node_id.0)) .unwrap_or(Dynamic::UNIT) - }); - engine.register_fn("floating_id", |event: &mut EventInfo| -> Dynamic { + } + + /// Return the floating id attached to an event, or `()`. + /// + /// ReturnType: `int | ()` + #[rhai_fn(name = "floating_id")] + pub fn event_floating_id(event: &mut EventInfo) -> Dynamic { event .floating_id .map(|floating_id| dynamic_u64(floating_id.0)) .unwrap_or(Dynamic::UNIT) - }); - - engine.register_fn("id", |session: &mut SessionRef| dynamic_u64(session.id.0)); - engine.register_fn("name", |session: &mut SessionRef| session.name.clone()); - engine.register_fn("root_node", |session: &mut SessionRef| { - dynamic_u64(session.root_node_id.0) - }); - engine.register_fn("floating", |session: &mut SessionRef| -> Array { + } + + /// Return the numeric session id. + #[rhai_fn(name = "id")] + pub fn session_id(session: &mut SessionRef) -> i64 { + i64::try_from(session.id.0).unwrap_or(i64::MAX) + } + + /// Return the session name. + #[rhai_fn(name = "name")] + pub fn session_name(session: &mut SessionRef) -> String { + session.name.clone() + } + + /// Return the root tabs node for the session. + #[rhai_fn(name = "root_node")] + pub fn session_root_node(session: &mut SessionRef) -> i64 { + i64::try_from(session.root_node_id.0).unwrap_or(i64::MAX) + } + + /// Return floating window ids attached to the session. + #[rhai_fn(name = "floating")] + pub fn session_floating(session: &mut SessionRef) -> Array { session .floating_ids .iter() .map(|floating_id| dynamic_u64(floating_id.0)) .collect() - }); + } - engine.register_fn("id", |buffer: &mut BufferRef| dynamic_u64(buffer.id.0)); - engine.register_fn("title", |buffer: &mut BufferRef| buffer.title.clone()); - engine.register_fn("command", |buffer: &mut BufferRef| -> Array { - buffer.command.iter().cloned().map(Dynamic::from).collect() - }); - engine.register_fn("cwd", |buffer: &mut BufferRef| -> Dynamic { - dynamic_option_string(buffer.cwd.clone()) - }); - engine.register_fn("pid", |buffer: &mut BufferRef| -> Dynamic { - buffer.pid.map(dynamic_u32).unwrap_or(Dynamic::UNIT) - }); - engine.register_fn("process_name", |buffer: &mut BufferRef| -> Dynamic { - dynamic_option_string(buffer.process_name()) - }); - engine.register_fn("tty_path", |buffer: &mut BufferRef| -> Dynamic { - dynamic_option_string(buffer.tty_path.clone()) - }); - engine.register_fn( - "env_hint", - |buffer: &mut BufferRef, key: ImmutableString| -> Dynamic { - dynamic_option_string(buffer.env_hint(key.as_str())) - }, - ); - engine.register_fn( - "snapshot_text", - |buffer: &mut BufferRef, limit: i64| -> RhaiResult { - Ok(buffer.snapshot_text(parse_count(limit, "snapshot_text limit")?)) - }, - ); - engine.register_fn("history_text", |buffer: &mut BufferRef| { - buffer.history_text() - }); - engine.register_fn("is_attached", |buffer: &mut BufferRef| buffer.is_attached()); - engine.register_fn("is_detached", |buffer: &mut BufferRef| buffer.is_detached()); - engine.register_fn("is_running", |buffer: &mut BufferRef| buffer.is_running()); - engine.register_fn("exit_code", |buffer: &mut BufferRef| -> Dynamic { - buffer.exit_code.map(Dynamic::from).unwrap_or(Dynamic::UNIT) - }); - engine.register_fn("is_visible", |buffer: &mut BufferRef| buffer.visible); - engine.register_fn("session_id", |buffer: &mut BufferRef| -> Dynamic { + /// Return the buffer title. + #[rhai_fn(name = "title")] + pub fn buffer_title(buffer: &mut BufferRef) -> String { + buffer.title.clone() + } + + /// Return the numeric buffer id. + #[rhai_fn(name = "id")] + pub fn buffer_id(buffer: &mut BufferRef) -> i64 { + i64::try_from(buffer.id.0).unwrap_or(i64::MAX) + } + + /// Return the attached session id, if any. + /// + /// ReturnType: `int | ()` + #[rhai_fn(name = "session_id")] + pub fn buffer_session_id(buffer: &mut BufferRef) -> Dynamic { buffer .session_id .map(|session_id| dynamic_u64(session_id.0)) .unwrap_or(Dynamic::UNIT) - }); - engine.register_fn("node_id", |buffer: &mut BufferRef| -> Dynamic { + } + + /// Return the attached node id, if any. + /// + /// ReturnType: `int | ()` + #[rhai_fn(name = "node_id")] + pub fn buffer_node_id(buffer: &mut BufferRef) -> Dynamic { buffer .node_id() .map(|node_id| dynamic_u64(node_id.0)) .unwrap_or(Dynamic::UNIT) - }); - engine.register_fn("activity", |buffer: &mut BufferRef| { + } + + /// Return the original command vector. + #[rhai_fn(name = "command")] + pub fn buffer_command(buffer: &mut BufferRef) -> Array { + buffer.command.iter().cloned().map(Dynamic::from).collect() + } + + /// Return the working directory, if any. + /// + /// ReturnType: `string | ()` + #[rhai_fn(name = "cwd")] + pub fn buffer_cwd(buffer: &mut BufferRef) -> Dynamic { + dynamic_option_string(buffer.cwd.clone()) + } + + /// Return the process id, if any. + /// + /// ReturnType: `int | ()` + #[rhai_fn(name = "pid")] + pub fn buffer_pid(buffer: &mut BufferRef) -> Dynamic { + buffer.pid.map(dynamic_u32).unwrap_or(Dynamic::UNIT) + } + + /// Return the detected process name, if any. + /// + /// ReturnType: `string | ()` + #[rhai_fn(name = "process_name")] + pub fn buffer_process_name(buffer: &mut BufferRef) -> Dynamic { + dynamic_option_string(buffer.process_name()) + } + + /// Return the controlling TTY path, if any. + /// + /// ReturnType: `string | ()` + #[rhai_fn(name = "tty_path")] + pub fn buffer_tty_path(buffer: &mut BufferRef) -> Dynamic { + dynamic_option_string(buffer.tty_path.clone()) + } + + /// Look up a single environment hint captured on the buffer. + /// + /// ReturnType: `string | ()` + #[rhai_fn(name = "env_hint")] + pub fn buffer_env_hint(buffer: &mut BufferRef, key: &str) -> Dynamic { + dynamic_option_string(buffer.env_hint(key)) + } + + /// Return a text snapshot limited to the requested line count. + #[rhai_fn(return_raw, name = "snapshot_text")] + pub fn buffer_snapshot_text( + ctx: NativeCallContext, + buffer: &mut BufferRef, + limit: i64, + ) -> RhaiResultOf { + with_call_position(ctx, || { + Ok(buffer.snapshot_text(parse_count(limit, "snapshot_text limit")?)) + }) + } + + /// Return the full captured history text for the buffer. + /// + /// # Example + /// + /// ```rhai + /// let buffer = ctx.current_buffer(); + /// if buffer != () { + /// let history = buffer.history_text(); + /// } + /// ``` + #[rhai_fn(name = "history_text")] + pub fn buffer_history_text(buffer: &mut BufferRef) -> String { + buffer.history_text() + } + + /// Return whether the buffer is currently attached to a node. + #[rhai_fn(name = "is_attached")] + pub fn buffer_is_attached(buffer: &mut BufferRef) -> bool { + buffer.is_attached() + } + + /// Return whether the buffer has been detached. + #[rhai_fn(name = "is_detached")] + pub fn buffer_is_detached(buffer: &mut BufferRef) -> bool { + buffer.is_detached() + } + + /// Return whether the buffer process is still running. + #[rhai_fn(name = "is_running")] + pub fn buffer_is_running(buffer: &mut BufferRef) -> bool { + buffer.is_running() + } + + /// Return the process exit code, if any. + /// + /// ReturnType: `int | ()` + #[rhai_fn(name = "exit_code")] + pub fn buffer_exit_code(buffer: &mut BufferRef) -> Dynamic { + buffer.exit_code.map(Dynamic::from).unwrap_or(Dynamic::UNIT) + } + + /// Return whether the buffer is visible in the current presentation. + #[rhai_fn(name = "is_visible")] + pub fn buffer_is_visible(buffer: &mut BufferRef) -> bool { + buffer.visible + } + + /// Return the current activity state name. + #[rhai_fn(name = "activity")] + pub fn buffer_activity(buffer: &mut BufferRef) -> String { activity_name(buffer.activity) - }); + } + + /// Return the node id. + #[rhai_fn(name = "id")] + pub fn node_id(node: &mut NodeRef) -> i64 { + i64::try_from(node.id.0).unwrap_or(i64::MAX) + } + + /// Return the owning session id. + #[rhai_fn(name = "session_id")] + pub fn node_session_id(node: &mut NodeRef) -> i64 { + i64::try_from(node.session_id.0).unwrap_or(i64::MAX) + } + + /// Return the node kind such as `buffer_view`, `split`, or `tabs`. + #[rhai_fn(name = "kind")] + pub fn node_kind(node: &mut NodeRef) -> String { + node_kind_name(node.kind) + } - engine.register_fn("id", |node: &mut NodeRef| dynamic_u64(node.id.0)); - engine.register_fn("kind", |node: &mut NodeRef| node_kind_name(node.kind)); - engine.register_fn("parent", |node: &mut NodeRef| -> Dynamic { + /// Return the parent node id, if any. + /// + /// ReturnType: `int | ()` + #[rhai_fn(name = "parent")] + pub fn node_parent(node: &mut NodeRef) -> Dynamic { node.parent_id .map(|node_id| dynamic_u64(node_id.0)) .unwrap_or(Dynamic::UNIT) - }); - engine.register_fn("children", |node: &mut NodeRef| -> Array { + } + + /// Return child node ids. + #[rhai_fn(name = "children")] + pub fn node_children(node: &mut NodeRef) -> Array { node.child_ids .iter() .map(|child_id| dynamic_u64(child_id.0)) .collect() - }); - engine.register_fn("session_id", |node: &mut NodeRef| { - dynamic_u64(node.session_id.0) - }); - engine.register_fn("geometry", |node: &mut NodeRef| -> Dynamic { + } + + /// Return the geometry map, if any. + /// + /// ReturnType: `Map | ()` + #[rhai_fn(name = "geometry")] + pub fn node_geometry(node: &mut NodeRef) -> Dynamic { node.geometry .map(rect_map) .map(Dynamic::from) .unwrap_or(Dynamic::UNIT) - }); - engine.register_fn("is_root", |node: &mut NodeRef| node.is_root); - engine.register_fn("is_floating_root", |node: &mut NodeRef| { + } + + /// Return whether the node is the session root. + #[rhai_fn(name = "is_root")] + pub fn node_is_root(node: &mut NodeRef) -> bool { + node.is_root + } + + /// Return whether the node is the root of a floating window. + #[rhai_fn(name = "is_floating_root")] + pub fn node_is_floating_root(node: &mut NodeRef) -> bool { node.is_floating_root - }); - engine.register_fn("is_visible", |node: &mut NodeRef| node.visible); - engine.register_fn("is_focused", |node: &mut NodeRef| node.is_focused); - engine.register_fn("buffer", |node: &mut NodeRef| -> Dynamic { + } + + /// Return whether the node is visible in the current presentation. + #[rhai_fn(name = "is_visible")] + pub fn node_is_visible(node: &mut NodeRef) -> bool { + node.visible + } + + /// Return whether the node is focused. + #[rhai_fn(name = "is_focused")] + pub fn node_is_focused(node: &mut NodeRef) -> bool { + node.is_focused + } + + /// Return the attached buffer id, if any. + /// + /// ReturnType: `int | ()` + #[rhai_fn(name = "buffer")] + pub fn node_buffer(node: &mut NodeRef) -> Dynamic { node.buffer_id .map(|buffer_id| dynamic_u64(buffer_id.0)) .unwrap_or(Dynamic::UNIT) - }); - engine.register_fn("split_direction", |node: &mut NodeRef| -> Dynamic { + } + + /// Return the split direction, if any. + /// + /// ReturnType: `string | ()` + #[rhai_fn(name = "split_direction")] + pub fn node_split_direction(node: &mut NodeRef) -> Dynamic { node.split_direction .map(split_direction_name) .map(Dynamic::from) .unwrap_or(Dynamic::UNIT) - }); - engine.register_fn("split_weights", |node: &mut NodeRef| -> Dynamic { + } + + /// Return split weights, if any. + /// + /// ReturnType: `Array | ()` + #[rhai_fn(name = "split_weights")] + pub fn node_split_weights(node: &mut NodeRef) -> Dynamic { node.split_weights .as_ref() .map(|weights| { @@ -351,749 +638,1247 @@ fn register_ref_api(engine: &mut Engine) { }) .map(Dynamic::from) .unwrap_or(Dynamic::UNIT) - }); - engine.register_fn("active_tab_index", |node: &mut NodeRef| -> Dynamic { + } + + /// Return the active tab index, if any. + /// + /// ReturnType: `int | ()` + #[rhai_fn(name = "active_tab_index")] + pub fn node_active_tab_index(node: &mut NodeRef) -> Dynamic { node.active_tab_index .map(dynamic_u32) .unwrap_or(Dynamic::UNIT) - }); - engine.register_fn("tab_titles", |node: &mut NodeRef| -> Array { + } + + /// Return tab titles on a tabs node. + #[rhai_fn(name = "tab_titles")] + pub fn node_tab_titles(node: &mut NodeRef) -> Array { node.tab_titles.iter().cloned().map(Dynamic::from).collect() - }); - - engine.register_fn("id", |floating: &mut FloatingRef| { - dynamic_u64(floating.id.0) - }); - engine.register_fn("session_id", |floating: &mut FloatingRef| { - dynamic_u64(floating.session_id.0) - }); - engine.register_fn("root_node", |floating: &mut FloatingRef| { - dynamic_u64(floating.root_node_id.0) - }); - engine.register_fn("title", |floating: &mut FloatingRef| -> Dynamic { + } + + /// Return the floating id. + #[rhai_fn(name = "id")] + pub fn floating_id(floating: &mut FloatingRef) -> i64 { + i64::try_from(floating.id.0).unwrap_or(i64::MAX) + } + + /// Return the owning session id. + #[rhai_fn(name = "session_id")] + pub fn floating_session_id(floating: &mut FloatingRef) -> i64 { + i64::try_from(floating.session_id.0).unwrap_or(i64::MAX) + } + + /// Return the root node id. + #[rhai_fn(name = "root_node")] + pub fn floating_root_node(floating: &mut FloatingRef) -> i64 { + i64::try_from(floating.root_node_id.0).unwrap_or(i64::MAX) + } + + /// Return the floating title, if any. + /// + /// ReturnType: `string | ()` + #[rhai_fn(name = "title")] + pub fn floating_title(floating: &mut FloatingRef) -> Dynamic { dynamic_option_string(floating.title.clone()) - }); - engine.register_fn("is_visible", |floating: &mut FloatingRef| floating.visible); - engine.register_fn("is_focused", |floating: &mut FloatingRef| floating.focused); - engine.register_fn("geometry", |floating: &mut FloatingRef| -> Map { + } + + /// Return the floating geometry map. + #[rhai_fn(name = "geometry")] + pub fn floating_geometry(floating: &mut FloatingRef) -> Map { float_geometry_map(floating.geometry) - }); - - engine.register_fn("node_id", |bar: &mut TabBarContext| { - dynamic_u64(bar.node_id.0) - }); - engine.register_fn("is_root", |bar: &mut TabBarContext| bar.is_root); - engine.register_fn("active_index", |bar: &mut TabBarContext| { - dynamic_usize(bar.active) - }); - engine.register_fn("mode", |bar: &mut TabBarContext| bar.mode.clone()); - engine.register_fn("viewport_width", |bar: &mut TabBarContext| { - Dynamic::from(i64::from(bar.viewport_width)) - }); - engine.register_fn("tabs", |bar: &mut TabBarContext| -> Array { + } + + /// Return whether the floating is visible. + #[rhai_fn(name = "is_visible")] + pub fn floating_is_visible(floating: &mut FloatingRef) -> bool { + floating.visible + } + + /// Return whether the floating is focused. + #[rhai_fn(name = "is_focused")] + pub fn floating_is_focused(floating: &mut FloatingRef) -> bool { + floating.focused + } + + /// Return the tabs node id currently being formatted. + #[rhai_fn(name = "node_id")] + pub fn bar_node_id(bar: &mut TabBarContext) -> i64 { + i64::try_from(bar.node_id.0).unwrap_or(i64::MAX) + } + + /// Return whether the formatted tabs are the root tabs. + #[rhai_fn(name = "is_root")] + pub fn bar_is_root(bar: &mut TabBarContext) -> bool { + bar.is_root + } + + /// Return the active tab index. + #[rhai_fn(name = "active_index")] + pub fn bar_active_index(bar: &mut TabBarContext) -> i64 { + i64::try_from(bar.active).unwrap_or(i64::MAX) + } + + /// Return tab metadata used by the formatter. + #[rhai_fn(name = "tabs")] + pub fn bar_tabs(bar: &mut TabBarContext) -> Array { bar.tabs.iter().cloned().map(Dynamic::from).collect() - }); - - engine.register_fn("index", |tab: &mut TabInfo| dynamic_usize(tab.index)); - engine.register_fn("title", |tab: &mut TabInfo| tab.title.clone()); - engine.register_fn("is_active", |tab: &mut TabInfo| tab.active); - engine.register_fn("has_activity", |tab: &mut TabInfo| tab.has_activity); - engine.register_fn("has_bell", |tab: &mut TabInfo| tab.has_bell); - engine.register_fn("buffer_count", |tab: &mut TabInfo| { - dynamic_usize(tab.buffer_count) - }); -} - -fn register_action_api(engine: &mut Engine) { - engine.register_fn("noop", |_: &mut ActionApi| Action::Noop); - engine.register_fn( - "chain", - |_: &mut ActionApi, actions: Array| -> RhaiResult { - Ok(Action::Chain(parse_action_array(actions)?)) - }, - ); - engine.register_fn("enter_mode", |_: &mut ActionApi, mode: ImmutableString| { + } + + /// Return the formatter mode name. + #[rhai_fn(name = "mode")] + pub fn bar_mode(bar: &mut TabBarContext) -> String { + bar.mode.clone() + } + + /// Return the tab title. + #[rhai_fn(name = "title")] + pub fn tab_title(tab: &mut TabInfo) -> String { + tab.title.clone() + } + + /// Return the zero-based tab index. + #[rhai_fn(name = "index")] + pub fn tab_index(tab: &mut TabInfo) -> i64 { + i64::try_from(tab.index).unwrap_or(i64::MAX) + } + + /// Return whether the tab is active. + #[rhai_fn(name = "is_active")] + pub fn tab_is_active(tab: &mut TabInfo) -> bool { + tab.active + } + + /// Return whether the tab has activity. + #[rhai_fn(name = "has_activity")] + pub fn tab_has_activity(tab: &mut TabInfo) -> bool { + tab.has_activity + } + + /// Return whether the tab has a bell marker. + #[rhai_fn(name = "has_bell")] + pub fn tab_has_bell(tab: &mut TabInfo) -> bool { + tab.has_bell + } + + /// Return how many buffers are attached to the tab. + #[rhai_fn(name = "buffer_count")] + pub fn tab_buffer_count(tab: &mut TabInfo) -> i64 { + i64::try_from(tab.buffer_count).unwrap_or(i64::MAX) + } + + /// Return the formatter viewport width in cells. + #[rhai_fn(name = "viewport_width")] + pub fn bar_viewport_width(bar: &mut TabBarContext) -> i64 { + i64::from(bar.viewport_width) + } +} + +#[allow(dead_code)] +#[export_module] +mod documented_mux_api { + use super::{ + Array, Dynamic, MuxApi, NativeCallContext, dynamic_option_custom, parse_buffer_id, + parse_floating_id, parse_node_id, with_call_position, + }; + + /// Return the current session reference, if any. + /// + /// ReturnType: `SessionRef | ()` + #[rhai_fn(name = "current_session")] + pub fn current_session(mux: &mut MuxApi) -> Dynamic { + dynamic_option_custom(mux.context.current_session()) + } + + /// Return the currently focused node, if any. + /// + /// ReturnType: `NodeRef | ()` + #[rhai_fn(name = "current_node")] + pub fn current_node(mux: &mut MuxApi) -> Dynamic { + dynamic_option_custom(mux.context.current_node()) + } + + /// Return the currently focused buffer, if any. + /// + /// ReturnType: `BufferRef | ()` + #[rhai_fn(name = "current_buffer")] + pub fn current_buffer(mux: &mut MuxApi) -> Dynamic { + dynamic_option_custom(mux.context.current_buffer()) + } + + /// Return the currently focused floating window, if any. + /// + /// ReturnType: `FloatingRef | ()` + #[rhai_fn(name = "current_floating")] + pub fn current_floating(mux: &mut MuxApi) -> Dynamic { + dynamic_option_custom(mux.context.current_floating()) + } + + /// Return every visible session. + #[rhai_fn(name = "sessions")] + pub fn sessions(mux: &mut MuxApi) -> Array { + mux.context + .sessions() + .into_iter() + .map(Dynamic::from) + .collect() + } + + /// Return visible buffers in the current model snapshot. + #[rhai_fn(name = "visible_buffers")] + pub fn visible_buffers(mux: &mut MuxApi) -> Array { + mux.context + .visible_buffers() + .into_iter() + .map(Dynamic::from) + .collect() + } + + /// Return detached buffers in the current model snapshot. + #[rhai_fn(name = "detached_buffers")] + pub fn detached_buffers(mux: &mut MuxApi) -> Array { + mux.context + .detached_buffers() + .into_iter() + .map(Dynamic::from) + .collect() + } + + /// Find a buffer by numeric id. Returns `()` when it does not exist. + /// + /// ReturnType: `BufferRef | ()` + #[rhai_fn(return_raw, name = "find_buffer")] + pub fn find_buffer( + ctx: NativeCallContext, + mux: &mut MuxApi, + buffer_id: i64, + ) -> RhaiResultOf { + with_call_position(ctx, || { + Ok(dynamic_option_custom( + mux.context.find_buffer(parse_buffer_id(buffer_id)?), + )) + }) + } + + /// Find a node by numeric id. Returns `()` when it does not exist. + /// + /// ReturnType: `NodeRef | ()` + #[rhai_fn(return_raw, name = "find_node")] + pub fn find_node( + ctx: NativeCallContext, + mux: &mut MuxApi, + node_id: i64, + ) -> RhaiResultOf { + with_call_position(ctx, || { + Ok(dynamic_option_custom( + mux.context.find_node(parse_node_id(node_id)?), + )) + }) + } + + /// Find a floating window by numeric id. Returns `()` when it does not exist. + /// + /// ReturnType: `FloatingRef | ()` + #[rhai_fn(return_raw, name = "find_floating")] + pub fn find_floating( + ctx: NativeCallContext, + mux: &mut MuxApi, + floating_id: i64, + ) -> RhaiResultOf { + with_call_position(ctx, || { + Ok(dynamic_option_custom( + mux.context.find_floating(parse_floating_id(floating_id)?), + )) + }) + } +} + +#[allow(dead_code)] +#[export_module] +mod documented_action_api { + use super::{ + Action, ActionApi, Array, ImmutableString, Map, NativeCallContext, NavigationDirection, + TreeSpec, parse_action_array, parse_buffer_id, parse_bytes, parse_floating_id, + parse_floating_options, parse_floating_spec, parse_index, parse_key_sequence, + parse_node_id, parse_notify_level, parse_split_direction, runtime_error_at, + with_call_position, + }; + + /// Build a no-op action. + #[rhai_fn(name = "noop")] + pub fn noop(_: &mut ActionApi) -> Action { + Action::Noop + } + + /// Chain multiple actions into one composite action. + #[rhai_fn(return_raw, name = "chain")] + pub fn chain( + ctx: NativeCallContext, + _: &mut ActionApi, + actions: Array, + ) -> RhaiResultOf { + with_call_position(ctx, || Ok(Action::Chain(parse_action_array(actions)?))) + } + + /// Enter a specific input mode by name. + #[rhai_fn(name = "enter_mode")] + pub fn enter_mode(_: &mut ActionApi, mode: &str) -> Action { Action::EnterMode { - mode: mode.to_string(), + mode: mode.to_owned(), } - }); - engine.register_fn("leave_mode", |_: &mut ActionApi| Action::LeaveMode); - engine.register_fn("toggle_mode", |_: &mut ActionApi, mode: ImmutableString| { + } + + /// Leave the active input mode. + #[rhai_fn(name = "leave_mode")] + pub fn leave_mode(_: &mut ActionApi) -> Action { + Action::LeaveMode + } + + /// Toggle a named input mode. + #[rhai_fn(name = "toggle_mode")] + pub fn toggle_mode(_: &mut ActionApi, mode: &str) -> Action { Action::ToggleMode { - mode: mode.to_string(), + mode: mode.to_owned(), } - }); - engine.register_fn("clear_pending_keys", |_: &mut ActionApi| { + } + + /// Clear any partially-entered key sequence. + #[rhai_fn(name = "clear_pending_keys")] + pub fn clear_pending_keys(_: &mut ActionApi) -> Action { Action::ClearPendingKeys - }); - - engine.register_fn("focus_left", |_: &mut ActionApi| Action::FocusDirection { - direction: NavigationDirection::Left, - }); - engine.register_fn("focus_right", |_: &mut ActionApi| Action::FocusDirection { - direction: NavigationDirection::Right, - }); - engine.register_fn("focus_up", |_: &mut ActionApi| Action::FocusDirection { - direction: NavigationDirection::Up, - }); - engine.register_fn("focus_down", |_: &mut ActionApi| Action::FocusDirection { - direction: NavigationDirection::Down, - }); - - engine.register_fn( - "resize_left", - |_: &mut ActionApi, amount: i64| -> RhaiResult { - Ok(Action::ResizeDirection { - direction: NavigationDirection::Left, - amount: parse_amount(amount, "resize amount")?, - }) - }, - ); - engine.register_fn( - "resize_right", - |_: &mut ActionApi, amount: i64| -> RhaiResult { - Ok(Action::ResizeDirection { - direction: NavigationDirection::Right, - amount: parse_amount(amount, "resize amount")?, - }) - }, - ); - engine.register_fn( - "resize_up", - |_: &mut ActionApi, amount: i64| -> RhaiResult { - Ok(Action::ResizeDirection { - direction: NavigationDirection::Up, - amount: parse_amount(amount, "resize amount")?, - }) - }, - ); - engine.register_fn( - "resize_down", - |_: &mut ActionApi, amount: i64| -> RhaiResult { - Ok(Action::ResizeDirection { - direction: NavigationDirection::Down, - amount: parse_amount(amount, "resize amount")?, - }) - }, - ); + } - engine.register_fn( - "select_tab", - |_: &mut ActionApi, tabs_node_id: i64, index: i64| -> RhaiResult { + /// Focus the view to the left of the current node. + /// + /// # Example + /// + /// ```rhai + /// action.focus_left() + /// ``` + #[rhai_fn(name = "focus_left")] + pub fn focus_left(_: &mut ActionApi) -> Action { + Action::FocusDirection { + direction: NavigationDirection::Left, + } + } + + /// Focus the view to the right of the current node. + #[rhai_fn(name = "focus_right")] + pub fn focus_right(_: &mut ActionApi) -> Action { + Action::FocusDirection { + direction: NavigationDirection::Right, + } + } + + /// Focus the view above the current node. + #[rhai_fn(name = "focus_up")] + pub fn focus_up(_: &mut ActionApi) -> Action { + Action::FocusDirection { + direction: NavigationDirection::Up, + } + } + + /// Focus the view below the current node. + #[rhai_fn(name = "focus_down")] + pub fn focus_down(_: &mut ActionApi) -> Action { + Action::FocusDirection { + direction: NavigationDirection::Down, + } + } + + /// Select a tab by index in a specific tabs node. + #[rhai_fn(return_raw, name = "select_tab")] + pub fn select_tab( + ctx: NativeCallContext, + _: &mut ActionApi, + tabs_node_id: i64, + index: i64, + ) -> RhaiResultOf { + with_call_position(ctx, || { Ok(Action::SelectTab { tabs_node_id: Some(parse_node_id(tabs_node_id)?), index: parse_index(index, "tab index")?, }) - }, - ); - engine.register_fn( - "select_current_tabs", - |_: &mut ActionApi, index: i64| -> RhaiResult { + }) + } + + /// Select a tab by index in the currently focused tabs node. + #[rhai_fn(return_raw, name = "select_current_tabs")] + pub fn select_current_tabs( + ctx: NativeCallContext, + _: &mut ActionApi, + index: i64, + ) -> RhaiResultOf { + with_call_position(ctx, || { Ok(Action::SelectTab { tabs_node_id: None, index: parse_index(index, "tab index")?, }) - }, - ); - engine.register_fn( - "next_tab", - |_: &mut ActionApi, tabs_node_id: i64| -> RhaiResult { + }) + } + + /// Select the next tab in a specific tabs node. + #[rhai_fn(return_raw, name = "next_tab")] + pub fn next_tab( + ctx: NativeCallContext, + _: &mut ActionApi, + tabs_node_id: i64, + ) -> RhaiResultOf { + with_call_position(ctx, || { Ok(Action::NextTab { tabs_node_id: Some(parse_node_id(tabs_node_id)?), }) - }, - ); - engine.register_fn("next_current_tabs", |_: &mut ActionApi| Action::NextTab { - tabs_node_id: None, - }); - engine.register_fn( - "prev_tab", - |_: &mut ActionApi, tabs_node_id: i64| -> RhaiResult { + }) + } + + /// Select the next tab in the currently focused tabs node. + #[rhai_fn(name = "next_current_tabs")] + pub fn next_current_tabs(_: &mut ActionApi) -> Action { + Action::NextTab { tabs_node_id: None } + } + + /// Select the previous tab in a specific tabs node. + #[rhai_fn(return_raw, name = "prev_tab")] + pub fn prev_tab( + ctx: NativeCallContext, + _: &mut ActionApi, + tabs_node_id: i64, + ) -> RhaiResultOf { + with_call_position(ctx, || { Ok(Action::PrevTab { tabs_node_id: Some(parse_node_id(tabs_node_id)?), }) - }, - ); - engine.register_fn("prev_current_tabs", |_: &mut ActionApi| Action::PrevTab { - tabs_node_id: None, - }); + }) + } - engine.register_fn( - "focus_buffer", - |_: &mut ActionApi, buffer_id: i64| -> RhaiResult { + /// Select the previous tab in the currently focused tabs node. + #[rhai_fn(name = "prev_current_tabs")] + pub fn prev_current_tabs(_: &mut ActionApi) -> Action { + Action::PrevTab { tabs_node_id: None } + } + + /// Focus a specific buffer by id. + #[rhai_fn(return_raw, name = "focus_buffer")] + pub fn focus_buffer( + ctx: NativeCallContext, + _: &mut ActionApi, + buffer_id: i64, + ) -> RhaiResultOf { + with_call_position(ctx, || { Ok(Action::FocusBuffer { buffer_id: parse_buffer_id(buffer_id)?, }) - }, - ); - engine.register_fn( - "reveal_buffer", - |_: &mut ActionApi, buffer_id: i64| -> RhaiResult { + }) + } + + /// Reveal a specific buffer by id. + #[rhai_fn(return_raw, name = "reveal_buffer")] + pub fn reveal_buffer( + ctx: NativeCallContext, + _: &mut ActionApi, + buffer_id: i64, + ) -> RhaiResultOf { + with_call_position(ctx, || { Ok(Action::RevealBuffer { buffer_id: parse_buffer_id(buffer_id)?, }) - }, - ); + }) + } - engine.register_fn( - "split_with", - |_: &mut ActionApi, direction: ImmutableString, tree: TreeSpec| -> RhaiResult { + /// Split the current node and attach the provided tree as the new sibling. + #[rhai_fn(return_raw, name = "split_with")] + pub fn split_with( + ctx: NativeCallContext, + _: &mut ActionApi, + direction: &str, + tree: TreeSpec, + ) -> RhaiResultOf { + with_call_position(ctx, || { Ok(Action::SplitCurrent { - direction: parse_split_direction(direction.as_str())?, + direction: parse_split_direction(direction)?, new_child: tree, }) - }, - ); - - engine.register_fn( - "replace_current_with", - |_: &mut ActionApi, tree: TreeSpec| Action::ReplaceNode { - node_id: None, - tree, - }, - ); - engine.register_fn( - "replace_node", - |_: &mut ActionApi, node_id: i64, tree: TreeSpec| -> RhaiResult { - Ok(Action::ReplaceNode { - node_id: Some(parse_node_id(node_id)?), - tree, - }) - }, - ); - - engine.register_fn( - "wrap_current_in_split", - |_: &mut ActionApi, direction: ImmutableString, tree: TreeSpec| -> RhaiResult { - Ok(Action::WrapNodeInSplit { - node_id: None, - direction: parse_split_direction(direction.as_str())?, - sibling: tree, - }) - }, - ); - engine.register_fn( - "wrap_node_in_split", - |_: &mut ActionApi, - node_id: i64, - direction: ImmutableString, - tree: TreeSpec| - -> RhaiResult { - Ok(Action::WrapNodeInSplit { - node_id: Some(parse_node_id(node_id)?), - direction: parse_split_direction(direction.as_str())?, - sibling: tree, - }) - }, - ); - - engine.register_fn( - "wrap_current_in_tabs", - |_: &mut ActionApi, tabs: TreeSpec| -> RhaiResult { - Ok(Action::WrapNodeInTabs { - node_id: None, - tabs: parse_tabs_tree(tabs)?, - }) - }, - ); - engine.register_fn( - "wrap_node_in_tabs", - |_: &mut ActionApi, node_id: i64, tabs: TreeSpec| -> RhaiResult { - Ok(Action::WrapNodeInTabs { - node_id: Some(parse_node_id(node_id)?), - tabs: parse_tabs_tree(tabs)?, - }) - }, - ); + }) + } - engine.register_fn( - "insert_tab_after", - |_: &mut ActionApi, - tabs_node_id: i64, - title: ImmutableString, - tree: TreeSpec| - -> RhaiResult { + /// Insert a tab after a specific tabs node. + #[rhai_fn(return_raw, name = "insert_tab_after")] + pub fn insert_tab_after( + ctx: NativeCallContext, + _: &mut ActionApi, + tabs_node_id: i64, + title: &str, + tree: TreeSpec, + ) -> RhaiResultOf { + with_call_position(ctx, || { Ok(Action::InsertTabAfter { tabs_node_id: Some(parse_node_id(tabs_node_id)?), - title: Some(title.to_string()), + title: Some(title.to_owned()), child: tree, }) - }, - ); - engine.register_fn( - "insert_tab_after_current", - |_: &mut ActionApi, title: ImmutableString, tree: TreeSpec| Action::InsertTabAfter { + }) + } + + /// Insert a tab after the current tab in the focused tabs node. + #[rhai_fn(name = "insert_tab_after_current")] + pub fn insert_tab_after_current(_: &mut ActionApi, title: &str, tree: TreeSpec) -> Action { + Action::InsertTabAfter { tabs_node_id: None, - title: Some(title.to_string()), + title: Some(title.to_owned()), child: tree, - }, - ); - engine.register_fn( - "insert_tab_before", - |_: &mut ActionApi, - tabs_node_id: i64, - title: ImmutableString, - tree: TreeSpec| - -> RhaiResult { + } + } + + /// Insert a tab before a specific tabs node. + #[rhai_fn(return_raw, name = "insert_tab_before")] + pub fn insert_tab_before( + ctx: NativeCallContext, + _: &mut ActionApi, + tabs_node_id: i64, + title: &str, + tree: TreeSpec, + ) -> RhaiResultOf { + with_call_position(ctx, || { Ok(Action::InsertTabBefore { tabs_node_id: Some(parse_node_id(tabs_node_id)?), - title: Some(title.to_string()), + title: Some(title.to_owned()), child: tree, }) - }, - ); - engine.register_fn( - "insert_tab_before_current", - |_: &mut ActionApi, title: ImmutableString, tree: TreeSpec| Action::InsertTabBefore { + }) + } + + /// Insert a tab before the current tab. + #[rhai_fn(name = "insert_tab_before_current")] + pub fn insert_tab_before_current(_: &mut ActionApi, title: &str, tree: TreeSpec) -> Action { + Action::InsertTabBefore { tabs_node_id: None, - title: Some(title.to_string()), + title: Some(title.to_owned()), child: tree, - }, - ); + } + } - engine.register_fn( - "open_floating", - |_: &mut ActionApi, tree: TreeSpec, options: Map| -> RhaiResult { + /// Replace the focused node with a new tree. + #[rhai_fn(name = "replace_current_with")] + pub fn replace_current_with(_: &mut ActionApi, tree: TreeSpec) -> Action { + Action::ReplaceNode { + node_id: None, + tree, + } + } + + /// Replace a specific node by id with a new tree. + #[rhai_fn(return_raw, name = "replace_node")] + pub fn replace_node( + ctx: NativeCallContext, + _: &mut ActionApi, + node_id: i64, + tree: TreeSpec, + ) -> RhaiResultOf { + with_call_position(ctx, || { + Ok(Action::ReplaceNode { + node_id: Some(parse_node_id(node_id)?), + tree, + }) + }) + } + + /// Open a floating view around the provided tree. + #[rhai_fn(return_raw, name = "open_floating")] + pub fn open_floating( + ctx: NativeCallContext, + _: &mut ActionApi, + tree: TreeSpec, + options: Map, + ) -> RhaiResultOf { + with_call_position(ctx, || { Ok(Action::OpenFloating { spec: parse_floating_spec(tree, options)?, }) - }, - ); - engine.register_fn( - "replace_floating_root", - |_: &mut ActionApi, floating_id: i64, tree: TreeSpec| -> RhaiResult { - Ok(Action::ReplaceFloatingRoot { - floating_id: Some(parse_floating_id(floating_id)?), - tree, - }) - }, - ); - engine.register_fn( - "replace_current_floating_root", - |_: &mut ActionApi, tree: TreeSpec| Action::ReplaceFloatingRoot { - floating_id: None, - tree, - }, - ); - engine.register_fn("close_floating", |_: &mut ActionApi| { + }) + } + + /// Close the currently focused floating window. + #[rhai_fn(name = "close_floating")] + pub fn close_floating(_: &mut ActionApi) -> Action { Action::CloseFloating { floating_id: None } - }); - engine.register_fn( - "close_floating_id", - |_: &mut ActionApi, floating_id: i64| -> RhaiResult { + } + + /// Close a floating window by id. + #[rhai_fn(return_raw, name = "close_floating_id")] + pub fn close_floating_id( + ctx: NativeCallContext, + _: &mut ActionApi, + floating_id: i64, + ) -> RhaiResultOf { + with_call_position(ctx, || { Ok(Action::CloseFloating { floating_id: Some(parse_floating_id(floating_id)?), }) - }, - ); - engine.register_fn("close_view", |_: &mut ActionApi| Action::CloseView { - node_id: None, - }); - engine.register_fn( - "close_node", - |_: &mut ActionApi, node_id: i64| -> RhaiResult { + }) + } + + /// Close the currently focused view. + #[rhai_fn(name = "close_view")] + pub fn close_view(_: &mut ActionApi) -> Action { + Action::CloseView { node_id: None } + } + + /// Close a view by node id. + #[rhai_fn(return_raw, name = "close_node")] + pub fn close_node( + ctx: NativeCallContext, + _: &mut ActionApi, + node_id: i64, + ) -> RhaiResultOf { + with_call_position(ctx, || { Ok(Action::CloseView { node_id: Some(parse_node_id(node_id)?), }) - }, - ); + }) + } + + /// Kill the currently focused buffer. + #[rhai_fn(name = "kill_buffer")] + pub fn kill_buffer(_: &mut ActionApi) -> Action { + Action::KillBuffer { buffer_id: None } + } - engine.register_fn("kill_buffer", |_: &mut ActionApi| Action::KillBuffer { - buffer_id: None, - }); - engine.register_fn( - "kill_buffer_id", - |_: &mut ActionApi, buffer_id: i64| -> RhaiResult { + /// Kill a buffer by id. + #[rhai_fn(return_raw, name = "kill_buffer_id")] + pub fn kill_buffer_id( + ctx: NativeCallContext, + _: &mut ActionApi, + buffer_id: i64, + ) -> RhaiResultOf { + with_call_position(ctx, || { Ok(Action::KillBuffer { buffer_id: Some(parse_buffer_id(buffer_id)?), }) - }, - ); - engine.register_fn("detach_buffer", |_: &mut ActionApi| Action::DetachBuffer { - buffer_id: None, - }); - engine.register_fn( - "detach_buffer_id", - |_: &mut ActionApi, buffer_id: i64| -> RhaiResult { + }) + } + + /// Detach the currently focused buffer. + #[rhai_fn(name = "detach_buffer")] + pub fn detach_buffer(_: &mut ActionApi) -> Action { + Action::DetachBuffer { buffer_id: None } + } + + /// Detach a buffer by id. + #[rhai_fn(return_raw, name = "detach_buffer_id")] + pub fn detach_buffer_id( + ctx: NativeCallContext, + _: &mut ActionApi, + buffer_id: i64, + ) -> RhaiResultOf { + with_call_position(ctx, || { Ok(Action::DetachBuffer { buffer_id: Some(parse_buffer_id(buffer_id)?), }) - }, - ); + }) + } - engine.register_fn( - "move_buffer_to_node", - |_: &mut ActionApi, buffer_id: i64, node_id: i64| -> RhaiResult { + /// Move a buffer into a specific node. + #[rhai_fn(return_raw, name = "move_buffer_to_node")] + pub fn move_buffer_to_node( + ctx: NativeCallContext, + _: &mut ActionApi, + buffer_id: i64, + node_id: i64, + ) -> RhaiResultOf { + with_call_position(ctx, || { Ok(Action::MoveBufferToNode { buffer_id: parse_buffer_id(buffer_id)?, node_id: parse_node_id(node_id)?, }) - }, - ); - engine.register_fn( - "move_buffer_to_floating", - |_: &mut ActionApi, buffer_id: i64, options: Map| -> RhaiResult { + }) + } + + /// Move a buffer into a new floating window. + /// + /// # Options + /// + /// - `x` (i16): horizontal offset from the anchor (default: 0) + /// - `y` (i16): vertical offset from the anchor (default: 0) + /// - `width` (FloatingSize): window width, as a percentage (e.g., 50%) or pixel value (default: 50%) + /// - `height` (FloatingSize): window height, as a percentage or pixel value (default: 50%) + /// - `anchor` (FloatingAnchor): anchor point for positioning, e.g., "top_left", "center" (default: center) + /// - `title` (Option\): window title (default: none) + /// - `focus` (bool): whether to focus the window after creation (default: true) + /// - `close_on_empty` (bool): whether to close the window when its buffer empties (default: true) + #[rhai_fn(return_raw, name = "move_buffer_to_floating")] + pub fn move_buffer_to_floating( + ctx: NativeCallContext, + _: &mut ActionApi, + buffer_id: i64, + options: Map, + ) -> RhaiResultOf { + with_call_position(ctx, || { let spec = parse_floating_options(options)?; Ok(Action::MoveBufferToFloating { buffer_id: parse_buffer_id(buffer_id)?, geometry: spec.geometry, title: spec.title, focus: spec.focus, + close_on_empty: spec.close_on_empty, }) - }, - ); + }) + } - engine.register_fn( - "send_keys_current", - |_: &mut ActionApi, notation: ImmutableString| -> RhaiResult { - Ok(Action::SendKeys { + /// Send raw byte values to the focused buffer. + /// + /// Use this when you need to emit an exact byte sequence instead of key notation. + /// + /// # Example + /// + /// ```rhai + /// // Send the ANSI "cursor up" sequence: ESC [ A + /// action.send_bytes_current([0x1b, 0x5b, 0x41]) + /// ``` + #[rhai_fn(return_raw, name = "send_bytes_current")] + pub fn send_bytes_current( + ctx: NativeCallContext, + _: &mut ActionApi, + bytes: Array, + ) -> RhaiResultOf { + with_call_position(ctx, || { + Ok(Action::SendBytes { buffer_id: None, - keys: parse_key_sequence(notation.as_str()) - .map_err(|error| runtime_error(error.to_string()))?, - }) - }, - ); - engine.register_fn( - "send_keys", - |_: &mut ActionApi, buffer_id: i64, notation: ImmutableString| -> RhaiResult { - Ok(Action::SendKeys { - buffer_id: Some(parse_buffer_id(buffer_id)?), - keys: parse_key_sequence(notation.as_str()) - .map_err(|error| runtime_error(error.to_string()))?, + bytes: parse_bytes(bytes)?, }) - }, - ); - engine.register_fn( - "send_bytes", - |_: &mut ActionApi, buffer_id: i64, bytes: ImmutableString| -> RhaiResult { + }) + } + + /// Send a string of bytes to the focused buffer. + #[rhai_fn(name = "send_bytes_current")] + pub fn send_bytes_current_string(_: &mut ActionApi, bytes: &str) -> Action { + Action::SendBytes { + buffer_id: None, + bytes: bytes.as_bytes().to_vec(), + } + } + + /// Send a string of bytes to a specific buffer. + #[rhai_fn(return_raw, name = "send_bytes")] + pub fn send_bytes_string( + ctx: NativeCallContext, + _: &mut ActionApi, + buffer_id: i64, + bytes: &str, + ) -> RhaiResultOf { + with_call_position(ctx, || { Ok(Action::SendBytes { buffer_id: Some(parse_buffer_id(buffer_id)?), bytes: bytes.as_bytes().to_vec(), }) - }, - ); - engine.register_fn( - "send_bytes", - |_: &mut ActionApi, buffer_id: i64, bytes: Array| -> RhaiResult { + }) + } + + /// Send raw byte values to a specific buffer. + #[rhai_fn(return_raw, name = "send_bytes")] + pub fn send_bytes_array( + ctx: NativeCallContext, + _: &mut ActionApi, + buffer_id: i64, + bytes: Array, + ) -> RhaiResultOf { + with_call_position(ctx, || { Ok(Action::SendBytes { buffer_id: Some(parse_buffer_id(buffer_id)?), bytes: parse_bytes(bytes)?, }) - }, - ); - engine.register_fn( - "send_bytes_current", - |_: &mut ActionApi, bytes: ImmutableString| Action::SendBytes { - buffer_id: None, - bytes: bytes.as_bytes().to_vec(), - }, - ); - engine.register_fn( - "send_bytes_current", - |_: &mut ActionApi, bytes: Array| -> RhaiResult { - Ok(Action::SendBytes { + }) + } + + /// Send a key notation sequence to the focused buffer. + #[rhai_fn(return_raw, name = "send_keys_current")] + pub fn send_keys_current( + ctx: NativeCallContext, + _: &mut ActionApi, + notation: &str, + ) -> RhaiResultOf { + let position = ctx.call_position(); + with_call_position(ctx, || { + Ok(Action::SendKeys { buffer_id: None, - bytes: parse_bytes(bytes)?, + keys: parse_key_sequence(notation) + .map_err(|error| runtime_error_at(error.to_string(), position))?, }) - }, - ); + }) + } - engine.register_fn("scroll_line_up", |_: &mut ActionApi| Action::ScrollLineUp); - engine.register_fn("scroll_line_down", |_: &mut ActionApi| { - Action::ScrollLineDown - }); - engine.register_fn("scroll_page_up", |_: &mut ActionApi| Action::ScrollPageUp); - engine.register_fn("scroll_page_down", |_: &mut ActionApi| { + /// Send a key notation sequence to a specific buffer. + #[rhai_fn(return_raw, name = "send_keys")] + pub fn send_keys( + ctx: NativeCallContext, + _: &mut ActionApi, + buffer_id: i64, + notation: &str, + ) -> RhaiResultOf { + let position = ctx.call_position(); + with_call_position(ctx, || { + Ok(Action::SendKeys { + buffer_id: Some(parse_buffer_id(buffer_id)?), + keys: parse_key_sequence(notation) + .map_err(|error| runtime_error_at(error.to_string(), position))?, + }) + }) + } + + /// Scroll one page upward in local scrollback. + #[rhai_fn(name = "scroll_page_up")] + pub fn scroll_page_up(_: &mut ActionApi) -> Action { + Action::ScrollPageUp + } + + /// Scroll one page downward in local scrollback. + #[rhai_fn(name = "scroll_page_down")] + pub fn scroll_page_down(_: &mut ActionApi) -> Action { Action::ScrollPageDown - }); - engine.register_fn("scroll_to_top", |_: &mut ActionApi| Action::ScrollToTop); - engine.register_fn("scroll_to_bottom", |_: &mut ActionApi| { + } + + /// Scroll one line upward in local scrollback. + #[rhai_fn(name = "scroll_line_up")] + pub fn scroll_line_up(_: &mut ActionApi) -> Action { + Action::ScrollLineUp + } + + /// Scroll one line downward in local scrollback. + #[rhai_fn(name = "scroll_line_down")] + pub fn scroll_line_down(_: &mut ActionApi) -> Action { + Action::ScrollLineDown + } + + /// Scroll to the top of local scrollback. + #[rhai_fn(name = "scroll_to_top")] + pub fn scroll_to_top(_: &mut ActionApi) -> Action { + Action::ScrollToTop + } + + /// Scroll to the bottom of local scrollback. + #[rhai_fn(name = "scroll_to_bottom")] + pub fn scroll_to_bottom(_: &mut ActionApi) -> Action { Action::ScrollToBottom - }); - engine.register_fn("follow_output", |_: &mut ActionApi| Action::FollowOutput); - engine.register_fn("enter_search_mode", |_: &mut ActionApi| { + } + + /// Re-enable following live output. + #[rhai_fn(name = "follow_output")] + pub fn follow_output(_: &mut ActionApi) -> Action { + Action::FollowOutput + } + + /// Enter incremental search mode. + #[rhai_fn(name = "enter_search_mode")] + pub fn enter_search_mode(_: &mut ActionApi) -> Action { Action::EnterSearchMode - }); - engine.register_fn("search_next", |_: &mut ActionApi| Action::SearchNext); - engine.register_fn("search_prev", |_: &mut ActionApi| Action::SearchPrev); - engine.register_fn("cancel_search", |_: &mut ActionApi| Action::CancelSearch); - engine.register_fn("enter_select_char", |_: &mut ActionApi| { + } + + /// Cancel the active search. + #[rhai_fn(name = "cancel_search")] + pub fn cancel_search(_: &mut ActionApi) -> Action { + Action::CancelSearch + } + + /// Jump to the next search match. + #[rhai_fn(name = "search_next")] + pub fn search_next(_: &mut ActionApi) -> Action { + Action::SearchNext + } + + /// Jump to the previous search match. + #[rhai_fn(name = "search_prev")] + pub fn search_prev(_: &mut ActionApi) -> Action { + Action::SearchPrev + } + + /// Enter character selection mode. + #[rhai_fn(name = "enter_select_char")] + pub fn enter_select_char(_: &mut ActionApi) -> Action { Action::EnterSelect { kind: crate::state::SelectionKind::Character, } - }); - engine.register_fn("enter_select_line", |_: &mut ActionApi| { + } + + /// Enter line selection mode. + #[rhai_fn(name = "enter_select_line")] + pub fn enter_select_line(_: &mut ActionApi) -> Action { Action::EnterSelect { kind: crate::state::SelectionKind::Line, } - }); - engine.register_fn("enter_select_block", |_: &mut ActionApi| { + } + + /// Enter block selection mode. + #[rhai_fn(name = "enter_select_block")] + pub fn enter_select_block(_: &mut ActionApi) -> Action { Action::EnterSelect { kind: crate::state::SelectionKind::Block, } - }); - engine.register_fn("select_move_left", |_: &mut ActionApi| Action::SelectMove { - direction: NavigationDirection::Left, - }); - engine.register_fn("select_move_right", |_: &mut ActionApi| { + } + + /// Move the active selection left. + #[rhai_fn(name = "select_move_left")] + pub fn select_move_left(_: &mut ActionApi) -> Action { + Action::SelectMove { + direction: NavigationDirection::Left, + } + } + + /// Move the active selection right. + #[rhai_fn(name = "select_move_right")] + pub fn select_move_right(_: &mut ActionApi) -> Action { Action::SelectMove { direction: NavigationDirection::Right, } - }); - engine.register_fn("select_move_up", |_: &mut ActionApi| Action::SelectMove { - direction: NavigationDirection::Up, - }); - engine.register_fn("select_move_down", |_: &mut ActionApi| Action::SelectMove { - direction: NavigationDirection::Down, - }); - - engine.register_fn("yank_selection", |_: &mut ActionApi| Action::CopySelection); - engine.register_fn("copy_selection", |_: &mut ActionApi| Action::CopySelection); - engine.register_fn("cancel_selection", |_: &mut ActionApi| { + } + + /// Move the active selection up. + #[rhai_fn(name = "select_move_up")] + pub fn select_move_up(_: &mut ActionApi) -> Action { + Action::SelectMove { + direction: NavigationDirection::Up, + } + } + + /// Move the active selection down. + #[rhai_fn(name = "select_move_down")] + pub fn select_move_down(_: &mut ActionApi) -> Action { + Action::SelectMove { + direction: NavigationDirection::Down, + } + } + + /// Copy the current selection into the clipboard. + #[rhai_fn(name = "yank_selection")] + pub fn yank_selection(_: &mut ActionApi) -> Action { + Action::CopySelection + } + + /// Copy the current selection into the clipboard. + #[rhai_fn(name = "copy_selection")] + pub fn copy_selection(_: &mut ActionApi) -> Action { + Action::CopySelection + } + + /// Cancel the current selection. + #[rhai_fn(name = "cancel_selection")] + pub fn cancel_selection(_: &mut ActionApi) -> Action { Action::CancelSelection - }); - engine.register_fn( - "notify", - |_: &mut ActionApi, - level: ImmutableString, - message: ImmutableString| - -> RhaiResult { + } + + /// Emit a client notification. + #[rhai_fn(return_raw, name = "notify")] + pub fn notify( + ctx: NativeCallContext, + _: &mut ActionApi, + level: &str, + message: &str, + ) -> RhaiResultOf { + with_call_position(ctx, || { Ok(Action::Notify { - level: parse_notify_level(level.as_str())?, - message: message.to_string(), + level: parse_notify_level(level)?, + message: message.to_owned(), }) - }, - ); - engine.register_fn( - "run_named_action", - |_: &mut ActionApi, name: ImmutableString| Action::RunNamedAction { - name: name.to_string(), - }, - ); + }) + } + + /// Run another named action by name. + #[rhai_fn(name = "run_named_action")] + pub fn run_named_action(_: &mut ActionApi, name: &str) -> Action { + Action::RunNamedAction { + name: name.to_owned(), + } + } } -fn register_tree_api(engine: &mut Engine) { - engine.register_fn("buffer_current", |_: &mut TreeApi| TreeSpec::BufferCurrent); - engine.register_fn("current_buffer", |_: &mut TreeApi| TreeSpec::BufferCurrent); - engine.register_fn("current_node", |_: &mut TreeApi| TreeSpec::CurrentNode); - engine.register_fn("buffer_empty", |_: &mut TreeApi| TreeSpec::BufferEmpty); - engine.register_fn( - "buffer_attach", - |_: &mut TreeApi, buffer_id: i64| -> RhaiResult { +#[allow(dead_code)] +#[export_module] +mod documented_tree_api { + use super::{ + Array, Dynamic, Map, NativeCallContext, SplitDirection, TabSpec, TreeApi, TreeSpec, + build_split, build_tabs, parse_buffer_id, parse_buffer_spawn, parse_index, parse_sizes, + parse_split_direction, with_call_position, + }; + + /// Build a tree reference to the currently focused buffer. + #[rhai_fn(name = "buffer_current")] + pub fn buffer_current(_: &mut TreeApi) -> TreeSpec { + TreeSpec::BufferCurrent + } + + /// Build a tree reference to the currently focused buffer. + #[rhai_fn(name = "current_buffer")] + pub fn current_buffer(_: &mut TreeApi) -> TreeSpec { + TreeSpec::BufferCurrent + } + + /// Build a tree reference to the currently focused node. + #[rhai_fn(name = "current_node")] + pub fn current_node(_: &mut TreeApi) -> TreeSpec { + TreeSpec::CurrentNode + } + + /// Build an empty buffer tree node. + #[rhai_fn(name = "buffer_empty")] + pub fn buffer_empty(_: &mut TreeApi) -> TreeSpec { + TreeSpec::BufferEmpty + } + + /// Attach an existing buffer by id. + #[rhai_fn(return_raw, name = "buffer_attach")] + pub fn buffer_attach( + ctx: NativeCallContext, + _: &mut TreeApi, + buffer_id: i64, + ) -> RhaiResultOf { + with_call_position(ctx, || { Ok(TreeSpec::BufferAttach { buffer_id: parse_buffer_id(buffer_id)?, }) - }, - ); - engine.register_fn( - "buffer_spawn", - |_: &mut TreeApi, command: Array| -> RhaiResult { - Ok(TreeSpec::BufferSpawn(BufferSpawnSpec { + }) + } + + /// Spawn a new buffer from a command array. + /// + /// Supported `options` keys are `title` (`string`), `cwd` (`string`), and `env` + /// (`map`). Unknown keys are rejected. + /// + /// # Example + /// + /// ```rhai + /// tree.buffer_spawn(["/bin/zsh"], #{ title: "shell" }) + /// ``` + #[rhai_fn(return_raw, name = "buffer_spawn")] + pub fn buffer_spawn_simple( + ctx: NativeCallContext, + _: &mut TreeApi, + command: Array, + ) -> RhaiResultOf { + with_call_position(ctx, || { + Ok(TreeSpec::BufferSpawn(super::BufferSpawnSpec { title: None, - command: parse_string_array(Dynamic::from(command))?, + command: super::parse_string_array(Dynamic::from(command))?, cwd: None, env: Default::default(), })) - }, - ); - engine.register_fn( - "buffer_spawn", - |_: &mut TreeApi, command: Array, options: Map| -> RhaiResult { + }) + } + + #[rhai_fn(return_raw, name = "buffer_spawn")] + pub fn buffer_spawn( + ctx: NativeCallContext, + _: &mut TreeApi, + command: Array, + options: Map, + ) -> RhaiResultOf { + with_call_position(ctx, || { Ok(TreeSpec::BufferSpawn(parse_buffer_spawn(command, options)?)) - }, - ); - engine.register_fn( - "tab", - |_: &mut TreeApi, title: ImmutableString, tree: TreeSpec| TabSpec { - title: title.to_string(), + }) + } + + /// Build a single tab specification. + #[rhai_fn(name = "tab")] + pub fn tab(_: &mut TreeApi, title: &str, tree: TreeSpec) -> TabSpec { + TabSpec { + title: title.to_owned(), tree: Box::new(tree), - }, - ); - engine.register_fn( - "tabs", - |_: &mut TreeApi, tabs: Array| -> RhaiResult { build_tabs(tabs, 0) }, - ); - engine.register_fn( - "tabs_with_active", - |_: &mut TreeApi, tabs: Array, active: i64| -> RhaiResult { - build_tabs(tabs, parse_index(active, "active tab")?) - }, - ); - engine.register_fn( - "split_h", - |_: &mut TreeApi, children: Array| -> RhaiResult { + } + } + + /// Build a tabs container with the first tab active. + #[rhai_fn(return_raw, name = "tabs")] + pub fn tabs(ctx: NativeCallContext, _: &mut TreeApi, tabs: Array) -> RhaiResultOf { + with_call_position(ctx, || build_tabs(tabs, 0)) + } + + /// Build a tabs container with an explicit active tab. + #[rhai_fn(return_raw, name = "tabs_with_active")] + pub fn tabs_with_active( + ctx: NativeCallContext, + _: &mut TreeApi, + tabs: Array, + active: i64, + ) -> RhaiResultOf { + with_call_position(ctx, || build_tabs(tabs, parse_index(active, "active tab")?)) + } + + /// Build a horizontal split. + #[rhai_fn(return_raw, name = "split_h")] + pub fn split_h( + ctx: NativeCallContext, + _: &mut TreeApi, + children: Array, + ) -> RhaiResultOf { + with_call_position(ctx, || { build_split(SplitDirection::Horizontal, children, Vec::new()) - }, - ); - engine.register_fn( - "split_v", - |_: &mut TreeApi, children: Array| -> RhaiResult { + }) + } + + /// Build a vertical split. + #[rhai_fn(return_raw, name = "split_v")] + pub fn split_v( + ctx: NativeCallContext, + _: &mut TreeApi, + children: Array, + ) -> RhaiResultOf { + with_call_position(ctx, || { build_split(SplitDirection::Vertical, children, Vec::new()) - }, - ); - engine.register_fn( - "split", - |_: &mut TreeApi, direction: ImmutableString, children: Array| -> RhaiResult { - build_split( - parse_split_direction(direction.as_str())?, - children, - Vec::new(), - ) - }, - ); - engine.register_fn( - "split", - |_: &mut TreeApi, - direction: ImmutableString, - children: Array, - sizes: Array| - -> RhaiResult { + }) + } + + /// Build a split with an explicit direction string. + #[rhai_fn(return_raw, name = "split")] + pub fn split( + ctx: NativeCallContext, + _: &mut TreeApi, + direction: &str, + children: Array, + ) -> RhaiResultOf { + with_call_position(ctx, || { + build_split(parse_split_direction(direction)?, children, Vec::new()) + }) + } + + /// Build a split with explicit sizes for each child. + #[rhai_fn(return_raw, name = "split")] + pub fn split_with_sizes( + ctx: NativeCallContext, + _: &mut TreeApi, + direction: &str, + children: Array, + sizes: Array, + ) -> RhaiResultOf { + with_call_position(ctx, || { build_split( - parse_split_direction(direction.as_str())?, + parse_split_direction(direction)?, children, parse_sizes(sizes)?, ) - }, - ); + }) + } } -fn register_mux_api(engine: &mut Engine) { - engine.register_fn("current_session", |mux: &mut MuxApi| -> Dynamic { - dynamic_option_custom(mux.context.current_session()) - }); - engine.register_fn("current_node", |mux: &mut MuxApi| -> Dynamic { - dynamic_option_custom(mux.context.current_node()) - }); - engine.register_fn("current_buffer", |mux: &mut MuxApi| -> Dynamic { - dynamic_option_custom(mux.context.current_buffer()) - }); - engine.register_fn("current_floating", |mux: &mut MuxApi| -> Dynamic { - dynamic_option_custom(mux.context.current_floating()) - }); - engine.register_fn("sessions", |mux: &mut MuxApi| -> Array { - mux.context - .sessions() - .into_iter() - .map(Dynamic::from) - .collect() - }); - engine.register_fn("visible_buffers", |mux: &mut MuxApi| -> Array { - mux.context - .visible_buffers() - .into_iter() - .map(Dynamic::from) - .collect() - }); - engine.register_fn("detached_buffers", |mux: &mut MuxApi| -> Array { - mux.context - .detached_buffers() - .into_iter() +#[allow(dead_code)] +#[export_module] +mod documented_system_api { + use super::{Dynamic, SystemApi, which}; + + /// Read an environment variable, if it is set. + /// + /// ReturnType: `string | ()` + #[rhai_fn(name = "env")] + pub fn env(_: &mut SystemApi, name: &str) -> Dynamic { + std::env::var(name) + .ok() .map(Dynamic::from) - .collect() - }); - engine.register_fn( - "find_buffer", - |mux: &mut MuxApi, buffer_id: i64| -> RhaiResult { - Ok(dynamic_option_custom( - mux.context.find_buffer(parse_buffer_id(buffer_id)?), - )) - }, - ); - engine.register_fn( - "find_node", - |mux: &mut MuxApi, node_id: i64| -> RhaiResult { - Ok(dynamic_option_custom( - mux.context.find_node(parse_node_id(node_id)?), - )) - }, - ); - engine.register_fn( - "find_floating", - |mux: &mut MuxApi, floating_id: i64| -> RhaiResult { - Ok(dynamic_option_custom( - mux.context.find_floating(parse_floating_id(floating_id)?), - )) - }, - ); -} + .unwrap_or(Dynamic::UNIT) + } -fn register_system_api(engine: &mut Engine) { - engine.register_fn( - "env", - |_: &mut SystemApi, name: ImmutableString| -> Dynamic { - std::env::var(name.as_str()) - .ok() - .map(Dynamic::from) - .unwrap_or(Dynamic::UNIT) - }, - ); - engine.register_fn( - "which", - |_: &mut SystemApi, name: ImmutableString| -> Dynamic { - which(name.as_str()) - .map(|path| Dynamic::from(path.display().to_string())) - .unwrap_or(Dynamic::UNIT) - }, - ); - engine.register_fn("now", |_: &mut SystemApi| -> i64 { + /// Resolve an executable from `PATH`, if it is found. + /// + /// ReturnType: `string | ()` + #[rhai_fn(name = "which")] + pub fn which_fn(_: &mut SystemApi, name: &str) -> Dynamic { + which(name) + .map(|path| Dynamic::from(path.display().to_string())) + .unwrap_or(Dynamic::UNIT) + } + + /// Return the current Unix timestamp in seconds. + #[rhai_fn(name = "now")] + pub fn now(_: &mut SystemApi) -> i64 { std::time::SystemTime::now() .duration_since(std::time::UNIX_EPOCH) .map(|duration| i64::try_from(duration.as_secs()).unwrap_or(i64::MAX)) .unwrap_or_default() - }); + } } -fn register_ui_api(engine: &mut Engine) { - engine.register_fn("segment", |_: &mut UiApi, text: ImmutableString| { +#[allow(dead_code)] +#[export_module] +mod documented_ui_api { + use super::{ + Array, BarSegment, BarSpec, Map, NativeCallContext, StyleSpec, UiApi, parse_bar_segments, + parse_segment_options, with_call_position, + }; + + /// Create a [`BarSegment`] from a [`UiApi`] receiver and text using default styling. + /// + /// `segment(_: UiApi, text: String) -> BarSegment` produces plain text with default + /// [`StyleSpec`] values and no click target. + #[rhai_fn(name = "segment")] + pub fn segment(_: &mut UiApi, text: &str) -> BarSegment { BarSegment { - text: text.to_string(), + text: text.to_owned(), style: StyleSpec::default(), target: None, } - }); - engine.register_fn( - "segment", - |_: &mut UiApi, text: ImmutableString, options: Map| -> RhaiResult { + } + + /// Create a [`BarSegment`] from a [`UiApi`] receiver, text, and an `options: Map`. + /// + /// `segment(_: UiApi, text: String, options: Map) -> BarSegment` supports `fg`, `bg`, + /// `bold`, `italic`, `underline`, `dim`, and `target` keys to override styling and attach an + /// optional interaction target. `dim` is a boolean that renders the text with reduced + /// intensity for a muted appearance. + #[rhai_fn(return_raw, name = "segment")] + pub fn segment_with_options( + ctx: NativeCallContext, + _: &mut UiApi, + text: &str, + options: Map, + ) -> RhaiResultOf { + with_call_position(ctx, || { let (style, target) = parse_segment_options(options)?; Ok(BarSegment { - text: text.to_string(), + text: text.to_owned(), style, target, }) - }, - ); - engine.register_fn( - "bar", - |_: &mut UiApi, left: Array, center: Array, right: Array| -> RhaiResult { + }) + } + + /// Build a full bar specification from left, center, and right segments. + #[rhai_fn(return_raw, name = "bar")] + pub fn bar( + ctx: NativeCallContext, + _: &mut UiApi, + left: Array, + center: Array, + right: Array, + ) -> RhaiResultOf { + with_call_position(ctx, || { Ok(BarSpec { left: parse_bar_segments(left)?, center: parse_bar_segments(center)?, right: parse_bar_segments(right)?, }) - }, - ); + }) + } } -fn register_theme_runtime_api(engine: &mut Engine) { - engine.register_fn( - "color", - |theme: &mut ThemeRuntimeApi, name: ImmutableString| -> Dynamic { - theme - .theme - .palette - .get(name.as_str()) - .copied() - .map(Dynamic::from) - .unwrap_or(Dynamic::UNIT) - }, - ); +#[allow(dead_code)] +#[export_module] +mod documented_theme_runtime_api { + use super::{Dynamic, ThemeRuntimeApi}; + + /// Read a named color from the active runtime palette, if it exists. + /// + /// ReturnType: `RgbColor | ()` + #[rhai_fn(name = "color")] + pub fn color(theme: &mut ThemeRuntimeApi, name: &str) -> Dynamic { + theme + .theme + .palette + .get(name) + .copied() + .map(Dynamic::from) + .unwrap_or(Dynamic::UNIT) + } } fn build_split( direction: SplitDirection, children: Array, sizes: Vec, -) -> RhaiResult { +) -> ScriptResult { let children = parse_tree_array(children)?; if children.is_empty() { return Err(runtime_error("split children cannot be empty")); @@ -1115,21 +1900,14 @@ fn build_split( }) } -fn build_tabs(tabs: Array, active: usize) -> RhaiResult { +fn build_tabs(tabs: Array, active: usize) -> ScriptResult { let tabs = parse_tabs(tabs)?; TabsSpec::try_new(tabs, active) .map(TreeSpec::Tabs) .map_err(runtime_error) } -fn parse_tabs_tree(tree: TreeSpec) -> RhaiResult { - match tree { - TreeSpec::Tabs(tabs) => TabsSpec::try_new(tabs.tabs, tabs.active).map_err(runtime_error), - _ => Err(runtime_error("expected a tree.tabs(...) spec")), - } -} - -fn parse_tabs(tabs: Array) -> RhaiResult> { +fn parse_tabs(tabs: Array) -> ScriptResult> { let mut parsed = Vec::with_capacity(tabs.len()); for tab in tabs { let Some(tab) = tab.try_cast::() else { @@ -1140,7 +1918,7 @@ fn parse_tabs(tabs: Array) -> RhaiResult> { Ok(parsed) } -fn parse_tree_array(children: Array) -> RhaiResult> { +fn parse_tree_array(children: Array) -> ScriptResult> { let mut parsed = Vec::with_capacity(children.len()); for child in children { let Some(tree) = child.try_cast::() else { @@ -1151,7 +1929,7 @@ fn parse_tree_array(children: Array) -> RhaiResult> { Ok(parsed) } -fn parse_action_array(actions: Array) -> RhaiResult> { +fn parse_action_array(actions: Array) -> ScriptResult> { let mut parsed = Vec::with_capacity(actions.len()); for action in actions { let Some(action) = action.try_cast::() else { @@ -1162,7 +1940,7 @@ fn parse_action_array(actions: Array) -> RhaiResult> { Ok(parsed) } -fn parse_bar_segments(segments: Array) -> RhaiResult> { +fn parse_bar_segments(segments: Array) -> ScriptResult> { let mut parsed = Vec::with_capacity(segments.len()); for segment in segments { let Some(segment) = segment.try_cast::() else { @@ -1173,16 +1951,23 @@ fn parse_bar_segments(segments: Array) -> RhaiResult> { Ok(parsed) } -fn parse_buffer_spawn(command: Array, mut options: Map) -> RhaiResult { - Ok(BufferSpawnSpec { +fn parse_buffer_spawn(command: Array, mut options: Map) -> ScriptResult { + let parsed = BufferSpawnSpec { title: parse_optional_string(options.remove("title"))?, command: parse_string_array(Dynamic::from(command))?, cwd: parse_optional_string(options.remove("cwd"))?, env: parse_string_map(options.remove("env"))?, - }) + }; + if !options.is_empty() { + return Err(runtime_error(format!( + "unknown buffer_spawn option(s): {}", + unexpected_option_keys(&options) + ))); + } + Ok(parsed) } -fn parse_floating_spec(tree: TreeSpec, options: Map) -> RhaiResult { +fn parse_floating_spec(tree: TreeSpec, options: Map) -> ScriptResult { let options = parse_floating_options(options)?; Ok(FloatingSpec { tree, @@ -1200,8 +1985,8 @@ struct ParsedFloatingOptions { close_on_empty: bool, } -fn parse_floating_options(mut options: Map) -> RhaiResult { - Ok(ParsedFloatingOptions { +fn parse_floating_options(mut options: Map) -> ScriptResult { + let parsed = ParsedFloatingOptions { geometry: FloatingGeometrySpec { width: parse_floating_size(options.remove("width"))? .unwrap_or(FloatingSize::Percent(50)), @@ -1215,11 +2000,18 @@ fn parse_floating_options(mut options: Map) -> RhaiResult title: parse_optional_string(options.remove("title"))?, focus: parse_bool_field(options.remove("focus"))?.unwrap_or(true), close_on_empty: parse_bool_field(options.remove("close_on_empty"))?.unwrap_or(true), - }) + }; + if !options.is_empty() { + return Err(runtime_error(format!( + "unknown floating option(s): {}", + unexpected_option_keys(&options) + ))); + } + Ok(parsed) } -fn parse_segment_options(mut options: Map) -> RhaiResult<(StyleSpec, Option)> { - Ok(( +fn parse_segment_options(mut options: Map) -> ScriptResult<(StyleSpec, Option)> { + let parsed = ( StyleSpec { fg: parse_optional_color(options.remove("fg"))?, bg: parse_optional_color(options.remove("bg"))?, @@ -1229,10 +2021,23 @@ fn parse_segment_options(mut options: Map) -> RhaiResult<(StyleSpec, Option String { + let mut keys = options.keys().map(ToString::to_string).collect::>(); + keys.sort(); + keys.join(", ") } -fn parse_bar_target(value: Option) -> RhaiResult> { +fn parse_bar_target(value: Option) -> ScriptResult> { let Some(value) = value else { return Ok(None); }; @@ -1243,22 +2048,29 @@ fn parse_bar_target(value: Option) -> RhaiResult> { return Err(runtime_error("bar target must be a map")); }; let kind = parse_required_string(&mut target, "kind")?; - match kind.as_str() { - "tab" => Ok(Some(BarTarget::Tab { + let parsed = match kind.as_str() { + "tab" => BarTarget::Tab { tabs_node_id: parse_node_id(parse_required_i64(&mut target, "tabs_node_id")?)?, index: parse_index(parse_required_i64(&mut target, "index")?, "target index")?, - })), - "floating" => Ok(Some(BarTarget::Floating { + }, + "floating" => BarTarget::Floating { floating_id: parse_floating_id(parse_required_i64(&mut target, "floating_id")?)?, - })), - "buffer" => Ok(Some(BarTarget::Buffer { + }, + "buffer" => BarTarget::Buffer { buffer_id: parse_buffer_id(parse_required_i64(&mut target, "buffer_id")?)?, - })), - _ => Err(runtime_error(format!("unknown bar target kind '{kind}'"))), + }, + _ => return Err(runtime_error(format!("unknown bar target kind '{kind}'"))), + }; + if !target.is_empty() { + return Err(runtime_error(format!( + "unknown bar target option(s): {}", + unexpected_option_keys(&target) + ))); } + Ok(Some(parsed)) } -fn parse_optional_color(value: Option) -> RhaiResult> { +fn parse_optional_color(value: Option) -> ScriptResult> { let Some(value) = value else { return Ok(None); }; @@ -1271,7 +2083,7 @@ fn parse_optional_color(value: Option) -> RhaiResult> .ok_or_else(|| runtime_error("expected a color value")) } -fn parse_sizes(values: Array) -> RhaiResult> { +fn parse_sizes(values: Array) -> ScriptResult> { let mut parsed = Vec::with_capacity(values.len()); for value in values { let Some(value) = value.try_cast::() else { @@ -1282,7 +2094,7 @@ fn parse_sizes(values: Array) -> RhaiResult> { Ok(parsed) } -fn parse_string_array(value: Dynamic) -> RhaiResult> { +fn parse_string_array(value: Dynamic) -> ScriptResult> { let Some(array) = value.try_cast::() else { return Err(runtime_error("expected an array of strings")); }; @@ -1298,7 +2110,7 @@ fn parse_string_array(value: Dynamic) -> RhaiResult> { fn parse_string_map( value: Option, -) -> RhaiResult> { +) -> ScriptResult> { let Some(value) = value else { return Ok(Default::default()); }; @@ -1318,7 +2130,7 @@ fn parse_string_map( Ok(parsed) } -fn parse_optional_string(value: Option) -> RhaiResult> { +fn parse_optional_string(value: Option) -> ScriptResult> { let Some(value) = value else { return Ok(None); }; @@ -1331,12 +2143,12 @@ fn parse_optional_string(value: Option) -> RhaiResult> { Ok(Some(value.to_string())) } -fn parse_required_string(options: &mut Map, key: &str) -> RhaiResult { +fn parse_required_string(options: &mut Map, key: &str) -> ScriptResult { parse_optional_string(options.remove(key))? .ok_or_else(|| runtime_error(format!("missing '{key}' field"))) } -fn parse_required_i64(options: &mut Map, key: &str) -> RhaiResult { +fn parse_required_i64(options: &mut Map, key: &str) -> ScriptResult { let value = options .remove(key) .ok_or_else(|| runtime_error(format!("missing '{key}' field")))?; @@ -1345,7 +2157,7 @@ fn parse_required_i64(options: &mut Map, key: &str) -> RhaiResult { .ok_or_else(|| runtime_error(format!("'{key}' must be an integer"))) } -fn parse_bool_field(value: Option) -> RhaiResult> { +fn parse_bool_field(value: Option) -> ScriptResult> { let Some(value) = value else { return Ok(None); }; @@ -1358,7 +2170,7 @@ fn parse_bool_field(value: Option) -> RhaiResult> { .ok_or_else(|| runtime_error("expected a boolean value")) } -fn parse_i16_field(value: Option, label: &str) -> RhaiResult> { +fn parse_i16_field(value: Option, label: &str) -> ScriptResult> { let Some(value) = value else { return Ok(None); }; @@ -1373,7 +2185,7 @@ fn parse_i16_field(value: Option, label: &str) -> RhaiResult) -> RhaiResult> { +fn parse_floating_size(value: Option) -> ScriptResult> { let Some(value) = value else { return Ok(None); }; @@ -1405,7 +2217,7 @@ fn parse_floating_size(value: Option) -> RhaiResult) -> RhaiResult> { +fn parse_floating_anchor(value: Option) -> ScriptResult> { let Some(value) = value else { return Ok(None); }; @@ -1426,7 +2238,7 @@ fn parse_floating_anchor(value: Option) -> RhaiResult RhaiResult> { +fn parse_bytes(bytes: Array) -> ScriptResult> { let mut parsed = Vec::with_capacity(bytes.len()); for byte in bytes { let Some(value) = byte.try_cast::() else { @@ -1439,49 +2251,49 @@ fn parse_bytes(bytes: Array) -> RhaiResult> { Ok(parsed) } -fn parse_count(value: i64, label: &str) -> RhaiResult { +fn parse_count(value: i64, label: &str) -> ScriptResult { if value < 0 { return Err(runtime_error(format!("{label} must be zero or greater"))); } usize::try_from(value).map_err(|_| runtime_error(format!("{label} is too large"))) } -fn parse_amount(value: i64, label: &str) -> RhaiResult { +fn parse_amount(value: i64, label: &str) -> ScriptResult { if value <= 0 { return Err(runtime_error(format!("{label} must be greater than zero"))); } u16::try_from(value).map_err(|_| runtime_error(format!("{label} is too large"))) } -fn parse_index(value: i64, label: &str) -> RhaiResult { +fn parse_index(value: i64, label: &str) -> ScriptResult { if value < 0 { return Err(runtime_error(format!("{label} must be zero or greater"))); } usize::try_from(value).map_err(|_| runtime_error(format!("{label} is too large"))) } -fn parse_buffer_id(value: i64) -> RhaiResult { +fn parse_buffer_id(value: i64) -> ScriptResult { if value < 0 { return Err(runtime_error("buffer id must be zero or greater")); } Ok(BufferId(value as u64)) } -fn parse_node_id(value: i64) -> RhaiResult { +fn parse_node_id(value: i64) -> ScriptResult { if value < 0 { return Err(runtime_error("node id must be zero or greater")); } Ok(NodeId(value as u64)) } -fn parse_floating_id(value: i64) -> RhaiResult { +fn parse_floating_id(value: i64) -> ScriptResult { if value < 0 { return Err(runtime_error("floating id must be zero or greater")); } Ok(FloatingId(value as u64)) } -fn parse_notify_level(value: &str) -> RhaiResult { +fn parse_notify_level(value: &str) -> ScriptResult { match value { "info" => Ok(NotifyLevel::Info), "warn" => Ok(NotifyLevel::Warn), @@ -1490,7 +2302,7 @@ fn parse_notify_level(value: &str) -> RhaiResult { } } -fn parse_split_direction(value: &str) -> RhaiResult { +fn parse_split_direction(value: &str) -> ScriptResult { match value.to_ascii_lowercase().as_str() { "h" | "horizontal" => Ok(SplitDirection::Horizontal), "v" | "vertical" => Ok(SplitDirection::Vertical), @@ -1514,10 +2326,6 @@ fn dynamic_u32(value: u32) -> Dynamic { Dynamic::from(i64::from(value)) } -fn dynamic_usize(value: usize) -> Dynamic { - Dynamic::from(i64::try_from(value).unwrap_or(i64::MAX)) -} - fn rect_map(rect: Rect) -> Map { Map::from_iter([ ("x".into(), Dynamic::from(i64::from(rect.origin.x))), @@ -1586,13 +2394,31 @@ fn which(name: &str) -> Option { None } +fn with_call_position( + ctx: NativeCallContext<'_>, + build: impl FnOnce() -> RhaiResultOf, +) -> RhaiResultOf { + let position = ctx.call_position(); + build().map_err(|mut error| { + error.set_position(position); + error + }) +} + fn runtime_error(message: impl Into) -> Box { - EvalAltResult::ErrorRuntime(message.into().into(), rhai::Position::NONE).into() + runtime_error_at(message, Position::NONE) +} + +fn runtime_error_at(message: impl Into, position: Position) -> Box { + EvalAltResult::ErrorRuntime(message.into().into(), position).into() } #[cfg(test)] mod tests { - use super::{parse_notify_level, parse_split_direction}; + use super::{ + Dynamic, Map, parse_bar_target, parse_buffer_spawn, parse_notify_level, + parse_split_direction, + }; #[test] fn parse_levels_accepts_draft_names() { @@ -1606,4 +2432,32 @@ mod tests { assert!(parse_split_direction("horizontal").is_ok()); assert!(parse_split_direction("vertical").is_ok()); } + + #[test] + fn parse_buffer_spawn_rejects_unknown_options() { + let command = vec![Dynamic::from("/bin/sh")]; + let mut options = Map::new(); + options.insert("bogus".into(), Dynamic::TRUE); + + let error = parse_buffer_spawn(command, options).expect_err("unknown option should fail"); + assert_eq!( + error.to_string(), + "Runtime error: unknown buffer_spawn option(s): bogus" + ); + } + + #[test] + fn parse_bar_target_rejects_unknown_options() { + let mut target = Map::new(); + target.insert("kind".into(), Dynamic::from("buffer")); + target.insert("buffer_id".into(), Dynamic::from(7_i64)); + target.insert("bogus".into(), Dynamic::TRUE); + + let error = parse_bar_target(Some(Dynamic::from(target))) + .expect_err("unknown target option should fail"); + assert_eq!( + error.to_string(), + "Runtime error: unknown bar target option(s): bogus" + ); + } } diff --git a/crates/embers-client/tests/config_api_docs.rs b/crates/embers-client/tests/config_api_docs.rs new file mode 100644 index 0000000..5d31515 --- /dev/null +++ b/crates/embers-client/tests/config_api_docs.rs @@ -0,0 +1,216 @@ +use std::collections::BTreeMap; +use std::fs; +use std::path::{Path, PathBuf}; + +use embers_client::scripting::{build_mdbook, generate_config_api_docs}; +use tempfile::tempdir; + +#[test] +fn generated_docs_cover_representative_exports() -> Result<(), Box> { + let tempdir = tempdir().unwrap(); + generate_config_api_docs(tempdir.path())?; + + let action = fs::read_to_string(tempdir.path().join("action.md"))?; + let registration_action = fs::read_to_string(tempdir.path().join("registration-action.md"))?; + let tree = fs::read_to_string(tempdir.path().join("tree.md"))?; + let registration_tree = fs::read_to_string(tempdir.path().join("registration-tree.md"))?; + let context = fs::read_to_string(tempdir.path().join("context.md"))?; + let buffer_ref = fs::read_to_string(tempdir.path().join("buffer-ref.md"))?; + let mux = fs::read_to_string(tempdir.path().join("mux.md"))?; + let registration_system = fs::read_to_string(tempdir.path().join("registration-system.md"))?; + let registration_ui = fs::read_to_string(tempdir.path().join("registration-ui.md"))?; + let book_toml = fs::read_to_string(tempdir.path().join("book.toml"))?; + let tabs_js = fs::read_to_string(tempdir.path().join("theme/rhai-autodocs-tabs.js"))?; + let rhai_highlight = fs::read_to_string(tempdir.path().join("theme/rhai-highlight.js"))?; + let registration_defs = fs::read_to_string(tempdir.path().join("defs/registration.rhai"))?; + let runtime_defs = fs::read_to_string(tempdir.path().join("defs/runtime.rhai"))?; + + assert!(action.contains("focus_left")); + assert!(registration_action.contains("focus_left")); + assert!(tree.contains("buffer_spawn")); + assert!(registration_tree.contains("buffer_spawn")); + assert!(context.contains("current_buffer")); + assert!(buffer_ref.contains("history_text")); + assert!(mux.contains("current_session")); + assert!(registration_system.contains("env")); + assert!(registration_ui.contains("segment")); + assert!(registration_defs.contains("fn bind(")); + assert!(registration_defs.contains("let action: ActionApi;")); + assert!(registration_defs.contains("let tree: TreeApi;")); + assert!(registration_defs.contains("let ui: UiApi;")); + assert!(registration_defs.contains("let system: SystemApi;")); + assert!(!registration_defs.contains("ScriptResult")); + assert!(!registration_defs.contains("Result<")); + assert!(!registration_defs.contains("EvalAltResult")); + assert!(runtime_defs.contains("let action: ActionApi;")); + assert!(runtime_defs.contains("fn noop(_: ActionApi) -> Action;")); + assert!(runtime_defs.contains("fn enter_mode(_: ActionApi, mode: string) -> Action;")); + assert!(!runtime_defs.contains("Result<")); + assert!(!runtime_defs.contains("EvalAltResult")); + assert!( + runtime_defs + .contains("fn send_keys(_: ActionApi, buffer_id: int, notation: string) -> Action;") + ); + assert!(runtime_defs.contains("fn buffer_spawn(_: TreeApi, command: array) -> TreeSpec;")); + assert!(runtime_defs.contains( + "fn split(_: TreeApi, direction: string, children: array, sizes: array) -> TreeSpec;" + )); + assert!(runtime_defs.contains("fn mode(bar: TabBarContext) ->")); + assert!(runtime_defs.contains("fn index(tab: TabInfo) ->")); + assert!(runtime_defs.contains("fn current_session(mux: MuxApi) ->")); + assert!(buffer_ref.contains("ReturnType: `string | ()`")); + assert!(mux.contains("ReturnType: `SessionRef | ()`")); + assert!(book_toml.contains("theme/rhai-autodocs-tabs.js")); + assert!(book_toml.contains("theme/rhai-highlight.js")); + assert!(tabs_js.contains("window.openTab")); + assert!(rhai_highlight.contains("registerLanguage(\"rhai\"")); + Ok(()) +} + +#[test] +fn checked_in_docs_are_current() -> Result<(), Box> { + let tempdir = tempdir().unwrap(); + generate_config_api_docs(tempdir.path())?; + build_mdbook(tempdir.path())?; + + let generated = read_tree_bytes(tempdir.path())?; + let checked_in = read_tree_bytes(&repo_docs_dir())?; + + if generated != checked_in { + panic!( + "checked-in config docs are stale:\n{}", + summarize_doc_tree_diff(&generated, &checked_in) + ); + } + + let generated_book = read_tree_bytes(&generated_book_dir(tempdir.path()))?; + let checked_in_book = read_tree_bytes(&repo_docs_book_dir())?; + + if generated_book != checked_in_book { + panic!( + "checked-in config book is stale:\n{}", + summarize_doc_tree_diff(&generated_book, &checked_in_book) + ); + } + Ok(()) +} + +fn repo_docs_dir() -> PathBuf { + PathBuf::from(env!("CARGO_MANIFEST_DIR")).join("../../docs/config-api") +} + +fn repo_docs_book_dir() -> PathBuf { + PathBuf::from(env!("CARGO_MANIFEST_DIR")).join("../../docs/config-api-book") +} + +fn generated_book_dir(output_dir: &Path) -> PathBuf { + output_dir.with_file_name(format!( + "{}-book", + output_dir + .file_name() + .and_then(|name| name.to_str()) + .unwrap_or("config-api") + )) +} + +fn read_tree_bytes(root: &Path) -> std::io::Result>> { + let mut entries = BTreeMap::new(); + visit_bytes(root, root, &mut entries)?; + Ok(entries) +} + +fn visit_bytes( + root: &Path, + path: &Path, + entries: &mut BTreeMap>, +) -> std::io::Result<()> { + for entry in fs::read_dir(path)? { + let entry = entry?; + let path = entry.path(); + if path.is_dir() { + visit_bytes(root, &path, entries)?; + continue; + } + let relative = path.strip_prefix(root).map_err(|error| { + std::io::Error::other(format!( + "failed to strip root {} from {}: {error}", + root.display(), + path.display() + )) + })?; + let relative = relative.to_string_lossy().replace('\\', "/"); + entries.insert(relative, fs::read(&path)?); + } + Ok(()) +} + +fn summarize_doc_tree_diff( + generated: &BTreeMap>, + checked_in: &BTreeMap>, +) -> String { + let mut summary = Vec::new(); + + for path in generated.keys() { + if !checked_in.contains_key(path) { + summary.push(format!("extra generated file: {path}")); + } + } + + for path in checked_in.keys() { + if !generated.contains_key(path) { + summary.push(format!("missing generated file: {path}")); + } + } + + for (path, generated_content) in generated { + let Some(checked_in_content) = checked_in.get(path) else { + continue; + }; + if generated_content == checked_in_content { + continue; + } + let detail = first_difference(generated_content, checked_in_content) + .unwrap_or_else(|| "content differs".to_owned()); + summary.push(format!("changed file: {path} ({detail})")); + } + + if summary.is_empty() { + "content differs, but no specific file-level summary was produced".to_owned() + } else { + summary.join("\n") + } +} + +fn first_difference(generated: &[u8], checked_in: &[u8]) -> Option { + match ( + std::str::from_utf8(generated), + std::str::from_utf8(checked_in), + ) { + (Ok(generated), Ok(checked_in)) => { + for (index, (generated_line, checked_in_line)) in + generated.lines().zip(checked_in.lines()).enumerate() + { + if generated_line != checked_in_line { + let line = index + 1; + return Some(format!( + "first differing line {line}: generated=`{}` checked_in=`{}`", + generated_line, checked_in_line + )); + } + } + + let generated_lines = generated.lines().count(); + let checked_in_lines = checked_in.lines().count(); + (generated_lines != checked_in_lines).then(|| { + format!( + "line count differs: generated={generated_lines} checked_in={checked_in_lines}" + ) + }) + } + _ => Some(format!( + "binary content differs: generated={} bytes checked_in={} bytes", + generated.len(), + checked_in.len() + )), + } +} diff --git a/crates/embers-client/tests/configured_client.rs b/crates/embers-client/tests/configured_client.rs index fd2cedd..7729ed9 100644 --- a/crates/embers-client/tests/configured_client.rs +++ b/crates/embers-client/tests/configured_client.rs @@ -1,5 +1,3 @@ -mod support; - use std::collections::BTreeMap; use std::fs; use std::path::Path; @@ -18,7 +16,7 @@ use embers_protocol::{ }; use tempfile::tempdir; -use support::{FOCUSED_LEAF_ID, LEFT_LEAF_ID, SESSION_ID, demo_state, root_focus_state}; +use crate::support::{FOCUSED_LEAF_ID, LEFT_LEAF_ID, SESSION_ID, demo_state, root_focus_state}; const SECOND_SESSION_ID: SessionId = SessionId(2); const SECOND_ROOT_ID: NodeId = NodeId(200); diff --git a/crates/embers-client/tests/context.rs b/crates/embers-client/tests/context.rs index c0c1608..4a87d57 100644 --- a/crates/embers-client/tests/context.rs +++ b/crates/embers-client/tests/context.rs @@ -1,9 +1,7 @@ -mod support; - use embers_client::{Context, PresentationModel, TabBarContext}; use embers_core::Size; -use support::{NESTED_TABS_ID, ROOT_SPLIT_ID, SESSION_ID, demo_state}; +use crate::support::{NESTED_TABS_ID, ROOT_SPLIT_ID, SESSION_ID, demo_state}; const TEST_SIZE: Size = Size { width: 40, diff --git a/crates/embers-client/tests/controller.rs b/crates/embers-client/tests/controller.rs index 2d3e515..f9cff10 100644 --- a/crates/embers-client/tests/controller.rs +++ b/crates/embers-client/tests/controller.rs @@ -1,10 +1,8 @@ -mod support; - use embers_client::{Controller, KeyEvent, PresentationModel}; use embers_core::{RequestId, Size}; use embers_protocol::{ClientMessage, FloatingRequest, InputRequest, NodeRequest}; -use support::{ +use crate::support::{ FLOATING_ID, FOCUSED_BUFFER_ID, LEFT_LEAF_ID, NESTED_TABS_ID, ROOT_TABS_ID, SESSION_ID, demo_state, floating_focused_state, root_focus_state, root_split_state, }; diff --git a/crates/embers-client/tests/fixtures/repository_config.rhai b/crates/embers-client/tests/fixtures/repository_config.rhai index 541b5ec..2a197d7 100644 --- a/crates/embers-client/tests/fixtures/repository_config.rhai +++ b/crates/embers-client/tests/fixtures/repository_config.rhai @@ -126,38 +126,6 @@ fn smart_nav_right(ctx) { } } -fn smart_resize_left(ctx) { - if is_nvim_buffer(ctx) { - action.send_bytes_current([27, 104]) - } else { - action.resize_left(3) - } -} - -fn smart_resize_down(ctx) { - if is_nvim_buffer(ctx) { - action.send_bytes_current([27, 106]) - } else { - action.resize_down(3) - } -} - -fn smart_resize_up(ctx) { - if is_nvim_buffer(ctx) { - action.send_bytes_current([27, 107]) - } else { - action.resize_up(3) - } -} - -fn smart_resize_right(ctx) { - if is_nvim_buffer(ctx) { - action.send_bytes_current([27, 108]) - } else { - action.resize_right(3) - } -} - fn split_below(ctx) { // tmux split-window -v creates a top/bottom split. action.split_with("horizontal", shell_tree(ctx, tree, "shell")) @@ -321,10 +289,6 @@ define_action("smart-nav-left", smart_nav_left); define_action("smart-nav-down", smart_nav_down); define_action("smart-nav-up", smart_nav_up); define_action("smart-nav-right", smart_nav_right); -define_action("smart-resize-left", smart_resize_left); -define_action("smart-resize-down", smart_resize_down); -define_action("smart-resize-up", smart_resize_up); -define_action("smart-resize-right", smart_resize_right); define_action("split-below", split_below); define_action("split-right", split_right); define_action("new-shell-tab", new_shell_tab); @@ -340,10 +304,6 @@ bind("normal", "", "smart-nav-left"); bind("normal", "", "smart-nav-down"); bind("normal", "", "smart-nav-up"); bind("normal", "", "smart-nav-right"); -bind("normal", "", "smart-resize-left"); -bind("normal", "", "smart-resize-down"); -bind("normal", "", "smart-resize-up"); -bind("normal", "", "smart-resize-right"); bind("copy", "", "smart-nav-left"); bind("copy", "", "smart-nav-down"); bind("copy", "", "smart-nav-up"); diff --git a/crates/embers-client/tests/integration.rs b/crates/embers-client/tests/integration.rs new file mode 100644 index 0000000..5816d28 --- /dev/null +++ b/crates/embers-client/tests/integration.rs @@ -0,0 +1,14 @@ +mod config_api_docs; +mod config_loading; +mod configured_client; +mod context; +mod controller; +mod e2e; +mod presentation; +mod reducer; +mod renderer; +mod repo_config; +mod script_actions; +mod script_engine; +mod socket_transport; +mod support; diff --git a/crates/embers-client/tests/presentation.rs b/crates/embers-client/tests/presentation.rs index 11b54f2..29e0077 100644 --- a/crates/embers-client/tests/presentation.rs +++ b/crates/embers-client/tests/presentation.rs @@ -1,9 +1,7 @@ -mod support; - use embers_client::PresentationModel; use embers_core::{FloatGeometry, Size, SplitDirection}; -use support::{ +use crate::support::{ FLOATING_BOTTOM_LEAF_ID, FLOATING_ID, FLOATING_TOP_LEAF_ID, FOCUSED_LEAF_ID, LEFT_LEAF_ID, NESTED_TABS_ID, ROOT_BUFFER_LEAF_ID, ROOT_ONLY_SPLIT_ID, ROOT_SPLIT_LEFT_LEAF_ID, ROOT_SPLIT_RIGHT_LEAF_ID, ROOT_TABS_ID, SESSION_ID, demo_state, root_buffer_state, diff --git a/crates/embers-client/tests/renderer.rs b/crates/embers-client/tests/renderer.rs index 4ec696f..b25fd3d 100644 --- a/crates/embers-client/tests/renderer.rs +++ b/crates/embers-client/tests/renderer.rs @@ -1,12 +1,10 @@ -mod support; - use embers_client::{ PresentationModel, Renderer, SearchMatch, SearchState, SelectionKind, SelectionPoint, SelectionState, }; use embers_core::{CursorPosition, CursorShape, CursorState, Size}; -use support::{FOCUSED_BUFFER_ID, FOCUSED_LEAF_ID, SESSION_ID, demo_state}; +use crate::support::{FOCUSED_BUFFER_ID, FOCUSED_LEAF_ID, SESSION_ID, demo_state}; #[test] fn renders_nested_tabs_splits_and_floating_overlay() { diff --git a/crates/embers-client/tests/repo_config.rs b/crates/embers-client/tests/repo_config.rs index 464c369..2c8d61b 100644 --- a/crates/embers-client/tests/repo_config.rs +++ b/crates/embers-client/tests/repo_config.rs @@ -1,5 +1,3 @@ -mod support; - use std::path::PathBuf; use embers_client::{ @@ -9,7 +7,7 @@ use embers_client::{ }; use embers_core::{BufferId, Size, SplitDirection}; -use support::{SESSION_ID, demo_state}; +use crate::support::{SESSION_ID, demo_state}; #[test] fn repository_config_loads_with_current_public_api() { @@ -74,6 +72,7 @@ fn repository_config_bell_handler_moves_hidden_buffer_to_floating() { }, title: Some("build".to_owned()), focus: true, + close_on_empty: true, }] ); } diff --git a/crates/embers-client/tests/script_actions.rs b/crates/embers-client/tests/script_actions.rs index ca64aab..be2d3f6 100644 --- a/crates/embers-client/tests/script_actions.rs +++ b/crates/embers-client/tests/script_actions.rs @@ -1,5 +1,3 @@ -mod support; - use std::collections::BTreeMap; use embers_client::{ @@ -10,7 +8,7 @@ use embers_client::{ }; use embers_core::{BufferId, FloatingId, NodeId, Size, SplitDirection}; -use support::{SESSION_ID, demo_state}; +use crate::support::{SESSION_ID, demo_state}; #[test] fn action_helpers_roundtrip_to_typed_actions() { @@ -18,7 +16,6 @@ fn action_helpers_roundtrip_to_typed_actions() { r#" fn enter_copy_action(ctx) { action.enter_mode("copy") } fn focus_left_action(ctx) { action.focus_left() } - fn resize_right_action(ctx) { action.resize_right(2) } fn select_tab_action(ctx) { action.select_current_tabs(2) } fn split_tree_action(ctx) { action.split_with("horizontal", tree.buffer_current()) } fn replace_current_action(ctx) { action.replace_current_with(tree.buffer_attach(9)) } @@ -32,6 +29,12 @@ fn action_helpers_roundtrip_to_typed_actions() { #{ x: 1, y: 2, width: 30, height: 10, title: "popup" } ) } + fn move_buffer_popup_action(ctx) { + action.move_buffer_to_floating( + 9, + #{ x: 1, y: 2, width: 30, height: 10, close_on_empty: false } + ) + } fn detach_buffer_action(ctx) { action.detach_buffer() } fn kill_buffer_action(ctx) { action.kill_buffer() } fn send_keys_action(ctx) { action.send_keys_current("abc") } @@ -46,13 +49,13 @@ fn action_helpers_roundtrip_to_typed_actions() { define_action("enter-copy", enter_copy_action); define_action("focus-left", focus_left_action); - define_action("resize-right", resize_right_action); define_action("select-tab", select_tab_action); define_action("split-tree", split_tree_action); define_action("replace-current", replace_current_action); define_action("replace-node", replace_node_action); define_action("insert-tab", insert_tab_action); define_action("open-popup", open_popup_action); + define_action("move-buffer-popup", move_buffer_popup_action); define_action("detach-buffer", detach_buffer_action); define_action("kill-buffer", kill_buffer_action); define_action("send-keys", send_keys_action); @@ -84,15 +87,6 @@ fn action_helpers_roundtrip_to_typed_actions() { direction: NavigationDirection::Left, }] ); - assert_eq!( - engine - .run_named_action("resize-right", context.clone()) - .unwrap(), - vec![Action::ResizeDirection { - direction: NavigationDirection::Right, - amount: 2, - }] - ); assert_eq!( engine .run_named_action("select-tab", context.clone()) @@ -161,6 +155,24 @@ fn action_helpers_roundtrip_to_typed_actions() { }, }] ); + assert_eq!( + engine + .run_named_action("move-buffer-popup", context.clone()) + .unwrap(), + vec![Action::MoveBufferToFloating { + buffer_id: BufferId(9), + geometry: FloatingGeometrySpec { + width: FloatingSize::Cells(30), + height: FloatingSize::Cells(10), + anchor: FloatingAnchor::Center, + offset_x: 1, + offset_y: 2, + }, + title: None, + focus: true, + close_on_empty: false, + }] + ); assert_eq!( engine .run_named_action("detach-buffer", context.clone()) @@ -240,66 +252,6 @@ fn action_helpers_roundtrip_to_typed_actions() { ); } -#[test] -fn unsupported_live_executor_actions_fail_when_actions_are_materialized() { - let engine = ScriptEngine::load(&LoadedConfigSource { - origin: ConfigOrigin::BuiltIn, - path: Some("unsupported-actions.rhai".into()), - source: r#" - fn wrap_split_action(ctx) { - action.wrap_current_in_split("vertical", tree.buffer_current()) - } - fn wrap_tabs_action(ctx) { - action.wrap_current_in_tabs(tree.tabs_with_active([ - tree.tab("main", tree.current_node()), - tree.tab("scratch", tree.buffer_empty()) - ], 1)) - } - fn replace_popup_action(ctx) { - action.replace_floating_root(tree.buffer_current()) - } - - define_action("wrap-split", wrap_split_action); - define_action("wrap-tabs", wrap_tabs_action); - define_action("replace-popup", replace_popup_action); - "# - .trim() - .to_owned(), - source_hash: 0, - }) - .unwrap(); - - let error = engine - .run_named_action("wrap-split", demo_context()) - .expect_err("unsupported live actions should fail before execution"); - - let message = error.to_string(); - assert!(message.contains("not supported by the live executor")); - assert!(message.contains("WrapNodeInSplit")); -} - -#[test] -fn unsupported_live_executor_actions_are_rejected_inside_chains() { - let engine = load_engine( - r#" - fn nested(ctx) { - action.chain([ - action.noop(), - action.wrap_current_in_split("vertical", tree.buffer_current()) - ]) - } - - define_action("nested", nested); - "#, - ); - - let error = engine - .run_named_action("nested", demo_context()) - .expect_err("nested unsupported live actions should fail before execution"); - - assert!(error.to_string().contains("WrapNodeInSplit")); -} - #[test] fn action_arrays_preserve_order_and_unit_is_noop() { let engine = load_engine( diff --git a/crates/embers-client/tests/script_engine.rs b/crates/embers-client/tests/script_engine.rs index 210c477..10fbbe0 100644 --- a/crates/embers-client/tests/script_engine.rs +++ b/crates/embers-client/tests/script_engine.rs @@ -1,5 +1,3 @@ -mod support; - use std::path::Path; use embers_client::input::KeyParseError; @@ -10,7 +8,7 @@ use embers_client::{ }; use embers_core::Size; -use support::{SESSION_ID, demo_state}; +use crate::support::{SESSION_ID, demo_state}; #[test] fn loaded_config_debug_snapshot_is_stable() { diff --git a/crates/embers-core/Cargo.toml b/crates/embers-core/Cargo.toml index 705813f..26b475d 100644 --- a/crates/embers-core/Cargo.toml +++ b/crates/embers-core/Cargo.toml @@ -6,6 +6,7 @@ rust-version.workspace = true version.workspace = true [dependencies] +serde.workspace = true thiserror.workspace = true tracing.workspace = true tracing-subscriber.workspace = true diff --git a/crates/embers-core/src/geometry.rs b/crates/embers-core/src/geometry.rs index 8efeb59..a1f8dde 100644 --- a/crates/embers-core/src/geometry.rs +++ b/crates/embers-core/src/geometry.rs @@ -1,4 +1,6 @@ -#[derive(Clone, Copy, Debug, Default, PartialEq, Eq)] +use serde::{Deserialize, Serialize}; + +#[derive(Clone, Copy, Debug, Default, PartialEq, Eq, Serialize, Deserialize)] pub struct PtySize { pub cols: u16, pub rows: u16, @@ -17,19 +19,19 @@ impl PtySize { } } -#[derive(Clone, Copy, Debug, Default, PartialEq, Eq)] +#[derive(Clone, Copy, Debug, Default, PartialEq, Eq, Serialize, Deserialize)] pub struct Point { pub x: i32, pub y: i32, } -#[derive(Clone, Copy, Debug, Default, PartialEq, Eq)] +#[derive(Clone, Copy, Debug, Default, PartialEq, Eq, Serialize, Deserialize)] pub struct Size { pub width: u16, pub height: u16, } -#[derive(Clone, Copy, Debug, Default, PartialEq, Eq)] +#[derive(Clone, Copy, Debug, Default, PartialEq, Eq, Serialize, Deserialize)] pub struct Rect { pub origin: Point, pub size: Size, @@ -44,7 +46,7 @@ impl Rect { } } -#[derive(Clone, Copy, Debug, Default, PartialEq, Eq)] +#[derive(Clone, Copy, Debug, Default, PartialEq, Eq, Serialize, Deserialize)] pub struct FloatGeometry { pub x: u16, pub y: u16, @@ -63,7 +65,7 @@ impl FloatGeometry { } } -#[derive(Clone, Copy, Debug, Default, PartialEq, Eq)] +#[derive(Clone, Copy, Debug, Default, PartialEq, Eq, Serialize, Deserialize)] pub enum SplitDirection { #[default] Horizontal, diff --git a/crates/embers-protocol/Cargo.toml b/crates/embers-protocol/Cargo.toml index 3f7cdd2..864d562 100644 --- a/crates/embers-protocol/Cargo.toml +++ b/crates/embers-protocol/Cargo.toml @@ -1,6 +1,7 @@ [package] name = "embers-protocol" build = "build.rs" +autotests = false edition.workspace = true license.workspace = true rust-version.workspace = true @@ -14,3 +15,7 @@ tokio.workspace = true [dev-dependencies] tokio.workspace = true + +[[test]] +name = "integration" +path = "tests/integration.rs" diff --git a/crates/embers-protocol/schema/embers.fbs b/crates/embers-protocol/schema/embers.fbs index f902ef7..58dfcc0 100644 --- a/crates/embers-protocol/schema/embers.fbs +++ b/crates/embers-protocol/schema/embers.fbs @@ -112,6 +112,7 @@ enum BufferStateWire : ubyte { Created = 0, Running = 1, Exited = 2, + Interrupted = 4, } enum NodeRecordKindWire : ubyte { diff --git a/crates/embers-protocol/src/codec.rs b/crates/embers-protocol/src/codec.rs index 2aef7f9..263f404 100644 --- a/crates/embers-protocol/src/codec.rs +++ b/crates/embers-protocol/src/codec.rs @@ -1554,6 +1554,7 @@ fn encode_buffer_record<'a>( let state = match record.state { BufferRecordState::Created => fb::BufferStateWire::Created, BufferRecordState::Running => fb::BufferStateWire::Running, + BufferRecordState::Interrupted => fb::BufferStateWire::Interrupted, BufferRecordState::Exited => fb::BufferStateWire::Exited, }; @@ -2371,6 +2372,7 @@ fn decode_buffer_record(record: fb::BufferRecord) -> Result BufferRecordState::Created, fb::BufferStateWire::Running => BufferRecordState::Running, + fb::BufferStateWire::Interrupted => BufferRecordState::Interrupted, fb::BufferStateWire::Exited => BufferRecordState::Exited, _ => return Err(ProtocolError::InvalidMessage("unknown buffer state")), }; diff --git a/crates/embers-protocol/src/types.rs b/crates/embers-protocol/src/types.rs index aebc5fc..548efa2 100644 --- a/crates/embers-protocol/src/types.rs +++ b/crates/embers-protocol/src/types.rs @@ -335,6 +335,7 @@ impl ClientMessage { pub enum BufferRecordState { Created, Running, + Interrupted, Exited, } diff --git a/crates/embers-protocol/tests/integration.rs b/crates/embers-protocol/tests/integration.rs new file mode 100644 index 0000000..26b240d --- /dev/null +++ b/crates/embers-protocol/tests/integration.rs @@ -0,0 +1,2 @@ +mod family_round_trip; +mod ping_round_trip; diff --git a/crates/embers-server/Cargo.toml b/crates/embers-server/Cargo.toml index c2a986e..e54dfb3 100644 --- a/crates/embers-server/Cargo.toml +++ b/crates/embers-server/Cargo.toml @@ -1,5 +1,6 @@ [package] name = "embers-server" +autotests = false edition.workspace = true license.workspace = true rust-version.workspace = true @@ -10,9 +11,15 @@ alacritty_terminal = "0.25.1" embers-core = { path = "../embers-core" } embers-protocol = { path = "../embers-protocol" } portable-pty.workspace = true +serde.workspace = true +serde_json.workspace = true tokio.workspace = true tracing.workspace = true [dev-dependencies] proptest.workspace = true tempfile.workspace = true + +[[test]] +name = "integration" +path = "tests/integration.rs" diff --git a/crates/embers-server/src/config.rs b/crates/embers-server/src/config.rs index 674f2f4..782a70a 100644 --- a/crates/embers-server/src/config.rs +++ b/crates/embers-server/src/config.rs @@ -7,6 +7,7 @@ pub const SOCKET_ENV_VAR: &str = "EMBERS_SOCKET"; #[derive(Clone, Debug, PartialEq, Eq)] pub struct ServerConfig { pub socket_path: PathBuf, + pub workspace_path: PathBuf, pub buffer_env: BTreeMap, } @@ -17,8 +18,10 @@ impl ServerConfig { SOCKET_ENV_VAR.to_owned(), socket_path.as_os_str().to_owned(), ); + let workspace_path = socket_path.with_extension("workspace.json"); Self { socket_path, + workspace_path, buffer_env, } } diff --git a/crates/embers-server/src/lib.rs b/crates/embers-server/src/lib.rs index 85615b8..6d2867d 100644 --- a/crates/embers-server/src/lib.rs +++ b/crates/embers-server/src/lib.rs @@ -3,6 +3,7 @@ pub mod state; mod buffer_runtime; mod config; +mod persist; mod protocol; mod server; mod terminal_backend; @@ -11,7 +12,7 @@ pub use buffer_runtime::{BufferRuntimeCallbacks, BufferRuntimeHandle}; pub use config::{SOCKET_ENV_VAR, ServerConfig}; pub use model::{ Buffer, BufferAttachment, BufferState, BufferViewNode, BufferViewState, ExitedBuffer, - FloatingWindow, Node, RunningBuffer, Session, SplitNode, TabEntry, TabsNode, + FloatingWindow, InterruptedBuffer, Node, RunningBuffer, Session, SplitNode, TabEntry, TabsNode, }; pub use server::{Server, ServerHandle}; pub use state::ServerState; diff --git a/crates/embers-server/src/model.rs b/crates/embers-server/src/model.rs index c266daf..f8dc1de 100644 --- a/crates/embers-server/src/model.rs +++ b/crates/embers-server/src/model.rs @@ -37,6 +37,11 @@ pub struct RunningBuffer { pub pid: Option, } +#[derive(Clone, Debug, Default, PartialEq, Eq)] +pub struct InterruptedBuffer { + pub last_known_pid: Option, +} + #[derive(Clone, Debug, PartialEq, Eq)] pub struct ExitedBuffer { pub exit_code: Option, @@ -48,6 +53,7 @@ pub enum BufferState { #[default] Created, Running(RunningBuffer), + Interrupted(InterruptedBuffer), Exited(ExitedBuffer), } diff --git a/crates/embers-server/src/persist.rs b/crates/embers-server/src/persist.rs new file mode 100644 index 0000000..510a678 --- /dev/null +++ b/crates/embers-server/src/persist.rs @@ -0,0 +1,625 @@ +use std::collections::BTreeMap; +use std::ffi::OsStr; +use std::fs::{self, OpenOptions}; +use std::io::Write; +#[cfg(unix)] +use std::os::unix::fs::OpenOptionsExt; +use std::path::{Path, PathBuf}; +use std::time::{Duration, UNIX_EPOCH}; + +use embers_core::{ + ActivityState, BufferId, FloatGeometry, FloatingId, MuxError, NodeId, PtySize, Result, + SessionId, SplitDirection, Timestamp, +}; +use serde::{Deserialize, Serialize}; + +use crate::model::{ + Buffer, BufferAttachment, BufferState, BufferViewNode, BufferViewState, ExitedBuffer, + FloatingWindow, InterruptedBuffer, Node, Session, SplitNode, TabEntry, TabsNode, +}; +use crate::state::ServerState; + +const LEGACY_FORMAT_VERSION: u32 = 0; +pub const CURRENT_FORMAT_VERSION: u32 = 1; + +#[derive(Clone, Debug, Serialize, Deserialize, PartialEq, Eq)] +pub struct PersistedWorkspace { + #[serde(default)] + pub format_version: Option, + pub sessions: Vec, + pub buffers: Vec, + pub nodes: Vec, + pub floating: Vec, + pub next_session_id: u64, + pub next_buffer_id: u64, + pub next_node_id: u64, + pub next_floating_id: u64, +} + +#[derive(Clone, Debug, Serialize, Deserialize, PartialEq, Eq)] +pub struct PersistedSession { + pub id: u64, + pub name: String, + pub root_node: u64, + pub floating: Vec, + pub focused_leaf: Option, + pub focused_floating: Option, + pub created_at_ms: u64, +} + +#[derive(Clone, Debug, Serialize, Deserialize, PartialEq, Eq)] +pub struct PersistedBuffer { + pub id: u64, + pub title: String, + pub command: Vec, + pub cwd: Option, + pub env: BTreeMap, + pub state: PersistedBufferState, + pub attachment: PersistedBufferAttachment, + pub pty_size: PtySize, + pub activity: PersistedActivityState, + pub last_snapshot_seq: u64, + pub created_at_ms: u64, +} + +#[derive(Clone, Debug, Serialize, Deserialize, PartialEq, Eq)] +#[serde(tag = "kind", rename_all = "snake_case")] +pub enum PersistedBufferState { + Created, + Running { + pid: Option, + }, + Interrupted { + last_known_pid: Option, + }, + Exited { + exit_code: Option, + exited_at_ms: u64, + }, +} + +#[derive(Clone, Debug, Serialize, Deserialize, PartialEq, Eq)] +#[serde(tag = "kind", rename_all = "snake_case")] +pub enum PersistedBufferAttachment { + Attached { node_id: u64 }, + Detached, +} + +#[derive(Clone, Debug, Serialize, Deserialize, PartialEq, Eq)] +#[serde(tag = "kind", rename_all = "snake_case")] +pub enum PersistedNode { + BufferView { + id: u64, + session_id: u64, + parent: Option, + buffer_id: u64, + focused: bool, + zoomed: bool, + follow_output: bool, + last_render_size: PtySize, + }, + Split { + id: u64, + session_id: u64, + parent: Option, + direction: PersistedSplitDirection, + children: Vec, + sizes: Vec, + last_focused_descendant: Option, + }, + Tabs { + id: u64, + session_id: u64, + parent: Option, + tabs: Vec, + active: usize, + last_focused_descendant: Option, + }, +} + +#[derive(Clone, Debug, Serialize, Deserialize, PartialEq, Eq)] +pub struct PersistedTabEntry { + pub title: String, + pub child: u64, +} + +#[derive(Clone, Copy, Debug, Serialize, Deserialize, PartialEq, Eq)] +#[serde(rename_all = "snake_case")] +pub enum PersistedSplitDirection { + Horizontal, + Vertical, +} + +#[derive(Clone, Copy, Debug, Serialize, Deserialize, PartialEq, Eq)] +#[serde(rename_all = "snake_case")] +pub enum PersistedActivityState { + Idle, + Activity, + Bell, +} + +#[derive(Clone, Debug, Serialize, Deserialize, PartialEq, Eq)] +pub struct PersistedFloatingWindow { + pub id: u64, + pub session_id: u64, + pub root_node: u64, + pub title: Option, + pub geometry: FloatGeometry, + pub focused: bool, + pub visible: bool, + pub close_on_empty: bool, + pub last_focused_leaf: Option, +} + +pub fn load_workspace(path: &Path) -> Result> { + match fs::read(path) { + Ok(bytes) => { + let persisted: PersistedWorkspace = serde_json::from_slice(&bytes) + .map_err(|error| MuxError::internal(error.to_string()))?; + let persisted = load_current_workspace(persisted)?; + Ok(Some(ServerState::from_persisted(persisted)?)) + } + Err(error) if error.kind() == std::io::ErrorKind::NotFound => Ok(None), + Err(error) => Err(error.into()), + } +} + +pub fn save_workspace(path: &Path, state: &ServerState) -> Result<()> { + if let Some(parent) = path.parent() { + fs::create_dir_all(parent)?; + } + let bytes = serde_json::to_vec_pretty(&state.to_persisted()) + .map_err(|error| MuxError::internal(error.to_string()))?; + let (temp_path, mut file) = open_workspace_temp_file(path)?; + if let Err(error) = file.write_all(&bytes).and_then(|()| file.sync_all()) { + let _ = fs::remove_file(&temp_path); + return Err(error.into()); + } + drop(file); + if let Err(error) = validate_workspace_temp_path(&temp_path) { + let _ = fs::remove_file(&temp_path); + return Err(error); + } + if let Err(error) = fs::rename(&temp_path, path) { + let _ = fs::remove_file(&temp_path); + return Err(error.into()); + } + #[cfg(unix)] + if let Some(parent) = path.parent() { + OpenOptions::new().read(true).open(parent)?.sync_all()?; + } + Ok(()) +} + +fn open_workspace_temp_file(path: &Path) -> Result<(PathBuf, fs::File)> { + const MAX_ATTEMPTS: u32 = 1024; + + let pid = std::process::id(); + for attempt in 0..MAX_ATTEMPTS { + let temp_path = workspace_temp_path(path, pid, attempt); + let mut options = OpenOptions::new(); + options.create_new(true).write(true); + #[cfg(unix)] + { + options.mode(0o600); + } + match options.open(&temp_path) { + Ok(file) => return Ok((temp_path, file)), + Err(error) if error.kind() == std::io::ErrorKind::AlreadyExists => continue, + Err(error) => return Err(error.into()), + } + } + + Err(MuxError::internal(format!( + "failed to allocate a temporary workspace file next to {}", + path.display() + ))) +} + +fn workspace_temp_path(path: &Path, pid: u32, attempt: u32) -> PathBuf { + let file_name = path.file_name().unwrap_or_else(|| OsStr::new("workspace")); + let mut temp_name = file_name.to_os_string(); + temp_name.push(format!(".tmp.{pid}.{attempt}")); + path.with_file_name(temp_name) +} + +fn validate_workspace_temp_path(temp_path: &Path) -> Result<()> { + let metadata = fs::symlink_metadata(temp_path)?; + if metadata.file_type().is_symlink() { + return Err(MuxError::internal(format!( + "refusing to rename symlink temp workspace file {}", + temp_path.display() + ))); + } + if !metadata.is_file() { + return Err(MuxError::internal(format!( + "refusing to rename non-file temp workspace path {}", + temp_path.display() + ))); + } + Ok(()) +} + +fn load_current_workspace(mut workspace: PersistedWorkspace) -> Result { + let version = workspace.format_version.unwrap_or(LEGACY_FORMAT_VERSION); + if version != CURRENT_FORMAT_VERSION { + return migrate_workspace(workspace, version); + } + workspace.format_version = Some(CURRENT_FORMAT_VERSION); + Ok(workspace) +} + +fn migrate_workspace( + mut workspace: PersistedWorkspace, + version: u32, +) -> Result { + match version { + LEGACY_FORMAT_VERSION => { + workspace.format_version = Some(CURRENT_FORMAT_VERSION); + Ok(workspace) + } + _ => Err(MuxError::internal(format!( + "unsupported workspace format version {version}" + ))), + } +} + +pub fn persisted_session(session: &Session) -> PersistedSession { + PersistedSession { + id: session.id.0, + name: session.name.clone(), + root_node: session.root_node.0, + floating: session.floating.iter().map(|id| id.0).collect(), + focused_leaf: session.focused_leaf.map(|id| id.0), + focused_floating: session.focused_floating.map(|id| id.0), + created_at_ms: timestamp_to_millis(session.created_at), + } +} + +pub fn restored_session(session: PersistedSession) -> Result { + Ok(Session { + id: SessionId(session.id), + name: session.name, + root_node: NodeId(session.root_node), + floating: session.floating.into_iter().map(FloatingId).collect(), + focused_leaf: session.focused_leaf.map(NodeId), + focused_floating: session.focused_floating.map(FloatingId), + created_at: timestamp_from_millis(session.created_at_ms)?, + }) +} + +pub fn persisted_buffer(buffer: &Buffer) -> PersistedBuffer { + PersistedBuffer { + id: buffer.id.0, + title: buffer.title.clone(), + command: buffer.command.clone(), + cwd: buffer.cwd.clone(), + env: buffer.env.clone(), + state: persisted_buffer_state(&buffer.state), + attachment: persisted_buffer_attachment(&buffer.attachment), + pty_size: buffer.pty_size, + activity: persisted_activity(buffer.activity), + last_snapshot_seq: buffer.last_snapshot_seq, + created_at_ms: timestamp_to_millis(buffer.created_at), + } +} + +pub fn restored_buffer(buffer: PersistedBuffer) -> Result { + Ok(Buffer { + id: BufferId(buffer.id), + title: buffer.title, + command: buffer.command, + cwd: buffer.cwd, + env: buffer.env, + state: restored_buffer_state(buffer.state)?, + attachment: restored_buffer_attachment(buffer.attachment), + pty_size: buffer.pty_size, + activity: restored_activity(buffer.activity), + last_snapshot_seq: buffer.last_snapshot_seq, + created_at: timestamp_from_millis(buffer.created_at_ms)?, + }) +} + +pub fn persisted_node(node: &Node) -> PersistedNode { + match node { + Node::BufferView(node) => PersistedNode::BufferView { + id: node.id.0, + session_id: node.session_id.0, + parent: node.parent.map(|id| id.0), + buffer_id: node.buffer_id.0, + focused: node.view.focused, + zoomed: node.view.zoomed, + follow_output: node.view.follow_output, + last_render_size: node.view.last_render_size, + }, + Node::Split(node) => PersistedNode::Split { + id: node.id.0, + session_id: node.session_id.0, + parent: node.parent.map(|id| id.0), + direction: persisted_split_direction(node.direction), + children: node.children.iter().map(|id| id.0).collect(), + sizes: node.sizes.clone(), + last_focused_descendant: node.last_focused_descendant.map(|id| id.0), + }, + Node::Tabs(node) => PersistedNode::Tabs { + id: node.id.0, + session_id: node.session_id.0, + parent: node.parent.map(|id| id.0), + tabs: node + .tabs + .iter() + .map(|tab| PersistedTabEntry { + title: tab.title.clone(), + child: tab.child.0, + }) + .collect(), + active: node.active, + last_focused_descendant: node.last_focused_descendant.map(|id| id.0), + }, + } +} + +pub fn restored_node(node: PersistedNode) -> Node { + match node { + PersistedNode::BufferView { + id, + session_id, + parent, + buffer_id, + focused, + zoomed, + follow_output, + last_render_size, + } => Node::BufferView(BufferViewNode { + id: NodeId(id), + session_id: SessionId(session_id), + parent: parent.map(NodeId), + buffer_id: BufferId(buffer_id), + view: BufferViewState { + focused, + zoomed, + follow_output, + last_render_size, + }, + }), + PersistedNode::Split { + id, + session_id, + parent, + direction, + children, + sizes, + last_focused_descendant, + } => Node::Split(SplitNode { + id: NodeId(id), + session_id: SessionId(session_id), + parent: parent.map(NodeId), + direction: restored_split_direction(direction), + children: children.into_iter().map(NodeId).collect(), + sizes, + last_focused_descendant: last_focused_descendant.map(NodeId), + }), + PersistedNode::Tabs { + id, + session_id, + parent, + tabs, + active, + last_focused_descendant, + } => Node::Tabs(TabsNode { + id: NodeId(id), + session_id: SessionId(session_id), + parent: parent.map(NodeId), + tabs: tabs + .into_iter() + .map(|tab| TabEntry { + title: tab.title, + child: NodeId(tab.child), + }) + .collect(), + active, + last_focused_descendant: last_focused_descendant.map(NodeId), + }), + } +} + +pub fn persisted_floating(window: &FloatingWindow) -> PersistedFloatingWindow { + PersistedFloatingWindow { + id: window.id.0, + session_id: window.session_id.0, + root_node: window.root_node.0, + title: window.title.clone(), + geometry: window.geometry, + focused: window.focused, + visible: window.visible, + close_on_empty: window.close_on_empty, + last_focused_leaf: window.last_focused_leaf.map(|id| id.0), + } +} + +pub fn restored_floating(window: PersistedFloatingWindow) -> FloatingWindow { + FloatingWindow { + id: FloatingId(window.id), + session_id: SessionId(window.session_id), + root_node: NodeId(window.root_node), + title: window.title, + geometry: window.geometry, + focused: window.focused, + visible: window.visible, + close_on_empty: window.close_on_empty, + last_focused_leaf: window.last_focused_leaf.map(NodeId), + } +} + +fn persisted_buffer_state(state: &BufferState) -> PersistedBufferState { + match state { + BufferState::Created => PersistedBufferState::Created, + BufferState::Running(running) => PersistedBufferState::Running { pid: running.pid }, + BufferState::Interrupted(interrupted) => PersistedBufferState::Interrupted { + last_known_pid: interrupted.last_known_pid, + }, + BufferState::Exited(exited) => PersistedBufferState::Exited { + exit_code: exited.exit_code, + exited_at_ms: timestamp_to_millis(exited.exited_at), + }, + } +} + +fn restored_buffer_state(state: PersistedBufferState) -> Result { + Ok(match state { + PersistedBufferState::Created => BufferState::Created, + PersistedBufferState::Running { pid } => BufferState::Interrupted(InterruptedBuffer { + last_known_pid: pid, + }), + PersistedBufferState::Interrupted { last_known_pid } => { + BufferState::Interrupted(InterruptedBuffer { last_known_pid }) + } + PersistedBufferState::Exited { + exit_code, + exited_at_ms, + } => BufferState::Exited(ExitedBuffer { + exit_code, + exited_at: timestamp_from_millis(exited_at_ms)?, + }), + }) +} + +fn persisted_buffer_attachment(attachment: &BufferAttachment) -> PersistedBufferAttachment { + match attachment { + BufferAttachment::Attached(node_id) => { + PersistedBufferAttachment::Attached { node_id: node_id.0 } + } + BufferAttachment::Detached => PersistedBufferAttachment::Detached, + } +} + +fn restored_buffer_attachment(attachment: PersistedBufferAttachment) -> BufferAttachment { + match attachment { + PersistedBufferAttachment::Attached { node_id } => { + BufferAttachment::Attached(NodeId(node_id)) + } + PersistedBufferAttachment::Detached => BufferAttachment::Detached, + } +} + +fn persisted_split_direction(direction: SplitDirection) -> PersistedSplitDirection { + match direction { + SplitDirection::Horizontal => PersistedSplitDirection::Horizontal, + SplitDirection::Vertical => PersistedSplitDirection::Vertical, + } +} + +fn restored_split_direction(direction: PersistedSplitDirection) -> SplitDirection { + match direction { + PersistedSplitDirection::Horizontal => SplitDirection::Horizontal, + PersistedSplitDirection::Vertical => SplitDirection::Vertical, + } +} + +fn persisted_activity(activity: ActivityState) -> PersistedActivityState { + match activity { + ActivityState::Idle => PersistedActivityState::Idle, + ActivityState::Activity => PersistedActivityState::Activity, + ActivityState::Bell => PersistedActivityState::Bell, + } +} + +fn restored_activity(activity: PersistedActivityState) -> ActivityState { + match activity { + PersistedActivityState::Idle => ActivityState::Idle, + PersistedActivityState::Activity => ActivityState::Activity, + PersistedActivityState::Bell => ActivityState::Bell, + } +} + +fn timestamp_to_millis(timestamp: Timestamp) -> u64 { + timestamp + .0 + .duration_since(UNIX_EPOCH) + .unwrap_or_default() + .as_millis() + .min(u128::from(u64::MAX)) as u64 +} + +fn timestamp_from_millis(millis: u64) -> Result { + UNIX_EPOCH + .checked_add(Duration::from_millis(millis)) + .map(Timestamp) + .ok_or_else(|| MuxError::internal(format!("timestamp overflow for milliseconds: {millis}"))) +} + +#[cfg(test)] +mod tests { + use super::*; + + use tempfile::tempdir; + + #[test] + fn save_workspace_writes_current_format_version() { + let tempdir = tempdir().expect("tempdir"); + let workspace_path = tempdir.path().join("workspace.json"); + let mut state = ServerState::new(); + let _ = state.create_session("main"); + + save_workspace(&workspace_path, &state).expect("workspace saves"); + + let persisted: PersistedWorkspace = + serde_json::from_slice(&fs::read(&workspace_path).expect("workspace bytes")) + .expect("workspace json"); + assert_eq!(persisted.format_version, Some(CURRENT_FORMAT_VERSION)); + } + + #[test] + fn load_current_workspace_migrates_unversioned_workspace() { + let workspace = PersistedWorkspace { + format_version: None, + sessions: Vec::new(), + buffers: Vec::new(), + nodes: Vec::new(), + floating: Vec::new(), + next_session_id: 1, + next_buffer_id: 1, + next_node_id: 1, + next_floating_id: 1, + }; + + let migrated = load_current_workspace(workspace).expect("legacy workspace migrates"); + assert_eq!(migrated.format_version, Some(CURRENT_FORMAT_VERSION)); + } + + #[test] + fn load_current_workspace_rejects_unknown_format_versions() { + let workspace = PersistedWorkspace { + format_version: Some(CURRENT_FORMAT_VERSION + 1), + sessions: Vec::new(), + buffers: Vec::new(), + nodes: Vec::new(), + floating: Vec::new(), + next_session_id: 1, + next_buffer_id: 1, + next_node_id: 1, + next_floating_id: 1, + }; + + let error = load_current_workspace(workspace).expect_err("unknown version should fail"); + assert_eq!( + error.to_string(), + format!( + "internal error: unsupported workspace format version {}", + CURRENT_FORMAT_VERSION + 1 + ) + ); + } + + #[test] + fn restored_running_buffers_become_interrupted() { + let state = restored_buffer_state(PersistedBufferState::Running { pid: Some(42) }) + .expect("state restores"); + assert_eq!( + state, + BufferState::Interrupted(InterruptedBuffer { + last_known_pid: Some(42), + }) + ); + } +} diff --git a/crates/embers-server/src/protocol.rs b/crates/embers-server/src/protocol.rs index 9f0ae37..e907b88 100644 --- a/crates/embers-server/src/protocol.rs +++ b/crates/embers-server/src/protocol.rs @@ -22,6 +22,11 @@ pub fn buffer_record(buffer: &Buffer) -> BufferRecord { let (state, pid, exit_code) = match &buffer.state { BufferState::Created => (BufferRecordState::Created, None, None), BufferState::Running(running) => (BufferRecordState::Running, running.pid, None), + BufferState::Interrupted(interrupted) => ( + BufferRecordState::Interrupted, + interrupted.last_known_pid, + None, + ), BufferState::Exited(exited) => (BufferRecordState::Exited, None, exited.exit_code), }; diff --git a/crates/embers-server/src/server.rs b/crates/embers-server/src/server.rs index 8f955e1..314d898 100644 --- a/crates/embers-server/src/server.rs +++ b/crates/embers-server/src/server.rs @@ -1,11 +1,11 @@ -use std::collections::BTreeMap; +use std::collections::{BTreeMap, BTreeSet}; use std::ffi::OsString; use std::fs; #[cfg(unix)] use std::os::unix::fs::PermissionsExt; use std::path::{Path, PathBuf}; -use std::sync::Arc; -use std::sync::atomic::{AtomicU64, Ordering}; +use std::sync::atomic::{AtomicBool, AtomicU64, AtomicUsize, Ordering}; +use std::sync::{Arc, Mutex as StdMutex}; use embers_core::{ BufferId, ErrorCode, MuxError, PtySize, RequestId, Result, WireError, request_span, @@ -22,10 +22,11 @@ use embers_protocol::{ }; use tokio::net::UnixListener; use tokio::net::unix::{OwnedReadHalf, OwnedWriteHalf}; -use tokio::sync::{Mutex, mpsc, oneshot}; +use tokio::sync::{Mutex, Notify, mpsc, oneshot, watch}; use tokio::task::JoinHandle; use tracing::{debug, error, info}; +use crate::persist::{load_workspace, save_workspace}; use crate::protocol::{buffer_record, floating_record, session_record, session_snapshot}; use crate::{ AlacrittyTerminalBackend, BackendDamage, BufferAttachment, BufferRuntimeCallbacks, @@ -48,10 +49,16 @@ impl Server { std::fs::remove_file(&self.config.socket_path)?; } + let restored_state = load_workspace(&self.config.workspace_path)?; let listener = UnixListener::bind(&self.config.socket_path)?; set_socket_permissions(&self.config.socket_path)?; let socket_path = self.config.socket_path.clone(); - let runtime = Arc::new(Runtime::new(self.config.buffer_env.clone())); + let runtime = Arc::new(Runtime::new( + restored_state.unwrap_or_default(), + self.config.workspace_path.clone(), + self.config.buffer_env.clone(), + )); + let shutdown_signal = runtime.shutdown.clone(); let (shutdown_tx, mut shutdown_rx) = oneshot::channel(); let join = tokio::spawn(async move { @@ -73,7 +80,9 @@ impl Server { let write_runtime = runtime.clone(); let write_handle = tokio::spawn(write_loop(writer, outbound_rx)); let read_runtime = runtime.clone(); + let connection_task = runtime.connection_tasks.enter(); let read_handle = tokio::spawn(async move { + let _connection_task = connection_task; if let Err(error) = handle_connection(read_runtime, connection_id, reader, outbound_tx) .await @@ -82,30 +91,41 @@ impl Server { } }); tokio::spawn(async move { + if let Err(error) = read_handle.await { + error!(%error, connection_id, "read_loop panicked"); + } + + write_handle.abort(); match write_handle.await { Ok(Ok(())) => {} Ok(Err(error)) => { error!(%error, connection_id, "write_loop failed"); } + Err(error) if error.is_cancelled() => {} Err(error) => { error!(%error, connection_id, "write_loop panicked"); } } - read_handle.abort(); - let _ = read_handle.await; write_runtime.cleanup_connection(connection_id).await; }); } } } + runtime.shutdown.trigger(); runtime.shutdown_runtimes().await; + runtime.quiesce_state_tasks().await; + if let Err(error) = runtime.persist_workspace().await { + error!(%error, "failed to persist workspace during shutdown"); + return Err(error); + } Ok(()) }); Ok(ServerHandle { socket_path: self.config.socket_path, shutdown: Some(shutdown_tx), + shutdown_signal, join, }) } @@ -115,6 +135,7 @@ impl Server { pub struct ServerHandle { socket_path: PathBuf, shutdown: Option>, + shutdown_signal: ShutdownSignal, join: JoinHandle>, } @@ -124,6 +145,7 @@ impl ServerHandle { } pub async fn shutdown(mut self) -> Result<()> { + self.shutdown_signal.trigger(); if let Some(sender) = self.shutdown.take() { let _ = sender.send(()); } @@ -150,6 +172,47 @@ impl Drop for SocketCleanup { } } +#[derive(Clone)] +struct ShutdownSignal { + inner: Arc, +} + +struct ShutdownSignalInner { + active: AtomicBool, + tx: watch::Sender, +} + +impl std::fmt::Debug for ShutdownSignal { + fn fmt(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { + formatter + .debug_struct("ShutdownSignal") + .field("active", &self.inner.active.load(Ordering::Relaxed)) + .finish() + } +} + +impl ShutdownSignal { + fn new() -> Self { + let (tx, _rx) = watch::channel(false); + Self { + inner: Arc::new(ShutdownSignalInner { + active: AtomicBool::new(false), + tx, + }), + } + } + + fn trigger(&self) { + if !self.inner.active.swap(true, Ordering::AcqRel) { + self.inner.tx.send_replace(true); + } + } + + fn subscribe(&self) -> watch::Receiver { + self.inner.tx.subscribe() + } +} + #[derive(Debug)] struct Subscription { connection_id: u64, @@ -161,11 +224,16 @@ struct Subscription { struct Runtime { state: Mutex, buffer_runtimes: Mutex>, + buffer_shutdown_intents: StdMutex>, buffer_surfaces: Mutex>, + workspace_path: PathBuf, buffer_env: BTreeMap, subscriptions: Mutex>, next_connection_id: AtomicU64, next_subscription_id: AtomicU64, + shutdown: ShutdownSignal, + connection_tasks: TaskCounter, + state_tasks: TaskCounter, } struct BufferSurface { @@ -183,6 +251,66 @@ impl std::fmt::Debug for BufferSurface { } } +#[derive(Clone, Default)] +struct TaskCounter { + inner: Arc, +} + +struct TaskCounterInner { + active: AtomicUsize, + drained: Notify, +} + +impl Default for TaskCounterInner { + fn default() -> Self { + Self { + active: AtomicUsize::new(0), + drained: Notify::new(), + } + } +} + +impl std::fmt::Debug for TaskCounter { + fn fmt(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { + formatter + .debug_struct("TaskCounter") + .field("active", &self.inner.active.load(Ordering::Relaxed)) + .finish() + } +} + +#[must_use] +struct TaskTicket { + inner: Arc, +} + +impl TaskCounter { + fn enter(&self) -> TaskTicket { + self.inner.active.fetch_add(1, Ordering::Relaxed); + TaskTicket { + inner: self.inner.clone(), + } + } + + async fn wait_for_idle(&self) { + loop { + let notified = self.inner.drained.notified(); + if self.inner.active.load(Ordering::Acquire) == 0 { + return; + } + notified.await; + } + } +} + +impl Drop for TaskTicket { + fn drop(&mut self) { + if self.inner.active.fetch_sub(1, Ordering::AcqRel) == 1 { + self.inner.drained.notify_waiters(); + } + } +} + impl BufferSurface { fn new(size: PtySize) -> Self { Self { @@ -240,20 +368,46 @@ impl BufferSurface { } impl Runtime { - fn new(buffer_env: BTreeMap) -> Self { + fn new( + state: ServerState, + workspace_path: PathBuf, + buffer_env: BTreeMap, + ) -> Self { Self { - state: Mutex::new(ServerState::new()), + state: Mutex::new(state), buffer_runtimes: Mutex::new(BTreeMap::new()), + buffer_shutdown_intents: StdMutex::new(BTreeSet::new()), buffer_surfaces: Mutex::new(BTreeMap::new()), + workspace_path, buffer_env, subscriptions: Mutex::new(BTreeMap::new()), next_connection_id: AtomicU64::new(1), next_subscription_id: AtomicU64::new(1), + shutdown: ShutdownSignal::new(), + connection_tasks: TaskCounter::default(), + state_tasks: TaskCounter::default(), } } } impl Runtime { + async fn persist_workspace(&self) -> Result<()> { + let state = self.state.lock().await; + save_workspace(&self.workspace_path, &state) + } + + async fn quiesce_state_tasks(&self) { + self.connection_tasks.wait_for_idle().await; + self.state_tasks.wait_for_idle().await; + } + + fn take_buffer_shutdown_intent(&self, buffer_id: BufferId) -> bool { + self.buffer_shutdown_intents + .lock() + .expect("buffer shutdown intent lock") + .remove(&buffer_id) + } + async fn dispatch_request( self: &Arc, connection_id: u64, @@ -1171,6 +1325,8 @@ impl Runtime { let exit_handle = output_handle.clone(); let output_runtime = self.clone(); let exit_runtime = self.clone(); + let output_tasks = self.state_tasks.clone(); + let exit_tasks = self.state_tasks.clone(); let mut buffer_env = self.buffer_env.clone(); for (key, value) in env_hints { buffer_env.insert(key, OsString::from(value)); @@ -1184,13 +1340,17 @@ impl Runtime { BufferRuntimeCallbacks { on_output: Arc::new(move |buffer_id, bytes| { let runtime = output_runtime.clone(); + let _task = output_tasks.enter(); std::mem::drop(output_handle.spawn(async move { + let _task = _task; runtime.record_buffer_output(buffer_id, bytes).await; })); }), on_exit: Arc::new(move |buffer_id, exit_code| { let runtime = exit_runtime.clone(); + let _task = exit_tasks.enter(); std::mem::drop(exit_handle.spawn(async move { + let _task = _task; runtime.record_buffer_exit(buffer_id, exit_code).await; })); }), @@ -1229,6 +1389,9 @@ impl Runtime { BufferState::Running(_) => Err(MuxError::internal(format!( "buffer {buffer_id} is marked running without an active runtime" ))), + BufferState::Interrupted(_) => Err(MuxError::conflict(format!( + "buffer {buffer_id} was restored without a running runtime" + ))), BufferState::Exited(_) => Err(MuxError::conflict(format!( "buffer {buffer_id} has already exited" ))), @@ -1389,9 +1552,15 @@ impl Runtime { async fn record_buffer_exit(&self, buffer_id: BufferId, exit_code: Option) { let runtime = self.buffer_runtimes.lock().await.remove(&buffer_id); + let should_interrupt = self.take_buffer_shutdown_intent(buffer_id); let updated = { let mut state = self.state.lock().await; - match state.mark_buffer_exited(buffer_id, exit_code) { + let result = if should_interrupt { + state.mark_buffer_interrupted(buffer_id) + } else { + state.mark_buffer_exited(buffer_id, exit_code) + }; + match result { Ok(()) => true, Err(error) => { debug!(%buffer_id, %error, "buffer exited after state cleanup"); @@ -1415,13 +1584,20 @@ impl Runtime { } async fn shutdown_runtimes(&self) { - let runtimes: Vec<_> = self - .buffer_runtimes - .lock() - .await - .values() - .cloned() - .collect(); + let runtimes: Vec<_> = { + let runtimes = self.buffer_runtimes.lock().await; + let mut shutdown_intents = self + .buffer_shutdown_intents + .lock() + .expect("buffer shutdown intent lock"); + runtimes + .iter() + .map(|(&buffer_id, runtime)| { + shutdown_intents.insert(buffer_id); + runtime.clone() + }) + .collect() + }; for runtime in runtimes { if let Err(error) = runtime.kill().await { debug!(%error, "failed to kill buffer runtime during shutdown"); @@ -1471,11 +1647,16 @@ async fn handle_connection( mut reader: OwnedReadHalf, outbound: mpsc::UnboundedSender, ) -> Result<()> { + let mut server_shutdown = runtime.shutdown.subscribe(); loop { - let Some(frame) = read_frame(&mut reader) - .await - .map_err(protocol_error_to_mux)? - else { + let frame = tokio::select! { + _ = wait_for_shutdown(&mut server_shutdown) => { + runtime.cleanup_connection(connection_id).await; + return Ok(()); + } + frame = read_frame(&mut reader) => frame.map_err(protocol_error_to_mux)?, + }; + let Some(frame) = frame else { debug!(connection_id, "client disconnected"); runtime.cleanup_connection(connection_id).await; return Ok(()); @@ -1562,6 +1743,17 @@ async fn write_loop( Ok(()) } +async fn wait_for_shutdown(shutdown: &mut watch::Receiver) { + if *shutdown.borrow_and_update() { + return; + } + while shutdown.changed().await.is_ok() { + if *shutdown.borrow_and_update() { + return; + } + } +} + fn set_socket_permissions(socket_path: &Path) -> Result<()> { #[cfg(unix)] fs::set_permissions(socket_path, fs::Permissions::from_mode(0o600))?; @@ -1657,3 +1849,43 @@ fn render_events(buffer_id: BufferId, damage: BackendDamage) -> Vec } } } + +#[cfg(test)] +mod tests { + use std::collections::BTreeMap; + use std::path::PathBuf; + + use super::{Runtime, ShutdownSignal, wait_for_shutdown}; + use crate::ServerState; + + use tokio::time::{Duration, timeout}; + + #[tokio::test] + async fn shutdown_signal_is_latched_for_new_receivers() { + let signal = ShutdownSignal::new(); + signal.trigger(); + let mut shutdown = signal.subscribe(); + + timeout(Duration::from_millis(50), wait_for_shutdown(&mut shutdown)) + .await + .expect("latched shutdown should resolve immediately"); + } + + #[test] + fn buffer_shutdown_intents_are_consumed_per_buffer() { + let runtime = Runtime::new( + ServerState::new(), + PathBuf::from("workspace"), + BTreeMap::new(), + ); + runtime + .buffer_shutdown_intents + .lock() + .expect("buffer shutdown intent lock") + .insert(embers_core::BufferId(1)); + + assert!(runtime.take_buffer_shutdown_intent(embers_core::BufferId(1))); + assert!(!runtime.take_buffer_shutdown_intent(embers_core::BufferId(1))); + assert!(!runtime.take_buffer_shutdown_intent(embers_core::BufferId(2))); + } +} diff --git a/crates/embers-server/src/state.rs b/crates/embers-server/src/state.rs index 96cf73f..15c0546 100644 --- a/crates/embers-server/src/state.rs +++ b/crates/embers-server/src/state.rs @@ -8,7 +8,12 @@ use embers_core::{ use crate::model::{ Buffer, BufferAttachment, BufferState, BufferViewNode, BufferViewState, ExitedBuffer, - FloatingWindow, Node, RunningBuffer, Session, SplitNode, TabEntry, TabsNode, + FloatingWindow, InterruptedBuffer, Node, RunningBuffer, Session, SplitNode, TabEntry, TabsNode, +}; +use crate::persist::{ + CURRENT_FORMAT_VERSION, PersistedWorkspace, persisted_buffer, persisted_floating, + persisted_node, persisted_session, restored_buffer, restored_floating, restored_node, + restored_session, }; #[derive(Debug)] @@ -43,6 +48,109 @@ impl ServerState { } } + pub fn from_persisted(workspace: PersistedWorkspace) -> Result { + let PersistedWorkspace { + format_version: _, + sessions: persisted_sessions, + buffers: persisted_buffers, + nodes: persisted_nodes, + floating: persisted_floating, + next_session_id, + next_buffer_id, + next_node_id, + next_floating_id, + } = workspace; + + let mut sessions = BTreeMap::new(); + for persisted_session in persisted_sessions { + let session = restored_session(persisted_session)?; + if sessions.insert(session.id, session).is_some() { + return Err(MuxError::internal( + "duplicate session id found while loading persisted workspace", + )); + } + } + + let mut buffers = BTreeMap::new(); + for persisted_buffer in persisted_buffers { + let buffer = restored_buffer(persisted_buffer)?; + if buffers.insert(buffer.id, buffer).is_some() { + return Err(MuxError::internal( + "duplicate buffer id found while loading persisted workspace", + )); + } + } + + let mut nodes = BTreeMap::new(); + for persisted_node in persisted_nodes { + let node = restored_node(persisted_node); + let node_id = node.id(); + if nodes.insert(node_id, node).is_some() { + return Err(MuxError::internal( + "duplicate node id found while loading persisted workspace", + )); + } + } + + let mut floating = BTreeMap::new(); + for persisted_window in persisted_floating { + let window = restored_floating(persisted_window); + if floating.insert(window.id, window).is_some() { + return Err(MuxError::internal( + "duplicate floating id found while loading persisted workspace", + )); + } + } + + for (floating_id, window) in &floating { + let Some(session) = sessions.get(&window.session_id) else { + return Err(MuxError::internal(format!( + "floating window {floating_id} references unknown session {}", + window.session_id + ))); + }; + if !session.floating.contains(floating_id) { + return Err(MuxError::internal(format!( + "floating window {floating_id} is not referenced by session {}", + window.session_id + ))); + } + } + + let safe_next_session_id = next_id_after_max(sessions.keys().map(|id| id.0)); + let safe_next_buffer_id = next_id_after_max(buffers.keys().map(|id| id.0)); + let safe_next_node_id = next_id_after_max(nodes.keys().map(|id| id.0)); + let safe_next_floating_id = next_id_after_max(floating.keys().map(|id| id.0)); + + let mut state = Self { + sessions, + buffers, + nodes, + floating, + session_ids: IdAllocator::new(next_session_id.max(safe_next_session_id)), + buffer_ids: IdAllocator::new(next_buffer_id.max(safe_next_buffer_id)), + node_ids: IdAllocator::new(next_node_id.max(safe_next_node_id)), + floating_ids: IdAllocator::new(next_floating_id.max(safe_next_floating_id)), + }; + state.interrupt_unrecoverable_buffers(); + state.validate()?; + Ok(state) + } + + pub fn to_persisted(&self) -> PersistedWorkspace { + PersistedWorkspace { + format_version: Some(CURRENT_FORMAT_VERSION), + sessions: self.sessions.values().map(persisted_session).collect(), + buffers: self.buffers.values().map(persisted_buffer).collect(), + nodes: self.nodes.values().map(persisted_node).collect(), + floating: self.floating.values().map(persisted_floating).collect(), + next_session_id: next_id_after_max(self.sessions.keys().map(|id| id.0)), + next_buffer_id: next_id_after_max(self.buffers.keys().map(|id| id.0)), + next_node_id: next_id_after_max(self.nodes.keys().map(|id| id.0)), + next_floating_id: next_id_after_max(self.floating.keys().map(|id| id.0)), + } + } + pub fn session(&self, session_id: SessionId) -> Result<&Session> { self.sessions .get(&session_id) @@ -282,6 +390,34 @@ impl ServerState { Ok(()) } + pub fn mark_buffer_interrupted(&mut self, buffer_id: BufferId) -> Result<()> { + let buffer = self.buffer_mut(buffer_id)?; + let last_known_pid = match &buffer.state { + BufferState::Running(running) => running.pid, + BufferState::Interrupted(interrupted) => interrupted.last_known_pid, + BufferState::Created | BufferState::Exited(_) => None, + }; + buffer.state = BufferState::Interrupted(InterruptedBuffer { last_known_pid }); + Ok(()) + } + + pub fn interrupt_unrecoverable_buffers(&mut self) { + for buffer in self.buffers.values_mut() { + buffer.state = match &buffer.state { + BufferState::Exited(exited) => BufferState::Exited(exited.clone()), + BufferState::Running(running) => BufferState::Interrupted(InterruptedBuffer { + last_known_pid: running.pid, + }), + BufferState::Interrupted(interrupted) => { + BufferState::Interrupted(interrupted.clone()) + } + BufferState::Created => BufferState::Interrupted(InterruptedBuffer { + last_known_pid: None, + }), + }; + } + } + pub fn set_buffer_size(&mut self, buffer_id: BufferId, size: PtySize) -> Result<()> { self.buffer_mut(buffer_id)?.pty_size = size; Ok(()) @@ -1967,3 +2103,77 @@ impl ServerState { .ok_or_else(|| MuxError::not_found(format!("unknown floating window {floating_id}"))) } } + +fn next_id_after_max(ids: impl Iterator) -> u64 { + match ids.max() { + Some(max) => max.checked_add(1).unwrap_or_else(|| { + panic!( + "next_id_after_max allocator exhaustion: restored max id == u64::MAX, cannot allocate a new id" + ) + }), + None => 1, + } +} + +#[cfg(test)] +mod tests { + use super::*; + use embers_core::FloatGeometry; + + #[test] + fn interrupt_unrecoverable_buffers_marks_created_buffers_interrupted() { + let mut state = ServerState::new(); + let buffer_id = state.create_buffer("detached", vec!["/bin/sh".to_owned()], None); + + assert_eq!( + state.buffer(buffer_id).expect("buffer exists").state, + BufferState::Created + ); + + state.interrupt_unrecoverable_buffers(); + + assert_eq!( + state.buffer(buffer_id).expect("buffer exists").state, + BufferState::Interrupted(InterruptedBuffer { + last_known_pid: None, + }) + ); + } + + #[test] + fn from_persisted_rejects_unreferenced_floating_windows() { + let mut state = ServerState::new(); + let session_id = state.create_session("main"); + let buffer_id = state.create_buffer("shell", vec!["/bin/sh".to_owned()], None); + let floating_id = state + .create_floating_from_buffer_with_options( + session_id, + buffer_id, + FloatGeometry { + x: 1, + y: 2, + width: 80, + height: 24, + }, + Some("popup".to_owned()), + true, + true, + ) + .expect("floating is created"); + + let mut workspace = state.to_persisted(); + workspace + .sessions + .iter_mut() + .find(|session| session.id == session_id.0) + .expect("session persists") + .floating + .retain(|candidate| *candidate != floating_id.0); + + let error = ServerState::from_persisted(workspace) + .expect_err("unreferenced floating window should be rejected"); + let message = error.to_string(); + assert!(message.contains("floating window")); + assert!(message.contains("not referenced by session")); + } +} diff --git a/crates/embers-server/tests/integration.rs b/crates/embers-server/tests/integration.rs new file mode 100644 index 0000000..8cdd67f --- /dev/null +++ b/crates/embers-server/tests/integration.rs @@ -0,0 +1,9 @@ +mod buffer_lifecycle; +mod buffer_move; +mod floating_windows; +mod model_state; +mod nested_tabs; +mod persistence; +mod ping_server; +mod session_root_tabs; +mod split_layout; diff --git a/crates/embers-server/tests/persistence.rs b/crates/embers-server/tests/persistence.rs new file mode 100644 index 0000000..ecb4a84 --- /dev/null +++ b/crates/embers-server/tests/persistence.rs @@ -0,0 +1,197 @@ +use embers_core::{BufferId, RequestId, init_test_tracing}; +use embers_protocol::{ + BufferRecordState, BufferRequest, BufferResponse, BuffersResponse, ClientMessage, + ProtocolClient, ServerResponse, SessionRequest, SessionSnapshotResponse, +}; +use embers_server::{Server, ServerConfig}; +use tempfile::tempdir; +use tokio::time::{Duration, Instant, sleep}; + +async fn request_session_snapshot( + client: &mut ProtocolClient, + request: SessionRequest, +) -> SessionSnapshotResponse { + match client + .request(&ClientMessage::Session(request)) + .await + .expect("session request succeeds") + { + ServerResponse::SessionSnapshot(response) => response, + other => panic!("expected session snapshot, got {other:?}"), + } +} + +async fn request_buffer(client: &mut ProtocolClient, request: BufferRequest) -> BufferResponse { + match client + .request(&ClientMessage::Buffer(request)) + .await + .expect("buffer request succeeds") + { + ServerResponse::Buffer(response) => response, + other => panic!("expected buffer response, got {other:?}"), + } +} + +async fn request_buffers(client: &mut ProtocolClient, request: BufferRequest) -> BuffersResponse { + match client + .request(&ClientMessage::Buffer(request)) + .await + .expect("buffer list succeeds") + { + ServerResponse::Buffers(response) => response, + other => panic!("expected buffers response, got {other:?}"), + } +} + +#[tokio::test] +async fn clean_restart_restores_workspace_and_marks_live_buffers_interrupted() { + init_test_tracing(); + + let tempdir = tempdir().expect("tempdir"); + let socket_path = tempdir.path().join("mux.sock"); + let config = ServerConfig::new(socket_path.clone()); + let workspace_path = config.workspace_path.clone(); + + let handle = Server::new(config.clone()) + .start() + .await + .expect("start server"); + let mut client = ProtocolClient::connect(&socket_path) + .await + .expect("connect client"); + + let session = request_session_snapshot( + &mut client, + SessionRequest::Create { + request_id: RequestId(1), + name: "main".to_owned(), + }, + ) + .await; + let session_id = session.snapshot.session.id; + + let attached = request_buffer( + &mut client, + BufferRequest::Create { + request_id: RequestId(2), + title: Some("attached".to_owned()), + command: vec!["/bin/sh".to_owned()], + cwd: None, + env: Default::default(), + }, + ) + .await + .buffer; + + let detached = request_buffer( + &mut client, + BufferRequest::Create { + request_id: RequestId(3), + title: Some("detached".to_owned()), + command: vec!["/bin/sh".to_owned()], + cwd: None, + env: Default::default(), + }, + ) + .await + .buffer; + + let attached_id = attached.id; + let detached_id = detached.id; + + let restored_layout = request_session_snapshot( + &mut client, + SessionRequest::AddRootTab { + request_id: RequestId(4), + session_id, + title: "shell".to_owned(), + buffer_id: Some(attached_id), + child_node_id: None, + }, + ) + .await; + assert_eq!(restored_layout.snapshot.session.id, session_id); + + let deadline = Instant::now() + Duration::from_secs(2); + let attached_running = loop { + let response = request_buffer( + &mut client, + BufferRequest::Get { + request_id: RequestId(40), + buffer_id: attached_id, + }, + ) + .await; + if response.buffer.state == BufferRecordState::Running { + break true; + } + if Instant::now() >= deadline { + break false; + } + sleep(Duration::from_millis(25)).await; + }; + assert!( + attached_running, + "attached buffer {attached_id} did not reach Running before shutdown" + ); + + handle.shutdown().await.expect("shutdown server"); + assert!(workspace_path.exists()); + + let handle = Server::new(config).start().await.expect("restart server"); + let mut client = ProtocolClient::connect(&socket_path) + .await + .expect("reconnect client"); + + let session = request_session_snapshot( + &mut client, + SessionRequest::Get { + request_id: RequestId(5), + session_id, + }, + ) + .await; + assert_eq!(session.snapshot.session.name, "main"); + let attached_buffer = session + .snapshot + .buffers + .iter() + .find(|buffer| buffer.id == attached_id) + .expect("attached buffer restored"); + assert_eq!(attached_buffer.state, BufferRecordState::Interrupted); + assert!(attached_buffer.attachment_node_id.is_some()); + + let buffers = request_buffers( + &mut client, + BufferRequest::List { + request_id: RequestId(6), + session_id: None, + attached_only: false, + detached_only: false, + }, + ) + .await; + let detached_buffer = buffers + .buffers + .iter() + .find(|buffer| buffer.id == detached_id) + .expect("detached buffer restored"); + assert_eq!(detached_buffer.state, BufferRecordState::Interrupted); + assert_eq!(detached_buffer.attachment_node_id, None); + + let send_err = client + .request(&ClientMessage::Buffer(BufferRequest::Get { + request_id: RequestId(7), + buffer_id: BufferId(detached_id.0), + })) + .await + .expect("buffer get succeeds"); + match send_err { + ServerResponse::Buffer(response) => { + assert_eq!(response.buffer.state, BufferRecordState::Interrupted); + } + other => panic!("expected restored interrupted buffer, got {other:?}"), + } + + handle.shutdown().await.expect("shutdown restarted server"); +} diff --git a/crates/embers-test-support/Cargo.toml b/crates/embers-test-support/Cargo.toml index 478f749..50a66f5 100644 --- a/crates/embers-test-support/Cargo.toml +++ b/crates/embers-test-support/Cargo.toml @@ -1,5 +1,6 @@ [package] name = "embers-test-support" +autotests = false edition.workspace = true license.workspace = true rust-version.workspace = true @@ -13,3 +14,7 @@ embers-server = { path = "../embers-server" } portable-pty.workspace = true tempfile.workspace = true tokio.workspace = true + +[[test]] +name = "integration" +path = "tests/integration.rs" diff --git a/crates/embers-test-support/tests/integration.rs b/crates/embers-test-support/tests/integration.rs new file mode 100644 index 0000000..c355916 --- /dev/null +++ b/crates/embers-test-support/tests/integration.rs @@ -0,0 +1,9 @@ +mod buffer_runtime; +mod detach_move; +mod floating_windows; +mod nested_tabs; +mod protocol_server; +mod pty_smoke; +mod server_harness; +mod session_root_tabs; +mod split_layout; diff --git a/docs/config-api-book/.nojekyll b/docs/config-api-book/.nojekyll new file mode 100644 index 0000000..f173110 --- /dev/null +++ b/docs/config-api-book/.nojekyll @@ -0,0 +1 @@ +This file makes sure that Github Pages doesn't process mdBook's output. diff --git a/docs/config-api-book/404.html b/docs/config-api-book/404.html new file mode 100644 index 0000000..36ba81a --- /dev/null +++ b/docs/config-api-book/404.html @@ -0,0 +1,227 @@ + + + + + + Page not found - Embers Config API + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+
+

Keyboard shortcuts

+
+

Press or to navigate between chapters

+

Press S or / to search in the book

+

Press ? to show this help

+

Press Esc to hide this help

+
+
+
+
+ + + + + + + + + + + + + +
+ +
+
+ + + + + + + +
+
+

Document not found (404)

+

This URL is invalid, sorry. Please use the navigation bar or search to continue.

+ +
+ + +
+
+ + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + diff --git a/docs/config-api-book/action.html b/docs/config-api-book/action.html new file mode 100644 index 0000000..efb5d64 --- /dev/null +++ b/docs/config-api-book/action.html @@ -0,0 +1,1587 @@ + + + + + + Action - Embers Config API + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+
+

Keyboard shortcuts

+
+

Press or to navigate between chapters

+

Press S or / to search in the book

+

Press ? to show this help

+

Press Esc to hide this help

+
+
+
+
+ + + + + + + + + + + + + +
+ +
+
+ + + + + + + +
+
+

Action

+

Namespace: global

+
+ +

fn cancel_search

+ +
fn cancel_search(_: ActionApi) -> Action
+
+
+ +
+ +
+Cancel the active search. +
+ +
+ +
+ + +
+ +

fn cancel_selection

+ +
fn cancel_selection(_: ActionApi) -> Action
+
+
+ +
+ +
+Cancel the current selection. +
+ +
+ +
+ + +
+ +

fn chain

+ +
fn chain(_: ActionApi, actions: Array) -> Action
+
+
+ +
+ +
+Chain multiple actions into one composite action. +
+ +
+ +
+ + +
+ +

fn clear_pending_keys

+ +
fn clear_pending_keys(_: ActionApi) -> Action
+
+
+ +
+ +
+Clear any partially-entered key sequence. +
+ +
+ +
+ + +
+ +

fn close_floating

+ +
fn close_floating(_: ActionApi) -> Action
+
+
+ +
+ +
+Close the currently focused floating window. +
+ +
+ +
+ + +
+ +

fn close_floating_id

+ +
fn close_floating_id(_: ActionApi, floating_id: int) -> Action
+
+
+ +
+ +
+Close a floating window by id. +
+ +
+ +
+ + +
+ +

fn close_node

+ +
fn close_node(_: ActionApi, node_id: int) -> Action
+
+
+ +
+ +
+Close a view by node id. +
+ +
+ +
+ + +
+ +

fn close_view

+ +
fn close_view(_: ActionApi) -> Action
+
+
+ +
+ +
+Close the currently focused view. +
+ +
+ +
+ + +
+ +

fn copy_selection

+ +
fn copy_selection(_: ActionApi) -> Action
+
+
+ +
+ +
+Copy the current selection into the clipboard. +
+ +
+ +
+ + +
+ +

fn detach_buffer

+ +
fn detach_buffer(_: ActionApi) -> Action
+
+
+ +
+ +
+Detach the currently focused buffer. +
+ +
+ +
+ + +
+ +

fn detach_buffer_id

+ +
fn detach_buffer_id(_: ActionApi, buffer_id: int) -> Action
+
+
+ +
+ +
+Detach a buffer by id. +
+ +
+ +
+ + +
+ +

fn enter_mode

+ +
fn enter_mode(_: ActionApi, mode: String) -> Action
+
+
+ +
+ +
+Enter a specific input mode by name. +
+ +
+ +
+ + +
+ +

fn enter_search_mode

+ +
fn enter_search_mode(_: ActionApi) -> Action
+
+
+ +
+ +
+Enter incremental search mode. +
+ +
+ +
+ + +
+ +

fn enter_select_block

+ +
fn enter_select_block(_: ActionApi) -> Action
+
+
+ +
+ +
+Enter block selection mode. +
+ +
+ +
+ + +
+ +

fn enter_select_char

+ +
fn enter_select_char(_: ActionApi) -> Action
+
+
+ +
+ +
+Enter character selection mode. +
+ +
+ +
+ + +
+ +

fn enter_select_line

+ +
fn enter_select_line(_: ActionApi) -> Action
+
+
+ +
+ +
+Enter line selection mode. +
+ +
+ +
+ + +
+ +

fn focus_buffer

+ +
fn focus_buffer(_: ActionApi, buffer_id: int) -> Action
+
+
+ +
+ +
+Focus a specific buffer by id. +
+ +
+ +
+ + +
+ +

fn focus_down

+ +
fn focus_down(_: ActionApi) -> Action
+
+
+ +
+ +
+Focus the view below the current node. +
+ +
+ +
+ + +
+ +

fn focus_left

+ +
fn focus_left(_: ActionApi) -> Action
+
+
+ + +
+ +
+Focus the view to the left of the current node. +
+ + + +
+ +
+ + +
+ +

fn focus_right

+ +
fn focus_right(_: ActionApi) -> Action
+
+
+ +
+ +
+Focus the view to the right of the current node. +
+ +
+ +
+ + +
+ +

fn focus_up

+ +
fn focus_up(_: ActionApi) -> Action
+
+
+ +
+ +
+Focus the view above the current node. +
+ +
+ +
+ + +
+ +

fn follow_output

+ +
fn follow_output(_: ActionApi) -> Action
+
+
+ +
+ +
+Re-enable following live output. +
+ +
+ +
+ + +
+ +

fn insert_tab_after

+ +
fn insert_tab_after(_: ActionApi, tabs_node_id: int, title: String, tree: TreeSpec) -> Action
+
+
+ +
+ +
+Insert a tab after a specific tabs node. +
+ +
+ +
+ + +
+ +

fn insert_tab_after_current

+ +
fn insert_tab_after_current(_: ActionApi, title: String, tree: TreeSpec) -> Action
+
+
+ +
+ +
+Insert a tab after the current tab in the focused tabs node. +
+ +
+ +
+ + +
+ +

fn insert_tab_before

+ +
fn insert_tab_before(_: ActionApi, tabs_node_id: int, title: String, tree: TreeSpec) -> Action
+
+
+ +
+ +
+Insert a tab before a specific tabs node. +
+ +
+ +
+ + +
+ +

fn insert_tab_before_current

+ +
fn insert_tab_before_current(_: ActionApi, title: String, tree: TreeSpec) -> Action
+
+
+ +
+ +
+Insert a tab before the current tab. +
+ +
+ +
+ + +
+ +

fn kill_buffer

+ +
fn kill_buffer(_: ActionApi) -> Action
+
+
+ +
+ +
+Kill the currently focused buffer. +
+ +
+ +
+ + +
+ +

fn kill_buffer_id

+ +
fn kill_buffer_id(_: ActionApi, buffer_id: int) -> Action
+
+
+ +
+ +
+Kill a buffer by id. +
+ +
+ +
+ + +
+ +

fn leave_mode

+ +
fn leave_mode(_: ActionApi) -> Action
+
+
+ +
+ +
+Leave the active input mode. +
+ +
+ +
+ + +
+ +

fn move_buffer_to_floating

+ +
fn move_buffer_to_floating(_: ActionApi, buffer_id: int, options: Map) -> Action
+
+
+ + +
+ +
+Move a buffer into a new floating window. +
+ + + +
+ +
+ + +
+ +

fn move_buffer_to_node

+ +
fn move_buffer_to_node(_: ActionApi, buffer_id: int, node_id: int) -> Action
+
+
+ +
+ +
+Move a buffer into a specific node. +
+ +
+ +
+ + +
+ +

fn next_current_tabs

+ +
fn next_current_tabs(_: ActionApi) -> Action
+
+
+ +
+ +
+Select the next tab in the currently focused tabs node. +
+ +
+ +
+ + +
+ +

fn next_tab

+ +
fn next_tab(_: ActionApi, tabs_node_id: int) -> Action
+
+
+ +
+ +
+Select the next tab in a specific tabs node. +
+ +
+ +
+ + +
+ +

fn noop

+ +
fn noop(_: ActionApi) -> Action
+
+
+ +
+ +
+Build a no-op action. +
+ +
+ +
+ + +
+ +

fn notify

+ +
fn notify(_: ActionApi, level: String, message: String) -> Action
+
+
+ +
+ +
+Emit a client notification. +
+ +
+ +
+ + +
+ +

fn open_floating

+ +
fn open_floating(_: ActionApi, tree: TreeSpec, options: Map) -> Action
+
+
+ +
+ +
+Open a floating view around the provided tree. +
+ +
+ +
+ + +
+ +

fn prev_current_tabs

+ +
fn prev_current_tabs(_: ActionApi) -> Action
+
+
+ +
+ +
+Select the previous tab in the currently focused tabs node. +
+ +
+ +
+ + +
+ +

fn prev_tab

+ +
fn prev_tab(_: ActionApi, tabs_node_id: int) -> Action
+
+
+ +
+ +
+Select the previous tab in a specific tabs node. +
+ +
+ +
+ + +
+ +

fn replace_current_with

+ +
fn replace_current_with(_: ActionApi, tree: TreeSpec) -> Action
+
+
+ +
+ +
+Replace the focused node with a new tree. +
+ +
+ +
+ + +
+ +

fn replace_node

+ +
fn replace_node(_: ActionApi, node_id: int, tree: TreeSpec) -> Action
+
+
+ +
+ +
+Replace a specific node by id with a new tree. +
+ +
+ +
+ + +
+ +

fn reveal_buffer

+ +
fn reveal_buffer(_: ActionApi, buffer_id: int) -> Action
+
+
+ +
+ +
+Reveal a specific buffer by id. +
+ +
+ +
+ + +
+ +

fn run_named_action

+ +
fn run_named_action(_: ActionApi, name: String) -> Action
+
+
+ +
+ +
+Run another named action by name. +
+ +
+ +
+ + +
+ +

fn scroll_line_down

+ +
fn scroll_line_down(_: ActionApi) -> Action
+
+
+ +
+ +
+Scroll one line downward in local scrollback. +
+ +
+ +
+ + +
+ +

fn scroll_line_up

+ +
fn scroll_line_up(_: ActionApi) -> Action
+
+
+ +
+ +
+Scroll one line upward in local scrollback. +
+ +
+ +
+ + +
+ +

fn scroll_page_down

+ +
fn scroll_page_down(_: ActionApi) -> Action
+
+
+ +
+ +
+Scroll one page downward in local scrollback. +
+ +
+ +
+ + +
+ +

fn scroll_page_up

+ +
fn scroll_page_up(_: ActionApi) -> Action
+
+
+ +
+ +
+Scroll one page upward in local scrollback. +
+ +
+ +
+ + +
+ +

fn scroll_to_bottom

+ +
fn scroll_to_bottom(_: ActionApi) -> Action
+
+
+ +
+ +
+Scroll to the bottom of local scrollback. +
+ +
+ +
+ + +
+ +

fn scroll_to_top

+ +
fn scroll_to_top(_: ActionApi) -> Action
+
+
+ +
+ +
+Scroll to the top of local scrollback. +
+ +
+ +
+ + +
+ +

fn search_next

+ +
fn search_next(_: ActionApi) -> Action
+
+
+ +
+ +
+Jump to the next search match. +
+ +
+ +
+ + +
+ +

fn search_prev

+ +
fn search_prev(_: ActionApi) -> Action
+
+
+ +
+ +
+Jump to the previous search match. +
+ +
+ +
+ + +
+ +

fn select_current_tabs

+ +
fn select_current_tabs(_: ActionApi, index: int) -> Action
+
+
+ +
+ +
+Select a tab by index in the currently focused tabs node. +
+ +
+ +
+ + +
+ +

fn select_move_down

+ +
fn select_move_down(_: ActionApi) -> Action
+
+
+ +
+ +
+Move the active selection down. +
+ +
+ +
+ + +
+ +

fn select_move_left

+ +
fn select_move_left(_: ActionApi) -> Action
+
+
+ +
+ +
+Move the active selection left. +
+ +
+ +
+ + +
+ +

fn select_move_right

+ +
fn select_move_right(_: ActionApi) -> Action
+
+
+ +
+ +
+Move the active selection right. +
+ +
+ +
+ + +
+ +

fn select_move_up

+ +
fn select_move_up(_: ActionApi) -> Action
+
+
+ +
+ +
+Move the active selection up. +
+ +
+ +
+ + +
+ +

fn select_tab

+ +
fn select_tab(_: ActionApi, tabs_node_id: int, index: int) -> Action
+
+
+ +
+ +
+Select a tab by index in a specific tabs node. +
+ +
+ +
+ + +
+ +

fn send_bytes

+ +
fn send_bytes(_: ActionApi, buffer_id: int, bytes: String) -> Action
+fn send_bytes(_: ActionApi, buffer_id: int, bytes: Array) -> Action
+
+
+ +
+ +
+Send a string of bytes to a specific buffer. +
+ +
+ +
+ + +
+ +

fn send_bytes_current

+ +
fn send_bytes_current(_: ActionApi, bytes: String) -> Action
+fn send_bytes_current(_: ActionApi, bytes: Array) -> Action
+
+
+ +
+ +
+Send a string of bytes to the focused buffer. +
+ +
+ +
+ + +
+ +

fn send_keys

+ +
fn send_keys(_: ActionApi, buffer_id: int, notation: String) -> Action
+
+
+ +
+ +
+Send a key notation sequence to a specific buffer. +
+ +
+ +
+ + +
+ +

fn send_keys_current

+ +
fn send_keys_current(_: ActionApi, notation: String) -> Action
+
+
+ +
+ +
+Send a key notation sequence to the focused buffer. +
+ +
+ +
+ + +
+ +

fn split_with

+ +
fn split_with(_: ActionApi, direction: String, tree: TreeSpec) -> Action
+
+
+ +
+ +
+Split the current node and attach the provided tree as the new sibling. +
+ +
+ +
+ + +
+ +

fn toggle_mode

+ +
fn toggle_mode(_: ActionApi, mode: String) -> Action
+
+
+ +
+ +
+Toggle a named input mode. +
+ +
+ +
+ + +
+ +

fn yank_selection

+ +
fn yank_selection(_: ActionApi) -> Action
+
+
+ +
+ +
+Copy the current selection into the clipboard. +
+ +
+ +
+ + + +
+ + +
+
+ + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + diff --git a/docs/config-api-book/ayu-highlight-3fdfc3ac.css b/docs/config-api-book/ayu-highlight-3fdfc3ac.css new file mode 100644 index 0000000..dba94b0 --- /dev/null +++ b/docs/config-api-book/ayu-highlight-3fdfc3ac.css @@ -0,0 +1,77 @@ +/* +Based off of the Ayu theme +Original by Dempfi (https://github.com/dempfi/ayu) +*/ + +.hljs { + display: block; + overflow-x: auto; + background: #191f26; + color: #e6e1cf; +} + +.hljs-comment, +.hljs-quote { + color: #5c6773; +} + +.hljs-variable, +.hljs-template-variable, +.hljs-attribute, +.hljs-attr, +.hljs-regexp, +.hljs-link, +.hljs-selector-id, +.hljs-selector-class { + color: #ff7733; +} + +.hljs-number, +.hljs-meta, +.hljs-builtin-name, +.hljs-literal, +.hljs-type, +.hljs-params { + color: #ffee99; +} + +.hljs-string, +.hljs-bullet { + color: #b8cc52; +} + +.hljs-title, +.hljs-built_in, +.hljs-section { + color: #ffb454; +} + +.hljs-keyword, +.hljs-selector-tag, +.hljs-symbol { + color: #ff7733; +} + +.hljs-name { + color: #36a3d9; +} + +.hljs-tag { + color: #00568d; +} + +.hljs-emphasis { + font-style: italic; +} + +.hljs-strong { + font-weight: bold; +} + +.hljs-addition { + color: #91b362; +} + +.hljs-deletion { + color: #d96c75; +} diff --git a/docs/config-api-book/book-a0b12cfe.js b/docs/config-api-book/book-a0b12cfe.js new file mode 100644 index 0000000..62d7c4c --- /dev/null +++ b/docs/config-api-book/book-a0b12cfe.js @@ -0,0 +1,843 @@ +'use strict'; + +/* global default_theme, default_dark_theme, default_light_theme, hljs, ClipboardJS */ + +// Fix back button cache problem +window.onunload = function() { }; + +// Global variable, shared between modules +function playground_text(playground, hidden = true) { + const code_block = playground.querySelector('code'); + + if (window.ace && code_block.classList.contains('editable')) { + const editor = window.ace.edit(code_block); + return editor.getValue(); + } else if (hidden) { + return code_block.textContent; + } else { + return code_block.innerText; + } +} + +(function codeSnippets() { + function fetch_with_timeout(url, options, timeout = 6000) { + return Promise.race([ + fetch(url, options), + new Promise((_, reject) => setTimeout(() => reject(new Error('timeout')), timeout)), + ]); + } + + const playgrounds = Array.from(document.querySelectorAll('.playground')); + if (playgrounds.length > 0) { + fetch_with_timeout('https://play.rust-lang.org/meta/crates', { + headers: { + 'Content-Type': 'application/json', + }, + method: 'POST', + mode: 'cors', + }) + .then(response => response.json()) + .then(response => { + // get list of crates available in the rust playground + const playground_crates = response.crates.map(item => item['id']); + playgrounds.forEach(block => handle_crate_list_update(block, playground_crates)); + }); + } + + function handle_crate_list_update(playground_block, playground_crates) { + // update the play buttons after receiving the response + update_play_button(playground_block, playground_crates); + + // and install on change listener to dynamically update ACE editors + if (window.ace) { + const code_block = playground_block.querySelector('code'); + if (code_block.classList.contains('editable')) { + const editor = window.ace.edit(code_block); + editor.addEventListener('change', () => { + update_play_button(playground_block, playground_crates); + }); + // add Ctrl-Enter command to execute rust code + editor.commands.addCommand({ + name: 'run', + bindKey: { + win: 'Ctrl-Enter', + mac: 'Ctrl-Enter', + }, + exec: _editor => run_rust_code(playground_block), + }); + } + } + } + + // updates the visibility of play button based on `no_run` class and + // used crates vs ones available on https://play.rust-lang.org + function update_play_button(pre_block, playground_crates) { + const play_button = pre_block.querySelector('.play-button'); + + // skip if code is `no_run` + if (pre_block.querySelector('code').classList.contains('no_run')) { + play_button.classList.add('hidden'); + return; + } + + // get list of `extern crate`'s from snippet + const txt = playground_text(pre_block); + const re = /extern\s+crate\s+([a-zA-Z_0-9]+)\s*;/g; + const snippet_crates = []; + let item; + while (item = re.exec(txt)) { + snippet_crates.push(item[1]); + } + + // check if all used crates are available on play.rust-lang.org + const all_available = snippet_crates.every(function(elem) { + return playground_crates.indexOf(elem) > -1; + }); + + if (all_available) { + play_button.classList.remove('hidden'); + play_button.hidden = false; + } else { + play_button.classList.add('hidden'); + } + } + + function run_rust_code(code_block) { + let result_block = code_block.querySelector('.result'); + if (!result_block) { + result_block = document.createElement('code'); + result_block.className = 'result hljs language-bash'; + + code_block.append(result_block); + } + + const text = playground_text(code_block); + const classes = code_block.querySelector('code').classList; + let edition = '2015'; + classes.forEach(className => { + if (className.startsWith('edition')) { + edition = className.slice(7); + } + }); + const params = { + version: 'stable', + optimize: '0', + code: text, + edition: edition, + }; + + if (text.indexOf('#![feature') !== -1) { + params.version = 'nightly'; + } + + result_block.innerText = 'Running...'; + + fetch_with_timeout('https://play.rust-lang.org/evaluate.json', { + headers: { + 'Content-Type': 'application/json', + }, + method: 'POST', + mode: 'cors', + body: JSON.stringify(params), + }) + .then(response => response.json()) + .then(response => { + if (response.result.trim() === '') { + result_block.innerText = 'No output'; + result_block.classList.add('result-no-output'); + } else { + result_block.innerText = response.result; + result_block.classList.remove('result-no-output'); + } + }) + .catch(error => result_block.innerText = 'Playground Communication: ' + error.message); + } + + // Syntax highlighting Configuration + hljs.configure({ + tabReplace: ' ', // 4 spaces + languages: [], // Languages used for auto-detection + }); + + const code_nodes = Array + .from(document.querySelectorAll('code')) + // Don't highlight `inline code` blocks in headers. + .filter(function(node) { + return !node.parentElement.classList.contains('header'); + }); + + if (window.ace) { + // language-rust class needs to be removed for editable + // blocks or highlightjs will capture events + code_nodes + .filter(function(node) { + return node.classList.contains('editable'); + }) + .forEach(function(block) { + block.classList.remove('language-rust'); + }); + + code_nodes + .filter(function(node) { + return !node.classList.contains('editable'); + }) + .forEach(function(block) { + hljs.highlightBlock(block); + }); + } else { + code_nodes.forEach(function(block) { + hljs.highlightBlock(block); + }); + } + + // Adding the hljs class gives code blocks the color css + // even if highlighting doesn't apply + code_nodes.forEach(function(block) { + block.classList.add('hljs'); + }); + + Array.from(document.querySelectorAll('code.hljs')).forEach(function(block) { + + const lines = Array.from(block.querySelectorAll('.boring')); + // If no lines were hidden, return + if (!lines.length) { + return; + } + block.classList.add('hide-boring'); + + const buttons = document.createElement('div'); + buttons.className = 'buttons'; + buttons.innerHTML = ''; + buttons.firstChild.innerHTML = document.getElementById('fa-eye').innerHTML; + + // add expand button + const pre_block = block.parentNode; + pre_block.insertBefore(buttons, pre_block.firstChild); + + buttons.firstChild.addEventListener('click', function(e) { + if (this.title === 'Show hidden lines') { + this.innerHTML = document.getElementById('fa-eye-slash').innerHTML; + this.title = 'Hide lines'; + this.setAttribute('aria-label', e.target.title); + + block.classList.remove('hide-boring'); + } else if (this.title === 'Hide lines') { + this.innerHTML = document.getElementById('fa-eye').innerHTML; + this.title = 'Show hidden lines'; + this.setAttribute('aria-label', e.target.title); + + block.classList.add('hide-boring'); + } + }); + }); + + if (window.playground_copyable) { + Array.from(document.querySelectorAll('pre code')).forEach(function(block) { + const pre_block = block.parentNode; + if (!pre_block.classList.contains('playground')) { + let buttons = pre_block.querySelector('.buttons'); + if (!buttons) { + buttons = document.createElement('div'); + buttons.className = 'buttons'; + pre_block.insertBefore(buttons, pre_block.firstChild); + } + + const clipButton = document.createElement('button'); + clipButton.className = 'clip-button'; + clipButton.title = 'Copy to clipboard'; + clipButton.setAttribute('aria-label', clipButton.title); + clipButton.innerHTML = ''; + + buttons.insertBefore(clipButton, buttons.firstChild); + } + }); + } + + // Process playground code blocks + Array.from(document.querySelectorAll('.playground')).forEach(function(pre_block) { + // Add play button + let buttons = pre_block.querySelector('.buttons'); + if (!buttons) { + buttons = document.createElement('div'); + buttons.className = 'buttons'; + pre_block.insertBefore(buttons, pre_block.firstChild); + } + + const runCodeButton = document.createElement('button'); + runCodeButton.className = 'play-button'; + runCodeButton.hidden = true; + runCodeButton.title = 'Run this code'; + runCodeButton.setAttribute('aria-label', runCodeButton.title); + runCodeButton.innerHTML = document.getElementById('fa-play').innerHTML; + + buttons.insertBefore(runCodeButton, buttons.firstChild); + runCodeButton.addEventListener('click', () => { + run_rust_code(pre_block); + }); + + if (window.playground_copyable) { + const copyCodeClipboardButton = document.createElement('button'); + copyCodeClipboardButton.className = 'clip-button'; + copyCodeClipboardButton.innerHTML = ''; + copyCodeClipboardButton.title = 'Copy to clipboard'; + copyCodeClipboardButton.setAttribute('aria-label', copyCodeClipboardButton.title); + + buttons.insertBefore(copyCodeClipboardButton, buttons.firstChild); + } + + const code_block = pre_block.querySelector('code'); + if (window.ace && code_block.classList.contains('editable')) { + const undoChangesButton = document.createElement('button'); + undoChangesButton.className = 'reset-button'; + undoChangesButton.title = 'Undo changes'; + undoChangesButton.setAttribute('aria-label', undoChangesButton.title); + undoChangesButton.innerHTML += + document.getElementById('fa-clock-rotate-left').innerHTML; + + buttons.insertBefore(undoChangesButton, buttons.firstChild); + + undoChangesButton.addEventListener('click', function() { + const editor = window.ace.edit(code_block); + editor.setValue(editor.originalCode); + editor.clearSelection(); + }); + } + }); +})(); + +(function themes() { + const html = document.querySelector('html'); + const themeToggleButton = document.getElementById('mdbook-theme-toggle'); + const themePopup = document.getElementById('mdbook-theme-list'); + const themeColorMetaTag = document.querySelector('meta[name="theme-color"]'); + const themeIds = []; + themePopup.querySelectorAll('button.theme').forEach(function(el) { + themeIds.push(el.id); + }); + const stylesheets = { + ayuHighlight: document.querySelector('#mdbook-ayu-highlight-css'), + tomorrowNight: document.querySelector('#mdbook-tomorrow-night-css'), + highlight: document.querySelector('#mdbook-highlight-css'), + }; + + function showThemes() { + themePopup.style.display = 'block'; + themeToggleButton.setAttribute('aria-expanded', true); + themePopup.querySelector('button#mdbook-theme-' + get_theme()).focus(); + } + + function updateThemeSelected() { + themePopup.querySelectorAll('.theme-selected').forEach(function(el) { + el.classList.remove('theme-selected'); + }); + const selected = get_saved_theme() ?? 'default_theme'; + let element = themePopup.querySelector('button#mdbook-theme-' + selected); + if (element === null) { + // Fall back in case there is no "Default" item. + element = themePopup.querySelector('button#mdbook-theme-' + get_theme()); + } + element.classList.add('theme-selected'); + } + + function hideThemes() { + themePopup.style.display = 'none'; + themeToggleButton.setAttribute('aria-expanded', false); + themeToggleButton.focus(); + } + + function get_saved_theme() { + let theme = null; + try { + theme = localStorage.getItem('mdbook-theme'); + } catch { + // ignore error. + } + return theme; + } + + function delete_saved_theme() { + localStorage.removeItem('mdbook-theme'); + } + + function get_theme() { + const theme = get_saved_theme(); + if (theme === null || theme === undefined || !themeIds.includes('mdbook-theme-' + theme)) { + if (typeof default_dark_theme === 'undefined') { + // A customized index.hbs might not define this, so fall back to + // old behavior of determining the default on page load. + return default_theme; + } + return window.matchMedia('(prefers-color-scheme: dark)').matches + ? default_dark_theme + : default_light_theme; + } else { + return theme; + } + } + + let previousTheme = default_theme; + function set_theme(theme, store = true) { + let ace_theme; + + if (theme === 'coal' || theme === 'navy') { + stylesheets.ayuHighlight.disabled = true; + stylesheets.tomorrowNight.disabled = false; + stylesheets.highlight.disabled = true; + + ace_theme = 'ace/theme/tomorrow_night'; + } else if (theme === 'ayu') { + stylesheets.ayuHighlight.disabled = false; + stylesheets.tomorrowNight.disabled = true; + stylesheets.highlight.disabled = true; + ace_theme = 'ace/theme/tomorrow_night'; + } else { + stylesheets.ayuHighlight.disabled = true; + stylesheets.tomorrowNight.disabled = true; + stylesheets.highlight.disabled = false; + ace_theme = 'ace/theme/dawn'; + } + + setTimeout(function() { + themeColorMetaTag.content = getComputedStyle(document.documentElement).backgroundColor; + }, 1); + + if (window.ace && window.editors) { + window.editors.forEach(function(editor) { + editor.setTheme(ace_theme); + }); + } + + if (store) { + try { + localStorage.setItem('mdbook-theme', theme); + } catch { + // ignore error. + } + } + + html.classList.remove(previousTheme); + html.classList.add(theme); + previousTheme = theme; + updateThemeSelected(); + } + + const query = window.matchMedia('(prefers-color-scheme: dark)'); + query.onchange = function() { + set_theme(get_theme(), false); + }; + + // Set theme. + set_theme(get_theme(), false); + + themeToggleButton.addEventListener('click', function() { + if (themePopup.style.display === 'block') { + hideThemes(); + } else { + showThemes(); + } + }); + + themePopup.addEventListener('click', function(e) { + let theme; + if (e.target.className === 'theme') { + theme = e.target.id; + } else if (e.target.parentElement.className === 'theme') { + theme = e.target.parentElement.id; + } else { + return; + } + theme = theme.replace(/^mdbook-theme-/, ''); + + if (theme === 'default_theme' || theme === null) { + delete_saved_theme(); + set_theme(get_theme(), false); + } else { + set_theme(theme); + } + }); + + themePopup.addEventListener('focusout', function(e) { + // e.relatedTarget is null in Safari and Firefox on macOS (see workaround below) + if (!!e.relatedTarget && + !themeToggleButton.contains(e.relatedTarget) && + !themePopup.contains(e.relatedTarget) + ) { + hideThemes(); + } + }); + + // Should not be needed, but it works around an issue on macOS & iOS: + // https://github.com/rust-lang/mdBook/issues/628 + document.addEventListener('click', function(e) { + if (themePopup.style.display === 'block' && + !themeToggleButton.contains(e.target) && + !themePopup.contains(e.target) + ) { + hideThemes(); + } + }); + + document.addEventListener('keydown', function(e) { + if (e.altKey || e.ctrlKey || e.metaKey || e.shiftKey) { + return; + } + if (!themePopup.contains(e.target)) { + return; + } + + let li; + switch (e.key) { + case 'Escape': + e.preventDefault(); + hideThemes(); + break; + case 'ArrowUp': + e.preventDefault(); + li = document.activeElement.parentElement; + if (li && li.previousElementSibling) { + li.previousElementSibling.querySelector('button').focus(); + } + break; + case 'ArrowDown': + e.preventDefault(); + li = document.activeElement.parentElement; + if (li && li.nextElementSibling) { + li.nextElementSibling.querySelector('button').focus(); + } + break; + case 'Home': + e.preventDefault(); + themePopup.querySelector('li:first-child button').focus(); + break; + case 'End': + e.preventDefault(); + themePopup.querySelector('li:last-child button').focus(); + break; + } + }); +})(); + +(function sidebar() { + const sidebar = document.getElementById('mdbook-sidebar'); + const sidebarLinks = document.querySelectorAll('#mdbook-sidebar a'); + const sidebarToggleButton = document.getElementById('mdbook-sidebar-toggle'); + const sidebarResizeHandle = document.getElementById('mdbook-sidebar-resize-handle'); + const sidebarCheckbox = document.getElementById('mdbook-sidebar-toggle-anchor'); + let firstContact = null; + + + /* Because we cannot change the `display` using only CSS after/before the transition, we + need JS to do it. We change the display to prevent the browsers search to find text inside + the collapsed sidebar. */ + if (!document.documentElement.classList.contains('sidebar-visible')) { + sidebar.style.display = 'none'; + } + sidebar.addEventListener('transitionend', () => { + /* We only change the display to "none" if we're collapsing the sidebar. */ + if (!sidebarCheckbox.checked) { + sidebar.style.display = 'none'; + } + }); + sidebarToggleButton.addEventListener('click', () => { + /* To allow the sidebar expansion animation, we first need to put back the display. */ + if (!sidebarCheckbox.checked) { + sidebar.style.display = ''; + // Workaround for Safari skipping the animation when changing + // `display` and a transform in the same event loop. This forces a + // reflow after updating the display. + sidebar.offsetHeight; + } + }); + + function showSidebar() { + document.documentElement.classList.add('sidebar-visible'); + Array.from(sidebarLinks).forEach(function(link) { + link.setAttribute('tabIndex', 0); + }); + sidebarToggleButton.setAttribute('aria-expanded', true); + sidebar.setAttribute('aria-hidden', false); + try { + localStorage.setItem('mdbook-sidebar', 'visible'); + } catch { + // Ignore error. + } + } + + function hideSidebar() { + document.documentElement.classList.remove('sidebar-visible'); + Array.from(sidebarLinks).forEach(function(link) { + link.setAttribute('tabIndex', -1); + }); + sidebarToggleButton.setAttribute('aria-expanded', false); + sidebar.setAttribute('aria-hidden', true); + try { + localStorage.setItem('mdbook-sidebar', 'hidden'); + } catch { + // Ignore error. + } + } + + // Toggle sidebar + sidebarCheckbox.addEventListener('change', function sidebarToggle() { + if (sidebarCheckbox.checked) { + const current_width = parseInt( + document.documentElement.style.getPropertyValue('--sidebar-target-width'), 10); + if (current_width < 150) { + document.documentElement.style.setProperty('--sidebar-target-width', '150px'); + } + showSidebar(); + } else { + hideSidebar(); + } + }); + + sidebarResizeHandle.addEventListener('mousedown', initResize, false); + + function initResize() { + window.addEventListener('mousemove', resize, false); + window.addEventListener('mouseup', stopResize, false); + document.documentElement.classList.add('sidebar-resizing'); + } + function resize(e) { + let pos = e.clientX - sidebar.offsetLeft; + if (pos < 20) { + hideSidebar(); + } else { + if (!document.documentElement.classList.contains('sidebar-visible')) { + showSidebar(); + } + pos = Math.min(pos, window.innerWidth - 100); + document.documentElement.style.setProperty('--sidebar-target-width', pos + 'px'); + } + } + //on mouseup remove windows functions mousemove & mouseup + function stopResize() { + document.documentElement.classList.remove('sidebar-resizing'); + window.removeEventListener('mousemove', resize, false); + window.removeEventListener('mouseup', stopResize, false); + } + + document.addEventListener('touchstart', function(e) { + firstContact = { + x: e.touches[0].clientX, + time: Date.now(), + }; + }, { passive: true }); + + document.addEventListener('touchmove', function(e) { + if (!firstContact) { + return; + } + + const curX = e.touches[0].clientX; + const xDiff = curX - firstContact.x, + tDiff = Date.now() - firstContact.time; + + if (tDiff < 250 && Math.abs(xDiff) >= 150) { + if (xDiff >= 0 && firstContact.x < Math.min(document.body.clientWidth * 0.25, 300)) { + showSidebar(); + } else if (xDiff < 0 && curX < 300) { + hideSidebar(); + } + + firstContact = null; + } + }, { passive: true }); +})(); + +(function chapterNavigation() { + document.addEventListener('keydown', function(e) { + if (e.altKey || e.ctrlKey || e.metaKey) { + return; + } + if (window.search && window.search.hasFocus()) { + return; + } + const html = document.querySelector('html'); + + function next() { + const nextButton = document.querySelector('.nav-chapters.next'); + if (nextButton) { + window.location.href = nextButton.href; + } + } + function prev() { + const previousButton = document.querySelector('.nav-chapters.previous'); + if (previousButton) { + window.location.href = previousButton.href; + } + } + function showHelp() { + const container = document.getElementById('mdbook-help-container'); + const overlay = document.getElementById('mdbook-help-popup'); + container.style.display = 'flex'; + + // Clicking outside the popup will dismiss it. + const mouseHandler = event => { + if (overlay.contains(event.target)) { + return; + } + if (event.button !== 0) { + return; + } + event.preventDefault(); + event.stopPropagation(); + document.removeEventListener('mousedown', mouseHandler); + hideHelp(); + }; + + // Pressing esc will dismiss the popup. + const escapeKeyHandler = event => { + if (event.key === 'Escape') { + event.preventDefault(); + event.stopPropagation(); + document.removeEventListener('keydown', escapeKeyHandler, true); + hideHelp(); + } + }; + document.addEventListener('keydown', escapeKeyHandler, true); + document.getElementById('mdbook-help-container') + .addEventListener('mousedown', mouseHandler); + } + function hideHelp() { + document.getElementById('mdbook-help-container').style.display = 'none'; + } + + // Usually needs the Shift key to be pressed + switch (e.key) { + case '?': + e.preventDefault(); + showHelp(); + break; + } + + // Rest of the keys are only active when the Shift key is not pressed + if (e.shiftKey) { + return; + } + + switch (e.key) { + case 'ArrowRight': + e.preventDefault(); + if (html.dir === 'rtl') { + prev(); + } else { + next(); + } + break; + case 'ArrowLeft': + e.preventDefault(); + if (html.dir === 'rtl') { + next(); + } else { + prev(); + } + break; + } + }); +})(); + +(function clipboard() { + const clipButtons = document.querySelectorAll('.clip-button'); + + function hideTooltip(elem) { + elem.firstChild.innerText = ''; + elem.className = 'clip-button'; + } + + function showTooltip(elem, msg) { + elem.firstChild.innerText = msg; + elem.className = 'clip-button tooltipped'; + } + + const clipboardSnippets = new ClipboardJS('.clip-button', { + text: function(trigger) { + hideTooltip(trigger); + const playground = trigger.closest('pre'); + return playground_text(playground, false); + }, + }); + + Array.from(clipButtons).forEach(function(clipButton) { + clipButton.addEventListener('mouseout', function(e) { + hideTooltip(e.currentTarget); + }); + }); + + clipboardSnippets.on('success', function(e) { + e.clearSelection(); + showTooltip(e.trigger, 'Copied!'); + }); + + clipboardSnippets.on('error', function(e) { + showTooltip(e.trigger, 'Clipboard error!'); + }); +})(); + +(function scrollToTop() { + const menuTitle = document.querySelector('.menu-title'); + + menuTitle.addEventListener('click', function() { + document.scrollingElement.scrollTo({ top: 0, behavior: 'smooth' }); + }); +})(); + +(function controllMenu() { + const menu = document.getElementById('mdbook-menu-bar'); + + (function controllPosition() { + let scrollTop = document.scrollingElement.scrollTop; + let prevScrollTop = scrollTop; + const minMenuY = -menu.clientHeight - 50; + // When the script loads, the page can be at any scroll (e.g. if you refresh it). + menu.style.top = scrollTop + 'px'; + // Same as parseInt(menu.style.top.slice(0, -2), but faster + let topCache = menu.style.top.slice(0, -2); + menu.classList.remove('sticky'); + let stickyCache = false; // Same as menu.classList.contains('sticky'), but faster + document.addEventListener('scroll', function() { + scrollTop = Math.max(document.scrollingElement.scrollTop, 0); + // `null` means that it doesn't need to be updated + let nextSticky = null; + let nextTop = null; + const scrollDown = scrollTop > prevScrollTop; + const menuPosAbsoluteY = topCache - scrollTop; + if (scrollDown) { + nextSticky = false; + if (menuPosAbsoluteY > 0) { + nextTop = prevScrollTop; + } + } else { + if (menuPosAbsoluteY > 0) { + nextSticky = true; + } else if (menuPosAbsoluteY < minMenuY) { + nextTop = prevScrollTop + minMenuY; + } + } + if (nextSticky === true && stickyCache === false) { + menu.classList.add('sticky'); + stickyCache = true; + } else if (nextSticky === false && stickyCache === true) { + menu.classList.remove('sticky'); + stickyCache = false; + } + if (nextTop !== null) { + menu.style.top = nextTop + 'px'; + topCache = nextTop; + } + prevScrollTop = scrollTop; + }, { passive: true }); + })(); + (function controllBorder() { + function updateBorder() { + if (menu.offsetTop === 0) { + menu.classList.remove('bordered'); + } else { + menu.classList.add('bordered'); + } + } + updateBorder(); + document.addEventListener('scroll', updateBorder, { passive: true }); + })(); +})(); diff --git a/docs/config-api-book/book.toml b/docs/config-api-book/book.toml new file mode 100644 index 0000000..171a086 --- /dev/null +++ b/docs/config-api-book/book.toml @@ -0,0 +1,8 @@ +[book] +title = "Embers Config API" +language = "en" +src = "." + +[output.html] +default-theme = "light" +additional-js = ["theme/rhai-autodocs-tabs.js", "theme/rhai-highlight.js"] diff --git a/docs/config-api-book/buffer-ref.html b/docs/config-api-book/buffer-ref.html new file mode 100644 index 0000000..e87cb26 --- /dev/null +++ b/docs/config-api-book/buffer-ref.html @@ -0,0 +1,635 @@ + + + + + + BufferRef - Embers Config API + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+
+

Keyboard shortcuts

+
+

Press or to navigate between chapters

+

Press S or / to search in the book

+

Press ? to show this help

+

Press Esc to hide this help

+
+
+
+
+ + + + + + + + + + + + + +
+ +
+
+ + + + + + + +
+
+

BufferRef

+

Namespace: global

+
+ +

fn activity

+ +
fn activity(buffer: BufferRef) -> String
+
+
+ +
+ +
+Return the current activity state name. +
+ +
+ +
+ + +
+ +

fn command

+ +
fn command(buffer: BufferRef) -> Array
+
+
+ +
+ +
+Return the original command vector. +
+ +
+ +
+ + +
+ +

fn cwd

+ +
fn cwd(buffer: BufferRef) -> ?
+
+
+ +
+ +
+Return the working directory, if any. +

ReturnType: string | ()

+
+ +
+ +
+ + +
+ +

fn env_hint

+ +
fn env_hint(buffer: BufferRef, key: String) -> ?
+
+
+ +
+ +
+Look up a single environment hint captured on the buffer. +

ReturnType: string | ()

+
+ +
+ +
+ + +
+ +

fn exit_code

+ +
fn exit_code(buffer: BufferRef) -> ?
+
+
+ +
+ +
+Return the process exit code, if any. +

ReturnType: int | ()

+
+ +
+ +
+ + +
+ +

fn history_text

+ +
fn history_text(buffer: BufferRef) -> String
+
+
+ + +
+ +
+Return the full captured history text for the buffer. +
+ + + +
+ +
+ + +
+ +

fn id

+ +
fn id(buffer: BufferRef) -> int
+
+
+ +
+ +
+Return the numeric buffer id. +
+ +
+ +
+ + +
+ +

fn is_attached

+ +
fn is_attached(buffer: BufferRef) -> bool
+
+
+ +
+ +
+Return whether the buffer is currently attached to a node. +
+ +
+ +
+ + +
+ +

fn is_detached

+ +
fn is_detached(buffer: BufferRef) -> bool
+
+
+ +
+ +
+Return whether the buffer has been detached. +
+ +
+ +
+ + +
+ +

fn is_running

+ +
fn is_running(buffer: BufferRef) -> bool
+
+
+ +
+ +
+Return whether the buffer process is still running. +
+ +
+ +
+ + +
+ +

fn is_visible

+ +
fn is_visible(buffer: BufferRef) -> bool
+
+
+ +
+ +
+Return whether the buffer is visible in the current presentation. +
+ +
+ +
+ + +
+ +

fn node_id

+ +
fn node_id(buffer: BufferRef) -> ?
+
+
+ +
+ +
+Return the attached node id, if any. +

ReturnType: int | ()

+
+ +
+ +
+ + +
+ +

fn pid

+ +
fn pid(buffer: BufferRef) -> ?
+
+
+ +
+ +
+Return the process id, if any. +

ReturnType: int | ()

+
+ +
+ +
+ + +
+ +

fn process_name

+ +
fn process_name(buffer: BufferRef) -> ?
+
+
+ +
+ +
+Return the detected process name, if any. +

ReturnType: string | ()

+
+ +
+ +
+ + +
+ +

fn session_id

+ +
fn session_id(buffer: BufferRef) -> ?
+
+
+ +
+ +
+Return the attached session id, if any. +

ReturnType: int | ()

+
+ +
+ +
+ + +
+ +

fn snapshot_text

+ +
fn snapshot_text(buffer: BufferRef, limit: int) -> String
+
+
+ +
+ +
+Return a text snapshot limited to the requested line count. +
+ +
+ +
+ + +
+ +

fn title

+ +
fn title(buffer: BufferRef) -> String
+
+
+ +
+ +
+Return the buffer title. +
+ +
+ +
+ + +
+ +

fn tty_path

+ +
fn tty_path(buffer: BufferRef) -> ?
+
+
+ +
+ +
+Return the controlling TTY path, if any. +

ReturnType: string | ()

+
+ +
+ +
+ + + +
+ + +
+
+ + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + diff --git a/docs/config-api-book/clipboard-1626706a.min.js b/docs/config-api-book/clipboard-1626706a.min.js new file mode 100644 index 0000000..02c549e --- /dev/null +++ b/docs/config-api-book/clipboard-1626706a.min.js @@ -0,0 +1,7 @@ +/*! + * clipboard.js v2.0.4 + * https://zenorocha.github.io/clipboard.js + * + * Licensed MIT © Zeno Rocha + */ +!function(t,e){"object"==typeof exports&&"object"==typeof module?module.exports=e():"function"==typeof define&&define.amd?define([],e):"object"==typeof exports?exports.ClipboardJS=e():t.ClipboardJS=e()}(this,function(){return function(n){var o={};function r(t){if(o[t])return o[t].exports;var e=o[t]={i:t,l:!1,exports:{}};return n[t].call(e.exports,e,e.exports,r),e.l=!0,e.exports}return r.m=n,r.c=o,r.d=function(t,e,n){r.o(t,e)||Object.defineProperty(t,e,{enumerable:!0,get:n})},r.r=function(t){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},r.t=function(e,t){if(1&t&&(e=r(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var n=Object.create(null);if(r.r(n),Object.defineProperty(n,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var o in e)r.d(n,o,function(t){return e[t]}.bind(null,o));return n},r.n=function(t){var e=t&&t.__esModule?function(){return t.default}:function(){return t};return r.d(e,"a",e),e},r.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},r.p="",r(r.s=0)}([function(t,e,n){"use strict";var r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},i=function(){function o(t,e){for(var n=0;n + + + + + Context - Embers Config API + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+
+

Keyboard shortcuts

+
+

Press or to navigate between chapters

+

Press S or / to search in the book

+

Press ? to show this help

+

Press Esc to hide this help

+
+
+
+
+ + + + + + + + + + + + + +
+ +
+
+ + + + + + + +
+
+

Context

+

Namespace: global

+
+ +

fn current_buffer

+ +
fn current_buffer(context: Context) -> ?
+
+
+ + +
+ +
+Return the currently focused buffer, if any. +

ReturnType: BufferRef | ()

+
+ + + +
+ +
+ + +
+ +

fn current_floating

+ +
fn current_floating(context: Context) -> ?
+
+
+ +
+ +
+Return the currently focused floating window, if any. +

ReturnType: FloatingRef | ()

+
+ +
+ +
+ + +
+ +

fn current_mode

+ +
fn current_mode(context: Context) -> String
+
+
+ +
+ +
+Return the active input mode name. +
+ +
+ +
+ + +
+ +

fn current_node

+ +
fn current_node(context: Context) -> ?
+
+
+ +
+ +
+Return the currently focused node, if any. +

ReturnType: NodeRef | ()

+
+ +
+ +
+ + +
+ +

fn current_session

+ +
fn current_session(context: Context) -> ?
+
+
+ +
+ +
+Return the current session reference, if any. +

ReturnType: SessionRef | ()

+
+ +
+ +
+ + +
+ +

fn detached_buffers

+ +
fn detached_buffers(context: Context) -> Array
+
+
+ +
+ +
+Return detached buffers in the current model snapshot. +
+ +
+ +
+ + +
+ +

fn event

+ +
fn event(context: Context) -> ?
+
+
+ +
+ +
+Return the current event payload, if any. +

ReturnType: EventInfo | ()

+
+ +
+ +
+ + +
+ +

fn find_buffer

+ +
fn find_buffer(context: Context, buffer_id: int) -> ?
+
+
+ +
+ +
+Find a buffer by numeric id. Returns `()` when it does not exist. +

ReturnType: BufferRef | ()

+
+ +
+ +
+ + +
+ +

fn find_floating

+ +
fn find_floating(context: Context, floating_id: int) -> ?
+
+
+ +
+ +
+Find a floating window by numeric id. Returns `()` when it does not exist. +

ReturnType: FloatingRef | ()

+
+ +
+ +
+ + +
+ +

fn find_node

+ +
fn find_node(context: Context, node_id: int) -> ?
+
+
+ +
+ +
+Find a node by numeric id. Returns `()` when it does not exist. +

ReturnType: NodeRef | ()

+
+ +
+ +
+ + +
+ +

fn sessions

+ +
fn sessions(context: Context) -> Array
+
+
+ +
+ +
+Return every visible session. +
+ +
+ +
+ + +
+ +

fn visible_buffers

+ +
fn visible_buffers(context: Context) -> Array
+
+
+ +
+ +
+Return visible buffers in the current model snapshot. +
+ +
+ +
+ + + +
+ + +
+
+ + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + diff --git a/docs/config-api-book/css/chrome-ae938929.css b/docs/config-api-book/css/chrome-ae938929.css new file mode 100644 index 0000000..bab3889 --- /dev/null +++ b/docs/config-api-book/css/chrome-ae938929.css @@ -0,0 +1,756 @@ +/* CSS for UI elements (a.k.a. chrome) */ + +html { + scrollbar-color: var(--scrollbar) transparent; +} +#mdbook-searchresults a, +.content a:link, +a:visited, +a > .hljs { + color: var(--links); +} + +/* + mdbook-body-container is necessary because mobile browsers don't seem to like + overflow-x on the body tag when there is a tag. +*/ +#mdbook-body-container { + /* + This is used when the sidebar pushes the body content off the side of + the screen on small screens. Without it, dragging on mobile Safari + will want to reposition the viewport in a weird way. + */ + overflow-x: clip; +} + +/* Menu Bar */ + +#mdbook-menu-bar, +#mdbook-menu-bar-hover-placeholder { + z-index: 101; + margin: auto calc(0px - var(--page-padding)); +} +#mdbook-menu-bar { + position: relative; + display: flex; + flex-wrap: wrap; + background-color: var(--bg); + border-block-end-color: var(--bg); + border-block-end-width: 1px; + border-block-end-style: solid; +} +#mdbook-menu-bar.sticky, +#mdbook-menu-bar-hover-placeholder:hover + #mdbook-menu-bar, +#mdbook-menu-bar:hover, +html.sidebar-visible #mdbook-menu-bar { + position: -webkit-sticky; + position: sticky; + top: 0 !important; +} +#mdbook-menu-bar-hover-placeholder { + position: sticky; + position: -webkit-sticky; + top: 0; + height: var(--menu-bar-height); +} +#mdbook-menu-bar.bordered { + border-block-end-color: var(--table-border-color); +} +#mdbook-menu-bar .fa-svg, #mdbook-menu-bar .icon-button { + position: relative; + padding: 0 8px; + z-index: 10; + line-height: var(--menu-bar-height); + cursor: pointer; + transition: color 0.5s; +} +@media only screen and (max-width: 420px) { + #mdbook-menu-bar .fa-svg, #mdbook-menu-bar .icon-button { + padding: 0 5px; + } +} + +.icon-button { + border: none; + background: none; + padding: 0; + color: inherit; +} +.icon-button .fa-svg { + margin: 0; +} + +.right-buttons { + margin: 0 15px; +} +.right-buttons a { + text-decoration: none; +} + +.left-buttons { + display: flex; + margin: 0 5px; +} +html:not(.js) .left-buttons button { + display: none; +} + +.menu-title { + display: inline-block; + font-weight: 200; + font-size: 2.4rem; + line-height: var(--menu-bar-height); + text-align: center; + margin: 0; + flex: 1; + white-space: nowrap; + overflow: hidden; + text-overflow: ellipsis; +} +.menu-title { + cursor: pointer; +} + +.menu-bar, +.menu-bar:visited, +.nav-chapters, +.nav-chapters:visited, +.mobile-nav-chapters, +.mobile-nav-chapters:visited, +.menu-bar .icon-button, +.menu-bar a .fa-svg { + color: var(--icons); +} + +.menu-bar .fa-svg:hover, +.menu-bar .icon-button:hover, +.nav-chapters:hover, +.mobile-nav-chapters .fa-svg:hover { + color: var(--icons-hover); +} + +/* Nav Icons */ + +.nav-chapters { + font-size: 2.5em; + text-align: center; + text-decoration: none; + + position: fixed; + top: 0; + bottom: 0; + margin: 0; + max-width: 150px; + min-width: 90px; + + display: flex; + justify-content: center; + align-content: center; + flex-direction: column; + + transition: color 0.5s, background-color 0.5s; +} + +.nav-chapters:hover { + text-decoration: none; + background-color: var(--theme-hover); + transition: background-color 0.15s, color 0.15s; +} + +.nav-wrapper { + margin-block-start: 50px; + display: none; +} + +.mobile-nav-chapters { + font-size: 2.5em; + text-align: center; + text-decoration: none; + width: 90px; + border-radius: 5px; + background-color: var(--sidebar-bg); +} + +/* Only Firefox supports flow-relative values */ +.previous { float: left; } +[dir=rtl] .previous { float: right; } + +/* Only Firefox supports flow-relative values */ +.next { + float: right; + right: var(--page-padding); +} +[dir=rtl] .next { + float: left; + right: unset; + left: var(--page-padding); +} + +@media only screen and (max-width: 1080px) { + .nav-wide-wrapper { display: none; } + .nav-wrapper { display: block; } +} + +/* sidebar-visible */ +@media only screen and (max-width: 1380px) { + #mdbook-sidebar-toggle-anchor:checked ~ .page-wrapper .nav-wide-wrapper { display: none; } + #mdbook-sidebar-toggle-anchor:checked ~ .page-wrapper .nav-wrapper { display: block; } +} + +/* Inline code */ + +:not(pre) > .hljs { + display: inline; + padding: 0.1em 0.3em; + border-radius: 3px; +} + +:not(pre):not(a) > .hljs { + color: var(--inline-code-color); + overflow-x: initial; +} + +a:hover > .hljs { + text-decoration: underline; +} + +pre { + position: relative; +} +pre > .buttons { + position: absolute; + z-index: 100; + right: 0px; + top: 2px; + margin: 0px; + padding: 2px 0px; + + color: var(--sidebar-fg); + cursor: pointer; + visibility: hidden; + opacity: 0; + transition: visibility 0.1s linear, opacity 0.1s linear; +} +pre:hover > .buttons { + visibility: visible; + opacity: 1 +} +pre > .buttons :hover { + color: var(--sidebar-active); + border-color: var(--icons-hover); + background-color: var(--theme-hover); +} +pre > .buttons button { + cursor: inherit; + margin: 0px 5px; + padding: 2px 3px 0px 4px; + font-size: 23px; + + border-style: solid; + border-width: 1px; + border-radius: 4px; + border-color: var(--icons); + background-color: var(--theme-popup-bg); + transition: 100ms; + transition-property: color,border-color,background-color; + color: var(--icons); +} + +pre > .buttons button.clip-button { + padding: 2px 4px 0px 6px; +} +pre > .buttons button.clip-button::before { + /* clipboard image from octicons (https://github.com/primer/octicons/tree/v2.0.0) MIT license + */ + content: url('data:image/svg+xml,\ +\ +\ +'); + filter: var(--copy-button-filter); +} +pre > .buttons button.clip-button:hover::before { + filter: var(--copy-button-filter-hover); +} + +@media (pointer: coarse) { + pre > .buttons button { + /* On mobile, make it easier to tap buttons. */ + padding: 0.3rem 1rem; + } + + .sidebar-resize-indicator { + /* Hide resize indicator on devices with limited accuracy */ + display: none; + } +} +pre > code { + display: block; + padding: 1rem; +} + +/* FIXME: ACE editors overlap their buttons because ACE does absolute + positioning within the code block which breaks padding. The only solution I + can think of is to move the padding to the outer pre tag (or insert a div + wrapper), but that would require fixing a whole bunch of CSS rules. +*/ +.hljs.ace_editor { + padding: 0rem 0rem; +} + +pre > .result { + margin-block-start: 10px; +} + +/* Search */ + +#mdbook-searchresults a { + text-decoration: none; +} + +mark { + border-radius: 2px; + padding-block-start: 0; + padding-block-end: 1px; + padding-inline-start: 3px; + padding-inline-end: 3px; + margin-block-start: 0; + margin-block-end: -1px; + margin-inline-start: -3px; + margin-inline-end: -3px; + background-color: var(--search-mark-bg); + transition: background-color 300ms linear; + cursor: pointer; +} + +mark.fade-out { + background-color: rgba(0,0,0,0) !important; + cursor: auto; +} + +.searchbar-outer { + margin-inline-start: auto; + margin-inline-end: auto; + max-width: var(--content-max-width); +} + +#mdbook-searchbar-outer.searching #mdbook-searchbar { + padding-right: 30px; +} +#mdbook-searchbar-outer .spinner-wrapper { + display: none; +} +#mdbook-searchbar-outer.searching .spinner-wrapper { + display: block; +} + +.search-wrapper { + position: relative; +} + +.spinner-wrapper { + --spinner-margin: 2px; + position: absolute; + margin-block-start: calc(var(--searchbar-margin-block-start) + var(--spinner-margin)); + right: var(--spinner-margin); + top: 0; + bottom: var(--spinner-margin); + padding: 6px; + background-color: var(--bg); +} + +#fa-spin { + animation: rotating 2s linear infinite; + display: inline-block; +} + +@keyframes rotating { + from { + transform: rotate(0deg); + } + to { + transform: rotate(360deg); + } +} + +#mdbook-searchbar { + width: 100%; + margin-block-start: var(--searchbar-margin-block-start); + margin-block-end: 0; + margin-inline-start: auto; + margin-inline-end: auto; + padding: 10px 16px; + transition: box-shadow 300ms ease-in-out; + border: 1px solid var(--searchbar-border-color); + border-radius: 3px; + background-color: var(--searchbar-bg); + color: var(--searchbar-fg); +} +#mdbook-searchbar:focus, +#mdbook-searchbar.active { + box-shadow: 0 0 3px var(--searchbar-shadow-color); +} + +.searchresults-header { + font-weight: bold; + font-size: 1em; + padding-block-start: 18px; + padding-block-end: 0; + padding-inline-start: 5px; + padding-inline-end: 0; + color: var(--searchresults-header-fg); +} + +.searchresults-outer { + margin-inline-start: auto; + margin-inline-end: auto; + max-width: var(--content-max-width); + border-block-end: 1px dashed var(--searchresults-border-color); +} + +ul#mdbook-searchresults { + list-style: none; + padding-inline-start: 20px; +} +ul#mdbook-searchresults li { + margin: 10px 0px; + padding: 2px; + border-radius: 2px; +} +ul#mdbook-searchresults li.focus { + background-color: var(--searchresults-li-bg); +} +ul#mdbook-searchresults span.teaser { + display: block; + clear: both; + margin-block-start: 5px; + margin-block-end: 0; + margin-inline-start: 20px; + margin-inline-end: 0; + font-size: 0.8em; +} +ul#mdbook-searchresults span.teaser em { + font-weight: bold; + font-style: normal; +} + +/* Sidebar */ + +.sidebar { + position: fixed; + left: 0; + top: 0; + bottom: 0; + width: var(--sidebar-width); + font-size: 0.875em; + box-sizing: border-box; + -webkit-overflow-scrolling: touch; + overscroll-behavior-y: contain; + background-color: var(--sidebar-bg); + color: var(--sidebar-fg); +} +.sidebar-iframe-inner { + --padding: 10px; + + background-color: var(--sidebar-bg); + padding: var(--padding); + margin: 0; + font-size: 1.4rem; + color: var(--sidebar-fg); + min-height: calc(100vh - var(--padding) * 2); +} +.sidebar-iframe-outer { + border: none; + height: 100%; + position: absolute; + top: 0; + bottom: 0; + left: 0; + right: 0; +} +[dir=rtl] .sidebar { left: unset; right: 0; } +.sidebar-resizing { + -moz-user-select: none; + -webkit-user-select: none; + -ms-user-select: none; + user-select: none; +} +html:not(.sidebar-resizing) .sidebar { + transition: transform 0.3s; /* Animation: slide away */ +} +.sidebar code { + line-height: 2em; +} +.sidebar .sidebar-scrollbox { + overflow-y: auto; + position: absolute; + top: 0; + bottom: 0; + left: 0; + right: 0; + padding: 10px 10px; +} +.sidebar .sidebar-resize-handle { + position: absolute; + cursor: col-resize; + width: 0; + right: calc(var(--sidebar-resize-indicator-width) * -1); + top: 0; + bottom: 0; + display: flex; + align-items: center; +} + +.sidebar-resize-handle .sidebar-resize-indicator { + width: 100%; + height: 16px; + color: var(--icons); + margin-inline-start: var(--sidebar-resize-indicator-space); + display: flex; + align-items: center; + justify-content: flex-start; +} +.sidebar-resize-handle .sidebar-resize-indicator::before { + content: ""; + width: 2px; + height: 12px; + border-left: dotted 2px currentColor; +} +.sidebar-resize-handle .sidebar-resize-indicator::after { + content: ""; + width: 2px; + height: 16px; + border-left: dotted 2px currentColor; +} + +[dir=rtl] .sidebar .sidebar-resize-handle { + left: calc(var(--sidebar-resize-indicator-width) * -1); + right: unset; +} +.js .sidebar .sidebar-resize-handle { + cursor: col-resize; + width: calc(var(--sidebar-resize-indicator-width) - var(--sidebar-resize-indicator-space)); +} + +html:not(.js) .sidebar-resize-handle { + display: none; +} + +/* sidebar-hidden */ +#mdbook-sidebar-toggle-anchor:not(:checked) ~ .sidebar { + transform: translateX(calc(0px - var(--sidebar-width) - var(--sidebar-resize-indicator-width))); +} +[dir=rtl] #mdbook-sidebar-toggle-anchor:not(:checked) ~ .sidebar { + transform: translateX(calc(var(--sidebar-width) + var(--sidebar-resize-indicator-width))); +} +.sidebar::-webkit-scrollbar { + background: var(--sidebar-bg); +} +.sidebar::-webkit-scrollbar-thumb { + background: var(--scrollbar); +} + +/* sidebar-visible */ +#mdbook-sidebar-toggle-anchor:checked ~ .page-wrapper { + transform: translateX(calc(var(--sidebar-width) + var(--sidebar-resize-indicator-width))); +} +[dir=rtl] #mdbook-sidebar-toggle-anchor:checked ~ .page-wrapper { + transform: translateX(calc(0px - var(--sidebar-width) - var(--sidebar-resize-indicator-width))); +} +@media only screen and (min-width: 620px) { + #mdbook-sidebar-toggle-anchor:checked ~ .page-wrapper { + transform: none; + margin-inline-start: calc(var(--sidebar-width) + var(--sidebar-resize-indicator-width)); + } + [dir=rtl] #mdbook-sidebar-toggle-anchor:checked ~ .page-wrapper { + transform: none; + } +} + +.chapter { + list-style: none outside none; + padding-inline-start: 0; + line-height: 2.2em; +} + +.chapter li { + color: var(--sidebar-non-existant); +} + +/* This is a span wrapping the chapter link and the fold chevron. */ +.chapter-link-wrapper { + /* Used to position the chevron to the right, allowing the text to wrap before it. */ + display: flex; +} + +.chapter li a { + /* Remove underlines. */ + text-decoration: none; + color: var(--sidebar-fg); +} + +.chapter li a:hover { + color: var(--sidebar-active); +} + +.chapter li a.active { + color: var(--sidebar-active); +} + +/* This is the toggle chevron. */ +.chapter-fold-toggle { + cursor: pointer; + /* Positions the chevron to the side. */ + margin-inline-start: auto; + padding: 0 10px; + user-select: none; + opacity: 0.68; +} + +.chapter-fold-toggle div { + transition: transform 0.5s; +} + +/* collapse the section */ +.chapter li:not(.expanded) > ol { + display: none; +} + +.chapter li.chapter-item { + line-height: 1.5em; + margin-block-start: 0.6em; +} + +/* When expanded, rotate the chevron to point down. */ +.chapter li.expanded > span > .chapter-fold-toggle div { + transform: rotate(90deg); +} + +.chapter a.current-header { + color: var(--sidebar-active); +} + +.on-this-page { + margin-left: 22px; + border-inline-start: 4px solid var(--sidebar-header-border-color); + padding-left: 8px; +} + +.on-this-page > ol { + padding-left: 0; +} + +/* Horizontal line in chapter list. */ +.spacer { + width: 100%; + height: 3px; + margin: 5px 0px; +} +.chapter .spacer { + background-color: var(--sidebar-spacer); +} + +/* On touch devices, add more vertical spacing to make it easier to tap links. */ +@media (-moz-touch-enabled: 1), (pointer: coarse) { + .chapter li a { padding: 5px 0; } + .spacer { margin: 10px 0; } +} + +.section { + list-style: none outside none; + padding-inline-start: 20px; + line-height: 1.9em; +} + +/* Theme Menu Popup */ + +.theme-popup { + position: absolute; + left: 10px; + top: var(--menu-bar-height); + z-index: 1000; + border-radius: 4px; + font-size: 0.7em; + color: var(--fg); + background: var(--theme-popup-bg); + border: 1px solid var(--theme-popup-border); + margin: 0; + padding: 0; + list-style: none; + display: none; + /* Don't let the children's background extend past the rounded corners. */ + overflow: hidden; +} +[dir=rtl] .theme-popup { left: unset; right: 10px; } +.theme-popup .default { + color: var(--icons); +} +.theme-popup .theme { + width: 100%; + border: 0; + margin: 0; + padding: 2px 20px; + line-height: 25px; + white-space: nowrap; + text-align: start; + cursor: pointer; + color: inherit; + background: inherit; + font-size: inherit; +} +.theme-popup .theme:hover { + background-color: var(--theme-hover); +} + +.theme-selected::before { + display: inline-block; + content: "✓"; + margin-inline-start: -14px; + width: 14px; +} + +/* The container for the help popup that covers the whole window. */ +#mdbook-help-container { + /* Position and size for the whole window. */ + position: fixed; + top: 0; + left: 0; + right: 0; + bottom: 0; + /* This uses flex layout (which is set in book.js), and centers the popup + in the window.*/ + display: none; + align-items: center; + justify-content: center; + z-index: 1000; + /* Dim out the book while the popup is visible. */ + background: var(--overlay-bg); +} + +/* The popup help box. */ +#mdbook-help-popup { + box-shadow: 0 4px 24px rgba(0,0,0,0.15); + min-width: 300px; + max-width: 500px; + width: 100%; + box-sizing: border-box; + display: flex; + flex-direction: column; + align-items: center; + background-color: var(--bg); + color: var(--fg); + border-width: 1px; + border-color: var(--theme-popup-border); + border-style: solid; + border-radius: 8px; + padding: 10px; +} + +.mdbook-help-title { + text-align: center; + /* mdbook's margin for h2 is way too large. */ + margin: 10px; +} diff --git a/docs/config-api-book/css/general-2459343d.css b/docs/config-api-book/css/general-2459343d.css new file mode 100644 index 0000000..df8a3ef --- /dev/null +++ b/docs/config-api-book/css/general-2459343d.css @@ -0,0 +1,408 @@ +/* Base styles and content styles */ + +:root { + /* Browser default font-size is 16px, this way 1 rem = 10px */ + font-size: 62.5%; + color-scheme: var(--color-scheme); +} + +html { + font-family: "Open Sans", sans-serif; + color: var(--fg); + background-color: var(--bg); + text-size-adjust: none; + -webkit-text-size-adjust: none; +} + +body { + margin: 0; + font-size: 1.6rem; + overflow-x: hidden; +} + +code { + font-family: var(--mono-font) !important; + font-size: var(--code-font-size); + direction: ltr !important; +} + +/* make long words/inline code not x overflow */ +main { + overflow-wrap: break-word; +} + +/* make wide tables scroll if they overflow */ +.table-wrapper { + overflow-x: auto; +} + +/* Don't change font size in headers. */ +h1 code, h2 code, h3 code, h4 code, h5 code, h6 code { + font-size: unset; +} + +.left { float: left; } +.right { float: right; } +.boring { opacity: 0.6; } +.hide-boring .boring { display: none; } +.hidden { display: none !important; } + +h2, h3 { margin-block-start: 2.5em; } +h4, h5 { margin-block-start: 2em; } + +.header + .header h3, +.header + .header h4, +.header + .header h5 { + margin-block-start: 1em; +} + +h1:target::before, +h2:target::before, +h3:target::before, +h4:target::before, +h5:target::before, +h6:target::before, +dt:target::before { + display: inline-block; + content: "»"; + margin-inline-start: -30px; + width: 30px; +} + +/* This is broken on Safari as of version 14, but is fixed + in Safari Technology Preview 117 which I think will be Safari 14.2. + https://bugs.webkit.org/show_bug.cgi?id=218076 +*/ +:target { + /* Safari does not support logical properties */ + scroll-margin-top: calc(var(--menu-bar-height) + 0.5em); +} + +.page { + outline: 0; + padding: 0 var(--page-padding); + margin-block-start: calc(0px - var(--menu-bar-height)); /* Compensate for the #mdbook-menu-bar-hover-placeholder */ +} +.page-wrapper { + box-sizing: border-box; + background-color: var(--bg); +} +html:not(.js) .page-wrapper, +.js:not(.sidebar-resizing) .page-wrapper { + transition: margin-left 0.3s ease, transform 0.3s ease; /* Animation: slide away */ +} +[dir=rtl]:not(.js) .page-wrapper, +[dir=rtl].js:not(.sidebar-resizing) .page-wrapper { + transition: margin-right 0.3s ease, transform 0.3s ease; /* Animation: slide away */ +} + +.content { + overflow-y: auto; + padding: 0 5px 50px 5px; +} +.content main { + margin-inline-start: auto; + margin-inline-end: auto; + max-width: var(--content-max-width); +} +.content p { line-height: 1.45em; } +.content ol { line-height: 1.45em; } +.content ul { line-height: 1.45em; } +.content a { text-decoration: none; } +.content a:hover { text-decoration: underline; } +.content img, .content video { max-width: 100%; } +.content .header:link, +.content .header:visited { + color: var(--fg); +} +.content .header:link, +.content .header:visited:hover { + text-decoration: none; +} + +table { + margin: 0 auto; + border-collapse: collapse; +} +table td { + padding: 3px 20px; + border: 1px var(--table-border-color) solid; +} +table thead { + background: var(--table-header-bg); +} +table thead td { + font-weight: 700; + border: none; +} +table thead th { + padding: 3px 20px; +} +table thead tr { + border: 1px var(--table-header-bg) solid; +} +/* Alternate background colors for rows */ +table tbody tr:nth-child(2n) { + background: var(--table-alternate-bg); +} + + +blockquote { + margin: 20px 0; + padding: 0 20px; + color: var(--fg); + background-color: var(--quote-bg); + border-block-start: .1em solid var(--quote-border); + border-block-end: .1em solid var(--quote-border); +} + +/* TODO: Remove .warning in a future version of mdbook, it is replaced by +blockquote tags. */ +.warning { + margin: 20px; + padding: 0 20px; + border-inline-start: 2px solid var(--warning-border); +} + +.warning:before { + position: absolute; + width: 3rem; + height: 3rem; + margin-inline-start: calc(-1.5rem - 21px); + content: "ⓘ"; + text-align: center; + background-color: var(--bg); + color: var(--warning-border); + font-weight: bold; + font-size: 2rem; +} + +blockquote .warning:before { + background-color: var(--quote-bg); +} + +kbd { + background-color: var(--table-border-color); + border-radius: 4px; + border: solid 1px var(--theme-popup-border); + box-shadow: inset 0 -1px 0 var(--theme-hover); + display: inline-block; + font-size: var(--code-font-size); + font-family: var(--mono-font); + line-height: 10px; + padding: 4px 5px; + vertical-align: middle; +} + +sup { + /* Set the line-height for superscript and footnote references so that there + isn't an awkward space appearing above lines that contain the footnote. + + See https://github.com/rust-lang/mdBook/pull/2443#discussion_r1813773583 + for an explanation. + */ + line-height: 0; +} + +.footnote-definition { + font-size: 0.9em; +} +/* The default spacing for a list is a little too large. */ +.footnote-definition ul, +.footnote-definition ol { + padding-left: 20px; +} +.footnote-definition > li { + /* Required to position the ::before target */ + position: relative; +} +.footnote-definition > li:target { + scroll-margin-top: 50vh; +} +.footnote-reference:target { + scroll-margin-top: 50vh; +} +/* Draws a border around the footnote (including the marker) when it is selected. + TODO: If there are multiple linkbacks, highlight which one you just came + from so you know which one to click. +*/ +.footnote-definition > li:target::before { + border: 2px solid var(--footnote-highlight); + border-radius: 6px; + position: absolute; + top: -8px; + right: -8px; + bottom: -8px; + left: -32px; + pointer-events: none; + content: ""; +} +/* Pulses the footnote reference so you can quickly see where you left off reading. + This could use some improvement. +*/ +@media not (prefers-reduced-motion) { + .footnote-reference:target { + animation: fn-highlight 0.8s; + border-radius: 2px; + } + + @keyframes fn-highlight { + from { + background-color: var(--footnote-highlight); + } + } +} + +.tooltiptext { + position: absolute; + visibility: hidden; + color: #fff; + background-color: #333; + transform: translateX(-50%); /* Center by moving tooltip 50% of its width left */ + left: -8px; /* Half of the width of the icon */ + top: -35px; + font-size: 0.8em; + text-align: center; + border-radius: 6px; + padding: 5px 8px; + margin: 5px; + z-index: 1000; +} +.tooltipped .tooltiptext { + visibility: visible; +} + +.chapter li.part-title { + color: var(--sidebar-fg); + margin: 5px 0px; + font-weight: bold; +} + +.result-no-output { + font-style: italic; +} + +.fa-svg svg { + width: 1em; + height: 1em; + fill: currentColor; + margin-bottom: -0.1em; +} + +dt { + font-weight: bold; + margin-top: 0.5em; + margin-bottom: 0.1em; +} + +/* This uses a CSS counter to add numbers to definitions, but only if there is + more than one definition. */ +dl, dt { + counter-reset: dd-counter; +} + +/* When there is more than one definition, increment the counter. The first +selector selects the first definition, and the second one selects definitions +2 and beyond.*/ +dd:has(+ dd), dd + dd { + counter-increment: dd-counter; + /* Use flex display to help with positioning the numbers when there is a p + tag inside the definition. */ + display: flex; + align-items: flex-start; +} + +/* Shows the counter for definitions. The first selector selects the first +definition, and the second one selections definitions 2 and beyond.*/ +dd:has(+ dd)::before, dd + dd::before { + content: counter(dd-counter) ". "; + font-weight: 600; + display: inline-block; + margin-right: 0.5em; +} + +dd > p { + /* For loose definitions that have a p tag inside, don't add a bunch of + space before the definition. */ + margin-top: 0; +} + +/* Remove some excess space from the bottom. */ +.blockquote-tag p:last-child { + margin-bottom: 2px; +} + +.blockquote-tag { + /* Add some padding to make the vertical bar a little taller than the text.*/ + padding: 2px 0px 2px 20px; + /* Add a solid color bar on the left side. */ + border-inline-start-style: solid; + border-inline-start-width: 4px; + /* Disable the background color from normal blockquotes . */ + background-color: inherit; + /* Disable border blocks from blockquotes. */ + border-block-start: none; + border-block-end: none; +} + +.blockquote-tag-title svg { + fill: currentColor; + /* Add space between the icon and the title. */ + margin-right: 8px; +} + +.blockquote-tag-note { + border-inline-start-color: var(--blockquote-note-color); +} + +.blockquote-tag-tip { + border-inline-start-color: var(--blockquote-tip-color); +} + +.blockquote-tag-important { + border-inline-start-color: var(--blockquote-important-color); +} + +.blockquote-tag-warning { + border-inline-start-color: var(--blockquote-warning-color); +} + +.blockquote-tag-caution { + border-inline-start-color: var(--blockquote-caution-color); +} + +.blockquote-tag-note .blockquote-tag-title { + color: var(--blockquote-note-color); +} + +.blockquote-tag-tip .blockquote-tag-title { + color: var(--blockquote-tip-color); +} + +.blockquote-tag-important .blockquote-tag-title { + color: var(--blockquote-important-color); +} + +.blockquote-tag-warning .blockquote-tag-title { + color: var(--blockquote-warning-color); +} + +.blockquote-tag-caution .blockquote-tag-title { + color: var(--blockquote-caution-color); +} + +.blockquote-tag-title { + /* Slightly increase the weight for more emphasis. */ + font-weight: 600; + /* Vertically center the icon with the text. */ + display: flex; + align-items: center; + /* Remove default large margins for a more compact display. */ + margin: 2px 0 8px 0; +} + +.blockquote-tag-title .fa-svg { + fill: currentColor; + /* Add some space between the icon and the text. */ + margin-right: 8px; +} diff --git a/docs/config-api-book/css/print-9e4910d8.css b/docs/config-api-book/css/print-9e4910d8.css new file mode 100644 index 0000000..2004384 --- /dev/null +++ b/docs/config-api-book/css/print-9e4910d8.css @@ -0,0 +1,50 @@ + +#mdbook-sidebar, +#mdbook-menu-bar, +.nav-chapters, +.mobile-nav-chapters { + display: none; +} + +#mdbook-page-wrapper.page-wrapper { + transform: none !important; + margin-inline-start: 0px; + overflow-y: initial; +} + +#mdbook-content { + max-width: none; + margin: 0; + padding: 0; +} + +.page { + overflow-y: initial; +} + +code { + direction: ltr !important; +} + +pre > .buttons { + z-index: 2; +} + +a, a:visited, a:active, a:hover { + color: #4183c4; + text-decoration: none; +} + +h1, h2, h3, h4, h5, h6 { + page-break-inside: avoid; + page-break-after: avoid; +} + +pre, code { + page-break-inside: avoid; + white-space: pre-wrap; +} + +.fa { + display: none !important; +} diff --git a/docs/config-api-book/css/variables-8adf115d.css b/docs/config-api-book/css/variables-8adf115d.css new file mode 100644 index 0000000..af5023b --- /dev/null +++ b/docs/config-api-book/css/variables-8adf115d.css @@ -0,0 +1,383 @@ + +/* Globals */ + +:root { + --sidebar-target-width: 300px; + --sidebar-width: min(var(--sidebar-target-width), 80vw); + --sidebar-resize-indicator-width: 8px; + --sidebar-resize-indicator-space: 2px; + --page-padding: 15px; + --content-max-width: 750px; + --menu-bar-height: 50px; + --mono-font: "Source Code Pro", Consolas, "Ubuntu Mono", Menlo, "DejaVu Sans Mono", monospace, monospace; + --code-font-size: 0.875em; /* please adjust the ace font size accordingly in editor.js */ + --searchbar-margin-block-start: 5px; +} + +/* Themes */ + +.ayu { + --bg: hsl(210, 25%, 8%); + --fg: #c5c5c5; + + --sidebar-bg: #14191f; + --sidebar-fg: #c8c9db; + --sidebar-non-existant: #5c6773; + --sidebar-active: #ffb454; + --sidebar-spacer: #2d334f; + + --scrollbar: var(--sidebar-fg); + + --icons: #737480; + --icons-hover: #b7b9cc; + + --links: #0096cf; + + --inline-code-color: #ffb454; + + --theme-popup-bg: #14191f; + --theme-popup-border: #5c6773; + --theme-hover: #191f26; + + --quote-bg: hsl(226, 15%, 17%); + --quote-border: hsl(226, 15%, 22%); + + --warning-border: #ff8e00; + + --table-border-color: hsl(210, 25%, 13%); + --table-header-bg: hsl(210, 25%, 28%); + --table-alternate-bg: hsl(210, 25%, 11%); + + --searchbar-border-color: #848484; + --searchbar-bg: #424242; + --searchbar-fg: #fff; + --searchbar-shadow-color: #d4c89f; + --searchresults-header-fg: #666; + --searchresults-border-color: #888; + --searchresults-li-bg: #252932; + --search-mark-bg: #e3b171; + + --color-scheme: dark; + + /* Same as `--icons` */ + --copy-button-filter: invert(45%) sepia(6%) saturate(621%) hue-rotate(198deg) brightness(99%) contrast(85%); + /* Same as `--sidebar-active` */ + --copy-button-filter-hover: invert(68%) sepia(55%) saturate(531%) hue-rotate(341deg) brightness(104%) contrast(101%); + + --footnote-highlight: #2668a6; + + --overlay-bg: rgba(33, 40, 48, 0.4); + + --blockquote-note-color: #74b9ff; + --blockquote-tip-color: #09ca09; + --blockquote-important-color: #d3abff; + --blockquote-warning-color: #f0b72f; + --blockquote-caution-color: #f21424; + + --sidebar-header-border-color: #c18639; +} + +.coal { + --bg: hsl(200, 7%, 8%); + --fg: #98a3ad; + + --sidebar-bg: #292c2f; + --sidebar-fg: #a1adb8; + --sidebar-non-existant: #505254; + --sidebar-active: #3473ad; + --sidebar-spacer: #393939; + + --scrollbar: var(--sidebar-fg); + + --icons: #43484d; + --icons-hover: #b3c0cc; + + --links: #2b79a2; + + --inline-code-color: #c5c8c6; + + --theme-popup-bg: #141617; + --theme-popup-border: #43484d; + --theme-hover: #1f2124; + + --quote-bg: hsl(234, 21%, 18%); + --quote-border: hsl(234, 21%, 23%); + + --warning-border: #ff8e00; + + --table-border-color: hsl(200, 7%, 13%); + --table-header-bg: hsl(200, 7%, 28%); + --table-alternate-bg: hsl(200, 7%, 11%); + + --searchbar-border-color: #aaa; + --searchbar-bg: #b7b7b7; + --searchbar-fg: #000; + --searchbar-shadow-color: #aaa; + --searchresults-header-fg: #666; + --searchresults-border-color: #98a3ad; + --searchresults-li-bg: #2b2b2f; + --search-mark-bg: #355c7d; + + --color-scheme: dark; + + /* Same as `--icons` */ + --copy-button-filter: invert(26%) sepia(8%) saturate(575%) hue-rotate(169deg) brightness(87%) contrast(82%); + /* Same as `--sidebar-active` */ + --copy-button-filter-hover: invert(36%) sepia(70%) saturate(503%) hue-rotate(167deg) brightness(98%) contrast(89%); + + --footnote-highlight: #4079ae; + + --overlay-bg: rgba(33, 40, 48, 0.4); + + --blockquote-note-color: #4493f8; + --blockquote-tip-color: #08ae08; + --blockquote-important-color: #ab7df8; + --blockquote-warning-color: #d29922; + --blockquote-caution-color: #d91b29; + + --sidebar-header-border-color: #3473ad; +} + +.light, html:not(.js) { + --bg: hsl(0, 0%, 100%); + --fg: hsl(0, 0%, 0%); + + --sidebar-bg: #fafafa; + --sidebar-fg: hsl(0, 0%, 0%); + --sidebar-non-existant: #aaaaaa; + --sidebar-active: #1f1fff; + --sidebar-spacer: #f4f4f4; + + --scrollbar: #8F8F8F; + + --icons: #747474; + --icons-hover: #000000; + + --links: #20609f; + + --inline-code-color: #301900; + + --theme-popup-bg: #fafafa; + --theme-popup-border: #cccccc; + --theme-hover: #e6e6e6; + + --quote-bg: hsl(197, 37%, 96%); + --quote-border: hsl(197, 37%, 91%); + + --warning-border: #ff8e00; + + --table-border-color: hsl(0, 0%, 95%); + --table-header-bg: hsl(0, 0%, 80%); + --table-alternate-bg: hsl(0, 0%, 97%); + + --searchbar-border-color: #aaa; + --searchbar-bg: #fafafa; + --searchbar-fg: #000; + --searchbar-shadow-color: #aaa; + --searchresults-header-fg: #666; + --searchresults-border-color: #888; + --searchresults-li-bg: #e4f2fe; + --search-mark-bg: #a2cff5; + + --color-scheme: light; + + /* Same as `--icons` */ + --copy-button-filter: invert(45.49%); + /* Same as `--sidebar-active` */ + --copy-button-filter-hover: invert(14%) sepia(93%) saturate(4250%) hue-rotate(243deg) brightness(99%) contrast(130%); + + --footnote-highlight: #7e7eff; + + --overlay-bg: rgba(200, 200, 205, 0.4); + + --blockquote-note-color: #0969da; + --blockquote-tip-color: #008000; + --blockquote-important-color: #8250df; + --blockquote-warning-color: #9a6700; + --blockquote-caution-color: #b52731; + + --sidebar-header-border-color: #6e6edb; +} + +.navy { + --bg: hsl(226, 23%, 11%); + --fg: #bcbdd0; + + --sidebar-bg: #282d3f; + --sidebar-fg: #c8c9db; + --sidebar-non-existant: #505274; + --sidebar-active: #2b79a2; + --sidebar-spacer: #2d334f; + + --scrollbar: var(--sidebar-fg); + + --icons: #737480; + --icons-hover: #b7b9cc; + + --links: #2b79a2; + + --inline-code-color: #c5c8c6; + + --theme-popup-bg: #161923; + --theme-popup-border: #737480; + --theme-hover: #282e40; + + --quote-bg: hsl(226, 15%, 17%); + --quote-border: hsl(226, 15%, 22%); + + --warning-border: #ff8e00; + + --table-border-color: hsl(226, 23%, 16%); + --table-header-bg: hsl(226, 23%, 31%); + --table-alternate-bg: hsl(226, 23%, 14%); + + --searchbar-border-color: #aaa; + --searchbar-bg: #aeaec6; + --searchbar-fg: #000; + --searchbar-shadow-color: #aaa; + --searchresults-header-fg: #5f5f71; + --searchresults-border-color: #5c5c68; + --searchresults-li-bg: #242430; + --search-mark-bg: #a2cff5; + + --color-scheme: dark; + + /* Same as `--icons` */ + --copy-button-filter: invert(51%) sepia(10%) saturate(393%) hue-rotate(198deg) brightness(86%) contrast(87%); + /* Same as `--sidebar-active` */ + --copy-button-filter-hover: invert(46%) sepia(20%) saturate(1537%) hue-rotate(156deg) brightness(85%) contrast(90%); + + --footnote-highlight: #4079ae; + + --overlay-bg: rgba(33, 40, 48, 0.4); + + --blockquote-note-color: #4493f8; + --blockquote-tip-color: #09ca09; + --blockquote-important-color: #ab7df8; + --blockquote-warning-color: #d29922; + --blockquote-caution-color: #f21424; + + --sidebar-header-border-color: #2f6ab5; +} + +.rust { + --bg: hsl(60, 9%, 87%); + --fg: #262625; + + --sidebar-bg: #3b2e2a; + --sidebar-fg: #c8c9db; + --sidebar-non-existant: #505254; + --sidebar-active: #e69f67; + --sidebar-spacer: #45373a; + + --scrollbar: var(--sidebar-fg); + + --icons: #737480; + --icons-hover: #262625; + + --links: #2b79a2; + + --inline-code-color: #6e6b5e; + + --theme-popup-bg: #e1e1db; + --theme-popup-border: #b38f6b; + --theme-hover: #99908a; + + --quote-bg: hsl(60, 5%, 75%); + --quote-border: hsl(60, 5%, 70%); + + --warning-border: #ff8e00; + + --table-border-color: hsl(60, 9%, 82%); + --table-header-bg: #b3a497; + --table-alternate-bg: hsl(60, 9%, 84%); + + --searchbar-border-color: #aaa; + --searchbar-bg: #fafafa; + --searchbar-fg: #000; + --searchbar-shadow-color: #aaa; + --searchresults-header-fg: #666; + --searchresults-border-color: #888; + --searchresults-li-bg: #dec2a2; + --search-mark-bg: #e69f67; + + /* Same as `--icons` */ + --copy-button-filter: invert(51%) sepia(10%) saturate(393%) hue-rotate(198deg) brightness(86%) contrast(87%); + /* Same as `--sidebar-active` */ + --copy-button-filter-hover: invert(77%) sepia(16%) saturate(1798%) hue-rotate(328deg) brightness(98%) contrast(83%); + + --footnote-highlight: #d3a17a; + + --overlay-bg: rgba(150, 150, 150, 0.25); + + --blockquote-note-color: #023b95; + --blockquote-tip-color: #007700; + --blockquote-important-color: #8250df; + --blockquote-warning-color: #603700; + --blockquote-caution-color: #aa1721; + + --sidebar-header-border-color: #8c391f; +} + +@media (prefers-color-scheme: dark) { + html:not(.js) { + --bg: hsl(200, 7%, 8%); + --fg: #98a3ad; + + --sidebar-bg: #292c2f; + --sidebar-fg: #a1adb8; + --sidebar-non-existant: #505254; + --sidebar-active: #3473ad; + --sidebar-spacer: #393939; + + --scrollbar: var(--sidebar-fg); + + --icons: #43484d; + --icons-hover: #b3c0cc; + + --links: #2b79a2; + + --inline-code-color: #c5c8c6; + + --theme-popup-bg: #141617; + --theme-popup-border: #43484d; + --theme-hover: #1f2124; + + --quote-bg: hsl(234, 21%, 18%); + --quote-border: hsl(234, 21%, 23%); + + --warning-border: #ff8e00; + + --table-border-color: hsl(200, 7%, 13%); + --table-header-bg: hsl(200, 7%, 28%); + --table-alternate-bg: hsl(200, 7%, 11%); + + --searchbar-border-color: #aaa; + --searchbar-bg: #b7b7b7; + --searchbar-fg: #000; + --searchbar-shadow-color: #aaa; + --searchresults-header-fg: #666; + --searchresults-border-color: #98a3ad; + --searchresults-li-bg: #2b2b2f; + --search-mark-bg: #355c7d; + + --color-scheme: dark; + + /* Same as `--icons` */ + --copy-button-filter: invert(26%) sepia(8%) saturate(575%) hue-rotate(169deg) brightness(87%) contrast(82%); + /* Same as `--sidebar-active` */ + --copy-button-filter-hover: invert(36%) sepia(70%) saturate(503%) hue-rotate(167deg) brightness(98%) contrast(89%); + + --footnote-highlight: #4079ae; + + --overlay-bg: rgba(33, 40, 48, 0.4); + + --blockquote-note-color: #4493f8; + --blockquote-tip-color: #08ae08; + --blockquote-important-color: #ab7df8; + --blockquote-warning-color: #d29922; + --blockquote-caution-color: #d91b29; + + --sidebar-header-border-color: #3473ad; + } +} diff --git a/docs/config-api-book/defs/registration.rhai b/docs/config-api-book/defs/registration.rhai new file mode 100644 index 0000000..752c140 --- /dev/null +++ b/docs/config-api-book/defs/registration.rhai @@ -0,0 +1,402 @@ +module static; + + + +/// Build a full bar specification from left, center, and right segments. +fn bar(_: UiApi, left: array, center: array, right: array) -> BarSpec; + +/// Create a [`BarSegment`] from a [`UiApi`] receiver and text using default styling. +/// +/// `segment(_: UiApi, text: String) -> BarSegment` produces plain text with default +/// [`StyleSpec`] values and no click target. +fn segment(_: UiApi, text: string) -> BarSegment; + +/// Create a [`BarSegment`] from a [`UiApi`] receiver, text, and an `options: Map`. +/// +/// `segment(_: UiApi, text: String, options: Map) -> BarSegment` supports `fg`, `bg`, +/// `bold`, `italic`, `underline`, `dim`, and `target` keys to override styling and attach an +/// optional interaction target. `dim` is a boolean that renders the text with reduced +/// intensity for a muted appearance. +fn segment(_: UiApi, text: string, options: map) -> BarSegment; + +/// Read an environment variable, if it is set. +/// +/// ReturnType: `string | ()` +fn env(_: SystemApi, name: string) -> ?; + +/// Return the current Unix timestamp in seconds. +fn now(_: SystemApi) -> int; + +/// Resolve an executable from `PATH`, if it is found. +/// +/// ReturnType: `string | ()` +fn which(_: SystemApi, name: string) -> ?; + +/// Attach an existing buffer by id. +fn buffer_attach(_: TreeApi, buffer_id: int) -> TreeSpec; + +/// Build a tree reference to the currently focused buffer. +fn buffer_current(_: TreeApi) -> TreeSpec; + +/// Build an empty buffer tree node. +fn buffer_empty(_: TreeApi) -> TreeSpec; + +/// Spawn a new buffer from a command array. +/// +/// Supported `options` keys are `title` (`string`), `cwd` (`string`), and `env` +/// (`map`). Unknown keys are rejected. +/// +/// # Example +/// +/// ```rhai +/// tree.buffer_spawn(["/bin/zsh"], #{ title: "shell" }) +/// ``` +fn buffer_spawn(_: TreeApi, command: array) -> TreeSpec; + +fn buffer_spawn(_: TreeApi, command: array, options: map) -> TreeSpec; + +/// Build a tree reference to the currently focused buffer. +fn current_buffer(_: TreeApi) -> TreeSpec; + +/// Build a tree reference to the currently focused node. +fn current_node(_: TreeApi) -> TreeSpec; + +/// Build a split with an explicit direction string. +fn split(_: TreeApi, direction: string, children: array) -> TreeSpec; + +/// Build a split with explicit sizes for each child. +fn split(_: TreeApi, direction: string, children: array, sizes: array) -> TreeSpec; + +/// Build a horizontal split. +fn split_h(_: TreeApi, children: array) -> TreeSpec; + +/// Build a vertical split. +fn split_v(_: TreeApi, children: array) -> TreeSpec; + +/// Build a single tab specification. +fn tab(_: TreeApi, title: string, tree: TreeSpec) -> TabSpec; + +/// Build a tabs container with the first tab active. +fn tabs(_: TreeApi, tabs: array) -> TreeSpec; + +/// Build a tabs container with an explicit active tab. +fn tabs_with_active(_: TreeApi, tabs: array, active: int) -> TreeSpec; + +/// Cancel the active search. +fn cancel_search(_: ActionApi) -> Action; + +/// Cancel the current selection. +fn cancel_selection(_: ActionApi) -> Action; + +/// Chain multiple actions into one composite action. +fn chain(_: ActionApi, actions: array) -> Action; + +/// Clear any partially-entered key sequence. +fn clear_pending_keys(_: ActionApi) -> Action; + +/// Close the currently focused floating window. +fn close_floating(_: ActionApi) -> Action; + +/// Close a floating window by id. +fn close_floating_id(_: ActionApi, floating_id: int) -> Action; + +/// Close a view by node id. +fn close_node(_: ActionApi, node_id: int) -> Action; + +/// Close the currently focused view. +fn close_view(_: ActionApi) -> Action; + +/// Copy the current selection into the clipboard. +fn copy_selection(_: ActionApi) -> Action; + +/// Detach the currently focused buffer. +fn detach_buffer(_: ActionApi) -> Action; + +/// Detach a buffer by id. +fn detach_buffer_id(_: ActionApi, buffer_id: int) -> Action; + +/// Enter a specific input mode by name. +fn enter_mode(_: ActionApi, mode: string) -> Action; + +/// Enter incremental search mode. +fn enter_search_mode(_: ActionApi) -> Action; + +/// Enter block selection mode. +fn enter_select_block(_: ActionApi) -> Action; + +/// Enter character selection mode. +fn enter_select_char(_: ActionApi) -> Action; + +/// Enter line selection mode. +fn enter_select_line(_: ActionApi) -> Action; + +/// Focus a specific buffer by id. +fn focus_buffer(_: ActionApi, buffer_id: int) -> Action; + +/// Focus the view below the current node. +fn focus_down(_: ActionApi) -> Action; + +/// Focus the view to the left of the current node. +/// +/// # Example +/// +/// ```rhai +/// action.focus_left() +/// ``` +fn focus_left(_: ActionApi) -> Action; + +/// Focus the view to the right of the current node. +fn focus_right(_: ActionApi) -> Action; + +/// Focus the view above the current node. +fn focus_up(_: ActionApi) -> Action; + +/// Re-enable following live output. +fn follow_output(_: ActionApi) -> Action; + +/// Insert a tab after a specific tabs node. +fn insert_tab_after(_: ActionApi, tabs_node_id: int, title: string, tree: TreeSpec) -> Action; + +/// Insert a tab after the current tab in the focused tabs node. +fn insert_tab_after_current(_: ActionApi, title: string, tree: TreeSpec) -> Action; + +/// Insert a tab before a specific tabs node. +fn insert_tab_before(_: ActionApi, tabs_node_id: int, title: string, tree: TreeSpec) -> Action; + +/// Insert a tab before the current tab. +fn insert_tab_before_current(_: ActionApi, title: string, tree: TreeSpec) -> Action; + +/// Kill the currently focused buffer. +fn kill_buffer(_: ActionApi) -> Action; + +/// Kill a buffer by id. +fn kill_buffer_id(_: ActionApi, buffer_id: int) -> Action; + +/// Leave the active input mode. +fn leave_mode(_: ActionApi) -> Action; + +/// Move a buffer into a new floating window. +/// +/// # Options +/// +/// - `x` (i16): horizontal offset from the anchor (default: 0) +/// - `y` (i16): vertical offset from the anchor (default: 0) +/// - `width` (FloatingSize): window width, as a percentage (e.g., 50%) or pixel value (default: 50%) +/// - `height` (FloatingSize): window height, as a percentage or pixel value (default: 50%) +/// - `anchor` (FloatingAnchor): anchor point for positioning, e.g., "top_left", "center" (default: center) +/// - `title` (Option\): window title (default: none) +/// - `focus` (bool): whether to focus the window after creation (default: true) +/// - `close_on_empty` (bool): whether to close the window when its buffer empties (default: true) +fn move_buffer_to_floating(_: ActionApi, buffer_id: int, options: map) -> Action; + +/// Move a buffer into a specific node. +fn move_buffer_to_node(_: ActionApi, buffer_id: int, node_id: int) -> Action; + +/// Select the next tab in the currently focused tabs node. +fn next_current_tabs(_: ActionApi) -> Action; + +/// Select the next tab in a specific tabs node. +fn next_tab(_: ActionApi, tabs_node_id: int) -> Action; + +/// Build a no-op action. +fn noop(_: ActionApi) -> Action; + +/// Emit a client notification. +fn notify(_: ActionApi, level: string, message: string) -> Action; + +/// Open a floating view around the provided tree. +fn open_floating(_: ActionApi, tree: TreeSpec, options: map) -> Action; + +/// Select the previous tab in the currently focused tabs node. +fn prev_current_tabs(_: ActionApi) -> Action; + +/// Select the previous tab in a specific tabs node. +fn prev_tab(_: ActionApi, tabs_node_id: int) -> Action; + +/// Replace the focused node with a new tree. +fn replace_current_with(_: ActionApi, tree: TreeSpec) -> Action; + +/// Replace a specific node by id with a new tree. +fn replace_node(_: ActionApi, node_id: int, tree: TreeSpec) -> Action; + +/// Reveal a specific buffer by id. +fn reveal_buffer(_: ActionApi, buffer_id: int) -> Action; + +/// Run another named action by name. +fn run_named_action(_: ActionApi, name: string) -> Action; + +/// Scroll one line downward in local scrollback. +fn scroll_line_down(_: ActionApi) -> Action; + +/// Scroll one line upward in local scrollback. +fn scroll_line_up(_: ActionApi) -> Action; + +/// Scroll one page downward in local scrollback. +fn scroll_page_down(_: ActionApi) -> Action; + +/// Scroll one page upward in local scrollback. +fn scroll_page_up(_: ActionApi) -> Action; + +/// Scroll to the bottom of local scrollback. +fn scroll_to_bottom(_: ActionApi) -> Action; + +/// Scroll to the top of local scrollback. +fn scroll_to_top(_: ActionApi) -> Action; + +/// Jump to the next search match. +fn search_next(_: ActionApi) -> Action; + +/// Jump to the previous search match. +fn search_prev(_: ActionApi) -> Action; + +/// Select a tab by index in the currently focused tabs node. +fn select_current_tabs(_: ActionApi, index: int) -> Action; + +/// Move the active selection down. +fn select_move_down(_: ActionApi) -> Action; + +/// Move the active selection left. +fn select_move_left(_: ActionApi) -> Action; + +/// Move the active selection right. +fn select_move_right(_: ActionApi) -> Action; + +/// Move the active selection up. +fn select_move_up(_: ActionApi) -> Action; + +/// Select a tab by index in a specific tabs node. +fn select_tab(_: ActionApi, tabs_node_id: int, index: int) -> Action; + +/// Send a string of bytes to a specific buffer. +fn send_bytes(_: ActionApi, buffer_id: int, bytes: string) -> Action; + +/// Send raw byte values to a specific buffer. +fn send_bytes(_: ActionApi, buffer_id: int, bytes: array) -> Action; + +/// Send a string of bytes to the focused buffer. +fn send_bytes_current(_: ActionApi, bytes: string) -> Action; + +/// Send raw byte values to the focused buffer. +/// +/// Use this when you need to emit an exact byte sequence instead of key notation. +/// +/// # Example +/// +/// ```rhai +/// // Send the ANSI "cursor up" sequence: ESC [ A +/// action.send_bytes_current([0x1b, 0x5b, 0x41]) +/// ``` +fn send_bytes_current(_: ActionApi, bytes: array) -> Action; + +/// Send a key notation sequence to a specific buffer. +fn send_keys(_: ActionApi, buffer_id: int, notation: string) -> Action; + +/// Send a key notation sequence to the focused buffer. +fn send_keys_current(_: ActionApi, notation: string) -> Action; + +/// Split the current node and attach the provided tree as the new sibling. +fn split_with(_: ActionApi, direction: string, tree: TreeSpec) -> Action; + +/// Toggle a named input mode. +fn toggle_mode(_: ActionApi, mode: string) -> Action; + +/// Copy the current selection into the clipboard. +fn yank_selection(_: ActionApi) -> Action; + +/// Toggle focus-on-click behavior. +/// +/// # rhai-autodocs:index:22 +fn set_click_focus(mouse: MouseApi, value: bool) -> (); + +/// Toggle forwarding mouse clicks into the focused buffer. +/// +/// # rhai-autodocs:index:23 +fn set_click_forward(mouse: MouseApi, value: bool) -> (); + +/// Toggle wheel event forwarding into the focused buffer. +/// +/// # rhai-autodocs:index:25 +fn set_wheel_forward(mouse: MouseApi, value: bool) -> (); + +/// Toggle client-side wheel scrolling. +/// +/// # rhai-autodocs:index:24 +fn set_wheel_scroll(mouse: MouseApi, value: bool) -> (); + +/// Add named colors to the theme palette. +/// +/// # rhai-autodocs:index:21 +fn set_palette(theme: ThemeApi, palette: map) -> (); + +/// Register the function used to format the tab bar. +/// +/// # rhai-autodocs:index:20 +fn set_formatter(tabbar: TabbarApi, callback: Fn) -> (); + +fn bind(mode: string, notation: string, action: Action) -> (); + +/// Bind a key notation to an [`Action`], a string action name, or an array of actions. +/// +/// Use the `Action` overload for inline builders such as `action.focus_left()`, the string +/// overload for a named action registered with `define_action`, or an array to chain multiple +/// actions in sequence. +/// +/// # Example +/// +/// ```rhai +/// bind("normal", "ws", "workspace-split"); +/// ``` +/// +/// # rhai-autodocs:index:4 +fn bind(mode: string, notation: string, action_name: string) -> (); + +fn bind(mode: string, notation: string, actions: array) -> (); + +/// Register a function pointer as a named action callable from bindings. +/// +/// # rhai-autodocs:index:6 +fn define_action(name: string, callback: Fn) -> (); + +fn define_mode(mode_name: string) -> (); + +/// Define a custom input mode with hooks and fallback options. +/// +/// Supported options are `fallback`, `on_enter`, and `on_leave`. +/// +/// # rhai-autodocs:index:3 +fn define_mode(mode_name: string, options: map) -> (); + +/// Attach a callback to an emitted event such as `buffer_bell`. +/// +/// # rhai-autodocs:index:7 +fn on(event_name: string, callback: Fn) -> (); + +/// Set the leader sequence used in binding notations. +/// +/// # Example +/// +/// ```rhai +/// set_leader(""); +/// ``` +/// +/// # rhai-autodocs:index:1 +fn set_leader(notation: string) -> (); + +/// Remove a previously bound key sequence. +/// +/// # rhai-autodocs:index:5 +fn unbind(mode: string, notation: string) -> (); + +let system: SystemApi; + +let action: ActionApi; + +let tree: TreeApi; + +let ui: UiApi; + +let tabbar: TabbarApi; + +let theme: ThemeApi; + +let mouse: MouseApi; diff --git a/docs/config-api-book/defs/runtime.rhai b/docs/config-api-book/defs/runtime.rhai new file mode 100644 index 0000000..0063e88 --- /dev/null +++ b/docs/config-api-book/defs/runtime.rhai @@ -0,0 +1,656 @@ +module static; + + + +/// Read a named color from the active runtime palette, if it exists. +/// +/// ReturnType: `RgbColor | ()` +fn color(theme: ThemeRuntimeApi, name: string) -> ?; + +/// Build a full bar specification from left, center, and right segments. +fn bar(_: UiApi, left: array, center: array, right: array) -> BarSpec; + +/// Create a [`BarSegment`] from a [`UiApi`] receiver and text using default styling. +/// +/// `segment(_: UiApi, text: String) -> BarSegment` produces plain text with default +/// [`StyleSpec`] values and no click target. +fn segment(_: UiApi, text: string) -> BarSegment; + +/// Create a [`BarSegment`] from a [`UiApi`] receiver, text, and an `options: Map`. +/// +/// `segment(_: UiApi, text: String, options: Map) -> BarSegment` supports `fg`, `bg`, +/// `bold`, `italic`, `underline`, `dim`, and `target` keys to override styling and attach an +/// optional interaction target. `dim` is a boolean that renders the text with reduced +/// intensity for a muted appearance. +fn segment(_: UiApi, text: string, options: map) -> BarSegment; + +/// Read an environment variable, if it is set. +/// +/// ReturnType: `string | ()` +fn env(_: SystemApi, name: string) -> ?; + +/// Return the current Unix timestamp in seconds. +fn now(_: SystemApi) -> int; + +/// Resolve an executable from `PATH`, if it is found. +/// +/// ReturnType: `string | ()` +fn which(_: SystemApi, name: string) -> ?; + +/// Return the currently focused buffer, if any. +/// +/// ReturnType: `BufferRef | ()` +fn current_buffer(mux: MuxApi) -> ?; + +/// Return the currently focused floating window, if any. +/// +/// ReturnType: `FloatingRef | ()` +fn current_floating(mux: MuxApi) -> ?; + +/// Return the currently focused node, if any. +/// +/// ReturnType: `NodeRef | ()` +fn current_node(mux: MuxApi) -> ?; + +/// Return the current session reference, if any. +/// +/// ReturnType: `SessionRef | ()` +fn current_session(mux: MuxApi) -> ?; + +/// Return detached buffers in the current model snapshot. +fn detached_buffers(mux: MuxApi) -> array; + +/// Find a buffer by numeric id. Returns `()` when it does not exist. +/// +/// ReturnType: `BufferRef | ()` +fn find_buffer(mux: MuxApi, buffer_id: int) -> ?; + +/// Find a floating window by numeric id. Returns `()` when it does not exist. +/// +/// ReturnType: `FloatingRef | ()` +fn find_floating(mux: MuxApi, floating_id: int) -> ?; + +/// Find a node by numeric id. Returns `()` when it does not exist. +/// +/// ReturnType: `NodeRef | ()` +fn find_node(mux: MuxApi, node_id: int) -> ?; + +/// Return every visible session. +fn sessions(mux: MuxApi) -> array; + +/// Return visible buffers in the current model snapshot. +fn visible_buffers(mux: MuxApi) -> array; + +/// Attach an existing buffer by id. +fn buffer_attach(_: TreeApi, buffer_id: int) -> TreeSpec; + +/// Build a tree reference to the currently focused buffer. +fn buffer_current(_: TreeApi) -> TreeSpec; + +/// Build an empty buffer tree node. +fn buffer_empty(_: TreeApi) -> TreeSpec; + +/// Spawn a new buffer from a command array. +/// +/// Supported `options` keys are `title` (`string`), `cwd` (`string`), and `env` +/// (`map`). Unknown keys are rejected. +/// +/// # Example +/// +/// ```rhai +/// tree.buffer_spawn(["/bin/zsh"], #{ title: "shell" }) +/// ``` +fn buffer_spawn(_: TreeApi, command: array) -> TreeSpec; + +fn buffer_spawn(_: TreeApi, command: array, options: map) -> TreeSpec; + +/// Build a tree reference to the currently focused buffer. +fn current_buffer(_: TreeApi) -> TreeSpec; + +/// Build a tree reference to the currently focused node. +fn current_node(_: TreeApi) -> TreeSpec; + +/// Build a split with an explicit direction string. +fn split(_: TreeApi, direction: string, children: array) -> TreeSpec; + +/// Build a split with explicit sizes for each child. +fn split(_: TreeApi, direction: string, children: array, sizes: array) -> TreeSpec; + +/// Build a horizontal split. +fn split_h(_: TreeApi, children: array) -> TreeSpec; + +/// Build a vertical split. +fn split_v(_: TreeApi, children: array) -> TreeSpec; + +/// Build a single tab specification. +fn tab(_: TreeApi, title: string, tree: TreeSpec) -> TabSpec; + +/// Build a tabs container with the first tab active. +fn tabs(_: TreeApi, tabs: array) -> TreeSpec; + +/// Build a tabs container with an explicit active tab. +fn tabs_with_active(_: TreeApi, tabs: array, active: int) -> TreeSpec; + +/// Cancel the active search. +fn cancel_search(_: ActionApi) -> Action; + +/// Cancel the current selection. +fn cancel_selection(_: ActionApi) -> Action; + +/// Chain multiple actions into one composite action. +fn chain(_: ActionApi, actions: array) -> Action; + +/// Clear any partially-entered key sequence. +fn clear_pending_keys(_: ActionApi) -> Action; + +/// Close the currently focused floating window. +fn close_floating(_: ActionApi) -> Action; + +/// Close a floating window by id. +fn close_floating_id(_: ActionApi, floating_id: int) -> Action; + +/// Close a view by node id. +fn close_node(_: ActionApi, node_id: int) -> Action; + +/// Close the currently focused view. +fn close_view(_: ActionApi) -> Action; + +/// Copy the current selection into the clipboard. +fn copy_selection(_: ActionApi) -> Action; + +/// Detach the currently focused buffer. +fn detach_buffer(_: ActionApi) -> Action; + +/// Detach a buffer by id. +fn detach_buffer_id(_: ActionApi, buffer_id: int) -> Action; + +/// Enter a specific input mode by name. +fn enter_mode(_: ActionApi, mode: string) -> Action; + +/// Enter incremental search mode. +fn enter_search_mode(_: ActionApi) -> Action; + +/// Enter block selection mode. +fn enter_select_block(_: ActionApi) -> Action; + +/// Enter character selection mode. +fn enter_select_char(_: ActionApi) -> Action; + +/// Enter line selection mode. +fn enter_select_line(_: ActionApi) -> Action; + +/// Focus a specific buffer by id. +fn focus_buffer(_: ActionApi, buffer_id: int) -> Action; + +/// Focus the view below the current node. +fn focus_down(_: ActionApi) -> Action; + +/// Focus the view to the left of the current node. +/// +/// # Example +/// +/// ```rhai +/// action.focus_left() +/// ``` +fn focus_left(_: ActionApi) -> Action; + +/// Focus the view to the right of the current node. +fn focus_right(_: ActionApi) -> Action; + +/// Focus the view above the current node. +fn focus_up(_: ActionApi) -> Action; + +/// Re-enable following live output. +fn follow_output(_: ActionApi) -> Action; + +/// Insert a tab after a specific tabs node. +fn insert_tab_after(_: ActionApi, tabs_node_id: int, title: string, tree: TreeSpec) -> Action; + +/// Insert a tab after the current tab in the focused tabs node. +fn insert_tab_after_current(_: ActionApi, title: string, tree: TreeSpec) -> Action; + +/// Insert a tab before a specific tabs node. +fn insert_tab_before(_: ActionApi, tabs_node_id: int, title: string, tree: TreeSpec) -> Action; + +/// Insert a tab before the current tab. +fn insert_tab_before_current(_: ActionApi, title: string, tree: TreeSpec) -> Action; + +/// Kill the currently focused buffer. +fn kill_buffer(_: ActionApi) -> Action; + +/// Kill a buffer by id. +fn kill_buffer_id(_: ActionApi, buffer_id: int) -> Action; + +/// Leave the active input mode. +fn leave_mode(_: ActionApi) -> Action; + +/// Move a buffer into a new floating window. +/// +/// # Options +/// +/// - `x` (i16): horizontal offset from the anchor (default: 0) +/// - `y` (i16): vertical offset from the anchor (default: 0) +/// - `width` (FloatingSize): window width, as a percentage (e.g., 50%) or pixel value (default: 50%) +/// - `height` (FloatingSize): window height, as a percentage or pixel value (default: 50%) +/// - `anchor` (FloatingAnchor): anchor point for positioning, e.g., "top_left", "center" (default: center) +/// - `title` (Option\): window title (default: none) +/// - `focus` (bool): whether to focus the window after creation (default: true) +/// - `close_on_empty` (bool): whether to close the window when its buffer empties (default: true) +fn move_buffer_to_floating(_: ActionApi, buffer_id: int, options: map) -> Action; + +/// Move a buffer into a specific node. +fn move_buffer_to_node(_: ActionApi, buffer_id: int, node_id: int) -> Action; + +/// Select the next tab in the currently focused tabs node. +fn next_current_tabs(_: ActionApi) -> Action; + +/// Select the next tab in a specific tabs node. +fn next_tab(_: ActionApi, tabs_node_id: int) -> Action; + +/// Build a no-op action. +fn noop(_: ActionApi) -> Action; + +/// Emit a client notification. +fn notify(_: ActionApi, level: string, message: string) -> Action; + +/// Open a floating view around the provided tree. +fn open_floating(_: ActionApi, tree: TreeSpec, options: map) -> Action; + +/// Select the previous tab in the currently focused tabs node. +fn prev_current_tabs(_: ActionApi) -> Action; + +/// Select the previous tab in a specific tabs node. +fn prev_tab(_: ActionApi, tabs_node_id: int) -> Action; + +/// Replace the focused node with a new tree. +fn replace_current_with(_: ActionApi, tree: TreeSpec) -> Action; + +/// Replace a specific node by id with a new tree. +fn replace_node(_: ActionApi, node_id: int, tree: TreeSpec) -> Action; + +/// Reveal a specific buffer by id. +fn reveal_buffer(_: ActionApi, buffer_id: int) -> Action; + +/// Run another named action by name. +fn run_named_action(_: ActionApi, name: string) -> Action; + +/// Scroll one line downward in local scrollback. +fn scroll_line_down(_: ActionApi) -> Action; + +/// Scroll one line upward in local scrollback. +fn scroll_line_up(_: ActionApi) -> Action; + +/// Scroll one page downward in local scrollback. +fn scroll_page_down(_: ActionApi) -> Action; + +/// Scroll one page upward in local scrollback. +fn scroll_page_up(_: ActionApi) -> Action; + +/// Scroll to the bottom of local scrollback. +fn scroll_to_bottom(_: ActionApi) -> Action; + +/// Scroll to the top of local scrollback. +fn scroll_to_top(_: ActionApi) -> Action; + +/// Jump to the next search match. +fn search_next(_: ActionApi) -> Action; + +/// Jump to the previous search match. +fn search_prev(_: ActionApi) -> Action; + +/// Select a tab by index in the currently focused tabs node. +fn select_current_tabs(_: ActionApi, index: int) -> Action; + +/// Move the active selection down. +fn select_move_down(_: ActionApi) -> Action; + +/// Move the active selection left. +fn select_move_left(_: ActionApi) -> Action; + +/// Move the active selection right. +fn select_move_right(_: ActionApi) -> Action; + +/// Move the active selection up. +fn select_move_up(_: ActionApi) -> Action; + +/// Select a tab by index in a specific tabs node. +fn select_tab(_: ActionApi, tabs_node_id: int, index: int) -> Action; + +/// Send a string of bytes to a specific buffer. +fn send_bytes(_: ActionApi, buffer_id: int, bytes: string) -> Action; + +/// Send raw byte values to a specific buffer. +fn send_bytes(_: ActionApi, buffer_id: int, bytes: array) -> Action; + +/// Send a string of bytes to the focused buffer. +fn send_bytes_current(_: ActionApi, bytes: string) -> Action; + +/// Send raw byte values to the focused buffer. +/// +/// Use this when you need to emit an exact byte sequence instead of key notation. +/// +/// # Example +/// +/// ```rhai +/// // Send the ANSI "cursor up" sequence: ESC [ A +/// action.send_bytes_current([0x1b, 0x5b, 0x41]) +/// ``` +fn send_bytes_current(_: ActionApi, bytes: array) -> Action; + +/// Send a key notation sequence to a specific buffer. +fn send_keys(_: ActionApi, buffer_id: int, notation: string) -> Action; + +/// Send a key notation sequence to the focused buffer. +fn send_keys_current(_: ActionApi, notation: string) -> Action; + +/// Split the current node and attach the provided tree as the new sibling. +fn split_with(_: ActionApi, direction: string, tree: TreeSpec) -> Action; + +/// Toggle a named input mode. +fn toggle_mode(_: ActionApi, mode: string) -> Action; + +/// Copy the current selection into the clipboard. +fn yank_selection(_: ActionApi) -> Action; + +/// Return the active tab index. +fn active_index(bar: TabBarContext) -> int; + +/// Return the active tab index, if any. +/// +/// ReturnType: `int | ()` +fn active_tab_index(node: NodeRef) -> ?; + +/// Return the current activity state name. +fn activity(buffer: BufferRef) -> String; + +/// Return the attached buffer id, if any. +/// +/// ReturnType: `int | ()` +fn buffer(node: NodeRef) -> ?; + +/// Return how many buffers are attached to the tab. +fn buffer_count(tab: TabInfo) -> int; + +/// Return the buffer id attached to an event, or `()`. +/// +/// ReturnType: `int | ()` +fn buffer_id(event: EventInfo) -> ?; + +/// Return child node ids. +fn children(node: NodeRef) -> array; + +/// Return the original command vector. +fn command(buffer: BufferRef) -> array; + +/// Return the working directory, if any. +/// +/// ReturnType: `string | ()` +fn cwd(buffer: BufferRef) -> ?; + +/// Look up a single environment hint captured on the buffer. +/// +/// ReturnType: `string | ()` +fn env_hint(buffer: BufferRef, key: string) -> ?; + +/// Return the process exit code, if any. +/// +/// ReturnType: `int | ()` +fn exit_code(buffer: BufferRef) -> ?; + +/// Return floating window ids attached to the session. +fn floating(session: SessionRef) -> array; + +/// Return the floating id attached to an event, or `()`. +/// +/// ReturnType: `int | ()` +fn floating_id(event: EventInfo) -> ?; + +/// Return the floating geometry map. +fn geometry(floating: FloatingRef) -> map; + +/// Return the geometry map, if any. +/// +/// ReturnType: `Map | ()` +fn geometry(node: NodeRef) -> ?; + +/// Return whether the tab has activity. +fn has_activity(tab: TabInfo) -> bool; + +/// Return whether the tab has a bell marker. +fn has_bell(tab: TabInfo) -> bool; + +/// Return the full captured history text for the buffer. +/// +/// # Example +/// +/// ```rhai +/// let buffer = ctx.current_buffer(); +/// if buffer != () { +/// let history = buffer.history_text(); +/// } +/// ``` +fn history_text(buffer: BufferRef) -> String; + +/// Return the numeric buffer id. +fn id(buffer: BufferRef) -> int; + +/// Return the floating id. +fn id(floating: FloatingRef) -> int; + +/// Return the node id. +fn id(node: NodeRef) -> int; + +/// Return the numeric session id. +fn id(session: SessionRef) -> int; + +/// Return the zero-based tab index. +fn index(tab: TabInfo) -> int; + +/// Return whether the tab is active. +fn is_active(tab: TabInfo) -> bool; + +/// Return whether the buffer is currently attached to a node. +fn is_attached(buffer: BufferRef) -> bool; + +/// Return whether the buffer has been detached. +fn is_detached(buffer: BufferRef) -> bool; + +/// Return whether the node is the root of a floating window. +fn is_floating_root(node: NodeRef) -> bool; + +/// Return whether the floating is focused. +fn is_focused(floating: FloatingRef) -> bool; + +/// Return whether the node is focused. +fn is_focused(node: NodeRef) -> bool; + +/// Return whether the formatted tabs are the root tabs. +fn is_root(bar: TabBarContext) -> bool; + +/// Return whether the node is the session root. +fn is_root(node: NodeRef) -> bool; + +/// Return whether the buffer process is still running. +fn is_running(buffer: BufferRef) -> bool; + +/// Return whether the buffer is visible in the current presentation. +fn is_visible(buffer: BufferRef) -> bool; + +/// Return whether the floating is visible. +fn is_visible(floating: FloatingRef) -> bool; + +/// Return whether the node is visible in the current presentation. +fn is_visible(node: NodeRef) -> bool; + +/// Return the node kind such as `buffer_view`, `split`, or `tabs`. +fn kind(node: NodeRef) -> String; + +/// Return the formatter mode name. +fn mode(bar: TabBarContext) -> String; + +/// Return the event name. +fn name(event: EventInfo) -> String; + +/// Return the session name. +fn name(session: SessionRef) -> String; + +/// Return the tabs node id currently being formatted. +fn node_id(bar: TabBarContext) -> int; + +/// Return the attached node id, if any. +/// +/// ReturnType: `int | ()` +fn node_id(buffer: BufferRef) -> ?; + +/// Return the node id attached to an event, or `()`. +/// +/// ReturnType: `int | ()` +fn node_id(event: EventInfo) -> ?; + +/// Return the parent node id, if any. +/// +/// ReturnType: `int | ()` +fn parent(node: NodeRef) -> ?; + +/// Return the process id, if any. +/// +/// ReturnType: `int | ()` +fn pid(buffer: BufferRef) -> ?; + +/// Return the detected process name, if any. +/// +/// ReturnType: `string | ()` +fn process_name(buffer: BufferRef) -> ?; + +/// Return the root node id. +fn root_node(floating: FloatingRef) -> int; + +/// Return the root tabs node for the session. +fn root_node(session: SessionRef) -> int; + +/// Return the attached session id, if any. +/// +/// ReturnType: `int | ()` +fn session_id(buffer: BufferRef) -> ?; + +/// Return the session id attached to an event, or `()`. +/// +/// ReturnType: `int | ()` +fn session_id(event: EventInfo) -> ?; + +/// Return the owning session id. +fn session_id(floating: FloatingRef) -> int; + +/// Return the owning session id. +fn session_id(node: NodeRef) -> int; + +/// Return a text snapshot limited to the requested line count. +fn snapshot_text(buffer: BufferRef, limit: int) -> String; + +/// Return the split direction, if any. +/// +/// ReturnType: `string | ()` +fn split_direction(node: NodeRef) -> ?; + +/// Return split weights, if any. +/// +/// ReturnType: `Array | ()` +fn split_weights(node: NodeRef) -> ?; + +/// Return tab titles on a tabs node. +fn tab_titles(node: NodeRef) -> array; + +/// Return tab metadata used by the formatter. +fn tabs(bar: TabBarContext) -> array; + +/// Return the buffer title. +fn title(buffer: BufferRef) -> String; + +/// Return the floating title, if any. +/// +/// ReturnType: `string | ()` +fn title(floating: FloatingRef) -> ?; + +/// Return the tab title. +fn title(tab: TabInfo) -> String; + +/// Return the controlling TTY path, if any. +/// +/// ReturnType: `string | ()` +fn tty_path(buffer: BufferRef) -> ?; + +/// Return the formatter viewport width in cells. +fn viewport_width(bar: TabBarContext) -> int; + +/// Return the currently focused buffer, if any. +/// +/// ReturnType: `BufferRef | ()` +/// +/// # Example +/// +/// ```rhai +/// let buffer = ctx.current_buffer(); +/// if buffer != () { +/// print(buffer.title()); +/// } +/// ``` +fn current_buffer(context: Context) -> ?; + +/// Return the currently focused floating window, if any. +/// +/// ReturnType: `FloatingRef | ()` +fn current_floating(context: Context) -> ?; + +/// Return the active input mode name. +fn current_mode(context: Context) -> String; + +/// Return the currently focused node, if any. +/// +/// ReturnType: `NodeRef | ()` +fn current_node(context: Context) -> ?; + +/// Return the current session reference, if any. +/// +/// ReturnType: `SessionRef | ()` +fn current_session(context: Context) -> ?; + +/// Return detached buffers in the current model snapshot. +fn detached_buffers(context: Context) -> array; + +/// Return the current event payload, if any. +/// +/// ReturnType: `EventInfo | ()` +fn event(context: Context) -> ?; + +/// Find a buffer by numeric id. Returns `()` when it does not exist. +/// +/// ReturnType: `BufferRef | ()` +fn find_buffer(context: Context, buffer_id: int) -> ?; + +/// Find a floating window by numeric id. Returns `()` when it does not exist. +/// +/// ReturnType: `FloatingRef | ()` +fn find_floating(context: Context, floating_id: int) -> ?; + +/// Find a node by numeric id. Returns `()` when it does not exist. +/// +/// ReturnType: `NodeRef | ()` +fn find_node(context: Context, node_id: int) -> ?; + +/// Return every visible session. +fn sessions(context: Context) -> array; + +/// Return visible buffers in the current model snapshot. +fn visible_buffers(context: Context) -> array; + +let system: SystemApi; + +let action: ActionApi; + +let tree: TreeApi; + +let ui: UiApi; + +let theme: ThemeRuntimeApi; + +let mux: MuxApi; diff --git a/docs/config-api-book/elasticlunr-ef4e11c1.min.js b/docs/config-api-book/elasticlunr-ef4e11c1.min.js new file mode 100644 index 0000000..94b20dd --- /dev/null +++ b/docs/config-api-book/elasticlunr-ef4e11c1.min.js @@ -0,0 +1,10 @@ +/** + * elasticlunr - http://weixsong.github.io + * Lightweight full-text search engine in Javascript for browser search and offline search. - 0.9.5 + * + * Copyright (C) 2017 Oliver Nightingale + * Copyright (C) 2017 Wei Song + * MIT Licensed + * @license + */ +!function(){function e(e){if(null===e||"object"!=typeof e)return e;var t=e.constructor();for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n]);return t}var t=function(e){var n=new t.Index;return n.pipeline.add(t.trimmer,t.stopWordFilter,t.stemmer),e&&e.call(n,n),n};t.version="0.9.5",lunr=t,t.utils={},t.utils.warn=function(e){return function(t){e.console&&console.warn&&console.warn(t)}}(this),t.utils.toString=function(e){return void 0===e||null===e?"":e.toString()},t.EventEmitter=function(){this.events={}},t.EventEmitter.prototype.addListener=function(){var e=Array.prototype.slice.call(arguments),t=e.pop(),n=e;if("function"!=typeof t)throw new TypeError("last argument must be a function");n.forEach(function(e){this.hasHandler(e)||(this.events[e]=[]),this.events[e].push(t)},this)},t.EventEmitter.prototype.removeListener=function(e,t){if(this.hasHandler(e)){var n=this.events[e].indexOf(t);-1!==n&&(this.events[e].splice(n,1),0==this.events[e].length&&delete this.events[e])}},t.EventEmitter.prototype.emit=function(e){if(this.hasHandler(e)){var t=Array.prototype.slice.call(arguments,1);this.events[e].forEach(function(e){e.apply(void 0,t)},this)}},t.EventEmitter.prototype.hasHandler=function(e){return e in this.events},t.tokenizer=function(e){if(!arguments.length||null===e||void 0===e)return[];if(Array.isArray(e)){var n=e.filter(function(e){return null===e||void 0===e?!1:!0});n=n.map(function(e){return t.utils.toString(e).toLowerCase()});var i=[];return n.forEach(function(e){var n=e.split(t.tokenizer.seperator);i=i.concat(n)},this),i}return e.toString().trim().toLowerCase().split(t.tokenizer.seperator)},t.tokenizer.defaultSeperator=/[\s\-]+/,t.tokenizer.seperator=t.tokenizer.defaultSeperator,t.tokenizer.setSeperator=function(e){null!==e&&void 0!==e&&"object"==typeof e&&(t.tokenizer.seperator=e)},t.tokenizer.resetSeperator=function(){t.tokenizer.seperator=t.tokenizer.defaultSeperator},t.tokenizer.getSeperator=function(){return t.tokenizer.seperator},t.Pipeline=function(){this._queue=[]},t.Pipeline.registeredFunctions={},t.Pipeline.registerFunction=function(e,n){n in t.Pipeline.registeredFunctions&&t.utils.warn("Overwriting existing registered function: "+n),e.label=n,t.Pipeline.registeredFunctions[n]=e},t.Pipeline.getRegisteredFunction=function(e){return e in t.Pipeline.registeredFunctions!=!0?null:t.Pipeline.registeredFunctions[e]},t.Pipeline.warnIfFunctionNotRegistered=function(e){var n=e.label&&e.label in this.registeredFunctions;n||t.utils.warn("Function is not registered with pipeline. This may cause problems when serialising the index.\n",e)},t.Pipeline.load=function(e){var n=new t.Pipeline;return e.forEach(function(e){var i=t.Pipeline.getRegisteredFunction(e);if(!i)throw new Error("Cannot load un-registered function: "+e);n.add(i)}),n},t.Pipeline.prototype.add=function(){var e=Array.prototype.slice.call(arguments);e.forEach(function(e){t.Pipeline.warnIfFunctionNotRegistered(e),this._queue.push(e)},this)},t.Pipeline.prototype.after=function(e,n){t.Pipeline.warnIfFunctionNotRegistered(n);var i=this._queue.indexOf(e);if(-1===i)throw new Error("Cannot find existingFn");this._queue.splice(i+1,0,n)},t.Pipeline.prototype.before=function(e,n){t.Pipeline.warnIfFunctionNotRegistered(n);var i=this._queue.indexOf(e);if(-1===i)throw new Error("Cannot find existingFn");this._queue.splice(i,0,n)},t.Pipeline.prototype.remove=function(e){var t=this._queue.indexOf(e);-1!==t&&this._queue.splice(t,1)},t.Pipeline.prototype.run=function(e){for(var t=[],n=e.length,i=this._queue.length,o=0;n>o;o++){for(var r=e[o],s=0;i>s&&(r=this._queue[s](r,o,e),void 0!==r&&null!==r);s++);void 0!==r&&null!==r&&t.push(r)}return t},t.Pipeline.prototype.reset=function(){this._queue=[]},t.Pipeline.prototype.get=function(){return this._queue},t.Pipeline.prototype.toJSON=function(){return this._queue.map(function(e){return t.Pipeline.warnIfFunctionNotRegistered(e),e.label})},t.Index=function(){this._fields=[],this._ref="id",this.pipeline=new t.Pipeline,this.documentStore=new t.DocumentStore,this.index={},this.eventEmitter=new t.EventEmitter,this._idfCache={},this.on("add","remove","update",function(){this._idfCache={}}.bind(this))},t.Index.prototype.on=function(){var e=Array.prototype.slice.call(arguments);return this.eventEmitter.addListener.apply(this.eventEmitter,e)},t.Index.prototype.off=function(e,t){return this.eventEmitter.removeListener(e,t)},t.Index.load=function(e){e.version!==t.version&&t.utils.warn("version mismatch: current "+t.version+" importing "+e.version);var n=new this;n._fields=e.fields,n._ref=e.ref,n.documentStore=t.DocumentStore.load(e.documentStore),n.pipeline=t.Pipeline.load(e.pipeline),n.index={};for(var i in e.index)n.index[i]=t.InvertedIndex.load(e.index[i]);return n},t.Index.prototype.addField=function(e){return this._fields.push(e),this.index[e]=new t.InvertedIndex,this},t.Index.prototype.setRef=function(e){return this._ref=e,this},t.Index.prototype.saveDocument=function(e){return this.documentStore=new t.DocumentStore(e),this},t.Index.prototype.addDoc=function(e,n){if(e){var n=void 0===n?!0:n,i=e[this._ref];this.documentStore.addDoc(i,e),this._fields.forEach(function(n){var o=this.pipeline.run(t.tokenizer(e[n]));this.documentStore.addFieldLength(i,n,o.length);var r={};o.forEach(function(e){e in r?r[e]+=1:r[e]=1},this);for(var s in r){var u=r[s];u=Math.sqrt(u),this.index[n].addToken(s,{ref:i,tf:u})}},this),n&&this.eventEmitter.emit("add",e,this)}},t.Index.prototype.removeDocByRef=function(e){if(e&&this.documentStore.isDocStored()!==!1&&this.documentStore.hasDoc(e)){var t=this.documentStore.getDoc(e);this.removeDoc(t,!1)}},t.Index.prototype.removeDoc=function(e,n){if(e){var n=void 0===n?!0:n,i=e[this._ref];this.documentStore.hasDoc(i)&&(this.documentStore.removeDoc(i),this._fields.forEach(function(n){var o=this.pipeline.run(t.tokenizer(e[n]));o.forEach(function(e){this.index[n].removeToken(e,i)},this)},this),n&&this.eventEmitter.emit("remove",e,this))}},t.Index.prototype.updateDoc=function(e,t){var t=void 0===t?!0:t;this.removeDocByRef(e[this._ref],!1),this.addDoc(e,!1),t&&this.eventEmitter.emit("update",e,this)},t.Index.prototype.idf=function(e,t){var n="@"+t+"/"+e;if(Object.prototype.hasOwnProperty.call(this._idfCache,n))return this._idfCache[n];var i=this.index[t].getDocFreq(e),o=1+Math.log(this.documentStore.length/(i+1));return this._idfCache[n]=o,o},t.Index.prototype.getFields=function(){return this._fields.slice()},t.Index.prototype.search=function(e,n){if(!e)return[];e="string"==typeof e?{any:e}:JSON.parse(JSON.stringify(e));var i=null;null!=n&&(i=JSON.stringify(n));for(var o=new t.Configuration(i,this.getFields()).get(),r={},s=Object.keys(e),u=0;u0&&t.push(e);for(var i in n)"docs"!==i&&"df"!==i&&this.expandToken(e+i,t,n[i]);return t},t.InvertedIndex.prototype.toJSON=function(){return{root:this.root}},t.Configuration=function(e,n){var e=e||"";if(void 0==n||null==n)throw new Error("fields should not be null");this.config={};var i;try{i=JSON.parse(e),this.buildUserConfig(i,n)}catch(o){t.utils.warn("user configuration parse failed, will use default configuration"),this.buildDefaultConfig(n)}},t.Configuration.prototype.buildDefaultConfig=function(e){this.reset(),e.forEach(function(e){this.config[e]={boost:1,bool:"OR",expand:!1}},this)},t.Configuration.prototype.buildUserConfig=function(e,n){var i="OR",o=!1;if(this.reset(),"bool"in e&&(i=e.bool||i),"expand"in e&&(o=e.expand||o),"fields"in e)for(var r in e.fields)if(n.indexOf(r)>-1){var s=e.fields[r],u=o;void 0!=s.expand&&(u=s.expand),this.config[r]={boost:s.boost||0===s.boost?s.boost:1,bool:s.bool||i,expand:u}}else t.utils.warn("field name in user configuration not found in index instance fields");else this.addAllFields2UserConfig(i,o,n)},t.Configuration.prototype.addAllFields2UserConfig=function(e,t,n){n.forEach(function(n){this.config[n]={boost:1,bool:e,expand:t}},this)},t.Configuration.prototype.get=function(){return this.config},t.Configuration.prototype.reset=function(){this.config={}},lunr.SortedSet=function(){this.length=0,this.elements=[]},lunr.SortedSet.load=function(e){var t=new this;return t.elements=e,t.length=e.length,t},lunr.SortedSet.prototype.add=function(){var e,t;for(e=0;e1;){if(r===e)return o;e>r&&(t=o),r>e&&(n=o),i=n-t,o=t+Math.floor(i/2),r=this.elements[o]}return r===e?o:-1},lunr.SortedSet.prototype.locationFor=function(e){for(var t=0,n=this.elements.length,i=n-t,o=t+Math.floor(i/2),r=this.elements[o];i>1;)e>r&&(t=o),r>e&&(n=o),i=n-t,o=t+Math.floor(i/2),r=this.elements[o];return r>e?o:e>r?o+1:void 0},lunr.SortedSet.prototype.intersect=function(e){for(var t=new lunr.SortedSet,n=0,i=0,o=this.length,r=e.length,s=this.elements,u=e.elements;;){if(n>o-1||i>r-1)break;s[n]!==u[i]?s[n]u[i]&&i++:(t.add(s[n]),n++,i++)}return t},lunr.SortedSet.prototype.clone=function(){var e=new lunr.SortedSet;return e.elements=this.toArray(),e.length=e.elements.length,e},lunr.SortedSet.prototype.union=function(e){var t,n,i;this.length>=e.length?(t=this,n=e):(t=e,n=this),i=t.clone();for(var o=0,r=n.toArray();o + + + + + EventInfo - Embers Config API + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+
+

Keyboard shortcuts

+
+

Press or to navigate between chapters

+

Press S or / to search in the book

+

Press ? to show this help

+

Press Esc to hide this help

+
+
+
+
+ + + + + + + + + + + + + +
+ +
+
+ + + + + + + +
+
+

EventInfo

+

Namespace: global

+
+ +

fn buffer_id

+ +
fn buffer_id(event: EventInfo) -> ?
+
+
+ +
+ +
+Return the buffer id attached to an event, or `()`. +

ReturnType: int | ()

+
+ +
+ +
+ + +
+ +

fn floating_id

+ +
fn floating_id(event: EventInfo) -> ?
+
+
+ +
+ +
+Return the floating id attached to an event, or `()`. +

ReturnType: int | ()

+
+ +
+ +
+ + +
+ +

fn name

+ +
fn name(event: EventInfo) -> String
+
+
+ +
+ +
+Return the event name. +
+ +
+ +
+ + +
+ +

fn node_id

+ +
fn node_id(event: EventInfo) -> ?
+
+
+ +
+ +
+Return the node id attached to an event, or `()`. +

ReturnType: int | ()

+
+ +
+ +
+ + +
+ +

fn session_id

+ +
fn session_id(event: EventInfo) -> ?
+
+
+ +
+ +
+Return the session id attached to an event, or `()`. +

ReturnType: int | ()

+
+ +
+ +
+ + + +
+ + +
+
+ + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + diff --git a/docs/config-api-book/example.html b/docs/config-api-book/example.html new file mode 100644 index 0000000..93de537 --- /dev/null +++ b/docs/config-api-book/example.html @@ -0,0 +1,273 @@ + + + + + + Example - Embers Config API + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+
+

Keyboard shortcuts

+
+

Press or to navigate between chapters

+

Press S or / to search in the book

+

Press ? to show this help

+

Press Esc to hide this help

+
+
+
+
+ + + + + + + + + + + + + +
+ +
+
+ + + + + + + +
+
+

Example

+

This is a trimmed example based on the repository fixture config. It shows the two main phases together.

+
set_leader("<C-a>");
+
+fn shell_tree(ctx) {
+    tree.buffer_spawn(
+        ["/bin/zsh"],
+        #{
+            title: "shell",
+            cwd: if ctx.current_buffer() == () { () } else { ctx.current_buffer().cwd() }
+        }
+    )
+}
+
+fn split_below(ctx) {
+    action.split_with("horizontal", shell_tree(ctx))
+}
+
+fn format_tabs(ctx) {
+    let active = ctx.tabs()[ctx.active_index()];
+    ui.bar([
+        ui.segment(" " + active.title() + " ", #{
+            fg: theme.color("active_fg"),
+            bg: theme.color("active_bg")
+        })
+    ], [], [])
+}
+
+define_action("split-below", split_below);
+bind("normal", "<leader>\"", "split-below");
+theme.set_palette(#{
+    active_fg: "#303446",
+    active_bg: "#c6d0f5"
+});
+tabbar.set_formatter(format_tabs);
+mouse.set_click_focus(true);
+
+ +
+ + +
+
+ + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + diff --git a/docs/config-api-book/favicon-8114d1fc.png b/docs/config-api-book/favicon-8114d1fc.png new file mode 100644 index 0000000..a5b1aa1 Binary files /dev/null and b/docs/config-api-book/favicon-8114d1fc.png differ diff --git a/docs/config-api-book/favicon-de23e50b.svg b/docs/config-api-book/favicon-de23e50b.svg new file mode 100644 index 0000000..90e0ea5 --- /dev/null +++ b/docs/config-api-book/favicon-de23e50b.svg @@ -0,0 +1,22 @@ + + + + + diff --git a/docs/config-api-book/floating-ref.html b/docs/config-api-book/floating-ref.html new file mode 100644 index 0000000..afae2f2 --- /dev/null +++ b/docs/config-api-book/floating-ref.html @@ -0,0 +1,386 @@ + + + + + + FloatingRef - Embers Config API + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+
+

Keyboard shortcuts

+
+

Press or to navigate between chapters

+

Press S or / to search in the book

+

Press ? to show this help

+

Press Esc to hide this help

+
+
+
+
+ + + + + + + + + + + + + +
+ +
+
+ + + + + + + +
+
+

FloatingRef

+

Namespace: global

+
+ +

fn geometry

+ +
fn geometry(floating: FloatingRef) -> Map
+
+
+ +
+ +
+Return the floating geometry map. +
+ +
+ +
+ + +
+ +

fn id

+ +
fn id(floating: FloatingRef) -> int
+
+
+ +
+ +
+Return the floating id. +
+ +
+ +
+ + +
+ +

fn is_focused

+ +
fn is_focused(floating: FloatingRef) -> bool
+
+
+ +
+ +
+Return whether the floating is focused. +
+ +
+ +
+ + +
+ +

fn is_visible

+ +
fn is_visible(floating: FloatingRef) -> bool
+
+
+ +
+ +
+Return whether the floating is visible. +
+ +
+ +
+ + +
+ +

fn root_node

+ +
fn root_node(floating: FloatingRef) -> int
+
+
+ +
+ +
+Return the root node id. +
+ +
+ +
+ + +
+ +

fn session_id

+ +
fn session_id(floating: FloatingRef) -> int
+
+
+ +
+ +
+Return the owning session id. +
+ +
+ +
+ + +
+ +

fn title

+ +
fn title(floating: FloatingRef) -> ?
+
+
+ +
+ +
+Return the floating title, if any. +

ReturnType: string | ()

+
+ +
+ +
+ + + +
+ + +
+
+ + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + diff --git a/docs/config-api-book/fonts/OPEN-SANS-LICENSE.txt b/docs/config-api-book/fonts/OPEN-SANS-LICENSE.txt new file mode 100644 index 0000000..d645695 --- /dev/null +++ b/docs/config-api-book/fonts/OPEN-SANS-LICENSE.txt @@ -0,0 +1,202 @@ + + Apache License + Version 2.0, January 2004 + http://www.apache.org/licenses/ + + TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION + + 1. Definitions. + + "License" shall mean the terms and conditions for use, reproduction, + and distribution as defined by Sections 1 through 9 of this document. + + "Licensor" shall mean the copyright owner or entity authorized by + the copyright owner that is granting the License. + + "Legal Entity" shall mean the union of the acting entity and all + other entities that control, are controlled by, or are under common + control with that entity. For the purposes of this definition, + "control" means (i) the power, direct or indirect, to cause the + direction or management of such entity, whether by contract or + otherwise, or (ii) ownership of fifty percent (50%) or more of the + outstanding shares, or (iii) beneficial ownership of such entity. + + "You" (or "Your") shall mean an individual or Legal Entity + exercising permissions granted by this License. + + "Source" form shall mean the preferred form for making modifications, + including but not limited to software source code, documentation + source, and configuration files. + + "Object" form shall mean any form resulting from mechanical + transformation or translation of a Source form, including but + not limited to compiled object code, generated documentation, + and conversions to other media types. + + "Work" shall mean the work of authorship, whether in Source or + Object form, made available under the License, as indicated by a + copyright notice that is included in or attached to the work + (an example is provided in the Appendix below). + + "Derivative Works" shall mean any work, whether in Source or Object + form, that is based on (or derived from) the Work and for which the + editorial revisions, annotations, elaborations, or other modifications + represent, as a whole, an original work of authorship. For the purposes + of this License, Derivative Works shall not include works that remain + separable from, or merely link (or bind by name) to the interfaces of, + the Work and Derivative Works thereof. + + "Contribution" shall mean any work of authorship, including + the original version of the Work and any modifications or additions + to that Work or Derivative Works thereof, that is intentionally + submitted to Licensor for inclusion in the Work by the copyright owner + or by an individual or Legal Entity authorized to submit on behalf of + the copyright owner. For the purposes of this definition, "submitted" + means any form of electronic, verbal, or written communication sent + to the Licensor or its representatives, including but not limited to + communication on electronic mailing lists, source code control systems, + and issue tracking systems that are managed by, or on behalf of, the + Licensor for the purpose of discussing and improving the Work, but + excluding communication that is conspicuously marked or otherwise + designated in writing by the copyright owner as "Not a Contribution." + + "Contributor" shall mean Licensor and any individual or Legal Entity + on behalf of whom a Contribution has been received by Licensor and + subsequently incorporated within the Work. + + 2. Grant of Copyright License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + copyright license to reproduce, prepare Derivative Works of, + publicly display, publicly perform, sublicense, and distribute the + Work and such Derivative Works in Source or Object form. + + 3. Grant of Patent License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + (except as stated in this section) patent license to make, have made, + use, offer to sell, sell, import, and otherwise transfer the Work, + where such license applies only to those patent claims licensable + by such Contributor that are necessarily infringed by their + Contribution(s) alone or by combination of their Contribution(s) + with the Work to which such Contribution(s) was submitted. If You + institute patent litigation against any entity (including a + cross-claim or counterclaim in a lawsuit) alleging that the Work + or a Contribution incorporated within the Work constitutes direct + or contributory patent infringement, then any patent licenses + granted to You under this License for that Work shall terminate + as of the date such litigation is filed. + + 4. Redistribution. You may reproduce and distribute copies of the + Work or Derivative Works thereof in any medium, with or without + modifications, and in Source or Object form, provided that You + meet the following conditions: + + (a) You must give any other recipients of the Work or + Derivative Works a copy of this License; and + + (b) You must cause any modified files to carry prominent notices + stating that You changed the files; and + + (c) You must retain, in the Source form of any Derivative Works + that You distribute, all copyright, patent, trademark, and + attribution notices from the Source form of the Work, + excluding those notices that do not pertain to any part of + the Derivative Works; and + + (d) If the Work includes a "NOTICE" text file as part of its + distribution, then any Derivative Works that You distribute must + include a readable copy of the attribution notices contained + within such NOTICE file, excluding those notices that do not + pertain to any part of the Derivative Works, in at least one + of the following places: within a NOTICE text file distributed + as part of the Derivative Works; within the Source form or + documentation, if provided along with the Derivative Works; or, + within a display generated by the Derivative Works, if and + wherever such third-party notices normally appear. The contents + of the NOTICE file are for informational purposes only and + do not modify the License. You may add Your own attribution + notices within Derivative Works that You distribute, alongside + or as an addendum to the NOTICE text from the Work, provided + that such additional attribution notices cannot be construed + as modifying the License. + + You may add Your own copyright statement to Your modifications and + may provide additional or different license terms and conditions + for use, reproduction, or distribution of Your modifications, or + for any such Derivative Works as a whole, provided Your use, + reproduction, and distribution of the Work otherwise complies with + the conditions stated in this License. + + 5. Submission of Contributions. Unless You explicitly state otherwise, + any Contribution intentionally submitted for inclusion in the Work + by You to the Licensor shall be under the terms and conditions of + this License, without any additional terms or conditions. + Notwithstanding the above, nothing herein shall supersede or modify + the terms of any separate license agreement you may have executed + with Licensor regarding such Contributions. + + 6. Trademarks. This License does not grant permission to use the trade + names, trademarks, service marks, or product names of the Licensor, + except as required for reasonable and customary use in describing the + origin of the Work and reproducing the content of the NOTICE file. + + 7. Disclaimer of Warranty. Unless required by applicable law or + agreed to in writing, Licensor provides the Work (and each + Contributor provides its Contributions) on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or + implied, including, without limitation, any warranties or conditions + of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A + PARTICULAR PURPOSE. You are solely responsible for determining the + appropriateness of using or redistributing the Work and assume any + risks associated with Your exercise of permissions under this License. + + 8. Limitation of Liability. In no event and under no legal theory, + whether in tort (including negligence), contract, or otherwise, + unless required by applicable law (such as deliberate and grossly + negligent acts) or agreed to in writing, shall any Contributor be + liable to You for damages, including any direct, indirect, special, + incidental, or consequential damages of any character arising as a + result of this License or out of the use or inability to use the + Work (including but not limited to damages for loss of goodwill, + work stoppage, computer failure or malfunction, or any and all + other commercial damages or losses), even if such Contributor + has been advised of the possibility of such damages. + + 9. Accepting Warranty or Additional Liability. While redistributing + the Work or Derivative Works thereof, You may choose to offer, + and charge a fee for, acceptance of support, warranty, indemnity, + or other liability obligations and/or rights consistent with this + License. However, in accepting such obligations, You may act only + on Your own behalf and on Your sole responsibility, not on behalf + of any other Contributor, and only if You agree to indemnify, + defend, and hold each Contributor harmless for any liability + incurred by, or claims asserted against, such Contributor by reason + of your accepting any such warranty or additional liability. + + END OF TERMS AND CONDITIONS + + APPENDIX: How to apply the Apache License to your work. + + To apply the Apache License to your work, attach the following + boilerplate notice, with the fields enclosed by brackets "[]" + replaced with your own identifying information. (Don't include + the brackets!) The text should be enclosed in the appropriate + comment syntax for the file format. We also recommend that a + file or class name and description of purpose be included on the + same "printed page" as the copyright notice for easier + identification within third-party archives. + + Copyright [yyyy] [name of copyright owner] + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. diff --git a/docs/config-api-book/fonts/SOURCE-CODE-PRO-LICENSE.txt b/docs/config-api-book/fonts/SOURCE-CODE-PRO-LICENSE.txt new file mode 100644 index 0000000..366206f --- /dev/null +++ b/docs/config-api-book/fonts/SOURCE-CODE-PRO-LICENSE.txt @@ -0,0 +1,93 @@ +Copyright 2010, 2012 Adobe Systems Incorporated (http://www.adobe.com/), with Reserved Font Name 'Source'. All Rights Reserved. Source is a trademark of Adobe Systems Incorporated in the United States and/or other countries. + +This Font Software is licensed under the SIL Open Font License, Version 1.1. +This license is copied below, and is also available with a FAQ at: +http://scripts.sil.org/OFL + + +----------------------------------------------------------- +SIL OPEN FONT LICENSE Version 1.1 - 26 February 2007 +----------------------------------------------------------- + +PREAMBLE +The goals of the Open Font License (OFL) are to stimulate worldwide +development of collaborative font projects, to support the font creation +efforts of academic and linguistic communities, and to provide a free and +open framework in which fonts may be shared and improved in partnership +with others. + +The OFL allows the licensed fonts to be used, studied, modified and +redistributed freely as long as they are not sold by themselves. The +fonts, including any derivative works, can be bundled, embedded, +redistributed and/or sold with any software provided that any reserved +names are not used by derivative works. The fonts and derivatives, +however, cannot be released under any other type of license. The +requirement for fonts to remain under this license does not apply +to any document created using the fonts or their derivatives. + +DEFINITIONS +"Font Software" refers to the set of files released by the Copyright +Holder(s) under this license and clearly marked as such. This may +include source files, build scripts and documentation. + +"Reserved Font Name" refers to any names specified as such after the +copyright statement(s). + +"Original Version" refers to the collection of Font Software components as +distributed by the Copyright Holder(s). + +"Modified Version" refers to any derivative made by adding to, deleting, +or substituting -- in part or in whole -- any of the components of the +Original Version, by changing formats or by porting the Font Software to a +new environment. + +"Author" refers to any designer, engineer, programmer, technical +writer or other person who contributed to the Font Software. + +PERMISSION & CONDITIONS +Permission is hereby granted, free of charge, to any person obtaining +a copy of the Font Software, to use, study, copy, merge, embed, modify, +redistribute, and sell modified and unmodified copies of the Font +Software, subject to the following conditions: + +1) Neither the Font Software nor any of its individual components, +in Original or Modified Versions, may be sold by itself. + +2) Original or Modified Versions of the Font Software may be bundled, +redistributed and/or sold with any software, provided that each copy +contains the above copyright notice and this license. These can be +included either as stand-alone text files, human-readable headers or +in the appropriate machine-readable metadata fields within text or +binary files as long as those fields can be easily viewed by the user. + +3) No Modified Version of the Font Software may use the Reserved Font +Name(s) unless explicit written permission is granted by the corresponding +Copyright Holder. This restriction only applies to the primary font name as +presented to the users. + +4) The name(s) of the Copyright Holder(s) or the Author(s) of the Font +Software shall not be used to promote, endorse or advertise any +Modified Version, except to acknowledge the contribution(s) of the +Copyright Holder(s) and the Author(s) or with their explicit written +permission. + +5) The Font Software, modified or unmodified, in part or in whole, +must be distributed entirely under this license, and must not be +distributed under any other license. The requirement for fonts to +remain under this license does not apply to any document created +using the Font Software. + +TERMINATION +This license becomes null and void if any of the above conditions are +not met. + +DISCLAIMER +THE FONT SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, +EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO ANY WARRANTIES OF +MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT +OF COPYRIGHT, PATENT, TRADEMARK, OR OTHER RIGHT. IN NO EVENT SHALL THE +COPYRIGHT HOLDER BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, +INCLUDING ANY GENERAL, SPECIAL, INDIRECT, INCIDENTAL, OR CONSEQUENTIAL +DAMAGES, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING +FROM, OUT OF THE USE OR INABILITY TO USE THE FONT SOFTWARE OR FROM +OTHER DEALINGS IN THE FONT SOFTWARE. diff --git a/docs/config-api-book/fonts/fonts-9644e21d.css b/docs/config-api-book/fonts/fonts-9644e21d.css new file mode 100644 index 0000000..ce32fdc --- /dev/null +++ b/docs/config-api-book/fonts/fonts-9644e21d.css @@ -0,0 +1,100 @@ +/* Open Sans is licensed under the Apache License, Version 2.0. See http://www.apache.org/licenses/LICENSE-2.0 */ +/* Source Code Pro is under the Open Font License. See https://scripts.sil.org/cms/scripts/page.php?site_id=nrsi&id=OFL */ + +/* open-sans-300 - latin_vietnamese_latin-ext_greek-ext_greek_cyrillic-ext_cyrillic */ +@font-face { + font-family: 'Open Sans'; + font-style: normal; + font-weight: 300; + src: local('Open Sans Light'), local('OpenSans-Light'), + url('../fonts/open-sans-v17-all-charsets-300-7736aa35.woff2') format('woff2'); +} + +/* open-sans-300italic - latin_vietnamese_latin-ext_greek-ext_greek_cyrillic-ext_cyrillic */ +@font-face { + font-family: 'Open Sans'; + font-style: italic; + font-weight: 300; + src: local('Open Sans Light Italic'), local('OpenSans-LightItalic'), + url('../fonts/open-sans-v17-all-charsets-300italic-2c7b95c0.woff2') format('woff2'); +} + +/* open-sans-regular - latin_vietnamese_latin-ext_greek-ext_greek_cyrillic-ext_cyrillic */ +@font-face { + font-family: 'Open Sans'; + font-style: normal; + font-weight: 400; + src: local('Open Sans Regular'), local('OpenSans-Regular'), + url('../fonts/open-sans-v17-all-charsets-regular-2e3b1d34.woff2') format('woff2'); +} + +/* open-sans-italic - latin_vietnamese_latin-ext_greek-ext_greek_cyrillic-ext_cyrillic */ +@font-face { + font-family: 'Open Sans'; + font-style: italic; + font-weight: 400; + src: local('Open Sans Italic'), local('OpenSans-Italic'), + url('../fonts/open-sans-v17-all-charsets-italic-6c9463f7.woff2') format('woff2'); +} + +/* open-sans-600 - latin_vietnamese_latin-ext_greek-ext_greek_cyrillic-ext_cyrillic */ +@font-face { + font-family: 'Open Sans'; + font-style: normal; + font-weight: 600; + src: local('Open Sans SemiBold'), local('OpenSans-SemiBold'), + url('../fonts/open-sans-v17-all-charsets-600-486c6759.woff2') format('woff2'); +} + +/* open-sans-600italic - latin_vietnamese_latin-ext_greek-ext_greek_cyrillic-ext_cyrillic */ +@font-face { + font-family: 'Open Sans'; + font-style: italic; + font-weight: 600; + src: local('Open Sans SemiBold Italic'), local('OpenSans-SemiBoldItalic'), + url('../fonts/open-sans-v17-all-charsets-600italic-1a3e8659.woff2') format('woff2'); +} + +/* open-sans-700 - latin_vietnamese_latin-ext_greek-ext_greek_cyrillic-ext_cyrillic */ +@font-face { + font-family: 'Open Sans'; + font-style: normal; + font-weight: 700; + src: local('Open Sans Bold'), local('OpenSans-Bold'), + url('../fonts/open-sans-v17-all-charsets-700-c22fe8c7.woff2') format('woff2'); +} + +/* open-sans-700italic - latin_vietnamese_latin-ext_greek-ext_greek_cyrillic-ext_cyrillic */ +@font-face { + font-family: 'Open Sans'; + font-style: italic; + font-weight: 700; + src: local('Open Sans Bold Italic'), local('OpenSans-BoldItalic'), + url('../fonts/open-sans-v17-all-charsets-700italic-238ae959.woff2') format('woff2'); +} + +/* open-sans-800 - latin_vietnamese_latin-ext_greek-ext_greek_cyrillic-ext_cyrillic */ +@font-face { + font-family: 'Open Sans'; + font-style: normal; + font-weight: 800; + src: local('Open Sans ExtraBold'), local('OpenSans-ExtraBold'), + url('../fonts/open-sans-v17-all-charsets-800-3d2c812a.woff2') format('woff2'); +} + +/* open-sans-800italic - latin_vietnamese_latin-ext_greek-ext_greek_cyrillic-ext_cyrillic */ +@font-face { + font-family: 'Open Sans'; + font-style: italic; + font-weight: 800; + src: local('Open Sans ExtraBold Italic'), local('OpenSans-ExtraBoldItalic'), + url('../fonts/open-sans-v17-all-charsets-800italic-ba1521ec.woff2') format('woff2'); +} + +/* source-code-pro-500 - latin_vietnamese_latin-ext_greek_cyrillic-ext_cyrillic */ +@font-face { + font-family: 'Source Code Pro'; + font-style: normal; + font-weight: 500; + src: url('../fonts/source-code-pro-v11-all-charsets-500-2bdd9410.woff2') format('woff2'); +} diff --git a/docs/config-api-book/fonts/open-sans-v17-all-charsets-300-7736aa35.woff2 b/docs/config-api-book/fonts/open-sans-v17-all-charsets-300-7736aa35.woff2 new file mode 100644 index 0000000..9f51be3 Binary files /dev/null and b/docs/config-api-book/fonts/open-sans-v17-all-charsets-300-7736aa35.woff2 differ diff --git a/docs/config-api-book/fonts/open-sans-v17-all-charsets-300italic-2c7b95c0.woff2 b/docs/config-api-book/fonts/open-sans-v17-all-charsets-300italic-2c7b95c0.woff2 new file mode 100644 index 0000000..2f54544 Binary files /dev/null and b/docs/config-api-book/fonts/open-sans-v17-all-charsets-300italic-2c7b95c0.woff2 differ diff --git a/docs/config-api-book/fonts/open-sans-v17-all-charsets-600-486c6759.woff2 b/docs/config-api-book/fonts/open-sans-v17-all-charsets-600-486c6759.woff2 new file mode 100644 index 0000000..f503d55 Binary files /dev/null and b/docs/config-api-book/fonts/open-sans-v17-all-charsets-600-486c6759.woff2 differ diff --git a/docs/config-api-book/fonts/open-sans-v17-all-charsets-600italic-1a3e8659.woff2 b/docs/config-api-book/fonts/open-sans-v17-all-charsets-600italic-1a3e8659.woff2 new file mode 100644 index 0000000..c99aabe Binary files /dev/null and b/docs/config-api-book/fonts/open-sans-v17-all-charsets-600italic-1a3e8659.woff2 differ diff --git a/docs/config-api-book/fonts/open-sans-v17-all-charsets-700-c22fe8c7.woff2 b/docs/config-api-book/fonts/open-sans-v17-all-charsets-700-c22fe8c7.woff2 new file mode 100644 index 0000000..421a1ab Binary files /dev/null and b/docs/config-api-book/fonts/open-sans-v17-all-charsets-700-c22fe8c7.woff2 differ diff --git a/docs/config-api-book/fonts/open-sans-v17-all-charsets-700italic-238ae959.woff2 b/docs/config-api-book/fonts/open-sans-v17-all-charsets-700italic-238ae959.woff2 new file mode 100644 index 0000000..12ce3d2 Binary files /dev/null and b/docs/config-api-book/fonts/open-sans-v17-all-charsets-700italic-238ae959.woff2 differ diff --git a/docs/config-api-book/fonts/open-sans-v17-all-charsets-800-3d2c812a.woff2 b/docs/config-api-book/fonts/open-sans-v17-all-charsets-800-3d2c812a.woff2 new file mode 100644 index 0000000..c94a223 Binary files /dev/null and b/docs/config-api-book/fonts/open-sans-v17-all-charsets-800-3d2c812a.woff2 differ diff --git a/docs/config-api-book/fonts/open-sans-v17-all-charsets-800italic-ba1521ec.woff2 b/docs/config-api-book/fonts/open-sans-v17-all-charsets-800italic-ba1521ec.woff2 new file mode 100644 index 0000000..eed7d3c Binary files /dev/null and b/docs/config-api-book/fonts/open-sans-v17-all-charsets-800italic-ba1521ec.woff2 differ diff --git a/docs/config-api-book/fonts/open-sans-v17-all-charsets-italic-6c9463f7.woff2 b/docs/config-api-book/fonts/open-sans-v17-all-charsets-italic-6c9463f7.woff2 new file mode 100644 index 0000000..398b68a Binary files /dev/null and b/docs/config-api-book/fonts/open-sans-v17-all-charsets-italic-6c9463f7.woff2 differ diff --git a/docs/config-api-book/fonts/open-sans-v17-all-charsets-regular-2e3b1d34.woff2 b/docs/config-api-book/fonts/open-sans-v17-all-charsets-regular-2e3b1d34.woff2 new file mode 100644 index 0000000..8383e94 Binary files /dev/null and b/docs/config-api-book/fonts/open-sans-v17-all-charsets-regular-2e3b1d34.woff2 differ diff --git a/docs/config-api-book/fonts/source-code-pro-v11-all-charsets-500-2bdd9410.woff2 b/docs/config-api-book/fonts/source-code-pro-v11-all-charsets-500-2bdd9410.woff2 new file mode 100644 index 0000000..7222456 Binary files /dev/null and b/docs/config-api-book/fonts/source-code-pro-v11-all-charsets-500-2bdd9410.woff2 differ diff --git a/docs/config-api-book/highlight-493f70e1.css b/docs/config-api-book/highlight-493f70e1.css new file mode 100644 index 0000000..352c79b --- /dev/null +++ b/docs/config-api-book/highlight-493f70e1.css @@ -0,0 +1,83 @@ +/* + * An increased contrast highlighting scheme loosely based on the + * "Base16 Atelier Dune Light" theme by Bram de Haan + * (http://atelierbram.github.io/syntax-highlighting/atelier-schemes/dune) + * Original Base16 color scheme by Chris Kempson + * (https://github.com/chriskempson/base16) + */ + +/* Comment */ +.hljs-comment, +.hljs-quote { + color: #575757; +} + +/* Red */ +.hljs-variable, +.hljs-template-variable, +.hljs-attribute, +.hljs-attr, +.hljs-tag, +.hljs-name, +.hljs-regexp, +.hljs-link, +.hljs-name, +.hljs-selector-id, +.hljs-selector-class { + color: #d70025; +} + +/* Orange */ +.hljs-number, +.hljs-meta, +.hljs-built_in, +.hljs-builtin-name, +.hljs-literal, +.hljs-type, +.hljs-params { + color: #b21e00; +} + +/* Green */ +.hljs-string, +.hljs-symbol, +.hljs-bullet { + color: #008200; +} + +/* Blue */ +.hljs-title, +.hljs-section { + color: #0030f2; +} + +/* Purple */ +.hljs-keyword, +.hljs-selector-tag { + color: #9d00ec; +} + +.hljs { + display: block; + overflow-x: auto; + background: #f6f7f6; + color: #000; +} + +.hljs-emphasis { + font-style: italic; +} + +.hljs-strong { + font-weight: bold; +} + +.hljs-addition { + color: #22863a; + background-color: #f0fff4; +} + +.hljs-deletion { + color: #b31d28; + background-color: #ffeef0; +} diff --git a/docs/config-api-book/highlight-abc7f01d.js b/docs/config-api-book/highlight-abc7f01d.js new file mode 100644 index 0000000..18d2434 --- /dev/null +++ b/docs/config-api-book/highlight-abc7f01d.js @@ -0,0 +1,54 @@ +/* + Highlight.js 10.1.1 (93fd0d73) + License: BSD-3-Clause + Copyright (c) 2006-2020, Ivan Sagalaev +*/ +var hljs=function(){"use strict";function e(n){Object.freeze(n);var t="function"==typeof n;return Object.getOwnPropertyNames(n).forEach((function(r){!Object.hasOwnProperty.call(n,r)||null===n[r]||"object"!=typeof n[r]&&"function"!=typeof n[r]||t&&("caller"===r||"callee"===r||"arguments"===r)||Object.isFrozen(n[r])||e(n[r])})),n}class n{constructor(e){void 0===e.data&&(e.data={}),this.data=e.data}ignoreMatch(){this.ignore=!0}}function t(e){return e.replace(/&/g,"&").replace(//g,">").replace(/"/g,""").replace(/'/g,"'")}function r(e,...n){var t={};for(const n in e)t[n]=e[n];return n.forEach((function(e){for(const n in e)t[n]=e[n]})),t}function a(e){return e.nodeName.toLowerCase()}var i=Object.freeze({__proto__:null,escapeHTML:t,inherit:r,nodeStream:function(e){var n=[];return function e(t,r){for(var i=t.firstChild;i;i=i.nextSibling)3===i.nodeType?r+=i.nodeValue.length:1===i.nodeType&&(n.push({event:"start",offset:r,node:i}),r=e(i,r),a(i).match(/br|hr|img|input/)||n.push({event:"stop",offset:r,node:i}));return r}(e,0),n},mergeStreams:function(e,n,r){var i=0,s="",o=[];function l(){return e.length&&n.length?e[0].offset!==n[0].offset?e[0].offset"}function u(e){s+=""}function d(e){("start"===e.event?c:u)(e.node)}for(;e.length||n.length;){var g=l();if(s+=t(r.substring(i,g[0].offset)),i=g[0].offset,g===e){o.reverse().forEach(u);do{d(g.splice(0,1)[0]),g=l()}while(g===e&&g.length&&g[0].offset===i);o.reverse().forEach(c)}else"start"===g[0].event?o.push(g[0].node):o.pop(),d(g.splice(0,1)[0])}return s+t(r.substr(i))}});const s="",o=e=>!!e.kind;class l{constructor(e,n){this.buffer="",this.classPrefix=n.classPrefix,e.walk(this)}addText(e){this.buffer+=t(e)}openNode(e){if(!o(e))return;let n=e.kind;e.sublanguage||(n=`${this.classPrefix}${n}`),this.span(n)}closeNode(e){o(e)&&(this.buffer+=s)}value(){return this.buffer}span(e){this.buffer+=``}}class c{constructor(){this.rootNode={children:[]},this.stack=[this.rootNode]}get top(){return this.stack[this.stack.length-1]}get root(){return this.rootNode}add(e){this.top.children.push(e)}openNode(e){const n={kind:e,children:[]};this.add(n),this.stack.push(n)}closeNode(){if(this.stack.length>1)return this.stack.pop()}closeAllNodes(){for(;this.closeNode(););}toJSON(){return JSON.stringify(this.rootNode,null,4)}walk(e){return this.constructor._walk(e,this.rootNode)}static _walk(e,n){return"string"==typeof n?e.addText(n):n.children&&(e.openNode(n),n.children.forEach(n=>this._walk(e,n)),e.closeNode(n)),e}static _collapse(e){"string"!=typeof e&&e.children&&(e.children.every(e=>"string"==typeof e)?e.children=[e.children.join("")]:e.children.forEach(e=>{c._collapse(e)}))}}class u extends c{constructor(e){super(),this.options=e}addKeyword(e,n){""!==e&&(this.openNode(n),this.addText(e),this.closeNode())}addText(e){""!==e&&this.add(e)}addSublanguage(e,n){const t=e.root;t.kind=n,t.sublanguage=!0,this.add(t)}toHTML(){return new l(this,this.options).value()}finalize(){return!0}}function d(e){return e?"string"==typeof e?e:e.source:null}const g="(-?)(\\b0[xX][a-fA-F0-9]+|(\\b\\d+(\\.\\d*)?|\\.\\d+)([eE][-+]?\\d+)?)",h={begin:"\\\\[\\s\\S]",relevance:0},f={className:"string",begin:"'",end:"'",illegal:"\\n",contains:[h]},p={className:"string",begin:'"',end:'"',illegal:"\\n",contains:[h]},b={begin:/\b(a|an|the|are|I'm|isn't|don't|doesn't|won't|but|just|should|pretty|simply|enough|gonna|going|wtf|so|such|will|you|your|they|like|more)\b/},m=function(e,n,t={}){var a=r({className:"comment",begin:e,end:n,contains:[]},t);return a.contains.push(b),a.contains.push({className:"doctag",begin:"(?:TODO|FIXME|NOTE|BUG|OPTIMIZE|HACK|XXX):",relevance:0}),a},v=m("//","$"),x=m("/\\*","\\*/"),E=m("#","$");var _=Object.freeze({__proto__:null,IDENT_RE:"[a-zA-Z]\\w*",UNDERSCORE_IDENT_RE:"[a-zA-Z_]\\w*",NUMBER_RE:"\\b\\d+(\\.\\d+)?",C_NUMBER_RE:g,BINARY_NUMBER_RE:"\\b(0b[01]+)",RE_STARTERS_RE:"!|!=|!==|%|%=|&|&&|&=|\\*|\\*=|\\+|\\+=|,|-|-=|/=|/|:|;|<<|<<=|<=|<|===|==|=|>>>=|>>=|>=|>>>|>>|>|\\?|\\[|\\{|\\(|\\^|\\^=|\\||\\|=|\\|\\||~",SHEBANG:(e={})=>{const n=/^#![ ]*\//;return e.binary&&(e.begin=function(...e){return e.map(e=>d(e)).join("")}(n,/.*\b/,e.binary,/\b.*/)),r({className:"meta",begin:n,end:/$/,relevance:0,"on:begin":(e,n)=>{0!==e.index&&n.ignoreMatch()}},e)},BACKSLASH_ESCAPE:h,APOS_STRING_MODE:f,QUOTE_STRING_MODE:p,PHRASAL_WORDS_MODE:b,COMMENT:m,C_LINE_COMMENT_MODE:v,C_BLOCK_COMMENT_MODE:x,HASH_COMMENT_MODE:E,NUMBER_MODE:{className:"number",begin:"\\b\\d+(\\.\\d+)?",relevance:0},C_NUMBER_MODE:{className:"number",begin:g,relevance:0},BINARY_NUMBER_MODE:{className:"number",begin:"\\b(0b[01]+)",relevance:0},CSS_NUMBER_MODE:{className:"number",begin:"\\b\\d+(\\.\\d+)?(%|em|ex|ch|rem|vw|vh|vmin|vmax|cm|mm|in|pt|pc|px|deg|grad|rad|turn|s|ms|Hz|kHz|dpi|dpcm|dppx)?",relevance:0},REGEXP_MODE:{begin:/(?=\/[^/\n]*\/)/,contains:[{className:"regexp",begin:/\//,end:/\/[gimuy]*/,illegal:/\n/,contains:[h,{begin:/\[/,end:/\]/,relevance:0,contains:[h]}]}]},TITLE_MODE:{className:"title",begin:"[a-zA-Z]\\w*",relevance:0},UNDERSCORE_TITLE_MODE:{className:"title",begin:"[a-zA-Z_]\\w*",relevance:0},METHOD_GUARD:{begin:"\\.\\s*[a-zA-Z_]\\w*",relevance:0},END_SAME_AS_BEGIN:function(e){return Object.assign(e,{"on:begin":(e,n)=>{n.data._beginMatch=e[1]},"on:end":(e,n)=>{n.data._beginMatch!==e[1]&&n.ignoreMatch()}})}}),N="of and for in not or if then".split(" ");function w(e,n){return n?+n:function(e){return N.includes(e.toLowerCase())}(e)?0:1}const R=t,y=r,{nodeStream:k,mergeStreams:O}=i,M=Symbol("nomatch");return function(t){var a=[],i={},s={},o=[],l=!0,c=/(^(<[^>]+>|\t|)+|\n)/gm,g="Could not find the language '{}', did you forget to load/include a language module?";const h={disableAutodetect:!0,name:"Plain text",contains:[]};var f={noHighlightRe:/^(no-?highlight)$/i,languageDetectRe:/\blang(?:uage)?-([\w-]+)\b/i,classPrefix:"hljs-",tabReplace:null,useBR:!1,languages:null,__emitter:u};function p(e){return f.noHighlightRe.test(e)}function b(e,n,t,r){var a={code:n,language:e};S("before:highlight",a);var i=a.result?a.result:m(a.language,a.code,t,r);return i.code=a.code,S("after:highlight",i),i}function m(e,t,a,s){var o=t;function c(e,n){var t=E.case_insensitive?n[0].toLowerCase():n[0];return Object.prototype.hasOwnProperty.call(e.keywords,t)&&e.keywords[t]}function u(){null!=y.subLanguage?function(){if(""!==A){var e=null;if("string"==typeof y.subLanguage){if(!i[y.subLanguage])return void O.addText(A);e=m(y.subLanguage,A,!0,k[y.subLanguage]),k[y.subLanguage]=e.top}else e=v(A,y.subLanguage.length?y.subLanguage:null);y.relevance>0&&(I+=e.relevance),O.addSublanguage(e.emitter,e.language)}}():function(){if(!y.keywords)return void O.addText(A);let e=0;y.keywordPatternRe.lastIndex=0;let n=y.keywordPatternRe.exec(A),t="";for(;n;){t+=A.substring(e,n.index);const r=c(y,n);if(r){const[e,a]=r;O.addText(t),t="",I+=a,O.addKeyword(n[0],e)}else t+=n[0];e=y.keywordPatternRe.lastIndex,n=y.keywordPatternRe.exec(A)}t+=A.substr(e),O.addText(t)}(),A=""}function h(e){return e.className&&O.openNode(e.className),y=Object.create(e,{parent:{value:y}})}function p(e){return 0===y.matcher.regexIndex?(A+=e[0],1):(L=!0,0)}var b={};function x(t,r){var i=r&&r[0];if(A+=t,null==i)return u(),0;if("begin"===b.type&&"end"===r.type&&b.index===r.index&&""===i){if(A+=o.slice(r.index,r.index+1),!l){const n=Error("0 width match regex");throw n.languageName=e,n.badRule=b.rule,n}return 1}if(b=r,"begin"===r.type)return function(e){var t=e[0],r=e.rule;const a=new n(r),i=[r.__beforeBegin,r["on:begin"]];for(const n of i)if(n&&(n(e,a),a.ignore))return p(t);return r&&r.endSameAsBegin&&(r.endRe=RegExp(t.replace(/[-/\\^$*+?.()|[\]{}]/g,"\\$&"),"m")),r.skip?A+=t:(r.excludeBegin&&(A+=t),u(),r.returnBegin||r.excludeBegin||(A=t)),h(r),r.returnBegin?0:t.length}(r);if("illegal"===r.type&&!a){const e=Error('Illegal lexeme "'+i+'" for mode "'+(y.className||"")+'"');throw e.mode=y,e}if("end"===r.type){var s=function(e){var t=e[0],r=o.substr(e.index),a=function e(t,r,a){let i=function(e,n){var t=e&&e.exec(n);return t&&0===t.index}(t.endRe,a);if(i){if(t["on:end"]){const e=new n(t);t["on:end"](r,e),e.ignore&&(i=!1)}if(i){for(;t.endsParent&&t.parent;)t=t.parent;return t}}if(t.endsWithParent)return e(t.parent,r,a)}(y,e,r);if(!a)return M;var i=y;i.skip?A+=t:(i.returnEnd||i.excludeEnd||(A+=t),u(),i.excludeEnd&&(A=t));do{y.className&&O.closeNode(),y.skip||y.subLanguage||(I+=y.relevance),y=y.parent}while(y!==a.parent);return a.starts&&(a.endSameAsBegin&&(a.starts.endRe=a.endRe),h(a.starts)),i.returnEnd?0:t.length}(r);if(s!==M)return s}if("illegal"===r.type&&""===i)return 1;if(B>1e5&&B>3*r.index)throw Error("potential infinite loop, way more iterations than matches");return A+=i,i.length}var E=T(e);if(!E)throw console.error(g.replace("{}",e)),Error('Unknown language: "'+e+'"');var _=function(e){function n(n,t){return RegExp(d(n),"m"+(e.case_insensitive?"i":"")+(t?"g":""))}class t{constructor(){this.matchIndexes={},this.regexes=[],this.matchAt=1,this.position=0}addRule(e,n){n.position=this.position++,this.matchIndexes[this.matchAt]=n,this.regexes.push([n,e]),this.matchAt+=function(e){return RegExp(e.toString()+"|").exec("").length-1}(e)+1}compile(){0===this.regexes.length&&(this.exec=()=>null);const e=this.regexes.map(e=>e[1]);this.matcherRe=n(function(e,n="|"){for(var t=/\[(?:[^\\\]]|\\.)*\]|\(\??|\\([1-9][0-9]*)|\\./,r=0,a="",i=0;i0&&(a+=n),a+="(";o.length>0;){var l=t.exec(o);if(null==l){a+=o;break}a+=o.substring(0,l.index),o=o.substring(l.index+l[0].length),"\\"===l[0][0]&&l[1]?a+="\\"+(+l[1]+s):(a+=l[0],"("===l[0]&&r++)}a+=")"}return a}(e),!0),this.lastIndex=0}exec(e){this.matcherRe.lastIndex=this.lastIndex;const n=this.matcherRe.exec(e);if(!n)return null;const t=n.findIndex((e,n)=>n>0&&void 0!==e),r=this.matchIndexes[t];return n.splice(0,t),Object.assign(n,r)}}class a{constructor(){this.rules=[],this.multiRegexes=[],this.count=0,this.lastIndex=0,this.regexIndex=0}getMatcher(e){if(this.multiRegexes[e])return this.multiRegexes[e];const n=new t;return this.rules.slice(e).forEach(([e,t])=>n.addRule(e,t)),n.compile(),this.multiRegexes[e]=n,n}considerAll(){this.regexIndex=0}addRule(e,n){this.rules.push([e,n]),"begin"===n.type&&this.count++}exec(e){const n=this.getMatcher(this.regexIndex);n.lastIndex=this.lastIndex;const t=n.exec(e);return t&&(this.regexIndex+=t.position+1,this.regexIndex===this.count&&(this.regexIndex=0)),t}}function i(e,n){const t=e.input[e.index-1],r=e.input[e.index+e[0].length];"."!==t&&"."!==r||n.ignoreMatch()}if(e.contains&&e.contains.includes("self"))throw Error("ERR: contains `self` is not supported at the top-level of a language. See documentation.");return function t(s,o){const l=s;if(s.compiled)return l;s.compiled=!0,s.__beforeBegin=null,s.keywords=s.keywords||s.beginKeywords;let c=null;if("object"==typeof s.keywords&&(c=s.keywords.$pattern,delete s.keywords.$pattern),s.keywords&&(s.keywords=function(e,n){var t={};return"string"==typeof e?r("keyword",e):Object.keys(e).forEach((function(n){r(n,e[n])})),t;function r(e,r){n&&(r=r.toLowerCase()),r.split(" ").forEach((function(n){var r=n.split("|");t[r[0]]=[e,w(r[0],r[1])]}))}}(s.keywords,e.case_insensitive)),s.lexemes&&c)throw Error("ERR: Prefer `keywords.$pattern` to `mode.lexemes`, BOTH are not allowed. (see mode reference) ");return l.keywordPatternRe=n(s.lexemes||c||/\w+/,!0),o&&(s.beginKeywords&&(s.begin="\\b("+s.beginKeywords.split(" ").join("|")+")(?=\\b|\\s)",s.__beforeBegin=i),s.begin||(s.begin=/\B|\b/),l.beginRe=n(s.begin),s.endSameAsBegin&&(s.end=s.begin),s.end||s.endsWithParent||(s.end=/\B|\b/),s.end&&(l.endRe=n(s.end)),l.terminator_end=d(s.end)||"",s.endsWithParent&&o.terminator_end&&(l.terminator_end+=(s.end?"|":"")+o.terminator_end)),s.illegal&&(l.illegalRe=n(s.illegal)),void 0===s.relevance&&(s.relevance=1),s.contains||(s.contains=[]),s.contains=[].concat(...s.contains.map((function(e){return function(e){return e.variants&&!e.cached_variants&&(e.cached_variants=e.variants.map((function(n){return r(e,{variants:null},n)}))),e.cached_variants?e.cached_variants:function e(n){return!!n&&(n.endsWithParent||e(n.starts))}(e)?r(e,{starts:e.starts?r(e.starts):null}):Object.isFrozen(e)?r(e):e}("self"===e?s:e)}))),s.contains.forEach((function(e){t(e,l)})),s.starts&&t(s.starts,o),l.matcher=function(e){const n=new a;return e.contains.forEach(e=>n.addRule(e.begin,{rule:e,type:"begin"})),e.terminator_end&&n.addRule(e.terminator_end,{type:"end"}),e.illegal&&n.addRule(e.illegal,{type:"illegal"}),n}(l),l}(e)}(E),N="",y=s||_,k={},O=new f.__emitter(f);!function(){for(var e=[],n=y;n!==E;n=n.parent)n.className&&e.unshift(n.className);e.forEach(e=>O.openNode(e))}();var A="",I=0,S=0,B=0,L=!1;try{for(y.matcher.considerAll();;){B++,L?L=!1:(y.matcher.lastIndex=S,y.matcher.considerAll());const e=y.matcher.exec(o);if(!e)break;const n=x(o.substring(S,e.index),e);S=e.index+n}return x(o.substr(S)),O.closeAllNodes(),O.finalize(),N=O.toHTML(),{relevance:I,value:N,language:e,illegal:!1,emitter:O,top:y}}catch(n){if(n.message&&n.message.includes("Illegal"))return{illegal:!0,illegalBy:{msg:n.message,context:o.slice(S-100,S+100),mode:n.mode},sofar:N,relevance:0,value:R(o),emitter:O};if(l)return{illegal:!1,relevance:0,value:R(o),emitter:O,language:e,top:y,errorRaised:n};throw n}}function v(e,n){n=n||f.languages||Object.keys(i);var t=function(e){const n={relevance:0,emitter:new f.__emitter(f),value:R(e),illegal:!1,top:h};return n.emitter.addText(e),n}(e),r=t;return n.filter(T).filter(I).forEach((function(n){var a=m(n,e,!1);a.language=n,a.relevance>r.relevance&&(r=a),a.relevance>t.relevance&&(r=t,t=a)})),r.language&&(t.second_best=r),t}function x(e){return f.tabReplace||f.useBR?e.replace(c,e=>"\n"===e?f.useBR?"
":e:f.tabReplace?e.replace(/\t/g,f.tabReplace):e):e}function E(e){let n=null;const t=function(e){var n=e.className+" ";n+=e.parentNode?e.parentNode.className:"";const t=f.languageDetectRe.exec(n);if(t){var r=T(t[1]);return r||(console.warn(g.replace("{}",t[1])),console.warn("Falling back to no-highlight mode for this block.",e)),r?t[1]:"no-highlight"}return n.split(/\s+/).find(e=>p(e)||T(e))}(e);if(p(t))return;S("before:highlightBlock",{block:e,language:t}),f.useBR?(n=document.createElement("div")).innerHTML=e.innerHTML.replace(/\n/g,"").replace(//g,"\n"):n=e;const r=n.textContent,a=t?b(t,r,!0):v(r),i=k(n);if(i.length){const e=document.createElement("div");e.innerHTML=a.value,a.value=O(i,k(e),r)}a.value=x(a.value),S("after:highlightBlock",{block:e,result:a}),e.innerHTML=a.value,e.className=function(e,n,t){var r=n?s[n]:t,a=[e.trim()];return e.match(/\bhljs\b/)||a.push("hljs"),e.includes(r)||a.push(r),a.join(" ").trim()}(e.className,t,a.language),e.result={language:a.language,re:a.relevance,relavance:a.relevance},a.second_best&&(e.second_best={language:a.second_best.language,re:a.second_best.relevance,relavance:a.second_best.relevance})}const N=()=>{if(!N.called){N.called=!0;var e=document.querySelectorAll("pre code");a.forEach.call(e,E)}};function T(e){return e=(e||"").toLowerCase(),i[e]||i[s[e]]}function A(e,{languageName:n}){"string"==typeof e&&(e=[e]),e.forEach(e=>{s[e]=n})}function I(e){var n=T(e);return n&&!n.disableAutodetect}function S(e,n){var t=e;o.forEach((function(e){e[t]&&e[t](n)}))}Object.assign(t,{highlight:b,highlightAuto:v,fixMarkup:x,highlightBlock:E,configure:function(e){f=y(f,e)},initHighlighting:N,initHighlightingOnLoad:function(){window.addEventListener("DOMContentLoaded",N,!1)},registerLanguage:function(e,n){var r=null;try{r=n(t)}catch(n){if(console.error("Language definition for '{}' could not be registered.".replace("{}",e)),!l)throw n;console.error(n),r=h}r.name||(r.name=e),i[e]=r,r.rawDefinition=n.bind(null,t),r.aliases&&A(r.aliases,{languageName:e})},listLanguages:function(){return Object.keys(i)},getLanguage:T,registerAliases:A,requireLanguage:function(e){var n=T(e);if(n)return n;throw Error("The '{}' language is required, but not loaded.".replace("{}",e))},autoDetection:I,inherit:y,addPlugin:function(e){o.push(e)}}),t.debugMode=function(){l=!1},t.safeMode=function(){l=!0},t.versionString="10.1.1";for(const n in _)"object"==typeof _[n]&&e(_[n]);return Object.assign(t,_),t}({})}();"object"==typeof exports&&"undefined"!=typeof module&&(module.exports=hljs); +hljs.registerLanguage("apache",function(){"use strict";return function(e){var n={className:"number",begin:"\\d{1,3}\\.\\d{1,3}\\.\\d{1,3}\\.\\d{1,3}(:\\d{1,5})?"};return{name:"Apache config",aliases:["apacheconf"],case_insensitive:!0,contains:[e.HASH_COMMENT_MODE,{className:"section",begin:"",contains:[n,{className:"number",begin:":\\d{1,5}"},e.inherit(e.QUOTE_STRING_MODE,{relevance:0})]},{className:"attribute",begin:/\w+/,relevance:0,keywords:{nomarkup:"order deny allow setenv rewriterule rewriteengine rewritecond documentroot sethandler errordocument loadmodule options header listen serverroot servername"},starts:{end:/$/,relevance:0,keywords:{literal:"on off all deny allow"},contains:[{className:"meta",begin:"\\s\\[",end:"\\]$"},{className:"variable",begin:"[\\$%]\\{",end:"\\}",contains:["self",{className:"number",begin:"[\\$%]\\d+"}]},n,{className:"number",begin:"\\d+"},e.QUOTE_STRING_MODE]}}],illegal:/\S/}}}()); +hljs.registerLanguage("bash",function(){"use strict";return function(e){const s={};Object.assign(s,{className:"variable",variants:[{begin:/\$[\w\d#@][\w\d_]*/},{begin:/\$\{/,end:/\}/,contains:[{begin:/:-/,contains:[s]}]}]});const t={className:"subst",begin:/\$\(/,end:/\)/,contains:[e.BACKSLASH_ESCAPE]},n={className:"string",begin:/"/,end:/"/,contains:[e.BACKSLASH_ESCAPE,s,t]};t.contains.push(n);const a={begin:/\$\(\(/,end:/\)\)/,contains:[{begin:/\d+#[0-9a-f]+/,className:"number"},e.NUMBER_MODE,s]},i=e.SHEBANG({binary:"(fish|bash|zsh|sh|csh|ksh|tcsh|dash|scsh)",relevance:10}),c={className:"function",begin:/\w[\w\d_]*\s*\(\s*\)\s*\{/,returnBegin:!0,contains:[e.inherit(e.TITLE_MODE,{begin:/\w[\w\d_]*/})],relevance:0};return{name:"Bash",aliases:["sh","zsh"],keywords:{$pattern:/\b-?[a-z\._]+\b/,keyword:"if then else elif fi for while in do done case esac function",literal:"true false",built_in:"break cd continue eval exec exit export getopts hash pwd readonly return shift test times trap umask unset alias bind builtin caller command declare echo enable help let local logout mapfile printf read readarray source type typeset ulimit unalias set shopt autoload bg bindkey bye cap chdir clone comparguments compcall compctl compdescribe compfiles compgroups compquote comptags comptry compvalues dirs disable disown echotc echoti emulate fc fg float functions getcap getln history integer jobs kill limit log noglob popd print pushd pushln rehash sched setcap setopt stat suspend ttyctl unfunction unhash unlimit unsetopt vared wait whence where which zcompile zformat zftp zle zmodload zparseopts zprof zpty zregexparse zsocket zstyle ztcp",_:"-ne -eq -lt -gt -f -d -e -s -l -a"},contains:[i,e.SHEBANG(),c,a,e.HASH_COMMENT_MODE,n,{className:"",begin:/\\"/},{className:"string",begin:/'/,end:/'/},s]}}}()); +hljs.registerLanguage("c-like",function(){"use strict";return function(e){function t(e){return"(?:"+e+")?"}var n="(decltype\\(auto\\)|"+t("[a-zA-Z_]\\w*::")+"[a-zA-Z_]\\w*"+t("<.*?>")+")",r={className:"keyword",begin:"\\b[a-z\\d_]*_t\\b"},a={className:"string",variants:[{begin:'(u8?|U|L)?"',end:'"',illegal:"\\n",contains:[e.BACKSLASH_ESCAPE]},{begin:"(u8?|U|L)?'(\\\\(x[0-9A-Fa-f]{2}|u[0-9A-Fa-f]{4,8}|[0-7]{3}|\\S)|.)",end:"'",illegal:"."},e.END_SAME_AS_BEGIN({begin:/(?:u8?|U|L)?R"([^()\\ ]{0,16})\(/,end:/\)([^()\\ ]{0,16})"/})]},i={className:"number",variants:[{begin:"\\b(0b[01']+)"},{begin:"(-?)\\b([\\d']+(\\.[\\d']*)?|\\.[\\d']+)(u|U|l|L|ul|UL|f|F|b|B)"},{begin:"(-?)(\\b0[xX][a-fA-F0-9']+|(\\b[\\d']+(\\.[\\d']*)?|\\.[\\d']+)([eE][-+]?[\\d']+)?)"}],relevance:0},s={className:"meta",begin:/#\s*[a-z]+\b/,end:/$/,keywords:{"meta-keyword":"if else elif endif define undef warning error line pragma _Pragma ifdef ifndef include"},contains:[{begin:/\\\n/,relevance:0},e.inherit(a,{className:"meta-string"}),{className:"meta-string",begin:/<.*?>/,end:/$/,illegal:"\\n"},e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE]},o={className:"title",begin:t("[a-zA-Z_]\\w*::")+e.IDENT_RE,relevance:0},c=t("[a-zA-Z_]\\w*::")+e.IDENT_RE+"\\s*\\(",l={keyword:"int float while private char char8_t char16_t char32_t catch import module export virtual operator sizeof dynamic_cast|10 typedef const_cast|10 const for static_cast|10 union namespace unsigned long volatile static protected bool template mutable if public friend do goto auto void enum else break extern using asm case typeid wchar_t short reinterpret_cast|10 default double register explicit signed typename try this switch continue inline delete alignas alignof constexpr consteval constinit decltype concept co_await co_return co_yield requires noexcept static_assert thread_local restrict final override atomic_bool atomic_char atomic_schar atomic_uchar atomic_short atomic_ushort atomic_int atomic_uint atomic_long atomic_ulong atomic_llong atomic_ullong new throw return and and_eq bitand bitor compl not not_eq or or_eq xor xor_eq",built_in:"std string wstring cin cout cerr clog stdin stdout stderr stringstream istringstream ostringstream auto_ptr deque list queue stack vector map set pair bitset multiset multimap unordered_set unordered_map unordered_multiset unordered_multimap priority_queue make_pair array shared_ptr abort terminate abs acos asin atan2 atan calloc ceil cosh cos exit exp fabs floor fmod fprintf fputs free frexp fscanf future isalnum isalpha iscntrl isdigit isgraph islower isprint ispunct isspace isupper isxdigit tolower toupper labs ldexp log10 log malloc realloc memchr memcmp memcpy memset modf pow printf putchar puts scanf sinh sin snprintf sprintf sqrt sscanf strcat strchr strcmp strcpy strcspn strlen strncat strncmp strncpy strpbrk strrchr strspn strstr tanh tan vfprintf vprintf vsprintf endl initializer_list unique_ptr _Bool complex _Complex imaginary _Imaginary",literal:"true false nullptr NULL"},d=[r,e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE,i,a],_={variants:[{begin:/=/,end:/;/},{begin:/\(/,end:/\)/},{beginKeywords:"new throw return else",end:/;/}],keywords:l,contains:d.concat([{begin:/\(/,end:/\)/,keywords:l,contains:d.concat(["self"]),relevance:0}]),relevance:0},u={className:"function",begin:"("+n+"[\\*&\\s]+)+"+c,returnBegin:!0,end:/[{;=]/,excludeEnd:!0,keywords:l,illegal:/[^\w\s\*&:<>]/,contains:[{begin:"decltype\\(auto\\)",keywords:l,relevance:0},{begin:c,returnBegin:!0,contains:[o],relevance:0},{className:"params",begin:/\(/,end:/\)/,keywords:l,relevance:0,contains:[e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE,a,i,r,{begin:/\(/,end:/\)/,keywords:l,relevance:0,contains:["self",e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE,a,i,r]}]},r,e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE,s]};return{aliases:["c","cc","h","c++","h++","hpp","hh","hxx","cxx"],keywords:l,disableAutodetect:!0,illegal:"",keywords:l,contains:["self",r]},{begin:e.IDENT_RE+"::",keywords:l},{className:"class",beginKeywords:"class struct",end:/[{;:]/,contains:[{begin://,contains:["self"]},e.TITLE_MODE]}]),exports:{preprocessor:s,strings:a,keywords:l}}}}()); +hljs.registerLanguage("c",function(){"use strict";return function(e){var n=e.getLanguage("c-like").rawDefinition();return n.name="C",n.aliases=["c","h"],n}}()); +hljs.registerLanguage("coffeescript",function(){"use strict";const e=["as","in","of","if","for","while","finally","var","new","function","do","return","void","else","break","catch","instanceof","with","throw","case","default","try","switch","continue","typeof","delete","let","yield","const","class","debugger","async","await","static","import","from","export","extends"],n=["true","false","null","undefined","NaN","Infinity"],a=[].concat(["setInterval","setTimeout","clearInterval","clearTimeout","require","exports","eval","isFinite","isNaN","parseFloat","parseInt","decodeURI","decodeURIComponent","encodeURI","encodeURIComponent","escape","unescape"],["arguments","this","super","console","window","document","localStorage","module","global"],["Intl","DataView","Number","Math","Date","String","RegExp","Object","Function","Boolean","Error","Symbol","Set","Map","WeakSet","WeakMap","Proxy","Reflect","JSON","Promise","Float64Array","Int16Array","Int32Array","Int8Array","Uint16Array","Uint32Array","Float32Array","Array","Uint8Array","Uint8ClampedArray","ArrayBuffer"],["EvalError","InternalError","RangeError","ReferenceError","SyntaxError","TypeError","URIError"]);return function(r){var t={keyword:e.concat(["then","unless","until","loop","by","when","and","or","is","isnt","not"]).filter((e=>n=>!e.includes(n))(["var","const","let","function","static"])).join(" "),literal:n.concat(["yes","no","on","off"]).join(" "),built_in:a.concat(["npm","print"]).join(" ")},i="[A-Za-z$_][0-9A-Za-z$_]*",s={className:"subst",begin:/#\{/,end:/}/,keywords:t},o=[r.BINARY_NUMBER_MODE,r.inherit(r.C_NUMBER_MODE,{starts:{end:"(\\s*/)?",relevance:0}}),{className:"string",variants:[{begin:/'''/,end:/'''/,contains:[r.BACKSLASH_ESCAPE]},{begin:/'/,end:/'/,contains:[r.BACKSLASH_ESCAPE]},{begin:/"""/,end:/"""/,contains:[r.BACKSLASH_ESCAPE,s]},{begin:/"/,end:/"/,contains:[r.BACKSLASH_ESCAPE,s]}]},{className:"regexp",variants:[{begin:"///",end:"///",contains:[s,r.HASH_COMMENT_MODE]},{begin:"//[gim]{0,3}(?=\\W)",relevance:0},{begin:/\/(?![ *]).*?(?![\\]).\/[gim]{0,3}(?=\W)/}]},{begin:"@"+i},{subLanguage:"javascript",excludeBegin:!0,excludeEnd:!0,variants:[{begin:"```",end:"```"},{begin:"`",end:"`"}]}];s.contains=o;var c=r.inherit(r.TITLE_MODE,{begin:i}),l={className:"params",begin:"\\([^\\(]",returnBegin:!0,contains:[{begin:/\(/,end:/\)/,keywords:t,contains:["self"].concat(o)}]};return{name:"CoffeeScript",aliases:["coffee","cson","iced"],keywords:t,illegal:/\/\*/,contains:o.concat([r.COMMENT("###","###"),r.HASH_COMMENT_MODE,{className:"function",begin:"^\\s*"+i+"\\s*=\\s*(\\(.*\\))?\\s*\\B[-=]>",end:"[-=]>",returnBegin:!0,contains:[c,l]},{begin:/[:\(,=]\s*/,relevance:0,contains:[{className:"function",begin:"(\\(.*\\))?\\s*\\B[-=]>",end:"[-=]>",returnBegin:!0,contains:[l]}]},{className:"class",beginKeywords:"class",end:"$",illegal:/[:="\[\]]/,contains:[{beginKeywords:"extends",endsWithParent:!0,illegal:/[:="\[\]]/,contains:[c]},c]},{begin:i+":",end:":",returnBegin:!0,returnEnd:!0,relevance:0}])}}}()); +hljs.registerLanguage("cpp",function(){"use strict";return function(e){var t=e.getLanguage("c-like").rawDefinition();return t.disableAutodetect=!1,t.name="C++",t.aliases=["cc","c++","h++","hpp","hh","hxx","cxx"],t}}()); +hljs.registerLanguage("csharp",function(){"use strict";return function(e){var n={keyword:"abstract as base bool break byte case catch char checked const continue decimal default delegate do double enum event explicit extern finally fixed float for foreach goto if implicit in int interface internal is lock long object operator out override params private protected public readonly ref sbyte sealed short sizeof stackalloc static string struct switch this try typeof uint ulong unchecked unsafe ushort using virtual void volatile while add alias ascending async await by descending dynamic equals from get global group into join let nameof on orderby partial remove select set value var when where yield",literal:"null false true"},i=e.inherit(e.TITLE_MODE,{begin:"[a-zA-Z](\\.?\\w)*"}),a={className:"number",variants:[{begin:"\\b(0b[01']+)"},{begin:"(-?)\\b([\\d']+(\\.[\\d']*)?|\\.[\\d']+)(u|U|l|L|ul|UL|f|F|b|B)"},{begin:"(-?)(\\b0[xX][a-fA-F0-9']+|(\\b[\\d']+(\\.[\\d']*)?|\\.[\\d']+)([eE][-+]?[\\d']+)?)"}],relevance:0},s={className:"string",begin:'@"',end:'"',contains:[{begin:'""'}]},t=e.inherit(s,{illegal:/\n/}),l={className:"subst",begin:"{",end:"}",keywords:n},r=e.inherit(l,{illegal:/\n/}),c={className:"string",begin:/\$"/,end:'"',illegal:/\n/,contains:[{begin:"{{"},{begin:"}}"},e.BACKSLASH_ESCAPE,r]},o={className:"string",begin:/\$@"/,end:'"',contains:[{begin:"{{"},{begin:"}}"},{begin:'""'},l]},g=e.inherit(o,{illegal:/\n/,contains:[{begin:"{{"},{begin:"}}"},{begin:'""'},r]});l.contains=[o,c,s,e.APOS_STRING_MODE,e.QUOTE_STRING_MODE,a,e.C_BLOCK_COMMENT_MODE],r.contains=[g,c,t,e.APOS_STRING_MODE,e.QUOTE_STRING_MODE,a,e.inherit(e.C_BLOCK_COMMENT_MODE,{illegal:/\n/})];var d={variants:[o,c,s,e.APOS_STRING_MODE,e.QUOTE_STRING_MODE]},E={begin:"<",end:">",contains:[{beginKeywords:"in out"},i]},_=e.IDENT_RE+"(<"+e.IDENT_RE+"(\\s*,\\s*"+e.IDENT_RE+")*>)?(\\[\\])?",b={begin:"@"+e.IDENT_RE,relevance:0};return{name:"C#",aliases:["cs","c#"],keywords:n,illegal:/::/,contains:[e.COMMENT("///","$",{returnBegin:!0,contains:[{className:"doctag",variants:[{begin:"///",relevance:0},{begin:"\x3c!--|--\x3e"},{begin:""}]}]}),e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE,{className:"meta",begin:"#",end:"$",keywords:{"meta-keyword":"if else elif endif define undef warning error line region endregion pragma checksum"}},d,a,{beginKeywords:"class interface",end:/[{;=]/,illegal:/[^\s:,]/,contains:[{beginKeywords:"where class"},i,E,e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE]},{beginKeywords:"namespace",end:/[{;=]/,illegal:/[^\s:]/,contains:[i,e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE]},{className:"meta",begin:"^\\s*\\[",excludeBegin:!0,end:"\\]",excludeEnd:!0,contains:[{className:"meta-string",begin:/"/,end:/"/}]},{beginKeywords:"new return throw await else",relevance:0},{className:"function",begin:"("+_+"\\s+)+"+e.IDENT_RE+"\\s*(\\<.+\\>)?\\s*\\(",returnBegin:!0,end:/\s*[{;=]/,excludeEnd:!0,keywords:n,contains:[{begin:e.IDENT_RE+"\\s*(\\<.+\\>)?\\s*\\(",returnBegin:!0,contains:[e.TITLE_MODE,E],relevance:0},{className:"params",begin:/\(/,end:/\)/,excludeBegin:!0,excludeEnd:!0,keywords:n,relevance:0,contains:[d,a,e.C_BLOCK_COMMENT_MODE]},e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE]},b]}}}()); +hljs.registerLanguage("css",function(){"use strict";return function(e){var n={begin:/(?:[A-Z\_\.\-]+|--[a-zA-Z0-9_-]+)\s*:/,returnBegin:!0,end:";",endsWithParent:!0,contains:[{className:"attribute",begin:/\S/,end:":",excludeEnd:!0,starts:{endsWithParent:!0,excludeEnd:!0,contains:[{begin:/[\w-]+\(/,returnBegin:!0,contains:[{className:"built_in",begin:/[\w-]+/},{begin:/\(/,end:/\)/,contains:[e.APOS_STRING_MODE,e.QUOTE_STRING_MODE,e.CSS_NUMBER_MODE]}]},e.CSS_NUMBER_MODE,e.QUOTE_STRING_MODE,e.APOS_STRING_MODE,e.C_BLOCK_COMMENT_MODE,{className:"number",begin:"#[0-9A-Fa-f]+"},{className:"meta",begin:"!important"}]}}]};return{name:"CSS",case_insensitive:!0,illegal:/[=\/|'\$]/,contains:[e.C_BLOCK_COMMENT_MODE,{className:"selector-id",begin:/#[A-Za-z0-9_-]+/},{className:"selector-class",begin:/\.[A-Za-z0-9_-]+/},{className:"selector-attr",begin:/\[/,end:/\]/,illegal:"$",contains:[e.APOS_STRING_MODE,e.QUOTE_STRING_MODE]},{className:"selector-pseudo",begin:/:(:)?[a-zA-Z0-9\_\-\+\(\)"'.]+/},{begin:"@(page|font-face)",lexemes:"@[a-z-]+",keywords:"@page @font-face"},{begin:"@",end:"[{;]",illegal:/:/,returnBegin:!0,contains:[{className:"keyword",begin:/@\-?\w[\w]*(\-\w+)*/},{begin:/\s/,endsWithParent:!0,excludeEnd:!0,relevance:0,keywords:"and or not only",contains:[{begin:/[a-z-]+:/,className:"attribute"},e.APOS_STRING_MODE,e.QUOTE_STRING_MODE,e.CSS_NUMBER_MODE]}]},{className:"selector-tag",begin:"[a-zA-Z-][a-zA-Z0-9_-]*",relevance:0},{begin:"{",end:"}",illegal:/\S/,contains:[e.C_BLOCK_COMMENT_MODE,n]}]}}}()); +hljs.registerLanguage("diff",function(){"use strict";return function(e){return{name:"Diff",aliases:["patch"],contains:[{className:"meta",relevance:10,variants:[{begin:/^@@ +\-\d+,\d+ +\+\d+,\d+ +@@$/},{begin:/^\*\*\* +\d+,\d+ +\*\*\*\*$/},{begin:/^\-\-\- +\d+,\d+ +\-\-\-\-$/}]},{className:"comment",variants:[{begin:/Index: /,end:/$/},{begin:/={3,}/,end:/$/},{begin:/^\-{3}/,end:/$/},{begin:/^\*{3} /,end:/$/},{begin:/^\+{3}/,end:/$/},{begin:/^\*{15}$/}]},{className:"addition",begin:"^\\+",end:"$"},{className:"deletion",begin:"^\\-",end:"$"},{className:"addition",begin:"^\\!",end:"$"}]}}}()); +hljs.registerLanguage("go",function(){"use strict";return function(e){var n={keyword:"break default func interface select case map struct chan else goto package switch const fallthrough if range type continue for import return var go defer bool byte complex64 complex128 float32 float64 int8 int16 int32 int64 string uint8 uint16 uint32 uint64 int uint uintptr rune",literal:"true false iota nil",built_in:"append cap close complex copy imag len make new panic print println real recover delete"};return{name:"Go",aliases:["golang"],keywords:n,illegal:"e(n)).join("")}return function(a){var s={className:"number",relevance:0,variants:[{begin:/([\+\-]+)?[\d]+_[\d_]+/},{begin:a.NUMBER_RE}]},i=a.COMMENT();i.variants=[{begin:/;/,end:/$/},{begin:/#/,end:/$/}];var t={className:"variable",variants:[{begin:/\$[\w\d"][\w\d_]*/},{begin:/\$\{(.*?)}/}]},r={className:"literal",begin:/\bon|off|true|false|yes|no\b/},l={className:"string",contains:[a.BACKSLASH_ESCAPE],variants:[{begin:"'''",end:"'''",relevance:10},{begin:'"""',end:'"""',relevance:10},{begin:'"',end:'"'},{begin:"'",end:"'"}]},c={begin:/\[/,end:/\]/,contains:[i,r,t,l,s,"self"],relevance:0},g="("+[/[A-Za-z0-9_-]+/,/"(\\"|[^"])*"/,/'[^']*'/].map(n=>e(n)).join("|")+")";return{name:"TOML, also INI",aliases:["toml"],case_insensitive:!0,illegal:/\S/,contains:[i,{className:"section",begin:/\[+/,end:/\]+/},{begin:n(g,"(\\s*\\.\\s*",g,")*",n("(?=",/\s*=\s*[^#\s]/,")")),className:"attr",starts:{end:/$/,contains:[i,c,r,t,l,s]}}]}}}()); +hljs.registerLanguage("java",function(){"use strict";function e(e){return e?"string"==typeof e?e:e.source:null}function n(e){return a("(",e,")?")}function a(...n){return n.map(n=>e(n)).join("")}function s(...n){return"("+n.map(n=>e(n)).join("|")+")"}return function(e){var t="false synchronized int abstract float private char boolean var static null if const for true while long strictfp finally protected import native final void enum else break transient catch instanceof byte super volatile case assert short package default double public try this switch continue throws protected public private module requires exports do",i={className:"meta",begin:"@[À-ʸa-zA-Z_$][À-ʸa-zA-Z_$0-9]*",contains:[{begin:/\(/,end:/\)/,contains:["self"]}]},r=e=>a("[",e,"]+([",e,"_]*[",e,"]+)?"),c={className:"number",variants:[{begin:`\\b(0[bB]${r("01")})[lL]?`},{begin:`\\b(0${r("0-7")})[dDfFlL]?`},{begin:a(/\b0[xX]/,s(a(r("a-fA-F0-9"),/\./,r("a-fA-F0-9")),a(r("a-fA-F0-9"),/\.?/),a(/\./,r("a-fA-F0-9"))),/([pP][+-]?(\d+))?/,/[fFdDlL]?/)},{begin:a(/\b/,s(a(/\d*\./,r("\\d")),r("\\d")),/[eE][+-]?[\d]+[dDfF]?/)},{begin:a(/\b/,r(/\d/),n(/\.?/),n(r(/\d/)),/[dDfFlL]?/)}],relevance:0};return{name:"Java",aliases:["jsp"],keywords:t,illegal:/<\/|#/,contains:[e.COMMENT("/\\*\\*","\\*/",{relevance:0,contains:[{begin:/\w+@/,relevance:0},{className:"doctag",begin:"@[A-Za-z]+"}]}),e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE,e.APOS_STRING_MODE,e.QUOTE_STRING_MODE,{className:"class",beginKeywords:"class interface",end:/[{;=]/,excludeEnd:!0,keywords:"class interface",illegal:/[:"\[\]]/,contains:[{beginKeywords:"extends implements"},e.UNDERSCORE_TITLE_MODE]},{beginKeywords:"new throw return else",relevance:0},{className:"function",begin:"([À-ʸa-zA-Z_$][À-ʸa-zA-Z_$0-9]*(<[À-ʸa-zA-Z_$][À-ʸa-zA-Z_$0-9]*(\\s*,\\s*[À-ʸa-zA-Z_$][À-ʸa-zA-Z_$0-9]*)*>)?\\s+)+"+e.UNDERSCORE_IDENT_RE+"\\s*\\(",returnBegin:!0,end:/[{;=]/,excludeEnd:!0,keywords:t,contains:[{begin:e.UNDERSCORE_IDENT_RE+"\\s*\\(",returnBegin:!0,relevance:0,contains:[e.UNDERSCORE_TITLE_MODE]},{className:"params",begin:/\(/,end:/\)/,keywords:t,relevance:0,contains:[i,e.APOS_STRING_MODE,e.QUOTE_STRING_MODE,e.C_NUMBER_MODE,e.C_BLOCK_COMMENT_MODE]},e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE]},c,i]}}}()); +hljs.registerLanguage("javascript",function(){"use strict";const e=["as","in","of","if","for","while","finally","var","new","function","do","return","void","else","break","catch","instanceof","with","throw","case","default","try","switch","continue","typeof","delete","let","yield","const","class","debugger","async","await","static","import","from","export","extends"],n=["true","false","null","undefined","NaN","Infinity"],a=[].concat(["setInterval","setTimeout","clearInterval","clearTimeout","require","exports","eval","isFinite","isNaN","parseFloat","parseInt","decodeURI","decodeURIComponent","encodeURI","encodeURIComponent","escape","unescape"],["arguments","this","super","console","window","document","localStorage","module","global"],["Intl","DataView","Number","Math","Date","String","RegExp","Object","Function","Boolean","Error","Symbol","Set","Map","WeakSet","WeakMap","Proxy","Reflect","JSON","Promise","Float64Array","Int16Array","Int32Array","Int8Array","Uint16Array","Uint32Array","Float32Array","Array","Uint8Array","Uint8ClampedArray","ArrayBuffer"],["EvalError","InternalError","RangeError","ReferenceError","SyntaxError","TypeError","URIError"]);function s(e){return r("(?=",e,")")}function r(...e){return e.map(e=>(function(e){return e?"string"==typeof e?e:e.source:null})(e)).join("")}return function(t){var i="[A-Za-z$_][0-9A-Za-z$_]*",c={begin:/<[A-Za-z0-9\\._:-]+/,end:/\/[A-Za-z0-9\\._:-]+>|\/>/},o={$pattern:"[A-Za-z$_][0-9A-Za-z$_]*",keyword:e.join(" "),literal:n.join(" "),built_in:a.join(" ")},l={className:"number",variants:[{begin:"\\b(0[bB][01]+)n?"},{begin:"\\b(0[oO][0-7]+)n?"},{begin:t.C_NUMBER_RE+"n?"}],relevance:0},E={className:"subst",begin:"\\$\\{",end:"\\}",keywords:o,contains:[]},d={begin:"html`",end:"",starts:{end:"`",returnEnd:!1,contains:[t.BACKSLASH_ESCAPE,E],subLanguage:"xml"}},g={begin:"css`",end:"",starts:{end:"`",returnEnd:!1,contains:[t.BACKSLASH_ESCAPE,E],subLanguage:"css"}},u={className:"string",begin:"`",end:"`",contains:[t.BACKSLASH_ESCAPE,E]};E.contains=[t.APOS_STRING_MODE,t.QUOTE_STRING_MODE,d,g,u,l,t.REGEXP_MODE];var b=E.contains.concat([{begin:/\(/,end:/\)/,contains:["self"].concat(E.contains,[t.C_BLOCK_COMMENT_MODE,t.C_LINE_COMMENT_MODE])},t.C_BLOCK_COMMENT_MODE,t.C_LINE_COMMENT_MODE]),_={className:"params",begin:/\(/,end:/\)/,excludeBegin:!0,excludeEnd:!0,contains:b};return{name:"JavaScript",aliases:["js","jsx","mjs","cjs"],keywords:o,contains:[t.SHEBANG({binary:"node",relevance:5}),{className:"meta",relevance:10,begin:/^\s*['"]use (strict|asm)['"]/},t.APOS_STRING_MODE,t.QUOTE_STRING_MODE,d,g,u,t.C_LINE_COMMENT_MODE,t.COMMENT("/\\*\\*","\\*/",{relevance:0,contains:[{className:"doctag",begin:"@[A-Za-z]+",contains:[{className:"type",begin:"\\{",end:"\\}",relevance:0},{className:"variable",begin:i+"(?=\\s*(-)|$)",endsParent:!0,relevance:0},{begin:/(?=[^\n])\s/,relevance:0}]}]}),t.C_BLOCK_COMMENT_MODE,l,{begin:r(/[{,\n]\s*/,s(r(/(((\/\/.*)|(\/\*(.|\n)*\*\/))\s*)*/,i+"\\s*:"))),relevance:0,contains:[{className:"attr",begin:i+s("\\s*:"),relevance:0}]},{begin:"("+t.RE_STARTERS_RE+"|\\b(case|return|throw)\\b)\\s*",keywords:"return throw case",contains:[t.C_LINE_COMMENT_MODE,t.C_BLOCK_COMMENT_MODE,t.REGEXP_MODE,{className:"function",begin:"(\\([^(]*(\\([^(]*(\\([^(]*\\))?\\))?\\)|"+t.UNDERSCORE_IDENT_RE+")\\s*=>",returnBegin:!0,end:"\\s*=>",contains:[{className:"params",variants:[{begin:t.UNDERSCORE_IDENT_RE},{className:null,begin:/\(\s*\)/,skip:!0},{begin:/\(/,end:/\)/,excludeBegin:!0,excludeEnd:!0,keywords:o,contains:b}]}]},{begin:/,/,relevance:0},{className:"",begin:/\s/,end:/\s*/,skip:!0},{variants:[{begin:"<>",end:""},{begin:c.begin,end:c.end}],subLanguage:"xml",contains:[{begin:c.begin,end:c.end,skip:!0,contains:["self"]}]}],relevance:0},{className:"function",beginKeywords:"function",end:/\{/,excludeEnd:!0,contains:[t.inherit(t.TITLE_MODE,{begin:i}),_],illegal:/\[|%/},{begin:/\$[(.]/},t.METHOD_GUARD,{className:"class",beginKeywords:"class",end:/[{;=]/,excludeEnd:!0,illegal:/[:"\[\]]/,contains:[{beginKeywords:"extends"},t.UNDERSCORE_TITLE_MODE]},{beginKeywords:"constructor",end:/\{/,excludeEnd:!0},{begin:"(get|set)\\s+(?="+i+"\\()",end:/{/,keywords:"get set",contains:[t.inherit(t.TITLE_MODE,{begin:i}),{begin:/\(\)/},_]}],illegal:/#(?!!)/}}}()); +hljs.registerLanguage("json",function(){"use strict";return function(n){var e={literal:"true false null"},i=[n.C_LINE_COMMENT_MODE,n.C_BLOCK_COMMENT_MODE],t=[n.QUOTE_STRING_MODE,n.C_NUMBER_MODE],a={end:",",endsWithParent:!0,excludeEnd:!0,contains:t,keywords:e},l={begin:"{",end:"}",contains:[{className:"attr",begin:/"/,end:/"/,contains:[n.BACKSLASH_ESCAPE],illegal:"\\n"},n.inherit(a,{begin:/:/})].concat(i),illegal:"\\S"},s={begin:"\\[",end:"\\]",contains:[n.inherit(a)],illegal:"\\S"};return t.push(l,s),i.forEach((function(n){t.push(n)})),{name:"JSON",contains:t,keywords:e,illegal:"\\S"}}}()); +hljs.registerLanguage("kotlin",function(){"use strict";return function(e){var n={keyword:"abstract as val var vararg get set class object open private protected public noinline crossinline dynamic final enum if else do while for when throw try catch finally import package is in fun override companion reified inline lateinit init interface annotation data sealed internal infix operator out by constructor super tailrec where const inner suspend typealias external expect actual trait volatile transient native default",built_in:"Byte Short Char Int Long Boolean Float Double Void Unit Nothing",literal:"true false null"},a={className:"symbol",begin:e.UNDERSCORE_IDENT_RE+"@"},i={className:"subst",begin:"\\${",end:"}",contains:[e.C_NUMBER_MODE]},s={className:"variable",begin:"\\$"+e.UNDERSCORE_IDENT_RE},t={className:"string",variants:[{begin:'"""',end:'"""(?=[^"])',contains:[s,i]},{begin:"'",end:"'",illegal:/\n/,contains:[e.BACKSLASH_ESCAPE]},{begin:'"',end:'"',illegal:/\n/,contains:[e.BACKSLASH_ESCAPE,s,i]}]};i.contains.push(t);var r={className:"meta",begin:"@(?:file|property|field|get|set|receiver|param|setparam|delegate)\\s*:(?:\\s*"+e.UNDERSCORE_IDENT_RE+")?"},l={className:"meta",begin:"@"+e.UNDERSCORE_IDENT_RE,contains:[{begin:/\(/,end:/\)/,contains:[e.inherit(t,{className:"meta-string"})]}]},c=e.COMMENT("/\\*","\\*/",{contains:[e.C_BLOCK_COMMENT_MODE]}),o={variants:[{className:"type",begin:e.UNDERSCORE_IDENT_RE},{begin:/\(/,end:/\)/,contains:[]}]},d=o;return d.variants[1].contains=[o],o.variants[1].contains=[d],{name:"Kotlin",aliases:["kt"],keywords:n,contains:[e.COMMENT("/\\*\\*","\\*/",{relevance:0,contains:[{className:"doctag",begin:"@[A-Za-z]+"}]}),e.C_LINE_COMMENT_MODE,c,{className:"keyword",begin:/\b(break|continue|return|this)\b/,starts:{contains:[{className:"symbol",begin:/@\w+/}]}},a,r,l,{className:"function",beginKeywords:"fun",end:"[(]|$",returnBegin:!0,excludeEnd:!0,keywords:n,illegal:/fun\s+(<.*>)?[^\s\(]+(\s+[^\s\(]+)\s*=/,relevance:5,contains:[{begin:e.UNDERSCORE_IDENT_RE+"\\s*\\(",returnBegin:!0,relevance:0,contains:[e.UNDERSCORE_TITLE_MODE]},{className:"type",begin://,keywords:"reified",relevance:0},{className:"params",begin:/\(/,end:/\)/,endsParent:!0,keywords:n,relevance:0,contains:[{begin:/:/,end:/[=,\/]/,endsWithParent:!0,contains:[o,e.C_LINE_COMMENT_MODE,c],relevance:0},e.C_LINE_COMMENT_MODE,c,r,l,t,e.C_NUMBER_MODE]},c]},{className:"class",beginKeywords:"class interface trait",end:/[:\{(]|$/,excludeEnd:!0,illegal:"extends implements",contains:[{beginKeywords:"public protected internal private constructor"},e.UNDERSCORE_TITLE_MODE,{className:"type",begin://,excludeBegin:!0,excludeEnd:!0,relevance:0},{className:"type",begin:/[,:]\s*/,end:/[<\(,]|$/,excludeBegin:!0,returnEnd:!0},r,l]},t,{className:"meta",begin:"^#!/usr/bin/env",end:"$",illegal:"\n"},{className:"number",begin:"\\b(0[bB]([01]+[01_]+[01]+|[01]+)|0[xX]([a-fA-F0-9]+[a-fA-F0-9_]+[a-fA-F0-9]+|[a-fA-F0-9]+)|(([\\d]+[\\d_]+[\\d]+|[\\d]+)(\\.([\\d]+[\\d_]+[\\d]+|[\\d]+))?|\\.([\\d]+[\\d_]+[\\d]+|[\\d]+))([eE][-+]?\\d+)?)[lLfF]?",relevance:0}]}}}()); +hljs.registerLanguage("less",function(){"use strict";return function(e){var n="([\\w-]+|@{[\\w-]+})",a=[],s=[],t=function(e){return{className:"string",begin:"~?"+e+".*?"+e}},r=function(e,n,a){return{className:e,begin:n,relevance:a}},i={begin:"\\(",end:"\\)",contains:s,relevance:0};s.push(e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE,t("'"),t('"'),e.CSS_NUMBER_MODE,{begin:"(url|data-uri)\\(",starts:{className:"string",end:"[\\)\\n]",excludeEnd:!0}},r("number","#[0-9A-Fa-f]+\\b"),i,r("variable","@@?[\\w-]+",10),r("variable","@{[\\w-]+}"),r("built_in","~?`[^`]*?`"),{className:"attribute",begin:"[\\w-]+\\s*:",end:":",returnBegin:!0,excludeEnd:!0},{className:"meta",begin:"!important"});var c=s.concat({begin:"{",end:"}",contains:a}),l={beginKeywords:"when",endsWithParent:!0,contains:[{beginKeywords:"and not"}].concat(s)},o={begin:n+"\\s*:",returnBegin:!0,end:"[;}]",relevance:0,contains:[{className:"attribute",begin:n,end:":",excludeEnd:!0,starts:{endsWithParent:!0,illegal:"[<=$]",relevance:0,contains:s}}]},g={className:"keyword",begin:"@(import|media|charset|font-face|(-[a-z]+-)?keyframes|supports|document|namespace|page|viewport|host)\\b",starts:{end:"[;{}]",returnEnd:!0,contains:s,relevance:0}},d={className:"variable",variants:[{begin:"@[\\w-]+\\s*:",relevance:15},{begin:"@[\\w-]+"}],starts:{end:"[;}]",returnEnd:!0,contains:c}},b={variants:[{begin:"[\\.#:&\\[>]",end:"[;{}]"},{begin:n,end:"{"}],returnBegin:!0,returnEnd:!0,illegal:"[<='$\"]",relevance:0,contains:[e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE,l,r("keyword","all\\b"),r("variable","@{[\\w-]+}"),r("selector-tag",n+"%?",0),r("selector-id","#"+n),r("selector-class","\\."+n,0),r("selector-tag","&",0),{className:"selector-attr",begin:"\\[",end:"\\]"},{className:"selector-pseudo",begin:/:(:)?[a-zA-Z0-9\_\-\+\(\)"'.]+/},{begin:"\\(",end:"\\)",contains:c},{begin:"!important"}]};return a.push(e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE,g,d,o,b),{name:"Less",case_insensitive:!0,illegal:"[=>'/<($\"]",contains:a}}}()); +hljs.registerLanguage("lua",function(){"use strict";return function(e){var t={begin:"\\[=*\\[",end:"\\]=*\\]",contains:["self"]},a=[e.COMMENT("--(?!\\[=*\\[)","$"),e.COMMENT("--\\[=*\\[","\\]=*\\]",{contains:[t],relevance:10})];return{name:"Lua",keywords:{$pattern:e.UNDERSCORE_IDENT_RE,literal:"true false nil",keyword:"and break do else elseif end for goto if in local not or repeat return then until while",built_in:"_G _ENV _VERSION __index __newindex __mode __call __metatable __tostring __len __gc __add __sub __mul __div __mod __pow __concat __unm __eq __lt __le assert collectgarbage dofile error getfenv getmetatable ipairs load loadfile loadstring module next pairs pcall print rawequal rawget rawset require select setfenv setmetatable tonumber tostring type unpack xpcall arg self coroutine resume yield status wrap create running debug getupvalue debug sethook getmetatable gethook setmetatable setlocal traceback setfenv getinfo setupvalue getlocal getregistry getfenv io lines write close flush open output type read stderr stdin input stdout popen tmpfile math log max acos huge ldexp pi cos tanh pow deg tan cosh sinh random randomseed frexp ceil floor rad abs sqrt modf asin min mod fmod log10 atan2 exp sin atan os exit setlocale date getenv difftime remove time clock tmpname rename execute package preload loadlib loaded loaders cpath config path seeall string sub upper len gfind rep find match char dump gmatch reverse byte format gsub lower table setn insert getn foreachi maxn foreach concat sort remove"},contains:a.concat([{className:"function",beginKeywords:"function",end:"\\)",contains:[e.inherit(e.TITLE_MODE,{begin:"([_a-zA-Z]\\w*\\.)*([_a-zA-Z]\\w*:)?[_a-zA-Z]\\w*"}),{className:"params",begin:"\\(",endsWithParent:!0,contains:a}].concat(a)},e.C_NUMBER_MODE,e.APOS_STRING_MODE,e.QUOTE_STRING_MODE,{className:"string",begin:"\\[=*\\[",end:"\\]=*\\]",contains:[t],relevance:5}])}}}()); +hljs.registerLanguage("makefile",function(){"use strict";return function(e){var i={className:"variable",variants:[{begin:"\\$\\("+e.UNDERSCORE_IDENT_RE+"\\)",contains:[e.BACKSLASH_ESCAPE]},{begin:/\$[@%`]+/}]}]}]};return{name:"HTML, XML",aliases:["html","xhtml","rss","atom","xjb","xsd","xsl","plist","wsf","svg"],case_insensitive:!0,contains:[{className:"meta",begin:"",relevance:10,contains:[a,i,t,s,{begin:"\\[",end:"\\]",contains:[{className:"meta",begin:"",contains:[a,s,i,t]}]}]},e.COMMENT("\x3c!--","--\x3e",{relevance:10}),{begin:"<\\!\\[CDATA\\[",end:"\\]\\]>",relevance:10},n,{className:"meta",begin:/<\?xml/,end:/\?>/,relevance:10},{className:"tag",begin:")",end:">",keywords:{name:"style"},contains:[c],starts:{end:"",returnEnd:!0,subLanguage:["css","xml"]}},{className:"tag",begin:")",end:">",keywords:{name:"script"},contains:[c],starts:{end:"<\/script>",returnEnd:!0,subLanguage:["javascript","handlebars","xml"]}},{className:"tag",begin:"",contains:[{className:"name",begin:/[^\/><\s]+/,relevance:0},c]}]}}}()); +hljs.registerLanguage("markdown",function(){"use strict";return function(n){const e={begin:"<",end:">",subLanguage:"xml",relevance:0},a={begin:"\\[.+?\\][\\(\\[].*?[\\)\\]]",returnBegin:!0,contains:[{className:"string",begin:"\\[",end:"\\]",excludeBegin:!0,returnEnd:!0,relevance:0},{className:"link",begin:"\\]\\(",end:"\\)",excludeBegin:!0,excludeEnd:!0},{className:"symbol",begin:"\\]\\[",end:"\\]",excludeBegin:!0,excludeEnd:!0}],relevance:10},i={className:"strong",contains:[],variants:[{begin:/_{2}/,end:/_{2}/},{begin:/\*{2}/,end:/\*{2}/}]},s={className:"emphasis",contains:[],variants:[{begin:/\*(?!\*)/,end:/\*/},{begin:/_(?!_)/,end:/_/,relevance:0}]};i.contains.push(s),s.contains.push(i);var c=[e,a];return i.contains=i.contains.concat(c),s.contains=s.contains.concat(c),{name:"Markdown",aliases:["md","mkdown","mkd"],contains:[{className:"section",variants:[{begin:"^#{1,6}",end:"$",contains:c=c.concat(i,s)},{begin:"(?=^.+?\\n[=-]{2,}$)",contains:[{begin:"^[=-]*$"},{begin:"^",end:"\\n",contains:c}]}]},e,{className:"bullet",begin:"^[ \t]*([*+-]|(\\d+\\.))(?=\\s+)",end:"\\s+",excludeEnd:!0},i,s,{className:"quote",begin:"^>\\s+",contains:c,end:"$"},{className:"code",variants:[{begin:"(`{3,})(.|\\n)*?\\1`*[ ]*"},{begin:"(~{3,})(.|\\n)*?\\1~*[ ]*"},{begin:"```",end:"```+[ ]*$"},{begin:"~~~",end:"~~~+[ ]*$"},{begin:"`.+?`"},{begin:"(?=^( {4}|\\t))",contains:[{begin:"^( {4}|\\t)",end:"(\\n)$"}],relevance:0}]},{begin:"^[-\\*]{3,}",end:"$"},a,{begin:/^\[[^\n]+\]:/,returnBegin:!0,contains:[{className:"symbol",begin:/\[/,end:/\]/,excludeBegin:!0,excludeEnd:!0},{className:"link",begin:/:\s*/,end:/$/,excludeBegin:!0}]}]}}}()); +hljs.registerLanguage("nginx",function(){"use strict";return function(e){var n={className:"variable",variants:[{begin:/\$\d+/},{begin:/\$\{/,end:/}/},{begin:"[\\$\\@]"+e.UNDERSCORE_IDENT_RE}]},a={endsWithParent:!0,keywords:{$pattern:"[a-z/_]+",literal:"on off yes no true false none blocked debug info notice warn error crit select break last permanent redirect kqueue rtsig epoll poll /dev/poll"},relevance:0,illegal:"=>",contains:[e.HASH_COMMENT_MODE,{className:"string",contains:[e.BACKSLASH_ESCAPE,n],variants:[{begin:/"/,end:/"/},{begin:/'/,end:/'/}]},{begin:"([a-z]+):/",end:"\\s",endsWithParent:!0,excludeEnd:!0,contains:[n]},{className:"regexp",contains:[e.BACKSLASH_ESCAPE,n],variants:[{begin:"\\s\\^",end:"\\s|{|;",returnEnd:!0},{begin:"~\\*?\\s+",end:"\\s|{|;",returnEnd:!0},{begin:"\\*(\\.[a-z\\-]+)+"},{begin:"([a-z\\-]+\\.)+\\*"}]},{className:"number",begin:"\\b\\d{1,3}\\.\\d{1,3}\\.\\d{1,3}\\.\\d{1,3}(:\\d{1,5})?\\b"},{className:"number",begin:"\\b\\d+[kKmMgGdshdwy]*\\b",relevance:0},n]};return{name:"Nginx config",aliases:["nginxconf"],contains:[e.HASH_COMMENT_MODE,{begin:e.UNDERSCORE_IDENT_RE+"\\s+{",returnBegin:!0,end:"{",contains:[{className:"section",begin:e.UNDERSCORE_IDENT_RE}],relevance:0},{begin:e.UNDERSCORE_IDENT_RE+"\\s",end:";|{",returnBegin:!0,contains:[{className:"attribute",begin:e.UNDERSCORE_IDENT_RE,starts:a}],relevance:0}],illegal:"[^\\s\\}]"}}}()); +hljs.registerLanguage("objectivec",function(){"use strict";return function(e){var n=/[a-zA-Z@][a-zA-Z0-9_]*/,_={$pattern:n,keyword:"@interface @class @protocol @implementation"};return{name:"Objective-C",aliases:["mm","objc","obj-c"],keywords:{$pattern:n,keyword:"int float while char export sizeof typedef const struct for union unsigned long volatile static bool mutable if do return goto void enum else break extern asm case short default double register explicit signed typename this switch continue wchar_t inline readonly assign readwrite self @synchronized id typeof nonatomic super unichar IBOutlet IBAction strong weak copy in out inout bycopy byref oneway __strong __weak __block __autoreleasing @private @protected @public @try @property @end @throw @catch @finally @autoreleasepool @synthesize @dynamic @selector @optional @required @encode @package @import @defs @compatibility_alias __bridge __bridge_transfer __bridge_retained __bridge_retain __covariant __contravariant __kindof _Nonnull _Nullable _Null_unspecified __FUNCTION__ __PRETTY_FUNCTION__ __attribute__ getter setter retain unsafe_unretained nonnull nullable null_unspecified null_resettable class instancetype NS_DESIGNATED_INITIALIZER NS_UNAVAILABLE NS_REQUIRES_SUPER NS_RETURNS_INNER_POINTER NS_INLINE NS_AVAILABLE NS_DEPRECATED NS_ENUM NS_OPTIONS NS_SWIFT_UNAVAILABLE NS_ASSUME_NONNULL_BEGIN NS_ASSUME_NONNULL_END NS_REFINED_FOR_SWIFT NS_SWIFT_NAME NS_SWIFT_NOTHROW NS_DURING NS_HANDLER NS_ENDHANDLER NS_VALUERETURN NS_VOIDRETURN",literal:"false true FALSE TRUE nil YES NO NULL",built_in:"BOOL dispatch_once_t dispatch_queue_t dispatch_sync dispatch_async dispatch_once"},illegal:"/,end:/$/,illegal:"\\n"},e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE]},{className:"class",begin:"("+_.keyword.split(" ").join("|")+")\\b",end:"({|$)",excludeEnd:!0,keywords:_,contains:[e.UNDERSCORE_TITLE_MODE]},{begin:"\\."+e.UNDERSCORE_IDENT_RE,relevance:0}]}}}()); +hljs.registerLanguage("perl",function(){"use strict";return function(e){var n={$pattern:/[\w.]+/,keyword:"getpwent getservent quotemeta msgrcv scalar kill dbmclose undef lc ma syswrite tr send umask sysopen shmwrite vec qx utime local oct semctl localtime readpipe do return format read sprintf dbmopen pop getpgrp not getpwnam rewinddir qq fileno qw endprotoent wait sethostent bless s|0 opendir continue each sleep endgrent shutdown dump chomp connect getsockname die socketpair close flock exists index shmget sub for endpwent redo lstat msgctl setpgrp abs exit select print ref gethostbyaddr unshift fcntl syscall goto getnetbyaddr join gmtime symlink semget splice x|0 getpeername recv log setsockopt cos last reverse gethostbyname getgrnam study formline endhostent times chop length gethostent getnetent pack getprotoent getservbyname rand mkdir pos chmod y|0 substr endnetent printf next open msgsnd readdir use unlink getsockopt getpriority rindex wantarray hex system getservbyport endservent int chr untie rmdir prototype tell listen fork shmread ucfirst setprotoent else sysseek link getgrgid shmctl waitpid unpack getnetbyname reset chdir grep split require caller lcfirst until warn while values shift telldir getpwuid my getprotobynumber delete and sort uc defined srand accept package seekdir getprotobyname semop our rename seek if q|0 chroot sysread setpwent no crypt getc chown sqrt write setnetent setpriority foreach tie sin msgget map stat getlogin unless elsif truncate exec keys glob tied closedir ioctl socket readlink eval xor readline binmode setservent eof ord bind alarm pipe atan2 getgrent exp time push setgrent gt lt or ne m|0 break given say state when"},t={className:"subst",begin:"[$@]\\{",end:"\\}",keywords:n},s={begin:"->{",end:"}"},r={variants:[{begin:/\$\d/},{begin:/[\$%@](\^\w\b|#\w+(::\w+)*|{\w+}|\w+(::\w*)*)/},{begin:/[\$%@][^\s\w{]/,relevance:0}]},i=[e.BACKSLASH_ESCAPE,t,r],a=[r,e.HASH_COMMENT_MODE,e.COMMENT("^\\=\\w","\\=cut",{endsWithParent:!0}),s,{className:"string",contains:i,variants:[{begin:"q[qwxr]?\\s*\\(",end:"\\)",relevance:5},{begin:"q[qwxr]?\\s*\\[",end:"\\]",relevance:5},{begin:"q[qwxr]?\\s*\\{",end:"\\}",relevance:5},{begin:"q[qwxr]?\\s*\\|",end:"\\|",relevance:5},{begin:"q[qwxr]?\\s*\\<",end:"\\>",relevance:5},{begin:"qw\\s+q",end:"q",relevance:5},{begin:"'",end:"'",contains:[e.BACKSLASH_ESCAPE]},{begin:'"',end:'"'},{begin:"`",end:"`",contains:[e.BACKSLASH_ESCAPE]},{begin:"{\\w+}",contains:[],relevance:0},{begin:"-?\\w+\\s*\\=\\>",contains:[],relevance:0}]},{className:"number",begin:"(\\b0[0-7_]+)|(\\b0x[0-9a-fA-F_]+)|(\\b[1-9][0-9_]*(\\.[0-9_]+)?)|[0_]\\b",relevance:0},{begin:"(\\/\\/|"+e.RE_STARTERS_RE+"|\\b(split|return|print|reverse|grep)\\b)\\s*",keywords:"split return print reverse grep",relevance:0,contains:[e.HASH_COMMENT_MODE,{className:"regexp",begin:"(s|tr|y)/(\\\\.|[^/])*/(\\\\.|[^/])*/[a-z]*",relevance:10},{className:"regexp",begin:"(m|qr)?/",end:"/[a-z]*",contains:[e.BACKSLASH_ESCAPE],relevance:0}]},{className:"function",beginKeywords:"sub",end:"(\\s*\\(.*?\\))?[;{]",excludeEnd:!0,relevance:5,contains:[e.TITLE_MODE]},{begin:"-\\w\\b",relevance:0},{begin:"^__DATA__$",end:"^__END__$",subLanguage:"mojolicious",contains:[{begin:"^@@.*",end:"$",className:"comment"}]}];return t.contains=a,s.contains=a,{name:"Perl",aliases:["pl","pm"],keywords:n,contains:a}}}()); +hljs.registerLanguage("php",function(){"use strict";return function(e){var r={begin:"\\$+[a-zA-Z_-ÿ][a-zA-Z0-9_-ÿ]*"},t={className:"meta",variants:[{begin:/<\?php/,relevance:10},{begin:/<\?[=]?/},{begin:/\?>/}]},a={className:"string",contains:[e.BACKSLASH_ESCAPE,t],variants:[{begin:'b"',end:'"'},{begin:"b'",end:"'"},e.inherit(e.APOS_STRING_MODE,{illegal:null}),e.inherit(e.QUOTE_STRING_MODE,{illegal:null})]},n={variants:[e.BINARY_NUMBER_MODE,e.C_NUMBER_MODE]},i={keyword:"__CLASS__ __DIR__ __FILE__ __FUNCTION__ __LINE__ __METHOD__ __NAMESPACE__ __TRAIT__ die echo exit include include_once print require require_once array abstract and as binary bool boolean break callable case catch class clone const continue declare default do double else elseif empty enddeclare endfor endforeach endif endswitch endwhile eval extends final finally float for foreach from global goto if implements instanceof insteadof int integer interface isset iterable list new object or private protected public real return string switch throw trait try unset use var void while xor yield",literal:"false null true",built_in:"Error|0 AppendIterator ArgumentCountError ArithmeticError ArrayIterator ArrayObject AssertionError BadFunctionCallException BadMethodCallException CachingIterator CallbackFilterIterator CompileError Countable DirectoryIterator DivisionByZeroError DomainException EmptyIterator ErrorException Exception FilesystemIterator FilterIterator GlobIterator InfiniteIterator InvalidArgumentException IteratorIterator LengthException LimitIterator LogicException MultipleIterator NoRewindIterator OutOfBoundsException OutOfRangeException OuterIterator OverflowException ParentIterator ParseError RangeException RecursiveArrayIterator RecursiveCachingIterator RecursiveCallbackFilterIterator RecursiveDirectoryIterator RecursiveFilterIterator RecursiveIterator RecursiveIteratorIterator RecursiveRegexIterator RecursiveTreeIterator RegexIterator RuntimeException SeekableIterator SplDoublyLinkedList SplFileInfo SplFileObject SplFixedArray SplHeap SplMaxHeap SplMinHeap SplObjectStorage SplObserver SplObserver SplPriorityQueue SplQueue SplStack SplSubject SplSubject SplTempFileObject TypeError UnderflowException UnexpectedValueException ArrayAccess Closure Generator Iterator IteratorAggregate Serializable Throwable Traversable WeakReference Directory __PHP_Incomplete_Class parent php_user_filter self static stdClass"};return{aliases:["php","php3","php4","php5","php6","php7"],case_insensitive:!0,keywords:i,contains:[e.HASH_COMMENT_MODE,e.COMMENT("//","$",{contains:[t]}),e.COMMENT("/\\*","\\*/",{contains:[{className:"doctag",begin:"@[A-Za-z]+"}]}),e.COMMENT("__halt_compiler.+?;",!1,{endsWithParent:!0,keywords:"__halt_compiler"}),{className:"string",begin:/<<<['"]?\w+['"]?$/,end:/^\w+;?$/,contains:[e.BACKSLASH_ESCAPE,{className:"subst",variants:[{begin:/\$\w+/},{begin:/\{\$/,end:/\}/}]}]},t,{className:"keyword",begin:/\$this\b/},r,{begin:/(::|->)+[a-zA-Z_\x7f-\xff][a-zA-Z0-9_\x7f-\xff]*/},{className:"function",beginKeywords:"fn function",end:/[;{]/,excludeEnd:!0,illegal:"[$%\\[]",contains:[e.UNDERSCORE_TITLE_MODE,{className:"params",begin:"\\(",end:"\\)",excludeBegin:!0,excludeEnd:!0,keywords:i,contains:["self",r,e.C_BLOCK_COMMENT_MODE,a,n]}]},{className:"class",beginKeywords:"class interface",end:"{",excludeEnd:!0,illegal:/[:\(\$"]/,contains:[{beginKeywords:"extends implements"},e.UNDERSCORE_TITLE_MODE]},{beginKeywords:"namespace",end:";",illegal:/[\.']/,contains:[e.UNDERSCORE_TITLE_MODE]},{beginKeywords:"use",end:";",contains:[e.UNDERSCORE_TITLE_MODE]},{begin:"=>"},a,n]}}}()); +hljs.registerLanguage("php-template",function(){"use strict";return function(n){return{name:"PHP template",subLanguage:"xml",contains:[{begin:/<\?(php|=)?/,end:/\?>/,subLanguage:"php",contains:[{begin:"/\\*",end:"\\*/",skip:!0},{begin:'b"',end:'"',skip:!0},{begin:"b'",end:"'",skip:!0},n.inherit(n.APOS_STRING_MODE,{illegal:null,className:null,contains:null,skip:!0}),n.inherit(n.QUOTE_STRING_MODE,{illegal:null,className:null,contains:null,skip:!0})]}]}}}()); +hljs.registerLanguage("plaintext",function(){"use strict";return function(t){return{name:"Plain text",aliases:["text","txt"],disableAutodetect:!0}}}()); +hljs.registerLanguage("properties",function(){"use strict";return function(e){var n="[ \\t\\f]*",t="("+n+"[:=]"+n+"|[ \\t\\f]+)",a="([^\\\\:= \\t\\f\\n]|\\\\.)+",s={end:t,relevance:0,starts:{className:"string",end:/$/,relevance:0,contains:[{begin:"\\\\\\n"}]}};return{name:".properties",case_insensitive:!0,illegal:/\S/,contains:[e.COMMENT("^\\s*[!#]","$"),{begin:"([^\\\\\\W:= \\t\\f\\n]|\\\\.)+"+t,returnBegin:!0,contains:[{className:"attr",begin:"([^\\\\\\W:= \\t\\f\\n]|\\\\.)+",endsParent:!0,relevance:0}],starts:s},{begin:a+t,returnBegin:!0,relevance:0,contains:[{className:"meta",begin:a,endsParent:!0,relevance:0}],starts:s},{className:"attr",relevance:0,begin:a+n+"$"}]}}}()); +hljs.registerLanguage("python",function(){"use strict";return function(e){var n={keyword:"and elif is global as in if from raise for except finally print import pass return exec else break not with class assert yield try while continue del or def lambda async await nonlocal|10",built_in:"Ellipsis NotImplemented",literal:"False None True"},a={className:"meta",begin:/^(>>>|\.\.\.) /},i={className:"subst",begin:/\{/,end:/\}/,keywords:n,illegal:/#/},s={begin:/\{\{/,relevance:0},r={className:"string",contains:[e.BACKSLASH_ESCAPE],variants:[{begin:/(u|b)?r?'''/,end:/'''/,contains:[e.BACKSLASH_ESCAPE,a],relevance:10},{begin:/(u|b)?r?"""/,end:/"""/,contains:[e.BACKSLASH_ESCAPE,a],relevance:10},{begin:/(fr|rf|f)'''/,end:/'''/,contains:[e.BACKSLASH_ESCAPE,a,s,i]},{begin:/(fr|rf|f)"""/,end:/"""/,contains:[e.BACKSLASH_ESCAPE,a,s,i]},{begin:/(u|r|ur)'/,end:/'/,relevance:10},{begin:/(u|r|ur)"/,end:/"/,relevance:10},{begin:/(b|br)'/,end:/'/},{begin:/(b|br)"/,end:/"/},{begin:/(fr|rf|f)'/,end:/'/,contains:[e.BACKSLASH_ESCAPE,s,i]},{begin:/(fr|rf|f)"/,end:/"/,contains:[e.BACKSLASH_ESCAPE,s,i]},e.APOS_STRING_MODE,e.QUOTE_STRING_MODE]},l={className:"number",relevance:0,variants:[{begin:e.BINARY_NUMBER_RE+"[lLjJ]?"},{begin:"\\b(0o[0-7]+)[lLjJ]?"},{begin:e.C_NUMBER_RE+"[lLjJ]?"}]},t={className:"params",variants:[{begin:/\(\s*\)/,skip:!0,className:null},{begin:/\(/,end:/\)/,excludeBegin:!0,excludeEnd:!0,contains:["self",a,l,r,e.HASH_COMMENT_MODE]}]};return i.contains=[r,l,a],{name:"Python",aliases:["py","gyp","ipython"],keywords:n,illegal:/(<\/|->|\?)|=>/,contains:[a,l,{beginKeywords:"if",relevance:0},r,e.HASH_COMMENT_MODE,{variants:[{className:"function",beginKeywords:"def"},{className:"class",beginKeywords:"class"}],end:/:/,illegal:/[${=;\n,]/,contains:[e.UNDERSCORE_TITLE_MODE,t,{begin:/->/,endsWithParent:!0,keywords:"None"}]},{className:"meta",begin:/^[\t ]*@/,end:/$/},{begin:/\b(print|exec)\(/}]}}}()); +hljs.registerLanguage("python-repl",function(){"use strict";return function(n){return{aliases:["pycon"],contains:[{className:"meta",starts:{end:/ |$/,starts:{end:"$",subLanguage:"python"}},variants:[{begin:/^>>>(?=[ ]|$)/},{begin:/^\.\.\.(?=[ ]|$)/}]}]}}}()); +hljs.registerLanguage("ruby",function(){"use strict";return function(e){var n="[a-zA-Z_]\\w*[!?=]?|[-+~]\\@|<<|>>|=~|===?|<=>|[<>]=?|\\*\\*|[-/+%^&*~`|]|\\[\\]=?",a={keyword:"and then defined module in return redo if BEGIN retry end for self when next until do begin unless END rescue else break undef not super class case require yield alias while ensure elsif or include attr_reader attr_writer attr_accessor",literal:"true false nil"},s={className:"doctag",begin:"@[A-Za-z]+"},i={begin:"#<",end:">"},r=[e.COMMENT("#","$",{contains:[s]}),e.COMMENT("^\\=begin","^\\=end",{contains:[s],relevance:10}),e.COMMENT("^__END__","\\n$")],c={className:"subst",begin:"#\\{",end:"}",keywords:a},t={className:"string",contains:[e.BACKSLASH_ESCAPE,c],variants:[{begin:/'/,end:/'/},{begin:/"/,end:/"/},{begin:/`/,end:/`/},{begin:"%[qQwWx]?\\(",end:"\\)"},{begin:"%[qQwWx]?\\[",end:"\\]"},{begin:"%[qQwWx]?{",end:"}"},{begin:"%[qQwWx]?<",end:">"},{begin:"%[qQwWx]?/",end:"/"},{begin:"%[qQwWx]?%",end:"%"},{begin:"%[qQwWx]?-",end:"-"},{begin:"%[qQwWx]?\\|",end:"\\|"},{begin:/\B\?(\\\d{1,3}|\\x[A-Fa-f0-9]{1,2}|\\u[A-Fa-f0-9]{4}|\\?\S)\b/},{begin:/<<[-~]?'?(\w+)(?:.|\n)*?\n\s*\1\b/,returnBegin:!0,contains:[{begin:/<<[-~]?'?/},e.END_SAME_AS_BEGIN({begin:/(\w+)/,end:/(\w+)/,contains:[e.BACKSLASH_ESCAPE,c]})]}]},b={className:"params",begin:"\\(",end:"\\)",endsParent:!0,keywords:a},d=[t,i,{className:"class",beginKeywords:"class module",end:"$|;",illegal:/=/,contains:[e.inherit(e.TITLE_MODE,{begin:"[A-Za-z_]\\w*(::\\w+)*(\\?|\\!)?"}),{begin:"<\\s*",contains:[{begin:"("+e.IDENT_RE+"::)?"+e.IDENT_RE}]}].concat(r)},{className:"function",beginKeywords:"def",end:"$|;",contains:[e.inherit(e.TITLE_MODE,{begin:n}),b].concat(r)},{begin:e.IDENT_RE+"::"},{className:"symbol",begin:e.UNDERSCORE_IDENT_RE+"(\\!|\\?)?:",relevance:0},{className:"symbol",begin:":(?!\\s)",contains:[t,{begin:n}],relevance:0},{className:"number",begin:"(\\b0[0-7_]+)|(\\b0x[0-9a-fA-F_]+)|(\\b[1-9][0-9_]*(\\.[0-9_]+)?)|[0_]\\b",relevance:0},{begin:"(\\$\\W)|((\\$|\\@\\@?)(\\w+))"},{className:"params",begin:/\|/,end:/\|/,keywords:a},{begin:"("+e.RE_STARTERS_RE+"|unless)\\s*",keywords:"unless",contains:[i,{className:"regexp",contains:[e.BACKSLASH_ESCAPE,c],illegal:/\n/,variants:[{begin:"/",end:"/[a-z]*"},{begin:"%r{",end:"}[a-z]*"},{begin:"%r\\(",end:"\\)[a-z]*"},{begin:"%r!",end:"![a-z]*"},{begin:"%r\\[",end:"\\][a-z]*"}]}].concat(r),relevance:0}].concat(r);c.contains=d,b.contains=d;var g=[{begin:/^\s*=>/,starts:{end:"$",contains:d}},{className:"meta",begin:"^([>?]>|[\\w#]+\\(\\w+\\):\\d+:\\d+>|(\\w+-)?\\d+\\.\\d+\\.\\d(p\\d+)?[^>]+>)",starts:{end:"$",contains:d}}];return{name:"Ruby",aliases:["rb","gemspec","podspec","thor","irb"],keywords:a,illegal:/\/\*/,contains:r.concat(g).concat(d)}}}()); +hljs.registerLanguage("rust",function(){"use strict";return function(e){var n="([ui](8|16|32|64|128|size)|f(32|64))?",t="drop i8 i16 i32 i64 i128 isize u8 u16 u32 u64 u128 usize f32 f64 str char bool Box Option Result String Vec Copy Send Sized Sync Drop Fn FnMut FnOnce ToOwned Clone Debug PartialEq PartialOrd Eq Ord AsRef AsMut Into From Default Iterator Extend IntoIterator DoubleEndedIterator ExactSizeIterator SliceConcatExt ToString assert! assert_eq! bitflags! bytes! cfg! col! concat! concat_idents! debug_assert! debug_assert_eq! env! panic! file! format! format_args! include_bin! include_str! line! local_data_key! module_path! option_env! print! println! select! stringify! try! unimplemented! unreachable! vec! write! writeln! macro_rules! assert_ne! debug_assert_ne!";return{name:"Rust",aliases:["rs"],keywords:{$pattern:e.IDENT_RE+"!?",keyword:"abstract as async await become box break const continue crate do dyn else enum extern false final fn for if impl in let loop macro match mod move mut override priv pub ref return self Self static struct super trait true try type typeof unsafe unsized use virtual where while yield",literal:"true false Some None Ok Err",built_in:t},illegal:""}]}}}()); +hljs.registerLanguage("scss",function(){"use strict";return function(e){var t={className:"variable",begin:"(\\$[a-zA-Z-][a-zA-Z0-9_-]*)\\b"},i={className:"number",begin:"#[0-9A-Fa-f]+"};return e.CSS_NUMBER_MODE,e.QUOTE_STRING_MODE,e.APOS_STRING_MODE,e.C_BLOCK_COMMENT_MODE,{name:"SCSS",case_insensitive:!0,illegal:"[=/|']",contains:[e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE,{className:"selector-id",begin:"\\#[A-Za-z0-9_-]+",relevance:0},{className:"selector-class",begin:"\\.[A-Za-z0-9_-]+",relevance:0},{className:"selector-attr",begin:"\\[",end:"\\]",illegal:"$"},{className:"selector-tag",begin:"\\b(a|abbr|acronym|address|area|article|aside|audio|b|base|big|blockquote|body|br|button|canvas|caption|cite|code|col|colgroup|command|datalist|dd|del|details|dfn|div|dl|dt|em|embed|fieldset|figcaption|figure|footer|form|frame|frameset|(h[1-6])|head|header|hgroup|hr|html|i|iframe|img|input|ins|kbd|keygen|label|legend|li|link|map|mark|meta|meter|nav|noframes|noscript|object|ol|optgroup|option|output|p|param|pre|progress|q|rp|rt|ruby|samp|script|section|select|small|span|strike|strong|style|sub|sup|table|tbody|td|textarea|tfoot|th|thead|time|title|tr|tt|ul|var|video)\\b",relevance:0},{className:"selector-pseudo",begin:":(visited|valid|root|right|required|read-write|read-only|out-range|optional|only-of-type|only-child|nth-of-type|nth-last-of-type|nth-last-child|nth-child|not|link|left|last-of-type|last-child|lang|invalid|indeterminate|in-range|hover|focus|first-of-type|first-line|first-letter|first-child|first|enabled|empty|disabled|default|checked|before|after|active)"},{className:"selector-pseudo",begin:"::(after|before|choices|first-letter|first-line|repeat-index|repeat-item|selection|value)"},t,{className:"attribute",begin:"\\b(src|z-index|word-wrap|word-spacing|word-break|width|widows|white-space|visibility|vertical-align|unicode-bidi|transition-timing-function|transition-property|transition-duration|transition-delay|transition|transform-style|transform-origin|transform|top|text-underline-position|text-transform|text-shadow|text-rendering|text-overflow|text-indent|text-decoration-style|text-decoration-line|text-decoration-color|text-decoration|text-align-last|text-align|tab-size|table-layout|right|resize|quotes|position|pointer-events|perspective-origin|perspective|page-break-inside|page-break-before|page-break-after|padding-top|padding-right|padding-left|padding-bottom|padding|overflow-y|overflow-x|overflow-wrap|overflow|outline-width|outline-style|outline-offset|outline-color|outline|orphans|order|opacity|object-position|object-fit|normal|none|nav-up|nav-right|nav-left|nav-index|nav-down|min-width|min-height|max-width|max-height|mask|marks|margin-top|margin-right|margin-left|margin-bottom|margin|list-style-type|list-style-position|list-style-image|list-style|line-height|letter-spacing|left|justify-content|initial|inherit|ime-mode|image-orientation|image-resolution|image-rendering|icon|hyphens|height|font-weight|font-variant-ligatures|font-variant|font-style|font-stretch|font-size-adjust|font-size|font-language-override|font-kerning|font-feature-settings|font-family|font|float|flex-wrap|flex-shrink|flex-grow|flex-flow|flex-direction|flex-basis|flex|filter|empty-cells|display|direction|cursor|counter-reset|counter-increment|content|column-width|column-span|column-rule-width|column-rule-style|column-rule-color|column-rule|column-gap|column-fill|column-count|columns|color|clip-path|clip|clear|caption-side|break-inside|break-before|break-after|box-sizing|box-shadow|box-decoration-break|bottom|border-width|border-top-width|border-top-style|border-top-right-radius|border-top-left-radius|border-top-color|border-top|border-style|border-spacing|border-right-width|border-right-style|border-right-color|border-right|border-radius|border-left-width|border-left-style|border-left-color|border-left|border-image-width|border-image-source|border-image-slice|border-image-repeat|border-image-outset|border-image|border-color|border-collapse|border-bottom-width|border-bottom-style|border-bottom-right-radius|border-bottom-left-radius|border-bottom-color|border-bottom|border|background-size|background-repeat|background-position|background-origin|background-image|background-color|background-clip|background-attachment|background-blend-mode|background|backface-visibility|auto|animation-timing-function|animation-play-state|animation-name|animation-iteration-count|animation-fill-mode|animation-duration|animation-direction|animation-delay|animation|align-self|align-items|align-content)\\b",illegal:"[^\\s]"},{begin:"\\b(whitespace|wait|w-resize|visible|vertical-text|vertical-ideographic|uppercase|upper-roman|upper-alpha|underline|transparent|top|thin|thick|text|text-top|text-bottom|tb-rl|table-header-group|table-footer-group|sw-resize|super|strict|static|square|solid|small-caps|separate|se-resize|scroll|s-resize|rtl|row-resize|ridge|right|repeat|repeat-y|repeat-x|relative|progress|pointer|overline|outside|outset|oblique|nowrap|not-allowed|normal|none|nw-resize|no-repeat|no-drop|newspaper|ne-resize|n-resize|move|middle|medium|ltr|lr-tb|lowercase|lower-roman|lower-alpha|loose|list-item|line|line-through|line-edge|lighter|left|keep-all|justify|italic|inter-word|inter-ideograph|inside|inset|inline|inline-block|inherit|inactive|ideograph-space|ideograph-parenthesis|ideograph-numeric|ideograph-alpha|horizontal|hidden|help|hand|groove|fixed|ellipsis|e-resize|double|dotted|distribute|distribute-space|distribute-letter|distribute-all-lines|disc|disabled|default|decimal|dashed|crosshair|collapse|col-resize|circle|char|center|capitalize|break-word|break-all|bottom|both|bolder|bold|block|bidi-override|below|baseline|auto|always|all-scroll|absolute|table|table-cell)\\b"},{begin:":",end:";",contains:[t,i,e.CSS_NUMBER_MODE,e.QUOTE_STRING_MODE,e.APOS_STRING_MODE,{className:"meta",begin:"!important"}]},{begin:"@(page|font-face)",lexemes:"@[a-z-]+",keywords:"@page @font-face"},{begin:"@",end:"[{;]",returnBegin:!0,keywords:"and or not only",contains:[{begin:"@[a-z-]+",className:"keyword"},t,e.QUOTE_STRING_MODE,e.APOS_STRING_MODE,i,e.CSS_NUMBER_MODE]}]}}}()); +hljs.registerLanguage("shell",function(){"use strict";return function(s){return{name:"Shell Session",aliases:["console"],contains:[{className:"meta",begin:"^\\s{0,3}[/\\w\\d\\[\\]()@-]*[>%$#]",starts:{end:"$",subLanguage:"bash"}}]}}}()); +hljs.registerLanguage("sql",function(){"use strict";return function(e){var t=e.COMMENT("--","$");return{name:"SQL",case_insensitive:!0,illegal:/[<>{}*]/,contains:[{beginKeywords:"begin end start commit rollback savepoint lock alter create drop rename call delete do handler insert load replace select truncate update set show pragma grant merge describe use explain help declare prepare execute deallocate release unlock purge reset change stop analyze cache flush optimize repair kill install uninstall checksum restore check backup revoke comment values with",end:/;/,endsWithParent:!0,keywords:{$pattern:/[\w\.]+/,keyword:"as abort abs absolute acc acce accep accept access accessed accessible account acos action activate add addtime admin administer advanced advise aes_decrypt aes_encrypt after agent aggregate ali alia alias all allocate allow alter always analyze ancillary and anti any anydata anydataset anyschema anytype apply archive archived archivelog are as asc ascii asin assembly assertion associate asynchronous at atan atn2 attr attri attrib attribu attribut attribute attributes audit authenticated authentication authid authors auto autoallocate autodblink autoextend automatic availability avg backup badfile basicfile before begin beginning benchmark between bfile bfile_base big bigfile bin binary_double binary_float binlog bit_and bit_count bit_length bit_or bit_xor bitmap blob_base block blocksize body both bound bucket buffer_cache buffer_pool build bulk by byte byteordermark bytes cache caching call calling cancel capacity cascade cascaded case cast catalog category ceil ceiling chain change changed char_base char_length character_length characters characterset charindex charset charsetform charsetid check checksum checksum_agg child choose chr chunk class cleanup clear client clob clob_base clone close cluster_id cluster_probability cluster_set clustering coalesce coercibility col collate collation collect colu colum column column_value columns columns_updated comment commit compact compatibility compiled complete composite_limit compound compress compute concat concat_ws concurrent confirm conn connec connect connect_by_iscycle connect_by_isleaf connect_by_root connect_time connection consider consistent constant constraint constraints constructor container content contents context contributors controlfile conv convert convert_tz corr corr_k corr_s corresponding corruption cos cost count count_big counted covar_pop covar_samp cpu_per_call cpu_per_session crc32 create creation critical cross cube cume_dist curdate current current_date current_time current_timestamp current_user cursor curtime customdatum cycle data database databases datafile datafiles datalength date_add date_cache date_format date_sub dateadd datediff datefromparts datename datepart datetime2fromparts day day_to_second dayname dayofmonth dayofweek dayofyear days db_role_change dbtimezone ddl deallocate declare decode decompose decrement decrypt deduplicate def defa defau defaul default defaults deferred defi defin define degrees delayed delegate delete delete_all delimited demand dense_rank depth dequeue des_decrypt des_encrypt des_key_file desc descr descri describ describe descriptor deterministic diagnostics difference dimension direct_load directory disable disable_all disallow disassociate discardfile disconnect diskgroup distinct distinctrow distribute distributed div do document domain dotnet double downgrade drop dumpfile duplicate duration each edition editionable editions element ellipsis else elsif elt empty enable enable_all enclosed encode encoding encrypt end end-exec endian enforced engine engines enqueue enterprise entityescaping eomonth error errors escaped evalname evaluate event eventdata events except exception exceptions exchange exclude excluding execu execut execute exempt exists exit exp expire explain explode export export_set extended extent external external_1 external_2 externally extract failed failed_login_attempts failover failure far fast feature_set feature_value fetch field fields file file_name_convert filesystem_like_logging final finish first first_value fixed flash_cache flashback floor flush following follows for forall force foreign form forma format found found_rows freelist freelists freepools fresh from from_base64 from_days ftp full function general generated get get_format get_lock getdate getutcdate global global_name globally go goto grant grants greatest group group_concat group_id grouping grouping_id groups gtid_subtract guarantee guard handler hash hashkeys having hea head headi headin heading heap help hex hierarchy high high_priority hosts hour hours http id ident_current ident_incr ident_seed identified identity idle_time if ifnull ignore iif ilike ilm immediate import in include including increment index indexes indexing indextype indicator indices inet6_aton inet6_ntoa inet_aton inet_ntoa infile initial initialized initially initrans inmemory inner innodb input insert install instance instantiable instr interface interleaved intersect into invalidate invisible is is_free_lock is_ipv4 is_ipv4_compat is_not is_not_null is_used_lock isdate isnull isolation iterate java join json json_exists keep keep_duplicates key keys kill language large last last_day last_insert_id last_value lateral lax lcase lead leading least leaves left len lenght length less level levels library like like2 like4 likec limit lines link list listagg little ln load load_file lob lobs local localtime localtimestamp locate locator lock locked log log10 log2 logfile logfiles logging logical logical_reads_per_call logoff logon logs long loop low low_priority lower lpad lrtrim ltrim main make_set makedate maketime managed management manual map mapping mask master master_pos_wait match matched materialized max maxextents maximize maxinstances maxlen maxlogfiles maxloghistory maxlogmembers maxsize maxtrans md5 measures median medium member memcompress memory merge microsecond mid migration min minextents minimum mining minus minute minutes minvalue missing mod mode model modification modify module monitoring month months mount move movement multiset mutex name name_const names nan national native natural nav nchar nclob nested never new newline next nextval no no_write_to_binlog noarchivelog noaudit nobadfile nocheck nocompress nocopy nocycle nodelay nodiscardfile noentityescaping noguarantee nokeep nologfile nomapping nomaxvalue nominimize nominvalue nomonitoring none noneditionable nonschema noorder nopr nopro noprom nopromp noprompt norely noresetlogs noreverse normal norowdependencies noschemacheck noswitch not nothing notice notnull notrim novalidate now nowait nth_value nullif nulls num numb numbe nvarchar nvarchar2 object ocicoll ocidate ocidatetime ociduration ociinterval ociloblocator ocinumber ociref ocirefcursor ocirowid ocistring ocitype oct octet_length of off offline offset oid oidindex old on online only opaque open operations operator optimal optimize option optionally or oracle oracle_date oradata ord ordaudio orddicom orddoc order ordimage ordinality ordvideo organization orlany orlvary out outer outfile outline output over overflow overriding package pad parallel parallel_enable parameters parent parse partial partition partitions pascal passing password password_grace_time password_lock_time password_reuse_max password_reuse_time password_verify_function patch path patindex pctincrease pctthreshold pctused pctversion percent percent_rank percentile_cont percentile_disc performance period period_add period_diff permanent physical pi pipe pipelined pivot pluggable plugin policy position post_transaction pow power pragma prebuilt precedes preceding precision prediction prediction_cost prediction_details prediction_probability prediction_set prepare present preserve prior priority private private_sga privileges procedural procedure procedure_analyze processlist profiles project prompt protection public publishingservername purge quarter query quick quiesce quota quotename radians raise rand range rank raw read reads readsize rebuild record records recover recovery recursive recycle redo reduced ref reference referenced references referencing refresh regexp_like register regr_avgx regr_avgy regr_count regr_intercept regr_r2 regr_slope regr_sxx regr_sxy reject rekey relational relative relaylog release release_lock relies_on relocate rely rem remainder rename repair repeat replace replicate replication required reset resetlogs resize resource respect restore restricted result result_cache resumable resume retention return returning returns reuse reverse revoke right rlike role roles rollback rolling rollup round row row_count rowdependencies rowid rownum rows rtrim rules safe salt sample save savepoint sb1 sb2 sb4 scan schema schemacheck scn scope scroll sdo_georaster sdo_topo_geometry search sec_to_time second seconds section securefile security seed segment select self semi sequence sequential serializable server servererror session session_user sessions_per_user set sets settings sha sha1 sha2 share shared shared_pool short show shrink shutdown si_averagecolor si_colorhistogram si_featurelist si_positionalcolor si_stillimage si_texture siblings sid sign sin size size_t sizes skip slave sleep smalldatetimefromparts smallfile snapshot some soname sort soundex source space sparse spfile split sql sql_big_result sql_buffer_result sql_cache sql_calc_found_rows sql_small_result sql_variant_property sqlcode sqldata sqlerror sqlname sqlstate sqrt square standalone standby start starting startup statement static statistics stats_binomial_test stats_crosstab stats_ks_test stats_mode stats_mw_test stats_one_way_anova stats_t_test_ stats_t_test_indep stats_t_test_one stats_t_test_paired stats_wsr_test status std stddev stddev_pop stddev_samp stdev stop storage store stored str str_to_date straight_join strcmp strict string struct stuff style subdate subpartition subpartitions substitutable substr substring subtime subtring_index subtype success sum suspend switch switchoffset switchover sync synchronous synonym sys sys_xmlagg sysasm sysaux sysdate sysdatetimeoffset sysdba sysoper system system_user sysutcdatetime table tables tablespace tablesample tan tdo template temporary terminated tertiary_weights test than then thread through tier ties time time_format time_zone timediff timefromparts timeout timestamp timestampadd timestampdiff timezone_abbr timezone_minute timezone_region to to_base64 to_date to_days to_seconds todatetimeoffset trace tracking transaction transactional translate translation treat trigger trigger_nestlevel triggers trim truncate try_cast try_convert try_parse type ub1 ub2 ub4 ucase unarchived unbounded uncompress under undo unhex unicode uniform uninstall union unique unix_timestamp unknown unlimited unlock unnest unpivot unrecoverable unsafe unsigned until untrusted unusable unused update updated upgrade upped upper upsert url urowid usable usage use use_stored_outlines user user_data user_resources users using utc_date utc_timestamp uuid uuid_short validate validate_password_strength validation valist value values var var_samp varcharc vari varia variab variabl variable variables variance varp varraw varrawc varray verify version versions view virtual visible void wait wallet warning warnings week weekday weekofyear wellformed when whene whenev wheneve whenever where while whitespace window with within without work wrapped xdb xml xmlagg xmlattributes xmlcast xmlcolattval xmlelement xmlexists xmlforest xmlindex xmlnamespaces xmlpi xmlquery xmlroot xmlschema xmlserialize xmltable xmltype xor year year_to_month years yearweek",literal:"true false null unknown",built_in:"array bigint binary bit blob bool boolean char character date dec decimal float int int8 integer interval number numeric real record serial serial8 smallint text time timestamp tinyint varchar varchar2 varying void"},contains:[{className:"string",begin:"'",end:"'",contains:[{begin:"''"}]},{className:"string",begin:'"',end:'"',contains:[{begin:'""'}]},{className:"string",begin:"`",end:"`"},e.C_NUMBER_MODE,e.C_BLOCK_COMMENT_MODE,t,e.HASH_COMMENT_MODE]},e.C_BLOCK_COMMENT_MODE,t,e.HASH_COMMENT_MODE]}}}()); +hljs.registerLanguage("swift",function(){"use strict";return function(e){var i={keyword:"#available #colorLiteral #column #else #elseif #endif #file #fileLiteral #function #if #imageLiteral #line #selector #sourceLocation _ __COLUMN__ __FILE__ __FUNCTION__ __LINE__ Any as as! as? associatedtype associativity break case catch class continue convenience default defer deinit didSet do dynamic dynamicType else enum extension fallthrough false fileprivate final for func get guard if import in indirect infix init inout internal is lazy left let mutating nil none nonmutating open operator optional override postfix precedence prefix private protocol Protocol public repeat required rethrows return right self Self set static struct subscript super switch throw throws true try try! try? Type typealias unowned var weak where while willSet",literal:"true false nil",built_in:"abs advance alignof alignofValue anyGenerator assert assertionFailure bridgeFromObjectiveC bridgeFromObjectiveCUnconditional bridgeToObjectiveC bridgeToObjectiveCUnconditional c compactMap contains count countElements countLeadingZeros debugPrint debugPrintln distance dropFirst dropLast dump encodeBitsAsWords enumerate equal fatalError filter find getBridgedObjectiveCType getVaList indices insertionSort isBridgedToObjectiveC isBridgedVerbatimToObjectiveC isUniquelyReferenced isUniquelyReferencedNonObjC join lazy lexicographicalCompare map max maxElement min minElement numericCast overlaps partition posix precondition preconditionFailure print println quickSort readLine reduce reflect reinterpretCast reverse roundUpToAlignment sizeof sizeofValue sort split startsWith stride strideof strideofValue swap toString transcode underestimateCount unsafeAddressOf unsafeBitCast unsafeDowncast unsafeUnwrap unsafeReflect withExtendedLifetime withObjectAtPlusZero withUnsafePointer withUnsafePointerToObject withUnsafeMutablePointer withUnsafeMutablePointers withUnsafePointer withUnsafePointers withVaList zip"},n=e.COMMENT("/\\*","\\*/",{contains:["self"]}),t={className:"subst",begin:/\\\(/,end:"\\)",keywords:i,contains:[]},a={className:"string",contains:[e.BACKSLASH_ESCAPE,t],variants:[{begin:/"""/,end:/"""/},{begin:/"/,end:/"/}]},r={className:"number",begin:"\\b([\\d_]+(\\.[\\deE_]+)?|0x[a-fA-F0-9_]+(\\.[a-fA-F0-9p_]+)?|0b[01_]+|0o[0-7_]+)\\b",relevance:0};return t.contains=[r],{name:"Swift",keywords:i,contains:[a,e.C_LINE_COMMENT_MODE,n,{className:"type",begin:"\\b[A-Z][\\wÀ-ʸ']*[!?]"},{className:"type",begin:"\\b[A-Z][\\wÀ-ʸ']*",relevance:0},r,{className:"function",beginKeywords:"func",end:"{",excludeEnd:!0,contains:[e.inherit(e.TITLE_MODE,{begin:/[A-Za-z$_][0-9A-Za-z$_]*/}),{begin://},{className:"params",begin:/\(/,end:/\)/,endsParent:!0,keywords:i,contains:["self",r,a,e.C_BLOCK_COMMENT_MODE,{begin:":"}],illegal:/["']/}],illegal:/\[|%/},{className:"class",beginKeywords:"struct protocol class extension enum",keywords:i,end:"\\{",excludeEnd:!0,contains:[e.inherit(e.TITLE_MODE,{begin:/[A-Za-z$_][\u00C0-\u02B80-9A-Za-z$_]*/})]},{className:"meta",begin:"(@discardableResult|@warn_unused_result|@exported|@lazy|@noescape|@NSCopying|@NSManaged|@objc|@objcMembers|@convention|@required|@noreturn|@IBAction|@IBDesignable|@IBInspectable|@IBOutlet|@infix|@prefix|@postfix|@autoclosure|@testable|@available|@nonobjc|@NSApplicationMain|@UIApplicationMain|@dynamicMemberLookup|@propertyWrapper)\\b"},{beginKeywords:"import",end:/$/,contains:[e.C_LINE_COMMENT_MODE,n]}]}}}()); +hljs.registerLanguage("typescript",function(){"use strict";const e=["as","in","of","if","for","while","finally","var","new","function","do","return","void","else","break","catch","instanceof","with","throw","case","default","try","switch","continue","typeof","delete","let","yield","const","class","debugger","async","await","static","import","from","export","extends"],n=["true","false","null","undefined","NaN","Infinity"],a=[].concat(["setInterval","setTimeout","clearInterval","clearTimeout","require","exports","eval","isFinite","isNaN","parseFloat","parseInt","decodeURI","decodeURIComponent","encodeURI","encodeURIComponent","escape","unescape"],["arguments","this","super","console","window","document","localStorage","module","global"],["Intl","DataView","Number","Math","Date","String","RegExp","Object","Function","Boolean","Error","Symbol","Set","Map","WeakSet","WeakMap","Proxy","Reflect","JSON","Promise","Float64Array","Int16Array","Int32Array","Int8Array","Uint16Array","Uint32Array","Float32Array","Array","Uint8Array","Uint8ClampedArray","ArrayBuffer"],["EvalError","InternalError","RangeError","ReferenceError","SyntaxError","TypeError","URIError"]);return function(r){var t={$pattern:"[A-Za-z$_][0-9A-Za-z$_]*",keyword:e.concat(["type","namespace","typedef","interface","public","private","protected","implements","declare","abstract","readonly"]).join(" "),literal:n.join(" "),built_in:a.concat(["any","void","number","boolean","string","object","never","enum"]).join(" ")},s={className:"meta",begin:"@[A-Za-z$_][0-9A-Za-z$_]*"},i={className:"number",variants:[{begin:"\\b(0[bB][01]+)n?"},{begin:"\\b(0[oO][0-7]+)n?"},{begin:r.C_NUMBER_RE+"n?"}],relevance:0},o={className:"subst",begin:"\\$\\{",end:"\\}",keywords:t,contains:[]},c={begin:"html`",end:"",starts:{end:"`",returnEnd:!1,contains:[r.BACKSLASH_ESCAPE,o],subLanguage:"xml"}},l={begin:"css`",end:"",starts:{end:"`",returnEnd:!1,contains:[r.BACKSLASH_ESCAPE,o],subLanguage:"css"}},E={className:"string",begin:"`",end:"`",contains:[r.BACKSLASH_ESCAPE,o]};o.contains=[r.APOS_STRING_MODE,r.QUOTE_STRING_MODE,c,l,E,i,r.REGEXP_MODE];var d={begin:"\\(",end:/\)/,keywords:t,contains:["self",r.QUOTE_STRING_MODE,r.APOS_STRING_MODE,r.NUMBER_MODE]},u={className:"params",begin:/\(/,end:/\)/,excludeBegin:!0,excludeEnd:!0,keywords:t,contains:[r.C_LINE_COMMENT_MODE,r.C_BLOCK_COMMENT_MODE,s,d]};return{name:"TypeScript",aliases:["ts"],keywords:t,contains:[r.SHEBANG(),{className:"meta",begin:/^\s*['"]use strict['"]/},r.APOS_STRING_MODE,r.QUOTE_STRING_MODE,c,l,E,r.C_LINE_COMMENT_MODE,r.C_BLOCK_COMMENT_MODE,i,{begin:"("+r.RE_STARTERS_RE+"|\\b(case|return|throw)\\b)\\s*",keywords:"return throw case",contains:[r.C_LINE_COMMENT_MODE,r.C_BLOCK_COMMENT_MODE,r.REGEXP_MODE,{className:"function",begin:"(\\([^(]*(\\([^(]*(\\([^(]*\\))?\\))?\\)|"+r.UNDERSCORE_IDENT_RE+")\\s*=>",returnBegin:!0,end:"\\s*=>",contains:[{className:"params",variants:[{begin:r.UNDERSCORE_IDENT_RE},{className:null,begin:/\(\s*\)/,skip:!0},{begin:/\(/,end:/\)/,excludeBegin:!0,excludeEnd:!0,keywords:t,contains:d.contains}]}]}],relevance:0},{className:"function",beginKeywords:"function",end:/[\{;]/,excludeEnd:!0,keywords:t,contains:["self",r.inherit(r.TITLE_MODE,{begin:"[A-Za-z$_][0-9A-Za-z$_]*"}),u],illegal:/%/,relevance:0},{beginKeywords:"constructor",end:/[\{;]/,excludeEnd:!0,contains:["self",u]},{begin:/module\./,keywords:{built_in:"module"},relevance:0},{beginKeywords:"module",end:/\{/,excludeEnd:!0},{beginKeywords:"interface",end:/\{/,excludeEnd:!0,keywords:"interface extends"},{begin:/\$[(.]/},{begin:"\\."+r.IDENT_RE,relevance:0},s,d]}}}()); +hljs.registerLanguage("yaml",function(){"use strict";return function(e){var n="true false yes no null",a="[\\w#;/?:@&=+$,.~*\\'()[\\]]+",s={className:"string",relevance:0,variants:[{begin:/'/,end:/'/},{begin:/"/,end:/"/},{begin:/\S+/}],contains:[e.BACKSLASH_ESCAPE,{className:"template-variable",variants:[{begin:"{{",end:"}}"},{begin:"%{",end:"}"}]}]},i=e.inherit(s,{variants:[{begin:/'/,end:/'/},{begin:/"/,end:/"/},{begin:/[^\s,{}[\]]+/}]}),l={end:",",endsWithParent:!0,excludeEnd:!0,contains:[],keywords:n,relevance:0},t={begin:"{",end:"}",contains:[l],illegal:"\\n",relevance:0},g={begin:"\\[",end:"\\]",contains:[l],illegal:"\\n",relevance:0},b=[{className:"attr",variants:[{begin:"\\w[\\w :\\/.-]*:(?=[ \t]|$)"},{begin:'"\\w[\\w :\\/.-]*":(?=[ \t]|$)'},{begin:"'\\w[\\w :\\/.-]*':(?=[ \t]|$)"}]},{className:"meta",begin:"^---s*$",relevance:10},{className:"string",begin:"[\\|>]([0-9]?[+-])?[ ]*\\n( *)[\\S ]+\\n(\\2[\\S ]+\\n?)*"},{begin:"<%[%=-]?",end:"[%-]?%>",subLanguage:"ruby",excludeBegin:!0,excludeEnd:!0,relevance:0},{className:"type",begin:"!\\w+!"+a},{className:"type",begin:"!<"+a+">"},{className:"type",begin:"!"+a},{className:"type",begin:"!!"+a},{className:"meta",begin:"&"+e.UNDERSCORE_IDENT_RE+"$"},{className:"meta",begin:"\\*"+e.UNDERSCORE_IDENT_RE+"$"},{className:"bullet",begin:"\\-(?=[ ]|$)",relevance:0},e.HASH_COMMENT_MODE,{beginKeywords:n,keywords:{literal:n}},{className:"number",begin:"\\b[0-9]{4}(-[0-9][0-9]){0,2}([Tt \\t][0-9][0-9]?(:[0-9][0-9]){2})?(\\.[0-9]*)?([ \\t])*(Z|[-+][0-9][0-9]?(:[0-9][0-9])?)?\\b"},{className:"number",begin:e.C_NUMBER_RE+"\\b"},t,g,s],c=[...b];return c.pop(),c.push(i),l.contains=c,{name:"YAML",case_insensitive:!0,aliases:["yml","YAML"],contains:b}}}()); +hljs.registerLanguage("armasm",function(){"use strict";return function(s){const e={variants:[s.COMMENT("^[ \\t]*(?=#)","$",{relevance:0,excludeBegin:!0}),s.COMMENT("[;@]","$",{relevance:0}),s.C_LINE_COMMENT_MODE,s.C_BLOCK_COMMENT_MODE]};return{name:"ARM Assembly",case_insensitive:!0,aliases:["arm"],keywords:{$pattern:"\\.?"+s.IDENT_RE,meta:".2byte .4byte .align .ascii .asciz .balign .byte .code .data .else .end .endif .endm .endr .equ .err .exitm .extern .global .hword .if .ifdef .ifndef .include .irp .long .macro .rept .req .section .set .skip .space .text .word .arm .thumb .code16 .code32 .force_thumb .thumb_func .ltorg ALIAS ALIGN ARM AREA ASSERT ATTR CN CODE CODE16 CODE32 COMMON CP DATA DCB DCD DCDU DCDO DCFD DCFDU DCI DCQ DCQU DCW DCWU DN ELIF ELSE END ENDFUNC ENDIF ENDP ENTRY EQU EXPORT EXPORTAS EXTERN FIELD FILL FUNCTION GBLA GBLL GBLS GET GLOBAL IF IMPORT INCBIN INCLUDE INFO KEEP LCLA LCLL LCLS LTORG MACRO MAP MEND MEXIT NOFP OPT PRESERVE8 PROC QN READONLY RELOC REQUIRE REQUIRE8 RLIST FN ROUT SETA SETL SETS SN SPACE SUBT THUMB THUMBX TTL WHILE WEND ",built_in:"r0 r1 r2 r3 r4 r5 r6 r7 r8 r9 r10 r11 r12 r13 r14 r15 pc lr sp ip sl sb fp a1 a2 a3 a4 v1 v2 v3 v4 v5 v6 v7 v8 f0 f1 f2 f3 f4 f5 f6 f7 p0 p1 p2 p3 p4 p5 p6 p7 p8 p9 p10 p11 p12 p13 p14 p15 c0 c1 c2 c3 c4 c5 c6 c7 c8 c9 c10 c11 c12 c13 c14 c15 q0 q1 q2 q3 q4 q5 q6 q7 q8 q9 q10 q11 q12 q13 q14 q15 cpsr_c cpsr_x cpsr_s cpsr_f cpsr_cx cpsr_cxs cpsr_xs cpsr_xsf cpsr_sf cpsr_cxsf spsr_c spsr_x spsr_s spsr_f spsr_cx spsr_cxs spsr_xs spsr_xsf spsr_sf spsr_cxsf s0 s1 s2 s3 s4 s5 s6 s7 s8 s9 s10 s11 s12 s13 s14 s15 s16 s17 s18 s19 s20 s21 s22 s23 s24 s25 s26 s27 s28 s29 s30 s31 d0 d1 d2 d3 d4 d5 d6 d7 d8 d9 d10 d11 d12 d13 d14 d15 d16 d17 d18 d19 d20 d21 d22 d23 d24 d25 d26 d27 d28 d29 d30 d31 {PC} {VAR} {TRUE} {FALSE} {OPT} {CONFIG} {ENDIAN} {CODESIZE} {CPU} {FPU} {ARCHITECTURE} {PCSTOREOFFSET} {ARMASM_VERSION} {INTER} {ROPI} {RWPI} {SWST} {NOSWST} . @"},contains:[{className:"keyword",begin:"\\b(adc|(qd?|sh?|u[qh]?)?add(8|16)?|usada?8|(q|sh?|u[qh]?)?(as|sa)x|and|adrl?|sbc|rs[bc]|asr|b[lx]?|blx|bxj|cbn?z|tb[bh]|bic|bfc|bfi|[su]bfx|bkpt|cdp2?|clz|clrex|cmp|cmn|cpsi[ed]|cps|setend|dbg|dmb|dsb|eor|isb|it[te]{0,3}|lsl|lsr|ror|rrx|ldm(([id][ab])|f[ds])?|ldr((s|ex)?[bhd])?|movt?|mvn|mra|mar|mul|[us]mull|smul[bwt][bt]|smu[as]d|smmul|smmla|mla|umlaal|smlal?([wbt][bt]|d)|mls|smlsl?[ds]|smc|svc|sev|mia([bt]{2}|ph)?|mrr?c2?|mcrr2?|mrs|msr|orr|orn|pkh(tb|bt)|rbit|rev(16|sh)?|sel|[su]sat(16)?|nop|pop|push|rfe([id][ab])?|stm([id][ab])?|str(ex)?[bhd]?|(qd?)?sub|(sh?|q|u[qh]?)?sub(8|16)|[su]xt(a?h|a?b(16)?)|srs([id][ab])?|swpb?|swi|smi|tst|teq|wfe|wfi|yield)(eq|ne|cs|cc|mi|pl|vs|vc|hi|ls|ge|lt|gt|le|al|hs|lo)?[sptrx]?(?=\\s)"},e,s.QUOTE_STRING_MODE,{className:"string",begin:"'",end:"[^\\\\]'",relevance:0},{className:"title",begin:"\\|",end:"\\|",illegal:"\\n",relevance:0},{className:"number",variants:[{begin:"[#$=]?0x[0-9a-f]+"},{begin:"[#$=]?0b[01]+"},{begin:"[#$=]\\d+"},{begin:"\\b\\d+"}],relevance:0},{className:"symbol",variants:[{begin:"^[ \\t]*[a-z_\\.\\$][a-z0-9_\\.\\$]+:"},{begin:"^[a-z_\\.\\$][a-z0-9_\\.\\$]+"},{begin:"[=#]\\w+"}],relevance:0}]}}}()); +hljs.registerLanguage("d",function(){"use strict";return function(e){var a={$pattern:e.UNDERSCORE_IDENT_RE,keyword:"abstract alias align asm assert auto body break byte case cast catch class const continue debug default delete deprecated do else enum export extern final finally for foreach foreach_reverse|10 goto if immutable import in inout int interface invariant is lazy macro mixin module new nothrow out override package pragma private protected public pure ref return scope shared static struct super switch synchronized template this throw try typedef typeid typeof union unittest version void volatile while with __FILE__ __LINE__ __gshared|10 __thread __traits __DATE__ __EOF__ __TIME__ __TIMESTAMP__ __VENDOR__ __VERSION__",built_in:"bool cdouble cent cfloat char creal dchar delegate double dstring float function idouble ifloat ireal long real short string ubyte ucent uint ulong ushort wchar wstring",literal:"false null true"},d="((0|[1-9][\\d_]*)|0[bB][01_]+|0[xX]([\\da-fA-F][\\da-fA-F_]*|_[\\da-fA-F][\\da-fA-F_]*))",n="\\\\(['\"\\?\\\\abfnrtv]|u[\\dA-Fa-f]{4}|[0-7]{1,3}|x[\\dA-Fa-f]{2}|U[\\dA-Fa-f]{8})|&[a-zA-Z\\d]{2,};",t={className:"number",begin:"\\b"+d+"(L|u|U|Lu|LU|uL|UL)?",relevance:0},_={className:"number",begin:"\\b(((0[xX](([\\da-fA-F][\\da-fA-F_]*|_[\\da-fA-F][\\da-fA-F_]*)\\.([\\da-fA-F][\\da-fA-F_]*|_[\\da-fA-F][\\da-fA-F_]*)|\\.?([\\da-fA-F][\\da-fA-F_]*|_[\\da-fA-F][\\da-fA-F_]*))[pP][+-]?(0|[1-9][\\d_]*|\\d[\\d_]*|[\\d_]+?\\d))|((0|[1-9][\\d_]*|\\d[\\d_]*|[\\d_]+?\\d)(\\.\\d*|([eE][+-]?(0|[1-9][\\d_]*|\\d[\\d_]*|[\\d_]+?\\d)))|\\d+\\.(0|[1-9][\\d_]*|\\d[\\d_]*|[\\d_]+?\\d)(0|[1-9][\\d_]*|\\d[\\d_]*|[\\d_]+?\\d)|\\.(0|[1-9][\\d_]*)([eE][+-]?(0|[1-9][\\d_]*|\\d[\\d_]*|[\\d_]+?\\d))?))([fF]|L|i|[fF]i|Li)?|"+d+"(i|[fF]i|Li))",relevance:0},r={className:"string",begin:"'("+n+"|.)",end:"'",illegal:"."},i={className:"string",begin:'"',contains:[{begin:n,relevance:0}],end:'"[cwd]?'},s=e.COMMENT("\\/\\+","\\+\\/",{contains:["self"],relevance:10});return{name:"D",keywords:a,contains:[e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE,s,{className:"string",begin:'x"[\\da-fA-F\\s\\n\\r]*"[cwd]?',relevance:10},i,{className:"string",begin:'[rq]"',end:'"[cwd]?',relevance:5},{className:"string",begin:"`",end:"`[cwd]?"},{className:"string",begin:'q"\\{',end:'\\}"'},_,t,r,{className:"meta",begin:"^#!",end:"$",relevance:5},{className:"meta",begin:"#(line)",end:"$",relevance:5},{className:"keyword",begin:"@[a-zA-Z_][a-zA-Z_\\d]*"}]}}}()); +hljs.registerLanguage("handlebars",function(){"use strict";function e(...e){return e.map(e=>(function(e){return e?"string"==typeof e?e:e.source:null})(e)).join("")}return function(n){const a={"builtin-name":"action bindattr collection component concat debugger each each-in get hash if in input link-to loc log lookup mut outlet partial query-params render template textarea unbound unless view with yield"},t=/\[.*?\]/,s=/[^\s!"#%&'()*+,.\/;<=>@\[\\\]^`{|}~]+/,i=e("(",/'.*?'/,"|",/".*?"/,"|",t,"|",s,"|",/\.|\//,")+"),r=e("(",t,"|",s,")(?==)"),l={begin:i,lexemes:/[\w.\/]+/},c=n.inherit(l,{keywords:{literal:"true false undefined null"}}),o={begin:/\(/,end:/\)/},m={className:"attr",begin:r,relevance:0,starts:{begin:/=/,end:/=/,starts:{contains:[n.NUMBER_MODE,n.QUOTE_STRING_MODE,n.APOS_STRING_MODE,c,o]}}},d={contains:[n.NUMBER_MODE,n.QUOTE_STRING_MODE,n.APOS_STRING_MODE,{begin:/as\s+\|/,keywords:{keyword:"as"},end:/\|/,contains:[{begin:/\w+/}]},m,c,o],returnEnd:!0},g=n.inherit(l,{className:"name",keywords:a,starts:n.inherit(d,{end:/\)/})});o.contains=[g];const u=n.inherit(l,{keywords:a,className:"name",starts:n.inherit(d,{end:/}}/})}),b=n.inherit(l,{keywords:a,className:"name"}),h=n.inherit(l,{className:"name",keywords:a,starts:n.inherit(d,{end:/}}/})});return{name:"Handlebars",aliases:["hbs","html.hbs","html.handlebars","htmlbars"],case_insensitive:!0,subLanguage:"xml",contains:[{begin:/\\\{\{/,skip:!0},{begin:/\\\\(?=\{\{)/,skip:!0},n.COMMENT(/\{\{!--/,/--\}\}/),n.COMMENT(/\{\{!/,/\}\}/),{className:"template-tag",begin:/\{\{\{\{(?!\/)/,end:/\}\}\}\}/,contains:[u],starts:{end:/\{\{\{\{\//,returnEnd:!0,subLanguage:"xml"}},{className:"template-tag",begin:/\{\{\{\{\//,end:/\}\}\}\}/,contains:[b]},{className:"template-tag",begin:/\{\{#/,end:/\}\}/,contains:[u]},{className:"template-tag",begin:/\{\{(?=else\}\})/,end:/\}\}/,keywords:"else"},{className:"template-tag",begin:/\{\{\//,end:/\}\}/,contains:[b]},{className:"template-variable",begin:/\{\{\{/,end:/\}\}\}/,contains:[h]},{className:"template-variable",begin:/\{\{/,end:/\}\}/,contains:[h]}]}}}()); +hljs.registerLanguage("haskell",function(){"use strict";return function(e){var n={variants:[e.COMMENT("--","$"),e.COMMENT("{-","-}",{contains:["self"]})]},i={className:"meta",begin:"{-#",end:"#-}"},a={className:"meta",begin:"^#",end:"$"},s={className:"type",begin:"\\b[A-Z][\\w']*",relevance:0},l={begin:"\\(",end:"\\)",illegal:'"',contains:[i,a,{className:"type",begin:"\\b[A-Z][\\w]*(\\((\\.\\.|,|\\w+)\\))?"},e.inherit(e.TITLE_MODE,{begin:"[_a-z][\\w']*"}),n]};return{name:"Haskell",aliases:["hs"],keywords:"let in if then else case of where do module import hiding qualified type data newtype deriving class instance as default infix infixl infixr foreign export ccall stdcall cplusplus jvm dotnet safe unsafe family forall mdo proc rec",contains:[{beginKeywords:"module",end:"where",keywords:"module where",contains:[l,n],illegal:"\\W\\.|;"},{begin:"\\bimport\\b",end:"$",keywords:"import qualified as hiding",contains:[l,n],illegal:"\\W\\.|;"},{className:"class",begin:"^(\\s*)?(class|instance)\\b",end:"where",keywords:"class family instance where",contains:[s,l,n]},{className:"class",begin:"\\b(data|(new)?type)\\b",end:"$",keywords:"data family type newtype deriving",contains:[i,s,l,{begin:"{",end:"}",contains:l.contains},n]},{beginKeywords:"default",end:"$",contains:[s,l,n]},{beginKeywords:"infix infixl infixr",end:"$",contains:[e.C_NUMBER_MODE,n]},{begin:"\\bforeign\\b",end:"$",keywords:"foreign import export ccall stdcall cplusplus jvm dotnet safe unsafe",contains:[s,e.QUOTE_STRING_MODE,n]},{className:"meta",begin:"#!\\/usr\\/bin\\/env runhaskell",end:"$"},i,a,e.QUOTE_STRING_MODE,e.C_NUMBER_MODE,s,e.inherit(e.TITLE_MODE,{begin:"^[_a-z][\\w']*"}),n,{begin:"->|<-"}]}}}()); +hljs.registerLanguage("julia",function(){"use strict";return function(e){var r="[A-Za-z_\\u00A1-\\uFFFF][A-Za-z_0-9\\u00A1-\\uFFFF]*",t={$pattern:r,keyword:"in isa where baremodule begin break catch ccall const continue do else elseif end export false finally for function global if import importall let local macro module quote return true try using while type immutable abstract bitstype typealias ",literal:"true false ARGS C_NULL DevNull ENDIAN_BOM ENV I Inf Inf16 Inf32 Inf64 InsertionSort JULIA_HOME LOAD_PATH MergeSort NaN NaN16 NaN32 NaN64 PROGRAM_FILE QuickSort RoundDown RoundFromZero RoundNearest RoundNearestTiesAway RoundNearestTiesUp RoundToZero RoundUp STDERR STDIN STDOUT VERSION catalan e|0 eu|0 eulergamma golden im nothing pi γ π φ ",built_in:"ANY AbstractArray AbstractChannel AbstractFloat AbstractMatrix AbstractRNG AbstractSerializer AbstractSet AbstractSparseArray AbstractSparseMatrix AbstractSparseVector AbstractString AbstractUnitRange AbstractVecOrMat AbstractVector Any ArgumentError Array AssertionError Associative Base64DecodePipe Base64EncodePipe Bidiagonal BigFloat BigInt BitArray BitMatrix BitVector Bool BoundsError BufferStream CachingPool CapturedException CartesianIndex CartesianRange Cchar Cdouble Cfloat Channel Char Cint Cintmax_t Clong Clonglong ClusterManager Cmd CodeInfo Colon Complex Complex128 Complex32 Complex64 CompositeException Condition ConjArray ConjMatrix ConjVector Cptrdiff_t Cshort Csize_t Cssize_t Cstring Cuchar Cuint Cuintmax_t Culong Culonglong Cushort Cwchar_t Cwstring DataType Date DateFormat DateTime DenseArray DenseMatrix DenseVecOrMat DenseVector Diagonal Dict DimensionMismatch Dims DirectIndexString Display DivideError DomainError EOFError EachLine Enum Enumerate ErrorException Exception ExponentialBackOff Expr Factorization FileMonitor Float16 Float32 Float64 Function Future GlobalRef GotoNode HTML Hermitian IO IOBuffer IOContext IOStream IPAddr IPv4 IPv6 IndexCartesian IndexLinear IndexStyle InexactError InitError Int Int128 Int16 Int32 Int64 Int8 IntSet Integer InterruptException InvalidStateException Irrational KeyError LabelNode LinSpace LineNumberNode LoadError LowerTriangular MIME Matrix MersenneTwister Method MethodError MethodTable Module NTuple NewvarNode NullException Nullable Number ObjectIdDict OrdinalRange OutOfMemoryError OverflowError Pair ParseError PartialQuickSort PermutedDimsArray Pipe PollingFileWatcher ProcessExitedException Ptr QuoteNode RandomDevice Range RangeIndex Rational RawFD ReadOnlyMemoryError Real ReentrantLock Ref Regex RegexMatch RemoteChannel RemoteException RevString RoundingMode RowVector SSAValue SegmentationFault SerializationState Set SharedArray SharedMatrix SharedVector Signed SimpleVector Slot SlotNumber SparseMatrixCSC SparseVector StackFrame StackOverflowError StackTrace StepRange StepRangeLen StridedArray StridedMatrix StridedVecOrMat StridedVector String SubArray SubString SymTridiagonal Symbol Symmetric SystemError TCPSocket Task Text TextDisplay Timer Tridiagonal Tuple Type TypeError TypeMapEntry TypeMapLevel TypeName TypeVar TypedSlot UDPSocket UInt UInt128 UInt16 UInt32 UInt64 UInt8 UndefRefError UndefVarError UnicodeError UniformScaling Union UnionAll UnitRange Unsigned UpperTriangular Val Vararg VecElement VecOrMat Vector VersionNumber Void WeakKeyDict WeakRef WorkerConfig WorkerPool "},a={keywords:t,illegal:/<\//},n={className:"subst",begin:/\$\(/,end:/\)/,keywords:t},o={className:"variable",begin:"\\$"+r},i={className:"string",contains:[e.BACKSLASH_ESCAPE,n,o],variants:[{begin:/\w*"""/,end:/"""\w*/,relevance:10},{begin:/\w*"/,end:/"\w*/}]},l={className:"string",contains:[e.BACKSLASH_ESCAPE,n,o],begin:"`",end:"`"},s={className:"meta",begin:"@"+r};return a.name="Julia",a.contains=[{className:"number",begin:/(\b0x[\d_]*(\.[\d_]*)?|0x\.\d[\d_]*)p[-+]?\d+|\b0[box][a-fA-F0-9][a-fA-F0-9_]*|(\b\d[\d_]*(\.[\d_]*)?|\.\d[\d_]*)([eEfF][-+]?\d+)?/,relevance:0},{className:"string",begin:/'(.|\\[xXuU][a-zA-Z0-9]+)'/},i,l,s,{className:"comment",variants:[{begin:"#=",end:"=#",relevance:10},{begin:"#",end:"$"}]},e.HASH_COMMENT_MODE,{className:"keyword",begin:"\\b(((abstract|primitive)\\s+)type|(mutable\\s+)?struct)\\b"},{begin:/<:/}],n.contains=a.contains,a}}()); +hljs.registerLanguage("nim",function(){"use strict";return function(e){return{name:"Nim",aliases:["nim"],keywords:{keyword:"addr and as asm bind block break case cast const continue converter discard distinct div do elif else end enum except export finally for from func generic if import in include interface is isnot iterator let macro method mixin mod nil not notin object of or out proc ptr raise ref return shl shr static template try tuple type using var when while with without xor yield",literal:"shared guarded stdin stdout stderr result true false",built_in:"int int8 int16 int32 int64 uint uint8 uint16 uint32 uint64 float float32 float64 bool char string cstring pointer expr stmt void auto any range array openarray varargs seq set clong culong cchar cschar cshort cint csize clonglong cfloat cdouble clongdouble cuchar cushort cuint culonglong cstringarray semistatic"},contains:[{className:"meta",begin:/{\./,end:/\.}/,relevance:10},{className:"string",begin:/[a-zA-Z]\w*"/,end:/"/,contains:[{begin:/""/}]},{className:"string",begin:/([a-zA-Z]\w*)?"""/,end:/"""/},e.QUOTE_STRING_MODE,{className:"type",begin:/\b[A-Z]\w+\b/,relevance:0},{className:"number",relevance:0,variants:[{begin:/\b(0[xX][0-9a-fA-F][_0-9a-fA-F]*)('?[iIuU](8|16|32|64))?/},{begin:/\b(0o[0-7][_0-7]*)('?[iIuUfF](8|16|32|64))?/},{begin:/\b(0(b|B)[01][_01]*)('?[iIuUfF](8|16|32|64))?/},{begin:/\b(\d[_\d]*)('?[iIuUfF](8|16|32|64))?/}]},e.HASH_COMMENT_MODE]}}}()); +hljs.registerLanguage("nix",function(){"use strict";return function(e){var n={keyword:"rec with let in inherit assert if else then",literal:"true false or and null",built_in:"import abort baseNameOf dirOf isNull builtins map removeAttrs throw toString derivation"},i={className:"subst",begin:/\$\{/,end:/}/,keywords:n},t={className:"string",contains:[i],variants:[{begin:"''",end:"''"},{begin:'"',end:'"'}]},s=[e.NUMBER_MODE,e.HASH_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE,t,{begin:/[a-zA-Z0-9-_]+(\s*=)/,returnBegin:!0,relevance:0,contains:[{className:"attr",begin:/\S+/}]}];return i.contains=s,{name:"Nix",aliases:["nixos"],keywords:n,contains:s}}}()); +hljs.registerLanguage("r",function(){"use strict";return function(e){var n="([a-zA-Z]|\\.[a-zA-Z.])[a-zA-Z0-9._]*";return{name:"R",contains:[e.HASH_COMMENT_MODE,{begin:n,keywords:{$pattern:n,keyword:"function if in break next repeat else for return switch while try tryCatch stop warning require library attach detach source setMethod setGeneric setGroupGeneric setClass ...",literal:"NULL NA TRUE FALSE T F Inf NaN NA_integer_|10 NA_real_|10 NA_character_|10 NA_complex_|10"},relevance:0},{className:"number",begin:"0[xX][0-9a-fA-F]+[Li]?\\b",relevance:0},{className:"number",begin:"\\d+(?:[eE][+\\-]?\\d*)?L\\b",relevance:0},{className:"number",begin:"\\d+\\.(?!\\d)(?:i\\b)?",relevance:0},{className:"number",begin:"\\d+(?:\\.\\d*)?(?:[eE][+\\-]?\\d*)?i?\\b",relevance:0},{className:"number",begin:"\\.\\d+(?:[eE][+\\-]?\\d*)?i?\\b",relevance:0},{begin:"`",end:"`",relevance:0},{className:"string",contains:[e.BACKSLASH_ESCAPE],variants:[{begin:'"',end:'"'},{begin:"'",end:"'"}]}]}}}()); +hljs.registerLanguage("scala",function(){"use strict";return function(e){var n={className:"subst",variants:[{begin:"\\$[A-Za-z0-9_]+"},{begin:"\\${",end:"}"}]},a={className:"string",variants:[{begin:'"',end:'"',illegal:"\\n",contains:[e.BACKSLASH_ESCAPE]},{begin:'"""',end:'"""',relevance:10},{begin:'[a-z]+"',end:'"',illegal:"\\n",contains:[e.BACKSLASH_ESCAPE,n]},{className:"string",begin:'[a-z]+"""',end:'"""',contains:[n],relevance:10}]},s={className:"type",begin:"\\b[A-Z][A-Za-z0-9_]*",relevance:0},t={className:"title",begin:/[^0-9\n\t "'(),.`{}\[\]:;][^\n\t "'(),.`{}\[\]:;]+|[^0-9\n\t "'(),.`{}\[\]:;=]/,relevance:0},i={className:"class",beginKeywords:"class object trait type",end:/[:={\[\n;]/,excludeEnd:!0,contains:[{beginKeywords:"extends with",relevance:10},{begin:/\[/,end:/\]/,excludeBegin:!0,excludeEnd:!0,relevance:0,contains:[s]},{className:"params",begin:/\(/,end:/\)/,excludeBegin:!0,excludeEnd:!0,relevance:0,contains:[s]},t]},l={className:"function",beginKeywords:"def",end:/[:={\[(\n;]/,excludeEnd:!0,contains:[t]};return{name:"Scala",keywords:{literal:"true false null",keyword:"type yield lazy override def with val var sealed abstract private trait object if forSome for while throw finally protected extends import final return else break new catch super class case package default try this match continue throws implicit"},contains:[e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE,a,{className:"symbol",begin:"'\\w[\\w\\d_]*(?!')"},s,l,i,e.C_NUMBER_MODE,{className:"meta",begin:"@[A-Za-z]+"}]}}}()); +hljs.registerLanguage("x86asm",function(){"use strict";return function(s){return{name:"Intel x86 Assembly",case_insensitive:!0,keywords:{$pattern:"[.%]?"+s.IDENT_RE,keyword:"lock rep repe repz repne repnz xaquire xrelease bnd nobnd aaa aad aam aas adc add and arpl bb0_reset bb1_reset bound bsf bsr bswap bt btc btr bts call cbw cdq cdqe clc cld cli clts cmc cmp cmpsb cmpsd cmpsq cmpsw cmpxchg cmpxchg486 cmpxchg8b cmpxchg16b cpuid cpu_read cpu_write cqo cwd cwde daa das dec div dmint emms enter equ f2xm1 fabs fadd faddp fbld fbstp fchs fclex fcmovb fcmovbe fcmove fcmovnb fcmovnbe fcmovne fcmovnu fcmovu fcom fcomi fcomip fcomp fcompp fcos fdecstp fdisi fdiv fdivp fdivr fdivrp femms feni ffree ffreep fiadd ficom ficomp fidiv fidivr fild fimul fincstp finit fist fistp fisttp fisub fisubr fld fld1 fldcw fldenv fldl2e fldl2t fldlg2 fldln2 fldpi fldz fmul fmulp fnclex fndisi fneni fninit fnop fnsave fnstcw fnstenv fnstsw fpatan fprem fprem1 fptan frndint frstor fsave fscale fsetpm fsin fsincos fsqrt fst fstcw fstenv fstp fstsw fsub fsubp fsubr fsubrp ftst fucom fucomi fucomip fucomp fucompp fxam fxch fxtract fyl2x fyl2xp1 hlt ibts icebp idiv imul in inc incbin insb insd insw int int01 int1 int03 int3 into invd invpcid invlpg invlpga iret iretd iretq iretw jcxz jecxz jrcxz jmp jmpe lahf lar lds lea leave les lfence lfs lgdt lgs lidt lldt lmsw loadall loadall286 lodsb lodsd lodsq lodsw loop loope loopne loopnz loopz lsl lss ltr mfence monitor mov movd movq movsb movsd movsq movsw movsx movsxd movzx mul mwait neg nop not or out outsb outsd outsw packssdw packsswb packuswb paddb paddd paddsb paddsiw paddsw paddusb paddusw paddw pand pandn pause paveb pavgusb pcmpeqb pcmpeqd pcmpeqw pcmpgtb pcmpgtd pcmpgtw pdistib pf2id pfacc pfadd pfcmpeq pfcmpge pfcmpgt pfmax pfmin pfmul pfrcp pfrcpit1 pfrcpit2 pfrsqit1 pfrsqrt pfsub pfsubr pi2fd pmachriw pmaddwd pmagw pmulhriw pmulhrwa pmulhrwc pmulhw pmullw pmvgezb pmvlzb pmvnzb pmvzb pop popa popad popaw popf popfd popfq popfw por prefetch prefetchw pslld psllq psllw psrad psraw psrld psrlq psrlw psubb psubd psubsb psubsiw psubsw psubusb psubusw psubw punpckhbw punpckhdq punpckhwd punpcklbw punpckldq punpcklwd push pusha pushad pushaw pushf pushfd pushfq pushfw pxor rcl rcr rdshr rdmsr rdpmc rdtsc rdtscp ret retf retn rol ror rdm rsdc rsldt rsm rsts sahf sal salc sar sbb scasb scasd scasq scasw sfence sgdt shl shld shr shrd sidt sldt skinit smi smint smintold smsw stc std sti stosb stosd stosq stosw str sub svdc svldt svts swapgs syscall sysenter sysexit sysret test ud0 ud1 ud2b ud2 ud2a umov verr verw fwait wbinvd wrshr wrmsr xadd xbts xchg xlatb xlat xor cmove cmovz cmovne cmovnz cmova cmovnbe cmovae cmovnb cmovb cmovnae cmovbe cmovna cmovg cmovnle cmovge cmovnl cmovl cmovnge cmovle cmovng cmovc cmovnc cmovo cmovno cmovs cmovns cmovp cmovpe cmovnp cmovpo je jz jne jnz ja jnbe jae jnb jb jnae jbe jna jg jnle jge jnl jl jnge jle jng jc jnc jo jno js jns jpo jnp jpe jp sete setz setne setnz seta setnbe setae setnb setnc setb setnae setcset setbe setna setg setnle setge setnl setl setnge setle setng sets setns seto setno setpe setp setpo setnp addps addss andnps andps cmpeqps cmpeqss cmpleps cmpless cmpltps cmpltss cmpneqps cmpneqss cmpnleps cmpnless cmpnltps cmpnltss cmpordps cmpordss cmpunordps cmpunordss cmpps cmpss comiss cvtpi2ps cvtps2pi cvtsi2ss cvtss2si cvttps2pi cvttss2si divps divss ldmxcsr maxps maxss minps minss movaps movhps movlhps movlps movhlps movmskps movntps movss movups mulps mulss orps rcpps rcpss rsqrtps rsqrtss shufps sqrtps sqrtss stmxcsr subps subss ucomiss unpckhps unpcklps xorps fxrstor fxrstor64 fxsave fxsave64 xgetbv xsetbv xsave xsave64 xsaveopt xsaveopt64 xrstor xrstor64 prefetchnta prefetcht0 prefetcht1 prefetcht2 maskmovq movntq pavgb pavgw pextrw pinsrw pmaxsw pmaxub pminsw pminub pmovmskb pmulhuw psadbw pshufw pf2iw pfnacc pfpnacc pi2fw pswapd maskmovdqu clflush movntdq movnti movntpd movdqa movdqu movdq2q movq2dq paddq pmuludq pshufd pshufhw pshuflw pslldq psrldq psubq punpckhqdq punpcklqdq addpd addsd andnpd andpd cmpeqpd cmpeqsd cmplepd cmplesd cmpltpd cmpltsd cmpneqpd cmpneqsd cmpnlepd cmpnlesd cmpnltpd cmpnltsd cmpordpd cmpordsd cmpunordpd cmpunordsd cmppd comisd cvtdq2pd cvtdq2ps cvtpd2dq cvtpd2pi cvtpd2ps cvtpi2pd cvtps2dq cvtps2pd cvtsd2si cvtsd2ss cvtsi2sd cvtss2sd cvttpd2pi cvttpd2dq cvttps2dq cvttsd2si divpd divsd maxpd maxsd minpd minsd movapd movhpd movlpd movmskpd movupd mulpd mulsd orpd shufpd sqrtpd sqrtsd subpd subsd ucomisd unpckhpd unpcklpd xorpd addsubpd addsubps haddpd haddps hsubpd hsubps lddqu movddup movshdup movsldup clgi stgi vmcall vmclear vmfunc vmlaunch vmload vmmcall vmptrld vmptrst vmread vmresume vmrun vmsave vmwrite vmxoff vmxon invept invvpid pabsb pabsw pabsd palignr phaddw phaddd phaddsw phsubw phsubd phsubsw pmaddubsw pmulhrsw pshufb psignb psignw psignd extrq insertq movntsd movntss lzcnt blendpd blendps blendvpd blendvps dppd dpps extractps insertps movntdqa mpsadbw packusdw pblendvb pblendw pcmpeqq pextrb pextrd pextrq phminposuw pinsrb pinsrd pinsrq pmaxsb pmaxsd pmaxud pmaxuw pminsb pminsd pminud pminuw pmovsxbw pmovsxbd pmovsxbq pmovsxwd pmovsxwq pmovsxdq pmovzxbw pmovzxbd pmovzxbq pmovzxwd pmovzxwq pmovzxdq pmuldq pmulld ptest roundpd roundps roundsd roundss crc32 pcmpestri pcmpestrm pcmpistri pcmpistrm pcmpgtq popcnt getsec pfrcpv pfrsqrtv movbe aesenc aesenclast aesdec aesdeclast aesimc aeskeygenassist vaesenc vaesenclast vaesdec vaesdeclast vaesimc vaeskeygenassist vaddpd vaddps vaddsd vaddss vaddsubpd vaddsubps vandpd vandps vandnpd vandnps vblendpd vblendps vblendvpd vblendvps vbroadcastss vbroadcastsd vbroadcastf128 vcmpeq_ospd vcmpeqpd vcmplt_ospd vcmpltpd vcmple_ospd vcmplepd vcmpunord_qpd vcmpunordpd vcmpneq_uqpd vcmpneqpd vcmpnlt_uspd vcmpnltpd vcmpnle_uspd vcmpnlepd vcmpord_qpd vcmpordpd vcmpeq_uqpd vcmpnge_uspd vcmpngepd vcmpngt_uspd vcmpngtpd vcmpfalse_oqpd vcmpfalsepd vcmpneq_oqpd vcmpge_ospd vcmpgepd vcmpgt_ospd vcmpgtpd vcmptrue_uqpd vcmptruepd vcmplt_oqpd vcmple_oqpd vcmpunord_spd vcmpneq_uspd vcmpnlt_uqpd vcmpnle_uqpd vcmpord_spd vcmpeq_uspd vcmpnge_uqpd vcmpngt_uqpd vcmpfalse_ospd vcmpneq_ospd vcmpge_oqpd vcmpgt_oqpd vcmptrue_uspd vcmppd vcmpeq_osps vcmpeqps vcmplt_osps vcmpltps vcmple_osps vcmpleps vcmpunord_qps vcmpunordps vcmpneq_uqps vcmpneqps vcmpnlt_usps vcmpnltps vcmpnle_usps vcmpnleps vcmpord_qps vcmpordps vcmpeq_uqps vcmpnge_usps vcmpngeps vcmpngt_usps vcmpngtps vcmpfalse_oqps vcmpfalseps vcmpneq_oqps vcmpge_osps vcmpgeps vcmpgt_osps vcmpgtps vcmptrue_uqps vcmptrueps vcmplt_oqps vcmple_oqps vcmpunord_sps vcmpneq_usps vcmpnlt_uqps vcmpnle_uqps vcmpord_sps vcmpeq_usps vcmpnge_uqps vcmpngt_uqps vcmpfalse_osps vcmpneq_osps vcmpge_oqps vcmpgt_oqps vcmptrue_usps vcmpps vcmpeq_ossd vcmpeqsd vcmplt_ossd vcmpltsd vcmple_ossd vcmplesd vcmpunord_qsd vcmpunordsd vcmpneq_uqsd vcmpneqsd vcmpnlt_ussd vcmpnltsd vcmpnle_ussd vcmpnlesd vcmpord_qsd vcmpordsd vcmpeq_uqsd vcmpnge_ussd vcmpngesd vcmpngt_ussd vcmpngtsd vcmpfalse_oqsd vcmpfalsesd vcmpneq_oqsd vcmpge_ossd vcmpgesd vcmpgt_ossd vcmpgtsd vcmptrue_uqsd vcmptruesd vcmplt_oqsd vcmple_oqsd vcmpunord_ssd vcmpneq_ussd vcmpnlt_uqsd vcmpnle_uqsd vcmpord_ssd vcmpeq_ussd vcmpnge_uqsd vcmpngt_uqsd vcmpfalse_ossd vcmpneq_ossd vcmpge_oqsd vcmpgt_oqsd vcmptrue_ussd vcmpsd vcmpeq_osss vcmpeqss vcmplt_osss vcmpltss vcmple_osss vcmpless vcmpunord_qss vcmpunordss vcmpneq_uqss vcmpneqss vcmpnlt_usss vcmpnltss vcmpnle_usss vcmpnless vcmpord_qss vcmpordss vcmpeq_uqss vcmpnge_usss vcmpngess vcmpngt_usss vcmpngtss vcmpfalse_oqss vcmpfalsess vcmpneq_oqss vcmpge_osss vcmpgess vcmpgt_osss vcmpgtss vcmptrue_uqss vcmptruess vcmplt_oqss vcmple_oqss vcmpunord_sss vcmpneq_usss vcmpnlt_uqss vcmpnle_uqss vcmpord_sss vcmpeq_usss vcmpnge_uqss vcmpngt_uqss vcmpfalse_osss vcmpneq_osss vcmpge_oqss vcmpgt_oqss vcmptrue_usss vcmpss vcomisd vcomiss vcvtdq2pd vcvtdq2ps vcvtpd2dq vcvtpd2ps vcvtps2dq vcvtps2pd vcvtsd2si vcvtsd2ss vcvtsi2sd vcvtsi2ss vcvtss2sd vcvtss2si vcvttpd2dq vcvttps2dq vcvttsd2si vcvttss2si vdivpd vdivps vdivsd vdivss vdppd vdpps vextractf128 vextractps vhaddpd vhaddps vhsubpd vhsubps vinsertf128 vinsertps vlddqu vldqqu vldmxcsr vmaskmovdqu vmaskmovps vmaskmovpd vmaxpd vmaxps vmaxsd vmaxss vminpd vminps vminsd vminss vmovapd vmovaps vmovd vmovq vmovddup vmovdqa vmovqqa vmovdqu vmovqqu vmovhlps vmovhpd vmovhps vmovlhps vmovlpd vmovlps vmovmskpd vmovmskps vmovntdq vmovntqq vmovntdqa vmovntpd vmovntps vmovsd vmovshdup vmovsldup vmovss vmovupd vmovups vmpsadbw vmulpd vmulps vmulsd vmulss vorpd vorps vpabsb vpabsw vpabsd vpacksswb vpackssdw vpackuswb vpackusdw vpaddb vpaddw vpaddd vpaddq vpaddsb vpaddsw vpaddusb vpaddusw vpalignr vpand vpandn vpavgb vpavgw vpblendvb vpblendw vpcmpestri vpcmpestrm vpcmpistri vpcmpistrm vpcmpeqb vpcmpeqw vpcmpeqd vpcmpeqq vpcmpgtb vpcmpgtw vpcmpgtd vpcmpgtq vpermilpd vpermilps vperm2f128 vpextrb vpextrw vpextrd vpextrq vphaddw vphaddd vphaddsw vphminposuw vphsubw vphsubd vphsubsw vpinsrb vpinsrw vpinsrd vpinsrq vpmaddwd vpmaddubsw vpmaxsb vpmaxsw vpmaxsd vpmaxub vpmaxuw vpmaxud vpminsb vpminsw vpminsd vpminub vpminuw vpminud vpmovmskb vpmovsxbw vpmovsxbd vpmovsxbq vpmovsxwd vpmovsxwq vpmovsxdq vpmovzxbw vpmovzxbd vpmovzxbq vpmovzxwd vpmovzxwq vpmovzxdq vpmulhuw vpmulhrsw vpmulhw vpmullw vpmulld vpmuludq vpmuldq vpor vpsadbw vpshufb vpshufd vpshufhw vpshuflw vpsignb vpsignw vpsignd vpslldq vpsrldq vpsllw vpslld vpsllq vpsraw vpsrad vpsrlw vpsrld vpsrlq vptest vpsubb vpsubw vpsubd vpsubq vpsubsb vpsubsw vpsubusb vpsubusw vpunpckhbw vpunpckhwd vpunpckhdq vpunpckhqdq vpunpcklbw vpunpcklwd vpunpckldq vpunpcklqdq vpxor vrcpps vrcpss vrsqrtps vrsqrtss vroundpd vroundps vroundsd vroundss vshufpd vshufps vsqrtpd vsqrtps vsqrtsd vsqrtss vstmxcsr vsubpd vsubps vsubsd vsubss vtestps vtestpd vucomisd vucomiss vunpckhpd vunpckhps vunpcklpd vunpcklps vxorpd vxorps vzeroall vzeroupper pclmullqlqdq pclmulhqlqdq pclmullqhqdq pclmulhqhqdq pclmulqdq vpclmullqlqdq vpclmulhqlqdq vpclmullqhqdq vpclmulhqhqdq vpclmulqdq vfmadd132ps vfmadd132pd vfmadd312ps vfmadd312pd vfmadd213ps vfmadd213pd vfmadd123ps vfmadd123pd vfmadd231ps vfmadd231pd vfmadd321ps vfmadd321pd vfmaddsub132ps vfmaddsub132pd vfmaddsub312ps vfmaddsub312pd vfmaddsub213ps vfmaddsub213pd vfmaddsub123ps vfmaddsub123pd vfmaddsub231ps vfmaddsub231pd vfmaddsub321ps vfmaddsub321pd vfmsub132ps vfmsub132pd vfmsub312ps vfmsub312pd vfmsub213ps vfmsub213pd vfmsub123ps vfmsub123pd vfmsub231ps vfmsub231pd vfmsub321ps vfmsub321pd vfmsubadd132ps vfmsubadd132pd vfmsubadd312ps vfmsubadd312pd vfmsubadd213ps vfmsubadd213pd vfmsubadd123ps vfmsubadd123pd vfmsubadd231ps vfmsubadd231pd vfmsubadd321ps vfmsubadd321pd vfnmadd132ps vfnmadd132pd vfnmadd312ps vfnmadd312pd vfnmadd213ps vfnmadd213pd vfnmadd123ps vfnmadd123pd vfnmadd231ps vfnmadd231pd vfnmadd321ps vfnmadd321pd vfnmsub132ps vfnmsub132pd vfnmsub312ps vfnmsub312pd vfnmsub213ps vfnmsub213pd vfnmsub123ps vfnmsub123pd vfnmsub231ps vfnmsub231pd vfnmsub321ps vfnmsub321pd vfmadd132ss vfmadd132sd vfmadd312ss vfmadd312sd vfmadd213ss vfmadd213sd vfmadd123ss vfmadd123sd vfmadd231ss vfmadd231sd vfmadd321ss vfmadd321sd vfmsub132ss vfmsub132sd vfmsub312ss vfmsub312sd vfmsub213ss vfmsub213sd vfmsub123ss vfmsub123sd vfmsub231ss vfmsub231sd vfmsub321ss vfmsub321sd vfnmadd132ss vfnmadd132sd vfnmadd312ss vfnmadd312sd vfnmadd213ss vfnmadd213sd vfnmadd123ss vfnmadd123sd vfnmadd231ss vfnmadd231sd vfnmadd321ss vfnmadd321sd vfnmsub132ss vfnmsub132sd vfnmsub312ss vfnmsub312sd vfnmsub213ss vfnmsub213sd vfnmsub123ss vfnmsub123sd vfnmsub231ss vfnmsub231sd vfnmsub321ss vfnmsub321sd rdfsbase rdgsbase rdrand wrfsbase wrgsbase vcvtph2ps vcvtps2ph adcx adox rdseed clac stac xstore xcryptecb xcryptcbc xcryptctr xcryptcfb xcryptofb montmul xsha1 xsha256 llwpcb slwpcb lwpval lwpins vfmaddpd vfmaddps vfmaddsd vfmaddss vfmaddsubpd vfmaddsubps vfmsubaddpd vfmsubaddps vfmsubpd vfmsubps vfmsubsd vfmsubss vfnmaddpd vfnmaddps vfnmaddsd vfnmaddss vfnmsubpd vfnmsubps vfnmsubsd vfnmsubss vfrczpd vfrczps vfrczsd vfrczss vpcmov vpcomb vpcomd vpcomq vpcomub vpcomud vpcomuq vpcomuw vpcomw vphaddbd vphaddbq vphaddbw vphadddq vphaddubd vphaddubq vphaddubw vphaddudq vphadduwd vphadduwq vphaddwd vphaddwq vphsubbw vphsubdq vphsubwd vpmacsdd vpmacsdqh vpmacsdql vpmacssdd vpmacssdqh vpmacssdql vpmacsswd vpmacssww vpmacswd vpmacsww vpmadcsswd vpmadcswd vpperm vprotb vprotd vprotq vprotw vpshab vpshad vpshaq vpshaw vpshlb vpshld vpshlq vpshlw vbroadcasti128 vpblendd vpbroadcastb vpbroadcastw vpbroadcastd vpbroadcastq vpermd vpermpd vpermps vpermq vperm2i128 vextracti128 vinserti128 vpmaskmovd vpmaskmovq vpsllvd vpsllvq vpsravd vpsrlvd vpsrlvq vgatherdpd vgatherqpd vgatherdps vgatherqps vpgatherdd vpgatherqd vpgatherdq vpgatherqq xabort xbegin xend xtest andn bextr blci blcic blsi blsic blcfill blsfill blcmsk blsmsk blsr blcs bzhi mulx pdep pext rorx sarx shlx shrx tzcnt tzmsk t1mskc valignd valignq vblendmpd vblendmps vbroadcastf32x4 vbroadcastf64x4 vbroadcasti32x4 vbroadcasti64x4 vcompresspd vcompressps vcvtpd2udq vcvtps2udq vcvtsd2usi vcvtss2usi vcvttpd2udq vcvttps2udq vcvttsd2usi vcvttss2usi vcvtudq2pd vcvtudq2ps vcvtusi2sd vcvtusi2ss vexpandpd vexpandps vextractf32x4 vextractf64x4 vextracti32x4 vextracti64x4 vfixupimmpd vfixupimmps vfixupimmsd vfixupimmss vgetexppd vgetexpps vgetexpsd vgetexpss vgetmantpd vgetmantps vgetmantsd vgetmantss vinsertf32x4 vinsertf64x4 vinserti32x4 vinserti64x4 vmovdqa32 vmovdqa64 vmovdqu32 vmovdqu64 vpabsq vpandd vpandnd vpandnq vpandq vpblendmd vpblendmq vpcmpltd vpcmpled vpcmpneqd vpcmpnltd vpcmpnled vpcmpd vpcmpltq vpcmpleq vpcmpneqq vpcmpnltq vpcmpnleq vpcmpq vpcmpequd vpcmpltud vpcmpleud vpcmpnequd vpcmpnltud vpcmpnleud vpcmpud vpcmpequq vpcmpltuq vpcmpleuq vpcmpnequq vpcmpnltuq vpcmpnleuq vpcmpuq vpcompressd vpcompressq vpermi2d vpermi2pd vpermi2ps vpermi2q vpermt2d vpermt2pd vpermt2ps vpermt2q vpexpandd vpexpandq vpmaxsq vpmaxuq vpminsq vpminuq vpmovdb vpmovdw vpmovqb vpmovqd vpmovqw vpmovsdb vpmovsdw vpmovsqb vpmovsqd vpmovsqw vpmovusdb vpmovusdw vpmovusqb vpmovusqd vpmovusqw vpord vporq vprold vprolq vprolvd vprolvq vprord vprorq vprorvd vprorvq vpscatterdd vpscatterdq vpscatterqd vpscatterqq vpsraq vpsravq vpternlogd vpternlogq vptestmd vptestmq vptestnmd vptestnmq vpxord vpxorq vrcp14pd vrcp14ps vrcp14sd vrcp14ss vrndscalepd vrndscaleps vrndscalesd vrndscaless vrsqrt14pd vrsqrt14ps vrsqrt14sd vrsqrt14ss vscalefpd vscalefps vscalefsd vscalefss vscatterdpd vscatterdps vscatterqpd vscatterqps vshuff32x4 vshuff64x2 vshufi32x4 vshufi64x2 kandnw kandw kmovw knotw kortestw korw kshiftlw kshiftrw kunpckbw kxnorw kxorw vpbroadcastmb2q vpbroadcastmw2d vpconflictd vpconflictq vplzcntd vplzcntq vexp2pd vexp2ps vrcp28pd vrcp28ps vrcp28sd vrcp28ss vrsqrt28pd vrsqrt28ps vrsqrt28sd vrsqrt28ss vgatherpf0dpd vgatherpf0dps vgatherpf0qpd vgatherpf0qps vgatherpf1dpd vgatherpf1dps vgatherpf1qpd vgatherpf1qps vscatterpf0dpd vscatterpf0dps vscatterpf0qpd vscatterpf0qps vscatterpf1dpd vscatterpf1dps vscatterpf1qpd vscatterpf1qps prefetchwt1 bndmk bndcl bndcu bndcn bndmov bndldx bndstx sha1rnds4 sha1nexte sha1msg1 sha1msg2 sha256rnds2 sha256msg1 sha256msg2 hint_nop0 hint_nop1 hint_nop2 hint_nop3 hint_nop4 hint_nop5 hint_nop6 hint_nop7 hint_nop8 hint_nop9 hint_nop10 hint_nop11 hint_nop12 hint_nop13 hint_nop14 hint_nop15 hint_nop16 hint_nop17 hint_nop18 hint_nop19 hint_nop20 hint_nop21 hint_nop22 hint_nop23 hint_nop24 hint_nop25 hint_nop26 hint_nop27 hint_nop28 hint_nop29 hint_nop30 hint_nop31 hint_nop32 hint_nop33 hint_nop34 hint_nop35 hint_nop36 hint_nop37 hint_nop38 hint_nop39 hint_nop40 hint_nop41 hint_nop42 hint_nop43 hint_nop44 hint_nop45 hint_nop46 hint_nop47 hint_nop48 hint_nop49 hint_nop50 hint_nop51 hint_nop52 hint_nop53 hint_nop54 hint_nop55 hint_nop56 hint_nop57 hint_nop58 hint_nop59 hint_nop60 hint_nop61 hint_nop62 hint_nop63",built_in:"ip eip rip al ah bl bh cl ch dl dh sil dil bpl spl r8b r9b r10b r11b r12b r13b r14b r15b ax bx cx dx si di bp sp r8w r9w r10w r11w r12w r13w r14w r15w eax ebx ecx edx esi edi ebp esp eip r8d r9d r10d r11d r12d r13d r14d r15d rax rbx rcx rdx rsi rdi rbp rsp r8 r9 r10 r11 r12 r13 r14 r15 cs ds es fs gs ss st st0 st1 st2 st3 st4 st5 st6 st7 mm0 mm1 mm2 mm3 mm4 mm5 mm6 mm7 xmm0 xmm1 xmm2 xmm3 xmm4 xmm5 xmm6 xmm7 xmm8 xmm9 xmm10 xmm11 xmm12 xmm13 xmm14 xmm15 xmm16 xmm17 xmm18 xmm19 xmm20 xmm21 xmm22 xmm23 xmm24 xmm25 xmm26 xmm27 xmm28 xmm29 xmm30 xmm31 ymm0 ymm1 ymm2 ymm3 ymm4 ymm5 ymm6 ymm7 ymm8 ymm9 ymm10 ymm11 ymm12 ymm13 ymm14 ymm15 ymm16 ymm17 ymm18 ymm19 ymm20 ymm21 ymm22 ymm23 ymm24 ymm25 ymm26 ymm27 ymm28 ymm29 ymm30 ymm31 zmm0 zmm1 zmm2 zmm3 zmm4 zmm5 zmm6 zmm7 zmm8 zmm9 zmm10 zmm11 zmm12 zmm13 zmm14 zmm15 zmm16 zmm17 zmm18 zmm19 zmm20 zmm21 zmm22 zmm23 zmm24 zmm25 zmm26 zmm27 zmm28 zmm29 zmm30 zmm31 k0 k1 k2 k3 k4 k5 k6 k7 bnd0 bnd1 bnd2 bnd3 cr0 cr1 cr2 cr3 cr4 cr8 dr0 dr1 dr2 dr3 dr8 tr3 tr4 tr5 tr6 tr7 r0 r1 r2 r3 r4 r5 r6 r7 r0b r1b r2b r3b r4b r5b r6b r7b r0w r1w r2w r3w r4w r5w r6w r7w r0d r1d r2d r3d r4d r5d r6d r7d r0h r1h r2h r3h r0l r1l r2l r3l r4l r5l r6l r7l r8l r9l r10l r11l r12l r13l r14l r15l db dw dd dq dt ddq do dy dz resb resw resd resq rest resdq reso resy resz incbin equ times byte word dword qword nosplit rel abs seg wrt strict near far a32 ptr",meta:"%define %xdefine %+ %undef %defstr %deftok %assign %strcat %strlen %substr %rotate %elif %else %endif %if %ifmacro %ifctx %ifidn %ifidni %ifid %ifnum %ifstr %iftoken %ifempty %ifenv %error %warning %fatal %rep %endrep %include %push %pop %repl %pathsearch %depend %use %arg %stacksize %local %line %comment %endcomment .nolist __FILE__ __LINE__ __SECT__ __BITS__ __OUTPUT_FORMAT__ __DATE__ __TIME__ __DATE_NUM__ __TIME_NUM__ __UTC_DATE__ __UTC_TIME__ __UTC_DATE_NUM__ __UTC_TIME_NUM__ __PASS__ struc endstruc istruc at iend align alignb sectalign daz nodaz up down zero default option assume public bits use16 use32 use64 default section segment absolute extern global common cpu float __utf16__ __utf16le__ __utf16be__ __utf32__ __utf32le__ __utf32be__ __float8__ __float16__ __float32__ __float64__ __float80m__ __float80e__ __float128l__ __float128h__ __Infinity__ __QNaN__ __SNaN__ Inf NaN QNaN SNaN float8 float16 float32 float64 float80m float80e float128l float128h __FLOAT_DAZ__ __FLOAT_ROUND__ __FLOAT__"},contains:[s.COMMENT(";","$",{relevance:0}),{className:"number",variants:[{begin:"\\b(?:([0-9][0-9_]*)?\\.[0-9_]*(?:[eE][+-]?[0-9_]+)?|(0[Xx])?[0-9][0-9_]*\\.?[0-9_]*(?:[pP](?:[+-]?[0-9_]+)?)?)\\b",relevance:0},{begin:"\\$[0-9][0-9A-Fa-f]*",relevance:0},{begin:"\\b(?:[0-9A-Fa-f][0-9A-Fa-f_]*[Hh]|[0-9][0-9_]*[DdTt]?|[0-7][0-7_]*[QqOo]|[0-1][0-1_]*[BbYy])\\b"},{begin:"\\b(?:0[Xx][0-9A-Fa-f_]+|0[DdTt][0-9_]+|0[QqOo][0-7_]+|0[BbYy][0-1_]+)\\b"}]},s.QUOTE_STRING_MODE,{className:"string",variants:[{begin:"'",end:"[^\\\\]'"},{begin:"`",end:"[^\\\\]`"}],relevance:0},{className:"symbol",variants:[{begin:"^\\s*[A-Za-z._?][A-Za-z0-9_$#@~.?]*(:|\\s+label)"},{begin:"^\\s*%%[A-Za-z0-9_$#@~.?]*:"}],relevance:0},{className:"subst",begin:"%[0-9]+",relevance:0},{className:"subst",begin:"%!S+",relevance:0},{className:"meta",begin:/^\s*\.[\w_-]+/}]}}}()); \ No newline at end of file diff --git a/docs/config-api-book/index.html b/docs/config-api-book/index.html new file mode 100644 index 0000000..2c52423 --- /dev/null +++ b/docs/config-api-book/index.html @@ -0,0 +1,272 @@ + + + + + + Overview - Embers Config API + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+
+

Keyboard shortcuts

+
+

Press or to navigate between chapters

+

Press S or / to search in the book

+

Press ? to show this help

+

Press Esc to hide this help

+
+
+
+
+ + + + + + + + + + + + + +
+ +
+
+ + + + + + + +
+
+

Embers Config API

+

This reference is generated from the Rust-backed Rhai exports used by Embers.

+

There are two execution phases:

+
    +
  • registration time: the top-level config file where you declare modes, bindings, named actions, and visual settings
  • +
  • runtime: named actions, event handlers, and tab bar formatters that run against live client state
  • +
+

Definition files live in defs/.

+

Pages

+ +

Definitions

+ +

Example

+ + +
+ + +
+
+ + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + diff --git a/docs/config-api-book/mark-09e88c2c.min.js b/docs/config-api-book/mark-09e88c2c.min.js new file mode 100644 index 0000000..1636231 --- /dev/null +++ b/docs/config-api-book/mark-09e88c2c.min.js @@ -0,0 +1,7 @@ +/*!*************************************************** +* mark.js v8.11.1 +* https://markjs.io/ +* Copyright (c) 2014–2018, Julian Kühnel +* Released under the MIT license https://git.io/vwTVl +*****************************************************/ +!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?module.exports=t():"function"==typeof define&&define.amd?define(t):e.Mark=t()}(this,function(){"use strict";var e="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},t=function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")},n=function(){function e(e,t){for(var n=0;n1&&void 0!==arguments[1])||arguments[1],i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:[],o=arguments.length>3&&void 0!==arguments[3]?arguments[3]:5e3;t(this,e),this.ctx=n,this.iframes=r,this.exclude=i,this.iframesTimeout=o}return n(e,[{key:"getContexts",value:function(){var e=[];return(void 0!==this.ctx&&this.ctx?NodeList.prototype.isPrototypeOf(this.ctx)?Array.prototype.slice.call(this.ctx):Array.isArray(this.ctx)?this.ctx:"string"==typeof this.ctx?Array.prototype.slice.call(document.querySelectorAll(this.ctx)):[this.ctx]:[]).forEach(function(t){var n=e.filter(function(e){return e.contains(t)}).length>0;-1!==e.indexOf(t)||n||e.push(t)}),e}},{key:"getIframeContents",value:function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:function(){},r=void 0;try{var i=e.contentWindow;if(r=i.document,!i||!r)throw new Error("iframe inaccessible")}catch(e){n()}r&&t(r)}},{key:"isIframeBlank",value:function(e){var t="about:blank",n=e.getAttribute("src").trim();return e.contentWindow.location.href===t&&n!==t&&n}},{key:"observeIframeLoad",value:function(e,t,n){var r=this,i=!1,o=null,a=function a(){if(!i){i=!0,clearTimeout(o);try{r.isIframeBlank(e)||(e.removeEventListener("load",a),r.getIframeContents(e,t,n))}catch(e){n()}}};e.addEventListener("load",a),o=setTimeout(a,this.iframesTimeout)}},{key:"onIframeReady",value:function(e,t,n){try{"complete"===e.contentWindow.document.readyState?this.isIframeBlank(e)?this.observeIframeLoad(e,t,n):this.getIframeContents(e,t,n):this.observeIframeLoad(e,t,n)}catch(e){n()}}},{key:"waitForIframes",value:function(e,t){var n=this,r=0;this.forEachIframe(e,function(){return!0},function(e){r++,n.waitForIframes(e.querySelector("html"),function(){--r||t()})},function(e){e||t()})}},{key:"forEachIframe",value:function(t,n,r){var i=this,o=arguments.length>3&&void 0!==arguments[3]?arguments[3]:function(){},a=t.querySelectorAll("iframe"),s=a.length,c=0;a=Array.prototype.slice.call(a);var u=function(){--s<=0&&o(c)};s||u(),a.forEach(function(t){e.matches(t,i.exclude)?u():i.onIframeReady(t,function(e){n(t)&&(c++,r(e)),u()},u)})}},{key:"createIterator",value:function(e,t,n){return document.createNodeIterator(e,t,n,!1)}},{key:"createInstanceOnIframe",value:function(t){return new e(t.querySelector("html"),this.iframes)}},{key:"compareNodeIframe",value:function(e,t,n){if(e.compareDocumentPosition(n)&Node.DOCUMENT_POSITION_PRECEDING){if(null===t)return!0;if(t.compareDocumentPosition(n)&Node.DOCUMENT_POSITION_FOLLOWING)return!0}return!1}},{key:"getIteratorNode",value:function(e){var t=e.previousNode();return{prevNode:t,node:null===t?e.nextNode():e.nextNode()&&e.nextNode()}}},{key:"checkIframeFilter",value:function(e,t,n,r){var i=!1,o=!1;return r.forEach(function(e,t){e.val===n&&(i=t,o=e.handled)}),this.compareNodeIframe(e,t,n)?(!1!==i||o?!1===i||o||(r[i].handled=!0):r.push({val:n,handled:!0}),!0):(!1===i&&r.push({val:n,handled:!1}),!1)}},{key:"handleOpenIframes",value:function(e,t,n,r){var i=this;e.forEach(function(e){e.handled||i.getIframeContents(e.val,function(e){i.createInstanceOnIframe(e).forEachNode(t,n,r)})})}},{key:"iterateThroughNodes",value:function(e,t,n,r,i){for(var o,a=this,s=this.createIterator(t,e,r),c=[],u=[],l=void 0,h=void 0;void 0,o=a.getIteratorNode(s),h=o.prevNode,l=o.node;)this.iframes&&this.forEachIframe(t,function(e){return a.checkIframeFilter(l,h,e,c)},function(t){a.createInstanceOnIframe(t).forEachNode(e,function(e){return u.push(e)},r)}),u.push(l);u.forEach(function(e){n(e)}),this.iframes&&this.handleOpenIframes(c,e,n,r),i()}},{key:"forEachNode",value:function(e,t,n){var r=this,i=arguments.length>3&&void 0!==arguments[3]?arguments[3]:function(){},o=this.getContexts(),a=o.length;a||i(),o.forEach(function(o){var s=function(){r.iterateThroughNodes(e,o,t,n,function(){--a<=0&&i()})};r.iframes?r.waitForIframes(o,s):s()})}}],[{key:"matches",value:function(e,t){var n="string"==typeof t?[t]:t,r=e.matches||e.matchesSelector||e.msMatchesSelector||e.mozMatchesSelector||e.oMatchesSelector||e.webkitMatchesSelector;if(r){var i=!1;return n.every(function(t){return!r.call(e,t)||(i=!0,!1)}),i}return!1}}]),e}(),o=function(){function e(n){t(this,e),this.opt=r({},{diacritics:!0,synonyms:{},accuracy:"partially",caseSensitive:!1,ignoreJoiners:!1,ignorePunctuation:[],wildcards:"disabled"},n)}return n(e,[{key:"create",value:function(e){return"disabled"!==this.opt.wildcards&&(e=this.setupWildcardsRegExp(e)),e=this.escapeStr(e),Object.keys(this.opt.synonyms).length&&(e=this.createSynonymsRegExp(e)),(this.opt.ignoreJoiners||this.opt.ignorePunctuation.length)&&(e=this.setupIgnoreJoinersRegExp(e)),this.opt.diacritics&&(e=this.createDiacriticsRegExp(e)),e=this.createMergedBlanksRegExp(e),(this.opt.ignoreJoiners||this.opt.ignorePunctuation.length)&&(e=this.createJoinersRegExp(e)),"disabled"!==this.opt.wildcards&&(e=this.createWildcardsRegExp(e)),e=this.createAccuracyRegExp(e),new RegExp(e,"gm"+(this.opt.caseSensitive?"":"i"))}},{key:"escapeStr",value:function(e){return e.replace(/[\-\[\]\/\{\}\(\)\*\+\?\.\\\^\$\|]/g,"\\$&")}},{key:"createSynonymsRegExp",value:function(e){var t=this.opt.synonyms,n=this.opt.caseSensitive?"":"i",r=this.opt.ignoreJoiners||this.opt.ignorePunctuation.length?"\0":"";for(var i in t)if(t.hasOwnProperty(i)){var o=t[i],a="disabled"!==this.opt.wildcards?this.setupWildcardsRegExp(i):this.escapeStr(i),s="disabled"!==this.opt.wildcards?this.setupWildcardsRegExp(o):this.escapeStr(o);""!==a&&""!==s&&(e=e.replace(new RegExp("("+this.escapeStr(a)+"|"+this.escapeStr(s)+")","gm"+n),r+"("+this.processSynonyms(a)+"|"+this.processSynonyms(s)+")"+r))}return e}},{key:"processSynonyms",value:function(e){return(this.opt.ignoreJoiners||this.opt.ignorePunctuation.length)&&(e=this.setupIgnoreJoinersRegExp(e)),e}},{key:"setupWildcardsRegExp",value:function(e){return(e=e.replace(/(?:\\)*\?/g,function(e){return"\\"===e.charAt(0)?"?":""})).replace(/(?:\\)*\*/g,function(e){return"\\"===e.charAt(0)?"*":""})}},{key:"createWildcardsRegExp",value:function(e){var t="withSpaces"===this.opt.wildcards;return e.replace(/\u0001/g,t?"[\\S\\s]?":"\\S?").replace(/\u0002/g,t?"[\\S\\s]*?":"\\S*")}},{key:"setupIgnoreJoinersRegExp",value:function(e){return e.replace(/[^(|)\\]/g,function(e,t,n){var r=n.charAt(t+1);return/[(|)\\]/.test(r)||""===r?e:e+"\0"})}},{key:"createJoinersRegExp",value:function(e){var t=[],n=this.opt.ignorePunctuation;return Array.isArray(n)&&n.length&&t.push(this.escapeStr(n.join(""))),this.opt.ignoreJoiners&&t.push("\\u00ad\\u200b\\u200c\\u200d"),t.length?e.split(/\u0000+/).join("["+t.join("")+"]*"):e}},{key:"createDiacriticsRegExp",value:function(e){var t=this.opt.caseSensitive?"":"i",n=this.opt.caseSensitive?["aàáảãạăằắẳẵặâầấẩẫậäåāą","AÀÁẢÃẠĂẰẮẲẴẶÂẦẤẨẪẬÄÅĀĄ","cçćč","CÇĆČ","dđď","DĐĎ","eèéẻẽẹêềếểễệëěēę","EÈÉẺẼẸÊỀẾỂỄỆËĚĒĘ","iìíỉĩịîïī","IÌÍỈĨỊÎÏĪ","lł","LŁ","nñňń","NÑŇŃ","oòóỏõọôồốổỗộơởỡớờợöøō","OÒÓỎÕỌÔỒỐỔỖỘƠỞỠỚỜỢÖØŌ","rř","RŘ","sšśșş","SŠŚȘŞ","tťțţ","TŤȚŢ","uùúủũụưừứửữựûüůū","UÙÚỦŨỤƯỪỨỬỮỰÛÜŮŪ","yýỳỷỹỵÿ","YÝỲỶỸỴŸ","zžżź","ZŽŻŹ"]:["aàáảãạăằắẳẵặâầấẩẫậäåāąAÀÁẢÃẠĂẰẮẲẴẶÂẦẤẨẪẬÄÅĀĄ","cçćčCÇĆČ","dđďDĐĎ","eèéẻẽẹêềếểễệëěēęEÈÉẺẼẸÊỀẾỂỄỆËĚĒĘ","iìíỉĩịîïīIÌÍỈĨỊÎÏĪ","lłLŁ","nñňńNÑŇŃ","oòóỏõọôồốổỗộơởỡớờợöøōOÒÓỎÕỌÔỒỐỔỖỘƠỞỠỚỜỢÖØŌ","rřRŘ","sšśșşSŠŚȘŞ","tťțţTŤȚŢ","uùúủũụưừứửữựûüůūUÙÚỦŨỤƯỪỨỬỮỰÛÜŮŪ","yýỳỷỹỵÿYÝỲỶỸỴŸ","zžżźZŽŻŹ"],r=[];return e.split("").forEach(function(i){n.every(function(n){if(-1!==n.indexOf(i)){if(r.indexOf(n)>-1)return!1;e=e.replace(new RegExp("["+n+"]","gm"+t),"["+n+"]"),r.push(n)}return!0})}),e}},{key:"createMergedBlanksRegExp",value:function(e){return e.replace(/[\s]+/gim,"[\\s]+")}},{key:"createAccuracyRegExp",value:function(e){var t=this,n=this.opt.accuracy,r="string"==typeof n?n:n.value,i="";switch(("string"==typeof n?[]:n.limiters).forEach(function(e){i+="|"+t.escapeStr(e)}),r){case"partially":default:return"()("+e+")";case"complementary":return"()([^"+(i="\\s"+(i||this.escapeStr("!\"#$%&'()*+,-./:;<=>?@[\\]^_`{|}~¡¿")))+"]*"+e+"[^"+i+"]*)";case"exactly":return"(^|\\s"+i+")("+e+")(?=$|\\s"+i+")"}}}]),e}(),a=function(){function a(e){t(this,a),this.ctx=e,this.ie=!1;var n=window.navigator.userAgent;(n.indexOf("MSIE")>-1||n.indexOf("Trident")>-1)&&(this.ie=!0)}return n(a,[{key:"log",value:function(t){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"debug",r=this.opt.log;this.opt.debug&&"object"===(void 0===r?"undefined":e(r))&&"function"==typeof r[n]&&r[n]("mark.js: "+t)}},{key:"getSeparatedKeywords",value:function(e){var t=this,n=[];return e.forEach(function(e){t.opt.separateWordSearch?e.split(" ").forEach(function(e){e.trim()&&-1===n.indexOf(e)&&n.push(e)}):e.trim()&&-1===n.indexOf(e)&&n.push(e)}),{keywords:n.sort(function(e,t){return t.length-e.length}),length:n.length}}},{key:"isNumeric",value:function(e){return Number(parseFloat(e))==e}},{key:"checkRanges",value:function(e){var t=this;if(!Array.isArray(e)||"[object Object]"!==Object.prototype.toString.call(e[0]))return this.log("markRanges() will only accept an array of objects"),this.opt.noMatch(e),[];var n=[],r=0;return e.sort(function(e,t){return e.start-t.start}).forEach(function(e){var i=t.callNoMatchOnInvalidRanges(e,r),o=i.start,a=i.end;i.valid&&(e.start=o,e.length=a-o,n.push(e),r=a)}),n}},{key:"callNoMatchOnInvalidRanges",value:function(e,t){var n=void 0,r=void 0,i=!1;return e&&void 0!==e.start?(r=(n=parseInt(e.start,10))+parseInt(e.length,10),this.isNumeric(e.start)&&this.isNumeric(e.length)&&r-t>0&&r-n>0?i=!0:(this.log("Ignoring invalid or overlapping range: "+JSON.stringify(e)),this.opt.noMatch(e))):(this.log("Ignoring invalid range: "+JSON.stringify(e)),this.opt.noMatch(e)),{start:n,end:r,valid:i}}},{key:"checkWhitespaceRanges",value:function(e,t,n){var r=void 0,i=!0,o=n.length,a=t-o,s=parseInt(e.start,10)-a;return(r=(s=s>o?o:s)+parseInt(e.length,10))>o&&(r=o,this.log("End range automatically set to the max value of "+o)),s<0||r-s<0||s>o||r>o?(i=!1,this.log("Invalid range: "+JSON.stringify(e)),this.opt.noMatch(e)):""===n.substring(s,r).replace(/\s+/g,"")&&(i=!1,this.log("Skipping whitespace only range: "+JSON.stringify(e)),this.opt.noMatch(e)),{start:s,end:r,valid:i}}},{key:"getTextNodes",value:function(e){var t=this,n="",r=[];this.iterator.forEachNode(NodeFilter.SHOW_TEXT,function(e){r.push({start:n.length,end:(n+=e.textContent).length,node:e})},function(e){return t.matchesExclude(e.parentNode)?NodeFilter.FILTER_REJECT:NodeFilter.FILTER_ACCEPT},function(){e({value:n,nodes:r})})}},{key:"matchesExclude",value:function(e){return i.matches(e,this.opt.exclude.concat(["script","style","title","head","html"]))}},{key:"wrapRangeInTextNode",value:function(e,t,n){var r=this.opt.element?this.opt.element:"mark",i=e.splitText(t),o=i.splitText(n-t),a=document.createElement(r);return a.setAttribute("data-markjs","true"),this.opt.className&&a.setAttribute("class",this.opt.className),a.textContent=i.textContent,i.parentNode.replaceChild(a,i),o}},{key:"wrapRangeInMappedTextNode",value:function(e,t,n,r,i){var o=this;e.nodes.every(function(a,s){var c=e.nodes[s+1];if(void 0===c||c.start>t){if(!r(a.node))return!1;var u=t-a.start,l=(n>a.end?a.end:n)-a.start,h=e.value.substr(0,a.start),f=e.value.substr(l+a.start);if(a.node=o.wrapRangeInTextNode(a.node,u,l),e.value=h+f,e.nodes.forEach(function(t,n){n>=s&&(e.nodes[n].start>0&&n!==s&&(e.nodes[n].start-=l),e.nodes[n].end-=l)}),n-=l,i(a.node.previousSibling,a.start),!(n>a.end))return!1;t=a.end}return!0})}},{key:"wrapGroups",value:function(e,t,n,r){return r((e=this.wrapRangeInTextNode(e,t,t+n)).previousSibling),e}},{key:"separateGroups",value:function(e,t,n,r,i){for(var o=t.length,a=1;a-1&&r(t[a],e)&&(e=this.wrapGroups(e,s,t[a].length,i))}return e}},{key:"wrapMatches",value:function(e,t,n,r,i){var o=this,a=0===t?0:t+1;this.getTextNodes(function(t){t.nodes.forEach(function(t){t=t.node;for(var i=void 0;null!==(i=e.exec(t.textContent))&&""!==i[a];){if(o.opt.separateGroups)t=o.separateGroups(t,i,a,n,r);else{if(!n(i[a],t))continue;var s=i.index;if(0!==a)for(var c=1;c + + + + + Mouse - Embers Config API + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+
+

Keyboard shortcuts

+
+

Press or to navigate between chapters

+

Press S or / to search in the book

+

Press ? to show this help

+

Press Esc to hide this help

+
+
+
+
+ + + + + + + + + + + + + +
+ +
+
+ + + + + + + +
+
+

Mouse

+

Namespace: global

+
+ +

fn set_click_focus

+ +
fn set_click_focus(mouse: MouseApi, value: bool)
+
+
+ +
+ +
+Toggle focus-on-click behavior. +
+ +
+ +
+ + +
+ +

fn set_click_forward

+ +
fn set_click_forward(mouse: MouseApi, value: bool)
+
+
+ +
+ +
+Toggle forwarding mouse clicks into the focused buffer. +
+ +
+ +
+ + +
+ +

fn set_wheel_forward

+ +
fn set_wheel_forward(mouse: MouseApi, value: bool)
+
+
+ +
+ +
+Toggle wheel event forwarding into the focused buffer. +
+ +
+ +
+ + +
+ +

fn set_wheel_scroll

+ +
fn set_wheel_scroll(mouse: MouseApi, value: bool)
+
+
+ +
+ +
+Toggle client-side wheel scrolling. +
+ +
+ +
+ + + +
+ + +
+
+ + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + diff --git a/docs/config-api-book/mux.html b/docs/config-api-book/mux.html new file mode 100644 index 0000000..055e151 --- /dev/null +++ b/docs/config-api-book/mux.html @@ -0,0 +1,455 @@ + + + + + + Mux - Embers Config API + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+
+

Keyboard shortcuts

+
+

Press or to navigate between chapters

+

Press S or / to search in the book

+

Press ? to show this help

+

Press Esc to hide this help

+
+
+
+
+ + + + + + + + + + + + + +
+ +
+
+ + + + + + + +
+
+

Mux

+

Namespace: global

+
+ +

fn current_buffer

+ +
fn current_buffer(mux: MuxApi) -> ?
+
+
+ +
+ +
+Return the currently focused buffer, if any. +

ReturnType: BufferRef | ()

+
+ +
+ +
+ + +
+ +

fn current_floating

+ +
fn current_floating(mux: MuxApi) -> ?
+
+
+ +
+ +
+Return the currently focused floating window, if any. +

ReturnType: FloatingRef | ()

+
+ +
+ +
+ + +
+ +

fn current_node

+ +
fn current_node(mux: MuxApi) -> ?
+
+
+ +
+ +
+Return the currently focused node, if any. +

ReturnType: NodeRef | ()

+
+ +
+ +
+ + +
+ +

fn current_session

+ +
fn current_session(mux: MuxApi) -> ?
+
+
+ +
+ +
+Return the current session reference, if any. +

ReturnType: SessionRef | ()

+
+ +
+ +
+ + +
+ +

fn detached_buffers

+ +
fn detached_buffers(mux: MuxApi) -> Array
+
+
+ +
+ +
+Return detached buffers in the current model snapshot. +
+ +
+ +
+ + +
+ +

fn find_buffer

+ +
fn find_buffer(mux: MuxApi, buffer_id: int) -> ?
+
+
+ +
+ +
+Find a buffer by numeric id. Returns `()` when it does not exist. +

ReturnType: BufferRef | ()

+
+ +
+ +
+ + +
+ +

fn find_floating

+ +
fn find_floating(mux: MuxApi, floating_id: int) -> ?
+
+
+ +
+ +
+Find a floating window by numeric id. Returns `()` when it does not exist. +

ReturnType: FloatingRef | ()

+
+ +
+ +
+ + +
+ +

fn find_node

+ +
fn find_node(mux: MuxApi, node_id: int) -> ?
+
+
+ +
+ +
+Find a node by numeric id. Returns `()` when it does not exist. +

ReturnType: NodeRef | ()

+
+ +
+ +
+ + +
+ +

fn sessions

+ +
fn sessions(mux: MuxApi) -> Array
+
+
+ +
+ +
+Return every visible session. +
+ +
+ +
+ + +
+ +

fn visible_buffers

+ +
fn visible_buffers(mux: MuxApi) -> Array
+
+
+ +
+ +
+Return visible buffers in the current model snapshot. +
+ +
+ +
+ + + +
+ + +
+
+ + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + diff --git a/docs/config-api-book/node-ref.html b/docs/config-api-book/node-ref.html new file mode 100644 index 0000000..26bb108 --- /dev/null +++ b/docs/config-api-book/node-ref.html @@ -0,0 +1,559 @@ + + + + + + NodeRef - Embers Config API + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+
+

Keyboard shortcuts

+
+

Press or to navigate between chapters

+

Press S or / to search in the book

+

Press ? to show this help

+

Press Esc to hide this help

+
+
+
+
+ + + + + + + + + + + + + +
+ +
+
+ + + + + + + +
+
+

NodeRef

+

Namespace: global

+
+ +

fn active_tab_index

+ +
fn active_tab_index(node: NodeRef) -> ?
+
+
+ +
+ +
+Return the active tab index, if any. +

ReturnType: int | ()

+
+ +
+ +
+ + +
+ +

fn buffer

+ +
fn buffer(node: NodeRef) -> ?
+
+
+ +
+ +
+Return the attached buffer id, if any. +

ReturnType: int | ()

+
+ +
+ +
+ + +
+ +

fn children

+ +
fn children(node: NodeRef) -> Array
+
+
+ +
+ +
+Return child node ids. +
+ +
+ +
+ + +
+ +

fn geometry

+ +
fn geometry(node: NodeRef) -> ?
+
+
+ +
+ +
+Return the geometry map, if any. +

ReturnType: Map | ()

+
+ +
+ +
+ + +
+ +

fn id

+ +
fn id(node: NodeRef) -> int
+
+
+ +
+ +
+Return the node id. +
+ +
+ +
+ + +
+ +

fn is_floating_root

+ +
fn is_floating_root(node: NodeRef) -> bool
+
+
+ +
+ +
+Return whether the node is the root of a floating window. +
+ +
+ +
+ + +
+ +

fn is_focused

+ +
fn is_focused(node: NodeRef) -> bool
+
+
+ +
+ +
+Return whether the node is focused. +
+ +
+ +
+ + +
+ +

fn is_root

+ +
fn is_root(node: NodeRef) -> bool
+
+
+ +
+ +
+Return whether the node is the session root. +
+ +
+ +
+ + +
+ +

fn is_visible

+ +
fn is_visible(node: NodeRef) -> bool
+
+
+ +
+ +
+Return whether the node is visible in the current presentation. +
+ +
+ +
+ + +
+ +

fn kind

+ +
fn kind(node: NodeRef) -> String
+
+
+ +
+ +
+Return the node kind such as `buffer_view`, `split`, or `tabs`. +
+ +
+ +
+ + +
+ +

fn parent

+ +
fn parent(node: NodeRef) -> ?
+
+
+ +
+ +
+Return the parent node id, if any. +

ReturnType: int | ()

+
+ +
+ +
+ + +
+ +

fn session_id

+ +
fn session_id(node: NodeRef) -> int
+
+
+ +
+ +
+Return the owning session id. +
+ +
+ +
+ + +
+ +

fn split_direction

+ +
fn split_direction(node: NodeRef) -> ?
+
+
+ +
+ +
+Return the split direction, if any. +

ReturnType: string | ()

+
+ +
+ +
+ + +
+ +

fn split_weights

+ +
fn split_weights(node: NodeRef) -> ?
+
+
+ +
+ +
+Return split weights, if any. +

ReturnType: Array | ()

+
+ +
+ +
+ + +
+ +

fn tab_titles

+ +
fn tab_titles(node: NodeRef) -> Array
+
+
+ +
+ +
+Return tab titles on a tabs node. +
+ +
+ +
+ + + +
+ + +
+
+ + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + diff --git a/docs/config-api-book/print.html b/docs/config-api-book/print.html new file mode 100644 index 0000000..f802ace --- /dev/null +++ b/docs/config-api-book/print.html @@ -0,0 +1,5918 @@ + + + + + + Embers Config API + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+
+

Keyboard shortcuts

+
+

Press or to navigate between chapters

+

Press S or / to search in the book

+

Press ? to show this help

+

Press Esc to hide this help

+
+
+
+
+ + + + + + + + + + + + + +
+ +
+
+ + + + + + + +
+
+

Embers Config API

+

This reference is generated from the Rust-backed Rhai exports used by Embers.

+

There are two execution phases:

+
    +
  • registration time: the top-level config file where you declare modes, bindings, named actions, and visual settings
  • +
  • runtime: named actions, event handlers, and tab bar formatters that run against live client state
  • +
+

Definition files live in defs/.

+

Pages

+ +

Definitions

+ +

Example

+ +
+

Example

+

This is a trimmed example based on the repository fixture config. It shows the two main phases together.

+
set_leader("<C-a>");
+
+fn shell_tree(ctx) {
+    tree.buffer_spawn(
+        ["/bin/zsh"],
+        #{
+            title: "shell",
+            cwd: if ctx.current_buffer() == () { () } else { ctx.current_buffer().cwd() }
+        }
+    )
+}
+
+fn split_below(ctx) {
+    action.split_with("horizontal", shell_tree(ctx))
+}
+
+fn format_tabs(ctx) {
+    let active = ctx.tabs()[ctx.active_index()];
+    ui.bar([
+        ui.segment(" " + active.title() + " ", #{
+            fg: theme.color("active_fg"),
+            bg: theme.color("active_bg")
+        })
+    ], [], [])
+}
+
+define_action("split-below", split_below);
+bind("normal", "<leader>\"", "split-below");
+theme.set_palette(#{
+    active_fg: "#303446",
+    active_bg: "#c6d0f5"
+});
+tabbar.set_formatter(format_tabs);
+mouse.set_click_focus(true);
+
+
+

Registration Globals

+

Namespace: global

+
+ +

fn bind

+ +
fn bind(mode: String, notation: String, action: Action)
+fn bind(mode: String, notation: String, action_name: String)
+fn bind(mode: String, notation: String, actions: Array)
+
+
+ + +
+ +
+Bind a key notation to an [`Action`], a string action name, or an array of actions. +

Use the Action overload for inline builders such as action.focus_left(), the string +overload for a named action registered with define_action, or an array to chain multiple +actions in sequence.

+
+ + + +
+ +
+ + +
+ +

fn define_action

+ +
fn define_action(name: String, callback: FnPtr)
+
+
+ +
+ +
+Register a function pointer as a named action callable from bindings. +
+ +
+ +
+ + +
+ +

fn define_mode

+ +
fn define_mode(mode_name: String)
+fn define_mode(mode_name: String, options: Map)
+
+
+ +
+ +
+Define a custom input mode with hooks and fallback options. +

Supported options are fallback, on_enter, and on_leave.

+
+ +
+ +
+ + +
+ +

fn on

+ +
fn on(event_name: String, callback: FnPtr)
+
+
+ +
+ +
+Attach a callback to an emitted event such as `buffer_bell`. +
+ +
+ +
+ + +
+ +

fn set_leader

+ +
fn set_leader(notation: String)
+
+
+ + +
+ +
+Set the leader sequence used in binding notations. +
+ + + +
+ +
+ + +
+ +

fn unbind

+ +
fn unbind(mode: String, notation: String)
+
+
+ +
+ +
+Remove a previously bound key sequence. +
+ +
+ +
+ + +
+

Action (Registration)

+

Namespace: global

+
+ +

fn cancel_search

+ +
fn cancel_search(_: ActionApi) -> Action
+
+
+ +
+ +
+Cancel the active search. +
+ +
+ +
+ + +
+ +

fn cancel_selection

+ +
fn cancel_selection(_: ActionApi) -> Action
+
+
+ +
+ +
+Cancel the current selection. +
+ +
+ +
+ + +
+ +

fn chain

+ +
fn chain(_: ActionApi, actions: Array) -> Action
+
+
+ +
+ +
+Chain multiple actions into one composite action. +
+ +
+ +
+ + +
+ +

fn clear_pending_keys

+ +
fn clear_pending_keys(_: ActionApi) -> Action
+
+
+ +
+ +
+Clear any partially-entered key sequence. +
+ +
+ +
+ + +
+ +

fn close_floating

+ +
fn close_floating(_: ActionApi) -> Action
+
+
+ +
+ +
+Close the currently focused floating window. +
+ +
+ +
+ + +
+ +

fn close_floating_id

+ +
fn close_floating_id(_: ActionApi, floating_id: int) -> Action
+
+
+ +
+ +
+Close a floating window by id. +
+ +
+ +
+ + +
+ +

fn close_node

+ +
fn close_node(_: ActionApi, node_id: int) -> Action
+
+
+ +
+ +
+Close a view by node id. +
+ +
+ +
+ + +
+ +

fn close_view

+ +
fn close_view(_: ActionApi) -> Action
+
+
+ +
+ +
+Close the currently focused view. +
+ +
+ +
+ + +
+ +

fn copy_selection

+ +
fn copy_selection(_: ActionApi) -> Action
+
+
+ +
+ +
+Copy the current selection into the clipboard. +
+ +
+ +
+ + +
+ +

fn detach_buffer

+ +
fn detach_buffer(_: ActionApi) -> Action
+
+
+ +
+ +
+Detach the currently focused buffer. +
+ +
+ +
+ + +
+ +

fn detach_buffer_id

+ +
fn detach_buffer_id(_: ActionApi, buffer_id: int) -> Action
+
+
+ +
+ +
+Detach a buffer by id. +
+ +
+ +
+ + +
+ +

fn enter_mode

+ +
fn enter_mode(_: ActionApi, mode: String) -> Action
+
+
+ +
+ +
+Enter a specific input mode by name. +
+ +
+ +
+ + +
+ +

fn enter_search_mode

+ +
fn enter_search_mode(_: ActionApi) -> Action
+
+
+ +
+ +
+Enter incremental search mode. +
+ +
+ +
+ + +
+ +

fn enter_select_block

+ +
fn enter_select_block(_: ActionApi) -> Action
+
+
+ +
+ +
+Enter block selection mode. +
+ +
+ +
+ + +
+ +

fn enter_select_char

+ +
fn enter_select_char(_: ActionApi) -> Action
+
+
+ +
+ +
+Enter character selection mode. +
+ +
+ +
+ + +
+ +

fn enter_select_line

+ +
fn enter_select_line(_: ActionApi) -> Action
+
+
+ +
+ +
+Enter line selection mode. +
+ +
+ +
+ + +
+ +

fn focus_buffer

+ +
fn focus_buffer(_: ActionApi, buffer_id: int) -> Action
+
+
+ +
+ +
+Focus a specific buffer by id. +
+ +
+ +
+ + +
+ +

fn focus_down

+ +
fn focus_down(_: ActionApi) -> Action
+
+
+ +
+ +
+Focus the view below the current node. +
+ +
+ +
+ + +
+ +

fn focus_left

+ +
fn focus_left(_: ActionApi) -> Action
+
+
+ + +
+ +
+Focus the view to the left of the current node. +
+ + + +
+ +
+ + +
+ +

fn focus_right

+ +
fn focus_right(_: ActionApi) -> Action
+
+
+ +
+ +
+Focus the view to the right of the current node. +
+ +
+ +
+ + +
+ +

fn focus_up

+ +
fn focus_up(_: ActionApi) -> Action
+
+
+ +
+ +
+Focus the view above the current node. +
+ +
+ +
+ + +
+ +

fn follow_output

+ +
fn follow_output(_: ActionApi) -> Action
+
+
+ +
+ +
+Re-enable following live output. +
+ +
+ +
+ + +
+ +

fn insert_tab_after

+ +
fn insert_tab_after(_: ActionApi, tabs_node_id: int, title: String, tree: TreeSpec) -> Action
+
+
+ +
+ +
+Insert a tab after a specific tabs node. +
+ +
+ +
+ + +
+ +

fn insert_tab_after_current

+ +
fn insert_tab_after_current(_: ActionApi, title: String, tree: TreeSpec) -> Action
+
+
+ +
+ +
+Insert a tab after the current tab in the focused tabs node. +
+ +
+ +
+ + +
+ +

fn insert_tab_before

+ +
fn insert_tab_before(_: ActionApi, tabs_node_id: int, title: String, tree: TreeSpec) -> Action
+
+
+ +
+ +
+Insert a tab before a specific tabs node. +
+ +
+ +
+ + +
+ +

fn insert_tab_before_current

+ +
fn insert_tab_before_current(_: ActionApi, title: String, tree: TreeSpec) -> Action
+
+
+ +
+ +
+Insert a tab before the current tab. +
+ +
+ +
+ + +
+ +

fn kill_buffer

+ +
fn kill_buffer(_: ActionApi) -> Action
+
+
+ +
+ +
+Kill the currently focused buffer. +
+ +
+ +
+ + +
+ +

fn kill_buffer_id

+ +
fn kill_buffer_id(_: ActionApi, buffer_id: int) -> Action
+
+
+ +
+ +
+Kill a buffer by id. +
+ +
+ +
+ + +
+ +

fn leave_mode

+ +
fn leave_mode(_: ActionApi) -> Action
+
+
+ +
+ +
+Leave the active input mode. +
+ +
+ +
+ + +
+ +

fn move_buffer_to_floating

+ +
fn move_buffer_to_floating(_: ActionApi, buffer_id: int, options: Map) -> Action
+
+
+ + +
+ +
+Move a buffer into a new floating window. +
+ + + +
+ +
+ + +
+ +

fn move_buffer_to_node

+ +
fn move_buffer_to_node(_: ActionApi, buffer_id: int, node_id: int) -> Action
+
+
+ +
+ +
+Move a buffer into a specific node. +
+ +
+ +
+ + +
+ +

fn next_current_tabs

+ +
fn next_current_tabs(_: ActionApi) -> Action
+
+
+ +
+ +
+Select the next tab in the currently focused tabs node. +
+ +
+ +
+ + +
+ +

fn next_tab

+ +
fn next_tab(_: ActionApi, tabs_node_id: int) -> Action
+
+
+ +
+ +
+Select the next tab in a specific tabs node. +
+ +
+ +
+ + +
+ +

fn noop

+ +
fn noop(_: ActionApi) -> Action
+
+
+ +
+ +
+Build a no-op action. +
+ +
+ +
+ + +
+ +

fn notify

+ +
fn notify(_: ActionApi, level: String, message: String) -> Action
+
+
+ +
+ +
+Emit a client notification. +
+ +
+ +
+ + +
+ +

fn open_floating

+ +
fn open_floating(_: ActionApi, tree: TreeSpec, options: Map) -> Action
+
+
+ +
+ +
+Open a floating view around the provided tree. +
+ +
+ +
+ + +
+ +

fn prev_current_tabs

+ +
fn prev_current_tabs(_: ActionApi) -> Action
+
+
+ +
+ +
+Select the previous tab in the currently focused tabs node. +
+ +
+ +
+ + +
+ +

fn prev_tab

+ +
fn prev_tab(_: ActionApi, tabs_node_id: int) -> Action
+
+
+ +
+ +
+Select the previous tab in a specific tabs node. +
+ +
+ +
+ + +
+ +

fn replace_current_with

+ +
fn replace_current_with(_: ActionApi, tree: TreeSpec) -> Action
+
+
+ +
+ +
+Replace the focused node with a new tree. +
+ +
+ +
+ + +
+ +

fn replace_node

+ +
fn replace_node(_: ActionApi, node_id: int, tree: TreeSpec) -> Action
+
+
+ +
+ +
+Replace a specific node by id with a new tree. +
+ +
+ +
+ + +
+ +

fn reveal_buffer

+ +
fn reveal_buffer(_: ActionApi, buffer_id: int) -> Action
+
+
+ +
+ +
+Reveal a specific buffer by id. +
+ +
+ +
+ + +
+ +

fn run_named_action

+ +
fn run_named_action(_: ActionApi, name: String) -> Action
+
+
+ +
+ +
+Run another named action by name. +
+ +
+ +
+ + +
+ +

fn scroll_line_down

+ +
fn scroll_line_down(_: ActionApi) -> Action
+
+
+ +
+ +
+Scroll one line downward in local scrollback. +
+ +
+ +
+ + +
+ +

fn scroll_line_up

+ +
fn scroll_line_up(_: ActionApi) -> Action
+
+
+ +
+ +
+Scroll one line upward in local scrollback. +
+ +
+ +
+ + +
+ +

fn scroll_page_down

+ +
fn scroll_page_down(_: ActionApi) -> Action
+
+
+ +
+ +
+Scroll one page downward in local scrollback. +
+ +
+ +
+ + +
+ +

fn scroll_page_up

+ +
fn scroll_page_up(_: ActionApi) -> Action
+
+
+ +
+ +
+Scroll one page upward in local scrollback. +
+ +
+ +
+ + +
+ +

fn scroll_to_bottom

+ +
fn scroll_to_bottom(_: ActionApi) -> Action
+
+
+ +
+ +
+Scroll to the bottom of local scrollback. +
+ +
+ +
+ + +
+ +

fn scroll_to_top

+ +
fn scroll_to_top(_: ActionApi) -> Action
+
+
+ +
+ +
+Scroll to the top of local scrollback. +
+ +
+ +
+ + +
+ +

fn search_next

+ +
fn search_next(_: ActionApi) -> Action
+
+
+ +
+ +
+Jump to the next search match. +
+ +
+ +
+ + +
+ +

fn search_prev

+ +
fn search_prev(_: ActionApi) -> Action
+
+
+ +
+ +
+Jump to the previous search match. +
+ +
+ +
+ + +
+ +

fn select_current_tabs

+ +
fn select_current_tabs(_: ActionApi, index: int) -> Action
+
+
+ +
+ +
+Select a tab by index in the currently focused tabs node. +
+ +
+ +
+ + +
+ +

fn select_move_down

+ +
fn select_move_down(_: ActionApi) -> Action
+
+
+ +
+ +
+Move the active selection down. +
+ +
+ +
+ + +
+ +

fn select_move_left

+ +
fn select_move_left(_: ActionApi) -> Action
+
+
+ +
+ +
+Move the active selection left. +
+ +
+ +
+ + +
+ +

fn select_move_right

+ +
fn select_move_right(_: ActionApi) -> Action
+
+
+ +
+ +
+Move the active selection right. +
+ +
+ +
+ + +
+ +

fn select_move_up

+ +
fn select_move_up(_: ActionApi) -> Action
+
+
+ +
+ +
+Move the active selection up. +
+ +
+ +
+ + +
+ +

fn select_tab

+ +
fn select_tab(_: ActionApi, tabs_node_id: int, index: int) -> Action
+
+
+ +
+ +
+Select a tab by index in a specific tabs node. +
+ +
+ +
+ + +
+ +

fn send_bytes

+ +
fn send_bytes(_: ActionApi, buffer_id: int, bytes: String) -> Action
+fn send_bytes(_: ActionApi, buffer_id: int, bytes: Array) -> Action
+
+
+ +
+ +
+Send a string of bytes to a specific buffer. +
+ +
+ +
+ + +
+ +

fn send_bytes_current

+ +
fn send_bytes_current(_: ActionApi, bytes: String) -> Action
+fn send_bytes_current(_: ActionApi, bytes: Array) -> Action
+
+
+ +
+ +
+Send a string of bytes to the focused buffer. +
+ +
+ +
+ + +
+ +

fn send_keys

+ +
fn send_keys(_: ActionApi, buffer_id: int, notation: String) -> Action
+
+
+ +
+ +
+Send a key notation sequence to a specific buffer. +
+ +
+ +
+ + +
+ +

fn send_keys_current

+ +
fn send_keys_current(_: ActionApi, notation: String) -> Action
+
+
+ +
+ +
+Send a key notation sequence to the focused buffer. +
+ +
+ +
+ + +
+ +

fn split_with

+ +
fn split_with(_: ActionApi, direction: String, tree: TreeSpec) -> Action
+
+
+ +
+ +
+Split the current node and attach the provided tree as the new sibling. +
+ +
+ +
+ + +
+ +

fn toggle_mode

+ +
fn toggle_mode(_: ActionApi, mode: String) -> Action
+
+
+ +
+ +
+Toggle a named input mode. +
+ +
+ +
+ + +
+ +

fn yank_selection

+ +
fn yank_selection(_: ActionApi) -> Action
+
+
+ +
+ +
+Copy the current selection into the clipboard. +
+ +
+ +
+ + +
+

Tree (Registration)

+

Namespace: global

+
+ +

fn buffer_attach

+ +
fn buffer_attach(_: TreeApi, buffer_id: int) -> TreeSpec
+
+
+ +
+ +
+Attach an existing buffer by id. +
+ +
+ +
+ + +
+ +

fn buffer_current

+ +
fn buffer_current(_: TreeApi) -> TreeSpec
+
+
+ +
+ +
+Build a tree reference to the currently focused buffer. +
+ +
+ +
+ + +
+ +

fn buffer_empty

+ +
fn buffer_empty(_: TreeApi) -> TreeSpec
+
+
+ +
+ +
+Build an empty buffer tree node. +
+ +
+ +
+ + +
+ +

fn buffer_spawn

+ +
fn buffer_spawn(_: TreeApi, command: Array) -> TreeSpec
+fn buffer_spawn(_: TreeApi, command: Array, options: Map) -> TreeSpec
+
+
+ + +
+ +
+Spawn a new buffer from a command array. +

Supported options keys are title (string), cwd (string), and env +(map<string, string>). Unknown keys are rejected.

+
+ + + +
+ +
+ + +
+ +

fn current_buffer

+ +
fn current_buffer(_: TreeApi) -> TreeSpec
+
+
+ +
+ +
+Build a tree reference to the currently focused buffer. +
+ +
+ +
+ + +
+ +

fn current_node

+ +
fn current_node(_: TreeApi) -> TreeSpec
+
+
+ +
+ +
+Build a tree reference to the currently focused node. +
+ +
+ +
+ + +
+ +

fn split

+ +
fn split(_: TreeApi, direction: String, children: Array) -> TreeSpec
+fn split(_: TreeApi, direction: String, children: Array, sizes: Array) -> TreeSpec
+
+
+ +
+ +
+Build a split with an explicit direction string. +
+ +
+ +
+ + +
+ +

fn split_h

+ +
fn split_h(_: TreeApi, children: Array) -> TreeSpec
+
+
+ +
+ +
+Build a horizontal split. +
+ +
+ +
+ + +
+ +

fn split_v

+ +
fn split_v(_: TreeApi, children: Array) -> TreeSpec
+
+
+ +
+ +
+Build a vertical split. +
+ +
+ +
+ + +
+ +

fn tab

+ +
fn tab(_: TreeApi, title: String, tree: TreeSpec) -> TabSpec
+
+
+ +
+ +
+Build a single tab specification. +
+ +
+ +
+ + +
+ +

fn tabs

+ +
fn tabs(_: TreeApi, tabs: Array) -> TreeSpec
+
+
+ +
+ +
+Build a tabs container with the first tab active. +
+ +
+ +
+ + +
+ +

fn tabs_with_active

+ +
fn tabs_with_active(_: TreeApi, tabs: Array, active: int) -> TreeSpec
+
+
+ +
+ +
+Build a tabs container with an explicit active tab. +
+ +
+ +
+ + +
+

System (Registration)

+

Namespace: global

+
+ +

fn env

+ +
fn env(_: SystemApi, name: String) -> ?
+
+
+ +
+ +
+Read an environment variable, if it is set. +

ReturnType: string | ()

+
+ +
+ +
+ + +
+ +

fn now

+ +
fn now(_: SystemApi) -> int
+
+
+ +
+ +
+Return the current Unix timestamp in seconds. +
+ +
+ +
+ + +
+ +

fn which

+ +
fn which(_: SystemApi, name: String) -> ?
+
+
+ +
+ +
+Resolve an executable from `PATH`, if it is found. +

ReturnType: string | ()

+
+ +
+ +
+ + +
+

UI (Registration)

+

Namespace: global

+
+ +

fn bar

+ +
fn bar(_: UiApi, left: Array, center: Array, right: Array) -> BarSpec
+
+
+ +
+ +
+Build a full bar specification from left, center, and right segments. +
+ +
+ +
+ + +
+ +

fn segment

+ +
fn segment(_: UiApi, text: String) -> BarSegment
+fn segment(_: UiApi, text: String, options: Map) -> BarSegment
+
+
+ +
+ +
+Create a [`BarSegment`] from a [`UiApi`] receiver and text using default styling. +

segment(_: UiApi, text: String) -> BarSegment produces plain text with default +[StyleSpec] values and no click target.

+
+ +
+ +
+ + +
+

Mouse

+

Namespace: global

+
+ +

fn set_click_focus

+ +
fn set_click_focus(mouse: MouseApi, value: bool)
+
+
+ +
+ +
+Toggle focus-on-click behavior. +
+ +
+ +
+ + +
+ +

fn set_click_forward

+ +
fn set_click_forward(mouse: MouseApi, value: bool)
+
+
+ +
+ +
+Toggle forwarding mouse clicks into the focused buffer. +
+ +
+ +
+ + +
+ +

fn set_wheel_forward

+ +
fn set_wheel_forward(mouse: MouseApi, value: bool)
+
+
+ +
+ +
+Toggle wheel event forwarding into the focused buffer. +
+ +
+ +
+ + +
+ +

fn set_wheel_scroll

+ +
fn set_wheel_scroll(mouse: MouseApi, value: bool)
+
+
+ +
+ +
+Toggle client-side wheel scrolling. +
+ +
+ +
+ + +
+

Theme

+

Namespace: global

+
+ +

fn set_palette

+ +
fn set_palette(theme: ThemeApi, palette: Map)
+
+
+ +
+ +
+Add named colors to the theme palette. +
+ +
+ +
+ + +
+

Tabbar

+

Namespace: global

+
+ +

fn set_formatter

+ +
fn set_formatter(tabbar: TabbarApi, callback: FnPtr)
+
+
+ +
+ +
+Register the function used to format the tab bar. +
+ +
+ +
+ + +
+

Action

+

Namespace: global

+
+ +

fn cancel_search

+ +
fn cancel_search(_: ActionApi) -> Action
+
+
+ +
+ +
+Cancel the active search. +
+ +
+ +
+ + +
+ +

fn cancel_selection

+ +
fn cancel_selection(_: ActionApi) -> Action
+
+
+ +
+ +
+Cancel the current selection. +
+ +
+ +
+ + +
+ +

fn chain

+ +
fn chain(_: ActionApi, actions: Array) -> Action
+
+
+ +
+ +
+Chain multiple actions into one composite action. +
+ +
+ +
+ + +
+ +

fn clear_pending_keys

+ +
fn clear_pending_keys(_: ActionApi) -> Action
+
+
+ +
+ +
+Clear any partially-entered key sequence. +
+ +
+ +
+ + +
+ +

fn close_floating

+ +
fn close_floating(_: ActionApi) -> Action
+
+
+ +
+ +
+Close the currently focused floating window. +
+ +
+ +
+ + +
+ +

fn close_floating_id

+ +
fn close_floating_id(_: ActionApi, floating_id: int) -> Action
+
+
+ +
+ +
+Close a floating window by id. +
+ +
+ +
+ + +
+ +

fn close_node

+ +
fn close_node(_: ActionApi, node_id: int) -> Action
+
+
+ +
+ +
+Close a view by node id. +
+ +
+ +
+ + +
+ +

fn close_view

+ +
fn close_view(_: ActionApi) -> Action
+
+
+ +
+ +
+Close the currently focused view. +
+ +
+ +
+ + +
+ +

fn copy_selection

+ +
fn copy_selection(_: ActionApi) -> Action
+
+
+ +
+ +
+Copy the current selection into the clipboard. +
+ +
+ +
+ + +
+ +

fn detach_buffer

+ +
fn detach_buffer(_: ActionApi) -> Action
+
+
+ +
+ +
+Detach the currently focused buffer. +
+ +
+ +
+ + +
+ +

fn detach_buffer_id

+ +
fn detach_buffer_id(_: ActionApi, buffer_id: int) -> Action
+
+
+ +
+ +
+Detach a buffer by id. +
+ +
+ +
+ + +
+ +

fn enter_mode

+ +
fn enter_mode(_: ActionApi, mode: String) -> Action
+
+
+ +
+ +
+Enter a specific input mode by name. +
+ +
+ +
+ + +
+ +

fn enter_search_mode

+ +
fn enter_search_mode(_: ActionApi) -> Action
+
+
+ +
+ +
+Enter incremental search mode. +
+ +
+ +
+ + +
+ +

fn enter_select_block

+ +
fn enter_select_block(_: ActionApi) -> Action
+
+
+ +
+ +
+Enter block selection mode. +
+ +
+ +
+ + +
+ +

fn enter_select_char

+ +
fn enter_select_char(_: ActionApi) -> Action
+
+
+ +
+ +
+Enter character selection mode. +
+ +
+ +
+ + +
+ +

fn enter_select_line

+ +
fn enter_select_line(_: ActionApi) -> Action
+
+
+ +
+ +
+Enter line selection mode. +
+ +
+ +
+ + +
+ +

fn focus_buffer

+ +
fn focus_buffer(_: ActionApi, buffer_id: int) -> Action
+
+
+ +
+ +
+Focus a specific buffer by id. +
+ +
+ +
+ + +
+ +

fn focus_down

+ +
fn focus_down(_: ActionApi) -> Action
+
+
+ +
+ +
+Focus the view below the current node. +
+ +
+ +
+ + +
+ +

fn focus_left

+ +
fn focus_left(_: ActionApi) -> Action
+
+
+ + +
+ +
+Focus the view to the left of the current node. +
+ + + +
+ +
+ + +
+ +

fn focus_right

+ +
fn focus_right(_: ActionApi) -> Action
+
+
+ +
+ +
+Focus the view to the right of the current node. +
+ +
+ +
+ + +
+ +

fn focus_up

+ +
fn focus_up(_: ActionApi) -> Action
+
+
+ +
+ +
+Focus the view above the current node. +
+ +
+ +
+ + +
+ +

fn follow_output

+ +
fn follow_output(_: ActionApi) -> Action
+
+
+ +
+ +
+Re-enable following live output. +
+ +
+ +
+ + +
+ +

fn insert_tab_after

+ +
fn insert_tab_after(_: ActionApi, tabs_node_id: int, title: String, tree: TreeSpec) -> Action
+
+
+ +
+ +
+Insert a tab after a specific tabs node. +
+ +
+ +
+ + +
+ +

fn insert_tab_after_current

+ +
fn insert_tab_after_current(_: ActionApi, title: String, tree: TreeSpec) -> Action
+
+
+ +
+ +
+Insert a tab after the current tab in the focused tabs node. +
+ +
+ +
+ + +
+ +

fn insert_tab_before

+ +
fn insert_tab_before(_: ActionApi, tabs_node_id: int, title: String, tree: TreeSpec) -> Action
+
+
+ +
+ +
+Insert a tab before a specific tabs node. +
+ +
+ +
+ + +
+ +

fn insert_tab_before_current

+ +
fn insert_tab_before_current(_: ActionApi, title: String, tree: TreeSpec) -> Action
+
+
+ +
+ +
+Insert a tab before the current tab. +
+ +
+ +
+ + +
+ +

fn kill_buffer

+ +
fn kill_buffer(_: ActionApi) -> Action
+
+
+ +
+ +
+Kill the currently focused buffer. +
+ +
+ +
+ + +
+ +

fn kill_buffer_id

+ +
fn kill_buffer_id(_: ActionApi, buffer_id: int) -> Action
+
+
+ +
+ +
+Kill a buffer by id. +
+ +
+ +
+ + +
+ +

fn leave_mode

+ +
fn leave_mode(_: ActionApi) -> Action
+
+
+ +
+ +
+Leave the active input mode. +
+ +
+ +
+ + +
+ +

fn move_buffer_to_floating

+ +
fn move_buffer_to_floating(_: ActionApi, buffer_id: int, options: Map) -> Action
+
+
+ + +
+ +
+Move a buffer into a new floating window. +
+ + + +
+ +
+ + +
+ +

fn move_buffer_to_node

+ +
fn move_buffer_to_node(_: ActionApi, buffer_id: int, node_id: int) -> Action
+
+
+ +
+ +
+Move a buffer into a specific node. +
+ +
+ +
+ + +
+ +

fn next_current_tabs

+ +
fn next_current_tabs(_: ActionApi) -> Action
+
+
+ +
+ +
+Select the next tab in the currently focused tabs node. +
+ +
+ +
+ + +
+ +

fn next_tab

+ +
fn next_tab(_: ActionApi, tabs_node_id: int) -> Action
+
+
+ +
+ +
+Select the next tab in a specific tabs node. +
+ +
+ +
+ + +
+ +

fn noop

+ +
fn noop(_: ActionApi) -> Action
+
+
+ +
+ +
+Build a no-op action. +
+ +
+ +
+ + +
+ +

fn notify

+ +
fn notify(_: ActionApi, level: String, message: String) -> Action
+
+
+ +
+ +
+Emit a client notification. +
+ +
+ +
+ + +
+ +

fn open_floating

+ +
fn open_floating(_: ActionApi, tree: TreeSpec, options: Map) -> Action
+
+
+ +
+ +
+Open a floating view around the provided tree. +
+ +
+ +
+ + +
+ +

fn prev_current_tabs

+ +
fn prev_current_tabs(_: ActionApi) -> Action
+
+
+ +
+ +
+Select the previous tab in the currently focused tabs node. +
+ +
+ +
+ + +
+ +

fn prev_tab

+ +
fn prev_tab(_: ActionApi, tabs_node_id: int) -> Action
+
+
+ +
+ +
+Select the previous tab in a specific tabs node. +
+ +
+ +
+ + +
+ +

fn replace_current_with

+ +
fn replace_current_with(_: ActionApi, tree: TreeSpec) -> Action
+
+
+ +
+ +
+Replace the focused node with a new tree. +
+ +
+ +
+ + +
+ +

fn replace_node

+ +
fn replace_node(_: ActionApi, node_id: int, tree: TreeSpec) -> Action
+
+
+ +
+ +
+Replace a specific node by id with a new tree. +
+ +
+ +
+ + +
+ +

fn reveal_buffer

+ +
fn reveal_buffer(_: ActionApi, buffer_id: int) -> Action
+
+
+ +
+ +
+Reveal a specific buffer by id. +
+ +
+ +
+ + +
+ +

fn run_named_action

+ +
fn run_named_action(_: ActionApi, name: String) -> Action
+
+
+ +
+ +
+Run another named action by name. +
+ +
+ +
+ + +
+ +

fn scroll_line_down

+ +
fn scroll_line_down(_: ActionApi) -> Action
+
+
+ +
+ +
+Scroll one line downward in local scrollback. +
+ +
+ +
+ + +
+ +

fn scroll_line_up

+ +
fn scroll_line_up(_: ActionApi) -> Action
+
+
+ +
+ +
+Scroll one line upward in local scrollback. +
+ +
+ +
+ + +
+ +

fn scroll_page_down

+ +
fn scroll_page_down(_: ActionApi) -> Action
+
+
+ +
+ +
+Scroll one page downward in local scrollback. +
+ +
+ +
+ + +
+ +

fn scroll_page_up

+ +
fn scroll_page_up(_: ActionApi) -> Action
+
+
+ +
+ +
+Scroll one page upward in local scrollback. +
+ +
+ +
+ + +
+ +

fn scroll_to_bottom

+ +
fn scroll_to_bottom(_: ActionApi) -> Action
+
+
+ +
+ +
+Scroll to the bottom of local scrollback. +
+ +
+ +
+ + +
+ +

fn scroll_to_top

+ +
fn scroll_to_top(_: ActionApi) -> Action
+
+
+ +
+ +
+Scroll to the top of local scrollback. +
+ +
+ +
+ + +
+ +

fn search_next

+ +
fn search_next(_: ActionApi) -> Action
+
+
+ +
+ +
+Jump to the next search match. +
+ +
+ +
+ + +
+ +

fn search_prev

+ +
fn search_prev(_: ActionApi) -> Action
+
+
+ +
+ +
+Jump to the previous search match. +
+ +
+ +
+ + +
+ +

fn select_current_tabs

+ +
fn select_current_tabs(_: ActionApi, index: int) -> Action
+
+
+ +
+ +
+Select a tab by index in the currently focused tabs node. +
+ +
+ +
+ + +
+ +

fn select_move_down

+ +
fn select_move_down(_: ActionApi) -> Action
+
+
+ +
+ +
+Move the active selection down. +
+ +
+ +
+ + +
+ +

fn select_move_left

+ +
fn select_move_left(_: ActionApi) -> Action
+
+
+ +
+ +
+Move the active selection left. +
+ +
+ +
+ + +
+ +

fn select_move_right

+ +
fn select_move_right(_: ActionApi) -> Action
+
+
+ +
+ +
+Move the active selection right. +
+ +
+ +
+ + +
+ +

fn select_move_up

+ +
fn select_move_up(_: ActionApi) -> Action
+
+
+ +
+ +
+Move the active selection up. +
+ +
+ +
+ + +
+ +

fn select_tab

+ +
fn select_tab(_: ActionApi, tabs_node_id: int, index: int) -> Action
+
+
+ +
+ +
+Select a tab by index in a specific tabs node. +
+ +
+ +
+ + +
+ +

fn send_bytes

+ +
fn send_bytes(_: ActionApi, buffer_id: int, bytes: String) -> Action
+fn send_bytes(_: ActionApi, buffer_id: int, bytes: Array) -> Action
+
+
+ +
+ +
+Send a string of bytes to a specific buffer. +
+ +
+ +
+ + +
+ +

fn send_bytes_current

+ +
fn send_bytes_current(_: ActionApi, bytes: String) -> Action
+fn send_bytes_current(_: ActionApi, bytes: Array) -> Action
+
+
+ +
+ +
+Send a string of bytes to the focused buffer. +
+ +
+ +
+ + +
+ +

fn send_keys

+ +
fn send_keys(_: ActionApi, buffer_id: int, notation: String) -> Action
+
+
+ +
+ +
+Send a key notation sequence to a specific buffer. +
+ +
+ +
+ + +
+ +

fn send_keys_current

+ +
fn send_keys_current(_: ActionApi, notation: String) -> Action
+
+
+ +
+ +
+Send a key notation sequence to the focused buffer. +
+ +
+ +
+ + +
+ +

fn split_with

+ +
fn split_with(_: ActionApi, direction: String, tree: TreeSpec) -> Action
+
+
+ +
+ +
+Split the current node and attach the provided tree as the new sibling. +
+ +
+ +
+ + +
+ +

fn toggle_mode

+ +
fn toggle_mode(_: ActionApi, mode: String) -> Action
+
+
+ +
+ +
+Toggle a named input mode. +
+ +
+ +
+ + +
+ +

fn yank_selection

+ +
fn yank_selection(_: ActionApi) -> Action
+
+
+ +
+ +
+Copy the current selection into the clipboard. +
+ +
+ +
+ + +
+

Tree

+

Namespace: global

+
+ +

fn buffer_attach

+ +
fn buffer_attach(_: TreeApi, buffer_id: int) -> TreeSpec
+
+
+ +
+ +
+Attach an existing buffer by id. +
+ +
+ +
+ + +
+ +

fn buffer_current

+ +
fn buffer_current(_: TreeApi) -> TreeSpec
+
+
+ +
+ +
+Build a tree reference to the currently focused buffer. +
+ +
+ +
+ + +
+ +

fn buffer_empty

+ +
fn buffer_empty(_: TreeApi) -> TreeSpec
+
+
+ +
+ +
+Build an empty buffer tree node. +
+ +
+ +
+ + +
+ +

fn buffer_spawn

+ +
fn buffer_spawn(_: TreeApi, command: Array) -> TreeSpec
+fn buffer_spawn(_: TreeApi, command: Array, options: Map) -> TreeSpec
+
+
+ + +
+ +
+Spawn a new buffer from a command array. +

Supported options keys are title (string), cwd (string), and env +(map<string, string>). Unknown keys are rejected.

+
+ + + +
+ +
+ + +
+ +

fn current_buffer

+ +
fn current_buffer(_: TreeApi) -> TreeSpec
+
+
+ +
+ +
+Build a tree reference to the currently focused buffer. +
+ +
+ +
+ + +
+ +

fn current_node

+ +
fn current_node(_: TreeApi) -> TreeSpec
+
+
+ +
+ +
+Build a tree reference to the currently focused node. +
+ +
+ +
+ + +
+ +

fn split

+ +
fn split(_: TreeApi, direction: String, children: Array) -> TreeSpec
+fn split(_: TreeApi, direction: String, children: Array, sizes: Array) -> TreeSpec
+
+
+ +
+ +
+Build a split with an explicit direction string. +
+ +
+ +
+ + +
+ +

fn split_h

+ +
fn split_h(_: TreeApi, children: Array) -> TreeSpec
+
+
+ +
+ +
+Build a horizontal split. +
+ +
+ +
+ + +
+ +

fn split_v

+ +
fn split_v(_: TreeApi, children: Array) -> TreeSpec
+
+
+ +
+ +
+Build a vertical split. +
+ +
+ +
+ + +
+ +

fn tab

+ +
fn tab(_: TreeApi, title: String, tree: TreeSpec) -> TabSpec
+
+
+ +
+ +
+Build a single tab specification. +
+ +
+ +
+ + +
+ +

fn tabs

+ +
fn tabs(_: TreeApi, tabs: Array) -> TreeSpec
+
+
+ +
+ +
+Build a tabs container with the first tab active. +
+ +
+ +
+ + +
+ +

fn tabs_with_active

+ +
fn tabs_with_active(_: TreeApi, tabs: Array, active: int) -> TreeSpec
+
+
+ +
+ +
+Build a tabs container with an explicit active tab. +
+ +
+ +
+ + +
+

Context

+

Namespace: global

+
+ +

fn current_buffer

+ +
fn current_buffer(context: Context) -> ?
+
+
+ + +
+ +
+Return the currently focused buffer, if any. +

ReturnType: BufferRef | ()

+
+ + + +
+ +
+ + +
+ +

fn current_floating

+ +
fn current_floating(context: Context) -> ?
+
+
+ +
+ +
+Return the currently focused floating window, if any. +

ReturnType: FloatingRef | ()

+
+ +
+ +
+ + +
+ +

fn current_mode

+ +
fn current_mode(context: Context) -> String
+
+
+ +
+ +
+Return the active input mode name. +
+ +
+ +
+ + +
+ +

fn current_node

+ +
fn current_node(context: Context) -> ?
+
+
+ +
+ +
+Return the currently focused node, if any. +

ReturnType: NodeRef | ()

+
+ +
+ +
+ + +
+ +

fn current_session

+ +
fn current_session(context: Context) -> ?
+
+
+ +
+ +
+Return the current session reference, if any. +

ReturnType: SessionRef | ()

+
+ +
+ +
+ + +
+ +

fn detached_buffers

+ +
fn detached_buffers(context: Context) -> Array
+
+
+ +
+ +
+Return detached buffers in the current model snapshot. +
+ +
+ +
+ + +
+ +

fn event

+ +
fn event(context: Context) -> ?
+
+
+ +
+ +
+Return the current event payload, if any. +

ReturnType: EventInfo | ()

+
+ +
+ +
+ + +
+ +

fn find_buffer

+ +
fn find_buffer(context: Context, buffer_id: int) -> ?
+
+
+ +
+ +
+Find a buffer by numeric id. Returns `()` when it does not exist. +

ReturnType: BufferRef | ()

+
+ +
+ +
+ + +
+ +

fn find_floating

+ +
fn find_floating(context: Context, floating_id: int) -> ?
+
+
+ +
+ +
+Find a floating window by numeric id. Returns `()` when it does not exist. +

ReturnType: FloatingRef | ()

+
+ +
+ +
+ + +
+ +

fn find_node

+ +
fn find_node(context: Context, node_id: int) -> ?
+
+
+ +
+ +
+Find a node by numeric id. Returns `()` when it does not exist. +

ReturnType: NodeRef | ()

+
+ +
+ +
+ + +
+ +

fn sessions

+ +
fn sessions(context: Context) -> Array
+
+
+ +
+ +
+Return every visible session. +
+ +
+ +
+ + +
+ +

fn visible_buffers

+ +
fn visible_buffers(context: Context) -> Array
+
+
+ +
+ +
+Return visible buffers in the current model snapshot. +
+ +
+ +
+ + +
+

Mux

+

Namespace: global

+
+ +

fn current_buffer

+ +
fn current_buffer(mux: MuxApi) -> ?
+
+
+ +
+ +
+Return the currently focused buffer, if any. +

ReturnType: BufferRef | ()

+
+ +
+ +
+ + +
+ +

fn current_floating

+ +
fn current_floating(mux: MuxApi) -> ?
+
+
+ +
+ +
+Return the currently focused floating window, if any. +

ReturnType: FloatingRef | ()

+
+ +
+ +
+ + +
+ +

fn current_node

+ +
fn current_node(mux: MuxApi) -> ?
+
+
+ +
+ +
+Return the currently focused node, if any. +

ReturnType: NodeRef | ()

+
+ +
+ +
+ + +
+ +

fn current_session

+ +
fn current_session(mux: MuxApi) -> ?
+
+
+ +
+ +
+Return the current session reference, if any. +

ReturnType: SessionRef | ()

+
+ +
+ +
+ + +
+ +

fn detached_buffers

+ +
fn detached_buffers(mux: MuxApi) -> Array
+
+
+ +
+ +
+Return detached buffers in the current model snapshot. +
+ +
+ +
+ + +
+ +

fn find_buffer

+ +
fn find_buffer(mux: MuxApi, buffer_id: int) -> ?
+
+
+ +
+ +
+Find a buffer by numeric id. Returns `()` when it does not exist. +

ReturnType: BufferRef | ()

+
+ +
+ +
+ + +
+ +

fn find_floating

+ +
fn find_floating(mux: MuxApi, floating_id: int) -> ?
+
+
+ +
+ +
+Find a floating window by numeric id. Returns `()` when it does not exist. +

ReturnType: FloatingRef | ()

+
+ +
+ +
+ + +
+ +

fn find_node

+ +
fn find_node(mux: MuxApi, node_id: int) -> ?
+
+
+ +
+ +
+Find a node by numeric id. Returns `()` when it does not exist. +

ReturnType: NodeRef | ()

+
+ +
+ +
+ + +
+ +

fn sessions

+ +
fn sessions(mux: MuxApi) -> Array
+
+
+ +
+ +
+Return every visible session. +
+ +
+ +
+ + +
+ +

fn visible_buffers

+ +
fn visible_buffers(mux: MuxApi) -> Array
+
+
+ +
+ +
+Return visible buffers in the current model snapshot. +
+ +
+ +
+ + +
+

EventInfo

+

Namespace: global

+
+ +

fn buffer_id

+ +
fn buffer_id(event: EventInfo) -> ?
+
+
+ +
+ +
+Return the buffer id attached to an event, or `()`. +

ReturnType: int | ()

+
+ +
+ +
+ + +
+ +

fn floating_id

+ +
fn floating_id(event: EventInfo) -> ?
+
+
+ +
+ +
+Return the floating id attached to an event, or `()`. +

ReturnType: int | ()

+
+ +
+ +
+ + +
+ +

fn name

+ +
fn name(event: EventInfo) -> String
+
+
+ +
+ +
+Return the event name. +
+ +
+ +
+ + +
+ +

fn node_id

+ +
fn node_id(event: EventInfo) -> ?
+
+
+ +
+ +
+Return the node id attached to an event, or `()`. +

ReturnType: int | ()

+
+ +
+ +
+ + +
+ +

fn session_id

+ +
fn session_id(event: EventInfo) -> ?
+
+
+ +
+ +
+Return the session id attached to an event, or `()`. +

ReturnType: int | ()

+
+ +
+ +
+ + +
+

SessionRef

+

Namespace: global

+
+ +

fn floating

+ +
fn floating(session: SessionRef) -> Array
+
+
+ +
+ +
+Return floating window ids attached to the session. +
+ +
+ +
+ + +
+ +

fn id

+ +
fn id(session: SessionRef) -> int
+
+
+ +
+ +
+Return the numeric session id. +
+ +
+ +
+ + +
+ +

fn name

+ +
fn name(session: SessionRef) -> String
+
+
+ +
+ +
+Return the session name. +
+ +
+ +
+ + +
+ +

fn root_node

+ +
fn root_node(session: SessionRef) -> int
+
+
+ +
+ +
+Return the root tabs node for the session. +
+ +
+ +
+ + +
+

BufferRef

+

Namespace: global

+
+ +

fn activity

+ +
fn activity(buffer: BufferRef) -> String
+
+
+ +
+ +
+Return the current activity state name. +
+ +
+ +
+ + +
+ +

fn command

+ +
fn command(buffer: BufferRef) -> Array
+
+
+ +
+ +
+Return the original command vector. +
+ +
+ +
+ + +
+ +

fn cwd

+ +
fn cwd(buffer: BufferRef) -> ?
+
+
+ +
+ +
+Return the working directory, if any. +

ReturnType: string | ()

+
+ +
+ +
+ + +
+ +

fn env_hint

+ +
fn env_hint(buffer: BufferRef, key: String) -> ?
+
+
+ +
+ +
+Look up a single environment hint captured on the buffer. +

ReturnType: string | ()

+
+ +
+ +
+ + +
+ +

fn exit_code

+ +
fn exit_code(buffer: BufferRef) -> ?
+
+
+ +
+ +
+Return the process exit code, if any. +

ReturnType: int | ()

+
+ +
+ +
+ + +
+ +

fn history_text

+ +
fn history_text(buffer: BufferRef) -> String
+
+
+ + +
+ +
+Return the full captured history text for the buffer. +
+ + + +
+ +
+ + +
+ +

fn id

+ +
fn id(buffer: BufferRef) -> int
+
+
+ +
+ +
+Return the numeric buffer id. +
+ +
+ +
+ + +
+ +

fn is_attached

+ +
fn is_attached(buffer: BufferRef) -> bool
+
+
+ +
+ +
+Return whether the buffer is currently attached to a node. +
+ +
+ +
+ + +
+ +

fn is_detached

+ +
fn is_detached(buffer: BufferRef) -> bool
+
+
+ +
+ +
+Return whether the buffer has been detached. +
+ +
+ +
+ + +
+ +

fn is_running

+ +
fn is_running(buffer: BufferRef) -> bool
+
+
+ +
+ +
+Return whether the buffer process is still running. +
+ +
+ +
+ + +
+ +

fn is_visible

+ +
fn is_visible(buffer: BufferRef) -> bool
+
+
+ +
+ +
+Return whether the buffer is visible in the current presentation. +
+ +
+ +
+ + +
+ +

fn node_id

+ +
fn node_id(buffer: BufferRef) -> ?
+
+
+ +
+ +
+Return the attached node id, if any. +

ReturnType: int | ()

+
+ +
+ +
+ + +
+ +

fn pid

+ +
fn pid(buffer: BufferRef) -> ?
+
+
+ +
+ +
+Return the process id, if any. +

ReturnType: int | ()

+
+ +
+ +
+ + +
+ +

fn process_name

+ +
fn process_name(buffer: BufferRef) -> ?
+
+
+ +
+ +
+Return the detected process name, if any. +

ReturnType: string | ()

+
+ +
+ +
+ + +
+ +

fn session_id

+ +
fn session_id(buffer: BufferRef) -> ?
+
+
+ +
+ +
+Return the attached session id, if any. +

ReturnType: int | ()

+
+ +
+ +
+ + +
+ +

fn snapshot_text

+ +
fn snapshot_text(buffer: BufferRef, limit: int) -> String
+
+
+ +
+ +
+Return a text snapshot limited to the requested line count. +
+ +
+ +
+ + +
+ +

fn title

+ +
fn title(buffer: BufferRef) -> String
+
+
+ +
+ +
+Return the buffer title. +
+ +
+ +
+ + +
+ +

fn tty_path

+ +
fn tty_path(buffer: BufferRef) -> ?
+
+
+ +
+ +
+Return the controlling TTY path, if any. +

ReturnType: string | ()

+
+ +
+ +
+ + +
+

NodeRef

+

Namespace: global

+
+ +

fn active_tab_index

+ +
fn active_tab_index(node: NodeRef) -> ?
+
+
+ +
+ +
+Return the active tab index, if any. +

ReturnType: int | ()

+
+ +
+ +
+ + +
+ +

fn buffer

+ +
fn buffer(node: NodeRef) -> ?
+
+
+ +
+ +
+Return the attached buffer id, if any. +

ReturnType: int | ()

+
+ +
+ +
+ + +
+ +

fn children

+ +
fn children(node: NodeRef) -> Array
+
+
+ +
+ +
+Return child node ids. +
+ +
+ +
+ + +
+ +

fn geometry

+ +
fn geometry(node: NodeRef) -> ?
+
+
+ +
+ +
+Return the geometry map, if any. +

ReturnType: Map | ()

+
+ +
+ +
+ + +
+ +

fn id

+ +
fn id(node: NodeRef) -> int
+
+
+ +
+ +
+Return the node id. +
+ +
+ +
+ + +
+ +

fn is_floating_root

+ +
fn is_floating_root(node: NodeRef) -> bool
+
+
+ +
+ +
+Return whether the node is the root of a floating window. +
+ +
+ +
+ + +
+ +

fn is_focused

+ +
fn is_focused(node: NodeRef) -> bool
+
+
+ +
+ +
+Return whether the node is focused. +
+ +
+ +
+ + +
+ +

fn is_root

+ +
fn is_root(node: NodeRef) -> bool
+
+
+ +
+ +
+Return whether the node is the session root. +
+ +
+ +
+ + +
+ +

fn is_visible

+ +
fn is_visible(node: NodeRef) -> bool
+
+
+ +
+ +
+Return whether the node is visible in the current presentation. +
+ +
+ +
+ + +
+ +

fn kind

+ +
fn kind(node: NodeRef) -> String
+
+
+ +
+ +
+Return the node kind such as `buffer_view`, `split`, or `tabs`. +
+ +
+ +
+ + +
+ +

fn parent

+ +
fn parent(node: NodeRef) -> ?
+
+
+ +
+ +
+Return the parent node id, if any. +

ReturnType: int | ()

+
+ +
+ +
+ + +
+ +

fn session_id

+ +
fn session_id(node: NodeRef) -> int
+
+
+ +
+ +
+Return the owning session id. +
+ +
+ +
+ + +
+ +

fn split_direction

+ +
fn split_direction(node: NodeRef) -> ?
+
+
+ +
+ +
+Return the split direction, if any. +

ReturnType: string | ()

+
+ +
+ +
+ + +
+ +

fn split_weights

+ +
fn split_weights(node: NodeRef) -> ?
+
+
+ +
+ +
+Return split weights, if any. +

ReturnType: Array | ()

+
+ +
+ +
+ + +
+ +

fn tab_titles

+ +
fn tab_titles(node: NodeRef) -> Array
+
+
+ +
+ +
+Return tab titles on a tabs node. +
+ +
+ +
+ + +
+

FloatingRef

+

Namespace: global

+
+ +

fn geometry

+ +
fn geometry(floating: FloatingRef) -> Map
+
+
+ +
+ +
+Return the floating geometry map. +
+ +
+ +
+ + +
+ +

fn id

+ +
fn id(floating: FloatingRef) -> int
+
+
+ +
+ +
+Return the floating id. +
+ +
+ +
+ + +
+ +

fn is_focused

+ +
fn is_focused(floating: FloatingRef) -> bool
+
+
+ +
+ +
+Return whether the floating is focused. +
+ +
+ +
+ + +
+ +

fn is_visible

+ +
fn is_visible(floating: FloatingRef) -> bool
+
+
+ +
+ +
+Return whether the floating is visible. +
+ +
+ +
+ + +
+ +

fn root_node

+ +
fn root_node(floating: FloatingRef) -> int
+
+
+ +
+ +
+Return the root node id. +
+ +
+ +
+ + +
+ +

fn session_id

+ +
fn session_id(floating: FloatingRef) -> int
+
+
+ +
+ +
+Return the owning session id. +
+ +
+ +
+ + +
+ +

fn title

+ +
fn title(floating: FloatingRef) -> ?
+
+
+ +
+ +
+Return the floating title, if any. +

ReturnType: string | ()

+
+ +
+ +
+ + +
+

TabBarContext

+

Namespace: global

+
+ +

fn active_index

+ +
fn active_index(bar: TabBarContext) -> int
+
+
+ +
+ +
+Return the active tab index. +
+ +
+ +
+ + +
+ +

fn is_root

+ +
fn is_root(bar: TabBarContext) -> bool
+
+
+ +
+ +
+Return whether the formatted tabs are the root tabs. +
+ +
+ +
+ + +
+ +

fn mode

+ +
fn mode(bar: TabBarContext) -> String
+
+
+ +
+ +
+Return the formatter mode name. +
+ +
+ +
+ + +
+ +

fn node_id

+ +
fn node_id(bar: TabBarContext) -> int
+
+
+ +
+ +
+Return the tabs node id currently being formatted. +
+ +
+ +
+ + +
+ +

fn tabs

+ +
fn tabs(bar: TabBarContext) -> Array
+
+
+ +
+ +
+Return tab metadata used by the formatter. +
+ +
+ +
+ + +
+ +

fn viewport_width

+ +
fn viewport_width(bar: TabBarContext) -> int
+
+
+ +
+ +
+Return the formatter viewport width in cells. +
+ +
+ +
+ + +
+

TabInfo

+

Namespace: global

+
+ +

fn buffer_count

+ +
fn buffer_count(tab: TabInfo) -> int
+
+
+ +
+ +
+Return how many buffers are attached to the tab. +
+ +
+ +
+ + +
+ +

fn has_activity

+ +
fn has_activity(tab: TabInfo) -> bool
+
+
+ +
+ +
+Return whether the tab has activity. +
+ +
+ +
+ + +
+ +

fn has_bell

+ +
fn has_bell(tab: TabInfo) -> bool
+
+
+ +
+ +
+Return whether the tab has a bell marker. +
+ +
+ +
+ + +
+ +

fn index

+ +
fn index(tab: TabInfo) -> int
+
+
+ +
+ +
+Return the zero-based tab index. +
+ +
+ +
+ + +
+ +

fn is_active

+ +
fn is_active(tab: TabInfo) -> bool
+
+
+ +
+ +
+Return whether the tab is active. +
+ +
+ +
+ + +
+ +

fn title

+ +
fn title(tab: TabInfo) -> String
+
+
+ +
+ +
+Return the tab title. +
+ +
+ +
+ + +
+

System

+

Namespace: global

+
+ +

fn env

+ +
fn env(_: SystemApi, name: String) -> ?
+
+
+ +
+ +
+Read an environment variable, if it is set. +

ReturnType: string | ()

+
+ +
+ +
+ + +
+ +

fn now

+ +
fn now(_: SystemApi) -> int
+
+
+ +
+ +
+Return the current Unix timestamp in seconds. +
+ +
+ +
+ + +
+ +

fn which

+ +
fn which(_: SystemApi, name: String) -> ?
+
+
+ +
+ +
+Resolve an executable from `PATH`, if it is found. +

ReturnType: string | ()

+
+ +
+ +
+ + +
+

UI

+

Namespace: global

+
+ +

fn bar

+ +
fn bar(_: UiApi, left: Array, center: Array, right: Array) -> BarSpec
+
+
+ +
+ +
+Build a full bar specification from left, center, and right segments. +
+ +
+ +
+ + +
+ +

fn segment

+ +
fn segment(_: UiApi, text: String) -> BarSegment
+fn segment(_: UiApi, text: String, options: Map) -> BarSegment
+
+
+ +
+ +
+Create a [`BarSegment`] from a [`UiApi`] receiver and text using default styling. +

segment(_: UiApi, text: String) -> BarSegment produces plain text with default +[StyleSpec] values and no click target.

+
+ +
+ +
+ + +
+

Runtime Theme

+

Namespace: global

+
+ +

fn color

+ +
fn color(theme: ThemeRuntimeApi, name: String) -> ?
+
+
+ +
+ +
+Read a named color from the active runtime palette, if it exists. +

ReturnType: RgbColor | ()

+
+ +
+ +
+ + + +
+ + +
+
+ + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + diff --git a/docs/config-api-book/registration-action.html b/docs/config-api-book/registration-action.html new file mode 100644 index 0000000..d6462b5 --- /dev/null +++ b/docs/config-api-book/registration-action.html @@ -0,0 +1,1587 @@ + + + + + + Action (Registration) - Embers Config API + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+
+

Keyboard shortcuts

+
+

Press or to navigate between chapters

+

Press S or / to search in the book

+

Press ? to show this help

+

Press Esc to hide this help

+
+
+
+
+ + + + + + + + + + + + + +
+ +
+
+ + + + + + + +
+
+

Action (Registration)

+

Namespace: global

+
+ +

fn cancel_search

+ +
fn cancel_search(_: ActionApi) -> Action
+
+
+ +
+ +
+Cancel the active search. +
+ +
+ +
+ + +
+ +

fn cancel_selection

+ +
fn cancel_selection(_: ActionApi) -> Action
+
+
+ +
+ +
+Cancel the current selection. +
+ +
+ +
+ + +
+ +

fn chain

+ +
fn chain(_: ActionApi, actions: Array) -> Action
+
+
+ +
+ +
+Chain multiple actions into one composite action. +
+ +
+ +
+ + +
+ +

fn clear_pending_keys

+ +
fn clear_pending_keys(_: ActionApi) -> Action
+
+
+ +
+ +
+Clear any partially-entered key sequence. +
+ +
+ +
+ + +
+ +

fn close_floating

+ +
fn close_floating(_: ActionApi) -> Action
+
+
+ +
+ +
+Close the currently focused floating window. +
+ +
+ +
+ + +
+ +

fn close_floating_id

+ +
fn close_floating_id(_: ActionApi, floating_id: int) -> Action
+
+
+ +
+ +
+Close a floating window by id. +
+ +
+ +
+ + +
+ +

fn close_node

+ +
fn close_node(_: ActionApi, node_id: int) -> Action
+
+
+ +
+ +
+Close a view by node id. +
+ +
+ +
+ + +
+ +

fn close_view

+ +
fn close_view(_: ActionApi) -> Action
+
+
+ +
+ +
+Close the currently focused view. +
+ +
+ +
+ + +
+ +

fn copy_selection

+ +
fn copy_selection(_: ActionApi) -> Action
+
+
+ +
+ +
+Copy the current selection into the clipboard. +
+ +
+ +
+ + +
+ +

fn detach_buffer

+ +
fn detach_buffer(_: ActionApi) -> Action
+
+
+ +
+ +
+Detach the currently focused buffer. +
+ +
+ +
+ + +
+ +

fn detach_buffer_id

+ +
fn detach_buffer_id(_: ActionApi, buffer_id: int) -> Action
+
+
+ +
+ +
+Detach a buffer by id. +
+ +
+ +
+ + +
+ +

fn enter_mode

+ +
fn enter_mode(_: ActionApi, mode: String) -> Action
+
+
+ +
+ +
+Enter a specific input mode by name. +
+ +
+ +
+ + +
+ +

fn enter_search_mode

+ +
fn enter_search_mode(_: ActionApi) -> Action
+
+
+ +
+ +
+Enter incremental search mode. +
+ +
+ +
+ + +
+ +

fn enter_select_block

+ +
fn enter_select_block(_: ActionApi) -> Action
+
+
+ +
+ +
+Enter block selection mode. +
+ +
+ +
+ + +
+ +

fn enter_select_char

+ +
fn enter_select_char(_: ActionApi) -> Action
+
+
+ +
+ +
+Enter character selection mode. +
+ +
+ +
+ + +
+ +

fn enter_select_line

+ +
fn enter_select_line(_: ActionApi) -> Action
+
+
+ +
+ +
+Enter line selection mode. +
+ +
+ +
+ + +
+ +

fn focus_buffer

+ +
fn focus_buffer(_: ActionApi, buffer_id: int) -> Action
+
+
+ +
+ +
+Focus a specific buffer by id. +
+ +
+ +
+ + +
+ +

fn focus_down

+ +
fn focus_down(_: ActionApi) -> Action
+
+
+ +
+ +
+Focus the view below the current node. +
+ +
+ +
+ + +
+ +

fn focus_left

+ +
fn focus_left(_: ActionApi) -> Action
+
+
+ + +
+ +
+Focus the view to the left of the current node. +
+ + + +
+ +
+ + +
+ +

fn focus_right

+ +
fn focus_right(_: ActionApi) -> Action
+
+
+ +
+ +
+Focus the view to the right of the current node. +
+ +
+ +
+ + +
+ +

fn focus_up

+ +
fn focus_up(_: ActionApi) -> Action
+
+
+ +
+ +
+Focus the view above the current node. +
+ +
+ +
+ + +
+ +

fn follow_output

+ +
fn follow_output(_: ActionApi) -> Action
+
+
+ +
+ +
+Re-enable following live output. +
+ +
+ +
+ + +
+ +

fn insert_tab_after

+ +
fn insert_tab_after(_: ActionApi, tabs_node_id: int, title: String, tree: TreeSpec) -> Action
+
+
+ +
+ +
+Insert a tab after a specific tabs node. +
+ +
+ +
+ + +
+ +

fn insert_tab_after_current

+ +
fn insert_tab_after_current(_: ActionApi, title: String, tree: TreeSpec) -> Action
+
+
+ +
+ +
+Insert a tab after the current tab in the focused tabs node. +
+ +
+ +
+ + +
+ +

fn insert_tab_before

+ +
fn insert_tab_before(_: ActionApi, tabs_node_id: int, title: String, tree: TreeSpec) -> Action
+
+
+ +
+ +
+Insert a tab before a specific tabs node. +
+ +
+ +
+ + +
+ +

fn insert_tab_before_current

+ +
fn insert_tab_before_current(_: ActionApi, title: String, tree: TreeSpec) -> Action
+
+
+ +
+ +
+Insert a tab before the current tab. +
+ +
+ +
+ + +
+ +

fn kill_buffer

+ +
fn kill_buffer(_: ActionApi) -> Action
+
+
+ +
+ +
+Kill the currently focused buffer. +
+ +
+ +
+ + +
+ +

fn kill_buffer_id

+ +
fn kill_buffer_id(_: ActionApi, buffer_id: int) -> Action
+
+
+ +
+ +
+Kill a buffer by id. +
+ +
+ +
+ + +
+ +

fn leave_mode

+ +
fn leave_mode(_: ActionApi) -> Action
+
+
+ +
+ +
+Leave the active input mode. +
+ +
+ +
+ + +
+ +

fn move_buffer_to_floating

+ +
fn move_buffer_to_floating(_: ActionApi, buffer_id: int, options: Map) -> Action
+
+
+ + +
+ +
+Move a buffer into a new floating window. +
+ + + +
+ +
+ + +
+ +

fn move_buffer_to_node

+ +
fn move_buffer_to_node(_: ActionApi, buffer_id: int, node_id: int) -> Action
+
+
+ +
+ +
+Move a buffer into a specific node. +
+ +
+ +
+ + +
+ +

fn next_current_tabs

+ +
fn next_current_tabs(_: ActionApi) -> Action
+
+
+ +
+ +
+Select the next tab in the currently focused tabs node. +
+ +
+ +
+ + +
+ +

fn next_tab

+ +
fn next_tab(_: ActionApi, tabs_node_id: int) -> Action
+
+
+ +
+ +
+Select the next tab in a specific tabs node. +
+ +
+ +
+ + +
+ +

fn noop

+ +
fn noop(_: ActionApi) -> Action
+
+
+ +
+ +
+Build a no-op action. +
+ +
+ +
+ + +
+ +

fn notify

+ +
fn notify(_: ActionApi, level: String, message: String) -> Action
+
+
+ +
+ +
+Emit a client notification. +
+ +
+ +
+ + +
+ +

fn open_floating

+ +
fn open_floating(_: ActionApi, tree: TreeSpec, options: Map) -> Action
+
+
+ +
+ +
+Open a floating view around the provided tree. +
+ +
+ +
+ + +
+ +

fn prev_current_tabs

+ +
fn prev_current_tabs(_: ActionApi) -> Action
+
+
+ +
+ +
+Select the previous tab in the currently focused tabs node. +
+ +
+ +
+ + +
+ +

fn prev_tab

+ +
fn prev_tab(_: ActionApi, tabs_node_id: int) -> Action
+
+
+ +
+ +
+Select the previous tab in a specific tabs node. +
+ +
+ +
+ + +
+ +

fn replace_current_with

+ +
fn replace_current_with(_: ActionApi, tree: TreeSpec) -> Action
+
+
+ +
+ +
+Replace the focused node with a new tree. +
+ +
+ +
+ + +
+ +

fn replace_node

+ +
fn replace_node(_: ActionApi, node_id: int, tree: TreeSpec) -> Action
+
+
+ +
+ +
+Replace a specific node by id with a new tree. +
+ +
+ +
+ + +
+ +

fn reveal_buffer

+ +
fn reveal_buffer(_: ActionApi, buffer_id: int) -> Action
+
+
+ +
+ +
+Reveal a specific buffer by id. +
+ +
+ +
+ + +
+ +

fn run_named_action

+ +
fn run_named_action(_: ActionApi, name: String) -> Action
+
+
+ +
+ +
+Run another named action by name. +
+ +
+ +
+ + +
+ +

fn scroll_line_down

+ +
fn scroll_line_down(_: ActionApi) -> Action
+
+
+ +
+ +
+Scroll one line downward in local scrollback. +
+ +
+ +
+ + +
+ +

fn scroll_line_up

+ +
fn scroll_line_up(_: ActionApi) -> Action
+
+
+ +
+ +
+Scroll one line upward in local scrollback. +
+ +
+ +
+ + +
+ +

fn scroll_page_down

+ +
fn scroll_page_down(_: ActionApi) -> Action
+
+
+ +
+ +
+Scroll one page downward in local scrollback. +
+ +
+ +
+ + +
+ +

fn scroll_page_up

+ +
fn scroll_page_up(_: ActionApi) -> Action
+
+
+ +
+ +
+Scroll one page upward in local scrollback. +
+ +
+ +
+ + +
+ +

fn scroll_to_bottom

+ +
fn scroll_to_bottom(_: ActionApi) -> Action
+
+
+ +
+ +
+Scroll to the bottom of local scrollback. +
+ +
+ +
+ + +
+ +

fn scroll_to_top

+ +
fn scroll_to_top(_: ActionApi) -> Action
+
+
+ +
+ +
+Scroll to the top of local scrollback. +
+ +
+ +
+ + +
+ +

fn search_next

+ +
fn search_next(_: ActionApi) -> Action
+
+
+ +
+ +
+Jump to the next search match. +
+ +
+ +
+ + +
+ +

fn search_prev

+ +
fn search_prev(_: ActionApi) -> Action
+
+
+ +
+ +
+Jump to the previous search match. +
+ +
+ +
+ + +
+ +

fn select_current_tabs

+ +
fn select_current_tabs(_: ActionApi, index: int) -> Action
+
+
+ +
+ +
+Select a tab by index in the currently focused tabs node. +
+ +
+ +
+ + +
+ +

fn select_move_down

+ +
fn select_move_down(_: ActionApi) -> Action
+
+
+ +
+ +
+Move the active selection down. +
+ +
+ +
+ + +
+ +

fn select_move_left

+ +
fn select_move_left(_: ActionApi) -> Action
+
+
+ +
+ +
+Move the active selection left. +
+ +
+ +
+ + +
+ +

fn select_move_right

+ +
fn select_move_right(_: ActionApi) -> Action
+
+
+ +
+ +
+Move the active selection right. +
+ +
+ +
+ + +
+ +

fn select_move_up

+ +
fn select_move_up(_: ActionApi) -> Action
+
+
+ +
+ +
+Move the active selection up. +
+ +
+ +
+ + +
+ +

fn select_tab

+ +
fn select_tab(_: ActionApi, tabs_node_id: int, index: int) -> Action
+
+
+ +
+ +
+Select a tab by index in a specific tabs node. +
+ +
+ +
+ + +
+ +

fn send_bytes

+ +
fn send_bytes(_: ActionApi, buffer_id: int, bytes: String) -> Action
+fn send_bytes(_: ActionApi, buffer_id: int, bytes: Array) -> Action
+
+
+ +
+ +
+Send a string of bytes to a specific buffer. +
+ +
+ +
+ + +
+ +

fn send_bytes_current

+ +
fn send_bytes_current(_: ActionApi, bytes: String) -> Action
+fn send_bytes_current(_: ActionApi, bytes: Array) -> Action
+
+
+ +
+ +
+Send a string of bytes to the focused buffer. +
+ +
+ +
+ + +
+ +

fn send_keys

+ +
fn send_keys(_: ActionApi, buffer_id: int, notation: String) -> Action
+
+
+ +
+ +
+Send a key notation sequence to a specific buffer. +
+ +
+ +
+ + +
+ +

fn send_keys_current

+ +
fn send_keys_current(_: ActionApi, notation: String) -> Action
+
+
+ +
+ +
+Send a key notation sequence to the focused buffer. +
+ +
+ +
+ + +
+ +

fn split_with

+ +
fn split_with(_: ActionApi, direction: String, tree: TreeSpec) -> Action
+
+
+ +
+ +
+Split the current node and attach the provided tree as the new sibling. +
+ +
+ +
+ + +
+ +

fn toggle_mode

+ +
fn toggle_mode(_: ActionApi, mode: String) -> Action
+
+
+ +
+ +
+Toggle a named input mode. +
+ +
+ +
+ + +
+ +

fn yank_selection

+ +
fn yank_selection(_: ActionApi) -> Action
+
+
+ +
+ +
+Copy the current selection into the clipboard. +
+ +
+ +
+ + + +
+ + +
+
+ + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + diff --git a/docs/config-api-book/registration-globals.html b/docs/config-api-book/registration-globals.html new file mode 100644 index 0000000..b9bad47 --- /dev/null +++ b/docs/config-api-book/registration-globals.html @@ -0,0 +1,387 @@ + + + + + + Registration Globals - Embers Config API + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+
+

Keyboard shortcuts

+
+

Press or to navigate between chapters

+

Press S or / to search in the book

+

Press ? to show this help

+

Press Esc to hide this help

+
+
+
+
+ + + + + + + + + + + + + +
+ +
+
+ + + + + + + +
+
+

Registration Globals

+

Namespace: global

+
+ +

fn bind

+ +
fn bind(mode: String, notation: String, action: Action)
+fn bind(mode: String, notation: String, action_name: String)
+fn bind(mode: String, notation: String, actions: Array)
+
+
+ + +
+ +
+Bind a key notation to an [`Action`], a string action name, or an array of actions. +

Use the Action overload for inline builders such as action.focus_left(), the string +overload for a named action registered with define_action, or an array to chain multiple +actions in sequence.

+
+ + + +
+ +
+ + +
+ +

fn define_action

+ +
fn define_action(name: String, callback: FnPtr)
+
+
+ +
+ +
+Register a function pointer as a named action callable from bindings. +
+ +
+ +
+ + +
+ +

fn define_mode

+ +
fn define_mode(mode_name: String)
+fn define_mode(mode_name: String, options: Map)
+
+
+ +
+ +
+Define a custom input mode with hooks and fallback options. +

Supported options are fallback, on_enter, and on_leave.

+
+ +
+ +
+ + +
+ +

fn on

+ +
fn on(event_name: String, callback: FnPtr)
+
+
+ +
+ +
+Attach a callback to an emitted event such as `buffer_bell`. +
+ +
+ +
+ + +
+ +

fn set_leader

+ +
fn set_leader(notation: String)
+
+
+ + +
+ +
+Set the leader sequence used in binding notations. +
+ + + +
+ +
+ + +
+ +

fn unbind

+ +
fn unbind(mode: String, notation: String)
+
+
+ +
+ +
+Remove a previously bound key sequence. +
+ +
+ +
+ + + +
+ + +
+
+ + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + diff --git a/docs/config-api-book/registration-system.html b/docs/config-api-book/registration-system.html new file mode 100644 index 0000000..e7becb7 --- /dev/null +++ b/docs/config-api-book/registration-system.html @@ -0,0 +1,303 @@ + + + + + + System (Registration) - Embers Config API + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+
+

Keyboard shortcuts

+
+

Press or to navigate between chapters

+

Press S or / to search in the book

+

Press ? to show this help

+

Press Esc to hide this help

+
+
+
+
+ + + + + + + + + + + + + +
+ +
+
+ + + + + + + +
+
+

System (Registration)

+

Namespace: global

+
+ +

fn env

+ +
fn env(_: SystemApi, name: String) -> ?
+
+
+ +
+ +
+Read an environment variable, if it is set. +

ReturnType: string | ()

+
+ +
+ +
+ + +
+ +

fn now

+ +
fn now(_: SystemApi) -> int
+
+
+ +
+ +
+Return the current Unix timestamp in seconds. +
+ +
+ +
+ + +
+ +

fn which

+ +
fn which(_: SystemApi, name: String) -> ?
+
+
+ +
+ +
+Resolve an executable from `PATH`, if it is found. +

ReturnType: string | ()

+
+ +
+ +
+ + + +
+ + +
+
+ + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + diff --git a/docs/config-api-book/registration-tree.html b/docs/config-api-book/registration-tree.html new file mode 100644 index 0000000..af169a6 --- /dev/null +++ b/docs/config-api-book/registration-tree.html @@ -0,0 +1,502 @@ + + + + + + Tree (Registration) - Embers Config API + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+
+

Keyboard shortcuts

+
+

Press or to navigate between chapters

+

Press S or / to search in the book

+

Press ? to show this help

+

Press Esc to hide this help

+
+
+
+
+ + + + + + + + + + + + + +
+ +
+
+ + + + + + + +
+
+

Tree (Registration)

+

Namespace: global

+
+ +

fn buffer_attach

+ +
fn buffer_attach(_: TreeApi, buffer_id: int) -> TreeSpec
+
+
+ +
+ +
+Attach an existing buffer by id. +
+ +
+ +
+ + +
+ +

fn buffer_current

+ +
fn buffer_current(_: TreeApi) -> TreeSpec
+
+
+ +
+ +
+Build a tree reference to the currently focused buffer. +
+ +
+ +
+ + +
+ +

fn buffer_empty

+ +
fn buffer_empty(_: TreeApi) -> TreeSpec
+
+
+ +
+ +
+Build an empty buffer tree node. +
+ +
+ +
+ + +
+ +

fn buffer_spawn

+ +
fn buffer_spawn(_: TreeApi, command: Array) -> TreeSpec
+fn buffer_spawn(_: TreeApi, command: Array, options: Map) -> TreeSpec
+
+
+ + +
+ +
+Spawn a new buffer from a command array. +

Supported options keys are title (string), cwd (string), and env +(map<string, string>). Unknown keys are rejected.

+
+ + + +
+ +
+ + +
+ +

fn current_buffer

+ +
fn current_buffer(_: TreeApi) -> TreeSpec
+
+
+ +
+ +
+Build a tree reference to the currently focused buffer. +
+ +
+ +
+ + +
+ +

fn current_node

+ +
fn current_node(_: TreeApi) -> TreeSpec
+
+
+ +
+ +
+Build a tree reference to the currently focused node. +
+ +
+ +
+ + +
+ +

fn split

+ +
fn split(_: TreeApi, direction: String, children: Array) -> TreeSpec
+fn split(_: TreeApi, direction: String, children: Array, sizes: Array) -> TreeSpec
+
+
+ +
+ +
+Build a split with an explicit direction string. +
+ +
+ +
+ + +
+ +

fn split_h

+ +
fn split_h(_: TreeApi, children: Array) -> TreeSpec
+
+
+ +
+ +
+Build a horizontal split. +
+ +
+ +
+ + +
+ +

fn split_v

+ +
fn split_v(_: TreeApi, children: Array) -> TreeSpec
+
+
+ +
+ +
+Build a vertical split. +
+ +
+ +
+ + +
+ +

fn tab

+ +
fn tab(_: TreeApi, title: String, tree: TreeSpec) -> TabSpec
+
+
+ +
+ +
+Build a single tab specification. +
+ +
+ +
+ + +
+ +

fn tabs

+ +
fn tabs(_: TreeApi, tabs: Array) -> TreeSpec
+
+
+ +
+ +
+Build a tabs container with the first tab active. +
+ +
+ +
+ + +
+ +

fn tabs_with_active

+ +
fn tabs_with_active(_: TreeApi, tabs: Array, active: int) -> TreeSpec
+
+
+ +
+ +
+Build a tabs container with an explicit active tab. +
+ +
+ +
+ + + +
+ + +
+
+ + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + diff --git a/docs/config-api-book/registration-ui.html b/docs/config-api-book/registration-ui.html new file mode 100644 index 0000000..6571913 --- /dev/null +++ b/docs/config-api-book/registration-ui.html @@ -0,0 +1,283 @@ + + + + + + UI (Registration) - Embers Config API + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+
+

Keyboard shortcuts

+
+

Press or to navigate between chapters

+

Press S or / to search in the book

+

Press ? to show this help

+

Press Esc to hide this help

+
+
+
+
+ + + + + + + + + + + + + +
+ +
+
+ + + + + + + +
+
+

UI (Registration)

+

Namespace: global

+
+ +

fn bar

+ +
fn bar(_: UiApi, left: Array, center: Array, right: Array) -> BarSpec
+
+
+ +
+ +
+Build a full bar specification from left, center, and right segments. +
+ +
+ +
+ + +
+ +

fn segment

+ +
fn segment(_: UiApi, text: String) -> BarSegment
+fn segment(_: UiApi, text: String, options: Map) -> BarSegment
+
+
+ +
+ +
+Create a [`BarSegment`] from a [`UiApi`] receiver and text using default styling. +

segment(_: UiApi, text: String) -> BarSegment produces plain text with default +[StyleSpec] values and no click target.

+
+ +
+ +
+ + + +
+ + +
+
+ + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + diff --git a/docs/config-api-book/runtime-theme.html b/docs/config-api-book/runtime-theme.html new file mode 100644 index 0000000..1cd53c3 --- /dev/null +++ b/docs/config-api-book/runtime-theme.html @@ -0,0 +1,254 @@ + + + + + + Runtime Theme - Embers Config API + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+
+

Keyboard shortcuts

+
+

Press or to navigate between chapters

+

Press S or / to search in the book

+

Press ? to show this help

+

Press Esc to hide this help

+
+
+
+
+ + + + + + + + + + + + + +
+ +
+
+ + + + + + + +
+
+

Runtime Theme

+

Namespace: global

+
+ +

fn color

+ +
fn color(theme: ThemeRuntimeApi, name: String) -> ?
+
+
+ +
+ +
+Read a named color from the active runtime palette, if it exists. +

ReturnType: RgbColor | ()

+
+ +
+ +
+ + + +
+ + +
+
+ + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + diff --git a/docs/config-api-book/searcher-c2a407aa.js b/docs/config-api-book/searcher-c2a407aa.js new file mode 100644 index 0000000..5e5cb97 --- /dev/null +++ b/docs/config-api-book/searcher-c2a407aa.js @@ -0,0 +1,555 @@ +'use strict'; + +/* global Mark, elasticlunr, path_to_root */ + +window.search = window.search || {}; +(function search() { + // Search functionality + // + // You can use !hasFocus() to prevent keyhandling in your key + // event handlers while the user is typing their search. + + if (!Mark || !elasticlunr) { + return; + } + + // eslint-disable-next-line max-len + // IE 11 Compatibility from https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String/startsWith + if (!String.prototype.startsWith) { + String.prototype.startsWith = function(search, pos) { + return this.substr(!pos || pos < 0 ? 0 : +pos, search.length) === search; + }; + } + + const search_wrap = document.getElementById('mdbook-search-wrapper'), + searchbar_outer = document.getElementById('mdbook-searchbar-outer'), + searchbar = document.getElementById('mdbook-searchbar'), + searchresults = document.getElementById('mdbook-searchresults'), + searchresults_outer = document.getElementById('mdbook-searchresults-outer'), + searchresults_header = document.getElementById('mdbook-searchresults-header'), + searchicon = document.getElementById('mdbook-search-toggle'), + content = document.getElementById('mdbook-content'), + + // SVG text elements don't render if inside a tag. + mark_exclude = ['text'], + marker = new Mark(content), + URL_SEARCH_PARAM = 'search', + URL_MARK_PARAM = 'highlight'; + + let current_searchterm = '', + doc_urls = [], + search_options = { + bool: 'AND', + expand: true, + fields: { + title: {boost: 1}, + body: {boost: 1}, + breadcrumbs: {boost: 0}, + }, + }, + searchindex = null, + results_options = { + teaser_word_count: 30, + limit_results: 30, + }, + teaser_count = 0; + + function hasFocus() { + return searchbar === document.activeElement; + } + + function removeChildren(elem) { + while (elem.firstChild) { + elem.removeChild(elem.firstChild); + } + } + + // Helper to parse a url into its building blocks. + function parseURL(url) { + const a = document.createElement('a'); + a.href = url; + return { + source: url, + protocol: a.protocol.replace(':', ''), + host: a.hostname, + port: a.port, + params: (function() { + const ret = {}; + const seg = a.search.replace(/^\?/, '').split('&'); + for (const part of seg) { + if (!part) { + continue; + } + const s = part.split('='); + ret[s[0]] = s[1]; + } + return ret; + })(), + file: (a.pathname.match(/\/([^/?#]+)$/i) || ['', ''])[1], + hash: a.hash.replace('#', ''), + path: a.pathname.replace(/^([^/])/, '/$1'), + }; + } + + // Helper to recreate a url string from its building blocks. + function renderURL(urlobject) { + let url = urlobject.protocol + '://' + urlobject.host; + if (urlobject.port !== '') { + url += ':' + urlobject.port; + } + url += urlobject.path; + let joiner = '?'; + for (const prop in urlobject.params) { + if (Object.prototype.hasOwnProperty.call(urlobject.params, prop)) { + url += joiner + prop + '=' + urlobject.params[prop]; + joiner = '&'; + } + } + if (urlobject.hash !== '') { + url += '#' + urlobject.hash; + } + return url; + } + + // Helper to escape html special chars for displaying the teasers + const escapeHTML = (function() { + const MAP = { + '&': '&', + '<': '<', + '>': '>', + '"': '"', + '\'': ''', + }; + const repl = function(c) { + return MAP[c]; + }; + return function(s) { + return s.replace(/[&<>'"]/g, repl); + }; + })(); + + function formatSearchMetric(count, searchterm) { + if (count === 1) { + return count + ' search result for \'' + searchterm + '\':'; + } else if (count === 0) { + return 'No search results for \'' + searchterm + '\'.'; + } else { + return count + ' search results for \'' + searchterm + '\':'; + } + } + + function formatSearchResult(result, searchterms) { + const teaser = makeTeaser(escapeHTML(result.doc.body), searchterms); + teaser_count++; + + // The ?URL_MARK_PARAM= parameter belongs inbetween the page and the #heading-anchor + const url = doc_urls[result.ref].split('#'); + if (url.length === 1) { // no anchor found + url.push(''); + } + + // encodeURIComponent escapes all chars that could allow an XSS except + // for '. Due to that we also manually replace ' with its url-encoded + // representation (%27). + const encoded_search = encodeURIComponent(searchterms.join(' ')).replace(/'/g, '%27'); + + return '' + + result.doc.breadcrumbs + '' + + '' + teaser + ''; + } + + function makeTeaser(body, searchterms) { + // The strategy is as follows: + // First, assign a value to each word in the document: + // Words that correspond to search terms (stemmer aware): 40 + // Normal words: 2 + // First word in a sentence: 8 + // Then use a sliding window with a constant number of words and count the + // sum of the values of the words within the window. Then use the window that got the + // maximum sum. If there are multiple maximas, then get the last one. + // Enclose the terms in . + const stemmed_searchterms = searchterms.map(function(w) { + return elasticlunr.stemmer(w.toLowerCase()); + }); + const searchterm_weight = 40; + const weighted = []; // contains elements of ["word", weight, index_in_document] + // split in sentences, then words + const sentences = body.toLowerCase().split('. '); + let index = 0; + let value = 0; + let searchterm_found = false; + for (const sentenceindex in sentences) { + const words = sentences[sentenceindex].split(' '); + value = 8; + for (const wordindex in words) { + const word = words[wordindex]; + if (word.length > 0) { + for (const searchtermindex in stemmed_searchterms) { + if (elasticlunr.stemmer(word).startsWith( + stemmed_searchterms[searchtermindex]) + ) { + value = searchterm_weight; + searchterm_found = true; + } + } + weighted.push([word, value, index]); + value = 2; + } + index += word.length; + index += 1; // ' ' or '.' if last word in sentence + } + index += 1; // because we split at a two-char boundary '. ' + } + + if (weighted.length === 0) { + return body; + } + + const window_weight = []; + const window_size = Math.min(weighted.length, results_options.teaser_word_count); + + let cur_sum = 0; + for (let wordindex = 0; wordindex < window_size; wordindex++) { + cur_sum += weighted[wordindex][1]; + } + window_weight.push(cur_sum); + for (let wordindex = 0; wordindex < weighted.length - window_size; wordindex++) { + cur_sum -= weighted[wordindex][1]; + cur_sum += weighted[wordindex + window_size][1]; + window_weight.push(cur_sum); + } + + let max_sum_window_index = 0; + if (searchterm_found) { + let max_sum = 0; + // backwards + for (let i = window_weight.length - 1; i >= 0; i--) { + if (window_weight[i] > max_sum) { + max_sum = window_weight[i]; + max_sum_window_index = i; + } + } + } else { + max_sum_window_index = 0; + } + + // add around searchterms + const teaser_split = []; + index = weighted[max_sum_window_index][2]; + for (let i = max_sum_window_index; i < max_sum_window_index + window_size; i++) { + const word = weighted[i]; + if (index < word[2]) { + // missing text from index to start of `word` + teaser_split.push(body.substring(index, word[2])); + index = word[2]; + } + if (word[1] === searchterm_weight) { + teaser_split.push(''); + } + index = word[2] + word[0].length; + teaser_split.push(body.substring(word[2], index)); + if (word[1] === searchterm_weight) { + teaser_split.push(''); + } + } + + return teaser_split.join(''); + } + + function init(config) { + results_options = config.results_options; + search_options = config.search_options; + doc_urls = config.doc_urls; + searchindex = elasticlunr.Index.load(config.index); + + searchbar_outer.classList.remove('searching'); + + searchbar.focus(); + + const searchterm = searchbar.value.trim(); + if (searchterm !== '') { + searchbar.classList.add('active'); + doSearch(searchterm); + } + } + + function initSearchInteractions(config) { + // Set up events + searchicon.addEventListener('click', () => { + searchIconClickHandler(); + }, false); + searchbar.addEventListener('keyup', () => { + searchbarKeyUpHandler(); + }, false); + document.addEventListener('keydown', e => { + globalKeyHandler(e); + }, false); + // If the user uses the browser buttons, do the same as if a reload happened + window.onpopstate = () => { + doSearchOrMarkFromUrl(); + }; + // Suppress "submit" events so the page doesn't reload when the user presses Enter + document.addEventListener('submit', e => { + e.preventDefault(); + }, false); + + // If reloaded, do the search or mark again, depending on the current url parameters + doSearchOrMarkFromUrl(); + + // Exported functions + config.hasFocus = hasFocus; + } + + initSearchInteractions(window.search); + + function unfocusSearchbar() { + // hacky, but just focusing a div only works once + const tmp = document.createElement('input'); + tmp.setAttribute('style', 'position: absolute; opacity: 0;'); + searchicon.appendChild(tmp); + tmp.focus(); + tmp.remove(); + } + + // On reload or browser history backwards/forwards events, parse the url and do search or mark + function doSearchOrMarkFromUrl() { + // Check current URL for search request + const url = parseURL(window.location.href); + if (Object.prototype.hasOwnProperty.call(url.params, URL_SEARCH_PARAM) + && url.params[URL_SEARCH_PARAM] !== '') { + showSearch(true); + searchbar.value = decodeURIComponent( + (url.params[URL_SEARCH_PARAM] + '').replace(/\+/g, '%20')); + searchbarKeyUpHandler(); // -> doSearch() + } else { + showSearch(false); + } + + if (Object.prototype.hasOwnProperty.call(url.params, URL_MARK_PARAM)) { + const words = decodeURIComponent(url.params[URL_MARK_PARAM]).split(' '); + marker.mark(words, { + exclude: mark_exclude, + }); + + const markers = document.querySelectorAll('mark'); + const hide = () => { + for (let i = 0; i < markers.length; i++) { + markers[i].classList.add('fade-out'); + window.setTimeout(() => { + marker.unmark(); + }, 300); + } + }; + + for (let i = 0; i < markers.length; i++) { + markers[i].addEventListener('click', hide); + } + } + } + + // Eventhandler for keyevents on `document` + function globalKeyHandler(e) { + if (e.altKey || + e.ctrlKey || + e.metaKey || + e.shiftKey || + e.target.type === 'textarea' || + e.target.type === 'text' || + !hasFocus() && /^(?:input|select|textarea)$/i.test(e.target.nodeName) + ) { + return; + } + + if (e.key === 'Escape') { + e.preventDefault(); + searchbar.classList.remove('active'); + setSearchUrlParameters('', + searchbar.value.trim() !== '' ? 'push' : 'replace'); + if (hasFocus()) { + unfocusSearchbar(); + } + showSearch(false); + marker.unmark(); + } else if (!hasFocus() && (e.key === 's' || e.key === '/')) { + e.preventDefault(); + showSearch(true); + window.scrollTo(0, 0); + searchbar.select(); + } else if (hasFocus() && (e.key === 'ArrowDown' + || e.key === 'Enter')) { + e.preventDefault(); + const first = searchresults.firstElementChild; + if (first !== null) { + unfocusSearchbar(); + first.classList.add('focus'); + if (e.key === 'Enter') { + window.location.assign(first.querySelector('a')); + } + } + } else if (!hasFocus() && (e.key === 'ArrowDown' + || e.key === 'ArrowUp' + || e.key === 'Enter')) { + // not `:focus` because browser does annoying scrolling + const focused = searchresults.querySelector('li.focus'); + if (!focused) { + return; + } + e.preventDefault(); + if (e.key === 'ArrowDown') { + const next = focused.nextElementSibling; + if (next) { + focused.classList.remove('focus'); + next.classList.add('focus'); + } + } else if (e.key === 'ArrowUp') { + focused.classList.remove('focus'); + const prev = focused.previousElementSibling; + if (prev) { + prev.classList.add('focus'); + } else { + searchbar.select(); + } + } else { // Enter + window.location.assign(focused.querySelector('a')); + } + } + } + + function loadSearchScript(url, id) { + if (document.getElementById(id)) { + return; + } + searchbar_outer.classList.add('searching'); + + const script = document.createElement('script'); + script.src = url; + script.id = id; + script.onload = () => init(window.search); + script.onerror = error => { + console.error(`Failed to load \`${url}\`: ${error}`); + }; + document.head.append(script); + } + + function showSearch(yes) { + if (yes) { + loadSearchScript( + window.path_to_searchindex_js || + path_to_root + 'searchindex-72423136.js', + 'mdbook-search-index'); + search_wrap.classList.remove('hidden'); + searchicon.setAttribute('aria-expanded', 'true'); + } else { + search_wrap.classList.add('hidden'); + searchicon.setAttribute('aria-expanded', 'false'); + const results = searchresults.children; + for (let i = 0; i < results.length; i++) { + results[i].classList.remove('focus'); + } + } + } + + function showResults(yes) { + if (yes) { + searchresults_outer.classList.remove('hidden'); + } else { + searchresults_outer.classList.add('hidden'); + } + } + + // Eventhandler for search icon + function searchIconClickHandler() { + if (search_wrap.classList.contains('hidden')) { + showSearch(true); + window.scrollTo(0, 0); + searchbar.select(); + } else { + showSearch(false); + } + } + + // Eventhandler for keyevents while the searchbar is focused + function searchbarKeyUpHandler() { + const searchterm = searchbar.value.trim(); + if (searchterm !== '') { + searchbar.classList.add('active'); + doSearch(searchterm); + } else { + searchbar.classList.remove('active'); + showResults(false); + removeChildren(searchresults); + } + + setSearchUrlParameters(searchterm, 'push_if_new_search_else_replace'); + + // Remove marks + marker.unmark(); + } + + // Update current url with ?URL_SEARCH_PARAM= parameter, remove ?URL_MARK_PARAM and + // `#heading-anchor`. `action` can be one of "push", "replace", + // "push_if_new_search_else_replace" and replaces or pushes a new browser history item. + // "push_if_new_search_else_replace" pushes if there is no `?URL_SEARCH_PARAM=abc` yet. + function setSearchUrlParameters(searchterm, action) { + const url = parseURL(window.location.href); + const first_search = !Object.prototype.hasOwnProperty.call(url.params, URL_SEARCH_PARAM); + + if (searchterm !== '' || action === 'push_if_new_search_else_replace') { + url.params[URL_SEARCH_PARAM] = searchterm; + delete url.params[URL_MARK_PARAM]; + url.hash = ''; + } else { + delete url.params[URL_MARK_PARAM]; + delete url.params[URL_SEARCH_PARAM]; + } + // A new search will also add a new history item, so the user can go back + // to the page prior to searching. A updated search term will only replace + // the url. + if (action === 'push' || action === 'push_if_new_search_else_replace' && first_search ) { + history.pushState({}, document.title, renderURL(url)); + } else if (action === 'replace' || + action === 'push_if_new_search_else_replace' && + !first_search + ) { + history.replaceState({}, document.title, renderURL(url)); + } + } + + function doSearch(searchterm) { + // Don't search the same twice + if (current_searchterm === searchterm) { + return; + } + searchbar_outer.classList.add('searching'); + if (searchindex === null) { + return; + } + + current_searchterm = searchterm; + + // Do the actual search + const results = searchindex.search(searchterm, search_options); + const resultcount = Math.min(results.length, results_options.limit_results); + + // Display search metrics + searchresults_header.innerText = formatSearchMetric(resultcount, searchterm); + + // Clear and insert results + const searchterms = searchterm.split(' '); + removeChildren(searchresults); + for (let i = 0; i < resultcount ; i++) { + const resultElem = document.createElement('li'); + resultElem.innerHTML = formatSearchResult(results[i], searchterms); + searchresults.appendChild(resultElem); + } + + // Display results + showResults(true); + searchbar_outer.classList.remove('searching'); + } + + // Exported functions + search.hasFocus = hasFocus; +})(window.search); diff --git a/docs/config-api-book/searchindex-72423136.js b/docs/config-api-book/searchindex-72423136.js new file mode 100644 index 0000000..bfa667b --- /dev/null +++ b/docs/config-api-book/searchindex-72423136.js @@ -0,0 +1 @@ +window.search = Object.assign(window.search, JSON.parse('{"doc_urls":["index.html#embers-config-api","index.html#pages","index.html#definitions","index.html#example","example.html#example","registration-globals.html#registration-globals","registration-action.html#action-registration","registration-tree.html#tree-registration","registration-system.html#system-registration","registration-ui.html#ui-registration","mouse.html#mouse","theme.html#theme","tabbar.html#tabbar","action.html#action","tree.html#tree","context.html#context","mux.html#mux","event-info.html#eventinfo","session-ref.html#sessionref","buffer-ref.html#bufferref","node-ref.html#noderef","floating-ref.html#floatingref","tab-bar-context.html#tabbarcontext","tab-info.html#tabinfo","system-runtime.html#system","ui.html#ui","runtime-theme.html#runtime-theme"],"index":{"documentStore":{"docInfo":{"0":{"body":41,"breadcrumbs":4,"title":3},"1":{"body":37,"breadcrumbs":2,"title":1},"10":{"body":55,"breadcrumbs":6,"title":1},"11":{"body":15,"breadcrumbs":3,"title":1},"12":{"body":16,"breadcrumbs":3,"title":1},"13":{"body":918,"breadcrumbs":65,"title":1},"14":{"body":202,"breadcrumbs":14,"title":1},"15":{"body":165,"breadcrumbs":14,"title":1},"16":{"body":136,"breadcrumbs":12,"title":1},"17":{"body":64,"breadcrumbs":7,"title":1},"18":{"body":48,"breadcrumbs":6,"title":1},"19":{"body":230,"breadcrumbs":20,"title":1},"2":{"body":2,"breadcrumbs":2,"title":1},"20":{"body":178,"breadcrumbs":17,"title":1},"21":{"body":78,"breadcrumbs":9,"title":1},"22":{"body":75,"breadcrumbs":8,"title":1},"23":{"body":70,"breadcrumbs":8,"title":1},"24":{"body":41,"breadcrumbs":5,"title":1},"25":{"body":61,"breadcrumbs":4,"title":1},"26":{"body":19,"breadcrumbs":6,"title":2},"3":{"body":1,"breadcrumbs":2,"title":1},"4":{"body":50,"breadcrumbs":2,"title":1},"5":{"body":136,"breadcrumbs":16,"title":2},"6":{"body":918,"breadcrumbs":130,"title":2},"7":{"body":202,"breadcrumbs":28,"title":2},"8":{"body":41,"breadcrumbs":10,"title":2},"9":{"body":61,"breadcrumbs":8,"title":2}},"docs":{"0":{"body":"This reference is generated from the Rust-backed Rhai exports used by Embers. There are two execution phases: registration time: the top-level config file where you declare modes, bindings, named actions, and visual settings runtime: named actions, event handlers, and tab bar formatters that run against live client state Definition files live in defs/.","breadcrumbs":"Overview » Embers Config API","id":"0","title":"Embers Config API"},"1":{"body":"action buffer-ref context event-info floating-ref mouse mux node-ref registration-action registration-globals registration-system registration-tree registration-ui runtime-theme session-ref system-runtime tab-bar-context tab-info tabbar theme tree ui","breadcrumbs":"Overview » Pages","id":"1","title":"Pages"},"10":{"body":"Namespace: global fn set_click_focus fn set_click_focus(mouse: MouseApi, value: bool) Description Toggle focus-on-click behavior. fn set_click_forward fn set_click_forward(mouse: MouseApi, value: bool) Description Toggle forwarding mouse clicks into the focused buffer. fn set_wheel_forward fn set_wheel_forward(mouse: MouseApi, value: bool) Description Toggle wheel event forwarding into the focused buffer. fn set_wheel_scroll fn set_wheel_scroll(mouse: MouseApi, value: bool) Description Toggle client-side wheel scrolling.","breadcrumbs":"Mouse » Mouse » Mouse » Mouse » Mouse » Mouse","id":"10","title":"Mouse"},"11":{"body":"Namespace: global fn set_palette fn set_palette(theme: ThemeApi, palette: Map) Description Add named colors to the theme palette.","breadcrumbs":"Theme » Theme » Theme","id":"11","title":"Theme"},"12":{"body":"Namespace: global fn set_formatter fn set_formatter(tabbar: TabbarApi, callback: FnPtr) Description Register the function used to format the tab bar.","breadcrumbs":"Tabbar » Tabbar » Tabbar","id":"12","title":"Tabbar"},"13":{"body":"Namespace: global fn cancel_search fn cancel_search(_: ActionApi) -> Action Description Cancel the active search. fn cancel_selection fn cancel_selection(_: ActionApi) -> Action Description Cancel the current selection. fn chain fn chain(_: ActionApi, actions: Array) -> Action Description Chain multiple actions into one composite action. fn clear_pending_keys fn clear_pending_keys(_: ActionApi) -> Action Description Clear any partially-entered key sequence. fn close_floating fn close_floating(_: ActionApi) -> Action Description Close the currently focused floating window. fn close_floating_id fn close_floating_id(_: ActionApi, floating_id: int) -> Action Description Close a floating window by id. fn close_node fn close_node(_: ActionApi, node_id: int) -> Action Description Close a view by node id. fn close_view fn close_view(_: ActionApi) -> Action Description Close the currently focused view. fn copy_selection fn copy_selection(_: ActionApi) -> Action Description Copy the current selection into the clipboard. fn detach_buffer fn detach_buffer(_: ActionApi) -> Action Description Detach the currently focused buffer. fn detach_buffer_id fn detach_buffer_id(_: ActionApi, buffer_id: int) -> Action Description Detach a buffer by id. fn enter_mode fn enter_mode(_: ActionApi, mode: String) -> Action Description Enter a specific input mode by name. fn enter_search_mode fn enter_search_mode(_: ActionApi) -> Action Description Enter incremental search mode. fn enter_select_block fn enter_select_block(_: ActionApi) -> Action Description Enter block selection mode. fn enter_select_char fn enter_select_char(_: ActionApi) -> Action Description Enter character selection mode. fn enter_select_line fn enter_select_line(_: ActionApi) -> Action Description Enter line selection mode. fn focus_buffer fn focus_buffer(_: ActionApi, buffer_id: int) -> Action Description Focus a specific buffer by id. fn focus_down fn focus_down(_: ActionApi) -> Action Description Focus the view below the current node. fn focus_left fn focus_left(_: ActionApi) -> Action Description Example Focus the view to the left of the current node. action.focus_left() fn focus_right fn focus_right(_: ActionApi) -> Action Description Focus the view to the right of the current node. fn focus_up fn focus_up(_: ActionApi) -> Action Description Focus the view above the current node. fn follow_output fn follow_output(_: ActionApi) -> Action Description Re-enable following live output. fn insert_tab_after fn insert_tab_after(_: ActionApi, tabs_node_id: int, title: String, tree: TreeSpec) -> Action Description Insert a tab after a specific tabs node. fn insert_tab_after_current fn insert_tab_after_current(_: ActionApi, title: String, tree: TreeSpec) -> Action Description Insert a tab after the current tab in the focused tabs node. fn insert_tab_before fn insert_tab_before(_: ActionApi, tabs_node_id: int, title: String, tree: TreeSpec) -> Action Description Insert a tab before a specific tabs node. fn insert_tab_before_current fn insert_tab_before_current(_: ActionApi, title: String, tree: TreeSpec) -> Action Description Insert a tab before the current tab. fn kill_buffer fn kill_buffer(_: ActionApi) -> Action Description Kill the currently focused buffer. fn kill_buffer_id fn kill_buffer_id(_: ActionApi, buffer_id: int) -> Action Description Kill a buffer by id. fn leave_mode fn leave_mode(_: ActionApi) -> Action Description Leave the active input mode. fn move_buffer_to_floating fn move_buffer_to_floating(_: ActionApi, buffer_id: int, options: Map) -> Action Description Options Move a buffer into a new floating window. x (i16): horizontal offset from the anchor (default: 0) y (i16): vertical offset from the anchor (default: 0) width (FloatingSize): window width, as a percentage (e.g., 50%) or pixel value (default: 50%) height (FloatingSize): window height, as a percentage or pixel value (default: 50%) anchor (FloatingAnchor): anchor point for positioning, e.g., “top_left”, “center” (default: center) title (Option): window title (default: none) focus (bool): whether to focus the window after creation (default: true) close_on_empty (bool): whether to close the window when its buffer empties (default: true) fn move_buffer_to_node fn move_buffer_to_node(_: ActionApi, buffer_id: int, node_id: int) -> Action Description Move a buffer into a specific node. fn next_current_tabs fn next_current_tabs(_: ActionApi) -> Action Description Select the next tab in the currently focused tabs node. fn next_tab fn next_tab(_: ActionApi, tabs_node_id: int) -> Action Description Select the next tab in a specific tabs node. fn noop fn noop(_: ActionApi) -> Action Description Build a no-op action. fn notify fn notify(_: ActionApi, level: String, message: String) -> Action Description Emit a client notification. fn open_floating fn open_floating(_: ActionApi, tree: TreeSpec, options: Map) -> Action Description Open a floating view around the provided tree. fn prev_current_tabs fn prev_current_tabs(_: ActionApi) -> Action Description Select the previous tab in the currently focused tabs node. fn prev_tab fn prev_tab(_: ActionApi, tabs_node_id: int) -> Action Description Select the previous tab in a specific tabs node. fn replace_current_with fn replace_current_with(_: ActionApi, tree: TreeSpec) -> Action Description Replace the focused node with a new tree. fn replace_node fn replace_node(_: ActionApi, node_id: int, tree: TreeSpec) -> Action Description Replace a specific node by id with a new tree. fn reveal_buffer fn reveal_buffer(_: ActionApi, buffer_id: int) -> Action Description Reveal a specific buffer by id. fn run_named_action fn run_named_action(_: ActionApi, name: String) -> Action Description Run another named action by name. fn scroll_line_down fn scroll_line_down(_: ActionApi) -> Action Description Scroll one line downward in local scrollback. fn scroll_line_up fn scroll_line_up(_: ActionApi) -> Action Description Scroll one line upward in local scrollback. fn scroll_page_down fn scroll_page_down(_: ActionApi) -> Action Description Scroll one page downward in local scrollback. fn scroll_page_up fn scroll_page_up(_: ActionApi) -> Action Description Scroll one page upward in local scrollback. fn scroll_to_bottom fn scroll_to_bottom(_: ActionApi) -> Action Description Scroll to the bottom of local scrollback. fn scroll_to_top fn scroll_to_top(_: ActionApi) -> Action Description Scroll to the top of local scrollback. fn search_next fn search_next(_: ActionApi) -> Action Description Jump to the next search match. fn search_prev fn search_prev(_: ActionApi) -> Action Description Jump to the previous search match. fn select_current_tabs fn select_current_tabs(_: ActionApi, index: int) -> Action Description Select a tab by index in the currently focused tabs node. fn select_move_down fn select_move_down(_: ActionApi) -> Action Description Move the active selection down. fn select_move_left fn select_move_left(_: ActionApi) -> Action Description Move the active selection left. fn select_move_right fn select_move_right(_: ActionApi) -> Action Description Move the active selection right. fn select_move_up fn select_move_up(_: ActionApi) -> Action Description Move the active selection up. fn select_tab fn select_tab(_: ActionApi, tabs_node_id: int, index: int) -> Action Description Select a tab by index in a specific tabs node. fn send_bytes fn send_bytes(_: ActionApi, buffer_id: int, bytes: String) -> Action\\nfn send_bytes(_: ActionApi, buffer_id: int, bytes: Array) -> Action Description Send a string of bytes to a specific buffer. fn send_bytes_current fn send_bytes_current(_: ActionApi, bytes: String) -> Action\\nfn send_bytes_current(_: ActionApi, bytes: Array) -> Action Description Send a string of bytes to the focused buffer. fn send_keys fn send_keys(_: ActionApi, buffer_id: int, notation: String) -> Action Description Send a key notation sequence to a specific buffer. fn send_keys_current fn send_keys_current(_: ActionApi, notation: String) -> Action Description Send a key notation sequence to the focused buffer. fn split_with fn split_with(_: ActionApi, direction: String, tree: TreeSpec) -> Action Description Split the current node and attach the provided tree as the new sibling. fn toggle_mode fn toggle_mode(_: ActionApi, mode: String) -> Action Description Toggle a named input mode. fn yank_selection fn yank_selection(_: ActionApi) -> Action Description Copy the current selection into the clipboard.","breadcrumbs":"Action » Action » Action » Action » Action » Action » Action » Action » Action » Action » Action » Action » Action » Action » Action » Action » Action » Action » Action » Action » Action » Action » Action » Action » Action » Action » Action » Action » Action » Action » Action » Action » Action » Action » Action » Action » Action » Action » Action » Action » Action » Action » Action » Action » Action » Action » Action » Action » Action » Action » Action » Action » Action » Action » Action » Action » Action » Action » Action » Action » Action » Action » Action » Action » Action","id":"13","title":"Action"},"14":{"body":"Namespace: global fn buffer_attach fn buffer_attach(_: TreeApi, buffer_id: int) -> TreeSpec Description Attach an existing buffer by id. fn buffer_current fn buffer_current(_: TreeApi) -> TreeSpec Description Build a tree reference to the currently focused buffer. fn buffer_empty fn buffer_empty(_: TreeApi) -> TreeSpec Description Build an empty buffer tree node. fn buffer_spawn fn buffer_spawn(_: TreeApi, command: Array) -> TreeSpec\\nfn buffer_spawn(_: TreeApi, command: Array, options: Map) -> TreeSpec Description Example Spawn a new buffer from a command array. Supported options keys are title ( string), cwd ( string), and env\\n( map). Unknown keys are rejected. tree.buffer_spawn([\\"/bin/zsh\\"], #{ title: \\"shell\\" }) fn current_buffer fn current_buffer(_: TreeApi) -> TreeSpec Description Build a tree reference to the currently focused buffer. fn current_node fn current_node(_: TreeApi) -> TreeSpec Description Build a tree reference to the currently focused node. fn split fn split(_: TreeApi, direction: String, children: Array) -> TreeSpec\\nfn split(_: TreeApi, direction: String, children: Array, sizes: Array) -> TreeSpec Description Build a split with an explicit direction string. fn split_h fn split_h(_: TreeApi, children: Array) -> TreeSpec Description Build a horizontal split. fn split_v fn split_v(_: TreeApi, children: Array) -> TreeSpec Description Build a vertical split. fn tab fn tab(_: TreeApi, title: String, tree: TreeSpec) -> TabSpec Description Build a single tab specification. fn tabs fn tabs(_: TreeApi, tabs: Array) -> TreeSpec Description Build a tabs container with the first tab active. fn tabs_with_active fn tabs_with_active(_: TreeApi, tabs: Array, active: int) -> TreeSpec Description Build a tabs container with an explicit active tab.","breadcrumbs":"Tree » Tree » Tree » Tree » Tree » Tree » Tree » Tree » Tree » Tree » Tree » Tree » Tree » Tree","id":"14","title":"Tree"},"15":{"body":"Namespace: global fn current_buffer fn current_buffer(context: Context) -> ? Description Example Return the currently focused buffer, if any. ReturnType: BufferRef | () let buffer = ctx.current_buffer();\\nif buffer != () { print(buffer.title());\\n} fn current_floating fn current_floating(context: Context) -> ? Description Return the currently focused floating window, if any. ReturnType: FloatingRef | () fn current_mode fn current_mode(context: Context) -> String Description Return the active input mode name. fn current_node fn current_node(context: Context) -> ? Description Return the currently focused node, if any. ReturnType: NodeRef | () fn current_session fn current_session(context: Context) -> ? Description Return the current session reference, if any. ReturnType: SessionRef | () fn detached_buffers fn detached_buffers(context: Context) -> Array Description Return detached buffers in the current model snapshot. fn event fn event(context: Context) -> ? Description Return the current event payload, if any. ReturnType: EventInfo | () fn find_buffer fn find_buffer(context: Context, buffer_id: int) -> ? Description Find a buffer by numeric id. Returns `()` when it does not exist. ReturnType: BufferRef | () fn find_floating fn find_floating(context: Context, floating_id: int) -> ? Description Find a floating window by numeric id. Returns `()` when it does not exist. ReturnType: FloatingRef | () fn find_node fn find_node(context: Context, node_id: int) -> ? Description Find a node by numeric id. Returns `()` when it does not exist. ReturnType: NodeRef | () fn sessions fn sessions(context: Context) -> Array Description Return every visible session. fn visible_buffers fn visible_buffers(context: Context) -> Array Description Return visible buffers in the current model snapshot.","breadcrumbs":"Context » Context » Context » Context » Context » Context » Context » Context » Context » Context » Context » Context » Context » Context","id":"15","title":"Context"},"16":{"body":"Namespace: global fn current_buffer fn current_buffer(mux: MuxApi) -> ? Description Return the currently focused buffer, if any. ReturnType: BufferRef | () fn current_floating fn current_floating(mux: MuxApi) -> ? Description Return the currently focused floating window, if any. ReturnType: FloatingRef | () fn current_node fn current_node(mux: MuxApi) -> ? Description Return the currently focused node, if any. ReturnType: NodeRef | () fn current_session fn current_session(mux: MuxApi) -> ? Description Return the current session reference, if any. ReturnType: SessionRef | () fn detached_buffers fn detached_buffers(mux: MuxApi) -> Array Description Return detached buffers in the current model snapshot. fn find_buffer fn find_buffer(mux: MuxApi, buffer_id: int) -> ? Description Find a buffer by numeric id. Returns `()` when it does not exist. ReturnType: BufferRef | () fn find_floating fn find_floating(mux: MuxApi, floating_id: int) -> ? Description Find a floating window by numeric id. Returns `()` when it does not exist. ReturnType: FloatingRef | () fn find_node fn find_node(mux: MuxApi, node_id: int) -> ? Description Find a node by numeric id. Returns `()` when it does not exist. ReturnType: NodeRef | () fn sessions fn sessions(mux: MuxApi) -> Array Description Return every visible session. fn visible_buffers fn visible_buffers(mux: MuxApi) -> Array Description Return visible buffers in the current model snapshot.","breadcrumbs":"Mux » Mux » Mux » Mux » Mux » Mux » Mux » Mux » Mux » Mux » Mux » Mux","id":"16","title":"Mux"},"17":{"body":"Namespace: global fn buffer_id fn buffer_id(event: EventInfo) -> ? Description Return the buffer id attached to an event, or `()`. ReturnType: int | () fn floating_id fn floating_id(event: EventInfo) -> ? Description Return the floating id attached to an event, or `()`. ReturnType: int | () fn name fn name(event: EventInfo) -> String Description Return the event name. fn node_id fn node_id(event: EventInfo) -> ? Description Return the node id attached to an event, or `()`. ReturnType: int | () fn session_id fn session_id(event: EventInfo) -> ? Description Return the session id attached to an event, or `()`. ReturnType: int | ()","breadcrumbs":"EventInfo » EventInfo » EventInfo » EventInfo » EventInfo » EventInfo » EventInfo","id":"17","title":"EventInfo"},"18":{"body":"Namespace: global fn floating fn floating(session: SessionRef) -> Array Description Return floating window ids attached to the session. fn id fn id(session: SessionRef) -> int Description Return the numeric session id. fn name fn name(session: SessionRef) -> String Description Return the session name. fn root_node fn root_node(session: SessionRef) -> int Description Return the root tabs node for the session.","breadcrumbs":"SessionRef » SessionRef » SessionRef » SessionRef » SessionRef » SessionRef","id":"18","title":"SessionRef"},"19":{"body":"Namespace: global fn activity fn activity(buffer: BufferRef) -> String Description Return the current activity state name. fn command fn command(buffer: BufferRef) -> Array Description Return the original command vector. fn cwd fn cwd(buffer: BufferRef) -> ? Description Return the working directory, if any. ReturnType: string | () fn env_hint fn env_hint(buffer: BufferRef, key: String) -> ? Description Look up a single environment hint captured on the buffer. ReturnType: string | () fn exit_code fn exit_code(buffer: BufferRef) -> ? Description Return the process exit code, if any. ReturnType: int | () fn history_text fn history_text(buffer: BufferRef) -> String Description Example Return the full captured history text for the buffer. let buffer = ctx.current_buffer();\\nif buffer != () { let history = buffer.history_text();\\n} fn id fn id(buffer: BufferRef) -> int Description Return the numeric buffer id. fn is_attached fn is_attached(buffer: BufferRef) -> bool Description Return whether the buffer is currently attached to a node. fn is_detached fn is_detached(buffer: BufferRef) -> bool Description Return whether the buffer has been detached. fn is_running fn is_running(buffer: BufferRef) -> bool Description Return whether the buffer process is still running. fn is_visible fn is_visible(buffer: BufferRef) -> bool Description Return whether the buffer is visible in the current presentation. fn node_id fn node_id(buffer: BufferRef) -> ? Description Return the attached node id, if any. ReturnType: int | () fn pid fn pid(buffer: BufferRef) -> ? Description Return the process id, if any. ReturnType: int | () fn process_name fn process_name(buffer: BufferRef) -> ? Description Return the detected process name, if any. ReturnType: string | () fn session_id fn session_id(buffer: BufferRef) -> ? Description Return the attached session id, if any. ReturnType: int | () fn snapshot_text fn snapshot_text(buffer: BufferRef, limit: int) -> String Description Return a text snapshot limited to the requested line count. fn title fn title(buffer: BufferRef) -> String Description Return the buffer title. fn tty_path fn tty_path(buffer: BufferRef) -> ? Description Return the controlling TTY path, if any. ReturnType: string | ()","breadcrumbs":"BufferRef » BufferRef » BufferRef » BufferRef » BufferRef » BufferRef » BufferRef » BufferRef » BufferRef » BufferRef » BufferRef » BufferRef » BufferRef » BufferRef » BufferRef » BufferRef » BufferRef » BufferRef » BufferRef » BufferRef","id":"19","title":"BufferRef"},"2":{"body":"registration.rhai runtime.rhai","breadcrumbs":"Overview » Definitions","id":"2","title":"Definitions"},"20":{"body":"Namespace: global fn active_tab_index fn active_tab_index(node: NodeRef) -> ? Description Return the active tab index, if any. ReturnType: int | () fn buffer fn buffer(node: NodeRef) -> ? Description Return the attached buffer id, if any. ReturnType: int | () fn children fn children(node: NodeRef) -> Array Description Return child node ids. fn geometry fn geometry(node: NodeRef) -> ? Description Return the geometry map, if any. ReturnType: Map | () fn id fn id(node: NodeRef) -> int Description Return the node id. fn is_floating_root fn is_floating_root(node: NodeRef) -> bool Description Return whether the node is the root of a floating window. fn is_focused fn is_focused(node: NodeRef) -> bool Description Return whether the node is focused. fn is_root fn is_root(node: NodeRef) -> bool Description Return whether the node is the session root. fn is_visible fn is_visible(node: NodeRef) -> bool Description Return whether the node is visible in the current presentation. fn kind fn kind(node: NodeRef) -> String Description Return the node kind such as `buffer_view`, `split`, or `tabs`. fn parent fn parent(node: NodeRef) -> ? Description Return the parent node id, if any. ReturnType: int | () fn session_id fn session_id(node: NodeRef) -> int Description Return the owning session id. fn split_direction fn split_direction(node: NodeRef) -> ? Description Return the split direction, if any. ReturnType: string | () fn split_weights fn split_weights(node: NodeRef) -> ? Description Return split weights, if any. ReturnType: Array | () fn tab_titles fn tab_titles(node: NodeRef) -> Array Description Return tab titles on a tabs node.","breadcrumbs":"NodeRef » NodeRef » NodeRef » NodeRef » NodeRef » NodeRef » NodeRef » NodeRef » NodeRef » NodeRef » NodeRef » NodeRef » NodeRef » NodeRef » NodeRef » NodeRef » NodeRef","id":"20","title":"NodeRef"},"21":{"body":"Namespace: global fn geometry fn geometry(floating: FloatingRef) -> Map Description Return the floating geometry map. fn id fn id(floating: FloatingRef) -> int Description Return the floating id. fn is_focused fn is_focused(floating: FloatingRef) -> bool Description Return whether the floating is focused. fn is_visible fn is_visible(floating: FloatingRef) -> bool Description Return whether the floating is visible. fn root_node fn root_node(floating: FloatingRef) -> int Description Return the root node id. fn session_id fn session_id(floating: FloatingRef) -> int Description Return the owning session id. fn title fn title(floating: FloatingRef) -> ? Description Return the floating title, if any. ReturnType: string | ()","breadcrumbs":"FloatingRef » FloatingRef » FloatingRef » FloatingRef » FloatingRef » FloatingRef » FloatingRef » FloatingRef » FloatingRef","id":"21","title":"FloatingRef"},"22":{"body":"Namespace: global fn active_index fn active_index(bar: TabBarContext) -> int Description Return the active tab index. fn is_root fn is_root(bar: TabBarContext) -> bool Description Return whether the formatted tabs are the root tabs. fn mode fn mode(bar: TabBarContext) -> String Description Return the formatter mode name. fn node_id fn node_id(bar: TabBarContext) -> int Description Return the tabs node id currently being formatted. fn tabs fn tabs(bar: TabBarContext) -> Array Description Return tab metadata used by the formatter. fn viewport_width fn viewport_width(bar: TabBarContext) -> int Description Return the formatter viewport width in cells.","breadcrumbs":"TabBarContext » TabBarContext » TabBarContext » TabBarContext » TabBarContext » TabBarContext » TabBarContext » TabBarContext","id":"22","title":"TabBarContext"},"23":{"body":"Namespace: global fn buffer_count fn buffer_count(tab: TabInfo) -> int Description Return how many buffers are attached to the tab. fn has_activity fn has_activity(tab: TabInfo) -> bool Description Return whether the tab has activity. fn has_bell fn has_bell(tab: TabInfo) -> bool Description Return whether the tab has a bell marker. fn index fn index(tab: TabInfo) -> int Description Return the zero-based tab index. fn is_active fn is_active(tab: TabInfo) -> bool Description Return whether the tab is active. fn title fn title(tab: TabInfo) -> String Description Return the tab title.","breadcrumbs":"TabInfo » TabInfo » TabInfo » TabInfo » TabInfo » TabInfo » TabInfo » TabInfo","id":"23","title":"TabInfo"},"24":{"body":"Namespace: global fn env fn env(_: SystemApi, name: String) -> ? Description Read an environment variable, if it is set. ReturnType: string | () fn now fn now(_: SystemApi) -> int Description Return the current Unix timestamp in seconds. fn which fn which(_: SystemApi, name: String) -> ? Description Resolve an executable from `PATH`, if it is found. ReturnType: string | ()","breadcrumbs":"System » System » System » System » System","id":"24","title":"System"},"25":{"body":"Namespace: global fn bar fn bar(_: UiApi, left: Array, center: Array, right: Array) -> BarSpec Description Build a full bar specification from left, center, and right segments. fn segment fn segment(_: UiApi, text: String) -> BarSegment\\nfn segment(_: UiApi, text: String, options: Map) -> BarSegment Description Create a [`BarSegment`] from a [`UiApi`] receiver and text using default styling. segment(_: UiApi, text: String) -> BarSegment produces plain text with default\\n[ StyleSpec] values and no click target.","breadcrumbs":"UI » UI » UI » UI","id":"25","title":"UI"},"26":{"body":"Namespace: global fn color fn color(theme: ThemeRuntimeApi, name: String) -> ? Description Read a named color from the active runtime palette, if it exists. ReturnType: RgbColor | ()","breadcrumbs":"Runtime Theme » Runtime Theme » Runtime Theme","id":"26","title":"Runtime Theme"},"3":{"body":"example.md","breadcrumbs":"Overview » Example","id":"3","title":"Example"},"4":{"body":"This is a trimmed example based on the repository fixture config. It shows the two main phases together. set_leader(\\"\\"); fn shell_tree(ctx) { tree.buffer_spawn( [\\"/bin/zsh\\"], #{ title: \\"shell\\", cwd: if ctx.current_buffer() == () { () } else { ctx.current_buffer().cwd() } } )\\n} fn split_below(ctx) { action.split_with(\\"horizontal\\", shell_tree(ctx))\\n} fn format_tabs(ctx) { let active = ctx.tabs()[ctx.active_index()]; ui.bar([ ui.segment(\\" \\" + active.title() + \\" \\", #{ fg: theme.color(\\"active_fg\\"), bg: theme.color(\\"active_bg\\") }) ], [], [])\\n} define_action(\\"split-below\\", split_below);\\nbind(\\"normal\\", \\"\\\\\\"\\", \\"split-below\\");\\ntheme.set_palette(#{ active_fg: \\"#303446\\", active_bg: \\"#c6d0f5\\"\\n});\\ntabbar.set_formatter(format_tabs);\\nmouse.set_click_focus(true);","breadcrumbs":"Example » Example","id":"4","title":"Example"},"5":{"body":"Namespace: global fn bind fn bind(mode: String, notation: String, action: Action)\\nfn bind(mode: String, notation: String, action_name: String)\\nfn bind(mode: String, notation: String, actions: Array) Description Example Bind a key notation to an [`Action`], a string action name, or an array of actions. Use the Action overload for inline builders such as action.focus_left(), the string\\noverload for a named action registered with define_action, or an array to chain multiple\\nactions in sequence. bind(\\"normal\\", \\"ws\\", \\"workspace-split\\"); fn define_action fn define_action(name: String, callback: FnPtr) Description Register a function pointer as a named action callable from bindings. fn define_mode fn define_mode(mode_name: String)\\nfn define_mode(mode_name: String, options: Map) Description Define a custom input mode with hooks and fallback options. Supported options are fallback, on_enter, and on_leave. fn on fn on(event_name: String, callback: FnPtr) Description Attach a callback to an emitted event such as `buffer_bell`. fn set_leader fn set_leader(notation: String) Description Example Set the leader sequence used in binding notations. set_leader(\\"\\"); fn unbind fn unbind(mode: String, notation: String) Description Remove a previously bound key sequence.","breadcrumbs":"Registration Globals » Registration Globals » Registration Globals » Registration Globals » Registration Globals » Registration Globals » Registration Globals » Registration Globals","id":"5","title":"Registration Globals"},"6":{"body":"Namespace: global fn cancel_search fn cancel_search(_: ActionApi) -> Action Description Cancel the active search. fn cancel_selection fn cancel_selection(_: ActionApi) -> Action Description Cancel the current selection. fn chain fn chain(_: ActionApi, actions: Array) -> Action Description Chain multiple actions into one composite action. fn clear_pending_keys fn clear_pending_keys(_: ActionApi) -> Action Description Clear any partially-entered key sequence. fn close_floating fn close_floating(_: ActionApi) -> Action Description Close the currently focused floating window. fn close_floating_id fn close_floating_id(_: ActionApi, floating_id: int) -> Action Description Close a floating window by id. fn close_node fn close_node(_: ActionApi, node_id: int) -> Action Description Close a view by node id. fn close_view fn close_view(_: ActionApi) -> Action Description Close the currently focused view. fn copy_selection fn copy_selection(_: ActionApi) -> Action Description Copy the current selection into the clipboard. fn detach_buffer fn detach_buffer(_: ActionApi) -> Action Description Detach the currently focused buffer. fn detach_buffer_id fn detach_buffer_id(_: ActionApi, buffer_id: int) -> Action Description Detach a buffer by id. fn enter_mode fn enter_mode(_: ActionApi, mode: String) -> Action Description Enter a specific input mode by name. fn enter_search_mode fn enter_search_mode(_: ActionApi) -> Action Description Enter incremental search mode. fn enter_select_block fn enter_select_block(_: ActionApi) -> Action Description Enter block selection mode. fn enter_select_char fn enter_select_char(_: ActionApi) -> Action Description Enter character selection mode. fn enter_select_line fn enter_select_line(_: ActionApi) -> Action Description Enter line selection mode. fn focus_buffer fn focus_buffer(_: ActionApi, buffer_id: int) -> Action Description Focus a specific buffer by id. fn focus_down fn focus_down(_: ActionApi) -> Action Description Focus the view below the current node. fn focus_left fn focus_left(_: ActionApi) -> Action Description Example Focus the view to the left of the current node. action.focus_left() fn focus_right fn focus_right(_: ActionApi) -> Action Description Focus the view to the right of the current node. fn focus_up fn focus_up(_: ActionApi) -> Action Description Focus the view above the current node. fn follow_output fn follow_output(_: ActionApi) -> Action Description Re-enable following live output. fn insert_tab_after fn insert_tab_after(_: ActionApi, tabs_node_id: int, title: String, tree: TreeSpec) -> Action Description Insert a tab after a specific tabs node. fn insert_tab_after_current fn insert_tab_after_current(_: ActionApi, title: String, tree: TreeSpec) -> Action Description Insert a tab after the current tab in the focused tabs node. fn insert_tab_before fn insert_tab_before(_: ActionApi, tabs_node_id: int, title: String, tree: TreeSpec) -> Action Description Insert a tab before a specific tabs node. fn insert_tab_before_current fn insert_tab_before_current(_: ActionApi, title: String, tree: TreeSpec) -> Action Description Insert a tab before the current tab. fn kill_buffer fn kill_buffer(_: ActionApi) -> Action Description Kill the currently focused buffer. fn kill_buffer_id fn kill_buffer_id(_: ActionApi, buffer_id: int) -> Action Description Kill a buffer by id. fn leave_mode fn leave_mode(_: ActionApi) -> Action Description Leave the active input mode. fn move_buffer_to_floating fn move_buffer_to_floating(_: ActionApi, buffer_id: int, options: Map) -> Action Description Options Move a buffer into a new floating window. x (i16): horizontal offset from the anchor (default: 0) y (i16): vertical offset from the anchor (default: 0) width (FloatingSize): window width, as a percentage (e.g., 50%) or pixel value (default: 50%) height (FloatingSize): window height, as a percentage or pixel value (default: 50%) anchor (FloatingAnchor): anchor point for positioning, e.g., “top_left”, “center” (default: center) title (Option): window title (default: none) focus (bool): whether to focus the window after creation (default: true) close_on_empty (bool): whether to close the window when its buffer empties (default: true) fn move_buffer_to_node fn move_buffer_to_node(_: ActionApi, buffer_id: int, node_id: int) -> Action Description Move a buffer into a specific node. fn next_current_tabs fn next_current_tabs(_: ActionApi) -> Action Description Select the next tab in the currently focused tabs node. fn next_tab fn next_tab(_: ActionApi, tabs_node_id: int) -> Action Description Select the next tab in a specific tabs node. fn noop fn noop(_: ActionApi) -> Action Description Build a no-op action. fn notify fn notify(_: ActionApi, level: String, message: String) -> Action Description Emit a client notification. fn open_floating fn open_floating(_: ActionApi, tree: TreeSpec, options: Map) -> Action Description Open a floating view around the provided tree. fn prev_current_tabs fn prev_current_tabs(_: ActionApi) -> Action Description Select the previous tab in the currently focused tabs node. fn prev_tab fn prev_tab(_: ActionApi, tabs_node_id: int) -> Action Description Select the previous tab in a specific tabs node. fn replace_current_with fn replace_current_with(_: ActionApi, tree: TreeSpec) -> Action Description Replace the focused node with a new tree. fn replace_node fn replace_node(_: ActionApi, node_id: int, tree: TreeSpec) -> Action Description Replace a specific node by id with a new tree. fn reveal_buffer fn reveal_buffer(_: ActionApi, buffer_id: int) -> Action Description Reveal a specific buffer by id. fn run_named_action fn run_named_action(_: ActionApi, name: String) -> Action Description Run another named action by name. fn scroll_line_down fn scroll_line_down(_: ActionApi) -> Action Description Scroll one line downward in local scrollback. fn scroll_line_up fn scroll_line_up(_: ActionApi) -> Action Description Scroll one line upward in local scrollback. fn scroll_page_down fn scroll_page_down(_: ActionApi) -> Action Description Scroll one page downward in local scrollback. fn scroll_page_up fn scroll_page_up(_: ActionApi) -> Action Description Scroll one page upward in local scrollback. fn scroll_to_bottom fn scroll_to_bottom(_: ActionApi) -> Action Description Scroll to the bottom of local scrollback. fn scroll_to_top fn scroll_to_top(_: ActionApi) -> Action Description Scroll to the top of local scrollback. fn search_next fn search_next(_: ActionApi) -> Action Description Jump to the next search match. fn search_prev fn search_prev(_: ActionApi) -> Action Description Jump to the previous search match. fn select_current_tabs fn select_current_tabs(_: ActionApi, index: int) -> Action Description Select a tab by index in the currently focused tabs node. fn select_move_down fn select_move_down(_: ActionApi) -> Action Description Move the active selection down. fn select_move_left fn select_move_left(_: ActionApi) -> Action Description Move the active selection left. fn select_move_right fn select_move_right(_: ActionApi) -> Action Description Move the active selection right. fn select_move_up fn select_move_up(_: ActionApi) -> Action Description Move the active selection up. fn select_tab fn select_tab(_: ActionApi, tabs_node_id: int, index: int) -> Action Description Select a tab by index in a specific tabs node. fn send_bytes fn send_bytes(_: ActionApi, buffer_id: int, bytes: String) -> Action\\nfn send_bytes(_: ActionApi, buffer_id: int, bytes: Array) -> Action Description Send a string of bytes to a specific buffer. fn send_bytes_current fn send_bytes_current(_: ActionApi, bytes: String) -> Action\\nfn send_bytes_current(_: ActionApi, bytes: Array) -> Action Description Send a string of bytes to the focused buffer. fn send_keys fn send_keys(_: ActionApi, buffer_id: int, notation: String) -> Action Description Send a key notation sequence to a specific buffer. fn send_keys_current fn send_keys_current(_: ActionApi, notation: String) -> Action Description Send a key notation sequence to the focused buffer. fn split_with fn split_with(_: ActionApi, direction: String, tree: TreeSpec) -> Action Description Split the current node and attach the provided tree as the new sibling. fn toggle_mode fn toggle_mode(_: ActionApi, mode: String) -> Action Description Toggle a named input mode. fn yank_selection fn yank_selection(_: ActionApi) -> Action Description Copy the current selection into the clipboard.","breadcrumbs":"Action (Registration) » Action (Registration) » Action (Registration) » Action (Registration) » Action (Registration) » Action (Registration) » Action (Registration) » Action (Registration) » Action (Registration) » Action (Registration) » Action (Registration) » Action (Registration) » Action (Registration) » Action (Registration) » Action (Registration) » Action (Registration) » Action (Registration) » Action (Registration) » Action (Registration) » Action (Registration) » Action (Registration) » Action (Registration) » Action (Registration) » Action (Registration) » Action (Registration) » Action (Registration) » Action (Registration) » Action (Registration) » Action (Registration) » Action (Registration) » Action (Registration) » Action (Registration) » Action (Registration) » Action (Registration) » Action (Registration) » Action (Registration) » Action (Registration) » Action (Registration) » Action (Registration) » Action (Registration) » Action (Registration) » Action (Registration) » Action (Registration) » Action (Registration) » Action (Registration) » Action (Registration) » Action (Registration) » Action (Registration) » Action (Registration) » Action (Registration) » Action (Registration) » Action (Registration) » Action (Registration) » Action (Registration) » Action (Registration) » Action (Registration) » Action (Registration) » Action (Registration) » Action (Registration) » Action (Registration) » Action (Registration) » Action (Registration) » Action (Registration) » Action (Registration) » Action (Registration)","id":"6","title":"Action (Registration)"},"7":{"body":"Namespace: global fn buffer_attach fn buffer_attach(_: TreeApi, buffer_id: int) -> TreeSpec Description Attach an existing buffer by id. fn buffer_current fn buffer_current(_: TreeApi) -> TreeSpec Description Build a tree reference to the currently focused buffer. fn buffer_empty fn buffer_empty(_: TreeApi) -> TreeSpec Description Build an empty buffer tree node. fn buffer_spawn fn buffer_spawn(_: TreeApi, command: Array) -> TreeSpec\\nfn buffer_spawn(_: TreeApi, command: Array, options: Map) -> TreeSpec Description Example Spawn a new buffer from a command array. Supported options keys are title ( string), cwd ( string), and env\\n( map). Unknown keys are rejected. tree.buffer_spawn([\\"/bin/zsh\\"], #{ title: \\"shell\\" }) fn current_buffer fn current_buffer(_: TreeApi) -> TreeSpec Description Build a tree reference to the currently focused buffer. fn current_node fn current_node(_: TreeApi) -> TreeSpec Description Build a tree reference to the currently focused node. fn split fn split(_: TreeApi, direction: String, children: Array) -> TreeSpec\\nfn split(_: TreeApi, direction: String, children: Array, sizes: Array) -> TreeSpec Description Build a split with an explicit direction string. fn split_h fn split_h(_: TreeApi, children: Array) -> TreeSpec Description Build a horizontal split. fn split_v fn split_v(_: TreeApi, children: Array) -> TreeSpec Description Build a vertical split. fn tab fn tab(_: TreeApi, title: String, tree: TreeSpec) -> TabSpec Description Build a single tab specification. fn tabs fn tabs(_: TreeApi, tabs: Array) -> TreeSpec Description Build a tabs container with the first tab active. fn tabs_with_active fn tabs_with_active(_: TreeApi, tabs: Array, active: int) -> TreeSpec Description Build a tabs container with an explicit active tab.","breadcrumbs":"Tree (Registration) » Tree (Registration) » Tree (Registration) » Tree (Registration) » Tree (Registration) » Tree (Registration) » Tree (Registration) » Tree (Registration) » Tree (Registration) » Tree (Registration) » Tree (Registration) » Tree (Registration) » Tree (Registration) » Tree (Registration)","id":"7","title":"Tree (Registration)"},"8":{"body":"Namespace: global fn env fn env(_: SystemApi, name: String) -> ? Description Read an environment variable, if it is set. ReturnType: string | () fn now fn now(_: SystemApi) -> int Description Return the current Unix timestamp in seconds. fn which fn which(_: SystemApi, name: String) -> ? Description Resolve an executable from `PATH`, if it is found. ReturnType: string | ()","breadcrumbs":"System (Registration) » System (Registration) » System (Registration) » System (Registration) » System (Registration)","id":"8","title":"System (Registration)"},"9":{"body":"Namespace: global fn bar fn bar(_: UiApi, left: Array, center: Array, right: Array) -> BarSpec Description Build a full bar specification from left, center, and right segments. fn segment fn segment(_: UiApi, text: String) -> BarSegment\\nfn segment(_: UiApi, text: String, options: Map) -> BarSegment Description Create a [`BarSegment`] from a [`UiApi`] receiver and text using default styling. segment(_: UiApi, text: String) -> BarSegment produces plain text with default\\n[ StyleSpec] values and no click target.","breadcrumbs":"UI (Registration) » UI (Registration) » UI (Registration) » UI (Registration)","id":"9","title":"UI (Registration)"}},"length":27,"save":true},"fields":["title","body","breadcrumbs"],"index":{"body":{"root":{"0":{"df":2,"docs":{"13":{"tf":1.4142135623730951},"6":{"tf":1.4142135623730951}}},"3":{"0":{"3":{"4":{"4":{"6":{"df":1,"docs":{"4":{"tf":1.0}}},"df":0,"docs":{}},"df":0,"docs":{}},"df":0,"docs":{}},"df":0,"docs":{}},"df":0,"docs":{}},"5":{"0":{"df":2,"docs":{"13":{"tf":1.7320508075688772},"6":{"tf":1.7320508075688772}}},"df":0,"docs":{}},"a":{"b":{"df":0,"docs":{},"o":{"df":0,"docs":{},"v":{"df":2,"docs":{"13":{"tf":1.0},"6":{"tf":1.0}}}}},"c":{"df":0,"docs":{},"t":{"df":0,"docs":{},"i":{"df":0,"docs":{},"o":{"df":0,"docs":{},"n":{".":{"df":0,"docs":{},"f":{"df":0,"docs":{},"o":{"c":{"df":0,"docs":{},"u":{"df":0,"docs":{},"s":{"_":{"df":0,"docs":{},"l":{"df":0,"docs":{},"e":{"df":0,"docs":{},"f":{"df":0,"docs":{},"t":{"df":3,"docs":{"13":{"tf":1.0},"5":{"tf":1.0},"6":{"tf":1.0}}}}}}},"df":0,"docs":{}}}},"df":0,"docs":{}}},"s":{"df":0,"docs":{},"p":{"df":0,"docs":{},"l":{"df":0,"docs":{},"i":{"df":0,"docs":{},"t":{"_":{"df":0,"docs":{},"w":{"df":0,"docs":{},"i":{"df":0,"docs":{},"t":{"df":0,"docs":{},"h":{"(":{"\\"":{"df":0,"docs":{},"h":{"df":0,"docs":{},"o":{"df":0,"docs":{},"r":{"df":0,"docs":{},"i":{"df":0,"docs":{},"z":{"df":0,"docs":{},"o":{"df":0,"docs":{},"n":{"df":0,"docs":{},"t":{"df":1,"docs":{"4":{"tf":1.0}}}}}}}}}}},"df":0,"docs":{}},"df":0,"docs":{}}}}}},"df":0,"docs":{}}}}}}},"_":{"df":0,"docs":{},"n":{"a":{"df":0,"docs":{},"m":{"df":1,"docs":{"5":{"tf":1.0}}}},"df":0,"docs":{}}},"a":{"df":0,"docs":{},"p":{"df":0,"docs":{},"i":{"df":2,"docs":{"13":{"tf":8.06225774829855},"6":{"tf":8.06225774829855}}}}},"df":5,"docs":{"0":{"tf":1.4142135623730951},"1":{"tf":1.4142135623730951},"13":{"tf":8.426149773176359},"5":{"tf":3.1622776601683795},"6":{"tf":8.426149773176359}}}},"v":{"df":11,"docs":{"13":{"tf":2.449489742783178},"14":{"tf":1.7320508075688772},"15":{"tf":1.0},"19":{"tf":1.4142135623730951},"20":{"tf":1.0},"22":{"tf":1.0},"23":{"tf":1.4142135623730951},"26":{"tf":1.0},"4":{"tf":1.0},"6":{"tf":2.449489742783178},"7":{"tf":1.7320508075688772}},"e":{".":{"df":0,"docs":{},"t":{"df":0,"docs":{},"i":{"df":0,"docs":{},"t":{"df":0,"docs":{},"l":{"df":1,"docs":{"4":{"tf":1.0}}}}}}},"_":{"b":{"df":0,"docs":{},"g":{"df":1,"docs":{"4":{"tf":1.0}}}},"df":0,"docs":{},"f":{"df":0,"docs":{},"g":{"df":1,"docs":{"4":{"tf":1.0}}}},"i":{"df":0,"docs":{},"n":{"d":{"df":0,"docs":{},"e":{"df":0,"docs":{},"x":{"(":{"b":{"a":{"df":0,"docs":{},"r":{"df":1,"docs":{"22":{"tf":1.0}}}},"df":0,"docs":{}},"df":0,"docs":{}},"df":1,"docs":{"22":{"tf":1.0}}}}},"df":0,"docs":{}}},"t":{"a":{"b":{"_":{"df":0,"docs":{},"i":{"df":0,"docs":{},"n":{"d":{"df":0,"docs":{},"e":{"df":0,"docs":{},"x":{"(":{"df":0,"docs":{},"n":{"df":0,"docs":{},"o":{"d":{"df":1,"docs":{"20":{"tf":1.0}}},"df":0,"docs":{}}}},"df":1,"docs":{"20":{"tf":1.0}}}}},"df":0,"docs":{}}}},"df":0,"docs":{}},"df":0,"docs":{}},"df":0,"docs":{}}},"df":0,"docs":{}},"i":{"df":0,"docs":{},"t":{"df":0,"docs":{},"y":{"(":{"b":{"df":0,"docs":{},"u":{"df":0,"docs":{},"f":{"df":0,"docs":{},"f":{"df":1,"docs":{"19":{"tf":1.0}}}}}},"df":0,"docs":{}},"df":0,"docs":{}}}}}}}},"d":{"d":{"df":1,"docs":{"11":{"tf":1.0}}},"df":0,"docs":{}},"df":0,"docs":{},"g":{"a":{"df":0,"docs":{},"i":{"df":0,"docs":{},"n":{"df":0,"docs":{},"s":{"df":0,"docs":{},"t":{"df":1,"docs":{"0":{"tf":1.0}}}}}}},"df":0,"docs":{}},"n":{"c":{"df":0,"docs":{},"h":{"df":0,"docs":{},"o":{"df":0,"docs":{},"r":{"df":2,"docs":{"13":{"tf":2.0},"6":{"tf":2.0}}}}}},"df":0,"docs":{},"o":{"df":0,"docs":{},"t":{"df":0,"docs":{},"h":{"df":2,"docs":{"13":{"tf":1.0},"6":{"tf":1.0}}}}}},"p":{"df":0,"docs":{},"i":{"df":1,"docs":{"0":{"tf":1.0}}}},"r":{"df":0,"docs":{},"o":{"df":0,"docs":{},"u":{"df":0,"docs":{},"n":{"d":{"df":2,"docs":{"13":{"tf":1.0},"6":{"tf":1.0}}},"df":0,"docs":{}}}},"r":{"a":{"df":0,"docs":{},"y":{"df":13,"docs":{"13":{"tf":1.7320508075688772},"14":{"tf":3.1622776601683795},"15":{"tf":1.7320508075688772},"16":{"tf":1.7320508075688772},"18":{"tf":1.0},"19":{"tf":1.0},"20":{"tf":1.7320508075688772},"22":{"tf":1.0},"25":{"tf":1.7320508075688772},"5":{"tf":1.7320508075688772},"6":{"tf":1.7320508075688772},"7":{"tf":3.1622776601683795},"9":{"tf":1.7320508075688772}}}},"df":0,"docs":{}}},"t":{"df":0,"docs":{},"t":{"a":{"c":{"df":0,"docs":{},"h":{"df":10,"docs":{"13":{"tf":1.0},"14":{"tf":1.0},"17":{"tf":2.0},"18":{"tf":1.0},"19":{"tf":1.7320508075688772},"20":{"tf":1.0},"23":{"tf":1.0},"5":{"tf":1.0},"6":{"tf":1.0},"7":{"tf":1.0}}}},"df":0,"docs":{}},"df":0,"docs":{}}}},"b":{"a":{"c":{"df":0,"docs":{},"k":{"df":1,"docs":{"0":{"tf":1.0}}}},"df":0,"docs":{},"r":{"(":{"_":{"df":2,"docs":{"25":{"tf":1.0},"9":{"tf":1.0}}},"df":0,"docs":{}},"df":5,"docs":{"0":{"tf":1.0},"1":{"tf":1.0},"12":{"tf":1.0},"25":{"tf":1.4142135623730951},"9":{"tf":1.4142135623730951}},"s":{"df":0,"docs":{},"e":{"df":0,"docs":{},"g":{"df":2,"docs":{"25":{"tf":2.0},"9":{"tf":2.0}}}},"p":{"df":0,"docs":{},"e":{"c":{"df":2,"docs":{"25":{"tf":1.0},"9":{"tf":1.0}}},"df":0,"docs":{}}}}},"s":{"df":0,"docs":{},"e":{"df":2,"docs":{"23":{"tf":1.0},"4":{"tf":1.0}}}}},"df":0,"docs":{},"e":{"df":1,"docs":{"22":{"tf":1.0}},"f":{"df":0,"docs":{},"o":{"df":0,"docs":{},"r":{"df":2,"docs":{"13":{"tf":1.4142135623730951},"6":{"tf":1.4142135623730951}}}}},"h":{"a":{"df":0,"docs":{},"v":{"df":0,"docs":{},"i":{"df":0,"docs":{},"o":{"df":0,"docs":{},"r":{"df":1,"docs":{"10":{"tf":1.0}}}}}}},"df":0,"docs":{}},"l":{"df":0,"docs":{},"l":{"df":1,"docs":{"23":{"tf":1.0}}},"o":{"df":0,"docs":{},"w":{"df":3,"docs":{"13":{"tf":1.0},"4":{"tf":1.4142135623730951},"6":{"tf":1.0}}}}}},"g":{"df":1,"docs":{"4":{"tf":1.0}}},"i":{"df":0,"docs":{},"n":{"/":{"df":0,"docs":{},"z":{"df":0,"docs":{},"s":{"df":0,"docs":{},"h":{"df":1,"docs":{"4":{"tf":1.0}}}}}},"d":{"(":{"\\"":{"df":0,"docs":{},"n":{"df":0,"docs":{},"o":{"df":0,"docs":{},"r":{"df":0,"docs":{},"m":{"df":2,"docs":{"4":{"tf":1.0},"5":{"tf":1.0}}}}}}},"df":0,"docs":{},"m":{"df":0,"docs":{},"o":{"d":{"df":1,"docs":{"5":{"tf":1.7320508075688772}}},"df":0,"docs":{}}}},"df":2,"docs":{"0":{"tf":1.0},"5":{"tf":2.0}}},"df":0,"docs":{}}},"l":{"df":0,"docs":{},"o":{"c":{"df":0,"docs":{},"k":{"df":2,"docs":{"13":{"tf":1.0},"6":{"tf":1.0}}}},"df":0,"docs":{}}},"o":{"df":0,"docs":{},"o":{"df":0,"docs":{},"l":{"df":8,"docs":{"10":{"tf":2.0},"13":{"tf":1.4142135623730951},"19":{"tf":2.0},"20":{"tf":2.0},"21":{"tf":1.4142135623730951},"22":{"tf":1.0},"23":{"tf":1.7320508075688772},"6":{"tf":1.4142135623730951}}}},"t":{"df":0,"docs":{},"t":{"df":0,"docs":{},"o":{"df":0,"docs":{},"m":{"df":2,"docs":{"13":{"tf":1.0},"6":{"tf":1.0}}}}}},"u":{"df":0,"docs":{},"n":{"d":{"df":1,"docs":{"5":{"tf":1.0}}},"df":0,"docs":{}}}},"u":{"df":0,"docs":{},"f":{"df":0,"docs":{},"f":{"df":0,"docs":{},"e":{"df":0,"docs":{},"r":{"(":{"df":0,"docs":{},"n":{"df":0,"docs":{},"o":{"d":{"df":1,"docs":{"20":{"tf":1.0}}},"df":0,"docs":{}}}},".":{"df":0,"docs":{},"h":{"df":0,"docs":{},"i":{"df":0,"docs":{},"s":{"df":0,"docs":{},"t":{"df":0,"docs":{},"o":{"df":0,"docs":{},"r":{"df":0,"docs":{},"y":{"_":{"df":0,"docs":{},"t":{"df":0,"docs":{},"e":{"df":0,"docs":{},"x":{"df":0,"docs":{},"t":{"df":1,"docs":{"19":{"tf":1.0}}}}}}},"df":0,"docs":{}}}}}}}}},"_":{"a":{"df":0,"docs":{},"t":{"df":0,"docs":{},"t":{"a":{"c":{"df":0,"docs":{},"h":{"(":{"_":{"df":2,"docs":{"14":{"tf":1.0},"7":{"tf":1.0}}},"df":0,"docs":{}},"df":2,"docs":{"14":{"tf":1.0},"7":{"tf":1.0}}}},"df":0,"docs":{}},"df":0,"docs":{}}}},"b":{"df":0,"docs":{},"e":{"df":0,"docs":{},"l":{"df":1,"docs":{"5":{"tf":1.0}}}}},"c":{"df":0,"docs":{},"o":{"df":0,"docs":{},"u":{"df":0,"docs":{},"n":{"df":0,"docs":{},"t":{"(":{"df":0,"docs":{},"t":{"a":{"b":{"df":1,"docs":{"23":{"tf":1.0}}},"df":0,"docs":{}},"df":0,"docs":{}}},"df":1,"docs":{"23":{"tf":1.0}}}}}},"u":{"df":0,"docs":{},"r":{"df":0,"docs":{},"r":{"df":2,"docs":{"14":{"tf":1.0},"7":{"tf":1.0}},"e":{"df":0,"docs":{},"n":{"df":0,"docs":{},"t":{"(":{"_":{"df":2,"docs":{"14":{"tf":1.0},"7":{"tf":1.0}}},"df":0,"docs":{}},"df":0,"docs":{}}}}}}}},"df":0,"docs":{},"e":{"df":0,"docs":{},"m":{"df":0,"docs":{},"p":{"df":0,"docs":{},"t":{"df":0,"docs":{},"i":{"df":2,"docs":{"14":{"tf":1.0},"7":{"tf":1.0}}},"y":{"(":{"_":{"df":2,"docs":{"14":{"tf":1.0},"7":{"tf":1.0}}},"df":0,"docs":{}},"df":0,"docs":{}}}}}},"i":{"d":{"(":{"df":0,"docs":{},"e":{"df":0,"docs":{},"v":{"df":1,"docs":{"17":{"tf":1.0}}}}},"df":7,"docs":{"13":{"tf":3.0},"14":{"tf":1.0},"15":{"tf":1.0},"16":{"tf":1.0},"17":{"tf":1.0},"6":{"tf":3.0},"7":{"tf":1.0}}},"df":0,"docs":{}},"s":{"df":0,"docs":{},"p":{"a":{"df":0,"docs":{},"w":{"df":0,"docs":{},"n":{"(":{"_":{"df":2,"docs":{"14":{"tf":1.4142135623730951},"7":{"tf":1.4142135623730951}}},"df":0,"docs":{}},"df":2,"docs":{"14":{"tf":1.0},"7":{"tf":1.0}}}}},"df":0,"docs":{}}},"v":{"df":0,"docs":{},"i":{"df":0,"docs":{},"e":{"df":0,"docs":{},"w":{"df":1,"docs":{"20":{"tf":1.0}}}}}}},"df":12,"docs":{"1":{"tf":1.0},"10":{"tf":1.4142135623730951},"13":{"tf":3.605551275463989},"14":{"tf":2.23606797749979},"15":{"tf":2.449489742783178},"16":{"tf":2.0},"17":{"tf":1.0},"19":{"tf":3.1622776601683795},"20":{"tf":1.4142135623730951},"23":{"tf":1.0},"6":{"tf":3.605551275463989},"7":{"tf":2.23606797749979}},"r":{"df":0,"docs":{},"e":{"df":0,"docs":{},"f":{"df":3,"docs":{"15":{"tf":1.4142135623730951},"16":{"tf":1.4142135623730951},"19":{"tf":4.358898943540674}}}}}}}}},"i":{"df":0,"docs":{},"l":{"d":{"df":6,"docs":{"13":{"tf":1.0},"14":{"tf":3.1622776601683795},"25":{"tf":1.0},"6":{"tf":1.0},"7":{"tf":3.1622776601683795},"9":{"tf":1.0}},"e":{"df":0,"docs":{},"r":{"df":1,"docs":{"5":{"tf":1.0}}}}},"df":0,"docs":{}}}},"y":{"df":0,"docs":{},"t":{"df":0,"docs":{},"e":{"df":2,"docs":{"13":{"tf":2.449489742783178},"6":{"tf":2.449489742783178}}}}}},"c":{"6":{"d":{"0":{"df":0,"docs":{},"f":{"5":{"df":1,"docs":{"4":{"tf":1.0}}},"df":0,"docs":{}}},"df":0,"docs":{}},"df":0,"docs":{}},"a":{"df":0,"docs":{},"l":{"df":0,"docs":{},"l":{"a":{"b":{"df":0,"docs":{},"l":{"df":1,"docs":{"5":{"tf":1.0}}}},"df":0,"docs":{}},"b":{"a":{"c":{"df":0,"docs":{},"k":{"df":2,"docs":{"12":{"tf":1.0},"5":{"tf":1.7320508075688772}}}},"df":0,"docs":{}},"df":0,"docs":{}},"df":0,"docs":{}}},"n":{"c":{"df":0,"docs":{},"e":{"df":0,"docs":{},"l":{"_":{"df":0,"docs":{},"s":{"df":0,"docs":{},"e":{"a":{"df":0,"docs":{},"r":{"c":{"df":0,"docs":{},"h":{"(":{"_":{"df":2,"docs":{"13":{"tf":1.0},"6":{"tf":1.0}}},"df":0,"docs":{}},"df":2,"docs":{"13":{"tf":1.0},"6":{"tf":1.0}}}},"df":0,"docs":{}}},"df":0,"docs":{},"l":{"df":0,"docs":{},"e":{"c":{"df":0,"docs":{},"t":{"df":2,"docs":{"13":{"tf":1.0},"6":{"tf":1.0}},"i":{"df":0,"docs":{},"o":{"df":0,"docs":{},"n":{"(":{"_":{"df":2,"docs":{"13":{"tf":1.0},"6":{"tf":1.0}}},"df":0,"docs":{}},"df":0,"docs":{}}}}}},"df":0,"docs":{}}}}}},"df":2,"docs":{"13":{"tf":1.4142135623730951},"6":{"tf":1.4142135623730951}}}}},"df":0,"docs":{}},"p":{"df":0,"docs":{},"t":{"df":0,"docs":{},"u":{"df":0,"docs":{},"r":{"df":1,"docs":{"19":{"tf":1.4142135623730951}}}}}}},"df":0,"docs":{},"e":{"df":0,"docs":{},"l":{"df":0,"docs":{},"l":{"df":1,"docs":{"22":{"tf":1.0}}}},"n":{"df":0,"docs":{},"t":{"df":0,"docs":{},"e":{"df":0,"docs":{},"r":{"df":4,"docs":{"13":{"tf":1.4142135623730951},"25":{"tf":1.4142135623730951},"6":{"tf":1.4142135623730951},"9":{"tf":1.4142135623730951}}}}}}},"h":{"a":{"df":0,"docs":{},"i":{"df":0,"docs":{},"n":{"(":{"_":{"df":2,"docs":{"13":{"tf":1.0},"6":{"tf":1.0}}},"df":0,"docs":{}},"df":3,"docs":{"13":{"tf":1.4142135623730951},"5":{"tf":1.0},"6":{"tf":1.4142135623730951}}}},"r":{"a":{"c":{"df":0,"docs":{},"t":{"df":2,"docs":{"13":{"tf":1.0},"6":{"tf":1.0}}}},"df":0,"docs":{}},"df":0,"docs":{}}},"df":0,"docs":{},"i":{"df":0,"docs":{},"l":{"d":{"df":1,"docs":{"20":{"tf":1.0}},"r":{"df":0,"docs":{},"e":{"df":0,"docs":{},"n":{"(":{"df":0,"docs":{},"n":{"df":0,"docs":{},"o":{"d":{"df":1,"docs":{"20":{"tf":1.0}}},"df":0,"docs":{}}}},"df":3,"docs":{"14":{"tf":2.0},"20":{"tf":1.0},"7":{"tf":2.0}}}}}},"df":0,"docs":{}}}},"l":{"df":0,"docs":{},"e":{"a":{"df":0,"docs":{},"r":{"_":{"df":0,"docs":{},"p":{"df":0,"docs":{},"e":{"df":0,"docs":{},"n":{"d":{"df":0,"docs":{},"i":{"df":0,"docs":{},"n":{"df":0,"docs":{},"g":{"_":{"df":0,"docs":{},"k":{"df":0,"docs":{},"e":{"df":0,"docs":{},"y":{"df":2,"docs":{"13":{"tf":1.0},"6":{"tf":1.0}},"s":{"(":{"_":{"df":2,"docs":{"13":{"tf":1.0},"6":{"tf":1.0}}},"df":0,"docs":{}},"df":0,"docs":{}}}}}},"df":0,"docs":{}}}}},"df":0,"docs":{}}}}},"df":2,"docs":{"13":{"tf":1.0},"6":{"tf":1.0}}}},"df":0,"docs":{}},"i":{"c":{"df":0,"docs":{},"k":{"df":3,"docs":{"10":{"tf":1.4142135623730951},"25":{"tf":1.0},"9":{"tf":1.0}}}},"df":0,"docs":{},"e":{"df":0,"docs":{},"n":{"df":0,"docs":{},"t":{"df":4,"docs":{"0":{"tf":1.0},"10":{"tf":1.0},"13":{"tf":1.0},"6":{"tf":1.0}}}}},"p":{"b":{"df":0,"docs":{},"o":{"a":{"df":0,"docs":{},"r":{"d":{"df":2,"docs":{"13":{"tf":1.4142135623730951},"6":{"tf":1.4142135623730951}}},"df":0,"docs":{}}},"df":0,"docs":{}}},"df":0,"docs":{}}},"o":{"df":0,"docs":{},"s":{"df":0,"docs":{},"e":{"_":{"df":0,"docs":{},"f":{"df":0,"docs":{},"l":{"df":0,"docs":{},"o":{"a":{"df":0,"docs":{},"t":{"df":0,"docs":{},"i":{"df":0,"docs":{},"n":{"df":0,"docs":{},"g":{"(":{"_":{"df":2,"docs":{"13":{"tf":1.0},"6":{"tf":1.0}}},"df":0,"docs":{}},"_":{"df":0,"docs":{},"i":{"d":{"(":{"_":{"df":2,"docs":{"13":{"tf":1.0},"6":{"tf":1.0}}},"df":0,"docs":{}},"df":2,"docs":{"13":{"tf":1.0},"6":{"tf":1.0}}},"df":0,"docs":{}}},"df":0,"docs":{}}}}}},"df":2,"docs":{"13":{"tf":1.0},"6":{"tf":1.0}}}}},"n":{"df":0,"docs":{},"o":{"d":{"df":2,"docs":{"13":{"tf":1.0},"6":{"tf":1.0}},"e":{"(":{"_":{"df":2,"docs":{"13":{"tf":1.0},"6":{"tf":1.0}}},"df":0,"docs":{}},"df":0,"docs":{}}},"df":0,"docs":{}}},"o":{"df":0,"docs":{},"n":{"_":{"df":0,"docs":{},"e":{"df":0,"docs":{},"m":{"df":0,"docs":{},"p":{"df":0,"docs":{},"t":{"df":0,"docs":{},"i":{"df":2,"docs":{"13":{"tf":1.0},"6":{"tf":1.0}}}}}}}},"df":0,"docs":{}}},"v":{"df":0,"docs":{},"i":{"df":0,"docs":{},"e":{"df":0,"docs":{},"w":{"(":{"_":{"df":2,"docs":{"13":{"tf":1.0},"6":{"tf":1.0}}},"df":0,"docs":{}},"df":2,"docs":{"13":{"tf":1.0},"6":{"tf":1.0}}}}}}},"df":2,"docs":{"13":{"tf":2.23606797749979},"6":{"tf":2.23606797749979}}}}}},"o":{"d":{"df":0,"docs":{},"e":{"df":1,"docs":{"19":{"tf":1.0}}}},"df":0,"docs":{},"l":{"df":0,"docs":{},"o":{"df":0,"docs":{},"r":{"(":{"df":0,"docs":{},"t":{"df":0,"docs":{},"h":{"df":0,"docs":{},"e":{"df":0,"docs":{},"m":{"df":1,"docs":{"26":{"tf":1.0}}}}}}},"df":2,"docs":{"11":{"tf":1.0},"26":{"tf":1.4142135623730951}}}}},"m":{"df":0,"docs":{},"m":{"a":{"df":0,"docs":{},"n":{"d":{"(":{"b":{"df":0,"docs":{},"u":{"df":0,"docs":{},"f":{"df":0,"docs":{},"f":{"df":1,"docs":{"19":{"tf":1.0}}}}}},"df":0,"docs":{}},"df":3,"docs":{"14":{"tf":1.7320508075688772},"19":{"tf":1.4142135623730951},"7":{"tf":1.7320508075688772}}},"df":0,"docs":{}}},"df":0,"docs":{}},"p":{"df":0,"docs":{},"o":{"df":0,"docs":{},"s":{"df":0,"docs":{},"i":{"df":0,"docs":{},"t":{"df":2,"docs":{"13":{"tf":1.0},"6":{"tf":1.0}}}}}}}},"n":{"df":0,"docs":{},"f":{"df":0,"docs":{},"i":{"df":0,"docs":{},"g":{"df":2,"docs":{"0":{"tf":1.4142135623730951},"4":{"tf":1.0}}}}},"t":{"a":{"df":0,"docs":{},"i":{"df":0,"docs":{},"n":{"df":2,"docs":{"14":{"tf":1.4142135623730951},"7":{"tf":1.4142135623730951}}}}},"df":0,"docs":{},"e":{"df":0,"docs":{},"x":{"df":0,"docs":{},"t":{"df":2,"docs":{"1":{"tf":1.4142135623730951},"15":{"tf":3.605551275463989}}}}},"r":{"df":0,"docs":{},"o":{"df":0,"docs":{},"l":{"df":1,"docs":{"19":{"tf":1.0}}}}}}},"p":{"df":0,"docs":{},"i":{"df":2,"docs":{"13":{"tf":1.4142135623730951},"6":{"tf":1.4142135623730951}}},"y":{"_":{"df":0,"docs":{},"s":{"df":0,"docs":{},"e":{"df":0,"docs":{},"l":{"df":0,"docs":{},"e":{"c":{"df":0,"docs":{},"t":{"df":2,"docs":{"13":{"tf":1.0},"6":{"tf":1.0}},"i":{"df":0,"docs":{},"o":{"df":0,"docs":{},"n":{"(":{"_":{"df":2,"docs":{"13":{"tf":1.0},"6":{"tf":1.0}}},"df":0,"docs":{}},"df":0,"docs":{}}}}}},"df":0,"docs":{}}}}}},"df":0,"docs":{}}},"u":{"df":0,"docs":{},"n":{"df":0,"docs":{},"t":{"df":1,"docs":{"19":{"tf":1.0}}}}}},"r":{"df":0,"docs":{},"e":{"a":{"df":0,"docs":{},"t":{"df":2,"docs":{"25":{"tf":1.0},"9":{"tf":1.0}},"i":{"df":0,"docs":{},"o":{"df":0,"docs":{},"n":{"df":2,"docs":{"13":{"tf":1.0},"6":{"tf":1.0}}}}}}},"df":0,"docs":{}}},"t":{"df":0,"docs":{},"x":{".":{"c":{"df":0,"docs":{},"u":{"df":0,"docs":{},"r":{"df":0,"docs":{},"r":{"df":0,"docs":{},"e":{"df":0,"docs":{},"n":{"df":0,"docs":{},"t":{"_":{"b":{"df":0,"docs":{},"u":{"df":0,"docs":{},"f":{"df":0,"docs":{},"f":{"df":3,"docs":{"15":{"tf":1.0},"19":{"tf":1.0},"4":{"tf":1.0}},"e":{"df":0,"docs":{},"r":{"(":{")":{".":{"c":{"df":0,"docs":{},"w":{"d":{"df":1,"docs":{"4":{"tf":1.0}}},"df":0,"docs":{}}},"df":0,"docs":{}},"df":0,"docs":{}},"df":0,"docs":{}},"df":0,"docs":{}}}}}}},"df":0,"docs":{}},"df":0,"docs":{}}}}}}}},"df":0,"docs":{},"t":{"a":{"b":{"df":0,"docs":{},"s":{"(":{")":{"[":{"c":{"df":0,"docs":{},"t":{"df":0,"docs":{},"x":{".":{"a":{"c":{"df":0,"docs":{},"t":{"df":0,"docs":{},"i":{"df":0,"docs":{},"v":{"df":0,"docs":{},"e":{"_":{"df":0,"docs":{},"i":{"df":0,"docs":{},"n":{"d":{"df":0,"docs":{},"e":{"df":0,"docs":{},"x":{"df":1,"docs":{"4":{"tf":1.0}}}}},"df":0,"docs":{}}}},"df":0,"docs":{}}}}}},"df":0,"docs":{}},"df":0,"docs":{}},"df":0,"docs":{}}}},"df":0,"docs":{}},"df":0,"docs":{}},"df":0,"docs":{}},"df":0,"docs":{}}},"df":0,"docs":{}},"df":0,"docs":{}}},"df":0,"docs":{}}},"u":{"df":0,"docs":{},"r":{"df":0,"docs":{},"r":{"df":0,"docs":{},"e":{"df":0,"docs":{},"n":{"df":0,"docs":{},"t":{"_":{"b":{"df":0,"docs":{},"u":{"df":0,"docs":{},"f":{"df":0,"docs":{},"f":{"df":4,"docs":{"14":{"tf":1.0},"15":{"tf":1.0},"16":{"tf":1.0},"7":{"tf":1.0}},"e":{"df":0,"docs":{},"r":{"(":{"_":{"df":2,"docs":{"14":{"tf":1.0},"7":{"tf":1.0}}},"c":{"df":0,"docs":{},"o":{"df":0,"docs":{},"n":{"df":0,"docs":{},"t":{"df":0,"docs":{},"e":{"df":0,"docs":{},"x":{"df":0,"docs":{},"t":{"df":1,"docs":{"15":{"tf":1.0}}}}}}}}},"df":0,"docs":{},"m":{"df":0,"docs":{},"u":{"df":0,"docs":{},"x":{"df":1,"docs":{"16":{"tf":1.0}}}}}},"df":0,"docs":{}}}}}}},"df":0,"docs":{},"f":{"df":0,"docs":{},"l":{"df":0,"docs":{},"o":{"a":{"df":0,"docs":{},"t":{"df":0,"docs":{},"i":{"df":0,"docs":{},"n":{"df":0,"docs":{},"g":{"(":{"c":{"df":0,"docs":{},"o":{"df":0,"docs":{},"n":{"df":0,"docs":{},"t":{"df":0,"docs":{},"e":{"df":0,"docs":{},"x":{"df":0,"docs":{},"t":{"df":1,"docs":{"15":{"tf":1.0}}}}}}}}},"df":0,"docs":{},"m":{"df":0,"docs":{},"u":{"df":0,"docs":{},"x":{"df":1,"docs":{"16":{"tf":1.0}}}}}},"df":0,"docs":{}}}}}},"df":2,"docs":{"15":{"tf":1.0},"16":{"tf":1.0}}}}},"m":{"df":0,"docs":{},"o":{"d":{"df":1,"docs":{"15":{"tf":1.0}},"e":{"(":{"c":{"df":0,"docs":{},"o":{"df":0,"docs":{},"n":{"df":0,"docs":{},"t":{"df":0,"docs":{},"e":{"df":0,"docs":{},"x":{"df":0,"docs":{},"t":{"df":1,"docs":{"15":{"tf":1.0}}}}}}}}},"df":0,"docs":{}},"df":0,"docs":{}}},"df":0,"docs":{}}},"n":{"df":0,"docs":{},"o":{"d":{"df":4,"docs":{"14":{"tf":1.0},"15":{"tf":1.0},"16":{"tf":1.0},"7":{"tf":1.0}},"e":{"(":{"_":{"df":2,"docs":{"14":{"tf":1.0},"7":{"tf":1.0}}},"c":{"df":0,"docs":{},"o":{"df":0,"docs":{},"n":{"df":0,"docs":{},"t":{"df":0,"docs":{},"e":{"df":0,"docs":{},"x":{"df":0,"docs":{},"t":{"df":1,"docs":{"15":{"tf":1.0}}}}}}}}},"df":0,"docs":{},"m":{"df":0,"docs":{},"u":{"df":0,"docs":{},"x":{"df":1,"docs":{"16":{"tf":1.0}}}}}},"df":0,"docs":{}}},"df":0,"docs":{}}},"s":{"df":0,"docs":{},"e":{"df":0,"docs":{},"s":{"df":0,"docs":{},"s":{"df":2,"docs":{"15":{"tf":1.0},"16":{"tf":1.0}},"i":{"df":0,"docs":{},"o":{"df":0,"docs":{},"n":{"(":{"c":{"df":0,"docs":{},"o":{"df":0,"docs":{},"n":{"df":0,"docs":{},"t":{"df":0,"docs":{},"e":{"df":0,"docs":{},"x":{"df":0,"docs":{},"t":{"df":1,"docs":{"15":{"tf":1.0}}}}}}}}},"df":0,"docs":{},"m":{"df":0,"docs":{},"u":{"df":0,"docs":{},"x":{"df":1,"docs":{"16":{"tf":1.0}}}}}},"df":0,"docs":{}}}}}}}}},"df":11,"docs":{"13":{"tf":4.123105625617661},"14":{"tf":1.7320508075688772},"15":{"tf":2.6457513110645907},"16":{"tf":2.449489742783178},"19":{"tf":1.7320508075688772},"20":{"tf":1.0},"22":{"tf":1.0},"24":{"tf":1.0},"6":{"tf":4.123105625617661},"7":{"tf":1.7320508075688772},"8":{"tf":1.0}}}}}}},"s":{"df":0,"docs":{},"t":{"df":0,"docs":{},"o":{"df":0,"docs":{},"m":{"df":1,"docs":{"5":{"tf":1.0}}}}}}},"w":{"d":{"(":{"b":{"df":0,"docs":{},"u":{"df":0,"docs":{},"f":{"df":0,"docs":{},"f":{"df":0,"docs":{},"e":{"df":0,"docs":{},"r":{"df":1,"docs":{"19":{"tf":1.0}}}}}}}},"df":0,"docs":{}},"df":4,"docs":{"14":{"tf":1.0},"19":{"tf":1.0},"4":{"tf":1.0},"7":{"tf":1.0}}},"df":0,"docs":{}}},"d":{"df":0,"docs":{},"e":{"c":{"df":0,"docs":{},"l":{"a":{"df":0,"docs":{},"r":{"df":1,"docs":{"0":{"tf":1.0}}}},"df":0,"docs":{}}},"df":0,"docs":{},"f":{"a":{"df":0,"docs":{},"u":{"df":0,"docs":{},"l":{"df":0,"docs":{},"t":{"df":4,"docs":{"13":{"tf":2.8284271247461903},"25":{"tf":1.4142135623730951},"6":{"tf":2.8284271247461903},"9":{"tf":1.4142135623730951}}}}}},"df":1,"docs":{"0":{"tf":1.0}},"i":{"df":0,"docs":{},"n":{"df":1,"docs":{"5":{"tf":1.0}},"e":{"_":{"a":{"c":{"df":0,"docs":{},"t":{"df":1,"docs":{"5":{"tf":1.4142135623730951}},"i":{"df":0,"docs":{},"o":{"df":0,"docs":{},"n":{"(":{"\\"":{"df":0,"docs":{},"s":{"df":0,"docs":{},"p":{"df":0,"docs":{},"l":{"df":0,"docs":{},"i":{"df":0,"docs":{},"t":{"df":1,"docs":{"4":{"tf":1.0}}}}}}}},"df":0,"docs":{},"n":{"a":{"df":0,"docs":{},"m":{"df":1,"docs":{"5":{"tf":1.0}}}},"df":0,"docs":{}}},"df":0,"docs":{}}}}}},"df":0,"docs":{}},"df":0,"docs":{},"m":{"df":0,"docs":{},"o":{"d":{"df":1,"docs":{"5":{"tf":1.0}},"e":{"(":{"df":0,"docs":{},"m":{"df":0,"docs":{},"o":{"d":{"df":0,"docs":{},"e":{"_":{"df":0,"docs":{},"n":{"a":{"df":0,"docs":{},"m":{"df":1,"docs":{"5":{"tf":1.4142135623730951}}}},"df":0,"docs":{}}},"df":0,"docs":{}}},"df":0,"docs":{}}}},"df":0,"docs":{}}},"df":0,"docs":{}}}},"df":0,"docs":{}},"i":{"df":0,"docs":{},"t":{"df":2,"docs":{"0":{"tf":1.0},"2":{"tf":1.0}}}}}}},"s":{"c":{"df":0,"docs":{},"r":{"df":0,"docs":{},"i":{"df":0,"docs":{},"p":{"df":0,"docs":{},"t":{"df":22,"docs":{"10":{"tf":2.0},"11":{"tf":1.0},"12":{"tf":1.0},"13":{"tf":7.937253933193772},"14":{"tf":3.4641016151377544},"15":{"tf":3.4641016151377544},"16":{"tf":3.1622776601683795},"17":{"tf":2.23606797749979},"18":{"tf":2.0},"19":{"tf":4.242640687119285},"20":{"tf":3.872983346207417},"21":{"tf":2.6457513110645907},"22":{"tf":2.449489742783178},"23":{"tf":2.449489742783178},"24":{"tf":1.7320508075688772},"25":{"tf":1.4142135623730951},"26":{"tf":1.0},"5":{"tf":2.449489742783178},"6":{"tf":7.937253933193772},"7":{"tf":3.4641016151377544},"8":{"tf":1.7320508075688772},"9":{"tf":1.4142135623730951}}}}}}},"df":0,"docs":{}},"t":{"a":{"c":{"df":0,"docs":{},"h":{"_":{"b":{"df":0,"docs":{},"u":{"df":0,"docs":{},"f":{"df":0,"docs":{},"f":{"df":2,"docs":{"13":{"tf":1.0},"6":{"tf":1.0}},"e":{"df":0,"docs":{},"r":{"(":{"_":{"df":2,"docs":{"13":{"tf":1.0},"6":{"tf":1.0}}},"df":0,"docs":{}},"_":{"df":0,"docs":{},"i":{"d":{"(":{"_":{"df":2,"docs":{"13":{"tf":1.0},"6":{"tf":1.0}}},"df":0,"docs":{}},"df":2,"docs":{"13":{"tf":1.0},"6":{"tf":1.0}}},"df":0,"docs":{}}},"df":0,"docs":{}}}}}}},"df":0,"docs":{}},"df":5,"docs":{"13":{"tf":1.4142135623730951},"15":{"tf":1.0},"16":{"tf":1.0},"19":{"tf":1.0},"6":{"tf":1.4142135623730951}},"e":{"d":{"_":{"b":{"df":0,"docs":{},"u":{"df":0,"docs":{},"f":{"df":0,"docs":{},"f":{"df":2,"docs":{"15":{"tf":1.0},"16":{"tf":1.0}},"e":{"df":0,"docs":{},"r":{"df":0,"docs":{},"s":{"(":{"c":{"df":0,"docs":{},"o":{"df":0,"docs":{},"n":{"df":0,"docs":{},"t":{"df":0,"docs":{},"e":{"df":0,"docs":{},"x":{"df":0,"docs":{},"t":{"df":1,"docs":{"15":{"tf":1.0}}}}}}}}},"df":0,"docs":{},"m":{"df":0,"docs":{},"u":{"df":0,"docs":{},"x":{"df":1,"docs":{"16":{"tf":1.0}}}}}},"df":0,"docs":{}}}}}}}},"df":0,"docs":{}},"df":0,"docs":{}},"df":0,"docs":{}}}},"df":0,"docs":{}},"df":0,"docs":{},"e":{"c":{"df":0,"docs":{},"t":{"df":1,"docs":{"19":{"tf":1.0}}}},"df":0,"docs":{}}}},"i":{"df":0,"docs":{},"r":{"df":0,"docs":{},"e":{"c":{"df":0,"docs":{},"t":{"df":5,"docs":{"13":{"tf":1.0},"14":{"tf":1.7320508075688772},"20":{"tf":1.0},"6":{"tf":1.0},"7":{"tf":1.7320508075688772}},"o":{"df":0,"docs":{},"r":{"df":0,"docs":{},"i":{"df":1,"docs":{"19":{"tf":1.0}}}}}}},"df":0,"docs":{}}}},"o":{"df":0,"docs":{},"w":{"df":0,"docs":{},"n":{"df":2,"docs":{"13":{"tf":1.0},"6":{"tf":1.0}},"w":{"a":{"df":0,"docs":{},"r":{"d":{"df":2,"docs":{"13":{"tf":1.4142135623730951},"6":{"tf":1.4142135623730951}}},"df":0,"docs":{}}},"df":0,"docs":{}}}}}},"df":0,"docs":{},"e":{".":{"df":0,"docs":{},"g":{"df":2,"docs":{"13":{"tf":1.4142135623730951},"6":{"tf":1.4142135623730951}}}},"df":0,"docs":{},"m":{"b":{"df":0,"docs":{},"e":{"df":0,"docs":{},"r":{"df":1,"docs":{"0":{"tf":1.4142135623730951}}}}},"df":0,"docs":{},"i":{"df":0,"docs":{},"t":{"df":3,"docs":{"13":{"tf":1.0},"5":{"tf":1.0},"6":{"tf":1.0}}}},"p":{"df":0,"docs":{},"t":{"df":0,"docs":{},"i":{"df":4,"docs":{"13":{"tf":1.0},"14":{"tf":1.0},"6":{"tf":1.0},"7":{"tf":1.0}}}}}},"n":{"a":{"b":{"df":0,"docs":{},"l":{"df":2,"docs":{"13":{"tf":1.0},"6":{"tf":1.0}}}},"df":0,"docs":{}},"df":0,"docs":{},"t":{"df":0,"docs":{},"e":{"df":0,"docs":{},"r":{"_":{"df":0,"docs":{},"m":{"df":0,"docs":{},"o":{"d":{"df":2,"docs":{"13":{"tf":1.0},"6":{"tf":1.0}},"e":{"(":{"_":{"df":2,"docs":{"13":{"tf":1.0},"6":{"tf":1.0}}},"df":0,"docs":{}},"df":0,"docs":{}}},"df":0,"docs":{}}},"s":{"df":0,"docs":{},"e":{"a":{"df":0,"docs":{},"r":{"c":{"df":0,"docs":{},"h":{"_":{"df":0,"docs":{},"m":{"df":0,"docs":{},"o":{"d":{"df":2,"docs":{"13":{"tf":1.0},"6":{"tf":1.0}},"e":{"(":{"_":{"df":2,"docs":{"13":{"tf":1.0},"6":{"tf":1.0}}},"df":0,"docs":{}},"df":0,"docs":{}}},"df":0,"docs":{}}}},"df":0,"docs":{}}},"df":0,"docs":{}}},"df":0,"docs":{},"l":{"df":0,"docs":{},"e":{"c":{"df":0,"docs":{},"t":{"_":{"b":{"df":0,"docs":{},"l":{"df":0,"docs":{},"o":{"c":{"df":0,"docs":{},"k":{"(":{"_":{"df":2,"docs":{"13":{"tf":1.0},"6":{"tf":1.0}}},"df":0,"docs":{}},"df":2,"docs":{"13":{"tf":1.0},"6":{"tf":1.0}}}},"df":0,"docs":{}}}},"c":{"df":0,"docs":{},"h":{"a":{"df":0,"docs":{},"r":{"(":{"_":{"df":2,"docs":{"13":{"tf":1.0},"6":{"tf":1.0}}},"df":0,"docs":{}},"df":2,"docs":{"13":{"tf":1.0},"6":{"tf":1.0}}}},"df":0,"docs":{}}},"df":0,"docs":{},"l":{"df":0,"docs":{},"i":{"df":0,"docs":{},"n":{"df":2,"docs":{"13":{"tf":1.0},"6":{"tf":1.0}},"e":{"(":{"_":{"df":2,"docs":{"13":{"tf":1.0},"6":{"tf":1.0}}},"df":0,"docs":{}},"df":0,"docs":{}}}}}},"df":0,"docs":{}}},"df":0,"docs":{}}}}}},"df":2,"docs":{"13":{"tf":2.449489742783178},"6":{"tf":2.449489742783178}}}}},"v":{"(":{"_":{"df":2,"docs":{"24":{"tf":1.0},"8":{"tf":1.0}}},"df":0,"docs":{}},"_":{"df":0,"docs":{},"h":{"df":0,"docs":{},"i":{"df":0,"docs":{},"n":{"df":0,"docs":{},"t":{"(":{"b":{"df":0,"docs":{},"u":{"df":0,"docs":{},"f":{"df":0,"docs":{},"f":{"df":1,"docs":{"19":{"tf":1.0}}}}}},"df":0,"docs":{}},"df":1,"docs":{"19":{"tf":1.0}}}}}}},"df":4,"docs":{"14":{"tf":1.0},"24":{"tf":1.0},"7":{"tf":1.0},"8":{"tf":1.0}},"i":{"df":0,"docs":{},"r":{"df":0,"docs":{},"o":{"df":0,"docs":{},"n":{"df":3,"docs":{"19":{"tf":1.0},"24":{"tf":1.0},"8":{"tf":1.0}}}}}}}},"v":{"df":0,"docs":{},"e":{"df":0,"docs":{},"n":{"df":0,"docs":{},"t":{"(":{"c":{"df":0,"docs":{},"o":{"df":0,"docs":{},"n":{"df":0,"docs":{},"t":{"df":0,"docs":{},"e":{"df":0,"docs":{},"x":{"df":0,"docs":{},"t":{"df":1,"docs":{"15":{"tf":1.0}}}}}}}}},"df":0,"docs":{}},"df":6,"docs":{"0":{"tf":1.0},"1":{"tf":1.0},"10":{"tf":1.0},"15":{"tf":1.4142135623730951},"17":{"tf":2.23606797749979},"5":{"tf":1.0}},"i":{"df":0,"docs":{},"n":{"df":0,"docs":{},"f":{"df":0,"docs":{},"o":{"df":2,"docs":{"15":{"tf":1.0},"17":{"tf":2.449489742783178}}}}}}}}}},"x":{"a":{"df":0,"docs":{},"m":{"df":0,"docs":{},"p":{"df":0,"docs":{},"l":{"df":9,"docs":{"13":{"tf":1.0},"14":{"tf":1.0},"15":{"tf":1.0},"19":{"tf":1.0},"3":{"tf":1.0},"4":{"tf":1.4142135623730951},"5":{"tf":1.4142135623730951},"6":{"tf":1.0},"7":{"tf":1.0}},"e":{".":{"df":0,"docs":{},"m":{"d":{"df":1,"docs":{"3":{"tf":1.0}}},"df":0,"docs":{}}},"df":0,"docs":{}}}}}},"df":0,"docs":{},"e":{"c":{"df":0,"docs":{},"u":{"df":0,"docs":{},"t":{"df":3,"docs":{"0":{"tf":1.0},"24":{"tf":1.0},"8":{"tf":1.0}}}}},"df":0,"docs":{}},"i":{"df":0,"docs":{},"s":{"df":0,"docs":{},"t":{"df":5,"docs":{"14":{"tf":1.0},"15":{"tf":1.7320508075688772},"16":{"tf":1.7320508075688772},"26":{"tf":1.0},"7":{"tf":1.0}}}},"t":{"_":{"c":{"df":0,"docs":{},"o":{"d":{"df":1,"docs":{"19":{"tf":1.0}},"e":{"(":{"b":{"df":0,"docs":{},"u":{"df":0,"docs":{},"f":{"df":0,"docs":{},"f":{"df":1,"docs":{"19":{"tf":1.0}}}}}},"df":0,"docs":{}},"df":0,"docs":{}}},"df":0,"docs":{}}},"df":0,"docs":{}},"df":1,"docs":{"19":{"tf":1.0}}}},"p":{"df":0,"docs":{},"l":{"df":0,"docs":{},"i":{"c":{"df":0,"docs":{},"i":{"df":0,"docs":{},"t":{"df":2,"docs":{"14":{"tf":1.4142135623730951},"7":{"tf":1.4142135623730951}}}}},"df":0,"docs":{}}},"o":{"df":0,"docs":{},"r":{"df":0,"docs":{},"t":{"df":1,"docs":{"0":{"tf":1.0}}}}}}}},"f":{"a":{"df":0,"docs":{},"l":{"df":0,"docs":{},"l":{"b":{"a":{"c":{"df":0,"docs":{},"k":{"df":1,"docs":{"5":{"tf":1.4142135623730951}}}},"df":0,"docs":{}},"df":0,"docs":{}},"df":0,"docs":{}}}},"df":0,"docs":{},"g":{"df":1,"docs":{"4":{"tf":1.0}}},"i":{"df":0,"docs":{},"l":{"df":0,"docs":{},"e":{"df":1,"docs":{"0":{"tf":1.4142135623730951}}}},"n":{"d":{"_":{"b":{"df":0,"docs":{},"u":{"df":0,"docs":{},"f":{"df":0,"docs":{},"f":{"df":2,"docs":{"15":{"tf":1.0},"16":{"tf":1.0}},"e":{"df":0,"docs":{},"r":{"(":{"c":{"df":0,"docs":{},"o":{"df":0,"docs":{},"n":{"df":0,"docs":{},"t":{"df":0,"docs":{},"e":{"df":0,"docs":{},"x":{"df":0,"docs":{},"t":{"df":1,"docs":{"15":{"tf":1.0}}}}}}}}},"df":0,"docs":{},"m":{"df":0,"docs":{},"u":{"df":0,"docs":{},"x":{"df":1,"docs":{"16":{"tf":1.0}}}}}},"df":0,"docs":{}}}}}}},"df":0,"docs":{},"f":{"df":0,"docs":{},"l":{"df":0,"docs":{},"o":{"a":{"df":0,"docs":{},"t":{"df":2,"docs":{"15":{"tf":1.0},"16":{"tf":1.0}},"i":{"df":0,"docs":{},"n":{"df":0,"docs":{},"g":{"(":{"c":{"df":0,"docs":{},"o":{"df":0,"docs":{},"n":{"df":0,"docs":{},"t":{"df":0,"docs":{},"e":{"df":0,"docs":{},"x":{"df":0,"docs":{},"t":{"df":1,"docs":{"15":{"tf":1.0}}}}}}}}},"df":0,"docs":{},"m":{"df":0,"docs":{},"u":{"df":0,"docs":{},"x":{"df":1,"docs":{"16":{"tf":1.0}}}}}},"df":0,"docs":{}}}}}},"df":0,"docs":{}}}},"n":{"df":0,"docs":{},"o":{"d":{"df":2,"docs":{"15":{"tf":1.0},"16":{"tf":1.0}},"e":{"(":{"c":{"df":0,"docs":{},"o":{"df":0,"docs":{},"n":{"df":0,"docs":{},"t":{"df":0,"docs":{},"e":{"df":0,"docs":{},"x":{"df":0,"docs":{},"t":{"df":1,"docs":{"15":{"tf":1.0}}}}}}}}},"df":0,"docs":{},"m":{"df":0,"docs":{},"u":{"df":0,"docs":{},"x":{"df":1,"docs":{"16":{"tf":1.0}}}}}},"df":0,"docs":{}}},"df":0,"docs":{}}}},"df":2,"docs":{"15":{"tf":1.7320508075688772},"16":{"tf":1.7320508075688772}}},"df":0,"docs":{}},"r":{"df":0,"docs":{},"s":{"df":0,"docs":{},"t":{"df":2,"docs":{"14":{"tf":1.0},"7":{"tf":1.0}}}}},"x":{"df":0,"docs":{},"t":{"df":0,"docs":{},"u":{"df":0,"docs":{},"r":{"df":1,"docs":{"4":{"tf":1.0}}}}}}},"l":{"df":0,"docs":{},"o":{"a":{"df":0,"docs":{},"t":{"df":9,"docs":{"1":{"tf":1.0},"13":{"tf":2.0},"15":{"tf":1.4142135623730951},"16":{"tf":1.4142135623730951},"17":{"tf":1.0},"18":{"tf":1.4142135623730951},"20":{"tf":1.0},"21":{"tf":2.23606797749979},"6":{"tf":2.0}},"i":{"df":0,"docs":{},"n":{"df":0,"docs":{},"g":{"(":{"df":0,"docs":{},"s":{"df":0,"docs":{},"e":{"df":0,"docs":{},"s":{"df":0,"docs":{},"s":{"df":1,"docs":{"18":{"tf":1.0}}}}}}},"_":{"df":0,"docs":{},"i":{"d":{"(":{"df":0,"docs":{},"e":{"df":0,"docs":{},"v":{"df":1,"docs":{"17":{"tf":1.0}}}}},"df":5,"docs":{"13":{"tf":1.0},"15":{"tf":1.0},"16":{"tf":1.0},"17":{"tf":1.0},"6":{"tf":1.0}}},"df":0,"docs":{}}},"a":{"df":0,"docs":{},"n":{"c":{"df":0,"docs":{},"h":{"df":0,"docs":{},"o":{"df":0,"docs":{},"r":{"df":2,"docs":{"13":{"tf":1.0},"6":{"tf":1.0}}}}}},"df":0,"docs":{}}},"df":0,"docs":{},"r":{"df":0,"docs":{},"e":{"df":0,"docs":{},"f":{"df":3,"docs":{"15":{"tf":1.4142135623730951},"16":{"tf":1.4142135623730951},"21":{"tf":2.8284271247461903}}}}},"s":{"df":2,"docs":{"13":{"tf":1.4142135623730951},"6":{"tf":1.4142135623730951}}}}}}}},"df":0,"docs":{}}},"n":{"df":23,"docs":{"10":{"tf":2.8284271247461903},"11":{"tf":1.4142135623730951},"12":{"tf":1.4142135623730951},"13":{"tf":11.313708498984761},"14":{"tf":5.0990195135927845},"15":{"tf":4.898979485566356},"16":{"tf":4.47213595499958},"17":{"tf":3.1622776601683795},"18":{"tf":2.8284271247461903},"19":{"tf":6.0},"20":{"tf":5.477225575051661},"21":{"tf":3.7416573867739413},"22":{"tf":3.4641016151377544},"23":{"tf":3.4641016151377544},"24":{"tf":2.449489742783178},"25":{"tf":2.23606797749979},"26":{"tf":1.4142135623730951},"4":{"tf":1.7320508075688772},"5":{"tf":3.872983346207417},"6":{"tf":11.313708498984761},"7":{"tf":5.0990195135927845},"8":{"tf":2.449489742783178},"9":{"tf":2.23606797749979}},"p":{"df":0,"docs":{},"t":{"df":0,"docs":{},"r":{"df":2,"docs":{"12":{"tf":1.0},"5":{"tf":1.4142135623730951}}}}}},"o":{"c":{"df":0,"docs":{},"u":{"df":3,"docs":{"10":{"tf":1.0},"13":{"tf":2.6457513110645907},"6":{"tf":2.6457513110645907}},"s":{"_":{"b":{"df":0,"docs":{},"u":{"df":0,"docs":{},"f":{"df":0,"docs":{},"f":{"df":2,"docs":{"13":{"tf":1.0},"6":{"tf":1.0}},"e":{"df":0,"docs":{},"r":{"(":{"_":{"df":2,"docs":{"13":{"tf":1.0},"6":{"tf":1.0}}},"df":0,"docs":{}},"df":0,"docs":{}}}}}}},"d":{"df":0,"docs":{},"o":{"df":0,"docs":{},"w":{"df":0,"docs":{},"n":{"(":{"_":{"df":2,"docs":{"13":{"tf":1.0},"6":{"tf":1.0}}},"df":0,"docs":{}},"df":2,"docs":{"13":{"tf":1.0},"6":{"tf":1.0}}}}}},"df":0,"docs":{},"l":{"df":0,"docs":{},"e":{"df":0,"docs":{},"f":{"df":0,"docs":{},"t":{"(":{"_":{"df":2,"docs":{"13":{"tf":1.0},"6":{"tf":1.0}}},"df":0,"docs":{}},"df":2,"docs":{"13":{"tf":1.0},"6":{"tf":1.0}}}}}},"r":{"df":0,"docs":{},"i":{"df":0,"docs":{},"g":{"df":0,"docs":{},"h":{"df":0,"docs":{},"t":{"(":{"_":{"df":2,"docs":{"13":{"tf":1.0},"6":{"tf":1.0}}},"df":0,"docs":{}},"df":2,"docs":{"13":{"tf":1.0},"6":{"tf":1.0}}}}}}},"u":{"df":0,"docs":{},"p":{"(":{"_":{"df":2,"docs":{"13":{"tf":1.0},"6":{"tf":1.0}}},"df":0,"docs":{}},"df":2,"docs":{"13":{"tf":1.0},"6":{"tf":1.0}}}}},"df":9,"docs":{"10":{"tf":1.4142135623730951},"13":{"tf":3.3166247903554},"14":{"tf":1.7320508075688772},"15":{"tf":1.7320508075688772},"16":{"tf":1.7320508075688772},"20":{"tf":1.0},"21":{"tf":1.0},"6":{"tf":3.3166247903554},"7":{"tf":1.7320508075688772}}}}},"df":0,"docs":{},"l":{"df":0,"docs":{},"l":{"df":0,"docs":{},"o":{"df":0,"docs":{},"w":{"_":{"df":0,"docs":{},"o":{"df":0,"docs":{},"u":{"df":0,"docs":{},"t":{"df":0,"docs":{},"p":{"df":0,"docs":{},"u":{"df":0,"docs":{},"t":{"(":{"_":{"df":2,"docs":{"13":{"tf":1.0},"6":{"tf":1.0}}},"df":0,"docs":{}},"df":2,"docs":{"13":{"tf":1.0},"6":{"tf":1.0}}}}}}}}},"df":2,"docs":{"13":{"tf":1.0},"6":{"tf":1.0}}}}}},"r":{"df":0,"docs":{},"m":{"a":{"df":0,"docs":{},"t":{"_":{"df":0,"docs":{},"t":{"a":{"b":{"df":0,"docs":{},"s":{"(":{"c":{"df":0,"docs":{},"t":{"df":0,"docs":{},"x":{"df":1,"docs":{"4":{"tf":1.0}}}}},"df":0,"docs":{}},"df":0,"docs":{}}},"df":0,"docs":{}},"df":0,"docs":{}}},"df":2,"docs":{"12":{"tf":1.0},"22":{"tf":1.4142135623730951}},"t":{"df":2,"docs":{"0":{"tf":1.0},"22":{"tf":1.7320508075688772}}}}},"df":0,"docs":{}},"w":{"a":{"df":0,"docs":{},"r":{"d":{"df":1,"docs":{"10":{"tf":1.4142135623730951}}},"df":0,"docs":{}}},"df":0,"docs":{}}},"u":{"df":0,"docs":{},"n":{"d":{"df":2,"docs":{"24":{"tf":1.0},"8":{"tf":1.0}}},"df":0,"docs":{}}}},"u":{"df":0,"docs":{},"l":{"df":0,"docs":{},"l":{"df":3,"docs":{"19":{"tf":1.0},"25":{"tf":1.0},"9":{"tf":1.0}}}},"n":{"c":{"df":0,"docs":{},"t":{"df":0,"docs":{},"i":{"df":0,"docs":{},"o":{"df":0,"docs":{},"n":{"df":2,"docs":{"12":{"tf":1.0},"5":{"tf":1.0}}}}}}},"df":0,"docs":{}}}},"g":{"df":0,"docs":{},"e":{"df":0,"docs":{},"n":{"df":0,"docs":{},"e":{"df":0,"docs":{},"r":{"df":1,"docs":{"0":{"tf":1.0}}}}},"o":{"df":0,"docs":{},"m":{"df":0,"docs":{},"e":{"df":0,"docs":{},"t":{"df":0,"docs":{},"r":{"df":0,"docs":{},"i":{"df":2,"docs":{"20":{"tf":1.4142135623730951},"21":{"tf":1.4142135623730951}}},"y":{"(":{"df":0,"docs":{},"f":{"df":0,"docs":{},"l":{"df":0,"docs":{},"o":{"df":1,"docs":{"21":{"tf":1.0}}}}},"n":{"df":0,"docs":{},"o":{"d":{"df":1,"docs":{"20":{"tf":1.0}}},"df":0,"docs":{}}}},"df":0,"docs":{}}}}}}}},"l":{"df":0,"docs":{},"o":{"b":{"a":{"df":0,"docs":{},"l":{"df":23,"docs":{"1":{"tf":1.0},"10":{"tf":1.0},"11":{"tf":1.0},"12":{"tf":1.0},"13":{"tf":1.0},"14":{"tf":1.0},"15":{"tf":1.0},"16":{"tf":1.0},"17":{"tf":1.0},"18":{"tf":1.0},"19":{"tf":1.0},"20":{"tf":1.0},"21":{"tf":1.0},"22":{"tf":1.0},"23":{"tf":1.0},"24":{"tf":1.0},"25":{"tf":1.0},"26":{"tf":1.0},"5":{"tf":1.4142135623730951},"6":{"tf":1.0},"7":{"tf":1.0},"8":{"tf":1.0},"9":{"tf":1.0}}}},"df":0,"docs":{}},"df":0,"docs":{}}}},"h":{"a":{"df":0,"docs":{},"n":{"d":{"df":0,"docs":{},"l":{"df":0,"docs":{},"e":{"df":0,"docs":{},"r":{"df":1,"docs":{"0":{"tf":1.0}}}}}},"df":0,"docs":{}},"s":{"_":{"a":{"c":{"df":0,"docs":{},"t":{"df":1,"docs":{"23":{"tf":1.0}},"i":{"df":0,"docs":{},"v":{"df":0,"docs":{},"i":{"df":0,"docs":{},"t":{"df":0,"docs":{},"y":{"(":{"df":0,"docs":{},"t":{"a":{"b":{"df":1,"docs":{"23":{"tf":1.0}}},"df":0,"docs":{}},"df":0,"docs":{}}},"df":0,"docs":{}}}}}}}},"df":0,"docs":{}},"b":{"df":0,"docs":{},"e":{"df":0,"docs":{},"l":{"df":1,"docs":{"23":{"tf":1.0}},"l":{"(":{"df":0,"docs":{},"t":{"a":{"b":{"df":1,"docs":{"23":{"tf":1.0}}},"df":0,"docs":{}},"df":0,"docs":{}}},"df":0,"docs":{}}}}},"df":0,"docs":{}},"df":0,"docs":{}}},"df":0,"docs":{},"e":{"df":0,"docs":{},"i":{"df":0,"docs":{},"g":{"df":0,"docs":{},"h":{"df":0,"docs":{},"t":{"df":2,"docs":{"13":{"tf":1.4142135623730951},"6":{"tf":1.4142135623730951}}}}}}},"i":{"df":0,"docs":{},"n":{"df":0,"docs":{},"t":{"df":1,"docs":{"19":{"tf":1.0}}}},"s":{"df":0,"docs":{},"t":{"df":0,"docs":{},"o":{"df":0,"docs":{},"r":{"df":0,"docs":{},"i":{"df":1,"docs":{"19":{"tf":1.4142135623730951}}},"y":{"_":{"df":0,"docs":{},"t":{"df":0,"docs":{},"e":{"df":0,"docs":{},"x":{"df":0,"docs":{},"t":{"(":{"b":{"df":0,"docs":{},"u":{"df":0,"docs":{},"f":{"df":0,"docs":{},"f":{"df":1,"docs":{"19":{"tf":1.0}}}}}},"df":0,"docs":{}},"df":1,"docs":{"19":{"tf":1.0}}}}}}},"df":0,"docs":{}}}}}}},"o":{"df":0,"docs":{},"o":{"df":0,"docs":{},"k":{"df":1,"docs":{"5":{"tf":1.0}}}},"r":{"df":0,"docs":{},"i":{"df":0,"docs":{},"z":{"df":0,"docs":{},"o":{"df":0,"docs":{},"n":{"df":0,"docs":{},"t":{"df":4,"docs":{"13":{"tf":1.0},"14":{"tf":1.0},"6":{"tf":1.0},"7":{"tf":1.0}}}}}}}}}},"i":{"1":{"6":{"df":2,"docs":{"13":{"tf":1.4142135623730951},"6":{"tf":1.4142135623730951}}},"df":0,"docs":{}},"d":{"(":{"b":{"df":0,"docs":{},"u":{"df":0,"docs":{},"f":{"df":0,"docs":{},"f":{"df":1,"docs":{"19":{"tf":1.0}}}}}},"df":0,"docs":{},"f":{"df":0,"docs":{},"l":{"df":0,"docs":{},"o":{"a":{"df":0,"docs":{},"t":{"df":1,"docs":{"21":{"tf":1.0}}}},"df":0,"docs":{}}}},"n":{"df":0,"docs":{},"o":{"d":{"df":1,"docs":{"20":{"tf":1.0}}},"df":0,"docs":{}}},"s":{"df":0,"docs":{},"e":{"df":0,"docs":{},"s":{"df":0,"docs":{},"s":{"df":1,"docs":{"18":{"tf":1.0}}}}}}},"df":12,"docs":{"13":{"tf":2.6457513110645907},"14":{"tf":1.0},"15":{"tf":1.7320508075688772},"16":{"tf":1.7320508075688772},"17":{"tf":2.0},"18":{"tf":1.7320508075688772},"19":{"tf":2.23606797749979},"20":{"tf":2.449489742783178},"21":{"tf":2.0},"22":{"tf":1.0},"6":{"tf":2.6457513110645907},"7":{"tf":1.0}}},"df":0,"docs":{},"n":{"c":{"df":0,"docs":{},"r":{"df":0,"docs":{},"e":{"df":0,"docs":{},"m":{"df":0,"docs":{},"e":{"df":0,"docs":{},"n":{"df":0,"docs":{},"t":{"df":2,"docs":{"13":{"tf":1.0},"6":{"tf":1.0}}}}}}}}},"d":{"df":0,"docs":{},"e":{"df":0,"docs":{},"x":{"(":{"df":0,"docs":{},"t":{"a":{"b":{"df":1,"docs":{"23":{"tf":1.0}}},"df":0,"docs":{}},"df":0,"docs":{}}},"df":5,"docs":{"13":{"tf":2.0},"20":{"tf":1.0},"22":{"tf":1.0},"23":{"tf":1.4142135623730951},"6":{"tf":2.0}}}}},"df":0,"docs":{},"f":{"df":0,"docs":{},"o":{"df":1,"docs":{"1":{"tf":1.4142135623730951}}}},"l":{"df":0,"docs":{},"i":{"df":0,"docs":{},"n":{"df":1,"docs":{"5":{"tf":1.0}}}}},"p":{"df":0,"docs":{},"u":{"df":0,"docs":{},"t":{"df":4,"docs":{"13":{"tf":1.7320508075688772},"15":{"tf":1.0},"5":{"tf":1.0},"6":{"tf":1.7320508075688772}}}}},"s":{"df":0,"docs":{},"e":{"df":0,"docs":{},"r":{"df":0,"docs":{},"t":{"_":{"df":0,"docs":{},"t":{"a":{"b":{"_":{"a":{"df":0,"docs":{},"f":{"df":0,"docs":{},"t":{"df":2,"docs":{"13":{"tf":1.0},"6":{"tf":1.0}},"e":{"df":0,"docs":{},"r":{"(":{"_":{"df":2,"docs":{"13":{"tf":1.0},"6":{"tf":1.0}}},"df":0,"docs":{}},"_":{"c":{"df":0,"docs":{},"u":{"df":0,"docs":{},"r":{"df":0,"docs":{},"r":{"df":2,"docs":{"13":{"tf":1.0},"6":{"tf":1.0}},"e":{"df":0,"docs":{},"n":{"df":0,"docs":{},"t":{"(":{"_":{"df":2,"docs":{"13":{"tf":1.0},"6":{"tf":1.0}}},"df":0,"docs":{}},"df":0,"docs":{}}}}}}}},"df":0,"docs":{}},"df":0,"docs":{}}}}}},"b":{"df":0,"docs":{},"e":{"df":0,"docs":{},"f":{"df":0,"docs":{},"o":{"df":0,"docs":{},"r":{"df":2,"docs":{"13":{"tf":1.0},"6":{"tf":1.0}},"e":{"(":{"_":{"df":2,"docs":{"13":{"tf":1.0},"6":{"tf":1.0}}},"df":0,"docs":{}},"_":{"c":{"df":0,"docs":{},"u":{"df":0,"docs":{},"r":{"df":0,"docs":{},"r":{"df":2,"docs":{"13":{"tf":1.0},"6":{"tf":1.0}},"e":{"df":0,"docs":{},"n":{"df":0,"docs":{},"t":{"(":{"_":{"df":2,"docs":{"13":{"tf":1.0},"6":{"tf":1.0}}},"df":0,"docs":{}},"df":0,"docs":{}}}}}}}},"df":0,"docs":{}},"df":0,"docs":{}}}}}}},"df":0,"docs":{}},"df":0,"docs":{}},"df":0,"docs":{}},"df":0,"docs":{}}},"df":2,"docs":{"13":{"tf":2.0},"6":{"tf":2.0}}}}}},"t":{"df":15,"docs":{"13":{"tf":4.47213595499958},"14":{"tf":1.4142135623730951},"15":{"tf":1.7320508075688772},"16":{"tf":1.7320508075688772},"17":{"tf":2.0},"18":{"tf":1.4142135623730951},"19":{"tf":2.449489742783178},"20":{"tf":2.23606797749979},"21":{"tf":1.7320508075688772},"22":{"tf":1.7320508075688772},"23":{"tf":1.4142135623730951},"24":{"tf":1.0},"6":{"tf":4.47213595499958},"7":{"tf":1.4142135623730951},"8":{"tf":1.0}}}},"s":{"_":{"a":{"c":{"df":0,"docs":{},"t":{"df":1,"docs":{"23":{"tf":1.0}},"i":{"df":0,"docs":{},"v":{"df":0,"docs":{},"e":{"(":{"df":0,"docs":{},"t":{"a":{"b":{"df":1,"docs":{"23":{"tf":1.0}}},"df":0,"docs":{}},"df":0,"docs":{}}},"df":0,"docs":{}}}}}},"df":0,"docs":{},"t":{"df":0,"docs":{},"t":{"a":{"c":{"df":0,"docs":{},"h":{"df":1,"docs":{"19":{"tf":1.0}},"e":{"d":{"(":{"b":{"df":0,"docs":{},"u":{"df":0,"docs":{},"f":{"df":0,"docs":{},"f":{"df":1,"docs":{"19":{"tf":1.0}}}}}},"df":0,"docs":{}},"df":0,"docs":{}},"df":0,"docs":{}}}},"df":0,"docs":{}},"df":0,"docs":{}}}},"d":{"df":0,"docs":{},"e":{"df":0,"docs":{},"t":{"a":{"c":{"df":0,"docs":{},"h":{"df":1,"docs":{"19":{"tf":1.0}},"e":{"d":{"(":{"b":{"df":0,"docs":{},"u":{"df":0,"docs":{},"f":{"df":0,"docs":{},"f":{"df":1,"docs":{"19":{"tf":1.0}}}}}},"df":0,"docs":{}},"df":0,"docs":{}},"df":0,"docs":{}}}},"df":0,"docs":{}},"df":0,"docs":{}}}},"df":0,"docs":{},"f":{"df":0,"docs":{},"l":{"df":0,"docs":{},"o":{"a":{"df":0,"docs":{},"t":{"df":0,"docs":{},"i":{"df":0,"docs":{},"n":{"df":0,"docs":{},"g":{"_":{"df":0,"docs":{},"r":{"df":0,"docs":{},"o":{"df":0,"docs":{},"o":{"df":0,"docs":{},"t":{"(":{"df":0,"docs":{},"n":{"df":0,"docs":{},"o":{"d":{"df":1,"docs":{"20":{"tf":1.0}}},"df":0,"docs":{}}}},"df":1,"docs":{"20":{"tf":1.0}}}}}}},"df":0,"docs":{}}}}}},"df":0,"docs":{}}},"o":{"c":{"df":0,"docs":{},"u":{"df":0,"docs":{},"s":{"df":2,"docs":{"20":{"tf":1.0},"21":{"tf":1.0}},"e":{"d":{"(":{"df":0,"docs":{},"f":{"df":0,"docs":{},"l":{"df":0,"docs":{},"o":{"df":1,"docs":{"21":{"tf":1.0}}}}},"n":{"df":0,"docs":{},"o":{"d":{"df":1,"docs":{"20":{"tf":1.0}}},"df":0,"docs":{}}}},"df":0,"docs":{}},"df":0,"docs":{}}}}},"df":0,"docs":{}}},"r":{"df":0,"docs":{},"o":{"df":0,"docs":{},"o":{"df":0,"docs":{},"t":{"(":{"b":{"a":{"df":0,"docs":{},"r":{"df":1,"docs":{"22":{"tf":1.0}}}},"df":0,"docs":{}},"df":0,"docs":{},"n":{"df":0,"docs":{},"o":{"d":{"df":1,"docs":{"20":{"tf":1.0}}},"df":0,"docs":{}}}},"df":2,"docs":{"20":{"tf":1.0},"22":{"tf":1.0}}}}},"u":{"df":0,"docs":{},"n":{"df":1,"docs":{"19":{"tf":1.0}},"n":{"df":0,"docs":{},"i":{"df":0,"docs":{},"n":{"df":0,"docs":{},"g":{"(":{"b":{"df":0,"docs":{},"u":{"df":0,"docs":{},"f":{"df":0,"docs":{},"f":{"df":1,"docs":{"19":{"tf":1.0}}}}}},"df":0,"docs":{}},"df":0,"docs":{}}}}}}}},"v":{"df":0,"docs":{},"i":{"df":0,"docs":{},"s":{"df":3,"docs":{"19":{"tf":1.0},"20":{"tf":1.0},"21":{"tf":1.0}},"i":{"b":{"df":0,"docs":{},"l":{"df":0,"docs":{},"e":{"(":{"b":{"df":0,"docs":{},"u":{"df":0,"docs":{},"f":{"df":0,"docs":{},"f":{"df":1,"docs":{"19":{"tf":1.0}}}}}},"df":0,"docs":{},"f":{"df":0,"docs":{},"l":{"df":0,"docs":{},"o":{"df":1,"docs":{"21":{"tf":1.0}}}}},"n":{"df":0,"docs":{},"o":{"d":{"df":1,"docs":{"20":{"tf":1.0}}},"df":0,"docs":{}}}},"df":0,"docs":{}}}},"df":0,"docs":{}}}}}},"df":0,"docs":{}}},"j":{"df":0,"docs":{},"u":{"df":0,"docs":{},"m":{"df":0,"docs":{},"p":{"df":2,"docs":{"13":{"tf":1.4142135623730951},"6":{"tf":1.4142135623730951}}}}}},"k":{"df":0,"docs":{},"e":{"df":0,"docs":{},"y":{"df":6,"docs":{"13":{"tf":1.7320508075688772},"14":{"tf":1.4142135623730951},"19":{"tf":1.0},"5":{"tf":1.4142135623730951},"6":{"tf":1.7320508075688772},"7":{"tf":1.4142135623730951}}}},"i":{"df":0,"docs":{},"l":{"df":0,"docs":{},"l":{"_":{"b":{"df":0,"docs":{},"u":{"df":0,"docs":{},"f":{"df":0,"docs":{},"f":{"df":2,"docs":{"13":{"tf":1.0},"6":{"tf":1.0}},"e":{"df":0,"docs":{},"r":{"(":{"_":{"df":2,"docs":{"13":{"tf":1.0},"6":{"tf":1.0}}},"df":0,"docs":{}},"_":{"df":0,"docs":{},"i":{"d":{"(":{"_":{"df":2,"docs":{"13":{"tf":1.0},"6":{"tf":1.0}}},"df":0,"docs":{}},"df":2,"docs":{"13":{"tf":1.0},"6":{"tf":1.0}}},"df":0,"docs":{}}},"df":0,"docs":{}}}}}}},"df":0,"docs":{}},"df":2,"docs":{"13":{"tf":1.4142135623730951},"6":{"tf":1.4142135623730951}}}},"n":{"d":{"(":{"df":0,"docs":{},"n":{"df":0,"docs":{},"o":{"d":{"df":1,"docs":{"20":{"tf":1.0}}},"df":0,"docs":{}}}},"df":1,"docs":{"20":{"tf":1.4142135623730951}}},"df":0,"docs":{}}}},"l":{"df":0,"docs":{},"e":{"a":{"d":{"df":0,"docs":{},"e":{"df":0,"docs":{},"r":{">":{"df":0,"docs":{},"w":{"df":1,"docs":{"5":{"tf":1.0}}}},"df":2,"docs":{"4":{"tf":1.0},"5":{"tf":1.0}}}}},"df":0,"docs":{},"v":{"df":2,"docs":{"13":{"tf":1.0},"6":{"tf":1.0}},"e":{"_":{"df":0,"docs":{},"m":{"df":0,"docs":{},"o":{"d":{"df":2,"docs":{"13":{"tf":1.0},"6":{"tf":1.0}},"e":{"(":{"_":{"df":2,"docs":{"13":{"tf":1.0},"6":{"tf":1.0}}},"df":0,"docs":{}},"df":0,"docs":{}}},"df":0,"docs":{}}}},"df":0,"docs":{}}}},"df":0,"docs":{},"f":{"df":0,"docs":{},"t":{"df":4,"docs":{"13":{"tf":1.4142135623730951},"25":{"tf":1.4142135623730951},"6":{"tf":1.4142135623730951},"9":{"tf":1.4142135623730951}}}},"v":{"df":0,"docs":{},"e":{"df":0,"docs":{},"l":{"df":3,"docs":{"0":{"tf":1.0},"13":{"tf":1.0},"6":{"tf":1.0}}}}}},"i":{"df":0,"docs":{},"m":{"df":0,"docs":{},"i":{"df":0,"docs":{},"t":{"df":1,"docs":{"19":{"tf":1.4142135623730951}}}}},"n":{"df":0,"docs":{},"e":{"df":3,"docs":{"13":{"tf":1.7320508075688772},"19":{"tf":1.0},"6":{"tf":1.7320508075688772}}}},"v":{"df":0,"docs":{},"e":{"df":3,"docs":{"0":{"tf":1.4142135623730951},"13":{"tf":1.0},"6":{"tf":1.0}}}}},"o":{"c":{"a":{"df":0,"docs":{},"l":{"df":2,"docs":{"13":{"tf":2.449489742783178},"6":{"tf":2.449489742783178}}}},"df":0,"docs":{}},"df":0,"docs":{},"o":{"df":0,"docs":{},"k":{"df":1,"docs":{"19":{"tf":1.0}}}}}},"m":{"a":{"df":0,"docs":{},"i":{"df":0,"docs":{},"n":{"df":1,"docs":{"4":{"tf":1.0}}}},"n":{"df":0,"docs":{},"i":{"df":1,"docs":{"23":{"tf":1.0}}}},"p":{"<":{"df":0,"docs":{},"s":{"df":0,"docs":{},"t":{"df":0,"docs":{},"r":{"df":2,"docs":{"14":{"tf":1.0},"7":{"tf":1.0}}}}}},"df":10,"docs":{"11":{"tf":1.0},"13":{"tf":1.4142135623730951},"14":{"tf":1.0},"20":{"tf":1.4142135623730951},"21":{"tf":1.4142135623730951},"25":{"tf":1.0},"5":{"tf":1.0},"6":{"tf":1.4142135623730951},"7":{"tf":1.0},"9":{"tf":1.0}}},"r":{"df":0,"docs":{},"k":{"df":0,"docs":{},"e":{"df":0,"docs":{},"r":{"df":1,"docs":{"23":{"tf":1.0}}}}}},"t":{"c":{"df":0,"docs":{},"h":{"df":2,"docs":{"13":{"tf":1.4142135623730951},"6":{"tf":1.4142135623730951}}}},"df":0,"docs":{}}},"df":0,"docs":{},"e":{"df":0,"docs":{},"s":{"df":0,"docs":{},"s":{"a":{"df":0,"docs":{},"g":{"df":2,"docs":{"13":{"tf":1.0},"6":{"tf":1.0}}}},"df":0,"docs":{}}},"t":{"a":{"d":{"a":{"df":0,"docs":{},"t":{"a":{"df":1,"docs":{"22":{"tf":1.0}}},"df":0,"docs":{}}},"df":0,"docs":{}},"df":0,"docs":{}},"df":0,"docs":{}}},"o":{"d":{"df":0,"docs":{},"e":{"(":{"b":{"a":{"df":0,"docs":{},"r":{"df":1,"docs":{"22":{"tf":1.0}}}},"df":0,"docs":{}},"df":0,"docs":{}},"df":6,"docs":{"0":{"tf":1.0},"13":{"tf":3.0},"15":{"tf":1.0},"22":{"tf":1.4142135623730951},"5":{"tf":1.0},"6":{"tf":3.0}},"l":{"df":2,"docs":{"15":{"tf":1.4142135623730951},"16":{"tf":1.4142135623730951}}}}},"df":0,"docs":{},"u":{"df":0,"docs":{},"s":{"df":2,"docs":{"1":{"tf":1.0},"10":{"tf":1.4142135623730951}},"e":{".":{"df":0,"docs":{},"s":{"df":0,"docs":{},"e":{"df":0,"docs":{},"t":{"_":{"c":{"df":0,"docs":{},"l":{"df":0,"docs":{},"i":{"c":{"df":0,"docs":{},"k":{"_":{"df":0,"docs":{},"f":{"df":0,"docs":{},"o":{"c":{"df":0,"docs":{},"u":{"df":0,"docs":{},"s":{"(":{"df":0,"docs":{},"t":{"df":0,"docs":{},"r":{"df":0,"docs":{},"u":{"df":1,"docs":{"4":{"tf":1.0}}}}}},"df":0,"docs":{}}}},"df":0,"docs":{}}}},"df":0,"docs":{}}},"df":0,"docs":{}}}},"df":0,"docs":{}},"df":0,"docs":{}}}}},"a":{"df":0,"docs":{},"p":{"df":0,"docs":{},"i":{"df":1,"docs":{"10":{"tf":2.0}}}}},"df":0,"docs":{}}}},"v":{"df":0,"docs":{},"e":{"_":{"b":{"df":0,"docs":{},"u":{"df":0,"docs":{},"f":{"df":0,"docs":{},"f":{"df":0,"docs":{},"e":{"df":0,"docs":{},"r":{"_":{"df":0,"docs":{},"t":{"df":0,"docs":{},"o":{"_":{"df":0,"docs":{},"f":{"df":0,"docs":{},"l":{"df":0,"docs":{},"o":{"a":{"df":0,"docs":{},"t":{"df":0,"docs":{},"i":{"df":0,"docs":{},"n":{"df":0,"docs":{},"g":{"(":{"_":{"df":2,"docs":{"13":{"tf":1.0},"6":{"tf":1.0}}},"df":0,"docs":{}},"df":0,"docs":{}}}}}},"df":2,"docs":{"13":{"tf":1.0},"6":{"tf":1.0}}}}},"n":{"df":0,"docs":{},"o":{"d":{"df":2,"docs":{"13":{"tf":1.0},"6":{"tf":1.0}},"e":{"(":{"_":{"df":2,"docs":{"13":{"tf":1.0},"6":{"tf":1.0}}},"df":0,"docs":{}},"df":0,"docs":{}}},"df":0,"docs":{}}}},"df":0,"docs":{}}}},"df":0,"docs":{}}}}}}},"df":0,"docs":{}},"df":2,"docs":{"13":{"tf":2.449489742783178},"6":{"tf":2.449489742783178}}}}},"u":{"df":0,"docs":{},"l":{"df":0,"docs":{},"t":{"df":0,"docs":{},"i":{"df":0,"docs":{},"p":{"df":0,"docs":{},"l":{"df":3,"docs":{"13":{"tf":1.0},"5":{"tf":1.0},"6":{"tf":1.0}}}}}}},"x":{"a":{"df":0,"docs":{},"p":{"df":0,"docs":{},"i":{"df":1,"docs":{"16":{"tf":3.1622776601683795}}}}},"df":2,"docs":{"1":{"tf":1.0},"16":{"tf":1.0}}}}},"n":{"a":{"df":0,"docs":{},"m":{"df":0,"docs":{},"e":{"(":{"df":0,"docs":{},"e":{"df":0,"docs":{},"v":{"df":1,"docs":{"17":{"tf":1.0}}}},"s":{"df":0,"docs":{},"e":{"df":0,"docs":{},"s":{"df":0,"docs":{},"s":{"df":1,"docs":{"18":{"tf":1.0}}}}}}},"df":13,"docs":{"0":{"tf":1.4142135623730951},"11":{"tf":1.0},"13":{"tf":2.23606797749979},"15":{"tf":1.0},"17":{"tf":1.4142135623730951},"18":{"tf":1.4142135623730951},"19":{"tf":1.4142135623730951},"22":{"tf":1.0},"24":{"tf":1.4142135623730951},"26":{"tf":1.4142135623730951},"5":{"tf":1.7320508075688772},"6":{"tf":2.23606797749979},"8":{"tf":1.4142135623730951}},"s":{"df":0,"docs":{},"p":{"a":{"c":{"df":22,"docs":{"10":{"tf":1.0},"11":{"tf":1.0},"12":{"tf":1.0},"13":{"tf":1.0},"14":{"tf":1.0},"15":{"tf":1.0},"16":{"tf":1.0},"17":{"tf":1.0},"18":{"tf":1.0},"19":{"tf":1.0},"20":{"tf":1.0},"21":{"tf":1.0},"22":{"tf":1.0},"23":{"tf":1.0},"24":{"tf":1.0},"25":{"tf":1.0},"26":{"tf":1.0},"5":{"tf":1.0},"6":{"tf":1.0},"7":{"tf":1.0},"8":{"tf":1.0},"9":{"tf":1.0}}},"df":0,"docs":{}},"df":0,"docs":{}}}}}},"df":0,"docs":{},"e":{"df":0,"docs":{},"w":{"df":4,"docs":{"13":{"tf":2.0},"14":{"tf":1.0},"6":{"tf":2.0},"7":{"tf":1.0}}},"x":{"df":0,"docs":{},"t":{"_":{"c":{"df":0,"docs":{},"u":{"df":0,"docs":{},"r":{"df":0,"docs":{},"r":{"df":0,"docs":{},"e":{"df":0,"docs":{},"n":{"df":0,"docs":{},"t":{"_":{"df":0,"docs":{},"t":{"a":{"b":{"df":2,"docs":{"13":{"tf":1.0},"6":{"tf":1.0}},"s":{"(":{"_":{"df":2,"docs":{"13":{"tf":1.0},"6":{"tf":1.0}}},"df":0,"docs":{}},"df":0,"docs":{}}},"df":0,"docs":{}},"df":0,"docs":{}}},"df":0,"docs":{}}}}}}}},"df":0,"docs":{},"t":{"a":{"b":{"(":{"_":{"df":2,"docs":{"13":{"tf":1.0},"6":{"tf":1.0}}},"df":0,"docs":{}},"df":2,"docs":{"13":{"tf":1.0},"6":{"tf":1.0}}},"df":0,"docs":{}},"df":0,"docs":{}}},"df":2,"docs":{"13":{"tf":1.7320508075688772},"6":{"tf":1.7320508075688772}}}}},"o":{"d":{"df":0,"docs":{},"e":{"_":{"df":0,"docs":{},"i":{"d":{"(":{"b":{"a":{"df":0,"docs":{},"r":{"df":1,"docs":{"22":{"tf":1.0}}}},"df":0,"docs":{},"u":{"df":0,"docs":{},"f":{"df":0,"docs":{},"f":{"df":1,"docs":{"19":{"tf":1.0}}}}}},"df":0,"docs":{},"e":{"df":0,"docs":{},"v":{"df":1,"docs":{"17":{"tf":1.0}}}}},"df":7,"docs":{"13":{"tf":1.7320508075688772},"15":{"tf":1.0},"16":{"tf":1.0},"17":{"tf":1.0},"19":{"tf":1.0},"22":{"tf":1.0},"6":{"tf":1.7320508075688772}}},"df":0,"docs":{}}},"df":13,"docs":{"1":{"tf":1.0},"13":{"tf":4.242640687119285},"14":{"tf":1.4142135623730951},"15":{"tf":1.4142135623730951},"16":{"tf":1.4142135623730951},"17":{"tf":1.0},"18":{"tf":1.0},"19":{"tf":1.4142135623730951},"20":{"tf":3.0},"21":{"tf":1.0},"22":{"tf":1.0},"6":{"tf":4.242640687119285},"7":{"tf":1.4142135623730951}},"r":{"df":0,"docs":{},"e":{"df":0,"docs":{},"f":{"df":3,"docs":{"15":{"tf":1.4142135623730951},"16":{"tf":1.4142135623730951},"20":{"tf":4.0}}}}}}},"df":0,"docs":{},"n":{"df":0,"docs":{},"e":{"df":2,"docs":{"13":{"tf":1.0},"6":{"tf":1.0}}}},"o":{"df":0,"docs":{},"p":{"(":{"_":{"df":2,"docs":{"13":{"tf":1.0},"6":{"tf":1.0}}},"df":0,"docs":{}},"df":2,"docs":{"13":{"tf":1.0},"6":{"tf":1.0}}}},"t":{"a":{"df":0,"docs":{},"t":{"df":3,"docs":{"13":{"tf":2.0},"5":{"tf":2.449489742783178},"6":{"tf":2.0}}}},"df":0,"docs":{},"i":{"df":0,"docs":{},"f":{"df":2,"docs":{"13":{"tf":1.0},"6":{"tf":1.0}},"i":{"df":2,"docs":{"13":{"tf":1.0},"6":{"tf":1.0}}},"y":{"(":{"_":{"df":2,"docs":{"13":{"tf":1.0},"6":{"tf":1.0}}},"df":0,"docs":{}},"df":0,"docs":{}}}}},"w":{"(":{"_":{"df":2,"docs":{"24":{"tf":1.0},"8":{"tf":1.0}}},"df":0,"docs":{}},"df":2,"docs":{"24":{"tf":1.0},"8":{"tf":1.0}}}},"u":{"df":0,"docs":{},"m":{"df":0,"docs":{},"e":{"df":0,"docs":{},"r":{"df":4,"docs":{"15":{"tf":1.7320508075688772},"16":{"tf":1.7320508075688772},"18":{"tf":1.0},"19":{"tf":1.0}}}}}}},"o":{"df":0,"docs":{},"f":{"df":0,"docs":{},"f":{"df":0,"docs":{},"s":{"df":0,"docs":{},"e":{"df":0,"docs":{},"t":{"df":2,"docs":{"13":{"tf":1.4142135623730951},"6":{"tf":1.4142135623730951}}}}}}},"n":{"(":{"df":0,"docs":{},"e":{"df":0,"docs":{},"v":{"df":0,"docs":{},"e":{"df":0,"docs":{},"n":{"df":0,"docs":{},"t":{"_":{"df":0,"docs":{},"n":{"a":{"df":0,"docs":{},"m":{"df":1,"docs":{"5":{"tf":1.0}}}},"df":0,"docs":{}}},"df":0,"docs":{}}}}}}},"_":{"df":0,"docs":{},"e":{"df":0,"docs":{},"n":{"df":0,"docs":{},"t":{"df":1,"docs":{"5":{"tf":1.0}}}}},"l":{"df":0,"docs":{},"e":{"a":{"df":0,"docs":{},"v":{"df":1,"docs":{"5":{"tf":1.0}}}},"df":0,"docs":{}}}},"df":2,"docs":{"13":{"tf":2.23606797749979},"6":{"tf":2.23606797749979}}},"p":{"df":2,"docs":{"13":{"tf":1.0},"6":{"tf":1.0}},"e":{"df":0,"docs":{},"n":{"_":{"df":0,"docs":{},"f":{"df":0,"docs":{},"l":{"df":0,"docs":{},"o":{"a":{"df":0,"docs":{},"t":{"df":0,"docs":{},"i":{"df":0,"docs":{},"n":{"df":0,"docs":{},"g":{"(":{"_":{"df":2,"docs":{"13":{"tf":1.0},"6":{"tf":1.0}}},"df":0,"docs":{}},"df":0,"docs":{}}}}}},"df":2,"docs":{"13":{"tf":1.0},"6":{"tf":1.0}}}}}},"df":2,"docs":{"13":{"tf":1.0},"6":{"tf":1.0}}}},"t":{"df":0,"docs":{},"i":{"df":0,"docs":{},"o":{"df":0,"docs":{},"n":{"<":{"df":0,"docs":{},"s":{"df":0,"docs":{},"t":{"df":0,"docs":{},"r":{"df":2,"docs":{"13":{"tf":1.0},"6":{"tf":1.0}}}}}},"df":7,"docs":{"13":{"tf":1.7320508075688772},"14":{"tf":1.4142135623730951},"25":{"tf":1.0},"5":{"tf":1.7320508075688772},"6":{"tf":1.7320508075688772},"7":{"tf":1.4142135623730951},"9":{"tf":1.0}}}}}}},"r":{"df":0,"docs":{},"i":{"df":0,"docs":{},"g":{"df":0,"docs":{},"i":{"df":0,"docs":{},"n":{"df":1,"docs":{"19":{"tf":1.0}}}}}}},"u":{"df":0,"docs":{},"t":{"df":0,"docs":{},"p":{"df":0,"docs":{},"u":{"df":0,"docs":{},"t":{"df":2,"docs":{"13":{"tf":1.0},"6":{"tf":1.0}}}}}}},"v":{"df":0,"docs":{},"e":{"df":0,"docs":{},"r":{"df":0,"docs":{},"l":{"df":0,"docs":{},"o":{"a":{"d":{"df":1,"docs":{"5":{"tf":1.4142135623730951}}},"df":0,"docs":{}},"df":0,"docs":{}}}}}},"w":{"df":0,"docs":{},"n":{"df":2,"docs":{"20":{"tf":1.0},"21":{"tf":1.0}}}}},"p":{"a":{"df":0,"docs":{},"g":{"df":0,"docs":{},"e":{"df":3,"docs":{"1":{"tf":1.0},"13":{"tf":1.4142135623730951},"6":{"tf":1.4142135623730951}}}},"l":{"df":0,"docs":{},"e":{"df":0,"docs":{},"t":{"df":0,"docs":{},"t":{"df":2,"docs":{"11":{"tf":1.4142135623730951},"26":{"tf":1.0}}}}}},"r":{"df":0,"docs":{},"e":{"df":0,"docs":{},"n":{"df":0,"docs":{},"t":{"(":{"df":0,"docs":{},"n":{"df":0,"docs":{},"o":{"d":{"df":1,"docs":{"20":{"tf":1.0}}},"df":0,"docs":{}}}},"df":1,"docs":{"20":{"tf":1.4142135623730951}}}}},"t":{"df":0,"docs":{},"i":{"a":{"df":0,"docs":{},"l":{"df":2,"docs":{"13":{"tf":1.0},"6":{"tf":1.0}}}},"df":0,"docs":{}}}},"t":{"df":0,"docs":{},"h":{"df":3,"docs":{"19":{"tf":1.0},"24":{"tf":1.0},"8":{"tf":1.0}}}},"y":{"df":0,"docs":{},"l":{"df":0,"docs":{},"o":{"a":{"d":{"df":1,"docs":{"15":{"tf":1.0}}},"df":0,"docs":{}},"df":0,"docs":{}}}}},"df":0,"docs":{},"e":{"df":0,"docs":{},"r":{"c":{"df":0,"docs":{},"e":{"df":0,"docs":{},"n":{"df":0,"docs":{},"t":{"a":{"df":0,"docs":{},"g":{"df":2,"docs":{"13":{"tf":1.4142135623730951},"6":{"tf":1.4142135623730951}}}},"df":0,"docs":{}}}}},"df":0,"docs":{}}},"h":{"a":{"df":0,"docs":{},"s":{"df":0,"docs":{},"e":{"df":2,"docs":{"0":{"tf":1.0},"4":{"tf":1.0}}}}},"df":0,"docs":{}},"i":{"d":{"(":{"b":{"df":0,"docs":{},"u":{"df":0,"docs":{},"f":{"df":0,"docs":{},"f":{"df":1,"docs":{"19":{"tf":1.0}}}}}},"df":0,"docs":{}},"df":1,"docs":{"19":{"tf":1.0}}},"df":0,"docs":{},"x":{"df":0,"docs":{},"e":{"df":0,"docs":{},"l":{"df":2,"docs":{"13":{"tf":1.4142135623730951},"6":{"tf":1.4142135623730951}}}}}},"l":{"a":{"df":0,"docs":{},"i":{"df":0,"docs":{},"n":{"df":2,"docs":{"25":{"tf":1.0},"9":{"tf":1.0}}}}},"df":0,"docs":{}},"o":{"df":0,"docs":{},"i":{"df":0,"docs":{},"n":{"df":0,"docs":{},"t":{"df":2,"docs":{"13":{"tf":1.0},"6":{"tf":1.0}},"e":{"df":0,"docs":{},"r":{"df":1,"docs":{"5":{"tf":1.0}}}}}}},"s":{"df":0,"docs":{},"i":{"df":0,"docs":{},"t":{"df":2,"docs":{"13":{"tf":1.0},"6":{"tf":1.0}}}}}},"r":{"df":0,"docs":{},"e":{"df":0,"docs":{},"s":{"df":0,"docs":{},"e":{"df":0,"docs":{},"n":{"df":0,"docs":{},"t":{"df":2,"docs":{"19":{"tf":1.0},"20":{"tf":1.0}}}}}},"v":{"_":{"c":{"df":0,"docs":{},"u":{"df":0,"docs":{},"r":{"df":0,"docs":{},"r":{"df":0,"docs":{},"e":{"df":0,"docs":{},"n":{"df":0,"docs":{},"t":{"_":{"df":0,"docs":{},"t":{"a":{"b":{"df":2,"docs":{"13":{"tf":1.0},"6":{"tf":1.0}},"s":{"(":{"_":{"df":2,"docs":{"13":{"tf":1.0},"6":{"tf":1.0}}},"df":0,"docs":{}},"df":0,"docs":{}}},"df":0,"docs":{}},"df":0,"docs":{}}},"df":0,"docs":{}}}}}}}},"df":0,"docs":{},"t":{"a":{"b":{"(":{"_":{"df":2,"docs":{"13":{"tf":1.0},"6":{"tf":1.0}}},"df":0,"docs":{}},"df":2,"docs":{"13":{"tf":1.0},"6":{"tf":1.0}}},"df":0,"docs":{}},"df":0,"docs":{}}},"df":0,"docs":{},"i":{"df":0,"docs":{},"o":{"df":0,"docs":{},"u":{"df":2,"docs":{"13":{"tf":1.7320508075688772},"6":{"tf":1.7320508075688772}},"s":{"df":1,"docs":{"5":{"tf":1.0}}}}}}}},"i":{"df":0,"docs":{},"n":{"df":0,"docs":{},"t":{"(":{"b":{"df":0,"docs":{},"u":{"df":0,"docs":{},"f":{"df":0,"docs":{},"f":{"df":0,"docs":{},"e":{"df":0,"docs":{},"r":{".":{"df":0,"docs":{},"t":{"df":0,"docs":{},"i":{"df":0,"docs":{},"t":{"df":0,"docs":{},"l":{"df":1,"docs":{"15":{"tf":1.0}}}}}}},"df":0,"docs":{}}}}}}},"df":0,"docs":{}},"df":0,"docs":{}}}},"o":{"c":{"df":0,"docs":{},"e":{"df":0,"docs":{},"s":{"df":0,"docs":{},"s":{"_":{"df":0,"docs":{},"n":{"a":{"df":0,"docs":{},"m":{"df":1,"docs":{"19":{"tf":1.0}},"e":{"(":{"b":{"df":0,"docs":{},"u":{"df":0,"docs":{},"f":{"df":0,"docs":{},"f":{"df":1,"docs":{"19":{"tf":1.0}}}}}},"df":0,"docs":{}},"df":0,"docs":{}}}},"df":0,"docs":{}}},"df":1,"docs":{"19":{"tf":2.0}}}}}},"d":{"df":0,"docs":{},"u":{"c":{"df":2,"docs":{"25":{"tf":1.0},"9":{"tf":1.0}}},"df":0,"docs":{}}},"df":0,"docs":{},"v":{"df":0,"docs":{},"i":{"d":{"df":2,"docs":{"13":{"tf":1.4142135623730951},"6":{"tf":1.4142135623730951}}},"df":0,"docs":{}}}}}},"r":{"df":0,"docs":{},"e":{"a":{"d":{"df":3,"docs":{"24":{"tf":1.0},"26":{"tf":1.0},"8":{"tf":1.0}}},"df":0,"docs":{}},"c":{"df":0,"docs":{},"e":{"df":0,"docs":{},"i":{"df":0,"docs":{},"v":{"df":2,"docs":{"25":{"tf":1.0},"9":{"tf":1.0}}}}}},"df":2,"docs":{"13":{"tf":1.0},"6":{"tf":1.0}},"f":{"df":1,"docs":{"1":{"tf":2.0}},"e":{"df":0,"docs":{},"r":{"df":5,"docs":{"0":{"tf":1.0},"14":{"tf":1.7320508075688772},"15":{"tf":1.0},"16":{"tf":1.0},"7":{"tf":1.7320508075688772}}}}},"g":{"df":0,"docs":{},"i":{"df":0,"docs":{},"s":{"df":0,"docs":{},"t":{"df":2,"docs":{"12":{"tf":1.0},"5":{"tf":1.4142135623730951}},"r":{"a":{"df":0,"docs":{},"t":{"df":0,"docs":{},"i":{"df":0,"docs":{},"o":{"df":0,"docs":{},"n":{".":{"df":0,"docs":{},"r":{"df":0,"docs":{},"h":{"a":{"df":0,"docs":{},"i":{"df":1,"docs":{"2":{"tf":1.0}}}},"df":0,"docs":{}}}},"df":0,"docs":{}}}}}},"df":7,"docs":{"0":{"tf":1.0},"1":{"tf":2.23606797749979},"5":{"tf":1.0},"6":{"tf":1.0},"7":{"tf":1.0},"8":{"tf":1.0},"9":{"tf":1.0}}}}}}},"j":{"df":0,"docs":{},"e":{"c":{"df":0,"docs":{},"t":{"df":2,"docs":{"14":{"tf":1.0},"7":{"tf":1.0}}}},"df":0,"docs":{}}},"m":{"df":0,"docs":{},"o":{"df":0,"docs":{},"v":{"df":1,"docs":{"5":{"tf":1.0}}}}},"p":{"df":0,"docs":{},"l":{"a":{"c":{"df":2,"docs":{"13":{"tf":1.4142135623730951},"6":{"tf":1.4142135623730951}},"e":{"_":{"c":{"df":0,"docs":{},"u":{"df":0,"docs":{},"r":{"df":0,"docs":{},"r":{"df":0,"docs":{},"e":{"df":0,"docs":{},"n":{"df":0,"docs":{},"t":{"_":{"df":0,"docs":{},"w":{"df":0,"docs":{},"i":{"df":0,"docs":{},"t":{"df":0,"docs":{},"h":{"(":{"_":{"df":2,"docs":{"13":{"tf":1.0},"6":{"tf":1.0}}},"df":0,"docs":{}},"df":2,"docs":{"13":{"tf":1.0},"6":{"tf":1.0}}}}}}},"df":0,"docs":{}}}}}}}},"df":0,"docs":{},"n":{"df":0,"docs":{},"o":{"d":{"df":2,"docs":{"13":{"tf":1.0},"6":{"tf":1.0}},"e":{"(":{"_":{"df":2,"docs":{"13":{"tf":1.0},"6":{"tf":1.0}}},"df":0,"docs":{}},"df":0,"docs":{}}},"df":0,"docs":{}}}},"df":0,"docs":{}}},"df":0,"docs":{}},"df":0,"docs":{}},"o":{"df":0,"docs":{},"s":{"df":0,"docs":{},"i":{"df":0,"docs":{},"t":{"df":0,"docs":{},"o":{"df":0,"docs":{},"r":{"df":0,"docs":{},"i":{"df":1,"docs":{"4":{"tf":1.0}}}}}}}}}},"q":{"df":0,"docs":{},"u":{"df":0,"docs":{},"e":{"df":0,"docs":{},"s":{"df":0,"docs":{},"t":{"df":1,"docs":{"19":{"tf":1.0}}}}}}},"s":{"df":0,"docs":{},"o":{"df":0,"docs":{},"l":{"df":0,"docs":{},"v":{"df":2,"docs":{"24":{"tf":1.0},"8":{"tf":1.0}}}}}},"t":{"df":0,"docs":{},"u":{"df":0,"docs":{},"r":{"df":0,"docs":{},"n":{"df":11,"docs":{"15":{"tf":3.4641016151377544},"16":{"tf":3.1622776601683795},"17":{"tf":2.23606797749979},"18":{"tf":2.0},"19":{"tf":4.123105625617661},"20":{"tf":3.872983346207417},"21":{"tf":2.6457513110645907},"22":{"tf":2.449489742783178},"23":{"tf":2.449489742783178},"24":{"tf":1.0},"8":{"tf":1.0}},"t":{"df":0,"docs":{},"y":{"df":0,"docs":{},"p":{"df":9,"docs":{"15":{"tf":2.8284271247461903},"16":{"tf":2.6457513110645907},"17":{"tf":2.0},"19":{"tf":2.8284271247461903},"20":{"tf":2.449489742783178},"21":{"tf":1.0},"24":{"tf":1.4142135623730951},"26":{"tf":1.0},"8":{"tf":1.4142135623730951}}}}}}}}},"v":{"df":0,"docs":{},"e":{"a":{"df":0,"docs":{},"l":{"_":{"b":{"df":0,"docs":{},"u":{"df":0,"docs":{},"f":{"df":0,"docs":{},"f":{"df":2,"docs":{"13":{"tf":1.0},"6":{"tf":1.0}},"e":{"df":0,"docs":{},"r":{"(":{"_":{"df":2,"docs":{"13":{"tf":1.0},"6":{"tf":1.0}}},"df":0,"docs":{}},"df":0,"docs":{}}}}}}},"df":0,"docs":{}},"df":2,"docs":{"13":{"tf":1.0},"6":{"tf":1.0}}}},"df":0,"docs":{}}}},"g":{"b":{"c":{"df":0,"docs":{},"o":{"df":0,"docs":{},"l":{"df":0,"docs":{},"o":{"df":0,"docs":{},"r":{"df":1,"docs":{"26":{"tf":1.0}}}}}}},"df":0,"docs":{}},"df":0,"docs":{}},"h":{"a":{"df":0,"docs":{},"i":{"df":1,"docs":{"0":{"tf":1.0}}}},"df":0,"docs":{}},"i":{"df":0,"docs":{},"g":{"df":0,"docs":{},"h":{"df":0,"docs":{},"t":{"df":4,"docs":{"13":{"tf":1.4142135623730951},"25":{"tf":1.4142135623730951},"6":{"tf":1.4142135623730951},"9":{"tf":1.4142135623730951}}}}}},"o":{"df":0,"docs":{},"o":{"df":0,"docs":{},"t":{"_":{"df":0,"docs":{},"n":{"df":0,"docs":{},"o":{"d":{"df":2,"docs":{"18":{"tf":1.0},"21":{"tf":1.0}},"e":{"(":{"df":0,"docs":{},"f":{"df":0,"docs":{},"l":{"df":0,"docs":{},"o":{"df":1,"docs":{"21":{"tf":1.0}}}}},"s":{"df":0,"docs":{},"e":{"df":0,"docs":{},"s":{"df":0,"docs":{},"s":{"df":1,"docs":{"18":{"tf":1.0}}}}}}},"df":0,"docs":{}}},"df":0,"docs":{}}}},"df":4,"docs":{"18":{"tf":1.0},"20":{"tf":1.4142135623730951},"21":{"tf":1.0},"22":{"tf":1.0}}}}},"u":{"df":0,"docs":{},"n":{"_":{"df":0,"docs":{},"n":{"a":{"df":0,"docs":{},"m":{"df":0,"docs":{},"e":{"d":{"_":{"a":{"c":{"df":0,"docs":{},"t":{"df":2,"docs":{"13":{"tf":1.0},"6":{"tf":1.0}},"i":{"df":0,"docs":{},"o":{"df":0,"docs":{},"n":{"(":{"_":{"df":2,"docs":{"13":{"tf":1.0},"6":{"tf":1.0}}},"df":0,"docs":{}},"df":0,"docs":{}}}}}},"df":0,"docs":{}},"df":0,"docs":{}},"df":0,"docs":{}},"df":0,"docs":{}}}},"df":0,"docs":{}}},"df":4,"docs":{"0":{"tf":1.0},"13":{"tf":1.0},"19":{"tf":1.0},"6":{"tf":1.0}},"t":{"df":0,"docs":{},"i":{"df":0,"docs":{},"m":{"df":3,"docs":{"0":{"tf":1.0},"1":{"tf":1.4142135623730951},"26":{"tf":1.4142135623730951}},"e":{".":{"df":0,"docs":{},"r":{"df":0,"docs":{},"h":{"a":{"df":0,"docs":{},"i":{"df":1,"docs":{"2":{"tf":1.0}}}},"df":0,"docs":{}}}},"df":0,"docs":{}}}}}},"s":{"df":0,"docs":{},"t":{"df":1,"docs":{"0":{"tf":1.0}}}}}},"s":{"c":{"df":0,"docs":{},"r":{"df":0,"docs":{},"o":{"df":0,"docs":{},"l":{"df":0,"docs":{},"l":{"_":{"df":0,"docs":{},"l":{"df":0,"docs":{},"i":{"df":0,"docs":{},"n":{"df":0,"docs":{},"e":{"_":{"d":{"df":0,"docs":{},"o":{"df":0,"docs":{},"w":{"df":0,"docs":{},"n":{"(":{"_":{"df":2,"docs":{"13":{"tf":1.0},"6":{"tf":1.0}}},"df":0,"docs":{}},"df":2,"docs":{"13":{"tf":1.0},"6":{"tf":1.0}}}}}},"df":0,"docs":{},"u":{"df":0,"docs":{},"p":{"(":{"_":{"df":2,"docs":{"13":{"tf":1.0},"6":{"tf":1.0}}},"df":0,"docs":{}},"df":2,"docs":{"13":{"tf":1.0},"6":{"tf":1.0}}}}},"df":0,"docs":{}}}}},"p":{"a":{"df":0,"docs":{},"g":{"df":0,"docs":{},"e":{"_":{"d":{"df":0,"docs":{},"o":{"df":0,"docs":{},"w":{"df":0,"docs":{},"n":{"(":{"_":{"df":2,"docs":{"13":{"tf":1.0},"6":{"tf":1.0}}},"df":0,"docs":{}},"df":2,"docs":{"13":{"tf":1.0},"6":{"tf":1.0}}}}}},"df":0,"docs":{},"u":{"df":0,"docs":{},"p":{"(":{"_":{"df":2,"docs":{"13":{"tf":1.0},"6":{"tf":1.0}}},"df":0,"docs":{}},"df":2,"docs":{"13":{"tf":1.0},"6":{"tf":1.0}}}}},"df":0,"docs":{}}}},"df":0,"docs":{}},"t":{"df":0,"docs":{},"o":{"_":{"b":{"df":0,"docs":{},"o":{"df":0,"docs":{},"t":{"df":0,"docs":{},"t":{"df":0,"docs":{},"o":{"df":0,"docs":{},"m":{"(":{"_":{"df":2,"docs":{"13":{"tf":1.0},"6":{"tf":1.0}}},"df":0,"docs":{}},"df":2,"docs":{"13":{"tf":1.0},"6":{"tf":1.0}}}}}}}},"df":0,"docs":{},"t":{"df":0,"docs":{},"o":{"df":0,"docs":{},"p":{"(":{"_":{"df":2,"docs":{"13":{"tf":1.0},"6":{"tf":1.0}}},"df":0,"docs":{}},"df":2,"docs":{"13":{"tf":1.0},"6":{"tf":1.0}}}}}},"df":0,"docs":{}}}},"b":{"a":{"c":{"df":0,"docs":{},"k":{"df":2,"docs":{"13":{"tf":2.449489742783178},"6":{"tf":2.449489742783178}}}},"df":0,"docs":{}},"df":0,"docs":{}},"df":3,"docs":{"10":{"tf":1.0},"13":{"tf":2.449489742783178},"6":{"tf":2.449489742783178}}}}}}},"df":0,"docs":{},"e":{"a":{"df":0,"docs":{},"r":{"c":{"df":0,"docs":{},"h":{"_":{"df":0,"docs":{},"n":{"df":0,"docs":{},"e":{"df":0,"docs":{},"x":{"df":0,"docs":{},"t":{"(":{"_":{"df":2,"docs":{"13":{"tf":1.0},"6":{"tf":1.0}}},"df":0,"docs":{}},"df":2,"docs":{"13":{"tf":1.0},"6":{"tf":1.0}}}}}},"p":{"df":0,"docs":{},"r":{"df":0,"docs":{},"e":{"df":0,"docs":{},"v":{"(":{"_":{"df":2,"docs":{"13":{"tf":1.0},"6":{"tf":1.0}}},"df":0,"docs":{}},"df":2,"docs":{"13":{"tf":1.0},"6":{"tf":1.0}}}}}}},"df":2,"docs":{"13":{"tf":2.0},"6":{"tf":2.0}}}},"df":0,"docs":{}}},"c":{"df":0,"docs":{},"o":{"df":0,"docs":{},"n":{"d":{"df":2,"docs":{"24":{"tf":1.0},"8":{"tf":1.0}}},"df":0,"docs":{}}}},"df":0,"docs":{},"g":{"df":0,"docs":{},"m":{"df":0,"docs":{},"e":{"df":0,"docs":{},"n":{"df":0,"docs":{},"t":{"(":{"_":{"df":2,"docs":{"25":{"tf":1.7320508075688772},"9":{"tf":1.7320508075688772}}},"df":0,"docs":{}},"df":2,"docs":{"25":{"tf":1.4142135623730951},"9":{"tf":1.4142135623730951}}}}}}},"l":{"df":0,"docs":{},"e":{"c":{"df":0,"docs":{},"t":{"_":{"c":{"df":0,"docs":{},"u":{"df":0,"docs":{},"r":{"df":0,"docs":{},"r":{"df":0,"docs":{},"e":{"df":0,"docs":{},"n":{"df":0,"docs":{},"t":{"_":{"df":0,"docs":{},"t":{"a":{"b":{"df":2,"docs":{"13":{"tf":1.0},"6":{"tf":1.0}},"s":{"(":{"_":{"df":2,"docs":{"13":{"tf":1.0},"6":{"tf":1.0}}},"df":0,"docs":{}},"df":0,"docs":{}}},"df":0,"docs":{}},"df":0,"docs":{}}},"df":0,"docs":{}}}}}}}},"df":0,"docs":{},"m":{"df":0,"docs":{},"o":{"df":0,"docs":{},"v":{"df":0,"docs":{},"e":{"_":{"d":{"df":0,"docs":{},"o":{"df":0,"docs":{},"w":{"df":0,"docs":{},"n":{"(":{"_":{"df":2,"docs":{"13":{"tf":1.0},"6":{"tf":1.0}}},"df":0,"docs":{}},"df":2,"docs":{"13":{"tf":1.0},"6":{"tf":1.0}}}}}},"df":0,"docs":{},"l":{"df":0,"docs":{},"e":{"df":0,"docs":{},"f":{"df":0,"docs":{},"t":{"(":{"_":{"df":2,"docs":{"13":{"tf":1.0},"6":{"tf":1.0}}},"df":0,"docs":{}},"df":2,"docs":{"13":{"tf":1.0},"6":{"tf":1.0}}}}}},"r":{"df":0,"docs":{},"i":{"df":0,"docs":{},"g":{"df":0,"docs":{},"h":{"df":0,"docs":{},"t":{"(":{"_":{"df":2,"docs":{"13":{"tf":1.0},"6":{"tf":1.0}}},"df":0,"docs":{}},"df":2,"docs":{"13":{"tf":1.0},"6":{"tf":1.0}}}}}}},"u":{"df":0,"docs":{},"p":{"(":{"_":{"df":2,"docs":{"13":{"tf":1.0},"6":{"tf":1.0}}},"df":0,"docs":{}},"df":2,"docs":{"13":{"tf":1.0},"6":{"tf":1.0}}}}},"df":0,"docs":{}}}}},"t":{"a":{"b":{"(":{"_":{"df":2,"docs":{"13":{"tf":1.0},"6":{"tf":1.0}}},"df":0,"docs":{}},"df":2,"docs":{"13":{"tf":1.0},"6":{"tf":1.0}}},"df":0,"docs":{}},"df":0,"docs":{}}},"df":2,"docs":{"13":{"tf":4.0},"6":{"tf":4.0}}}},"df":0,"docs":{}}},"n":{"d":{"_":{"b":{"df":0,"docs":{},"y":{"df":0,"docs":{},"t":{"df":2,"docs":{"13":{"tf":1.0},"6":{"tf":1.0}},"e":{"df":0,"docs":{},"s":{"(":{"_":{"df":2,"docs":{"13":{"tf":1.4142135623730951},"6":{"tf":1.4142135623730951}}},"df":0,"docs":{}},"_":{"c":{"df":0,"docs":{},"u":{"df":0,"docs":{},"r":{"df":0,"docs":{},"r":{"df":2,"docs":{"13":{"tf":1.0},"6":{"tf":1.0}},"e":{"df":0,"docs":{},"n":{"df":0,"docs":{},"t":{"(":{"_":{"df":2,"docs":{"13":{"tf":1.4142135623730951},"6":{"tf":1.4142135623730951}}},"df":0,"docs":{}},"df":0,"docs":{}}}}}}}},"df":0,"docs":{}},"df":0,"docs":{}}}}}},"df":0,"docs":{},"k":{"df":0,"docs":{},"e":{"df":0,"docs":{},"y":{"df":2,"docs":{"13":{"tf":1.0},"6":{"tf":1.0}},"s":{"(":{"_":{"df":2,"docs":{"13":{"tf":1.0},"6":{"tf":1.0}}},"df":0,"docs":{}},"_":{"c":{"df":0,"docs":{},"u":{"df":0,"docs":{},"r":{"df":0,"docs":{},"r":{"df":2,"docs":{"13":{"tf":1.0},"6":{"tf":1.0}},"e":{"df":0,"docs":{},"n":{"df":0,"docs":{},"t":{"(":{"_":{"df":2,"docs":{"13":{"tf":1.0},"6":{"tf":1.0}}},"df":0,"docs":{}},"df":0,"docs":{}}}}}}}},"df":0,"docs":{}},"df":0,"docs":{}}}}}},"df":2,"docs":{"13":{"tf":2.0},"6":{"tf":2.0}}},"df":0,"docs":{}},"q":{"df":0,"docs":{},"u":{"df":0,"docs":{},"e":{"df":0,"docs":{},"n":{"c":{"df":3,"docs":{"13":{"tf":1.7320508075688772},"5":{"tf":1.7320508075688772},"6":{"tf":1.7320508075688772}}},"df":0,"docs":{}}}}},"s":{"df":0,"docs":{},"s":{"df":0,"docs":{},"i":{"df":0,"docs":{},"o":{"df":0,"docs":{},"n":{"_":{"df":0,"docs":{},"i":{"d":{"(":{"b":{"df":0,"docs":{},"u":{"df":0,"docs":{},"f":{"df":0,"docs":{},"f":{"df":1,"docs":{"19":{"tf":1.0}}}}}},"df":0,"docs":{},"e":{"df":0,"docs":{},"v":{"df":1,"docs":{"17":{"tf":1.0}}}},"f":{"df":0,"docs":{},"l":{"df":0,"docs":{},"o":{"df":1,"docs":{"21":{"tf":1.0}}}}},"n":{"df":0,"docs":{},"o":{"d":{"df":1,"docs":{"20":{"tf":1.0}}},"df":0,"docs":{}}}},"df":4,"docs":{"17":{"tf":1.0},"19":{"tf":1.0},"20":{"tf":1.0},"21":{"tf":1.0}}},"df":0,"docs":{}}},"df":8,"docs":{"1":{"tf":1.0},"15":{"tf":1.7320508075688772},"16":{"tf":1.7320508075688772},"17":{"tf":1.0},"18":{"tf":2.0},"19":{"tf":1.0},"20":{"tf":1.4142135623730951},"21":{"tf":1.0}},"r":{"df":0,"docs":{},"e":{"df":0,"docs":{},"f":{"df":3,"docs":{"15":{"tf":1.0},"16":{"tf":1.0},"18":{"tf":2.23606797749979}}}}},"s":{"(":{"c":{"df":0,"docs":{},"o":{"df":0,"docs":{},"n":{"df":0,"docs":{},"t":{"df":0,"docs":{},"e":{"df":0,"docs":{},"x":{"df":0,"docs":{},"t":{"df":1,"docs":{"15":{"tf":1.0}}}}}}}}},"df":0,"docs":{},"m":{"df":0,"docs":{},"u":{"df":0,"docs":{},"x":{"df":1,"docs":{"16":{"tf":1.0}}}}}},"df":0,"docs":{}}}}}}},"t":{"_":{"c":{"df":0,"docs":{},"l":{"df":0,"docs":{},"i":{"c":{"df":0,"docs":{},"k":{"_":{"df":0,"docs":{},"f":{"df":0,"docs":{},"o":{"c":{"df":0,"docs":{},"u":{"df":1,"docs":{"10":{"tf":1.0}},"s":{"(":{"df":0,"docs":{},"m":{"df":0,"docs":{},"o":{"df":0,"docs":{},"u":{"df":0,"docs":{},"s":{"df":1,"docs":{"10":{"tf":1.0}}}}}}},"df":0,"docs":{}}}},"df":0,"docs":{},"r":{"df":0,"docs":{},"w":{"a":{"df":0,"docs":{},"r":{"d":{"(":{"df":0,"docs":{},"m":{"df":0,"docs":{},"o":{"df":0,"docs":{},"u":{"df":0,"docs":{},"s":{"df":1,"docs":{"10":{"tf":1.0}}}}}}},"df":1,"docs":{"10":{"tf":1.0}}},"df":0,"docs":{}}},"df":0,"docs":{}}}}}},"df":0,"docs":{}}},"df":0,"docs":{}}}},"df":0,"docs":{},"f":{"df":0,"docs":{},"o":{"df":0,"docs":{},"r":{"df":0,"docs":{},"m":{"a":{"df":0,"docs":{},"t":{"df":0,"docs":{},"t":{"df":1,"docs":{"12":{"tf":1.0}},"e":{"df":0,"docs":{},"r":{"(":{"df":0,"docs":{},"t":{"a":{"b":{"b":{"a":{"df":0,"docs":{},"r":{"df":1,"docs":{"12":{"tf":1.0}}}},"df":0,"docs":{}},"df":0,"docs":{}},"df":0,"docs":{}},"df":0,"docs":{}}},"df":0,"docs":{}}}}}},"df":0,"docs":{}}}}},"l":{"df":0,"docs":{},"e":{"a":{"d":{"df":1,"docs":{"5":{"tf":1.0}},"e":{"df":0,"docs":{},"r":{"(":{"\\"":{"<":{"c":{"df":2,"docs":{"4":{"tf":1.0},"5":{"tf":1.0}}},"df":0,"docs":{}},"df":0,"docs":{}},"df":0,"docs":{},"n":{"df":0,"docs":{},"o":{"df":0,"docs":{},"t":{"df":1,"docs":{"5":{"tf":1.0}}}}}},"df":0,"docs":{}}}},"df":0,"docs":{}},"df":0,"docs":{}}},"p":{"a":{"df":0,"docs":{},"l":{"df":0,"docs":{},"e":{"df":0,"docs":{},"t":{"df":0,"docs":{},"t":{"df":1,"docs":{"11":{"tf":1.0}},"e":{"(":{"df":0,"docs":{},"t":{"df":0,"docs":{},"h":{"df":0,"docs":{},"e":{"df":0,"docs":{},"m":{"df":1,"docs":{"11":{"tf":1.0}}}}}}},"df":0,"docs":{}}}}}}},"df":0,"docs":{}},"w":{"df":0,"docs":{},"h":{"df":0,"docs":{},"e":{"df":0,"docs":{},"e":{"df":0,"docs":{},"l":{"_":{"df":0,"docs":{},"f":{"df":0,"docs":{},"o":{"df":0,"docs":{},"r":{"df":0,"docs":{},"w":{"a":{"df":0,"docs":{},"r":{"d":{"(":{"df":0,"docs":{},"m":{"df":0,"docs":{},"o":{"df":0,"docs":{},"u":{"df":0,"docs":{},"s":{"df":1,"docs":{"10":{"tf":1.0}}}}}}},"df":1,"docs":{"10":{"tf":1.0}}},"df":0,"docs":{}}},"df":0,"docs":{}}}}},"s":{"c":{"df":0,"docs":{},"r":{"df":0,"docs":{},"o":{"df":0,"docs":{},"l":{"df":1,"docs":{"10":{"tf":1.0}},"l":{"(":{"df":0,"docs":{},"m":{"df":0,"docs":{},"o":{"df":0,"docs":{},"u":{"df":0,"docs":{},"s":{"df":1,"docs":{"10":{"tf":1.0}}}}}}},"df":0,"docs":{}}}}}},"df":0,"docs":{}}},"df":0,"docs":{}}}}}}},"df":4,"docs":{"0":{"tf":1.0},"24":{"tf":1.0},"5":{"tf":1.0},"8":{"tf":1.0}}}},"h":{"df":0,"docs":{},"e":{"df":0,"docs":{},"l":{"df":0,"docs":{},"l":{"_":{"df":0,"docs":{},"t":{"df":0,"docs":{},"r":{"df":0,"docs":{},"e":{"df":0,"docs":{},"e":{"(":{"c":{"df":0,"docs":{},"t":{"df":0,"docs":{},"x":{"df":1,"docs":{"4":{"tf":1.4142135623730951}}}}},"df":0,"docs":{}},"df":0,"docs":{}}}}}},"df":3,"docs":{"14":{"tf":1.0},"4":{"tf":1.0},"7":{"tf":1.0}}}}},"o":{"df":0,"docs":{},"w":{"df":1,"docs":{"4":{"tf":1.0}}}}},"i":{"b":{"df":0,"docs":{},"l":{"df":2,"docs":{"13":{"tf":1.0},"6":{"tf":1.0}}}},"d":{"df":0,"docs":{},"e":{"df":1,"docs":{"10":{"tf":1.0}}}},"df":0,"docs":{},"n":{"df":0,"docs":{},"g":{"df":0,"docs":{},"l":{"df":3,"docs":{"14":{"tf":1.0},"19":{"tf":1.0},"7":{"tf":1.0}}}}},"z":{"df":0,"docs":{},"e":{"df":2,"docs":{"14":{"tf":1.0},"7":{"tf":1.0}}}}},"n":{"a":{"df":0,"docs":{},"p":{"df":0,"docs":{},"s":{"df":0,"docs":{},"h":{"df":0,"docs":{},"o":{"df":0,"docs":{},"t":{"_":{"df":0,"docs":{},"t":{"df":0,"docs":{},"e":{"df":0,"docs":{},"x":{"df":0,"docs":{},"t":{"(":{"b":{"df":0,"docs":{},"u":{"df":0,"docs":{},"f":{"df":0,"docs":{},"f":{"df":1,"docs":{"19":{"tf":1.0}}}}}},"df":0,"docs":{}},"df":1,"docs":{"19":{"tf":1.0}}}}}}},"df":3,"docs":{"15":{"tf":1.4142135623730951},"16":{"tf":1.4142135623730951},"19":{"tf":1.0}}}}}}}},"df":0,"docs":{}},"p":{"a":{"df":0,"docs":{},"w":{"df":0,"docs":{},"n":{"df":2,"docs":{"14":{"tf":1.0},"7":{"tf":1.0}}}}},"df":0,"docs":{},"e":{"c":{"df":0,"docs":{},"i":{"df":0,"docs":{},"f":{"df":6,"docs":{"13":{"tf":3.4641016151377544},"14":{"tf":1.0},"25":{"tf":1.0},"6":{"tf":3.4641016151377544},"7":{"tf":1.0},"9":{"tf":1.0}}}}},"df":0,"docs":{}},"l":{"df":0,"docs":{},"i":{"df":0,"docs":{},"t":{"(":{"_":{"df":2,"docs":{"14":{"tf":1.4142135623730951},"7":{"tf":1.4142135623730951}}},"df":0,"docs":{}},"_":{"b":{"df":0,"docs":{},"e":{"df":0,"docs":{},"l":{"df":0,"docs":{},"o":{"df":0,"docs":{},"w":{"(":{"c":{"df":0,"docs":{},"t":{"df":0,"docs":{},"x":{"df":1,"docs":{"4":{"tf":1.0}}}}},"df":0,"docs":{}},"df":1,"docs":{"4":{"tf":1.0}}}}}}},"d":{"df":0,"docs":{},"i":{"df":0,"docs":{},"r":{"df":0,"docs":{},"e":{"c":{"df":0,"docs":{},"t":{"df":1,"docs":{"20":{"tf":1.0}},"i":{"df":0,"docs":{},"o":{"df":0,"docs":{},"n":{"(":{"df":0,"docs":{},"n":{"df":0,"docs":{},"o":{"d":{"df":1,"docs":{"20":{"tf":1.0}}},"df":0,"docs":{}}}},"df":0,"docs":{}}}}}},"df":0,"docs":{}}}}},"df":0,"docs":{},"h":{"(":{"_":{"df":2,"docs":{"14":{"tf":1.0},"7":{"tf":1.0}}},"df":0,"docs":{}},"df":2,"docs":{"14":{"tf":1.0},"7":{"tf":1.0}}},"v":{"(":{"_":{"df":2,"docs":{"14":{"tf":1.0},"7":{"tf":1.0}}},"df":0,"docs":{}},"df":2,"docs":{"14":{"tf":1.0},"7":{"tf":1.0}}},"w":{"df":0,"docs":{},"e":{"df":0,"docs":{},"i":{"df":0,"docs":{},"g":{"df":0,"docs":{},"h":{"df":0,"docs":{},"t":{"df":1,"docs":{"20":{"tf":1.0}},"s":{"(":{"df":0,"docs":{},"n":{"df":0,"docs":{},"o":{"d":{"df":1,"docs":{"20":{"tf":1.0}}},"df":0,"docs":{}}}},"df":0,"docs":{}}}}}}},"i":{"df":0,"docs":{},"t":{"df":0,"docs":{},"h":{"(":{"_":{"df":2,"docs":{"13":{"tf":1.0},"6":{"tf":1.0}}},"df":0,"docs":{}},"df":2,"docs":{"13":{"tf":1.0},"6":{"tf":1.0}}}}}}},"df":7,"docs":{"13":{"tf":1.0},"14":{"tf":2.0},"20":{"tf":1.7320508075688772},"4":{"tf":1.0},"5":{"tf":1.0},"6":{"tf":1.0},"7":{"tf":2.0}}}}}},"t":{"a":{"df":0,"docs":{},"t":{"df":0,"docs":{},"e":{"df":2,"docs":{"0":{"tf":1.0},"19":{"tf":1.0}}}}},"df":0,"docs":{},"i":{"df":0,"docs":{},"l":{"df":0,"docs":{},"l":{"df":1,"docs":{"19":{"tf":1.0}}}}},"r":{"df":0,"docs":{},"i":{"df":0,"docs":{},"n":{"df":0,"docs":{},"g":{"df":18,"docs":{"13":{"tf":4.0},"14":{"tf":2.6457513110645907},"15":{"tf":1.0},"17":{"tf":1.0},"18":{"tf":1.0},"19":{"tf":3.0},"20":{"tf":1.4142135623730951},"21":{"tf":1.0},"22":{"tf":1.0},"23":{"tf":1.0},"24":{"tf":2.0},"25":{"tf":1.7320508075688772},"26":{"tf":1.0},"5":{"tf":4.0},"6":{"tf":4.0},"7":{"tf":2.6457513110645907},"8":{"tf":2.0},"9":{"tf":1.7320508075688772}}}}}},"y":{"df":0,"docs":{},"l":{"df":0,"docs":{},"e":{"df":2,"docs":{"25":{"tf":1.0},"9":{"tf":1.0}},"s":{"df":0,"docs":{},"p":{"df":0,"docs":{},"e":{"c":{"df":2,"docs":{"25":{"tf":1.0},"9":{"tf":1.0}}},"df":0,"docs":{}}}}}}}},"u":{"c":{"df":0,"docs":{},"h":{"df":2,"docs":{"20":{"tf":1.0},"5":{"tf":1.4142135623730951}}}},"df":0,"docs":{},"p":{"df":0,"docs":{},"p":{"df":0,"docs":{},"o":{"df":0,"docs":{},"r":{"df":0,"docs":{},"t":{"df":3,"docs":{"14":{"tf":1.0},"5":{"tf":1.0},"7":{"tf":1.0}}}}}}}},"y":{"df":0,"docs":{},"s":{"df":0,"docs":{},"t":{"df":0,"docs":{},"e":{"df":0,"docs":{},"m":{"a":{"df":0,"docs":{},"p":{"df":0,"docs":{},"i":{"df":2,"docs":{"24":{"tf":1.7320508075688772},"8":{"tf":1.7320508075688772}}}}},"df":3,"docs":{"1":{"tf":1.4142135623730951},"24":{"tf":1.0},"8":{"tf":1.0}}}}}}}},"t":{"a":{"b":{"(":{"_":{"df":2,"docs":{"14":{"tf":1.0},"7":{"tf":1.0}}},"df":0,"docs":{}},"_":{"df":0,"docs":{},"t":{"df":0,"docs":{},"i":{"df":0,"docs":{},"t":{"df":0,"docs":{},"l":{"df":1,"docs":{"20":{"tf":1.0}},"e":{"df":0,"docs":{},"s":{"(":{"df":0,"docs":{},"n":{"df":0,"docs":{},"o":{"d":{"df":1,"docs":{"20":{"tf":1.0}}},"df":0,"docs":{}}}},"df":0,"docs":{}}}}}}}},"b":{"a":{"df":0,"docs":{},"r":{".":{"df":0,"docs":{},"s":{"df":0,"docs":{},"e":{"df":0,"docs":{},"t":{"_":{"df":0,"docs":{},"f":{"df":0,"docs":{},"o":{"df":0,"docs":{},"r":{"df":0,"docs":{},"m":{"a":{"df":0,"docs":{},"t":{"df":0,"docs":{},"t":{"df":0,"docs":{},"e":{"df":0,"docs":{},"r":{"(":{"df":0,"docs":{},"f":{"df":0,"docs":{},"o":{"df":0,"docs":{},"r":{"df":0,"docs":{},"m":{"a":{"df":0,"docs":{},"t":{"_":{"df":0,"docs":{},"t":{"a":{"b":{"df":1,"docs":{"4":{"tf":1.0}}},"df":0,"docs":{}},"df":0,"docs":{}}},"df":0,"docs":{}}},"df":0,"docs":{}}}}}},"df":0,"docs":{}}}}}},"df":0,"docs":{}}}}}},"df":0,"docs":{}}}}},"a":{"df":0,"docs":{},"p":{"df":0,"docs":{},"i":{"df":1,"docs":{"12":{"tf":1.0}}}}},"c":{"df":0,"docs":{},"o":{"df":0,"docs":{},"n":{"df":0,"docs":{},"t":{"df":0,"docs":{},"e":{"df":0,"docs":{},"x":{"df":0,"docs":{},"t":{"df":1,"docs":{"22":{"tf":2.6457513110645907}}}}}}}}},"df":2,"docs":{"1":{"tf":1.0},"12":{"tf":1.0}}}},"df":0,"docs":{}},"df":11,"docs":{"0":{"tf":1.0},"1":{"tf":1.4142135623730951},"12":{"tf":1.0},"13":{"tf":4.58257569495584},"14":{"tf":3.0},"18":{"tf":1.0},"20":{"tf":2.0},"22":{"tf":2.449489742783178},"23":{"tf":2.449489742783178},"6":{"tf":4.58257569495584},"7":{"tf":3.0}},"i":{"df":0,"docs":{},"n":{"df":0,"docs":{},"f":{"df":0,"docs":{},"o":{"df":1,"docs":{"23":{"tf":2.6457513110645907}}}}}},"s":{"(":{"_":{"df":2,"docs":{"14":{"tf":1.0},"7":{"tf":1.0}}},"b":{"a":{"df":0,"docs":{},"r":{"df":1,"docs":{"22":{"tf":1.0}}}},"df":0,"docs":{}},"df":0,"docs":{}},"_":{"df":0,"docs":{},"n":{"df":0,"docs":{},"o":{"d":{"df":0,"docs":{},"e":{"_":{"df":0,"docs":{},"i":{"d":{"df":2,"docs":{"13":{"tf":2.23606797749979},"6":{"tf":2.23606797749979}}},"df":0,"docs":{}}},"df":0,"docs":{}}},"df":0,"docs":{}}},"w":{"df":0,"docs":{},"i":{"df":0,"docs":{},"t":{"df":0,"docs":{},"h":{"_":{"a":{"c":{"df":0,"docs":{},"t":{"df":2,"docs":{"14":{"tf":1.0},"7":{"tf":1.0}},"i":{"df":0,"docs":{},"v":{"df":0,"docs":{},"e":{"(":{"_":{"df":2,"docs":{"14":{"tf":1.0},"7":{"tf":1.0}}},"df":0,"docs":{}},"df":0,"docs":{}}}}}},"df":0,"docs":{}},"df":0,"docs":{}},"df":0,"docs":{}}}}}},"df":0,"docs":{},"p":{"df":0,"docs":{},"e":{"c":{"df":2,"docs":{"14":{"tf":1.0},"7":{"tf":1.0}}},"df":0,"docs":{}}}}},"df":0,"docs":{},"r":{"df":0,"docs":{},"g":{"df":0,"docs":{},"e":{"df":0,"docs":{},"t":{"df":2,"docs":{"25":{"tf":1.0},"9":{"tf":1.0}}}}}}},"df":0,"docs":{},"e":{"df":0,"docs":{},"x":{"df":0,"docs":{},"t":{"df":3,"docs":{"19":{"tf":1.4142135623730951},"25":{"tf":2.23606797749979},"9":{"tf":2.23606797749979}}}}},"h":{"df":0,"docs":{},"e":{"df":0,"docs":{},"m":{"df":0,"docs":{},"e":{".":{"c":{"df":0,"docs":{},"o":{"df":0,"docs":{},"l":{"df":0,"docs":{},"o":{"df":0,"docs":{},"r":{"(":{"\\"":{"a":{"c":{"df":0,"docs":{},"t":{"df":0,"docs":{},"i":{"df":0,"docs":{},"v":{"df":0,"docs":{},"e":{"_":{"b":{"df":0,"docs":{},"g":{"df":1,"docs":{"4":{"tf":1.0}}}},"df":0,"docs":{},"f":{"df":0,"docs":{},"g":{"df":1,"docs":{"4":{"tf":1.0}}}}},"df":0,"docs":{}}}}}},"df":0,"docs":{}},"df":0,"docs":{}},"df":0,"docs":{}},"df":0,"docs":{}}}}}},"df":0,"docs":{},"s":{"df":0,"docs":{},"e":{"df":0,"docs":{},"t":{"_":{"df":0,"docs":{},"p":{"a":{"df":0,"docs":{},"l":{"df":0,"docs":{},"e":{"df":0,"docs":{},"t":{"df":0,"docs":{},"t":{"df":1,"docs":{"4":{"tf":1.0}}}}}}},"df":0,"docs":{}}},"df":0,"docs":{}}}}},"a":{"df":0,"docs":{},"p":{"df":0,"docs":{},"i":{"df":1,"docs":{"11":{"tf":1.0}}}}},"df":3,"docs":{"1":{"tf":1.4142135623730951},"11":{"tf":1.4142135623730951},"26":{"tf":1.0}},"r":{"df":0,"docs":{},"u":{"df":0,"docs":{},"n":{"df":0,"docs":{},"t":{"df":0,"docs":{},"i":{"df":0,"docs":{},"m":{"df":0,"docs":{},"e":{"a":{"df":0,"docs":{},"p":{"df":0,"docs":{},"i":{"df":1,"docs":{"26":{"tf":1.0}}}}},"df":0,"docs":{}}}}}}}}}}}},"i":{"df":0,"docs":{},"m":{"df":0,"docs":{},"e":{"df":1,"docs":{"0":{"tf":1.0}},"s":{"df":0,"docs":{},"t":{"a":{"df":0,"docs":{},"m":{"df":0,"docs":{},"p":{"df":2,"docs":{"24":{"tf":1.0},"8":{"tf":1.0}}}}},"df":0,"docs":{}}}}},"t":{"df":0,"docs":{},"l":{"df":9,"docs":{"13":{"tf":2.449489742783178},"14":{"tf":1.7320508075688772},"19":{"tf":1.4142135623730951},"20":{"tf":1.0},"21":{"tf":1.4142135623730951},"23":{"tf":1.4142135623730951},"4":{"tf":1.0},"6":{"tf":2.449489742783178},"7":{"tf":1.7320508075688772}},"e":{"(":{"b":{"df":0,"docs":{},"u":{"df":0,"docs":{},"f":{"df":0,"docs":{},"f":{"df":1,"docs":{"19":{"tf":1.0}}}}}},"df":0,"docs":{},"f":{"df":0,"docs":{},"l":{"df":0,"docs":{},"o":{"df":1,"docs":{"21":{"tf":1.0}}}}},"t":{"a":{"b":{"df":1,"docs":{"23":{"tf":1.0}}},"df":0,"docs":{}},"df":0,"docs":{}}},"df":0,"docs":{}}}}},"o":{"df":0,"docs":{},"g":{"df":0,"docs":{},"e":{"df":0,"docs":{},"t":{"df":0,"docs":{},"h":{"df":1,"docs":{"4":{"tf":1.0}}}}},"g":{"df":0,"docs":{},"l":{"df":3,"docs":{"10":{"tf":2.0},"13":{"tf":1.0},"6":{"tf":1.0}},"e":{"_":{"df":0,"docs":{},"m":{"df":0,"docs":{},"o":{"d":{"df":2,"docs":{"13":{"tf":1.0},"6":{"tf":1.0}},"e":{"(":{"_":{"df":2,"docs":{"13":{"tf":1.0},"6":{"tf":1.0}}},"df":0,"docs":{}},"df":0,"docs":{}}},"df":0,"docs":{}}}},"df":0,"docs":{}}}}},"p":{"_":{"df":0,"docs":{},"l":{"df":0,"docs":{},"e":{"df":0,"docs":{},"f":{"df":0,"docs":{},"t":{"df":2,"docs":{"13":{"tf":1.0},"6":{"tf":1.0}}}}}}},"df":3,"docs":{"0":{"tf":1.0},"13":{"tf":1.0},"6":{"tf":1.0}}}},"r":{"df":0,"docs":{},"e":{"df":0,"docs":{},"e":{".":{"b":{"df":0,"docs":{},"u":{"df":0,"docs":{},"f":{"df":0,"docs":{},"f":{"df":0,"docs":{},"e":{"df":0,"docs":{},"r":{"_":{"df":0,"docs":{},"s":{"df":0,"docs":{},"p":{"a":{"df":0,"docs":{},"w":{"df":0,"docs":{},"n":{"(":{"[":{"\\"":{"/":{"b":{"df":0,"docs":{},"i":{"df":0,"docs":{},"n":{"/":{"df":0,"docs":{},"z":{"df":0,"docs":{},"s":{"df":0,"docs":{},"h":{"df":2,"docs":{"14":{"tf":1.0},"7":{"tf":1.0}}}}}},"df":0,"docs":{}}}},"df":0,"docs":{}},"df":0,"docs":{}},"df":0,"docs":{}},"df":0,"docs":{}},"df":1,"docs":{"4":{"tf":1.0}}}}},"df":0,"docs":{}}}},"df":0,"docs":{}}}}}}},"df":0,"docs":{}},"a":{"df":0,"docs":{},"p":{"df":0,"docs":{},"i":{"df":2,"docs":{"14":{"tf":3.7416573867739413},"7":{"tf":3.7416573867739413}}}}},"df":5,"docs":{"1":{"tf":1.4142135623730951},"13":{"tf":3.4641016151377544},"14":{"tf":2.449489742783178},"6":{"tf":3.4641016151377544},"7":{"tf":2.449489742783178}},"s":{"df":0,"docs":{},"p":{"df":0,"docs":{},"e":{"c":{"df":4,"docs":{"13":{"tf":2.8284271247461903},"14":{"tf":3.7416573867739413},"6":{"tf":2.8284271247461903},"7":{"tf":3.7416573867739413}}},"df":0,"docs":{}}}}}},"i":{"df":0,"docs":{},"m":{"df":1,"docs":{"4":{"tf":1.0}}}},"u":{"df":0,"docs":{},"e":{"df":2,"docs":{"13":{"tf":1.4142135623730951},"6":{"tf":1.4142135623730951}}}}},"t":{"df":0,"docs":{},"i":{"df":1,"docs":{"19":{"tf":1.0}}},"y":{"_":{"df":0,"docs":{},"p":{"a":{"df":0,"docs":{},"t":{"df":0,"docs":{},"h":{"(":{"b":{"df":0,"docs":{},"u":{"df":0,"docs":{},"f":{"df":0,"docs":{},"f":{"df":1,"docs":{"19":{"tf":1.0}}}}}},"df":0,"docs":{}},"df":1,"docs":{"19":{"tf":1.0}}}}},"df":0,"docs":{}}},"df":0,"docs":{}}},"w":{"df":0,"docs":{},"o":{"df":2,"docs":{"0":{"tf":1.0},"4":{"tf":1.0}}}}},"u":{"df":0,"docs":{},"i":{".":{"b":{"a":{"df":0,"docs":{},"r":{"df":1,"docs":{"4":{"tf":1.0}}}},"df":0,"docs":{}},"df":0,"docs":{},"s":{"df":0,"docs":{},"e":{"df":0,"docs":{},"g":{"df":1,"docs":{"4":{"tf":1.0}}}}}},"a":{"df":0,"docs":{},"p":{"df":0,"docs":{},"i":{"df":2,"docs":{"25":{"tf":2.23606797749979},"9":{"tf":2.23606797749979}}}}},"df":3,"docs":{"1":{"tf":1.4142135623730951},"25":{"tf":1.0},"9":{"tf":1.0}}},"n":{"b":{"df":0,"docs":{},"i":{"df":0,"docs":{},"n":{"d":{"(":{"df":0,"docs":{},"m":{"df":0,"docs":{},"o":{"d":{"df":1,"docs":{"5":{"tf":1.0}}},"df":0,"docs":{}}}},"df":1,"docs":{"5":{"tf":1.0}}},"df":0,"docs":{}}}},"df":0,"docs":{},"i":{"df":0,"docs":{},"x":{"df":2,"docs":{"24":{"tf":1.0},"8":{"tf":1.0}}}},"k":{"df":0,"docs":{},"n":{"df":0,"docs":{},"o":{"df":0,"docs":{},"w":{"df":0,"docs":{},"n":{"df":2,"docs":{"14":{"tf":1.0},"7":{"tf":1.0}}}}}}}},"p":{"df":3,"docs":{"13":{"tf":1.0},"19":{"tf":1.0},"6":{"tf":1.0}},"w":{"a":{"df":0,"docs":{},"r":{"d":{"df":2,"docs":{"13":{"tf":1.4142135623730951},"6":{"tf":1.4142135623730951}}},"df":0,"docs":{}}},"df":0,"docs":{}}},"s":{"df":6,"docs":{"0":{"tf":1.0},"12":{"tf":1.0},"22":{"tf":1.0},"25":{"tf":1.0},"5":{"tf":1.4142135623730951},"9":{"tf":1.0}}}},"v":{"a":{"df":0,"docs":{},"l":{"df":0,"docs":{},"u":{"df":5,"docs":{"10":{"tf":2.0},"13":{"tf":1.4142135623730951},"25":{"tf":1.0},"6":{"tf":1.4142135623730951},"9":{"tf":1.0}}}},"r":{"df":0,"docs":{},"i":{"a":{"b":{"df":0,"docs":{},"l":{"df":2,"docs":{"24":{"tf":1.0},"8":{"tf":1.0}}}},"df":0,"docs":{}},"df":0,"docs":{}}}},"df":0,"docs":{},"e":{"c":{"df":0,"docs":{},"t":{"df":0,"docs":{},"o":{"df":0,"docs":{},"r":{"df":1,"docs":{"19":{"tf":1.0}}}}}},"df":0,"docs":{},"r":{"df":0,"docs":{},"t":{"df":0,"docs":{},"i":{"c":{"df":4,"docs":{"13":{"tf":1.0},"14":{"tf":1.0},"6":{"tf":1.0},"7":{"tf":1.0}}},"df":0,"docs":{}}}}},"i":{"df":0,"docs":{},"e":{"df":0,"docs":{},"w":{"df":2,"docs":{"13":{"tf":2.6457513110645907},"6":{"tf":2.6457513110645907}},"p":{"df":0,"docs":{},"o":{"df":0,"docs":{},"r":{"df":0,"docs":{},"t":{"_":{"df":0,"docs":{},"w":{"df":0,"docs":{},"i":{"d":{"df":0,"docs":{},"t":{"df":0,"docs":{},"h":{"(":{"b":{"a":{"df":0,"docs":{},"r":{"df":1,"docs":{"22":{"tf":1.0}}}},"df":0,"docs":{}},"df":0,"docs":{}},"df":1,"docs":{"22":{"tf":1.0}}}}},"df":0,"docs":{}}}},"df":1,"docs":{"22":{"tf":1.0}}}}}}}},"s":{"df":0,"docs":{},"i":{"b":{"df":0,"docs":{},"l":{"df":5,"docs":{"15":{"tf":1.4142135623730951},"16":{"tf":1.4142135623730951},"19":{"tf":1.0},"20":{"tf":1.0},"21":{"tf":1.0}},"e":{"_":{"b":{"df":0,"docs":{},"u":{"df":0,"docs":{},"f":{"df":0,"docs":{},"f":{"df":2,"docs":{"15":{"tf":1.0},"16":{"tf":1.0}},"e":{"df":0,"docs":{},"r":{"df":0,"docs":{},"s":{"(":{"c":{"df":0,"docs":{},"o":{"df":0,"docs":{},"n":{"df":0,"docs":{},"t":{"df":0,"docs":{},"e":{"df":0,"docs":{},"x":{"df":0,"docs":{},"t":{"df":1,"docs":{"15":{"tf":1.0}}}}}}}}},"df":0,"docs":{},"m":{"df":0,"docs":{},"u":{"df":0,"docs":{},"x":{"df":1,"docs":{"16":{"tf":1.0}}}}}},"df":0,"docs":{}}}}}}}},"df":0,"docs":{}},"df":0,"docs":{}}}},"df":0,"docs":{}},"u":{"a":{"df":0,"docs":{},"l":{"df":1,"docs":{"0":{"tf":1.0}}}},"df":0,"docs":{}}}}},"w":{"df":0,"docs":{},"e":{"df":0,"docs":{},"i":{"df":0,"docs":{},"g":{"df":0,"docs":{},"h":{"df":0,"docs":{},"t":{"df":1,"docs":{"20":{"tf":1.0}}}}}}},"h":{"df":0,"docs":{},"e":{"df":0,"docs":{},"e":{"df":0,"docs":{},"l":{"df":1,"docs":{"10":{"tf":1.4142135623730951}}}},"t":{"df":0,"docs":{},"h":{"df":0,"docs":{},"e":{"df":0,"docs":{},"r":{"df":7,"docs":{"13":{"tf":1.4142135623730951},"19":{"tf":2.0},"20":{"tf":2.0},"21":{"tf":1.4142135623730951},"22":{"tf":1.0},"23":{"tf":1.7320508075688772},"6":{"tf":1.4142135623730951}}}}}}},"i":{"c":{"df":0,"docs":{},"h":{"(":{"_":{"df":2,"docs":{"24":{"tf":1.0},"8":{"tf":1.0}}},"df":0,"docs":{}},"df":0,"docs":{}}},"df":0,"docs":{}}},"i":{"d":{"df":0,"docs":{},"t":{"df":0,"docs":{},"h":{"df":3,"docs":{"13":{"tf":1.4142135623730951},"22":{"tf":1.0},"6":{"tf":1.4142135623730951}}}}},"df":0,"docs":{},"n":{"d":{"df":0,"docs":{},"o":{"df":0,"docs":{},"w":{"df":6,"docs":{"13":{"tf":2.8284271247461903},"15":{"tf":1.4142135623730951},"16":{"tf":1.4142135623730951},"18":{"tf":1.0},"20":{"tf":1.0},"6":{"tf":2.8284271247461903}}}}},"df":0,"docs":{}}},"o":{"df":0,"docs":{},"r":{"df":0,"docs":{},"k":{"df":1,"docs":{"19":{"tf":1.0}},"s":{"df":0,"docs":{},"p":{"a":{"c":{"df":1,"docs":{"5":{"tf":1.0}}},"df":0,"docs":{}},"df":0,"docs":{}}}}}}},"x":{"df":2,"docs":{"13":{"tf":1.0},"6":{"tf":1.0}}},"y":{"a":{"df":0,"docs":{},"n":{"df":0,"docs":{},"k":{"_":{"df":0,"docs":{},"s":{"df":0,"docs":{},"e":{"df":0,"docs":{},"l":{"df":0,"docs":{},"e":{"c":{"df":0,"docs":{},"t":{"df":2,"docs":{"13":{"tf":1.0},"6":{"tf":1.0}},"i":{"df":0,"docs":{},"o":{"df":0,"docs":{},"n":{"(":{"_":{"df":2,"docs":{"13":{"tf":1.0},"6":{"tf":1.0}}},"df":0,"docs":{}},"df":0,"docs":{}}}}}},"df":0,"docs":{}}}}}},"df":0,"docs":{}}}},"df":2,"docs":{"13":{"tf":1.0},"6":{"tf":1.0}}},"z":{"df":0,"docs":{},"e":{"df":0,"docs":{},"r":{"df":0,"docs":{},"o":{"df":1,"docs":{"23":{"tf":1.0}}}}}}}},"breadcrumbs":{"root":{"0":{"df":2,"docs":{"13":{"tf":1.4142135623730951},"6":{"tf":1.4142135623730951}}},"3":{"0":{"3":{"4":{"4":{"6":{"df":1,"docs":{"4":{"tf":1.0}}},"df":0,"docs":{}},"df":0,"docs":{}},"df":0,"docs":{}},"df":0,"docs":{}},"df":0,"docs":{}},"5":{"0":{"df":2,"docs":{"13":{"tf":1.7320508075688772},"6":{"tf":1.7320508075688772}}},"df":0,"docs":{}},"a":{"b":{"df":0,"docs":{},"o":{"df":0,"docs":{},"v":{"df":2,"docs":{"13":{"tf":1.0},"6":{"tf":1.0}}}}},"c":{"df":0,"docs":{},"t":{"df":0,"docs":{},"i":{"df":0,"docs":{},"o":{"df":0,"docs":{},"n":{".":{"df":0,"docs":{},"f":{"df":0,"docs":{},"o":{"c":{"df":0,"docs":{},"u":{"df":0,"docs":{},"s":{"_":{"df":0,"docs":{},"l":{"df":0,"docs":{},"e":{"df":0,"docs":{},"f":{"df":0,"docs":{},"t":{"df":3,"docs":{"13":{"tf":1.0},"5":{"tf":1.0},"6":{"tf":1.0}}}}}}},"df":0,"docs":{}}}},"df":0,"docs":{}}},"s":{"df":0,"docs":{},"p":{"df":0,"docs":{},"l":{"df":0,"docs":{},"i":{"df":0,"docs":{},"t":{"_":{"df":0,"docs":{},"w":{"df":0,"docs":{},"i":{"df":0,"docs":{},"t":{"df":0,"docs":{},"h":{"(":{"\\"":{"df":0,"docs":{},"h":{"df":0,"docs":{},"o":{"df":0,"docs":{},"r":{"df":0,"docs":{},"i":{"df":0,"docs":{},"z":{"df":0,"docs":{},"o":{"df":0,"docs":{},"n":{"df":0,"docs":{},"t":{"df":1,"docs":{"4":{"tf":1.0}}}}}}}}}}},"df":0,"docs":{}},"df":0,"docs":{}}}}}},"df":0,"docs":{}}}}}}},"_":{"df":0,"docs":{},"n":{"a":{"df":0,"docs":{},"m":{"df":1,"docs":{"5":{"tf":1.0}}}},"df":0,"docs":{}}},"a":{"df":0,"docs":{},"p":{"df":0,"docs":{},"i":{"df":2,"docs":{"13":{"tf":8.06225774829855},"6":{"tf":8.06225774829855}}}}},"df":5,"docs":{"0":{"tf":1.4142135623730951},"1":{"tf":1.4142135623730951},"13":{"tf":11.661903789690601},"5":{"tf":3.1622776601683795},"6":{"tf":11.661903789690601}}}},"v":{"df":11,"docs":{"13":{"tf":2.449489742783178},"14":{"tf":1.7320508075688772},"15":{"tf":1.0},"19":{"tf":1.4142135623730951},"20":{"tf":1.0},"22":{"tf":1.0},"23":{"tf":1.4142135623730951},"26":{"tf":1.0},"4":{"tf":1.0},"6":{"tf":2.449489742783178},"7":{"tf":1.7320508075688772}},"e":{".":{"df":0,"docs":{},"t":{"df":0,"docs":{},"i":{"df":0,"docs":{},"t":{"df":0,"docs":{},"l":{"df":1,"docs":{"4":{"tf":1.0}}}}}}},"_":{"b":{"df":0,"docs":{},"g":{"df":1,"docs":{"4":{"tf":1.0}}}},"df":0,"docs":{},"f":{"df":0,"docs":{},"g":{"df":1,"docs":{"4":{"tf":1.0}}}},"i":{"df":0,"docs":{},"n":{"d":{"df":0,"docs":{},"e":{"df":0,"docs":{},"x":{"(":{"b":{"a":{"df":0,"docs":{},"r":{"df":1,"docs":{"22":{"tf":1.0}}}},"df":0,"docs":{}},"df":0,"docs":{}},"df":1,"docs":{"22":{"tf":1.0}}}}},"df":0,"docs":{}}},"t":{"a":{"b":{"_":{"df":0,"docs":{},"i":{"df":0,"docs":{},"n":{"d":{"df":0,"docs":{},"e":{"df":0,"docs":{},"x":{"(":{"df":0,"docs":{},"n":{"df":0,"docs":{},"o":{"d":{"df":1,"docs":{"20":{"tf":1.0}}},"df":0,"docs":{}}}},"df":1,"docs":{"20":{"tf":1.0}}}}},"df":0,"docs":{}}}},"df":0,"docs":{}},"df":0,"docs":{}},"df":0,"docs":{}}},"df":0,"docs":{}},"i":{"df":0,"docs":{},"t":{"df":0,"docs":{},"y":{"(":{"b":{"df":0,"docs":{},"u":{"df":0,"docs":{},"f":{"df":0,"docs":{},"f":{"df":1,"docs":{"19":{"tf":1.0}}}}}},"df":0,"docs":{}},"df":0,"docs":{}}}}}}}},"d":{"d":{"df":1,"docs":{"11":{"tf":1.0}}},"df":0,"docs":{}},"df":0,"docs":{},"g":{"a":{"df":0,"docs":{},"i":{"df":0,"docs":{},"n":{"df":0,"docs":{},"s":{"df":0,"docs":{},"t":{"df":1,"docs":{"0":{"tf":1.0}}}}}}},"df":0,"docs":{}},"n":{"c":{"df":0,"docs":{},"h":{"df":0,"docs":{},"o":{"df":0,"docs":{},"r":{"df":2,"docs":{"13":{"tf":2.0},"6":{"tf":2.0}}}}}},"df":0,"docs":{},"o":{"df":0,"docs":{},"t":{"df":0,"docs":{},"h":{"df":2,"docs":{"13":{"tf":1.0},"6":{"tf":1.0}}}}}},"p":{"df":0,"docs":{},"i":{"df":1,"docs":{"0":{"tf":1.4142135623730951}}}},"r":{"df":0,"docs":{},"o":{"df":0,"docs":{},"u":{"df":0,"docs":{},"n":{"d":{"df":2,"docs":{"13":{"tf":1.0},"6":{"tf":1.0}}},"df":0,"docs":{}}}},"r":{"a":{"df":0,"docs":{},"y":{"df":13,"docs":{"13":{"tf":1.7320508075688772},"14":{"tf":3.1622776601683795},"15":{"tf":1.7320508075688772},"16":{"tf":1.7320508075688772},"18":{"tf":1.0},"19":{"tf":1.0},"20":{"tf":1.7320508075688772},"22":{"tf":1.0},"25":{"tf":1.7320508075688772},"5":{"tf":1.7320508075688772},"6":{"tf":1.7320508075688772},"7":{"tf":3.1622776601683795},"9":{"tf":1.7320508075688772}}}},"df":0,"docs":{}}},"t":{"df":0,"docs":{},"t":{"a":{"c":{"df":0,"docs":{},"h":{"df":10,"docs":{"13":{"tf":1.0},"14":{"tf":1.0},"17":{"tf":2.0},"18":{"tf":1.0},"19":{"tf":1.7320508075688772},"20":{"tf":1.0},"23":{"tf":1.0},"5":{"tf":1.0},"6":{"tf":1.0},"7":{"tf":1.0}}}},"df":0,"docs":{}},"df":0,"docs":{}}}},"b":{"a":{"c":{"df":0,"docs":{},"k":{"df":1,"docs":{"0":{"tf":1.0}}}},"df":0,"docs":{},"r":{"(":{"_":{"df":2,"docs":{"25":{"tf":1.0},"9":{"tf":1.0}}},"df":0,"docs":{}},"df":5,"docs":{"0":{"tf":1.0},"1":{"tf":1.0},"12":{"tf":1.0},"25":{"tf":1.4142135623730951},"9":{"tf":1.4142135623730951}},"s":{"df":0,"docs":{},"e":{"df":0,"docs":{},"g":{"df":2,"docs":{"25":{"tf":2.0},"9":{"tf":2.0}}}},"p":{"df":0,"docs":{},"e":{"c":{"df":2,"docs":{"25":{"tf":1.0},"9":{"tf":1.0}}},"df":0,"docs":{}}}}},"s":{"df":0,"docs":{},"e":{"df":2,"docs":{"23":{"tf":1.0},"4":{"tf":1.0}}}}},"df":0,"docs":{},"e":{"df":1,"docs":{"22":{"tf":1.0}},"f":{"df":0,"docs":{},"o":{"df":0,"docs":{},"r":{"df":2,"docs":{"13":{"tf":1.4142135623730951},"6":{"tf":1.4142135623730951}}}}},"h":{"a":{"df":0,"docs":{},"v":{"df":0,"docs":{},"i":{"df":0,"docs":{},"o":{"df":0,"docs":{},"r":{"df":1,"docs":{"10":{"tf":1.0}}}}}}},"df":0,"docs":{}},"l":{"df":0,"docs":{},"l":{"df":1,"docs":{"23":{"tf":1.0}}},"o":{"df":0,"docs":{},"w":{"df":3,"docs":{"13":{"tf":1.0},"4":{"tf":1.4142135623730951},"6":{"tf":1.0}}}}}},"g":{"df":1,"docs":{"4":{"tf":1.0}}},"i":{"df":0,"docs":{},"n":{"/":{"df":0,"docs":{},"z":{"df":0,"docs":{},"s":{"df":0,"docs":{},"h":{"df":1,"docs":{"4":{"tf":1.0}}}}}},"d":{"(":{"\\"":{"df":0,"docs":{},"n":{"df":0,"docs":{},"o":{"df":0,"docs":{},"r":{"df":0,"docs":{},"m":{"df":2,"docs":{"4":{"tf":1.0},"5":{"tf":1.0}}}}}}},"df":0,"docs":{},"m":{"df":0,"docs":{},"o":{"d":{"df":1,"docs":{"5":{"tf":1.7320508075688772}}},"df":0,"docs":{}}}},"df":2,"docs":{"0":{"tf":1.0},"5":{"tf":2.0}}},"df":0,"docs":{}}},"l":{"df":0,"docs":{},"o":{"c":{"df":0,"docs":{},"k":{"df":2,"docs":{"13":{"tf":1.0},"6":{"tf":1.0}}}},"df":0,"docs":{}}},"o":{"df":0,"docs":{},"o":{"df":0,"docs":{},"l":{"df":8,"docs":{"10":{"tf":2.0},"13":{"tf":1.4142135623730951},"19":{"tf":2.0},"20":{"tf":2.0},"21":{"tf":1.4142135623730951},"22":{"tf":1.0},"23":{"tf":1.7320508075688772},"6":{"tf":1.4142135623730951}}}},"t":{"df":0,"docs":{},"t":{"df":0,"docs":{},"o":{"df":0,"docs":{},"m":{"df":2,"docs":{"13":{"tf":1.0},"6":{"tf":1.0}}}}}},"u":{"df":0,"docs":{},"n":{"d":{"df":1,"docs":{"5":{"tf":1.0}}},"df":0,"docs":{}}}},"u":{"df":0,"docs":{},"f":{"df":0,"docs":{},"f":{"df":0,"docs":{},"e":{"df":0,"docs":{},"r":{"(":{"df":0,"docs":{},"n":{"df":0,"docs":{},"o":{"d":{"df":1,"docs":{"20":{"tf":1.0}}},"df":0,"docs":{}}}},".":{"df":0,"docs":{},"h":{"df":0,"docs":{},"i":{"df":0,"docs":{},"s":{"df":0,"docs":{},"t":{"df":0,"docs":{},"o":{"df":0,"docs":{},"r":{"df":0,"docs":{},"y":{"_":{"df":0,"docs":{},"t":{"df":0,"docs":{},"e":{"df":0,"docs":{},"x":{"df":0,"docs":{},"t":{"df":1,"docs":{"19":{"tf":1.0}}}}}}},"df":0,"docs":{}}}}}}}}},"_":{"a":{"df":0,"docs":{},"t":{"df":0,"docs":{},"t":{"a":{"c":{"df":0,"docs":{},"h":{"(":{"_":{"df":2,"docs":{"14":{"tf":1.0},"7":{"tf":1.0}}},"df":0,"docs":{}},"df":2,"docs":{"14":{"tf":1.0},"7":{"tf":1.0}}}},"df":0,"docs":{}},"df":0,"docs":{}}}},"b":{"df":0,"docs":{},"e":{"df":0,"docs":{},"l":{"df":1,"docs":{"5":{"tf":1.0}}}}},"c":{"df":0,"docs":{},"o":{"df":0,"docs":{},"u":{"df":0,"docs":{},"n":{"df":0,"docs":{},"t":{"(":{"df":0,"docs":{},"t":{"a":{"b":{"df":1,"docs":{"23":{"tf":1.0}}},"df":0,"docs":{}},"df":0,"docs":{}}},"df":1,"docs":{"23":{"tf":1.0}}}}}},"u":{"df":0,"docs":{},"r":{"df":0,"docs":{},"r":{"df":2,"docs":{"14":{"tf":1.0},"7":{"tf":1.0}},"e":{"df":0,"docs":{},"n":{"df":0,"docs":{},"t":{"(":{"_":{"df":2,"docs":{"14":{"tf":1.0},"7":{"tf":1.0}}},"df":0,"docs":{}},"df":0,"docs":{}}}}}}}},"df":0,"docs":{},"e":{"df":0,"docs":{},"m":{"df":0,"docs":{},"p":{"df":0,"docs":{},"t":{"df":0,"docs":{},"i":{"df":2,"docs":{"14":{"tf":1.0},"7":{"tf":1.0}}},"y":{"(":{"_":{"df":2,"docs":{"14":{"tf":1.0},"7":{"tf":1.0}}},"df":0,"docs":{}},"df":0,"docs":{}}}}}},"i":{"d":{"(":{"df":0,"docs":{},"e":{"df":0,"docs":{},"v":{"df":1,"docs":{"17":{"tf":1.0}}}}},"df":7,"docs":{"13":{"tf":3.0},"14":{"tf":1.0},"15":{"tf":1.0},"16":{"tf":1.0},"17":{"tf":1.0},"6":{"tf":3.0},"7":{"tf":1.0}}},"df":0,"docs":{}},"s":{"df":0,"docs":{},"p":{"a":{"df":0,"docs":{},"w":{"df":0,"docs":{},"n":{"(":{"_":{"df":2,"docs":{"14":{"tf":1.4142135623730951},"7":{"tf":1.4142135623730951}}},"df":0,"docs":{}},"df":2,"docs":{"14":{"tf":1.0},"7":{"tf":1.0}}}}},"df":0,"docs":{}}},"v":{"df":0,"docs":{},"i":{"df":0,"docs":{},"e":{"df":0,"docs":{},"w":{"df":1,"docs":{"20":{"tf":1.0}}}}}}},"df":12,"docs":{"1":{"tf":1.0},"10":{"tf":1.4142135623730951},"13":{"tf":3.605551275463989},"14":{"tf":2.23606797749979},"15":{"tf":2.449489742783178},"16":{"tf":2.0},"17":{"tf":1.0},"19":{"tf":3.1622776601683795},"20":{"tf":1.4142135623730951},"23":{"tf":1.0},"6":{"tf":3.605551275463989},"7":{"tf":2.23606797749979}},"r":{"df":0,"docs":{},"e":{"df":0,"docs":{},"f":{"df":3,"docs":{"15":{"tf":1.4142135623730951},"16":{"tf":1.4142135623730951},"19":{"tf":6.244997998398398}}}}}}}}},"i":{"df":0,"docs":{},"l":{"d":{"df":6,"docs":{"13":{"tf":1.0},"14":{"tf":3.1622776601683795},"25":{"tf":1.0},"6":{"tf":1.0},"7":{"tf":3.1622776601683795},"9":{"tf":1.0}},"e":{"df":0,"docs":{},"r":{"df":1,"docs":{"5":{"tf":1.0}}}}},"df":0,"docs":{}}}},"y":{"df":0,"docs":{},"t":{"df":0,"docs":{},"e":{"df":2,"docs":{"13":{"tf":2.449489742783178},"6":{"tf":2.449489742783178}}}}}},"c":{"6":{"d":{"0":{"df":0,"docs":{},"f":{"5":{"df":1,"docs":{"4":{"tf":1.0}}},"df":0,"docs":{}}},"df":0,"docs":{}},"df":0,"docs":{}},"a":{"df":0,"docs":{},"l":{"df":0,"docs":{},"l":{"a":{"b":{"df":0,"docs":{},"l":{"df":1,"docs":{"5":{"tf":1.0}}}},"df":0,"docs":{}},"b":{"a":{"c":{"df":0,"docs":{},"k":{"df":2,"docs":{"12":{"tf":1.0},"5":{"tf":1.7320508075688772}}}},"df":0,"docs":{}},"df":0,"docs":{}},"df":0,"docs":{}}},"n":{"c":{"df":0,"docs":{},"e":{"df":0,"docs":{},"l":{"_":{"df":0,"docs":{},"s":{"df":0,"docs":{},"e":{"a":{"df":0,"docs":{},"r":{"c":{"df":0,"docs":{},"h":{"(":{"_":{"df":2,"docs":{"13":{"tf":1.0},"6":{"tf":1.0}}},"df":0,"docs":{}},"df":2,"docs":{"13":{"tf":1.0},"6":{"tf":1.0}}}},"df":0,"docs":{}}},"df":0,"docs":{},"l":{"df":0,"docs":{},"e":{"c":{"df":0,"docs":{},"t":{"df":2,"docs":{"13":{"tf":1.0},"6":{"tf":1.0}},"i":{"df":0,"docs":{},"o":{"df":0,"docs":{},"n":{"(":{"_":{"df":2,"docs":{"13":{"tf":1.0},"6":{"tf":1.0}}},"df":0,"docs":{}},"df":0,"docs":{}}}}}},"df":0,"docs":{}}}}}},"df":2,"docs":{"13":{"tf":1.4142135623730951},"6":{"tf":1.4142135623730951}}}}},"df":0,"docs":{}},"p":{"df":0,"docs":{},"t":{"df":0,"docs":{},"u":{"df":0,"docs":{},"r":{"df":1,"docs":{"19":{"tf":1.4142135623730951}}}}}}},"df":0,"docs":{},"e":{"df":0,"docs":{},"l":{"df":0,"docs":{},"l":{"df":1,"docs":{"22":{"tf":1.0}}}},"n":{"df":0,"docs":{},"t":{"df":0,"docs":{},"e":{"df":0,"docs":{},"r":{"df":4,"docs":{"13":{"tf":1.4142135623730951},"25":{"tf":1.4142135623730951},"6":{"tf":1.4142135623730951},"9":{"tf":1.4142135623730951}}}}}}},"h":{"a":{"df":0,"docs":{},"i":{"df":0,"docs":{},"n":{"(":{"_":{"df":2,"docs":{"13":{"tf":1.0},"6":{"tf":1.0}}},"df":0,"docs":{}},"df":3,"docs":{"13":{"tf":1.4142135623730951},"5":{"tf":1.0},"6":{"tf":1.4142135623730951}}}},"r":{"a":{"c":{"df":0,"docs":{},"t":{"df":2,"docs":{"13":{"tf":1.0},"6":{"tf":1.0}}}},"df":0,"docs":{}},"df":0,"docs":{}}},"df":0,"docs":{},"i":{"df":0,"docs":{},"l":{"d":{"df":1,"docs":{"20":{"tf":1.0}},"r":{"df":0,"docs":{},"e":{"df":0,"docs":{},"n":{"(":{"df":0,"docs":{},"n":{"df":0,"docs":{},"o":{"d":{"df":1,"docs":{"20":{"tf":1.0}}},"df":0,"docs":{}}}},"df":3,"docs":{"14":{"tf":2.0},"20":{"tf":1.0},"7":{"tf":2.0}}}}}},"df":0,"docs":{}}}},"l":{"df":0,"docs":{},"e":{"a":{"df":0,"docs":{},"r":{"_":{"df":0,"docs":{},"p":{"df":0,"docs":{},"e":{"df":0,"docs":{},"n":{"d":{"df":0,"docs":{},"i":{"df":0,"docs":{},"n":{"df":0,"docs":{},"g":{"_":{"df":0,"docs":{},"k":{"df":0,"docs":{},"e":{"df":0,"docs":{},"y":{"df":2,"docs":{"13":{"tf":1.0},"6":{"tf":1.0}},"s":{"(":{"_":{"df":2,"docs":{"13":{"tf":1.0},"6":{"tf":1.0}}},"df":0,"docs":{}},"df":0,"docs":{}}}}}},"df":0,"docs":{}}}}},"df":0,"docs":{}}}}},"df":2,"docs":{"13":{"tf":1.0},"6":{"tf":1.0}}}},"df":0,"docs":{}},"i":{"c":{"df":0,"docs":{},"k":{"df":3,"docs":{"10":{"tf":1.4142135623730951},"25":{"tf":1.0},"9":{"tf":1.0}}}},"df":0,"docs":{},"e":{"df":0,"docs":{},"n":{"df":0,"docs":{},"t":{"df":4,"docs":{"0":{"tf":1.0},"10":{"tf":1.0},"13":{"tf":1.0},"6":{"tf":1.0}}}}},"p":{"b":{"df":0,"docs":{},"o":{"a":{"df":0,"docs":{},"r":{"d":{"df":2,"docs":{"13":{"tf":1.4142135623730951},"6":{"tf":1.4142135623730951}}},"df":0,"docs":{}}},"df":0,"docs":{}}},"df":0,"docs":{}}},"o":{"df":0,"docs":{},"s":{"df":0,"docs":{},"e":{"_":{"df":0,"docs":{},"f":{"df":0,"docs":{},"l":{"df":0,"docs":{},"o":{"a":{"df":0,"docs":{},"t":{"df":0,"docs":{},"i":{"df":0,"docs":{},"n":{"df":0,"docs":{},"g":{"(":{"_":{"df":2,"docs":{"13":{"tf":1.0},"6":{"tf":1.0}}},"df":0,"docs":{}},"_":{"df":0,"docs":{},"i":{"d":{"(":{"_":{"df":2,"docs":{"13":{"tf":1.0},"6":{"tf":1.0}}},"df":0,"docs":{}},"df":2,"docs":{"13":{"tf":1.0},"6":{"tf":1.0}}},"df":0,"docs":{}}},"df":0,"docs":{}}}}}},"df":2,"docs":{"13":{"tf":1.0},"6":{"tf":1.0}}}}},"n":{"df":0,"docs":{},"o":{"d":{"df":2,"docs":{"13":{"tf":1.0},"6":{"tf":1.0}},"e":{"(":{"_":{"df":2,"docs":{"13":{"tf":1.0},"6":{"tf":1.0}}},"df":0,"docs":{}},"df":0,"docs":{}}},"df":0,"docs":{}}},"o":{"df":0,"docs":{},"n":{"_":{"df":0,"docs":{},"e":{"df":0,"docs":{},"m":{"df":0,"docs":{},"p":{"df":0,"docs":{},"t":{"df":0,"docs":{},"i":{"df":2,"docs":{"13":{"tf":1.0},"6":{"tf":1.0}}}}}}}},"df":0,"docs":{}}},"v":{"df":0,"docs":{},"i":{"df":0,"docs":{},"e":{"df":0,"docs":{},"w":{"(":{"_":{"df":2,"docs":{"13":{"tf":1.0},"6":{"tf":1.0}}},"df":0,"docs":{}},"df":2,"docs":{"13":{"tf":1.0},"6":{"tf":1.0}}}}}}},"df":2,"docs":{"13":{"tf":2.23606797749979},"6":{"tf":2.23606797749979}}}}}},"o":{"d":{"df":0,"docs":{},"e":{"df":1,"docs":{"19":{"tf":1.0}}}},"df":0,"docs":{},"l":{"df":0,"docs":{},"o":{"df":0,"docs":{},"r":{"(":{"df":0,"docs":{},"t":{"df":0,"docs":{},"h":{"df":0,"docs":{},"e":{"df":0,"docs":{},"m":{"df":1,"docs":{"26":{"tf":1.0}}}}}}},"df":2,"docs":{"11":{"tf":1.0},"26":{"tf":1.4142135623730951}}}}},"m":{"df":0,"docs":{},"m":{"a":{"df":0,"docs":{},"n":{"d":{"(":{"b":{"df":0,"docs":{},"u":{"df":0,"docs":{},"f":{"df":0,"docs":{},"f":{"df":1,"docs":{"19":{"tf":1.0}}}}}},"df":0,"docs":{}},"df":3,"docs":{"14":{"tf":1.7320508075688772},"19":{"tf":1.4142135623730951},"7":{"tf":1.7320508075688772}}},"df":0,"docs":{}}},"df":0,"docs":{}},"p":{"df":0,"docs":{},"o":{"df":0,"docs":{},"s":{"df":0,"docs":{},"i":{"df":0,"docs":{},"t":{"df":2,"docs":{"13":{"tf":1.0},"6":{"tf":1.0}}}}}}}},"n":{"df":0,"docs":{},"f":{"df":0,"docs":{},"i":{"df":0,"docs":{},"g":{"df":2,"docs":{"0":{"tf":1.7320508075688772},"4":{"tf":1.0}}}}},"t":{"a":{"df":0,"docs":{},"i":{"df":0,"docs":{},"n":{"df":2,"docs":{"14":{"tf":1.4142135623730951},"7":{"tf":1.4142135623730951}}}}},"df":0,"docs":{},"e":{"df":0,"docs":{},"x":{"df":0,"docs":{},"t":{"df":2,"docs":{"1":{"tf":1.4142135623730951},"15":{"tf":5.196152422706632}}}}},"r":{"df":0,"docs":{},"o":{"df":0,"docs":{},"l":{"df":1,"docs":{"19":{"tf":1.0}}}}}}},"p":{"df":0,"docs":{},"i":{"df":2,"docs":{"13":{"tf":1.4142135623730951},"6":{"tf":1.4142135623730951}}},"y":{"_":{"df":0,"docs":{},"s":{"df":0,"docs":{},"e":{"df":0,"docs":{},"l":{"df":0,"docs":{},"e":{"c":{"df":0,"docs":{},"t":{"df":2,"docs":{"13":{"tf":1.0},"6":{"tf":1.0}},"i":{"df":0,"docs":{},"o":{"df":0,"docs":{},"n":{"(":{"_":{"df":2,"docs":{"13":{"tf":1.0},"6":{"tf":1.0}}},"df":0,"docs":{}},"df":0,"docs":{}}}}}},"df":0,"docs":{}}}}}},"df":0,"docs":{}}},"u":{"df":0,"docs":{},"n":{"df":0,"docs":{},"t":{"df":1,"docs":{"19":{"tf":1.0}}}}}},"r":{"df":0,"docs":{},"e":{"a":{"df":0,"docs":{},"t":{"df":2,"docs":{"25":{"tf":1.0},"9":{"tf":1.0}},"i":{"df":0,"docs":{},"o":{"df":0,"docs":{},"n":{"df":2,"docs":{"13":{"tf":1.0},"6":{"tf":1.0}}}}}}},"df":0,"docs":{}}},"t":{"df":0,"docs":{},"x":{".":{"c":{"df":0,"docs":{},"u":{"df":0,"docs":{},"r":{"df":0,"docs":{},"r":{"df":0,"docs":{},"e":{"df":0,"docs":{},"n":{"df":0,"docs":{},"t":{"_":{"b":{"df":0,"docs":{},"u":{"df":0,"docs":{},"f":{"df":0,"docs":{},"f":{"df":3,"docs":{"15":{"tf":1.0},"19":{"tf":1.0},"4":{"tf":1.0}},"e":{"df":0,"docs":{},"r":{"(":{")":{".":{"c":{"df":0,"docs":{},"w":{"d":{"df":1,"docs":{"4":{"tf":1.0}}},"df":0,"docs":{}}},"df":0,"docs":{}},"df":0,"docs":{}},"df":0,"docs":{}},"df":0,"docs":{}}}}}}},"df":0,"docs":{}},"df":0,"docs":{}}}}}}}},"df":0,"docs":{},"t":{"a":{"b":{"df":0,"docs":{},"s":{"(":{")":{"[":{"c":{"df":0,"docs":{},"t":{"df":0,"docs":{},"x":{".":{"a":{"c":{"df":0,"docs":{},"t":{"df":0,"docs":{},"i":{"df":0,"docs":{},"v":{"df":0,"docs":{},"e":{"_":{"df":0,"docs":{},"i":{"df":0,"docs":{},"n":{"d":{"df":0,"docs":{},"e":{"df":0,"docs":{},"x":{"df":1,"docs":{"4":{"tf":1.0}}}}},"df":0,"docs":{}}}},"df":0,"docs":{}}}}}},"df":0,"docs":{}},"df":0,"docs":{}},"df":0,"docs":{}}}},"df":0,"docs":{}},"df":0,"docs":{}},"df":0,"docs":{}},"df":0,"docs":{}}},"df":0,"docs":{}},"df":0,"docs":{}}},"df":0,"docs":{}}},"u":{"df":0,"docs":{},"r":{"df":0,"docs":{},"r":{"df":0,"docs":{},"e":{"df":0,"docs":{},"n":{"df":0,"docs":{},"t":{"_":{"b":{"df":0,"docs":{},"u":{"df":0,"docs":{},"f":{"df":0,"docs":{},"f":{"df":4,"docs":{"14":{"tf":1.0},"15":{"tf":1.0},"16":{"tf":1.0},"7":{"tf":1.0}},"e":{"df":0,"docs":{},"r":{"(":{"_":{"df":2,"docs":{"14":{"tf":1.0},"7":{"tf":1.0}}},"c":{"df":0,"docs":{},"o":{"df":0,"docs":{},"n":{"df":0,"docs":{},"t":{"df":0,"docs":{},"e":{"df":0,"docs":{},"x":{"df":0,"docs":{},"t":{"df":1,"docs":{"15":{"tf":1.0}}}}}}}}},"df":0,"docs":{},"m":{"df":0,"docs":{},"u":{"df":0,"docs":{},"x":{"df":1,"docs":{"16":{"tf":1.0}}}}}},"df":0,"docs":{}}}}}}},"df":0,"docs":{},"f":{"df":0,"docs":{},"l":{"df":0,"docs":{},"o":{"a":{"df":0,"docs":{},"t":{"df":0,"docs":{},"i":{"df":0,"docs":{},"n":{"df":0,"docs":{},"g":{"(":{"c":{"df":0,"docs":{},"o":{"df":0,"docs":{},"n":{"df":0,"docs":{},"t":{"df":0,"docs":{},"e":{"df":0,"docs":{},"x":{"df":0,"docs":{},"t":{"df":1,"docs":{"15":{"tf":1.0}}}}}}}}},"df":0,"docs":{},"m":{"df":0,"docs":{},"u":{"df":0,"docs":{},"x":{"df":1,"docs":{"16":{"tf":1.0}}}}}},"df":0,"docs":{}}}}}},"df":2,"docs":{"15":{"tf":1.0},"16":{"tf":1.0}}}}},"m":{"df":0,"docs":{},"o":{"d":{"df":1,"docs":{"15":{"tf":1.0}},"e":{"(":{"c":{"df":0,"docs":{},"o":{"df":0,"docs":{},"n":{"df":0,"docs":{},"t":{"df":0,"docs":{},"e":{"df":0,"docs":{},"x":{"df":0,"docs":{},"t":{"df":1,"docs":{"15":{"tf":1.0}}}}}}}}},"df":0,"docs":{}},"df":0,"docs":{}}},"df":0,"docs":{}}},"n":{"df":0,"docs":{},"o":{"d":{"df":4,"docs":{"14":{"tf":1.0},"15":{"tf":1.0},"16":{"tf":1.0},"7":{"tf":1.0}},"e":{"(":{"_":{"df":2,"docs":{"14":{"tf":1.0},"7":{"tf":1.0}}},"c":{"df":0,"docs":{},"o":{"df":0,"docs":{},"n":{"df":0,"docs":{},"t":{"df":0,"docs":{},"e":{"df":0,"docs":{},"x":{"df":0,"docs":{},"t":{"df":1,"docs":{"15":{"tf":1.0}}}}}}}}},"df":0,"docs":{},"m":{"df":0,"docs":{},"u":{"df":0,"docs":{},"x":{"df":1,"docs":{"16":{"tf":1.0}}}}}},"df":0,"docs":{}}},"df":0,"docs":{}}},"s":{"df":0,"docs":{},"e":{"df":0,"docs":{},"s":{"df":0,"docs":{},"s":{"df":2,"docs":{"15":{"tf":1.0},"16":{"tf":1.0}},"i":{"df":0,"docs":{},"o":{"df":0,"docs":{},"n":{"(":{"c":{"df":0,"docs":{},"o":{"df":0,"docs":{},"n":{"df":0,"docs":{},"t":{"df":0,"docs":{},"e":{"df":0,"docs":{},"x":{"df":0,"docs":{},"t":{"df":1,"docs":{"15":{"tf":1.0}}}}}}}}},"df":0,"docs":{},"m":{"df":0,"docs":{},"u":{"df":0,"docs":{},"x":{"df":1,"docs":{"16":{"tf":1.0}}}}}},"df":0,"docs":{}}}}}}}}},"df":11,"docs":{"13":{"tf":4.123105625617661},"14":{"tf":1.7320508075688772},"15":{"tf":2.6457513110645907},"16":{"tf":2.449489742783178},"19":{"tf":1.7320508075688772},"20":{"tf":1.0},"22":{"tf":1.0},"24":{"tf":1.0},"6":{"tf":4.123105625617661},"7":{"tf":1.7320508075688772},"8":{"tf":1.0}}}}}}},"s":{"df":0,"docs":{},"t":{"df":0,"docs":{},"o":{"df":0,"docs":{},"m":{"df":1,"docs":{"5":{"tf":1.0}}}}}}},"w":{"d":{"(":{"b":{"df":0,"docs":{},"u":{"df":0,"docs":{},"f":{"df":0,"docs":{},"f":{"df":0,"docs":{},"e":{"df":0,"docs":{},"r":{"df":1,"docs":{"19":{"tf":1.0}}}}}}}},"df":0,"docs":{}},"df":4,"docs":{"14":{"tf":1.0},"19":{"tf":1.0},"4":{"tf":1.0},"7":{"tf":1.0}}},"df":0,"docs":{}}},"d":{"df":0,"docs":{},"e":{"c":{"df":0,"docs":{},"l":{"a":{"df":0,"docs":{},"r":{"df":1,"docs":{"0":{"tf":1.0}}}},"df":0,"docs":{}}},"df":0,"docs":{},"f":{"a":{"df":0,"docs":{},"u":{"df":0,"docs":{},"l":{"df":0,"docs":{},"t":{"df":4,"docs":{"13":{"tf":2.8284271247461903},"25":{"tf":1.4142135623730951},"6":{"tf":2.8284271247461903},"9":{"tf":1.4142135623730951}}}}}},"df":1,"docs":{"0":{"tf":1.0}},"i":{"df":0,"docs":{},"n":{"df":1,"docs":{"5":{"tf":1.0}},"e":{"_":{"a":{"c":{"df":0,"docs":{},"t":{"df":1,"docs":{"5":{"tf":1.4142135623730951}},"i":{"df":0,"docs":{},"o":{"df":0,"docs":{},"n":{"(":{"\\"":{"df":0,"docs":{},"s":{"df":0,"docs":{},"p":{"df":0,"docs":{},"l":{"df":0,"docs":{},"i":{"df":0,"docs":{},"t":{"df":1,"docs":{"4":{"tf":1.0}}}}}}}},"df":0,"docs":{},"n":{"a":{"df":0,"docs":{},"m":{"df":1,"docs":{"5":{"tf":1.0}}}},"df":0,"docs":{}}},"df":0,"docs":{}}}}}},"df":0,"docs":{}},"df":0,"docs":{},"m":{"df":0,"docs":{},"o":{"d":{"df":1,"docs":{"5":{"tf":1.0}},"e":{"(":{"df":0,"docs":{},"m":{"df":0,"docs":{},"o":{"d":{"df":0,"docs":{},"e":{"_":{"df":0,"docs":{},"n":{"a":{"df":0,"docs":{},"m":{"df":1,"docs":{"5":{"tf":1.4142135623730951}}}},"df":0,"docs":{}}},"df":0,"docs":{}}},"df":0,"docs":{}}}},"df":0,"docs":{}}},"df":0,"docs":{}}}},"df":0,"docs":{}},"i":{"df":0,"docs":{},"t":{"df":2,"docs":{"0":{"tf":1.0},"2":{"tf":1.4142135623730951}}}}}}},"s":{"c":{"df":0,"docs":{},"r":{"df":0,"docs":{},"i":{"df":0,"docs":{},"p":{"df":0,"docs":{},"t":{"df":22,"docs":{"10":{"tf":2.0},"11":{"tf":1.0},"12":{"tf":1.0},"13":{"tf":7.937253933193772},"14":{"tf":3.4641016151377544},"15":{"tf":3.4641016151377544},"16":{"tf":3.1622776601683795},"17":{"tf":2.23606797749979},"18":{"tf":2.0},"19":{"tf":4.242640687119285},"20":{"tf":3.872983346207417},"21":{"tf":2.6457513110645907},"22":{"tf":2.449489742783178},"23":{"tf":2.449489742783178},"24":{"tf":1.7320508075688772},"25":{"tf":1.4142135623730951},"26":{"tf":1.0},"5":{"tf":2.449489742783178},"6":{"tf":7.937253933193772},"7":{"tf":3.4641016151377544},"8":{"tf":1.7320508075688772},"9":{"tf":1.4142135623730951}}}}}}},"df":0,"docs":{}},"t":{"a":{"c":{"df":0,"docs":{},"h":{"_":{"b":{"df":0,"docs":{},"u":{"df":0,"docs":{},"f":{"df":0,"docs":{},"f":{"df":2,"docs":{"13":{"tf":1.0},"6":{"tf":1.0}},"e":{"df":0,"docs":{},"r":{"(":{"_":{"df":2,"docs":{"13":{"tf":1.0},"6":{"tf":1.0}}},"df":0,"docs":{}},"_":{"df":0,"docs":{},"i":{"d":{"(":{"_":{"df":2,"docs":{"13":{"tf":1.0},"6":{"tf":1.0}}},"df":0,"docs":{}},"df":2,"docs":{"13":{"tf":1.0},"6":{"tf":1.0}}},"df":0,"docs":{}}},"df":0,"docs":{}}}}}}},"df":0,"docs":{}},"df":5,"docs":{"13":{"tf":1.4142135623730951},"15":{"tf":1.0},"16":{"tf":1.0},"19":{"tf":1.0},"6":{"tf":1.4142135623730951}},"e":{"d":{"_":{"b":{"df":0,"docs":{},"u":{"df":0,"docs":{},"f":{"df":0,"docs":{},"f":{"df":2,"docs":{"15":{"tf":1.0},"16":{"tf":1.0}},"e":{"df":0,"docs":{},"r":{"df":0,"docs":{},"s":{"(":{"c":{"df":0,"docs":{},"o":{"df":0,"docs":{},"n":{"df":0,"docs":{},"t":{"df":0,"docs":{},"e":{"df":0,"docs":{},"x":{"df":0,"docs":{},"t":{"df":1,"docs":{"15":{"tf":1.0}}}}}}}}},"df":0,"docs":{},"m":{"df":0,"docs":{},"u":{"df":0,"docs":{},"x":{"df":1,"docs":{"16":{"tf":1.0}}}}}},"df":0,"docs":{}}}}}}}},"df":0,"docs":{}},"df":0,"docs":{}},"df":0,"docs":{}}}},"df":0,"docs":{}},"df":0,"docs":{},"e":{"c":{"df":0,"docs":{},"t":{"df":1,"docs":{"19":{"tf":1.0}}}},"df":0,"docs":{}}}},"i":{"df":0,"docs":{},"r":{"df":0,"docs":{},"e":{"c":{"df":0,"docs":{},"t":{"df":5,"docs":{"13":{"tf":1.0},"14":{"tf":1.7320508075688772},"20":{"tf":1.0},"6":{"tf":1.0},"7":{"tf":1.7320508075688772}},"o":{"df":0,"docs":{},"r":{"df":0,"docs":{},"i":{"df":1,"docs":{"19":{"tf":1.0}}}}}}},"df":0,"docs":{}}}},"o":{"df":0,"docs":{},"w":{"df":0,"docs":{},"n":{"df":2,"docs":{"13":{"tf":1.0},"6":{"tf":1.0}},"w":{"a":{"df":0,"docs":{},"r":{"d":{"df":2,"docs":{"13":{"tf":1.4142135623730951},"6":{"tf":1.4142135623730951}}},"df":0,"docs":{}}},"df":0,"docs":{}}}}}},"df":0,"docs":{},"e":{".":{"df":0,"docs":{},"g":{"df":2,"docs":{"13":{"tf":1.4142135623730951},"6":{"tf":1.4142135623730951}}}},"df":0,"docs":{},"m":{"b":{"df":0,"docs":{},"e":{"df":0,"docs":{},"r":{"df":1,"docs":{"0":{"tf":1.7320508075688772}}}}},"df":0,"docs":{},"i":{"df":0,"docs":{},"t":{"df":3,"docs":{"13":{"tf":1.0},"5":{"tf":1.0},"6":{"tf":1.0}}}},"p":{"df":0,"docs":{},"t":{"df":0,"docs":{},"i":{"df":4,"docs":{"13":{"tf":1.0},"14":{"tf":1.0},"6":{"tf":1.0},"7":{"tf":1.0}}}}}},"n":{"a":{"b":{"df":0,"docs":{},"l":{"df":2,"docs":{"13":{"tf":1.0},"6":{"tf":1.0}}}},"df":0,"docs":{}},"df":0,"docs":{},"t":{"df":0,"docs":{},"e":{"df":0,"docs":{},"r":{"_":{"df":0,"docs":{},"m":{"df":0,"docs":{},"o":{"d":{"df":2,"docs":{"13":{"tf":1.0},"6":{"tf":1.0}},"e":{"(":{"_":{"df":2,"docs":{"13":{"tf":1.0},"6":{"tf":1.0}}},"df":0,"docs":{}},"df":0,"docs":{}}},"df":0,"docs":{}}},"s":{"df":0,"docs":{},"e":{"a":{"df":0,"docs":{},"r":{"c":{"df":0,"docs":{},"h":{"_":{"df":0,"docs":{},"m":{"df":0,"docs":{},"o":{"d":{"df":2,"docs":{"13":{"tf":1.0},"6":{"tf":1.0}},"e":{"(":{"_":{"df":2,"docs":{"13":{"tf":1.0},"6":{"tf":1.0}}},"df":0,"docs":{}},"df":0,"docs":{}}},"df":0,"docs":{}}}},"df":0,"docs":{}}},"df":0,"docs":{}}},"df":0,"docs":{},"l":{"df":0,"docs":{},"e":{"c":{"df":0,"docs":{},"t":{"_":{"b":{"df":0,"docs":{},"l":{"df":0,"docs":{},"o":{"c":{"df":0,"docs":{},"k":{"(":{"_":{"df":2,"docs":{"13":{"tf":1.0},"6":{"tf":1.0}}},"df":0,"docs":{}},"df":2,"docs":{"13":{"tf":1.0},"6":{"tf":1.0}}}},"df":0,"docs":{}}}},"c":{"df":0,"docs":{},"h":{"a":{"df":0,"docs":{},"r":{"(":{"_":{"df":2,"docs":{"13":{"tf":1.0},"6":{"tf":1.0}}},"df":0,"docs":{}},"df":2,"docs":{"13":{"tf":1.0},"6":{"tf":1.0}}}},"df":0,"docs":{}}},"df":0,"docs":{},"l":{"df":0,"docs":{},"i":{"df":0,"docs":{},"n":{"df":2,"docs":{"13":{"tf":1.0},"6":{"tf":1.0}},"e":{"(":{"_":{"df":2,"docs":{"13":{"tf":1.0},"6":{"tf":1.0}}},"df":0,"docs":{}},"df":0,"docs":{}}}}}},"df":0,"docs":{}}},"df":0,"docs":{}}}}}},"df":2,"docs":{"13":{"tf":2.449489742783178},"6":{"tf":2.449489742783178}}}}},"v":{"(":{"_":{"df":2,"docs":{"24":{"tf":1.0},"8":{"tf":1.0}}},"df":0,"docs":{}},"_":{"df":0,"docs":{},"h":{"df":0,"docs":{},"i":{"df":0,"docs":{},"n":{"df":0,"docs":{},"t":{"(":{"b":{"df":0,"docs":{},"u":{"df":0,"docs":{},"f":{"df":0,"docs":{},"f":{"df":1,"docs":{"19":{"tf":1.0}}}}}},"df":0,"docs":{}},"df":1,"docs":{"19":{"tf":1.0}}}}}}},"df":4,"docs":{"14":{"tf":1.0},"24":{"tf":1.0},"7":{"tf":1.0},"8":{"tf":1.0}},"i":{"df":0,"docs":{},"r":{"df":0,"docs":{},"o":{"df":0,"docs":{},"n":{"df":3,"docs":{"19":{"tf":1.0},"24":{"tf":1.0},"8":{"tf":1.0}}}}}}}},"v":{"df":0,"docs":{},"e":{"df":0,"docs":{},"n":{"df":0,"docs":{},"t":{"(":{"c":{"df":0,"docs":{},"o":{"df":0,"docs":{},"n":{"df":0,"docs":{},"t":{"df":0,"docs":{},"e":{"df":0,"docs":{},"x":{"df":0,"docs":{},"t":{"df":1,"docs":{"15":{"tf":1.0}}}}}}}}},"df":0,"docs":{}},"df":6,"docs":{"0":{"tf":1.0},"1":{"tf":1.0},"10":{"tf":1.0},"15":{"tf":1.4142135623730951},"17":{"tf":2.23606797749979},"5":{"tf":1.0}},"i":{"df":0,"docs":{},"n":{"df":0,"docs":{},"f":{"df":0,"docs":{},"o":{"df":2,"docs":{"15":{"tf":1.0},"17":{"tf":3.605551275463989}}}}}}}}}},"x":{"a":{"df":0,"docs":{},"m":{"df":0,"docs":{},"p":{"df":0,"docs":{},"l":{"df":9,"docs":{"13":{"tf":1.0},"14":{"tf":1.0},"15":{"tf":1.0},"19":{"tf":1.0},"3":{"tf":1.4142135623730951},"4":{"tf":2.0},"5":{"tf":1.4142135623730951},"6":{"tf":1.0},"7":{"tf":1.0}},"e":{".":{"df":0,"docs":{},"m":{"d":{"df":1,"docs":{"3":{"tf":1.0}}},"df":0,"docs":{}}},"df":0,"docs":{}}}}}},"df":0,"docs":{},"e":{"c":{"df":0,"docs":{},"u":{"df":0,"docs":{},"t":{"df":3,"docs":{"0":{"tf":1.0},"24":{"tf":1.0},"8":{"tf":1.0}}}}},"df":0,"docs":{}},"i":{"df":0,"docs":{},"s":{"df":0,"docs":{},"t":{"df":5,"docs":{"14":{"tf":1.0},"15":{"tf":1.7320508075688772},"16":{"tf":1.7320508075688772},"26":{"tf":1.0},"7":{"tf":1.0}}}},"t":{"_":{"c":{"df":0,"docs":{},"o":{"d":{"df":1,"docs":{"19":{"tf":1.0}},"e":{"(":{"b":{"df":0,"docs":{},"u":{"df":0,"docs":{},"f":{"df":0,"docs":{},"f":{"df":1,"docs":{"19":{"tf":1.0}}}}}},"df":0,"docs":{}},"df":0,"docs":{}}},"df":0,"docs":{}}},"df":0,"docs":{}},"df":1,"docs":{"19":{"tf":1.0}}}},"p":{"df":0,"docs":{},"l":{"df":0,"docs":{},"i":{"c":{"df":0,"docs":{},"i":{"df":0,"docs":{},"t":{"df":2,"docs":{"14":{"tf":1.4142135623730951},"7":{"tf":1.4142135623730951}}}}},"df":0,"docs":{}}},"o":{"df":0,"docs":{},"r":{"df":0,"docs":{},"t":{"df":1,"docs":{"0":{"tf":1.0}}}}}}}},"f":{"a":{"df":0,"docs":{},"l":{"df":0,"docs":{},"l":{"b":{"a":{"c":{"df":0,"docs":{},"k":{"df":1,"docs":{"5":{"tf":1.4142135623730951}}}},"df":0,"docs":{}},"df":0,"docs":{}},"df":0,"docs":{}}}},"df":0,"docs":{},"g":{"df":1,"docs":{"4":{"tf":1.0}}},"i":{"df":0,"docs":{},"l":{"df":0,"docs":{},"e":{"df":1,"docs":{"0":{"tf":1.4142135623730951}}}},"n":{"d":{"_":{"b":{"df":0,"docs":{},"u":{"df":0,"docs":{},"f":{"df":0,"docs":{},"f":{"df":2,"docs":{"15":{"tf":1.0},"16":{"tf":1.0}},"e":{"df":0,"docs":{},"r":{"(":{"c":{"df":0,"docs":{},"o":{"df":0,"docs":{},"n":{"df":0,"docs":{},"t":{"df":0,"docs":{},"e":{"df":0,"docs":{},"x":{"df":0,"docs":{},"t":{"df":1,"docs":{"15":{"tf":1.0}}}}}}}}},"df":0,"docs":{},"m":{"df":0,"docs":{},"u":{"df":0,"docs":{},"x":{"df":1,"docs":{"16":{"tf":1.0}}}}}},"df":0,"docs":{}}}}}}},"df":0,"docs":{},"f":{"df":0,"docs":{},"l":{"df":0,"docs":{},"o":{"a":{"df":0,"docs":{},"t":{"df":2,"docs":{"15":{"tf":1.0},"16":{"tf":1.0}},"i":{"df":0,"docs":{},"n":{"df":0,"docs":{},"g":{"(":{"c":{"df":0,"docs":{},"o":{"df":0,"docs":{},"n":{"df":0,"docs":{},"t":{"df":0,"docs":{},"e":{"df":0,"docs":{},"x":{"df":0,"docs":{},"t":{"df":1,"docs":{"15":{"tf":1.0}}}}}}}}},"df":0,"docs":{},"m":{"df":0,"docs":{},"u":{"df":0,"docs":{},"x":{"df":1,"docs":{"16":{"tf":1.0}}}}}},"df":0,"docs":{}}}}}},"df":0,"docs":{}}}},"n":{"df":0,"docs":{},"o":{"d":{"df":2,"docs":{"15":{"tf":1.0},"16":{"tf":1.0}},"e":{"(":{"c":{"df":0,"docs":{},"o":{"df":0,"docs":{},"n":{"df":0,"docs":{},"t":{"df":0,"docs":{},"e":{"df":0,"docs":{},"x":{"df":0,"docs":{},"t":{"df":1,"docs":{"15":{"tf":1.0}}}}}}}}},"df":0,"docs":{},"m":{"df":0,"docs":{},"u":{"df":0,"docs":{},"x":{"df":1,"docs":{"16":{"tf":1.0}}}}}},"df":0,"docs":{}}},"df":0,"docs":{}}}},"df":2,"docs":{"15":{"tf":1.7320508075688772},"16":{"tf":1.7320508075688772}}},"df":0,"docs":{}},"r":{"df":0,"docs":{},"s":{"df":0,"docs":{},"t":{"df":2,"docs":{"14":{"tf":1.0},"7":{"tf":1.0}}}}},"x":{"df":0,"docs":{},"t":{"df":0,"docs":{},"u":{"df":0,"docs":{},"r":{"df":1,"docs":{"4":{"tf":1.0}}}}}}},"l":{"df":0,"docs":{},"o":{"a":{"df":0,"docs":{},"t":{"df":9,"docs":{"1":{"tf":1.0},"13":{"tf":2.0},"15":{"tf":1.4142135623730951},"16":{"tf":1.4142135623730951},"17":{"tf":1.0},"18":{"tf":1.4142135623730951},"20":{"tf":1.0},"21":{"tf":2.23606797749979},"6":{"tf":2.0}},"i":{"df":0,"docs":{},"n":{"df":0,"docs":{},"g":{"(":{"df":0,"docs":{},"s":{"df":0,"docs":{},"e":{"df":0,"docs":{},"s":{"df":0,"docs":{},"s":{"df":1,"docs":{"18":{"tf":1.0}}}}}}},"_":{"df":0,"docs":{},"i":{"d":{"(":{"df":0,"docs":{},"e":{"df":0,"docs":{},"v":{"df":1,"docs":{"17":{"tf":1.0}}}}},"df":5,"docs":{"13":{"tf":1.0},"15":{"tf":1.0},"16":{"tf":1.0},"17":{"tf":1.0},"6":{"tf":1.0}}},"df":0,"docs":{}}},"a":{"df":0,"docs":{},"n":{"c":{"df":0,"docs":{},"h":{"df":0,"docs":{},"o":{"df":0,"docs":{},"r":{"df":2,"docs":{"13":{"tf":1.0},"6":{"tf":1.0}}}}}},"df":0,"docs":{}}},"df":0,"docs":{},"r":{"df":0,"docs":{},"e":{"df":0,"docs":{},"f":{"df":3,"docs":{"15":{"tf":1.4142135623730951},"16":{"tf":1.4142135623730951},"21":{"tf":4.123105625617661}}}}},"s":{"df":2,"docs":{"13":{"tf":1.4142135623730951},"6":{"tf":1.4142135623730951}}}}}}}},"df":0,"docs":{}}},"n":{"df":23,"docs":{"10":{"tf":2.8284271247461903},"11":{"tf":1.4142135623730951},"12":{"tf":1.4142135623730951},"13":{"tf":11.313708498984761},"14":{"tf":5.0990195135927845},"15":{"tf":4.898979485566356},"16":{"tf":4.47213595499958},"17":{"tf":3.1622776601683795},"18":{"tf":2.8284271247461903},"19":{"tf":6.0},"20":{"tf":5.477225575051661},"21":{"tf":3.7416573867739413},"22":{"tf":3.4641016151377544},"23":{"tf":3.4641016151377544},"24":{"tf":2.449489742783178},"25":{"tf":2.23606797749979},"26":{"tf":1.4142135623730951},"4":{"tf":1.7320508075688772},"5":{"tf":3.872983346207417},"6":{"tf":11.313708498984761},"7":{"tf":5.0990195135927845},"8":{"tf":2.449489742783178},"9":{"tf":2.23606797749979}},"p":{"df":0,"docs":{},"t":{"df":0,"docs":{},"r":{"df":2,"docs":{"12":{"tf":1.0},"5":{"tf":1.4142135623730951}}}}}},"o":{"c":{"df":0,"docs":{},"u":{"df":3,"docs":{"10":{"tf":1.0},"13":{"tf":2.6457513110645907},"6":{"tf":2.6457513110645907}},"s":{"_":{"b":{"df":0,"docs":{},"u":{"df":0,"docs":{},"f":{"df":0,"docs":{},"f":{"df":2,"docs":{"13":{"tf":1.0},"6":{"tf":1.0}},"e":{"df":0,"docs":{},"r":{"(":{"_":{"df":2,"docs":{"13":{"tf":1.0},"6":{"tf":1.0}}},"df":0,"docs":{}},"df":0,"docs":{}}}}}}},"d":{"df":0,"docs":{},"o":{"df":0,"docs":{},"w":{"df":0,"docs":{},"n":{"(":{"_":{"df":2,"docs":{"13":{"tf":1.0},"6":{"tf":1.0}}},"df":0,"docs":{}},"df":2,"docs":{"13":{"tf":1.0},"6":{"tf":1.0}}}}}},"df":0,"docs":{},"l":{"df":0,"docs":{},"e":{"df":0,"docs":{},"f":{"df":0,"docs":{},"t":{"(":{"_":{"df":2,"docs":{"13":{"tf":1.0},"6":{"tf":1.0}}},"df":0,"docs":{}},"df":2,"docs":{"13":{"tf":1.0},"6":{"tf":1.0}}}}}},"r":{"df":0,"docs":{},"i":{"df":0,"docs":{},"g":{"df":0,"docs":{},"h":{"df":0,"docs":{},"t":{"(":{"_":{"df":2,"docs":{"13":{"tf":1.0},"6":{"tf":1.0}}},"df":0,"docs":{}},"df":2,"docs":{"13":{"tf":1.0},"6":{"tf":1.0}}}}}}},"u":{"df":0,"docs":{},"p":{"(":{"_":{"df":2,"docs":{"13":{"tf":1.0},"6":{"tf":1.0}}},"df":0,"docs":{}},"df":2,"docs":{"13":{"tf":1.0},"6":{"tf":1.0}}}}},"df":9,"docs":{"10":{"tf":1.4142135623730951},"13":{"tf":3.3166247903554},"14":{"tf":1.7320508075688772},"15":{"tf":1.7320508075688772},"16":{"tf":1.7320508075688772},"20":{"tf":1.0},"21":{"tf":1.0},"6":{"tf":3.3166247903554},"7":{"tf":1.7320508075688772}}}}},"df":0,"docs":{},"l":{"df":0,"docs":{},"l":{"df":0,"docs":{},"o":{"df":0,"docs":{},"w":{"_":{"df":0,"docs":{},"o":{"df":0,"docs":{},"u":{"df":0,"docs":{},"t":{"df":0,"docs":{},"p":{"df":0,"docs":{},"u":{"df":0,"docs":{},"t":{"(":{"_":{"df":2,"docs":{"13":{"tf":1.0},"6":{"tf":1.0}}},"df":0,"docs":{}},"df":2,"docs":{"13":{"tf":1.0},"6":{"tf":1.0}}}}}}}}},"df":2,"docs":{"13":{"tf":1.0},"6":{"tf":1.0}}}}}},"r":{"df":0,"docs":{},"m":{"a":{"df":0,"docs":{},"t":{"_":{"df":0,"docs":{},"t":{"a":{"b":{"df":0,"docs":{},"s":{"(":{"c":{"df":0,"docs":{},"t":{"df":0,"docs":{},"x":{"df":1,"docs":{"4":{"tf":1.0}}}}},"df":0,"docs":{}},"df":0,"docs":{}}},"df":0,"docs":{}},"df":0,"docs":{}}},"df":2,"docs":{"12":{"tf":1.0},"22":{"tf":1.4142135623730951}},"t":{"df":2,"docs":{"0":{"tf":1.0},"22":{"tf":1.7320508075688772}}}}},"df":0,"docs":{}},"w":{"a":{"df":0,"docs":{},"r":{"d":{"df":1,"docs":{"10":{"tf":1.4142135623730951}}},"df":0,"docs":{}}},"df":0,"docs":{}}},"u":{"df":0,"docs":{},"n":{"d":{"df":2,"docs":{"24":{"tf":1.0},"8":{"tf":1.0}}},"df":0,"docs":{}}}},"u":{"df":0,"docs":{},"l":{"df":0,"docs":{},"l":{"df":3,"docs":{"19":{"tf":1.0},"25":{"tf":1.0},"9":{"tf":1.0}}}},"n":{"c":{"df":0,"docs":{},"t":{"df":0,"docs":{},"i":{"df":0,"docs":{},"o":{"df":0,"docs":{},"n":{"df":2,"docs":{"12":{"tf":1.0},"5":{"tf":1.0}}}}}}},"df":0,"docs":{}}}},"g":{"df":0,"docs":{},"e":{"df":0,"docs":{},"n":{"df":0,"docs":{},"e":{"df":0,"docs":{},"r":{"df":1,"docs":{"0":{"tf":1.0}}}}},"o":{"df":0,"docs":{},"m":{"df":0,"docs":{},"e":{"df":0,"docs":{},"t":{"df":0,"docs":{},"r":{"df":0,"docs":{},"i":{"df":2,"docs":{"20":{"tf":1.4142135623730951},"21":{"tf":1.4142135623730951}}},"y":{"(":{"df":0,"docs":{},"f":{"df":0,"docs":{},"l":{"df":0,"docs":{},"o":{"df":1,"docs":{"21":{"tf":1.0}}}}},"n":{"df":0,"docs":{},"o":{"d":{"df":1,"docs":{"20":{"tf":1.0}}},"df":0,"docs":{}}}},"df":0,"docs":{}}}}}}}},"l":{"df":0,"docs":{},"o":{"b":{"a":{"df":0,"docs":{},"l":{"df":23,"docs":{"1":{"tf":1.0},"10":{"tf":1.0},"11":{"tf":1.0},"12":{"tf":1.0},"13":{"tf":1.0},"14":{"tf":1.0},"15":{"tf":1.0},"16":{"tf":1.0},"17":{"tf":1.0},"18":{"tf":1.0},"19":{"tf":1.0},"20":{"tf":1.0},"21":{"tf":1.0},"22":{"tf":1.0},"23":{"tf":1.0},"24":{"tf":1.0},"25":{"tf":1.0},"26":{"tf":1.0},"5":{"tf":3.1622776601683795},"6":{"tf":1.0},"7":{"tf":1.0},"8":{"tf":1.0},"9":{"tf":1.0}}}},"df":0,"docs":{}},"df":0,"docs":{}}}},"h":{"a":{"df":0,"docs":{},"n":{"d":{"df":0,"docs":{},"l":{"df":0,"docs":{},"e":{"df":0,"docs":{},"r":{"df":1,"docs":{"0":{"tf":1.0}}}}}},"df":0,"docs":{}},"s":{"_":{"a":{"c":{"df":0,"docs":{},"t":{"df":1,"docs":{"23":{"tf":1.0}},"i":{"df":0,"docs":{},"v":{"df":0,"docs":{},"i":{"df":0,"docs":{},"t":{"df":0,"docs":{},"y":{"(":{"df":0,"docs":{},"t":{"a":{"b":{"df":1,"docs":{"23":{"tf":1.0}}},"df":0,"docs":{}},"df":0,"docs":{}}},"df":0,"docs":{}}}}}}}},"df":0,"docs":{}},"b":{"df":0,"docs":{},"e":{"df":0,"docs":{},"l":{"df":1,"docs":{"23":{"tf":1.0}},"l":{"(":{"df":0,"docs":{},"t":{"a":{"b":{"df":1,"docs":{"23":{"tf":1.0}}},"df":0,"docs":{}},"df":0,"docs":{}}},"df":0,"docs":{}}}}},"df":0,"docs":{}},"df":0,"docs":{}}},"df":0,"docs":{},"e":{"df":0,"docs":{},"i":{"df":0,"docs":{},"g":{"df":0,"docs":{},"h":{"df":0,"docs":{},"t":{"df":2,"docs":{"13":{"tf":1.4142135623730951},"6":{"tf":1.4142135623730951}}}}}}},"i":{"df":0,"docs":{},"n":{"df":0,"docs":{},"t":{"df":1,"docs":{"19":{"tf":1.0}}}},"s":{"df":0,"docs":{},"t":{"df":0,"docs":{},"o":{"df":0,"docs":{},"r":{"df":0,"docs":{},"i":{"df":1,"docs":{"19":{"tf":1.4142135623730951}}},"y":{"_":{"df":0,"docs":{},"t":{"df":0,"docs":{},"e":{"df":0,"docs":{},"x":{"df":0,"docs":{},"t":{"(":{"b":{"df":0,"docs":{},"u":{"df":0,"docs":{},"f":{"df":0,"docs":{},"f":{"df":1,"docs":{"19":{"tf":1.0}}}}}},"df":0,"docs":{}},"df":1,"docs":{"19":{"tf":1.0}}}}}}},"df":0,"docs":{}}}}}}},"o":{"df":0,"docs":{},"o":{"df":0,"docs":{},"k":{"df":1,"docs":{"5":{"tf":1.0}}}},"r":{"df":0,"docs":{},"i":{"df":0,"docs":{},"z":{"df":0,"docs":{},"o":{"df":0,"docs":{},"n":{"df":0,"docs":{},"t":{"df":4,"docs":{"13":{"tf":1.0},"14":{"tf":1.0},"6":{"tf":1.0},"7":{"tf":1.0}}}}}}}}}},"i":{"1":{"6":{"df":2,"docs":{"13":{"tf":1.4142135623730951},"6":{"tf":1.4142135623730951}}},"df":0,"docs":{}},"d":{"(":{"b":{"df":0,"docs":{},"u":{"df":0,"docs":{},"f":{"df":0,"docs":{},"f":{"df":1,"docs":{"19":{"tf":1.0}}}}}},"df":0,"docs":{},"f":{"df":0,"docs":{},"l":{"df":0,"docs":{},"o":{"a":{"df":0,"docs":{},"t":{"df":1,"docs":{"21":{"tf":1.0}}}},"df":0,"docs":{}}}},"n":{"df":0,"docs":{},"o":{"d":{"df":1,"docs":{"20":{"tf":1.0}}},"df":0,"docs":{}}},"s":{"df":0,"docs":{},"e":{"df":0,"docs":{},"s":{"df":0,"docs":{},"s":{"df":1,"docs":{"18":{"tf":1.0}}}}}}},"df":12,"docs":{"13":{"tf":2.6457513110645907},"14":{"tf":1.0},"15":{"tf":1.7320508075688772},"16":{"tf":1.7320508075688772},"17":{"tf":2.0},"18":{"tf":1.7320508075688772},"19":{"tf":2.23606797749979},"20":{"tf":2.449489742783178},"21":{"tf":2.0},"22":{"tf":1.0},"6":{"tf":2.6457513110645907},"7":{"tf":1.0}}},"df":0,"docs":{},"n":{"c":{"df":0,"docs":{},"r":{"df":0,"docs":{},"e":{"df":0,"docs":{},"m":{"df":0,"docs":{},"e":{"df":0,"docs":{},"n":{"df":0,"docs":{},"t":{"df":2,"docs":{"13":{"tf":1.0},"6":{"tf":1.0}}}}}}}}},"d":{"df":0,"docs":{},"e":{"df":0,"docs":{},"x":{"(":{"df":0,"docs":{},"t":{"a":{"b":{"df":1,"docs":{"23":{"tf":1.0}}},"df":0,"docs":{}},"df":0,"docs":{}}},"df":5,"docs":{"13":{"tf":2.0},"20":{"tf":1.0},"22":{"tf":1.0},"23":{"tf":1.4142135623730951},"6":{"tf":2.0}}}}},"df":0,"docs":{},"f":{"df":0,"docs":{},"o":{"df":1,"docs":{"1":{"tf":1.4142135623730951}}}},"l":{"df":0,"docs":{},"i":{"df":0,"docs":{},"n":{"df":1,"docs":{"5":{"tf":1.0}}}}},"p":{"df":0,"docs":{},"u":{"df":0,"docs":{},"t":{"df":4,"docs":{"13":{"tf":1.7320508075688772},"15":{"tf":1.0},"5":{"tf":1.0},"6":{"tf":1.7320508075688772}}}}},"s":{"df":0,"docs":{},"e":{"df":0,"docs":{},"r":{"df":0,"docs":{},"t":{"_":{"df":0,"docs":{},"t":{"a":{"b":{"_":{"a":{"df":0,"docs":{},"f":{"df":0,"docs":{},"t":{"df":2,"docs":{"13":{"tf":1.0},"6":{"tf":1.0}},"e":{"df":0,"docs":{},"r":{"(":{"_":{"df":2,"docs":{"13":{"tf":1.0},"6":{"tf":1.0}}},"df":0,"docs":{}},"_":{"c":{"df":0,"docs":{},"u":{"df":0,"docs":{},"r":{"df":0,"docs":{},"r":{"df":2,"docs":{"13":{"tf":1.0},"6":{"tf":1.0}},"e":{"df":0,"docs":{},"n":{"df":0,"docs":{},"t":{"(":{"_":{"df":2,"docs":{"13":{"tf":1.0},"6":{"tf":1.0}}},"df":0,"docs":{}},"df":0,"docs":{}}}}}}}},"df":0,"docs":{}},"df":0,"docs":{}}}}}},"b":{"df":0,"docs":{},"e":{"df":0,"docs":{},"f":{"df":0,"docs":{},"o":{"df":0,"docs":{},"r":{"df":2,"docs":{"13":{"tf":1.0},"6":{"tf":1.0}},"e":{"(":{"_":{"df":2,"docs":{"13":{"tf":1.0},"6":{"tf":1.0}}},"df":0,"docs":{}},"_":{"c":{"df":0,"docs":{},"u":{"df":0,"docs":{},"r":{"df":0,"docs":{},"r":{"df":2,"docs":{"13":{"tf":1.0},"6":{"tf":1.0}},"e":{"df":0,"docs":{},"n":{"df":0,"docs":{},"t":{"(":{"_":{"df":2,"docs":{"13":{"tf":1.0},"6":{"tf":1.0}}},"df":0,"docs":{}},"df":0,"docs":{}}}}}}}},"df":0,"docs":{}},"df":0,"docs":{}}}}}}},"df":0,"docs":{}},"df":0,"docs":{}},"df":0,"docs":{}},"df":0,"docs":{}}},"df":2,"docs":{"13":{"tf":2.0},"6":{"tf":2.0}}}}}},"t":{"df":15,"docs":{"13":{"tf":4.47213595499958},"14":{"tf":1.4142135623730951},"15":{"tf":1.7320508075688772},"16":{"tf":1.7320508075688772},"17":{"tf":2.0},"18":{"tf":1.4142135623730951},"19":{"tf":2.449489742783178},"20":{"tf":2.23606797749979},"21":{"tf":1.7320508075688772},"22":{"tf":1.7320508075688772},"23":{"tf":1.4142135623730951},"24":{"tf":1.0},"6":{"tf":4.47213595499958},"7":{"tf":1.4142135623730951},"8":{"tf":1.0}}}},"s":{"_":{"a":{"c":{"df":0,"docs":{},"t":{"df":1,"docs":{"23":{"tf":1.0}},"i":{"df":0,"docs":{},"v":{"df":0,"docs":{},"e":{"(":{"df":0,"docs":{},"t":{"a":{"b":{"df":1,"docs":{"23":{"tf":1.0}}},"df":0,"docs":{}},"df":0,"docs":{}}},"df":0,"docs":{}}}}}},"df":0,"docs":{},"t":{"df":0,"docs":{},"t":{"a":{"c":{"df":0,"docs":{},"h":{"df":1,"docs":{"19":{"tf":1.0}},"e":{"d":{"(":{"b":{"df":0,"docs":{},"u":{"df":0,"docs":{},"f":{"df":0,"docs":{},"f":{"df":1,"docs":{"19":{"tf":1.0}}}}}},"df":0,"docs":{}},"df":0,"docs":{}},"df":0,"docs":{}}}},"df":0,"docs":{}},"df":0,"docs":{}}}},"d":{"df":0,"docs":{},"e":{"df":0,"docs":{},"t":{"a":{"c":{"df":0,"docs":{},"h":{"df":1,"docs":{"19":{"tf":1.0}},"e":{"d":{"(":{"b":{"df":0,"docs":{},"u":{"df":0,"docs":{},"f":{"df":0,"docs":{},"f":{"df":1,"docs":{"19":{"tf":1.0}}}}}},"df":0,"docs":{}},"df":0,"docs":{}},"df":0,"docs":{}}}},"df":0,"docs":{}},"df":0,"docs":{}}}},"df":0,"docs":{},"f":{"df":0,"docs":{},"l":{"df":0,"docs":{},"o":{"a":{"df":0,"docs":{},"t":{"df":0,"docs":{},"i":{"df":0,"docs":{},"n":{"df":0,"docs":{},"g":{"_":{"df":0,"docs":{},"r":{"df":0,"docs":{},"o":{"df":0,"docs":{},"o":{"df":0,"docs":{},"t":{"(":{"df":0,"docs":{},"n":{"df":0,"docs":{},"o":{"d":{"df":1,"docs":{"20":{"tf":1.0}}},"df":0,"docs":{}}}},"df":1,"docs":{"20":{"tf":1.0}}}}}}},"df":0,"docs":{}}}}}},"df":0,"docs":{}}},"o":{"c":{"df":0,"docs":{},"u":{"df":0,"docs":{},"s":{"df":2,"docs":{"20":{"tf":1.0},"21":{"tf":1.0}},"e":{"d":{"(":{"df":0,"docs":{},"f":{"df":0,"docs":{},"l":{"df":0,"docs":{},"o":{"df":1,"docs":{"21":{"tf":1.0}}}}},"n":{"df":0,"docs":{},"o":{"d":{"df":1,"docs":{"20":{"tf":1.0}}},"df":0,"docs":{}}}},"df":0,"docs":{}},"df":0,"docs":{}}}}},"df":0,"docs":{}}},"r":{"df":0,"docs":{},"o":{"df":0,"docs":{},"o":{"df":0,"docs":{},"t":{"(":{"b":{"a":{"df":0,"docs":{},"r":{"df":1,"docs":{"22":{"tf":1.0}}}},"df":0,"docs":{}},"df":0,"docs":{},"n":{"df":0,"docs":{},"o":{"d":{"df":1,"docs":{"20":{"tf":1.0}}},"df":0,"docs":{}}}},"df":2,"docs":{"20":{"tf":1.0},"22":{"tf":1.0}}}}},"u":{"df":0,"docs":{},"n":{"df":1,"docs":{"19":{"tf":1.0}},"n":{"df":0,"docs":{},"i":{"df":0,"docs":{},"n":{"df":0,"docs":{},"g":{"(":{"b":{"df":0,"docs":{},"u":{"df":0,"docs":{},"f":{"df":0,"docs":{},"f":{"df":1,"docs":{"19":{"tf":1.0}}}}}},"df":0,"docs":{}},"df":0,"docs":{}}}}}}}},"v":{"df":0,"docs":{},"i":{"df":0,"docs":{},"s":{"df":3,"docs":{"19":{"tf":1.0},"20":{"tf":1.0},"21":{"tf":1.0}},"i":{"b":{"df":0,"docs":{},"l":{"df":0,"docs":{},"e":{"(":{"b":{"df":0,"docs":{},"u":{"df":0,"docs":{},"f":{"df":0,"docs":{},"f":{"df":1,"docs":{"19":{"tf":1.0}}}}}},"df":0,"docs":{},"f":{"df":0,"docs":{},"l":{"df":0,"docs":{},"o":{"df":1,"docs":{"21":{"tf":1.0}}}}},"n":{"df":0,"docs":{},"o":{"d":{"df":1,"docs":{"20":{"tf":1.0}}},"df":0,"docs":{}}}},"df":0,"docs":{}}}},"df":0,"docs":{}}}}}},"df":0,"docs":{}}},"j":{"df":0,"docs":{},"u":{"df":0,"docs":{},"m":{"df":0,"docs":{},"p":{"df":2,"docs":{"13":{"tf":1.4142135623730951},"6":{"tf":1.4142135623730951}}}}}},"k":{"df":0,"docs":{},"e":{"df":0,"docs":{},"y":{"df":6,"docs":{"13":{"tf":1.7320508075688772},"14":{"tf":1.4142135623730951},"19":{"tf":1.0},"5":{"tf":1.4142135623730951},"6":{"tf":1.7320508075688772},"7":{"tf":1.4142135623730951}}}},"i":{"df":0,"docs":{},"l":{"df":0,"docs":{},"l":{"_":{"b":{"df":0,"docs":{},"u":{"df":0,"docs":{},"f":{"df":0,"docs":{},"f":{"df":2,"docs":{"13":{"tf":1.0},"6":{"tf":1.0}},"e":{"df":0,"docs":{},"r":{"(":{"_":{"df":2,"docs":{"13":{"tf":1.0},"6":{"tf":1.0}}},"df":0,"docs":{}},"_":{"df":0,"docs":{},"i":{"d":{"(":{"_":{"df":2,"docs":{"13":{"tf":1.0},"6":{"tf":1.0}}},"df":0,"docs":{}},"df":2,"docs":{"13":{"tf":1.0},"6":{"tf":1.0}}},"df":0,"docs":{}}},"df":0,"docs":{}}}}}}},"df":0,"docs":{}},"df":2,"docs":{"13":{"tf":1.4142135623730951},"6":{"tf":1.4142135623730951}}}},"n":{"d":{"(":{"df":0,"docs":{},"n":{"df":0,"docs":{},"o":{"d":{"df":1,"docs":{"20":{"tf":1.0}}},"df":0,"docs":{}}}},"df":1,"docs":{"20":{"tf":1.4142135623730951}}},"df":0,"docs":{}}}},"l":{"df":0,"docs":{},"e":{"a":{"d":{"df":0,"docs":{},"e":{"df":0,"docs":{},"r":{">":{"df":0,"docs":{},"w":{"df":1,"docs":{"5":{"tf":1.0}}}},"df":2,"docs":{"4":{"tf":1.0},"5":{"tf":1.0}}}}},"df":0,"docs":{},"v":{"df":2,"docs":{"13":{"tf":1.0},"6":{"tf":1.0}},"e":{"_":{"df":0,"docs":{},"m":{"df":0,"docs":{},"o":{"d":{"df":2,"docs":{"13":{"tf":1.0},"6":{"tf":1.0}},"e":{"(":{"_":{"df":2,"docs":{"13":{"tf":1.0},"6":{"tf":1.0}}},"df":0,"docs":{}},"df":0,"docs":{}}},"df":0,"docs":{}}}},"df":0,"docs":{}}}},"df":0,"docs":{},"f":{"df":0,"docs":{},"t":{"df":4,"docs":{"13":{"tf":1.4142135623730951},"25":{"tf":1.4142135623730951},"6":{"tf":1.4142135623730951},"9":{"tf":1.4142135623730951}}}},"v":{"df":0,"docs":{},"e":{"df":0,"docs":{},"l":{"df":3,"docs":{"0":{"tf":1.0},"13":{"tf":1.0},"6":{"tf":1.0}}}}}},"i":{"df":0,"docs":{},"m":{"df":0,"docs":{},"i":{"df":0,"docs":{},"t":{"df":1,"docs":{"19":{"tf":1.4142135623730951}}}}},"n":{"df":0,"docs":{},"e":{"df":3,"docs":{"13":{"tf":1.7320508075688772},"19":{"tf":1.0},"6":{"tf":1.7320508075688772}}}},"v":{"df":0,"docs":{},"e":{"df":3,"docs":{"0":{"tf":1.4142135623730951},"13":{"tf":1.0},"6":{"tf":1.0}}}}},"o":{"c":{"a":{"df":0,"docs":{},"l":{"df":2,"docs":{"13":{"tf":2.449489742783178},"6":{"tf":2.449489742783178}}}},"df":0,"docs":{}},"df":0,"docs":{},"o":{"df":0,"docs":{},"k":{"df":1,"docs":{"19":{"tf":1.0}}}}}},"m":{"a":{"df":0,"docs":{},"i":{"df":0,"docs":{},"n":{"df":1,"docs":{"4":{"tf":1.0}}}},"n":{"df":0,"docs":{},"i":{"df":1,"docs":{"23":{"tf":1.0}}}},"p":{"<":{"df":0,"docs":{},"s":{"df":0,"docs":{},"t":{"df":0,"docs":{},"r":{"df":2,"docs":{"14":{"tf":1.0},"7":{"tf":1.0}}}}}},"df":10,"docs":{"11":{"tf":1.0},"13":{"tf":1.4142135623730951},"14":{"tf":1.0},"20":{"tf":1.4142135623730951},"21":{"tf":1.4142135623730951},"25":{"tf":1.0},"5":{"tf":1.0},"6":{"tf":1.4142135623730951},"7":{"tf":1.0},"9":{"tf":1.0}}},"r":{"df":0,"docs":{},"k":{"df":0,"docs":{},"e":{"df":0,"docs":{},"r":{"df":1,"docs":{"23":{"tf":1.0}}}}}},"t":{"c":{"df":0,"docs":{},"h":{"df":2,"docs":{"13":{"tf":1.4142135623730951},"6":{"tf":1.4142135623730951}}}},"df":0,"docs":{}}},"df":0,"docs":{},"e":{"df":0,"docs":{},"s":{"df":0,"docs":{},"s":{"a":{"df":0,"docs":{},"g":{"df":2,"docs":{"13":{"tf":1.0},"6":{"tf":1.0}}}},"df":0,"docs":{}}},"t":{"a":{"d":{"a":{"df":0,"docs":{},"t":{"a":{"df":1,"docs":{"22":{"tf":1.0}}},"df":0,"docs":{}}},"df":0,"docs":{}},"df":0,"docs":{}},"df":0,"docs":{}}},"o":{"d":{"df":0,"docs":{},"e":{"(":{"b":{"a":{"df":0,"docs":{},"r":{"df":1,"docs":{"22":{"tf":1.0}}}},"df":0,"docs":{}},"df":0,"docs":{}},"df":6,"docs":{"0":{"tf":1.0},"13":{"tf":3.0},"15":{"tf":1.0},"22":{"tf":1.4142135623730951},"5":{"tf":1.0},"6":{"tf":3.0}},"l":{"df":2,"docs":{"15":{"tf":1.4142135623730951},"16":{"tf":1.4142135623730951}}}}},"df":0,"docs":{},"u":{"df":0,"docs":{},"s":{"df":2,"docs":{"1":{"tf":1.0},"10":{"tf":2.8284271247461903}},"e":{".":{"df":0,"docs":{},"s":{"df":0,"docs":{},"e":{"df":0,"docs":{},"t":{"_":{"c":{"df":0,"docs":{},"l":{"df":0,"docs":{},"i":{"c":{"df":0,"docs":{},"k":{"_":{"df":0,"docs":{},"f":{"df":0,"docs":{},"o":{"c":{"df":0,"docs":{},"u":{"df":0,"docs":{},"s":{"(":{"df":0,"docs":{},"t":{"df":0,"docs":{},"r":{"df":0,"docs":{},"u":{"df":1,"docs":{"4":{"tf":1.0}}}}}},"df":0,"docs":{}}}},"df":0,"docs":{}}}},"df":0,"docs":{}}},"df":0,"docs":{}}}},"df":0,"docs":{}},"df":0,"docs":{}}}}},"a":{"df":0,"docs":{},"p":{"df":0,"docs":{},"i":{"df":1,"docs":{"10":{"tf":2.0}}}}},"df":0,"docs":{}}}},"v":{"df":0,"docs":{},"e":{"_":{"b":{"df":0,"docs":{},"u":{"df":0,"docs":{},"f":{"df":0,"docs":{},"f":{"df":0,"docs":{},"e":{"df":0,"docs":{},"r":{"_":{"df":0,"docs":{},"t":{"df":0,"docs":{},"o":{"_":{"df":0,"docs":{},"f":{"df":0,"docs":{},"l":{"df":0,"docs":{},"o":{"a":{"df":0,"docs":{},"t":{"df":0,"docs":{},"i":{"df":0,"docs":{},"n":{"df":0,"docs":{},"g":{"(":{"_":{"df":2,"docs":{"13":{"tf":1.0},"6":{"tf":1.0}}},"df":0,"docs":{}},"df":0,"docs":{}}}}}},"df":2,"docs":{"13":{"tf":1.0},"6":{"tf":1.0}}}}},"n":{"df":0,"docs":{},"o":{"d":{"df":2,"docs":{"13":{"tf":1.0},"6":{"tf":1.0}},"e":{"(":{"_":{"df":2,"docs":{"13":{"tf":1.0},"6":{"tf":1.0}}},"df":0,"docs":{}},"df":0,"docs":{}}},"df":0,"docs":{}}}},"df":0,"docs":{}}}},"df":0,"docs":{}}}}}}},"df":0,"docs":{}},"df":2,"docs":{"13":{"tf":2.449489742783178},"6":{"tf":2.449489742783178}}}}},"u":{"df":0,"docs":{},"l":{"df":0,"docs":{},"t":{"df":0,"docs":{},"i":{"df":0,"docs":{},"p":{"df":0,"docs":{},"l":{"df":3,"docs":{"13":{"tf":1.0},"5":{"tf":1.0},"6":{"tf":1.0}}}}}}},"x":{"a":{"df":0,"docs":{},"p":{"df":0,"docs":{},"i":{"df":1,"docs":{"16":{"tf":3.1622776601683795}}}}},"df":2,"docs":{"1":{"tf":1.0},"16":{"tf":3.605551275463989}}}}},"n":{"a":{"df":0,"docs":{},"m":{"df":0,"docs":{},"e":{"(":{"df":0,"docs":{},"e":{"df":0,"docs":{},"v":{"df":1,"docs":{"17":{"tf":1.0}}}},"s":{"df":0,"docs":{},"e":{"df":0,"docs":{},"s":{"df":0,"docs":{},"s":{"df":1,"docs":{"18":{"tf":1.0}}}}}}},"df":13,"docs":{"0":{"tf":1.4142135623730951},"11":{"tf":1.0},"13":{"tf":2.23606797749979},"15":{"tf":1.0},"17":{"tf":1.4142135623730951},"18":{"tf":1.4142135623730951},"19":{"tf":1.4142135623730951},"22":{"tf":1.0},"24":{"tf":1.4142135623730951},"26":{"tf":1.4142135623730951},"5":{"tf":1.7320508075688772},"6":{"tf":2.23606797749979},"8":{"tf":1.4142135623730951}},"s":{"df":0,"docs":{},"p":{"a":{"c":{"df":22,"docs":{"10":{"tf":1.0},"11":{"tf":1.0},"12":{"tf":1.0},"13":{"tf":1.0},"14":{"tf":1.0},"15":{"tf":1.0},"16":{"tf":1.0},"17":{"tf":1.0},"18":{"tf":1.0},"19":{"tf":1.0},"20":{"tf":1.0},"21":{"tf":1.0},"22":{"tf":1.0},"23":{"tf":1.0},"24":{"tf":1.0},"25":{"tf":1.0},"26":{"tf":1.0},"5":{"tf":1.0},"6":{"tf":1.0},"7":{"tf":1.0},"8":{"tf":1.0},"9":{"tf":1.0}}},"df":0,"docs":{}},"df":0,"docs":{}}}}}},"df":0,"docs":{},"e":{"df":0,"docs":{},"w":{"df":4,"docs":{"13":{"tf":2.0},"14":{"tf":1.0},"6":{"tf":2.0},"7":{"tf":1.0}}},"x":{"df":0,"docs":{},"t":{"_":{"c":{"df":0,"docs":{},"u":{"df":0,"docs":{},"r":{"df":0,"docs":{},"r":{"df":0,"docs":{},"e":{"df":0,"docs":{},"n":{"df":0,"docs":{},"t":{"_":{"df":0,"docs":{},"t":{"a":{"b":{"df":2,"docs":{"13":{"tf":1.0},"6":{"tf":1.0}},"s":{"(":{"_":{"df":2,"docs":{"13":{"tf":1.0},"6":{"tf":1.0}}},"df":0,"docs":{}},"df":0,"docs":{}}},"df":0,"docs":{}},"df":0,"docs":{}}},"df":0,"docs":{}}}}}}}},"df":0,"docs":{},"t":{"a":{"b":{"(":{"_":{"df":2,"docs":{"13":{"tf":1.0},"6":{"tf":1.0}}},"df":0,"docs":{}},"df":2,"docs":{"13":{"tf":1.0},"6":{"tf":1.0}}},"df":0,"docs":{}},"df":0,"docs":{}}},"df":2,"docs":{"13":{"tf":1.7320508075688772},"6":{"tf":1.7320508075688772}}}}},"o":{"d":{"df":0,"docs":{},"e":{"_":{"df":0,"docs":{},"i":{"d":{"(":{"b":{"a":{"df":0,"docs":{},"r":{"df":1,"docs":{"22":{"tf":1.0}}}},"df":0,"docs":{},"u":{"df":0,"docs":{},"f":{"df":0,"docs":{},"f":{"df":1,"docs":{"19":{"tf":1.0}}}}}},"df":0,"docs":{},"e":{"df":0,"docs":{},"v":{"df":1,"docs":{"17":{"tf":1.0}}}}},"df":7,"docs":{"13":{"tf":1.7320508075688772},"15":{"tf":1.0},"16":{"tf":1.0},"17":{"tf":1.0},"19":{"tf":1.0},"22":{"tf":1.0},"6":{"tf":1.7320508075688772}}},"df":0,"docs":{}}},"df":13,"docs":{"1":{"tf":1.0},"13":{"tf":4.242640687119285},"14":{"tf":1.4142135623730951},"15":{"tf":1.4142135623730951},"16":{"tf":1.4142135623730951},"17":{"tf":1.0},"18":{"tf":1.0},"19":{"tf":1.4142135623730951},"20":{"tf":3.0},"21":{"tf":1.0},"22":{"tf":1.0},"6":{"tf":4.242640687119285},"7":{"tf":1.4142135623730951}},"r":{"df":0,"docs":{},"e":{"df":0,"docs":{},"f":{"df":3,"docs":{"15":{"tf":1.4142135623730951},"16":{"tf":1.4142135623730951},"20":{"tf":5.744562646538029}}}}}}},"df":0,"docs":{},"n":{"df":0,"docs":{},"e":{"df":2,"docs":{"13":{"tf":1.0},"6":{"tf":1.0}}}},"o":{"df":0,"docs":{},"p":{"(":{"_":{"df":2,"docs":{"13":{"tf":1.0},"6":{"tf":1.0}}},"df":0,"docs":{}},"df":2,"docs":{"13":{"tf":1.0},"6":{"tf":1.0}}}},"t":{"a":{"df":0,"docs":{},"t":{"df":3,"docs":{"13":{"tf":2.0},"5":{"tf":2.449489742783178},"6":{"tf":2.0}}}},"df":0,"docs":{},"i":{"df":0,"docs":{},"f":{"df":2,"docs":{"13":{"tf":1.0},"6":{"tf":1.0}},"i":{"df":2,"docs":{"13":{"tf":1.0},"6":{"tf":1.0}}},"y":{"(":{"_":{"df":2,"docs":{"13":{"tf":1.0},"6":{"tf":1.0}}},"df":0,"docs":{}},"df":0,"docs":{}}}}},"w":{"(":{"_":{"df":2,"docs":{"24":{"tf":1.0},"8":{"tf":1.0}}},"df":0,"docs":{}},"df":2,"docs":{"24":{"tf":1.0},"8":{"tf":1.0}}}},"u":{"df":0,"docs":{},"m":{"df":0,"docs":{},"e":{"df":0,"docs":{},"r":{"df":4,"docs":{"15":{"tf":1.7320508075688772},"16":{"tf":1.7320508075688772},"18":{"tf":1.0},"19":{"tf":1.0}}}}}}},"o":{"df":0,"docs":{},"f":{"df":0,"docs":{},"f":{"df":0,"docs":{},"s":{"df":0,"docs":{},"e":{"df":0,"docs":{},"t":{"df":2,"docs":{"13":{"tf":1.4142135623730951},"6":{"tf":1.4142135623730951}}}}}}},"n":{"(":{"df":0,"docs":{},"e":{"df":0,"docs":{},"v":{"df":0,"docs":{},"e":{"df":0,"docs":{},"n":{"df":0,"docs":{},"t":{"_":{"df":0,"docs":{},"n":{"a":{"df":0,"docs":{},"m":{"df":1,"docs":{"5":{"tf":1.0}}}},"df":0,"docs":{}}},"df":0,"docs":{}}}}}}},"_":{"df":0,"docs":{},"e":{"df":0,"docs":{},"n":{"df":0,"docs":{},"t":{"df":1,"docs":{"5":{"tf":1.0}}}}},"l":{"df":0,"docs":{},"e":{"a":{"df":0,"docs":{},"v":{"df":1,"docs":{"5":{"tf":1.0}}}},"df":0,"docs":{}}}},"df":2,"docs":{"13":{"tf":2.23606797749979},"6":{"tf":2.23606797749979}}},"p":{"df":2,"docs":{"13":{"tf":1.0},"6":{"tf":1.0}},"e":{"df":0,"docs":{},"n":{"_":{"df":0,"docs":{},"f":{"df":0,"docs":{},"l":{"df":0,"docs":{},"o":{"a":{"df":0,"docs":{},"t":{"df":0,"docs":{},"i":{"df":0,"docs":{},"n":{"df":0,"docs":{},"g":{"(":{"_":{"df":2,"docs":{"13":{"tf":1.0},"6":{"tf":1.0}}},"df":0,"docs":{}},"df":0,"docs":{}}}}}},"df":2,"docs":{"13":{"tf":1.0},"6":{"tf":1.0}}}}}},"df":2,"docs":{"13":{"tf":1.0},"6":{"tf":1.0}}}},"t":{"df":0,"docs":{},"i":{"df":0,"docs":{},"o":{"df":0,"docs":{},"n":{"<":{"df":0,"docs":{},"s":{"df":0,"docs":{},"t":{"df":0,"docs":{},"r":{"df":2,"docs":{"13":{"tf":1.0},"6":{"tf":1.0}}}}}},"df":7,"docs":{"13":{"tf":1.7320508075688772},"14":{"tf":1.4142135623730951},"25":{"tf":1.0},"5":{"tf":1.7320508075688772},"6":{"tf":1.7320508075688772},"7":{"tf":1.4142135623730951},"9":{"tf":1.0}}}}}}},"r":{"df":0,"docs":{},"i":{"df":0,"docs":{},"g":{"df":0,"docs":{},"i":{"df":0,"docs":{},"n":{"df":1,"docs":{"19":{"tf":1.0}}}}}}},"u":{"df":0,"docs":{},"t":{"df":0,"docs":{},"p":{"df":0,"docs":{},"u":{"df":0,"docs":{},"t":{"df":2,"docs":{"13":{"tf":1.0},"6":{"tf":1.0}}}}}}},"v":{"df":0,"docs":{},"e":{"df":0,"docs":{},"r":{"df":0,"docs":{},"l":{"df":0,"docs":{},"o":{"a":{"d":{"df":1,"docs":{"5":{"tf":1.4142135623730951}}},"df":0,"docs":{}},"df":0,"docs":{}}},"v":{"df":0,"docs":{},"i":{"df":0,"docs":{},"e":{"df":0,"docs":{},"w":{"df":4,"docs":{"0":{"tf":1.0},"1":{"tf":1.0},"2":{"tf":1.0},"3":{"tf":1.0}}}}}}}}},"w":{"df":0,"docs":{},"n":{"df":2,"docs":{"20":{"tf":1.0},"21":{"tf":1.0}}}}},"p":{"a":{"df":0,"docs":{},"g":{"df":0,"docs":{},"e":{"df":3,"docs":{"1":{"tf":1.4142135623730951},"13":{"tf":1.4142135623730951},"6":{"tf":1.4142135623730951}}}},"l":{"df":0,"docs":{},"e":{"df":0,"docs":{},"t":{"df":0,"docs":{},"t":{"df":2,"docs":{"11":{"tf":1.4142135623730951},"26":{"tf":1.0}}}}}},"r":{"df":0,"docs":{},"e":{"df":0,"docs":{},"n":{"df":0,"docs":{},"t":{"(":{"df":0,"docs":{},"n":{"df":0,"docs":{},"o":{"d":{"df":1,"docs":{"20":{"tf":1.0}}},"df":0,"docs":{}}}},"df":1,"docs":{"20":{"tf":1.4142135623730951}}}}},"t":{"df":0,"docs":{},"i":{"a":{"df":0,"docs":{},"l":{"df":2,"docs":{"13":{"tf":1.0},"6":{"tf":1.0}}}},"df":0,"docs":{}}}},"t":{"df":0,"docs":{},"h":{"df":3,"docs":{"19":{"tf":1.0},"24":{"tf":1.0},"8":{"tf":1.0}}}},"y":{"df":0,"docs":{},"l":{"df":0,"docs":{},"o":{"a":{"d":{"df":1,"docs":{"15":{"tf":1.0}}},"df":0,"docs":{}},"df":0,"docs":{}}}}},"df":0,"docs":{},"e":{"df":0,"docs":{},"r":{"c":{"df":0,"docs":{},"e":{"df":0,"docs":{},"n":{"df":0,"docs":{},"t":{"a":{"df":0,"docs":{},"g":{"df":2,"docs":{"13":{"tf":1.4142135623730951},"6":{"tf":1.4142135623730951}}}},"df":0,"docs":{}}}}},"df":0,"docs":{}}},"h":{"a":{"df":0,"docs":{},"s":{"df":0,"docs":{},"e":{"df":2,"docs":{"0":{"tf":1.0},"4":{"tf":1.0}}}}},"df":0,"docs":{}},"i":{"d":{"(":{"b":{"df":0,"docs":{},"u":{"df":0,"docs":{},"f":{"df":0,"docs":{},"f":{"df":1,"docs":{"19":{"tf":1.0}}}}}},"df":0,"docs":{}},"df":1,"docs":{"19":{"tf":1.0}}},"df":0,"docs":{},"x":{"df":0,"docs":{},"e":{"df":0,"docs":{},"l":{"df":2,"docs":{"13":{"tf":1.4142135623730951},"6":{"tf":1.4142135623730951}}}}}},"l":{"a":{"df":0,"docs":{},"i":{"df":0,"docs":{},"n":{"df":2,"docs":{"25":{"tf":1.0},"9":{"tf":1.0}}}}},"df":0,"docs":{}},"o":{"df":0,"docs":{},"i":{"df":0,"docs":{},"n":{"df":0,"docs":{},"t":{"df":2,"docs":{"13":{"tf":1.0},"6":{"tf":1.0}},"e":{"df":0,"docs":{},"r":{"df":1,"docs":{"5":{"tf":1.0}}}}}}},"s":{"df":0,"docs":{},"i":{"df":0,"docs":{},"t":{"df":2,"docs":{"13":{"tf":1.0},"6":{"tf":1.0}}}}}},"r":{"df":0,"docs":{},"e":{"df":0,"docs":{},"s":{"df":0,"docs":{},"e":{"df":0,"docs":{},"n":{"df":0,"docs":{},"t":{"df":2,"docs":{"19":{"tf":1.0},"20":{"tf":1.0}}}}}},"v":{"_":{"c":{"df":0,"docs":{},"u":{"df":0,"docs":{},"r":{"df":0,"docs":{},"r":{"df":0,"docs":{},"e":{"df":0,"docs":{},"n":{"df":0,"docs":{},"t":{"_":{"df":0,"docs":{},"t":{"a":{"b":{"df":2,"docs":{"13":{"tf":1.0},"6":{"tf":1.0}},"s":{"(":{"_":{"df":2,"docs":{"13":{"tf":1.0},"6":{"tf":1.0}}},"df":0,"docs":{}},"df":0,"docs":{}}},"df":0,"docs":{}},"df":0,"docs":{}}},"df":0,"docs":{}}}}}}}},"df":0,"docs":{},"t":{"a":{"b":{"(":{"_":{"df":2,"docs":{"13":{"tf":1.0},"6":{"tf":1.0}}},"df":0,"docs":{}},"df":2,"docs":{"13":{"tf":1.0},"6":{"tf":1.0}}},"df":0,"docs":{}},"df":0,"docs":{}}},"df":0,"docs":{},"i":{"df":0,"docs":{},"o":{"df":0,"docs":{},"u":{"df":2,"docs":{"13":{"tf":1.7320508075688772},"6":{"tf":1.7320508075688772}},"s":{"df":1,"docs":{"5":{"tf":1.0}}}}}}}},"i":{"df":0,"docs":{},"n":{"df":0,"docs":{},"t":{"(":{"b":{"df":0,"docs":{},"u":{"df":0,"docs":{},"f":{"df":0,"docs":{},"f":{"df":0,"docs":{},"e":{"df":0,"docs":{},"r":{".":{"df":0,"docs":{},"t":{"df":0,"docs":{},"i":{"df":0,"docs":{},"t":{"df":0,"docs":{},"l":{"df":1,"docs":{"15":{"tf":1.0}}}}}}},"df":0,"docs":{}}}}}}},"df":0,"docs":{}},"df":0,"docs":{}}}},"o":{"c":{"df":0,"docs":{},"e":{"df":0,"docs":{},"s":{"df":0,"docs":{},"s":{"_":{"df":0,"docs":{},"n":{"a":{"df":0,"docs":{},"m":{"df":1,"docs":{"19":{"tf":1.0}},"e":{"(":{"b":{"df":0,"docs":{},"u":{"df":0,"docs":{},"f":{"df":0,"docs":{},"f":{"df":1,"docs":{"19":{"tf":1.0}}}}}},"df":0,"docs":{}},"df":0,"docs":{}}}},"df":0,"docs":{}}},"df":1,"docs":{"19":{"tf":2.0}}}}}},"d":{"df":0,"docs":{},"u":{"c":{"df":2,"docs":{"25":{"tf":1.0},"9":{"tf":1.0}}},"df":0,"docs":{}}},"df":0,"docs":{},"v":{"df":0,"docs":{},"i":{"d":{"df":2,"docs":{"13":{"tf":1.4142135623730951},"6":{"tf":1.4142135623730951}}},"df":0,"docs":{}}}}}},"r":{"df":0,"docs":{},"e":{"a":{"d":{"df":3,"docs":{"24":{"tf":1.0},"26":{"tf":1.0},"8":{"tf":1.0}}},"df":0,"docs":{}},"c":{"df":0,"docs":{},"e":{"df":0,"docs":{},"i":{"df":0,"docs":{},"v":{"df":2,"docs":{"25":{"tf":1.0},"9":{"tf":1.0}}}}}},"df":2,"docs":{"13":{"tf":1.0},"6":{"tf":1.0}},"f":{"df":1,"docs":{"1":{"tf":2.0}},"e":{"df":0,"docs":{},"r":{"df":5,"docs":{"0":{"tf":1.0},"14":{"tf":1.7320508075688772},"15":{"tf":1.0},"16":{"tf":1.0},"7":{"tf":1.7320508075688772}}}}},"g":{"df":0,"docs":{},"i":{"df":0,"docs":{},"s":{"df":0,"docs":{},"t":{"df":2,"docs":{"12":{"tf":1.0},"5":{"tf":1.4142135623730951}},"r":{"a":{"df":0,"docs":{},"t":{"df":0,"docs":{},"i":{"df":0,"docs":{},"o":{"df":0,"docs":{},"n":{".":{"df":0,"docs":{},"r":{"df":0,"docs":{},"h":{"a":{"df":0,"docs":{},"i":{"df":1,"docs":{"2":{"tf":1.0}}}},"df":0,"docs":{}}}},"df":0,"docs":{}}}}}},"df":7,"docs":{"0":{"tf":1.0},"1":{"tf":2.23606797749979},"5":{"tf":3.0},"6":{"tf":8.12403840463596},"7":{"tf":3.872983346207417},"8":{"tf":2.449489742783178},"9":{"tf":2.23606797749979}}}}}}},"j":{"df":0,"docs":{},"e":{"c":{"df":0,"docs":{},"t":{"df":2,"docs":{"14":{"tf":1.0},"7":{"tf":1.0}}}},"df":0,"docs":{}}},"m":{"df":0,"docs":{},"o":{"df":0,"docs":{},"v":{"df":1,"docs":{"5":{"tf":1.0}}}}},"p":{"df":0,"docs":{},"l":{"a":{"c":{"df":2,"docs":{"13":{"tf":1.4142135623730951},"6":{"tf":1.4142135623730951}},"e":{"_":{"c":{"df":0,"docs":{},"u":{"df":0,"docs":{},"r":{"df":0,"docs":{},"r":{"df":0,"docs":{},"e":{"df":0,"docs":{},"n":{"df":0,"docs":{},"t":{"_":{"df":0,"docs":{},"w":{"df":0,"docs":{},"i":{"df":0,"docs":{},"t":{"df":0,"docs":{},"h":{"(":{"_":{"df":2,"docs":{"13":{"tf":1.0},"6":{"tf":1.0}}},"df":0,"docs":{}},"df":2,"docs":{"13":{"tf":1.0},"6":{"tf":1.0}}}}}}},"df":0,"docs":{}}}}}}}},"df":0,"docs":{},"n":{"df":0,"docs":{},"o":{"d":{"df":2,"docs":{"13":{"tf":1.0},"6":{"tf":1.0}},"e":{"(":{"_":{"df":2,"docs":{"13":{"tf":1.0},"6":{"tf":1.0}}},"df":0,"docs":{}},"df":0,"docs":{}}},"df":0,"docs":{}}}},"df":0,"docs":{}}},"df":0,"docs":{}},"df":0,"docs":{}},"o":{"df":0,"docs":{},"s":{"df":0,"docs":{},"i":{"df":0,"docs":{},"t":{"df":0,"docs":{},"o":{"df":0,"docs":{},"r":{"df":0,"docs":{},"i":{"df":1,"docs":{"4":{"tf":1.0}}}}}}}}}},"q":{"df":0,"docs":{},"u":{"df":0,"docs":{},"e":{"df":0,"docs":{},"s":{"df":0,"docs":{},"t":{"df":1,"docs":{"19":{"tf":1.0}}}}}}},"s":{"df":0,"docs":{},"o":{"df":0,"docs":{},"l":{"df":0,"docs":{},"v":{"df":2,"docs":{"24":{"tf":1.0},"8":{"tf":1.0}}}}}},"t":{"df":0,"docs":{},"u":{"df":0,"docs":{},"r":{"df":0,"docs":{},"n":{"df":11,"docs":{"15":{"tf":3.4641016151377544},"16":{"tf":3.1622776601683795},"17":{"tf":2.23606797749979},"18":{"tf":2.0},"19":{"tf":4.123105625617661},"20":{"tf":3.872983346207417},"21":{"tf":2.6457513110645907},"22":{"tf":2.449489742783178},"23":{"tf":2.449489742783178},"24":{"tf":1.0},"8":{"tf":1.0}},"t":{"df":0,"docs":{},"y":{"df":0,"docs":{},"p":{"df":9,"docs":{"15":{"tf":2.8284271247461903},"16":{"tf":2.6457513110645907},"17":{"tf":2.0},"19":{"tf":2.8284271247461903},"20":{"tf":2.449489742783178},"21":{"tf":1.0},"24":{"tf":1.4142135623730951},"26":{"tf":1.0},"8":{"tf":1.4142135623730951}}}}}}}}},"v":{"df":0,"docs":{},"e":{"a":{"df":0,"docs":{},"l":{"_":{"b":{"df":0,"docs":{},"u":{"df":0,"docs":{},"f":{"df":0,"docs":{},"f":{"df":2,"docs":{"13":{"tf":1.0},"6":{"tf":1.0}},"e":{"df":0,"docs":{},"r":{"(":{"_":{"df":2,"docs":{"13":{"tf":1.0},"6":{"tf":1.0}}},"df":0,"docs":{}},"df":0,"docs":{}}}}}}},"df":0,"docs":{}},"df":2,"docs":{"13":{"tf":1.0},"6":{"tf":1.0}}}},"df":0,"docs":{}}}},"g":{"b":{"c":{"df":0,"docs":{},"o":{"df":0,"docs":{},"l":{"df":0,"docs":{},"o":{"df":0,"docs":{},"r":{"df":1,"docs":{"26":{"tf":1.0}}}}}}},"df":0,"docs":{}},"df":0,"docs":{}},"h":{"a":{"df":0,"docs":{},"i":{"df":1,"docs":{"0":{"tf":1.0}}}},"df":0,"docs":{}},"i":{"df":0,"docs":{},"g":{"df":0,"docs":{},"h":{"df":0,"docs":{},"t":{"df":4,"docs":{"13":{"tf":1.4142135623730951},"25":{"tf":1.4142135623730951},"6":{"tf":1.4142135623730951},"9":{"tf":1.4142135623730951}}}}}},"o":{"df":0,"docs":{},"o":{"df":0,"docs":{},"t":{"_":{"df":0,"docs":{},"n":{"df":0,"docs":{},"o":{"d":{"df":2,"docs":{"18":{"tf":1.0},"21":{"tf":1.0}},"e":{"(":{"df":0,"docs":{},"f":{"df":0,"docs":{},"l":{"df":0,"docs":{},"o":{"df":1,"docs":{"21":{"tf":1.0}}}}},"s":{"df":0,"docs":{},"e":{"df":0,"docs":{},"s":{"df":0,"docs":{},"s":{"df":1,"docs":{"18":{"tf":1.0}}}}}}},"df":0,"docs":{}}},"df":0,"docs":{}}}},"df":4,"docs":{"18":{"tf":1.0},"20":{"tf":1.4142135623730951},"21":{"tf":1.0},"22":{"tf":1.0}}}}},"u":{"df":0,"docs":{},"n":{"_":{"df":0,"docs":{},"n":{"a":{"df":0,"docs":{},"m":{"df":0,"docs":{},"e":{"d":{"_":{"a":{"c":{"df":0,"docs":{},"t":{"df":2,"docs":{"13":{"tf":1.0},"6":{"tf":1.0}},"i":{"df":0,"docs":{},"o":{"df":0,"docs":{},"n":{"(":{"_":{"df":2,"docs":{"13":{"tf":1.0},"6":{"tf":1.0}}},"df":0,"docs":{}},"df":0,"docs":{}}}}}},"df":0,"docs":{}},"df":0,"docs":{}},"df":0,"docs":{}},"df":0,"docs":{}}}},"df":0,"docs":{}}},"df":4,"docs":{"0":{"tf":1.0},"13":{"tf":1.0},"19":{"tf":1.0},"6":{"tf":1.0}},"t":{"df":0,"docs":{},"i":{"df":0,"docs":{},"m":{"df":3,"docs":{"0":{"tf":1.0},"1":{"tf":1.4142135623730951},"26":{"tf":2.23606797749979}},"e":{".":{"df":0,"docs":{},"r":{"df":0,"docs":{},"h":{"a":{"df":0,"docs":{},"i":{"df":1,"docs":{"2":{"tf":1.0}}}},"df":0,"docs":{}}}},"df":0,"docs":{}}}}}},"s":{"df":0,"docs":{},"t":{"df":1,"docs":{"0":{"tf":1.0}}}}}},"s":{"c":{"df":0,"docs":{},"r":{"df":0,"docs":{},"o":{"df":0,"docs":{},"l":{"df":0,"docs":{},"l":{"_":{"df":0,"docs":{},"l":{"df":0,"docs":{},"i":{"df":0,"docs":{},"n":{"df":0,"docs":{},"e":{"_":{"d":{"df":0,"docs":{},"o":{"df":0,"docs":{},"w":{"df":0,"docs":{},"n":{"(":{"_":{"df":2,"docs":{"13":{"tf":1.0},"6":{"tf":1.0}}},"df":0,"docs":{}},"df":2,"docs":{"13":{"tf":1.0},"6":{"tf":1.0}}}}}},"df":0,"docs":{},"u":{"df":0,"docs":{},"p":{"(":{"_":{"df":2,"docs":{"13":{"tf":1.0},"6":{"tf":1.0}}},"df":0,"docs":{}},"df":2,"docs":{"13":{"tf":1.0},"6":{"tf":1.0}}}}},"df":0,"docs":{}}}}},"p":{"a":{"df":0,"docs":{},"g":{"df":0,"docs":{},"e":{"_":{"d":{"df":0,"docs":{},"o":{"df":0,"docs":{},"w":{"df":0,"docs":{},"n":{"(":{"_":{"df":2,"docs":{"13":{"tf":1.0},"6":{"tf":1.0}}},"df":0,"docs":{}},"df":2,"docs":{"13":{"tf":1.0},"6":{"tf":1.0}}}}}},"df":0,"docs":{},"u":{"df":0,"docs":{},"p":{"(":{"_":{"df":2,"docs":{"13":{"tf":1.0},"6":{"tf":1.0}}},"df":0,"docs":{}},"df":2,"docs":{"13":{"tf":1.0},"6":{"tf":1.0}}}}},"df":0,"docs":{}}}},"df":0,"docs":{}},"t":{"df":0,"docs":{},"o":{"_":{"b":{"df":0,"docs":{},"o":{"df":0,"docs":{},"t":{"df":0,"docs":{},"t":{"df":0,"docs":{},"o":{"df":0,"docs":{},"m":{"(":{"_":{"df":2,"docs":{"13":{"tf":1.0},"6":{"tf":1.0}}},"df":0,"docs":{}},"df":2,"docs":{"13":{"tf":1.0},"6":{"tf":1.0}}}}}}}},"df":0,"docs":{},"t":{"df":0,"docs":{},"o":{"df":0,"docs":{},"p":{"(":{"_":{"df":2,"docs":{"13":{"tf":1.0},"6":{"tf":1.0}}},"df":0,"docs":{}},"df":2,"docs":{"13":{"tf":1.0},"6":{"tf":1.0}}}}}},"df":0,"docs":{}}}},"b":{"a":{"c":{"df":0,"docs":{},"k":{"df":2,"docs":{"13":{"tf":2.449489742783178},"6":{"tf":2.449489742783178}}}},"df":0,"docs":{}},"df":0,"docs":{}},"df":3,"docs":{"10":{"tf":1.0},"13":{"tf":2.449489742783178},"6":{"tf":2.449489742783178}}}}}}},"df":0,"docs":{},"e":{"a":{"df":0,"docs":{},"r":{"c":{"df":0,"docs":{},"h":{"_":{"df":0,"docs":{},"n":{"df":0,"docs":{},"e":{"df":0,"docs":{},"x":{"df":0,"docs":{},"t":{"(":{"_":{"df":2,"docs":{"13":{"tf":1.0},"6":{"tf":1.0}}},"df":0,"docs":{}},"df":2,"docs":{"13":{"tf":1.0},"6":{"tf":1.0}}}}}},"p":{"df":0,"docs":{},"r":{"df":0,"docs":{},"e":{"df":0,"docs":{},"v":{"(":{"_":{"df":2,"docs":{"13":{"tf":1.0},"6":{"tf":1.0}}},"df":0,"docs":{}},"df":2,"docs":{"13":{"tf":1.0},"6":{"tf":1.0}}}}}}},"df":2,"docs":{"13":{"tf":2.0},"6":{"tf":2.0}}}},"df":0,"docs":{}}},"c":{"df":0,"docs":{},"o":{"df":0,"docs":{},"n":{"d":{"df":2,"docs":{"24":{"tf":1.0},"8":{"tf":1.0}}},"df":0,"docs":{}}}},"df":0,"docs":{},"g":{"df":0,"docs":{},"m":{"df":0,"docs":{},"e":{"df":0,"docs":{},"n":{"df":0,"docs":{},"t":{"(":{"_":{"df":2,"docs":{"25":{"tf":1.7320508075688772},"9":{"tf":1.7320508075688772}}},"df":0,"docs":{}},"df":2,"docs":{"25":{"tf":1.4142135623730951},"9":{"tf":1.4142135623730951}}}}}}},"l":{"df":0,"docs":{},"e":{"c":{"df":0,"docs":{},"t":{"_":{"c":{"df":0,"docs":{},"u":{"df":0,"docs":{},"r":{"df":0,"docs":{},"r":{"df":0,"docs":{},"e":{"df":0,"docs":{},"n":{"df":0,"docs":{},"t":{"_":{"df":0,"docs":{},"t":{"a":{"b":{"df":2,"docs":{"13":{"tf":1.0},"6":{"tf":1.0}},"s":{"(":{"_":{"df":2,"docs":{"13":{"tf":1.0},"6":{"tf":1.0}}},"df":0,"docs":{}},"df":0,"docs":{}}},"df":0,"docs":{}},"df":0,"docs":{}}},"df":0,"docs":{}}}}}}}},"df":0,"docs":{},"m":{"df":0,"docs":{},"o":{"df":0,"docs":{},"v":{"df":0,"docs":{},"e":{"_":{"d":{"df":0,"docs":{},"o":{"df":0,"docs":{},"w":{"df":0,"docs":{},"n":{"(":{"_":{"df":2,"docs":{"13":{"tf":1.0},"6":{"tf":1.0}}},"df":0,"docs":{}},"df":2,"docs":{"13":{"tf":1.0},"6":{"tf":1.0}}}}}},"df":0,"docs":{},"l":{"df":0,"docs":{},"e":{"df":0,"docs":{},"f":{"df":0,"docs":{},"t":{"(":{"_":{"df":2,"docs":{"13":{"tf":1.0},"6":{"tf":1.0}}},"df":0,"docs":{}},"df":2,"docs":{"13":{"tf":1.0},"6":{"tf":1.0}}}}}},"r":{"df":0,"docs":{},"i":{"df":0,"docs":{},"g":{"df":0,"docs":{},"h":{"df":0,"docs":{},"t":{"(":{"_":{"df":2,"docs":{"13":{"tf":1.0},"6":{"tf":1.0}}},"df":0,"docs":{}},"df":2,"docs":{"13":{"tf":1.0},"6":{"tf":1.0}}}}}}},"u":{"df":0,"docs":{},"p":{"(":{"_":{"df":2,"docs":{"13":{"tf":1.0},"6":{"tf":1.0}}},"df":0,"docs":{}},"df":2,"docs":{"13":{"tf":1.0},"6":{"tf":1.0}}}}},"df":0,"docs":{}}}}},"t":{"a":{"b":{"(":{"_":{"df":2,"docs":{"13":{"tf":1.0},"6":{"tf":1.0}}},"df":0,"docs":{}},"df":2,"docs":{"13":{"tf":1.0},"6":{"tf":1.0}}},"df":0,"docs":{}},"df":0,"docs":{}}},"df":2,"docs":{"13":{"tf":4.0},"6":{"tf":4.0}}}},"df":0,"docs":{}}},"n":{"d":{"_":{"b":{"df":0,"docs":{},"y":{"df":0,"docs":{},"t":{"df":2,"docs":{"13":{"tf":1.0},"6":{"tf":1.0}},"e":{"df":0,"docs":{},"s":{"(":{"_":{"df":2,"docs":{"13":{"tf":1.4142135623730951},"6":{"tf":1.4142135623730951}}},"df":0,"docs":{}},"_":{"c":{"df":0,"docs":{},"u":{"df":0,"docs":{},"r":{"df":0,"docs":{},"r":{"df":2,"docs":{"13":{"tf":1.0},"6":{"tf":1.0}},"e":{"df":0,"docs":{},"n":{"df":0,"docs":{},"t":{"(":{"_":{"df":2,"docs":{"13":{"tf":1.4142135623730951},"6":{"tf":1.4142135623730951}}},"df":0,"docs":{}},"df":0,"docs":{}}}}}}}},"df":0,"docs":{}},"df":0,"docs":{}}}}}},"df":0,"docs":{},"k":{"df":0,"docs":{},"e":{"df":0,"docs":{},"y":{"df":2,"docs":{"13":{"tf":1.0},"6":{"tf":1.0}},"s":{"(":{"_":{"df":2,"docs":{"13":{"tf":1.0},"6":{"tf":1.0}}},"df":0,"docs":{}},"_":{"c":{"df":0,"docs":{},"u":{"df":0,"docs":{},"r":{"df":0,"docs":{},"r":{"df":2,"docs":{"13":{"tf":1.0},"6":{"tf":1.0}},"e":{"df":0,"docs":{},"n":{"df":0,"docs":{},"t":{"(":{"_":{"df":2,"docs":{"13":{"tf":1.0},"6":{"tf":1.0}}},"df":0,"docs":{}},"df":0,"docs":{}}}}}}}},"df":0,"docs":{}},"df":0,"docs":{}}}}}},"df":2,"docs":{"13":{"tf":2.0},"6":{"tf":2.0}}},"df":0,"docs":{}},"q":{"df":0,"docs":{},"u":{"df":0,"docs":{},"e":{"df":0,"docs":{},"n":{"c":{"df":3,"docs":{"13":{"tf":1.7320508075688772},"5":{"tf":1.7320508075688772},"6":{"tf":1.7320508075688772}}},"df":0,"docs":{}}}}},"s":{"df":0,"docs":{},"s":{"df":0,"docs":{},"i":{"df":0,"docs":{},"o":{"df":0,"docs":{},"n":{"_":{"df":0,"docs":{},"i":{"d":{"(":{"b":{"df":0,"docs":{},"u":{"df":0,"docs":{},"f":{"df":0,"docs":{},"f":{"df":1,"docs":{"19":{"tf":1.0}}}}}},"df":0,"docs":{},"e":{"df":0,"docs":{},"v":{"df":1,"docs":{"17":{"tf":1.0}}}},"f":{"df":0,"docs":{},"l":{"df":0,"docs":{},"o":{"df":1,"docs":{"21":{"tf":1.0}}}}},"n":{"df":0,"docs":{},"o":{"d":{"df":1,"docs":{"20":{"tf":1.0}}},"df":0,"docs":{}}}},"df":4,"docs":{"17":{"tf":1.0},"19":{"tf":1.0},"20":{"tf":1.0},"21":{"tf":1.0}}},"df":0,"docs":{}}},"df":8,"docs":{"1":{"tf":1.0},"15":{"tf":1.7320508075688772},"16":{"tf":1.7320508075688772},"17":{"tf":1.0},"18":{"tf":2.0},"19":{"tf":1.0},"20":{"tf":1.4142135623730951},"21":{"tf":1.0}},"r":{"df":0,"docs":{},"e":{"df":0,"docs":{},"f":{"df":3,"docs":{"15":{"tf":1.0},"16":{"tf":1.0},"18":{"tf":3.3166247903554}}}}},"s":{"(":{"c":{"df":0,"docs":{},"o":{"df":0,"docs":{},"n":{"df":0,"docs":{},"t":{"df":0,"docs":{},"e":{"df":0,"docs":{},"x":{"df":0,"docs":{},"t":{"df":1,"docs":{"15":{"tf":1.0}}}}}}}}},"df":0,"docs":{},"m":{"df":0,"docs":{},"u":{"df":0,"docs":{},"x":{"df":1,"docs":{"16":{"tf":1.0}}}}}},"df":0,"docs":{}}}}}}},"t":{"_":{"c":{"df":0,"docs":{},"l":{"df":0,"docs":{},"i":{"c":{"df":0,"docs":{},"k":{"_":{"df":0,"docs":{},"f":{"df":0,"docs":{},"o":{"c":{"df":0,"docs":{},"u":{"df":1,"docs":{"10":{"tf":1.0}},"s":{"(":{"df":0,"docs":{},"m":{"df":0,"docs":{},"o":{"df":0,"docs":{},"u":{"df":0,"docs":{},"s":{"df":1,"docs":{"10":{"tf":1.0}}}}}}},"df":0,"docs":{}}}},"df":0,"docs":{},"r":{"df":0,"docs":{},"w":{"a":{"df":0,"docs":{},"r":{"d":{"(":{"df":0,"docs":{},"m":{"df":0,"docs":{},"o":{"df":0,"docs":{},"u":{"df":0,"docs":{},"s":{"df":1,"docs":{"10":{"tf":1.0}}}}}}},"df":1,"docs":{"10":{"tf":1.0}}},"df":0,"docs":{}}},"df":0,"docs":{}}}}}},"df":0,"docs":{}}},"df":0,"docs":{}}}},"df":0,"docs":{},"f":{"df":0,"docs":{},"o":{"df":0,"docs":{},"r":{"df":0,"docs":{},"m":{"a":{"df":0,"docs":{},"t":{"df":0,"docs":{},"t":{"df":1,"docs":{"12":{"tf":1.0}},"e":{"df":0,"docs":{},"r":{"(":{"df":0,"docs":{},"t":{"a":{"b":{"b":{"a":{"df":0,"docs":{},"r":{"df":1,"docs":{"12":{"tf":1.0}}}},"df":0,"docs":{}},"df":0,"docs":{}},"df":0,"docs":{}},"df":0,"docs":{}}},"df":0,"docs":{}}}}}},"df":0,"docs":{}}}}},"l":{"df":0,"docs":{},"e":{"a":{"d":{"df":1,"docs":{"5":{"tf":1.0}},"e":{"df":0,"docs":{},"r":{"(":{"\\"":{"<":{"c":{"df":2,"docs":{"4":{"tf":1.0},"5":{"tf":1.0}}},"df":0,"docs":{}},"df":0,"docs":{}},"df":0,"docs":{},"n":{"df":0,"docs":{},"o":{"df":0,"docs":{},"t":{"df":1,"docs":{"5":{"tf":1.0}}}}}},"df":0,"docs":{}}}},"df":0,"docs":{}},"df":0,"docs":{}}},"p":{"a":{"df":0,"docs":{},"l":{"df":0,"docs":{},"e":{"df":0,"docs":{},"t":{"df":0,"docs":{},"t":{"df":1,"docs":{"11":{"tf":1.0}},"e":{"(":{"df":0,"docs":{},"t":{"df":0,"docs":{},"h":{"df":0,"docs":{},"e":{"df":0,"docs":{},"m":{"df":1,"docs":{"11":{"tf":1.0}}}}}}},"df":0,"docs":{}}}}}}},"df":0,"docs":{}},"w":{"df":0,"docs":{},"h":{"df":0,"docs":{},"e":{"df":0,"docs":{},"e":{"df":0,"docs":{},"l":{"_":{"df":0,"docs":{},"f":{"df":0,"docs":{},"o":{"df":0,"docs":{},"r":{"df":0,"docs":{},"w":{"a":{"df":0,"docs":{},"r":{"d":{"(":{"df":0,"docs":{},"m":{"df":0,"docs":{},"o":{"df":0,"docs":{},"u":{"df":0,"docs":{},"s":{"df":1,"docs":{"10":{"tf":1.0}}}}}}},"df":1,"docs":{"10":{"tf":1.0}}},"df":0,"docs":{}}},"df":0,"docs":{}}}}},"s":{"c":{"df":0,"docs":{},"r":{"df":0,"docs":{},"o":{"df":0,"docs":{},"l":{"df":1,"docs":{"10":{"tf":1.0}},"l":{"(":{"df":0,"docs":{},"m":{"df":0,"docs":{},"o":{"df":0,"docs":{},"u":{"df":0,"docs":{},"s":{"df":1,"docs":{"10":{"tf":1.0}}}}}}},"df":0,"docs":{}}}}}},"df":0,"docs":{}}},"df":0,"docs":{}}}}}}},"df":4,"docs":{"0":{"tf":1.0},"24":{"tf":1.0},"5":{"tf":1.0},"8":{"tf":1.0}}}},"h":{"df":0,"docs":{},"e":{"df":0,"docs":{},"l":{"df":0,"docs":{},"l":{"_":{"df":0,"docs":{},"t":{"df":0,"docs":{},"r":{"df":0,"docs":{},"e":{"df":0,"docs":{},"e":{"(":{"c":{"df":0,"docs":{},"t":{"df":0,"docs":{},"x":{"df":1,"docs":{"4":{"tf":1.4142135623730951}}}}},"df":0,"docs":{}},"df":0,"docs":{}}}}}},"df":3,"docs":{"14":{"tf":1.0},"4":{"tf":1.0},"7":{"tf":1.0}}}}},"o":{"df":0,"docs":{},"w":{"df":1,"docs":{"4":{"tf":1.0}}}}},"i":{"b":{"df":0,"docs":{},"l":{"df":2,"docs":{"13":{"tf":1.0},"6":{"tf":1.0}}}},"d":{"df":0,"docs":{},"e":{"df":1,"docs":{"10":{"tf":1.0}}}},"df":0,"docs":{},"n":{"df":0,"docs":{},"g":{"df":0,"docs":{},"l":{"df":3,"docs":{"14":{"tf":1.0},"19":{"tf":1.0},"7":{"tf":1.0}}}}},"z":{"df":0,"docs":{},"e":{"df":2,"docs":{"14":{"tf":1.0},"7":{"tf":1.0}}}}},"n":{"a":{"df":0,"docs":{},"p":{"df":0,"docs":{},"s":{"df":0,"docs":{},"h":{"df":0,"docs":{},"o":{"df":0,"docs":{},"t":{"_":{"df":0,"docs":{},"t":{"df":0,"docs":{},"e":{"df":0,"docs":{},"x":{"df":0,"docs":{},"t":{"(":{"b":{"df":0,"docs":{},"u":{"df":0,"docs":{},"f":{"df":0,"docs":{},"f":{"df":1,"docs":{"19":{"tf":1.0}}}}}},"df":0,"docs":{}},"df":1,"docs":{"19":{"tf":1.0}}}}}}},"df":3,"docs":{"15":{"tf":1.4142135623730951},"16":{"tf":1.4142135623730951},"19":{"tf":1.0}}}}}}}},"df":0,"docs":{}},"p":{"a":{"df":0,"docs":{},"w":{"df":0,"docs":{},"n":{"df":2,"docs":{"14":{"tf":1.0},"7":{"tf":1.0}}}}},"df":0,"docs":{},"e":{"c":{"df":0,"docs":{},"i":{"df":0,"docs":{},"f":{"df":6,"docs":{"13":{"tf":3.4641016151377544},"14":{"tf":1.0},"25":{"tf":1.0},"6":{"tf":3.4641016151377544},"7":{"tf":1.0},"9":{"tf":1.0}}}}},"df":0,"docs":{}},"l":{"df":0,"docs":{},"i":{"df":0,"docs":{},"t":{"(":{"_":{"df":2,"docs":{"14":{"tf":1.4142135623730951},"7":{"tf":1.4142135623730951}}},"df":0,"docs":{}},"_":{"b":{"df":0,"docs":{},"e":{"df":0,"docs":{},"l":{"df":0,"docs":{},"o":{"df":0,"docs":{},"w":{"(":{"c":{"df":0,"docs":{},"t":{"df":0,"docs":{},"x":{"df":1,"docs":{"4":{"tf":1.0}}}}},"df":0,"docs":{}},"df":1,"docs":{"4":{"tf":1.0}}}}}}},"d":{"df":0,"docs":{},"i":{"df":0,"docs":{},"r":{"df":0,"docs":{},"e":{"c":{"df":0,"docs":{},"t":{"df":1,"docs":{"20":{"tf":1.0}},"i":{"df":0,"docs":{},"o":{"df":0,"docs":{},"n":{"(":{"df":0,"docs":{},"n":{"df":0,"docs":{},"o":{"d":{"df":1,"docs":{"20":{"tf":1.0}}},"df":0,"docs":{}}}},"df":0,"docs":{}}}}}},"df":0,"docs":{}}}}},"df":0,"docs":{},"h":{"(":{"_":{"df":2,"docs":{"14":{"tf":1.0},"7":{"tf":1.0}}},"df":0,"docs":{}},"df":2,"docs":{"14":{"tf":1.0},"7":{"tf":1.0}}},"v":{"(":{"_":{"df":2,"docs":{"14":{"tf":1.0},"7":{"tf":1.0}}},"df":0,"docs":{}},"df":2,"docs":{"14":{"tf":1.0},"7":{"tf":1.0}}},"w":{"df":0,"docs":{},"e":{"df":0,"docs":{},"i":{"df":0,"docs":{},"g":{"df":0,"docs":{},"h":{"df":0,"docs":{},"t":{"df":1,"docs":{"20":{"tf":1.0}},"s":{"(":{"df":0,"docs":{},"n":{"df":0,"docs":{},"o":{"d":{"df":1,"docs":{"20":{"tf":1.0}}},"df":0,"docs":{}}}},"df":0,"docs":{}}}}}}},"i":{"df":0,"docs":{},"t":{"df":0,"docs":{},"h":{"(":{"_":{"df":2,"docs":{"13":{"tf":1.0},"6":{"tf":1.0}}},"df":0,"docs":{}},"df":2,"docs":{"13":{"tf":1.0},"6":{"tf":1.0}}}}}}},"df":7,"docs":{"13":{"tf":1.0},"14":{"tf":2.0},"20":{"tf":1.7320508075688772},"4":{"tf":1.0},"5":{"tf":1.0},"6":{"tf":1.0},"7":{"tf":2.0}}}}}},"t":{"a":{"df":0,"docs":{},"t":{"df":0,"docs":{},"e":{"df":2,"docs":{"0":{"tf":1.0},"19":{"tf":1.0}}}}},"df":0,"docs":{},"i":{"df":0,"docs":{},"l":{"df":0,"docs":{},"l":{"df":1,"docs":{"19":{"tf":1.0}}}}},"r":{"df":0,"docs":{},"i":{"df":0,"docs":{},"n":{"df":0,"docs":{},"g":{"df":18,"docs":{"13":{"tf":4.0},"14":{"tf":2.6457513110645907},"15":{"tf":1.0},"17":{"tf":1.0},"18":{"tf":1.0},"19":{"tf":3.0},"20":{"tf":1.4142135623730951},"21":{"tf":1.0},"22":{"tf":1.0},"23":{"tf":1.0},"24":{"tf":2.0},"25":{"tf":1.7320508075688772},"26":{"tf":1.0},"5":{"tf":4.0},"6":{"tf":4.0},"7":{"tf":2.6457513110645907},"8":{"tf":2.0},"9":{"tf":1.7320508075688772}}}}}},"y":{"df":0,"docs":{},"l":{"df":0,"docs":{},"e":{"df":2,"docs":{"25":{"tf":1.0},"9":{"tf":1.0}},"s":{"df":0,"docs":{},"p":{"df":0,"docs":{},"e":{"c":{"df":2,"docs":{"25":{"tf":1.0},"9":{"tf":1.0}}},"df":0,"docs":{}}}}}}}},"u":{"c":{"df":0,"docs":{},"h":{"df":2,"docs":{"20":{"tf":1.0},"5":{"tf":1.4142135623730951}}}},"df":0,"docs":{},"p":{"df":0,"docs":{},"p":{"df":0,"docs":{},"o":{"df":0,"docs":{},"r":{"df":0,"docs":{},"t":{"df":3,"docs":{"14":{"tf":1.0},"5":{"tf":1.0},"7":{"tf":1.0}}}}}}}},"y":{"df":0,"docs":{},"s":{"df":0,"docs":{},"t":{"df":0,"docs":{},"e":{"df":0,"docs":{},"m":{"a":{"df":0,"docs":{},"p":{"df":0,"docs":{},"i":{"df":2,"docs":{"24":{"tf":1.7320508075688772},"8":{"tf":1.7320508075688772}}}}},"df":3,"docs":{"1":{"tf":1.4142135623730951},"24":{"tf":2.449489742783178},"8":{"tf":2.449489742783178}}}}}}}},"t":{"a":{"b":{"(":{"_":{"df":2,"docs":{"14":{"tf":1.0},"7":{"tf":1.0}}},"df":0,"docs":{}},"_":{"df":0,"docs":{},"t":{"df":0,"docs":{},"i":{"df":0,"docs":{},"t":{"df":0,"docs":{},"l":{"df":1,"docs":{"20":{"tf":1.0}},"e":{"df":0,"docs":{},"s":{"(":{"df":0,"docs":{},"n":{"df":0,"docs":{},"o":{"d":{"df":1,"docs":{"20":{"tf":1.0}}},"df":0,"docs":{}}}},"df":0,"docs":{}}}}}}}},"b":{"a":{"df":0,"docs":{},"r":{".":{"df":0,"docs":{},"s":{"df":0,"docs":{},"e":{"df":0,"docs":{},"t":{"_":{"df":0,"docs":{},"f":{"df":0,"docs":{},"o":{"df":0,"docs":{},"r":{"df":0,"docs":{},"m":{"a":{"df":0,"docs":{},"t":{"df":0,"docs":{},"t":{"df":0,"docs":{},"e":{"df":0,"docs":{},"r":{"(":{"df":0,"docs":{},"f":{"df":0,"docs":{},"o":{"df":0,"docs":{},"r":{"df":0,"docs":{},"m":{"a":{"df":0,"docs":{},"t":{"_":{"df":0,"docs":{},"t":{"a":{"b":{"df":1,"docs":{"4":{"tf":1.0}}},"df":0,"docs":{}},"df":0,"docs":{}}},"df":0,"docs":{}}},"df":0,"docs":{}}}}}},"df":0,"docs":{}}}}}},"df":0,"docs":{}}}}}},"df":0,"docs":{}}}}},"a":{"df":0,"docs":{},"p":{"df":0,"docs":{},"i":{"df":1,"docs":{"12":{"tf":1.0}}}}},"c":{"df":0,"docs":{},"o":{"df":0,"docs":{},"n":{"df":0,"docs":{},"t":{"df":0,"docs":{},"e":{"df":0,"docs":{},"x":{"df":0,"docs":{},"t":{"df":1,"docs":{"22":{"tf":3.872983346207417}}}}}}}}},"df":2,"docs":{"1":{"tf":1.0},"12":{"tf":2.0}}}},"df":0,"docs":{}},"df":11,"docs":{"0":{"tf":1.0},"1":{"tf":1.4142135623730951},"12":{"tf":1.0},"13":{"tf":4.58257569495584},"14":{"tf":3.0},"18":{"tf":1.0},"20":{"tf":2.0},"22":{"tf":2.449489742783178},"23":{"tf":2.449489742783178},"6":{"tf":4.58257569495584},"7":{"tf":3.0}},"i":{"df":0,"docs":{},"n":{"df":0,"docs":{},"f":{"df":0,"docs":{},"o":{"df":1,"docs":{"23":{"tf":3.872983346207417}}}}}},"s":{"(":{"_":{"df":2,"docs":{"14":{"tf":1.0},"7":{"tf":1.0}}},"b":{"a":{"df":0,"docs":{},"r":{"df":1,"docs":{"22":{"tf":1.0}}}},"df":0,"docs":{}},"df":0,"docs":{}},"_":{"df":0,"docs":{},"n":{"df":0,"docs":{},"o":{"d":{"df":0,"docs":{},"e":{"_":{"df":0,"docs":{},"i":{"d":{"df":2,"docs":{"13":{"tf":2.23606797749979},"6":{"tf":2.23606797749979}}},"df":0,"docs":{}}},"df":0,"docs":{}}},"df":0,"docs":{}}},"w":{"df":0,"docs":{},"i":{"df":0,"docs":{},"t":{"df":0,"docs":{},"h":{"_":{"a":{"c":{"df":0,"docs":{},"t":{"df":2,"docs":{"14":{"tf":1.0},"7":{"tf":1.0}},"i":{"df":0,"docs":{},"v":{"df":0,"docs":{},"e":{"(":{"_":{"df":2,"docs":{"14":{"tf":1.0},"7":{"tf":1.0}}},"df":0,"docs":{}},"df":0,"docs":{}}}}}},"df":0,"docs":{}},"df":0,"docs":{}},"df":0,"docs":{}}}}}},"df":0,"docs":{},"p":{"df":0,"docs":{},"e":{"c":{"df":2,"docs":{"14":{"tf":1.0},"7":{"tf":1.0}}},"df":0,"docs":{}}}}},"df":0,"docs":{},"r":{"df":0,"docs":{},"g":{"df":0,"docs":{},"e":{"df":0,"docs":{},"t":{"df":2,"docs":{"25":{"tf":1.0},"9":{"tf":1.0}}}}}}},"df":0,"docs":{},"e":{"df":0,"docs":{},"x":{"df":0,"docs":{},"t":{"df":3,"docs":{"19":{"tf":1.4142135623730951},"25":{"tf":2.23606797749979},"9":{"tf":2.23606797749979}}}}},"h":{"df":0,"docs":{},"e":{"df":0,"docs":{},"m":{"df":0,"docs":{},"e":{".":{"c":{"df":0,"docs":{},"o":{"df":0,"docs":{},"l":{"df":0,"docs":{},"o":{"df":0,"docs":{},"r":{"(":{"\\"":{"a":{"c":{"df":0,"docs":{},"t":{"df":0,"docs":{},"i":{"df":0,"docs":{},"v":{"df":0,"docs":{},"e":{"_":{"b":{"df":0,"docs":{},"g":{"df":1,"docs":{"4":{"tf":1.0}}}},"df":0,"docs":{},"f":{"df":0,"docs":{},"g":{"df":1,"docs":{"4":{"tf":1.0}}}}},"df":0,"docs":{}}}}}},"df":0,"docs":{}},"df":0,"docs":{}},"df":0,"docs":{}},"df":0,"docs":{}}}}}},"df":0,"docs":{},"s":{"df":0,"docs":{},"e":{"df":0,"docs":{},"t":{"_":{"df":0,"docs":{},"p":{"a":{"df":0,"docs":{},"l":{"df":0,"docs":{},"e":{"df":0,"docs":{},"t":{"df":0,"docs":{},"t":{"df":1,"docs":{"4":{"tf":1.0}}}}}}},"df":0,"docs":{}}},"df":0,"docs":{}}}}},"a":{"df":0,"docs":{},"p":{"df":0,"docs":{},"i":{"df":1,"docs":{"11":{"tf":1.0}}}}},"df":3,"docs":{"1":{"tf":1.4142135623730951},"11":{"tf":2.23606797749979},"26":{"tf":2.0}},"r":{"df":0,"docs":{},"u":{"df":0,"docs":{},"n":{"df":0,"docs":{},"t":{"df":0,"docs":{},"i":{"df":0,"docs":{},"m":{"df":0,"docs":{},"e":{"a":{"df":0,"docs":{},"p":{"df":0,"docs":{},"i":{"df":1,"docs":{"26":{"tf":1.0}}}}},"df":0,"docs":{}}}}}}}}}}}},"i":{"df":0,"docs":{},"m":{"df":0,"docs":{},"e":{"df":1,"docs":{"0":{"tf":1.0}},"s":{"df":0,"docs":{},"t":{"a":{"df":0,"docs":{},"m":{"df":0,"docs":{},"p":{"df":2,"docs":{"24":{"tf":1.0},"8":{"tf":1.0}}}}},"df":0,"docs":{}}}}},"t":{"df":0,"docs":{},"l":{"df":9,"docs":{"13":{"tf":2.449489742783178},"14":{"tf":1.7320508075688772},"19":{"tf":1.4142135623730951},"20":{"tf":1.0},"21":{"tf":1.4142135623730951},"23":{"tf":1.4142135623730951},"4":{"tf":1.0},"6":{"tf":2.449489742783178},"7":{"tf":1.7320508075688772}},"e":{"(":{"b":{"df":0,"docs":{},"u":{"df":0,"docs":{},"f":{"df":0,"docs":{},"f":{"df":1,"docs":{"19":{"tf":1.0}}}}}},"df":0,"docs":{},"f":{"df":0,"docs":{},"l":{"df":0,"docs":{},"o":{"df":1,"docs":{"21":{"tf":1.0}}}}},"t":{"a":{"b":{"df":1,"docs":{"23":{"tf":1.0}}},"df":0,"docs":{}},"df":0,"docs":{}}},"df":0,"docs":{}}}}},"o":{"df":0,"docs":{},"g":{"df":0,"docs":{},"e":{"df":0,"docs":{},"t":{"df":0,"docs":{},"h":{"df":1,"docs":{"4":{"tf":1.0}}}}},"g":{"df":0,"docs":{},"l":{"df":3,"docs":{"10":{"tf":2.0},"13":{"tf":1.0},"6":{"tf":1.0}},"e":{"_":{"df":0,"docs":{},"m":{"df":0,"docs":{},"o":{"d":{"df":2,"docs":{"13":{"tf":1.0},"6":{"tf":1.0}},"e":{"(":{"_":{"df":2,"docs":{"13":{"tf":1.0},"6":{"tf":1.0}}},"df":0,"docs":{}},"df":0,"docs":{}}},"df":0,"docs":{}}}},"df":0,"docs":{}}}}},"p":{"_":{"df":0,"docs":{},"l":{"df":0,"docs":{},"e":{"df":0,"docs":{},"f":{"df":0,"docs":{},"t":{"df":2,"docs":{"13":{"tf":1.0},"6":{"tf":1.0}}}}}}},"df":3,"docs":{"0":{"tf":1.0},"13":{"tf":1.0},"6":{"tf":1.0}}}},"r":{"df":0,"docs":{},"e":{"df":0,"docs":{},"e":{".":{"b":{"df":0,"docs":{},"u":{"df":0,"docs":{},"f":{"df":0,"docs":{},"f":{"df":0,"docs":{},"e":{"df":0,"docs":{},"r":{"_":{"df":0,"docs":{},"s":{"df":0,"docs":{},"p":{"a":{"df":0,"docs":{},"w":{"df":0,"docs":{},"n":{"(":{"[":{"\\"":{"/":{"b":{"df":0,"docs":{},"i":{"df":0,"docs":{},"n":{"/":{"df":0,"docs":{},"z":{"df":0,"docs":{},"s":{"df":0,"docs":{},"h":{"df":2,"docs":{"14":{"tf":1.0},"7":{"tf":1.0}}}}}},"df":0,"docs":{}}}},"df":0,"docs":{}},"df":0,"docs":{}},"df":0,"docs":{}},"df":0,"docs":{}},"df":1,"docs":{"4":{"tf":1.0}}}}},"df":0,"docs":{}}}},"df":0,"docs":{}}}}}}},"df":0,"docs":{}},"a":{"df":0,"docs":{},"p":{"df":0,"docs":{},"i":{"df":2,"docs":{"14":{"tf":3.7416573867739413},"7":{"tf":3.7416573867739413}}}}},"df":5,"docs":{"1":{"tf":1.4142135623730951},"13":{"tf":3.4641016151377544},"14":{"tf":4.47213595499958},"6":{"tf":3.4641016151377544},"7":{"tf":4.47213595499958}},"s":{"df":0,"docs":{},"p":{"df":0,"docs":{},"e":{"c":{"df":4,"docs":{"13":{"tf":2.8284271247461903},"14":{"tf":3.7416573867739413},"6":{"tf":2.8284271247461903},"7":{"tf":3.7416573867739413}}},"df":0,"docs":{}}}}}},"i":{"df":0,"docs":{},"m":{"df":1,"docs":{"4":{"tf":1.0}}}},"u":{"df":0,"docs":{},"e":{"df":2,"docs":{"13":{"tf":1.4142135623730951},"6":{"tf":1.4142135623730951}}}}},"t":{"df":0,"docs":{},"i":{"df":1,"docs":{"19":{"tf":1.0}}},"y":{"_":{"df":0,"docs":{},"p":{"a":{"df":0,"docs":{},"t":{"df":0,"docs":{},"h":{"(":{"b":{"df":0,"docs":{},"u":{"df":0,"docs":{},"f":{"df":0,"docs":{},"f":{"df":1,"docs":{"19":{"tf":1.0}}}}}},"df":0,"docs":{}},"df":1,"docs":{"19":{"tf":1.0}}}}},"df":0,"docs":{}}},"df":0,"docs":{}}},"w":{"df":0,"docs":{},"o":{"df":2,"docs":{"0":{"tf":1.0},"4":{"tf":1.0}}}}},"u":{"df":0,"docs":{},"i":{".":{"b":{"a":{"df":0,"docs":{},"r":{"df":1,"docs":{"4":{"tf":1.0}}}},"df":0,"docs":{}},"df":0,"docs":{},"s":{"df":0,"docs":{},"e":{"df":0,"docs":{},"g":{"df":1,"docs":{"4":{"tf":1.0}}}}}},"a":{"df":0,"docs":{},"p":{"df":0,"docs":{},"i":{"df":2,"docs":{"25":{"tf":2.23606797749979},"9":{"tf":2.23606797749979}}}}},"df":3,"docs":{"1":{"tf":1.4142135623730951},"25":{"tf":2.23606797749979},"9":{"tf":2.23606797749979}}},"n":{"b":{"df":0,"docs":{},"i":{"df":0,"docs":{},"n":{"d":{"(":{"df":0,"docs":{},"m":{"df":0,"docs":{},"o":{"d":{"df":1,"docs":{"5":{"tf":1.0}}},"df":0,"docs":{}}}},"df":1,"docs":{"5":{"tf":1.0}}},"df":0,"docs":{}}}},"df":0,"docs":{},"i":{"df":0,"docs":{},"x":{"df":2,"docs":{"24":{"tf":1.0},"8":{"tf":1.0}}}},"k":{"df":0,"docs":{},"n":{"df":0,"docs":{},"o":{"df":0,"docs":{},"w":{"df":0,"docs":{},"n":{"df":2,"docs":{"14":{"tf":1.0},"7":{"tf":1.0}}}}}}}},"p":{"df":3,"docs":{"13":{"tf":1.0},"19":{"tf":1.0},"6":{"tf":1.0}},"w":{"a":{"df":0,"docs":{},"r":{"d":{"df":2,"docs":{"13":{"tf":1.4142135623730951},"6":{"tf":1.4142135623730951}}},"df":0,"docs":{}}},"df":0,"docs":{}}},"s":{"df":6,"docs":{"0":{"tf":1.0},"12":{"tf":1.0},"22":{"tf":1.0},"25":{"tf":1.0},"5":{"tf":1.4142135623730951},"9":{"tf":1.0}}}},"v":{"a":{"df":0,"docs":{},"l":{"df":0,"docs":{},"u":{"df":5,"docs":{"10":{"tf":2.0},"13":{"tf":1.4142135623730951},"25":{"tf":1.0},"6":{"tf":1.4142135623730951},"9":{"tf":1.0}}}},"r":{"df":0,"docs":{},"i":{"a":{"b":{"df":0,"docs":{},"l":{"df":2,"docs":{"24":{"tf":1.0},"8":{"tf":1.0}}}},"df":0,"docs":{}},"df":0,"docs":{}}}},"df":0,"docs":{},"e":{"c":{"df":0,"docs":{},"t":{"df":0,"docs":{},"o":{"df":0,"docs":{},"r":{"df":1,"docs":{"19":{"tf":1.0}}}}}},"df":0,"docs":{},"r":{"df":0,"docs":{},"t":{"df":0,"docs":{},"i":{"c":{"df":4,"docs":{"13":{"tf":1.0},"14":{"tf":1.0},"6":{"tf":1.0},"7":{"tf":1.0}}},"df":0,"docs":{}}}}},"i":{"df":0,"docs":{},"e":{"df":0,"docs":{},"w":{"df":2,"docs":{"13":{"tf":2.6457513110645907},"6":{"tf":2.6457513110645907}},"p":{"df":0,"docs":{},"o":{"df":0,"docs":{},"r":{"df":0,"docs":{},"t":{"_":{"df":0,"docs":{},"w":{"df":0,"docs":{},"i":{"d":{"df":0,"docs":{},"t":{"df":0,"docs":{},"h":{"(":{"b":{"a":{"df":0,"docs":{},"r":{"df":1,"docs":{"22":{"tf":1.0}}}},"df":0,"docs":{}},"df":0,"docs":{}},"df":1,"docs":{"22":{"tf":1.0}}}}},"df":0,"docs":{}}}},"df":1,"docs":{"22":{"tf":1.0}}}}}}}},"s":{"df":0,"docs":{},"i":{"b":{"df":0,"docs":{},"l":{"df":5,"docs":{"15":{"tf":1.4142135623730951},"16":{"tf":1.4142135623730951},"19":{"tf":1.0},"20":{"tf":1.0},"21":{"tf":1.0}},"e":{"_":{"b":{"df":0,"docs":{},"u":{"df":0,"docs":{},"f":{"df":0,"docs":{},"f":{"df":2,"docs":{"15":{"tf":1.0},"16":{"tf":1.0}},"e":{"df":0,"docs":{},"r":{"df":0,"docs":{},"s":{"(":{"c":{"df":0,"docs":{},"o":{"df":0,"docs":{},"n":{"df":0,"docs":{},"t":{"df":0,"docs":{},"e":{"df":0,"docs":{},"x":{"df":0,"docs":{},"t":{"df":1,"docs":{"15":{"tf":1.0}}}}}}}}},"df":0,"docs":{},"m":{"df":0,"docs":{},"u":{"df":0,"docs":{},"x":{"df":1,"docs":{"16":{"tf":1.0}}}}}},"df":0,"docs":{}}}}}}}},"df":0,"docs":{}},"df":0,"docs":{}}}},"df":0,"docs":{}},"u":{"a":{"df":0,"docs":{},"l":{"df":1,"docs":{"0":{"tf":1.0}}}},"df":0,"docs":{}}}}},"w":{"df":0,"docs":{},"e":{"df":0,"docs":{},"i":{"df":0,"docs":{},"g":{"df":0,"docs":{},"h":{"df":0,"docs":{},"t":{"df":1,"docs":{"20":{"tf":1.0}}}}}}},"h":{"df":0,"docs":{},"e":{"df":0,"docs":{},"e":{"df":0,"docs":{},"l":{"df":1,"docs":{"10":{"tf":1.4142135623730951}}}},"t":{"df":0,"docs":{},"h":{"df":0,"docs":{},"e":{"df":0,"docs":{},"r":{"df":7,"docs":{"13":{"tf":1.4142135623730951},"19":{"tf":2.0},"20":{"tf":2.0},"21":{"tf":1.4142135623730951},"22":{"tf":1.0},"23":{"tf":1.7320508075688772},"6":{"tf":1.4142135623730951}}}}}}},"i":{"c":{"df":0,"docs":{},"h":{"(":{"_":{"df":2,"docs":{"24":{"tf":1.0},"8":{"tf":1.0}}},"df":0,"docs":{}},"df":0,"docs":{}}},"df":0,"docs":{}}},"i":{"d":{"df":0,"docs":{},"t":{"df":0,"docs":{},"h":{"df":3,"docs":{"13":{"tf":1.4142135623730951},"22":{"tf":1.0},"6":{"tf":1.4142135623730951}}}}},"df":0,"docs":{},"n":{"d":{"df":0,"docs":{},"o":{"df":0,"docs":{},"w":{"df":6,"docs":{"13":{"tf":2.8284271247461903},"15":{"tf":1.4142135623730951},"16":{"tf":1.4142135623730951},"18":{"tf":1.0},"20":{"tf":1.0},"6":{"tf":2.8284271247461903}}}}},"df":0,"docs":{}}},"o":{"df":0,"docs":{},"r":{"df":0,"docs":{},"k":{"df":1,"docs":{"19":{"tf":1.0}},"s":{"df":0,"docs":{},"p":{"a":{"c":{"df":1,"docs":{"5":{"tf":1.0}}},"df":0,"docs":{}},"df":0,"docs":{}}}}}}},"x":{"df":2,"docs":{"13":{"tf":1.0},"6":{"tf":1.0}}},"y":{"a":{"df":0,"docs":{},"n":{"df":0,"docs":{},"k":{"_":{"df":0,"docs":{},"s":{"df":0,"docs":{},"e":{"df":0,"docs":{},"l":{"df":0,"docs":{},"e":{"c":{"df":0,"docs":{},"t":{"df":2,"docs":{"13":{"tf":1.0},"6":{"tf":1.0}},"i":{"df":0,"docs":{},"o":{"df":0,"docs":{},"n":{"(":{"_":{"df":2,"docs":{"13":{"tf":1.0},"6":{"tf":1.0}}},"df":0,"docs":{}},"df":0,"docs":{}}}}}},"df":0,"docs":{}}}}}},"df":0,"docs":{}}}},"df":2,"docs":{"13":{"tf":1.0},"6":{"tf":1.0}}},"z":{"df":0,"docs":{},"e":{"df":0,"docs":{},"r":{"df":0,"docs":{},"o":{"df":1,"docs":{"23":{"tf":1.0}}}}}}}},"title":{"root":{"a":{"c":{"df":0,"docs":{},"t":{"df":0,"docs":{},"i":{"df":0,"docs":{},"o":{"df":0,"docs":{},"n":{"df":2,"docs":{"13":{"tf":1.0},"6":{"tf":1.0}}}}}}},"df":0,"docs":{},"p":{"df":0,"docs":{},"i":{"df":1,"docs":{"0":{"tf":1.0}}}}},"b":{"df":0,"docs":{},"u":{"df":0,"docs":{},"f":{"df":0,"docs":{},"f":{"df":0,"docs":{},"e":{"df":0,"docs":{},"r":{"df":0,"docs":{},"r":{"df":0,"docs":{},"e":{"df":0,"docs":{},"f":{"df":1,"docs":{"19":{"tf":1.0}}}}}}}}}}},"c":{"df":0,"docs":{},"o":{"df":0,"docs":{},"n":{"df":0,"docs":{},"f":{"df":0,"docs":{},"i":{"df":0,"docs":{},"g":{"df":1,"docs":{"0":{"tf":1.0}}}}},"t":{"df":0,"docs":{},"e":{"df":0,"docs":{},"x":{"df":0,"docs":{},"t":{"df":1,"docs":{"15":{"tf":1.0}}}}}}}}},"d":{"df":0,"docs":{},"e":{"df":0,"docs":{},"f":{"df":0,"docs":{},"i":{"df":0,"docs":{},"n":{"df":0,"docs":{},"i":{"df":0,"docs":{},"t":{"df":1,"docs":{"2":{"tf":1.0}}}}}}}}},"df":0,"docs":{},"e":{"df":0,"docs":{},"m":{"b":{"df":0,"docs":{},"e":{"df":0,"docs":{},"r":{"df":1,"docs":{"0":{"tf":1.0}}}}},"df":0,"docs":{}},"v":{"df":0,"docs":{},"e":{"df":0,"docs":{},"n":{"df":0,"docs":{},"t":{"df":0,"docs":{},"i":{"df":0,"docs":{},"n":{"df":0,"docs":{},"f":{"df":0,"docs":{},"o":{"df":1,"docs":{"17":{"tf":1.0}}}}}}}}}},"x":{"a":{"df":0,"docs":{},"m":{"df":0,"docs":{},"p":{"df":0,"docs":{},"l":{"df":2,"docs":{"3":{"tf":1.0},"4":{"tf":1.0}}}}}},"df":0,"docs":{}}},"f":{"df":0,"docs":{},"l":{"df":0,"docs":{},"o":{"a":{"df":0,"docs":{},"t":{"df":0,"docs":{},"i":{"df":0,"docs":{},"n":{"df":0,"docs":{},"g":{"df":0,"docs":{},"r":{"df":0,"docs":{},"e":{"df":0,"docs":{},"f":{"df":1,"docs":{"21":{"tf":1.0}}}}}}}}}},"df":0,"docs":{}}}},"g":{"df":0,"docs":{},"l":{"df":0,"docs":{},"o":{"b":{"a":{"df":0,"docs":{},"l":{"df":1,"docs":{"5":{"tf":1.0}}}},"df":0,"docs":{}},"df":0,"docs":{}}}},"m":{"df":0,"docs":{},"o":{"df":0,"docs":{},"u":{"df":0,"docs":{},"s":{"df":1,"docs":{"10":{"tf":1.0}}}}},"u":{"df":0,"docs":{},"x":{"df":1,"docs":{"16":{"tf":1.0}}}}},"n":{"df":0,"docs":{},"o":{"d":{"df":0,"docs":{},"e":{"df":0,"docs":{},"r":{"df":0,"docs":{},"e":{"df":0,"docs":{},"f":{"df":1,"docs":{"20":{"tf":1.0}}}}}}},"df":0,"docs":{}}},"p":{"a":{"df":0,"docs":{},"g":{"df":0,"docs":{},"e":{"df":1,"docs":{"1":{"tf":1.0}}}}},"df":0,"docs":{}},"r":{"df":0,"docs":{},"e":{"df":0,"docs":{},"g":{"df":0,"docs":{},"i":{"df":0,"docs":{},"s":{"df":0,"docs":{},"t":{"df":0,"docs":{},"r":{"df":5,"docs":{"5":{"tf":1.0},"6":{"tf":1.0},"7":{"tf":1.0},"8":{"tf":1.0},"9":{"tf":1.0}}}}}}}},"u":{"df":0,"docs":{},"n":{"df":0,"docs":{},"t":{"df":0,"docs":{},"i":{"df":0,"docs":{},"m":{"df":1,"docs":{"26":{"tf":1.0}}}}}}}},"s":{"df":0,"docs":{},"e":{"df":0,"docs":{},"s":{"df":0,"docs":{},"s":{"df":0,"docs":{},"i":{"df":0,"docs":{},"o":{"df":0,"docs":{},"n":{"df":0,"docs":{},"r":{"df":0,"docs":{},"e":{"df":0,"docs":{},"f":{"df":1,"docs":{"18":{"tf":1.0}}}}}}}}}}},"y":{"df":0,"docs":{},"s":{"df":0,"docs":{},"t":{"df":0,"docs":{},"e":{"df":0,"docs":{},"m":{"df":2,"docs":{"24":{"tf":1.0},"8":{"tf":1.0}}}}}}}},"t":{"a":{"b":{"b":{"a":{"df":0,"docs":{},"r":{"c":{"df":0,"docs":{},"o":{"df":0,"docs":{},"n":{"df":0,"docs":{},"t":{"df":0,"docs":{},"e":{"df":0,"docs":{},"x":{"df":0,"docs":{},"t":{"df":1,"docs":{"22":{"tf":1.0}}}}}}}}},"df":1,"docs":{"12":{"tf":1.0}}}},"df":0,"docs":{}},"df":0,"docs":{},"i":{"df":0,"docs":{},"n":{"df":0,"docs":{},"f":{"df":0,"docs":{},"o":{"df":1,"docs":{"23":{"tf":1.0}}}}}}},"df":0,"docs":{}},"df":0,"docs":{},"h":{"df":0,"docs":{},"e":{"df":0,"docs":{},"m":{"df":0,"docs":{},"e":{"df":2,"docs":{"11":{"tf":1.0},"26":{"tf":1.0}}}}}},"r":{"df":0,"docs":{},"e":{"df":0,"docs":{},"e":{"df":2,"docs":{"14":{"tf":1.0},"7":{"tf":1.0}}}}}},"u":{"df":0,"docs":{},"i":{"df":2,"docs":{"25":{"tf":1.0},"9":{"tf":1.0}}}}}}},"lang":"English","pipeline":["trimmer","stopWordFilter","stemmer"],"ref":"id","version":"0.9.5"},"results_options":{"limit_results":30,"teaser_word_count":30},"search_options":{"bool":"OR","expand":true,"fields":{"body":{"boost":1},"breadcrumbs":{"boost":1},"title":{"boost":2}}}}')); \ No newline at end of file diff --git a/docs/config-api-book/session-ref.html b/docs/config-api-book/session-ref.html new file mode 100644 index 0000000..275f61e --- /dev/null +++ b/docs/config-api-book/session-ref.html @@ -0,0 +1,322 @@ + + + + + + SessionRef - Embers Config API + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+
+

Keyboard shortcuts

+
+

Press or to navigate between chapters

+

Press S or / to search in the book

+

Press ? to show this help

+

Press Esc to hide this help

+
+
+
+
+ + + + + + + + + + + + + +
+ +
+
+ + + + + + + +
+
+

SessionRef

+

Namespace: global

+
+ +

fn floating

+ +
fn floating(session: SessionRef) -> Array
+
+
+ +
+ +
+Return floating window ids attached to the session. +
+ +
+ +
+ + +
+ +

fn id

+ +
fn id(session: SessionRef) -> int
+
+
+ +
+ +
+Return the numeric session id. +
+ +
+ +
+ + +
+ +

fn name

+ +
fn name(session: SessionRef) -> String
+
+
+ +
+ +
+Return the session name. +
+ +
+ +
+ + +
+ +

fn root_node

+ +
fn root_node(session: SessionRef) -> int
+
+
+ +
+ +
+Return the root tabs node for the session. +
+ +
+ +
+ + + +
+ + +
+
+ + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + diff --git a/docs/config-api-book/system-runtime.html b/docs/config-api-book/system-runtime.html new file mode 100644 index 0000000..4b6c0d6 --- /dev/null +++ b/docs/config-api-book/system-runtime.html @@ -0,0 +1,303 @@ + + + + + + System - Embers Config API + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+
+

Keyboard shortcuts

+
+

Press or to navigate between chapters

+

Press S or / to search in the book

+

Press ? to show this help

+

Press Esc to hide this help

+
+
+
+
+ + + + + + + + + + + + + +
+ +
+
+ + + + + + + +
+
+

System

+

Namespace: global

+
+ +

fn env

+ +
fn env(_: SystemApi, name: String) -> ?
+
+
+ +
+ +
+Read an environment variable, if it is set. +

ReturnType: string | ()

+
+ +
+ +
+ + +
+ +

fn now

+ +
fn now(_: SystemApi) -> int
+
+
+ +
+ +
+Return the current Unix timestamp in seconds. +
+ +
+ +
+ + +
+ +

fn which

+ +
fn which(_: SystemApi, name: String) -> ?
+
+
+ +
+ +
+Resolve an executable from `PATH`, if it is found. +

ReturnType: string | ()

+
+ +
+ +
+ + + +
+ + +
+
+ + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + diff --git a/docs/config-api-book/tab-bar-context.html b/docs/config-api-book/tab-bar-context.html new file mode 100644 index 0000000..816bc91 --- /dev/null +++ b/docs/config-api-book/tab-bar-context.html @@ -0,0 +1,364 @@ + + + + + + TabBarContext - Embers Config API + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+
+

Keyboard shortcuts

+
+

Press or to navigate between chapters

+

Press S or / to search in the book

+

Press ? to show this help

+

Press Esc to hide this help

+
+
+
+
+ + + + + + + + + + + + + +
+ +
+
+ + + + + + + +
+
+

TabBarContext

+

Namespace: global

+
+ +

fn active_index

+ +
fn active_index(bar: TabBarContext) -> int
+
+
+ +
+ +
+Return the active tab index. +
+ +
+ +
+ + +
+ +

fn is_root

+ +
fn is_root(bar: TabBarContext) -> bool
+
+
+ +
+ +
+Return whether the formatted tabs are the root tabs. +
+ +
+ +
+ + +
+ +

fn mode

+ +
fn mode(bar: TabBarContext) -> String
+
+
+ +
+ +
+Return the formatter mode name. +
+ +
+ +
+ + +
+ +

fn node_id

+ +
fn node_id(bar: TabBarContext) -> int
+
+
+ +
+ +
+Return the tabs node id currently being formatted. +
+ +
+ +
+ + +
+ +

fn tabs

+ +
fn tabs(bar: TabBarContext) -> Array
+
+
+ +
+ +
+Return tab metadata used by the formatter. +
+ +
+ +
+ + +
+ +

fn viewport_width

+ +
fn viewport_width(bar: TabBarContext) -> int
+
+
+ +
+ +
+Return the formatter viewport width in cells. +
+ +
+ +
+ + + +
+ + +
+
+ + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + diff --git a/docs/config-api-book/tab-info.html b/docs/config-api-book/tab-info.html new file mode 100644 index 0000000..3e238b7 --- /dev/null +++ b/docs/config-api-book/tab-info.html @@ -0,0 +1,364 @@ + + + + + + TabInfo - Embers Config API + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+
+

Keyboard shortcuts

+
+

Press or to navigate between chapters

+

Press S or / to search in the book

+

Press ? to show this help

+

Press Esc to hide this help

+
+
+
+
+ + + + + + + + + + + + + +
+ +
+
+ + + + + + + +
+
+

TabInfo

+

Namespace: global

+
+ +

fn buffer_count

+ +
fn buffer_count(tab: TabInfo) -> int
+
+
+ +
+ +
+Return how many buffers are attached to the tab. +
+ +
+ +
+ + +
+ +

fn has_activity

+ +
fn has_activity(tab: TabInfo) -> bool
+
+
+ +
+ +
+Return whether the tab has activity. +
+ +
+ +
+ + +
+ +

fn has_bell

+ +
fn has_bell(tab: TabInfo) -> bool
+
+
+ +
+ +
+Return whether the tab has a bell marker. +
+ +
+ +
+ + +
+ +

fn index

+ +
fn index(tab: TabInfo) -> int
+
+
+ +
+ +
+Return the zero-based tab index. +
+ +
+ +
+ + +
+ +

fn is_active

+ +
fn is_active(tab: TabInfo) -> bool
+
+
+ +
+ +
+Return whether the tab is active. +
+ +
+ +
+ + +
+ +

fn title

+ +
fn title(tab: TabInfo) -> String
+
+
+ +
+ +
+Return the tab title. +
+ +
+ +
+ + + +
+ + +
+
+ + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + diff --git a/docs/config-api-book/tabbar.html b/docs/config-api-book/tabbar.html new file mode 100644 index 0000000..e32eba9 --- /dev/null +++ b/docs/config-api-book/tabbar.html @@ -0,0 +1,259 @@ + + + + + + Tabbar - Embers Config API + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+
+

Keyboard shortcuts

+
+

Press or to navigate between chapters

+

Press S or / to search in the book

+

Press ? to show this help

+

Press Esc to hide this help

+
+
+
+
+ + + + + + + + + + + + + +
+ +
+
+ + + + + + + +
+
+

Tabbar

+

Namespace: global

+
+ +

fn set_formatter

+ +
fn set_formatter(tabbar: TabbarApi, callback: FnPtr)
+
+
+ +
+ +
+Register the function used to format the tab bar. +
+ +
+ +
+ + + +
+ + +
+
+ + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + diff --git a/docs/config-api-book/theme.html b/docs/config-api-book/theme.html new file mode 100644 index 0000000..58a1e6c --- /dev/null +++ b/docs/config-api-book/theme.html @@ -0,0 +1,259 @@ + + + + + + Theme - Embers Config API + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+
+

Keyboard shortcuts

+
+

Press or to navigate between chapters

+

Press S or / to search in the book

+

Press ? to show this help

+

Press Esc to hide this help

+
+
+
+
+ + + + + + + + + + + + + +
+ +
+
+ + + + + + + +
+
+

Theme

+

Namespace: global

+
+ +

fn set_palette

+ +
fn set_palette(theme: ThemeApi, palette: Map)
+
+
+ +
+ +
+Add named colors to the theme palette. +
+ +
+ +
+ + + +
+ + +
+
+ + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + diff --git a/docs/config-api-book/theme/rhai-autodocs-tabs-dbd60081.js b/docs/config-api-book/theme/rhai-autodocs-tabs-dbd60081.js new file mode 100644 index 0000000..a925012 --- /dev/null +++ b/docs/config-api-book/theme/rhai-autodocs-tabs-dbd60081.js @@ -0,0 +1,22 @@ +window.openTab = function (evt, group, tab) { + document + .querySelectorAll('.tabcontent[group="' + group + '"]') + .forEach(function (content) { + content.style.display = "none"; + }); + + document + .querySelectorAll('.tablinks[group="' + group + '"]') + .forEach(function (link) { + link.classList.remove("active"); + }); + + const target = document.getElementById(group + "-" + tab); + if (target) { + target.style.display = "block"; + } + + if (evt && evt.currentTarget) { + evt.currentTarget.classList.add("active"); + } +}; \ No newline at end of file diff --git a/docs/config-api-book/theme/rhai-autodocs-tabs.js b/docs/config-api-book/theme/rhai-autodocs-tabs.js new file mode 100644 index 0000000..a925012 --- /dev/null +++ b/docs/config-api-book/theme/rhai-autodocs-tabs.js @@ -0,0 +1,22 @@ +window.openTab = function (evt, group, tab) { + document + .querySelectorAll('.tabcontent[group="' + group + '"]') + .forEach(function (content) { + content.style.display = "none"; + }); + + document + .querySelectorAll('.tablinks[group="' + group + '"]') + .forEach(function (link) { + link.classList.remove("active"); + }); + + const target = document.getElementById(group + "-" + tab); + if (target) { + target.style.display = "block"; + } + + if (evt && evt.currentTarget) { + evt.currentTarget.classList.add("active"); + } +}; \ No newline at end of file diff --git a/docs/config-api-book/theme/rhai-highlight-8baa11ea.js b/docs/config-api-book/theme/rhai-highlight-8baa11ea.js new file mode 100644 index 0000000..f759086 --- /dev/null +++ b/docs/config-api-book/theme/rhai-highlight-8baa11ea.js @@ -0,0 +1,73 @@ +(function () { + const hljsInstance = window.hljs; + if (!hljsInstance) { + return; + } + + hljsInstance.registerLanguage("rhai", function (hljs) { + return { + name: "Rhai", + aliases: ["rhai-script"], + keywords: { + keyword: + "if else switch do while loop for in break continue return throw try catch fn private let const import export as and or not", + literal: "true false null" + }, + contains: [ + hljs.C_LINE_COMMENT_MODE, + hljs.C_BLOCK_COMMENT_MODE, + hljs.APOS_STRING_MODE, + hljs.QUOTE_STRING_MODE, + hljs.C_NUMBER_MODE, + { + className: "literal", + begin: /#\{/, + end: /\}/ + }, + { + className: "function", + beginKeywords: "fn", + end: /[{;]/, + excludeEnd: true, + contains: [ + hljs.UNDERSCORE_TITLE_MODE, + { + className: "params", + begin: /\(/, + end: /\)/, + contains: [ + hljs.C_LINE_COMMENT_MODE, + hljs.C_BLOCK_COMMENT_MODE, + hljs.APOS_STRING_MODE, + hljs.QUOTE_STRING_MODE, + hljs.C_NUMBER_MODE + ] + } + ] + } + ] + }; + }); + + const highlightRhaiBlocks = function () { + document + .querySelectorAll("pre code.language-rhai, pre code.lang-rhai") + .forEach(function (block) { + if (typeof hljsInstance.highlightElement === "function") { + block.removeAttribute("data-highlighted"); + hljsInstance.highlightElement(block); + return; + } + + if (typeof hljsInstance.highlightBlock === "function") { + hljsInstance.highlightBlock(block); + } + }); + }; + + if (document.readyState === "loading") { + document.addEventListener("DOMContentLoaded", highlightRhaiBlocks); + } else { + highlightRhaiBlocks(); + } +})(); \ No newline at end of file diff --git a/docs/config-api-book/theme/rhai-highlight.js b/docs/config-api-book/theme/rhai-highlight.js new file mode 100644 index 0000000..f759086 --- /dev/null +++ b/docs/config-api-book/theme/rhai-highlight.js @@ -0,0 +1,73 @@ +(function () { + const hljsInstance = window.hljs; + if (!hljsInstance) { + return; + } + + hljsInstance.registerLanguage("rhai", function (hljs) { + return { + name: "Rhai", + aliases: ["rhai-script"], + keywords: { + keyword: + "if else switch do while loop for in break continue return throw try catch fn private let const import export as and or not", + literal: "true false null" + }, + contains: [ + hljs.C_LINE_COMMENT_MODE, + hljs.C_BLOCK_COMMENT_MODE, + hljs.APOS_STRING_MODE, + hljs.QUOTE_STRING_MODE, + hljs.C_NUMBER_MODE, + { + className: "literal", + begin: /#\{/, + end: /\}/ + }, + { + className: "function", + beginKeywords: "fn", + end: /[{;]/, + excludeEnd: true, + contains: [ + hljs.UNDERSCORE_TITLE_MODE, + { + className: "params", + begin: /\(/, + end: /\)/, + contains: [ + hljs.C_LINE_COMMENT_MODE, + hljs.C_BLOCK_COMMENT_MODE, + hljs.APOS_STRING_MODE, + hljs.QUOTE_STRING_MODE, + hljs.C_NUMBER_MODE + ] + } + ] + } + ] + }; + }); + + const highlightRhaiBlocks = function () { + document + .querySelectorAll("pre code.language-rhai, pre code.lang-rhai") + .forEach(function (block) { + if (typeof hljsInstance.highlightElement === "function") { + block.removeAttribute("data-highlighted"); + hljsInstance.highlightElement(block); + return; + } + + if (typeof hljsInstance.highlightBlock === "function") { + hljsInstance.highlightBlock(block); + } + }); + }; + + if (document.readyState === "loading") { + document.addEventListener("DOMContentLoaded", highlightRhaiBlocks); + } else { + highlightRhaiBlocks(); + } +})(); \ No newline at end of file diff --git a/docs/config-api-book/toc-c8603eba.js b/docs/config-api-book/toc-c8603eba.js new file mode 100644 index 0000000..9d549cc --- /dev/null +++ b/docs/config-api-book/toc-c8603eba.js @@ -0,0 +1,454 @@ +// Populate the sidebar +// +// This is a script, and not included directly in the page, to control the total size of the book. +// The TOC contains an entry for each page, so if each page includes a copy of the TOC, +// the total size of the page becomes O(n**2). +class MDBookSidebarScrollbox extends HTMLElement { + constructor() { + super(); + } + connectedCallback() { + this.innerHTML = '
  1. Overview
  2. Example
  3. Registration Globals
  4. Action (Registration)
  5. Tree (Registration)
  6. System (Registration)
  7. UI (Registration)
  8. Mouse
  9. Theme
  10. Tabbar
  11. Action
  12. Tree
  13. Context
  14. Mux
  15. EventInfo
  16. SessionRef
  17. BufferRef
  18. NodeRef
  19. FloatingRef
  20. TabBarContext
  21. TabInfo
  22. System
  23. UI
  24. Runtime Theme
'; + // Set the current, active page, and reveal it if it's hidden + let current_page = document.location.href.toString().split('#')[0].split('?')[0]; + if (current_page.endsWith('/')) { + current_page += 'index.html'; + } + const links = Array.prototype.slice.call(this.querySelectorAll('a')); + const l = links.length; + for (let i = 0; i < l; ++i) { + const link = links[i]; + const href = link.getAttribute('href'); + if (href && !href.startsWith('#') && !/^(?:[a-z+]+:)?\/\//.test(href)) { + link.href = path_to_root + href; + } + // The 'index' page is supposed to alias the first chapter in the book. + if (link.href === current_page + || i === 0 + && path_to_root === '' + && current_page.endsWith('/index.html')) { + link.classList.add('active'); + let parent = link.parentElement; + while (parent) { + if (parent.tagName === 'LI' && parent.classList.contains('chapter-item')) { + parent.classList.add('expanded'); + } + parent = parent.parentElement; + } + } + } + // Track and set sidebar scroll position + this.addEventListener('click', e => { + if (e.target.tagName === 'A') { + const clientRect = e.target.getBoundingClientRect(); + const sidebarRect = this.getBoundingClientRect(); + sessionStorage.setItem('sidebar-scroll-offset', clientRect.top - sidebarRect.top); + } + }, { passive: true }); + const sidebarScrollOffset = sessionStorage.getItem('sidebar-scroll-offset'); + sessionStorage.removeItem('sidebar-scroll-offset'); + if (sidebarScrollOffset !== null) { + // preserve sidebar scroll position when navigating via links within sidebar + const activeSection = this.querySelector('.active'); + if (activeSection) { + const clientRect = activeSection.getBoundingClientRect(); + const sidebarRect = this.getBoundingClientRect(); + const currentOffset = clientRect.top - sidebarRect.top; + this.scrollTop += currentOffset - parseFloat(sidebarScrollOffset); + } + } else { + // scroll sidebar to current active section when navigating via + // 'next/previous chapter' buttons + const activeSection = document.querySelector('#mdbook-sidebar .active'); + if (activeSection) { + activeSection.scrollIntoView({ block: 'center' }); + } + } + // Toggle buttons + const sidebarAnchorToggles = document.querySelectorAll('.chapter-fold-toggle'); + function toggleSection(ev) { + ev.currentTarget.parentElement.parentElement.classList.toggle('expanded'); + } + Array.from(sidebarAnchorToggles).forEach(el => { + el.addEventListener('click', toggleSection); + }); + } +} +window.customElements.define('mdbook-sidebar-scrollbox', MDBookSidebarScrollbox); + + +// --------------------------------------------------------------------------- +// Support for dynamically adding headers to the sidebar. + +(function() { + // This is used to detect which direction the page has scrolled since the + // last scroll event. + let lastKnownScrollPosition = 0; + // This is the threshold in px from the top of the screen where it will + // consider a header the "current" header when scrolling down. + const defaultDownThreshold = 150; + // Same as defaultDownThreshold, except when scrolling up. + const defaultUpThreshold = 300; + // The threshold is a virtual horizontal line on the screen where it + // considers the "current" header to be above the line. The threshold is + // modified dynamically to handle headers that are near the bottom of the + // screen, and to slightly offset the behavior when scrolling up vs down. + let threshold = defaultDownThreshold; + // This is used to disable updates while scrolling. This is needed when + // clicking the header in the sidebar, which triggers a scroll event. It + // is somewhat finicky to detect when the scroll has finished, so this + // uses a relatively dumb system of disabling scroll updates for a short + // time after the click. + let disableScroll = false; + // Array of header elements on the page. + let headers; + // Array of li elements that are initially collapsed headers in the sidebar. + // I'm not sure why eslint seems to have a false positive here. + // eslint-disable-next-line prefer-const + let headerToggles = []; + // This is a debugging tool for the threshold which you can enable in the console. + let thresholdDebug = false; + + // Updates the threshold based on the scroll position. + function updateThreshold() { + const scrollTop = window.pageYOffset || document.documentElement.scrollTop; + const windowHeight = window.innerHeight; + const documentHeight = document.documentElement.scrollHeight; + + // The number of pixels below the viewport, at most documentHeight. + // This is used to push the threshold down to the bottom of the page + // as the user scrolls towards the bottom. + const pixelsBelow = Math.max(0, documentHeight - (scrollTop + windowHeight)); + // The number of pixels above the viewport, at least defaultDownThreshold. + // Similar to pixelsBelow, this is used to push the threshold back towards + // the top when reaching the top of the page. + const pixelsAbove = Math.max(0, defaultDownThreshold - scrollTop); + // How much the threshold should be offset once it gets close to the + // bottom of the page. + const bottomAdd = Math.max(0, windowHeight - pixelsBelow - defaultDownThreshold); + let adjustedBottomAdd = bottomAdd; + + // Adjusts bottomAdd for a small document. The calculation above + // assumes the document is at least twice the windowheight in size. If + // it is less than that, then bottomAdd needs to be shrunk + // proportional to the difference in size. + if (documentHeight < windowHeight * 2) { + const maxPixelsBelow = documentHeight - windowHeight; + const t = 1 - pixelsBelow / Math.max(1, maxPixelsBelow); + const clamp = Math.max(0, Math.min(1, t)); + adjustedBottomAdd *= clamp; + } + + let scrollingDown = true; + if (scrollTop < lastKnownScrollPosition) { + scrollingDown = false; + } + + if (scrollingDown) { + // When scrolling down, move the threshold up towards the default + // downwards threshold position. If near the bottom of the page, + // adjustedBottomAdd will offset the threshold towards the bottom + // of the page. + const amountScrolledDown = scrollTop - lastKnownScrollPosition; + const adjustedDefault = defaultDownThreshold + adjustedBottomAdd; + threshold = Math.max(adjustedDefault, threshold - amountScrolledDown); + } else { + // When scrolling up, move the threshold down towards the default + // upwards threshold position. If near the bottom of the page, + // quickly transition the threshold back up where it normally + // belongs. + const amountScrolledUp = lastKnownScrollPosition - scrollTop; + const adjustedDefault = defaultUpThreshold - pixelsAbove + + Math.max(0, adjustedBottomAdd - defaultDownThreshold); + threshold = Math.min(adjustedDefault, threshold + amountScrolledUp); + } + + if (documentHeight <= windowHeight) { + threshold = 0; + } + + if (thresholdDebug) { + const id = 'mdbook-threshold-debug-data'; + let data = document.getElementById(id); + if (data === null) { + data = document.createElement('div'); + data.id = id; + data.style.cssText = ` + position: fixed; + top: 50px; + right: 10px; + background-color: 0xeeeeee; + z-index: 9999; + pointer-events: none; + `; + document.body.appendChild(data); + } + data.innerHTML = ` + + + + + + + + + + +
documentHeight${documentHeight.toFixed(1)}
windowHeight${windowHeight.toFixed(1)}
scrollTop${scrollTop.toFixed(1)}
pixelsAbove${pixelsAbove.toFixed(1)}
pixelsBelow${pixelsBelow.toFixed(1)}
bottomAdd${bottomAdd.toFixed(1)}
adjustedBottomAdd${adjustedBottomAdd.toFixed(1)}
scrollingDown${scrollingDown}
threshold${threshold.toFixed(1)}
+ `; + drawDebugLine(); + } + + lastKnownScrollPosition = scrollTop; + } + + function drawDebugLine() { + if (!document.body) { + return; + } + const id = 'mdbook-threshold-debug-line'; + const existingLine = document.getElementById(id); + if (existingLine) { + existingLine.remove(); + } + const line = document.createElement('div'); + line.id = id; + line.style.cssText = ` + position: fixed; + top: ${threshold}px; + left: 0; + width: 100vw; + height: 2px; + background-color: red; + z-index: 9999; + pointer-events: none; + `; + document.body.appendChild(line); + } + + function mdbookEnableThresholdDebug() { + thresholdDebug = true; + updateThreshold(); + drawDebugLine(); + } + + window.mdbookEnableThresholdDebug = mdbookEnableThresholdDebug; + + // Updates which headers in the sidebar should be expanded. If the current + // header is inside a collapsed group, then it, and all its parents should + // be expanded. + function updateHeaderExpanded(currentA) { + // Add expanded to all header-item li ancestors. + let current = currentA.parentElement; + while (current) { + if (current.tagName === 'LI' && current.classList.contains('header-item')) { + current.classList.add('expanded'); + } + current = current.parentElement; + } + } + + // Updates which header is marked as the "current" header in the sidebar. + // This is done with a virtual Y threshold, where headers at or below + // that line will be considered the current one. + function updateCurrentHeader() { + if (!headers || !headers.length) { + return; + } + + // Reset the classes, which will be rebuilt below. + const els = document.getElementsByClassName('current-header'); + for (const el of els) { + el.classList.remove('current-header'); + } + for (const toggle of headerToggles) { + toggle.classList.remove('expanded'); + } + + // Find the last header that is above the threshold. + let lastHeader = null; + for (const header of headers) { + const rect = header.getBoundingClientRect(); + if (rect.top <= threshold) { + lastHeader = header; + } else { + break; + } + } + if (lastHeader === null) { + lastHeader = headers[0]; + const rect = lastHeader.getBoundingClientRect(); + const windowHeight = window.innerHeight; + if (rect.top >= windowHeight) { + return; + } + } + + // Get the anchor in the summary. + const href = '#' + lastHeader.id; + const a = [...document.querySelectorAll('.header-in-summary')] + .find(element => element.getAttribute('href') === href); + if (!a) { + return; + } + + a.classList.add('current-header'); + + updateHeaderExpanded(a); + } + + // Updates which header is "current" based on the threshold line. + function reloadCurrentHeader() { + if (disableScroll) { + return; + } + updateThreshold(); + updateCurrentHeader(); + } + + + // When clicking on a header in the sidebar, this adjusts the threshold so + // that it is located next to the header. This is so that header becomes + // "current". + function headerThresholdClick(event) { + // See disableScroll description why this is done. + disableScroll = true; + setTimeout(() => { + disableScroll = false; + }, 100); + // requestAnimationFrame is used to delay the update of the "current" + // header until after the scroll is done, and the header is in the new + // position. + requestAnimationFrame(() => { + requestAnimationFrame(() => { + // Closest is needed because if it has child elements like . + const a = event.target.closest('a'); + const href = a.getAttribute('href'); + const targetId = href.substring(1); + const targetElement = document.getElementById(targetId); + if (targetElement) { + threshold = targetElement.getBoundingClientRect().bottom; + updateCurrentHeader(); + } + }); + }); + } + + // Takes the nodes from the given head and copies them over to the + // destination, along with some filtering. + function filterHeader(source, dest) { + const clone = source.cloneNode(true); + clone.querySelectorAll('mark').forEach(mark => { + mark.replaceWith(...mark.childNodes); + }); + dest.append(...clone.childNodes); + } + + // Scans page for headers and adds them to the sidebar. + document.addEventListener('DOMContentLoaded', function() { + const activeSection = document.querySelector('#mdbook-sidebar .active'); + if (activeSection === null) { + return; + } + + const main = document.getElementsByTagName('main')[0]; + headers = Array.from(main.querySelectorAll('h2, h3, h4, h5, h6')) + .filter(h => h.id !== '' && h.children.length && h.children[0].tagName === 'A'); + + if (headers.length === 0) { + return; + } + + // Build a tree of headers in the sidebar. + + const stack = []; + + const firstLevel = parseInt(headers[0].tagName.charAt(1)); + for (let i = 1; i < firstLevel; i++) { + const ol = document.createElement('ol'); + ol.classList.add('section'); + if (stack.length > 0) { + stack[stack.length - 1].ol.appendChild(ol); + } + stack.push({level: i + 1, ol: ol}); + } + + // The level where it will start folding deeply nested headers. + const foldLevel = 3; + + for (let i = 0; i < headers.length; i++) { + const header = headers[i]; + const level = parseInt(header.tagName.charAt(1)); + + const currentLevel = stack[stack.length - 1].level; + if (level > currentLevel) { + // Begin nesting to this level. + for (let nextLevel = currentLevel + 1; nextLevel <= level; nextLevel++) { + const ol = document.createElement('ol'); + ol.classList.add('section'); + const last = stack[stack.length - 1]; + const lastChild = last.ol.lastChild; + // Handle the case where jumping more than one nesting + // level, which doesn't have a list item to place this new + // list inside of. + if (lastChild) { + lastChild.appendChild(ol); + } else { + last.ol.appendChild(ol); + } + stack.push({level: nextLevel, ol: ol}); + } + } else if (level < currentLevel) { + while (stack.length > 1 && stack[stack.length - 1].level > level) { + stack.pop(); + } + } + + const li = document.createElement('li'); + li.classList.add('header-item'); + li.classList.add('expanded'); + if (level < foldLevel) { + li.classList.add('expanded'); + } + const span = document.createElement('span'); + span.classList.add('chapter-link-wrapper'); + const a = document.createElement('a'); + span.appendChild(a); + a.href = '#' + header.id; + a.classList.add('header-in-summary'); + filterHeader(header.children[0], a); + a.addEventListener('click', headerThresholdClick); + const nextHeader = headers[i + 1]; + if (nextHeader !== undefined) { + const nextLevel = parseInt(nextHeader.tagName.charAt(1)); + if (nextLevel > level && level >= foldLevel) { + const toggle = document.createElement('a'); + toggle.classList.add('chapter-fold-toggle'); + toggle.classList.add('header-toggle'); + toggle.addEventListener('click', () => { + li.classList.toggle('expanded'); + }); + const toggleDiv = document.createElement('div'); + toggleDiv.textContent = '❱'; + toggle.appendChild(toggleDiv); + span.appendChild(toggle); + headerToggles.push(li); + } + } + li.appendChild(span); + + const currentParent = stack[stack.length - 1]; + currentParent.ol.appendChild(li); + } + + const onThisPage = document.createElement('div'); + onThisPage.classList.add('on-this-page'); + onThisPage.append(stack[0].ol); + const activeItemSpan = activeSection.parentElement; + activeItemSpan.after(onThisPage); + }); + + document.addEventListener('DOMContentLoaded', reloadCurrentHeader); + document.addEventListener('scroll', reloadCurrentHeader, { passive: true }); +})(); + diff --git a/docs/config-api-book/toc.html b/docs/config-api-book/toc.html new file mode 100644 index 0000000..ff7bb28 --- /dev/null +++ b/docs/config-api-book/toc.html @@ -0,0 +1,31 @@ + + + + + + + + + + + + + + + + + + +
  1. Overview
  2. Example
  3. Registration Globals
  4. Action (Registration)
  5. Tree (Registration)
  6. System (Registration)
  7. UI (Registration)
  8. Mouse
  9. Theme
  10. Tabbar
  11. Action
  12. Tree
  13. Context
  14. Mux
  15. EventInfo
  16. SessionRef
  17. BufferRef
  18. NodeRef
  19. FloatingRef
  20. TabBarContext
  21. TabInfo
  22. System
  23. UI
  24. Runtime Theme
+ + diff --git a/docs/config-api-book/tomorrow-night-4c0ae647.css b/docs/config-api-book/tomorrow-night-4c0ae647.css new file mode 100644 index 0000000..11752b8 --- /dev/null +++ b/docs/config-api-book/tomorrow-night-4c0ae647.css @@ -0,0 +1,104 @@ +/* Tomorrow Night Theme */ +/* https://github.com/jmblog/color-themes-for-highlightjs */ +/* Original theme - https://github.com/chriskempson/tomorrow-theme */ +/* https://github.com/jmblog/color-themes-for-highlightjs */ + +/* Tomorrow Comment */ +.hljs-comment { + color: #969896; +} + +/* Tomorrow Red */ +.hljs-variable, +.hljs-attribute, +.hljs-attr, +.hljs-tag, +.hljs-regexp, +.ruby .hljs-constant, +.xml .hljs-tag .hljs-title, +.xml .hljs-pi, +.xml .hljs-doctype, +.html .hljs-doctype, +.css .hljs-id, +.css .hljs-class, +.css .hljs-pseudo { + color: #cc6666; +} + +/* Tomorrow Orange */ +.hljs-number, +.hljs-preprocessor, +.hljs-pragma, +.hljs-built_in, +.hljs-literal, +.hljs-params, +.hljs-constant { + color: #de935f; +} + +/* Tomorrow Yellow */ +.ruby .hljs-class .hljs-title, +.css .hljs-rule .hljs-attribute { + color: #f0c674; +} + +/* Tomorrow Green */ +.hljs-string, +.hljs-value, +.hljs-inheritance, +.hljs-header, +.hljs-name, +.ruby .hljs-symbol, +.xml .hljs-cdata { + color: #b5bd68; +} + +/* Tomorrow Aqua */ +.hljs-title, +.hljs-section, +.css .hljs-hexcolor { + color: #8abeb7; +} + +/* Tomorrow Blue */ +.hljs-function, +.python .hljs-decorator, +.python .hljs-title, +.ruby .hljs-function .hljs-title, +.ruby .hljs-title .hljs-keyword, +.perl .hljs-sub, +.javascript .hljs-title, +.coffeescript .hljs-title { + color: #81a2be; +} + +/* Tomorrow Purple */ +.hljs-keyword, +.javascript .hljs-function { + color: #b294bb; +} + +.hljs { + display: block; + overflow-x: auto; + background: #1d1f21; + color: #c5c8c6; +} + +.coffeescript .javascript, +.javascript .xml, +.tex .hljs-formula, +.xml .javascript, +.xml .vbscript, +.xml .css, +.xml .hljs-cdata { + opacity: 0.5; +} + +.hljs-addition { + color: #718c00; +} + +.hljs-deletion { + color: #c82829; +} diff --git a/docs/config-api-book/tree.html b/docs/config-api-book/tree.html new file mode 100644 index 0000000..c6afc3c --- /dev/null +++ b/docs/config-api-book/tree.html @@ -0,0 +1,502 @@ + + + + + + Tree - Embers Config API + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+
+

Keyboard shortcuts

+
+

Press or to navigate between chapters

+

Press S or / to search in the book

+

Press ? to show this help

+

Press Esc to hide this help

+
+
+
+
+ + + + + + + + + + + + + +
+ +
+
+ + + + + + + +
+
+

Tree

+

Namespace: global

+
+ +

fn buffer_attach

+ +
fn buffer_attach(_: TreeApi, buffer_id: int) -> TreeSpec
+
+
+ +
+ +
+Attach an existing buffer by id. +
+ +
+ +
+ + +
+ +

fn buffer_current

+ +
fn buffer_current(_: TreeApi) -> TreeSpec
+
+
+ +
+ +
+Build a tree reference to the currently focused buffer. +
+ +
+ +
+ + +
+ +

fn buffer_empty

+ +
fn buffer_empty(_: TreeApi) -> TreeSpec
+
+
+ +
+ +
+Build an empty buffer tree node. +
+ +
+ +
+ + +
+ +

fn buffer_spawn

+ +
fn buffer_spawn(_: TreeApi, command: Array) -> TreeSpec
+fn buffer_spawn(_: TreeApi, command: Array, options: Map) -> TreeSpec
+
+
+ + +
+ +
+Spawn a new buffer from a command array. +

Supported options keys are title (string), cwd (string), and env +(map<string, string>). Unknown keys are rejected.

+
+ + + +
+ +
+ + +
+ +

fn current_buffer

+ +
fn current_buffer(_: TreeApi) -> TreeSpec
+
+
+ +
+ +
+Build a tree reference to the currently focused buffer. +
+ +
+ +
+ + +
+ +

fn current_node

+ +
fn current_node(_: TreeApi) -> TreeSpec
+
+
+ +
+ +
+Build a tree reference to the currently focused node. +
+ +
+ +
+ + +
+ +

fn split

+ +
fn split(_: TreeApi, direction: String, children: Array) -> TreeSpec
+fn split(_: TreeApi, direction: String, children: Array, sizes: Array) -> TreeSpec
+
+
+ +
+ +
+Build a split with an explicit direction string. +
+ +
+ +
+ + +
+ +

fn split_h

+ +
fn split_h(_: TreeApi, children: Array) -> TreeSpec
+
+
+ +
+ +
+Build a horizontal split. +
+ +
+ +
+ + +
+ +

fn split_v

+ +
fn split_v(_: TreeApi, children: Array) -> TreeSpec
+
+
+ +
+ +
+Build a vertical split. +
+ +
+ +
+ + +
+ +

fn tab

+ +
fn tab(_: TreeApi, title: String, tree: TreeSpec) -> TabSpec
+
+
+ +
+ +
+Build a single tab specification. +
+ +
+ +
+ + +
+ +

fn tabs

+ +
fn tabs(_: TreeApi, tabs: Array) -> TreeSpec
+
+
+ +
+ +
+Build a tabs container with the first tab active. +
+ +
+ +
+ + +
+ +

fn tabs_with_active

+ +
fn tabs_with_active(_: TreeApi, tabs: Array, active: int) -> TreeSpec
+
+
+ +
+ +
+Build a tabs container with an explicit active tab. +
+ +
+ +
+ + + +
+ + +
+
+ + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + diff --git a/docs/config-api-book/ui.html b/docs/config-api-book/ui.html new file mode 100644 index 0000000..cd0aeb8 --- /dev/null +++ b/docs/config-api-book/ui.html @@ -0,0 +1,283 @@ + + + + + + UI - Embers Config API + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+
+

Keyboard shortcuts

+
+

Press or to navigate between chapters

+

Press S or / to search in the book

+

Press ? to show this help

+

Press Esc to hide this help

+
+
+
+
+ + + + + + + + + + + + + +
+ +
+
+ + + + + + + +
+
+

UI

+

Namespace: global

+
+ +

fn bar

+ +
fn bar(_: UiApi, left: Array, center: Array, right: Array) -> BarSpec
+
+
+ +
+ +
+Build a full bar specification from left, center, and right segments. +
+ +
+ +
+ + +
+ +

fn segment

+ +
fn segment(_: UiApi, text: String) -> BarSegment
+fn segment(_: UiApi, text: String, options: Map) -> BarSegment
+
+
+ +
+ +
+Create a [`BarSegment`] from a [`UiApi`] receiver and text using default styling. +

segment(_: UiApi, text: String) -> BarSegment produces plain text with default +[StyleSpec] values and no click target.

+
+ +
+ +
+ + + +
+ + +
+
+ + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + diff --git a/docs/config-api/SUMMARY.md b/docs/config-api/SUMMARY.md new file mode 100644 index 0000000..79dede7 --- /dev/null +++ b/docs/config-api/SUMMARY.md @@ -0,0 +1,26 @@ +# Summary + +- [Overview](index.md) +- [Example](example.md) +- [Registration Globals](registration-globals.md) +- [Action (Registration)](registration-action.md) +- [Tree (Registration)](registration-tree.md) +- [System (Registration)](registration-system.md) +- [UI (Registration)](registration-ui.md) +- [Mouse](mouse.md) +- [Theme](theme.md) +- [Tabbar](tabbar.md) +- [Action](action.md) +- [Tree](tree.md) +- [Context](context.md) +- [Mux](mux.md) +- [EventInfo](event-info.md) +- [SessionRef](session-ref.md) +- [BufferRef](buffer-ref.md) +- [NodeRef](node-ref.md) +- [FloatingRef](floating-ref.md) +- [TabBarContext](tab-bar-context.md) +- [TabInfo](tab-info.md) +- [System](system-runtime.md) +- [UI](ui.md) +- [Runtime Theme](runtime-theme.md) diff --git a/docs/config-api/action.md b/docs/config-api/action.md new file mode 100644 index 0000000..6bf850d --- /dev/null +++ b/docs/config-api/action.md @@ -0,0 +1,1417 @@ +# Action + +```Namespace: global``` + +
+

fn cancel_search

+ +```rust,ignore +fn cancel_search(_: ActionApi) -> Action +``` + +
+
+ +
+ +
+Cancel the active search. +
+ +
+
+
+
+

fn cancel_selection

+ +```rust,ignore +fn cancel_selection(_: ActionApi) -> Action +``` + +
+
+ +
+ +
+Cancel the current selection. +
+ +
+
+
+
+

fn chain

+ +```rust,ignore +fn chain(_: ActionApi, actions: Array) -> Action +``` + +
+
+ +
+ +
+Chain multiple actions into one composite action. +
+ +
+
+
+
+

fn clear_pending_keys

+ +```rust,ignore +fn clear_pending_keys(_: ActionApi) -> Action +``` + +
+
+ +
+ +
+Clear any partially-entered key sequence. +
+ +
+
+
+
+

fn close_floating

+ +```rust,ignore +fn close_floating(_: ActionApi) -> Action +``` + +
+
+ +
+ +
+Close the currently focused floating window. +
+ +
+
+
+
+

fn close_floating_id

+ +```rust,ignore +fn close_floating_id(_: ActionApi, floating_id: int) -> Action +``` + +
+
+ +
+ +
+Close a floating window by id. +
+ +
+
+
+
+

fn close_node

+ +```rust,ignore +fn close_node(_: ActionApi, node_id: int) -> Action +``` + +
+
+ +
+ +
+Close a view by node id. +
+ +
+
+
+
+

fn close_view

+ +```rust,ignore +fn close_view(_: ActionApi) -> Action +``` + +
+
+ +
+ +
+Close the currently focused view. +
+ +
+
+
+
+

fn copy_selection

+ +```rust,ignore +fn copy_selection(_: ActionApi) -> Action +``` + +
+
+ +
+ +
+Copy the current selection into the clipboard. +
+ +
+
+
+
+

fn detach_buffer

+ +```rust,ignore +fn detach_buffer(_: ActionApi) -> Action +``` + +
+
+ +
+ +
+Detach the currently focused buffer. +
+ +
+
+
+
+

fn detach_buffer_id

+ +```rust,ignore +fn detach_buffer_id(_: ActionApi, buffer_id: int) -> Action +``` + +
+
+ +
+ +
+Detach a buffer by id. +
+ +
+
+
+
+

fn enter_mode

+ +```rust,ignore +fn enter_mode(_: ActionApi, mode: String) -> Action +``` + +
+
+ +
+ +
+Enter a specific input mode by name. +
+ +
+
+
+
+

fn enter_search_mode

+ +```rust,ignore +fn enter_search_mode(_: ActionApi) -> Action +``` + +
+
+ +
+ +
+Enter incremental search mode. +
+ +
+
+
+
+

fn enter_select_block

+ +```rust,ignore +fn enter_select_block(_: ActionApi) -> Action +``` + +
+
+ +
+ +
+Enter block selection mode. +
+ +
+
+
+
+

fn enter_select_char

+ +```rust,ignore +fn enter_select_char(_: ActionApi) -> Action +``` + +
+
+ +
+ +
+Enter character selection mode. +
+ +
+
+
+
+

fn enter_select_line

+ +```rust,ignore +fn enter_select_line(_: ActionApi) -> Action +``` + +
+
+ +
+ +
+Enter line selection mode. +
+ +
+
+
+
+

fn focus_buffer

+ +```rust,ignore +fn focus_buffer(_: ActionApi, buffer_id: int) -> Action +``` + +
+
+ +
+ +
+Focus a specific buffer by id. +
+ +
+
+
+
+

fn focus_down

+ +```rust,ignore +fn focus_down(_: ActionApi) -> Action +``` + +
+
+ +
+ +
+Focus the view below the current node. +
+ +
+
+
+
+

fn focus_left

+ +```rust,ignore +fn focus_left(_: ActionApi) -> Action +``` + +
+
+ + +
+ +
+Focus the view to the left of the current node. +
+ + +
+
+
+
+

fn focus_right

+ +```rust,ignore +fn focus_right(_: ActionApi) -> Action +``` + +
+
+ +
+ +
+Focus the view to the right of the current node. +
+ +
+
+
+
+

fn focus_up

+ +```rust,ignore +fn focus_up(_: ActionApi) -> Action +``` + +
+
+ +
+ +
+Focus the view above the current node. +
+ +
+
+
+
+

fn follow_output

+ +```rust,ignore +fn follow_output(_: ActionApi) -> Action +``` + +
+
+ +
+ +
+Re-enable following live output. +
+ +
+
+
+
+

fn insert_tab_after

+ +```rust,ignore +fn insert_tab_after(_: ActionApi, tabs_node_id: int, title: String, tree: TreeSpec) -> Action +``` + +
+
+ +
+ +
+Insert a tab after a specific tabs node. +
+ +
+
+
+
+

fn insert_tab_after_current

+ +```rust,ignore +fn insert_tab_after_current(_: ActionApi, title: String, tree: TreeSpec) -> Action +``` + +
+
+ +
+ +
+Insert a tab after the current tab in the focused tabs node. +
+ +
+
+
+
+

fn insert_tab_before

+ +```rust,ignore +fn insert_tab_before(_: ActionApi, tabs_node_id: int, title: String, tree: TreeSpec) -> Action +``` + +
+
+ +
+ +
+Insert a tab before a specific tabs node. +
+ +
+
+
+
+

fn insert_tab_before_current

+ +```rust,ignore +fn insert_tab_before_current(_: ActionApi, title: String, tree: TreeSpec) -> Action +``` + +
+
+ +
+ +
+Insert a tab before the current tab. +
+ +
+
+
+
+

fn kill_buffer

+ +```rust,ignore +fn kill_buffer(_: ActionApi) -> Action +``` + +
+
+ +
+ +
+Kill the currently focused buffer. +
+ +
+
+
+
+

fn kill_buffer_id

+ +```rust,ignore +fn kill_buffer_id(_: ActionApi, buffer_id: int) -> Action +``` + +
+
+ +
+ +
+Kill a buffer by id. +
+ +
+
+
+
+

fn leave_mode

+ +```rust,ignore +fn leave_mode(_: ActionApi) -> Action +``` + +
+
+ +
+ +
+Leave the active input mode. +
+ +
+
+
+
+

fn move_buffer_to_floating

+ +```rust,ignore +fn move_buffer_to_floating(_: ActionApi, buffer_id: int, options: Map) -> Action +``` + +
+
+ + +
+ +
+Move a buffer into a new floating window. +
+ + +
+
+
+
+

fn move_buffer_to_node

+ +```rust,ignore +fn move_buffer_to_node(_: ActionApi, buffer_id: int, node_id: int) -> Action +``` + +
+
+ +
+ +
+Move a buffer into a specific node. +
+ +
+
+
+
+

fn next_current_tabs

+ +```rust,ignore +fn next_current_tabs(_: ActionApi) -> Action +``` + +
+
+ +
+ +
+Select the next tab in the currently focused tabs node. +
+ +
+
+
+
+

fn next_tab

+ +```rust,ignore +fn next_tab(_: ActionApi, tabs_node_id: int) -> Action +``` + +
+
+ +
+ +
+Select the next tab in a specific tabs node. +
+ +
+
+
+
+

fn noop

+ +```rust,ignore +fn noop(_: ActionApi) -> Action +``` + +
+
+ +
+ +
+Build a no-op action. +
+ +
+
+
+
+

fn notify

+ +```rust,ignore +fn notify(_: ActionApi, level: String, message: String) -> Action +``` + +
+
+ +
+ +
+Emit a client notification. +
+ +
+
+
+
+

fn open_floating

+ +```rust,ignore +fn open_floating(_: ActionApi, tree: TreeSpec, options: Map) -> Action +``` + +
+
+ +
+ +
+Open a floating view around the provided tree. +
+ +
+
+
+
+

fn prev_current_tabs

+ +```rust,ignore +fn prev_current_tabs(_: ActionApi) -> Action +``` + +
+
+ +
+ +
+Select the previous tab in the currently focused tabs node. +
+ +
+
+
+
+

fn prev_tab

+ +```rust,ignore +fn prev_tab(_: ActionApi, tabs_node_id: int) -> Action +``` + +
+
+ +
+ +
+Select the previous tab in a specific tabs node. +
+ +
+
+
+
+

fn replace_current_with

+ +```rust,ignore +fn replace_current_with(_: ActionApi, tree: TreeSpec) -> Action +``` + +
+
+ +
+ +
+Replace the focused node with a new tree. +
+ +
+
+
+
+

fn replace_node

+ +```rust,ignore +fn replace_node(_: ActionApi, node_id: int, tree: TreeSpec) -> Action +``` + +
+
+ +
+ +
+Replace a specific node by id with a new tree. +
+ +
+
+
+
+

fn reveal_buffer

+ +```rust,ignore +fn reveal_buffer(_: ActionApi, buffer_id: int) -> Action +``` + +
+
+ +
+ +
+Reveal a specific buffer by id. +
+ +
+
+
+
+

fn run_named_action

+ +```rust,ignore +fn run_named_action(_: ActionApi, name: String) -> Action +``` + +
+
+ +
+ +
+Run another named action by name. +
+ +
+
+
+
+

fn scroll_line_down

+ +```rust,ignore +fn scroll_line_down(_: ActionApi) -> Action +``` + +
+
+ +
+ +
+Scroll one line downward in local scrollback. +
+ +
+
+
+
+

fn scroll_line_up

+ +```rust,ignore +fn scroll_line_up(_: ActionApi) -> Action +``` + +
+
+ +
+ +
+Scroll one line upward in local scrollback. +
+ +
+
+
+
+

fn scroll_page_down

+ +```rust,ignore +fn scroll_page_down(_: ActionApi) -> Action +``` + +
+
+ +
+ +
+Scroll one page downward in local scrollback. +
+ +
+
+
+
+

fn scroll_page_up

+ +```rust,ignore +fn scroll_page_up(_: ActionApi) -> Action +``` + +
+
+ +
+ +
+Scroll one page upward in local scrollback. +
+ +
+
+
+
+

fn scroll_to_bottom

+ +```rust,ignore +fn scroll_to_bottom(_: ActionApi) -> Action +``` + +
+
+ +
+ +
+Scroll to the bottom of local scrollback. +
+ +
+
+
+
+

fn scroll_to_top

+ +```rust,ignore +fn scroll_to_top(_: ActionApi) -> Action +``` + +
+
+ +
+ +
+Scroll to the top of local scrollback. +
+ +
+
+
+
+

fn search_next

+ +```rust,ignore +fn search_next(_: ActionApi) -> Action +``` + +
+
+ +
+ +
+Jump to the next search match. +
+ +
+
+
+
+

fn search_prev

+ +```rust,ignore +fn search_prev(_: ActionApi) -> Action +``` + +
+
+ +
+ +
+Jump to the previous search match. +
+ +
+
+
+
+

fn select_current_tabs

+ +```rust,ignore +fn select_current_tabs(_: ActionApi, index: int) -> Action +``` + +
+
+ +
+ +
+Select a tab by index in the currently focused tabs node. +
+ +
+
+
+
+

fn select_move_down

+ +```rust,ignore +fn select_move_down(_: ActionApi) -> Action +``` + +
+
+ +
+ +
+Move the active selection down. +
+ +
+
+
+
+

fn select_move_left

+ +```rust,ignore +fn select_move_left(_: ActionApi) -> Action +``` + +
+
+ +
+ +
+Move the active selection left. +
+ +
+
+
+
+

fn select_move_right

+ +```rust,ignore +fn select_move_right(_: ActionApi) -> Action +``` + +
+
+ +
+ +
+Move the active selection right. +
+ +
+
+
+
+

fn select_move_up

+ +```rust,ignore +fn select_move_up(_: ActionApi) -> Action +``` + +
+
+ +
+ +
+Move the active selection up. +
+ +
+
+
+
+

fn select_tab

+ +```rust,ignore +fn select_tab(_: ActionApi, tabs_node_id: int, index: int) -> Action +``` + +
+
+ +
+ +
+Select a tab by index in a specific tabs node. +
+ +
+
+
+
+

fn send_bytes

+ +```rust,ignore +fn send_bytes(_: ActionApi, buffer_id: int, bytes: String) -> Action +fn send_bytes(_: ActionApi, buffer_id: int, bytes: Array) -> Action +``` + +
+
+ +
+ +
+Send a string of bytes to a specific buffer. +
+ +
+
+
+
+

fn send_bytes_current

+ +```rust,ignore +fn send_bytes_current(_: ActionApi, bytes: String) -> Action +fn send_bytes_current(_: ActionApi, bytes: Array) -> Action +``` + +
+
+ +
+ +
+Send a string of bytes to the focused buffer. +
+ +
+
+
+
+

fn send_keys

+ +```rust,ignore +fn send_keys(_: ActionApi, buffer_id: int, notation: String) -> Action +``` + +
+
+ +
+ +
+Send a key notation sequence to a specific buffer. +
+ +
+
+
+
+

fn send_keys_current

+ +```rust,ignore +fn send_keys_current(_: ActionApi, notation: String) -> Action +``` + +
+
+ +
+ +
+Send a key notation sequence to the focused buffer. +
+ +
+
+
+
+

fn split_with

+ +```rust,ignore +fn split_with(_: ActionApi, direction: String, tree: TreeSpec) -> Action +``` + +
+
+ +
+ +
+Split the current node and attach the provided tree as the new sibling. +
+ +
+
+
+
+

fn toggle_mode

+ +```rust,ignore +fn toggle_mode(_: ActionApi, mode: String) -> Action +``` + +
+
+ +
+ +
+Toggle a named input mode. +
+ +
+
+
+
+

fn yank_selection

+ +```rust,ignore +fn yank_selection(_: ActionApi) -> Action +``` + +
+
+ +
+ +
+Copy the current selection into the clipboard. +
+ +
+
+
diff --git a/docs/config-api/book.toml b/docs/config-api/book.toml new file mode 100644 index 0000000..171a086 --- /dev/null +++ b/docs/config-api/book.toml @@ -0,0 +1,8 @@ +[book] +title = "Embers Config API" +language = "en" +src = "." + +[output.html] +default-theme = "light" +additional-js = ["theme/rhai-autodocs-tabs.js", "theme/rhai-highlight.js"] diff --git a/docs/config-api/buffer-ref.md b/docs/config-api/buffer-ref.md new file mode 100644 index 0000000..8682fcf --- /dev/null +++ b/docs/config-api/buffer-ref.md @@ -0,0 +1,429 @@ +# BufferRef + +```Namespace: global``` + +
+

fn activity

+ +```rust,ignore +fn activity(buffer: BufferRef) -> String +``` + +
+
+ +
+ +
+Return the current activity state name. +
+ +
+
+
+
+

fn command

+ +```rust,ignore +fn command(buffer: BufferRef) -> Array +``` + +
+
+ +
+ +
+Return the original command vector. +
+ +
+
+
+
+

fn cwd

+ +```rust,ignore +fn cwd(buffer: BufferRef) -> ? +``` + +
+
+ +
+ +
+Return the working directory, if any. + +ReturnType: `string | ()` +
+ +
+
+
+
+

fn env_hint

+ +```rust,ignore +fn env_hint(buffer: BufferRef, key: String) -> ? +``` + +
+
+ +
+ +
+Look up a single environment hint captured on the buffer. + +ReturnType: `string | ()` +
+ +
+
+
+
+

fn exit_code

+ +```rust,ignore +fn exit_code(buffer: BufferRef) -> ? +``` + +
+
+ +
+ +
+Return the process exit code, if any. + +ReturnType: `int | ()` +
+ +
+
+
+
+

fn history_text

+ +```rust,ignore +fn history_text(buffer: BufferRef) -> String +``` + +
+
+ + +
+ +
+Return the full captured history text for the buffer. +
+ + +
+
+
+
+

fn id

+ +```rust,ignore +fn id(buffer: BufferRef) -> int +``` + +
+
+ +
+ +
+Return the numeric buffer id. +
+ +
+
+
+
+

fn is_attached

+ +```rust,ignore +fn is_attached(buffer: BufferRef) -> bool +``` + +
+
+ +
+ +
+Return whether the buffer is currently attached to a node. +
+ +
+
+
+
+

fn is_detached

+ +```rust,ignore +fn is_detached(buffer: BufferRef) -> bool +``` + +
+
+ +
+ +
+Return whether the buffer has been detached. +
+ +
+
+
+
+

fn is_running

+ +```rust,ignore +fn is_running(buffer: BufferRef) -> bool +``` + +
+
+ +
+ +
+Return whether the buffer process is still running. +
+ +
+
+
+
+

fn is_visible

+ +```rust,ignore +fn is_visible(buffer: BufferRef) -> bool +``` + +
+
+ +
+ +
+Return whether the buffer is visible in the current presentation. +
+ +
+
+
+
+

fn node_id

+ +```rust,ignore +fn node_id(buffer: BufferRef) -> ? +``` + +
+
+ +
+ +
+Return the attached node id, if any. + +ReturnType: `int | ()` +
+ +
+
+
+
+

fn pid

+ +```rust,ignore +fn pid(buffer: BufferRef) -> ? +``` + +
+
+ +
+ +
+Return the process id, if any. + +ReturnType: `int | ()` +
+ +
+
+
+
+

fn process_name

+ +```rust,ignore +fn process_name(buffer: BufferRef) -> ? +``` + +
+
+ +
+ +
+Return the detected process name, if any. + +ReturnType: `string | ()` +
+ +
+
+
+
+

fn session_id

+ +```rust,ignore +fn session_id(buffer: BufferRef) -> ? +``` + +
+
+ +
+ +
+Return the attached session id, if any. + +ReturnType: `int | ()` +
+ +
+
+
+
+

fn snapshot_text

+ +```rust,ignore +fn snapshot_text(buffer: BufferRef, limit: int) -> String +``` + +
+
+ +
+ +
+Return a text snapshot limited to the requested line count. +
+ +
+
+
+
+

fn title

+ +```rust,ignore +fn title(buffer: BufferRef) -> String +``` + +
+
+ +
+ +
+Return the buffer title. +
+ +
+
+
+
+

fn tty_path

+ +```rust,ignore +fn tty_path(buffer: BufferRef) -> ? +``` + +
+
+ +
+ +
+Return the controlling TTY path, if any. + +ReturnType: `string | ()` +
+ +
+
+
diff --git a/docs/config-api/context.md b/docs/config-api/context.md new file mode 100644 index 0000000..34a8ba7 --- /dev/null +++ b/docs/config-api/context.md @@ -0,0 +1,297 @@ +# Context + +```Namespace: global``` + +
+

fn current_buffer

+ +```rust,ignore +fn current_buffer(context: Context) -> ? +``` + +
+
+ + +
+ +
+Return the currently focused buffer, if any. + +ReturnType: `BufferRef | ()` +
+ + +
+
+
+
+

fn current_floating

+ +```rust,ignore +fn current_floating(context: Context) -> ? +``` + +
+
+ +
+ +
+Return the currently focused floating window, if any. + +ReturnType: `FloatingRef | ()` +
+ +
+
+
+
+

fn current_mode

+ +```rust,ignore +fn current_mode(context: Context) -> String +``` + +
+
+ +
+ +
+Return the active input mode name. +
+ +
+
+
+
+

fn current_node

+ +```rust,ignore +fn current_node(context: Context) -> ? +``` + +
+
+ +
+ +
+Return the currently focused node, if any. + +ReturnType: `NodeRef | ()` +
+ +
+
+
+
+

fn current_session

+ +```rust,ignore +fn current_session(context: Context) -> ? +``` + +
+
+ +
+ +
+Return the current session reference, if any. + +ReturnType: `SessionRef | ()` +
+ +
+
+
+
+

fn detached_buffers

+ +```rust,ignore +fn detached_buffers(context: Context) -> Array +``` + +
+
+ +
+ +
+Return detached buffers in the current model snapshot. +
+ +
+
+
+
+

fn event

+ +```rust,ignore +fn event(context: Context) -> ? +``` + +
+
+ +
+ +
+Return the current event payload, if any. + +ReturnType: `EventInfo | ()` +
+ +
+
+
+
+

fn find_buffer

+ +```rust,ignore +fn find_buffer(context: Context, buffer_id: int) -> ? +``` + +
+
+ +
+ +
+Find a buffer by numeric id. Returns `()` when it does not exist. + +ReturnType: `BufferRef | ()` +
+ +
+
+
+
+

fn find_floating

+ +```rust,ignore +fn find_floating(context: Context, floating_id: int) -> ? +``` + +
+
+ +
+ +
+Find a floating window by numeric id. Returns `()` when it does not exist. + +ReturnType: `FloatingRef | ()` +
+ +
+
+
+
+

fn find_node

+ +```rust,ignore +fn find_node(context: Context, node_id: int) -> ? +``` + +
+
+ +
+ +
+Find a node by numeric id. Returns `()` when it does not exist. + +ReturnType: `NodeRef | ()` +
+ +
+
+
+
+

fn sessions

+ +```rust,ignore +fn sessions(context: Context) -> Array +``` + +
+
+ +
+ +
+Return every visible session. +
+ +
+
+
+
+

fn visible_buffers

+ +```rust,ignore +fn visible_buffers(context: Context) -> Array +``` + +
+
+ +
+ +
+Return visible buffers in the current model snapshot. +
+ +
+
+
diff --git a/docs/config-api/defs/registration.rhai b/docs/config-api/defs/registration.rhai new file mode 100644 index 0000000..752c140 --- /dev/null +++ b/docs/config-api/defs/registration.rhai @@ -0,0 +1,402 @@ +module static; + + + +/// Build a full bar specification from left, center, and right segments. +fn bar(_: UiApi, left: array, center: array, right: array) -> BarSpec; + +/// Create a [`BarSegment`] from a [`UiApi`] receiver and text using default styling. +/// +/// `segment(_: UiApi, text: String) -> BarSegment` produces plain text with default +/// [`StyleSpec`] values and no click target. +fn segment(_: UiApi, text: string) -> BarSegment; + +/// Create a [`BarSegment`] from a [`UiApi`] receiver, text, and an `options: Map`. +/// +/// `segment(_: UiApi, text: String, options: Map) -> BarSegment` supports `fg`, `bg`, +/// `bold`, `italic`, `underline`, `dim`, and `target` keys to override styling and attach an +/// optional interaction target. `dim` is a boolean that renders the text with reduced +/// intensity for a muted appearance. +fn segment(_: UiApi, text: string, options: map) -> BarSegment; + +/// Read an environment variable, if it is set. +/// +/// ReturnType: `string | ()` +fn env(_: SystemApi, name: string) -> ?; + +/// Return the current Unix timestamp in seconds. +fn now(_: SystemApi) -> int; + +/// Resolve an executable from `PATH`, if it is found. +/// +/// ReturnType: `string | ()` +fn which(_: SystemApi, name: string) -> ?; + +/// Attach an existing buffer by id. +fn buffer_attach(_: TreeApi, buffer_id: int) -> TreeSpec; + +/// Build a tree reference to the currently focused buffer. +fn buffer_current(_: TreeApi) -> TreeSpec; + +/// Build an empty buffer tree node. +fn buffer_empty(_: TreeApi) -> TreeSpec; + +/// Spawn a new buffer from a command array. +/// +/// Supported `options` keys are `title` (`string`), `cwd` (`string`), and `env` +/// (`map`). Unknown keys are rejected. +/// +/// # Example +/// +/// ```rhai +/// tree.buffer_spawn(["/bin/zsh"], #{ title: "shell" }) +/// ``` +fn buffer_spawn(_: TreeApi, command: array) -> TreeSpec; + +fn buffer_spawn(_: TreeApi, command: array, options: map) -> TreeSpec; + +/// Build a tree reference to the currently focused buffer. +fn current_buffer(_: TreeApi) -> TreeSpec; + +/// Build a tree reference to the currently focused node. +fn current_node(_: TreeApi) -> TreeSpec; + +/// Build a split with an explicit direction string. +fn split(_: TreeApi, direction: string, children: array) -> TreeSpec; + +/// Build a split with explicit sizes for each child. +fn split(_: TreeApi, direction: string, children: array, sizes: array) -> TreeSpec; + +/// Build a horizontal split. +fn split_h(_: TreeApi, children: array) -> TreeSpec; + +/// Build a vertical split. +fn split_v(_: TreeApi, children: array) -> TreeSpec; + +/// Build a single tab specification. +fn tab(_: TreeApi, title: string, tree: TreeSpec) -> TabSpec; + +/// Build a tabs container with the first tab active. +fn tabs(_: TreeApi, tabs: array) -> TreeSpec; + +/// Build a tabs container with an explicit active tab. +fn tabs_with_active(_: TreeApi, tabs: array, active: int) -> TreeSpec; + +/// Cancel the active search. +fn cancel_search(_: ActionApi) -> Action; + +/// Cancel the current selection. +fn cancel_selection(_: ActionApi) -> Action; + +/// Chain multiple actions into one composite action. +fn chain(_: ActionApi, actions: array) -> Action; + +/// Clear any partially-entered key sequence. +fn clear_pending_keys(_: ActionApi) -> Action; + +/// Close the currently focused floating window. +fn close_floating(_: ActionApi) -> Action; + +/// Close a floating window by id. +fn close_floating_id(_: ActionApi, floating_id: int) -> Action; + +/// Close a view by node id. +fn close_node(_: ActionApi, node_id: int) -> Action; + +/// Close the currently focused view. +fn close_view(_: ActionApi) -> Action; + +/// Copy the current selection into the clipboard. +fn copy_selection(_: ActionApi) -> Action; + +/// Detach the currently focused buffer. +fn detach_buffer(_: ActionApi) -> Action; + +/// Detach a buffer by id. +fn detach_buffer_id(_: ActionApi, buffer_id: int) -> Action; + +/// Enter a specific input mode by name. +fn enter_mode(_: ActionApi, mode: string) -> Action; + +/// Enter incremental search mode. +fn enter_search_mode(_: ActionApi) -> Action; + +/// Enter block selection mode. +fn enter_select_block(_: ActionApi) -> Action; + +/// Enter character selection mode. +fn enter_select_char(_: ActionApi) -> Action; + +/// Enter line selection mode. +fn enter_select_line(_: ActionApi) -> Action; + +/// Focus a specific buffer by id. +fn focus_buffer(_: ActionApi, buffer_id: int) -> Action; + +/// Focus the view below the current node. +fn focus_down(_: ActionApi) -> Action; + +/// Focus the view to the left of the current node. +/// +/// # Example +/// +/// ```rhai +/// action.focus_left() +/// ``` +fn focus_left(_: ActionApi) -> Action; + +/// Focus the view to the right of the current node. +fn focus_right(_: ActionApi) -> Action; + +/// Focus the view above the current node. +fn focus_up(_: ActionApi) -> Action; + +/// Re-enable following live output. +fn follow_output(_: ActionApi) -> Action; + +/// Insert a tab after a specific tabs node. +fn insert_tab_after(_: ActionApi, tabs_node_id: int, title: string, tree: TreeSpec) -> Action; + +/// Insert a tab after the current tab in the focused tabs node. +fn insert_tab_after_current(_: ActionApi, title: string, tree: TreeSpec) -> Action; + +/// Insert a tab before a specific tabs node. +fn insert_tab_before(_: ActionApi, tabs_node_id: int, title: string, tree: TreeSpec) -> Action; + +/// Insert a tab before the current tab. +fn insert_tab_before_current(_: ActionApi, title: string, tree: TreeSpec) -> Action; + +/// Kill the currently focused buffer. +fn kill_buffer(_: ActionApi) -> Action; + +/// Kill a buffer by id. +fn kill_buffer_id(_: ActionApi, buffer_id: int) -> Action; + +/// Leave the active input mode. +fn leave_mode(_: ActionApi) -> Action; + +/// Move a buffer into a new floating window. +/// +/// # Options +/// +/// - `x` (i16): horizontal offset from the anchor (default: 0) +/// - `y` (i16): vertical offset from the anchor (default: 0) +/// - `width` (FloatingSize): window width, as a percentage (e.g., 50%) or pixel value (default: 50%) +/// - `height` (FloatingSize): window height, as a percentage or pixel value (default: 50%) +/// - `anchor` (FloatingAnchor): anchor point for positioning, e.g., "top_left", "center" (default: center) +/// - `title` (Option\): window title (default: none) +/// - `focus` (bool): whether to focus the window after creation (default: true) +/// - `close_on_empty` (bool): whether to close the window when its buffer empties (default: true) +fn move_buffer_to_floating(_: ActionApi, buffer_id: int, options: map) -> Action; + +/// Move a buffer into a specific node. +fn move_buffer_to_node(_: ActionApi, buffer_id: int, node_id: int) -> Action; + +/// Select the next tab in the currently focused tabs node. +fn next_current_tabs(_: ActionApi) -> Action; + +/// Select the next tab in a specific tabs node. +fn next_tab(_: ActionApi, tabs_node_id: int) -> Action; + +/// Build a no-op action. +fn noop(_: ActionApi) -> Action; + +/// Emit a client notification. +fn notify(_: ActionApi, level: string, message: string) -> Action; + +/// Open a floating view around the provided tree. +fn open_floating(_: ActionApi, tree: TreeSpec, options: map) -> Action; + +/// Select the previous tab in the currently focused tabs node. +fn prev_current_tabs(_: ActionApi) -> Action; + +/// Select the previous tab in a specific tabs node. +fn prev_tab(_: ActionApi, tabs_node_id: int) -> Action; + +/// Replace the focused node with a new tree. +fn replace_current_with(_: ActionApi, tree: TreeSpec) -> Action; + +/// Replace a specific node by id with a new tree. +fn replace_node(_: ActionApi, node_id: int, tree: TreeSpec) -> Action; + +/// Reveal a specific buffer by id. +fn reveal_buffer(_: ActionApi, buffer_id: int) -> Action; + +/// Run another named action by name. +fn run_named_action(_: ActionApi, name: string) -> Action; + +/// Scroll one line downward in local scrollback. +fn scroll_line_down(_: ActionApi) -> Action; + +/// Scroll one line upward in local scrollback. +fn scroll_line_up(_: ActionApi) -> Action; + +/// Scroll one page downward in local scrollback. +fn scroll_page_down(_: ActionApi) -> Action; + +/// Scroll one page upward in local scrollback. +fn scroll_page_up(_: ActionApi) -> Action; + +/// Scroll to the bottom of local scrollback. +fn scroll_to_bottom(_: ActionApi) -> Action; + +/// Scroll to the top of local scrollback. +fn scroll_to_top(_: ActionApi) -> Action; + +/// Jump to the next search match. +fn search_next(_: ActionApi) -> Action; + +/// Jump to the previous search match. +fn search_prev(_: ActionApi) -> Action; + +/// Select a tab by index in the currently focused tabs node. +fn select_current_tabs(_: ActionApi, index: int) -> Action; + +/// Move the active selection down. +fn select_move_down(_: ActionApi) -> Action; + +/// Move the active selection left. +fn select_move_left(_: ActionApi) -> Action; + +/// Move the active selection right. +fn select_move_right(_: ActionApi) -> Action; + +/// Move the active selection up. +fn select_move_up(_: ActionApi) -> Action; + +/// Select a tab by index in a specific tabs node. +fn select_tab(_: ActionApi, tabs_node_id: int, index: int) -> Action; + +/// Send a string of bytes to a specific buffer. +fn send_bytes(_: ActionApi, buffer_id: int, bytes: string) -> Action; + +/// Send raw byte values to a specific buffer. +fn send_bytes(_: ActionApi, buffer_id: int, bytes: array) -> Action; + +/// Send a string of bytes to the focused buffer. +fn send_bytes_current(_: ActionApi, bytes: string) -> Action; + +/// Send raw byte values to the focused buffer. +/// +/// Use this when you need to emit an exact byte sequence instead of key notation. +/// +/// # Example +/// +/// ```rhai +/// // Send the ANSI "cursor up" sequence: ESC [ A +/// action.send_bytes_current([0x1b, 0x5b, 0x41]) +/// ``` +fn send_bytes_current(_: ActionApi, bytes: array) -> Action; + +/// Send a key notation sequence to a specific buffer. +fn send_keys(_: ActionApi, buffer_id: int, notation: string) -> Action; + +/// Send a key notation sequence to the focused buffer. +fn send_keys_current(_: ActionApi, notation: string) -> Action; + +/// Split the current node and attach the provided tree as the new sibling. +fn split_with(_: ActionApi, direction: string, tree: TreeSpec) -> Action; + +/// Toggle a named input mode. +fn toggle_mode(_: ActionApi, mode: string) -> Action; + +/// Copy the current selection into the clipboard. +fn yank_selection(_: ActionApi) -> Action; + +/// Toggle focus-on-click behavior. +/// +/// # rhai-autodocs:index:22 +fn set_click_focus(mouse: MouseApi, value: bool) -> (); + +/// Toggle forwarding mouse clicks into the focused buffer. +/// +/// # rhai-autodocs:index:23 +fn set_click_forward(mouse: MouseApi, value: bool) -> (); + +/// Toggle wheel event forwarding into the focused buffer. +/// +/// # rhai-autodocs:index:25 +fn set_wheel_forward(mouse: MouseApi, value: bool) -> (); + +/// Toggle client-side wheel scrolling. +/// +/// # rhai-autodocs:index:24 +fn set_wheel_scroll(mouse: MouseApi, value: bool) -> (); + +/// Add named colors to the theme palette. +/// +/// # rhai-autodocs:index:21 +fn set_palette(theme: ThemeApi, palette: map) -> (); + +/// Register the function used to format the tab bar. +/// +/// # rhai-autodocs:index:20 +fn set_formatter(tabbar: TabbarApi, callback: Fn) -> (); + +fn bind(mode: string, notation: string, action: Action) -> (); + +/// Bind a key notation to an [`Action`], a string action name, or an array of actions. +/// +/// Use the `Action` overload for inline builders such as `action.focus_left()`, the string +/// overload for a named action registered with `define_action`, or an array to chain multiple +/// actions in sequence. +/// +/// # Example +/// +/// ```rhai +/// bind("normal", "ws", "workspace-split"); +/// ``` +/// +/// # rhai-autodocs:index:4 +fn bind(mode: string, notation: string, action_name: string) -> (); + +fn bind(mode: string, notation: string, actions: array) -> (); + +/// Register a function pointer as a named action callable from bindings. +/// +/// # rhai-autodocs:index:6 +fn define_action(name: string, callback: Fn) -> (); + +fn define_mode(mode_name: string) -> (); + +/// Define a custom input mode with hooks and fallback options. +/// +/// Supported options are `fallback`, `on_enter`, and `on_leave`. +/// +/// # rhai-autodocs:index:3 +fn define_mode(mode_name: string, options: map) -> (); + +/// Attach a callback to an emitted event such as `buffer_bell`. +/// +/// # rhai-autodocs:index:7 +fn on(event_name: string, callback: Fn) -> (); + +/// Set the leader sequence used in binding notations. +/// +/// # Example +/// +/// ```rhai +/// set_leader(""); +/// ``` +/// +/// # rhai-autodocs:index:1 +fn set_leader(notation: string) -> (); + +/// Remove a previously bound key sequence. +/// +/// # rhai-autodocs:index:5 +fn unbind(mode: string, notation: string) -> (); + +let system: SystemApi; + +let action: ActionApi; + +let tree: TreeApi; + +let ui: UiApi; + +let tabbar: TabbarApi; + +let theme: ThemeApi; + +let mouse: MouseApi; diff --git a/docs/config-api/defs/runtime.rhai b/docs/config-api/defs/runtime.rhai new file mode 100644 index 0000000..0063e88 --- /dev/null +++ b/docs/config-api/defs/runtime.rhai @@ -0,0 +1,656 @@ +module static; + + + +/// Read a named color from the active runtime palette, if it exists. +/// +/// ReturnType: `RgbColor | ()` +fn color(theme: ThemeRuntimeApi, name: string) -> ?; + +/// Build a full bar specification from left, center, and right segments. +fn bar(_: UiApi, left: array, center: array, right: array) -> BarSpec; + +/// Create a [`BarSegment`] from a [`UiApi`] receiver and text using default styling. +/// +/// `segment(_: UiApi, text: String) -> BarSegment` produces plain text with default +/// [`StyleSpec`] values and no click target. +fn segment(_: UiApi, text: string) -> BarSegment; + +/// Create a [`BarSegment`] from a [`UiApi`] receiver, text, and an `options: Map`. +/// +/// `segment(_: UiApi, text: String, options: Map) -> BarSegment` supports `fg`, `bg`, +/// `bold`, `italic`, `underline`, `dim`, and `target` keys to override styling and attach an +/// optional interaction target. `dim` is a boolean that renders the text with reduced +/// intensity for a muted appearance. +fn segment(_: UiApi, text: string, options: map) -> BarSegment; + +/// Read an environment variable, if it is set. +/// +/// ReturnType: `string | ()` +fn env(_: SystemApi, name: string) -> ?; + +/// Return the current Unix timestamp in seconds. +fn now(_: SystemApi) -> int; + +/// Resolve an executable from `PATH`, if it is found. +/// +/// ReturnType: `string | ()` +fn which(_: SystemApi, name: string) -> ?; + +/// Return the currently focused buffer, if any. +/// +/// ReturnType: `BufferRef | ()` +fn current_buffer(mux: MuxApi) -> ?; + +/// Return the currently focused floating window, if any. +/// +/// ReturnType: `FloatingRef | ()` +fn current_floating(mux: MuxApi) -> ?; + +/// Return the currently focused node, if any. +/// +/// ReturnType: `NodeRef | ()` +fn current_node(mux: MuxApi) -> ?; + +/// Return the current session reference, if any. +/// +/// ReturnType: `SessionRef | ()` +fn current_session(mux: MuxApi) -> ?; + +/// Return detached buffers in the current model snapshot. +fn detached_buffers(mux: MuxApi) -> array; + +/// Find a buffer by numeric id. Returns `()` when it does not exist. +/// +/// ReturnType: `BufferRef | ()` +fn find_buffer(mux: MuxApi, buffer_id: int) -> ?; + +/// Find a floating window by numeric id. Returns `()` when it does not exist. +/// +/// ReturnType: `FloatingRef | ()` +fn find_floating(mux: MuxApi, floating_id: int) -> ?; + +/// Find a node by numeric id. Returns `()` when it does not exist. +/// +/// ReturnType: `NodeRef | ()` +fn find_node(mux: MuxApi, node_id: int) -> ?; + +/// Return every visible session. +fn sessions(mux: MuxApi) -> array; + +/// Return visible buffers in the current model snapshot. +fn visible_buffers(mux: MuxApi) -> array; + +/// Attach an existing buffer by id. +fn buffer_attach(_: TreeApi, buffer_id: int) -> TreeSpec; + +/// Build a tree reference to the currently focused buffer. +fn buffer_current(_: TreeApi) -> TreeSpec; + +/// Build an empty buffer tree node. +fn buffer_empty(_: TreeApi) -> TreeSpec; + +/// Spawn a new buffer from a command array. +/// +/// Supported `options` keys are `title` (`string`), `cwd` (`string`), and `env` +/// (`map`). Unknown keys are rejected. +/// +/// # Example +/// +/// ```rhai +/// tree.buffer_spawn(["/bin/zsh"], #{ title: "shell" }) +/// ``` +fn buffer_spawn(_: TreeApi, command: array) -> TreeSpec; + +fn buffer_spawn(_: TreeApi, command: array, options: map) -> TreeSpec; + +/// Build a tree reference to the currently focused buffer. +fn current_buffer(_: TreeApi) -> TreeSpec; + +/// Build a tree reference to the currently focused node. +fn current_node(_: TreeApi) -> TreeSpec; + +/// Build a split with an explicit direction string. +fn split(_: TreeApi, direction: string, children: array) -> TreeSpec; + +/// Build a split with explicit sizes for each child. +fn split(_: TreeApi, direction: string, children: array, sizes: array) -> TreeSpec; + +/// Build a horizontal split. +fn split_h(_: TreeApi, children: array) -> TreeSpec; + +/// Build a vertical split. +fn split_v(_: TreeApi, children: array) -> TreeSpec; + +/// Build a single tab specification. +fn tab(_: TreeApi, title: string, tree: TreeSpec) -> TabSpec; + +/// Build a tabs container with the first tab active. +fn tabs(_: TreeApi, tabs: array) -> TreeSpec; + +/// Build a tabs container with an explicit active tab. +fn tabs_with_active(_: TreeApi, tabs: array, active: int) -> TreeSpec; + +/// Cancel the active search. +fn cancel_search(_: ActionApi) -> Action; + +/// Cancel the current selection. +fn cancel_selection(_: ActionApi) -> Action; + +/// Chain multiple actions into one composite action. +fn chain(_: ActionApi, actions: array) -> Action; + +/// Clear any partially-entered key sequence. +fn clear_pending_keys(_: ActionApi) -> Action; + +/// Close the currently focused floating window. +fn close_floating(_: ActionApi) -> Action; + +/// Close a floating window by id. +fn close_floating_id(_: ActionApi, floating_id: int) -> Action; + +/// Close a view by node id. +fn close_node(_: ActionApi, node_id: int) -> Action; + +/// Close the currently focused view. +fn close_view(_: ActionApi) -> Action; + +/// Copy the current selection into the clipboard. +fn copy_selection(_: ActionApi) -> Action; + +/// Detach the currently focused buffer. +fn detach_buffer(_: ActionApi) -> Action; + +/// Detach a buffer by id. +fn detach_buffer_id(_: ActionApi, buffer_id: int) -> Action; + +/// Enter a specific input mode by name. +fn enter_mode(_: ActionApi, mode: string) -> Action; + +/// Enter incremental search mode. +fn enter_search_mode(_: ActionApi) -> Action; + +/// Enter block selection mode. +fn enter_select_block(_: ActionApi) -> Action; + +/// Enter character selection mode. +fn enter_select_char(_: ActionApi) -> Action; + +/// Enter line selection mode. +fn enter_select_line(_: ActionApi) -> Action; + +/// Focus a specific buffer by id. +fn focus_buffer(_: ActionApi, buffer_id: int) -> Action; + +/// Focus the view below the current node. +fn focus_down(_: ActionApi) -> Action; + +/// Focus the view to the left of the current node. +/// +/// # Example +/// +/// ```rhai +/// action.focus_left() +/// ``` +fn focus_left(_: ActionApi) -> Action; + +/// Focus the view to the right of the current node. +fn focus_right(_: ActionApi) -> Action; + +/// Focus the view above the current node. +fn focus_up(_: ActionApi) -> Action; + +/// Re-enable following live output. +fn follow_output(_: ActionApi) -> Action; + +/// Insert a tab after a specific tabs node. +fn insert_tab_after(_: ActionApi, tabs_node_id: int, title: string, tree: TreeSpec) -> Action; + +/// Insert a tab after the current tab in the focused tabs node. +fn insert_tab_after_current(_: ActionApi, title: string, tree: TreeSpec) -> Action; + +/// Insert a tab before a specific tabs node. +fn insert_tab_before(_: ActionApi, tabs_node_id: int, title: string, tree: TreeSpec) -> Action; + +/// Insert a tab before the current tab. +fn insert_tab_before_current(_: ActionApi, title: string, tree: TreeSpec) -> Action; + +/// Kill the currently focused buffer. +fn kill_buffer(_: ActionApi) -> Action; + +/// Kill a buffer by id. +fn kill_buffer_id(_: ActionApi, buffer_id: int) -> Action; + +/// Leave the active input mode. +fn leave_mode(_: ActionApi) -> Action; + +/// Move a buffer into a new floating window. +/// +/// # Options +/// +/// - `x` (i16): horizontal offset from the anchor (default: 0) +/// - `y` (i16): vertical offset from the anchor (default: 0) +/// - `width` (FloatingSize): window width, as a percentage (e.g., 50%) or pixel value (default: 50%) +/// - `height` (FloatingSize): window height, as a percentage or pixel value (default: 50%) +/// - `anchor` (FloatingAnchor): anchor point for positioning, e.g., "top_left", "center" (default: center) +/// - `title` (Option\): window title (default: none) +/// - `focus` (bool): whether to focus the window after creation (default: true) +/// - `close_on_empty` (bool): whether to close the window when its buffer empties (default: true) +fn move_buffer_to_floating(_: ActionApi, buffer_id: int, options: map) -> Action; + +/// Move a buffer into a specific node. +fn move_buffer_to_node(_: ActionApi, buffer_id: int, node_id: int) -> Action; + +/// Select the next tab in the currently focused tabs node. +fn next_current_tabs(_: ActionApi) -> Action; + +/// Select the next tab in a specific tabs node. +fn next_tab(_: ActionApi, tabs_node_id: int) -> Action; + +/// Build a no-op action. +fn noop(_: ActionApi) -> Action; + +/// Emit a client notification. +fn notify(_: ActionApi, level: string, message: string) -> Action; + +/// Open a floating view around the provided tree. +fn open_floating(_: ActionApi, tree: TreeSpec, options: map) -> Action; + +/// Select the previous tab in the currently focused tabs node. +fn prev_current_tabs(_: ActionApi) -> Action; + +/// Select the previous tab in a specific tabs node. +fn prev_tab(_: ActionApi, tabs_node_id: int) -> Action; + +/// Replace the focused node with a new tree. +fn replace_current_with(_: ActionApi, tree: TreeSpec) -> Action; + +/// Replace a specific node by id with a new tree. +fn replace_node(_: ActionApi, node_id: int, tree: TreeSpec) -> Action; + +/// Reveal a specific buffer by id. +fn reveal_buffer(_: ActionApi, buffer_id: int) -> Action; + +/// Run another named action by name. +fn run_named_action(_: ActionApi, name: string) -> Action; + +/// Scroll one line downward in local scrollback. +fn scroll_line_down(_: ActionApi) -> Action; + +/// Scroll one line upward in local scrollback. +fn scroll_line_up(_: ActionApi) -> Action; + +/// Scroll one page downward in local scrollback. +fn scroll_page_down(_: ActionApi) -> Action; + +/// Scroll one page upward in local scrollback. +fn scroll_page_up(_: ActionApi) -> Action; + +/// Scroll to the bottom of local scrollback. +fn scroll_to_bottom(_: ActionApi) -> Action; + +/// Scroll to the top of local scrollback. +fn scroll_to_top(_: ActionApi) -> Action; + +/// Jump to the next search match. +fn search_next(_: ActionApi) -> Action; + +/// Jump to the previous search match. +fn search_prev(_: ActionApi) -> Action; + +/// Select a tab by index in the currently focused tabs node. +fn select_current_tabs(_: ActionApi, index: int) -> Action; + +/// Move the active selection down. +fn select_move_down(_: ActionApi) -> Action; + +/// Move the active selection left. +fn select_move_left(_: ActionApi) -> Action; + +/// Move the active selection right. +fn select_move_right(_: ActionApi) -> Action; + +/// Move the active selection up. +fn select_move_up(_: ActionApi) -> Action; + +/// Select a tab by index in a specific tabs node. +fn select_tab(_: ActionApi, tabs_node_id: int, index: int) -> Action; + +/// Send a string of bytes to a specific buffer. +fn send_bytes(_: ActionApi, buffer_id: int, bytes: string) -> Action; + +/// Send raw byte values to a specific buffer. +fn send_bytes(_: ActionApi, buffer_id: int, bytes: array) -> Action; + +/// Send a string of bytes to the focused buffer. +fn send_bytes_current(_: ActionApi, bytes: string) -> Action; + +/// Send raw byte values to the focused buffer. +/// +/// Use this when you need to emit an exact byte sequence instead of key notation. +/// +/// # Example +/// +/// ```rhai +/// // Send the ANSI "cursor up" sequence: ESC [ A +/// action.send_bytes_current([0x1b, 0x5b, 0x41]) +/// ``` +fn send_bytes_current(_: ActionApi, bytes: array) -> Action; + +/// Send a key notation sequence to a specific buffer. +fn send_keys(_: ActionApi, buffer_id: int, notation: string) -> Action; + +/// Send a key notation sequence to the focused buffer. +fn send_keys_current(_: ActionApi, notation: string) -> Action; + +/// Split the current node and attach the provided tree as the new sibling. +fn split_with(_: ActionApi, direction: string, tree: TreeSpec) -> Action; + +/// Toggle a named input mode. +fn toggle_mode(_: ActionApi, mode: string) -> Action; + +/// Copy the current selection into the clipboard. +fn yank_selection(_: ActionApi) -> Action; + +/// Return the active tab index. +fn active_index(bar: TabBarContext) -> int; + +/// Return the active tab index, if any. +/// +/// ReturnType: `int | ()` +fn active_tab_index(node: NodeRef) -> ?; + +/// Return the current activity state name. +fn activity(buffer: BufferRef) -> String; + +/// Return the attached buffer id, if any. +/// +/// ReturnType: `int | ()` +fn buffer(node: NodeRef) -> ?; + +/// Return how many buffers are attached to the tab. +fn buffer_count(tab: TabInfo) -> int; + +/// Return the buffer id attached to an event, or `()`. +/// +/// ReturnType: `int | ()` +fn buffer_id(event: EventInfo) -> ?; + +/// Return child node ids. +fn children(node: NodeRef) -> array; + +/// Return the original command vector. +fn command(buffer: BufferRef) -> array; + +/// Return the working directory, if any. +/// +/// ReturnType: `string | ()` +fn cwd(buffer: BufferRef) -> ?; + +/// Look up a single environment hint captured on the buffer. +/// +/// ReturnType: `string | ()` +fn env_hint(buffer: BufferRef, key: string) -> ?; + +/// Return the process exit code, if any. +/// +/// ReturnType: `int | ()` +fn exit_code(buffer: BufferRef) -> ?; + +/// Return floating window ids attached to the session. +fn floating(session: SessionRef) -> array; + +/// Return the floating id attached to an event, or `()`. +/// +/// ReturnType: `int | ()` +fn floating_id(event: EventInfo) -> ?; + +/// Return the floating geometry map. +fn geometry(floating: FloatingRef) -> map; + +/// Return the geometry map, if any. +/// +/// ReturnType: `Map | ()` +fn geometry(node: NodeRef) -> ?; + +/// Return whether the tab has activity. +fn has_activity(tab: TabInfo) -> bool; + +/// Return whether the tab has a bell marker. +fn has_bell(tab: TabInfo) -> bool; + +/// Return the full captured history text for the buffer. +/// +/// # Example +/// +/// ```rhai +/// let buffer = ctx.current_buffer(); +/// if buffer != () { +/// let history = buffer.history_text(); +/// } +/// ``` +fn history_text(buffer: BufferRef) -> String; + +/// Return the numeric buffer id. +fn id(buffer: BufferRef) -> int; + +/// Return the floating id. +fn id(floating: FloatingRef) -> int; + +/// Return the node id. +fn id(node: NodeRef) -> int; + +/// Return the numeric session id. +fn id(session: SessionRef) -> int; + +/// Return the zero-based tab index. +fn index(tab: TabInfo) -> int; + +/// Return whether the tab is active. +fn is_active(tab: TabInfo) -> bool; + +/// Return whether the buffer is currently attached to a node. +fn is_attached(buffer: BufferRef) -> bool; + +/// Return whether the buffer has been detached. +fn is_detached(buffer: BufferRef) -> bool; + +/// Return whether the node is the root of a floating window. +fn is_floating_root(node: NodeRef) -> bool; + +/// Return whether the floating is focused. +fn is_focused(floating: FloatingRef) -> bool; + +/// Return whether the node is focused. +fn is_focused(node: NodeRef) -> bool; + +/// Return whether the formatted tabs are the root tabs. +fn is_root(bar: TabBarContext) -> bool; + +/// Return whether the node is the session root. +fn is_root(node: NodeRef) -> bool; + +/// Return whether the buffer process is still running. +fn is_running(buffer: BufferRef) -> bool; + +/// Return whether the buffer is visible in the current presentation. +fn is_visible(buffer: BufferRef) -> bool; + +/// Return whether the floating is visible. +fn is_visible(floating: FloatingRef) -> bool; + +/// Return whether the node is visible in the current presentation. +fn is_visible(node: NodeRef) -> bool; + +/// Return the node kind such as `buffer_view`, `split`, or `tabs`. +fn kind(node: NodeRef) -> String; + +/// Return the formatter mode name. +fn mode(bar: TabBarContext) -> String; + +/// Return the event name. +fn name(event: EventInfo) -> String; + +/// Return the session name. +fn name(session: SessionRef) -> String; + +/// Return the tabs node id currently being formatted. +fn node_id(bar: TabBarContext) -> int; + +/// Return the attached node id, if any. +/// +/// ReturnType: `int | ()` +fn node_id(buffer: BufferRef) -> ?; + +/// Return the node id attached to an event, or `()`. +/// +/// ReturnType: `int | ()` +fn node_id(event: EventInfo) -> ?; + +/// Return the parent node id, if any. +/// +/// ReturnType: `int | ()` +fn parent(node: NodeRef) -> ?; + +/// Return the process id, if any. +/// +/// ReturnType: `int | ()` +fn pid(buffer: BufferRef) -> ?; + +/// Return the detected process name, if any. +/// +/// ReturnType: `string | ()` +fn process_name(buffer: BufferRef) -> ?; + +/// Return the root node id. +fn root_node(floating: FloatingRef) -> int; + +/// Return the root tabs node for the session. +fn root_node(session: SessionRef) -> int; + +/// Return the attached session id, if any. +/// +/// ReturnType: `int | ()` +fn session_id(buffer: BufferRef) -> ?; + +/// Return the session id attached to an event, or `()`. +/// +/// ReturnType: `int | ()` +fn session_id(event: EventInfo) -> ?; + +/// Return the owning session id. +fn session_id(floating: FloatingRef) -> int; + +/// Return the owning session id. +fn session_id(node: NodeRef) -> int; + +/// Return a text snapshot limited to the requested line count. +fn snapshot_text(buffer: BufferRef, limit: int) -> String; + +/// Return the split direction, if any. +/// +/// ReturnType: `string | ()` +fn split_direction(node: NodeRef) -> ?; + +/// Return split weights, if any. +/// +/// ReturnType: `Array | ()` +fn split_weights(node: NodeRef) -> ?; + +/// Return tab titles on a tabs node. +fn tab_titles(node: NodeRef) -> array; + +/// Return tab metadata used by the formatter. +fn tabs(bar: TabBarContext) -> array; + +/// Return the buffer title. +fn title(buffer: BufferRef) -> String; + +/// Return the floating title, if any. +/// +/// ReturnType: `string | ()` +fn title(floating: FloatingRef) -> ?; + +/// Return the tab title. +fn title(tab: TabInfo) -> String; + +/// Return the controlling TTY path, if any. +/// +/// ReturnType: `string | ()` +fn tty_path(buffer: BufferRef) -> ?; + +/// Return the formatter viewport width in cells. +fn viewport_width(bar: TabBarContext) -> int; + +/// Return the currently focused buffer, if any. +/// +/// ReturnType: `BufferRef | ()` +/// +/// # Example +/// +/// ```rhai +/// let buffer = ctx.current_buffer(); +/// if buffer != () { +/// print(buffer.title()); +/// } +/// ``` +fn current_buffer(context: Context) -> ?; + +/// Return the currently focused floating window, if any. +/// +/// ReturnType: `FloatingRef | ()` +fn current_floating(context: Context) -> ?; + +/// Return the active input mode name. +fn current_mode(context: Context) -> String; + +/// Return the currently focused node, if any. +/// +/// ReturnType: `NodeRef | ()` +fn current_node(context: Context) -> ?; + +/// Return the current session reference, if any. +/// +/// ReturnType: `SessionRef | ()` +fn current_session(context: Context) -> ?; + +/// Return detached buffers in the current model snapshot. +fn detached_buffers(context: Context) -> array; + +/// Return the current event payload, if any. +/// +/// ReturnType: `EventInfo | ()` +fn event(context: Context) -> ?; + +/// Find a buffer by numeric id. Returns `()` when it does not exist. +/// +/// ReturnType: `BufferRef | ()` +fn find_buffer(context: Context, buffer_id: int) -> ?; + +/// Find a floating window by numeric id. Returns `()` when it does not exist. +/// +/// ReturnType: `FloatingRef | ()` +fn find_floating(context: Context, floating_id: int) -> ?; + +/// Find a node by numeric id. Returns `()` when it does not exist. +/// +/// ReturnType: `NodeRef | ()` +fn find_node(context: Context, node_id: int) -> ?; + +/// Return every visible session. +fn sessions(context: Context) -> array; + +/// Return visible buffers in the current model snapshot. +fn visible_buffers(context: Context) -> array; + +let system: SystemApi; + +let action: ActionApi; + +let tree: TreeApi; + +let ui: UiApi; + +let theme: ThemeRuntimeApi; + +let mux: MuxApi; diff --git a/docs/config-api/event-info.md b/docs/config-api/event-info.md new file mode 100644 index 0000000..1e756d5 --- /dev/null +++ b/docs/config-api/event-info.md @@ -0,0 +1,122 @@ +# EventInfo + +```Namespace: global``` + +
+

fn buffer_id

+ +```rust,ignore +fn buffer_id(event: EventInfo) -> ? +``` + +
+
+ +
+ +
+Return the buffer id attached to an event, or `()`. + +ReturnType: `int | ()` +
+ +
+
+
+
+

fn floating_id

+ +```rust,ignore +fn floating_id(event: EventInfo) -> ? +``` + +
+
+ +
+ +
+Return the floating id attached to an event, or `()`. + +ReturnType: `int | ()` +
+ +
+
+
+
+

fn name

+ +```rust,ignore +fn name(event: EventInfo) -> String +``` + +
+
+ +
+ +
+Return the event name. +
+ +
+
+
+
+

fn node_id

+ +```rust,ignore +fn node_id(event: EventInfo) -> ? +``` + +
+
+ +
+ +
+Return the node id attached to an event, or `()`. + +ReturnType: `int | ()` +
+ +
+
+
+
+

fn session_id

+ +```rust,ignore +fn session_id(event: EventInfo) -> ? +``` + +
+
+ +
+ +
+Return the session id attached to an event, or `()`. + +ReturnType: `int | ()` +
+ +
+
+
diff --git a/docs/config-api/example.md b/docs/config-api/example.md new file mode 100644 index 0000000..3e54431 --- /dev/null +++ b/docs/config-api/example.md @@ -0,0 +1,40 @@ +# Example + +This is a trimmed example based on the repository fixture config. It shows the two main phases together. + +```rhai +set_leader(""); + +fn shell_tree(ctx) { + tree.buffer_spawn( + ["/bin/zsh"], + #{ + title: "shell", + cwd: if ctx.current_buffer() == () { () } else { ctx.current_buffer().cwd() } + } + ) +} + +fn split_below(ctx) { + action.split_with("horizontal", shell_tree(ctx)) +} + +fn format_tabs(ctx) { + let active = ctx.tabs()[ctx.active_index()]; + ui.bar([ + ui.segment(" " + active.title() + " ", #{ + fg: theme.color("active_fg"), + bg: theme.color("active_bg") + }) + ], [], []) +} + +define_action("split-below", split_below); +bind("normal", "\"", "split-below"); +theme.set_palette(#{ + active_fg: "#303446", + active_bg: "#c6d0f5" +}); +tabbar.set_formatter(format_tabs); +mouse.set_click_focus(true); +``` diff --git a/docs/config-api/floating-ref.md b/docs/config-api/floating-ref.md new file mode 100644 index 0000000..b770416 --- /dev/null +++ b/docs/config-api/floating-ref.md @@ -0,0 +1,160 @@ +# FloatingRef + +```Namespace: global``` + +
+

fn geometry

+ +```rust,ignore +fn geometry(floating: FloatingRef) -> Map +``` + +
+
+ +
+ +
+Return the floating geometry map. +
+ +
+
+
+
+

fn id

+ +```rust,ignore +fn id(floating: FloatingRef) -> int +``` + +
+
+ +
+ +
+Return the floating id. +
+ +
+
+
+
+

fn is_focused

+ +```rust,ignore +fn is_focused(floating: FloatingRef) -> bool +``` + +
+
+ +
+ +
+Return whether the floating is focused. +
+ +
+
+
+
+

fn is_visible

+ +```rust,ignore +fn is_visible(floating: FloatingRef) -> bool +``` + +
+
+ +
+ +
+Return whether the floating is visible. +
+ +
+
+
+
+

fn root_node

+ +```rust,ignore +fn root_node(floating: FloatingRef) -> int +``` + +
+
+ +
+ +
+Return the root node id. +
+ +
+
+
+
+

fn session_id

+ +```rust,ignore +fn session_id(floating: FloatingRef) -> int +``` + +
+
+ +
+ +
+Return the owning session id. +
+ +
+
+
+
+

fn title

+ +```rust,ignore +fn title(floating: FloatingRef) -> ? +``` + +
+
+ +
+ +
+Return the floating title, if any. + +ReturnType: `string | ()` +
+ +
+
+
diff --git a/docs/config-api/index.md b/docs/config-api/index.md new file mode 100644 index 0000000..2a11bb8 --- /dev/null +++ b/docs/config-api/index.md @@ -0,0 +1,44 @@ +# Embers Config API + +This reference is generated from the Rust-backed Rhai exports used by Embers. + +There are two execution phases: + +- registration time: the top-level config file where you declare modes, bindings, named actions, and visual settings +- runtime: named actions, event handlers, and tab bar formatters that run against live client state + +Definition files live in [`defs/`](defs/). + +## Pages + +- [action](action.md) +- [buffer-ref](buffer-ref.md) +- [context](context.md) +- [event-info](event-info.md) +- [floating-ref](floating-ref.md) +- [mouse](mouse.md) +- [mux](mux.md) +- [node-ref](node-ref.md) +- [registration-action](registration-action.md) +- [registration-globals](registration-globals.md) +- [registration-system](registration-system.md) +- [registration-tree](registration-tree.md) +- [registration-ui](registration-ui.md) +- [runtime-theme](runtime-theme.md) +- [session-ref](session-ref.md) +- [system-runtime](system-runtime.md) +- [tab-bar-context](tab-bar-context.md) +- [tab-info](tab-info.md) +- [tabbar](tabbar.md) +- [theme](theme.md) +- [tree](tree.md) +- [ui](ui.md) + +## Definitions + +- [`registration.rhai`](defs/registration.rhai) +- [`runtime.rhai`](defs/runtime.rhai) + +## Example + +- [`example.md`](example.md) diff --git a/docs/config-api/mouse.md b/docs/config-api/mouse.md new file mode 100644 index 0000000..8bc7cca --- /dev/null +++ b/docs/config-api/mouse.md @@ -0,0 +1,96 @@ +# Mouse + +```Namespace: global``` + +
+

fn set_click_focus

+ +```rust,ignore +fn set_click_focus(mouse: MouseApi, value: bool) +``` + +
+
+ +
+ +
+Toggle focus-on-click behavior. + +
+ +
+
+
+
+

fn set_click_forward

+ +```rust,ignore +fn set_click_forward(mouse: MouseApi, value: bool) +``` + +
+
+ +
+ +
+Toggle forwarding mouse clicks into the focused buffer. + +
+ +
+
+
+
+

fn set_wheel_forward

+ +```rust,ignore +fn set_wheel_forward(mouse: MouseApi, value: bool) +``` + +
+
+ +
+ +
+Toggle wheel event forwarding into the focused buffer. + +
+ +
+
+
+
+

fn set_wheel_scroll

+ +```rust,ignore +fn set_wheel_scroll(mouse: MouseApi, value: bool) +``` + +
+
+ +
+ +
+Toggle client-side wheel scrolling. + +
+ +
+
+
diff --git a/docs/config-api/mux.md b/docs/config-api/mux.md new file mode 100644 index 0000000..96c1cc2 --- /dev/null +++ b/docs/config-api/mux.md @@ -0,0 +1,238 @@ +# Mux + +```Namespace: global``` + +
+

fn current_buffer

+ +```rust,ignore +fn current_buffer(mux: MuxApi) -> ? +``` + +
+
+ +
+ +
+Return the currently focused buffer, if any. + +ReturnType: `BufferRef | ()` +
+ +
+
+
+
+

fn current_floating

+ +```rust,ignore +fn current_floating(mux: MuxApi) -> ? +``` + +
+
+ +
+ +
+Return the currently focused floating window, if any. + +ReturnType: `FloatingRef | ()` +
+ +
+
+
+
+

fn current_node

+ +```rust,ignore +fn current_node(mux: MuxApi) -> ? +``` + +
+
+ +
+ +
+Return the currently focused node, if any. + +ReturnType: `NodeRef | ()` +
+ +
+
+
+
+

fn current_session

+ +```rust,ignore +fn current_session(mux: MuxApi) -> ? +``` + +
+
+ +
+ +
+Return the current session reference, if any. + +ReturnType: `SessionRef | ()` +
+ +
+
+
+
+

fn detached_buffers

+ +```rust,ignore +fn detached_buffers(mux: MuxApi) -> Array +``` + +
+
+ +
+ +
+Return detached buffers in the current model snapshot. +
+ +
+
+
+
+

fn find_buffer

+ +```rust,ignore +fn find_buffer(mux: MuxApi, buffer_id: int) -> ? +``` + +
+
+ +
+ +
+Find a buffer by numeric id. Returns `()` when it does not exist. + +ReturnType: `BufferRef | ()` +
+ +
+
+
+
+

fn find_floating

+ +```rust,ignore +fn find_floating(mux: MuxApi, floating_id: int) -> ? +``` + +
+
+ +
+ +
+Find a floating window by numeric id. Returns `()` when it does not exist. + +ReturnType: `FloatingRef | ()` +
+ +
+
+
+
+

fn find_node

+ +```rust,ignore +fn find_node(mux: MuxApi, node_id: int) -> ? +``` + +
+
+ +
+ +
+Find a node by numeric id. Returns `()` when it does not exist. + +ReturnType: `NodeRef | ()` +
+ +
+
+
+
+

fn sessions

+ +```rust,ignore +fn sessions(mux: MuxApi) -> Array +``` + +
+
+ +
+ +
+Return every visible session. +
+ +
+
+
+
+

fn visible_buffers

+ +```rust,ignore +fn visible_buffers(mux: MuxApi) -> Array +``` + +
+
+ +
+ +
+Return visible buffers in the current model snapshot. +
+ +
+
+
diff --git a/docs/config-api/node-ref.md b/docs/config-api/node-ref.md new file mode 100644 index 0000000..f28da01 --- /dev/null +++ b/docs/config-api/node-ref.md @@ -0,0 +1,346 @@ +# NodeRef + +```Namespace: global``` + +
+

fn active_tab_index

+ +```rust,ignore +fn active_tab_index(node: NodeRef) -> ? +``` + +
+
+ +
+ +
+Return the active tab index, if any. + +ReturnType: `int | ()` +
+ +
+
+
+
+

fn buffer

+ +```rust,ignore +fn buffer(node: NodeRef) -> ? +``` + +
+
+ +
+ +
+Return the attached buffer id, if any. + +ReturnType: `int | ()` +
+ +
+
+
+
+

fn children

+ +```rust,ignore +fn children(node: NodeRef) -> Array +``` + +
+
+ +
+ +
+Return child node ids. +
+ +
+
+
+
+

fn geometry

+ +```rust,ignore +fn geometry(node: NodeRef) -> ? +``` + +
+
+ +
+ +
+Return the geometry map, if any. + +ReturnType: `Map | ()` +
+ +
+
+
+
+

fn id

+ +```rust,ignore +fn id(node: NodeRef) -> int +``` + +
+
+ +
+ +
+Return the node id. +
+ +
+
+
+
+

fn is_floating_root

+ +```rust,ignore +fn is_floating_root(node: NodeRef) -> bool +``` + +
+
+ +
+ +
+Return whether the node is the root of a floating window. +
+ +
+
+
+
+

fn is_focused

+ +```rust,ignore +fn is_focused(node: NodeRef) -> bool +``` + +
+
+ +
+ +
+Return whether the node is focused. +
+ +
+
+
+
+

fn is_root

+ +```rust,ignore +fn is_root(node: NodeRef) -> bool +``` + +
+
+ +
+ +
+Return whether the node is the session root. +
+ +
+
+
+
+

fn is_visible

+ +```rust,ignore +fn is_visible(node: NodeRef) -> bool +``` + +
+
+ +
+ +
+Return whether the node is visible in the current presentation. +
+ +
+
+
+
+

fn kind

+ +```rust,ignore +fn kind(node: NodeRef) -> String +``` + +
+
+ +
+ +
+Return the node kind such as `buffer_view`, `split`, or `tabs`. +
+ +
+
+
+
+

fn parent

+ +```rust,ignore +fn parent(node: NodeRef) -> ? +``` + +
+
+ +
+ +
+Return the parent node id, if any. + +ReturnType: `int | ()` +
+ +
+
+
+
+

fn session_id

+ +```rust,ignore +fn session_id(node: NodeRef) -> int +``` + +
+
+ +
+ +
+Return the owning session id. +
+ +
+
+
+
+

fn split_direction

+ +```rust,ignore +fn split_direction(node: NodeRef) -> ? +``` + +
+
+ +
+ +
+Return the split direction, if any. + +ReturnType: `string | ()` +
+ +
+
+
+
+

fn split_weights

+ +```rust,ignore +fn split_weights(node: NodeRef) -> ? +``` + +
+
+ +
+ +
+Return split weights, if any. + +ReturnType: `Array | ()` +
+ +
+
+
+
+

fn tab_titles

+ +```rust,ignore +fn tab_titles(node: NodeRef) -> Array +``` + +
+
+ +
+ +
+Return tab titles on a tabs node. +
+ +
+
+
diff --git a/docs/config-api/registration-action.md b/docs/config-api/registration-action.md new file mode 100644 index 0000000..0dd2d08 --- /dev/null +++ b/docs/config-api/registration-action.md @@ -0,0 +1,1417 @@ +# Action (Registration) + +```Namespace: global``` + +
+

fn cancel_search

+ +```rust,ignore +fn cancel_search(_: ActionApi) -> Action +``` + +
+
+ +
+ +
+Cancel the active search. +
+ +
+
+
+
+

fn cancel_selection

+ +```rust,ignore +fn cancel_selection(_: ActionApi) -> Action +``` + +
+
+ +
+ +
+Cancel the current selection. +
+ +
+
+
+
+

fn chain

+ +```rust,ignore +fn chain(_: ActionApi, actions: Array) -> Action +``` + +
+
+ +
+ +
+Chain multiple actions into one composite action. +
+ +
+
+
+
+

fn clear_pending_keys

+ +```rust,ignore +fn clear_pending_keys(_: ActionApi) -> Action +``` + +
+
+ +
+ +
+Clear any partially-entered key sequence. +
+ +
+
+
+
+

fn close_floating

+ +```rust,ignore +fn close_floating(_: ActionApi) -> Action +``` + +
+
+ +
+ +
+Close the currently focused floating window. +
+ +
+
+
+
+

fn close_floating_id

+ +```rust,ignore +fn close_floating_id(_: ActionApi, floating_id: int) -> Action +``` + +
+
+ +
+ +
+Close a floating window by id. +
+ +
+
+
+
+

fn close_node

+ +```rust,ignore +fn close_node(_: ActionApi, node_id: int) -> Action +``` + +
+
+ +
+ +
+Close a view by node id. +
+ +
+
+
+
+

fn close_view

+ +```rust,ignore +fn close_view(_: ActionApi) -> Action +``` + +
+
+ +
+ +
+Close the currently focused view. +
+ +
+
+
+
+

fn copy_selection

+ +```rust,ignore +fn copy_selection(_: ActionApi) -> Action +``` + +
+
+ +
+ +
+Copy the current selection into the clipboard. +
+ +
+
+
+
+

fn detach_buffer

+ +```rust,ignore +fn detach_buffer(_: ActionApi) -> Action +``` + +
+
+ +
+ +
+Detach the currently focused buffer. +
+ +
+
+
+
+

fn detach_buffer_id

+ +```rust,ignore +fn detach_buffer_id(_: ActionApi, buffer_id: int) -> Action +``` + +
+
+ +
+ +
+Detach a buffer by id. +
+ +
+
+
+
+

fn enter_mode

+ +```rust,ignore +fn enter_mode(_: ActionApi, mode: String) -> Action +``` + +
+
+ +
+ +
+Enter a specific input mode by name. +
+ +
+
+
+
+

fn enter_search_mode

+ +```rust,ignore +fn enter_search_mode(_: ActionApi) -> Action +``` + +
+
+ +
+ +
+Enter incremental search mode. +
+ +
+
+
+
+

fn enter_select_block

+ +```rust,ignore +fn enter_select_block(_: ActionApi) -> Action +``` + +
+
+ +
+ +
+Enter block selection mode. +
+ +
+
+
+
+

fn enter_select_char

+ +```rust,ignore +fn enter_select_char(_: ActionApi) -> Action +``` + +
+
+ +
+ +
+Enter character selection mode. +
+ +
+
+
+
+

fn enter_select_line

+ +```rust,ignore +fn enter_select_line(_: ActionApi) -> Action +``` + +
+
+ +
+ +
+Enter line selection mode. +
+ +
+
+
+
+

fn focus_buffer

+ +```rust,ignore +fn focus_buffer(_: ActionApi, buffer_id: int) -> Action +``` + +
+
+ +
+ +
+Focus a specific buffer by id. +
+ +
+
+
+
+

fn focus_down

+ +```rust,ignore +fn focus_down(_: ActionApi) -> Action +``` + +
+
+ +
+ +
+Focus the view below the current node. +
+ +
+
+
+
+

fn focus_left

+ +```rust,ignore +fn focus_left(_: ActionApi) -> Action +``` + +
+
+ + +
+ +
+Focus the view to the left of the current node. +
+ + +
+
+
+
+

fn focus_right

+ +```rust,ignore +fn focus_right(_: ActionApi) -> Action +``` + +
+
+ +
+ +
+Focus the view to the right of the current node. +
+ +
+
+
+
+

fn focus_up

+ +```rust,ignore +fn focus_up(_: ActionApi) -> Action +``` + +
+
+ +
+ +
+Focus the view above the current node. +
+ +
+
+
+
+

fn follow_output

+ +```rust,ignore +fn follow_output(_: ActionApi) -> Action +``` + +
+
+ +
+ +
+Re-enable following live output. +
+ +
+
+
+
+

fn insert_tab_after

+ +```rust,ignore +fn insert_tab_after(_: ActionApi, tabs_node_id: int, title: String, tree: TreeSpec) -> Action +``` + +
+
+ +
+ +
+Insert a tab after a specific tabs node. +
+ +
+
+
+
+

fn insert_tab_after_current

+ +```rust,ignore +fn insert_tab_after_current(_: ActionApi, title: String, tree: TreeSpec) -> Action +``` + +
+
+ +
+ +
+Insert a tab after the current tab in the focused tabs node. +
+ +
+
+
+
+

fn insert_tab_before

+ +```rust,ignore +fn insert_tab_before(_: ActionApi, tabs_node_id: int, title: String, tree: TreeSpec) -> Action +``` + +
+
+ +
+ +
+Insert a tab before a specific tabs node. +
+ +
+
+
+
+

fn insert_tab_before_current

+ +```rust,ignore +fn insert_tab_before_current(_: ActionApi, title: String, tree: TreeSpec) -> Action +``` + +
+
+ +
+ +
+Insert a tab before the current tab. +
+ +
+
+
+
+

fn kill_buffer

+ +```rust,ignore +fn kill_buffer(_: ActionApi) -> Action +``` + +
+
+ +
+ +
+Kill the currently focused buffer. +
+ +
+
+
+
+

fn kill_buffer_id

+ +```rust,ignore +fn kill_buffer_id(_: ActionApi, buffer_id: int) -> Action +``` + +
+
+ +
+ +
+Kill a buffer by id. +
+ +
+
+
+
+

fn leave_mode

+ +```rust,ignore +fn leave_mode(_: ActionApi) -> Action +``` + +
+
+ +
+ +
+Leave the active input mode. +
+ +
+
+
+
+

fn move_buffer_to_floating

+ +```rust,ignore +fn move_buffer_to_floating(_: ActionApi, buffer_id: int, options: Map) -> Action +``` + +
+
+ + +
+ +
+Move a buffer into a new floating window. +
+ + +
+
+
+
+

fn move_buffer_to_node

+ +```rust,ignore +fn move_buffer_to_node(_: ActionApi, buffer_id: int, node_id: int) -> Action +``` + +
+
+ +
+ +
+Move a buffer into a specific node. +
+ +
+
+
+
+

fn next_current_tabs

+ +```rust,ignore +fn next_current_tabs(_: ActionApi) -> Action +``` + +
+
+ +
+ +
+Select the next tab in the currently focused tabs node. +
+ +
+
+
+
+

fn next_tab

+ +```rust,ignore +fn next_tab(_: ActionApi, tabs_node_id: int) -> Action +``` + +
+
+ +
+ +
+Select the next tab in a specific tabs node. +
+ +
+
+
+
+

fn noop

+ +```rust,ignore +fn noop(_: ActionApi) -> Action +``` + +
+
+ +
+ +
+Build a no-op action. +
+ +
+
+
+
+

fn notify

+ +```rust,ignore +fn notify(_: ActionApi, level: String, message: String) -> Action +``` + +
+
+ +
+ +
+Emit a client notification. +
+ +
+
+
+
+

fn open_floating

+ +```rust,ignore +fn open_floating(_: ActionApi, tree: TreeSpec, options: Map) -> Action +``` + +
+
+ +
+ +
+Open a floating view around the provided tree. +
+ +
+
+
+
+

fn prev_current_tabs

+ +```rust,ignore +fn prev_current_tabs(_: ActionApi) -> Action +``` + +
+
+ +
+ +
+Select the previous tab in the currently focused tabs node. +
+ +
+
+
+
+

fn prev_tab

+ +```rust,ignore +fn prev_tab(_: ActionApi, tabs_node_id: int) -> Action +``` + +
+
+ +
+ +
+Select the previous tab in a specific tabs node. +
+ +
+
+
+
+

fn replace_current_with

+ +```rust,ignore +fn replace_current_with(_: ActionApi, tree: TreeSpec) -> Action +``` + +
+
+ +
+ +
+Replace the focused node with a new tree. +
+ +
+
+
+
+

fn replace_node

+ +```rust,ignore +fn replace_node(_: ActionApi, node_id: int, tree: TreeSpec) -> Action +``` + +
+
+ +
+ +
+Replace a specific node by id with a new tree. +
+ +
+
+
+
+

fn reveal_buffer

+ +```rust,ignore +fn reveal_buffer(_: ActionApi, buffer_id: int) -> Action +``` + +
+
+ +
+ +
+Reveal a specific buffer by id. +
+ +
+
+
+
+

fn run_named_action

+ +```rust,ignore +fn run_named_action(_: ActionApi, name: String) -> Action +``` + +
+
+ +
+ +
+Run another named action by name. +
+ +
+
+
+
+

fn scroll_line_down

+ +```rust,ignore +fn scroll_line_down(_: ActionApi) -> Action +``` + +
+
+ +
+ +
+Scroll one line downward in local scrollback. +
+ +
+
+
+
+

fn scroll_line_up

+ +```rust,ignore +fn scroll_line_up(_: ActionApi) -> Action +``` + +
+
+ +
+ +
+Scroll one line upward in local scrollback. +
+ +
+
+
+
+

fn scroll_page_down

+ +```rust,ignore +fn scroll_page_down(_: ActionApi) -> Action +``` + +
+
+ +
+ +
+Scroll one page downward in local scrollback. +
+ +
+
+
+
+

fn scroll_page_up

+ +```rust,ignore +fn scroll_page_up(_: ActionApi) -> Action +``` + +
+
+ +
+ +
+Scroll one page upward in local scrollback. +
+ +
+
+
+
+

fn scroll_to_bottom

+ +```rust,ignore +fn scroll_to_bottom(_: ActionApi) -> Action +``` + +
+
+ +
+ +
+Scroll to the bottom of local scrollback. +
+ +
+
+
+
+

fn scroll_to_top

+ +```rust,ignore +fn scroll_to_top(_: ActionApi) -> Action +``` + +
+
+ +
+ +
+Scroll to the top of local scrollback. +
+ +
+
+
+
+

fn search_next

+ +```rust,ignore +fn search_next(_: ActionApi) -> Action +``` + +
+
+ +
+ +
+Jump to the next search match. +
+ +
+
+
+
+

fn search_prev

+ +```rust,ignore +fn search_prev(_: ActionApi) -> Action +``` + +
+
+ +
+ +
+Jump to the previous search match. +
+ +
+
+
+
+

fn select_current_tabs

+ +```rust,ignore +fn select_current_tabs(_: ActionApi, index: int) -> Action +``` + +
+
+ +
+ +
+Select a tab by index in the currently focused tabs node. +
+ +
+
+
+
+

fn select_move_down

+ +```rust,ignore +fn select_move_down(_: ActionApi) -> Action +``` + +
+
+ +
+ +
+Move the active selection down. +
+ +
+
+
+
+

fn select_move_left

+ +```rust,ignore +fn select_move_left(_: ActionApi) -> Action +``` + +
+
+ +
+ +
+Move the active selection left. +
+ +
+
+
+
+

fn select_move_right

+ +```rust,ignore +fn select_move_right(_: ActionApi) -> Action +``` + +
+
+ +
+ +
+Move the active selection right. +
+ +
+
+
+
+

fn select_move_up

+ +```rust,ignore +fn select_move_up(_: ActionApi) -> Action +``` + +
+
+ +
+ +
+Move the active selection up. +
+ +
+
+
+
+

fn select_tab

+ +```rust,ignore +fn select_tab(_: ActionApi, tabs_node_id: int, index: int) -> Action +``` + +
+
+ +
+ +
+Select a tab by index in a specific tabs node. +
+ +
+
+
+
+

fn send_bytes

+ +```rust,ignore +fn send_bytes(_: ActionApi, buffer_id: int, bytes: String) -> Action +fn send_bytes(_: ActionApi, buffer_id: int, bytes: Array) -> Action +``` + +
+
+ +
+ +
+Send a string of bytes to a specific buffer. +
+ +
+
+
+
+

fn send_bytes_current

+ +```rust,ignore +fn send_bytes_current(_: ActionApi, bytes: String) -> Action +fn send_bytes_current(_: ActionApi, bytes: Array) -> Action +``` + +
+
+ +
+ +
+Send a string of bytes to the focused buffer. +
+ +
+
+
+
+

fn send_keys

+ +```rust,ignore +fn send_keys(_: ActionApi, buffer_id: int, notation: String) -> Action +``` + +
+
+ +
+ +
+Send a key notation sequence to a specific buffer. +
+ +
+
+
+
+

fn send_keys_current

+ +```rust,ignore +fn send_keys_current(_: ActionApi, notation: String) -> Action +``` + +
+
+ +
+ +
+Send a key notation sequence to the focused buffer. +
+ +
+
+
+
+

fn split_with

+ +```rust,ignore +fn split_with(_: ActionApi, direction: String, tree: TreeSpec) -> Action +``` + +
+
+ +
+ +
+Split the current node and attach the provided tree as the new sibling. +
+ +
+
+
+
+

fn toggle_mode

+ +```rust,ignore +fn toggle_mode(_: ActionApi, mode: String) -> Action +``` + +
+
+ +
+ +
+Toggle a named input mode. +
+ +
+
+
+
+

fn yank_selection

+ +```rust,ignore +fn yank_selection(_: ActionApi) -> Action +``` + +
+
+ +
+ +
+Copy the current selection into the clipboard. +
+ +
+
+
diff --git a/docs/config-api/registration-globals.md b/docs/config-api/registration-globals.md new file mode 100644 index 0000000..d374f9c --- /dev/null +++ b/docs/config-api/registration-globals.md @@ -0,0 +1,171 @@ +# Registration Globals + +```Namespace: global``` + +
+

fn bind

+ +```rust,ignore +fn bind(mode: String, notation: String, action: Action) +fn bind(mode: String, notation: String, action_name: String) +fn bind(mode: String, notation: String, actions: Array) +``` + +
+
+ + +
+ +
+Bind a key notation to an [`Action`], a string action name, or an array of actions. + +Use the `Action` overload for inline builders such as `action.focus_left()`, the string +overload for a named action registered with `define_action`, or an array to chain multiple +actions in sequence. +
+ + +
+
+
+
+

fn define_action

+ +```rust,ignore +fn define_action(name: String, callback: FnPtr) +``` + +
+
+ +
+ +
+Register a function pointer as a named action callable from bindings. + +
+ +
+
+
+
+

fn define_mode

+ +```rust,ignore +fn define_mode(mode_name: String) +fn define_mode(mode_name: String, options: Map) +``` + +
+
+ +
+ +
+Define a custom input mode with hooks and fallback options. + +Supported options are `fallback`, `on_enter`, and `on_leave`. + +
+ +
+
+
+
+

fn on

+ +```rust,ignore +fn on(event_name: String, callback: FnPtr) +``` + +
+
+ +
+ +
+Attach a callback to an emitted event such as `buffer_bell`. + +
+ +
+
+
+
+

fn set_leader

+ +```rust,ignore +fn set_leader(notation: String) +``` + +
+
+ + +
+ +
+Set the leader sequence used in binding notations. +
+ + +
+
+
+
+

fn unbind

+ +```rust,ignore +fn unbind(mode: String, notation: String) +``` + +
+
+ +
+ +
+Remove a previously bound key sequence. + +
+ +
+
+
diff --git a/docs/config-api/registration-system.md b/docs/config-api/registration-system.md new file mode 100644 index 0000000..705b4be --- /dev/null +++ b/docs/config-api/registration-system.md @@ -0,0 +1,74 @@ +# System (Registration) + +```Namespace: global``` + +
+

fn env

+ +```rust,ignore +fn env(_: SystemApi, name: String) -> ? +``` + +
+
+ +
+ +
+Read an environment variable, if it is set. + +ReturnType: `string | ()` +
+ +
+
+
+
+

fn now

+ +```rust,ignore +fn now(_: SystemApi) -> int +``` + +
+
+ +
+ +
+Return the current Unix timestamp in seconds. +
+ +
+
+
+
+

fn which

+ +```rust,ignore +fn which(_: SystemApi, name: String) -> ? +``` + +
+
+ +
+ +
+Resolve an executable from `PATH`, if it is found. + +ReturnType: `string | ()` +
+ +
+
+
diff --git a/docs/config-api/registration-tree.md b/docs/config-api/registration-tree.md new file mode 100644 index 0000000..9604e72 --- /dev/null +++ b/docs/config-api/registration-tree.md @@ -0,0 +1,283 @@ +# Tree (Registration) + +```Namespace: global``` + +
+

fn buffer_attach

+ +```rust,ignore +fn buffer_attach(_: TreeApi, buffer_id: int) -> TreeSpec +``` + +
+
+ +
+ +
+Attach an existing buffer by id. +
+ +
+
+
+
+

fn buffer_current

+ +```rust,ignore +fn buffer_current(_: TreeApi) -> TreeSpec +``` + +
+
+ +
+ +
+Build a tree reference to the currently focused buffer. +
+ +
+
+
+
+

fn buffer_empty

+ +```rust,ignore +fn buffer_empty(_: TreeApi) -> TreeSpec +``` + +
+
+ +
+ +
+Build an empty buffer tree node. +
+ +
+
+
+
+

fn buffer_spawn

+ +```rust,ignore +fn buffer_spawn(_: TreeApi, command: Array) -> TreeSpec +fn buffer_spawn(_: TreeApi, command: Array, options: Map) -> TreeSpec +``` + +
+
+ + +
+ +
+Spawn a new buffer from a command array. + +Supported `options` keys are `title` (`string`), `cwd` (`string`), and `env` +(`map`). Unknown keys are rejected. +
+ + +
+
+
+
+

fn current_buffer

+ +```rust,ignore +fn current_buffer(_: TreeApi) -> TreeSpec +``` + +
+
+ +
+ +
+Build a tree reference to the currently focused buffer. +
+ +
+
+
+
+

fn current_node

+ +```rust,ignore +fn current_node(_: TreeApi) -> TreeSpec +``` + +
+
+ +
+ +
+Build a tree reference to the currently focused node. +
+ +
+
+
+
+

fn split

+ +```rust,ignore +fn split(_: TreeApi, direction: String, children: Array) -> TreeSpec +fn split(_: TreeApi, direction: String, children: Array, sizes: Array) -> TreeSpec +``` + +
+
+ +
+ +
+Build a split with an explicit direction string. +
+ +
+
+
+
+

fn split_h

+ +```rust,ignore +fn split_h(_: TreeApi, children: Array) -> TreeSpec +``` + +
+
+ +
+ +
+Build a horizontal split. +
+ +
+
+
+
+

fn split_v

+ +```rust,ignore +fn split_v(_: TreeApi, children: Array) -> TreeSpec +``` + +
+
+ +
+ +
+Build a vertical split. +
+ +
+
+
+
+

fn tab

+ +```rust,ignore +fn tab(_: TreeApi, title: String, tree: TreeSpec) -> TabSpec +``` + +
+
+ +
+ +
+Build a single tab specification. +
+ +
+
+
+
+

fn tabs

+ +```rust,ignore +fn tabs(_: TreeApi, tabs: Array) -> TreeSpec +``` + +
+
+ +
+ +
+Build a tabs container with the first tab active. +
+ +
+
+
+
+

fn tabs_with_active

+ +```rust,ignore +fn tabs_with_active(_: TreeApi, tabs: Array, active: int) -> TreeSpec +``` + +
+
+ +
+ +
+Build a tabs container with an explicit active tab. +
+ +
+
+
diff --git a/docs/config-api/registration-ui.md b/docs/config-api/registration-ui.md new file mode 100644 index 0000000..d858403 --- /dev/null +++ b/docs/config-api/registration-ui.md @@ -0,0 +1,52 @@ +# UI (Registration) + +```Namespace: global``` + +
+

fn bar

+ +```rust,ignore +fn bar(_: UiApi, left: Array, center: Array, right: Array) -> BarSpec +``` + +
+
+ +
+ +
+Build a full bar specification from left, center, and right segments. +
+ +
+
+
+
+

fn segment

+ +```rust,ignore +fn segment(_: UiApi, text: String) -> BarSegment +fn segment(_: UiApi, text: String, options: Map) -> BarSegment +``` + +
+
+ +
+ +
+Create a [`BarSegment`] from a [`UiApi`] receiver and text using default styling. + +`segment(_: UiApi, text: String) -> BarSegment` produces plain text with default +[`StyleSpec`] values and no click target. +
+ +
+
+
diff --git a/docs/config-api/runtime-theme.md b/docs/config-api/runtime-theme.md new file mode 100644 index 0000000..58384e9 --- /dev/null +++ b/docs/config-api/runtime-theme.md @@ -0,0 +1,28 @@ +# Runtime Theme + +```Namespace: global``` + +
+

fn color

+ +```rust,ignore +fn color(theme: ThemeRuntimeApi, name: String) -> ? +``` + +
+
+ +
+ +
+Read a named color from the active runtime palette, if it exists. + +ReturnType: `RgbColor | ()` +
+ +
+
+
diff --git a/docs/config-api/session-ref.md b/docs/config-api/session-ref.md new file mode 100644 index 0000000..960dd26 --- /dev/null +++ b/docs/config-api/session-ref.md @@ -0,0 +1,92 @@ +# SessionRef + +```Namespace: global``` + +
+

fn floating

+ +```rust,ignore +fn floating(session: SessionRef) -> Array +``` + +
+
+ +
+ +
+Return floating window ids attached to the session. +
+ +
+
+
+
+

fn id

+ +```rust,ignore +fn id(session: SessionRef) -> int +``` + +
+
+ +
+ +
+Return the numeric session id. +
+ +
+
+
+
+

fn name

+ +```rust,ignore +fn name(session: SessionRef) -> String +``` + +
+
+ +
+ +
+Return the session name. +
+ +
+
+
+
+

fn root_node

+ +```rust,ignore +fn root_node(session: SessionRef) -> int +``` + +
+
+ +
+ +
+Return the root tabs node for the session. +
+ +
+
+
diff --git a/docs/config-api/system-runtime.md b/docs/config-api/system-runtime.md new file mode 100644 index 0000000..c55772e --- /dev/null +++ b/docs/config-api/system-runtime.md @@ -0,0 +1,74 @@ +# System + +```Namespace: global``` + +
+

fn env

+ +```rust,ignore +fn env(_: SystemApi, name: String) -> ? +``` + +
+
+ +
+ +
+Read an environment variable, if it is set. + +ReturnType: `string | ()` +
+ +
+
+
+
+

fn now

+ +```rust,ignore +fn now(_: SystemApi) -> int +``` + +
+
+ +
+ +
+Return the current Unix timestamp in seconds. +
+ +
+
+
+
+

fn which

+ +```rust,ignore +fn which(_: SystemApi, name: String) -> ? +``` + +
+
+ +
+ +
+Resolve an executable from `PATH`, if it is found. + +ReturnType: `string | ()` +
+ +
+
+
diff --git a/docs/config-api/tab-bar-context.md b/docs/config-api/tab-bar-context.md new file mode 100644 index 0000000..5df2d24 --- /dev/null +++ b/docs/config-api/tab-bar-context.md @@ -0,0 +1,136 @@ +# TabBarContext + +```Namespace: global``` + +
+

fn active_index

+ +```rust,ignore +fn active_index(bar: TabBarContext) -> int +``` + +
+
+ +
+ +
+Return the active tab index. +
+ +
+
+
+
+

fn is_root

+ +```rust,ignore +fn is_root(bar: TabBarContext) -> bool +``` + +
+
+ +
+ +
+Return whether the formatted tabs are the root tabs. +
+ +
+
+
+
+

fn mode

+ +```rust,ignore +fn mode(bar: TabBarContext) -> String +``` + +
+
+ +
+ +
+Return the formatter mode name. +
+ +
+
+
+
+

fn node_id

+ +```rust,ignore +fn node_id(bar: TabBarContext) -> int +``` + +
+
+ +
+ +
+Return the tabs node id currently being formatted. +
+ +
+
+
+
+

fn tabs

+ +```rust,ignore +fn tabs(bar: TabBarContext) -> Array +``` + +
+
+ +
+ +
+Return tab metadata used by the formatter. +
+ +
+
+
+
+

fn viewport_width

+ +```rust,ignore +fn viewport_width(bar: TabBarContext) -> int +``` + +
+
+ +
+ +
+Return the formatter viewport width in cells. +
+ +
+
+
diff --git a/docs/config-api/tab-info.md b/docs/config-api/tab-info.md new file mode 100644 index 0000000..ac7742c --- /dev/null +++ b/docs/config-api/tab-info.md @@ -0,0 +1,136 @@ +# TabInfo + +```Namespace: global``` + +
+

fn buffer_count

+ +```rust,ignore +fn buffer_count(tab: TabInfo) -> int +``` + +
+
+ +
+ +
+Return how many buffers are attached to the tab. +
+ +
+
+
+
+

fn has_activity

+ +```rust,ignore +fn has_activity(tab: TabInfo) -> bool +``` + +
+
+ +
+ +
+Return whether the tab has activity. +
+ +
+
+
+
+

fn has_bell

+ +```rust,ignore +fn has_bell(tab: TabInfo) -> bool +``` + +
+
+ +
+ +
+Return whether the tab has a bell marker. +
+ +
+
+
+
+

fn index

+ +```rust,ignore +fn index(tab: TabInfo) -> int +``` + +
+
+ +
+ +
+Return the zero-based tab index. +
+ +
+
+
+
+

fn is_active

+ +```rust,ignore +fn is_active(tab: TabInfo) -> bool +``` + +
+
+ +
+ +
+Return whether the tab is active. +
+ +
+
+
+
+

fn title

+ +```rust,ignore +fn title(tab: TabInfo) -> String +``` + +
+
+ +
+ +
+Return the tab title. +
+ +
+
+
diff --git a/docs/config-api/tabbar.md b/docs/config-api/tabbar.md new file mode 100644 index 0000000..d77bd7d --- /dev/null +++ b/docs/config-api/tabbar.md @@ -0,0 +1,27 @@ +# Tabbar + +```Namespace: global``` + +
+

fn set_formatter

+ +```rust,ignore +fn set_formatter(tabbar: TabbarApi, callback: FnPtr) +``` + +
+
+ +
+ +
+Register the function used to format the tab bar. + +
+ +
+
+
diff --git a/docs/config-api/theme.md b/docs/config-api/theme.md new file mode 100644 index 0000000..1ef83aa --- /dev/null +++ b/docs/config-api/theme.md @@ -0,0 +1,27 @@ +# Theme + +```Namespace: global``` + +
+

fn set_palette

+ +```rust,ignore +fn set_palette(theme: ThemeApi, palette: Map) +``` + +
+
+ +
+ +
+Add named colors to the theme palette. + +
+ +
+
+
diff --git a/docs/config-api/theme/rhai-autodocs-tabs.js b/docs/config-api/theme/rhai-autodocs-tabs.js new file mode 100644 index 0000000..a925012 --- /dev/null +++ b/docs/config-api/theme/rhai-autodocs-tabs.js @@ -0,0 +1,22 @@ +window.openTab = function (evt, group, tab) { + document + .querySelectorAll('.tabcontent[group="' + group + '"]') + .forEach(function (content) { + content.style.display = "none"; + }); + + document + .querySelectorAll('.tablinks[group="' + group + '"]') + .forEach(function (link) { + link.classList.remove("active"); + }); + + const target = document.getElementById(group + "-" + tab); + if (target) { + target.style.display = "block"; + } + + if (evt && evt.currentTarget) { + evt.currentTarget.classList.add("active"); + } +}; \ No newline at end of file diff --git a/docs/config-api/theme/rhai-highlight.js b/docs/config-api/theme/rhai-highlight.js new file mode 100644 index 0000000..f759086 --- /dev/null +++ b/docs/config-api/theme/rhai-highlight.js @@ -0,0 +1,73 @@ +(function () { + const hljsInstance = window.hljs; + if (!hljsInstance) { + return; + } + + hljsInstance.registerLanguage("rhai", function (hljs) { + return { + name: "Rhai", + aliases: ["rhai-script"], + keywords: { + keyword: + "if else switch do while loop for in break continue return throw try catch fn private let const import export as and or not", + literal: "true false null" + }, + contains: [ + hljs.C_LINE_COMMENT_MODE, + hljs.C_BLOCK_COMMENT_MODE, + hljs.APOS_STRING_MODE, + hljs.QUOTE_STRING_MODE, + hljs.C_NUMBER_MODE, + { + className: "literal", + begin: /#\{/, + end: /\}/ + }, + { + className: "function", + beginKeywords: "fn", + end: /[{;]/, + excludeEnd: true, + contains: [ + hljs.UNDERSCORE_TITLE_MODE, + { + className: "params", + begin: /\(/, + end: /\)/, + contains: [ + hljs.C_LINE_COMMENT_MODE, + hljs.C_BLOCK_COMMENT_MODE, + hljs.APOS_STRING_MODE, + hljs.QUOTE_STRING_MODE, + hljs.C_NUMBER_MODE + ] + } + ] + } + ] + }; + }); + + const highlightRhaiBlocks = function () { + document + .querySelectorAll("pre code.language-rhai, pre code.lang-rhai") + .forEach(function (block) { + if (typeof hljsInstance.highlightElement === "function") { + block.removeAttribute("data-highlighted"); + hljsInstance.highlightElement(block); + return; + } + + if (typeof hljsInstance.highlightBlock === "function") { + hljsInstance.highlightBlock(block); + } + }); + }; + + if (document.readyState === "loading") { + document.addEventListener("DOMContentLoaded", highlightRhaiBlocks); + } else { + highlightRhaiBlocks(); + } +})(); \ No newline at end of file diff --git a/docs/config-api/tree.md b/docs/config-api/tree.md new file mode 100644 index 0000000..52a33dc --- /dev/null +++ b/docs/config-api/tree.md @@ -0,0 +1,283 @@ +# Tree + +```Namespace: global``` + +
+

fn buffer_attach

+ +```rust,ignore +fn buffer_attach(_: TreeApi, buffer_id: int) -> TreeSpec +``` + +
+
+ +
+ +
+Attach an existing buffer by id. +
+ +
+
+
+
+

fn buffer_current

+ +```rust,ignore +fn buffer_current(_: TreeApi) -> TreeSpec +``` + +
+
+ +
+ +
+Build a tree reference to the currently focused buffer. +
+ +
+
+
+
+

fn buffer_empty

+ +```rust,ignore +fn buffer_empty(_: TreeApi) -> TreeSpec +``` + +
+
+ +
+ +
+Build an empty buffer tree node. +
+ +
+
+
+
+

fn buffer_spawn

+ +```rust,ignore +fn buffer_spawn(_: TreeApi, command: Array) -> TreeSpec +fn buffer_spawn(_: TreeApi, command: Array, options: Map) -> TreeSpec +``` + +
+
+ + +
+ +
+Spawn a new buffer from a command array. + +Supported `options` keys are `title` (`string`), `cwd` (`string`), and `env` +(`map`). Unknown keys are rejected. +
+ + +
+
+
+
+

fn current_buffer

+ +```rust,ignore +fn current_buffer(_: TreeApi) -> TreeSpec +``` + +
+
+ +
+ +
+Build a tree reference to the currently focused buffer. +
+ +
+
+
+
+

fn current_node

+ +```rust,ignore +fn current_node(_: TreeApi) -> TreeSpec +``` + +
+
+ +
+ +
+Build a tree reference to the currently focused node. +
+ +
+
+
+
+

fn split

+ +```rust,ignore +fn split(_: TreeApi, direction: String, children: Array) -> TreeSpec +fn split(_: TreeApi, direction: String, children: Array, sizes: Array) -> TreeSpec +``` + +
+
+ +
+ +
+Build a split with an explicit direction string. +
+ +
+
+
+
+

fn split_h

+ +```rust,ignore +fn split_h(_: TreeApi, children: Array) -> TreeSpec +``` + +
+
+ +
+ +
+Build a horizontal split. +
+ +
+
+
+
+

fn split_v

+ +```rust,ignore +fn split_v(_: TreeApi, children: Array) -> TreeSpec +``` + +
+
+ +
+ +
+Build a vertical split. +
+ +
+
+
+
+

fn tab

+ +```rust,ignore +fn tab(_: TreeApi, title: String, tree: TreeSpec) -> TabSpec +``` + +
+
+ +
+ +
+Build a single tab specification. +
+ +
+
+
+
+

fn tabs

+ +```rust,ignore +fn tabs(_: TreeApi, tabs: Array) -> TreeSpec +``` + +
+
+ +
+ +
+Build a tabs container with the first tab active. +
+ +
+
+
+
+

fn tabs_with_active

+ +```rust,ignore +fn tabs_with_active(_: TreeApi, tabs: Array, active: int) -> TreeSpec +``` + +
+
+ +
+ +
+Build a tabs container with an explicit active tab. +
+ +
+
+
diff --git a/docs/config-api/ui.md b/docs/config-api/ui.md new file mode 100644 index 0000000..860dcb3 --- /dev/null +++ b/docs/config-api/ui.md @@ -0,0 +1,52 @@ +# UI + +```Namespace: global``` + +
+

fn bar

+ +```rust,ignore +fn bar(_: UiApi, left: Array, center: Array, right: Array) -> BarSpec +``` + +
+
+ +
+ +
+Build a full bar specification from left, center, and right segments. +
+ +
+
+
+
+

fn segment

+ +```rust,ignore +fn segment(_: UiApi, text: String) -> BarSegment +fn segment(_: UiApi, text: String, options: Map) -> BarSegment +``` + +
+
+ +
+ +
+Create a [`BarSegment`] from a [`UiApi`] receiver and text using default styling. + +`segment(_: UiApi, text: String) -> BarSegment` produces plain text with default +[`StyleSpec`] values and no click target. +
+ +
+
+