From 94ef49b37e37f88cc4ebf807519423654c946b37 Mon Sep 17 00:00:00 2001 From: Daniel Kim <79390398+sox8502@users.noreply.github.com> Date: Mon, 21 Sep 2026 18:55:53 -0700 Subject: [PATCH] Run SSH experiments in existing Docker containers (#407) * feat: run SSH experiments in existing Docker containers * Simplify SSH container settings and harden launch recovery --- agent-skills/orx-compute/references/ssh.md | 55 +- scripts/test-ssh-container.sh | 44 ++ src/commands/supervise.rs | 51 +- src/commands/up.rs | 91 ++- src/compute.rs | 155 ++++- src/config.rs | 29 + src/jobs/mod.rs | 17 + src/jobs/ssh.rs | 174 ++++-- src/jobs/ssh/container.rs | 350 +++++++++++ src/jobs/ssh/container/tests.rs | 563 ++++++++++++++++++ src/local/hf.rs | 1 + src/local/k8s.rs | 1 + src/local/localrun.rs | 1 + src/local/modal.rs | 1 + src/local/openresearch.rs | 1 + src/local/ray.rs | 1 + src/local/slurm.rs | 2 + src/local/ssh.rs | 86 +-- src/main.rs | 8 +- src/telemetry.rs | 65 ++ .../{index-Ph8YqAap.js => index-C3cRg0nD.js} | 420 ++++++------- ui/dist/index.html | 2 +- ui/messages/ar.json | 7 +- ui/messages/en.json | 7 +- ui/messages/es.json | 7 +- ui/messages/fa.json | 7 +- ui/messages/hi.json | 7 +- ui/messages/zh-CN.json | 7 +- ui/src/api.ts | 21 +- ui/src/components/RemoteHostDialog.tsx | 6 +- ui/src/components/SettingsPage.tsx | 134 +++-- ui/src/components/SshExecutionSettings.tsx | 65 ++ ui/src/queries/invalidation.ts | 2 +- ui/src/queries/settings.ts | 8 +- ui/tests/workspaceConnection.test.mjs | 4 +- 35 files changed, 2006 insertions(+), 394 deletions(-) create mode 100755 scripts/test-ssh-container.sh create mode 100644 src/jobs/ssh/container.rs create mode 100644 src/jobs/ssh/container/tests.rs rename ui/dist/assets/{index-Ph8YqAap.js => index-C3cRg0nD.js} (58%) create mode 100644 ui/src/components/SshExecutionSettings.tsx diff --git a/agent-skills/orx-compute/references/ssh.md b/agent-skills/orx-compute/references/ssh.md index e29ba433..7f35e736 100644 --- a/agent-skills/orx-compute/references/ssh.md +++ b/agent-skills/orx-compute/references/ssh.md @@ -1,20 +1,47 @@ # SSH (`--backend ssh`) -Use this backend only when the user explicitly asks to run on their own machine -or server, or when it is the configured default. It runs a detached process on -a host from `~/.ssh/config` using that host's environment. +Use this backend when the user asks to run on their own server, or when SSH is +the configured compute default. Authentication uses SSH config, keys and the +agent; `orx` never reads private keys. ```sh -orx exp run --backend ssh --host my-gpu-box +orx exp run --backend ssh --host lab +orx exp run --backend ssh --host lab --container research +orx exp run --backend ssh --host lab --no-container ``` -- `--host` is required on every launch and must be an SSH config alias. There is - no flavor. -- Authentication uses the user's SSH keys or agent. `orx` invokes SSH but never - reads a private key. The host needs `bash` and `tar`. -- The committed snapshot is streamed to the host and extracted before the fixed - run command starts. -- There is no image or timeout flag; the host environment is used as-is. -- Runs live under `~/.orx/runs//` on the host. Cancellation terminates - the remote process group. -- A detached `orx supervise` process polls the host; do not kill it. +Machine-local SSH settings can save a container name or ID for each host. +A saved default SSH host lets launches omit `--host`. +These defaults apply only to SSH experiments; dashboards, terminals and coding +agents still connect directly to the host. + +- Omitted container selection uses the host's saved target. `--container` + overrides it; `--no-container` explicitly runs on the host. The flags conflict. + +Keep environment preparation in the project's committed setup/run scripts and +invoke them through the fixed run command, just as with other backends. For +example, a committed `run.sh` can source Conda, activate the environment, and +then run the experiment. Those paths must exist in the selected execution +environment (host or container). There is no separate SSH setup command. + +The SSH host needs Bash and tar. Container execution also requires host Docker +access and an already running, unpaused Linux container with Bash, tar, working +`setsid --wait`, and an absolute writable `$HOME`. Execution uses the container's +configured user. There is no `sudo`, user override, Podman support, container +creation or lifecycle management. `--image` and `--flavor` are unsupported. + +The committed source archive is cached on the host, then streamed into the +container's `$HOME/.orx/runs//repo`. Host logs and exit status stay in the +host's `~/.orx/runs//`, so container removal does not erase them. A detached +supervisor reattaches using the saved container ID and start time; later settings +changes cannot redirect an existing run. Do not kill the supervisor. + +Cancellation targets only the experiment process group, waits five seconds for +TERM, then uses KILL if needed. It leaves the container and unrelated processes +running. Paused containers must be unpaused by the user before cancellation can +finish. Stopping, removing or restarting a container fails its experiment. +Docker/SSH outages are retried rather than reported as container removal. + +Host authentication and container readiness are separate checks. Preflight must +check the explicitly selected container; host readiness does not imply container +readiness. diff --git a/scripts/test-ssh-container.sh b/scripts/test-ssh-container.sh new file mode 100755 index 00000000..716fc001 --- /dev/null +++ b/scripts/test-ssh-container.sh @@ -0,0 +1,44 @@ +#!/usr/bin/env bash +set -euo pipefail +# Only the uniquely named test containers are changed or removed. +fixture=$(mktemp -d) +prefix="orx-ssh-test-$$" +cleanup() { + docker rm -f "$prefix-host" "$prefix-inner" >/dev/null 2>&1 || true + docker image rm "$prefix" >/dev/null 2>&1 || true + rm -rf "$fixture" +} +trap cleanup EXIT +ssh-keygen -q -t ed25519 -N '' -f "$fixture/key" +cat > "$fixture/Dockerfile" <<'DOCKER' +FROM docker:28-cli +RUN apk add --no-cache openssh bash util-linux coreutils procps && ssh-keygen -A && mkdir -p /root/.ssh && chmod 700 /root/.ssh +COPY key.pub /root/.ssh/authorized_keys +COPY ssh-dispatch /usr/local/bin/ssh-dispatch +RUN chmod +x /usr/local/bin/ssh-dispatch && echo "ForceCommand /usr/local/bin/ssh-dispatch" >> /etc/ssh/sshd_config +RUN chmod 600 /root/.ssh/authorized_keys +ENTRYPOINT ["/usr/sbin/sshd", "-D", "-e"] +DOCKER +cat > "$fixture/ssh-dispatch" <<'DISPATCH' +#!/bin/sh +case "$SSH_ORIGINAL_COMMAND" in + *'date +%s > launch_time'*) + if [ -f /tmp/drop-launch-ack ]; then + rm /tmp/drop-launch-ack + sh -c "$SSH_ORIGINAL_COMMAND" + exit 255 + fi ;; +esac +exec sh -c "$SSH_ORIGINAL_COMMAND" +DISPATCH +docker build -q -t "$prefix" "$fixture" +docker run -d --name "$prefix-host" -p 127.0.0.1::22 -v /var/run/docker.sock:/var/run/docker.sock "$prefix" +docker run -d --name "$prefix-inner" --user 1000:1000 --env CONDA_ENVS_PATH=/tmp/conda-envs --env "HOME=/tmp/orx home'quoted" --entrypoint bash condaforge/miniforge3 -c 'mkdir -p "$HOME"; exec sleep infinity' +port=$(docker port "$prefix-host" 22/tcp) +export ORX_SSH_TEST_PORT="${port##*:}" ORX_SSH_TEST_KEY="$fixture/key" ORX_SSH_TEST_CONTAINER="$prefix-inner" +for attempt in {1..30}; do + if ssh -i "$fixture/key" -p "$ORX_SSH_TEST_PORT" -o StrictHostKeyChecking=no -o UserKnownHostsFile=/dev/null -o BatchMode=yes root@127.0.0.1 true 2>/dev/null; then break; fi + sleep 1 +done +cargo build --locked +cargo test --locked ssh_container_lifecycle -- --ignored --nocapture diff --git a/src/commands/supervise.rs b/src/commands/supervise.rs index abecc4f1..3e6f2d82 100644 --- a/src/commands/supervise.rs +++ b/src/commands/supervise.rs @@ -584,7 +584,15 @@ async fn run_ssh( eprintln!("supervise {run_id}: watching ssh job {host}:{dir}"); let target = ssh::SshTarget::alias(host); let dir = dir.to_string(); - watch_ssh_job(&store, status_of(&stored)?, target, dir, &run_id).await?; + watch_ssh_job( + &store, + status_of(&stored)?, + target, + dir, + descriptor.ssh_container, + &run_id, + ) + .await?; Ok(()) } @@ -596,6 +604,7 @@ async fn watch_ssh_job( initial_status: RunStatus, target: ssh::SshTarget, dir: String, + container: Option, run_id: &str, ) -> Result { let path = log_path(run_id); @@ -610,9 +619,10 @@ async fn watch_ssh_job( let mut last_status = initial_status; let mut cancel_sent = false; + let mut last_message = None; loop { - let job = match ssh::inspect_job(&target, &dir).await { + let job = match ssh::inspect_job(&target, &dir, container.as_ref()).await { Ok(j) => j, Err(err) => { eprintln!("supervise {run_id}: inspect failed (will retry): {err}"); @@ -645,15 +655,32 @@ async fn watch_ssh_job( return Ok(status); } + if container.is_some() && job.message != last_message { + let message = format!( + "[orx] {}", + job.message.as_deref().unwrap_or("Container running.") + ); + let command = format!( + "printf '%s\\n' {} >> \"$HOME/{dir}/log\"", + ssh::sh_quote(&message) + ); + match ssh::ssh_run(&target, &command, None).await { + Ok(_) => last_message = job.message, + Err(error) => { + eprintln!("supervise {run_id}: could not log container status: {error}") + } + } + } + if status != last_status && store.update_status(run_id, status, None, None)? { let cancel_requested = local_cancel_requested(store, run_id); eprintln!("supervise {run_id}: {last_status} -> {status} (stage {stage})"); last_status = status; if cancel_requested && !cancel_sent { - cancel_ssh(&target, &dir, run_id, &mut cancel_sent).await; + cancel_ssh(&target, &dir, container.as_ref(), run_id, &mut cancel_sent).await; } } else if !cancel_sent && local_cancel_requested(store, run_id) { - cancel_ssh(&target, &dir, run_id, &mut cancel_sent).await; + cancel_ssh(&target, &dir, container.as_ref(), run_id, &mut cancel_sent).await; } tokio::time::sleep(POLL_INTERVAL).await; @@ -701,9 +728,15 @@ async fn tail_logs_ssh( } } -async fn cancel_ssh(target: &ssh::SshTarget, dir: &str, run_id: &str, cancel_sent: &mut bool) { +async fn cancel_ssh( + target: &ssh::SshTarget, + dir: &str, + container: Option<&ssh::ContainerRun>, + run_id: &str, + cancel_sent: &mut bool, +) { eprintln!("supervise {run_id}: cancel requested — killing remote process group"); - match ssh::cancel_job(target, dir).await { + match ssh::cancel_job(target, dir, container).await { Ok(()) => *cancel_sent = true, Err(err) => eprintln!("supervise {run_id}: ssh cancel failed (will retry): {err}"), } @@ -839,13 +872,15 @@ async fn run_openresearch( teardown_box(&store, &lifecycle, &sandbox_id, &run_id).await; return Ok(()); } - let staged = ssh::stage_source(&target, &run_id, &source.path, &source.digest).await; + let staged = + ssh::stage_source(&target, &run_id, &source.path, &source.digest, None).await; if let Err(err) = staged { eprintln!("supervise {run_id}: source staging failed (will retry): {err}"); launch_err = Some(err); continue; } match ssh::run_job(&ssh::SshJobSpec { + container: None, target: target.clone(), run_id: run_id.clone(), script: script.clone(), @@ -885,7 +920,7 @@ async fn run_openresearch( // The shared ssh loop owns status and logs; the box is deleted after // it returns (logs are drained from the box BEFORE teardown), and even // when it errors. - let watch = watch_ssh_job(&store, status_of(&stored)?, target, dir, &run_id).await; + let watch = watch_ssh_job(&store, status_of(&stored)?, target, dir, None, &run_id).await; teardown_box(&store, &lifecycle, &sandbox_id, &run_id).await; watch?; Ok(()) diff --git a/src/commands/up.rs b/src/commands/up.rs index a431b37b..ccb37fbf 100644 --- a/src/commands/up.rs +++ b/src/commands/up.rs @@ -592,7 +592,11 @@ fn router(state: AppState, remote_auth: Option) -> Router { "/api/projects/{id}/ui-state", get(project_ui_state).post(set_project_ui_state), ) - .route("/api/settings/ssh", get(ssh_settings)) + .route( + "/api/settings/ssh", + get(ssh_settings).post(save_ssh_settings), + ) + .route("/api/settings/ssh/default", post(save_ssh_default)) .route("/api/settings/ssh/master", get(ssh_master_status)) .route("/api/settings/ssh/preflight", post(ssh_preflight)) .route("/api/settings/ssh/connect", get(ssh_connect)) @@ -1927,6 +1931,9 @@ struct CreateRunReq { backend: Option, flavor: Option, host: Option, + container: Option, + #[serde(default)] + no_container: bool, manifest: Option, image: Option, timeout: Option, @@ -2004,6 +2011,8 @@ pub(crate) async fn submit_run_via_up( backend: args.backend.clone(), flavor: args.flavor.clone(), host: args.host.clone(), + container: args.container.clone(), + no_container: args.no_container, manifest: args.manifest.clone(), image: args.image.clone(), timeout: args.timeout.clone(), @@ -2068,6 +2077,8 @@ async fn create_run(State(state): State, Json(req): Json flavor, org: req.org, host: req.host, + container: req.container, + no_container: req.no_container, manifest: req.manifest, image: req.image, timeout: req.timeout, @@ -6072,6 +6083,16 @@ fn list_ssh_hosts() -> Vec { async fn ssh_settings() -> ApiResult { tokio::task::spawn_blocking(|| { let mut hosts = list_ssh_hosts(); + let settings = crate::config::ssh_settings()?; + for host in &mut hosts { + let options = host + .get("host") + .and_then(Value::as_str) + .and_then(|host| settings.hosts.get(host)) + .cloned() + .unwrap_or_default(); + host["container"] = json!(options.container); + } // Best-effort, like the preflight write: a store hiccup shouldn't take // out the host listing — hosts just render as never tested. let tests: HashMap = Store::open() @@ -6093,12 +6114,52 @@ async fn ssh_settings() -> ApiResult { }; h["lastTest"] = json!(t); } - Ok(Json(json!({ "hosts": hosts }))) + Ok(Json( + json!({ "hosts": hosts, "defaultHost": settings.default_host }), + )) }) .await .map_err(|e| ApiError::from(anyhow!("ssh task failed: {e}")))? } +#[derive(Deserialize)] +#[serde(rename_all = "camelCase", deny_unknown_fields)] +struct SaveSshSettingsReq { + host: String, + container: Option, +} + +async fn save_ssh_settings(Json(req): Json) -> ApiResult { + let host = req.host.trim().to_string(); + require_configured_ssh_host(&host)?; + let options = crate::config::SshHostSettings { + container: req.container, + }; + crate::jobs::ssh::validate_host_options(&options).map_err(bad_request)?; + blocking_api(move || { + crate::config::set_ssh_host(host, options)?; + Ok(Json(json!({"ok": true}))) + }) + .await +} + +#[derive(Deserialize)] +struct SaveSshDefaultReq { + host: Option, +} + +async fn save_ssh_default(Json(req): Json) -> ApiResult { + let host = req.host.map(|host| host.trim().to_string()); + if let Some(host) = &host { + require_configured_ssh_host(host)?; + } + blocking_api(move || { + crate::config::set_ssh_default(host)?; + Ok(Json(json!({"ok": true}))) + }) + .await +} + fn ssh_config_path() -> Result { Ok(dirs::home_dir() .ok_or_else(|| anyhow!("no home directory"))? @@ -6177,6 +6238,7 @@ async fn save_ssh_config(Json(req): Json) -> ApiResult { #[derive(Deserialize)] struct SshPreflightReq { host: String, + container: Option, } async fn ssh_master_status(Query(req): Query) -> ApiResult { @@ -6201,7 +6263,27 @@ async fn ssh_preflight(Json(req): Json) -> ApiResult { if host.is_empty() { return Err(bad_request("host is required")); } - Ok(Json(json!(run_ssh_host_preflight(host).await))) + require_configured_ssh_host(&host)?; + if let Some(reference) = &req.container { + crate::jobs::ssh::validate_container_reference(reference).map_err(bad_request)?; + } + let test = run_ssh_host_preflight(host.clone()).await; + let container = if let Some(reference) = req.container { + let result = crate::jobs::ssh::resolve_container( + &crate::jobs::ssh::SshTarget::alias(&host), + &reference, + ) + .await; + Some( + json!({"reference": reference, "ready": result.is_ok(), "error": result.err().map(|error| error.to_string())}), + ) + } else { + None + }; + let mut result = + serde_json::to_value(test).map_err(|error| ApiError::from(anyhow!("{error}")))?; + result["container"] = json!(container); + Ok(Json(result)) } fn require_configured_ssh_host(host: &str) -> Result<(), ApiError> { @@ -8184,6 +8266,7 @@ mod tests { async fn windows_ssh_master_status_is_not_a_disconnection() { let response = ssh_master_status(Query(SshPreflightReq { host: "unused-host".into(), + container: None, })) .await .unwrap_or_else(|error| panic!("{}", error.1)); @@ -8438,6 +8521,8 @@ mod tests { backend: Some("local".into()), flavor: None, host: None, + container: None, + no_container: false, manifest: None, image: None, timeout: None, diff --git a/src/compute.rs b/src/compute.rs index 423e9ee0..a845428d 100644 --- a/src/compute.rs +++ b/src/compute.rs @@ -523,35 +523,52 @@ backend_adapter!( run_id | crate::local::k8s::submit_local_k8s_with_source(args, source, run_id).await ); -backend_adapter!( - SshCompute, - "ssh", - "SSH", - true, - false, - false, - "SSH tar stream", - false, - preflight | args | { - let host = args - .host - .as_deref() - .ok_or_else(|| anyhow!("SSH requires --host ."))?; - let check = crate::jobs::ssh::preflight(&crate::jobs::ssh::SshTarget::alias(host)).await; - if !check.reachable || !check.tools_found { - return Ok(not_ready( - check - .error - .as_deref() - .unwrap_or("The SSH host needs bash and tar."), - )); +#[derive(Default)] +pub struct SshCompute { + launch: tokio::sync::OnceCell, +} + +#[async_trait] +impl ComputeBackend for SshCompute { + fn capabilities(&self) -> Capabilities { + Capabilities { + id: "ssh", + label: "SSH", + remote: true, + flavors: false, + requires_flavor: false, + source_transport: "SSH tar stream", } + } + + async fn preflight(&self, args: &crate::ExpRunArgs) -> Result { + self.launch + .get_or_try_init(|| crate::jobs::ssh::resolve_launch(args)) + .await?; ready() - }, - submit | args, - source, - run_id | crate::local::ssh::submit_local_ssh_with_source(args, source, run_id).await -); + } + + async fn stage_source( + &self, + project: &LocalProject, + experiment: &LocalExperiment, + ) -> Result { + stage_snapshot(project, experiment, false).await + } + + async fn submit( + &self, + args: &crate::ExpRunArgs, + source: StagedSource, + run_id: String, + ) -> Result { + let launch = self + .launch + .get() + .ok_or_else(|| anyhow!("SSH launch was not prepared."))?; + crate::local::ssh::submit_local_ssh_with_source(args, source.0, run_id, launch).await + } +} backend_adapter!( SlurmCompute, @@ -633,7 +650,7 @@ pub fn backend(id: &str) -> Result> { "hf" => Ok(Box::new(HuggingFaceCompute)), "modal" => Ok(Box::new(ModalCompute)), "k8s" => Ok(Box::new(KubernetesCompute)), - "ssh" => Ok(Box::new(SshCompute)), + "ssh" => Ok(Box::new(SshCompute::default())), "slurm" => Ok(Box::new(SlurmCompute)), "ray" => Ok(Box::new(RayCompute)), "openresearch" => Ok(Box::new(OpenResearchCompute)), @@ -650,6 +667,20 @@ pub fn capabilities() -> Vec { } pub fn validate_run_args(args: &crate::ExpRunArgs) -> Result<()> { + if (args.container.is_some() || args.no_container) && args.backend.as_deref() != Some("ssh") { + return Err(anyhow!( + "--container and --no-container only apply with --backend ssh." + )); + } + if args.container.is_some() && args.no_container { + return Err(anyhow!("--container conflicts with --no-container.")); + } + if let Some(reference) = &args.container { + crate::jobs::ssh::validate_container_reference(reference)?; + } + if args.backend.as_deref() == Some("ssh") && (args.image.is_some() || args.flavor.is_some()) { + return Err(anyhow!("SSH does not support --flavor or --image.")); + } if args.manifest.is_some() && args.backend.as_deref() != Some("k8s") { return Err(anyhow!("--manifest only applies with --backend k8s.")); } @@ -724,6 +755,7 @@ pub async fn submit(args: &crate::ExpRunArgs) -> Result { }) .unwrap_or_default(); let mut descriptor = BackendDescriptor { + ssh_container: None, kind: format!("{}_job", backend_id), namespace: None, job_id: None, @@ -891,6 +923,8 @@ mod tests { flavor: None, org: None, host: None, + container: None, + no_container: false, manifest: None, image: None, timeout: None, @@ -899,6 +933,71 @@ mod tests { } } + #[test] + fn ssh_selectors_and_saved_target_precedence() { + use crate::config::{SshHostSettings, SshSettings}; + let settings = SshSettings { + default_host: Some("lab".into()), + hosts: std::collections::BTreeMap::from([ + ( + "lab".into(), + SshHostSettings { + container: Some("research".into()), + }, + ), + ("direct".into(), SshHostSettings { container: None }), + ]), + }; + let mut args = tinker_args(); + args.backend = Some("ssh".into()); + for (host, container, no_container, expected_host, expected_container) in [ + (None, None, false, "lab", Some("research")), + ( + Some("lab"), + Some("research"), + false, + "lab", + Some("research"), + ), + (None, Some("other"), false, "lab", Some("other")), + (None, Some("none"), false, "lab", Some("none")), + (None, None, true, "lab", None), + (Some("direct"), None, true, "direct", None), + (Some("unknown"), None, false, "unknown", None), + ] { + args.host = host.map(str::to_string); + args.container = container.map(str::to_string); + args.no_container = no_container; + validate_run_args(&args).unwrap(); + let (host, options) = crate::jobs::ssh::resolve_options(&args, &settings).unwrap(); + assert_eq!(host, expected_host); + assert_eq!(options.container.as_deref(), expected_container); + } + args.host = None; + assert!(crate::jobs::ssh::resolve_options(&args, &SshSettings::default()).is_err()); + args.container = Some(String::new()); + assert!(validate_run_args(&args).is_err()); + args.container = Some("research".into()); + args.no_container = true; + assert!(validate_run_args(&args).is_err()); + args.no_container = false; + for backend in ["local", "slurm", "openresearch"] { + args.backend = Some(backend.into()); + assert!(validate_run_args(&args).is_err()); + } + use clap::Parser; + assert!(crate::Cli::try_parse_from([ + "orx", + "exp", + "run", + "exp", + "--container", + "research", + "--no-container" + ]) + .is_err()); + } + #[test] fn tinker_is_registered_as_a_local_controller_without_flavors() { let capabilities = backend("tinker").unwrap().capabilities(); diff --git a/src/config.rs b/src/config.rs index ace82005..1d710706 100644 --- a/src/config.rs +++ b/src/config.rs @@ -431,3 +431,32 @@ pub fn write_synced_env_vars(values: &[(&str, &str)]) -> Result<()> { } Ok(()) } + +#[derive(Debug, Clone, Default, Serialize, Deserialize, PartialEq, Eq)] +#[serde(rename_all = "camelCase")] +pub struct SshHostSettings { + pub container: Option, +} + +#[derive(Debug, Clone, Default, Serialize, Deserialize)] +#[serde(rename_all = "camelCase")] +pub struct SshSettings { + pub default_host: Option, + #[serde(default)] + pub hosts: std::collections::BTreeMap, +} + +pub fn ssh_settings() -> Result { + crate::telemetry::ssh_settings() +} + +pub fn set_ssh_host(host: String, options: SshHostSettings) -> Result<()> { + crate::jobs::ssh::validate_host_options(&options)?; + crate::telemetry::set_ssh_host(host, options)?; + Ok(()) +} + +pub fn set_ssh_default(host: Option) -> Result<()> { + crate::telemetry::set_ssh_default(host)?; + Ok(()) +} diff --git a/src/jobs/mod.rs b/src/jobs/mod.rs index cf780622..6a74f3b6 100644 --- a/src/jobs/mod.rs +++ b/src/jobs/mod.rs @@ -50,6 +50,8 @@ pub fn default_python_env(env: &HashMap) -> HashMap, pub kind: String, #[serde(skip_serializing_if = "Option::is_none")] pub namespace: Option, @@ -249,6 +251,7 @@ mod tests { fn openresearch_descriptor() -> BackendDescriptor { BackendDescriptor { + ssh_container: None, kind: "openresearch_job".to_string(), namespace: Some("org_1".to_string()), job_id: Some("sb_1".to_string()), @@ -301,6 +304,20 @@ mod tests { assert_eq!(d.ssh_ref().unwrap(), ("mybox", ".orx/runs/r1")); assert_eq!(d.ssh_host, None); assert_eq!(d.timeout_secs, None); + assert_eq!(d.ssh_container, None); + let mut d = d; + d.ssh_container = Some(ssh::ContainerRun { + reference: "research".into(), + id: "immutable-id".into(), + started_at: "2026-09-21T00:00:00Z".into(), + run_dir: "/home/user/.orx/runs/r1".into(), + }); + let json = d.to_json(); + assert!(json.contains("sshContainer")); + assert_eq!( + BackendDescriptor::parse(&json).unwrap().ssh_container, + d.ssh_container + ); } #[test] diff --git a/src/jobs/ssh.rs b/src/jobs/ssh.rs index 0cf5167a..303260ff 100644 --- a/src/jobs/ssh.rs +++ b/src/jobs/ssh.rs @@ -14,6 +14,11 @@ //! exit_code written when the payload finishes //! A restarted `orx supervise` reattaches purely from that directory. +mod container; +pub use container::{ + resolve as resolve_container, validate_reference as validate_container_reference, ContainerRun, +}; + use std::collections::HashMap; #[cfg(unix)] use std::path::PathBuf; @@ -65,6 +70,63 @@ fn prepare_control_dir() -> Result<()> { Ok(()) } +#[derive(Debug, Clone)] +pub struct ResolvedLaunch { + pub target: SshTarget, + pub container: Option, +} + +pub fn validate_host_options(options: &crate::config::SshHostSettings) -> Result<()> { + if let Some(reference) = &options.container { + validate_container_reference(reference)?; + } + Ok(()) +} + +pub fn resolve_options( + args: &crate::ExpRunArgs, + settings: &crate::config::SshSettings, +) -> Result<(String, crate::config::SshHostSettings)> { + let host = args + .host + .as_ref() + .or(settings.default_host.as_ref()) + .filter(|host| !host.trim().is_empty()) + .ok_or_else(|| { + anyhow!("SSH requires --host or a default host saved in SSH compute settings.") + })? + .clone(); + let saved = settings.hosts.get(&host).cloned().unwrap_or_default(); + let container = if args.no_container { + None + } else { + args.container.clone().or_else(|| saved.container.clone()) + }; + let options = crate::config::SshHostSettings { container }; + validate_host_options(&options)?; + Ok((host, options)) +} + +pub async fn resolve_launch(args: &crate::ExpRunArgs) -> Result { + let settings = crate::config::ssh_settings()?; + let (host, options) = resolve_options(args, &settings)?; + let target = SshTarget::alias(&host); + let host_check = preflight(&target).await; + if !host_check.reachable || !host_check.tools_found { + return Err(anyhow!( + "{}", + host_check + .error + .unwrap_or_else(|| "SSH host needs bash and tar.".into()) + )); + } + let container = match options.container { + Some(reference) => Some(container::resolve(&target, &reference).await?), + None => None, + }; + Ok(ResolvedLaunch { target, container }) +} + /// An ssh endpoint. The classic ssh backend connects by `~/.ssh/config` alias /// (`SshTarget::alias`); backends that learn an endpoint at runtime (an /// OpenResearch box on a provider-assigned host:port) pass an explicit @@ -366,6 +428,7 @@ pub async fn stage_source( run_id: &str, archive: &std::path::Path, digest: &str, + container: Option<&ContainerRun>, ) -> Result { let dir = format!(".orx/runs/{run_id}"); let cache = format!(".orx/source/{digest}.tar"); @@ -382,16 +445,24 @@ pub async fn stage_source( ); ssh_run_file(target, &upload, archive).await?; } - ssh_run( - target, - &format!( - "umask 077; mkdir -p \"$HOME/.orx/runs\" \"$HOME/{dir}/repo\"; \ + if let Some(container) = container { + container.require_running(target).await?; + let path = sh_quote(&container.run_dir); + let extract = container.exec(&format!("set -e; umask 077; mkdir -p {path}/repo; chmod 700 {path} {path}/repo; tar -xf - -C {path}/repo")); + // Start the bound here too: submission may fail before detached launch. + ssh_run(target, &format!("umask 077; mkdir -p \"$HOME/{dir}\" && chmod 700 \"$HOME/{dir}\" && {extract} < \"$HOME/{cache}\" && date +%s > \"$HOME/{dir}/launch_time.tmp\" && mv \"$HOME/{dir}/launch_time.tmp\" \"$HOME/{dir}/launch_time\""), None).await?; + } else { + ssh_run( + target, + &format!( + "umask 077; mkdir -p \"$HOME/.orx/runs\" \"$HOME/{dir}/repo\"; \ chmod 700 \"$HOME/.orx/runs\" \"$HOME/{dir}\" \"$HOME/{dir}/repo\"; \ tar -xf \"$HOME/{cache}\" -C \"$HOME/{dir}/repo\"" - ), - None, - ) - .await?; + ), + None, + ) + .await?; + } Ok(dir) } @@ -409,8 +480,20 @@ pub struct SshJobSpec { pub script: String, /// Exported inside run.sh on the remote (tokens, synced env). pub env: HashMap, + pub container: Option, } +#[derive(Debug)] +pub struct LaunchUncertain; + +impl std::fmt::Display for LaunchUncertain { + fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { + f.write_str("SSH launch acknowledgement failed") + } +} + +impl std::error::Error for LaunchUncertain {} + /// Submit the job: write run.sh, launch it detached, record its pid. Returns /// the remote run dir (relative to `$HOME`) — the reattach handle. pub async fn run_job(spec: &SshJobSpec) -> Result { @@ -421,31 +504,32 @@ pub async fn run_job(spec: &SshJobSpec) -> Result { .map(|(k, v)| format!("export {}={}", k, sh_quote(v))) .collect::>() .join("\n"); - // run.sh: set up env, run the payload capturing all output to `log`, then - // record the exit status. The payload runs in a SUBSHELL `( … )` — not a - // `{ … }` group — so an `exit`/`set -e` failure inside it ends the subshell, - // not run.sh, and we still reach `echo $? > exit_code`. - let run_sh = format!( - "#!/usr/bin/env bash\n{exports}\ncd \"$HOME/{dir}\" || exit 97\n(\n{script}\n) > log 2>&1\necho $? > exit_code\n", - script = spec.script, - ); + let run_sh = if let Some(container) = &spec.container { + container.require_running(&spec.target).await?; + let inner = container::inner_script(container, &exports, &spec.script); + container::upload_script(&spec.target, container, &inner).await?; + container::host_script(&dir, container) + } else { + let script = &spec.script; + // A payload exit must leave the outer shell alive to record its status. + format!("#!/usr/bin/env bash\ncd \"$HOME/{dir}\" || exit 97\n(\n{exports}\n{script}\n) > log 2>&1\necho $? > exit_code\n") + }; // Create the dir (owner-only) and write run.sh from stdin. let setup = format!( - "mkdir -p \"$HOME/{dir}\" && chmod 700 \"$HOME/{dir}\" && cat > \"$HOME/{dir}/run.sh\"", + "umask 077; mkdir -p \"$HOME/{dir}\" && chmod 700 \"$HOME/{dir}\" && cat > \"$HOME/{dir}/run.sh\"", ); ssh_run(&spec.target, &setup, Some(&run_sh)).await?; - // Launch detached so it survives the ssh channel closing. Prefer `setsid` - // (new session → pid == pgid, so cancel can TERM the whole group); fall back - // to `nohup` where setsid is absent (e.g. a macOS host). Record the pid. - let launch = format!( - "cd \"$HOME/{dir}\" && \ - if command -v setsid >/dev/null 2>&1; then setsid bash run.sh /dev/null 2>&1 & \ - else nohup bash run.sh /dev/null 2>&1 & fi; \ - echo $! > pid", - ); - ssh_run(&spec.target, &launch, None).await?; + // The container host wrapper records its own PID; direct runs retain the existing launcher. + let launch = if spec.container.is_some() { + format!("cd \"$HOME/{dir}\" && date +%s > launch_time.tmp && mv launch_time.tmp launch_time && {{ if command -v setsid >/dev/null 2>&1; then setsid bash run.sh /dev/null 2>&1 & else nohup bash run.sh /dev/null 2>&1 & fi; }}") + } else { + format!("cd \"$HOME/{dir}\" && if command -v setsid >/dev/null 2>&1; then setsid bash run.sh /dev/null 2>&1 & else nohup bash run.sh /dev/null 2>&1 & fi; echo $! > pid") + }; + ssh_run(&spec.target, &launch, None) + .await + .map_err(|error| error.context(LaunchUncertain))?; Ok(dir) } @@ -456,7 +540,18 @@ pub struct JobState { pub message: Option, } -pub async fn inspect_job(target: &SshTarget, dir: &str) -> Result { +pub async fn inspect_job( + target: &SshTarget, + dir: &str, + container: Option<&ContainerRun>, +) -> Result { + match container { + Some(container) => container::inspect(target, dir, container).await, + None => inspect_host_job(target, dir).await, + } +} + +async fn inspect_host_job(target: &SshTarget, dir: &str) -> Result { // exit_code present -> finished; pid alive -> running; pid dead & no // exit_code -> killed/crashed; no pid yet -> just starting. let cmd = format!( @@ -466,10 +561,13 @@ pub async fn inspect_job(target: &SshTarget, dir: &str) -> Result { elif [ -f \"$d/pid\" ]; then echo DEAD; else echo PENDING; fi", ); let out = ssh_run(target, &cmd, None).await?; - let out = out.trim(); + Ok(parse_job_state(out.trim())) +} + +fn parse_job_state(out: &str) -> JobState { if let Some(code) = out.strip_prefix("EXIT ") { let code: i32 = code.trim().parse().unwrap_or(-1); - return Ok(if code == 0 { + return if code == 0 { JobState { stage: "COMPLETED".into(), message: None, @@ -479,9 +577,9 @@ pub async fn inspect_job(target: &SshTarget, dir: &str) -> Result { stage: "ERROR".into(), message: Some(format!("exited with code {code}")), } - }); + }; } - Ok(match out { + match out { "RUNNING" | "PENDING" => JobState { stage: "RUNNING".into(), message: None, @@ -494,7 +592,7 @@ pub async fn inspect_job(target: &SshTarget, dir: &str) -> Result { stage: "RUNNING".into(), message: Some(format!("unexpected inspect output: {other}")), }, - }) + } } /// One poll of the remote log past `skip` lines. Unlike the streaming backends @@ -524,7 +622,15 @@ pub async fn stream_logs( /// Cancel = TERM the process group if we have one (setsid case), else the pid /// (nohup fallback). The negative-pid form targets the whole group. -pub async fn cancel_job(target: &SshTarget, dir: &str) -> Result<()> { +pub async fn cancel_job( + target: &SshTarget, + dir: &str, + container: Option<&ContainerRun>, +) -> Result<()> { + if let Some(container) = container { + container::cancel(target, container).await?; + } + let cmd = format!( "p=$(cat \"$HOME/{dir}/pid\" 2>/dev/null); \ [ -n \"$p\" ] && {{ kill -TERM -\"$p\" 2>/dev/null || kill -TERM \"$p\" 2>/dev/null; }}; true", diff --git a/src/jobs/ssh/container.rs b/src/jobs/ssh/container.rs new file mode 100644 index 00000000..6c0698b1 --- /dev/null +++ b/src/jobs/ssh/container.rs @@ -0,0 +1,350 @@ +use serde::{Deserialize, Serialize}; + +use super::{sh_quote, ssh_run, JobState, SshTarget}; +use crate::error::{anyhow, Result}; + +#[derive(Debug, Clone, Serialize, Deserialize, PartialEq, Eq)] +#[serde(rename_all = "camelCase")] +pub struct ContainerRun { + pub reference: String, + pub id: String, + pub started_at: String, + pub run_dir: String, +} + +#[derive(Deserialize)] +struct Inspection { + id: String, + status: String, + started_at: String, +} + +pub fn validate_reference(reference: &str) -> Result<()> { + if reference.is_empty() + || !reference.starts_with(|c: char| c.is_ascii_alphanumeric()) + || !reference + .chars() + .all(|c| c.is_ascii_alphanumeric() || "_.-".contains(c)) + { + return Err(anyhow!( + "Container must be a Docker name or ID (letters, numbers, '.', '_' or '-')." + )); + } + Ok(()) +} + +async fn inspection(target: &SshTarget, reference: &str) -> Result> { + let template = r#"{"id":{{json .Id}},"status":{{json .State.Status}},"started_at":{{json .State.StartedAt}}}"#; + match ssh_run( + target, + &format!( + "docker container inspect --format {} -- {}", + sh_quote(template), + sh_quote(reference) + ), + None, + ) + .await + { + Ok(output) => Ok(Some(serde_json::from_str(output.trim())?)), + Err(error) => { + // A successful listing distinguishes absence from an unreachable Docker daemon. + let list = ssh_run( + target, + "docker container ls --all --no-trunc --format '{{.ID}} {{.Names}}'", + None, + ) + .await?; + if list.lines().any(|line| { + line.split_whitespace().any(|value| { + value == reference || (value.len() == 64 && value.starts_with(reference)) + }) + }) { + Err(error) + } else { + Ok(None) + } + } + } +} + +pub async fn resolve(target: &SshTarget, reference: &str) -> Result { + validate_reference(reference)?; + let found = inspection(target, reference) + .await? + .ok_or_else(|| anyhow!("Container '{reference}' does not exist on {}.", target.dest))?; + if found.status != "running" { + return Err(anyhow!( + "Container '{reference}' is {}. Start or unpause it before running an experiment.", + found.status + )); + } + let probe = r#"set -e +[ "$(uname -s)" = Linux ] || { echo 'Container must run Linux' >&2; exit 1; } +command -v tar >/dev/null +if setsid --wait bash -c 'exit 42'; then rc=0; else rc=$?; fi +[ "$rc" = 42 ] || { echo 'Container needs working setsid --wait' >&2; exit 1; } +case "$HOME" in /*) ;; *) echo 'Container needs an absolute HOME' >&2; exit 1;; esac +[ -d "$HOME" ] && [ -w "$HOME" ] || { echo 'Container HOME is not writable' >&2; exit 1; } +printf '%s' "$HOME" +"#; + let home = ssh_run( + target, + &format!( + "docker exec {} bash -c {}", + sh_quote(&found.id), + sh_quote(probe) + ), + None, + ) + .await?; + if !home.starts_with('/') || home.contains(['\n', '\r', '\0']) { + return Err(anyhow!("Container returned an invalid home directory.")); + } + Ok(ContainerRun { + reference: reference.into(), + id: found.id, + started_at: found.started_at, + run_dir: format!("{}/.orx/runs", home.trim_end_matches('/')), + }) +} + +impl ContainerRun { + pub fn for_run(&self, run_id: &str) -> Self { + Self { + run_dir: format!("{}/{run_id}", self.run_dir), + ..self.clone() + } + } + + pub fn exec(&self, script: &str) -> String { + format!( + "docker exec -i {} bash -c {}", + sh_quote(&self.id), + sh_quote(script) + ) + } + + pub async fn require_running(&self, target: &SshTarget) -> Result<()> { + if let Some(reason) = unavailable(target, self).await? { + return Err(anyhow!("{reason}")); + } + Ok(()) + } +} + +async fn unavailable(target: &SshTarget, container: &ContainerRun) -> Result> { + let Some(found) = inspection(target, &container.id).await? else { + return Ok(Some(format!( + "Container '{}' was removed; host logs are preserved.", + container.reference + ))); + }; + if found.id != container.id || found.started_at != container.started_at { + return Ok(Some(format!( + "Container '{}' restarted; the experiment cannot resume.", + container.reference + ))); + } + Ok((found.status != "running") + .then(|| format!("Container '{}' is {}.", container.reference, found.status))) +} + +// Linux process start time prevents a recycled PID from identifying another experiment. +// Minimal containers need no procps; ignore zombies when checking the process group. +pub(super) const PROCESS_HELPERS: &str = r#" +start_time() { + local stat + IFS= read -r stat < "/proc/$1/stat" 2>/dev/null || return 1 + stat=${stat##*) } + local fields + read -ra fields <<< "$stat" + printf '%s' "${fields[19]}" +} +group_alive() { + local file stat fields + for file in /proc/[0-9]*/stat; do + IFS= read -r stat < "$file" 2>/dev/null || continue + stat=${stat##*) } + read -ra fields <<< "$stat" + if [ "${fields[2]}" = "$p" ] && [ "${fields[0]}" != Z ] && [ "${fields[0]}" != X ]; then return 0; fi + done + return 1 +} +"#; + +pub(super) fn inner_script(container: &ContainerRun, exports: &str, script: &str) -> String { + let dir = sh_quote(&container.run_dir); + format!( + r#"#!/usr/bin/env bash +{PROCESS_HELPERS} +umask 077 +cd {dir} || exit 97 +printf '%s %s\n' "$$" "$(start_time $$)" > identity.tmp +mv identity.tmp identity +[ ! -f cancel ] || exit 143 +( +set -eo pipefail +{exports} +{script} +) +exit "$?" +"# + ) +} + +pub(super) async fn upload_script( + target: &SshTarget, + container: &ContainerRun, + script: &str, +) -> Result<()> { + let dir = sh_quote(&container.run_dir); + ssh_run( + target, + &container.exec(&format!( + "umask 077; cat > {dir}/run.sh && chmod 600 {dir}/run.sh" + )), + Some(script), + ) + .await?; + Ok(()) +} + +pub(super) fn host_script(dir: &str, container: &ContainerRun) -> String { + let inner = sh_quote(&format!("{}/run.sh", container.run_dir)); + let check = sh_quote("{{.State.StartedAt}} {{.State.Status}}"); + let expected = sh_quote(&format!("{} running", container.started_at)); + let id = sh_quote(&container.id); + format!("#!/usr/bin/env bash\ncd \"$HOME/{dir}\" || exit 97\nprintf '%s\\n' \"$$\" > pid\n(\nactual=$(docker container inspect --format {check} -- {id}) || exit $?\n[ \"$actual\" = {expected} ] || {{ echo 'Container generation or readiness changed before launch' >&2; exit 97; }}\ndocker exec {id} setsid --wait bash {inner} > log 2>&1\nprintf '%s\\n' \"$?\" > exit_code\n") +} + +fn failed(message: String) -> JobState { + JobState { + stage: "ERROR".into(), + message: Some(message), + } +} + +async fn host_state(target: &SshTarget, dir: &str) -> Result { + ssh_run(target, &format!(r#"d="$HOME/{dir}"; if [ -f "$d/exit_code" ]; then echo "EXIT $(cat "$d/exit_code")"; elif [ -f "$d/pid" ] && kill -0 "$(cat "$d/pid")" 2>/dev/null; then echo RUNNING; else echo DEAD; fi; if [ -f "$d/launch_time" ]; then echo "$(( $(date +%s) - $(cat "$d/launch_time") ))"; else echo 0; fi"#), None).await +} + +pub(super) async fn inspect( + target: &SshTarget, + dir: &str, + container: &ContainerRun, +) -> Result { + let host = host_state(target, dir).await?; + let mut lines = host.lines(); + let state = lines.next().unwrap_or_default(); + if state.starts_with("EXIT ") { + return Ok(super::parse_job_state(state)); + } + let age: i64 = lines.next().unwrap_or("0").parse()?; + if let Some(reason) = unavailable(target, container).await? { + if reason.ends_with(" is paused.") { + return Ok(JobState { + stage: "RUNNING".into(), + message: Some(format!( + "{reason} Unpause it to continue or finish cancellation." + )), + }); + } + return Ok(failed(reason)); + } + let directory = sh_quote(&container.run_dir); + let probe = format!( + r#"{PROCESS_HELPERS} +cd {directory} || exit 1 +if [ ! -f identity ]; then echo PENDING; exit 0; fi +read -r p started < identity +current=$(start_time "$p") +if [ -n "$current" ] && [ "$current" != "$started" ]; then echo REUSED +elif group_alive; then echo RUNNING +else echo DEAD; fi +"# + ); + let inner = ssh_run(target, &container.exec(&probe), None).await?; + match inner.trim() { + "RUNNING" if state == "RUNNING" => Ok(JobState { + stage: "RUNNING".into(), + message: None, + }), + "PENDING" if age < 30 => Ok(JobState { + stage: "RUNNING".into(), + message: Some("Waiting for the container launcher.".into()), + }), + "RUNNING" | "PENDING" => { + if inner.trim() == "RUNNING" { + // The wrapper can start between the first host read and the inner probe. + let current = host_state(target, dir).await?; + let state = current.lines().next().unwrap_or_default(); + if state == "RUNNING" || state.starts_with("EXIT ") { + return Ok(super::parse_job_state(state)); + } + } + cancel(target, container).await?; + super::cancel_job(target, dir, None).await?; + Ok(failed("SSH launcher disappeared or did not start within 30 seconds; the container experiment was stopped.".into())) + } + "REUSED" => Ok(failed( + "The container experiment's process identity changed.".into(), + )), + "DEAD" => { + // The host wrapper may still be writing the final exit code. + let final_state = super::inspect_host_job(target, dir).await?; + if final_state.stage != "RUNNING" { + return Ok(final_state); + } + let waited = ssh_run(target, &format!(r#"d="$HOME/{dir}"; umask 077; if [ ! -f "$d/completion_wait" ]; then date +%s > "$d/completion_wait.tmp" && mv "$d/completion_wait.tmp" "$d/completion_wait"; fi; echo "$(( $(date +%s) - $(cat "$d/completion_wait") ))""#), None).await?; + if waited.trim().parse::()? >= 30 { + let final_state = super::inspect_host_job(target, dir).await?; + if final_state.stage != "RUNNING" { + return Ok(final_state); + } + super::cancel_job(target, dir, None).await?; + return Ok(failed("The container experiment ended, but the SSH launcher did not record its exit status within 30 seconds.".into())); + } + Ok(JobState { + stage: "RUNNING".into(), + message: Some("Waiting for the launcher to record the exit status.".into()), + }) + } + other => Err(anyhow!("Unexpected container process state: {other}")), + } +} + +pub(super) async fn cancel(target: &SshTarget, container: &ContainerRun) -> Result<()> { + if let Some(reason) = unavailable(target, container).await? { + if reason.ends_with(" is paused.") { + return Err(anyhow!("{reason} Unpause it to complete cancellation.")); + } + return Ok(()); + } + let directory = sh_quote(&container.run_dir); + let script = format!( + r#"{PROCESS_HELPERS} +cd {directory} || exit 1 +umask 077 +: > cancel +[ -f identity ] || exit 0 +read -r p started < identity +case "$p" in ''|*[!0-9]*) exit 1;; esac +[ "$p" -gt 1 ] || exit 1 +current=$(start_time "$p") +if [ -n "$current" ] && [ "$current" != "$started" ]; then echo 'Process identity changed; refusing to signal it' >&2; exit 1; fi +if ! group_alive; then exit 0; fi +kill -TERM -- -"$p" 2>/dev/null || true +for ((i=0; i<50; i++)); do group_alive || exit 0; sleep 0.1; done +kill -KILL -- -"$p" 2>/dev/null || true +for ((i=0; i<10; i++)); do group_alive || exit 0; sleep 0.1; done +echo 'Experiment process group is still alive' >&2 +exit 1 +"# + ); + ssh_run(target, &container.exec(&script), None).await?; + Ok(()) +} + +#[cfg(test)] +mod tests; diff --git a/src/jobs/ssh/container/tests.rs b/src/jobs/ssh/container/tests.rs new file mode 100644 index 00000000..d91dd2b7 --- /dev/null +++ b/src/jobs/ssh/container/tests.rs @@ -0,0 +1,563 @@ +use super::*; +use crate::jobs::ssh::{self, HostKeyPolicy, SshJobSpec}; +use std::{collections::HashMap, time::Duration}; + +async fn prepare( + target: &SshTarget, + reference: Option<&str>, + command: &str, +) -> (String, SshJobSpec) { + let id = uuid::Uuid::new_v4().to_string(); + let container = match reference { + Some(reference) => Some(resolve(target, reference).await.unwrap().for_run(&id)), + None => None, + }; + let temp = crate::local::git::TemporaryDirectory::new("orx-container-test").unwrap(); + std::fs::write(temp.path().join("source.txt"), "snapshot").unwrap(); + std::fs::write( + temp.path().join("run.sh"), + format!("set -eo pipefail\n{command}\n"), + ) + .unwrap(); + let archive = temp.path().join("source.tar"); + assert!(std::process::Command::new("tar") + .arg("-cf") + .arg(&archive) + .arg("-C") + .arg(temp.path()) + .arg("source.txt") + .arg("run.sh") + .status() + .unwrap() + .success()); + let dir = ssh::stage_source(target, &id, &archive, &id, container.as_ref()) + .await + .unwrap(); + let spec = SshJobSpec { + target: target.clone(), + run_id: id, + script: crate::compute::staged_script("bash run.sh"), + env: HashMap::from([( + "ORX_TEST_SECRET".into(), + "quote' and $literal\nsecond line".into(), + )]), + container, + }; + (dir, spec) +} + +async fn launch( + target: &SshTarget, + reference: Option<&str>, + command: &str, +) -> (String, Option) { + let (dir, spec) = prepare(target, reference, command).await; + ssh::run_job(&spec).await.unwrap(); + (dir, spec.container) +} + +async fn terminal(target: &SshTarget, dir: &str, container: Option<&ContainerRun>) -> JobState { + tokio::time::timeout(Duration::from_secs(45), async { + loop { + let state = ssh::inspect_job(target, dir, container).await.unwrap(); + if crate::jobs::is_terminal_stage(&state.stage) { + return state; + } + tokio::time::sleep(Duration::from_millis(100)).await; + } + }) + .await + .expect("run never became terminal") +} + +async fn logs(target: &SshTarget, dir: &str) -> String { + let mut output = String::new(); + ssh::stream_logs(target, dir, 0, Duration::ZERO, &mut |line| { + output.push_str(line); + output.push('\n'); + }) + .await + .unwrap(); + output +} + +#[test] +fn references_are_names_not_shell_or_docker_options() { + for value in ["", " ", "--help", "a/b", "a;id", "a\nb"] { + assert!(validate_reference(value).is_err()); + } + for value in ["none", "research-v1.2", "a_b", "012345abcdef"] { + validate_reference(value).unwrap(); + } +} + +#[tokio::test] +#[ignore = "requires disposable fixtures; run scripts/test-ssh-container.sh"] +async fn ssh_container_lifecycle() { + let port = std::env::var("ORX_SSH_TEST_PORT") + .expect("fixture port") + .parse() + .unwrap(); + let reference = std::env::var("ORX_SSH_TEST_CONTAINER").expect("fixture container"); + let mut target = SshTarget::host_port("root@127.0.0.1".into(), port, HostKeyPolicy::Ephemeral); + target.extra_opts.extend([ + "-i".into(), + std::env::var("ORX_SSH_TEST_KEY").expect("fixture key"), + ]); + let base = resolve(&target, &reference).await.unwrap(); + ssh_run( + &target, + &base.exec("/opt/conda/bin/conda create -y -n research --offline"), + None, + ) + .await + .unwrap(); + let setup = "source /opt/conda/etc/profile.d/conda.sh\nconda activate research\nprintf 'setup:%s\\n' \"$CONDA_DEFAULT_ENV\""; + let (dir, container) = launch(&target, Some(&reference), &format!("{setup}\ncat source.txt; printf '%s\\n' \"$ORX_TEST_SECRET\" \"$PYTHONUNBUFFERED\" \"$CONDA_DEFAULT_ENV\"; echo early; sleep 2; echo late")).await; + tokio::time::sleep(Duration::from_millis(500)).await; + let early = logs(&target, &dir).await; + assert!( + early.contains("early") && !early.contains("late"), + "{early}" + ); + assert_eq!( + terminal(&target, &dir, container.as_ref()).await.stage, + "COMPLETED" + ); + let output = logs(&target, &dir).await; + assert!( + output.contains("snapshot") + && output.contains("quote' and $literal\nsecond line") + && output.contains("\n1\n/tmp/conda-envs/research\n"), + "{output}" + ); + assert_eq!(output.matches("setup:/tmp/conda-envs/research").count(), 1); + ssh_run(&target, &format!("test ! -d \"$HOME/{dir}/repo\""), None) + .await + .unwrap(); + for code in [7, 125, 126, 127] { + let (dir, container) = launch(&target, Some(&reference), &format!("exit {code}")).await; + let state = terminal(&target, &dir, container.as_ref()).await; + assert_eq!( + state.message.as_deref(), + Some(format!("exited with code {code}").as_str()) + ); + } + let (dir, container) = launch( + &target, + Some(&reference), + "echo SETUP_FAILED; false; echo SHOULD_NOT_RUN", + ) + .await; + assert_eq!( + terminal(&target, &dir, container.as_ref()).await.stage, + "ERROR" + ); + assert_eq!(logs(&target, &dir).await, "SETUP_FAILED\n"); + let (dir, _) = launch( + &target, + None, + "cat source.txt; export HOME=/tmp; cd /tmp; echo DIRECT", + ) + .await; + assert_eq!(terminal(&target, &dir, None).await.stage, "COMPLETED"); + assert!(logs(&target, &dir).await.contains("DIRECT")); + + let (dir, container) = launch( + &target, + Some(&reference), + "trap '' TERM; (trap '' TERM; sleep 300) & wait", + ) + .await; + let container = container.unwrap(); + tokio::time::sleep(Duration::from_millis(300)).await; + let restored: ContainerRun = + serde_json::from_str(&serde_json::to_string(&container).unwrap()).unwrap(); + assert_eq!( + ssh::inspect_job(&target, &dir, Some(&restored)) + .await + .unwrap() + .stage, + "RUNNING" + ); + let processes = ssh_run(&target, &container.exec("ps auxww"), None) + .await + .unwrap(); + assert!( + !processes.contains("quote' and $literal"), + "secret leaked to argv" + ); + ssh_run( + &target, + &format!("docker exec -d {} sleep 301", sh_quote(&base.id)), + None, + ) + .await + .unwrap(); + ssh_run( + &target, + &format!("docker pause {}", sh_quote(&base.id)), + None, + ) + .await + .unwrap(); + let paused = ssh::inspect_job(&target, &dir, Some(&container)) + .await + .unwrap(); + assert_eq!(paused.stage, "RUNNING"); + assert!(paused.message.unwrap().contains("paused")); + assert!(ssh::cancel_job(&target, &dir, Some(&container)) + .await + .unwrap_err() + .to_string() + .contains("Unpause")); + ssh_run( + &target, + &format!("docker unpause {}", sh_quote(&base.id)), + None, + ) + .await + .unwrap(); + ssh::cancel_job(&target, &dir, Some(&container)) + .await + .unwrap(); + assert_eq!( + terminal(&target, &dir, Some(&container)).await.stage, + "ERROR" + ); + let processes = ssh_run(&target, &base.exec("ps auxww"), None) + .await + .unwrap(); + assert!( + !processes.contains("sleep 300"), + "child escaped cancellation: {processes}" + ); + assert!( + processes.contains("sleep 301"), + "unrelated process was killed" + ); + base.require_running(&target).await.unwrap(); + + let (dir, spec) = prepare(&target, Some(&reference), "echo ONCE; sleep 1").await; + ssh_run(&target, "touch /tmp/drop-launch-ack", None) + .await + .unwrap(); + assert!( + ssh::run_job(&spec) + .await + .unwrap_err() + .is::(), + "fixture must drop the launch acknowledgement" + ); + let container = spec.container; + let saved: ContainerRun = + serde_json::from_str(&serde_json::to_string(&container.unwrap()).unwrap()).unwrap(); + assert_eq!( + terminal(&target, &dir, Some(&saved)).await.stage, + "COMPLETED" + ); + assert_eq!(logs(&target, &dir).await.matches("ONCE").count(), 1); + let (dir, spec) = prepare(&target, Some(&reference), "echo NEVER_LAUNCHED").await; + ssh_run( + &target, + &spec.container.as_ref().unwrap().exec(&format!( + "mkdir {}", + sh_quote(&format!( + "{}/run.sh", + spec.container.as_ref().unwrap().run_dir + )) + )), + None, + ) + .await + .unwrap(); + let error = ssh::run_job(&spec).await.unwrap_err(); + assert!( + !error.is::(), + "script upload failure is not a lost acknowledgement" + ); + assert!(!logs(&target, &dir).await.contains("NEVER_LAUNCHED")); + + let (dir, container) = launch(&target, Some(&reference), "true").await; + let container = container.unwrap(); + assert_eq!( + terminal(&target, &dir, Some(&container)).await.stage, + "COMPLETED" + ); + ssh_run(&target, &format!("cd \"$HOME/{dir}\"; rm exit_code; setsid sleep 300 /dev/null 2>&1 & echo $! > pid"), None).await.unwrap(); + assert_eq!( + inspect(&target, &dir, &container).await.unwrap().stage, + "RUNNING" + ); + ssh_run( + &target, + &format!("echo 0 > \"$HOME/{dir}/completion_wait\""), + None, + ) + .await + .unwrap(); + let state = inspect(&target, &dir, &container).await.unwrap(); + assert_eq!(state.stage, "ERROR"); + assert!(state + .message + .unwrap() + .contains("did not record its exit status")); + + let (dir, container) = launch(&target, Some(&reference), "sleep 300").await; + let container = container.unwrap(); + tokio::time::sleep(Duration::from_millis(200)).await; + ssh_run( + &target, + &format!("kill -KILL $(cat \"$HOME/{dir}/pid\")"), + None, + ) + .await + .unwrap(); + assert_eq!( + terminal(&target, &dir, Some(&container)).await.stage, + "ERROR" + ); + assert!(!ssh_run(&target, &base.exec("ps auxww"), None) + .await + .unwrap() + .contains("sleep 300")); + + let id = uuid::Uuid::new_v4().to_string(); + let pending = base.for_run(&id); + let pending_dir = format!(".orx/runs/{id}"); + ssh_run( + &target, + &pending.exec(&format!("mkdir -p {}", sh_quote(&pending.run_dir))), + None, + ) + .await + .unwrap(); + ssh_run( + &target, + &format!( + "mkdir -p \"$HOME/{pending_dir}\"; date +%s > \"$HOME/{pending_dir}/launch_time\"" + ), + None, + ) + .await + .unwrap(); + assert_eq!( + inspect(&target, &pending_dir, &pending) + .await + .unwrap() + .stage, + "RUNNING" + ); + ssh_run( + &target, + &format!("echo 0 > \"$HOME/{pending_dir}/launch_time\""), + None, + ) + .await + .unwrap(); + assert_eq!( + inspect(&target, &pending_dir, &pending) + .await + .unwrap() + .stage, + "ERROR" + ); + + let (dir, container) = launch(&target, Some(&reference), "sleep 300").await; + let container = container.unwrap(); + tokio::time::sleep(Duration::from_millis(200)).await; + let identity = sh_quote(&format!("{}/identity", container.run_dir)); + ssh_run(&target, &container.exec(&format!("cp {identity} {identity}.saved; read -r p started < {identity}; echo \"$p 0\" > {identity}")), None).await.unwrap(); + assert!(cancel(&target, &container) + .await + .unwrap_err() + .to_string() + .contains("identity changed")); + ssh_run( + &target, + &container.exec(&format!("mv {identity}.saved {identity}")), + None, + ) + .await + .unwrap(); + cancel(&target, &container).await.unwrap(); + terminal(&target, &dir, Some(&container)).await; + + ssh_run(&target, "mv /usr/local/bin/docker /usr/local/bin/docker-real; printf '#!/bin/sh\\nDOCKER_HOST=unix:///missing-docker.sock exec /usr/local/bin/docker-real \"$@\"\\n' > /usr/local/bin/docker; chmod +x /usr/local/bin/docker", None).await.unwrap(); + assert!(inspection(&target, &base.id).await.is_err()); + ssh_run( + &target, + "mv /usr/local/bin/docker-real /usr/local/bin/docker", + None, + ) + .await + .unwrap(); + supervisor_restart(&target, &reference, port).await; + for action in ["stop", "restart", "rm -f"] { + let (dir, container) = launch(&target, Some(&reference), "echo SURVIVES; sleep 300").await; + tokio::time::sleep(Duration::from_millis(300)).await; + ssh_run( + &target, + &format!("docker {action} {}", sh_quote(&reference)), + None, + ) + .await + .unwrap(); + assert_eq!( + terminal(&target, &dir, container.as_ref()).await.stage, + "ERROR" + ); + assert!(logs(&target, &dir).await.contains("SURVIVES")); + if action == "stop" { + ssh_run( + &target, + &format!("docker start {}", sh_quote(&reference)), + None, + ) + .await + .unwrap(); + } + if action == "rm -f" { + ssh_run(&target, &format!("docker run -d --name {} --entrypoint bash condaforge/miniforge3 -c 'exec sleep infinity'", sh_quote(&reference)), None).await.unwrap(); + assert!(unavailable(&target, container.as_ref().unwrap()) + .await + .unwrap() + .unwrap() + .contains("removed")); + cancel(&target, container.as_ref().unwrap()).await.unwrap(); + resolve(&target, &reference).await.unwrap(); + } + } + eprintln!("SSH container lifecycle: passed"); +} + +async fn supervisor_restart(target: &SshTarget, reference: &str, port: u16) { + use crate::local::model::{LocalExperiment, LocalProject}; + use crate::store::{Store, StoredRun}; + let temp = crate::local::git::TemporaryDirectory::new("orx-supervisor-restart").unwrap(); + let root = temp.path(); + let ssh_dir = root.join(".ssh"); + std::fs::create_dir(&ssh_dir).unwrap(); + std::fs::write(ssh_dir.join("config"), format!("Host fixture\n HostName 127.0.0.1\n User root\n Port {port}\n IdentityFile {}\n StrictHostKeyChecking no\n UserKnownHostsFile /dev/null\n", std::env::var("ORX_SSH_TEST_KEY").unwrap())).unwrap(); + let store = Store::open_at(root.join("data")).unwrap(); + store + .create_local_project(&LocalProject { + id: "project".into(), + name: "test".into(), + slug: "test".into(), + github_owner: String::new(), + github_repo: String::new(), + github_sync_enabled: false, + baseline_branch: "main".into(), + repo_path: root.to_string_lossy().into_owned(), + run_command: None, + paper_id: None, + created_at: 1, + updated_at: 1, + }) + .unwrap(); + store + .create_local_experiment(&LocalExperiment { + id: "experiment".into(), + project_id: "project".into(), + parent_experiment_id: None, + slug: "test".into(), + branch_name: "main".into(), + title: None, + description: None, + run_command: "echo ONCE; sleep 8; echo AFTER".into(), + agent_status: "idle".into(), + created_at: 1, + updated_at: 1, + chat_session_id: None, + }) + .unwrap(); + let (dir, container) = launch(target, Some(reference), "echo ONCE; sleep 8; echo AFTER").await; + let id = dir.rsplit('/').next().unwrap(); + let descriptor = serde_json::json!({"kind":"ssh_job","namespace":"fixture","jobId":dir,"sshContainer":container}); + store + .upsert_run(&StoredRun { + id: id.into(), + experiment_id: "experiment".into(), + project_id: "project".into(), + status: "starting".into(), + backend_json: descriptor.to_string(), + command: "test".into(), + created_at: 1, + updated_at: 1, + ended_at: None, + exit_code: None, + commit_sha: None, + result_markdown: None, + cancel_requested: false, + chat_session_id: None, + }) + .unwrap(); + // OpenSSH ignores HOME for its config lookup, so confine this override to the supervisor child. + let bin = root.join("bin"); + std::fs::create_dir(&bin).unwrap(); + let ssh = bin.join("ssh"); + std::fs::write( + &ssh, + format!( + "#!/bin/sh\nexec /usr/bin/ssh -F {} \"$@\"\n", + sh_quote(&ssh_dir.join("config").to_string_lossy()) + ), + ) + .unwrap(); + #[cfg(unix)] + { + use std::os::unix::fs::PermissionsExt; + std::fs::set_permissions(&ssh, std::fs::Permissions::from_mode(0o700)).unwrap(); + } + let executable = std::env::current_exe() + .unwrap() + .parent() + .unwrap() + .parent() + .unwrap() + .join(format!("orx{}", std::env::consts::EXE_SUFFIX)); + let spawn = || { + let mut command = tokio::process::Command::new(&executable); + command + .args(["--no-telemetry", "supervise", id]) + .env("HOME", root) + .env("ORX_DATA_DIR", root.join("data")) + .env("ORX_CACHE_DIR", root.join("cache")) + .env("XDG_CONFIG_HOME", root.join("config")) + .env("ORX_NO_UPDATE_CHECK", "1") + .env( + "PATH", + format!("{}:{}", bin.display(), std::env::var("PATH").unwrap()), + ) + .stdout(std::process::Stdio::null()) + .stderr(std::process::Stdio::piped()) + .kill_on_drop(true); + command.spawn().unwrap() + }; + let mut first = spawn(); + tokio::time::sleep(Duration::from_secs(1)).await; + assert!( + first.try_wait().unwrap().is_none(), + "supervisor exited before restart" + ); + first.kill().await.unwrap(); + first.wait().await.unwrap(); + let config = root.join("config/openresearch"); + std::fs::create_dir_all(&config).unwrap(); + std::fs::write(config.join("settings.json"), r#"{"ssh":{"defaultHost":"wrong-host","hosts":{"fixture":{"container":"wrong-container"}}}}"#).unwrap(); + let second = spawn(); + let result = tokio::time::timeout(Duration::from_secs(25), second.wait_with_output()) + .await + .unwrap() + .unwrap(); + assert!( + result.status.success(), + "{}", + String::from_utf8_lossy(&result.stderr) + ); + assert_eq!(store.get_run(id).unwrap().unwrap().status, "done"); + let output = logs(target, &dir).await; + assert_eq!(output.matches("ONCE").count(), 1); + assert!(output.contains("AFTER")); +} diff --git a/src/local/hf.rs b/src/local/hf.rs index 45f42f01..a696373f 100644 --- a/src/local/hf.rs +++ b/src/local/hf.rs @@ -106,6 +106,7 @@ pub async fn submit_local_hf_with_source( .await?; let mut descriptor = BackendDescriptor { + ssh_container: None, kind: "hf_job".to_string(), namespace: Some(namespace.clone()), job_id: Some(job.id.clone()), diff --git a/src/local/k8s.rs b/src/local/k8s.rs index 465c33ce..6bda4fb4 100644 --- a/src/local/k8s.rs +++ b/src/local/k8s.rs @@ -150,6 +150,7 @@ pub async fn submit_local_k8s_with_source( .await?; let mut descriptor = BackendDescriptor { + ssh_container: None, kind: "k8s_job".to_string(), namespace: Some(namespace.clone()), job_id: Some(submitted.job_name.clone()), diff --git a/src/local/localrun.rs b/src/local/localrun.rs index 96581621..3a8225e4 100644 --- a/src/local/localrun.rs +++ b/src/local/localrun.rs @@ -118,6 +118,7 @@ async fn submit_controller_run( })?; let mut descriptor = BackendDescriptor { + ssh_container: None, kind: kind.to_string(), namespace: None, job_id: Some(dir.to_string_lossy().into_owned()), diff --git a/src/local/modal.rs b/src/local/modal.rs index 44644029..19a0d895 100644 --- a/src/local/modal.rs +++ b/src/local/modal.rs @@ -110,6 +110,7 @@ pub async fn submit_local_modal_with_source( .await?; let mut descriptor = BackendDescriptor { + ssh_container: None, kind: "modal_job".to_string(), namespace: Some(MODAL_APP.to_string()), job_id: Some(sandbox_id.clone()), diff --git a/src/local/openresearch.rs b/src/local/openresearch.rs index 022d87cf..44bee59a 100644 --- a/src/local/openresearch.rs +++ b/src/local/openresearch.rs @@ -163,6 +163,7 @@ pub async fn submit_local_openresearch_with_source( .sandbox; let mut descriptor = BackendDescriptor { + ssh_container: None, kind: "openresearch_job".to_string(), namespace: Some(org_id), job_id: Some(sandbox.id.clone()), diff --git a/src/local/ray.rs b/src/local/ray.rs index 50d71e5d..349379a1 100644 --- a/src/local/ray.rs +++ b/src/local/ray.rs @@ -123,6 +123,7 @@ pub async fn submit_local_ray_with_source( let watch = ray::job_url(&address, &submission_id); let mut descriptor = BackendDescriptor { + ssh_container: None, kind: "ray_job".to_string(), namespace: Some(address.clone()), job_id: Some(submission_id.clone()), diff --git a/src/local/slurm.rs b/src/local/slurm.rs index 09ac2039..025487a8 100644 --- a/src/local/slurm.rs +++ b/src/local/slurm.rs @@ -106,6 +106,7 @@ pub async fn submit_local_slurm_with_source( &run_id, &source.path, &source.digest, + None, ) .await?; let job_id = slurm::run_job(&slurm::SlurmJobSpec { @@ -122,6 +123,7 @@ pub async fn submit_local_slurm_with_source( .await?; let mut descriptor = BackendDescriptor { + ssh_container: None, kind: "slurm_job".to_string(), namespace: Some(host.clone()), job_id: Some(job_id.clone()), diff --git a/src/local/ssh.rs b/src/local/ssh.rs index 6811788f..734971a8 100644 --- a/src/local/ssh.rs +++ b/src/local/ssh.rs @@ -1,5 +1,5 @@ //! Local SSH launch — the SSH twin of `local/k8s.rs`: run the experiment as a -//! detached process on one of your own boxes over ssh. `--flavor` names an +//! detached process on one of your own boxes over ssh. `--host` names an //! `~/.ssh/config` host alias (there's no hardware scheduler on a plain //! server). The run row lives in the local store only; a detached //! `orx supervise` watches the remote process. @@ -16,7 +16,7 @@ use crate::store::{now_ms, Store, StoredRun}; pub async fn launch_local_ssh(args: &crate::ExpRunArgs) -> Result<()> { let run = submit_local_ssh(args).await?; let backend = BackendDescriptor::parse(&run.backend_json)?; - println!("\u{2713} SSH job started."); + println!("\u{2713} SSH run submitted."); println!( " host {} ({})", backend.namespace.as_deref().unwrap_or(""), @@ -31,7 +31,7 @@ pub async fn launch_local_ssh(args: &crate::ExpRunArgs) -> Result<()> { } /// Submit the local experiment's run as a detached process on an ssh host and -/// detach a supervisor. Requires `--backend ssh` and `--flavor ` where +/// detach a supervisor. Requires `--backend ssh` and `--host ` where /// the host is an `~/.ssh/config` alias. pub async fn submit_local_ssh(args: &crate::ExpRunArgs) -> Result { crate::compute::submit(args).await @@ -41,25 +41,8 @@ pub async fn submit_local_ssh_with_source( args: &crate::ExpRunArgs, source: SourceSnapshot, run_id: String, + launch: &ssh::ResolvedLaunch, ) -> Result { - if args.flavor.is_some() { - return Err(anyhow!( - "--backend ssh has no flavors — a machine is an address, not a shape. \ - Pass --host (an ~/.ssh/config alias)." - )); - } - if args.image.is_some() { - return Err(anyhow!( - "--image doesn't apply to --backend ssh — the run uses the host's own environment." - )); - } - let host = args.host.clone().ok_or_else(|| { - anyhow!( - "--backend ssh requires --host from the user's ~/.ssh/config. \ - The host needs git and bash." - ) - })?; - let store = Store::open()?; let exp = store .get_local_experiment(&args.exp_id)? @@ -75,8 +58,19 @@ pub async fn submit_local_ssh_with_source( .or_else(|| project.run_command.clone().filter(|c| !c.trim().is_empty())) .ok_or_else(|| anyhow!("{}", crate::invocation::no_run_command(&project.id)))?; - let target = ssh::SshTarget::alias(&host); - ssh::stage_source(&target, &run_id, &source.path, &source.digest).await?; + let target = launch.target.clone(); + let container = launch + .container + .as_ref() + .map(|container| container.for_run(&run_id)); + let remote_dir = ssh::stage_source( + &target, + &run_id, + &source.path, + &source.digest, + container.as_ref(), + ) + .await?; let script = crate::compute::staged_script(&run_command); // The remote env: everything the user synced (API keys), plus the tokens @@ -86,17 +80,10 @@ pub async fn submit_local_ssh_with_source( env.entry("HF_TOKEN".to_string()).or_insert(hf_token); } - let remote_dir = ssh::run_job(&ssh::SshJobSpec { - target: target.clone(), - run_id: run_id.clone(), - script, - env, - }) - .await?; - let mut descriptor = BackendDescriptor { + ssh_container: container.clone(), kind: "ssh_job".to_string(), - namespace: Some(host), + namespace: Some(target.dest.clone()), job_id: Some(remote_dir.clone()), flavor: None, image: None, @@ -113,9 +100,38 @@ pub async fn submit_local_ssh_with_source( source_size: None, }; source.apply_to_descriptor(&mut descriptor); - if let Err(error) = crate::compute::record_submission_handle(&run_id, &descriptor) { - let _ = ssh::cancel_job(&target, &remote_dir).await; - return Err(error); + if container.is_some() { + crate::compute::record_submission_handle(&run_id, &descriptor)?; + } + let submission = ssh::run_job(&ssh::SshJobSpec { + target: target.clone(), + run_id: run_id.clone(), + script, + env, + container: container.clone(), + }) + .await; + match submission { + Err(error) if container.is_some() && error.is::() => { + eprintln!("SSH launch response failed for run {run_id}: {error:#}. Reconciling the saved container handle."); + } + Err(error) => { + store.update_status( + &run_id, + crate::store::RunStatus::Failed, + Some(now_ms()), + None, + )?; + store.set_result_markdown(&run_id, &format!("Compute submission failed: {error:#}"))?; + return Err(error); + } + Ok(_) if container.is_none() => { + if let Err(error) = crate::compute::record_submission_handle(&run_id, &descriptor) { + let _ = ssh::cancel_job(&target, &remote_dir, None).await; + return Err(error); + } + } + Ok(_) => {} } let run = StoredRun { id: run_id.clone(), diff --git a/src/main.rs b/src/main.rs index 11ff224b..cc04bca3 100644 --- a/src/main.rs +++ b/src/main.rs @@ -492,11 +492,17 @@ pub struct ExpRunArgs { /// you belong to exactly one org. #[arg(long)] pub org: Option, - /// The ~/.ssh/config host alias to run on (with `--backend ssh`), or the + /// The ~/.ssh/config host alias (SSH defaults to its saved default host), or the /// cluster login node (with `--backend slurm`; defaults to the slurm /// settings' host). #[arg(long)] pub host: Option, + /// Existing running Docker container on the SSH host (name or ID). + #[arg(long, conflicts_with = "no_container")] + pub container: Option, + /// Run directly on the SSH host, overriding its saved container. + #[arg(long)] + pub no_container: bool, /// Repo-relative path to the k8s manifest on the experiment branch (with /// `--backend k8s`; default .orx/k8s.yaml). The manifest declares the run's /// resources — image, GPUs, topology — and orx injects the run script, env diff --git a/src/telemetry.rs b/src/telemetry.rs index d804b4ca..8e31d403 100644 --- a/src/telemetry.rs +++ b/src/telemetry.rs @@ -107,6 +107,8 @@ fn flush_window() -> Duration { #[derive(Debug, Clone, Default, Serialize, Deserialize)] #[serde(rename_all = "camelCase")] pub(crate) struct Settings { + #[serde(default)] + pub ssh: crate::config::SshSettings, /// Random anonymous id (uuid v4), generated once on first enabled run. #[serde(default)] pub install_id: Option, @@ -319,6 +321,33 @@ fn settings_path() -> PathBuf { crate::config::config_dir().join("settings.json") } +pub(crate) fn ssh_settings() -> crate::error::Result { + let raw = match std::fs::read_to_string(settings_path()) { + Ok(raw) => raw, + Err(error) if error.kind() == std::io::ErrorKind::NotFound => return Ok(Default::default()), + Err(error) => return Err(error.into()), + }; + let settings: Settings = serde_json::from_str(&raw) + .map_err(|error| crate::error::anyhow!("Cannot read SSH settings: {error}"))?; + for options in settings.ssh.hosts.values() { + crate::jobs::ssh::validate_host_options(options)?; + } + Ok(settings.ssh) +} + +pub(crate) fn set_ssh_host( + host: String, + options: crate::config::SshHostSettings, +) -> std::io::Result<()> { + mutate_settings(|settings| { + settings.ssh.hosts.insert(host, options); + }) +} + +pub(crate) fn set_ssh_default(host: Option) -> std::io::Result<()> { + mutate_settings(|settings| settings.ssh.default_host = host) +} + fn outbox_dir() -> PathBuf { crate::config::config_dir().join("telemetry-outbox") } @@ -1437,6 +1466,42 @@ mod tests { let _ = std::fs::remove_dir_all(&dir); } + #[test] + fn ssh_settings_preserve_siblings_and_reject_corrupt_config() { + use crate::config::SshHostSettings; + let _g = EnvGuard::new(OPT_VARS); + let dir = std::env::temp_dir().join(format!("orx-tel-ssh-{}", uuid::Uuid::new_v4())); + std::env::set_var("XDG_CONFIG_HOME", &dir); + assert!(ssh_settings().unwrap().hosts.is_empty()); + set_persisted_disabled(true).unwrap(); + let options = SshHostSettings { + container: Some("research".into()), + }; + set_ssh_host("lab".into(), options.clone()).unwrap(); + set_ssh_default(Some("lab".into())).unwrap(); + set_compute_default(Some("ssh".into()), None).unwrap(); + let settings = ssh_settings().unwrap(); + assert_eq!(settings.default_host.as_deref(), Some("lab")); + assert_eq!(settings.hosts["lab"], options); + assert_eq!(load_settings().unwrap().telemetry_disabled, Some(true)); + set_ssh_host("lab".into(), SshHostSettings::default()).unwrap(); + set_ssh_default(None).unwrap(); + assert_eq!( + ssh_settings().unwrap().hosts["lab"], + SshHostSettings::default() + ); + for raw in [ + r#"{"ssh":null}"#, + r#"{"ssh":{"hosts":{"lab":{"container":""}}}}"#, + r#"{"ssh":{"hosts":[]}}"#, + "{", + ] { + std::fs::write(settings_path(), raw).unwrap(); + assert!(ssh_settings().is_err(), "{raw}"); + } + std::fs::remove_dir_all(dir).unwrap(); + } + #[test] fn compute_default_roundtrip_preserves_siblings() { // Same single-writer contract as data_dir: the Compute settings persist diff --git a/ui/dist/assets/index-Ph8YqAap.js b/ui/dist/assets/index-C3cRg0nD.js similarity index 58% rename from ui/dist/assets/index-Ph8YqAap.js rename to ui/dist/assets/index-C3cRg0nD.js index b3df4ed6..2f21adcf 100644 --- a/ui/dist/assets/index-Ph8YqAap.js +++ b/ui/dist/assets/index-C3cRg0nD.js @@ -1,4 +1,4 @@ -var qG=Object.defineProperty;var S9=e=>{throw TypeError(e)};var UG=(e,n,t)=>n in e?qG(e,n,{enumerable:!0,configurable:!0,writable:!0,value:t}):e[n]=t;var Bs=(e,n,t)=>UG(e,typeof n!="symbol"?n+"":n,t),k2=(e,n,t)=>n.has(e)||S9("Cannot "+t);var ue=(e,n,t)=>(k2(e,n,"read from private field"),t?t.call(e):n.get(e)),lt=(e,n,t)=>n.has(e)?S9("Cannot add the same private member more than once"):n instanceof WeakSet?n.add(e):n.set(e,t),Ge=(e,n,t,r)=>(k2(e,n,"write to private field"),r?r.call(e,t):n.set(e,t),t),Bt=(e,n,t)=>(k2(e,n,"access private method"),t);var vp=(e,n,t,r)=>({set _(s){Ge(e,n,s,t)},get _(){return ue(e,n,r)}});(function(){const n=document.createElement("link").relList;if(n&&n.supports&&n.supports("modulepreload"))return;for(const s of document.querySelectorAll('link[rel="modulepreload"]'))r(s);new MutationObserver(s=>{for(const i of s)if(i.type==="childList")for(const a of i.addedNodes)a.tagName==="LINK"&&a.rel==="modulepreload"&&r(a)}).observe(document,{childList:!0,subtree:!0});function t(s){const i={};return s.integrity&&(i.integrity=s.integrity),s.referrerPolicy&&(i.referrerPolicy=s.referrerPolicy),s.crossOrigin==="use-credentials"?i.credentials="include":s.crossOrigin==="anonymous"?i.credentials="omit":i.credentials="same-origin",i}function r(s){if(s.ep)return;s.ep=!0;const i=t(s);fetch(s.href,i)}})();function am(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var S2={exports:{}},bp={};/** +var GG=Object.defineProperty;var S9=e=>{throw TypeError(e)};var VG=(e,n,t)=>n in e?GG(e,n,{enumerable:!0,configurable:!0,writable:!0,value:t}):e[n]=t;var Bs=(e,n,t)=>VG(e,typeof n!="symbol"?n+"":n,t),k2=(e,n,t)=>n.has(e)||S9("Cannot "+t);var ue=(e,n,t)=>(k2(e,n,"read from private field"),t?t.call(e):n.get(e)),lt=(e,n,t)=>n.has(e)?S9("Cannot add the same private member more than once"):n instanceof WeakSet?n.add(e):n.set(e,t),Ge=(e,n,t,r)=>(k2(e,n,"write to private field"),r?r.call(e,t):n.set(e,t),t),Bt=(e,n,t)=>(k2(e,n,"access private method"),t);var vp=(e,n,t,r)=>({set _(s){Ge(e,n,s,t)},get _(){return ue(e,n,r)}});(function(){const n=document.createElement("link").relList;if(n&&n.supports&&n.supports("modulepreload"))return;for(const s of document.querySelectorAll('link[rel="modulepreload"]'))r(s);new MutationObserver(s=>{for(const i of s)if(i.type==="childList")for(const a of i.addedNodes)a.tagName==="LINK"&&a.rel==="modulepreload"&&r(a)}).observe(document,{childList:!0,subtree:!0});function t(s){const i={};return s.integrity&&(i.integrity=s.integrity),s.referrerPolicy&&(i.referrerPolicy=s.referrerPolicy),s.crossOrigin==="use-credentials"?i.credentials="include":s.crossOrigin==="anonymous"?i.credentials="omit":i.credentials="same-origin",i}function r(s){if(s.ep)return;s.ep=!0;const i=t(s);fetch(s.href,i)}})();function am(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var S2={exports:{}},bp={};/** * @license React * react-jsx-runtime.production.js * @@ -6,7 +6,7 @@ var qG=Object.defineProperty;var S9=e=>{throw TypeError(e)};var UG=(e,n,t)=>n in * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. - */var C9;function GG(){if(C9)return bp;C9=1;var e=Symbol.for("react.transitional.element"),n=Symbol.for("react.fragment");function t(r,s,i){var a=null;if(i!==void 0&&(a=""+i),s.key!==void 0&&(a=""+s.key),"key"in s){i={};for(var o in s)o!=="key"&&(i[o]=s[o])}else i=s;return s=i.ref,{$$typeof:e,type:r,key:a,ref:s!==void 0?s:null,props:i}}return bp.Fragment=n,bp.jsx=t,bp.jsxs=t,bp}var E9;function VG(){return E9||(E9=1,S2.exports=GG()),S2.exports}var f=VG(),C2={exports:{}},nn={};/** + */var C9;function KG(){if(C9)return bp;C9=1;var e=Symbol.for("react.transitional.element"),n=Symbol.for("react.fragment");function t(r,s,i){var a=null;if(i!==void 0&&(a=""+i),s.key!==void 0&&(a=""+s.key),"key"in s){i={};for(var o in s)o!=="key"&&(i[o]=s[o])}else i=s;return s=i.ref,{$$typeof:e,type:r,key:a,ref:s!==void 0?s:null,props:i}}return bp.Fragment=n,bp.jsx=t,bp.jsxs=t,bp}var E9;function WG(){return E9||(E9=1,S2.exports=KG()),S2.exports}var f=WG(),C2={exports:{}},nn={};/** * @license React * react.production.js * @@ -14,7 +14,7 @@ var qG=Object.defineProperty;var S9=e=>{throw TypeError(e)};var UG=(e,n,t)=>n in * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. - */var N9;function KG(){if(N9)return nn;N9=1;var e=Symbol.for("react.transitional.element"),n=Symbol.for("react.portal"),t=Symbol.for("react.fragment"),r=Symbol.for("react.strict_mode"),s=Symbol.for("react.profiler"),i=Symbol.for("react.consumer"),a=Symbol.for("react.context"),o=Symbol.for("react.forward_ref"),l=Symbol.for("react.suspense"),u=Symbol.for("react.memo"),h=Symbol.for("react.lazy"),_=Symbol.for("react.activity"),p=Symbol.iterator;function m(F){return F===null||typeof F!="object"?null:(F=p&&F[p]||F["@@iterator"],typeof F=="function"?F:null)}var x={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},k=Object.assign,v={};function b(F,G,V){this.props=F,this.context=G,this.refs=v,this.updater=V||x}b.prototype.isReactComponent={},b.prototype.setState=function(F,G){if(typeof F!="object"&&typeof F!="function"&&F!=null)throw Error("takes an object of state variables to update or a function which returns an object of state variables.");this.updater.enqueueSetState(this,F,G,"setState")},b.prototype.forceUpdate=function(F){this.updater.enqueueForceUpdate(this,F,"forceUpdate")};function w(){}w.prototype=b.prototype;function y(F,G,V){this.props=F,this.context=G,this.refs=v,this.updater=V||x}var C=y.prototype=new w;C.constructor=y,k(C,b.prototype),C.isPureReactComponent=!0;var N=Array.isArray;function E(){}var T={H:null,A:null,T:null,S:null},j=Object.prototype.hasOwnProperty;function M(F,G,V){var ee=V.ref;return{$$typeof:e,type:F,key:G,ref:ee!==void 0?ee:null,props:V}}function D(F,G){return M(F.type,G,F.props)}function I(F){return typeof F=="object"&&F!==null&&F.$$typeof===e}function P(F){var G={"=":"=0",":":"=2"};return"$"+F.replace(/[=:]/g,function(V){return G[V]})}var U=/\/+/g;function q(F,G){return typeof F=="object"&&F!==null&&F.key!=null?P(""+F.key):G.toString(36)}function W(F){switch(F.status){case"fulfilled":return F.value;case"rejected":throw F.reason;default:switch(typeof F.status=="string"?F.then(E,E):(F.status="pending",F.then(function(G){F.status==="pending"&&(F.status="fulfilled",F.value=G)},function(G){F.status==="pending"&&(F.status="rejected",F.reason=G)})),F.status){case"fulfilled":return F.value;case"rejected":throw F.reason}}throw F}function H(F,G,V,ee,ce){var ae=typeof F;(ae==="undefined"||ae==="boolean")&&(F=null);var se=!1;if(F===null)se=!0;else switch(ae){case"bigint":case"string":case"number":se=!0;break;case"object":switch(F.$$typeof){case e:case n:se=!0;break;case h:return se=F._init,H(se(F._payload),G,V,ee,ce)}}if(se)return ce=ce(F),se=ee===""?"."+q(F,0):ee,N(ce)?(V="",se!=null&&(V=se.replace(U,"$&/")+"/"),H(ce,G,V,"",function(le){return le})):ce!=null&&(I(ce)&&(ce=D(ce,V+(ce.key==null||F&&F.key===ce.key?"":(""+ce.key).replace(U,"$&/")+"/")+se)),G.push(ce)),1;se=0;var X=ee===""?".":ee+":";if(N(F))for(var oe=0;oe{const n=A.useContext(UM);if(!n)throw new Error("No QueryClient set, use QueryClientProvider to set one");return n},WG=({client:e,children:n})=>(A.useEffect(()=>(e.mount(),()=>{e.unmount()}),[e]),f.jsx(UM.Provider,{value:e,children:n})),QG={setTimeout:(e,n)=>setTimeout(e,n),clearTimeout:e=>clearTimeout(e),setInterval:(e,n)=>setInterval(e,n),clearInterval:e=>clearInterval(e)};var tu,ak,RM,XG=(RM=class{constructor(){lt(this,tu,QG);lt(this,ak,!1)}setTimeoutProvider(e){Ge(this,tu,e)}setTimeout(e,n){return ue(this,tu).setTimeout(e,n)}clearTimeout(e){ue(this,tu).clearTimeout(e)}setInterval(e,n){return ue(this,tu).setInterval(e,n)}clearInterval(e){ue(this,tu).clearInterval(e)}},tu=new WeakMap,ak=new WeakMap,RM);const h_=new XG;function YG(e){setTimeout(e,0)}const ZG=typeof window>"u"||"Deno"in globalThis;function Us(){}function JG(e,n){return typeof e=="function"?e(n):e}function GM(e){return typeof e=="number"&&e>=0&&e!==1/0}function VM(e,n){return Math.max(e+(n||0)-Date.now(),0)}function Hr(e,n){return typeof e=="function"?e(n):e}function j9(e,n){const{type:t="all",exact:r,fetchStatus:s,predicate:i,queryKey:a,stale:o}=e;if(a){if(r){if(n.queryHash!==ok(a,n.options))return!1}else if(!Vd(n.queryKey,a))return!1}if(t!=="all"){const l=n.isActive();if(t==="active"&&!l||t==="inactive"&&l)return!1}return!(typeof o=="boolean"&&n.isStale()!==o||s&&s!==n.state.fetchStatus||i&&!i(n))}function T9(e,n){const{exact:t,status:r,predicate:s,mutationKey:i}=e;if(i){if(!n.options.mutationKey)return!1;if(t){if(B_(n.options.mutationKey)!==B_(i))return!1}else if(!Vd(n.options.mutationKey,i))return!1}return!(r&&n.state.status!==r||s&&!s(n))}function ok(e,n){return((n==null?void 0:n.queryKeyHashFn)||B_)(e)}function B_(e){return JSON.stringify(e,(n,t)=>w4(t)?Object.keys(t).sort().reduce((r,s)=>(r[s]=t[s],r),{}):t)}function Vd(e,n){if(e===n)return!0;if(typeof e!=typeof n)return!1;if(e&&n&&typeof e=="object"&&typeof n=="object"){if(Array.isArray(e)&&Array.isArray(n)){for(let r=0;r500)return n;const r=A9(e)&&A9(n);if(!r&&!(w4(e)&&w4(n)))return n;const s=(r?e:Object.keys(e)).length,i=r?n:Object.keys(n),a=i.length,o=r?new Array(a):{};let l=0;for(let u=0;u{h_.setTimeout(n,e)})}function k4(e,n,t){return typeof t.structuralSharing=="function"?t.structuralSharing(e,n):t.structuralSharing!==!1?lk(e,n):n}function nV(e,n,t=0){const r=[...e,n];return t&&r.length>t?r.slice(1):r}function rV(e,n,t=0){const r=[n,...e];return t&&r.length>t?r.slice(0,-1):r}const ck=Symbol();function KM(e,n){return!e.queryFn&&(n!=null&&n.initialPromise)?()=>n.initialPromise:!e.queryFn||e.queryFn===ck?()=>Promise.reject(new Error(`Missing queryFn: '${e.queryHash}'`)):e.queryFn}function uk(e,n){return typeof e=="function"?e(...n):!!e}function sV(e,n,t){let r=!1,s;return Object.defineProperty(e,"signal",{enumerable:!0,get:()=>(s??(s=n()),r||(r=!0,s.aborted?t():s.addEventListener("abort",t,{once:!0})),s)}),e}let iV=()=>ZG;const _k=()=>iV();var ef=class{constructor(){this.listeners=new Set,this.subscribe=this.subscribe.bind(this)}subscribe(e){return this.listeners.add(e),this.onSubscribe(),()=>{this.listeners.delete(e),this.onUnsubscribe()}}hasListeners(){return this.listeners.size>0}onSubscribe(){}onUnsubscribe(){}},v_,nu,zd,MM,aV=(MM=class extends ef{constructor(){super();lt(this,v_);lt(this,nu);lt(this,zd);Ge(this,zd,n=>{if(typeof window<"u"&&window.addEventListener){const t=()=>n();return window.addEventListener("visibilitychange",t,!1),()=>{window.removeEventListener("visibilitychange",t)}}})}onSubscribe(){ue(this,nu)||this.setEventListener(ue(this,zd))}onUnsubscribe(){var n;this.hasListeners()||((n=ue(this,nu))==null||n.call(this),Ge(this,nu,void 0))}setEventListener(n){var t;Ge(this,zd,n),(t=ue(this,nu))==null||t.call(this),Ge(this,nu,n(r=>{typeof r=="boolean"?this.setFocused(r):this.onFocus()}))}setFocused(n){ue(this,v_)!==n&&(Ge(this,v_,n),this.onFocus())}onFocus(){const n=this.isFocused();this.listeners.forEach(t=>{t(n)})}isFocused(){var n;return typeof ue(this,v_)=="boolean"?ue(this,v_):((n=globalThis.document)==null?void 0:n.visibilityState)!=="hidden"}},v_=new WeakMap,nu=new WeakMap,zd=new WeakMap,MM);const fk=new aV,oV=YG;function lV(){let e=[],n=0,t=o=>{o()},r=o=>{o()},s=oV;const i=o=>{n?e.push(o):s(()=>{t(o)})},a=()=>{const o=e;e=[],o.length&&s(()=>{r(()=>{o.forEach(l=>{t(l)})})})};return{batch:o=>{let l;n++;try{l=o()}finally{n--,n||a()}return l},batchCalls:o=>(...l)=>{i(()=>{o(...l)})},schedule:i,setNotifyFunction:o=>{t=o},setBatchNotifyFunction:o=>{r=o},setScheduler:o=>{s=o}}}const Mr=lV();var jd,ru,Td,OM,cV=(OM=class extends ef{constructor(){super();lt(this,jd,!0);lt(this,ru);lt(this,Td);Ge(this,Td,n=>{if(typeof window<"u"&&window.addEventListener){const t=()=>n(!0),r=()=>n(!1);return window.addEventListener("online",t,!1),window.addEventListener("offline",r,!1),()=>{window.removeEventListener("online",t),window.removeEventListener("offline",r)}}})}onSubscribe(){ue(this,ru)||this.setEventListener(ue(this,Td))}onUnsubscribe(){var n;this.hasListeners()||((n=ue(this,ru))==null||n.call(this),Ge(this,ru,void 0))}setEventListener(n){var t;Ge(this,Td,n),(t=ue(this,ru))==null||t.call(this),Ge(this,ru,n(this.setOnline.bind(this)))}setOnline(n){ue(this,jd)!==n&&(Ge(this,jd,n),this.listeners.forEach(t=>{t(n)}))}isOnline(){return ue(this,jd)}},jd=new WeakMap,ru=new WeakMap,Td=new WeakMap,OM);const rv=new cV;function uV(e){return Math.min(1e3*2**e,3e4)}function WM(e){return(e??"online")==="online"?rv.isOnline():!0}var sv=class extends Error{constructor(e){super("CancelledError"),this.revert=e==null?void 0:e.revert,this.silent=e==null?void 0:e.silent}};function _V(e){return e instanceof sv}function QM(e){let n=!1,t=0,r,s="pending",i,a;const o=new Promise((w,y)=>{i=w,a=y});o.catch(Us);const l=()=>s!=="pending",u=w=>{var y;if(!l()){const C=new sv(w);k(C),(y=e.onCancel)==null||y.call(e,C)}},h=()=>{n=!0},_=()=>{n=!1},p=()=>fk.isFocused()&&(e.networkMode==="always"||rv.isOnline())&&e.canRun(),m=()=>WM(e.networkMode)&&e.canRun(),x=w=>{l()||(r==null||r(),s="resolved",i(w))},k=w=>{l()||(r==null||r(),s="rejected",a(w))},v=()=>new Promise(w=>{var y;r=C=>{(l()||p())&&w(C)},(y=e.onPause)==null||y.call(e)}).then(()=>{var w;r=void 0,l()||(w=e.onContinue)==null||w.call(e)}),b=()=>{if(l())return;let w;const y=t===0?e.initialPromise:void 0;try{w=y??e.fn()}catch(C){w=Promise.reject(C)}Promise.resolve(w).then(x).catch(C=>{var M;if(l())return;const N=e.retry??(_k()?0:3),E=e.retryDelay??uV,T=typeof E=="function"?E(t,C):E,j=N===!0||typeof N=="number"&&tp()?void 0:v()).then(()=>{n?k(C):b()})})};return{promise:o,status:()=>s,cancel:u,continue:()=>(r==null||r(),o),cancelRetry:h,continueRetry:_,canStart:m,start:()=>(m()?b():v().then(b),o)}}var b_,DM,XM=(DM=class{constructor(){lt(this,b_)}destroy(){this.clearGcTimeout()}scheduleGc(){this.clearGcTimeout(),GM(this.gcTime)&&Ge(this,b_,h_.setTimeout(()=>{this.optionalRemove()},this.gcTime))}updateGcTime(e){this.gcTime=Math.max(this.gcTime||0,e??(_k()?1/0:3e5))}clearGcTimeout(){ue(this,b_)!==void 0&&(h_.clearTimeout(ue(this,b_)),Ge(this,b_,void 0))}},b_=new WeakMap,DM);function fV(e){return{onFetch:(n,t)=>{var h,_,p,m,x;const r=n.options,s=(p=(_=(h=n.fetchOptions)==null?void 0:h.meta)==null?void 0:_.fetchMore)==null?void 0:p.direction,i=((m=n.state.data)==null?void 0:m.pages)||[],a=((x=n.state.data)==null?void 0:x.pageParams)||[];let o={pages:[],pageParams:[]},l=0;const u=async()=>{let k=!1;const v=y=>{sV(y,()=>n.signal,()=>k=!0)},b=KM(n.options,n.fetchOptions),w=async(y,C,N)=>{if(k)return Promise.reject(n.signal.reason);if(C==null&&y.pages.length)return Promise.resolve(y);const T=(()=>{const I={client:n.client,queryKey:n.queryKey,pageParam:C,direction:N?"backward":"forward",meta:n.options.meta};return v(I),I})(),j=await b(T),{maxPages:M}=n.options,D=N?rV:nV;return{pages:D(y.pages,j,M),pageParams:D(y.pageParams,C,M)}};if(s&&i.length){const y=s==="backward",C=y?dV:M9,N={pages:i,pageParams:a};o=await w(N,C(r,N),y)}else{const y=e??i.length;do{const C=l===0?a[0]??r.initialPageParam:M9(r,o);if(l>0&&C==null)break;o=await w(o,C),l++}while(l{var k,v;return(v=(k=n.options).persister)==null?void 0:v.call(k,u,{client:n.client,queryKey:n.queryKey,meta:n.options.meta,signal:n.signal},t)}:n.fetchFn=u}}}function M9(e,{pages:n,pageParams:t}){const r=n.length-1;return n.length>0?e.getNextPageParam(n[r],n,t[r],t):void 0}function dV(e,{pages:n,pageParams:t}){var r;return n.length>0?(r=e.getPreviousPageParam)==null?void 0:r.call(e,n[0],n,t[0],t):void 0}var Ad,y_,Rd,Na,x_,ms,V0,w_,Xa,Ll,LM,hV=(LM=class extends XM{constructor(n){super();lt(this,Xa);lt(this,Ad);lt(this,y_);lt(this,Rd);lt(this,Na);lt(this,x_);lt(this,ms);lt(this,V0);lt(this,w_);Ge(this,w_,!1),Ge(this,V0,n.defaultOptions),this.setOptions(n.options),this.observers=[],Ge(this,x_,n.client),Ge(this,Na,ue(this,x_).getQueryCache()),this.queryKey=n.queryKey,this.queryHash=n.queryHash,Ge(this,y_,D9(this.options)),this.state=n.state??ue(this,y_),this.scheduleGc()}get meta(){return this.options.meta}get queryType(){return ue(this,Ad)}get promise(){var n;return(n=ue(this,ms))==null?void 0:n.promise}setOptions(n){if(this.options={...ue(this,V0),...n},n!=null&&n._type&&Ge(this,Ad,n._type),this.updateGcTime(this.options.gcTime),this.state&&this.state.data===void 0){const t=D9(this.options);t.data!==void 0&&(this.setState(O9(t.data,t.dataUpdatedAt)),Ge(this,y_,t))}}optionalRemove(){!this.observers.length&&this.state.fetchStatus==="idle"&&ue(this,Na).remove(this)}setData(n,t){const r=k4(this.state.data,n,this.options);return Bt(this,Xa,Ll).call(this,{data:r,type:"success",dataUpdatedAt:t==null?void 0:t.updatedAt,manual:t==null?void 0:t.manual}),r}setState(n){Bt(this,Xa,Ll).call(this,{type:"setState",state:n})}cancel(n){var r,s;const t=(r=ue(this,ms))==null?void 0:r.promise;return(s=ue(this,ms))==null||s.cancel(n),t?t.then(Us).catch(Us):Promise.resolve()}destroy(){super.destroy(),this.cancel({silent:!0})}get resetState(){return ue(this,y_)}reset(){this.destroy(),this.setState(this.resetState)}isActive(){return this.observers.some(n=>Hr(n.options.enabled,this)!==!1)}isDisabled(){return this.getObserversCount()>0?!this.isActive():this.options.queryFn===ck||!this.isFetched()}isFetched(){return this.state.dataUpdateCount+this.state.errorUpdateCount>0}isStatic(){return this.getObserversCount()>0?this.observers.some(n=>Hr(n.options.staleTime,this)==="static"):!1}isStale(){return this.getObserversCount()>0?this.observers.some(n=>n.getCurrentResult().isStale):this.state.data===void 0||this.state.isInvalidated}isStaleByTime(n=0){return this.state.data===void 0?!0:n==="static"?!1:this.state.isInvalidated?!0:!VM(this.state.dataUpdatedAt,n)}onFocus(){var n,t;(n=this.observers.find(r=>r.shouldFetchOnWindowFocus()))==null||n.refetch({cancelRefetch:!1}),(t=ue(this,ms))==null||t.continue()}onOnline(){var n,t;(n=this.observers.find(r=>r.shouldFetchOnReconnect()))==null||n.refetch({cancelRefetch:!1}),(t=ue(this,ms))==null||t.continue()}addObserver(n){this.observers.includes(n)||(this.observers.push(n),this.clearGcTimeout(),ue(this,Na).notify({type:"observerAdded",query:this,observer:n}))}removeObserver(n){const t=this.observers.indexOf(n);t!==-1&&(this.observers.splice(t,1),this.observers.length||(ue(this,ms)&&(ue(this,w_)||this.state.fetchStatus==="paused"&&this.state.status==="pending"?ue(this,ms).cancel({revert:!0}):ue(this,ms).cancelRetry()),this.scheduleGc()),ue(this,Na).notify({type:"observerRemoved",query:this,observer:n}))}getObserversCount(){return this.observers.length}invalidate(){this.state.isInvalidated||Bt(this,Xa,Ll).call(this,{type:"invalidate"})}async fetch(n,t){var u,h,_,p,m,x,k,v,b,w,y,C;if(this.state.fetchStatus!=="idle"&&((u=ue(this,ms))==null?void 0:u.status())!=="rejected"){if(this.state.data!==void 0&&(t!=null&&t.cancelRefetch))this.cancel({silent:!0});else if(ue(this,ms))return ue(this,ms).continueRetry(),ue(this,ms).promise}if(n&&this.setOptions(n),!this.options.queryFn){const N=this.observers.find(E=>E.options.queryFn);N&&this.setOptions(N.options)}const r=new AbortController,s=N=>{Object.defineProperty(N,"signal",{enumerable:!0,get:()=>(Ge(this,w_,!0),r.signal)})},i=()=>{const N=KM(this.options,t),T=(()=>{const j={client:ue(this,x_),queryKey:this.queryKey,meta:this.meta};return s(j),j})();return Ge(this,w_,!1),this.options.persister?this.options.persister(N,T,this):N(T)},o=(()=>{const N={fetchOptions:t,options:this.options,queryKey:this.queryKey,client:ue(this,x_),state:this.state,fetchFn:i};return s(N),N})();(h=ue(this,Ad)==="infinite"?fV(this.options.pages):this.options.behavior)==null||h.onFetch(o,this),Ge(this,Rd,this.state),(this.state.fetchStatus==="idle"||this.state.fetchMeta!==((_=o.fetchOptions)==null?void 0:_.meta))&&Bt(this,Xa,Ll).call(this,{type:"fetch",meta:(p=o.fetchOptions)==null?void 0:p.meta});const l=Ge(this,ms,QM({initialPromise:t==null?void 0:t.initialPromise,fn:o.fetchFn,onCancel:N=>{N instanceof sv&&N.revert&&this.setState({...ue(this,Rd),fetchStatus:"idle"}),r.abort()},onFail:(N,E)=>{Bt(this,Xa,Ll).call(this,{type:"failed",failureCount:N,error:E})},onPause:()=>{Bt(this,Xa,Ll).call(this,{type:"pause"})},onContinue:()=>{Bt(this,Xa,Ll).call(this,{type:"continue"})},retry:o.options.retry,retryDelay:o.options.retryDelay,networkMode:o.options.networkMode,canRun:()=>!0}));try{const N=await l.start();if(N===void 0)throw new Error(`${this.queryHash} data is undefined`);return this.setData(N),(x=(m=ue(this,Na).config).onSuccess)==null||x.call(m,N,this),(v=(k=ue(this,Na).config).onSettled)==null||v.call(k,N,this.state.error,this),N}catch(N){if(N instanceof sv){if(N.silent)return ue(this,ms).promise;if(N.revert){if(this.state.data===void 0)throw N;return this.state.data}}throw Bt(this,Xa,Ll).call(this,{type:"error",error:N}),(w=(b=ue(this,Na).config).onError)==null||w.call(b,N,this),(C=(y=ue(this,Na).config).onSettled)==null||C.call(y,this.state.data,N,this),N}finally{ue(this,ms)===l&&Ge(this,ms,void 0),this.scheduleGc()}}},Ad=new WeakMap,y_=new WeakMap,Rd=new WeakMap,Na=new WeakMap,x_=new WeakMap,ms=new WeakMap,V0=new WeakMap,w_=new WeakMap,Xa=new WeakSet,Ll=function(n){const t=r=>{switch(n.type){case"failed":return{...r,fetchFailureCount:n.failureCount,fetchFailureReason:n.error};case"pause":return{...r,fetchStatus:"paused"};case"continue":return{...r,fetchStatus:"fetching"};case"fetch":return{...r,...YM(r.data,this.options),fetchMeta:n.meta??null};case"success":const s={...r,...O9(n.data,n.dataUpdatedAt),dataUpdateCount:r.dataUpdateCount+1,...!n.manual&&{fetchStatus:"idle",fetchFailureCount:0,fetchFailureReason:null}};return Ge(this,Rd,n.manual?s:void 0),s;case"error":const i=n.error;return{...r,error:i,errorUpdateCount:r.errorUpdateCount+1,errorUpdatedAt:Date.now(),fetchFailureCount:r.fetchFailureCount+1,fetchFailureReason:i,fetchStatus:"idle",status:"error",isInvalidated:!0};case"invalidate":return{...r,isInvalidated:!0};case"setState":return{...r,...n.state}}};this.state=t(this.state),Mr.batch(()=>{this.observers.slice().forEach(r=>{r.onQueryUpdate()}),ue(this,Na).notify({query:this,type:"updated",action:n})})},LM);function YM(e,n){return{fetchFailureCount:0,fetchFailureReason:null,fetchStatus:WM(n.networkMode)?"fetching":"paused",...e===void 0&&{error:null,status:"pending"}}}function O9(e,n){return{data:e,dataUpdatedAt:n??Date.now(),error:null,isInvalidated:!1,status:"success"}}function D9(e){const n=typeof e.initialData=="function"?e.initialData():e.initialData,t=n!==void 0,r=t?typeof e.initialDataUpdatedAt=="function"?e.initialDataUpdatedAt():e.initialDataUpdatedAt:0;return{data:n,dataUpdateCount:0,dataUpdatedAt:t?r??Date.now():0,error:null,errorUpdateCount:0,errorUpdatedAt:0,fetchFailureCount:0,fetchFailureReason:null,fetchMeta:null,isInvalidated:!1,status:t?"success":"pending",fetchStatus:"idle"}}var ii,Cn,K0,ai,k_,Md,Fl,W0,Od,Dd,S_,C_,su,Ld,Fn,Bp,S4,C4,E4,N4,z4,j4,T4,A4,IM,dk=(IM=class extends ef{constructor(n,t){super();lt(this,Fn);lt(this,ii);lt(this,Cn);lt(this,K0);lt(this,ai);lt(this,k_);lt(this,Md);lt(this,Fl);lt(this,W0);lt(this,Od);lt(this,Dd);lt(this,S_);lt(this,C_);lt(this,su);lt(this,Ld,new Set);this.options=t,Ge(this,ii,n),Ge(this,Fl,null),this.bindMethods(),this.setOptions(t)}bindMethods(){this.refetch=this.refetch.bind(this)}onSubscribe(){this.listeners.size===1&&(ue(this,Cn).addObserver(this),L9(ue(this,Cn),this.options)?Bt(this,Fn,Bp).call(this):this.updateResult(),Bt(this,Fn,z4).call(this))}onUnsubscribe(){this.hasListeners()||this.destroy()}shouldFetchOnReconnect(){return R4(ue(this,Cn),this.options,this.options.refetchOnReconnect)}shouldFetchOnWindowFocus(){return R4(ue(this,Cn),this.options,this.options.refetchOnWindowFocus)}destroy(){this.listeners=new Set,Bt(this,Fn,j4).call(this),Bt(this,Fn,T4).call(this),ue(this,Cn).removeObserver(this)}setOptions(n){const t=this.options,r=ue(this,Cn);if(this.options=ue(this,ii).defaultQueryOptions(n),this.options.enabled!==void 0&&typeof this.options.enabled!="boolean"&&typeof this.options.enabled!="function"&&typeof Hr(this.options.enabled,ue(this,Cn))!="boolean")throw new Error("Expected enabled to be a boolean or a callback that returns a boolean");Bt(this,Fn,A4).call(this),ue(this,Cn).setOptions(this.options),t._defaulted&&!Kp(this.options,t)&&ue(this,ii).getQueryCache().notify({type:"observerOptionsUpdated",query:ue(this,Cn),observer:this});const s=this.hasListeners();s&&I9(ue(this,Cn),r,this.options,t)&&Bt(this,Fn,Bp).call(this),this.updateResult(),s&&(ue(this,Cn)!==r||Hr(this.options.enabled,ue(this,Cn))!==Hr(t.enabled,ue(this,Cn))||Hr(this.options.staleTime,ue(this,Cn))!==Hr(t.staleTime,ue(this,Cn)))&&Bt(this,Fn,C4).call(this);const i=Bt(this,Fn,E4).call(this);s&&(ue(this,Cn)!==r||Hr(this.options.enabled,ue(this,Cn))!==Hr(t.enabled,ue(this,Cn))||i!==ue(this,su))&&Bt(this,Fn,N4).call(this,i)}getOptimisticResult(n){const t=ue(this,ii).getQueryCache().build(ue(this,ii),n),r=this.createResult(t,n);return Kp(this.getCurrentResult(),r)||(Ge(this,ai,r),Ge(this,Md,this.options),Ge(this,k_,ue(this,Cn).state)),r}getCurrentResult(){return ue(this,ai)}trackResult(n,t){return new Proxy(n,{get:(r,s)=>(this.trackProp(s),t==null||t(s),Reflect.get(r,s))})}trackProp(n){ue(this,Ld).add(n)}getCurrentQuery(){return ue(this,Cn)}refetch({...n}={}){return this.fetch({...n})}fetchOptimistic(n){const t=ue(this,ii).defaultQueryOptions(n),r=ue(this,ii).getQueryCache().build(ue(this,ii),t);let s=()=>{},i;const a=new Promise(o=>{i=o,s=ue(this,ii).getQueryCache().subscribe(l=>{l.type==="updated"&&l.query.queryHash===r.queryHash&&r.state.data!==void 0&&(s(),o(this.createResult(r,t)))})});return Promise.race([r.fetch().then(()=>{const o=this.createResult(r,t);return i==null||i(o),o}).finally(()=>{s()}),a])}fetch(n){return Bt(this,Fn,Bp).call(this,{...n,cancelRefetch:n.cancelRefetch??!0}).then(()=>(this.updateResult(),ue(this,ai)))}createResult(n,t){var E;const r=ue(this,Cn),s=this.options,i=ue(this,ai),a=ue(this,k_),o=ue(this,Md),l=n!==r?n.state:ue(this,K0),{state:u}=n;let h={...u},_=!1,p;if(t._optimisticResults){const T=this.hasListeners(),j=!T&&L9(n,t),M=T&&I9(n,r,t,s);(j||M)&&(h={...h,...YM(u.data,n.options)}),t._optimisticResults==="isRestoring"&&(h.fetchStatus="idle")}let{error:m,errorUpdatedAt:x,status:k}=h;p=h.data;let v=!1;if(t.placeholderData!==void 0&&p===void 0&&k==="pending"){let T;i!=null&&i.isPlaceholderData&&t.placeholderData===(o==null?void 0:o.placeholderData)?(T=i.data,v=!0):T=typeof t.placeholderData=="function"?t.placeholderData((E=ue(this,Dd))==null?void 0:E.state.data,ue(this,Dd)):t.placeholderData,T!==void 0&&(k="success",p=k4(i==null?void 0:i.data,T,t),_=!0)}if(t.select&&p!==void 0&&!v)if(i&&p===(a==null?void 0:a.data)&&t.select===ue(this,W0))p=ue(this,Od);else try{Ge(this,W0,t.select),p=t.select(p),p=k4(i==null?void 0:i.data,p,t),Ge(this,Od,p),Ge(this,Fl,null)}catch(T){Ge(this,Fl,T)}else p===void 0&&Ge(this,Fl,null);ue(this,Fl)&&(m=ue(this,Fl),p=ue(this,Od),x=Date.now(),k="error",_=!1);const b=h.fetchStatus==="fetching",w=k==="pending",y=k==="error",C=w&&b,N=p!==void 0;return{status:k,fetchStatus:h.fetchStatus,isPending:w,isSuccess:k==="success",isError:y,isInitialLoading:C,isLoading:C,data:p,dataUpdatedAt:h.dataUpdatedAt,error:m,errorUpdatedAt:x,failureCount:h.fetchFailureCount,failureReason:h.fetchFailureReason,errorUpdateCount:h.errorUpdateCount,isFetched:n.isFetched(),isFetchedAfterMount:h.dataUpdateCount>l.dataUpdateCount||h.errorUpdateCount>l.errorUpdateCount,isFetching:b,isRefetching:b&&!w,isLoadingError:y&&!N,isPaused:h.fetchStatus==="paused",isPlaceholderData:_,isRefetchError:y&&N,isStale:hk(n,t),refetch:this.refetch,isEnabled:Hr(t.enabled,n)!==!1}}updateResult(){const n=ue(this,ai),t=this.createResult(ue(this,Cn),this.options);if(Ge(this,k_,ue(this,Cn).state),Ge(this,Md,this.options),ue(this,k_).data!==void 0&&Ge(this,Dd,ue(this,Cn)),Kp(t,n))return;Ge(this,ai,t);const s=(()=>{if(!n)return!0;const{notifyOnChangeProps:i}=this.options,a=typeof i=="function"?i():i;if(a==="all"||!a&&!ue(this,Ld).size)return!0;const o=new Set(a??ue(this,Ld));return this.options.throwOnError&&o.add("error"),Object.keys(ue(this,ai)).some(l=>{const u=l;return ue(this,ai)[u]!==n[u]&&o.has(u)})})();Mr.batch(()=>{s&&this.listeners.forEach(i=>{i(ue(this,ai))}),ue(this,ii).getQueryCache().notify({query:ue(this,Cn),type:"observerResultsUpdated"})})}onQueryUpdate(){this.updateResult(),this.hasListeners()&&Bt(this,Fn,z4).call(this)}},ii=new WeakMap,Cn=new WeakMap,K0=new WeakMap,ai=new WeakMap,k_=new WeakMap,Md=new WeakMap,Fl=new WeakMap,W0=new WeakMap,Od=new WeakMap,Dd=new WeakMap,S_=new WeakMap,C_=new WeakMap,su=new WeakMap,Ld=new WeakMap,Fn=new WeakSet,Bp=function(n){Bt(this,Fn,A4).call(this);let t=ue(this,Cn).fetch(this.options,n);return n!=null&&n.throwOnError||(t=t.catch(Us)),t},S4=function(n){return!_k()&&Hr(this.options.enabled,ue(this,Cn))!==!1&&GM(n)},C4=function(){Bt(this,Fn,j4).call(this);const n=Hr(this.options.staleTime,ue(this,Cn));if(ue(this,ai).isStale||!Bt(this,Fn,S4).call(this,n))return;const t=VM(ue(this,ai).dataUpdatedAt,n)+1;Ge(this,S_,h_.setTimeout(()=>{ue(this,ai).isStale||this.updateResult()},t))},E4=function(){return(typeof this.options.refetchInterval=="function"?this.options.refetchInterval(ue(this,Cn)):this.options.refetchInterval)??!1},N4=function(n){Bt(this,Fn,T4).call(this),Ge(this,su,n),!(ue(this,su)===0||!Bt(this,Fn,S4).call(this,ue(this,su)))&&Ge(this,C_,h_.setInterval(()=>{(this.options.refetchIntervalInBackground||fk.isFocused())&&Bt(this,Fn,Bp).call(this)},ue(this,su)))},z4=function(){Bt(this,Fn,C4).call(this),Bt(this,Fn,N4).call(this,Bt(this,Fn,E4).call(this))},j4=function(){ue(this,S_)!==void 0&&(h_.clearTimeout(ue(this,S_)),Ge(this,S_,void 0))},T4=function(){ue(this,C_)!==void 0&&(h_.clearInterval(ue(this,C_)),Ge(this,C_,void 0))},A4=function(){const n=ue(this,ii).getQueryCache().build(ue(this,ii),this.options);if(n===ue(this,Cn))return;const t=ue(this,Cn);Ge(this,Cn,n),Ge(this,K0,n.state),this.hasListeners()&&(t==null||t.removeObserver(this),n.addObserver(this))},IM);function pV(e,n){return Hr(n.enabled,e)!==!1&&e.state.data===void 0&&!(e.state.status==="error"&&Hr(n.retryOnMount,e)===!1)}function L9(e,n){return pV(e,n)||e.state.data!==void 0&&R4(e,n,n.refetchOnMount)}function R4(e,n,t){if(Hr(n.enabled,e)!==!1&&Hr(n.staleTime,e)!=="static"){const r=typeof t=="function"?t(e):t;return r==="always"||r!==!1&&hk(e,n)}return!1}function I9(e,n,t,r){return(e!==n||Hr(r.enabled,e)===!1)&&(!t.suspense||e.state.status!=="error")&&hk(e,t)}function hk(e,n){return Hr(n.enabled,e)!==!1&&e.isStaleByTime(Hr(n.staleTime,e))}var Q0,Oo,Fs,E_,Do,Yc,$M,mV=($M=class extends XM{constructor(n){super();lt(this,Do);lt(this,Q0);lt(this,Oo);lt(this,Fs);lt(this,E_);Ge(this,Q0,n.client),this.mutationId=n.mutationId,Ge(this,Fs,n.mutationCache),Ge(this,Oo,[]),this.state=n.state||ZM(),this.setOptions(n.options),this.scheduleGc()}setOptions(n){this.options=n,this.updateGcTime(this.options.gcTime)}get meta(){return this.options.meta}addObserver(n){ue(this,Oo).includes(n)||(ue(this,Oo).push(n),this.clearGcTimeout(),ue(this,Fs).notify({type:"observerAdded",mutation:this,observer:n}))}removeObserver(n){Ge(this,Oo,ue(this,Oo).filter(t=>t!==n)),this.scheduleGc(),ue(this,Fs).notify({type:"observerRemoved",mutation:this,observer:n})}optionalRemove(){ue(this,Oo).length||(this.state.status==="pending"?this.scheduleGc():ue(this,Fs).remove(this))}continue(){var n;return((n=ue(this,E_))==null?void 0:n.continue())??(this.state.status==="pending"?this.execute(this.state.variables):Promise.resolve())}async execute(n){var o,l,u,h,_,p,m,x,k,v,b,w,y,C,N,E,T,j;const t=()=>{Bt(this,Do,Yc).call(this,{type:"continue"})},r={client:ue(this,Q0),meta:this.options.meta,mutationKey:this.options.mutationKey},s=Ge(this,E_,QM({fn:()=>this.options.mutationFn?this.options.mutationFn(n,r):Promise.reject(new Error("No mutationFn found")),onFail:(M,D)=>{Bt(this,Do,Yc).call(this,{type:"failed",failureCount:M,error:D})},onPause:()=>{Bt(this,Do,Yc).call(this,{type:"pause"})},onContinue:t,retry:this.options.retry??0,retryDelay:this.options.retryDelay,networkMode:this.options.networkMode,canRun:()=>ue(this,Fs).canRun(this)})),i=this.state.status==="pending",a=!s.canStart();try{if(i)t();else{Bt(this,Do,Yc).call(this,{type:"pending",variables:n,isPaused:a}),ue(this,Fs).config.onMutate&&await ue(this,Fs).config.onMutate(n,this,r);const D=await((l=(o=this.options).onMutate)==null?void 0:l.call(o,n,r));D!==this.state.context&&Bt(this,Do,Yc).call(this,{type:"pending",context:D,variables:n,isPaused:a})}const M=await s.start();return await((h=(u=ue(this,Fs).config).onSuccess)==null?void 0:h.call(u,M,n,this.state.context,this,r)),await((p=(_=this.options).onSuccess)==null?void 0:p.call(_,M,n,this.state.context,r)),await((x=(m=ue(this,Fs).config).onSettled)==null?void 0:x.call(m,M,null,this.state.variables,this.state.context,this,r)),await((v=(k=this.options).onSettled)==null?void 0:v.call(k,M,null,n,this.state.context,r)),Bt(this,Do,Yc).call(this,{type:"success",data:M}),M}catch(M){try{await((w=(b=ue(this,Fs).config).onError)==null?void 0:w.call(b,M,n,this.state.context,this,r))}catch(D){Promise.reject(D)}try{await((C=(y=this.options).onError)==null?void 0:C.call(y,M,n,this.state.context,r))}catch(D){Promise.reject(D)}try{await((E=(N=ue(this,Fs).config).onSettled)==null?void 0:E.call(N,void 0,M,this.state.variables,this.state.context,this,r))}catch(D){Promise.reject(D)}try{await((j=(T=this.options).onSettled)==null?void 0:j.call(T,void 0,M,n,this.state.context,r))}catch(D){Promise.reject(D)}throw Bt(this,Do,Yc).call(this,{type:"error",error:M}),M}finally{ue(this,E_)===s&&Ge(this,E_,void 0),ue(this,Fs).runNext(this)}}},Q0=new WeakMap,Oo=new WeakMap,Fs=new WeakMap,E_=new WeakMap,Do=new WeakSet,Yc=function(n){const t=r=>{switch(n.type){case"failed":return{...r,failureCount:n.failureCount,failureReason:n.error};case"pause":return{...r,isPaused:!0};case"continue":return{...r,isPaused:!1};case"pending":return{...r,context:n.context,data:void 0,failureCount:0,failureReason:null,error:null,isPaused:n.isPaused,status:"pending",variables:n.variables,submittedAt:Date.now()};case"success":return{...r,data:n.data,failureCount:0,failureReason:null,error:null,status:"success",isPaused:!1};case"error":return{...r,data:void 0,error:n.error,failureCount:r.failureCount+1,failureReason:n.error,isPaused:!1,status:"error"}}};this.state=t(this.state),Mr.batch(()=>{ue(this,Oo).forEach(r=>{r.onMutationUpdate(n)}),ue(this,Fs).notify({mutation:this,type:"updated",action:n})})},$M);function ZM(){return{context:void 0,data:void 0,error:null,failureCount:0,failureReason:null,isPaused:!1,status:"idle",variables:void 0,submittedAt:0}}var Hl,Ya,X0,BM,gV=(BM=class extends ef{constructor(n={}){super();lt(this,Hl);lt(this,Ya);lt(this,X0);this.config=n,Ge(this,Hl,new Set),Ge(this,Ya,new Map),Ge(this,X0,0)}build(n,t,r){const s=new mV({client:n,mutationCache:this,mutationId:++vp(this,X0)._,options:n.defaultMutationOptions(t),state:r});return this.add(s),s}add(n){ue(this,Hl).add(n);const t=Og(n);if(typeof t=="string"){const r=ue(this,Ya).get(t);r?r.push(n):ue(this,Ya).set(t,[n])}this.notify({type:"added",mutation:n})}remove(n){if(ue(this,Hl).delete(n)){const t=Og(n);if(typeof t=="string"){const r=ue(this,Ya).get(t);if(r)if(r.length>1){const s=r.indexOf(n);s!==-1&&r.splice(s,1)}else r[0]===n&&ue(this,Ya).delete(t)}}this.notify({type:"removed",mutation:n})}canRun(n){var r;const t=Og(n);if(typeof t=="string"){const s=(r=ue(this,Ya).get(t))==null?void 0:r.find(i=>i.state.status==="pending");return!s||s===n}else return!0}runNext(n){var r,s;const t=Og(n);return typeof t=="string"?((s=(r=ue(this,Ya).get(t))==null?void 0:r.find(i=>i!==n&&i.state.isPaused))==null?void 0:s.continue())??Promise.resolve():Promise.resolve()}clear(){Mr.batch(()=>{ue(this,Hl).forEach(n=>{this.notify({type:"removed",mutation:n})}),ue(this,Hl).clear(),ue(this,Ya).clear()})}getAll(){return Array.from(ue(this,Hl))}find(n){const t={exact:!0,...n};return this.getAll().find(r=>T9(t,r))}findAll(n={}){return this.getAll().filter(t=>T9(n,t))}notify(n){Mr.batch(()=>{this.listeners.forEach(t=>{t(n)})})}resumePausedMutations(){const n=this.getAll().filter(t=>t.state.isPaused);return Mr.batch(()=>Promise.all(n.map(t=>t.continue().catch(Us))))}},Hl=new WeakMap,Ya=new WeakMap,X0=new WeakMap,BM);function Og(e){var n;return(n=e.options.scope)==null?void 0:n.id}var ql,iu,Hs,Ul,Fo,Pp,M4,PM,vV=(PM=class extends ef{constructor(t,r){super();lt(this,Fo);lt(this,ql);lt(this,iu);lt(this,Hs);lt(this,Ul);Ge(this,ql,t),this.setOptions(r),this.bindMethods(),Bt(this,Fo,Pp).call(this)}bindMethods(){this.mutate=this.mutate.bind(this),this.reset=this.reset.bind(this)}setOptions(t){var s;const r=this.options;this.options=ue(this,ql).defaultMutationOptions(t),Kp(this.options,r)||ue(this,ql).getMutationCache().notify({type:"observerOptionsUpdated",mutation:ue(this,Hs),observer:this}),r!=null&&r.mutationKey&&this.options.mutationKey&&B_(r.mutationKey)!==B_(this.options.mutationKey)?this.reset():((s=ue(this,Hs))==null?void 0:s.state.status)==="pending"&&ue(this,Hs).setOptions(this.options)}onSubscribe(){this.listeners.size===1&&ue(this,Hs)&&(ue(this,Hs).addObserver(this),Bt(this,Fo,Pp).call(this))}onUnsubscribe(){var t;this.hasListeners()||(t=ue(this,Hs))==null||t.removeObserver(this)}onMutationUpdate(t){Bt(this,Fo,Pp).call(this),Bt(this,Fo,M4).call(this,t)}getCurrentResult(){return ue(this,iu)}reset(){var t;(t=ue(this,Hs))==null||t.removeObserver(this),Ge(this,Hs,void 0),Bt(this,Fo,Pp).call(this),Bt(this,Fo,M4).call(this)}mutate(t,r){var s;return Ge(this,Ul,r),(s=ue(this,Hs))==null||s.removeObserver(this),Ge(this,Hs,ue(this,ql).getMutationCache().build(ue(this,ql),this.options)),ue(this,Hs).addObserver(this),ue(this,Hs).execute(t)}},ql=new WeakMap,iu=new WeakMap,Hs=new WeakMap,Ul=new WeakMap,Fo=new WeakSet,Pp=function(){var r;const t=((r=ue(this,Hs))==null?void 0:r.state)??ZM();Ge(this,iu,{...t,isPending:t.status==="pending",isSuccess:t.status==="success",isError:t.status==="error",isIdle:t.status==="idle",mutate:this.mutate,reset:this.reset})},M4=function(t){Mr.batch(()=>{var r,s,i,a,o,l,u,h;if(ue(this,Ul)&&this.hasListeners()){const _=ue(this,iu).variables,p=ue(this,iu).context,m={client:ue(this,ql),meta:this.options.meta,mutationKey:this.options.mutationKey};if((t==null?void 0:t.type)==="success"){try{(s=(r=ue(this,Ul)).onSuccess)==null||s.call(r,t.data,_,p,m)}catch(x){Promise.reject(x)}try{(a=(i=ue(this,Ul)).onSettled)==null||a.call(i,t.data,null,_,p,m)}catch(x){Promise.reject(x)}}else if((t==null?void 0:t.type)==="error"){try{(l=(o=ue(this,Ul)).onError)==null||l.call(o,t.error,_,p,m)}catch(x){Promise.reject(x)}try{(h=(u=ue(this,Ul)).onSettled)==null||h.call(u,void 0,t.error,_,p,m)}catch(x){Promise.reject(x)}}}this.listeners.forEach(_=>{_(ue(this,iu))})})},PM);function $9(e,n){const t=new Set(n);return e.filter(r=>!t.has(r))}var Id,oi,$d,N_,Wi,z_,Y0,Z0,J0,em,ys,O4,D4,JM,L4,I4,$4,FM,bV=(FM=class extends ef{constructor(n,t,r){super();lt(this,ys);lt(this,Id);lt(this,oi);lt(this,$d);lt(this,N_);lt(this,Wi);lt(this,z_);lt(this,Y0);lt(this,Z0);lt(this,J0);lt(this,em,[]);Ge(this,Id,n),Ge(this,N_,r),Ge(this,$d,[]),Ge(this,Wi,[]),Ge(this,oi,[]),this.setQueries(t)}onSubscribe(){this.listeners.size===1&&ue(this,Wi).forEach(n=>{n.subscribe(t=>{Bt(this,ys,I4).call(this,n,t)})})}onUnsubscribe(){this.listeners.size||this.destroy()}destroy(){this.listeners=new Set,ue(this,Wi).forEach(n=>{n.destroy()})}setQueries(n,t){Ge(this,$d,n),Ge(this,N_,t),Mr.batch(()=>{const r=ue(this,Wi),s=Bt(this,ys,L4).call(this,ue(this,$d));s.forEach(_=>_.observer.setOptions(_.defaultedQueryOptions));const i=s.map(_=>_.observer),a=i.map(_=>_.getCurrentResult()),o=r.length!==i.length,l=i.some((_,p)=>_!==r[p]),u=o||l,h=u?!0:a.some((_,p)=>{const m=ue(this,oi)[p];return!m||!Kp(_,m)});!u&&!h||(u&&(Ge(this,em,s),Ge(this,Wi,i)),Ge(this,oi,a),this.hasListeners()&&(u&&($9(r,i).forEach(_=>{_.destroy()}),$9(i,r).forEach(_=>{_.subscribe(p=>{Bt(this,ys,I4).call(this,_,p)})})),Bt(this,ys,$4).call(this)))})}getCurrentResult(){return ue(this,oi)}getQueries(){return ue(this,Wi).map(n=>n.getCurrentQuery())}getObservers(){return ue(this,Wi)}getOptimisticResult(n,t){const r=Bt(this,ys,L4).call(this,n),s=r.map(a=>a.observer.getOptimisticResult(a.defaultedQueryOptions)),i=r.map(a=>a.defaultedQueryOptions.queryHash);return[s,a=>Bt(this,ys,D4).call(this,a??s,t,i),()=>Bt(this,ys,O4).call(this,s,r)]}},Id=new WeakMap,oi=new WeakMap,$d=new WeakMap,N_=new WeakMap,Wi=new WeakMap,z_=new WeakMap,Y0=new WeakMap,Z0=new WeakMap,J0=new WeakMap,em=new WeakMap,ys=new WeakSet,O4=function(n,t){const r=new Set;return t.map((s,i)=>{const a=n[i];return s.defaultedQueryOptions.notifyOnChangeProps?a:s.observer.trackResult(a,o=>{r.has(o)||(r.add(o),t.forEach(l=>{l.observer.trackProp(o)}))})})},D4=function(n,t,r){if(t){const s=ue(this,J0),i=r!==void 0&&s!==void 0&&(s.length!==r.length||r.some((a,o)=>a!==s[o]));return(ue(this,oi)!==ue(this,Z0)||i||t!==ue(this,Y0))&&(Ge(this,Y0,t),Ge(this,Z0,ue(this,oi)),r!==void 0&&Ge(this,J0,r),Ge(this,z_,lk(ue(this,z_),t(n)))),ue(this,z_)}return n},JM=function(){var n;return!((n=ue(this,N_))!=null&&n.combine)||ue(this,Wi).some((t,r)=>{var s;return t.options.suspense&&((s=ue(this,oi)[r])==null?void 0:s.data)===void 0})},L4=function(n){const t=new Map;ue(this,Wi).forEach(s=>{const i=s.options.queryHash;if(!i)return;const a=t.get(i);a?a.push(s):t.set(i,[s])});const r=[];return n.forEach(s=>{var o;const i=ue(this,Id).defaultQueryOptions(s),a=((o=t.get(i.queryHash))==null?void 0:o.shift())??new dk(ue(this,Id),i);r.push({defaultedQueryOptions:i,observer:a})}),r},I4=function(n,t){const r=ue(this,Wi).indexOf(n);r!==-1&&(Ge(this,oi,ue(this,oi).slice()),ue(this,oi)[r]=t,Bt(this,ys,$4).call(this))},$4=function(){var n;if(this.hasListeners()){const t=Bt(this,ys,JM).call(this),r=ue(this,z_),s=t?r:Bt(this,ys,D4).call(this,Bt(this,ys,O4).call(this,ue(this,oi),ue(this,em)),(n=ue(this,N_))==null?void 0:n.combine);(t||r!==s)&&Mr.batch(()=>{this.listeners.forEach(i=>{i(ue(this,oi))})})}},FM),Lo,HM,yV=(HM=class extends ef{constructor(n={}){super();lt(this,Lo);this.config=n,Ge(this,Lo,new Map)}build(n,t,r){const s=t.queryKey,i=t.queryHash??ok(s,t);let a=this.get(i);return a||(a=new hV({client:n,queryKey:s,queryHash:i,options:n.defaultQueryOptions(t),state:r,defaultOptions:n.getQueryDefaults(s)}),this.add(a)),a}add(n){ue(this,Lo).has(n.queryHash)||(ue(this,Lo).set(n.queryHash,n),this.notify({type:"added",query:n}))}remove(n){const t=ue(this,Lo).get(n.queryHash);t&&(n.destroy(),t===n&&ue(this,Lo).delete(n.queryHash),this.notify({type:"removed",query:n}))}clear(){Mr.batch(()=>{this.getAll().forEach(n=>{this.remove(n)})})}get(n){return ue(this,Lo).get(n)}getAll(){return[...ue(this,Lo).values()]}find(n){const t={exact:!0,...n};return this.getAll().find(r=>j9(t,r))}findAll(n={}){const t=this.getAll();return Object.keys(n).length>0?t.filter(r=>j9(n,r)):t}notify(n){Mr.batch(()=>{this.listeners.forEach(t=>{t(n)})})}onFocus(){Mr.batch(()=>{this.getAll().forEach(n=>{n.onFocus()})})}onOnline(){Mr.batch(()=>{this.getAll().forEach(n=>{n.onOnline()})})}},Lo=new WeakMap,HM),Ar,au,ou,Bd,Pd,lu,Fd,Hd,qM,xV=(qM=class{constructor(e={}){lt(this,Ar);lt(this,au);lt(this,ou);lt(this,Bd);lt(this,Pd);lt(this,lu);lt(this,Fd);lt(this,Hd);Ge(this,Ar,e.queryCache||new yV),Ge(this,au,e.mutationCache||new gV),Ge(this,ou,e.defaultOptions||{}),Ge(this,Bd,new Map),Ge(this,Pd,new Map),Ge(this,lu,0)}mount(){vp(this,lu)._++,ue(this,lu)===1&&(Ge(this,Fd,fk.subscribe(async e=>{e&&(await this.resumePausedMutations(),ue(this,Ar).onFocus())})),Ge(this,Hd,rv.subscribe(async e=>{e&&(await this.resumePausedMutations(),ue(this,Ar).onOnline())})))}unmount(){var e,n;vp(this,lu)._--,ue(this,lu)===0&&((e=ue(this,Fd))==null||e.call(this),Ge(this,Fd,void 0),(n=ue(this,Hd))==null||n.call(this),Ge(this,Hd,void 0))}isFetching(e){return ue(this,Ar).findAll({...e,fetchStatus:"fetching"}).length}isMutating(e){return ue(this,au).findAll({...e,status:"pending"}).length}getQueryData(e){var t;const n=this.defaultQueryOptions({queryKey:e});return(t=ue(this,Ar).get(n.queryHash))==null?void 0:t.state.data}ensureQueryData(e){const n=this.defaultQueryOptions(e),t=ue(this,Ar).build(this,n),r=t.state.data;return r===void 0?this.fetchQuery(e):(e.revalidateIfStale&&t.isStaleByTime(Hr(n.staleTime,t))&&this.prefetchQuery(n),Promise.resolve(r))}getQueriesData(e){return ue(this,Ar).findAll(e).map(({queryKey:n,state:t})=>[n,t.data])}setQueryData(e,n,t){var a;const r=this.defaultQueryOptions({queryKey:e}),s=(a=ue(this,Ar).get(r.queryHash))==null?void 0:a.state.data,i=JG(n,s);if(i!==void 0)return ue(this,Ar).build(this,r).setData(i,{...t,manual:!0})}setQueriesData(e,n,t){return Mr.batch(()=>ue(this,Ar).findAll(e).map(({queryKey:r})=>[r,this.setQueryData(r,n,t)]))}getQueryState(e){var t;const n=this.defaultQueryOptions({queryKey:e});return(t=ue(this,Ar).get(n.queryHash))==null?void 0:t.state}removeQueries(e){const n=ue(this,Ar);Mr.batch(()=>{n.findAll(e).forEach(t=>{n.remove(t)})})}resetQueries(e,n){const t=ue(this,Ar);return Mr.batch(()=>{const r=t.findAll(e),s=new Set(r);return r.forEach(i=>{i.reset()}),this.refetchQueries({type:"active",predicate:i=>s.has(i)},n)})}cancelQueries(e,n={}){const t={revert:!0,...n},r=Mr.batch(()=>ue(this,Ar).findAll(e).map(s=>s.cancel(t)));return Promise.all(r).then(Us).catch(Us)}invalidateQueries(e,n={}){return Mr.batch(()=>(ue(this,Ar).findAll(e).forEach(t=>{t.invalidate()}),(e==null?void 0:e.refetchType)==="none"?Promise.resolve():this.refetchQueries({...e,type:(e==null?void 0:e.refetchType)??(e==null?void 0:e.type)??"active"},n)))}refetchQueries(e,n={}){const t={...n,cancelRefetch:n.cancelRefetch??!0},r=Mr.batch(()=>ue(this,Ar).findAll(e).filter(s=>!s.isDisabled()&&!s.isStatic()).map(s=>{let i=s.fetch(void 0,t);return t.throwOnError||(i=i.catch(Us)),s.state.fetchStatus==="paused"?Promise.resolve():i}));return Promise.all(r).then(Us)}async query(e){const n=this.defaultQueryOptions(e);n.retry===void 0&&(n.retry=!1);const t=ue(this,Ar).build(this,n),r=t.isStaleByTime(Hr(n.staleTime,t))?await t.fetch(n):t.state.data,s=n.select;return s?s(r):r}fetchQuery(e){const n=this.defaultQueryOptions(e);n.retry===void 0&&(n.retry=!1);const t=ue(this,Ar).build(this,n);return t.isStaleByTime(Hr(n.staleTime,t))?t.fetch(n):Promise.resolve(t.state.data)}prefetchQuery(e){return this.fetchQuery(e).then(Us).catch(Us)}infiniteQuery(e){return e._type="infinite",this.query(e)}fetchInfiniteQuery(e){return e._type="infinite",this.fetchQuery(e)}prefetchInfiniteQuery(e){return this.fetchInfiniteQuery(e).then(Us).catch(Us)}ensureInfiniteQueryData(e){return e._type="infinite",this.ensureQueryData(e)}resumePausedMutations(){return rv.isOnline()?ue(this,au).resumePausedMutations():Promise.resolve()}getQueryCache(){return ue(this,Ar)}getMutationCache(){return ue(this,au)}getDefaultOptions(){return ue(this,ou)}setDefaultOptions(e){Ge(this,ou,e)}setQueryDefaults(e,n){ue(this,Bd).set(B_(e),{queryKey:e,defaultOptions:n})}getQueryDefaults(e){const n=[...ue(this,Bd).values()],t={};return n.forEach(r=>{Vd(e,r.queryKey)&&Object.assign(t,r.defaultOptions)}),t}setMutationDefaults(e,n){ue(this,Pd).set(B_(e),{mutationKey:e,defaultOptions:n})}getMutationDefaults(e){const n=[...ue(this,Pd).values()],t={};return n.forEach(r=>{Vd(e,r.mutationKey)&&Object.assign(t,r.defaultOptions)}),t}defaultQueryOptions(e){if(e._defaulted)return e;const n={...ue(this,ou).queries,...this.getQueryDefaults(e.queryKey),...e,_defaulted:!0};return n.queryHash||(n.queryHash=ok(n.queryKey,n)),n.refetchOnReconnect===void 0&&(n.refetchOnReconnect=n.networkMode!=="always"),n.throwOnError===void 0&&(n.throwOnError=!!n.suspense),!n.networkMode&&n.persister&&(n.networkMode="offlineFirst"),n.queryFn===ck&&(n.enabled=!1),n}defaultMutationOptions(e){return e!=null&&e._defaulted?e:{...ue(this,ou).mutations,...(e==null?void 0:e.mutationKey)&&this.getMutationDefaults(e.mutationKey),...e,_defaulted:!0}}clear(){ue(this,Ar).clear(),ue(this,au).clear()}},Ar=new WeakMap,au=new WeakMap,ou=new WeakMap,Bd=new WeakMap,Pd=new WeakMap,lu=new WeakMap,Fd=new WeakMap,Hd=new WeakMap,qM);const eO=A.createContext(!1),tO=()=>A.useContext(eO);eO.Provider;function wV(){let e=!1;return{clearReset:()=>{e=!1},reset:()=>{e=!0},isReset:()=>e}}const kV=A.createContext(wV()),nO=()=>A.useContext(kV),rO=(e,n,t)=>{const r=t!=null&&t.state.error&&typeof e.throwOnError=="function"?uk(e.throwOnError,[t.state.error,t]):e.throwOnError;(e.suspense||r)&&(n.isReset()||(e.retryOnMount=!1))},sO=e=>{A.useEffect(()=>{e.clearReset()},[e])},iO=({result:e,errorResetBoundary:n,throwOnError:t,query:r,suspense:s})=>e.isError&&!n.isReset()&&!e.isFetching&&r&&(s&&e.data===void 0||uk(t,[e.error,r])),aO=e=>{if(e.suspense){const t=s=>s==="static"?s:Math.max(s??1e3,1e3),r=e.staleTime;e.staleTime=typeof r=="function"?(...s)=>t(r(...s)):t(r),typeof e.gcTime=="number"&&(e.gcTime=Math.max(e.gcTime,1e3))}},B4=(e,n)=>(e==null?void 0:e.suspense)&&n.isPending,oO=(e,n,t)=>n.fetchOptimistic(e).catch(()=>{t.clearReset()});function SV({queries:e,...n},t){const r=mh(),s=tO(),i=nO(),a=n.subscribed!==!1,o=A.useMemo(()=>e.map(k=>{const v=r.defaultQueryOptions(k);return v._optimisticResults=s?"isRestoring":a?"optimistic":void 0,v}),[e,r,s,a]);o.forEach(k=>{aO(k);const v=r.getQueryCache().get(k.queryHash);rO(k,i,v)}),sO(i);const[l]=A.useState(()=>new bV(r,o,n)),[u,h,_]=l.getOptimisticResult(o,n.combine),p=!s&&a;A.useSyncExternalStore(A.useCallback(k=>p?l.subscribe(Mr.batchCalls(k)):Us,[l,p]),()=>l.getCurrentResult(),()=>l.getCurrentResult()),A.useEffect(()=>{l.setQueries(o,n)},[o,n,l]);const m=u.some((k,v)=>B4(o[v],k))?u.flatMap((k,v)=>{const b=o[v];if(b&&B4(b,k)){const w=new dk(r,b);return oO(b,w,i)}return[]}):[];if(m.length>0)throw Promise.all(m);const x=u.find((k,v)=>{const b=o[v];return b&&iO({result:k,errorResetBoundary:i,throwOnError:b.throwOnError,query:r.getQueryCache().get(b.queryHash),suspense:b.suspense})});if(x)throw x.error;return h(_())}function CV(e,n,t){const r=tO(),s=nO(),i=mh(),a=i.defaultQueryOptions(e),o=i.getQueryCache().get(a.queryHash),l=e.subscribed!==!1;a._optimisticResults=r?"isRestoring":l?"optimistic":void 0,aO(a),rO(a,s,o),sO(s);const[u]=A.useState(()=>new n(i,a)),h=u.getOptimisticResult(a),_=!r&&l;if(A.useSyncExternalStore(A.useCallback(p=>{const m=_?u.subscribe(Mr.batchCalls(p)):Us;return u.updateResult(),m},[u,_]),()=>u.getCurrentResult(),()=>u.getCurrentResult()),A.useEffect(()=>{u.setOptions(a)},[a,u]),B4(a,h))throw oO(a,u,s);if(iO({result:h,errorResetBoundary:s,throwOnError:a.throwOnError,query:o,suspense:a.suspense}))throw h.error;return a.notifyOnChangeProps?h:u.trackResult(h)}function ft(e,n){return CV(e,dk)}function EV(e,n){const t=mh(),r=t.getQueryCache();return A.useSyncExternalStore(A.useCallback(s=>r.subscribe(Mr.batchCalls(s)),[r]),()=>t.isFetching(e),()=>t.isFetching(e))}function vn(e,n){const t=mh(),[r]=A.useState(()=>new vV(t,e));A.useEffect(()=>{r.setOptions(e)},[r,e]);const s=A.useSyncExternalStore(A.useCallback(a=>r.subscribe(Mr.batchCalls(a)),[r]),()=>r.getCurrentResult(),()=>r.getCurrentResult()),i=A.useCallback((...a)=>{r.mutate(a[0],a[1]).catch(Us)},[r]);if(s.error&&uk(r.options.throwOnError,[s.error]))throw s.error;return{...s,mutate:i,mutateAsync:s.mutate}}const rt=new xV({defaultOptions:{queries:{staleTime:3e4,gcTime:6e5,retry:!1,networkMode:"always",refetchOnReconnect:!0},mutations:{retry:!1,networkMode:"always"}}}),gu=new Set;let B9=null,cb=0;const P4=new Set,NV=()=>cb,P9=e=>(P4.add(e),()=>{P4.delete(e)}),Ra=()=>["workspace",cb],Et=(e,...n)=>[...Ra(),e,...n];function zV(e,n=!1){if(B9===e&&!n)return!1;const t=Ra();return B9=e,cb++,gu.clear(),pk({queryKey:t}),P4.forEach(r=>r()),!0}const $n=e=>e[1]===cb;async function pk(e){await rt.cancelQueries(e,{revert:!1}),rt.removeQueries(e)}function Qr(e,n){if($n(e))return rt.setQueryData(e,n)}var E2={exports:{}},yp={},N2={exports:{}},z2={};/** + */var N9;function QG(){if(N9)return nn;N9=1;var e=Symbol.for("react.transitional.element"),n=Symbol.for("react.portal"),t=Symbol.for("react.fragment"),r=Symbol.for("react.strict_mode"),s=Symbol.for("react.profiler"),i=Symbol.for("react.consumer"),a=Symbol.for("react.context"),o=Symbol.for("react.forward_ref"),l=Symbol.for("react.suspense"),u=Symbol.for("react.memo"),h=Symbol.for("react.lazy"),_=Symbol.for("react.activity"),p=Symbol.iterator;function m(F){return F===null||typeof F!="object"?null:(F=p&&F[p]||F["@@iterator"],typeof F=="function"?F:null)}var x={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},k=Object.assign,v={};function b(F,G,V){this.props=F,this.context=G,this.refs=v,this.updater=V||x}b.prototype.isReactComponent={},b.prototype.setState=function(F,G){if(typeof F!="object"&&typeof F!="function"&&F!=null)throw Error("takes an object of state variables to update or a function which returns an object of state variables.");this.updater.enqueueSetState(this,F,G,"setState")},b.prototype.forceUpdate=function(F){this.updater.enqueueForceUpdate(this,F,"forceUpdate")};function w(){}w.prototype=b.prototype;function y(F,G,V){this.props=F,this.context=G,this.refs=v,this.updater=V||x}var C=y.prototype=new w;C.constructor=y,k(C,b.prototype),C.isPureReactComponent=!0;var E=Array.isArray;function N(){}var A={H:null,A:null,T:null,S:null},j=Object.prototype.hasOwnProperty;function M(F,G,V){var ee=V.ref;return{$$typeof:e,type:F,key:G,ref:ee!==void 0?ee:null,props:V}}function L(F,G){return M(F.type,G,F.props)}function I(F){return typeof F=="object"&&F!==null&&F.$$typeof===e}function B(F){var G={"=":"=0",":":"=2"};return"$"+F.replace(/[=:]/g,function(V){return G[V]})}var q=/\/+/g;function U(F,G){return typeof F=="object"&&F!==null&&F.key!=null?B(""+F.key):G.toString(36)}function W(F){switch(F.status){case"fulfilled":return F.value;case"rejected":throw F.reason;default:switch(typeof F.status=="string"?F.then(N,N):(F.status="pending",F.then(function(G){F.status==="pending"&&(F.status="fulfilled",F.value=G)},function(G){F.status==="pending"&&(F.status="rejected",F.reason=G)})),F.status){case"fulfilled":return F.value;case"rejected":throw F.reason}}throw F}function H(F,G,V,ee,ce){var ae=typeof F;(ae==="undefined"||ae==="boolean")&&(F=null);var re=!1;if(F===null)re=!0;else switch(ae){case"bigint":case"string":case"number":re=!0;break;case"object":switch(F.$$typeof){case e:case n:re=!0;break;case h:return re=F._init,H(re(F._payload),G,V,ee,ce)}}if(re)return ce=ce(F),re=ee===""?"."+U(F,0):ee,E(ce)?(V="",re!=null&&(V=re.replace(q,"$&/")+"/"),H(ce,G,V,"",function(le){return le})):ce!=null&&(I(ce)&&(ce=L(ce,V+(ce.key==null||F&&F.key===ce.key?"":(""+ce.key).replace(q,"$&/")+"/")+re)),G.push(ce)),1;re=0;var X=ee===""?".":ee+":";if(E(F))for(var oe=0;oe{const n=T.useContext(UM);if(!n)throw new Error("No QueryClient set, use QueryClientProvider to set one");return n},XG=({client:e,children:n})=>(T.useEffect(()=>(e.mount(),()=>{e.unmount()}),[e]),f.jsx(UM.Provider,{value:e,children:n})),YG={setTimeout:(e,n)=>setTimeout(e,n),clearTimeout:e=>clearTimeout(e),setInterval:(e,n)=>setInterval(e,n),clearInterval:e=>clearInterval(e)};var nu,ak,RM,ZG=(RM=class{constructor(){lt(this,nu,YG);lt(this,ak,!1)}setTimeoutProvider(e){Ge(this,nu,e)}setTimeout(e,n){return ue(this,nu).setTimeout(e,n)}clearTimeout(e){ue(this,nu).clearTimeout(e)}setInterval(e,n){return ue(this,nu).setInterval(e,n)}clearInterval(e){ue(this,nu).clearInterval(e)}},nu=new WeakMap,ak=new WeakMap,RM);const h_=new ZG;function JG(e){setTimeout(e,0)}const eV=typeof window>"u"||"Deno"in globalThis;function Us(){}function tV(e,n){return typeof e=="function"?e(n):e}function GM(e){return typeof e=="number"&&e>=0&&e!==1/0}function VM(e,n){return Math.max(e+(n||0)-Date.now(),0)}function Hr(e,n){return typeof e=="function"?e(n):e}function j9(e,n){const{type:t="all",exact:r,fetchStatus:s,predicate:i,queryKey:a,stale:o}=e;if(a){if(r){if(n.queryHash!==ok(a,n.options))return!1}else if(!Vd(n.queryKey,a))return!1}if(t!=="all"){const l=n.isActive();if(t==="active"&&!l||t==="inactive"&&l)return!1}return!(typeof o=="boolean"&&n.isStale()!==o||s&&s!==n.state.fetchStatus||i&&!i(n))}function T9(e,n){const{exact:t,status:r,predicate:s,mutationKey:i}=e;if(i){if(!n.options.mutationKey)return!1;if(t){if(B_(n.options.mutationKey)!==B_(i))return!1}else if(!Vd(n.options.mutationKey,i))return!1}return!(r&&n.state.status!==r||s&&!s(n))}function ok(e,n){return((n==null?void 0:n.queryKeyHashFn)||B_)(e)}function B_(e){return JSON.stringify(e,(n,t)=>w4(t)?Object.keys(t).sort().reduce((r,s)=>(r[s]=t[s],r),{}):t)}function Vd(e,n){if(e===n)return!0;if(typeof e!=typeof n)return!1;if(e&&n&&typeof e=="object"&&typeof n=="object"){if(Array.isArray(e)&&Array.isArray(n)){for(let r=0;r500)return n;const r=A9(e)&&A9(n);if(!r&&!(w4(e)&&w4(n)))return n;const s=(r?e:Object.keys(e)).length,i=r?n:Object.keys(n),a=i.length,o=r?new Array(a):{};let l=0;for(let u=0;u{h_.setTimeout(n,e)})}function k4(e,n,t){return typeof t.structuralSharing=="function"?t.structuralSharing(e,n):t.structuralSharing!==!1?lk(e,n):n}function sV(e,n,t=0){const r=[...e,n];return t&&r.length>t?r.slice(1):r}function iV(e,n,t=0){const r=[n,...e];return t&&r.length>t?r.slice(0,-1):r}const ck=Symbol();function KM(e,n){return!e.queryFn&&(n!=null&&n.initialPromise)?()=>n.initialPromise:!e.queryFn||e.queryFn===ck?()=>Promise.reject(new Error(`Missing queryFn: '${e.queryHash}'`)):e.queryFn}function uk(e,n){return typeof e=="function"?e(...n):!!e}function aV(e,n,t){let r=!1,s;return Object.defineProperty(e,"signal",{enumerable:!0,get:()=>(s??(s=n()),r||(r=!0,s.aborted?t():s.addEventListener("abort",t,{once:!0})),s)}),e}let oV=()=>eV;const _k=()=>oV();var ef=class{constructor(){this.listeners=new Set,this.subscribe=this.subscribe.bind(this)}subscribe(e){return this.listeners.add(e),this.onSubscribe(),()=>{this.listeners.delete(e),this.onUnsubscribe()}}hasListeners(){return this.listeners.size>0}onSubscribe(){}onUnsubscribe(){}},v_,ru,zd,MM,lV=(MM=class extends ef{constructor(){super();lt(this,v_);lt(this,ru);lt(this,zd);Ge(this,zd,n=>{if(typeof window<"u"&&window.addEventListener){const t=()=>n();return window.addEventListener("visibilitychange",t,!1),()=>{window.removeEventListener("visibilitychange",t)}}})}onSubscribe(){ue(this,ru)||this.setEventListener(ue(this,zd))}onUnsubscribe(){var n;this.hasListeners()||((n=ue(this,ru))==null||n.call(this),Ge(this,ru,void 0))}setEventListener(n){var t;Ge(this,zd,n),(t=ue(this,ru))==null||t.call(this),Ge(this,ru,n(r=>{typeof r=="boolean"?this.setFocused(r):this.onFocus()}))}setFocused(n){ue(this,v_)!==n&&(Ge(this,v_,n),this.onFocus())}onFocus(){const n=this.isFocused();this.listeners.forEach(t=>{t(n)})}isFocused(){var n;return typeof ue(this,v_)=="boolean"?ue(this,v_):((n=globalThis.document)==null?void 0:n.visibilityState)!=="hidden"}},v_=new WeakMap,ru=new WeakMap,zd=new WeakMap,MM);const fk=new lV,cV=JG;function uV(){let e=[],n=0,t=o=>{o()},r=o=>{o()},s=cV;const i=o=>{n?e.push(o):s(()=>{t(o)})},a=()=>{const o=e;e=[],o.length&&s(()=>{r(()=>{o.forEach(l=>{t(l)})})})};return{batch:o=>{let l;n++;try{l=o()}finally{n--,n||a()}return l},batchCalls:o=>(...l)=>{i(()=>{o(...l)})},schedule:i,setNotifyFunction:o=>{t=o},setBatchNotifyFunction:o=>{r=o},setScheduler:o=>{s=o}}}const Mr=uV();var jd,su,Td,OM,_V=(OM=class extends ef{constructor(){super();lt(this,jd,!0);lt(this,su);lt(this,Td);Ge(this,Td,n=>{if(typeof window<"u"&&window.addEventListener){const t=()=>n(!0),r=()=>n(!1);return window.addEventListener("online",t,!1),window.addEventListener("offline",r,!1),()=>{window.removeEventListener("online",t),window.removeEventListener("offline",r)}}})}onSubscribe(){ue(this,su)||this.setEventListener(ue(this,Td))}onUnsubscribe(){var n;this.hasListeners()||((n=ue(this,su))==null||n.call(this),Ge(this,su,void 0))}setEventListener(n){var t;Ge(this,Td,n),(t=ue(this,su))==null||t.call(this),Ge(this,su,n(this.setOnline.bind(this)))}setOnline(n){ue(this,jd)!==n&&(Ge(this,jd,n),this.listeners.forEach(t=>{t(n)}))}isOnline(){return ue(this,jd)}},jd=new WeakMap,su=new WeakMap,Td=new WeakMap,OM);const rv=new _V;function fV(e){return Math.min(1e3*2**e,3e4)}function WM(e){return(e??"online")==="online"?rv.isOnline():!0}var sv=class extends Error{constructor(e){super("CancelledError"),this.revert=e==null?void 0:e.revert,this.silent=e==null?void 0:e.silent}};function dV(e){return e instanceof sv}function QM(e){let n=!1,t=0,r,s="pending",i,a;const o=new Promise((w,y)=>{i=w,a=y});o.catch(Us);const l=()=>s!=="pending",u=w=>{var y;if(!l()){const C=new sv(w);k(C),(y=e.onCancel)==null||y.call(e,C)}},h=()=>{n=!0},_=()=>{n=!1},p=()=>fk.isFocused()&&(e.networkMode==="always"||rv.isOnline())&&e.canRun(),m=()=>WM(e.networkMode)&&e.canRun(),x=w=>{l()||(r==null||r(),s="resolved",i(w))},k=w=>{l()||(r==null||r(),s="rejected",a(w))},v=()=>new Promise(w=>{var y;r=C=>{(l()||p())&&w(C)},(y=e.onPause)==null||y.call(e)}).then(()=>{var w;r=void 0,l()||(w=e.onContinue)==null||w.call(e)}),b=()=>{if(l())return;let w;const y=t===0?e.initialPromise:void 0;try{w=y??e.fn()}catch(C){w=Promise.reject(C)}Promise.resolve(w).then(x).catch(C=>{var M;if(l())return;const E=e.retry??(_k()?0:3),N=e.retryDelay??fV,A=typeof N=="function"?N(t,C):N,j=E===!0||typeof E=="number"&&tp()?void 0:v()).then(()=>{n?k(C):b()})})};return{promise:o,status:()=>s,cancel:u,continue:()=>(r==null||r(),o),cancelRetry:h,continueRetry:_,canStart:m,start:()=>(m()?b():v().then(b),o)}}var b_,DM,XM=(DM=class{constructor(){lt(this,b_)}destroy(){this.clearGcTimeout()}scheduleGc(){this.clearGcTimeout(),GM(this.gcTime)&&Ge(this,b_,h_.setTimeout(()=>{this.optionalRemove()},this.gcTime))}updateGcTime(e){this.gcTime=Math.max(this.gcTime||0,e??(_k()?1/0:3e5))}clearGcTimeout(){ue(this,b_)!==void 0&&(h_.clearTimeout(ue(this,b_)),Ge(this,b_,void 0))}},b_=new WeakMap,DM);function hV(e){return{onFetch:(n,t)=>{var h,_,p,m,x;const r=n.options,s=(p=(_=(h=n.fetchOptions)==null?void 0:h.meta)==null?void 0:_.fetchMore)==null?void 0:p.direction,i=((m=n.state.data)==null?void 0:m.pages)||[],a=((x=n.state.data)==null?void 0:x.pageParams)||[];let o={pages:[],pageParams:[]},l=0;const u=async()=>{let k=!1;const v=y=>{aV(y,()=>n.signal,()=>k=!0)},b=KM(n.options,n.fetchOptions),w=async(y,C,E)=>{if(k)return Promise.reject(n.signal.reason);if(C==null&&y.pages.length)return Promise.resolve(y);const A=(()=>{const I={client:n.client,queryKey:n.queryKey,pageParam:C,direction:E?"backward":"forward",meta:n.options.meta};return v(I),I})(),j=await b(A),{maxPages:M}=n.options,L=E?iV:sV;return{pages:L(y.pages,j,M),pageParams:L(y.pageParams,C,M)}};if(s&&i.length){const y=s==="backward",C=y?pV:M9,E={pages:i,pageParams:a};o=await w(E,C(r,E),y)}else{const y=e??i.length;do{const C=l===0?a[0]??r.initialPageParam:M9(r,o);if(l>0&&C==null)break;o=await w(o,C),l++}while(l{var k,v;return(v=(k=n.options).persister)==null?void 0:v.call(k,u,{client:n.client,queryKey:n.queryKey,meta:n.options.meta,signal:n.signal},t)}:n.fetchFn=u}}}function M9(e,{pages:n,pageParams:t}){const r=n.length-1;return n.length>0?e.getNextPageParam(n[r],n,t[r],t):void 0}function pV(e,{pages:n,pageParams:t}){var r;return n.length>0?(r=e.getPreviousPageParam)==null?void 0:r.call(e,n[0],n,t[0],t):void 0}var Ad,y_,Rd,Na,x_,ms,V0,w_,Xa,Il,LM,mV=(LM=class extends XM{constructor(n){super();lt(this,Xa);lt(this,Ad);lt(this,y_);lt(this,Rd);lt(this,Na);lt(this,x_);lt(this,ms);lt(this,V0);lt(this,w_);Ge(this,w_,!1),Ge(this,V0,n.defaultOptions),this.setOptions(n.options),this.observers=[],Ge(this,x_,n.client),Ge(this,Na,ue(this,x_).getQueryCache()),this.queryKey=n.queryKey,this.queryHash=n.queryHash,Ge(this,y_,D9(this.options)),this.state=n.state??ue(this,y_),this.scheduleGc()}get meta(){return this.options.meta}get queryType(){return ue(this,Ad)}get promise(){var n;return(n=ue(this,ms))==null?void 0:n.promise}setOptions(n){if(this.options={...ue(this,V0),...n},n!=null&&n._type&&Ge(this,Ad,n._type),this.updateGcTime(this.options.gcTime),this.state&&this.state.data===void 0){const t=D9(this.options);t.data!==void 0&&(this.setState(O9(t.data,t.dataUpdatedAt)),Ge(this,y_,t))}}optionalRemove(){!this.observers.length&&this.state.fetchStatus==="idle"&&ue(this,Na).remove(this)}setData(n,t){const r=k4(this.state.data,n,this.options);return Bt(this,Xa,Il).call(this,{data:r,type:"success",dataUpdatedAt:t==null?void 0:t.updatedAt,manual:t==null?void 0:t.manual}),r}setState(n){Bt(this,Xa,Il).call(this,{type:"setState",state:n})}cancel(n){var r,s;const t=(r=ue(this,ms))==null?void 0:r.promise;return(s=ue(this,ms))==null||s.cancel(n),t?t.then(Us).catch(Us):Promise.resolve()}destroy(){super.destroy(),this.cancel({silent:!0})}get resetState(){return ue(this,y_)}reset(){this.destroy(),this.setState(this.resetState)}isActive(){return this.observers.some(n=>Hr(n.options.enabled,this)!==!1)}isDisabled(){return this.getObserversCount()>0?!this.isActive():this.options.queryFn===ck||!this.isFetched()}isFetched(){return this.state.dataUpdateCount+this.state.errorUpdateCount>0}isStatic(){return this.getObserversCount()>0?this.observers.some(n=>Hr(n.options.staleTime,this)==="static"):!1}isStale(){return this.getObserversCount()>0?this.observers.some(n=>n.getCurrentResult().isStale):this.state.data===void 0||this.state.isInvalidated}isStaleByTime(n=0){return this.state.data===void 0?!0:n==="static"?!1:this.state.isInvalidated?!0:!VM(this.state.dataUpdatedAt,n)}onFocus(){var n,t;(n=this.observers.find(r=>r.shouldFetchOnWindowFocus()))==null||n.refetch({cancelRefetch:!1}),(t=ue(this,ms))==null||t.continue()}onOnline(){var n,t;(n=this.observers.find(r=>r.shouldFetchOnReconnect()))==null||n.refetch({cancelRefetch:!1}),(t=ue(this,ms))==null||t.continue()}addObserver(n){this.observers.includes(n)||(this.observers.push(n),this.clearGcTimeout(),ue(this,Na).notify({type:"observerAdded",query:this,observer:n}))}removeObserver(n){const t=this.observers.indexOf(n);t!==-1&&(this.observers.splice(t,1),this.observers.length||(ue(this,ms)&&(ue(this,w_)||this.state.fetchStatus==="paused"&&this.state.status==="pending"?ue(this,ms).cancel({revert:!0}):ue(this,ms).cancelRetry()),this.scheduleGc()),ue(this,Na).notify({type:"observerRemoved",query:this,observer:n}))}getObserversCount(){return this.observers.length}invalidate(){this.state.isInvalidated||Bt(this,Xa,Il).call(this,{type:"invalidate"})}async fetch(n,t){var u,h,_,p,m,x,k,v,b,w,y,C;if(this.state.fetchStatus!=="idle"&&((u=ue(this,ms))==null?void 0:u.status())!=="rejected"){if(this.state.data!==void 0&&(t!=null&&t.cancelRefetch))this.cancel({silent:!0});else if(ue(this,ms))return ue(this,ms).continueRetry(),ue(this,ms).promise}if(n&&this.setOptions(n),!this.options.queryFn){const E=this.observers.find(N=>N.options.queryFn);E&&this.setOptions(E.options)}const r=new AbortController,s=E=>{Object.defineProperty(E,"signal",{enumerable:!0,get:()=>(Ge(this,w_,!0),r.signal)})},i=()=>{const E=KM(this.options,t),A=(()=>{const j={client:ue(this,x_),queryKey:this.queryKey,meta:this.meta};return s(j),j})();return Ge(this,w_,!1),this.options.persister?this.options.persister(E,A,this):E(A)},o=(()=>{const E={fetchOptions:t,options:this.options,queryKey:this.queryKey,client:ue(this,x_),state:this.state,fetchFn:i};return s(E),E})();(h=ue(this,Ad)==="infinite"?hV(this.options.pages):this.options.behavior)==null||h.onFetch(o,this),Ge(this,Rd,this.state),(this.state.fetchStatus==="idle"||this.state.fetchMeta!==((_=o.fetchOptions)==null?void 0:_.meta))&&Bt(this,Xa,Il).call(this,{type:"fetch",meta:(p=o.fetchOptions)==null?void 0:p.meta});const l=Ge(this,ms,QM({initialPromise:t==null?void 0:t.initialPromise,fn:o.fetchFn,onCancel:E=>{E instanceof sv&&E.revert&&this.setState({...ue(this,Rd),fetchStatus:"idle"}),r.abort()},onFail:(E,N)=>{Bt(this,Xa,Il).call(this,{type:"failed",failureCount:E,error:N})},onPause:()=>{Bt(this,Xa,Il).call(this,{type:"pause"})},onContinue:()=>{Bt(this,Xa,Il).call(this,{type:"continue"})},retry:o.options.retry,retryDelay:o.options.retryDelay,networkMode:o.options.networkMode,canRun:()=>!0}));try{const E=await l.start();if(E===void 0)throw new Error(`${this.queryHash} data is undefined`);return this.setData(E),(x=(m=ue(this,Na).config).onSuccess)==null||x.call(m,E,this),(v=(k=ue(this,Na).config).onSettled)==null||v.call(k,E,this.state.error,this),E}catch(E){if(E instanceof sv){if(E.silent)return ue(this,ms).promise;if(E.revert){if(this.state.data===void 0)throw E;return this.state.data}}throw Bt(this,Xa,Il).call(this,{type:"error",error:E}),(w=(b=ue(this,Na).config).onError)==null||w.call(b,E,this),(C=(y=ue(this,Na).config).onSettled)==null||C.call(y,this.state.data,E,this),E}finally{ue(this,ms)===l&&Ge(this,ms,void 0),this.scheduleGc()}}},Ad=new WeakMap,y_=new WeakMap,Rd=new WeakMap,Na=new WeakMap,x_=new WeakMap,ms=new WeakMap,V0=new WeakMap,w_=new WeakMap,Xa=new WeakSet,Il=function(n){const t=r=>{switch(n.type){case"failed":return{...r,fetchFailureCount:n.failureCount,fetchFailureReason:n.error};case"pause":return{...r,fetchStatus:"paused"};case"continue":return{...r,fetchStatus:"fetching"};case"fetch":return{...r,...YM(r.data,this.options),fetchMeta:n.meta??null};case"success":const s={...r,...O9(n.data,n.dataUpdatedAt),dataUpdateCount:r.dataUpdateCount+1,...!n.manual&&{fetchStatus:"idle",fetchFailureCount:0,fetchFailureReason:null}};return Ge(this,Rd,n.manual?s:void 0),s;case"error":const i=n.error;return{...r,error:i,errorUpdateCount:r.errorUpdateCount+1,errorUpdatedAt:Date.now(),fetchFailureCount:r.fetchFailureCount+1,fetchFailureReason:i,fetchStatus:"idle",status:"error",isInvalidated:!0};case"invalidate":return{...r,isInvalidated:!0};case"setState":return{...r,...n.state}}};this.state=t(this.state),Mr.batch(()=>{this.observers.slice().forEach(r=>{r.onQueryUpdate()}),ue(this,Na).notify({query:this,type:"updated",action:n})})},LM);function YM(e,n){return{fetchFailureCount:0,fetchFailureReason:null,fetchStatus:WM(n.networkMode)?"fetching":"paused",...e===void 0&&{error:null,status:"pending"}}}function O9(e,n){return{data:e,dataUpdatedAt:n??Date.now(),error:null,isInvalidated:!1,status:"success"}}function D9(e){const n=typeof e.initialData=="function"?e.initialData():e.initialData,t=n!==void 0,r=t?typeof e.initialDataUpdatedAt=="function"?e.initialDataUpdatedAt():e.initialDataUpdatedAt:0;return{data:n,dataUpdateCount:0,dataUpdatedAt:t?r??Date.now():0,error:null,errorUpdateCount:0,errorUpdatedAt:0,fetchFailureCount:0,fetchFailureReason:null,fetchMeta:null,isInvalidated:!1,status:t?"success":"pending",fetchStatus:"idle"}}var ii,Cn,K0,ai,k_,Md,Hl,W0,Od,Dd,S_,C_,iu,Ld,Hn,Bp,S4,C4,E4,N4,z4,j4,T4,A4,IM,dk=(IM=class extends ef{constructor(n,t){super();lt(this,Hn);lt(this,ii);lt(this,Cn);lt(this,K0);lt(this,ai);lt(this,k_);lt(this,Md);lt(this,Hl);lt(this,W0);lt(this,Od);lt(this,Dd);lt(this,S_);lt(this,C_);lt(this,iu);lt(this,Ld,new Set);this.options=t,Ge(this,ii,n),Ge(this,Hl,null),this.bindMethods(),this.setOptions(t)}bindMethods(){this.refetch=this.refetch.bind(this)}onSubscribe(){this.listeners.size===1&&(ue(this,Cn).addObserver(this),L9(ue(this,Cn),this.options)?Bt(this,Hn,Bp).call(this):this.updateResult(),Bt(this,Hn,z4).call(this))}onUnsubscribe(){this.hasListeners()||this.destroy()}shouldFetchOnReconnect(){return R4(ue(this,Cn),this.options,this.options.refetchOnReconnect)}shouldFetchOnWindowFocus(){return R4(ue(this,Cn),this.options,this.options.refetchOnWindowFocus)}destroy(){this.listeners=new Set,Bt(this,Hn,j4).call(this),Bt(this,Hn,T4).call(this),ue(this,Cn).removeObserver(this)}setOptions(n){const t=this.options,r=ue(this,Cn);if(this.options=ue(this,ii).defaultQueryOptions(n),this.options.enabled!==void 0&&typeof this.options.enabled!="boolean"&&typeof this.options.enabled!="function"&&typeof Hr(this.options.enabled,ue(this,Cn))!="boolean")throw new Error("Expected enabled to be a boolean or a callback that returns a boolean");Bt(this,Hn,A4).call(this),ue(this,Cn).setOptions(this.options),t._defaulted&&!Kp(this.options,t)&&ue(this,ii).getQueryCache().notify({type:"observerOptionsUpdated",query:ue(this,Cn),observer:this});const s=this.hasListeners();s&&I9(ue(this,Cn),r,this.options,t)&&Bt(this,Hn,Bp).call(this),this.updateResult(),s&&(ue(this,Cn)!==r||Hr(this.options.enabled,ue(this,Cn))!==Hr(t.enabled,ue(this,Cn))||Hr(this.options.staleTime,ue(this,Cn))!==Hr(t.staleTime,ue(this,Cn)))&&Bt(this,Hn,C4).call(this);const i=Bt(this,Hn,E4).call(this);s&&(ue(this,Cn)!==r||Hr(this.options.enabled,ue(this,Cn))!==Hr(t.enabled,ue(this,Cn))||i!==ue(this,iu))&&Bt(this,Hn,N4).call(this,i)}getOptimisticResult(n){const t=ue(this,ii).getQueryCache().build(ue(this,ii),n),r=this.createResult(t,n);return Kp(this.getCurrentResult(),r)||(Ge(this,ai,r),Ge(this,Md,this.options),Ge(this,k_,ue(this,Cn).state)),r}getCurrentResult(){return ue(this,ai)}trackResult(n,t){return new Proxy(n,{get:(r,s)=>(this.trackProp(s),t==null||t(s),Reflect.get(r,s))})}trackProp(n){ue(this,Ld).add(n)}getCurrentQuery(){return ue(this,Cn)}refetch({...n}={}){return this.fetch({...n})}fetchOptimistic(n){const t=ue(this,ii).defaultQueryOptions(n),r=ue(this,ii).getQueryCache().build(ue(this,ii),t);let s=()=>{},i;const a=new Promise(o=>{i=o,s=ue(this,ii).getQueryCache().subscribe(l=>{l.type==="updated"&&l.query.queryHash===r.queryHash&&r.state.data!==void 0&&(s(),o(this.createResult(r,t)))})});return Promise.race([r.fetch().then(()=>{const o=this.createResult(r,t);return i==null||i(o),o}).finally(()=>{s()}),a])}fetch(n){return Bt(this,Hn,Bp).call(this,{...n,cancelRefetch:n.cancelRefetch??!0}).then(()=>(this.updateResult(),ue(this,ai)))}createResult(n,t){var N;const r=ue(this,Cn),s=this.options,i=ue(this,ai),a=ue(this,k_),o=ue(this,Md),l=n!==r?n.state:ue(this,K0),{state:u}=n;let h={...u},_=!1,p;if(t._optimisticResults){const A=this.hasListeners(),j=!A&&L9(n,t),M=A&&I9(n,r,t,s);(j||M)&&(h={...h,...YM(u.data,n.options)}),t._optimisticResults==="isRestoring"&&(h.fetchStatus="idle")}let{error:m,errorUpdatedAt:x,status:k}=h;p=h.data;let v=!1;if(t.placeholderData!==void 0&&p===void 0&&k==="pending"){let A;i!=null&&i.isPlaceholderData&&t.placeholderData===(o==null?void 0:o.placeholderData)?(A=i.data,v=!0):A=typeof t.placeholderData=="function"?t.placeholderData((N=ue(this,Dd))==null?void 0:N.state.data,ue(this,Dd)):t.placeholderData,A!==void 0&&(k="success",p=k4(i==null?void 0:i.data,A,t),_=!0)}if(t.select&&p!==void 0&&!v)if(i&&p===(a==null?void 0:a.data)&&t.select===ue(this,W0))p=ue(this,Od);else try{Ge(this,W0,t.select),p=t.select(p),p=k4(i==null?void 0:i.data,p,t),Ge(this,Od,p),Ge(this,Hl,null)}catch(A){Ge(this,Hl,A)}else p===void 0&&Ge(this,Hl,null);ue(this,Hl)&&(m=ue(this,Hl),p=ue(this,Od),x=Date.now(),k="error",_=!1);const b=h.fetchStatus==="fetching",w=k==="pending",y=k==="error",C=w&&b,E=p!==void 0;return{status:k,fetchStatus:h.fetchStatus,isPending:w,isSuccess:k==="success",isError:y,isInitialLoading:C,isLoading:C,data:p,dataUpdatedAt:h.dataUpdatedAt,error:m,errorUpdatedAt:x,failureCount:h.fetchFailureCount,failureReason:h.fetchFailureReason,errorUpdateCount:h.errorUpdateCount,isFetched:n.isFetched(),isFetchedAfterMount:h.dataUpdateCount>l.dataUpdateCount||h.errorUpdateCount>l.errorUpdateCount,isFetching:b,isRefetching:b&&!w,isLoadingError:y&&!E,isPaused:h.fetchStatus==="paused",isPlaceholderData:_,isRefetchError:y&&E,isStale:hk(n,t),refetch:this.refetch,isEnabled:Hr(t.enabled,n)!==!1}}updateResult(){const n=ue(this,ai),t=this.createResult(ue(this,Cn),this.options);if(Ge(this,k_,ue(this,Cn).state),Ge(this,Md,this.options),ue(this,k_).data!==void 0&&Ge(this,Dd,ue(this,Cn)),Kp(t,n))return;Ge(this,ai,t);const s=(()=>{if(!n)return!0;const{notifyOnChangeProps:i}=this.options,a=typeof i=="function"?i():i;if(a==="all"||!a&&!ue(this,Ld).size)return!0;const o=new Set(a??ue(this,Ld));return this.options.throwOnError&&o.add("error"),Object.keys(ue(this,ai)).some(l=>{const u=l;return ue(this,ai)[u]!==n[u]&&o.has(u)})})();Mr.batch(()=>{s&&this.listeners.forEach(i=>{i(ue(this,ai))}),ue(this,ii).getQueryCache().notify({query:ue(this,Cn),type:"observerResultsUpdated"})})}onQueryUpdate(){this.updateResult(),this.hasListeners()&&Bt(this,Hn,z4).call(this)}},ii=new WeakMap,Cn=new WeakMap,K0=new WeakMap,ai=new WeakMap,k_=new WeakMap,Md=new WeakMap,Hl=new WeakMap,W0=new WeakMap,Od=new WeakMap,Dd=new WeakMap,S_=new WeakMap,C_=new WeakMap,iu=new WeakMap,Ld=new WeakMap,Hn=new WeakSet,Bp=function(n){Bt(this,Hn,A4).call(this);let t=ue(this,Cn).fetch(this.options,n);return n!=null&&n.throwOnError||(t=t.catch(Us)),t},S4=function(n){return!_k()&&Hr(this.options.enabled,ue(this,Cn))!==!1&&GM(n)},C4=function(){Bt(this,Hn,j4).call(this);const n=Hr(this.options.staleTime,ue(this,Cn));if(ue(this,ai).isStale||!Bt(this,Hn,S4).call(this,n))return;const t=VM(ue(this,ai).dataUpdatedAt,n)+1;Ge(this,S_,h_.setTimeout(()=>{ue(this,ai).isStale||this.updateResult()},t))},E4=function(){return(typeof this.options.refetchInterval=="function"?this.options.refetchInterval(ue(this,Cn)):this.options.refetchInterval)??!1},N4=function(n){Bt(this,Hn,T4).call(this),Ge(this,iu,n),!(ue(this,iu)===0||!Bt(this,Hn,S4).call(this,ue(this,iu)))&&Ge(this,C_,h_.setInterval(()=>{(this.options.refetchIntervalInBackground||fk.isFocused())&&Bt(this,Hn,Bp).call(this)},ue(this,iu)))},z4=function(){Bt(this,Hn,C4).call(this),Bt(this,Hn,N4).call(this,Bt(this,Hn,E4).call(this))},j4=function(){ue(this,S_)!==void 0&&(h_.clearTimeout(ue(this,S_)),Ge(this,S_,void 0))},T4=function(){ue(this,C_)!==void 0&&(h_.clearInterval(ue(this,C_)),Ge(this,C_,void 0))},A4=function(){const n=ue(this,ii).getQueryCache().build(ue(this,ii),this.options);if(n===ue(this,Cn))return;const t=ue(this,Cn);Ge(this,Cn,n),Ge(this,K0,n.state),this.hasListeners()&&(t==null||t.removeObserver(this),n.addObserver(this))},IM);function gV(e,n){return Hr(n.enabled,e)!==!1&&e.state.data===void 0&&!(e.state.status==="error"&&Hr(n.retryOnMount,e)===!1)}function L9(e,n){return gV(e,n)||e.state.data!==void 0&&R4(e,n,n.refetchOnMount)}function R4(e,n,t){if(Hr(n.enabled,e)!==!1&&Hr(n.staleTime,e)!=="static"){const r=typeof t=="function"?t(e):t;return r==="always"||r!==!1&&hk(e,n)}return!1}function I9(e,n,t,r){return(e!==n||Hr(r.enabled,e)===!1)&&(!t.suspense||e.state.status!=="error")&&hk(e,t)}function hk(e,n){return Hr(n.enabled,e)!==!1&&e.isStaleByTime(Hr(n.staleTime,e))}var Q0,Oo,Fs,E_,Do,Zc,$M,vV=($M=class extends XM{constructor(n){super();lt(this,Do);lt(this,Q0);lt(this,Oo);lt(this,Fs);lt(this,E_);Ge(this,Q0,n.client),this.mutationId=n.mutationId,Ge(this,Fs,n.mutationCache),Ge(this,Oo,[]),this.state=n.state||ZM(),this.setOptions(n.options),this.scheduleGc()}setOptions(n){this.options=n,this.updateGcTime(this.options.gcTime)}get meta(){return this.options.meta}addObserver(n){ue(this,Oo).includes(n)||(ue(this,Oo).push(n),this.clearGcTimeout(),ue(this,Fs).notify({type:"observerAdded",mutation:this,observer:n}))}removeObserver(n){Ge(this,Oo,ue(this,Oo).filter(t=>t!==n)),this.scheduleGc(),ue(this,Fs).notify({type:"observerRemoved",mutation:this,observer:n})}optionalRemove(){ue(this,Oo).length||(this.state.status==="pending"?this.scheduleGc():ue(this,Fs).remove(this))}continue(){var n;return((n=ue(this,E_))==null?void 0:n.continue())??(this.state.status==="pending"?this.execute(this.state.variables):Promise.resolve())}async execute(n){var o,l,u,h,_,p,m,x,k,v,b,w,y,C,E,N,A,j;const t=()=>{Bt(this,Do,Zc).call(this,{type:"continue"})},r={client:ue(this,Q0),meta:this.options.meta,mutationKey:this.options.mutationKey},s=Ge(this,E_,QM({fn:()=>this.options.mutationFn?this.options.mutationFn(n,r):Promise.reject(new Error("No mutationFn found")),onFail:(M,L)=>{Bt(this,Do,Zc).call(this,{type:"failed",failureCount:M,error:L})},onPause:()=>{Bt(this,Do,Zc).call(this,{type:"pause"})},onContinue:t,retry:this.options.retry??0,retryDelay:this.options.retryDelay,networkMode:this.options.networkMode,canRun:()=>ue(this,Fs).canRun(this)})),i=this.state.status==="pending",a=!s.canStart();try{if(i)t();else{Bt(this,Do,Zc).call(this,{type:"pending",variables:n,isPaused:a}),ue(this,Fs).config.onMutate&&await ue(this,Fs).config.onMutate(n,this,r);const L=await((l=(o=this.options).onMutate)==null?void 0:l.call(o,n,r));L!==this.state.context&&Bt(this,Do,Zc).call(this,{type:"pending",context:L,variables:n,isPaused:a})}const M=await s.start();return await((h=(u=ue(this,Fs).config).onSuccess)==null?void 0:h.call(u,M,n,this.state.context,this,r)),await((p=(_=this.options).onSuccess)==null?void 0:p.call(_,M,n,this.state.context,r)),await((x=(m=ue(this,Fs).config).onSettled)==null?void 0:x.call(m,M,null,this.state.variables,this.state.context,this,r)),await((v=(k=this.options).onSettled)==null?void 0:v.call(k,M,null,n,this.state.context,r)),Bt(this,Do,Zc).call(this,{type:"success",data:M}),M}catch(M){try{await((w=(b=ue(this,Fs).config).onError)==null?void 0:w.call(b,M,n,this.state.context,this,r))}catch(L){Promise.reject(L)}try{await((C=(y=this.options).onError)==null?void 0:C.call(y,M,n,this.state.context,r))}catch(L){Promise.reject(L)}try{await((N=(E=ue(this,Fs).config).onSettled)==null?void 0:N.call(E,void 0,M,this.state.variables,this.state.context,this,r))}catch(L){Promise.reject(L)}try{await((j=(A=this.options).onSettled)==null?void 0:j.call(A,void 0,M,n,this.state.context,r))}catch(L){Promise.reject(L)}throw Bt(this,Do,Zc).call(this,{type:"error",error:M}),M}finally{ue(this,E_)===s&&Ge(this,E_,void 0),ue(this,Fs).runNext(this)}}},Q0=new WeakMap,Oo=new WeakMap,Fs=new WeakMap,E_=new WeakMap,Do=new WeakSet,Zc=function(n){const t=r=>{switch(n.type){case"failed":return{...r,failureCount:n.failureCount,failureReason:n.error};case"pause":return{...r,isPaused:!0};case"continue":return{...r,isPaused:!1};case"pending":return{...r,context:n.context,data:void 0,failureCount:0,failureReason:null,error:null,isPaused:n.isPaused,status:"pending",variables:n.variables,submittedAt:Date.now()};case"success":return{...r,data:n.data,failureCount:0,failureReason:null,error:null,status:"success",isPaused:!1};case"error":return{...r,data:void 0,error:n.error,failureCount:r.failureCount+1,failureReason:n.error,isPaused:!1,status:"error"}}};this.state=t(this.state),Mr.batch(()=>{ue(this,Oo).forEach(r=>{r.onMutationUpdate(n)}),ue(this,Fs).notify({mutation:this,type:"updated",action:n})})},$M);function ZM(){return{context:void 0,data:void 0,error:null,failureCount:0,failureReason:null,isPaused:!1,status:"idle",variables:void 0,submittedAt:0}}var ql,Ya,X0,BM,bV=(BM=class extends ef{constructor(n={}){super();lt(this,ql);lt(this,Ya);lt(this,X0);this.config=n,Ge(this,ql,new Set),Ge(this,Ya,new Map),Ge(this,X0,0)}build(n,t,r){const s=new vV({client:n,mutationCache:this,mutationId:++vp(this,X0)._,options:n.defaultMutationOptions(t),state:r});return this.add(s),s}add(n){ue(this,ql).add(n);const t=Og(n);if(typeof t=="string"){const r=ue(this,Ya).get(t);r?r.push(n):ue(this,Ya).set(t,[n])}this.notify({type:"added",mutation:n})}remove(n){if(ue(this,ql).delete(n)){const t=Og(n);if(typeof t=="string"){const r=ue(this,Ya).get(t);if(r)if(r.length>1){const s=r.indexOf(n);s!==-1&&r.splice(s,1)}else r[0]===n&&ue(this,Ya).delete(t)}}this.notify({type:"removed",mutation:n})}canRun(n){var r;const t=Og(n);if(typeof t=="string"){const s=(r=ue(this,Ya).get(t))==null?void 0:r.find(i=>i.state.status==="pending");return!s||s===n}else return!0}runNext(n){var r,s;const t=Og(n);return typeof t=="string"?((s=(r=ue(this,Ya).get(t))==null?void 0:r.find(i=>i!==n&&i.state.isPaused))==null?void 0:s.continue())??Promise.resolve():Promise.resolve()}clear(){Mr.batch(()=>{ue(this,ql).forEach(n=>{this.notify({type:"removed",mutation:n})}),ue(this,ql).clear(),ue(this,Ya).clear()})}getAll(){return Array.from(ue(this,ql))}find(n){const t={exact:!0,...n};return this.getAll().find(r=>T9(t,r))}findAll(n={}){return this.getAll().filter(t=>T9(n,t))}notify(n){Mr.batch(()=>{this.listeners.forEach(t=>{t(n)})})}resumePausedMutations(){const n=this.getAll().filter(t=>t.state.isPaused);return Mr.batch(()=>Promise.all(n.map(t=>t.continue().catch(Us))))}},ql=new WeakMap,Ya=new WeakMap,X0=new WeakMap,BM);function Og(e){var n;return(n=e.options.scope)==null?void 0:n.id}var Ul,au,Hs,Gl,Fo,Pp,M4,PM,yV=(PM=class extends ef{constructor(t,r){super();lt(this,Fo);lt(this,Ul);lt(this,au);lt(this,Hs);lt(this,Gl);Ge(this,Ul,t),this.setOptions(r),this.bindMethods(),Bt(this,Fo,Pp).call(this)}bindMethods(){this.mutate=this.mutate.bind(this),this.reset=this.reset.bind(this)}setOptions(t){var s;const r=this.options;this.options=ue(this,Ul).defaultMutationOptions(t),Kp(this.options,r)||ue(this,Ul).getMutationCache().notify({type:"observerOptionsUpdated",mutation:ue(this,Hs),observer:this}),r!=null&&r.mutationKey&&this.options.mutationKey&&B_(r.mutationKey)!==B_(this.options.mutationKey)?this.reset():((s=ue(this,Hs))==null?void 0:s.state.status)==="pending"&&ue(this,Hs).setOptions(this.options)}onSubscribe(){this.listeners.size===1&&ue(this,Hs)&&(ue(this,Hs).addObserver(this),Bt(this,Fo,Pp).call(this))}onUnsubscribe(){var t;this.hasListeners()||(t=ue(this,Hs))==null||t.removeObserver(this)}onMutationUpdate(t){Bt(this,Fo,Pp).call(this),Bt(this,Fo,M4).call(this,t)}getCurrentResult(){return ue(this,au)}reset(){var t;(t=ue(this,Hs))==null||t.removeObserver(this),Ge(this,Hs,void 0),Bt(this,Fo,Pp).call(this),Bt(this,Fo,M4).call(this)}mutate(t,r){var s;return Ge(this,Gl,r),(s=ue(this,Hs))==null||s.removeObserver(this),Ge(this,Hs,ue(this,Ul).getMutationCache().build(ue(this,Ul),this.options)),ue(this,Hs).addObserver(this),ue(this,Hs).execute(t)}},Ul=new WeakMap,au=new WeakMap,Hs=new WeakMap,Gl=new WeakMap,Fo=new WeakSet,Pp=function(){var r;const t=((r=ue(this,Hs))==null?void 0:r.state)??ZM();Ge(this,au,{...t,isPending:t.status==="pending",isSuccess:t.status==="success",isError:t.status==="error",isIdle:t.status==="idle",mutate:this.mutate,reset:this.reset})},M4=function(t){Mr.batch(()=>{var r,s,i,a,o,l,u,h;if(ue(this,Gl)&&this.hasListeners()){const _=ue(this,au).variables,p=ue(this,au).context,m={client:ue(this,Ul),meta:this.options.meta,mutationKey:this.options.mutationKey};if((t==null?void 0:t.type)==="success"){try{(s=(r=ue(this,Gl)).onSuccess)==null||s.call(r,t.data,_,p,m)}catch(x){Promise.reject(x)}try{(a=(i=ue(this,Gl)).onSettled)==null||a.call(i,t.data,null,_,p,m)}catch(x){Promise.reject(x)}}else if((t==null?void 0:t.type)==="error"){try{(l=(o=ue(this,Gl)).onError)==null||l.call(o,t.error,_,p,m)}catch(x){Promise.reject(x)}try{(h=(u=ue(this,Gl)).onSettled)==null||h.call(u,void 0,t.error,_,p,m)}catch(x){Promise.reject(x)}}}this.listeners.forEach(_=>{_(ue(this,au))})})},PM);function $9(e,n){const t=new Set(n);return e.filter(r=>!t.has(r))}var Id,oi,$d,N_,Wi,z_,Y0,Z0,J0,em,ys,O4,D4,JM,L4,I4,$4,FM,xV=(FM=class extends ef{constructor(n,t,r){super();lt(this,ys);lt(this,Id);lt(this,oi);lt(this,$d);lt(this,N_);lt(this,Wi);lt(this,z_);lt(this,Y0);lt(this,Z0);lt(this,J0);lt(this,em,[]);Ge(this,Id,n),Ge(this,N_,r),Ge(this,$d,[]),Ge(this,Wi,[]),Ge(this,oi,[]),this.setQueries(t)}onSubscribe(){this.listeners.size===1&&ue(this,Wi).forEach(n=>{n.subscribe(t=>{Bt(this,ys,I4).call(this,n,t)})})}onUnsubscribe(){this.listeners.size||this.destroy()}destroy(){this.listeners=new Set,ue(this,Wi).forEach(n=>{n.destroy()})}setQueries(n,t){Ge(this,$d,n),Ge(this,N_,t),Mr.batch(()=>{const r=ue(this,Wi),s=Bt(this,ys,L4).call(this,ue(this,$d));s.forEach(_=>_.observer.setOptions(_.defaultedQueryOptions));const i=s.map(_=>_.observer),a=i.map(_=>_.getCurrentResult()),o=r.length!==i.length,l=i.some((_,p)=>_!==r[p]),u=o||l,h=u?!0:a.some((_,p)=>{const m=ue(this,oi)[p];return!m||!Kp(_,m)});!u&&!h||(u&&(Ge(this,em,s),Ge(this,Wi,i)),Ge(this,oi,a),this.hasListeners()&&(u&&($9(r,i).forEach(_=>{_.destroy()}),$9(i,r).forEach(_=>{_.subscribe(p=>{Bt(this,ys,I4).call(this,_,p)})})),Bt(this,ys,$4).call(this)))})}getCurrentResult(){return ue(this,oi)}getQueries(){return ue(this,Wi).map(n=>n.getCurrentQuery())}getObservers(){return ue(this,Wi)}getOptimisticResult(n,t){const r=Bt(this,ys,L4).call(this,n),s=r.map(a=>a.observer.getOptimisticResult(a.defaultedQueryOptions)),i=r.map(a=>a.defaultedQueryOptions.queryHash);return[s,a=>Bt(this,ys,D4).call(this,a??s,t,i),()=>Bt(this,ys,O4).call(this,s,r)]}},Id=new WeakMap,oi=new WeakMap,$d=new WeakMap,N_=new WeakMap,Wi=new WeakMap,z_=new WeakMap,Y0=new WeakMap,Z0=new WeakMap,J0=new WeakMap,em=new WeakMap,ys=new WeakSet,O4=function(n,t){const r=new Set;return t.map((s,i)=>{const a=n[i];return s.defaultedQueryOptions.notifyOnChangeProps?a:s.observer.trackResult(a,o=>{r.has(o)||(r.add(o),t.forEach(l=>{l.observer.trackProp(o)}))})})},D4=function(n,t,r){if(t){const s=ue(this,J0),i=r!==void 0&&s!==void 0&&(s.length!==r.length||r.some((a,o)=>a!==s[o]));return(ue(this,oi)!==ue(this,Z0)||i||t!==ue(this,Y0))&&(Ge(this,Y0,t),Ge(this,Z0,ue(this,oi)),r!==void 0&&Ge(this,J0,r),Ge(this,z_,lk(ue(this,z_),t(n)))),ue(this,z_)}return n},JM=function(){var n;return!((n=ue(this,N_))!=null&&n.combine)||ue(this,Wi).some((t,r)=>{var s;return t.options.suspense&&((s=ue(this,oi)[r])==null?void 0:s.data)===void 0})},L4=function(n){const t=new Map;ue(this,Wi).forEach(s=>{const i=s.options.queryHash;if(!i)return;const a=t.get(i);a?a.push(s):t.set(i,[s])});const r=[];return n.forEach(s=>{var o;const i=ue(this,Id).defaultQueryOptions(s),a=((o=t.get(i.queryHash))==null?void 0:o.shift())??new dk(ue(this,Id),i);r.push({defaultedQueryOptions:i,observer:a})}),r},I4=function(n,t){const r=ue(this,Wi).indexOf(n);r!==-1&&(Ge(this,oi,ue(this,oi).slice()),ue(this,oi)[r]=t,Bt(this,ys,$4).call(this))},$4=function(){var n;if(this.hasListeners()){const t=Bt(this,ys,JM).call(this),r=ue(this,z_),s=t?r:Bt(this,ys,D4).call(this,Bt(this,ys,O4).call(this,ue(this,oi),ue(this,em)),(n=ue(this,N_))==null?void 0:n.combine);(t||r!==s)&&Mr.batch(()=>{this.listeners.forEach(i=>{i(ue(this,oi))})})}},FM),Lo,HM,wV=(HM=class extends ef{constructor(n={}){super();lt(this,Lo);this.config=n,Ge(this,Lo,new Map)}build(n,t,r){const s=t.queryKey,i=t.queryHash??ok(s,t);let a=this.get(i);return a||(a=new mV({client:n,queryKey:s,queryHash:i,options:n.defaultQueryOptions(t),state:r,defaultOptions:n.getQueryDefaults(s)}),this.add(a)),a}add(n){ue(this,Lo).has(n.queryHash)||(ue(this,Lo).set(n.queryHash,n),this.notify({type:"added",query:n}))}remove(n){const t=ue(this,Lo).get(n.queryHash);t&&(n.destroy(),t===n&&ue(this,Lo).delete(n.queryHash),this.notify({type:"removed",query:n}))}clear(){Mr.batch(()=>{this.getAll().forEach(n=>{this.remove(n)})})}get(n){return ue(this,Lo).get(n)}getAll(){return[...ue(this,Lo).values()]}find(n){const t={exact:!0,...n};return this.getAll().find(r=>j9(t,r))}findAll(n={}){const t=this.getAll();return Object.keys(n).length>0?t.filter(r=>j9(n,r)):t}notify(n){Mr.batch(()=>{this.listeners.forEach(t=>{t(n)})})}onFocus(){Mr.batch(()=>{this.getAll().forEach(n=>{n.onFocus()})})}onOnline(){Mr.batch(()=>{this.getAll().forEach(n=>{n.onOnline()})})}},Lo=new WeakMap,HM),Ar,ou,lu,Bd,Pd,cu,Fd,Hd,qM,kV=(qM=class{constructor(e={}){lt(this,Ar);lt(this,ou);lt(this,lu);lt(this,Bd);lt(this,Pd);lt(this,cu);lt(this,Fd);lt(this,Hd);Ge(this,Ar,e.queryCache||new wV),Ge(this,ou,e.mutationCache||new bV),Ge(this,lu,e.defaultOptions||{}),Ge(this,Bd,new Map),Ge(this,Pd,new Map),Ge(this,cu,0)}mount(){vp(this,cu)._++,ue(this,cu)===1&&(Ge(this,Fd,fk.subscribe(async e=>{e&&(await this.resumePausedMutations(),ue(this,Ar).onFocus())})),Ge(this,Hd,rv.subscribe(async e=>{e&&(await this.resumePausedMutations(),ue(this,Ar).onOnline())})))}unmount(){var e,n;vp(this,cu)._--,ue(this,cu)===0&&((e=ue(this,Fd))==null||e.call(this),Ge(this,Fd,void 0),(n=ue(this,Hd))==null||n.call(this),Ge(this,Hd,void 0))}isFetching(e){return ue(this,Ar).findAll({...e,fetchStatus:"fetching"}).length}isMutating(e){return ue(this,ou).findAll({...e,status:"pending"}).length}getQueryData(e){var t;const n=this.defaultQueryOptions({queryKey:e});return(t=ue(this,Ar).get(n.queryHash))==null?void 0:t.state.data}ensureQueryData(e){const n=this.defaultQueryOptions(e),t=ue(this,Ar).build(this,n),r=t.state.data;return r===void 0?this.fetchQuery(e):(e.revalidateIfStale&&t.isStaleByTime(Hr(n.staleTime,t))&&this.prefetchQuery(n),Promise.resolve(r))}getQueriesData(e){return ue(this,Ar).findAll(e).map(({queryKey:n,state:t})=>[n,t.data])}setQueryData(e,n,t){var a;const r=this.defaultQueryOptions({queryKey:e}),s=(a=ue(this,Ar).get(r.queryHash))==null?void 0:a.state.data,i=tV(n,s);if(i!==void 0)return ue(this,Ar).build(this,r).setData(i,{...t,manual:!0})}setQueriesData(e,n,t){return Mr.batch(()=>ue(this,Ar).findAll(e).map(({queryKey:r})=>[r,this.setQueryData(r,n,t)]))}getQueryState(e){var t;const n=this.defaultQueryOptions({queryKey:e});return(t=ue(this,Ar).get(n.queryHash))==null?void 0:t.state}removeQueries(e){const n=ue(this,Ar);Mr.batch(()=>{n.findAll(e).forEach(t=>{n.remove(t)})})}resetQueries(e,n){const t=ue(this,Ar);return Mr.batch(()=>{const r=t.findAll(e),s=new Set(r);return r.forEach(i=>{i.reset()}),this.refetchQueries({type:"active",predicate:i=>s.has(i)},n)})}cancelQueries(e,n={}){const t={revert:!0,...n},r=Mr.batch(()=>ue(this,Ar).findAll(e).map(s=>s.cancel(t)));return Promise.all(r).then(Us).catch(Us)}invalidateQueries(e,n={}){return Mr.batch(()=>(ue(this,Ar).findAll(e).forEach(t=>{t.invalidate()}),(e==null?void 0:e.refetchType)==="none"?Promise.resolve():this.refetchQueries({...e,type:(e==null?void 0:e.refetchType)??(e==null?void 0:e.type)??"active"},n)))}refetchQueries(e,n={}){const t={...n,cancelRefetch:n.cancelRefetch??!0},r=Mr.batch(()=>ue(this,Ar).findAll(e).filter(s=>!s.isDisabled()&&!s.isStatic()).map(s=>{let i=s.fetch(void 0,t);return t.throwOnError||(i=i.catch(Us)),s.state.fetchStatus==="paused"?Promise.resolve():i}));return Promise.all(r).then(Us)}async query(e){const n=this.defaultQueryOptions(e);n.retry===void 0&&(n.retry=!1);const t=ue(this,Ar).build(this,n),r=t.isStaleByTime(Hr(n.staleTime,t))?await t.fetch(n):t.state.data,s=n.select;return s?s(r):r}fetchQuery(e){const n=this.defaultQueryOptions(e);n.retry===void 0&&(n.retry=!1);const t=ue(this,Ar).build(this,n);return t.isStaleByTime(Hr(n.staleTime,t))?t.fetch(n):Promise.resolve(t.state.data)}prefetchQuery(e){return this.fetchQuery(e).then(Us).catch(Us)}infiniteQuery(e){return e._type="infinite",this.query(e)}fetchInfiniteQuery(e){return e._type="infinite",this.fetchQuery(e)}prefetchInfiniteQuery(e){return this.fetchInfiniteQuery(e).then(Us).catch(Us)}ensureInfiniteQueryData(e){return e._type="infinite",this.ensureQueryData(e)}resumePausedMutations(){return rv.isOnline()?ue(this,ou).resumePausedMutations():Promise.resolve()}getQueryCache(){return ue(this,Ar)}getMutationCache(){return ue(this,ou)}getDefaultOptions(){return ue(this,lu)}setDefaultOptions(e){Ge(this,lu,e)}setQueryDefaults(e,n){ue(this,Bd).set(B_(e),{queryKey:e,defaultOptions:n})}getQueryDefaults(e){const n=[...ue(this,Bd).values()],t={};return n.forEach(r=>{Vd(e,r.queryKey)&&Object.assign(t,r.defaultOptions)}),t}setMutationDefaults(e,n){ue(this,Pd).set(B_(e),{mutationKey:e,defaultOptions:n})}getMutationDefaults(e){const n=[...ue(this,Pd).values()],t={};return n.forEach(r=>{Vd(e,r.mutationKey)&&Object.assign(t,r.defaultOptions)}),t}defaultQueryOptions(e){if(e._defaulted)return e;const n={...ue(this,lu).queries,...this.getQueryDefaults(e.queryKey),...e,_defaulted:!0};return n.queryHash||(n.queryHash=ok(n.queryKey,n)),n.refetchOnReconnect===void 0&&(n.refetchOnReconnect=n.networkMode!=="always"),n.throwOnError===void 0&&(n.throwOnError=!!n.suspense),!n.networkMode&&n.persister&&(n.networkMode="offlineFirst"),n.queryFn===ck&&(n.enabled=!1),n}defaultMutationOptions(e){return e!=null&&e._defaulted?e:{...ue(this,lu).mutations,...(e==null?void 0:e.mutationKey)&&this.getMutationDefaults(e.mutationKey),...e,_defaulted:!0}}clear(){ue(this,Ar).clear(),ue(this,ou).clear()}},Ar=new WeakMap,ou=new WeakMap,lu=new WeakMap,Bd=new WeakMap,Pd=new WeakMap,cu=new WeakMap,Fd=new WeakMap,Hd=new WeakMap,qM);const eO=T.createContext(!1),tO=()=>T.useContext(eO);eO.Provider;function SV(){let e=!1;return{clearReset:()=>{e=!1},reset:()=>{e=!0},isReset:()=>e}}const CV=T.createContext(SV()),nO=()=>T.useContext(CV),rO=(e,n,t)=>{const r=t!=null&&t.state.error&&typeof e.throwOnError=="function"?uk(e.throwOnError,[t.state.error,t]):e.throwOnError;(e.suspense||r)&&(n.isReset()||(e.retryOnMount=!1))},sO=e=>{T.useEffect(()=>{e.clearReset()},[e])},iO=({result:e,errorResetBoundary:n,throwOnError:t,query:r,suspense:s})=>e.isError&&!n.isReset()&&!e.isFetching&&r&&(s&&e.data===void 0||uk(t,[e.error,r])),aO=e=>{if(e.suspense){const t=s=>s==="static"?s:Math.max(s??1e3,1e3),r=e.staleTime;e.staleTime=typeof r=="function"?(...s)=>t(r(...s)):t(r),typeof e.gcTime=="number"&&(e.gcTime=Math.max(e.gcTime,1e3))}},B4=(e,n)=>(e==null?void 0:e.suspense)&&n.isPending,oO=(e,n,t)=>n.fetchOptimistic(e).catch(()=>{t.clearReset()});function EV({queries:e,...n},t){const r=mh(),s=tO(),i=nO(),a=n.subscribed!==!1,o=T.useMemo(()=>e.map(k=>{const v=r.defaultQueryOptions(k);return v._optimisticResults=s?"isRestoring":a?"optimistic":void 0,v}),[e,r,s,a]);o.forEach(k=>{aO(k);const v=r.getQueryCache().get(k.queryHash);rO(k,i,v)}),sO(i);const[l]=T.useState(()=>new xV(r,o,n)),[u,h,_]=l.getOptimisticResult(o,n.combine),p=!s&&a;T.useSyncExternalStore(T.useCallback(k=>p?l.subscribe(Mr.batchCalls(k)):Us,[l,p]),()=>l.getCurrentResult(),()=>l.getCurrentResult()),T.useEffect(()=>{l.setQueries(o,n)},[o,n,l]);const m=u.some((k,v)=>B4(o[v],k))?u.flatMap((k,v)=>{const b=o[v];if(b&&B4(b,k)){const w=new dk(r,b);return oO(b,w,i)}return[]}):[];if(m.length>0)throw Promise.all(m);const x=u.find((k,v)=>{const b=o[v];return b&&iO({result:k,errorResetBoundary:i,throwOnError:b.throwOnError,query:r.getQueryCache().get(b.queryHash),suspense:b.suspense})});if(x)throw x.error;return h(_())}function NV(e,n,t){const r=tO(),s=nO(),i=mh(),a=i.defaultQueryOptions(e),o=i.getQueryCache().get(a.queryHash),l=e.subscribed!==!1;a._optimisticResults=r?"isRestoring":l?"optimistic":void 0,aO(a),rO(a,s,o),sO(s);const[u]=T.useState(()=>new n(i,a)),h=u.getOptimisticResult(a),_=!r&&l;if(T.useSyncExternalStore(T.useCallback(p=>{const m=_?u.subscribe(Mr.batchCalls(p)):Us;return u.updateResult(),m},[u,_]),()=>u.getCurrentResult(),()=>u.getCurrentResult()),T.useEffect(()=>{u.setOptions(a)},[a,u]),B4(a,h))throw oO(a,u,s);if(iO({result:h,errorResetBoundary:s,throwOnError:a.throwOnError,query:o,suspense:a.suspense}))throw h.error;return a.notifyOnChangeProps?h:u.trackResult(h)}function ft(e,n){return NV(e,dk)}function zV(e,n){const t=mh(),r=t.getQueryCache();return T.useSyncExternalStore(T.useCallback(s=>r.subscribe(Mr.batchCalls(s)),[r]),()=>t.isFetching(e),()=>t.isFetching(e))}function hn(e,n){const t=mh(),[r]=T.useState(()=>new yV(t,e));T.useEffect(()=>{r.setOptions(e)},[r,e]);const s=T.useSyncExternalStore(T.useCallback(a=>r.subscribe(Mr.batchCalls(a)),[r]),()=>r.getCurrentResult(),()=>r.getCurrentResult()),i=T.useCallback((...a)=>{r.mutate(a[0],a[1]).catch(Us)},[r]);if(s.error&&uk(r.options.throwOnError,[s.error]))throw s.error;return{...s,mutate:i,mutateAsync:s.mutate}}const rt=new kV({defaultOptions:{queries:{staleTime:3e4,gcTime:6e5,retry:!1,networkMode:"always",refetchOnReconnect:!0},mutations:{retry:!1,networkMode:"always"}}}),vu=new Set;let B9=null,cb=0;const P4=new Set,jV=()=>cb,P9=e=>(P4.add(e),()=>{P4.delete(e)}),Ra=()=>["workspace",cb],Nt=(e,...n)=>[...Ra(),e,...n];function TV(e,n=!1){if(B9===e&&!n)return!1;const t=Ra();return B9=e,cb++,vu.clear(),pk({queryKey:t}),P4.forEach(r=>r()),!0}const $n=e=>e[1]===cb;async function pk(e){await rt.cancelQueries(e,{revert:!1}),rt.removeQueries(e)}function Xr(e,n){if($n(e))return rt.setQueryData(e,n)}var E2={exports:{}},yp={},N2={exports:{}},z2={};/** * @license React * scheduler.production.js * @@ -22,7 +22,7 @@ var qG=Object.defineProperty;var S9=e=>{throw TypeError(e)};var UG=(e,n,t)=>n in * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. - */var F9;function jV(){return F9||(F9=1,(function(e){function n(H,Y){var te=H.length;H.push(Y);e:for(;0>>1,L=H[$];if(0>>1;$s(V,te))ees(ce,V)?(H[$]=ce,H[ee]=te,$=ee):(H[$]=V,H[G]=te,$=G);else if(ees(ce,te))H[$]=ce,H[ee]=te,$=ee;else break e}}return Y}function s(H,Y){var te=H.sortIndex-Y.sortIndex;return te!==0?te:H.id-Y.id}if(e.unstable_now=void 0,typeof performance=="object"&&typeof performance.now=="function"){var i=performance;e.unstable_now=function(){return i.now()}}else{var a=Date,o=a.now();e.unstable_now=function(){return a.now()-o}}var l=[],u=[],h=1,_=null,p=3,m=!1,x=!1,k=!1,v=!1,b=typeof setTimeout=="function"?setTimeout:null,w=typeof clearTimeout=="function"?clearTimeout:null,y=typeof setImmediate<"u"?setImmediate:null;function C(H){for(var Y=t(u);Y!==null;){if(Y.callback===null)r(u);else if(Y.startTime<=H)r(u),Y.sortIndex=Y.expirationTime,n(l,Y);else break;Y=t(u)}}function N(H){if(k=!1,C(H),!x)if(t(l)!==null)x=!0,E||(E=!0,P());else{var Y=t(u);Y!==null&&W(N,Y.startTime-H)}}var E=!1,T=-1,j=5,M=-1;function D(){return v?!0:!(e.unstable_now()-MH&&D());){var $=_.callback;if(typeof $=="function"){_.callback=null,p=_.priorityLevel;var L=$(_.expirationTime<=H);if(H=e.unstable_now(),typeof L=="function"){_.callback=L,C(H),Y=!0;break t}_===t(l)&&r(l),C(H)}else r(l);_=t(l)}if(_!==null)Y=!0;else{var F=t(u);F!==null&&W(N,F.startTime-H),Y=!1}}break e}finally{_=null,p=te,m=!1}Y=void 0}}finally{Y?P():E=!1}}}var P;if(typeof y=="function")P=function(){y(I)};else if(typeof MessageChannel<"u"){var U=new MessageChannel,q=U.port2;U.port1.onmessage=I,P=function(){q.postMessage(null)}}else P=function(){b(I,0)};function W(H,Y){T=b(function(){H(e.unstable_now())},Y)}e.unstable_IdlePriority=5,e.unstable_ImmediatePriority=1,e.unstable_LowPriority=4,e.unstable_NormalPriority=3,e.unstable_Profiling=null,e.unstable_UserBlockingPriority=2,e.unstable_cancelCallback=function(H){H.callback=null},e.unstable_forceFrameRate=function(H){0>H||125$?(H.sortIndex=te,n(u,H),t(l)===null&&H===t(u)&&(k?(w(T),T=-1):k=!0,W(N,te-$))):(H.sortIndex=L,n(l,H),x||m||(x=!0,E||(E=!0,P()))),H},e.unstable_shouldYield=D,e.unstable_wrapCallback=function(H){var Y=p;return function(){var te=p;p=Y;try{return H.apply(this,arguments)}finally{p=te}}}})(z2)),z2}var H9;function TV(){return H9||(H9=1,N2.exports=jV()),N2.exports}var j2={exports:{}},Ps={};/** + */var F9;function AV(){return F9||(F9=1,(function(e){function n(H,Y){var te=H.length;H.push(Y);e:for(;0>>1,D=H[$];if(0>>1;$s(V,te))ees(ce,V)?(H[$]=ce,H[ee]=te,$=ee):(H[$]=V,H[G]=te,$=G);else if(ees(ce,te))H[$]=ce,H[ee]=te,$=ee;else break e}}return Y}function s(H,Y){var te=H.sortIndex-Y.sortIndex;return te!==0?te:H.id-Y.id}if(e.unstable_now=void 0,typeof performance=="object"&&typeof performance.now=="function"){var i=performance;e.unstable_now=function(){return i.now()}}else{var a=Date,o=a.now();e.unstable_now=function(){return a.now()-o}}var l=[],u=[],h=1,_=null,p=3,m=!1,x=!1,k=!1,v=!1,b=typeof setTimeout=="function"?setTimeout:null,w=typeof clearTimeout=="function"?clearTimeout:null,y=typeof setImmediate<"u"?setImmediate:null;function C(H){for(var Y=t(u);Y!==null;){if(Y.callback===null)r(u);else if(Y.startTime<=H)r(u),Y.sortIndex=Y.expirationTime,n(l,Y);else break;Y=t(u)}}function E(H){if(k=!1,C(H),!x)if(t(l)!==null)x=!0,N||(N=!0,B());else{var Y=t(u);Y!==null&&W(E,Y.startTime-H)}}var N=!1,A=-1,j=5,M=-1;function L(){return v?!0:!(e.unstable_now()-MH&&L());){var $=_.callback;if(typeof $=="function"){_.callback=null,p=_.priorityLevel;var D=$(_.expirationTime<=H);if(H=e.unstable_now(),typeof D=="function"){_.callback=D,C(H),Y=!0;break t}_===t(l)&&r(l),C(H)}else r(l);_=t(l)}if(_!==null)Y=!0;else{var F=t(u);F!==null&&W(E,F.startTime-H),Y=!1}}break e}finally{_=null,p=te,m=!1}Y=void 0}}finally{Y?B():N=!1}}}var B;if(typeof y=="function")B=function(){y(I)};else if(typeof MessageChannel<"u"){var q=new MessageChannel,U=q.port2;q.port1.onmessage=I,B=function(){U.postMessage(null)}}else B=function(){b(I,0)};function W(H,Y){A=b(function(){H(e.unstable_now())},Y)}e.unstable_IdlePriority=5,e.unstable_ImmediatePriority=1,e.unstable_LowPriority=4,e.unstable_NormalPriority=3,e.unstable_Profiling=null,e.unstable_UserBlockingPriority=2,e.unstable_cancelCallback=function(H){H.callback=null},e.unstable_forceFrameRate=function(H){0>H||125$?(H.sortIndex=te,n(u,H),t(l)===null&&H===t(u)&&(k?(w(A),A=-1):k=!0,W(E,te-$))):(H.sortIndex=D,n(l,H),x||m||(x=!0,N||(N=!0,B()))),H},e.unstable_shouldYield=L,e.unstable_wrapCallback=function(H){var Y=p;return function(){var te=p;p=Y;try{return H.apply(this,arguments)}finally{p=te}}}})(z2)),z2}var H9;function RV(){return H9||(H9=1,N2.exports=AV()),N2.exports}var j2={exports:{}},Ps={};/** * @license React * react-dom.production.js * @@ -30,7 +30,7 @@ var qG=Object.defineProperty;var S9=e=>{throw TypeError(e)};var UG=(e,n,t)=>n in * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. - */var q9;function AV(){if(q9)return Ps;q9=1;var e=om();function n(l){var u="https://react.dev/errors/"+l;if(1"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(e)}catch(n){console.error(n)}}return e(),j2.exports=AV(),j2.exports}/** + */var q9;function MV(){if(q9)return Ps;q9=1;var e=om();function n(l){var u="https://react.dev/errors/"+l;if(1"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(e)}catch(n){console.error(n)}}return e(),j2.exports=MV(),j2.exports}/** * @license React * react-dom-client.production.js * @@ -38,15 +38,15 @@ var qG=Object.defineProperty;var S9=e=>{throw TypeError(e)};var UG=(e,n,t)=>n in * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. - */var G9;function RV(){if(G9)return yp;G9=1;var e=TV(),n=om(),t=lO();function r(c){var d="https://react.dev/errors/"+c;if(1L||(c.current=$[L],$[L]=null,L--)}function V(c,d){L++,$[L]=c.current,c.current=d}var ee=F(null),ce=F(null),ae=F(null),se=F(null);function X(c,d){switch(V(ae,d),V(ce,c),V(ee,null),d.nodeType){case 9:case 11:c=(c=d.documentElement)&&(c=c.namespaceURI)?K8(c):0;break;default:if(c=d.tagName,d=d.namespaceURI)d=K8(d),c=W8(d,c);else switch(c){case"svg":c=1;break;case"math":c=2;break;default:c=0}}G(ee),V(ee,c)}function oe(){G(ee),G(ce),G(ae)}function le(c){c.memoizedState!==null&&V(se,c);var d=ee.current,g=W8(d,c.type);d!==g&&(V(ce,c),V(ee,g))}function _e(c){ce.current===c&&(G(ee),G(ce)),se.current===c&&(G(se),hp._currentValue=te)}var pe,Ee;function Ie(c){if(pe===void 0)try{throw Error()}catch(g){var d=g.stack.trim().match(/\n( *(at )?)/);pe=d&&d[1]||"",Ee=-1D||(c.current=$[D],$[D]=null,D--)}function V(c,d){D++,$[D]=c.current,c.current=d}var ee=F(null),ce=F(null),ae=F(null),re=F(null);function X(c,d){switch(V(ae,d),V(ce,c),V(ee,null),d.nodeType){case 9:case 11:c=(c=d.documentElement)&&(c=c.namespaceURI)?K8(c):0;break;default:if(c=d.tagName,d=d.namespaceURI)d=K8(d),c=W8(d,c);else switch(c){case"svg":c=1;break;case"math":c=2;break;default:c=0}}G(ee),V(ee,c)}function oe(){G(ee),G(ce),G(ae)}function le(c){c.memoizedState!==null&&V(re,c);var d=ee.current,g=W8(d,c.type);d!==g&&(V(ce,c),V(ee,g))}function _e(c){ce.current===c&&(G(ee),G(ce)),re.current===c&&(G(re),hp._currentValue=te)}var pe,Ee;function Ie(c){if(pe===void 0)try{throw Error()}catch(g){var d=g.stack.trim().match(/\n( *(at )?)/);pe=d&&d[1]||"",Ee=-1)":-1R||he[S]!==Se[R]){var Le=` `+he[S].replace(" at new "," at ");return c.displayName&&Le.includes("")&&(Le=Le.replace("",c.displayName)),Le}while(1<=S&&0<=R);break}}}finally{ze=!1,Error.prepareStackTrace=g}return(g=c?c.displayName||c.name:"")?Ie(g):""}function Oe(c,d){switch(c.tag){case 26:case 27:case 5:return Ie(c.type);case 16:return Ie("Lazy");case 13:return c.child!==d&&d!==null?Ie("Suspense Fallback"):Ie("Suspense");case 19:return Ie("SuspenseList");case 0:case 15:return He(c.type,!1);case 11:return He(c.type.render,!1);case 1:return He(c.type,!0);case 31:return Ie("Activity");default:return""}}function Xe(c){try{var d="",g=null;do d+=Oe(c,g),g=c,c=c.return;while(c);return d}catch(S){return` Error generating stack: `+S.message+` -`+S.stack}}var _t=Object.prototype.hasOwnProperty,Vt=e.unstable_scheduleCallback,$t=e.unstable_cancelCallback,jt=e.unstable_shouldYield,mt=e.unstable_requestPaint,we=e.unstable_now,ct=e.unstable_getCurrentPriorityLevel,ye=e.unstable_ImmediatePriority,je=e.unstable_UserBlockingPriority,qe=e.unstable_NormalPriority,at=e.unstable_LowPriority,nt=e.unstable_IdlePriority,Kt=e.log,Qe=e.unstable_setDisableYieldValue,wt=null,Tt=null;function Yt(c){if(typeof Kt=="function"&&Qe(c),Tt&&typeof Tt.setStrictMode=="function")try{Tt.setStrictMode(wt,c)}catch{}}var tn=Math.clz32?Math.clz32:ln,rr=Math.log,rn=Math.LN2;function ln(c){return c>>>=0,c===0?32:31-(rr(c)/rn|0)|0}var An=256,qn=262144,Yn=4194304;function fr(c){var d=c&42;if(d!==0)return d;switch(c&-c){case 1:return 1;case 2:return 2;case 4:return 4;case 8:return 8;case 16:return 16;case 32:return 32;case 64:return 64;case 128:return 128;case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:return c&261888;case 262144:case 524288:case 1048576:case 2097152:return c&3932160;case 4194304:case 8388608:case 16777216:case 33554432:return c&62914560;case 67108864:return 67108864;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 0;default:return c}}function Xr(c,d,g){var S=c.pendingLanes;if(S===0)return 0;var R=0,O=c.suspendedLanes,Q=c.pingedLanes;c=c.warmLanes;var re=S&134217727;return re!==0?(S=re&~O,S!==0?R=fr(S):(Q&=re,Q!==0?R=fr(Q):g||(g=re&~c,g!==0&&(R=fr(g))))):(re=S&~O,re!==0?R=fr(re):Q!==0?R=fr(Q):g||(g=S&~c,g!==0&&(R=fr(g)))),R===0?0:d!==0&&d!==R&&(d&O)===0&&(O=R&-R,g=d&-d,O>=g||O===32&&(g&4194048)!==0)?d:R}function zr(c,d){return(c.pendingLanes&~(c.suspendedLanes&~c.pingedLanes)&d)===0}function kt(c,d){switch(c){case 1:case 2:case 4:case 8:case 64:return d+250;case 16:case 32:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:return d+5e3;case 4194304:case 8388608:case 16777216:case 33554432:return-1;case 67108864:case 134217728:case 268435456:case 536870912:case 1073741824:return-1;default:return-1}}function cn(){var c=Yn;return Yn<<=1,(Yn&62914560)===0&&(Yn=4194304),c}function jn(c){for(var d=[],g=0;31>g;g++)d.push(c);return d}function fn(c,d){c.pendingLanes|=d,d!==268435456&&(c.suspendedLanes=0,c.pingedLanes=0,c.warmLanes=0)}function Dn(c,d,g,S,R,O){var Q=c.pendingLanes;c.pendingLanes=g,c.suspendedLanes=0,c.pingedLanes=0,c.warmLanes=0,c.expiredLanes&=g,c.entangledLanes&=g,c.errorRecoveryDisabledLanes&=g,c.shellSuspendCounter=0;var re=c.entanglements,he=c.expirationTimes,Se=c.hiddenUpdates;for(g=Q&~g;0"u")return null;try{return c.activeElement||c.body}catch{return c.body}}var Yr=/[\n"\\]/g;function vr(c){return c.replace(Yr,function(d){return"\\"+d.charCodeAt(0).toString(16)+" "})}function Qt(c,d,g,S,R,O,Q,re){c.name="",Q!=null&&typeof Q!="function"&&typeof Q!="symbol"&&typeof Q!="boolean"?c.type=Q:c.removeAttribute("type"),d!=null?Q==="number"?(d===0&&c.value===""||c.value!=d)&&(c.value=""+Ln(d)):c.value!==""+Ln(d)&&(c.value=""+Ln(d)):Q!=="submit"&&Q!=="reset"||c.removeAttribute("value"),d!=null?_s(c,Q,Ln(d)):g!=null?_s(c,Q,Ln(g)):S!=null&&c.removeAttribute("value"),R==null&&O!=null&&(c.defaultChecked=!!O),R!=null&&(c.checked=R&&typeof R!="function"&&typeof R!="symbol"),re!=null&&typeof re!="function"&&typeof re!="symbol"&&typeof re!="boolean"?c.name=""+Ln(re):c.removeAttribute("name")}function Is(c,d,g,S,R,O,Q,re){if(O!=null&&typeof O!="function"&&typeof O!="symbol"&&typeof O!="boolean"&&(c.type=O),d!=null||g!=null){if(!(O!=="submit"&&O!=="reset"||d!=null)){Mi(c);return}g=g!=null?""+Ln(g):"",d=d!=null?""+Ln(d):g,re||d===c.value||(c.value=d),c.defaultValue=d}S=S??R,S=typeof S!="function"&&typeof S!="symbol"&&!!S,c.checked=re?c.checked:!!S,c.defaultChecked=!!S,Q!=null&&typeof Q!="function"&&typeof Q!="symbol"&&typeof Q!="boolean"&&(c.name=Q),Mi(c)}function _s(c,d,g){d==="number"&&Oi(c.ownerDocument)===c||c.defaultValue===""+g||(c.defaultValue=""+g)}function Lr(c,d,g,S){if(c=c.options,d){d={};for(var R=0;R"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),vo=!1;if(pi)try{var bo={};Object.defineProperty(bo,"passive",{get:function(){vo=!0}}),window.addEventListener("test",bo,bo),window.removeEventListener("test",bo,bo)}catch{vo=!1}var Ii=null,ol=null,ll=null;function hc(){if(ll)return ll;var c,d=ol,g=d.length,S,R="value"in Ii?Ii.value:Ii.textContent,O=R.length;for(c=0;c=yo),xo=" ",yf=!1;function xf(c,d){switch(c){case"keyup":return bf.indexOf(d.keyCode)!==-1;case"keydown":return d.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function ds(c){return c=c.detail,typeof c=="object"&&"data"in c?c.data:null}var yn=!1;function wc(c,d){switch(c){case"compositionend":return ds(d);case"keypress":return d.which!==32?null:(yf=!0,xo);case"textInput":return c=d.data,c===xo&&yf?null:c;default:return null}}function $h(c,d){if(yn)return c==="compositionend"||!fl&&xf(c,d)?(c=hc(),ll=ol=Ii=null,yn=!1,c):null;switch(c){case"paste":return null;case"keypress":if(!(d.ctrlKey||d.altKey||d.metaKey)||d.ctrlKey&&d.altKey){if(d.char&&1=d)return{node:g,offset:d-c};c=S}e:{for(;g;){if(g.nextSibling){g=g.nextSibling;break e}g=g.parentNode}g=void 0}g=ni(g)}}function Z(c,d){return c&&d?c===d?!0:c&&c.nodeType===3?!1:d&&d.nodeType===3?Z(c,d.parentNode):"contains"in c?c.contains(d):c.compareDocumentPosition?!!(c.compareDocumentPosition(d)&16):!1:!1}function ge(c){c=c!=null&&c.ownerDocument!=null&&c.ownerDocument.defaultView!=null?c.ownerDocument.defaultView:window;for(var d=Oi(c.document);d instanceof c.HTMLIFrameElement;){try{var g=typeof d.contentWindow.location.href=="string"}catch{g=!1}if(g)c=d.contentWindow;else break;d=Oi(c.document)}return d}function Te(c){var d=c&&c.nodeName&&c.nodeName.toLowerCase();return d&&(d==="input"&&(c.type==="text"||c.type==="search"||c.type==="tel"||c.type==="url"||c.type==="password")||d==="textarea"||c.contentEditable==="true")}var Be=pi&&"documentMode"in document&&11>=document.documentMode,Re=null,st=null,it=null,Ht=!1;function Gn(c,d,g){var S=g.window===g?g.document:g.nodeType===9?g:g.ownerDocument;Ht||Re==null||Re!==Oi(S)||(S=Re,"selectionStart"in S&&Te(S)?S={start:S.selectionStart,end:S.selectionEnd}:(S=(S.ownerDocument&&S.ownerDocument.defaultView||window).getSelection(),S={anchorNode:S.anchorNode,anchorOffset:S.anchorOffset,focusNode:S.focusNode,focusOffset:S.focusOffset}),it&&Va(it,S)||(it=S,S=bg(st,"onSelect"),0>=Q,R-=Q,ko=1<<32-tn(d)+R|g<an?(kn=xt,xt=null):kn=xt.sibling;var On=Ce(xe,xt,ke[an],Pe);if(On===null){xt===null&&(xt=kn);break}c&&xt&&On.alternate===null&&d(xe,xt),me=O(On,me,an),Mn===null?It=On:Mn.sibling=On,Mn=On,xt=kn}if(an===ke.length)return g(xe,xt),Sn&&ml(xe,an),It;if(xt===null){for(;anan?(kn=xt,xt=null):kn=xt.sibling;var Uc=Ce(xe,xt,On.value,Pe);if(Uc===null){xt===null&&(xt=kn);break}c&&xt&&Uc.alternate===null&&d(xe,xt),me=O(Uc,me,an),Mn===null?It=Uc:Mn.sibling=Uc,Mn=Uc,xt=kn}if(On.done)return g(xe,xt),Sn&&ml(xe,an),It;if(xt===null){for(;!On.done;an++,On=ke.next())On=Fe(xe,On.value,Pe),On!==null&&(me=O(On,me,an),Mn===null?It=On:Mn.sibling=On,Mn=On);return Sn&&ml(xe,an),It}for(xt=S(xt);!On.done;an++,On=ke.next())On=Ae(xt,xe,an,On.value,Pe),On!==null&&(c&&On.alternate!==null&&xt.delete(On.key===null?an:On.key),me=O(On,me,an),Mn===null?It=On:Mn.sibling=On,Mn=On);return c&&xt.forEach(function(HG){return d(xe,HG)}),Sn&&ml(xe,an),It}function tr(xe,me,ke,Pe){if(typeof ke=="object"&&ke!==null&&ke.type===k&&ke.key===null&&(ke=ke.props.children),typeof ke=="object"&&ke!==null){switch(ke.$$typeof){case m:e:{for(var It=ke.key;me!==null;){if(me.key===It){if(It=ke.type,It===k){if(me.tag===7){g(xe,me.sibling),Pe=R(me,ke.props.children),Pe.return=xe,xe=Pe;break e}}else if(me.elementType===It||typeof It=="object"&&It!==null&&It.$$typeof===j&&Qu(It)===me.type){g(xe,me.sibling),Pe=R(me,ke.props),Gh(Pe,ke),Pe.return=xe,xe=Pe;break e}g(xe,me);break}else d(xe,me);me=me.sibling}ke.type===k?(Pe=Uu(ke.props.children,xe.mode,Pe,ke.key),Pe.return=xe,xe=Pe):(Pe=Lm(ke.type,ke.key,ke.props,null,xe.mode,Pe),Gh(Pe,ke),Pe.return=xe,xe=Pe)}return Q(xe);case x:e:{for(It=ke.key;me!==null;){if(me.key===It)if(me.tag===4&&me.stateNode.containerInfo===ke.containerInfo&&me.stateNode.implementation===ke.implementation){g(xe,me.sibling),Pe=R(me,ke.children||[]),Pe.return=xe,xe=Pe;break e}else{g(xe,me);break}else d(xe,me);me=me.sibling}Pe=Fy(ke,xe.mode,Pe),Pe.return=xe,xe=Pe}return Q(xe);case j:return ke=Qu(ke),tr(xe,me,ke,Pe)}if(W(ke))return bt(xe,me,ke,Pe);if(P(ke)){if(It=P(ke),typeof It!="function")throw Error(r(150));return ke=It.call(ke),qt(xe,me,ke,Pe)}if(typeof ke.then=="function")return tr(xe,me,qm(ke),Pe);if(ke.$$typeof===y)return tr(xe,me,Bm(xe,ke),Pe);Um(xe,ke)}return typeof ke=="string"&&ke!==""||typeof ke=="number"||typeof ke=="bigint"?(ke=""+ke,me!==null&&me.tag===6?(g(xe,me.sibling),Pe=R(me,ke),Pe.return=xe,xe=Pe):(g(xe,me),Pe=Py(ke,xe.mode,Pe),Pe.return=xe,xe=Pe),Q(xe)):g(xe,me)}return function(xe,me,ke,Pe){try{Uh=0;var It=tr(xe,me,ke,Pe);return Rf=null,It}catch(xt){if(xt===Af||xt===Fm)throw xt;var Mn=Pi(29,xt,null,xe.mode);return Mn.lanes=Pe,Mn.return=xe,Mn}finally{}}}var Yu=$7(!0),B7=$7(!1),Nc=!1;function Jy(c){c.updateQueue={baseState:c.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,lanes:0,hiddenCallbacks:null},callbacks:null}}function ex(c,d){c=c.updateQueue,d.updateQueue===c&&(d.updateQueue={baseState:c.baseState,firstBaseUpdate:c.firstBaseUpdate,lastBaseUpdate:c.lastBaseUpdate,shared:c.shared,callbacks:null})}function zc(c){return{lane:c,tag:0,payload:null,callback:null,next:null}}function jc(c,d,g){var S=c.updateQueue;if(S===null)return null;if(S=S.shared,(In&2)!==0){var R=S.pending;return R===null?d.next=d:(d.next=R.next,R.next=d),S.pending=d,d=Dm(c),w7(c,null,g),d}return Om(c,S,d,g),Dm(c)}function Vh(c,d,g){if(d=d.updateQueue,d!==null&&(d=d.shared,(g&4194048)!==0)){var S=d.lanes;S&=c.pendingLanes,g|=S,d.lanes=g,Un(c,g)}}function tx(c,d){var g=c.updateQueue,S=c.alternate;if(S!==null&&(S=S.updateQueue,g===S)){var R=null,O=null;if(g=g.firstBaseUpdate,g!==null){do{var Q={lane:g.lane,tag:g.tag,payload:g.payload,callback:null,next:null};O===null?R=O=Q:O=O.next=Q,g=g.next}while(g!==null);O===null?R=O=d:O=O.next=d}else R=O=d;g={baseState:S.baseState,firstBaseUpdate:R,lastBaseUpdate:O,shared:S.shared,callbacks:S.callbacks},c.updateQueue=g;return}c=g.lastBaseUpdate,c===null?g.firstBaseUpdate=d:c.next=d,g.lastBaseUpdate=d}var nx=!1;function Kh(){if(nx){var c=Tf;if(c!==null)throw c}}function Wh(c,d,g,S){nx=!1;var R=c.updateQueue;Nc=!1;var O=R.firstBaseUpdate,Q=R.lastBaseUpdate,re=R.shared.pending;if(re!==null){R.shared.pending=null;var he=re,Se=he.next;he.next=null,Q===null?O=Se:Q.next=Se,Q=he;var Le=c.alternate;Le!==null&&(Le=Le.updateQueue,re=Le.lastBaseUpdate,re!==Q&&(re===null?Le.firstBaseUpdate=Se:re.next=Se,Le.lastBaseUpdate=he))}if(O!==null){var Fe=R.baseState;Q=0,Le=Se=he=null,re=O;do{var Ce=re.lane&-536870913,Ae=Ce!==re.lane;if(Ae?(wn&Ce)===Ce:(S&Ce)===Ce){Ce!==0&&Ce===jf&&(nx=!0),Le!==null&&(Le=Le.next={lane:0,tag:re.tag,payload:re.payload,callback:null,next:null});e:{var bt=c,qt=re;Ce=d;var tr=g;switch(qt.tag){case 1:if(bt=qt.payload,typeof bt=="function"){Fe=bt.call(tr,Fe,Ce);break e}Fe=bt;break e;case 3:bt.flags=bt.flags&-65537|128;case 0:if(bt=qt.payload,Ce=typeof bt=="function"?bt.call(tr,Fe,Ce):bt,Ce==null)break e;Fe=_({},Fe,Ce);break e;case 2:Nc=!0}}Ce=re.callback,Ce!==null&&(c.flags|=64,Ae&&(c.flags|=8192),Ae=R.callbacks,Ae===null?R.callbacks=[Ce]:Ae.push(Ce))}else Ae={lane:Ce,tag:re.tag,payload:re.payload,callback:re.callback,next:null},Le===null?(Se=Le=Ae,he=Fe):Le=Le.next=Ae,Q|=Ce;if(re=re.next,re===null){if(re=R.shared.pending,re===null)break;Ae=re,re=Ae.next,Ae.next=null,R.lastBaseUpdate=Ae,R.shared.pending=null}}while(!0);Le===null&&(he=Fe),R.baseState=he,R.firstBaseUpdate=Se,R.lastBaseUpdate=Le,O===null&&(R.shared.lanes=0),Oc|=Q,c.lanes=Q,c.memoizedState=Fe}}function P7(c,d){if(typeof c!="function")throw Error(r(191,c));c.call(d)}function F7(c,d){var g=c.callbacks;if(g!==null)for(c.callbacks=null,c=0;cO?O:8;var Q=H.T,re={};H.T=re,xx(c,!1,d,g);try{var he=R(),Se=H.S;if(Se!==null&&Se(re,he),he!==null&&typeof he=="object"&&typeof he.then=="function"){var Le=AU(he,S);Yh(c,d,Le,Gi(c))}else Yh(c,d,S,Gi(c))}catch(Fe){Yh(c,d,{then:function(){},status:"rejected",reason:Fe},Gi())}finally{Y.p=O,Q!==null&&re.types!==null&&(Q.types=re.types),H.T=Q}}function IU(){}function bx(c,d,g,S){if(c.tag!==5)throw Error(r(476));var R=bC(c).queue;vC(c,R,d,te,g===null?IU:function(){return yC(c),g(S)})}function bC(c){var d=c.memoizedState;if(d!==null)return d;d={memoizedState:te,baseState:te,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:yl,lastRenderedState:te},next:null};var g={};return d.next={memoizedState:g,baseState:g,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:yl,lastRenderedState:g},next:null},c.memoizedState=d,c=c.alternate,c!==null&&(c.memoizedState=d),d}function yC(c){var d=bC(c);d.next===null&&(d=c.alternate.memoizedState),Yh(c,d.next.queue,{},Gi())}function yx(){return Ms(hp)}function xC(){return Wr().memoizedState}function wC(){return Wr().memoizedState}function $U(c){for(var d=c.return;d!==null;){switch(d.tag){case 24:case 3:var g=Gi();c=zc(g);var S=jc(d,c,g);S!==null&&(ki(S,d,g),Vh(S,d,g)),d={cache:Qy()},c.payload=d;return}d=d.return}}function BU(c,d,g){var S=Gi();g={lane:S,revertLane:0,gesture:null,action:g,hasEagerState:!1,eagerState:null,next:null},eg(c)?SC(d,g):(g=$y(c,d,g,S),g!==null&&(ki(g,c,S),CC(g,d,S)))}function kC(c,d,g){var S=Gi();Yh(c,d,g,S)}function Yh(c,d,g,S){var R={lane:S,revertLane:0,gesture:null,action:g,hasEagerState:!1,eagerState:null,next:null};if(eg(c))SC(d,R);else{var O=c.alternate;if(c.lanes===0&&(O===null||O.lanes===0)&&(O=d.lastRenderedReducer,O!==null))try{var Q=d.lastRenderedState,re=O(Q,g);if(R.hasEagerState=!0,R.eagerState=re,Ts(re,Q))return Om(c,d,R,0),ar===null&&Mm(),!1}catch{}finally{}if(g=$y(c,d,R,S),g!==null)return ki(g,c,S),CC(g,d,S),!0}return!1}function xx(c,d,g,S){if(S={lane:2,revertLane:Jx(),gesture:null,action:S,hasEagerState:!1,eagerState:null,next:null},eg(c)){if(d)throw Error(r(479))}else d=$y(c,g,S,2),d!==null&&ki(d,c,2)}function eg(c){var d=c.alternate;return c===sn||d!==null&&d===sn}function SC(c,d){Of=Km=!0;var g=c.pending;g===null?d.next=d:(d.next=g.next,g.next=d),c.pending=d}function CC(c,d,g){if((g&4194048)!==0){var S=d.lanes;S&=c.pendingLanes,g|=S,d.lanes=g,Un(c,g)}}var Zh={readContext:Ms,use:Xm,useCallback:Br,useContext:Br,useEffect:Br,useImperativeHandle:Br,useLayoutEffect:Br,useInsertionEffect:Br,useMemo:Br,useReducer:Br,useRef:Br,useState:Br,useDebugValue:Br,useDeferredValue:Br,useTransition:Br,useSyncExternalStore:Br,useId:Br,useHostTransitionStatus:Br,useFormState:Br,useActionState:Br,useOptimistic:Br,useMemoCache:Br,useCacheRefresh:Br};Zh.useEffectEvent=Br;var EC={readContext:Ms,use:Xm,useCallback:function(c,d){return ri().memoizedState=[c,d===void 0?null:d],c},useContext:Ms,useEffect:cC,useImperativeHandle:function(c,d,g){g=g!=null?g.concat([c]):null,Zm(4194308,4,dC.bind(null,d,c),g)},useLayoutEffect:function(c,d){return Zm(4194308,4,c,d)},useInsertionEffect:function(c,d){Zm(4,2,c,d)},useMemo:function(c,d){var g=ri();d=d===void 0?null:d;var S=c();if(Zu){Yt(!0);try{c()}finally{Yt(!1)}}return g.memoizedState=[S,d],S},useReducer:function(c,d,g){var S=ri();if(g!==void 0){var R=g(d);if(Zu){Yt(!0);try{g(d)}finally{Yt(!1)}}}else R=d;return S.memoizedState=S.baseState=R,c={pending:null,lanes:0,dispatch:null,lastRenderedReducer:c,lastRenderedState:R},S.queue=c,c=c.dispatch=BU.bind(null,sn,c),[S.memoizedState,c]},useRef:function(c){var d=ri();return c={current:c},d.memoizedState=c},useState:function(c){c=hx(c);var d=c.queue,g=kC.bind(null,sn,d);return d.dispatch=g,[c.memoizedState,g]},useDebugValue:gx,useDeferredValue:function(c,d){var g=ri();return vx(g,c,d)},useTransition:function(){var c=hx(!1);return c=vC.bind(null,sn,c.queue,!0,!1),ri().memoizedState=c,[!1,c]},useSyncExternalStore:function(c,d,g){var S=sn,R=ri();if(Sn){if(g===void 0)throw Error(r(407));g=g()}else{if(g=d(),ar===null)throw Error(r(349));(wn&127)!==0||K7(S,d,g)}R.memoizedState=g;var O={value:g,getSnapshot:d};return R.queue=O,cC(Q7.bind(null,S,O,c),[c]),S.flags|=2048,Lf(9,{destroy:void 0},W7.bind(null,S,O,g,d),null),g},useId:function(){var c=ri(),d=ar.identifierPrefix;if(Sn){var g=So,S=ko;g=(S&~(1<<32-tn(S)-1)).toString(32)+g,d="_"+d+"R_"+g,g=Wm++,0<\/script>",O=O.removeChild(O.firstChild);break;case"select":O=typeof S.is=="string"?Q.createElement("select",{is:S.is}):Q.createElement("select"),S.multiple?O.multiple=!0:S.size&&(O.size=S.size);break;default:O=typeof S.is=="string"?Q.createElement(R,{is:S.is}):Q.createElement(R)}}O[un]=d,O[Lt]=S;e:for(Q=d.child;Q!==null;){if(Q.tag===5||Q.tag===6)O.appendChild(Q.stateNode);else if(Q.tag!==4&&Q.tag!==27&&Q.child!==null){Q.child.return=Q,Q=Q.child;continue}if(Q===d)break e;for(;Q.sibling===null;){if(Q.return===null||Q.return===d)break e;Q=Q.return}Q.sibling.return=Q.return,Q=Q.sibling}d.stateNode=O;e:switch(Ds(O,R,S),R){case"button":case"input":case"select":case"textarea":S=!!S.autoFocus;break e;case"img":S=!0;break e;default:S=!1}S&&wl(d)}}return hr(d),Dx(d,d.type,c===null?null:c.memoizedProps,d.pendingProps,g),null;case 6:if(c&&d.stateNode!=null)c.memoizedProps!==S&&wl(d);else{if(typeof S!="string"&&d.stateNode===null)throw Error(r(166));if(c=ae.current,Nf(d)){if(c=d.stateNode,g=d.memoizedProps,S=null,R=Rs,R!==null)switch(R.tag){case 27:case 5:S=R.memoizedProps}c[un]=d,c=!!(c.nodeValue===g||S!==null&&S.suppressHydrationWarning===!0||G8(c.nodeValue,g)),c||Cc(d,!0)}else c=yg(c).createTextNode(S),c[un]=d,d.stateNode=c}return hr(d),null;case 31:if(g=d.memoizedState,c===null||c.memoizedState!==null){if(S=Nf(d),g!==null){if(c===null){if(!S)throw Error(r(318));if(c=d.memoizedState,c=c!==null?c.dehydrated:null,!c)throw Error(r(557));c[un]=d}else Gu(),(d.flags&128)===0&&(d.memoizedState=null),d.flags|=4;hr(d),c=!1}else g=Gy(),c!==null&&c.memoizedState!==null&&(c.memoizedState.hydrationErrors=g),c=!0;if(!c)return d.flags&256?(Hi(d),d):(Hi(d),null);if((d.flags&128)!==0)throw Error(r(558))}return hr(d),null;case 13:if(S=d.memoizedState,c===null||c.memoizedState!==null&&c.memoizedState.dehydrated!==null){if(R=Nf(d),S!==null&&S.dehydrated!==null){if(c===null){if(!R)throw Error(r(318));if(R=d.memoizedState,R=R!==null?R.dehydrated:null,!R)throw Error(r(317));R[un]=d}else Gu(),(d.flags&128)===0&&(d.memoizedState=null),d.flags|=4;hr(d),R=!1}else R=Gy(),c!==null&&c.memoizedState!==null&&(c.memoizedState.hydrationErrors=R),R=!0;if(!R)return d.flags&256?(Hi(d),d):(Hi(d),null)}return Hi(d),(d.flags&128)!==0?(d.lanes=g,d):(g=S!==null,c=c!==null&&c.memoizedState!==null,g&&(S=d.child,R=null,S.alternate!==null&&S.alternate.memoizedState!==null&&S.alternate.memoizedState.cachePool!==null&&(R=S.alternate.memoizedState.cachePool.pool),O=null,S.memoizedState!==null&&S.memoizedState.cachePool!==null&&(O=S.memoizedState.cachePool.pool),O!==R&&(S.flags|=2048)),g!==c&&g&&(d.child.flags|=8192),ig(d,d.updateQueue),hr(d),null);case 4:return oe(),c===null&&r2(d.stateNode.containerInfo),hr(d),null;case 10:return vl(d.type),hr(d),null;case 19:if(G(Kr),S=d.memoizedState,S===null)return hr(d),null;if(R=(d.flags&128)!==0,O=S.rendering,O===null)if(R)ep(S,!1);else{if(Pr!==0||c!==null&&(c.flags&128)!==0)for(c=d.child;c!==null;){if(O=Vm(c),O!==null){for(d.flags|=128,ep(S,!1),c=O.updateQueue,d.updateQueue=c,ig(d,c),d.subtreeFlags=0,c=g,g=d.child;g!==null;)k7(g,c),g=g.sibling;return V(Kr,Kr.current&1|2),Sn&&ml(d,S.treeForkCount),d.child}c=c.sibling}S.tail!==null&&we()>ug&&(d.flags|=128,R=!0,ep(S,!1),d.lanes=4194304)}else{if(!R)if(c=Vm(O),c!==null){if(d.flags|=128,R=!0,c=c.updateQueue,d.updateQueue=c,ig(d,c),ep(S,!0),S.tail===null&&S.tailMode==="hidden"&&!O.alternate&&!Sn)return hr(d),null}else 2*we()-S.renderingStartTime>ug&&g!==536870912&&(d.flags|=128,R=!0,ep(S,!1),d.lanes=4194304);S.isBackwards?(O.sibling=d.child,d.child=O):(c=S.last,c!==null?c.sibling=O:d.child=O,S.last=O)}return S.tail!==null?(c=S.tail,S.rendering=c,S.tail=c.sibling,S.renderingStartTime=we(),c.sibling=null,g=Kr.current,V(Kr,R?g&1|2:g&1),Sn&&ml(d,S.treeForkCount),c):(hr(d),null);case 22:case 23:return Hi(d),sx(),S=d.memoizedState!==null,c!==null?c.memoizedState!==null!==S&&(d.flags|=8192):S&&(d.flags|=8192),S?(g&536870912)!==0&&(d.flags&128)===0&&(hr(d),d.subtreeFlags&6&&(d.flags|=8192)):hr(d),g=d.updateQueue,g!==null&&ig(d,g.retryQueue),g=null,c!==null&&c.memoizedState!==null&&c.memoizedState.cachePool!==null&&(g=c.memoizedState.cachePool.pool),S=null,d.memoizedState!==null&&d.memoizedState.cachePool!==null&&(S=d.memoizedState.cachePool.pool),S!==g&&(d.flags|=2048),c!==null&&G(Wu),null;case 24:return g=null,c!==null&&(g=c.memoizedState.cache),d.memoizedState.cache!==g&&(d.flags|=2048),vl(Jr),hr(d),null;case 25:return null;case 30:return null}throw Error(r(156,d.tag))}function UU(c,d){switch(qy(d),d.tag){case 1:return c=d.flags,c&65536?(d.flags=c&-65537|128,d):null;case 3:return vl(Jr),oe(),c=d.flags,(c&65536)!==0&&(c&128)===0?(d.flags=c&-65537|128,d):null;case 26:case 27:case 5:return _e(d),null;case 31:if(d.memoizedState!==null){if(Hi(d),d.alternate===null)throw Error(r(340));Gu()}return c=d.flags,c&65536?(d.flags=c&-65537|128,d):null;case 13:if(Hi(d),c=d.memoizedState,c!==null&&c.dehydrated!==null){if(d.alternate===null)throw Error(r(340));Gu()}return c=d.flags,c&65536?(d.flags=c&-65537|128,d):null;case 19:return G(Kr),null;case 4:return oe(),null;case 10:return vl(d.type),null;case 22:case 23:return Hi(d),sx(),c!==null&&G(Wu),c=d.flags,c&65536?(d.flags=c&-65537|128,d):null;case 24:return vl(Jr),null;case 25:return null;default:return null}}function XC(c,d){switch(qy(d),d.tag){case 3:vl(Jr),oe();break;case 26:case 27:case 5:_e(d);break;case 4:oe();break;case 31:d.memoizedState!==null&&Hi(d);break;case 13:Hi(d);break;case 19:G(Kr);break;case 10:vl(d.type);break;case 22:case 23:Hi(d),sx(),c!==null&&G(Wu);break;case 24:vl(Jr)}}function tp(c,d){try{var g=d.updateQueue,S=g!==null?g.lastEffect:null;if(S!==null){var R=S.next;g=R;do{if((g.tag&c)===c){S=void 0;var O=g.create,Q=g.inst;S=O(),Q.destroy=S}g=g.next}while(g!==R)}}catch(re){Xn(d,d.return,re)}}function Rc(c,d,g){try{var S=d.updateQueue,R=S!==null?S.lastEffect:null;if(R!==null){var O=R.next;S=O;do{if((S.tag&c)===c){var Q=S.inst,re=Q.destroy;if(re!==void 0){Q.destroy=void 0,R=d;var he=g,Se=re;try{Se()}catch(Le){Xn(R,he,Le)}}}S=S.next}while(S!==O)}}catch(Le){Xn(d,d.return,Le)}}function YC(c){var d=c.updateQueue;if(d!==null){var g=c.stateNode;try{F7(d,g)}catch(S){Xn(c,c.return,S)}}}function ZC(c,d,g){g.props=Ju(c.type,c.memoizedProps),g.state=c.memoizedState;try{g.componentWillUnmount()}catch(S){Xn(c,d,S)}}function np(c,d){try{var g=c.ref;if(g!==null){switch(c.tag){case 26:case 27:case 5:var S=c.stateNode;break;case 30:S=c.stateNode;break;default:S=c.stateNode}typeof g=="function"?c.refCleanup=g(S):g.current=S}}catch(R){Xn(c,d,R)}}function Co(c,d){var g=c.ref,S=c.refCleanup;if(g!==null)if(typeof S=="function")try{S()}catch(R){Xn(c,d,R)}finally{c.refCleanup=null,c=c.alternate,c!=null&&(c.refCleanup=null)}else if(typeof g=="function")try{g(null)}catch(R){Xn(c,d,R)}else g.current=null}function JC(c){var d=c.type,g=c.memoizedProps,S=c.stateNode;try{e:switch(d){case"button":case"input":case"select":case"textarea":g.autoFocus&&S.focus();break e;case"img":g.src?S.src=g.src:g.srcSet&&(S.srcset=g.srcSet)}}catch(R){Xn(c,c.return,R)}}function Lx(c,d,g){try{var S=c.stateNode;fG(S,c.type,g,d),S[Lt]=d}catch(R){Xn(c,c.return,R)}}function e8(c){return c.tag===5||c.tag===3||c.tag===26||c.tag===27&&Bc(c.type)||c.tag===4}function Ix(c){e:for(;;){for(;c.sibling===null;){if(c.return===null||e8(c.return))return null;c=c.return}for(c.sibling.return=c.return,c=c.sibling;c.tag!==5&&c.tag!==6&&c.tag!==18;){if(c.tag===27&&Bc(c.type)||c.flags&2||c.child===null||c.tag===4)continue e;c.child.return=c,c=c.child}if(!(c.flags&2))return c.stateNode}}function $x(c,d,g){var S=c.tag;if(S===5||S===6)c=c.stateNode,d?(g.nodeType===9?g.body:g.nodeName==="HTML"?g.ownerDocument.body:g).insertBefore(c,d):(d=g.nodeType===9?g.body:g.nodeName==="HTML"?g.ownerDocument.body:g,d.appendChild(c),g=g._reactRootContainer,g!=null||d.onclick!==null||(d.onclick=Ir));else if(S!==4&&(S===27&&Bc(c.type)&&(g=c.stateNode,d=null),c=c.child,c!==null))for($x(c,d,g),c=c.sibling;c!==null;)$x(c,d,g),c=c.sibling}function ag(c,d,g){var S=c.tag;if(S===5||S===6)c=c.stateNode,d?g.insertBefore(c,d):g.appendChild(c);else if(S!==4&&(S===27&&Bc(c.type)&&(g=c.stateNode),c=c.child,c!==null))for(ag(c,d,g),c=c.sibling;c!==null;)ag(c,d,g),c=c.sibling}function t8(c){var d=c.stateNode,g=c.memoizedProps;try{for(var S=c.type,R=d.attributes;R.length;)d.removeAttributeNode(R[0]);Ds(d,S,g),d[un]=c,d[Lt]=g}catch(O){Xn(c,c.return,O)}}var kl=!1,ns=!1,Bx=!1,n8=typeof WeakSet=="function"?WeakSet:Set,Ns=null;function GU(c,d){if(c=c.containerInfo,a2=Ng,c=ge(c),Te(c)){if("selectionStart"in c)var g={start:c.selectionStart,end:c.selectionEnd};else e:{g=(g=c.ownerDocument)&&g.defaultView||window;var S=g.getSelection&&g.getSelection();if(S&&S.rangeCount!==0){g=S.anchorNode;var R=S.anchorOffset,O=S.focusNode;S=S.focusOffset;try{g.nodeType,O.nodeType}catch{g=null;break e}var Q=0,re=-1,he=-1,Se=0,Le=0,Fe=c,Ce=null;t:for(;;){for(var Ae;Fe!==g||R!==0&&Fe.nodeType!==3||(re=Q+R),Fe!==O||S!==0&&Fe.nodeType!==3||(he=Q+S),Fe.nodeType===3&&(Q+=Fe.nodeValue.length),(Ae=Fe.firstChild)!==null;)Ce=Fe,Fe=Ae;for(;;){if(Fe===c)break t;if(Ce===g&&++Se===R&&(re=Q),Ce===O&&++Le===S&&(he=Q),(Ae=Fe.nextSibling)!==null)break;Fe=Ce,Ce=Fe.parentNode}Fe=Ae}g=re===-1||he===-1?null:{start:re,end:he}}else g=null}g=g||{start:0,end:0}}else g=null;for(o2={focusedElem:c,selectionRange:g},Ng=!1,Ns=d;Ns!==null;)if(d=Ns,c=d.child,(d.subtreeFlags&1028)!==0&&c!==null)c.return=d,Ns=c;else for(;Ns!==null;){switch(d=Ns,O=d.alternate,c=d.flags,d.tag){case 0:if((c&4)!==0&&(c=d.updateQueue,c=c!==null?c.events:null,c!==null))for(g=0;g title"))),Ds(O,S,g),O[un]=c,sr(O),S=O;break e;case"link":var Q=l9("link","href",R).get(S+(g.href||""));if(Q){for(var re=0;retr&&(Q=tr,tr=qt,qt=Q);var xe=wo(re,qt),me=wo(re,tr);if(xe&&me&&(Ae.rangeCount!==1||Ae.anchorNode!==xe.node||Ae.anchorOffset!==xe.offset||Ae.focusNode!==me.node||Ae.focusOffset!==me.offset)){var ke=Fe.createRange();ke.setStart(xe.node,xe.offset),Ae.removeAllRanges(),qt>tr?(Ae.addRange(ke),Ae.extend(me.node,me.offset)):(ke.setEnd(me.node,me.offset),Ae.addRange(ke))}}}}for(Fe=[],Ae=re;Ae=Ae.parentNode;)Ae.nodeType===1&&Fe.push({element:Ae,left:Ae.scrollLeft,top:Ae.scrollTop});for(typeof re.focus=="function"&&re.focus(),re=0;reg?32:g,H.T=null,g=Vx,Vx=null;var O=Lc,Q=zl;if(hs=0,Ff=Lc=null,zl=0,(In&6)!==0)throw Error(r(331));var re=In;if(In|=4,d8(O.current),u8(O,O.current,Q,g),In=re,lp(0,!1),Tt&&typeof Tt.onPostCommitFiberRoot=="function")try{Tt.onPostCommitFiberRoot(wt,O)}catch{}return!0}finally{Y.p=R,H.T=S,A8(c,d)}}function M8(c,d,g){d=ga(g,d),d=Cx(c.stateNode,d,2),c=jc(c,d,2),c!==null&&(fn(c,2),Eo(c))}function Xn(c,d,g){if(c.tag===3)M8(c,c,g);else for(;d!==null;){if(d.tag===3){M8(d,c,g);break}else if(d.tag===1){var S=d.stateNode;if(typeof d.type.getDerivedStateFromError=="function"||typeof S.componentDidCatch=="function"&&(Dc===null||!Dc.has(S))){c=ga(g,c),g=OC(2),S=jc(d,g,2),S!==null&&(DC(g,S,d,c),fn(S,2),Eo(S));break}}d=d.return}}function Xx(c,d,g){var S=c.pingCache;if(S===null){S=c.pingCache=new WU;var R=new Set;S.set(d,R)}else R=S.get(d),R===void 0&&(R=new Set,S.set(d,R));R.has(g)||(Hx=!0,R.add(g),c=JU.bind(null,c,d,g),d.then(c,c))}function JU(c,d,g){var S=c.pingCache;S!==null&&S.delete(d),c.pingedLanes|=c.suspendedLanes&g,c.warmLanes&=~g,ar===c&&(wn&g)===g&&(Pr===4||Pr===3&&(wn&62914560)===wn&&300>we()-cg?(In&2)===0&&Hf(c,0):qx|=g,Pf===wn&&(Pf=0)),Eo(c)}function O8(c,d){d===0&&(d=cn()),c=qu(c,d),c!==null&&(fn(c,d),Eo(c))}function eG(c){var d=c.memoizedState,g=0;d!==null&&(g=d.retryLane),O8(c,g)}function tG(c,d){var g=0;switch(c.tag){case 31:case 13:var S=c.stateNode,R=c.memoizedState;R!==null&&(g=R.retryLane);break;case 19:S=c.stateNode;break;case 22:S=c.stateNode._retryCache;break;default:throw Error(r(314))}S!==null&&S.delete(d),O8(c,g)}function nG(c,d){return Vt(c,d)}var mg=null,Uf=null,Yx=!1,gg=!1,Zx=!1,$c=0;function Eo(c){c!==Uf&&c.next===null&&(Uf===null?mg=Uf=c:Uf=Uf.next=c),gg=!0,Yx||(Yx=!0,sG())}function lp(c,d){if(!Zx&&gg){Zx=!0;do for(var g=!1,S=mg;S!==null;){if(c!==0){var R=S.pendingLanes;if(R===0)var O=0;else{var Q=S.suspendedLanes,re=S.pingedLanes;O=(1<<31-tn(42|c)+1)-1,O&=R&~(Q&~re),O=O&201326741?O&201326741|1:O?O|2:0}O!==0&&(g=!0,$8(S,O))}else O=wn,O=Xr(S,S===ar?O:0,S.cancelPendingCommit!==null||S.timeoutHandle!==-1),(O&3)===0||zr(S,O)||(g=!0,$8(S,O));S=S.next}while(g);Zx=!1}}function rG(){D8()}function D8(){gg=Yx=!1;var c=0;$c!==0&&hG()&&(c=$c);for(var d=we(),g=null,S=mg;S!==null;){var R=S.next,O=L8(S,d);O===0?(S.next=null,g===null?mg=R:g.next=R,R===null&&(Uf=g)):(g=S,(c!==0||(O&3)!==0)&&(gg=!0)),S=R}hs!==0&&hs!==5||lp(c),$c!==0&&($c=0)}function L8(c,d){for(var g=c.suspendedLanes,S=c.pingedLanes,R=c.expirationTimes,O=c.pendingLanes&-62914561;0re)break;var Le=he.transferSize,Fe=he.initiatorType;Le&&V8(Fe)&&(he=he.responseEnd,Q+=Le*(he"u"?null:document;function s9(c,d,g){var S=Gf;if(S&&typeof d=="string"&&d){var R=vr(d);R='link[rel="'+c+'"][href="'+R+'"]',typeof g=="string"&&(R+='[crossorigin="'+g+'"]'),r9.has(R)||(r9.add(R),c={rel:c,crossOrigin:g,href:d},S.querySelector(R)===null&&(d=S.createElement("link"),Ds(d,"link",c),sr(d),S.head.appendChild(d)))}}function kG(c){jl.D(c),s9("dns-prefetch",c,null)}function SG(c,d){jl.C(c,d),s9("preconnect",c,d)}function CG(c,d,g){jl.L(c,d,g);var S=Gf;if(S&&c&&d){var R='link[rel="preload"][as="'+vr(d)+'"]';d==="image"&&g&&g.imageSrcSet?(R+='[imagesrcset="'+vr(g.imageSrcSet)+'"]',typeof g.imageSizes=="string"&&(R+='[imagesizes="'+vr(g.imageSizes)+'"]')):R+='[href="'+vr(c)+'"]';var O=R;switch(d){case"style":O=Vf(c);break;case"script":O=Kf(c)}ka.has(O)||(c=_({rel:"preload",href:d==="image"&&g&&g.imageSrcSet?void 0:c,as:d},g),ka.set(O,c),S.querySelector(R)!==null||d==="style"&&S.querySelector(fp(O))||d==="script"&&S.querySelector(dp(O))||(d=S.createElement("link"),Ds(d,"link",c),sr(d),S.head.appendChild(d)))}}function EG(c,d){jl.m(c,d);var g=Gf;if(g&&c){var S=d&&typeof d.as=="string"?d.as:"script",R='link[rel="modulepreload"][as="'+vr(S)+'"][href="'+vr(c)+'"]',O=R;switch(S){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":O=Kf(c)}if(!ka.has(O)&&(c=_({rel:"modulepreload",href:c},d),ka.set(O,c),g.querySelector(R)===null)){switch(S){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":if(g.querySelector(dp(O)))return}S=g.createElement("link"),Ds(S,"link",c),sr(S),g.head.appendChild(S)}}}function NG(c,d,g){jl.S(c,d,g);var S=Gf;if(S&&c){var R=Zs(S).hoistableStyles,O=Vf(c);d=d||"default";var Q=R.get(O);if(!Q){var re={loading:0,preload:null};if(Q=S.querySelector(fp(O)))re.loading=5;else{c=_({rel:"stylesheet",href:c,"data-precedence":d},g),(g=ka.get(O))&&h2(c,g);var he=Q=S.createElement("link");sr(he),Ds(he,"link",c),he._p=new Promise(function(Se,Le){he.onload=Se,he.onerror=Le}),he.addEventListener("load",function(){re.loading|=1}),he.addEventListener("error",function(){re.loading|=2}),re.loading|=4,wg(Q,d,S)}Q={type:"stylesheet",instance:Q,count:1,state:re},R.set(O,Q)}}}function zG(c,d){jl.X(c,d);var g=Gf;if(g&&c){var S=Zs(g).hoistableScripts,R=Kf(c),O=S.get(R);O||(O=g.querySelector(dp(R)),O||(c=_({src:c,async:!0},d),(d=ka.get(R))&&p2(c,d),O=g.createElement("script"),sr(O),Ds(O,"link",c),g.head.appendChild(O)),O={type:"script",instance:O,count:1,state:null},S.set(R,O))}}function jG(c,d){jl.M(c,d);var g=Gf;if(g&&c){var S=Zs(g).hoistableScripts,R=Kf(c),O=S.get(R);O||(O=g.querySelector(dp(R)),O||(c=_({src:c,async:!0,type:"module"},d),(d=ka.get(R))&&p2(c,d),O=g.createElement("script"),sr(O),Ds(O,"link",c),g.head.appendChild(O)),O={type:"script",instance:O,count:1,state:null},S.set(R,O))}}function i9(c,d,g,S){var R=(R=ae.current)?xg(R):null;if(!R)throw Error(r(446));switch(c){case"meta":case"title":return null;case"style":return typeof g.precedence=="string"&&typeof g.href=="string"?(d=Vf(g.href),g=Zs(R).hoistableStyles,S=g.get(d),S||(S={type:"style",instance:null,count:0,state:null},g.set(d,S)),S):{type:"void",instance:null,count:0,state:null};case"link":if(g.rel==="stylesheet"&&typeof g.href=="string"&&typeof g.precedence=="string"){c=Vf(g.href);var O=Zs(R).hoistableStyles,Q=O.get(c);if(Q||(R=R.ownerDocument||R,Q={type:"stylesheet",instance:null,count:0,state:{loading:0,preload:null}},O.set(c,Q),(O=R.querySelector(fp(c)))&&!O._p&&(Q.instance=O,Q.state.loading=5),ka.has(c)||(g={rel:"preload",as:"style",href:g.href,crossOrigin:g.crossOrigin,integrity:g.integrity,media:g.media,hrefLang:g.hrefLang,referrerPolicy:g.referrerPolicy},ka.set(c,g),O||TG(R,c,g,Q.state))),d&&S===null)throw Error(r(528,""));return Q}if(d&&S!==null)throw Error(r(529,""));return null;case"script":return d=g.async,g=g.src,typeof g=="string"&&d&&typeof d!="function"&&typeof d!="symbol"?(d=Kf(g),g=Zs(R).hoistableScripts,S=g.get(d),S||(S={type:"script",instance:null,count:0,state:null},g.set(d,S)),S):{type:"void",instance:null,count:0,state:null};default:throw Error(r(444,c))}}function Vf(c){return'href="'+vr(c)+'"'}function fp(c){return'link[rel="stylesheet"]['+c+"]"}function a9(c){return _({},c,{"data-precedence":c.precedence,precedence:null})}function TG(c,d,g,S){c.querySelector('link[rel="preload"][as="style"]['+d+"]")?S.loading=1:(d=c.createElement("link"),S.preload=d,d.addEventListener("load",function(){return S.loading|=1}),d.addEventListener("error",function(){return S.loading|=2}),Ds(d,"link",g),sr(d),c.head.appendChild(d))}function Kf(c){return'[src="'+vr(c)+'"]'}function dp(c){return"script[async]"+c}function o9(c,d,g){if(d.count++,d.instance===null)switch(d.type){case"style":var S=c.querySelector('style[data-href~="'+vr(g.href)+'"]');if(S)return d.instance=S,sr(S),S;var R=_({},g,{"data-href":g.href,"data-precedence":g.precedence,href:null,precedence:null});return S=(c.ownerDocument||c).createElement("style"),sr(S),Ds(S,"style",R),wg(S,g.precedence,c),d.instance=S;case"stylesheet":R=Vf(g.href);var O=c.querySelector(fp(R));if(O)return d.state.loading|=4,d.instance=O,sr(O),O;S=a9(g),(R=ka.get(R))&&h2(S,R),O=(c.ownerDocument||c).createElement("link"),sr(O);var Q=O;return Q._p=new Promise(function(re,he){Q.onload=re,Q.onerror=he}),Ds(O,"link",S),d.state.loading|=4,wg(O,g.precedence,c),d.instance=O;case"script":return O=Kf(g.src),(R=c.querySelector(dp(O)))?(d.instance=R,sr(R),R):(S=g,(R=ka.get(O))&&(S=_({},g),p2(S,R)),c=c.ownerDocument||c,R=c.createElement("script"),sr(R),Ds(R,"link",S),c.head.appendChild(R),d.instance=R);case"void":return null;default:throw Error(r(443,d.type))}else d.type==="stylesheet"&&(d.state.loading&4)===0&&(S=d.instance,d.state.loading|=4,wg(S,g.precedence,c));return d.instance}function wg(c,d,g){for(var S=g.querySelectorAll('link[rel="stylesheet"][data-precedence],style[data-precedence]'),R=S.length?S[S.length-1]:null,O=R,Q=0;Q title"):null)}function AG(c,d,g){if(g===1||d.itemProp!=null)return!1;switch(c){case"meta":case"title":return!0;case"style":if(typeof d.precedence!="string"||typeof d.href!="string"||d.href==="")break;return!0;case"link":if(typeof d.rel!="string"||typeof d.href!="string"||d.href===""||d.onLoad||d.onError)break;switch(d.rel){case"stylesheet":return c=d.disabled,typeof d.precedence=="string"&&c==null;default:return!0}case"script":if(d.async&&typeof d.async!="function"&&typeof d.async!="symbol"&&!d.onLoad&&!d.onError&&d.src&&typeof d.src=="string")return!0}return!1}function u9(c){return!(c.type==="stylesheet"&&(c.state.loading&3)===0)}function RG(c,d,g,S){if(g.type==="stylesheet"&&(typeof S.media!="string"||matchMedia(S.media).matches!==!1)&&(g.state.loading&4)===0){if(g.instance===null){var R=Vf(S.href),O=d.querySelector(fp(R));if(O){d=O._p,d!==null&&typeof d=="object"&&typeof d.then=="function"&&(c.count++,c=Sg.bind(c),d.then(c,c)),g.state.loading|=4,g.instance=O,sr(O);return}O=d.ownerDocument||d,S=a9(S),(R=ka.get(R))&&h2(S,R),O=O.createElement("link"),sr(O);var Q=O;Q._p=new Promise(function(re,he){Q.onload=re,Q.onerror=he}),Ds(O,"link",S),g.instance=O}c.stylesheets===null&&(c.stylesheets=new Map),c.stylesheets.set(g,d),(d=g.state.preload)&&(g.state.loading&3)===0&&(c.count++,g=Sg.bind(c),d.addEventListener("load",g),d.addEventListener("error",g))}}var m2=0;function MG(c,d){return c.stylesheets&&c.count===0&&Eg(c,c.stylesheets),0m2?50:800)+d);return c.unsuspend=g,function(){c.unsuspend=null,clearTimeout(S),clearTimeout(R)}}:null}function Sg(){if(this.count--,this.count===0&&(this.imgCount===0||!this.waitingForImages)){if(this.stylesheets)Eg(this,this.stylesheets);else if(this.unsuspend){var c=this.unsuspend;this.unsuspend=null,c()}}}var Cg=null;function Eg(c,d){c.stylesheets=null,c.unsuspend!==null&&(c.count++,Cg=new Map,d.forEach(OG,c),Cg=null,Sg.call(c))}function OG(c,d){if(!(d.state.loading&4)){var g=Cg.get(c);if(g)var S=g.get(null);else{g=new Map,Cg.set(c,g);for(var R=c.querySelectorAll("link[data-precedence],style[data-precedence]"),O=0;O"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(e)}catch(n){console.error(n)}}return e(),E2.exports=RV(),E2.exports}var OV=MV();const DV=!1;var cO=A.useLayoutEffect;function LV(e,n,t){A.useEffect(()=>{if(!e.current||t||typeof IntersectionObserver!="function")return()=>n();const r=new IntersectionObserver(s=>{n(s.pop())},{rootMargin:"100px"});return r.observe(e.current),()=>{r.disconnect(),n()}},[n,t,e])}function IV(e){const n=A.useRef(null);return A.useImperativeHandle(e,()=>n.current,[]),n}function l0(e){return e[e.length-1]}function Kd(e,n){return typeof e=="function"?e(n):e}const uO=Object.prototype.hasOwnProperty,$V=Object.prototype.propertyIsEnumerable;function _O(e){for(const n in e)if(uO.call(e,n))return!0;return!1}const BV=()=>Object.create(null),n_=(e,n)=>p_(e,n,BV);function p_(e,n,t=()=>({}),r=0){if(e===n)return e;if(r>500)return n;const s=n,i=Q9(e)&&Q9(s);if(!i&&!(iv(e)&&iv(s)))return s;const a=i?e:K9(e);if(!a)return s;const o=i?s:K9(s);if(!o)return s;const l=a.length,u=o.length,h=i?new Array(u):t();let _=0;for(let p=0;p"u")return!0;const t=n.prototype;return!(!W9(t)||!t.hasOwnProperty("isPrototypeOf"))}function W9(e){return Object.prototype.toString.call(e)==="[object Object]"}function Q9(e){return Array.isArray(e)&&e.length===Object.keys(e).length}function du(e,n,t){if(e===n)return!0;if(typeof e!=typeof n)return!1;if(Array.isArray(e)&&Array.isArray(n)){if(e.length!==n.length)return!1;for(let r=0,s=e.length;rs||!du(e[a],n[a],t)))return!1;return s===i}return!1}const PV=/[\x00-\x1f\x7f"<>`{}]/g;function FV(e){return e.replace(PV,n=>"%"+n.charCodeAt(0).toString(16).toUpperCase().padStart(2,"0"))}function X9(e){let n;try{n=decodeURI(e)}catch{n=e.replaceAll(/%[0-9A-F]{2}/gi,t=>{try{return decodeURI(t)}catch{return t}})}return FV(n)}const HV=["http:","https:","mailto:","tel:"];function av(e,n){if(!e)return!1;try{const t=new URL(e);return!n.has(t.protocol)}catch{return!1}}function xp(e){if(!e)return{path:e,handledProtocolRelativeURL:!1};if(!/[%\\\x00-\x1f\x7f]/.test(e)&&!e.startsWith("//"))return{path:e,handledProtocolRelativeURL:!1};const n=/%25|%5C/gi;let t=0,r="",s;for(;(s=n.exec(e))!==null;)r+=X9(e.slice(t,s.index))+s[0],t=n.lastIndex;r=r+X9(t?e.slice(t):e);let i=!1;return r.startsWith("//")&&(i=!0,r="/"+r.replace(/^\/+/,"")),{path:r,handledProtocolRelativeURL:i}}function qV(e){return/\s|[^\u0000-\u007F]/.test(e)?e.replace(/\s|[^\u0000-\u007F]/gu,encodeURIComponent):e}function UV(e,n){if(e===n)return!0;if(e.length!==n.length)return!1;for(let t=0;t{i.next&&(i.prev?(i.prev.next=i.next,i.next.prev=i.prev,i.next=void 0,r&&(r.next=i,i.prev=r)):(i.next.prev=void 0,t=i.next,i.next=void 0,r&&(i.prev=r,r.next=i)),r=i)};return{get(i){const a=n.get(i);if(a)return s(a),a.value},set(i,a){if(n.size>=e&&t){const l=t;n.delete(l.key),l.next&&(t=l.next,l.next.prev=void 0),l===r&&(r=void 0)}const o=n.get(i);if(o)o.value=a,s(o);else{const l={key:i,value:a,prev:r};r&&(r.next=l),r=l,t||(t=l),n.set(i,l)}},clear(){n.clear(),t=void 0,r=void 0}}}const uu=4,fO=5;function dO(e,n,t=new Uint16Array(6)){const r=e.indexOf("/",n),s=r===-1?e.length:r,i=e.substring(n,s);if(!i||!i.includes("$"))return t[0]=0,t[1]=n,t[2]=n,t[3]=s,t[4]=s,t[5]=s,t;if(i==="$"){const l=e.length;return t[0]=2,t[1]=n,t[2]=n,t[3]=l,t[4]=l,t[5]=l,t}if(i.charCodeAt(0)===36)return t[0]=1,t[1]=n,t[2]=n+1,t[3]=s,t[4]=s,t[5]=s,t;const a=i.indexOf("{");let o;if(a!==-1&&a+1!I.parse&&I.caseSensitive===j&&I.prefix===E&&I.suffix===T));if(D)w=D;else{const I=GV(N,_,j,E,T);w=I,I.parent=s,I.depth=i;let P;N===1?P=s.dynamic??(s.dynamic=[]):N===3?P=s.optional??(s.optional=[]):P=s.wildcard??(s.wildcard=[]),P.push(I),P.length===2&&(a==null||a.push(P))}break}}s=w}if(k&&t.children&&!t.isRoot&&t.id&&t.id.charCodeAt(t.id.lastIndexOf("/")+1)===95){const b=pd(_);b.kind=fO,b.parent=s,i++,b.depth=i,s.pathless??(s.pathless=[]),s.pathless.push(b),s=b}const v=(t.path||!t.children)&&!t.isRoot;if(v&&_.endsWith("/")){const b=pd(_);b.kind=uu,b.parent=s,i++,b.depth=i,s.index=b,s=b}s.parse=k??null,s.priority=((h=p==null?void 0:p.params)==null?void 0:h.priority)??0,v&&!s.route&&(s.route=t,s.fullPath=_)}if(t.children)for(const _ of t.children)ub(e,n,_,l,s,i,a,o)}function hO(e,n){if(e.parse&&!n.parse)return-1;if(!e.parse&&n.parse)return 1;if(e.parse&&n.parse&&(e.priority||n.priority))return n.priority-e.priority;if(e.prefix&&n.prefix&&e.prefix!==n.prefix){if(e.prefix.startsWith(n.prefix))return-1;if(n.prefix.startsWith(e.prefix))return 1}if(e.suffix&&n.suffix&&e.suffix!==n.suffix){if(e.suffix.endsWith(n.suffix))return-1;if(n.suffix.endsWith(e.suffix))return 1}return e.prefix&&!n.prefix?-1:!e.prefix&&n.prefix?1:e.suffix&&!n.suffix?-1:!e.suffix&&n.suffix?1:e.caseSensitive&&!n.caseSensitive?-1:!e.caseSensitive&&n.caseSensitive?1:0}function pd(e){return{kind:0,depth:0,pathless:null,index:null,static:null,staticInsensitive:null,dynamic:null,optional:null,wildcard:null,route:null,fullPath:e,parent:null,parse:null,priority:0}}function GV(e,n,t,r,s){return{kind:e,depth:0,pathless:null,index:null,static:null,staticInsensitive:null,dynamic:null,optional:null,wildcard:null,route:null,fullPath:n,parent:null,parse:null,priority:0,caseSensitive:t,prefix:r,suffix:s}}function VV(e,n){const t=pd("/"),r=new Uint16Array(6),s=[];for(const i of e)ub(!1,r,i,1,t,0,s);for(const i of s)i.sort(hO);n.masksTree=t,n.flatCache=ov(1e3)}function KV(e,n){e||(e="/");const t=n.flatCache.get(e);if(t!==void 0)return t;const r=gk(e,n.masksTree);return n.flatCache.set(e,r),r}function WV(e,n,t,r,s){e||(e="/"),r||(r="/");const i=n?`case\0${e}`:e;let a=s.singleCache.get(i);return a||(a=pd("/"),ub(n,new Uint16Array(6),{from:e},1,a,0),s.singleCache.set(i,a)),gk(r,a,t)}function QV(e,n,t=!1){const r=t?e:`nofuzz\0${e}`,s=n.matchCache.get(r);if(s!==void 0)return s;e||(e="/");let i;try{i=gk(e,n.segmentTree,t)}catch(a){if(a instanceof URIError)i=null;else throw a}return i&&(i.branch=mO(i.route)),n.matchCache.set(r,i),i}function XV(e){return e==="/"?e:e.replace(/\/{1,}$/,"")}function YV(e,n=!1,t){const r=pd(e.fullPath),s=new Uint16Array(6),i=[],a={},o={};let l=0;ub(n,s,e,1,r,0,i,u=>{if(t==null||t(u,l),u.id in a&&mk(),a[u.id]=u,l!==0&&u.path){const h=XV(u.fullPath);(!o[h]||u.fullPath.endsWith("/"))&&(o[h]=u)}l++});for(const u of i)u.sort(hO);return{processedTree:{segmentTree:r,singleCache:ov(1e3),matchCache:ov(1e3),flatCache:null,masksTree:null},routesById:a,routesByPath:o}}function gk(e,n,t=!1){const r=e.split("/"),s=JV(e,r,n,t);if(!s)return null;const[i]=pO(e,r,s);return{route:s.node.route,rawParams:i}}function pO(e,n,t){var h,_,p,m;const r=ZV(t.node);let s=null;const i=Object.create(null);let a=((h=t.extract)==null?void 0:h.part)??0,o=((_=t.extract)==null?void 0:_.node)??0,l=((p=t.extract)==null?void 0:p.path)??0,u=((m=t.extract)==null?void 0:m.segment)??0;for(;o=0;E--){const T=_.wildcard[E],{prefix:j,suffix:M}=T;if(!(j&&(y||!(T.caseSensitive?C:N??(N=C.toLowerCase())).startsWith(j)))){if(M){if(y)continue;const D=n.slice(p).join("/"),I=D.slice(-M.length);if((T.caseSensitive?I:I.toLowerCase())!==M||D.length-M.length=0;T--){const j=_.optional[T];o.push({node:j,index:p,skipped:E,statics:x,dynamics:k,optionals:v,extract:b,rawParams:w})}if(!y)for(let T=_.optional.length-1;T>=0;T--){const j=_.optional[T],{prefix:M,suffix:D}=j;if(M||D){const I=j.caseSensitive?C:N??(N=C.toLowerCase());if(M&&!I.startsWith(M)||D&&I.indexOf(D,I.length-D.length)=0;E--){const T=_.dynamic[E],{prefix:j,suffix:M}=T;if(j||M){const D=T.caseSensitive?C:N??(N=C.toLowerCase());if(j&&!D.startsWith(j)||M&&D.indexOf(M,D.length-M.length)=0;E--){const T=_.pathless[E];o.push({node:T,index:p,skipped:m,statics:x,dynamics:k,optionals:v,extract:b,rawParams:w})}}if(u)return u;if(r&&l){let h=l.index;for(let p=0;pe.statics||n.statics===e.statics&&(n.dynamics>e.dynamics||n.dynamics===e.dynamics&&(n.optionals>e.optionals||n.optionals===e.optionals&&((n.node.kind===uu)>(e.node.kind===uu)||n.node.kind===uu==(e.node.kind===uu)&&n.node.depth>e.node.depth))):!0}function A1(e){return R1(e.filter(n=>n!==void 0).join("/"))}function R1(e){return e.replace(/\/{2,}/g,"/")}function gO(e){return e==="/"?e:e.replace(/^\/{1,}/,"")}function Gl(e){const n=e.length;return n>1&&e[n-1]==="/"?e.replace(/\/{1,}$/,""):e}function vO(e){return Gl(gO(e))}function lv(e,n){return e!=null&&e.endsWith("/")&&e!=="/"&&e!==`${n}/`?e.slice(0,-1):e}function tK(e,n,t){return lv(e,t)===lv(n,t)}function nK({base:e,to:n,trailingSlash:t="never",cache:r}){if(n.includes("//")&&(n=R1(n)),n.startsWith("/"))return n.length===1||t==="preserve"?n:t==="always"?n.endsWith("/")?n:`${n}/`:n.endsWith("/")?n.slice(0,-1):n;const s=n===".";let i;if(r){i=s?e:e+"\0"+n;const u=r.get(i);if(u)return u}let a;if(s)a=e.split("/");else{for(e.includes("//")&&(e=R1(e)),a=e.split("/");a.length>1&&l0(a)==="";)a.pop();const u=n.split("/");for(let h=0,_=u.length;h<_;h++){const p=u[h];p===""?h?h===_-1&&a.push(p):a=[p]:p===".."?a.length>1?a.pop():a=[""]:p==="."||a.push(p)}}a.length>1&&(l0(a)===""?t==="never"&&a.pop():t==="always"&&a.push(""));const o=a.join("/"),l=(s?R1(o):o)||"/";return i&&r&&r.set(i,l),l}function rK(e){const n=new Map(e.map(s=>[encodeURIComponent(s),s])),t=Array.from(n.keys()).map(s=>s.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")).join("|"),r=new RegExp(t,"g");return s=>s.replace(r,i=>n.get(i)??i)}function T2(e,n,t){const r=n[e];return typeof r!="string"?r:e==="_splat"?/^[a-zA-Z0-9\-._~!/]*$/.test(r)?r:r.split("/").map(s=>J9(s,t)).join("/"):J9(r,t)}function Z9({path:e,params:n,decoder:t,...r}){let s=!1;const i=Object.create(null);if(!e||e==="/")return{interpolatedPath:"/",usedParams:i,isMissingParams:s};if(!e.includes("$"))return{interpolatedPath:e,usedParams:i,isMissingParams:s};const a=e.length;let o=0,l,u="";for(;oe.state.__TSR_key||e.href;function uK(e){const n=e.getAttribute(eE);if(n)return`[${eE}="${n}"]`;let t="",r=e,s;for(;s=r.parentNode;){let i=1,a=r;for(;a=a.previousElementSibling;)i++;const o=`${r.localName}:nth-child(${i})`;t=t?`${o} > ${t}`:o,r=s}return t}let Ig=!1;const M1="window";function F4(e){try{return typeof e=="function"?e():document.querySelector(e)}catch{}}function tE(e){const n=new Set;for(const t of e){if(t===M1)continue;const r=F4(t);r&&n.add(r)}return n}function _K(e,n){const t=e.options.scrollRestoration,r=e._scroll;t&&(r.restoring=!0);const s=e.options.getScrollRestorationKey||cK,i=new Set,a=o=>{const l=Zc[o]||(Zc[o]={});for(const u of i)u===document?l[M1]={scrollX,scrollY}:u.isConnected&&(l[uK(u)]={scrollX:u.scrollLeft,scrollY:u.scrollTop})};t&&!r.restoration&&(r.restoration=!0,Ig=!1,history.scrollRestoration="manual",document.addEventListener("scroll",o=>{Ig||i.add(o.target)},!0),e.subscribe("onBeforeLoad",o=>{o.fromLocation&&a(s(o.fromLocation)),i.clear()}),addEventListener("pagehide",()=>{a(s(e.stores.resolvedLocation.get()??e.stores.location.get())),lK()})),!r.reset&&(r.reset=!0,e.subscribe("onRendered",o=>{var k;const l=e.options.scrollRestorationBehavior,u=e.options.scrollToTopSelectors,h=r.next,_=r.hash;let p;if(i.clear(),r.next=!0,r.hash=!1,typeof e.options.scrollRestoration=="function"&&!e.options.scrollRestoration({location:e.latestLocation}))return;const m=s(o.toLocation),x=o.fromLocation&&s(o.fromLocation);if(r.restoring&&x&&x!==m){const v=Zc[x];if(v){let b=Zc[m];for(const w in v){if(w===M1){if(h)continue}else{const y=F4(w);if(!y||h&&u&&(p??(p=tE(u)),p.has(y)))continue}b||(b=Zc[m]={}),b[w]??(b[w]=v[w])}}}Ig=!0;try{const v=o.toLocation.hash,b=o.toLocation.state.__hashScrollIntoViewOptions??!0;let w=!1;if(h){!v&&u&&(p??(p=tE(u)));const y=v&&b&&_,C=r.restoring?Zc[m]:void 0;if(C)for(const N in C){const{scrollX:E,scrollY:T}=C[N];if(N===M1){if(y)continue;scrollTo({top:T,left:E,behavior:l}),w=!0}else{const j=F4(N);j&&(j.scrollLeft=E,j.scrollTop=T,p==null||p.delete(j))}}if(!v){const N={top:0,left:0,behavior:l};if(w||scrollTo(N),p)for(const E of p)E.scrollTo(N)}}!w&&v&&b&&((k=document.getElementById(v))==null||k.scrollIntoView(b))}finally{Ig=!1}}))}function fK(e,n=String){const t=new URLSearchParams;for(const r in e){const s=e[r];s!==void 0&&t.set(r,n(s))}return t.toString()}function A2(e){return e?e==="false"?!1:e==="true"?!0:+e*0===0&&+e+""===e?+e:e:""}function dK(e){const n=new URLSearchParams(e),t=Object.create(null);for(const[r,s]of n.entries()){const i=t[r];i==null?t[r]=A2(s):Array.isArray(i)?i.push(A2(s)):t[r]=[i,A2(s)]}return t}const hK=/^(?:\s|["[{\d-]|fa|nu|tr)/,pK=gK(JSON.parse),mK=vK(JSON.stringify,JSON.parse);function gK(e){return n=>{n[0]==="?"&&(n=n.substring(1));const t=dK(n);for(const r in t){const s=t[r];if(typeof s=="string")try{t[r]=e(s)}catch{}}return t}}function vK(e,n){const t=n===JSON.parse;function r(s){if(s&&typeof s=="object")try{return e(s)}catch{}else if(n&&typeof s=="string"){if(t&&!hK.test(s))return s;try{return n(s),e(s)}catch{}}return s}return s=>{const i=fK(s,r);return i?`?${i}`:""}}const gd="__root__";function bK(e){if(e.statusCode=e.statusCode||e.code||307,!e.reloadDocument&&typeof e.href=="string")try{new URL(e.href),e.reloadDocument=!0}catch{}const n=new Headers(e.headers);e.href&&n.get("Location")===null&&n.set("Location",e.href);const t=new Response(null,{status:e.statusCode,headers:n});if(t.options=e,e.throw)throw t;return t}function bO(e){return e instanceof Response&&!!e.options}function yK(e){return{input:({url:n})=>{for(const t of e)n=H4(t,n);return n},output:({url:n})=>{for(let t=e.length-1;t>=0;t--)n=yO(e[t],n);return n}}}function xK(e){const n=vO(e.basepath),t=`/${n}`,r=e.caseSensitive?t:t.toLowerCase(),s=`${r}/`;return{input:({url:i})=>{const a=e.caseSensitive?i.pathname:i.pathname.toLowerCase();return a===r?i.pathname="/":a.startsWith(s)&&(i.pathname=i.pathname.slice(t.length)),i},output:({url:i})=>(i.pathname=A1(["/",n,i.pathname]),i)}}function H4(e,n){var r;const t=(r=e==null?void 0:e.input)==null?void 0:r.call(e,{url:n});if(t){if(typeof t=="string")return new URL(t);if(t instanceof URL)return t}return n}function yO(e,n){var r;const t=(r=e==null?void 0:e.output)==null?void 0:r.call(e,{url:n});if(t){if(typeof t=="string")return new URL(t);if(t instanceof URL)return t}return n}function wK(e,n){const{createMutableStore:t,createReadonlyStore:r,batch:s}=n,i=new Map,a=t("idle"),o=t(e),l=t(void 0),u=t([]),h=r(()=>u.get().map(k=>i.get(k).get())),_=r(()=>({status:a.get(),isLoading:a.get()==="pending",matches:h.get(),location:o.get(),resolvedLocation:l.get()}));function p(k){let v=i.get(k);return v||(v=t(void 0),i.set(k,v)),v}const m={status:a,location:o,resolvedLocation:l,ids:u,matches:h,byRoute:i,__store:_,getMatchStore:p,setMatches:x};function x(k){const v=u.get(),b=k.map(w=>w.routeId);s(()=>{UV(v,b)||u.set(b);for(const w of v)b.includes(w)||i.get(w).set(()=>{});for(const w of k){const y=p(w.routeId);y.get()!==w&&y.set(w)}})}return m}var hu="__TSR_index",nE="popstate",rE="beforeunload";function kK(e){let n=e.getLocation();const t=new Set,r=a=>{n=e.getLocation(),t.forEach(o=>o({location:n,action:a}))},s=a=>{e.notifyOnIndexChange??!0?r(a):n=e.getLocation()},i=async({task:a,navigateOpts:o,...l})=>{var _,p;if((o==null?void 0:o.ignoreBlocker)??!1){a();return}const u=((_=e.getBlockers)==null?void 0:_.call(e))??[],h=l.type==="PUSH"||l.type==="REPLACE";if(typeof document<"u"&&u.length&&h)for(const m of u){const x=cv(l.path,l.state);if(await m.blockerFn({currentLocation:n,nextLocation:x,action:l.type})){(p=e.onBlocked)==null||p.call(e);return}}a()};return{get location(){return n},get length(){return e.getLength()},subscribers:t,subscribe:a=>(t.add(a),()=>{t.delete(a)}),push:(a,o,l)=>{const u=n.state[hu];o=sE(u+1,o),i({task:()=>{e.pushState(a,o),r({type:"PUSH"})},navigateOpts:l,type:"PUSH",path:a,state:o})},replace:(a,o,l)=>{const u=n.state[hu];o=sE(u,o),i({task:()=>{e.replaceState(a,o),r({type:"REPLACE"})},navigateOpts:l,type:"REPLACE",path:a,state:o})},go:(a,o)=>{i({task:()=>{e.go(a),s({type:"GO",index:a})},navigateOpts:o,type:"GO"})},back:a=>{i({task:()=>{e.back((a==null?void 0:a.ignoreBlocker)??!1),s({type:"BACK"})},navigateOpts:a,type:"BACK"})},forward:a=>{i({task:()=>{e.forward((a==null?void 0:a.ignoreBlocker)??!1),s({type:"FORWARD"})},navigateOpts:a,type:"FORWARD"})},canGoBack:()=>n.state[hu]!==0,createHref:a=>e.createHref(a),block:a=>{var l;if(!e.setBlockers)return()=>{};const o=((l=e.getBlockers)==null?void 0:l.call(e))??[];return e.setBlockers([...o,a]),()=>{var h,_;const u=((h=e.getBlockers)==null?void 0:h.call(e))??[];(_=e.setBlockers)==null||_.call(e,u.filter(p=>p!==a))}},flush:()=>{var a;return(a=e.flush)==null?void 0:a.call(e)},destroy:()=>{var a;return(a=e.destroy)==null?void 0:a.call(e)},notify:r}}function sE(e,n){n||(n={});const t=vk();return{...n,key:t,__TSR_key:t,[hu]:e}}function SK(e){var T,j;const n=typeof document<"u"?window:void 0,t=n.history.pushState,r=n.history.replaceState;let s=[];const i=()=>s,a=M=>s=M,o=(M=>M),l=(()=>cv(`${n.location.pathname}${n.location.search}${n.location.hash}`,n.history.state));if(!((T=n.history.state)!=null&&T.__TSR_key)&&!((j=n.history.state)!=null&&j.key)){const M=vk();n.history.replaceState({[hu]:0,key:M,__TSR_key:M},"")}let u=l(),h,_=!1,p=!1,m=!1,x=!1;const k=()=>u;let v;const b=()=>{v&&(E._ignoreSubscribers=!0,(v[2]?n.history.pushState:n.history.replaceState)(v[1],"",v[0]),E._ignoreSubscribers=!1,v=void 0,h=void 0)},w=(M,D,I)=>{const P=o(D),U=!!v;U||(h=u),u=cv(D,I),v=[P,I,(v==null?void 0:v[2])||M],U||queueMicrotask(()=>b())},y=M=>{u=l(),E.notify({type:M})},C=async()=>{if(p){p=!1;return}const M=l(),D=M.state[hu]-u.state[hu],I=D===1,P=D===-1,U=!I&&!P||_;_=!1;const q=U?"GO":P?"BACK":"FORWARD",W=U?{type:"GO",index:D}:{type:P?"BACK":"FORWARD"};if(m)m=!1;else{const H=i();if(typeof document<"u"&&H.length){for(const Y of H)if(await Y.blockerFn({currentLocation:u,nextLocation:M,action:q})){p=!0,n.history.go(1),E.notify(W);return}}}u=l(),E.notify(W)},N=M=>{if(x){x=!1;return}let D=!1;const I=i();if(typeof document<"u"&&I.length)for(const P of I){const U=P.enableBeforeUnload??!0;if(U===!0){D=!0;break}if(typeof U=="function"&&U()===!0){D=!0;break}}if(D)return M.preventDefault(),M.returnValue=""},E=kK({getLocation:k,getLength:()=>n.history.length,pushState:(M,D)=>w(!0,M,D),replaceState:(M,D)=>w(!1,M,D),back:M=>(M&&(m=!0),x=!0,n.history.back()),forward:M=>{M&&(m=!0),x=!0,n.history.forward()},go:M=>{_=!0,n.history.go(M)},createHref:M=>o(M),flush:b,destroy:()=>{n.history.pushState=t,n.history.replaceState=r,n.removeEventListener(rE,N,{capture:!0}),n.removeEventListener(nE,C)},onBlocked:()=>{h&&u!==h&&(u=h)},getBlockers:i,setBlockers:a,notifyOnIndexChange:!1});return n.addEventListener(rE,N,{capture:!0}),n.addEventListener(nE,C),n.history.pushState=function(...M){const D=t.apply(n.history,M);return E._ignoreSubscribers||y("PUSH"),D},n.history.replaceState=function(...M){const D=r.apply(n.history,M);return E._ignoreSubscribers||y("REPLACE"),D},E}function CK(e){let n=e.replace(/[\x00-\x1f\x7f]/g,"");return n.startsWith("//")&&(n="/"+n.replace(/^\/+/,"")),n}function cv(e,n){const t=CK(e),r=t.indexOf("#"),s=t.indexOf("?"),i=vk();return{href:t,pathname:t.substring(0,r>0?s>0?Math.min(r,s):r:s>0?s:t.length),hash:r>-1?t.substring(r):"",search:s>-1?t.slice(s,r===-1?void 0:r):"",state:n||{[hu]:0,key:i,__TSR_key:i}}}function vk(){return(Math.random()+1).toString(36).substring(7)}function iE(e){var n,t;return e.options.loader||e.options.beforeLoad||e.lazyFn||((n=e.options.component)==null?void 0:n.preload)||((t=e.options.pendingComponent)==null?void 0:t.preload)}function _b(e,n){return{fromLocation:n,toLocation:e,pathChanged:(n==null?void 0:n.pathname)!==e.pathname,hrefChanged:(n==null?void 0:n.href)!==e.href,hashChanged:(n==null?void 0:n.hash)!==e.hash}}function aE({key:e,__TSR_key:n,__TSR_index:t,__hashScrollIntoViewOptions:r,...s}){return s}function EK(e,n,t,r){var s,i,a,o;for(const l of n){if(r&&e._tx!==r)return;t.some(u=>u.routeId===l.routeId)||(i=(s=e.routesById[l.routeId].options).onLeave)==null||i.call(s,l)}for(const l of t){if(r&&e._tx!==r)return;(o=(a=e.routesById[l.routeId].options)[n.some(u=>u.routeId===l.routeId)?"onStay":"onEnter"])==null||o.call(a,l)}}var NK=class{constructor(e,n){this.tempLocationKey=`${Math.round(Math.random()*1e7)}`,this._scroll={next:!0},this.subscribers=new Set,this._cache=new Map,this._committed=[],this.routeBranchCache=new WeakMap,this.lightweightCache=new WeakMap,this.startTransition=async t=>(t(),!1),this.update=t=>{const r=this.options,s=this.basepath??(r==null?void 0:r.basepath)??"/",i=this.basepath===void 0,a=r==null?void 0:r.rewrite;if(this.options={...r,...t},this.isServer=this.options.isServer??DV??typeof document>"u",this.protocolAllowlist=new Set(this.options.protocolAllowlist),this.options.pathParamsAllowedCharacters&&(this.pathParamsDecoder=rK(this.options.pathParamsAllowedCharacters)),(!this.history||this.options.history&&this.options.history!==this.history)&&(this.options.history?this.history=this.options.history:this.history=SK()),this.origin=this.options.origin,this.origin||(window!=null&&window.origin&&window.origin!=="null"?this.origin=window.origin:this.origin="http://localhost"),this.history&&this.updateLatestLocation(),this.options.routeTree!==this.routeTree){this.routeTree=this.options.routeTree;let u;this.resolvePathCache=ov(1e3),u=this.buildRouteTree(),this.setRoutes(u)}if(!this.stores&&this.latestLocation){const u=this.getStoreConfig(this);this.batch=u.batch,this.stores=wK(this.latestLocation,u),_K(this)}const o=this.options.basepath??"/",l=this.options.rewrite;if(i||s!==o||a!==l){this.basepath=o;const u=[],h=vO(o);h&&h!=="/"&&u.push(xK({basepath:o})),l&&u.push(l),this.rewrite=u.length===0?void 0:u.length===1?u[0]:yK(u),this.history&&this.updateLatestLocation(),this.stores&&this.stores.location.set(this.latestLocation)}},this.updateLatestLocation=()=>{this.latestLocation=this.parseLocation(this.history.location,this.latestLocation)},this.buildRouteTree=()=>{const t=YV(this.routeTree,this.options.caseSensitive,(r,s)=>{r.init({originalIndex:s})});return this.options.routeMasks&&VV(this.options.routeMasks,t.processedTree),t},this.subscribe=(t,r)=>{const s={eventType:t,fn:r};return this.subscribers.add(s),()=>{this.subscribers.delete(s)}},this.emit=t=>{for(const r of this.subscribers)if(r.eventType===t.type)try{r.fn(t)}catch(s){console.error(s)}},this.parseLocation=(t,r)=>{const s=({pathname:l,search:u,hash:h,href:_,state:p})=>{if(!this.rewrite&&!/[ \x00-\x1f\x7f\u0080-\uffff]/.test(l)){const b=this.options.parseSearch(u),w=this.options.stringifySearch(b);return{href:l+w+h,publicHref:l+w+h,pathname:xp(l).path,external:!1,searchStr:w,search:n_(r==null?void 0:r.search,b),hash:xp(h.slice(1)).path,state:p_(r==null?void 0:r.state,p)}}const m=new URL(_,this.origin),x=H4(this.rewrite,m),k=this.options.parseSearch(x.search),v=this.options.stringifySearch(k);return x.search=v,{href:x.href.replace(x.origin,""),publicHref:_,pathname:xp(x.pathname).path,external:!!this.rewrite&&x.origin!==this.origin,searchStr:v,search:n_(r==null?void 0:r.search,k),hash:xp(x.hash.slice(1)).path,state:p_(r==null?void 0:r.state,p)}},i=s(t),{__tempLocation:a,__tempKey:o}=i.state;if(a&&(!o||o===this.tempLocationKey)){const l=s(a);return l.state.key=i.state.key,l.state.__TSR_key=i.state.__TSR_key,delete l.state.__tempLocation,{...l,maskedLocation:i}}return i},this.resolvePathWithBase=(t,r)=>nK({base:t,to:r,trailingSlash:this.options.trailingSlash,cache:this.resolvePathCache}),this.matchRoutes=(t,r,s)=>typeof t=="string"?this.matchRoutesInternal({pathname:t,search:r},s):this.matchRoutesInternal(t,r),this.getMatchedRoutes=t=>{const r=Object.create(null),s=QV(Gl(t),this.processedTree,!0);return s&&Object.assign(r,s.rawParams),[(s==null?void 0:s.branch)||[this.routesById.__root__],r,s==null?void 0:s.route]},this.buildLocation=t=>{const r=(i={})=>{var M,D;if(i.href){const I=cv(i.href,{});i={...i,to:H4(this.rewrite,new URL(I.pathname,this.origin)).pathname,search:this.options.parseSearch(I.search),hash:I.hash.slice(1)}}const a=i._fromLocation||this._pendingLocation||this.latestLocation,o=this.matchRoutesLightweight(a);i.from;const l=i.unsafeRelative==="path"?a.pathname:i.from??o[1],u=o[2],h=o[3],_=this.resolvePathWithBase(l,i.to?`${i.to}`:".");let p=oE(i.params,h);const m=this.routesByPath[Gl(_)];let x;if(m)x=this.getRouteBranch(m);else if(_.includes("$"))x=[];else{const[I,P,U]=this.getMatchedRoutes(_);x=I,this.options.notFoundRoute&&(!U||U.path!=="/"&&P["**"])&&(x=[...x,this.options.notFoundRoute])}if(x.length&&_O(p))for(const I of x){const P=((M=I.options.params)==null?void 0:M.stringify)??I.options.stringifyParams;if(P){p===h&&(p=Object.assign(Object.create(null),p));try{Object.assign(p,P(p))}catch{}}}const k=t.leaveParams?_:xp(Z9({path:_,params:p,decoder:this.pathParamsDecoder,server:this.isServer}).interpolatedPath).path;let v=u;if(t._includeValidateSearch&&((D=this.options.search)!=null&&D.strict)){const I={};x.forEach(P=>{if(P.options.validateSearch)try{Object.assign(I,O1(P.options.validateSearch,{...I,...v}))}catch{}}),v=I}v=jK(v,i,x,t._includeValidateSearch),v=n_(u,v);const b=this.options.stringifySearch(v),w=i.hash===!0?a.hash:i.hash?Kd(i.hash,a.hash):void 0,y=w?`#${w}`:"";let C=i.state===!0?a.state:i.state?Kd(i.state,a.state):{};i.state&&(C=p_(a.state,C));const N=`${k}${b}${y}`;let E,T,j=!1;if(this.rewrite){const I=new URL(N,this.origin),P=yO(this.rewrite,I);E=I.href.replace(I.origin,""),P.origin!==this.origin?(T=P.href,j=!0):T=P.pathname+P.search+P.hash}else E=qV(N),T=E;return{publicHref:T,href:E,pathname:k,search:v,searchStr:b,state:C,hash:w??"",external:j,unmaskOnReload:i.unmaskOnReload}},s=r(t);if(t.mask)s.maskedLocation=r({from:t.from,...t.mask});else if(this.options.routeMasks){const i=KV(s.pathname,this.processedTree);if(i){const a=Object.assign(Object.create(null),i.rawParams),{from:o,params:l,...u}=i.route,h=oE(l,a);s.maskedLocation=r({from:t.from,...u,params:h})}}return s},this.commitLocation=async({viewTransition:t,ignoreBlocker:r,...s})=>{let i;const a=Gl(this.latestLocation.href)===Gl(s.href)&&du(aE(s.state),aE(this.latestLocation.state)),o=this._commitPromise;let l;const u=new Promise(h=>{l=h});if(u.resolve=()=>{l(),o==null||o.resolve()},this._commitPromise=u,a)this.load();else{let{maskedLocation:h,hashScrollIntoView:_,...p}=s;h&&(p={...h,state:{...h.state,__tempKey:void 0,__tempLocation:{...p,search:p.searchStr,state:{...p.state,__tempKey:void 0,__tempLocation:void 0,__TSR_key:void 0,key:void 0}}}},(p.unmaskOnReload??this.options.unmaskOnReload??!1)&&(p.state.__tempKey=this.tempLocationKey)),p.state.__hashScrollIntoViewOptions=_??this.options.defaultHashScrollIntoView??!0,this.shouldViewTransition=t,i=s.replace?"REPLACE":"PUSH",this.history[i==="REPLACE"?"replace":"push"](p.publicHref,p.state,{ignoreBlocker:r}),this.history.subscribers.size||this.load({action:{type:i}})}return this._scroll.next=s.resetScroll??!0,this._commitPromise},this.buildAndCommitLocation=({replace:t,resetScroll:r,hashScrollIntoView:s,viewTransition:i,ignoreBlocker:a,...o}={})=>{const l=this.buildLocation({...o,_includeValidateSearch:!0});this._pendingLocation=l;const u=this.commitLocation({...l,viewTransition:i,replace:t,resetScroll:r,hashScrollIntoView:s,ignoreBlocker:a});return queueMicrotask(()=>{this._pendingLocation===l&&(this._pendingLocation=void 0)}),u},this.navigate=async({to:t,reloadDocument:r,href:s,publicHref:i,...a})=>{var l,u;let o=!1;if(s)try{new URL(`${s}`),o=!0}catch{}if(o&&!r&&(r=!0),r){if(t!==void 0||!s){const _=this.buildLocation({to:t,...a});s=s??_.publicHref,i=i??_.publicHref}const h=!o&&i?i:s;if(av(h,this.protocolAllowlist))return;if(!a.ignoreBlocker){const _=((u=(l=this.history).getBlockers)==null?void 0:u.call(l))??[];for(const p of _)if(p!=null&&p.blockerFn&&await p.blockerFn({currentLocation:this.latestLocation,nextLocation:this.latestLocation,action:"PUSH"}))return}a.replace?window.location.replace(h):window.location.href=h;return}return this.buildAndCommitLocation({...a,href:s,to:t,_isNavigate:!0})},this.load=async t=>{this.updateLatestLocation(),t!=null&&t.action&&(this._scroll.hash=t.action.type==="PUSH"||t.action.type==="REPLACE"),await $K(this,t)},this.startViewTransition=t=>{var s,i;const r=this.shouldViewTransition??this.options.defaultViewTransition;if(this.shouldViewTransition=void 0,r&&typeof document.startViewTransition=="function"){let a;if(typeof r=="object"&&((i=(s=window.CSS)==null?void 0:s.supports)!=null&&i.call(s,"selector(:active-view-transition-type(a))"))){const o=this.latestLocation,l=this.stores.resolvedLocation.get(),u=typeof r.types=="function"?r.types(_b(o,l)):r.types;if(u===!1)return t();a={update:t,types:u}}else a=t;return document.startViewTransition(a).updateCallbackDone}return t()},this.invalidate=t=>{var u,h;const r=this._committed,s=t==null?void 0:t.filter,i=this._preloads,a=new Set([...r,...this._cache.values(),...[...(i==null?void 0:i.values())??[]].flat(),...((u=this._tx)==null?void 0:u[3])??[]].filter(_=>!s||s(_)).map(_=>_.id)),o=[];for(const[_,p]of i??[])p.some(m=>a.has(m.id))&&(i.delete(_),o.push(_));const l=_=>{if(a.has(_.id)){const p=this.routesById[_.routeId],m={..._,invalid:!0,...(t!=null&&t.forcePending||_.status==="error"||_.status==="notFound")&&iE(p)?{status:"pending",error:void 0}:void 0};return _._flight=void 0,m}return _};this._committed=r.map(l);for(const[_,p]of this._cache)a.has(_)&&(p.invalid=!0,t!=null&&t.forcePending&&(p.status="pending"));for(const _ of a)(h=this._flights)==null||h.delete(_);for(const _ of o)_.abort();return this.shouldViewTransition=!1,this.load({sync:t==null?void 0:t.sync})},this.resolveRedirect=t=>{const r=t.headers.get("Location");if(t.options.href){if(r)try{const s=new URL(r);if(this.origin&&s.origin===this.origin){const i=s.pathname+s.search+s.hash;t.options.href=i,t.headers.set("Location",i)}}catch{}}else{const s=this.buildLocation(t.options).publicHref||"/";t.options.href=s,t.headers.set("Location",s)}if(t.options.href&&av(t.options.href,this.protocolAllowlist))throw new Error("Redirect blocked: unsafe protocol");return t.headers.get("Location")||t.headers.set("Location",t.options.href),t},this.clearCache=t=>{var u;const r=this._cache,s=this._preloads,i=t==null?void 0:t.filter,a=[],o=[];for(const[h,_]of r)(!i||i(_))&&(o.push(h),a.push(_));const l=[];for(const[h,_]of s??[])(!i||_.some(i))&&(l.push(h),a.push(..._));for(const h of o)r.delete(h);for(const h of l)s.delete(h);for(const h of a){const _=h._flight;h._flight=void 0,_&&!--_[2]&&(((u=this._flights)==null?void 0:u.get(h.id))===_&&this._flights.delete(h.id),l.push(_[1]))}for(const h of l)h.abort()},this.loadRouteChunk=vd,this.preloadRoute=t=>BK(this,t),this.matchRoute=(t,r)=>{const s={...t,to:t.to?this.resolvePathWithBase(t.from||"",t.to):void 0,params:t.params||{},leaveParams:!0},i=this.buildLocation(s),a=this.stores.status.get()==="pending";if(r!=null&&r.pending&&!a)return!1;const o=(r==null?void 0:r.pending)??!a?this.latestLocation:this.stores.resolvedLocation.get()||this.stores.location.get(),l=WV(i.pathname,(r==null?void 0:r.caseSensitive)??!1,(r==null?void 0:r.fuzzy)??!1,o.pathname,this.processedTree);return!l||t.params&&!du(l.rawParams,t.params,{partial:!0})?!1:(r==null?void 0:r.includeSearch)??!0?du(o.search,i.search,{partial:!0})?l.rawParams:!1:l.rawParams},this.getStoreConfig=n,this.update({defaultPreloadDelay:50,defaultPendingMs:1e3,defaultPendingMinMs:500,context:void 0,...e,caseSensitive:e.caseSensitive??!1,notFoundMode:e.notFoundMode??"fuzzy",stringifySearch:e.stringifySearch??mK,parseSearch:e.parseSearch??pK,protocolAllowlist:e.protocolAllowlist??HV}),self.__TSR_ROUTER__=this}isShell(){return!!this.options.isShell}get state(){return this.stores.__store.get()}setRoutes({routesById:e,routesByPath:n,processedTree:t}){this.routesById=e,this.routesByPath=n,this.processedTree=t;const r=this.options.notFoundRoute;r&&(r.init({originalIndex:99999999999}),this.routesById[r.id]=r)}getRouteBranch(e){let n=this.routeBranchCache.get(e);return n||(n=mO(e),this.routeBranchCache.set(e,n)),n}matchRoutesInternal(e,n){var p,m;const[t,r,s]=this.getMatchedRoutes(e.pathname);let i=t,a=!1;(s?s.path!=="/"&&r["**"]:Gl(e.pathname))&&(this.options.notFoundRoute?i=[...i,this.options.notFoundRoute]:a=!0);const o=a?TK(this.options.notFoundMode,i):void 0,l=new Array(i.length),u=this._committed,h=(x,k)=>{const v=u[k];return(v==null?void 0:v.routeId)===x.id?v:x===this.options.notFoundRoute?u.find(b=>b.routeId===x.id):void 0};let _;for(let x=0;x{const m=p(l.preSearchFilters?l.preSearchFilters.reduce((x,k)=>k(x),_):_);return l.postSearchFilters?l.postSearchFilters.reduce((x,k)=>k(x),m):m};s.push(h)}const u=l.validateSearch;if(r&&u){const h=({search:_,next:p,meta:m})=>{const x=p(_);try{const k=O1(u,x);if(m&&k)for(const v in k)v in x||(m.defaulted||(m.defaulted=new Map)).set(v,k[v]);return{...x,...k}}catch{}return x};s.push(h)}}const i=(o,l,u)=>{if(o>=s.length){if(!n.search)return{};if(n.search===!0)return l;const _=Kd(n.search,l);return u&&(u.explicit=_),_}const h=(_,p)=>{if(p){const m=u||{};return{search:i(o+1,_,m),meta:m}}return i(o+1,_,u)};return s[o]({search:l,next:h,meta:u})};return i(0,e)}function TK(e,n){if(e!=="root"){let t;for(let r=n.length-1;r>=0;r--){const s=n[r];if(s.options.notFoundComponent)return s.id;t||(t=s.children&&s.id)}if(t)return t}return gd}function oE(e,n){if(e===!1||e===null)return Object.create(null);if((e??!0)===!0)return n;const t=Object.assign(Object.create(null),n);return Object.assign(t,Kd(e,t))}function lE(e,n){var r;const t=((r=e.options.params)==null?void 0:r.parse)??e.options.parseParams;t&&Object.assign(n,t(n))}function q4(e,n){var t,r;return(r=(t=e.options[n])==null?void 0:t.preload)==null?void 0:r.call(t)}function AK(e,n){const t=q4(e,"component");let r=q4(e,"pendingComponent");return n&&(r?r=r.then(n):n()),t&&r?Promise.all([t,r]).then(()=>{}):t??r}function vd(e,n,t){const r=()=>n===!1?void 0:n?q4(e,n):AK(e,t),s=e._lazy;if(s)return s===!0?r():s.then(r);if(!e.lazyFn)return r();const i=e.lazyFn().then(a=>{{const{id:o,...l}=a.options;Object.assign(e.options,l),e._lazy=!0}},a=>{throw e._lazy=void 0,a});return e._lazy=i,i.then(r)}function bk(e){const n=e.findIndex(t=>t.status!=="success"||t._notFound)+1;return n&&n{const s=()=>r(n);n.addEventListener("abort",s,{once:!0}),Promise.resolve(e).then(t,r).finally(()=>n.removeEventListener("abort",s))})}function nf(e,n){return e.routesById[n.routeId]}function u0(e,n,t){return bO(e)?[Xi,e]:Wd(e)?(e.routeId||(e.routeId=t),[fb,e]):n?(typeof(e==null?void 0:e.then)=="function"&&(e=new Error("A Promise was thrown",{cause:e})),[Yl,e]):[Ho,e]}function yk(e,n){var r,s;let t=u0(n,!0,e.id);if(t[0]!==Yl)return t;try{(s=(r=e.options).onError)==null||s.call(r,t[1])}catch(i){t=u0(i,!0,e.id)}return t}function Wp(e,n,t,r,s){return s[0].signal.aborted?vu:kk(e,n,t,yk(t,r),s)}async function RK(e,n,t,r,s,i){var h,_;const[a,o]=n,l=t[0].signal,u=!!t[3];for(let p=t[6]??0;pe.navigate({...C,_fromLocation:a}),buildLocation:e.buildLocation,cause:u?"preload":m.cause,abortController:t[0],preload:u,matches:o,routeId:x.id};try{const C=m._ctx||(m._ctx=x.options.context?x.options.context({...v,deps:m.loaderDeps,context:k})||{}:void 0);m.context={...k,...C}}catch(C){return Vl(e,m),[p,Wp(e,n,x,C,t)]}if(l.aborted)return[p,vu];const b=m.paramsError??m.searchError;if(b!==void 0)return Vl(e,m),[p,Wp(e,n,x,b,t)];const w=x.options.beforeLoad;if(!w)continue;const y=m.status;p>=i&&(m.status="pending",(_=t[7])==null||_.call(t));try{_0(e,m,"beforeLoad",t[0]);const C=await tf(w({...v,search:m.search,context:m.context,...e.options.additionalContext}),l);if(l.aborted)return[p,vu];const N=kk(e,n,x,u0(C,!1,x.id),t);if(N[0]!==Ho)return Vl(e,m),[p,N];m.context={...m.context,...C}}catch(C){return Vl(e,m),[p,Wp(e,n,x,C,t)]}finally{m.status=y,_0(e,m,!1,t[0])}}s()}function xk(e,n,t){var r;if(!(!t||--t[2])){if(((r=e._flights)==null?void 0:r.get(n.id))===t){const s=e._tx;if(s&&!s[0].signal.aborted&&!s[3].includes(n)&&s[3].some(i=>i.id===n.id)&&s[3].some(i=>i.isFetching==="beforeLoad"))return;e._flights.delete(n.id)}return t[1]}}function Vl(e,n){var r;const t=n._flight;n._flight=void 0,(r=xk(e,n,t))==null||r.abort()}function zi(e,n,t,r){var i;const s=[];for(const a of n)if(!(t!=null&&t.includes(a))){const o=a._flight;if(a._flight=void 0,r&&(o==null?void 0:o[2])===1&&((i=e._flights)==null?void 0:i.get(a.id))===o&&(t!=null&&t.some(l=>l.id===a.id)))o[2]=0;else{const l=xk(e,a,o);l&&s.push(l)}}for(const a of s)a.abort()}function wk(e){for(const n of e){const t=n._flight;t&&t[2]++}}function _0(e,n,t,r){var a;if(n.isFetching=t,r&&((a=e._tx)==null?void 0:a[0])!==r)return;const s=e.stores.byRoute.get(n.routeId),i=s==null?void 0:s.get();(i==null?void 0:i.id)===n.id&&s.set({...i,isFetching:t})}function xO(e,n,t,r,s,i,a){const o=n[0];return{params:t.params,location:o,navigate:l=>e.navigate({...l,_fromLocation:o}),cause:a?"preload":t.cause,abortController:s,preload:a,deps:t.loaderDeps,parentMatchPromise:i,context:t.context,route:r,...e.options.additionalContext}}async function cE(e,n,t,r,s,i,a){const o=a[0],l=o.signal;if(l.aborted)return vu;if(!s)return[Ho,void 0];let u=t._flight;_0(e,t,"loader",o);try{if(!u){const h=new AbortController;u=[Promise.resolve().then(()=>s(xO(e,n,t,r,h,i,!!a[3]))).then(_=>u0(_,!1,r.id),_=>u0(_,!0,r.id)).then(_=>{var p;return _[0]!==Ho&&((p=e._flights)==null?void 0:p.get(t.id))===u&&(e._flights.delete(t.id),u[2]||h.abort()),_[0]===Yl&&u[2]?yk(r,_[1]):_}),h,1],(e._flights??(e._flights=new Map)).set(t.id,u)}return t._flight=u,t.abortController=u[1],kk(e,n,r,await tf(u[0],l),a)}catch(h){if(h!==l||!l.aborted)throw h;return Vl(e,t),vu}finally{_0(e,t,!1,o)}}function uE(e,n,t){n[0]!==Xi&&(e.status="success",e.error=void 0,n[0]===Ho?(e.loaderData=n[1],e.invalid=!1,e.updatedAt=Date.now(),e.preload=t):e.invalid=!0)}function MK(e,n,t){const r=e._cache.get(n.id);if(r!==t||e._committed.some(i=>i.id===n.id&&i._flight===n._flight))return;const s={...n,_notFound:void 0,context:{}};s._flight&&s._flight[2]++,e._cache.set(n.id,s),r&&Vl(e,r)}function _E(e,n){return n[0]===Yl||n[0]===fb?{...e,status:n[0]===Yl?"error":"notFound",error:n[1],_flight:void 0}:e}function OK(e,n,t,r,s,i,a){var P,U;const o=n[1][t],l=nf(e,o),u=!!i[3],h=e._cache.get(o.id);let _,p=!1,m;try{if(o.status==="success"&&(_=l.options.shouldReload,typeof _=="function"&&(_=_(xO(e,n,o,l,i[0],s,u))),i[0].signal.aborted&&(m=vu)),!m)if(o.status!=="success")p=!0;else{const q=u||o.preload?l.options.preloadStaleTime??e.options.defaultPreloadStaleTime??3e4:l.options.staleTime??e.options.defaultStaleTime??0;p=!!(o.invalid||_||_===void 0&&Date.now()-o.updatedAt>=q&&(i[5]||o.cause==="enter"||i[2].some(W=>W.routeId===o.routeId&&W.id!==o.id)))}}catch(q){o.invalid=!0,Vl(e,o),m=Wp(e,n,l,q,i)}const x=l.options.loader,k=typeof x=="function",v=k?x:x==null?void 0:x.handler,b=!u||l.options.preload!==!1;let w=b&&x?(P=e._flights)==null?void 0:P.get(o.id):void 0;w===o._flight||m?w=void 0:w&&!p&&!u&&_===void 0?p=!0:p||(w=void 0);const y=!!(x&&p&&o.status==="success"&&!u&&!i[4]&&((k?void 0:x.staleReloadMode)??e.options.defaultStaleReloadMode)!=="blocking"),C=p&&b,N=C&&!y&&(o.status!=="success"||!!x),E=t>=a?i[7]:void 0,T=l.lazyFn&&l._lazy!==!0?E:void 0;if(C&&!x&&(o.invalid=!1,o.updatedAt=Date.now()),w&&w[2]++,N){const q=o._flight;o._flight=w,(U=xk(e,o,q))==null||U.abort(),t>=a&&(o.status="pending"),E==null||E()}C||(o.isFetching=!1);const j=(m?Promise.resolve(m):N?cE(e,n,o,l,v,s,i):Promise.resolve([Ho,o.loaderData])).then(q=>(N&&(uE(o,q,u),q[0]===Ho&&(x&&!i[0].signal.aborted&&MK(e,o,h),t>=a&&(o.status="pending"))),q)),M=tf(Promise.resolve().then(()=>vd(l,void 0,T)),i[0].signal).then(()=>{},q=>n[1].some((W,H)=>H<=t&&(W.status==="error"||W.status==="notFound"||W._notFound))?void 0:[t,Wp(e,n,l,q,i)]).then(q=>j.then(W=>(N&&!q&&W[0]===Ho&&o.status==="pending"&&!i[0].signal.aborted&&(o.status="success",E==null||E()),q)));if(r.push([t,j,M]),!y)return j.then(q=>_E(o,q));const D={...o,status:"pending",preload:!1,_flight:w};o.invalid=!1,o.isFetching="loader";const I=cE(e,n,D,l,v,s,i).then(q=>(o.isFetching=!1,uE(D,q,!1),q));return(n[2]??(n[2]=[])).push([t,I,M,D]),I.then(q=>_E(D,q))}async function U4(e,n,t,r,s=0){const i=t==null?void 0:t[1][1];let a=i!=null&&i.routeId?n.findIndex(o=>o.routeId===i.routeId):(t==null?void 0:t[0])??n.length-1;a<0&&(a=0);for(let o=a;o>=0;o--){const l=nf(e,n[o]);try{const u=vd(l,!1);u&&await tf(u,r)}catch(u){if(u===r&&r.aborted)throw u}if(l.options.notFoundComponent)return o}return i!=null&&i.routeId?a:s}function R_(e,n){n[2]&&(zi(e,n[2].map(t=>t[3])),n[2]=void 0)}async function fE(e,n,t,r){let s;try{await Promise.all(e.map(i=>i[1].then(async a=>{const o=i[0];if(!(r&&o>=await r)){if(a[0]>=Xi)throw[o,a];!s&&a[0]!==Ho&&(s=[o,a],await Promise.all((t??[]).map(l=>{if(!(l[0]<=o))return l[1].then(u=>{if(u[0]===Xi)throw[l[0],u]})})))}})))}catch(i){return i}return n??s}function kk(e,n,t,r,s,i){for(;r[0]===Xi;){const a=r[1],o=a.options;if(o.reloadDocument?s[3]:s[1]>=20)return r;try{return o.href&&o.reloadDocument?(e.resolveRedirect(a),r):[Xi,a,e.buildLocation({...o,_fromLocation:n[0],_includeValidateSearch:!0})]}catch(l){r=i?[Yl,l]:yk(t,l),i=!0}}return r}async function wO(e,n,t,r,s,i){const a=n[1];let o=await s,l=!1;const u=a.findIndex(m=>m._notFound),h=m=>m[1][0]===fb?U4(e,a,m,r.signal):m[0];let _=u<0?a.length:u;if(((o==null?void 0:o[1][0])??0)>=Xi)_=0;else if(o){_=o[2]??(o[2]=await h(o));for(const m of t){if(m[0]>=_)break;const x=await m[1];if(x[0]!==Ho&&x[0]=_)break;const x=await m[2];if(x){o=x;break}}if(((o==null?void 0:o[1][0])??0)>=Xi){const m=o[1];if(m[0]!==Xi||m[1].options.reloadDocument||m[2])return R_(e,n),m;l=!0,o=[0,[Yl,new Error("Too many redirects")]]}const p=o?o[2]??await h(o):u;if(p>=0){const m=o==null?void 0:o[1],x=m==null?void 0:m[0],k=a[p],v=m==null?void 0:m[1],b=()=>{m&&(k._notFound=void 0,x===Yl?k.status="error":(v.routeId=k.routeId,k.routeId===e.routeTree.id?(k.status="success",k._notFound=!0):k.status="notFound"),k.error=v,k.isFetching=!1)};b(),m||i==null||i();const w=nf(e,k);try{await tf(m?Promise.resolve().then(()=>vd(w,x===Yl?"errorComponent":"notFoundComponent")):Promise.all([vd(w),vd(w,"notFoundComponent")]),r.signal)}catch(y){if(y===r.signal&&r.signal.aborted)return R_(e,n),vu}m?l&&(r.abort(),await Promise.all([...t.map(y=>y[1]),...t.map(y=>y[2]),...(n[2]??[]).map(y=>y[1])]),R_(e,n),zi(e,a),b()):k.status="success"}return n}async function kO(e,n,t,r=0,s=n[1].length){var a,o;const i=n[1];for(let l=r;lw._notFound);if(e.options.notFoundMode!=="root"&&u>=0){const w=await U4(e,t,void 0,i,u);t[u]._notFound=void 0,t[w]._notFound=!0,u=w}let h=u<0?t.length:u+1,_=0;for(;_{for(let w=m;w=Xi&&(h=0);k()}if(!i.aborted&&!r[3]){const w=[];for(const[y,C]of e._flights??[])C[2]||(e._flights.delete(y),w.push(C[1]));for(const y of w)y.abort()}const b=wO(e,s,p,r[0],fE(p,v,s[2]),r[7]);(o=s[2])!=null&&o.length&&(s[3]=fE(s[2],void 0,void 0,b.then(w=>c0(w)?0:bk(t).length,()=>0))),a=await b}catch(l){if(R_(e,s),l===i&&i.aborted)return vu;throw l}return c0(a)?a:kO(e,a,i,r[6]===t.length?r[6]:0)}function G4(e,n){var i,a;if(e._tx!==n)return;const t=n[3],r=e.stores.matches.get();let s=e._pending;for(let o=0;o0){s[3]=setTimeout(()=>G4(e,n),w);return}s[2]=0}const v=t.map(w=>({...w,_flight:void 0}));v[o].status="pending";const b=s[4]=e.startTransition(()=>e.stores.setMatches(v),v).then(w=>(w&&e._pending===s&&s[4]===b&&!s[2]&&(s[2]=Date.now()+x),w));return}}function wp(e,n){var r;const t=e._pending;(e._tx===n||!((r=e._tx)!=null&&r[3].some(s=>s.id===(t==null?void 0:t[1]))))&&(clearTimeout(t==null?void 0:t[3]),e._pending=void 0)}async function dE(e,n){const t=e._pending;if(!t)return;clearTimeout(t[3]);const r=t[2]-Date.now();if(!t[4]||r<=0||!bk(n[3]).some(i=>i.id===t[1]))return;let s;try{await tf(new Promise(i=>{s=setTimeout(i,r)}),n[0].signal)}catch{}clearTimeout(s)}function CO(e,n){e._committed=n,e.stores.setMatches(n)}function DK(e,n,t,r){const s=e._committed,i=e._cache;for(const l of t)l.preload=!1,r&&(l._assetEnd=void 0);const a=bk(t).length,o=new Map;{const l=Date.now();for(const u of[...s,...i.values()]){if(u.status!=="success"||t.some((_,p)=>_.id===u.id&&(p=(u.preload?h.options.preloadGcTime??e.options.defaultPreloadGcTime??3e5:h.options.gcTime??e.options.defaultGcTime??3e5)||o.set(u.id,i.get(u.id)===u?u:{...u,_flight:void 0,isFetching:!1,context:{}})}}n[3]=[],e._cache=o,CO(e,t),zi(e,[...i.values(),...s],[...t,...o.values()]),EK(e,s,t,n)}async function $g(e,n){let t=e._tx;for(;t&&t!==n;){if(await t[5],e._tx===t)return;t=e._tx}}function EO(e,n,t){const r=t[1].options,s=t[2];if(!s)return e.navigate({...r,replace:!0,ignoreBlocker:!0});if(r.reloadDocument)return e.navigate({href:s.publicHref,reloadDocument:!0,replace:!0,ignoreBlocker:!0});s._redirects=n[1]+1,e._pendingLocation=s;const i=e.commitLocation({...s,viewTransition:r.viewTransition,replace:!0,resetScroll:r.resetScroll,hashScrollIntoView:r.hashScrollIntoView,ignoreBlocker:!0});return queueMicrotask(()=>{e._pendingLocation===s&&(e._pendingLocation=void 0)}),i}async function LK(e,n,t,r,s){const i=t.map(l=>({...l}));wk(i);for(const l of r)Vl(e,i[l[0]]),i[l[0]]=l[3];const a=[n[2],i];let o;try{o=await wO(e,a,r,n[0],s)}catch(l){throw zi(e,i),l}if(c0(o)){zi(e,i),o[0]===Xi&&e._tx===n&&e._committed===t&&await EO(e,n,o);return}if(await kO(e,o,n[0].signal),e._tx!==n||e._committed!==t){zi(e,i);return}for(const l of i){const u=e._cache.get(l.id);u!=null&&u._flight&&u._flight===l._flight&&(e._cache.delete(l.id),Vl(e,u))}CO(e,i),zi(e,t,i)}async function IK(e,n,t,r,s,i){const a=await SO(e,n[2],n[3],[n[0],n[1],e._committed,void 0,s,t,i,r]);if(c0(a)){const _=a[0]===Xi&&e._tx===n;if((!_||a[1].options.reloadDocument)&&wp(e,n),zi(e,n[3]),n[3]=[],!_)return;if(e._tx!==n){wp(e,n);return}await EO(e,n,a);return}const o=a[1];if(e._tx===n&&await dE(e,n),e._tx!==n){wp(e,n),zi(e,o),R_(e,a);return}const l=n[2],u=_b(l,e.stores.resolvedLocation.get()),h=a[2];await e.startViewTransition(async()=>{var m;if(e._tx===n&&await dE(e,n),e._tx!==n){wp(e,n),zi(e,o),R_(e,a);return}const _=()=>{wp(e,n),DK(e,n,o,i),e._tx===n&&(e.emit({type:"onLoad",...u}),e._tx===n&&e.emit({type:"onBeforeRouteMount",...u}))},p=await e.startTransition(_,o);if(e._tx!==n){R_(e,a);return}h!=null&&h.length&&LK(e,n,o,h,a[3]).catch(console.error),e.batch(()=>{e.stores.resolvedLocation.set(l),e.stores.status.set("idle"),e._tx===n&&e.emit({type:"onResolved",...u}),p&&e._tx===n&&e.emit({type:"onRendered",...u})}),e._tx===n&&((m=e._commitPromise)==null||m.resolve(),e._commitPromise=void 0)})}async function $K(e,n){var C;const t=e._tx,r=e.stores.resolvedLocation.get(),s=r??e.stores.location.get(),i=e.latestLocation,a=e._pendingLocation,o=(a==null?void 0:a.href)===i.href?a._redirects??0:0,l=e._handoff,u=l==null?void 0:l[0](),h=new AbortController,_=e._preflight;if(e._preflight=h,u||l==null||l[1](),_==null||_.abort(),!h.signal.aborted){const N=_b(i,r);e.emit({type:"onBeforeNavigate",...N}),h.signal.aborted||e.emit({type:"onBeforeLoad",...N})}if(h.signal.aborted){await $g(e,t);return}const p=s.href===i.href;let m=h;const x=e.matchRoutes(i,{_controller:h});wk(x);const k=u?l[1](x):void 0;if(k?m=u:u==null||u.abort(),h.signal.aborted){zi(e,x),await $g(e,t);return}e._preflight=void 0;let v;const b=()=>IK(e,y,p,()=>G4(e,y),n==null?void 0:n.sync,k),w=n!=null&&n.sync?new Promise(N=>v=N):Promise.resolve().then(b).then(),y=[m,o,i,x,Date.now(),w];if(e._tx=y,t){for(const N of e.stores.matches.get()){if(e._tx!==y)break;N.isFetching&&_0(e,N,!1)}t[0].abort(),zi(e,t[3],y[3],!0)}if(e._tx!==y){zi(e,y[3]),y[3]=[],v==null||v(),await $g(e,y);return}e.batch(()=>{e.stores.status.set("pending"),e.stores.location.set(i)}),(k||!e._committed.length&&((C=x[0])==null?void 0:C.status)!=="success"&&!x.some(N=>N._notFound))&&G4(e,y),v==null||v(b()),await w,await $g(e,y)}async function BK(e,n){let t=e.buildLocation(n);for(let r=0;;r++){const s=e._committed,i=new AbortController;let a,o,l;try{try{a=e.matchRoutes(t,{_controller:i}),wk(a),o=(e._preloads??(e._preloads=new Map)).set(i,a),l=await SO(e,t,a,[i,r,s,!0])}finally{o&&(o=o.delete(i),zi(e,a)),i.abort()}if(!c0(l))return l[1];if(!o||l.length<3)return;t=l[2]}catch(u){Wd(u)||console.error(u);return}}}const PK="Error preloading route! ☝️";var NO=class{get to(){return this._to}get id(){return this._id}get path(){return this._path}get fullPath(){return this._fullPath}constructor(e){if(this.init=n=>{var l,u;this.originalIndex=n.originalIndex;const t=this.options,r=!(t!=null&&t.path)&&!(t!=null&&t.id);this.parentRoute=(u=(l=this.options).getParentRoute)==null?void 0:u.call(l),r?this._path=gd:this.parentRoute||mk();let s=r?gd:t==null?void 0:t.path;s&&s!=="/"&&(s=gO(s));const i=(t==null?void 0:t.id)||s;let a=r?gd:A1([this.parentRoute.id==="__root__"?"":this.parentRoute.id,i]);s==="__root__"&&(s="/"),a!=="__root__"&&(a=A1(["/",a]));const o=a==="__root__"?"/":A1([this.parentRoute.fullPath,s]);this._path=s,this._id=a,this._fullPath=o,this._to=Gl(o)},this.addChildren=n=>this._addFileChildren(n),this._addFileChildren=n=>(Array.isArray(n)&&(this.children=n),typeof n=="object"&&n!==null&&(this.children=Object.values(n)),this),this._addFileTypes=()=>this,this.updateLoader=n=>(Object.assign(this.options,n),this),this.update=n=>(Object.assign(this.options,n),this),this.lazy=n=>(this.lazyFn=n,this),this.redirect=n=>bK({from:this.fullPath,...n}),this.options=e||{},this.isRoot=!(e!=null&&e.getParentRoute),e!=null&&e.id&&(e!=null&&e.path))throw new Error("Route cannot have both an 'id' and a 'path' option.")}},FK=class extends NO{constructor(e){super(e)}},Sk=class extends A.Component{constructor(...e){super(...e),this.state={error:null},this.reset=()=>{this.setState({error:null})}}static getDerivedStateFromProps(e,n){const t=e.getResetKey();return n.error&&n.resetKey!==t?{resetKey:t,error:null}:{resetKey:t}}static getDerivedStateFromError(e){return{error:e}}componentDidCatch(e,n){var t,r;(r=(t=this.props).onCatch)==null||r.call(t,e,n)}render(){const e=this.state.error;return e?A.createElement(this.props.errorComponent??HK,{error:e,reset:this.reset}):this.props.children}};function HK({error:e}){const[n,t]=A.useState(!1);return f.jsxs("div",{style:{padding:".5rem",maxWidth:"100%"},children:[f.jsxs("div",{style:{display:"flex",alignItems:"center",gap:".5rem"},children:[f.jsx("strong",{style:{fontSize:"1rem"},children:"Something went wrong!"}),f.jsx("button",{style:{appearance:"none",fontSize:".6em",border:"1px solid currentColor",padding:".1rem .2rem",fontWeight:"bold",borderRadius:".25rem"},onClick:()=>t(r=>!r),children:n?"Hide Error":"Show Error"})]}),f.jsx("div",{style:{height:".25rem"}}),n?f.jsx("div",{children:f.jsx("pre",{style:{fontSize:".7em",border:"1px solid red",borderRadius:".25rem",padding:".3rem",color:"red",overflow:"auto"},children:e.message?f.jsx("code",{children:e.message}):null})}):null]})}function qK({children:e,fallback:n=null}){return f.jsx(et.Fragment,{children:zO()?e:n})}function zO(){return et.useSyncExternalStore(UK,()=>!0,()=>!1)}function UK(){return()=>{}}var jO=A.createContext(null);function _i(e){return A.useContext(jO)}var db=A.createContext(void 0),GK=A.createContext(void 0),kr=(e=>(e[e.None=0]="None",e[e.Mutable=1]="Mutable",e[e.Watching=2]="Watching",e[e.RecursedCheck=4]="RecursedCheck",e[e.Recursed=8]="Recursed",e[e.Dirty=16]="Dirty",e[e.Pending=32]="Pending",e))(kr||{});function VK({update:e,notify:n,unwatched:t}){return{link:r,unlink:s,propagate:i,checkDirty:a,shallowPropagate:o};function r(u,h,_){const p=h.depsTail;if(p!==void 0&&p.dep===u)return;const m=p!==void 0?p.nextDep:h.deps;if(m!==void 0&&m.dep===u){m.version=_,h.depsTail=m;return}const x=u.subsTail;if(x!==void 0&&x.version===_&&x.sub===h)return;const k=h.depsTail=u.subsTail={version:_,dep:u,sub:h,prevDep:p,nextDep:m,prevSub:x,nextSub:void 0};m!==void 0&&(m.prevDep=k),p!==void 0?p.nextDep=k:h.deps=k,x!==void 0?x.nextSub=k:u.subs=k}function s(u,h=u.sub){const _=u.dep,p=u.prevDep,m=u.nextDep,x=u.nextSub,k=u.prevSub;return m!==void 0?m.prevDep=p:h.depsTail=p,p!==void 0?p.nextDep=m:h.deps=m,x!==void 0?x.prevSub=k:_.subsTail=k,k!==void 0?k.nextSub=x:(_.subs=x)===void 0&&t(_),m}function i(u){let h=u.nextSub,_;e:do{const p=u.sub;let m=p.flags;if(m&60?m&12?m&4?!(m&48)&&l(u,p)?(p.flags=m|40,m&=1):m=0:p.flags=m&-9|32:m=0:p.flags=m|32,m&2&&n(p),m&1){const x=p.subs;if(x!==void 0){const k=(u=x).nextSub;k!==void 0&&(_={value:h,prev:_},h=k);continue}}if((u=h)!==void 0){h=u.nextSub;continue}for(;_!==void 0;)if(u=_.value,_=_.prev,u!==void 0){h=u.nextSub;continue e}break}while(!0)}function a(u,h){let _,p=0,m=!1;e:do{const x=u.dep,k=x.flags;if(h.flags&16)m=!0;else if((k&17)===17){if(e(x)){const v=x.subs;v.nextSub!==void 0&&o(v),m=!0}}else if((k&33)===33){(u.nextSub!==void 0||u.prevSub!==void 0)&&(_={value:u,prev:_}),u=x.deps,h=x,++p;continue}if(!m){const v=u.nextDep;if(v!==void 0){u=v;continue}}for(;p--;){const v=h.subs,b=v.nextSub!==void 0;if(b?(u=_.value,_=_.prev):u=v,m){if(e(h)){b&&o(v),h=u.sub;continue}m=!1}else h.flags&=-33;h=u.sub;const w=u.nextDep;if(w!==void 0){u=w;continue e}}return m}while(!0)}function o(u){do{const h=u.sub,_=h.flags;(_&48)===32&&(h.flags=_|16,(_&6)===2&&n(h))}while((u=u.nextSub)!==void 0)}function l(u,h){let _=h.depsTail;for(;_!==void 0;){if(_===u)return!0;_=_.prevDep}return!1}}function KK(e,n,t){var i,a,o;const r=typeof e=="object",s=r?e:void 0;return{next:(i=r?e.next:e)==null?void 0:i.bind(s),error:(a=r?e.error:n)==null?void 0:a.bind(s),complete:(o=r?e.complete:t)==null?void 0:o.bind(s)}}const V4=[];let D1=0;const{link:hE,unlink:WK,propagate:QK,checkDirty:TO,shallowPropagate:pE}=VK({update(e){return e._update()},notify(e){V4[K4++]=e,e.flags&=~kr.Watching},unwatched(e){e.depsTail!==void 0&&(e.depsTail=void 0,e.flags=kr.Mutable|kr.Dirty,_v(e))}});let Bg=0,K4=0,Mo,W4=0;function XK(e){try{++W4,e()}finally{--W4||AO()}}function _v(e){const n=e.depsTail;let t=n!==void 0?n.nextDep:e.deps;for(;t!==void 0;)t=WK(t,e)}function AO(){if(!(W4>0)){for(;Bg{var u;s.get(),o.current?(u=a.next)==null||u.call(a,s._snapshot):o.current=!0});return{unsubscribe:()=>{l.stop()}}},_update(i){const a=Mo,o=(n==null?void 0:n.compare)??Object.is;if(t)Mo=s,++D1,s.depsTail=void 0;else if(i===void 0)return!1;t&&(s.flags=kr.Mutable|kr.RecursedCheck);try{const l=s._snapshot,u=typeof i=="function"?i(l):i===void 0&&t?r(l):i;return l===void 0||!o(l,u)?(s._snapshot=u,!0):!1}finally{Mo=a,t&&(s.flags&=~kr.RecursedCheck),_v(s)}}};return t?(s.flags=kr.Mutable|kr.Dirty,s.get=function(){const i=s.flags;if(i&kr.Dirty||i&kr.Pending&&TO(s.deps,s)){if(s._update()){const a=s.subs;a!==void 0&&pE(a)}}else i&kr.Pending&&(s.flags=i&~kr.Pending);return Mo!==void 0&&hE(s,Mo,D1),s._snapshot}):s.set=function(i){if(s._update(i)){const a=s.subs;a!==void 0&&(QK(a),pE(a),AO())}},s}function YK(e){const n=()=>{const r=Mo;Mo=t,++D1,t.depsTail=void 0,t.flags=kr.Watching|kr.RecursedCheck;try{return e()}finally{Mo=r,t.flags&=~kr.RecursedCheck,_v(t)}},t={deps:void 0,depsTail:void 0,subs:void 0,subsTail:void 0,flags:kr.Watching|kr.RecursedCheck,notify(){const r=this.flags;r&kr.Dirty||r&kr.Pending&&TO(this.deps,this)?n():this.flags=kr.Watching},stop(){this.flags=kr.None,this.depsTail=void 0,_v(this)}};return n(),t}var R2={exports:{}},M2={},O2={exports:{}},D2={};/** +`+S.stack}}var _t=Object.prototype.hasOwnProperty,Vt=e.unstable_scheduleCallback,$t=e.unstable_cancelCallback,jt=e.unstable_shouldYield,mt=e.unstable_requestPaint,we=e.unstable_now,ct=e.unstable_getCurrentPriorityLevel,ye=e.unstable_ImmediatePriority,je=e.unstable_UserBlockingPriority,qe=e.unstable_NormalPriority,at=e.unstable_LowPriority,nt=e.unstable_IdlePriority,Kt=e.log,Qe=e.unstable_setDisableYieldValue,kt=null,Tt=null;function Yt(c){if(typeof Kt=="function"&&Qe(c),Tt&&typeof Tt.setStrictMode=="function")try{Tt.setStrictMode(kt,c)}catch{}}var tn=Math.clz32?Math.clz32:ln,rr=Math.log,rn=Math.LN2;function ln(c){return c>>>=0,c===0?32:31-(rr(c)/rn|0)|0}var An=256,Un=262144,Yn=4194304;function fr(c){var d=c&42;if(d!==0)return d;switch(c&-c){case 1:return 1;case 2:return 2;case 4:return 4;case 8:return 8;case 16:return 16;case 32:return 32;case 64:return 64;case 128:return 128;case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:return c&261888;case 262144:case 524288:case 1048576:case 2097152:return c&3932160;case 4194304:case 8388608:case 16777216:case 33554432:return c&62914560;case 67108864:return 67108864;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 0;default:return c}}function Yr(c,d,g){var S=c.pendingLanes;if(S===0)return 0;var R=0,O=c.suspendedLanes,Q=c.pingedLanes;c=c.warmLanes;var se=S&134217727;return se!==0?(S=se&~O,S!==0?R=fr(S):(Q&=se,Q!==0?R=fr(Q):g||(g=se&~c,g!==0&&(R=fr(g))))):(se=S&~O,se!==0?R=fr(se):Q!==0?R=fr(Q):g||(g=S&~c,g!==0&&(R=fr(g)))),R===0?0:d!==0&&d!==R&&(d&O)===0&&(O=R&-R,g=d&-d,O>=g||O===32&&(g&4194048)!==0)?d:R}function zr(c,d){return(c.pendingLanes&~(c.suspendedLanes&~c.pingedLanes)&d)===0}function St(c,d){switch(c){case 1:case 2:case 4:case 8:case 64:return d+250;case 16:case 32:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:return d+5e3;case 4194304:case 8388608:case 16777216:case 33554432:return-1;case 67108864:case 134217728:case 268435456:case 536870912:case 1073741824:return-1;default:return-1}}function cn(){var c=Yn;return Yn<<=1,(Yn&62914560)===0&&(Yn=4194304),c}function jn(c){for(var d=[],g=0;31>g;g++)d.push(c);return d}function fn(c,d){c.pendingLanes|=d,d!==268435456&&(c.suspendedLanes=0,c.pingedLanes=0,c.warmLanes=0)}function Dn(c,d,g,S,R,O){var Q=c.pendingLanes;c.pendingLanes=g,c.suspendedLanes=0,c.pingedLanes=0,c.warmLanes=0,c.expiredLanes&=g,c.entangledLanes&=g,c.errorRecoveryDisabledLanes&=g,c.shellSuspendCounter=0;var se=c.entanglements,he=c.expirationTimes,Se=c.hiddenUpdates;for(g=Q&~g;0"u")return null;try{return c.activeElement||c.body}catch{return c.body}}var Zr=/[\n"\\]/g;function vr(c){return c.replace(Zr,function(d){return"\\"+d.charCodeAt(0).toString(16)+" "})}function Qt(c,d,g,S,R,O,Q,se){c.name="",Q!=null&&typeof Q!="function"&&typeof Q!="symbol"&&typeof Q!="boolean"?c.type=Q:c.removeAttribute("type"),d!=null?Q==="number"?(d===0&&c.value===""||c.value!=d)&&(c.value=""+Ln(d)):c.value!==""+Ln(d)&&(c.value=""+Ln(d)):Q!=="submit"&&Q!=="reset"||c.removeAttribute("value"),d!=null?_s(c,Q,Ln(d)):g!=null?_s(c,Q,Ln(g)):S!=null&&c.removeAttribute("value"),R==null&&O!=null&&(c.defaultChecked=!!O),R!=null&&(c.checked=R&&typeof R!="function"&&typeof R!="symbol"),se!=null&&typeof se!="function"&&typeof se!="symbol"&&typeof se!="boolean"?c.name=""+Ln(se):c.removeAttribute("name")}function Is(c,d,g,S,R,O,Q,se){if(O!=null&&typeof O!="function"&&typeof O!="symbol"&&typeof O!="boolean"&&(c.type=O),d!=null||g!=null){if(!(O!=="submit"&&O!=="reset"||d!=null)){Mi(c);return}g=g!=null?""+Ln(g):"",d=d!=null?""+Ln(d):g,se||d===c.value||(c.value=d),c.defaultValue=d}S=S??R,S=typeof S!="function"&&typeof S!="symbol"&&!!S,c.checked=se?c.checked:!!S,c.defaultChecked=!!S,Q!=null&&typeof Q!="function"&&typeof Q!="symbol"&&typeof Q!="boolean"&&(c.name=Q),Mi(c)}function _s(c,d,g){d==="number"&&Oi(c.ownerDocument)===c||c.defaultValue===""+g||(c.defaultValue=""+g)}function Lr(c,d,g,S){if(c=c.options,d){d={};for(var R=0;R"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),vo=!1;if(pi)try{var bo={};Object.defineProperty(bo,"passive",{get:function(){vo=!0}}),window.addEventListener("test",bo,bo),window.removeEventListener("test",bo,bo)}catch{vo=!1}var Ii=null,ll=null,cl=null;function pc(){if(cl)return cl;var c,d=ll,g=d.length,S,R="value"in Ii?Ii.value:Ii.textContent,O=R.length;for(c=0;c=yo),xo=" ",yf=!1;function xf(c,d){switch(c){case"keyup":return bf.indexOf(d.keyCode)!==-1;case"keydown":return d.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function ds(c){return c=c.detail,typeof c=="object"&&"data"in c?c.data:null}var yn=!1;function kc(c,d){switch(c){case"compositionend":return ds(d);case"keypress":return d.which!==32?null:(yf=!0,xo);case"textInput":return c=d.data,c===xo&&yf?null:c;default:return null}}function $h(c,d){if(yn)return c==="compositionend"||!dl&&xf(c,d)?(c=pc(),cl=ll=Ii=null,yn=!1,c):null;switch(c){case"paste":return null;case"keypress":if(!(d.ctrlKey||d.altKey||d.metaKey)||d.ctrlKey&&d.altKey){if(d.char&&1=d)return{node:g,offset:d-c};c=S}e:{for(;g;){if(g.nextSibling){g=g.nextSibling;break e}g=g.parentNode}g=void 0}g=ni(g)}}function Z(c,d){return c&&d?c===d?!0:c&&c.nodeType===3?!1:d&&d.nodeType===3?Z(c,d.parentNode):"contains"in c?c.contains(d):c.compareDocumentPosition?!!(c.compareDocumentPosition(d)&16):!1:!1}function ge(c){c=c!=null&&c.ownerDocument!=null&&c.ownerDocument.defaultView!=null?c.ownerDocument.defaultView:window;for(var d=Oi(c.document);d instanceof c.HTMLIFrameElement;){try{var g=typeof d.contentWindow.location.href=="string"}catch{g=!1}if(g)c=d.contentWindow;else break;d=Oi(c.document)}return d}function Te(c){var d=c&&c.nodeName&&c.nodeName.toLowerCase();return d&&(d==="input"&&(c.type==="text"||c.type==="search"||c.type==="tel"||c.type==="url"||c.type==="password")||d==="textarea"||c.contentEditable==="true")}var Be=pi&&"documentMode"in document&&11>=document.documentMode,Re=null,st=null,it=null,Ht=!1;function Vn(c,d,g){var S=g.window===g?g.document:g.nodeType===9?g:g.ownerDocument;Ht||Re==null||Re!==Oi(S)||(S=Re,"selectionStart"in S&&Te(S)?S={start:S.selectionStart,end:S.selectionEnd}:(S=(S.ownerDocument&&S.ownerDocument.defaultView||window).getSelection(),S={anchorNode:S.anchorNode,anchorOffset:S.anchorOffset,focusNode:S.focusNode,focusOffset:S.focusOffset}),it&&Va(it,S)||(it=S,S=bg(st,"onSelect"),0>=Q,R-=Q,ko=1<<32-tn(d)+R|g<an?(kn=wt,wt=null):kn=wt.sibling;var On=Ce(xe,wt,ke[an],Pe);if(On===null){wt===null&&(wt=kn);break}c&&wt&&On.alternate===null&&d(xe,wt),me=O(On,me,an),Mn===null?It=On:Mn.sibling=On,Mn=On,wt=kn}if(an===ke.length)return g(xe,wt),Sn&&gl(xe,an),It;if(wt===null){for(;anan?(kn=wt,wt=null):kn=wt.sibling;var Gc=Ce(xe,wt,On.value,Pe);if(Gc===null){wt===null&&(wt=kn);break}c&&wt&&Gc.alternate===null&&d(xe,wt),me=O(Gc,me,an),Mn===null?It=Gc:Mn.sibling=Gc,Mn=Gc,wt=kn}if(On.done)return g(xe,wt),Sn&&gl(xe,an),It;if(wt===null){for(;!On.done;an++,On=ke.next())On=Fe(xe,On.value,Pe),On!==null&&(me=O(On,me,an),Mn===null?It=On:Mn.sibling=On,Mn=On);return Sn&&gl(xe,an),It}for(wt=S(wt);!On.done;an++,On=ke.next())On=Ae(wt,xe,an,On.value,Pe),On!==null&&(c&&On.alternate!==null&&wt.delete(On.key===null?an:On.key),me=O(On,me,an),Mn===null?It=On:Mn.sibling=On,Mn=On);return c&&wt.forEach(function(UG){return d(xe,UG)}),Sn&&gl(xe,an),It}function tr(xe,me,ke,Pe){if(typeof ke=="object"&&ke!==null&&ke.type===k&&ke.key===null&&(ke=ke.props.children),typeof ke=="object"&&ke!==null){switch(ke.$$typeof){case m:e:{for(var It=ke.key;me!==null;){if(me.key===It){if(It=ke.type,It===k){if(me.tag===7){g(xe,me.sibling),Pe=R(me,ke.props.children),Pe.return=xe,xe=Pe;break e}}else if(me.elementType===It||typeof It=="object"&&It!==null&&It.$$typeof===j&&Qu(It)===me.type){g(xe,me.sibling),Pe=R(me,ke.props),Gh(Pe,ke),Pe.return=xe,xe=Pe;break e}g(xe,me);break}else d(xe,me);me=me.sibling}ke.type===k?(Pe=Uu(ke.props.children,xe.mode,Pe,ke.key),Pe.return=xe,xe=Pe):(Pe=Lm(ke.type,ke.key,ke.props,null,xe.mode,Pe),Gh(Pe,ke),Pe.return=xe,xe=Pe)}return Q(xe);case x:e:{for(It=ke.key;me!==null;){if(me.key===It)if(me.tag===4&&me.stateNode.containerInfo===ke.containerInfo&&me.stateNode.implementation===ke.implementation){g(xe,me.sibling),Pe=R(me,ke.children||[]),Pe.return=xe,xe=Pe;break e}else{g(xe,me);break}else d(xe,me);me=me.sibling}Pe=Fy(ke,xe.mode,Pe),Pe.return=xe,xe=Pe}return Q(xe);case j:return ke=Qu(ke),tr(xe,me,ke,Pe)}if(W(ke))return bt(xe,me,ke,Pe);if(B(ke)){if(It=B(ke),typeof It!="function")throw Error(r(150));return ke=It.call(ke),qt(xe,me,ke,Pe)}if(typeof ke.then=="function")return tr(xe,me,qm(ke),Pe);if(ke.$$typeof===y)return tr(xe,me,Bm(xe,ke),Pe);Um(xe,ke)}return typeof ke=="string"&&ke!==""||typeof ke=="number"||typeof ke=="bigint"?(ke=""+ke,me!==null&&me.tag===6?(g(xe,me.sibling),Pe=R(me,ke),Pe.return=xe,xe=Pe):(g(xe,me),Pe=Py(ke,xe.mode,Pe),Pe.return=xe,xe=Pe),Q(xe)):g(xe,me)}return function(xe,me,ke,Pe){try{Uh=0;var It=tr(xe,me,ke,Pe);return Rf=null,It}catch(wt){if(wt===Af||wt===Fm)throw wt;var Mn=Pi(29,wt,null,xe.mode);return Mn.lanes=Pe,Mn.return=xe,Mn}finally{}}}var Yu=$7(!0),B7=$7(!1),zc=!1;function Jy(c){c.updateQueue={baseState:c.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,lanes:0,hiddenCallbacks:null},callbacks:null}}function ex(c,d){c=c.updateQueue,d.updateQueue===c&&(d.updateQueue={baseState:c.baseState,firstBaseUpdate:c.firstBaseUpdate,lastBaseUpdate:c.lastBaseUpdate,shared:c.shared,callbacks:null})}function jc(c){return{lane:c,tag:0,payload:null,callback:null,next:null}}function Tc(c,d,g){var S=c.updateQueue;if(S===null)return null;if(S=S.shared,(In&2)!==0){var R=S.pending;return R===null?d.next=d:(d.next=R.next,R.next=d),S.pending=d,d=Dm(c),w7(c,null,g),d}return Om(c,S,d,g),Dm(c)}function Vh(c,d,g){if(d=d.updateQueue,d!==null&&(d=d.shared,(g&4194048)!==0)){var S=d.lanes;S&=c.pendingLanes,g|=S,d.lanes=g,Gn(c,g)}}function tx(c,d){var g=c.updateQueue,S=c.alternate;if(S!==null&&(S=S.updateQueue,g===S)){var R=null,O=null;if(g=g.firstBaseUpdate,g!==null){do{var Q={lane:g.lane,tag:g.tag,payload:g.payload,callback:null,next:null};O===null?R=O=Q:O=O.next=Q,g=g.next}while(g!==null);O===null?R=O=d:O=O.next=d}else R=O=d;g={baseState:S.baseState,firstBaseUpdate:R,lastBaseUpdate:O,shared:S.shared,callbacks:S.callbacks},c.updateQueue=g;return}c=g.lastBaseUpdate,c===null?g.firstBaseUpdate=d:c.next=d,g.lastBaseUpdate=d}var nx=!1;function Kh(){if(nx){var c=Tf;if(c!==null)throw c}}function Wh(c,d,g,S){nx=!1;var R=c.updateQueue;zc=!1;var O=R.firstBaseUpdate,Q=R.lastBaseUpdate,se=R.shared.pending;if(se!==null){R.shared.pending=null;var he=se,Se=he.next;he.next=null,Q===null?O=Se:Q.next=Se,Q=he;var Le=c.alternate;Le!==null&&(Le=Le.updateQueue,se=Le.lastBaseUpdate,se!==Q&&(se===null?Le.firstBaseUpdate=Se:se.next=Se,Le.lastBaseUpdate=he))}if(O!==null){var Fe=R.baseState;Q=0,Le=Se=he=null,se=O;do{var Ce=se.lane&-536870913,Ae=Ce!==se.lane;if(Ae?(wn&Ce)===Ce:(S&Ce)===Ce){Ce!==0&&Ce===jf&&(nx=!0),Le!==null&&(Le=Le.next={lane:0,tag:se.tag,payload:se.payload,callback:null,next:null});e:{var bt=c,qt=se;Ce=d;var tr=g;switch(qt.tag){case 1:if(bt=qt.payload,typeof bt=="function"){Fe=bt.call(tr,Fe,Ce);break e}Fe=bt;break e;case 3:bt.flags=bt.flags&-65537|128;case 0:if(bt=qt.payload,Ce=typeof bt=="function"?bt.call(tr,Fe,Ce):bt,Ce==null)break e;Fe=_({},Fe,Ce);break e;case 2:zc=!0}}Ce=se.callback,Ce!==null&&(c.flags|=64,Ae&&(c.flags|=8192),Ae=R.callbacks,Ae===null?R.callbacks=[Ce]:Ae.push(Ce))}else Ae={lane:Ce,tag:se.tag,payload:se.payload,callback:se.callback,next:null},Le===null?(Se=Le=Ae,he=Fe):Le=Le.next=Ae,Q|=Ce;if(se=se.next,se===null){if(se=R.shared.pending,se===null)break;Ae=se,se=Ae.next,Ae.next=null,R.lastBaseUpdate=Ae,R.shared.pending=null}}while(!0);Le===null&&(he=Fe),R.baseState=he,R.firstBaseUpdate=Se,R.lastBaseUpdate=Le,O===null&&(R.shared.lanes=0),Dc|=Q,c.lanes=Q,c.memoizedState=Fe}}function P7(c,d){if(typeof c!="function")throw Error(r(191,c));c.call(d)}function F7(c,d){var g=c.callbacks;if(g!==null)for(c.callbacks=null,c=0;cO?O:8;var Q=H.T,se={};H.T=se,xx(c,!1,d,g);try{var he=R(),Se=H.S;if(Se!==null&&Se(se,he),he!==null&&typeof he=="object"&&typeof he.then=="function"){var Le=MU(he,S);Yh(c,d,Le,Gi(c))}else Yh(c,d,S,Gi(c))}catch(Fe){Yh(c,d,{then:function(){},status:"rejected",reason:Fe},Gi())}finally{Y.p=O,Q!==null&&se.types!==null&&(Q.types=se.types),H.T=Q}}function BU(){}function bx(c,d,g,S){if(c.tag!==5)throw Error(r(476));var R=bC(c).queue;vC(c,R,d,te,g===null?BU:function(){return yC(c),g(S)})}function bC(c){var d=c.memoizedState;if(d!==null)return d;d={memoizedState:te,baseState:te,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:xl,lastRenderedState:te},next:null};var g={};return d.next={memoizedState:g,baseState:g,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:xl,lastRenderedState:g},next:null},c.memoizedState=d,c=c.alternate,c!==null&&(c.memoizedState=d),d}function yC(c){var d=bC(c);d.next===null&&(d=c.alternate.memoizedState),Yh(c,d.next.queue,{},Gi())}function yx(){return Ms(hp)}function xC(){return Wr().memoizedState}function wC(){return Wr().memoizedState}function PU(c){for(var d=c.return;d!==null;){switch(d.tag){case 24:case 3:var g=Gi();c=jc(g);var S=Tc(d,c,g);S!==null&&(ki(S,d,g),Vh(S,d,g)),d={cache:Qy()},c.payload=d;return}d=d.return}}function FU(c,d,g){var S=Gi();g={lane:S,revertLane:0,gesture:null,action:g,hasEagerState:!1,eagerState:null,next:null},eg(c)?SC(d,g):(g=$y(c,d,g,S),g!==null&&(ki(g,c,S),CC(g,d,S)))}function kC(c,d,g){var S=Gi();Yh(c,d,g,S)}function Yh(c,d,g,S){var R={lane:S,revertLane:0,gesture:null,action:g,hasEagerState:!1,eagerState:null,next:null};if(eg(c))SC(d,R);else{var O=c.alternate;if(c.lanes===0&&(O===null||O.lanes===0)&&(O=d.lastRenderedReducer,O!==null))try{var Q=d.lastRenderedState,se=O(Q,g);if(R.hasEagerState=!0,R.eagerState=se,Ts(se,Q))return Om(c,d,R,0),ar===null&&Mm(),!1}catch{}finally{}if(g=$y(c,d,R,S),g!==null)return ki(g,c,S),CC(g,d,S),!0}return!1}function xx(c,d,g,S){if(S={lane:2,revertLane:Jx(),gesture:null,action:S,hasEagerState:!1,eagerState:null,next:null},eg(c)){if(d)throw Error(r(479))}else d=$y(c,g,S,2),d!==null&&ki(d,c,2)}function eg(c){var d=c.alternate;return c===sn||d!==null&&d===sn}function SC(c,d){Of=Km=!0;var g=c.pending;g===null?d.next=d:(d.next=g.next,g.next=d),c.pending=d}function CC(c,d,g){if((g&4194048)!==0){var S=d.lanes;S&=c.pendingLanes,g|=S,d.lanes=g,Gn(c,g)}}var Zh={readContext:Ms,use:Xm,useCallback:Br,useContext:Br,useEffect:Br,useImperativeHandle:Br,useLayoutEffect:Br,useInsertionEffect:Br,useMemo:Br,useReducer:Br,useRef:Br,useState:Br,useDebugValue:Br,useDeferredValue:Br,useTransition:Br,useSyncExternalStore:Br,useId:Br,useHostTransitionStatus:Br,useFormState:Br,useActionState:Br,useOptimistic:Br,useMemoCache:Br,useCacheRefresh:Br};Zh.useEffectEvent=Br;var EC={readContext:Ms,use:Xm,useCallback:function(c,d){return ri().memoizedState=[c,d===void 0?null:d],c},useContext:Ms,useEffect:cC,useImperativeHandle:function(c,d,g){g=g!=null?g.concat([c]):null,Zm(4194308,4,dC.bind(null,d,c),g)},useLayoutEffect:function(c,d){return Zm(4194308,4,c,d)},useInsertionEffect:function(c,d){Zm(4,2,c,d)},useMemo:function(c,d){var g=ri();d=d===void 0?null:d;var S=c();if(Zu){Yt(!0);try{c()}finally{Yt(!1)}}return g.memoizedState=[S,d],S},useReducer:function(c,d,g){var S=ri();if(g!==void 0){var R=g(d);if(Zu){Yt(!0);try{g(d)}finally{Yt(!1)}}}else R=d;return S.memoizedState=S.baseState=R,c={pending:null,lanes:0,dispatch:null,lastRenderedReducer:c,lastRenderedState:R},S.queue=c,c=c.dispatch=FU.bind(null,sn,c),[S.memoizedState,c]},useRef:function(c){var d=ri();return c={current:c},d.memoizedState=c},useState:function(c){c=hx(c);var d=c.queue,g=kC.bind(null,sn,d);return d.dispatch=g,[c.memoizedState,g]},useDebugValue:gx,useDeferredValue:function(c,d){var g=ri();return vx(g,c,d)},useTransition:function(){var c=hx(!1);return c=vC.bind(null,sn,c.queue,!0,!1),ri().memoizedState=c,[!1,c]},useSyncExternalStore:function(c,d,g){var S=sn,R=ri();if(Sn){if(g===void 0)throw Error(r(407));g=g()}else{if(g=d(),ar===null)throw Error(r(349));(wn&127)!==0||K7(S,d,g)}R.memoizedState=g;var O={value:g,getSnapshot:d};return R.queue=O,cC(Q7.bind(null,S,O,c),[c]),S.flags|=2048,Lf(9,{destroy:void 0},W7.bind(null,S,O,g,d),null),g},useId:function(){var c=ri(),d=ar.identifierPrefix;if(Sn){var g=So,S=ko;g=(S&~(1<<32-tn(S)-1)).toString(32)+g,d="_"+d+"R_"+g,g=Wm++,0<\/script>",O=O.removeChild(O.firstChild);break;case"select":O=typeof S.is=="string"?Q.createElement("select",{is:S.is}):Q.createElement("select"),S.multiple?O.multiple=!0:S.size&&(O.size=S.size);break;default:O=typeof S.is=="string"?Q.createElement(R,{is:S.is}):Q.createElement(R)}}O[un]=d,O[Lt]=S;e:for(Q=d.child;Q!==null;){if(Q.tag===5||Q.tag===6)O.appendChild(Q.stateNode);else if(Q.tag!==4&&Q.tag!==27&&Q.child!==null){Q.child.return=Q,Q=Q.child;continue}if(Q===d)break e;for(;Q.sibling===null;){if(Q.return===null||Q.return===d)break e;Q=Q.return}Q.sibling.return=Q.return,Q=Q.sibling}d.stateNode=O;e:switch(Ds(O,R,S),R){case"button":case"input":case"select":case"textarea":S=!!S.autoFocus;break e;case"img":S=!0;break e;default:S=!1}S&&kl(d)}}return hr(d),Dx(d,d.type,c===null?null:c.memoizedProps,d.pendingProps,g),null;case 6:if(c&&d.stateNode!=null)c.memoizedProps!==S&&kl(d);else{if(typeof S!="string"&&d.stateNode===null)throw Error(r(166));if(c=ae.current,Nf(d)){if(c=d.stateNode,g=d.memoizedProps,S=null,R=Rs,R!==null)switch(R.tag){case 27:case 5:S=R.memoizedProps}c[un]=d,c=!!(c.nodeValue===g||S!==null&&S.suppressHydrationWarning===!0||G8(c.nodeValue,g)),c||Ec(d,!0)}else c=yg(c).createTextNode(S),c[un]=d,d.stateNode=c}return hr(d),null;case 31:if(g=d.memoizedState,c===null||c.memoizedState!==null){if(S=Nf(d),g!==null){if(c===null){if(!S)throw Error(r(318));if(c=d.memoizedState,c=c!==null?c.dehydrated:null,!c)throw Error(r(557));c[un]=d}else Gu(),(d.flags&128)===0&&(d.memoizedState=null),d.flags|=4;hr(d),c=!1}else g=Gy(),c!==null&&c.memoizedState!==null&&(c.memoizedState.hydrationErrors=g),c=!0;if(!c)return d.flags&256?(Hi(d),d):(Hi(d),null);if((d.flags&128)!==0)throw Error(r(558))}return hr(d),null;case 13:if(S=d.memoizedState,c===null||c.memoizedState!==null&&c.memoizedState.dehydrated!==null){if(R=Nf(d),S!==null&&S.dehydrated!==null){if(c===null){if(!R)throw Error(r(318));if(R=d.memoizedState,R=R!==null?R.dehydrated:null,!R)throw Error(r(317));R[un]=d}else Gu(),(d.flags&128)===0&&(d.memoizedState=null),d.flags|=4;hr(d),R=!1}else R=Gy(),c!==null&&c.memoizedState!==null&&(c.memoizedState.hydrationErrors=R),R=!0;if(!R)return d.flags&256?(Hi(d),d):(Hi(d),null)}return Hi(d),(d.flags&128)!==0?(d.lanes=g,d):(g=S!==null,c=c!==null&&c.memoizedState!==null,g&&(S=d.child,R=null,S.alternate!==null&&S.alternate.memoizedState!==null&&S.alternate.memoizedState.cachePool!==null&&(R=S.alternate.memoizedState.cachePool.pool),O=null,S.memoizedState!==null&&S.memoizedState.cachePool!==null&&(O=S.memoizedState.cachePool.pool),O!==R&&(S.flags|=2048)),g!==c&&g&&(d.child.flags|=8192),ig(d,d.updateQueue),hr(d),null);case 4:return oe(),c===null&&r2(d.stateNode.containerInfo),hr(d),null;case 10:return bl(d.type),hr(d),null;case 19:if(G(Kr),S=d.memoizedState,S===null)return hr(d),null;if(R=(d.flags&128)!==0,O=S.rendering,O===null)if(R)ep(S,!1);else{if(Pr!==0||c!==null&&(c.flags&128)!==0)for(c=d.child;c!==null;){if(O=Vm(c),O!==null){for(d.flags|=128,ep(S,!1),c=O.updateQueue,d.updateQueue=c,ig(d,c),d.subtreeFlags=0,c=g,g=d.child;g!==null;)k7(g,c),g=g.sibling;return V(Kr,Kr.current&1|2),Sn&&gl(d,S.treeForkCount),d.child}c=c.sibling}S.tail!==null&&we()>ug&&(d.flags|=128,R=!0,ep(S,!1),d.lanes=4194304)}else{if(!R)if(c=Vm(O),c!==null){if(d.flags|=128,R=!0,c=c.updateQueue,d.updateQueue=c,ig(d,c),ep(S,!0),S.tail===null&&S.tailMode==="hidden"&&!O.alternate&&!Sn)return hr(d),null}else 2*we()-S.renderingStartTime>ug&&g!==536870912&&(d.flags|=128,R=!0,ep(S,!1),d.lanes=4194304);S.isBackwards?(O.sibling=d.child,d.child=O):(c=S.last,c!==null?c.sibling=O:d.child=O,S.last=O)}return S.tail!==null?(c=S.tail,S.rendering=c,S.tail=c.sibling,S.renderingStartTime=we(),c.sibling=null,g=Kr.current,V(Kr,R?g&1|2:g&1),Sn&&gl(d,S.treeForkCount),c):(hr(d),null);case 22:case 23:return Hi(d),sx(),S=d.memoizedState!==null,c!==null?c.memoizedState!==null!==S&&(d.flags|=8192):S&&(d.flags|=8192),S?(g&536870912)!==0&&(d.flags&128)===0&&(hr(d),d.subtreeFlags&6&&(d.flags|=8192)):hr(d),g=d.updateQueue,g!==null&&ig(d,g.retryQueue),g=null,c!==null&&c.memoizedState!==null&&c.memoizedState.cachePool!==null&&(g=c.memoizedState.cachePool.pool),S=null,d.memoizedState!==null&&d.memoizedState.cachePool!==null&&(S=d.memoizedState.cachePool.pool),S!==g&&(d.flags|=2048),c!==null&&G(Wu),null;case 24:return g=null,c!==null&&(g=c.memoizedState.cache),d.memoizedState.cache!==g&&(d.flags|=2048),bl(es),hr(d),null;case 25:return null;case 30:return null}throw Error(r(156,d.tag))}function VU(c,d){switch(qy(d),d.tag){case 1:return c=d.flags,c&65536?(d.flags=c&-65537|128,d):null;case 3:return bl(es),oe(),c=d.flags,(c&65536)!==0&&(c&128)===0?(d.flags=c&-65537|128,d):null;case 26:case 27:case 5:return _e(d),null;case 31:if(d.memoizedState!==null){if(Hi(d),d.alternate===null)throw Error(r(340));Gu()}return c=d.flags,c&65536?(d.flags=c&-65537|128,d):null;case 13:if(Hi(d),c=d.memoizedState,c!==null&&c.dehydrated!==null){if(d.alternate===null)throw Error(r(340));Gu()}return c=d.flags,c&65536?(d.flags=c&-65537|128,d):null;case 19:return G(Kr),null;case 4:return oe(),null;case 10:return bl(d.type),null;case 22:case 23:return Hi(d),sx(),c!==null&&G(Wu),c=d.flags,c&65536?(d.flags=c&-65537|128,d):null;case 24:return bl(es),null;case 25:return null;default:return null}}function XC(c,d){switch(qy(d),d.tag){case 3:bl(es),oe();break;case 26:case 27:case 5:_e(d);break;case 4:oe();break;case 31:d.memoizedState!==null&&Hi(d);break;case 13:Hi(d);break;case 19:G(Kr);break;case 10:bl(d.type);break;case 22:case 23:Hi(d),sx(),c!==null&&G(Wu);break;case 24:bl(es)}}function tp(c,d){try{var g=d.updateQueue,S=g!==null?g.lastEffect:null;if(S!==null){var R=S.next;g=R;do{if((g.tag&c)===c){S=void 0;var O=g.create,Q=g.inst;S=O(),Q.destroy=S}g=g.next}while(g!==R)}}catch(se){Xn(d,d.return,se)}}function Mc(c,d,g){try{var S=d.updateQueue,R=S!==null?S.lastEffect:null;if(R!==null){var O=R.next;S=O;do{if((S.tag&c)===c){var Q=S.inst,se=Q.destroy;if(se!==void 0){Q.destroy=void 0,R=d;var he=g,Se=se;try{Se()}catch(Le){Xn(R,he,Le)}}}S=S.next}while(S!==O)}}catch(Le){Xn(d,d.return,Le)}}function YC(c){var d=c.updateQueue;if(d!==null){var g=c.stateNode;try{F7(d,g)}catch(S){Xn(c,c.return,S)}}}function ZC(c,d,g){g.props=Ju(c.type,c.memoizedProps),g.state=c.memoizedState;try{g.componentWillUnmount()}catch(S){Xn(c,d,S)}}function np(c,d){try{var g=c.ref;if(g!==null){switch(c.tag){case 26:case 27:case 5:var S=c.stateNode;break;case 30:S=c.stateNode;break;default:S=c.stateNode}typeof g=="function"?c.refCleanup=g(S):g.current=S}}catch(R){Xn(c,d,R)}}function Co(c,d){var g=c.ref,S=c.refCleanup;if(g!==null)if(typeof S=="function")try{S()}catch(R){Xn(c,d,R)}finally{c.refCleanup=null,c=c.alternate,c!=null&&(c.refCleanup=null)}else if(typeof g=="function")try{g(null)}catch(R){Xn(c,d,R)}else g.current=null}function JC(c){var d=c.type,g=c.memoizedProps,S=c.stateNode;try{e:switch(d){case"button":case"input":case"select":case"textarea":g.autoFocus&&S.focus();break e;case"img":g.src?S.src=g.src:g.srcSet&&(S.srcset=g.srcSet)}}catch(R){Xn(c,c.return,R)}}function Lx(c,d,g){try{var S=c.stateNode;hG(S,c.type,g,d),S[Lt]=d}catch(R){Xn(c,c.return,R)}}function e8(c){return c.tag===5||c.tag===3||c.tag===26||c.tag===27&&Pc(c.type)||c.tag===4}function Ix(c){e:for(;;){for(;c.sibling===null;){if(c.return===null||e8(c.return))return null;c=c.return}for(c.sibling.return=c.return,c=c.sibling;c.tag!==5&&c.tag!==6&&c.tag!==18;){if(c.tag===27&&Pc(c.type)||c.flags&2||c.child===null||c.tag===4)continue e;c.child.return=c,c=c.child}if(!(c.flags&2))return c.stateNode}}function $x(c,d,g){var S=c.tag;if(S===5||S===6)c=c.stateNode,d?(g.nodeType===9?g.body:g.nodeName==="HTML"?g.ownerDocument.body:g).insertBefore(c,d):(d=g.nodeType===9?g.body:g.nodeName==="HTML"?g.ownerDocument.body:g,d.appendChild(c),g=g._reactRootContainer,g!=null||d.onclick!==null||(d.onclick=Ir));else if(S!==4&&(S===27&&Pc(c.type)&&(g=c.stateNode,d=null),c=c.child,c!==null))for($x(c,d,g),c=c.sibling;c!==null;)$x(c,d,g),c=c.sibling}function ag(c,d,g){var S=c.tag;if(S===5||S===6)c=c.stateNode,d?g.insertBefore(c,d):g.appendChild(c);else if(S!==4&&(S===27&&Pc(c.type)&&(g=c.stateNode),c=c.child,c!==null))for(ag(c,d,g),c=c.sibling;c!==null;)ag(c,d,g),c=c.sibling}function t8(c){var d=c.stateNode,g=c.memoizedProps;try{for(var S=c.type,R=d.attributes;R.length;)d.removeAttributeNode(R[0]);Ds(d,S,g),d[un]=c,d[Lt]=g}catch(O){Xn(c,c.return,O)}}var Sl=!1,rs=!1,Bx=!1,n8=typeof WeakSet=="function"?WeakSet:Set,Ns=null;function KU(c,d){if(c=c.containerInfo,a2=Ng,c=ge(c),Te(c)){if("selectionStart"in c)var g={start:c.selectionStart,end:c.selectionEnd};else e:{g=(g=c.ownerDocument)&&g.defaultView||window;var S=g.getSelection&&g.getSelection();if(S&&S.rangeCount!==0){g=S.anchorNode;var R=S.anchorOffset,O=S.focusNode;S=S.focusOffset;try{g.nodeType,O.nodeType}catch{g=null;break e}var Q=0,se=-1,he=-1,Se=0,Le=0,Fe=c,Ce=null;t:for(;;){for(var Ae;Fe!==g||R!==0&&Fe.nodeType!==3||(se=Q+R),Fe!==O||S!==0&&Fe.nodeType!==3||(he=Q+S),Fe.nodeType===3&&(Q+=Fe.nodeValue.length),(Ae=Fe.firstChild)!==null;)Ce=Fe,Fe=Ae;for(;;){if(Fe===c)break t;if(Ce===g&&++Se===R&&(se=Q),Ce===O&&++Le===S&&(he=Q),(Ae=Fe.nextSibling)!==null)break;Fe=Ce,Ce=Fe.parentNode}Fe=Ae}g=se===-1||he===-1?null:{start:se,end:he}}else g=null}g=g||{start:0,end:0}}else g=null;for(o2={focusedElem:c,selectionRange:g},Ng=!1,Ns=d;Ns!==null;)if(d=Ns,c=d.child,(d.subtreeFlags&1028)!==0&&c!==null)c.return=d,Ns=c;else for(;Ns!==null;){switch(d=Ns,O=d.alternate,c=d.flags,d.tag){case 0:if((c&4)!==0&&(c=d.updateQueue,c=c!==null?c.events:null,c!==null))for(g=0;g title"))),Ds(O,S,g),O[un]=c,sr(O),S=O;break e;case"link":var Q=l9("link","href",R).get(S+(g.href||""));if(Q){for(var se=0;setr&&(Q=tr,tr=qt,qt=Q);var xe=wo(se,qt),me=wo(se,tr);if(xe&&me&&(Ae.rangeCount!==1||Ae.anchorNode!==xe.node||Ae.anchorOffset!==xe.offset||Ae.focusNode!==me.node||Ae.focusOffset!==me.offset)){var ke=Fe.createRange();ke.setStart(xe.node,xe.offset),Ae.removeAllRanges(),qt>tr?(Ae.addRange(ke),Ae.extend(me.node,me.offset)):(ke.setEnd(me.node,me.offset),Ae.addRange(ke))}}}}for(Fe=[],Ae=se;Ae=Ae.parentNode;)Ae.nodeType===1&&Fe.push({element:Ae,left:Ae.scrollLeft,top:Ae.scrollTop});for(typeof se.focus=="function"&&se.focus(),se=0;seg?32:g,H.T=null,g=Vx,Vx=null;var O=Ic,Q=jl;if(hs=0,Ff=Ic=null,jl=0,(In&6)!==0)throw Error(r(331));var se=In;if(In|=4,d8(O.current),u8(O,O.current,Q,g),In=se,lp(0,!1),Tt&&typeof Tt.onPostCommitFiberRoot=="function")try{Tt.onPostCommitFiberRoot(kt,O)}catch{}return!0}finally{Y.p=R,H.T=S,A8(c,d)}}function M8(c,d,g){d=ga(g,d),d=Cx(c.stateNode,d,2),c=Tc(c,d,2),c!==null&&(fn(c,2),Eo(c))}function Xn(c,d,g){if(c.tag===3)M8(c,c,g);else for(;d!==null;){if(d.tag===3){M8(d,c,g);break}else if(d.tag===1){var S=d.stateNode;if(typeof d.type.getDerivedStateFromError=="function"||typeof S.componentDidCatch=="function"&&(Lc===null||!Lc.has(S))){c=ga(g,c),g=OC(2),S=Tc(d,g,2),S!==null&&(DC(g,S,d,c),fn(S,2),Eo(S));break}}d=d.return}}function Xx(c,d,g){var S=c.pingCache;if(S===null){S=c.pingCache=new XU;var R=new Set;S.set(d,R)}else R=S.get(d),R===void 0&&(R=new Set,S.set(d,R));R.has(g)||(Hx=!0,R.add(g),c=tG.bind(null,c,d,g),d.then(c,c))}function tG(c,d,g){var S=c.pingCache;S!==null&&S.delete(d),c.pingedLanes|=c.suspendedLanes&g,c.warmLanes&=~g,ar===c&&(wn&g)===g&&(Pr===4||Pr===3&&(wn&62914560)===wn&&300>we()-cg?(In&2)===0&&Hf(c,0):qx|=g,Pf===wn&&(Pf=0)),Eo(c)}function O8(c,d){d===0&&(d=cn()),c=qu(c,d),c!==null&&(fn(c,d),Eo(c))}function nG(c){var d=c.memoizedState,g=0;d!==null&&(g=d.retryLane),O8(c,g)}function rG(c,d){var g=0;switch(c.tag){case 31:case 13:var S=c.stateNode,R=c.memoizedState;R!==null&&(g=R.retryLane);break;case 19:S=c.stateNode;break;case 22:S=c.stateNode._retryCache;break;default:throw Error(r(314))}S!==null&&S.delete(d),O8(c,g)}function sG(c,d){return Vt(c,d)}var mg=null,Uf=null,Yx=!1,gg=!1,Zx=!1,Bc=0;function Eo(c){c!==Uf&&c.next===null&&(Uf===null?mg=Uf=c:Uf=Uf.next=c),gg=!0,Yx||(Yx=!0,aG())}function lp(c,d){if(!Zx&&gg){Zx=!0;do for(var g=!1,S=mg;S!==null;){if(c!==0){var R=S.pendingLanes;if(R===0)var O=0;else{var Q=S.suspendedLanes,se=S.pingedLanes;O=(1<<31-tn(42|c)+1)-1,O&=R&~(Q&~se),O=O&201326741?O&201326741|1:O?O|2:0}O!==0&&(g=!0,$8(S,O))}else O=wn,O=Yr(S,S===ar?O:0,S.cancelPendingCommit!==null||S.timeoutHandle!==-1),(O&3)===0||zr(S,O)||(g=!0,$8(S,O));S=S.next}while(g);Zx=!1}}function iG(){D8()}function D8(){gg=Yx=!1;var c=0;Bc!==0&&mG()&&(c=Bc);for(var d=we(),g=null,S=mg;S!==null;){var R=S.next,O=L8(S,d);O===0?(S.next=null,g===null?mg=R:g.next=R,R===null&&(Uf=g)):(g=S,(c!==0||(O&3)!==0)&&(gg=!0)),S=R}hs!==0&&hs!==5||lp(c),Bc!==0&&(Bc=0)}function L8(c,d){for(var g=c.suspendedLanes,S=c.pingedLanes,R=c.expirationTimes,O=c.pendingLanes&-62914561;0se)break;var Le=he.transferSize,Fe=he.initiatorType;Le&&V8(Fe)&&(he=he.responseEnd,Q+=Le*(he"u"?null:document;function s9(c,d,g){var S=Gf;if(S&&typeof d=="string"&&d){var R=vr(d);R='link[rel="'+c+'"][href="'+R+'"]',typeof g=="string"&&(R+='[crossorigin="'+g+'"]'),r9.has(R)||(r9.add(R),c={rel:c,crossOrigin:g,href:d},S.querySelector(R)===null&&(d=S.createElement("link"),Ds(d,"link",c),sr(d),S.head.appendChild(d)))}}function CG(c){Tl.D(c),s9("dns-prefetch",c,null)}function EG(c,d){Tl.C(c,d),s9("preconnect",c,d)}function NG(c,d,g){Tl.L(c,d,g);var S=Gf;if(S&&c&&d){var R='link[rel="preload"][as="'+vr(d)+'"]';d==="image"&&g&&g.imageSrcSet?(R+='[imagesrcset="'+vr(g.imageSrcSet)+'"]',typeof g.imageSizes=="string"&&(R+='[imagesizes="'+vr(g.imageSizes)+'"]')):R+='[href="'+vr(c)+'"]';var O=R;switch(d){case"style":O=Vf(c);break;case"script":O=Kf(c)}ka.has(O)||(c=_({rel:"preload",href:d==="image"&&g&&g.imageSrcSet?void 0:c,as:d},g),ka.set(O,c),S.querySelector(R)!==null||d==="style"&&S.querySelector(fp(O))||d==="script"&&S.querySelector(dp(O))||(d=S.createElement("link"),Ds(d,"link",c),sr(d),S.head.appendChild(d)))}}function zG(c,d){Tl.m(c,d);var g=Gf;if(g&&c){var S=d&&typeof d.as=="string"?d.as:"script",R='link[rel="modulepreload"][as="'+vr(S)+'"][href="'+vr(c)+'"]',O=R;switch(S){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":O=Kf(c)}if(!ka.has(O)&&(c=_({rel:"modulepreload",href:c},d),ka.set(O,c),g.querySelector(R)===null)){switch(S){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":if(g.querySelector(dp(O)))return}S=g.createElement("link"),Ds(S,"link",c),sr(S),g.head.appendChild(S)}}}function jG(c,d,g){Tl.S(c,d,g);var S=Gf;if(S&&c){var R=Zs(S).hoistableStyles,O=Vf(c);d=d||"default";var Q=R.get(O);if(!Q){var se={loading:0,preload:null};if(Q=S.querySelector(fp(O)))se.loading=5;else{c=_({rel:"stylesheet",href:c,"data-precedence":d},g),(g=ka.get(O))&&h2(c,g);var he=Q=S.createElement("link");sr(he),Ds(he,"link",c),he._p=new Promise(function(Se,Le){he.onload=Se,he.onerror=Le}),he.addEventListener("load",function(){se.loading|=1}),he.addEventListener("error",function(){se.loading|=2}),se.loading|=4,wg(Q,d,S)}Q={type:"stylesheet",instance:Q,count:1,state:se},R.set(O,Q)}}}function TG(c,d){Tl.X(c,d);var g=Gf;if(g&&c){var S=Zs(g).hoistableScripts,R=Kf(c),O=S.get(R);O||(O=g.querySelector(dp(R)),O||(c=_({src:c,async:!0},d),(d=ka.get(R))&&p2(c,d),O=g.createElement("script"),sr(O),Ds(O,"link",c),g.head.appendChild(O)),O={type:"script",instance:O,count:1,state:null},S.set(R,O))}}function AG(c,d){Tl.M(c,d);var g=Gf;if(g&&c){var S=Zs(g).hoistableScripts,R=Kf(c),O=S.get(R);O||(O=g.querySelector(dp(R)),O||(c=_({src:c,async:!0,type:"module"},d),(d=ka.get(R))&&p2(c,d),O=g.createElement("script"),sr(O),Ds(O,"link",c),g.head.appendChild(O)),O={type:"script",instance:O,count:1,state:null},S.set(R,O))}}function i9(c,d,g,S){var R=(R=ae.current)?xg(R):null;if(!R)throw Error(r(446));switch(c){case"meta":case"title":return null;case"style":return typeof g.precedence=="string"&&typeof g.href=="string"?(d=Vf(g.href),g=Zs(R).hoistableStyles,S=g.get(d),S||(S={type:"style",instance:null,count:0,state:null},g.set(d,S)),S):{type:"void",instance:null,count:0,state:null};case"link":if(g.rel==="stylesheet"&&typeof g.href=="string"&&typeof g.precedence=="string"){c=Vf(g.href);var O=Zs(R).hoistableStyles,Q=O.get(c);if(Q||(R=R.ownerDocument||R,Q={type:"stylesheet",instance:null,count:0,state:{loading:0,preload:null}},O.set(c,Q),(O=R.querySelector(fp(c)))&&!O._p&&(Q.instance=O,Q.state.loading=5),ka.has(c)||(g={rel:"preload",as:"style",href:g.href,crossOrigin:g.crossOrigin,integrity:g.integrity,media:g.media,hrefLang:g.hrefLang,referrerPolicy:g.referrerPolicy},ka.set(c,g),O||RG(R,c,g,Q.state))),d&&S===null)throw Error(r(528,""));return Q}if(d&&S!==null)throw Error(r(529,""));return null;case"script":return d=g.async,g=g.src,typeof g=="string"&&d&&typeof d!="function"&&typeof d!="symbol"?(d=Kf(g),g=Zs(R).hoistableScripts,S=g.get(d),S||(S={type:"script",instance:null,count:0,state:null},g.set(d,S)),S):{type:"void",instance:null,count:0,state:null};default:throw Error(r(444,c))}}function Vf(c){return'href="'+vr(c)+'"'}function fp(c){return'link[rel="stylesheet"]['+c+"]"}function a9(c){return _({},c,{"data-precedence":c.precedence,precedence:null})}function RG(c,d,g,S){c.querySelector('link[rel="preload"][as="style"]['+d+"]")?S.loading=1:(d=c.createElement("link"),S.preload=d,d.addEventListener("load",function(){return S.loading|=1}),d.addEventListener("error",function(){return S.loading|=2}),Ds(d,"link",g),sr(d),c.head.appendChild(d))}function Kf(c){return'[src="'+vr(c)+'"]'}function dp(c){return"script[async]"+c}function o9(c,d,g){if(d.count++,d.instance===null)switch(d.type){case"style":var S=c.querySelector('style[data-href~="'+vr(g.href)+'"]');if(S)return d.instance=S,sr(S),S;var R=_({},g,{"data-href":g.href,"data-precedence":g.precedence,href:null,precedence:null});return S=(c.ownerDocument||c).createElement("style"),sr(S),Ds(S,"style",R),wg(S,g.precedence,c),d.instance=S;case"stylesheet":R=Vf(g.href);var O=c.querySelector(fp(R));if(O)return d.state.loading|=4,d.instance=O,sr(O),O;S=a9(g),(R=ka.get(R))&&h2(S,R),O=(c.ownerDocument||c).createElement("link"),sr(O);var Q=O;return Q._p=new Promise(function(se,he){Q.onload=se,Q.onerror=he}),Ds(O,"link",S),d.state.loading|=4,wg(O,g.precedence,c),d.instance=O;case"script":return O=Kf(g.src),(R=c.querySelector(dp(O)))?(d.instance=R,sr(R),R):(S=g,(R=ka.get(O))&&(S=_({},g),p2(S,R)),c=c.ownerDocument||c,R=c.createElement("script"),sr(R),Ds(R,"link",S),c.head.appendChild(R),d.instance=R);case"void":return null;default:throw Error(r(443,d.type))}else d.type==="stylesheet"&&(d.state.loading&4)===0&&(S=d.instance,d.state.loading|=4,wg(S,g.precedence,c));return d.instance}function wg(c,d,g){for(var S=g.querySelectorAll('link[rel="stylesheet"][data-precedence],style[data-precedence]'),R=S.length?S[S.length-1]:null,O=R,Q=0;Q title"):null)}function MG(c,d,g){if(g===1||d.itemProp!=null)return!1;switch(c){case"meta":case"title":return!0;case"style":if(typeof d.precedence!="string"||typeof d.href!="string"||d.href==="")break;return!0;case"link":if(typeof d.rel!="string"||typeof d.href!="string"||d.href===""||d.onLoad||d.onError)break;switch(d.rel){case"stylesheet":return c=d.disabled,typeof d.precedence=="string"&&c==null;default:return!0}case"script":if(d.async&&typeof d.async!="function"&&typeof d.async!="symbol"&&!d.onLoad&&!d.onError&&d.src&&typeof d.src=="string")return!0}return!1}function u9(c){return!(c.type==="stylesheet"&&(c.state.loading&3)===0)}function OG(c,d,g,S){if(g.type==="stylesheet"&&(typeof S.media!="string"||matchMedia(S.media).matches!==!1)&&(g.state.loading&4)===0){if(g.instance===null){var R=Vf(S.href),O=d.querySelector(fp(R));if(O){d=O._p,d!==null&&typeof d=="object"&&typeof d.then=="function"&&(c.count++,c=Sg.bind(c),d.then(c,c)),g.state.loading|=4,g.instance=O,sr(O);return}O=d.ownerDocument||d,S=a9(S),(R=ka.get(R))&&h2(S,R),O=O.createElement("link"),sr(O);var Q=O;Q._p=new Promise(function(se,he){Q.onload=se,Q.onerror=he}),Ds(O,"link",S),g.instance=O}c.stylesheets===null&&(c.stylesheets=new Map),c.stylesheets.set(g,d),(d=g.state.preload)&&(g.state.loading&3)===0&&(c.count++,g=Sg.bind(c),d.addEventListener("load",g),d.addEventListener("error",g))}}var m2=0;function DG(c,d){return c.stylesheets&&c.count===0&&Eg(c,c.stylesheets),0m2?50:800)+d);return c.unsuspend=g,function(){c.unsuspend=null,clearTimeout(S),clearTimeout(R)}}:null}function Sg(){if(this.count--,this.count===0&&(this.imgCount===0||!this.waitingForImages)){if(this.stylesheets)Eg(this,this.stylesheets);else if(this.unsuspend){var c=this.unsuspend;this.unsuspend=null,c()}}}var Cg=null;function Eg(c,d){c.stylesheets=null,c.unsuspend!==null&&(c.count++,Cg=new Map,d.forEach(LG,c),Cg=null,Sg.call(c))}function LG(c,d){if(!(d.state.loading&4)){var g=Cg.get(c);if(g)var S=g.get(null);else{g=new Map,Cg.set(c,g);for(var R=c.querySelectorAll("link[data-precedence],style[data-precedence]"),O=0;O"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(e)}catch(n){console.error(n)}}return e(),E2.exports=OV(),E2.exports}var LV=DV();const IV=!1;var cO=T.useLayoutEffect;function $V(e,n,t){T.useEffect(()=>{if(!e.current||t||typeof IntersectionObserver!="function")return()=>n();const r=new IntersectionObserver(s=>{n(s.pop())},{rootMargin:"100px"});return r.observe(e.current),()=>{r.disconnect(),n()}},[n,t,e])}function BV(e){const n=T.useRef(null);return T.useImperativeHandle(e,()=>n.current,[]),n}function l0(e){return e[e.length-1]}function Kd(e,n){return typeof e=="function"?e(n):e}const uO=Object.prototype.hasOwnProperty,PV=Object.prototype.propertyIsEnumerable;function _O(e){for(const n in e)if(uO.call(e,n))return!0;return!1}const FV=()=>Object.create(null),n_=(e,n)=>p_(e,n,FV);function p_(e,n,t=()=>({}),r=0){if(e===n)return e;if(r>500)return n;const s=n,i=Q9(e)&&Q9(s);if(!i&&!(iv(e)&&iv(s)))return s;const a=i?e:K9(e);if(!a)return s;const o=i?s:K9(s);if(!o)return s;const l=a.length,u=o.length,h=i?new Array(u):t();let _=0;for(let p=0;p"u")return!0;const t=n.prototype;return!(!W9(t)||!t.hasOwnProperty("isPrototypeOf"))}function W9(e){return Object.prototype.toString.call(e)==="[object Object]"}function Q9(e){return Array.isArray(e)&&e.length===Object.keys(e).length}function hu(e,n,t){if(e===n)return!0;if(typeof e!=typeof n)return!1;if(Array.isArray(e)&&Array.isArray(n)){if(e.length!==n.length)return!1;for(let r=0,s=e.length;rs||!hu(e[a],n[a],t)))return!1;return s===i}return!1}const HV=/[\x00-\x1f\x7f"<>`{}]/g;function qV(e){return e.replace(HV,n=>"%"+n.charCodeAt(0).toString(16).toUpperCase().padStart(2,"0"))}function X9(e){let n;try{n=decodeURI(e)}catch{n=e.replaceAll(/%[0-9A-F]{2}/gi,t=>{try{return decodeURI(t)}catch{return t}})}return qV(n)}const UV=["http:","https:","mailto:","tel:"];function av(e,n){if(!e)return!1;try{const t=new URL(e);return!n.has(t.protocol)}catch{return!1}}function xp(e){if(!e)return{path:e,handledProtocolRelativeURL:!1};if(!/[%\\\x00-\x1f\x7f]/.test(e)&&!e.startsWith("//"))return{path:e,handledProtocolRelativeURL:!1};const n=/%25|%5C/gi;let t=0,r="",s;for(;(s=n.exec(e))!==null;)r+=X9(e.slice(t,s.index))+s[0],t=n.lastIndex;r=r+X9(t?e.slice(t):e);let i=!1;return r.startsWith("//")&&(i=!0,r="/"+r.replace(/^\/+/,"")),{path:r,handledProtocolRelativeURL:i}}function GV(e){return/\s|[^\u0000-\u007F]/.test(e)?e.replace(/\s|[^\u0000-\u007F]/gu,encodeURIComponent):e}function VV(e,n){if(e===n)return!0;if(e.length!==n.length)return!1;for(let t=0;t{i.next&&(i.prev?(i.prev.next=i.next,i.next.prev=i.prev,i.next=void 0,r&&(r.next=i,i.prev=r)):(i.next.prev=void 0,t=i.next,i.next=void 0,r&&(i.prev=r,r.next=i)),r=i)};return{get(i){const a=n.get(i);if(a)return s(a),a.value},set(i,a){if(n.size>=e&&t){const l=t;n.delete(l.key),l.next&&(t=l.next,l.next.prev=void 0),l===r&&(r=void 0)}const o=n.get(i);if(o)o.value=a,s(o);else{const l={key:i,value:a,prev:r};r&&(r.next=l),r=l,t||(t=l),n.set(i,l)}},clear(){n.clear(),t=void 0,r=void 0}}}const _u=4,fO=5;function dO(e,n,t=new Uint16Array(6)){const r=e.indexOf("/",n),s=r===-1?e.length:r,i=e.substring(n,s);if(!i||!i.includes("$"))return t[0]=0,t[1]=n,t[2]=n,t[3]=s,t[4]=s,t[5]=s,t;if(i==="$"){const l=e.length;return t[0]=2,t[1]=n,t[2]=n,t[3]=l,t[4]=l,t[5]=l,t}if(i.charCodeAt(0)===36)return t[0]=1,t[1]=n,t[2]=n+1,t[3]=s,t[4]=s,t[5]=s,t;const a=i.indexOf("{");let o;if(a!==-1&&a+1!I.parse&&I.caseSensitive===j&&I.prefix===N&&I.suffix===A));if(L)w=L;else{const I=KV(E,_,j,N,A);w=I,I.parent=s,I.depth=i;let B;E===1?B=s.dynamic??(s.dynamic=[]):E===3?B=s.optional??(s.optional=[]):B=s.wildcard??(s.wildcard=[]),B.push(I),B.length===2&&(a==null||a.push(B))}break}}s=w}if(k&&t.children&&!t.isRoot&&t.id&&t.id.charCodeAt(t.id.lastIndexOf("/")+1)===95){const b=pd(_);b.kind=fO,b.parent=s,i++,b.depth=i,s.pathless??(s.pathless=[]),s.pathless.push(b),s=b}const v=(t.path||!t.children)&&!t.isRoot;if(v&&_.endsWith("/")){const b=pd(_);b.kind=_u,b.parent=s,i++,b.depth=i,s.index=b,s=b}s.parse=k??null,s.priority=((h=p==null?void 0:p.params)==null?void 0:h.priority)??0,v&&!s.route&&(s.route=t,s.fullPath=_)}if(t.children)for(const _ of t.children)ub(e,n,_,l,s,i,a,o)}function hO(e,n){if(e.parse&&!n.parse)return-1;if(!e.parse&&n.parse)return 1;if(e.parse&&n.parse&&(e.priority||n.priority))return n.priority-e.priority;if(e.prefix&&n.prefix&&e.prefix!==n.prefix){if(e.prefix.startsWith(n.prefix))return-1;if(n.prefix.startsWith(e.prefix))return 1}if(e.suffix&&n.suffix&&e.suffix!==n.suffix){if(e.suffix.endsWith(n.suffix))return-1;if(n.suffix.endsWith(e.suffix))return 1}return e.prefix&&!n.prefix?-1:!e.prefix&&n.prefix?1:e.suffix&&!n.suffix?-1:!e.suffix&&n.suffix?1:e.caseSensitive&&!n.caseSensitive?-1:!e.caseSensitive&&n.caseSensitive?1:0}function pd(e){return{kind:0,depth:0,pathless:null,index:null,static:null,staticInsensitive:null,dynamic:null,optional:null,wildcard:null,route:null,fullPath:e,parent:null,parse:null,priority:0}}function KV(e,n,t,r,s){return{kind:e,depth:0,pathless:null,index:null,static:null,staticInsensitive:null,dynamic:null,optional:null,wildcard:null,route:null,fullPath:n,parent:null,parse:null,priority:0,caseSensitive:t,prefix:r,suffix:s}}function WV(e,n){const t=pd("/"),r=new Uint16Array(6),s=[];for(const i of e)ub(!1,r,i,1,t,0,s);for(const i of s)i.sort(hO);n.masksTree=t,n.flatCache=ov(1e3)}function QV(e,n){e||(e="/");const t=n.flatCache.get(e);if(t!==void 0)return t;const r=gk(e,n.masksTree);return n.flatCache.set(e,r),r}function XV(e,n,t,r,s){e||(e="/"),r||(r="/");const i=n?`case\0${e}`:e;let a=s.singleCache.get(i);return a||(a=pd("/"),ub(n,new Uint16Array(6),{from:e},1,a,0),s.singleCache.set(i,a)),gk(r,a,t)}function YV(e,n,t=!1){const r=t?e:`nofuzz\0${e}`,s=n.matchCache.get(r);if(s!==void 0)return s;e||(e="/");let i;try{i=gk(e,n.segmentTree,t)}catch(a){if(a instanceof URIError)i=null;else throw a}return i&&(i.branch=mO(i.route)),n.matchCache.set(r,i),i}function ZV(e){return e==="/"?e:e.replace(/\/{1,}$/,"")}function JV(e,n=!1,t){const r=pd(e.fullPath),s=new Uint16Array(6),i=[],a={},o={};let l=0;ub(n,s,e,1,r,0,i,u=>{if(t==null||t(u,l),u.id in a&&mk(),a[u.id]=u,l!==0&&u.path){const h=ZV(u.fullPath);(!o[h]||u.fullPath.endsWith("/"))&&(o[h]=u)}l++});for(const u of i)u.sort(hO);return{processedTree:{segmentTree:r,singleCache:ov(1e3),matchCache:ov(1e3),flatCache:null,masksTree:null},routesById:a,routesByPath:o}}function gk(e,n,t=!1){const r=e.split("/"),s=tK(e,r,n,t);if(!s)return null;const[i]=pO(e,r,s);return{route:s.node.route,rawParams:i}}function pO(e,n,t){var h,_,p,m;const r=eK(t.node);let s=null;const i=Object.create(null);let a=((h=t.extract)==null?void 0:h.part)??0,o=((_=t.extract)==null?void 0:_.node)??0,l=((p=t.extract)==null?void 0:p.path)??0,u=((m=t.extract)==null?void 0:m.segment)??0;for(;o=0;N--){const A=_.wildcard[N],{prefix:j,suffix:M}=A;if(!(j&&(y||!(A.caseSensitive?C:E??(E=C.toLowerCase())).startsWith(j)))){if(M){if(y)continue;const L=n.slice(p).join("/"),I=L.slice(-M.length);if((A.caseSensitive?I:I.toLowerCase())!==M||L.length-M.length=0;A--){const j=_.optional[A];o.push({node:j,index:p,skipped:N,statics:x,dynamics:k,optionals:v,extract:b,rawParams:w})}if(!y)for(let A=_.optional.length-1;A>=0;A--){const j=_.optional[A],{prefix:M,suffix:L}=j;if(M||L){const I=j.caseSensitive?C:E??(E=C.toLowerCase());if(M&&!I.startsWith(M)||L&&I.indexOf(L,I.length-L.length)=0;N--){const A=_.dynamic[N],{prefix:j,suffix:M}=A;if(j||M){const L=A.caseSensitive?C:E??(E=C.toLowerCase());if(j&&!L.startsWith(j)||M&&L.indexOf(M,L.length-M.length)=0;N--){const A=_.pathless[N];o.push({node:A,index:p,skipped:m,statics:x,dynamics:k,optionals:v,extract:b,rawParams:w})}}if(u)return u;if(r&&l){let h=l.index;for(let p=0;pe.statics||n.statics===e.statics&&(n.dynamics>e.dynamics||n.dynamics===e.dynamics&&(n.optionals>e.optionals||n.optionals===e.optionals&&((n.node.kind===_u)>(e.node.kind===_u)||n.node.kind===_u==(e.node.kind===_u)&&n.node.depth>e.node.depth))):!0}function A1(e){return R1(e.filter(n=>n!==void 0).join("/"))}function R1(e){return e.replace(/\/{2,}/g,"/")}function gO(e){return e==="/"?e:e.replace(/^\/{1,}/,"")}function Vl(e){const n=e.length;return n>1&&e[n-1]==="/"?e.replace(/\/{1,}$/,""):e}function vO(e){return Vl(gO(e))}function lv(e,n){return e!=null&&e.endsWith("/")&&e!=="/"&&e!==`${n}/`?e.slice(0,-1):e}function rK(e,n,t){return lv(e,t)===lv(n,t)}function sK({base:e,to:n,trailingSlash:t="never",cache:r}){if(n.includes("//")&&(n=R1(n)),n.startsWith("/"))return n.length===1||t==="preserve"?n:t==="always"?n.endsWith("/")?n:`${n}/`:n.endsWith("/")?n.slice(0,-1):n;const s=n===".";let i;if(r){i=s?e:e+"\0"+n;const u=r.get(i);if(u)return u}let a;if(s)a=e.split("/");else{for(e.includes("//")&&(e=R1(e)),a=e.split("/");a.length>1&&l0(a)==="";)a.pop();const u=n.split("/");for(let h=0,_=u.length;h<_;h++){const p=u[h];p===""?h?h===_-1&&a.push(p):a=[p]:p===".."?a.length>1?a.pop():a=[""]:p==="."||a.push(p)}}a.length>1&&(l0(a)===""?t==="never"&&a.pop():t==="always"&&a.push(""));const o=a.join("/"),l=(s?R1(o):o)||"/";return i&&r&&r.set(i,l),l}function iK(e){const n=new Map(e.map(s=>[encodeURIComponent(s),s])),t=Array.from(n.keys()).map(s=>s.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")).join("|"),r=new RegExp(t,"g");return s=>s.replace(r,i=>n.get(i)??i)}function T2(e,n,t){const r=n[e];return typeof r!="string"?r:e==="_splat"?/^[a-zA-Z0-9\-._~!/]*$/.test(r)?r:r.split("/").map(s=>J9(s,t)).join("/"):J9(r,t)}function Z9({path:e,params:n,decoder:t,...r}){let s=!1;const i=Object.create(null);if(!e||e==="/")return{interpolatedPath:"/",usedParams:i,isMissingParams:s};if(!e.includes("$"))return{interpolatedPath:e,usedParams:i,isMissingParams:s};const a=e.length;let o=0,l,u="";for(;oe.state.__TSR_key||e.href;function fK(e){const n=e.getAttribute(eE);if(n)return`[${eE}="${n}"]`;let t="",r=e,s;for(;s=r.parentNode;){let i=1,a=r;for(;a=a.previousElementSibling;)i++;const o=`${r.localName}:nth-child(${i})`;t=t?`${o} > ${t}`:o,r=s}return t}let Ig=!1;const M1="window";function F4(e){try{return typeof e=="function"?e():document.querySelector(e)}catch{}}function tE(e){const n=new Set;for(const t of e){if(t===M1)continue;const r=F4(t);r&&n.add(r)}return n}function dK(e,n){const t=e.options.scrollRestoration,r=e._scroll;t&&(r.restoring=!0);const s=e.options.getScrollRestorationKey||_K,i=new Set,a=o=>{const l=Jc[o]||(Jc[o]={});for(const u of i)u===document?l[M1]={scrollX,scrollY}:u.isConnected&&(l[fK(u)]={scrollX:u.scrollLeft,scrollY:u.scrollTop})};t&&!r.restoration&&(r.restoration=!0,Ig=!1,history.scrollRestoration="manual",document.addEventListener("scroll",o=>{Ig||i.add(o.target)},!0),e.subscribe("onBeforeLoad",o=>{o.fromLocation&&a(s(o.fromLocation)),i.clear()}),addEventListener("pagehide",()=>{a(s(e.stores.resolvedLocation.get()??e.stores.location.get())),uK()})),!r.reset&&(r.reset=!0,e.subscribe("onRendered",o=>{var k;const l=e.options.scrollRestorationBehavior,u=e.options.scrollToTopSelectors,h=r.next,_=r.hash;let p;if(i.clear(),r.next=!0,r.hash=!1,typeof e.options.scrollRestoration=="function"&&!e.options.scrollRestoration({location:e.latestLocation}))return;const m=s(o.toLocation),x=o.fromLocation&&s(o.fromLocation);if(r.restoring&&x&&x!==m){const v=Jc[x];if(v){let b=Jc[m];for(const w in v){if(w===M1){if(h)continue}else{const y=F4(w);if(!y||h&&u&&(p??(p=tE(u)),p.has(y)))continue}b||(b=Jc[m]={}),b[w]??(b[w]=v[w])}}}Ig=!0;try{const v=o.toLocation.hash,b=o.toLocation.state.__hashScrollIntoViewOptions??!0;let w=!1;if(h){!v&&u&&(p??(p=tE(u)));const y=v&&b&&_,C=r.restoring?Jc[m]:void 0;if(C)for(const E in C){const{scrollX:N,scrollY:A}=C[E];if(E===M1){if(y)continue;scrollTo({top:A,left:N,behavior:l}),w=!0}else{const j=F4(E);j&&(j.scrollLeft=N,j.scrollTop=A,p==null||p.delete(j))}}if(!v){const E={top:0,left:0,behavior:l};if(w||scrollTo(E),p)for(const N of p)N.scrollTo(E)}}!w&&v&&b&&((k=document.getElementById(v))==null||k.scrollIntoView(b))}finally{Ig=!1}}))}function hK(e,n=String){const t=new URLSearchParams;for(const r in e){const s=e[r];s!==void 0&&t.set(r,n(s))}return t.toString()}function A2(e){return e?e==="false"?!1:e==="true"?!0:+e*0===0&&+e+""===e?+e:e:""}function pK(e){const n=new URLSearchParams(e),t=Object.create(null);for(const[r,s]of n.entries()){const i=t[r];i==null?t[r]=A2(s):Array.isArray(i)?i.push(A2(s)):t[r]=[i,A2(s)]}return t}const mK=/^(?:\s|["[{\d-]|fa|nu|tr)/,gK=bK(JSON.parse),vK=yK(JSON.stringify,JSON.parse);function bK(e){return n=>{n[0]==="?"&&(n=n.substring(1));const t=pK(n);for(const r in t){const s=t[r];if(typeof s=="string")try{t[r]=e(s)}catch{}}return t}}function yK(e,n){const t=n===JSON.parse;function r(s){if(s&&typeof s=="object")try{return e(s)}catch{}else if(n&&typeof s=="string"){if(t&&!mK.test(s))return s;try{return n(s),e(s)}catch{}}return s}return s=>{const i=hK(s,r);return i?`?${i}`:""}}const gd="__root__";function xK(e){if(e.statusCode=e.statusCode||e.code||307,!e.reloadDocument&&typeof e.href=="string")try{new URL(e.href),e.reloadDocument=!0}catch{}const n=new Headers(e.headers);e.href&&n.get("Location")===null&&n.set("Location",e.href);const t=new Response(null,{status:e.statusCode,headers:n});if(t.options=e,e.throw)throw t;return t}function bO(e){return e instanceof Response&&!!e.options}function wK(e){return{input:({url:n})=>{for(const t of e)n=H4(t,n);return n},output:({url:n})=>{for(let t=e.length-1;t>=0;t--)n=yO(e[t],n);return n}}}function kK(e){const n=vO(e.basepath),t=`/${n}`,r=e.caseSensitive?t:t.toLowerCase(),s=`${r}/`;return{input:({url:i})=>{const a=e.caseSensitive?i.pathname:i.pathname.toLowerCase();return a===r?i.pathname="/":a.startsWith(s)&&(i.pathname=i.pathname.slice(t.length)),i},output:({url:i})=>(i.pathname=A1(["/",n,i.pathname]),i)}}function H4(e,n){var r;const t=(r=e==null?void 0:e.input)==null?void 0:r.call(e,{url:n});if(t){if(typeof t=="string")return new URL(t);if(t instanceof URL)return t}return n}function yO(e,n){var r;const t=(r=e==null?void 0:e.output)==null?void 0:r.call(e,{url:n});if(t){if(typeof t=="string")return new URL(t);if(t instanceof URL)return t}return n}function SK(e,n){const{createMutableStore:t,createReadonlyStore:r,batch:s}=n,i=new Map,a=t("idle"),o=t(e),l=t(void 0),u=t([]),h=r(()=>u.get().map(k=>i.get(k).get())),_=r(()=>({status:a.get(),isLoading:a.get()==="pending",matches:h.get(),location:o.get(),resolvedLocation:l.get()}));function p(k){let v=i.get(k);return v||(v=t(void 0),i.set(k,v)),v}const m={status:a,location:o,resolvedLocation:l,ids:u,matches:h,byRoute:i,__store:_,getMatchStore:p,setMatches:x};function x(k){const v=u.get(),b=k.map(w=>w.routeId);s(()=>{VV(v,b)||u.set(b);for(const w of v)b.includes(w)||i.get(w).set(()=>{});for(const w of k){const y=p(w.routeId);y.get()!==w&&y.set(w)}})}return m}var pu="__TSR_index",nE="popstate",rE="beforeunload";function CK(e){let n=e.getLocation();const t=new Set,r=a=>{n=e.getLocation(),t.forEach(o=>o({location:n,action:a}))},s=a=>{e.notifyOnIndexChange??!0?r(a):n=e.getLocation()},i=async({task:a,navigateOpts:o,...l})=>{var _,p;if((o==null?void 0:o.ignoreBlocker)??!1){a();return}const u=((_=e.getBlockers)==null?void 0:_.call(e))??[],h=l.type==="PUSH"||l.type==="REPLACE";if(typeof document<"u"&&u.length&&h)for(const m of u){const x=cv(l.path,l.state);if(await m.blockerFn({currentLocation:n,nextLocation:x,action:l.type})){(p=e.onBlocked)==null||p.call(e);return}}a()};return{get location(){return n},get length(){return e.getLength()},subscribers:t,subscribe:a=>(t.add(a),()=>{t.delete(a)}),push:(a,o,l)=>{const u=n.state[pu];o=sE(u+1,o),i({task:()=>{e.pushState(a,o),r({type:"PUSH"})},navigateOpts:l,type:"PUSH",path:a,state:o})},replace:(a,o,l)=>{const u=n.state[pu];o=sE(u,o),i({task:()=>{e.replaceState(a,o),r({type:"REPLACE"})},navigateOpts:l,type:"REPLACE",path:a,state:o})},go:(a,o)=>{i({task:()=>{e.go(a),s({type:"GO",index:a})},navigateOpts:o,type:"GO"})},back:a=>{i({task:()=>{e.back((a==null?void 0:a.ignoreBlocker)??!1),s({type:"BACK"})},navigateOpts:a,type:"BACK"})},forward:a=>{i({task:()=>{e.forward((a==null?void 0:a.ignoreBlocker)??!1),s({type:"FORWARD"})},navigateOpts:a,type:"FORWARD"})},canGoBack:()=>n.state[pu]!==0,createHref:a=>e.createHref(a),block:a=>{var l;if(!e.setBlockers)return()=>{};const o=((l=e.getBlockers)==null?void 0:l.call(e))??[];return e.setBlockers([...o,a]),()=>{var h,_;const u=((h=e.getBlockers)==null?void 0:h.call(e))??[];(_=e.setBlockers)==null||_.call(e,u.filter(p=>p!==a))}},flush:()=>{var a;return(a=e.flush)==null?void 0:a.call(e)},destroy:()=>{var a;return(a=e.destroy)==null?void 0:a.call(e)},notify:r}}function sE(e,n){n||(n={});const t=vk();return{...n,key:t,__TSR_key:t,[pu]:e}}function EK(e){var A,j;const n=typeof document<"u"?window:void 0,t=n.history.pushState,r=n.history.replaceState;let s=[];const i=()=>s,a=M=>s=M,o=(M=>M),l=(()=>cv(`${n.location.pathname}${n.location.search}${n.location.hash}`,n.history.state));if(!((A=n.history.state)!=null&&A.__TSR_key)&&!((j=n.history.state)!=null&&j.key)){const M=vk();n.history.replaceState({[pu]:0,key:M,__TSR_key:M},"")}let u=l(),h,_=!1,p=!1,m=!1,x=!1;const k=()=>u;let v;const b=()=>{v&&(N._ignoreSubscribers=!0,(v[2]?n.history.pushState:n.history.replaceState)(v[1],"",v[0]),N._ignoreSubscribers=!1,v=void 0,h=void 0)},w=(M,L,I)=>{const B=o(L),q=!!v;q||(h=u),u=cv(L,I),v=[B,I,(v==null?void 0:v[2])||M],q||queueMicrotask(()=>b())},y=M=>{u=l(),N.notify({type:M})},C=async()=>{if(p){p=!1;return}const M=l(),L=M.state[pu]-u.state[pu],I=L===1,B=L===-1,q=!I&&!B||_;_=!1;const U=q?"GO":B?"BACK":"FORWARD",W=q?{type:"GO",index:L}:{type:B?"BACK":"FORWARD"};if(m)m=!1;else{const H=i();if(typeof document<"u"&&H.length){for(const Y of H)if(await Y.blockerFn({currentLocation:u,nextLocation:M,action:U})){p=!0,n.history.go(1),N.notify(W);return}}}u=l(),N.notify(W)},E=M=>{if(x){x=!1;return}let L=!1;const I=i();if(typeof document<"u"&&I.length)for(const B of I){const q=B.enableBeforeUnload??!0;if(q===!0){L=!0;break}if(typeof q=="function"&&q()===!0){L=!0;break}}if(L)return M.preventDefault(),M.returnValue=""},N=CK({getLocation:k,getLength:()=>n.history.length,pushState:(M,L)=>w(!0,M,L),replaceState:(M,L)=>w(!1,M,L),back:M=>(M&&(m=!0),x=!0,n.history.back()),forward:M=>{M&&(m=!0),x=!0,n.history.forward()},go:M=>{_=!0,n.history.go(M)},createHref:M=>o(M),flush:b,destroy:()=>{n.history.pushState=t,n.history.replaceState=r,n.removeEventListener(rE,E,{capture:!0}),n.removeEventListener(nE,C)},onBlocked:()=>{h&&u!==h&&(u=h)},getBlockers:i,setBlockers:a,notifyOnIndexChange:!1});return n.addEventListener(rE,E,{capture:!0}),n.addEventListener(nE,C),n.history.pushState=function(...M){const L=t.apply(n.history,M);return N._ignoreSubscribers||y("PUSH"),L},n.history.replaceState=function(...M){const L=r.apply(n.history,M);return N._ignoreSubscribers||y("REPLACE"),L},N}function NK(e){let n=e.replace(/[\x00-\x1f\x7f]/g,"");return n.startsWith("//")&&(n="/"+n.replace(/^\/+/,"")),n}function cv(e,n){const t=NK(e),r=t.indexOf("#"),s=t.indexOf("?"),i=vk();return{href:t,pathname:t.substring(0,r>0?s>0?Math.min(r,s):r:s>0?s:t.length),hash:r>-1?t.substring(r):"",search:s>-1?t.slice(s,r===-1?void 0:r):"",state:n||{[pu]:0,key:i,__TSR_key:i}}}function vk(){return(Math.random()+1).toString(36).substring(7)}function iE(e){var n,t;return e.options.loader||e.options.beforeLoad||e.lazyFn||((n=e.options.component)==null?void 0:n.preload)||((t=e.options.pendingComponent)==null?void 0:t.preload)}function _b(e,n){return{fromLocation:n,toLocation:e,pathChanged:(n==null?void 0:n.pathname)!==e.pathname,hrefChanged:(n==null?void 0:n.href)!==e.href,hashChanged:(n==null?void 0:n.hash)!==e.hash}}function aE({key:e,__TSR_key:n,__TSR_index:t,__hashScrollIntoViewOptions:r,...s}){return s}function zK(e,n,t,r){var s,i,a,o;for(const l of n){if(r&&e._tx!==r)return;t.some(u=>u.routeId===l.routeId)||(i=(s=e.routesById[l.routeId].options).onLeave)==null||i.call(s,l)}for(const l of t){if(r&&e._tx!==r)return;(o=(a=e.routesById[l.routeId].options)[n.some(u=>u.routeId===l.routeId)?"onStay":"onEnter"])==null||o.call(a,l)}}var jK=class{constructor(e,n){this.tempLocationKey=`${Math.round(Math.random()*1e7)}`,this._scroll={next:!0},this.subscribers=new Set,this._cache=new Map,this._committed=[],this.routeBranchCache=new WeakMap,this.lightweightCache=new WeakMap,this.startTransition=async t=>(t(),!1),this.update=t=>{const r=this.options,s=this.basepath??(r==null?void 0:r.basepath)??"/",i=this.basepath===void 0,a=r==null?void 0:r.rewrite;if(this.options={...r,...t},this.isServer=this.options.isServer??IV??typeof document>"u",this.protocolAllowlist=new Set(this.options.protocolAllowlist),this.options.pathParamsAllowedCharacters&&(this.pathParamsDecoder=iK(this.options.pathParamsAllowedCharacters)),(!this.history||this.options.history&&this.options.history!==this.history)&&(this.options.history?this.history=this.options.history:this.history=EK()),this.origin=this.options.origin,this.origin||(window!=null&&window.origin&&window.origin!=="null"?this.origin=window.origin:this.origin="http://localhost"),this.history&&this.updateLatestLocation(),this.options.routeTree!==this.routeTree){this.routeTree=this.options.routeTree;let u;this.resolvePathCache=ov(1e3),u=this.buildRouteTree(),this.setRoutes(u)}if(!this.stores&&this.latestLocation){const u=this.getStoreConfig(this);this.batch=u.batch,this.stores=SK(this.latestLocation,u),dK(this)}const o=this.options.basepath??"/",l=this.options.rewrite;if(i||s!==o||a!==l){this.basepath=o;const u=[],h=vO(o);h&&h!=="/"&&u.push(kK({basepath:o})),l&&u.push(l),this.rewrite=u.length===0?void 0:u.length===1?u[0]:wK(u),this.history&&this.updateLatestLocation(),this.stores&&this.stores.location.set(this.latestLocation)}},this.updateLatestLocation=()=>{this.latestLocation=this.parseLocation(this.history.location,this.latestLocation)},this.buildRouteTree=()=>{const t=JV(this.routeTree,this.options.caseSensitive,(r,s)=>{r.init({originalIndex:s})});return this.options.routeMasks&&WV(this.options.routeMasks,t.processedTree),t},this.subscribe=(t,r)=>{const s={eventType:t,fn:r};return this.subscribers.add(s),()=>{this.subscribers.delete(s)}},this.emit=t=>{for(const r of this.subscribers)if(r.eventType===t.type)try{r.fn(t)}catch(s){console.error(s)}},this.parseLocation=(t,r)=>{const s=({pathname:l,search:u,hash:h,href:_,state:p})=>{if(!this.rewrite&&!/[ \x00-\x1f\x7f\u0080-\uffff]/.test(l)){const b=this.options.parseSearch(u),w=this.options.stringifySearch(b);return{href:l+w+h,publicHref:l+w+h,pathname:xp(l).path,external:!1,searchStr:w,search:n_(r==null?void 0:r.search,b),hash:xp(h.slice(1)).path,state:p_(r==null?void 0:r.state,p)}}const m=new URL(_,this.origin),x=H4(this.rewrite,m),k=this.options.parseSearch(x.search),v=this.options.stringifySearch(k);return x.search=v,{href:x.href.replace(x.origin,""),publicHref:_,pathname:xp(x.pathname).path,external:!!this.rewrite&&x.origin!==this.origin,searchStr:v,search:n_(r==null?void 0:r.search,k),hash:xp(x.hash.slice(1)).path,state:p_(r==null?void 0:r.state,p)}},i=s(t),{__tempLocation:a,__tempKey:o}=i.state;if(a&&(!o||o===this.tempLocationKey)){const l=s(a);return l.state.key=i.state.key,l.state.__TSR_key=i.state.__TSR_key,delete l.state.__tempLocation,{...l,maskedLocation:i}}return i},this.resolvePathWithBase=(t,r)=>sK({base:t,to:r,trailingSlash:this.options.trailingSlash,cache:this.resolvePathCache}),this.matchRoutes=(t,r,s)=>typeof t=="string"?this.matchRoutesInternal({pathname:t,search:r},s):this.matchRoutesInternal(t,r),this.getMatchedRoutes=t=>{const r=Object.create(null),s=YV(Vl(t),this.processedTree,!0);return s&&Object.assign(r,s.rawParams),[(s==null?void 0:s.branch)||[this.routesById.__root__],r,s==null?void 0:s.route]},this.buildLocation=t=>{const r=(i={})=>{var M,L;if(i.href){const I=cv(i.href,{});i={...i,to:H4(this.rewrite,new URL(I.pathname,this.origin)).pathname,search:this.options.parseSearch(I.search),hash:I.hash.slice(1)}}const a=i._fromLocation||this._pendingLocation||this.latestLocation,o=this.matchRoutesLightweight(a);i.from;const l=i.unsafeRelative==="path"?a.pathname:i.from??o[1],u=o[2],h=o[3],_=this.resolvePathWithBase(l,i.to?`${i.to}`:".");let p=oE(i.params,h);const m=this.routesByPath[Vl(_)];let x;if(m)x=this.getRouteBranch(m);else if(_.includes("$"))x=[];else{const[I,B,q]=this.getMatchedRoutes(_);x=I,this.options.notFoundRoute&&(!q||q.path!=="/"&&B["**"])&&(x=[...x,this.options.notFoundRoute])}if(x.length&&_O(p))for(const I of x){const B=((M=I.options.params)==null?void 0:M.stringify)??I.options.stringifyParams;if(B){p===h&&(p=Object.assign(Object.create(null),p));try{Object.assign(p,B(p))}catch{}}}const k=t.leaveParams?_:xp(Z9({path:_,params:p,decoder:this.pathParamsDecoder,server:this.isServer}).interpolatedPath).path;let v=u;if(t._includeValidateSearch&&((L=this.options.search)!=null&&L.strict)){const I={};x.forEach(B=>{if(B.options.validateSearch)try{Object.assign(I,O1(B.options.validateSearch,{...I,...v}))}catch{}}),v=I}v=AK(v,i,x,t._includeValidateSearch),v=n_(u,v);const b=this.options.stringifySearch(v),w=i.hash===!0?a.hash:i.hash?Kd(i.hash,a.hash):void 0,y=w?`#${w}`:"";let C=i.state===!0?a.state:i.state?Kd(i.state,a.state):{};i.state&&(C=p_(a.state,C));const E=`${k}${b}${y}`;let N,A,j=!1;if(this.rewrite){const I=new URL(E,this.origin),B=yO(this.rewrite,I);N=I.href.replace(I.origin,""),B.origin!==this.origin?(A=B.href,j=!0):A=B.pathname+B.search+B.hash}else N=GV(E),A=N;return{publicHref:A,href:N,pathname:k,search:v,searchStr:b,state:C,hash:w??"",external:j,unmaskOnReload:i.unmaskOnReload}},s=r(t);if(t.mask)s.maskedLocation=r({from:t.from,...t.mask});else if(this.options.routeMasks){const i=QV(s.pathname,this.processedTree);if(i){const a=Object.assign(Object.create(null),i.rawParams),{from:o,params:l,...u}=i.route,h=oE(l,a);s.maskedLocation=r({from:t.from,...u,params:h})}}return s},this.commitLocation=async({viewTransition:t,ignoreBlocker:r,...s})=>{let i;const a=Vl(this.latestLocation.href)===Vl(s.href)&&hu(aE(s.state),aE(this.latestLocation.state)),o=this._commitPromise;let l;const u=new Promise(h=>{l=h});if(u.resolve=()=>{l(),o==null||o.resolve()},this._commitPromise=u,a)this.load();else{let{maskedLocation:h,hashScrollIntoView:_,...p}=s;h&&(p={...h,state:{...h.state,__tempKey:void 0,__tempLocation:{...p,search:p.searchStr,state:{...p.state,__tempKey:void 0,__tempLocation:void 0,__TSR_key:void 0,key:void 0}}}},(p.unmaskOnReload??this.options.unmaskOnReload??!1)&&(p.state.__tempKey=this.tempLocationKey)),p.state.__hashScrollIntoViewOptions=_??this.options.defaultHashScrollIntoView??!0,this.shouldViewTransition=t,i=s.replace?"REPLACE":"PUSH",this.history[i==="REPLACE"?"replace":"push"](p.publicHref,p.state,{ignoreBlocker:r}),this.history.subscribers.size||this.load({action:{type:i}})}return this._scroll.next=s.resetScroll??!0,this._commitPromise},this.buildAndCommitLocation=({replace:t,resetScroll:r,hashScrollIntoView:s,viewTransition:i,ignoreBlocker:a,...o}={})=>{const l=this.buildLocation({...o,_includeValidateSearch:!0});this._pendingLocation=l;const u=this.commitLocation({...l,viewTransition:i,replace:t,resetScroll:r,hashScrollIntoView:s,ignoreBlocker:a});return queueMicrotask(()=>{this._pendingLocation===l&&(this._pendingLocation=void 0)}),u},this.navigate=async({to:t,reloadDocument:r,href:s,publicHref:i,...a})=>{var l,u;let o=!1;if(s)try{new URL(`${s}`),o=!0}catch{}if(o&&!r&&(r=!0),r){if(t!==void 0||!s){const _=this.buildLocation({to:t,...a});s=s??_.publicHref,i=i??_.publicHref}const h=!o&&i?i:s;if(av(h,this.protocolAllowlist))return;if(!a.ignoreBlocker){const _=((u=(l=this.history).getBlockers)==null?void 0:u.call(l))??[];for(const p of _)if(p!=null&&p.blockerFn&&await p.blockerFn({currentLocation:this.latestLocation,nextLocation:this.latestLocation,action:"PUSH"}))return}a.replace?window.location.replace(h):window.location.href=h;return}return this.buildAndCommitLocation({...a,href:s,to:t,_isNavigate:!0})},this.load=async t=>{this.updateLatestLocation(),t!=null&&t.action&&(this._scroll.hash=t.action.type==="PUSH"||t.action.type==="REPLACE"),await PK(this,t)},this.startViewTransition=t=>{var s,i;const r=this.shouldViewTransition??this.options.defaultViewTransition;if(this.shouldViewTransition=void 0,r&&typeof document.startViewTransition=="function"){let a;if(typeof r=="object"&&((i=(s=window.CSS)==null?void 0:s.supports)!=null&&i.call(s,"selector(:active-view-transition-type(a))"))){const o=this.latestLocation,l=this.stores.resolvedLocation.get(),u=typeof r.types=="function"?r.types(_b(o,l)):r.types;if(u===!1)return t();a={update:t,types:u}}else a=t;return document.startViewTransition(a).updateCallbackDone}return t()},this.invalidate=t=>{var u,h;const r=this._committed,s=t==null?void 0:t.filter,i=this._preloads,a=new Set([...r,...this._cache.values(),...[...(i==null?void 0:i.values())??[]].flat(),...((u=this._tx)==null?void 0:u[3])??[]].filter(_=>!s||s(_)).map(_=>_.id)),o=[];for(const[_,p]of i??[])p.some(m=>a.has(m.id))&&(i.delete(_),o.push(_));const l=_=>{if(a.has(_.id)){const p=this.routesById[_.routeId],m={..._,invalid:!0,...(t!=null&&t.forcePending||_.status==="error"||_.status==="notFound")&&iE(p)?{status:"pending",error:void 0}:void 0};return _._flight=void 0,m}return _};this._committed=r.map(l);for(const[_,p]of this._cache)a.has(_)&&(p.invalid=!0,t!=null&&t.forcePending&&(p.status="pending"));for(const _ of a)(h=this._flights)==null||h.delete(_);for(const _ of o)_.abort();return this.shouldViewTransition=!1,this.load({sync:t==null?void 0:t.sync})},this.resolveRedirect=t=>{const r=t.headers.get("Location");if(t.options.href){if(r)try{const s=new URL(r);if(this.origin&&s.origin===this.origin){const i=s.pathname+s.search+s.hash;t.options.href=i,t.headers.set("Location",i)}}catch{}}else{const s=this.buildLocation(t.options).publicHref||"/";t.options.href=s,t.headers.set("Location",s)}if(t.options.href&&av(t.options.href,this.protocolAllowlist))throw new Error("Redirect blocked: unsafe protocol");return t.headers.get("Location")||t.headers.set("Location",t.options.href),t},this.clearCache=t=>{var u;const r=this._cache,s=this._preloads,i=t==null?void 0:t.filter,a=[],o=[];for(const[h,_]of r)(!i||i(_))&&(o.push(h),a.push(_));const l=[];for(const[h,_]of s??[])(!i||_.some(i))&&(l.push(h),a.push(..._));for(const h of o)r.delete(h);for(const h of l)s.delete(h);for(const h of a){const _=h._flight;h._flight=void 0,_&&!--_[2]&&(((u=this._flights)==null?void 0:u.get(h.id))===_&&this._flights.delete(h.id),l.push(_[1]))}for(const h of l)h.abort()},this.loadRouteChunk=vd,this.preloadRoute=t=>FK(this,t),this.matchRoute=(t,r)=>{const s={...t,to:t.to?this.resolvePathWithBase(t.from||"",t.to):void 0,params:t.params||{},leaveParams:!0},i=this.buildLocation(s),a=this.stores.status.get()==="pending";if(r!=null&&r.pending&&!a)return!1;const o=(r==null?void 0:r.pending)??!a?this.latestLocation:this.stores.resolvedLocation.get()||this.stores.location.get(),l=XV(i.pathname,(r==null?void 0:r.caseSensitive)??!1,(r==null?void 0:r.fuzzy)??!1,o.pathname,this.processedTree);return!l||t.params&&!hu(l.rawParams,t.params,{partial:!0})?!1:(r==null?void 0:r.includeSearch)??!0?hu(o.search,i.search,{partial:!0})?l.rawParams:!1:l.rawParams},this.getStoreConfig=n,this.update({defaultPreloadDelay:50,defaultPendingMs:1e3,defaultPendingMinMs:500,context:void 0,...e,caseSensitive:e.caseSensitive??!1,notFoundMode:e.notFoundMode??"fuzzy",stringifySearch:e.stringifySearch??vK,parseSearch:e.parseSearch??gK,protocolAllowlist:e.protocolAllowlist??UV}),self.__TSR_ROUTER__=this}isShell(){return!!this.options.isShell}get state(){return this.stores.__store.get()}setRoutes({routesById:e,routesByPath:n,processedTree:t}){this.routesById=e,this.routesByPath=n,this.processedTree=t;const r=this.options.notFoundRoute;r&&(r.init({originalIndex:99999999999}),this.routesById[r.id]=r)}getRouteBranch(e){let n=this.routeBranchCache.get(e);return n||(n=mO(e),this.routeBranchCache.set(e,n)),n}matchRoutesInternal(e,n){var p,m;const[t,r,s]=this.getMatchedRoutes(e.pathname);let i=t,a=!1;(s?s.path!=="/"&&r["**"]:Vl(e.pathname))&&(this.options.notFoundRoute?i=[...i,this.options.notFoundRoute]:a=!0);const o=a?RK(this.options.notFoundMode,i):void 0,l=new Array(i.length),u=this._committed,h=(x,k)=>{const v=u[k];return(v==null?void 0:v.routeId)===x.id?v:x===this.options.notFoundRoute?u.find(b=>b.routeId===x.id):void 0};let _;for(let x=0;x{const m=p(l.preSearchFilters?l.preSearchFilters.reduce((x,k)=>k(x),_):_);return l.postSearchFilters?l.postSearchFilters.reduce((x,k)=>k(x),m):m};s.push(h)}const u=l.validateSearch;if(r&&u){const h=({search:_,next:p,meta:m})=>{const x=p(_);try{const k=O1(u,x);if(m&&k)for(const v in k)v in x||(m.defaulted||(m.defaulted=new Map)).set(v,k[v]);return{...x,...k}}catch{}return x};s.push(h)}}const i=(o,l,u)=>{if(o>=s.length){if(!n.search)return{};if(n.search===!0)return l;const _=Kd(n.search,l);return u&&(u.explicit=_),_}const h=(_,p)=>{if(p){const m=u||{};return{search:i(o+1,_,m),meta:m}}return i(o+1,_,u)};return s[o]({search:l,next:h,meta:u})};return i(0,e)}function RK(e,n){if(e!=="root"){let t;for(let r=n.length-1;r>=0;r--){const s=n[r];if(s.options.notFoundComponent)return s.id;t||(t=s.children&&s.id)}if(t)return t}return gd}function oE(e,n){if(e===!1||e===null)return Object.create(null);if((e??!0)===!0)return n;const t=Object.assign(Object.create(null),n);return Object.assign(t,Kd(e,t))}function lE(e,n){var r;const t=((r=e.options.params)==null?void 0:r.parse)??e.options.parseParams;t&&Object.assign(n,t(n))}function q4(e,n){var t,r;return(r=(t=e.options[n])==null?void 0:t.preload)==null?void 0:r.call(t)}function MK(e,n){const t=q4(e,"component");let r=q4(e,"pendingComponent");return n&&(r?r=r.then(n):n()),t&&r?Promise.all([t,r]).then(()=>{}):t??r}function vd(e,n,t){const r=()=>n===!1?void 0:n?q4(e,n):MK(e,t),s=e._lazy;if(s)return s===!0?r():s.then(r);if(!e.lazyFn)return r();const i=e.lazyFn().then(a=>{{const{id:o,...l}=a.options;Object.assign(e.options,l),e._lazy=!0}},a=>{throw e._lazy=void 0,a});return e._lazy=i,i.then(r)}function bk(e){const n=e.findIndex(t=>t.status!=="success"||t._notFound)+1;return n&&n{const s=()=>r(n);n.addEventListener("abort",s,{once:!0}),Promise.resolve(e).then(t,r).finally(()=>n.removeEventListener("abort",s))})}function nf(e,n){return e.routesById[n.routeId]}function u0(e,n,t){return bO(e)?[Xi,e]:Wd(e)?(e.routeId||(e.routeId=t),[fb,e]):n?(typeof(e==null?void 0:e.then)=="function"&&(e=new Error("A Promise was thrown",{cause:e})),[Zl,e]):[Ho,e]}function yk(e,n){var r,s;let t=u0(n,!0,e.id);if(t[0]!==Zl)return t;try{(s=(r=e.options).onError)==null||s.call(r,t[1])}catch(i){t=u0(i,!0,e.id)}return t}function Wp(e,n,t,r,s){return s[0].signal.aborted?bu:kk(e,n,t,yk(t,r),s)}async function OK(e,n,t,r,s,i){var h,_;const[a,o]=n,l=t[0].signal,u=!!t[3];for(let p=t[6]??0;pe.navigate({...C,_fromLocation:a}),buildLocation:e.buildLocation,cause:u?"preload":m.cause,abortController:t[0],preload:u,matches:o,routeId:x.id};try{const C=m._ctx||(m._ctx=x.options.context?x.options.context({...v,deps:m.loaderDeps,context:k})||{}:void 0);m.context={...k,...C}}catch(C){return Kl(e,m),[p,Wp(e,n,x,C,t)]}if(l.aborted)return[p,bu];const b=m.paramsError??m.searchError;if(b!==void 0)return Kl(e,m),[p,Wp(e,n,x,b,t)];const w=x.options.beforeLoad;if(!w)continue;const y=m.status;p>=i&&(m.status="pending",(_=t[7])==null||_.call(t));try{_0(e,m,"beforeLoad",t[0]);const C=await tf(w({...v,search:m.search,context:m.context,...e.options.additionalContext}),l);if(l.aborted)return[p,bu];const E=kk(e,n,x,u0(C,!1,x.id),t);if(E[0]!==Ho)return Kl(e,m),[p,E];m.context={...m.context,...C}}catch(C){return Kl(e,m),[p,Wp(e,n,x,C,t)]}finally{m.status=y,_0(e,m,!1,t[0])}}s()}function xk(e,n,t){var r;if(!(!t||--t[2])){if(((r=e._flights)==null?void 0:r.get(n.id))===t){const s=e._tx;if(s&&!s[0].signal.aborted&&!s[3].includes(n)&&s[3].some(i=>i.id===n.id)&&s[3].some(i=>i.isFetching==="beforeLoad"))return;e._flights.delete(n.id)}return t[1]}}function Kl(e,n){var r;const t=n._flight;n._flight=void 0,(r=xk(e,n,t))==null||r.abort()}function zi(e,n,t,r){var i;const s=[];for(const a of n)if(!(t!=null&&t.includes(a))){const o=a._flight;if(a._flight=void 0,r&&(o==null?void 0:o[2])===1&&((i=e._flights)==null?void 0:i.get(a.id))===o&&(t!=null&&t.some(l=>l.id===a.id)))o[2]=0;else{const l=xk(e,a,o);l&&s.push(l)}}for(const a of s)a.abort()}function wk(e){for(const n of e){const t=n._flight;t&&t[2]++}}function _0(e,n,t,r){var a;if(n.isFetching=t,r&&((a=e._tx)==null?void 0:a[0])!==r)return;const s=e.stores.byRoute.get(n.routeId),i=s==null?void 0:s.get();(i==null?void 0:i.id)===n.id&&s.set({...i,isFetching:t})}function xO(e,n,t,r,s,i,a){const o=n[0];return{params:t.params,location:o,navigate:l=>e.navigate({...l,_fromLocation:o}),cause:a?"preload":t.cause,abortController:s,preload:a,deps:t.loaderDeps,parentMatchPromise:i,context:t.context,route:r,...e.options.additionalContext}}async function cE(e,n,t,r,s,i,a){const o=a[0],l=o.signal;if(l.aborted)return bu;if(!s)return[Ho,void 0];let u=t._flight;_0(e,t,"loader",o);try{if(!u){const h=new AbortController;u=[Promise.resolve().then(()=>s(xO(e,n,t,r,h,i,!!a[3]))).then(_=>u0(_,!1,r.id),_=>u0(_,!0,r.id)).then(_=>{var p;return _[0]!==Ho&&((p=e._flights)==null?void 0:p.get(t.id))===u&&(e._flights.delete(t.id),u[2]||h.abort()),_[0]===Zl&&u[2]?yk(r,_[1]):_}),h,1],(e._flights??(e._flights=new Map)).set(t.id,u)}return t._flight=u,t.abortController=u[1],kk(e,n,r,await tf(u[0],l),a)}catch(h){if(h!==l||!l.aborted)throw h;return Kl(e,t),bu}finally{_0(e,t,!1,o)}}function uE(e,n,t){n[0]!==Xi&&(e.status="success",e.error=void 0,n[0]===Ho?(e.loaderData=n[1],e.invalid=!1,e.updatedAt=Date.now(),e.preload=t):e.invalid=!0)}function DK(e,n,t){const r=e._cache.get(n.id);if(r!==t||e._committed.some(i=>i.id===n.id&&i._flight===n._flight))return;const s={...n,_notFound:void 0,context:{}};s._flight&&s._flight[2]++,e._cache.set(n.id,s),r&&Kl(e,r)}function _E(e,n){return n[0]===Zl||n[0]===fb?{...e,status:n[0]===Zl?"error":"notFound",error:n[1],_flight:void 0}:e}function LK(e,n,t,r,s,i,a){var B,q;const o=n[1][t],l=nf(e,o),u=!!i[3],h=e._cache.get(o.id);let _,p=!1,m;try{if(o.status==="success"&&(_=l.options.shouldReload,typeof _=="function"&&(_=_(xO(e,n,o,l,i[0],s,u))),i[0].signal.aborted&&(m=bu)),!m)if(o.status!=="success")p=!0;else{const U=u||o.preload?l.options.preloadStaleTime??e.options.defaultPreloadStaleTime??3e4:l.options.staleTime??e.options.defaultStaleTime??0;p=!!(o.invalid||_||_===void 0&&Date.now()-o.updatedAt>=U&&(i[5]||o.cause==="enter"||i[2].some(W=>W.routeId===o.routeId&&W.id!==o.id)))}}catch(U){o.invalid=!0,Kl(e,o),m=Wp(e,n,l,U,i)}const x=l.options.loader,k=typeof x=="function",v=k?x:x==null?void 0:x.handler,b=!u||l.options.preload!==!1;let w=b&&x?(B=e._flights)==null?void 0:B.get(o.id):void 0;w===o._flight||m?w=void 0:w&&!p&&!u&&_===void 0?p=!0:p||(w=void 0);const y=!!(x&&p&&o.status==="success"&&!u&&!i[4]&&((k?void 0:x.staleReloadMode)??e.options.defaultStaleReloadMode)!=="blocking"),C=p&&b,E=C&&!y&&(o.status!=="success"||!!x),N=t>=a?i[7]:void 0,A=l.lazyFn&&l._lazy!==!0?N:void 0;if(C&&!x&&(o.invalid=!1,o.updatedAt=Date.now()),w&&w[2]++,E){const U=o._flight;o._flight=w,(q=xk(e,o,U))==null||q.abort(),t>=a&&(o.status="pending"),N==null||N()}C||(o.isFetching=!1);const j=(m?Promise.resolve(m):E?cE(e,n,o,l,v,s,i):Promise.resolve([Ho,o.loaderData])).then(U=>(E&&(uE(o,U,u),U[0]===Ho&&(x&&!i[0].signal.aborted&&DK(e,o,h),t>=a&&(o.status="pending"))),U)),M=tf(Promise.resolve().then(()=>vd(l,void 0,A)),i[0].signal).then(()=>{},U=>n[1].some((W,H)=>H<=t&&(W.status==="error"||W.status==="notFound"||W._notFound))?void 0:[t,Wp(e,n,l,U,i)]).then(U=>j.then(W=>(E&&!U&&W[0]===Ho&&o.status==="pending"&&!i[0].signal.aborted&&(o.status="success",N==null||N()),U)));if(r.push([t,j,M]),!y)return j.then(U=>_E(o,U));const L={...o,status:"pending",preload:!1,_flight:w};o.invalid=!1,o.isFetching="loader";const I=cE(e,n,L,l,v,s,i).then(U=>(o.isFetching=!1,uE(L,U,!1),U));return(n[2]??(n[2]=[])).push([t,I,M,L]),I.then(U=>_E(L,U))}async function U4(e,n,t,r,s=0){const i=t==null?void 0:t[1][1];let a=i!=null&&i.routeId?n.findIndex(o=>o.routeId===i.routeId):(t==null?void 0:t[0])??n.length-1;a<0&&(a=0);for(let o=a;o>=0;o--){const l=nf(e,n[o]);try{const u=vd(l,!1);u&&await tf(u,r)}catch(u){if(u===r&&r.aborted)throw u}if(l.options.notFoundComponent)return o}return i!=null&&i.routeId?a:s}function R_(e,n){n[2]&&(zi(e,n[2].map(t=>t[3])),n[2]=void 0)}async function fE(e,n,t,r){let s;try{await Promise.all(e.map(i=>i[1].then(async a=>{const o=i[0];if(!(r&&o>=await r)){if(a[0]>=Xi)throw[o,a];!s&&a[0]!==Ho&&(s=[o,a],await Promise.all((t??[]).map(l=>{if(!(l[0]<=o))return l[1].then(u=>{if(u[0]===Xi)throw[l[0],u]})})))}})))}catch(i){return i}return n??s}function kk(e,n,t,r,s,i){for(;r[0]===Xi;){const a=r[1],o=a.options;if(o.reloadDocument?s[3]:s[1]>=20)return r;try{return o.href&&o.reloadDocument?(e.resolveRedirect(a),r):[Xi,a,e.buildLocation({...o,_fromLocation:n[0],_includeValidateSearch:!0})]}catch(l){r=i?[Zl,l]:yk(t,l),i=!0}}return r}async function wO(e,n,t,r,s,i){const a=n[1];let o=await s,l=!1;const u=a.findIndex(m=>m._notFound),h=m=>m[1][0]===fb?U4(e,a,m,r.signal):m[0];let _=u<0?a.length:u;if(((o==null?void 0:o[1][0])??0)>=Xi)_=0;else if(o){_=o[2]??(o[2]=await h(o));for(const m of t){if(m[0]>=_)break;const x=await m[1];if(x[0]!==Ho&&x[0]=_)break;const x=await m[2];if(x){o=x;break}}if(((o==null?void 0:o[1][0])??0)>=Xi){const m=o[1];if(m[0]!==Xi||m[1].options.reloadDocument||m[2])return R_(e,n),m;l=!0,o=[0,[Zl,new Error("Too many redirects")]]}const p=o?o[2]??await h(o):u;if(p>=0){const m=o==null?void 0:o[1],x=m==null?void 0:m[0],k=a[p],v=m==null?void 0:m[1],b=()=>{m&&(k._notFound=void 0,x===Zl?k.status="error":(v.routeId=k.routeId,k.routeId===e.routeTree.id?(k.status="success",k._notFound=!0):k.status="notFound"),k.error=v,k.isFetching=!1)};b(),m||i==null||i();const w=nf(e,k);try{await tf(m?Promise.resolve().then(()=>vd(w,x===Zl?"errorComponent":"notFoundComponent")):Promise.all([vd(w),vd(w,"notFoundComponent")]),r.signal)}catch(y){if(y===r.signal&&r.signal.aborted)return R_(e,n),bu}m?l&&(r.abort(),await Promise.all([...t.map(y=>y[1]),...t.map(y=>y[2]),...(n[2]??[]).map(y=>y[1])]),R_(e,n),zi(e,a),b()):k.status="success"}return n}async function kO(e,n,t,r=0,s=n[1].length){var a,o;const i=n[1];for(let l=r;lw._notFound);if(e.options.notFoundMode!=="root"&&u>=0){const w=await U4(e,t,void 0,i,u);t[u]._notFound=void 0,t[w]._notFound=!0,u=w}let h=u<0?t.length:u+1,_=0;for(;_{for(let w=m;w=Xi&&(h=0);k()}if(!i.aborted&&!r[3]){const w=[];for(const[y,C]of e._flights??[])C[2]||(e._flights.delete(y),w.push(C[1]));for(const y of w)y.abort()}const b=wO(e,s,p,r[0],fE(p,v,s[2]),r[7]);(o=s[2])!=null&&o.length&&(s[3]=fE(s[2],void 0,void 0,b.then(w=>c0(w)?0:bk(t).length,()=>0))),a=await b}catch(l){if(R_(e,s),l===i&&i.aborted)return bu;throw l}return c0(a)?a:kO(e,a,i,r[6]===t.length?r[6]:0)}function G4(e,n){var i,a;if(e._tx!==n)return;const t=n[3],r=e.stores.matches.get();let s=e._pending;for(let o=0;o0){s[3]=setTimeout(()=>G4(e,n),w);return}s[2]=0}const v=t.map(w=>({...w,_flight:void 0}));v[o].status="pending";const b=s[4]=e.startTransition(()=>e.stores.setMatches(v),v).then(w=>(w&&e._pending===s&&s[4]===b&&!s[2]&&(s[2]=Date.now()+x),w));return}}function wp(e,n){var r;const t=e._pending;(e._tx===n||!((r=e._tx)!=null&&r[3].some(s=>s.id===(t==null?void 0:t[1]))))&&(clearTimeout(t==null?void 0:t[3]),e._pending=void 0)}async function dE(e,n){const t=e._pending;if(!t)return;clearTimeout(t[3]);const r=t[2]-Date.now();if(!t[4]||r<=0||!bk(n[3]).some(i=>i.id===t[1]))return;let s;try{await tf(new Promise(i=>{s=setTimeout(i,r)}),n[0].signal)}catch{}clearTimeout(s)}function CO(e,n){e._committed=n,e.stores.setMatches(n)}function IK(e,n,t,r){const s=e._committed,i=e._cache;for(const l of t)l.preload=!1,r&&(l._assetEnd=void 0);const a=bk(t).length,o=new Map;{const l=Date.now();for(const u of[...s,...i.values()]){if(u.status!=="success"||t.some((_,p)=>_.id===u.id&&(p=(u.preload?h.options.preloadGcTime??e.options.defaultPreloadGcTime??3e5:h.options.gcTime??e.options.defaultGcTime??3e5)||o.set(u.id,i.get(u.id)===u?u:{...u,_flight:void 0,isFetching:!1,context:{}})}}n[3]=[],e._cache=o,CO(e,t),zi(e,[...i.values(),...s],[...t,...o.values()]),zK(e,s,t,n)}async function $g(e,n){let t=e._tx;for(;t&&t!==n;){if(await t[5],e._tx===t)return;t=e._tx}}function EO(e,n,t){const r=t[1].options,s=t[2];if(!s)return e.navigate({...r,replace:!0,ignoreBlocker:!0});if(r.reloadDocument)return e.navigate({href:s.publicHref,reloadDocument:!0,replace:!0,ignoreBlocker:!0});s._redirects=n[1]+1,e._pendingLocation=s;const i=e.commitLocation({...s,viewTransition:r.viewTransition,replace:!0,resetScroll:r.resetScroll,hashScrollIntoView:r.hashScrollIntoView,ignoreBlocker:!0});return queueMicrotask(()=>{e._pendingLocation===s&&(e._pendingLocation=void 0)}),i}async function $K(e,n,t,r,s){const i=t.map(l=>({...l}));wk(i);for(const l of r)Kl(e,i[l[0]]),i[l[0]]=l[3];const a=[n[2],i];let o;try{o=await wO(e,a,r,n[0],s)}catch(l){throw zi(e,i),l}if(c0(o)){zi(e,i),o[0]===Xi&&e._tx===n&&e._committed===t&&await EO(e,n,o);return}if(await kO(e,o,n[0].signal),e._tx!==n||e._committed!==t){zi(e,i);return}for(const l of i){const u=e._cache.get(l.id);u!=null&&u._flight&&u._flight===l._flight&&(e._cache.delete(l.id),Kl(e,u))}CO(e,i),zi(e,t,i)}async function BK(e,n,t,r,s,i){const a=await SO(e,n[2],n[3],[n[0],n[1],e._committed,void 0,s,t,i,r]);if(c0(a)){const _=a[0]===Xi&&e._tx===n;if((!_||a[1].options.reloadDocument)&&wp(e,n),zi(e,n[3]),n[3]=[],!_)return;if(e._tx!==n){wp(e,n);return}await EO(e,n,a);return}const o=a[1];if(e._tx===n&&await dE(e,n),e._tx!==n){wp(e,n),zi(e,o),R_(e,a);return}const l=n[2],u=_b(l,e.stores.resolvedLocation.get()),h=a[2];await e.startViewTransition(async()=>{var m;if(e._tx===n&&await dE(e,n),e._tx!==n){wp(e,n),zi(e,o),R_(e,a);return}const _=()=>{wp(e,n),IK(e,n,o,i),e._tx===n&&(e.emit({type:"onLoad",...u}),e._tx===n&&e.emit({type:"onBeforeRouteMount",...u}))},p=await e.startTransition(_,o);if(e._tx!==n){R_(e,a);return}h!=null&&h.length&&$K(e,n,o,h,a[3]).catch(console.error),e.batch(()=>{e.stores.resolvedLocation.set(l),e.stores.status.set("idle"),e._tx===n&&e.emit({type:"onResolved",...u}),p&&e._tx===n&&e.emit({type:"onRendered",...u})}),e._tx===n&&((m=e._commitPromise)==null||m.resolve(),e._commitPromise=void 0)})}async function PK(e,n){var C;const t=e._tx,r=e.stores.resolvedLocation.get(),s=r??e.stores.location.get(),i=e.latestLocation,a=e._pendingLocation,o=(a==null?void 0:a.href)===i.href?a._redirects??0:0,l=e._handoff,u=l==null?void 0:l[0](),h=new AbortController,_=e._preflight;if(e._preflight=h,u||l==null||l[1](),_==null||_.abort(),!h.signal.aborted){const E=_b(i,r);e.emit({type:"onBeforeNavigate",...E}),h.signal.aborted||e.emit({type:"onBeforeLoad",...E})}if(h.signal.aborted){await $g(e,t);return}const p=s.href===i.href;let m=h;const x=e.matchRoutes(i,{_controller:h});wk(x);const k=u?l[1](x):void 0;if(k?m=u:u==null||u.abort(),h.signal.aborted){zi(e,x),await $g(e,t);return}e._preflight=void 0;let v;const b=()=>BK(e,y,p,()=>G4(e,y),n==null?void 0:n.sync,k),w=n!=null&&n.sync?new Promise(E=>v=E):Promise.resolve().then(b).then(),y=[m,o,i,x,Date.now(),w];if(e._tx=y,t){for(const E of e.stores.matches.get()){if(e._tx!==y)break;E.isFetching&&_0(e,E,!1)}t[0].abort(),zi(e,t[3],y[3],!0)}if(e._tx!==y){zi(e,y[3]),y[3]=[],v==null||v(),await $g(e,y);return}e.batch(()=>{e.stores.status.set("pending"),e.stores.location.set(i)}),(k||!e._committed.length&&((C=x[0])==null?void 0:C.status)!=="success"&&!x.some(E=>E._notFound))&&G4(e,y),v==null||v(b()),await w,await $g(e,y)}async function FK(e,n){let t=e.buildLocation(n);for(let r=0;;r++){const s=e._committed,i=new AbortController;let a,o,l;try{try{a=e.matchRoutes(t,{_controller:i}),wk(a),o=(e._preloads??(e._preloads=new Map)).set(i,a),l=await SO(e,t,a,[i,r,s,!0])}finally{o&&(o=o.delete(i),zi(e,a)),i.abort()}if(!c0(l))return l[1];if(!o||l.length<3)return;t=l[2]}catch(u){Wd(u)||console.error(u);return}}}const HK="Error preloading route! ☝️";var NO=class{get to(){return this._to}get id(){return this._id}get path(){return this._path}get fullPath(){return this._fullPath}constructor(e){if(this.init=n=>{var l,u;this.originalIndex=n.originalIndex;const t=this.options,r=!(t!=null&&t.path)&&!(t!=null&&t.id);this.parentRoute=(u=(l=this.options).getParentRoute)==null?void 0:u.call(l),r?this._path=gd:this.parentRoute||mk();let s=r?gd:t==null?void 0:t.path;s&&s!=="/"&&(s=gO(s));const i=(t==null?void 0:t.id)||s;let a=r?gd:A1([this.parentRoute.id==="__root__"?"":this.parentRoute.id,i]);s==="__root__"&&(s="/"),a!=="__root__"&&(a=A1(["/",a]));const o=a==="__root__"?"/":A1([this.parentRoute.fullPath,s]);this._path=s,this._id=a,this._fullPath=o,this._to=Vl(o)},this.addChildren=n=>this._addFileChildren(n),this._addFileChildren=n=>(Array.isArray(n)&&(this.children=n),typeof n=="object"&&n!==null&&(this.children=Object.values(n)),this),this._addFileTypes=()=>this,this.updateLoader=n=>(Object.assign(this.options,n),this),this.update=n=>(Object.assign(this.options,n),this),this.lazy=n=>(this.lazyFn=n,this),this.redirect=n=>xK({from:this.fullPath,...n}),this.options=e||{},this.isRoot=!(e!=null&&e.getParentRoute),e!=null&&e.id&&(e!=null&&e.path))throw new Error("Route cannot have both an 'id' and a 'path' option.")}},qK=class extends NO{constructor(e){super(e)}},Sk=class extends T.Component{constructor(...e){super(...e),this.state={error:null},this.reset=()=>{this.setState({error:null})}}static getDerivedStateFromProps(e,n){const t=e.getResetKey();return n.error&&n.resetKey!==t?{resetKey:t,error:null}:{resetKey:t}}static getDerivedStateFromError(e){return{error:e}}componentDidCatch(e,n){var t,r;(r=(t=this.props).onCatch)==null||r.call(t,e,n)}render(){const e=this.state.error;return e?T.createElement(this.props.errorComponent??UK,{error:e,reset:this.reset}):this.props.children}};function UK({error:e}){const[n,t]=T.useState(!1);return f.jsxs("div",{style:{padding:".5rem",maxWidth:"100%"},children:[f.jsxs("div",{style:{display:"flex",alignItems:"center",gap:".5rem"},children:[f.jsx("strong",{style:{fontSize:"1rem"},children:"Something went wrong!"}),f.jsx("button",{style:{appearance:"none",fontSize:".6em",border:"1px solid currentColor",padding:".1rem .2rem",fontWeight:"bold",borderRadius:".25rem"},onClick:()=>t(r=>!r),children:n?"Hide Error":"Show Error"})]}),f.jsx("div",{style:{height:".25rem"}}),n?f.jsx("div",{children:f.jsx("pre",{style:{fontSize:".7em",border:"1px solid red",borderRadius:".25rem",padding:".3rem",color:"red",overflow:"auto"},children:e.message?f.jsx("code",{children:e.message}):null})}):null]})}function GK({children:e,fallback:n=null}){return f.jsx(et.Fragment,{children:zO()?e:n})}function zO(){return et.useSyncExternalStore(VK,()=>!0,()=>!1)}function VK(){return()=>{}}var jO=T.createContext(null);function _i(e){return T.useContext(jO)}var db=T.createContext(void 0),KK=T.createContext(void 0),kr=(e=>(e[e.None=0]="None",e[e.Mutable=1]="Mutable",e[e.Watching=2]="Watching",e[e.RecursedCheck=4]="RecursedCheck",e[e.Recursed=8]="Recursed",e[e.Dirty=16]="Dirty",e[e.Pending=32]="Pending",e))(kr||{});function WK({update:e,notify:n,unwatched:t}){return{link:r,unlink:s,propagate:i,checkDirty:a,shallowPropagate:o};function r(u,h,_){const p=h.depsTail;if(p!==void 0&&p.dep===u)return;const m=p!==void 0?p.nextDep:h.deps;if(m!==void 0&&m.dep===u){m.version=_,h.depsTail=m;return}const x=u.subsTail;if(x!==void 0&&x.version===_&&x.sub===h)return;const k=h.depsTail=u.subsTail={version:_,dep:u,sub:h,prevDep:p,nextDep:m,prevSub:x,nextSub:void 0};m!==void 0&&(m.prevDep=k),p!==void 0?p.nextDep=k:h.deps=k,x!==void 0?x.nextSub=k:u.subs=k}function s(u,h=u.sub){const _=u.dep,p=u.prevDep,m=u.nextDep,x=u.nextSub,k=u.prevSub;return m!==void 0?m.prevDep=p:h.depsTail=p,p!==void 0?p.nextDep=m:h.deps=m,x!==void 0?x.prevSub=k:_.subsTail=k,k!==void 0?k.nextSub=x:(_.subs=x)===void 0&&t(_),m}function i(u){let h=u.nextSub,_;e:do{const p=u.sub;let m=p.flags;if(m&60?m&12?m&4?!(m&48)&&l(u,p)?(p.flags=m|40,m&=1):m=0:p.flags=m&-9|32:m=0:p.flags=m|32,m&2&&n(p),m&1){const x=p.subs;if(x!==void 0){const k=(u=x).nextSub;k!==void 0&&(_={value:h,prev:_},h=k);continue}}if((u=h)!==void 0){h=u.nextSub;continue}for(;_!==void 0;)if(u=_.value,_=_.prev,u!==void 0){h=u.nextSub;continue e}break}while(!0)}function a(u,h){let _,p=0,m=!1;e:do{const x=u.dep,k=x.flags;if(h.flags&16)m=!0;else if((k&17)===17){if(e(x)){const v=x.subs;v.nextSub!==void 0&&o(v),m=!0}}else if((k&33)===33){(u.nextSub!==void 0||u.prevSub!==void 0)&&(_={value:u,prev:_}),u=x.deps,h=x,++p;continue}if(!m){const v=u.nextDep;if(v!==void 0){u=v;continue}}for(;p--;){const v=h.subs,b=v.nextSub!==void 0;if(b?(u=_.value,_=_.prev):u=v,m){if(e(h)){b&&o(v),h=u.sub;continue}m=!1}else h.flags&=-33;h=u.sub;const w=u.nextDep;if(w!==void 0){u=w;continue e}}return m}while(!0)}function o(u){do{const h=u.sub,_=h.flags;(_&48)===32&&(h.flags=_|16,(_&6)===2&&n(h))}while((u=u.nextSub)!==void 0)}function l(u,h){let _=h.depsTail;for(;_!==void 0;){if(_===u)return!0;_=_.prevDep}return!1}}function QK(e,n,t){var i,a,o;const r=typeof e=="object",s=r?e:void 0;return{next:(i=r?e.next:e)==null?void 0:i.bind(s),error:(a=r?e.error:n)==null?void 0:a.bind(s),complete:(o=r?e.complete:t)==null?void 0:o.bind(s)}}const V4=[];let D1=0;const{link:hE,unlink:XK,propagate:YK,checkDirty:TO,shallowPropagate:pE}=WK({update(e){return e._update()},notify(e){V4[K4++]=e,e.flags&=~kr.Watching},unwatched(e){e.depsTail!==void 0&&(e.depsTail=void 0,e.flags=kr.Mutable|kr.Dirty,_v(e))}});let Bg=0,K4=0,Mo,W4=0;function ZK(e){try{++W4,e()}finally{--W4||AO()}}function _v(e){const n=e.depsTail;let t=n!==void 0?n.nextDep:e.deps;for(;t!==void 0;)t=XK(t,e)}function AO(){if(!(W4>0)){for(;Bg{var u;s.get(),o.current?(u=a.next)==null||u.call(a,s._snapshot):o.current=!0});return{unsubscribe:()=>{l.stop()}}},_update(i){const a=Mo,o=(n==null?void 0:n.compare)??Object.is;if(t)Mo=s,++D1,s.depsTail=void 0;else if(i===void 0)return!1;t&&(s.flags=kr.Mutable|kr.RecursedCheck);try{const l=s._snapshot,u=typeof i=="function"?i(l):i===void 0&&t?r(l):i;return l===void 0||!o(l,u)?(s._snapshot=u,!0):!1}finally{Mo=a,t&&(s.flags&=~kr.RecursedCheck),_v(s)}}};return t?(s.flags=kr.Mutable|kr.Dirty,s.get=function(){const i=s.flags;if(i&kr.Dirty||i&kr.Pending&&TO(s.deps,s)){if(s._update()){const a=s.subs;a!==void 0&&pE(a)}}else i&kr.Pending&&(s.flags=i&~kr.Pending);return Mo!==void 0&&hE(s,Mo,D1),s._snapshot}):s.set=function(i){if(s._update(i)){const a=s.subs;a!==void 0&&(YK(a),pE(a),AO())}},s}function JK(e){const n=()=>{const r=Mo;Mo=t,++D1,t.depsTail=void 0,t.flags=kr.Watching|kr.RecursedCheck;try{return e()}finally{Mo=r,t.flags&=~kr.RecursedCheck,_v(t)}},t={deps:void 0,depsTail:void 0,subs:void 0,subsTail:void 0,flags:kr.Watching|kr.RecursedCheck,notify(){const r=this.flags;r&kr.Dirty||r&kr.Pending&&TO(this.deps,this)?n():this.flags=kr.Watching},stop(){this.flags=kr.None,this.depsTail=void 0,_v(this)}};return n(),t}var R2={exports:{}},M2={},O2={exports:{}},D2={};/** * @license React * use-sync-external-store-shim.production.js * @@ -54,7 +54,7 @@ Error generating stack: `+S.message+` * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. - */var gE;function ZK(){if(gE)return D2;gE=1;var e=om();function n(_,p){return _===p&&(_!==0||1/_===1/p)||_!==_&&p!==p}var t=typeof Object.is=="function"?Object.is:n,r=e.useState,s=e.useEffect,i=e.useLayoutEffect,a=e.useDebugValue;function o(_,p){var m=p(),x=r({inst:{value:m,getSnapshot:p}}),k=x[0].inst,v=x[1];return i(function(){k.value=m,k.getSnapshot=p,l(k)&&v({inst:k})},[_,m,p]),s(function(){return l(k)&&v({inst:k}),_(function(){l(k)&&v({inst:k})})},[_]),a(m),m}function l(_){var p=_.getSnapshot;_=_.value;try{var m=p();return!t(_,m)}catch{return!0}}function u(_,p){return p()}var h=typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"?u:o;return D2.useSyncExternalStore=e.useSyncExternalStore!==void 0?e.useSyncExternalStore:h,D2}var vE;function JK(){return vE||(vE=1,O2.exports=ZK()),O2.exports}/** + */var gE;function eW(){if(gE)return D2;gE=1;var e=om();function n(_,p){return _===p&&(_!==0||1/_===1/p)||_!==_&&p!==p}var t=typeof Object.is=="function"?Object.is:n,r=e.useState,s=e.useEffect,i=e.useLayoutEffect,a=e.useDebugValue;function o(_,p){var m=p(),x=r({inst:{value:m,getSnapshot:p}}),k=x[0].inst,v=x[1];return i(function(){k.value=m,k.getSnapshot=p,l(k)&&v({inst:k})},[_,m,p]),s(function(){return l(k)&&v({inst:k}),_(function(){l(k)&&v({inst:k})})},[_]),a(m),m}function l(_){var p=_.getSnapshot;_=_.value;try{var m=p();return!t(_,m)}catch{return!0}}function u(_,p){return p()}var h=typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"?u:o;return D2.useSyncExternalStore=e.useSyncExternalStore!==void 0?e.useSyncExternalStore:h,D2}var vE;function tW(){return vE||(vE=1,O2.exports=eW()),O2.exports}/** * @license React * use-sync-external-store-shim/with-selector.production.js * @@ -62,57 +62,57 @@ Error generating stack: `+S.message+` * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. - */var bE;function eW(){if(bE)return M2;bE=1;var e=om(),n=JK();function t(u,h){return u===h&&(u!==0||1/u===1/h)||u!==u&&h!==h}var r=typeof Object.is=="function"?Object.is:t,s=n.useSyncExternalStore,i=e.useRef,a=e.useEffect,o=e.useMemo,l=e.useDebugValue;return M2.useSyncExternalStoreWithSelector=function(u,h,_,p,m){var x=i(null);if(x.current===null){var k={hasValue:!1,value:null};x.current=k}else k=x.current;x=o(function(){function b(E){if(!w){if(w=!0,y=E,E=p(E),m!==void 0&&k.hasValue){var T=k.value;if(m(T,E))return C=T}return C=E}if(T=C,r(y,E))return T;var j=p(E);return m!==void 0&&m(T,j)?(y=E,T):(y=E,C=j)}var w=!1,y,C,N=_===void 0?null:_;return[function(){return b(h())},N===null?void 0:function(){return b(N())}]},[h,_,p,m]);var v=s(u,x[0],x[1]);return a(function(){k.hasValue=!0,k.value=v},[v]),l(v),v},M2}var yE;function tW(){return yE||(yE=1,R2.exports=eW()),R2.exports}var RO=tW();const nW=am(RO);function rW(e,n){return e===n}function Go(e,n,t=rW){const r=A.useCallback(a=>{if(!e)return()=>{};const{unsubscribe:o}=e.subscribe(a);return o},[e]),s=A.useCallback(()=>e==null?void 0:e.get(),[e]);return RO.useSyncExternalStoreWithSelector(r,s,s,n,t)}var xE={};function Ck(e,n){const t=A.useRef();return r=>{const s=e!=null&&e.select?e.select(r):r;return(e==null?void 0:e.structuralSharing)??n.options.defaultStructuralSharing?t.current=p_(t.current,s):s}}function rf(e){const n=_i(),t=A.useContext(e.from?GK:db),r=e.from??t,s=n.stores.getMatchStore(r),i=Ck(e,n),a=Go(s,o=>o?i(o):xE);if(a!==xE)return a;(e.shouldThrow??!0)&&mk()}function MO(e){return rf({from:e.from,strict:e.strict,structuralSharing:e.structuralSharing,select:n=>e.select?e.select(n.loaderData):n.loaderData})}function OO(e){const{select:n,...t}=e;return rf({...t,select:r=>n?n(r.loaderDeps):r.loaderDeps})}function DO(e){return rf({from:e.from,shouldThrow:e.shouldThrow,structuralSharing:e.structuralSharing,strict:e.strict,select:n=>{const t=e.strict===!1?n.params:n._strictParams;return e.select?e.select(t):t}})}function LO(e){return rf({from:e.from,strict:e.strict,shouldThrow:e.shouldThrow,structuralSharing:e.structuralSharing,select:n=>e.select?e.select(n.search):n.search})}function hb(e){const n=_i();return A.useCallback(t=>n.navigate({...t,from:t.from??(e==null?void 0:e.from)}),[e==null?void 0:e.from,n])}function Ek(e){return rf({...e,select:n=>e.select?e.select(n.context):n.context})}function L2(e){const n=A.useRef(e);return du(n.current,e,{ignoreUndefined:!1})||(n.current=e),n.current}function sW(e,n){return e[0]===n[0]&&e[1]===n[1]&&e[2]===n[2]}function iW(e,n,t){if(e!=null&&e.external)return av(e.href,t)?void 0:e.href;if(!fW(n)&&!(typeof n!="string"||n.indexOf(":")===-1))try{return new URL(n),av(n,t)?void 0:n}catch{}}function aW(e,n,t,r,s,i){if(i)return!1;if(t!=null&&t.exact){if(!tK(e.pathname,n.pathname,r))return!1}else{const a=lv(e.pathname,r),o=lv(n.pathname,r);if(!(a.startsWith(o)&&(a.length===o.length||a[o.length]==="/")))return!1}return((t==null?void 0:t.includeSearch)??!0)&&!du(e.search,n.search,{partial:!(t!=null&&t.exact),ignoreUndefined:!(t!=null&&t.explicitUndefined)})?!1:t!=null&&t.includeHash?s&&e.hash===n.hash:!0}function oW(e,n){const t=_i(),r=IV(n),{activeProps:s,inactiveProps:i,activeOptions:a,to:o,preload:l,preloadDelay:u,preloadIntentProximity:h,hashScrollIntoView:_,replace:p,startTransition:m,resetScroll:x,viewTransition:k,children:v,target:b,disabled:w,style:y,className:C,onClick:N,onBlur:E,onFocus:T,onMouseEnter:j,onMouseLeave:M,onTouchStart:D,ignoreBlocker:I,params:P,search:U,hash:q,state:W,mask:H,reloadDocument:Y,unsafeRelative:te,from:$,_fromLocation:L,...F}=e,G=zO(),V=L2(e.search),ee=L2(e.params),ce=L2(a),ae=A.useMemo(()=>e,[t,e.from,e._fromLocation,e.hash,e.to,V,ee,e.state,e.mask,e.unsafeRelative]),se=A.useCallback(mt=>{const we=t.buildLocation({_fromLocation:mt,...ae}),ct=_W(we.maskedLocation?we.maskedLocation.publicHref:we.publicHref,we.maskedLocation?we.maskedLocation.external:we.external,t.history,w),ye=iW(ct,o,t.protocolAllowlist);return[ct==null?void 0:ct.href,ye,aW(mt,we,ce,t.basepath,G,ye!==void 0)]},[ce,w,G,ae,t,o]),[X,oe,le]=Go(t.stores.location,se,sW),_e=le?Kd(s,{})??lW:I2,pe=le?I2:Kd(i,{})??I2,Ee=[C,_e.className,pe.className].filter(Boolean).join(" "),Ie=(y||_e.style||pe.style)&&{...y,..._e.style,...pe.style},ze=A.useRef(!1),He=e.reloadDocument||oe||w?!1:l??t.options.defaultPreload,Oe=u??t.options.defaultPreloadDelay??0,Xe=A.useCallback(()=>{t.preloadRoute(ae).catch(mt=>{console.warn(mt),console.warn(PK)})},[t,ae]),_t=A.useCallback(mt=>{if(!mt){$2(r);return}if(!(mt.isIntersecting??He==="intent")){mt.isIntersecting===!1&&$2(r);return}if(!Oe){Xe();return}Qp.has(r)||Qp.set(r,setTimeout(()=>{Qp.delete(r),Xe()},Oe))},[Xe,r,He,Oe]);LV(r,_t,He!=="viewport"),A.useEffect(()=>{ze.current||He==="render"&&(Xe(),ze.current=!0)},[Xe,He]);const Vt=mt=>{const we=mt.currentTarget.getAttribute("target"),ct=b!==void 0?b:we;!w&&!(mt.metaKey||mt.altKey||mt.ctrlKey||mt.shiftKey)&&!mt.defaultPrevented&&(!ct||ct==="_self")&&mt.button===0&&(mt.preventDefault(),t.navigate({...ae,replace:p,resetScroll:x,hashScrollIntoView:_,startTransition:m,viewTransition:k,ignoreBlocker:I}))};if(oe)return{...F,ref:r,href:oe,...v&&{children:v},...b&&{target:b},...w&&{disabled:w},...y&&{style:y},...C&&{className:C},...N&&{onClick:N},...E&&{onBlur:E},...T&&{onFocus:T},...j&&{onMouseEnter:j},...M&&{onMouseLeave:M},...D&&{onTouchStart:D}};const $t=()=>{He==="intent"&&Xe()},jt=()=>{He==="intent"&&$2(r)};return{...F,..._e,...pe,href:X,ref:r,onClick:Qf([N,Vt]),onBlur:Qf([E,jt]),onFocus:Qf([T,_t]),onMouseEnter:Qf([j,_t]),onMouseLeave:Qf([M,jt]),onTouchStart:Qf([D,$t]),disabled:!!w,target:b,...Ie&&{style:Ie},...Ee&&{className:Ee},...w&&cW,...le&&uW}}var I2={},lW={className:"active"},cW={role:"link","aria-disabled":!0},uW={"data-status":"active","aria-current":"page"},Qp=new WeakMap,$2=e=>{clearTimeout(Qp.get(e)),Qp.delete(e)},Qf=e=>n=>{for(const t of e)if(t){if(n.defaultPrevented)return;t(n)}};function _W(e,n,t,r){if(!r)return n?{href:e,external:!0}:{href:t.createHref(e)||"/",external:!1}}function fW(e){if(typeof e!="string")return!1;const n=e.charCodeAt(0);return n===47?e.charCodeAt(1)!==47:n===46}var pb=A.forwardRef((e,n)=>{const{_asChild:t,...r}=e,{type:s,...i}=oW(r,n),a=typeof r.children=="function"?r.children({isActive:i["data-status"]==="active"}):r.children;if(!t){const{disabled:o,...l}=i;return A.createElement("a",l,a)}return A.createElement(t,i,a)}),dW=class extends NO{constructor(n){super(n),this.useMatch=t=>rf({select:t==null?void 0:t.select,from:this.id,structuralSharing:t==null?void 0:t.structuralSharing}),this.useRouteContext=t=>Ek({...t,from:this.id}),this.useSearch=t=>LO({select:t==null?void 0:t.select,structuralSharing:t==null?void 0:t.structuralSharing,from:this.id}),this.useParams=t=>DO({select:t==null?void 0:t.select,structuralSharing:t==null?void 0:t.structuralSharing,from:this.id}),this.useLoaderDeps=t=>OO({...t,from:this.id}),this.useLoaderData=t=>MO({...t,from:this.id}),this.useNavigate=()=>hb({from:this.fullPath}),this.Link=et.forwardRef((t,r)=>f.jsx(pb,{ref:r,from:this.fullPath,...t}))}};function hW(e){return new dW(e)}function pW(){return e=>gW(e)}var mW=class extends FK{constructor(e){super(e),this.useMatch=n=>rf({select:n==null?void 0:n.select,from:this.id,structuralSharing:n==null?void 0:n.structuralSharing}),this.useRouteContext=n=>Ek({...n,from:this.id}),this.useSearch=n=>LO({select:n==null?void 0:n.select,structuralSharing:n==null?void 0:n.structuralSharing,from:this.id}),this.useParams=n=>DO({select:n==null?void 0:n.select,structuralSharing:n==null?void 0:n.structuralSharing,from:this.id}),this.useLoaderDeps=n=>OO({...n,from:this.id}),this.useLoaderData=n=>MO({...n,from:this.id}),this.useNavigate=()=>hb({from:this.fullPath}),this.Link=et.forwardRef((n,t)=>f.jsx(pb,{ref:t,from:this.fullPath,...n}))}};function gW(e){return new mW(e)}function Xo(e){return n=>{const t=hW(n);return t.isRoot=!1,t}}function vW(e){const n=_i(),t=`not-found-${Go(n.stores.location,r=>r.pathname)}-${Go(n.stores.status,r=>r)}`;return f.jsx(Sk,{getResetKey:()=>t,onCatch:(r,s)=>{var i;if(Wd(r))(i=e.onCatch)==null||i.call(e,r,s);else throw r},errorComponent:({error:r})=>{var s;if(Wd(r))return(s=e.fallback)==null?void 0:s.call(e,r);throw r},children:e.children})}function bW(){return f.jsx("p",{children:"Not Found"})}function rd(e){return f.jsx(f.Fragment,{children:e.children})}function IO(e,n,t){return n.options.notFoundComponent?f.jsx(n.options.notFoundComponent,{...t}):e.options.defaultNotFoundComponent?f.jsx(e.options.defaultNotFoundComponent,{...t}):f.jsx(bW,{})}function mb(e,n){const t=(n==null?void 0:n.options.pendingComponent)??e.options.defaultPendingComponent;return t?f.jsx(t,{}):null}var yW=(e,n)=>e[0]===n[0]&&e[1]===n[1],$O=(e,n,t)=>!n.isRoot||n.options.shellComponent||n.options.wrapInSuspense||t===!1||t==="data-only"||!e.ssr,BO=A.memo(function({routeId:n}){const t=_i();return f.jsx(xW,{router:t,match:Go(t.stores.getMatchStore(n),r=>r)})});function xW({router:e,match:n}){var _,p;const t=e.routesById[n.routeId],r=mb(e,t),s=t.options.errorComponent??e.options.defaultErrorComponent,i=t.options.onCatch??e.options.defaultOnCatch,a=t.isRoot?t.options.notFoundComponent??((_=e.options.notFoundRoute)==null?void 0:_.options.component):t.options.notFoundComponent,o=n.ssr===!1||n.ssr==="data-only",l=$O(e,t,n.ssr)&&(t.options.wrapInSuspense??r??(((p=t.options.errorComponent)==null?void 0:p.preload)||o))?A.Suspense:rd,u=s?Sk:rd,h=a?vW:rd;return f.jsxs(t.isRoot?t.options.shellComponent??rd:rd,{children:[f.jsx(db.Provider,{value:n.routeId,children:f.jsx(l,{fallback:r,children:f.jsx(u,{getResetKey:()=>n,errorComponent:s,onCatch:(m,x)=>{if(Wd(m))throw m.routeId??(m.routeId=n.routeId),m;i==null||i(m,x)},children:f.jsx(h,{fallback:m=>{if(m.routeId??(m.routeId=n.routeId),m.routeId!==n.routeId)throw m;return A.createElement(a,m)},children:o?f.jsx(qK,{fallback:r,children:f.jsx(wE,{match:n})}):f.jsx(wE,{match:n})})})})}),null]})}var wE=A.memo(function({match:n}){const t=_i(),r=n.routeId,s=t.routesById[r],i=A.useMemo(()=>{var l;const o=(l=s.options.remountDeps??t.options.defaultRemountDeps)==null?void 0:l({routeId:r,loaderDeps:n.loaderDeps,params:n._strictParams,search:n._strictSearch});return o?JSON.stringify(o):void 0},[r,n.loaderDeps,n._strictParams,n._strictSearch,s.options.remountDeps,t.options.defaultRemountDeps]),a=A.useMemo(()=>{const o=s.options.component??t.options.defaultComponent;return o?f.jsx(o,{},i):f.jsx(f0,{})},[i,s.options.component,t.options.defaultComponent]);if(n.status==="pending"){if(t.ssr&&!$O(t,s,n.ssr))return a;if(t._tx)throw t._tx[5];return mb(t,s)}if(n.status==="notFound")return IO(t,s,n.error);if(n.status==="error")throw n.error;return a}),f0=A.memo(function(){const n=_i(),t=A.useContext(db);let r,s,i;{const o=n.stores.getMatchStore(t);[r,s]=Go(o,l=>[!!l._notFound,l.error],yW),i=Go(n.stores.ids,l=>l[l.indexOf(t)+1])}if(r)return IO(n,n.routesById[t],s);if(!i)return null;const a=f.jsx(BO,{routeId:i});return t===gd?f.jsx(A.Suspense,{fallback:mb(n),children:a}):a});function PO(e,n){const t=e[1];e.length=0,t==null||t(n)}function wW({t:e}){const n=_i(),t=n._rendered??(n._rendered=[]);return n.startTransition=(r,s)=>new Promise(i=>{PO(t,!1),t.push(s,i),e(n),A.startTransition(r)}),cO(()=>{const r=n.history.subscribe(n.load);n.updateLatestLocation();const s=n.latestLocation,i=n.buildLocation({to:s.pathname,search:!0,params:!0,hash:!0,state:!0,_includeValidateSearch:!0});if(Gl(s.publicHref)!==Gl(i.publicHref))return n.commitLocation({...i,replace:!0,ignoreBlocker:!0}),r;const a=n.stores.resolvedLocation.get();return(a==null?void 0:a.href)===s.href&&a.state.__TSR_key===s.state.__TSR_key?t.push(n.stores.matches.get(),o=>{o&&n.emit({type:"onRendered",..._b(a,a)})}):n._tx||n.load({sync:!0}).catch(console.error),r},[n,n.history]),null}function kW(){const e=_i(),n=e.routesById[gd],t=mb(e,n),r=e.ssr?rd:A.Suspense,s=f.jsxs(f.Fragment,{children:[f.jsx(wW,{t:A.useState()[1]}),f.jsx(r,{fallback:t,children:f.jsx(SW,{})})]});return e.options.InnerWrap?f.jsx(e.options.InnerWrap,{children:s}):s}function SW(){const e=_i(),n=e._rendered,t=Go(e.stores.matches,a=>n[0]??a),r=t[0],s=r==null?void 0:r.routeId;cO(()=>{n[0]===t&&PO(n,!0)},[n,t]);const i=s?f.jsx(BO,{routeId:s}):null;return f.jsx(db.Provider,{value:s,children:e.options.disableGlobalCatchBoundary?i:f.jsx(Sk,{getResetKey:()=>r,onCatch:void 0,children:i})})}var CW=e=>({createMutableStore:mE,createReadonlyStore:mE,batch:XK}),EW=e=>new NW(e),NW=class extends NK{constructor(e){super(e,CW)}};function zW({router:e,children:n,...t}){_O(t)&&e.update({...e.options,...t,context:{...e.options.context,...t.context}});const r=f.jsx(jO.Provider,{value:e,children:n});return e.options.Wrap?f.jsx(e.options.Wrap,{children:r}):r}function jW({router:e,...n}){return f.jsx(zW,{router:e,...n,children:f.jsx(kW,{})})}function TW(e,n){if(e===void 0)return{shouldBlockFn:()=>!0,withResolver:!1};if("shouldBlockFn"in e)return e;if(typeof e=="function")return{shouldBlockFn:async()=>await e(),enableBeforeUnload:!0,withResolver:!1};const t=!!(e.condition??!0),r=e.blockerFn;return{shouldBlockFn:async()=>t&&r!==void 0?await r():t,enableBeforeUnload:t,withResolver:r===void 0}}function AW(e,n){const{shouldBlockFn:t,enableBeforeUnload:r=!0,disabled:s=!1,withResolver:i=!1}=TW(e),a=_i(),{history:o}=a,[l,u]=A.useState({status:"idle",current:void 0,next:void 0,action:void 0,proceed:void 0,reset:void 0});return A.useEffect(()=>{const h=async _=>{function p(b){const w=a.parseLocation(b),[,y,C]=a.getMatchedRoutes(w.pathname);return C===void 0?{routeId:"__notFound__",fullPath:w.pathname,pathname:w.pathname,params:y,search:a.options.parseSearch(b.search)}:{routeId:C.id,fullPath:C.fullPath,pathname:w.pathname,params:y,search:a.options.parseSearch(b.search)}}const m=p(_.currentLocation),x=p(_.nextLocation);if(m.routeId==="__notFound__"&&x.routeId!=="__notFound__")return!1;const k=await t({action:_.action,current:m,next:x});if(!i)return k;if(!k)return!1;const v=await new Promise(b=>{u({status:"blocked",current:m,next:x,action:_.action,proceed:()=>b(!1),reset:()=>b(!0)})});return u({status:"idle",current:void 0,next:void 0,action:void 0,proceed:void 0,reset:void 0}),v};return s?void 0:o.block({blockerFn:h,enableBeforeUnload:r})},[t,r,s,i,o,a]),l}function FO(e){const n=_i({warn:(e==null?void 0:e.router)===void 0}),t=(e==null?void 0:e.router)||n;return Go(t.stores.__store,Ck(e,t))}function RW(e){const n=_i();return Go(n.stores.location,Ck(e,n))}const fv=new WeakMap,L1=new WeakMap;function Ja(e,n,t="*"){var r;for(const s of e.getQueryCache().findAll({queryKey:n}))fv.set(s,(fv.get(s)??0)+1),(r=L1.get(s))==null||r.add(t)}function lm(e,n,t,r=!0){if(!n)return e;const s=new Map(n.map(l=>[l.id,l])),i=new Set(e.map(l=>l.id)),a=n.filter(l=>t.has(l.id)&&!i.has(l.id)),o=e.filter(l=>!t.has(l.id)||s.has(l.id)).map(l=>t.has(l.id)?s.get(l.id)??l:l);return r?[...a,...o]:[...o,...a]}async function gh(e,n,t,r=(s,i)=>i??s){const s=e.getQueryCache().find({queryKey:n,exact:!0}),i=s?fv.get(s):void 0,a=await t();if(!s||fv.get(s)===i||s.state.fetchStatus!=="fetching"||e.getQueryCache().find({queryKey:n,exact:!0})!==s)return a;e.setQueryData(n,l=>l??a);const o=new Set;L1.set(s,o);try{const l=await t();return o.size?r(l,e.getQueryData(n),o):l}finally{L1.get(s)===o&&L1.delete(s)}}const Qd=e=>typeof e=="string"&&/^[0-9a-f]{40}$/i.test(e);function HO(e){const n=e.queryKey[2];if(n==="resolvedFile")return Qd(e.queryKey[7]);const t=n==="getProjectFile"?e.queryKey[5]:n==="getCodeTree"?e.queryKey[4]:null;return typeof t=="object"&&t!==null&&"ref"in t&&Qd(t.ref)}function Ca(e,n=Ra(),t,r=!1){if(!$n(n))return;const s={queryKey:n,predicate:i=>e.includes(String(i.queryKey[2]))&&!HO(i)&&(!t||t(i))};r?rt.cancelQueries(s).then(()=>{$n(n)&&rt.invalidateQueries(s)}):rt.invalidateQueries(s)}const qO=["resolvedFile","getProjectFile","getArtifactFileText","getArtifactFileMetadata"],Nk=["getArtifacts","getArtifactFileText","getArtifactFileMetadata"],MW=["listProjects","listProjectActivity","listExperiments","listRuns","listChatSessions","getChatMessages","getHarnesses","getUpdateStatus",...Nk,...qO,"getAbsoluteFile","fileVersion","getCodeTree","getSessionWorktree","getRunDiff","getExperimentDiff"];function OW(e,n=Ra(),t=!1){const r=rt.getQueryData([...n,"listChatSessions",e])??[],s=rt.getQueryData([...n,"listRuns",e])??[],i=rt.getQueryData([...n,"listExperiments",e])??[];Ca([...qO,...Nk,"getRunDiff","getExperimentDiff","getCodeTree","getSessionWorktree","fileVersion","getProjectGitStatus","getOverleafState","getOverleafStatus"],n,a=>{const o=a.queryKey[2];return o==="getRunDiff"?s.some(l=>l.id===a.queryKey[3]):o==="getExperimentDiff"?i.some(l=>l.id===a.queryKey[3]):o==="getSessionWorktree"?r.some(l=>l.id===a.queryKey[3]):o==="fileVersion"?typeof a.queryKey[3]=="string"&&a.queryKey[3].startsWith(`/api/projects/${e}/`):a.queryKey[3]===e},t)}function gb(e){const n=Ra();gu.add(e),Ja(rt,[...n,"listChatSessions"],e),rt.setQueriesData({queryKey:[...n,"listChatSessions"]},t=>t==null?void 0:t.filter(r=>r.id!==e));for(const t of["getChatMessages","getSessionWorktree"])pk({queryKey:[...n,t,e]})}function DW(e){const n=Ra(),t=rt.getQueryData([...n,"listChatSessions",e]);for(const r of t??[])gb(r.id);pk({queryKey:n,predicate:r=>r.queryKey.slice(3).includes(e)})}const LW={hf:["getHfSettings","getComputeSettings","getEnvVars"],tinker:["getTinkerSettings","getComputeSettings","getEnvVars"],k8s:["getK8sSettings","getComputeSettings"],modal:["getModalSettings","getComputeSettings","getEnvVars"],slurm:["getSlurmSettings","getComputeSettings"],ray:["getRaySettings","getComputeSettings"],env:["getEnvVars","getHfSettings","getTinkerSettings","getModalSettings","getSlurmSettings","getRaySettings","getK8sSettings","getOpenResearchSettings","getComputeSettings","getHarnesses"],"data-dir":["getDataDir"],ssh:["getSshHosts","getSshConfig","getSshMasterStatus","getComputeSettings"],compute:["getComputeSettings"],git:["githubAccount","repoAccess","getProjectGitStatus"],profile:["getProfile"],"lit-sources":["getLitSources"],projects:["getProjectDefaults","getProjectGitStatus"],telemetry:["getTelemetry"]};function IW(e,n){var a;if(!$n(n))return;const t=(o,l=n,u)=>Ca(o,l,u,!0),r=e.split("?")[0];if(/\/(ui-state|open|prewarm|validate|preflight)$/.test(r))return;const s=(a=/^\/api\/settings\/([^/]+)/.exec(r))==null?void 0:a[1];if(s){t(LW[s]??[],n);return}if(r.startsWith("/api/local-models")&&!/\/(discover|check)$/.test(r)){t(["getLocalModels","getHarnesses"],n);return}if(r==="/api/user-skills"){t(["listUserSkills","getSkills","getSkillContent"],n);return}if(r==="/api/latex-templates"){t(["listLatexTemplates"],n);return}if(r==="/api/overleaf/token"){t(["getOverleafSettings","getOverleafState","getOverleafStatus"],n);return}if(r.startsWith("/api/update/")){t(["getUpdateStatus","getLocalMachine"],n);return}if(r.startsWith("/api/remote/")||r.startsWith("/_orx/")){t(["listRemoteSessions"],n),rt.invalidateQueries({queryKey:["gateway","runtime"]});return}if(r.startsWith("/api/chat/")){r==="/api/chat/sessions"&&t(["getProjectStarterPrompts","listProjectActivity"],n);return}const i=/^\/api\/projects\/([^/]+)(.*)$/.exec(r);if(i){const[,o,l]=i;if(l.startsWith("/file")){OW(o,n,!0);return}t(["listProjects","listProjectActivity"],n),t(["getProjectGitStatus","getCodeTree","getProjectStarterPrompts"],n,u=>u.queryKey[3]===o);return}(r==="/api/projects"||r==="/api/onboarding/complete")&&t(["listProjects","listProjectActivity","getUiState","getProfile"],n)}const $W={},BW="en",zk=["en","zh-CN","fa","ar","es","hi"],UO="orx:locale",jk=["localStorage","preferredLanguage","baseLocale"],kE=[],d0=typeof window>"u";globalThis.__paraglide=globalThis.__paraglide??{};globalThis.__paraglide.ssr=globalThis.__paraglide.ssr??{};let SE=!1,z=()=>{var t;let e=jk;!d0&&typeof window<"u"&&((t=window.location)!=null&&t.href)&&(e=KO(window.location.href));const n=PW(e);if(n)return SE||(SE=!0,GO(n,{reload:!1})),n;throw new Error("No locale found. Read the docs https://paraglidejs.com/errors#no-locale-found")};function PW(e,n){let t;for(const r of e){if(r==="baseLocale")t=BW;else if(r==="preferredLanguage"&&!d0)t=GW();else if(r==="localStorage"&&!d0)t=localStorage.getItem(UO)??void 0;else if(WO(r)&&dv.has(r)){const i=dv.get(r);if(i){const a=i.getLocale();if(a instanceof Promise)continue;if(a!==void 0)return qW(a)}}const s=h0(t);if(s)return s}}const FW=e=>{window.location.reload()};let GO=(e,n)=>{var o;const t={reload:!0,...n};let r;try{r=z()}catch{}const s=[];let i=jk;!d0&&typeof window<"u"&&((o=window.location)!=null&&o.href)&&(i=KO(window.location.href));for(const l of i)if(l!=="baseLocale"){if(l==="localStorage"&&typeof window<"u")localStorage.setItem(UO,e);else if(WO(l)&&dv.has(l)){const u=dv.get(l);if(u){let h=u.setLocale(e);h instanceof Promise&&(h=h.catch(_=>{throw new Error(`Custom strategy "${l}" setLocale failed.`,{cause:_})}),s.push(h))}}}const a=()=>{!d0&&t.reload&&window.location&&e!==r&&FW()};if(s.length)return Promise.all(s).then(()=>{a()});a()},HW=()=>typeof window<"u"?window.location.origin:"http://fallback.com";function h0(e){if(typeof e!="string")return;const n=e.toLowerCase();for(const t of zk)if(t.toLowerCase()===n)return t}function VO(e){return!!e&&zk.some(n=>n===e)}function qW(e){const n=h0(e);if(n)return n;throw new Error(`Invalid locale: ${e}. Expected one of: ${zk.join(", ")}`)}function UW(e,n){return e.exec(n.href)}function GW(){var n;if(!((n=navigator==null?void 0:navigator.languages)!=null&&n.length))return;const e=navigator.languages.map(t=>({fullTag:t,baseTag:t.split("-")[0]}));for(const t of e){const r=h0(t.fullTag);if(r)return r;const s=h0(t.baseTag);if(s)return s}}function VW(e){return KW(e)}function KW(e){const n=typeof e=="string"?new URL(e,HW()):new URL(e),t=n.pathname.split("/").filter(Boolean);return t.length>0&&h0(t[0])&&(n.pathname="/"+t.slice(1).join("/")),n}let CE,EE;function WW(e){if(kE.length===0)return;const n=typeof e=="string"?e:e.href;if(CE===n)return EE;const t=new URL(n,"http://example.com"),r=VW(t),s=r.href===t.href?[t]:[t,r];let i;for(const a of s){for(const o of kE){const l=new $W(o.match,a.href);if(UW(l,a)){i=o;break}}if(i)break}return CE=n,EE=i,i}function KO(e){const n=WW(e);return n&&n.exclude!==!0&&Array.isArray(n.strategy)?n.strategy:jk}const dv=new Map;function WO(e){return typeof e=="string"&&/^custom-[A-Za-z0-9_-]+$/.test(e)}const QW=e=>`Actions for ${e==null?void 0:e.name}`,XW=e=>`${e==null?void 0:e.name} 的操作`,YW=e=>`عملیات ${e==null?void 0:e.name}`,ZW=e=>`إجراءات ${e==null?void 0:e.name}`,JW=e=>`Acciones para ${e==null?void 0:e.name}`,eQ=e=>`${e==null?void 0:e.name} के लिए क्रियाएं`,tQ=((e,n={})=>{const t=n.locale??z();return t==="zh-CN"?XW(e):t==="fa"?YW(e):t==="ar"?ZW(e):t==="es"?JW(e):t==="hi"?eQ(e):QW(e)}),nQ=e=>`${e==null?void 0:e.path} — press Space to preview; double-click or press Enter to keep open in a tab`,rQ=e=>`${e==null?void 0:e.path}——按空格键预览;双击或按 Enter 以在标签页中保持打开`,sQ=e=>`${e==null?void 0:e.path} — برای پیش‌نمایش Space و برای باز نگه‌داشتن در زبانه دوبار کلیک کنید یا Enter را بزنید`,iQ=e=>`${e==null?void 0:e.path} — اضغط المسافة للمعاينة؛ انقر نقرًا مزدوجًا أو اضغط Enter لإبقائه مفتوحًا في تبويب`,aQ=e=>`${e==null?void 0:e.path} — pulsa Espacio para previsualizarlo; haz doble clic o pulsa Intro para mantenerlo abierto en una pestaña`,oQ=e=>`${e==null?void 0:e.path} — पूर्वावलोकन के लिए स्पेस दबाएं; टैब में खुला रखने के लिए डबल-क्लिक करें या Enter दबाएं`,lQ=((e,n={})=>{const t=n.locale??z();return t==="zh-CN"?rQ(e):t==="fa"?sQ(e):t==="ar"?iQ(e):t==="es"?aQ(e):t==="hi"?oQ(e):nQ(e)}),cQ=e=>`Branch: ${e==null?void 0:e.branch}`,uQ=e=>`分支:${e==null?void 0:e.branch}`,_Q=e=>`شاخه: ${e==null?void 0:e.branch}`,fQ=e=>`الفرع: ${e==null?void 0:e.branch}`,dQ=e=>`Rama: ${e==null?void 0:e.branch}`,hQ=e=>`ब्रांच: ${e==null?void 0:e.branch}`,pQ=((e,n={})=>{const t=n.locale??z();return t==="zh-CN"?uQ(e):t==="fa"?_Q(e):t==="ar"?fQ(e):t==="es"?dQ(e):t==="hi"?hQ(e):cQ(e)}),mQ=e=>`Browse code on ${e==null?void 0:e.branch}`,gQ=e=>`浏览分支 ${e==null?void 0:e.branch} 上的代码`,vQ=e=>`مرور کد در شاخهٔ ${e==null?void 0:e.branch}`,bQ=e=>`تصفّح الشيفرة على ${e==null?void 0:e.branch}`,yQ=e=>`Explorar el código en ${e==null?void 0:e.branch}`,xQ=e=>`${e==null?void 0:e.branch} पर कोड ब्राउज़ करें`,QO=((e,n={})=>{const t=n.locale??z();return t==="zh-CN"?gQ(e):t==="fa"?vQ(e):t==="ar"?bQ(e):t==="es"?yQ(e):t==="hi"?xQ(e):mQ(e)}),wQ=e=>`Harness and model for this chat: ${e==null?void 0:e.label}`,kQ=e=>`此聊天的智能体工具和模型:${e==null?void 0:e.label}`,SQ=e=>`ابزار عامل و مدل این گفتگو: ${e==null?void 0:e.label}`,CQ=e=>`أداة البرمجة والنموذج المستخدمان في هذه المحادثة: ${e==null?void 0:e.label}`,EQ=e=>`Agente y modelo de este chat: ${e==null?void 0:e.label}`,NQ=e=>`इस चैट का हार्नेस और मॉडल: ${e==null?void 0:e.label}`,zQ=((e,n={})=>{const t=n.locale??z();return t==="zh-CN"?kQ(e):t==="fa"?SQ(e):t==="ar"?CQ(e):t==="es"?EQ(e):t==="hi"?NQ(e):wQ(e)}),jQ=e=>`Collapse ${e==null?void 0:e.name}`,TQ=e=>`折叠 ${e==null?void 0:e.name}`,AQ=e=>`بستن ${e==null?void 0:e.name}`,RQ=e=>`طيّ ${e==null?void 0:e.name}`,MQ=e=>`Contraer ${e==null?void 0:e.name}`,OQ=e=>`${e==null?void 0:e.name} समेटें`,DQ=((e,n={})=>{const t=n.locale??z();return t==="zh-CN"?TQ(e):t==="fa"?AQ(e):t==="ar"?RQ(e):t==="es"?MQ(e):t==="hi"?OQ(e):jQ(e)}),LQ=e=>`Committed changes versus ${e==null?void 0:e.parent}`,IQ=e=>`与 ${e==null?void 0:e.parent} 相比的已提交更改`,$Q=e=>`تغییرات کامیت‌شده نسبت به ${e==null?void 0:e.parent}`,BQ=e=>`التغييرات المودعة مقابل ${e==null?void 0:e.parent}`,PQ=e=>`Cambios confirmados respecto a ${e==null?void 0:e.parent}`,FQ=e=>`${e==null?void 0:e.parent} की तुलना में कमिट किए गए बदलाव`,HQ=((e,n={})=>{const t=n.locale??z();return t==="zh-CN"?IQ(e):t==="fa"?$Q(e):t==="ar"?BQ(e):t==="es"?PQ(e):t==="hi"?FQ(e):LQ(e)}),qQ=e=>`Committed changes versus ${e==null?void 0:e.parent} (diff truncated; counts are lower bounds)`,UQ=e=>`与 ${e==null?void 0:e.parent} 相比的已提交更改(差异已截断,计数为下限)`,GQ=e=>`تغییرات کامیت‌شده نسبت به ${e==null?void 0:e.parent} (تفاوت کوتاه شده و شمارش‌ها حد پایین‌اند)`,VQ=e=>`التغييرات المودعة مقابل ${e==null?void 0:e.parent} (الفرق مقتطع؛ الأعداد حدود دنيا)`,KQ=e=>`Cambios confirmados respecto a ${e==null?void 0:e.parent} (diff truncado; los recuentos son mínimos)`,WQ=e=>`${e==null?void 0:e.parent} की तुलना में कमिट किए गए बदलाव (डिफ़ छोटा किया गया; संख्याएं न्यूनतम हैं)`,QQ=((e,n={})=>{const t=n.locale??z();return t==="zh-CN"?UQ(e):t==="fa"?GQ(e):t==="ar"?VQ(e):t==="es"?KQ(e):t==="hi"?WQ(e):qQ(e)}),XQ=e=>`Copy ${e==null?void 0:e.value}`,YQ=e=>`复制 ${e==null?void 0:e.value}`,ZQ=e=>`کپی ${e==null?void 0:e.value}`,JQ=e=>`نسخ ${e==null?void 0:e.value}`,eX=e=>`Copiar ${e==null?void 0:e.value}`,tX=e=>`${e==null?void 0:e.value} कॉपी करें`,nX=((e,n={})=>{const t=n.locale??z();return t==="zh-CN"?YQ(e):t==="fa"?ZQ(e):t==="ar"?JQ(e):t==="es"?eX(e):t==="hi"?tX(e):XQ(e)}),rX=e=>`Delete ${e==null?void 0:e.name}`,sX=e=>`删除 ${e==null?void 0:e.name}`,iX=e=>`حذف ${e==null?void 0:e.name}`,aX=e=>`حذف ${e==null?void 0:e.name}`,oX=e=>`Eliminar ${e==null?void 0:e.name}`,lX=e=>`${e==null?void 0:e.name} हटाएं`,Q4=((e,n={})=>{const t=n.locale??z();return t==="zh-CN"?sX(e):t==="fa"?iX(e):t==="ar"?aX(e):t==="es"?oX(e):t==="hi"?lX(e):rX(e)}),cX=e=>`Download ${e==null?void 0:e.name}`,uX=e=>`下载 ${e==null?void 0:e.name}`,_X=e=>`بارگیری ${e==null?void 0:e.name}`,fX=e=>`تنزيل ${e==null?void 0:e.name}`,dX=e=>`Descargar ${e==null?void 0:e.name}`,hX=e=>`${e==null?void 0:e.name} डाउनलोड करें`,NE=((e,n={})=>{const t=n.locale??z();return t==="zh-CN"?uX(e):t==="fa"?_X(e):t==="ar"?fX(e):t==="es"?dX(e):t==="hi"?hX(e):cX(e)}),pX=e=>`Expand ${e==null?void 0:e.name}`,mX=e=>`展开 ${e==null?void 0:e.name}`,gX=e=>`باز کردن ${e==null?void 0:e.name}`,vX=e=>`توسيع ${e==null?void 0:e.name}`,bX=e=>`Expandir ${e==null?void 0:e.name}`,yX=e=>`${e==null?void 0:e.name} फैलाएं`,xX=((e,n={})=>{const t=n.locale??z();return t==="zh-CN"?mX(e):t==="fa"?gX(e):t==="ar"?vX(e):t==="es"?bX(e):t==="hi"?yX(e):pX(e)}),wX=e=>`Hide additional ${e==null?void 0:e.target}`,kX=e=>`隐藏其余${e==null?void 0:e.target}`,SX=e=>`پنهان کردن موارد بیشترِ ${e==null?void 0:e.target}`,CX=e=>`إخفاء ${e==null?void 0:e.target} الإضافية`,EX=e=>`Ocultar ${e==null?void 0:e.target} adicionales`,NX=e=>`अतिरिक्त ${e==null?void 0:e.target} छिपाएं`,zX=((e,n={})=>{const t=n.locale??z();return t==="zh-CN"?kX(e):t==="fa"?SX(e):t==="ar"?CX(e):t==="es"?EX(e):t==="hi"?NX(e):wX(e)}),jX=e=>`Hide error details for ${e==null?void 0:e.activity}`,TX=e=>`隐藏 ${e==null?void 0:e.activity} 的错误详情`,AX=e=>`پنهان کردن جزئیات خطای ${e==null?void 0:e.activity}`,RX=e=>`إخفاء تفاصيل الخطأ لـ ${e==null?void 0:e.activity}`,MX=e=>`Ocultar los detalles del error de ${e==null?void 0:e.activity}`,OX=e=>`${e==null?void 0:e.activity} के लिए त्रुटि विवरण छिपाएं`,DX=((e,n={})=>{const t=n.locale??z();return t==="zh-CN"?TX(e):t==="fa"?AX(e):t==="ar"?RX(e):t==="es"?MX(e):t==="hi"?OX(e):jX(e)}),LX=e=>`${e==null?void 0:e.count} consecutive identical calls`,IX=e=>`连续 ${e==null?void 0:e.count} 次相同调用`,$X=e=>`${e==null?void 0:e.count} فراخوانی یکسان پیاپی`,BX=e=>`الاستدعاءات المتطابقة المتتالية: ${e==null?void 0:e.count}`,PX=e=>`Llamadas idénticas consecutivas: ${e==null?void 0:e.count}`,FX=e=>`${e==null?void 0:e.count} लगातार समान कॉल`,HX=((e,n={})=>{const t=n.locale??z();return t==="zh-CN"?IX(e):t==="fa"?$X(e):t==="ar"?BX(e):t==="es"?PX(e):t==="hi"?FX(e):LX(e)}),qX=e=>`${e==null?void 0:e.name} — double-click or press Enter to keep open`,UX=e=>`${e==null?void 0:e.name}——双击或按 Enter 以保持打开`,GX=e=>`${e==null?void 0:e.name} — برای باز نگه‌داشتن دوبار کلیک کنید یا Enter را بزنید`,VX=e=>`${e==null?void 0:e.name} — انقر نقرًا مزدوجًا أو اضغط Enter لإبقائه مفتوحًا`,KX=e=>`${e==null?void 0:e.name} — haz doble clic o pulsa Intro para mantenerlo abierto`,WX=e=>`${e==null?void 0:e.name} — खुला रखने के लिए डबल-क्लिक करें या Enter दबाएं`,QX=((e,n={})=>{const t=n.locale??z();return t==="zh-CN"?UX(e):t==="fa"?GX(e):t==="ar"?VX(e):t==="es"?KX(e):t==="hi"?WX(e):qX(e)}),XX=e=>`Open ${e==null?void 0:e.branch} on GitHub`,YX=e=>`在 GitHub 上打开 ${e==null?void 0:e.branch}`,ZX=e=>`باز کردن ${e==null?void 0:e.branch} در GitHub`,JX=e=>`فتح ${e==null?void 0:e.branch} على GitHub`,eY=e=>`Abrir ${e==null?void 0:e.branch} en GitHub`,tY=e=>`${e==null?void 0:e.branch} को GitHub पर खोलें`,XO=((e,n={})=>{const t=n.locale??z();return t==="zh-CN"?YX(e):t==="fa"?ZX(e):t==="ar"?JX(e):t==="es"?eY(e):t==="hi"?tY(e):XX(e)}),nY=e=>`Open experiment ${e==null?void 0:e.name}`,rY=e=>`打开实验 ${e==null?void 0:e.name}`,sY=e=>`باز کردن آزمایش ${e==null?void 0:e.name}`,iY=e=>`فتح التجربة ${e==null?void 0:e.name}`,aY=e=>`Abrir el experimento ${e==null?void 0:e.name}`,oY=e=>`${e==null?void 0:e.name} प्रयोग खोलें`,lY=((e,n={})=>{const t=n.locale??z();return t==="zh-CN"?rY(e):t==="fa"?sY(e):t==="ar"?iY(e):t==="es"?aY(e):t==="hi"?oY(e):nY(e)}),cY=e=>`Open ${e==null?void 0:e.path} in the right pane`,uY=e=>`在右侧面板中打开 ${e==null?void 0:e.path}`,_Y=e=>`باز کردن ${e==null?void 0:e.path} در پنل سمت راست`,fY=e=>`فتح ${e==null?void 0:e.path} في الجزء الأيمن`,dY=e=>`Abrir ${e==null?void 0:e.path} en el panel derecho`,hY=e=>`${e==null?void 0:e.path} को दाएं पैनल में खोलें`,pY=((e,n={})=>{const t=n.locale??z();return t==="zh-CN"?uY(e):t==="fa"?_Y(e):t==="ar"?fY(e):t==="es"?dY(e):t==="hi"?hY(e):cY(e)}),mY=e=>`Open ${e==null?void 0:e.name}`,gY=e=>`打开 ${e==null?void 0:e.name}`,vY=e=>`باز کردن ${e==null?void 0:e.name}`,bY=e=>`فتح ${e==null?void 0:e.name}`,yY=e=>`Abrir ${e==null?void 0:e.name}`,xY=e=>`${e==null?void 0:e.name} खोलें`,wY=((e,n={})=>{const t=n.locale??z();return t==="zh-CN"?gY(e):t==="fa"?vY(e):t==="ar"?bY(e):t==="es"?yY(e):t==="hi"?xY(e):mY(e)}),kY=e=>`Open logs for run ${e==null?void 0:e.run}`,SY=e=>`打开运行 ${e==null?void 0:e.run} 的日志`,CY=e=>`باز کردن گزارش‌های اجرای ${e==null?void 0:e.run}`,EY=e=>`فتح سجلات التشغيل ${e==null?void 0:e.run}`,NY=e=>`Abrir los logs de la ejecución ${e==null?void 0:e.run}`,zY=e=>`रन ${e==null?void 0:e.run} के लॉग खोलें`,jY=((e,n={})=>{const t=n.locale??z();return t==="zh-CN"?SY(e):t==="fa"?CY(e):t==="ar"?EY(e):t==="es"?NY(e):t==="hi"?zY(e):kY(e)}),TY=e=>`Open ${e==null?void 0:e.name} on GitHub`,AY=e=>`在 GitHub 上打开 ${e==null?void 0:e.name}`,RY=e=>`باز کردن ${e==null?void 0:e.name} در GitHub`,MY=e=>`فتح ${e==null?void 0:e.name} على GitHub`,OY=e=>`Abrir ${e==null?void 0:e.name} en GitHub`,DY=e=>`${e==null?void 0:e.name} को GitHub पर खोलें`,hv=((e,n={})=>{const t=n.locale??z();return t==="zh-CN"?AY(e):t==="fa"?RY(e):t==="ar"?MY(e):t==="es"?OY(e):t==="hi"?DY(e):TY(e)}),LY=e=>`Open logs for run ${e==null?void 0:e.id} in the right pane`,IY=e=>`在右侧面板中打开运行 ${e==null?void 0:e.id} 的日志`,$Y=e=>`باز کردن گزارش اجرای ${e==null?void 0:e.id} در پنل سمت راست`,BY=e=>`فتح سجلات التشغيل ${e==null?void 0:e.id} في الجزء الأيمن`,PY=e=>`Abrir los logs de la ejecución ${e==null?void 0:e.id} en el panel derecho`,FY=e=>`दाएं पैनल में रन ${e==null?void 0:e.id} के लॉग खोलें`,HY=((e,n={})=>{const t=n.locale??z();return t==="zh-CN"?IY(e):t==="fa"?$Y(e):t==="ar"?BY(e):t==="es"?PY(e):t==="hi"?FY(e):LY(e)}),qY=e=>`Overleaf — ${e==null?void 0:e.status}`,UY=e=>`Overleaf — ${e==null?void 0:e.status}`,GY=e=>`Overleaf — ${e==null?void 0:e.status}`,VY=e=>`Overleaf — ${e==null?void 0:e.status}`,KY=e=>`Overleaf — ${e==null?void 0:e.status}`,WY=e=>`Overleaf — ${e==null?void 0:e.status}`,QY=((e,n={})=>{const t=n.locale??z();return t==="zh-CN"?UY(e):t==="fa"?GY(e):t==="ar"?VY(e):t==="es"?KY(e):t==="hi"?WY(e):qY(e)}),XY=e=>`Preview /${e==null?void 0:e.name} skill`,YY=e=>`预览 /${e==null?void 0:e.name} 技能`,ZY=e=>`پیش‌نمایش مهارت ‎/${e==null?void 0:e.name}`,JY=e=>`معاينة مهارة /${e==null?void 0:e.name}`,eZ=e=>`Vista previa de la skill /${e==null?void 0:e.name}`,tZ=e=>`/${e==null?void 0:e.name} स्किल का पूर्वावलोकन करें`,nZ=((e,n={})=>{const t=n.locale??z();return t==="zh-CN"?YY(e):t==="fa"?ZY(e):t==="ar"?JY(e):t==="es"?eZ(e):t==="hi"?tZ(e):XY(e)}),rZ=e=>`Remove annotation ${e==null?void 0:e.number}`,sZ=e=>`移除批注 ${e==null?void 0:e.number}`,iZ=e=>`حذف یادداشت ${e==null?void 0:e.number}`,aZ=e=>`إزالة التعليق ${e==null?void 0:e.number}`,oZ=e=>`Quitar la anotación ${e==null?void 0:e.number}`,lZ=e=>`एनोटेशन ${e==null?void 0:e.number} हटाएं`,cZ=((e,n={})=>{const t=n.locale??z();return t==="zh-CN"?sZ(e):t==="fa"?iZ(e):t==="ar"?aZ(e):t==="es"?oZ(e):t==="hi"?lZ(e):rZ(e)}),uZ=e=>`Remove ${e==null?void 0:e.name}`,_Z=e=>`移除 ${e==null?void 0:e.name}`,fZ=e=>`حذف ${e==null?void 0:e.name}`,dZ=e=>`إزالة ${e==null?void 0:e.name}`,hZ=e=>`Quitar ${e==null?void 0:e.name}`,pZ=e=>`${e==null?void 0:e.name} हटाएं`,mZ=((e,n={})=>{const t=n.locale??z();return t==="zh-CN"?_Z(e):t==="fa"?fZ(e):t==="ar"?dZ(e):t==="es"?hZ(e):t==="hi"?pZ(e):uZ(e)}),gZ=e=>`Remove queued message: ${e==null?void 0:e.text}`,vZ=e=>`移除排队消息:${e==null?void 0:e.text}`,bZ=e=>`حذف پیام صف: ${e==null?void 0:e.text}`,yZ=e=>`إزالة الرسالة من قائمة الانتظار: ${e==null?void 0:e.text}`,xZ=e=>`Quitar el mensaje en cola: ${e==null?void 0:e.text}`,wZ=e=>`कतार में लगा संदेश हटाएं: ${e==null?void 0:e.text}`,kZ=((e,n={})=>{const t=n.locale??z();return t==="zh-CN"?vZ(e):t==="fa"?bZ(e):t==="ar"?yZ(e):t==="es"?xZ(e):t==="hi"?wZ(e):gZ(e)}),SZ=e=>`Retry queued message: ${e==null?void 0:e.text}`,CZ=e=>`重试排队消息:${e==null?void 0:e.text}`,EZ=e=>`تلاش دوباره برای پیام صف: ${e==null?void 0:e.text}`,NZ=e=>`إعادة محاولة إرسال الرسالة في قائمة الانتظار: ${e==null?void 0:e.text}`,zZ=e=>`Reintentar el mensaje en cola: ${e==null?void 0:e.text}`,jZ=e=>`कतार में लगा संदेश फिर से भेजें: ${e==null?void 0:e.text}`,TZ=((e,n={})=>{const t=n.locale??z();return t==="zh-CN"?CZ(e):t==="fa"?EZ(e):t==="ar"?NZ(e):t==="es"?zZ(e):t==="hi"?jZ(e):SZ(e)}),AZ=e=>`Run ${e==null?void 0:e.value} in a terminal here`,RZ=e=>`在此处的终端中运行 ${e==null?void 0:e.value}`,MZ=e=>`اجرای ${e==null?void 0:e.value} در ترمینال همین‌جا`,OZ=e=>`تشغيل ${e==null?void 0:e.value} في طرفية هنا`,DZ=e=>`Ejecutar ${e==null?void 0:e.value} en una terminal aquí`,LZ=e=>`${e==null?void 0:e.value} को यहाँ टर्मिनल में चलाएँ`,zE=((e,n={})=>{const t=n.locale??z();return t==="zh-CN"?RZ(e):t==="fa"?MZ(e):t==="ar"?OZ(e):t==="es"?DZ(e):t==="hi"?LZ(e):AZ(e)}),IZ=e=>`Run ${e==null?void 0:e.id}`,$Z=e=>`运行 ${e==null?void 0:e.id}`,BZ=e=>`اجرای ${e==null?void 0:e.id}`,PZ=e=>`تشغيل ${e==null?void 0:e.id}`,FZ=e=>`Ejecución ${e==null?void 0:e.id}`,HZ=e=>`रन ${e==null?void 0:e.id}`,qZ=((e,n={})=>{const t=n.locale??z();return t==="zh-CN"?$Z(e):t==="fa"?BZ(e):t==="ar"?PZ(e):t==="es"?FZ(e):t==="hi"?HZ(e):IZ(e)}),UZ=e=>`Show error details for ${e==null?void 0:e.activity}`,GZ=e=>`显示 ${e==null?void 0:e.activity} 的错误详情`,VZ=e=>`نمایش جزئیات خطای ${e==null?void 0:e.activity}`,KZ=e=>`عرض تفاصيل الخطأ لـ ${e==null?void 0:e.activity}`,WZ=e=>`Mostrar los detalles del error de ${e==null?void 0:e.activity}`,QZ=e=>`${e==null?void 0:e.activity} के लिए त्रुटि विवरण दिखाएं`,XZ=((e,n={})=>{const t=n.locale??z();return t==="zh-CN"?GZ(e):t==="fa"?VZ(e):t==="ar"?KZ(e):t==="es"?WZ(e):t==="hi"?QZ(e):UZ(e)}),YZ=e=>`Show ${e==null?void 0:e.count} more ${e==null?void 0:e.target}`,ZZ=e=>`再显示 ${e==null?void 0:e.count} 个${e==null?void 0:e.target}`,JZ=e=>`نمایش ${e==null?void 0:e.count} مورد دیگر از ${e==null?void 0:e.target}`,eJ=e=>`عرض المزيد من ${e==null?void 0:e.target} (${e==null?void 0:e.count})`,tJ=e=>`Mostrar ${e==null?void 0:e.count} ${e==null?void 0:e.target} más`,nJ=e=>`${e==null?void 0:e.count} और ${e==null?void 0:e.target} दिखाएं`,rJ=((e,n={})=>{const t=n.locale??z();return t==="zh-CN"?ZZ(e):t==="fa"?JZ(e):t==="ar"?eJ(e):t==="es"?tJ(e):t==="hi"?nJ(e):YZ(e)}),sJ=e=>`${e==null?void 0:e.name} skill`,iJ=e=>`${e==null?void 0:e.name} 技能`,aJ=e=>`مهارت ${e==null?void 0:e.name}`,oJ=e=>`مهارة ${e==null?void 0:e.name}`,lJ=e=>`Skill ${e==null?void 0:e.name}`,cJ=e=>`${e==null?void 0:e.name} स्किल`,uJ=((e,n={})=>{const t=n.locale??z();return t==="zh-CN"?iJ(e):t==="fa"?aJ(e):t==="ar"?oJ(e):t==="es"?lJ(e):t==="hi"?cJ(e):sJ(e)}),_J=e=>`Value for ${e==null?void 0:e.name}`,fJ=e=>`${e==null?void 0:e.name} 的值`,dJ=e=>`مقدار ${e==null?void 0:e.name}`,hJ=e=>`قيمة ${e==null?void 0:e.name}`,pJ=e=>`Valor de ${e==null?void 0:e.name}`,mJ=e=>`${e==null?void 0:e.name} के लिए वैल्यू`,gJ=((e,n={})=>{const t=n.locale??z();return t==="zh-CN"?fJ(e):t==="fa"?dJ(e):t==="ar"?hJ(e):t==="es"?pJ(e):t==="hi"?mJ(e):_J(e)}),vJ=()=>"Agent reported back",bJ=()=>"智能体已返回结果",yJ=()=>"عامل نتیجه را گزارش کرد",xJ=()=>"أبلغ الوكيل بالنتيجة",wJ=()=>"El agente informó de los resultados",kJ=()=>"एजेंट ने रिपोर्ट भेजी",SJ=((e={},n={})=>{const t=n.locale??z();return t==="zh-CN"?bJ():t==="fa"?yJ():t==="ar"?xJ():t==="es"?wJ():t==="hi"?kJ():vJ()}),CJ=()=>"Browse",EJ=()=>"浏览",NJ=()=>"مرور",zJ=()=>"تصفّح",jJ=()=>"Navegar",TJ=()=>"ब्राउज़ करें",AJ=((e={},n={})=>{const t=n.locale??z();return t==="zh-CN"?EJ():t==="fa"?NJ():t==="ar"?zJ():t==="es"?jJ():t==="hi"?TJ():CJ()}),RJ=()=>"Browsing…",MJ=()=>"正在浏览…",OJ=()=>"در حال مرور…",DJ=()=>"جارٍ التصفّح…",LJ=()=>"Navegando…",IJ=()=>"ब्राउज़ कर रहा है…",$J=((e={},n={})=>{const t=n.locale??z();return t==="zh-CN"?MJ():t==="fa"?OJ():t==="ar"?DJ():t==="es"?LJ():t==="hi"?IJ():RJ()}),BJ=()=>"Checked experiment status and updated notes",PJ=()=>"已检查实验状态并更新笔记",FJ=()=>"وضعیت آزمایش بررسی و یادداشت‌ها به‌روز شد",HJ=()=>"فحص حالة التجربة وحدّث الملاحظات",qJ=()=>"Consultó el estado del experimento y actualizó las notas",UJ=()=>"प्रयोग की स्थिति जाँची और नोट्स अपडेट किए",GJ=((e={},n={})=>{const t=n.locale??z();return t==="zh-CN"?PJ():t==="fa"?FJ():t==="ar"?HJ():t==="es"?qJ():t==="hi"?UJ():BJ()}),VJ=()=>"Closed an agent",KJ=()=>"已关闭智能体",WJ=()=>"عامل بسته شد",QJ=()=>"أغلق وكيلًا",XJ=()=>"Cerró un agente",YJ=()=>"एक एजेंट बंद किया",ZJ=((e={},n={})=>{const t=n.locale??z();return t==="zh-CN"?KJ():t==="fa"?WJ():t==="ar"?QJ():t==="es"?XJ():t==="hi"?YJ():VJ()}),JJ=()=>"Compacted context",eee=()=>"上下文已压缩",tee=()=>"زمینه فشرده شد",nee=()=>"ضغط السياق",ree=()=>"Compactó el contexto",see=()=>"कॉन्टेक्स्ट संक्षिप्त किया",iee=((e={},n={})=>{const t=n.locale??z();return t==="zh-CN"?eee():t==="fa"?tee():t==="ar"?nee():t==="es"?ree():t==="hi"?see():JJ()}),aee=()=>"Compacting context…",oee=()=>"正在压缩上下文…",lee=()=>"در حال فشرده‌سازی زمینه…",cee=()=>"جارٍ ضغط السياق…",uee=()=>"Compactando el contexto…",_ee=()=>"कॉन्टेक्स्ट संक्षिप्त हो रहा है…",fee=((e={},n={})=>{const t=n.locale??z();return t==="zh-CN"?oee():t==="fa"?lee():t==="ar"?cee():t==="es"?uee():t==="hi"?_ee():aee()}),dee=e=>`Created ${e==null?void 0:e.target}`,hee=e=>`已创建 ${e==null?void 0:e.target}`,pee=e=>`${e==null?void 0:e.target} ایجاد شد`,mee=e=>`أنشأ ${e==null?void 0:e.target}`,gee=e=>`Creó ${e==null?void 0:e.target}`,vee=e=>`${e==null?void 0:e.target} बनाया`,bee=((e,n={})=>{const t=n.locale??z();return t==="zh-CN"?hee(e):t==="fa"?pee(e):t==="ar"?mee(e):t==="es"?gee(e):t==="hi"?vee(e):dee(e)}),yee=()=>"Delegate",xee=()=>"委派",wee=()=>"واگذاری",kee=()=>"تفويض",See=()=>"Delegar",Cee=()=>"सौंपें",Eee=((e={},n={})=>{const t=n.locale??z();return t==="zh-CN"?xee():t==="fa"?wee():t==="ar"?kee():t==="es"?See():t==="hi"?Cee():yee()}),Nee=()=>"Delegating…",zee=()=>"正在委派…",jee=()=>"در حال واگذاری…",Tee=()=>"جارٍ التفويض…",Aee=()=>"Delegando…",Ree=()=>"सौंप रहा है…",Mee=((e={},n={})=>{const t=n.locale??z();return t==="zh-CN"?zee():t==="fa"?jee():t==="ar"?Tee():t==="es"?Aee():t==="hi"?Ree():Nee()}),Oee=e=>`Deleted ${e==null?void 0:e.target}`,Dee=e=>`已删除 ${e==null?void 0:e.target}`,Lee=e=>`${e==null?void 0:e.target} حذف شد`,Iee=e=>`حذف ${e==null?void 0:e.target}`,$ee=e=>`Eliminó ${e==null?void 0:e.target}`,Bee=e=>`${e==null?void 0:e.target} हटाया`,Pee=((e,n={})=>{const t=n.locale??z();return t==="zh-CN"?Dee(e):t==="fa"?Lee(e):t==="ar"?Iee(e):t==="es"?$ee(e):t==="hi"?Bee(e):Oee(e)}),Fee=()=>"Edit",Hee=()=>"编辑",qee=()=>"ویرایش",Uee=()=>"تعديل",Gee=()=>"Editar",Vee=()=>"संपादित करें",Kee=((e={},n={})=>{const t=n.locale??z();return t==="zh-CN"?Hee():t==="fa"?qee():t==="ar"?Uee():t==="es"?Gee():t==="hi"?Vee():Fee()}),Wee=e=>`Edited ${e==null?void 0:e.target}`,Qee=e=>`已编辑 ${e==null?void 0:e.target}`,Xee=e=>`${e==null?void 0:e.target} ویرایش شد`,Yee=e=>`عدّل ${e==null?void 0:e.target}`,Zee=e=>`Editó ${e==null?void 0:e.target}`,Jee=e=>`${e==null?void 0:e.target} संपादित किया`,ete=((e,n={})=>{const t=n.locale??z();return t==="zh-CN"?Qee(e):t==="fa"?Xee(e):t==="ar"?Yee(e):t==="es"?Zee(e):t==="hi"?Jee(e):Wee(e)}),tte=()=>"Editing…",nte=()=>"正在编辑…",rte=()=>"در حال ویرایش…",ste=()=>"جارٍ التعديل…",ite=()=>"Editando…",ate=()=>"संपादित कर रहा है…",ote=((e={},n={})=>{const t=n.locale??z();return t==="zh-CN"?nte():t==="fa"?rte():t==="ar"?ste():t==="es"?ite():t==="hi"?ate():tte()}),lte=e=>`${e==null?void 0:e.activity} for “${e==null?void 0:e.query}”`,cte=e=>`${e==null?void 0:e.activity}:“${e==null?void 0:e.query}”`,ute=e=>`${e==null?void 0:e.activity}: «${e==null?void 0:e.query}»`,_te=e=>`${e==null?void 0:e.activity} عن «${e==null?void 0:e.query}»`,fte=e=>`${e==null?void 0:e.activity}: “${e==null?void 0:e.query}”`,dte=e=>`“${e==null?void 0:e.query}” के लिए ${e==null?void 0:e.activity}`,hte=((e,n={})=>{const t=n.locale??z();return t==="zh-CN"?cte(e):t==="fa"?ute(e):t==="ar"?_te(e):t==="es"?fte(e):t==="hi"?dte(e):lte(e)}),pte=e=>`Listed files matching ${e==null?void 0:e.pattern}`,mte=e=>`已列出与 ${e==null?void 0:e.pattern} 匹配的文件`,gte=e=>`فایل‌های مطابق ${e==null?void 0:e.pattern} فهرست شد`,vte=e=>`سرد الملفات المطابقة لـ ${e==null?void 0:e.pattern}`,bte=e=>`Listó archivos que coinciden con ${e==null?void 0:e.pattern}`,yte=e=>`${e==null?void 0:e.pattern} से मेल खाती फ़ाइलों की सूची बनाई`,xte=((e,n={})=>{const t=n.locale??z();return t==="zh-CN"?mte(e):t==="fa"?gte(e):t==="ar"?vte(e):t==="es"?bte(e):t==="hi"?yte(e):pte(e)}),wte=()=>"Load",kte=()=>"加载",Ste=()=>"بارگیری",Cte=()=>"تحميل",Ete=()=>"Cargar",Nte=()=>"लोड करें",zte=((e={},n={})=>{const t=n.locale??z();return t==="zh-CN"?kte():t==="fa"?Ste():t==="ar"?Cte():t==="es"?Ete():t==="hi"?Nte():wte()}),jte=()=>"Loaded a skill",Tte=()=>"已加载技能",Ate=()=>"یک مهارت بارگیری شد",Rte=()=>"حمّل مهارة",Mte=()=>"Cargó una skill",Ote=()=>"एक स्किल लोड की",Dte=((e={},n={})=>{const t=n.locale??z();return t==="zh-CN"?Tte():t==="fa"?Ate():t==="ar"?Rte():t==="es"?Mte():t==="hi"?Ote():jte()}),Lte=e=>`Loaded ${e==null?void 0:e.name} skill`,Ite=e=>`已加载技能 ${e==null?void 0:e.name}`,$te=e=>`مهارت ${e==null?void 0:e.name} بارگیری شد`,Bte=e=>`حمّل مهارة ${e==null?void 0:e.name}`,Pte=e=>`Cargó la skill ${e==null?void 0:e.name}`,Fte=e=>`${e==null?void 0:e.name} स्किल लोड की`,Hte=((e,n={})=>{const t=n.locale??z();return t==="zh-CN"?Ite(e):t==="fa"?$te(e):t==="ar"?Bte(e):t==="es"?Pte(e):t==="hi"?Fte(e):Lte(e)}),qte=()=>"Loading…",Ute=()=>"正在加载…",Gte=()=>"در حال بارگیری…",Vte=()=>"جارٍ التحميل…",Kte=()=>"Cargando…",Wte=()=>"लोड हो रहा है…",Qte=((e={},n={})=>{const t=n.locale??z();return t==="zh-CN"?Ute():t==="fa"?Gte():t==="ar"?Vte():t==="es"?Kte():t==="hi"?Wte():qte()}),Xte=e=>`Opened ${e==null?void 0:e.target}`,Yte=e=>`已打开 ${e==null?void 0:e.target}`,Zte=e=>`${e==null?void 0:e.target} باز شد`,Jte=e=>`فتح ${e==null?void 0:e.target}`,ene=e=>`Abrió ${e==null?void 0:e.target}`,tne=e=>`${e==null?void 0:e.target} खोला`,nne=((e,n={})=>{const t=n.locale??z();return t==="zh-CN"?Yte(e):t==="fa"?Zte(e):t==="ar"?Jte(e):t==="es"?ene(e):t==="hi"?tne(e):Xte(e)}),rne=e=>`Ran ${e==null?void 0:e.command}`,sne=e=>`已运行 ${e==null?void 0:e.command}`,ine=e=>`${e==null?void 0:e.command} اجرا شد`,ane=e=>`نفّذ ${e==null?void 0:e.command}`,one=e=>`Ejecutó ${e==null?void 0:e.command}`,lne=e=>`${e==null?void 0:e.command} चलाया`,cne=((e,n={})=>{const t=n.locale??z();return t==="zh-CN"?sne(e):t==="fa"?ine(e):t==="ar"?ane(e):t==="es"?one(e):t==="hi"?lne(e):rne(e)}),une=()=>"Ran a sub-agent",_ne=()=>"已运行子智能体",fne=()=>"یک عامل فرعی اجرا شد",dne=()=>"شغّل وكيلًا فرعيًا",hne=()=>"Ejecutó un subagente",pne=()=>"एक सब-एजेंट चलाया",mne=((e={},n={})=>{const t=n.locale??z();return t==="zh-CN"?_ne():t==="fa"?fne():t==="ar"?dne():t==="es"?hne():t==="hi"?pne():une()}),gne=()=>"Read",vne=()=>"读取",bne=()=>"خواندن",yne=()=>"قراءة",xne=()=>"Leer",wne=()=>"पढ़ें",kne=((e={},n={})=>{const t=n.locale??z();return t==="zh-CN"?vne():t==="fa"?bne():t==="ar"?yne():t==="es"?xne():t==="hi"?wne():gne()}),Sne=()=>"Read experiment notes",Cne=()=>"已读取实验笔记",Ene=()=>"یادداشت‌های آزمایش خوانده شد",Nne=()=>"قرأ ملاحظات التجربة",zne=()=>"Leyó las notas del experimento",jne=()=>"प्रयोग के नोट्स पढ़े",Tne=((e={},n={})=>{const t=n.locale??z();return t==="zh-CN"?Cne():t==="fa"?Ene():t==="ar"?Nne():t==="es"?zne():t==="hi"?jne():Sne()}),Ane=()=>"Read a paper",Rne=()=>"已读取论文",Mne=()=>"یک مقاله خوانده شد",One=()=>"قرأ ورقة",Dne=()=>"Leyó un paper",Lne=()=>"एक पेपर पढ़ा",Ine=((e={},n={})=>{const t=n.locale??z();return t==="zh-CN"?Rne():t==="fa"?Mne():t==="ar"?One():t==="es"?Dne():t==="hi"?Lne():Ane()}),$ne=e=>`Read ${e==null?void 0:e.name} skill`,Bne=e=>`已读取技能 ${e==null?void 0:e.name}`,Pne=e=>`مهارت ${e==null?void 0:e.name} خوانده شد`,Fne=e=>`قرأ مهارة ${e==null?void 0:e.name}`,Hne=e=>`Leyó la skill ${e==null?void 0:e.name}`,qne=e=>`${e==null?void 0:e.name} स्किल पढ़ी`,B2=((e,n={})=>{const t=n.locale??z();return t==="zh-CN"?Bne(e):t==="fa"?Pne(e):t==="ar"?Fne(e):t==="es"?Hne(e):t==="hi"?qne(e):$ne(e)}),Une=e=>`Read ${e==null?void 0:e.target}`,Gne=e=>`已读取 ${e==null?void 0:e.target}`,Vne=e=>`${e==null?void 0:e.target} خوانده شد`,Kne=e=>`قرأ ${e==null?void 0:e.target}`,Wne=e=>`Leyó ${e==null?void 0:e.target}`,Qne=e=>`${e==null?void 0:e.target} पढ़ा`,kp=((e,n={})=>{const t=n.locale??z();return t==="zh-CN"?Gne(e):t==="fa"?Vne(e):t==="ar"?Kne(e):t==="es"?Wne(e):t==="hi"?Qne(e):Une(e)}),Xne=()=>"Read a web page",Yne=()=>"已读取网页",Zne=()=>"یک صفحهٔ وب خوانده شد",Jne=()=>"قرأ صفحة ويب",ere=()=>"Leyó una página web",tre=()=>"एक वेब पेज पढ़ा",nre=((e={},n={})=>{const t=n.locale??z();return t==="zh-CN"?Yne():t==="fa"?Zne():t==="ar"?Jne():t==="es"?ere():t==="hi"?tre():Xne()}),rre=()=>"Reading…",sre=()=>"正在读取…",ire=()=>"در حال خواندن…",are=()=>"جارٍ القراءة…",ore=()=>"Leyendo…",lre=()=>"पढ़ रहा है…",cre=((e={},n={})=>{const t=n.locale??z();return t==="zh-CN"?sre():t==="fa"?ire():t==="ar"?are():t==="es"?ore():t==="hi"?lre():rre()}),ure=()=>"Resumed an agent",_re=()=>"已恢复智能体",fre=()=>"عامل از سر گرفته شد",dre=()=>"استأنف عمل وكيل",hre=()=>"Reanudó un agente",pre=()=>"एक एजेंट फिर से शुरू किया",mre=((e={},n={})=>{const t=n.locale??z();return t==="zh-CN"?_re():t==="fa"?fre():t==="ar"?dre():t==="es"?hre():t==="hi"?pre():ure()}),gre=()=>"Review",vre=()=>"查看",bre=()=>"بازبینی",yre=()=>"مراجعة",xre=()=>"Revisar",wre=()=>"समीक्षा करें",kre=((e={},n={})=>{const t=n.locale??z();return t==="zh-CN"?vre():t==="fa"?bre():t==="ar"?yre():t==="es"?xre():t==="hi"?wre():gre()}),Sre=()=>"Reviewed run log",Cre=()=>"已查看运行日志",Ere=()=>"گزارش اجرا بازبینی شد",Nre=()=>"راجع سجل التشغيل",zre=()=>"Revisó el log de la ejecución",jre=()=>"रन लॉग की समीक्षा की",Tre=((e={},n={})=>{const t=n.locale??z();return t==="zh-CN"?Cre():t==="fa"?Ere():t==="ar"?Nre():t==="es"?zre():t==="hi"?jre():Sre()}),Are=()=>"Reviewed run logs",Rre=()=>"已查看运行日志",Mre=()=>"گزارش‌های اجرا بازبینی شد",Ore=()=>"راجع سجلات التشغيل",Dre=()=>"Revisó los logs de las ejecuciones",Lre=()=>"रन लॉग की समीक्षा की",Ire=((e={},n={})=>{const t=n.locale??z();return t==="zh-CN"?Rre():t==="fa"?Mre():t==="ar"?Ore():t==="es"?Dre():t==="hi"?Lre():Are()}),$re=()=>"Reviewed experiment status and notes",Bre=()=>"已查看实验状态和笔记",Pre=()=>"وضعیت و یادداشت‌های آزمایش بازبینی شد",Fre=()=>"راجع حالة التجربة وملاحظاتها",Hre=()=>"Revisó el estado y las notas del experimento",qre=()=>"प्रयोग की स्थिति और नोट्स की समीक्षा की",Ure=((e={},n={})=>{const t=n.locale??z();return t==="zh-CN"?Bre():t==="fa"?Pre():t==="ar"?Fre():t==="es"?Hre():t==="hi"?qre():$re()}),Gre=()=>"Reviewing…",Vre=()=>"正在查看…",Kre=()=>"در حال بازبینی…",Wre=()=>"جارٍ المراجعة…",Qre=()=>"Revisando…",Xre=()=>"समीक्षा कर रहा है…",Yre=((e={},n={})=>{const t=n.locale??z();return t==="zh-CN"?Vre():t==="fa"?Kre():t==="ar"?Wre():t==="es"?Qre():t==="hi"?Xre():Gre()}),Zre=()=>"Run",Jre=()=>"运行",ese=()=>"اجرا",tse=()=>"تشغيل",nse=()=>"Ejecutar",rse=()=>"चलाएं",sse=((e={},n={})=>{const t=n.locale??z();return t==="zh-CN"?Jre():t==="fa"?ese():t==="ar"?tse():t==="es"?nse():t==="hi"?rse():Zre()}),ise=()=>"Running…",ase=()=>"正在运行…",ose=()=>"در حال اجرا…",lse=()=>"جارٍ التشغيل…",cse=()=>"Ejecutando…",use=()=>"चल रहा है…",YO=((e={},n={})=>{const t=n.locale??z();return t==="zh-CN"?ase():t==="fa"?ose():t==="ar"?lse():t==="es"?cse():t==="hi"?use():ise()}),_se=()=>"Search",fse=()=>"搜索",dse=()=>"جست‌وجو",hse=()=>"بحث",pse=()=>"Buscar",mse=()=>"खोजें",gse=((e={},n={})=>{const t=n.locale??z();return t==="zh-CN"?fse():t==="fa"?dse():t==="ar"?hse():t==="es"?pse():t==="hi"?mse():_se()}),vse=()=>"Searched alphaXiv full text",bse=()=>"已搜索 alphaXiv 全文",yse=()=>"متن کامل alphaXiv جست‌وجو شد",xse=()=>"بحث في نص alphaXiv الكامل",wse=()=>"Buscó en el texto completo de alphaXiv",kse=()=>"alphaXiv का पूरा टेक्स्ट खोजा",Sse=((e={},n={})=>{const t=n.locale??z();return t==="zh-CN"?bse():t==="fa"?yse():t==="ar"?xse():t==="es"?wse():t==="hi"?kse():vse()}),Cse=()=>"Searched alphaXiv semantically",Ese=()=>"已对 alphaXiv 进行语义搜索",Nse=()=>"جست‌وجوی معنایی در alphaXiv انجام شد",zse=()=>"أجرى بحثًا دلاليًا في alphaXiv",jse=()=>"Hizo una búsqueda semántica en alphaXiv",Tse=()=>"alphaXiv को सिमेंटिक रूप से खोजा",Ase=((e={},n={})=>{const t=n.locale??z();return t==="zh-CN"?Ese():t==="fa"?Nse():t==="ar"?zse():t==="es"?jse():t==="hi"?Tse():Cse()}),Rse=()=>"Searched bioRxiv",Mse=()=>"已搜索 bioRxiv",Ose=()=>"bioRxiv جست‌وجو شد",Dse=()=>"بحث في bioRxiv",Lse=()=>"Buscó en bioRxiv",Ise=()=>"bioRxiv खोजा",$se=((e={},n={})=>{const t=n.locale??z();return t==="zh-CN"?Mse():t==="fa"?Ose():t==="ar"?Dse():t==="es"?Lse():t==="hi"?Ise():Rse()}),Bse=()=>"Searched code",Pse=()=>"已搜索代码",Fse=()=>"کد جست‌وجو شد",Hse=()=>"بحث في الشيفرة",qse=()=>"Buscó en el código",Use=()=>"कोड खोजा",P2=((e={},n={})=>{const t=n.locale??z();return t==="zh-CN"?Pse():t==="fa"?Fse():t==="ar"?Hse():t==="es"?qse():t==="hi"?Use():Bse()}),Gse=e=>`Searched code for “${e==null?void 0:e.pattern}”`,Vse=e=>`已在代码中搜索“${e==null?void 0:e.pattern}”`,Kse=e=>`کد برای «${e==null?void 0:e.pattern}» جست‌وجو شد`,Wse=e=>`بحث في الشيفرة عن «${e==null?void 0:e.pattern}»`,Qse=e=>`Buscó “${e==null?void 0:e.pattern}” en el código`,Xse=e=>`“${e==null?void 0:e.pattern}” के लिए कोड खोजा`,F2=((e,n={})=>{const t=n.locale??z();return t==="zh-CN"?Vse(e):t==="fa"?Kse(e):t==="ar"?Wse(e):t==="es"?Qse(e):t==="hi"?Xse(e):Gse(e)}),Yse=e=>`Searched images for “${e==null?void 0:e.query}”`,Zse=e=>`已搜索图片“${e==null?void 0:e.query}”`,Jse=e=>`تصاویر برای «${e==null?void 0:e.query}» جست‌وجو شد`,eie=e=>`بحث في الصور عن «${e==null?void 0:e.query}»`,tie=e=>`Buscó imágenes de “${e==null?void 0:e.query}”`,nie=e=>`“${e==null?void 0:e.query}” के लिए इमेज खोजीं`,rie=((e,n={})=>{const t=n.locale??z();return t==="zh-CN"?Zse(e):t==="fa"?Jse(e):t==="ar"?eie(e):t==="es"?tie(e):t==="hi"?nie(e):Yse(e)}),sie=()=>"Searched the literature",iie=()=>"已搜索文献",aie=()=>"منابع علمی جست‌وجو شد",oie=()=>"بحث في الأدبيات",lie=()=>"Buscó en la literatura",cie=()=>"साहित्य खोजा",jE=((e={},n={})=>{const t=n.locale??z();return t==="zh-CN"?iie():t==="fa"?aie():t==="ar"?oie():t==="es"?lie():t==="hi"?cie():sie()}),uie=e=>`Searched “${e==null?void 0:e.pattern}” on a page`,_ie=e=>`已在页面中搜索“${e==null?void 0:e.pattern}”`,fie=e=>`صفحه برای «${e==null?void 0:e.pattern}» جست‌وجو شد`,die=e=>`بحث عن «${e==null?void 0:e.pattern}» في صفحة`,hie=e=>`Buscó “${e==null?void 0:e.pattern}” en una página`,pie=e=>`पेज पर “${e==null?void 0:e.pattern}” खोजा`,mie=((e,n={})=>{const t=n.locale??z();return t==="zh-CN"?_ie(e):t==="fa"?fie(e):t==="ar"?die(e):t==="es"?hie(e):t==="hi"?pie(e):uie(e)}),gie=()=>"Searched OpenAlex",vie=()=>"已搜索 OpenAlex",bie=()=>"OpenAlex جست‌وجو شد",yie=()=>"بحث في OpenAlex",xie=()=>"Buscó en OpenAlex",wie=()=>"OpenAlex खोजा",kie=((e={},n={})=>{const t=n.locale??z();return t==="zh-CN"?vie():t==="fa"?bie():t==="ar"?yie():t==="es"?xie():t==="hi"?wie():gie()}),Sie=e=>`Searched the web for “${e==null?void 0:e.query}”`,Cie=e=>`已在网页中搜索“${e==null?void 0:e.query}”`,Eie=e=>`وب برای «${e==null?void 0:e.query}» جست‌وجو شد`,Nie=e=>`بحث في الويب عن «${e==null?void 0:e.query}»`,zie=e=>`Buscó “${e==null?void 0:e.query}” en la web`,jie=e=>`“${e==null?void 0:e.query}” के लिए वेब खोजा`,TE=((e,n={})=>{const t=n.locale??z();return t==="zh-CN"?Cie(e):t==="fa"?Eie(e):t==="ar"?Nie(e):t==="es"?zie(e):t==="hi"?jie(e):Sie(e)}),Tie=e=>`Searched a web page for “${e==null?void 0:e.pattern}”`,Aie=e=>`已在网页中搜索“${e==null?void 0:e.pattern}”`,Rie=e=>`صفحهٔ وب برای «${e==null?void 0:e.pattern}» جست‌وجو شد`,Mie=e=>`بحث في صفحة ويب عن «${e==null?void 0:e.pattern}»`,Oie=e=>`Buscó “${e==null?void 0:e.pattern}” en una página web`,Die=e=>`“${e==null?void 0:e.pattern}” के लिए एक वेब पेज खोजा`,Lie=((e,n={})=>{const t=n.locale??z();return t==="zh-CN"?Aie(e):t==="fa"?Rie(e):t==="ar"?Mie(e):t==="es"?Oie(e):t==="hi"?Die(e):Tie(e)}),Iie=()=>"Searching…",$ie=()=>"正在搜索…",Bie=()=>"در حال جست‌وجو…",Pie=()=>"جارٍ البحث…",Fie=()=>"Buscando…",Hie=()=>"खोज रहा है…",qie=((e={},n={})=>{const t=n.locale??z();return t==="zh-CN"?$ie():t==="fa"?Bie():t==="ar"?Pie():t==="es"?Fie():t==="hi"?Hie():Iie()}),Uie=()=>"Sent input to an agent",Gie=()=>"已向智能体发送输入",Vie=()=>"ورودی به عامل فرستاده شد",Kie=()=>"أرسل مدخلًا إلى وكيل",Wie=()=>"Envió información a un agente",Qie=()=>"एक एजेंट को इनपुट भेजा",Xie=((e={},n={})=>{const t=n.locale??z();return t==="zh-CN"?Gie():t==="fa"?Vie():t==="ar"?Kie():t==="es"?Wie():t==="hi"?Qie():Uie()}),Yie=()=>"Spawned an agent",Zie=()=>"已创建智能体",Jie=()=>"یک عامل ساخته شد",eae=()=>"أنشأ وكيلًا",tae=()=>"Creó un agente",nae=()=>"एक एजेंट शुरू किया",rae=((e={},n={})=>{const t=n.locale??z();return t==="zh-CN"?Zie():t==="fa"?Jie():t==="ar"?eae():t==="es"?tae():t==="hi"?nae():Yie()}),sae=()=>"Sub-agent",iae=()=>"子智能体",aae=()=>"عامل فرعی",oae=()=>"وكيل فرعي",lae=()=>"Subagente",cae=()=>"सब-एजेंट",uae=((e={},n={})=>{const t=n.locale??z();return t==="zh-CN"?iae():t==="fa"?aae():t==="ar"?oae():t==="es"?lae():t==="hi"?cae():sae()}),_ae=()=>"Sub-agent interrupted",fae=()=>"子智能体已中断",dae=()=>"عامل فرعی متوقف شد",hae=()=>"قُوطع الوكيل الفرعي",pae=()=>"Subagente interrumpido",mae=()=>"सब-एजेंट बाधित हुआ",gae=((e={},n={})=>{const t=n.locale??z();return t==="zh-CN"?fae():t==="fa"?dae():t==="ar"?hae():t==="es"?pae():t==="hi"?mae():_ae()}),vae=()=>"Sub-agent started",bae=()=>"子智能体已启动",yae=()=>"عامل فرعی آغاز شد",xae=()=>"بدأ الوكيل الفرعي",wae=()=>"Subagente iniciado",kae=()=>"सब-एजेंट शुरू हुआ",Sae=((e={},n={})=>{const t=n.locale??z();return t==="zh-CN"?bae():t==="fa"?yae():t==="ar"?xae():t==="es"?wae():t==="hi"?kae():vae()}),Cae=()=>"Updated experiment notes",Eae=()=>"已更新实验笔记",Nae=()=>"یادداشت‌های آزمایش به‌روز شد",zae=()=>"حدّث ملاحظات التجربة",jae=()=>"Actualizó las notas del experimento",Tae=()=>"प्रयोग के नोट्स अपडेट किए",Aae=((e={},n={})=>{const t=n.locale??z();return t==="zh-CN"?Eae():t==="fa"?Nae():t==="ar"?zae():t==="es"?jae():t==="hi"?Tae():Cae()}),Rae=()=>"Waiting on an agent",Mae=()=>"正在等待智能体",Oae=()=>"در انتظار عامل",Dae=()=>"في انتظار وكيل",Lae=()=>"Esperando a un agente",Iae=()=>"एजेंट का इंतज़ार है",$ae=((e={},n={})=>{const t=n.locale??z();return t==="zh-CN"?Mae():t==="fa"?Oae():t==="ar"?Dae():t==="es"?Lae():t==="hi"?Iae():Rae()}),Bae=e=>`Approval required: ${e==null?void 0:e.label}`,Pae=e=>`需要批准:${e==null?void 0:e.label}`,Fae=e=>`نیازمند تأیید: ${e==null?void 0:e.label}`,Hae=e=>`الموافقة مطلوبة: ${e==null?void 0:e.label}`,qae=e=>`Aprobación necesaria: ${e==null?void 0:e.label}`,Uae=e=>`स्वीकृति ज़रूरी है: ${e==null?void 0:e.label}`,AE=((e,n={})=>{const t=n.locale??z();return t==="zh-CN"?Pae(e):t==="fa"?Fae(e):t==="ar"?Hae(e):t==="es"?qae(e):t==="hi"?Uae(e):Bae(e)}),Gae=()=>"The CLI is retrying the turn.",Vae=()=>"CLI 正在重试本轮。",Kae=()=>"CLI در حال تلاش دوباره برای این نوبت است.",Wae=()=>"تحاول واجهة سطر الأوامر تنفيذ الجولة مجددًا.",Qae=()=>"La CLI está reintentando el turno.",Xae=()=>"CLI टर्न फिर से कोशिश कर रहा है।",Yae=((e={},n={})=>{const t=n.locale??z();return t==="zh-CN"?Vae():t==="fa"?Kae():t==="ar"?Wae():t==="es"?Qae():t==="hi"?Xae():Gae()}),Zae=()=>"Continue is available.",Jae=()=>"可以继续。",eoe=()=>"ادامه در دسترس است.",toe=()=>"المتابعة متاحة.",noe=()=>"Puedes continuar.",roe=()=>"जारी रखना उपलब्ध है।",soe=((e={},n={})=>{const t=n.locale??z();return t==="zh-CN"?Jae():t==="fa"?eoe():t==="ar"?toe():t==="es"?noe():t==="hi"?roe():Zae()}),ioe=()=>"Retry is available.",aoe=()=>"可以重试。",ooe=()=>"تلاش دوباره در دسترس است.",loe=()=>"إعادة المحاولة متاحة.",coe=()=>"Puedes reintentarlo.",uoe=()=>"फिर से कोशिश करना उपलब्ध है।",_oe=((e={},n={})=>{const t=n.locale??z();return t==="zh-CN"?aoe():t==="fa"?ooe():t==="ar"?loe():t==="es"?coe():t==="hi"?uoe():ioe()}),foe=()=>"Running a tool",doe=()=>"正在运行工具",hoe=()=>"در حال اجرای ابزار",poe=()=>"جارٍ تشغيل أداة",moe=()=>"Ejecutando una herramienta",goe=()=>"एक टूल चल रहा है",voe=((e={},n={})=>{const t=n.locale??z();return t==="zh-CN"?doe():t==="fa"?hoe():t==="ar"?poe():t==="es"?moe():t==="hi"?goe():foe()}),boe=()=>"Tool activity completed",yoe=()=>"工具活动已完成",xoe=()=>"فعالیت ابزار کامل شد",woe=()=>"اكتمل نشاط الأداة",koe=()=>"Actividad de la herramienta completada",Soe=()=>"टूल गतिविधि पूरी हुई",Coe=((e={},n={})=>{const t=n.locale??z();return t==="zh-CN"?yoe():t==="fa"?xoe():t==="ar"?woe():t==="es"?koe():t==="hi"?Soe():boe()}),Eoe=e=>`Tool activity failed: ${e==null?void 0:e.labels}`,Noe=e=>`工具活动失败:${e==null?void 0:e.labels}`,zoe=e=>`فعالیت ابزار ناموفق بود: ${e==null?void 0:e.labels}`,joe=e=>`فشل نشاط الأداة: ${e==null?void 0:e.labels}`,Toe=e=>`Error en la actividad de la herramienta: ${e==null?void 0:e.labels}`,Aoe=e=>`टूल गतिविधि विफल: ${e==null?void 0:e.labels}`,Roe=((e,n={})=>{const t=n.locale??z();return t==="zh-CN"?Noe(e):t==="fa"?zoe(e):t==="ar"?joe(e):t==="es"?Toe(e):t==="hi"?Aoe(e):Eoe(e)}),Moe=e=>`${e==null?void 0:e.count} tool activities failed: ${e==null?void 0:e.labels}`,Ooe=e=>`${e==null?void 0:e.count} 个工具活动失败:${e==null?void 0:e.labels}`,Doe=e=>`${e==null?void 0:e.count} فعالیت ابزار ناموفق بود: ${e==null?void 0:e.labels}`,Loe=e=>`فشل ${e==null?void 0:e.count} من أنشطة الأدوات: ${e==null?void 0:e.labels}`,Ioe=e=>`Actividades de herramientas con error (${e==null?void 0:e.count}): ${e==null?void 0:e.labels}`,$oe=e=>`${e==null?void 0:e.count} टूल गतिविधियाँ विफल: ${e==null?void 0:e.labels}`,Boe=((e,n={})=>{const t=n.locale??z();return t==="zh-CN"?Ooe(e):t==="fa"?Doe(e):t==="ar"?Loe(e):t==="es"?Ioe(e):t==="hi"?$oe(e):Moe(e)}),Poe=()=>"Turn did not finish.",Foe=()=>"本轮未完成。",Hoe=()=>"این نوبت کامل نشد.",qoe=()=>"لم تكتمل الجولة.",Uoe=()=>"El turno no terminó.",Goe=()=>"यह टर्न पूरा नहीं हुआ।",Voe=((e={},n={})=>{const t=n.locale??z();return t==="zh-CN"?Foe():t==="fa"?Hoe():t==="ar"?qoe():t==="es"?Uoe():t==="hi"?Goe():Poe()}),Koe=()=>"Artifacts",Woe=()=>"产物",Qoe=()=>"خروجی‌ها",Xoe=()=>"المُخرَجات",Yoe=()=>"Artefactos",Zoe=()=>"आर्टिफ़ैक्ट",ZO=((e={},n={})=>{const t=n.locale??z();return t==="zh-CN"?Woe():t==="fa"?Qoe():t==="ar"?Xoe():t==="es"?Yoe():t==="hi"?Zoe():Koe()}),Joe=()=>"Close panel",ele=()=>"关闭面板",tle=()=>"بستن پنل",nle=()=>"إغلاق اللوحة",rle=()=>"Cerrar panel",sle=()=>"पैनल बंद करें",p0=((e={},n={})=>{const t=n.locale??z();return t==="zh-CN"?ele():t==="fa"?tle():t==="ar"?nle():t==="es"?rle():t==="hi"?sle():Joe()}),ile=()=>"Current task",ale=()=>"当前任务",ole=()=>"وظیفهٔ فعلی",lle=()=>"المهمة الحالية",cle=()=>"Tarea actual",ule=()=>"मौजूदा टास्क",RE=((e={},n={})=>{const t=n.locale??z();return t==="zh-CN"?ale():t==="fa"?ole():t==="ar"?lle():t==="es"?cle():t==="hi"?ule():ile()}),_le=()=>"Drag to resize panel",fle=()=>"拖动以调整面板大小",dle=()=>"برای تغییر اندازهٔ پنل بکشید",hle=()=>"اسحب لتغيير حجم اللوحة",ple=()=>"Arrastra para cambiar el tamaño del panel",mle=()=>"पैनल का आकार बदलने के लिए खींचें",gle=((e={},n={})=>{const t=n.locale??z();return t==="zh-CN"?fle():t==="fa"?dle():t==="ar"?hle():t==="es"?ple():t==="hi"?mle():_le()}),vle=()=>"Drag toward the center to restore panel",ble=()=>"向中央拖动以恢复面板",yle=()=>"برای بازگرداندن پنل به‌سوی مرکز بکشید",xle=()=>"اسحب نحو المنتصف لاستعادة اللوحة",wle=()=>"Arrastra hacia el centro para restaurar el panel",kle=()=>"पैनल वापस लाने के लिए बीच की ओर खींचें",Sle=((e={},n={})=>{const t=n.locale??z();return t==="zh-CN"?ble():t==="fa"?yle():t==="ar"?xle():t==="es"?wle():t==="hi"?kle():vle()}),Cle=()=>"Entire project",Ele=()=>"整个项目",Nle=()=>"کل پروژه",zle=()=>"المشروع بالكامل",jle=()=>"Todo el proyecto",Tle=()=>"पूरा प्रोजेक्ट",ME=((e={},n={})=>{const t=n.locale??z();return t==="zh-CN"?Ele():t==="fa"?Nle():t==="ar"?zle():t==="es"?jle():t==="hi"?Tle():Cle()}),Ale=()=>"Expand panel",Rle=()=>"展开面板",Mle=()=>"گسترش پنل",Ole=()=>"توسيع اللوحة",Dle=()=>"Expandir panel",Lle=()=>"पैनल फैलाएं",OE=((e={},n={})=>{const t=n.locale??z();return t==="zh-CN"?Rle():t==="fa"?Mle():t==="ar"?Ole():t==="es"?Dle():t==="hi"?Lle():Ale()}),Ile=e=>`Experiment filter: ${e==null?void 0:e.scope}`,$le=e=>`实验筛选:${e==null?void 0:e.scope}`,Ble=e=>`فیلتر آزمایش: ${e==null?void 0:e.scope}`,Ple=e=>`تصفية التجارب: ${e==null?void 0:e.scope}`,Fle=e=>`Filtro de experimentos: ${e==null?void 0:e.scope}`,Hle=e=>`प्रयोग फ़िल्टर: ${e==null?void 0:e.scope}`,qle=((e,n={})=>{const t=n.locale??z();return t==="zh-CN"?$le(e):t==="fa"?Ble(e):t==="ar"?Ple(e):t==="es"?Fle(e):t==="hi"?Hle(e):Ile(e)}),Ule=()=>"Experiment view",Gle=()=>"实验视图",Vle=()=>"نمای آزمایش",Kle=()=>"عرض التجربة",Wle=()=>"Vista de experimento",Qle=()=>"प्रयोग व्यू",Xle=((e={},n={})=>{const t=n.locale??z();return t==="zh-CN"?Gle():t==="fa"?Vle():t==="ar"?Kle():t==="es"?Wle():t==="hi"?Qle():Ule()}),Yle=()=>"Experiments",Zle=()=>"实验",Jle=()=>"آزمایش‌ها",ece=()=>"التجارب",tce=()=>"Experimentos",nce=()=>"प्रयोग",JO=((e={},n={})=>{const t=n.locale??z();return t==="zh-CN"?Zle():t==="fa"?Jle():t==="ar"?ece():t==="es"?tce():t==="hi"?nce():Yle()}),rce=()=>"Files",sce=()=>"文件",ice=()=>"فایل‌ها",ace=()=>"الملفات",oce=()=>"Archivos",lce=()=>"फ़ाइलें",X4=((e={},n={})=>{const t=n.locale??z();return t==="zh-CN"?sce():t==="fa"?ice():t==="ar"?ace():t==="es"?oce():t==="hi"?lce():rce()}),cce=()=>"Filter experiments",uce=()=>"筛选实验",_ce=()=>"فیلتر آزمایش‌ها",fce=()=>"تصفية التجارب",dce=()=>"Filtrar experimentos",hce=()=>"प्रयोग फ़िल्टर करें",pce=((e={},n={})=>{const t=n.locale??z();return t==="zh-CN"?uce():t==="fa"?_ce():t==="ar"?fce():t==="es"?dce():t==="hi"?hce():cce()}),mce=()=>"Current task filtering is unavailable for unattributed experiments",gce=()=>"存在无法归属的实验时,不能按当前任务筛选",vce=()=>"برای آزمایش‌های بدون وظیفه، فیلتر وظیفهٔ کنونی در دسترس نیست",bce=()=>"تصفية المهمة الحالية غير متاحة للتجارب غير المنسوبة",yce=()=>"No se puede filtrar por la tarea actual en experimentos sin tarea asignada",xce=()=>"बिना श्रेय वाले प्रयोगों के लिए मौजूदा टास्क फ़िल्टरिंग उपलब्ध नहीं है",wce=((e={},n={})=>{const t=n.locale??z();return t==="zh-CN"?gce():t==="fa"?vce():t==="ar"?bce():t==="es"?yce():t==="hi"?xce():mce()}),kce=()=>"No experiments from the current task yet. Switch to Entire project to see all experiments.",Sce=()=>"当前任务还没有实验。切换到“整个项目”即可查看所有实验。",Cce=()=>"وظیفهٔ کنونی هنوز آزمایشی ندارد. برای دیدن همهٔ آزمایش‌ها به «کل پروژه» بروید.",Ece=()=>"لا توجد تجارب من المهمة الحالية بعد. بدّل إلى «المشروع بالكامل» لرؤية جميع التجارب.",Nce=()=>"Aún no hay experimentos de la tarea actual. Cambia a Todo el proyecto para ver todos los experimentos.",zce=()=>"मौजूदा टास्क से अभी तक कोई प्रयोग नहीं। सभी प्रयोग देखने के लिए पूरा प्रोजेक्ट पर स्विच करें।",jce=((e={},n={})=>{const t=n.locale??z();return t==="zh-CN"?Sce():t==="fa"?Cce():t==="ar"?Ece():t==="es"?Nce():t==="hi"?zce():kce()}),Tce=()=>"Open a task to filter to its experiments",Ace=()=>"请打开一个任务以筛选其实验",Rce=()=>"برای محدود کردن آزمایش‌ها، یک وظیفه را باز کنید",Mce=()=>"افتح مهمة لعرض تجاربها فقط",Oce=()=>"Abre una tarea para filtrar por sus experimentos",Dce=()=>"इसके प्रयोगों तक फ़िल्टर करने के लिए एक टास्क खोलें",Lce=((e={},n={})=>{const t=n.locale??z();return t==="zh-CN"?Ace():t==="fa"?Rce():t==="ar"?Mce():t==="es"?Oce():t==="hi"?Dce():Tce()}),Ice=()=>"projects",$ce=()=>"项目",Bce=()=>"پروژه‌ها",Pce=()=>"المشاريع",Fce=()=>"los proyectos",Hce=()=>"प्रोजेक्ट",Xp=((e={},n={})=>{const t=n.locale??z();return t==="zh-CN"?$ce():t==="fa"?Bce():t==="ar"?Pce():t==="es"?Fce():t==="hi"?Hce():Ice()}),qce=()=>"Restore panel",Uce=()=>"还原面板",Gce=()=>"بازگرداندن اندازهٔ پنل",Vce=()=>"استعادة اللوحة",Kce=()=>"Restaurar panel",Wce=()=>"पैनल वापस लाएं",DE=((e={},n={})=>{const t=n.locale??z();return t==="zh-CN"?Uce():t==="fa"?Gce():t==="ar"?Vce():t==="es"?Kce():t==="hi"?Wce():qce()}),Qce=()=>"Retry",Xce=()=>"重试",Yce=()=>"تلاش دوباره",Zce=()=>"إعادة المحاولة",Jce=()=>"Reintentar",eue=()=>"फिर से कोशिश करें",Vs=((e={},n={})=>{const t=n.locale??z();return t==="zh-CN"?Xce():t==="fa"?Yce():t==="ar"?Zce():t==="es"?Jce():t==="hi"?eue():Qce()}),tue=()=>"Select a project to browse its files.",nue=()=>"选择一个项目以浏览其文件。",rue=()=>"برای مرور فایل‌ها، یک پروژه را انتخاب کنید.",sue=()=>"اختر مشروعًا لتصفح ملفاته.",iue=()=>"Selecciona un proyecto para explorar sus archivos.",aue=()=>"फ़ाइलें ब्राउज़ करने के लिए एक प्रोजेक्ट चुनें।",oue=((e={},n={})=>{const t=n.locale??z();return t==="zh-CN"?nue():t==="fa"?rue():t==="ar"?sue():t==="es"?iue():t==="hi"?aue():tue()}),lue=()=>"settings",cue=()=>"设置",uue=()=>"تنظیمات",_ue=()=>"الإعدادات",fue=()=>"la configuración",due=()=>"सेटिंग्स",hue=((e={},n={})=>{const t=n.locale??z();return t==="zh-CN"?cue():t==="fa"?uue():t==="ar"?_ue():t==="es"?fue():t==="hi"?due():lue()}),pue=e=>`Couldn’t load OpenResearch ${e==null?void 0:e.items}.`,mue=e=>`无法加载 OpenResearch 的${e==null?void 0:e.items}。`,gue=e=>`بارگذاری ${e==null?void 0:e.items} در OpenResearch ناموفق بود.`,vue=e=>`تعذّر تحميل ${e==null?void 0:e.items} في OpenResearch.`,bue=e=>`Error al cargar ${e==null?void 0:e.items} de OpenResearch.`,yue=e=>`OpenResearch ${e==null?void 0:e.items} लोड नहीं हो सके।`,xue=((e,n={})=>{const t=n.locale??z();return t==="zh-CN"?mue(e):t==="fa"?gue(e):t==="ar"?vue(e):t==="es"?bue(e):t==="hi"?yue(e):pue(e)}),wue=()=>"Sub-agent",kue=()=>"子智能体",Sue=()=>"عامل فرعی",Cue=()=>"وكيل فرعي",Eue=()=>"Subagente",Nue=()=>"सब-एजेंट",zue=((e={},n={})=>{const t=n.locale??z();return t==="zh-CN"?kue():t==="fa"?Sue():t==="ar"?Cue():t==="es"?Eue():t==="hi"?Nue():wue()}),jue=()=>"Table",Tue=()=>"表格",Aue=()=>"جدول",Rue=()=>"جدول",Mue=()=>"Tabla",Oue=()=>"टेबल",Due=((e={},n={})=>{const t=n.locale??z();return t==="zh-CN"?Tue():t==="fa"?Aue():t==="ar"?Rue():t==="es"?Mue():t==="hi"?Oue():jue()}),Lue=()=>"Tree",Iue=()=>"树状图",$ue=()=>"درخت",Bue=()=>"شجرة",Pue=()=>"Árbol",Fue=()=>"ट्री",Hue=((e={},n={})=>{const t=n.locale??z();return t==="zh-CN"?Iue():t==="fa"?$ue():t==="ar"?Bue():t==="es"?Pue():t==="hi"?Fue():Lue()}),que=e=>`Collapse ${e==null?void 0:e.name}`,Uue=e=>`折叠 ${e==null?void 0:e.name}`,Gue=e=>`بستن پوشهٔ ${e==null?void 0:e.name}`,Vue=e=>`طيّ ${e==null?void 0:e.name}`,Kue=e=>`Contraer ${e==null?void 0:e.name}`,Wue=e=>`${e==null?void 0:e.name} समेटें`,Que=((e,n={})=>{const t=n.locale??z();return t==="zh-CN"?Uue(e):t==="fa"?Gue(e):t==="ar"?Vue(e):t==="es"?Kue(e):t==="hi"?Wue(e):que(e)}),Xue=e=>`Delete “${e==null?void 0:e.path}” from the artifacts directory?`,Yue=e=>`从产物目录中删除“${e==null?void 0:e.path}”?`,Zue=e=>`«${e==null?void 0:e.path}» از پوشهٔ خروجی‌ها حذف شود؟`,Jue=e=>`حذف «${e==null?void 0:e.path}» من دليل المُخرَجات؟`,e_e=e=>`¿Eliminar “${e==null?void 0:e.path}” del directorio de artefactos?`,t_e=e=>`“${e==null?void 0:e.path}” को आर्टिफ़ैक्ट डायरेक्टरी से हटाएं?`,Tk=((e,n={})=>{const t=n.locale??z();return t==="zh-CN"?Yue(e):t==="fa"?Zue(e):t==="ar"?Jue(e):t==="es"?e_e(e):t==="hi"?t_e(e):Xue(e)}),n_e=e=>`Delete folder ${e==null?void 0:e.name}`,r_e=e=>`删除文件夹 ${e==null?void 0:e.name}`,s_e=e=>`حذف پوشهٔ ${e==null?void 0:e.name}`,i_e=e=>`حذف المجلد ${e==null?void 0:e.name}`,a_e=e=>`Eliminar la carpeta ${e==null?void 0:e.name}`,o_e=e=>`${e==null?void 0:e.name} फ़ोल्डर हटाएं`,l_e=((e,n={})=>{const t=n.locale??z();return t==="zh-CN"?r_e(e):t==="fa"?s_e(e):t==="ar"?i_e(e):t==="es"?a_e(e):t==="hi"?o_e(e):n_e(e)}),c_e=e=>`Expand ${e==null?void 0:e.name}`,u_e=e=>`展开 ${e==null?void 0:e.name}`,__e=e=>`باز کردن پوشهٔ ${e==null?void 0:e.name}`,f_e=e=>`توسيع ${e==null?void 0:e.name}`,d_e=e=>`Expandir ${e==null?void 0:e.name}`,h_e=e=>`${e==null?void 0:e.name} फैलाएं`,p_e=((e,n={})=>{const t=n.locale??z();return t==="zh-CN"?u_e(e):t==="fa"?__e(e):t==="ar"?f_e(e):t==="es"?d_e(e):t==="hi"?h_e(e):c_e(e)}),m_e=()=>"Binary or unsupported file — no inline preview.",g_e=()=>"二进制文件或不受支持的文件 — 无法内嵌预览。",v_e=()=>"فایل دودویی یا پشتیبانی‌نشده است — پیش‌نمایش درون‌صفحه‌ای ندارد.",b_e=()=>"ملف ثنائي أو غير مدعوم — لا توجد معاينة مضمّنة.",y_e=()=>"Archivo binario o no compatible — sin vista previa.",x_e=()=>"बाइनरी या असमर्थित फ़ाइल — इनलाइन प्रीव्यू नहीं है।",w_e=((e={},n={})=>{const t=n.locale??z();return t==="zh-CN"?g_e():t==="fa"?v_e():t==="ar"?b_e():t==="es"?y_e():t==="hi"?x_e():m_e()}),k_e=()=>"Copy path",S_e=()=>"复制路径",C_e=()=>"کپی مسیر",E_e=()=>"نسخ المسار",N_e=()=>"Copiar ruta",z_e=()=>"पथ कॉपी करें",j_e=((e={},n={})=>{const t=n.locale??z();return t==="zh-CN"?S_e():t==="fa"?C_e():t==="ar"?E_e():t==="es"?N_e():t==="hi"?z_e():k_e()}),T_e=()=>"Artifact not found",A_e=()=>"找不到产物",R_e=()=>"خروجی پیدا نشد",M_e=()=>"لم يُعثر على المُخرَج",O_e=()=>"No se encontró el artefacto",D_e=()=>"आर्टिफ़ैक्ट नहीं मिला",L_e=((e={},n={})=>{const t=n.locale??z();return t==="zh-CN"?A_e():t==="fa"?R_e():t==="ar"?M_e():t==="es"?O_e():t==="hi"?D_e():T_e()}),I_e=()=>"Open raw",$_e=()=>"打开原始文件",B_e=()=>"باز کردن فایل خام",P_e=()=>"فتح الملف الخام",F_e=()=>"Abrir sin formato",H_e=()=>"रॉ खोलें",q_e=((e={},n={})=>{const t=n.locale??z();return t==="zh-CN"?$_e():t==="fa"?B_e():t==="ar"?P_e():t==="es"?F_e():t==="hi"?H_e():I_e()}),U_e=()=>"Click an artifact to view it",G_e=()=>"点击产物即可查看",V_e=()=>"برای مشاهده، یک خروجی را انتخاب کنید",K_e=()=>"انقر على مُخرَج لعرضه",W_e=()=>"Selecciona un artefacto para verlo",Q_e=()=>"देखने के लिए किसी आर्टिफ़ैक्ट पर क्लिक करें",X_e=((e={},n={})=>{const t=n.locale??z();return t==="zh-CN"?G_e():t==="fa"?V_e():t==="ar"?K_e():t==="es"?W_e():t==="hi"?Q_e():U_e()}),Y_e=()=>"Delete artifact",Z_e=()=>"删除产物",J_e=()=>"حذف خروجی",efe=()=>"حذف المُخرَج",tfe=()=>"Eliminar artefacto",nfe=()=>"आर्टिफ़ैक्ट हटाएं",LE=((e={},n={})=>{const t=n.locale??z();return t==="zh-CN"?Z_e():t==="fa"?J_e():t==="ar"?efe():t==="es"?tfe():t==="hi"?nfe():Y_e()}),rfe=()=>"Delete folder",sfe=()=>"删除文件夹",ife=()=>"حذف پوشه",afe=()=>"حذف المجلد",ofe=()=>"Eliminar carpeta",lfe=()=>"फ़ोल्डर हटाएं",cfe=((e={},n={})=>{const t=n.locale??z();return t==="zh-CN"?sfe():t==="fa"?ife():t==="ar"?afe():t==="es"?ofe():t==="hi"?lfe():rfe()}),ufe=()=>"Failed to load:",_fe=()=>"加载失败:",ffe=()=>"بارگیری ناموفق بود:",dfe=()=>"تعذّر التحميل:",hfe=()=>"Error al cargar:",pfe=()=>"लोड नहीं हो सका:",mfe=((e={},n={})=>{const t=n.locale??z();return t==="zh-CN"?_fe():t==="fa"?ffe():t==="ar"?dfe():t==="es"?hfe():t==="hi"?pfe():ufe()}),gfe=()=>"File truncated — showing the first 512 KB.",vfe=()=>"文件已截断——仅显示前 512 KB。",bfe=()=>"فایل کوتاه شده است — فقط ۵۱۲ کیلوبایت نخست نمایش داده می‌شود.",yfe=()=>"تم اقتطاع الملف — عرض أول 512 كيلوبايت.",xfe=()=>"Archivo truncado — se muestran los primeros 512 KB.",wfe=()=>"फ़ाइल छोटी की गई — पहले 512 KB दिखाए जा रहे हैं।",kfe=((e={},n={})=>{const t=n.locale??z();return t==="zh-CN"?vfe():t==="fa"?bfe():t==="ar"?yfe():t==="es"?xfe():t==="hi"?wfe():gfe()}),Sfe=()=>"Listing truncated — the folder has more artifacts.",Cfe=()=>"列表已截断——文件夹中还有更多产物。",Efe=()=>"فهرست کوتاه شده است — خروجی‌های بیشتری در پوشه وجود دارد.",Nfe=()=>"تم اقتطاع القائمة — يحتوي المجلد على مُخرَجات أخرى.",zfe=()=>"Listado truncado — la carpeta tiene más artefactos.",jfe=()=>"सूची छोटी की गई — इस फ़ोल्डर में और भी आर्टिफ़ैक्ट हैं।",Tfe=((e={},n={})=>{const t=n.locale??z();return t==="zh-CN"?Cfe():t==="fa"?Efe():t==="ar"?Nfe():t==="es"?zfe():t==="hi"?jfe():Sfe()}),Afe=()=>"Loading…",Rfe=()=>"正在加载…",Mfe=()=>"در حال بارگیری…",Ofe=()=>"جارٍ التحميل…",Dfe=()=>"Cargando…",Lfe=()=>"लोड हो रहा है…",eD=((e={},n={})=>{const t=n.locale??z();return t==="zh-CN"?Rfe():t==="fa"?Mfe():t==="ar"?Ofe():t==="es"?Dfe():t==="hi"?Lfe():Afe()}),Ife=()=>"Loading artifacts…",$fe=()=>"正在加载产物…",Bfe=()=>"در حال بارگیری خروجی‌ها…",Pfe=()=>"جارٍ تحميل المُخرَجات…",Ffe=()=>"Cargando artefactos…",Hfe=()=>"आर्टिफ़ैक्ट लोड हो रहे हैं…",qfe=((e={},n={})=>{const t=n.locale??z();return t==="zh-CN"?$fe():t==="fa"?Bfe():t==="ar"?Pfe():t==="es"?Ffe():t==="hi"?Hfe():Ife()}),Ufe=()=>"Modified",Gfe=()=>"修改时间",Vfe=()=>"ویرایش‌شده",Kfe=()=>"عُدّل",Wfe=()=>"Modificado",Qfe=()=>"बदला गया",Xfe=((e={},n={})=>{const t=n.locale??z();return t==="zh-CN"?Gfe():t==="fa"?Vfe():t==="ar"?Kfe():t==="es"?Wfe():t==="hi"?Qfe():Ufe()}),Yfe=()=>"No artifacts yet",Zfe=()=>"尚无产物",Jfe=()=>"هنوز خروجی‌ای وجود ندارد",ede=()=>"لا توجد مُخرَجات بعد",tde=()=>"Aún no hay artefactos",nde=()=>"अभी तक कोई आर्टिफ़ैक्ट नहीं",rde=((e={},n={})=>{const t=n.locale??z();return t==="zh-CN"?Zfe():t==="fa"?Jfe():t==="ar"?ede():t==="es"?tde():t==="hi"?nde():Yfe()}),sde=()=>"Open raw in new tab",ide=()=>"在新标签页中打开原始文件",ade=()=>"باز کردن فایل خام در زبانهٔ جدید",ode=()=>"فتح الملف الخام في تبويب جديد",lde=()=>"Abrir sin formato en una pestaña nueva",cde=()=>"नए टैब में रॉ खोलें",IE=((e={},n={})=>{const t=n.locale??z();return t==="zh-CN"?ide():t==="fa"?ade():t==="ar"?ode():t==="es"?lde():t==="hi"?cde():sde()}),ude=()=>"This is the project's durable output space for reports, figures, images, CSVs, PDFs, and other research artifacts. Ask the agent for a write-up or add your own files.",_de=()=>"这里是项目的持久输出空间,用于保存报告、图表、图片、CSV、PDF 和其他研究产物。你可以让智能体撰写报告,也可以自行添加文件。",fde=()=>"این فضای پایدار خروجی پروژه برای گزارش‌ها، نمودارها، تصاویر، فایل‌های CSV و PDF و دیگر خروجی‌های پژوهشی است. از عامل بخواهید گزارشی بنویسد یا فایل‌های خودتان را اضافه کنید.",dde=()=>"هذه هي مساحة المُخرَجات الدائمة للمشروع، للتقارير والأشكال والصور وملفات CSV وملفات PDF وغيرها من مُخرَجات البحث. اطلب من الوكيل كتابة تقرير أو أضِف ملفاتك الخاصة.",hde=()=>"Este es el espacio de resultados permanente del proyecto: informes, figuras, imágenes, CSV, PDF y otros artefactos de investigación. Pídele al agente un informe o añade tus propios archivos.",pde=()=>"यह प्रोजेक्ट का स्थायी आउटपुट स्थान है — रिपोर्ट, फ़िगर, इमेज, CSV, PDF और अन्य शोध आर्टिफ़ैक्ट के लिए। एजेंट से कोई लेख लिखने को कहें या अपनी फ़ाइलें खुद जोड़ें।",mde=((e={},n={})=>{const t=n.locale??z();return t==="zh-CN"?_de():t==="fa"?fde():t==="ar"?dde():t==="es"?hde():t==="hi"?pde():ude()}),gde=()=>"File too large to preview inline.",vde=()=>"文件太大,无法内嵌预览。",bde=()=>"فایل برای پیش‌نمایش درون‌صفحه‌ای بیش از حد بزرگ است.",yde=()=>"الملف كبير جدًا للمعاينة المضمّنة.",xde=()=>"El archivo es demasiado grande para previsualizarlo.",wde=()=>"फ़ाइल इनलाइन प्रीव्यू के लिए बहुत बड़ी है।",kde=((e={},n={})=>{const t=n.locale??z();return t==="zh-CN"?vde():t==="fa"?bde():t==="ar"?yde():t==="es"?xde():t==="hi"?wde():gde()}),Sde=()=>"This is the baseline branch, so there is no parent comparison.",Cde=()=>"这是基线分支,因此没有父分支可供比较。",Ede=()=>"این شاخهٔ مبناست، بنابراین شاخهٔ والدی برای مقایسه ندارد.",Nde=()=>"هذا هو الفرع الأساس، فلا يوجد فرع أصل للمقارنة.",zde=()=>"Esta es la rama base, así que no hay comparación con una rama padre.",jde=()=>"यह बेसलाइन ब्रांच है, इसलिए कोई पैरेंट तुलना नहीं है।",Tde=((e={},n={})=>{const t=n.locale??z();return t==="zh-CN"?Cde():t==="fa"?Ede():t==="ar"?Nde():t==="es"?zde():t==="hi"?jde():Sde()}),Ade=()=>"Failed to load changes:",Rde=()=>"加载更改失败:",Mde=()=>"بارگیری تغییرات ناموفق بود:",Ode=()=>"تعذّر تحميل التغييرات:",Dde=()=>"Error al cargar los cambios:",Lde=()=>"बदलाव लोड नहीं हो सके:",Ide=((e={},n={})=>{const t=n.locale??z();return t==="zh-CN"?Rde():t==="fa"?Mde():t==="ar"?Ode():t==="es"?Dde():t==="hi"?Lde():Ade()}),$de=()=>"Loading changes…",Bde=()=>"正在加载更改…",Pde=()=>"در حال بارگیری تغییرات…",Fde=()=>"جارٍ تحميل التغييرات…",Hde=()=>"Cargando cambios…",qde=()=>"बदलाव लोड हो रहे हैं…",Ude=((e={},n={})=>{const t=n.locale??z();return t==="zh-CN"?Bde():t==="fa"?Pde():t==="ar"?Fde():t==="es"?Hde():t==="hi"?qde():$de()}),Gde=()=>"No committed changes from the parent branch.",Vde=()=>"与父分支相比没有已提交的更改。",Kde=()=>"نسبت به شاخهٔ والد تغییر ثبت‌شده‌ای وجود ندارد.",Wde=()=>"لا توجد تغييرات مودعة عن الفرع الأصل.",Qde=()=>"No hay cambios confirmados respecto a la rama padre.",Xde=()=>"पैरेंट ब्रांच से कोई कमिट किए गए बदलाव नहीं।",Yde=((e={},n={})=>{const t=n.locale??z();return t==="zh-CN"?Vde():t==="fa"?Kde():t==="ar"?Wde():t==="es"?Qde():t==="hi"?Xde():Gde()}),Zde=e=>`agent ${e==null?void 0:e.number}`,Jde=e=>`智能体 ${e==null?void 0:e.number}`,ehe=e=>`عامل ${e==null?void 0:e.number}`,the=e=>`وكيل ${e==null?void 0:e.number}`,nhe=e=>`agente ${e==null?void 0:e.number}`,rhe=e=>`एजेंट ${e==null?void 0:e.number}`,$E=((e,n={})=>{const t=n.locale??z();return t==="zh-CN"?Jde(e):t==="fa"?ehe(e):t==="ar"?the(e):t==="es"?nhe(e):t==="hi"?rhe(e):Zde(e)}),she=()=>"agent sessions",ihe=()=>"智能体会话",ahe=()=>"نشست‌های عامل‌ها",ohe=()=>"جلسات الوكلاء",lhe=()=>"sesiones de agente",che=()=>"एजेंट सेशन",uhe=((e={},n={})=>{const t=n.locale??z();return t==="zh-CN"?ihe():t==="fa"?ahe():t==="ar"?ohe():t==="es"?lhe():t==="hi"?che():she()}),_he=()=>"All sessions",fhe=()=>"所有会话",dhe=()=>"همهٔ نشست‌ها",hhe=()=>"كل الجلسات",phe=()=>"Todas las sesiones",mhe=()=>"सभी सेशन",tD=((e={},n={})=>{const t=n.locale??z();return t==="zh-CN"?fhe():t==="fa"?dhe():t==="ar"?hhe():t==="es"?phe():t==="hi"?mhe():_he()}),ghe=e=>`${e==null?void 0:e.count} annotations`,vhe=e=>`${e==null?void 0:e.count} 条批注`,bhe=e=>`${e==null?void 0:e.count} یادداشت`,yhe=e=>`التعليقات: ${e==null?void 0:e.count}`,xhe=e=>`${e==null?void 0:e.count} anotaciones`,whe=e=>`${e==null?void 0:e.count} एनोटेशन`,khe=((e,n={})=>{const t=n.locale??z();return t==="zh-CN"?vhe(e):t==="fa"?bhe(e):t==="ar"?yhe(e):t==="es"?xhe(e):t==="hi"?whe(e):ghe(e)}),She=()=>"Archive",Che=()=>"归档",Ehe=()=>"بایگانی",Nhe=()=>"أرشفة",zhe=()=>"Archivar",jhe=()=>"आर्काइव करें",The=((e={},n={})=>{const t=n.locale??z();return t==="zh-CN"?Che():t==="fa"?Ehe():t==="ar"?Nhe():t==="es"?zhe():t==="hi"?jhe():She()}),Ahe=()=>"Ask the research agent… (/ for commands and skills, ! for shell)",Rhe=()=>"询问研究智能体…(输入 / 使用命令和技能,输入 ! 运行 shell)",Mhe=()=>"از عامل پژوهش بپرسید… (/ برای فرمان‌ها و مهارت‌ها، ! برای شل)",Ohe=()=>"اسأل وكيل البحث… (/ للأوامر والمهارات، ! للطرفية)",Dhe=()=>"Pregunta al agente de investigación… (/ para comandos y skills, ! para la shell)",Lhe=()=>"शोध एजेंट से पूछें… (कमांड और स्किल के लिए /, शेल के लिए !)",Ihe=((e={},n={})=>{const t=n.locale??z();return t==="zh-CN"?Rhe():t==="fa"?Mhe():t==="ar"?Ohe():t==="es"?Dhe():t==="hi"?Lhe():Ahe()}),$he=()=>"Asked about selected text",Bhe=()=>"已询问所选文本",Phe=()=>"دربارهٔ متن انتخاب‌شده پرسیده شد",Fhe=()=>"سأل عن النص المحدد",Hhe=()=>"Preguntó sobre el texto seleccionado",qhe=()=>"चयनित टेक्स्ट के बारे में पूछा",Uhe=((e={},n={})=>{const t=n.locale??z();return t==="zh-CN"?Bhe():t==="fa"?Phe():t==="ar"?Fhe():t==="es"?Hhe():t==="hi"?qhe():$he()}),Ghe=()=>"Attachment",Vhe=()=>"附件",Khe=()=>"پیوست",Whe=()=>"مرفق",Qhe=()=>"Adjunto",Xhe=()=>"अटैचमेंट",Yhe=((e={},n={})=>{const t=n.locale??z();return t==="zh-CN"?Vhe():t==="fa"?Khe():t==="ar"?Whe():t==="es"?Qhe():t==="hi"?Xhe():Ghe()}),Zhe=e=>`${e==null?void 0:e.name} is too large — each attachment must be under 30 MB.`,Jhe=e=>`${e==null?void 0:e.name} 太大 — 每个附件必须小于 30 MB。`,epe=e=>`${e==null?void 0:e.name} بیش از حد بزرگ است — هر پیوست باید کمتر از ۳۰ مگابایت باشد.`,tpe=e=>`${e==null?void 0:e.name} كبير جدًا — يجب أن يكون كل مرفق أقل من 30 ميغابايت.`,npe=e=>`${e==null?void 0:e.name} es demasiado grande — cada adjunto debe ocupar menos de 30 MB.`,rpe=e=>`${e==null?void 0:e.name} बहुत बड़ी है — हर अटैचमेंट 30 MB से कम होनी चाहिए।`,spe=((e,n={})=>{const t=n.locale??z();return t==="zh-CN"?Jhe(e):t==="fa"?epe(e):t==="ar"?tpe(e):t==="es"?npe(e):t==="hi"?rpe(e):Zhe(e)}),ipe=()=>"Attachments exceed the 40 MB total limit — remove one and try again.",ape=()=>"附件总大小超过 40 MB 限制 — 请移除一个附件后重试。",ope=()=>"حجم پیوست‌ها از سقف ۴۰ مگابایت بیشتر است — یکی را حذف و دوباره تلاش کنید.",lpe=()=>"تتجاوز المرفقات الحد الإجمالي 40 ميغابايت — أزِل واحدًا وحاول مجددًا.",cpe=()=>"Los adjuntos superan el límite total de 40 MB — quita uno y vuelve a intentarlo.",upe=()=>"अटैचमेंट 40 MB की कुल सीमा से ज़्यादा हैं — एक हटाएं और फिर से कोशिश करें।",_pe=((e={},n={})=>{const t=n.locale??z();return t==="zh-CN"?ape():t==="fa"?ope():t==="ar"?lpe():t==="es"?cpe():t==="hi"?upe():ipe()}),fpe=()=>"Wait for the turn to finish before running a command.",dpe=()=>"请等待本轮结束后再运行命令。",hpe=()=>"پیش از اجرای فرمان، صبر کنید تا نوبت تمام شود.",ppe=()=>"انتظر انتهاء الجولة قبل تنفيذ أمر.",mpe=()=>"Espera a que termine el turno antes de ejecutar un comando.",gpe=()=>"कमांड चलाने से पहले टर्न खत्म होने का इंतज़ार करें।",vpe=((e={},n={})=>{const t=n.locale??z();return t==="zh-CN"?dpe():t==="fa"?hpe():t==="ar"?ppe():t==="es"?mpe():t==="hi"?gpe():fpe()}),bpe=e=>`Exited with code ${e==null?void 0:e.code}`,ype=e=>`退出码 ${e==null?void 0:e.code}`,xpe=e=>`با کد ${e==null?void 0:e.code} خارج شد`,wpe=e=>`خرج برمز ${e==null?void 0:e.code}`,kpe=e=>`Terminó con el código ${e==null?void 0:e.code}`,Spe=e=>`कोड ${e==null?void 0:e.code} के साथ बाहर निकला`,Cpe=((e,n={})=>{const t=n.locale??z();return t==="zh-CN"?ype(e):t==="fa"?xpe(e):t==="ar"?wpe(e):t==="es"?kpe(e):t==="hi"?Spe(e):bpe(e)}),Epe=e=>`Command not run: ${e==null?void 0:e.error}`,Npe=e=>`命令未运行:${e==null?void 0:e.error}`,zpe=e=>`فرمان اجرا نشد: ${e==null?void 0:e.error}`,jpe=e=>`لم يُنفَّذ الأمر: ${e==null?void 0:e.error}`,Tpe=e=>`No se ejecutó el comando: ${e==null?void 0:e.error}`,Ape=e=>`कमांड नहीं चलाई गई: ${e==null?void 0:e.error}`,BE=((e,n={})=>{const t=n.locale??z();return t==="zh-CN"?Npe(e):t==="fa"?zpe(e):t==="ar"?jpe(e):t==="es"?Tpe(e):t==="hi"?Ape(e):Epe(e)}),Rpe=()=>"Collapse tool activity",Mpe=()=>"折叠工具活动",Ope=()=>"بستن فعالیت ابزارها",Dpe=()=>"طيّ نشاط الأداة",Lpe=()=>"Contraer actividad de herramientas",Ipe=()=>"टूल गतिविधि समेटें",$pe=((e={},n={})=>{const t=n.locale??z();return t==="zh-CN"?Mpe():t==="fa"?Ope():t==="ar"?Dpe():t==="es"?Lpe():t==="hi"?Ipe():Rpe()}),Bpe=()=>"Continue",Ppe=()=>"继续",Fpe=()=>"ادامه",Hpe=()=>"متابعة",qpe=()=>"Continuar",Upe=()=>"जारी रखें",Gpe=((e={},n={})=>{const t=n.locale??z();return t==="zh-CN"?Ppe():t==="fa"?Fpe():t==="ar"?Hpe():t==="es"?qpe():t==="hi"?Upe():Bpe()}),Vpe=e=>`Delete “${e==null?void 0:e.title}”? + */var bE;function nW(){if(bE)return M2;bE=1;var e=om(),n=tW();function t(u,h){return u===h&&(u!==0||1/u===1/h)||u!==u&&h!==h}var r=typeof Object.is=="function"?Object.is:t,s=n.useSyncExternalStore,i=e.useRef,a=e.useEffect,o=e.useMemo,l=e.useDebugValue;return M2.useSyncExternalStoreWithSelector=function(u,h,_,p,m){var x=i(null);if(x.current===null){var k={hasValue:!1,value:null};x.current=k}else k=x.current;x=o(function(){function b(N){if(!w){if(w=!0,y=N,N=p(N),m!==void 0&&k.hasValue){var A=k.value;if(m(A,N))return C=A}return C=N}if(A=C,r(y,N))return A;var j=p(N);return m!==void 0&&m(A,j)?(y=N,A):(y=N,C=j)}var w=!1,y,C,E=_===void 0?null:_;return[function(){return b(h())},E===null?void 0:function(){return b(E())}]},[h,_,p,m]);var v=s(u,x[0],x[1]);return a(function(){k.hasValue=!0,k.value=v},[v]),l(v),v},M2}var yE;function rW(){return yE||(yE=1,R2.exports=nW()),R2.exports}var RO=rW();const sW=am(RO);function iW(e,n){return e===n}function Go(e,n,t=iW){const r=T.useCallback(a=>{if(!e)return()=>{};const{unsubscribe:o}=e.subscribe(a);return o},[e]),s=T.useCallback(()=>e==null?void 0:e.get(),[e]);return RO.useSyncExternalStoreWithSelector(r,s,s,n,t)}var xE={};function Ck(e,n){const t=T.useRef();return r=>{const s=e!=null&&e.select?e.select(r):r;return(e==null?void 0:e.structuralSharing)??n.options.defaultStructuralSharing?t.current=p_(t.current,s):s}}function rf(e){const n=_i(),t=T.useContext(e.from?KK:db),r=e.from??t,s=n.stores.getMatchStore(r),i=Ck(e,n),a=Go(s,o=>o?i(o):xE);if(a!==xE)return a;(e.shouldThrow??!0)&&mk()}function MO(e){return rf({from:e.from,strict:e.strict,structuralSharing:e.structuralSharing,select:n=>e.select?e.select(n.loaderData):n.loaderData})}function OO(e){const{select:n,...t}=e;return rf({...t,select:r=>n?n(r.loaderDeps):r.loaderDeps})}function DO(e){return rf({from:e.from,shouldThrow:e.shouldThrow,structuralSharing:e.structuralSharing,strict:e.strict,select:n=>{const t=e.strict===!1?n.params:n._strictParams;return e.select?e.select(t):t}})}function LO(e){return rf({from:e.from,strict:e.strict,shouldThrow:e.shouldThrow,structuralSharing:e.structuralSharing,select:n=>e.select?e.select(n.search):n.search})}function hb(e){const n=_i();return T.useCallback(t=>n.navigate({...t,from:t.from??(e==null?void 0:e.from)}),[e==null?void 0:e.from,n])}function Ek(e){return rf({...e,select:n=>e.select?e.select(n.context):n.context})}function L2(e){const n=T.useRef(e);return hu(n.current,e,{ignoreUndefined:!1})||(n.current=e),n.current}function aW(e,n){return e[0]===n[0]&&e[1]===n[1]&&e[2]===n[2]}function oW(e,n,t){if(e!=null&&e.external)return av(e.href,t)?void 0:e.href;if(!hW(n)&&!(typeof n!="string"||n.indexOf(":")===-1))try{return new URL(n),av(n,t)?void 0:n}catch{}}function lW(e,n,t,r,s,i){if(i)return!1;if(t!=null&&t.exact){if(!rK(e.pathname,n.pathname,r))return!1}else{const a=lv(e.pathname,r),o=lv(n.pathname,r);if(!(a.startsWith(o)&&(a.length===o.length||a[o.length]==="/")))return!1}return((t==null?void 0:t.includeSearch)??!0)&&!hu(e.search,n.search,{partial:!(t!=null&&t.exact),ignoreUndefined:!(t!=null&&t.explicitUndefined)})?!1:t!=null&&t.includeHash?s&&e.hash===n.hash:!0}function cW(e,n){const t=_i(),r=BV(n),{activeProps:s,inactiveProps:i,activeOptions:a,to:o,preload:l,preloadDelay:u,preloadIntentProximity:h,hashScrollIntoView:_,replace:p,startTransition:m,resetScroll:x,viewTransition:k,children:v,target:b,disabled:w,style:y,className:C,onClick:E,onBlur:N,onFocus:A,onMouseEnter:j,onMouseLeave:M,onTouchStart:L,ignoreBlocker:I,params:B,search:q,hash:U,state:W,mask:H,reloadDocument:Y,unsafeRelative:te,from:$,_fromLocation:D,...F}=e,G=zO(),V=L2(e.search),ee=L2(e.params),ce=L2(a),ae=T.useMemo(()=>e,[t,e.from,e._fromLocation,e.hash,e.to,V,ee,e.state,e.mask,e.unsafeRelative]),re=T.useCallback(mt=>{const we=t.buildLocation({_fromLocation:mt,...ae}),ct=dW(we.maskedLocation?we.maskedLocation.publicHref:we.publicHref,we.maskedLocation?we.maskedLocation.external:we.external,t.history,w),ye=oW(ct,o,t.protocolAllowlist);return[ct==null?void 0:ct.href,ye,lW(mt,we,ce,t.basepath,G,ye!==void 0)]},[ce,w,G,ae,t,o]),[X,oe,le]=Go(t.stores.location,re,aW),_e=le?Kd(s,{})??uW:I2,pe=le?I2:Kd(i,{})??I2,Ee=[C,_e.className,pe.className].filter(Boolean).join(" "),Ie=(y||_e.style||pe.style)&&{...y,..._e.style,...pe.style},ze=T.useRef(!1),He=e.reloadDocument||oe||w?!1:l??t.options.defaultPreload,Oe=u??t.options.defaultPreloadDelay??0,Xe=T.useCallback(()=>{t.preloadRoute(ae).catch(mt=>{console.warn(mt),console.warn(HK)})},[t,ae]),_t=T.useCallback(mt=>{if(!mt){$2(r);return}if(!(mt.isIntersecting??He==="intent")){mt.isIntersecting===!1&&$2(r);return}if(!Oe){Xe();return}Qp.has(r)||Qp.set(r,setTimeout(()=>{Qp.delete(r),Xe()},Oe))},[Xe,r,He,Oe]);$V(r,_t,He!=="viewport"),T.useEffect(()=>{ze.current||He==="render"&&(Xe(),ze.current=!0)},[Xe,He]);const Vt=mt=>{const we=mt.currentTarget.getAttribute("target"),ct=b!==void 0?b:we;!w&&!(mt.metaKey||mt.altKey||mt.ctrlKey||mt.shiftKey)&&!mt.defaultPrevented&&(!ct||ct==="_self")&&mt.button===0&&(mt.preventDefault(),t.navigate({...ae,replace:p,resetScroll:x,hashScrollIntoView:_,startTransition:m,viewTransition:k,ignoreBlocker:I}))};if(oe)return{...F,ref:r,href:oe,...v&&{children:v},...b&&{target:b},...w&&{disabled:w},...y&&{style:y},...C&&{className:C},...E&&{onClick:E},...N&&{onBlur:N},...A&&{onFocus:A},...j&&{onMouseEnter:j},...M&&{onMouseLeave:M},...L&&{onTouchStart:L}};const $t=()=>{He==="intent"&&Xe()},jt=()=>{He==="intent"&&$2(r)};return{...F,..._e,...pe,href:X,ref:r,onClick:Qf([E,Vt]),onBlur:Qf([N,jt]),onFocus:Qf([A,_t]),onMouseEnter:Qf([j,_t]),onMouseLeave:Qf([M,jt]),onTouchStart:Qf([L,$t]),disabled:!!w,target:b,...Ie&&{style:Ie},...Ee&&{className:Ee},...w&&_W,...le&&fW}}var I2={},uW={className:"active"},_W={role:"link","aria-disabled":!0},fW={"data-status":"active","aria-current":"page"},Qp=new WeakMap,$2=e=>{clearTimeout(Qp.get(e)),Qp.delete(e)},Qf=e=>n=>{for(const t of e)if(t){if(n.defaultPrevented)return;t(n)}};function dW(e,n,t,r){if(!r)return n?{href:e,external:!0}:{href:t.createHref(e)||"/",external:!1}}function hW(e){if(typeof e!="string")return!1;const n=e.charCodeAt(0);return n===47?e.charCodeAt(1)!==47:n===46}var pb=T.forwardRef((e,n)=>{const{_asChild:t,...r}=e,{type:s,...i}=cW(r,n),a=typeof r.children=="function"?r.children({isActive:i["data-status"]==="active"}):r.children;if(!t){const{disabled:o,...l}=i;return T.createElement("a",l,a)}return T.createElement(t,i,a)}),pW=class extends NO{constructor(n){super(n),this.useMatch=t=>rf({select:t==null?void 0:t.select,from:this.id,structuralSharing:t==null?void 0:t.structuralSharing}),this.useRouteContext=t=>Ek({...t,from:this.id}),this.useSearch=t=>LO({select:t==null?void 0:t.select,structuralSharing:t==null?void 0:t.structuralSharing,from:this.id}),this.useParams=t=>DO({select:t==null?void 0:t.select,structuralSharing:t==null?void 0:t.structuralSharing,from:this.id}),this.useLoaderDeps=t=>OO({...t,from:this.id}),this.useLoaderData=t=>MO({...t,from:this.id}),this.useNavigate=()=>hb({from:this.fullPath}),this.Link=et.forwardRef((t,r)=>f.jsx(pb,{ref:r,from:this.fullPath,...t}))}};function mW(e){return new pW(e)}function gW(){return e=>bW(e)}var vW=class extends qK{constructor(e){super(e),this.useMatch=n=>rf({select:n==null?void 0:n.select,from:this.id,structuralSharing:n==null?void 0:n.structuralSharing}),this.useRouteContext=n=>Ek({...n,from:this.id}),this.useSearch=n=>LO({select:n==null?void 0:n.select,structuralSharing:n==null?void 0:n.structuralSharing,from:this.id}),this.useParams=n=>DO({select:n==null?void 0:n.select,structuralSharing:n==null?void 0:n.structuralSharing,from:this.id}),this.useLoaderDeps=n=>OO({...n,from:this.id}),this.useLoaderData=n=>MO({...n,from:this.id}),this.useNavigate=()=>hb({from:this.fullPath}),this.Link=et.forwardRef((n,t)=>f.jsx(pb,{ref:t,from:this.fullPath,...n}))}};function bW(e){return new vW(e)}function Yo(e){return n=>{const t=mW(n);return t.isRoot=!1,t}}function yW(e){const n=_i(),t=`not-found-${Go(n.stores.location,r=>r.pathname)}-${Go(n.stores.status,r=>r)}`;return f.jsx(Sk,{getResetKey:()=>t,onCatch:(r,s)=>{var i;if(Wd(r))(i=e.onCatch)==null||i.call(e,r,s);else throw r},errorComponent:({error:r})=>{var s;if(Wd(r))return(s=e.fallback)==null?void 0:s.call(e,r);throw r},children:e.children})}function xW(){return f.jsx("p",{children:"Not Found"})}function rd(e){return f.jsx(f.Fragment,{children:e.children})}function IO(e,n,t){return n.options.notFoundComponent?f.jsx(n.options.notFoundComponent,{...t}):e.options.defaultNotFoundComponent?f.jsx(e.options.defaultNotFoundComponent,{...t}):f.jsx(xW,{})}function mb(e,n){const t=(n==null?void 0:n.options.pendingComponent)??e.options.defaultPendingComponent;return t?f.jsx(t,{}):null}var wW=(e,n)=>e[0]===n[0]&&e[1]===n[1],$O=(e,n,t)=>!n.isRoot||n.options.shellComponent||n.options.wrapInSuspense||t===!1||t==="data-only"||!e.ssr,BO=T.memo(function({routeId:n}){const t=_i();return f.jsx(kW,{router:t,match:Go(t.stores.getMatchStore(n),r=>r)})});function kW({router:e,match:n}){var _,p;const t=e.routesById[n.routeId],r=mb(e,t),s=t.options.errorComponent??e.options.defaultErrorComponent,i=t.options.onCatch??e.options.defaultOnCatch,a=t.isRoot?t.options.notFoundComponent??((_=e.options.notFoundRoute)==null?void 0:_.options.component):t.options.notFoundComponent,o=n.ssr===!1||n.ssr==="data-only",l=$O(e,t,n.ssr)&&(t.options.wrapInSuspense??r??(((p=t.options.errorComponent)==null?void 0:p.preload)||o))?T.Suspense:rd,u=s?Sk:rd,h=a?yW:rd;return f.jsxs(t.isRoot?t.options.shellComponent??rd:rd,{children:[f.jsx(db.Provider,{value:n.routeId,children:f.jsx(l,{fallback:r,children:f.jsx(u,{getResetKey:()=>n,errorComponent:s,onCatch:(m,x)=>{if(Wd(m))throw m.routeId??(m.routeId=n.routeId),m;i==null||i(m,x)},children:f.jsx(h,{fallback:m=>{if(m.routeId??(m.routeId=n.routeId),m.routeId!==n.routeId)throw m;return T.createElement(a,m)},children:o?f.jsx(GK,{fallback:r,children:f.jsx(wE,{match:n})}):f.jsx(wE,{match:n})})})})}),null]})}var wE=T.memo(function({match:n}){const t=_i(),r=n.routeId,s=t.routesById[r],i=T.useMemo(()=>{var l;const o=(l=s.options.remountDeps??t.options.defaultRemountDeps)==null?void 0:l({routeId:r,loaderDeps:n.loaderDeps,params:n._strictParams,search:n._strictSearch});return o?JSON.stringify(o):void 0},[r,n.loaderDeps,n._strictParams,n._strictSearch,s.options.remountDeps,t.options.defaultRemountDeps]),a=T.useMemo(()=>{const o=s.options.component??t.options.defaultComponent;return o?f.jsx(o,{},i):f.jsx(f0,{})},[i,s.options.component,t.options.defaultComponent]);if(n.status==="pending"){if(t.ssr&&!$O(t,s,n.ssr))return a;if(t._tx)throw t._tx[5];return mb(t,s)}if(n.status==="notFound")return IO(t,s,n.error);if(n.status==="error")throw n.error;return a}),f0=T.memo(function(){const n=_i(),t=T.useContext(db);let r,s,i;{const o=n.stores.getMatchStore(t);[r,s]=Go(o,l=>[!!l._notFound,l.error],wW),i=Go(n.stores.ids,l=>l[l.indexOf(t)+1])}if(r)return IO(n,n.routesById[t],s);if(!i)return null;const a=f.jsx(BO,{routeId:i});return t===gd?f.jsx(T.Suspense,{fallback:mb(n),children:a}):a});function PO(e,n){const t=e[1];e.length=0,t==null||t(n)}function SW({t:e}){const n=_i(),t=n._rendered??(n._rendered=[]);return n.startTransition=(r,s)=>new Promise(i=>{PO(t,!1),t.push(s,i),e(n),T.startTransition(r)}),cO(()=>{const r=n.history.subscribe(n.load);n.updateLatestLocation();const s=n.latestLocation,i=n.buildLocation({to:s.pathname,search:!0,params:!0,hash:!0,state:!0,_includeValidateSearch:!0});if(Vl(s.publicHref)!==Vl(i.publicHref))return n.commitLocation({...i,replace:!0,ignoreBlocker:!0}),r;const a=n.stores.resolvedLocation.get();return(a==null?void 0:a.href)===s.href&&a.state.__TSR_key===s.state.__TSR_key?t.push(n.stores.matches.get(),o=>{o&&n.emit({type:"onRendered",..._b(a,a)})}):n._tx||n.load({sync:!0}).catch(console.error),r},[n,n.history]),null}function CW(){const e=_i(),n=e.routesById[gd],t=mb(e,n),r=e.ssr?rd:T.Suspense,s=f.jsxs(f.Fragment,{children:[f.jsx(SW,{t:T.useState()[1]}),f.jsx(r,{fallback:t,children:f.jsx(EW,{})})]});return e.options.InnerWrap?f.jsx(e.options.InnerWrap,{children:s}):s}function EW(){const e=_i(),n=e._rendered,t=Go(e.stores.matches,a=>n[0]??a),r=t[0],s=r==null?void 0:r.routeId;cO(()=>{n[0]===t&&PO(n,!0)},[n,t]);const i=s?f.jsx(BO,{routeId:s}):null;return f.jsx(db.Provider,{value:s,children:e.options.disableGlobalCatchBoundary?i:f.jsx(Sk,{getResetKey:()=>r,onCatch:void 0,children:i})})}var NW=e=>({createMutableStore:mE,createReadonlyStore:mE,batch:ZK}),zW=e=>new jW(e),jW=class extends jK{constructor(e){super(e,NW)}};function TW({router:e,children:n,...t}){_O(t)&&e.update({...e.options,...t,context:{...e.options.context,...t.context}});const r=f.jsx(jO.Provider,{value:e,children:n});return e.options.Wrap?f.jsx(e.options.Wrap,{children:r}):r}function AW({router:e,...n}){return f.jsx(TW,{router:e,...n,children:f.jsx(CW,{})})}function RW(e,n){if(e===void 0)return{shouldBlockFn:()=>!0,withResolver:!1};if("shouldBlockFn"in e)return e;if(typeof e=="function")return{shouldBlockFn:async()=>await e(),enableBeforeUnload:!0,withResolver:!1};const t=!!(e.condition??!0),r=e.blockerFn;return{shouldBlockFn:async()=>t&&r!==void 0?await r():t,enableBeforeUnload:t,withResolver:r===void 0}}function MW(e,n){const{shouldBlockFn:t,enableBeforeUnload:r=!0,disabled:s=!1,withResolver:i=!1}=RW(e),a=_i(),{history:o}=a,[l,u]=T.useState({status:"idle",current:void 0,next:void 0,action:void 0,proceed:void 0,reset:void 0});return T.useEffect(()=>{const h=async _=>{function p(b){const w=a.parseLocation(b),[,y,C]=a.getMatchedRoutes(w.pathname);return C===void 0?{routeId:"__notFound__",fullPath:w.pathname,pathname:w.pathname,params:y,search:a.options.parseSearch(b.search)}:{routeId:C.id,fullPath:C.fullPath,pathname:w.pathname,params:y,search:a.options.parseSearch(b.search)}}const m=p(_.currentLocation),x=p(_.nextLocation);if(m.routeId==="__notFound__"&&x.routeId!=="__notFound__")return!1;const k=await t({action:_.action,current:m,next:x});if(!i)return k;if(!k)return!1;const v=await new Promise(b=>{u({status:"blocked",current:m,next:x,action:_.action,proceed:()=>b(!1),reset:()=>b(!0)})});return u({status:"idle",current:void 0,next:void 0,action:void 0,proceed:void 0,reset:void 0}),v};return s?void 0:o.block({blockerFn:h,enableBeforeUnload:r})},[t,r,s,i,o,a]),l}function FO(e){const n=_i({warn:(e==null?void 0:e.router)===void 0}),t=(e==null?void 0:e.router)||n;return Go(t.stores.__store,Ck(e,t))}function OW(e){const n=_i();return Go(n.stores.location,Ck(e,n))}const fv=new WeakMap,L1=new WeakMap;function Ja(e,n,t="*"){var r;for(const s of e.getQueryCache().findAll({queryKey:n}))fv.set(s,(fv.get(s)??0)+1),(r=L1.get(s))==null||r.add(t)}function lm(e,n,t,r=!0){if(!n)return e;const s=new Map(n.map(l=>[l.id,l])),i=new Set(e.map(l=>l.id)),a=n.filter(l=>t.has(l.id)&&!i.has(l.id)),o=e.filter(l=>!t.has(l.id)||s.has(l.id)).map(l=>t.has(l.id)?s.get(l.id)??l:l);return r?[...a,...o]:[...o,...a]}async function gh(e,n,t,r=(s,i)=>i??s){const s=e.getQueryCache().find({queryKey:n,exact:!0}),i=s?fv.get(s):void 0,a=await t();if(!s||fv.get(s)===i||s.state.fetchStatus!=="fetching"||e.getQueryCache().find({queryKey:n,exact:!0})!==s)return a;e.setQueryData(n,l=>l??a);const o=new Set;L1.set(s,o);try{const l=await t();return o.size?r(l,e.getQueryData(n),o):l}finally{L1.get(s)===o&&L1.delete(s)}}const Qd=e=>typeof e=="string"&&/^[0-9a-f]{40}$/i.test(e);function HO(e){const n=e.queryKey[2];if(n==="resolvedFile")return Qd(e.queryKey[7]);const t=n==="getProjectFile"?e.queryKey[5]:n==="getCodeTree"?e.queryKey[4]:null;return typeof t=="object"&&t!==null&&"ref"in t&&Qd(t.ref)}function Ca(e,n=Ra(),t,r=!1){if(!$n(n))return;const s={queryKey:n,predicate:i=>e.includes(String(i.queryKey[2]))&&!HO(i)&&(!t||t(i))};r?rt.cancelQueries(s).then(()=>{$n(n)&&rt.invalidateQueries(s)}):rt.invalidateQueries(s)}const qO=["resolvedFile","getProjectFile","getArtifactFileText","getArtifactFileMetadata"],Nk=["getArtifacts","getArtifactFileText","getArtifactFileMetadata"],DW=["listProjects","listProjectActivity","listExperiments","listRuns","listChatSessions","getChatMessages","getHarnesses","getUpdateStatus",...Nk,...qO,"getAbsoluteFile","fileVersion","getCodeTree","getSessionWorktree","getRunDiff","getExperimentDiff"];function LW(e,n=Ra(),t=!1){const r=rt.getQueryData([...n,"listChatSessions",e])??[],s=rt.getQueryData([...n,"listRuns",e])??[],i=rt.getQueryData([...n,"listExperiments",e])??[];Ca([...qO,...Nk,"getRunDiff","getExperimentDiff","getCodeTree","getSessionWorktree","fileVersion","getProjectGitStatus","getOverleafState","getOverleafStatus"],n,a=>{const o=a.queryKey[2];return o==="getRunDiff"?s.some(l=>l.id===a.queryKey[3]):o==="getExperimentDiff"?i.some(l=>l.id===a.queryKey[3]):o==="getSessionWorktree"?r.some(l=>l.id===a.queryKey[3]):o==="fileVersion"?typeof a.queryKey[3]=="string"&&a.queryKey[3].startsWith(`/api/projects/${e}/`):a.queryKey[3]===e},t)}function gb(e){const n=Ra();vu.add(e),Ja(rt,[...n,"listChatSessions"],e),rt.setQueriesData({queryKey:[...n,"listChatSessions"]},t=>t==null?void 0:t.filter(r=>r.id!==e));for(const t of["getChatMessages","getSessionWorktree"])pk({queryKey:[...n,t,e]})}function IW(e){const n=Ra(),t=rt.getQueryData([...n,"listChatSessions",e]);for(const r of t??[])gb(r.id);pk({queryKey:n,predicate:r=>r.queryKey.slice(3).includes(e)})}const $W={hf:["getHfSettings","getComputeSettings","getEnvVars"],tinker:["getTinkerSettings","getComputeSettings","getEnvVars"],k8s:["getK8sSettings","getComputeSettings"],modal:["getModalSettings","getComputeSettings","getEnvVars"],slurm:["getSlurmSettings","getComputeSettings"],ray:["getRaySettings","getComputeSettings"],env:["getEnvVars","getHfSettings","getTinkerSettings","getModalSettings","getSlurmSettings","getRaySettings","getK8sSettings","getOpenResearchSettings","getComputeSettings","getHarnesses"],"data-dir":["getDataDir"],ssh:["getSshSettings","getSshConfig","getSshMasterStatus","getComputeSettings"],compute:["getComputeSettings"],git:["githubAccount","repoAccess","getProjectGitStatus"],profile:["getProfile"],"lit-sources":["getLitSources"],projects:["getProjectDefaults","getProjectGitStatus"],telemetry:["getTelemetry"]};function BW(e,n){var a;if(!$n(n))return;const t=(o,l=n,u)=>Ca(o,l,u,!0),r=e.split("?")[0];if(/\/(ui-state|open|prewarm|validate|preflight)$/.test(r))return;const s=(a=/^\/api\/settings\/([^/]+)/.exec(r))==null?void 0:a[1];if(s){t($W[s]??[],n);return}if(r.startsWith("/api/local-models")&&!/\/(discover|check)$/.test(r)){t(["getLocalModels","getHarnesses"],n);return}if(r==="/api/user-skills"){t(["listUserSkills","getSkills","getSkillContent"],n);return}if(r==="/api/latex-templates"){t(["listLatexTemplates"],n);return}if(r==="/api/overleaf/token"){t(["getOverleafSettings","getOverleafState","getOverleafStatus"],n);return}if(r.startsWith("/api/update/")){t(["getUpdateStatus","getLocalMachine"],n);return}if(r.startsWith("/api/remote/")||r.startsWith("/_orx/")){t(["listRemoteSessions"],n),rt.invalidateQueries({queryKey:["gateway","runtime"]});return}if(r.startsWith("/api/chat/")){r==="/api/chat/sessions"&&t(["getProjectStarterPrompts","listProjectActivity"],n);return}const i=/^\/api\/projects\/([^/]+)(.*)$/.exec(r);if(i){const[,o,l]=i;if(l.startsWith("/file")){LW(o,n,!0);return}t(["listProjects","listProjectActivity"],n),t(["getProjectGitStatus","getCodeTree","getProjectStarterPrompts"],n,u=>u.queryKey[3]===o);return}(r==="/api/projects"||r==="/api/onboarding/complete")&&t(["listProjects","listProjectActivity","getUiState","getProfile"],n)}const PW={},FW="en",zk=["en","zh-CN","fa","ar","es","hi"],UO="orx:locale",jk=["localStorage","preferredLanguage","baseLocale"],kE=[],d0=typeof window>"u";globalThis.__paraglide=globalThis.__paraglide??{};globalThis.__paraglide.ssr=globalThis.__paraglide.ssr??{};let SE=!1,z=()=>{var t;let e=jk;!d0&&typeof window<"u"&&((t=window.location)!=null&&t.href)&&(e=KO(window.location.href));const n=HW(e);if(n)return SE||(SE=!0,GO(n,{reload:!1})),n;throw new Error("No locale found. Read the docs https://paraglidejs.com/errors#no-locale-found")};function HW(e,n){let t;for(const r of e){if(r==="baseLocale")t=FW;else if(r==="preferredLanguage"&&!d0)t=KW();else if(r==="localStorage"&&!d0)t=localStorage.getItem(UO)??void 0;else if(WO(r)&&dv.has(r)){const i=dv.get(r);if(i){const a=i.getLocale();if(a instanceof Promise)continue;if(a!==void 0)return GW(a)}}const s=h0(t);if(s)return s}}const qW=e=>{window.location.reload()};let GO=(e,n)=>{var o;const t={reload:!0,...n};let r;try{r=z()}catch{}const s=[];let i=jk;!d0&&typeof window<"u"&&((o=window.location)!=null&&o.href)&&(i=KO(window.location.href));for(const l of i)if(l!=="baseLocale"){if(l==="localStorage"&&typeof window<"u")localStorage.setItem(UO,e);else if(WO(l)&&dv.has(l)){const u=dv.get(l);if(u){let h=u.setLocale(e);h instanceof Promise&&(h=h.catch(_=>{throw new Error(`Custom strategy "${l}" setLocale failed.`,{cause:_})}),s.push(h))}}}const a=()=>{!d0&&t.reload&&window.location&&e!==r&&qW()};if(s.length)return Promise.all(s).then(()=>{a()});a()},UW=()=>typeof window<"u"?window.location.origin:"http://fallback.com";function h0(e){if(typeof e!="string")return;const n=e.toLowerCase();for(const t of zk)if(t.toLowerCase()===n)return t}function VO(e){return!!e&&zk.some(n=>n===e)}function GW(e){const n=h0(e);if(n)return n;throw new Error(`Invalid locale: ${e}. Expected one of: ${zk.join(", ")}`)}function VW(e,n){return e.exec(n.href)}function KW(){var n;if(!((n=navigator==null?void 0:navigator.languages)!=null&&n.length))return;const e=navigator.languages.map(t=>({fullTag:t,baseTag:t.split("-")[0]}));for(const t of e){const r=h0(t.fullTag);if(r)return r;const s=h0(t.baseTag);if(s)return s}}function WW(e){return QW(e)}function QW(e){const n=typeof e=="string"?new URL(e,UW()):new URL(e),t=n.pathname.split("/").filter(Boolean);return t.length>0&&h0(t[0])&&(n.pathname="/"+t.slice(1).join("/")),n}let CE,EE;function XW(e){if(kE.length===0)return;const n=typeof e=="string"?e:e.href;if(CE===n)return EE;const t=new URL(n,"http://example.com"),r=WW(t),s=r.href===t.href?[t]:[t,r];let i;for(const a of s){for(const o of kE){const l=new PW(o.match,a.href);if(VW(l,a)){i=o;break}}if(i)break}return CE=n,EE=i,i}function KO(e){const n=XW(e);return n&&n.exclude!==!0&&Array.isArray(n.strategy)?n.strategy:jk}const dv=new Map;function WO(e){return typeof e=="string"&&/^custom-[A-Za-z0-9_-]+$/.test(e)}const YW=e=>`Actions for ${e==null?void 0:e.name}`,ZW=e=>`${e==null?void 0:e.name} 的操作`,JW=e=>`عملیات ${e==null?void 0:e.name}`,eQ=e=>`إجراءات ${e==null?void 0:e.name}`,tQ=e=>`Acciones para ${e==null?void 0:e.name}`,nQ=e=>`${e==null?void 0:e.name} के लिए क्रियाएं`,rQ=((e,n={})=>{const t=n.locale??z();return t==="zh-CN"?ZW(e):t==="fa"?JW(e):t==="ar"?eQ(e):t==="es"?tQ(e):t==="hi"?nQ(e):YW(e)}),sQ=e=>`${e==null?void 0:e.path} — press Space to preview; double-click or press Enter to keep open in a tab`,iQ=e=>`${e==null?void 0:e.path}——按空格键预览;双击或按 Enter 以在标签页中保持打开`,aQ=e=>`${e==null?void 0:e.path} — برای پیش‌نمایش Space و برای باز نگه‌داشتن در زبانه دوبار کلیک کنید یا Enter را بزنید`,oQ=e=>`${e==null?void 0:e.path} — اضغط المسافة للمعاينة؛ انقر نقرًا مزدوجًا أو اضغط Enter لإبقائه مفتوحًا في تبويب`,lQ=e=>`${e==null?void 0:e.path} — pulsa Espacio para previsualizarlo; haz doble clic o pulsa Intro para mantenerlo abierto en una pestaña`,cQ=e=>`${e==null?void 0:e.path} — पूर्वावलोकन के लिए स्पेस दबाएं; टैब में खुला रखने के लिए डबल-क्लिक करें या Enter दबाएं`,uQ=((e,n={})=>{const t=n.locale??z();return t==="zh-CN"?iQ(e):t==="fa"?aQ(e):t==="ar"?oQ(e):t==="es"?lQ(e):t==="hi"?cQ(e):sQ(e)}),_Q=e=>`Branch: ${e==null?void 0:e.branch}`,fQ=e=>`分支:${e==null?void 0:e.branch}`,dQ=e=>`شاخه: ${e==null?void 0:e.branch}`,hQ=e=>`الفرع: ${e==null?void 0:e.branch}`,pQ=e=>`Rama: ${e==null?void 0:e.branch}`,mQ=e=>`ब्रांच: ${e==null?void 0:e.branch}`,gQ=((e,n={})=>{const t=n.locale??z();return t==="zh-CN"?fQ(e):t==="fa"?dQ(e):t==="ar"?hQ(e):t==="es"?pQ(e):t==="hi"?mQ(e):_Q(e)}),vQ=e=>`Browse code on ${e==null?void 0:e.branch}`,bQ=e=>`浏览分支 ${e==null?void 0:e.branch} 上的代码`,yQ=e=>`مرور کد در شاخهٔ ${e==null?void 0:e.branch}`,xQ=e=>`تصفّح الشيفرة على ${e==null?void 0:e.branch}`,wQ=e=>`Explorar el código en ${e==null?void 0:e.branch}`,kQ=e=>`${e==null?void 0:e.branch} पर कोड ब्राउज़ करें`,QO=((e,n={})=>{const t=n.locale??z();return t==="zh-CN"?bQ(e):t==="fa"?yQ(e):t==="ar"?xQ(e):t==="es"?wQ(e):t==="hi"?kQ(e):vQ(e)}),SQ=e=>`Harness and model for this chat: ${e==null?void 0:e.label}`,CQ=e=>`此聊天的智能体工具和模型:${e==null?void 0:e.label}`,EQ=e=>`ابزار عامل و مدل این گفتگو: ${e==null?void 0:e.label}`,NQ=e=>`أداة البرمجة والنموذج المستخدمان في هذه المحادثة: ${e==null?void 0:e.label}`,zQ=e=>`Agente y modelo de este chat: ${e==null?void 0:e.label}`,jQ=e=>`इस चैट का हार्नेस और मॉडल: ${e==null?void 0:e.label}`,TQ=((e,n={})=>{const t=n.locale??z();return t==="zh-CN"?CQ(e):t==="fa"?EQ(e):t==="ar"?NQ(e):t==="es"?zQ(e):t==="hi"?jQ(e):SQ(e)}),AQ=e=>`Collapse ${e==null?void 0:e.name}`,RQ=e=>`折叠 ${e==null?void 0:e.name}`,MQ=e=>`بستن ${e==null?void 0:e.name}`,OQ=e=>`طيّ ${e==null?void 0:e.name}`,DQ=e=>`Contraer ${e==null?void 0:e.name}`,LQ=e=>`${e==null?void 0:e.name} समेटें`,IQ=((e,n={})=>{const t=n.locale??z();return t==="zh-CN"?RQ(e):t==="fa"?MQ(e):t==="ar"?OQ(e):t==="es"?DQ(e):t==="hi"?LQ(e):AQ(e)}),$Q=e=>`Committed changes versus ${e==null?void 0:e.parent}`,BQ=e=>`与 ${e==null?void 0:e.parent} 相比的已提交更改`,PQ=e=>`تغییرات کامیت‌شده نسبت به ${e==null?void 0:e.parent}`,FQ=e=>`التغييرات المودعة مقابل ${e==null?void 0:e.parent}`,HQ=e=>`Cambios confirmados respecto a ${e==null?void 0:e.parent}`,qQ=e=>`${e==null?void 0:e.parent} की तुलना में कमिट किए गए बदलाव`,UQ=((e,n={})=>{const t=n.locale??z();return t==="zh-CN"?BQ(e):t==="fa"?PQ(e):t==="ar"?FQ(e):t==="es"?HQ(e):t==="hi"?qQ(e):$Q(e)}),GQ=e=>`Committed changes versus ${e==null?void 0:e.parent} (diff truncated; counts are lower bounds)`,VQ=e=>`与 ${e==null?void 0:e.parent} 相比的已提交更改(差异已截断,计数为下限)`,KQ=e=>`تغییرات کامیت‌شده نسبت به ${e==null?void 0:e.parent} (تفاوت کوتاه شده و شمارش‌ها حد پایین‌اند)`,WQ=e=>`التغييرات المودعة مقابل ${e==null?void 0:e.parent} (الفرق مقتطع؛ الأعداد حدود دنيا)`,QQ=e=>`Cambios confirmados respecto a ${e==null?void 0:e.parent} (diff truncado; los recuentos son mínimos)`,XQ=e=>`${e==null?void 0:e.parent} की तुलना में कमिट किए गए बदलाव (डिफ़ छोटा किया गया; संख्याएं न्यूनतम हैं)`,YQ=((e,n={})=>{const t=n.locale??z();return t==="zh-CN"?VQ(e):t==="fa"?KQ(e):t==="ar"?WQ(e):t==="es"?QQ(e):t==="hi"?XQ(e):GQ(e)}),ZQ=e=>`Copy ${e==null?void 0:e.value}`,JQ=e=>`复制 ${e==null?void 0:e.value}`,eX=e=>`کپی ${e==null?void 0:e.value}`,tX=e=>`نسخ ${e==null?void 0:e.value}`,nX=e=>`Copiar ${e==null?void 0:e.value}`,rX=e=>`${e==null?void 0:e.value} कॉपी करें`,sX=((e,n={})=>{const t=n.locale??z();return t==="zh-CN"?JQ(e):t==="fa"?eX(e):t==="ar"?tX(e):t==="es"?nX(e):t==="hi"?rX(e):ZQ(e)}),iX=e=>`Delete ${e==null?void 0:e.name}`,aX=e=>`删除 ${e==null?void 0:e.name}`,oX=e=>`حذف ${e==null?void 0:e.name}`,lX=e=>`حذف ${e==null?void 0:e.name}`,cX=e=>`Eliminar ${e==null?void 0:e.name}`,uX=e=>`${e==null?void 0:e.name} हटाएं`,Q4=((e,n={})=>{const t=n.locale??z();return t==="zh-CN"?aX(e):t==="fa"?oX(e):t==="ar"?lX(e):t==="es"?cX(e):t==="hi"?uX(e):iX(e)}),_X=e=>`Download ${e==null?void 0:e.name}`,fX=e=>`下载 ${e==null?void 0:e.name}`,dX=e=>`بارگیری ${e==null?void 0:e.name}`,hX=e=>`تنزيل ${e==null?void 0:e.name}`,pX=e=>`Descargar ${e==null?void 0:e.name}`,mX=e=>`${e==null?void 0:e.name} डाउनलोड करें`,NE=((e,n={})=>{const t=n.locale??z();return t==="zh-CN"?fX(e):t==="fa"?dX(e):t==="ar"?hX(e):t==="es"?pX(e):t==="hi"?mX(e):_X(e)}),gX=e=>`Expand ${e==null?void 0:e.name}`,vX=e=>`展开 ${e==null?void 0:e.name}`,bX=e=>`باز کردن ${e==null?void 0:e.name}`,yX=e=>`توسيع ${e==null?void 0:e.name}`,xX=e=>`Expandir ${e==null?void 0:e.name}`,wX=e=>`${e==null?void 0:e.name} फैलाएं`,kX=((e,n={})=>{const t=n.locale??z();return t==="zh-CN"?vX(e):t==="fa"?bX(e):t==="ar"?yX(e):t==="es"?xX(e):t==="hi"?wX(e):gX(e)}),SX=e=>`Hide additional ${e==null?void 0:e.target}`,CX=e=>`隐藏其余${e==null?void 0:e.target}`,EX=e=>`پنهان کردن موارد بیشترِ ${e==null?void 0:e.target}`,NX=e=>`إخفاء ${e==null?void 0:e.target} الإضافية`,zX=e=>`Ocultar ${e==null?void 0:e.target} adicionales`,jX=e=>`अतिरिक्त ${e==null?void 0:e.target} छिपाएं`,TX=((e,n={})=>{const t=n.locale??z();return t==="zh-CN"?CX(e):t==="fa"?EX(e):t==="ar"?NX(e):t==="es"?zX(e):t==="hi"?jX(e):SX(e)}),AX=e=>`Hide error details for ${e==null?void 0:e.activity}`,RX=e=>`隐藏 ${e==null?void 0:e.activity} 的错误详情`,MX=e=>`پنهان کردن جزئیات خطای ${e==null?void 0:e.activity}`,OX=e=>`إخفاء تفاصيل الخطأ لـ ${e==null?void 0:e.activity}`,DX=e=>`Ocultar los detalles del error de ${e==null?void 0:e.activity}`,LX=e=>`${e==null?void 0:e.activity} के लिए त्रुटि विवरण छिपाएं`,IX=((e,n={})=>{const t=n.locale??z();return t==="zh-CN"?RX(e):t==="fa"?MX(e):t==="ar"?OX(e):t==="es"?DX(e):t==="hi"?LX(e):AX(e)}),$X=e=>`${e==null?void 0:e.count} consecutive identical calls`,BX=e=>`连续 ${e==null?void 0:e.count} 次相同调用`,PX=e=>`${e==null?void 0:e.count} فراخوانی یکسان پیاپی`,FX=e=>`الاستدعاءات المتطابقة المتتالية: ${e==null?void 0:e.count}`,HX=e=>`Llamadas idénticas consecutivas: ${e==null?void 0:e.count}`,qX=e=>`${e==null?void 0:e.count} लगातार समान कॉल`,UX=((e,n={})=>{const t=n.locale??z();return t==="zh-CN"?BX(e):t==="fa"?PX(e):t==="ar"?FX(e):t==="es"?HX(e):t==="hi"?qX(e):$X(e)}),GX=e=>`${e==null?void 0:e.name} — double-click or press Enter to keep open`,VX=e=>`${e==null?void 0:e.name}——双击或按 Enter 以保持打开`,KX=e=>`${e==null?void 0:e.name} — برای باز نگه‌داشتن دوبار کلیک کنید یا Enter را بزنید`,WX=e=>`${e==null?void 0:e.name} — انقر نقرًا مزدوجًا أو اضغط Enter لإبقائه مفتوحًا`,QX=e=>`${e==null?void 0:e.name} — haz doble clic o pulsa Intro para mantenerlo abierto`,XX=e=>`${e==null?void 0:e.name} — खुला रखने के लिए डबल-क्लिक करें या Enter दबाएं`,YX=((e,n={})=>{const t=n.locale??z();return t==="zh-CN"?VX(e):t==="fa"?KX(e):t==="ar"?WX(e):t==="es"?QX(e):t==="hi"?XX(e):GX(e)}),ZX=e=>`Open ${e==null?void 0:e.branch} on GitHub`,JX=e=>`在 GitHub 上打开 ${e==null?void 0:e.branch}`,eY=e=>`باز کردن ${e==null?void 0:e.branch} در GitHub`,tY=e=>`فتح ${e==null?void 0:e.branch} على GitHub`,nY=e=>`Abrir ${e==null?void 0:e.branch} en GitHub`,rY=e=>`${e==null?void 0:e.branch} को GitHub पर खोलें`,XO=((e,n={})=>{const t=n.locale??z();return t==="zh-CN"?JX(e):t==="fa"?eY(e):t==="ar"?tY(e):t==="es"?nY(e):t==="hi"?rY(e):ZX(e)}),sY=e=>`Open experiment ${e==null?void 0:e.name}`,iY=e=>`打开实验 ${e==null?void 0:e.name}`,aY=e=>`باز کردن آزمایش ${e==null?void 0:e.name}`,oY=e=>`فتح التجربة ${e==null?void 0:e.name}`,lY=e=>`Abrir el experimento ${e==null?void 0:e.name}`,cY=e=>`${e==null?void 0:e.name} प्रयोग खोलें`,uY=((e,n={})=>{const t=n.locale??z();return t==="zh-CN"?iY(e):t==="fa"?aY(e):t==="ar"?oY(e):t==="es"?lY(e):t==="hi"?cY(e):sY(e)}),_Y=e=>`Open ${e==null?void 0:e.path} in the right pane`,fY=e=>`在右侧面板中打开 ${e==null?void 0:e.path}`,dY=e=>`باز کردن ${e==null?void 0:e.path} در پنل سمت راست`,hY=e=>`فتح ${e==null?void 0:e.path} في الجزء الأيمن`,pY=e=>`Abrir ${e==null?void 0:e.path} en el panel derecho`,mY=e=>`${e==null?void 0:e.path} को दाएं पैनल में खोलें`,gY=((e,n={})=>{const t=n.locale??z();return t==="zh-CN"?fY(e):t==="fa"?dY(e):t==="ar"?hY(e):t==="es"?pY(e):t==="hi"?mY(e):_Y(e)}),vY=e=>`Open ${e==null?void 0:e.name}`,bY=e=>`打开 ${e==null?void 0:e.name}`,yY=e=>`باز کردن ${e==null?void 0:e.name}`,xY=e=>`فتح ${e==null?void 0:e.name}`,wY=e=>`Abrir ${e==null?void 0:e.name}`,kY=e=>`${e==null?void 0:e.name} खोलें`,SY=((e,n={})=>{const t=n.locale??z();return t==="zh-CN"?bY(e):t==="fa"?yY(e):t==="ar"?xY(e):t==="es"?wY(e):t==="hi"?kY(e):vY(e)}),CY=e=>`Open logs for run ${e==null?void 0:e.run}`,EY=e=>`打开运行 ${e==null?void 0:e.run} 的日志`,NY=e=>`باز کردن گزارش‌های اجرای ${e==null?void 0:e.run}`,zY=e=>`فتح سجلات التشغيل ${e==null?void 0:e.run}`,jY=e=>`Abrir los logs de la ejecución ${e==null?void 0:e.run}`,TY=e=>`रन ${e==null?void 0:e.run} के लॉग खोलें`,AY=((e,n={})=>{const t=n.locale??z();return t==="zh-CN"?EY(e):t==="fa"?NY(e):t==="ar"?zY(e):t==="es"?jY(e):t==="hi"?TY(e):CY(e)}),RY=e=>`Open ${e==null?void 0:e.name} on GitHub`,MY=e=>`在 GitHub 上打开 ${e==null?void 0:e.name}`,OY=e=>`باز کردن ${e==null?void 0:e.name} در GitHub`,DY=e=>`فتح ${e==null?void 0:e.name} على GitHub`,LY=e=>`Abrir ${e==null?void 0:e.name} en GitHub`,IY=e=>`${e==null?void 0:e.name} को GitHub पर खोलें`,hv=((e,n={})=>{const t=n.locale??z();return t==="zh-CN"?MY(e):t==="fa"?OY(e):t==="ar"?DY(e):t==="es"?LY(e):t==="hi"?IY(e):RY(e)}),$Y=e=>`Open logs for run ${e==null?void 0:e.id} in the right pane`,BY=e=>`在右侧面板中打开运行 ${e==null?void 0:e.id} 的日志`,PY=e=>`باز کردن گزارش اجرای ${e==null?void 0:e.id} در پنل سمت راست`,FY=e=>`فتح سجلات التشغيل ${e==null?void 0:e.id} في الجزء الأيمن`,HY=e=>`Abrir los logs de la ejecución ${e==null?void 0:e.id} en el panel derecho`,qY=e=>`दाएं पैनल में रन ${e==null?void 0:e.id} के लॉग खोलें`,UY=((e,n={})=>{const t=n.locale??z();return t==="zh-CN"?BY(e):t==="fa"?PY(e):t==="ar"?FY(e):t==="es"?HY(e):t==="hi"?qY(e):$Y(e)}),GY=e=>`Overleaf — ${e==null?void 0:e.status}`,VY=e=>`Overleaf — ${e==null?void 0:e.status}`,KY=e=>`Overleaf — ${e==null?void 0:e.status}`,WY=e=>`Overleaf — ${e==null?void 0:e.status}`,QY=e=>`Overleaf — ${e==null?void 0:e.status}`,XY=e=>`Overleaf — ${e==null?void 0:e.status}`,YY=((e,n={})=>{const t=n.locale??z();return t==="zh-CN"?VY(e):t==="fa"?KY(e):t==="ar"?WY(e):t==="es"?QY(e):t==="hi"?XY(e):GY(e)}),ZY=e=>`Preview /${e==null?void 0:e.name} skill`,JY=e=>`预览 /${e==null?void 0:e.name} 技能`,eZ=e=>`پیش‌نمایش مهارت ‎/${e==null?void 0:e.name}`,tZ=e=>`معاينة مهارة /${e==null?void 0:e.name}`,nZ=e=>`Vista previa de la skill /${e==null?void 0:e.name}`,rZ=e=>`/${e==null?void 0:e.name} स्किल का पूर्वावलोकन करें`,sZ=((e,n={})=>{const t=n.locale??z();return t==="zh-CN"?JY(e):t==="fa"?eZ(e):t==="ar"?tZ(e):t==="es"?nZ(e):t==="hi"?rZ(e):ZY(e)}),iZ=e=>`Remove annotation ${e==null?void 0:e.number}`,aZ=e=>`移除批注 ${e==null?void 0:e.number}`,oZ=e=>`حذف یادداشت ${e==null?void 0:e.number}`,lZ=e=>`إزالة التعليق ${e==null?void 0:e.number}`,cZ=e=>`Quitar la anotación ${e==null?void 0:e.number}`,uZ=e=>`एनोटेशन ${e==null?void 0:e.number} हटाएं`,_Z=((e,n={})=>{const t=n.locale??z();return t==="zh-CN"?aZ(e):t==="fa"?oZ(e):t==="ar"?lZ(e):t==="es"?cZ(e):t==="hi"?uZ(e):iZ(e)}),fZ=e=>`Remove ${e==null?void 0:e.name}`,dZ=e=>`移除 ${e==null?void 0:e.name}`,hZ=e=>`حذف ${e==null?void 0:e.name}`,pZ=e=>`إزالة ${e==null?void 0:e.name}`,mZ=e=>`Quitar ${e==null?void 0:e.name}`,gZ=e=>`${e==null?void 0:e.name} हटाएं`,vZ=((e,n={})=>{const t=n.locale??z();return t==="zh-CN"?dZ(e):t==="fa"?hZ(e):t==="ar"?pZ(e):t==="es"?mZ(e):t==="hi"?gZ(e):fZ(e)}),bZ=e=>`Remove queued message: ${e==null?void 0:e.text}`,yZ=e=>`移除排队消息:${e==null?void 0:e.text}`,xZ=e=>`حذف پیام صف: ${e==null?void 0:e.text}`,wZ=e=>`إزالة الرسالة من قائمة الانتظار: ${e==null?void 0:e.text}`,kZ=e=>`Quitar el mensaje en cola: ${e==null?void 0:e.text}`,SZ=e=>`कतार में लगा संदेश हटाएं: ${e==null?void 0:e.text}`,CZ=((e,n={})=>{const t=n.locale??z();return t==="zh-CN"?yZ(e):t==="fa"?xZ(e):t==="ar"?wZ(e):t==="es"?kZ(e):t==="hi"?SZ(e):bZ(e)}),EZ=e=>`Retry queued message: ${e==null?void 0:e.text}`,NZ=e=>`重试排队消息:${e==null?void 0:e.text}`,zZ=e=>`تلاش دوباره برای پیام صف: ${e==null?void 0:e.text}`,jZ=e=>`إعادة محاولة إرسال الرسالة في قائمة الانتظار: ${e==null?void 0:e.text}`,TZ=e=>`Reintentar el mensaje en cola: ${e==null?void 0:e.text}`,AZ=e=>`कतार में लगा संदेश फिर से भेजें: ${e==null?void 0:e.text}`,RZ=((e,n={})=>{const t=n.locale??z();return t==="zh-CN"?NZ(e):t==="fa"?zZ(e):t==="ar"?jZ(e):t==="es"?TZ(e):t==="hi"?AZ(e):EZ(e)}),MZ=e=>`Run ${e==null?void 0:e.value} in a terminal here`,OZ=e=>`在此处的终端中运行 ${e==null?void 0:e.value}`,DZ=e=>`اجرای ${e==null?void 0:e.value} در ترمینال همین‌جا`,LZ=e=>`تشغيل ${e==null?void 0:e.value} في طرفية هنا`,IZ=e=>`Ejecutar ${e==null?void 0:e.value} en una terminal aquí`,$Z=e=>`${e==null?void 0:e.value} को यहाँ टर्मिनल में चलाएँ`,zE=((e,n={})=>{const t=n.locale??z();return t==="zh-CN"?OZ(e):t==="fa"?DZ(e):t==="ar"?LZ(e):t==="es"?IZ(e):t==="hi"?$Z(e):MZ(e)}),BZ=e=>`Run ${e==null?void 0:e.id}`,PZ=e=>`运行 ${e==null?void 0:e.id}`,FZ=e=>`اجرای ${e==null?void 0:e.id}`,HZ=e=>`تشغيل ${e==null?void 0:e.id}`,qZ=e=>`Ejecución ${e==null?void 0:e.id}`,UZ=e=>`रन ${e==null?void 0:e.id}`,GZ=((e,n={})=>{const t=n.locale??z();return t==="zh-CN"?PZ(e):t==="fa"?FZ(e):t==="ar"?HZ(e):t==="es"?qZ(e):t==="hi"?UZ(e):BZ(e)}),VZ=e=>`Show error details for ${e==null?void 0:e.activity}`,KZ=e=>`显示 ${e==null?void 0:e.activity} 的错误详情`,WZ=e=>`نمایش جزئیات خطای ${e==null?void 0:e.activity}`,QZ=e=>`عرض تفاصيل الخطأ لـ ${e==null?void 0:e.activity}`,XZ=e=>`Mostrar los detalles del error de ${e==null?void 0:e.activity}`,YZ=e=>`${e==null?void 0:e.activity} के लिए त्रुटि विवरण दिखाएं`,ZZ=((e,n={})=>{const t=n.locale??z();return t==="zh-CN"?KZ(e):t==="fa"?WZ(e):t==="ar"?QZ(e):t==="es"?XZ(e):t==="hi"?YZ(e):VZ(e)}),JZ=e=>`Show ${e==null?void 0:e.count} more ${e==null?void 0:e.target}`,eJ=e=>`再显示 ${e==null?void 0:e.count} 个${e==null?void 0:e.target}`,tJ=e=>`نمایش ${e==null?void 0:e.count} مورد دیگر از ${e==null?void 0:e.target}`,nJ=e=>`عرض المزيد من ${e==null?void 0:e.target} (${e==null?void 0:e.count})`,rJ=e=>`Mostrar ${e==null?void 0:e.count} ${e==null?void 0:e.target} más`,sJ=e=>`${e==null?void 0:e.count} और ${e==null?void 0:e.target} दिखाएं`,iJ=((e,n={})=>{const t=n.locale??z();return t==="zh-CN"?eJ(e):t==="fa"?tJ(e):t==="ar"?nJ(e):t==="es"?rJ(e):t==="hi"?sJ(e):JZ(e)}),aJ=e=>`${e==null?void 0:e.name} skill`,oJ=e=>`${e==null?void 0:e.name} 技能`,lJ=e=>`مهارت ${e==null?void 0:e.name}`,cJ=e=>`مهارة ${e==null?void 0:e.name}`,uJ=e=>`Skill ${e==null?void 0:e.name}`,_J=e=>`${e==null?void 0:e.name} स्किल`,fJ=((e,n={})=>{const t=n.locale??z();return t==="zh-CN"?oJ(e):t==="fa"?lJ(e):t==="ar"?cJ(e):t==="es"?uJ(e):t==="hi"?_J(e):aJ(e)}),dJ=e=>`Value for ${e==null?void 0:e.name}`,hJ=e=>`${e==null?void 0:e.name} 的值`,pJ=e=>`مقدار ${e==null?void 0:e.name}`,mJ=e=>`قيمة ${e==null?void 0:e.name}`,gJ=e=>`Valor de ${e==null?void 0:e.name}`,vJ=e=>`${e==null?void 0:e.name} के लिए वैल्यू`,bJ=((e,n={})=>{const t=n.locale??z();return t==="zh-CN"?hJ(e):t==="fa"?pJ(e):t==="ar"?mJ(e):t==="es"?gJ(e):t==="hi"?vJ(e):dJ(e)}),yJ=()=>"Agent reported back",xJ=()=>"智能体已返回结果",wJ=()=>"عامل نتیجه را گزارش کرد",kJ=()=>"أبلغ الوكيل بالنتيجة",SJ=()=>"El agente informó de los resultados",CJ=()=>"एजेंट ने रिपोर्ट भेजी",EJ=((e={},n={})=>{const t=n.locale??z();return t==="zh-CN"?xJ():t==="fa"?wJ():t==="ar"?kJ():t==="es"?SJ():t==="hi"?CJ():yJ()}),NJ=()=>"Browse",zJ=()=>"浏览",jJ=()=>"مرور",TJ=()=>"تصفّح",AJ=()=>"Navegar",RJ=()=>"ब्राउज़ करें",MJ=((e={},n={})=>{const t=n.locale??z();return t==="zh-CN"?zJ():t==="fa"?jJ():t==="ar"?TJ():t==="es"?AJ():t==="hi"?RJ():NJ()}),OJ=()=>"Browsing…",DJ=()=>"正在浏览…",LJ=()=>"در حال مرور…",IJ=()=>"جارٍ التصفّح…",$J=()=>"Navegando…",BJ=()=>"ब्राउज़ कर रहा है…",PJ=((e={},n={})=>{const t=n.locale??z();return t==="zh-CN"?DJ():t==="fa"?LJ():t==="ar"?IJ():t==="es"?$J():t==="hi"?BJ():OJ()}),FJ=()=>"Checked experiment status and updated notes",HJ=()=>"已检查实验状态并更新笔记",qJ=()=>"وضعیت آزمایش بررسی و یادداشت‌ها به‌روز شد",UJ=()=>"فحص حالة التجربة وحدّث الملاحظات",GJ=()=>"Consultó el estado del experimento y actualizó las notas",VJ=()=>"प्रयोग की स्थिति जाँची और नोट्स अपडेट किए",KJ=((e={},n={})=>{const t=n.locale??z();return t==="zh-CN"?HJ():t==="fa"?qJ():t==="ar"?UJ():t==="es"?GJ():t==="hi"?VJ():FJ()}),WJ=()=>"Closed an agent",QJ=()=>"已关闭智能体",XJ=()=>"عامل بسته شد",YJ=()=>"أغلق وكيلًا",ZJ=()=>"Cerró un agente",JJ=()=>"एक एजेंट बंद किया",eee=((e={},n={})=>{const t=n.locale??z();return t==="zh-CN"?QJ():t==="fa"?XJ():t==="ar"?YJ():t==="es"?ZJ():t==="hi"?JJ():WJ()}),tee=()=>"Compacted context",nee=()=>"上下文已压缩",ree=()=>"زمینه فشرده شد",see=()=>"ضغط السياق",iee=()=>"Compactó el contexto",aee=()=>"कॉन्टेक्स्ट संक्षिप्त किया",oee=((e={},n={})=>{const t=n.locale??z();return t==="zh-CN"?nee():t==="fa"?ree():t==="ar"?see():t==="es"?iee():t==="hi"?aee():tee()}),lee=()=>"Compacting context…",cee=()=>"正在压缩上下文…",uee=()=>"در حال فشرده‌سازی زمینه…",_ee=()=>"جارٍ ضغط السياق…",fee=()=>"Compactando el contexto…",dee=()=>"कॉन्टेक्स्ट संक्षिप्त हो रहा है…",hee=((e={},n={})=>{const t=n.locale??z();return t==="zh-CN"?cee():t==="fa"?uee():t==="ar"?_ee():t==="es"?fee():t==="hi"?dee():lee()}),pee=e=>`Created ${e==null?void 0:e.target}`,mee=e=>`已创建 ${e==null?void 0:e.target}`,gee=e=>`${e==null?void 0:e.target} ایجاد شد`,vee=e=>`أنشأ ${e==null?void 0:e.target}`,bee=e=>`Creó ${e==null?void 0:e.target}`,yee=e=>`${e==null?void 0:e.target} बनाया`,xee=((e,n={})=>{const t=n.locale??z();return t==="zh-CN"?mee(e):t==="fa"?gee(e):t==="ar"?vee(e):t==="es"?bee(e):t==="hi"?yee(e):pee(e)}),wee=()=>"Delegate",kee=()=>"委派",See=()=>"واگذاری",Cee=()=>"تفويض",Eee=()=>"Delegar",Nee=()=>"सौंपें",zee=((e={},n={})=>{const t=n.locale??z();return t==="zh-CN"?kee():t==="fa"?See():t==="ar"?Cee():t==="es"?Eee():t==="hi"?Nee():wee()}),jee=()=>"Delegating…",Tee=()=>"正在委派…",Aee=()=>"در حال واگذاری…",Ree=()=>"جارٍ التفويض…",Mee=()=>"Delegando…",Oee=()=>"सौंप रहा है…",Dee=((e={},n={})=>{const t=n.locale??z();return t==="zh-CN"?Tee():t==="fa"?Aee():t==="ar"?Ree():t==="es"?Mee():t==="hi"?Oee():jee()}),Lee=e=>`Deleted ${e==null?void 0:e.target}`,Iee=e=>`已删除 ${e==null?void 0:e.target}`,$ee=e=>`${e==null?void 0:e.target} حذف شد`,Bee=e=>`حذف ${e==null?void 0:e.target}`,Pee=e=>`Eliminó ${e==null?void 0:e.target}`,Fee=e=>`${e==null?void 0:e.target} हटाया`,Hee=((e,n={})=>{const t=n.locale??z();return t==="zh-CN"?Iee(e):t==="fa"?$ee(e):t==="ar"?Bee(e):t==="es"?Pee(e):t==="hi"?Fee(e):Lee(e)}),qee=()=>"Edit",Uee=()=>"编辑",Gee=()=>"ویرایش",Vee=()=>"تعديل",Kee=()=>"Editar",Wee=()=>"संपादित करें",Qee=((e={},n={})=>{const t=n.locale??z();return t==="zh-CN"?Uee():t==="fa"?Gee():t==="ar"?Vee():t==="es"?Kee():t==="hi"?Wee():qee()}),Xee=e=>`Edited ${e==null?void 0:e.target}`,Yee=e=>`已编辑 ${e==null?void 0:e.target}`,Zee=e=>`${e==null?void 0:e.target} ویرایش شد`,Jee=e=>`عدّل ${e==null?void 0:e.target}`,ete=e=>`Editó ${e==null?void 0:e.target}`,tte=e=>`${e==null?void 0:e.target} संपादित किया`,nte=((e,n={})=>{const t=n.locale??z();return t==="zh-CN"?Yee(e):t==="fa"?Zee(e):t==="ar"?Jee(e):t==="es"?ete(e):t==="hi"?tte(e):Xee(e)}),rte=()=>"Editing…",ste=()=>"正在编辑…",ite=()=>"در حال ویرایش…",ate=()=>"جارٍ التعديل…",ote=()=>"Editando…",lte=()=>"संपादित कर रहा है…",cte=((e={},n={})=>{const t=n.locale??z();return t==="zh-CN"?ste():t==="fa"?ite():t==="ar"?ate():t==="es"?ote():t==="hi"?lte():rte()}),ute=e=>`${e==null?void 0:e.activity} for “${e==null?void 0:e.query}”`,_te=e=>`${e==null?void 0:e.activity}:“${e==null?void 0:e.query}”`,fte=e=>`${e==null?void 0:e.activity}: «${e==null?void 0:e.query}»`,dte=e=>`${e==null?void 0:e.activity} عن «${e==null?void 0:e.query}»`,hte=e=>`${e==null?void 0:e.activity}: “${e==null?void 0:e.query}”`,pte=e=>`“${e==null?void 0:e.query}” के लिए ${e==null?void 0:e.activity}`,mte=((e,n={})=>{const t=n.locale??z();return t==="zh-CN"?_te(e):t==="fa"?fte(e):t==="ar"?dte(e):t==="es"?hte(e):t==="hi"?pte(e):ute(e)}),gte=e=>`Listed files matching ${e==null?void 0:e.pattern}`,vte=e=>`已列出与 ${e==null?void 0:e.pattern} 匹配的文件`,bte=e=>`فایل‌های مطابق ${e==null?void 0:e.pattern} فهرست شد`,yte=e=>`سرد الملفات المطابقة لـ ${e==null?void 0:e.pattern}`,xte=e=>`Listó archivos que coinciden con ${e==null?void 0:e.pattern}`,wte=e=>`${e==null?void 0:e.pattern} से मेल खाती फ़ाइलों की सूची बनाई`,kte=((e,n={})=>{const t=n.locale??z();return t==="zh-CN"?vte(e):t==="fa"?bte(e):t==="ar"?yte(e):t==="es"?xte(e):t==="hi"?wte(e):gte(e)}),Ste=()=>"Load",Cte=()=>"加载",Ete=()=>"بارگیری",Nte=()=>"تحميل",zte=()=>"Cargar",jte=()=>"लोड करें",Tte=((e={},n={})=>{const t=n.locale??z();return t==="zh-CN"?Cte():t==="fa"?Ete():t==="ar"?Nte():t==="es"?zte():t==="hi"?jte():Ste()}),Ate=()=>"Loaded a skill",Rte=()=>"已加载技能",Mte=()=>"یک مهارت بارگیری شد",Ote=()=>"حمّل مهارة",Dte=()=>"Cargó una skill",Lte=()=>"एक स्किल लोड की",Ite=((e={},n={})=>{const t=n.locale??z();return t==="zh-CN"?Rte():t==="fa"?Mte():t==="ar"?Ote():t==="es"?Dte():t==="hi"?Lte():Ate()}),$te=e=>`Loaded ${e==null?void 0:e.name} skill`,Bte=e=>`已加载技能 ${e==null?void 0:e.name}`,Pte=e=>`مهارت ${e==null?void 0:e.name} بارگیری شد`,Fte=e=>`حمّل مهارة ${e==null?void 0:e.name}`,Hte=e=>`Cargó la skill ${e==null?void 0:e.name}`,qte=e=>`${e==null?void 0:e.name} स्किल लोड की`,Ute=((e,n={})=>{const t=n.locale??z();return t==="zh-CN"?Bte(e):t==="fa"?Pte(e):t==="ar"?Fte(e):t==="es"?Hte(e):t==="hi"?qte(e):$te(e)}),Gte=()=>"Loading…",Vte=()=>"正在加载…",Kte=()=>"در حال بارگیری…",Wte=()=>"جارٍ التحميل…",Qte=()=>"Cargando…",Xte=()=>"लोड हो रहा है…",Yte=((e={},n={})=>{const t=n.locale??z();return t==="zh-CN"?Vte():t==="fa"?Kte():t==="ar"?Wte():t==="es"?Qte():t==="hi"?Xte():Gte()}),Zte=e=>`Opened ${e==null?void 0:e.target}`,Jte=e=>`已打开 ${e==null?void 0:e.target}`,ene=e=>`${e==null?void 0:e.target} باز شد`,tne=e=>`فتح ${e==null?void 0:e.target}`,nne=e=>`Abrió ${e==null?void 0:e.target}`,rne=e=>`${e==null?void 0:e.target} खोला`,sne=((e,n={})=>{const t=n.locale??z();return t==="zh-CN"?Jte(e):t==="fa"?ene(e):t==="ar"?tne(e):t==="es"?nne(e):t==="hi"?rne(e):Zte(e)}),ine=e=>`Ran ${e==null?void 0:e.command}`,ane=e=>`已运行 ${e==null?void 0:e.command}`,one=e=>`${e==null?void 0:e.command} اجرا شد`,lne=e=>`نفّذ ${e==null?void 0:e.command}`,cne=e=>`Ejecutó ${e==null?void 0:e.command}`,une=e=>`${e==null?void 0:e.command} चलाया`,_ne=((e,n={})=>{const t=n.locale??z();return t==="zh-CN"?ane(e):t==="fa"?one(e):t==="ar"?lne(e):t==="es"?cne(e):t==="hi"?une(e):ine(e)}),fne=()=>"Ran a sub-agent",dne=()=>"已运行子智能体",hne=()=>"یک عامل فرعی اجرا شد",pne=()=>"شغّل وكيلًا فرعيًا",mne=()=>"Ejecutó un subagente",gne=()=>"एक सब-एजेंट चलाया",vne=((e={},n={})=>{const t=n.locale??z();return t==="zh-CN"?dne():t==="fa"?hne():t==="ar"?pne():t==="es"?mne():t==="hi"?gne():fne()}),bne=()=>"Read",yne=()=>"读取",xne=()=>"خواندن",wne=()=>"قراءة",kne=()=>"Leer",Sne=()=>"पढ़ें",Cne=((e={},n={})=>{const t=n.locale??z();return t==="zh-CN"?yne():t==="fa"?xne():t==="ar"?wne():t==="es"?kne():t==="hi"?Sne():bne()}),Ene=()=>"Read experiment notes",Nne=()=>"已读取实验笔记",zne=()=>"یادداشت‌های آزمایش خوانده شد",jne=()=>"قرأ ملاحظات التجربة",Tne=()=>"Leyó las notas del experimento",Ane=()=>"प्रयोग के नोट्स पढ़े",Rne=((e={},n={})=>{const t=n.locale??z();return t==="zh-CN"?Nne():t==="fa"?zne():t==="ar"?jne():t==="es"?Tne():t==="hi"?Ane():Ene()}),Mne=()=>"Read a paper",One=()=>"已读取论文",Dne=()=>"یک مقاله خوانده شد",Lne=()=>"قرأ ورقة",Ine=()=>"Leyó un paper",$ne=()=>"एक पेपर पढ़ा",Bne=((e={},n={})=>{const t=n.locale??z();return t==="zh-CN"?One():t==="fa"?Dne():t==="ar"?Lne():t==="es"?Ine():t==="hi"?$ne():Mne()}),Pne=e=>`Read ${e==null?void 0:e.name} skill`,Fne=e=>`已读取技能 ${e==null?void 0:e.name}`,Hne=e=>`مهارت ${e==null?void 0:e.name} خوانده شد`,qne=e=>`قرأ مهارة ${e==null?void 0:e.name}`,Une=e=>`Leyó la skill ${e==null?void 0:e.name}`,Gne=e=>`${e==null?void 0:e.name} स्किल पढ़ी`,B2=((e,n={})=>{const t=n.locale??z();return t==="zh-CN"?Fne(e):t==="fa"?Hne(e):t==="ar"?qne(e):t==="es"?Une(e):t==="hi"?Gne(e):Pne(e)}),Vne=e=>`Read ${e==null?void 0:e.target}`,Kne=e=>`已读取 ${e==null?void 0:e.target}`,Wne=e=>`${e==null?void 0:e.target} خوانده شد`,Qne=e=>`قرأ ${e==null?void 0:e.target}`,Xne=e=>`Leyó ${e==null?void 0:e.target}`,Yne=e=>`${e==null?void 0:e.target} पढ़ा`,kp=((e,n={})=>{const t=n.locale??z();return t==="zh-CN"?Kne(e):t==="fa"?Wne(e):t==="ar"?Qne(e):t==="es"?Xne(e):t==="hi"?Yne(e):Vne(e)}),Zne=()=>"Read a web page",Jne=()=>"已读取网页",ere=()=>"یک صفحهٔ وب خوانده شد",tre=()=>"قرأ صفحة ويب",nre=()=>"Leyó una página web",rre=()=>"एक वेब पेज पढ़ा",sre=((e={},n={})=>{const t=n.locale??z();return t==="zh-CN"?Jne():t==="fa"?ere():t==="ar"?tre():t==="es"?nre():t==="hi"?rre():Zne()}),ire=()=>"Reading…",are=()=>"正在读取…",ore=()=>"در حال خواندن…",lre=()=>"جارٍ القراءة…",cre=()=>"Leyendo…",ure=()=>"पढ़ रहा है…",_re=((e={},n={})=>{const t=n.locale??z();return t==="zh-CN"?are():t==="fa"?ore():t==="ar"?lre():t==="es"?cre():t==="hi"?ure():ire()}),fre=()=>"Resumed an agent",dre=()=>"已恢复智能体",hre=()=>"عامل از سر گرفته شد",pre=()=>"استأنف عمل وكيل",mre=()=>"Reanudó un agente",gre=()=>"एक एजेंट फिर से शुरू किया",vre=((e={},n={})=>{const t=n.locale??z();return t==="zh-CN"?dre():t==="fa"?hre():t==="ar"?pre():t==="es"?mre():t==="hi"?gre():fre()}),bre=()=>"Review",yre=()=>"查看",xre=()=>"بازبینی",wre=()=>"مراجعة",kre=()=>"Revisar",Sre=()=>"समीक्षा करें",Cre=((e={},n={})=>{const t=n.locale??z();return t==="zh-CN"?yre():t==="fa"?xre():t==="ar"?wre():t==="es"?kre():t==="hi"?Sre():bre()}),Ere=()=>"Reviewed run log",Nre=()=>"已查看运行日志",zre=()=>"گزارش اجرا بازبینی شد",jre=()=>"راجع سجل التشغيل",Tre=()=>"Revisó el log de la ejecución",Are=()=>"रन लॉग की समीक्षा की",Rre=((e={},n={})=>{const t=n.locale??z();return t==="zh-CN"?Nre():t==="fa"?zre():t==="ar"?jre():t==="es"?Tre():t==="hi"?Are():Ere()}),Mre=()=>"Reviewed run logs",Ore=()=>"已查看运行日志",Dre=()=>"گزارش‌های اجرا بازبینی شد",Lre=()=>"راجع سجلات التشغيل",Ire=()=>"Revisó los logs de las ejecuciones",$re=()=>"रन लॉग की समीक्षा की",Bre=((e={},n={})=>{const t=n.locale??z();return t==="zh-CN"?Ore():t==="fa"?Dre():t==="ar"?Lre():t==="es"?Ire():t==="hi"?$re():Mre()}),Pre=()=>"Reviewed experiment status and notes",Fre=()=>"已查看实验状态和笔记",Hre=()=>"وضعیت و یادداشت‌های آزمایش بازبینی شد",qre=()=>"راجع حالة التجربة وملاحظاتها",Ure=()=>"Revisó el estado y las notas del experimento",Gre=()=>"प्रयोग की स्थिति और नोट्स की समीक्षा की",Vre=((e={},n={})=>{const t=n.locale??z();return t==="zh-CN"?Fre():t==="fa"?Hre():t==="ar"?qre():t==="es"?Ure():t==="hi"?Gre():Pre()}),Kre=()=>"Reviewing…",Wre=()=>"正在查看…",Qre=()=>"در حال بازبینی…",Xre=()=>"جارٍ المراجعة…",Yre=()=>"Revisando…",Zre=()=>"समीक्षा कर रहा है…",Jre=((e={},n={})=>{const t=n.locale??z();return t==="zh-CN"?Wre():t==="fa"?Qre():t==="ar"?Xre():t==="es"?Yre():t==="hi"?Zre():Kre()}),ese=()=>"Run",tse=()=>"运行",nse=()=>"اجرا",rse=()=>"تشغيل",sse=()=>"Ejecutar",ise=()=>"चलाएं",ase=((e={},n={})=>{const t=n.locale??z();return t==="zh-CN"?tse():t==="fa"?nse():t==="ar"?rse():t==="es"?sse():t==="hi"?ise():ese()}),ose=()=>"Running…",lse=()=>"正在运行…",cse=()=>"در حال اجرا…",use=()=>"جارٍ التشغيل…",_se=()=>"Ejecutando…",fse=()=>"चल रहा है…",YO=((e={},n={})=>{const t=n.locale??z();return t==="zh-CN"?lse():t==="fa"?cse():t==="ar"?use():t==="es"?_se():t==="hi"?fse():ose()}),dse=()=>"Search",hse=()=>"搜索",pse=()=>"جست‌وجو",mse=()=>"بحث",gse=()=>"Buscar",vse=()=>"खोजें",bse=((e={},n={})=>{const t=n.locale??z();return t==="zh-CN"?hse():t==="fa"?pse():t==="ar"?mse():t==="es"?gse():t==="hi"?vse():dse()}),yse=()=>"Searched alphaXiv full text",xse=()=>"已搜索 alphaXiv 全文",wse=()=>"متن کامل alphaXiv جست‌وجو شد",kse=()=>"بحث في نص alphaXiv الكامل",Sse=()=>"Buscó en el texto completo de alphaXiv",Cse=()=>"alphaXiv का पूरा टेक्स्ट खोजा",Ese=((e={},n={})=>{const t=n.locale??z();return t==="zh-CN"?xse():t==="fa"?wse():t==="ar"?kse():t==="es"?Sse():t==="hi"?Cse():yse()}),Nse=()=>"Searched alphaXiv semantically",zse=()=>"已对 alphaXiv 进行语义搜索",jse=()=>"جست‌وجوی معنایی در alphaXiv انجام شد",Tse=()=>"أجرى بحثًا دلاليًا في alphaXiv",Ase=()=>"Hizo una búsqueda semántica en alphaXiv",Rse=()=>"alphaXiv को सिमेंटिक रूप से खोजा",Mse=((e={},n={})=>{const t=n.locale??z();return t==="zh-CN"?zse():t==="fa"?jse():t==="ar"?Tse():t==="es"?Ase():t==="hi"?Rse():Nse()}),Ose=()=>"Searched bioRxiv",Dse=()=>"已搜索 bioRxiv",Lse=()=>"bioRxiv جست‌وجو شد",Ise=()=>"بحث في bioRxiv",$se=()=>"Buscó en bioRxiv",Bse=()=>"bioRxiv खोजा",Pse=((e={},n={})=>{const t=n.locale??z();return t==="zh-CN"?Dse():t==="fa"?Lse():t==="ar"?Ise():t==="es"?$se():t==="hi"?Bse():Ose()}),Fse=()=>"Searched code",Hse=()=>"已搜索代码",qse=()=>"کد جست‌وجو شد",Use=()=>"بحث في الشيفرة",Gse=()=>"Buscó en el código",Vse=()=>"कोड खोजा",P2=((e={},n={})=>{const t=n.locale??z();return t==="zh-CN"?Hse():t==="fa"?qse():t==="ar"?Use():t==="es"?Gse():t==="hi"?Vse():Fse()}),Kse=e=>`Searched code for “${e==null?void 0:e.pattern}”`,Wse=e=>`已在代码中搜索“${e==null?void 0:e.pattern}”`,Qse=e=>`کد برای «${e==null?void 0:e.pattern}» جست‌وجو شد`,Xse=e=>`بحث في الشيفرة عن «${e==null?void 0:e.pattern}»`,Yse=e=>`Buscó “${e==null?void 0:e.pattern}” en el código`,Zse=e=>`“${e==null?void 0:e.pattern}” के लिए कोड खोजा`,F2=((e,n={})=>{const t=n.locale??z();return t==="zh-CN"?Wse(e):t==="fa"?Qse(e):t==="ar"?Xse(e):t==="es"?Yse(e):t==="hi"?Zse(e):Kse(e)}),Jse=e=>`Searched images for “${e==null?void 0:e.query}”`,eie=e=>`已搜索图片“${e==null?void 0:e.query}”`,tie=e=>`تصاویر برای «${e==null?void 0:e.query}» جست‌وجو شد`,nie=e=>`بحث في الصور عن «${e==null?void 0:e.query}»`,rie=e=>`Buscó imágenes de “${e==null?void 0:e.query}”`,sie=e=>`“${e==null?void 0:e.query}” के लिए इमेज खोजीं`,iie=((e,n={})=>{const t=n.locale??z();return t==="zh-CN"?eie(e):t==="fa"?tie(e):t==="ar"?nie(e):t==="es"?rie(e):t==="hi"?sie(e):Jse(e)}),aie=()=>"Searched the literature",oie=()=>"已搜索文献",lie=()=>"منابع علمی جست‌وجو شد",cie=()=>"بحث في الأدبيات",uie=()=>"Buscó en la literatura",_ie=()=>"साहित्य खोजा",jE=((e={},n={})=>{const t=n.locale??z();return t==="zh-CN"?oie():t==="fa"?lie():t==="ar"?cie():t==="es"?uie():t==="hi"?_ie():aie()}),fie=e=>`Searched “${e==null?void 0:e.pattern}” on a page`,die=e=>`已在页面中搜索“${e==null?void 0:e.pattern}”`,hie=e=>`صفحه برای «${e==null?void 0:e.pattern}» جست‌وجو شد`,pie=e=>`بحث عن «${e==null?void 0:e.pattern}» في صفحة`,mie=e=>`Buscó “${e==null?void 0:e.pattern}” en una página`,gie=e=>`पेज पर “${e==null?void 0:e.pattern}” खोजा`,vie=((e,n={})=>{const t=n.locale??z();return t==="zh-CN"?die(e):t==="fa"?hie(e):t==="ar"?pie(e):t==="es"?mie(e):t==="hi"?gie(e):fie(e)}),bie=()=>"Searched OpenAlex",yie=()=>"已搜索 OpenAlex",xie=()=>"OpenAlex جست‌وجو شد",wie=()=>"بحث في OpenAlex",kie=()=>"Buscó en OpenAlex",Sie=()=>"OpenAlex खोजा",Cie=((e={},n={})=>{const t=n.locale??z();return t==="zh-CN"?yie():t==="fa"?xie():t==="ar"?wie():t==="es"?kie():t==="hi"?Sie():bie()}),Eie=e=>`Searched the web for “${e==null?void 0:e.query}”`,Nie=e=>`已在网页中搜索“${e==null?void 0:e.query}”`,zie=e=>`وب برای «${e==null?void 0:e.query}» جست‌وجو شد`,jie=e=>`بحث في الويب عن «${e==null?void 0:e.query}»`,Tie=e=>`Buscó “${e==null?void 0:e.query}” en la web`,Aie=e=>`“${e==null?void 0:e.query}” के लिए वेब खोजा`,TE=((e,n={})=>{const t=n.locale??z();return t==="zh-CN"?Nie(e):t==="fa"?zie(e):t==="ar"?jie(e):t==="es"?Tie(e):t==="hi"?Aie(e):Eie(e)}),Rie=e=>`Searched a web page for “${e==null?void 0:e.pattern}”`,Mie=e=>`已在网页中搜索“${e==null?void 0:e.pattern}”`,Oie=e=>`صفحهٔ وب برای «${e==null?void 0:e.pattern}» جست‌وجو شد`,Die=e=>`بحث في صفحة ويب عن «${e==null?void 0:e.pattern}»`,Lie=e=>`Buscó “${e==null?void 0:e.pattern}” en una página web`,Iie=e=>`“${e==null?void 0:e.pattern}” के लिए एक वेब पेज खोजा`,$ie=((e,n={})=>{const t=n.locale??z();return t==="zh-CN"?Mie(e):t==="fa"?Oie(e):t==="ar"?Die(e):t==="es"?Lie(e):t==="hi"?Iie(e):Rie(e)}),Bie=()=>"Searching…",Pie=()=>"正在搜索…",Fie=()=>"در حال جست‌وجو…",Hie=()=>"جارٍ البحث…",qie=()=>"Buscando…",Uie=()=>"खोज रहा है…",Gie=((e={},n={})=>{const t=n.locale??z();return t==="zh-CN"?Pie():t==="fa"?Fie():t==="ar"?Hie():t==="es"?qie():t==="hi"?Uie():Bie()}),Vie=()=>"Sent input to an agent",Kie=()=>"已向智能体发送输入",Wie=()=>"ورودی به عامل فرستاده شد",Qie=()=>"أرسل مدخلًا إلى وكيل",Xie=()=>"Envió información a un agente",Yie=()=>"एक एजेंट को इनपुट भेजा",Zie=((e={},n={})=>{const t=n.locale??z();return t==="zh-CN"?Kie():t==="fa"?Wie():t==="ar"?Qie():t==="es"?Xie():t==="hi"?Yie():Vie()}),Jie=()=>"Spawned an agent",eae=()=>"已创建智能体",tae=()=>"یک عامل ساخته شد",nae=()=>"أنشأ وكيلًا",rae=()=>"Creó un agente",sae=()=>"एक एजेंट शुरू किया",iae=((e={},n={})=>{const t=n.locale??z();return t==="zh-CN"?eae():t==="fa"?tae():t==="ar"?nae():t==="es"?rae():t==="hi"?sae():Jie()}),aae=()=>"Sub-agent",oae=()=>"子智能体",lae=()=>"عامل فرعی",cae=()=>"وكيل فرعي",uae=()=>"Subagente",_ae=()=>"सब-एजेंट",fae=((e={},n={})=>{const t=n.locale??z();return t==="zh-CN"?oae():t==="fa"?lae():t==="ar"?cae():t==="es"?uae():t==="hi"?_ae():aae()}),dae=()=>"Sub-agent interrupted",hae=()=>"子智能体已中断",pae=()=>"عامل فرعی متوقف شد",mae=()=>"قُوطع الوكيل الفرعي",gae=()=>"Subagente interrumpido",vae=()=>"सब-एजेंट बाधित हुआ",bae=((e={},n={})=>{const t=n.locale??z();return t==="zh-CN"?hae():t==="fa"?pae():t==="ar"?mae():t==="es"?gae():t==="hi"?vae():dae()}),yae=()=>"Sub-agent started",xae=()=>"子智能体已启动",wae=()=>"عامل فرعی آغاز شد",kae=()=>"بدأ الوكيل الفرعي",Sae=()=>"Subagente iniciado",Cae=()=>"सब-एजेंट शुरू हुआ",Eae=((e={},n={})=>{const t=n.locale??z();return t==="zh-CN"?xae():t==="fa"?wae():t==="ar"?kae():t==="es"?Sae():t==="hi"?Cae():yae()}),Nae=()=>"Updated experiment notes",zae=()=>"已更新实验笔记",jae=()=>"یادداشت‌های آزمایش به‌روز شد",Tae=()=>"حدّث ملاحظات التجربة",Aae=()=>"Actualizó las notas del experimento",Rae=()=>"प्रयोग के नोट्स अपडेट किए",Mae=((e={},n={})=>{const t=n.locale??z();return t==="zh-CN"?zae():t==="fa"?jae():t==="ar"?Tae():t==="es"?Aae():t==="hi"?Rae():Nae()}),Oae=()=>"Waiting on an agent",Dae=()=>"正在等待智能体",Lae=()=>"در انتظار عامل",Iae=()=>"في انتظار وكيل",$ae=()=>"Esperando a un agente",Bae=()=>"एजेंट का इंतज़ार है",Pae=((e={},n={})=>{const t=n.locale??z();return t==="zh-CN"?Dae():t==="fa"?Lae():t==="ar"?Iae():t==="es"?$ae():t==="hi"?Bae():Oae()}),Fae=e=>`Approval required: ${e==null?void 0:e.label}`,Hae=e=>`需要批准:${e==null?void 0:e.label}`,qae=e=>`نیازمند تأیید: ${e==null?void 0:e.label}`,Uae=e=>`الموافقة مطلوبة: ${e==null?void 0:e.label}`,Gae=e=>`Aprobación necesaria: ${e==null?void 0:e.label}`,Vae=e=>`स्वीकृति ज़रूरी है: ${e==null?void 0:e.label}`,AE=((e,n={})=>{const t=n.locale??z();return t==="zh-CN"?Hae(e):t==="fa"?qae(e):t==="ar"?Uae(e):t==="es"?Gae(e):t==="hi"?Vae(e):Fae(e)}),Kae=()=>"The CLI is retrying the turn.",Wae=()=>"CLI 正在重试本轮。",Qae=()=>"CLI در حال تلاش دوباره برای این نوبت است.",Xae=()=>"تحاول واجهة سطر الأوامر تنفيذ الجولة مجددًا.",Yae=()=>"La CLI está reintentando el turno.",Zae=()=>"CLI टर्न फिर से कोशिश कर रहा है।",Jae=((e={},n={})=>{const t=n.locale??z();return t==="zh-CN"?Wae():t==="fa"?Qae():t==="ar"?Xae():t==="es"?Yae():t==="hi"?Zae():Kae()}),eoe=()=>"Continue is available.",toe=()=>"可以继续。",noe=()=>"ادامه در دسترس است.",roe=()=>"المتابعة متاحة.",soe=()=>"Puedes continuar.",ioe=()=>"जारी रखना उपलब्ध है।",aoe=((e={},n={})=>{const t=n.locale??z();return t==="zh-CN"?toe():t==="fa"?noe():t==="ar"?roe():t==="es"?soe():t==="hi"?ioe():eoe()}),ooe=()=>"Retry is available.",loe=()=>"可以重试。",coe=()=>"تلاش دوباره در دسترس است.",uoe=()=>"إعادة المحاولة متاحة.",_oe=()=>"Puedes reintentarlo.",foe=()=>"फिर से कोशिश करना उपलब्ध है।",doe=((e={},n={})=>{const t=n.locale??z();return t==="zh-CN"?loe():t==="fa"?coe():t==="ar"?uoe():t==="es"?_oe():t==="hi"?foe():ooe()}),hoe=()=>"Running a tool",poe=()=>"正在运行工具",moe=()=>"در حال اجرای ابزار",goe=()=>"جارٍ تشغيل أداة",voe=()=>"Ejecutando una herramienta",boe=()=>"एक टूल चल रहा है",yoe=((e={},n={})=>{const t=n.locale??z();return t==="zh-CN"?poe():t==="fa"?moe():t==="ar"?goe():t==="es"?voe():t==="hi"?boe():hoe()}),xoe=()=>"Tool activity completed",woe=()=>"工具活动已完成",koe=()=>"فعالیت ابزار کامل شد",Soe=()=>"اكتمل نشاط الأداة",Coe=()=>"Actividad de la herramienta completada",Eoe=()=>"टूल गतिविधि पूरी हुई",Noe=((e={},n={})=>{const t=n.locale??z();return t==="zh-CN"?woe():t==="fa"?koe():t==="ar"?Soe():t==="es"?Coe():t==="hi"?Eoe():xoe()}),zoe=e=>`Tool activity failed: ${e==null?void 0:e.labels}`,joe=e=>`工具活动失败:${e==null?void 0:e.labels}`,Toe=e=>`فعالیت ابزار ناموفق بود: ${e==null?void 0:e.labels}`,Aoe=e=>`فشل نشاط الأداة: ${e==null?void 0:e.labels}`,Roe=e=>`Error en la actividad de la herramienta: ${e==null?void 0:e.labels}`,Moe=e=>`टूल गतिविधि विफल: ${e==null?void 0:e.labels}`,Ooe=((e,n={})=>{const t=n.locale??z();return t==="zh-CN"?joe(e):t==="fa"?Toe(e):t==="ar"?Aoe(e):t==="es"?Roe(e):t==="hi"?Moe(e):zoe(e)}),Doe=e=>`${e==null?void 0:e.count} tool activities failed: ${e==null?void 0:e.labels}`,Loe=e=>`${e==null?void 0:e.count} 个工具活动失败:${e==null?void 0:e.labels}`,Ioe=e=>`${e==null?void 0:e.count} فعالیت ابزار ناموفق بود: ${e==null?void 0:e.labels}`,$oe=e=>`فشل ${e==null?void 0:e.count} من أنشطة الأدوات: ${e==null?void 0:e.labels}`,Boe=e=>`Actividades de herramientas con error (${e==null?void 0:e.count}): ${e==null?void 0:e.labels}`,Poe=e=>`${e==null?void 0:e.count} टूल गतिविधियाँ विफल: ${e==null?void 0:e.labels}`,Foe=((e,n={})=>{const t=n.locale??z();return t==="zh-CN"?Loe(e):t==="fa"?Ioe(e):t==="ar"?$oe(e):t==="es"?Boe(e):t==="hi"?Poe(e):Doe(e)}),Hoe=()=>"Turn did not finish.",qoe=()=>"本轮未完成。",Uoe=()=>"این نوبت کامل نشد.",Goe=()=>"لم تكتمل الجولة.",Voe=()=>"El turno no terminó.",Koe=()=>"यह टर्न पूरा नहीं हुआ।",Woe=((e={},n={})=>{const t=n.locale??z();return t==="zh-CN"?qoe():t==="fa"?Uoe():t==="ar"?Goe():t==="es"?Voe():t==="hi"?Koe():Hoe()}),Qoe=()=>"Artifacts",Xoe=()=>"产物",Yoe=()=>"خروجی‌ها",Zoe=()=>"المُخرَجات",Joe=()=>"Artefactos",ele=()=>"आर्टिफ़ैक्ट",ZO=((e={},n={})=>{const t=n.locale??z();return t==="zh-CN"?Xoe():t==="fa"?Yoe():t==="ar"?Zoe():t==="es"?Joe():t==="hi"?ele():Qoe()}),tle=()=>"Close panel",nle=()=>"关闭面板",rle=()=>"بستن پنل",sle=()=>"إغلاق اللوحة",ile=()=>"Cerrar panel",ale=()=>"पैनल बंद करें",p0=((e={},n={})=>{const t=n.locale??z();return t==="zh-CN"?nle():t==="fa"?rle():t==="ar"?sle():t==="es"?ile():t==="hi"?ale():tle()}),ole=()=>"Current task",lle=()=>"当前任务",cle=()=>"وظیفهٔ فعلی",ule=()=>"المهمة الحالية",_le=()=>"Tarea actual",fle=()=>"मौजूदा टास्क",RE=((e={},n={})=>{const t=n.locale??z();return t==="zh-CN"?lle():t==="fa"?cle():t==="ar"?ule():t==="es"?_le():t==="hi"?fle():ole()}),dle=()=>"Drag to resize panel",hle=()=>"拖动以调整面板大小",ple=()=>"برای تغییر اندازهٔ پنل بکشید",mle=()=>"اسحب لتغيير حجم اللوحة",gle=()=>"Arrastra para cambiar el tamaño del panel",vle=()=>"पैनल का आकार बदलने के लिए खींचें",ble=((e={},n={})=>{const t=n.locale??z();return t==="zh-CN"?hle():t==="fa"?ple():t==="ar"?mle():t==="es"?gle():t==="hi"?vle():dle()}),yle=()=>"Drag toward the center to restore panel",xle=()=>"向中央拖动以恢复面板",wle=()=>"برای بازگرداندن پنل به‌سوی مرکز بکشید",kle=()=>"اسحب نحو المنتصف لاستعادة اللوحة",Sle=()=>"Arrastra hacia el centro para restaurar el panel",Cle=()=>"पैनल वापस लाने के लिए बीच की ओर खींचें",Ele=((e={},n={})=>{const t=n.locale??z();return t==="zh-CN"?xle():t==="fa"?wle():t==="ar"?kle():t==="es"?Sle():t==="hi"?Cle():yle()}),Nle=()=>"Entire project",zle=()=>"整个项目",jle=()=>"کل پروژه",Tle=()=>"المشروع بالكامل",Ale=()=>"Todo el proyecto",Rle=()=>"पूरा प्रोजेक्ट",ME=((e={},n={})=>{const t=n.locale??z();return t==="zh-CN"?zle():t==="fa"?jle():t==="ar"?Tle():t==="es"?Ale():t==="hi"?Rle():Nle()}),Mle=()=>"Expand panel",Ole=()=>"展开面板",Dle=()=>"گسترش پنل",Lle=()=>"توسيع اللوحة",Ile=()=>"Expandir panel",$le=()=>"पैनल फैलाएं",OE=((e={},n={})=>{const t=n.locale??z();return t==="zh-CN"?Ole():t==="fa"?Dle():t==="ar"?Lle():t==="es"?Ile():t==="hi"?$le():Mle()}),Ble=e=>`Experiment filter: ${e==null?void 0:e.scope}`,Ple=e=>`实验筛选:${e==null?void 0:e.scope}`,Fle=e=>`فیلتر آزمایش: ${e==null?void 0:e.scope}`,Hle=e=>`تصفية التجارب: ${e==null?void 0:e.scope}`,qle=e=>`Filtro de experimentos: ${e==null?void 0:e.scope}`,Ule=e=>`प्रयोग फ़िल्टर: ${e==null?void 0:e.scope}`,Gle=((e,n={})=>{const t=n.locale??z();return t==="zh-CN"?Ple(e):t==="fa"?Fle(e):t==="ar"?Hle(e):t==="es"?qle(e):t==="hi"?Ule(e):Ble(e)}),Vle=()=>"Experiment view",Kle=()=>"实验视图",Wle=()=>"نمای آزمایش",Qle=()=>"عرض التجربة",Xle=()=>"Vista de experimento",Yle=()=>"प्रयोग व्यू",Zle=((e={},n={})=>{const t=n.locale??z();return t==="zh-CN"?Kle():t==="fa"?Wle():t==="ar"?Qle():t==="es"?Xle():t==="hi"?Yle():Vle()}),Jle=()=>"Experiments",ece=()=>"实验",tce=()=>"آزمایش‌ها",nce=()=>"التجارب",rce=()=>"Experimentos",sce=()=>"प्रयोग",JO=((e={},n={})=>{const t=n.locale??z();return t==="zh-CN"?ece():t==="fa"?tce():t==="ar"?nce():t==="es"?rce():t==="hi"?sce():Jle()}),ice=()=>"Files",ace=()=>"文件",oce=()=>"فایل‌ها",lce=()=>"الملفات",cce=()=>"Archivos",uce=()=>"फ़ाइलें",X4=((e={},n={})=>{const t=n.locale??z();return t==="zh-CN"?ace():t==="fa"?oce():t==="ar"?lce():t==="es"?cce():t==="hi"?uce():ice()}),_ce=()=>"Filter experiments",fce=()=>"筛选实验",dce=()=>"فیلتر آزمایش‌ها",hce=()=>"تصفية التجارب",pce=()=>"Filtrar experimentos",mce=()=>"प्रयोग फ़िल्टर करें",gce=((e={},n={})=>{const t=n.locale??z();return t==="zh-CN"?fce():t==="fa"?dce():t==="ar"?hce():t==="es"?pce():t==="hi"?mce():_ce()}),vce=()=>"Current task filtering is unavailable for unattributed experiments",bce=()=>"存在无法归属的实验时,不能按当前任务筛选",yce=()=>"برای آزمایش‌های بدون وظیفه، فیلتر وظیفهٔ کنونی در دسترس نیست",xce=()=>"تصفية المهمة الحالية غير متاحة للتجارب غير المنسوبة",wce=()=>"No se puede filtrar por la tarea actual en experimentos sin tarea asignada",kce=()=>"बिना श्रेय वाले प्रयोगों के लिए मौजूदा टास्क फ़िल्टरिंग उपलब्ध नहीं है",Sce=((e={},n={})=>{const t=n.locale??z();return t==="zh-CN"?bce():t==="fa"?yce():t==="ar"?xce():t==="es"?wce():t==="hi"?kce():vce()}),Cce=()=>"No experiments from the current task yet. Switch to Entire project to see all experiments.",Ece=()=>"当前任务还没有实验。切换到“整个项目”即可查看所有实验。",Nce=()=>"وظیفهٔ کنونی هنوز آزمایشی ندارد. برای دیدن همهٔ آزمایش‌ها به «کل پروژه» بروید.",zce=()=>"لا توجد تجارب من المهمة الحالية بعد. بدّل إلى «المشروع بالكامل» لرؤية جميع التجارب.",jce=()=>"Aún no hay experimentos de la tarea actual. Cambia a Todo el proyecto para ver todos los experimentos.",Tce=()=>"मौजूदा टास्क से अभी तक कोई प्रयोग नहीं। सभी प्रयोग देखने के लिए पूरा प्रोजेक्ट पर स्विच करें।",Ace=((e={},n={})=>{const t=n.locale??z();return t==="zh-CN"?Ece():t==="fa"?Nce():t==="ar"?zce():t==="es"?jce():t==="hi"?Tce():Cce()}),Rce=()=>"Open a task to filter to its experiments",Mce=()=>"请打开一个任务以筛选其实验",Oce=()=>"برای محدود کردن آزمایش‌ها، یک وظیفه را باز کنید",Dce=()=>"افتح مهمة لعرض تجاربها فقط",Lce=()=>"Abre una tarea para filtrar por sus experimentos",Ice=()=>"इसके प्रयोगों तक फ़िल्टर करने के लिए एक टास्क खोलें",$ce=((e={},n={})=>{const t=n.locale??z();return t==="zh-CN"?Mce():t==="fa"?Oce():t==="ar"?Dce():t==="es"?Lce():t==="hi"?Ice():Rce()}),Bce=()=>"projects",Pce=()=>"项目",Fce=()=>"پروژه‌ها",Hce=()=>"المشاريع",qce=()=>"los proyectos",Uce=()=>"प्रोजेक्ट",Xp=((e={},n={})=>{const t=n.locale??z();return t==="zh-CN"?Pce():t==="fa"?Fce():t==="ar"?Hce():t==="es"?qce():t==="hi"?Uce():Bce()}),Gce=()=>"Restore panel",Vce=()=>"还原面板",Kce=()=>"بازگرداندن اندازهٔ پنل",Wce=()=>"استعادة اللوحة",Qce=()=>"Restaurar panel",Xce=()=>"पैनल वापस लाएं",DE=((e={},n={})=>{const t=n.locale??z();return t==="zh-CN"?Vce():t==="fa"?Kce():t==="ar"?Wce():t==="es"?Qce():t==="hi"?Xce():Gce()}),Yce=()=>"Retry",Zce=()=>"重试",Jce=()=>"تلاش دوباره",eue=()=>"إعادة المحاولة",tue=()=>"Reintentar",nue=()=>"फिर से कोशिश करें",Vs=((e={},n={})=>{const t=n.locale??z();return t==="zh-CN"?Zce():t==="fa"?Jce():t==="ar"?eue():t==="es"?tue():t==="hi"?nue():Yce()}),rue=()=>"Select a project to browse its files.",sue=()=>"选择一个项目以浏览其文件。",iue=()=>"برای مرور فایل‌ها، یک پروژه را انتخاب کنید.",aue=()=>"اختر مشروعًا لتصفح ملفاته.",oue=()=>"Selecciona un proyecto para explorar sus archivos.",lue=()=>"फ़ाइलें ब्राउज़ करने के लिए एक प्रोजेक्ट चुनें।",cue=((e={},n={})=>{const t=n.locale??z();return t==="zh-CN"?sue():t==="fa"?iue():t==="ar"?aue():t==="es"?oue():t==="hi"?lue():rue()}),uue=()=>"settings",_ue=()=>"设置",fue=()=>"تنظیمات",due=()=>"الإعدادات",hue=()=>"la configuración",pue=()=>"सेटिंग्स",mue=((e={},n={})=>{const t=n.locale??z();return t==="zh-CN"?_ue():t==="fa"?fue():t==="ar"?due():t==="es"?hue():t==="hi"?pue():uue()}),gue=e=>`Couldn’t load OpenResearch ${e==null?void 0:e.items}.`,vue=e=>`无法加载 OpenResearch 的${e==null?void 0:e.items}。`,bue=e=>`بارگذاری ${e==null?void 0:e.items} در OpenResearch ناموفق بود.`,yue=e=>`تعذّر تحميل ${e==null?void 0:e.items} في OpenResearch.`,xue=e=>`Error al cargar ${e==null?void 0:e.items} de OpenResearch.`,wue=e=>`OpenResearch ${e==null?void 0:e.items} लोड नहीं हो सके।`,kue=((e,n={})=>{const t=n.locale??z();return t==="zh-CN"?vue(e):t==="fa"?bue(e):t==="ar"?yue(e):t==="es"?xue(e):t==="hi"?wue(e):gue(e)}),Sue=()=>"Sub-agent",Cue=()=>"子智能体",Eue=()=>"عامل فرعی",Nue=()=>"وكيل فرعي",zue=()=>"Subagente",jue=()=>"सब-एजेंट",Tue=((e={},n={})=>{const t=n.locale??z();return t==="zh-CN"?Cue():t==="fa"?Eue():t==="ar"?Nue():t==="es"?zue():t==="hi"?jue():Sue()}),Aue=()=>"Table",Rue=()=>"表格",Mue=()=>"جدول",Oue=()=>"جدول",Due=()=>"Tabla",Lue=()=>"टेबल",Iue=((e={},n={})=>{const t=n.locale??z();return t==="zh-CN"?Rue():t==="fa"?Mue():t==="ar"?Oue():t==="es"?Due():t==="hi"?Lue():Aue()}),$ue=()=>"Tree",Bue=()=>"树状图",Pue=()=>"درخت",Fue=()=>"شجرة",Hue=()=>"Árbol",que=()=>"ट्री",Uue=((e={},n={})=>{const t=n.locale??z();return t==="zh-CN"?Bue():t==="fa"?Pue():t==="ar"?Fue():t==="es"?Hue():t==="hi"?que():$ue()}),Gue=e=>`Collapse ${e==null?void 0:e.name}`,Vue=e=>`折叠 ${e==null?void 0:e.name}`,Kue=e=>`بستن پوشهٔ ${e==null?void 0:e.name}`,Wue=e=>`طيّ ${e==null?void 0:e.name}`,Que=e=>`Contraer ${e==null?void 0:e.name}`,Xue=e=>`${e==null?void 0:e.name} समेटें`,Yue=((e,n={})=>{const t=n.locale??z();return t==="zh-CN"?Vue(e):t==="fa"?Kue(e):t==="ar"?Wue(e):t==="es"?Que(e):t==="hi"?Xue(e):Gue(e)}),Zue=e=>`Delete “${e==null?void 0:e.path}” from the artifacts directory?`,Jue=e=>`从产物目录中删除“${e==null?void 0:e.path}”?`,e_e=e=>`«${e==null?void 0:e.path}» از پوشهٔ خروجی‌ها حذف شود؟`,t_e=e=>`حذف «${e==null?void 0:e.path}» من دليل المُخرَجات؟`,n_e=e=>`¿Eliminar “${e==null?void 0:e.path}” del directorio de artefactos?`,r_e=e=>`“${e==null?void 0:e.path}” को आर्टिफ़ैक्ट डायरेक्टरी से हटाएं?`,Tk=((e,n={})=>{const t=n.locale??z();return t==="zh-CN"?Jue(e):t==="fa"?e_e(e):t==="ar"?t_e(e):t==="es"?n_e(e):t==="hi"?r_e(e):Zue(e)}),s_e=e=>`Delete folder ${e==null?void 0:e.name}`,i_e=e=>`删除文件夹 ${e==null?void 0:e.name}`,a_e=e=>`حذف پوشهٔ ${e==null?void 0:e.name}`,o_e=e=>`حذف المجلد ${e==null?void 0:e.name}`,l_e=e=>`Eliminar la carpeta ${e==null?void 0:e.name}`,c_e=e=>`${e==null?void 0:e.name} फ़ोल्डर हटाएं`,u_e=((e,n={})=>{const t=n.locale??z();return t==="zh-CN"?i_e(e):t==="fa"?a_e(e):t==="ar"?o_e(e):t==="es"?l_e(e):t==="hi"?c_e(e):s_e(e)}),__e=e=>`Expand ${e==null?void 0:e.name}`,f_e=e=>`展开 ${e==null?void 0:e.name}`,d_e=e=>`باز کردن پوشهٔ ${e==null?void 0:e.name}`,h_e=e=>`توسيع ${e==null?void 0:e.name}`,p_e=e=>`Expandir ${e==null?void 0:e.name}`,m_e=e=>`${e==null?void 0:e.name} फैलाएं`,g_e=((e,n={})=>{const t=n.locale??z();return t==="zh-CN"?f_e(e):t==="fa"?d_e(e):t==="ar"?h_e(e):t==="es"?p_e(e):t==="hi"?m_e(e):__e(e)}),v_e=()=>"Binary or unsupported file — no inline preview.",b_e=()=>"二进制文件或不受支持的文件 — 无法内嵌预览。",y_e=()=>"فایل دودویی یا پشتیبانی‌نشده است — پیش‌نمایش درون‌صفحه‌ای ندارد.",x_e=()=>"ملف ثنائي أو غير مدعوم — لا توجد معاينة مضمّنة.",w_e=()=>"Archivo binario o no compatible — sin vista previa.",k_e=()=>"बाइनरी या असमर्थित फ़ाइल — इनलाइन प्रीव्यू नहीं है।",S_e=((e={},n={})=>{const t=n.locale??z();return t==="zh-CN"?b_e():t==="fa"?y_e():t==="ar"?x_e():t==="es"?w_e():t==="hi"?k_e():v_e()}),C_e=()=>"Copy path",E_e=()=>"复制路径",N_e=()=>"کپی مسیر",z_e=()=>"نسخ المسار",j_e=()=>"Copiar ruta",T_e=()=>"पथ कॉपी करें",A_e=((e={},n={})=>{const t=n.locale??z();return t==="zh-CN"?E_e():t==="fa"?N_e():t==="ar"?z_e():t==="es"?j_e():t==="hi"?T_e():C_e()}),R_e=()=>"Artifact not found",M_e=()=>"找不到产物",O_e=()=>"خروجی پیدا نشد",D_e=()=>"لم يُعثر على المُخرَج",L_e=()=>"No se encontró el artefacto",I_e=()=>"आर्टिफ़ैक्ट नहीं मिला",$_e=((e={},n={})=>{const t=n.locale??z();return t==="zh-CN"?M_e():t==="fa"?O_e():t==="ar"?D_e():t==="es"?L_e():t==="hi"?I_e():R_e()}),B_e=()=>"Open raw",P_e=()=>"打开原始文件",F_e=()=>"باز کردن فایل خام",H_e=()=>"فتح الملف الخام",q_e=()=>"Abrir sin formato",U_e=()=>"रॉ खोलें",G_e=((e={},n={})=>{const t=n.locale??z();return t==="zh-CN"?P_e():t==="fa"?F_e():t==="ar"?H_e():t==="es"?q_e():t==="hi"?U_e():B_e()}),V_e=()=>"Click an artifact to view it",K_e=()=>"点击产物即可查看",W_e=()=>"برای مشاهده، یک خروجی را انتخاب کنید",Q_e=()=>"انقر على مُخرَج لعرضه",X_e=()=>"Selecciona un artefacto para verlo",Y_e=()=>"देखने के लिए किसी आर्टिफ़ैक्ट पर क्लिक करें",Z_e=((e={},n={})=>{const t=n.locale??z();return t==="zh-CN"?K_e():t==="fa"?W_e():t==="ar"?Q_e():t==="es"?X_e():t==="hi"?Y_e():V_e()}),J_e=()=>"Delete artifact",efe=()=>"删除产物",tfe=()=>"حذف خروجی",nfe=()=>"حذف المُخرَج",rfe=()=>"Eliminar artefacto",sfe=()=>"आर्टिफ़ैक्ट हटाएं",LE=((e={},n={})=>{const t=n.locale??z();return t==="zh-CN"?efe():t==="fa"?tfe():t==="ar"?nfe():t==="es"?rfe():t==="hi"?sfe():J_e()}),ife=()=>"Delete folder",afe=()=>"删除文件夹",ofe=()=>"حذف پوشه",lfe=()=>"حذف المجلد",cfe=()=>"Eliminar carpeta",ufe=()=>"फ़ोल्डर हटाएं",_fe=((e={},n={})=>{const t=n.locale??z();return t==="zh-CN"?afe():t==="fa"?ofe():t==="ar"?lfe():t==="es"?cfe():t==="hi"?ufe():ife()}),ffe=()=>"Failed to load:",dfe=()=>"加载失败:",hfe=()=>"بارگیری ناموفق بود:",pfe=()=>"تعذّر التحميل:",mfe=()=>"Error al cargar:",gfe=()=>"लोड नहीं हो सका:",vfe=((e={},n={})=>{const t=n.locale??z();return t==="zh-CN"?dfe():t==="fa"?hfe():t==="ar"?pfe():t==="es"?mfe():t==="hi"?gfe():ffe()}),bfe=()=>"File truncated — showing the first 512 KB.",yfe=()=>"文件已截断——仅显示前 512 KB。",xfe=()=>"فایل کوتاه شده است — فقط ۵۱۲ کیلوبایت نخست نمایش داده می‌شود.",wfe=()=>"تم اقتطاع الملف — عرض أول 512 كيلوبايت.",kfe=()=>"Archivo truncado — se muestran los primeros 512 KB.",Sfe=()=>"फ़ाइल छोटी की गई — पहले 512 KB दिखाए जा रहे हैं।",Cfe=((e={},n={})=>{const t=n.locale??z();return t==="zh-CN"?yfe():t==="fa"?xfe():t==="ar"?wfe():t==="es"?kfe():t==="hi"?Sfe():bfe()}),Efe=()=>"Listing truncated — the folder has more artifacts.",Nfe=()=>"列表已截断——文件夹中还有更多产物。",zfe=()=>"فهرست کوتاه شده است — خروجی‌های بیشتری در پوشه وجود دارد.",jfe=()=>"تم اقتطاع القائمة — يحتوي المجلد على مُخرَجات أخرى.",Tfe=()=>"Listado truncado — la carpeta tiene más artefactos.",Afe=()=>"सूची छोटी की गई — इस फ़ोल्डर में और भी आर्टिफ़ैक्ट हैं।",Rfe=((e={},n={})=>{const t=n.locale??z();return t==="zh-CN"?Nfe():t==="fa"?zfe():t==="ar"?jfe():t==="es"?Tfe():t==="hi"?Afe():Efe()}),Mfe=()=>"Loading…",Ofe=()=>"正在加载…",Dfe=()=>"در حال بارگیری…",Lfe=()=>"جارٍ التحميل…",Ife=()=>"Cargando…",$fe=()=>"लोड हो रहा है…",eD=((e={},n={})=>{const t=n.locale??z();return t==="zh-CN"?Ofe():t==="fa"?Dfe():t==="ar"?Lfe():t==="es"?Ife():t==="hi"?$fe():Mfe()}),Bfe=()=>"Loading artifacts…",Pfe=()=>"正在加载产物…",Ffe=()=>"در حال بارگیری خروجی‌ها…",Hfe=()=>"جارٍ تحميل المُخرَجات…",qfe=()=>"Cargando artefactos…",Ufe=()=>"आर्टिफ़ैक्ट लोड हो रहे हैं…",Gfe=((e={},n={})=>{const t=n.locale??z();return t==="zh-CN"?Pfe():t==="fa"?Ffe():t==="ar"?Hfe():t==="es"?qfe():t==="hi"?Ufe():Bfe()}),Vfe=()=>"Modified",Kfe=()=>"修改时间",Wfe=()=>"ویرایش‌شده",Qfe=()=>"عُدّل",Xfe=()=>"Modificado",Yfe=()=>"बदला गया",Zfe=((e={},n={})=>{const t=n.locale??z();return t==="zh-CN"?Kfe():t==="fa"?Wfe():t==="ar"?Qfe():t==="es"?Xfe():t==="hi"?Yfe():Vfe()}),Jfe=()=>"No artifacts yet",ede=()=>"尚无产物",tde=()=>"هنوز خروجی‌ای وجود ندارد",nde=()=>"لا توجد مُخرَجات بعد",rde=()=>"Aún no hay artefactos",sde=()=>"अभी तक कोई आर्टिफ़ैक्ट नहीं",ide=((e={},n={})=>{const t=n.locale??z();return t==="zh-CN"?ede():t==="fa"?tde():t==="ar"?nde():t==="es"?rde():t==="hi"?sde():Jfe()}),ade=()=>"Open raw in new tab",ode=()=>"在新标签页中打开原始文件",lde=()=>"باز کردن فایل خام در زبانهٔ جدید",cde=()=>"فتح الملف الخام في تبويب جديد",ude=()=>"Abrir sin formato en una pestaña nueva",_de=()=>"नए टैब में रॉ खोलें",IE=((e={},n={})=>{const t=n.locale??z();return t==="zh-CN"?ode():t==="fa"?lde():t==="ar"?cde():t==="es"?ude():t==="hi"?_de():ade()}),fde=()=>"This is the project's durable output space for reports, figures, images, CSVs, PDFs, and other research artifacts. Ask the agent for a write-up or add your own files.",dde=()=>"这里是项目的持久输出空间,用于保存报告、图表、图片、CSV、PDF 和其他研究产物。你可以让智能体撰写报告,也可以自行添加文件。",hde=()=>"این فضای پایدار خروجی پروژه برای گزارش‌ها، نمودارها، تصاویر، فایل‌های CSV و PDF و دیگر خروجی‌های پژوهشی است. از عامل بخواهید گزارشی بنویسد یا فایل‌های خودتان را اضافه کنید.",pde=()=>"هذه هي مساحة المُخرَجات الدائمة للمشروع، للتقارير والأشكال والصور وملفات CSV وملفات PDF وغيرها من مُخرَجات البحث. اطلب من الوكيل كتابة تقرير أو أضِف ملفاتك الخاصة.",mde=()=>"Este es el espacio de resultados permanente del proyecto: informes, figuras, imágenes, CSV, PDF y otros artefactos de investigación. Pídele al agente un informe o añade tus propios archivos.",gde=()=>"यह प्रोजेक्ट का स्थायी आउटपुट स्थान है — रिपोर्ट, फ़िगर, इमेज, CSV, PDF और अन्य शोध आर्टिफ़ैक्ट के लिए। एजेंट से कोई लेख लिखने को कहें या अपनी फ़ाइलें खुद जोड़ें।",vde=((e={},n={})=>{const t=n.locale??z();return t==="zh-CN"?dde():t==="fa"?hde():t==="ar"?pde():t==="es"?mde():t==="hi"?gde():fde()}),bde=()=>"File too large to preview inline.",yde=()=>"文件太大,无法内嵌预览。",xde=()=>"فایل برای پیش‌نمایش درون‌صفحه‌ای بیش از حد بزرگ است.",wde=()=>"الملف كبير جدًا للمعاينة المضمّنة.",kde=()=>"El archivo es demasiado grande para previsualizarlo.",Sde=()=>"फ़ाइल इनलाइन प्रीव्यू के लिए बहुत बड़ी है।",Cde=((e={},n={})=>{const t=n.locale??z();return t==="zh-CN"?yde():t==="fa"?xde():t==="ar"?wde():t==="es"?kde():t==="hi"?Sde():bde()}),Ede=()=>"This is the baseline branch, so there is no parent comparison.",Nde=()=>"这是基线分支,因此没有父分支可供比较。",zde=()=>"این شاخهٔ مبناست، بنابراین شاخهٔ والدی برای مقایسه ندارد.",jde=()=>"هذا هو الفرع الأساس، فلا يوجد فرع أصل للمقارنة.",Tde=()=>"Esta es la rama base, así que no hay comparación con una rama padre.",Ade=()=>"यह बेसलाइन ब्रांच है, इसलिए कोई पैरेंट तुलना नहीं है।",Rde=((e={},n={})=>{const t=n.locale??z();return t==="zh-CN"?Nde():t==="fa"?zde():t==="ar"?jde():t==="es"?Tde():t==="hi"?Ade():Ede()}),Mde=()=>"Failed to load changes:",Ode=()=>"加载更改失败:",Dde=()=>"بارگیری تغییرات ناموفق بود:",Lde=()=>"تعذّر تحميل التغييرات:",Ide=()=>"Error al cargar los cambios:",$de=()=>"बदलाव लोड नहीं हो सके:",Bde=((e={},n={})=>{const t=n.locale??z();return t==="zh-CN"?Ode():t==="fa"?Dde():t==="ar"?Lde():t==="es"?Ide():t==="hi"?$de():Mde()}),Pde=()=>"Loading changes…",Fde=()=>"正在加载更改…",Hde=()=>"در حال بارگیری تغییرات…",qde=()=>"جارٍ تحميل التغييرات…",Ude=()=>"Cargando cambios…",Gde=()=>"बदलाव लोड हो रहे हैं…",Vde=((e={},n={})=>{const t=n.locale??z();return t==="zh-CN"?Fde():t==="fa"?Hde():t==="ar"?qde():t==="es"?Ude():t==="hi"?Gde():Pde()}),Kde=()=>"No committed changes from the parent branch.",Wde=()=>"与父分支相比没有已提交的更改。",Qde=()=>"نسبت به شاخهٔ والد تغییر ثبت‌شده‌ای وجود ندارد.",Xde=()=>"لا توجد تغييرات مودعة عن الفرع الأصل.",Yde=()=>"No hay cambios confirmados respecto a la rama padre.",Zde=()=>"पैरेंट ब्रांच से कोई कमिट किए गए बदलाव नहीं।",Jde=((e={},n={})=>{const t=n.locale??z();return t==="zh-CN"?Wde():t==="fa"?Qde():t==="ar"?Xde():t==="es"?Yde():t==="hi"?Zde():Kde()}),ehe=e=>`agent ${e==null?void 0:e.number}`,the=e=>`智能体 ${e==null?void 0:e.number}`,nhe=e=>`عامل ${e==null?void 0:e.number}`,rhe=e=>`وكيل ${e==null?void 0:e.number}`,she=e=>`agente ${e==null?void 0:e.number}`,ihe=e=>`एजेंट ${e==null?void 0:e.number}`,$E=((e,n={})=>{const t=n.locale??z();return t==="zh-CN"?the(e):t==="fa"?nhe(e):t==="ar"?rhe(e):t==="es"?she(e):t==="hi"?ihe(e):ehe(e)}),ahe=()=>"agent sessions",ohe=()=>"智能体会话",lhe=()=>"نشست‌های عامل‌ها",che=()=>"جلسات الوكلاء",uhe=()=>"sesiones de agente",_he=()=>"एजेंट सेशन",fhe=((e={},n={})=>{const t=n.locale??z();return t==="zh-CN"?ohe():t==="fa"?lhe():t==="ar"?che():t==="es"?uhe():t==="hi"?_he():ahe()}),dhe=()=>"All sessions",hhe=()=>"所有会话",phe=()=>"همهٔ نشست‌ها",mhe=()=>"كل الجلسات",ghe=()=>"Todas las sesiones",vhe=()=>"सभी सेशन",tD=((e={},n={})=>{const t=n.locale??z();return t==="zh-CN"?hhe():t==="fa"?phe():t==="ar"?mhe():t==="es"?ghe():t==="hi"?vhe():dhe()}),bhe=e=>`${e==null?void 0:e.count} annotations`,yhe=e=>`${e==null?void 0:e.count} 条批注`,xhe=e=>`${e==null?void 0:e.count} یادداشت`,whe=e=>`التعليقات: ${e==null?void 0:e.count}`,khe=e=>`${e==null?void 0:e.count} anotaciones`,She=e=>`${e==null?void 0:e.count} एनोटेशन`,Che=((e,n={})=>{const t=n.locale??z();return t==="zh-CN"?yhe(e):t==="fa"?xhe(e):t==="ar"?whe(e):t==="es"?khe(e):t==="hi"?She(e):bhe(e)}),Ehe=()=>"Archive",Nhe=()=>"归档",zhe=()=>"بایگانی",jhe=()=>"أرشفة",The=()=>"Archivar",Ahe=()=>"आर्काइव करें",Rhe=((e={},n={})=>{const t=n.locale??z();return t==="zh-CN"?Nhe():t==="fa"?zhe():t==="ar"?jhe():t==="es"?The():t==="hi"?Ahe():Ehe()}),Mhe=()=>"Ask the research agent… (/ for commands and skills, ! for shell)",Ohe=()=>"询问研究智能体…(输入 / 使用命令和技能,输入 ! 运行 shell)",Dhe=()=>"از عامل پژوهش بپرسید… (/ برای فرمان‌ها و مهارت‌ها، ! برای شل)",Lhe=()=>"اسأل وكيل البحث… (/ للأوامر والمهارات، ! للطرفية)",Ihe=()=>"Pregunta al agente de investigación… (/ para comandos y skills, ! para la shell)",$he=()=>"शोध एजेंट से पूछें… (कमांड और स्किल के लिए /, शेल के लिए !)",Bhe=((e={},n={})=>{const t=n.locale??z();return t==="zh-CN"?Ohe():t==="fa"?Dhe():t==="ar"?Lhe():t==="es"?Ihe():t==="hi"?$he():Mhe()}),Phe=()=>"Asked about selected text",Fhe=()=>"已询问所选文本",Hhe=()=>"دربارهٔ متن انتخاب‌شده پرسیده شد",qhe=()=>"سأل عن النص المحدد",Uhe=()=>"Preguntó sobre el texto seleccionado",Ghe=()=>"चयनित टेक्स्ट के बारे में पूछा",Vhe=((e={},n={})=>{const t=n.locale??z();return t==="zh-CN"?Fhe():t==="fa"?Hhe():t==="ar"?qhe():t==="es"?Uhe():t==="hi"?Ghe():Phe()}),Khe=()=>"Attachment",Whe=()=>"附件",Qhe=()=>"پیوست",Xhe=()=>"مرفق",Yhe=()=>"Adjunto",Zhe=()=>"अटैचमेंट",Jhe=((e={},n={})=>{const t=n.locale??z();return t==="zh-CN"?Whe():t==="fa"?Qhe():t==="ar"?Xhe():t==="es"?Yhe():t==="hi"?Zhe():Khe()}),epe=e=>`${e==null?void 0:e.name} is too large — each attachment must be under 30 MB.`,tpe=e=>`${e==null?void 0:e.name} 太大 — 每个附件必须小于 30 MB。`,npe=e=>`${e==null?void 0:e.name} بیش از حد بزرگ است — هر پیوست باید کمتر از ۳۰ مگابایت باشد.`,rpe=e=>`${e==null?void 0:e.name} كبير جدًا — يجب أن يكون كل مرفق أقل من 30 ميغابايت.`,spe=e=>`${e==null?void 0:e.name} es demasiado grande — cada adjunto debe ocupar menos de 30 MB.`,ipe=e=>`${e==null?void 0:e.name} बहुत बड़ी है — हर अटैचमेंट 30 MB से कम होनी चाहिए।`,ape=((e,n={})=>{const t=n.locale??z();return t==="zh-CN"?tpe(e):t==="fa"?npe(e):t==="ar"?rpe(e):t==="es"?spe(e):t==="hi"?ipe(e):epe(e)}),ope=()=>"Attachments exceed the 40 MB total limit — remove one and try again.",lpe=()=>"附件总大小超过 40 MB 限制 — 请移除一个附件后重试。",cpe=()=>"حجم پیوست‌ها از سقف ۴۰ مگابایت بیشتر است — یکی را حذف و دوباره تلاش کنید.",upe=()=>"تتجاوز المرفقات الحد الإجمالي 40 ميغابايت — أزِل واحدًا وحاول مجددًا.",_pe=()=>"Los adjuntos superan el límite total de 40 MB — quita uno y vuelve a intentarlo.",fpe=()=>"अटैचमेंट 40 MB की कुल सीमा से ज़्यादा हैं — एक हटाएं और फिर से कोशिश करें।",dpe=((e={},n={})=>{const t=n.locale??z();return t==="zh-CN"?lpe():t==="fa"?cpe():t==="ar"?upe():t==="es"?_pe():t==="hi"?fpe():ope()}),hpe=()=>"Wait for the turn to finish before running a command.",ppe=()=>"请等待本轮结束后再运行命令。",mpe=()=>"پیش از اجرای فرمان، صبر کنید تا نوبت تمام شود.",gpe=()=>"انتظر انتهاء الجولة قبل تنفيذ أمر.",vpe=()=>"Espera a que termine el turno antes de ejecutar un comando.",bpe=()=>"कमांड चलाने से पहले टर्न खत्म होने का इंतज़ार करें।",ype=((e={},n={})=>{const t=n.locale??z();return t==="zh-CN"?ppe():t==="fa"?mpe():t==="ar"?gpe():t==="es"?vpe():t==="hi"?bpe():hpe()}),xpe=e=>`Exited with code ${e==null?void 0:e.code}`,wpe=e=>`退出码 ${e==null?void 0:e.code}`,kpe=e=>`با کد ${e==null?void 0:e.code} خارج شد`,Spe=e=>`خرج برمز ${e==null?void 0:e.code}`,Cpe=e=>`Terminó con el código ${e==null?void 0:e.code}`,Epe=e=>`कोड ${e==null?void 0:e.code} के साथ बाहर निकला`,Npe=((e,n={})=>{const t=n.locale??z();return t==="zh-CN"?wpe(e):t==="fa"?kpe(e):t==="ar"?Spe(e):t==="es"?Cpe(e):t==="hi"?Epe(e):xpe(e)}),zpe=e=>`Command not run: ${e==null?void 0:e.error}`,jpe=e=>`命令未运行:${e==null?void 0:e.error}`,Tpe=e=>`فرمان اجرا نشد: ${e==null?void 0:e.error}`,Ape=e=>`لم يُنفَّذ الأمر: ${e==null?void 0:e.error}`,Rpe=e=>`No se ejecutó el comando: ${e==null?void 0:e.error}`,Mpe=e=>`कमांड नहीं चलाई गई: ${e==null?void 0:e.error}`,BE=((e,n={})=>{const t=n.locale??z();return t==="zh-CN"?jpe(e):t==="fa"?Tpe(e):t==="ar"?Ape(e):t==="es"?Rpe(e):t==="hi"?Mpe(e):zpe(e)}),Ope=()=>"Collapse tool activity",Dpe=()=>"折叠工具活动",Lpe=()=>"بستن فعالیت ابزارها",Ipe=()=>"طيّ نشاط الأداة",$pe=()=>"Contraer actividad de herramientas",Bpe=()=>"टूल गतिविधि समेटें",Ppe=((e={},n={})=>{const t=n.locale??z();return t==="zh-CN"?Dpe():t==="fa"?Lpe():t==="ar"?Ipe():t==="es"?$pe():t==="hi"?Bpe():Ope()}),Fpe=()=>"Continue",Hpe=()=>"继续",qpe=()=>"ادامه",Upe=()=>"متابعة",Gpe=()=>"Continuar",Vpe=()=>"जारी रखें",Kpe=((e={},n={})=>{const t=n.locale??z();return t==="zh-CN"?Hpe():t==="fa"?qpe():t==="ar"?Upe():t==="es"?Gpe():t==="hi"?Vpe():Fpe()}),Wpe=e=>`Delete “${e==null?void 0:e.title}”? -Its transcript will be permanently removed.`,Kpe=e=>`删除“${e==null?void 0:e.title}”? +Its transcript will be permanently removed.`,Qpe=e=>`删除“${e==null?void 0:e.title}”? -其对话记录将被永久移除。`,Wpe=e=>`«${e==null?void 0:e.title}» حذف شود؟ +其对话记录将被永久移除。`,Xpe=e=>`«${e==null?void 0:e.title}» حذف شود؟ -رونوشت آن برای همیشه حذف خواهد شد.`,Qpe=e=>`حذف «${e==null?void 0:e.title}»؟ +رونوشت آن برای همیشه حذف خواهد شد.`,Ype=e=>`حذف «${e==null?void 0:e.title}»؟ -سيُحذف سجل المحادثة نهائيًا.`,Xpe=e=>`¿Eliminar “${e==null?void 0:e.title}”? +سيُحذف سجل المحادثة نهائيًا.`,Zpe=e=>`¿Eliminar “${e==null?void 0:e.title}”? -Su transcripción se eliminará de forma permanente.`,Ype=e=>`“${e==null?void 0:e.title}” हटाएं? +Su transcripción se eliminará de forma permanente.`,Jpe=e=>`“${e==null?void 0:e.title}” हटाएं? -इसका ट्रांसक्रिप्ट स्थायी रूप से हट जाएगा।`,Zpe=((e,n={})=>{const t=n.locale??z();return t==="zh-CN"?Kpe(e):t==="fa"?Wpe(e):t==="ar"?Qpe(e):t==="es"?Xpe(e):t==="hi"?Ype(e):Vpe(e)}),Jpe=e=>`Failed to delete “${e==null?void 0:e.title}”: ${e==null?void 0:e.error}`,e0e=e=>`删除“${e==null?void 0:e.title}”失败:${e==null?void 0:e.error}`,t0e=e=>`حذف «${e==null?void 0:e.title}» ناموفق بود: ${e==null?void 0:e.error}`,n0e=e=>`تعذّر حذف «${e==null?void 0:e.title}»: ${e==null?void 0:e.error}`,r0e=e=>`No se pudo eliminar “${e==null?void 0:e.title}”: ${e==null?void 0:e.error}`,s0e=e=>`“${e==null?void 0:e.title}” हटाने में विफल: ${e==null?void 0:e.error}`,i0e=((e,n={})=>{const t=n.locale??z();return t==="zh-CN"?e0e(e):t==="fa"?t0e(e):t==="ar"?n0e(e):t==="es"?r0e(e):t==="hi"?s0e(e):Jpe(e)}),a0e=()=>"Could not exit Plan mode. Try again.",o0e=()=>"无法退出计划模式。请重试。",l0e=()=>"خروج از حالت طرح ممکن نشد. دوباره تلاش کنید.",c0e=()=>"تعذّر الخروج من وضع التخطيط. حاول مجددًا.",u0e=()=>"No se pudo salir del modo Plan. Inténtalo de nuevo.",_0e=()=>"प्लान मोड से बाहर नहीं निकला जा सका। फिर से कोशिश करें।",f0e=((e={},n={})=>{const t=n.locale??z();return t==="zh-CN"?o0e():t==="fa"?l0e():t==="ar"?c0e():t==="es"?u0e():t==="hi"?_0e():a0e()}),d0e=()=>"Expand tool activity",h0e=()=>"展开工具活动",p0e=()=>"باز کردن فعالیت ابزارها",m0e=()=>"توسيع نشاط الأداة",g0e=()=>"Expandir actividad de herramientas",v0e=()=>"टूल गतिविधि फैलाएं",b0e=((e={},n={})=>{const t=n.locale??z();return t==="zh-CN"?h0e():t==="fa"?p0e():t==="ar"?m0e():t==="es"?g0e():t==="hi"?v0e():d0e()}),y0e=()=>"experiments",x0e=()=>"实验",w0e=()=>"آزمایش‌ها",k0e=()=>"التجارب",S0e=()=>"experimentos",C0e=()=>"प्रयोग",E0e=((e={},n={})=>{const t=n.locale??z();return t==="zh-CN"?x0e():t==="fa"?w0e():t==="ar"?k0e():t==="es"?S0e():t==="hi"?C0e():y0e()}),N0e=e=>`${e==null?void 0:e.harness} is unavailable — open the model picker`,z0e=e=>`${e==null?void 0:e.harness} 不可用 — 请打开模型选择器`,j0e=e=>`در حال حاضر ${e==null?void 0:e.harness} در دسترس نیست — انتخاب‌گر مدل را باز کنید`,T0e=e=>`${e==null?void 0:e.harness} غير متاح — افتح مُنتقي النماذج`,A0e=e=>`${e==null?void 0:e.harness} no está disponible — abre el selector de modelos`,R0e=e=>`${e==null?void 0:e.harness} उपलब्ध नहीं है — मॉडल पिकर खोलें`,M0e=((e,n={})=>{const t=n.locale??z();return t==="zh-CN"?z0e(e):t==="fa"?j0e(e):t==="ar"?T0e(e):t==="es"?A0e(e):t==="hi"?R0e(e):N0e(e)}),O0e=e=>`Message ${e==null?void 0:e.harness}… (/ for commands and skills, ! for shell)`,D0e=e=>`给 ${e==null?void 0:e.harness} 发消息…(输入 / 使用命令和技能,输入 ! 运行 shell)`,L0e=e=>`پیام به ${e==null?void 0:e.harness}… (/ برای فرمان‌ها و مهارت‌ها، ! برای شل)`,I0e=e=>`راسِل ${e==null?void 0:e.harness}… (/ للأوامر والمهارات، ! للطرفية)`,$0e=e=>`Escribe a ${e==null?void 0:e.harness}… (/ para comandos y skills, ! para la shell)`,B0e=e=>`${e==null?void 0:e.harness} को संदेश भेजें… (कमांड और स्किल के लिए /, शेल के लिए !)`,P0e=((e,n={})=>{const t=n.locale??z();return t==="zh-CN"?D0e(e):t==="fa"?L0e(e):t==="ar"?I0e(e):t==="es"?$0e(e):t==="hi"?B0e(e):O0e(e)}),F0e=e=>`Message not sent: ${e==null?void 0:e.error}`,H0e=e=>`消息未发送:${e==null?void 0:e.error}`,q0e=e=>`پیام ارسال نشد: ${e==null?void 0:e.error}`,U0e=e=>`لم تُرسل الرسالة: ${e==null?void 0:e.error}`,G0e=e=>`Mensaje no enviado: ${e==null?void 0:e.error}`,V0e=e=>`संदेश नहीं भेजा गया: ${e==null?void 0:e.error}`,K0e=((e,n={})=>{const t=n.locale??z();return t==="zh-CN"?H0e(e):t==="fa"?q0e(e):t==="ar"?U0e(e):t==="es"?G0e(e):t==="hi"?V0e(e):F0e(e)}),W0e=()=>"Model unavailable",Q0e=()=>"模型不可用",X0e=()=>"مدل در دسترس نیست",Y0e=()=>"النموذج غير متاح",Z0e=()=>"Modelo no disponible",J0e=()=>"मॉडल उपलब्ध नहीं",eme=((e={},n={})=>{const t=n.locale??z();return t==="zh-CN"?Q0e():t==="fa"?X0e():t==="ar"?Y0e():t==="es"?Z0e():t==="hi"?J0e():W0e()}),tme=()=>"New session",nme=()=>"新会话",rme=()=>"نشست جدید",sme=()=>"جلسة جديدة",ime=()=>"Nueva sesión",ame=()=>"नया सेशन",PE=((e={},n={})=>{const t=n.locale??z();return t==="zh-CN"?nme():t==="fa"?rme():t==="ar"?sme():t==="es"?ime():t==="hi"?ame():tme()}),ome=()=>"No active sessions",lme=()=>"没有活跃会话",cme=()=>"نشست فعالی وجود ندارد",ume=()=>"لا توجد جلسات نشطة",_me=()=>"No hay sesiones activas",fme=()=>"कोई सक्रिय सेशन नहीं",dme=((e={},n={})=>{const t=n.locale??z();return t==="zh-CN"?lme():t==="fa"?cme():t==="ar"?ume():t==="es"?_me():t==="hi"?fme():ome()}),hme=()=>"No activity",pme=()=>"无活动",mme=()=>"بدون فعالیت",gme=()=>"لا يوجد نشاط",vme=()=>"Sin actividad",bme=()=>"कोई गतिविधि नहीं",yme=((e={},n={})=>{const t=n.locale??z();return t==="zh-CN"?pme():t==="fa"?mme():t==="ar"?gme():t==="es"?vme():t==="hi"?bme():hme()}),xme=()=>"No archived sessions",wme=()=>"没有已归档的会话",kme=()=>"نشست بایگانی‌شده‌ای وجود ندارد",Sme=()=>"لا توجد جلسات مؤرشفة",Cme=()=>"No hay sesiones archivadas",Eme=()=>"कोई आर्काइव किया गया सेशन नहीं",Nme=((e={},n={})=>{const t=n.locale??z();return t==="zh-CN"?wme():t==="fa"?kme():t==="ar"?Sme():t==="es"?Cme():t==="hi"?Eme():xme()}),zme=()=>"No sessions yet",jme=()=>"还没有会话",Tme=()=>"هنوز نشستی وجود ندارد",Ame=()=>"لا توجد جلسات بعد",Rme=()=>"Aún no hay sesiones",Mme=()=>"अभी तक कोई सेशन नहीं",Ome=((e={},n={})=>{const t=n.locale??z();return t==="zh-CN"?jme():t==="fa"?Tme():t==="ar"?Ame():t==="es"?Rme():t==="hi"?Mme():zme()}),Dme=()=>"1 annotation",Lme=()=>"1 条批注",Ime=()=>"۱ یادداشت",$me=()=>"تعليق واحد",Bme=()=>"1 anotación",Pme=()=>"1 एनोटेशन",Fme=((e={},n={})=>{const t=n.locale??z();return t==="zh-CN"?Lme():t==="fa"?Ime():t==="ar"?$me():t==="es"?Bme():t==="hi"?Pme():Dme()}),Hme=()=>"Open sub-agent transcript",qme=()=>"打开子智能体记录",Ume=()=>"باز کردن متن گفت‌وگوی عامل فرعی",Gme=()=>"فتح سجل محادثة الوكيل الفرعي",Vme=()=>"Abrir la transcripción del subagente",Kme=()=>"सब-एजेंट ट्रांसक्रिप्ट खोलें",Wme=((e={},n={})=>{const t=n.locale??z();return t==="zh-CN"?qme():t==="fa"?Ume():t==="ar"?Gme():t==="es"?Vme():t==="hi"?Kme():Hme()}),Qme=()=>"About this demo",Xme=()=>"关于此演示",Yme=()=>"دربارهٔ این نسخهٔ نمایشی",Zme=()=>"حول هذا العرض التوضيحي",Jme=()=>"Acerca de esta demo",ege=()=>"इस डेमो के बारे में",FE=((e={},n={})=>{const t=n.locale??z();return t==="zh-CN"?Xme():t==="fa"?Yme():t==="ar"?Zme():t==="es"?Jme():t==="hi"?ege():Qme()}),tge=()=>"Accept and auto mode",nge=()=>"接受并使用自动模式",rge=()=>"پذیرش و حالت خودکار",sge=()=>"قبول وتفعيل الوضع التلقائي",ige=()=>"Aceptar en modo automático",age=()=>"स्वीकार करें और ऑटो मोड",oge=((e={},n={})=>{const t=n.locale??z();return t==="zh-CN"?nge():t==="fa"?rge():t==="ar"?sge():t==="es"?ige():t==="hi"?age():tge()}),lge=()=>"Accept and bypass all",cge=()=>"接受并跳过所有审批",uge=()=>"پذیرش و عبور از همهٔ تأییدها",_ge=()=>"القبول وتجاوز الكل",fge=()=>"Aceptar y omitir permisos",dge=()=>"स्वीकार करें और सब बायपास करें",hge=((e={},n={})=>{const t=n.locale??z();return t==="zh-CN"?cge():t==="fa"?uge():t==="ar"?_ge():t==="es"?fge():t==="hi"?dge():lge()}),pge=()=>"Active",mge=()=>"活跃",gge=()=>"فعال",vge=()=>"نشط",bge=()=>"Activas",yge=()=>"सक्रिय",xge=((e={},n={})=>{const t=n.locale??z();return t==="zh-CN"?mge():t==="fa"?gge():t==="ar"?vge():t==="es"?bge():t==="hi"?yge():pge()}),wge=()=>"All",kge=()=>"全部",Sge=()=>"همه",Cge=()=>"الكل",Ege=()=>"Todas",Nge=()=>"सभी",zge=((e={},n={})=>{const t=n.locale??z();return t==="zh-CN"?kge():t==="fa"?Sge():t==="ar"?Cge():t==="es"?Ege():t==="hi"?Nge():wge()}),jge=()=>"Allow",Tge=()=>"允许",Age=()=>"اجازه دادن",Rge=()=>"السماح",Mge=()=>"Permitir",Oge=()=>"अनुमति दें",Dge=((e={},n={})=>{const t=n.locale??z();return t==="zh-CN"?Tge():t==="fa"?Age():t==="ar"?Rge():t==="es"?Mge():t==="hi"?Oge():jge()}),Lge=()=>"Approval required",Ige=()=>"需要批准",$ge=()=>"نیازمند تأیید",Bge=()=>"الموافقة مطلوبة",Pge=()=>"Aprobación necesaria",Fge=()=>"स्वीकृति ज़रूरी है",Hge=((e={},n={})=>{const t=n.locale??z();return t==="zh-CN"?Ige():t==="fa"?$ge():t==="ar"?Bge():t==="es"?Pge():t==="hi"?Fge():Lge()}),qge=()=>"Archived",Uge=()=>"已归档",Gge=()=>"بایگانی‌شده",Vge=()=>"مؤرشف",Kge=()=>"Archivadas",Wge=()=>"आर्काइव किया गया",HE=((e={},n={})=>{const t=n.locale??z();return t==="zh-CN"?Uge():t==="fa"?Gge():t==="ar"?Vge():t==="es"?Kge():t==="hi"?Wge():qge()}),Qge=()=>"Ask about this",Xge=()=>"询问此内容",Yge=()=>"دربارهٔ این بپرسید",Zge=()=>"اسأل عن هذا",Jge=()=>"Preguntar sobre esto",e1e=()=>"इसके बारे में पूछें",t1e=((e={},n={})=>{const t=n.locale??z();return t==="zh-CN"?Xge():t==="fa"?Yge():t==="ar"?Zge():t==="es"?Jge():t==="hi"?e1e():Qge()}),n1e=()=>"Attach a PDF or image",r1e=()=>"附加 PDF 或图片",s1e=()=>"پیوست PDF یا تصویر",i1e=()=>"إرفاق ملف PDF أو صورة",a1e=()=>"Adjuntar un PDF o una imagen",o1e=()=>"PDF या इमेज अटैच करें",qE=((e={},n={})=>{const t=n.locale??z();return t==="zh-CN"?r1e():t==="fa"?s1e():t==="ar"?i1e():t==="es"?a1e():t==="hi"?o1e():n1e()}),l1e=()=>"Bash",c1e=()=>"Bash",u1e=()=>"Bash",_1e=()=>"Bash",f1e=()=>"Bash",d1e=()=>"Bash",nD=((e={},n={})=>{const t=n.locale??z();return t==="zh-CN"?c1e():t==="fa"?u1e():t==="ar"?_1e():t==="es"?f1e():t==="hi"?d1e():l1e()}),h1e=()=>"Browsed the web",p1e=()=>"已浏览网页",m1e=()=>"وب مرور شد",g1e=()=>"تصفّح الويب",v1e=()=>"Navegó por la web",b1e=()=>"वेब ब्राउज़ किया",UE=((e={},n={})=>{const t=n.locale??z();return t==="zh-CN"?p1e():t==="fa"?m1e():t==="ar"?g1e():t==="es"?v1e():t==="hi"?b1e():h1e()}),y1e=()=>"Built the project",x1e=()=>"已构建项目",w1e=()=>"پروژه ساخته شد",k1e=()=>"بنى المشروع",S1e=()=>"Compiló el proyecto",C1e=()=>"प्रोजेक्ट बिल्ड किया",E1e=((e={},n={})=>{const t=n.locale??z();return t==="zh-CN"?x1e():t==="fa"?w1e():t==="ar"?k1e():t==="es"?S1e():t==="hi"?C1e():y1e()}),N1e=()=>"Cancel",z1e=()=>"取消",j1e=()=>"لغو",T1e=()=>"إلغاء",A1e=()=>"Cancelar",R1e=()=>"रद्द करें",M1e=((e={},n={})=>{const t=n.locale??z();return t==="zh-CN"?z1e():t==="fa"?j1e():t==="ar"?T1e():t==="es"?A1e():t==="hi"?R1e():N1e()}),O1e=()=>"Cancelled an experiment run",D1e=()=>"已取消实验运行",L1e=()=>"اجرای آزمایش لغو شد",I1e=()=>"ألغى تشغيل تجربة",$1e=()=>"Canceló una ejecución de experimento",B1e=()=>"एक प्रयोग रन रद्द किया",P1e=((e={},n={})=>{const t=n.locale??z();return t==="zh-CN"?D1e():t==="fa"?L1e():t==="ar"?I1e():t==="es"?$1e():t==="hi"?B1e():O1e()}),F1e=()=>"Checked code style",H1e=()=>"已检查代码风格",q1e=()=>"سبک کد بررسی شد",U1e=()=>"فحص نمط الشيفرة",G1e=()=>"Revisó el estilo del código",V1e=()=>"कोड स्टाइल जाँची",K1e=((e={},n={})=>{const t=n.locale??z();return t==="zh-CN"?H1e():t==="fa"?q1e():t==="ar"?U1e():t==="es"?G1e():t==="hi"?V1e():F1e()}),W1e=()=>"Checked compute options",Q1e=()=>"已检查算力选项",X1e=()=>"گزینه‌های رایانشی بررسی شد",Y1e=()=>"فحص خيارات الحوسبة",Z1e=()=>"Consultó las opciones de cómputo",J1e=()=>"कंप्यूट विकल्प जाँचे",eve=((e={},n={})=>{const t=n.locale??z();return t==="zh-CN"?Q1e():t==="fa"?X1e():t==="ar"?Y1e():t==="es"?Z1e():t==="hi"?J1e():W1e()}),tve=()=>"Checked experiment status",nve=()=>"已检查实验状态",rve=()=>"وضعیت آزمایش بررسی شد",sve=()=>"فحص حالة التجربة",ive=()=>"Consultó el estado del experimento",ave=()=>"प्रयोग की स्थिति जाँची",GE=((e={},n={})=>{const t=n.locale??z();return t==="zh-CN"?nve():t==="fa"?rve():t==="ar"?sve():t==="es"?ive():t==="hi"?ave():tve()}),ove=()=>"Checked Git status",lve=()=>"已检查 Git 状态",cve=()=>"وضعیت Git بررسی شد",uve=()=>"فحص حالة Git",_ve=()=>"Consultó el estado de Git",fve=()=>"Git स्थिति जाँची",dve=((e={},n={})=>{const t=n.locale??z();return t==="zh-CN"?lve():t==="fa"?cve():t==="ar"?uve():t==="es"?_ve():t==="hi"?fve():ove()}),hve=()=>"Checked local times",pve=()=>"已查询当地时间",mve=()=>"زمان‌های محلی بررسی شد",gve=()=>"فحص التوقيتات المحلية",vve=()=>"Consultó horas locales",bve=()=>"स्थानीय समय जाँचे",yve=((e={},n={})=>{const t=n.locale??z();return t==="zh-CN"?pve():t==="fa"?mve():t==="ar"?gve():t==="es"?vve():t==="hi"?bve():hve()}),xve=()=>"Checked market data",wve=()=>"已查询市场数据",kve=()=>"داده‌های بازار بررسی شد",Sve=()=>"فحص بيانات السوق",Cve=()=>"Consultó datos de mercado",Eve=()=>"बाज़ार डेटा जाँचा",Nve=((e={},n={})=>{const t=n.locale??z();return t==="zh-CN"?wve():t==="fa"?kve():t==="ar"?Sve():t==="es"?Cve():t==="hi"?Eve():xve()}),zve=()=>"Checked sports data",jve=()=>"已查询体育数据",Tve=()=>"داده‌های ورزشی بررسی شد",Ave=()=>"فحص البيانات الرياضية",Rve=()=>"Consultó datos deportivos",Mve=()=>"खेल डेटा जाँचा",Ove=((e={},n={})=>{const t=n.locale??z();return t==="zh-CN"?jve():t==="fa"?Tve():t==="ar"?Ave():t==="es"?Rve():t==="hi"?Mve():zve()}),Dve=()=>"Checked the weather",Lve=()=>"已查询天气",Ive=()=>"آب‌وهوا بررسی شد",$ve=()=>"فحص حالة الطقس",Bve=()=>"Consultó el tiempo",Pve=()=>"मौसम जाँचा",Fve=((e={},n={})=>{const t=n.locale??z();return t==="zh-CN"?Lve():t==="fa"?Ive():t==="ar"?$ve():t==="es"?Bve():t==="hi"?Pve():Dve()}),Hve=()=>"Checked types",qve=()=>"已检查类型",Uve=()=>"نوع‌ها بررسی شد",Gve=()=>"فحص الأنواع",Vve=()=>"Comprobó los tipos",Kve=()=>"टाइप जाँचे",Wve=((e={},n={})=>{const t=n.locale??z();return t==="zh-CN"?qve():t==="fa"?Uve():t==="ar"?Gve():t==="es"?Vve():t==="hi"?Kve():Hve()}),Qve=()=>"Clear annotations",Xve=()=>"清除批注",Yve=()=>"پاک کردن یادداشت‌ها",Zve=()=>"مسح التعليقات",Jve=()=>"Borrar anotaciones",ebe=()=>"एनोटेशन साफ़ करें",VE=((e={},n={})=>{const t=n.locale??z();return t==="zh-CN"?Xve():t==="fa"?Yve():t==="ar"?Zve():t==="es"?Jve():t==="hi"?ebe():Qve()}),tbe=()=>"Customize",nbe=()=>"自定义",rbe=()=>"سفارشی‌سازی",sbe=()=>"تخصيص",ibe=()=>"Personalizar",abe=()=>"कस्टमाइज़ करें",obe=((e={},n={})=>{const t=n.locale??z();return t==="zh-CN"?nbe():t==="fa"?rbe():t==="ar"?sbe():t==="es"?ibe():t==="hi"?abe():tbe()}),lbe=()=>"Data sources",cbe=()=>"数据源",ube=()=>"منابع داده",_be=()=>"مصادر البيانات",fbe=()=>"Fuentes de datos",dbe=()=>"डेटा स्रोत",H2=((e={},n={})=>{const t=n.locale??z();return t==="zh-CN"?cbe():t==="fa"?ube():t==="ar"?_be():t==="es"?fbe():t==="hi"?dbe():lbe()}),hbe=()=>"Delegated a task to a new agent",pbe=()=>"已将任务委派给新智能体",mbe=()=>"وظیفه به عامل جدید واگذار شد",gbe=()=>"فوّض مهمة إلى وكيل جديد",vbe=()=>"Delegó una tarea a un nuevo agente",bbe=()=>"एक नए एजेंट को टास्क सौंपा",ybe=((e={},n={})=>{const t=n.locale??z();return t==="zh-CN"?pbe():t==="fa"?mbe():t==="ar"?gbe():t==="es"?vbe():t==="hi"?bbe():hbe()}),xbe=()=>"Delete",wbe=()=>"删除",kbe=()=>"حذف",Sbe=()=>"حذف",Cbe=()=>"Eliminar",Ebe=()=>"हटाएं",rD=((e={},n={})=>{const t=n.locale??z();return t==="zh-CN"?wbe():t==="fa"?kbe():t==="ar"?Sbe():t==="es"?Cbe():t==="hi"?Ebe():xbe()}),Nbe=()=>"This prompt runs a small 200-step training probe on your machine. Hit enter to get started.",zbe=()=>"这条提示会在你的机器上运行一个小型 200 步训练探测。按 Enter 开始。",jbe=()=>"این پیام یک کاوش آموزشی کوچک ۲۰۰ مرحله‌ای روی دستگاه شما اجرا می‌کند. برای شروع Enter را بزنید.",Tbe=()=>"يشغّل هذا الطلب اختبار تدريب صغيرًا من 200 خطوة على جهازك. اضغط Enter للبدء.",Abe=()=>"Este prompt ejecuta en tu equipo una pequeña prueba de entrenamiento de 200 pasos. Pulsa Intro para empezar.",Rbe=()=>"यह प्रॉम्प्ट आपकी मशीन पर एक छोटा 200-स्टेप ट्रेनिंग परीक्षण चलाता है। शुरू करने के लिए एंटर दबाएं।",Mbe=((e={},n={})=>{const t=n.locale??z();return t==="zh-CN"?zbe():t==="fa"?jbe():t==="ar"?Tbe():t==="es"?Abe():t==="hi"?Rbe():Nbe()}),Obe=()=>"to monitor it.",Dbe=()=>"以查看进度。",Lbe=()=>"بزنید.",Ibe=()=>"لمتابعتها.",$be=()=>"para seguirlo.",Bbe=()=>"इस पर नज़र रखने के लिए।",KE=((e={},n={})=>{const t=n.locale??z();return t==="zh-CN"?Dbe():t==="fa"?Lbe():t==="ar"?Ibe():t==="es"?$be():t==="hi"?Bbe():Obe()}),Pbe=()=>"The experiment is now running. Tap",Fbe=()=>"实验正在运行。点按",Hbe=()=>"آزمایش اکنون در حال اجراست. برای پیگیری روی",qbe=()=>"التجربة قيد التشغيل الآن. اضغط على",Ube=()=>"El experimento ya se está ejecutando. Pulsa",Gbe=()=>"प्रयोग अब चल रहा है। टैप करें",WE=((e={},n={})=>{const t=n.locale??z();return t==="zh-CN"?Fbe():t==="fa"?Hbe():t==="ar"?qbe():t==="es"?Ube():t==="hi"?Gbe():Pbe()}),Vbe=()=>"Deny",Kbe=()=>"拒绝",Wbe=()=>"رد کردن",Qbe=()=>"رفض",Xbe=()=>"Denegar",Ybe=()=>"अस्वीकार करें",Zbe=((e={},n={})=>{const t=n.locale??z();return t==="zh-CN"?Kbe():t==="fa"?Wbe():t==="ar"?Qbe():t==="es"?Xbe():t==="hi"?Ybe():Vbe()}),Jbe=()=>"Dismiss",eye=()=>"关闭",tye=()=>"بستن",nye=()=>"إغلاق",rye=()=>"Cerrar",sye=()=>"खारिज करें",Pg=((e={},n={})=>{const t=n.locale??z();return t==="zh-CN"?eye():t==="fa"?tye():t==="ar"?nye():t==="es"?rye():t==="hi"?sye():Jbe()}),iye=()=>"Edit and re-send",aye=()=>"编辑并重新发送",oye=()=>"ویرایش و ارسال دوباره",lye=()=>"تعديل وإعادة الإرسال",cye=()=>"Editar y reenviar",uye=()=>"संपादित करें और फिर भेजें",QE=((e={},n={})=>{const t=n.locale??z();return t==="zh-CN"?aye():t==="fa"?oye():t==="ar"?lye():t==="es"?cye():t==="hi"?uye():iye()}),_ye=()=>"Edit message",fye=()=>"编辑消息",dye=()=>"ویرایش پیام",hye=()=>"تعديل الرسالة",pye=()=>"Editar mensaje",mye=()=>"संदेश संपादित करें",gye=((e={},n={})=>{const t=n.locale??z();return t==="zh-CN"?fye():t==="fa"?dye():t==="ar"?hye():t==="es"?pye():t==="hi"?mye():_ye()}),vye=()=>"Edited a file",bye=()=>"已编辑文件",yye=()=>"فایل ویرایش شد",xye=()=>"عدّل ملفًا",wye=()=>"Editó un archivo",kye=()=>"एक फ़ाइल संपादित की",XE=((e={},n={})=>{const t=n.locale??z();return t==="zh-CN"?bye():t==="fa"?yye():t==="ar"?xye():t==="es"?wye():t==="hi"?kye():vye()}),Sye=()=>"Exit Bash mode",Cye=()=>"退出 Bash 模式",Eye=()=>"خروج از حالت Bash",Nye=()=>"الخروج من وضع Bash",zye=()=>"Salir del modo Bash",jye=()=>"Bash मोड से बाहर निकलें",YE=((e={},n={})=>{const t=n.locale??z();return t==="zh-CN"?Cye():t==="fa"?Eye():t==="ar"?Nye():t==="es"?zye():t==="hi"?jye():Sye()}),Tye=()=>"Exit Plan mode",Aye=()=>"退出计划模式",Rye=()=>"خروج از حالت طرح",Mye=()=>"الخروج من وضع التخطيط",Oye=()=>"Salir del modo Plan",Dye=()=>"प्लान मोड से बाहर निकलें",ZE=((e={},n={})=>{const t=n.locale??z();return t==="zh-CN"?Aye():t==="fa"?Rye():t==="ar"?Mye():t==="es"?Oye():t==="hi"?Dye():Tye()}),Lye=()=>"Failed:",Iye=()=>"失败:",$ye=()=>"ناموفق:",Bye=()=>"فشل:",Pye=()=>"Error:",Fye=()=>"विफल:",Ak=((e={},n={})=>{const t=n.locale??z();return t==="zh-CN"?Iye():t==="fa"?$ye():t==="ar"?Bye():t==="es"?Pye():t==="hi"?Fye():Lye()}),Hye=()=>"Filter sessions",qye=()=>"筛选会话",Uye=()=>"فیلتر نشست‌ها",Gye=()=>"تصفية الجلسات",Vye=()=>"Filtrar sesiones",Kye=()=>"सेशन फ़िल्टर करें",JE=((e={},n={})=>{const t=n.locale??z();return t==="zh-CN"?qye():t==="fa"?Uye():t==="ar"?Gye():t==="es"?Vye():t==="hi"?Kye():Hye()}),Wye=()=>"is unavailable.",Qye=()=>"不可用。",Xye=()=>"در دسترس نیست.",Yye=()=>"غير متاح.",Zye=()=>"no está disponible.",Jye=()=>"उपलब्ध नहीं है।",exe=((e={},n={})=>{const t=n.locale??z();return t==="zh-CN"?Qye():t==="fa"?Xye():t==="ar"?Yye():t==="es"?Zye():t==="hi"?Jye():Wye()}),txe=()=>"Later queued messages will wait until this is retried or removed.",nxe=()=>"后续排队的消息会等待此消息重试或移除。",rxe=()=>"پیام‌های بعدی صف تا تلاش دوباره یا حذف این پیام منتظر می‌مانند.",sxe=()=>"ستنتظر الرسائل التالية في قائمة الانتظار حتى تُعاد المحاولة أو تُزال هذه الرسالة.",ixe=()=>"Los mensajes que están después en la cola esperarán hasta que este se reintente o se quite.",axe=()=>"बाद में कतार में लगे संदेश तब तक रुके रहेंगे जब तक इसे फिर से कोशिश न किया जाए या हटाया न जाए।",oxe=((e={},n={})=>{const t=n.locale??z();return t==="zh-CN"?nxe():t==="fa"?rxe():t==="ar"?sxe():t==="es"?ixe():t==="hi"?axe():txe()}),lxe=()=>"Listed files",cxe=()=>"已列出文件",uxe=()=>"فایل‌ها فهرست شد",_xe=()=>"سرد الملفات",fxe=()=>"Listó archivos",dxe=()=>"फ़ाइलों की सूची बनाई",eN=((e={},n={})=>{const t=n.locale??z();return t==="zh-CN"?cxe():t==="fa"?uxe():t==="ar"?_xe():t==="es"?fxe():t==="hi"?dxe():lxe()}),hxe=()=>"Listed project runs",pxe=()=>"已列出项目运行",mxe=()=>"اجراهای پروژه فهرست شد",gxe=()=>"سرد عمليات تشغيل المشروع",vxe=()=>"Listó las ejecuciones del proyecto",bxe=()=>"प्रोजेक्ट रन की सूची बनाई",yxe=((e={},n={})=>{const t=n.locale??z();return t==="zh-CN"?pxe():t==="fa"?mxe():t==="ar"?gxe():t==="es"?vxe():t==="hi"?bxe():hxe()}),xxe=()=>"Listed projects",wxe=()=>"已列出项目",kxe=()=>"پروژه‌ها فهرست شد",Sxe=()=>"سرد المشاريع",Cxe=()=>"Listó proyectos",Exe=()=>"प्रोजेक्ट की सूची बनाई",Nxe=((e={},n={})=>{const t=n.locale??z();return t==="zh-CN"?wxe():t==="fa"?kxe():t==="ar"?Sxe():t==="es"?Cxe():t==="hi"?Exe():xxe()}),zxe=()=>"Loading conversation…",jxe=()=>"正在加载对话…",Txe=()=>"در حال بارگیری گفتگو…",Axe=()=>"جارٍ تحميل المحادثة…",Rxe=()=>"Cargando conversación…",Mxe=()=>"बातचीत लोड हो रही है…",Oxe=((e={},n={})=>{const t=n.locale??z();return t==="zh-CN"?jxe():t==="fa"?Txe():t==="ar"?Axe():t==="es"?Rxe():t==="hi"?Mxe():zxe()}),Dxe=()=>"New Chat",Lxe=()=>"新对话",Ixe=()=>"گفتگوی جدید",$xe=()=>"محادثة جديدة",Bxe=()=>"Nuevo chat",Pxe=()=>"नई चैट",Fxe=((e={},n={})=>{const t=n.locale??z();return t==="zh-CN"?Lxe():t==="fa"?Ixe():t==="ar"?$xe():t==="es"?Bxe():t==="hi"?Pxe():Dxe()}),Hxe=()=>"Next version",qxe=()=>"下一版本",Uxe=()=>"نسخهٔ بعدی",Gxe=()=>"النسخة التالية",Vxe=()=>"Siguiente versión",Kxe=()=>"अगला वर्शन",tN=((e={},n={})=>{const t=n.locale??z();return t==="zh-CN"?qxe():t==="fa"?Uxe():t==="ar"?Gxe():t==="es"?Vxe():t==="hi"?Kxe():Hxe()}),Wxe=()=>"Open the session this agent spawned",Qxe=()=>"打开此智能体创建的会话",Xxe=()=>"باز کردن نشست ساخته‌شده توسط این عامل",Yxe=()=>"فتح الجلسة التي أنشأها هذا الوكيل",Zxe=()=>"Abrir la sesión que creó este agente",Jxe=()=>"इस एजेंट द्वारा शुरू किया गया सेशन खोलें",e2e=((e={},n={})=>{const t=n.locale??z();return t==="zh-CN"?Qxe():t==="fa"?Xxe():t==="ar"?Yxe():t==="es"?Zxe():t==="hi"?Jxe():Wxe()}),t2e=()=>"Opened web pages",n2e=()=>"已打开网页",r2e=()=>"صفحه‌های وب باز شد",s2e=()=>"فتح صفحات ويب",i2e=()=>"Abrió páginas web",a2e=()=>"वेब पेज खोले",o2e=((e={},n={})=>{const t=n.locale??z();return t==="zh-CN"?n2e():t==="fa"?r2e():t==="ar"?s2e():t==="es"?i2e():t==="hi"?a2e():t2e()}),l2e=()=>"Plan",c2e=()=>"计划",u2e=()=>"طرح",_2e=()=>"خطة",f2e=()=>"Plan",d2e=()=>"प्लान",h2e=((e={},n={})=>{const t=n.locale??z();return t==="zh-CN"?c2e():t==="fa"?u2e():t==="ar"?_2e():t==="es"?f2e():t==="hi"?d2e():l2e()}),p2e=()=>"Plan approved",m2e=()=>"计划已批准",g2e=()=>"طرح تأیید شد",v2e=()=>"تمت الموافقة على الخطة",b2e=()=>"Plan aprobado",y2e=()=>"प्लान स्वीकृत",x2e=((e={},n={})=>{const t=n.locale??z();return t==="zh-CN"?m2e():t==="fa"?g2e():t==="ar"?v2e():t==="es"?b2e():t==="hi"?y2e():p2e()}),w2e=()=>"Plan rejected",k2e=()=>"计划已拒绝",S2e=()=>"طرح رد شد",C2e=()=>"رُفضت الخطة",E2e=()=>"Plan rechazado",N2e=()=>"प्लान अस्वीकृत",z2e=((e={},n={})=>{const t=n.locale??z();return t==="zh-CN"?k2e():t==="fa"?S2e():t==="ar"?C2e():t==="es"?E2e():t==="hi"?N2e():w2e()}),j2e=()=>"Plan resolved",T2e=()=>"计划已处理",A2e=()=>"طرح تعیین تکلیف شد",R2e=()=>"تمت معالجة الخطة",M2e=()=>"Plan resuelto",O2e=()=>"प्लान सुलझाया गया",D2e=((e={},n={})=>{const t=n.locale??z();return t==="zh-CN"?T2e():t==="fa"?A2e():t==="ar"?R2e():t==="es"?M2e():t==="hi"?O2e():j2e()}),L2e=()=>"Plan revision requested",I2e=()=>"已请求修改计划",$2e=()=>"درخواست بازنگری طرح ثبت شد",B2e=()=>"طُلب تعديل الخطة",P2e=()=>"Cambios en el plan solicitados",F2e=()=>"प्लान में बदलाव का अनुरोध",H2e=((e={},n={})=>{const t=n.locale??z();return t==="zh-CN"?I2e():t==="fa"?$2e():t==="ar"?B2e():t==="es"?P2e():t==="hi"?F2e():L2e()}),q2e=()=>"Previous version",U2e=()=>"上一版本",G2e=()=>"نسخهٔ قبلی",V2e=()=>"النسخة السابقة",K2e=()=>"Versión anterior",W2e=()=>"पिछला वर्शन",nN=((e={},n={})=>{const t=n.locale??z();return t==="zh-CN"?U2e():t==="fa"?G2e():t==="ar"?V2e():t==="es"?K2e():t==="hi"?W2e():q2e()}),Q2e=()=>"Ran a command",X2e=()=>"已运行命令",Y2e=()=>"فرمان اجرا شد",Z2e=()=>"نفّذ أمرًا",J2e=()=>"Ejecutó un comando",ewe=()=>"एक कमांड चलाई",twe=((e={},n={})=>{const t=n.locale??z();return t==="zh-CN"?X2e():t==="fa"?Y2e():t==="ar"?Z2e():t==="es"?J2e():t==="hi"?ewe():Q2e()}),nwe=()=>"Ran tests",rwe=()=>"已运行测试",swe=()=>"آزمون‌ها اجرا شد",iwe=()=>"شغّل الاختبارات",awe=()=>"Ejecutó tests",owe=()=>"टेस्ट चलाए",lwe=((e={},n={})=>{const t=n.locale??z();return t==="zh-CN"?rwe():t==="fa"?swe():t==="ar"?iwe():t==="es"?awe():t==="hi"?owe():nwe()}),cwe=()=>"Read a file",uwe=()=>"已读取文件",_we=()=>"فایل خوانده شد",fwe=()=>"قرأ ملفًا",dwe=()=>"Leyó un archivo",hwe=()=>"एक फ़ाइल पढ़ी",pwe=((e={},n={})=>{const t=n.locale??z();return t==="zh-CN"?uwe():t==="fa"?_we():t==="ar"?fwe():t==="es"?dwe():t==="hi"?hwe():cwe()}),mwe=()=>"Read Git history",gwe=()=>"已读取 Git 历史",vwe=()=>"تاریخچهٔ Git خوانده شد",bwe=()=>"قرأ سجل Git",ywe=()=>"Leyó el historial de Git",xwe=()=>"Git इतिहास पढ़ा",wwe=((e={},n={})=>{const t=n.locale??z();return t==="zh-CN"?gwe():t==="fa"?vwe():t==="ar"?bwe():t==="es"?ywe():t==="hi"?xwe():mwe()}),kwe=()=>"Read project details",Swe=()=>"已读取项目详情",Cwe=()=>"جزئیات پروژه خوانده شد",Ewe=()=>"قرأ تفاصيل المشروع",Nwe=()=>"Leyó los detalles del proyecto",zwe=()=>"प्रोजेक्ट विवरण पढ़ा",jwe=((e={},n={})=>{const t=n.locale??z();return t==="zh-CN"?Swe():t==="fa"?Cwe():t==="ar"?Ewe():t==="es"?Nwe():t==="hi"?zwe():kwe()}),Twe=()=>"Reject",Awe=()=>"拒绝",Rwe=()=>"رد کردن",Mwe=()=>"رفض",Owe=()=>"Rechazar",Dwe=()=>"अस्वीकार करें",Lwe=((e={},n={})=>{const t=n.locale??z();return t==="zh-CN"?Awe():t==="fa"?Rwe():t==="ar"?Mwe():t==="es"?Owe():t==="hi"?Dwe():Twe()}),Iwe=()=>"Remove",$we=()=>"移除",Bwe=()=>"حذف",Pwe=()=>"إزالة",Fwe=()=>"Quitar",Hwe=()=>"हटाएं",qwe=((e={},n={})=>{const t=n.locale??z();return t==="zh-CN"?$we():t==="fa"?Bwe():t==="ar"?Pwe():t==="es"?Fwe():t==="hi"?Hwe():Iwe()}),Uwe=()=>"Remove annotation",Gwe=()=>"移除批注",Vwe=()=>"حذف یادداشت",Kwe=()=>"إزالة التعليق",Wwe=()=>"Quitar anotación",Qwe=()=>"एनोटेशन हटाएं",Xwe=((e={},n={})=>{const t=n.locale??z();return t==="zh-CN"?Gwe():t==="fa"?Vwe():t==="ar"?Kwe():t==="es"?Wwe():t==="hi"?Qwe():Uwe()}),Ywe=()=>"Remove file",Zwe=()=>"移除文件",Jwe=()=>"حذف فایل",e4e=()=>"إزالة الملف",t4e=()=>"Quitar archivo",n4e=()=>"फ़ाइल हटाएं",rN=((e={},n={})=>{const t=n.locale??z();return t==="zh-CN"?Zwe():t==="fa"?Jwe():t==="ar"?e4e():t==="es"?t4e():t==="hi"?n4e():Ywe()}),r4e=()=>"Remove image",s4e=()=>"移除图片",i4e=()=>"حذف تصویر",a4e=()=>"إزالة الصورة",o4e=()=>"Quitar imagen",l4e=()=>"इमेज हटाएं",sN=((e={},n={})=>{const t=n.locale??z();return t==="zh-CN"?s4e():t==="fa"?i4e():t==="ar"?a4e():t==="es"?o4e():t==="hi"?l4e():r4e()}),c4e=()=>"Remove queued message",u4e=()=>"移除排队消息",_4e=()=>"حذف پیام صف",f4e=()=>"إزالة الرسالة من قائمة الانتظار",d4e=()=>"Quitar mensaje en cola",h4e=()=>"कतार में लगा संदेश हटाएं",iN=((e={},n={})=>{const t=n.locale??z();return t==="zh-CN"?u4e():t==="fa"?_4e():t==="ar"?f4e():t==="es"?d4e():t==="hi"?h4e():c4e()}),p4e=()=>"Rename",m4e=()=>"重命名",g4e=()=>"تغییر نام",v4e=()=>"إعادة تسمية",b4e=()=>"Renombrar",y4e=()=>"नाम बदलें",sD=((e={},n={})=>{const t=n.locale??z();return t==="zh-CN"?m4e():t==="fa"?g4e():t==="ar"?v4e():t==="es"?b4e():t==="hi"?y4e():p4e()}),x4e=()=>"Reviewed code changes",w4e=()=>"已审查代码更改",k4e=()=>"تغییرات کد بازبینی شد",S4e=()=>"راجع تغييرات الشيفرة",C4e=()=>"Revisó cambios en el código",E4e=()=>"कोड में बदलावों की समीक्षा की",N4e=((e={},n={})=>{const t=n.locale??z();return t==="zh-CN"?w4e():t==="fa"?k4e():t==="ar"?S4e():t==="es"?C4e():t==="hi"?E4e():x4e()}),z4e=()=>"Run",j4e=()=>"运行",T4e=()=>"اجرا",A4e=()=>"تشغيل",R4e=()=>"Ejecutar",M4e=()=>"रन",aN=((e={},n={})=>{const t=n.locale??z();return t==="zh-CN"?j4e():t==="fa"?T4e():t==="ar"?A4e():t==="es"?R4e():t==="hi"?M4e():z4e()}),O4e=()=>"Selected chat text",D4e=()=>"已选聊天文本",L4e=()=>"متن انتخاب‌شدهٔ گفتگو",I4e=()=>"النص المحدد من المحادثة",$4e=()=>"Texto seleccionado del chat",B4e=()=>"चयनित चैट टेक्स्ट",P4e=((e={},n={})=>{const t=n.locale??z();return t==="zh-CN"?D4e():t==="fa"?L4e():t==="ar"?I4e():t==="es"?$4e():t==="hi"?B4e():O4e()}),F4e=()=>"Selected text:",H4e=()=>"已选文本:",q4e=()=>"متن انتخاب‌شده:",U4e=()=>"النص المحدد:",G4e=()=>"Texto seleccionado:",V4e=()=>"चयनित टेक्स्ट:",K4e=((e={},n={})=>{const t=n.locale??z();return t==="zh-CN"?H4e():t==="fa"?q4e():t==="ar"?U4e():t==="es"?G4e():t==="hi"?V4e():F4e()}),W4e=()=>"Send",Q4e=()=>"发送",X4e=()=>"ارسال",Y4e=()=>"إرسال رسالة",Z4e=()=>"Enviar",J4e=()=>"भेजें",Y4=((e={},n={})=>{const t=n.locale??z();return t==="zh-CN"?Q4e():t==="fa"?X4e():t==="ar"?Y4e():t==="es"?Z4e():t==="hi"?J4e():W4e()}),e3e=()=>"Session options",t3e=()=>"会话选项",n3e=()=>"گزینه‌های نشست",r3e=()=>"خيارات الجلسة",s3e=()=>"Opciones de la sesión",i3e=()=>"सेशन विकल्प",oN=((e={},n={})=>{const t=n.locale??z();return t==="zh-CN"?t3e():t==="fa"?n3e():t==="ar"?r3e():t==="es"?s3e():t==="hi"?i3e():e3e()}),a3e=()=>"Session title",o3e=()=>"会话标题",l3e=()=>"عنوان نشست",c3e=()=>"عنوان الجلسة",u3e=()=>"Título de la sesión",_3e=()=>"सेशन शीर्षक",f3e=((e={},n={})=>{const t=n.locale??z();return t==="zh-CN"?o3e():t==="fa"?l3e():t==="ar"?c3e():t==="es"?u3e():t==="hi"?_3e():a3e()}),d3e=()=>"Show sidebar",h3e=()=>"显示侧边栏",p3e=()=>"نمایش نوار کناری",m3e=()=>"إظهار الشريط الجانبي",g3e=()=>"Mostrar barra lateral",v3e=()=>"साइडबार दिखाएं",lN=((e={},n={})=>{const t=n.locale??z();return t==="zh-CN"?h3e():t==="fa"?p3e():t==="ar"?m3e():t==="es"?g3e():t==="hi"?v3e():d3e()}),b3e=()=>"Started an experiment run",y3e=()=>"已启动实验运行",x3e=()=>"اجرای آزمایش آغاز شد",w3e=()=>"بدأ تشغيل تجربة",k3e=()=>"Inició una ejecución de experimento",S3e=()=>"एक प्रयोग रन शुरू किया",C3e=((e={},n={})=>{const t=n.locale??z();return t==="zh-CN"?y3e():t==="fa"?x3e():t==="ar"?w3e():t==="es"?k3e():t==="hi"?S3e():b3e()}),E3e=()=>"I have a rough idea I want to explore. Ask me questions until we have a concrete, testable research question and a plan for the first experiment.",N3e=()=>"我有一个想探索的粗略想法。请不断向我提问,直到我们得到一个具体、可检验的研究问题和第一个实验的计划。",z3e=()=>"یک ایدهٔ خام دارم که می‌خواهم بررسی کنم. از من سؤال بپرس تا به یک پرسش پژوهشی مشخص و قابل آزمون و یک برنامه برای اولین آزمایش برسیم.",j3e=()=>"لديّ فكرة أولية أريد استكشافها. اطرح عليّ أسئلة حتى نصل إلى سؤال بحثي محدد وقابل للاختبار وخطة للتجربة الأولى.",T3e=()=>"Tengo una idea inicial que quiero explorar. Hazme preguntas hasta que tengamos una pregunta de investigación concreta y comprobable y un plan para el primer experimento.",A3e=()=>"मेरे पास एक अस्पष्ट विचार है जिसे मैं खोजना चाहता/चाहती हूँ। तब तक मुझसे सवाल पूछें जब तक हमारे पास एक ठोस, जाँचने-योग्य शोध प्रश्न और पहले प्रयोग की योजना न बन जाए।",R3e=((e={},n={})=>{const t=n.locale??z();return t==="zh-CN"?N3e():t==="fa"?z3e():t==="ar"?j3e():t==="es"?T3e():t==="hi"?A3e():E3e()}),M3e=()=>"Shape a research question",O3e=()=>"明确研究问题",D3e=()=>"شکل دادن به پرسش پژوهشی",L3e=()=>"صياغة سؤال بحثي",I3e=()=>"Definir una pregunta de investigación",$3e=()=>"एक शोध प्रश्न तैयार करें",B3e=((e={},n={})=>{const t=n.locale??z();return t==="zh-CN"?O3e():t==="fa"?D3e():t==="ar"?L3e():t==="es"?I3e():t==="hi"?$3e():M3e()}),P3e=()=>"Ask me for a topic, then search the literature on it, summarize the strongest baselines and open problems, and suggest where a small experiment could contribute.",F3e=()=>"先问我要研究的主题,然后检索相关文献,总结最强的基线方法和尚未解决的问题,并建议一个小实验可以在哪里做出贡献。",H3e=()=>"اول موضوع را از من بپرس، سپس ادبیات آن را جست‌وجو کن، قوی‌ترین خط‌های مبنا و مسائل باز را خلاصه کن و پیشنهاد بده یک آزمایش کوچک کجا می‌تواند مفید باشد.",q3e=()=>"اسألني عن الموضوع أولًا، ثم ابحث في الأدبيات حوله، ولخّص أقوى خطوط الأساس والمسائل المفتوحة، واقترح أين يمكن لتجربة صغيرة أن تسهم.",U3e=()=>"Pregúntame por un tema, busca publicaciones sobre él, resume los métodos de referencia más sólidos y los problemas abiertos, y sugiere dónde podría aportar un pequeño experimento.",G3e=()=>"पहले मुझसे एक विषय पूछें, फिर उस पर साहित्य खोजें, सबसे मज़बूत बेसलाइन और खुली समस्याओं का सार दें, और सुझाएं कि एक छोटा प्रयोग कहाँ योगदान दे सकता है।",V3e=((e={},n={})=>{const t=n.locale??z();return t==="zh-CN"?F3e():t==="fa"?H3e():t==="ar"?q3e():t==="es"?U3e():t==="hi"?G3e():P3e()}),K3e=()=>"Survey related work",W3e=()=>"调研相关工作",Q3e=()=>"مرور کارهای مرتبط",X3e=()=>"استعراض الأعمال ذات الصلة",Y3e=()=>"Revisar trabajos relacionados",Z3e=()=>"संबंधित कार्य का सर्वेक्षण करें",J3e=((e={},n={})=>{const t=n.locale??z();return t==="zh-CN"?W3e():t==="fa"?Q3e():t==="ar"?X3e():t==="es"?Y3e():t==="hi"?Z3e():K3e()}),e5e=()=>"Set up a minimal training script with a config, dependencies, and a run command that trains a small model end to end in a few minutes on one GPU.",t5e=()=>"搭建一个最小的训练脚本,包含配置、依赖和运行命令,能在单张 GPU 上几分钟内端到端训练一个小模型。",n5e=()=>"یک اسکریپت آموزش حداقلی با پیکربندی، وابستگی‌ها و دستور اجرا آماده کن که یک مدل کوچک را در چند دقیقه روی یک GPU به‌طور کامل آموزش دهد.",r5e=()=>"أنشئ أصغر سكربت تدريب ممكن مع إعدادات واعتماديات وأمر تشغيل يدرّب نموذجًا صغيرًا من البداية إلى النهاية في دقائق على وحدة GPU واحدة.",s5e=()=>"Prepara un script de entrenamiento mínimo con configuración, dependencias y un comando de ejecución que entrene un modelo pequeño de principio a fin en unos minutos con una GPU.",i5e=()=>"एक न्यूनतम ट्रेनिंग स्क्रिप्ट सेट अप करें, जिसमें एक कॉन्फ़िग, डिपेंडेंसी और एक रन कमांड हो, जो एक GPU पर कुछ ही मिनटों में एक छोटे मॉडल को पूरी तरह ट्रेन कर दे।",a5e=((e={},n={})=>{const t=n.locale??z();return t==="zh-CN"?t5e():t==="fa"?n5e():t==="ar"?r5e():t==="es"?s5e():t==="hi"?i5e():e5e()}),o5e=()=>"Scaffold a baseline",l5e=()=>"搭建基线",c5e=()=>"ساخت خط مبنا",u5e=()=>"بناء خط أساس",_5e=()=>"Crear un modelo de referencia",f5e=()=>"एक बेसलाइन तैयार करें",d5e=((e={},n={})=>{const t=n.locale??z();return t==="zh-CN"?l5e():t==="fa"?c5e():t==="ar"?u5e():t==="es"?_5e():t==="hi"?f5e():o5e()}),h5e=()=>"Pick one cheap, well-defined hypothesis from our plan, implement it as a variant of the baseline, and launch a first run to compare the two.",p5e=()=>"从我们的计划中选一个成本低、定义明确的假设,把它实现为基线的一个变体,并启动第一次运行来比较两者。",m5e=()=>"یک فرضیهٔ کم‌هزینه و مشخص از برنامه‌مان انتخاب کن، آن را به‌صورت یک نسخهٔ تغییریافته از خط مبنا پیاده کن و اولین اجرا را برای مقایسهٔ این دو شروع کن.",g5e=()=>"اختر فرضية واحدة منخفضة التكلفة ومحددة جيدًا من خطتنا، ونفّذها كنسخة معدّلة من خط الأساس، وابدأ أول تشغيل لمقارنة الاثنين.",v5e=()=>"Elige una hipótesis de nuestro plan que sea económica de probar y esté bien definida, impleméntala como una variante del modelo de referencia e inicia una primera ejecución para comparar ambas versiones.",b5e=()=>"हमारी योजना से एक सस्ती, स्पष्ट रूप से परिभाषित परिकल्पना चुनें, इसे बेसलाइन के एक वेरिएंट के रूप में लागू करें, और दोनों की तुलना के लिए पहला रन शुरू करें।",y5e=((e={},n={})=>{const t=n.locale??z();return t==="zh-CN"?p5e():t==="fa"?m5e():t==="ar"?g5e():t==="es"?v5e():t==="hi"?b5e():h5e()}),x5e=()=>"Run a first experiment",w5e=()=>"运行第一个实验",k5e=()=>"اجرای اولین آزمایش",S5e=()=>"تشغيل التجربة الأولى",C5e=()=>"Ejecutar un primer experimento",E5e=()=>"पहला प्रयोग चलाएं",N5e=((e={},n={})=>{const t=n.locale??z();return t==="zh-CN"?w5e():t==="fa"?k5e():t==="ar"?S5e():t==="es"?C5e():t==="hi"?E5e():x5e()}),z5e=()=>"Reading the project to suggest where to start…",j5e=()=>"正在阅读项目以建议从哪里开始…",T5e=()=>"در حال خواندن پروژه برای پیشنهاد نقطهٔ شروع…",A5e=()=>"جارٍ قراءة المشروع لاقتراح نقطة البدء…",R5e=()=>"Leyendo el proyecto para sugerir por dónde empezar…",M5e=()=>"कहाँ से शुरू करें यह सुझाने के लिए प्रोजेक्ट पढ़ा जा रहा है…",O5e=((e={},n={})=>{const t=n.locale??z();return t==="zh-CN"?j5e():t==="fa"?T5e():t==="ar"?A5e():t==="es"?R5e():t==="hi"?M5e():z5e()}),D5e=()=>"Starter prompts",L5e=()=>"入门提示",I5e=()=>"پیشنهادهای شروع",$5e=()=>"اقتراحات للبدء",B5e=()=>"Prompts para empezar",P5e=()=>"शुरुआती प्रॉम्प्ट",F5e=((e={},n={})=>{const t=n.locale??z();return t==="zh-CN"?L5e():t==="fa"?I5e():t==="ar"?$5e():t==="es"?B5e():t==="hi"?P5e():D5e()}),H5e=()=>"Stop",q5e=()=>"停止",U5e=()=>"توقف",G5e=()=>"إيقاف",V5e=()=>"Detener",K5e=()=>"रोकें",cN=((e={},n={})=>{const t=n.locale??z();return t==="zh-CN"?q5e():t==="fa"?U5e():t==="ar"?G5e():t==="es"?V5e():t==="hi"?K5e():H5e()}),W5e=()=>"Submit",Q5e=()=>"提交",X5e=()=>"ارسال",Y5e=()=>"إرسال",Z5e=()=>"Enviar",J5e=()=>"सबमिट करें",eke=((e={},n={})=>{const t=n.locale??z();return t==="zh-CN"?Q5e():t==="fa"?X5e():t==="ar"?Y5e():t==="es"?Z5e():t==="hi"?J5e():W5e()}),tke=()=>"Tool failed",nke=()=>"工具失败",rke=()=>"ابزار ناموفق بود",ske=()=>"فشلت الأداة",ike=()=>"Error en la herramienta",ake=()=>"टूल विफल",oke=((e={},n={})=>{const t=n.locale??z();return t==="zh-CN"?nke():t==="fa"?rke():t==="ar"?ske():t==="es"?ike():t==="hi"?ake():tke()}),lke=()=>"Used tools",cke=()=>"已使用工具",uke=()=>"ابزارها استفاده شد",_ke=()=>"استخدم الأدوات",fke=()=>"Usó herramientas",dke=()=>"टूल इस्तेमाल किए",iD=((e={},n={})=>{const t=n.locale??z();return t==="zh-CN"?cke():t==="fa"?uke():t==="ar"?_ke():t==="es"?fke():t==="hi"?dke():lke()}),hke=()=>"View full plan",pke=()=>"查看完整计划",mke=()=>"مشاهدهٔ طرح کامل",gke=()=>"عرض الخطة كاملة",vke=()=>"Ver plan completo",bke=()=>"पूरा प्लान देखें",yke=((e={},n={})=>{const t=n.locale??z();return t==="zh-CN"?pke():t==="fa"?mke():t==="ar"?gke():t==="es"?vke():t==="hi"?bke():hke()}),xke=()=>"Waited for an experiment run",wke=()=>"已等待实验运行",kke=()=>"برای اجرای آزمایش صبر شد",Ske=()=>"انتظر تشغيل تجربة",Cke=()=>"Esperó a una ejecución de experimento",Eke=()=>"एक प्रयोग रन का इंतज़ार किया",Nke=((e={},n={})=>{const t=n.locale??z();return t==="zh-CN"?wke():t==="fa"?kke():t==="ar"?Ske():t==="es"?Cke():t==="hi"?Eke():xke()}),zke=()=>"Waiting for your input…",jke=()=>"正在等待你的输入…",Tke=()=>"منتظر ورودی شما…",Ake=()=>"في انتظار إدخالك…",Rke=()=>"Esperando tu respuesta…",Mke=()=>"आपके इनपुट का इंतज़ार है…",Oke=((e={},n={})=>{const t=n.locale??z();return t==="zh-CN"?jke():t==="fa"?Tke():t==="ar"?Ake():t==="es"?Rke():t==="hi"?Mke():zke()}),Dke=()=>"What should we research?",Lke=()=>"我们应该研究什么?",Ike=()=>"چه چیزی را پژوهش کنیم؟",$ke=()=>"ما الذي نبحثه؟",Bke=()=>"¿Qué investigamos?",Pke=()=>"हमें क्या शोध करना चाहिए?",Fke=((e={},n={})=>{const t=n.locale??z();return t==="zh-CN"?Lke():t==="fa"?Ike():t==="ar"?$ke():t==="es"?Bke():t==="hi"?Pke():Dke()}),Hke=()=>"You, mid-task",qke=()=>"你(任务进行中)",Uke=()=>"شما، هنگام انجام وظیفه",Gke=()=>"أنت، أثناء المهمة",Vke=()=>"Tú, durante la tarea",Kke=()=>"आप, टास्क के बीच में",Wke=((e={},n={})=>{const t=n.locale??z();return t==="zh-CN"?qke():t==="fa"?Uke():t==="ar"?Gke():t==="es"?Vke():t==="hi"?Kke():Hke()}),Qke=()=>"Pasted image",Xke=()=>"粘贴的图片",Yke=()=>"تصویر جای‌گذاری‌شده",Zke=()=>"صورة ملصقة",Jke=()=>"Imagen pegada",eSe=()=>"पेस्ट की गई इमेज",aD=((e={},n={})=>{const t=n.locale??z();return t==="zh-CN"?Xke():t==="fa"?Yke():t==="ar"?Zke():t==="es"?Jke():t==="hi"?eSe():Qke()}),tSe=()=>"Plan",nSe=()=>"计划",rSe=()=>"طرح",sSe=()=>"خطة",iSe=()=>"Plan",aSe=()=>"प्लान",oD=((e={},n={})=>{const t=n.locale??z();return t==="zh-CN"?nSe():t==="fa"?rSe():t==="ar"?sSe():t==="es"?iSe():t==="hi"?aSe():tSe()}),oSe=()=>"Plan mode — ready to proceed?",lSe=()=>"计划模式 — 准备好继续了吗?",cSe=()=>"حالت طرح — آماده‌اید ادامه دهید؟",uSe=()=>"وضع التخطيط — جاهز للمتابعة؟",_Se=()=>"Modo Plan — ¿listo para continuar?",fSe=()=>"प्लान मोड — आगे बढ़ने के लिए तैयार?",dSe=((e={},n={})=>{const t=n.locale??z();return t==="zh-CN"?lSe():t==="fa"?cSe():t==="ar"?uSe():t==="es"?_Se():t==="hi"?fSe():oSe()}),hSe=()=>"Proposed plan",pSe=()=>"提议的计划",mSe=()=>"طرح پیشنهادی",gSe=()=>"خطة مقترحة",vSe=()=>"Plan propuesto",bSe=()=>"प्रस्तावित प्लान",uN=((e={},n={})=>{const t=n.locale??z();return t==="zh-CN"?pSe():t==="fa"?mSe():t==="ar"?gSe():t==="es"?vSe():t==="hi"?bSe():hSe()}),ySe=()=>"Question",xSe=()=>"问题",wSe=()=>"پرسش",kSe=()=>"سؤال",SSe=()=>"Pregunta",CSe=()=>"प्रश्न",ESe=((e={},n={})=>{const t=n.locale??z();return t==="zh-CN"?xSe():t==="fa"?wSe():t==="ar"?kSe():t==="es"?SSe():t==="hi"?CSe():ySe()}),NSe=()=>"Queued",zSe=()=>"已排队",jSe=()=>"در صف",TSe=()=>"في قائمة الانتظار",ASe=()=>"En cola",RSe=()=>"कतार में",MSe=((e={},n={})=>{const t=n.locale??z();return t==="zh-CN"?zSe():t==="fa"?jSe():t==="ar"?TSe():t==="es"?ASe():t==="hi"?RSe():NSe()}),OSe=()=>"Recents",DSe=()=>"最近",LSe=()=>"اخیر",ISe=()=>"الأخيرة",$Se=()=>"Recientes",BSe=()=>"हाल की",lD=((e={},n={})=>{const t=n.locale??z();return t==="zh-CN"?DSe():t==="fa"?LSe():t==="ar"?ISe():t==="es"?$Se():t==="hi"?BSe():OSe()}),PSe=()=>"Re-check its setup.",FSe=()=>"请重新检查其设置。",HSe=()=>"راه‌اندازی آن را دوباره بررسی کنید.",qSe=()=>"أعد فحص إعداده.",USe=()=>"Vuelve a comprobar su configuración.",GSe=()=>"इसका सेटअप फिर से जाँचें।",VSe=((e={},n={})=>{const t=n.locale??z();return t==="zh-CN"?FSe():t==="fa"?HSe():t==="ar"?qSe():t==="es"?USe():t==="hi"?GSe():PSe()}),KSe=()=>"Could not recover this turn. Try again.",WSe=()=>"无法恢复本轮。请重试。",QSe=()=>"بازیابی این نوبت ممکن نشد. دوباره تلاش کنید.",XSe=()=>"تعذّرت استعادة هذه الجولة. حاول مجددًا.",YSe=()=>"No se pudo recuperar este turno. Inténtalo de nuevo.",ZSe=()=>"यह टर्न रिकवर नहीं हो सका। फिर से कोशिश करें।",JSe=((e={},n={})=>{const t=n.locale??z();return t==="zh-CN"?WSe():t==="fa"?QSe():t==="ar"?XSe():t==="es"?YSe():t==="hi"?ZSe():KSe()}),e6e=()=>"Could not remove the queued message. Try again.",t6e=()=>"无法移除排队消息。请重试。",n6e=()=>"حذف پیام در صف ممکن نشد. دوباره تلاش کنید.",r6e=()=>"تعذّرت إزالة الرسالة من قائمة الانتظار. حاول مجددًا.",s6e=()=>"No se pudo quitar el mensaje en cola. Inténtalo de nuevo.",i6e=()=>"कतार में लगा संदेश हटाया नहीं जा सका। फिर से कोशिश करें।",a6e=((e={},n={})=>{const t=n.locale??z();return t==="zh-CN"?t6e():t==="fa"?n6e():t==="ar"?r6e():t==="es"?s6e():t==="hi"?i6e():e6e()}),o6e=e=>`Could not re-send: ${e==null?void 0:e.error}`,l6e=e=>`无法重新发送:${e==null?void 0:e.error}`,c6e=e=>`ارسال دوباره ممکن نشد: ${e==null?void 0:e.error}`,u6e=e=>`تعذّرت إعادة الإرسال: ${e==null?void 0:e.error}`,_6e=e=>`No se pudo reenviar: ${e==null?void 0:e.error}`,f6e=e=>`फिर से नहीं भेजा जा सका: ${e==null?void 0:e.error}`,d6e=((e,n={})=>{const t=n.locale??z();return t==="zh-CN"?l6e(e):t==="fa"?c6e(e):t==="ar"?u6e(e):t==="es"?_6e(e):t==="hi"?f6e(e):o6e(e)}),h6e=()=>"Resolved",p6e=()=>"已处理",m6e=()=>"رسیدگی شد",g6e=()=>"مُعالَج",v6e=()=>"Resuelto",b6e=()=>"सुलझाया गया",y6e=((e={},n={})=>{const t=n.locale??z();return t==="zh-CN"?p6e():t==="fa"?m6e():t==="ar"?g6e():t==="es"?v6e():t==="hi"?b6e():h6e()}),x6e=()=>"Could not retry the queued message. Try again.",w6e=()=>"无法重试排队消息。请重试。",k6e=()=>"تلاش دوباره برای پیام در صف ممکن نشد. دوباره تلاش کنید.",S6e=()=>"تعذّرت إعادة محاولة إرسال الرسالة في قائمة الانتظار. حاول مجددًا.",C6e=()=>"No se pudo reintentar el mensaje en cola. Inténtalo de nuevo.",E6e=()=>"कतार में लगा संदेश फिर से नहीं भेजा जा सका। फिर से कोशिश करें।",N6e=((e={},n={})=>{const t=n.locale??z();return t==="zh-CN"?w6e():t==="fa"?k6e():t==="ar"?S6e():t==="es"?C6e():t==="hi"?E6e():x6e()}),z6e=()=>"run logs",j6e=()=>"运行日志",T6e=()=>"گزارش‌های اجرا",A6e=()=>"سجلات التشغيل",R6e=()=>"logs de ejecución",M6e=()=>"रन लॉग",O6e=((e={},n={})=>{const t=n.locale??z();return t==="zh-CN"?j6e():t==="fa"?T6e():t==="ar"?A6e():t==="es"?R6e():t==="hi"?M6e():z6e()}),D6e=()=>"Scroll to bottom",L6e=()=>"滚动到底部",I6e=()=>"رفتن به پایین گفتگو",$6e=()=>"التمرير إلى الأسفل",B6e=()=>"Ir al final",P6e=()=>"नीचे तक स्क्रॉल करें",_N=((e={},n={})=>{const t=n.locale??z();return t==="zh-CN"?L6e():t==="fa"?I6e():t==="ar"?$6e():t==="es"?B6e():t==="hi"?P6e():D6e()}),F6e=()=>"The selected harness is unavailable",H6e=()=>"所选智能体工具不可用",q6e=()=>"ابزار عامل انتخاب‌شده در دسترس نیست",U6e=()=>"أداة البرمجة المحددة غير متاحة",G6e=()=>"El agente seleccionado no está disponible",V6e=()=>"चुना गया हार्नेस उपलब्ध नहीं है",q2=((e={},n={})=>{const t=n.locale??z();return t==="zh-CN"?H6e():t==="fa"?q6e():t==="ar"?U6e():t==="es"?G6e():t==="hi"?V6e():F6e()}),K6e=()=>"Session limit reached",W6e=()=>"已达到会话使用限额",Q6e=()=>"به سقف مصرف نشست رسیده‌اید",X6e=()=>"تم بلوغ حد الاستخدام",Y6e=()=>"Límite de la sesión alcanzado",Z6e=()=>"सेशन सीमा पूरी हो गई",J6e=((e={},n={})=>{const t=n.locale??z();return t==="zh-CN"?W6e():t==="fa"?Q6e():t==="ar"?X6e():t==="es"?Y6e():t==="hi"?Z6e():K6e()}),e7e=()=>"The chat session was not created",t7e=()=>"未能创建聊天会话",n7e=()=>"نشست گفت‌وگو ایجاد نشد",r7e=()=>"لم تُنشأ جلسة المحادثة",s7e=()=>"No se creó la sesión de chat",i7e=()=>"चैट सेशन नहीं बनाया गया",a7e=((e={},n={})=>{const t=n.locale??z();return t==="zh-CN"?t7e():t==="fa"?n7e():t==="ar"?r7e():t==="es"?s7e():t==="hi"?i7e():e7e()}),o7e=()=>"Show full conversation",l7e=()=>"显示完整对话",c7e=()=>"نمایش کامل گفتگو",u7e=()=>"عرض المحادثة كاملة",_7e=()=>"Mostrar la conversación completa",f7e=()=>"पूरी बातचीत दिखाएं",d7e=((e={},n={})=>{const t=n.locale??z();return t==="zh-CN"?l7e():t==="fa"?c7e():t==="ar"?u7e():t==="es"?_7e():t==="hi"?f7e():o7e()}),h7e=()=>" · Spawned by another agent",p7e=()=>" · 由另一个智能体创建",m7e=()=>" · ساخته‌شده به‌دست عامل دیگر",g7e=()=>" · أنشأه وكيل آخر",v7e=()=>" · Creada por otro agente",b7e=()=>" · किसी और एजेंट द्वारा शुरू किया गया",y7e=((e={},n={})=>{const t=n.locale??z();return t==="zh-CN"?p7e():t==="fa"?m7e():t==="ar"?g7e():t==="es"?v7e():t==="hi"?b7e():h7e()}),x7e=()=>"Starting…",w7e=()=>"正在启动…",k7e=()=>"در حال شروع…",S7e=()=>"جارٍ البدء…",C7e=()=>"Iniciando…",E7e=()=>"शुरू हो रहा है…",N7e=((e={},n={})=>{const t=n.locale??z();return t==="zh-CN"?w7e():t==="fa"?k7e():t==="ar"?S7e():t==="es"?C7e():t==="hi"?E7e():x7e()}),z7e=e=>`Steer ${e==null?void 0:e.harness}… (${e==null?void 0:e.shortcut} to queue)`,j7e=e=>`向 ${e==null?void 0:e.harness} 补充指示…(按 ${e==null?void 0:e.shortcut} 排队)`,T7e=e=>`راهنمایی ${e==null?void 0:e.harness}… (${e==null?void 0:e.shortcut} برای افزودن به صف)`,A7e=e=>`وجّه ${e==null?void 0:e.harness}… (${e==null?void 0:e.shortcut} للإضافة إلى قائمة الانتظار)`,R7e=e=>`Guía a ${e==null?void 0:e.harness}… (${e==null?void 0:e.shortcut} para poner en cola)`,M7e=e=>`${e==null?void 0:e.harness} को दिशा दें… (कतार में लगाने के लिए ${e==null?void 0:e.shortcut})`,O7e=((e,n={})=>{const t=n.locale??z();return t==="zh-CN"?j7e(e):t==="fa"?T7e(e):t==="ar"?A7e(e):t==="es"?R7e(e):t==="hi"?M7e(e):z7e(e)}),D7e=()=>"Could not stop the turn. Try again.",L7e=()=>"无法停止本轮。请重试。",I7e=()=>"توقف این نوبت ممکن نشد. دوباره تلاش کنید.",$7e=()=>"تعذّر إيقاف الجولة. حاول مجددًا.",B7e=()=>"No se pudo detener el turno. Inténtalo de nuevo.",P7e=()=>"टर्न रोका नहीं जा सका। फिर से कोशिश करें।",F7e=((e={},n={})=>{const t=n.locale??z();return t==="zh-CN"?L7e():t==="fa"?I7e():t==="ar"?$7e():t==="es"?B7e():t==="hi"?P7e():D7e()}),H7e=e=>`Could not switch fork: ${e==null?void 0:e.error}`,q7e=e=>`无法切换分支:${e==null?void 0:e.error}`,U7e=e=>`تغییر شاخه ممکن نشد: ${e==null?void 0:e.error}`,G7e=e=>`تعذّر تبديل التفرّع: ${e==null?void 0:e.error}`,V7e=e=>`No se pudo cambiar de bifurcación: ${e==null?void 0:e.error}`,K7e=e=>`फ़ोर्क नहीं बदला जा सका: ${e==null?void 0:e.error}`,W7e=((e,n={})=>{const t=n.locale??z();return t==="zh-CN"?q7e(e):t==="fa"?U7e(e):t==="ar"?G7e(e):t==="es"?V7e(e):t==="hi"?K7e(e):H7e(e)}),Q7e=()=>"The agent",X7e=()=>"智能体",Y7e=()=>"عامل",Z7e=()=>"الوكيل",J7e=()=>"El agente",eCe=()=>"एजेंट",tCe=((e={},n={})=>{const t=n.locale??z();return t==="zh-CN"?X7e():t==="fa"?Y7e():t==="ar"?Z7e():t==="es"?J7e():t==="hi"?eCe():Q7e()}),nCe=()=>"Thinking",rCe=()=>"正在思考",sCe=()=>"در حال فکر کردن",iCe=()=>"جارٍ التفكير",aCe=()=>"Pensando",oCe=()=>"सोच रहा है",lCe=((e={},n={})=>{const t=n.locale??z();return t==="zh-CN"?rCe():t==="fa"?sCe():t==="ar"?iCe():t==="es"?aCe():t==="hi"?oCe():nCe()}),cCe=()=>"Could not toggle Plan mode. Try again.",uCe=()=>"无法切换计划模式。请重试。",_Ce=()=>"تغییر حالت طرح ممکن نشد. دوباره تلاش کنید.",fCe=()=>"تعذّر تبديل وضع التخطيط. حاول مجددًا.",dCe=()=>"No se pudo cambiar el modo Plan. Inténtalo de nuevo.",hCe=()=>"प्लान मोड टॉगल नहीं हो सका। फिर से कोशिश करें।",fN=((e={},n={})=>{const t=n.locale??z();return t==="zh-CN"?uCe():t==="fa"?_Ce():t==="ar"?fCe():t==="es"?dCe():t==="hi"?hCe():cCe()}),pCe=()=>"This turn did not finish.",mCe=()=>"本轮未完成。",gCe=()=>"این نوبت کامل نشد.",vCe=()=>"لم تكتمل هذه الجولة.",bCe=()=>"Este turno no terminó.",yCe=()=>"यह टर्न पूरा नहीं हुआ।",dN=((e={},n={})=>{const t=n.locale??z();return t==="zh-CN"?mCe():t==="fa"?gCe():t==="ar"?vCe():t==="es"?bCe():t==="hi"?yCe():pCe()}),xCe=()=>"Type a custom answer…",wCe=()=>"输入自定义回答…",kCe=()=>"پاسخ دلخواه را بنویسید…",SCe=()=>"اكتب إجابة مخصصة…",CCe=()=>"Escribe una respuesta personalizada…",ECe=()=>"अपना जवाब टाइप करें…",NCe=((e={},n={})=>{const t=n.locale??z();return t==="zh-CN"?wCe():t==="fa"?kCe():t==="ar"?SCe():t==="es"?CCe():t==="hi"?ECe():xCe()}),zCe=()=>"Unarchive",jCe=()=>"取消归档",TCe=()=>"خارج کردن از بایگانی",ACe=()=>"إلغاء الأرشفة",RCe=()=>"Desarchivar",MCe=()=>"आर्काइव से निकालें",OCe=((e={},n={})=>{const t=n.locale??z();return t==="zh-CN"?jCe():t==="fa"?TCe():t==="ar"?ACe():t==="es"?RCe():t==="hi"?MCe():zCe()}),DCe=()=>"Untitled",LCe=()=>"未命名",ICe=()=>"بدون عنوان",$Ce=()=>"بدون عنوان",BCe=()=>"Sin título",PCe=()=>"बिना शीर्षक",Fg=((e={},n={})=>{const t=n.locale??z();return t==="zh-CN"?LCe():t==="fa"?ICe():t==="ar"?$Ce():t==="es"?BCe():t==="hi"?PCe():DCe()}),FCe=()=>"Could not update permissions. Try again.",HCe=()=>"无法更新权限。请重试。",qCe=()=>"به‌روزرسانی مجوزها انجام نشد. دوباره تلاش کنید.",UCe=()=>"تعذّر تحديث الأذونات. حاول مجددًا.",GCe=()=>"No se pudieron actualizar los permisos. Inténtalo de nuevo.",VCe=()=>"अनुमतियाँ अपडेट नहीं हो सकीं। फिर से कोशिश करें।",KCe=((e={},n={})=>{const t=n.locale??z();return t==="zh-CN"?HCe():t==="fa"?qCe():t==="ar"?UCe():t==="es"?GCe():t==="hi"?VCe():FCe()}),WCe=()=>"Work details",QCe=()=>"工作详情",XCe=()=>"جزئیات کار",YCe=()=>"تفاصيل العمل",ZCe=()=>"Detalles del trabajo",JCe=()=>"काम का विवरण",e8e=((e={},n={})=>{const t=n.locale??z();return t==="zh-CN"?QCe():t==="fa"?XCe():t==="ar"?YCe():t==="es"?ZCe():t==="hi"?JCe():WCe()}),t8e=e=>`${e==null?void 0:e.minutes}m ${e==null?void 0:e.seconds}s`,n8e=e=>`${e==null?void 0:e.minutes}分${e==null?void 0:e.seconds}秒`,r8e=e=>`${e==null?void 0:e.minutes} دقیقه ${e==null?void 0:e.seconds} ثانیه`,s8e=e=>`${e==null?void 0:e.minutes}د ${e==null?void 0:e.seconds}ث`,i8e=e=>`${e==null?void 0:e.minutes} min ${e==null?void 0:e.seconds} s`,a8e=e=>`${e==null?void 0:e.minutes}मि ${e==null?void 0:e.seconds}से`,o8e=((e,n={})=>{const t=n.locale??z();return t==="zh-CN"?n8e(e):t==="fa"?r8e(e):t==="ar"?s8e(e):t==="es"?i8e(e):t==="hi"?a8e(e):t8e(e)}),l8e=e=>`Worked for ${e==null?void 0:e.duration}`,c8e=e=>`已工作 ${e==null?void 0:e.duration}`,u8e=e=>`به‌مدت ${e==null?void 0:e.duration} کار کرد`,_8e=e=>`عمل لمدة ${e==null?void 0:e.duration}`,f8e=e=>`Trabajó durante ${e==null?void 0:e.duration}`,d8e=e=>`${e==null?void 0:e.duration} तक काम किया`,h8e=((e,n={})=>{const t=n.locale??z();return t==="zh-CN"?c8e(e):t==="fa"?u8e(e):t==="ar"?_8e(e):t==="es"?f8e(e):t==="hi"?d8e(e):l8e(e)}),p8e=()=>"Working…",m8e=()=>"正在工作…",g8e=()=>"در حال کار…",v8e=()=>"جارٍ العمل…",b8e=()=>"Trabajando…",y8e=()=>"काम हो रहा है…",Rk=((e={},n={})=>{const t=n.locale??z();return t==="zh-CN"?m8e():t==="fa"?g8e():t==="ar"?v8e():t==="es"?b8e():t==="hi"?y8e():p8e()}),x8e=()=>"Close tab",w8e=()=>"关闭标签页",k8e=()=>"بستن زبانه",S8e=()=>"إغلاق التبويب",C8e=()=>"Cerrar pestaña",E8e=()=>"टैब बंद करें",N8e=((e={},n={})=>{const t=n.locale??z();return t==="zh-CN"?w8e():t==="fa"?k8e():t==="ar"?S8e():t==="es"?C8e():t==="hi"?E8e():x8e()}),z8e=()=>"Changes",j8e=()=>"更改",T8e=()=>"تغییرات",A8e=()=>"التغييرات",R8e=()=>"Cambios",M8e=()=>"बदलाव",cD=((e={},n={})=>{const t=n.locale??z();return t==="zh-CN"?j8e():t==="fa"?T8e():t==="ar"?A8e():t==="es"?R8e():t==="hi"?M8e():z8e()}),O8e=()=>"Code browser view",D8e=()=>"代码浏览器视图",L8e=()=>"نمای مرورگر کد",I8e=()=>"عرض متصفح الشيفرة",$8e=()=>"Vista del explorador de código",B8e=()=>"कोड ब्राउज़र व्यू",P8e=((e={},n={})=>{const t=n.locale??z();return t==="zh-CN"?D8e():t==="fa"?L8e():t==="ar"?I8e():t==="es"?$8e():t==="hi"?B8e():O8e()}),F8e=()=>"Files",H8e=()=>"文件",q8e=()=>"فایل‌ها",U8e=()=>"الملفات",G8e=()=>"Archivos",V8e=()=>"फ़ाइलें",K8e=((e={},n={})=>{const t=n.locale??z();return t==="zh-CN"?H8e():t==="fa"?q8e():t==="ar"?U8e():t==="es"?G8e():t==="hi"?V8e():F8e()}),W8e=()=>"Refresh",Q8e=()=>"刷新",X8e=()=>"تازه‌سازی",Y8e=()=>"تحديث",Z8e=()=>"Actualizar",J8e=()=>"रीफ़्रेश करें",hN=((e={},n={})=>{const t=n.locale??z();return t==="zh-CN"?Q8e():t==="fa"?X8e():t==="ar"?Y8e():t==="es"?Z8e():t==="hi"?J8e():W8e()}),e9e=()=>"listing truncated",t9e=()=>"列表已截断",n9e=()=>"فهرست کوتاه شده است",r9e=()=>"القائمة مقتطعة",s9e=()=>"listado truncado",i9e=()=>"सूची छोटी की गई",a9e=((e={},n={})=>{const t=n.locale??z();return t==="zh-CN"?t9e():t==="fa"?n9e():t==="ar"?r9e():t==="es"?s9e():t==="hi"?i9e():e9e()}),o9e=()=>"No files.",l9e=()=>"没有文件。",c9e=()=>"فایلی وجود ندارد.",u9e=()=>"لا توجد ملفات.",_9e=()=>"No hay archivos.",f9e=()=>"कोई फ़ाइल नहीं।",d9e=((e={},n={})=>{const t=n.locale??z();return t==="zh-CN"?l9e():t==="fa"?c9e():t==="ar"?u9e():t==="es"?_9e():t==="hi"?f9e():o9e()}),h9e=()=>"Refresh failed:",p9e=()=>"刷新失败:",m9e=()=>"تازه‌سازی ناموفق بود:",g9e=()=>"فشل التحديث:",v9e=()=>"Error al actualizar:",b9e=()=>"रीफ़्रेश विफल:",y9e=((e={},n={})=>{const t=n.locale??z();return t==="zh-CN"?p9e():t==="fa"?m9e():t==="ar"?g9e():t==="es"?v9e():t==="hi"?b9e():h9e()}),x9e=()=>"Cancelling…",w9e=()=>"正在取消…",k9e=()=>"در حال لغو…",S9e=()=>"جارٍ الإلغاء…",C9e=()=>"Cancelando…",E9e=()=>"रद्द हो रहा है…",N9e=((e={},n={})=>{const t=n.locale??z();return t==="zh-CN"?w9e():t==="fa"?k9e():t==="ar"?S9e():t==="es"?C9e():t==="hi"?E9e():x9e()}),z9e=()=>"Checking…",j9e=()=>"正在检查…",T9e=()=>"در حال بررسی…",A9e=()=>"جارٍ التحقق…",R9e=()=>"Comprobando…",M9e=()=>"जाँचा जा रहा है…",sa=((e={},n={})=>{const t=n.locale??z();return t==="zh-CN"?j9e():t==="fa"?T9e():t==="ar"?A9e():t==="es"?R9e():t==="hi"?M9e():z9e()}),O9e=()=>"Copied",D9e=()=>"已复制",L9e=()=>"کپی شد",I9e=()=>"تم النسخ",$9e=()=>"Copiado",B9e=()=>"कॉपी हो गया",m0=((e={},n={})=>{const t=n.locale??z();return t==="zh-CN"?D9e():t==="fa"?L9e():t==="ar"?I9e():t==="es"?$9e():t==="hi"?B9e():O9e()}),P9e=e=>`Failed to load: ${e==null?void 0:e.error}`,F9e=e=>`加载失败:${e==null?void 0:e.error}`,H9e=e=>`بارگذاری ناموفق بود: ${e==null?void 0:e.error}`,q9e=e=>`تعذّر التحميل: ${e==null?void 0:e.error}`,U9e=e=>`Error al cargar: ${e==null?void 0:e.error}`,G9e=e=>`लोड नहीं हो सका: ${e==null?void 0:e.error}`,uD=((e,n={})=>{const t=n.locale??z();return t==="zh-CN"?F9e(e):t==="fa"?H9e(e):t==="ar"?q9e(e):t==="es"?U9e(e):t==="hi"?G9e(e):P9e(e)}),V9e=()=>"Loading…",K9e=()=>"正在加载…",W9e=()=>"در حال بارگیری…",Q9e=()=>"جارٍ التحميل…",X9e=()=>"Cargando…",Y9e=()=>"लोड हो रहा है…",_D=((e={},n={})=>{const t=n.locale??z();return t==="zh-CN"?K9e():t==="fa"?W9e():t==="ar"?Q9e():t==="es"?X9e():t==="hi"?Y9e():V9e()}),Z9e=e=>`+ ${e==null?void 0:e.count} more`,J9e=e=>`另有 ${e==null?void 0:e.count} 项`,eEe=e=>`${e==null?void 0:e.count}+ مورد دیگر`,tEe=e=>`المزيد (+${e==null?void 0:e.count})`,nEe=e=>`+ ${e==null?void 0:e.count} más`,rEe=e=>`+ ${e==null?void 0:e.count} और`,sEe=((e,n={})=>{const t=n.locale??z();return t==="zh-CN"?J9e(e):t==="fa"?eEe(e):t==="ar"?tEe(e):t==="es"?nEe(e):t==="hi"?rEe(e):Z9e(e)}),iEe=()=>"Rendered view",aEe=()=>"渲染视图",oEe=()=>"نمای رندرشده",lEe=()=>"العرض المُنسَّق",cEe=()=>"Vista renderizada",uEe=()=>"रेंडर किया गया व्यू",pv=((e={},n={})=>{const t=n.locale??z();return t==="zh-CN"?aEe():t==="fa"?oEe():t==="ar"?lEe():t==="es"?cEe():t==="hi"?uEe():iEe()}),_Ee=()=>"Save",fEe=()=>"保存",dEe=()=>"ذخیره",hEe=()=>"حفظ",pEe=()=>"Guardar",mEe=()=>"सेव करें",Yo=((e={},n={})=>{const t=n.locale??z();return t==="zh-CN"?fEe():t==="fa"?dEe():t==="ar"?hEe():t==="es"?pEe():t==="hi"?mEe():_Ee()}),gEe=()=>"Saving…",vEe=()=>"正在保存…",bEe=()=>"در حال ذخیره…",yEe=()=>"جارٍ الحفظ…",xEe=()=>"Guardando…",wEe=()=>"सेव हो रहा है…",la=((e={},n={})=>{const t=n.locale??z();return t==="zh-CN"?vEe():t==="fa"?bEe():t==="ar"?yEe():t==="es"?xEe():t==="hi"?wEe():gEe()}),kEe=()=>"Show less",SEe=()=>"收起",CEe=()=>"نمایش کمتر",EEe=()=>"عرض أقل",NEe=()=>"Mostrar menos",zEe=()=>"कम दिखाएं",fD=((e={},n={})=>{const t=n.locale??z();return t==="zh-CN"?SEe():t==="fa"?CEe():t==="ar"?EEe():t==="es"?NEe():t==="hi"?zEe():kEe()}),jEe=()=>"Show more",TEe=()=>"展开",AEe=()=>"نمایش بیشتر",REe=()=>"عرض المزيد",MEe=()=>"Mostrar más",OEe=()=>"और दिखाएं",DEe=((e={},n={})=>{const t=n.locale??z();return t==="zh-CN"?TEe():t==="fa"?AEe():t==="ar"?REe():t==="es"?MEe():t==="hi"?OEe():jEe()}),LEe=()=>"Stop",IEe=()=>"停止",$Ee=()=>"توقف",BEe=()=>"إيقاف",PEe=()=>"Detener",FEe=()=>"रोकें",dD=((e={},n={})=>{const t=n.locale??z();return t==="zh-CN"?IEe():t==="fa"?$Ee():t==="ar"?BEe():t==="es"?PEe():t==="hi"?FEe():LEe()}),HEe=()=>"Stopping…",qEe=()=>"正在停止…",UEe=()=>"در حال توقف…",GEe=()=>"جارٍ الإيقاف…",VEe=()=>"Deteniendo…",KEe=()=>"रोका जा रहा है…",WEe=((e={},n={})=>{const t=n.locale??z();return t==="zh-CN"?qEe():t==="fa"?UEe():t==="ar"?GEe():t==="es"?VEe():t==="hi"?KEe():HEe()}),QEe=()=>"View source",XEe=()=>"查看源代码",YEe=()=>"نمایش متن منبع",ZEe=()=>"عرض المصدر",JEe=()=>"Ver código fuente",eNe=()=>"स्रोत देखें",ud=((e={},n={})=>{const t=n.locale??z();return t==="zh-CN"?XEe():t==="fa"?YEe():t==="ar"?ZEe():t==="es"?JEe():t==="hi"?eNe():QEe()}),tNe=()=>"Runs as a remote Hugging Face Job",nNe=()=>"作为远程 Hugging Face Job 运行",rNe=()=>"به‌صورت Hugging Face Job دوردست اجرا می‌شود",sNe=()=>"يعمل كمهمة Hugging Face بعيدة",iNe=()=>"Se ejecuta como un Job remoto de Hugging Face",aNe=()=>"एक रिमोट Hugging Face Job के रूप में चलता है",oNe=((e={},n={})=>{const t=n.locale??z();return t==="zh-CN"?nNe():t==="fa"?rNe():t==="ar"?sNe():t==="es"?iNe():t==="hi"?aNe():tNe()}),lNe=()=>"Runs as a Job on your Kubernetes cluster",cNe=()=>"作为 Kubernetes 集群上的 Job 运行",uNe=()=>"به‌صورت Job روی خوشهٔ Kubernetes اجرا می‌شود",_Ne=()=>"يعمل كمهمة على عنقود Kubernetes الخاص بك",fNe=()=>"Se ejecuta como un Job en tu clúster de Kubernetes",dNe=()=>"आपके Kubernetes क्लस्टर पर एक Job के रूप में चलता है",hNe=((e={},n={})=>{const t=n.locale??z();return t==="zh-CN"?cNe():t==="fa"?uNe():t==="ar"?_Ne():t==="es"?fNe():t==="hi"?dNe():lNe()}),pNe=()=>"Runs directly on this computer",mNe=()=>"直接在此计算机上运行",gNe=()=>"مستقیماً روی این رایانه اجرا می‌شود",vNe=()=>"يعمل مباشرة على هذا الحاسوب",bNe=()=>"Se ejecuta directamente en este equipo",yNe=()=>"सीधे इस कंप्यूटर पर चलता है",xNe=((e={},n={})=>{const t=n.locale??z();return t==="zh-CN"?mNe():t==="fa"?gNe():t==="ar"?vNe():t==="es"?bNe():t==="hi"?yNe():pNe()}),wNe=()=>"Runs in a remote Modal sandbox",kNe=()=>"在远程 Modal 沙箱中运行",SNe=()=>"در sandbox دوردست Modal اجرا می‌شود",CNe=()=>"يعمل في بيئة Modal معزولة عن بُعد",ENe=()=>"Se ejecuta en un sandbox remoto de Modal",NNe=()=>"एक रिमोट Modal सैंडबॉक्स में चलता है",zNe=((e={},n={})=>{const t=n.locale??z();return t==="zh-CN"?kNe():t==="fa"?SNe():t==="ar"?CNe():t==="es"?ENe():t==="hi"?NNe():wNe()}),jNe=()=>"Runs on an ephemeral OpenResearch box",TNe=()=>"在临时 OpenResearch 主机上运行",ANe=()=>"روی میزبان موقت OpenResearch اجرا می‌شود",RNe=()=>"يعمل على صندوق OpenResearch مؤقت",MNe=()=>"Se ejecuta en una máquina efímera de OpenResearch",ONe=()=>"एक अस्थायी OpenResearch बॉक्स पर चलता है",DNe=((e={},n={})=>{const t=n.locale??z();return t==="zh-CN"?TNe():t==="fa"?ANe():t==="ar"?RNe():t==="es"?MNe():t==="hi"?ONe():jNe()}),LNe=()=>"Runs on the connected Ray cluster",INe=()=>"在已连接的 Ray 集群上运行",$Ne=()=>"روی خوشهٔ متصل Ray اجرا می‌شود",BNe=()=>"يعمل على عنقود Ray المتصل",PNe=()=>"Se ejecuta en el clúster de Ray conectado",FNe=()=>"कनेक्टेड Ray क्लस्टर पर चलता है",HNe=((e={},n={})=>{const t=n.locale??z();return t==="zh-CN"?INe():t==="fa"?$Ne():t==="ar"?BNe():t==="es"?PNe():t==="hi"?FNe():LNe()}),qNe=()=>"Runs as a scheduled job on your Slurm cluster",UNe=()=>"作为 Slurm 集群上的调度作业运行",GNe=()=>"به‌صورت کار زمان‌بندی‌شده روی خوشهٔ Slurm اجرا می‌شود",VNe=()=>"يعمل كمهمة مجدولة على عنقود Slurm الخاص بك",KNe=()=>"Se ejecuta como un job programado en tu clúster de Slurm",WNe=()=>"आपके Slurm क्लस्टर पर एक शेड्यूल्ड जॉब के रूप में चलता है",QNe=((e={},n={})=>{const t=n.locale??z();return t==="zh-CN"?UNe():t==="fa"?GNe():t==="ar"?VNe():t==="es"?KNe():t==="hi"?WNe():qNe()}),XNe=()=>"Runs on a host from your SSH config",YNe=()=>"在 SSH 配置中的主机上运行",ZNe=()=>"روی میزبانی از پیکربندی SSH اجرا می‌شود",JNe=()=>"يعمل على مضيف من إعداد SSH الخاص بك",eze=()=>"Se ejecuta en un host de tu configuración SSH",tze=()=>"आपके SSH कॉन्फ़िग के किसी होस्ट पर चलता है",nze=((e={},n={})=>{const t=n.locale??z();return t==="zh-CN"?YNe():t==="fa"?ZNe():t==="ar"?JNe():t==="es"?eze():t==="hi"?tze():XNe()}),rze=()=>"Runs through Tinker’s remote compute",sze=()=>"通过 Tinker 远程算力运行",ize=()=>"از طریق رایانش دوردست Tinker اجرا می‌شود",aze=()=>"يعمل عبر حوسبة Tinker البعيدة",oze=()=>"Se ejecuta en el cómputo remoto de Tinker",lze=()=>"Tinker के रिमोट कंप्यूट के ज़रिए चलता है",cze=((e={},n={})=>{const t=n.locale??z();return t==="zh-CN"?sze():t==="fa"?ize():t==="ar"?aze():t==="es"?oze():t==="hi"?lze():rze()}),uze=()=>"HF Jobs",_ze=()=>"HF Jobs",fze=()=>"HF Jobs",dze=()=>"HF Jobs",hze=()=>"HF Jobs",pze=()=>"HF Jobs",mze=((e={},n={})=>{const t=n.locale??z();return t==="zh-CN"?_ze():t==="fa"?fze():t==="ar"?dze():t==="es"?hze():t==="hi"?pze():uze()}),gze=()=>"Kubernetes",vze=()=>"Kubernetes",bze=()=>"Kubernetes",yze=()=>"Kubernetes",xze=()=>"Kubernetes",wze=()=>"Kubernetes",kze=((e={},n={})=>{const t=n.locale??z();return t==="zh-CN"?vze():t==="fa"?bze():t==="ar"?yze():t==="es"?xze():t==="hi"?wze():gze()}),Sze=()=>"This machine",Cze=()=>"此计算机",Eze=()=>"این رایانه",Nze=()=>"هذا الجهاز",zze=()=>"Este equipo",jze=()=>"यह मशीन",hD=((e={},n={})=>{const t=n.locale??z();return t==="zh-CN"?Cze():t==="fa"?Eze():t==="ar"?Nze():t==="es"?zze():t==="hi"?jze():Sze()}),Tze=()=>"Modal",Aze=()=>"Modal",Rze=()=>"Modal",Mze=()=>"Modal",Oze=()=>"Modal",Dze=()=>"Modal",Lze=((e={},n={})=>{const t=n.locale??z();return t==="zh-CN"?Aze():t==="fa"?Rze():t==="ar"?Mze():t==="es"?Oze():t==="hi"?Dze():Tze()}),Ize=()=>"OpenResearch",$ze=()=>"OpenResearch",Bze=()=>"OpenResearch",Pze=()=>"OpenResearch",Fze=()=>"OpenResearch",Hze=()=>"OpenResearch",qze=((e={},n={})=>{const t=n.locale??z();return t==="zh-CN"?$ze():t==="fa"?Bze():t==="ar"?Pze():t==="es"?Fze():t==="hi"?Hze():Ize()}),Uze=()=>"Ray",Gze=()=>"Ray",Vze=()=>"Ray",Kze=()=>"Ray",Wze=()=>"Ray",Qze=()=>"Ray",Xze=((e={},n={})=>{const t=n.locale??z();return t==="zh-CN"?Gze():t==="fa"?Vze():t==="ar"?Kze():t==="es"?Wze():t==="hi"?Qze():Uze()}),Yze=()=>"Slurm",Zze=()=>"Slurm",Jze=()=>"Slurm",eje=()=>"Slurm",tje=()=>"Slurm",nje=()=>"Slurm",rje=((e={},n={})=>{const t=n.locale??z();return t==="zh-CN"?Zze():t==="fa"?Jze():t==="ar"?eje():t==="es"?tje():t==="hi"?nje():Yze()}),sje=()=>"SSH",ije=()=>"SSH",aje=()=>"SSH",oje=()=>"SSH",lje=()=>"SSH",cje=()=>"SSH",uje=((e={},n={})=>{const t=n.locale??z();return t==="zh-CN"?ije():t==="fa"?aje():t==="ar"?oje():t==="es"?lje():t==="hi"?cje():sje()}),_je=()=>"Tinker",fje=()=>"Tinker",dje=()=>"Tinker",hje=()=>"Tinker",pje=()=>"Tinker",mje=()=>"Tinker",gje=((e={},n={})=>{const t=n.locale??z();return t==="zh-CN"?fje():t==="fa"?dje():t==="ar"?hje():t==="es"?pje():t==="hi"?mje():_je()}),vje=()=>"A Hugging Face Job runs remotely in your account using the selected hardware. Usage is billed by Hugging Face.",bje=()=>"Hugging Face Job 使用所选硬件在你的账户中远程运行。费用由 Hugging Face 收取。",yje=()=>"یک Hugging Face Job با سخت‌افزار انتخاب‌شده در حساب شما از راه دور اجرا می‌شود. هزینه را Hugging Face دریافت می‌کند.",xje=()=>"تعمل مهمة Hugging Face عن بُعد في حسابك باستخدام العتاد المحدد. تتولى Hugging Face احتساب رسوم الاستخدام.",wje=()=>"Un Hugging Face Job se ejecuta de forma remota en tu cuenta con el hardware seleccionado. Hugging Face factura el uso.",kje=()=>"एक Hugging Face Job चुने गए हार्डवेयर का इस्तेमाल करते हुए आपके खाते में रिमोट रूप से चलता है। इस्तेमाल का बिल Hugging Face करता है।",Sje=((e={},n={})=>{const t=n.locale??z();return t==="zh-CN"?bje():t==="fa"?yje():t==="ar"?xje():t==="es"?wje():t==="hi"?kje():vje()}),Cje=()=>"A Modal sandbox runs remotely in your account using the selected hardware and scales to zero after the run.",Eje=()=>"Modal 沙箱使用所选硬件在你的账户中远程运行,并在运行结束后缩容到零。",Nje=()=>"یک sandbox از Modal با سخت‌افزار انتخاب‌شده در حساب شما از راه دور اجرا می‌شود و پس از اجرا به صفر مقیاس می‌یابد.",zje=()=>"تعمل بيئة Modal معزولة عن بُعد في حسابك باستخدام العتاد المحدد، وتُخفَّض مواردها إلى الصفر بعد انتهاء التشغيل.",jje=()=>"Un sandbox de Modal se ejecuta de forma remota en tu cuenta con el hardware seleccionado y escala a cero al terminar la ejecución.",Tje=()=>"एक Modal सैंडबॉक्स चुने गए हार्डवेयर का इस्तेमाल करते हुए आपके खाते में रिमोट रूप से चलता है और रन के बाद शून्य पर स्केल हो जाता है।",Aje=((e={},n={})=>{const t=n.locale??z();return t==="zh-CN"?Eje():t==="fa"?Nje():t==="ar"?zje():t==="es"?jje():t==="hi"?Tje():Cje()}),Rje=()=>"An ephemeral OpenResearch box runs the experiment, is billed to your organization, and is deleted when the run ends.",Mje=()=>"临时 OpenResearch 主机运行实验,费用计入你的组织,并在运行结束后删除。",Oje=()=>"یک میزبان موقت OpenResearch آزمایش را اجرا می‌کند، هزینه به سازمان شما منظور می‌شود و میزبان پس از پایان حذف می‌گردد.",Dje=()=>"تعمل التجربة على جهاز OpenResearch مؤقت، وتتحمل مؤسستك تكلفته، ويُحذف الجهاز عند انتهاء التشغيل.",Lje=()=>"Una máquina efímera de OpenResearch ejecuta el experimento, se factura a tu organización y se elimina al terminar la ejecución.",Ije=()=>"एक अस्थायी OpenResearch बॉक्स प्रयोग चलाता है, आपके संगठन को बिल किया जाता है, और रन खत्म होने पर हटा दिया जाता है।",$je=((e={},n={})=>{const t=n.locale??z();return t==="zh-CN"?Mje():t==="fa"?Oje():t==="ar"?Dje():t==="es"?Lje():t==="hi"?Ije():Rje()}),Bje=()=>"This computer must stay awake and online while Tinker runs.",Pje=()=>"Tinker 运行时,此计算机必须保持唤醒和联网。",Fje=()=>"هنگام اجرای Tinker، این رایانه باید روشن و آنلاین بماند.",Hje=()=>"يجب أن يبقى هذا الحاسوب مستيقظًا ومتصلًا أثناء تشغيل Tinker.",qje=()=>"Este equipo debe permanecer encendido y conectado mientras Tinker se ejecuta.",Uje=()=>"जब तक Tinker चल रहा है, इस कंप्यूटर को जागते और ऑनलाइन रहना होगा।",Gje=((e={},n={})=>{const t=n.locale??z();return t==="zh-CN"?Pje():t==="fa"?Fje():t==="ar"?Hje():t==="es"?qje():t==="hi"?Uje():Bje()}),Vje=()=>"Context window",Kje=()=>"上下文窗口",Wje=()=>"پنجرهٔ زمینه",Qje=()=>"نافذة السياق",Xje=()=>"Ventana de contexto",Yje=()=>"कॉन्टेक्स्ट विंडो",Zje=((e={},n={})=>{const t=n.locale??z();return t==="zh-CN"?Kje():t==="fa"?Wje():t==="ar"?Qje():t==="es"?Xje():t==="hi"?Yje():Vje()}),Jje=()=>"Context window used",eTe=()=>"已使用的上下文窗口",tTe=()=>"پنجرهٔ زمینهٔ استفاده‌شده",nTe=()=>"المستخدَم من نافذة السياق",rTe=()=>"Ventana de contexto usada",sTe=()=>"इस्तेमाल हुई कॉन्टेक्स्ट विंडो",iTe=((e={},n={})=>{const t=n.locale??z();return t==="zh-CN"?eTe():t==="fa"?tTe():t==="ar"?nTe():t==="es"?rTe():t==="hi"?sTe():Jje()}),aTe=e=>`${e==null?void 0:e.value} tokens`,oTe=e=>`${e==null?void 0:e.value} 个 token`,lTe=e=>`${e==null?void 0:e.value} توکن`,cTe=e=>`${e==null?void 0:e.value} رمز`,uTe=e=>`${e==null?void 0:e.value} tokens`,_Te=e=>`${e==null?void 0:e.value} टोकन`,fTe=((e,n={})=>{const t=n.locale??z();return t==="zh-CN"?oTe(e):t==="fa"?lTe(e):t==="ar"?cTe(e):t==="es"?uTe(e):t==="hi"?_Te(e):aTe(e)}),dTe=e=>`${e==null?void 0:e.used} / ${e==null?void 0:e.total} (${e==null?void 0:e.percent})`,hTe=e=>`${e==null?void 0:e.used} / ${e==null?void 0:e.total}(${e==null?void 0:e.percent})`,pTe=e=>`${e==null?void 0:e.used} از ${e==null?void 0:e.total} (${e==null?void 0:e.percent})`,mTe=e=>`${e==null?void 0:e.used} / ${e==null?void 0:e.total} (${e==null?void 0:e.percent})`,gTe=e=>`${e==null?void 0:e.used} / ${e==null?void 0:e.total} (${e==null?void 0:e.percent})`,vTe=e=>`${e==null?void 0:e.used} / ${e==null?void 0:e.total} (${e==null?void 0:e.percent})`,bTe=((e,n={})=>{const t=n.locale??z();return t==="zh-CN"?hTe(e):t==="fa"?pTe(e):t==="ar"?mTe(e):t==="es"?gTe(e):t==="hi"?vTe(e):dTe(e)}),yTe=()=>"No runs yet — ask the agent to launch one.",xTe=()=>"尚无运行——让智能体启动一个。",wTe=()=>"هنوز اجرایی وجود ندارد — از عامل بخواهید یکی را آغاز کند.",kTe=()=>"لا توجد عمليات تشغيل بعد — اطلب من الوكيل بدء واحدة.",STe=()=>"Aún no hay ejecuciones — pídele al agente que lance una.",CTe=()=>"अभी तक कोई रन नहीं — एजेंट से एक शुरू करने को कहें।",ETe=((e={},n={})=>{const t=n.locale??z();return t==="zh-CN"?xTe():t==="fa"?wTe():t==="ar"?kTe():t==="es"?STe():t==="hi"?CTe():yTe()}),NTe=()=>"Run",zTe=()=>"运行",jTe=()=>"اجرا",TTe=()=>"تشغيل",ATe=()=>"Ejecución",RTe=()=>"रन",pN=((e={},n={})=>{const t=n.locale??z();return t==="zh-CN"?zTe():t==="fa"?jTe():t==="ar"?TTe():t==="es"?ATe():t==="hi"?RTe():NTe()}),MTe=()=>"Switch run",OTe=()=>"切换运行",DTe=()=>"تغییر اجرا",LTe=()=>"تبديل التشغيل",ITe=()=>"Cambiar de ejecución",$Te=()=>"रन बदलें",BTe=((e={},n={})=>{const t=n.locale??z();return t==="zh-CN"?OTe():t==="fa"?DTe():t==="ar"?LTe():t==="es"?ITe():t==="hi"?$Te():MTe()}),PTe=e=>`${e==null?void 0:e.days}d ${e==null?void 0:e.hours}h`,FTe=e=>`${e==null?void 0:e.days} 天 ${e==null?void 0:e.hours} 小时`,HTe=e=>`${e==null?void 0:e.days} روز و ${e==null?void 0:e.hours} ساعت`,qTe=e=>`${e==null?void 0:e.days}ي ${e==null?void 0:e.hours}س`,UTe=e=>`${e==null?void 0:e.days} d ${e==null?void 0:e.hours} h`,GTe=e=>`${e==null?void 0:e.days}दि ${e==null?void 0:e.hours}घं`,VTe=((e,n={})=>{const t=n.locale??z();return t==="zh-CN"?FTe(e):t==="fa"?HTe(e):t==="ar"?qTe(e):t==="es"?UTe(e):t==="hi"?GTe(e):PTe(e)}),KTe=e=>`${e==null?void 0:e.hours}h ${e==null?void 0:e.minutes}m`,WTe=e=>`${e==null?void 0:e.hours} 小时 ${e==null?void 0:e.minutes} 分钟`,QTe=e=>`${e==null?void 0:e.hours} ساعت و ${e==null?void 0:e.minutes} دقیقه`,XTe=e=>`${e==null?void 0:e.hours}س ${e==null?void 0:e.minutes}د`,YTe=e=>`${e==null?void 0:e.hours} h ${e==null?void 0:e.minutes} min`,ZTe=e=>`${e==null?void 0:e.hours}घं ${e==null?void 0:e.minutes}मि`,JTe=((e,n={})=>{const t=n.locale??z();return t==="zh-CN"?WTe(e):t==="fa"?QTe(e):t==="ar"?XTe(e):t==="es"?YTe(e):t==="hi"?ZTe(e):KTe(e)}),eAe=e=>`${e==null?void 0:e.value}m`,tAe=e=>`${e==null?void 0:e.value} 分钟`,nAe=e=>`${e==null?void 0:e.value} دقیقه`,rAe=e=>`${e==null?void 0:e.value}د`,sAe=e=>`${e==null?void 0:e.value} min`,iAe=e=>`${e==null?void 0:e.value}मि`,aAe=((e,n={})=>{const t=n.locale??z();return t==="zh-CN"?tAe(e):t==="fa"?nAe(e):t==="ar"?rAe(e):t==="es"?sAe(e):t==="hi"?iAe(e):eAe(e)}),oAe=e=>`${e==null?void 0:e.value}s`,lAe=e=>`${e==null?void 0:e.value} 秒`,cAe=e=>`${e==null?void 0:e.value} ثانیه`,uAe=e=>`${e==null?void 0:e.value}ث`,_Ae=e=>`${e==null?void 0:e.value} s`,fAe=e=>`${e==null?void 0:e.value}से`,dAe=((e,n={})=>{const t=n.locale??z();return t==="zh-CN"?lAe(e):t==="fa"?cAe(e):t==="ar"?uAe(e):t==="es"?_Ae(e):t==="hi"?fAe(e):oAe(e)}),hAe=()=>"Code",pAe=()=>"代码",mAe=()=>"کد",gAe=()=>"الشيفرة",vAe=()=>"Código",bAe=()=>"कोड",yAe=((e={},n={})=>{const t=n.locale??z();return t==="zh-CN"?pAe():t==="fa"?mAe():t==="ar"?gAe():t==="es"?vAe():t==="hi"?bAe():hAe()}),xAe=()=>"created",wAe=()=>"创建于",kAe=()=>"ایجادشده",SAe=()=>"أُنشئ",CAe=()=>"creado",EAe=()=>"बनाया गया",NAe=((e={},n={})=>{const t=n.locale??z();return t==="zh-CN"?wAe():t==="fa"?kAe():t==="ar"?SAe():t==="es"?CAe():t==="hi"?EAe():xAe()}),zAe=()=>"from",jAe=()=>"来自",TAe=()=>"از",AAe=()=>"من",RAe=()=>"desde",MAe=()=>"से",OAe=((e={},n={})=>{const t=n.locale??z();return t==="zh-CN"?jAe():t==="fa"?TAe():t==="ar"?AAe():t==="es"?RAe():t==="hi"?MAe():zAe()}),DAe=()=>"Logs",LAe=()=>"日志",IAe=()=>"گزارش‌ها",$Ae=()=>"السجلات",BAe=()=>"Logs",PAe=()=>"लॉग",FAe=((e={},n={})=>{const t=n.locale??z();return t==="zh-CN"?LAe():t==="fa"?IAe():t==="ar"?$Ae():t==="es"?BAe():t==="hi"?PAe():DAe()}),HAe=()=>"Latest run",qAe=()=>"最新运行",UAe=()=>"آخرین اجرا",GAe=()=>"أحدث تشغيل",VAe=()=>"Última ejecución",KAe=()=>"नवीनतम रन",WAe=((e={},n={})=>{const t=n.locale??z();return t==="zh-CN"?qAe():t==="fa"?UAe():t==="ar"?GAe():t==="es"?VAe():t==="hi"?KAe():HAe()}),QAe=()=>"Code",XAe=()=>"代码",YAe=()=>"کد",ZAe=()=>"الشيفرة",JAe=()=>"Código",eRe=()=>"कोड",tRe=((e={},n={})=>{const t=n.locale??z();return t==="zh-CN"?XAe():t==="fa"?YAe():t==="ar"?ZAe():t==="es"?JAe():t==="hi"?eRe():QAe()}),nRe=()=>"Commit",rRe=()=>"提交",sRe=()=>"کامیت",iRe=()=>"إيداع",aRe=()=>"Commit",oRe=()=>"कमिट",lRe=((e={},n={})=>{const t=n.locale??z();return t==="zh-CN"?rRe():t==="fa"?sRe():t==="ar"?iRe():t==="es"?aRe():t==="hi"?oRe():nRe()}),cRe=()=>"created",uRe=()=>"创建于",_Re=()=>"ایجادشده",fRe=()=>"أُنشئ",dRe=()=>"creado",hRe=()=>"बनाया गया",pRe=((e={},n={})=>{const t=n.locale??z();return t==="zh-CN"?uRe():t==="fa"?_Re():t==="ar"?fRe():t==="es"?dRe():t==="hi"?hRe():cRe()}),mRe=()=>"Description",gRe=()=>"说明",vRe=()=>"توضیحات",bRe=()=>"الوصف",yRe=()=>"Descripción",xRe=()=>"विवरण",wRe=((e={},n={})=>{const t=n.locale??z();return t==="zh-CN"?gRe():t==="fa"?vRe():t==="ar"?bRe():t==="es"?yRe():t==="hi"?xRe():mRe()}),kRe=()=>"Duration",SRe=()=>"时长",CRe=()=>"مدت",ERe=()=>"المدة",NRe=()=>"Duración",zRe=()=>"अवधि",jRe=((e={},n={})=>{const t=n.locale??z();return t==="zh-CN"?SRe():t==="fa"?CRe():t==="ar"?ERe():t==="es"?NRe():t==="hi"?zRe():kRe()}),TRe=()=>"exit",ARe=()=>"退出码",RRe=()=>"خروج",MRe=()=>"رمز الخروج",ORe=()=>"salida",DRe=()=>"एग्ज़िट",LRe=((e={},n={})=>{const t=n.locale??z();return t==="zh-CN"?ARe():t==="fa"?RRe():t==="ar"?MRe():t==="es"?ORe():t==="hi"?DRe():TRe()}),IRe=()=>"from",$Re=()=>"来自",BRe=()=>"از",PRe=()=>"من",FRe=()=>"desde",HRe=()=>"से",qRe=((e={},n={})=>{const t=n.locale??z();return t==="zh-CN"?$Re():t==="fa"?BRe():t==="ar"?PRe():t==="es"?FRe():t==="hi"?HRe():IRe()}),URe=()=>"Logs",GRe=()=>"日志",VRe=()=>"گزارش‌ها",KRe=()=>"السجلات",WRe=()=>"Logs",QRe=()=>"लॉग",XRe=((e={},n={})=>{const t=n.locale??z();return t==="zh-CN"?GRe():t==="fa"?VRe():t==="ar"?KRe():t==="es"?WRe():t==="hi"?QRe():URe()}),YRe=()=>"Run",ZRe=()=>"运行",JRe=()=>"اجرا",eMe=()=>"تشغيل",tMe=()=>"Ejecución",nMe=()=>"रन",rMe=((e={},n={})=>{const t=n.locale??z();return t==="zh-CN"?ZRe():t==="fa"?JRe():t==="ar"?eMe():t==="es"?tMe():t==="hi"?nMe():YRe()}),sMe=()=>"Run history",iMe=()=>"运行历史",aMe=()=>"تاریخچهٔ اجرا",oMe=()=>"سجل التشغيل",lMe=()=>"Historial de ejecuciones",cMe=()=>"रन इतिहास",uMe=((e={},n={})=>{const t=n.locale??z();return t==="zh-CN"?iMe():t==="fa"?aMe():t==="ar"?oMe():t==="es"?lMe():t==="hi"?cMe():sMe()}),_Me=()=>"Started",fMe=()=>"开始时间",dMe=()=>"آغاز",hMe=()=>"بدأ",pMe=()=>"Inicio",mMe=()=>"शुरू हुआ",gMe=((e={},n={})=>{const t=n.locale??z();return t==="zh-CN"?fMe():t==="fa"?dMe():t==="ar"?hMe():t==="es"?pMe():t==="hi"?mMe():_Me()}),vMe=()=>"Runs",bMe=()=>"运行",yMe=()=>"اجراها",xMe=()=>"عمليات التشغيل",wMe=()=>"Ejecuciones",kMe=()=>"रन",SMe=((e={},n={})=>{const t=n.locale??z();return t==="zh-CN"?bMe():t==="fa"?yMe():t==="ar"?xMe():t==="es"?wMe():t==="hi"?kMe():vMe()}),CMe=()=>"Experiments and their runs will appear here. Ask the agent to set up an experiment to get started.",EMe=()=>"实验及其运行会显示在这里。让智能体设置一个实验即可开始。",NMe=()=>"آزمایش‌ها و اجراهای آن‌ها اینجا نمایش داده می‌شوند. برای شروع، از عامل بخواهید آزمایشی راه‌اندازی کند.",zMe=()=>"ستظهر التجارب وعمليات تشغيلها هنا. اطلب من الوكيل إعداد تجربة للبدء.",jMe=()=>"Los experimentos y sus ejecuciones aparecerán aquí. Pídele al agente que configure un experimento para empezar.",TMe=()=>"प्रयोग और उनके रन यहाँ दिखेंगे। शुरू करने के लिए एजेंट से एक प्रयोग सेट अप करने को कहें।",AMe=((e={},n={})=>{const t=n.locale??z();return t==="zh-CN"?EMe():t==="fa"?NMe():t==="ar"?zMe():t==="es"?jMe():t==="hi"?TMe():CMe()}),RMe=()=>"No runs yet",MMe=()=>"还没有运行",OMe=()=>"هنوز اجرایی وجود ندارد",DMe=()=>"لا عمليات تشغيل بعد",LMe=()=>"Aún no hay ejecuciones",IMe=()=>"अभी तक कोई रन नहीं",$Me=((e={},n={})=>{const t=n.locale??z();return t==="zh-CN"?MMe():t==="fa"?OMe():t==="ar"?DMe():t==="es"?LMe():t==="hi"?IMe():RMe()}),BMe=()=>"No experiments yet.",PMe=()=>"还没有实验。",FMe=()=>"هنوز آزمایشی وجود ندارد.",HMe=()=>"لا توجد تجارب بعد.",qMe=()=>"Aún no hay experimentos.",UMe=()=>"अभी तक कोई प्रयोग नहीं।",GMe=((e={},n={})=>{const t=n.locale??z();return t==="zh-CN"?PMe():t==="fa"?FMe():t==="ar"?HMe():t==="es"?qMe():t==="hi"?UMe():BMe()}),VMe=()=>"Not run yet",KMe=()=>"尚未运行",WMe=()=>"هنوز اجرا نشده",QMe=()=>"لم تُشغَّل بعد",XMe=()=>"Aún sin ejecutar",YMe=()=>"अभी तक नहीं चलाया गया",ZMe=((e={},n={})=>{const t=n.locale??z();return t==="zh-CN"?KMe():t==="fa"?WMe():t==="ar"?QMe():t==="es"?XMe():t==="hi"?YMe():VMe()}),JMe=()=>"1 run",eOe=()=>"1 次运行",tOe=()=>"۱ اجرا",nOe=()=>"تشغيل واحد",rOe=()=>"1 ejecución",sOe=()=>"1 रन",iOe=((e={},n={})=>{const t=n.locale??z();return t==="zh-CN"?eOe():t==="fa"?tOe():t==="ar"?nOe():t==="es"?rOe():t==="hi"?sOe():JMe()}),aOe=()=>"Open logs",oOe=()=>"打开日志",lOe=()=>"باز کردن گزارش‌ها",cOe=()=>"فتح السجلات",uOe=()=>"Abrir logs",_Oe=()=>"लॉग खोलें",fOe=((e={},n={})=>{const t=n.locale??z();return t==="zh-CN"?oOe():t==="fa"?lOe():t==="ar"?cOe():t==="es"?uOe():t==="hi"?_Oe():aOe()}),dOe=e=>`${e==null?void 0:e.count} runs`,hOe=e=>`${e==null?void 0:e.count} 次运行`,pOe=e=>`${e==null?void 0:e.count} اجرا`,mOe=e=>`عمليات التشغيل: ${e==null?void 0:e.count}`,gOe=e=>`${e==null?void 0:e.count} ejecuciones`,vOe=e=>`${e==null?void 0:e.count} रन`,bOe=((e,n={})=>{const t=n.locale??z();return t==="zh-CN"?hOe(e):t==="fa"?pOe(e):t==="ar"?mOe(e):t==="es"?gOe(e):t==="hi"?vOe(e):dOe(e)}),yOe=()=>"Stop requested",xOe=()=>"已请求停止",wOe=()=>"درخواست توقف ثبت شد",kOe=()=>"طُلب الإيقاف",SOe=()=>"Detención solicitada",COe=()=>"रोकने का अनुरोध किया गया",EOe=((e={},n={})=>{const t=n.locale??z();return t==="zh-CN"?xOe():t==="fa"?wOe():t==="ar"?kOe():t==="es"?SOe():t==="hi"?COe():yOe()}),NOe=()=>"Stop run",zOe=()=>"停止运行",jOe=()=>"توقف اجرا",TOe=()=>"إيقاف التشغيل",AOe=()=>"Detener ejecución",ROe=()=>"रन रोकें",MOe=((e={},n={})=>{const t=n.locale??z();return t==="zh-CN"?zOe():t==="fa"?jOe():t==="ar"?TOe():t==="es"?AOe():t==="hi"?ROe():NOe()}),OOe=()=>"Code",DOe=()=>"代码",LOe=()=>"کد",IOe=()=>"الشيفرة",$Oe=()=>"Código",BOe=()=>"कोड",POe=((e={},n={})=>{const t=n.locale??z();return t==="zh-CN"?DOe():t==="fa"?LOe():t==="ar"?IOe():t==="es"?$Oe():t==="hi"?BOe():OOe()}),FOe=()=>"Experiments",HOe=()=>"实验",qOe=()=>"آزمایش‌ها",UOe=()=>"التجارب",GOe=()=>"Experimentos",VOe=()=>"प्रयोग",KOe=((e={},n={})=>{const t=n.locale??z();return t==="zh-CN"?HOe():t==="fa"?qOe():t==="ar"?UOe():t==="es"?GOe():t==="hi"?VOe():FOe()}),WOe=()=>"Logs",QOe=()=>"日志",XOe=()=>"گزارش‌ها",YOe=()=>"السجلات",ZOe=()=>"Logs",JOe=()=>"लॉग",Z4=((e={},n={})=>{const t=n.locale??z();return t==="zh-CN"?QOe():t==="fa"?XOe():t==="ar"?YOe():t==="es"?ZOe():t==="hi"?JOe():WOe()}),eDe=()=>"Stop failed:",tDe=()=>"停止失败:",nDe=()=>"توقف ناموفق بود:",rDe=()=>"فشل الإيقاف:",sDe=()=>"Error al detener:",iDe=()=>"रोकना विफल:",aDe=((e={},n={})=>{const t=n.locale??z();return t==="zh-CN"?tDe():t==="fa"?nDe():t==="ar"?rDe():t==="es"?sDe():t==="hi"?iDe():eDe()}),oDe=()=>"Clipboard access is unavailable.",lDe=()=>"无法访问剪贴板。",cDe=()=>"دسترسی به کلیپ‌بورد در دسترس نیست.",uDe=()=>"الوصول إلى الحافظة غير متاح.",_De=()=>"El acceso al portapapeles no está disponible.",fDe=()=>"क्लिपबोर्ड एक्सेस उपलब्ध नहीं है।",pD=((e={},n={})=>{const t=n.locale??z();return t==="zh-CN"?lDe():t==="fa"?cDe():t==="ar"?uDe():t==="es"?_De():t==="hi"?fDe():oDe()}),dDe=e=>`Delete “${e==null?void 0:e.path}”? This cannot be undone.`,hDe=e=>`删除“${e==null?void 0:e.path}”?此操作无法撤销。`,pDe=e=>`«${e==null?void 0:e.path}» حذف شود؟ این کار قابل بازگشت نیست.`,mDe=e=>`حذف «${e==null?void 0:e.path}»؟ لا يمكن التراجع عن هذا الإجراء.`,gDe=e=>`¿Eliminar “${e==null?void 0:e.path}”? Esta acción no se puede deshacer.`,vDe=e=>`“${e==null?void 0:e.path}” हटाएं? इसे वापस नहीं लाया जा सकता।`,bDe=((e,n={})=>{const t=n.locale??z();return t==="zh-CN"?hDe(e):t==="fa"?pDe(e):t==="ar"?mDe(e):t==="es"?gDe(e):t==="hi"?vDe(e):dDe(e)}),yDe=()=>"Duplicate",xDe=()=>"创建副本",wDe=()=>"ایجاد نسخهٔ تکراری",kDe=()=>"تكرار",SDe=()=>"Duplicar",CDe=()=>"डुप्लिकेट करें",EDe=((e={},n={})=>{const t=n.locale??z();return t==="zh-CN"?xDe():t==="fa"?wDe():t==="ar"?kDe():t==="es"?SDe():t==="hi"?CDe():yDe()}),NDe=e=>`File actions for ${e==null?void 0:e.path}`,zDe=e=>`${e==null?void 0:e.path} 的文件操作`,jDe=e=>`عملیات فایل برای ${e==null?void 0:e.path}`,TDe=e=>`إجراءات الملف لـ ${e==null?void 0:e.path}`,ADe=e=>`Acciones de archivo para ${e==null?void 0:e.path}`,RDe=e=>`${e==null?void 0:e.path} के लिए फ़ाइल क्रियाएं`,MDe=((e,n={})=>{const t=n.locale??z();return t==="zh-CN"?zDe(e):t==="fa"?jDe(e):t==="ar"?TDe(e):t==="es"?ADe(e):t==="hi"?RDe(e):NDe(e)}),ODe=()=>"Open",DDe=()=>"打开",LDe=()=>"باز کردن",IDe=()=>"فتح",$De=()=>"Abrir",BDe=()=>"खोलें",PDe=((e={},n={})=>{const t=n.locale??z();return t==="zh-CN"?DDe():t==="fa"?LDe():t==="ar"?IDe():t==="es"?$De():t==="hi"?BDe():ODe()}),FDe=e=>`Rename ${e==null?void 0:e.path}`,HDe=e=>`重命名 ${e==null?void 0:e.path}`,qDe=e=>`تغییر نام ${e==null?void 0:e.path}`,UDe=e=>`إعادة تسمية ${e==null?void 0:e.path}`,GDe=e=>`Renombrar ${e==null?void 0:e.path}`,VDe=e=>`${e==null?void 0:e.path} का नाम बदलें`,KDe=((e,n={})=>{const t=n.locale??z();return t==="zh-CN"?HDe(e):t==="fa"?qDe(e):t==="ar"?UDe(e):t==="es"?GDe(e):t==="hi"?VDe(e):FDe(e)}),WDe=e=>`Not in the ${e==null?void 0:e.root} — showing the copy from the project’s artifacts.`,QDe=e=>`${e==null?void 0:e.root} 中没有该文件——当前显示项目产物中的副本。`,XDe=e=>`فایل در ${e==null?void 0:e.root} نیست — نسخهٔ موجود در خروجی‌های پروژه نمایش داده می‌شود.`,YDe=e=>`ليس في ${e==null?void 0:e.root} — عرض النسخة من مُخرَجات المشروع.`,ZDe=e=>`No está en ${e==null?void 0:e.root} — se muestra la copia de los artefactos del proyecto.`,JDe=e=>`${e==null?void 0:e.root} में नहीं — प्रोजेक्ट के आर्टिफ़ैक्ट से कॉपी दिखाई जा रही है।`,eLe=((e,n={})=>{const t=n.locale??z();return t==="zh-CN"?QDe(e):t==="fa"?XDe(e):t==="ar"?YDe(e):t==="es"?ZDe(e):t==="hi"?JDe(e):WDe(e)}),tLe=()=>"Binary file — no inline preview.",nLe=()=>"二进制文件——无法内嵌预览。",rLe=()=>"فایل دودویی است — پیش‌نمایش درون‌خطی ندارد.",sLe=()=>"ملف ثنائي — لا توجد معاينة مضمّنة.",iLe=()=>"Archivo binario — sin vista previa.",aLe=()=>"बाइनरी फ़ाइल — इनलाइन प्रीव्यू नहीं है।",oLe=((e={},n={})=>{const t=n.locale??z();return t==="zh-CN"?nLe():t==="fa"?rLe():t==="ar"?sLe():t==="es"?iLe():t==="hi"?aLe():tLe()}),lLe=()=>"This file changed on disk. Your edits have not been overwritten.",cLe=()=>"此文件已在磁盘上更改。您的编辑未被覆盖。",uLe=()=>"این فایل روی دیسک تغییر کرده است. ویرایش‌های شما جایگزین نشده‌اند.",_Le=()=>"تغيّر هذا الملف على القرص. لم تُستبدل تعديلاتك.",fLe=()=>"Este archivo cambió en disco. Tus cambios no se han sobrescrito.",dLe=()=>"यह फ़ाइल डिस्क पर बदल गई है। आपके बदलाव अधिलेखित नहीं हुए हैं।",mN=((e={},n={})=>{const t=n.locale??z();return t==="zh-CN"?cLe():t==="fa"?uLe():t==="ar"?_Le():t==="es"?fLe():t==="hi"?dLe():lLe()}),hLe=()=>"Compile failed",pLe=()=>"编译失败",mLe=()=>"کامپایل ناموفق بود",gLe=()=>"فشل التجميع",vLe=()=>"Error al compilar",bLe=()=>"कंपाइल विफल",yLe=((e={},n={})=>{const t=n.locale??z();return t==="zh-CN"?pLe():t==="fa"?mLe():t==="ar"?gLe():t==="es"?vLe():t==="hi"?bLe():hLe()}),xLe=()=>"Compile PDF",wLe=()=>"编译 PDF",kLe=()=>"کامپایل PDF",SLe=()=>"تجميع PDF",CLe=()=>"Compilar PDF",ELe=()=>"PDF कंपाइल करें",gN=((e={},n={})=>{const t=n.locale??z();return t==="zh-CN"?wLe():t==="fa"?kLe():t==="ar"?SLe():t==="es"?CLe():t==="hi"?ELe():xLe()}),NLe=()=>"Compiled, but the engine reported errors — check the output below.",zLe=()=>"编译已完成,但引擎报告了错误 — 请查看下方输出。",jLe=()=>"کامپایل انجام شد، اما موتور خطا گزارش کرد — خروجی پایین را بررسی کنید.",TLe=()=>"اكتمل التجميع، لكن المحرك أبلغ عن أخطاء — راجع المُخرَجات أدناه.",ALe=()=>"Compilado, pero el motor informó de errores — revisa la salida de abajo.",RLe=()=>"कंपाइल हुआ, पर इंजन ने त्रुटियाँ बताईं — नीचे आउटपुट जाँचें।",MLe=((e={},n={})=>{const t=n.locale??z();return t==="zh-CN"?zLe():t==="fa"?jLe():t==="ar"?TLe():t==="es"?ALe():t==="hi"?RLe():NLe()}),OLe=()=>"Copy command",DLe=()=>"复制命令",LLe=()=>"کپی فرمان",ILe=()=>"نسخ الأمر",$Le=()=>"Copiar comando",BLe=()=>"कमांड कॉपी करें",PLe=((e={},n={})=>{const t=n.locale??z();return t==="zh-CN"?DLe():t==="fa"?LLe():t==="ar"?ILe():t==="es"?$Le():t==="hi"?BLe():OLe()}),FLe=()=>"Copy install command",HLe=()=>"复制安装命令",qLe=()=>"کپی فرمان نصب",ULe=()=>"نسخ أمر التثبيت",GLe=()=>"Copiar comando de instalación",VLe=()=>"इंस्टॉल कमांड कॉपी करें",KLe=((e={},n={})=>{const t=n.locale??z();return t==="zh-CN"?HLe():t==="fa"?qLe():t==="ar"?ULe():t==="es"?GLe():t==="hi"?VLe():FLe()}),WLe=()=>"This file was deleted on disk. Your edits have not been discarded.",QLe=()=>"此文件已从磁盘删除。您的编辑未被丢弃。",XLe=()=>"این فایل از روی دیسک حذف شده است. ویرایش‌های شما حذف نشده‌اند.",YLe=()=>"حُذف هذا الملف من القرص. لم تُتجاهل تعديلاتك.",ZLe=()=>"Este archivo se eliminó del disco. Tus cambios no se han descartado.",JLe=()=>"यह फ़ाइल डिस्क से हटा दी गई थी। आपके बदलाव मिटाए नहीं गए हैं।",vN=((e={},n={})=>{const t=n.locale??z();return t==="zh-CN"?QLe():t==="fa"?XLe():t==="ar"?YLe():t==="es"?ZLe():t==="hi"?JLe():WLe()}),eIe=()=>"Discard my edits and reload",tIe=()=>"放弃我的编辑并重新加载",nIe=()=>"نادیده گرفتن ویرایش‌های من و بارگیری دوباره",rIe=()=>"تجاهل تعديلاتي وإعادة التحميل",sIe=()=>"Descartar mis cambios y recargar",iIe=()=>"मेरे बदलाव छोड़ें और फिर से लोड करें",aIe=((e={},n={})=>{const t=n.locale??z();return t==="zh-CN"?tIe():t==="fa"?nIe():t==="ar"?rIe():t==="es"?sIe():t==="hi"?iIe():eIe()}),oIe=()=>"Discard unsaved changes and close this file?",lIe=()=>"要丢弃未保存的更改并关闭此文件吗?",cIe=()=>"تغییرات ذخیره‌نشده حذف و فایل بسته شود؟",uIe=()=>"تجاهل التغييرات غير المحفوظة وإغلاق هذا الملف؟",_Ie=()=>"¿Descartar los cambios sin guardar y cerrar este archivo?",fIe=()=>"सेव न किए गए बदलाव छोड़ें और यह फ़ाइल बंद करें?",bN=((e={},n={})=>{const t=n.locale??z();return t==="zh-CN"?lIe():t==="fa"?cIe():t==="ar"?uIe():t==="es"?_Ie():t==="hi"?fIe():oIe()}),dIe=()=>"Dismiss",hIe=()=>"关闭",pIe=()=>"بستن",mIe=()=>"تجاهل",gIe=()=>"Cerrar",vIe=()=>"खारिज करें",bIe=((e={},n={})=>{const t=n.locale??z();return t==="zh-CN"?hIe():t==="fa"?pIe():t==="ar"?mIe():t==="es"?gIe():t==="hi"?vIe():dIe()}),yIe=()=>"Dismiss compile message",xIe=()=>"关闭编译消息",wIe=()=>"بستن پیام کامپایل",kIe=()=>"تجاهل رسالة التجميع",SIe=()=>"Cerrar mensaje de compilación",CIe=()=>"कंपाइल संदेश खारिज करें",EIe=((e={},n={})=>{const t=n.locale??z();return t==="zh-CN"?xIe():t==="fa"?wIe():t==="ar"?kIe():t==="es"?SIe():t==="hi"?CIe():yIe()}),NIe=()=>"Dismiss Overleaf message",zIe=()=>"关闭 Overleaf 消息",jIe=()=>"بستن پیام Overleaf",TIe=()=>"تجاهل رسالة Overleaf",AIe=()=>"Cerrar mensaje de Overleaf",RIe=()=>"Overleaf संदेश खारिज करें",MIe=((e={},n={})=>{const t=n.locale??z();return t==="zh-CN"?zIe():t==="fa"?jIe():t==="ar"?TIe():t==="es"?AIe():t==="hi"?RIe():NIe()}),OIe=()=>"Download",DIe=()=>"下载",LIe=()=>"بارگیری",IIe=()=>"تنزيل",$Ie=()=>"Descargar",BIe=()=>"डाउनलोड करें",mD=((e={},n={})=>{const t=n.locale??z();return t==="zh-CN"?DIe():t==="fa"?LIe():t==="ar"?IIe():t==="es"?$Ie():t==="hi"?BIe():OIe()}),PIe=e=>`Download ${e==null?void 0:e.name} (out of date — recompile first)`,FIe=e=>`下载 ${e==null?void 0:e.name}(版本过旧 — 请先重新编译)`,HIe=e=>`دانلود ${e==null?void 0:e.name} (قدیمی است — ابتدا دوباره کامپایل کنید)`,qIe=e=>`تنزيل ${e==null?void 0:e.name} (غير محدَّث — أعِد التجميع أولًا)`,UIe=e=>`Descargar ${e==null?void 0:e.name} (desactualizado — vuelve a compilar antes)`,GIe=e=>`${e==null?void 0:e.name} डाउनलोड करें (पुरानी — पहले फिर से कंपाइल करें)`,VIe=((e,n={})=>{const t=n.locale??z();return t==="zh-CN"?FIe(e):t==="fa"?HIe(e):t==="ar"?qIe(e):t==="es"?UIe(e):t==="hi"?GIe(e):PIe(e)}),KIe=()=>"Failed to load file:",WIe=()=>"加载文件失败:",QIe=()=>"بارگیری فایل ناموفق بود:",XIe=()=>"تعذّر تحميل الملف:",YIe=()=>"Error al cargar el archivo:",ZIe=()=>"फ़ाइल लोड नहीं हो सकी:",yN=((e={},n={})=>{const t=n.locale??z();return t==="zh-CN"?WIe():t==="fa"?QIe():t==="ar"?XIe():t==="es"?YIe():t==="hi"?ZIe():KIe()}),JIe=()=>"File truncated — showing the first 512 KB.",e$e=()=>"文件已截断——仅显示前 512 KB。",t$e=()=>"فایل کوتاه شده است — فقط ۵۱۲ کیلوبایت نخست نمایش داده می‌شود.",n$e=()=>"تم اقتطاع الملف — عرض أول 512 كيلوبايت.",r$e=()=>"Archivo truncado — se muestran los primeros 512 KB.",s$e=()=>"फ़ाइल छोटी की गई — पहले 512 KB दिखाए जा रहे हैं।",i$e=((e={},n={})=>{const t=n.locale??z();return t==="zh-CN"?e$e():t==="fa"?t$e():t==="ar"?n$e():t==="es"?r$e():t==="hi"?s$e():JIe()}),a$e=()=>"The page below stops partway — the full file could not be loaded.",o$e=()=>"下方页面在中途结束——无法加载完整文件。",l$e=()=>"صفحهٔ زیر در میانه متوقف می‌شود — فایل کامل بارگیری نشد.",c$e=()=>"عرض الصفحة أدناه غير مكتمل — تعذّر تحميل الملف كاملًا.",u$e=()=>"La página se corta a mitad — no se pudo cargar el archivo completo.",_$e=()=>"नीचे का पेज बीच में रुक जाता है — पूरी फ़ाइल लोड नहीं हो सकी।",f$e=((e={},n={})=>{const t=n.locale??z();return t==="zh-CN"?o$e():t==="fa"?l$e():t==="ar"?c$e():t==="es"?u$e():t==="hi"?_$e():a$e()}),d$e=e=>`Rendered HTML: ${e==null?void 0:e.name}`,h$e=e=>`已渲染的 HTML:${e==null?void 0:e.name}`,p$e=e=>`HTML رندرشده: ${e==null?void 0:e.name}`,m$e=e=>`HTML المعروض: ${e==null?void 0:e.name}`,g$e=e=>`HTML renderizado: ${e==null?void 0:e.name}`,v$e=e=>`रेंडर किया गया HTML: ${e==null?void 0:e.name}`,b$e=((e,n={})=>{const t=n.locale??z();return t==="zh-CN"?h$e(e):t==="fa"?p$e(e):t==="ar"?m$e(e):t==="es"?g$e(e):t==="hi"?v$e(e):d$e(e)}),y$e=()=>"Loading…",x$e=()=>"正在加载…",w$e=()=>"در حال بارگیری…",k$e=()=>"جارٍ التحميل…",S$e=()=>"Cargando…",C$e=()=>"लोड हो रहा है…",gD=((e={},n={})=>{const t=n.locale??z();return t==="zh-CN"?x$e():t==="fa"?w$e():t==="ar"?k$e():t==="es"?S$e():t==="hi"?C$e():y$e()}),E$e=()=>"File not found.",N$e=()=>"找不到文件。",z$e=()=>"فایل پیدا نشد.",j$e=()=>"لم يُعثر على الملف.",T$e=()=>"No se encontró el archivo.",A$e=()=>"फ़ाइल नहीं मिली।",R$e=((e={},n={})=>{const t=n.locale??z();return t==="zh-CN"?N$e():t==="fa"?z$e():t==="ar"?j$e():t==="es"?T$e():t==="hi"?A$e():E$e()}),M$e=e=>`File not found in the project’s artifacts or the ${e==null?void 0:e.root}.`,O$e=e=>`在项目产物或${e==null?void 0:e.root}中找不到此文件。`,D$e=e=>`فایل در خروجی‌های پروژه یا ${e==null?void 0:e.root} پیدا نشد.`,L$e=e=>`لم يُعثر على الملف في مُخرَجات المشروع أو في ${e==null?void 0:e.root}.`,I$e=e=>`No se encontró el archivo en los artefactos del proyecto ni en ${e==null?void 0:e.root}.`,$$e=e=>`फ़ाइल प्रोजेक्ट के आर्टिफ़ैक्ट या ${e==null?void 0:e.root} में नहीं मिली।`,B$e=((e,n={})=>{const t=n.locale??z();return t==="zh-CN"?O$e(e):t==="fa"?D$e(e):t==="ar"?L$e(e):t==="es"?I$e(e):t==="hi"?$$e(e):M$e(e)}),P$e=e=>`File not found on branch ${e==null?void 0:e.branch}.`,F$e=e=>`在分支 ${e==null?void 0:e.branch} 上找不到此文件。`,H$e=e=>`فایل در شاخهٔ ${e==null?void 0:e.branch} پیدا نشد.`,q$e=e=>`لم يُعثر على الملف في الفرع ${e==null?void 0:e.branch}.`,U$e=e=>`No se encontró el archivo en la rama ${e==null?void 0:e.branch}.`,G$e=e=>`फ़ाइल ${e==null?void 0:e.branch} ब्रांच पर नहीं मिली।`,V$e=((e,n={})=>{const t=n.locale??z();return t==="zh-CN"?F$e(e):t==="fa"?H$e(e):t==="ar"?q$e(e):t==="es"?U$e(e):t==="hi"?G$e(e):P$e(e)}),K$e=()=>"File not found on disk.",W$e=()=>"磁盘上找不到此文件。",Q$e=()=>"فایل روی دیسک پیدا نشد.",X$e=()=>"لم يُعثر على الملف على القرص.",Y$e=()=>"No se encontró el archivo en disco.",Z$e=()=>"फ़ाइल डिस्क पर नहीं मिली।",J$e=((e={},n={})=>{const t=n.locale??z();return t==="zh-CN"?W$e():t==="fa"?Q$e():t==="ar"?X$e():t==="es"?Y$e():t==="hi"?Z$e():K$e()}),eBe=e=>`File not found in the ${e==null?void 0:e.root} or the project’s artifacts.`,tBe=e=>`在${e==null?void 0:e.root}或项目产物中找不到此文件。`,nBe=e=>`فایل در ${e==null?void 0:e.root} یا خروجی‌های پروژه پیدا نشد.`,rBe=e=>`لم يُعثر على الملف في ${e==null?void 0:e.root} ولا في مُخرَجات المشروع.`,sBe=e=>`No se encontró el archivo en ${e==null?void 0:e.root} ni en los artefactos del proyecto.`,iBe=e=>`फ़ाइल ${e==null?void 0:e.root} या प्रोजेक्ट के आर्टिफ़ैक्ट में नहीं मिली।`,aBe=((e,n={})=>{const t=n.locale??z();return t==="zh-CN"?tBe(e):t==="fa"?nBe(e):t==="ar"?rBe(e):t==="es"?sBe(e):t==="hi"?iBe(e):eBe(e)}),oBe=e=>`Not in the project’s artifacts — showing the copy from the ${e==null?void 0:e.root}.`,lBe=e=>`项目产物中没有此文件 — 正在显示${e==null?void 0:e.root}中的副本。`,cBe=e=>`در خروجی‌های پروژه نیست — نسخهٔ موجود در ${e==null?void 0:e.root} نمایش داده می‌شود.`,uBe=e=>`ليس في مُخرَجات المشروع — عرض النسخة من ${e==null?void 0:e.root}.`,_Be=e=>`No está en los artefactos del proyecto — se muestra la copia que hay en ${e==null?void 0:e.root}.`,fBe=e=>`प्रोजेक्ट के आर्टिफ़ैक्ट में नहीं — ${e==null?void 0:e.root} से कॉपी दिखाई जा रही है।`,dBe=((e,n={})=>{const t=n.locale??z();return t==="zh-CN"?lBe(e):t==="fa"?cBe(e):t==="ar"?uBe(e):t==="es"?_Be(e):t==="hi"?fBe(e):oBe(e)}),hBe=()=>"Open in default editor",pBe=()=>"在默认编辑器中打开",mBe=()=>"باز کردن در ویرایشگر پیش‌فرض",gBe=()=>"فتح في المحرر الافتراضي",vBe=()=>"Abrir en el editor predeterminado",bBe=()=>"डिफ़ॉल्ट एडिटर में खोलें",xN=((e={},n={})=>{const t=n.locale??z();return t==="zh-CN"?pBe():t==="fa"?mBe():t==="ar"?gBe():t==="es"?vBe():t==="hi"?bBe():hBe()}),yBe=()=>"Overleaf's copy of this file was pulled while you had unsaved edits, so what you see is no longer what is on disk. Saving now sends this draft to Overleaf instead.",xBe=()=>"你有未保存的编辑时,Overleaf 上的文件副本被拉取,因此当前内容已与磁盘不同。现在保存会将此草稿发送到 Overleaf。",wBe=()=>"هنگامی که ویرایش‌های ذخیره‌نشده داشتید، نسخهٔ Overleaf این فایل دریافت شد؛ بنابراین آنچه می‌بینید دیگر با فایل روی دیسک یکی نیست. ذخیره‌سازی اکنون این پیش‌نویس را به Overleaf می‌فرستد.",kBe=()=>"تم سحب نسخة Overleaf من هذا الملف بينما كانت لديك تعديلات غير محفوظة، لذا ما تراه لم يعد مطابقًا لما هو على القرص. الحفظ الآن يرسل هذه المسودة إلى Overleaf بدلًا من ذلك.",SBe=()=>"Se descargó la copia de Overleaf de este archivo mientras tenías cambios sin guardar, así que lo que ves ya no coincide con lo que hay en disco. Si guardas ahora, este borrador se enviará a Overleaf.",CBe=()=>"इस फ़ाइल की Overleaf कॉपी तब खींची गई जब आपके पास सेव न किए गए बदलाव थे, इसलिए जो आप देख रहे हैं वह अब डिस्क पर मौजूद चीज़ नहीं है। अभी सेव करने पर यह ड्राफ़्ट सीधे Overleaf को भेज दिया जाएगा।",EBe=((e={},n={})=>{const t=n.locale??z();return t==="zh-CN"?xBe():t==="fa"?wBe():t==="ar"?kBe():t==="es"?SBe():t==="hi"?CBe():yBe()}),NBe=()=>"Overwrite disk file",zBe=()=>"覆盖磁盘文件",jBe=()=>"بازنویسی فایل روی دیسک",TBe=()=>"استبدال الملف على القرص",ABe=()=>"Sobrescribir el archivo en disco",RBe=()=>"डिस्क फ़ाइल अधिलेखित करें",MBe=((e={},n={})=>{const t=n.locale??z();return t==="zh-CN"?zBe():t==="fa"?jBe():t==="ar"?TBe():t==="es"?ABe():t==="hi"?RBe():NBe()}),OBe=()=>"Compiled PDF is out of date",DBe=()=>"已编译的 PDF 不是最新版本",LBe=()=>"PDF کامپایل‌شده به‌روز نیست",IBe=()=>"ملف PDF المُجمَّع غير محدَّث",$Be=()=>"El PDF compilado está desactualizado",BBe=()=>"कंपाइल की गई PDF पुरानी है",PBe=((e={},n={})=>{const t=n.locale??z();return t==="zh-CN"?DBe():t==="fa"?LBe():t==="ar"?IBe():t==="es"?$Be():t==="hi"?BBe():OBe()}),FBe=()=>"project clone",HBe=()=>"项目克隆",qBe=()=>"کلون پروژه",UBe=()=>"نسخة المشروع المستنسخة",GBe=()=>"el clon del proyecto",VBe=()=>"प्रोजेक्ट क्लोन",Hg=((e={},n={})=>{const t=n.locale??z();return t==="zh-CN"?HBe():t==="fa"?qBe():t==="ar"?UBe():t==="es"?GBe():t==="hi"?VBe():FBe()}),KBe=()=>"Recompile PDF",WBe=()=>"重新编译 PDF",QBe=()=>"کامپایل دوبارهٔ PDF",XBe=()=>"إعادة تجميع PDF",YBe=()=>"Volver a compilar el PDF",ZBe=()=>"PDF फिर से कंपाइल करें",wN=((e={},n={})=>{const t=n.locale??z();return t==="zh-CN"?WBe():t==="fa"?QBe():t==="ar"?XBe():t==="es"?YBe():t==="hi"?ZBe():KBe()}),JBe=()=>"Reload from disk",ePe=()=>"从磁盘重新加载",tPe=()=>"بارگذاری مجدد از دیسک",nPe=()=>"إعادة التحميل من القرص",rPe=()=>"Recargar desde el disco",sPe=()=>"डिस्क से फिर से लोड करें",iPe=((e={},n={})=>{const t=n.locale??z();return t==="zh-CN"?ePe():t==="fa"?tPe():t==="ar"?nPe():t==="es"?rPe():t==="hi"?sPe():JBe()}),aPe=()=>"Save failed",oPe=()=>"保存失败",lPe=()=>"ذخیره ناموفق بود",cPe=()=>"فشل الحفظ",uPe=()=>"Error al guardar",_Pe=()=>"सेव विफल",fPe=((e={},n={})=>{const t=n.locale??z();return t==="zh-CN"?oPe():t==="fa"?lPe():t==="ar"?cPe():t==="es"?uPe():t==="hi"?_Pe():aPe()}),dPe=()=>"Saving…",hPe=()=>"正在保存…",pPe=()=>"در حال ذخیره…",mPe=()=>"جارٍ الحفظ…",gPe=()=>"Guardando…",vPe=()=>"सेव हो रहा है…",bPe=((e={},n={})=>{const t=n.locale??z();return t==="zh-CN"?hPe():t==="fa"?pPe():t==="ar"?mPe():t==="es"?gPe():t==="hi"?vPe():dPe()}),yPe=()=>"Selected — press ⌘C",xPe=()=>"已选中 — 按 ⌘C 复制",wPe=()=>"انتخاب شد — برای کپی ⌘C را بزنید",kPe=()=>"محدد — اضغط ⌘C",SPe=()=>"Seleccionado — pulsa ⌘C",CPe=()=>"चयनित — ⌘C दबाएं",EPe=((e={},n={})=>{const t=n.locale??z();return t==="zh-CN"?xPe():t==="fa"?wPe():t==="ar"?kPe():t==="es"?SPe():t==="hi"?CPe():yPe()}),NPe=()=>"session’s worktree",zPe=()=>"会话工作树",jPe=()=>"درخت کاری نشست",TPe=()=>"شجرة عمل الجلسة",APe=()=>"el árbol de trabajo de la sesión",RPe=()=>"सेशन की वर्कट्री",qg=((e={},n={})=>{const t=n.locale??z();return t==="zh-CN"?zPe():t==="fa"?jPe():t==="ar"?TPe():t==="es"?APe():t==="hi"?RPe():NPe()}),MPe=()=>"Show compiled PDF",OPe=()=>"显示已编译的 PDF",DPe=()=>"نمایش PDF کامپایل‌شده",LPe=()=>"عرض ملف PDF المُجمَّع",IPe=()=>"Mostrar el PDF compilado",$Pe=()=>"कंपाइल की गई PDF दिखाएं",kN=((e={},n={})=>{const t=n.locale??z();return t==="zh-CN"?OPe():t==="fa"?DPe():t==="ar"?LPe():t==="es"?IPe():t==="hi"?$Pe():MPe()}),BPe=()=>"This PDF was compiled from an earlier version of the source — recompile to update it.",PPe=()=>"此 PDF 由较早版本的源文件编译而成——请重新编译以更新。",FPe=()=>"این PDF از نسخه‌ای قدیمی‌تر از منبع ساخته شده است — برای به‌روزرسانی دوباره کامپایل کنید.",HPe=()=>"أُنشئ ملف PDF هذا من نسخة أقدم من المصدر — أعِد تجميعه لتحديثه.",qPe=()=>"Este PDF se compiló a partir de una versión anterior del código fuente — vuelve a compilar para actualizarlo.",UPe=()=>"यह PDF सोर्स के पुराने वर्शन से कंपाइल हुआ था — अपडेट करने के लिए फिर से कंपाइल करें।",GPe=((e={},n={})=>{const t=n.locale??z();return t==="zh-CN"?PPe():t==="fa"?FPe():t==="ar"?HPe():t==="es"?qPe():t==="hi"?UPe():BPe()}),VPe=()=>"This session's worktree isn't available — showing the project clone's copy.",KPe=()=>"此会话的工作树不可用——当前显示项目克隆中的副本。",WPe=()=>"درخت کاری این نشست در دسترس نیست — نسخهٔ کلون پروژه نمایش داده می‌شود.",QPe=()=>"شجرة عمل هذه الجلسة غير متاحة — عرض الملف من نسخة المشروع المستنسخة.",XPe=()=>"El árbol de trabajo de esta sesión no está disponible — se muestra la copia del clon del proyecto.",YPe=()=>"इस सेशन की वर्कट्री उपलब्ध नहीं है — प्रोजेक्ट क्लोन की कॉपी दिखाई जा रही है।",ZPe=((e={},n={})=>{const t=n.locale??z();return t==="zh-CN"?KPe():t==="fa"?WPe():t==="ar"?QPe():t==="es"?XPe():t==="hi"?YPe():VPe()}),JPe=()=>"Unsaved",eFe=()=>"未保存",tFe=()=>"ذخیره نشده",nFe=()=>"غير محفوظ",rFe=()=>"Sin guardar",sFe=()=>"सेव नहीं हुआ",vD=((e={},n={})=>{const t=n.locale??z();return t==="zh-CN"?eFe():t==="fa"?tFe():t==="ar"?nFe():t==="es"?rFe():t==="hi"?sFe():JPe()}),iFe=()=>"Unsaved — ⌘S to save",aFe=()=>"未保存 — 按 ⌘S 保存",oFe=()=>"ذخیره نشده — برای ذخیره ⌘S را بزنید",lFe=()=>"غير محفوظ — ⌘S للحفظ",cFe=()=>"Sin guardar — ⌘S para guardar",uFe=()=>"सेव नहीं हुआ — सेव करने के लिए ⌘S दबाएं",_Fe=((e={},n={})=>{const t=n.locale??z();return t==="zh-CN"?aFe():t==="fa"?oFe():t==="ar"?lFe():t==="es"?cFe():t==="hi"?uFe():iFe()}),fFe=()=>"Update orx on the remote machine to edit this file safely.",dFe=()=>"请更新远程计算机上的 orx,以安全编辑此文件。",hFe=()=>"برای ویرایش ایمن این فایل، orx را روی دستگاه ریموت به‌روز کنید.",pFe=()=>"حدّث orx على الجهاز البعيد لتعديل هذا الملف بأمان.",mFe=()=>"Actualiza orx en la máquina remota para editar este archivo de forma segura.",gFe=()=>"इस फ़ाइल को सुरक्षित रूप से संपादित करने के लिए रिमोट मशीन पर orx अपडेट करें।",vFe=((e={},n={})=>{const t=n.locale??z();return t==="zh-CN"?dFe():t==="fa"?hFe():t==="ar"?pFe():t==="es"?mFe():t==="hi"?gFe():fFe()}),bFe=()=>"This session’s worktree isn’t available, and the file isn’t in the project clone or its artifacts.",yFe=()=>"此会话的工作树不可用,项目克隆和产物中也没有此文件。",xFe=()=>"درخت کاری این نشست در دسترس نیست و فایل در نسخهٔ محلی پروژه یا خروجی‌های آن هم پیدا نشد.",wFe=()=>"شجرة عمل هذه الجلسة غير متاحة، والملف ليس في نسخة المشروع المستنسخة ولا في مُخرَجاته.",kFe=()=>"El árbol de trabajo de esta sesión no está disponible y el archivo no está en el clon del proyecto ni en sus artefactos.",SFe=()=>"इस सेशन की वर्कट्री उपलब्ध नहीं है, और फ़ाइल प्रोजेक्ट क्लोन या उसके आर्टिफ़ैक्ट में नहीं है।",CFe=((e={},n={})=>{const t=n.locale??z();return t==="zh-CN"?yFe():t==="fa"?xFe():t==="ar"?wFe():t==="es"?kFe():t==="hi"?SFe():bFe()}),EFe=()=>"Files in this workspace will appear here. Ask the agent to create a file to get started.",NFe=()=>"此工作区中的文件会显示在这里。让智能体创建一个文件即可开始。",zFe=()=>"فایل‌های این فضای کاری اینجا نمایش داده می‌شوند. برای شروع، از عامل بخواهید فایلی ایجاد کند.",jFe=()=>"ستظهر ملفات مساحة العمل هنا. اطلب من الوكيل إنشاء ملف للبدء.",TFe=()=>"Los archivos de este espacio de trabajo aparecerán aquí. Pídele al agente que cree un archivo para empezar.",AFe=()=>"इस वर्कस्पेस की फ़ाइलें यहाँ दिखेंगी। शुरू करने के लिए एजेंट से एक फ़ाइल बनाने को कहें।",RFe=((e={},n={})=>{const t=n.locale??z();return t==="zh-CN"?NFe():t==="fa"?zFe():t==="ar"?jFe():t==="es"?TFe():t==="hi"?AFe():EFe()}),MFe=()=>"Back to preview",OFe=()=>"返回预览",DFe=()=>"بازگشت به پیش‌نمایش",LFe=()=>"العودة إلى المعاينة",IFe=()=>"Volver a la vista previa",$Fe=()=>"प्रीव्यू पर वापस जाएं",BFe=((e={},n={})=>{const t=n.locale??z();return t==="zh-CN"?OFe():t==="fa"?DFe():t==="ar"?LFe():t==="es"?IFe():t==="hi"?$Fe():MFe()}),PFe=e=>`${e==null?void 0:e.count} changed files`,FFe=e=>`${e==null?void 0:e.count} 个已更改文件`,HFe=e=>`${e==null?void 0:e.count} فایل تغییرکرده`,qFe=e=>`الملفات المعدَّلة: ${e==null?void 0:e.count}`,UFe=e=>`${e==null?void 0:e.count} archivos modificados`,GFe=e=>`${e==null?void 0:e.count} बदली गई फ़ाइलें`,bD=((e,n={})=>{const t=n.locale??z();return t==="zh-CN"?FFe(e):t==="fa"?HFe(e):t==="ar"?qFe(e):t==="es"?UFe(e):t==="hi"?GFe(e):PFe(e)}),VFe=()=>"Changed files",KFe=()=>"已更改文件",WFe=()=>"فایل‌های تغییرکرده",QFe=()=>"الملفات المتغيّرة",XFe=()=>"Archivos modificados",YFe=()=>"बदली गई फ़ाइलें",ZFe=((e={},n={})=>{const t=n.locale??z();return t==="zh-CN"?KFe():t==="fa"?WFe():t==="ar"?QFe():t==="es"?XFe():t==="hi"?YFe():VFe()}),JFe=()=>"Diff preview truncated",eHe=()=>"差异预览已截断",tHe=()=>"پیش‌نمایش تفاوت کوتاه شده است",nHe=()=>"معاينة الفروق مقتطعة",rHe=()=>"Vista previa del diff truncada",sHe=()=>"डिफ़ प्रीव्यू छोटा किया गया",iHe=((e={},n={})=>{const t=n.locale??z();return t==="zh-CN"?eHe():t==="fa"?tHe():t==="ar"?nHe():t==="es"?rHe():t==="hi"?sHe():JFe()}),aHe=e=>`${e==null?void 0:e.count} files shown (partial)`,oHe=e=>`显示 ${e==null?void 0:e.count} 个文件(部分)`,lHe=e=>`${e==null?void 0:e.count} فایل نمایش داده شده (ناقص)`,cHe=e=>`الملفات المعروضة: ${e==null?void 0:e.count} (عرض جزئي)`,uHe=e=>`${e==null?void 0:e.count} archivos mostrados (parcial)`,_He=e=>`${e==null?void 0:e.count} फ़ाइलें दिखाई गईं (आंशिक)`,fHe=((e,n={})=>{const t=n.locale??z();return t==="zh-CN"?oHe(e):t==="fa"?lHe(e):t==="ar"?cHe(e):t==="es"?uHe(e):t==="hi"?_He(e):aHe(e)}),dHe=()=>"No changes.",hHe=()=>"没有更改。",pHe=()=>"تغییری وجود ندارد.",mHe=()=>"لا توجد تغييرات.",gHe=()=>"No hay cambios.",vHe=()=>"कोई बदलाव नहीं।",bHe=((e={},n={})=>{const t=n.locale??z();return t==="zh-CN"?hHe():t==="fa"?pHe():t==="ar"?mHe():t==="es"?gHe():t==="hi"?vHe():dHe()}),yHe=()=>"No complete file preview was available before the cutoff.",xHe=()=>"在截断位置之前没有完整的文件预览。",wHe=()=>"پیش از نقطهٔ برش، پیش‌نمایش کاملی از هیچ فایلی موجود نبود.",kHe=()=>"لم تتوفر معاينة كاملة للملف قبل الحد الأقصى.",SHe=()=>"No se pudo previsualizar ningún archivo completo antes del límite.",CHe=()=>"कटऑफ़ से पहले कोई पूरा फ़ाइल प्रीव्यू उपलब्ध नहीं था।",EHe=((e={},n={})=>{const t=n.locale??z();return t==="zh-CN"?xHe():t==="fa"?wHe():t==="ar"?kHe():t==="es"?SHe():t==="hi"?CHe():yHe()}),NHe=()=>"No textual diff for this file.",zHe=()=>"此文件没有文本差异。",jHe=()=>"برای این فایل تفاوت متنی وجود ندارد.",THe=()=>"لا يوجد فرق نصّي لهذا الملف.",AHe=()=>"No hay diff de texto para este archivo.",RHe=()=>"इस फ़ाइल के लिए कोई टेक्स्ट डिफ़ नहीं है।",MHe=((e={},n={})=>{const t=n.locale??z();return t==="zh-CN"?zHe():t==="fa"?jHe():t==="ar"?THe():t==="es"?AHe():t==="hi"?RHe():NHe()}),OHe=()=>"1 changed file",DHe=()=>"1 个已更改文件",LHe=()=>"۱ فایل تغییرکرده",IHe=()=>"ملف واحد معدَّل",$He=()=>"1 archivo modificado",BHe=()=>"1 बदली गई फ़ाइल",yD=((e={},n={})=>{const t=n.locale??z();return t==="zh-CN"?DHe():t==="fa"?LHe():t==="ar"?IHe():t==="es"?$He():t==="hi"?BHe():OHe()}),PHe=()=>"1 file shown (partial)",FHe=()=>"显示 1 个文件(部分)",HHe=()=>"۱ فایل نمایش داده شده (ناقص)",qHe=()=>"عُرض ملف واحد (جزئيًا)",UHe=()=>"1 archivo mostrado (parcial)",GHe=()=>"1 फ़ाइल दिखाई गई (आंशिक)",VHe=((e={},n={})=>{const t=n.locale??z();return t==="zh-CN"?FHe():t==="fa"?HHe():t==="ar"?qHe():t==="es"?UHe():t==="hi"?GHe():PHe()}),KHe=()=>"Unable to parse this diff.",WHe=()=>"无法解析此差异。",QHe=()=>"خواندن این تفاوت ممکن نبود.",XHe=()=>"تعذّر تحليل هذا الفرق.",YHe=()=>"No se pudo interpretar este diff.",ZHe=()=>"यह डिफ़ पार्स नहीं हो सका।",JHe=((e={},n={})=>{const t=n.locale??z();return t==="zh-CN"?WHe():t==="fa"?QHe():t==="ar"?XHe():t==="es"?YHe():t==="hi"?ZHe():KHe()}),eqe=e=>`Showing the first ${e==null?void 0:e.limit} (${e==null?void 0:e.read} read). View the complete diff locally with git.`,tqe=e=>`正在显示前 ${e==null?void 0:e.limit}(已读取 ${e==null?void 0:e.read})。请在本地使用 git 查看完整差异。`,nqe=e=>`نخستین ${e==null?void 0:e.limit} نمایش داده می‌شود (${e==null?void 0:e.read} خوانده شد). تفاوت کامل را با git به‌صورت محلی ببینید.`,rqe=e=>`عرض أول ${e==null?void 0:e.limit} (قُرئ ${e==null?void 0:e.read}). اطّلع على الفرق الكامل محليًا عبر git.`,sqe=e=>`Se muestran los primeros ${e==null?void 0:e.limit} (${e==null?void 0:e.read} leídos). Consulta el diff completo en local con git.`,iqe=e=>`पहले ${e==null?void 0:e.limit} दिखाए जा रहे हैं (${e==null?void 0:e.read} पढ़े गए)। git के साथ लोकल रूप से पूरा डिफ़ देखें।`,aqe=((e,n={})=>{const t=n.locale??z();return t==="zh-CN"?tqe(e):t==="fa"?nqe(e):t==="ar"?rqe(e):t==="es"?sqe(e):t==="hi"?iqe(e):eqe(e)}),oqe=()=>"View full diff",lqe=()=>"查看完整差异",cqe=()=>"نمایش تفاوت کامل",uqe=()=>"عرض الفرق الكامل",_qe=()=>"Ver diff completo",fqe=()=>"पूरा डिफ़ देखें",dqe=((e={},n={})=>{const t=n.locale??z();return t==="zh-CN"?lqe():t==="fa"?cqe():t==="ar"?uqe():t==="es"?_qe():t==="hi"?fqe():oqe()}),hqe=()=>"Create a token ↗",pqe=()=>"创建令牌 ↗",mqe=()=>"ساخت توکن ↗",gqe=()=>"إنشاء رمز ↗",vqe=()=>"Crear un token ↗",bqe=()=>"एक टोकन बनाएं ↗",yqe=((e={},n={})=>{const t=n.locale??z();return t==="zh-CN"?pqe():t==="fa"?mqe():t==="ar"?gqe():t==="es"?vqe():t==="hi"?bqe():hqe()}),xqe=()=>"Approve and run",wqe=()=>"批准并运行",kqe=()=>"تأیید و اجرا",Sqe=()=>"الموافقة والتشغيل",Cqe=()=>"Aprobar y ejecutar",Eqe=()=>"स्वीकार करें और चलाएं",Nqe=((e={},n={})=>{const t=n.locale??z();return t==="zh-CN"?wqe():t==="fa"?kqe():t==="ar"?Sqe():t==="es"?Cqe():t==="hi"?Eqe():xqe()}),zqe=()=>"Cancel setup",jqe=()=>"取消设置",Tqe=()=>"لغو راه‌اندازی",Aqe=()=>"إلغاء الإعداد",Rqe=()=>"Cancelar configuración",Mqe=()=>"सेटअप रद्द करें",Oqe=((e={},n={})=>{const t=n.locale??z();return t==="zh-CN"?jqe():t==="fa"?Tqe():t==="ar"?Aqe():t==="es"?Rqe():t==="hi"?Mqe():zqe()}),Dqe=()=>"Checking connection…",Lqe=()=>"正在检查连接…",Iqe=()=>"در حال بررسی اتصال…",$qe=()=>"جارٍ التحقق من الإعداد…",Bqe=()=>"Comprobando conexión…",Pqe=()=>"कनेक्शन जाँचा जा रहा है…",Fqe=((e={},n={})=>{const t=n.locale??z();return t==="zh-CN"?Lqe():t==="fa"?Iqe():t==="ar"?$qe():t==="es"?Bqe():t==="hi"?Pqe():Dqe()}),Hqe=e=>`${e==null?void 0:e.agent} is connected.`,qqe=e=>`${e==null?void 0:e.agent} 已连接。`,Uqe=e=>`${e==null?void 0:e.agent} متصل است.`,Gqe=e=>`أصبح ${e==null?void 0:e.agent} جاهزًا.`,Vqe=e=>`${e==null?void 0:e.agent} está conectado.`,Kqe=e=>`${e==null?void 0:e.agent} कनेक्टेड है।`,Wqe=((e,n={})=>{const t=n.locale??z();return t==="zh-CN"?qqe(e):t==="fa"?Uqe(e):t==="ar"?Gqe(e):t==="es"?Vqe(e):t==="hi"?Kqe(e):Hqe(e)}),Qqe=()=>"Setup needs attention.",Xqe=()=>"设置需要处理。",Yqe=()=>"راه‌اندازی نیاز به بررسی دارد.",Zqe=()=>"تعذّر إكمال الإعداد.",Jqe=()=>"La configuración requiere atención.",eUe=()=>"सेटअप पर ध्यान देने की ज़रूरत है।",xD=((e={},n={})=>{const t=n.locale??z();return t==="zh-CN"?Xqe():t==="fa"?Yqe():t==="ar"?Zqe():t==="es"?Jqe():t==="hi"?eUe():Qqe()}),tUe=()=>"Install",nUe=()=>"安装",rUe=()=>"نصب",sUe=()=>"تثبيت",iUe=()=>"Instalar",aUe=()=>"इंस्टॉल करें",oUe=((e={},n={})=>{const t=n.locale??z();return t==="zh-CN"?nUe():t==="fa"?rUe():t==="ar"?sUe():t==="es"?iUe():t==="hi"?aUe():tUe()}),lUe=e=>`Approve the command below to download and install ${e==null?void 0:e.agent} on your computer.`,cUe=e=>`批准以下命令以在您的电脑上下载并安装 ${e==null?void 0:e.agent}。`,uUe=e=>`برای دانلود و نصب ${e==null?void 0:e.agent} روی رایانه خود، دستور زیر را تأیید کنید.`,_Ue=e=>`سيؤدي هذا إلى تنزيل ${e==null?void 0:e.agent} وتثبيته على جهازك. وافق لتشغيل الأمر أدناه.`,fUe=e=>`Aprueba el siguiente comando para descargar e instalar ${e==null?void 0:e.agent} en tu equipo.`,dUe=e=>`अपने कंप्यूटर पर ${e==null?void 0:e.agent} डाउनलोड और इंस्टॉल करने के लिए नीचे दी गई कमांड को स्वीकार करें।`,hUe=((e,n={})=>{const t=n.locale??z();return t==="zh-CN"?cUe(e):t==="fa"?uUe(e):t==="ar"?_Ue(e):t==="es"?fUe(e):t==="hi"?dUe(e):lUe(e)}),pUe=()=>"Could not load setup commands.",mUe=()=>"无法加载设置命令。",gUe=()=>"بارگیری دستورهای راه‌اندازی ناموفق بود.",vUe=()=>"تعذّر تحميل أوامر الإعداد.",bUe=()=>"No se pudieron cargar los comandos de configuración.",yUe=()=>"सेटअप कमांड लोड नहीं हो सके।",xUe=((e={},n={})=>{const t=n.locale??z();return t==="zh-CN"?mUe():t==="fa"?gUe():t==="ar"?vUe():t==="es"?bUe():t==="hi"?yUe():pUe()}),wUe=()=>"Sign in",kUe=()=>"登录",SUe=()=>"ورود",CUe=()=>"تسجيل الدخول",EUe=()=>"Iniciar sesión",NUe=()=>"साइन इन करें",wD=((e={},n={})=>{const t=n.locale??z();return t==="zh-CN"?kUe():t==="fa"?SUe():t==="ar"?CUe():t==="es"?EUe():t==="hi"?NUe():wUe()}),zUe=()=>"The agent is not ready yet. Re-check or retry sign-in.",jUe=()=>"代理尚未就绪。请重新检查或重试登录。",TUe=()=>"عامل هنوز آماده نیست. دوباره بررسی کنید یا ورود را تکرار کنید.",AUe=()=>"وكيل البرمجة غير جاهز بعد. أعد التحقق ثم حاول مجددًا.",RUe=()=>"El agente aún no está listo. Vuelve a comprobarlo o intenta iniciar sesión de nuevo.",MUe=()=>"एजेंट अभी तैयार नहीं है। फिर से जाँचें या साइन-इन फिर से कोशिश करें।",kD=((e={},n={})=>{const t=n.locale??z();return t==="zh-CN"?jUe():t==="fa"?TUe():t==="ar"?AUe():t==="es"?RUe():t==="hi"?MUe():zUe()}),OUe=()=>"Install, update, and sign-in buttons open a terminal here in OpenResearch.",DUe=()=>"安装、更新和登录按钮会在 OpenResearch 内打开终端。",LUe=()=>"دکمه‌های نصب، به‌روزرسانی و ورود، ترمینالی در همین OpenResearch باز می‌کنند.",IUe=()=>"يفتح طرفية هنا",$Ue=()=>"Los botones de instalación, actualización e inicio de sesión abren un terminal aquí, en OpenResearch.",BUe=()=>"इंस्टॉल, अपडेट और साइन-इन बटन OpenResearch में यहीं एक टर्मिनल खोलते हैं।",PUe=((e={},n={})=>{const t=n.locale??z();return t==="zh-CN"?DUe():t==="fa"?LUe():t==="ar"?IUe():t==="es"?$Ue():t==="hi"?BUe():OUe()}),FUe=()=>"This install command requires Node.js and npm.",HUe=()=>"此安装命令需要 Node.js 和 npm。",qUe=()=>"این دستور نصب به Node.js و npm نیاز دارد.",UUe=()=>"يلزم تثبيت Node.js وnpm لتشغيل هذا الأمر.",GUe=()=>"Este comando de instalación requiere Node.js y npm.",VUe=()=>"इस इंस्टॉल कमांड के लिए Node.js और npm ज़रूरी हैं।",KUe=((e={},n={})=>{const t=n.locale??z();return t==="zh-CN"?HUe():t==="fa"?qUe():t==="ar"?UUe():t==="es"?GUe():t==="hi"?VUe():FUe()}),WUe=e=>`Running \`${e==null?void 0:e.command}\` in the terminal:`,QUe=e=>`正在终端中运行 \`${e==null?void 0:e.command}\`:`,XUe=e=>`در حال اجرای \`${e==null?void 0:e.command}\` در ترمینال:`,YUe=e=>`جارٍ تشغيل \`${e==null?void 0:e.command}\` في الطرفية:`,ZUe=e=>`Ejecutando \`${e==null?void 0:e.command}\` en el terminal:`,JUe=e=>`टर्मिनल में \`${e==null?void 0:e.command}\` चलाया जा रहा है:`,eGe=((e,n={})=>{const t=n.locale??z();return t==="zh-CN"?QUe(e):t==="fa"?XUe(e):t==="ar"?YUe(e):t==="es"?ZUe(e):t==="hi"?JUe(e):WUe(e)}),tGe=e=>`Set up ${e==null?void 0:e.agent}`,nGe=e=>`设置 ${e==null?void 0:e.agent}`,rGe=e=>`راه‌اندازی ${e==null?void 0:e.agent}`,sGe=e=>`إعداد ${e==null?void 0:e.agent}`,iGe=e=>`Configurar ${e==null?void 0:e.agent}`,aGe=e=>`${e==null?void 0:e.agent} सेट अप करें`,SN=((e,n={})=>{const t=n.locale??z();return t==="zh-CN"?nGe(e):t==="fa"?rGe(e):t==="ar"?sGe(e):t==="es"?iGe(e):t==="hi"?aGe(e):tGe(e)}),oGe=()=>"Update",lGe=()=>"更新",cGe=()=>"به‌روزرسانی",uGe=()=>"تحديث",_Ge=()=>"Actualizar",fGe=()=>"अपडेट करें",dGe=((e={},n={})=>{const t=n.locale??z();return t==="zh-CN"?lGe():t==="fa"?cGe():t==="ar"?uGe():t==="es"?_Ge():t==="hi"?fGe():oGe()}),hGe=e=>`Approve the command below to update ${e==null?void 0:e.agent} on your computer.`,pGe=e=>`批准以下命令以在您的电脑上更新 ${e==null?void 0:e.agent}。`,mGe=e=>`برای به‌روزرسانی ${e==null?void 0:e.agent} روی رایانه خود، دستور زیر را تأیید کنید.`,gGe=e=>`سيؤدي هذا إلى تحديث ${e==null?void 0:e.agent} على جهازك. وافق لتشغيل الأمر أدناه.`,vGe=e=>`Aprueba el siguiente comando para actualizar ${e==null?void 0:e.agent} en tu equipo.`,bGe=e=>`अपने कंप्यूटर पर ${e==null?void 0:e.agent} अपडेट करने के लिए नीचे दी गई कमांड को स्वीकार करें।`,yGe=((e,n={})=>{const t=n.locale??z();return t==="zh-CN"?pGe(e):t==="fa"?mGe(e):t==="ar"?gGe(e):t==="es"?vGe(e):t==="hi"?bGe(e):hGe(e)}),xGe=()=>"All projects",wGe=()=>"所有项目",kGe=()=>"همهٔ پروژه‌ها",SGe=()=>"كل المشاريع",CGe=()=>"Todos los proyectos",EGe=()=>"सभी प्रोजेक्ट",CN=((e={},n={})=>{const t=n.locale??z();return t==="zh-CN"?wGe():t==="fa"?kGe():t==="ar"?SGe():t==="es"?CGe():t==="hi"?EGe():xGe()}),NGe=()=>"Configure Repository",zGe=()=>"配置仓库",jGe=()=>"پیکربندی مخزن",TGe=()=>"إعداد المستودع",AGe=()=>"Configurar repositorio",RGe=()=>"रिपॉज़िटरी कॉन्फ़िगर करें",MGe=((e={},n={})=>{const t=n.locale??z();return t==="zh-CN"?zGe():t==="fa"?jGe():t==="ar"?TGe():t==="es"?AGe():t==="hi"?RGe():NGe()}),OGe=()=>"Create a new project",DGe=()=>"新建项目",LGe=()=>"ایجاد پروژهٔ جدید",IGe=()=>"إنشاء مشروع جديد",$Ge=()=>"Crear un proyecto nuevo",BGe=()=>"नया प्रोजेक्ट बनाएं",PGe=((e={},n={})=>{const t=n.locale??z();return t==="zh-CN"?DGe():t==="fa"?LGe():t==="ar"?IGe():t==="es"?$Ge():t==="hi"?BGe():OGe()}),FGe=()=>"Hide sidebar",HGe=()=>"隐藏侧边栏",qGe=()=>"پنهان کردن نوار کناری",UGe=()=>"إخفاء الشريط الجانبي",GGe=()=>"Ocultar barra lateral",VGe=()=>"साइडबार छिपाएं",EN=((e={},n={})=>{const t=n.locale??z();return t==="zh-CN"?HGe():t==="fa"?qGe():t==="ar"?UGe():t==="es"?GGe():t==="hi"?VGe():FGe()}),KGe=()=>"Project",WGe=()=>"项目",QGe=()=>"پروژه",XGe=()=>"المشروع",YGe=()=>"Proyecto",ZGe=()=>"प्रोजेक्ट",JGe=((e={},n={})=>{const t=n.locale??z();return t==="zh-CN"?WGe():t==="fa"?QGe():t==="ar"?XGe():t==="es"?YGe():t==="hi"?ZGe():KGe()}),eVe=e=>`${e==null?void 0:e.count} cancelled`,tVe=e=>`${e==null?void 0:e.count} 次取消`,nVe=e=>`${e==null?void 0:e.count} لغوشده`,rVe=e=>`الملغاة: ${e==null?void 0:e.count}`,sVe=e=>`${e==null?void 0:e.count} canceladas`,iVe=e=>`${e==null?void 0:e.count} रद्द`,aVe=((e,n={})=>{const t=n.locale??z();return t==="zh-CN"?tVe(e):t==="fa"?nVe(e):t==="ar"?rVe(e):t==="es"?sVe(e):t==="hi"?iVe(e):eVe(e)}),oVe=e=>`${e==null?void 0:e.count} done`,lVe=e=>`${e==null?void 0:e.count} 次完成`,cVe=e=>`${e==null?void 0:e.count} تمام‌شده`,uVe=e=>`المكتملة: ${e==null?void 0:e.count}`,_Ve=e=>`${e==null?void 0:e.count} completadas`,fVe=e=>`${e==null?void 0:e.count} पूरे`,dVe=((e,n={})=>{const t=n.locale??z();return t==="zh-CN"?lVe(e):t==="fa"?cVe(e):t==="ar"?uVe(e):t==="es"?_Ve(e):t==="hi"?fVe(e):oVe(e)}),hVe=e=>`${e==null?void 0:e.count} failed`,pVe=e=>`${e==null?void 0:e.count} 次失败`,mVe=e=>`${e==null?void 0:e.count} ناموفق`,gVe=e=>`الفاشلة: ${e==null?void 0:e.count}`,vVe=e=>`${e==null?void 0:e.count} con error`,bVe=e=>`${e==null?void 0:e.count} विफल`,yVe=((e,n={})=>{const t=n.locale??z();return t==="zh-CN"?pVe(e):t==="fa"?mVe(e):t==="ar"?gVe(e):t==="es"?vVe(e):t==="hi"?bVe(e):hVe(e)}),xVe=e=>`${e==null?void 0:e.count} files`,wVe=e=>`${e==null?void 0:e.count} 个文件`,kVe=e=>`${e==null?void 0:e.count} فایل`,SVe=e=>`الملفات: ${e==null?void 0:e.count}`,CVe=e=>`${e==null?void 0:e.count} archivos`,EVe=e=>`${e==null?void 0:e.count} फ़ाइलें`,NVe=((e,n={})=>{const t=n.locale??z();return t==="zh-CN"?wVe(e):t==="fa"?kVe(e):t==="ar"?SVe(e):t==="es"?CVe(e):t==="hi"?EVe(e):xVe(e)}),zVe=e=>`${e==null?void 0:e.count}+ files`,jVe=e=>`至少 ${e==null?void 0:e.count} 个文件`,TVe=e=>`بیش از ${e==null?void 0:e.count} فایل`,AVe=e=>`الملفات: ${e==null?void 0:e.count} على الأقل`,RVe=e=>`${e==null?void 0:e.count}+ archivos`,MVe=e=>`${e==null?void 0:e.count}+ फ़ाइलें`,OVe=((e,n={})=>{const t=n.locale??z();return t==="zh-CN"?jVe(e):t==="fa"?TVe(e):t==="ar"?AVe(e):t==="es"?RVe(e):t==="hi"?MVe(e):zVe(e)}),DVe=e=>`${e==null?void 0:e.count} live`,LVe=e=>`${e==null?void 0:e.count} 次进行中`,IVe=e=>`${e==null?void 0:e.count} فعال`,$Ve=e=>`النشطة: ${e==null?void 0:e.count}`,BVe=e=>`${e==null?void 0:e.count} en curso`,PVe=e=>`${e==null?void 0:e.count} लाइव`,FVe=((e,n={})=>{const t=n.locale??z();return t==="zh-CN"?LVe(e):t==="fa"?IVe(e):t==="ar"?$Ve(e):t==="es"?BVe(e):t==="hi"?PVe(e):DVe(e)}),HVe=()=>"1 file",qVe=()=>"1 个文件",UVe=()=>"۱ فایل",GVe=()=>"ملف واحد",VVe=()=>"1 archivo",KVe=()=>"1 फ़ाइल",WVe=((e={},n={})=>{const t=n.locale??z();return t==="zh-CN"?qVe():t==="fa"?UVe():t==="ar"?GVe():t==="es"?VVe():t==="hi"?KVe():HVe()}),QVe=()=>"1 run",XVe=()=>"1 次运行",YVe=()=>"۱ اجرا",ZVe=()=>"تشغيل واحد",JVe=()=>"1 ejecución",eKe=()=>"1 रन",tKe=((e={},n={})=>{const t=n.locale??z();return t==="zh-CN"?XVe():t==="fa"?YVe():t==="ar"?ZVe():t==="es"?JVe():t==="hi"?eKe():QVe()}),nKe=e=>`${e==null?void 0:e.count} runs`,rKe=e=>`${e==null?void 0:e.count} 次运行`,sKe=e=>`${e==null?void 0:e.count} اجرا`,iKe=e=>`عمليات التشغيل: ${e==null?void 0:e.count}`,aKe=e=>`${e==null?void 0:e.count} ejecuciones`,oKe=e=>`${e==null?void 0:e.count} रन`,lKe=((e,n={})=>{const t=n.locale??z();return t==="zh-CN"?rKe(e):t==="fa"?sKe(e):t==="ar"?iKe(e):t==="es"?aKe(e):t==="hi"?oKe(e):nKe(e)}),cKe=()=>"Zoom in",uKe=()=>"放大",_Ke=()=>"بزرگ‌نمایی",fKe=()=>"تكبير",dKe=()=>"Acercar",hKe=()=>"ज़ूम इन",NN=((e={},n={})=>{const t=n.locale??z();return t==="zh-CN"?uKe():t==="fa"?_Ke():t==="ar"?fKe():t==="es"?dKe():t==="hi"?hKe():cKe()}),pKe=()=>"Zoom out",mKe=()=>"缩小",gKe=()=>"کوچک‌نمایی",vKe=()=>"تصغير",bKe=()=>"Alejar",yKe=()=>"ज़ूम आउट",zN=((e={},n={})=>{const t=n.locale??z();return t==="zh-CN"?mKe():t==="fa"?gKe():t==="ar"?vKe():t==="es"?bKe():t==="hi"?yKe():pKe()}),xKe=()=>"Reset zoom to fit",wKe=()=>"重置为适合窗口",kKe=()=>"بازنشانی بزرگ‌نمایی برای جا شدن",SKe=()=>"إعادة ضبط التكبير للملاءمة",CKe=()=>"Restablecer zoom para ajustar",EKe=()=>"फ़िट करने के लिए ज़ूम रीसेट करें",jN=((e={},n={})=>{const t=n.locale??z();return t==="zh-CN"?wKe():t==="fa"?kKe():t==="ar"?SKe():t==="es"?CKe():t==="hi"?EKe():xKe()}),NKe=()=>"No instances yet.",zKe=()=>"还没有实例。",jKe=()=>"هنوز نمونه‌ای وجود ندارد.",TKe=()=>"لا توجد مثيلات بعد.",AKe=()=>"Aún no hay instancias.",RKe=()=>"अभी तक कोई इंस्टेंस नहीं।",MKe=((e={},n={})=>{const t=n.locale??z();return t==="zh-CN"?zKe():t==="fa"?jKe():t==="ar"?TKe():t==="es"?AKe():t==="hi"?RKe():NKe()}),OKe=()=>"Nothing running right now.",DKe=()=>"当前没有运行中的实例。",LKe=()=>"اکنون چیزی در حال اجرا نیست.",IKe=()=>"لا شيء قيد التشغيل الآن.",$Ke=()=>"No hay nada en ejecución ahora mismo.",BKe=()=>"अभी कुछ नहीं चल रहा।",PKe=((e={},n={})=>{const t=n.locale??z();return t==="zh-CN"?DKe():t==="fa"?LKe():t==="ar"?IKe():t==="es"?$Ke():t==="hi"?BKe():OKe()}),FKe=()=>"Select a project to see its history.",HKe=()=>"请选择一个项目以查看其历史记录。",qKe=()=>"برای دیدن تاریخچه یک پروژه انتخاب کنید.",UKe=()=>"اختر مشروعًا لرؤية سجله.",GKe=()=>"Selecciona un proyecto para ver su historial.",VKe=()=>"इसका इतिहास देखने के लिए एक प्रोजेक्ट चुनें।",KKe=((e={},n={})=>{const t=n.locale??z();return t==="zh-CN"?HKe():t==="fa"?qKe():t==="ar"?UKe():t==="es"?GKe():t==="hi"?VKe():FKe()}),WKe=()=>"Select a project to see its runs.",QKe=()=>"请选择一个项目以查看其运行。",XKe=()=>"برای دیدن اجراها یک پروژه انتخاب کنید.",YKe=()=>"اختر مشروعًا لرؤية عمليات تشغيله.",ZKe=()=>"Selecciona un proyecto para ver sus ejecuciones.",JKe=()=>"इसके रन देखने के लिए एक प्रोजेक्ट चुनें।",eWe=((e={},n={})=>{const t=n.locale??z();return t==="zh-CN"?QKe():t==="fa"?XKe():t==="ar"?YKe():t==="es"?ZKe():t==="hi"?JKe():WKe()}),tWe=()=>"View history",nWe=()=>"查看历史记录",rWe=()=>"مشاهدهٔ تاریخچه",sWe=()=>"عرض السجل",iWe=()=>"Ver historial",aWe=()=>"इतिहास देखें",oWe=((e={},n={})=>{const t=n.locale??z();return t==="zh-CN"?nWe():t==="fa"?rWe():t==="ar"?sWe():t==="es"?iWe():t==="hi"?aWe():tWe()}),lWe=e=>`View history (${e==null?void 0:e.count})`,cWe=e=>`查看历史记录(${e==null?void 0:e.count})`,uWe=e=>`مشاهدهٔ تاریخچه (${e==null?void 0:e.count})`,_We=e=>`عرض السجل (${e==null?void 0:e.count})`,fWe=e=>`Ver historial (${e==null?void 0:e.count})`,dWe=e=>`इतिहास देखें (${e==null?void 0:e.count})`,hWe=((e,n={})=>{const t=n.locale??z();return t==="zh-CN"?cWe(e):t==="fa"?uWe(e):t==="ar"?_We(e):t==="es"?fWe(e):t==="hi"?dWe(e):lWe(e)}),pWe=()=>"The engine exited without producing a PDF or a log.",mWe=()=>"引擎已退出,但没有生成 PDF 或日志。",gWe=()=>"موتور بدون تولید PDF یا گزارش خارج شد.",vWe=()=>"خرج المحرك دون إنتاج ملف PDF أو سجل.",bWe=()=>"El motor terminó sin generar un PDF ni un log.",yWe=()=>"इंजन बिना PDF या लॉग बनाए बाहर निकल गया।",xWe=((e={},n={})=>{const t=n.locale??z();return t==="zh-CN"?mWe():t==="fa"?gWe():t==="ar"?vWe():t==="es"?bWe():t==="hi"?yWe():pWe()}),wWe=()=>"Loading…",kWe=()=>"正在加载…",SWe=()=>"در حال بارگیری…",CWe=()=>"جارٍ التحميل…",EWe=()=>"Cargando…",NWe=()=>"लोड हो रहा है…",zWe=((e={},n={})=>{const t=n.locale??z();return t==="zh-CN"?kWe():t==="fa"?SWe():t==="ar"?CWe():t==="es"?EWe():t==="hi"?NWe():wWe()}),jWe=()=>"Add local model",TWe=()=>"添加本地模型",AWe=()=>"افزودن مدل محلی",RWe=()=>"إضافة نموذج محلي",MWe=()=>"Añadir modelo local",OWe=()=>"लोकल मॉडल जोड़ें",SD=((e={},n={})=>{const t=n.locale??z();return t==="zh-CN"?TWe():t==="fa"?AWe():t==="ar"?RWe():t==="es"?MWe():t==="hi"?OWe():jWe()}),DWe=()=>"Local server address",LWe=()=>"本地服务器地址",IWe=()=>"نشانی سرور محلی",$We=()=>"عنوان الخادم المحلي",BWe=()=>"Dirección del servidor local",PWe=()=>"लोकल सर्वर पता",FWe=((e={},n={})=>{const t=n.locale??z();return t==="zh-CN"?LWe():t==="fa"?IWe():t==="ar"?$We():t==="es"?BWe():t==="hi"?PWe():DWe()}),HWe=()=>"Find models",qWe=()=>"查找模型",UWe=()=>"یافتن مدل‌ها",GWe=()=>"العثور على النماذج",VWe=()=>"Buscar modelos",KWe=()=>"मॉडल खोजें",WWe=((e={},n={})=>{const t=n.locale??z();return t==="zh-CN"?qWe():t==="fa"?UWe():t==="ar"?GWe():t==="es"?VWe():t==="hi"?KWe():HWe()}),QWe=()=>"(OpenAI compatible)",XWe=()=>"(兼容 OpenAI)",YWe=()=>"(سازگار با OpenAI)",ZWe=()=>"(متوافق مع OpenAI)",JWe=()=>"(compatible con OpenAI)",eQe=()=>"(OpenAI संगत)",CD=((e={},n={})=>{const t=n.locale??z();return t==="zh-CN"?XWe():t==="fa"?YWe():t==="ar"?ZWe():t==="es"?JWe():t==="hi"?eQe():QWe()}),tQe=()=>"Saved, but OpenCode did not list this model. Check installed agents again. If your OpenCode config restricts enabled providers, allow this connection before using it.",nQe=()=>"已保存,但 OpenCode 未列出该模型。请重新检查已安装的智能体。如果 OpenCode 配置限制了启用的提供商,请先允许此连接。",rQe=()=>"ذخیره شد، اما OpenCode این مدل را فهرست نکرد. عامل‌های نصب‌شده را دوباره بررسی کنید. اگر پیکربندی OpenCode ارائه‌دهندگان فعال را محدود کرده، ابتدا این اتصال را مجاز کنید.",sQe=()=>"تم الحفظ، لكن OpenCode لم يُدرج هذا النموذج. تحقق من الوكلاء المثبّتين مجددًا. إذا كان إعداد OpenCode يقيّد المزوّدين المفعّلين، فاسمح بهذا الاتصال قبل استخدامه.",iQe=()=>"Guardado, pero OpenCode no mostró este modelo. Vuelve a comprobar los agentes instalados. Si tu configuración de OpenCode limita los proveedores habilitados, permite esta conexión antes de usarla.",aQe=()=>"सेव हो गया, पर OpenCode ने इस मॉडल की सूची नहीं दी। इंस्टॉल किए गए एजेंट फिर से जाँचें। अगर आपका OpenCode कॉन्फ़िग चालू प्रोवाइडर सीमित करता है, तो इस्तेमाल से पहले इस कनेक्शन की अनुमति दें।",oQe=((e={},n={})=>{const t=n.locale??z();return t==="zh-CN"?nQe():t==="fa"?rQe():t==="ar"?sQe():t==="es"?iQe():t==="hi"?aQe():tQe()}),lQe=()=>"Connected",cQe=()=>"已连接",uQe=()=>"متصل شد",_Qe=()=>"متصل",fQe=()=>"Conectado",dQe=()=>"कनेक्टेड",hQe=((e={},n={})=>{const t=n.locale??z();return t==="zh-CN"?cQe():t==="fa"?uQe():t==="ar"?_Qe():t==="es"?fQe():t==="hi"?dQe():lQe()}),pQe=()=>"Context window",mQe=()=>"上下文窗口",gQe=()=>"پنجرهٔ زمینه",vQe=()=>"نافذة السياق",bQe=()=>"Ventana de contexto",yQe=()=>"कॉन्टेक्स्ट विंडो",xQe=((e={},n={})=>{const t=n.locale??z();return t==="zh-CN"?mQe():t==="fa"?gQe():t==="ar"?vQe():t==="es"?bQe():t==="hi"?yQe():pQe()}),wQe=()=>"Match the context window loaded in your model app. 32K is a useful starting point for tools; larger contexts use more memory.",kQe=()=>"请与模型应用中加载的上下文窗口保持一致。使用工具时可从 32K 开始;更大的上下文需要更多内存。",SQe=()=>"اندازهٔ زمینه را با تنظیم بارگذاری‌شده در برنامهٔ مدل هماهنگ کنید. ۳۲هزار توکن نقطهٔ شروع مناسبی برای ابزارهاست؛ زمینهٔ بزرگ‌تر حافظهٔ بیشتری مصرف می‌کند.",CQe=()=>"استخدم حجم نافذة السياق نفسه المحدد في تطبيق النموذج. يُعدّ 32 ألف رمز نقطة بداية مناسبة لاستخدام الأدوات؛ وتستهلك النوافذ الأكبر ذاكرة أكثر.",EQe=()=>"Usa la misma ventana de contexto que tengas cargada en tu app de modelos. 32K es un buen punto de partida para herramientas; los contextos más grandes usan más memoria.",NQe=()=>"अपने मॉडल ऐप में लोड कॉन्टेक्स्ट विंडो से मेल खाएं। टूल के लिए 32K एक अच्छा शुरुआती बिंदु है; बड़े कॉन्टेक्स्ट ज़्यादा मेमोरी इस्तेमाल करते हैं।",zQe=((e={},n={})=>{const t=n.locale??z();return t==="zh-CN"?kQe():t==="fa"?SQe():t==="ar"?CQe():t==="es"?EQe():t==="hi"?NQe():wQe()}),jQe=()=>"Custom Endpoint",TQe=()=>"自定义端点",AQe=()=>"نقطهٔ اتصال سفارشی",RQe=()=>"نقطة نهاية مخصصة",MQe=()=>"Endpoint personalizado",OQe=()=>"कस्टम एंडपॉइंट",Mk=((e={},n={})=>{const t=n.locale??z();return t==="zh-CN"?TQe():t==="fa"?AQe():t==="ar"?RQe():t==="es"?MQe():t==="hi"?OQe():jQe()}),DQe=e=>`Disconnect ${e==null?void 0:e.name}`,LQe=e=>`断开 ${e==null?void 0:e.name}`,IQe=e=>`قطع اتصال ${e==null?void 0:e.name}`,$Qe=e=>`قطع اتصال ${e==null?void 0:e.name}`,BQe=e=>`Desconectar ${e==null?void 0:e.name}`,PQe=e=>`${e==null?void 0:e.name} डिस्कनेक्ट करें`,FQe=((e,n={})=>{const t=n.locale??z();return t==="zh-CN"?LQe(e):t==="fa"?IQe(e):t==="ar"?$Qe(e):t==="es"?BQe(e):t==="hi"?PQe(e):DQe(e)}),HQe=()=>"Get OpenCode",qQe=()=>"获取 OpenCode",UQe=()=>"دریافت OpenCode",GQe=()=>"الحصول على OpenCode",VQe=()=>"Obtener OpenCode",KQe=()=>"OpenCode लें",WQe=((e={},n={})=>{const t=n.locale??z();return t==="zh-CN"?qQe():t==="fa"?UQe():t==="ar"?GQe():t==="es"?VQe():t==="hi"?KQe():HQe()}),QQe=()=>"Install OpenCode to run tools with your local model, then re-check installed agents. No cloud account is required.",XQe=()=>"安装 OpenCode 以使用本地模型执行工具,然后重新检查已安装的智能体。无需云端账户。",YQe=()=>"برای اجرای ابزارها با مدل محلی، OpenCode را نصب کنید و عامل‌های نصب‌شده را دوباره بررسی کنید. حساب ابری لازم نیست.",ZQe=()=>"ثبّت OpenCode لتشغيل الأدوات مع نموذجك المحلي، ثم أعد فحص الوكلاء المثبّتين. لا يلزم حساب سحابي.",JQe=()=>"Instala OpenCode para usar herramientas con tu modelo local y vuelve a comprobar los agentes instalados. No necesitas una cuenta en la nube.",eXe=()=>"अपने लोकल मॉडल से टूल चलाने के लिए OpenCode इंस्टॉल करें, फिर इंस्टॉल किए गए एजेंट फिर से जाँचें। किसी क्लाउड खाते की ज़रूरत नहीं है।",tXe=((e={},n={})=>{const t=n.locale??z();return t==="zh-CN"?XQe():t==="fa"?YQe():t==="ar"?ZQe():t==="es"?JQe():t==="hi"?eXe():QQe()}),nXe=()=>"API key (optional)",rXe=()=>"API 密钥(可选)",sXe=()=>"کلید API (اختیاری)",iXe=()=>"مفتاح API (اختياري)",aXe=()=>"Clave de API (opcional)",oXe=()=>"API की (वैकल्पिक)",lXe=((e={},n={})=>{const t=n.locale??z();return t==="zh-CN"?rXe():t==="fa"?sXe():t==="ar"?iXe():t==="es"?aXe():t==="hi"?oXe():nXe()}),cXe=()=>"Save model",uXe=()=>"保存模型",_Xe=()=>"ذخیرهٔ مدل",fXe=()=>"حفظ النموذج",dXe=()=>"Guardar modelo",hXe=()=>"मॉडल सेव करें",pXe=((e={},n={})=>{const t=n.locale??z();return t==="zh-CN"?uXe():t==="fa"?_Xe():t==="ar"?fXe():t==="es"?dXe():t==="hi"?hXe():cXe()}),mXe=()=>"Model server",gXe=()=>"模型服务器",vXe=()=>"سرور مدل",bXe=()=>"خادم النموذج",yXe=()=>"Servidor del modelo",xXe=()=>"मॉडल सर्वर",TN=((e={},n={})=>{const t=n.locale??z();return t==="zh-CN"?gXe():t==="fa"?vXe():t==="ar"?bXe():t==="es"?yXe():t==="hi"?xXe():mXe()}),wXe=()=>"Local models",kXe=()=>"本地模型",SXe=()=>"مدل‌های محلی",CXe=()=>"النماذج المحلية",EXe=()=>"Modelos locales",NXe=()=>"लोकल मॉडल",AN=((e={},n={})=>{const t=n.locale??z();return t==="zh-CN"?kXe():t==="fa"?SXe():t==="ar"?CXe():t==="es"?EXe():t==="hi"?NXe():wXe()}),zXe=()=>"API token (optional)",jXe=()=>"API 令牌(可选)",TXe=()=>"توکن API (اختیاری)",AXe=()=>"رمز API (اختياري)",RXe=()=>"Token de API (opcional)",MXe=()=>"API टोकन (वैकल्पिक)",OXe=((e={},n={})=>{const t=n.locale??z();return t==="zh-CN"?jXe():t==="fa"?TXe():t==="ar"?AXe():t==="es"?RXe():t==="hi"?MXe():zXe()}),DXe=()=>"Copy",LXe=()=>"复制",IXe=()=>"کپی",$Xe=()=>"نسخ",BXe=()=>"Copiar",PXe=()=>"कॉपी करें",Ok=((e={},n={})=>{const t=n.locale??z();return t==="zh-CN"?LXe():t==="fa"?IXe():t==="ar"?$Xe():t==="es"?BXe():t==="hi"?PXe():DXe()}),FXe=()=>"Copy code",HXe=()=>"复制代码",qXe=()=>"کپی کد",UXe=()=>"نسخ الشيفرة",GXe=()=>"Copiar código",VXe=()=>"कोड कॉपी करें",KXe=((e={},n={})=>{const t=n.locale??z();return t==="zh-CN"?HXe():t==="fa"?qXe():t==="ar"?UXe():t==="es"?GXe():t==="hi"?VXe():FXe()}),WXe=()=>"Download",QXe=()=>"下载",XXe=()=>"بارگیری",YXe=()=>"تنزيل",ZXe=()=>"Descargar",JXe=()=>"डाउनलोड करें",mv=((e={},n={})=>{const t=n.locale??z();return t==="zh-CN"?QXe():t==="fa"?XXe():t==="ar"?YXe():t==="es"?ZXe():t==="hi"?JXe():WXe()}),eYe=()=>"This browser can’t preview this media format.",tYe=()=>"此浏览器无法预览该媒体格式。",nYe=()=>"این مرورگر نمی‌تواند این قالب رسانه را پیش‌نمایش کند.",rYe=()=>"لا يستطيع هذا المتصفح معاينة صيغة الوسائط هذه.",sYe=()=>"Este navegador no puede mostrar este formato multimedia.",iYe=()=>"यह ब्राउज़र इस मीडिया फ़ॉर्मैट का प्रीव्यू नहीं दिखा सकता।",aYe=((e={},n={})=>{const t=n.locale??z();return t==="zh-CN"?tYe():t==="fa"?nYe():t==="ar"?rYe():t==="es"?sYe():t==="hi"?iYe():eYe()}),oYe=()=>"Add Local Model",lYe=()=>"添加本地模型",cYe=()=>"افزودن مدل محلی",uYe=()=>"إضافة نموذج محلي",_Ye=()=>"Añadir modelo local",fYe=()=>"लोकल मॉडल जोड़ें",dYe=((e={},n={})=>{const t=n.locale??z();return t==="zh-CN"?lYe():t==="fa"?cYe():t==="ar"?uYe():t==="es"?_Ye():t==="hi"?fYe():oYe()}),hYe=()=>" · CLI configuration",pYe=()=>" · CLI 配置",mYe=()=>" · پیکربندی CLI",gYe=()=>" · إعداد واجهة سطر الأوامر",vYe=()=>" · Configuración de la CLI",bYe=()=>" · CLI कॉन्फ़िगरेशन",ED=((e={},n={})=>{const t=n.locale??z();return t==="zh-CN"?pYe():t==="fa"?mYe():t==="ar"?gYe():t==="es"?vYe():t==="hi"?bYe():hYe()}),yYe=()=>"· Default",xYe=()=>"· 默认",wYe=()=>"· پیش‌فرض",kYe=()=>"· الافتراضي",SYe=()=>"· Predeterminado",CYe=()=>"· डिफ़ॉल्ट",ND=((e={},n={})=>{const t=n.locale??z();return t==="zh-CN"?xYe():t==="fa"?wYe():t==="ar"?kYe():t==="es"?SYe():t==="hi"?CYe():yYe()}),EYe=()=>"Default model",NYe=()=>"默认模型",zYe=()=>"مدل پیش‌فرض",jYe=()=>"النموذج الافتراضي",TYe=()=>"Modelo predeterminado",AYe=()=>"डिफ़ॉल्ट मॉडल",RN=((e={},n={})=>{const t=n.locale??z();return t==="zh-CN"?NYe():t==="fa"?zYe():t==="ar"?jYe():t==="es"?TYe():t==="hi"?AYe():EYe()}),RYe=()=>"Detecting harnesses…",MYe=()=>"正在检测智能体工具…",OYe=()=>"در حال شناسایی ابزارهای عامل…",DYe=()=>"جارٍ اكتشاف أدوات البرمجة…",LYe=()=>"Detectando agentes…",IYe=()=>"हार्नेस पहचाने जा रहे हैं…",$Ye=((e={},n={})=>{const t=n.locale??z();return t==="zh-CN"?MYe():t==="fa"?OYe():t==="ar"?DYe():t==="es"?LYe():t==="hi"?IYe():RYe()}),BYe=()=>"Effort",PYe=()=>"推理强度",FYe=()=>"میزان استدلال",HYe=()=>"الجهد",qYe=()=>"Esfuerzo",UYe=()=>"प्रयास स्तर",GYe=((e={},n={})=>{const t=n.locale??z();return t==="zh-CN"?PYe():t==="fa"?FYe():t==="ar"?HYe():t==="es"?qYe():t==="hi"?UYe():BYe()}),VYe=()=>"Fast speed ·",KYe=()=>"快速 ·",WYe=()=>"سرعت بالا ·",QYe=()=>"سرعة عالية ·",XYe=()=>"Modo rápido ·",YYe=()=>"तेज़ गति ·",ZYe=((e={},n={})=>{const t=n.locale??z();return t==="zh-CN"?KYe():t==="fa"?WYe():t==="ar"?QYe():t==="es"?XYe():t==="hi"?YYe():VYe()}),JYe=()=>"Mode",eZe=()=>"模式",tZe=()=>"حالت",nZe=()=>"الوضع",rZe=()=>"Modo",sZe=()=>"मोड",MN=((e={},n={})=>{const t=n.locale??z();return t==="zh-CN"?eZe():t==="fa"?tZe():t==="ar"?nZe():t==="es"?rZe():t==="hi"?sZe():JYe()}),iZe=()=>"Model",aZe=()=>"模型",oZe=()=>"مدل",lZe=()=>"النموذج",cZe=()=>"Modelo",uZe=()=>"मॉडल",Yp=((e={},n={})=>{const t=n.locale??z();return t==="zh-CN"?aZe():t==="fa"?oZe():t==="ar"?lZe():t==="es"?cZe():t==="hi"?uZe():iZe()}),_Ze=e=>`${e==null?void 0:e.count} more — search to find`,fZe=e=>`还有 ${e==null?void 0:e.count} 个——搜索即可查找`,dZe=e=>`${e==null?void 0:e.count} مورد دیگر — برای یافتن جست‌وجو کنید`,hZe=e=>`نماذج إضافية: ${e==null?void 0:e.count} — ابحث للعثور عليها`,pZe=e=>`${e==null?void 0:e.count} más — busca para encontrarlos`,mZe=e=>`${e==null?void 0:e.count} और — खोजने के लिए टाइप करें`,gZe=((e,n={})=>{const t=n.locale??z();return t==="zh-CN"?fZe(e):t==="fa"?dZe(e):t==="ar"?hZe(e):t==="es"?pZe(e):t==="hi"?mZe(e):_Ze(e)}),vZe=()=>"Not available",bZe=()=>"不可用",yZe=()=>"در دسترس نیست",xZe=()=>"غير متاح",wZe=()=>"No disponible",kZe=()=>"उपलब्ध नहीं",SZe=((e={},n={})=>{const t=n.locale??z();return t==="zh-CN"?bZe():t==="fa"?yZe():t==="ar"?xZe():t==="es"?wZe():t==="hi"?kZe():vZe()}),CZe=()=>"Search models…",EZe=()=>"搜索模型…",NZe=()=>"جست‌وجوی مدل‌ها…",zZe=()=>"البحث في النماذج…",jZe=()=>"Buscar modelos…",TZe=()=>"मॉडल खोजें…",zD=((e={},n={})=>{const t=n.locale??z();return t==="zh-CN"?EZe():t==="fa"?NZe():t==="ar"?zZe():t==="es"?jZe():t==="hi"?TZe():CZe()}),AZe=()=>"Sessions keep their harness. Start a new chat to switch.",RZe=()=>"会话将沿用当前的智能体工具。新建聊天即可切换。",MZe=()=>"نشست‌ها ابزار عامل خود را نگه می‌دارند. برای تغییر، گفتگوی جدیدی بسازید",OZe=()=>"تحتفظ كل جلسة بأداة البرمجة الخاصة بها. ابدأ محادثة جديدة للتبديل.",DZe=()=>"Cada sesión mantiene su agente. Inicia un chat nuevo para cambiarlo.",LZe=()=>"सेशन अपना हार्नेस बनाए रखते हैं। बदलने के लिए नई चैट शुरू करें।",IZe=((e={},n={})=>{const t=n.locale??z();return t==="zh-CN"?RZe():t==="fa"?MZe():t==="ar"?OZe():t==="es"?DZe():t==="hi"?LZe():AZe()}),$Ze=()=>"Speed",BZe=()=>"速度",PZe=()=>"سرعت",FZe=()=>"السرعة",HZe=()=>"Velocidad",qZe=()=>"गति",ON=((e={},n={})=>{const t=n.locale??z();return t==="zh-CN"?BZe():t==="fa"?PZe():t==="ar"?FZe():t==="es"?HZe():t==="hi"?qZe():$Ze()}),UZe=()=>"Unavailable",GZe=()=>"不可用",VZe=()=>"در دسترس نیست",KZe=()=>"غير متاح",WZe=()=>"No disponible",QZe=()=>"उपलब्ध नहीं",so=((e={},n={})=>{const t=n.locale??z();return t==="zh-CN"?GZe():t==="fa"?VZe():t==="ar"?KZe():t==="es"?WZe():t==="hi"?QZe():UZe()}),XZe=e=>`Use “${e==null?void 0:e.id}” as the model ID`,YZe=e=>`使用“${e==null?void 0:e.id}”作为模型 ID`,ZZe=e=>`از «${e==null?void 0:e.id}» به‌عنوان شناسهٔ مدل استفاده کنید`,JZe=e=>`استخدام «${e==null?void 0:e.id}» معرّفًا للنموذج`,eJe=e=>`Usar “${e==null?void 0:e.id}” como ID del modelo`,tJe=e=>`मॉडल ID के रूप में “${e==null?void 0:e.id}” इस्तेमाल करें`,nJe=((e,n={})=>{const t=n.locale??z();return t==="zh-CN"?YZe(e):t==="fa"?ZZe(e):t==="ar"?JZe(e):t==="es"?eJe(e):t==="hi"?tJe(e):XZe(e)}),rJe=()=>"Variant",sJe=()=>"变体",iJe=()=>"گونه",aJe=()=>"الصنف",oJe=()=>"Variante",lJe=()=>"वेरिएंट",cJe=((e={},n={})=>{const t=n.locale??z();return t==="zh-CN"?sJe():t==="fa"?iJe():t==="ar"?aJe():t==="es"?oJe():t==="hi"?lJe():rJe()}),uJe=()=>"Advanced",_Je=()=>"高级",fJe=()=>"پیشرفته",dJe=()=>"متقدم",hJe=()=>"Avanzado",pJe=()=>"उन्नत",mJe=((e={},n={})=>{const t=n.locale??z();return t==="zh-CN"?_Je():t==="fa"?fJe():t==="ar"?dJe():t==="es"?hJe():t==="hi"?pJe():uJe()}),gJe=()=>"Advanced · Connect GitHub",vJe=()=>"高级 · 连接 GitHub",bJe=()=>"پیشرفته · اتصال GitHub",yJe=()=>"متقدم · ربط GitHub",xJe=()=>"Avanzado · Conectar GitHub",wJe=()=>"उन्नत · GitHub कनेक्ट करें",kJe=((e={},n={})=>{const t=n.locale??z();return t==="zh-CN"?vJe():t==="fa"?bJe():t==="ar"?yJe():t==="es"?xJe():t==="hi"?wJe():gJe()}),SJe=()=>"Advanced · GitHub sync on",CJe=()=>"高级 · GitHub 同步已开启",EJe=()=>"پیشرفته · همگام‌سازی GitHub روشن است",NJe=()=>"متقدم · مزامنة GitHub مفعّلة",zJe=()=>"Avanzado · Sincronización con GitHub activada",jJe=()=>"उन्नत · GitHub सिंक चालू",TJe=((e={},n={})=>{const t=n.locale??z();return t==="zh-CN"?CJe():t==="fa"?EJe():t==="ar"?NJe():t==="es"?zJe():t==="hi"?jJe():SJe()}),AJe=()=>"Choose a different destination. A paper project needs a new or empty folder of its own.",RJe=()=>"请选择其他位置。论文项目需要拥有独立的新文件夹或空文件夹。",MJe=()=>"مقصد دیگری انتخاب کنید. پروژهٔ مقاله باید پوشهٔ جدید یا خالیِ جداگانه‌ای داشته باشد.",OJe=()=>"اختر وجهة مختلفة. يحتاج مشروع الورقة إلى مجلد جديد أو فارغ خاص به.",DJe=()=>"Elige otro destino. Un proyecto de paper necesita su propia carpeta nueva o vacía.",LJe=()=>"अलग गंतव्य चुनें। पेपर प्रोजेक्ट को अपना एक नया या खाली फ़ोल्डर चाहिए।",IJe=((e={},n={})=>{const t=n.locale??z();return t==="zh-CN"?RJe():t==="fa"?MJe():t==="ar"?OJe():t==="es"?DJe():t==="hi"?LJe():AJe()}),$Je=e=>`Change project folder; current folder: ${e==null?void 0:e.path}`,BJe=e=>`更改项目文件夹;当前文件夹:${e==null?void 0:e.path}`,PJe=e=>`تغییر پوشهٔ پروژه؛ پوشهٔ کنونی: ${e==null?void 0:e.path}`,FJe=e=>`تغيير مجلد المشروع؛ المجلد الحالي: ${e==null?void 0:e.path}`,HJe=e=>`Cambiar la carpeta del proyecto; carpeta actual: ${e==null?void 0:e.path}`,qJe=e=>`प्रोजेक्ट फ़ोल्डर बदलें; मौजूदा फ़ोल्डर: ${e==null?void 0:e.path}`,UJe=((e,n={})=>{const t=n.locale??z();return t==="zh-CN"?BJe(e):t==="fa"?PJe(e):t==="ar"?FJe(e):t==="es"?HJe(e):t==="hi"?qJe(e):$Je(e)}),GJe=()=>"Choose an existing project folder",VJe=()=>"选择现有项目文件夹",KJe=()=>"انتخاب پوشهٔ موجود پروژه",WJe=()=>"اختر مجلد مشروع موجود",QJe=()=>"Elige una carpeta de proyecto existente",XJe=()=>"एक मौजूदा प्रोजेक्ट फ़ोल्डर चुनें",DN=((e={},n={})=>{const t=n.locale??z();return t==="zh-CN"?VJe():t==="fa"?KJe():t==="ar"?WJe():t==="es"?QJe():t==="hi"?XJe():GJe()}),YJe=()=>"Choosing…",ZJe=()=>"正在选择…",JJe=()=>"در حال انتخاب…",eet=()=>"جارٍ الاختيار…",tet=()=>"Eligiendo…",net=()=>"चुना जा रहा है…",ret=((e={},n={})=>{const t=n.locale??z();return t==="zh-CN"?ZJe():t==="fa"?JJe():t==="ar"?eet():t==="es"?tet():t==="hi"?net():YJe()}),set=()=>"Clone destination",iet=()=>"克隆位置",aet=()=>"مقصد کلون",oet=()=>"وجهة الاستنساخ",cet=()=>"Destino del clon",uet=()=>"क्लोन गंतव्य",_et=((e={},n={})=>{const t=n.locale??z();return t==="zh-CN"?iet():t==="fa"?aet():t==="ar"?oet():t==="es"?cet():t==="hi"?uet():set()}),fet=()=>"Clone paper project",det=()=>"克隆论文项目",het=()=>"کلون پروژهٔ مقاله",pet=()=>"استنساخ مشروع الورقة",met=()=>"Clonar proyecto del paper",get=()=>"पेपर प्रोजेक्ट क्लोन करें",vet=((e={},n={})=>{const t=n.locale??z();return t==="zh-CN"?det():t==="fa"?het():t==="ar"?pet():t==="es"?met():t==="hi"?get():fet()}),bet=()=>"Create project",yet=()=>"创建项目",xet=()=>"ایجاد پروژه",wet=()=>"إنشاء المشروع",ket=()=>"Crear proyecto",Cet=()=>"प्रोजेक्ट बनाएं",LN=((e={},n={})=>{const t=n.locale??z();return t==="zh-CN"?yet():t==="fa"?xet():t==="ar"?wet():t==="es"?ket():t==="hi"?Cet():bet()}),Eet=()=>"Creating…",Net=()=>"正在创建…",zet=()=>"در حال ایجاد…",jet=()=>"جارٍ الإنشاء…",Tet=()=>"Creando…",Aet=()=>"बनाया जा रहा है…",Ret=((e={},n={})=>{const t=n.locale??z();return t==="zh-CN"?Net():t==="fa"?zet():t==="ar"?jet():t==="es"?Tet():t==="hi"?Aet():Eet()}),Met=()=>"Choose a different destination. This path is a file, not a folder.",Oet=()=>"请选择其他位置。此路径是文件,不是文件夹。",Det=()=>"مقصد دیگری انتخاب کنید. این مسیر فایل است، نه پوشه.",Let=()=>"اختر وجهة مختلفة. هذا المسار ملف وليس مجلدًا.",Iet=()=>"Elige otro destino. Esta ruta es un archivo, no una carpeta.",$et=()=>"अलग गंतव्य चुनें। यह पथ एक फ़ाइल है, फ़ोल्डर नहीं।",U2=((e={},n={})=>{const t=n.locale??z();return t==="zh-CN"?Oet():t==="fa"?Det():t==="ar"?Let():t==="es"?Iet():t==="hi"?$et():Met()}),Bet=()=>"A folder already exists here. Choose a different name or location, or use Existing folder.",Pet=()=>"此处已有文件夹。请选择其他名称或位置,或使用“现有文件夹”。",Fet=()=>"پوشه‌ای در این محل وجود دارد. نام یا محل دیگری انتخاب کنید، یا از «پوشهٔ موجود» استفاده کنید.",Het=()=>"يوجد مجلد هنا بالفعل. اختر اسمًا أو موقعًا مختلفًا، أو استخدم «مجلد موجود».",qet=()=>"Ya existe una carpeta aquí. Elige otro nombre u otra ubicación, o usa Carpeta existente.",Uet=()=>"यहाँ पहले से एक फ़ोल्डर मौजूद है। अलग नाम या स्थान चुनें, या मौजूदा फ़ोल्डर का इस्तेमाल करें।",IN=((e={},n={})=>{const t=n.locale??z();return t==="zh-CN"?Pet():t==="fa"?Fet():t==="ar"?Het():t==="es"?qet():t==="hi"?Uet():Bet()}),Get=()=>"Blank project",Vet=()=>"空白项目",Ket=()=>"پروژهٔ خالی",Wet=()=>"مشروع فارغ",Qet=()=>"Proyecto en blanco",Xet=()=>"खाली प्रोजेक्ट",Yet=((e={},n={})=>{const t=n.locale??z();return t==="zh-CN"?Vet():t==="fa"?Ket():t==="ar"?Wet():t==="es"?Qet():t==="hi"?Xet():Get()}),Zet=()=>"Cancel",Jet=()=>"取消",ett=()=>"لغو",ttt=()=>"إلغاء",ntt=()=>"Cancelar",rtt=()=>"रद्द करें",stt=((e={},n={})=>{const t=n.locale??z();return t==="zh-CN"?Jet():t==="fa"?ett():t==="ar"?ttt():t==="es"?ntt():t==="hi"?rtt():Zet()}),itt=()=>"Change",att=()=>"更改",ott=()=>"تغییر",ltt=()=>"تغيير",ctt=()=>"Cambiar",utt=()=>"बदलें",_tt=((e={},n={})=>{const t=n.locale??z();return t==="zh-CN"?att():t==="fa"?ott():t==="ar"?ltt():t==="es"?ctt():t==="hi"?utt():itt()}),ftt=()=>"Change selected paper",dtt=()=>"更改所选论文",htt=()=>"تغییر مقالهٔ انتخاب‌شده",ptt=()=>"تغيير الورقة المحددة",mtt=()=>"Cambiar el paper seleccionado",gtt=()=>"चयनित पेपर बदलें",vtt=((e={},n={})=>{const t=n.locale??z();return t==="zh-CN"?dtt():t==="fa"?htt():t==="ar"?ptt():t==="es"?mtt():t==="hi"?gtt():ftt()}),btt=()=>"Check out a Git branch before using this folder.",ytt=()=>"使用此文件夹前,请先检出一个 Git 分支。",xtt=()=>"پیش از استفاده از این پوشه، یک شاخهٔ Git را checkout کنید.",wtt=()=>"انتقل إلى فرع Git قبل استخدام هذا المجلد.",ktt=()=>"Haz checkout de una rama de Git antes de usar esta carpeta.",Stt=()=>"इस फ़ोल्डर का उपयोग करने से पहले एक Git ब्रांच चेक आउट करें।",Ctt=((e={},n={})=>{const t=n.locale??z();return t==="zh-CN"?ytt():t==="fa"?xtt():t==="ar"?wtt():t==="es"?ktt():t==="hi"?Stt():btt()}),Ett=()=>"Checking project location.",Ntt=()=>"正在检查项目位置。",ztt=()=>"در حال بررسی محل پروژه.",jtt=()=>"جارٍ التحقق من موقع المشروع.",Ttt=()=>"Comprobando la ubicación del proyecto.",Att=()=>"प्रोजेक्ट स्थान जाँचा जा रहा है।",$N=((e={},n={})=>{const t=n.locale??z();return t==="zh-CN"?Ntt():t==="fa"?ztt():t==="ar"?jtt():t==="es"?Ttt():t==="hi"?Att():Ett()}),Rtt=()=>"Existing folder",Mtt=()=>"现有文件夹",Ott=()=>"پوشهٔ موجود",Dtt=()=>"مجلد موجود",Ltt=()=>"Carpeta existente",Itt=()=>"मौजूदा फ़ोल्डर",$tt=((e={},n={})=>{const t=n.locale??z();return t==="zh-CN"?Mtt():t==="fa"?Ott():t==="ar"?Dtt():t==="es"?Ltt():t==="hi"?Itt():Rtt()}),Btt=()=>"Experiment branches will be pushed to the remote GitHub repository.",Ptt=()=>"实验分支将推送到远程 GitHub 仓库。",Ftt=()=>"شاخه‌های آزمایش به مخزن دوردست GitHub فرستاده می‌شوند.",Htt=()=>"ستُرفع فروع التجارب إلى مستودع GitHub البعيد.",qtt=()=>"Las ramas de los experimentos se subirán al repositorio remoto de GitHub.",Utt=()=>"प्रयोग ब्रांच रिमोट GitHub रिपॉज़िटरी पर पुश की जाएंगी।",Gtt=((e={},n={})=>{const t=n.locale??z();return t==="zh-CN"?Ptt():t==="fa"?Ftt():t==="ar"?Htt():t==="es"?qtt():t==="hi"?Utt():Btt()}),Vtt=()=>"From a paper",Ktt=()=>"从论文创建",Wtt=()=>"از یک مقاله",Qtt=()=>"من ورقة بحثية",Xtt=()=>"A partir de un paper",Ytt=()=>"एक पेपर से",Ztt=((e={},n={})=>{const t=n.locale??z();return t==="zh-CN"?Ktt():t==="fa"?Wtt():t==="ar"?Qtt():t==="es"?Xtt():t==="hi"?Ytt():Vtt()}),Jtt=()=>"Git is required for experiments but is not installed. Install Git, then restart OpenResearch.",ent=()=>"实验需要 Git,但尚未安装。请安装 Git,然后重新启动 OpenResearch。",tnt=()=>"Git برای آزمایش‌ها لازم است اما نصب نیست. Git را نصب و سپس OpenResearch را دوباره راه‌اندازی کنید.",nnt=()=>"‏Git مطلوب للتجارب لكنه غير مثبّت. ثبّت Git ثم أعد تشغيل OpenResearch.",rnt=()=>"Git es necesario para los experimentos, pero no está instalado. Instala Git y reinicia OpenResearch.",snt=()=>"प्रयोगों के लिए Git ज़रूरी है पर इंस्टॉल नहीं है। Git इंस्टॉल करें, फिर OpenResearch फिर से शुरू करें।",int=((e={},n={})=>{const t=n.locale??z();return t==="zh-CN"?ent():t==="fa"?tnt():t==="ar"?nnt():t==="es"?rnt():t==="hi"?snt():Jtt()}),ant=()=>"my-research",ont=()=>"my-research",lnt=()=>"my-research",cnt=()=>"my-research",unt=()=>"mi-investigacion",_nt=()=>"मेरा-शोध",BN=((e={},n={})=>{const t=n.locale??z();return t==="zh-CN"?ont():t==="fa"?lnt():t==="ar"?cnt():t==="es"?unt():t==="hi"?_nt():ant()}),fnt=()=>"No papers found. Try an arXiv ID, URL, or a different title.",dnt=()=>"未找到论文。请尝试 arXiv ID、网址或其他标题。",hnt=()=>"مقاله‌ای پیدا نشد. یک شناسهٔ arXiv، نشانی یا عنوان دیگری را امتحان کنید.",pnt=()=>"لم يُعثر على أوراق. جرّب معرّف arXiv أو رابطًا أو عنوانًا مختلفًا.",mnt=()=>"No se encontraron papers. Prueba con un ID de arXiv, una URL u otro título.",gnt=()=>"कोई पेपर नहीं मिला। एक arXiv ID, URL, या अलग शीर्षक आज़माएं।",vnt=((e={},n={})=>{const t=n.locale??z();return t==="zh-CN"?dnt():t==="fa"?hnt():t==="ar"?pnt():t==="es"?mnt():t==="hi"?gnt():fnt()}),bnt=()=>"No public repository found on alphaXiv",ynt=()=>"在 alphaXiv 上未找到公开仓库",xnt=()=>"مخزن عمومی‌ای در alphaXiv پیدا نشد",wnt=()=>"لم يُعثر على مستودع عام على alphaXiv",knt=()=>"No se encontró ningún repositorio público en alphaXiv",Snt=()=>"alphaXiv पर कोई सार्वजनिक रिपॉज़िटरी नहीं मिली",Cnt=((e={},n={})=>{const t=n.locale??z();return t==="zh-CN"?ynt():t==="fa"?xnt():t==="ar"?wnt():t==="es"?knt():t==="hi"?Snt():bnt()}),Ent=()=>"OpenResearch will start a blank project with this paper's PDF.",Nnt=()=>"OpenResearch 将使用此论文的 PDF 创建空白项目。",znt=()=>"OpenResearch یک پروژهٔ خالی با PDF این مقاله آغاز می‌کند.",jnt=()=>"سيبدأ OpenResearch مشروعًا فارغًا مع ملف PDF لهذه الورقة.",Tnt=()=>"OpenResearch creará un proyecto en blanco con el PDF de este paper.",Ant=()=>"OpenResearch इस पेपर की PDF के साथ एक खाली प्रोजेक्ट शुरू करेगा।",Rnt=((e={},n={})=>{const t=n.locale??z();return t==="zh-CN"?Nnt():t==="fa"?znt():t==="ar"?jnt():t==="es"?Tnt():t==="hi"?Ant():Ent()}),Mnt=()=>"Paper",Ont=()=>"论文",Dnt=()=>"مقاله",Lnt=()=>"ورقة بحثية",Int=()=>"Paper",$nt=()=>"पेपर",Bnt=((e={},n={})=>{const t=n.locale??z();return t==="zh-CN"?Ont():t==="fa"?Dnt():t==="ar"?Lnt():t==="es"?Int():t==="hi"?$nt():Mnt()}),Pnt=()=>"Project location",Fnt=()=>"项目位置",Hnt=()=>"محل پروژه",qnt=()=>"موقع المشروع",Unt=()=>"Ubicación del proyecto",Gnt=()=>"प्रोजेक्ट स्थान",G2=((e={},n={})=>{const t=n.locale??z();return t==="zh-CN"?Fnt():t==="fa"?Hnt():t==="ar"?qnt():t==="es"?Unt():t==="hi"?Gnt():Pnt()}),Vnt=()=>"Project name",Knt=()=>"项目名称",Wnt=()=>"نام پروژه",Qnt=()=>"اسم المشروع",Xnt=()=>"Nombre del proyecto",Ynt=()=>"प्रोजेक्ट नाम",PN=((e={},n={})=>{const t=n.locale??z();return t==="zh-CN"?Knt():t==="fa"?Wnt():t==="ar"?Qnt():t==="es"?Xnt():t==="hi"?Ynt():Vnt()}),Znt=()=>"Search for a paper by arXiv ID, URL, or title",Jnt=()=>"按 arXiv ID、网址或标题搜索论文",ert=()=>"جست‌وجوی مقاله با شناسهٔ arXiv، نشانی یا عنوان",trt=()=>"ابحث عن ورقة بمعرّف arXiv أو رابط أو عنوان",nrt=()=>"Busca un paper por ID de arXiv, URL o título",rrt=()=>"arXiv ID, URL, या शीर्षक से पेपर खोजें",srt=((e={},n={})=>{const t=n.locale??z();return t==="zh-CN"?Jnt():t==="fa"?ert():t==="ar"?trt():t==="es"?nrt():t==="hi"?rrt():Znt()}),irt=()=>"Sync experiments to GitHub",art=()=>"将实验同步到 GitHub",ort=()=>"همگام‌سازی آزمایش‌ها با GitHub",lrt=()=>"مزامنة التجارب مع GitHub",crt=()=>"Sincronizar experimentos con GitHub",urt=()=>"प्रयोग GitHub पर सिंक करें",_rt=((e={},n={})=>{const t=n.locale??z();return t==="zh-CN"?art():t==="fa"?ort():t==="ar"?lrt():t==="es"?crt():t==="hi"?urt():irt()}),frt=()=>"That folder no longer exists. Choose it again.",drt=()=>"该文件夹已不存在。请重新选择。",hrt=()=>"آن پوشه دیگر وجود ندارد. دوباره انتخابش کنید.",prt=()=>"لم يعد ذلك المجلد موجودًا. اختره مجددًا.",mrt=()=>"Esa carpeta ya no existe. Vuelve a elegirla.",grt=()=>"वह फ़ोल्डर अब मौजूद नहीं है। इसे फिर से चुनें।",vrt=((e={},n={})=>{const t=n.locale??z();return t==="zh-CN"?drt():t==="fa"?hrt():t==="ar"?prt():t==="es"?mrt():t==="hi"?grt():frt()}),brt=()=>"The selected folder contains an invalid Git repository.",yrt=()=>"所选文件夹包含无效的 Git 仓库。",xrt=()=>"پوشهٔ انتخاب‌شده یک مخزن Git نامعتبر دارد.",wrt=()=>"يحتوي المجلد المحدد على مستودع Git غير صالح.",krt=()=>"La carpeta seleccionada contiene un repositorio de Git no válido.",Srt=()=>"चयनित फ़ोल्डर में एक अमान्य Git रिपॉज़िटरी है।",Crt=((e={},n={})=>{const t=n.locale??z();return t==="zh-CN"?yrt():t==="fa"?xrt():t==="ar"?wrt():t==="es"?krt():t==="hi"?Srt():brt()}),Ert=()=>"The selected path is not a folder.",Nrt=()=>"所选路径不是文件夹。",zrt=()=>"مسیر انتخاب‌شده پوشه نیست.",jrt=()=>"المسار المحدد ليس مجلدًا.",Trt=()=>"La ruta seleccionada no es una carpeta.",Art=()=>"चयनित पथ एक फ़ोल्डर नहीं है।",Rrt=((e={},n={})=>{const t=n.locale??z();return t==="zh-CN"?Nrt():t==="fa"?zrt():t==="ar"?jrt():t==="es"?Trt():t==="hi"?Art():Ert()}),Mrt=e=>`Checking ${e==null?void 0:e.repository}.`,Ort=e=>`正在检查 ${e==null?void 0:e.repository}。`,Drt=e=>`در حال بررسی ${e==null?void 0:e.repository}.`,Lrt=e=>`جارٍ التحقق من ${e==null?void 0:e.repository}.`,Irt=e=>`Comprobando ${e==null?void 0:e.repository}.`,$rt=e=>`${e==null?void 0:e.repository} जाँची जा रही है।`,Brt=((e,n={})=>{const t=n.locale??z();return t==="zh-CN"?Ort(e):t==="fa"?Drt(e):t==="ar"?Lrt(e):t==="es"?Irt(e):t==="hi"?$rt(e):Mrt(e)}),Prt=e=>`Creates ${e==null?void 0:e.repository}.`,Frt=e=>`将创建 ${e==null?void 0:e.repository}。`,Hrt=e=>`${e==null?void 0:e.repository} را ایجاد می‌کند.`,qrt=e=>`ينشئ ${e==null?void 0:e.repository}.`,Urt=e=>`Crea ${e==null?void 0:e.repository}.`,Grt=e=>`${e==null?void 0:e.repository} बनाता है।`,Vrt=((e,n={})=>{const t=n.locale??z();return t==="zh-CN"?Frt(e):t==="fa"?Hrt(e):t==="ar"?qrt(e):t==="es"?Urt(e):t==="hi"?Grt(e):Prt(e)}),Krt=e=>`Pushes to ${e==null?void 0:e.repository}.`,Wrt=e=>`将推送到 ${e==null?void 0:e.repository}。`,Qrt=e=>`به ${e==null?void 0:e.repository} پوش می‌کند.`,Xrt=e=>`يرفع التغييرات إلى ${e==null?void 0:e.repository}.`,Yrt=e=>`Sube los cambios a ${e==null?void 0:e.repository}.`,Zrt=e=>`${e==null?void 0:e.repository} पर पुश करता है।`,Jrt=((e,n={})=>{const t=n.locale??z();return t==="zh-CN"?Wrt(e):t==="fa"?Qrt(e):t==="ar"?Xrt(e):t==="es"?Yrt(e):t==="hi"?Zrt(e):Krt(e)}),est=()=>"Project location is required.",tst=()=>"必须填写项目位置。",nst=()=>"محل پروژه الزامی است.",rst=()=>"موقع المشروع مطلوب.",sst=()=>"La ubicación del proyecto es obligatoria.",ist=()=>"प्रोजेक्ट स्थान ज़रूरी है।",FN=((e={},n={})=>{const t=n.locale??z();return t==="zh-CN"?tst():t==="fa"?nst():t==="ar"?rst():t==="es"?sst():t==="hi"?ist():est()}),ast=()=>"Choose a different destination. The paper repository needs a new or empty folder.",ost=()=>"请选择其他位置。论文仓库需要一个新的或空的文件夹。",lst=()=>"مقصد دیگری انتخاب کنید. مخزن مقاله به پوشه‌ای جدید یا خالی نیاز دارد.",cst=()=>"اختر وجهة مختلفة. يحتاج مستودع الورقة إلى مجلد جديد أو فارغ.",ust=()=>"Elige otro destino. El repositorio del paper necesita una carpeta nueva o vacía.",_st=()=>"अलग गंतव्य चुनें। पेपर रिपॉज़िटरी को एक नए या खाली फ़ोल्डर की ज़रूरत है।",HN=((e={},n={})=>{const t=n.locale??z();return t==="zh-CN"?ost():t==="fa"?lst():t==="ar"?cst():t==="es"?ust():t==="hi"?_st():ast()}),fst=()=>"A linked public code repository is cloned without credentials.",dst=()=>"关联的公开代码仓库无需凭据即可克隆。",hst=()=>"مخزن عمومی کدِ پیوندشده بدون نیاز به اعتبارنامه کلون می‌شود.",pst=()=>"يُستنسخ مستودع شيفرة عام مرتبط دون بيانات اعتماد.",mst=()=>"El repositorio de código público vinculado se clona sin credenciales.",gst=()=>"एक लिंक की गई सार्वजनिक कोड रिपॉज़िटरी बिना क्रेडेंशियल के क्लोन की जाती है।",vst=((e={},n={})=>{const t=n.locale??z();return t==="zh-CN"?dst():t==="fa"?hst():t==="ar"?pst():t==="es"?mst():t==="hi"?gst():fst()}),bst=e=>`Run ${e==null?void 0:e.command} before creating the project.`,yst=e=>`创建项目前请运行 ${e==null?void 0:e.command}。`,xst=e=>`پیش از ساخت پروژه، ${e==null?void 0:e.command} را اجرا کنید.`,wst=e=>`نفّذ ${e==null?void 0:e.command} قبل إنشاء المشروع.`,kst=e=>`Ejecuta ${e==null?void 0:e.command} antes de crear el proyecto.`,Sst=e=>`प्रोजेक्ट बनाने से पहले ${e==null?void 0:e.command} चलाएं।`,Cst=((e,n={})=>{const t=n.locale??z();return t==="zh-CN"?yst(e):t==="fa"?xst(e):t==="ar"?wst(e):t==="es"?kst(e):t==="hi"?Sst(e):bst(e)}),Est=()=>"Searching alphaXiv…",Nst=()=>"正在搜索 alphaXiv…",zst=()=>"در حال جست‌وجوی alphaXiv…",jst=()=>"جارٍ البحث في alphaXiv…",Tst=()=>"Buscando en alphaXiv…",Ast=()=>"alphaXiv खोजा जा रहा है…",Rst=((e={},n={})=>{const t=n.locale??z();return t==="zh-CN"?Nst():t==="fa"?zst():t==="ar"?jst():t==="es"?Tst():t==="hi"?Ast():Est()}),Mst=()=>"Use folder",Ost=()=>"使用文件夹",Dst=()=>"استفاده از پوشه",Lst=()=>"استخدام المجلد",Ist=()=>"Usar carpeta",$st=()=>"फ़ोल्डर इस्तेमाल करें",Bst=((e={},n={})=>{const t=n.locale??z();return t==="zh-CN"?Ost():t==="fa"?Dst():t==="ar"?Lst():t==="es"?Ist():t==="hi"?$st():Mst()}),Pst=()=>"Can’t reach OpenResearch. This page is no longer live.",Fst=()=>"无法连接 OpenResearch。此页面已不再实时同步。",Hst=()=>"دسترسی به OpenResearch ممکن نیست. این صفحه دیگر همگام نیست.",qst=()=>"تعذّر الاتصال بـ OpenResearch. لم تعد هذه الصفحة تُحدَّث تلقائيًا.",Ust=()=>"No se puede conectar con OpenResearch. Esta página ya no se actualiza.",Gst=()=>"OpenResearch तक नहीं पहुँच सके। यह पेज अब लाइव नहीं है।",J4=((e={},n={})=>{const t=n.locale??z();return t==="zh-CN"?Fst():t==="fa"?Hst():t==="ar"?qst():t==="es"?Ust():t==="hi"?Gst():Pst()}),Vst=()=>"A workspace for your research agents",Kst=()=>"面向研究智能体的工作空间",Wst=()=>"فضای کاری برای عامل‌های پژوهشی شما",Qst=()=>"مساحة عمل لوكلاء بحثك",Xst=()=>"Un espacio de trabajo para tus agentes de investigación",Yst=()=>"आपके शोध एजेंटों के लिए एक वर्कस्पेस",Zst=((e={},n={})=>{const t=n.locale??z();return t==="zh-CN"?Kst():t==="fa"?Wst():t==="ar"?Qst():t==="es"?Xst():t==="hi"?Yst():Vst()}),Jst=()=>"Add papers that represent your research interests, including papers by other authors.",eit=()=>"添加能够代表你研究兴趣的论文,也可以包括其他作者的论文。",tit=()=>"مقاله‌هایی را که نمایندهٔ علایق پژوهشی شما هستند، از جمله آثار نویسندگان دیگر، اضافه کنید.",nit=()=>"أضِف أوراقًا تمثّل اهتماماتك البحثية، بما في ذلك أوراق لمؤلفين آخرين.",rit=()=>"Añade papers que representen tus intereses de investigación, incluidos papers de otros autores.",sit=()=>"ऐसे पेपर जोड़ें जो आपकी शोध रुचियों को दर्शाते हों, चाहे वे किसी और लेखक के ही क्यों न हों।",iit=((e={},n={})=>{const t=n.locale??z();return t==="zh-CN"?eit():t==="fa"?tit():t==="ar"?nit():t==="es"?rit():t==="hi"?sit():Jst()}),ait=()=>"API key",oit=()=>"API 密钥",lit=()=>"کلید API",cit=()=>"مفتاح API",uit=()=>"Clave de API",_it=()=>"API की",Dk=((e={},n={})=>{const t=n.locale??z();return t==="zh-CN"?oit():t==="fa"?lit():t==="ar"?cit():t==="es"?uit():t==="hi"?_it():ait()}),fit=()=>"AI/ML",dit=()=>"人工智能与机器学习",hit=()=>"هوش مصنوعی و یادگیری ماشین",pit=()=>"الذكاء الاصطناعي/تعلّم الآلة",mit=()=>"IA/ML",git=()=>"AI/ML",vit=((e={},n={})=>{const t=n.locale??z();return t==="zh-CN"?dit():t==="fa"?hit():t==="ar"?pit():t==="es"?mit():t==="hi"?git():fit()}),bit=()=>"Biology",yit=()=>"生物学",xit=()=>"زیست‌شناسی",wit=()=>"الأحياء",kit=()=>"Biología",Sit=()=>"जीव विज्ञान",Cit=((e={},n={})=>{const t=n.locale??z();return t==="zh-CN"?yit():t==="fa"?xit():t==="ar"?wit():t==="es"?kit():t==="hi"?Sit():bit()}),Eit=()=>"Other",Nit=()=>"其他",zit=()=>"سایر",jit=()=>"أخرى",Tit=()=>"Otra",Ait=()=>"अन्य",Rit=((e={},n={})=>{const t=n.locale??z();return t==="zh-CN"?Nit():t==="fa"?zit():t==="ar"?jit():t==="es"?Tit():t==="hi"?Ait():Eit()}),Mit=()=>"Physics",Oit=()=>"物理学",Dit=()=>"فیزیک",Lit=()=>"الفيزياء",Iit=()=>"Física",$it=()=>"भौतिकी",Bit=((e={},n={})=>{const t=n.locale??z();return t==="zh-CN"?Oit():t==="fa"?Dit():t==="ar"?Lit():t==="es"?Iit():t==="hi"?$it():Mit()}),Pit=()=>"Back",Fit=()=>"返回",Hit=()=>"بازگشت",qit=()=>"رجوع",Uit=()=>"Atrás",Git=()=>"वापस",qN=((e={},n={})=>{const t=n.locale??z();return t==="zh-CN"?Fit():t==="fa"?Hit():t==="ar"?qit():t==="es"?Uit():t==="hi"?Git():Pit()}),Vit=()=>"Check failed",Kit=()=>"检查失败",Wit=()=>"بررسی ناموفق بود",Qit=()=>"فشل الفحص",Xit=()=>"Error en la comprobación",Yit=()=>"जाँच विफल",Zit=((e={},n={})=>{const t=n.locale??z();return t==="zh-CN"?Kit():t==="fa"?Wit():t==="ar"?Qit():t==="es"?Xit():t==="hi"?Yit():Vit()}),Jit=()=>"Checking",eat=()=>"正在检查",tat=()=>"در حال بررسی",nat=()=>"جارٍ الفحص",rat=()=>"Comprobando",sat=()=>"जाँचा जा रहा है",iat=((e={},n={})=>{const t=n.locale??z();return t==="zh-CN"?eat():t==="fa"?tat():t==="ar"?nat():t==="es"?rat():t==="hi"?sat():Jit()}),aat=()=>"Checking Git…",oat=()=>"正在检查 Git…",lat=()=>"در حال بررسی Git…",cat=()=>"جارٍ فحص Git…",uat=()=>"Comprobando Git…",_at=()=>"Git जाँचा जा रहा है…",fat=((e={},n={})=>{const t=n.locale??z();return t==="zh-CN"?oat():t==="fa"?lat():t==="ar"?cat():t==="es"?uat():t==="hi"?_at():aat()}),dat=()=>"Choose a coding agent",hat=()=>"选择编程智能体",pat=()=>"یک عامل کدنویسی انتخاب کنید",mat=()=>"اختر وكيل برمجة",gat=()=>"Elige un agente de programación",vat=()=>"एक कोडिंग एजेंट चुनें",bat=((e={},n={})=>{const t=n.locale??z();return t==="zh-CN"?hat():t==="fa"?pat():t==="ar"?mat():t==="es"?gat():t==="hi"?vat():dat()}),yat=()=>"Choose a coding agent to continue.",xat=()=>"选择一个编程智能体以继续。",wat=()=>"برای ادامه یک عامل کدنویسی انتخاب کنید.",kat=()=>"اختر وكيل برمجة للمتابعة.",Sat=()=>"Elige un agente de programación para continuar.",Cat=()=>"जारी रखने के लिए एक कोडिंग एजेंट चुनें।",Eat=((e={},n={})=>{const t=n.locale??z();return t==="zh-CN"?xat():t==="fa"?wat():t==="ar"?kat():t==="es"?Sat():t==="hi"?Cat():yat()}),Nat=()=>"Choose another coding agent",zat=()=>"选择其他编程智能体",jat=()=>"انتخاب یک عامل برنامه‌نویسی دیگر",Tat=()=>"اختيار وكيل برمجة آخر",Aat=()=>"Elegir otro agente de programación",Rat=()=>"दूसरा कोडिंग एजेंट चुनें",Mat=((e={},n={})=>{const t=n.locale??z();return t==="zh-CN"?zat():t==="fa"?jat():t==="ar"?Tat():t==="es"?Aat():t==="hi"?Rat():Nat()}),Oat=()=>"Choose at least one research area to continue.",Dat=()=>"请至少选择一个研究领域后再继续。",Lat=()=>"برای ادامه دست‌کم یک حوزهٔ پژوهشی انتخاب کنید.",Iat=()=>"اختر مجالًا بحثيًا واحدًا على الأقل للمتابعة.",$at=()=>"Elige al menos un área de investigación para continuar.",Bat=()=>"जारी रखने के लिए कम से कम एक शोध क्षेत्र चुनें।",Pat=((e={},n={})=>{const t=n.locale??z();return t==="zh-CN"?Dat():t==="fa"?Lat():t==="ar"?Iat():t==="es"?$at():t==="hi"?Bat():Oat()}),Fat=()=>"Choose one or more.",Hat=()=>"请选择一项或多项。",qat=()=>"یک یا چند مورد را انتخاب کنید.",Uat=()=>"اختر واحدًا أو أكثر.",Gat=()=>"Elige una o varias.",Vat=()=>"एक या अधिक चुनें।",Kat=((e={},n={})=>{const t=n.locale??z();return t==="zh-CN"?Hat():t==="fa"?qat():t==="ar"?Uat():t==="es"?Gat():t==="hi"?Vat():Fat()}),Wat=()=>"Choose your preferred coding agent",Qat=()=>"请选择首选编程智能体",Xat=()=>"عامل برنامه‌نویسی ترجیحی خود را انتخاب کنید",Yat=()=>"اختر وكيل البرمجة المفضّل لديك",Zat=()=>"Elige tu agente de programación preferido",Jat=()=>"अपना पसंदीदा कोडिंग एजेंट चुनें",eot=((e={},n={})=>{const t=n.locale??z();return t==="zh-CN"?Qat():t==="fa"?Xat():t==="ar"?Yat():t==="es"?Zat():t==="hi"?Jat():Wat()}),tot=()=>"Consolidate your research",not=()=>"集中管理研究",rot=()=>"پژوهش خود را یکپارچه کنید",sot=()=>"وحّد أبحاثك",iot=()=>"Consolida tu investigación",aot=()=>"अपने शोध को एक जगह लाएं",oot=((e={},n={})=>{const t=n.locale??z();return t==="zh-CN"?not():t==="fa"?rot():t==="ar"?sot():t==="es"?iot():t==="hi"?aot():tot()}),lot=()=>"Continue",cot=()=>"继续",uot=()=>"ادامه",_ot=()=>"متابعة",fot=()=>"Continuar",dot=()=>"जारी रखें",UN=((e={},n={})=>{const t=n.locale??z();return t==="zh-CN"?cot():t==="fa"?uot():t==="ar"?_ot():t==="es"?fot():t==="hi"?dot():lot()}),hot=()=>"Describe your research area to continue.",pot=()=>"请描述你的研究领域后再继续。",mot=()=>"برای ادامه حوزهٔ پژوهشی خود را شرح دهید.",got=()=>"صِف مجالك البحثي للمتابعة.",vot=()=>"Describe tu área de investigación para continuar.",bot=()=>"जारी रखने के लिए अपना शोध क्षेत्र बताएं।",yot=((e={},n={})=>{const t=n.locale??z();return t==="zh-CN"?pot():t==="fa"?mot():t==="ar"?got():t==="es"?vot():t==="hi"?bot():hot()}),xot=()=>"Detecting Claude Code, Codex, OpenCode, Cursor, Antigravity…",wot=()=>"正在检测 Claude Code、Codex、OpenCode、Cursor、Antigravity…",kot=()=>"در حال شناسایی Claude Code، Codex، OpenCode و Cursor و Antigravity…",Sot=()=>"جارٍ اكتشاف Claude Code وCodex وOpenCode وCursor وAntigravity…",Cot=()=>"Detectando Claude Code, Codex, OpenCode, Cursor, Google Antigravity…",Eot=()=>"Claude Code, Codex, OpenCode, Cursor, Google Antigravity पहचाने जा रहे हैं…",Not=((e={},n={})=>{const t=n.locale??z();return t==="zh-CN"?wot():t==="fa"?kot():t==="ar"?Sot():t==="es"?Cot():t==="hi"?Eot():xot()}),zot=()=>"e.g. I work on sample-efficient RL for LLM post-training, focused on reward-model-free methods.",jot=()=>"例如:我研究用于 LLM 后训练的样本高效强化学习,重点关注无需奖励模型的方法。",Tot=()=>"مثلاً روی یادگیری تقویتی کم‌نمونه برای پس‌آموزش LLM با تمرکز بر روش‌های بدون مدل پاداش کار می‌کنم.",Aot=()=>"مثال: أعمل على تعلّم معزّز عالي الكفاءة في العيّنات لِما بعد تدريب نماذج اللغة الكبيرة، مع التركيز على الطرق التي لا تعتمد على نماذج المكافأة.",Rot=()=>"p. ej., trabajo en RL eficiente en muestras para el post-entrenamiento de LLM, centrado en métodos sin modelo de recompensa.",Mot=()=>"जैसे: मैं LLM पोस्ट-ट्रेनिंग के लिए सैंपल-एफ़िशिएंट RL पर काम करता/करती हूँ, रिवॉर्ड-मॉडल-फ्री तरीकों पर ध्यान केंद्रित करते हुए।",Oot=((e={},n={})=>{const t=n.locale??z();return t==="zh-CN"?jot():t==="fa"?Tot():t==="ar"?Aot():t==="es"?Rot():t==="hi"?Mot():zot()}),Dot=()=>"Error details",Lot=()=>"错误详情",Iot=()=>"جزئیات خطا",$ot=()=>"تفاصيل الخطأ",Bot=()=>"Detalles del error",Pot=()=>"त्रुटि विवरण",Fot=((e={},n={})=>{const t=n.locale??z();return t==="zh-CN"?Lot():t==="fa"?Iot():t==="ar"?$ot():t==="es"?Bot():t==="hi"?Pot():Dot()}),Hot=()=>"Everything stays local",qot=()=>"一切都保留在本地",Uot=()=>"همه‌چیز محلی می‌ماند",Got=()=>"كل شيء يبقى محليًا",Vot=()=>"Todo se queda en local",Kot=()=>"सब कुछ लोकल ही रहता है",Wot=((e={},n={})=>{const t=n.locale??z();return t==="zh-CN"?qot():t==="fa"?Uot():t==="ar"?Got():t==="es"?Vot():t==="hi"?Kot():Hot()}),Qot=()=>"Get started",Xot=()=>"开始使用",Yot=()=>"شروع",Zot=()=>"ابدأ الآن",Jot=()=>"Empezar",elt=()=>"शुरू करें",tlt=((e={},n={})=>{const t=n.locale??z();return t==="zh-CN"?Xot():t==="fa"?Yot():t==="ar"?Zot():t==="es"?Jot():t==="hi"?elt():Qot()}),nlt=()=>"Git is required for local experiments. Install Git, then re-check.",rlt=()=>"本地实验需要 Git。请安装 Git,然后重新检查。",slt=()=>"Git برای آزمایش‌های محلی لازم است. آن را نصب و دوباره بررسی کنید.",ilt=()=>"‏Git مطلوب للتجارب المحلية. ثبّت Git ثم أعد الفحص.",alt=()=>"Git es necesario para los experimentos locales. Instala Git y vuelve a comprobarlo.",olt=()=>"स्थानीय प्रयोगों के लिए Git ज़रूरी है। Git इंस्टॉल करें, फिर फिर से जाँचें।",GN=((e={},n={})=>{const t=n.locale??z();return t==="zh-CN"?rlt():t==="fa"?slt():t==="ar"?ilt():t==="es"?alt():t==="hi"?olt():nlt()}),llt=()=>"Ground your agents",clt=()=>"为智能体提供可靠依据",ult=()=>"عامل‌هایتان را به منابع متصل کنید",_lt=()=>"زوّد وكلاءك بأساس بحثي",flt=()=>"Dale contexto a tus agentes",dlt=()=>"अपने एजेंटों को आधार दें",hlt=((e={},n={})=>{const t=n.locale??z();return t==="zh-CN"?clt():t==="fa"?ult():t==="ar"?_lt():t==="es"?flt():t==="hi"?dlt():llt()}),plt=()=>"Install broken",mlt=()=>"安装损坏",glt=()=>"نصب خراب است",vlt=()=>"التثبيت معطوب",blt=()=>"Instalación dañada",ylt=()=>"इंस्टॉल खराब है",xlt=((e={},n={})=>{const t=n.locale??z();return t==="zh-CN"?mlt():t==="fa"?glt():t==="ar"?vlt():t==="es"?blt():t==="hi"?ylt():plt()}),wlt=()=>"Install Git to continue",klt=()=>"请安装 Git 后再继续",Slt=()=>"برای ادامه Git را نصب کنید",Clt=()=>"ثبّت Git للمتابعة",Elt=()=>"Instala Git para continuar",Nlt=()=>"जारी रखने के लिए Git इंस्टॉल करें",zlt=((e={},n={})=>{const t=n.locale??z();return t==="zh-CN"?klt():t==="fa"?Slt():t==="ar"?Clt():t==="es"?Elt():t==="hi"?Nlt():wlt()}),jlt=()=>"Loading account details…",Tlt=()=>"正在加载账户信息…",Alt=()=>"در حال بارگذاری اطلاعات حساب…",Rlt=()=>"جارٍ تحميل تفاصيل الحساب…",Mlt=()=>"Cargando los datos de la cuenta…",Olt=()=>"खाता विवरण लोड हो रहा है…",Dlt=((e={},n={})=>{const t=n.locale??z();return t==="zh-CN"?Tlt():t==="fa"?Alt():t==="ar"?Rlt():t==="es"?Mlt():t==="hi"?Olt():jlt()}),Llt=()=>"Local Git",Ilt=()=>"本地 Git",$lt=()=>"Git محلی",Blt=()=>"Git محلي",Plt=()=>"Git local",Flt=()=>"लोकल Git",Hlt=((e={},n={})=>{const t=n.locale??z();return t==="zh-CN"?Ilt():t==="fa"?$lt():t==="ar"?Blt():t==="es"?Plt():t==="hi"?Flt():Llt()}),qlt=()=>"Install needed",Ult=()=>"需要安装",Glt=()=>"نیاز به نصب",Vlt=()=>"التثبيت مطلوب",Klt=()=>"No detectado",Wlt=()=>"इंस्टॉल ज़रूरी है",VN=((e={},n={})=>{const t=n.locale??z();return t==="zh-CN"?Ult():t==="fa"?Glt():t==="ar"?Vlt():t==="es"?Klt():t==="hi"?Wlt():qlt()}),Qlt=()=>"Not found",Xlt=()=>"未找到",Ylt=()=>"پیدا نشد",Zlt=()=>"غير موجود",Jlt=()=>"No encontrado",ect=()=>"नहीं मिला",jD=((e={},n={})=>{const t=n.locale??z();return t==="zh-CN"?Xlt():t==="fa"?Ylt():t==="ar"?Zlt():t==="es"?Jlt():t==="hi"?ect():Qlt()}),tct=()=>"Signed out",nct=()=>"未登录",rct=()=>"وارد نشده",sct=()=>"غير مسجل الدخول",ict=()=>"Sin iniciar sesión",act=()=>"साइन आउट",TD=((e={},n={})=>{const t=n.locale??z();return t==="zh-CN"?nct():t==="fa"?rct():t==="ar"?sct():t==="es"?ict():t==="hi"?act():tct()}),oct=()=>"OpenResearch uses a coding agent already installed on this machine.",lct=()=>"OpenResearch 使用这台计算机上已安装的编程智能体。",cct=()=>"OpenResearch از عامل کدنویسی نصب‌شده روی این دستگاه استفاده می‌کند.",uct=()=>"يستخدم OpenResearch وكيل برمجة مثبّتًا مسبقًا على هذا الجهاز.",_ct=()=>"OpenResearch usa un agente de programación que ya esté instalado en este equipo.",fct=()=>"OpenResearch इस मशीन पर पहले से इंस्टॉल किसी कोडिंग एजेंट का उपयोग करता है।",dct=((e={},n={})=>{const t=n.locale??z();return t==="zh-CN"?lct():t==="fa"?cct():t==="ar"?uct():t==="es"?_ct():t==="hi"?fct():oct()}),hct=()=>"Couldn’t verify OpenCode is ready. Retry to check its installation and models.",pct=()=>"无法确认 OpenCode 已就绪。请重试以检查安装和模型。",mct=()=>"آماده بودن OpenCode تأیید نشد. برای بررسی نصب و مدل‌ها دوباره تلاش کنید.",gct=()=>"تعذّر التحقق من جاهزية OpenCode. أعد المحاولة للتحقق من التثبيت والنماذج.",vct=()=>"No se pudo verificar que OpenCode esté listo. Vuelve a intentarlo para comprobar su instalación y sus modelos.",bct=()=>"यह सत्यापित नहीं हो सका कि OpenCode तैयार है। इसके इंस्टॉलेशन और मॉडल जाँचने के लिए फिर से कोशिश करें।",yct=((e={},n={})=>{const t=n.locale??z();return t==="zh-CN"?pct():t==="fa"?mct():t==="ar"?gct():t==="es"?vct():t==="hi"?bct():hct()}),xct=()=>"Other research area",wct=()=>"其他研究领域",kct=()=>"حوزهٔ پژوهشی دیگر",Sct=()=>"مجال بحثي آخر",Cct=()=>"Otra área de investigación",Ect=()=>"अन्य शोध क्षेत्र",Nct=((e={},n={})=>{const t=n.locale??z();return t==="zh-CN"?wct():t==="fa"?kct():t==="ar"?Sct():t==="es"?Cct():t==="hi"?Ect():xct()}),zct=()=>"Re-check",jct=()=>"重新检查",Tct=()=>"بررسی دوباره",Act=()=>"إعادة الفحص",Rct=()=>"Volver a comprobar",Mct=()=>"फिर से जाँचें",gv=((e={},n={})=>{const t=n.locale??z();return t==="zh-CN"?jct():t==="fa"?Tct():t==="ar"?Act():t==="es"?Rct():t==="hi"?Mct():zct()}),Oct=()=>"Ready",Dct=()=>"已就绪",Lct=()=>"آماده",Ict=()=>"جاهز",$ct=()=>"Listo",Bct=()=>"तैयार",Lk=((e={},n={})=>{const t=n.locale??z();return t==="zh-CN"?Dct():t==="fa"?Lct():t==="ar"?Ict():t==="es"?$ct():t==="hi"?Bct():Oct()}),Pct=()=>"Re-check Git before continuing",Fct=()=>"请重新检查 Git 后再继续",Hct=()=>"پیش از ادامه Git را دوباره بررسی کنید",qct=()=>"أعد فحص Git قبل المتابعة",Uct=()=>"Vuelve a comprobar Git antes de continuar",Gct=()=>"जारी रखने से पहले Git फिर से जाँचें",Vct=((e={},n={})=>{const t=n.locale??z();return t==="zh-CN"?Fct():t==="fa"?Hct():t==="ar"?qct():t==="es"?Uct():t==="hi"?Gct():Pct()}),Kct=()=>"Representative papers",Wct=()=>"代表性论文",Qct=()=>"مقاله‌های شاخص",Xct=()=>"أوراق تمثّل اهتماماتك البحثية",Yct=()=>"Papers representativos",Zct=()=>"प्रतिनिधि पेपर",Jct=((e={},n={})=>{const t=n.locale??z();return t==="zh-CN"?Wct():t==="fa"?Qct():t==="ar"?Xct():t==="es"?Yct():t==="hi"?Zct():Kct()}),eut=()=>"Research background",tut=()=>"研究背景",nut=()=>"پیشینهٔ پژوهشی",rut=()=>"الخلفية البحثية",sut=()=>"Trayectoria de investigación",iut=()=>"शोध पृष्ठभूमि",aut=((e={},n={})=>{const t=n.locale??z();return t==="zh-CN"?tut():t==="fa"?nut():t==="ar"?rut():t==="es"?sut():t==="hi"?iut():eut()}),out=()=>"Couldn’t reach orx. Check that it’s still running, then re-check.",lut=()=>"无法连接到 orx。请确认它仍在运行,然后重新检查。",cut=()=>"ارتباط با orx برقرار نشد. مطمئن شوید هنوز در حال اجراست و دوباره بررسی کنید.",uut=()=>"تعذّر الوصول إلى orx. تأكد من أنه لا يزال يعمل، ثم أعد الفحص.",_ut=()=>"No se pudo conectar con orx. Comprueba que sigue en ejecución y vuelve a comprobarlo.",fut=()=>"orx तक नहीं पहुँच सके। जाँचें कि यह अभी भी चल रहा है, फिर फिर से जाँचें।",V2=((e={},n={})=>{const t=n.locale??z();return t==="zh-CN"?lut():t==="fa"?cut():t==="ar"?uut():t==="es"?_ut():t==="hi"?fut():out()}),dut=()=>"Search alphaXiv by title to link a paper…",hut=()=>"按标题搜索 alphaXiv 以关联论文…",put=()=>"برای پیوند مقاله، عنوان را در alphaXiv جست‌وجو کنید…",mut=()=>"ابحث في alphaXiv بالعنوان لربط ورقة…",gut=()=>"Busca en alphaXiv por título para vincular un paper…",vut=()=>"एक पेपर लिंक करने के लिए शीर्षक से alphaXiv खोजें…",but=((e={},n={})=>{const t=n.locale??z();return t==="zh-CN"?hut():t==="fa"?put():t==="ar"?mut():t==="es"?gut():t==="hi"?vut():dut()}),yut=()=>"Searching alphaXiv…",xut=()=>"正在搜索 alphaXiv…",wut=()=>"در حال جست‌وجوی alphaXiv…",kut=()=>"جارٍ البحث في alphaXiv…",Sut=()=>"Buscando en alphaXiv…",Cut=()=>"alphaXiv खोजा जा रहा है…",Eut=((e={},n={})=>{const t=n.locale??z();return t==="zh-CN"?xut():t==="fa"?wut():t==="ar"?kut():t==="es"?Sut():t==="hi"?Cut():yut()}),Nut=()=>"Selected",zut=()=>"已选择",jut=()=>"انتخاب‌شده",Tut=()=>"محدد",Aut=()=>"Seleccionado",Rut=()=>"चयनित",Mut=((e={},n={})=>{const t=n.locale??z();return t==="zh-CN"?zut():t==="fa"?jut():t==="ar"?Tut():t==="es"?Aut():t==="hi"?Rut():Nut()}),Out=()=>"Local model unavailable",Dut=()=>"本地模型不可用",Lut=()=>"مدل محلی در دسترس نیست",Iut=()=>"النموذج المحلي غير متاح",$ut=()=>"Modelo local no disponible",But=()=>"लोकल मॉडल उपलब्ध नहीं",AD=((e={},n={})=>{const t=n.locale??z();return t==="zh-CN"?Dut():t==="fa"?Lut():t==="ar"?Iut():t==="es"?$ut():t==="hi"?But():Out()}),Put=()=>"Setting things up…",Fut=()=>"正在设置…",Hut=()=>"در حال راه‌اندازی…",qut=()=>"جارٍ التهيئة…",Uut=()=>"Preparando todo…",Gut=()=>"सेट अप किया जा रहा है…",Vut=((e={},n={})=>{const t=n.locale??z();return t==="zh-CN"?Fut():t==="fa"?Hut():t==="ar"?qut():t==="es"?Uut():t==="hi"?Gut():Put()}),Kut=()=>"Connect a local model or sign in to a coding agent to continue",Wut=()=>"连接本地模型或登录编码智能体以继续",Qut=()=>"برای ادامه، یک مدل محلی متصل کنید یا به یک عامل کدنویسی وارد شوید",Xut=()=>"اربط نموذجًا محليًا أو سجّل الدخول إلى وكيل برمجة للمتابعة",Yut=()=>"Conecta un modelo local o inicia sesión en un agente de programación para continuar",Zut=()=>"जारी रखने के लिए एक लोकल मॉडल कनेक्ट करें या किसी कोडिंग एजेंट में साइन इन करें",Jut=((e={},n={})=>{const t=n.locale??z();return t==="zh-CN"?Wut():t==="fa"?Qut():t==="ar"?Xut():t==="es"?Yut():t==="hi"?Zut():Kut()}),e_t=()=>"Connect a local model or sign in to an agent to continue.",t_t=()=>"连接本地模型或登录一个智能体以继续。",n_t=()=>"برای ادامه، یک مدل محلی متصل کنید یا به یک عامل وارد شوید.",r_t=()=>"اربط نموذجًا محليًا أو سجّل الدخول إلى وكيل للمتابعة.",s_t=()=>"Conecta un modelo local o inicia sesión en un agente para continuar.",i_t=()=>"जारी रखने के लिए एक लोकल मॉडल कनेक्ट करें या किसी एजेंट में साइन इन करें।",a_t=((e={},n={})=>{const t=n.locale??z();return t==="zh-CN"?t_t():t==="fa"?n_t():t==="ar"?r_t():t==="es"?s_t():t==="hi"?i_t():e_t()}),o_t=()=>"Signed in",l_t=()=>"已登录",c_t=()=>"وارد شده",u_t=()=>"تم تسجيل الدخول",__t=()=>"Sesión iniciada",f_t=()=>"साइन इन",d_t=((e={},n={})=>{const t=n.locale??z();return t==="zh-CN"?l_t():t==="fa"?c_t():t==="ar"?u_t():t==="es"?__t():t==="hi"?f_t():o_t()}),h_t=()=>"Connected to alphaXiv, bioRxiv, and OpenAlex to ground your agents in the latest research.",p_t=()=>"已连接 alphaXiv、bioRxiv 和 OpenAlex,让智能体以最新研究为依据。",m_t=()=>"به alphaXiv، bioRxiv و OpenAlex متصل است تا عامل‌هایتان بر تازه‌ترین پژوهش‌ها تکیه کنند.",g_t=()=>"متصل بـ alphaXiv وbioRxiv وOpenAlex ليستند وكلاؤك إلى أحدث الأبحاث.",v_t=()=>"Conectado a alphaXiv, bioRxiv y OpenAlex para que tus agentes trabajen con la investigación más reciente.",b_t=()=>"आपके एजेंटों को नवीनतम शोध पर आधारित रखने के लिए alphaXiv, bioRxiv और OpenAlex से कनेक्ट किया गया।",y_t=((e={},n={})=>{const t=n.locale??z();return t==="zh-CN"?p_t():t==="fa"?m_t():t==="ar"?g_t():t==="es"?v_t():t==="hi"?b_t():h_t()}),x_t=()=>"· Step 1 of 2",w_t=()=>"· 第 1 步,共 2 步",k_t=()=>"· مرحلهٔ ۱ از ۲",S_t=()=>"· الخطوة 1 من 2",C_t=()=>"· Paso 1 de 2",E_t=()=>"· चरण 1 / 2",N_t=((e={},n={})=>{const t=n.locale??z();return t==="zh-CN"?w_t():t==="fa"?k_t():t==="ar"?S_t():t==="es"?C_t():t==="hi"?E_t():x_t()}),z_t=()=>"· Step 2 of 2",j_t=()=>"· 第 2 步,共 2 步",T_t=()=>"· مرحلهٔ ۲ از ۲",A_t=()=>"· الخطوة 2 من 2",R_t=()=>"· Paso 2 de 2",M_t=()=>"· चरण 2 / 2",O_t=((e={},n={})=>{const t=n.locale??z();return t==="zh-CN"?j_t():t==="fa"?T_t():t==="ar"?A_t():t==="es"?R_t():t==="hi"?M_t():z_t()}),D_t=()=>"Tell us about your research",L_t=()=>"介绍一下你的研究",I_t=()=>"از پژوهش خود بگویید",$_t=()=>"أخبرنا عن بحثك",B_t=()=>"Cuéntanos sobre tu investigación",P_t=()=>"हमें अपने शोध के बारे में बताएं",F_t=((e={},n={})=>{const t=n.locale??z();return t==="zh-CN"?L_t():t==="fa"?I_t():t==="ar"?$_t():t==="es"?B_t():t==="hi"?P_t():D_t()}),H_t=()=>"Tell us your other research area",q_t=()=>"告诉我们你的其他研究领域",U_t=()=>"حوزهٔ پژوهشی دیگر خود را بنویسید",G_t=()=>"أخبرنا عن مجالك البحثي الآخر",V_t=()=>"Cuéntanos cuál es tu otra área de investigación",K_t=()=>"हमें अपना अन्य शोध क्षेत्र बताएं",W_t=((e={},n={})=>{const t=n.locale??z();return t==="zh-CN"?q_t():t==="fa"?U_t():t==="ar"?G_t():t==="es"?V_t():t==="hi"?K_t():H_t()}),Q_t=()=>"Track experiments, artifacts, compute, skills, and code all in one place.",X_t=()=>"在一处跟踪实验、产物、算力、技能和代码。",Y_t=()=>"آزمایش‌ها، خروجی‌ها، رایانش، مهارت‌ها و کد را یک‌جا دنبال کنید.",Z_t=()=>"تتبّع التجارب والمُخرَجات والحوسبة والمهارات والشيفرة في مكان واحد.",J_t=()=>"Gestiona experimentos, artefactos, cómputo, skills y código en un solo lugar.",eft=()=>"प्रयोग, आर्टिफ़ैक्ट, कंप्यूट, स्किल और कोड — सब एक ही जगह ट्रैक करें।",tft=((e={},n={})=>{const t=n.locale??z();return t==="zh-CN"?X_t():t==="fa"?Y_t():t==="ar"?Z_t():t==="es"?J_t():t==="hi"?eft():Q_t()}),nft=()=>"Unable to verify",rft=()=>"无法验证",sft=()=>"تأیید ممکن نیست",ift=()=>"تعذّر التحقق",aft=()=>"No se pudo verificar",oft=()=>"सत्यापित नहीं हो सका",lft=((e={},n={})=>{const t=n.locale??z();return t==="zh-CN"?rft():t==="fa"?sft():t==="ar"?ift():t==="es"?aft():t==="hi"?oft():nft()}),cft=()=>"Update required",uft=()=>"需要更新",_ft=()=>"نیازمند به‌روزرسانی",fft=()=>"مطلوب تحديث",dft=()=>"Actualización necesaria",hft=()=>"अपडेट ज़रूरी है",pft=((e={},n={})=>{const t=n.locale??z();return t==="zh-CN"?uft():t==="fa"?_ft():t==="ar"?fft():t==="es"?dft():t==="hi"?hft():cft()}),mft=()=>"Waiting for the Git check",gft=()=>"正在等待 Git 检查",vft=()=>"در انتظار بررسی Git",bft=()=>"في انتظار فحص Git",yft=()=>"Esperando la comprobación de Git",xft=()=>"Git जाँच का इंतज़ार है",wft=((e={},n={})=>{const t=n.locale??z();return t==="zh-CN"?gft():t==="fa"?vft():t==="ar"?bft():t==="es"?yft():t==="hi"?xft():mft()}),kft=()=>"Waiting for the local tool checks",Sft=()=>"正在等待本地工具检查",Cft=()=>"در انتظار بررسی ابزارهای محلی",Eft=()=>"في انتظار فحوص الأدوات المحلية",Nft=()=>"Esperando las comprobaciones de las herramientas locales",zft=()=>"लोकल टूल जाँच का इंतज़ार है",jft=((e={},n={})=>{const t=n.locale??z();return t==="zh-CN"?Sft():t==="fa"?Cft():t==="ar"?Eft():t==="es"?Nft():t==="hi"?zft():kft()}),Tft=()=>"What areas are you interested in?",Aft=()=>"你对哪些领域感兴趣?",Rft=()=>"به چه حوزه‌هایی علاقه دارید؟",Mft=()=>"ما المجالات التي تهتم بها؟",Oft=()=>"¿Qué áreas te interesan?",Dft=()=>"आपकी रुचि किन क्षेत्रों में है?",Lft=((e={},n={})=>{const t=n.locale??z();return t==="zh-CN"?Aft():t==="fa"?Rft():t==="ar"?Mft():t==="es"?Oft():t==="hi"?Dft():Tft()}),Ift=()=>"Your code, data, and experiment history stay on your machine.",$ft=()=>"你的代码、数据和实验历史都保留在自己的计算机上。",Bft=()=>"کد، داده‌ها و تاریخچهٔ آزمایش شما روی رایانهٔ خودتان می‌ماند.",Pft=()=>"تبقى شيفرتك وبياناتك وسجل تجاربك على جهازك.",Fft=()=>"Tu código, tus datos y tu historial de experimentos se quedan en tu equipo.",Hft=()=>"आपका कोड, डेटा और प्रयोग इतिहास आपकी मशीन पर ही रहता है।",qft=((e={},n={})=>{const t=n.locale??z();return t==="zh-CN"?$ft():t==="fa"?Bft():t==="ar"?Pft():t==="es"?Fft():t==="hi"?Hft():Ift()}),Uft=()=>"Your selected agent is no longer ready. Go back to Step 1 and choose another.",Gft=()=>"所选智能体已无法使用。请返回第 1 步并选择其他智能体。",Vft=()=>"عامل انتخاب‌شده دیگر آماده نیست. به مرحلهٔ ۱ برگردید و عامل دیگری را انتخاب کنید.",Kft=()=>"لم يعد الوكيل الذي اخترته جاهزًا. ارجع إلى الخطوة 1 واختر غيره.",Wft=()=>"El agente que elegiste ya no está listo. Vuelve al paso 1 y elige otro.",Qft=()=>"आपका चुना हुआ एजेंट अब तैयार नहीं है। चरण 1 पर वापस जाएं और दूसरा चुनें।",Xft=((e={},n={})=>{const t=n.locale??z();return t==="zh-CN"?Gft():t==="fa"?Vft():t==="ar"?Kft():t==="es"?Wft():t==="hi"?Qft():Uft()}),Yft=()=>"Add cookie",Zft=()=>"添加 cookie",Jft=()=>"افزودن کوکی",edt=()=>"إضافة ملف تعريف الارتباط",tdt=()=>"Añadir cookie",ndt=()=>"कुकी जोड़ें",rdt=((e={},n={})=>{const t=n.locale??z();return t==="zh-CN"?Zft():t==="fa"?Jft():t==="ar"?edt():t==="es"?tdt():t==="hi"?ndt():Yft()}),sdt=()=>"Changed here and on Overleaf — choose which copy to keep",idt=()=>"此处和 Overleaf 都有更改 — 请选择要保留的版本",adt=()=>"هم اینجا و هم در Overleaf تغییر کرده است — نسخه‌ای را که می‌خواهید نگه دارید انتخاب کنید",odt=()=>"تغيّر هنا وعلى Overleaf — اختر أي نسخة تحتفظ بها",ldt=()=>"Cambió aquí y en Overleaf — elige qué copia conservar",cdt=()=>"यहाँ और Overleaf दोनों जगह बदला गया — चुनें कि कौन सी कॉपी रखनी है",udt=((e={},n={})=>{const t=n.locale??z();return t==="zh-CN"?idt():t==="fa"?adt():t==="ar"?odt():t==="es"?ldt():t==="hi"?cdt():sdt()}),_dt=()=>"Create a token ↗",fdt=()=>"创建令牌 ↗",ddt=()=>"ساخت توکن ↗",hdt=()=>"إنشاء رمز ↗",pdt=()=>"Crear un token ↗",mdt=()=>"एक टोकन बनाएं ↗",gdt=((e={},n={})=>{const t=n.locale??z();return t==="zh-CN"?fdt():t==="fa"?ddt():t==="ar"?hdt():t==="es"?pdt():t==="hi"?mdt():_dt()}),vdt=()=>"Overleaf Git token",bdt=()=>"Overleaf Git 令牌",ydt=()=>"توکن Git در Overleaf",xdt=()=>"رمز Git لـ Overleaf",wdt=()=>"Token de Git de Overleaf",kdt=()=>"Overleaf Git टोकन",KN=((e={},n={})=>{const t=n.locale??z();return t==="zh-CN"?bdt():t==="fa"?ydt():t==="ar"?xdt():t==="es"?wdt():t==="hi"?kdt():vdt()}),Sdt=()=>"Follow Overleaf as people type by adding your Overleaf session cookie.",Cdt=()=>"添加 Overleaf 会话 cookie,即可在他人输入时实时跟随 Overleaf。",Edt=()=>"با افزودن کوکی نشست Overleaf، هنگام تایپ دیگران Overleaf را زنده دنبال کنید.",Ndt=()=>"تابِع Overleaf أثناء كتابة الآخرين بإضافة ملف تعريف ارتباط جلسة Overleaf.",zdt=()=>"Sigue los cambios de Overleaf mientras se escribe añadiendo tu cookie de sesión de Overleaf.",jdt=()=>"अपनी Overleaf सेशन कुकी जोड़कर लोगों के टाइप करते ही Overleaf को फ़ॉलो करें।",Tdt=((e={},n={})=>{const t=n.locale??z();return t==="zh-CN"?Cdt():t==="fa"?Edt():t==="ar"?Ndt():t==="es"?zdt():t==="hi"?jdt():Sdt()}),Adt=()=>"Import from browser",Rdt=()=>"从浏览器导入",Mdt=()=>"وارد کردن از مرورگر",Odt=()=>"الاستيراد من المتصفح",Ddt=()=>"Importar desde el navegador",Ldt=()=>"ब्राउज़र से इंपोर्ट करें",Idt=((e={},n={})=>{const t=n.locale??z();return t==="zh-CN"?Rdt():t==="fa"?Mdt():t==="ar"?Odt():t==="es"?Ddt():t==="hi"?Ldt():Adt()}),$dt=()=>"In step with Overleaf",Bdt=()=>"已与 Overleaf 同步",Pdt=()=>"با Overleaf همگام است",Fdt=()=>"متزامن مع Overleaf",Hdt=()=>"Sincronizado con Overleaf",qdt=()=>"Overleaf के साथ मेल में",RD=((e={},n={})=>{const t=n.locale??z();return t==="zh-CN"?Bdt():t==="fa"?Pdt():t==="ar"?Fdt():t==="es"?Hdt():t==="hi"?qdt():$dt()}),Udt=()=>"The last sync did not finish.",Gdt=()=>"上次同步未完成。",Vdt=()=>"آخرین همگام‌سازی کامل نشد.",Kdt=()=>"لم تكتمل آخر مزامنة.",Wdt=()=>"La última sincronización no terminó.",Qdt=()=>"पिछला सिंक पूरा नहीं हुआ।",Xdt=((e={},n={})=>{const t=n.locale??z();return t==="zh-CN"?Gdt():t==="fa"?Vdt():t==="ar"?Kdt():t==="es"?Wdt():t==="hi"?Qdt():Udt()}),Ydt=()=>"Link and sync",Zdt=()=>"关联并同步",Jdt=()=>"پیوند و همگام‌سازی",eht=()=>"الربط والمزامنة",tht=()=>"Vincular y sincronizar",nht=()=>"लिंक करें और सिंक करें",rht=((e={},n={})=>{const t=n.locale??z();return t==="zh-CN"?Zdt():t==="fa"?Jdt():t==="ar"?eht():t==="es"?tht():t==="hi"?nht():Ydt()}),sht=()=>"Connecting to Overleaf…",iht=()=>"正在连接 Overleaf…",aht=()=>"در حال اتصال به Overleaf…",oht=()=>"جارٍ الاتصال بـ Overleaf…",lht=()=>"Conectando con Overleaf…",cht=()=>"Overleaf से कनेक्ट हो रहा है…",uht=((e={},n={})=>{const t=n.locale??z();return t==="zh-CN"?iht():t==="fa"?aht():t==="ar"?oht():t==="es"?lht():t==="hi"?cht():sht()}),_ht=()=>"Edits are live on Overleaf",fht=()=>"编辑已在 Overleaf 实时同步",dht=()=>"ویرایش‌ها روی Overleaf زنده‌اند",hht=()=>"تظهر التعديلات فورًا على Overleaf",pht=()=>"Los cambios se sincronizan en directo con Overleaf",mht=()=>"बदलाव Overleaf पर लाइव हैं",ght=((e={},n={})=>{const t=n.locale??z();return t==="zh-CN"?fht():t==="fa"?dht():t==="ar"?hht():t==="es"?pht():t==="hi"?mht():_ht()}),vht=()=>"Retry",bht=()=>"重试",yht=()=>"تلاش دوباره",xht=()=>"إعادة المحاولة",wht=()=>"Reintentar",kht=()=>"फिर से कोशिश करें",Sht=((e={},n={})=>{const t=n.locale??z();return t==="zh-CN"?bht():t==="fa"?yht():t==="ar"?xht():t==="es"?wht():t==="hi"?kht():vht()}),Cht=()=>"Live sync stopped.",Eht=()=>"实时同步已停止。",Nht=()=>"همگام‌سازی زنده متوقف شد.",zht=()=>"توقفت المزامنة المباشرة.",jht=()=>"Sincronización en directo detenida.",Tht=()=>"लाइव सिंक रुक गया।",Aht=((e={},n={})=>{const t=n.locale??z();return t==="zh-CN"?Eht():t==="fa"?Nht():t==="ar"?zht():t==="es"?jht():t==="hi"?Tht():Cht()}),Rht=()=>"Live sync starts once the paper is in step with Overleaf.",Mht=()=>"论文与 Overleaf 同步后,实时同步即会开始。",Oht=()=>"همگام‌سازی زنده پس از هم‌گام شدن مقاله با Overleaf آغاز می‌شود.",Dht=()=>"تبدأ المزامنة المباشرة بمجرد أن تتزامن الورقة مع Overleaf.",Lht=()=>"La sincronización en directo empieza cuando el paper esté sincronizado con Overleaf.",Iht=()=>"पेपर Overleaf के साथ मेल में आते ही लाइव सिंक शुरू होगा।",$ht=((e={},n={})=>{const t=n.locale??z();return t==="zh-CN"?Mht():t==="fa"?Oht():t==="ar"?Dht():t==="es"?Lht():t==="hi"?Iht():Rht()}),Bht=()=>"My projects ↗",Pht=()=>"我的项目 ↗",Fht=()=>"پروژه‌های من ↗",Hht=()=>"مشاريعي ↗",qht=()=>"Mis proyectos ↗",Uht=()=>"मेरे प्रोजेक्ट ↗",WN=((e={},n={})=>{const t=n.locale??z();return t==="zh-CN"?Pht():t==="fa"?Fht():t==="ar"?Hht():t==="es"?qht():t==="hi"?Uht():Bht()}),Ght=()=>"Nothing could be synced.",Vht=()=>"没有内容可以同步。",Kht=()=>"هیچ موردی قابل همگام‌سازی نبود.",Wht=()=>"تعذّرت مزامنة أي شيء.",Qht=()=>"No se pudo sincronizar nada.",Xht=()=>"कुछ भी सिंक नहीं हो सका।",Yht=((e={},n={})=>{const t=n.locale??z();return t==="zh-CN"?Vht():t==="fa"?Kht():t==="ar"?Wht():t==="es"?Qht():t==="hi"?Xht():Ght()}),Zht=()=>"Open Overleaf ↗",Jht=()=>"打开 Overleaf ↗",ept=()=>"باز کردن Overleaf ↗",tpt=()=>"فتح Overleaf ↗",npt=()=>"Abrir Overleaf ↗",rpt=()=>"Overleaf खोलें ↗",spt=((e={},n={})=>{const t=n.locale??z();return t==="zh-CN"?Jht():t==="fa"?ept():t==="ar"?tpt():t==="es"?npt():t==="hi"?rpt():Zht()}),ipt=()=>"Cancel",apt=()=>"取消",opt=()=>"لغو",lpt=()=>"إلغاء",cpt=()=>"Cancelar",upt=()=>"रद्द करें",MD=((e={},n={})=>{const t=n.locale??z();return t==="zh-CN"?apt():t==="fa"?opt():t==="ar"?lpt():t==="es"?cpt():t==="hi"?upt():ipt()}),_pt=()=>"changed here and on Overleaf. Both copies are untouched — choose which one to keep.",fpt=()=>"在此处和 Overleaf 上均有更改。两个副本均未被修改——请选择要保留的版本。",dpt=()=>"هم اینجا و هم در Overleaf تغییر کرده است. هر دو نسخه دست‌نخورده‌اند — انتخاب کنید کدام نگه داشته شود.",hpt=()=>"تغيّر هنا وعلى Overleaf. كلا النسختين لم تُمسّا — اختر أيّهما تحتفظ به.",ppt=()=>"cambió aquí y en Overleaf. No se ha tocado ninguna de las dos copias — elige cuál conservar.",mpt=()=>"यहाँ और Overleaf दोनों जगह बदला गया। दोनों कॉपी सुरक्षित हैं — चुनें कि कौन सी रखनी है।",gpt=((e={},n={})=>{const t=n.locale??z();return t==="zh-CN"?fpt():t==="fa"?dpt():t==="ar"?hpt():t==="es"?ppt():t==="hi"?mpt():_pt()}),vpt=()=>"Keep this copy",bpt=()=>"保留此副本",ypt=()=>"نگه داشتن این نسخه",xpt=()=>"الاحتفاظ بهذه النسخة",wpt=()=>"Conservar esta copia",kpt=()=>"यह कॉपी रखें",Spt=((e={},n={})=>{const t=n.locale??z();return t==="zh-CN"?bpt():t==="fa"?ypt():t==="ar"?xpt():t==="es"?wpt():t==="hi"?kpt():vpt()}),Cpt=()=>"Open in Overleaf",Ept=()=>"在 Overleaf 中打开",Npt=()=>"باز کردن در Overleaf",zpt=()=>"فتح في Overleaf",jpt=()=>"Abrir en Overleaf",Tpt=()=>"Overleaf में खोलें",Apt=((e={},n={})=>{const t=n.locale??z();return t==="zh-CN"?Ept():t==="fa"?Npt():t==="ar"?zpt():t==="es"?jpt():t==="hi"?Tpt():Cpt()}),Rpt=()=>"Replace the Overleaf token",Mpt=()=>"替换 Overleaf 令牌",Opt=()=>"جایگزینی توکن Overleaf",Dpt=()=>"استبدال رمز Overleaf",Lpt=()=>"Reemplazar el token de Overleaf",Ipt=()=>"Overleaf टोकन बदलें",QN=((e={},n={})=>{const t=n.locale??z();return t==="zh-CN"?Mpt():t==="fa"?Opt():t==="ar"?Dpt():t==="es"?Lpt():t==="hi"?Ipt():Rpt()}),$pt=()=>"Sync files",Bpt=()=>"同步文件",Ppt=()=>"همگام‌سازی فایل‌ها",Fpt=()=>"مزامنة الملفات",Hpt=()=>"Sincronizar archivos",qpt=()=>"फ़ाइलें सिंक करें",Upt=((e={},n={})=>{const t=n.locale??z();return t==="zh-CN"?Bpt():t==="fa"?Ppt():t==="ar"?Fpt():t==="es"?Hpt():t==="hi"?qpt():$pt()}),Gpt=()=>"Unlink",Vpt=()=>"取消关联",Kpt=()=>"قطع پیوند",Wpt=()=>"إلغاء الربط",Qpt=()=>"Desvincular",Xpt=()=>"लिंक हटाएं",Ypt=((e={},n={})=>{const t=n.locale??z();return t==="zh-CN"?Vpt():t==="fa"?Kpt():t==="ar"?Wpt():t==="es"?Qpt():t==="hi"?Xpt():Gpt()}),Zpt=()=>"Upload a copy as a new project ↗",Jpt=()=>"上传副本作为新项目 ↗",e0t=()=>"بارگذاری یک کپی به‌عنوان پروژهٔ جدید ↗",t0t=()=>"رفع نسخة كمشروع جديد ↗",n0t=()=>"Subir una copia como proyecto nuevo ↗",r0t=()=>"नए प्रोजेक्ट के रूप में एक कॉपी अपलोड करें ↗",OD=((e={},n={})=>{const t=n.locale??z();return t==="zh-CN"?Jpt():t==="fa"?e0t():t==="ar"?t0t():t==="es"?n0t():t==="hi"?r0t():Zpt()}),s0t=()=>"Use Overleaf's",i0t=()=>"使用 Overleaf 的副本",a0t=()=>"استفاده از نسخهٔ Overleaf",o0t=()=>"استخدام نسخة Overleaf",l0t=()=>"Usar la de Overleaf",c0t=()=>"Overleaf का इस्तेमाल करें",u0t=((e={},n={})=>{const t=n.locale??z();return t==="zh-CN"?i0t():t==="fa"?a0t():t==="ar"?o0t():t==="es"?l0t():t==="hi"?c0t():s0t()}),_0t=()=>"This paper stays in step with Overleaf.",f0t=()=>"此论文将与 Overleaf 保持同步。",d0t=()=>"این مقاله با Overleaf همگام می‌ماند.",h0t=()=>"تبقى هذه الورقة متزامنة مع Overleaf.",p0t=()=>"Este paper se mantiene sincronizado con Overleaf.",m0t=()=>"यह पेपर Overleaf के साथ मेल में रहता है।",g0t=((e={},n={})=>{const t=n.locale??z();return t==="zh-CN"?f0t():t==="fa"?d0t():t==="ar"?h0t():t==="es"?p0t():t==="hi"?m0t():_0t()}),v0t=()=>"Paste it instead",b0t=()=>"改为粘贴",y0t=()=>"به‌جایش بچسبانید",x0t=()=>"الصقه بدلًا من ذلك",w0t=()=>"Pegarla manualmente",k0t=()=>"इसके बजाय पेस्ट करें",S0t=((e={},n={})=>{const t=n.locale??z();return t==="zh-CN"?b0t():t==="fa"?y0t():t==="ar"?x0t():t==="es"?w0t():t==="hi"?k0t():v0t()}),C0t=e=>`Pulled ${e==null?void 0:e.paths}.`,E0t=e=>`已拉取 ${e==null?void 0:e.paths}。`,N0t=e=>`${e==null?void 0:e.paths} دریافت شد.`,z0t=e=>`سُحب ${e==null?void 0:e.paths}.`,j0t=e=>`Descargado: ${e==null?void 0:e.paths}.`,T0t=e=>`${e==null?void 0:e.paths} पुल किया।`,A0t=((e,n={})=>{const t=n.locale??z();return t==="zh-CN"?E0t(e):t==="fa"?N0t(e):t==="ar"?z0t(e):t==="es"?j0t(e):t==="hi"?T0t(e):C0t(e)}),R0t=e=>`Pulled ${e==null?void 0:e.pulled}; pushed ${e==null?void 0:e.pushed}.`,M0t=e=>`已拉取 ${e==null?void 0:e.pulled};已推送 ${e==null?void 0:e.pushed}。`,O0t=e=>`${e==null?void 0:e.pulled} دریافت و ${e==null?void 0:e.pushed} ارسال شد.`,D0t=e=>`سُحب ${e==null?void 0:e.pulled}؛ ورُفع ${e==null?void 0:e.pushed}.`,L0t=e=>`Descargado: ${e==null?void 0:e.pulled}; subido: ${e==null?void 0:e.pushed}.`,I0t=e=>`${e==null?void 0:e.pulled} पुल किया; ${e==null?void 0:e.pushed} पुश किया।`,$0t=((e,n={})=>{const t=n.locale??z();return t==="zh-CN"?M0t(e):t==="fa"?O0t(e):t==="ar"?D0t(e):t==="es"?L0t(e):t==="hi"?I0t(e):R0t(e)}),B0t=e=>`Pushed ${e==null?void 0:e.paths}.`,P0t=e=>`已推送 ${e==null?void 0:e.paths}。`,F0t=e=>`${e==null?void 0:e.paths} ارسال شد.`,H0t=e=>`رُفع ${e==null?void 0:e.paths}.`,q0t=e=>`Subido: ${e==null?void 0:e.paths}.`,U0t=e=>`${e==null?void 0:e.paths} पुश किया।`,G0t=((e,n={})=>{const t=n.locale??z();return t==="zh-CN"?P0t(e):t==="fa"?F0t(e):t==="ar"?H0t(e):t==="es"?q0t(e):t==="hi"?U0t(e):B0t(e)}),V0t=()=>"Add a fresh Overleaf session cookie to start following again.",K0t=()=>"添加新的 Overleaf 会话 cookie 即可继续实时跟随。",W0t=()=>"برای ادامهٔ دنبال کردن، کوکی نشست تازه‌ای از Overleaf اضافه کنید.",Q0t=()=>"أضِف ملف تعريف ارتباط جلسة Overleaf جديدًا لبدء المتابعة مجددًا.",X0t=()=>"Añade una nueva cookie de sesión de Overleaf para volver a seguir los cambios.",Y0t=()=>"फिर से फ़ॉलो करना शुरू करने के लिए एक नई Overleaf सेशन कुकी जोड़ें।",Z0t=((e={},n={})=>{const t=n.locale??z();return t==="zh-CN"?K0t():t==="fa"?W0t():t==="ar"?Q0t():t==="es"?X0t():t==="hi"?Y0t():V0t()}),J0t=()=>"Save the file first",emt=()=>"请先保存文件",tmt=()=>"ابتدا فایل را ذخیره کنید",nmt=()=>"احفظ الملف أولًا",rmt=()=>"Guarda el archivo primero",smt=()=>"पहले फ़ाइल सेव करें",imt=((e={},n={})=>{const t=n.locale??z();return t==="zh-CN"?emt():t==="fa"?tmt():t==="ar"?nmt():t==="es"?rmt():t==="hi"?smt():J0t()}),amt=()=>"Save this file to sync it with Overleaf",omt=()=>"保存此文件以与 Overleaf 同步",lmt=()=>"برای همگام‌سازی با Overleaf این فایل را ذخیره کنید",cmt=()=>"احفظ هذا الملف لمزامنته مع Overleaf",umt=()=>"Guarda este archivo para sincronizarlo con Overleaf",_mt=()=>"Overleaf के साथ सिंक करने के लिए इस फ़ाइल को सेव करें",DD=((e={},n={})=>{const t=n.locale??z();return t==="zh-CN"?omt():t==="fa"?lmt():t==="ar"?cmt():t==="es"?umt():t==="hi"?_mt():amt()}),fmt=()=>"Save token",dmt=()=>"保存令牌",hmt=()=>"ذخیرهٔ توکن",pmt=()=>"حفظ الرمز",mmt=()=>"Guardar token",gmt=()=>"टोकन सेव करें",vmt=((e={},n={})=>{const t=n.locale??z();return t==="zh-CN"?dmt():t==="fa"?hmt():t==="ar"?pmt():t==="es"?mmt():t==="hi"?gmt():fmt()}),bmt=()=>"Send this paper to Overleaf",ymt=()=>"将此论文发送到 Overleaf",xmt=()=>"ارسال مقاله به Overleaf",wmt=()=>"أرسل هذه الورقة إلى Overleaf",kmt=()=>"Enviar este paper a Overleaf",Smt=()=>"यह पेपर Overleaf को भेजें",Cmt=((e={},n={})=>{const t=n.locale??z();return t==="zh-CN"?ymt():t==="fa"?xmt():t==="ar"?wmt():t==="es"?kmt():t==="hi"?Smt():bmt()}),Emt=()=>"Overleaf session cookie",Nmt=()=>"Overleaf 会话 cookie",zmt=()=>"کوکی نشست Overleaf",jmt=()=>"ملف تعريف ارتباط جلسة Overleaf",Tmt=()=>"Cookie de sesión de Overleaf",Amt=()=>"Overleaf सेशन कुकी",e3=((e={},n={})=>{const t=n.locale??z();return t==="zh-CN"?Nmt():t==="fa"?zmt():t==="ar"?jmt():t==="es"?Tmt():t==="hi"?Amt():Emt()}),Rmt=()=>"To follow Overleaf as people type, paste your Overleaf session cookie: in a browser signed in to Overleaf, open the developer tools, find the overleaf_session2 cookie, and copy its value. It stays on this machine.",Mmt=()=>"要在他人输入时实时跟随 Overleaf,请粘贴你的 Overleaf 会话 cookie:在已登录 Overleaf 的浏览器中打开开发者工具,找到 overleaf_session2 cookie 并复制其值。它只保存在这台机器上。",Omt=()=>"برای دنبال کردن Overleaf هنگام تایپ دیگران، کوکی نشست Overleaf خود را بچسبانید: در مرورگری که به Overleaf وارد شده‌اید، ابزارهای توسعه‌دهنده را باز کنید، کوکی overleaf_session2 را پیدا کنید و مقدار آن را کپی کنید. این مقدار روی همین دستگاه می‌ماند.",Dmt=()=>"لمتابعة Overleaf أثناء كتابة الآخرين، الصق ملف تعريف ارتباط جلسة Overleaf: في متصفح مسجّل الدخول إلى Overleaf، افتح أدوات المطوّر، وابحث عن ملف تعريف الارتباط overleaf_session2، وانسخ قيمته. يبقى على هذا الجهاز.",Lmt=()=>"Para seguir los cambios de Overleaf mientras se escribe, pega tu cookie de sesión de Overleaf: en un navegador con la sesión de Overleaf iniciada, abre las herramientas de desarrollo, busca la cookie overleaf_session2 y copia su valor. Se queda en este equipo.",Imt=()=>"लोगों के टाइप करते ही Overleaf को फ़ॉलो करने के लिए, अपनी Overleaf सेशन कुकी पेस्ट करें: Overleaf में साइन इन ब्राउज़र में, डेवलपर टूल खोलें, overleaf_session2 कुकी खोजें, और उसकी वैल्यू कॉपी करें। यह इसी मशीन पर रहती है।",$mt=((e={},n={})=>{const t=n.locale??z();return t==="zh-CN"?Mmt():t==="fa"?Omt():t==="ar"?Dmt():t==="es"?Lmt():t==="hi"?Imt():Rmt()}),Bmt=()=>"Overleaf sync failed",Pmt=()=>"Overleaf 同步失败",Fmt=()=>"همگام‌سازی با Overleaf ناموفق بود",Hmt=()=>"فشلت مزامنة Overleaf",qmt=()=>"Error al sincronizar con Overleaf",Umt=()=>"Overleaf सिंक विफल",t3=((e={},n={})=>{const t=n.locale??z();return t==="zh-CN"?Pmt():t==="fa"?Fmt():t==="ar"?Hmt():t==="es"?qmt():t==="hi"?Umt():Bmt()}),Gmt=()=>"Text syncs live. This moves figures and other files, and settles conflicts.",Vmt=()=>"文本会实时同步。此操作用于同步图片等其他文件,并解决冲突。",Kmt=()=>"متن زنده همگام می‌شود. این کار تصویرها و دیگر فایل‌ها را جابه‌جا می‌کند و تعارض‌ها را حل می‌کند.",Wmt=()=>"يتزامن النص مباشرةً. ينقل هذا الأشكال والملفات الأخرى، ويحسم التعارضات.",Qmt=()=>"El texto se sincroniza en directo. Esto mueve las figuras y otros archivos, y resuelve conflictos.",Xmt=()=>"टेक्स्ट लाइव सिंक होता है। यह फ़िगर और अन्य फ़ाइलें ले जाता है, और टकराव सुलझाता है।",Ymt=((e={},n={})=>{const t=n.locale??z();return t==="zh-CN"?Vmt():t==="fa"?Kmt():t==="ar"?Wmt():t==="es"?Qmt():t==="hi"?Xmt():Gmt()}),Zmt=()=>"Syncing with Overleaf…",Jmt=()=>"正在与 Overleaf 同步…",egt=()=>"در حال همگام‌سازی با Overleaf…",tgt=()=>"جارٍ المزامنة مع Overleaf…",ngt=()=>"Sincronizando con Overleaf…",rgt=()=>"Overleaf के साथ सिंक हो रहा है…",LD=((e={},n={})=>{const t=n.locale??z();return t==="zh-CN"?Jmt():t==="fa"?egt():t==="ar"?tgt():t==="es"?ngt():t==="hi"?rgt():Zmt()}),sgt=()=>"Paste an Overleaf Git authentication token to keep this paper in step with an Overleaf project. Create one in Overleaf under Account Settings — Git integration comes with a paid Overleaf plan.",igt=()=>"粘贴 Overleaf Git 身份验证令牌,使此论文与 Overleaf 项目保持同步。请在 Overleaf 的“账户设置”中创建令牌 — Git 集成功能需要付费 Overleaf 套餐。",agt=()=>"برای همگام نگه داشتن این مقاله با یک پروژهٔ Overleaf، توکن احراز هویت Git در Overleaf را جای‌گذاری کنید. آن را در بخش تنظیمات حساب Overleaf بسازید — یکپارچه‌سازی Git به طرح پولی Overleaf نیاز دارد.",ogt=()=>"الصق رمز مصادقة Git لـ Overleaf لإبقاء هذه الورقة متزامنة مع مشروع Overleaf. أنشئ واحدًا في Overleaf ضمن إعدادات الحساب — يأتي تكامل Git مع خطة Overleaf مدفوعة.",lgt=()=>"Pega un token de autenticación de Git de Overleaf para mantener este paper sincronizado con un proyecto de Overleaf. Créalo en Overleaf, en Account Settings — la integración con Git requiere un plan de pago de Overleaf.",cgt=()=>"इस पेपर को किसी Overleaf प्रोजेक्ट के साथ मेल में रखने के लिए एक Overleaf Git प्रमाणीकरण टोकन पेस्ट करें। इसे Overleaf में Account Settings के तहत बनाएं — Git इंटीग्रेशन एक पेड Overleaf प्लान के साथ आता है।",ugt=((e={},n={})=>{const t=n.locale??z();return t==="zh-CN"?igt():t==="fa"?agt():t==="ar"?ogt():t==="es"?lgt():t==="hi"?cgt():sgt()}),_gt=()=>"Paste the URL of the Overleaf project this paper belongs to. Overleaf cannot create one over Git, so open or create the project there first.",fgt=()=>"粘贴此论文所属 Overleaf 项目的 URL。Overleaf 无法通过 Git 创建项目,因此请先在 Overleaf 中打开或创建项目。",dgt=()=>"نشانی پروژهٔ Overleaf مربوط به این مقاله را جای‌گذاری کنید. Overleaf نمی‌تواند پروژه را از طریق Git بسازد؛ پس ابتدا پروژه را در آنجا باز یا ایجاد کنید.",hgt=()=>"الصق رابط مشروع Overleaf الذي تنتمي إليه هذه الورقة. لا يستطيع Overleaf إنشاء مشروع عبر Git، لذا افتح المشروع أو أنشئه هناك أولًا.",pgt=()=>"Pega la URL del proyecto de Overleaf al que pertenece este paper. Overleaf no puede crear proyectos por Git, así que abre o crea el proyecto allí primero.",mgt=()=>"उस Overleaf प्रोजेक्ट का URL पेस्ट करें जिससे यह पेपर संबंधित है। Overleaf Git के ज़रिए एक नहीं बना सकता, इसलिए पहले वहाँ प्रोजेक्ट खोलें या बनाएं।",ggt=((e={},n={})=>{const t=n.locale??z();return t==="zh-CN"?fgt():t==="fa"?dgt():t==="ar"?hgt():t==="es"?pgt():t==="hi"?mgt():_gt()}),vgt=()=>"Toggle Plan mode for this chat",bgt=()=>"切换此聊天的计划模式",ygt=()=>"تغییر حالت طرح این گفت‌وگو",xgt=()=>"تبديل وضع التخطيط لهذه المحادثة",wgt=()=>"Activa o desactiva el modo Plan en este chat",kgt=()=>"इस चैट के लिए प्लान मोड टॉगल करें",Sgt=((e={},n={})=>{const t=n.locale??z();return t==="zh-CN"?bgt():t==="fa"?ygt():t==="ar"?xgt():t==="es"?wgt():t==="hi"?kgt():vgt()}),Cgt=()=>"Accept and auto mode",Egt=()=>"接受并使用自动模式",Ngt=()=>"پذیرش و حالت خودکار",zgt=()=>"قبول وتفعيل الوضع التلقائي",jgt=()=>"Aceptar en modo automático",Tgt=()=>"स्वीकार करें और ऑटो मोड",Agt=((e={},n={})=>{const t=n.locale??z();return t==="zh-CN"?Egt():t==="fa"?Ngt():t==="ar"?zgt():t==="es"?jgt():t==="hi"?Tgt():Cgt()}),Rgt=()=>"Accept and bypass all",Mgt=()=>"接受并跳过所有审批",Ogt=()=>"پذیرش و عبور از همهٔ تأییدها",Dgt=()=>"القبول وتجاوز الكل",Lgt=()=>"Aceptar y omitir permisos",Igt=()=>"स्वीकार करें और सब बायपास करें",$gt=((e={},n={})=>{const t=n.locale??z();return t==="zh-CN"?Mgt():t==="fa"?Ogt():t==="ar"?Dgt():t==="es"?Lgt():t==="hi"?Igt():Rgt()}),Bgt=()=>"Accept plan",Pgt=()=>"接受计划",Fgt=()=>"پذیرش طرح",Hgt=()=>"قبول الخطة",qgt=()=>"Aceptar plan",Ugt=()=>"प्लान स्वीकार करें",Ggt=((e={},n={})=>{const t=n.locale??z();return t==="zh-CN"?Pgt():t==="fa"?Fgt():t==="ar"?Hgt():t==="es"?qgt():t==="hi"?Ugt():Bgt()}),Vgt=e=>`${e==null?void 0:e.agent} proposed a plan`,Kgt=e=>`${e==null?void 0:e.agent} 提出了一个计划`,Wgt=e=>`طرح پیشنهادیِ ${e==null?void 0:e.agent}`,Qgt=e=>`${e==null?void 0:e.agent} اقترح خطة`,Xgt=e=>`${e==null?void 0:e.agent} propuso un plan`,Ygt=e=>`${e==null?void 0:e.agent} ने एक प्लान प्रस्तावित किया`,Zgt=((e,n={})=>{const t=n.locale??z();return t==="zh-CN"?Kgt(e):t==="fa"?Wgt(e):t==="ar"?Qgt(e):t==="es"?Xgt(e):t==="hi"?Ygt(e):Vgt(e)}),Jgt=e=>`${e==null?void 0:e.agent} is ready to proceed`,e1t=e=>`${e==null?void 0:e.agent} 已准备好继续`,t1t=e=>`طرحِ ${e==null?void 0:e.agent} آمادهٔ ادامه است`,n1t=e=>`${e==null?void 0:e.agent} جاهز للمتابعة`,r1t=e=>`${e==null?void 0:e.agent} está listo para continuar`,s1t=e=>`${e==null?void 0:e.agent} आगे बढ़ने के लिए तैयार है`,i1t=((e,n={})=>{const t=n.locale??z();return t==="zh-CN"?e1t(e):t==="fa"?t1t(e):t==="ar"?n1t(e):t==="es"?r1t(e):t==="hi"?s1t(e):Jgt(e)}),a1t=()=>"Back",o1t=()=>"返回",l1t=()=>"بازگشت",c1t=()=>"رجوع",u1t=()=>"Atrás",_1t=()=>"वापस",ID=((e={},n={})=>{const t=n.locale??z();return t==="zh-CN"?o1t():t==="fa"?l1t():t==="ar"?c1t():t==="es"?u1t():t==="hi"?_1t():a1t()}),f1t=()=>"More approval options",d1t=()=>"更多批准选项",h1t=()=>"گزینه‌های تأیید بیشتر",p1t=()=>"خيارات موافقة إضافية",m1t=()=>"Más opciones de aprobación",g1t=()=>"और स्वीकृति विकल्प",v1t=((e={},n={})=>{const t=n.locale??z();return t==="zh-CN"?d1t():t==="fa"?h1t():t==="ar"?p1t():t==="es"?m1t():t==="hi"?g1t():f1t()}),b1t=()=>"Open plan",y1t=()=>"打开计划",x1t=()=>"باز کردن طرح",w1t=()=>"فتح الخطة",k1t=()=>"Abrir plan",S1t=()=>"प्लान खोलें",C1t=((e={},n={})=>{const t=n.locale??z();return t==="zh-CN"?y1t():t==="fa"?x1t():t==="ar"?w1t():t==="es"?k1t():t==="hi"?S1t():b1t()}),E1t=()=>"Reject",N1t=()=>"拒绝",z1t=()=>"رد کردن",j1t=()=>"رفض",T1t=()=>"Rechazar",A1t=()=>"अस्वीकार करें",R1t=((e={},n={})=>{const t=n.locale??z();return t==="zh-CN"?N1t():t==="fa"?z1t():t==="ar"?j1t():t==="es"?T1t():t==="hi"?A1t():E1t()}),M1t=()=>"Revise",O1t=()=>"修改",D1t=()=>"بازنگری",L1t=()=>"طلب تعديل",I1t=()=>"Pedir cambios",$1t=()=>"संशोधित करें",B1t=((e={},n={})=>{const t=n.locale??z();return t==="zh-CN"?O1t():t==="fa"?D1t():t==="ar"?L1t():t==="es"?I1t():t==="hi"?$1t():M1t()}),P1t=()=>"Revise…",F1t=()=>"修改…",H1t=()=>"بازنگری…",q1t=()=>"طلب تعديل…",U1t=()=>"Pedir cambios…",G1t=()=>"संशोधित करें…",V1t=((e={},n={})=>{const t=n.locale??z();return t==="zh-CN"?F1t():t==="fa"?H1t():t==="ar"?q1t():t==="es"?U1t():t==="hi"?G1t():P1t()}),K1t=()=>"What should change? (optional)",W1t=()=>"需要更改什么?(可选)",Q1t=()=>"چه چیزی باید تغییر کند؟ (اختیاری)",X1t=()=>"ما الذي ينبغي تغييره؟ (اختياري)",Y1t=()=>"¿Qué debería cambiar? (opcional)",Z1t=()=>"क्या बदलना चाहिए? (वैकल्पिक)",J1t=((e={},n={})=>{const t=n.locale??z();return t==="zh-CN"?W1t():t==="fa"?Q1t():t==="ar"?X1t():t==="es"?Y1t():t==="hi"?Z1t():K1t()}),evt=e=>`${e==null?void 0:e.count} active`,tvt=e=>`${e==null?void 0:e.count} 个活跃`,nvt=e=>`${e==null?void 0:e.count} فعال`,rvt=e=>`الوكلاء النشطون: ${e==null?void 0:e.count}`,svt=e=>`${e==null?void 0:e.count} activos`,ivt=e=>`${e==null?void 0:e.count} सक्रिय`,avt=((e,n={})=>{const t=n.locale??z();return t==="zh-CN"?tvt(e):t==="fa"?nvt(e):t==="ar"?rvt(e):t==="es"?svt(e):t==="hi"?ivt(e):evt(e)}),ovt=e=>`${e==null?void 0:e.count} total agents`,lvt=e=>`共 ${e==null?void 0:e.count} 个智能体`,cvt=e=>`در مجموع ${e==null?void 0:e.count} عامل`,uvt=e=>`إجمالي الوكلاء: ${e==null?void 0:e.count}`,_vt=e=>`${e==null?void 0:e.count} agentes en total`,fvt=e=>`${e==null?void 0:e.count} कुल एजेंट`,dvt=((e,n={})=>{const t=n.locale??z();return t==="zh-CN"?lvt(e):t==="fa"?cvt(e):t==="ar"?uvt(e):t==="es"?_vt(e):t==="hi"?fvt(e):ovt(e)}),hvt=e=>`Delete ${e==null?void 0:e.name} from OpenResearch? Its experiments, runs, and chats will be permanently removed.`,pvt=e=>`从 OpenResearch 中删除 ${e==null?void 0:e.name}?其实验、运行和聊天将被永久移除。`,mvt=e=>`${e==null?void 0:e.name} از OpenResearch حذف شود؟ آزمایش‌ها، اجراها و گفتگوهای آن برای همیشه حذف می‌شوند.`,gvt=e=>`حذف ${e==null?void 0:e.name} من OpenResearch؟ ستُزال تجاربه وعمليات تشغيله ومحادثاته نهائيًا.`,vvt=e=>`¿Eliminar ${e==null?void 0:e.name} de OpenResearch? Sus experimentos, ejecuciones y chats se eliminarán de forma permanente.`,bvt=e=>`${e==null?void 0:e.name} को OpenResearch से हटाएं? इसके प्रयोग, रन और चैट स्थायी रूप से हट जाएंगे।`,yvt=((e,n={})=>{const t=n.locale??z();return t==="zh-CN"?pvt(e):t==="fa"?mvt(e):t==="ar"?gvt(e):t==="es"?vvt(e):t==="hi"?bvt(e):hvt(e)}),xvt=()=>"Agents",wvt=()=>"智能体",kvt=()=>"عامل‌ها",Svt=()=>"الوكلاء",Cvt=()=>"Agentes",Evt=()=>"एजेंट",XN=((e={},n={})=>{const t=n.locale??z();return t==="zh-CN"?wvt():t==="fa"?kvt():t==="ar"?Svt():t==="es"?Cvt():t==="hi"?Evt():xvt()}),Nvt=()=>"arXiv paper ID:",zvt=()=>"arXiv 论文 ID:",jvt=()=>"شناسهٔ مقالهٔ arXiv:",Tvt=()=>"معرّف ورقة arXiv:",Avt=()=>"ID del paper en arXiv:",Rvt=()=>"arXiv पेपर ID:",Mvt=((e={},n={})=>{const t=n.locale??z();return t==="zh-CN"?zvt():t==="fa"?jvt():t==="ar"?Tvt():t==="es"?Avt():t==="hi"?Rvt():Nvt()}),Ovt=()=>"Cancel",Dvt=()=>"取消",Lvt=()=>"لغو",Ivt=()=>"إلغاء",$vt=()=>"Cancelar",Bvt=()=>"रद्द करें",Pvt=((e={},n={})=>{const t=n.locale??z();return t==="zh-CN"?Dvt():t==="fa"?Lvt():t==="ar"?Ivt():t==="es"?$vt():t==="hi"?Bvt():Ovt()}),Fvt=()=>"Created",Hvt=()=>"创建时间",qvt=()=>"ایجادشده",Uvt=()=>"أُنشئ",Gvt=()=>"Creado",Vvt=()=>"बनाया गया",Kvt=((e={},n={})=>{const t=n.locale??z();return t==="zh-CN"?Hvt():t==="fa"?qvt():t==="ar"?Uvt():t==="es"?Gvt():t==="hi"?Vvt():Fvt()}),Wvt=()=>"Delete project?",Qvt=()=>"删除项目?",Xvt=()=>"پروژه حذف شود؟",Yvt=()=>"حذف المشروع؟",Zvt=()=>"¿Eliminar el proyecto?",Jvt=()=>"प्रोजेक्ट हटाएं?",ebt=((e={},n={})=>{const t=n.locale??z();return t==="zh-CN"?Qvt():t==="fa"?Xvt():t==="ar"?Yvt():t==="es"?Zvt():t==="hi"?Jvt():Wvt()}),tbt=()=>"Delete project",nbt=()=>"删除项目",rbt=()=>"حذف پروژه",sbt=()=>"حذف المشروع",ibt=()=>"Eliminar proyecto",abt=()=>"प्रोजेक्ट हटाएं",obt=((e={},n={})=>{const t=n.locale??z();return t==="zh-CN"?nbt():t==="fa"?rbt():t==="ar"?sbt():t==="es"?ibt():t==="hi"?abt():tbt()}),lbt=()=>"Deleting…",cbt=()=>"正在删除…",ubt=()=>"در حال حذف…",_bt=()=>"جارٍ الحذف…",fbt=()=>"Eliminando…",dbt=()=>"हटाया जा रहा है…",hbt=((e={},n={})=>{const t=n.locale??z();return t==="zh-CN"?cbt():t==="fa"?ubt():t==="ar"?_bt():t==="es"?fbt():t==="hi"?dbt():lbt()}),pbt=()=>"Experiments",mbt=()=>"实验",gbt=()=>"آزمایش‌ها",vbt=()=>"التجارب",bbt=()=>"Experimentos",ybt=()=>"प्रयोग",YN=((e={},n={})=>{const t=n.locale??z();return t==="zh-CN"?mbt():t==="fa"?gbt():t==="ar"?vbt():t==="es"?bbt():t==="hi"?ybt():pbt()}),xbt=()=>"The local folder and linked GitHub repository are kept.",wbt=()=>"本地文件夹和已关联的 GitHub 仓库都会保留。",kbt=()=>"پوشهٔ محلی و مخزن پیوندشدهٔ GitHub نگه داشته می‌شوند.",Sbt=()=>"يُحتفظ بالمجلد المحلي ومستودع GitHub المرتبط.",Cbt=()=>"Se conservan la carpeta local y el repositorio de GitHub vinculado.",Ebt=()=>"लोकल फ़ोल्डर और लिंक की गई GitHub रिपॉज़िटरी दोनों सुरक्षित रहती हैं।",Nbt=((e={},n={})=>{const t=n.locale??z();return t==="zh-CN"?wbt():t==="fa"?kbt():t==="ar"?Sbt():t==="es"?Cbt():t==="hi"?Ebt():xbt()}),zbt=()=>"The local folder is kept.",jbt=()=>"本地文件夹会保留。",Tbt=()=>"پوشهٔ محلی نگه داشته می‌شود.",Abt=()=>"يُحتفظ بالمجلد المحلي.",Rbt=()=>"La carpeta local se conserva.",Mbt=()=>"लोकल फ़ोल्डर सुरक्षित रहता है।",Obt=((e={},n={})=>{const t=n.locale??z();return t==="zh-CN"?jbt():t==="fa"?Tbt():t==="ar"?Abt():t==="es"?Rbt():t==="hi"?Mbt():zbt()}),Dbt=()=>"New project",Lbt=()=>"新建项目",Ibt=()=>"پروژهٔ جدید",$bt=()=>"مشروع جديد",Bbt=()=>"Nuevo proyecto",Pbt=()=>"नया प्रोजेक्ट",$D=((e={},n={})=>{const t=n.locale??z();return t==="zh-CN"?Lbt():t==="fa"?Ibt():t==="ar"?$bt():t==="es"?Bbt():t==="hi"?Pbt():Dbt()}),Fbt=()=>"No projects yet — create one to get started.",Hbt=()=>"尚无项目——新建一个即可开始。",qbt=()=>"هنوز پروژه‌ای نیست — برای شروع یکی بسازید.",Ubt=()=>"لا توجد مشاريع بعد — أنشئ واحدًا للبدء.",Gbt=()=>"Aún no hay proyectos — crea uno para empezar.",Vbt=()=>"अभी तक कोई प्रोजेक्ट नहीं — शुरू करने के लिए एक बनाएं।",Kbt=((e={},n={})=>{const t=n.locale??z();return t==="zh-CN"?Hbt():t==="fa"?qbt():t==="ar"?Ubt():t==="es"?Gbt():t==="hi"?Vbt():Fbt()}),Wbt=()=>"Project",Qbt=()=>"项目",Xbt=()=>"پروژه",Ybt=()=>"المشروع",Zbt=()=>"Proyecto",Jbt=()=>"प्रोजेक्ट",eyt=((e={},n={})=>{const t=n.locale??z();return t==="zh-CN"?Qbt():t==="fa"?Xbt():t==="ar"?Ybt():t==="es"?Zbt():t==="hi"?Jbt():Wbt()}),tyt=()=>"Projects",nyt=()=>"项目",ryt=()=>"پروژه‌ها",syt=()=>"المشاريع",iyt=()=>"Proyectos",ayt=()=>"प्रोजेक्ट",oyt=((e={},n={})=>{const t=n.locale??z();return t==="zh-CN"?nyt():t==="fa"?ryt():t==="ar"?syt():t==="es"?iyt():t==="hi"?ayt():tyt()}),lyt=()=>"Repository",cyt=()=>"仓库",uyt=()=>"مخزن",_yt=()=>"المستودع",fyt=()=>"Repositorio",dyt=()=>"रिपॉज़िटरी",ZN=((e={},n={})=>{const t=n.locale??z();return t==="zh-CN"?cyt():t==="fa"?uyt():t==="ar"?_yt():t==="es"?fyt():t==="hi"?dyt():lyt()}),hyt=()=>"Idle",pyt=()=>"空闲",myt=()=>"بیکار",gyt=()=>"خامل",vyt=()=>"Inactivo",byt=()=>"निष्क्रिय",yyt=((e={},n={})=>{const t=n.locale??z();return t==="zh-CN"?pyt():t==="fa"?myt():t==="ar"?gyt():t==="es"?vyt():t==="hi"?byt():hyt()}),xyt=()=>"Local",wyt=()=>"本地",kyt=()=>"محلی",Syt=()=>"محلي",Cyt=()=>"Local",Eyt=()=>"लोकल",vv=((e={},n={})=>{const t=n.locale??z();return t==="zh-CN"?wyt():t==="fa"?kyt():t==="ar"?Syt():t==="es"?Cyt():t==="hi"?Eyt():xyt()}),Nyt=()=>"1 total agent",zyt=()=>"共 1 个智能体",jyt=()=>"در مجموع ۱ عامل",Tyt=()=>"وكيل واحد إجمالًا",Ayt=()=>"1 agente en total",Ryt=()=>"1 कुल एजेंट",Myt=((e={},n={})=>{const t=n.locale??z();return t==="zh-CN"?zyt():t==="fa"?jyt():t==="ar"?Tyt():t==="es"?Ayt():t==="hi"?Ryt():Nyt()}),Oyt=e=>`${e==null?void 0:e.count} running`,Dyt=e=>`${e==null?void 0:e.count} 个运行中`,Lyt=e=>`${e==null?void 0:e.count} در حال اجرا`,Iyt=e=>`${e==null?void 0:e.count} قيد التشغيل`,$yt=e=>`${e==null?void 0:e.count} en ejecución`,Byt=e=>`${e==null?void 0:e.count} चल रहे`,Pyt=((e,n={})=>{const t=n.locale??z();return t==="zh-CN"?Dyt(e):t==="fa"?Lyt(e):t==="ar"?Iyt(e):t==="es"?$yt(e):t==="hi"?Byt(e):Oyt(e)}),Fyt=e=>`${e==null?void 0:e.count} total`,Hyt=e=>`共 ${e==null?void 0:e.count} 个`,qyt=e=>`در مجموع ${e==null?void 0:e.count}`,Uyt=e=>`${e==null?void 0:e.count} إجمالًا`,Gyt=e=>`${e==null?void 0:e.count} en total`,Vyt=e=>`${e==null?void 0:e.count} कुल`,JN=((e,n={})=>{const t=n.locale??z();return t==="zh-CN"?Hyt(e):t==="fa"?qyt(e):t==="ar"?Uyt(e):t==="es"?Gyt(e):t==="hi"?Vyt(e):Fyt(e)}),Kyt=()=>"Installing the compatible binary. This may take a few minutes.",Wyt=()=>"正在安装兼容的二进制文件。这可能需要几分钟。",Qyt=()=>"در حال نصب فایل اجرایی سازگار. این کار ممکن است چند دقیقه طول بکشد.",Xyt=()=>"جارٍ تثبيت الملف التنفيذي المتوافق. قد يستغرق هذا بضع دقائق.",Yyt=()=>"Instalando el binario compatible. Puede tardar unos minutos.",Zyt=()=>"संगत बाइनरी इंस्टॉल हो रही है। इसमें कुछ मिनट लग सकते हैं।",Jyt=((e={},n={})=>{const t=n.locale??z();return t==="zh-CN"?Wyt():t==="fa"?Qyt():t==="ar"?Xyt():t==="es"?Yyt():t==="hi"?Zyt():Kyt()}),ext=e=>`Setting up OpenResearch on ${e==null?void 0:e.host}`,txt=e=>`正在设置 ${e==null?void 0:e.host} 上的 OpenResearch`,nxt=e=>`در حال راه‌اندازی OpenResearch روی ${e==null?void 0:e.host}`,rxt=e=>`جارٍ إعداد OpenResearch على ${e==null?void 0:e.host}`,sxt=e=>`Configurando OpenResearch en ${e==null?void 0:e.host}`,ixt=e=>`${e==null?void 0:e.host} पर OpenResearch सेट अप हो रहा है`,axt=((e,n={})=>{const t=n.locale??z();return t==="zh-CN"?txt(e):t==="fa"?nxt(e):t==="ar"?rxt(e):t==="es"?sxt(e):t==="hi"?ixt(e):ext(e)}),oxt=()=>"Check again",lxt=()=>"再次检查",cxt=()=>"بررسی دوباره",uxt=()=>"تحقق مجددًا",_xt=()=>"Volver a comprobar",fxt=()=>"फिर से जाँचें",ez=((e={},n={})=>{const t=n.locale??z();return t==="zh-CN"?lxt():t==="fa"?cxt():t==="ar"?uxt():t==="es"?_xt():t==="hi"?fxt():oxt()}),dxt=()=>"Closing…",hxt=()=>"正在关闭…",pxt=()=>"در حال بستن…",mxt=()=>"جارٍ الإغلاق…",gxt=()=>"Cerrando…",vxt=()=>"बंद हो रहा है…",bxt=((e={},n={})=>{const t=n.locale??z();return t==="zh-CN"?hxt():t==="fa"?pxt():t==="ar"?mxt():t==="es"?gxt():t==="hi"?vxt():dxt()}),yxt=e=>`Connected to ${e==null?void 0:e.host} as ${e==null?void 0:e.user}`,xxt=e=>`已以 ${e==null?void 0:e.user} 身份连接到 ${e==null?void 0:e.host}`,wxt=e=>`اتصال به ${e==null?void 0:e.host} با کاربر ${e==null?void 0:e.user}`,kxt=e=>`متصل بـ ${e==null?void 0:e.host} باسم ${e==null?void 0:e.user}`,Sxt=e=>`Conectado a ${e==null?void 0:e.host} como ${e==null?void 0:e.user}`,Cxt=e=>`${e==null?void 0:e.host} से ${e==null?void 0:e.user} के रूप में कनेक्टेड`,Ext=((e,n={})=>{const t=n.locale??z();return t==="zh-CN"?xxt(e):t==="fa"?wxt(e):t==="ar"?kxt(e):t==="es"?Sxt(e):t==="hi"?Cxt(e):yxt(e)}),Nxt=()=>"Preparing your remote workspace…",zxt=()=>"正在准备远程工作区…",jxt=()=>"در حال آماده‌سازی فضای کاری راه‌دور…",Txt=()=>"جارٍ تحضير مساحة عملك البعيدة…",Axt=()=>"Preparando tu espacio de trabajo remoto…",Rxt=()=>"आपका रिमोट वर्कस्पेस तैयार किया जा रहा है…",Mxt=((e={},n={})=>{const t=n.locale??z();return t==="zh-CN"?zxt():t==="fa"?jxt():t==="ar"?Txt():t==="es"?Axt():t==="hi"?Rxt():Nxt()}),Oxt=e=>`Connecting to ${e==null?void 0:e.host}`,Dxt=e=>`正在连接到 ${e==null?void 0:e.host}`,Lxt=e=>`در حال اتصال به ${e==null?void 0:e.host}`,Ixt=e=>`جارٍ الاتصال بـ ${e==null?void 0:e.host}`,$xt=e=>`Conectando a ${e==null?void 0:e.host}`,Bxt=e=>`${e==null?void 0:e.host} से कनेक्ट हो रहा है`,Pxt=((e,n={})=>{const t=n.locale??z();return t==="zh-CN"?Dxt(e):t==="fa"?Lxt(e):t==="ar"?Ixt(e):t==="es"?$xt(e):t==="hi"?Bxt(e):Oxt(e)}),Fxt=()=>"Close remote host picker",Hxt=()=>"关闭远程主机选择器",qxt=()=>"بستن انتخاب‌گر میزبان راه‌دور",Uxt=()=>"إغلاق مُنتقي المضيف البعيد",Gxt=()=>"Cerrar el selector de hosts remotos",Vxt=()=>"रिमोट होस्ट पिकर बंद करें",Kxt=((e={},n={})=>{const t=n.locale??z();return t==="zh-CN"?Hxt():t==="fa"?qxt():t==="ar"?Uxt():t==="es"?Gxt():t==="hi"?Vxt():Fxt()}),Wxt=()=>"Choose a configured SSH host.",Qxt=()=>"选择已配置的 SSH 主机。",Xxt=()=>"یک میزبان SSH پیکربندی‌شده انتخاب کنید.",Yxt=()=>"اختر مضيف SSH مُعدًّا.",Zxt=()=>"Elige un host SSH configurado.",Jxt=()=>"एक कॉन्फ़िगर किया गया SSH होस्ट चुनें।",e2t=((e={},n={})=>{const t=n.locale??z();return t==="zh-CN"?Qxt():t==="fa"?Xxt():t==="ar"?Yxt():t==="es"?Zxt():t==="hi"?Jxt():Wxt()}),t2t=()=>"Connect to remote",n2t=()=>"连接到远程主机",r2t=()=>"اتصال به میزبان راه‌دور",s2t=()=>"الاتصال بجهاز بعيد",i2t=()=>"Conectar a un host remoto",a2t=()=>"रिमोट से कनेक्ट करें",n3=((e={},n={})=>{const t=n.locale??z();return t==="zh-CN"?n2t():t==="fa"?r2t():t==="ar"?s2t():t==="es"?i2t():t==="hi"?a2t():t2t()}),o2t=()=>"Disconnect",l2t=()=>"断开连接",c2t=()=>"قطع اتصال",u2t=()=>"قطع الاتصال",_2t=()=>"Desconectar",f2t=()=>"डिस्कनेक्ट करें",r3=((e={},n={})=>{const t=n.locale??z();return t==="zh-CN"?l2t():t==="fa"?c2t():t==="ar"?u2t():t==="es"?_2t():t==="hi"?f2t():o2t()}),d2t=()=>"Your remote work is still running. Reconnect when you’re ready.",h2t=()=>"你的远程工作仍在运行。准备好后可以重新连接。",p2t=()=>"کار راه‌دور شما همچنان در حال اجرا است. هر زمان آماده بودید دوباره متصل شوید.",m2t=()=>"لا يزال عملك البعيد قيد التشغيل. أعد الاتصال عندما تكون جاهزًا.",g2t=()=>"Tu trabajo remoto sigue en ejecución. Vuelve a conectarte cuando quieras.",v2t=()=>"आपका रिमोट काम अभी भी चल रहा है। तैयार होने पर फिर से कनेक्ट करें।",b2t=((e={},n={})=>{const t=n.locale??z();return t==="zh-CN"?h2t():t==="fa"?p2t():t==="ar"?m2t():t==="es"?g2t():t==="hi"?v2t():d2t()}),y2t=e=>`Disconnected from ${e==null?void 0:e.host}`,x2t=e=>`已断开与 ${e==null?void 0:e.host} 的连接`,w2t=e=>`اتصال به ${e==null?void 0:e.host} قطع شد`,k2t=e=>`انقطع الاتصال بـ ${e==null?void 0:e.host}`,S2t=e=>`Desconectado de ${e==null?void 0:e.host}`,C2t=e=>`${e==null?void 0:e.host} से डिस्कनेक्ट हो गया`,BD=((e,n={})=>{const t=n.locale??z();return t==="zh-CN"?x2t(e):t==="fa"?w2t(e):t==="ar"?k2t(e):t==="es"?S2t(e):t==="hi"?C2t(e):y2t(e)}),E2t=e=>`Could not connect to ${e==null?void 0:e.host}`,N2t=e=>`无法连接到 ${e==null?void 0:e.host}`,z2t=e=>`اتصال به ${e==null?void 0:e.host} ممکن نشد`,j2t=e=>`تعذّر الاتصال بـ ${e==null?void 0:e.host}`,T2t=e=>`No se pudo conectar a ${e==null?void 0:e.host}`,A2t=e=>`${e==null?void 0:e.host} से कनेक्ट नहीं हो सका`,R2t=((e,n={})=>{const t=n.locale??z();return t==="zh-CN"?N2t(e):t==="fa"?z2t(e):t==="ar"?j2t(e):t==="es"?T2t(e):t==="hi"?A2t(e):E2t(e)}),M2t=()=>"Restart local OpenResearch and select this SSH host again. Work on the remote host continues.",O2t=()=>"请重新启动本地 OpenResearch 并再次选择此 SSH 主机。远程主机上的工作仍在继续。",D2t=()=>"OpenResearch محلی را دوباره راه‌اندازی کنید و این میزبان SSH را دوباره انتخاب کنید. کار روی میزبان راه‌دور ادامه دارد.",L2t=()=>"أعد تشغيل OpenResearch المحلي واختر مضيف SSH هذا مجددًا. يستمر العمل على المضيف البعيد.",I2t=()=>"Reinicia OpenResearch en local y vuelve a seleccionar este host SSH. El trabajo en el host remoto continúa.",$2t=()=>"लोकल OpenResearch फिर से शुरू करें और इस SSH होस्ट को फिर से चुनें। रिमोट होस्ट पर काम जारी रहता है।",B2t=((e={},n={})=>{const t=n.locale??z();return t==="zh-CN"?O2t():t==="fa"?D2t():t==="ar"?L2t():t==="es"?I2t():t==="hi"?$2t():M2t()}),P2t=()=>"OpenResearch agents have stopped. Submitted experiments may still be running.",F2t=()=>"OpenResearch 智能体已停止。已提交的实验可能仍在运行。",H2t=()=>"عامل‌های OpenResearch متوقف شده‌اند. آزمایش‌های ارسال‌شده ممکن است همچنان در حال اجرا باشند.",q2t=()=>"توقّف وكلاء OpenResearch. قد تظل التجارب المُرسَلة قيد التشغيل.",U2t=()=>"Los agentes de OpenResearch se han detenido. Puede que los experimentos enviados sigan en ejecución.",G2t=()=>"OpenResearch एजेंट रुक गए हैं। सबमिट किए गए प्रयोग अभी भी चल सकते हैं।",V2t=((e={},n={})=>{const t=n.locale??z();return t==="zh-CN"?F2t():t==="fa"?H2t():t==="ar"?q2t():t==="es"?U2t():t==="hi"?G2t():P2t()}),K2t=e=>`OpenResearch is not running on ${e==null?void 0:e.host}`,W2t=e=>`OpenResearch 未在 ${e==null?void 0:e.host} 上运行`,Q2t=e=>`OpenResearch روی ${e==null?void 0:e.host} در حال اجرا نیست`,X2t=e=>`‏OpenResearch لا يعمل على ${e==null?void 0:e.host}`,Y2t=e=>`OpenResearch no se está ejecutando en ${e==null?void 0:e.host}`,Z2t=e=>`${e==null?void 0:e.host} पर OpenResearch नहीं चल रहा`,J2t=((e,n={})=>{const t=n.locale??z();return t==="zh-CN"?W2t(e):t==="fa"?Q2t(e):t==="ar"?X2t(e):t==="es"?Y2t(e):t==="hi"?Z2t(e):K2t(e)}),ewt=()=>"OpenResearch binary",twt=()=>"OpenResearch 二进制文件",nwt=()=>"فایل اجرایی OpenResearch",rwt=()=>"الملف التنفيذي لـ OpenResearch",swt=()=>"Binario de OpenResearch",iwt=()=>"OpenResearch बाइनरी",awt=((e={},n={})=>{const t=n.locale??z();return t==="zh-CN"?twt():t==="fa"?nwt():t==="ar"?rwt():t==="es"?swt():t==="hi"?iwt():ewt()}),owt=()=>"OpenResearch Database",lwt=()=>"OpenResearch 数据库",cwt=()=>"پایگاه دادهٔ OpenResearch",uwt=()=>"قاعدة بيانات OpenResearch",_wt=()=>"Base de datos de OpenResearch",fwt=()=>"OpenResearch डेटाबेस",dwt=((e={},n={})=>{const t=n.locale??z();return t==="zh-CN"?lwt():t==="fa"?cwt():t==="ar"?uwt():t==="es"?_wt():t==="hi"?fwt():owt()}),hwt=()=>"OpenResearch will use these locations for your remote SSH user and does not require sudo.",pwt=()=>"OpenResearch 将为你的远程 SSH 用户使用以下位置,无需 sudo。",mwt=()=>"OpenResearch از این مسیرها برای کاربر SSH راه‌دور شما استفاده می‌کند و به sudo نیاز ندارد.",gwt=()=>"سيستخدم OpenResearch هذه المواقع لمستخدم SSH البعيد ولا يتطلب sudo.",vwt=()=>"OpenResearch usará estas ubicaciones para tu usuario SSH remoto y no necesita sudo.",bwt=()=>"OpenResearch आपके रिमोट SSH यूज़र के लिए इन स्थानों का इस्तेमाल करेगा और sudo की ज़रूरत नहीं है।",ywt=((e={},n={})=>{const t=n.locale??z();return t==="zh-CN"?pwt():t==="fa"?mwt():t==="ar"?gwt():t==="es"?vwt():t==="hi"?bwt():hwt()}),xwt=()=>"Install OpenResearch?",wwt=()=>"安装 OpenResearch?",kwt=()=>"OpenResearch نصب شود؟",Swt=()=>"تثبيت OpenResearch؟",Cwt=()=>"¿Instalar OpenResearch?",Ewt=()=>"OpenResearch इंस्टॉल करें?",Nwt=((e={},n={})=>{const t=n.locale??z();return t==="zh-CN"?wwt():t==="fa"?kwt():t==="ar"?Swt():t==="es"?Cwt():t==="hi"?Ewt():xwt()}),zwt=()=>"Installing…",jwt=()=>"正在安装…",Twt=()=>"در حال نصب…",Awt=()=>"جارٍ التثبيت…",Rwt=()=>"Instalando…",Mwt=()=>"इंस्टॉल हो रहा है…",Owt=((e={},n={})=>{const t=n.locale??z();return t==="zh-CN"?jwt():t==="fa"?Twt():t==="ar"?Awt():t==="es"?Rwt():t==="hi"?Mwt():zwt()}),Dwt=()=>"No matching SSH hosts",Lwt=()=>"没有匹配的 SSH 主机",Iwt=()=>"میزبان SSH منطبقی پیدا نشد",$wt=()=>"لا توجد مضيفات SSH مطابقة",Bwt=()=>"No hay hosts SSH que coincidan",Pwt=()=>"कोई मेल खाता SSH होस्ट नहीं",Fwt=((e={},n={})=>{const t=n.locale??z();return t==="zh-CN"?Lwt():t==="fa"?Iwt():t==="ar"?$wt():t==="es"?Bwt():t==="hi"?Pwt():Dwt()}),Hwt=e=>`OpenResearch is not installed for ${e==null?void 0:e.user} on ${e==null?void 0:e.host}. Install it now?`,qwt=e=>`${e==null?void 0:e.user} 尚未在 ${e==null?void 0:e.host} 上安装 OpenResearch。现在安装吗?`,Uwt=e=>`OpenResearch برای ${e==null?void 0:e.user} روی ${e==null?void 0:e.host} نصب نیست. اکنون نصب شود؟`,Gwt=e=>`‏OpenResearch غير مثبّت للمستخدم ${e==null?void 0:e.user} على ${e==null?void 0:e.host}. هل تريد تثبيته الآن؟`,Vwt=e=>`OpenResearch no está instalado para ${e==null?void 0:e.user} en ${e==null?void 0:e.host}. ¿Instalarlo ahora?`,Kwt=e=>`${e==null?void 0:e.host} पर ${e==null?void 0:e.user} के लिए OpenResearch इंस्टॉल नहीं है। अभी इंस्टॉल करें?`,Wwt=((e,n={})=>{const t=n.locale??z();return t==="zh-CN"?qwt(e):t==="fa"?Uwt(e):t==="ar"?Gwt(e):t==="es"?Vwt(e):t==="hi"?Kwt(e):Hwt(e)}),Qwt=()=>"Open remote",Xwt=()=>"打开远程工作区",Ywt=()=>"باز کردن راه‌دور",Zwt=()=>"فتح مساحة العمل البعيدة",Jwt=()=>"Abrir remoto",e4t=()=>"रिमोट खोलें",t4t=((e={},n={})=>{const t=n.locale??z();return t==="zh-CN"?Xwt():t==="fa"?Ywt():t==="ar"?Zwt():t==="es"?Jwt():t==="hi"?e4t():Qwt()}),n4t=()=>"Closing this tab or disconnecting leaves agents and experiments running. Approval requests remain pending for up to 55 minutes. A host restart or administrator policy may stop OpenResearch.",r4t=()=>"关闭此标签页或断开连接后,代理和实验仍会继续运行。审批请求最多保持待处理 55 分钟。主机重启或管理员策略可能会停止 OpenResearch。",s4t=()=>"بستن این زبانه یا قطع اتصال، عامل‌ها و آزمایش‌ها را در حال اجرا نگه می‌دارد. درخواست‌های تأیید تا ۵۵ دقیقه در انتظار می‌مانند. راه‌اندازی مجدد میزبان یا سیاست مدیر ممکن است OpenResearch را متوقف کند.",i4t=()=>"إغلاق هذا التبويب أو قطع الاتصال يُبقي الوكلاء والتجارب قيد التشغيل. تبقى طلبات الموافقة معلّقة لمدة تصل إلى 55 دقيقة. قد تتسبب إعادة تشغيل المضيف أو سياسة المسؤول في إيقاف OpenResearch.",a4t=()=>"Si cierras esta pestaña o te desconectas, los agentes y experimentos siguen en ejecución. Las solicitudes de aprobación quedan pendientes hasta 55 minutos. Un reinicio del host o una política del administrador pueden detener OpenResearch.",o4t=()=>"यह टैब बंद करने या डिस्कनेक्ट करने पर भी एजेंट और प्रयोग चलते रहते हैं। स्वीकृति अनुरोध 55 मिनट तक लंबित रहते हैं। होस्ट रीस्टार्ट या एडमिन नीति OpenResearch को रोक सकती है।",l4t=((e={},n={})=>{const t=n.locale??z();return t==="zh-CN"?r4t():t==="fa"?s4t():t==="ar"?i4t():t==="es"?a4t():t==="hi"?o4t():n4t()}),c4t=()=>"Your browser blocked the remote workspace tab. Allow pop-ups and try again.",u4t=()=>"浏览器阻止了远程工作区标签页。请允许弹出窗口后重试。",_4t=()=>"مرورگر زبانهٔ فضای کاری راه‌دور را مسدود کرد. پنجره‌های بازشو را مجاز کنید و دوباره تلاش کنید.",f4t=()=>"حجب متصفحك تبويب مساحة العمل البعيدة. اسمح بالنوافذ المنبثقة وحاول مجددًا.",d4t=()=>"Tu navegador bloqueó la pestaña del espacio de trabajo remoto. Permite las ventanas emergentes y vuelve a intentarlo.",h4t=()=>"आपके ब्राउज़र ने रिमोट वर्कस्पेस टैब को ब्लॉक कर दिया। पॉप-अप की अनुमति दें और फिर से कोशिश करें।",p4t=((e={},n={})=>{const t=n.locale??z();return t==="zh-CN"?u4t():t==="fa"?_4t():t==="ar"?f4t():t==="es"?d4t():t==="hi"?h4t():c4t()}),m4t=()=>"Preparing remote workspace…",g4t=()=>"正在准备远程工作区…",v4t=()=>"در حال آماده‌سازی فضای کاری راه‌دور…",b4t=()=>"جارٍ تحضير مساحة العمل البعيدة…",y4t=()=>"Preparando el espacio de trabajo remoto…",x4t=()=>"रिमोट वर्कस्पेस तैयार हो रहा है…",w4t=((e={},n={})=>{const t=n.locale??z();return t==="zh-CN"?g4t():t==="fa"?v4t():t==="ar"?b4t():t==="es"?y4t():t==="hi"?x4t():m4t()}),k4t=()=>"Reconnect",S4t=()=>"重新连接",C4t=()=>"اتصال دوباره",E4t=()=>"إعادة الاتصال",N4t=()=>"Reconectar",z4t=()=>"फिर से कनेक्ट करें",tz=((e={},n={})=>{const t=n.locale??z();return t==="zh-CN"?S4t():t==="fa"?C4t():t==="ar"?E4t():t==="es"?N4t():t==="hi"?z4t():k4t()}),j4t=()=>"The connection dropped. Your remote work remains running while OpenResearch reconnects.",T4t=()=>"连接已中断。OpenResearch 重新连接期间,你的远程工作仍会继续运行。",A4t=()=>"اتصال قطع شد. هنگام اتصال دوبارهٔ OpenResearch، کار راه‌دور شما همچنان اجرا می‌شود.",R4t=()=>"انقطع الاتصال. يبقى عملك البعيد قيد التشغيل بينما يعيد OpenResearch الاتصال.",M4t=()=>"Se perdió la conexión. Tu trabajo remoto sigue en ejecución mientras OpenResearch se reconecta.",O4t=()=>"कनेक्शन टूट गया। OpenResearch के फिर से कनेक्ट होने के दौरान आपका रिमोट काम चलता रहता है।",D4t=((e={},n={})=>{const t=n.locale??z();return t==="zh-CN"?T4t():t==="fa"?A4t():t==="ar"?R4t():t==="es"?M4t():t==="hi"?O4t():j4t()}),L4t=e=>`Reconnecting to ${e==null?void 0:e.host}`,I4t=e=>`正在重新连接到 ${e==null?void 0:e.host}`,$4t=e=>`در حال اتصال دوباره به ${e==null?void 0:e.host}`,B4t=e=>`جارٍ إعادة الاتصال بـ ${e==null?void 0:e.host}`,P4t=e=>`Reconectando a ${e==null?void 0:e.host}`,F4t=e=>`${e==null?void 0:e.host} से फिर से कनेक्ट हो रहा है`,H4t=((e,n={})=>{const t=n.locale??z();return t==="zh-CN"?I4t(e):t==="fa"?$4t(e):t==="ar"?B4t(e):t==="es"?P4t(e):t==="hi"?F4t(e):L4t(e)}),q4t=()=>"Search SSH hosts",U4t=()=>"搜索 SSH 主机",G4t=()=>"جستجوی میزبان‌های SSH",V4t=()=>"البحث في مضيفات SSH",K4t=()=>"Buscar hosts SSH",W4t=()=>"SSH होस्ट खोजें",nz=((e={},n={})=>{const t=n.locale??z();return t==="zh-CN"?U4t():t==="fa"?G4t():t==="ar"?V4t():t==="es"?K4t():t==="hi"?W4t():q4t()}),Q4t=e=>`SSH: ${e==null?void 0:e.host}`,X4t=e=>`SSH:${e==null?void 0:e.host}`,Y4t=e=>`SSH: ${e==null?void 0:e.host}`,Z4t=e=>`SSH: ${e==null?void 0:e.host}`,J4t=e=>`SSH: ${e==null?void 0:e.host}`,e3t=e=>`SSH: ${e==null?void 0:e.host}`,K2=((e,n={})=>{const t=n.locale??z();return t==="zh-CN"?X4t(e):t==="fa"?Y4t(e):t==="ar"?Z4t(e):t==="es"?J4t(e):t==="hi"?e3t(e):Q4t(e)}),t3t=()=>"Start a new OpenResearch host",n3t=()=>"启动新的 OpenResearch 主机",r3t=()=>"راه‌اندازی میزبان جدید OpenResearch",s3t=()=>"بدء مضيف OpenResearch جديد",i3t=()=>"Iniciar un nuevo host de OpenResearch",a3t=()=>"एक नया OpenResearch होस्ट शुरू करें",o3t=((e={},n={})=>{const t=n.locale??z();return t==="zh-CN"?n3t():t==="fa"?r3t():t==="ar"?s3t():t==="es"?i3t():t==="hi"?a3t():t3t()}),l3t=e=>`End ${e==null?void 0:e.count} pending approvals.`,c3t=e=>`结束 ${e==null?void 0:e.count} 个待审批请求。`,u3t=e=>`${e==null?void 0:e.count} تأیید در انتظار را پایان می‌دهد.`,_3t=e=>`إنهاء طلبات الموافقة المعلّقة (${e==null?void 0:e.count}).`,f3t=e=>`Cancelará ${e==null?void 0:e.count} aprobaciones pendientes.`,d3t=e=>`${e==null?void 0:e.count} लंबित स्वीकृतियाँ खत्म होंगी।`,h3t=((e,n={})=>{const t=n.locale??z();return t==="zh-CN"?c3t(e):t==="fa"?u3t(e):t==="ar"?_3t(e):t==="es"?f3t(e):t==="hi"?d3t(e):l3t(e)}),p3t=()=>"Stop OpenResearch",m3t=()=>"停止 OpenResearch",g3t=()=>"توقف OpenResearch",v3t=()=>"إيقاف OpenResearch",b3t=()=>"Detener OpenResearch",y3t=()=>"OpenResearch रोकें",x3t=((e={},n={})=>{const t=n.locale??z();return t==="zh-CN"?m3t():t==="fa"?g3t():t==="ar"?v3t():t==="es"?b3t():t==="hi"?y3t():p3t()}),w3t=e=>`Stop OpenResearch on ${e==null?void 0:e.host}?`,k3t=e=>`停止 ${e==null?void 0:e.host} 上的 OpenResearch?`,S3t=e=>`OpenResearch روی ${e==null?void 0:e.host} متوقف شود؟`,C3t=e=>`إيقاف OpenResearch على ${e==null?void 0:e.host}؟`,E3t=e=>`¿Detener OpenResearch en ${e==null?void 0:e.host}?`,N3t=e=>`${e==null?void 0:e.host} पर OpenResearch रोकें?`,z3t=((e,n={})=>{const t=n.locale??z();return t==="zh-CN"?k3t(e):t==="fa"?S3t(e):t==="ar"?C3t(e):t==="es"?E3t(e):t==="hi"?N3t(e):w3t(e)}),j3t=e=>`Leave ${e==null?void 0:e.count} submitted experiments running.`,T3t=e=>`让 ${e==null?void 0:e.count} 个已提交实验继续运行。`,A3t=e=>`${e==null?void 0:e.count} آزمایش ارسال‌شده را در حال اجرا نگه می‌دارد.`,R3t=e=>`إبقاء التجارب المُرسَلة قيد التشغيل (${e==null?void 0:e.count}).`,M3t=e=>`Dejará ${e==null?void 0:e.count} experimentos enviados en ejecución.`,O3t=e=>`${e==null?void 0:e.count} सबमिट किए गए प्रयोग चलते रहेंगे।`,D3t=((e,n={})=>{const t=n.locale??z();return t==="zh-CN"?T3t(e):t==="fa"?A3t(e):t==="ar"?R3t(e):t==="es"?M3t(e):t==="hi"?O3t(e):j3t(e)}),L3t=()=>"Stop OpenResearch on host",I3t=()=>"停止主机上的 OpenResearch",$3t=()=>"توقف OpenResearch روی میزبان",B3t=()=>"إيقاف OpenResearch على المضيف",P3t=()=>"Detener OpenResearch en el host",F3t=()=>"होस्ट पर OpenResearch रोकें",PD=((e={},n={})=>{const t=n.locale??z();return t==="zh-CN"?I3t():t==="fa"?$3t():t==="ar"?B3t():t==="es"?P3t():t==="hi"?F3t():L3t()}),H3t=()=>"This will also:",q3t=()=>"这还将:",U3t=()=>"این کار همچنین:",G3t=()=>"سيؤدي هذا أيضًا إلى:",V3t=()=>"Esto también:",K3t=()=>"इससे यह भी होगा:",W3t=((e={},n={})=>{const t=n.locale??z();return t==="zh-CN"?q3t():t==="fa"?U3t():t==="ar"?G3t():t==="es"?V3t():t==="hi"?K3t():H3t()}),Q3t=()=>"End 1 pending approval.",X3t=()=>"结束 1 个待审批请求。",Y3t=()=>"۱ تأیید در انتظار را پایان می‌دهد.",Z3t=()=>"إنهاء طلب موافقة معلّق واحد.",J3t=()=>"Cancelará 1 aprobación pendiente.",e5t=()=>"1 लंबित स्वीकृति खत्म होगी।",t5t=((e={},n={})=>{const t=n.locale??z();return t==="zh-CN"?X3t():t==="fa"?Y3t():t==="ar"?Z3t():t==="es"?J3t():t==="hi"?e5t():Q3t()}),n5t=()=>"Leave 1 submitted experiment running.",r5t=()=>"让 1 个已提交实验继续运行。",s5t=()=>"۱ آزمایش ارسال‌شده را در حال اجرا نگه می‌دارد.",i5t=()=>"ترك تجربة مُرسَلة واحدة قيد التشغيل.",a5t=()=>"Dejará 1 experimento enviado en ejecución.",o5t=()=>"1 सबमिट किया गया प्रयोग चलता रहेगा।",l5t=((e={},n={})=>{const t=n.locale??z();return t==="zh-CN"?r5t():t==="fa"?s5t():t==="ar"?i5t():t==="es"?a5t():t==="hi"?o5t():n5t()}),c5t=()=>"Disconnect 1 other client.",u5t=()=>"断开 1 个其他客户端。",_5t=()=>"اتصال ۱ کارخواه دیگر را قطع می‌کند.",f5t=()=>"قطع اتصال عميل آخر واحد.",d5t=()=>"Desconectará a otro cliente.",h5t=()=>"1 अन्य क्लाइंट डिस्कनेक्ट होगा।",p5t=((e={},n={})=>{const t=n.locale??z();return t==="zh-CN"?u5t():t==="fa"?_5t():t==="ar"?f5t():t==="es"?d5t():t==="hi"?h5t():c5t()}),m5t=()=>"Keep 1 queued message saved.",g5t=()=>"保留 1 条排队消息。",v5t=()=>"۱ پیام در صف را ذخیره نگه می‌دارد.",b5t=()=>"إبقاء رسالة واحدة محفوظة في قائمة الانتظار.",y5t=()=>"Conservará 1 mensaje en cola.",x5t=()=>"1 कतार में लगा संदेश सुरक्षित रहेगा।",w5t=((e={},n={})=>{const t=n.locale??z();return t==="zh-CN"?g5t():t==="fa"?v5t():t==="ar"?b5t():t==="es"?y5t():t==="hi"?x5t():m5t()}),k5t=()=>"Interrupt 1 active agent turn.",S5t=()=>"中断 1 个活动代理任务。",C5t=()=>"۱ نوبت فعال عامل را قطع می‌کند.",E5t=()=>"مقاطعة جولة وكيل نشطة واحدة.",N5t=()=>"Interrumpirá 1 turno activo de un agente.",z5t=()=>"1 सक्रिय एजेंट टर्न बाधित होगा।",j5t=((e={},n={})=>{const t=n.locale??z();return t==="zh-CN"?S5t():t==="fa"?C5t():t==="ar"?E5t():t==="es"?N5t():t==="hi"?z5t():k5t()}),T5t=e=>`Disconnect ${e==null?void 0:e.count} other clients.`,A5t=e=>`断开 ${e==null?void 0:e.count} 个其他客户端。`,R5t=e=>`اتصال ${e==null?void 0:e.count} کارخواه دیگر را قطع می‌کند.`,M5t=e=>`قطع اتصال العملاء الآخرين (${e==null?void 0:e.count}).`,O5t=e=>`Desconectará otros ${e==null?void 0:e.count} clientes.`,D5t=e=>`${e==null?void 0:e.count} अन्य क्लाइंट डिस्कनेक्ट होंगे।`,L5t=((e,n={})=>{const t=n.locale??z();return t==="zh-CN"?A5t(e):t==="fa"?R5t(e):t==="ar"?M5t(e):t==="es"?O5t(e):t==="hi"?D5t(e):T5t(e)}),I5t=e=>`Keep ${e==null?void 0:e.count} queued messages saved.`,$5t=e=>`保留 ${e==null?void 0:e.count} 条排队消息。`,B5t=e=>`${e==null?void 0:e.count} پیام در صف را ذخیره نگه می‌دارد.`,P5t=e=>`إبقاء الرسائل في قائمة الانتظار محفوظة (${e==null?void 0:e.count}).`,F5t=e=>`Conservará ${e==null?void 0:e.count} mensajes en cola.`,H5t=e=>`${e==null?void 0:e.count} कतार में लगे संदेश सुरक्षित रहेंगे।`,q5t=((e,n={})=>{const t=n.locale??z();return t==="zh-CN"?$5t(e):t==="fa"?B5t(e):t==="ar"?P5t(e):t==="es"?F5t(e):t==="hi"?H5t(e):I5t(e)}),U5t=e=>`Interrupt ${e==null?void 0:e.count} active agent turns.`,G5t=e=>`中断 ${e==null?void 0:e.count} 个活动代理任务。`,V5t=e=>`${e==null?void 0:e.count} نوبت فعال عامل را قطع می‌کند.`,K5t=e=>`مقاطعة جولات الوكلاء النشطة (${e==null?void 0:e.count}).`,W5t=e=>`Interrumpirá ${e==null?void 0:e.count} turnos activos de agentes.`,Q5t=e=>`${e==null?void 0:e.count} सक्रिय एजेंट टर्न बाधित होंगे।`,X5t=((e,n={})=>{const t=n.locale??z();return t==="zh-CN"?G5t(e):t==="fa"?V5t(e):t==="ar"?K5t(e):t==="es"?W5t(e):t==="hi"?Q5t(e):U5t(e)}),Y5t=()=>"Stopping host…",Z5t=()=>"正在停止主机…",J5t=()=>"در حال توقف میزبان…",ekt=()=>"جارٍ إيقاف المضيف…",tkt=()=>"Deteniendo el host…",nkt=()=>"होस्ट रोका जा रहा है…",rkt=((e={},n={})=>{const t=n.locale??z();return t==="zh-CN"?Z5t():t==="fa"?J5t():t==="ar"?ekt():t==="es"?tkt():t==="hi"?nkt():Y5t()}),skt=()=>"Update",ikt=()=>"更新",akt=()=>"به‌روزرسانی",okt=()=>"تحديث",lkt=()=>"Actualizar",ckt=()=>"अपडेट करें",rz=((e={},n={})=>{const t=n.locale??z();return t==="zh-CN"?ikt():t==="fa"?akt():t==="ar"?okt():t==="es"?lkt():t==="hi"?ckt():skt()}),ukt=e=>`The OpenResearch installation on ${e==null?void 0:e.host} is not compatible with this dashboard. Update it now?`,_kt=e=>`${e==null?void 0:e.host} 上的 OpenResearch 与此仪表板不兼容。现在更新吗?`,fkt=e=>`نسخهٔ OpenResearch روی ${e==null?void 0:e.host} با این داشبورد سازگار نیست. اکنون به‌روزرسانی شود؟`,dkt=e=>`نسخة OpenResearch المثبّتة على ${e==null?void 0:e.host} غير متوافقة مع هذه اللوحة. هل تريد تحديثها الآن؟`,hkt=e=>`La instalación de OpenResearch en ${e==null?void 0:e.host} no es compatible con este dashboard. ¿Actualizarla ahora?`,pkt=e=>`${e==null?void 0:e.host} पर OpenResearch इंस्टॉलेशन इस डैशबोर्ड के साथ संगत नहीं है। अभी अपडेट करें?`,mkt=((e,n={})=>{const t=n.locale??z();return t==="zh-CN"?_kt(e):t==="fa"?fkt(e):t==="ar"?dkt(e):t==="es"?hkt(e):t==="hi"?pkt(e):ukt(e)}),gkt=()=>"Update OpenResearch?",vkt=()=>"更新 OpenResearch?",bkt=()=>"OpenResearch به‌روزرسانی شود؟",ykt=()=>"تحديث OpenResearch؟",xkt=()=>"¿Actualizar OpenResearch?",wkt=()=>"OpenResearch अपडेट करें?",kkt=((e={},n={})=>{const t=n.locale??z();return t==="zh-CN"?vkt():t==="fa"?bkt():t==="ar"?ykt():t==="es"?xkt():t==="hi"?wkt():gkt()}),Skt=()=>"Updating…",Ckt=()=>"正在更新…",Ekt=()=>"در حال به‌روزرسانی…",Nkt=()=>"جارٍ التحديث…",zkt=()=>"Actualizando…",jkt=()=>"अपडेट हो रहा है…",Tkt=((e={},n={})=>{const t=n.locale??z();return t==="zh-CN"?Ckt():t==="fa"?Ekt():t==="ar"?Nkt():t==="es"?zkt():t==="hi"?jkt():Skt()}),Akt=()=>"Disable syncing",Rkt=()=>"关闭同步",Mkt=()=>"غیرفعال کردن همگام‌سازی",Okt=()=>"تعطيل المزامنة",Dkt=()=>"Desactivar sincronización",Lkt=()=>"सिंकिंग बंद करें",Ikt=((e={},n={})=>{const t=n.locale??z();return t==="zh-CN"?Rkt():t==="fa"?Mkt():t==="ar"?Okt():t==="es"?Dkt():t==="hi"?Lkt():Akt()}),$kt=()=>"Enable GitHub syncing",Bkt=()=>"启用 GitHub 同步",Pkt=()=>"فعال‌سازی همگام‌سازی GitHub",Fkt=()=>"تفعيل مزامنة GitHub",Hkt=()=>"Activar sincronización con GitHub",qkt=()=>"GitHub सिंकिंग चालू करें",Ukt=((e={},n={})=>{const t=n.locale??z();return t==="zh-CN"?Bkt():t==="fa"?Pkt():t==="ar"?Fkt():t==="es"?Hkt():t==="hi"?qkt():$kt()}),Gkt=()=>"Enabling…",Vkt=()=>"正在启用…",Kkt=()=>"در حال فعال‌سازی…",Wkt=()=>"جارٍ التفعيل…",Qkt=()=>"Activando…",Xkt=()=>"चालू हो रहा है…",Ykt=((e={},n={})=>{const t=n.locale??z();return t==="zh-CN"?Vkt():t==="fa"?Kkt():t==="ar"?Wkt():t==="es"?Qkt():t==="hi"?Xkt():Gkt()}),Zkt=()=>"Updating…",Jkt=()=>"正在更新…",eSt=()=>"در حال به‌روزرسانی…",tSt=()=>"جارٍ التحديث…",nSt=()=>"Actualizando…",rSt=()=>"अपडेट हो रहा है…",sSt=((e={},n={})=>{const t=n.locale??z();return t==="zh-CN"?Jkt():t==="fa"?eSt():t==="ar"?tSt():t==="es"?nSt():t==="hi"?rSt():Zkt()}),iSt=e=>`Retrying · attempt ${e==null?void 0:e.attempt}`,aSt=e=>`正在重试 · 第 ${e==null?void 0:e.attempt} 次`,oSt=e=>`در حال تلاش دوباره · تلاش ${e==null?void 0:e.attempt}`,lSt=e=>`إعادة المحاولة · المحاولة ${e==null?void 0:e.attempt}`,cSt=e=>`Reintentando · intento ${e==null?void 0:e.attempt}`,uSt=e=>`फिर से कोशिश · प्रयास ${e==null?void 0:e.attempt}`,_St=((e,n={})=>{const t=n.locale??z();return t==="zh-CN"?aSt(e):t==="fa"?oSt(e):t==="ar"?lSt(e):t==="es"?cSt(e):t==="hi"?uSt(e):iSt(e)}),fSt=e=>`Retrying · attempt ${e==null?void 0:e.attempt}/${e==null?void 0:e.maximum}`,dSt=e=>`正在重试 · 第 ${e==null?void 0:e.attempt}/${e==null?void 0:e.maximum} 次`,hSt=e=>`در حال تلاش دوباره · تلاش ${e==null?void 0:e.attempt} از ${e==null?void 0:e.maximum}`,pSt=e=>`إعادة المحاولة · المحاولة ${e==null?void 0:e.attempt}/${e==null?void 0:e.maximum}`,mSt=e=>`Reintentando · intento ${e==null?void 0:e.attempt}/${e==null?void 0:e.maximum}`,gSt=e=>`फिर से कोशिश · प्रयास ${e==null?void 0:e.attempt}/${e==null?void 0:e.maximum}`,vSt=((e,n={})=>{const t=n.locale??z();return t==="zh-CN"?dSt(e):t==="fa"?hSt(e):t==="ar"?pSt(e):t==="es"?mSt(e):t==="hi"?gSt(e):fSt(e)}),bSt=e=>`Retrying · attempt ${e==null?void 0:e.attempt}/${e==null?void 0:e.maximum} · next attempt in ${e==null?void 0:e.seconds}s`,ySt=e=>`正在重试 · 第 ${e==null?void 0:e.attempt}/${e==null?void 0:e.maximum} 次 · ${e==null?void 0:e.seconds} 秒后再次尝试`,xSt=e=>`در حال تلاش دوباره · تلاش ${e==null?void 0:e.attempt} از ${e==null?void 0:e.maximum} · تلاش بعدی تا ${e==null?void 0:e.seconds} ثانیه`,wSt=e=>`إعادة المحاولة · المحاولة ${e==null?void 0:e.attempt}/${e==null?void 0:e.maximum} · المحاولة التالية بعد ${e==null?void 0:e.seconds}ث`,kSt=e=>`Reintentando · intento ${e==null?void 0:e.attempt}/${e==null?void 0:e.maximum} · siguiente intento en ${e==null?void 0:e.seconds} s`,SSt=e=>`फिर से कोशिश · प्रयास ${e==null?void 0:e.attempt}/${e==null?void 0:e.maximum} · अगला प्रयास ${e==null?void 0:e.seconds}से में`,CSt=((e,n={})=>{const t=n.locale??z();return t==="zh-CN"?ySt(e):t==="fa"?xSt(e):t==="ar"?wSt(e):t==="es"?kSt(e):t==="hi"?SSt(e):bSt(e)}),ESt=e=>`Retrying · attempt ${e==null?void 0:e.attempt} · next attempt in ${e==null?void 0:e.seconds}s`,NSt=e=>`正在重试 · 第 ${e==null?void 0:e.attempt} 次 · ${e==null?void 0:e.seconds} 秒后再次尝试`,zSt=e=>`در حال تلاش دوباره · تلاش ${e==null?void 0:e.attempt} · تلاش بعدی تا ${e==null?void 0:e.seconds} ثانیه`,jSt=e=>`إعادة المحاولة · المحاولة ${e==null?void 0:e.attempt} · المحاولة التالية بعد ${e==null?void 0:e.seconds}ث`,TSt=e=>`Reintentando · intento ${e==null?void 0:e.attempt} · siguiente intento en ${e==null?void 0:e.seconds} s`,ASt=e=>`फिर से कोशिश · प्रयास ${e==null?void 0:e.attempt} · अगला प्रयास ${e==null?void 0:e.seconds}से में`,RSt=((e,n={})=>{const t=n.locale??z();return t==="zh-CN"?NSt(e):t==="fa"?zSt(e):t==="ar"?jSt(e):t==="es"?TSt(e):t==="hi"?ASt(e):ESt(e)}),MSt=()=>"CLI is retrying…",OSt=()=>"CLI 正在重试…",DSt=()=>"CLI در حال تلاش دوباره است…",LSt=()=>"تعيد واجهة سطر الأوامر المحاولة…",ISt=()=>"La CLI está reintentando…",$St=()=>"CLI फिर से कोशिश कर रहा है…",BSt=((e={},n={})=>{const t=n.locale??z();return t==="zh-CN"?OSt():t==="fa"?DSt():t==="ar"?LSt():t==="es"?ISt():t==="hi"?$St():MSt()}),PSt=e=>`Retrying · next attempt in ${e==null?void 0:e.seconds}s`,FSt=e=>`正在重试 · ${e==null?void 0:e.seconds} 秒后再次尝试`,HSt=e=>`در حال تلاش دوباره · تلاش بعدی تا ${e==null?void 0:e.seconds} ثانیه`,qSt=e=>`إعادة المحاولة · المحاولة التالية بعد ${e==null?void 0:e.seconds}ث`,USt=e=>`Reintentando · siguiente intento en ${e==null?void 0:e.seconds} s`,GSt=e=>`फिर से कोशिश · अगला प्रयास ${e==null?void 0:e.seconds}से में`,VSt=((e,n={})=>{const t=n.locale??z();return t==="zh-CN"?FSt(e):t==="fa"?HSt(e):t==="ar"?qSt(e):t==="es"?USt(e):t==="hi"?GSt(e):PSt(e)}),KSt=()=>"Sending again…",WSt=()=>"正在重新发送…",QSt=()=>"در حال ارسال دوباره…",XSt=()=>"جارٍ إعادة الإرسال…",YSt=()=>"Reenviando…",ZSt=()=>"फिर से भेजा जा रहा है…",JSt=((e={},n={})=>{const t=n.locale??z();return t==="zh-CN"?WSt():t==="fa"?QSt():t==="ar"?XSt():t==="es"?YSt():t==="hi"?ZSt():KSt()}),e6t=e=>`Sending again in ${e==null?void 0:e.seconds}s…`,t6t=e=>`将在 ${e==null?void 0:e.seconds} 秒后重新发送…`,n6t=e=>`ارسال دوباره تا ${e==null?void 0:e.seconds} ثانیه…`,r6t=e=>`إعادة الإرسال بعد ${e==null?void 0:e.seconds}ث…`,s6t=e=>`Reenviando en ${e==null?void 0:e.seconds} s…`,i6t=e=>`${e==null?void 0:e.seconds}से में फिर से भेजा जाएगा…`,a6t=((e,n={})=>{const t=n.locale??z();return t==="zh-CN"?t6t(e):t==="fa"?n6t(e):t==="ar"?r6t(e):t==="es"?s6t(e):t==="hi"?i6t(e):e6t(e)}),o6t=()=>"Retrying…",l6t=()=>"正在重试…",c6t=()=>"در حال تلاش دوباره…",u6t=()=>"جارٍ إعادة المحاولة…",_6t=()=>"Reintentando…",f6t=()=>"फिर से कोशिश हो रही है…",FD=((e={},n={})=>{const t=n.locale??z();return t==="zh-CN"?l6t():t==="fa"?c6t():t==="ar"?u6t():t==="es"?_6t():t==="hi"?f6t():o6t()}),d6t=()=>"Default speed",h6t=()=>"默认速度",p6t=()=>"سرعت پیش‌فرض",m6t=()=>"السرعة الافتراضية",g6t=()=>"Velocidad predeterminada",v6t=()=>"डिफ़ॉल्ट गति",b6t=((e={},n={})=>{const t=n.locale??z();return t==="zh-CN"?h6t():t==="fa"?p6t():t==="ar"?m6t():t==="es"?g6t():t==="hi"?v6t():d6t()}),y6t=()=>"Standard",x6t=()=>"标准",w6t=()=>"استاندارد",k6t=()=>"قياسي",S6t=()=>"Estándar",C6t=()=>"स्टैंडर्ड",E6t=((e={},n={})=>{const t=n.locale??z();return t==="zh-CN"?x6t():t==="fa"?w6t():t==="ar"?k6t():t==="es"?S6t():t==="hi"?C6t():y6t()}),N6t=e=>` Add ${e==null?void 0:e.directory} to your PATH to use it.`,z6t=e=>` 请将 ${e==null?void 0:e.directory} 添加到 PATH 后使用。`,j6t=e=>` برای استفاده، ${e==null?void 0:e.directory} را به PATH اضافه کنید.`,T6t=e=>` أضِف ${e==null?void 0:e.directory} إلى PATH لاستخدامه.`,A6t=e=>` Añade ${e==null?void 0:e.directory} a tu PATH para usarlo.`,R6t=e=>` इसे इस्तेमाल करने के लिए ${e==null?void 0:e.directory} को अपने PATH में जोड़ें।`,M6t=((e,n={})=>{const t=n.locale??z();return t==="zh-CN"?z6t(e):t==="fa"?j6t(e):t==="ar"?T6t(e):t==="es"?A6t(e):t==="hi"?R6t(e):N6t(e)}),O6t=()=>"Appearance",D6t=()=>"外观",L6t=()=>"ظاهر",I6t=()=>"المظهر",$6t=()=>"Apariencia",B6t=()=>"रूप-रंग",P6t=((e={},n={})=>{const t=n.locale??z();return t==="zh-CN"?D6t():t==="fa"?L6t():t==="ar"?I6t():t==="es"?$6t():t==="hi"?B6t():O6t()}),F6t=()=>"Check",H6t=()=>"检查",q6t=()=>"بررسی",U6t=()=>"فحص",G6t=()=>"Comprobar",V6t=()=>"जाँचें",K6t=((e={},n={})=>{const t=n.locale??z();return t==="zh-CN"?H6t():t==="fa"?q6t():t==="ar"?U6t():t==="es"?G6t():t==="hi"?V6t():F6t()}),W6t=()=>"Check again",Q6t=()=>"再次检查",X6t=()=>"بررسی دوباره",Y6t=()=>"تحقق مجددًا",Z6t=()=>"Volver a comprobar",J6t=()=>"फिर से जाँचें",cm=((e={},n={})=>{const t=n.locale??z();return t==="zh-CN"?Q6t():t==="fa"?X6t():t==="ar"?Y6t():t==="es"?Z6t():t==="hi"?J6t():W6t()}),e7t=()=>"Check for updates",t7t=()=>"检查更新",n7t=()=>"بررسی به‌روزرسانی",r7t=()=>"التحقق من التحديثات",s7t=()=>"Buscar actualizaciones",i7t=()=>"अपडेट के लिए जाँचें",a7t=((e={},n={})=>{const t=n.locale??z();return t==="zh-CN"?t7t():t==="fa"?n7t():t==="ar"?r7t():t==="es"?s7t():t==="hi"?i7t():e7t()}),o7t=()=>"Check now",l7t=()=>"立即检查",c7t=()=>"اکنون بررسی کن",u7t=()=>"التحقق الآن",_7t=()=>"Comprobar ahora",f7t=()=>"अभी जाँचें",d7t=((e={},n={})=>{const t=n.locale??z();return t==="zh-CN"?l7t():t==="fa"?c7t():t==="ar"?u7t():t==="es"?_7t():t==="hi"?f7t():o7t()}),h7t=()=>"Check setup",p7t=()=>"检查设置",m7t=()=>"بررسی راه‌اندازی",g7t=()=>"فحص الإعداد",v7t=()=>"Comprobar configuración",b7t=()=>"सेटअप जाँचें",y7t=((e={},n={})=>{const t=n.locale??z();return t==="zh-CN"?p7t():t==="fa"?m7t():t==="ar"?g7t():t==="es"?v7t():t==="hi"?b7t():h7t()}),x7t=()=>"orx checks a few times a day on its own.",w7t=()=>"orx 每天会自动检查几次。",k7t=()=>"orx روزی چند بار خودکار بررسی می‌کند.",S7t=()=>"يتحقق orx بضع مرات يوميًا تلقائيًا.",C7t=()=>"orx lo comprueba por sí solo varias veces al día.",E7t=()=>"orx खुद दिन में कुछ बार जाँच करता है।",N7t=((e={},n={})=>{const t=n.locale??z();return t==="zh-CN"?w7t():t==="fa"?k7t():t==="ar"?S7t():t==="es"?C7t():t==="hi"?E7t():x7t()}),z7t=()=>"Choose a flavor",j7t=()=>"选择配置",T7t=()=>"انتخاب پیکربندی",A7t=()=>"اختر تكوين الموارد",R7t=()=>"Elige una opción",M7t=()=>"एक फ़्लेवर चुनें",O7t=((e={},n={})=>{const t=n.locale??z();return t==="zh-CN"?j7t():t==="fa"?T7t():t==="ar"?A7t():t==="es"?R7t():t==="hi"?M7t():z7t()}),D7t=e=>`Choose a flavor to use ${e==null?void 0:e.destination} for new runs.`,L7t=e=>`请选择一个配置,以便新运行使用${e==null?void 0:e.destination}。`,I7t=e=>`برای اجرای کارهای جدید روی ${e==null?void 0:e.destination} یک پیکربندی انتخاب کنید.`,$7t=e=>`اختر تكوين الموارد لاستخدام ${e==null?void 0:e.destination} في عمليات التشغيل الجديدة.`,B7t=e=>`Elige una opción para usar ${e==null?void 0:e.destination} en las nuevas ejecuciones.`,P7t=e=>`नए रन के लिए ${e==null?void 0:e.destination} इस्तेमाल करने के लिए एक फ़्लेवर चुनें।`,F7t=((e,n={})=>{const t=n.locale??z();return t==="zh-CN"?L7t(e):t==="fa"?I7t(e):t==="ar"?$7t(e):t==="es"?B7t(e):t==="hi"?P7t(e):D7t(e)}),H7t=()=>"clean",q7t=()=>"无更改",U7t=()=>"بدون تغییر",G7t=()=>"نظيف",V7t=()=>"sin cambios",K7t=()=>"साफ़",W7t=((e={},n={})=>{const t=n.locale??z();return t==="zh-CN"?q7t():t==="fa"?U7t():t==="ar"?G7t():t==="es"?V7t():t==="hi"?K7t():H7t()}),Q7t=e=>`Already linked at ${e==null?void 0:e.link}.`,X7t=e=>`已链接到 ${e==null?void 0:e.link}。`,Y7t=e=>`از قبل در ${e==null?void 0:e.link} پیوند شده است.`,Z7t=e=>`مرتبط بالفعل في ${e==null?void 0:e.link}.`,J7t=e=>`Ya está enlazado en ${e==null?void 0:e.link}.`,eCt=e=>`पहले से ${e==null?void 0:e.link} पर लिंक है।`,tCt=((e,n={})=>{const t=n.locale??z();return t==="zh-CN"?X7t(e):t==="fa"?Y7t(e):t==="ar"?Z7t(e):t==="es"?J7t(e):t==="hi"?eCt(e):Q7t(e)}),nCt=e=>`Linked ${e==null?void 0:e.link}.`,rCt=e=>`已链接 ${e==null?void 0:e.link}。`,sCt=e=>`${e==null?void 0:e.link} پیوند شد.`,iCt=e=>`تم إنشاء الرابط ${e==null?void 0:e.link}.`,aCt=e=>`Enlazado en ${e==null?void 0:e.link}.`,oCt=e=>`${e==null?void 0:e.link} लिंक किया गया।`,lCt=((e,n={})=>{const t=n.locale??z();return t==="zh-CN"?rCt(e):t==="fa"?sCt(e):t==="ar"?iCt(e):t==="es"?aCt(e):t==="hi"?oCt(e):nCt(e)}),cCt=()=>"Close terminal",uCt=()=>"关闭终端",_Ct=()=>"بستن ترمینال",fCt=()=>"إغلاق الطرفية",dCt=()=>"Cerrar la terminal",hCt=()=>"टर्मिनल बंद करें",sz=((e={},n={})=>{const t=n.locale??z();return t==="zh-CN"?uCt():t==="fa"?_Ct():t==="ar"?fCt():t==="es"?dCt():t==="hi"?hCt():cCt()}),pCt=()=>"Terminal closed",mCt=()=>"终端已关闭",gCt=()=>"ترمینال بسته شد",vCt=()=>"أُغلقت الطرفية",bCt=()=>"Terminal cerrada",yCt=()=>"टर्मिनल बंद हो गया",xCt=((e={},n={})=>{const t=n.locale??z();return t==="zh-CN"?mCt():t==="fa"?gCt():t==="ar"?vCt():t==="es"?bCt():t==="hi"?yCt():pCt()}),wCt=()=>"Finished",kCt=()=>"已完成",SCt=()=>"انجام شد",CCt=()=>"اكتمل",ECt=()=>"Finalizado",NCt=()=>"पूर्ण",zCt=((e={},n={})=>{const t=n.locale??z();return t==="zh-CN"?kCt():t==="fa"?SCt():t==="ar"?CCt():t==="es"?ECt():t==="hi"?NCt():wCt()}),jCt=()=>"Command failed",TCt=()=>"命令失败",ACt=()=>"دستور ناموفق بود",RCt=()=>"فشل الأمر",MCt=()=>"El comando falló",OCt=()=>"कमांड विफल रही",DCt=((e={},n={})=>{const t=n.locale??z();return t==="zh-CN"?TCt():t==="fa"?ACt():t==="ar"?RCt():t==="es"?MCt():t==="hi"?OCt():jCt()}),LCt=()=>"Running…",ICt=()=>"运行中…",$Ct=()=>"در حال اجرا…",BCt=()=>"قيد التشغيل…",PCt=()=>"Ejecutando…",FCt=()=>"चल रहा है…",HCt=((e={},n={})=>{const t=n.locale??z();return t==="zh-CN"?ICt():t==="fa"?$Ct():t==="ar"?BCt():t==="es"?PCt():t==="hi"?FCt():LCt()}),qCt=()=>"Connect",UCt=()=>"连接",GCt=()=>"اتصال",VCt=()=>"اتصال",KCt=()=>"Conectar",WCt=()=>"कनेक्ट करें",Ik=((e={},n={})=>{const t=n.locale??z();return t==="zh-CN"?UCt():t==="fa"?GCt():t==="ar"?VCt():t==="es"?KCt():t==="hi"?WCt():qCt()}),QCt=()=>"Connected via GitHub CLI",XCt=()=>"已通过 GitHub CLI 连接",YCt=()=>"از طریق GitHub CLI متصل است",ZCt=()=>"متصل عبر واجهة GitHub لسطر الأوامر",JCt=()=>"Conectado mediante GitHub CLI",e8t=()=>"GitHub CLI के ज़रिए कनेक्टेड",HD=((e={},n={})=>{const t=n.locale??z();return t==="zh-CN"?XCt():t==="fa"?YCt():t==="ar"?ZCt():t==="es"?JCt():t==="hi"?e8t():QCt()}),t8t=()=>"Connecting…",n8t=()=>"正在连接…",r8t=()=>"در حال اتصال…",s8t=()=>"جارٍ الاتصال…",i8t=()=>"Conectando…",a8t=()=>"कनेक्ट हो रहा है…",qD=((e={},n={})=>{const t=n.locale??z();return t==="zh-CN"?n8t():t==="fa"?r8t():t==="ar"?s8t():t==="es"?i8t():t==="hi"?a8t():t8t()}),o8t=e=>`CPU cores: ${e==null?void 0:e.count}`,l8t=e=>`${e==null?void 0:e.count} 个 CPU 核心`,c8t=e=>`${e==null?void 0:e.count} هستهٔ CPU`,u8t=e=>`أنوية المعالج: ${e==null?void 0:e.count}`,_8t=e=>`Núcleos de CPU: ${e==null?void 0:e.count}`,f8t=e=>`CPU कोर: ${e==null?void 0:e.count}`,d8t=((e,n={})=>{const t=n.locale??z();return t==="zh-CN"?l8t(e):t==="fa"?c8t(e):t==="ar"?u8t(e):t==="es"?_8t(e):t==="hi"?f8t(e):o8t(e)}),h8t=()=>"Create a private repository and automatically push experiment branches for collaborator visibility.",p8t=()=>"创建私有仓库,并自动推送实验分支以便协作者查看。",m8t=()=>"یک مخزن خصوصی بسازید و شاخه‌های آزمایش را برای مشاهدهٔ همکاران به‌طور خودکار پوش کنید.",g8t=()=>"أنشئ مستودعًا خاصًا وارفع فروع التجارب تلقائيًا ليطّلع عليها المتعاونون.",v8t=()=>"Crear un repositorio privado y subir automáticamente las ramas de los experimentos para que las vean tus colaboradores.",b8t=()=>"एक निजी रिपॉज़िटरी बनाएं और सहयोगी दृश्यता के लिए प्रयोग ब्रांच अपने आप पुश करें।",y8t=((e={},n={})=>{const t=n.locale??z();return t==="zh-CN"?p8t():t==="fa"?m8t():t==="ar"?g8t():t==="es"?v8t():t==="hi"?b8t():h8t()}),x8t=()=>"the current project",w8t=()=>"当前项目",k8t=()=>"پروژهٔ فعلی",S8t=()=>"المشروع الحالي",C8t=()=>"el proyecto actual",E8t=()=>"मौजूदा प्रोजेक्ट",N8t=((e={},n={})=>{const t=n.locale??z();return t==="zh-CN"?w8t():t==="fa"?k8t():t==="ar"?S8t():t==="es"?C8t():t==="hi"?E8t():x8t()}),z8t=e=>`${e==null?void 0:e.value} (custom)`,j8t=e=>`${e==null?void 0:e.value}(自定义)`,T8t=e=>`${e==null?void 0:e.value} (سفارشی)`,A8t=e=>`${e==null?void 0:e.value} (مخصص)`,R8t=e=>`${e==null?void 0:e.value} (personalizado)`,M8t=e=>`${e==null?void 0:e.value} (कस्टम)`,O8t=((e,n={})=>{const t=n.locale??z();return t==="zh-CN"?j8t(e):t==="fa"?T8t(e):t==="ar"?A8t(e):t==="es"?R8t(e):t==="hi"?M8t(e):z8t(e)}),D8t=()=>"detached",L8t=()=>"分离头指针",I8t=()=>"جدا از شاخه",$8t=()=>"منفصل",B8t=()=>"desacoplado",P8t=()=>"डिटैच्ड",$k=((e={},n={})=>{const t=n.locale??z();return t==="zh-CN"?L8t():t==="fa"?I8t():t==="ar"?$8t():t==="es"?B8t():t==="hi"?P8t():D8t()}),F8t=()=>"Disconnected",H8t=()=>"已断开连接",q8t=()=>"قطع اتصال",U8t=()=>"غير متصل",G8t=()=>"Desconectado",V8t=()=>"डिस्कनेक्ट हो गया",UD=((e={},n={})=>{const t=n.locale??z();return t==="zh-CN"?H8t():t==="fa"?q8t():t==="ar"?U8t():t==="es"?G8t():t==="hi"?V8t():F8t()}),K8t=()=>"Environment tab",W8t=()=>"环境标签页",Q8t=()=>"زبانهٔ محیط",X8t=()=>"تبويب البيئة",Y8t=()=>"pestaña Entorno",Z8t=()=>"एनवायरनमेंट टैब",J8t=((e={},n={})=>{const t=n.locale??z();return t==="zh-CN"?W8t():t==="fa"?Q8t():t==="ar"?X8t():t==="es"?Y8t():t==="hi"?Z8t():K8t()}),e9t=()=>"Free models · No sign-in required",t9t=()=>"免费模型 · 无需登录",n9t=()=>"مدل‌های رایگان · بدون نیاز به ورود",r9t=()=>"نماذج مجانية · لا يلزم تسجيل الدخول",s9t=()=>"Modelos gratuitos · No es necesario iniciar sesión",i9t=()=>"मुफ़्त मॉडल · साइन-इन ज़रूरी नहीं",a9t=((e={},n={})=>{const t=n.locale??z();return t==="zh-CN"?t9t():t==="fa"?n9t():t==="ar"?r9t():t==="es"?s9t():t==="hi"?i9t():e9t()}),o9t=e=>`${e==null?void 0:e.branch} · ${e==null?void 0:e.state}`,l9t=e=>`${e==null?void 0:e.branch} · ${e==null?void 0:e.state}`,c9t=e=>`${e==null?void 0:e.branch} · ${e==null?void 0:e.state}`,u9t=e=>`${e==null?void 0:e.branch} · ${e==null?void 0:e.state}`,_9t=e=>`${e==null?void 0:e.branch} · ${e==null?void 0:e.state}`,f9t=e=>`${e==null?void 0:e.branch} · ${e==null?void 0:e.state}`,d9t=((e,n={})=>{const t=n.locale??z();return t==="zh-CN"?l9t(e):t==="fa"?c9t(e):t==="ar"?u9t(e):t==="es"?_9t(e):t==="hi"?f9t(e):o9t(e)}),h9t=()=>"GitHub rejected the push because this repository is archived and read-only. The local project is still available. Unarchive the repository on GitHub, then enable syncing here.",p9t=()=>"GitHub 拒绝了推送,因为此仓库已归档且为只读。你的本地项目仍然可用。请在 GitHub 上取消归档该仓库,然后在此处启用同步。",m9t=()=>"GitHub پوش را نپذیرفت، چون این مخزن بایگانی‌شده و فقط‌خواندنی است. پروژهٔ محلی همچنان در دسترس است. مخزن را در GitHub از بایگانی خارج کنید و سپس همگام‌سازی را اینجا فعال کنید.",g9t=()=>"رفض GitHub رفع التغييرات لأن هذا المستودع مؤرشف وللقراءة فقط. لا يزال المشروع المحلي متاحًا. ألغِ أرشفة المستودع على GitHub، ثم فعّل المزامنة هنا.",v9t=()=>"GitHub rechazó el push porque este repositorio está archivado y es de solo lectura. El proyecto local sigue disponible. Desarchiva el repositorio en GitHub y vuelve a activar la sincronización aquí.",b9t=()=>"GitHub ने पुश अस्वीकार कर दिया क्योंकि यह रिपॉज़िटरी आर्काइव और रीड-ओनली है। लोकल प्रोजेक्ट अब भी उपलब्ध है। GitHub पर रिपॉज़िटरी को अनआर्काइव करें, फिर यहाँ सिंकिंग चालू करें।",y9t=((e={},n={})=>{const t=n.locale??z();return t==="zh-CN"?p9t():t==="fa"?m9t():t==="ar"?g9t():t==="es"?v9t():t==="hi"?b9t():h9t()}),x9t=()=>"GitHub contains changes that are not in this local project. Pull the latest GitHub changes and resolve any conflicts in Git, then try enabling syncing again.",w9t=()=>"GitHub 上有本地项目中不存在的更改。请拉取 GitHub 上的最新更改,在 Git 中解决冲突,然后再次尝试启用同步。",k9t=()=>"GitHub تغییراتی دارد که در پروژهٔ محلی نیست. تازه‌ترین تغییرات GitHub را دریافت و تعارض‌ها را در Git حل کنید، سپس دوباره همگام‌سازی را فعال کنید.",S9t=()=>"يحتوي GitHub على تغييرات ليست في هذا المشروع المحلي. اسحب أحدث تغييرات GitHub وحُلّ أي تعارضات في Git، ثم أعد محاولة تفعيل المزامنة.",C9t=()=>"GitHub tiene cambios que no están en este proyecto local. Descarga los últimos cambios de GitHub, resuelve los conflictos en Git y vuelve a intentar activar la sincronización.",E9t=()=>"GitHub में ऐसे बदलाव हैं जो इस लोकल प्रोजेक्ट में नहीं हैं। नवीनतम GitHub बदलाव पुल करें और Git में किसी भी टकराव को सुलझाएं, फिर सिंकिंग फिर से चालू करने की कोशिश करें।",N9t=((e={},n={})=>{const t=n.locale??z();return t==="zh-CN"?w9t():t==="fa"?k9t():t==="ar"?S9t():t==="es"?C9t():t==="hi"?E9t():x9t()}),z9t=()=>"GitHub rejected the push. Make sure your connected account has write access to this repository, then try again.",j9t=()=>"GitHub 拒绝了推送。请确认已连接的账户对此仓库有写入权限,然后重试。",T9t=()=>"GitHub پوش را نپذیرفت. مطمئن شوید حساب متصل اجازهٔ نوشتن در این مخزن را دارد و دوباره تلاش کنید.",A9t=()=>"رفض GitHub رفع التغييرات. تأكد من أن حسابك المتصل يملك صلاحية الكتابة على هذا المستودع، ثم حاول مجددًا.",R9t=()=>"GitHub rechazó el push. Asegúrate de que tu cuenta conectada tiene permiso de escritura en este repositorio y vuelve a intentarlo.",M9t=()=>"GitHub ने पुश अस्वीकार कर दिया। सुनिश्चित करें कि आपके कनेक्टेड खाते के पास इस रिपॉज़िटरी में राइट एक्सेस है, फिर फिर से कोशिश करें।",O9t=((e={},n={})=>{const t=n.locale??z();return t==="zh-CN"?j9t():t==="fa"?T9t():t==="ar"?A9t():t==="es"?R9t():t==="hi"?M9t():z9t()}),D9t=e=>`GPU × ${e==null?void 0:e.count}`,L9t=e=>`${e==null?void 0:e.count} 个 GPU`,I9t=e=>`${e==null?void 0:e.count} پردازندهٔ گرافیکی`,$9t=e=>`معالج رسومات × ${e==null?void 0:e.count}`,B9t=e=>`GPU × ${e==null?void 0:e.count}`,P9t=e=>`GPU × ${e==null?void 0:e.count}`,F9t=((e,n={})=>{const t=n.locale??z();return t==="zh-CN"?L9t(e):t==="fa"?I9t(e):t==="ar"?$9t(e):t==="es"?B9t(e):t==="hi"?P9t(e):D9t(e)}),H9t=()=>"has changes",q9t=()=>"有更改",U9t=()=>"دارای تغییر",G9t=()=>"به تغييرات",V9t=()=>"con cambios",K9t=()=>"बदलाव हैं",W9t=((e={},n={})=>{const t=n.locale??z();return t==="zh-CN"?q9t():t==="fa"?U9t():t==="ar"?G9t():t==="es"?V9t():t==="hi"?K9t():H9t()}),Q9t=e=>`This token is valid but does not report whether it can launch Jobs; OAuth tokens from ${e==null?void 0:e.login} never do. Launches may still work. For a definitive check, save a write-scoped token from ${e==null?void 0:e.url}.`,X9t=e=>`此令牌有效,但不会报告能否启动 Jobs;来自 ${e==null?void 0:e.login} 的 OAuth 令牌从不提供该信息。启动仍可能成功。如需最终确认,请从 ${e==null?void 0:e.url} 保存具有写入权限的令牌。`,Y9t=e=>`این توکن معتبر است، اما مشخص نمی‌کند که می‌تواند Jobs را اجرا کند؛ توکن‌های OAuth از ${e==null?void 0:e.login} هرگز چنین اطلاعاتی نمی‌دهند. اجراها ممکن است کار کنند. برای بررسی قطعی، یک توکن دارای مجوز نوشتن از ${e==null?void 0:e.url} ذخیره کنید.`,Z9t=e=>`هذا الرمز صالح لكنه لا يبيّن ما إن كان قادرًا على إطلاق المهام؛ ورموز OAuth من ${e==null?void 0:e.login} لا تبيّن ذلك أبدًا. قد ينجح الإطلاق رغم ذلك. للتحقق القاطع، احفظ رمزًا بصلاحية الكتابة من ${e==null?void 0:e.url}.`,J9t=e=>`Este token es válido, pero no indica si puede lanzar Jobs; los tokens OAuth de ${e==null?void 0:e.login} nunca lo indican. Puede que los lanzamientos funcionen igualmente. Para comprobarlo con seguridad, guarda un token con permiso de escritura desde ${e==null?void 0:e.url}.`,eEt=e=>`यह टोकन मान्य है पर यह नहीं बताता कि यह Jobs लॉन्च कर सकता है या नहीं; ${e==null?void 0:e.login} से मिले OAuth टोकन कभी नहीं बताते। लॉन्च फिर भी काम कर सकता है। निश्चित जाँच के लिए, ${e==null?void 0:e.url} से एक राइट-स्कोप्ड टोकन सेव करें।`,tEt=((e,n={})=>{const t=n.locale??z();return t==="zh-CN"?X9t(e):t==="fa"?Y9t(e):t==="ar"?Z9t(e):t==="es"?J9t(e):t==="hi"?eEt(e):Q9t(e)}),nEt=()=>"This token is valid, but cannot submit Hugging Face Jobs. Create a token with Jobs write permission in Hugging Face token settings, then replace it here.",rEt=()=>"此令牌有效,但无法提交 Hugging Face 任务。请在 Hugging Face 令牌设置中创建具有 Jobs 写入权限的令牌,然后在此处替换。",sEt=()=>"این توکن معتبر است، اما اجازهٔ ارسال کار به Hugging Face را ندارد. در تنظیمات توکن Hugging Face، توکنی با مجوز نوشتن Jobs بسازید و آن را اینجا جایگزین کنید.",iEt=()=>"هذا الرمز صالح لكنه لا يستطيع إرسال مهام Hugging Face. أنشئ رمزًا بصلاحية كتابة المهام في إعدادات رموز Hugging Face، ثم استبدله هنا.",aEt=()=>"Este token es válido, pero no puede enviar Hugging Face Jobs. Crea un token con permiso de escritura en Jobs desde la configuración de tokens de Hugging Face y reemplázalo aquí.",oEt=()=>"यह टोकन मान्य है, पर Hugging Face Jobs सबमिट नहीं कर सकता। Hugging Face टोकन सेटिंग्स में Jobs राइट अनुमति वाला टोकन बनाएं, फिर इसे यहाँ बदलें।",lEt=((e={},n={})=>{const t=n.locale??z();return t==="zh-CN"?rEt():t==="fa"?sEt():t==="ar"?iEt():t==="es"?aEt():t==="hi"?oEt():nEt()}),cEt=()=>"Install",uEt=()=>"安装",_Et=()=>"نصب",fEt=()=>"تثبيت",dEt=()=>"Instalar",hEt=()=>"इंस्टॉल करें",pEt=((e={},n={})=>{const t=n.locale??z();return t==="zh-CN"?uEt():t==="fa"?_Et():t==="ar"?fEt():t==="es"?dEt():t==="hi"?hEt():cEt()}),mEt=e=>`Adds ${e==null?void 0:e.command} to your terminal, pointing at this app, so the CLI and app are always the same version.`,gEt=e=>`将 ${e==null?void 0:e.command} 添加到终端并指向此应用,使 CLI 和应用始终使用同一版本。`,vEt=e=>`فرمان ${e==null?void 0:e.command} را به ترمینال شما و با اشاره به این برنامه اضافه می‌کند تا CLI و برنامه همیشه یک نسخه باشند.`,bEt=e=>`يضيف ${e==null?void 0:e.command} إلى طرفيتك موجّهًا إلى هذا التطبيق، بحيث تكون واجهة سطر الأوامر والتطبيق دائمًا بالإصدار نفسه.`,yEt=e=>`Añade ${e==null?void 0:e.command} a tu terminal, apuntando a esta app, para que la CLI y la app tengan siempre la misma versión.`,xEt=e=>`आपके टर्मिनल में ${e==null?void 0:e.command} जोड़ता है, जो इसी ऐप की ओर इशारा करता है, ताकि CLI और ऐप हमेशा एक ही वर्शन के रहें।`,wEt=((e,n={})=>{const t=n.locale??z();return t==="zh-CN"?gEt(e):t==="fa"?vEt(e):t==="ar"?bEt(e):t==="es"?yEt(e):t==="hi"?xEt(e):mEt(e)}),kEt=e=>`Install the ${e==null?void 0:e.command} command`,SEt=e=>`安装 ${e==null?void 0:e.command} 命令`,CEt=e=>`نصب فرمان ${e==null?void 0:e.command}`,EEt=e=>`تثبيت أمر ${e==null?void 0:e.command}`,NEt=e=>`Instalar el comando ${e==null?void 0:e.command}`,zEt=e=>`${e==null?void 0:e.command} कमांड इंस्टॉल करें`,jEt=((e,n={})=>{const t=n.locale??z();return t==="zh-CN"?SEt(e):t==="fa"?CEt(e):t==="ar"?EEt(e):t==="es"?NEt(e):t==="hi"?zEt(e):kEt(e)}),TEt=()=>"Install GitHub CLI, then run `gh auth login` in your terminal.",AEt=()=>"请安装 GitHub CLI,然后在终端中运行 `gh auth login`。",REt=()=>"GitHub CLI را نصب کنید و سپس در پایانه `gh auth login` را اجرا کنید.",MEt=()=>"ثبّت واجهة GitHub لسطر الأوامر، ثم نفّذ `gh auth login` في طرفيتك.",OEt=()=>"Instala GitHub CLI y ejecuta `gh auth login` en tu terminal.",DEt=()=>"GitHub CLI इंस्टॉल करें, फिर अपने टर्मिनल में `gh auth login` चलाएं।",LEt=((e={},n={})=>{const t=n.locale??z();return t==="zh-CN"?AEt():t==="fa"?REt():t==="ar"?MEt():t==="es"?OEt():t==="hi"?DEt():TEt()}),IEt=()=>"Install the new release now instead of waiting for the background update.",$Et=()=>"立即安装新版本,无需等待后台更新。",BEt=()=>"نسخهٔ جدید را اکنون نصب کنید و منتظر به‌روزرسانی پس‌زمینه نمانید.",PEt=()=>"ثبّت الإصدار الجديد الآن بدلًا من انتظار التحديث في الخلفية.",FEt=()=>"Instala la nueva versión ahora en lugar de esperar a la actualización en segundo plano.",HEt=()=>"बैकग्राउंड अपडेट का इंतज़ार करने की बजाय अभी नया रिलीज़ इंस्टॉल करें।",qEt=((e={},n={})=>{const t=n.locale??z();return t==="zh-CN"?$Et():t==="fa"?BEt():t==="ar"?PEt():t==="es"?FEt():t==="hi"?HEt():IEt()}),UEt=()=>"Discard your unsaved Kubernetes changes?",GEt=()=>"要放弃未保存的 Kubernetes 更改吗?",VEt=()=>"تغییرات ذخیره‌نشدهٔ Kubernetes کنار گذاشته شود؟",KEt=()=>"تجاهل تغييرات Kubernetes غير المحفوظة؟",WEt=()=>"¿Descartar los cambios sin guardar de Kubernetes?",QEt=()=>"आपके सेव न किए गए Kubernetes बदलाव छोड़ें?",XEt=((e={},n={})=>{const t=n.locale??z();return t==="zh-CN"?GEt():t==="fa"?VEt():t==="ar"?KEt():t==="es"?WEt():t==="hi"?QEt():UEt()}),YEt=()=>"Key from",ZEt=()=>"密钥来自",JEt=()=>"کلید از",eNt=()=>"المفتاح من",tNt=()=>"Clave tomada de la",nNt=()=>"की स्रोत",rNt=((e={},n={})=>{const t=n.locale??z();return t==="zh-CN"?ZEt():t==="fa"?JEt():t==="ar"?eNt():t==="es"?tNt():t==="hi"?nNt():YEt()}),sNt=()=>"Use current kubectl context",iNt=()=>"使用当前 kubectl 上下文",aNt=()=>"استفاده از کانتکست فعلی kubectl",oNt=()=>"استخدام سياق kubectl الحالي",lNt=()=>"Usar el contexto actual de kubectl",cNt=()=>"मौजूदा kubectl कॉन्टेक्स्ट इस्तेमाल करें",uNt=((e={},n={})=>{const t=n.locale??z();return t==="zh-CN"?iNt():t==="fa"?aNt():t==="ar"?oNt():t==="es"?lNt():t==="hi"?cNt():sNt()}),_Nt=e=>`Use current context (${e==null?void 0:e.context})`,fNt=e=>`使用当前上下文(${e==null?void 0:e.context})`,dNt=e=>`استفاده از کانتکست فعلی (${e==null?void 0:e.context})`,hNt=e=>`استخدام السياق الحالي (${e==null?void 0:e.context})`,pNt=e=>`Usar el contexto actual (${e==null?void 0:e.context})`,mNt=e=>`मौजूदा कॉन्टेक्स्ट इस्तेमाल करें (${e==null?void 0:e.context})`,gNt=((e,n={})=>{const t=n.locale??z();return t==="zh-CN"?fNt(e):t==="fa"?dNt(e):t==="ar"?hNt(e):t==="es"?pNt(e):t==="hi"?mNt(e):_Nt(e)}),vNt=()=>"Language",bNt=()=>"语言",yNt=()=>"زبان",xNt=()=>"اللغة",wNt=()=>"Idioma",kNt=()=>"भाषा",SNt=((e={},n={})=>{const t=n.locale??z();return t==="zh-CN"?bNt():t==="fa"?yNt():t==="ar"?xNt():t==="es"?wNt():t==="hi"?kNt():vNt()}),CNt=e=>`Run ${e==null?void 0:e.command} in a terminal to sign in.`,ENt=e=>`在终端中运行 ${e==null?void 0:e.command} 以登录。`,NNt=e=>`برای ورود، ${e==null?void 0:e.command} را در ترمینال اجرا کنید.`,zNt=e=>`نفّذ ${e==null?void 0:e.command} في الطرفية لتسجيل الدخول.`,jNt=e=>`Ejecuta ${e==null?void 0:e.command} en una terminal para iniciar sesión.`,TNt=e=>`साइन इन करने के लिए टर्मिनल में ${e==null?void 0:e.command} चलाएं।`,ANt=((e,n={})=>{const t=n.locale??z();return t==="zh-CN"?ENt(e):t==="fa"?NNt(e):t==="ar"?zNt(e):t==="es"?jNt(e):t==="hi"?TNt(e):CNt(e)}),RNt=()=>"Make default",MNt=()=>"设为默认值",ONt=()=>"پیش‌فرض شود",DNt=()=>"جعله افتراضيًا",LNt=()=>"Establecer como predeterminado",INt=()=>"डिफ़ॉल्ट बनाएं",$Nt=((e={},n={})=>{const t=n.locale??z();return t==="zh-CN"?MNt():t==="fa"?ONt():t==="ar"?DNt():t==="es"?LNt():t==="hi"?INt():RNt()}),BNt=()=>"Modal credentials are set in the process environment. Remove those overrides before replacing the token here.",PNt=()=>"Modal 凭据已在进程环境中设置。请先移除这些覆盖设置,再在此处替换令牌。",FNt=()=>"اعتبارنامه‌های Modal در محیط فرایند تنظیم شده‌اند. پیش از جایگزینی توکن در اینجا، این تنظیمات را حذف کنید.",HNt=()=>"بيانات اعتماد Modal مضبوطة في بيئة العملية. أزِل تلك التجاوزات قبل استبدال الرمز هنا.",qNt=()=>"Las credenciales de Modal están definidas en el entorno del proceso. Elimínalas antes de reemplazar el token aquí.",UNt=()=>"Modal क्रेडेंशियल प्रोसेस एनवायरनमेंट में सेट हैं। यहाँ सेव टोकन बदलने से पहले उन ओवरराइड को हटाएं।",GNt=((e={},n={})=>{const t=n.locale??z();return t==="zh-CN"?PNt():t==="fa"?FNt():t==="ar"?HNt():t==="es"?qNt():t==="hi"?UNt():BNt()}),VNt=()=>"Replace token ID",KNt=()=>"替换令牌 ID",WNt=()=>"جایگزینی شناسهٔ توکن",QNt=()=>"استبدال معرّف الرمز",XNt=()=>"Reemplazar ID del token",YNt=()=>"टोकन ID बदलें",ZNt=((e={},n={})=>{const t=n.locale??z();return t==="zh-CN"?KNt():t==="fa"?WNt():t==="ar"?QNt():t==="es"?XNt():t==="hi"?YNt():VNt()}),JNt=()=>"Replace token secret",ezt=()=>"替换令牌密钥",tzt=()=>"جایگزینی رمز توکن",nzt=()=>"استبدال سرّ الرمز",rzt=()=>"Reemplazar secreto del token",szt=()=>"टोकन सीक्रेट बदलें",izt=((e={},n={})=>{const t=n.locale??z();return t==="zh-CN"?ezt():t==="fa"?tzt():t==="ar"?nzt():t==="es"?rzt():t==="hi"?szt():JNt()}),azt=()=>"How to get a Modal token",ozt=()=>"如何获取 Modal 令牌",lzt=()=>"روش دریافت توکن Modal",czt=()=>"كيفية الحصول على رمز Modal",uzt=()=>"Cómo obtener un token de Modal",_zt=()=>"Modal टोकन कैसे लें",fzt=((e={},n={})=>{const t=n.locale??z();return t==="zh-CN"?ozt():t==="fa"?lzt():t==="ar"?czt():t==="es"?uzt():t==="hi"?_zt():azt()}),dzt=()=>"Token ID",hzt=()=>"令牌 ID",pzt=()=>"شناسهٔ توکن",mzt=()=>"معرّف الرمز",gzt=()=>"ID del token",vzt=()=>"टोकन ID",bzt=((e={},n={})=>{const t=n.locale??z();return t==="zh-CN"?hzt():t==="fa"?pzt():t==="ar"?mzt():t==="es"?gzt():t==="hi"?vzt():dzt()}),yzt=()=>"Token secret",xzt=()=>"令牌密钥",wzt=()=>"رمز توکن",kzt=()=>"سرّ الرمز",Szt=()=>"Secreto del token",Czt=()=>"टोकन सीक्रेट",Ezt=((e={},n={})=>{const t=n.locale??z();return t==="zh-CN"?xzt():t==="fa"?wzt():t==="ar"?kzt():t==="es"?Szt():t==="hi"?Czt():yzt()}),Nzt=e=>`${e==null?void 0:e.count} models available — ${e==null?void 0:e.models}`,zzt=e=>`${e==null?void 0:e.count} 个模型可用 — ${e==null?void 0:e.models}`,jzt=e=>`${e==null?void 0:e.count} مدل در دسترس — ${e==null?void 0:e.models}`,Tzt=e=>`النماذج المتاحة: ${e==null?void 0:e.count} — ${e==null?void 0:e.models}`,Azt=e=>`Modelos disponibles (${e==null?void 0:e.count}): ${e==null?void 0:e.models}`,Rzt=e=>`${e==null?void 0:e.count} मॉडल उपलब्ध — ${e==null?void 0:e.models}`,Mzt=((e,n={})=>{const t=n.locale??z();return t==="zh-CN"?zzt(e):t==="fa"?jzt(e):t==="ar"?Tzt(e):t==="es"?Azt(e):t==="hi"?Rzt(e):Nzt(e)}),Ozt=e=>`Needs ${e==null?void 0:e.tool}`,Dzt=e=>`需要 ${e==null?void 0:e.tool}`,Lzt=e=>`به ${e==null?void 0:e.tool} نیاز دارد`,Izt=e=>`يحتاج إلى ${e==null?void 0:e.tool}`,$zt=e=>`Requiere ${e==null?void 0:e.tool}`,Bzt=e=>`${e==null?void 0:e.tool} की ज़रूरत है`,Pzt=((e,n={})=>{const t=n.locale??z();return t==="zh-CN"?Dzt(e):t==="fa"?Lzt(e):t==="ar"?Izt(e):t==="es"?$zt(e):t==="hi"?Bzt(e):Ozt(e)}),Fzt=()=>"Needs tools",Hzt=()=>"缺少工具",qzt=()=>"به ابزارها نیاز دارد",Uzt=()=>"يحتاج إلى أدوات",Gzt=()=>"Requiere herramientas",Vzt=()=>"टूल की ज़रूरत है",Kzt=((e={},n={})=>{const t=n.locale??z();return t==="zh-CN"?Hzt():t==="fa"?qzt():t==="ar"?Uzt():t==="es"?Gzt():t==="hi"?Vzt():Fzt()}),Wzt=e=>`New runs use ${e==null?void 0:e.destination} unless another backend is specified.`,Qzt=e=>`除非另行指定后端,否则新运行将使用${e==null?void 0:e.destination}。`,Xzt=e=>`اجراهای جدید از ${e==null?void 0:e.destination} استفاده می‌کنند، مگر اینکه سامانهٔ دیگری مشخص شود.`,Yzt=e=>`تستخدم عمليات التشغيل الجديدة ${e==null?void 0:e.destination} ما لم تُحدَّد بيئة تنفيذ أخرى.`,Zzt=e=>`Las nuevas ejecuciones usan ${e==null?void 0:e.destination}, salvo que se indique otro backend.`,Jzt=e=>`जब तक कोई और बैकएंड न बताया जाए, नए रन ${e==null?void 0:e.destination} इस्तेमाल करते हैं।`,ejt=((e,n={})=>{const t=n.locale??z();return t==="zh-CN"?Qzt(e):t==="fa"?Xzt(e):t==="ar"?Yzt(e):t==="es"?Zzt(e):t==="hi"?Jzt(e):Wzt(e)}),tjt=()=>"New runs use SSH; choose a host when launching.",njt=()=>"新运行将使用 SSH;启动时请选择主机。",rjt=()=>"اجراهای جدید از SSH استفاده می‌کنند؛ هنگام اجرا یک میزبان انتخاب کنید.",sjt=()=>"تستخدم عمليات التشغيل الجديدة SSH؛ اختر مضيفًا عند الإطلاق.",ijt=()=>"Las nuevas ejecuciones usan SSH; elige un host al lanzarlas.",ajt=()=>"नए रन SSH इस्तेमाल करते हैं; लॉन्च करते समय एक होस्ट चुनें।",ojt=((e={},n={})=>{const t=n.locale??z();return t==="zh-CN"?njt():t==="fa"?rjt():t==="ar"?sjt():t==="es"?ijt():t==="hi"?ajt():tjt()}),ljt=()=>"New token",cjt=()=>"新令牌",ujt=()=>"توکن جدید",_jt=()=>"رمز جديد",fjt=()=>"Nuevo token",djt=()=>"नया टोकन",hjt=((e={},n={})=>{const t=n.locale??z();return t==="zh-CN"?cjt():t==="fa"?ujt():t==="ar"?_jt():t==="es"?fjt():t==="hi"?djt():ljt()}),pjt=()=>"No default flavor",mjt=()=>"不设默认配置",gjt=()=>"بدون پیکربندی پیش‌فرض",vjt=()=>"لا يوجد تكوين افتراضي للموارد",bjt=()=>"Sin opción predeterminada",yjt=()=>"कोई डिफ़ॉल्ट फ़्लेवर नहीं",xjt=((e={},n={})=>{const t=n.locale??z();return t==="zh-CN"?mjt():t==="fa"?gjt():t==="ar"?vjt():t==="es"?bjt():t==="hi"?yjt():pjt()}),wjt=()=>"none",kjt=()=>"无",Sjt=()=>"هیچ‌کدام",Cjt=()=>"لا شيء",Ejt=()=>"ninguno",Njt=()=>"कोई नहीं",Bk=((e={},n={})=>{const t=n.locale??z();return t==="zh-CN"?kjt():t==="fa"?Sjt():t==="ar"?Cjt():t==="es"?Ejt():t==="hi"?Njt():wjt()}),zjt=()=>"Not connected",jjt=()=>"未连接",Tjt=()=>"متصل نیست",Ajt=()=>"غير متصل",Rjt=()=>"No conectado",Mjt=()=>"कनेक्टेड नहीं",GD=((e={},n={})=>{const t=n.locale??z();return t==="zh-CN"?jjt():t==="fa"?Tjt():t==="ar"?Ajt():t==="es"?Rjt():t==="hi"?Mjt():zjt()}),Ojt=()=>"not found on PATH",Djt=()=>"在 PATH 中未找到",Ljt=()=>"در PATH پیدا نشد",Ijt=()=>"غير موجود في PATH",$jt=()=>"no se encontró en el PATH",Bjt=()=>"PATH पर नहीं मिला",Pjt=((e={},n={})=>{const t=n.locale??z();return t==="zh-CN"?Djt():t==="fa"?Ljt():t==="ar"?Ijt():t==="es"?$jt():t==="hi"?Bjt():Ojt()}),Fjt=e=>`${e==null?void 0:e.context} (not in kubeconfig)`,Hjt=e=>`${e==null?void 0:e.context}(不在 kubeconfig 中)`,qjt=e=>`${e==null?void 0:e.context} (در kubeconfig نیست)`,Ujt=e=>`${e==null?void 0:e.context} (ليس في kubeconfig)`,Gjt=e=>`${e==null?void 0:e.context} (no está en kubeconfig)`,Vjt=e=>`${e==null?void 0:e.context} (kubeconfig में नहीं)`,Kjt=((e,n={})=>{const t=n.locale??z();return t==="zh-CN"?Hjt(e):t==="fa"?qjt(e):t==="ar"?Ujt(e):t==="es"?Gjt(e):t==="hi"?Vjt(e):Fjt(e)}),Wjt=()=>"not initialized",Qjt=()=>"尚未初始化",Xjt=()=>"راه‌اندازی نشده",Yjt=()=>"غير مهيّأ",Zjt=()=>"sin inicializar",Jjt=()=>"शुरू नहीं किया गया",eTt=((e={},n={})=>{const t=n.locale??z();return t==="zh-CN"?Qjt():t==="fa"?Xjt():t==="ar"?Yjt():t==="es"?Zjt():t==="hi"?Jjt():Wjt()}),tTt=()=>"Not set",nTt=()=>"未设置",rTt=()=>"تنظیم نشده",sTt=()=>"غير مضبوط",iTt=()=>"Sin definir",aTt=()=>"सेट नहीं",s3=((e={},n={})=>{const t=n.locale??z();return t==="zh-CN"?nTt():t==="fa"?rTt():t==="ar"?sTt():t==="es"?iTt():t==="hi"?aTt():tTt()}),oTt=()=>"OAuth (subscription login)",lTt=()=>"OAuth(订阅登录)",cTt=()=>"OAuth (ورود با اشتراک)",uTt=()=>"OAuth (تسجيل دخول الاشتراك)",_Tt=()=>"OAuth (inicio de sesión con suscripción)",fTt=()=>"OAuth (सब्सक्रिप्शन लॉगिन)",dTt=((e={},n={})=>{const t=n.locale??z();return t==="zh-CN"?lTt():t==="fa"?cTt():t==="ar"?uTt():t==="es"?_Tt():t==="hi"?fTt():oTt()}),hTt=e=>`The old copy was left at ${e==null?void 0:e.path} on a different disk. You can delete it after confirming everything works.`,pTt=e=>`旧副本保留在另一磁盘的 ${e==null?void 0:e.path}。确认一切正常后即可删除。`,mTt=e=>`نسخهٔ قدیمی در ${e==null?void 0:e.path} روی دیسکی دیگر باقی ماند. پس از اطمینان از درست کار کردن همه‌چیز می‌توانید آن را حذف کنید.`,gTt=e=>`تُركت النسخة القديمة في ${e==null?void 0:e.path} على قرص مختلف. يمكنك حذفها بعد التأكد من أن كل شيء يعمل.`,vTt=e=>`La copia anterior se dejó en ${e==null?void 0:e.path}, en otro disco. Puedes eliminarla cuando confirmes que todo funciona.`,bTt=e=>`पुरानी कॉपी एक अलग डिस्क पर ${e==null?void 0:e.path} पर छोड़ दी गई थी। सब कुछ ठीक होने की पुष्टि के बाद आप इसे हटा सकते हैं।`,yTt=((e,n={})=>{const t=n.locale??z();return t==="zh-CN"?pTt(e):t==="fa"?mTt(e):t==="ar"?gTt(e):t==="es"?vTt(e):t==="hi"?bTt(e):hTt(e)}),xTt=()=>"Setting up…",wTt=()=>"正在设置…",kTt=()=>"در حال راه‌اندازی…",STt=()=>"جارٍ الإعداد…",CTt=()=>"Configurando…",ETt=()=>"सेट अप हो रहा है…",NTt=((e={},n={})=>{const t=n.locale??z();return t==="zh-CN"?wTt():t==="fa"?kTt():t==="ar"?STt():t==="es"?CTt():t==="hi"?ETt():xTt()}),zTt=()=>"Account",jTt=()=>"账户",TTt=()=>"حساب",ATt=()=>"الحساب",RTt=()=>"Cuenta",MTt=()=>"खाता",Pk=((e={},n={})=>{const t=n.locale??z();return t==="zh-CN"?jTt():t==="fa"?TTt():t==="ar"?ATt():t==="es"?RTt():t==="hi"?MTt():zTt()}),OTt=()=>"Add one with",DTt=()=>"使用以下命令添加:",LTt=()=>"یکی با این فرمان اضافه کنید:",ITt=()=>"أضِف واحدًا عبر",$Tt=()=>"Añade una con",BTt=()=>"इसके साथ एक जोड़ें",PTt=((e={},n={})=>{const t=n.locale??z();return t==="zh-CN"?DTt():t==="fa"?LTt():t==="ar"?ITt():t==="es"?$Tt():t==="hi"?BTt():OTt()}),FTt=()=>"Add variable",HTt=()=>"添加变量",qTt=()=>"افزودن متغیر",UTt=()=>"إضافة متغيّر",GTt=()=>"Añadir variable",VTt=()=>"वेरिएबल जोड़ें",KTt=((e={},n={})=>{const t=n.locale??z();return t==="zh-CN"?HTt():t==="fa"?qTt():t==="ar"?UTt():t==="es"?GTt():t==="hi"?VTt():FTt()}),WTt=()=>"Agent models",QTt=()=>"智能体模型",XTt=()=>"مدل‌های عامل",YTt=()=>"نماذج الوكيل",ZTt=()=>"Modelos de los agentes",JTt=()=>"एजेंट मॉडल",eAt=((e={},n={})=>{const t=n.locale??z();return t==="zh-CN"?QTt():t==="fa"?XTt():t==="ar"?YTt():t==="es"?ZTt():t==="hi"?JTt():WTt()}),tAt=()=>"Anonymous usage analytics",nAt=()=>"匿名使用情况分析",rAt=()=>"تحلیل ناشناس استفاده",sAt=()=>"تحليلات استخدام مجهولة الهوية",iAt=()=>"Estadísticas de uso anónimas",aAt=()=>"अनाम उपयोग एनालिटिक्स",iz=((e={},n={})=>{const t=n.locale??z();return t==="zh-CN"?nAt():t==="fa"?rAt():t==="ar"?sAt():t==="es"?iAt():t==="hi"?aAt():tAt()}),oAt=()=>"Auth",lAt=()=>"身份验证",cAt=()=>"احراز هویت",uAt=()=>"المصادقة",_At=()=>"Autenticación",fAt=()=>"ऑथ",dAt=((e={},n={})=>{const t=n.locale??z();return t==="zh-CN"?lAt():t==="fa"?cAt():t==="ar"?uAt():t==="es"?_At():t==="hi"?fAt():oAt()}),hAt=()=>"Authentication",pAt=()=>"身份验证",mAt=()=>"احراز هویت",gAt=()=>"المصادقة",vAt=()=>"Autenticación",bAt=()=>"प्रमाणीकरण",VD=((e={},n={})=>{const t=n.locale??z();return t==="zh-CN"?pAt():t==="fa"?mAt():t==="ar"?gAt():t==="es"?vAt():t==="hi"?bAt():hAt()}),yAt=()=>"Back to Compute",xAt=()=>"返回算力设置",wAt=()=>"بازگشت به رایانش",kAt=()=>"العودة إلى الحوسبة",SAt=()=>"Volver a Cómputo",CAt=()=>"कंप्यूट पर वापस जाएं",KD=((e={},n={})=>{const t=n.locale??z();return t==="zh-CN"?xAt():t==="fa"?wAt():t==="ar"?kAt():t==="es"?SAt():t==="hi"?CAt():yAt()}),EAt=()=>"Backend",NAt=()=>"后端",zAt=()=>"بک‌اند",jAt=()=>"بيئة التنفيذ",TAt=()=>"Backend",AAt=()=>"बैकएंड",RAt=((e={},n={})=>{const t=n.locale??z();return t==="zh-CN"?NAt():t==="fa"?zAt():t==="ar"?jAt():t==="es"?TAt():t==="hi"?AAt():EAt()}),MAt=()=>"Baseline",OAt=()=>"基线",DAt=()=>"خط مبنا",LAt=()=>"الأساس المرجعي",IAt=()=>"Rama base",$At=()=>"बेसलाइन",BAt=((e={},n={})=>{const t=n.locale??z();return t==="zh-CN"?OAt():t==="fa"?DAt():t==="ar"?LAt():t==="es"?IAt():t==="hi"?$At():MAt()}),PAt=()=>"Binary",FAt=()=>"可执行文件",HAt=()=>"فایل اجرایی",qAt=()=>"الملف التنفيذي",UAt=()=>"Binario",GAt=()=>"बाइनरी",VAt=((e={},n={})=>{const t=n.locale??z();return t==="zh-CN"?FAt():t==="fa"?HAt():t==="ar"?qAt():t==="es"?UAt():t==="hi"?GAt():PAt()}),KAt=()=>"Cancel",WAt=()=>"取消",QAt=()=>"لغو",XAt=()=>"إلغاء",YAt=()=>"Cancelar",ZAt=()=>"रद्द करें",P_=((e={},n={})=>{const t=n.locale??z();return t==="zh-CN"?WAt():t==="fa"?QAt():t==="ar"?XAt():t==="es"?YAt():t==="hi"?ZAt():KAt()}),JAt=()=>"Cancel new variable",eRt=()=>"取消新变量",tRt=()=>"لغو متغیر جدید",nRt=()=>"إلغاء المتغيّر الجديد",rRt=()=>"Cancelar nueva variable",sRt=()=>"नया वेरिएबल रद्द करें",iRt=((e={},n={})=>{const t=n.locale??z();return t==="zh-CN"?eRt():t==="fa"?tRt():t==="ar"?nRt():t==="es"?rRt():t==="hi"?sRt():JAt()}),aRt=()=>"Checking compute targets…",oRt=()=>"正在检查算力目标…",lRt=()=>"در حال بررسی مقصدهای رایانشی…",cRt=()=>"جارٍ التحقق من أهداف الحوسبة…",uRt=()=>"Comprobando destinos de cómputo…",_Rt=()=>"कंप्यूट टारगेट जाँचे जा रहे हैं…",fRt=((e={},n={})=>{const t=n.locale??z();return t==="zh-CN"?oRt():t==="fa"?lRt():t==="ar"?cRt():t==="es"?uRt():t==="hi"?_Rt():aRt()}),dRt=()=>"Checking kubectl…",hRt=()=>"正在检查 kubectl…",pRt=()=>"در حال بررسی kubectl…",mRt=()=>"جارٍ التحقق من kubectl…",gRt=()=>"Comprobando kubectl…",vRt=()=>"kubectl जाँचा जा रहा है…",bRt=((e={},n={})=>{const t=n.locale??z();return t==="zh-CN"?hRt():t==="fa"?pRt():t==="ar"?mRt():t==="es"?gRt():t==="hi"?vRt():dRt()}),yRt=()=>"Checking Modal…",xRt=()=>"正在检查 Modal…",wRt=()=>"در حال بررسی Modal…",kRt=()=>"جارٍ التحقق من Modal…",SRt=()=>"Comprobando Modal…",CRt=()=>"Modal जाँचा जा रहा है…",ERt=((e={},n={})=>{const t=n.locale??z();return t==="zh-CN"?xRt():t==="fa"?wRt():t==="ar"?kRt():t==="es"?SRt():t==="hi"?CRt():yRt()}),NRt=()=>"Choose a preset flavor",zRt=()=>"选择预设规格",jRt=()=>"یک پیکربندی آماده انتخاب کنید",TRt=()=>"اختر تكوينًا محددًا مسبقًا للموارد",ARt=()=>"Elige una opción predefinida",RRt=()=>"एक प्रीसेट फ़्लेवर चुनें",az=((e={},n={})=>{const t=n.locale??z();return t==="zh-CN"?zRt():t==="fa"?jRt():t==="ar"?TRt():t==="es"?ARt():t==="hi"?RRt():NRt()}),MRt=()=>"cluster default",ORt=()=>"集群默认值",DRt=()=>"پیش‌فرض خوشه",LRt=()=>"افتراضي العنقود",IRt=()=>"valor predeterminado del clúster",$Rt=()=>"क्लस्टर डिफ़ॉल्ट",oz=((e={},n={})=>{const t=n.locale??z();return t==="zh-CN"?ORt():t==="fa"?DRt():t==="ar"?LRt():t==="es"?IRt():t==="hi"?$Rt():MRt()}),BRt=()=>"cluster default (e.g. 4h, 30m)",PRt=()=>"集群默认值(例如 4h、30m)",FRt=()=>"پیش‌فرض خوشه (مثلاً 4h یا 30m)",HRt=()=>"افتراضي العنقود (مثل 4h أو 30m)",qRt=()=>"valor predeterminado del clúster (p. ej., 4h, 30m)",URt=()=>"क्लस्टर डिफ़ॉल्ट (जैसे 4h, 30m)",GRt=((e={},n={})=>{const t=n.locale??z();return t==="zh-CN"?PRt():t==="fa"?FRt():t==="ar"?HRt():t==="es"?qRt():t==="hi"?URt():BRt()}),VRt=()=>"Cluster unreachable",KRt=()=>"无法连接集群",WRt=()=>"خوشه در دسترس نیست",QRt=()=>"تعذّر الوصول إلى العنقود",XRt=()=>"Clúster inaccesible",YRt=()=>"क्लस्टर तक नहीं पहुँचा जा सका",ZRt=((e={},n={})=>{const t=n.locale??z();return t==="zh-CN"?KRt():t==="fa"?WRt():t==="ar"?QRt():t==="es"?XRt():t==="hi"?YRt():VRt()}),JRt=()=>"Compute",eMt=()=>"算力",tMt=()=>"رایانش",nMt=()=>"الحوسبة",rMt=()=>"Cómputo",sMt=()=>"कंप्यूट",WD=((e={},n={})=>{const t=n.locale??z();return t==="zh-CN"?eMt():t==="fa"?tMt():t==="ar"?nMt():t==="es"?rMt():t==="hi"?sMt():JRt()}),iMt=()=>"Connect compute backends and choose where new runs execute.",aMt=()=>"连接算力后端,并选择新运行的执行位置。",oMt=()=>"backendهای رایانشی را متصل و محل اجرای کارهای جدید را انتخاب کنید.",lMt=()=>"اربط بيئات التنفيذ واختر أين تُنفَّذ عمليات التشغيل الجديدة.",cMt=()=>"Conecta backends de cómputo y elige dónde se lanzan las nuevas ejecuciones.",uMt=()=>"कंप्यूट बैकएंड कनेक्ट करें और चुनें कि नए रन कहाँ चलेंगे।",_Mt=((e={},n={})=>{const t=n.locale??z();return t==="zh-CN"?aMt():t==="fa"?oMt():t==="ar"?lMt():t==="es"?cMt():t==="hi"?uMt():iMt()}),fMt=()=>"Connected",dMt=()=>"已连接",hMt=()=>"متصل",pMt=()=>"متصل",mMt=()=>"Conectado",gMt=()=>"कनेक्टेड",vMt=((e={},n={})=>{const t=n.locale??z();return t==="zh-CN"?dMt():t==="fa"?hMt():t==="ar"?pMt():t==="es"?mMt():t==="hi"?gMt():fMt()}),bMt=()=>"Context",yMt=()=>"上下文",xMt=()=>"زمینه",wMt=()=>"السياق",kMt=()=>"Contexto",SMt=()=>"कॉन्टेक्स्ट",CMt=((e={},n={})=>{const t=n.locale??z();return t==="zh-CN"?yMt():t==="fa"?xMt():t==="ar"?wMt():t==="es"?kMt():t==="hi"?SMt():bMt()}),EMt=()=>"Current",NMt=()=>"当前",zMt=()=>"فعلی",jMt=()=>"الحالي",TMt=()=>"Actual",AMt=()=>"मौजूदा",RMt=((e={},n={})=>{const t=n.locale??z();return t==="zh-CN"?NMt():t==="fa"?zMt():t==="ar"?jMt():t==="es"?TMt():t==="hi"?AMt():EMt()}),MMt=()=>"Currently off:",OMt=()=>"当前已关闭:",DMt=()=>"اکنون خاموش است:",LMt=()=>"معطّل حاليًا:",IMt=()=>"Desactivado actualmente:",$Mt=()=>"फ़िलहाल बंद:",BMt=((e={},n={})=>{const t=n.locale??z();return t==="zh-CN"?OMt():t==="fa"?DMt():t==="ar"?LMt():t==="es"?IMt():t==="hi"?$Mt():MMt()}),PMt=()=>"Custom flavor",FMt=()=>"自定义规格",HMt=()=>"پیکربندی سفارشی",qMt=()=>"تكوين موارد مخصّص",UMt=()=>"Opción personalizada",GMt=()=>"कस्टम फ़्लेवर",VMt=((e={},n={})=>{const t=n.locale??z();return t==="zh-CN"?FMt():t==="fa"?HMt():t==="ar"?qMt():t==="es"?UMt():t==="hi"?GMt():PMt()}),KMt=()=>"Custom flavor…",WMt=()=>"自定义规格…",QMt=()=>"پیکربندی سفارشی…",XMt=()=>"تكوين موارد مخصّص…",YMt=()=>"Opción personalizada…",ZMt=()=>"कस्टम फ़्लेवर…",JMt=((e={},n={})=>{const t=n.locale??z();return t==="zh-CN"?WMt():t==="fa"?QMt():t==="ar"?XMt():t==="es"?YMt():t==="hi"?ZMt():KMt()}),eOt=()=>"Data directory",tOt=()=>"数据目录",nOt=()=>"پوشهٔ داده",rOt=()=>"دليل البيانات",sOt=()=>"Directorio de datos",iOt=()=>"डेटा डायरेक्टरी",aOt=((e={},n={})=>{const t=n.locale??z();return t==="zh-CN"?tOt():t==="fa"?nOt():t==="ar"?rOt():t==="es"?sOt():t==="hi"?iOt():eOt()}),oOt=()=>"default",lOt=()=>"默认",cOt=()=>"پیش‌فرض",uOt=()=>"افتراضي",_Ot=()=>"predeterminado",fOt=()=>"डिफ़ॉल्ट",dOt=((e={},n={})=>{const t=n.locale??z();return t==="zh-CN"?lOt():t==="fa"?cOt():t==="ar"?uOt():t==="es"?_Ot():t==="hi"?fOt():oOt()}),hOt=()=>"Default",pOt=()=>"默认",mOt=()=>"پیش‌فرض",gOt=()=>"الافتراضي",vOt=()=>"Predeterminado",bOt=()=>"डिफ़ॉल्ट",QD=((e={},n={})=>{const t=n.locale??z();return t==="zh-CN"?pOt():t==="fa"?mOt():t==="ar"?gOt():t==="es"?vOt():t==="hi"?bOt():hOt()}),yOt=()=>"Default destination",xOt=()=>"默认目标",wOt=()=>"مقصد پیش‌فرض",kOt=()=>"الوجهة الافتراضية",SOt=()=>"Destino predeterminado",COt=()=>"डिफ़ॉल्ट गंतव्य",EOt=((e={},n={})=>{const t=n.locale??z();return t==="zh-CN"?xOt():t==="fa"?wOt():t==="ar"?kOt():t==="es"?SOt():t==="hi"?COt():yOt()}),NOt=()=>"Detecting hardware…",zOt=()=>"正在检测硬件…",jOt=()=>"در حال شناسایی سخت‌افزار…",TOt=()=>"جارٍ اكتشاف العتاد…",AOt=()=>"Detectando hardware…",ROt=()=>"हार्डवेयर पहचाना जा रहा है…",MOt=((e={},n={})=>{const t=n.locale??z();return t==="zh-CN"?zOt():t==="fa"?jOt():t==="ar"?TOt():t==="es"?AOt():t==="hi"?ROt():NOt()}),OOt=()=>"Detecting harnesses…",DOt=()=>"正在检测智能体工具…",LOt=()=>"در حال شناسایی ابزارهای عامل…",IOt=()=>"جارٍ اكتشاف أدوات البرمجة…",$Ot=()=>"Detectando agentes…",BOt=()=>"हार्नेस पहचाने जा रहे हैं…",POt=((e={},n={})=>{const t=n.locale??z();return t==="zh-CN"?DOt():t==="fa"?LOt():t==="ar"?IOt():t==="es"?$Ot():t==="hi"?BOt():OOt()}),FOt=()=>"Disabling syncing stops automatic pushes. Compute continues to use direct source snapshots. This does not delete the GitHub repository or code already pushed.",HOt=()=>"关闭同步会停止自动推送。算力执行仍使用直接的源代码快照。此操作不会删除 GitHub 仓库或已推送的代码。",qOt=()=>"خاموش کردن همگام‌سازی، push خودکار را متوقف می‌کند. رایانش همچنان از snapshot مستقیم منبع استفاده می‌کند. این کار مخزن GitHub یا کدهای ازپیش pushشده را حذف نمی‌کند.",UOt=()=>"يوقف تعطيل المزامنة عمليات الرفع التلقائية. تواصل الحوسبة استخدام لقطات المصدر المباشرة. لا يحذف هذا مستودع GitHub أو الشيفرة التي رُفعت إليه مسبقًا.",GOt=()=>"Desactivar la sincronización detiene los push automáticos. El cómputo sigue usando snapshots directos del código fuente. No se elimina el repositorio de GitHub ni el código que ya se subió.",VOt=()=>"सिंकिंग बंद करने से ऑटोमैटिक पुश रुक जाते हैं। कंप्यूट सीधे सोर्स स्नैपशॉट का इस्तेमाल करता रहेगा। इससे GitHub रिपॉज़िटरी या पहले से पुश किया गया कोड नहीं मिटता।",KOt=((e={},n={})=>{const t=n.locale??z();return t==="zh-CN"?HOt():t==="fa"?qOt():t==="ar"?UOt():t==="es"?GOt():t==="hi"?VOt():FOt()}),WOt=()=>"Effective URL",QOt=()=>"实际使用的网址",XOt=()=>"نشانی مؤثر",YOt=()=>"الرابط الفعّال",ZOt=()=>"URL efectiva",JOt=()=>"प्रभावी URL",eDt=((e={},n={})=>{const t=n.locale??z();return t==="zh-CN"?QOt():t==="fa"?XOt():t==="ar"?YOt():t==="es"?ZOt():t==="hi"?JOt():WOt()}),tDt=()=>"Enable GitHub syncing for new projects",nDt=()=>"为新项目启用 GitHub 同步",rDt=()=>"فعال‌سازی همگام‌سازی GitHub برای پروژه‌های جدید",sDt=()=>"تفعيل مزامنة GitHub للمشاريع الجديدة",iDt=()=>"Activar la sincronización con GitHub en proyectos nuevos",aDt=()=>"नए प्रोजेक्ट के लिए GitHub सिंकिंग चालू करें",lz=((e={},n={})=>{const t=n.locale??z();return t==="zh-CN"?nDt():t==="fa"?rDt():t==="ar"?sDt():t==="es"?iDt():t==="hi"?aDt():tDt()}),oDt=()=>"Environment",lDt=()=>"环境",cDt=()=>"محیط",uDt=()=>"البيئة",_Dt=()=>"Entorno",fDt=()=>"एनवायरनमेंट",XD=((e={},n={})=>{const t=n.locale??z();return t==="zh-CN"?lDt():t==="fa"?cDt():t==="ar"?uDt():t==="es"?_Dt():t==="hi"?fDt():oDt()}),dDt=()=>"Failed",hDt=()=>"失败",pDt=()=>"ناموفق",mDt=()=>"فشل",gDt=()=>"Error",vDt=()=>"विफल",Fk=((e={},n={})=>{const t=n.locale??z();return t==="zh-CN"?hDt():t==="fa"?pDt():t==="ar"?mDt():t==="es"?gDt():t==="hi"?vDt():dDt()}),bDt=()=>"General",yDt=()=>"常规",xDt=()=>"عمومی",wDt=()=>"عام",kDt=()=>"General",SDt=()=>"सामान्य",CDt=((e={},n={})=>{const t=n.locale??z();return t==="zh-CN"?yDt():t==="fa"?xDt():t==="ar"?wDt():t==="es"?kDt():t==="hi"?SDt():bDt()}),EDt=()=>"GitHub publishing",NDt=()=>"GitHub 发布",zDt=()=>"انتشار در GitHub",jDt=()=>"النشر على GitHub",TDt=()=>"Publicación en GitHub",ADt=()=>"GitHub प्रकाशन",RDt=((e={},n={})=>{const t=n.locale??z();return t==="zh-CN"?NDt():t==="fa"?zDt():t==="ar"?jDt():t==="es"?TDt():t==="hi"?ADt():EDt()}),MDt=()=>"Git token",ODt=()=>"Git 令牌",DDt=()=>"توکن Git",LDt=()=>"رمز Git",IDt=()=>"Token de Git",$Dt=()=>"Git टोकन",BDt=((e={},n={})=>{const t=n.locale??z();return t==="zh-CN"?ODt():t==="fa"?DDt():t==="ar"?LDt():t==="es"?IDt():t==="hi"?$Dt():MDt()}),PDt=()=>"Harnesses",FDt=()=>"智能体工具",HDt=()=>"ابزارهای عامل",qDt=()=>"أدوات البرمجة",UDt=()=>"Agentes",GDt=()=>"हार्नेस",i3=((e={},n={})=>{const t=n.locale??z();return t==="zh-CN"?FDt():t==="fa"?HDt():t==="ar"?qDt():t==="es"?UDt():t==="hi"?GDt():PDt()}),VDt=()=>"hf_…",KDt=()=>"hf_…",WDt=()=>"hf_…",QDt=()=>"hf_…",XDt=()=>"hf_…",YDt=()=>"hf_…",ZDt=((e={},n={})=>{const t=n.locale??z();return t==="zh-CN"?KDt():t==="fa"?WDt():t==="ar"?QDt():t==="es"?XDt():t==="hi"?YDt():VDt()}),JDt=()=>"HF_TOKEN is set in the environment and overrides any token saved here.",eLt=()=>"环境中已设置 HF_TOKEN,它会覆盖此处保存的令牌。",tLt=()=>"مقدار HF_TOKEN در محیط تنظیم شده و هر توکن ذخیره‌شده در اینجا را بازنویسی می‌کند.",nLt=()=>"‏HF_TOKEN مضبوط في البيئة ويتجاوز أي رمز محفوظ هنا.",rLt=()=>"HF_TOKEN está definido en el entorno y tiene prioridad sobre cualquier token guardado aquí.",sLt=()=>"HF_TOKEN एनवायरनमेंट में सेट है और यहाँ सेव किसी भी टोकन को ओवरराइड करता है।",iLt=((e={},n={})=>{const t=n.locale??z();return t==="zh-CN"?eLt():t==="fa"?tLt():t==="ar"?nLt():t==="es"?rLt():t==="hi"?sLt():JDt()}),aLt=()=>"Initialize Git",oLt=()=>"初始化 Git",lLt=()=>"راه‌اندازی Git",cLt=()=>"تهيئة Git",uLt=()=>"Inicializar Git",_Lt=()=>"Git शुरू करें",fLt=((e={},n={})=>{const t=n.locale??z();return t==="zh-CN"?oLt():t==="fa"?lLt():t==="ar"?cLt():t==="es"?uLt():t==="hi"?_Lt():aLt()}),dLt=()=>"Install",hLt=()=>"安装",pLt=()=>"نصب",mLt=()=>"تثبيت",gLt=()=>"Instalar",vLt=()=>"इंस्टॉल करें",YD=((e={},n={})=>{const t=n.locale??z();return t==="zh-CN"?hLt():t==="fa"?pLt():t==="ar"?mLt():t==="es"?gLt():t==="hi"?vLt():dLt()}),bLt=()=>"Install broken",yLt=()=>"安装损坏",xLt=()=>"نصب خراب است",wLt=()=>"التثبيت معطوب",kLt=()=>"Instalación dañada",SLt=()=>"इंस्टॉल खराब है",CLt=((e={},n={})=>{const t=n.locale??z();return t==="zh-CN"?yLt():t==="fa"?xLt():t==="ar"?wLt():t==="es"?kLt():t==="hi"?SLt():bLt()}),ELt=()=>"Install GitHub CLI",NLt=()=>"安装 GitHub CLI",zLt=()=>"نصب GitHub CLI",jLt=()=>"تثبيت واجهة GitHub لسطر الأوامر",TLt=()=>"Instalar GitHub CLI",ALt=()=>"GitHub CLI इंस्टॉल करें",RLt=((e={},n={})=>{const t=n.locale??z();return t==="zh-CN"?NLt():t==="fa"?zLt():t==="ar"?jLt():t==="es"?TLt():t==="hi"?ALt():ELt()}),MLt=()=>"Install updates automatically",OLt=()=>"自动安装更新",DLt=()=>"نصب خودکار به‌روزرسانی‌ها",LLt=()=>"تثبيت التحديثات تلقائيًا",ILt=()=>"Instalar actualizaciones automáticamente",$Lt=()=>"अपडेट अपने आप इंस्टॉल करें",cz=((e={},n={})=>{const t=n.locale??z();return t==="zh-CN"?OLt():t==="fa"?DLt():t==="ar"?LLt():t==="es"?ILt():t==="hi"?$Lt():MLt()}),BLt=()=>"Instance history",PLt=()=>"实例历史",FLt=()=>"تاریخچهٔ نمونه‌ها",HLt=()=>"سجل المثيلات",qLt=()=>"Historial de instancias",ULt=()=>"इंस्टेंस इतिहास",GLt=((e={},n={})=>{const t=n.locale??z();return t==="zh-CN"?PLt():t==="fa"?FLt():t==="ar"?HLt():t==="es"?qLt():t==="hi"?ULt():BLt()}),VLt=()=>"Invalid Token",KLt=()=>"令牌无效",WLt=()=>"توکن نامعتبر",QLt=()=>"رمز غير صالح",XLt=()=>"Token no válido",YLt=()=>"अमान्य टोकन",ZLt=((e={},n={})=>{const t=n.locale??z();return t==="zh-CN"?KLt():t==="fa"?WLt():t==="ar"?QLt():t==="es"?XLt():t==="hi"?YLt():VLt()}),JLt=()=>"Jobs / Dashboard URL",eIt=()=>"Jobs / 控制台网址",tIt=()=>"نشانی Jobs / داشبورد",nIt=()=>"رابط المهام / لوحة التحكم",rIt=()=>"URL de jobs / dashboard",sIt=()=>"Jobs / डैशबोर्ड URL",iIt=((e={},n={})=>{const t=n.locale??z();return t==="zh-CN"?eIt():t==="fa"?tIt():t==="ar"?nIt():t==="es"?rIt():t==="hi"?sIt():JLt()}),aIt=()=>"kubectl not found",oIt=()=>"未找到 kubectl",lIt=()=>"kubectl پیدا نشد",cIt=()=>"لم يُعثر على kubectl",uIt=()=>"No se encontró kubectl",_It=()=>"kubectl नहीं मिला",fIt=((e={},n={})=>{const t=n.locale??z();return t==="zh-CN"?oIt():t==="fa"?lIt():t==="ar"?cIt():t==="es"?uIt():t==="hi"?_It():aIt()}),dIt=()=>"Latest",hIt=()=>"最新版本",pIt=()=>"جدیدترین",mIt=()=>"الأحدث",gIt=()=>"Última",vIt=()=>"नवीनतम",bIt=((e={},n={})=>{const t=n.locale??z();return t==="zh-CN"?hIt():t==="fa"?pIt():t==="ar"?mIt():t==="es"?gIt():t==="hi"?vIt():dIt()}),yIt=()=>"Loading…",xIt=()=>"正在加载…",wIt=()=>"در حال بارگیری…",kIt=()=>"جارٍ التحميل…",SIt=()=>"Cargando…",CIt=()=>"लोड हो रहा है…",zu=((e={},n={})=>{const t=n.locale??z();return t==="zh-CN"?xIt():t==="fa"?wIt():t==="ar"?kIt():t==="es"?SIt():t==="hi"?CIt():yIt()}),EIt=()=>"Loading Ray settings…",NIt=()=>"正在加载 Ray 设置…",zIt=()=>"در حال بارگیری تنظیمات Ray…",jIt=()=>"جارٍ تحميل إعدادات Ray…",TIt=()=>"Cargando configuración de Ray…",AIt=()=>"Ray सेटिंग्स लोड हो रही हैं…",RIt=((e={},n={})=>{const t=n.locale??z();return t==="zh-CN"?NIt():t==="fa"?zIt():t==="ar"?jIt():t==="es"?TIt():t==="hi"?AIt():EIt()}),MIt=()=>"Loading slurm settings…",OIt=()=>"正在加载 Slurm 设置…",DIt=()=>"در حال بارگیری تنظیمات Slurm…",LIt=()=>"جارٍ تحميل إعدادات slurm…",IIt=()=>"Cargando configuración de Slurm…",$It=()=>"Slurm सेटिंग्स लोड हो रही हैं…",BIt=((e={},n={})=>{const t=n.locale??z();return t==="zh-CN"?OIt():t==="fa"?DIt():t==="ar"?LIt():t==="es"?IIt():t==="hi"?$It():MIt()}),PIt=()=>"Loading status…",FIt=()=>"正在加载状态…",HIt=()=>"در حال بارگیری وضعیت…",qIt=()=>"جارٍ تحميل الحالة…",UIt=()=>"Cargando estado…",GIt=()=>"स्थिति लोड हो रही है…",VIt=((e={},n={})=>{const t=n.locale??z();return t==="zh-CN"?FIt():t==="fa"?HIt():t==="ar"?qIt():t==="es"?UIt():t==="hi"?GIt():PIt()}),KIt=()=>"Local only",WIt=()=>"仅本地",QIt=()=>"فقط محلی",XIt=()=>"محلي فقط",YIt=()=>"Solo local",ZIt=()=>"केवल लोकल",JIt=((e={},n={})=>{const t=n.locale??z();return t==="zh-CN"?WIt():t==="fa"?QIt():t==="ar"?XIt():t==="es"?YIt():t==="hi"?ZIt():KIt()}),e$t=()=>"Local repository",t$t=()=>"本地仓库",n$t=()=>"مخزن محلی",r$t=()=>"مستودع محلي",s$t=()=>"Repositorio local",i$t=()=>"लोकल रिपॉज़िटरी",a$t=((e={},n={})=>{const t=n.locale??z();return t==="zh-CN"?t$t():t==="fa"?n$t():t==="ar"?r$t():t==="es"?s$t():t==="hi"?i$t():e$t()}),o$t=()=>"Login node",l$t=()=>"登录节点",c$t=()=>"گرهٔ ورود",u$t=()=>"عقدة الدخول",_$t=()=>"Nodo de acceso",f$t=()=>"लॉगिन नोड",d$t=((e={},n={})=>{const t=n.locale??z();return t==="zh-CN"?l$t():t==="fa"?c$t():t==="ar"?u$t():t==="es"?_$t():t==="hi"?f$t():o$t()}),h$t=()=>"Make GitHub syncing the default?",p$t=()=>"将 GitHub 同步设为默认值?",m$t=()=>"همگام‌سازی GitHub پیش‌فرض شود؟",g$t=()=>"جعل مزامنة GitHub افتراضية؟",v$t=()=>"¿Activar la sincronización con GitHub de forma predeterminada?",b$t=()=>"GitHub सिंकिंग को डिफ़ॉल्ट बनाएं?",y$t=((e={},n={})=>{const t=n.locale??z();return t==="zh-CN"?p$t():t==="fa"?m$t():t==="ar"?g$t():t==="es"?v$t():t==="hi"?b$t():h$t()}),x$t=()=>"Missing bash/tar",w$t=()=>"缺少 bash/tar",k$t=()=>"bash/tar موجود نیست",S$t=()=>"‏bash/tar مفقودان",C$t=()=>"Falta bash/tar",E$t=()=>"bash/tar गुम है",N$t=((e={},n={})=>{const t=n.locale??z();return t==="zh-CN"?w$t():t==="fa"?k$t():t==="ar"?S$t():t==="es"?C$t():t==="hi"?E$t():x$t()}),z$t=()=>"More compute options",j$t=()=>"更多算力选项",T$t=()=>"گزینه‌های رایانشی بیشتر",A$t=()=>"خيارات حوسبة إضافية",R$t=()=>"Más opciones de cómputo",M$t=()=>"और कंप्यूट विकल्प",O$t=((e={},n={})=>{const t=n.locale??z();return t==="zh-CN"?j$t():t==="fa"?T$t():t==="ar"?A$t():t==="es"?R$t():t==="hi"?M$t():z$t()}),D$t=()=>"Move failed:",L$t=()=>"移动失败:",I$t=()=>"انتقال ناموفق بود:",$$t=()=>"فشل النقل:",B$t=()=>"Error al mover:",P$t=()=>"स्थानांतरण विफल:",F$t=((e={},n={})=>{const t=n.locale??z();return t==="zh-CN"?L$t():t==="fa"?I$t():t==="ar"?$$t():t==="es"?B$t():t==="hi"?P$t():D$t()}),H$t=()=>"Moved. orx is now using the new location.",q$t=()=>"已移动。orx 现在使用新位置。",U$t=()=>"منتقل شد. orx اکنون از محل جدید استفاده می‌کند.",G$t=()=>"تم النقل. يستخدم orx الآن الموقع الجديد.",V$t=()=>"Movido. orx ya usa la nueva ubicación.",K$t=()=>"स्थानांतरित हो गया। orx अब नए स्थान का उपयोग कर रहा है।",W$t=((e={},n={})=>{const t=n.locale??z();return t==="zh-CN"?q$t():t==="fa"?U$t():t==="ar"?G$t():t==="es"?V$t():t==="hi"?K$t():H$t()}),Q$t=()=>"Namespace",X$t=()=>"命名空间",Y$t=()=>"فضای نام",Z$t=()=>"مساحة الأسماء",J$t=()=>"Namespace",eBt=()=>"नेमस्पेस",tBt=((e={},n={})=>{const t=n.locale??z();return t==="zh-CN"?X$t():t==="fa"?Y$t():t==="ar"?Z$t():t==="es"?J$t():t==="hi"?eBt():Q$t()}),nBt=()=>"New location",rBt=()=>"新位置",sBt=()=>"محل جدید",iBt=()=>"الموقع الجديد",aBt=()=>"Nueva ubicación",oBt=()=>"नया स्थान",lBt=((e={},n={})=>{const t=n.locale??z();return t==="zh-CN"?rBt():t==="fa"?sBt():t==="ar"?iBt():t==="es"?aBt():t==="hi"?oBt():nBt()}),cBt=()=>"New releases are downloaded and installed in the background. Turning this off keeps the notice but leaves the install to you.",uBt=()=>"新版本会在后台下载并安装。关闭后仍会显示通知,但需要手动安装。",_Bt=()=>"نسخه‌های جدید در پس‌زمینه دریافت و نصب می‌شوند. خاموش کردن این گزینه اعلان را نگه می‌دارد، اما نصب را به شما می‌سپارد.",fBt=()=>"تُنزَّل الإصدارات الجديدة وتُثبَّت في الخلفية. إيقاف هذا يبقي الإشعار لكنه يترك التثبيت لك.",dBt=()=>"Las nuevas versiones se descargan e instalan en segundo plano. Si lo desactivas, verás el aviso, pero tendrás que instalarlas tú.",hBt=()=>"नए रिलीज़ बैकग्राउंड में डाउनलोड और इंस्टॉल होते हैं। इसे बंद करने पर सूचना बनी रहेगी, पर इंस्टॉल करना आप पर निर्भर होगा।",pBt=((e={},n={})=>{const t=n.locale??z();return t==="zh-CN"?uBt():t==="fa"?_Bt():t==="ar"?fBt():t==="es"?dBt():t==="hi"?hBt():cBt()}),mBt=()=>"New variable key",gBt=()=>"新变量键名",vBt=()=>"کلید متغیر جدید",bBt=()=>"مفتاح المتغيّر الجديد",yBt=()=>"Nombre de la nueva variable",xBt=()=>"नई वेरिएबल की",wBt=((e={},n={})=>{const t=n.locale??z();return t==="zh-CN"?gBt():t==="fa"?vBt():t==="ar"?bBt():t==="es"?yBt():t==="hi"?xBt():mBt()}),kBt=()=>"New variable value",SBt=()=>"新变量值",CBt=()=>"مقدار متغیر جدید",EBt=()=>"قيمة المتغيّر الجديد",NBt=()=>"Valor de la nueva variable",zBt=()=>"नई वेरिएबल वैल्यू",jBt=((e={},n={})=>{const t=n.locale??z();return t==="zh-CN"?SBt():t==="fa"?CBt():t==="ar"?EBt():t==="es"?NBt():t==="hi"?zBt():kBt()}),TBt=()=>"No code, prompts, file contents, or account identifiers are sent.",ABt=()=>"不会发送代码、提示词、文件内容或账户标识符。",RBt=()=>"هیچ کد، پرامپت، محتوای فایل یا شناسهٔ حسابی ارسال نمی‌شود.",MBt=()=>"لا تُرسَل أي شيفرة أو طلبات أو محتويات ملفات أو معرّفات حسابات.",OBt=()=>"No se envía código, prompts, contenido de archivos ni identificadores de cuenta.",DBt=()=>"कोई कोड, प्रॉम्प्ट, फ़ाइल सामग्री, या खाता पहचानकर्ता नहीं भेजे जाते।",LBt=((e={},n={})=>{const t=n.locale??z();return t==="zh-CN"?ABt():t==="fa"?RBt():t==="ar"?MBt():t==="es"?OBt():t==="hi"?DBt():TBt()}),IBt=()=>"No hosts found in ~/.ssh/config.",$Bt=()=>"在 ~/.ssh/config 中未找到主机。",BBt=()=>"میزبانی در ‎~/.ssh/config پیدا نشد.",PBt=()=>"لم يُعثر على مضيفين في ‎~/.ssh/config.",FBt=()=>"No se encontraron hosts en ~/.ssh/config.",HBt=()=>"~/.ssh/config में कोई होस्ट नहीं मिला।",qBt=((e={},n={})=>{const t=n.locale??z();return t==="zh-CN"?$Bt():t==="fa"?BBt():t==="ar"?PBt():t==="es"?FBt():t==="hi"?HBt():IBt()}),UBt=()=>"No job-create permission",GBt=()=>"没有创建 Job 的权限",VBt=()=>"مجوز ساخت Job وجود ندارد",KBt=()=>"لا صلاحية لإنشاء المهام",WBt=()=>"Sin permiso para crear jobs",QBt=()=>"जॉब बनाने की अनुमति नहीं",XBt=((e={},n={})=>{const t=n.locale??z();return t==="zh-CN"?GBt():t==="fa"?VBt():t==="ar"?KBt():t==="es"?WBt():t==="hi"?QBt():UBt()}),YBt=()=>"No Write Permissions",ZBt=()=>"无写入权限",JBt=()=>"بدون مجوز نوشتن",ePt=()=>"لا صلاحيات كتابة",tPt=()=>"Sin permisos de escritura",nPt=()=>"लिखने की अनुमति नहीं",rPt=((e={},n={})=>{const t=n.locale??z();return t==="zh-CN"?ZBt():t==="fa"?JBt():t==="ar"?ePt():t==="es"?tPt():t==="hi"?nPt():YBt()}),sPt=()=>"No key on this computer to register — load a registered key with",iPt=()=>"此计算机上没有可注册的密钥——使用以下命令加载已注册的密钥:",aPt=()=>"کلیدی برای ثبت روی این رایانه نیست — کلید ثبت‌شده را با این فرمان بار کنید:",oPt=()=>"لا مفتاح على هذا الحاسوب لتسجيله — حمّل مفتاحًا مسجّلًا عبر",lPt=()=>"No hay ninguna clave en este equipo para registrar — carga una clave registrada con",cPt=()=>"इस कंप्यूटर पर रजिस्टर करने के लिए कोई की नहीं है — इसके साथ एक रजिस्टर्ड की लोड करें",uPt=((e={},n={})=>{const t=n.locale??z();return t==="zh-CN"?iPt():t==="fa"?aPt():t==="ar"?oPt():t==="es"?lPt():t==="hi"?cPt():sPt()}),_Pt=()=>"No key on this computer yet — create one with",fPt=()=>"此计算机上还没有密钥——使用以下命令创建:",dPt=()=>"هنوز کلیدی روی این رایانه نیست — با این فرمان یکی بسازید:",hPt=()=>"لا مفتاح على هذا الحاسوب بعد — أنشئ واحدًا عبر",pPt=()=>"Aún no hay ninguna clave en este equipo — crea una con",mPt=()=>"इस कंप्यूटर पर अभी तक कोई की नहीं है — इसके साथ एक बनाएं",gPt=((e={},n={})=>{const t=n.locale??z();return t==="zh-CN"?fPt():t==="fa"?dPt():t==="ar"?hPt():t==="es"?pPt():t==="hi"?mPt():_Pt()}),vPt=()=>"No Slurm CLI",bPt=()=>"无 Slurm CLI",yPt=()=>"بدون CLI اسلورم",xPt=()=>"لا توجد واجهة Slurm لسطر الأوامر",wPt=()=>"Sin CLI de Slurm",kPt=()=>"कोई Slurm CLI नहीं",SPt=((e={},n={})=>{const t=n.locale??z();return t==="zh-CN"?bPt():t==="fa"?yPt():t==="ar"?xPt():t==="es"?wPt():t==="hi"?kPt():vPt()}),CPt=()=>"None registered",EPt=()=>"未注册任何密钥",NPt=()=>"هیچ‌کدام ثبت نشده",zPt=()=>"لا شيء مسجّل",jPt=()=>"Ninguna registrada",TPt=()=>"कोई रजिस्टर्ड नहीं",APt=((e={},n={})=>{const t=n.locale??z();return t==="zh-CN"?EPt():t==="fa"?NPt():t==="ar"?zPt():t==="es"?jPt():t==="hi"?TPt():CPt()}),RPt=()=>"Not checked",MPt=()=>"未检查",OPt=()=>"بررسی نشده",DPt=()=>"لم يُفحص",LPt=()=>"Sin comprobar",IPt=()=>"जाँचा नहीं गया",ZD=((e={},n={})=>{const t=n.locale??z();return t==="zh-CN"?MPt():t==="fa"?OPt():t==="ar"?DPt():t==="es"?LPt():t==="hi"?IPt():RPt()}),$Pt=()=>"Not configured",BPt=()=>"未配置",PPt=()=>"پیکربندی نشده",FPt=()=>"غير مُعَد",HPt=()=>"Sin configurar",qPt=()=>"कॉन्फ़िगर नहीं किया गया",vb=((e={},n={})=>{const t=n.locale??z();return t==="zh-CN"?BPt():t==="fa"?PPt():t==="ar"?FPt():t==="es"?HPt():t==="hi"?qPt():$Pt()}),UPt=()=>"Not installed",GPt=()=>"未安装",VPt=()=>"نصب نیست",KPt=()=>"غير مثبّت",WPt=()=>"No instalado",QPt=()=>"इंस्टॉल नहीं है",XPt=((e={},n={})=>{const t=n.locale??z();return t==="zh-CN"?GPt():t==="fa"?VPt():t==="ar"?KPt():t==="es"?WPt():t==="hi"?QPt():UPt()}),YPt=()=>"Not now",ZPt=()=>"暂不",JPt=()=>"اکنون نه",eFt=()=>"ليس الآن",tFt=()=>"Ahora no",nFt=()=>"अभी नहीं",rFt=((e={},n={})=>{const t=n.locale??z();return t==="zh-CN"?ZPt():t==="fa"?JPt():t==="ar"?eFt():t==="es"?tFt():t==="hi"?nFt():YPt()}),sFt=()=>"Not on this computer",iFt=()=>"不在此计算机上",aFt=()=>"روی این رایانه نیست",oFt=()=>"ليس على هذا الحاسوب",lFt=()=>"No en este equipo",cFt=()=>"इस कंप्यूटर पर नहीं",uFt=((e={},n={})=>{const t=n.locale??z();return t==="zh-CN"?iFt():t==="fa"?aFt():t==="ar"?oFt():t==="es"?lFt():t==="hi"?cFt():sFt()}),_Ft=()=>"Not set (pass --host per launch)",fFt=()=>"未设置(每次启动时传入 --host)",dFt=()=>"تنظیم نشده (در هر اجرا ‎--host بدهید)",hFt=()=>"غير مضبوط (مرّر ‎--host‎ عند كل تشغيل)",pFt=()=>"Sin definir (pasa --host en cada lanzamiento)",mFt=()=>"सेट नहीं (हर लॉन्च पर --host दें)",gFt=((e={},n={})=>{const t=n.locale??z();return t==="zh-CN"?fFt():t==="fa"?dFt():t==="ar"?hFt():t==="es"?pFt():t==="hi"?mFt():_Ft()}),vFt=()=>"Not signed in",bFt=()=>"未登录",yFt=()=>"وارد نشده",xFt=()=>"لم يتم تسجيل الدخول",wFt=()=>"Sin iniciar sesión",kFt=()=>"साइन इन नहीं है",JD=((e={},n={})=>{const t=n.locale??z();return t==="zh-CN"?bFt():t==="fa"?yFt():t==="ar"?xFt():t==="es"?wFt():t==="hi"?kFt():vFt()}),SFt=()=>"On this computer",CFt=()=>"在此计算机上",EFt=()=>"روی این رایانه",NFt=()=>"على هذا الحاسوب",zFt=()=>"En este equipo",jFt=()=>"इस कंप्यूटर पर",TFt=((e={},n={})=>{const t=n.locale??z();return t==="zh-CN"?CFt():t==="fa"?EFt():t==="ar"?NFt():t==="es"?zFt():t==="hi"?jFt():SFt()}),AFt=()=>"Open a project to inspect its repository and GitHub publication state.",RFt=()=>"打开项目以查看其仓库和 GitHub 发布状态。",MFt=()=>"پروژه‌ای را باز کنید تا مخزن و وضعیت انتشار GitHub آن را ببینید.",OFt=()=>"افتح مشروعًا لفحص مستودعه وحالة نشره على GitHub.",DFt=()=>"Abre un proyecto para ver su repositorio y su estado de publicación en GitHub.",LFt=()=>"इसकी रिपॉज़िटरी और GitHub प्रकाशन स्थिति देखने के लिए एक प्रोजेक्ट खोलें।",IFt=((e={},n={})=>{const t=n.locale??z();return t==="zh-CN"?RFt():t==="fa"?MFt():t==="ar"?OFt():t==="es"?DFt():t==="hi"?LFt():AFt()}),$Ft=()=>"Open job page",BFt=()=>"打开作业页面",PFt=()=>"باز کردن صفحهٔ کار",FFt=()=>"فتح صفحة المهمة",HFt=()=>"Abrir página del job",qFt=()=>"जॉब पेज खोलें",uz=((e={},n={})=>{const t=n.locale??z();return t==="zh-CN"?BFt():t==="fa"?PFt():t==="ar"?FFt():t==="es"?HFt():t==="hi"?qFt():$Ft()}),UFt=()=>"Open on GitHub",GFt=()=>"在 GitHub 上打开",VFt=()=>"باز کردن در GitHub",KFt=()=>"فتح على GitHub",WFt=()=>"Abrir en GitHub",QFt=()=>"GitHub पर खोलें",_z=((e={},n={})=>{const t=n.locale??z();return t==="zh-CN"?GFt():t==="fa"?VFt():t==="ar"?KFt():t==="es"?WFt():t==="hi"?QFt():UFt()}),XFt=()=>", or create one with",YFt=()=>",或使用以下命令创建:",ZFt=()=>"، یا با این فرمان یکی بسازید:",JFt=()=>"، أو أنشئ واحدًا عبر",eHt=()=>", o crea una con",tHt=()=>", या इसके साथ एक बनाएं",nHt=((e={},n={})=>{const t=n.locale??z();return t==="zh-CN"?YFt():t==="fa"?ZFt():t==="ar"?JFt():t==="es"?eHt():t==="hi"?tHt():XFt()}),rHt=()=>"Org",sHt=()=>"组织",iHt=()=>"سازمان",aHt=()=>"المؤسسة",oHt=()=>"Org.",lHt=()=>"संगठन",cHt=((e={},n={})=>{const t=n.locale??z();return t==="zh-CN"?sHt():t==="fa"?iHt():t==="ar"?aHt():t==="es"?oHt():t==="hi"?lHt():rHt()}),uHt=()=>"Orgs",_Ht=()=>"组织",fHt=()=>"سازمان‌ها",dHt=()=>"المؤسسات",hHt=()=>"Orgs.",pHt=()=>"संगठन",mHt=((e={},n={})=>{const t=n.locale??z();return t==="zh-CN"?_Ht():t==="fa"?fHt():t==="ar"?dHt():t==="es"?hHt():t==="hi"?pHt():uHt()}),gHt=()=>"orx can't update this install",vHt=()=>"orx 无法更新此安装",bHt=()=>"orx نمی‌تواند این نصب را به‌روزرسانی کند",yHt=()=>"لا يستطيع orx تحديث هذا التثبيت",xHt=()=>"orx no puede actualizar esta instalación",wHt=()=>"orx इस इंस्टॉल को अपडेट नहीं कर सकता",kHt=((e={},n={})=>{const t=n.locale??z();return t==="zh-CN"?vHt():t==="fa"?bHt():t==="ar"?yHt():t==="es"?xHt():t==="hi"?wHt():gHt()}),SHt=()=>"Overleaf",CHt=()=>"Overleaf",EHt=()=>"Overleaf",NHt=()=>"Overleaf",zHt=()=>"Overleaf",jHt=()=>"Overleaf",eL=((e={},n={})=>{const t=n.locale??z();return t==="zh-CN"?CHt():t==="fa"?EHt():t==="ar"?NHt():t==="es"?zHt():t==="hi"?jHt():SHt()}),THt=()=>"Overleaf Git authentication token",AHt=()=>"Overleaf Git 身份验证令牌",RHt=()=>"توکن احراز هویت Git در Overleaf",MHt=()=>"رمز مصادقة Git لـ Overleaf",OHt=()=>"Token de autenticación de Git de Overleaf",DHt=()=>"Overleaf Git प्रमाणीकरण टोकन",LHt=((e={},n={})=>{const t=n.locale??z();return t==="zh-CN"?AHt():t==="fa"?RHt():t==="ar"?MHt():t==="es"?OHt():t==="hi"?DHt():THt()}),IHt=()=>"Overridden by env",$Ht=()=>"已被环境变量覆盖",BHt=()=>"بازنویسی‌شده توسط محیط",PHt=()=>"متجاوَز عبر متغيّر البيئة",FHt=()=>"Sobrescrito por el entorno",HHt=()=>"env द्वारा ओवरराइड किया गया",qHt=((e={},n={})=>{const t=n.locale??z();return t==="zh-CN"?$Ht():t==="fa"?BHt():t==="ar"?PHt():t==="es"?FHt():t==="hi"?HHt():IHt()}),UHt=()=>"Partition",GHt=()=>"分区",VHt=()=>"پارتیشن",KHt=()=>"القسم",WHt=()=>"Partición",QHt=()=>"पार्टीशन",XHt=((e={},n={})=>{const t=n.locale??z();return t==="zh-CN"?GHt():t==="fa"?VHt():t==="ar"?KHt():t==="es"?WHt():t==="hi"?QHt():UHt()}),YHt=()=>"Path",ZHt=()=>"路径",JHt=()=>"مسیر",eqt=()=>"المسار",tqt=()=>"Ruta",nqt=()=>"पथ",rqt=((e={},n={})=>{const t=n.locale??z();return t==="zh-CN"?ZHt():t==="fa"?JHt():t==="ar"?eqt():t==="es"?tqt():t==="hi"?nqt():YHt()}),sqt=()=>"Plan",iqt=()=>"方案",aqt=()=>"سطح اشتراک",oqt=()=>"الخطة",lqt=()=>"Plan",cqt=()=>"प्लान",uqt=((e={},n={})=>{const t=n.locale??z();return t==="zh-CN"?iqt():t==="fa"?aqt():t==="ar"?oqt():t==="es"?lqt():t==="hi"?cqt():sqt()}),_qt=()=>"Project",fqt=()=>"项目",dqt=()=>"پروژه",hqt=()=>"المشروع",pqt=()=>"Proyecto",mqt=()=>"प्रोजेक्ट",gqt=((e={},n={})=>{const t=n.locale??z();return t==="zh-CN"?fqt():t==="fa"?dqt():t==="ar"?hqt():t==="es"?pqt():t==="hi"?mqt():_qt()}),vqt=()=>"Ray version",bqt=()=>"Ray 版本",yqt=()=>"نسخهٔ Ray",xqt=()=>"إصدار Ray",wqt=()=>"Versión de Ray",kqt=()=>"Ray वर्शन",Sqt=((e={},n={})=>{const t=n.locale??z();return t==="zh-CN"?bqt():t==="fa"?yqt():t==="ar"?xqt():t==="es"?wqt():t==="hi"?kqt():vqt()}),Cqt=()=>"Reachable",Eqt=()=>"可访问",Nqt=()=>"در دسترس",zqt=()=>"يمكن الوصول إليه",jqt=()=>"Accesible",Tqt=()=>"पहुँच योग्य",Aqt=((e={},n={})=>{const t=n.locale??z();return t==="zh-CN"?Eqt():t==="fa"?Nqt():t==="ar"?zqt():t==="es"?jqt():t==="hi"?Tqt():Cqt()}),Rqt=()=>"Reading ~/.ssh/config…",Mqt=()=>"正在读取 ~/.ssh/config…",Oqt=()=>"در حال خواندن ‎~/.ssh/config…",Dqt=()=>"جارٍ قراءة ‎~/.ssh/config…",Lqt=()=>"Leyendo ~/.ssh/config…",Iqt=()=>"~/.ssh/config पढ़ा जा रहा है…",tL=((e={},n={})=>{const t=n.locale??z();return t==="zh-CN"?Mqt():t==="fa"?Oqt():t==="ar"?Dqt():t==="es"?Lqt():t==="hi"?Iqt():Rqt()}),$qt=()=>"Ready",Bqt=()=>"就绪",Pqt=()=>"آماده",Fqt=()=>"جاهز",Hqt=()=>"Listo",qqt=()=>"तैयार",um=((e={},n={})=>{const t=n.locale??z();return t==="zh-CN"?Bqt():t==="fa"?Pqt():t==="ar"?Fqt():t==="es"?Hqt():t==="hi"?qqt():$qt()}),Uqt=()=>"Ready to move",Gqt=()=>"可以移动",Vqt=()=>"آمادهٔ انتقال",Kqt=()=>"جاهز للنقل",Wqt=()=>"Listo para mover",Qqt=()=>"स्थानांतरण के लिए तैयार",Xqt=((e={},n={})=>{const t=n.locale??z();return t==="zh-CN"?Gqt():t==="fa"?Vqt():t==="ar"?Kqt():t==="es"?Wqt():t==="hi"?Qqt():Uqt()}),Yqt=()=>"Configured",Zqt=()=>"已配置",Jqt=()=>"پیکربندی‌شده",eUt=()=>"مُعَد",tUt=()=>"Configurado",nUt=()=>"कॉन्फ़िगर किया गया",Hk=((e={},n={})=>{const t=n.locale??z();return t==="zh-CN"?Zqt():t==="fa"?Jqt():t==="ar"?eUt():t==="es"?tUt():t==="hi"?nUt():Yqt()}),rUt=()=>"Refresh",sUt=()=>"刷新",iUt=()=>"تازه‌سازی",aUt=()=>"تحديث",oUt=()=>"Actualizar",lUt=()=>"रीफ़्रेश करें",_m=((e={},n={})=>{const t=n.locale??z();return t==="zh-CN"?sUt():t==="fa"?iUt():t==="ar"?aUt():t==="es"?oUt():t==="hi"?lUt():rUt()}),cUt=()=>"Remotes",uUt=()=>"远程仓库",_Ut=()=>"مخزن‌های دوردست",fUt=()=>"المستودعات البعيدة",dUt=()=>"Remotos",hUt=()=>"रिमोट",pUt=((e={},n={})=>{const t=n.locale??z();return t==="zh-CN"?uUt():t==="fa"?_Ut():t==="ar"?fUt():t==="es"?dUt():t==="hi"?hUt():cUt()}),mUt=()=>"Repository",gUt=()=>"仓库",vUt=()=>"مخزن",bUt=()=>"المستودع",yUt=()=>"Repositorio",xUt=()=>"रिपॉज़िटरी",wUt=((e={},n={})=>{const t=n.locale??z();return t==="zh-CN"?gUt():t==="fa"?vUt():t==="ar"?bUt():t==="es"?yUt():t==="hi"?xUt():mUt()}),kUt=()=>"Restart to finish updating",SUt=()=>"重新启动以完成更新",CUt=()=>"برای تکمیل به‌روزرسانی، دوباره راه‌اندازی کنید",EUt=()=>"أعد التشغيل لإكمال التحديث",NUt=()=>"Reinicia para terminar la actualización",zUt=()=>"अपडेट पूरा करने के लिए फिर से शुरू करें",jUt=((e={},n={})=>{const t=n.locale??z();return t==="zh-CN"?SUt():t==="fa"?CUt():t==="ar"?EUt():t==="es"?NUt():t==="hi"?zUt():kUt()}),TUt=()=>"Running instances",AUt=()=>"正在运行的实例",RUt=()=>"نمونه‌های در حال اجرا",MUt=()=>"المثيلات قيد التشغيل",OUt=()=>"Instancias en ejecución",DUt=()=>"चल रहे इंस्टेंस",LUt=((e={},n={})=>{const t=n.locale??z();return t==="zh-CN"?AUt():t==="fa"?RUt():t==="ar"?MUt():t==="es"?OUt():t==="hi"?DUt():TUt()}),IUt=()=>"Runtime",$Ut=()=>"运行时间",BUt=()=>"زمان اجرا",PUt=()=>"مدة التشغيل",FUt=()=>"Runtime",HUt=()=>"रनटाइम",qUt=((e={},n={})=>{const t=n.locale??z();return t==="zh-CN"?$Ut():t==="fa"?BUt():t==="ar"?PUt():t==="es"?FUt():t==="hi"?HUt():IUt()}),UUt=()=>". Save it under that key if it's meant for HF Jobs.",GUt=()=>"读取它。如果它用于 HF Jobs,请以该键名保存。",VUt=()=>"می‌خوانند. اگر برای HF Jobs است، آن را با همان کلید ذخیره کنید.",KUt=()=>"‏. احفظه تحت ذلك المفتاح إن كان مخصصًا لمهام HF.",WUt=()=>". Guárdalo con ese nombre si es para HF Jobs.",QUt=()=>"। यदि यह HF Jobs के लिए है तो इसे उस की के तहत सेव करें।",XUt=((e={},n={})=>{const t=n.locale??z();return t==="zh-CN"?GUt():t==="fa"?VUt():t==="ar"?KUt():t==="es"?WUt():t==="hi"?QUt():UUt()}),YUt=()=>"Session cookie",ZUt=()=>"会话 cookie",JUt=()=>"کوکی نشست",eGt=()=>"ملف تعريف ارتباط الجلسة",tGt=()=>"Cookie de sesión",nGt=()=>"सेशन कुकी",rGt=((e={},n={})=>{const t=n.locale??z();return t==="zh-CN"?ZUt():t==="fa"?JUt():t==="ar"?eGt():t==="es"?tGt():t==="hi"?nGt():YUt()}),sGt=()=>"With a session cookie saved, a linked paper follows Overleaf as people type and sends saves straight back. Figures still move on the slower Git sync. Copy the overleaf_session2 cookie from a browser signed in to Overleaf; it stops working when that sign-in does.",iGt=()=>"保存会话 cookie 后,已关联的论文会在他人输入时实时跟随 Overleaf,并立即回传保存;图片仍通过较慢的 Git 同步传输。请从已登录 Overleaf 的浏览器复制 overleaf_session2 cookie;该登录失效后它也会失效。",aGt=()=>"با ذخیرهٔ کوکی نشست، مقالهٔ پیوندشده هنگام تایپ دیگران Overleaf را زنده دنبال می‌کند و ذخیره‌ها را مستقیماً برمی‌گرداند؛ تصویرها همچنان با همگام‌سازی کندتر Git جابه‌جا می‌شوند. کوکی overleaf_session2 را از مرورگری که به Overleaf وارد شده کپی کنید؛ با پایان آن ورود، کوکی هم از کار می‌افتد.",oGt=()=>"مع حفظ ملف تعريف ارتباط الجلسة، تتابع الورقة المرتبطة Overleaf أثناء كتابة الآخرين وترسل عمليات الحفظ مباشرةً. لا تزال الأشكال تُنقَل عبر مزامنة Git الأبطأ. انسخ ملف تعريف الارتباط overleaf_session2 من متصفح مسجّل الدخول إلى Overleaf؛ ويتوقف عن العمل عند انتهاء ذلك الدخول.",lGt=()=>"Con una cookie de sesión guardada, un paper vinculado sigue los cambios de Overleaf mientras se escribe y envía los guardados directamente. Las figuras siguen usando la sincronización por Git, más lenta. Copia la cookie overleaf_session2 de un navegador con la sesión de Overleaf iniciada; deja de funcionar cuando esa sesión termine.",cGt=()=>"सेशन कुकी सेव होने पर, एक लिंक किया गया पेपर लोगों के टाइप करते ही Overleaf को फ़ॉलो करता है और सेव सीधे वापस भेजता है। फ़िगर अभी भी धीमे Git सिंक पर चलती हैं। Overleaf में साइन इन ब्राउज़र से overleaf_session2 कुकी कॉपी करें; वह साइन-इन खत्म होने पर काम करना बंद कर देती है।",uGt=((e={},n={})=>{const t=n.locale??z();return t==="zh-CN"?iGt():t==="fa"?aGt():t==="ar"?oGt():t==="es"?lGt():t==="hi"?cGt():sGt()}),_Gt=()=>"Settings",fGt=()=>"设置",dGt=()=>"تنظیمات",hGt=()=>"الإعدادات",pGt=()=>"Configuración",mGt=()=>"सेटिंग्स",qk=((e={},n={})=>{const t=n.locale??z();return t==="zh-CN"?fGt():t==="fa"?dGt():t==="ar"?hGt():t==="es"?pGt():t==="hi"?mGt():_Gt()}),gGt=()=>"Signed in",vGt=()=>"已登录",bGt=()=>"وارد شده",yGt=()=>"تم تسجيل الدخول",xGt=()=>"Sesión iniciada",wGt=()=>"साइन इन है",kGt=((e={},n={})=>{const t=n.locale??z();return t==="zh-CN"?vGt():t==="fa"?bGt():t==="ar"?yGt():t==="es"?xGt():t==="hi"?wGt():gGt()}),SGt=()=>"Source",CGt=()=>"来源",EGt=()=>"منبع",NGt=()=>"المصدر",zGt=()=>"Origen",jGt=()=>"स्रोत",nL=((e={},n={})=>{const t=n.locale??z();return t==="zh-CN"?CGt():t==="fa"?EGt():t==="ar"?NGt():t==="es"?zGt():t==="hi"?jGt():SGt()}),TGt=()=>"SSH Key",AGt=()=>"SSH 密钥",RGt=()=>"کلید SSH",MGt=()=>"مفتاح SSH",OGt=()=>"Clave SSH",DGt=()=>"SSH की",LGt=((e={},n={})=>{const t=n.locale??z();return t==="zh-CN"?AGt():t==="fa"?RGt():t==="ar"?MGt():t==="es"?OGt():t==="hi"?DGt():TGt()}),IGt=()=>"Started",$Gt=()=>"开始时间",BGt=()=>"آغاز",PGt=()=>"بدأ",FGt=()=>"Inicio",HGt=()=>"शुरू हुआ",qGt=((e={},n={})=>{const t=n.locale??z();return t==="zh-CN"?$Gt():t==="fa"?BGt():t==="ar"?PGt():t==="es"?FGt():t==="hi"?HGt():IGt()}),UGt=()=>"State",GGt=()=>"状态",VGt=()=>"وضعیت",KGt=()=>"الحالة",WGt=()=>"Estado",QGt=()=>"स्थिति",XGt=((e={},n={})=>{const t=n.locale??z();return t==="zh-CN"?GGt():t==="fa"?VGt():t==="ar"?KGt():t==="es"?WGt():t==="hi"?QGt():UGt()}),YGt=()=>"Status",ZGt=()=>"状态",JGt=()=>"وضعیت",eVt=()=>"الحالة",tVt=()=>"Estado",nVt=()=>"स्थिति",vh=((e={},n={})=>{const t=n.locale??z();return t==="zh-CN"?ZGt():t==="fa"?JGt():t==="ar"?eVt():t==="es"?tVt():t==="hi"?nVt():YGt()}),rVt=()=>"Storage",sVt=()=>"存储",iVt=()=>"ذخیره‌سازی",aVt=()=>"التخزين",oVt=()=>"Almacenamiento",lVt=()=>"स्टोरेज",cVt=((e={},n={})=>{const t=n.locale??z();return t==="zh-CN"?sVt():t==="fa"?iVt():t==="ar"?aVt():t==="es"?oVt():t==="hi"?lVt():rVt()}),uVt=()=>"Sync",_Vt=()=>"同步",fVt=()=>"همگام‌سازی",dVt=()=>"مزامنة",hVt=()=>"Sincronización",pVt=()=>"सिंक",mVt=((e={},n={})=>{const t=n.locale??z();return t==="zh-CN"?_Vt():t==="fa"?fVt():t==="ar"?dVt():t==="es"?hVt():t==="hi"?pVt():uVt()}),gVt=()=>"Syncing off",vVt=()=>"同步已关闭",bVt=()=>"همگام‌سازی خاموش",yVt=()=>"المزامنة معطّلة",xVt=()=>"Sincronización desactivada",wVt=()=>"सिंकिंग बंद है",kVt=((e={},n={})=>{const t=n.locale??z();return t==="zh-CN"?vVt():t==="fa"?bVt():t==="ar"?yVt():t==="es"?xVt():t==="hi"?wVt():gVt()}),SVt=()=>"Test connection",CVt=()=>"测试连接",EVt=()=>"آزمایش اتصال",NVt=()=>"اختبار الاتصال",zVt=()=>"Probar conexión",jVt=()=>"कनेक्शन जाँचें",TVt=((e={},n={})=>{const t=n.locale??z();return t==="zh-CN"?CVt():t==="fa"?EVt():t==="ar"?NVt():t==="es"?zVt():t==="hi"?jVt():SVt()}),AVt=()=>"Testing…",RVt=()=>"正在测试…",MVt=()=>"در حال آزمایش…",OVt=()=>"جارٍ الاختبار…",DVt=()=>"Probando…",LVt=()=>"जाँचा जा रहा है…",IVt=((e={},n={})=>{const t=n.locale??z();return t==="zh-CN"?RVt():t==="fa"?MVt():t==="ar"?OVt():t==="es"?DVt():t==="hi"?LVt():AVt()}),$Vt=()=>", then add it with",BVt=()=>",然后使用以下命令添加:",PVt=()=>"، سپس با این فرمان اضافه‌اش کنید:",FVt=()=>"، ثم أضِفه عبر",HVt=()=>" y luego añádela con",qVt=()=>", फिर इसे इसके साथ जोड़ें",UVt=((e={},n={})=>{const t=n.locale??z();return t==="zh-CN"?BVt():t==="fa"?PVt():t==="ar"?FVt():t==="es"?HVt():t==="hi"?qVt():$Vt()}),GVt=()=>"This is useful when collaborators follow project changes on GitHub. New projects will enable syncing automatically, creating a private repository when needed and pushing experiment branches for visibility.",VVt=()=>"当协作者在 GitHub 上关注项目更改时,此功能很有用。新项目将自动启用同步,在需要时创建私有仓库,并推送实验分支以便查看。",KVt=()=>"وقتی همکاران تغییرات پروژه را در GitHub دنبال می‌کنند، این گزینه مفید است. پروژه‌های جدید همگام‌سازی را خودکار فعال می‌کنند، در صورت نیاز مخزن خصوصی می‌سازند و شاخه‌های آزمایش را برای دیده‌شدن push می‌کنند.",WVt=()=>"هذا مفيد عندما يتابع المتعاونون تغييرات المشروع على GitHub. ستفعّل المشاريع الجديدة المزامنة تلقائيًا، مع إنشاء مستودع خاص عند الحاجة ورفع فروع التجارب لإتاحة الاطلاع عليها.",QVt=()=>"Es útil cuando tus colaboradores siguen los cambios del proyecto en GitHub. Los proyectos nuevos activarán la sincronización automáticamente: se creará un repositorio privado cuando haga falta y se subirán las ramas de los experimentos para que sean visibles.",XVt=()=>"यह तब उपयोगी है जब सहयोगी GitHub पर प्रोजेक्ट के बदलावों को फ़ॉलो करते हों। नए प्रोजेक्ट में सिंकिंग अपने आप चालू हो जाएगी, ज़रूरत पड़ने पर एक निजी रिपॉज़िटरी बनेगी और प्रयोग ब्रांच दृश्यता के लिए पुश की जाएंगी।",YVt=((e={},n={})=>{const t=n.locale??z();return t==="zh-CN"?VVt():t==="fa"?KVt():t==="ar"?WVt():t==="es"?QVt():t==="hi"?XVt():GVt()}),ZVt=()=>"This saved destination is not configured. Set it up below or choose another backend.",JVt=()=>"已保存的目标尚未配置。请在下方完成设置或选择其他后端。",eKt=()=>"این مقصد ذخیره‌شده پیکربندی نشده است. آن را در پایین راه‌اندازی یا backend دیگری انتخاب کنید.",tKt=()=>"هذه الوجهة المحفوظة غير مُعدّة. أعِدّها أدناه أو اختر بيئة تنفيذ أخرى.",nKt=()=>"Este destino guardado no está configurado. Configúralo abajo o elige otro backend.",rKt=()=>"यह सेव किया गया गंतव्य कॉन्फ़िगर नहीं है। इसे नीचे सेट अप करें या कोई और बैकएंड चुनें।",sKt=((e={},n={})=>{const t=n.locale??z();return t==="zh-CN"?JVt():t==="fa"?eKt():t==="ar"?tKt():t==="es"?nKt():t==="hi"?rKt():ZVt()}),iKt=()=>"This value looks like a Hugging Face token — compute runs only read it from",aKt=()=>"此值看起来像 Hugging Face 令牌——算力运行只会从",oKt=()=>"این مقدار شبیه توکن Hugging Face است — اجراهای رایانشی آن را فقط از",lKt=()=>"تبدو هذه القيمة كرمز Hugging Face — لا تقرؤه عمليات التشغيل الحوسبية إلا من",cKt=()=>"Este valor parece un token de Hugging Face — las ejecuciones de cómputo solo lo leen de",uKt=()=>"यह वैल्यू एक Hugging Face टोकन जैसी लगती है — कंप्यूट रन इसे केवल यहाँ से पढ़ते हैं",_Kt=((e={},n={})=>{const t=n.locale??z();return t==="zh-CN"?aKt():t==="fa"?oKt():t==="ar"?lKt():t==="es"?cKt():t==="hi"?uKt():iKt()}),fKt=()=>"Time limit",dKt=()=>"时间限制",hKt=()=>"محدودیت زمانی",pKt=()=>"الحد الزمني",mKt=()=>"Límite de tiempo",gKt=()=>"समय सीमा",vKt=((e={},n={})=>{const t=n.locale??z();return t==="zh-CN"?dKt():t==="fa"?hKt():t==="ar"?pKt():t==="es"?mKt():t==="hi"?gKt():fKt()}),bKt=()=>"Unable to verify",yKt=()=>"无法验证",xKt=()=>"تأیید ممکن نیست",wKt=()=>"تعذّر التحقق",kKt=()=>"No se pudo verificar",SKt=()=>"सत्यापित नहीं हो सका",a3=((e={},n={})=>{const t=n.locale??z();return t==="zh-CN"?yKt():t==="fa"?xKt():t==="ar"?wKt():t==="es"?kKt():t==="hi"?SKt():bKt()}),CKt=()=>"Unknown",EKt=()=>"未知",NKt=()=>"نامشخص",zKt=()=>"غير معروف",jKt=()=>"Desconocido",TKt=()=>"अज्ञात",rL=((e={},n={})=>{const t=n.locale??z();return t==="zh-CN"?EKt():t==="fa"?NKt():t==="ar"?zKt():t==="es"?jKt():t==="hi"?TKt():CKt()}),AKt=()=>"Update required",RKt=()=>"需要更新",MKt=()=>"نیازمند به‌روزرسانی",OKt=()=>"مطلوب تحديث",DKt=()=>"Actualización necesaria",LKt=()=>"अपडेट ज़रूरी है",IKt=((e={},n={})=>{const t=n.locale??z();return t==="zh-CN"?RKt():t==="fa"?MKt():t==="ar"?OKt():t==="es"?DKt():t==="hi"?LKt():AKt()}),$Kt=()=>"Updates",BKt=()=>"更新",PKt=()=>"به‌روزرسانی‌ها",FKt=()=>"التحديثات",HKt=()=>"Actualizaciones",qKt=()=>"अपडेट",fz=((e={},n={})=>{const t=n.locale??z();return t==="zh-CN"?BKt():t==="fa"?PKt():t==="ar"?FKt():t==="es"?HKt():t==="hi"?qKt():$Kt()}),UKt=()=>"Usage analytics",GKt=()=>"使用情况分析",VKt=()=>"تحلیل استفاده",KKt=()=>"تحليلات الاستخدام",WKt=()=>"Estadísticas de uso",QKt=()=>"उपयोग एनालिटिक्स",XKt=((e={},n={})=>{const t=n.locale??z();return t==="zh-CN"?GKt():t==="fa"?VKt():t==="ar"?KKt():t==="es"?WKt():t==="hi"?QKt():UKt()}),YKt=()=>"value",ZKt=()=>"值",JKt=()=>"مقدار",eWt=()=>"القيمة",tWt=()=>"valor",nWt=()=>"वैल्यू",sL=((e={},n={})=>{const t=n.locale??z();return t==="zh-CN"?ZKt():t==="fa"?JKt():t==="ar"?eWt():t==="es"?tWt():t==="hi"?nWt():YKt()}),rWt=()=>"Variables available to runs and the research agent (API keys, tokens).",sWt=()=>"可供运行和研究智能体使用的变量(API 密钥、令牌)。",iWt=()=>"متغیرهای در دسترس اجراها و عامل پژوهشی (کلیدهای API، توکن‌ها).",aWt=()=>"متغيّرات متاحة لعمليات التشغيل ولوكيل البحث (مفاتيح API والرموز).",oWt=()=>"Variables disponibles para las ejecuciones y el agente de investigación (claves de API, tokens).",lWt=()=>"रन और शोध एजेंट के लिए उपलब्ध वेरिएबल (API की, टोकन)।",cWt=((e={},n={})=>{const t=n.locale??z();return t==="zh-CN"?sWt():t==="fa"?iWt():t==="ar"?aWt():t==="es"?oWt():t==="hi"?lWt():rWt()}),uWt=()=>"Version",_Wt=()=>"版本",fWt=()=>"نسخه",dWt=()=>"الإصدار",hWt=()=>"Versión",pWt=()=>"वर्शन",iL=((e={},n={})=>{const t=n.locale??z();return t==="zh-CN"?_Wt():t==="fa"?fWt():t==="ar"?dWt():t==="es"?hWt():t==="hi"?pWt():uWt()}),mWt=()=>"When enabled, each new project gets a private GitHub repository. Experiment branches are pushed automatically for collaborator visibility. Compute always uses direct source snapshots.",gWt=()=>"启用后,每个新项目都会获得一个私有 GitHub 仓库。实验分支会自动推送,便于协作者查看。算力执行始终使用直接的源代码快照。",vWt=()=>"با فعال شدن، هر پروژهٔ جدید یک مخزن خصوصی GitHub می‌گیرد. شاخه‌های آزمایش برای دیده‌شدن توسط همکاران خودکار push می‌شوند. رایانش همیشه از snapshot مستقیم منبع استفاده می‌کند.",bWt=()=>"عند التفعيل، يحصل كل مشروع جديد على مستودع GitHub خاص. تُرفع فروع التجارب تلقائيًا ليطّلع عليها المتعاونون. تستخدم الحوسبة دائمًا لقطات المصدر المباشرة.",yWt=()=>"Si se activa, cada proyecto nuevo tendrá un repositorio privado en GitHub. Las ramas de los experimentos se suben automáticamente para que las vean tus colaboradores. El cómputo siempre usa snapshots directos del código fuente.",xWt=()=>"चालू होने पर, हर नए प्रोजेक्ट को एक निजी GitHub रिपॉज़िटरी मिलती है। सहयोगी दृश्यता के लिए प्रयोग ब्रांच अपने आप पुश होती हैं। कंप्यूट हमेशा सीधे सोर्स स्नैपशॉट का उपयोग करता है।",wWt=((e={},n={})=>{const t=n.locale??z();return t==="zh-CN"?gWt():t==="fa"?vWt():t==="ar"?bWt():t==="es"?yWt():t==="hi"?xWt():mWt()}),kWt=()=>"With a token saved, a paper opened in the dashboard can be kept in step with an Overleaf project, in both directions. Overleaf's Git integration comes with a paid Overleaf plan; without one, a paper can still be uploaded to Overleaf as a new project. The token stays on this machine and is not sent to compute backends.",SWt=()=>"保存令牌后,可让控制台中打开的论文与 Overleaf 项目双向保持同步。Overleaf 的 Git 集成需要付费方案;没有付费方案时,仍可将论文作为新项目上传到 Overleaf。令牌仅保存在此计算机上,不会发送到算力后端。",CWt=()=>"با ذخیرهٔ توکن، مقاله‌ای که در داشبورد باز شده می‌تواند در هر دو جهت با یک پروژهٔ Overleaf همگام بماند. یکپارچه‌سازی Git در Overleaf به طرح پولی نیاز دارد؛ بدون آن هم می‌توان مقاله را به‌عنوان پروژه‌ای جدید در Overleaf بارگذاری کرد. توکن روی همین دستگاه می‌ماند و به backendهای رایانشی فرستاده نمی‌شود.",EWt=()=>"مع حفظ رمز، يمكن إبقاء ورقة مفتوحة في لوحة التحكم متزامنة مع مشروع Overleaf في الاتجاهين. يأتي تكامل Git في Overleaf مع خطة Overleaf مدفوعة؛ وبدونها لا يزال بالإمكان رفع ورقة إلى Overleaf كمشروع جديد. يبقى الرمز على هذا الجهاز ولا يُرسَل إلى بيئات التنفيذ.",NWt=()=>"Con un token guardado, un paper abierto en el dashboard puede mantenerse sincronizado con un proyecto de Overleaf en ambas direcciones. La integración con Git de Overleaf requiere un plan de pago; sin él, puedes seguir subiendo un paper a Overleaf como proyecto nuevo. El token se queda en este equipo y no se envía a los backends de cómputo.",zWt=()=>"टोकन सेव होने पर, डैशबोर्ड में खुला कोई पेपर दोनों दिशाओं में Overleaf प्रोजेक्ट के साथ मेल खाता रहता है। Overleaf का Git इंटीग्रेशन एक पेड Overleaf प्लान के साथ आता है; उसके बिना, एक पेपर को अब भी नए प्रोजेक्ट के रूप में Overleaf पर अपलोड किया जा सकता है। टोकन इसी मशीन पर रहता है और कंप्यूट बैकएंड को नहीं भेजा जाता।",jWt=((e={},n={})=>{const t=n.locale??z();return t==="zh-CN"?SWt():t==="fa"?CWt():t==="ar"?EWt():t==="es"?NWt():t==="hi"?zWt():kWt()}),TWt=()=>"Pick a login node first",AWt=()=>"请先选择登录节点",RWt=()=>"ابتدا یک گرهٔ ورود انتخاب کنید",MWt=()=>"اختر عقدة دخول أولًا",OWt=()=>"Elige primero un nodo de acceso",DWt=()=>"पहले एक लॉगिन नोड चुनें",LWt=((e={},n={})=>{const t=n.locale??z();return t==="zh-CN"?AWt():t==="fa"?RWt():t==="ar"?MWt():t==="es"?OWt():t==="hi"?DWt():TWt()}),IWt=()=>"Providers",$Wt=()=>"提供商",BWt=()=>"ارائه‌دهندگان",PWt=()=>"المزوّدون",FWt=()=>"Proveedores",HWt=()=>"प्रोवाइडर",qWt=((e={},n={})=>{const t=n.locale??z();return t==="zh-CN"?$Wt():t==="fa"?BWt():t==="ar"?PWt():t==="es"?FWt():t==="hi"?HWt():IWt()}),UWt=()=>"Reconnect",GWt=()=>"重新连接",VWt=()=>"اتصال دوباره",KWt=()=>"إعادة الاتصال",WWt=()=>"Reconectar",QWt=()=>"फिर से कनेक्ट करें",aL=((e={},n={})=>{const t=n.locale??z();return t==="zh-CN"?GWt():t==="fa"?VWt():t==="ar"?KWt():t==="es"?WWt():t==="hi"?QWt():UWt()}),XWt=e=>`Register this computer with ${e==null?void 0:e.register}, or load a registered key with ${e==null?void 0:e.load}.`,YWt=e=>`使用 ${e==null?void 0:e.register} 注册此计算机,或使用 ${e==null?void 0:e.load} 加载已注册的密钥。`,ZWt=e=>`این رایانه را با ${e==null?void 0:e.register} ثبت کنید، یا کلید ثبت‌شده را با ${e==null?void 0:e.load} بار کنید.`,JWt=e=>`سجّل هذا الحاسوب عبر ${e==null?void 0:e.register}، أو حمّل مفتاحًا مسجّلًا عبر ${e==null?void 0:e.load}.`,eQt=e=>`Registra este equipo con ${e==null?void 0:e.register} o carga una clave registrada con ${e==null?void 0:e.load}.`,tQt=e=>`इस कंप्यूटर को ${e==null?void 0:e.register} से रजिस्टर करें, या ${e==null?void 0:e.load} से एक रजिस्टर्ड की लोड करें।`,nQt=((e,n={})=>{const t=n.locale??z();return t==="zh-CN"?YWt(e):t==="fa"?ZWt(e):t==="ar"?JWt(e):t==="es"?eQt(e):t==="hi"?tQt(e):XWt(e)}),rQt=()=>"Reinstall with the orx installer to get automatic updates.",sQt=()=>"请使用 orx 安装程序重新安装,以获得自动更新。",iQt=()=>"برای دریافت به‌روزرسانی خودکار، با نصب‌کنندهٔ orx دوباره نصب کنید.",aQt=()=>"أعد التثبيت عبر مُثبّت orx للحصول على التحديثات التلقائية.",oQt=()=>"Reinstala con el instalador de orx para recibir actualizaciones automáticas.",lQt=()=>"ऑटोमैटिक अपडेट पाने के लिए orx इंस्टॉलर से फिर से इंस्टॉल करें।",cQt=((e={},n={})=>{const t=n.locale??z();return t==="zh-CN"?sQt():t==="fa"?iQt():t==="ar"?aQt():t==="es"?oQt():t==="hi"?lQt():rQt()}),uQt=()=>"Re-link",_Qt=()=>"重新链接",fQt=()=>"پیوند دوباره",dQt=()=>"إعادة الربط",hQt=()=>"Volver a enlazar",pQt=()=>"फिर से लिंक करें",mQt=((e={},n={})=>{const t=n.locale??z();return t==="zh-CN"?_Qt():t==="fa"?fQt():t==="ar"?dQt():t==="es"?hQt():t==="hi"?pQt():uQt()}),gQt=()=>"Remove cookie",vQt=()=>"移除 cookie",bQt=()=>"حذف کوکی",yQt=()=>"إزالة ملف تعريف الارتباط",xQt=()=>"Quitar cookie",wQt=()=>"कुकी हटाएं",kQt=((e={},n={})=>{const t=n.locale??z();return t==="zh-CN"?vQt():t==="fa"?bQt():t==="ar"?yQt():t==="es"?xQt():t==="hi"?wQt():gQt()}),SQt=()=>"Remove token",CQt=()=>"移除令牌",EQt=()=>"حذف توکن",NQt=()=>"إزالة الرمز",zQt=()=>"Quitar token",jQt=()=>"टोकन हटाएं",TQt=((e={},n={})=>{const t=n.locale??z();return t==="zh-CN"?CQt():t==="fa"?EQt():t==="ar"?NQt():t==="es"?zQt():t==="hi"?jQt():SQt()}),AQt=()=>"Removing…",RQt=()=>"正在移除…",MQt=()=>"در حال حذف…",OQt=()=>"جارٍ الإزالة…",DQt=()=>"Quitando…",LQt=()=>"हटाया जा रहा है…",dz=((e={},n={})=>{const t=n.locale??z();return t==="zh-CN"?RQt():t==="fa"?MQt():t==="ar"?OQt():t==="es"?DQt():t==="hi"?LQt():AQt()}),IQt=()=>"Replace anyway",$Qt=()=>"仍要替换",BQt=()=>"به‌هرحال جایگزین کن",PQt=()=>"الاستبدال على أي حال",FQt=()=>"Reemplazar de todos modos",HQt=()=>"फिर भी बदलें",qQt=((e={},n={})=>{const t=n.locale??z();return t==="zh-CN"?$Qt():t==="fa"?BQt():t==="ar"?PQt():t==="es"?FQt():t==="hi"?HQt():IQt()}),UQt=()=>"Replace key",GQt=()=>"替换密钥",VQt=()=>"جایگزینی کلید",KQt=()=>"استبدال المفتاح",WQt=()=>"Reemplazar clave",QQt=()=>"की बदलें",XQt=((e={},n={})=>{const t=n.locale??z();return t==="zh-CN"?GQt():t==="fa"?VQt():t==="ar"?KQt():t==="es"?WQt():t==="hi"?QQt():UQt()}),YQt=()=>"Replace token",ZQt=()=>"替换令牌",JQt=()=>"جایگزینی توکن",eXt=()=>"استبدال الرمز",tXt=()=>"Reemplazar token",nXt=()=>"टोकन बदलें",rXt=((e={},n={})=>{const t=n.locale??z();return t==="zh-CN"?ZQt():t==="fa"?JQt():t==="ar"?eXt():t==="es"?tXt():t==="hi"?nXt():YQt()}),sXt=e=>`Git and GitHub settings for ${e==null?void 0:e.project}. Local Git powers experiments; publishing is optional.`,iXt=e=>`${e==null?void 0:e.project} 的 Git 和 GitHub 设置。本地 Git 为实验提供支持;发布是可选的。`,aXt=e=>`تنظیمات Git و GitHub برای ${e==null?void 0:e.project}. Git محلی آزمایش‌ها را ممکن می‌کند؛ انتشار اختیاری است.`,oXt=e=>`إعدادات Git وGitHub لـ ${e==null?void 0:e.project}. تعتمد التجارب على Git المحلي؛ والنشر اختياري.`,lXt=e=>`Configuración de Git y GitHub de ${e==null?void 0:e.project}. Git local hace posibles los experimentos; publicar es opcional.`,cXt=e=>`${e==null?void 0:e.project} के लिए Git और GitHub सेटिंग्स। लोकल Git प्रयोगों को चलाता है; प्रकाशन वैकल्पिक है।`,uXt=((e,n={})=>{const t=n.locale??z();return t==="zh-CN"?iXt(e):t==="fa"?aXt(e):t==="ar"?oXt(e):t==="es"?lXt(e):t==="hi"?cXt(e):sXt(e)}),_Xt=e=>`Version ${e==null?void 0:e.installed} is installed. This window is still running ${e==null?void 0:e.current}.`,fXt=e=>`已安装版本 ${e==null?void 0:e.installed}。此窗口仍在运行 ${e==null?void 0:e.current}。`,dXt=e=>`نسخهٔ ${e==null?void 0:e.installed} نصب شده است. این پنجره هنوز نسخهٔ ${e==null?void 0:e.current} را اجرا می‌کند.`,hXt=e=>`الإصدار ${e==null?void 0:e.installed} مثبّت. لا تزال هذه النافذة تعمل بالإصدار ${e==null?void 0:e.current}.`,pXt=e=>`La versión ${e==null?void 0:e.installed} está instalada. Esta ventana sigue ejecutando la ${e==null?void 0:e.current}.`,mXt=e=>`वर्शन ${e==null?void 0:e.installed} इंस्टॉल है। यह विंडो अभी भी ${e==null?void 0:e.current} चला रही है।`,gXt=((e,n={})=>{const t=n.locale??z();return t==="zh-CN"?fXt(e):t==="fa"?dXt(e):t==="ar"?hXt(e):t==="es"?pXt(e):t==="hi"?mXt(e):_Xt(e)}),vXt=()=>"Run `gh auth login` in your terminal.",bXt=()=>"请在终端中运行 `gh auth login`。",yXt=()=>"در پایانه `gh auth login` را اجرا کنید.",xXt=()=>"نفّذ `gh auth login` في طرفيتك.",wXt=()=>"Ejecuta `gh auth login` en tu terminal.",kXt=()=>"अपने टर्मिनल में `gh auth login` चलाएं।",SXt=((e={},n={})=>{const t=n.locale??z();return t==="zh-CN"?bXt():t==="fa"?yXt():t==="ar"?xXt():t==="es"?wXt():t==="hi"?kXt():vXt()}),CXt=()=>"Saved",EXt=()=>"已保存",NXt=()=>"ذخیره شده",zXt=()=>"تم الحفظ",jXt=()=>"Guardado",TXt=()=>"सेव हो गया",hz=((e={},n={})=>{const t=n.locale??z();return t==="zh-CN"?EXt():t==="fa"?NXt():t==="ar"?zXt():t==="es"?jXt():t==="hi"?TXt():CXt()}),AXt=()=>"Set up",RXt=()=>"设置",MXt=()=>"راه‌اندازی",OXt=()=>"إعداد",DXt=()=>"Configurar",LXt=()=>"सेट अप करें",IXt=((e={},n={})=>{const t=n.locale??z();return t==="zh-CN"?RXt():t==="fa"?MXt():t==="ar"?OXt():t==="es"?DXt():t==="hi"?LXt():AXt()}),$Xt=()=>"Set up SSH key",BXt=()=>"设置 SSH 密钥",PXt=()=>"راه‌اندازی کلید SSH",FXt=()=>"إعداد مفتاح SSH",HXt=()=>"Configurar clave SSH",qXt=()=>"SSH की सेट अप करें",UXt=((e={},n={})=>{const t=n.locale??z();return t==="zh-CN"?BXt():t==="fa"?PXt():t==="ar"?FXt():t==="es"?HXt():t==="hi"?qXt():$Xt()}),GXt=()=>"Sign in",VXt=()=>"登录",KXt=()=>"ورود",WXt=()=>"تسجيل الدخول",QXt=()=>"Iniciar sesión",XXt=()=>"साइन इन करें",oL=((e={},n={})=>{const t=n.locale??z();return t==="zh-CN"?VXt():t==="fa"?KXt():t==="ar"?WXt():t==="es"?QXt():t==="hi"?XXt():GXt()}),YXt=e=>`SSH connection terminal for ${e==null?void 0:e.host}`,ZXt=e=>`${e==null?void 0:e.host} 的 SSH 连接终端`,JXt=e=>`پایانهٔ اتصال SSH برای ${e==null?void 0:e.host}`,eYt=e=>`طرفية اتصال SSH لـ ${e==null?void 0:e.host}`,tYt=e=>`Terminal de conexión SSH para ${e==null?void 0:e.host}`,nYt=e=>`${e==null?void 0:e.host} के लिए SSH कनेक्शन टर्मिनल`,lL=((e,n={})=>{const t=n.locale??z();return t==="zh-CN"?ZXt(e):t==="fa"?JXt(e):t==="ar"?eYt(e):t==="es"?tYt(e):t==="hi"?nYt(e):YXt(e)}),rYt=()=>"The local database, run logs, artifacts, and chat attachments. Moving this directory copies the entire store.",sYt=()=>"本地数据库、运行日志、产物和聊天附件。移动此目录会复制整个存储。",iYt=()=>"پایگاه دادهٔ محلی، گزارش اجراها، خروجی‌ها و پیوست‌های گفتگو. انتقال این پوشه، کل مخزن داده را کپی می‌کند.",aYt=()=>"قاعدة البيانات المحلية وسجلات التشغيل والمُخرَجات ومرفقات المحادثة. نقل هذا الدليل ينسخ المخزن بالكامل.",oYt=()=>"La base de datos local, los logs de las ejecuciones, los artefactos y los adjuntos de los chats. Mover este directorio copia todo el almacén.",lYt=()=>"लोकल डेटाबेस, रन लॉग, आर्टिफ़ैक्ट और चैट अटैचमेंट। इस डायरेक्टरी को स्थानांतरित करने पर पूरा स्टोर कॉपी होता है।",cYt=((e={},n={})=>{const t=n.locale??z();return t==="zh-CN"?sYt():t==="fa"?iYt():t==="ar"?aYt():t==="es"?oYt():t==="hi"?lYt():rYt()}),uYt=()=>"The terminal disconnected before setup completed. Try again.",_Yt=()=>"设置完成前终端连接已断开。请重试。",fYt=()=>"ارتباط ترمینال پیش از تکمیل راه‌اندازی قطع شد. دوباره تلاش کنید.",dYt=()=>"انقطعت الطرفية قبل اكتمال الإعداد. حاول مجددًا.",hYt=()=>"La terminal se desconectó antes de completar la configuración. Inténtalo de nuevo.",pYt=()=>"सेटअप पूरा होने से पहले टर्मिनल डिस्कनेक्ट हो गया। फिर से कोशिश करें।",bv=((e={},n={})=>{const t=n.locale??z();return t==="zh-CN"?_Yt():t==="fa"?fYt():t==="ar"?dYt():t==="es"?hYt():t==="hi"?pYt():uYt()}),mYt=()=>"Dark",gYt=()=>"深色",vYt=()=>"تیره",bYt=()=>"داكن",yYt=()=>"Oscuro",xYt=()=>"डार्क",wYt=((e={},n={})=>{const t=n.locale??z();return t==="zh-CN"?gYt():t==="fa"?vYt():t==="ar"?bYt():t==="es"?yYt():t==="hi"?xYt():mYt()}),kYt=()=>"Theme",SYt=()=>"主题",CYt=()=>"پوسته",EYt=()=>"السمة",NYt=()=>"Tema",zYt=()=>"थीम",pz=((e={},n={})=>{const t=n.locale??z();return t==="zh-CN"?SYt():t==="fa"?CYt():t==="ar"?EYt():t==="es"?NYt():t==="hi"?zYt():kYt()}),jYt=()=>"Light",TYt=()=>"浅色",AYt=()=>"روشن",RYt=()=>"فاتح",MYt=()=>"Claro",OYt=()=>"लाइट",DYt=((e={},n={})=>{const t=n.locale??z();return t==="zh-CN"?TYt():t==="fa"?AYt():t==="ar"?RYt():t==="es"?MYt():t==="hi"?OYt():jYt()}),LYt=()=>"System",IYt=()=>"系统",$Yt=()=>"سیستم",BYt=()=>"النظام",PYt=()=>"Sistema",FYt=()=>"सिस्टम",HYt=((e={},n={})=>{const t=n.locale??z();return t==="zh-CN"?IYt():t==="fa"?$Yt():t==="ar"?BYt():t==="es"?PYt():t==="hi"?FYt():LYt()}),qYt=()=>"Set up billing in the Tinker console",UYt=()=>"在 Tinker 控制台设置账单",GYt=()=>"تنظیم پرداخت در کنسول Tinker",VYt=()=>"أعِدّ الفوترة في وحدة تحكم Tinker",KYt=()=>"Configura la facturación en la consola de Tinker",WYt=()=>"Tinker कंसोल में बिलिंग सेट अप करें",QYt=((e={},n={})=>{const t=n.locale??z();return t==="zh-CN"?UYt():t==="fa"?GYt():t==="ar"?VYt():t==="es"?KYt():t==="hi"?WYt():qYt()}),XYt=()=>"Billing setup required",YYt=()=>"需要设置账单",ZYt=()=>"تنظیم پرداخت لازم است",JYt=()=>"مطلوب إعداد الفوترة",eZt=()=>"Hay que configurar la facturación",tZt=()=>"बिलिंग सेटअप ज़रूरी है",nZt=((e={},n={})=>{const t=n.locale??z();return t==="zh-CN"?YYt():t==="fa"?ZYt():t==="ar"?JYt():t==="es"?eZt():t==="hi"?tZt():XYt()}),rZt=()=>"TINKER_API_KEY is set in the process environment and overrides keys saved here. The status reflects that key.",sZt=()=>"进程环境中已设置 TINKER_API_KEY,它会覆盖此处保存的密钥。状态显示的是该密钥的检查结果。",iZt=()=>"متغیر TINKER_API_KEY در محیط فرایند تنظیم شده و بر کلیدهای ذخیره‌شده در اینجا اولویت دارد. وضعیت مربوط به همان کلید است.",aZt=()=>"‏TINKER_API_KEY مضبوط في بيئة العملية ويتجاوز المفاتيح المحفوظة هنا. تعكس الحالة ذلك المفتاح.",oZt=()=>"TINKER_API_KEY está definida en el entorno del proceso y tiene prioridad sobre las claves guardadas aquí. El estado corresponde a esa clave.",lZt=()=>"TINKER_API_KEY प्रोसेस एनवायरनमेंट में सेट है और यहाँ सेव की को ओवरराइड करता है। स्थिति उसी की को दर्शाती है।",cZt=((e={},n={})=>{const t=n.locale??z();return t==="zh-CN"?sZt():t==="fa"?iZt():t==="ar"?aZt():t==="es"?oZt():t==="hi"?lZt():rZt()}),uZt=()=>"Invalid Key",_Zt=()=>"密钥无效",fZt=()=>"کلید نامعتبر",dZt=()=>"مفتاح غير صالح",hZt=()=>"Clave no válida",pZt=()=>"अमान्य की",mZt=((e={},n={})=>{const t=n.locale??z();return t==="zh-CN"?_Zt():t==="fa"?fZt():t==="ar"?dZt():t==="es"?hZt():t==="hi"?pZt():uZt()}),gZt=()=>"Token from",vZt=()=>"令牌来自",bZt=()=>"توکن از",yZt=()=>"الرمز من",xZt=()=>"Token tomado de la",wZt=()=>"टोकन स्रोत",kZt=((e={},n={})=>{const t=n.locale??z();return t==="zh-CN"?vZt():t==="fa"?bZt():t==="ar"?yZt():t==="es"?xZt():t==="hi"?wZt():gZt()}),SZt=()=>"Update now",CZt=()=>"立即更新",EZt=()=>"اکنون به‌روزرسانی کن",NZt=()=>"التحديث الآن",zZt=()=>"Actualizar ahora",jZt=()=>"अभी अपडेट करें",TZt=((e={},n={})=>{const t=n.locale??z();return t==="zh-CN"?CZt():t==="fa"?EZt():t==="ar"?NZt():t==="es"?zZt():t==="hi"?jZt():SZt()}),AZt=e=>`Update to ${e==null?void 0:e.version}`,RZt=e=>`更新到 ${e==null?void 0:e.version}`,MZt=e=>`به‌روزرسانی به ${e==null?void 0:e.version}`,OZt=e=>`التحديث إلى ${e==null?void 0:e.version}`,DZt=e=>`Actualizar a ${e==null?void 0:e.version}`,LZt=e=>`वर्शन ${e==null?void 0:e.version} पर अपडेट करें`,IZt=((e,n={})=>{const t=n.locale??z();return t==="zh-CN"?RZt(e):t==="fa"?MZt(e):t==="ar"?OZt(e):t==="es"?DZt(e):t==="hi"?LZt(e):AZt(e)}),$Zt=()=>" Updates are switched off for this environment by ORX_NO_UPDATE_CHECK, so this setting has no effect.",BZt=()=>" 此环境已通过 ORX_NO_UPDATE_CHECK 关闭更新,因此此设置不会生效。",PZt=()=>" به‌روزرسانی در این محیط با ORX_NO_UPDATE_CHECK خاموش شده است؛ بنابراین این تنظیم اثری ندارد.",FZt=()=>" التحديثات معطّلة لهذه البيئة عبر ORX_NO_UPDATE_CHECK، لذا ليس لهذا الإعداد أثر.",HZt=()=>" ORX_NO_UPDATE_CHECK desactiva las actualizaciones en este entorno, así que este ajuste no tiene efecto.",qZt=()=>" इस एनवायरनमेंट के लिए ORX_NO_UPDATE_CHECK द्वारा अपडेट बंद कर दिए गए हैं, इसलिए इस सेटिंग का कोई असर नहीं है।",UZt=((e={},n={})=>{const t=n.locale??z();return t==="zh-CN"?BZt():t==="fa"?PZt():t==="ar"?FZt():t==="es"?HZt():t==="hi"?qZt():$Zt()}),GZt=()=>"Updating default destination…",VZt=()=>"正在更新默认运行位置…",KZt=()=>"در حال به‌روزرسانی مقصد پیش‌فرض…",WZt=()=>"جارٍ تحديث الوجهة الافتراضية…",QZt=()=>"Actualizando el destino predeterminado…",XZt=()=>"डिफ़ॉल्ट गंतव्य अपडेट हो रहा है…",YZt=((e={},n={})=>{const t=n.locale??z();return t==="zh-CN"?VZt():t==="fa"?KZt():t==="ar"?WZt():t==="es"?QZt():t==="hi"?XZt():GZt()}),ZZt=()=>"Use this repository for automatic experiment-branch pushes when your connected account can write to it. Otherwise, OpenResearch creates a separate private repository for collaboration.",JZt=()=>"当已连接的账户有写入权限时,使用此仓库自动推送实验分支。否则,OpenResearch 会另建一个私有仓库用于协作。",eJt=()=>"اگر حساب متصل اجازهٔ نوشتن داشته باشد، شاخه‌های آزمایش خودکار به این مخزن پوش می‌شوند. در غیر این صورت OpenResearch یک مخزن خصوصی جداگانه برای همکاری می‌سازد.",tJt=()=>"استخدم هذا المستودع لرفع فروع التجارب تلقائيًا عندما يملك حسابك المتصل صلاحية الكتابة فيه. وإلا، ينشئ OpenResearch مستودعًا خاصًا منفصلًا للتعاون.",nJt=()=>"Usar este repositorio para subir automáticamente las ramas de los experimentos si tu cuenta conectada tiene permiso de escritura. Si no, OpenResearch crea un repositorio privado aparte para colaborar.",rJt=()=>"जब आपका कनेक्टेड खाता इसमें लिख सकता है तो ऑटोमैटिक प्रयोग-ब्रांच पुश के लिए इस रिपॉज़िटरी का इस्तेमाल करें। नहीं तो, OpenResearch सहयोग के लिए एक अलग निजी रिपॉज़िटरी बनाता है।",sJt=((e={},n={})=>{const t=n.locale??z();return t==="zh-CN"?JZt():t==="fa"?eJt():t==="ar"?tJt():t==="es"?nJt():t==="hi"?rJt():ZZt()}),iJt=()=>"Validating…",aJt=()=>"正在验证…",oJt=()=>"در حال اعتبارسنجی…",lJt=()=>"جارٍ التحقق…",cJt=()=>"Validando…",uJt=()=>"सत्यापित हो रहा है…",cL=((e={},n={})=>{const t=n.locale??z();return t==="zh-CN"?aJt():t==="fa"?oJt():t==="ar"?lJt():t==="es"?cJt():t==="hi"?uJt():iJt()}),_Jt=()=>"View settings",fJt=()=>"查看设置",dJt=()=>"مشاهدهٔ تنظیمات",hJt=()=>"عرض الإعدادات",pJt=()=>"Ver configuración",mJt=()=>"सेटिंग्स देखें",gJt=((e={},n={})=>{const t=n.locale??z();return t==="zh-CN"?fJt():t==="fa"?dJt():t==="ar"?hJt():t==="es"?pJt():t==="hi"?mJt():_Jt()}),vJt=()=>"Skill",bJt=()=>"技能",yJt=()=>"مهارت",xJt=()=>"مهارة",wJt=()=>"Skill",kJt=()=>"स्किल",SJt=((e={},n={})=>{const t=n.locale??z();return t==="zh-CN"?bJt():t==="fa"?yJt():t==="ar"?xJt():t==="es"?wJt():t==="hi"?kJt():vJt()}),CJt=()=>"Loading skill…",EJt=()=>"正在加载技能…",NJt=()=>"در حال بارگیری مهارت…",zJt=()=>"جارٍ تحميل المهارة…",jJt=()=>"Cargando skill…",TJt=()=>"स्किल लोड हो रही है…",AJt=((e={},n={})=>{const t=n.locale??z();return t==="zh-CN"?EJt():t==="fa"?NJt():t==="ar"?zJt():t==="es"?jJt():t==="hi"?TJt():CJt()}),RJt=()=>"Personal",MJt=()=>"个人",OJt=()=>"شخصی",DJt=()=>"شخصي",LJt=()=>"Personal",IJt=()=>"व्यक्तिगत",$Jt=((e={},n={})=>{const t=n.locale??z();return t==="zh-CN"?MJt():t==="fa"?OJt():t==="ar"?DJt():t==="es"?LJt():t==="hi"?IJt():RJt()}),BJt=()=>"Alternatively, tell your agent to save a reusable skill for you.",PJt=()=>"或者,请你的智能体为你保存可重复使用的技能。",FJt=()=>"یا از عامل خود بخواهید یک مهارت قابل استفادهٔ مجدد برایتان ذخیره کند.",HJt=()=>"أو بدلًا من ذلك، اطلب من وكيلك حفظ مهارة قابلة لإعادة الاستخدام لك.",qJt=()=>"También puedes pedirle a tu agente que guarde una skill reutilizable por ti.",UJt=()=>"या अपने एजेंट से आपके लिए एक पुनः-प्रयोग करने योग्य स्किल सेव करने को कहें।",GJt=((e={},n={})=>{const t=n.locale??z();return t==="zh-CN"?PJt():t==="fa"?FJt():t==="ar"?HJt():t==="es"?qJt():t==="hi"?UJt():BJt()}),VJt=e=>`Delete the “${e==null?void 0:e.name}” skill?`,KJt=e=>`删除技能“${e==null?void 0:e.name}”?`,WJt=e=>`مهارت «${e==null?void 0:e.name}» حذف شود؟`,QJt=e=>`حذف مهارة «${e==null?void 0:e.name}»؟`,XJt=e=>`¿Eliminar la skill “${e==null?void 0:e.name}”?`,YJt=e=>`“${e==null?void 0:e.name}” स्किल हटाएं?`,ZJt=((e,n={})=>{const t=n.locale??z();return t==="zh-CN"?KJt(e):t==="fa"?WJt(e):t==="ar"?QJt(e):t==="es"?XJt(e):t==="hi"?YJt(e):VJt(e)}),JJt=e=>`Delete skill ${e==null?void 0:e.name}`,een=e=>`删除技能 ${e==null?void 0:e.name}`,ten=e=>`حذف مهارت ${e==null?void 0:e.name}`,nen=e=>`حذف المهارة ${e==null?void 0:e.name}`,ren=e=>`Eliminar la skill ${e==null?void 0:e.name}`,sen=e=>`${e==null?void 0:e.name} स्किल हटाएं`,ien=((e,n={})=>{const t=n.locale??z();return t==="zh-CN"?een(e):t==="fa"?ten(e):t==="ar"?nen(e):t==="es"?ren(e):t==="hi"?sen(e):JJt(e)}),aen=e=>`Delete the “${e==null?void 0:e.name}” template?`,oen=e=>`删除模板“${e==null?void 0:e.name}”?`,len=e=>`قالب «${e==null?void 0:e.name}» حذف شود؟`,cen=e=>`حذف قالب «${e==null?void 0:e.name}»؟`,uen=e=>`¿Eliminar la plantilla “${e==null?void 0:e.name}”?`,_en=e=>`“${e==null?void 0:e.name}” टेम्पलेट हटाएं?`,fen=((e,n={})=>{const t=n.locale??z();return t==="zh-CN"?oen(e):t==="fa"?len(e):t==="ar"?cen(e):t==="es"?uen(e):t==="hi"?_en(e):aen(e)}),den=e=>`Delete template ${e==null?void 0:e.name}`,hen=e=>`删除模板 ${e==null?void 0:e.name}`,pen=e=>`حذف قالب ${e==null?void 0:e.name}`,men=e=>`حذف القالب ${e==null?void 0:e.name}`,gen=e=>`Eliminar la plantilla ${e==null?void 0:e.name}`,ven=e=>`${e==null?void 0:e.name} टेम्पलेट हटाएं`,ben=((e,n={})=>{const t=n.locale??z();return t==="zh-CN"?hen(e):t==="fa"?pen(e):t==="ar"?men(e):t==="es"?gen(e):t==="hi"?ven(e):den(e)}),yen=()=>"Invoke skills with /name in chat. Skills from your coding agents are screened for research relevance before importing. Upload a skill to include it yourself. Alternatively, tell your OpenResearch agent to create and add a reusable skill for you.",xen=()=>"在聊天中使用 /name 调用技能。来自编程代理的技能会先经过研究相关性筛选,再导入。您也可以自行上传技能,或让 OpenResearch 代理为您创建并添加可复用技能。",wen=()=>"مهارت‌ها را با /name در گفتگو فراخوانی کنید. مهارت‌های عامل‌های برنامه‌نویسی پیش از وارد شدن از نظر ارتباط با پژوهش بررسی می‌شوند. می‌توانید مهارت را خودتان بارگذاری کنید یا از عامل OpenResearch بخواهید یک مهارت قابل استفادهٔ مجدد بسازد و اضافه کند.",ken=()=>"استدعِ المهارات عبر ‎/name‎ في المحادثة. تُفحَص مهارات وكلاء البرمجة لديك للتأكد من صلتها بالبحث قبل استيرادها. ارفع مهارة لتضمينها بنفسك. أو بدلًا من ذلك، اطلب من وكيل OpenResearch إنشاء مهارة قابلة لإعادة الاستخدام وإضافتها لك.",Sen=()=>"Usa las skills con /nombre en el chat. Las skills de tus agentes de programación se filtran según su relevancia para la investigación antes de importarlas. Sube una skill para incluirla tú mismo. También puedes pedirle a tu agente de OpenResearch que cree y añada una skill reutilizable por ti.",Cen=()=>"चैट में /नाम से स्किल इस्तेमाल करें। आपके कोडिंग एजेंटों की स्किल इंपोर्ट करने से पहले शोध प्रासंगिकता के लिए जाँची जाती हैं। खुद स्किल शामिल करने के लिए एक अपलोड करें। या अपने OpenResearch एजेंट से आपके लिए एक पुनः-प्रयोग करने योग्य स्किल बनाने और जोड़ने को कहें।",Een=((e={},n={})=>{const t=n.locale??z();return t==="zh-CN"?xen():t==="fa"?wen():t==="ar"?ken():t==="es"?Sen():t==="hi"?Cen():yen()}),Nen=()=>"Drop a SKILL.md or .zip here, or click to choose",zen=()=>"将 SKILL.md 或 .zip 拖放到此处,或点击选择",jen=()=>"یک فایل SKILL.md یا .zip را اینجا رها کنید، یا برای انتخاب کلیک کنید",Ten=()=>"أفلِت ملف ‎SKILL.md‎ أو ‎.zip‎ هنا، أو انقر للاختيار",Aen=()=>"Suelta aquí un SKILL.md o un .zip, o haz clic para elegirlo",Ren=()=>"यहाँ एक SKILL.md या .zip छोड़ें, या चुनने के लिए क्लिक करें",Men=((e={},n={})=>{const t=n.locale??z();return t==="zh-CN"?zen():t==="fa"?jen():t==="ar"?Ten():t==="es"?Aen():t==="hi"?Ren():Nen()}),Oen=()=>"Drop a .tex or .zip here, or click to choose",Den=()=>"将 .tex 或 .zip 拖放到此处,或点击选择",Len=()=>"یک فایل .tex یا .zip را اینجا رها کنید، یا برای انتخاب کلیک کنید",Ien=()=>"أفلِت ملف ‎.tex‎ أو ‎.zip‎ هنا، أو انقر للاختيار",$en=()=>"Suelta aquí un .tex o un .zip, o haz clic para elegirlo",Ben=()=>"यहाँ एक .tex या .zip छोड़ें, या चुनने के लिए क्लिक करें",Pen=((e={},n={})=>{const t=n.locale??z();return t==="zh-CN"?Den():t==="fa"?Len():t==="ar"?Ien():t==="es"?$en():t==="hi"?Ben():Oen()}),Fen=()=>"File too large (max 20 MB).",Hen=()=>"文件过大(最大 20 MB)。",qen=()=>"فایل بیش از حد بزرگ است (حداکثر ۲۰ مگابایت).",Uen=()=>"الملف كبير جدًا (بحد أقصى 20 ميغابايت).",Gen=()=>"Archivo demasiado grande (máx. 20 MB).",Ven=()=>"फ़ाइल बहुत बड़ी है (अधिकतम 20 MB)।",uL=((e={},n={})=>{const t=n.locale??z();return t==="zh-CN"?Hen():t==="fa"?qen():t==="ar"?Uen():t==="es"?Gen():t==="hi"?Ven():Fen()}),Ken=()=>" + 1 file",Wen=()=>" + 1 个文件",Qen=()=>" + ۱ فایل",Xen=()=>" + ملف واحد",Yen=()=>" + 1 archivo",Zen=()=>" + 1 फ़ाइल",Jen=((e={},n={})=>{const t=n.locale??z();return t==="zh-CN"?Wen():t==="fa"?Qen():t==="ar"?Xen():t==="es"?Yen():t==="hi"?Zen():Ken()}),etn=()=>"Customize the skills and LaTeX templates available across your projects. Upload them here, or ask an OpenResearch agent to create and add them for you.",ttn=()=>"自定义所有项目中可用的技能和 LaTeX 模板。在此上传,或让 OpenResearch 代理为您创建并添加。",ntn=()=>"مهارت‌ها و قالب‌های LaTeX قابل استفاده در همهٔ پروژه‌ها را سفارشی کنید. آن‌ها را اینجا بارگذاری کنید یا از عامل OpenResearch بخواهید برایتان بسازد و اضافه کند.",rtn=()=>"خصّص المهارات وقوالب LaTeX المتاحة عبر مشاريعك. ارفعها هنا، أو اطلب من وكيل OpenResearch إنشاءها وإضافتها لك.",stn=()=>"Personaliza las skills y plantillas de LaTeX disponibles en todos tus proyectos. Súbelas aquí o pídele a un agente de OpenResearch que las cree y las añada por ti.",itn=()=>"अपने प्रोजेक्ट में उपलब्ध स्किल और LaTeX टेम्पलेट कस्टमाइज़ करें। उन्हें यहाँ अपलोड करें, या किसी OpenResearch एजेंट से आपके लिए उन्हें बनाने और जोड़ने को कहें।",atn=((e={},n={})=>{const t=n.locale??z();return t==="zh-CN"?ttn():t==="fa"?ntn():t==="ar"?rtn():t==="es"?stn():t==="hi"?itn():etn()}),otn=()=>"Remove from OpenResearch",ltn=()=>"从 OpenResearch 移除",ctn=()=>"حذف از OpenResearch",utn=()=>"إزالة من OpenResearch",_tn=()=>"Quitar de OpenResearch",ftn=()=>"OpenResearch से हटाएं",dtn=((e={},n={})=>{const t=n.locale??z();return t==="zh-CN"?ltn():t==="fa"?ctn():t==="ar"?utn():t==="es"?_tn():t==="hi"?ftn():otn()}),htn=e=>`Remove “${e==null?void 0:e.name}” from OpenResearch? Its source files will remain in your coding agent.`,ptn=e=>`从 OpenResearch 移除“${e==null?void 0:e.name}”?源文件将保留在你的编程智能体中。`,mtn=e=>`«${e==null?void 0:e.name}» از OpenResearch حذف شود؟ فایل‌های اصلی در عامل برنامه‌نویسی شما باقی می‌مانند.`,gtn=e=>`إزالة «${e==null?void 0:e.name}» من OpenResearch؟ ستبقى ملفاتها المصدرية في وكيل البرمجة الخاص بك.`,vtn=e=>`¿Quitar “${e==null?void 0:e.name}” de OpenResearch? Sus archivos originales se conservarán en tu agente de programación.`,btn=e=>`“${e==null?void 0:e.name}” को OpenResearch से हटाएं? इसकी सोर्स फ़ाइलें आपके कोडिंग एजेंट में बनी रहेंगी।`,ytn=((e,n={})=>{const t=n.locale??z();return t==="zh-CN"?ptn(e):t==="fa"?mtn(e):t==="ar"?gtn(e):t==="es"?vtn(e):t==="hi"?btn(e):htn(e)}),xtn=e=>`Remove ${e==null?void 0:e.name} from OpenResearch`,wtn=e=>`从 OpenResearch 移除 ${e==null?void 0:e.name}`,ktn=e=>`حذف ${e==null?void 0:e.name} از OpenResearch`,Stn=e=>`إزالة ${e==null?void 0:e.name} من OpenResearch`,Ctn=e=>`Quitar ${e==null?void 0:e.name} de OpenResearch`,Etn=e=>`${e==null?void 0:e.name} को OpenResearch से हटाएं`,Ntn=((e,n={})=>{const t=n.locale??z();return t==="zh-CN"?wtn(e):t==="fa"?ktn(e):t==="ar"?Stn(e):t==="es"?Ctn(e):t==="hi"?Etn(e):xtn(e)}),ztn=e=>` + ${e==null?void 0:e.count} files`,jtn=e=>` + ${e==null?void 0:e.count} 个文件`,Ttn=e=>` + ${e==null?void 0:e.count} فایل`,Atn=e=>` + ملفات (${e==null?void 0:e.count})`,Rtn=e=>` + ${e==null?void 0:e.count} archivos`,Mtn=e=>` + ${e==null?void 0:e.count} फ़ाइलें`,Otn=((e,n={})=>{const t=n.locale??z();return t==="zh-CN"?jtn(e):t==="fa"?Ttn(e):t==="ar"?Atn(e):t==="es"?Rtn(e):t==="hi"?Mtn(e):ztn(e)}),Dtn=()=>"Could not load skills:",Ltn=()=>"无法加载技能:",Itn=()=>"بارگیری مهارت‌ها ممکن نشد:",$tn=()=>"تعذّر تحميل المهارات:",Btn=()=>"No se pudieron cargar las skills:",Ptn=()=>"स्किल लोड नहीं हो सकीं:",Ftn=((e={},n={})=>{const t=n.locale??z();return t==="zh-CN"?Ltn():t==="fa"?Itn():t==="ar"?$tn():t==="es"?Btn():t==="hi"?Ptn():Dtn()}),Htn=()=>"Could not load templates:",qtn=()=>"无法加载模板:",Utn=()=>"بارگیری قالب‌ها ممکن نشد:",Gtn=()=>"تعذّر تحميل القوالب:",Vtn=()=>"No se pudieron cargar las plantillas:",Ktn=()=>"टेम्पलेट लोड नहीं हो सके:",Wtn=((e={},n={})=>{const t=n.locale??z();return t==="zh-CN"?qtn():t==="fa"?Utn():t==="ar"?Gtn():t==="es"?Vtn():t==="hi"?Ktn():Htn()}),Qtn=()=>"Customize",Xtn=()=>"自定义",Ytn=()=>"سفارشی‌سازی",Ztn=()=>"تخصيص",Jtn=()=>"Personalizar",enn=()=>"कस्टमाइज़ करें",tnn=((e={},n={})=>{const t=n.locale??z();return t==="zh-CN"?Xtn():t==="fa"?Ytn():t==="ar"?Ztn():t==="es"?Jtn():t==="hi"?enn():Qtn()}),nnn=()=>"Delete skill",rnn=()=>"删除技能",snn=()=>"حذف مهارت",inn=()=>"حذف المهارة",ann=()=>"Eliminar skill",onn=()=>"स्किल हटाएं",lnn=((e={},n={})=>{const t=n.locale??z();return t==="zh-CN"?rnn():t==="fa"?snn():t==="ar"?inn():t==="es"?ann():t==="hi"?onn():nnn()}),cnn=()=>"Delete template",unn=()=>"删除模板",_nn=()=>"حذف قالب",fnn=()=>"حذف القالب",dnn=()=>"Eliminar plantilla",hnn=()=>"टेम्पलेट हटाएं",pnn=((e={},n={})=>{const t=n.locale??z();return t==="zh-CN"?unn():t==="fa"?_nn():t==="ar"?fnn():t==="es"?dnn():t==="hi"?hnn():cnn()}),mnn=()=>"LaTeX templates",gnn=()=>"LaTeX 模板",vnn=()=>"قالب‌های LaTeX",bnn=()=>"قوالب LaTeX",ynn=()=>"Plantillas de LaTeX",xnn=()=>"LaTeX टेम्पलेट",wnn=((e={},n={})=>{const t=n.locale??z();return t==="zh-CN"?gnn():t==="fa"?vnn():t==="ar"?bnn():t==="es"?ynn():t==="hi"?xnn():mnn()}),knn=()=>"Loading skills…",Snn=()=>"正在加载技能…",Cnn=()=>"در حال بارگیری مهارت‌ها…",Enn=()=>"جارٍ تحميل المهارات…",Nnn=()=>"Cargando skills…",znn=()=>"स्किल लोड हो रही हैं…",jnn=((e={},n={})=>{const t=n.locale??z();return t==="zh-CN"?Snn():t==="fa"?Cnn():t==="ar"?Enn():t==="es"?Nnn():t==="hi"?znn():knn()}),Tnn=()=>"Loading templates…",Ann=()=>"正在加载模板…",Rnn=()=>"در حال بارگیری قالب‌ها…",Mnn=()=>"جارٍ تحميل القوالب…",Onn=()=>"Cargando plantillas…",Dnn=()=>"टेम्पलेट लोड हो रहे हैं…",Lnn=((e={},n={})=>{const t=n.locale??z();return t==="zh-CN"?Ann():t==="fa"?Rnn():t==="ar"?Mnn():t==="es"?Onn():t==="hi"?Dnn():Tnn()}),Inn=()=>"No skills yet.",$nn=()=>"尚无技能。",Bnn=()=>"هنوز مهارتی وجود ندارد.",Pnn=()=>"لا توجد مهارات بعد.",Fnn=()=>"Aún no hay skills.",Hnn=()=>"अभी तक कोई स्किल नहीं।",qnn=((e={},n={})=>{const t=n.locale??z();return t==="zh-CN"?$nn():t==="fa"?Bnn():t==="ar"?Pnn():t==="es"?Fnn():t==="hi"?Hnn():Inn()}),Unn=()=>"No templates yet.",Gnn=()=>"尚无模板。",Vnn=()=>"هنوز قالبی وجود ندارد.",Knn=()=>"لا توجد قوالب بعد.",Wnn=()=>"Aún no hay plantillas.",Qnn=()=>"अभी तक कोई टेम्पलेट नहीं।",Xnn=((e={},n={})=>{const t=n.locale??z();return t==="zh-CN"?Gnn():t==="fa"?Vnn():t==="ar"?Knn():t==="es"?Wnn():t==="hi"?Qnn():Unn()}),Ynn=()=>"Skills",Znn=()=>"技能",Jnn=()=>"مهارت‌ها",ern=()=>"المهارات",trn=()=>"Skills",nrn=()=>"स्किल",rrn=((e={},n={})=>{const t=n.locale??z();return t==="zh-CN"?Znn():t==="fa"?Jnn():t==="ar"?ern():t==="es"?trn():t==="hi"?nrn():Ynn()}),srn=()=>"Uploading…",irn=()=>"正在上传…",arn=()=>"در حال بارگذاری…",orn=()=>"جارٍ الرفع…",lrn=()=>"Subiendo…",crn=()=>"अपलोड हो रहा है…",urn=((e={},n={})=>{const t=n.locale??z();return t==="zh-CN"?irn():t==="fa"?arn():t==="ar"?orn():t==="es"?lrn():t==="hi"?crn():srn()}),_rn=()=>"A conference class or house style the agent writes papers into instead of its default preamble. Upload a .tex file or a .zip containing its .cls and .sty files. Alternatively, tell your OpenResearch agent to create and add a LaTeX template for you. With exactly one template available, the agent uses it without asking.",frn=()=>"代理撰写论文时使用的会议格式或自定义样式,用于替代默认导言区。上传 .tex 文件或包含 .cls 和 .sty 文件的 .zip 压缩包,也可以让 OpenResearch 代理为您创建并添加 LaTeX 模板。只有一个模板可用时,代理会直接使用,无需询问。",drn=()=>"قالب کنفرانس یا سبک اختصاصی که عامل به‌جای پیش‌گفتار پیش‌فرض برای نوشتن مقاله استفاده می‌کند. یک فایل .tex یا فایل .zip شامل فایل‌های .cls و .sty بارگذاری کنید، یا از عامل OpenResearch بخواهید قالب LaTeX بسازد و اضافه کند. اگر تنها یک قالب موجود باشد، عامل بدون پرسش از آن استفاده می‌کند.",hrn=()=>"قالب مؤتمر أو تنسيق خاص بالمؤسسة يستخدمه الوكيل لكتابة الأوراق بدلًا من إعدادات LaTeX الافتراضية. ارفع ملف ‎.tex‎ أو ملف ‎.zip‎ يحتوي على ملفات ‎.cls‎ و‎.sty‎ الخاصة به. أو اطلب من وكيل OpenResearch إنشاء قالب LaTeX وإضافته لك. عند توفّر قالب واحد فقط، يستخدمه الوكيل دون سؤال.",prn=()=>"Un estilo de congreso o de la casa en el que el agente escribe los papers en lugar de usar su preámbulo predeterminado. Sube un archivo .tex o un .zip con sus archivos .cls y .sty. También puedes pedirle a tu agente de OpenResearch que cree y añada una plantilla de LaTeX por ti. Si solo hay una plantilla disponible, el agente la usa sin preguntar.",mrn=()=>"एक कॉन्फ़्रेंस क्लास या हाउस स्टाइल जिसमें एजेंट अपने डिफ़ॉल्ट प्रीएंबल की बजाय पेपर लिखता है। एक .tex फ़ाइल या उसकी .cls और .sty फ़ाइलों वाली .zip अपलोड करें। या अपने OpenResearch एजेंट से आपके लिए एक LaTeX टेम्पलेट बनाने और जोड़ने को कहें। ठीक एक टेम्पलेट उपलब्ध होने पर, एजेंट बिना पूछे उसी का इस्तेमाल करता है।",grn=((e={},n={})=>{const t=n.locale??z();return t==="zh-CN"?frn():t==="fa"?drn():t==="ar"?hrn():t==="es"?prn():t==="hi"?mrn():_rn()}),vrn=()=>"Upload a SKILL.md file or a .zip of a skill folder.",brn=()=>"请上传 SKILL.md 文件或技能文件夹的 .zip 压缩包。",yrn=()=>"یک فایل SKILL.md یا فایل .zip از پوشهٔ مهارت بارگذاری کنید.",xrn=()=>"ارفع ملف ‎SKILL.md‎ أو ملف ‎.zip‎ لمجلد مهارة.",wrn=()=>"Sube un archivo SKILL.md o un .zip con la carpeta de la skill.",krn=()=>"एक SKILL.md फ़ाइल या स्किल फ़ोल्डर की .zip अपलोड करें।",Srn=((e={},n={})=>{const t=n.locale??z();return t==="zh-CN"?brn():t==="fa"?yrn():t==="ar"?xrn():t==="es"?wrn():t==="hi"?krn():vrn()}),Crn=()=>"Upload a .tex file or a .zip of a template folder.",Ern=()=>"请上传 .tex 文件或模板文件夹的 .zip 压缩包。",Nrn=()=>"یک فایل .tex یا فایل .zip از پوشهٔ قالب بارگذاری کنید.",zrn=()=>"ارفع ملف ‎.tex‎ أو ملف ‎.zip‎ لمجلد قالب.",jrn=()=>"Sube un archivo .tex o un .zip con la carpeta de la plantilla.",Trn=()=>"एक .tex फ़ाइल या टेम्पलेट फ़ोल्डर की .zip अपलोड करें।",Arn=((e={},n={})=>{const t=n.locale??z();return t==="zh-CN"?Ern():t==="fa"?Nrn():t==="ar"?zrn():t==="es"?jrn():t==="hi"?Trn():Crn()}),Rrn=()=>"Close SSH config",Mrn=()=>"关闭 SSH 配置",Orn=()=>"بستن پیکربندی SSH",Drn=()=>"إغلاق إعداد SSH",Lrn=()=>"Cerrar la configuración SSH",Irn=()=>"SSH कॉन्फ़िग बंद करें",$rn=((e={},n={})=>{const t=n.locale??z();return t==="zh-CN"?Mrn():t==="fa"?Orn():t==="ar"?Drn():t==="es"?Lrn():t==="hi"?Irn():Rrn()}),Brn=()=>"Discard your unsaved SSH config changes?",Prn=()=>"要放弃未保存的 SSH 配置更改吗?",Frn=()=>"تغییرات ذخیره‌نشدهٔ پیکربندی SSH کنار گذاشته شود؟",Hrn=()=>"تجاهل تغييرات إعداد SSH غير المحفوظة؟",qrn=()=>"¿Descartar los cambios sin guardar en la configuración SSH?",Urn=()=>"आपके सेव न किए गए SSH कॉन्फ़िग बदलाव छोड़ें?",Grn=((e={},n={})=>{const t=n.locale??z();return t==="zh-CN"?Prn():t==="fa"?Frn():t==="ar"?Hrn():t==="es"?qrn():t==="hi"?Urn():Brn()}),Vrn=()=>"Loading SSH config…",Krn=()=>"正在加载 SSH 配置…",Wrn=()=>"در حال بارگیری پیکربندی SSH…",Qrn=()=>"جارٍ تحميل إعداد SSH…",Xrn=()=>"Cargando la configuración SSH…",Yrn=()=>"SSH कॉन्फ़िग लोड हो रहा है…",Zrn=((e={},n={})=>{const t=n.locale??z();return t==="zh-CN"?Krn():t==="fa"?Wrn():t==="ar"?Qrn():t==="es"?Xrn():t==="hi"?Yrn():Vrn()}),Jrn=()=>"SSH config saved",esn=()=>"SSH 配置已保存",tsn=()=>"پیکربندی SSH ذخیره شد",nsn=()=>"تم حفظ إعداد SSH",rsn=()=>"Configuración SSH guardada",ssn=()=>"SSH कॉन्फ़िग सेव हो गया",isn=((e={},n={})=>{const t=n.locale??z();return t==="zh-CN"?esn():t==="fa"?tsn():t==="ar"?nsn():t==="es"?rsn():t==="hi"?ssn():Jrn()}),asn=()=>"SSH config",osn=()=>"SSH 配置",lsn=()=>"پیکربندی SSH",csn=()=>"إعداد SSH",usn=()=>"Configuración SSH",_sn=()=>"SSH कॉन्फ़िग",fsn=((e={},n={})=>{const t=n.locale??z();return t==="zh-CN"?osn():t==="fa"?lsn():t==="ar"?csn():t==="es"?usn():t==="hi"?_sn():asn()}),dsn=()=>"Configure SSH hosts…",hsn=()=>"配置 SSH 主机…",psn=()=>"پیکربندی میزبان‌های SSH…",msn=()=>"إعداد مضيفات SSH…",gsn=()=>"Configurar hosts SSH…",vsn=()=>"SSH होस्ट कॉन्फ़िगर करें…",_L=((e={},n={})=>{const t=n.locale??z();return t==="zh-CN"?hsn():t==="fa"?psn():t==="ar"?msn():t==="es"?gsn():t==="hi"?vsn():dsn()}),bsn=()=>"Cancelled",ysn=()=>"已取消",xsn=()=>"لغوشده",wsn=()=>"ملغى",ksn=()=>"Cancelado",Ssn=()=>"रद्द किया गया",Csn=((e={},n={})=>{const t=n.locale??z();return t==="zh-CN"?ysn():t==="fa"?xsn():t==="ar"?wsn():t==="es"?ksn():t==="hi"?Ssn():bsn()}),Esn=()=>"Cancelling",Nsn=()=>"正在取消",zsn=()=>"در حال لغو",jsn=()=>"جارٍ الإلغاء",Tsn=()=>"Cancelando",Asn=()=>"रद्द हो रहा है",Rsn=((e={},n={})=>{const t=n.locale??z();return t==="zh-CN"?Nsn():t==="fa"?zsn():t==="ar"?jsn():t==="es"?Tsn():t==="hi"?Asn():Esn()}),Msn=()=>"Done",Osn=()=>"已完成",Dsn=()=>"انجام‌شده",Lsn=()=>"تم",Isn=()=>"Completado",$sn=()=>"पूरा हुआ",fL=((e={},n={})=>{const t=n.locale??z();return t==="zh-CN"?Osn():t==="fa"?Dsn():t==="ar"?Lsn():t==="es"?Isn():t==="hi"?$sn():Msn()}),Bsn=()=>"Editing",Psn=()=>"正在编辑",Fsn=()=>"در حال ویرایش",Hsn=()=>"قيد التعديل",qsn=()=>"Editando",Usn=()=>"संपादित हो रहा है",Gsn=((e={},n={})=>{const t=n.locale??z();return t==="zh-CN"?Psn():t==="fa"?Fsn():t==="ar"?Hsn():t==="es"?qsn():t==="hi"?Usn():Bsn()}),Vsn=()=>"Failed",Ksn=()=>"失败",Wsn=()=>"ناموفق",Qsn=()=>"فشل",Xsn=()=>"Error",Ysn=()=>"विफल",Zsn=((e={},n={})=>{const t=n.locale??z();return t==="zh-CN"?Ksn():t==="fa"?Wsn():t==="ar"?Qsn():t==="es"?Xsn():t==="hi"?Ysn():Vsn()}),Jsn=()=>"Idle",ein=()=>"空闲",tin=()=>"بی‌کار",nin=()=>"خامل",rin=()=>"Inactivo",sin=()=>"निष्क्रिय",iin=((e={},n={})=>{const t=n.locale??z();return t==="zh-CN"?ein():t==="fa"?tin():t==="ar"?nin():t==="es"?rin():t==="hi"?sin():Jsn()}),ain=()=>"Running",oin=()=>"运行中",lin=()=>"در حال اجرا",cin=()=>"قيد التشغيل",uin=()=>"En ejecución",_in=()=>"चल रहा है",fin=((e={},n={})=>{const t=n.locale??z();return t==="zh-CN"?oin():t==="fa"?lin():t==="ar"?cin():t==="es"?uin():t==="hi"?_in():ain()}),din=()=>"Starting",hin=()=>"正在启动",pin=()=>"در حال آغاز",min=()=>"جارٍ البدء",gin=()=>"Iniciando",vin=()=>"शुरू हो रहा है",bin=((e={},n={})=>{const t=n.locale??z();return t==="zh-CN"?hin():t==="fa"?pin():t==="ar"?min():t==="es"?gin():t==="hi"?vin():din()}),yin=()=>"Copying…",xin=()=>"正在复制…",win=()=>"در حال کپی…",kin=()=>"جارٍ النسخ…",Sin=()=>"Copiando…",Cin=()=>"कॉपी हो रहा है…",Ein=((e={},n={})=>{const t=n.locale??z();return t==="zh-CN"?xin():t==="fa"?win():t==="ar"?kin():t==="es"?Sin():t==="hi"?Cin():yin()}),Nin=()=>"Finalizing…",zin=()=>"正在完成…",jin=()=>"در حال نهایی‌سازی…",Tin=()=>"جارٍ الإنهاء…",Ain=()=>"Finalizando…",Rin=()=>"अंतिम रूप दिया जा रहा है…",Min=((e={},n={})=>{const t=n.locale??z();return t==="zh-CN"?zin():t==="fa"?jin():t==="ar"?Tin():t==="es"?Ain():t==="hi"?Rin():Nin()}),Oin=e=>`${e==null?void 0:e.size} free at target`,Din=e=>`目标位置可用空间 ${e==null?void 0:e.size}`,Lin=e=>`${e==null?void 0:e.size} فضای آزاد در مقصد`,Iin=e=>`${e==null?void 0:e.size} متاح في الوجهة`,$in=e=>`${e==null?void 0:e.size} libres en el destino`,Bin=e=>`गंतव्य पर ${e==null?void 0:e.size} खाली`,Pin=((e,n={})=>{const t=n.locale??z();return t==="zh-CN"?Din(e):t==="fa"?Lin(e):t==="ar"?Iin(e):t==="es"?$in(e):t==="hi"?Bin(e):Oin(e)}),Fin=e=>`Move all orx data to: +इसका ट्रांसक्रिप्ट स्थायी रूप से हट जाएगा।`,e0e=((e,n={})=>{const t=n.locale??z();return t==="zh-CN"?Qpe(e):t==="fa"?Xpe(e):t==="ar"?Ype(e):t==="es"?Zpe(e):t==="hi"?Jpe(e):Wpe(e)}),t0e=e=>`Failed to delete “${e==null?void 0:e.title}”: ${e==null?void 0:e.error}`,n0e=e=>`删除“${e==null?void 0:e.title}”失败:${e==null?void 0:e.error}`,r0e=e=>`حذف «${e==null?void 0:e.title}» ناموفق بود: ${e==null?void 0:e.error}`,s0e=e=>`تعذّر حذف «${e==null?void 0:e.title}»: ${e==null?void 0:e.error}`,i0e=e=>`No se pudo eliminar “${e==null?void 0:e.title}”: ${e==null?void 0:e.error}`,a0e=e=>`“${e==null?void 0:e.title}” हटाने में विफल: ${e==null?void 0:e.error}`,o0e=((e,n={})=>{const t=n.locale??z();return t==="zh-CN"?n0e(e):t==="fa"?r0e(e):t==="ar"?s0e(e):t==="es"?i0e(e):t==="hi"?a0e(e):t0e(e)}),l0e=()=>"Could not exit Plan mode. Try again.",c0e=()=>"无法退出计划模式。请重试。",u0e=()=>"خروج از حالت طرح ممکن نشد. دوباره تلاش کنید.",_0e=()=>"تعذّر الخروج من وضع التخطيط. حاول مجددًا.",f0e=()=>"No se pudo salir del modo Plan. Inténtalo de nuevo.",d0e=()=>"प्लान मोड से बाहर नहीं निकला जा सका। फिर से कोशिश करें।",h0e=((e={},n={})=>{const t=n.locale??z();return t==="zh-CN"?c0e():t==="fa"?u0e():t==="ar"?_0e():t==="es"?f0e():t==="hi"?d0e():l0e()}),p0e=()=>"Expand tool activity",m0e=()=>"展开工具活动",g0e=()=>"باز کردن فعالیت ابزارها",v0e=()=>"توسيع نشاط الأداة",b0e=()=>"Expandir actividad de herramientas",y0e=()=>"टूल गतिविधि फैलाएं",x0e=((e={},n={})=>{const t=n.locale??z();return t==="zh-CN"?m0e():t==="fa"?g0e():t==="ar"?v0e():t==="es"?b0e():t==="hi"?y0e():p0e()}),w0e=()=>"experiments",k0e=()=>"实验",S0e=()=>"آزمایش‌ها",C0e=()=>"التجارب",E0e=()=>"experimentos",N0e=()=>"प्रयोग",z0e=((e={},n={})=>{const t=n.locale??z();return t==="zh-CN"?k0e():t==="fa"?S0e():t==="ar"?C0e():t==="es"?E0e():t==="hi"?N0e():w0e()}),j0e=e=>`${e==null?void 0:e.harness} is unavailable — open the model picker`,T0e=e=>`${e==null?void 0:e.harness} 不可用 — 请打开模型选择器`,A0e=e=>`در حال حاضر ${e==null?void 0:e.harness} در دسترس نیست — انتخاب‌گر مدل را باز کنید`,R0e=e=>`${e==null?void 0:e.harness} غير متاح — افتح مُنتقي النماذج`,M0e=e=>`${e==null?void 0:e.harness} no está disponible — abre el selector de modelos`,O0e=e=>`${e==null?void 0:e.harness} उपलब्ध नहीं है — मॉडल पिकर खोलें`,D0e=((e,n={})=>{const t=n.locale??z();return t==="zh-CN"?T0e(e):t==="fa"?A0e(e):t==="ar"?R0e(e):t==="es"?M0e(e):t==="hi"?O0e(e):j0e(e)}),L0e=e=>`Message ${e==null?void 0:e.harness}… (/ for commands and skills, ! for shell)`,I0e=e=>`给 ${e==null?void 0:e.harness} 发消息…(输入 / 使用命令和技能,输入 ! 运行 shell)`,$0e=e=>`پیام به ${e==null?void 0:e.harness}… (/ برای فرمان‌ها و مهارت‌ها، ! برای شل)`,B0e=e=>`راسِل ${e==null?void 0:e.harness}… (/ للأوامر والمهارات، ! للطرفية)`,P0e=e=>`Escribe a ${e==null?void 0:e.harness}… (/ para comandos y skills, ! para la shell)`,F0e=e=>`${e==null?void 0:e.harness} को संदेश भेजें… (कमांड और स्किल के लिए /, शेल के लिए !)`,H0e=((e,n={})=>{const t=n.locale??z();return t==="zh-CN"?I0e(e):t==="fa"?$0e(e):t==="ar"?B0e(e):t==="es"?P0e(e):t==="hi"?F0e(e):L0e(e)}),q0e=e=>`Message not sent: ${e==null?void 0:e.error}`,U0e=e=>`消息未发送:${e==null?void 0:e.error}`,G0e=e=>`پیام ارسال نشد: ${e==null?void 0:e.error}`,V0e=e=>`لم تُرسل الرسالة: ${e==null?void 0:e.error}`,K0e=e=>`Mensaje no enviado: ${e==null?void 0:e.error}`,W0e=e=>`संदेश नहीं भेजा गया: ${e==null?void 0:e.error}`,Q0e=((e,n={})=>{const t=n.locale??z();return t==="zh-CN"?U0e(e):t==="fa"?G0e(e):t==="ar"?V0e(e):t==="es"?K0e(e):t==="hi"?W0e(e):q0e(e)}),X0e=()=>"Model unavailable",Y0e=()=>"模型不可用",Z0e=()=>"مدل در دسترس نیست",J0e=()=>"النموذج غير متاح",eme=()=>"Modelo no disponible",tme=()=>"मॉडल उपलब्ध नहीं",nme=((e={},n={})=>{const t=n.locale??z();return t==="zh-CN"?Y0e():t==="fa"?Z0e():t==="ar"?J0e():t==="es"?eme():t==="hi"?tme():X0e()}),rme=()=>"New session",sme=()=>"新会话",ime=()=>"نشست جدید",ame=()=>"جلسة جديدة",ome=()=>"Nueva sesión",lme=()=>"नया सेशन",PE=((e={},n={})=>{const t=n.locale??z();return t==="zh-CN"?sme():t==="fa"?ime():t==="ar"?ame():t==="es"?ome():t==="hi"?lme():rme()}),cme=()=>"No active sessions",ume=()=>"没有活跃会话",_me=()=>"نشست فعالی وجود ندارد",fme=()=>"لا توجد جلسات نشطة",dme=()=>"No hay sesiones activas",hme=()=>"कोई सक्रिय सेशन नहीं",pme=((e={},n={})=>{const t=n.locale??z();return t==="zh-CN"?ume():t==="fa"?_me():t==="ar"?fme():t==="es"?dme():t==="hi"?hme():cme()}),mme=()=>"No activity",gme=()=>"无活动",vme=()=>"بدون فعالیت",bme=()=>"لا يوجد نشاط",yme=()=>"Sin actividad",xme=()=>"कोई गतिविधि नहीं",wme=((e={},n={})=>{const t=n.locale??z();return t==="zh-CN"?gme():t==="fa"?vme():t==="ar"?bme():t==="es"?yme():t==="hi"?xme():mme()}),kme=()=>"No archived sessions",Sme=()=>"没有已归档的会话",Cme=()=>"نشست بایگانی‌شده‌ای وجود ندارد",Eme=()=>"لا توجد جلسات مؤرشفة",Nme=()=>"No hay sesiones archivadas",zme=()=>"कोई आर्काइव किया गया सेशन नहीं",jme=((e={},n={})=>{const t=n.locale??z();return t==="zh-CN"?Sme():t==="fa"?Cme():t==="ar"?Eme():t==="es"?Nme():t==="hi"?zme():kme()}),Tme=()=>"No sessions yet",Ame=()=>"还没有会话",Rme=()=>"هنوز نشستی وجود ندارد",Mme=()=>"لا توجد جلسات بعد",Ome=()=>"Aún no hay sesiones",Dme=()=>"अभी तक कोई सेशन नहीं",Lme=((e={},n={})=>{const t=n.locale??z();return t==="zh-CN"?Ame():t==="fa"?Rme():t==="ar"?Mme():t==="es"?Ome():t==="hi"?Dme():Tme()}),Ime=()=>"1 annotation",$me=()=>"1 条批注",Bme=()=>"۱ یادداشت",Pme=()=>"تعليق واحد",Fme=()=>"1 anotación",Hme=()=>"1 एनोटेशन",qme=((e={},n={})=>{const t=n.locale??z();return t==="zh-CN"?$me():t==="fa"?Bme():t==="ar"?Pme():t==="es"?Fme():t==="hi"?Hme():Ime()}),Ume=()=>"Open sub-agent transcript",Gme=()=>"打开子智能体记录",Vme=()=>"باز کردن متن گفت‌وگوی عامل فرعی",Kme=()=>"فتح سجل محادثة الوكيل الفرعي",Wme=()=>"Abrir la transcripción del subagente",Qme=()=>"सब-एजेंट ट्रांसक्रिप्ट खोलें",Xme=((e={},n={})=>{const t=n.locale??z();return t==="zh-CN"?Gme():t==="fa"?Vme():t==="ar"?Kme():t==="es"?Wme():t==="hi"?Qme():Ume()}),Yme=()=>"About this demo",Zme=()=>"关于此演示",Jme=()=>"دربارهٔ این نسخهٔ نمایشی",ege=()=>"حول هذا العرض التوضيحي",tge=()=>"Acerca de esta demo",nge=()=>"इस डेमो के बारे में",FE=((e={},n={})=>{const t=n.locale??z();return t==="zh-CN"?Zme():t==="fa"?Jme():t==="ar"?ege():t==="es"?tge():t==="hi"?nge():Yme()}),rge=()=>"Accept and auto mode",sge=()=>"接受并使用自动模式",ige=()=>"پذیرش و حالت خودکار",age=()=>"قبول وتفعيل الوضع التلقائي",oge=()=>"Aceptar en modo automático",lge=()=>"स्वीकार करें और ऑटो मोड",cge=((e={},n={})=>{const t=n.locale??z();return t==="zh-CN"?sge():t==="fa"?ige():t==="ar"?age():t==="es"?oge():t==="hi"?lge():rge()}),uge=()=>"Accept and bypass all",_ge=()=>"接受并跳过所有审批",fge=()=>"پذیرش و عبور از همهٔ تأییدها",dge=()=>"القبول وتجاوز الكل",hge=()=>"Aceptar y omitir permisos",pge=()=>"स्वीकार करें और सब बायपास करें",mge=((e={},n={})=>{const t=n.locale??z();return t==="zh-CN"?_ge():t==="fa"?fge():t==="ar"?dge():t==="es"?hge():t==="hi"?pge():uge()}),gge=()=>"Active",vge=()=>"活跃",bge=()=>"فعال",yge=()=>"نشط",xge=()=>"Activas",wge=()=>"सक्रिय",kge=((e={},n={})=>{const t=n.locale??z();return t==="zh-CN"?vge():t==="fa"?bge():t==="ar"?yge():t==="es"?xge():t==="hi"?wge():gge()}),Sge=()=>"All",Cge=()=>"全部",Ege=()=>"همه",Nge=()=>"الكل",zge=()=>"Todas",jge=()=>"सभी",Tge=((e={},n={})=>{const t=n.locale??z();return t==="zh-CN"?Cge():t==="fa"?Ege():t==="ar"?Nge():t==="es"?zge():t==="hi"?jge():Sge()}),Age=()=>"Allow",Rge=()=>"允许",Mge=()=>"اجازه دادن",Oge=()=>"السماح",Dge=()=>"Permitir",Lge=()=>"अनुमति दें",Ige=((e={},n={})=>{const t=n.locale??z();return t==="zh-CN"?Rge():t==="fa"?Mge():t==="ar"?Oge():t==="es"?Dge():t==="hi"?Lge():Age()}),$ge=()=>"Approval required",Bge=()=>"需要批准",Pge=()=>"نیازمند تأیید",Fge=()=>"الموافقة مطلوبة",Hge=()=>"Aprobación necesaria",qge=()=>"स्वीकृति ज़रूरी है",Uge=((e={},n={})=>{const t=n.locale??z();return t==="zh-CN"?Bge():t==="fa"?Pge():t==="ar"?Fge():t==="es"?Hge():t==="hi"?qge():$ge()}),Gge=()=>"Archived",Vge=()=>"已归档",Kge=()=>"بایگانی‌شده",Wge=()=>"مؤرشف",Qge=()=>"Archivadas",Xge=()=>"आर्काइव किया गया",HE=((e={},n={})=>{const t=n.locale??z();return t==="zh-CN"?Vge():t==="fa"?Kge():t==="ar"?Wge():t==="es"?Qge():t==="hi"?Xge():Gge()}),Yge=()=>"Ask about this",Zge=()=>"询问此内容",Jge=()=>"دربارهٔ این بپرسید",e1e=()=>"اسأل عن هذا",t1e=()=>"Preguntar sobre esto",n1e=()=>"इसके बारे में पूछें",r1e=((e={},n={})=>{const t=n.locale??z();return t==="zh-CN"?Zge():t==="fa"?Jge():t==="ar"?e1e():t==="es"?t1e():t==="hi"?n1e():Yge()}),s1e=()=>"Attach a PDF or image",i1e=()=>"附加 PDF 或图片",a1e=()=>"پیوست PDF یا تصویر",o1e=()=>"إرفاق ملف PDF أو صورة",l1e=()=>"Adjuntar un PDF o una imagen",c1e=()=>"PDF या इमेज अटैच करें",qE=((e={},n={})=>{const t=n.locale??z();return t==="zh-CN"?i1e():t==="fa"?a1e():t==="ar"?o1e():t==="es"?l1e():t==="hi"?c1e():s1e()}),u1e=()=>"Bash",_1e=()=>"Bash",f1e=()=>"Bash",d1e=()=>"Bash",h1e=()=>"Bash",p1e=()=>"Bash",nD=((e={},n={})=>{const t=n.locale??z();return t==="zh-CN"?_1e():t==="fa"?f1e():t==="ar"?d1e():t==="es"?h1e():t==="hi"?p1e():u1e()}),m1e=()=>"Browsed the web",g1e=()=>"已浏览网页",v1e=()=>"وب مرور شد",b1e=()=>"تصفّح الويب",y1e=()=>"Navegó por la web",x1e=()=>"वेब ब्राउज़ किया",UE=((e={},n={})=>{const t=n.locale??z();return t==="zh-CN"?g1e():t==="fa"?v1e():t==="ar"?b1e():t==="es"?y1e():t==="hi"?x1e():m1e()}),w1e=()=>"Built the project",k1e=()=>"已构建项目",S1e=()=>"پروژه ساخته شد",C1e=()=>"بنى المشروع",E1e=()=>"Compiló el proyecto",N1e=()=>"प्रोजेक्ट बिल्ड किया",z1e=((e={},n={})=>{const t=n.locale??z();return t==="zh-CN"?k1e():t==="fa"?S1e():t==="ar"?C1e():t==="es"?E1e():t==="hi"?N1e():w1e()}),j1e=()=>"Cancel",T1e=()=>"取消",A1e=()=>"لغو",R1e=()=>"إلغاء",M1e=()=>"Cancelar",O1e=()=>"रद्द करें",D1e=((e={},n={})=>{const t=n.locale??z();return t==="zh-CN"?T1e():t==="fa"?A1e():t==="ar"?R1e():t==="es"?M1e():t==="hi"?O1e():j1e()}),L1e=()=>"Cancelled an experiment run",I1e=()=>"已取消实验运行",$1e=()=>"اجرای آزمایش لغو شد",B1e=()=>"ألغى تشغيل تجربة",P1e=()=>"Canceló una ejecución de experimento",F1e=()=>"एक प्रयोग रन रद्द किया",H1e=((e={},n={})=>{const t=n.locale??z();return t==="zh-CN"?I1e():t==="fa"?$1e():t==="ar"?B1e():t==="es"?P1e():t==="hi"?F1e():L1e()}),q1e=()=>"Checked code style",U1e=()=>"已检查代码风格",G1e=()=>"سبک کد بررسی شد",V1e=()=>"فحص نمط الشيفرة",K1e=()=>"Revisó el estilo del código",W1e=()=>"कोड स्टाइल जाँची",Q1e=((e={},n={})=>{const t=n.locale??z();return t==="zh-CN"?U1e():t==="fa"?G1e():t==="ar"?V1e():t==="es"?K1e():t==="hi"?W1e():q1e()}),X1e=()=>"Checked compute options",Y1e=()=>"已检查算力选项",Z1e=()=>"گزینه‌های رایانشی بررسی شد",J1e=()=>"فحص خيارات الحوسبة",eve=()=>"Consultó las opciones de cómputo",tve=()=>"कंप्यूट विकल्प जाँचे",nve=((e={},n={})=>{const t=n.locale??z();return t==="zh-CN"?Y1e():t==="fa"?Z1e():t==="ar"?J1e():t==="es"?eve():t==="hi"?tve():X1e()}),rve=()=>"Checked experiment status",sve=()=>"已检查实验状态",ive=()=>"وضعیت آزمایش بررسی شد",ave=()=>"فحص حالة التجربة",ove=()=>"Consultó el estado del experimento",lve=()=>"प्रयोग की स्थिति जाँची",GE=((e={},n={})=>{const t=n.locale??z();return t==="zh-CN"?sve():t==="fa"?ive():t==="ar"?ave():t==="es"?ove():t==="hi"?lve():rve()}),cve=()=>"Checked Git status",uve=()=>"已检查 Git 状态",_ve=()=>"وضعیت Git بررسی شد",fve=()=>"فحص حالة Git",dve=()=>"Consultó el estado de Git",hve=()=>"Git स्थिति जाँची",pve=((e={},n={})=>{const t=n.locale??z();return t==="zh-CN"?uve():t==="fa"?_ve():t==="ar"?fve():t==="es"?dve():t==="hi"?hve():cve()}),mve=()=>"Checked local times",gve=()=>"已查询当地时间",vve=()=>"زمان‌های محلی بررسی شد",bve=()=>"فحص التوقيتات المحلية",yve=()=>"Consultó horas locales",xve=()=>"स्थानीय समय जाँचे",wve=((e={},n={})=>{const t=n.locale??z();return t==="zh-CN"?gve():t==="fa"?vve():t==="ar"?bve():t==="es"?yve():t==="hi"?xve():mve()}),kve=()=>"Checked market data",Sve=()=>"已查询市场数据",Cve=()=>"داده‌های بازار بررسی شد",Eve=()=>"فحص بيانات السوق",Nve=()=>"Consultó datos de mercado",zve=()=>"बाज़ार डेटा जाँचा",jve=((e={},n={})=>{const t=n.locale??z();return t==="zh-CN"?Sve():t==="fa"?Cve():t==="ar"?Eve():t==="es"?Nve():t==="hi"?zve():kve()}),Tve=()=>"Checked sports data",Ave=()=>"已查询体育数据",Rve=()=>"داده‌های ورزشی بررسی شد",Mve=()=>"فحص البيانات الرياضية",Ove=()=>"Consultó datos deportivos",Dve=()=>"खेल डेटा जाँचा",Lve=((e={},n={})=>{const t=n.locale??z();return t==="zh-CN"?Ave():t==="fa"?Rve():t==="ar"?Mve():t==="es"?Ove():t==="hi"?Dve():Tve()}),Ive=()=>"Checked the weather",$ve=()=>"已查询天气",Bve=()=>"آب‌وهوا بررسی شد",Pve=()=>"فحص حالة الطقس",Fve=()=>"Consultó el tiempo",Hve=()=>"मौसम जाँचा",qve=((e={},n={})=>{const t=n.locale??z();return t==="zh-CN"?$ve():t==="fa"?Bve():t==="ar"?Pve():t==="es"?Fve():t==="hi"?Hve():Ive()}),Uve=()=>"Checked types",Gve=()=>"已检查类型",Vve=()=>"نوع‌ها بررسی شد",Kve=()=>"فحص الأنواع",Wve=()=>"Comprobó los tipos",Qve=()=>"टाइप जाँचे",Xve=((e={},n={})=>{const t=n.locale??z();return t==="zh-CN"?Gve():t==="fa"?Vve():t==="ar"?Kve():t==="es"?Wve():t==="hi"?Qve():Uve()}),Yve=()=>"Clear annotations",Zve=()=>"清除批注",Jve=()=>"پاک کردن یادداشت‌ها",ebe=()=>"مسح التعليقات",tbe=()=>"Borrar anotaciones",nbe=()=>"एनोटेशन साफ़ करें",VE=((e={},n={})=>{const t=n.locale??z();return t==="zh-CN"?Zve():t==="fa"?Jve():t==="ar"?ebe():t==="es"?tbe():t==="hi"?nbe():Yve()}),rbe=()=>"Customize",sbe=()=>"自定义",ibe=()=>"سفارشی‌سازی",abe=()=>"تخصيص",obe=()=>"Personalizar",lbe=()=>"कस्टमाइज़ करें",cbe=((e={},n={})=>{const t=n.locale??z();return t==="zh-CN"?sbe():t==="fa"?ibe():t==="ar"?abe():t==="es"?obe():t==="hi"?lbe():rbe()}),ube=()=>"Data sources",_be=()=>"数据源",fbe=()=>"منابع داده",dbe=()=>"مصادر البيانات",hbe=()=>"Fuentes de datos",pbe=()=>"डेटा स्रोत",H2=((e={},n={})=>{const t=n.locale??z();return t==="zh-CN"?_be():t==="fa"?fbe():t==="ar"?dbe():t==="es"?hbe():t==="hi"?pbe():ube()}),mbe=()=>"Delegated a task to a new agent",gbe=()=>"已将任务委派给新智能体",vbe=()=>"وظیفه به عامل جدید واگذار شد",bbe=()=>"فوّض مهمة إلى وكيل جديد",ybe=()=>"Delegó una tarea a un nuevo agente",xbe=()=>"एक नए एजेंट को टास्क सौंपा",wbe=((e={},n={})=>{const t=n.locale??z();return t==="zh-CN"?gbe():t==="fa"?vbe():t==="ar"?bbe():t==="es"?ybe():t==="hi"?xbe():mbe()}),kbe=()=>"Delete",Sbe=()=>"删除",Cbe=()=>"حذف",Ebe=()=>"حذف",Nbe=()=>"Eliminar",zbe=()=>"हटाएं",rD=((e={},n={})=>{const t=n.locale??z();return t==="zh-CN"?Sbe():t==="fa"?Cbe():t==="ar"?Ebe():t==="es"?Nbe():t==="hi"?zbe():kbe()}),jbe=()=>"This prompt runs a small 200-step training probe on your machine. Hit enter to get started.",Tbe=()=>"这条提示会在你的机器上运行一个小型 200 步训练探测。按 Enter 开始。",Abe=()=>"این پیام یک کاوش آموزشی کوچک ۲۰۰ مرحله‌ای روی دستگاه شما اجرا می‌کند. برای شروع Enter را بزنید.",Rbe=()=>"يشغّل هذا الطلب اختبار تدريب صغيرًا من 200 خطوة على جهازك. اضغط Enter للبدء.",Mbe=()=>"Este prompt ejecuta en tu equipo una pequeña prueba de entrenamiento de 200 pasos. Pulsa Intro para empezar.",Obe=()=>"यह प्रॉम्प्ट आपकी मशीन पर एक छोटा 200-स्टेप ट्रेनिंग परीक्षण चलाता है। शुरू करने के लिए एंटर दबाएं।",Dbe=((e={},n={})=>{const t=n.locale??z();return t==="zh-CN"?Tbe():t==="fa"?Abe():t==="ar"?Rbe():t==="es"?Mbe():t==="hi"?Obe():jbe()}),Lbe=()=>"to monitor it.",Ibe=()=>"以查看进度。",$be=()=>"بزنید.",Bbe=()=>"لمتابعتها.",Pbe=()=>"para seguirlo.",Fbe=()=>"इस पर नज़र रखने के लिए।",KE=((e={},n={})=>{const t=n.locale??z();return t==="zh-CN"?Ibe():t==="fa"?$be():t==="ar"?Bbe():t==="es"?Pbe():t==="hi"?Fbe():Lbe()}),Hbe=()=>"The experiment is now running. Tap",qbe=()=>"实验正在运行。点按",Ube=()=>"آزمایش اکنون در حال اجراست. برای پیگیری روی",Gbe=()=>"التجربة قيد التشغيل الآن. اضغط على",Vbe=()=>"El experimento ya se está ejecutando. Pulsa",Kbe=()=>"प्रयोग अब चल रहा है। टैप करें",WE=((e={},n={})=>{const t=n.locale??z();return t==="zh-CN"?qbe():t==="fa"?Ube():t==="ar"?Gbe():t==="es"?Vbe():t==="hi"?Kbe():Hbe()}),Wbe=()=>"Deny",Qbe=()=>"拒绝",Xbe=()=>"رد کردن",Ybe=()=>"رفض",Zbe=()=>"Denegar",Jbe=()=>"अस्वीकार करें",eye=((e={},n={})=>{const t=n.locale??z();return t==="zh-CN"?Qbe():t==="fa"?Xbe():t==="ar"?Ybe():t==="es"?Zbe():t==="hi"?Jbe():Wbe()}),tye=()=>"Dismiss",nye=()=>"关闭",rye=()=>"بستن",sye=()=>"إغلاق",iye=()=>"Cerrar",aye=()=>"खारिज करें",Pg=((e={},n={})=>{const t=n.locale??z();return t==="zh-CN"?nye():t==="fa"?rye():t==="ar"?sye():t==="es"?iye():t==="hi"?aye():tye()}),oye=()=>"Edit and re-send",lye=()=>"编辑并重新发送",cye=()=>"ویرایش و ارسال دوباره",uye=()=>"تعديل وإعادة الإرسال",_ye=()=>"Editar y reenviar",fye=()=>"संपादित करें और फिर भेजें",QE=((e={},n={})=>{const t=n.locale??z();return t==="zh-CN"?lye():t==="fa"?cye():t==="ar"?uye():t==="es"?_ye():t==="hi"?fye():oye()}),dye=()=>"Edit message",hye=()=>"编辑消息",pye=()=>"ویرایش پیام",mye=()=>"تعديل الرسالة",gye=()=>"Editar mensaje",vye=()=>"संदेश संपादित करें",bye=((e={},n={})=>{const t=n.locale??z();return t==="zh-CN"?hye():t==="fa"?pye():t==="ar"?mye():t==="es"?gye():t==="hi"?vye():dye()}),yye=()=>"Edited a file",xye=()=>"已编辑文件",wye=()=>"فایل ویرایش شد",kye=()=>"عدّل ملفًا",Sye=()=>"Editó un archivo",Cye=()=>"एक फ़ाइल संपादित की",XE=((e={},n={})=>{const t=n.locale??z();return t==="zh-CN"?xye():t==="fa"?wye():t==="ar"?kye():t==="es"?Sye():t==="hi"?Cye():yye()}),Eye=()=>"Exit Bash mode",Nye=()=>"退出 Bash 模式",zye=()=>"خروج از حالت Bash",jye=()=>"الخروج من وضع Bash",Tye=()=>"Salir del modo Bash",Aye=()=>"Bash मोड से बाहर निकलें",YE=((e={},n={})=>{const t=n.locale??z();return t==="zh-CN"?Nye():t==="fa"?zye():t==="ar"?jye():t==="es"?Tye():t==="hi"?Aye():Eye()}),Rye=()=>"Exit Plan mode",Mye=()=>"退出计划模式",Oye=()=>"خروج از حالت طرح",Dye=()=>"الخروج من وضع التخطيط",Lye=()=>"Salir del modo Plan",Iye=()=>"प्लान मोड से बाहर निकलें",ZE=((e={},n={})=>{const t=n.locale??z();return t==="zh-CN"?Mye():t==="fa"?Oye():t==="ar"?Dye():t==="es"?Lye():t==="hi"?Iye():Rye()}),$ye=()=>"Failed:",Bye=()=>"失败:",Pye=()=>"ناموفق:",Fye=()=>"فشل:",Hye=()=>"Error:",qye=()=>"विफल:",Ak=((e={},n={})=>{const t=n.locale??z();return t==="zh-CN"?Bye():t==="fa"?Pye():t==="ar"?Fye():t==="es"?Hye():t==="hi"?qye():$ye()}),Uye=()=>"Filter sessions",Gye=()=>"筛选会话",Vye=()=>"فیلتر نشست‌ها",Kye=()=>"تصفية الجلسات",Wye=()=>"Filtrar sesiones",Qye=()=>"सेशन फ़िल्टर करें",JE=((e={},n={})=>{const t=n.locale??z();return t==="zh-CN"?Gye():t==="fa"?Vye():t==="ar"?Kye():t==="es"?Wye():t==="hi"?Qye():Uye()}),Xye=()=>"is unavailable.",Yye=()=>"不可用。",Zye=()=>"در دسترس نیست.",Jye=()=>"غير متاح.",exe=()=>"no está disponible.",txe=()=>"उपलब्ध नहीं है।",nxe=((e={},n={})=>{const t=n.locale??z();return t==="zh-CN"?Yye():t==="fa"?Zye():t==="ar"?Jye():t==="es"?exe():t==="hi"?txe():Xye()}),rxe=()=>"Later queued messages will wait until this is retried or removed.",sxe=()=>"后续排队的消息会等待此消息重试或移除。",ixe=()=>"پیام‌های بعدی صف تا تلاش دوباره یا حذف این پیام منتظر می‌مانند.",axe=()=>"ستنتظر الرسائل التالية في قائمة الانتظار حتى تُعاد المحاولة أو تُزال هذه الرسالة.",oxe=()=>"Los mensajes que están después en la cola esperarán hasta que este se reintente o se quite.",lxe=()=>"बाद में कतार में लगे संदेश तब तक रुके रहेंगे जब तक इसे फिर से कोशिश न किया जाए या हटाया न जाए।",cxe=((e={},n={})=>{const t=n.locale??z();return t==="zh-CN"?sxe():t==="fa"?ixe():t==="ar"?axe():t==="es"?oxe():t==="hi"?lxe():rxe()}),uxe=()=>"Listed files",_xe=()=>"已列出文件",fxe=()=>"فایل‌ها فهرست شد",dxe=()=>"سرد الملفات",hxe=()=>"Listó archivos",pxe=()=>"फ़ाइलों की सूची बनाई",eN=((e={},n={})=>{const t=n.locale??z();return t==="zh-CN"?_xe():t==="fa"?fxe():t==="ar"?dxe():t==="es"?hxe():t==="hi"?pxe():uxe()}),mxe=()=>"Listed project runs",gxe=()=>"已列出项目运行",vxe=()=>"اجراهای پروژه فهرست شد",bxe=()=>"سرد عمليات تشغيل المشروع",yxe=()=>"Listó las ejecuciones del proyecto",xxe=()=>"प्रोजेक्ट रन की सूची बनाई",wxe=((e={},n={})=>{const t=n.locale??z();return t==="zh-CN"?gxe():t==="fa"?vxe():t==="ar"?bxe():t==="es"?yxe():t==="hi"?xxe():mxe()}),kxe=()=>"Listed projects",Sxe=()=>"已列出项目",Cxe=()=>"پروژه‌ها فهرست شد",Exe=()=>"سرد المشاريع",Nxe=()=>"Listó proyectos",zxe=()=>"प्रोजेक्ट की सूची बनाई",jxe=((e={},n={})=>{const t=n.locale??z();return t==="zh-CN"?Sxe():t==="fa"?Cxe():t==="ar"?Exe():t==="es"?Nxe():t==="hi"?zxe():kxe()}),Txe=()=>"Loading conversation…",Axe=()=>"正在加载对话…",Rxe=()=>"در حال بارگیری گفتگو…",Mxe=()=>"جارٍ تحميل المحادثة…",Oxe=()=>"Cargando conversación…",Dxe=()=>"बातचीत लोड हो रही है…",Lxe=((e={},n={})=>{const t=n.locale??z();return t==="zh-CN"?Axe():t==="fa"?Rxe():t==="ar"?Mxe():t==="es"?Oxe():t==="hi"?Dxe():Txe()}),Ixe=()=>"New Chat",$xe=()=>"新对话",Bxe=()=>"گفتگوی جدید",Pxe=()=>"محادثة جديدة",Fxe=()=>"Nuevo chat",Hxe=()=>"नई चैट",qxe=((e={},n={})=>{const t=n.locale??z();return t==="zh-CN"?$xe():t==="fa"?Bxe():t==="ar"?Pxe():t==="es"?Fxe():t==="hi"?Hxe():Ixe()}),Uxe=()=>"Next version",Gxe=()=>"下一版本",Vxe=()=>"نسخهٔ بعدی",Kxe=()=>"النسخة التالية",Wxe=()=>"Siguiente versión",Qxe=()=>"अगला वर्शन",tN=((e={},n={})=>{const t=n.locale??z();return t==="zh-CN"?Gxe():t==="fa"?Vxe():t==="ar"?Kxe():t==="es"?Wxe():t==="hi"?Qxe():Uxe()}),Xxe=()=>"Open the session this agent spawned",Yxe=()=>"打开此智能体创建的会话",Zxe=()=>"باز کردن نشست ساخته‌شده توسط این عامل",Jxe=()=>"فتح الجلسة التي أنشأها هذا الوكيل",e2e=()=>"Abrir la sesión que creó este agente",t2e=()=>"इस एजेंट द्वारा शुरू किया गया सेशन खोलें",n2e=((e={},n={})=>{const t=n.locale??z();return t==="zh-CN"?Yxe():t==="fa"?Zxe():t==="ar"?Jxe():t==="es"?e2e():t==="hi"?t2e():Xxe()}),r2e=()=>"Opened web pages",s2e=()=>"已打开网页",i2e=()=>"صفحه‌های وب باز شد",a2e=()=>"فتح صفحات ويب",o2e=()=>"Abrió páginas web",l2e=()=>"वेब पेज खोले",c2e=((e={},n={})=>{const t=n.locale??z();return t==="zh-CN"?s2e():t==="fa"?i2e():t==="ar"?a2e():t==="es"?o2e():t==="hi"?l2e():r2e()}),u2e=()=>"Plan",_2e=()=>"计划",f2e=()=>"طرح",d2e=()=>"خطة",h2e=()=>"Plan",p2e=()=>"प्लान",m2e=((e={},n={})=>{const t=n.locale??z();return t==="zh-CN"?_2e():t==="fa"?f2e():t==="ar"?d2e():t==="es"?h2e():t==="hi"?p2e():u2e()}),g2e=()=>"Plan approved",v2e=()=>"计划已批准",b2e=()=>"طرح تأیید شد",y2e=()=>"تمت الموافقة على الخطة",x2e=()=>"Plan aprobado",w2e=()=>"प्लान स्वीकृत",k2e=((e={},n={})=>{const t=n.locale??z();return t==="zh-CN"?v2e():t==="fa"?b2e():t==="ar"?y2e():t==="es"?x2e():t==="hi"?w2e():g2e()}),S2e=()=>"Plan rejected",C2e=()=>"计划已拒绝",E2e=()=>"طرح رد شد",N2e=()=>"رُفضت الخطة",z2e=()=>"Plan rechazado",j2e=()=>"प्लान अस्वीकृत",T2e=((e={},n={})=>{const t=n.locale??z();return t==="zh-CN"?C2e():t==="fa"?E2e():t==="ar"?N2e():t==="es"?z2e():t==="hi"?j2e():S2e()}),A2e=()=>"Plan resolved",R2e=()=>"计划已处理",M2e=()=>"طرح تعیین تکلیف شد",O2e=()=>"تمت معالجة الخطة",D2e=()=>"Plan resuelto",L2e=()=>"प्लान सुलझाया गया",I2e=((e={},n={})=>{const t=n.locale??z();return t==="zh-CN"?R2e():t==="fa"?M2e():t==="ar"?O2e():t==="es"?D2e():t==="hi"?L2e():A2e()}),$2e=()=>"Plan revision requested",B2e=()=>"已请求修改计划",P2e=()=>"درخواست بازنگری طرح ثبت شد",F2e=()=>"طُلب تعديل الخطة",H2e=()=>"Cambios en el plan solicitados",q2e=()=>"प्लान में बदलाव का अनुरोध",U2e=((e={},n={})=>{const t=n.locale??z();return t==="zh-CN"?B2e():t==="fa"?P2e():t==="ar"?F2e():t==="es"?H2e():t==="hi"?q2e():$2e()}),G2e=()=>"Previous version",V2e=()=>"上一版本",K2e=()=>"نسخهٔ قبلی",W2e=()=>"النسخة السابقة",Q2e=()=>"Versión anterior",X2e=()=>"पिछला वर्शन",nN=((e={},n={})=>{const t=n.locale??z();return t==="zh-CN"?V2e():t==="fa"?K2e():t==="ar"?W2e():t==="es"?Q2e():t==="hi"?X2e():G2e()}),Y2e=()=>"Ran a command",Z2e=()=>"已运行命令",J2e=()=>"فرمان اجرا شد",ewe=()=>"نفّذ أمرًا",twe=()=>"Ejecutó un comando",nwe=()=>"एक कमांड चलाई",rwe=((e={},n={})=>{const t=n.locale??z();return t==="zh-CN"?Z2e():t==="fa"?J2e():t==="ar"?ewe():t==="es"?twe():t==="hi"?nwe():Y2e()}),swe=()=>"Ran tests",iwe=()=>"已运行测试",awe=()=>"آزمون‌ها اجرا شد",owe=()=>"شغّل الاختبارات",lwe=()=>"Ejecutó tests",cwe=()=>"टेस्ट चलाए",uwe=((e={},n={})=>{const t=n.locale??z();return t==="zh-CN"?iwe():t==="fa"?awe():t==="ar"?owe():t==="es"?lwe():t==="hi"?cwe():swe()}),_we=()=>"Read a file",fwe=()=>"已读取文件",dwe=()=>"فایل خوانده شد",hwe=()=>"قرأ ملفًا",pwe=()=>"Leyó un archivo",mwe=()=>"एक फ़ाइल पढ़ी",gwe=((e={},n={})=>{const t=n.locale??z();return t==="zh-CN"?fwe():t==="fa"?dwe():t==="ar"?hwe():t==="es"?pwe():t==="hi"?mwe():_we()}),vwe=()=>"Read Git history",bwe=()=>"已读取 Git 历史",ywe=()=>"تاریخچهٔ Git خوانده شد",xwe=()=>"قرأ سجل Git",wwe=()=>"Leyó el historial de Git",kwe=()=>"Git इतिहास पढ़ा",Swe=((e={},n={})=>{const t=n.locale??z();return t==="zh-CN"?bwe():t==="fa"?ywe():t==="ar"?xwe():t==="es"?wwe():t==="hi"?kwe():vwe()}),Cwe=()=>"Read project details",Ewe=()=>"已读取项目详情",Nwe=()=>"جزئیات پروژه خوانده شد",zwe=()=>"قرأ تفاصيل المشروع",jwe=()=>"Leyó los detalles del proyecto",Twe=()=>"प्रोजेक्ट विवरण पढ़ा",Awe=((e={},n={})=>{const t=n.locale??z();return t==="zh-CN"?Ewe():t==="fa"?Nwe():t==="ar"?zwe():t==="es"?jwe():t==="hi"?Twe():Cwe()}),Rwe=()=>"Reject",Mwe=()=>"拒绝",Owe=()=>"رد کردن",Dwe=()=>"رفض",Lwe=()=>"Rechazar",Iwe=()=>"अस्वीकार करें",$we=((e={},n={})=>{const t=n.locale??z();return t==="zh-CN"?Mwe():t==="fa"?Owe():t==="ar"?Dwe():t==="es"?Lwe():t==="hi"?Iwe():Rwe()}),Bwe=()=>"Remove",Pwe=()=>"移除",Fwe=()=>"حذف",Hwe=()=>"إزالة",qwe=()=>"Quitar",Uwe=()=>"हटाएं",Gwe=((e={},n={})=>{const t=n.locale??z();return t==="zh-CN"?Pwe():t==="fa"?Fwe():t==="ar"?Hwe():t==="es"?qwe():t==="hi"?Uwe():Bwe()}),Vwe=()=>"Remove annotation",Kwe=()=>"移除批注",Wwe=()=>"حذف یادداشت",Qwe=()=>"إزالة التعليق",Xwe=()=>"Quitar anotación",Ywe=()=>"एनोटेशन हटाएं",Zwe=((e={},n={})=>{const t=n.locale??z();return t==="zh-CN"?Kwe():t==="fa"?Wwe():t==="ar"?Qwe():t==="es"?Xwe():t==="hi"?Ywe():Vwe()}),Jwe=()=>"Remove file",e4e=()=>"移除文件",t4e=()=>"حذف فایل",n4e=()=>"إزالة الملف",r4e=()=>"Quitar archivo",s4e=()=>"फ़ाइल हटाएं",rN=((e={},n={})=>{const t=n.locale??z();return t==="zh-CN"?e4e():t==="fa"?t4e():t==="ar"?n4e():t==="es"?r4e():t==="hi"?s4e():Jwe()}),i4e=()=>"Remove image",a4e=()=>"移除图片",o4e=()=>"حذف تصویر",l4e=()=>"إزالة الصورة",c4e=()=>"Quitar imagen",u4e=()=>"इमेज हटाएं",sN=((e={},n={})=>{const t=n.locale??z();return t==="zh-CN"?a4e():t==="fa"?o4e():t==="ar"?l4e():t==="es"?c4e():t==="hi"?u4e():i4e()}),_4e=()=>"Remove queued message",f4e=()=>"移除排队消息",d4e=()=>"حذف پیام صف",h4e=()=>"إزالة الرسالة من قائمة الانتظار",p4e=()=>"Quitar mensaje en cola",m4e=()=>"कतार में लगा संदेश हटाएं",iN=((e={},n={})=>{const t=n.locale??z();return t==="zh-CN"?f4e():t==="fa"?d4e():t==="ar"?h4e():t==="es"?p4e():t==="hi"?m4e():_4e()}),g4e=()=>"Rename",v4e=()=>"重命名",b4e=()=>"تغییر نام",y4e=()=>"إعادة تسمية",x4e=()=>"Renombrar",w4e=()=>"नाम बदलें",sD=((e={},n={})=>{const t=n.locale??z();return t==="zh-CN"?v4e():t==="fa"?b4e():t==="ar"?y4e():t==="es"?x4e():t==="hi"?w4e():g4e()}),k4e=()=>"Reviewed code changes",S4e=()=>"已审查代码更改",C4e=()=>"تغییرات کد بازبینی شد",E4e=()=>"راجع تغييرات الشيفرة",N4e=()=>"Revisó cambios en el código",z4e=()=>"कोड में बदलावों की समीक्षा की",j4e=((e={},n={})=>{const t=n.locale??z();return t==="zh-CN"?S4e():t==="fa"?C4e():t==="ar"?E4e():t==="es"?N4e():t==="hi"?z4e():k4e()}),T4e=()=>"Run",A4e=()=>"运行",R4e=()=>"اجرا",M4e=()=>"تشغيل",O4e=()=>"Ejecutar",D4e=()=>"रन",aN=((e={},n={})=>{const t=n.locale??z();return t==="zh-CN"?A4e():t==="fa"?R4e():t==="ar"?M4e():t==="es"?O4e():t==="hi"?D4e():T4e()}),L4e=()=>"Selected chat text",I4e=()=>"已选聊天文本",$4e=()=>"متن انتخاب‌شدهٔ گفتگو",B4e=()=>"النص المحدد من المحادثة",P4e=()=>"Texto seleccionado del chat",F4e=()=>"चयनित चैट टेक्स्ट",H4e=((e={},n={})=>{const t=n.locale??z();return t==="zh-CN"?I4e():t==="fa"?$4e():t==="ar"?B4e():t==="es"?P4e():t==="hi"?F4e():L4e()}),q4e=()=>"Selected text:",U4e=()=>"已选文本:",G4e=()=>"متن انتخاب‌شده:",V4e=()=>"النص المحدد:",K4e=()=>"Texto seleccionado:",W4e=()=>"चयनित टेक्स्ट:",Q4e=((e={},n={})=>{const t=n.locale??z();return t==="zh-CN"?U4e():t==="fa"?G4e():t==="ar"?V4e():t==="es"?K4e():t==="hi"?W4e():q4e()}),X4e=()=>"Send",Y4e=()=>"发送",Z4e=()=>"ارسال",J4e=()=>"إرسال رسالة",e3e=()=>"Enviar",t3e=()=>"भेजें",Y4=((e={},n={})=>{const t=n.locale??z();return t==="zh-CN"?Y4e():t==="fa"?Z4e():t==="ar"?J4e():t==="es"?e3e():t==="hi"?t3e():X4e()}),n3e=()=>"Session options",r3e=()=>"会话选项",s3e=()=>"گزینه‌های نشست",i3e=()=>"خيارات الجلسة",a3e=()=>"Opciones de la sesión",o3e=()=>"सेशन विकल्प",oN=((e={},n={})=>{const t=n.locale??z();return t==="zh-CN"?r3e():t==="fa"?s3e():t==="ar"?i3e():t==="es"?a3e():t==="hi"?o3e():n3e()}),l3e=()=>"Session title",c3e=()=>"会话标题",u3e=()=>"عنوان نشست",_3e=()=>"عنوان الجلسة",f3e=()=>"Título de la sesión",d3e=()=>"सेशन शीर्षक",h3e=((e={},n={})=>{const t=n.locale??z();return t==="zh-CN"?c3e():t==="fa"?u3e():t==="ar"?_3e():t==="es"?f3e():t==="hi"?d3e():l3e()}),p3e=()=>"Show sidebar",m3e=()=>"显示侧边栏",g3e=()=>"نمایش نوار کناری",v3e=()=>"إظهار الشريط الجانبي",b3e=()=>"Mostrar barra lateral",y3e=()=>"साइडबार दिखाएं",lN=((e={},n={})=>{const t=n.locale??z();return t==="zh-CN"?m3e():t==="fa"?g3e():t==="ar"?v3e():t==="es"?b3e():t==="hi"?y3e():p3e()}),x3e=()=>"Started an experiment run",w3e=()=>"已启动实验运行",k3e=()=>"اجرای آزمایش آغاز شد",S3e=()=>"بدأ تشغيل تجربة",C3e=()=>"Inició una ejecución de experimento",E3e=()=>"एक प्रयोग रन शुरू किया",N3e=((e={},n={})=>{const t=n.locale??z();return t==="zh-CN"?w3e():t==="fa"?k3e():t==="ar"?S3e():t==="es"?C3e():t==="hi"?E3e():x3e()}),z3e=()=>"I have a rough idea I want to explore. Ask me questions until we have a concrete, testable research question and a plan for the first experiment.",j3e=()=>"我有一个想探索的粗略想法。请不断向我提问,直到我们得到一个具体、可检验的研究问题和第一个实验的计划。",T3e=()=>"یک ایدهٔ خام دارم که می‌خواهم بررسی کنم. از من سؤال بپرس تا به یک پرسش پژوهشی مشخص و قابل آزمون و یک برنامه برای اولین آزمایش برسیم.",A3e=()=>"لديّ فكرة أولية أريد استكشافها. اطرح عليّ أسئلة حتى نصل إلى سؤال بحثي محدد وقابل للاختبار وخطة للتجربة الأولى.",R3e=()=>"Tengo una idea inicial que quiero explorar. Hazme preguntas hasta que tengamos una pregunta de investigación concreta y comprobable y un plan para el primer experimento.",M3e=()=>"मेरे पास एक अस्पष्ट विचार है जिसे मैं खोजना चाहता/चाहती हूँ। तब तक मुझसे सवाल पूछें जब तक हमारे पास एक ठोस, जाँचने-योग्य शोध प्रश्न और पहले प्रयोग की योजना न बन जाए।",O3e=((e={},n={})=>{const t=n.locale??z();return t==="zh-CN"?j3e():t==="fa"?T3e():t==="ar"?A3e():t==="es"?R3e():t==="hi"?M3e():z3e()}),D3e=()=>"Shape a research question",L3e=()=>"明确研究问题",I3e=()=>"شکل دادن به پرسش پژوهشی",$3e=()=>"صياغة سؤال بحثي",B3e=()=>"Definir una pregunta de investigación",P3e=()=>"एक शोध प्रश्न तैयार करें",F3e=((e={},n={})=>{const t=n.locale??z();return t==="zh-CN"?L3e():t==="fa"?I3e():t==="ar"?$3e():t==="es"?B3e():t==="hi"?P3e():D3e()}),H3e=()=>"Ask me for a topic, then search the literature on it, summarize the strongest baselines and open problems, and suggest where a small experiment could contribute.",q3e=()=>"先问我要研究的主题,然后检索相关文献,总结最强的基线方法和尚未解决的问题,并建议一个小实验可以在哪里做出贡献。",U3e=()=>"اول موضوع را از من بپرس، سپس ادبیات آن را جست‌وجو کن، قوی‌ترین خط‌های مبنا و مسائل باز را خلاصه کن و پیشنهاد بده یک آزمایش کوچک کجا می‌تواند مفید باشد.",G3e=()=>"اسألني عن الموضوع أولًا، ثم ابحث في الأدبيات حوله، ولخّص أقوى خطوط الأساس والمسائل المفتوحة، واقترح أين يمكن لتجربة صغيرة أن تسهم.",V3e=()=>"Pregúntame por un tema, busca publicaciones sobre él, resume los métodos de referencia más sólidos y los problemas abiertos, y sugiere dónde podría aportar un pequeño experimento.",K3e=()=>"पहले मुझसे एक विषय पूछें, फिर उस पर साहित्य खोजें, सबसे मज़बूत बेसलाइन और खुली समस्याओं का सार दें, और सुझाएं कि एक छोटा प्रयोग कहाँ योगदान दे सकता है।",W3e=((e={},n={})=>{const t=n.locale??z();return t==="zh-CN"?q3e():t==="fa"?U3e():t==="ar"?G3e():t==="es"?V3e():t==="hi"?K3e():H3e()}),Q3e=()=>"Survey related work",X3e=()=>"调研相关工作",Y3e=()=>"مرور کارهای مرتبط",Z3e=()=>"استعراض الأعمال ذات الصلة",J3e=()=>"Revisar trabajos relacionados",e5e=()=>"संबंधित कार्य का सर्वेक्षण करें",t5e=((e={},n={})=>{const t=n.locale??z();return t==="zh-CN"?X3e():t==="fa"?Y3e():t==="ar"?Z3e():t==="es"?J3e():t==="hi"?e5e():Q3e()}),n5e=()=>"Set up a minimal training script with a config, dependencies, and a run command that trains a small model end to end in a few minutes on one GPU.",r5e=()=>"搭建一个最小的训练脚本,包含配置、依赖和运行命令,能在单张 GPU 上几分钟内端到端训练一个小模型。",s5e=()=>"یک اسکریپت آموزش حداقلی با پیکربندی، وابستگی‌ها و دستور اجرا آماده کن که یک مدل کوچک را در چند دقیقه روی یک GPU به‌طور کامل آموزش دهد.",i5e=()=>"أنشئ أصغر سكربت تدريب ممكن مع إعدادات واعتماديات وأمر تشغيل يدرّب نموذجًا صغيرًا من البداية إلى النهاية في دقائق على وحدة GPU واحدة.",a5e=()=>"Prepara un script de entrenamiento mínimo con configuración, dependencias y un comando de ejecución que entrene un modelo pequeño de principio a fin en unos minutos con una GPU.",o5e=()=>"एक न्यूनतम ट्रेनिंग स्क्रिप्ट सेट अप करें, जिसमें एक कॉन्फ़िग, डिपेंडेंसी और एक रन कमांड हो, जो एक GPU पर कुछ ही मिनटों में एक छोटे मॉडल को पूरी तरह ट्रेन कर दे।",l5e=((e={},n={})=>{const t=n.locale??z();return t==="zh-CN"?r5e():t==="fa"?s5e():t==="ar"?i5e():t==="es"?a5e():t==="hi"?o5e():n5e()}),c5e=()=>"Scaffold a baseline",u5e=()=>"搭建基线",_5e=()=>"ساخت خط مبنا",f5e=()=>"بناء خط أساس",d5e=()=>"Crear un modelo de referencia",h5e=()=>"एक बेसलाइन तैयार करें",p5e=((e={},n={})=>{const t=n.locale??z();return t==="zh-CN"?u5e():t==="fa"?_5e():t==="ar"?f5e():t==="es"?d5e():t==="hi"?h5e():c5e()}),m5e=()=>"Pick one cheap, well-defined hypothesis from our plan, implement it as a variant of the baseline, and launch a first run to compare the two.",g5e=()=>"从我们的计划中选一个成本低、定义明确的假设,把它实现为基线的一个变体,并启动第一次运行来比较两者。",v5e=()=>"یک فرضیهٔ کم‌هزینه و مشخص از برنامه‌مان انتخاب کن، آن را به‌صورت یک نسخهٔ تغییریافته از خط مبنا پیاده کن و اولین اجرا را برای مقایسهٔ این دو شروع کن.",b5e=()=>"اختر فرضية واحدة منخفضة التكلفة ومحددة جيدًا من خطتنا، ونفّذها كنسخة معدّلة من خط الأساس، وابدأ أول تشغيل لمقارنة الاثنين.",y5e=()=>"Elige una hipótesis de nuestro plan que sea económica de probar y esté bien definida, impleméntala como una variante del modelo de referencia e inicia una primera ejecución para comparar ambas versiones.",x5e=()=>"हमारी योजना से एक सस्ती, स्पष्ट रूप से परिभाषित परिकल्पना चुनें, इसे बेसलाइन के एक वेरिएंट के रूप में लागू करें, और दोनों की तुलना के लिए पहला रन शुरू करें।",w5e=((e={},n={})=>{const t=n.locale??z();return t==="zh-CN"?g5e():t==="fa"?v5e():t==="ar"?b5e():t==="es"?y5e():t==="hi"?x5e():m5e()}),k5e=()=>"Run a first experiment",S5e=()=>"运行第一个实验",C5e=()=>"اجرای اولین آزمایش",E5e=()=>"تشغيل التجربة الأولى",N5e=()=>"Ejecutar un primer experimento",z5e=()=>"पहला प्रयोग चलाएं",j5e=((e={},n={})=>{const t=n.locale??z();return t==="zh-CN"?S5e():t==="fa"?C5e():t==="ar"?E5e():t==="es"?N5e():t==="hi"?z5e():k5e()}),T5e=()=>"Reading the project to suggest where to start…",A5e=()=>"正在阅读项目以建议从哪里开始…",R5e=()=>"در حال خواندن پروژه برای پیشنهاد نقطهٔ شروع…",M5e=()=>"جارٍ قراءة المشروع لاقتراح نقطة البدء…",O5e=()=>"Leyendo el proyecto para sugerir por dónde empezar…",D5e=()=>"कहाँ से शुरू करें यह सुझाने के लिए प्रोजेक्ट पढ़ा जा रहा है…",L5e=((e={},n={})=>{const t=n.locale??z();return t==="zh-CN"?A5e():t==="fa"?R5e():t==="ar"?M5e():t==="es"?O5e():t==="hi"?D5e():T5e()}),I5e=()=>"Starter prompts",$5e=()=>"入门提示",B5e=()=>"پیشنهادهای شروع",P5e=()=>"اقتراحات للبدء",F5e=()=>"Prompts para empezar",H5e=()=>"शुरुआती प्रॉम्प्ट",q5e=((e={},n={})=>{const t=n.locale??z();return t==="zh-CN"?$5e():t==="fa"?B5e():t==="ar"?P5e():t==="es"?F5e():t==="hi"?H5e():I5e()}),U5e=()=>"Stop",G5e=()=>"停止",V5e=()=>"توقف",K5e=()=>"إيقاف",W5e=()=>"Detener",Q5e=()=>"रोकें",cN=((e={},n={})=>{const t=n.locale??z();return t==="zh-CN"?G5e():t==="fa"?V5e():t==="ar"?K5e():t==="es"?W5e():t==="hi"?Q5e():U5e()}),X5e=()=>"Submit",Y5e=()=>"提交",Z5e=()=>"ارسال",J5e=()=>"إرسال",eke=()=>"Enviar",tke=()=>"सबमिट करें",nke=((e={},n={})=>{const t=n.locale??z();return t==="zh-CN"?Y5e():t==="fa"?Z5e():t==="ar"?J5e():t==="es"?eke():t==="hi"?tke():X5e()}),rke=()=>"Tool failed",ske=()=>"工具失败",ike=()=>"ابزار ناموفق بود",ake=()=>"فشلت الأداة",oke=()=>"Error en la herramienta",lke=()=>"टूल विफल",cke=((e={},n={})=>{const t=n.locale??z();return t==="zh-CN"?ske():t==="fa"?ike():t==="ar"?ake():t==="es"?oke():t==="hi"?lke():rke()}),uke=()=>"Used tools",_ke=()=>"已使用工具",fke=()=>"ابزارها استفاده شد",dke=()=>"استخدم الأدوات",hke=()=>"Usó herramientas",pke=()=>"टूल इस्तेमाल किए",iD=((e={},n={})=>{const t=n.locale??z();return t==="zh-CN"?_ke():t==="fa"?fke():t==="ar"?dke():t==="es"?hke():t==="hi"?pke():uke()}),mke=()=>"View full plan",gke=()=>"查看完整计划",vke=()=>"مشاهدهٔ طرح کامل",bke=()=>"عرض الخطة كاملة",yke=()=>"Ver plan completo",xke=()=>"पूरा प्लान देखें",wke=((e={},n={})=>{const t=n.locale??z();return t==="zh-CN"?gke():t==="fa"?vke():t==="ar"?bke():t==="es"?yke():t==="hi"?xke():mke()}),kke=()=>"Waited for an experiment run",Ske=()=>"已等待实验运行",Cke=()=>"برای اجرای آزمایش صبر شد",Eke=()=>"انتظر تشغيل تجربة",Nke=()=>"Esperó a una ejecución de experimento",zke=()=>"एक प्रयोग रन का इंतज़ार किया",jke=((e={},n={})=>{const t=n.locale??z();return t==="zh-CN"?Ske():t==="fa"?Cke():t==="ar"?Eke():t==="es"?Nke():t==="hi"?zke():kke()}),Tke=()=>"Waiting for your input…",Ake=()=>"正在等待你的输入…",Rke=()=>"منتظر ورودی شما…",Mke=()=>"في انتظار إدخالك…",Oke=()=>"Esperando tu respuesta…",Dke=()=>"आपके इनपुट का इंतज़ार है…",Lke=((e={},n={})=>{const t=n.locale??z();return t==="zh-CN"?Ake():t==="fa"?Rke():t==="ar"?Mke():t==="es"?Oke():t==="hi"?Dke():Tke()}),Ike=()=>"What should we research?",$ke=()=>"我们应该研究什么?",Bke=()=>"چه چیزی را پژوهش کنیم؟",Pke=()=>"ما الذي نبحثه؟",Fke=()=>"¿Qué investigamos?",Hke=()=>"हमें क्या शोध करना चाहिए?",qke=((e={},n={})=>{const t=n.locale??z();return t==="zh-CN"?$ke():t==="fa"?Bke():t==="ar"?Pke():t==="es"?Fke():t==="hi"?Hke():Ike()}),Uke=()=>"You, mid-task",Gke=()=>"你(任务进行中)",Vke=()=>"شما، هنگام انجام وظیفه",Kke=()=>"أنت، أثناء المهمة",Wke=()=>"Tú, durante la tarea",Qke=()=>"आप, टास्क के बीच में",Xke=((e={},n={})=>{const t=n.locale??z();return t==="zh-CN"?Gke():t==="fa"?Vke():t==="ar"?Kke():t==="es"?Wke():t==="hi"?Qke():Uke()}),Yke=()=>"Pasted image",Zke=()=>"粘贴的图片",Jke=()=>"تصویر جای‌گذاری‌شده",eSe=()=>"صورة ملصقة",tSe=()=>"Imagen pegada",nSe=()=>"पेस्ट की गई इमेज",aD=((e={},n={})=>{const t=n.locale??z();return t==="zh-CN"?Zke():t==="fa"?Jke():t==="ar"?eSe():t==="es"?tSe():t==="hi"?nSe():Yke()}),rSe=()=>"Plan",sSe=()=>"计划",iSe=()=>"طرح",aSe=()=>"خطة",oSe=()=>"Plan",lSe=()=>"प्लान",oD=((e={},n={})=>{const t=n.locale??z();return t==="zh-CN"?sSe():t==="fa"?iSe():t==="ar"?aSe():t==="es"?oSe():t==="hi"?lSe():rSe()}),cSe=()=>"Plan mode — ready to proceed?",uSe=()=>"计划模式 — 准备好继续了吗?",_Se=()=>"حالت طرح — آماده‌اید ادامه دهید؟",fSe=()=>"وضع التخطيط — جاهز للمتابعة؟",dSe=()=>"Modo Plan — ¿listo para continuar?",hSe=()=>"प्लान मोड — आगे बढ़ने के लिए तैयार?",pSe=((e={},n={})=>{const t=n.locale??z();return t==="zh-CN"?uSe():t==="fa"?_Se():t==="ar"?fSe():t==="es"?dSe():t==="hi"?hSe():cSe()}),mSe=()=>"Proposed plan",gSe=()=>"提议的计划",vSe=()=>"طرح پیشنهادی",bSe=()=>"خطة مقترحة",ySe=()=>"Plan propuesto",xSe=()=>"प्रस्तावित प्लान",uN=((e={},n={})=>{const t=n.locale??z();return t==="zh-CN"?gSe():t==="fa"?vSe():t==="ar"?bSe():t==="es"?ySe():t==="hi"?xSe():mSe()}),wSe=()=>"Question",kSe=()=>"问题",SSe=()=>"پرسش",CSe=()=>"سؤال",ESe=()=>"Pregunta",NSe=()=>"प्रश्न",zSe=((e={},n={})=>{const t=n.locale??z();return t==="zh-CN"?kSe():t==="fa"?SSe():t==="ar"?CSe():t==="es"?ESe():t==="hi"?NSe():wSe()}),jSe=()=>"Queued",TSe=()=>"已排队",ASe=()=>"در صف",RSe=()=>"في قائمة الانتظار",MSe=()=>"En cola",OSe=()=>"कतार में",DSe=((e={},n={})=>{const t=n.locale??z();return t==="zh-CN"?TSe():t==="fa"?ASe():t==="ar"?RSe():t==="es"?MSe():t==="hi"?OSe():jSe()}),LSe=()=>"Recents",ISe=()=>"最近",$Se=()=>"اخیر",BSe=()=>"الأخيرة",PSe=()=>"Recientes",FSe=()=>"हाल की",lD=((e={},n={})=>{const t=n.locale??z();return t==="zh-CN"?ISe():t==="fa"?$Se():t==="ar"?BSe():t==="es"?PSe():t==="hi"?FSe():LSe()}),HSe=()=>"Re-check its setup.",qSe=()=>"请重新检查其设置。",USe=()=>"راه‌اندازی آن را دوباره بررسی کنید.",GSe=()=>"أعد فحص إعداده.",VSe=()=>"Vuelve a comprobar su configuración.",KSe=()=>"इसका सेटअप फिर से जाँचें।",WSe=((e={},n={})=>{const t=n.locale??z();return t==="zh-CN"?qSe():t==="fa"?USe():t==="ar"?GSe():t==="es"?VSe():t==="hi"?KSe():HSe()}),QSe=()=>"Could not recover this turn. Try again.",XSe=()=>"无法恢复本轮。请重试。",YSe=()=>"بازیابی این نوبت ممکن نشد. دوباره تلاش کنید.",ZSe=()=>"تعذّرت استعادة هذه الجولة. حاول مجددًا.",JSe=()=>"No se pudo recuperar este turno. Inténtalo de nuevo.",e6e=()=>"यह टर्न रिकवर नहीं हो सका। फिर से कोशिश करें।",t6e=((e={},n={})=>{const t=n.locale??z();return t==="zh-CN"?XSe():t==="fa"?YSe():t==="ar"?ZSe():t==="es"?JSe():t==="hi"?e6e():QSe()}),n6e=()=>"Could not remove the queued message. Try again.",r6e=()=>"无法移除排队消息。请重试。",s6e=()=>"حذف پیام در صف ممکن نشد. دوباره تلاش کنید.",i6e=()=>"تعذّرت إزالة الرسالة من قائمة الانتظار. حاول مجددًا.",a6e=()=>"No se pudo quitar el mensaje en cola. Inténtalo de nuevo.",o6e=()=>"कतार में लगा संदेश हटाया नहीं जा सका। फिर से कोशिश करें।",l6e=((e={},n={})=>{const t=n.locale??z();return t==="zh-CN"?r6e():t==="fa"?s6e():t==="ar"?i6e():t==="es"?a6e():t==="hi"?o6e():n6e()}),c6e=e=>`Could not re-send: ${e==null?void 0:e.error}`,u6e=e=>`无法重新发送:${e==null?void 0:e.error}`,_6e=e=>`ارسال دوباره ممکن نشد: ${e==null?void 0:e.error}`,f6e=e=>`تعذّرت إعادة الإرسال: ${e==null?void 0:e.error}`,d6e=e=>`No se pudo reenviar: ${e==null?void 0:e.error}`,h6e=e=>`फिर से नहीं भेजा जा सका: ${e==null?void 0:e.error}`,p6e=((e,n={})=>{const t=n.locale??z();return t==="zh-CN"?u6e(e):t==="fa"?_6e(e):t==="ar"?f6e(e):t==="es"?d6e(e):t==="hi"?h6e(e):c6e(e)}),m6e=()=>"Resolved",g6e=()=>"已处理",v6e=()=>"رسیدگی شد",b6e=()=>"مُعالَج",y6e=()=>"Resuelto",x6e=()=>"सुलझाया गया",w6e=((e={},n={})=>{const t=n.locale??z();return t==="zh-CN"?g6e():t==="fa"?v6e():t==="ar"?b6e():t==="es"?y6e():t==="hi"?x6e():m6e()}),k6e=()=>"Could not retry the queued message. Try again.",S6e=()=>"无法重试排队消息。请重试。",C6e=()=>"تلاش دوباره برای پیام در صف ممکن نشد. دوباره تلاش کنید.",E6e=()=>"تعذّرت إعادة محاولة إرسال الرسالة في قائمة الانتظار. حاول مجددًا.",N6e=()=>"No se pudo reintentar el mensaje en cola. Inténtalo de nuevo.",z6e=()=>"कतार में लगा संदेश फिर से नहीं भेजा जा सका। फिर से कोशिश करें।",j6e=((e={},n={})=>{const t=n.locale??z();return t==="zh-CN"?S6e():t==="fa"?C6e():t==="ar"?E6e():t==="es"?N6e():t==="hi"?z6e():k6e()}),T6e=()=>"run logs",A6e=()=>"运行日志",R6e=()=>"گزارش‌های اجرا",M6e=()=>"سجلات التشغيل",O6e=()=>"logs de ejecución",D6e=()=>"रन लॉग",L6e=((e={},n={})=>{const t=n.locale??z();return t==="zh-CN"?A6e():t==="fa"?R6e():t==="ar"?M6e():t==="es"?O6e():t==="hi"?D6e():T6e()}),I6e=()=>"Scroll to bottom",$6e=()=>"滚动到底部",B6e=()=>"رفتن به پایین گفتگو",P6e=()=>"التمرير إلى الأسفل",F6e=()=>"Ir al final",H6e=()=>"नीचे तक स्क्रॉल करें",_N=((e={},n={})=>{const t=n.locale??z();return t==="zh-CN"?$6e():t==="fa"?B6e():t==="ar"?P6e():t==="es"?F6e():t==="hi"?H6e():I6e()}),q6e=()=>"The selected harness is unavailable",U6e=()=>"所选智能体工具不可用",G6e=()=>"ابزار عامل انتخاب‌شده در دسترس نیست",V6e=()=>"أداة البرمجة المحددة غير متاحة",K6e=()=>"El agente seleccionado no está disponible",W6e=()=>"चुना गया हार्नेस उपलब्ध नहीं है",q2=((e={},n={})=>{const t=n.locale??z();return t==="zh-CN"?U6e():t==="fa"?G6e():t==="ar"?V6e():t==="es"?K6e():t==="hi"?W6e():q6e()}),Q6e=()=>"Session limit reached",X6e=()=>"已达到会话使用限额",Y6e=()=>"به سقف مصرف نشست رسیده‌اید",Z6e=()=>"تم بلوغ حد الاستخدام",J6e=()=>"Límite de la sesión alcanzado",e7e=()=>"सेशन सीमा पूरी हो गई",t7e=((e={},n={})=>{const t=n.locale??z();return t==="zh-CN"?X6e():t==="fa"?Y6e():t==="ar"?Z6e():t==="es"?J6e():t==="hi"?e7e():Q6e()}),n7e=()=>"The chat session was not created",r7e=()=>"未能创建聊天会话",s7e=()=>"نشست گفت‌وگو ایجاد نشد",i7e=()=>"لم تُنشأ جلسة المحادثة",a7e=()=>"No se creó la sesión de chat",o7e=()=>"चैट सेशन नहीं बनाया गया",l7e=((e={},n={})=>{const t=n.locale??z();return t==="zh-CN"?r7e():t==="fa"?s7e():t==="ar"?i7e():t==="es"?a7e():t==="hi"?o7e():n7e()}),c7e=()=>"Show full conversation",u7e=()=>"显示完整对话",_7e=()=>"نمایش کامل گفتگو",f7e=()=>"عرض المحادثة كاملة",d7e=()=>"Mostrar la conversación completa",h7e=()=>"पूरी बातचीत दिखाएं",p7e=((e={},n={})=>{const t=n.locale??z();return t==="zh-CN"?u7e():t==="fa"?_7e():t==="ar"?f7e():t==="es"?d7e():t==="hi"?h7e():c7e()}),m7e=()=>" · Spawned by another agent",g7e=()=>" · 由另一个智能体创建",v7e=()=>" · ساخته‌شده به‌دست عامل دیگر",b7e=()=>" · أنشأه وكيل آخر",y7e=()=>" · Creada por otro agente",x7e=()=>" · किसी और एजेंट द्वारा शुरू किया गया",w7e=((e={},n={})=>{const t=n.locale??z();return t==="zh-CN"?g7e():t==="fa"?v7e():t==="ar"?b7e():t==="es"?y7e():t==="hi"?x7e():m7e()}),k7e=()=>"Starting…",S7e=()=>"正在启动…",C7e=()=>"در حال شروع…",E7e=()=>"جارٍ البدء…",N7e=()=>"Iniciando…",z7e=()=>"शुरू हो रहा है…",j7e=((e={},n={})=>{const t=n.locale??z();return t==="zh-CN"?S7e():t==="fa"?C7e():t==="ar"?E7e():t==="es"?N7e():t==="hi"?z7e():k7e()}),T7e=e=>`Steer ${e==null?void 0:e.harness}… (${e==null?void 0:e.shortcut} to queue)`,A7e=e=>`向 ${e==null?void 0:e.harness} 补充指示…(按 ${e==null?void 0:e.shortcut} 排队)`,R7e=e=>`راهنمایی ${e==null?void 0:e.harness}… (${e==null?void 0:e.shortcut} برای افزودن به صف)`,M7e=e=>`وجّه ${e==null?void 0:e.harness}… (${e==null?void 0:e.shortcut} للإضافة إلى قائمة الانتظار)`,O7e=e=>`Guía a ${e==null?void 0:e.harness}… (${e==null?void 0:e.shortcut} para poner en cola)`,D7e=e=>`${e==null?void 0:e.harness} को दिशा दें… (कतार में लगाने के लिए ${e==null?void 0:e.shortcut})`,L7e=((e,n={})=>{const t=n.locale??z();return t==="zh-CN"?A7e(e):t==="fa"?R7e(e):t==="ar"?M7e(e):t==="es"?O7e(e):t==="hi"?D7e(e):T7e(e)}),I7e=()=>"Could not stop the turn. Try again.",$7e=()=>"无法停止本轮。请重试。",B7e=()=>"توقف این نوبت ممکن نشد. دوباره تلاش کنید.",P7e=()=>"تعذّر إيقاف الجولة. حاول مجددًا.",F7e=()=>"No se pudo detener el turno. Inténtalo de nuevo.",H7e=()=>"टर्न रोका नहीं जा सका। फिर से कोशिश करें।",q7e=((e={},n={})=>{const t=n.locale??z();return t==="zh-CN"?$7e():t==="fa"?B7e():t==="ar"?P7e():t==="es"?F7e():t==="hi"?H7e():I7e()}),U7e=e=>`Could not switch fork: ${e==null?void 0:e.error}`,G7e=e=>`无法切换分支:${e==null?void 0:e.error}`,V7e=e=>`تغییر شاخه ممکن نشد: ${e==null?void 0:e.error}`,K7e=e=>`تعذّر تبديل التفرّع: ${e==null?void 0:e.error}`,W7e=e=>`No se pudo cambiar de bifurcación: ${e==null?void 0:e.error}`,Q7e=e=>`फ़ोर्क नहीं बदला जा सका: ${e==null?void 0:e.error}`,X7e=((e,n={})=>{const t=n.locale??z();return t==="zh-CN"?G7e(e):t==="fa"?V7e(e):t==="ar"?K7e(e):t==="es"?W7e(e):t==="hi"?Q7e(e):U7e(e)}),Y7e=()=>"The agent",Z7e=()=>"智能体",J7e=()=>"عامل",eCe=()=>"الوكيل",tCe=()=>"El agente",nCe=()=>"एजेंट",rCe=((e={},n={})=>{const t=n.locale??z();return t==="zh-CN"?Z7e():t==="fa"?J7e():t==="ar"?eCe():t==="es"?tCe():t==="hi"?nCe():Y7e()}),sCe=()=>"Thinking",iCe=()=>"正在思考",aCe=()=>"در حال فکر کردن",oCe=()=>"جارٍ التفكير",lCe=()=>"Pensando",cCe=()=>"सोच रहा है",uCe=((e={},n={})=>{const t=n.locale??z();return t==="zh-CN"?iCe():t==="fa"?aCe():t==="ar"?oCe():t==="es"?lCe():t==="hi"?cCe():sCe()}),_Ce=()=>"Could not toggle Plan mode. Try again.",fCe=()=>"无法切换计划模式。请重试。",dCe=()=>"تغییر حالت طرح ممکن نشد. دوباره تلاش کنید.",hCe=()=>"تعذّر تبديل وضع التخطيط. حاول مجددًا.",pCe=()=>"No se pudo cambiar el modo Plan. Inténtalo de nuevo.",mCe=()=>"प्लान मोड टॉगल नहीं हो सका। फिर से कोशिश करें।",fN=((e={},n={})=>{const t=n.locale??z();return t==="zh-CN"?fCe():t==="fa"?dCe():t==="ar"?hCe():t==="es"?pCe():t==="hi"?mCe():_Ce()}),gCe=()=>"This turn did not finish.",vCe=()=>"本轮未完成。",bCe=()=>"این نوبت کامل نشد.",yCe=()=>"لم تكتمل هذه الجولة.",xCe=()=>"Este turno no terminó.",wCe=()=>"यह टर्न पूरा नहीं हुआ।",dN=((e={},n={})=>{const t=n.locale??z();return t==="zh-CN"?vCe():t==="fa"?bCe():t==="ar"?yCe():t==="es"?xCe():t==="hi"?wCe():gCe()}),kCe=()=>"Type a custom answer…",SCe=()=>"输入自定义回答…",CCe=()=>"پاسخ دلخواه را بنویسید…",ECe=()=>"اكتب إجابة مخصصة…",NCe=()=>"Escribe una respuesta personalizada…",zCe=()=>"अपना जवाब टाइप करें…",jCe=((e={},n={})=>{const t=n.locale??z();return t==="zh-CN"?SCe():t==="fa"?CCe():t==="ar"?ECe():t==="es"?NCe():t==="hi"?zCe():kCe()}),TCe=()=>"Unarchive",ACe=()=>"取消归档",RCe=()=>"خارج کردن از بایگانی",MCe=()=>"إلغاء الأرشفة",OCe=()=>"Desarchivar",DCe=()=>"आर्काइव से निकालें",LCe=((e={},n={})=>{const t=n.locale??z();return t==="zh-CN"?ACe():t==="fa"?RCe():t==="ar"?MCe():t==="es"?OCe():t==="hi"?DCe():TCe()}),ICe=()=>"Untitled",$Ce=()=>"未命名",BCe=()=>"بدون عنوان",PCe=()=>"بدون عنوان",FCe=()=>"Sin título",HCe=()=>"बिना शीर्षक",Fg=((e={},n={})=>{const t=n.locale??z();return t==="zh-CN"?$Ce():t==="fa"?BCe():t==="ar"?PCe():t==="es"?FCe():t==="hi"?HCe():ICe()}),qCe=()=>"Could not update permissions. Try again.",UCe=()=>"无法更新权限。请重试。",GCe=()=>"به‌روزرسانی مجوزها انجام نشد. دوباره تلاش کنید.",VCe=()=>"تعذّر تحديث الأذونات. حاول مجددًا.",KCe=()=>"No se pudieron actualizar los permisos. Inténtalo de nuevo.",WCe=()=>"अनुमतियाँ अपडेट नहीं हो सकीं। फिर से कोशिश करें।",QCe=((e={},n={})=>{const t=n.locale??z();return t==="zh-CN"?UCe():t==="fa"?GCe():t==="ar"?VCe():t==="es"?KCe():t==="hi"?WCe():qCe()}),XCe=()=>"Work details",YCe=()=>"工作详情",ZCe=()=>"جزئیات کار",JCe=()=>"تفاصيل العمل",e8e=()=>"Detalles del trabajo",t8e=()=>"काम का विवरण",n8e=((e={},n={})=>{const t=n.locale??z();return t==="zh-CN"?YCe():t==="fa"?ZCe():t==="ar"?JCe():t==="es"?e8e():t==="hi"?t8e():XCe()}),r8e=e=>`${e==null?void 0:e.minutes}m ${e==null?void 0:e.seconds}s`,s8e=e=>`${e==null?void 0:e.minutes}分${e==null?void 0:e.seconds}秒`,i8e=e=>`${e==null?void 0:e.minutes} دقیقه ${e==null?void 0:e.seconds} ثانیه`,a8e=e=>`${e==null?void 0:e.minutes}د ${e==null?void 0:e.seconds}ث`,o8e=e=>`${e==null?void 0:e.minutes} min ${e==null?void 0:e.seconds} s`,l8e=e=>`${e==null?void 0:e.minutes}मि ${e==null?void 0:e.seconds}से`,c8e=((e,n={})=>{const t=n.locale??z();return t==="zh-CN"?s8e(e):t==="fa"?i8e(e):t==="ar"?a8e(e):t==="es"?o8e(e):t==="hi"?l8e(e):r8e(e)}),u8e=e=>`Worked for ${e==null?void 0:e.duration}`,_8e=e=>`已工作 ${e==null?void 0:e.duration}`,f8e=e=>`به‌مدت ${e==null?void 0:e.duration} کار کرد`,d8e=e=>`عمل لمدة ${e==null?void 0:e.duration}`,h8e=e=>`Trabajó durante ${e==null?void 0:e.duration}`,p8e=e=>`${e==null?void 0:e.duration} तक काम किया`,m8e=((e,n={})=>{const t=n.locale??z();return t==="zh-CN"?_8e(e):t==="fa"?f8e(e):t==="ar"?d8e(e):t==="es"?h8e(e):t==="hi"?p8e(e):u8e(e)}),g8e=()=>"Working…",v8e=()=>"正在工作…",b8e=()=>"در حال کار…",y8e=()=>"جارٍ العمل…",x8e=()=>"Trabajando…",w8e=()=>"काम हो रहा है…",Rk=((e={},n={})=>{const t=n.locale??z();return t==="zh-CN"?v8e():t==="fa"?b8e():t==="ar"?y8e():t==="es"?x8e():t==="hi"?w8e():g8e()}),k8e=()=>"Close tab",S8e=()=>"关闭标签页",C8e=()=>"بستن زبانه",E8e=()=>"إغلاق التبويب",N8e=()=>"Cerrar pestaña",z8e=()=>"टैब बंद करें",j8e=((e={},n={})=>{const t=n.locale??z();return t==="zh-CN"?S8e():t==="fa"?C8e():t==="ar"?E8e():t==="es"?N8e():t==="hi"?z8e():k8e()}),T8e=()=>"Changes",A8e=()=>"更改",R8e=()=>"تغییرات",M8e=()=>"التغييرات",O8e=()=>"Cambios",D8e=()=>"बदलाव",cD=((e={},n={})=>{const t=n.locale??z();return t==="zh-CN"?A8e():t==="fa"?R8e():t==="ar"?M8e():t==="es"?O8e():t==="hi"?D8e():T8e()}),L8e=()=>"Code browser view",I8e=()=>"代码浏览器视图",$8e=()=>"نمای مرورگر کد",B8e=()=>"عرض متصفح الشيفرة",P8e=()=>"Vista del explorador de código",F8e=()=>"कोड ब्राउज़र व्यू",H8e=((e={},n={})=>{const t=n.locale??z();return t==="zh-CN"?I8e():t==="fa"?$8e():t==="ar"?B8e():t==="es"?P8e():t==="hi"?F8e():L8e()}),q8e=()=>"Files",U8e=()=>"文件",G8e=()=>"فایل‌ها",V8e=()=>"الملفات",K8e=()=>"Archivos",W8e=()=>"फ़ाइलें",Q8e=((e={},n={})=>{const t=n.locale??z();return t==="zh-CN"?U8e():t==="fa"?G8e():t==="ar"?V8e():t==="es"?K8e():t==="hi"?W8e():q8e()}),X8e=()=>"Refresh",Y8e=()=>"刷新",Z8e=()=>"تازه‌سازی",J8e=()=>"تحديث",e9e=()=>"Actualizar",t9e=()=>"रीफ़्रेश करें",hN=((e={},n={})=>{const t=n.locale??z();return t==="zh-CN"?Y8e():t==="fa"?Z8e():t==="ar"?J8e():t==="es"?e9e():t==="hi"?t9e():X8e()}),n9e=()=>"listing truncated",r9e=()=>"列表已截断",s9e=()=>"فهرست کوتاه شده است",i9e=()=>"القائمة مقتطعة",a9e=()=>"listado truncado",o9e=()=>"सूची छोटी की गई",l9e=((e={},n={})=>{const t=n.locale??z();return t==="zh-CN"?r9e():t==="fa"?s9e():t==="ar"?i9e():t==="es"?a9e():t==="hi"?o9e():n9e()}),c9e=()=>"No files.",u9e=()=>"没有文件。",_9e=()=>"فایلی وجود ندارد.",f9e=()=>"لا توجد ملفات.",d9e=()=>"No hay archivos.",h9e=()=>"कोई फ़ाइल नहीं।",p9e=((e={},n={})=>{const t=n.locale??z();return t==="zh-CN"?u9e():t==="fa"?_9e():t==="ar"?f9e():t==="es"?d9e():t==="hi"?h9e():c9e()}),m9e=()=>"Refresh failed:",g9e=()=>"刷新失败:",v9e=()=>"تازه‌سازی ناموفق بود:",b9e=()=>"فشل التحديث:",y9e=()=>"Error al actualizar:",x9e=()=>"रीफ़्रेश विफल:",w9e=((e={},n={})=>{const t=n.locale??z();return t==="zh-CN"?g9e():t==="fa"?v9e():t==="ar"?b9e():t==="es"?y9e():t==="hi"?x9e():m9e()}),k9e=()=>"Cancelling…",S9e=()=>"正在取消…",C9e=()=>"در حال لغو…",E9e=()=>"جارٍ الإلغاء…",N9e=()=>"Cancelando…",z9e=()=>"रद्द हो रहा है…",j9e=((e={},n={})=>{const t=n.locale??z();return t==="zh-CN"?S9e():t==="fa"?C9e():t==="ar"?E9e():t==="es"?N9e():t==="hi"?z9e():k9e()}),T9e=()=>"Checking…",A9e=()=>"正在检查…",R9e=()=>"در حال بررسی…",M9e=()=>"جارٍ التحقق…",O9e=()=>"Comprobando…",D9e=()=>"जाँचा जा रहा है…",sa=((e={},n={})=>{const t=n.locale??z();return t==="zh-CN"?A9e():t==="fa"?R9e():t==="ar"?M9e():t==="es"?O9e():t==="hi"?D9e():T9e()}),L9e=()=>"Copied",I9e=()=>"已复制",$9e=()=>"کپی شد",B9e=()=>"تم النسخ",P9e=()=>"Copiado",F9e=()=>"कॉपी हो गया",m0=((e={},n={})=>{const t=n.locale??z();return t==="zh-CN"?I9e():t==="fa"?$9e():t==="ar"?B9e():t==="es"?P9e():t==="hi"?F9e():L9e()}),H9e=e=>`Failed to load: ${e==null?void 0:e.error}`,q9e=e=>`加载失败:${e==null?void 0:e.error}`,U9e=e=>`بارگذاری ناموفق بود: ${e==null?void 0:e.error}`,G9e=e=>`تعذّر التحميل: ${e==null?void 0:e.error}`,V9e=e=>`Error al cargar: ${e==null?void 0:e.error}`,K9e=e=>`लोड नहीं हो सका: ${e==null?void 0:e.error}`,uD=((e,n={})=>{const t=n.locale??z();return t==="zh-CN"?q9e(e):t==="fa"?U9e(e):t==="ar"?G9e(e):t==="es"?V9e(e):t==="hi"?K9e(e):H9e(e)}),W9e=()=>"Loading…",Q9e=()=>"正在加载…",X9e=()=>"در حال بارگیری…",Y9e=()=>"جارٍ التحميل…",Z9e=()=>"Cargando…",J9e=()=>"लोड हो रहा है…",_D=((e={},n={})=>{const t=n.locale??z();return t==="zh-CN"?Q9e():t==="fa"?X9e():t==="ar"?Y9e():t==="es"?Z9e():t==="hi"?J9e():W9e()}),eEe=e=>`+ ${e==null?void 0:e.count} more`,tEe=e=>`另有 ${e==null?void 0:e.count} 项`,nEe=e=>`${e==null?void 0:e.count}+ مورد دیگر`,rEe=e=>`المزيد (+${e==null?void 0:e.count})`,sEe=e=>`+ ${e==null?void 0:e.count} más`,iEe=e=>`+ ${e==null?void 0:e.count} और`,aEe=((e,n={})=>{const t=n.locale??z();return t==="zh-CN"?tEe(e):t==="fa"?nEe(e):t==="ar"?rEe(e):t==="es"?sEe(e):t==="hi"?iEe(e):eEe(e)}),oEe=()=>"Rendered view",lEe=()=>"渲染视图",cEe=()=>"نمای رندرشده",uEe=()=>"العرض المُنسَّق",_Ee=()=>"Vista renderizada",fEe=()=>"रेंडर किया गया व्यू",pv=((e={},n={})=>{const t=n.locale??z();return t==="zh-CN"?lEe():t==="fa"?cEe():t==="ar"?uEe():t==="es"?_Ee():t==="hi"?fEe():oEe()}),dEe=()=>"Save",hEe=()=>"保存",pEe=()=>"ذخیره",mEe=()=>"حفظ",gEe=()=>"Guardar",vEe=()=>"सेव करें",Zo=((e={},n={})=>{const t=n.locale??z();return t==="zh-CN"?hEe():t==="fa"?pEe():t==="ar"?mEe():t==="es"?gEe():t==="hi"?vEe():dEe()}),bEe=()=>"Saving…",yEe=()=>"正在保存…",xEe=()=>"در حال ذخیره…",wEe=()=>"جارٍ الحفظ…",kEe=()=>"Guardando…",SEe=()=>"सेव हो रहा है…",la=((e={},n={})=>{const t=n.locale??z();return t==="zh-CN"?yEe():t==="fa"?xEe():t==="ar"?wEe():t==="es"?kEe():t==="hi"?SEe():bEe()}),CEe=()=>"Show less",EEe=()=>"收起",NEe=()=>"نمایش کمتر",zEe=()=>"عرض أقل",jEe=()=>"Mostrar menos",TEe=()=>"कम दिखाएं",fD=((e={},n={})=>{const t=n.locale??z();return t==="zh-CN"?EEe():t==="fa"?NEe():t==="ar"?zEe():t==="es"?jEe():t==="hi"?TEe():CEe()}),AEe=()=>"Show more",REe=()=>"展开",MEe=()=>"نمایش بیشتر",OEe=()=>"عرض المزيد",DEe=()=>"Mostrar más",LEe=()=>"और दिखाएं",IEe=((e={},n={})=>{const t=n.locale??z();return t==="zh-CN"?REe():t==="fa"?MEe():t==="ar"?OEe():t==="es"?DEe():t==="hi"?LEe():AEe()}),$Ee=()=>"Stop",BEe=()=>"停止",PEe=()=>"توقف",FEe=()=>"إيقاف",HEe=()=>"Detener",qEe=()=>"रोकें",dD=((e={},n={})=>{const t=n.locale??z();return t==="zh-CN"?BEe():t==="fa"?PEe():t==="ar"?FEe():t==="es"?HEe():t==="hi"?qEe():$Ee()}),UEe=()=>"Stopping…",GEe=()=>"正在停止…",VEe=()=>"در حال توقف…",KEe=()=>"جارٍ الإيقاف…",WEe=()=>"Deteniendo…",QEe=()=>"रोका जा रहा है…",XEe=((e={},n={})=>{const t=n.locale??z();return t==="zh-CN"?GEe():t==="fa"?VEe():t==="ar"?KEe():t==="es"?WEe():t==="hi"?QEe():UEe()}),YEe=()=>"View source",ZEe=()=>"查看源代码",JEe=()=>"نمایش متن منبع",eNe=()=>"عرض المصدر",tNe=()=>"Ver código fuente",nNe=()=>"स्रोत देखें",ud=((e={},n={})=>{const t=n.locale??z();return t==="zh-CN"?ZEe():t==="fa"?JEe():t==="ar"?eNe():t==="es"?tNe():t==="hi"?nNe():YEe()}),rNe=()=>"Runs as a remote Hugging Face Job",sNe=()=>"作为远程 Hugging Face Job 运行",iNe=()=>"به‌صورت Hugging Face Job دوردست اجرا می‌شود",aNe=()=>"يعمل كمهمة Hugging Face بعيدة",oNe=()=>"Se ejecuta como un Job remoto de Hugging Face",lNe=()=>"एक रिमोट Hugging Face Job के रूप में चलता है",cNe=((e={},n={})=>{const t=n.locale??z();return t==="zh-CN"?sNe():t==="fa"?iNe():t==="ar"?aNe():t==="es"?oNe():t==="hi"?lNe():rNe()}),uNe=()=>"Runs as a Job on your Kubernetes cluster",_Ne=()=>"作为 Kubernetes 集群上的 Job 运行",fNe=()=>"به‌صورت Job روی خوشهٔ Kubernetes اجرا می‌شود",dNe=()=>"يعمل كمهمة على عنقود Kubernetes الخاص بك",hNe=()=>"Se ejecuta como un Job en tu clúster de Kubernetes",pNe=()=>"आपके Kubernetes क्लस्टर पर एक Job के रूप में चलता है",mNe=((e={},n={})=>{const t=n.locale??z();return t==="zh-CN"?_Ne():t==="fa"?fNe():t==="ar"?dNe():t==="es"?hNe():t==="hi"?pNe():uNe()}),gNe=()=>"Runs directly on this computer",vNe=()=>"直接在此计算机上运行",bNe=()=>"مستقیماً روی این رایانه اجرا می‌شود",yNe=()=>"يعمل مباشرة على هذا الحاسوب",xNe=()=>"Se ejecuta directamente en este equipo",wNe=()=>"सीधे इस कंप्यूटर पर चलता है",kNe=((e={},n={})=>{const t=n.locale??z();return t==="zh-CN"?vNe():t==="fa"?bNe():t==="ar"?yNe():t==="es"?xNe():t==="hi"?wNe():gNe()}),SNe=()=>"Runs in a remote Modal sandbox",CNe=()=>"在远程 Modal 沙箱中运行",ENe=()=>"در sandbox دوردست Modal اجرا می‌شود",NNe=()=>"يعمل في بيئة Modal معزولة عن بُعد",zNe=()=>"Se ejecuta en un sandbox remoto de Modal",jNe=()=>"एक रिमोट Modal सैंडबॉक्स में चलता है",TNe=((e={},n={})=>{const t=n.locale??z();return t==="zh-CN"?CNe():t==="fa"?ENe():t==="ar"?NNe():t==="es"?zNe():t==="hi"?jNe():SNe()}),ANe=()=>"Runs on an ephemeral OpenResearch box",RNe=()=>"在临时 OpenResearch 主机上运行",MNe=()=>"روی میزبان موقت OpenResearch اجرا می‌شود",ONe=()=>"يعمل على صندوق OpenResearch مؤقت",DNe=()=>"Se ejecuta en una máquina efímera de OpenResearch",LNe=()=>"एक अस्थायी OpenResearch बॉक्स पर चलता है",INe=((e={},n={})=>{const t=n.locale??z();return t==="zh-CN"?RNe():t==="fa"?MNe():t==="ar"?ONe():t==="es"?DNe():t==="hi"?LNe():ANe()}),$Ne=()=>"Runs on the connected Ray cluster",BNe=()=>"在已连接的 Ray 集群上运行",PNe=()=>"روی خوشهٔ متصل Ray اجرا می‌شود",FNe=()=>"يعمل على عنقود Ray المتصل",HNe=()=>"Se ejecuta en el clúster de Ray conectado",qNe=()=>"कनेक्टेड Ray क्लस्टर पर चलता है",UNe=((e={},n={})=>{const t=n.locale??z();return t==="zh-CN"?BNe():t==="fa"?PNe():t==="ar"?FNe():t==="es"?HNe():t==="hi"?qNe():$Ne()}),GNe=()=>"Runs as a scheduled job on your Slurm cluster",VNe=()=>"作为 Slurm 集群上的调度作业运行",KNe=()=>"به‌صورت کار زمان‌بندی‌شده روی خوشهٔ Slurm اجرا می‌شود",WNe=()=>"يعمل كمهمة مجدولة على عنقود Slurm الخاص بك",QNe=()=>"Se ejecuta como un job programado en tu clúster de Slurm",XNe=()=>"आपके Slurm क्लस्टर पर एक शेड्यूल्ड जॉब के रूप में चलता है",YNe=((e={},n={})=>{const t=n.locale??z();return t==="zh-CN"?VNe():t==="fa"?KNe():t==="ar"?WNe():t==="es"?QNe():t==="hi"?XNe():GNe()}),ZNe=()=>"Runs on a host from your SSH config",JNe=()=>"在 SSH 配置中的主机上运行",eze=()=>"روی میزبانی از پیکربندی SSH اجرا می‌شود",tze=()=>"يعمل على مضيف من إعداد SSH الخاص بك",nze=()=>"Se ejecuta en un host de tu configuración SSH",rze=()=>"आपके SSH कॉन्फ़िग के किसी होस्ट पर चलता है",sze=((e={},n={})=>{const t=n.locale??z();return t==="zh-CN"?JNe():t==="fa"?eze():t==="ar"?tze():t==="es"?nze():t==="hi"?rze():ZNe()}),ize=()=>"Runs through Tinker’s remote compute",aze=()=>"通过 Tinker 远程算力运行",oze=()=>"از طریق رایانش دوردست Tinker اجرا می‌شود",lze=()=>"يعمل عبر حوسبة Tinker البعيدة",cze=()=>"Se ejecuta en el cómputo remoto de Tinker",uze=()=>"Tinker के रिमोट कंप्यूट के ज़रिए चलता है",_ze=((e={},n={})=>{const t=n.locale??z();return t==="zh-CN"?aze():t==="fa"?oze():t==="ar"?lze():t==="es"?cze():t==="hi"?uze():ize()}),fze=()=>"HF Jobs",dze=()=>"HF Jobs",hze=()=>"HF Jobs",pze=()=>"HF Jobs",mze=()=>"HF Jobs",gze=()=>"HF Jobs",vze=((e={},n={})=>{const t=n.locale??z();return t==="zh-CN"?dze():t==="fa"?hze():t==="ar"?pze():t==="es"?mze():t==="hi"?gze():fze()}),bze=()=>"Kubernetes",yze=()=>"Kubernetes",xze=()=>"Kubernetes",wze=()=>"Kubernetes",kze=()=>"Kubernetes",Sze=()=>"Kubernetes",Cze=((e={},n={})=>{const t=n.locale??z();return t==="zh-CN"?yze():t==="fa"?xze():t==="ar"?wze():t==="es"?kze():t==="hi"?Sze():bze()}),Eze=()=>"This machine",Nze=()=>"此计算机",zze=()=>"این رایانه",jze=()=>"هذا الجهاز",Tze=()=>"Este equipo",Aze=()=>"यह मशीन",hD=((e={},n={})=>{const t=n.locale??z();return t==="zh-CN"?Nze():t==="fa"?zze():t==="ar"?jze():t==="es"?Tze():t==="hi"?Aze():Eze()}),Rze=()=>"Modal",Mze=()=>"Modal",Oze=()=>"Modal",Dze=()=>"Modal",Lze=()=>"Modal",Ize=()=>"Modal",$ze=((e={},n={})=>{const t=n.locale??z();return t==="zh-CN"?Mze():t==="fa"?Oze():t==="ar"?Dze():t==="es"?Lze():t==="hi"?Ize():Rze()}),Bze=()=>"OpenResearch",Pze=()=>"OpenResearch",Fze=()=>"OpenResearch",Hze=()=>"OpenResearch",qze=()=>"OpenResearch",Uze=()=>"OpenResearch",Gze=((e={},n={})=>{const t=n.locale??z();return t==="zh-CN"?Pze():t==="fa"?Fze():t==="ar"?Hze():t==="es"?qze():t==="hi"?Uze():Bze()}),Vze=()=>"Ray",Kze=()=>"Ray",Wze=()=>"Ray",Qze=()=>"Ray",Xze=()=>"Ray",Yze=()=>"Ray",Zze=((e={},n={})=>{const t=n.locale??z();return t==="zh-CN"?Kze():t==="fa"?Wze():t==="ar"?Qze():t==="es"?Xze():t==="hi"?Yze():Vze()}),Jze=()=>"Slurm",eje=()=>"Slurm",tje=()=>"Slurm",nje=()=>"Slurm",rje=()=>"Slurm",sje=()=>"Slurm",ije=((e={},n={})=>{const t=n.locale??z();return t==="zh-CN"?eje():t==="fa"?tje():t==="ar"?nje():t==="es"?rje():t==="hi"?sje():Jze()}),aje=()=>"SSH",oje=()=>"SSH",lje=()=>"SSH",cje=()=>"SSH",uje=()=>"SSH",_je=()=>"SSH",fje=((e={},n={})=>{const t=n.locale??z();return t==="zh-CN"?oje():t==="fa"?lje():t==="ar"?cje():t==="es"?uje():t==="hi"?_je():aje()}),dje=()=>"Tinker",hje=()=>"Tinker",pje=()=>"Tinker",mje=()=>"Tinker",gje=()=>"Tinker",vje=()=>"Tinker",bje=((e={},n={})=>{const t=n.locale??z();return t==="zh-CN"?hje():t==="fa"?pje():t==="ar"?mje():t==="es"?gje():t==="hi"?vje():dje()}),yje=()=>"A Hugging Face Job runs remotely in your account using the selected hardware. Usage is billed by Hugging Face.",xje=()=>"Hugging Face Job 使用所选硬件在你的账户中远程运行。费用由 Hugging Face 收取。",wje=()=>"یک Hugging Face Job با سخت‌افزار انتخاب‌شده در حساب شما از راه دور اجرا می‌شود. هزینه را Hugging Face دریافت می‌کند.",kje=()=>"تعمل مهمة Hugging Face عن بُعد في حسابك باستخدام العتاد المحدد. تتولى Hugging Face احتساب رسوم الاستخدام.",Sje=()=>"Un Hugging Face Job se ejecuta de forma remota en tu cuenta con el hardware seleccionado. Hugging Face factura el uso.",Cje=()=>"एक Hugging Face Job चुने गए हार्डवेयर का इस्तेमाल करते हुए आपके खाते में रिमोट रूप से चलता है। इस्तेमाल का बिल Hugging Face करता है।",Eje=((e={},n={})=>{const t=n.locale??z();return t==="zh-CN"?xje():t==="fa"?wje():t==="ar"?kje():t==="es"?Sje():t==="hi"?Cje():yje()}),Nje=()=>"A Modal sandbox runs remotely in your account using the selected hardware and scales to zero after the run.",zje=()=>"Modal 沙箱使用所选硬件在你的账户中远程运行,并在运行结束后缩容到零。",jje=()=>"یک sandbox از Modal با سخت‌افزار انتخاب‌شده در حساب شما از راه دور اجرا می‌شود و پس از اجرا به صفر مقیاس می‌یابد.",Tje=()=>"تعمل بيئة Modal معزولة عن بُعد في حسابك باستخدام العتاد المحدد، وتُخفَّض مواردها إلى الصفر بعد انتهاء التشغيل.",Aje=()=>"Un sandbox de Modal se ejecuta de forma remota en tu cuenta con el hardware seleccionado y escala a cero al terminar la ejecución.",Rje=()=>"एक Modal सैंडबॉक्स चुने गए हार्डवेयर का इस्तेमाल करते हुए आपके खाते में रिमोट रूप से चलता है और रन के बाद शून्य पर स्केल हो जाता है।",Mje=((e={},n={})=>{const t=n.locale??z();return t==="zh-CN"?zje():t==="fa"?jje():t==="ar"?Tje():t==="es"?Aje():t==="hi"?Rje():Nje()}),Oje=()=>"An ephemeral OpenResearch box runs the experiment, is billed to your organization, and is deleted when the run ends.",Dje=()=>"临时 OpenResearch 主机运行实验,费用计入你的组织,并在运行结束后删除。",Lje=()=>"یک میزبان موقت OpenResearch آزمایش را اجرا می‌کند، هزینه به سازمان شما منظور می‌شود و میزبان پس از پایان حذف می‌گردد.",Ije=()=>"تعمل التجربة على جهاز OpenResearch مؤقت، وتتحمل مؤسستك تكلفته، ويُحذف الجهاز عند انتهاء التشغيل.",$je=()=>"Una máquina efímera de OpenResearch ejecuta el experimento, se factura a tu organización y se elimina al terminar la ejecución.",Bje=()=>"एक अस्थायी OpenResearch बॉक्स प्रयोग चलाता है, आपके संगठन को बिल किया जाता है, और रन खत्म होने पर हटा दिया जाता है।",Pje=((e={},n={})=>{const t=n.locale??z();return t==="zh-CN"?Dje():t==="fa"?Lje():t==="ar"?Ije():t==="es"?$je():t==="hi"?Bje():Oje()}),Fje=()=>"This computer must stay awake and online while Tinker runs.",Hje=()=>"Tinker 运行时,此计算机必须保持唤醒和联网。",qje=()=>"هنگام اجرای Tinker، این رایانه باید روشن و آنلاین بماند.",Uje=()=>"يجب أن يبقى هذا الحاسوب مستيقظًا ومتصلًا أثناء تشغيل Tinker.",Gje=()=>"Este equipo debe permanecer encendido y conectado mientras Tinker se ejecuta.",Vje=()=>"जब तक Tinker चल रहा है, इस कंप्यूटर को जागते और ऑनलाइन रहना होगा।",Kje=((e={},n={})=>{const t=n.locale??z();return t==="zh-CN"?Hje():t==="fa"?qje():t==="ar"?Uje():t==="es"?Gje():t==="hi"?Vje():Fje()}),Wje=()=>"Context window",Qje=()=>"上下文窗口",Xje=()=>"پنجرهٔ زمینه",Yje=()=>"نافذة السياق",Zje=()=>"Ventana de contexto",Jje=()=>"कॉन्टेक्स्ट विंडो",eTe=((e={},n={})=>{const t=n.locale??z();return t==="zh-CN"?Qje():t==="fa"?Xje():t==="ar"?Yje():t==="es"?Zje():t==="hi"?Jje():Wje()}),tTe=()=>"Context window used",nTe=()=>"已使用的上下文窗口",rTe=()=>"پنجرهٔ زمینهٔ استفاده‌شده",sTe=()=>"المستخدَم من نافذة السياق",iTe=()=>"Ventana de contexto usada",aTe=()=>"इस्तेमाल हुई कॉन्टेक्स्ट विंडो",oTe=((e={},n={})=>{const t=n.locale??z();return t==="zh-CN"?nTe():t==="fa"?rTe():t==="ar"?sTe():t==="es"?iTe():t==="hi"?aTe():tTe()}),lTe=e=>`${e==null?void 0:e.value} tokens`,cTe=e=>`${e==null?void 0:e.value} 个 token`,uTe=e=>`${e==null?void 0:e.value} توکن`,_Te=e=>`${e==null?void 0:e.value} رمز`,fTe=e=>`${e==null?void 0:e.value} tokens`,dTe=e=>`${e==null?void 0:e.value} टोकन`,hTe=((e,n={})=>{const t=n.locale??z();return t==="zh-CN"?cTe(e):t==="fa"?uTe(e):t==="ar"?_Te(e):t==="es"?fTe(e):t==="hi"?dTe(e):lTe(e)}),pTe=e=>`${e==null?void 0:e.used} / ${e==null?void 0:e.total} (${e==null?void 0:e.percent})`,mTe=e=>`${e==null?void 0:e.used} / ${e==null?void 0:e.total}(${e==null?void 0:e.percent})`,gTe=e=>`${e==null?void 0:e.used} از ${e==null?void 0:e.total} (${e==null?void 0:e.percent})`,vTe=e=>`${e==null?void 0:e.used} / ${e==null?void 0:e.total} (${e==null?void 0:e.percent})`,bTe=e=>`${e==null?void 0:e.used} / ${e==null?void 0:e.total} (${e==null?void 0:e.percent})`,yTe=e=>`${e==null?void 0:e.used} / ${e==null?void 0:e.total} (${e==null?void 0:e.percent})`,xTe=((e,n={})=>{const t=n.locale??z();return t==="zh-CN"?mTe(e):t==="fa"?gTe(e):t==="ar"?vTe(e):t==="es"?bTe(e):t==="hi"?yTe(e):pTe(e)}),wTe=()=>"No runs yet — ask the agent to launch one.",kTe=()=>"尚无运行——让智能体启动一个。",STe=()=>"هنوز اجرایی وجود ندارد — از عامل بخواهید یکی را آغاز کند.",CTe=()=>"لا توجد عمليات تشغيل بعد — اطلب من الوكيل بدء واحدة.",ETe=()=>"Aún no hay ejecuciones — pídele al agente que lance una.",NTe=()=>"अभी तक कोई रन नहीं — एजेंट से एक शुरू करने को कहें।",zTe=((e={},n={})=>{const t=n.locale??z();return t==="zh-CN"?kTe():t==="fa"?STe():t==="ar"?CTe():t==="es"?ETe():t==="hi"?NTe():wTe()}),jTe=()=>"Run",TTe=()=>"运行",ATe=()=>"اجرا",RTe=()=>"تشغيل",MTe=()=>"Ejecución",OTe=()=>"रन",pN=((e={},n={})=>{const t=n.locale??z();return t==="zh-CN"?TTe():t==="fa"?ATe():t==="ar"?RTe():t==="es"?MTe():t==="hi"?OTe():jTe()}),DTe=()=>"Switch run",LTe=()=>"切换运行",ITe=()=>"تغییر اجرا",$Te=()=>"تبديل التشغيل",BTe=()=>"Cambiar de ejecución",PTe=()=>"रन बदलें",FTe=((e={},n={})=>{const t=n.locale??z();return t==="zh-CN"?LTe():t==="fa"?ITe():t==="ar"?$Te():t==="es"?BTe():t==="hi"?PTe():DTe()}),HTe=e=>`${e==null?void 0:e.days}d ${e==null?void 0:e.hours}h`,qTe=e=>`${e==null?void 0:e.days} 天 ${e==null?void 0:e.hours} 小时`,UTe=e=>`${e==null?void 0:e.days} روز و ${e==null?void 0:e.hours} ساعت`,GTe=e=>`${e==null?void 0:e.days}ي ${e==null?void 0:e.hours}س`,VTe=e=>`${e==null?void 0:e.days} d ${e==null?void 0:e.hours} h`,KTe=e=>`${e==null?void 0:e.days}दि ${e==null?void 0:e.hours}घं`,WTe=((e,n={})=>{const t=n.locale??z();return t==="zh-CN"?qTe(e):t==="fa"?UTe(e):t==="ar"?GTe(e):t==="es"?VTe(e):t==="hi"?KTe(e):HTe(e)}),QTe=e=>`${e==null?void 0:e.hours}h ${e==null?void 0:e.minutes}m`,XTe=e=>`${e==null?void 0:e.hours} 小时 ${e==null?void 0:e.minutes} 分钟`,YTe=e=>`${e==null?void 0:e.hours} ساعت و ${e==null?void 0:e.minutes} دقیقه`,ZTe=e=>`${e==null?void 0:e.hours}س ${e==null?void 0:e.minutes}د`,JTe=e=>`${e==null?void 0:e.hours} h ${e==null?void 0:e.minutes} min`,eAe=e=>`${e==null?void 0:e.hours}घं ${e==null?void 0:e.minutes}मि`,tAe=((e,n={})=>{const t=n.locale??z();return t==="zh-CN"?XTe(e):t==="fa"?YTe(e):t==="ar"?ZTe(e):t==="es"?JTe(e):t==="hi"?eAe(e):QTe(e)}),nAe=e=>`${e==null?void 0:e.value}m`,rAe=e=>`${e==null?void 0:e.value} 分钟`,sAe=e=>`${e==null?void 0:e.value} دقیقه`,iAe=e=>`${e==null?void 0:e.value}د`,aAe=e=>`${e==null?void 0:e.value} min`,oAe=e=>`${e==null?void 0:e.value}मि`,lAe=((e,n={})=>{const t=n.locale??z();return t==="zh-CN"?rAe(e):t==="fa"?sAe(e):t==="ar"?iAe(e):t==="es"?aAe(e):t==="hi"?oAe(e):nAe(e)}),cAe=e=>`${e==null?void 0:e.value}s`,uAe=e=>`${e==null?void 0:e.value} 秒`,_Ae=e=>`${e==null?void 0:e.value} ثانیه`,fAe=e=>`${e==null?void 0:e.value}ث`,dAe=e=>`${e==null?void 0:e.value} s`,hAe=e=>`${e==null?void 0:e.value}से`,pAe=((e,n={})=>{const t=n.locale??z();return t==="zh-CN"?uAe(e):t==="fa"?_Ae(e):t==="ar"?fAe(e):t==="es"?dAe(e):t==="hi"?hAe(e):cAe(e)}),mAe=()=>"Code",gAe=()=>"代码",vAe=()=>"کد",bAe=()=>"الشيفرة",yAe=()=>"Código",xAe=()=>"कोड",wAe=((e={},n={})=>{const t=n.locale??z();return t==="zh-CN"?gAe():t==="fa"?vAe():t==="ar"?bAe():t==="es"?yAe():t==="hi"?xAe():mAe()}),kAe=()=>"created",SAe=()=>"创建于",CAe=()=>"ایجادشده",EAe=()=>"أُنشئ",NAe=()=>"creado",zAe=()=>"बनाया गया",jAe=((e={},n={})=>{const t=n.locale??z();return t==="zh-CN"?SAe():t==="fa"?CAe():t==="ar"?EAe():t==="es"?NAe():t==="hi"?zAe():kAe()}),TAe=()=>"from",AAe=()=>"来自",RAe=()=>"از",MAe=()=>"من",OAe=()=>"desde",DAe=()=>"से",LAe=((e={},n={})=>{const t=n.locale??z();return t==="zh-CN"?AAe():t==="fa"?RAe():t==="ar"?MAe():t==="es"?OAe():t==="hi"?DAe():TAe()}),IAe=()=>"Logs",$Ae=()=>"日志",BAe=()=>"گزارش‌ها",PAe=()=>"السجلات",FAe=()=>"Logs",HAe=()=>"लॉग",qAe=((e={},n={})=>{const t=n.locale??z();return t==="zh-CN"?$Ae():t==="fa"?BAe():t==="ar"?PAe():t==="es"?FAe():t==="hi"?HAe():IAe()}),UAe=()=>"Latest run",GAe=()=>"最新运行",VAe=()=>"آخرین اجرا",KAe=()=>"أحدث تشغيل",WAe=()=>"Última ejecución",QAe=()=>"नवीनतम रन",XAe=((e={},n={})=>{const t=n.locale??z();return t==="zh-CN"?GAe():t==="fa"?VAe():t==="ar"?KAe():t==="es"?WAe():t==="hi"?QAe():UAe()}),YAe=()=>"Code",ZAe=()=>"代码",JAe=()=>"کد",eRe=()=>"الشيفرة",tRe=()=>"Código",nRe=()=>"कोड",rRe=((e={},n={})=>{const t=n.locale??z();return t==="zh-CN"?ZAe():t==="fa"?JAe():t==="ar"?eRe():t==="es"?tRe():t==="hi"?nRe():YAe()}),sRe=()=>"Commit",iRe=()=>"提交",aRe=()=>"کامیت",oRe=()=>"إيداع",lRe=()=>"Commit",cRe=()=>"कमिट",uRe=((e={},n={})=>{const t=n.locale??z();return t==="zh-CN"?iRe():t==="fa"?aRe():t==="ar"?oRe():t==="es"?lRe():t==="hi"?cRe():sRe()}),_Re=()=>"created",fRe=()=>"创建于",dRe=()=>"ایجادشده",hRe=()=>"أُنشئ",pRe=()=>"creado",mRe=()=>"बनाया गया",gRe=((e={},n={})=>{const t=n.locale??z();return t==="zh-CN"?fRe():t==="fa"?dRe():t==="ar"?hRe():t==="es"?pRe():t==="hi"?mRe():_Re()}),vRe=()=>"Description",bRe=()=>"说明",yRe=()=>"توضیحات",xRe=()=>"الوصف",wRe=()=>"Descripción",kRe=()=>"विवरण",SRe=((e={},n={})=>{const t=n.locale??z();return t==="zh-CN"?bRe():t==="fa"?yRe():t==="ar"?xRe():t==="es"?wRe():t==="hi"?kRe():vRe()}),CRe=()=>"Duration",ERe=()=>"时长",NRe=()=>"مدت",zRe=()=>"المدة",jRe=()=>"Duración",TRe=()=>"अवधि",ARe=((e={},n={})=>{const t=n.locale??z();return t==="zh-CN"?ERe():t==="fa"?NRe():t==="ar"?zRe():t==="es"?jRe():t==="hi"?TRe():CRe()}),RRe=()=>"exit",MRe=()=>"退出码",ORe=()=>"خروج",DRe=()=>"رمز الخروج",LRe=()=>"salida",IRe=()=>"एग्ज़िट",$Re=((e={},n={})=>{const t=n.locale??z();return t==="zh-CN"?MRe():t==="fa"?ORe():t==="ar"?DRe():t==="es"?LRe():t==="hi"?IRe():RRe()}),BRe=()=>"from",PRe=()=>"来自",FRe=()=>"از",HRe=()=>"من",qRe=()=>"desde",URe=()=>"से",GRe=((e={},n={})=>{const t=n.locale??z();return t==="zh-CN"?PRe():t==="fa"?FRe():t==="ar"?HRe():t==="es"?qRe():t==="hi"?URe():BRe()}),VRe=()=>"Logs",KRe=()=>"日志",WRe=()=>"گزارش‌ها",QRe=()=>"السجلات",XRe=()=>"Logs",YRe=()=>"लॉग",ZRe=((e={},n={})=>{const t=n.locale??z();return t==="zh-CN"?KRe():t==="fa"?WRe():t==="ar"?QRe():t==="es"?XRe():t==="hi"?YRe():VRe()}),JRe=()=>"Run",eMe=()=>"运行",tMe=()=>"اجرا",nMe=()=>"تشغيل",rMe=()=>"Ejecución",sMe=()=>"रन",iMe=((e={},n={})=>{const t=n.locale??z();return t==="zh-CN"?eMe():t==="fa"?tMe():t==="ar"?nMe():t==="es"?rMe():t==="hi"?sMe():JRe()}),aMe=()=>"Run history",oMe=()=>"运行历史",lMe=()=>"تاریخچهٔ اجرا",cMe=()=>"سجل التشغيل",uMe=()=>"Historial de ejecuciones",_Me=()=>"रन इतिहास",fMe=((e={},n={})=>{const t=n.locale??z();return t==="zh-CN"?oMe():t==="fa"?lMe():t==="ar"?cMe():t==="es"?uMe():t==="hi"?_Me():aMe()}),dMe=()=>"Started",hMe=()=>"开始时间",pMe=()=>"آغاز",mMe=()=>"بدأ",gMe=()=>"Inicio",vMe=()=>"शुरू हुआ",bMe=((e={},n={})=>{const t=n.locale??z();return t==="zh-CN"?hMe():t==="fa"?pMe():t==="ar"?mMe():t==="es"?gMe():t==="hi"?vMe():dMe()}),yMe=()=>"Runs",xMe=()=>"运行",wMe=()=>"اجراها",kMe=()=>"عمليات التشغيل",SMe=()=>"Ejecuciones",CMe=()=>"रन",EMe=((e={},n={})=>{const t=n.locale??z();return t==="zh-CN"?xMe():t==="fa"?wMe():t==="ar"?kMe():t==="es"?SMe():t==="hi"?CMe():yMe()}),NMe=()=>"Experiments and their runs will appear here. Ask the agent to set up an experiment to get started.",zMe=()=>"实验及其运行会显示在这里。让智能体设置一个实验即可开始。",jMe=()=>"آزمایش‌ها و اجراهای آن‌ها اینجا نمایش داده می‌شوند. برای شروع، از عامل بخواهید آزمایشی راه‌اندازی کند.",TMe=()=>"ستظهر التجارب وعمليات تشغيلها هنا. اطلب من الوكيل إعداد تجربة للبدء.",AMe=()=>"Los experimentos y sus ejecuciones aparecerán aquí. Pídele al agente que configure un experimento para empezar.",RMe=()=>"प्रयोग और उनके रन यहाँ दिखेंगे। शुरू करने के लिए एजेंट से एक प्रयोग सेट अप करने को कहें।",MMe=((e={},n={})=>{const t=n.locale??z();return t==="zh-CN"?zMe():t==="fa"?jMe():t==="ar"?TMe():t==="es"?AMe():t==="hi"?RMe():NMe()}),OMe=()=>"No runs yet",DMe=()=>"还没有运行",LMe=()=>"هنوز اجرایی وجود ندارد",IMe=()=>"لا عمليات تشغيل بعد",$Me=()=>"Aún no hay ejecuciones",BMe=()=>"अभी तक कोई रन नहीं",PMe=((e={},n={})=>{const t=n.locale??z();return t==="zh-CN"?DMe():t==="fa"?LMe():t==="ar"?IMe():t==="es"?$Me():t==="hi"?BMe():OMe()}),FMe=()=>"No experiments yet.",HMe=()=>"还没有实验。",qMe=()=>"هنوز آزمایشی وجود ندارد.",UMe=()=>"لا توجد تجارب بعد.",GMe=()=>"Aún no hay experimentos.",VMe=()=>"अभी तक कोई प्रयोग नहीं।",KMe=((e={},n={})=>{const t=n.locale??z();return t==="zh-CN"?HMe():t==="fa"?qMe():t==="ar"?UMe():t==="es"?GMe():t==="hi"?VMe():FMe()}),WMe=()=>"Not run yet",QMe=()=>"尚未运行",XMe=()=>"هنوز اجرا نشده",YMe=()=>"لم تُشغَّل بعد",ZMe=()=>"Aún sin ejecutar",JMe=()=>"अभी तक नहीं चलाया गया",eOe=((e={},n={})=>{const t=n.locale??z();return t==="zh-CN"?QMe():t==="fa"?XMe():t==="ar"?YMe():t==="es"?ZMe():t==="hi"?JMe():WMe()}),tOe=()=>"1 run",nOe=()=>"1 次运行",rOe=()=>"۱ اجرا",sOe=()=>"تشغيل واحد",iOe=()=>"1 ejecución",aOe=()=>"1 रन",oOe=((e={},n={})=>{const t=n.locale??z();return t==="zh-CN"?nOe():t==="fa"?rOe():t==="ar"?sOe():t==="es"?iOe():t==="hi"?aOe():tOe()}),lOe=()=>"Open logs",cOe=()=>"打开日志",uOe=()=>"باز کردن گزارش‌ها",_Oe=()=>"فتح السجلات",fOe=()=>"Abrir logs",dOe=()=>"लॉग खोलें",hOe=((e={},n={})=>{const t=n.locale??z();return t==="zh-CN"?cOe():t==="fa"?uOe():t==="ar"?_Oe():t==="es"?fOe():t==="hi"?dOe():lOe()}),pOe=e=>`${e==null?void 0:e.count} runs`,mOe=e=>`${e==null?void 0:e.count} 次运行`,gOe=e=>`${e==null?void 0:e.count} اجرا`,vOe=e=>`عمليات التشغيل: ${e==null?void 0:e.count}`,bOe=e=>`${e==null?void 0:e.count} ejecuciones`,yOe=e=>`${e==null?void 0:e.count} रन`,xOe=((e,n={})=>{const t=n.locale??z();return t==="zh-CN"?mOe(e):t==="fa"?gOe(e):t==="ar"?vOe(e):t==="es"?bOe(e):t==="hi"?yOe(e):pOe(e)}),wOe=()=>"Stop requested",kOe=()=>"已请求停止",SOe=()=>"درخواست توقف ثبت شد",COe=()=>"طُلب الإيقاف",EOe=()=>"Detención solicitada",NOe=()=>"रोकने का अनुरोध किया गया",zOe=((e={},n={})=>{const t=n.locale??z();return t==="zh-CN"?kOe():t==="fa"?SOe():t==="ar"?COe():t==="es"?EOe():t==="hi"?NOe():wOe()}),jOe=()=>"Stop run",TOe=()=>"停止运行",AOe=()=>"توقف اجرا",ROe=()=>"إيقاف التشغيل",MOe=()=>"Detener ejecución",OOe=()=>"रन रोकें",DOe=((e={},n={})=>{const t=n.locale??z();return t==="zh-CN"?TOe():t==="fa"?AOe():t==="ar"?ROe():t==="es"?MOe():t==="hi"?OOe():jOe()}),LOe=()=>"Code",IOe=()=>"代码",$Oe=()=>"کد",BOe=()=>"الشيفرة",POe=()=>"Código",FOe=()=>"कोड",HOe=((e={},n={})=>{const t=n.locale??z();return t==="zh-CN"?IOe():t==="fa"?$Oe():t==="ar"?BOe():t==="es"?POe():t==="hi"?FOe():LOe()}),qOe=()=>"Experiments",UOe=()=>"实验",GOe=()=>"آزمایش‌ها",VOe=()=>"التجارب",KOe=()=>"Experimentos",WOe=()=>"प्रयोग",QOe=((e={},n={})=>{const t=n.locale??z();return t==="zh-CN"?UOe():t==="fa"?GOe():t==="ar"?VOe():t==="es"?KOe():t==="hi"?WOe():qOe()}),XOe=()=>"Logs",YOe=()=>"日志",ZOe=()=>"گزارش‌ها",JOe=()=>"السجلات",eDe=()=>"Logs",tDe=()=>"लॉग",Z4=((e={},n={})=>{const t=n.locale??z();return t==="zh-CN"?YOe():t==="fa"?ZOe():t==="ar"?JOe():t==="es"?eDe():t==="hi"?tDe():XOe()}),nDe=()=>"Stop failed:",rDe=()=>"停止失败:",sDe=()=>"توقف ناموفق بود:",iDe=()=>"فشل الإيقاف:",aDe=()=>"Error al detener:",oDe=()=>"रोकना विफल:",lDe=((e={},n={})=>{const t=n.locale??z();return t==="zh-CN"?rDe():t==="fa"?sDe():t==="ar"?iDe():t==="es"?aDe():t==="hi"?oDe():nDe()}),cDe=()=>"Clipboard access is unavailable.",uDe=()=>"无法访问剪贴板。",_De=()=>"دسترسی به کلیپ‌بورد در دسترس نیست.",fDe=()=>"الوصول إلى الحافظة غير متاح.",dDe=()=>"El acceso al portapapeles no está disponible.",hDe=()=>"क्लिपबोर्ड एक्सेस उपलब्ध नहीं है।",pD=((e={},n={})=>{const t=n.locale??z();return t==="zh-CN"?uDe():t==="fa"?_De():t==="ar"?fDe():t==="es"?dDe():t==="hi"?hDe():cDe()}),pDe=e=>`Delete “${e==null?void 0:e.path}”? This cannot be undone.`,mDe=e=>`删除“${e==null?void 0:e.path}”?此操作无法撤销。`,gDe=e=>`«${e==null?void 0:e.path}» حذف شود؟ این کار قابل بازگشت نیست.`,vDe=e=>`حذف «${e==null?void 0:e.path}»؟ لا يمكن التراجع عن هذا الإجراء.`,bDe=e=>`¿Eliminar “${e==null?void 0:e.path}”? Esta acción no se puede deshacer.`,yDe=e=>`“${e==null?void 0:e.path}” हटाएं? इसे वापस नहीं लाया जा सकता।`,xDe=((e,n={})=>{const t=n.locale??z();return t==="zh-CN"?mDe(e):t==="fa"?gDe(e):t==="ar"?vDe(e):t==="es"?bDe(e):t==="hi"?yDe(e):pDe(e)}),wDe=()=>"Duplicate",kDe=()=>"创建副本",SDe=()=>"ایجاد نسخهٔ تکراری",CDe=()=>"تكرار",EDe=()=>"Duplicar",NDe=()=>"डुप्लिकेट करें",zDe=((e={},n={})=>{const t=n.locale??z();return t==="zh-CN"?kDe():t==="fa"?SDe():t==="ar"?CDe():t==="es"?EDe():t==="hi"?NDe():wDe()}),jDe=e=>`File actions for ${e==null?void 0:e.path}`,TDe=e=>`${e==null?void 0:e.path} 的文件操作`,ADe=e=>`عملیات فایل برای ${e==null?void 0:e.path}`,RDe=e=>`إجراءات الملف لـ ${e==null?void 0:e.path}`,MDe=e=>`Acciones de archivo para ${e==null?void 0:e.path}`,ODe=e=>`${e==null?void 0:e.path} के लिए फ़ाइल क्रियाएं`,DDe=((e,n={})=>{const t=n.locale??z();return t==="zh-CN"?TDe(e):t==="fa"?ADe(e):t==="ar"?RDe(e):t==="es"?MDe(e):t==="hi"?ODe(e):jDe(e)}),LDe=()=>"Open",IDe=()=>"打开",$De=()=>"باز کردن",BDe=()=>"فتح",PDe=()=>"Abrir",FDe=()=>"खोलें",HDe=((e={},n={})=>{const t=n.locale??z();return t==="zh-CN"?IDe():t==="fa"?$De():t==="ar"?BDe():t==="es"?PDe():t==="hi"?FDe():LDe()}),qDe=e=>`Rename ${e==null?void 0:e.path}`,UDe=e=>`重命名 ${e==null?void 0:e.path}`,GDe=e=>`تغییر نام ${e==null?void 0:e.path}`,VDe=e=>`إعادة تسمية ${e==null?void 0:e.path}`,KDe=e=>`Renombrar ${e==null?void 0:e.path}`,WDe=e=>`${e==null?void 0:e.path} का नाम बदलें`,QDe=((e,n={})=>{const t=n.locale??z();return t==="zh-CN"?UDe(e):t==="fa"?GDe(e):t==="ar"?VDe(e):t==="es"?KDe(e):t==="hi"?WDe(e):qDe(e)}),XDe=e=>`Not in the ${e==null?void 0:e.root} — showing the copy from the project’s artifacts.`,YDe=e=>`${e==null?void 0:e.root} 中没有该文件——当前显示项目产物中的副本。`,ZDe=e=>`فایل در ${e==null?void 0:e.root} نیست — نسخهٔ موجود در خروجی‌های پروژه نمایش داده می‌شود.`,JDe=e=>`ليس في ${e==null?void 0:e.root} — عرض النسخة من مُخرَجات المشروع.`,eLe=e=>`No está en ${e==null?void 0:e.root} — se muestra la copia de los artefactos del proyecto.`,tLe=e=>`${e==null?void 0:e.root} में नहीं — प्रोजेक्ट के आर्टिफ़ैक्ट से कॉपी दिखाई जा रही है।`,nLe=((e,n={})=>{const t=n.locale??z();return t==="zh-CN"?YDe(e):t==="fa"?ZDe(e):t==="ar"?JDe(e):t==="es"?eLe(e):t==="hi"?tLe(e):XDe(e)}),rLe=()=>"Binary file — no inline preview.",sLe=()=>"二进制文件——无法内嵌预览。",iLe=()=>"فایل دودویی است — پیش‌نمایش درون‌خطی ندارد.",aLe=()=>"ملف ثنائي — لا توجد معاينة مضمّنة.",oLe=()=>"Archivo binario — sin vista previa.",lLe=()=>"बाइनरी फ़ाइल — इनलाइन प्रीव्यू नहीं है।",cLe=((e={},n={})=>{const t=n.locale??z();return t==="zh-CN"?sLe():t==="fa"?iLe():t==="ar"?aLe():t==="es"?oLe():t==="hi"?lLe():rLe()}),uLe=()=>"This file changed on disk. Your edits have not been overwritten.",_Le=()=>"此文件已在磁盘上更改。您的编辑未被覆盖。",fLe=()=>"این فایل روی دیسک تغییر کرده است. ویرایش‌های شما جایگزین نشده‌اند.",dLe=()=>"تغيّر هذا الملف على القرص. لم تُستبدل تعديلاتك.",hLe=()=>"Este archivo cambió en disco. Tus cambios no se han sobrescrito.",pLe=()=>"यह फ़ाइल डिस्क पर बदल गई है। आपके बदलाव अधिलेखित नहीं हुए हैं।",mN=((e={},n={})=>{const t=n.locale??z();return t==="zh-CN"?_Le():t==="fa"?fLe():t==="ar"?dLe():t==="es"?hLe():t==="hi"?pLe():uLe()}),mLe=()=>"Compile failed",gLe=()=>"编译失败",vLe=()=>"کامپایل ناموفق بود",bLe=()=>"فشل التجميع",yLe=()=>"Error al compilar",xLe=()=>"कंपाइल विफल",wLe=((e={},n={})=>{const t=n.locale??z();return t==="zh-CN"?gLe():t==="fa"?vLe():t==="ar"?bLe():t==="es"?yLe():t==="hi"?xLe():mLe()}),kLe=()=>"Compile PDF",SLe=()=>"编译 PDF",CLe=()=>"کامپایل PDF",ELe=()=>"تجميع PDF",NLe=()=>"Compilar PDF",zLe=()=>"PDF कंपाइल करें",gN=((e={},n={})=>{const t=n.locale??z();return t==="zh-CN"?SLe():t==="fa"?CLe():t==="ar"?ELe():t==="es"?NLe():t==="hi"?zLe():kLe()}),jLe=()=>"Compiled, but the engine reported errors — check the output below.",TLe=()=>"编译已完成,但引擎报告了错误 — 请查看下方输出。",ALe=()=>"کامپایل انجام شد، اما موتور خطا گزارش کرد — خروجی پایین را بررسی کنید.",RLe=()=>"اكتمل التجميع، لكن المحرك أبلغ عن أخطاء — راجع المُخرَجات أدناه.",MLe=()=>"Compilado, pero el motor informó de errores — revisa la salida de abajo.",OLe=()=>"कंपाइल हुआ, पर इंजन ने त्रुटियाँ बताईं — नीचे आउटपुट जाँचें।",DLe=((e={},n={})=>{const t=n.locale??z();return t==="zh-CN"?TLe():t==="fa"?ALe():t==="ar"?RLe():t==="es"?MLe():t==="hi"?OLe():jLe()}),LLe=()=>"Copy command",ILe=()=>"复制命令",$Le=()=>"کپی فرمان",BLe=()=>"نسخ الأمر",PLe=()=>"Copiar comando",FLe=()=>"कमांड कॉपी करें",HLe=((e={},n={})=>{const t=n.locale??z();return t==="zh-CN"?ILe():t==="fa"?$Le():t==="ar"?BLe():t==="es"?PLe():t==="hi"?FLe():LLe()}),qLe=()=>"Copy install command",ULe=()=>"复制安装命令",GLe=()=>"کپی فرمان نصب",VLe=()=>"نسخ أمر التثبيت",KLe=()=>"Copiar comando de instalación",WLe=()=>"इंस्टॉल कमांड कॉपी करें",QLe=((e={},n={})=>{const t=n.locale??z();return t==="zh-CN"?ULe():t==="fa"?GLe():t==="ar"?VLe():t==="es"?KLe():t==="hi"?WLe():qLe()}),XLe=()=>"This file was deleted on disk. Your edits have not been discarded.",YLe=()=>"此文件已从磁盘删除。您的编辑未被丢弃。",ZLe=()=>"این فایل از روی دیسک حذف شده است. ویرایش‌های شما حذف نشده‌اند.",JLe=()=>"حُذف هذا الملف من القرص. لم تُتجاهل تعديلاتك.",eIe=()=>"Este archivo se eliminó del disco. Tus cambios no se han descartado.",tIe=()=>"यह फ़ाइल डिस्क से हटा दी गई थी। आपके बदलाव मिटाए नहीं गए हैं।",vN=((e={},n={})=>{const t=n.locale??z();return t==="zh-CN"?YLe():t==="fa"?ZLe():t==="ar"?JLe():t==="es"?eIe():t==="hi"?tIe():XLe()}),nIe=()=>"Discard my edits and reload",rIe=()=>"放弃我的编辑并重新加载",sIe=()=>"نادیده گرفتن ویرایش‌های من و بارگیری دوباره",iIe=()=>"تجاهل تعديلاتي وإعادة التحميل",aIe=()=>"Descartar mis cambios y recargar",oIe=()=>"मेरे बदलाव छोड़ें और फिर से लोड करें",lIe=((e={},n={})=>{const t=n.locale??z();return t==="zh-CN"?rIe():t==="fa"?sIe():t==="ar"?iIe():t==="es"?aIe():t==="hi"?oIe():nIe()}),cIe=()=>"Discard unsaved changes and close this file?",uIe=()=>"要丢弃未保存的更改并关闭此文件吗?",_Ie=()=>"تغییرات ذخیره‌نشده حذف و فایل بسته شود؟",fIe=()=>"تجاهل التغييرات غير المحفوظة وإغلاق هذا الملف؟",dIe=()=>"¿Descartar los cambios sin guardar y cerrar este archivo?",hIe=()=>"सेव न किए गए बदलाव छोड़ें और यह फ़ाइल बंद करें?",bN=((e={},n={})=>{const t=n.locale??z();return t==="zh-CN"?uIe():t==="fa"?_Ie():t==="ar"?fIe():t==="es"?dIe():t==="hi"?hIe():cIe()}),pIe=()=>"Dismiss",mIe=()=>"关闭",gIe=()=>"بستن",vIe=()=>"تجاهل",bIe=()=>"Cerrar",yIe=()=>"खारिज करें",xIe=((e={},n={})=>{const t=n.locale??z();return t==="zh-CN"?mIe():t==="fa"?gIe():t==="ar"?vIe():t==="es"?bIe():t==="hi"?yIe():pIe()}),wIe=()=>"Dismiss compile message",kIe=()=>"关闭编译消息",SIe=()=>"بستن پیام کامپایل",CIe=()=>"تجاهل رسالة التجميع",EIe=()=>"Cerrar mensaje de compilación",NIe=()=>"कंपाइल संदेश खारिज करें",zIe=((e={},n={})=>{const t=n.locale??z();return t==="zh-CN"?kIe():t==="fa"?SIe():t==="ar"?CIe():t==="es"?EIe():t==="hi"?NIe():wIe()}),jIe=()=>"Dismiss Overleaf message",TIe=()=>"关闭 Overleaf 消息",AIe=()=>"بستن پیام Overleaf",RIe=()=>"تجاهل رسالة Overleaf",MIe=()=>"Cerrar mensaje de Overleaf",OIe=()=>"Overleaf संदेश खारिज करें",DIe=((e={},n={})=>{const t=n.locale??z();return t==="zh-CN"?TIe():t==="fa"?AIe():t==="ar"?RIe():t==="es"?MIe():t==="hi"?OIe():jIe()}),LIe=()=>"Download",IIe=()=>"下载",$Ie=()=>"بارگیری",BIe=()=>"تنزيل",PIe=()=>"Descargar",FIe=()=>"डाउनलोड करें",mD=((e={},n={})=>{const t=n.locale??z();return t==="zh-CN"?IIe():t==="fa"?$Ie():t==="ar"?BIe():t==="es"?PIe():t==="hi"?FIe():LIe()}),HIe=e=>`Download ${e==null?void 0:e.name} (out of date — recompile first)`,qIe=e=>`下载 ${e==null?void 0:e.name}(版本过旧 — 请先重新编译)`,UIe=e=>`دانلود ${e==null?void 0:e.name} (قدیمی است — ابتدا دوباره کامپایل کنید)`,GIe=e=>`تنزيل ${e==null?void 0:e.name} (غير محدَّث — أعِد التجميع أولًا)`,VIe=e=>`Descargar ${e==null?void 0:e.name} (desactualizado — vuelve a compilar antes)`,KIe=e=>`${e==null?void 0:e.name} डाउनलोड करें (पुरानी — पहले फिर से कंपाइल करें)`,WIe=((e,n={})=>{const t=n.locale??z();return t==="zh-CN"?qIe(e):t==="fa"?UIe(e):t==="ar"?GIe(e):t==="es"?VIe(e):t==="hi"?KIe(e):HIe(e)}),QIe=()=>"Failed to load file:",XIe=()=>"加载文件失败:",YIe=()=>"بارگیری فایل ناموفق بود:",ZIe=()=>"تعذّر تحميل الملف:",JIe=()=>"Error al cargar el archivo:",e$e=()=>"फ़ाइल लोड नहीं हो सकी:",yN=((e={},n={})=>{const t=n.locale??z();return t==="zh-CN"?XIe():t==="fa"?YIe():t==="ar"?ZIe():t==="es"?JIe():t==="hi"?e$e():QIe()}),t$e=()=>"File truncated — showing the first 512 KB.",n$e=()=>"文件已截断——仅显示前 512 KB。",r$e=()=>"فایل کوتاه شده است — فقط ۵۱۲ کیلوبایت نخست نمایش داده می‌شود.",s$e=()=>"تم اقتطاع الملف — عرض أول 512 كيلوبايت.",i$e=()=>"Archivo truncado — se muestran los primeros 512 KB.",a$e=()=>"फ़ाइल छोटी की गई — पहले 512 KB दिखाए जा रहे हैं।",o$e=((e={},n={})=>{const t=n.locale??z();return t==="zh-CN"?n$e():t==="fa"?r$e():t==="ar"?s$e():t==="es"?i$e():t==="hi"?a$e():t$e()}),l$e=()=>"The page below stops partway — the full file could not be loaded.",c$e=()=>"下方页面在中途结束——无法加载完整文件。",u$e=()=>"صفحهٔ زیر در میانه متوقف می‌شود — فایل کامل بارگیری نشد.",_$e=()=>"عرض الصفحة أدناه غير مكتمل — تعذّر تحميل الملف كاملًا.",f$e=()=>"La página se corta a mitad — no se pudo cargar el archivo completo.",d$e=()=>"नीचे का पेज बीच में रुक जाता है — पूरी फ़ाइल लोड नहीं हो सकी।",h$e=((e={},n={})=>{const t=n.locale??z();return t==="zh-CN"?c$e():t==="fa"?u$e():t==="ar"?_$e():t==="es"?f$e():t==="hi"?d$e():l$e()}),p$e=e=>`Rendered HTML: ${e==null?void 0:e.name}`,m$e=e=>`已渲染的 HTML:${e==null?void 0:e.name}`,g$e=e=>`HTML رندرشده: ${e==null?void 0:e.name}`,v$e=e=>`HTML المعروض: ${e==null?void 0:e.name}`,b$e=e=>`HTML renderizado: ${e==null?void 0:e.name}`,y$e=e=>`रेंडर किया गया HTML: ${e==null?void 0:e.name}`,x$e=((e,n={})=>{const t=n.locale??z();return t==="zh-CN"?m$e(e):t==="fa"?g$e(e):t==="ar"?v$e(e):t==="es"?b$e(e):t==="hi"?y$e(e):p$e(e)}),w$e=()=>"Loading…",k$e=()=>"正在加载…",S$e=()=>"در حال بارگیری…",C$e=()=>"جارٍ التحميل…",E$e=()=>"Cargando…",N$e=()=>"लोड हो रहा है…",gD=((e={},n={})=>{const t=n.locale??z();return t==="zh-CN"?k$e():t==="fa"?S$e():t==="ar"?C$e():t==="es"?E$e():t==="hi"?N$e():w$e()}),z$e=()=>"File not found.",j$e=()=>"找不到文件。",T$e=()=>"فایل پیدا نشد.",A$e=()=>"لم يُعثر على الملف.",R$e=()=>"No se encontró el archivo.",M$e=()=>"फ़ाइल नहीं मिली।",O$e=((e={},n={})=>{const t=n.locale??z();return t==="zh-CN"?j$e():t==="fa"?T$e():t==="ar"?A$e():t==="es"?R$e():t==="hi"?M$e():z$e()}),D$e=e=>`File not found in the project’s artifacts or the ${e==null?void 0:e.root}.`,L$e=e=>`在项目产物或${e==null?void 0:e.root}中找不到此文件。`,I$e=e=>`فایل در خروجی‌های پروژه یا ${e==null?void 0:e.root} پیدا نشد.`,$$e=e=>`لم يُعثر على الملف في مُخرَجات المشروع أو في ${e==null?void 0:e.root}.`,B$e=e=>`No se encontró el archivo en los artefactos del proyecto ni en ${e==null?void 0:e.root}.`,P$e=e=>`फ़ाइल प्रोजेक्ट के आर्टिफ़ैक्ट या ${e==null?void 0:e.root} में नहीं मिली।`,F$e=((e,n={})=>{const t=n.locale??z();return t==="zh-CN"?L$e(e):t==="fa"?I$e(e):t==="ar"?$$e(e):t==="es"?B$e(e):t==="hi"?P$e(e):D$e(e)}),H$e=e=>`File not found on branch ${e==null?void 0:e.branch}.`,q$e=e=>`在分支 ${e==null?void 0:e.branch} 上找不到此文件。`,U$e=e=>`فایل در شاخهٔ ${e==null?void 0:e.branch} پیدا نشد.`,G$e=e=>`لم يُعثر على الملف في الفرع ${e==null?void 0:e.branch}.`,V$e=e=>`No se encontró el archivo en la rama ${e==null?void 0:e.branch}.`,K$e=e=>`फ़ाइल ${e==null?void 0:e.branch} ब्रांच पर नहीं मिली।`,W$e=((e,n={})=>{const t=n.locale??z();return t==="zh-CN"?q$e(e):t==="fa"?U$e(e):t==="ar"?G$e(e):t==="es"?V$e(e):t==="hi"?K$e(e):H$e(e)}),Q$e=()=>"File not found on disk.",X$e=()=>"磁盘上找不到此文件。",Y$e=()=>"فایل روی دیسک پیدا نشد.",Z$e=()=>"لم يُعثر على الملف على القرص.",J$e=()=>"No se encontró el archivo en disco.",eBe=()=>"फ़ाइल डिस्क पर नहीं मिली।",tBe=((e={},n={})=>{const t=n.locale??z();return t==="zh-CN"?X$e():t==="fa"?Y$e():t==="ar"?Z$e():t==="es"?J$e():t==="hi"?eBe():Q$e()}),nBe=e=>`File not found in the ${e==null?void 0:e.root} or the project’s artifacts.`,rBe=e=>`在${e==null?void 0:e.root}或项目产物中找不到此文件。`,sBe=e=>`فایل در ${e==null?void 0:e.root} یا خروجی‌های پروژه پیدا نشد.`,iBe=e=>`لم يُعثر على الملف في ${e==null?void 0:e.root} ولا في مُخرَجات المشروع.`,aBe=e=>`No se encontró el archivo en ${e==null?void 0:e.root} ni en los artefactos del proyecto.`,oBe=e=>`फ़ाइल ${e==null?void 0:e.root} या प्रोजेक्ट के आर्टिफ़ैक्ट में नहीं मिली।`,lBe=((e,n={})=>{const t=n.locale??z();return t==="zh-CN"?rBe(e):t==="fa"?sBe(e):t==="ar"?iBe(e):t==="es"?aBe(e):t==="hi"?oBe(e):nBe(e)}),cBe=e=>`Not in the project’s artifacts — showing the copy from the ${e==null?void 0:e.root}.`,uBe=e=>`项目产物中没有此文件 — 正在显示${e==null?void 0:e.root}中的副本。`,_Be=e=>`در خروجی‌های پروژه نیست — نسخهٔ موجود در ${e==null?void 0:e.root} نمایش داده می‌شود.`,fBe=e=>`ليس في مُخرَجات المشروع — عرض النسخة من ${e==null?void 0:e.root}.`,dBe=e=>`No está en los artefactos del proyecto — se muestra la copia que hay en ${e==null?void 0:e.root}.`,hBe=e=>`प्रोजेक्ट के आर्टिफ़ैक्ट में नहीं — ${e==null?void 0:e.root} से कॉपी दिखाई जा रही है।`,pBe=((e,n={})=>{const t=n.locale??z();return t==="zh-CN"?uBe(e):t==="fa"?_Be(e):t==="ar"?fBe(e):t==="es"?dBe(e):t==="hi"?hBe(e):cBe(e)}),mBe=()=>"Open in default editor",gBe=()=>"在默认编辑器中打开",vBe=()=>"باز کردن در ویرایشگر پیش‌فرض",bBe=()=>"فتح في المحرر الافتراضي",yBe=()=>"Abrir en el editor predeterminado",xBe=()=>"डिफ़ॉल्ट एडिटर में खोलें",xN=((e={},n={})=>{const t=n.locale??z();return t==="zh-CN"?gBe():t==="fa"?vBe():t==="ar"?bBe():t==="es"?yBe():t==="hi"?xBe():mBe()}),wBe=()=>"Overleaf's copy of this file was pulled while you had unsaved edits, so what you see is no longer what is on disk. Saving now sends this draft to Overleaf instead.",kBe=()=>"你有未保存的编辑时,Overleaf 上的文件副本被拉取,因此当前内容已与磁盘不同。现在保存会将此草稿发送到 Overleaf。",SBe=()=>"هنگامی که ویرایش‌های ذخیره‌نشده داشتید، نسخهٔ Overleaf این فایل دریافت شد؛ بنابراین آنچه می‌بینید دیگر با فایل روی دیسک یکی نیست. ذخیره‌سازی اکنون این پیش‌نویس را به Overleaf می‌فرستد.",CBe=()=>"تم سحب نسخة Overleaf من هذا الملف بينما كانت لديك تعديلات غير محفوظة، لذا ما تراه لم يعد مطابقًا لما هو على القرص. الحفظ الآن يرسل هذه المسودة إلى Overleaf بدلًا من ذلك.",EBe=()=>"Se descargó la copia de Overleaf de este archivo mientras tenías cambios sin guardar, así que lo que ves ya no coincide con lo que hay en disco. Si guardas ahora, este borrador se enviará a Overleaf.",NBe=()=>"इस फ़ाइल की Overleaf कॉपी तब खींची गई जब आपके पास सेव न किए गए बदलाव थे, इसलिए जो आप देख रहे हैं वह अब डिस्क पर मौजूद चीज़ नहीं है। अभी सेव करने पर यह ड्राफ़्ट सीधे Overleaf को भेज दिया जाएगा।",zBe=((e={},n={})=>{const t=n.locale??z();return t==="zh-CN"?kBe():t==="fa"?SBe():t==="ar"?CBe():t==="es"?EBe():t==="hi"?NBe():wBe()}),jBe=()=>"Overwrite disk file",TBe=()=>"覆盖磁盘文件",ABe=()=>"بازنویسی فایل روی دیسک",RBe=()=>"استبدال الملف على القرص",MBe=()=>"Sobrescribir el archivo en disco",OBe=()=>"डिस्क फ़ाइल अधिलेखित करें",DBe=((e={},n={})=>{const t=n.locale??z();return t==="zh-CN"?TBe():t==="fa"?ABe():t==="ar"?RBe():t==="es"?MBe():t==="hi"?OBe():jBe()}),LBe=()=>"Compiled PDF is out of date",IBe=()=>"已编译的 PDF 不是最新版本",$Be=()=>"PDF کامپایل‌شده به‌روز نیست",BBe=()=>"ملف PDF المُجمَّع غير محدَّث",PBe=()=>"El PDF compilado está desactualizado",FBe=()=>"कंपाइल की गई PDF पुरानी है",HBe=((e={},n={})=>{const t=n.locale??z();return t==="zh-CN"?IBe():t==="fa"?$Be():t==="ar"?BBe():t==="es"?PBe():t==="hi"?FBe():LBe()}),qBe=()=>"project clone",UBe=()=>"项目克隆",GBe=()=>"کلون پروژه",VBe=()=>"نسخة المشروع المستنسخة",KBe=()=>"el clon del proyecto",WBe=()=>"प्रोजेक्ट क्लोन",Hg=((e={},n={})=>{const t=n.locale??z();return t==="zh-CN"?UBe():t==="fa"?GBe():t==="ar"?VBe():t==="es"?KBe():t==="hi"?WBe():qBe()}),QBe=()=>"Recompile PDF",XBe=()=>"重新编译 PDF",YBe=()=>"کامپایل دوبارهٔ PDF",ZBe=()=>"إعادة تجميع PDF",JBe=()=>"Volver a compilar el PDF",ePe=()=>"PDF फिर से कंपाइल करें",wN=((e={},n={})=>{const t=n.locale??z();return t==="zh-CN"?XBe():t==="fa"?YBe():t==="ar"?ZBe():t==="es"?JBe():t==="hi"?ePe():QBe()}),tPe=()=>"Reload from disk",nPe=()=>"从磁盘重新加载",rPe=()=>"بارگذاری مجدد از دیسک",sPe=()=>"إعادة التحميل من القرص",iPe=()=>"Recargar desde el disco",aPe=()=>"डिस्क से फिर से लोड करें",oPe=((e={},n={})=>{const t=n.locale??z();return t==="zh-CN"?nPe():t==="fa"?rPe():t==="ar"?sPe():t==="es"?iPe():t==="hi"?aPe():tPe()}),lPe=()=>"Save failed",cPe=()=>"保存失败",uPe=()=>"ذخیره ناموفق بود",_Pe=()=>"فشل الحفظ",fPe=()=>"Error al guardar",dPe=()=>"सेव विफल",hPe=((e={},n={})=>{const t=n.locale??z();return t==="zh-CN"?cPe():t==="fa"?uPe():t==="ar"?_Pe():t==="es"?fPe():t==="hi"?dPe():lPe()}),pPe=()=>"Saving…",mPe=()=>"正在保存…",gPe=()=>"در حال ذخیره…",vPe=()=>"جارٍ الحفظ…",bPe=()=>"Guardando…",yPe=()=>"सेव हो रहा है…",xPe=((e={},n={})=>{const t=n.locale??z();return t==="zh-CN"?mPe():t==="fa"?gPe():t==="ar"?vPe():t==="es"?bPe():t==="hi"?yPe():pPe()}),wPe=()=>"Selected — press ⌘C",kPe=()=>"已选中 — 按 ⌘C 复制",SPe=()=>"انتخاب شد — برای کپی ⌘C را بزنید",CPe=()=>"محدد — اضغط ⌘C",EPe=()=>"Seleccionado — pulsa ⌘C",NPe=()=>"चयनित — ⌘C दबाएं",zPe=((e={},n={})=>{const t=n.locale??z();return t==="zh-CN"?kPe():t==="fa"?SPe():t==="ar"?CPe():t==="es"?EPe():t==="hi"?NPe():wPe()}),jPe=()=>"session’s worktree",TPe=()=>"会话工作树",APe=()=>"درخت کاری نشست",RPe=()=>"شجرة عمل الجلسة",MPe=()=>"el árbol de trabajo de la sesión",OPe=()=>"सेशन की वर्कट्री",qg=((e={},n={})=>{const t=n.locale??z();return t==="zh-CN"?TPe():t==="fa"?APe():t==="ar"?RPe():t==="es"?MPe():t==="hi"?OPe():jPe()}),DPe=()=>"Show compiled PDF",LPe=()=>"显示已编译的 PDF",IPe=()=>"نمایش PDF کامپایل‌شده",$Pe=()=>"عرض ملف PDF المُجمَّع",BPe=()=>"Mostrar el PDF compilado",PPe=()=>"कंपाइल की गई PDF दिखाएं",kN=((e={},n={})=>{const t=n.locale??z();return t==="zh-CN"?LPe():t==="fa"?IPe():t==="ar"?$Pe():t==="es"?BPe():t==="hi"?PPe():DPe()}),FPe=()=>"This PDF was compiled from an earlier version of the source — recompile to update it.",HPe=()=>"此 PDF 由较早版本的源文件编译而成——请重新编译以更新。",qPe=()=>"این PDF از نسخه‌ای قدیمی‌تر از منبع ساخته شده است — برای به‌روزرسانی دوباره کامپایل کنید.",UPe=()=>"أُنشئ ملف PDF هذا من نسخة أقدم من المصدر — أعِد تجميعه لتحديثه.",GPe=()=>"Este PDF se compiló a partir de una versión anterior del código fuente — vuelve a compilar para actualizarlo.",VPe=()=>"यह PDF सोर्स के पुराने वर्शन से कंपाइल हुआ था — अपडेट करने के लिए फिर से कंपाइल करें।",KPe=((e={},n={})=>{const t=n.locale??z();return t==="zh-CN"?HPe():t==="fa"?qPe():t==="ar"?UPe():t==="es"?GPe():t==="hi"?VPe():FPe()}),WPe=()=>"This session's worktree isn't available — showing the project clone's copy.",QPe=()=>"此会话的工作树不可用——当前显示项目克隆中的副本。",XPe=()=>"درخت کاری این نشست در دسترس نیست — نسخهٔ کلون پروژه نمایش داده می‌شود.",YPe=()=>"شجرة عمل هذه الجلسة غير متاحة — عرض الملف من نسخة المشروع المستنسخة.",ZPe=()=>"El árbol de trabajo de esta sesión no está disponible — se muestra la copia del clon del proyecto.",JPe=()=>"इस सेशन की वर्कट्री उपलब्ध नहीं है — प्रोजेक्ट क्लोन की कॉपी दिखाई जा रही है।",eFe=((e={},n={})=>{const t=n.locale??z();return t==="zh-CN"?QPe():t==="fa"?XPe():t==="ar"?YPe():t==="es"?ZPe():t==="hi"?JPe():WPe()}),tFe=()=>"Unsaved",nFe=()=>"未保存",rFe=()=>"ذخیره نشده",sFe=()=>"غير محفوظ",iFe=()=>"Sin guardar",aFe=()=>"सेव नहीं हुआ",vD=((e={},n={})=>{const t=n.locale??z();return t==="zh-CN"?nFe():t==="fa"?rFe():t==="ar"?sFe():t==="es"?iFe():t==="hi"?aFe():tFe()}),oFe=()=>"Unsaved — ⌘S to save",lFe=()=>"未保存 — 按 ⌘S 保存",cFe=()=>"ذخیره نشده — برای ذخیره ⌘S را بزنید",uFe=()=>"غير محفوظ — ⌘S للحفظ",_Fe=()=>"Sin guardar — ⌘S para guardar",fFe=()=>"सेव नहीं हुआ — सेव करने के लिए ⌘S दबाएं",dFe=((e={},n={})=>{const t=n.locale??z();return t==="zh-CN"?lFe():t==="fa"?cFe():t==="ar"?uFe():t==="es"?_Fe():t==="hi"?fFe():oFe()}),hFe=()=>"Update orx on the remote machine to edit this file safely.",pFe=()=>"请更新远程计算机上的 orx,以安全编辑此文件。",mFe=()=>"برای ویرایش ایمن این فایل، orx را روی دستگاه ریموت به‌روز کنید.",gFe=()=>"حدّث orx على الجهاز البعيد لتعديل هذا الملف بأمان.",vFe=()=>"Actualiza orx en la máquina remota para editar este archivo de forma segura.",bFe=()=>"इस फ़ाइल को सुरक्षित रूप से संपादित करने के लिए रिमोट मशीन पर orx अपडेट करें।",yFe=((e={},n={})=>{const t=n.locale??z();return t==="zh-CN"?pFe():t==="fa"?mFe():t==="ar"?gFe():t==="es"?vFe():t==="hi"?bFe():hFe()}),xFe=()=>"This session’s worktree isn’t available, and the file isn’t in the project clone or its artifacts.",wFe=()=>"此会话的工作树不可用,项目克隆和产物中也没有此文件。",kFe=()=>"درخت کاری این نشست در دسترس نیست و فایل در نسخهٔ محلی پروژه یا خروجی‌های آن هم پیدا نشد.",SFe=()=>"شجرة عمل هذه الجلسة غير متاحة، والملف ليس في نسخة المشروع المستنسخة ولا في مُخرَجاته.",CFe=()=>"El árbol de trabajo de esta sesión no está disponible y el archivo no está en el clon del proyecto ni en sus artefactos.",EFe=()=>"इस सेशन की वर्कट्री उपलब्ध नहीं है, और फ़ाइल प्रोजेक्ट क्लोन या उसके आर्टिफ़ैक्ट में नहीं है।",NFe=((e={},n={})=>{const t=n.locale??z();return t==="zh-CN"?wFe():t==="fa"?kFe():t==="ar"?SFe():t==="es"?CFe():t==="hi"?EFe():xFe()}),zFe=()=>"Files in this workspace will appear here. Ask the agent to create a file to get started.",jFe=()=>"此工作区中的文件会显示在这里。让智能体创建一个文件即可开始。",TFe=()=>"فایل‌های این فضای کاری اینجا نمایش داده می‌شوند. برای شروع، از عامل بخواهید فایلی ایجاد کند.",AFe=()=>"ستظهر ملفات مساحة العمل هنا. اطلب من الوكيل إنشاء ملف للبدء.",RFe=()=>"Los archivos de este espacio de trabajo aparecerán aquí. Pídele al agente que cree un archivo para empezar.",MFe=()=>"इस वर्कस्पेस की फ़ाइलें यहाँ दिखेंगी। शुरू करने के लिए एजेंट से एक फ़ाइल बनाने को कहें।",OFe=((e={},n={})=>{const t=n.locale??z();return t==="zh-CN"?jFe():t==="fa"?TFe():t==="ar"?AFe():t==="es"?RFe():t==="hi"?MFe():zFe()}),DFe=()=>"Back to preview",LFe=()=>"返回预览",IFe=()=>"بازگشت به پیش‌نمایش",$Fe=()=>"العودة إلى المعاينة",BFe=()=>"Volver a la vista previa",PFe=()=>"प्रीव्यू पर वापस जाएं",FFe=((e={},n={})=>{const t=n.locale??z();return t==="zh-CN"?LFe():t==="fa"?IFe():t==="ar"?$Fe():t==="es"?BFe():t==="hi"?PFe():DFe()}),HFe=e=>`${e==null?void 0:e.count} changed files`,qFe=e=>`${e==null?void 0:e.count} 个已更改文件`,UFe=e=>`${e==null?void 0:e.count} فایل تغییرکرده`,GFe=e=>`الملفات المعدَّلة: ${e==null?void 0:e.count}`,VFe=e=>`${e==null?void 0:e.count} archivos modificados`,KFe=e=>`${e==null?void 0:e.count} बदली गई फ़ाइलें`,bD=((e,n={})=>{const t=n.locale??z();return t==="zh-CN"?qFe(e):t==="fa"?UFe(e):t==="ar"?GFe(e):t==="es"?VFe(e):t==="hi"?KFe(e):HFe(e)}),WFe=()=>"Changed files",QFe=()=>"已更改文件",XFe=()=>"فایل‌های تغییرکرده",YFe=()=>"الملفات المتغيّرة",ZFe=()=>"Archivos modificados",JFe=()=>"बदली गई फ़ाइलें",eHe=((e={},n={})=>{const t=n.locale??z();return t==="zh-CN"?QFe():t==="fa"?XFe():t==="ar"?YFe():t==="es"?ZFe():t==="hi"?JFe():WFe()}),tHe=()=>"Diff preview truncated",nHe=()=>"差异预览已截断",rHe=()=>"پیش‌نمایش تفاوت کوتاه شده است",sHe=()=>"معاينة الفروق مقتطعة",iHe=()=>"Vista previa del diff truncada",aHe=()=>"डिफ़ प्रीव्यू छोटा किया गया",oHe=((e={},n={})=>{const t=n.locale??z();return t==="zh-CN"?nHe():t==="fa"?rHe():t==="ar"?sHe():t==="es"?iHe():t==="hi"?aHe():tHe()}),lHe=e=>`${e==null?void 0:e.count} files shown (partial)`,cHe=e=>`显示 ${e==null?void 0:e.count} 个文件(部分)`,uHe=e=>`${e==null?void 0:e.count} فایل نمایش داده شده (ناقص)`,_He=e=>`الملفات المعروضة: ${e==null?void 0:e.count} (عرض جزئي)`,fHe=e=>`${e==null?void 0:e.count} archivos mostrados (parcial)`,dHe=e=>`${e==null?void 0:e.count} फ़ाइलें दिखाई गईं (आंशिक)`,hHe=((e,n={})=>{const t=n.locale??z();return t==="zh-CN"?cHe(e):t==="fa"?uHe(e):t==="ar"?_He(e):t==="es"?fHe(e):t==="hi"?dHe(e):lHe(e)}),pHe=()=>"No changes.",mHe=()=>"没有更改。",gHe=()=>"تغییری وجود ندارد.",vHe=()=>"لا توجد تغييرات.",bHe=()=>"No hay cambios.",yHe=()=>"कोई बदलाव नहीं।",xHe=((e={},n={})=>{const t=n.locale??z();return t==="zh-CN"?mHe():t==="fa"?gHe():t==="ar"?vHe():t==="es"?bHe():t==="hi"?yHe():pHe()}),wHe=()=>"No complete file preview was available before the cutoff.",kHe=()=>"在截断位置之前没有完整的文件预览。",SHe=()=>"پیش از نقطهٔ برش، پیش‌نمایش کاملی از هیچ فایلی موجود نبود.",CHe=()=>"لم تتوفر معاينة كاملة للملف قبل الحد الأقصى.",EHe=()=>"No se pudo previsualizar ningún archivo completo antes del límite.",NHe=()=>"कटऑफ़ से पहले कोई पूरा फ़ाइल प्रीव्यू उपलब्ध नहीं था।",zHe=((e={},n={})=>{const t=n.locale??z();return t==="zh-CN"?kHe():t==="fa"?SHe():t==="ar"?CHe():t==="es"?EHe():t==="hi"?NHe():wHe()}),jHe=()=>"No textual diff for this file.",THe=()=>"此文件没有文本差异。",AHe=()=>"برای این فایل تفاوت متنی وجود ندارد.",RHe=()=>"لا يوجد فرق نصّي لهذا الملف.",MHe=()=>"No hay diff de texto para este archivo.",OHe=()=>"इस फ़ाइल के लिए कोई टेक्स्ट डिफ़ नहीं है।",DHe=((e={},n={})=>{const t=n.locale??z();return t==="zh-CN"?THe():t==="fa"?AHe():t==="ar"?RHe():t==="es"?MHe():t==="hi"?OHe():jHe()}),LHe=()=>"1 changed file",IHe=()=>"1 个已更改文件",$He=()=>"۱ فایل تغییرکرده",BHe=()=>"ملف واحد معدَّل",PHe=()=>"1 archivo modificado",FHe=()=>"1 बदली गई फ़ाइल",yD=((e={},n={})=>{const t=n.locale??z();return t==="zh-CN"?IHe():t==="fa"?$He():t==="ar"?BHe():t==="es"?PHe():t==="hi"?FHe():LHe()}),HHe=()=>"1 file shown (partial)",qHe=()=>"显示 1 个文件(部分)",UHe=()=>"۱ فایل نمایش داده شده (ناقص)",GHe=()=>"عُرض ملف واحد (جزئيًا)",VHe=()=>"1 archivo mostrado (parcial)",KHe=()=>"1 फ़ाइल दिखाई गई (आंशिक)",WHe=((e={},n={})=>{const t=n.locale??z();return t==="zh-CN"?qHe():t==="fa"?UHe():t==="ar"?GHe():t==="es"?VHe():t==="hi"?KHe():HHe()}),QHe=()=>"Unable to parse this diff.",XHe=()=>"无法解析此差异。",YHe=()=>"خواندن این تفاوت ممکن نبود.",ZHe=()=>"تعذّر تحليل هذا الفرق.",JHe=()=>"No se pudo interpretar este diff.",eqe=()=>"यह डिफ़ पार्स नहीं हो सका।",tqe=((e={},n={})=>{const t=n.locale??z();return t==="zh-CN"?XHe():t==="fa"?YHe():t==="ar"?ZHe():t==="es"?JHe():t==="hi"?eqe():QHe()}),nqe=e=>`Showing the first ${e==null?void 0:e.limit} (${e==null?void 0:e.read} read). View the complete diff locally with git.`,rqe=e=>`正在显示前 ${e==null?void 0:e.limit}(已读取 ${e==null?void 0:e.read})。请在本地使用 git 查看完整差异。`,sqe=e=>`نخستین ${e==null?void 0:e.limit} نمایش داده می‌شود (${e==null?void 0:e.read} خوانده شد). تفاوت کامل را با git به‌صورت محلی ببینید.`,iqe=e=>`عرض أول ${e==null?void 0:e.limit} (قُرئ ${e==null?void 0:e.read}). اطّلع على الفرق الكامل محليًا عبر git.`,aqe=e=>`Se muestran los primeros ${e==null?void 0:e.limit} (${e==null?void 0:e.read} leídos). Consulta el diff completo en local con git.`,oqe=e=>`पहले ${e==null?void 0:e.limit} दिखाए जा रहे हैं (${e==null?void 0:e.read} पढ़े गए)। git के साथ लोकल रूप से पूरा डिफ़ देखें।`,lqe=((e,n={})=>{const t=n.locale??z();return t==="zh-CN"?rqe(e):t==="fa"?sqe(e):t==="ar"?iqe(e):t==="es"?aqe(e):t==="hi"?oqe(e):nqe(e)}),cqe=()=>"View full diff",uqe=()=>"查看完整差异",_qe=()=>"نمایش تفاوت کامل",fqe=()=>"عرض الفرق الكامل",dqe=()=>"Ver diff completo",hqe=()=>"पूरा डिफ़ देखें",pqe=((e={},n={})=>{const t=n.locale??z();return t==="zh-CN"?uqe():t==="fa"?_qe():t==="ar"?fqe():t==="es"?dqe():t==="hi"?hqe():cqe()}),mqe=()=>"Create a token ↗",gqe=()=>"创建令牌 ↗",vqe=()=>"ساخت توکن ↗",bqe=()=>"إنشاء رمز ↗",yqe=()=>"Crear un token ↗",xqe=()=>"एक टोकन बनाएं ↗",wqe=((e={},n={})=>{const t=n.locale??z();return t==="zh-CN"?gqe():t==="fa"?vqe():t==="ar"?bqe():t==="es"?yqe():t==="hi"?xqe():mqe()}),kqe=()=>"Approve and run",Sqe=()=>"批准并运行",Cqe=()=>"تأیید و اجرا",Eqe=()=>"الموافقة والتشغيل",Nqe=()=>"Aprobar y ejecutar",zqe=()=>"स्वीकार करें और चलाएं",jqe=((e={},n={})=>{const t=n.locale??z();return t==="zh-CN"?Sqe():t==="fa"?Cqe():t==="ar"?Eqe():t==="es"?Nqe():t==="hi"?zqe():kqe()}),Tqe=()=>"Cancel setup",Aqe=()=>"取消设置",Rqe=()=>"لغو راه‌اندازی",Mqe=()=>"إلغاء الإعداد",Oqe=()=>"Cancelar configuración",Dqe=()=>"सेटअप रद्द करें",Lqe=((e={},n={})=>{const t=n.locale??z();return t==="zh-CN"?Aqe():t==="fa"?Rqe():t==="ar"?Mqe():t==="es"?Oqe():t==="hi"?Dqe():Tqe()}),Iqe=()=>"Checking connection…",$qe=()=>"正在检查连接…",Bqe=()=>"در حال بررسی اتصال…",Pqe=()=>"جارٍ التحقق من الإعداد…",Fqe=()=>"Comprobando conexión…",Hqe=()=>"कनेक्शन जाँचा जा रहा है…",qqe=((e={},n={})=>{const t=n.locale??z();return t==="zh-CN"?$qe():t==="fa"?Bqe():t==="ar"?Pqe():t==="es"?Fqe():t==="hi"?Hqe():Iqe()}),Uqe=e=>`${e==null?void 0:e.agent} is connected.`,Gqe=e=>`${e==null?void 0:e.agent} 已连接。`,Vqe=e=>`${e==null?void 0:e.agent} متصل است.`,Kqe=e=>`أصبح ${e==null?void 0:e.agent} جاهزًا.`,Wqe=e=>`${e==null?void 0:e.agent} está conectado.`,Qqe=e=>`${e==null?void 0:e.agent} कनेक्टेड है।`,Xqe=((e,n={})=>{const t=n.locale??z();return t==="zh-CN"?Gqe(e):t==="fa"?Vqe(e):t==="ar"?Kqe(e):t==="es"?Wqe(e):t==="hi"?Qqe(e):Uqe(e)}),Yqe=()=>"Setup needs attention.",Zqe=()=>"设置需要处理。",Jqe=()=>"راه‌اندازی نیاز به بررسی دارد.",eUe=()=>"تعذّر إكمال الإعداد.",tUe=()=>"La configuración requiere atención.",nUe=()=>"सेटअप पर ध्यान देने की ज़रूरत है।",xD=((e={},n={})=>{const t=n.locale??z();return t==="zh-CN"?Zqe():t==="fa"?Jqe():t==="ar"?eUe():t==="es"?tUe():t==="hi"?nUe():Yqe()}),rUe=()=>"Install",sUe=()=>"安装",iUe=()=>"نصب",aUe=()=>"تثبيت",oUe=()=>"Instalar",lUe=()=>"इंस्टॉल करें",cUe=((e={},n={})=>{const t=n.locale??z();return t==="zh-CN"?sUe():t==="fa"?iUe():t==="ar"?aUe():t==="es"?oUe():t==="hi"?lUe():rUe()}),uUe=e=>`Approve the command below to download and install ${e==null?void 0:e.agent} on your computer.`,_Ue=e=>`批准以下命令以在您的电脑上下载并安装 ${e==null?void 0:e.agent}。`,fUe=e=>`برای دانلود و نصب ${e==null?void 0:e.agent} روی رایانه خود، دستور زیر را تأیید کنید.`,dUe=e=>`سيؤدي هذا إلى تنزيل ${e==null?void 0:e.agent} وتثبيته على جهازك. وافق لتشغيل الأمر أدناه.`,hUe=e=>`Aprueba el siguiente comando para descargar e instalar ${e==null?void 0:e.agent} en tu equipo.`,pUe=e=>`अपने कंप्यूटर पर ${e==null?void 0:e.agent} डाउनलोड और इंस्टॉल करने के लिए नीचे दी गई कमांड को स्वीकार करें।`,mUe=((e,n={})=>{const t=n.locale??z();return t==="zh-CN"?_Ue(e):t==="fa"?fUe(e):t==="ar"?dUe(e):t==="es"?hUe(e):t==="hi"?pUe(e):uUe(e)}),gUe=()=>"Could not load setup commands.",vUe=()=>"无法加载设置命令。",bUe=()=>"بارگیری دستورهای راه‌اندازی ناموفق بود.",yUe=()=>"تعذّر تحميل أوامر الإعداد.",xUe=()=>"No se pudieron cargar los comandos de configuración.",wUe=()=>"सेटअप कमांड लोड नहीं हो सके।",kUe=((e={},n={})=>{const t=n.locale??z();return t==="zh-CN"?vUe():t==="fa"?bUe():t==="ar"?yUe():t==="es"?xUe():t==="hi"?wUe():gUe()}),SUe=()=>"Sign in",CUe=()=>"登录",EUe=()=>"ورود",NUe=()=>"تسجيل الدخول",zUe=()=>"Iniciar sesión",jUe=()=>"साइन इन करें",wD=((e={},n={})=>{const t=n.locale??z();return t==="zh-CN"?CUe():t==="fa"?EUe():t==="ar"?NUe():t==="es"?zUe():t==="hi"?jUe():SUe()}),TUe=()=>"The agent is not ready yet. Re-check or retry sign-in.",AUe=()=>"代理尚未就绪。请重新检查或重试登录。",RUe=()=>"عامل هنوز آماده نیست. دوباره بررسی کنید یا ورود را تکرار کنید.",MUe=()=>"وكيل البرمجة غير جاهز بعد. أعد التحقق ثم حاول مجددًا.",OUe=()=>"El agente aún no está listo. Vuelve a comprobarlo o intenta iniciar sesión de nuevo.",DUe=()=>"एजेंट अभी तैयार नहीं है। फिर से जाँचें या साइन-इन फिर से कोशिश करें।",kD=((e={},n={})=>{const t=n.locale??z();return t==="zh-CN"?AUe():t==="fa"?RUe():t==="ar"?MUe():t==="es"?OUe():t==="hi"?DUe():TUe()}),LUe=()=>"Install, update, and sign-in buttons open a terminal here in OpenResearch.",IUe=()=>"安装、更新和登录按钮会在 OpenResearch 内打开终端。",$Ue=()=>"دکمه‌های نصب، به‌روزرسانی و ورود، ترمینالی در همین OpenResearch باز می‌کنند.",BUe=()=>"يفتح طرفية هنا",PUe=()=>"Los botones de instalación, actualización e inicio de sesión abren un terminal aquí, en OpenResearch.",FUe=()=>"इंस्टॉल, अपडेट और साइन-इन बटन OpenResearch में यहीं एक टर्मिनल खोलते हैं।",HUe=((e={},n={})=>{const t=n.locale??z();return t==="zh-CN"?IUe():t==="fa"?$Ue():t==="ar"?BUe():t==="es"?PUe():t==="hi"?FUe():LUe()}),qUe=()=>"This install command requires Node.js and npm.",UUe=()=>"此安装命令需要 Node.js 和 npm。",GUe=()=>"این دستور نصب به Node.js و npm نیاز دارد.",VUe=()=>"يلزم تثبيت Node.js وnpm لتشغيل هذا الأمر.",KUe=()=>"Este comando de instalación requiere Node.js y npm.",WUe=()=>"इस इंस्टॉल कमांड के लिए Node.js और npm ज़रूरी हैं।",QUe=((e={},n={})=>{const t=n.locale??z();return t==="zh-CN"?UUe():t==="fa"?GUe():t==="ar"?VUe():t==="es"?KUe():t==="hi"?WUe():qUe()}),XUe=e=>`Running \`${e==null?void 0:e.command}\` in the terminal:`,YUe=e=>`正在终端中运行 \`${e==null?void 0:e.command}\`:`,ZUe=e=>`در حال اجرای \`${e==null?void 0:e.command}\` در ترمینال:`,JUe=e=>`جارٍ تشغيل \`${e==null?void 0:e.command}\` في الطرفية:`,eGe=e=>`Ejecutando \`${e==null?void 0:e.command}\` en el terminal:`,tGe=e=>`टर्मिनल में \`${e==null?void 0:e.command}\` चलाया जा रहा है:`,nGe=((e,n={})=>{const t=n.locale??z();return t==="zh-CN"?YUe(e):t==="fa"?ZUe(e):t==="ar"?JUe(e):t==="es"?eGe(e):t==="hi"?tGe(e):XUe(e)}),rGe=e=>`Set up ${e==null?void 0:e.agent}`,sGe=e=>`设置 ${e==null?void 0:e.agent}`,iGe=e=>`راه‌اندازی ${e==null?void 0:e.agent}`,aGe=e=>`إعداد ${e==null?void 0:e.agent}`,oGe=e=>`Configurar ${e==null?void 0:e.agent}`,lGe=e=>`${e==null?void 0:e.agent} सेट अप करें`,SN=((e,n={})=>{const t=n.locale??z();return t==="zh-CN"?sGe(e):t==="fa"?iGe(e):t==="ar"?aGe(e):t==="es"?oGe(e):t==="hi"?lGe(e):rGe(e)}),cGe=()=>"Update",uGe=()=>"更新",_Ge=()=>"به‌روزرسانی",fGe=()=>"تحديث",dGe=()=>"Actualizar",hGe=()=>"अपडेट करें",pGe=((e={},n={})=>{const t=n.locale??z();return t==="zh-CN"?uGe():t==="fa"?_Ge():t==="ar"?fGe():t==="es"?dGe():t==="hi"?hGe():cGe()}),mGe=e=>`Approve the command below to update ${e==null?void 0:e.agent} on your computer.`,gGe=e=>`批准以下命令以在您的电脑上更新 ${e==null?void 0:e.agent}。`,vGe=e=>`برای به‌روزرسانی ${e==null?void 0:e.agent} روی رایانه خود، دستور زیر را تأیید کنید.`,bGe=e=>`سيؤدي هذا إلى تحديث ${e==null?void 0:e.agent} على جهازك. وافق لتشغيل الأمر أدناه.`,yGe=e=>`Aprueba el siguiente comando para actualizar ${e==null?void 0:e.agent} en tu equipo.`,xGe=e=>`अपने कंप्यूटर पर ${e==null?void 0:e.agent} अपडेट करने के लिए नीचे दी गई कमांड को स्वीकार करें।`,wGe=((e,n={})=>{const t=n.locale??z();return t==="zh-CN"?gGe(e):t==="fa"?vGe(e):t==="ar"?bGe(e):t==="es"?yGe(e):t==="hi"?xGe(e):mGe(e)}),kGe=()=>"All projects",SGe=()=>"所有项目",CGe=()=>"همهٔ پروژه‌ها",EGe=()=>"كل المشاريع",NGe=()=>"Todos los proyectos",zGe=()=>"सभी प्रोजेक्ट",CN=((e={},n={})=>{const t=n.locale??z();return t==="zh-CN"?SGe():t==="fa"?CGe():t==="ar"?EGe():t==="es"?NGe():t==="hi"?zGe():kGe()}),jGe=()=>"Configure Repository",TGe=()=>"配置仓库",AGe=()=>"پیکربندی مخزن",RGe=()=>"إعداد المستودع",MGe=()=>"Configurar repositorio",OGe=()=>"रिपॉज़िटरी कॉन्फ़िगर करें",DGe=((e={},n={})=>{const t=n.locale??z();return t==="zh-CN"?TGe():t==="fa"?AGe():t==="ar"?RGe():t==="es"?MGe():t==="hi"?OGe():jGe()}),LGe=()=>"Create a new project",IGe=()=>"新建项目",$Ge=()=>"ایجاد پروژهٔ جدید",BGe=()=>"إنشاء مشروع جديد",PGe=()=>"Crear un proyecto nuevo",FGe=()=>"नया प्रोजेक्ट बनाएं",HGe=((e={},n={})=>{const t=n.locale??z();return t==="zh-CN"?IGe():t==="fa"?$Ge():t==="ar"?BGe():t==="es"?PGe():t==="hi"?FGe():LGe()}),qGe=()=>"Hide sidebar",UGe=()=>"隐藏侧边栏",GGe=()=>"پنهان کردن نوار کناری",VGe=()=>"إخفاء الشريط الجانبي",KGe=()=>"Ocultar barra lateral",WGe=()=>"साइडबार छिपाएं",EN=((e={},n={})=>{const t=n.locale??z();return t==="zh-CN"?UGe():t==="fa"?GGe():t==="ar"?VGe():t==="es"?KGe():t==="hi"?WGe():qGe()}),QGe=()=>"Project",XGe=()=>"项目",YGe=()=>"پروژه",ZGe=()=>"المشروع",JGe=()=>"Proyecto",eVe=()=>"प्रोजेक्ट",tVe=((e={},n={})=>{const t=n.locale??z();return t==="zh-CN"?XGe():t==="fa"?YGe():t==="ar"?ZGe():t==="es"?JGe():t==="hi"?eVe():QGe()}),nVe=e=>`${e==null?void 0:e.count} cancelled`,rVe=e=>`${e==null?void 0:e.count} 次取消`,sVe=e=>`${e==null?void 0:e.count} لغوشده`,iVe=e=>`الملغاة: ${e==null?void 0:e.count}`,aVe=e=>`${e==null?void 0:e.count} canceladas`,oVe=e=>`${e==null?void 0:e.count} रद्द`,lVe=((e,n={})=>{const t=n.locale??z();return t==="zh-CN"?rVe(e):t==="fa"?sVe(e):t==="ar"?iVe(e):t==="es"?aVe(e):t==="hi"?oVe(e):nVe(e)}),cVe=e=>`${e==null?void 0:e.count} done`,uVe=e=>`${e==null?void 0:e.count} 次完成`,_Ve=e=>`${e==null?void 0:e.count} تمام‌شده`,fVe=e=>`المكتملة: ${e==null?void 0:e.count}`,dVe=e=>`${e==null?void 0:e.count} completadas`,hVe=e=>`${e==null?void 0:e.count} पूरे`,pVe=((e,n={})=>{const t=n.locale??z();return t==="zh-CN"?uVe(e):t==="fa"?_Ve(e):t==="ar"?fVe(e):t==="es"?dVe(e):t==="hi"?hVe(e):cVe(e)}),mVe=e=>`${e==null?void 0:e.count} failed`,gVe=e=>`${e==null?void 0:e.count} 次失败`,vVe=e=>`${e==null?void 0:e.count} ناموفق`,bVe=e=>`الفاشلة: ${e==null?void 0:e.count}`,yVe=e=>`${e==null?void 0:e.count} con error`,xVe=e=>`${e==null?void 0:e.count} विफल`,wVe=((e,n={})=>{const t=n.locale??z();return t==="zh-CN"?gVe(e):t==="fa"?vVe(e):t==="ar"?bVe(e):t==="es"?yVe(e):t==="hi"?xVe(e):mVe(e)}),kVe=e=>`${e==null?void 0:e.count} files`,SVe=e=>`${e==null?void 0:e.count} 个文件`,CVe=e=>`${e==null?void 0:e.count} فایل`,EVe=e=>`الملفات: ${e==null?void 0:e.count}`,NVe=e=>`${e==null?void 0:e.count} archivos`,zVe=e=>`${e==null?void 0:e.count} फ़ाइलें`,jVe=((e,n={})=>{const t=n.locale??z();return t==="zh-CN"?SVe(e):t==="fa"?CVe(e):t==="ar"?EVe(e):t==="es"?NVe(e):t==="hi"?zVe(e):kVe(e)}),TVe=e=>`${e==null?void 0:e.count}+ files`,AVe=e=>`至少 ${e==null?void 0:e.count} 个文件`,RVe=e=>`بیش از ${e==null?void 0:e.count} فایل`,MVe=e=>`الملفات: ${e==null?void 0:e.count} على الأقل`,OVe=e=>`${e==null?void 0:e.count}+ archivos`,DVe=e=>`${e==null?void 0:e.count}+ फ़ाइलें`,LVe=((e,n={})=>{const t=n.locale??z();return t==="zh-CN"?AVe(e):t==="fa"?RVe(e):t==="ar"?MVe(e):t==="es"?OVe(e):t==="hi"?DVe(e):TVe(e)}),IVe=e=>`${e==null?void 0:e.count} live`,$Ve=e=>`${e==null?void 0:e.count} 次进行中`,BVe=e=>`${e==null?void 0:e.count} فعال`,PVe=e=>`النشطة: ${e==null?void 0:e.count}`,FVe=e=>`${e==null?void 0:e.count} en curso`,HVe=e=>`${e==null?void 0:e.count} लाइव`,qVe=((e,n={})=>{const t=n.locale??z();return t==="zh-CN"?$Ve(e):t==="fa"?BVe(e):t==="ar"?PVe(e):t==="es"?FVe(e):t==="hi"?HVe(e):IVe(e)}),UVe=()=>"1 file",GVe=()=>"1 个文件",VVe=()=>"۱ فایل",KVe=()=>"ملف واحد",WVe=()=>"1 archivo",QVe=()=>"1 फ़ाइल",XVe=((e={},n={})=>{const t=n.locale??z();return t==="zh-CN"?GVe():t==="fa"?VVe():t==="ar"?KVe():t==="es"?WVe():t==="hi"?QVe():UVe()}),YVe=()=>"1 run",ZVe=()=>"1 次运行",JVe=()=>"۱ اجرا",eKe=()=>"تشغيل واحد",tKe=()=>"1 ejecución",nKe=()=>"1 रन",rKe=((e={},n={})=>{const t=n.locale??z();return t==="zh-CN"?ZVe():t==="fa"?JVe():t==="ar"?eKe():t==="es"?tKe():t==="hi"?nKe():YVe()}),sKe=e=>`${e==null?void 0:e.count} runs`,iKe=e=>`${e==null?void 0:e.count} 次运行`,aKe=e=>`${e==null?void 0:e.count} اجرا`,oKe=e=>`عمليات التشغيل: ${e==null?void 0:e.count}`,lKe=e=>`${e==null?void 0:e.count} ejecuciones`,cKe=e=>`${e==null?void 0:e.count} रन`,uKe=((e,n={})=>{const t=n.locale??z();return t==="zh-CN"?iKe(e):t==="fa"?aKe(e):t==="ar"?oKe(e):t==="es"?lKe(e):t==="hi"?cKe(e):sKe(e)}),_Ke=()=>"Zoom in",fKe=()=>"放大",dKe=()=>"بزرگ‌نمایی",hKe=()=>"تكبير",pKe=()=>"Acercar",mKe=()=>"ज़ूम इन",NN=((e={},n={})=>{const t=n.locale??z();return t==="zh-CN"?fKe():t==="fa"?dKe():t==="ar"?hKe():t==="es"?pKe():t==="hi"?mKe():_Ke()}),gKe=()=>"Zoom out",vKe=()=>"缩小",bKe=()=>"کوچک‌نمایی",yKe=()=>"تصغير",xKe=()=>"Alejar",wKe=()=>"ज़ूम आउट",zN=((e={},n={})=>{const t=n.locale??z();return t==="zh-CN"?vKe():t==="fa"?bKe():t==="ar"?yKe():t==="es"?xKe():t==="hi"?wKe():gKe()}),kKe=()=>"Reset zoom to fit",SKe=()=>"重置为适合窗口",CKe=()=>"بازنشانی بزرگ‌نمایی برای جا شدن",EKe=()=>"إعادة ضبط التكبير للملاءمة",NKe=()=>"Restablecer zoom para ajustar",zKe=()=>"फ़िट करने के लिए ज़ूम रीसेट करें",jN=((e={},n={})=>{const t=n.locale??z();return t==="zh-CN"?SKe():t==="fa"?CKe():t==="ar"?EKe():t==="es"?NKe():t==="hi"?zKe():kKe()}),jKe=()=>"No instances yet.",TKe=()=>"还没有实例。",AKe=()=>"هنوز نمونه‌ای وجود ندارد.",RKe=()=>"لا توجد مثيلات بعد.",MKe=()=>"Aún no hay instancias.",OKe=()=>"अभी तक कोई इंस्टेंस नहीं।",DKe=((e={},n={})=>{const t=n.locale??z();return t==="zh-CN"?TKe():t==="fa"?AKe():t==="ar"?RKe():t==="es"?MKe():t==="hi"?OKe():jKe()}),LKe=()=>"Nothing running right now.",IKe=()=>"当前没有运行中的实例。",$Ke=()=>"اکنون چیزی در حال اجرا نیست.",BKe=()=>"لا شيء قيد التشغيل الآن.",PKe=()=>"No hay nada en ejecución ahora mismo.",FKe=()=>"अभी कुछ नहीं चल रहा।",HKe=((e={},n={})=>{const t=n.locale??z();return t==="zh-CN"?IKe():t==="fa"?$Ke():t==="ar"?BKe():t==="es"?PKe():t==="hi"?FKe():LKe()}),qKe=()=>"Select a project to see its history.",UKe=()=>"请选择一个项目以查看其历史记录。",GKe=()=>"برای دیدن تاریخچه یک پروژه انتخاب کنید.",VKe=()=>"اختر مشروعًا لرؤية سجله.",KKe=()=>"Selecciona un proyecto para ver su historial.",WKe=()=>"इसका इतिहास देखने के लिए एक प्रोजेक्ट चुनें।",QKe=((e={},n={})=>{const t=n.locale??z();return t==="zh-CN"?UKe():t==="fa"?GKe():t==="ar"?VKe():t==="es"?KKe():t==="hi"?WKe():qKe()}),XKe=()=>"Select a project to see its runs.",YKe=()=>"请选择一个项目以查看其运行。",ZKe=()=>"برای دیدن اجراها یک پروژه انتخاب کنید.",JKe=()=>"اختر مشروعًا لرؤية عمليات تشغيله.",eWe=()=>"Selecciona un proyecto para ver sus ejecuciones.",tWe=()=>"इसके रन देखने के लिए एक प्रोजेक्ट चुनें।",nWe=((e={},n={})=>{const t=n.locale??z();return t==="zh-CN"?YKe():t==="fa"?ZKe():t==="ar"?JKe():t==="es"?eWe():t==="hi"?tWe():XKe()}),rWe=()=>"View history",sWe=()=>"查看历史记录",iWe=()=>"مشاهدهٔ تاریخچه",aWe=()=>"عرض السجل",oWe=()=>"Ver historial",lWe=()=>"इतिहास देखें",cWe=((e={},n={})=>{const t=n.locale??z();return t==="zh-CN"?sWe():t==="fa"?iWe():t==="ar"?aWe():t==="es"?oWe():t==="hi"?lWe():rWe()}),uWe=e=>`View history (${e==null?void 0:e.count})`,_We=e=>`查看历史记录(${e==null?void 0:e.count})`,fWe=e=>`مشاهدهٔ تاریخچه (${e==null?void 0:e.count})`,dWe=e=>`عرض السجل (${e==null?void 0:e.count})`,hWe=e=>`Ver historial (${e==null?void 0:e.count})`,pWe=e=>`इतिहास देखें (${e==null?void 0:e.count})`,mWe=((e,n={})=>{const t=n.locale??z();return t==="zh-CN"?_We(e):t==="fa"?fWe(e):t==="ar"?dWe(e):t==="es"?hWe(e):t==="hi"?pWe(e):uWe(e)}),gWe=()=>"The engine exited without producing a PDF or a log.",vWe=()=>"引擎已退出,但没有生成 PDF 或日志。",bWe=()=>"موتور بدون تولید PDF یا گزارش خارج شد.",yWe=()=>"خرج المحرك دون إنتاج ملف PDF أو سجل.",xWe=()=>"El motor terminó sin generar un PDF ni un log.",wWe=()=>"इंजन बिना PDF या लॉग बनाए बाहर निकल गया।",kWe=((e={},n={})=>{const t=n.locale??z();return t==="zh-CN"?vWe():t==="fa"?bWe():t==="ar"?yWe():t==="es"?xWe():t==="hi"?wWe():gWe()}),SWe=()=>"Loading…",CWe=()=>"正在加载…",EWe=()=>"در حال بارگیری…",NWe=()=>"جارٍ التحميل…",zWe=()=>"Cargando…",jWe=()=>"लोड हो रहा है…",TWe=((e={},n={})=>{const t=n.locale??z();return t==="zh-CN"?CWe():t==="fa"?EWe():t==="ar"?NWe():t==="es"?zWe():t==="hi"?jWe():SWe()}),AWe=()=>"Add local model",RWe=()=>"添加本地模型",MWe=()=>"افزودن مدل محلی",OWe=()=>"إضافة نموذج محلي",DWe=()=>"Añadir modelo local",LWe=()=>"लोकल मॉडल जोड़ें",SD=((e={},n={})=>{const t=n.locale??z();return t==="zh-CN"?RWe():t==="fa"?MWe():t==="ar"?OWe():t==="es"?DWe():t==="hi"?LWe():AWe()}),IWe=()=>"Local server address",$We=()=>"本地服务器地址",BWe=()=>"نشانی سرور محلی",PWe=()=>"عنوان الخادم المحلي",FWe=()=>"Dirección del servidor local",HWe=()=>"लोकल सर्वर पता",qWe=((e={},n={})=>{const t=n.locale??z();return t==="zh-CN"?$We():t==="fa"?BWe():t==="ar"?PWe():t==="es"?FWe():t==="hi"?HWe():IWe()}),UWe=()=>"Find models",GWe=()=>"查找模型",VWe=()=>"یافتن مدل‌ها",KWe=()=>"العثور على النماذج",WWe=()=>"Buscar modelos",QWe=()=>"मॉडल खोजें",XWe=((e={},n={})=>{const t=n.locale??z();return t==="zh-CN"?GWe():t==="fa"?VWe():t==="ar"?KWe():t==="es"?WWe():t==="hi"?QWe():UWe()}),YWe=()=>"(OpenAI compatible)",ZWe=()=>"(兼容 OpenAI)",JWe=()=>"(سازگار با OpenAI)",eQe=()=>"(متوافق مع OpenAI)",tQe=()=>"(compatible con OpenAI)",nQe=()=>"(OpenAI संगत)",CD=((e={},n={})=>{const t=n.locale??z();return t==="zh-CN"?ZWe():t==="fa"?JWe():t==="ar"?eQe():t==="es"?tQe():t==="hi"?nQe():YWe()}),rQe=()=>"Saved, but OpenCode did not list this model. Check installed agents again. If your OpenCode config restricts enabled providers, allow this connection before using it.",sQe=()=>"已保存,但 OpenCode 未列出该模型。请重新检查已安装的智能体。如果 OpenCode 配置限制了启用的提供商,请先允许此连接。",iQe=()=>"ذخیره شد، اما OpenCode این مدل را فهرست نکرد. عامل‌های نصب‌شده را دوباره بررسی کنید. اگر پیکربندی OpenCode ارائه‌دهندگان فعال را محدود کرده، ابتدا این اتصال را مجاز کنید.",aQe=()=>"تم الحفظ، لكن OpenCode لم يُدرج هذا النموذج. تحقق من الوكلاء المثبّتين مجددًا. إذا كان إعداد OpenCode يقيّد المزوّدين المفعّلين، فاسمح بهذا الاتصال قبل استخدامه.",oQe=()=>"Guardado, pero OpenCode no mostró este modelo. Vuelve a comprobar los agentes instalados. Si tu configuración de OpenCode limita los proveedores habilitados, permite esta conexión antes de usarla.",lQe=()=>"सेव हो गया, पर OpenCode ने इस मॉडल की सूची नहीं दी। इंस्टॉल किए गए एजेंट फिर से जाँचें। अगर आपका OpenCode कॉन्फ़िग चालू प्रोवाइडर सीमित करता है, तो इस्तेमाल से पहले इस कनेक्शन की अनुमति दें।",cQe=((e={},n={})=>{const t=n.locale??z();return t==="zh-CN"?sQe():t==="fa"?iQe():t==="ar"?aQe():t==="es"?oQe():t==="hi"?lQe():rQe()}),uQe=()=>"Connected",_Qe=()=>"已连接",fQe=()=>"متصل شد",dQe=()=>"متصل",hQe=()=>"Conectado",pQe=()=>"कनेक्टेड",mQe=((e={},n={})=>{const t=n.locale??z();return t==="zh-CN"?_Qe():t==="fa"?fQe():t==="ar"?dQe():t==="es"?hQe():t==="hi"?pQe():uQe()}),gQe=()=>"Context window",vQe=()=>"上下文窗口",bQe=()=>"پنجرهٔ زمینه",yQe=()=>"نافذة السياق",xQe=()=>"Ventana de contexto",wQe=()=>"कॉन्टेक्स्ट विंडो",kQe=((e={},n={})=>{const t=n.locale??z();return t==="zh-CN"?vQe():t==="fa"?bQe():t==="ar"?yQe():t==="es"?xQe():t==="hi"?wQe():gQe()}),SQe=()=>"Match the context window loaded in your model app. 32K is a useful starting point for tools; larger contexts use more memory.",CQe=()=>"请与模型应用中加载的上下文窗口保持一致。使用工具时可从 32K 开始;更大的上下文需要更多内存。",EQe=()=>"اندازهٔ زمینه را با تنظیم بارگذاری‌شده در برنامهٔ مدل هماهنگ کنید. ۳۲هزار توکن نقطهٔ شروع مناسبی برای ابزارهاست؛ زمینهٔ بزرگ‌تر حافظهٔ بیشتری مصرف می‌کند.",NQe=()=>"استخدم حجم نافذة السياق نفسه المحدد في تطبيق النموذج. يُعدّ 32 ألف رمز نقطة بداية مناسبة لاستخدام الأدوات؛ وتستهلك النوافذ الأكبر ذاكرة أكثر.",zQe=()=>"Usa la misma ventana de contexto que tengas cargada en tu app de modelos. 32K es un buen punto de partida para herramientas; los contextos más grandes usan más memoria.",jQe=()=>"अपने मॉडल ऐप में लोड कॉन्टेक्स्ट विंडो से मेल खाएं। टूल के लिए 32K एक अच्छा शुरुआती बिंदु है; बड़े कॉन्टेक्स्ट ज़्यादा मेमोरी इस्तेमाल करते हैं।",TQe=((e={},n={})=>{const t=n.locale??z();return t==="zh-CN"?CQe():t==="fa"?EQe():t==="ar"?NQe():t==="es"?zQe():t==="hi"?jQe():SQe()}),AQe=()=>"Custom Endpoint",RQe=()=>"自定义端点",MQe=()=>"نقطهٔ اتصال سفارشی",OQe=()=>"نقطة نهاية مخصصة",DQe=()=>"Endpoint personalizado",LQe=()=>"कस्टम एंडपॉइंट",Mk=((e={},n={})=>{const t=n.locale??z();return t==="zh-CN"?RQe():t==="fa"?MQe():t==="ar"?OQe():t==="es"?DQe():t==="hi"?LQe():AQe()}),IQe=e=>`Disconnect ${e==null?void 0:e.name}`,$Qe=e=>`断开 ${e==null?void 0:e.name}`,BQe=e=>`قطع اتصال ${e==null?void 0:e.name}`,PQe=e=>`قطع اتصال ${e==null?void 0:e.name}`,FQe=e=>`Desconectar ${e==null?void 0:e.name}`,HQe=e=>`${e==null?void 0:e.name} डिस्कनेक्ट करें`,qQe=((e,n={})=>{const t=n.locale??z();return t==="zh-CN"?$Qe(e):t==="fa"?BQe(e):t==="ar"?PQe(e):t==="es"?FQe(e):t==="hi"?HQe(e):IQe(e)}),UQe=()=>"Get OpenCode",GQe=()=>"获取 OpenCode",VQe=()=>"دریافت OpenCode",KQe=()=>"الحصول على OpenCode",WQe=()=>"Obtener OpenCode",QQe=()=>"OpenCode लें",XQe=((e={},n={})=>{const t=n.locale??z();return t==="zh-CN"?GQe():t==="fa"?VQe():t==="ar"?KQe():t==="es"?WQe():t==="hi"?QQe():UQe()}),YQe=()=>"Install OpenCode to run tools with your local model, then re-check installed agents. No cloud account is required.",ZQe=()=>"安装 OpenCode 以使用本地模型执行工具,然后重新检查已安装的智能体。无需云端账户。",JQe=()=>"برای اجرای ابزارها با مدل محلی، OpenCode را نصب کنید و عامل‌های نصب‌شده را دوباره بررسی کنید. حساب ابری لازم نیست.",eXe=()=>"ثبّت OpenCode لتشغيل الأدوات مع نموذجك المحلي، ثم أعد فحص الوكلاء المثبّتين. لا يلزم حساب سحابي.",tXe=()=>"Instala OpenCode para usar herramientas con tu modelo local y vuelve a comprobar los agentes instalados. No necesitas una cuenta en la nube.",nXe=()=>"अपने लोकल मॉडल से टूल चलाने के लिए OpenCode इंस्टॉल करें, फिर इंस्टॉल किए गए एजेंट फिर से जाँचें। किसी क्लाउड खाते की ज़रूरत नहीं है।",rXe=((e={},n={})=>{const t=n.locale??z();return t==="zh-CN"?ZQe():t==="fa"?JQe():t==="ar"?eXe():t==="es"?tXe():t==="hi"?nXe():YQe()}),sXe=()=>"API key (optional)",iXe=()=>"API 密钥(可选)",aXe=()=>"کلید API (اختیاری)",oXe=()=>"مفتاح API (اختياري)",lXe=()=>"Clave de API (opcional)",cXe=()=>"API की (वैकल्पिक)",uXe=((e={},n={})=>{const t=n.locale??z();return t==="zh-CN"?iXe():t==="fa"?aXe():t==="ar"?oXe():t==="es"?lXe():t==="hi"?cXe():sXe()}),_Xe=()=>"Save model",fXe=()=>"保存模型",dXe=()=>"ذخیرهٔ مدل",hXe=()=>"حفظ النموذج",pXe=()=>"Guardar modelo",mXe=()=>"मॉडल सेव करें",gXe=((e={},n={})=>{const t=n.locale??z();return t==="zh-CN"?fXe():t==="fa"?dXe():t==="ar"?hXe():t==="es"?pXe():t==="hi"?mXe():_Xe()}),vXe=()=>"Model server",bXe=()=>"模型服务器",yXe=()=>"سرور مدل",xXe=()=>"خادم النموذج",wXe=()=>"Servidor del modelo",kXe=()=>"मॉडल सर्वर",TN=((e={},n={})=>{const t=n.locale??z();return t==="zh-CN"?bXe():t==="fa"?yXe():t==="ar"?xXe():t==="es"?wXe():t==="hi"?kXe():vXe()}),SXe=()=>"Local models",CXe=()=>"本地模型",EXe=()=>"مدل‌های محلی",NXe=()=>"النماذج المحلية",zXe=()=>"Modelos locales",jXe=()=>"लोकल मॉडल",AN=((e={},n={})=>{const t=n.locale??z();return t==="zh-CN"?CXe():t==="fa"?EXe():t==="ar"?NXe():t==="es"?zXe():t==="hi"?jXe():SXe()}),TXe=()=>"API token (optional)",AXe=()=>"API 令牌(可选)",RXe=()=>"توکن API (اختیاری)",MXe=()=>"رمز API (اختياري)",OXe=()=>"Token de API (opcional)",DXe=()=>"API टोकन (वैकल्पिक)",LXe=((e={},n={})=>{const t=n.locale??z();return t==="zh-CN"?AXe():t==="fa"?RXe():t==="ar"?MXe():t==="es"?OXe():t==="hi"?DXe():TXe()}),IXe=()=>"Copy",$Xe=()=>"复制",BXe=()=>"کپی",PXe=()=>"نسخ",FXe=()=>"Copiar",HXe=()=>"कॉपी करें",Ok=((e={},n={})=>{const t=n.locale??z();return t==="zh-CN"?$Xe():t==="fa"?BXe():t==="ar"?PXe():t==="es"?FXe():t==="hi"?HXe():IXe()}),qXe=()=>"Copy code",UXe=()=>"复制代码",GXe=()=>"کپی کد",VXe=()=>"نسخ الشيفرة",KXe=()=>"Copiar código",WXe=()=>"कोड कॉपी करें",QXe=((e={},n={})=>{const t=n.locale??z();return t==="zh-CN"?UXe():t==="fa"?GXe():t==="ar"?VXe():t==="es"?KXe():t==="hi"?WXe():qXe()}),XXe=()=>"Download",YXe=()=>"下载",ZXe=()=>"بارگیری",JXe=()=>"تنزيل",eYe=()=>"Descargar",tYe=()=>"डाउनलोड करें",mv=((e={},n={})=>{const t=n.locale??z();return t==="zh-CN"?YXe():t==="fa"?ZXe():t==="ar"?JXe():t==="es"?eYe():t==="hi"?tYe():XXe()}),nYe=()=>"This browser can’t preview this media format.",rYe=()=>"此浏览器无法预览该媒体格式。",sYe=()=>"این مرورگر نمی‌تواند این قالب رسانه را پیش‌نمایش کند.",iYe=()=>"لا يستطيع هذا المتصفح معاينة صيغة الوسائط هذه.",aYe=()=>"Este navegador no puede mostrar este formato multimedia.",oYe=()=>"यह ब्राउज़र इस मीडिया फ़ॉर्मैट का प्रीव्यू नहीं दिखा सकता।",lYe=((e={},n={})=>{const t=n.locale??z();return t==="zh-CN"?rYe():t==="fa"?sYe():t==="ar"?iYe():t==="es"?aYe():t==="hi"?oYe():nYe()}),cYe=()=>"Add Local Model",uYe=()=>"添加本地模型",_Ye=()=>"افزودن مدل محلی",fYe=()=>"إضافة نموذج محلي",dYe=()=>"Añadir modelo local",hYe=()=>"लोकल मॉडल जोड़ें",pYe=((e={},n={})=>{const t=n.locale??z();return t==="zh-CN"?uYe():t==="fa"?_Ye():t==="ar"?fYe():t==="es"?dYe():t==="hi"?hYe():cYe()}),mYe=()=>" · CLI configuration",gYe=()=>" · CLI 配置",vYe=()=>" · پیکربندی CLI",bYe=()=>" · إعداد واجهة سطر الأوامر",yYe=()=>" · Configuración de la CLI",xYe=()=>" · CLI कॉन्फ़िगरेशन",ED=((e={},n={})=>{const t=n.locale??z();return t==="zh-CN"?gYe():t==="fa"?vYe():t==="ar"?bYe():t==="es"?yYe():t==="hi"?xYe():mYe()}),wYe=()=>"· Default",kYe=()=>"· 默认",SYe=()=>"· پیش‌فرض",CYe=()=>"· الافتراضي",EYe=()=>"· Predeterminado",NYe=()=>"· डिफ़ॉल्ट",ND=((e={},n={})=>{const t=n.locale??z();return t==="zh-CN"?kYe():t==="fa"?SYe():t==="ar"?CYe():t==="es"?EYe():t==="hi"?NYe():wYe()}),zYe=()=>"Default model",jYe=()=>"默认模型",TYe=()=>"مدل پیش‌فرض",AYe=()=>"النموذج الافتراضي",RYe=()=>"Modelo predeterminado",MYe=()=>"डिफ़ॉल्ट मॉडल",RN=((e={},n={})=>{const t=n.locale??z();return t==="zh-CN"?jYe():t==="fa"?TYe():t==="ar"?AYe():t==="es"?RYe():t==="hi"?MYe():zYe()}),OYe=()=>"Detecting harnesses…",DYe=()=>"正在检测智能体工具…",LYe=()=>"در حال شناسایی ابزارهای عامل…",IYe=()=>"جارٍ اكتشاف أدوات البرمجة…",$Ye=()=>"Detectando agentes…",BYe=()=>"हार्नेस पहचाने जा रहे हैं…",PYe=((e={},n={})=>{const t=n.locale??z();return t==="zh-CN"?DYe():t==="fa"?LYe():t==="ar"?IYe():t==="es"?$Ye():t==="hi"?BYe():OYe()}),FYe=()=>"Effort",HYe=()=>"推理强度",qYe=()=>"میزان استدلال",UYe=()=>"الجهد",GYe=()=>"Esfuerzo",VYe=()=>"प्रयास स्तर",KYe=((e={},n={})=>{const t=n.locale??z();return t==="zh-CN"?HYe():t==="fa"?qYe():t==="ar"?UYe():t==="es"?GYe():t==="hi"?VYe():FYe()}),WYe=()=>"Fast speed ·",QYe=()=>"快速 ·",XYe=()=>"سرعت بالا ·",YYe=()=>"سرعة عالية ·",ZYe=()=>"Modo rápido ·",JYe=()=>"तेज़ गति ·",eZe=((e={},n={})=>{const t=n.locale??z();return t==="zh-CN"?QYe():t==="fa"?XYe():t==="ar"?YYe():t==="es"?ZYe():t==="hi"?JYe():WYe()}),tZe=()=>"Mode",nZe=()=>"模式",rZe=()=>"حالت",sZe=()=>"الوضع",iZe=()=>"Modo",aZe=()=>"मोड",MN=((e={},n={})=>{const t=n.locale??z();return t==="zh-CN"?nZe():t==="fa"?rZe():t==="ar"?sZe():t==="es"?iZe():t==="hi"?aZe():tZe()}),oZe=()=>"Model",lZe=()=>"模型",cZe=()=>"مدل",uZe=()=>"النموذج",_Ze=()=>"Modelo",fZe=()=>"मॉडल",Yp=((e={},n={})=>{const t=n.locale??z();return t==="zh-CN"?lZe():t==="fa"?cZe():t==="ar"?uZe():t==="es"?_Ze():t==="hi"?fZe():oZe()}),dZe=e=>`${e==null?void 0:e.count} more — search to find`,hZe=e=>`还有 ${e==null?void 0:e.count} 个——搜索即可查找`,pZe=e=>`${e==null?void 0:e.count} مورد دیگر — برای یافتن جست‌وجو کنید`,mZe=e=>`نماذج إضافية: ${e==null?void 0:e.count} — ابحث للعثور عليها`,gZe=e=>`${e==null?void 0:e.count} más — busca para encontrarlos`,vZe=e=>`${e==null?void 0:e.count} और — खोजने के लिए टाइप करें`,bZe=((e,n={})=>{const t=n.locale??z();return t==="zh-CN"?hZe(e):t==="fa"?pZe(e):t==="ar"?mZe(e):t==="es"?gZe(e):t==="hi"?vZe(e):dZe(e)}),yZe=()=>"Not available",xZe=()=>"不可用",wZe=()=>"در دسترس نیست",kZe=()=>"غير متاح",SZe=()=>"No disponible",CZe=()=>"उपलब्ध नहीं",EZe=((e={},n={})=>{const t=n.locale??z();return t==="zh-CN"?xZe():t==="fa"?wZe():t==="ar"?kZe():t==="es"?SZe():t==="hi"?CZe():yZe()}),NZe=()=>"Search models…",zZe=()=>"搜索模型…",jZe=()=>"جست‌وجوی مدل‌ها…",TZe=()=>"البحث في النماذج…",AZe=()=>"Buscar modelos…",RZe=()=>"मॉडल खोजें…",zD=((e={},n={})=>{const t=n.locale??z();return t==="zh-CN"?zZe():t==="fa"?jZe():t==="ar"?TZe():t==="es"?AZe():t==="hi"?RZe():NZe()}),MZe=()=>"Sessions keep their harness. Start a new chat to switch.",OZe=()=>"会话将沿用当前的智能体工具。新建聊天即可切换。",DZe=()=>"نشست‌ها ابزار عامل خود را نگه می‌دارند. برای تغییر، گفتگوی جدیدی بسازید",LZe=()=>"تحتفظ كل جلسة بأداة البرمجة الخاصة بها. ابدأ محادثة جديدة للتبديل.",IZe=()=>"Cada sesión mantiene su agente. Inicia un chat nuevo para cambiarlo.",$Ze=()=>"सेशन अपना हार्नेस बनाए रखते हैं। बदलने के लिए नई चैट शुरू करें।",BZe=((e={},n={})=>{const t=n.locale??z();return t==="zh-CN"?OZe():t==="fa"?DZe():t==="ar"?LZe():t==="es"?IZe():t==="hi"?$Ze():MZe()}),PZe=()=>"Speed",FZe=()=>"速度",HZe=()=>"سرعت",qZe=()=>"السرعة",UZe=()=>"Velocidad",GZe=()=>"गति",ON=((e={},n={})=>{const t=n.locale??z();return t==="zh-CN"?FZe():t==="fa"?HZe():t==="ar"?qZe():t==="es"?UZe():t==="hi"?GZe():PZe()}),VZe=()=>"Unavailable",KZe=()=>"不可用",WZe=()=>"در دسترس نیست",QZe=()=>"غير متاح",XZe=()=>"No disponible",YZe=()=>"उपलब्ध नहीं",so=((e={},n={})=>{const t=n.locale??z();return t==="zh-CN"?KZe():t==="fa"?WZe():t==="ar"?QZe():t==="es"?XZe():t==="hi"?YZe():VZe()}),ZZe=e=>`Use “${e==null?void 0:e.id}” as the model ID`,JZe=e=>`使用“${e==null?void 0:e.id}”作为模型 ID`,eJe=e=>`از «${e==null?void 0:e.id}» به‌عنوان شناسهٔ مدل استفاده کنید`,tJe=e=>`استخدام «${e==null?void 0:e.id}» معرّفًا للنموذج`,nJe=e=>`Usar “${e==null?void 0:e.id}” como ID del modelo`,rJe=e=>`मॉडल ID के रूप में “${e==null?void 0:e.id}” इस्तेमाल करें`,sJe=((e,n={})=>{const t=n.locale??z();return t==="zh-CN"?JZe(e):t==="fa"?eJe(e):t==="ar"?tJe(e):t==="es"?nJe(e):t==="hi"?rJe(e):ZZe(e)}),iJe=()=>"Variant",aJe=()=>"变体",oJe=()=>"گونه",lJe=()=>"الصنف",cJe=()=>"Variante",uJe=()=>"वेरिएंट",_Je=((e={},n={})=>{const t=n.locale??z();return t==="zh-CN"?aJe():t==="fa"?oJe():t==="ar"?lJe():t==="es"?cJe():t==="hi"?uJe():iJe()}),fJe=()=>"Advanced",dJe=()=>"高级",hJe=()=>"پیشرفته",pJe=()=>"متقدم",mJe=()=>"Avanzado",gJe=()=>"उन्नत",jD=((e={},n={})=>{const t=n.locale??z();return t==="zh-CN"?dJe():t==="fa"?hJe():t==="ar"?pJe():t==="es"?mJe():t==="hi"?gJe():fJe()}),vJe=()=>"Advanced · Connect GitHub",bJe=()=>"高级 · 连接 GitHub",yJe=()=>"پیشرفته · اتصال GitHub",xJe=()=>"متقدم · ربط GitHub",wJe=()=>"Avanzado · Conectar GitHub",kJe=()=>"उन्नत · GitHub कनेक्ट करें",SJe=((e={},n={})=>{const t=n.locale??z();return t==="zh-CN"?bJe():t==="fa"?yJe():t==="ar"?xJe():t==="es"?wJe():t==="hi"?kJe():vJe()}),CJe=()=>"Advanced · GitHub sync on",EJe=()=>"高级 · GitHub 同步已开启",NJe=()=>"پیشرفته · همگام‌سازی GitHub روشن است",zJe=()=>"متقدم · مزامنة GitHub مفعّلة",jJe=()=>"Avanzado · Sincronización con GitHub activada",TJe=()=>"उन्नत · GitHub सिंक चालू",AJe=((e={},n={})=>{const t=n.locale??z();return t==="zh-CN"?EJe():t==="fa"?NJe():t==="ar"?zJe():t==="es"?jJe():t==="hi"?TJe():CJe()}),RJe=()=>"Choose a different destination. A paper project needs a new or empty folder of its own.",MJe=()=>"请选择其他位置。论文项目需要拥有独立的新文件夹或空文件夹。",OJe=()=>"مقصد دیگری انتخاب کنید. پروژهٔ مقاله باید پوشهٔ جدید یا خالیِ جداگانه‌ای داشته باشد.",DJe=()=>"اختر وجهة مختلفة. يحتاج مشروع الورقة إلى مجلد جديد أو فارغ خاص به.",LJe=()=>"Elige otro destino. Un proyecto de paper necesita su propia carpeta nueva o vacía.",IJe=()=>"अलग गंतव्य चुनें। पेपर प्रोजेक्ट को अपना एक नया या खाली फ़ोल्डर चाहिए।",$Je=((e={},n={})=>{const t=n.locale??z();return t==="zh-CN"?MJe():t==="fa"?OJe():t==="ar"?DJe():t==="es"?LJe():t==="hi"?IJe():RJe()}),BJe=e=>`Change project folder; current folder: ${e==null?void 0:e.path}`,PJe=e=>`更改项目文件夹;当前文件夹:${e==null?void 0:e.path}`,FJe=e=>`تغییر پوشهٔ پروژه؛ پوشهٔ کنونی: ${e==null?void 0:e.path}`,HJe=e=>`تغيير مجلد المشروع؛ المجلد الحالي: ${e==null?void 0:e.path}`,qJe=e=>`Cambiar la carpeta del proyecto; carpeta actual: ${e==null?void 0:e.path}`,UJe=e=>`प्रोजेक्ट फ़ोल्डर बदलें; मौजूदा फ़ोल्डर: ${e==null?void 0:e.path}`,GJe=((e,n={})=>{const t=n.locale??z();return t==="zh-CN"?PJe(e):t==="fa"?FJe(e):t==="ar"?HJe(e):t==="es"?qJe(e):t==="hi"?UJe(e):BJe(e)}),VJe=()=>"Choose an existing project folder",KJe=()=>"选择现有项目文件夹",WJe=()=>"انتخاب پوشهٔ موجود پروژه",QJe=()=>"اختر مجلد مشروع موجود",XJe=()=>"Elige una carpeta de proyecto existente",YJe=()=>"एक मौजूदा प्रोजेक्ट फ़ोल्डर चुनें",DN=((e={},n={})=>{const t=n.locale??z();return t==="zh-CN"?KJe():t==="fa"?WJe():t==="ar"?QJe():t==="es"?XJe():t==="hi"?YJe():VJe()}),ZJe=()=>"Choosing…",JJe=()=>"正在选择…",eet=()=>"در حال انتخاب…",tet=()=>"جارٍ الاختيار…",net=()=>"Eligiendo…",ret=()=>"चुना जा रहा है…",set=((e={},n={})=>{const t=n.locale??z();return t==="zh-CN"?JJe():t==="fa"?eet():t==="ar"?tet():t==="es"?net():t==="hi"?ret():ZJe()}),iet=()=>"Clone destination",aet=()=>"克隆位置",oet=()=>"مقصد کلون",cet=()=>"وجهة الاستنساخ",uet=()=>"Destino del clon",_et=()=>"क्लोन गंतव्य",fet=((e={},n={})=>{const t=n.locale??z();return t==="zh-CN"?aet():t==="fa"?oet():t==="ar"?cet():t==="es"?uet():t==="hi"?_et():iet()}),det=()=>"Clone paper project",het=()=>"克隆论文项目",pet=()=>"کلون پروژهٔ مقاله",met=()=>"استنساخ مشروع الورقة",get=()=>"Clonar proyecto del paper",vet=()=>"पेपर प्रोजेक्ट क्लोन करें",bet=((e={},n={})=>{const t=n.locale??z();return t==="zh-CN"?het():t==="fa"?pet():t==="ar"?met():t==="es"?get():t==="hi"?vet():det()}),yet=()=>"Create project",xet=()=>"创建项目",wet=()=>"ایجاد پروژه",ket=()=>"إنشاء المشروع",Cet=()=>"Crear proyecto",Eet=()=>"प्रोजेक्ट बनाएं",LN=((e={},n={})=>{const t=n.locale??z();return t==="zh-CN"?xet():t==="fa"?wet():t==="ar"?ket():t==="es"?Cet():t==="hi"?Eet():yet()}),Net=()=>"Creating…",zet=()=>"正在创建…",jet=()=>"در حال ایجاد…",Tet=()=>"جارٍ الإنشاء…",Aet=()=>"Creando…",Ret=()=>"बनाया जा रहा है…",Met=((e={},n={})=>{const t=n.locale??z();return t==="zh-CN"?zet():t==="fa"?jet():t==="ar"?Tet():t==="es"?Aet():t==="hi"?Ret():Net()}),Oet=()=>"Choose a different destination. This path is a file, not a folder.",Det=()=>"请选择其他位置。此路径是文件,不是文件夹。",Let=()=>"مقصد دیگری انتخاب کنید. این مسیر فایل است، نه پوشه.",Iet=()=>"اختر وجهة مختلفة. هذا المسار ملف وليس مجلدًا.",$et=()=>"Elige otro destino. Esta ruta es un archivo, no una carpeta.",Bet=()=>"अलग गंतव्य चुनें। यह पथ एक फ़ाइल है, फ़ोल्डर नहीं।",U2=((e={},n={})=>{const t=n.locale??z();return t==="zh-CN"?Det():t==="fa"?Let():t==="ar"?Iet():t==="es"?$et():t==="hi"?Bet():Oet()}),Pet=()=>"A folder already exists here. Choose a different name or location, or use Existing folder.",Fet=()=>"此处已有文件夹。请选择其他名称或位置,或使用“现有文件夹”。",Het=()=>"پوشه‌ای در این محل وجود دارد. نام یا محل دیگری انتخاب کنید، یا از «پوشهٔ موجود» استفاده کنید.",qet=()=>"يوجد مجلد هنا بالفعل. اختر اسمًا أو موقعًا مختلفًا، أو استخدم «مجلد موجود».",Uet=()=>"Ya existe una carpeta aquí. Elige otro nombre u otra ubicación, o usa Carpeta existente.",Get=()=>"यहाँ पहले से एक फ़ोल्डर मौजूद है। अलग नाम या स्थान चुनें, या मौजूदा फ़ोल्डर का इस्तेमाल करें।",IN=((e={},n={})=>{const t=n.locale??z();return t==="zh-CN"?Fet():t==="fa"?Het():t==="ar"?qet():t==="es"?Uet():t==="hi"?Get():Pet()}),Vet=()=>"Blank project",Ket=()=>"空白项目",Wet=()=>"پروژهٔ خالی",Qet=()=>"مشروع فارغ",Xet=()=>"Proyecto en blanco",Yet=()=>"खाली प्रोजेक्ट",Zet=((e={},n={})=>{const t=n.locale??z();return t==="zh-CN"?Ket():t==="fa"?Wet():t==="ar"?Qet():t==="es"?Xet():t==="hi"?Yet():Vet()}),Jet=()=>"Cancel",ett=()=>"取消",ttt=()=>"لغو",ntt=()=>"إلغاء",rtt=()=>"Cancelar",stt=()=>"रद्द करें",itt=((e={},n={})=>{const t=n.locale??z();return t==="zh-CN"?ett():t==="fa"?ttt():t==="ar"?ntt():t==="es"?rtt():t==="hi"?stt():Jet()}),att=()=>"Change",ott=()=>"更改",ltt=()=>"تغییر",ctt=()=>"تغيير",utt=()=>"Cambiar",_tt=()=>"बदलें",ftt=((e={},n={})=>{const t=n.locale??z();return t==="zh-CN"?ott():t==="fa"?ltt():t==="ar"?ctt():t==="es"?utt():t==="hi"?_tt():att()}),dtt=()=>"Change selected paper",htt=()=>"更改所选论文",ptt=()=>"تغییر مقالهٔ انتخاب‌شده",mtt=()=>"تغيير الورقة المحددة",gtt=()=>"Cambiar el paper seleccionado",vtt=()=>"चयनित पेपर बदलें",btt=((e={},n={})=>{const t=n.locale??z();return t==="zh-CN"?htt():t==="fa"?ptt():t==="ar"?mtt():t==="es"?gtt():t==="hi"?vtt():dtt()}),ytt=()=>"Check out a Git branch before using this folder.",xtt=()=>"使用此文件夹前,请先检出一个 Git 分支。",wtt=()=>"پیش از استفاده از این پوشه، یک شاخهٔ Git را checkout کنید.",ktt=()=>"انتقل إلى فرع Git قبل استخدام هذا المجلد.",Stt=()=>"Haz checkout de una rama de Git antes de usar esta carpeta.",Ctt=()=>"इस फ़ोल्डर का उपयोग करने से पहले एक Git ब्रांच चेक आउट करें।",Ett=((e={},n={})=>{const t=n.locale??z();return t==="zh-CN"?xtt():t==="fa"?wtt():t==="ar"?ktt():t==="es"?Stt():t==="hi"?Ctt():ytt()}),Ntt=()=>"Checking project location.",ztt=()=>"正在检查项目位置。",jtt=()=>"در حال بررسی محل پروژه.",Ttt=()=>"جارٍ التحقق من موقع المشروع.",Att=()=>"Comprobando la ubicación del proyecto.",Rtt=()=>"प्रोजेक्ट स्थान जाँचा जा रहा है।",$N=((e={},n={})=>{const t=n.locale??z();return t==="zh-CN"?ztt():t==="fa"?jtt():t==="ar"?Ttt():t==="es"?Att():t==="hi"?Rtt():Ntt()}),Mtt=()=>"Existing folder",Ott=()=>"现有文件夹",Dtt=()=>"پوشهٔ موجود",Ltt=()=>"مجلد موجود",Itt=()=>"Carpeta existente",$tt=()=>"मौजूदा फ़ोल्डर",Btt=((e={},n={})=>{const t=n.locale??z();return t==="zh-CN"?Ott():t==="fa"?Dtt():t==="ar"?Ltt():t==="es"?Itt():t==="hi"?$tt():Mtt()}),Ptt=()=>"Experiment branches will be pushed to the remote GitHub repository.",Ftt=()=>"实验分支将推送到远程 GitHub 仓库。",Htt=()=>"شاخه‌های آزمایش به مخزن دوردست GitHub فرستاده می‌شوند.",qtt=()=>"ستُرفع فروع التجارب إلى مستودع GitHub البعيد.",Utt=()=>"Las ramas de los experimentos se subirán al repositorio remoto de GitHub.",Gtt=()=>"प्रयोग ब्रांच रिमोट GitHub रिपॉज़िटरी पर पुश की जाएंगी।",Vtt=((e={},n={})=>{const t=n.locale??z();return t==="zh-CN"?Ftt():t==="fa"?Htt():t==="ar"?qtt():t==="es"?Utt():t==="hi"?Gtt():Ptt()}),Ktt=()=>"From a paper",Wtt=()=>"从论文创建",Qtt=()=>"از یک مقاله",Xtt=()=>"من ورقة بحثية",Ytt=()=>"A partir de un paper",Ztt=()=>"एक पेपर से",Jtt=((e={},n={})=>{const t=n.locale??z();return t==="zh-CN"?Wtt():t==="fa"?Qtt():t==="ar"?Xtt():t==="es"?Ytt():t==="hi"?Ztt():Ktt()}),ent=()=>"Git is required for experiments but is not installed. Install Git, then restart OpenResearch.",tnt=()=>"实验需要 Git,但尚未安装。请安装 Git,然后重新启动 OpenResearch。",nnt=()=>"Git برای آزمایش‌ها لازم است اما نصب نیست. Git را نصب و سپس OpenResearch را دوباره راه‌اندازی کنید.",rnt=()=>"‏Git مطلوب للتجارب لكنه غير مثبّت. ثبّت Git ثم أعد تشغيل OpenResearch.",snt=()=>"Git es necesario para los experimentos, pero no está instalado. Instala Git y reinicia OpenResearch.",int=()=>"प्रयोगों के लिए Git ज़रूरी है पर इंस्टॉल नहीं है। Git इंस्टॉल करें, फिर OpenResearch फिर से शुरू करें।",ant=((e={},n={})=>{const t=n.locale??z();return t==="zh-CN"?tnt():t==="fa"?nnt():t==="ar"?rnt():t==="es"?snt():t==="hi"?int():ent()}),ont=()=>"my-research",lnt=()=>"my-research",cnt=()=>"my-research",unt=()=>"my-research",_nt=()=>"mi-investigacion",fnt=()=>"मेरा-शोध",BN=((e={},n={})=>{const t=n.locale??z();return t==="zh-CN"?lnt():t==="fa"?cnt():t==="ar"?unt():t==="es"?_nt():t==="hi"?fnt():ont()}),dnt=()=>"No papers found. Try an arXiv ID, URL, or a different title.",hnt=()=>"未找到论文。请尝试 arXiv ID、网址或其他标题。",pnt=()=>"مقاله‌ای پیدا نشد. یک شناسهٔ arXiv، نشانی یا عنوان دیگری را امتحان کنید.",mnt=()=>"لم يُعثر على أوراق. جرّب معرّف arXiv أو رابطًا أو عنوانًا مختلفًا.",gnt=()=>"No se encontraron papers. Prueba con un ID de arXiv, una URL u otro título.",vnt=()=>"कोई पेपर नहीं मिला। एक arXiv ID, URL, या अलग शीर्षक आज़माएं।",bnt=((e={},n={})=>{const t=n.locale??z();return t==="zh-CN"?hnt():t==="fa"?pnt():t==="ar"?mnt():t==="es"?gnt():t==="hi"?vnt():dnt()}),ynt=()=>"No public repository found on alphaXiv",xnt=()=>"在 alphaXiv 上未找到公开仓库",wnt=()=>"مخزن عمومی‌ای در alphaXiv پیدا نشد",knt=()=>"لم يُعثر على مستودع عام على alphaXiv",Snt=()=>"No se encontró ningún repositorio público en alphaXiv",Cnt=()=>"alphaXiv पर कोई सार्वजनिक रिपॉज़िटरी नहीं मिली",Ent=((e={},n={})=>{const t=n.locale??z();return t==="zh-CN"?xnt():t==="fa"?wnt():t==="ar"?knt():t==="es"?Snt():t==="hi"?Cnt():ynt()}),Nnt=()=>"OpenResearch will start a blank project with this paper's PDF.",znt=()=>"OpenResearch 将使用此论文的 PDF 创建空白项目。",jnt=()=>"OpenResearch یک پروژهٔ خالی با PDF این مقاله آغاز می‌کند.",Tnt=()=>"سيبدأ OpenResearch مشروعًا فارغًا مع ملف PDF لهذه الورقة.",Ant=()=>"OpenResearch creará un proyecto en blanco con el PDF de este paper.",Rnt=()=>"OpenResearch इस पेपर की PDF के साथ एक खाली प्रोजेक्ट शुरू करेगा।",Mnt=((e={},n={})=>{const t=n.locale??z();return t==="zh-CN"?znt():t==="fa"?jnt():t==="ar"?Tnt():t==="es"?Ant():t==="hi"?Rnt():Nnt()}),Ont=()=>"Paper",Dnt=()=>"论文",Lnt=()=>"مقاله",Int=()=>"ورقة بحثية",$nt=()=>"Paper",Bnt=()=>"पेपर",Pnt=((e={},n={})=>{const t=n.locale??z();return t==="zh-CN"?Dnt():t==="fa"?Lnt():t==="ar"?Int():t==="es"?$nt():t==="hi"?Bnt():Ont()}),Fnt=()=>"Project location",Hnt=()=>"项目位置",qnt=()=>"محل پروژه",Unt=()=>"موقع المشروع",Gnt=()=>"Ubicación del proyecto",Vnt=()=>"प्रोजेक्ट स्थान",G2=((e={},n={})=>{const t=n.locale??z();return t==="zh-CN"?Hnt():t==="fa"?qnt():t==="ar"?Unt():t==="es"?Gnt():t==="hi"?Vnt():Fnt()}),Knt=()=>"Project name",Wnt=()=>"项目名称",Qnt=()=>"نام پروژه",Xnt=()=>"اسم المشروع",Ynt=()=>"Nombre del proyecto",Znt=()=>"प्रोजेक्ट नाम",PN=((e={},n={})=>{const t=n.locale??z();return t==="zh-CN"?Wnt():t==="fa"?Qnt():t==="ar"?Xnt():t==="es"?Ynt():t==="hi"?Znt():Knt()}),Jnt=()=>"Search for a paper by arXiv ID, URL, or title",ert=()=>"按 arXiv ID、网址或标题搜索论文",trt=()=>"جست‌وجوی مقاله با شناسهٔ arXiv، نشانی یا عنوان",nrt=()=>"ابحث عن ورقة بمعرّف arXiv أو رابط أو عنوان",rrt=()=>"Busca un paper por ID de arXiv, URL o título",srt=()=>"arXiv ID, URL, या शीर्षक से पेपर खोजें",irt=((e={},n={})=>{const t=n.locale??z();return t==="zh-CN"?ert():t==="fa"?trt():t==="ar"?nrt():t==="es"?rrt():t==="hi"?srt():Jnt()}),art=()=>"Sync experiments to GitHub",ort=()=>"将实验同步到 GitHub",lrt=()=>"همگام‌سازی آزمایش‌ها با GitHub",crt=()=>"مزامنة التجارب مع GitHub",urt=()=>"Sincronizar experimentos con GitHub",_rt=()=>"प्रयोग GitHub पर सिंक करें",frt=((e={},n={})=>{const t=n.locale??z();return t==="zh-CN"?ort():t==="fa"?lrt():t==="ar"?crt():t==="es"?urt():t==="hi"?_rt():art()}),drt=()=>"That folder no longer exists. Choose it again.",hrt=()=>"该文件夹已不存在。请重新选择。",prt=()=>"آن پوشه دیگر وجود ندارد. دوباره انتخابش کنید.",mrt=()=>"لم يعد ذلك المجلد موجودًا. اختره مجددًا.",grt=()=>"Esa carpeta ya no existe. Vuelve a elegirla.",vrt=()=>"वह फ़ोल्डर अब मौजूद नहीं है। इसे फिर से चुनें।",brt=((e={},n={})=>{const t=n.locale??z();return t==="zh-CN"?hrt():t==="fa"?prt():t==="ar"?mrt():t==="es"?grt():t==="hi"?vrt():drt()}),yrt=()=>"The selected folder contains an invalid Git repository.",xrt=()=>"所选文件夹包含无效的 Git 仓库。",wrt=()=>"پوشهٔ انتخاب‌شده یک مخزن Git نامعتبر دارد.",krt=()=>"يحتوي المجلد المحدد على مستودع Git غير صالح.",Srt=()=>"La carpeta seleccionada contiene un repositorio de Git no válido.",Crt=()=>"चयनित फ़ोल्डर में एक अमान्य Git रिपॉज़िटरी है।",Ert=((e={},n={})=>{const t=n.locale??z();return t==="zh-CN"?xrt():t==="fa"?wrt():t==="ar"?krt():t==="es"?Srt():t==="hi"?Crt():yrt()}),Nrt=()=>"The selected path is not a folder.",zrt=()=>"所选路径不是文件夹。",jrt=()=>"مسیر انتخاب‌شده پوشه نیست.",Trt=()=>"المسار المحدد ليس مجلدًا.",Art=()=>"La ruta seleccionada no es una carpeta.",Rrt=()=>"चयनित पथ एक फ़ोल्डर नहीं है।",Mrt=((e={},n={})=>{const t=n.locale??z();return t==="zh-CN"?zrt():t==="fa"?jrt():t==="ar"?Trt():t==="es"?Art():t==="hi"?Rrt():Nrt()}),Ort=e=>`Checking ${e==null?void 0:e.repository}.`,Drt=e=>`正在检查 ${e==null?void 0:e.repository}。`,Lrt=e=>`در حال بررسی ${e==null?void 0:e.repository}.`,Irt=e=>`جارٍ التحقق من ${e==null?void 0:e.repository}.`,$rt=e=>`Comprobando ${e==null?void 0:e.repository}.`,Brt=e=>`${e==null?void 0:e.repository} जाँची जा रही है।`,Prt=((e,n={})=>{const t=n.locale??z();return t==="zh-CN"?Drt(e):t==="fa"?Lrt(e):t==="ar"?Irt(e):t==="es"?$rt(e):t==="hi"?Brt(e):Ort(e)}),Frt=e=>`Creates ${e==null?void 0:e.repository}.`,Hrt=e=>`将创建 ${e==null?void 0:e.repository}。`,qrt=e=>`${e==null?void 0:e.repository} را ایجاد می‌کند.`,Urt=e=>`ينشئ ${e==null?void 0:e.repository}.`,Grt=e=>`Crea ${e==null?void 0:e.repository}.`,Vrt=e=>`${e==null?void 0:e.repository} बनाता है।`,Krt=((e,n={})=>{const t=n.locale??z();return t==="zh-CN"?Hrt(e):t==="fa"?qrt(e):t==="ar"?Urt(e):t==="es"?Grt(e):t==="hi"?Vrt(e):Frt(e)}),Wrt=e=>`Pushes to ${e==null?void 0:e.repository}.`,Qrt=e=>`将推送到 ${e==null?void 0:e.repository}。`,Xrt=e=>`به ${e==null?void 0:e.repository} پوش می‌کند.`,Yrt=e=>`يرفع التغييرات إلى ${e==null?void 0:e.repository}.`,Zrt=e=>`Sube los cambios a ${e==null?void 0:e.repository}.`,Jrt=e=>`${e==null?void 0:e.repository} पर पुश करता है।`,est=((e,n={})=>{const t=n.locale??z();return t==="zh-CN"?Qrt(e):t==="fa"?Xrt(e):t==="ar"?Yrt(e):t==="es"?Zrt(e):t==="hi"?Jrt(e):Wrt(e)}),tst=()=>"Project location is required.",nst=()=>"必须填写项目位置。",rst=()=>"محل پروژه الزامی است.",sst=()=>"موقع المشروع مطلوب.",ist=()=>"La ubicación del proyecto es obligatoria.",ast=()=>"प्रोजेक्ट स्थान ज़रूरी है।",FN=((e={},n={})=>{const t=n.locale??z();return t==="zh-CN"?nst():t==="fa"?rst():t==="ar"?sst():t==="es"?ist():t==="hi"?ast():tst()}),ost=()=>"Choose a different destination. The paper repository needs a new or empty folder.",lst=()=>"请选择其他位置。论文仓库需要一个新的或空的文件夹。",cst=()=>"مقصد دیگری انتخاب کنید. مخزن مقاله به پوشه‌ای جدید یا خالی نیاز دارد.",ust=()=>"اختر وجهة مختلفة. يحتاج مستودع الورقة إلى مجلد جديد أو فارغ.",_st=()=>"Elige otro destino. El repositorio del paper necesita una carpeta nueva o vacía.",fst=()=>"अलग गंतव्य चुनें। पेपर रिपॉज़िटरी को एक नए या खाली फ़ोल्डर की ज़रूरत है।",HN=((e={},n={})=>{const t=n.locale??z();return t==="zh-CN"?lst():t==="fa"?cst():t==="ar"?ust():t==="es"?_st():t==="hi"?fst():ost()}),dst=()=>"A linked public code repository is cloned without credentials.",hst=()=>"关联的公开代码仓库无需凭据即可克隆。",pst=()=>"مخزن عمومی کدِ پیوندشده بدون نیاز به اعتبارنامه کلون می‌شود.",mst=()=>"يُستنسخ مستودع شيفرة عام مرتبط دون بيانات اعتماد.",gst=()=>"El repositorio de código público vinculado se clona sin credenciales.",vst=()=>"एक लिंक की गई सार्वजनिक कोड रिपॉज़िटरी बिना क्रेडेंशियल के क्लोन की जाती है।",bst=((e={},n={})=>{const t=n.locale??z();return t==="zh-CN"?hst():t==="fa"?pst():t==="ar"?mst():t==="es"?gst():t==="hi"?vst():dst()}),yst=e=>`Run ${e==null?void 0:e.command} before creating the project.`,xst=e=>`创建项目前请运行 ${e==null?void 0:e.command}。`,wst=e=>`پیش از ساخت پروژه، ${e==null?void 0:e.command} را اجرا کنید.`,kst=e=>`نفّذ ${e==null?void 0:e.command} قبل إنشاء المشروع.`,Sst=e=>`Ejecuta ${e==null?void 0:e.command} antes de crear el proyecto.`,Cst=e=>`प्रोजेक्ट बनाने से पहले ${e==null?void 0:e.command} चलाएं।`,Est=((e,n={})=>{const t=n.locale??z();return t==="zh-CN"?xst(e):t==="fa"?wst(e):t==="ar"?kst(e):t==="es"?Sst(e):t==="hi"?Cst(e):yst(e)}),Nst=()=>"Searching alphaXiv…",zst=()=>"正在搜索 alphaXiv…",jst=()=>"در حال جست‌وجوی alphaXiv…",Tst=()=>"جارٍ البحث في alphaXiv…",Ast=()=>"Buscando en alphaXiv…",Rst=()=>"alphaXiv खोजा जा रहा है…",Mst=((e={},n={})=>{const t=n.locale??z();return t==="zh-CN"?zst():t==="fa"?jst():t==="ar"?Tst():t==="es"?Ast():t==="hi"?Rst():Nst()}),Ost=()=>"Use folder",Dst=()=>"使用文件夹",Lst=()=>"استفاده از پوشه",Ist=()=>"استخدام المجلد",$st=()=>"Usar carpeta",Bst=()=>"फ़ोल्डर इस्तेमाल करें",Pst=((e={},n={})=>{const t=n.locale??z();return t==="zh-CN"?Dst():t==="fa"?Lst():t==="ar"?Ist():t==="es"?$st():t==="hi"?Bst():Ost()}),Fst=()=>"Can’t reach OpenResearch. This page is no longer live.",Hst=()=>"无法连接 OpenResearch。此页面已不再实时同步。",qst=()=>"دسترسی به OpenResearch ممکن نیست. این صفحه دیگر همگام نیست.",Ust=()=>"تعذّر الاتصال بـ OpenResearch. لم تعد هذه الصفحة تُحدَّث تلقائيًا.",Gst=()=>"No se puede conectar con OpenResearch. Esta página ya no se actualiza.",Vst=()=>"OpenResearch तक नहीं पहुँच सके। यह पेज अब लाइव नहीं है।",J4=((e={},n={})=>{const t=n.locale??z();return t==="zh-CN"?Hst():t==="fa"?qst():t==="ar"?Ust():t==="es"?Gst():t==="hi"?Vst():Fst()}),Kst=()=>"A workspace for your research agents",Wst=()=>"面向研究智能体的工作空间",Qst=()=>"فضای کاری برای عامل‌های پژوهشی شما",Xst=()=>"مساحة عمل لوكلاء بحثك",Yst=()=>"Un espacio de trabajo para tus agentes de investigación",Zst=()=>"आपके शोध एजेंटों के लिए एक वर्कस्पेस",Jst=((e={},n={})=>{const t=n.locale??z();return t==="zh-CN"?Wst():t==="fa"?Qst():t==="ar"?Xst():t==="es"?Yst():t==="hi"?Zst():Kst()}),eit=()=>"Add papers that represent your research interests, including papers by other authors.",tit=()=>"添加能够代表你研究兴趣的论文,也可以包括其他作者的论文。",nit=()=>"مقاله‌هایی را که نمایندهٔ علایق پژوهشی شما هستند، از جمله آثار نویسندگان دیگر، اضافه کنید.",rit=()=>"أضِف أوراقًا تمثّل اهتماماتك البحثية، بما في ذلك أوراق لمؤلفين آخرين.",sit=()=>"Añade papers que representen tus intereses de investigación, incluidos papers de otros autores.",iit=()=>"ऐसे पेपर जोड़ें जो आपकी शोध रुचियों को दर्शाते हों, चाहे वे किसी और लेखक के ही क्यों न हों।",ait=((e={},n={})=>{const t=n.locale??z();return t==="zh-CN"?tit():t==="fa"?nit():t==="ar"?rit():t==="es"?sit():t==="hi"?iit():eit()}),oit=()=>"API key",lit=()=>"API 密钥",cit=()=>"کلید API",uit=()=>"مفتاح API",_it=()=>"Clave de API",fit=()=>"API की",Dk=((e={},n={})=>{const t=n.locale??z();return t==="zh-CN"?lit():t==="fa"?cit():t==="ar"?uit():t==="es"?_it():t==="hi"?fit():oit()}),dit=()=>"AI/ML",hit=()=>"人工智能与机器学习",pit=()=>"هوش مصنوعی و یادگیری ماشین",mit=()=>"الذكاء الاصطناعي/تعلّم الآلة",git=()=>"IA/ML",vit=()=>"AI/ML",bit=((e={},n={})=>{const t=n.locale??z();return t==="zh-CN"?hit():t==="fa"?pit():t==="ar"?mit():t==="es"?git():t==="hi"?vit():dit()}),yit=()=>"Biology",xit=()=>"生物学",wit=()=>"زیست‌شناسی",kit=()=>"الأحياء",Sit=()=>"Biología",Cit=()=>"जीव विज्ञान",Eit=((e={},n={})=>{const t=n.locale??z();return t==="zh-CN"?xit():t==="fa"?wit():t==="ar"?kit():t==="es"?Sit():t==="hi"?Cit():yit()}),Nit=()=>"Other",zit=()=>"其他",jit=()=>"سایر",Tit=()=>"أخرى",Ait=()=>"Otra",Rit=()=>"अन्य",Mit=((e={},n={})=>{const t=n.locale??z();return t==="zh-CN"?zit():t==="fa"?jit():t==="ar"?Tit():t==="es"?Ait():t==="hi"?Rit():Nit()}),Oit=()=>"Physics",Dit=()=>"物理学",Lit=()=>"فیزیک",Iit=()=>"الفيزياء",$it=()=>"Física",Bit=()=>"भौतिकी",Pit=((e={},n={})=>{const t=n.locale??z();return t==="zh-CN"?Dit():t==="fa"?Lit():t==="ar"?Iit():t==="es"?$it():t==="hi"?Bit():Oit()}),Fit=()=>"Back",Hit=()=>"返回",qit=()=>"بازگشت",Uit=()=>"رجوع",Git=()=>"Atrás",Vit=()=>"वापस",qN=((e={},n={})=>{const t=n.locale??z();return t==="zh-CN"?Hit():t==="fa"?qit():t==="ar"?Uit():t==="es"?Git():t==="hi"?Vit():Fit()}),Kit=()=>"Check failed",Wit=()=>"检查失败",Qit=()=>"بررسی ناموفق بود",Xit=()=>"فشل الفحص",Yit=()=>"Error en la comprobación",Zit=()=>"जाँच विफल",Jit=((e={},n={})=>{const t=n.locale??z();return t==="zh-CN"?Wit():t==="fa"?Qit():t==="ar"?Xit():t==="es"?Yit():t==="hi"?Zit():Kit()}),eat=()=>"Checking",tat=()=>"正在检查",nat=()=>"در حال بررسی",rat=()=>"جارٍ الفحص",sat=()=>"Comprobando",iat=()=>"जाँचा जा रहा है",aat=((e={},n={})=>{const t=n.locale??z();return t==="zh-CN"?tat():t==="fa"?nat():t==="ar"?rat():t==="es"?sat():t==="hi"?iat():eat()}),oat=()=>"Checking Git…",lat=()=>"正在检查 Git…",cat=()=>"در حال بررسی Git…",uat=()=>"جارٍ فحص Git…",_at=()=>"Comprobando Git…",fat=()=>"Git जाँचा जा रहा है…",dat=((e={},n={})=>{const t=n.locale??z();return t==="zh-CN"?lat():t==="fa"?cat():t==="ar"?uat():t==="es"?_at():t==="hi"?fat():oat()}),hat=()=>"Choose a coding agent",pat=()=>"选择编程智能体",mat=()=>"یک عامل کدنویسی انتخاب کنید",gat=()=>"اختر وكيل برمجة",vat=()=>"Elige un agente de programación",bat=()=>"एक कोडिंग एजेंट चुनें",yat=((e={},n={})=>{const t=n.locale??z();return t==="zh-CN"?pat():t==="fa"?mat():t==="ar"?gat():t==="es"?vat():t==="hi"?bat():hat()}),xat=()=>"Choose a coding agent to continue.",wat=()=>"选择一个编程智能体以继续。",kat=()=>"برای ادامه یک عامل کدنویسی انتخاب کنید.",Sat=()=>"اختر وكيل برمجة للمتابعة.",Cat=()=>"Elige un agente de programación para continuar.",Eat=()=>"जारी रखने के लिए एक कोडिंग एजेंट चुनें।",Nat=((e={},n={})=>{const t=n.locale??z();return t==="zh-CN"?wat():t==="fa"?kat():t==="ar"?Sat():t==="es"?Cat():t==="hi"?Eat():xat()}),zat=()=>"Choose another coding agent",jat=()=>"选择其他编程智能体",Tat=()=>"انتخاب یک عامل برنامه‌نویسی دیگر",Aat=()=>"اختيار وكيل برمجة آخر",Rat=()=>"Elegir otro agente de programación",Mat=()=>"दूसरा कोडिंग एजेंट चुनें",Oat=((e={},n={})=>{const t=n.locale??z();return t==="zh-CN"?jat():t==="fa"?Tat():t==="ar"?Aat():t==="es"?Rat():t==="hi"?Mat():zat()}),Dat=()=>"Choose at least one research area to continue.",Lat=()=>"请至少选择一个研究领域后再继续。",Iat=()=>"برای ادامه دست‌کم یک حوزهٔ پژوهشی انتخاب کنید.",$at=()=>"اختر مجالًا بحثيًا واحدًا على الأقل للمتابعة.",Bat=()=>"Elige al menos un área de investigación para continuar.",Pat=()=>"जारी रखने के लिए कम से कम एक शोध क्षेत्र चुनें।",Fat=((e={},n={})=>{const t=n.locale??z();return t==="zh-CN"?Lat():t==="fa"?Iat():t==="ar"?$at():t==="es"?Bat():t==="hi"?Pat():Dat()}),Hat=()=>"Choose one or more.",qat=()=>"请选择一项或多项。",Uat=()=>"یک یا چند مورد را انتخاب کنید.",Gat=()=>"اختر واحدًا أو أكثر.",Vat=()=>"Elige una o varias.",Kat=()=>"एक या अधिक चुनें।",Wat=((e={},n={})=>{const t=n.locale??z();return t==="zh-CN"?qat():t==="fa"?Uat():t==="ar"?Gat():t==="es"?Vat():t==="hi"?Kat():Hat()}),Qat=()=>"Choose your preferred coding agent",Xat=()=>"请选择首选编程智能体",Yat=()=>"عامل برنامه‌نویسی ترجیحی خود را انتخاب کنید",Zat=()=>"اختر وكيل البرمجة المفضّل لديك",Jat=()=>"Elige tu agente de programación preferido",eot=()=>"अपना पसंदीदा कोडिंग एजेंट चुनें",tot=((e={},n={})=>{const t=n.locale??z();return t==="zh-CN"?Xat():t==="fa"?Yat():t==="ar"?Zat():t==="es"?Jat():t==="hi"?eot():Qat()}),not=()=>"Consolidate your research",rot=()=>"集中管理研究",sot=()=>"پژوهش خود را یکپارچه کنید",iot=()=>"وحّد أبحاثك",aot=()=>"Consolida tu investigación",oot=()=>"अपने शोध को एक जगह लाएं",lot=((e={},n={})=>{const t=n.locale??z();return t==="zh-CN"?rot():t==="fa"?sot():t==="ar"?iot():t==="es"?aot():t==="hi"?oot():not()}),cot=()=>"Continue",uot=()=>"继续",_ot=()=>"ادامه",fot=()=>"متابعة",dot=()=>"Continuar",hot=()=>"जारी रखें",UN=((e={},n={})=>{const t=n.locale??z();return t==="zh-CN"?uot():t==="fa"?_ot():t==="ar"?fot():t==="es"?dot():t==="hi"?hot():cot()}),pot=()=>"Describe your research area to continue.",mot=()=>"请描述你的研究领域后再继续。",got=()=>"برای ادامه حوزهٔ پژوهشی خود را شرح دهید.",vot=()=>"صِف مجالك البحثي للمتابعة.",bot=()=>"Describe tu área de investigación para continuar.",yot=()=>"जारी रखने के लिए अपना शोध क्षेत्र बताएं।",xot=((e={},n={})=>{const t=n.locale??z();return t==="zh-CN"?mot():t==="fa"?got():t==="ar"?vot():t==="es"?bot():t==="hi"?yot():pot()}),wot=()=>"Detecting Claude Code, Codex, OpenCode, Cursor, Antigravity…",kot=()=>"正在检测 Claude Code、Codex、OpenCode、Cursor、Antigravity…",Sot=()=>"در حال شناسایی Claude Code، Codex، OpenCode و Cursor و Antigravity…",Cot=()=>"جارٍ اكتشاف Claude Code وCodex وOpenCode وCursor وAntigravity…",Eot=()=>"Detectando Claude Code, Codex, OpenCode, Cursor, Google Antigravity…",Not=()=>"Claude Code, Codex, OpenCode, Cursor, Google Antigravity पहचाने जा रहे हैं…",zot=((e={},n={})=>{const t=n.locale??z();return t==="zh-CN"?kot():t==="fa"?Sot():t==="ar"?Cot():t==="es"?Eot():t==="hi"?Not():wot()}),jot=()=>"e.g. I work on sample-efficient RL for LLM post-training, focused on reward-model-free methods.",Tot=()=>"例如:我研究用于 LLM 后训练的样本高效强化学习,重点关注无需奖励模型的方法。",Aot=()=>"مثلاً روی یادگیری تقویتی کم‌نمونه برای پس‌آموزش LLM با تمرکز بر روش‌های بدون مدل پاداش کار می‌کنم.",Rot=()=>"مثال: أعمل على تعلّم معزّز عالي الكفاءة في العيّنات لِما بعد تدريب نماذج اللغة الكبيرة، مع التركيز على الطرق التي لا تعتمد على نماذج المكافأة.",Mot=()=>"p. ej., trabajo en RL eficiente en muestras para el post-entrenamiento de LLM, centrado en métodos sin modelo de recompensa.",Oot=()=>"जैसे: मैं LLM पोस्ट-ट्रेनिंग के लिए सैंपल-एफ़िशिएंट RL पर काम करता/करती हूँ, रिवॉर्ड-मॉडल-फ्री तरीकों पर ध्यान केंद्रित करते हुए।",Dot=((e={},n={})=>{const t=n.locale??z();return t==="zh-CN"?Tot():t==="fa"?Aot():t==="ar"?Rot():t==="es"?Mot():t==="hi"?Oot():jot()}),Lot=()=>"Error details",Iot=()=>"错误详情",$ot=()=>"جزئیات خطا",Bot=()=>"تفاصيل الخطأ",Pot=()=>"Detalles del error",Fot=()=>"त्रुटि विवरण",Hot=((e={},n={})=>{const t=n.locale??z();return t==="zh-CN"?Iot():t==="fa"?$ot():t==="ar"?Bot():t==="es"?Pot():t==="hi"?Fot():Lot()}),qot=()=>"Everything stays local",Uot=()=>"一切都保留在本地",Got=()=>"همه‌چیز محلی می‌ماند",Vot=()=>"كل شيء يبقى محليًا",Kot=()=>"Todo se queda en local",Wot=()=>"सब कुछ लोकल ही रहता है",Qot=((e={},n={})=>{const t=n.locale??z();return t==="zh-CN"?Uot():t==="fa"?Got():t==="ar"?Vot():t==="es"?Kot():t==="hi"?Wot():qot()}),Xot=()=>"Get started",Yot=()=>"开始使用",Zot=()=>"شروع",Jot=()=>"ابدأ الآن",elt=()=>"Empezar",tlt=()=>"शुरू करें",nlt=((e={},n={})=>{const t=n.locale??z();return t==="zh-CN"?Yot():t==="fa"?Zot():t==="ar"?Jot():t==="es"?elt():t==="hi"?tlt():Xot()}),rlt=()=>"Git is required for local experiments. Install Git, then re-check.",slt=()=>"本地实验需要 Git。请安装 Git,然后重新检查。",ilt=()=>"Git برای آزمایش‌های محلی لازم است. آن را نصب و دوباره بررسی کنید.",alt=()=>"‏Git مطلوب للتجارب المحلية. ثبّت Git ثم أعد الفحص.",olt=()=>"Git es necesario para los experimentos locales. Instala Git y vuelve a comprobarlo.",llt=()=>"स्थानीय प्रयोगों के लिए Git ज़रूरी है। Git इंस्टॉल करें, फिर फिर से जाँचें।",GN=((e={},n={})=>{const t=n.locale??z();return t==="zh-CN"?slt():t==="fa"?ilt():t==="ar"?alt():t==="es"?olt():t==="hi"?llt():rlt()}),clt=()=>"Ground your agents",ult=()=>"为智能体提供可靠依据",_lt=()=>"عامل‌هایتان را به منابع متصل کنید",flt=()=>"زوّد وكلاءك بأساس بحثي",dlt=()=>"Dale contexto a tus agentes",hlt=()=>"अपने एजेंटों को आधार दें",plt=((e={},n={})=>{const t=n.locale??z();return t==="zh-CN"?ult():t==="fa"?_lt():t==="ar"?flt():t==="es"?dlt():t==="hi"?hlt():clt()}),mlt=()=>"Install broken",glt=()=>"安装损坏",vlt=()=>"نصب خراب است",blt=()=>"التثبيت معطوب",ylt=()=>"Instalación dañada",xlt=()=>"इंस्टॉल खराब है",wlt=((e={},n={})=>{const t=n.locale??z();return t==="zh-CN"?glt():t==="fa"?vlt():t==="ar"?blt():t==="es"?ylt():t==="hi"?xlt():mlt()}),klt=()=>"Install Git to continue",Slt=()=>"请安装 Git 后再继续",Clt=()=>"برای ادامه Git را نصب کنید",Elt=()=>"ثبّت Git للمتابعة",Nlt=()=>"Instala Git para continuar",zlt=()=>"जारी रखने के लिए Git इंस्टॉल करें",jlt=((e={},n={})=>{const t=n.locale??z();return t==="zh-CN"?Slt():t==="fa"?Clt():t==="ar"?Elt():t==="es"?Nlt():t==="hi"?zlt():klt()}),Tlt=()=>"Loading account details…",Alt=()=>"正在加载账户信息…",Rlt=()=>"در حال بارگذاری اطلاعات حساب…",Mlt=()=>"جارٍ تحميل تفاصيل الحساب…",Olt=()=>"Cargando los datos de la cuenta…",Dlt=()=>"खाता विवरण लोड हो रहा है…",Llt=((e={},n={})=>{const t=n.locale??z();return t==="zh-CN"?Alt():t==="fa"?Rlt():t==="ar"?Mlt():t==="es"?Olt():t==="hi"?Dlt():Tlt()}),Ilt=()=>"Local Git",$lt=()=>"本地 Git",Blt=()=>"Git محلی",Plt=()=>"Git محلي",Flt=()=>"Git local",Hlt=()=>"लोकल Git",qlt=((e={},n={})=>{const t=n.locale??z();return t==="zh-CN"?$lt():t==="fa"?Blt():t==="ar"?Plt():t==="es"?Flt():t==="hi"?Hlt():Ilt()}),Ult=()=>"Install needed",Glt=()=>"需要安装",Vlt=()=>"نیاز به نصب",Klt=()=>"التثبيت مطلوب",Wlt=()=>"No detectado",Qlt=()=>"इंस्टॉल ज़रूरी है",VN=((e={},n={})=>{const t=n.locale??z();return t==="zh-CN"?Glt():t==="fa"?Vlt():t==="ar"?Klt():t==="es"?Wlt():t==="hi"?Qlt():Ult()}),Xlt=()=>"Not found",Ylt=()=>"未找到",Zlt=()=>"پیدا نشد",Jlt=()=>"غير موجود",ect=()=>"No encontrado",tct=()=>"नहीं मिला",TD=((e={},n={})=>{const t=n.locale??z();return t==="zh-CN"?Ylt():t==="fa"?Zlt():t==="ar"?Jlt():t==="es"?ect():t==="hi"?tct():Xlt()}),nct=()=>"Signed out",rct=()=>"未登录",sct=()=>"وارد نشده",ict=()=>"غير مسجل الدخول",act=()=>"Sin iniciar sesión",oct=()=>"साइन आउट",AD=((e={},n={})=>{const t=n.locale??z();return t==="zh-CN"?rct():t==="fa"?sct():t==="ar"?ict():t==="es"?act():t==="hi"?oct():nct()}),lct=()=>"OpenResearch uses a coding agent already installed on this machine.",cct=()=>"OpenResearch 使用这台计算机上已安装的编程智能体。",uct=()=>"OpenResearch از عامل کدنویسی نصب‌شده روی این دستگاه استفاده می‌کند.",_ct=()=>"يستخدم OpenResearch وكيل برمجة مثبّتًا مسبقًا على هذا الجهاز.",fct=()=>"OpenResearch usa un agente de programación que ya esté instalado en este equipo.",dct=()=>"OpenResearch इस मशीन पर पहले से इंस्टॉल किसी कोडिंग एजेंट का उपयोग करता है।",hct=((e={},n={})=>{const t=n.locale??z();return t==="zh-CN"?cct():t==="fa"?uct():t==="ar"?_ct():t==="es"?fct():t==="hi"?dct():lct()}),pct=()=>"Couldn’t verify OpenCode is ready. Retry to check its installation and models.",mct=()=>"无法确认 OpenCode 已就绪。请重试以检查安装和模型。",gct=()=>"آماده بودن OpenCode تأیید نشد. برای بررسی نصب و مدل‌ها دوباره تلاش کنید.",vct=()=>"تعذّر التحقق من جاهزية OpenCode. أعد المحاولة للتحقق من التثبيت والنماذج.",bct=()=>"No se pudo verificar que OpenCode esté listo. Vuelve a intentarlo para comprobar su instalación y sus modelos.",yct=()=>"यह सत्यापित नहीं हो सका कि OpenCode तैयार है। इसके इंस्टॉलेशन और मॉडल जाँचने के लिए फिर से कोशिश करें।",xct=((e={},n={})=>{const t=n.locale??z();return t==="zh-CN"?mct():t==="fa"?gct():t==="ar"?vct():t==="es"?bct():t==="hi"?yct():pct()}),wct=()=>"Other research area",kct=()=>"其他研究领域",Sct=()=>"حوزهٔ پژوهشی دیگر",Cct=()=>"مجال بحثي آخر",Ect=()=>"Otra área de investigación",Nct=()=>"अन्य शोध क्षेत्र",zct=((e={},n={})=>{const t=n.locale??z();return t==="zh-CN"?kct():t==="fa"?Sct():t==="ar"?Cct():t==="es"?Ect():t==="hi"?Nct():wct()}),jct=()=>"Re-check",Tct=()=>"重新检查",Act=()=>"بررسی دوباره",Rct=()=>"إعادة الفحص",Mct=()=>"Volver a comprobar",Oct=()=>"फिर से जाँचें",gv=((e={},n={})=>{const t=n.locale??z();return t==="zh-CN"?Tct():t==="fa"?Act():t==="ar"?Rct():t==="es"?Mct():t==="hi"?Oct():jct()}),Dct=()=>"Ready",Lct=()=>"已就绪",Ict=()=>"آماده",$ct=()=>"جاهز",Bct=()=>"Listo",Pct=()=>"तैयार",Lk=((e={},n={})=>{const t=n.locale??z();return t==="zh-CN"?Lct():t==="fa"?Ict():t==="ar"?$ct():t==="es"?Bct():t==="hi"?Pct():Dct()}),Fct=()=>"Re-check Git before continuing",Hct=()=>"请重新检查 Git 后再继续",qct=()=>"پیش از ادامه Git را دوباره بررسی کنید",Uct=()=>"أعد فحص Git قبل المتابعة",Gct=()=>"Vuelve a comprobar Git antes de continuar",Vct=()=>"जारी रखने से पहले Git फिर से जाँचें",Kct=((e={},n={})=>{const t=n.locale??z();return t==="zh-CN"?Hct():t==="fa"?qct():t==="ar"?Uct():t==="es"?Gct():t==="hi"?Vct():Fct()}),Wct=()=>"Representative papers",Qct=()=>"代表性论文",Xct=()=>"مقاله‌های شاخص",Yct=()=>"أوراق تمثّل اهتماماتك البحثية",Zct=()=>"Papers representativos",Jct=()=>"प्रतिनिधि पेपर",eut=((e={},n={})=>{const t=n.locale??z();return t==="zh-CN"?Qct():t==="fa"?Xct():t==="ar"?Yct():t==="es"?Zct():t==="hi"?Jct():Wct()}),tut=()=>"Research background",nut=()=>"研究背景",rut=()=>"پیشینهٔ پژوهشی",sut=()=>"الخلفية البحثية",iut=()=>"Trayectoria de investigación",aut=()=>"शोध पृष्ठभूमि",out=((e={},n={})=>{const t=n.locale??z();return t==="zh-CN"?nut():t==="fa"?rut():t==="ar"?sut():t==="es"?iut():t==="hi"?aut():tut()}),lut=()=>"Couldn’t reach orx. Check that it’s still running, then re-check.",cut=()=>"无法连接到 orx。请确认它仍在运行,然后重新检查。",uut=()=>"ارتباط با orx برقرار نشد. مطمئن شوید هنوز در حال اجراست و دوباره بررسی کنید.",_ut=()=>"تعذّر الوصول إلى orx. تأكد من أنه لا يزال يعمل، ثم أعد الفحص.",fut=()=>"No se pudo conectar con orx. Comprueba que sigue en ejecución y vuelve a comprobarlo.",dut=()=>"orx तक नहीं पहुँच सके। जाँचें कि यह अभी भी चल रहा है, फिर फिर से जाँचें।",V2=((e={},n={})=>{const t=n.locale??z();return t==="zh-CN"?cut():t==="fa"?uut():t==="ar"?_ut():t==="es"?fut():t==="hi"?dut():lut()}),hut=()=>"Search alphaXiv by title to link a paper…",put=()=>"按标题搜索 alphaXiv 以关联论文…",mut=()=>"برای پیوند مقاله، عنوان را در alphaXiv جست‌وجو کنید…",gut=()=>"ابحث في alphaXiv بالعنوان لربط ورقة…",vut=()=>"Busca en alphaXiv por título para vincular un paper…",but=()=>"एक पेपर लिंक करने के लिए शीर्षक से alphaXiv खोजें…",yut=((e={},n={})=>{const t=n.locale??z();return t==="zh-CN"?put():t==="fa"?mut():t==="ar"?gut():t==="es"?vut():t==="hi"?but():hut()}),xut=()=>"Searching alphaXiv…",wut=()=>"正在搜索 alphaXiv…",kut=()=>"در حال جست‌وجوی alphaXiv…",Sut=()=>"جارٍ البحث في alphaXiv…",Cut=()=>"Buscando en alphaXiv…",Eut=()=>"alphaXiv खोजा जा रहा है…",Nut=((e={},n={})=>{const t=n.locale??z();return t==="zh-CN"?wut():t==="fa"?kut():t==="ar"?Sut():t==="es"?Cut():t==="hi"?Eut():xut()}),zut=()=>"Selected",jut=()=>"已选择",Tut=()=>"انتخاب‌شده",Aut=()=>"محدد",Rut=()=>"Seleccionado",Mut=()=>"चयनित",Out=((e={},n={})=>{const t=n.locale??z();return t==="zh-CN"?jut():t==="fa"?Tut():t==="ar"?Aut():t==="es"?Rut():t==="hi"?Mut():zut()}),Dut=()=>"Local model unavailable",Lut=()=>"本地模型不可用",Iut=()=>"مدل محلی در دسترس نیست",$ut=()=>"النموذج المحلي غير متاح",But=()=>"Modelo local no disponible",Put=()=>"लोकल मॉडल उपलब्ध नहीं",RD=((e={},n={})=>{const t=n.locale??z();return t==="zh-CN"?Lut():t==="fa"?Iut():t==="ar"?$ut():t==="es"?But():t==="hi"?Put():Dut()}),Fut=()=>"Setting things up…",Hut=()=>"正在设置…",qut=()=>"در حال راه‌اندازی…",Uut=()=>"جارٍ التهيئة…",Gut=()=>"Preparando todo…",Vut=()=>"सेट अप किया जा रहा है…",Kut=((e={},n={})=>{const t=n.locale??z();return t==="zh-CN"?Hut():t==="fa"?qut():t==="ar"?Uut():t==="es"?Gut():t==="hi"?Vut():Fut()}),Wut=()=>"Connect a local model or sign in to a coding agent to continue",Qut=()=>"连接本地模型或登录编码智能体以继续",Xut=()=>"برای ادامه، یک مدل محلی متصل کنید یا به یک عامل کدنویسی وارد شوید",Yut=()=>"اربط نموذجًا محليًا أو سجّل الدخول إلى وكيل برمجة للمتابعة",Zut=()=>"Conecta un modelo local o inicia sesión en un agente de programación para continuar",Jut=()=>"जारी रखने के लिए एक लोकल मॉडल कनेक्ट करें या किसी कोडिंग एजेंट में साइन इन करें",e_t=((e={},n={})=>{const t=n.locale??z();return t==="zh-CN"?Qut():t==="fa"?Xut():t==="ar"?Yut():t==="es"?Zut():t==="hi"?Jut():Wut()}),t_t=()=>"Connect a local model or sign in to an agent to continue.",n_t=()=>"连接本地模型或登录一个智能体以继续。",r_t=()=>"برای ادامه، یک مدل محلی متصل کنید یا به یک عامل وارد شوید.",s_t=()=>"اربط نموذجًا محليًا أو سجّل الدخول إلى وكيل للمتابعة.",i_t=()=>"Conecta un modelo local o inicia sesión en un agente para continuar.",a_t=()=>"जारी रखने के लिए एक लोकल मॉडल कनेक्ट करें या किसी एजेंट में साइन इन करें।",o_t=((e={},n={})=>{const t=n.locale??z();return t==="zh-CN"?n_t():t==="fa"?r_t():t==="ar"?s_t():t==="es"?i_t():t==="hi"?a_t():t_t()}),l_t=()=>"Signed in",c_t=()=>"已登录",u_t=()=>"وارد شده",__t=()=>"تم تسجيل الدخول",f_t=()=>"Sesión iniciada",d_t=()=>"साइन इन",h_t=((e={},n={})=>{const t=n.locale??z();return t==="zh-CN"?c_t():t==="fa"?u_t():t==="ar"?__t():t==="es"?f_t():t==="hi"?d_t():l_t()}),p_t=()=>"Connected to alphaXiv, bioRxiv, and OpenAlex to ground your agents in the latest research.",m_t=()=>"已连接 alphaXiv、bioRxiv 和 OpenAlex,让智能体以最新研究为依据。",g_t=()=>"به alphaXiv، bioRxiv و OpenAlex متصل است تا عامل‌هایتان بر تازه‌ترین پژوهش‌ها تکیه کنند.",v_t=()=>"متصل بـ alphaXiv وbioRxiv وOpenAlex ليستند وكلاؤك إلى أحدث الأبحاث.",b_t=()=>"Conectado a alphaXiv, bioRxiv y OpenAlex para que tus agentes trabajen con la investigación más reciente.",y_t=()=>"आपके एजेंटों को नवीनतम शोध पर आधारित रखने के लिए alphaXiv, bioRxiv और OpenAlex से कनेक्ट किया गया।",x_t=((e={},n={})=>{const t=n.locale??z();return t==="zh-CN"?m_t():t==="fa"?g_t():t==="ar"?v_t():t==="es"?b_t():t==="hi"?y_t():p_t()}),w_t=()=>"· Step 1 of 2",k_t=()=>"· 第 1 步,共 2 步",S_t=()=>"· مرحلهٔ ۱ از ۲",C_t=()=>"· الخطوة 1 من 2",E_t=()=>"· Paso 1 de 2",N_t=()=>"· चरण 1 / 2",z_t=((e={},n={})=>{const t=n.locale??z();return t==="zh-CN"?k_t():t==="fa"?S_t():t==="ar"?C_t():t==="es"?E_t():t==="hi"?N_t():w_t()}),j_t=()=>"· Step 2 of 2",T_t=()=>"· 第 2 步,共 2 步",A_t=()=>"· مرحلهٔ ۲ از ۲",R_t=()=>"· الخطوة 2 من 2",M_t=()=>"· Paso 2 de 2",O_t=()=>"· चरण 2 / 2",D_t=((e={},n={})=>{const t=n.locale??z();return t==="zh-CN"?T_t():t==="fa"?A_t():t==="ar"?R_t():t==="es"?M_t():t==="hi"?O_t():j_t()}),L_t=()=>"Tell us about your research",I_t=()=>"介绍一下你的研究",$_t=()=>"از پژوهش خود بگویید",B_t=()=>"أخبرنا عن بحثك",P_t=()=>"Cuéntanos sobre tu investigación",F_t=()=>"हमें अपने शोध के बारे में बताएं",H_t=((e={},n={})=>{const t=n.locale??z();return t==="zh-CN"?I_t():t==="fa"?$_t():t==="ar"?B_t():t==="es"?P_t():t==="hi"?F_t():L_t()}),q_t=()=>"Tell us your other research area",U_t=()=>"告诉我们你的其他研究领域",G_t=()=>"حوزهٔ پژوهشی دیگر خود را بنویسید",V_t=()=>"أخبرنا عن مجالك البحثي الآخر",K_t=()=>"Cuéntanos cuál es tu otra área de investigación",W_t=()=>"हमें अपना अन्य शोध क्षेत्र बताएं",Q_t=((e={},n={})=>{const t=n.locale??z();return t==="zh-CN"?U_t():t==="fa"?G_t():t==="ar"?V_t():t==="es"?K_t():t==="hi"?W_t():q_t()}),X_t=()=>"Track experiments, artifacts, compute, skills, and code all in one place.",Y_t=()=>"在一处跟踪实验、产物、算力、技能和代码。",Z_t=()=>"آزمایش‌ها، خروجی‌ها، رایانش، مهارت‌ها و کد را یک‌جا دنبال کنید.",J_t=()=>"تتبّع التجارب والمُخرَجات والحوسبة والمهارات والشيفرة في مكان واحد.",eft=()=>"Gestiona experimentos, artefactos, cómputo, skills y código en un solo lugar.",tft=()=>"प्रयोग, आर्टिफ़ैक्ट, कंप्यूट, स्किल और कोड — सब एक ही जगह ट्रैक करें।",nft=((e={},n={})=>{const t=n.locale??z();return t==="zh-CN"?Y_t():t==="fa"?Z_t():t==="ar"?J_t():t==="es"?eft():t==="hi"?tft():X_t()}),rft=()=>"Unable to verify",sft=()=>"无法验证",ift=()=>"تأیید ممکن نیست",aft=()=>"تعذّر التحقق",oft=()=>"No se pudo verificar",lft=()=>"सत्यापित नहीं हो सका",cft=((e={},n={})=>{const t=n.locale??z();return t==="zh-CN"?sft():t==="fa"?ift():t==="ar"?aft():t==="es"?oft():t==="hi"?lft():rft()}),uft=()=>"Update required",_ft=()=>"需要更新",fft=()=>"نیازمند به‌روزرسانی",dft=()=>"مطلوب تحديث",hft=()=>"Actualización necesaria",pft=()=>"अपडेट ज़रूरी है",mft=((e={},n={})=>{const t=n.locale??z();return t==="zh-CN"?_ft():t==="fa"?fft():t==="ar"?dft():t==="es"?hft():t==="hi"?pft():uft()}),gft=()=>"Waiting for the Git check",vft=()=>"正在等待 Git 检查",bft=()=>"در انتظار بررسی Git",yft=()=>"في انتظار فحص Git",xft=()=>"Esperando la comprobación de Git",wft=()=>"Git जाँच का इंतज़ार है",kft=((e={},n={})=>{const t=n.locale??z();return t==="zh-CN"?vft():t==="fa"?bft():t==="ar"?yft():t==="es"?xft():t==="hi"?wft():gft()}),Sft=()=>"Waiting for the local tool checks",Cft=()=>"正在等待本地工具检查",Eft=()=>"در انتظار بررسی ابزارهای محلی",Nft=()=>"في انتظار فحوص الأدوات المحلية",zft=()=>"Esperando las comprobaciones de las herramientas locales",jft=()=>"लोकल टूल जाँच का इंतज़ार है",Tft=((e={},n={})=>{const t=n.locale??z();return t==="zh-CN"?Cft():t==="fa"?Eft():t==="ar"?Nft():t==="es"?zft():t==="hi"?jft():Sft()}),Aft=()=>"What areas are you interested in?",Rft=()=>"你对哪些领域感兴趣?",Mft=()=>"به چه حوزه‌هایی علاقه دارید؟",Oft=()=>"ما المجالات التي تهتم بها؟",Dft=()=>"¿Qué áreas te interesan?",Lft=()=>"आपकी रुचि किन क्षेत्रों में है?",Ift=((e={},n={})=>{const t=n.locale??z();return t==="zh-CN"?Rft():t==="fa"?Mft():t==="ar"?Oft():t==="es"?Dft():t==="hi"?Lft():Aft()}),$ft=()=>"Your code, data, and experiment history stay on your machine.",Bft=()=>"你的代码、数据和实验历史都保留在自己的计算机上。",Pft=()=>"کد، داده‌ها و تاریخچهٔ آزمایش شما روی رایانهٔ خودتان می‌ماند.",Fft=()=>"تبقى شيفرتك وبياناتك وسجل تجاربك على جهازك.",Hft=()=>"Tu código, tus datos y tu historial de experimentos se quedan en tu equipo.",qft=()=>"आपका कोड, डेटा और प्रयोग इतिहास आपकी मशीन पर ही रहता है।",Uft=((e={},n={})=>{const t=n.locale??z();return t==="zh-CN"?Bft():t==="fa"?Pft():t==="ar"?Fft():t==="es"?Hft():t==="hi"?qft():$ft()}),Gft=()=>"Your selected agent is no longer ready. Go back to Step 1 and choose another.",Vft=()=>"所选智能体已无法使用。请返回第 1 步并选择其他智能体。",Kft=()=>"عامل انتخاب‌شده دیگر آماده نیست. به مرحلهٔ ۱ برگردید و عامل دیگری را انتخاب کنید.",Wft=()=>"لم يعد الوكيل الذي اخترته جاهزًا. ارجع إلى الخطوة 1 واختر غيره.",Qft=()=>"El agente que elegiste ya no está listo. Vuelve al paso 1 y elige otro.",Xft=()=>"आपका चुना हुआ एजेंट अब तैयार नहीं है। चरण 1 पर वापस जाएं और दूसरा चुनें।",Yft=((e={},n={})=>{const t=n.locale??z();return t==="zh-CN"?Vft():t==="fa"?Kft():t==="ar"?Wft():t==="es"?Qft():t==="hi"?Xft():Gft()}),Zft=()=>"Add cookie",Jft=()=>"添加 cookie",edt=()=>"افزودن کوکی",tdt=()=>"إضافة ملف تعريف الارتباط",ndt=()=>"Añadir cookie",rdt=()=>"कुकी जोड़ें",sdt=((e={},n={})=>{const t=n.locale??z();return t==="zh-CN"?Jft():t==="fa"?edt():t==="ar"?tdt():t==="es"?ndt():t==="hi"?rdt():Zft()}),idt=()=>"Changed here and on Overleaf — choose which copy to keep",adt=()=>"此处和 Overleaf 都有更改 — 请选择要保留的版本",odt=()=>"هم اینجا و هم در Overleaf تغییر کرده است — نسخه‌ای را که می‌خواهید نگه دارید انتخاب کنید",ldt=()=>"تغيّر هنا وعلى Overleaf — اختر أي نسخة تحتفظ بها",cdt=()=>"Cambió aquí y en Overleaf — elige qué copia conservar",udt=()=>"यहाँ और Overleaf दोनों जगह बदला गया — चुनें कि कौन सी कॉपी रखनी है",_dt=((e={},n={})=>{const t=n.locale??z();return t==="zh-CN"?adt():t==="fa"?odt():t==="ar"?ldt():t==="es"?cdt():t==="hi"?udt():idt()}),fdt=()=>"Create a token ↗",ddt=()=>"创建令牌 ↗",hdt=()=>"ساخت توکن ↗",pdt=()=>"إنشاء رمز ↗",mdt=()=>"Crear un token ↗",gdt=()=>"एक टोकन बनाएं ↗",vdt=((e={},n={})=>{const t=n.locale??z();return t==="zh-CN"?ddt():t==="fa"?hdt():t==="ar"?pdt():t==="es"?mdt():t==="hi"?gdt():fdt()}),bdt=()=>"Overleaf Git token",ydt=()=>"Overleaf Git 令牌",xdt=()=>"توکن Git در Overleaf",wdt=()=>"رمز Git لـ Overleaf",kdt=()=>"Token de Git de Overleaf",Sdt=()=>"Overleaf Git टोकन",KN=((e={},n={})=>{const t=n.locale??z();return t==="zh-CN"?ydt():t==="fa"?xdt():t==="ar"?wdt():t==="es"?kdt():t==="hi"?Sdt():bdt()}),Cdt=()=>"Follow Overleaf as people type by adding your Overleaf session cookie.",Edt=()=>"添加 Overleaf 会话 cookie,即可在他人输入时实时跟随 Overleaf。",Ndt=()=>"با افزودن کوکی نشست Overleaf، هنگام تایپ دیگران Overleaf را زنده دنبال کنید.",zdt=()=>"تابِع Overleaf أثناء كتابة الآخرين بإضافة ملف تعريف ارتباط جلسة Overleaf.",jdt=()=>"Sigue los cambios de Overleaf mientras se escribe añadiendo tu cookie de sesión de Overleaf.",Tdt=()=>"अपनी Overleaf सेशन कुकी जोड़कर लोगों के टाइप करते ही Overleaf को फ़ॉलो करें।",Adt=((e={},n={})=>{const t=n.locale??z();return t==="zh-CN"?Edt():t==="fa"?Ndt():t==="ar"?zdt():t==="es"?jdt():t==="hi"?Tdt():Cdt()}),Rdt=()=>"Import from browser",Mdt=()=>"从浏览器导入",Odt=()=>"وارد کردن از مرورگر",Ddt=()=>"الاستيراد من المتصفح",Ldt=()=>"Importar desde el navegador",Idt=()=>"ब्राउज़र से इंपोर्ट करें",$dt=((e={},n={})=>{const t=n.locale??z();return t==="zh-CN"?Mdt():t==="fa"?Odt():t==="ar"?Ddt():t==="es"?Ldt():t==="hi"?Idt():Rdt()}),Bdt=()=>"In step with Overleaf",Pdt=()=>"已与 Overleaf 同步",Fdt=()=>"با Overleaf همگام است",Hdt=()=>"متزامن مع Overleaf",qdt=()=>"Sincronizado con Overleaf",Udt=()=>"Overleaf के साथ मेल में",MD=((e={},n={})=>{const t=n.locale??z();return t==="zh-CN"?Pdt():t==="fa"?Fdt():t==="ar"?Hdt():t==="es"?qdt():t==="hi"?Udt():Bdt()}),Gdt=()=>"The last sync did not finish.",Vdt=()=>"上次同步未完成。",Kdt=()=>"آخرین همگام‌سازی کامل نشد.",Wdt=()=>"لم تكتمل آخر مزامنة.",Qdt=()=>"La última sincronización no terminó.",Xdt=()=>"पिछला सिंक पूरा नहीं हुआ।",Ydt=((e={},n={})=>{const t=n.locale??z();return t==="zh-CN"?Vdt():t==="fa"?Kdt():t==="ar"?Wdt():t==="es"?Qdt():t==="hi"?Xdt():Gdt()}),Zdt=()=>"Link and sync",Jdt=()=>"关联并同步",eht=()=>"پیوند و همگام‌سازی",tht=()=>"الربط والمزامنة",nht=()=>"Vincular y sincronizar",rht=()=>"लिंक करें और सिंक करें",sht=((e={},n={})=>{const t=n.locale??z();return t==="zh-CN"?Jdt():t==="fa"?eht():t==="ar"?tht():t==="es"?nht():t==="hi"?rht():Zdt()}),iht=()=>"Connecting to Overleaf…",aht=()=>"正在连接 Overleaf…",oht=()=>"در حال اتصال به Overleaf…",lht=()=>"جارٍ الاتصال بـ Overleaf…",cht=()=>"Conectando con Overleaf…",uht=()=>"Overleaf से कनेक्ट हो रहा है…",_ht=((e={},n={})=>{const t=n.locale??z();return t==="zh-CN"?aht():t==="fa"?oht():t==="ar"?lht():t==="es"?cht():t==="hi"?uht():iht()}),fht=()=>"Edits are live on Overleaf",dht=()=>"编辑已在 Overleaf 实时同步",hht=()=>"ویرایش‌ها روی Overleaf زنده‌اند",pht=()=>"تظهر التعديلات فورًا على Overleaf",mht=()=>"Los cambios se sincronizan en directo con Overleaf",ght=()=>"बदलाव Overleaf पर लाइव हैं",vht=((e={},n={})=>{const t=n.locale??z();return t==="zh-CN"?dht():t==="fa"?hht():t==="ar"?pht():t==="es"?mht():t==="hi"?ght():fht()}),bht=()=>"Retry",yht=()=>"重试",xht=()=>"تلاش دوباره",wht=()=>"إعادة المحاولة",kht=()=>"Reintentar",Sht=()=>"फिर से कोशिश करें",Cht=((e={},n={})=>{const t=n.locale??z();return t==="zh-CN"?yht():t==="fa"?xht():t==="ar"?wht():t==="es"?kht():t==="hi"?Sht():bht()}),Eht=()=>"Live sync stopped.",Nht=()=>"实时同步已停止。",zht=()=>"همگام‌سازی زنده متوقف شد.",jht=()=>"توقفت المزامنة المباشرة.",Tht=()=>"Sincronización en directo detenida.",Aht=()=>"लाइव सिंक रुक गया।",Rht=((e={},n={})=>{const t=n.locale??z();return t==="zh-CN"?Nht():t==="fa"?zht():t==="ar"?jht():t==="es"?Tht():t==="hi"?Aht():Eht()}),Mht=()=>"Live sync starts once the paper is in step with Overleaf.",Oht=()=>"论文与 Overleaf 同步后,实时同步即会开始。",Dht=()=>"همگام‌سازی زنده پس از هم‌گام شدن مقاله با Overleaf آغاز می‌شود.",Lht=()=>"تبدأ المزامنة المباشرة بمجرد أن تتزامن الورقة مع Overleaf.",Iht=()=>"La sincronización en directo empieza cuando el paper esté sincronizado con Overleaf.",$ht=()=>"पेपर Overleaf के साथ मेल में आते ही लाइव सिंक शुरू होगा।",Bht=((e={},n={})=>{const t=n.locale??z();return t==="zh-CN"?Oht():t==="fa"?Dht():t==="ar"?Lht():t==="es"?Iht():t==="hi"?$ht():Mht()}),Pht=()=>"My projects ↗",Fht=()=>"我的项目 ↗",Hht=()=>"پروژه‌های من ↗",qht=()=>"مشاريعي ↗",Uht=()=>"Mis proyectos ↗",Ght=()=>"मेरे प्रोजेक्ट ↗",WN=((e={},n={})=>{const t=n.locale??z();return t==="zh-CN"?Fht():t==="fa"?Hht():t==="ar"?qht():t==="es"?Uht():t==="hi"?Ght():Pht()}),Vht=()=>"Nothing could be synced.",Kht=()=>"没有内容可以同步。",Wht=()=>"هیچ موردی قابل همگام‌سازی نبود.",Qht=()=>"تعذّرت مزامنة أي شيء.",Xht=()=>"No se pudo sincronizar nada.",Yht=()=>"कुछ भी सिंक नहीं हो सका।",Zht=((e={},n={})=>{const t=n.locale??z();return t==="zh-CN"?Kht():t==="fa"?Wht():t==="ar"?Qht():t==="es"?Xht():t==="hi"?Yht():Vht()}),Jht=()=>"Open Overleaf ↗",ept=()=>"打开 Overleaf ↗",tpt=()=>"باز کردن Overleaf ↗",npt=()=>"فتح Overleaf ↗",rpt=()=>"Abrir Overleaf ↗",spt=()=>"Overleaf खोलें ↗",ipt=((e={},n={})=>{const t=n.locale??z();return t==="zh-CN"?ept():t==="fa"?tpt():t==="ar"?npt():t==="es"?rpt():t==="hi"?spt():Jht()}),apt=()=>"Cancel",opt=()=>"取消",lpt=()=>"لغو",cpt=()=>"إلغاء",upt=()=>"Cancelar",_pt=()=>"रद्द करें",OD=((e={},n={})=>{const t=n.locale??z();return t==="zh-CN"?opt():t==="fa"?lpt():t==="ar"?cpt():t==="es"?upt():t==="hi"?_pt():apt()}),fpt=()=>"changed here and on Overleaf. Both copies are untouched — choose which one to keep.",dpt=()=>"在此处和 Overleaf 上均有更改。两个副本均未被修改——请选择要保留的版本。",hpt=()=>"هم اینجا و هم در Overleaf تغییر کرده است. هر دو نسخه دست‌نخورده‌اند — انتخاب کنید کدام نگه داشته شود.",ppt=()=>"تغيّر هنا وعلى Overleaf. كلا النسختين لم تُمسّا — اختر أيّهما تحتفظ به.",mpt=()=>"cambió aquí y en Overleaf. No se ha tocado ninguna de las dos copias — elige cuál conservar.",gpt=()=>"यहाँ और Overleaf दोनों जगह बदला गया। दोनों कॉपी सुरक्षित हैं — चुनें कि कौन सी रखनी है।",vpt=((e={},n={})=>{const t=n.locale??z();return t==="zh-CN"?dpt():t==="fa"?hpt():t==="ar"?ppt():t==="es"?mpt():t==="hi"?gpt():fpt()}),bpt=()=>"Keep this copy",ypt=()=>"保留此副本",xpt=()=>"نگه داشتن این نسخه",wpt=()=>"الاحتفاظ بهذه النسخة",kpt=()=>"Conservar esta copia",Spt=()=>"यह कॉपी रखें",Cpt=((e={},n={})=>{const t=n.locale??z();return t==="zh-CN"?ypt():t==="fa"?xpt():t==="ar"?wpt():t==="es"?kpt():t==="hi"?Spt():bpt()}),Ept=()=>"Open in Overleaf",Npt=()=>"在 Overleaf 中打开",zpt=()=>"باز کردن در Overleaf",jpt=()=>"فتح في Overleaf",Tpt=()=>"Abrir en Overleaf",Apt=()=>"Overleaf में खोलें",Rpt=((e={},n={})=>{const t=n.locale??z();return t==="zh-CN"?Npt():t==="fa"?zpt():t==="ar"?jpt():t==="es"?Tpt():t==="hi"?Apt():Ept()}),Mpt=()=>"Replace the Overleaf token",Opt=()=>"替换 Overleaf 令牌",Dpt=()=>"جایگزینی توکن Overleaf",Lpt=()=>"استبدال رمز Overleaf",Ipt=()=>"Reemplazar el token de Overleaf",$pt=()=>"Overleaf टोकन बदलें",QN=((e={},n={})=>{const t=n.locale??z();return t==="zh-CN"?Opt():t==="fa"?Dpt():t==="ar"?Lpt():t==="es"?Ipt():t==="hi"?$pt():Mpt()}),Bpt=()=>"Sync files",Ppt=()=>"同步文件",Fpt=()=>"همگام‌سازی فایل‌ها",Hpt=()=>"مزامنة الملفات",qpt=()=>"Sincronizar archivos",Upt=()=>"फ़ाइलें सिंक करें",Gpt=((e={},n={})=>{const t=n.locale??z();return t==="zh-CN"?Ppt():t==="fa"?Fpt():t==="ar"?Hpt():t==="es"?qpt():t==="hi"?Upt():Bpt()}),Vpt=()=>"Unlink",Kpt=()=>"取消关联",Wpt=()=>"قطع پیوند",Qpt=()=>"إلغاء الربط",Xpt=()=>"Desvincular",Ypt=()=>"लिंक हटाएं",Zpt=((e={},n={})=>{const t=n.locale??z();return t==="zh-CN"?Kpt():t==="fa"?Wpt():t==="ar"?Qpt():t==="es"?Xpt():t==="hi"?Ypt():Vpt()}),Jpt=()=>"Upload a copy as a new project ↗",e0t=()=>"上传副本作为新项目 ↗",t0t=()=>"بارگذاری یک کپی به‌عنوان پروژهٔ جدید ↗",n0t=()=>"رفع نسخة كمشروع جديد ↗",r0t=()=>"Subir una copia como proyecto nuevo ↗",s0t=()=>"नए प्रोजेक्ट के रूप में एक कॉपी अपलोड करें ↗",DD=((e={},n={})=>{const t=n.locale??z();return t==="zh-CN"?e0t():t==="fa"?t0t():t==="ar"?n0t():t==="es"?r0t():t==="hi"?s0t():Jpt()}),i0t=()=>"Use Overleaf's",a0t=()=>"使用 Overleaf 的副本",o0t=()=>"استفاده از نسخهٔ Overleaf",l0t=()=>"استخدام نسخة Overleaf",c0t=()=>"Usar la de Overleaf",u0t=()=>"Overleaf का इस्तेमाल करें",_0t=((e={},n={})=>{const t=n.locale??z();return t==="zh-CN"?a0t():t==="fa"?o0t():t==="ar"?l0t():t==="es"?c0t():t==="hi"?u0t():i0t()}),f0t=()=>"This paper stays in step with Overleaf.",d0t=()=>"此论文将与 Overleaf 保持同步。",h0t=()=>"این مقاله با Overleaf همگام می‌ماند.",p0t=()=>"تبقى هذه الورقة متزامنة مع Overleaf.",m0t=()=>"Este paper se mantiene sincronizado con Overleaf.",g0t=()=>"यह पेपर Overleaf के साथ मेल में रहता है।",v0t=((e={},n={})=>{const t=n.locale??z();return t==="zh-CN"?d0t():t==="fa"?h0t():t==="ar"?p0t():t==="es"?m0t():t==="hi"?g0t():f0t()}),b0t=()=>"Paste it instead",y0t=()=>"改为粘贴",x0t=()=>"به‌جایش بچسبانید",w0t=()=>"الصقه بدلًا من ذلك",k0t=()=>"Pegarla manualmente",S0t=()=>"इसके बजाय पेस्ट करें",C0t=((e={},n={})=>{const t=n.locale??z();return t==="zh-CN"?y0t():t==="fa"?x0t():t==="ar"?w0t():t==="es"?k0t():t==="hi"?S0t():b0t()}),E0t=e=>`Pulled ${e==null?void 0:e.paths}.`,N0t=e=>`已拉取 ${e==null?void 0:e.paths}。`,z0t=e=>`${e==null?void 0:e.paths} دریافت شد.`,j0t=e=>`سُحب ${e==null?void 0:e.paths}.`,T0t=e=>`Descargado: ${e==null?void 0:e.paths}.`,A0t=e=>`${e==null?void 0:e.paths} पुल किया।`,R0t=((e,n={})=>{const t=n.locale??z();return t==="zh-CN"?N0t(e):t==="fa"?z0t(e):t==="ar"?j0t(e):t==="es"?T0t(e):t==="hi"?A0t(e):E0t(e)}),M0t=e=>`Pulled ${e==null?void 0:e.pulled}; pushed ${e==null?void 0:e.pushed}.`,O0t=e=>`已拉取 ${e==null?void 0:e.pulled};已推送 ${e==null?void 0:e.pushed}。`,D0t=e=>`${e==null?void 0:e.pulled} دریافت و ${e==null?void 0:e.pushed} ارسال شد.`,L0t=e=>`سُحب ${e==null?void 0:e.pulled}؛ ورُفع ${e==null?void 0:e.pushed}.`,I0t=e=>`Descargado: ${e==null?void 0:e.pulled}; subido: ${e==null?void 0:e.pushed}.`,$0t=e=>`${e==null?void 0:e.pulled} पुल किया; ${e==null?void 0:e.pushed} पुश किया।`,B0t=((e,n={})=>{const t=n.locale??z();return t==="zh-CN"?O0t(e):t==="fa"?D0t(e):t==="ar"?L0t(e):t==="es"?I0t(e):t==="hi"?$0t(e):M0t(e)}),P0t=e=>`Pushed ${e==null?void 0:e.paths}.`,F0t=e=>`已推送 ${e==null?void 0:e.paths}。`,H0t=e=>`${e==null?void 0:e.paths} ارسال شد.`,q0t=e=>`رُفع ${e==null?void 0:e.paths}.`,U0t=e=>`Subido: ${e==null?void 0:e.paths}.`,G0t=e=>`${e==null?void 0:e.paths} पुश किया।`,V0t=((e,n={})=>{const t=n.locale??z();return t==="zh-CN"?F0t(e):t==="fa"?H0t(e):t==="ar"?q0t(e):t==="es"?U0t(e):t==="hi"?G0t(e):P0t(e)}),K0t=()=>"Add a fresh Overleaf session cookie to start following again.",W0t=()=>"添加新的 Overleaf 会话 cookie 即可继续实时跟随。",Q0t=()=>"برای ادامهٔ دنبال کردن، کوکی نشست تازه‌ای از Overleaf اضافه کنید.",X0t=()=>"أضِف ملف تعريف ارتباط جلسة Overleaf جديدًا لبدء المتابعة مجددًا.",Y0t=()=>"Añade una nueva cookie de sesión de Overleaf para volver a seguir los cambios.",Z0t=()=>"फिर से फ़ॉलो करना शुरू करने के लिए एक नई Overleaf सेशन कुकी जोड़ें।",J0t=((e={},n={})=>{const t=n.locale??z();return t==="zh-CN"?W0t():t==="fa"?Q0t():t==="ar"?X0t():t==="es"?Y0t():t==="hi"?Z0t():K0t()}),emt=()=>"Save the file first",tmt=()=>"请先保存文件",nmt=()=>"ابتدا فایل را ذخیره کنید",rmt=()=>"احفظ الملف أولًا",smt=()=>"Guarda el archivo primero",imt=()=>"पहले फ़ाइल सेव करें",amt=((e={},n={})=>{const t=n.locale??z();return t==="zh-CN"?tmt():t==="fa"?nmt():t==="ar"?rmt():t==="es"?smt():t==="hi"?imt():emt()}),omt=()=>"Save this file to sync it with Overleaf",lmt=()=>"保存此文件以与 Overleaf 同步",cmt=()=>"برای همگام‌سازی با Overleaf این فایل را ذخیره کنید",umt=()=>"احفظ هذا الملف لمزامنته مع Overleaf",_mt=()=>"Guarda este archivo para sincronizarlo con Overleaf",fmt=()=>"Overleaf के साथ सिंक करने के लिए इस फ़ाइल को सेव करें",LD=((e={},n={})=>{const t=n.locale??z();return t==="zh-CN"?lmt():t==="fa"?cmt():t==="ar"?umt():t==="es"?_mt():t==="hi"?fmt():omt()}),dmt=()=>"Save token",hmt=()=>"保存令牌",pmt=()=>"ذخیرهٔ توکن",mmt=()=>"حفظ الرمز",gmt=()=>"Guardar token",vmt=()=>"टोकन सेव करें",bmt=((e={},n={})=>{const t=n.locale??z();return t==="zh-CN"?hmt():t==="fa"?pmt():t==="ar"?mmt():t==="es"?gmt():t==="hi"?vmt():dmt()}),ymt=()=>"Send this paper to Overleaf",xmt=()=>"将此论文发送到 Overleaf",wmt=()=>"ارسال مقاله به Overleaf",kmt=()=>"أرسل هذه الورقة إلى Overleaf",Smt=()=>"Enviar este paper a Overleaf",Cmt=()=>"यह पेपर Overleaf को भेजें",Emt=((e={},n={})=>{const t=n.locale??z();return t==="zh-CN"?xmt():t==="fa"?wmt():t==="ar"?kmt():t==="es"?Smt():t==="hi"?Cmt():ymt()}),Nmt=()=>"Overleaf session cookie",zmt=()=>"Overleaf 会话 cookie",jmt=()=>"کوکی نشست Overleaf",Tmt=()=>"ملف تعريف ارتباط جلسة Overleaf",Amt=()=>"Cookie de sesión de Overleaf",Rmt=()=>"Overleaf सेशन कुकी",e3=((e={},n={})=>{const t=n.locale??z();return t==="zh-CN"?zmt():t==="fa"?jmt():t==="ar"?Tmt():t==="es"?Amt():t==="hi"?Rmt():Nmt()}),Mmt=()=>"To follow Overleaf as people type, paste your Overleaf session cookie: in a browser signed in to Overleaf, open the developer tools, find the overleaf_session2 cookie, and copy its value. It stays on this machine.",Omt=()=>"要在他人输入时实时跟随 Overleaf,请粘贴你的 Overleaf 会话 cookie:在已登录 Overleaf 的浏览器中打开开发者工具,找到 overleaf_session2 cookie 并复制其值。它只保存在这台机器上。",Dmt=()=>"برای دنبال کردن Overleaf هنگام تایپ دیگران، کوکی نشست Overleaf خود را بچسبانید: در مرورگری که به Overleaf وارد شده‌اید، ابزارهای توسعه‌دهنده را باز کنید، کوکی overleaf_session2 را پیدا کنید و مقدار آن را کپی کنید. این مقدار روی همین دستگاه می‌ماند.",Lmt=()=>"لمتابعة Overleaf أثناء كتابة الآخرين، الصق ملف تعريف ارتباط جلسة Overleaf: في متصفح مسجّل الدخول إلى Overleaf، افتح أدوات المطوّر، وابحث عن ملف تعريف الارتباط overleaf_session2، وانسخ قيمته. يبقى على هذا الجهاز.",Imt=()=>"Para seguir los cambios de Overleaf mientras se escribe, pega tu cookie de sesión de Overleaf: en un navegador con la sesión de Overleaf iniciada, abre las herramientas de desarrollo, busca la cookie overleaf_session2 y copia su valor. Se queda en este equipo.",$mt=()=>"लोगों के टाइप करते ही Overleaf को फ़ॉलो करने के लिए, अपनी Overleaf सेशन कुकी पेस्ट करें: Overleaf में साइन इन ब्राउज़र में, डेवलपर टूल खोलें, overleaf_session2 कुकी खोजें, और उसकी वैल्यू कॉपी करें। यह इसी मशीन पर रहती है।",Bmt=((e={},n={})=>{const t=n.locale??z();return t==="zh-CN"?Omt():t==="fa"?Dmt():t==="ar"?Lmt():t==="es"?Imt():t==="hi"?$mt():Mmt()}),Pmt=()=>"Overleaf sync failed",Fmt=()=>"Overleaf 同步失败",Hmt=()=>"همگام‌سازی با Overleaf ناموفق بود",qmt=()=>"فشلت مزامنة Overleaf",Umt=()=>"Error al sincronizar con Overleaf",Gmt=()=>"Overleaf सिंक विफल",t3=((e={},n={})=>{const t=n.locale??z();return t==="zh-CN"?Fmt():t==="fa"?Hmt():t==="ar"?qmt():t==="es"?Umt():t==="hi"?Gmt():Pmt()}),Vmt=()=>"Text syncs live. This moves figures and other files, and settles conflicts.",Kmt=()=>"文本会实时同步。此操作用于同步图片等其他文件,并解决冲突。",Wmt=()=>"متن زنده همگام می‌شود. این کار تصویرها و دیگر فایل‌ها را جابه‌جا می‌کند و تعارض‌ها را حل می‌کند.",Qmt=()=>"يتزامن النص مباشرةً. ينقل هذا الأشكال والملفات الأخرى، ويحسم التعارضات.",Xmt=()=>"El texto se sincroniza en directo. Esto mueve las figuras y otros archivos, y resuelve conflictos.",Ymt=()=>"टेक्स्ट लाइव सिंक होता है। यह फ़िगर और अन्य फ़ाइलें ले जाता है, और टकराव सुलझाता है।",Zmt=((e={},n={})=>{const t=n.locale??z();return t==="zh-CN"?Kmt():t==="fa"?Wmt():t==="ar"?Qmt():t==="es"?Xmt():t==="hi"?Ymt():Vmt()}),Jmt=()=>"Syncing with Overleaf…",egt=()=>"正在与 Overleaf 同步…",tgt=()=>"در حال همگام‌سازی با Overleaf…",ngt=()=>"جارٍ المزامنة مع Overleaf…",rgt=()=>"Sincronizando con Overleaf…",sgt=()=>"Overleaf के साथ सिंक हो रहा है…",ID=((e={},n={})=>{const t=n.locale??z();return t==="zh-CN"?egt():t==="fa"?tgt():t==="ar"?ngt():t==="es"?rgt():t==="hi"?sgt():Jmt()}),igt=()=>"Paste an Overleaf Git authentication token to keep this paper in step with an Overleaf project. Create one in Overleaf under Account Settings — Git integration comes with a paid Overleaf plan.",agt=()=>"粘贴 Overleaf Git 身份验证令牌,使此论文与 Overleaf 项目保持同步。请在 Overleaf 的“账户设置”中创建令牌 — Git 集成功能需要付费 Overleaf 套餐。",ogt=()=>"برای همگام نگه داشتن این مقاله با یک پروژهٔ Overleaf، توکن احراز هویت Git در Overleaf را جای‌گذاری کنید. آن را در بخش تنظیمات حساب Overleaf بسازید — یکپارچه‌سازی Git به طرح پولی Overleaf نیاز دارد.",lgt=()=>"الصق رمز مصادقة Git لـ Overleaf لإبقاء هذه الورقة متزامنة مع مشروع Overleaf. أنشئ واحدًا في Overleaf ضمن إعدادات الحساب — يأتي تكامل Git مع خطة Overleaf مدفوعة.",cgt=()=>"Pega un token de autenticación de Git de Overleaf para mantener este paper sincronizado con un proyecto de Overleaf. Créalo en Overleaf, en Account Settings — la integración con Git requiere un plan de pago de Overleaf.",ugt=()=>"इस पेपर को किसी Overleaf प्रोजेक्ट के साथ मेल में रखने के लिए एक Overleaf Git प्रमाणीकरण टोकन पेस्ट करें। इसे Overleaf में Account Settings के तहत बनाएं — Git इंटीग्रेशन एक पेड Overleaf प्लान के साथ आता है।",_gt=((e={},n={})=>{const t=n.locale??z();return t==="zh-CN"?agt():t==="fa"?ogt():t==="ar"?lgt():t==="es"?cgt():t==="hi"?ugt():igt()}),fgt=()=>"Paste the URL of the Overleaf project this paper belongs to. Overleaf cannot create one over Git, so open or create the project there first.",dgt=()=>"粘贴此论文所属 Overleaf 项目的 URL。Overleaf 无法通过 Git 创建项目,因此请先在 Overleaf 中打开或创建项目。",hgt=()=>"نشانی پروژهٔ Overleaf مربوط به این مقاله را جای‌گذاری کنید. Overleaf نمی‌تواند پروژه را از طریق Git بسازد؛ پس ابتدا پروژه را در آنجا باز یا ایجاد کنید.",pgt=()=>"الصق رابط مشروع Overleaf الذي تنتمي إليه هذه الورقة. لا يستطيع Overleaf إنشاء مشروع عبر Git، لذا افتح المشروع أو أنشئه هناك أولًا.",mgt=()=>"Pega la URL del proyecto de Overleaf al que pertenece este paper. Overleaf no puede crear proyectos por Git, así que abre o crea el proyecto allí primero.",ggt=()=>"उस Overleaf प्रोजेक्ट का URL पेस्ट करें जिससे यह पेपर संबंधित है। Overleaf Git के ज़रिए एक नहीं बना सकता, इसलिए पहले वहाँ प्रोजेक्ट खोलें या बनाएं।",vgt=((e={},n={})=>{const t=n.locale??z();return t==="zh-CN"?dgt():t==="fa"?hgt():t==="ar"?pgt():t==="es"?mgt():t==="hi"?ggt():fgt()}),bgt=()=>"Toggle Plan mode for this chat",ygt=()=>"切换此聊天的计划模式",xgt=()=>"تغییر حالت طرح این گفت‌وگو",wgt=()=>"تبديل وضع التخطيط لهذه المحادثة",kgt=()=>"Activa o desactiva el modo Plan en este chat",Sgt=()=>"इस चैट के लिए प्लान मोड टॉगल करें",Cgt=((e={},n={})=>{const t=n.locale??z();return t==="zh-CN"?ygt():t==="fa"?xgt():t==="ar"?wgt():t==="es"?kgt():t==="hi"?Sgt():bgt()}),Egt=()=>"Accept and auto mode",Ngt=()=>"接受并使用自动模式",zgt=()=>"پذیرش و حالت خودکار",jgt=()=>"قبول وتفعيل الوضع التلقائي",Tgt=()=>"Aceptar en modo automático",Agt=()=>"स्वीकार करें और ऑटो मोड",Rgt=((e={},n={})=>{const t=n.locale??z();return t==="zh-CN"?Ngt():t==="fa"?zgt():t==="ar"?jgt():t==="es"?Tgt():t==="hi"?Agt():Egt()}),Mgt=()=>"Accept and bypass all",Ogt=()=>"接受并跳过所有审批",Dgt=()=>"پذیرش و عبور از همهٔ تأییدها",Lgt=()=>"القبول وتجاوز الكل",Igt=()=>"Aceptar y omitir permisos",$gt=()=>"स्वीकार करें और सब बायपास करें",Bgt=((e={},n={})=>{const t=n.locale??z();return t==="zh-CN"?Ogt():t==="fa"?Dgt():t==="ar"?Lgt():t==="es"?Igt():t==="hi"?$gt():Mgt()}),Pgt=()=>"Accept plan",Fgt=()=>"接受计划",Hgt=()=>"پذیرش طرح",qgt=()=>"قبول الخطة",Ugt=()=>"Aceptar plan",Ggt=()=>"प्लान स्वीकार करें",Vgt=((e={},n={})=>{const t=n.locale??z();return t==="zh-CN"?Fgt():t==="fa"?Hgt():t==="ar"?qgt():t==="es"?Ugt():t==="hi"?Ggt():Pgt()}),Kgt=e=>`${e==null?void 0:e.agent} proposed a plan`,Wgt=e=>`${e==null?void 0:e.agent} 提出了一个计划`,Qgt=e=>`طرح پیشنهادیِ ${e==null?void 0:e.agent}`,Xgt=e=>`${e==null?void 0:e.agent} اقترح خطة`,Ygt=e=>`${e==null?void 0:e.agent} propuso un plan`,Zgt=e=>`${e==null?void 0:e.agent} ने एक प्लान प्रस्तावित किया`,Jgt=((e,n={})=>{const t=n.locale??z();return t==="zh-CN"?Wgt(e):t==="fa"?Qgt(e):t==="ar"?Xgt(e):t==="es"?Ygt(e):t==="hi"?Zgt(e):Kgt(e)}),e1t=e=>`${e==null?void 0:e.agent} is ready to proceed`,t1t=e=>`${e==null?void 0:e.agent} 已准备好继续`,n1t=e=>`طرحِ ${e==null?void 0:e.agent} آمادهٔ ادامه است`,r1t=e=>`${e==null?void 0:e.agent} جاهز للمتابعة`,s1t=e=>`${e==null?void 0:e.agent} está listo para continuar`,i1t=e=>`${e==null?void 0:e.agent} आगे बढ़ने के लिए तैयार है`,a1t=((e,n={})=>{const t=n.locale??z();return t==="zh-CN"?t1t(e):t==="fa"?n1t(e):t==="ar"?r1t(e):t==="es"?s1t(e):t==="hi"?i1t(e):e1t(e)}),o1t=()=>"Back",l1t=()=>"返回",c1t=()=>"بازگشت",u1t=()=>"رجوع",_1t=()=>"Atrás",f1t=()=>"वापस",$D=((e={},n={})=>{const t=n.locale??z();return t==="zh-CN"?l1t():t==="fa"?c1t():t==="ar"?u1t():t==="es"?_1t():t==="hi"?f1t():o1t()}),d1t=()=>"More approval options",h1t=()=>"更多批准选项",p1t=()=>"گزینه‌های تأیید بیشتر",m1t=()=>"خيارات موافقة إضافية",g1t=()=>"Más opciones de aprobación",v1t=()=>"और स्वीकृति विकल्प",b1t=((e={},n={})=>{const t=n.locale??z();return t==="zh-CN"?h1t():t==="fa"?p1t():t==="ar"?m1t():t==="es"?g1t():t==="hi"?v1t():d1t()}),y1t=()=>"Open plan",x1t=()=>"打开计划",w1t=()=>"باز کردن طرح",k1t=()=>"فتح الخطة",S1t=()=>"Abrir plan",C1t=()=>"प्लान खोलें",E1t=((e={},n={})=>{const t=n.locale??z();return t==="zh-CN"?x1t():t==="fa"?w1t():t==="ar"?k1t():t==="es"?S1t():t==="hi"?C1t():y1t()}),N1t=()=>"Reject",z1t=()=>"拒绝",j1t=()=>"رد کردن",T1t=()=>"رفض",A1t=()=>"Rechazar",R1t=()=>"अस्वीकार करें",M1t=((e={},n={})=>{const t=n.locale??z();return t==="zh-CN"?z1t():t==="fa"?j1t():t==="ar"?T1t():t==="es"?A1t():t==="hi"?R1t():N1t()}),O1t=()=>"Revise",D1t=()=>"修改",L1t=()=>"بازنگری",I1t=()=>"طلب تعديل",$1t=()=>"Pedir cambios",B1t=()=>"संशोधित करें",P1t=((e={},n={})=>{const t=n.locale??z();return t==="zh-CN"?D1t():t==="fa"?L1t():t==="ar"?I1t():t==="es"?$1t():t==="hi"?B1t():O1t()}),F1t=()=>"Revise…",H1t=()=>"修改…",q1t=()=>"بازنگری…",U1t=()=>"طلب تعديل…",G1t=()=>"Pedir cambios…",V1t=()=>"संशोधित करें…",K1t=((e={},n={})=>{const t=n.locale??z();return t==="zh-CN"?H1t():t==="fa"?q1t():t==="ar"?U1t():t==="es"?G1t():t==="hi"?V1t():F1t()}),W1t=()=>"What should change? (optional)",Q1t=()=>"需要更改什么?(可选)",X1t=()=>"چه چیزی باید تغییر کند؟ (اختیاری)",Y1t=()=>"ما الذي ينبغي تغييره؟ (اختياري)",Z1t=()=>"¿Qué debería cambiar? (opcional)",J1t=()=>"क्या बदलना चाहिए? (वैकल्पिक)",evt=((e={},n={})=>{const t=n.locale??z();return t==="zh-CN"?Q1t():t==="fa"?X1t():t==="ar"?Y1t():t==="es"?Z1t():t==="hi"?J1t():W1t()}),tvt=e=>`${e==null?void 0:e.count} active`,nvt=e=>`${e==null?void 0:e.count} 个活跃`,rvt=e=>`${e==null?void 0:e.count} فعال`,svt=e=>`الوكلاء النشطون: ${e==null?void 0:e.count}`,ivt=e=>`${e==null?void 0:e.count} activos`,avt=e=>`${e==null?void 0:e.count} सक्रिय`,ovt=((e,n={})=>{const t=n.locale??z();return t==="zh-CN"?nvt(e):t==="fa"?rvt(e):t==="ar"?svt(e):t==="es"?ivt(e):t==="hi"?avt(e):tvt(e)}),lvt=e=>`${e==null?void 0:e.count} total agents`,cvt=e=>`共 ${e==null?void 0:e.count} 个智能体`,uvt=e=>`در مجموع ${e==null?void 0:e.count} عامل`,_vt=e=>`إجمالي الوكلاء: ${e==null?void 0:e.count}`,fvt=e=>`${e==null?void 0:e.count} agentes en total`,dvt=e=>`${e==null?void 0:e.count} कुल एजेंट`,hvt=((e,n={})=>{const t=n.locale??z();return t==="zh-CN"?cvt(e):t==="fa"?uvt(e):t==="ar"?_vt(e):t==="es"?fvt(e):t==="hi"?dvt(e):lvt(e)}),pvt=e=>`Delete ${e==null?void 0:e.name} from OpenResearch? Its experiments, runs, and chats will be permanently removed.`,mvt=e=>`从 OpenResearch 中删除 ${e==null?void 0:e.name}?其实验、运行和聊天将被永久移除。`,gvt=e=>`${e==null?void 0:e.name} از OpenResearch حذف شود؟ آزمایش‌ها، اجراها و گفتگوهای آن برای همیشه حذف می‌شوند.`,vvt=e=>`حذف ${e==null?void 0:e.name} من OpenResearch؟ ستُزال تجاربه وعمليات تشغيله ومحادثاته نهائيًا.`,bvt=e=>`¿Eliminar ${e==null?void 0:e.name} de OpenResearch? Sus experimentos, ejecuciones y chats se eliminarán de forma permanente.`,yvt=e=>`${e==null?void 0:e.name} को OpenResearch से हटाएं? इसके प्रयोग, रन और चैट स्थायी रूप से हट जाएंगे।`,xvt=((e,n={})=>{const t=n.locale??z();return t==="zh-CN"?mvt(e):t==="fa"?gvt(e):t==="ar"?vvt(e):t==="es"?bvt(e):t==="hi"?yvt(e):pvt(e)}),wvt=()=>"Agents",kvt=()=>"智能体",Svt=()=>"عامل‌ها",Cvt=()=>"الوكلاء",Evt=()=>"Agentes",Nvt=()=>"एजेंट",XN=((e={},n={})=>{const t=n.locale??z();return t==="zh-CN"?kvt():t==="fa"?Svt():t==="ar"?Cvt():t==="es"?Evt():t==="hi"?Nvt():wvt()}),zvt=()=>"arXiv paper ID:",jvt=()=>"arXiv 论文 ID:",Tvt=()=>"شناسهٔ مقالهٔ arXiv:",Avt=()=>"معرّف ورقة arXiv:",Rvt=()=>"ID del paper en arXiv:",Mvt=()=>"arXiv पेपर ID:",Ovt=((e={},n={})=>{const t=n.locale??z();return t==="zh-CN"?jvt():t==="fa"?Tvt():t==="ar"?Avt():t==="es"?Rvt():t==="hi"?Mvt():zvt()}),Dvt=()=>"Cancel",Lvt=()=>"取消",Ivt=()=>"لغو",$vt=()=>"إلغاء",Bvt=()=>"Cancelar",Pvt=()=>"रद्द करें",Fvt=((e={},n={})=>{const t=n.locale??z();return t==="zh-CN"?Lvt():t==="fa"?Ivt():t==="ar"?$vt():t==="es"?Bvt():t==="hi"?Pvt():Dvt()}),Hvt=()=>"Created",qvt=()=>"创建时间",Uvt=()=>"ایجادشده",Gvt=()=>"أُنشئ",Vvt=()=>"Creado",Kvt=()=>"बनाया गया",Wvt=((e={},n={})=>{const t=n.locale??z();return t==="zh-CN"?qvt():t==="fa"?Uvt():t==="ar"?Gvt():t==="es"?Vvt():t==="hi"?Kvt():Hvt()}),Qvt=()=>"Delete project?",Xvt=()=>"删除项目?",Yvt=()=>"پروژه حذف شود؟",Zvt=()=>"حذف المشروع؟",Jvt=()=>"¿Eliminar el proyecto?",ebt=()=>"प्रोजेक्ट हटाएं?",tbt=((e={},n={})=>{const t=n.locale??z();return t==="zh-CN"?Xvt():t==="fa"?Yvt():t==="ar"?Zvt():t==="es"?Jvt():t==="hi"?ebt():Qvt()}),nbt=()=>"Delete project",rbt=()=>"删除项目",sbt=()=>"حذف پروژه",ibt=()=>"حذف المشروع",abt=()=>"Eliminar proyecto",obt=()=>"प्रोजेक्ट हटाएं",lbt=((e={},n={})=>{const t=n.locale??z();return t==="zh-CN"?rbt():t==="fa"?sbt():t==="ar"?ibt():t==="es"?abt():t==="hi"?obt():nbt()}),cbt=()=>"Deleting…",ubt=()=>"正在删除…",_bt=()=>"در حال حذف…",fbt=()=>"جارٍ الحذف…",dbt=()=>"Eliminando…",hbt=()=>"हटाया जा रहा है…",pbt=((e={},n={})=>{const t=n.locale??z();return t==="zh-CN"?ubt():t==="fa"?_bt():t==="ar"?fbt():t==="es"?dbt():t==="hi"?hbt():cbt()}),mbt=()=>"Experiments",gbt=()=>"实验",vbt=()=>"آزمایش‌ها",bbt=()=>"التجارب",ybt=()=>"Experimentos",xbt=()=>"प्रयोग",YN=((e={},n={})=>{const t=n.locale??z();return t==="zh-CN"?gbt():t==="fa"?vbt():t==="ar"?bbt():t==="es"?ybt():t==="hi"?xbt():mbt()}),wbt=()=>"The local folder and linked GitHub repository are kept.",kbt=()=>"本地文件夹和已关联的 GitHub 仓库都会保留。",Sbt=()=>"پوشهٔ محلی و مخزن پیوندشدهٔ GitHub نگه داشته می‌شوند.",Cbt=()=>"يُحتفظ بالمجلد المحلي ومستودع GitHub المرتبط.",Ebt=()=>"Se conservan la carpeta local y el repositorio de GitHub vinculado.",Nbt=()=>"लोकल फ़ोल्डर और लिंक की गई GitHub रिपॉज़िटरी दोनों सुरक्षित रहती हैं।",zbt=((e={},n={})=>{const t=n.locale??z();return t==="zh-CN"?kbt():t==="fa"?Sbt():t==="ar"?Cbt():t==="es"?Ebt():t==="hi"?Nbt():wbt()}),jbt=()=>"The local folder is kept.",Tbt=()=>"本地文件夹会保留。",Abt=()=>"پوشهٔ محلی نگه داشته می‌شود.",Rbt=()=>"يُحتفظ بالمجلد المحلي.",Mbt=()=>"La carpeta local se conserva.",Obt=()=>"लोकल फ़ोल्डर सुरक्षित रहता है।",Dbt=((e={},n={})=>{const t=n.locale??z();return t==="zh-CN"?Tbt():t==="fa"?Abt():t==="ar"?Rbt():t==="es"?Mbt():t==="hi"?Obt():jbt()}),Lbt=()=>"New project",Ibt=()=>"新建项目",$bt=()=>"پروژهٔ جدید",Bbt=()=>"مشروع جديد",Pbt=()=>"Nuevo proyecto",Fbt=()=>"नया प्रोजेक्ट",BD=((e={},n={})=>{const t=n.locale??z();return t==="zh-CN"?Ibt():t==="fa"?$bt():t==="ar"?Bbt():t==="es"?Pbt():t==="hi"?Fbt():Lbt()}),Hbt=()=>"No projects yet — create one to get started.",qbt=()=>"尚无项目——新建一个即可开始。",Ubt=()=>"هنوز پروژه‌ای نیست — برای شروع یکی بسازید.",Gbt=()=>"لا توجد مشاريع بعد — أنشئ واحدًا للبدء.",Vbt=()=>"Aún no hay proyectos — crea uno para empezar.",Kbt=()=>"अभी तक कोई प्रोजेक्ट नहीं — शुरू करने के लिए एक बनाएं।",Wbt=((e={},n={})=>{const t=n.locale??z();return t==="zh-CN"?qbt():t==="fa"?Ubt():t==="ar"?Gbt():t==="es"?Vbt():t==="hi"?Kbt():Hbt()}),Qbt=()=>"Project",Xbt=()=>"项目",Ybt=()=>"پروژه",Zbt=()=>"المشروع",Jbt=()=>"Proyecto",eyt=()=>"प्रोजेक्ट",tyt=((e={},n={})=>{const t=n.locale??z();return t==="zh-CN"?Xbt():t==="fa"?Ybt():t==="ar"?Zbt():t==="es"?Jbt():t==="hi"?eyt():Qbt()}),nyt=()=>"Projects",ryt=()=>"项目",syt=()=>"پروژه‌ها",iyt=()=>"المشاريع",ayt=()=>"Proyectos",oyt=()=>"प्रोजेक्ट",lyt=((e={},n={})=>{const t=n.locale??z();return t==="zh-CN"?ryt():t==="fa"?syt():t==="ar"?iyt():t==="es"?ayt():t==="hi"?oyt():nyt()}),cyt=()=>"Repository",uyt=()=>"仓库",_yt=()=>"مخزن",fyt=()=>"المستودع",dyt=()=>"Repositorio",hyt=()=>"रिपॉज़िटरी",ZN=((e={},n={})=>{const t=n.locale??z();return t==="zh-CN"?uyt():t==="fa"?_yt():t==="ar"?fyt():t==="es"?dyt():t==="hi"?hyt():cyt()}),pyt=()=>"Idle",myt=()=>"空闲",gyt=()=>"بیکار",vyt=()=>"خامل",byt=()=>"Inactivo",yyt=()=>"निष्क्रिय",xyt=((e={},n={})=>{const t=n.locale??z();return t==="zh-CN"?myt():t==="fa"?gyt():t==="ar"?vyt():t==="es"?byt():t==="hi"?yyt():pyt()}),wyt=()=>"Local",kyt=()=>"本地",Syt=()=>"محلی",Cyt=()=>"محلي",Eyt=()=>"Local",Nyt=()=>"लोकल",vv=((e={},n={})=>{const t=n.locale??z();return t==="zh-CN"?kyt():t==="fa"?Syt():t==="ar"?Cyt():t==="es"?Eyt():t==="hi"?Nyt():wyt()}),zyt=()=>"1 total agent",jyt=()=>"共 1 个智能体",Tyt=()=>"در مجموع ۱ عامل",Ayt=()=>"وكيل واحد إجمالًا",Ryt=()=>"1 agente en total",Myt=()=>"1 कुल एजेंट",Oyt=((e={},n={})=>{const t=n.locale??z();return t==="zh-CN"?jyt():t==="fa"?Tyt():t==="ar"?Ayt():t==="es"?Ryt():t==="hi"?Myt():zyt()}),Dyt=e=>`${e==null?void 0:e.count} running`,Lyt=e=>`${e==null?void 0:e.count} 个运行中`,Iyt=e=>`${e==null?void 0:e.count} در حال اجرا`,$yt=e=>`${e==null?void 0:e.count} قيد التشغيل`,Byt=e=>`${e==null?void 0:e.count} en ejecución`,Pyt=e=>`${e==null?void 0:e.count} चल रहे`,Fyt=((e,n={})=>{const t=n.locale??z();return t==="zh-CN"?Lyt(e):t==="fa"?Iyt(e):t==="ar"?$yt(e):t==="es"?Byt(e):t==="hi"?Pyt(e):Dyt(e)}),Hyt=e=>`${e==null?void 0:e.count} total`,qyt=e=>`共 ${e==null?void 0:e.count} 个`,Uyt=e=>`در مجموع ${e==null?void 0:e.count}`,Gyt=e=>`${e==null?void 0:e.count} إجمالًا`,Vyt=e=>`${e==null?void 0:e.count} en total`,Kyt=e=>`${e==null?void 0:e.count} कुल`,JN=((e,n={})=>{const t=n.locale??z();return t==="zh-CN"?qyt(e):t==="fa"?Uyt(e):t==="ar"?Gyt(e):t==="es"?Vyt(e):t==="hi"?Kyt(e):Hyt(e)}),Wyt=()=>"Installing the compatible binary. This may take a few minutes.",Qyt=()=>"正在安装兼容的二进制文件。这可能需要几分钟。",Xyt=()=>"در حال نصب فایل اجرایی سازگار. این کار ممکن است چند دقیقه طول بکشد.",Yyt=()=>"جارٍ تثبيت الملف التنفيذي المتوافق. قد يستغرق هذا بضع دقائق.",Zyt=()=>"Instalando el binario compatible. Puede tardar unos minutos.",Jyt=()=>"संगत बाइनरी इंस्टॉल हो रही है। इसमें कुछ मिनट लग सकते हैं।",ext=((e={},n={})=>{const t=n.locale??z();return t==="zh-CN"?Qyt():t==="fa"?Xyt():t==="ar"?Yyt():t==="es"?Zyt():t==="hi"?Jyt():Wyt()}),txt=e=>`Setting up OpenResearch on ${e==null?void 0:e.host}`,nxt=e=>`正在设置 ${e==null?void 0:e.host} 上的 OpenResearch`,rxt=e=>`در حال راه‌اندازی OpenResearch روی ${e==null?void 0:e.host}`,sxt=e=>`جارٍ إعداد OpenResearch على ${e==null?void 0:e.host}`,ixt=e=>`Configurando OpenResearch en ${e==null?void 0:e.host}`,axt=e=>`${e==null?void 0:e.host} पर OpenResearch सेट अप हो रहा है`,oxt=((e,n={})=>{const t=n.locale??z();return t==="zh-CN"?nxt(e):t==="fa"?rxt(e):t==="ar"?sxt(e):t==="es"?ixt(e):t==="hi"?axt(e):txt(e)}),lxt=()=>"Check again",cxt=()=>"再次检查",uxt=()=>"بررسی دوباره",_xt=()=>"تحقق مجددًا",fxt=()=>"Volver a comprobar",dxt=()=>"फिर से जाँचें",ez=((e={},n={})=>{const t=n.locale??z();return t==="zh-CN"?cxt():t==="fa"?uxt():t==="ar"?_xt():t==="es"?fxt():t==="hi"?dxt():lxt()}),hxt=()=>"Closing…",pxt=()=>"正在关闭…",mxt=()=>"در حال بستن…",gxt=()=>"جارٍ الإغلاق…",vxt=()=>"Cerrando…",bxt=()=>"बंद हो रहा है…",yxt=((e={},n={})=>{const t=n.locale??z();return t==="zh-CN"?pxt():t==="fa"?mxt():t==="ar"?gxt():t==="es"?vxt():t==="hi"?bxt():hxt()}),xxt=e=>`Connected to ${e==null?void 0:e.host} as ${e==null?void 0:e.user}`,wxt=e=>`已以 ${e==null?void 0:e.user} 身份连接到 ${e==null?void 0:e.host}`,kxt=e=>`اتصال به ${e==null?void 0:e.host} با کاربر ${e==null?void 0:e.user}`,Sxt=e=>`متصل بـ ${e==null?void 0:e.host} باسم ${e==null?void 0:e.user}`,Cxt=e=>`Conectado a ${e==null?void 0:e.host} como ${e==null?void 0:e.user}`,Ext=e=>`${e==null?void 0:e.host} से ${e==null?void 0:e.user} के रूप में कनेक्टेड`,Nxt=((e,n={})=>{const t=n.locale??z();return t==="zh-CN"?wxt(e):t==="fa"?kxt(e):t==="ar"?Sxt(e):t==="es"?Cxt(e):t==="hi"?Ext(e):xxt(e)}),zxt=()=>"Preparing your remote workspace…",jxt=()=>"正在准备远程工作区…",Txt=()=>"در حال آماده‌سازی فضای کاری راه‌دور…",Axt=()=>"جارٍ تحضير مساحة عملك البعيدة…",Rxt=()=>"Preparando tu espacio de trabajo remoto…",Mxt=()=>"आपका रिमोट वर्कस्पेस तैयार किया जा रहा है…",Oxt=((e={},n={})=>{const t=n.locale??z();return t==="zh-CN"?jxt():t==="fa"?Txt():t==="ar"?Axt():t==="es"?Rxt():t==="hi"?Mxt():zxt()}),Dxt=e=>`Connecting to ${e==null?void 0:e.host}`,Lxt=e=>`正在连接到 ${e==null?void 0:e.host}`,Ixt=e=>`در حال اتصال به ${e==null?void 0:e.host}`,$xt=e=>`جارٍ الاتصال بـ ${e==null?void 0:e.host}`,Bxt=e=>`Conectando a ${e==null?void 0:e.host}`,Pxt=e=>`${e==null?void 0:e.host} से कनेक्ट हो रहा है`,Fxt=((e,n={})=>{const t=n.locale??z();return t==="zh-CN"?Lxt(e):t==="fa"?Ixt(e):t==="ar"?$xt(e):t==="es"?Bxt(e):t==="hi"?Pxt(e):Dxt(e)}),Hxt=()=>"Close remote host picker",qxt=()=>"关闭远程主机选择器",Uxt=()=>"بستن انتخاب‌گر میزبان راه‌دور",Gxt=()=>"إغلاق مُنتقي المضيف البعيد",Vxt=()=>"Cerrar el selector de hosts remotos",Kxt=()=>"रिमोट होस्ट पिकर बंद करें",Wxt=((e={},n={})=>{const t=n.locale??z();return t==="zh-CN"?qxt():t==="fa"?Uxt():t==="ar"?Gxt():t==="es"?Vxt():t==="hi"?Kxt():Hxt()}),Qxt=()=>"Choose a configured SSH host.",Xxt=()=>"选择已配置的 SSH 主机。",Yxt=()=>"یک میزبان SSH پیکربندی‌شده انتخاب کنید.",Zxt=()=>"اختر مضيف SSH مُعدًّا.",Jxt=()=>"Elige un host SSH configurado.",e2t=()=>"एक कॉन्फ़िगर किया गया SSH होस्ट चुनें।",t2t=((e={},n={})=>{const t=n.locale??z();return t==="zh-CN"?Xxt():t==="fa"?Yxt():t==="ar"?Zxt():t==="es"?Jxt():t==="hi"?e2t():Qxt()}),n2t=()=>"Connect to remote",r2t=()=>"连接到远程主机",s2t=()=>"اتصال به میزبان راه‌دور",i2t=()=>"الاتصال بجهاز بعيد",a2t=()=>"Conectar a un host remoto",o2t=()=>"रिमोट से कनेक्ट करें",n3=((e={},n={})=>{const t=n.locale??z();return t==="zh-CN"?r2t():t==="fa"?s2t():t==="ar"?i2t():t==="es"?a2t():t==="hi"?o2t():n2t()}),l2t=()=>"Disconnect",c2t=()=>"断开连接",u2t=()=>"قطع اتصال",_2t=()=>"قطع الاتصال",f2t=()=>"Desconectar",d2t=()=>"डिस्कनेक्ट करें",r3=((e={},n={})=>{const t=n.locale??z();return t==="zh-CN"?c2t():t==="fa"?u2t():t==="ar"?_2t():t==="es"?f2t():t==="hi"?d2t():l2t()}),h2t=()=>"Your remote work is still running. Reconnect when you’re ready.",p2t=()=>"你的远程工作仍在运行。准备好后可以重新连接。",m2t=()=>"کار راه‌دور شما همچنان در حال اجرا است. هر زمان آماده بودید دوباره متصل شوید.",g2t=()=>"لا يزال عملك البعيد قيد التشغيل. أعد الاتصال عندما تكون جاهزًا.",v2t=()=>"Tu trabajo remoto sigue en ejecución. Vuelve a conectarte cuando quieras.",b2t=()=>"आपका रिमोट काम अभी भी चल रहा है। तैयार होने पर फिर से कनेक्ट करें।",y2t=((e={},n={})=>{const t=n.locale??z();return t==="zh-CN"?p2t():t==="fa"?m2t():t==="ar"?g2t():t==="es"?v2t():t==="hi"?b2t():h2t()}),x2t=e=>`Disconnected from ${e==null?void 0:e.host}`,w2t=e=>`已断开与 ${e==null?void 0:e.host} 的连接`,k2t=e=>`اتصال به ${e==null?void 0:e.host} قطع شد`,S2t=e=>`انقطع الاتصال بـ ${e==null?void 0:e.host}`,C2t=e=>`Desconectado de ${e==null?void 0:e.host}`,E2t=e=>`${e==null?void 0:e.host} से डिस्कनेक्ट हो गया`,PD=((e,n={})=>{const t=n.locale??z();return t==="zh-CN"?w2t(e):t==="fa"?k2t(e):t==="ar"?S2t(e):t==="es"?C2t(e):t==="hi"?E2t(e):x2t(e)}),N2t=e=>`Could not connect to ${e==null?void 0:e.host}`,z2t=e=>`无法连接到 ${e==null?void 0:e.host}`,j2t=e=>`اتصال به ${e==null?void 0:e.host} ممکن نشد`,T2t=e=>`تعذّر الاتصال بـ ${e==null?void 0:e.host}`,A2t=e=>`No se pudo conectar a ${e==null?void 0:e.host}`,R2t=e=>`${e==null?void 0:e.host} से कनेक्ट नहीं हो सका`,M2t=((e,n={})=>{const t=n.locale??z();return t==="zh-CN"?z2t(e):t==="fa"?j2t(e):t==="ar"?T2t(e):t==="es"?A2t(e):t==="hi"?R2t(e):N2t(e)}),O2t=()=>"Restart local OpenResearch and select this SSH host again. Work on the remote host continues.",D2t=()=>"请重新启动本地 OpenResearch 并再次选择此 SSH 主机。远程主机上的工作仍在继续。",L2t=()=>"OpenResearch محلی را دوباره راه‌اندازی کنید و این میزبان SSH را دوباره انتخاب کنید. کار روی میزبان راه‌دور ادامه دارد.",I2t=()=>"أعد تشغيل OpenResearch المحلي واختر مضيف SSH هذا مجددًا. يستمر العمل على المضيف البعيد.",$2t=()=>"Reinicia OpenResearch en local y vuelve a seleccionar este host SSH. El trabajo en el host remoto continúa.",B2t=()=>"लोकल OpenResearch फिर से शुरू करें और इस SSH होस्ट को फिर से चुनें। रिमोट होस्ट पर काम जारी रहता है।",P2t=((e={},n={})=>{const t=n.locale??z();return t==="zh-CN"?D2t():t==="fa"?L2t():t==="ar"?I2t():t==="es"?$2t():t==="hi"?B2t():O2t()}),F2t=()=>"OpenResearch agents have stopped. Submitted experiments may still be running.",H2t=()=>"OpenResearch 智能体已停止。已提交的实验可能仍在运行。",q2t=()=>"عامل‌های OpenResearch متوقف شده‌اند. آزمایش‌های ارسال‌شده ممکن است همچنان در حال اجرا باشند.",U2t=()=>"توقّف وكلاء OpenResearch. قد تظل التجارب المُرسَلة قيد التشغيل.",G2t=()=>"Los agentes de OpenResearch se han detenido. Puede que los experimentos enviados sigan en ejecución.",V2t=()=>"OpenResearch एजेंट रुक गए हैं। सबमिट किए गए प्रयोग अभी भी चल सकते हैं।",K2t=((e={},n={})=>{const t=n.locale??z();return t==="zh-CN"?H2t():t==="fa"?q2t():t==="ar"?U2t():t==="es"?G2t():t==="hi"?V2t():F2t()}),W2t=e=>`OpenResearch is not running on ${e==null?void 0:e.host}`,Q2t=e=>`OpenResearch 未在 ${e==null?void 0:e.host} 上运行`,X2t=e=>`OpenResearch روی ${e==null?void 0:e.host} در حال اجرا نیست`,Y2t=e=>`‏OpenResearch لا يعمل على ${e==null?void 0:e.host}`,Z2t=e=>`OpenResearch no se está ejecutando en ${e==null?void 0:e.host}`,J2t=e=>`${e==null?void 0:e.host} पर OpenResearch नहीं चल रहा`,ewt=((e,n={})=>{const t=n.locale??z();return t==="zh-CN"?Q2t(e):t==="fa"?X2t(e):t==="ar"?Y2t(e):t==="es"?Z2t(e):t==="hi"?J2t(e):W2t(e)}),twt=()=>"OpenResearch binary",nwt=()=>"OpenResearch 二进制文件",rwt=()=>"فایل اجرایی OpenResearch",swt=()=>"الملف التنفيذي لـ OpenResearch",iwt=()=>"Binario de OpenResearch",awt=()=>"OpenResearch बाइनरी",owt=((e={},n={})=>{const t=n.locale??z();return t==="zh-CN"?nwt():t==="fa"?rwt():t==="ar"?swt():t==="es"?iwt():t==="hi"?awt():twt()}),lwt=()=>"OpenResearch Database",cwt=()=>"OpenResearch 数据库",uwt=()=>"پایگاه دادهٔ OpenResearch",_wt=()=>"قاعدة بيانات OpenResearch",fwt=()=>"Base de datos de OpenResearch",dwt=()=>"OpenResearch डेटाबेस",hwt=((e={},n={})=>{const t=n.locale??z();return t==="zh-CN"?cwt():t==="fa"?uwt():t==="ar"?_wt():t==="es"?fwt():t==="hi"?dwt():lwt()}),pwt=()=>"OpenResearch will use these locations for your remote SSH user and does not require sudo.",mwt=()=>"OpenResearch 将为你的远程 SSH 用户使用以下位置,无需 sudo。",gwt=()=>"OpenResearch از این مسیرها برای کاربر SSH راه‌دور شما استفاده می‌کند و به sudo نیاز ندارد.",vwt=()=>"سيستخدم OpenResearch هذه المواقع لمستخدم SSH البعيد ولا يتطلب sudo.",bwt=()=>"OpenResearch usará estas ubicaciones para tu usuario SSH remoto y no necesita sudo.",ywt=()=>"OpenResearch आपके रिमोट SSH यूज़र के लिए इन स्थानों का इस्तेमाल करेगा और sudo की ज़रूरत नहीं है।",xwt=((e={},n={})=>{const t=n.locale??z();return t==="zh-CN"?mwt():t==="fa"?gwt():t==="ar"?vwt():t==="es"?bwt():t==="hi"?ywt():pwt()}),wwt=()=>"Install OpenResearch?",kwt=()=>"安装 OpenResearch?",Swt=()=>"OpenResearch نصب شود؟",Cwt=()=>"تثبيت OpenResearch؟",Ewt=()=>"¿Instalar OpenResearch?",Nwt=()=>"OpenResearch इंस्टॉल करें?",zwt=((e={},n={})=>{const t=n.locale??z();return t==="zh-CN"?kwt():t==="fa"?Swt():t==="ar"?Cwt():t==="es"?Ewt():t==="hi"?Nwt():wwt()}),jwt=()=>"Installing…",Twt=()=>"正在安装…",Awt=()=>"در حال نصب…",Rwt=()=>"جارٍ التثبيت…",Mwt=()=>"Instalando…",Owt=()=>"इंस्टॉल हो रहा है…",Dwt=((e={},n={})=>{const t=n.locale??z();return t==="zh-CN"?Twt():t==="fa"?Awt():t==="ar"?Rwt():t==="es"?Mwt():t==="hi"?Owt():jwt()}),Lwt=()=>"No matching SSH hosts",Iwt=()=>"没有匹配的 SSH 主机",$wt=()=>"میزبان SSH منطبقی پیدا نشد",Bwt=()=>"لا توجد مضيفات SSH مطابقة",Pwt=()=>"No hay hosts SSH que coincidan",Fwt=()=>"कोई मेल खाता SSH होस्ट नहीं",Hwt=((e={},n={})=>{const t=n.locale??z();return t==="zh-CN"?Iwt():t==="fa"?$wt():t==="ar"?Bwt():t==="es"?Pwt():t==="hi"?Fwt():Lwt()}),qwt=e=>`OpenResearch is not installed for ${e==null?void 0:e.user} on ${e==null?void 0:e.host}. Install it now?`,Uwt=e=>`${e==null?void 0:e.user} 尚未在 ${e==null?void 0:e.host} 上安装 OpenResearch。现在安装吗?`,Gwt=e=>`OpenResearch برای ${e==null?void 0:e.user} روی ${e==null?void 0:e.host} نصب نیست. اکنون نصب شود؟`,Vwt=e=>`‏OpenResearch غير مثبّت للمستخدم ${e==null?void 0:e.user} على ${e==null?void 0:e.host}. هل تريد تثبيته الآن؟`,Kwt=e=>`OpenResearch no está instalado para ${e==null?void 0:e.user} en ${e==null?void 0:e.host}. ¿Instalarlo ahora?`,Wwt=e=>`${e==null?void 0:e.host} पर ${e==null?void 0:e.user} के लिए OpenResearch इंस्टॉल नहीं है। अभी इंस्टॉल करें?`,Qwt=((e,n={})=>{const t=n.locale??z();return t==="zh-CN"?Uwt(e):t==="fa"?Gwt(e):t==="ar"?Vwt(e):t==="es"?Kwt(e):t==="hi"?Wwt(e):qwt(e)}),Xwt=()=>"Open remote",Ywt=()=>"打开远程工作区",Zwt=()=>"باز کردن راه‌دور",Jwt=()=>"فتح مساحة العمل البعيدة",e4t=()=>"Abrir remoto",t4t=()=>"रिमोट खोलें",n4t=((e={},n={})=>{const t=n.locale??z();return t==="zh-CN"?Ywt():t==="fa"?Zwt():t==="ar"?Jwt():t==="es"?e4t():t==="hi"?t4t():Xwt()}),r4t=()=>"Closing this tab or disconnecting leaves agents and experiments running. Approval requests remain pending for up to 55 minutes. A host restart or administrator policy may stop OpenResearch.",s4t=()=>"关闭此标签页或断开连接后,代理和实验仍会继续运行。审批请求最多保持待处理 55 分钟。主机重启或管理员策略可能会停止 OpenResearch。",i4t=()=>"بستن این زبانه یا قطع اتصال، عامل‌ها و آزمایش‌ها را در حال اجرا نگه می‌دارد. درخواست‌های تأیید تا ۵۵ دقیقه در انتظار می‌مانند. راه‌اندازی مجدد میزبان یا سیاست مدیر ممکن است OpenResearch را متوقف کند.",a4t=()=>"إغلاق هذا التبويب أو قطع الاتصال يُبقي الوكلاء والتجارب قيد التشغيل. تبقى طلبات الموافقة معلّقة لمدة تصل إلى 55 دقيقة. قد تتسبب إعادة تشغيل المضيف أو سياسة المسؤول في إيقاف OpenResearch.",o4t=()=>"Si cierras esta pestaña o te desconectas, los agentes y experimentos siguen en ejecución. Las solicitudes de aprobación quedan pendientes hasta 55 minutos. Un reinicio del host o una política del administrador pueden detener OpenResearch.",l4t=()=>"यह टैब बंद करने या डिस्कनेक्ट करने पर भी एजेंट और प्रयोग चलते रहते हैं। स्वीकृति अनुरोध 55 मिनट तक लंबित रहते हैं। होस्ट रीस्टार्ट या एडमिन नीति OpenResearch को रोक सकती है।",c4t=((e={},n={})=>{const t=n.locale??z();return t==="zh-CN"?s4t():t==="fa"?i4t():t==="ar"?a4t():t==="es"?o4t():t==="hi"?l4t():r4t()}),u4t=()=>"Your browser blocked the remote workspace tab. Allow pop-ups and try again.",_4t=()=>"浏览器阻止了远程工作区标签页。请允许弹出窗口后重试。",f4t=()=>"مرورگر زبانهٔ فضای کاری راه‌دور را مسدود کرد. پنجره‌های بازشو را مجاز کنید و دوباره تلاش کنید.",d4t=()=>"حجب متصفحك تبويب مساحة العمل البعيدة. اسمح بالنوافذ المنبثقة وحاول مجددًا.",h4t=()=>"Tu navegador bloqueó la pestaña del espacio de trabajo remoto. Permite las ventanas emergentes y vuelve a intentarlo.",p4t=()=>"आपके ब्राउज़र ने रिमोट वर्कस्पेस टैब को ब्लॉक कर दिया। पॉप-अप की अनुमति दें और फिर से कोशिश करें।",m4t=((e={},n={})=>{const t=n.locale??z();return t==="zh-CN"?_4t():t==="fa"?f4t():t==="ar"?d4t():t==="es"?h4t():t==="hi"?p4t():u4t()}),g4t=()=>"Preparing remote workspace…",v4t=()=>"正在准备远程工作区…",b4t=()=>"در حال آماده‌سازی فضای کاری راه‌دور…",y4t=()=>"جارٍ تحضير مساحة العمل البعيدة…",x4t=()=>"Preparando el espacio de trabajo remoto…",w4t=()=>"रिमोट वर्कस्पेस तैयार हो रहा है…",k4t=((e={},n={})=>{const t=n.locale??z();return t==="zh-CN"?v4t():t==="fa"?b4t():t==="ar"?y4t():t==="es"?x4t():t==="hi"?w4t():g4t()}),S4t=()=>"Reconnect",C4t=()=>"重新连接",E4t=()=>"اتصال دوباره",N4t=()=>"إعادة الاتصال",z4t=()=>"Reconectar",j4t=()=>"फिर से कनेक्ट करें",tz=((e={},n={})=>{const t=n.locale??z();return t==="zh-CN"?C4t():t==="fa"?E4t():t==="ar"?N4t():t==="es"?z4t():t==="hi"?j4t():S4t()}),T4t=()=>"The connection dropped. Your remote work remains running while OpenResearch reconnects.",A4t=()=>"连接已中断。OpenResearch 重新连接期间,你的远程工作仍会继续运行。",R4t=()=>"اتصال قطع شد. هنگام اتصال دوبارهٔ OpenResearch، کار راه‌دور شما همچنان اجرا می‌شود.",M4t=()=>"انقطع الاتصال. يبقى عملك البعيد قيد التشغيل بينما يعيد OpenResearch الاتصال.",O4t=()=>"Se perdió la conexión. Tu trabajo remoto sigue en ejecución mientras OpenResearch se reconecta.",D4t=()=>"कनेक्शन टूट गया। OpenResearch के फिर से कनेक्ट होने के दौरान आपका रिमोट काम चलता रहता है।",L4t=((e={},n={})=>{const t=n.locale??z();return t==="zh-CN"?A4t():t==="fa"?R4t():t==="ar"?M4t():t==="es"?O4t():t==="hi"?D4t():T4t()}),I4t=e=>`Reconnecting to ${e==null?void 0:e.host}`,$4t=e=>`正在重新连接到 ${e==null?void 0:e.host}`,B4t=e=>`در حال اتصال دوباره به ${e==null?void 0:e.host}`,P4t=e=>`جارٍ إعادة الاتصال بـ ${e==null?void 0:e.host}`,F4t=e=>`Reconectando a ${e==null?void 0:e.host}`,H4t=e=>`${e==null?void 0:e.host} से फिर से कनेक्ट हो रहा है`,q4t=((e,n={})=>{const t=n.locale??z();return t==="zh-CN"?$4t(e):t==="fa"?B4t(e):t==="ar"?P4t(e):t==="es"?F4t(e):t==="hi"?H4t(e):I4t(e)}),U4t=()=>"Search SSH hosts",G4t=()=>"搜索 SSH 主机",V4t=()=>"جستجوی میزبان‌های SSH",K4t=()=>"البحث في مضيفات SSH",W4t=()=>"Buscar hosts SSH",Q4t=()=>"SSH होस्ट खोजें",nz=((e={},n={})=>{const t=n.locale??z();return t==="zh-CN"?G4t():t==="fa"?V4t():t==="ar"?K4t():t==="es"?W4t():t==="hi"?Q4t():U4t()}),X4t=e=>`SSH: ${e==null?void 0:e.host}`,Y4t=e=>`SSH:${e==null?void 0:e.host}`,Z4t=e=>`SSH: ${e==null?void 0:e.host}`,J4t=e=>`SSH: ${e==null?void 0:e.host}`,e3t=e=>`SSH: ${e==null?void 0:e.host}`,t3t=e=>`SSH: ${e==null?void 0:e.host}`,K2=((e,n={})=>{const t=n.locale??z();return t==="zh-CN"?Y4t(e):t==="fa"?Z4t(e):t==="ar"?J4t(e):t==="es"?e3t(e):t==="hi"?t3t(e):X4t(e)}),n3t=()=>"Start a new OpenResearch host",r3t=()=>"启动新的 OpenResearch 主机",s3t=()=>"راه‌اندازی میزبان جدید OpenResearch",i3t=()=>"بدء مضيف OpenResearch جديد",a3t=()=>"Iniciar un nuevo host de OpenResearch",o3t=()=>"एक नया OpenResearch होस्ट शुरू करें",l3t=((e={},n={})=>{const t=n.locale??z();return t==="zh-CN"?r3t():t==="fa"?s3t():t==="ar"?i3t():t==="es"?a3t():t==="hi"?o3t():n3t()}),c3t=e=>`End ${e==null?void 0:e.count} pending approvals.`,u3t=e=>`结束 ${e==null?void 0:e.count} 个待审批请求。`,_3t=e=>`${e==null?void 0:e.count} تأیید در انتظار را پایان می‌دهد.`,f3t=e=>`إنهاء طلبات الموافقة المعلّقة (${e==null?void 0:e.count}).`,d3t=e=>`Cancelará ${e==null?void 0:e.count} aprobaciones pendientes.`,h3t=e=>`${e==null?void 0:e.count} लंबित स्वीकृतियाँ खत्म होंगी।`,p3t=((e,n={})=>{const t=n.locale??z();return t==="zh-CN"?u3t(e):t==="fa"?_3t(e):t==="ar"?f3t(e):t==="es"?d3t(e):t==="hi"?h3t(e):c3t(e)}),m3t=()=>"Stop OpenResearch",g3t=()=>"停止 OpenResearch",v3t=()=>"توقف OpenResearch",b3t=()=>"إيقاف OpenResearch",y3t=()=>"Detener OpenResearch",x3t=()=>"OpenResearch रोकें",w3t=((e={},n={})=>{const t=n.locale??z();return t==="zh-CN"?g3t():t==="fa"?v3t():t==="ar"?b3t():t==="es"?y3t():t==="hi"?x3t():m3t()}),k3t=e=>`Stop OpenResearch on ${e==null?void 0:e.host}?`,S3t=e=>`停止 ${e==null?void 0:e.host} 上的 OpenResearch?`,C3t=e=>`OpenResearch روی ${e==null?void 0:e.host} متوقف شود؟`,E3t=e=>`إيقاف OpenResearch على ${e==null?void 0:e.host}؟`,N3t=e=>`¿Detener OpenResearch en ${e==null?void 0:e.host}?`,z3t=e=>`${e==null?void 0:e.host} पर OpenResearch रोकें?`,j3t=((e,n={})=>{const t=n.locale??z();return t==="zh-CN"?S3t(e):t==="fa"?C3t(e):t==="ar"?E3t(e):t==="es"?N3t(e):t==="hi"?z3t(e):k3t(e)}),T3t=e=>`Leave ${e==null?void 0:e.count} submitted experiments running.`,A3t=e=>`让 ${e==null?void 0:e.count} 个已提交实验继续运行。`,R3t=e=>`${e==null?void 0:e.count} آزمایش ارسال‌شده را در حال اجرا نگه می‌دارد.`,M3t=e=>`إبقاء التجارب المُرسَلة قيد التشغيل (${e==null?void 0:e.count}).`,O3t=e=>`Dejará ${e==null?void 0:e.count} experimentos enviados en ejecución.`,D3t=e=>`${e==null?void 0:e.count} सबमिट किए गए प्रयोग चलते रहेंगे।`,L3t=((e,n={})=>{const t=n.locale??z();return t==="zh-CN"?A3t(e):t==="fa"?R3t(e):t==="ar"?M3t(e):t==="es"?O3t(e):t==="hi"?D3t(e):T3t(e)}),I3t=()=>"Stop OpenResearch on host",$3t=()=>"停止主机上的 OpenResearch",B3t=()=>"توقف OpenResearch روی میزبان",P3t=()=>"إيقاف OpenResearch على المضيف",F3t=()=>"Detener OpenResearch en el host",H3t=()=>"होस्ट पर OpenResearch रोकें",FD=((e={},n={})=>{const t=n.locale??z();return t==="zh-CN"?$3t():t==="fa"?B3t():t==="ar"?P3t():t==="es"?F3t():t==="hi"?H3t():I3t()}),q3t=()=>"This will also:",U3t=()=>"这还将:",G3t=()=>"این کار همچنین:",V3t=()=>"سيؤدي هذا أيضًا إلى:",K3t=()=>"Esto también:",W3t=()=>"इससे यह भी होगा:",Q3t=((e={},n={})=>{const t=n.locale??z();return t==="zh-CN"?U3t():t==="fa"?G3t():t==="ar"?V3t():t==="es"?K3t():t==="hi"?W3t():q3t()}),X3t=()=>"End 1 pending approval.",Y3t=()=>"结束 1 个待审批请求。",Z3t=()=>"۱ تأیید در انتظار را پایان می‌دهد.",J3t=()=>"إنهاء طلب موافقة معلّق واحد.",e5t=()=>"Cancelará 1 aprobación pendiente.",t5t=()=>"1 लंबित स्वीकृति खत्म होगी।",n5t=((e={},n={})=>{const t=n.locale??z();return t==="zh-CN"?Y3t():t==="fa"?Z3t():t==="ar"?J3t():t==="es"?e5t():t==="hi"?t5t():X3t()}),r5t=()=>"Leave 1 submitted experiment running.",s5t=()=>"让 1 个已提交实验继续运行。",i5t=()=>"۱ آزمایش ارسال‌شده را در حال اجرا نگه می‌دارد.",a5t=()=>"ترك تجربة مُرسَلة واحدة قيد التشغيل.",o5t=()=>"Dejará 1 experimento enviado en ejecución.",l5t=()=>"1 सबमिट किया गया प्रयोग चलता रहेगा।",c5t=((e={},n={})=>{const t=n.locale??z();return t==="zh-CN"?s5t():t==="fa"?i5t():t==="ar"?a5t():t==="es"?o5t():t==="hi"?l5t():r5t()}),u5t=()=>"Disconnect 1 other client.",_5t=()=>"断开 1 个其他客户端。",f5t=()=>"اتصال ۱ کارخواه دیگر را قطع می‌کند.",d5t=()=>"قطع اتصال عميل آخر واحد.",h5t=()=>"Desconectará a otro cliente.",p5t=()=>"1 अन्य क्लाइंट डिस्कनेक्ट होगा।",m5t=((e={},n={})=>{const t=n.locale??z();return t==="zh-CN"?_5t():t==="fa"?f5t():t==="ar"?d5t():t==="es"?h5t():t==="hi"?p5t():u5t()}),g5t=()=>"Keep 1 queued message saved.",v5t=()=>"保留 1 条排队消息。",b5t=()=>"۱ پیام در صف را ذخیره نگه می‌دارد.",y5t=()=>"إبقاء رسالة واحدة محفوظة في قائمة الانتظار.",x5t=()=>"Conservará 1 mensaje en cola.",w5t=()=>"1 कतार में लगा संदेश सुरक्षित रहेगा।",k5t=((e={},n={})=>{const t=n.locale??z();return t==="zh-CN"?v5t():t==="fa"?b5t():t==="ar"?y5t():t==="es"?x5t():t==="hi"?w5t():g5t()}),S5t=()=>"Interrupt 1 active agent turn.",C5t=()=>"中断 1 个活动代理任务。",E5t=()=>"۱ نوبت فعال عامل را قطع می‌کند.",N5t=()=>"مقاطعة جولة وكيل نشطة واحدة.",z5t=()=>"Interrumpirá 1 turno activo de un agente.",j5t=()=>"1 सक्रिय एजेंट टर्न बाधित होगा।",T5t=((e={},n={})=>{const t=n.locale??z();return t==="zh-CN"?C5t():t==="fa"?E5t():t==="ar"?N5t():t==="es"?z5t():t==="hi"?j5t():S5t()}),A5t=e=>`Disconnect ${e==null?void 0:e.count} other clients.`,R5t=e=>`断开 ${e==null?void 0:e.count} 个其他客户端。`,M5t=e=>`اتصال ${e==null?void 0:e.count} کارخواه دیگر را قطع می‌کند.`,O5t=e=>`قطع اتصال العملاء الآخرين (${e==null?void 0:e.count}).`,D5t=e=>`Desconectará otros ${e==null?void 0:e.count} clientes.`,L5t=e=>`${e==null?void 0:e.count} अन्य क्लाइंट डिस्कनेक्ट होंगे।`,I5t=((e,n={})=>{const t=n.locale??z();return t==="zh-CN"?R5t(e):t==="fa"?M5t(e):t==="ar"?O5t(e):t==="es"?D5t(e):t==="hi"?L5t(e):A5t(e)}),$5t=e=>`Keep ${e==null?void 0:e.count} queued messages saved.`,B5t=e=>`保留 ${e==null?void 0:e.count} 条排队消息。`,P5t=e=>`${e==null?void 0:e.count} پیام در صف را ذخیره نگه می‌دارد.`,F5t=e=>`إبقاء الرسائل في قائمة الانتظار محفوظة (${e==null?void 0:e.count}).`,H5t=e=>`Conservará ${e==null?void 0:e.count} mensajes en cola.`,q5t=e=>`${e==null?void 0:e.count} कतार में लगे संदेश सुरक्षित रहेंगे।`,U5t=((e,n={})=>{const t=n.locale??z();return t==="zh-CN"?B5t(e):t==="fa"?P5t(e):t==="ar"?F5t(e):t==="es"?H5t(e):t==="hi"?q5t(e):$5t(e)}),G5t=e=>`Interrupt ${e==null?void 0:e.count} active agent turns.`,V5t=e=>`中断 ${e==null?void 0:e.count} 个活动代理任务。`,K5t=e=>`${e==null?void 0:e.count} نوبت فعال عامل را قطع می‌کند.`,W5t=e=>`مقاطعة جولات الوكلاء النشطة (${e==null?void 0:e.count}).`,Q5t=e=>`Interrumpirá ${e==null?void 0:e.count} turnos activos de agentes.`,X5t=e=>`${e==null?void 0:e.count} सक्रिय एजेंट टर्न बाधित होंगे।`,Y5t=((e,n={})=>{const t=n.locale??z();return t==="zh-CN"?V5t(e):t==="fa"?K5t(e):t==="ar"?W5t(e):t==="es"?Q5t(e):t==="hi"?X5t(e):G5t(e)}),Z5t=()=>"Stopping host…",J5t=()=>"正在停止主机…",ekt=()=>"در حال توقف میزبان…",tkt=()=>"جارٍ إيقاف المضيف…",nkt=()=>"Deteniendo el host…",rkt=()=>"होस्ट रोका जा रहा है…",skt=((e={},n={})=>{const t=n.locale??z();return t==="zh-CN"?J5t():t==="fa"?ekt():t==="ar"?tkt():t==="es"?nkt():t==="hi"?rkt():Z5t()}),ikt=()=>"Update",akt=()=>"更新",okt=()=>"به‌روزرسانی",lkt=()=>"تحديث",ckt=()=>"Actualizar",ukt=()=>"अपडेट करें",rz=((e={},n={})=>{const t=n.locale??z();return t==="zh-CN"?akt():t==="fa"?okt():t==="ar"?lkt():t==="es"?ckt():t==="hi"?ukt():ikt()}),_kt=e=>`The OpenResearch installation on ${e==null?void 0:e.host} is not compatible with this dashboard. Update it now?`,fkt=e=>`${e==null?void 0:e.host} 上的 OpenResearch 与此仪表板不兼容。现在更新吗?`,dkt=e=>`نسخهٔ OpenResearch روی ${e==null?void 0:e.host} با این داشبورد سازگار نیست. اکنون به‌روزرسانی شود؟`,hkt=e=>`نسخة OpenResearch المثبّتة على ${e==null?void 0:e.host} غير متوافقة مع هذه اللوحة. هل تريد تحديثها الآن؟`,pkt=e=>`La instalación de OpenResearch en ${e==null?void 0:e.host} no es compatible con este dashboard. ¿Actualizarla ahora?`,mkt=e=>`${e==null?void 0:e.host} पर OpenResearch इंस्टॉलेशन इस डैशबोर्ड के साथ संगत नहीं है। अभी अपडेट करें?`,gkt=((e,n={})=>{const t=n.locale??z();return t==="zh-CN"?fkt(e):t==="fa"?dkt(e):t==="ar"?hkt(e):t==="es"?pkt(e):t==="hi"?mkt(e):_kt(e)}),vkt=()=>"Update OpenResearch?",bkt=()=>"更新 OpenResearch?",ykt=()=>"OpenResearch به‌روزرسانی شود؟",xkt=()=>"تحديث OpenResearch؟",wkt=()=>"¿Actualizar OpenResearch?",kkt=()=>"OpenResearch अपडेट करें?",Skt=((e={},n={})=>{const t=n.locale??z();return t==="zh-CN"?bkt():t==="fa"?ykt():t==="ar"?xkt():t==="es"?wkt():t==="hi"?kkt():vkt()}),Ckt=()=>"Updating…",Ekt=()=>"正在更新…",Nkt=()=>"در حال به‌روزرسانی…",zkt=()=>"جارٍ التحديث…",jkt=()=>"Actualizando…",Tkt=()=>"अपडेट हो रहा है…",Akt=((e={},n={})=>{const t=n.locale??z();return t==="zh-CN"?Ekt():t==="fa"?Nkt():t==="ar"?zkt():t==="es"?jkt():t==="hi"?Tkt():Ckt()}),Rkt=()=>"Disable syncing",Mkt=()=>"关闭同步",Okt=()=>"غیرفعال کردن همگام‌سازی",Dkt=()=>"تعطيل المزامنة",Lkt=()=>"Desactivar sincronización",Ikt=()=>"सिंकिंग बंद करें",$kt=((e={},n={})=>{const t=n.locale??z();return t==="zh-CN"?Mkt():t==="fa"?Okt():t==="ar"?Dkt():t==="es"?Lkt():t==="hi"?Ikt():Rkt()}),Bkt=()=>"Enable GitHub syncing",Pkt=()=>"启用 GitHub 同步",Fkt=()=>"فعال‌سازی همگام‌سازی GitHub",Hkt=()=>"تفعيل مزامنة GitHub",qkt=()=>"Activar sincronización con GitHub",Ukt=()=>"GitHub सिंकिंग चालू करें",Gkt=((e={},n={})=>{const t=n.locale??z();return t==="zh-CN"?Pkt():t==="fa"?Fkt():t==="ar"?Hkt():t==="es"?qkt():t==="hi"?Ukt():Bkt()}),Vkt=()=>"Enabling…",Kkt=()=>"正在启用…",Wkt=()=>"در حال فعال‌سازی…",Qkt=()=>"جارٍ التفعيل…",Xkt=()=>"Activando…",Ykt=()=>"चालू हो रहा है…",Zkt=((e={},n={})=>{const t=n.locale??z();return t==="zh-CN"?Kkt():t==="fa"?Wkt():t==="ar"?Qkt():t==="es"?Xkt():t==="hi"?Ykt():Vkt()}),Jkt=()=>"Updating…",eSt=()=>"正在更新…",tSt=()=>"در حال به‌روزرسانی…",nSt=()=>"جارٍ التحديث…",rSt=()=>"Actualizando…",sSt=()=>"अपडेट हो रहा है…",iSt=((e={},n={})=>{const t=n.locale??z();return t==="zh-CN"?eSt():t==="fa"?tSt():t==="ar"?nSt():t==="es"?rSt():t==="hi"?sSt():Jkt()}),aSt=e=>`Retrying · attempt ${e==null?void 0:e.attempt}`,oSt=e=>`正在重试 · 第 ${e==null?void 0:e.attempt} 次`,lSt=e=>`در حال تلاش دوباره · تلاش ${e==null?void 0:e.attempt}`,cSt=e=>`إعادة المحاولة · المحاولة ${e==null?void 0:e.attempt}`,uSt=e=>`Reintentando · intento ${e==null?void 0:e.attempt}`,_St=e=>`फिर से कोशिश · प्रयास ${e==null?void 0:e.attempt}`,fSt=((e,n={})=>{const t=n.locale??z();return t==="zh-CN"?oSt(e):t==="fa"?lSt(e):t==="ar"?cSt(e):t==="es"?uSt(e):t==="hi"?_St(e):aSt(e)}),dSt=e=>`Retrying · attempt ${e==null?void 0:e.attempt}/${e==null?void 0:e.maximum}`,hSt=e=>`正在重试 · 第 ${e==null?void 0:e.attempt}/${e==null?void 0:e.maximum} 次`,pSt=e=>`در حال تلاش دوباره · تلاش ${e==null?void 0:e.attempt} از ${e==null?void 0:e.maximum}`,mSt=e=>`إعادة المحاولة · المحاولة ${e==null?void 0:e.attempt}/${e==null?void 0:e.maximum}`,gSt=e=>`Reintentando · intento ${e==null?void 0:e.attempt}/${e==null?void 0:e.maximum}`,vSt=e=>`फिर से कोशिश · प्रयास ${e==null?void 0:e.attempt}/${e==null?void 0:e.maximum}`,bSt=((e,n={})=>{const t=n.locale??z();return t==="zh-CN"?hSt(e):t==="fa"?pSt(e):t==="ar"?mSt(e):t==="es"?gSt(e):t==="hi"?vSt(e):dSt(e)}),ySt=e=>`Retrying · attempt ${e==null?void 0:e.attempt}/${e==null?void 0:e.maximum} · next attempt in ${e==null?void 0:e.seconds}s`,xSt=e=>`正在重试 · 第 ${e==null?void 0:e.attempt}/${e==null?void 0:e.maximum} 次 · ${e==null?void 0:e.seconds} 秒后再次尝试`,wSt=e=>`در حال تلاش دوباره · تلاش ${e==null?void 0:e.attempt} از ${e==null?void 0:e.maximum} · تلاش بعدی تا ${e==null?void 0:e.seconds} ثانیه`,kSt=e=>`إعادة المحاولة · المحاولة ${e==null?void 0:e.attempt}/${e==null?void 0:e.maximum} · المحاولة التالية بعد ${e==null?void 0:e.seconds}ث`,SSt=e=>`Reintentando · intento ${e==null?void 0:e.attempt}/${e==null?void 0:e.maximum} · siguiente intento en ${e==null?void 0:e.seconds} s`,CSt=e=>`फिर से कोशिश · प्रयास ${e==null?void 0:e.attempt}/${e==null?void 0:e.maximum} · अगला प्रयास ${e==null?void 0:e.seconds}से में`,ESt=((e,n={})=>{const t=n.locale??z();return t==="zh-CN"?xSt(e):t==="fa"?wSt(e):t==="ar"?kSt(e):t==="es"?SSt(e):t==="hi"?CSt(e):ySt(e)}),NSt=e=>`Retrying · attempt ${e==null?void 0:e.attempt} · next attempt in ${e==null?void 0:e.seconds}s`,zSt=e=>`正在重试 · 第 ${e==null?void 0:e.attempt} 次 · ${e==null?void 0:e.seconds} 秒后再次尝试`,jSt=e=>`در حال تلاش دوباره · تلاش ${e==null?void 0:e.attempt} · تلاش بعدی تا ${e==null?void 0:e.seconds} ثانیه`,TSt=e=>`إعادة المحاولة · المحاولة ${e==null?void 0:e.attempt} · المحاولة التالية بعد ${e==null?void 0:e.seconds}ث`,ASt=e=>`Reintentando · intento ${e==null?void 0:e.attempt} · siguiente intento en ${e==null?void 0:e.seconds} s`,RSt=e=>`फिर से कोशिश · प्रयास ${e==null?void 0:e.attempt} · अगला प्रयास ${e==null?void 0:e.seconds}से में`,MSt=((e,n={})=>{const t=n.locale??z();return t==="zh-CN"?zSt(e):t==="fa"?jSt(e):t==="ar"?TSt(e):t==="es"?ASt(e):t==="hi"?RSt(e):NSt(e)}),OSt=()=>"CLI is retrying…",DSt=()=>"CLI 正在重试…",LSt=()=>"CLI در حال تلاش دوباره است…",ISt=()=>"تعيد واجهة سطر الأوامر المحاولة…",$St=()=>"La CLI está reintentando…",BSt=()=>"CLI फिर से कोशिश कर रहा है…",PSt=((e={},n={})=>{const t=n.locale??z();return t==="zh-CN"?DSt():t==="fa"?LSt():t==="ar"?ISt():t==="es"?$St():t==="hi"?BSt():OSt()}),FSt=e=>`Retrying · next attempt in ${e==null?void 0:e.seconds}s`,HSt=e=>`正在重试 · ${e==null?void 0:e.seconds} 秒后再次尝试`,qSt=e=>`در حال تلاش دوباره · تلاش بعدی تا ${e==null?void 0:e.seconds} ثانیه`,USt=e=>`إعادة المحاولة · المحاولة التالية بعد ${e==null?void 0:e.seconds}ث`,GSt=e=>`Reintentando · siguiente intento en ${e==null?void 0:e.seconds} s`,VSt=e=>`फिर से कोशिश · अगला प्रयास ${e==null?void 0:e.seconds}से में`,KSt=((e,n={})=>{const t=n.locale??z();return t==="zh-CN"?HSt(e):t==="fa"?qSt(e):t==="ar"?USt(e):t==="es"?GSt(e):t==="hi"?VSt(e):FSt(e)}),WSt=()=>"Sending again…",QSt=()=>"正在重新发送…",XSt=()=>"در حال ارسال دوباره…",YSt=()=>"جارٍ إعادة الإرسال…",ZSt=()=>"Reenviando…",JSt=()=>"फिर से भेजा जा रहा है…",e6t=((e={},n={})=>{const t=n.locale??z();return t==="zh-CN"?QSt():t==="fa"?XSt():t==="ar"?YSt():t==="es"?ZSt():t==="hi"?JSt():WSt()}),t6t=e=>`Sending again in ${e==null?void 0:e.seconds}s…`,n6t=e=>`将在 ${e==null?void 0:e.seconds} 秒后重新发送…`,r6t=e=>`ارسال دوباره تا ${e==null?void 0:e.seconds} ثانیه…`,s6t=e=>`إعادة الإرسال بعد ${e==null?void 0:e.seconds}ث…`,i6t=e=>`Reenviando en ${e==null?void 0:e.seconds} s…`,a6t=e=>`${e==null?void 0:e.seconds}से में फिर से भेजा जाएगा…`,o6t=((e,n={})=>{const t=n.locale??z();return t==="zh-CN"?n6t(e):t==="fa"?r6t(e):t==="ar"?s6t(e):t==="es"?i6t(e):t==="hi"?a6t(e):t6t(e)}),l6t=()=>"Retrying…",c6t=()=>"正在重试…",u6t=()=>"در حال تلاش دوباره…",_6t=()=>"جارٍ إعادة المحاولة…",f6t=()=>"Reintentando…",d6t=()=>"फिर से कोशिश हो रही है…",HD=((e={},n={})=>{const t=n.locale??z();return t==="zh-CN"?c6t():t==="fa"?u6t():t==="ar"?_6t():t==="es"?f6t():t==="hi"?d6t():l6t()}),h6t=()=>"Default speed",p6t=()=>"默认速度",m6t=()=>"سرعت پیش‌فرض",g6t=()=>"السرعة الافتراضية",v6t=()=>"Velocidad predeterminada",b6t=()=>"डिफ़ॉल्ट गति",y6t=((e={},n={})=>{const t=n.locale??z();return t==="zh-CN"?p6t():t==="fa"?m6t():t==="ar"?g6t():t==="es"?v6t():t==="hi"?b6t():h6t()}),x6t=()=>"Standard",w6t=()=>"标准",k6t=()=>"استاندارد",S6t=()=>"قياسي",C6t=()=>"Estándar",E6t=()=>"स्टैंडर्ड",N6t=((e={},n={})=>{const t=n.locale??z();return t==="zh-CN"?w6t():t==="fa"?k6t():t==="ar"?S6t():t==="es"?C6t():t==="hi"?E6t():x6t()}),z6t=e=>` Add ${e==null?void 0:e.directory} to your PATH to use it.`,j6t=e=>` 请将 ${e==null?void 0:e.directory} 添加到 PATH 后使用。`,T6t=e=>` برای استفاده، ${e==null?void 0:e.directory} را به PATH اضافه کنید.`,A6t=e=>` أضِف ${e==null?void 0:e.directory} إلى PATH لاستخدامه.`,R6t=e=>` Añade ${e==null?void 0:e.directory} a tu PATH para usarlo.`,M6t=e=>` इसे इस्तेमाल करने के लिए ${e==null?void 0:e.directory} को अपने PATH में जोड़ें।`,O6t=((e,n={})=>{const t=n.locale??z();return t==="zh-CN"?j6t(e):t==="fa"?T6t(e):t==="ar"?A6t(e):t==="es"?R6t(e):t==="hi"?M6t(e):z6t(e)}),D6t=()=>"Appearance",L6t=()=>"外观",I6t=()=>"ظاهر",$6t=()=>"المظهر",B6t=()=>"Apariencia",P6t=()=>"रूप-रंग",F6t=((e={},n={})=>{const t=n.locale??z();return t==="zh-CN"?L6t():t==="fa"?I6t():t==="ar"?$6t():t==="es"?B6t():t==="hi"?P6t():D6t()}),H6t=()=>"Check",q6t=()=>"检查",U6t=()=>"بررسی",G6t=()=>"فحص",V6t=()=>"Comprobar",K6t=()=>"जाँचें",W6t=((e={},n={})=>{const t=n.locale??z();return t==="zh-CN"?q6t():t==="fa"?U6t():t==="ar"?G6t():t==="es"?V6t():t==="hi"?K6t():H6t()}),Q6t=()=>"Check again",X6t=()=>"再次检查",Y6t=()=>"بررسی دوباره",Z6t=()=>"تحقق مجددًا",J6t=()=>"Volver a comprobar",e7t=()=>"फिर से जाँचें",cm=((e={},n={})=>{const t=n.locale??z();return t==="zh-CN"?X6t():t==="fa"?Y6t():t==="ar"?Z6t():t==="es"?J6t():t==="hi"?e7t():Q6t()}),t7t=()=>"Check for updates",n7t=()=>"检查更新",r7t=()=>"بررسی به‌روزرسانی",s7t=()=>"التحقق من التحديثات",i7t=()=>"Buscar actualizaciones",a7t=()=>"अपडेट के लिए जाँचें",o7t=((e={},n={})=>{const t=n.locale??z();return t==="zh-CN"?n7t():t==="fa"?r7t():t==="ar"?s7t():t==="es"?i7t():t==="hi"?a7t():t7t()}),l7t=()=>"Check now",c7t=()=>"立即检查",u7t=()=>"اکنون بررسی کن",_7t=()=>"التحقق الآن",f7t=()=>"Comprobar ahora",d7t=()=>"अभी जाँचें",h7t=((e={},n={})=>{const t=n.locale??z();return t==="zh-CN"?c7t():t==="fa"?u7t():t==="ar"?_7t():t==="es"?f7t():t==="hi"?d7t():l7t()}),p7t=()=>"Check setup",m7t=()=>"检查设置",g7t=()=>"بررسی راه‌اندازی",v7t=()=>"فحص الإعداد",b7t=()=>"Comprobar configuración",y7t=()=>"सेटअप जाँचें",x7t=((e={},n={})=>{const t=n.locale??z();return t==="zh-CN"?m7t():t==="fa"?g7t():t==="ar"?v7t():t==="es"?b7t():t==="hi"?y7t():p7t()}),w7t=()=>"orx checks a few times a day on its own.",k7t=()=>"orx 每天会自动检查几次。",S7t=()=>"orx روزی چند بار خودکار بررسی می‌کند.",C7t=()=>"يتحقق orx بضع مرات يوميًا تلقائيًا.",E7t=()=>"orx lo comprueba por sí solo varias veces al día.",N7t=()=>"orx खुद दिन में कुछ बार जाँच करता है।",z7t=((e={},n={})=>{const t=n.locale??z();return t==="zh-CN"?k7t():t==="fa"?S7t():t==="ar"?C7t():t==="es"?E7t():t==="hi"?N7t():w7t()}),j7t=()=>"Choose a flavor",T7t=()=>"选择配置",A7t=()=>"انتخاب پیکربندی",R7t=()=>"اختر تكوين الموارد",M7t=()=>"Elige una opción",O7t=()=>"एक फ़्लेवर चुनें",D7t=((e={},n={})=>{const t=n.locale??z();return t==="zh-CN"?T7t():t==="fa"?A7t():t==="ar"?R7t():t==="es"?M7t():t==="hi"?O7t():j7t()}),L7t=e=>`Choose a flavor to use ${e==null?void 0:e.destination} for new runs.`,I7t=e=>`请选择一个配置,以便新运行使用${e==null?void 0:e.destination}。`,$7t=e=>`برای اجرای کارهای جدید روی ${e==null?void 0:e.destination} یک پیکربندی انتخاب کنید.`,B7t=e=>`اختر تكوين الموارد لاستخدام ${e==null?void 0:e.destination} في عمليات التشغيل الجديدة.`,P7t=e=>`Elige una opción para usar ${e==null?void 0:e.destination} en las nuevas ejecuciones.`,F7t=e=>`नए रन के लिए ${e==null?void 0:e.destination} इस्तेमाल करने के लिए एक फ़्लेवर चुनें।`,H7t=((e,n={})=>{const t=n.locale??z();return t==="zh-CN"?I7t(e):t==="fa"?$7t(e):t==="ar"?B7t(e):t==="es"?P7t(e):t==="hi"?F7t(e):L7t(e)}),q7t=()=>"clean",U7t=()=>"无更改",G7t=()=>"بدون تغییر",V7t=()=>"نظيف",K7t=()=>"sin cambios",W7t=()=>"साफ़",Q7t=((e={},n={})=>{const t=n.locale??z();return t==="zh-CN"?U7t():t==="fa"?G7t():t==="ar"?V7t():t==="es"?K7t():t==="hi"?W7t():q7t()}),X7t=e=>`Already linked at ${e==null?void 0:e.link}.`,Y7t=e=>`已链接到 ${e==null?void 0:e.link}。`,Z7t=e=>`از قبل در ${e==null?void 0:e.link} پیوند شده است.`,J7t=e=>`مرتبط بالفعل في ${e==null?void 0:e.link}.`,eCt=e=>`Ya está enlazado en ${e==null?void 0:e.link}.`,tCt=e=>`पहले से ${e==null?void 0:e.link} पर लिंक है।`,nCt=((e,n={})=>{const t=n.locale??z();return t==="zh-CN"?Y7t(e):t==="fa"?Z7t(e):t==="ar"?J7t(e):t==="es"?eCt(e):t==="hi"?tCt(e):X7t(e)}),rCt=e=>`Linked ${e==null?void 0:e.link}.`,sCt=e=>`已链接 ${e==null?void 0:e.link}。`,iCt=e=>`${e==null?void 0:e.link} پیوند شد.`,aCt=e=>`تم إنشاء الرابط ${e==null?void 0:e.link}.`,oCt=e=>`Enlazado en ${e==null?void 0:e.link}.`,lCt=e=>`${e==null?void 0:e.link} लिंक किया गया।`,cCt=((e,n={})=>{const t=n.locale??z();return t==="zh-CN"?sCt(e):t==="fa"?iCt(e):t==="ar"?aCt(e):t==="es"?oCt(e):t==="hi"?lCt(e):rCt(e)}),uCt=()=>"Close terminal",_Ct=()=>"关闭终端",fCt=()=>"بستن ترمینال",dCt=()=>"إغلاق الطرفية",hCt=()=>"Cerrar la terminal",pCt=()=>"टर्मिनल बंद करें",sz=((e={},n={})=>{const t=n.locale??z();return t==="zh-CN"?_Ct():t==="fa"?fCt():t==="ar"?dCt():t==="es"?hCt():t==="hi"?pCt():uCt()}),mCt=()=>"Terminal closed",gCt=()=>"终端已关闭",vCt=()=>"ترمینال بسته شد",bCt=()=>"أُغلقت الطرفية",yCt=()=>"Terminal cerrada",xCt=()=>"टर्मिनल बंद हो गया",wCt=((e={},n={})=>{const t=n.locale??z();return t==="zh-CN"?gCt():t==="fa"?vCt():t==="ar"?bCt():t==="es"?yCt():t==="hi"?xCt():mCt()}),kCt=()=>"Finished",SCt=()=>"已完成",CCt=()=>"انجام شد",ECt=()=>"اكتمل",NCt=()=>"Finalizado",zCt=()=>"पूर्ण",jCt=((e={},n={})=>{const t=n.locale??z();return t==="zh-CN"?SCt():t==="fa"?CCt():t==="ar"?ECt():t==="es"?NCt():t==="hi"?zCt():kCt()}),TCt=()=>"Command failed",ACt=()=>"命令失败",RCt=()=>"دستور ناموفق بود",MCt=()=>"فشل الأمر",OCt=()=>"El comando falló",DCt=()=>"कमांड विफल रही",LCt=((e={},n={})=>{const t=n.locale??z();return t==="zh-CN"?ACt():t==="fa"?RCt():t==="ar"?MCt():t==="es"?OCt():t==="hi"?DCt():TCt()}),ICt=()=>"Running…",$Ct=()=>"运行中…",BCt=()=>"در حال اجرا…",PCt=()=>"قيد التشغيل…",FCt=()=>"Ejecutando…",HCt=()=>"चल रहा है…",qCt=((e={},n={})=>{const t=n.locale??z();return t==="zh-CN"?$Ct():t==="fa"?BCt():t==="ar"?PCt():t==="es"?FCt():t==="hi"?HCt():ICt()}),UCt=()=>"Connect",GCt=()=>"连接",VCt=()=>"اتصال",KCt=()=>"اتصال",WCt=()=>"Conectar",QCt=()=>"कनेक्ट करें",Ik=((e={},n={})=>{const t=n.locale??z();return t==="zh-CN"?GCt():t==="fa"?VCt():t==="ar"?KCt():t==="es"?WCt():t==="hi"?QCt():UCt()}),XCt=()=>"Connected via GitHub CLI",YCt=()=>"已通过 GitHub CLI 连接",ZCt=()=>"از طریق GitHub CLI متصل است",JCt=()=>"متصل عبر واجهة GitHub لسطر الأوامر",e8t=()=>"Conectado mediante GitHub CLI",t8t=()=>"GitHub CLI के ज़रिए कनेक्टेड",qD=((e={},n={})=>{const t=n.locale??z();return t==="zh-CN"?YCt():t==="fa"?ZCt():t==="ar"?JCt():t==="es"?e8t():t==="hi"?t8t():XCt()}),n8t=()=>"Connecting…",r8t=()=>"正在连接…",s8t=()=>"در حال اتصال…",i8t=()=>"جارٍ الاتصال…",a8t=()=>"Conectando…",o8t=()=>"कनेक्ट हो रहा है…",UD=((e={},n={})=>{const t=n.locale??z();return t==="zh-CN"?r8t():t==="fa"?s8t():t==="ar"?i8t():t==="es"?a8t():t==="hi"?o8t():n8t()}),l8t=e=>`CPU cores: ${e==null?void 0:e.count}`,c8t=e=>`${e==null?void 0:e.count} 个 CPU 核心`,u8t=e=>`${e==null?void 0:e.count} هستهٔ CPU`,_8t=e=>`أنوية المعالج: ${e==null?void 0:e.count}`,f8t=e=>`Núcleos de CPU: ${e==null?void 0:e.count}`,d8t=e=>`CPU कोर: ${e==null?void 0:e.count}`,h8t=((e,n={})=>{const t=n.locale??z();return t==="zh-CN"?c8t(e):t==="fa"?u8t(e):t==="ar"?_8t(e):t==="es"?f8t(e):t==="hi"?d8t(e):l8t(e)}),p8t=()=>"Create a private repository and automatically push experiment branches for collaborator visibility.",m8t=()=>"创建私有仓库,并自动推送实验分支以便协作者查看。",g8t=()=>"یک مخزن خصوصی بسازید و شاخه‌های آزمایش را برای مشاهدهٔ همکاران به‌طور خودکار پوش کنید.",v8t=()=>"أنشئ مستودعًا خاصًا وارفع فروع التجارب تلقائيًا ليطّلع عليها المتعاونون.",b8t=()=>"Crear un repositorio privado y subir automáticamente las ramas de los experimentos para que las vean tus colaboradores.",y8t=()=>"एक निजी रिपॉज़िटरी बनाएं और सहयोगी दृश्यता के लिए प्रयोग ब्रांच अपने आप पुश करें।",x8t=((e={},n={})=>{const t=n.locale??z();return t==="zh-CN"?m8t():t==="fa"?g8t():t==="ar"?v8t():t==="es"?b8t():t==="hi"?y8t():p8t()}),w8t=()=>"the current project",k8t=()=>"当前项目",S8t=()=>"پروژهٔ فعلی",C8t=()=>"المشروع الحالي",E8t=()=>"el proyecto actual",N8t=()=>"मौजूदा प्रोजेक्ट",z8t=((e={},n={})=>{const t=n.locale??z();return t==="zh-CN"?k8t():t==="fa"?S8t():t==="ar"?C8t():t==="es"?E8t():t==="hi"?N8t():w8t()}),j8t=e=>`${e==null?void 0:e.value} (custom)`,T8t=e=>`${e==null?void 0:e.value}(自定义)`,A8t=e=>`${e==null?void 0:e.value} (سفارشی)`,R8t=e=>`${e==null?void 0:e.value} (مخصص)`,M8t=e=>`${e==null?void 0:e.value} (personalizado)`,O8t=e=>`${e==null?void 0:e.value} (कस्टम)`,D8t=((e,n={})=>{const t=n.locale??z();return t==="zh-CN"?T8t(e):t==="fa"?A8t(e):t==="ar"?R8t(e):t==="es"?M8t(e):t==="hi"?O8t(e):j8t(e)}),L8t=()=>"detached",I8t=()=>"分离头指针",$8t=()=>"جدا از شاخه",B8t=()=>"منفصل",P8t=()=>"desacoplado",F8t=()=>"डिटैच्ड",$k=((e={},n={})=>{const t=n.locale??z();return t==="zh-CN"?I8t():t==="fa"?$8t():t==="ar"?B8t():t==="es"?P8t():t==="hi"?F8t():L8t()}),H8t=()=>"Disconnected",q8t=()=>"已断开连接",U8t=()=>"قطع اتصال",G8t=()=>"غير متصل",V8t=()=>"Desconectado",K8t=()=>"डिस्कनेक्ट हो गया",GD=((e={},n={})=>{const t=n.locale??z();return t==="zh-CN"?q8t():t==="fa"?U8t():t==="ar"?G8t():t==="es"?V8t():t==="hi"?K8t():H8t()}),W8t=()=>"Environment tab",Q8t=()=>"环境标签页",X8t=()=>"زبانهٔ محیط",Y8t=()=>"تبويب البيئة",Z8t=()=>"pestaña Entorno",J8t=()=>"एनवायरनमेंट टैब",e9t=((e={},n={})=>{const t=n.locale??z();return t==="zh-CN"?Q8t():t==="fa"?X8t():t==="ar"?Y8t():t==="es"?Z8t():t==="hi"?J8t():W8t()}),t9t=()=>"Free models · No sign-in required",n9t=()=>"免费模型 · 无需登录",r9t=()=>"مدل‌های رایگان · بدون نیاز به ورود",s9t=()=>"نماذج مجانية · لا يلزم تسجيل الدخول",i9t=()=>"Modelos gratuitos · No es necesario iniciar sesión",a9t=()=>"मुफ़्त मॉडल · साइन-इन ज़रूरी नहीं",o9t=((e={},n={})=>{const t=n.locale??z();return t==="zh-CN"?n9t():t==="fa"?r9t():t==="ar"?s9t():t==="es"?i9t():t==="hi"?a9t():t9t()}),l9t=e=>`${e==null?void 0:e.branch} · ${e==null?void 0:e.state}`,c9t=e=>`${e==null?void 0:e.branch} · ${e==null?void 0:e.state}`,u9t=e=>`${e==null?void 0:e.branch} · ${e==null?void 0:e.state}`,_9t=e=>`${e==null?void 0:e.branch} · ${e==null?void 0:e.state}`,f9t=e=>`${e==null?void 0:e.branch} · ${e==null?void 0:e.state}`,d9t=e=>`${e==null?void 0:e.branch} · ${e==null?void 0:e.state}`,h9t=((e,n={})=>{const t=n.locale??z();return t==="zh-CN"?c9t(e):t==="fa"?u9t(e):t==="ar"?_9t(e):t==="es"?f9t(e):t==="hi"?d9t(e):l9t(e)}),p9t=()=>"GitHub rejected the push because this repository is archived and read-only. The local project is still available. Unarchive the repository on GitHub, then enable syncing here.",m9t=()=>"GitHub 拒绝了推送,因为此仓库已归档且为只读。你的本地项目仍然可用。请在 GitHub 上取消归档该仓库,然后在此处启用同步。",g9t=()=>"GitHub پوش را نپذیرفت، چون این مخزن بایگانی‌شده و فقط‌خواندنی است. پروژهٔ محلی همچنان در دسترس است. مخزن را در GitHub از بایگانی خارج کنید و سپس همگام‌سازی را اینجا فعال کنید.",v9t=()=>"رفض GitHub رفع التغييرات لأن هذا المستودع مؤرشف وللقراءة فقط. لا يزال المشروع المحلي متاحًا. ألغِ أرشفة المستودع على GitHub، ثم فعّل المزامنة هنا.",b9t=()=>"GitHub rechazó el push porque este repositorio está archivado y es de solo lectura. El proyecto local sigue disponible. Desarchiva el repositorio en GitHub y vuelve a activar la sincronización aquí.",y9t=()=>"GitHub ने पुश अस्वीकार कर दिया क्योंकि यह रिपॉज़िटरी आर्काइव और रीड-ओनली है। लोकल प्रोजेक्ट अब भी उपलब्ध है। GitHub पर रिपॉज़िटरी को अनआर्काइव करें, फिर यहाँ सिंकिंग चालू करें।",x9t=((e={},n={})=>{const t=n.locale??z();return t==="zh-CN"?m9t():t==="fa"?g9t():t==="ar"?v9t():t==="es"?b9t():t==="hi"?y9t():p9t()}),w9t=()=>"GitHub contains changes that are not in this local project. Pull the latest GitHub changes and resolve any conflicts in Git, then try enabling syncing again.",k9t=()=>"GitHub 上有本地项目中不存在的更改。请拉取 GitHub 上的最新更改,在 Git 中解决冲突,然后再次尝试启用同步。",S9t=()=>"GitHub تغییراتی دارد که در پروژهٔ محلی نیست. تازه‌ترین تغییرات GitHub را دریافت و تعارض‌ها را در Git حل کنید، سپس دوباره همگام‌سازی را فعال کنید.",C9t=()=>"يحتوي GitHub على تغييرات ليست في هذا المشروع المحلي. اسحب أحدث تغييرات GitHub وحُلّ أي تعارضات في Git، ثم أعد محاولة تفعيل المزامنة.",E9t=()=>"GitHub tiene cambios que no están en este proyecto local. Descarga los últimos cambios de GitHub, resuelve los conflictos en Git y vuelve a intentar activar la sincronización.",N9t=()=>"GitHub में ऐसे बदलाव हैं जो इस लोकल प्रोजेक्ट में नहीं हैं। नवीनतम GitHub बदलाव पुल करें और Git में किसी भी टकराव को सुलझाएं, फिर सिंकिंग फिर से चालू करने की कोशिश करें।",z9t=((e={},n={})=>{const t=n.locale??z();return t==="zh-CN"?k9t():t==="fa"?S9t():t==="ar"?C9t():t==="es"?E9t():t==="hi"?N9t():w9t()}),j9t=()=>"GitHub rejected the push. Make sure your connected account has write access to this repository, then try again.",T9t=()=>"GitHub 拒绝了推送。请确认已连接的账户对此仓库有写入权限,然后重试。",A9t=()=>"GitHub پوش را نپذیرفت. مطمئن شوید حساب متصل اجازهٔ نوشتن در این مخزن را دارد و دوباره تلاش کنید.",R9t=()=>"رفض GitHub رفع التغييرات. تأكد من أن حسابك المتصل يملك صلاحية الكتابة على هذا المستودع، ثم حاول مجددًا.",M9t=()=>"GitHub rechazó el push. Asegúrate de que tu cuenta conectada tiene permiso de escritura en este repositorio y vuelve a intentarlo.",O9t=()=>"GitHub ने पुश अस्वीकार कर दिया। सुनिश्चित करें कि आपके कनेक्टेड खाते के पास इस रिपॉज़िटरी में राइट एक्सेस है, फिर फिर से कोशिश करें।",D9t=((e={},n={})=>{const t=n.locale??z();return t==="zh-CN"?T9t():t==="fa"?A9t():t==="ar"?R9t():t==="es"?M9t():t==="hi"?O9t():j9t()}),L9t=e=>`GPU × ${e==null?void 0:e.count}`,I9t=e=>`${e==null?void 0:e.count} 个 GPU`,$9t=e=>`${e==null?void 0:e.count} پردازندهٔ گرافیکی`,B9t=e=>`معالج رسومات × ${e==null?void 0:e.count}`,P9t=e=>`GPU × ${e==null?void 0:e.count}`,F9t=e=>`GPU × ${e==null?void 0:e.count}`,H9t=((e,n={})=>{const t=n.locale??z();return t==="zh-CN"?I9t(e):t==="fa"?$9t(e):t==="ar"?B9t(e):t==="es"?P9t(e):t==="hi"?F9t(e):L9t(e)}),q9t=()=>"has changes",U9t=()=>"有更改",G9t=()=>"دارای تغییر",V9t=()=>"به تغييرات",K9t=()=>"con cambios",W9t=()=>"बदलाव हैं",Q9t=((e={},n={})=>{const t=n.locale??z();return t==="zh-CN"?U9t():t==="fa"?G9t():t==="ar"?V9t():t==="es"?K9t():t==="hi"?W9t():q9t()}),X9t=e=>`This token is valid but does not report whether it can launch Jobs; OAuth tokens from ${e==null?void 0:e.login} never do. Launches may still work. For a definitive check, save a write-scoped token from ${e==null?void 0:e.url}.`,Y9t=e=>`此令牌有效,但不会报告能否启动 Jobs;来自 ${e==null?void 0:e.login} 的 OAuth 令牌从不提供该信息。启动仍可能成功。如需最终确认,请从 ${e==null?void 0:e.url} 保存具有写入权限的令牌。`,Z9t=e=>`این توکن معتبر است، اما مشخص نمی‌کند که می‌تواند Jobs را اجرا کند؛ توکن‌های OAuth از ${e==null?void 0:e.login} هرگز چنین اطلاعاتی نمی‌دهند. اجراها ممکن است کار کنند. برای بررسی قطعی، یک توکن دارای مجوز نوشتن از ${e==null?void 0:e.url} ذخیره کنید.`,J9t=e=>`هذا الرمز صالح لكنه لا يبيّن ما إن كان قادرًا على إطلاق المهام؛ ورموز OAuth من ${e==null?void 0:e.login} لا تبيّن ذلك أبدًا. قد ينجح الإطلاق رغم ذلك. للتحقق القاطع، احفظ رمزًا بصلاحية الكتابة من ${e==null?void 0:e.url}.`,eEt=e=>`Este token es válido, pero no indica si puede lanzar Jobs; los tokens OAuth de ${e==null?void 0:e.login} nunca lo indican. Puede que los lanzamientos funcionen igualmente. Para comprobarlo con seguridad, guarda un token con permiso de escritura desde ${e==null?void 0:e.url}.`,tEt=e=>`यह टोकन मान्य है पर यह नहीं बताता कि यह Jobs लॉन्च कर सकता है या नहीं; ${e==null?void 0:e.login} से मिले OAuth टोकन कभी नहीं बताते। लॉन्च फिर भी काम कर सकता है। निश्चित जाँच के लिए, ${e==null?void 0:e.url} से एक राइट-स्कोप्ड टोकन सेव करें।`,nEt=((e,n={})=>{const t=n.locale??z();return t==="zh-CN"?Y9t(e):t==="fa"?Z9t(e):t==="ar"?J9t(e):t==="es"?eEt(e):t==="hi"?tEt(e):X9t(e)}),rEt=()=>"This token is valid, but cannot submit Hugging Face Jobs. Create a token with Jobs write permission in Hugging Face token settings, then replace it here.",sEt=()=>"此令牌有效,但无法提交 Hugging Face 任务。请在 Hugging Face 令牌设置中创建具有 Jobs 写入权限的令牌,然后在此处替换。",iEt=()=>"این توکن معتبر است، اما اجازهٔ ارسال کار به Hugging Face را ندارد. در تنظیمات توکن Hugging Face، توکنی با مجوز نوشتن Jobs بسازید و آن را اینجا جایگزین کنید.",aEt=()=>"هذا الرمز صالح لكنه لا يستطيع إرسال مهام Hugging Face. أنشئ رمزًا بصلاحية كتابة المهام في إعدادات رموز Hugging Face، ثم استبدله هنا.",oEt=()=>"Este token es válido, pero no puede enviar Hugging Face Jobs. Crea un token con permiso de escritura en Jobs desde la configuración de tokens de Hugging Face y reemplázalo aquí.",lEt=()=>"यह टोकन मान्य है, पर Hugging Face Jobs सबमिट नहीं कर सकता। Hugging Face टोकन सेटिंग्स में Jobs राइट अनुमति वाला टोकन बनाएं, फिर इसे यहाँ बदलें।",cEt=((e={},n={})=>{const t=n.locale??z();return t==="zh-CN"?sEt():t==="fa"?iEt():t==="ar"?aEt():t==="es"?oEt():t==="hi"?lEt():rEt()}),uEt=()=>"Install",_Et=()=>"安装",fEt=()=>"نصب",dEt=()=>"تثبيت",hEt=()=>"Instalar",pEt=()=>"इंस्टॉल करें",mEt=((e={},n={})=>{const t=n.locale??z();return t==="zh-CN"?_Et():t==="fa"?fEt():t==="ar"?dEt():t==="es"?hEt():t==="hi"?pEt():uEt()}),gEt=e=>`Adds ${e==null?void 0:e.command} to your terminal, pointing at this app, so the CLI and app are always the same version.`,vEt=e=>`将 ${e==null?void 0:e.command} 添加到终端并指向此应用,使 CLI 和应用始终使用同一版本。`,bEt=e=>`فرمان ${e==null?void 0:e.command} را به ترمینال شما و با اشاره به این برنامه اضافه می‌کند تا CLI و برنامه همیشه یک نسخه باشند.`,yEt=e=>`يضيف ${e==null?void 0:e.command} إلى طرفيتك موجّهًا إلى هذا التطبيق، بحيث تكون واجهة سطر الأوامر والتطبيق دائمًا بالإصدار نفسه.`,xEt=e=>`Añade ${e==null?void 0:e.command} a tu terminal, apuntando a esta app, para que la CLI y la app tengan siempre la misma versión.`,wEt=e=>`आपके टर्मिनल में ${e==null?void 0:e.command} जोड़ता है, जो इसी ऐप की ओर इशारा करता है, ताकि CLI और ऐप हमेशा एक ही वर्शन के रहें।`,kEt=((e,n={})=>{const t=n.locale??z();return t==="zh-CN"?vEt(e):t==="fa"?bEt(e):t==="ar"?yEt(e):t==="es"?xEt(e):t==="hi"?wEt(e):gEt(e)}),SEt=e=>`Install the ${e==null?void 0:e.command} command`,CEt=e=>`安装 ${e==null?void 0:e.command} 命令`,EEt=e=>`نصب فرمان ${e==null?void 0:e.command}`,NEt=e=>`تثبيت أمر ${e==null?void 0:e.command}`,zEt=e=>`Instalar el comando ${e==null?void 0:e.command}`,jEt=e=>`${e==null?void 0:e.command} कमांड इंस्टॉल करें`,TEt=((e,n={})=>{const t=n.locale??z();return t==="zh-CN"?CEt(e):t==="fa"?EEt(e):t==="ar"?NEt(e):t==="es"?zEt(e):t==="hi"?jEt(e):SEt(e)}),AEt=()=>"Install GitHub CLI, then run `gh auth login` in your terminal.",REt=()=>"请安装 GitHub CLI,然后在终端中运行 `gh auth login`。",MEt=()=>"GitHub CLI را نصب کنید و سپس در پایانه `gh auth login` را اجرا کنید.",OEt=()=>"ثبّت واجهة GitHub لسطر الأوامر، ثم نفّذ `gh auth login` في طرفيتك.",DEt=()=>"Instala GitHub CLI y ejecuta `gh auth login` en tu terminal.",LEt=()=>"GitHub CLI इंस्टॉल करें, फिर अपने टर्मिनल में `gh auth login` चलाएं।",IEt=((e={},n={})=>{const t=n.locale??z();return t==="zh-CN"?REt():t==="fa"?MEt():t==="ar"?OEt():t==="es"?DEt():t==="hi"?LEt():AEt()}),$Et=()=>"Install the new release now instead of waiting for the background update.",BEt=()=>"立即安装新版本,无需等待后台更新。",PEt=()=>"نسخهٔ جدید را اکنون نصب کنید و منتظر به‌روزرسانی پس‌زمینه نمانید.",FEt=()=>"ثبّت الإصدار الجديد الآن بدلًا من انتظار التحديث في الخلفية.",HEt=()=>"Instala la nueva versión ahora en lugar de esperar a la actualización en segundo plano.",qEt=()=>"बैकग्राउंड अपडेट का इंतज़ार करने की बजाय अभी नया रिलीज़ इंस्टॉल करें।",UEt=((e={},n={})=>{const t=n.locale??z();return t==="zh-CN"?BEt():t==="fa"?PEt():t==="ar"?FEt():t==="es"?HEt():t==="hi"?qEt():$Et()}),GEt=()=>"Discard your unsaved Kubernetes changes?",VEt=()=>"要放弃未保存的 Kubernetes 更改吗?",KEt=()=>"تغییرات ذخیره‌نشدهٔ Kubernetes کنار گذاشته شود؟",WEt=()=>"تجاهل تغييرات Kubernetes غير المحفوظة؟",QEt=()=>"¿Descartar los cambios sin guardar de Kubernetes?",XEt=()=>"आपके सेव न किए गए Kubernetes बदलाव छोड़ें?",YEt=((e={},n={})=>{const t=n.locale??z();return t==="zh-CN"?VEt():t==="fa"?KEt():t==="ar"?WEt():t==="es"?QEt():t==="hi"?XEt():GEt()}),ZEt=()=>"Key from",JEt=()=>"密钥来自",eNt=()=>"کلید از",tNt=()=>"المفتاح من",nNt=()=>"Clave tomada de la",rNt=()=>"की स्रोत",sNt=((e={},n={})=>{const t=n.locale??z();return t==="zh-CN"?JEt():t==="fa"?eNt():t==="ar"?tNt():t==="es"?nNt():t==="hi"?rNt():ZEt()}),iNt=()=>"Use current kubectl context",aNt=()=>"使用当前 kubectl 上下文",oNt=()=>"استفاده از کانتکست فعلی kubectl",lNt=()=>"استخدام سياق kubectl الحالي",cNt=()=>"Usar el contexto actual de kubectl",uNt=()=>"मौजूदा kubectl कॉन्टेक्स्ट इस्तेमाल करें",_Nt=((e={},n={})=>{const t=n.locale??z();return t==="zh-CN"?aNt():t==="fa"?oNt():t==="ar"?lNt():t==="es"?cNt():t==="hi"?uNt():iNt()}),fNt=e=>`Use current context (${e==null?void 0:e.context})`,dNt=e=>`使用当前上下文(${e==null?void 0:e.context})`,hNt=e=>`استفاده از کانتکست فعلی (${e==null?void 0:e.context})`,pNt=e=>`استخدام السياق الحالي (${e==null?void 0:e.context})`,mNt=e=>`Usar el contexto actual (${e==null?void 0:e.context})`,gNt=e=>`मौजूदा कॉन्टेक्स्ट इस्तेमाल करें (${e==null?void 0:e.context})`,vNt=((e,n={})=>{const t=n.locale??z();return t==="zh-CN"?dNt(e):t==="fa"?hNt(e):t==="ar"?pNt(e):t==="es"?mNt(e):t==="hi"?gNt(e):fNt(e)}),bNt=()=>"Language",yNt=()=>"语言",xNt=()=>"زبان",wNt=()=>"اللغة",kNt=()=>"Idioma",SNt=()=>"भाषा",CNt=((e={},n={})=>{const t=n.locale??z();return t==="zh-CN"?yNt():t==="fa"?xNt():t==="ar"?wNt():t==="es"?kNt():t==="hi"?SNt():bNt()}),ENt=e=>`Run ${e==null?void 0:e.command} in a terminal to sign in.`,NNt=e=>`在终端中运行 ${e==null?void 0:e.command} 以登录。`,zNt=e=>`برای ورود، ${e==null?void 0:e.command} را در ترمینال اجرا کنید.`,jNt=e=>`نفّذ ${e==null?void 0:e.command} في الطرفية لتسجيل الدخول.`,TNt=e=>`Ejecuta ${e==null?void 0:e.command} en una terminal para iniciar sesión.`,ANt=e=>`साइन इन करने के लिए टर्मिनल में ${e==null?void 0:e.command} चलाएं।`,RNt=((e,n={})=>{const t=n.locale??z();return t==="zh-CN"?NNt(e):t==="fa"?zNt(e):t==="ar"?jNt(e):t==="es"?TNt(e):t==="hi"?ANt(e):ENt(e)}),MNt=()=>"Make default",ONt=()=>"设为默认值",DNt=()=>"پیش‌فرض شود",LNt=()=>"جعله افتراضيًا",INt=()=>"Establecer como predeterminado",$Nt=()=>"डिफ़ॉल्ट बनाएं",BNt=((e={},n={})=>{const t=n.locale??z();return t==="zh-CN"?ONt():t==="fa"?DNt():t==="ar"?LNt():t==="es"?INt():t==="hi"?$Nt():MNt()}),PNt=()=>"Modal credentials are set in the process environment. Remove those overrides before replacing the token here.",FNt=()=>"Modal 凭据已在进程环境中设置。请先移除这些覆盖设置,再在此处替换令牌。",HNt=()=>"اعتبارنامه‌های Modal در محیط فرایند تنظیم شده‌اند. پیش از جایگزینی توکن در اینجا، این تنظیمات را حذف کنید.",qNt=()=>"بيانات اعتماد Modal مضبوطة في بيئة العملية. أزِل تلك التجاوزات قبل استبدال الرمز هنا.",UNt=()=>"Las credenciales de Modal están definidas en el entorno del proceso. Elimínalas antes de reemplazar el token aquí.",GNt=()=>"Modal क्रेडेंशियल प्रोसेस एनवायरनमेंट में सेट हैं। यहाँ सेव टोकन बदलने से पहले उन ओवरराइड को हटाएं।",VNt=((e={},n={})=>{const t=n.locale??z();return t==="zh-CN"?FNt():t==="fa"?HNt():t==="ar"?qNt():t==="es"?UNt():t==="hi"?GNt():PNt()}),KNt=()=>"Replace token ID",WNt=()=>"替换令牌 ID",QNt=()=>"جایگزینی شناسهٔ توکن",XNt=()=>"استبدال معرّف الرمز",YNt=()=>"Reemplazar ID del token",ZNt=()=>"टोकन ID बदलें",JNt=((e={},n={})=>{const t=n.locale??z();return t==="zh-CN"?WNt():t==="fa"?QNt():t==="ar"?XNt():t==="es"?YNt():t==="hi"?ZNt():KNt()}),ezt=()=>"Replace token secret",tzt=()=>"替换令牌密钥",nzt=()=>"جایگزینی رمز توکن",rzt=()=>"استبدال سرّ الرمز",szt=()=>"Reemplazar secreto del token",izt=()=>"टोकन सीक्रेट बदलें",azt=((e={},n={})=>{const t=n.locale??z();return t==="zh-CN"?tzt():t==="fa"?nzt():t==="ar"?rzt():t==="es"?szt():t==="hi"?izt():ezt()}),ozt=()=>"How to get a Modal token",lzt=()=>"如何获取 Modal 令牌",czt=()=>"روش دریافت توکن Modal",uzt=()=>"كيفية الحصول على رمز Modal",_zt=()=>"Cómo obtener un token de Modal",fzt=()=>"Modal टोकन कैसे लें",dzt=((e={},n={})=>{const t=n.locale??z();return t==="zh-CN"?lzt():t==="fa"?czt():t==="ar"?uzt():t==="es"?_zt():t==="hi"?fzt():ozt()}),hzt=()=>"Token ID",pzt=()=>"令牌 ID",mzt=()=>"شناسهٔ توکن",gzt=()=>"معرّف الرمز",vzt=()=>"ID del token",bzt=()=>"टोकन ID",yzt=((e={},n={})=>{const t=n.locale??z();return t==="zh-CN"?pzt():t==="fa"?mzt():t==="ar"?gzt():t==="es"?vzt():t==="hi"?bzt():hzt()}),xzt=()=>"Token secret",wzt=()=>"令牌密钥",kzt=()=>"رمز توکن",Szt=()=>"سرّ الرمز",Czt=()=>"Secreto del token",Ezt=()=>"टोकन सीक्रेट",Nzt=((e={},n={})=>{const t=n.locale??z();return t==="zh-CN"?wzt():t==="fa"?kzt():t==="ar"?Szt():t==="es"?Czt():t==="hi"?Ezt():xzt()}),zzt=e=>`${e==null?void 0:e.count} models available — ${e==null?void 0:e.models}`,jzt=e=>`${e==null?void 0:e.count} 个模型可用 — ${e==null?void 0:e.models}`,Tzt=e=>`${e==null?void 0:e.count} مدل در دسترس — ${e==null?void 0:e.models}`,Azt=e=>`النماذج المتاحة: ${e==null?void 0:e.count} — ${e==null?void 0:e.models}`,Rzt=e=>`Modelos disponibles (${e==null?void 0:e.count}): ${e==null?void 0:e.models}`,Mzt=e=>`${e==null?void 0:e.count} मॉडल उपलब्ध — ${e==null?void 0:e.models}`,Ozt=((e,n={})=>{const t=n.locale??z();return t==="zh-CN"?jzt(e):t==="fa"?Tzt(e):t==="ar"?Azt(e):t==="es"?Rzt(e):t==="hi"?Mzt(e):zzt(e)}),Dzt=e=>`Needs ${e==null?void 0:e.tool}`,Lzt=e=>`需要 ${e==null?void 0:e.tool}`,Izt=e=>`به ${e==null?void 0:e.tool} نیاز دارد`,$zt=e=>`يحتاج إلى ${e==null?void 0:e.tool}`,Bzt=e=>`Requiere ${e==null?void 0:e.tool}`,Pzt=e=>`${e==null?void 0:e.tool} की ज़रूरत है`,Fzt=((e,n={})=>{const t=n.locale??z();return t==="zh-CN"?Lzt(e):t==="fa"?Izt(e):t==="ar"?$zt(e):t==="es"?Bzt(e):t==="hi"?Pzt(e):Dzt(e)}),Hzt=()=>"Needs tools",qzt=()=>"缺少工具",Uzt=()=>"به ابزارها نیاز دارد",Gzt=()=>"يحتاج إلى أدوات",Vzt=()=>"Requiere herramientas",Kzt=()=>"टूल की ज़रूरत है",Wzt=((e={},n={})=>{const t=n.locale??z();return t==="zh-CN"?qzt():t==="fa"?Uzt():t==="ar"?Gzt():t==="es"?Vzt():t==="hi"?Kzt():Hzt()}),Qzt=e=>`New runs use ${e==null?void 0:e.destination} unless another backend is specified.`,Xzt=e=>`除非另行指定后端,否则新运行将使用${e==null?void 0:e.destination}。`,Yzt=e=>`اجراهای جدید از ${e==null?void 0:e.destination} استفاده می‌کنند، مگر اینکه سامانهٔ دیگری مشخص شود.`,Zzt=e=>`تستخدم عمليات التشغيل الجديدة ${e==null?void 0:e.destination} ما لم تُحدَّد بيئة تنفيذ أخرى.`,Jzt=e=>`Las nuevas ejecuciones usan ${e==null?void 0:e.destination}, salvo que se indique otro backend.`,ejt=e=>`जब तक कोई और बैकएंड न बताया जाए, नए रन ${e==null?void 0:e.destination} इस्तेमाल करते हैं।`,tjt=((e,n={})=>{const t=n.locale??z();return t==="zh-CN"?Xzt(e):t==="fa"?Yzt(e):t==="ar"?Zzt(e):t==="es"?Jzt(e):t==="hi"?ejt(e):Qzt(e)}),njt=()=>"New runs use SSH; choose a host when launching.",rjt=()=>"新运行将使用 SSH;启动时请选择主机。",sjt=()=>"اجراهای جدید از SSH استفاده می‌کنند؛ هنگام اجرا یک میزبان انتخاب کنید.",ijt=()=>"تستخدم عمليات التشغيل الجديدة SSH؛ اختر مضيفًا عند الإطلاق.",ajt=()=>"Las nuevas ejecuciones usan SSH; elige un host al lanzarlas.",ojt=()=>"नए रन SSH इस्तेमाल करते हैं; लॉन्च करते समय एक होस्ट चुनें।",ljt=((e={},n={})=>{const t=n.locale??z();return t==="zh-CN"?rjt():t==="fa"?sjt():t==="ar"?ijt():t==="es"?ajt():t==="hi"?ojt():njt()}),cjt=()=>"New token",ujt=()=>"新令牌",_jt=()=>"توکن جدید",fjt=()=>"رمز جديد",djt=()=>"Nuevo token",hjt=()=>"नया टोकन",pjt=((e={},n={})=>{const t=n.locale??z();return t==="zh-CN"?ujt():t==="fa"?_jt():t==="ar"?fjt():t==="es"?djt():t==="hi"?hjt():cjt()}),mjt=()=>"No default flavor",gjt=()=>"不设默认配置",vjt=()=>"بدون پیکربندی پیش‌فرض",bjt=()=>"لا يوجد تكوين افتراضي للموارد",yjt=()=>"Sin opción predeterminada",xjt=()=>"कोई डिफ़ॉल्ट फ़्लेवर नहीं",wjt=((e={},n={})=>{const t=n.locale??z();return t==="zh-CN"?gjt():t==="fa"?vjt():t==="ar"?bjt():t==="es"?yjt():t==="hi"?xjt():mjt()}),kjt=()=>"none",Sjt=()=>"无",Cjt=()=>"هیچ‌کدام",Ejt=()=>"لا شيء",Njt=()=>"ninguno",zjt=()=>"कोई नहीं",Bk=((e={},n={})=>{const t=n.locale??z();return t==="zh-CN"?Sjt():t==="fa"?Cjt():t==="ar"?Ejt():t==="es"?Njt():t==="hi"?zjt():kjt()}),jjt=()=>"Not connected",Tjt=()=>"未连接",Ajt=()=>"متصل نیست",Rjt=()=>"غير متصل",Mjt=()=>"No conectado",Ojt=()=>"कनेक्टेड नहीं",VD=((e={},n={})=>{const t=n.locale??z();return t==="zh-CN"?Tjt():t==="fa"?Ajt():t==="ar"?Rjt():t==="es"?Mjt():t==="hi"?Ojt():jjt()}),Djt=()=>"not found on PATH",Ljt=()=>"在 PATH 中未找到",Ijt=()=>"در PATH پیدا نشد",$jt=()=>"غير موجود في PATH",Bjt=()=>"no se encontró en el PATH",Pjt=()=>"PATH पर नहीं मिला",Fjt=((e={},n={})=>{const t=n.locale??z();return t==="zh-CN"?Ljt():t==="fa"?Ijt():t==="ar"?$jt():t==="es"?Bjt():t==="hi"?Pjt():Djt()}),Hjt=e=>`${e==null?void 0:e.context} (not in kubeconfig)`,qjt=e=>`${e==null?void 0:e.context}(不在 kubeconfig 中)`,Ujt=e=>`${e==null?void 0:e.context} (در kubeconfig نیست)`,Gjt=e=>`${e==null?void 0:e.context} (ليس في kubeconfig)`,Vjt=e=>`${e==null?void 0:e.context} (no está en kubeconfig)`,Kjt=e=>`${e==null?void 0:e.context} (kubeconfig में नहीं)`,Wjt=((e,n={})=>{const t=n.locale??z();return t==="zh-CN"?qjt(e):t==="fa"?Ujt(e):t==="ar"?Gjt(e):t==="es"?Vjt(e):t==="hi"?Kjt(e):Hjt(e)}),Qjt=()=>"not initialized",Xjt=()=>"尚未初始化",Yjt=()=>"راه‌اندازی نشده",Zjt=()=>"غير مهيّأ",Jjt=()=>"sin inicializar",eTt=()=>"शुरू नहीं किया गया",tTt=((e={},n={})=>{const t=n.locale??z();return t==="zh-CN"?Xjt():t==="fa"?Yjt():t==="ar"?Zjt():t==="es"?Jjt():t==="hi"?eTt():Qjt()}),nTt=()=>"Not set",rTt=()=>"未设置",sTt=()=>"تنظیم نشده",iTt=()=>"غير مضبوط",aTt=()=>"Sin definir",oTt=()=>"सेट नहीं",s3=((e={},n={})=>{const t=n.locale??z();return t==="zh-CN"?rTt():t==="fa"?sTt():t==="ar"?iTt():t==="es"?aTt():t==="hi"?oTt():nTt()}),lTt=()=>"OAuth (subscription login)",cTt=()=>"OAuth(订阅登录)",uTt=()=>"OAuth (ورود با اشتراک)",_Tt=()=>"OAuth (تسجيل دخول الاشتراك)",fTt=()=>"OAuth (inicio de sesión con suscripción)",dTt=()=>"OAuth (सब्सक्रिप्शन लॉगिन)",hTt=((e={},n={})=>{const t=n.locale??z();return t==="zh-CN"?cTt():t==="fa"?uTt():t==="ar"?_Tt():t==="es"?fTt():t==="hi"?dTt():lTt()}),pTt=e=>`The old copy was left at ${e==null?void 0:e.path} on a different disk. You can delete it after confirming everything works.`,mTt=e=>`旧副本保留在另一磁盘的 ${e==null?void 0:e.path}。确认一切正常后即可删除。`,gTt=e=>`نسخهٔ قدیمی در ${e==null?void 0:e.path} روی دیسکی دیگر باقی ماند. پس از اطمینان از درست کار کردن همه‌چیز می‌توانید آن را حذف کنید.`,vTt=e=>`تُركت النسخة القديمة في ${e==null?void 0:e.path} على قرص مختلف. يمكنك حذفها بعد التأكد من أن كل شيء يعمل.`,bTt=e=>`La copia anterior se dejó en ${e==null?void 0:e.path}, en otro disco. Puedes eliminarla cuando confirmes que todo funciona.`,yTt=e=>`पुरानी कॉपी एक अलग डिस्क पर ${e==null?void 0:e.path} पर छोड़ दी गई थी। सब कुछ ठीक होने की पुष्टि के बाद आप इसे हटा सकते हैं।`,xTt=((e,n={})=>{const t=n.locale??z();return t==="zh-CN"?mTt(e):t==="fa"?gTt(e):t==="ar"?vTt(e):t==="es"?bTt(e):t==="hi"?yTt(e):pTt(e)}),wTt=()=>"Setting up…",kTt=()=>"正在设置…",STt=()=>"در حال راه‌اندازی…",CTt=()=>"جارٍ الإعداد…",ETt=()=>"Configurando…",NTt=()=>"सेट अप हो रहा है…",zTt=((e={},n={})=>{const t=n.locale??z();return t==="zh-CN"?kTt():t==="fa"?STt():t==="ar"?CTt():t==="es"?ETt():t==="hi"?NTt():wTt()}),jTt=()=>"Account",TTt=()=>"账户",ATt=()=>"حساب",RTt=()=>"الحساب",MTt=()=>"Cuenta",OTt=()=>"खाता",Pk=((e={},n={})=>{const t=n.locale??z();return t==="zh-CN"?TTt():t==="fa"?ATt():t==="ar"?RTt():t==="es"?MTt():t==="hi"?OTt():jTt()}),DTt=()=>"Add one with",LTt=()=>"使用以下命令添加:",ITt=()=>"یکی با این فرمان اضافه کنید:",$Tt=()=>"أضِف واحدًا عبر",BTt=()=>"Añade una con",PTt=()=>"इसके साथ एक जोड़ें",FTt=((e={},n={})=>{const t=n.locale??z();return t==="zh-CN"?LTt():t==="fa"?ITt():t==="ar"?$Tt():t==="es"?BTt():t==="hi"?PTt():DTt()}),HTt=()=>"Add variable",qTt=()=>"添加变量",UTt=()=>"افزودن متغیر",GTt=()=>"إضافة متغيّر",VTt=()=>"Añadir variable",KTt=()=>"वेरिएबल जोड़ें",WTt=((e={},n={})=>{const t=n.locale??z();return t==="zh-CN"?qTt():t==="fa"?UTt():t==="ar"?GTt():t==="es"?VTt():t==="hi"?KTt():HTt()}),QTt=()=>"Agent models",XTt=()=>"智能体模型",YTt=()=>"مدل‌های عامل",ZTt=()=>"نماذج الوكيل",JTt=()=>"Modelos de los agentes",eAt=()=>"एजेंट मॉडल",tAt=((e={},n={})=>{const t=n.locale??z();return t==="zh-CN"?XTt():t==="fa"?YTt():t==="ar"?ZTt():t==="es"?JTt():t==="hi"?eAt():QTt()}),nAt=()=>"Anonymous usage analytics",rAt=()=>"匿名使用情况分析",sAt=()=>"تحلیل ناشناس استفاده",iAt=()=>"تحليلات استخدام مجهولة الهوية",aAt=()=>"Estadísticas de uso anónimas",oAt=()=>"अनाम उपयोग एनालिटिक्स",iz=((e={},n={})=>{const t=n.locale??z();return t==="zh-CN"?rAt():t==="fa"?sAt():t==="ar"?iAt():t==="es"?aAt():t==="hi"?oAt():nAt()}),lAt=()=>"Auth",cAt=()=>"身份验证",uAt=()=>"احراز هویت",_At=()=>"المصادقة",fAt=()=>"Autenticación",dAt=()=>"ऑथ",hAt=((e={},n={})=>{const t=n.locale??z();return t==="zh-CN"?cAt():t==="fa"?uAt():t==="ar"?_At():t==="es"?fAt():t==="hi"?dAt():lAt()}),pAt=()=>"Authentication",mAt=()=>"身份验证",gAt=()=>"احراز هویت",vAt=()=>"المصادقة",bAt=()=>"Autenticación",yAt=()=>"प्रमाणीकरण",KD=((e={},n={})=>{const t=n.locale??z();return t==="zh-CN"?mAt():t==="fa"?gAt():t==="ar"?vAt():t==="es"?bAt():t==="hi"?yAt():pAt()}),xAt=()=>"Back to Compute",wAt=()=>"返回算力设置",kAt=()=>"بازگشت به رایانش",SAt=()=>"العودة إلى الحوسبة",CAt=()=>"Volver a Cómputo",EAt=()=>"कंप्यूट पर वापस जाएं",WD=((e={},n={})=>{const t=n.locale??z();return t==="zh-CN"?wAt():t==="fa"?kAt():t==="ar"?SAt():t==="es"?CAt():t==="hi"?EAt():xAt()}),NAt=()=>"Backend",zAt=()=>"后端",jAt=()=>"بک‌اند",TAt=()=>"بيئة التنفيذ",AAt=()=>"Backend",RAt=()=>"बैकएंड",MAt=((e={},n={})=>{const t=n.locale??z();return t==="zh-CN"?zAt():t==="fa"?jAt():t==="ar"?TAt():t==="es"?AAt():t==="hi"?RAt():NAt()}),OAt=()=>"Baseline",DAt=()=>"基线",LAt=()=>"خط مبنا",IAt=()=>"الأساس المرجعي",$At=()=>"Rama base",BAt=()=>"बेसलाइन",PAt=((e={},n={})=>{const t=n.locale??z();return t==="zh-CN"?DAt():t==="fa"?LAt():t==="ar"?IAt():t==="es"?$At():t==="hi"?BAt():OAt()}),FAt=()=>"Binary",HAt=()=>"可执行文件",qAt=()=>"فایل اجرایی",UAt=()=>"الملف التنفيذي",GAt=()=>"Binario",VAt=()=>"बाइनरी",KAt=((e={},n={})=>{const t=n.locale??z();return t==="zh-CN"?HAt():t==="fa"?qAt():t==="ar"?UAt():t==="es"?GAt():t==="hi"?VAt():FAt()}),WAt=()=>"Cancel",QAt=()=>"取消",XAt=()=>"لغو",YAt=()=>"إلغاء",ZAt=()=>"Cancelar",JAt=()=>"रद्द करें",P_=((e={},n={})=>{const t=n.locale??z();return t==="zh-CN"?QAt():t==="fa"?XAt():t==="ar"?YAt():t==="es"?ZAt():t==="hi"?JAt():WAt()}),eRt=()=>"Cancel new variable",tRt=()=>"取消新变量",nRt=()=>"لغو متغیر جدید",rRt=()=>"إلغاء المتغيّر الجديد",sRt=()=>"Cancelar nueva variable",iRt=()=>"नया वेरिएबल रद्द करें",aRt=((e={},n={})=>{const t=n.locale??z();return t==="zh-CN"?tRt():t==="fa"?nRt():t==="ar"?rRt():t==="es"?sRt():t==="hi"?iRt():eRt()}),oRt=()=>"Checking compute targets…",lRt=()=>"正在检查算力目标…",cRt=()=>"در حال بررسی مقصدهای رایانشی…",uRt=()=>"جارٍ التحقق من أهداف الحوسبة…",_Rt=()=>"Comprobando destinos de cómputo…",fRt=()=>"कंप्यूट टारगेट जाँचे जा रहे हैं…",dRt=((e={},n={})=>{const t=n.locale??z();return t==="zh-CN"?lRt():t==="fa"?cRt():t==="ar"?uRt():t==="es"?_Rt():t==="hi"?fRt():oRt()}),hRt=()=>"Checking kubectl…",pRt=()=>"正在检查 kubectl…",mRt=()=>"در حال بررسی kubectl…",gRt=()=>"جارٍ التحقق من kubectl…",vRt=()=>"Comprobando kubectl…",bRt=()=>"kubectl जाँचा जा रहा है…",yRt=((e={},n={})=>{const t=n.locale??z();return t==="zh-CN"?pRt():t==="fa"?mRt():t==="ar"?gRt():t==="es"?vRt():t==="hi"?bRt():hRt()}),xRt=()=>"Checking Modal…",wRt=()=>"正在检查 Modal…",kRt=()=>"در حال بررسی Modal…",SRt=()=>"جارٍ التحقق من Modal…",CRt=()=>"Comprobando Modal…",ERt=()=>"Modal जाँचा जा रहा है…",NRt=((e={},n={})=>{const t=n.locale??z();return t==="zh-CN"?wRt():t==="fa"?kRt():t==="ar"?SRt():t==="es"?CRt():t==="hi"?ERt():xRt()}),zRt=()=>"Choose a preset flavor",jRt=()=>"选择预设规格",TRt=()=>"یک پیکربندی آماده انتخاب کنید",ARt=()=>"اختر تكوينًا محددًا مسبقًا للموارد",RRt=()=>"Elige una opción predefinida",MRt=()=>"एक प्रीसेट फ़्लेवर चुनें",az=((e={},n={})=>{const t=n.locale??z();return t==="zh-CN"?jRt():t==="fa"?TRt():t==="ar"?ARt():t==="es"?RRt():t==="hi"?MRt():zRt()}),ORt=()=>"cluster default",DRt=()=>"集群默认值",LRt=()=>"پیش‌فرض خوشه",IRt=()=>"افتراضي العنقود",$Rt=()=>"valor predeterminado del clúster",BRt=()=>"क्लस्टर डिफ़ॉल्ट",oz=((e={},n={})=>{const t=n.locale??z();return t==="zh-CN"?DRt():t==="fa"?LRt():t==="ar"?IRt():t==="es"?$Rt():t==="hi"?BRt():ORt()}),PRt=()=>"cluster default (e.g. 4h, 30m)",FRt=()=>"集群默认值(例如 4h、30m)",HRt=()=>"پیش‌فرض خوشه (مثلاً 4h یا 30m)",qRt=()=>"افتراضي العنقود (مثل 4h أو 30m)",URt=()=>"valor predeterminado del clúster (p. ej., 4h, 30m)",GRt=()=>"क्लस्टर डिफ़ॉल्ट (जैसे 4h, 30m)",VRt=((e={},n={})=>{const t=n.locale??z();return t==="zh-CN"?FRt():t==="fa"?HRt():t==="ar"?qRt():t==="es"?URt():t==="hi"?GRt():PRt()}),KRt=()=>"Cluster unreachable",WRt=()=>"无法连接集群",QRt=()=>"خوشه در دسترس نیست",XRt=()=>"تعذّر الوصول إلى العنقود",YRt=()=>"Clúster inaccesible",ZRt=()=>"क्लस्टर तक नहीं पहुँचा जा सका",JRt=((e={},n={})=>{const t=n.locale??z();return t==="zh-CN"?WRt():t==="fa"?QRt():t==="ar"?XRt():t==="es"?YRt():t==="hi"?ZRt():KRt()}),eMt=()=>"Compute",tMt=()=>"算力",nMt=()=>"رایانش",rMt=()=>"الحوسبة",sMt=()=>"Cómputo",iMt=()=>"कंप्यूट",QD=((e={},n={})=>{const t=n.locale??z();return t==="zh-CN"?tMt():t==="fa"?nMt():t==="ar"?rMt():t==="es"?sMt():t==="hi"?iMt():eMt()}),aMt=()=>"Connect compute backends and choose where new runs execute.",oMt=()=>"连接算力后端,并选择新运行的执行位置。",lMt=()=>"backendهای رایانشی را متصل و محل اجرای کارهای جدید را انتخاب کنید.",cMt=()=>"اربط بيئات التنفيذ واختر أين تُنفَّذ عمليات التشغيل الجديدة.",uMt=()=>"Conecta backends de cómputo y elige dónde se lanzan las nuevas ejecuciones.",_Mt=()=>"कंप्यूट बैकएंड कनेक्ट करें और चुनें कि नए रन कहाँ चलेंगे।",fMt=((e={},n={})=>{const t=n.locale??z();return t==="zh-CN"?oMt():t==="fa"?lMt():t==="ar"?cMt():t==="es"?uMt():t==="hi"?_Mt():aMt()}),dMt=()=>"Connected",hMt=()=>"已连接",pMt=()=>"متصل",mMt=()=>"متصل",gMt=()=>"Conectado",vMt=()=>"कनेक्टेड",bMt=((e={},n={})=>{const t=n.locale??z();return t==="zh-CN"?hMt():t==="fa"?pMt():t==="ar"?mMt():t==="es"?gMt():t==="hi"?vMt():dMt()}),yMt=()=>"Context",xMt=()=>"上下文",wMt=()=>"زمینه",kMt=()=>"السياق",SMt=()=>"Contexto",CMt=()=>"कॉन्टेक्स्ट",EMt=((e={},n={})=>{const t=n.locale??z();return t==="zh-CN"?xMt():t==="fa"?wMt():t==="ar"?kMt():t==="es"?SMt():t==="hi"?CMt():yMt()}),NMt=()=>"Current",zMt=()=>"当前",jMt=()=>"فعلی",TMt=()=>"الحالي",AMt=()=>"Actual",RMt=()=>"मौजूदा",MMt=((e={},n={})=>{const t=n.locale??z();return t==="zh-CN"?zMt():t==="fa"?jMt():t==="ar"?TMt():t==="es"?AMt():t==="hi"?RMt():NMt()}),OMt=()=>"Currently off:",DMt=()=>"当前已关闭:",LMt=()=>"اکنون خاموش است:",IMt=()=>"معطّل حاليًا:",$Mt=()=>"Desactivado actualmente:",BMt=()=>"फ़िलहाल बंद:",PMt=((e={},n={})=>{const t=n.locale??z();return t==="zh-CN"?DMt():t==="fa"?LMt():t==="ar"?IMt():t==="es"?$Mt():t==="hi"?BMt():OMt()}),FMt=()=>"Custom flavor",HMt=()=>"自定义规格",qMt=()=>"پیکربندی سفارشی",UMt=()=>"تكوين موارد مخصّص",GMt=()=>"Opción personalizada",VMt=()=>"कस्टम फ़्लेवर",KMt=((e={},n={})=>{const t=n.locale??z();return t==="zh-CN"?HMt():t==="fa"?qMt():t==="ar"?UMt():t==="es"?GMt():t==="hi"?VMt():FMt()}),WMt=()=>"Custom flavor…",QMt=()=>"自定义规格…",XMt=()=>"پیکربندی سفارشی…",YMt=()=>"تكوين موارد مخصّص…",ZMt=()=>"Opción personalizada…",JMt=()=>"कस्टम फ़्लेवर…",eOt=((e={},n={})=>{const t=n.locale??z();return t==="zh-CN"?QMt():t==="fa"?XMt():t==="ar"?YMt():t==="es"?ZMt():t==="hi"?JMt():WMt()}),tOt=()=>"Data directory",nOt=()=>"数据目录",rOt=()=>"پوشهٔ داده",sOt=()=>"دليل البيانات",iOt=()=>"Directorio de datos",aOt=()=>"डेटा डायरेक्टरी",oOt=((e={},n={})=>{const t=n.locale??z();return t==="zh-CN"?nOt():t==="fa"?rOt():t==="ar"?sOt():t==="es"?iOt():t==="hi"?aOt():tOt()}),lOt=()=>"default",cOt=()=>"默认",uOt=()=>"پیش‌فرض",_Ot=()=>"افتراضي",fOt=()=>"predeterminado",dOt=()=>"डिफ़ॉल्ट",hOt=((e={},n={})=>{const t=n.locale??z();return t==="zh-CN"?cOt():t==="fa"?uOt():t==="ar"?_Ot():t==="es"?fOt():t==="hi"?dOt():lOt()}),pOt=()=>"Default",mOt=()=>"默认",gOt=()=>"پیش‌فرض",vOt=()=>"الافتراضي",bOt=()=>"Predeterminado",yOt=()=>"डिफ़ॉल्ट",XD=((e={},n={})=>{const t=n.locale??z();return t==="zh-CN"?mOt():t==="fa"?gOt():t==="ar"?vOt():t==="es"?bOt():t==="hi"?yOt():pOt()}),xOt=()=>"Default destination",wOt=()=>"默认目标",kOt=()=>"مقصد پیش‌فرض",SOt=()=>"الوجهة الافتراضية",COt=()=>"Destino predeterminado",EOt=()=>"डिफ़ॉल्ट गंतव्य",NOt=((e={},n={})=>{const t=n.locale??z();return t==="zh-CN"?wOt():t==="fa"?kOt():t==="ar"?SOt():t==="es"?COt():t==="hi"?EOt():xOt()}),zOt=()=>"Detecting hardware…",jOt=()=>"正在检测硬件…",TOt=()=>"در حال شناسایی سخت‌افزار…",AOt=()=>"جارٍ اكتشاف العتاد…",ROt=()=>"Detectando hardware…",MOt=()=>"हार्डवेयर पहचाना जा रहा है…",OOt=((e={},n={})=>{const t=n.locale??z();return t==="zh-CN"?jOt():t==="fa"?TOt():t==="ar"?AOt():t==="es"?ROt():t==="hi"?MOt():zOt()}),DOt=()=>"Detecting harnesses…",LOt=()=>"正在检测智能体工具…",IOt=()=>"در حال شناسایی ابزارهای عامل…",$Ot=()=>"جارٍ اكتشاف أدوات البرمجة…",BOt=()=>"Detectando agentes…",POt=()=>"हार्नेस पहचाने जा रहे हैं…",FOt=((e={},n={})=>{const t=n.locale??z();return t==="zh-CN"?LOt():t==="fa"?IOt():t==="ar"?$Ot():t==="es"?BOt():t==="hi"?POt():DOt()}),HOt=()=>"Disabling syncing stops automatic pushes. Compute continues to use direct source snapshots. This does not delete the GitHub repository or code already pushed.",qOt=()=>"关闭同步会停止自动推送。算力执行仍使用直接的源代码快照。此操作不会删除 GitHub 仓库或已推送的代码。",UOt=()=>"خاموش کردن همگام‌سازی، push خودکار را متوقف می‌کند. رایانش همچنان از snapshot مستقیم منبع استفاده می‌کند. این کار مخزن GitHub یا کدهای ازپیش pushشده را حذف نمی‌کند.",GOt=()=>"يوقف تعطيل المزامنة عمليات الرفع التلقائية. تواصل الحوسبة استخدام لقطات المصدر المباشرة. لا يحذف هذا مستودع GitHub أو الشيفرة التي رُفعت إليه مسبقًا.",VOt=()=>"Desactivar la sincronización detiene los push automáticos. El cómputo sigue usando snapshots directos del código fuente. No se elimina el repositorio de GitHub ni el código que ya se subió.",KOt=()=>"सिंकिंग बंद करने से ऑटोमैटिक पुश रुक जाते हैं। कंप्यूट सीधे सोर्स स्नैपशॉट का इस्तेमाल करता रहेगा। इससे GitHub रिपॉज़िटरी या पहले से पुश किया गया कोड नहीं मिटता।",WOt=((e={},n={})=>{const t=n.locale??z();return t==="zh-CN"?qOt():t==="fa"?UOt():t==="ar"?GOt():t==="es"?VOt():t==="hi"?KOt():HOt()}),QOt=()=>"Effective URL",XOt=()=>"实际使用的网址",YOt=()=>"نشانی مؤثر",ZOt=()=>"الرابط الفعّال",JOt=()=>"URL efectiva",eDt=()=>"प्रभावी URL",tDt=((e={},n={})=>{const t=n.locale??z();return t==="zh-CN"?XOt():t==="fa"?YOt():t==="ar"?ZOt():t==="es"?JOt():t==="hi"?eDt():QOt()}),nDt=()=>"Enable GitHub syncing for new projects",rDt=()=>"为新项目启用 GitHub 同步",sDt=()=>"فعال‌سازی همگام‌سازی GitHub برای پروژه‌های جدید",iDt=()=>"تفعيل مزامنة GitHub للمشاريع الجديدة",aDt=()=>"Activar la sincronización con GitHub en proyectos nuevos",oDt=()=>"नए प्रोजेक्ट के लिए GitHub सिंकिंग चालू करें",lz=((e={},n={})=>{const t=n.locale??z();return t==="zh-CN"?rDt():t==="fa"?sDt():t==="ar"?iDt():t==="es"?aDt():t==="hi"?oDt():nDt()}),lDt=()=>"Environment",cDt=()=>"环境",uDt=()=>"محیط",_Dt=()=>"البيئة",fDt=()=>"Entorno",dDt=()=>"एनवायरनमेंट",YD=((e={},n={})=>{const t=n.locale??z();return t==="zh-CN"?cDt():t==="fa"?uDt():t==="ar"?_Dt():t==="es"?fDt():t==="hi"?dDt():lDt()}),hDt=()=>"Failed",pDt=()=>"失败",mDt=()=>"ناموفق",gDt=()=>"فشل",vDt=()=>"Error",bDt=()=>"विफल",Fk=((e={},n={})=>{const t=n.locale??z();return t==="zh-CN"?pDt():t==="fa"?mDt():t==="ar"?gDt():t==="es"?vDt():t==="hi"?bDt():hDt()}),yDt=()=>"General",xDt=()=>"常规",wDt=()=>"عمومی",kDt=()=>"عام",SDt=()=>"General",CDt=()=>"सामान्य",EDt=((e={},n={})=>{const t=n.locale??z();return t==="zh-CN"?xDt():t==="fa"?wDt():t==="ar"?kDt():t==="es"?SDt():t==="hi"?CDt():yDt()}),NDt=()=>"GitHub publishing",zDt=()=>"GitHub 发布",jDt=()=>"انتشار در GitHub",TDt=()=>"النشر على GitHub",ADt=()=>"Publicación en GitHub",RDt=()=>"GitHub प्रकाशन",MDt=((e={},n={})=>{const t=n.locale??z();return t==="zh-CN"?zDt():t==="fa"?jDt():t==="ar"?TDt():t==="es"?ADt():t==="hi"?RDt():NDt()}),ODt=()=>"Git token",DDt=()=>"Git 令牌",LDt=()=>"توکن Git",IDt=()=>"رمز Git",$Dt=()=>"Token de Git",BDt=()=>"Git टोकन",PDt=((e={},n={})=>{const t=n.locale??z();return t==="zh-CN"?DDt():t==="fa"?LDt():t==="ar"?IDt():t==="es"?$Dt():t==="hi"?BDt():ODt()}),FDt=()=>"Harnesses",HDt=()=>"智能体工具",qDt=()=>"ابزارهای عامل",UDt=()=>"أدوات البرمجة",GDt=()=>"Agentes",VDt=()=>"हार्नेस",i3=((e={},n={})=>{const t=n.locale??z();return t==="zh-CN"?HDt():t==="fa"?qDt():t==="ar"?UDt():t==="es"?GDt():t==="hi"?VDt():FDt()}),KDt=()=>"hf_…",WDt=()=>"hf_…",QDt=()=>"hf_…",XDt=()=>"hf_…",YDt=()=>"hf_…",ZDt=()=>"hf_…",JDt=((e={},n={})=>{const t=n.locale??z();return t==="zh-CN"?WDt():t==="fa"?QDt():t==="ar"?XDt():t==="es"?YDt():t==="hi"?ZDt():KDt()}),eLt=()=>"HF_TOKEN is set in the environment and overrides any token saved here.",tLt=()=>"环境中已设置 HF_TOKEN,它会覆盖此处保存的令牌。",nLt=()=>"مقدار HF_TOKEN در محیط تنظیم شده و هر توکن ذخیره‌شده در اینجا را بازنویسی می‌کند.",rLt=()=>"‏HF_TOKEN مضبوط في البيئة ويتجاوز أي رمز محفوظ هنا.",sLt=()=>"HF_TOKEN está definido en el entorno y tiene prioridad sobre cualquier token guardado aquí.",iLt=()=>"HF_TOKEN एनवायरनमेंट में सेट है और यहाँ सेव किसी भी टोकन को ओवरराइड करता है।",aLt=((e={},n={})=>{const t=n.locale??z();return t==="zh-CN"?tLt():t==="fa"?nLt():t==="ar"?rLt():t==="es"?sLt():t==="hi"?iLt():eLt()}),oLt=()=>"Initialize Git",lLt=()=>"初始化 Git",cLt=()=>"راه‌اندازی Git",uLt=()=>"تهيئة Git",_Lt=()=>"Inicializar Git",fLt=()=>"Git शुरू करें",dLt=((e={},n={})=>{const t=n.locale??z();return t==="zh-CN"?lLt():t==="fa"?cLt():t==="ar"?uLt():t==="es"?_Lt():t==="hi"?fLt():oLt()}),hLt=()=>"Install",pLt=()=>"安装",mLt=()=>"نصب",gLt=()=>"تثبيت",vLt=()=>"Instalar",bLt=()=>"इंस्टॉल करें",ZD=((e={},n={})=>{const t=n.locale??z();return t==="zh-CN"?pLt():t==="fa"?mLt():t==="ar"?gLt():t==="es"?vLt():t==="hi"?bLt():hLt()}),yLt=()=>"Install broken",xLt=()=>"安装损坏",wLt=()=>"نصب خراب است",kLt=()=>"التثبيت معطوب",SLt=()=>"Instalación dañada",CLt=()=>"इंस्टॉल खराब है",ELt=((e={},n={})=>{const t=n.locale??z();return t==="zh-CN"?xLt():t==="fa"?wLt():t==="ar"?kLt():t==="es"?SLt():t==="hi"?CLt():yLt()}),NLt=()=>"Install GitHub CLI",zLt=()=>"安装 GitHub CLI",jLt=()=>"نصب GitHub CLI",TLt=()=>"تثبيت واجهة GitHub لسطر الأوامر",ALt=()=>"Instalar GitHub CLI",RLt=()=>"GitHub CLI इंस्टॉल करें",MLt=((e={},n={})=>{const t=n.locale??z();return t==="zh-CN"?zLt():t==="fa"?jLt():t==="ar"?TLt():t==="es"?ALt():t==="hi"?RLt():NLt()}),OLt=()=>"Install updates automatically",DLt=()=>"自动安装更新",LLt=()=>"نصب خودکار به‌روزرسانی‌ها",ILt=()=>"تثبيت التحديثات تلقائيًا",$Lt=()=>"Instalar actualizaciones automáticamente",BLt=()=>"अपडेट अपने आप इंस्टॉल करें",cz=((e={},n={})=>{const t=n.locale??z();return t==="zh-CN"?DLt():t==="fa"?LLt():t==="ar"?ILt():t==="es"?$Lt():t==="hi"?BLt():OLt()}),PLt=()=>"Instance history",FLt=()=>"实例历史",HLt=()=>"تاریخچهٔ نمونه‌ها",qLt=()=>"سجل المثيلات",ULt=()=>"Historial de instancias",GLt=()=>"इंस्टेंस इतिहास",VLt=((e={},n={})=>{const t=n.locale??z();return t==="zh-CN"?FLt():t==="fa"?HLt():t==="ar"?qLt():t==="es"?ULt():t==="hi"?GLt():PLt()}),KLt=()=>"Invalid Token",WLt=()=>"令牌无效",QLt=()=>"توکن نامعتبر",XLt=()=>"رمز غير صالح",YLt=()=>"Token no válido",ZLt=()=>"अमान्य टोकन",JLt=((e={},n={})=>{const t=n.locale??z();return t==="zh-CN"?WLt():t==="fa"?QLt():t==="ar"?XLt():t==="es"?YLt():t==="hi"?ZLt():KLt()}),eIt=()=>"Jobs / Dashboard URL",tIt=()=>"Jobs / 控制台网址",nIt=()=>"نشانی Jobs / داشبورد",rIt=()=>"رابط المهام / لوحة التحكم",sIt=()=>"URL de jobs / dashboard",iIt=()=>"Jobs / डैशबोर्ड URL",aIt=((e={},n={})=>{const t=n.locale??z();return t==="zh-CN"?tIt():t==="fa"?nIt():t==="ar"?rIt():t==="es"?sIt():t==="hi"?iIt():eIt()}),oIt=()=>"kubectl not found",lIt=()=>"未找到 kubectl",cIt=()=>"kubectl پیدا نشد",uIt=()=>"لم يُعثر على kubectl",_It=()=>"No se encontró kubectl",fIt=()=>"kubectl नहीं मिला",dIt=((e={},n={})=>{const t=n.locale??z();return t==="zh-CN"?lIt():t==="fa"?cIt():t==="ar"?uIt():t==="es"?_It():t==="hi"?fIt():oIt()}),hIt=()=>"Latest",pIt=()=>"最新版本",mIt=()=>"جدیدترین",gIt=()=>"الأحدث",vIt=()=>"Última",bIt=()=>"नवीनतम",yIt=((e={},n={})=>{const t=n.locale??z();return t==="zh-CN"?pIt():t==="fa"?mIt():t==="ar"?gIt():t==="es"?vIt():t==="hi"?bIt():hIt()}),xIt=()=>"Loading…",wIt=()=>"正在加载…",kIt=()=>"در حال بارگیری…",SIt=()=>"جارٍ التحميل…",CIt=()=>"Cargando…",EIt=()=>"लोड हो रहा है…",zu=((e={},n={})=>{const t=n.locale??z();return t==="zh-CN"?wIt():t==="fa"?kIt():t==="ar"?SIt():t==="es"?CIt():t==="hi"?EIt():xIt()}),NIt=()=>"Loading Ray settings…",zIt=()=>"正在加载 Ray 设置…",jIt=()=>"در حال بارگیری تنظیمات Ray…",TIt=()=>"جارٍ تحميل إعدادات Ray…",AIt=()=>"Cargando configuración de Ray…",RIt=()=>"Ray सेटिंग्स लोड हो रही हैं…",MIt=((e={},n={})=>{const t=n.locale??z();return t==="zh-CN"?zIt():t==="fa"?jIt():t==="ar"?TIt():t==="es"?AIt():t==="hi"?RIt():NIt()}),OIt=()=>"Loading slurm settings…",DIt=()=>"正在加载 Slurm 设置…",LIt=()=>"در حال بارگیری تنظیمات Slurm…",IIt=()=>"جارٍ تحميل إعدادات slurm…",$It=()=>"Cargando configuración de Slurm…",BIt=()=>"Slurm सेटिंग्स लोड हो रही हैं…",PIt=((e={},n={})=>{const t=n.locale??z();return t==="zh-CN"?DIt():t==="fa"?LIt():t==="ar"?IIt():t==="es"?$It():t==="hi"?BIt():OIt()}),FIt=()=>"Loading status…",HIt=()=>"正在加载状态…",qIt=()=>"در حال بارگیری وضعیت…",UIt=()=>"جارٍ تحميل الحالة…",GIt=()=>"Cargando estado…",VIt=()=>"स्थिति लोड हो रही है…",KIt=((e={},n={})=>{const t=n.locale??z();return t==="zh-CN"?HIt():t==="fa"?qIt():t==="ar"?UIt():t==="es"?GIt():t==="hi"?VIt():FIt()}),WIt=()=>"Local only",QIt=()=>"仅本地",XIt=()=>"فقط محلی",YIt=()=>"محلي فقط",ZIt=()=>"Solo local",JIt=()=>"केवल लोकल",e$t=((e={},n={})=>{const t=n.locale??z();return t==="zh-CN"?QIt():t==="fa"?XIt():t==="ar"?YIt():t==="es"?ZIt():t==="hi"?JIt():WIt()}),t$t=()=>"Local repository",n$t=()=>"本地仓库",r$t=()=>"مخزن محلی",s$t=()=>"مستودع محلي",i$t=()=>"Repositorio local",a$t=()=>"लोकल रिपॉज़िटरी",o$t=((e={},n={})=>{const t=n.locale??z();return t==="zh-CN"?n$t():t==="fa"?r$t():t==="ar"?s$t():t==="es"?i$t():t==="hi"?a$t():t$t()}),l$t=()=>"Login node",c$t=()=>"登录节点",u$t=()=>"گرهٔ ورود",_$t=()=>"عقدة الدخول",f$t=()=>"Nodo de acceso",d$t=()=>"लॉगिन नोड",h$t=((e={},n={})=>{const t=n.locale??z();return t==="zh-CN"?c$t():t==="fa"?u$t():t==="ar"?_$t():t==="es"?f$t():t==="hi"?d$t():l$t()}),p$t=()=>"Make GitHub syncing the default?",m$t=()=>"将 GitHub 同步设为默认值?",g$t=()=>"همگام‌سازی GitHub پیش‌فرض شود؟",v$t=()=>"جعل مزامنة GitHub افتراضية؟",b$t=()=>"¿Activar la sincronización con GitHub de forma predeterminada?",y$t=()=>"GitHub सिंकिंग को डिफ़ॉल्ट बनाएं?",x$t=((e={},n={})=>{const t=n.locale??z();return t==="zh-CN"?m$t():t==="fa"?g$t():t==="ar"?v$t():t==="es"?b$t():t==="hi"?y$t():p$t()}),w$t=()=>"Missing bash/tar",k$t=()=>"缺少 bash/tar",S$t=()=>"bash/tar موجود نیست",C$t=()=>"‏bash/tar مفقودان",E$t=()=>"Falta bash/tar",N$t=()=>"bash/tar गुम है",z$t=((e={},n={})=>{const t=n.locale??z();return t==="zh-CN"?k$t():t==="fa"?S$t():t==="ar"?C$t():t==="es"?E$t():t==="hi"?N$t():w$t()}),j$t=()=>"More compute options",T$t=()=>"更多算力选项",A$t=()=>"گزینه‌های رایانشی بیشتر",R$t=()=>"خيارات حوسبة إضافية",M$t=()=>"Más opciones de cómputo",O$t=()=>"और कंप्यूट विकल्प",D$t=((e={},n={})=>{const t=n.locale??z();return t==="zh-CN"?T$t():t==="fa"?A$t():t==="ar"?R$t():t==="es"?M$t():t==="hi"?O$t():j$t()}),L$t=()=>"Move failed:",I$t=()=>"移动失败:",$$t=()=>"انتقال ناموفق بود:",B$t=()=>"فشل النقل:",P$t=()=>"Error al mover:",F$t=()=>"स्थानांतरण विफल:",H$t=((e={},n={})=>{const t=n.locale??z();return t==="zh-CN"?I$t():t==="fa"?$$t():t==="ar"?B$t():t==="es"?P$t():t==="hi"?F$t():L$t()}),q$t=()=>"Moved. orx is now using the new location.",U$t=()=>"已移动。orx 现在使用新位置。",G$t=()=>"منتقل شد. orx اکنون از محل جدید استفاده می‌کند.",V$t=()=>"تم النقل. يستخدم orx الآن الموقع الجديد.",K$t=()=>"Movido. orx ya usa la nueva ubicación.",W$t=()=>"स्थानांतरित हो गया। orx अब नए स्थान का उपयोग कर रहा है।",Q$t=((e={},n={})=>{const t=n.locale??z();return t==="zh-CN"?U$t():t==="fa"?G$t():t==="ar"?V$t():t==="es"?K$t():t==="hi"?W$t():q$t()}),X$t=()=>"Namespace",Y$t=()=>"命名空间",Z$t=()=>"فضای نام",J$t=()=>"مساحة الأسماء",eBt=()=>"Namespace",tBt=()=>"नेमस्पेस",nBt=((e={},n={})=>{const t=n.locale??z();return t==="zh-CN"?Y$t():t==="fa"?Z$t():t==="ar"?J$t():t==="es"?eBt():t==="hi"?tBt():X$t()}),rBt=()=>"New location",sBt=()=>"新位置",iBt=()=>"محل جدید",aBt=()=>"الموقع الجديد",oBt=()=>"Nueva ubicación",lBt=()=>"नया स्थान",cBt=((e={},n={})=>{const t=n.locale??z();return t==="zh-CN"?sBt():t==="fa"?iBt():t==="ar"?aBt():t==="es"?oBt():t==="hi"?lBt():rBt()}),uBt=()=>"New releases are downloaded and installed in the background. Turning this off keeps the notice but leaves the install to you.",_Bt=()=>"新版本会在后台下载并安装。关闭后仍会显示通知,但需要手动安装。",fBt=()=>"نسخه‌های جدید در پس‌زمینه دریافت و نصب می‌شوند. خاموش کردن این گزینه اعلان را نگه می‌دارد، اما نصب را به شما می‌سپارد.",dBt=()=>"تُنزَّل الإصدارات الجديدة وتُثبَّت في الخلفية. إيقاف هذا يبقي الإشعار لكنه يترك التثبيت لك.",hBt=()=>"Las nuevas versiones se descargan e instalan en segundo plano. Si lo desactivas, verás el aviso, pero tendrás que instalarlas tú.",pBt=()=>"नए रिलीज़ बैकग्राउंड में डाउनलोड और इंस्टॉल होते हैं। इसे बंद करने पर सूचना बनी रहेगी, पर इंस्टॉल करना आप पर निर्भर होगा।",mBt=((e={},n={})=>{const t=n.locale??z();return t==="zh-CN"?_Bt():t==="fa"?fBt():t==="ar"?dBt():t==="es"?hBt():t==="hi"?pBt():uBt()}),gBt=()=>"New variable key",vBt=()=>"新变量键名",bBt=()=>"کلید متغیر جدید",yBt=()=>"مفتاح المتغيّر الجديد",xBt=()=>"Nombre de la nueva variable",wBt=()=>"नई वेरिएबल की",kBt=((e={},n={})=>{const t=n.locale??z();return t==="zh-CN"?vBt():t==="fa"?bBt():t==="ar"?yBt():t==="es"?xBt():t==="hi"?wBt():gBt()}),SBt=()=>"New variable value",CBt=()=>"新变量值",EBt=()=>"مقدار متغیر جدید",NBt=()=>"قيمة المتغيّر الجديد",zBt=()=>"Valor de la nueva variable",jBt=()=>"नई वेरिएबल वैल्यू",TBt=((e={},n={})=>{const t=n.locale??z();return t==="zh-CN"?CBt():t==="fa"?EBt():t==="ar"?NBt():t==="es"?zBt():t==="hi"?jBt():SBt()}),ABt=()=>"No code, prompts, file contents, or account identifiers are sent.",RBt=()=>"不会发送代码、提示词、文件内容或账户标识符。",MBt=()=>"هیچ کد، پرامپت، محتوای فایل یا شناسهٔ حسابی ارسال نمی‌شود.",OBt=()=>"لا تُرسَل أي شيفرة أو طلبات أو محتويات ملفات أو معرّفات حسابات.",DBt=()=>"No se envía código, prompts, contenido de archivos ni identificadores de cuenta.",LBt=()=>"कोई कोड, प्रॉम्प्ट, फ़ाइल सामग्री, या खाता पहचानकर्ता नहीं भेजे जाते।",IBt=((e={},n={})=>{const t=n.locale??z();return t==="zh-CN"?RBt():t==="fa"?MBt():t==="ar"?OBt():t==="es"?DBt():t==="hi"?LBt():ABt()}),$Bt=()=>"No hosts found in ~/.ssh/config.",BBt=()=>"在 ~/.ssh/config 中未找到主机。",PBt=()=>"میزبانی در ‎~/.ssh/config پیدا نشد.",FBt=()=>"لم يُعثر على مضيفين في ‎~/.ssh/config.",HBt=()=>"No se encontraron hosts en ~/.ssh/config.",qBt=()=>"~/.ssh/config में कोई होस्ट नहीं मिला।",UBt=((e={},n={})=>{const t=n.locale??z();return t==="zh-CN"?BBt():t==="fa"?PBt():t==="ar"?FBt():t==="es"?HBt():t==="hi"?qBt():$Bt()}),GBt=()=>"No job-create permission",VBt=()=>"没有创建 Job 的权限",KBt=()=>"مجوز ساخت Job وجود ندارد",WBt=()=>"لا صلاحية لإنشاء المهام",QBt=()=>"Sin permiso para crear jobs",XBt=()=>"जॉब बनाने की अनुमति नहीं",YBt=((e={},n={})=>{const t=n.locale??z();return t==="zh-CN"?VBt():t==="fa"?KBt():t==="ar"?WBt():t==="es"?QBt():t==="hi"?XBt():GBt()}),ZBt=()=>"No Write Permissions",JBt=()=>"无写入权限",ePt=()=>"بدون مجوز نوشتن",tPt=()=>"لا صلاحيات كتابة",nPt=()=>"Sin permisos de escritura",rPt=()=>"लिखने की अनुमति नहीं",sPt=((e={},n={})=>{const t=n.locale??z();return t==="zh-CN"?JBt():t==="fa"?ePt():t==="ar"?tPt():t==="es"?nPt():t==="hi"?rPt():ZBt()}),iPt=()=>"No key on this computer to register — load a registered key with",aPt=()=>"此计算机上没有可注册的密钥——使用以下命令加载已注册的密钥:",oPt=()=>"کلیدی برای ثبت روی این رایانه نیست — کلید ثبت‌شده را با این فرمان بار کنید:",lPt=()=>"لا مفتاح على هذا الحاسوب لتسجيله — حمّل مفتاحًا مسجّلًا عبر",cPt=()=>"No hay ninguna clave en este equipo para registrar — carga una clave registrada con",uPt=()=>"इस कंप्यूटर पर रजिस्टर करने के लिए कोई की नहीं है — इसके साथ एक रजिस्टर्ड की लोड करें",_Pt=((e={},n={})=>{const t=n.locale??z();return t==="zh-CN"?aPt():t==="fa"?oPt():t==="ar"?lPt():t==="es"?cPt():t==="hi"?uPt():iPt()}),fPt=()=>"No key on this computer yet — create one with",dPt=()=>"此计算机上还没有密钥——使用以下命令创建:",hPt=()=>"هنوز کلیدی روی این رایانه نیست — با این فرمان یکی بسازید:",pPt=()=>"لا مفتاح على هذا الحاسوب بعد — أنشئ واحدًا عبر",mPt=()=>"Aún no hay ninguna clave en este equipo — crea una con",gPt=()=>"इस कंप्यूटर पर अभी तक कोई की नहीं है — इसके साथ एक बनाएं",vPt=((e={},n={})=>{const t=n.locale??z();return t==="zh-CN"?dPt():t==="fa"?hPt():t==="ar"?pPt():t==="es"?mPt():t==="hi"?gPt():fPt()}),bPt=()=>"No Slurm CLI",yPt=()=>"无 Slurm CLI",xPt=()=>"بدون CLI اسلورم",wPt=()=>"لا توجد واجهة Slurm لسطر الأوامر",kPt=()=>"Sin CLI de Slurm",SPt=()=>"कोई Slurm CLI नहीं",CPt=((e={},n={})=>{const t=n.locale??z();return t==="zh-CN"?yPt():t==="fa"?xPt():t==="ar"?wPt():t==="es"?kPt():t==="hi"?SPt():bPt()}),EPt=()=>"None registered",NPt=()=>"未注册任何密钥",zPt=()=>"هیچ‌کدام ثبت نشده",jPt=()=>"لا شيء مسجّل",TPt=()=>"Ninguna registrada",APt=()=>"कोई रजिस्टर्ड नहीं",RPt=((e={},n={})=>{const t=n.locale??z();return t==="zh-CN"?NPt():t==="fa"?zPt():t==="ar"?jPt():t==="es"?TPt():t==="hi"?APt():EPt()}),MPt=()=>"Not checked",OPt=()=>"未检查",DPt=()=>"بررسی نشده",LPt=()=>"لم يُفحص",IPt=()=>"Sin comprobar",$Pt=()=>"जाँचा नहीं गया",JD=((e={},n={})=>{const t=n.locale??z();return t==="zh-CN"?OPt():t==="fa"?DPt():t==="ar"?LPt():t==="es"?IPt():t==="hi"?$Pt():MPt()}),BPt=()=>"Not configured",PPt=()=>"未配置",FPt=()=>"پیکربندی نشده",HPt=()=>"غير مُعَد",qPt=()=>"Sin configurar",UPt=()=>"कॉन्फ़िगर नहीं किया गया",vb=((e={},n={})=>{const t=n.locale??z();return t==="zh-CN"?PPt():t==="fa"?FPt():t==="ar"?HPt():t==="es"?qPt():t==="hi"?UPt():BPt()}),GPt=()=>"Not installed",VPt=()=>"未安装",KPt=()=>"نصب نیست",WPt=()=>"غير مثبّت",QPt=()=>"No instalado",XPt=()=>"इंस्टॉल नहीं है",YPt=((e={},n={})=>{const t=n.locale??z();return t==="zh-CN"?VPt():t==="fa"?KPt():t==="ar"?WPt():t==="es"?QPt():t==="hi"?XPt():GPt()}),ZPt=()=>"Not now",JPt=()=>"暂不",eFt=()=>"اکنون نه",tFt=()=>"ليس الآن",nFt=()=>"Ahora no",rFt=()=>"अभी नहीं",sFt=((e={},n={})=>{const t=n.locale??z();return t==="zh-CN"?JPt():t==="fa"?eFt():t==="ar"?tFt():t==="es"?nFt():t==="hi"?rFt():ZPt()}),iFt=()=>"Not on this computer",aFt=()=>"不在此计算机上",oFt=()=>"روی این رایانه نیست",lFt=()=>"ليس على هذا الحاسوب",cFt=()=>"No en este equipo",uFt=()=>"इस कंप्यूटर पर नहीं",_Ft=((e={},n={})=>{const t=n.locale??z();return t==="zh-CN"?aFt():t==="fa"?oFt():t==="ar"?lFt():t==="es"?cFt():t==="hi"?uFt():iFt()}),fFt=()=>"Not set (pass --host per launch)",dFt=()=>"未设置(每次启动时传入 --host)",hFt=()=>"تنظیم نشده (در هر اجرا ‎--host بدهید)",pFt=()=>"غير مضبوط (مرّر ‎--host‎ عند كل تشغيل)",mFt=()=>"Sin definir (pasa --host en cada lanzamiento)",gFt=()=>"सेट नहीं (हर लॉन्च पर --host दें)",eL=((e={},n={})=>{const t=n.locale??z();return t==="zh-CN"?dFt():t==="fa"?hFt():t==="ar"?pFt():t==="es"?mFt():t==="hi"?gFt():fFt()}),vFt=()=>"Not signed in",bFt=()=>"未登录",yFt=()=>"وارد نشده",xFt=()=>"لم يتم تسجيل الدخول",wFt=()=>"Sin iniciar sesión",kFt=()=>"साइन इन नहीं है",tL=((e={},n={})=>{const t=n.locale??z();return t==="zh-CN"?bFt():t==="fa"?yFt():t==="ar"?xFt():t==="es"?wFt():t==="hi"?kFt():vFt()}),SFt=()=>"On this computer",CFt=()=>"在此计算机上",EFt=()=>"روی این رایانه",NFt=()=>"على هذا الحاسوب",zFt=()=>"En este equipo",jFt=()=>"इस कंप्यूटर पर",TFt=((e={},n={})=>{const t=n.locale??z();return t==="zh-CN"?CFt():t==="fa"?EFt():t==="ar"?NFt():t==="es"?zFt():t==="hi"?jFt():SFt()}),AFt=()=>"Open a project to inspect its repository and GitHub publication state.",RFt=()=>"打开项目以查看其仓库和 GitHub 发布状态。",MFt=()=>"پروژه‌ای را باز کنید تا مخزن و وضعیت انتشار GitHub آن را ببینید.",OFt=()=>"افتح مشروعًا لفحص مستودعه وحالة نشره على GitHub.",DFt=()=>"Abre un proyecto para ver su repositorio y su estado de publicación en GitHub.",LFt=()=>"इसकी रिपॉज़िटरी और GitHub प्रकाशन स्थिति देखने के लिए एक प्रोजेक्ट खोलें।",IFt=((e={},n={})=>{const t=n.locale??z();return t==="zh-CN"?RFt():t==="fa"?MFt():t==="ar"?OFt():t==="es"?DFt():t==="hi"?LFt():AFt()}),$Ft=()=>"Open job page",BFt=()=>"打开作业页面",PFt=()=>"باز کردن صفحهٔ کار",FFt=()=>"فتح صفحة المهمة",HFt=()=>"Abrir página del job",qFt=()=>"जॉब पेज खोलें",uz=((e={},n={})=>{const t=n.locale??z();return t==="zh-CN"?BFt():t==="fa"?PFt():t==="ar"?FFt():t==="es"?HFt():t==="hi"?qFt():$Ft()}),UFt=()=>"Open on GitHub",GFt=()=>"在 GitHub 上打开",VFt=()=>"باز کردن در GitHub",KFt=()=>"فتح على GitHub",WFt=()=>"Abrir en GitHub",QFt=()=>"GitHub पर खोलें",_z=((e={},n={})=>{const t=n.locale??z();return t==="zh-CN"?GFt():t==="fa"?VFt():t==="ar"?KFt():t==="es"?WFt():t==="hi"?QFt():UFt()}),XFt=()=>", or create one with",YFt=()=>",或使用以下命令创建:",ZFt=()=>"، یا با این فرمان یکی بسازید:",JFt=()=>"، أو أنشئ واحدًا عبر",eHt=()=>", o crea una con",tHt=()=>", या इसके साथ एक बनाएं",nHt=((e={},n={})=>{const t=n.locale??z();return t==="zh-CN"?YFt():t==="fa"?ZFt():t==="ar"?JFt():t==="es"?eHt():t==="hi"?tHt():XFt()}),rHt=()=>"Org",sHt=()=>"组织",iHt=()=>"سازمان",aHt=()=>"المؤسسة",oHt=()=>"Org.",lHt=()=>"संगठन",cHt=((e={},n={})=>{const t=n.locale??z();return t==="zh-CN"?sHt():t==="fa"?iHt():t==="ar"?aHt():t==="es"?oHt():t==="hi"?lHt():rHt()}),uHt=()=>"Orgs",_Ht=()=>"组织",fHt=()=>"سازمان‌ها",dHt=()=>"المؤسسات",hHt=()=>"Orgs.",pHt=()=>"संगठन",mHt=((e={},n={})=>{const t=n.locale??z();return t==="zh-CN"?_Ht():t==="fa"?fHt():t==="ar"?dHt():t==="es"?hHt():t==="hi"?pHt():uHt()}),gHt=()=>"orx can't update this install",vHt=()=>"orx 无法更新此安装",bHt=()=>"orx نمی‌تواند این نصب را به‌روزرسانی کند",yHt=()=>"لا يستطيع orx تحديث هذا التثبيت",xHt=()=>"orx no puede actualizar esta instalación",wHt=()=>"orx इस इंस्टॉल को अपडेट नहीं कर सकता",kHt=((e={},n={})=>{const t=n.locale??z();return t==="zh-CN"?vHt():t==="fa"?bHt():t==="ar"?yHt():t==="es"?xHt():t==="hi"?wHt():gHt()}),SHt=()=>"Overleaf",CHt=()=>"Overleaf",EHt=()=>"Overleaf",NHt=()=>"Overleaf",zHt=()=>"Overleaf",jHt=()=>"Overleaf",nL=((e={},n={})=>{const t=n.locale??z();return t==="zh-CN"?CHt():t==="fa"?EHt():t==="ar"?NHt():t==="es"?zHt():t==="hi"?jHt():SHt()}),THt=()=>"Overleaf Git authentication token",AHt=()=>"Overleaf Git 身份验证令牌",RHt=()=>"توکن احراز هویت Git در Overleaf",MHt=()=>"رمز مصادقة Git لـ Overleaf",OHt=()=>"Token de autenticación de Git de Overleaf",DHt=()=>"Overleaf Git प्रमाणीकरण टोकन",LHt=((e={},n={})=>{const t=n.locale??z();return t==="zh-CN"?AHt():t==="fa"?RHt():t==="ar"?MHt():t==="es"?OHt():t==="hi"?DHt():THt()}),IHt=()=>"Overridden by env",$Ht=()=>"已被环境变量覆盖",BHt=()=>"بازنویسی‌شده توسط محیط",PHt=()=>"متجاوَز عبر متغيّر البيئة",FHt=()=>"Sobrescrito por el entorno",HHt=()=>"env द्वारा ओवरराइड किया गया",qHt=((e={},n={})=>{const t=n.locale??z();return t==="zh-CN"?$Ht():t==="fa"?BHt():t==="ar"?PHt():t==="es"?FHt():t==="hi"?HHt():IHt()}),UHt=()=>"Partition",GHt=()=>"分区",VHt=()=>"پارتیشن",KHt=()=>"القسم",WHt=()=>"Partición",QHt=()=>"पार्टीशन",XHt=((e={},n={})=>{const t=n.locale??z();return t==="zh-CN"?GHt():t==="fa"?VHt():t==="ar"?KHt():t==="es"?WHt():t==="hi"?QHt():UHt()}),YHt=()=>"Path",ZHt=()=>"路径",JHt=()=>"مسیر",eqt=()=>"المسار",tqt=()=>"Ruta",nqt=()=>"पथ",rqt=((e={},n={})=>{const t=n.locale??z();return t==="zh-CN"?ZHt():t==="fa"?JHt():t==="ar"?eqt():t==="es"?tqt():t==="hi"?nqt():YHt()}),sqt=()=>"Plan",iqt=()=>"方案",aqt=()=>"سطح اشتراک",oqt=()=>"الخطة",lqt=()=>"Plan",cqt=()=>"प्लान",uqt=((e={},n={})=>{const t=n.locale??z();return t==="zh-CN"?iqt():t==="fa"?aqt():t==="ar"?oqt():t==="es"?lqt():t==="hi"?cqt():sqt()}),_qt=()=>"Project",fqt=()=>"项目",dqt=()=>"پروژه",hqt=()=>"المشروع",pqt=()=>"Proyecto",mqt=()=>"प्रोजेक्ट",gqt=((e={},n={})=>{const t=n.locale??z();return t==="zh-CN"?fqt():t==="fa"?dqt():t==="ar"?hqt():t==="es"?pqt():t==="hi"?mqt():_qt()}),vqt=()=>"Ray version",bqt=()=>"Ray 版本",yqt=()=>"نسخهٔ Ray",xqt=()=>"إصدار Ray",wqt=()=>"Versión de Ray",kqt=()=>"Ray वर्शन",Sqt=((e={},n={})=>{const t=n.locale??z();return t==="zh-CN"?bqt():t==="fa"?yqt():t==="ar"?xqt():t==="es"?wqt():t==="hi"?kqt():vqt()}),Cqt=()=>"Reachable",Eqt=()=>"可访问",Nqt=()=>"در دسترس",zqt=()=>"يمكن الوصول إليه",jqt=()=>"Accesible",Tqt=()=>"पहुँच योग्य",Aqt=((e={},n={})=>{const t=n.locale??z();return t==="zh-CN"?Eqt():t==="fa"?Nqt():t==="ar"?zqt():t==="es"?jqt():t==="hi"?Tqt():Cqt()}),Rqt=()=>"Reading ~/.ssh/config…",Mqt=()=>"正在读取 ~/.ssh/config…",Oqt=()=>"در حال خواندن ‎~/.ssh/config…",Dqt=()=>"جارٍ قراءة ‎~/.ssh/config…",Lqt=()=>"Leyendo ~/.ssh/config…",Iqt=()=>"~/.ssh/config पढ़ा जा रहा है…",rL=((e={},n={})=>{const t=n.locale??z();return t==="zh-CN"?Mqt():t==="fa"?Oqt():t==="ar"?Dqt():t==="es"?Lqt():t==="hi"?Iqt():Rqt()}),$qt=()=>"Ready",Bqt=()=>"就绪",Pqt=()=>"آماده",Fqt=()=>"جاهز",Hqt=()=>"Listo",qqt=()=>"तैयार",um=((e={},n={})=>{const t=n.locale??z();return t==="zh-CN"?Bqt():t==="fa"?Pqt():t==="ar"?Fqt():t==="es"?Hqt():t==="hi"?qqt():$qt()}),Uqt=()=>"Ready to move",Gqt=()=>"可以移动",Vqt=()=>"آمادهٔ انتقال",Kqt=()=>"جاهز للنقل",Wqt=()=>"Listo para mover",Qqt=()=>"स्थानांतरण के लिए तैयार",Xqt=((e={},n={})=>{const t=n.locale??z();return t==="zh-CN"?Gqt():t==="fa"?Vqt():t==="ar"?Kqt():t==="es"?Wqt():t==="hi"?Qqt():Uqt()}),Yqt=()=>"Configured",Zqt=()=>"已配置",Jqt=()=>"پیکربندی‌شده",eUt=()=>"مُعَد",tUt=()=>"Configurado",nUt=()=>"कॉन्फ़िगर किया गया",Hk=((e={},n={})=>{const t=n.locale??z();return t==="zh-CN"?Zqt():t==="fa"?Jqt():t==="ar"?eUt():t==="es"?tUt():t==="hi"?nUt():Yqt()}),rUt=()=>"Refresh",sUt=()=>"刷新",iUt=()=>"تازه‌سازی",aUt=()=>"تحديث",oUt=()=>"Actualizar",lUt=()=>"रीफ़्रेश करें",_m=((e={},n={})=>{const t=n.locale??z();return t==="zh-CN"?sUt():t==="fa"?iUt():t==="ar"?aUt():t==="es"?oUt():t==="hi"?lUt():rUt()}),cUt=()=>"Remotes",uUt=()=>"远程仓库",_Ut=()=>"مخزن‌های دوردست",fUt=()=>"المستودعات البعيدة",dUt=()=>"Remotos",hUt=()=>"रिमोट",pUt=((e={},n={})=>{const t=n.locale??z();return t==="zh-CN"?uUt():t==="fa"?_Ut():t==="ar"?fUt():t==="es"?dUt():t==="hi"?hUt():cUt()}),mUt=()=>"Repository",gUt=()=>"仓库",vUt=()=>"مخزن",bUt=()=>"المستودع",yUt=()=>"Repositorio",xUt=()=>"रिपॉज़िटरी",wUt=((e={},n={})=>{const t=n.locale??z();return t==="zh-CN"?gUt():t==="fa"?vUt():t==="ar"?bUt():t==="es"?yUt():t==="hi"?xUt():mUt()}),kUt=()=>"Restart to finish updating",SUt=()=>"重新启动以完成更新",CUt=()=>"برای تکمیل به‌روزرسانی، دوباره راه‌اندازی کنید",EUt=()=>"أعد التشغيل لإكمال التحديث",NUt=()=>"Reinicia para terminar la actualización",zUt=()=>"अपडेट पूरा करने के लिए फिर से शुरू करें",jUt=((e={},n={})=>{const t=n.locale??z();return t==="zh-CN"?SUt():t==="fa"?CUt():t==="ar"?EUt():t==="es"?NUt():t==="hi"?zUt():kUt()}),TUt=()=>"Running instances",AUt=()=>"正在运行的实例",RUt=()=>"نمونه‌های در حال اجرا",MUt=()=>"المثيلات قيد التشغيل",OUt=()=>"Instancias en ejecución",DUt=()=>"चल रहे इंस्टेंस",LUt=((e={},n={})=>{const t=n.locale??z();return t==="zh-CN"?AUt():t==="fa"?RUt():t==="ar"?MUt():t==="es"?OUt():t==="hi"?DUt():TUt()}),IUt=()=>"Runtime",$Ut=()=>"运行时间",BUt=()=>"زمان اجرا",PUt=()=>"مدة التشغيل",FUt=()=>"Runtime",HUt=()=>"रनटाइम",qUt=((e={},n={})=>{const t=n.locale??z();return t==="zh-CN"?$Ut():t==="fa"?BUt():t==="ar"?PUt():t==="es"?FUt():t==="hi"?HUt():IUt()}),UUt=()=>". Save it under that key if it's meant for HF Jobs.",GUt=()=>"读取它。如果它用于 HF Jobs,请以该键名保存。",VUt=()=>"می‌خوانند. اگر برای HF Jobs است، آن را با همان کلید ذخیره کنید.",KUt=()=>"‏. احفظه تحت ذلك المفتاح إن كان مخصصًا لمهام HF.",WUt=()=>". Guárdalo con ese nombre si es para HF Jobs.",QUt=()=>"। यदि यह HF Jobs के लिए है तो इसे उस की के तहत सेव करें।",XUt=((e={},n={})=>{const t=n.locale??z();return t==="zh-CN"?GUt():t==="fa"?VUt():t==="ar"?KUt():t==="es"?WUt():t==="hi"?QUt():UUt()}),YUt=()=>"Session cookie",ZUt=()=>"会话 cookie",JUt=()=>"کوکی نشست",eGt=()=>"ملف تعريف ارتباط الجلسة",tGt=()=>"Cookie de sesión",nGt=()=>"सेशन कुकी",rGt=((e={},n={})=>{const t=n.locale??z();return t==="zh-CN"?ZUt():t==="fa"?JUt():t==="ar"?eGt():t==="es"?tGt():t==="hi"?nGt():YUt()}),sGt=()=>"With a session cookie saved, a linked paper follows Overleaf as people type and sends saves straight back. Figures still move on the slower Git sync. Copy the overleaf_session2 cookie from a browser signed in to Overleaf; it stops working when that sign-in does.",iGt=()=>"保存会话 cookie 后,已关联的论文会在他人输入时实时跟随 Overleaf,并立即回传保存;图片仍通过较慢的 Git 同步传输。请从已登录 Overleaf 的浏览器复制 overleaf_session2 cookie;该登录失效后它也会失效。",aGt=()=>"با ذخیرهٔ کوکی نشست، مقالهٔ پیوندشده هنگام تایپ دیگران Overleaf را زنده دنبال می‌کند و ذخیره‌ها را مستقیماً برمی‌گرداند؛ تصویرها همچنان با همگام‌سازی کندتر Git جابه‌جا می‌شوند. کوکی overleaf_session2 را از مرورگری که به Overleaf وارد شده کپی کنید؛ با پایان آن ورود، کوکی هم از کار می‌افتد.",oGt=()=>"مع حفظ ملف تعريف ارتباط الجلسة، تتابع الورقة المرتبطة Overleaf أثناء كتابة الآخرين وترسل عمليات الحفظ مباشرةً. لا تزال الأشكال تُنقَل عبر مزامنة Git الأبطأ. انسخ ملف تعريف الارتباط overleaf_session2 من متصفح مسجّل الدخول إلى Overleaf؛ ويتوقف عن العمل عند انتهاء ذلك الدخول.",lGt=()=>"Con una cookie de sesión guardada, un paper vinculado sigue los cambios de Overleaf mientras se escribe y envía los guardados directamente. Las figuras siguen usando la sincronización por Git, más lenta. Copia la cookie overleaf_session2 de un navegador con la sesión de Overleaf iniciada; deja de funcionar cuando esa sesión termine.",cGt=()=>"सेशन कुकी सेव होने पर, एक लिंक किया गया पेपर लोगों के टाइप करते ही Overleaf को फ़ॉलो करता है और सेव सीधे वापस भेजता है। फ़िगर अभी भी धीमे Git सिंक पर चलती हैं। Overleaf में साइन इन ब्राउज़र से overleaf_session2 कुकी कॉपी करें; वह साइन-इन खत्म होने पर काम करना बंद कर देती है।",uGt=((e={},n={})=>{const t=n.locale??z();return t==="zh-CN"?iGt():t==="fa"?aGt():t==="ar"?oGt():t==="es"?lGt():t==="hi"?cGt():sGt()}),_Gt=()=>"Settings",fGt=()=>"设置",dGt=()=>"تنظیمات",hGt=()=>"الإعدادات",pGt=()=>"Configuración",mGt=()=>"सेटिंग्स",qk=((e={},n={})=>{const t=n.locale??z();return t==="zh-CN"?fGt():t==="fa"?dGt():t==="ar"?hGt():t==="es"?pGt():t==="hi"?mGt():_Gt()}),gGt=()=>"Signed in",vGt=()=>"已登录",bGt=()=>"وارد شده",yGt=()=>"تم تسجيل الدخول",xGt=()=>"Sesión iniciada",wGt=()=>"साइन इन है",kGt=((e={},n={})=>{const t=n.locale??z();return t==="zh-CN"?vGt():t==="fa"?bGt():t==="ar"?yGt():t==="es"?xGt():t==="hi"?wGt():gGt()}),SGt=()=>"Source",CGt=()=>"来源",EGt=()=>"منبع",NGt=()=>"المصدر",zGt=()=>"Origen",jGt=()=>"स्रोत",sL=((e={},n={})=>{const t=n.locale??z();return t==="zh-CN"?CGt():t==="fa"?EGt():t==="ar"?NGt():t==="es"?zGt():t==="hi"?jGt():SGt()}),TGt=()=>"SSH Key",AGt=()=>"SSH 密钥",RGt=()=>"کلید SSH",MGt=()=>"مفتاح SSH",OGt=()=>"Clave SSH",DGt=()=>"SSH की",LGt=((e={},n={})=>{const t=n.locale??z();return t==="zh-CN"?AGt():t==="fa"?RGt():t==="ar"?MGt():t==="es"?OGt():t==="hi"?DGt():TGt()}),IGt=()=>"Started",$Gt=()=>"开始时间",BGt=()=>"آغاز",PGt=()=>"بدأ",FGt=()=>"Inicio",HGt=()=>"शुरू हुआ",qGt=((e={},n={})=>{const t=n.locale??z();return t==="zh-CN"?$Gt():t==="fa"?BGt():t==="ar"?PGt():t==="es"?FGt():t==="hi"?HGt():IGt()}),UGt=()=>"State",GGt=()=>"状态",VGt=()=>"وضعیت",KGt=()=>"الحالة",WGt=()=>"Estado",QGt=()=>"स्थिति",XGt=((e={},n={})=>{const t=n.locale??z();return t==="zh-CN"?GGt():t==="fa"?VGt():t==="ar"?KGt():t==="es"?WGt():t==="hi"?QGt():UGt()}),YGt=()=>"Status",ZGt=()=>"状态",JGt=()=>"وضعیت",eVt=()=>"الحالة",tVt=()=>"Estado",nVt=()=>"स्थिति",vh=((e={},n={})=>{const t=n.locale??z();return t==="zh-CN"?ZGt():t==="fa"?JGt():t==="ar"?eVt():t==="es"?tVt():t==="hi"?nVt():YGt()}),rVt=()=>"Storage",sVt=()=>"存储",iVt=()=>"ذخیره‌سازی",aVt=()=>"التخزين",oVt=()=>"Almacenamiento",lVt=()=>"स्टोरेज",cVt=((e={},n={})=>{const t=n.locale??z();return t==="zh-CN"?sVt():t==="fa"?iVt():t==="ar"?aVt():t==="es"?oVt():t==="hi"?lVt():rVt()}),uVt=()=>"Sync",_Vt=()=>"同步",fVt=()=>"همگام‌سازی",dVt=()=>"مزامنة",hVt=()=>"Sincronización",pVt=()=>"सिंक",mVt=((e={},n={})=>{const t=n.locale??z();return t==="zh-CN"?_Vt():t==="fa"?fVt():t==="ar"?dVt():t==="es"?hVt():t==="hi"?pVt():uVt()}),gVt=()=>"Syncing off",vVt=()=>"同步已关闭",bVt=()=>"همگام‌سازی خاموش",yVt=()=>"المزامنة معطّلة",xVt=()=>"Sincronización desactivada",wVt=()=>"सिंकिंग बंद है",kVt=((e={},n={})=>{const t=n.locale??z();return t==="zh-CN"?vVt():t==="fa"?bVt():t==="ar"?yVt():t==="es"?xVt():t==="hi"?wVt():gVt()}),SVt=()=>"Test connection",CVt=()=>"测试连接",EVt=()=>"آزمایش اتصال",NVt=()=>"اختبار الاتصال",zVt=()=>"Probar conexión",jVt=()=>"कनेक्शन जाँचें",TVt=((e={},n={})=>{const t=n.locale??z();return t==="zh-CN"?CVt():t==="fa"?EVt():t==="ar"?NVt():t==="es"?zVt():t==="hi"?jVt():SVt()}),AVt=()=>"Testing…",RVt=()=>"正在测试…",MVt=()=>"در حال آزمایش…",OVt=()=>"جارٍ الاختبار…",DVt=()=>"Probando…",LVt=()=>"जाँचा जा रहा है…",IVt=((e={},n={})=>{const t=n.locale??z();return t==="zh-CN"?RVt():t==="fa"?MVt():t==="ar"?OVt():t==="es"?DVt():t==="hi"?LVt():AVt()}),$Vt=()=>", then add it with",BVt=()=>",然后使用以下命令添加:",PVt=()=>"، سپس با این فرمان اضافه‌اش کنید:",FVt=()=>"، ثم أضِفه عبر",HVt=()=>" y luego añádela con",qVt=()=>", फिर इसे इसके साथ जोड़ें",UVt=((e={},n={})=>{const t=n.locale??z();return t==="zh-CN"?BVt():t==="fa"?PVt():t==="ar"?FVt():t==="es"?HVt():t==="hi"?qVt():$Vt()}),GVt=()=>"This is useful when collaborators follow project changes on GitHub. New projects will enable syncing automatically, creating a private repository when needed and pushing experiment branches for visibility.",VVt=()=>"当协作者在 GitHub 上关注项目更改时,此功能很有用。新项目将自动启用同步,在需要时创建私有仓库,并推送实验分支以便查看。",KVt=()=>"وقتی همکاران تغییرات پروژه را در GitHub دنبال می‌کنند، این گزینه مفید است. پروژه‌های جدید همگام‌سازی را خودکار فعال می‌کنند، در صورت نیاز مخزن خصوصی می‌سازند و شاخه‌های آزمایش را برای دیده‌شدن push می‌کنند.",WVt=()=>"هذا مفيد عندما يتابع المتعاونون تغييرات المشروع على GitHub. ستفعّل المشاريع الجديدة المزامنة تلقائيًا، مع إنشاء مستودع خاص عند الحاجة ورفع فروع التجارب لإتاحة الاطلاع عليها.",QVt=()=>"Es útil cuando tus colaboradores siguen los cambios del proyecto en GitHub. Los proyectos nuevos activarán la sincronización automáticamente: se creará un repositorio privado cuando haga falta y se subirán las ramas de los experimentos para que sean visibles.",XVt=()=>"यह तब उपयोगी है जब सहयोगी GitHub पर प्रोजेक्ट के बदलावों को फ़ॉलो करते हों। नए प्रोजेक्ट में सिंकिंग अपने आप चालू हो जाएगी, ज़रूरत पड़ने पर एक निजी रिपॉज़िटरी बनेगी और प्रयोग ब्रांच दृश्यता के लिए पुश की जाएंगी।",YVt=((e={},n={})=>{const t=n.locale??z();return t==="zh-CN"?VVt():t==="fa"?KVt():t==="ar"?WVt():t==="es"?QVt():t==="hi"?XVt():GVt()}),ZVt=()=>"This saved destination is not configured. Set it up below or choose another backend.",JVt=()=>"已保存的目标尚未配置。请在下方完成设置或选择其他后端。",eKt=()=>"این مقصد ذخیره‌شده پیکربندی نشده است. آن را در پایین راه‌اندازی یا backend دیگری انتخاب کنید.",tKt=()=>"هذه الوجهة المحفوظة غير مُعدّة. أعِدّها أدناه أو اختر بيئة تنفيذ أخرى.",nKt=()=>"Este destino guardado no está configurado. Configúralo abajo o elige otro backend.",rKt=()=>"यह सेव किया गया गंतव्य कॉन्फ़िगर नहीं है। इसे नीचे सेट अप करें या कोई और बैकएंड चुनें।",sKt=((e={},n={})=>{const t=n.locale??z();return t==="zh-CN"?JVt():t==="fa"?eKt():t==="ar"?tKt():t==="es"?nKt():t==="hi"?rKt():ZVt()}),iKt=()=>"This value looks like a Hugging Face token — compute runs only read it from",aKt=()=>"此值看起来像 Hugging Face 令牌——算力运行只会从",oKt=()=>"این مقدار شبیه توکن Hugging Face است — اجراهای رایانشی آن را فقط از",lKt=()=>"تبدو هذه القيمة كرمز Hugging Face — لا تقرؤه عمليات التشغيل الحوسبية إلا من",cKt=()=>"Este valor parece un token de Hugging Face — las ejecuciones de cómputo solo lo leen de",uKt=()=>"यह वैल्यू एक Hugging Face टोकन जैसी लगती है — कंप्यूट रन इसे केवल यहाँ से पढ़ते हैं",_Kt=((e={},n={})=>{const t=n.locale??z();return t==="zh-CN"?aKt():t==="fa"?oKt():t==="ar"?lKt():t==="es"?cKt():t==="hi"?uKt():iKt()}),fKt=()=>"Time limit",dKt=()=>"时间限制",hKt=()=>"محدودیت زمانی",pKt=()=>"الحد الزمني",mKt=()=>"Límite de tiempo",gKt=()=>"समय सीमा",vKt=((e={},n={})=>{const t=n.locale??z();return t==="zh-CN"?dKt():t==="fa"?hKt():t==="ar"?pKt():t==="es"?mKt():t==="hi"?gKt():fKt()}),bKt=()=>"Unable to verify",yKt=()=>"无法验证",xKt=()=>"تأیید ممکن نیست",wKt=()=>"تعذّر التحقق",kKt=()=>"No se pudo verificar",SKt=()=>"सत्यापित नहीं हो सका",a3=((e={},n={})=>{const t=n.locale??z();return t==="zh-CN"?yKt():t==="fa"?xKt():t==="ar"?wKt():t==="es"?kKt():t==="hi"?SKt():bKt()}),CKt=()=>"Unknown",EKt=()=>"未知",NKt=()=>"نامشخص",zKt=()=>"غير معروف",jKt=()=>"Desconocido",TKt=()=>"अज्ञात",iL=((e={},n={})=>{const t=n.locale??z();return t==="zh-CN"?EKt():t==="fa"?NKt():t==="ar"?zKt():t==="es"?jKt():t==="hi"?TKt():CKt()}),AKt=()=>"Update required",RKt=()=>"需要更新",MKt=()=>"نیازمند به‌روزرسانی",OKt=()=>"مطلوب تحديث",DKt=()=>"Actualización necesaria",LKt=()=>"अपडेट ज़रूरी है",IKt=((e={},n={})=>{const t=n.locale??z();return t==="zh-CN"?RKt():t==="fa"?MKt():t==="ar"?OKt():t==="es"?DKt():t==="hi"?LKt():AKt()}),$Kt=()=>"Updates",BKt=()=>"更新",PKt=()=>"به‌روزرسانی‌ها",FKt=()=>"التحديثات",HKt=()=>"Actualizaciones",qKt=()=>"अपडेट",fz=((e={},n={})=>{const t=n.locale??z();return t==="zh-CN"?BKt():t==="fa"?PKt():t==="ar"?FKt():t==="es"?HKt():t==="hi"?qKt():$Kt()}),UKt=()=>"Usage analytics",GKt=()=>"使用情况分析",VKt=()=>"تحلیل استفاده",KKt=()=>"تحليلات الاستخدام",WKt=()=>"Estadísticas de uso",QKt=()=>"उपयोग एनालिटिक्स",XKt=((e={},n={})=>{const t=n.locale??z();return t==="zh-CN"?GKt():t==="fa"?VKt():t==="ar"?KKt():t==="es"?WKt():t==="hi"?QKt():UKt()}),YKt=()=>"value",ZKt=()=>"值",JKt=()=>"مقدار",eWt=()=>"القيمة",tWt=()=>"valor",nWt=()=>"वैल्यू",aL=((e={},n={})=>{const t=n.locale??z();return t==="zh-CN"?ZKt():t==="fa"?JKt():t==="ar"?eWt():t==="es"?tWt():t==="hi"?nWt():YKt()}),rWt=()=>"Variables available to runs and the research agent (API keys, tokens).",sWt=()=>"可供运行和研究智能体使用的变量(API 密钥、令牌)。",iWt=()=>"متغیرهای در دسترس اجراها و عامل پژوهشی (کلیدهای API، توکن‌ها).",aWt=()=>"متغيّرات متاحة لعمليات التشغيل ولوكيل البحث (مفاتيح API والرموز).",oWt=()=>"Variables disponibles para las ejecuciones y el agente de investigación (claves de API, tokens).",lWt=()=>"रन और शोध एजेंट के लिए उपलब्ध वेरिएबल (API की, टोकन)।",cWt=((e={},n={})=>{const t=n.locale??z();return t==="zh-CN"?sWt():t==="fa"?iWt():t==="ar"?aWt():t==="es"?oWt():t==="hi"?lWt():rWt()}),uWt=()=>"Version",_Wt=()=>"版本",fWt=()=>"نسخه",dWt=()=>"الإصدار",hWt=()=>"Versión",pWt=()=>"वर्शन",oL=((e={},n={})=>{const t=n.locale??z();return t==="zh-CN"?_Wt():t==="fa"?fWt():t==="ar"?dWt():t==="es"?hWt():t==="hi"?pWt():uWt()}),mWt=()=>"When enabled, each new project gets a private GitHub repository. Experiment branches are pushed automatically for collaborator visibility. Compute always uses direct source snapshots.",gWt=()=>"启用后,每个新项目都会获得一个私有 GitHub 仓库。实验分支会自动推送,便于协作者查看。算力执行始终使用直接的源代码快照。",vWt=()=>"با فعال شدن، هر پروژهٔ جدید یک مخزن خصوصی GitHub می‌گیرد. شاخه‌های آزمایش برای دیده‌شدن توسط همکاران خودکار push می‌شوند. رایانش همیشه از snapshot مستقیم منبع استفاده می‌کند.",bWt=()=>"عند التفعيل، يحصل كل مشروع جديد على مستودع GitHub خاص. تُرفع فروع التجارب تلقائيًا ليطّلع عليها المتعاونون. تستخدم الحوسبة دائمًا لقطات المصدر المباشرة.",yWt=()=>"Si se activa, cada proyecto nuevo tendrá un repositorio privado en GitHub. Las ramas de los experimentos se suben automáticamente para que las vean tus colaboradores. El cómputo siempre usa snapshots directos del código fuente.",xWt=()=>"चालू होने पर, हर नए प्रोजेक्ट को एक निजी GitHub रिपॉज़िटरी मिलती है। सहयोगी दृश्यता के लिए प्रयोग ब्रांच अपने आप पुश होती हैं। कंप्यूट हमेशा सीधे सोर्स स्नैपशॉट का उपयोग करता है।",wWt=((e={},n={})=>{const t=n.locale??z();return t==="zh-CN"?gWt():t==="fa"?vWt():t==="ar"?bWt():t==="es"?yWt():t==="hi"?xWt():mWt()}),kWt=()=>"With a token saved, a paper opened in the dashboard can be kept in step with an Overleaf project, in both directions. Overleaf's Git integration comes with a paid Overleaf plan; without one, a paper can still be uploaded to Overleaf as a new project. The token stays on this machine and is not sent to compute backends.",SWt=()=>"保存令牌后,可让控制台中打开的论文与 Overleaf 项目双向保持同步。Overleaf 的 Git 集成需要付费方案;没有付费方案时,仍可将论文作为新项目上传到 Overleaf。令牌仅保存在此计算机上,不会发送到算力后端。",CWt=()=>"با ذخیرهٔ توکن، مقاله‌ای که در داشبورد باز شده می‌تواند در هر دو جهت با یک پروژهٔ Overleaf همگام بماند. یکپارچه‌سازی Git در Overleaf به طرح پولی نیاز دارد؛ بدون آن هم می‌توان مقاله را به‌عنوان پروژه‌ای جدید در Overleaf بارگذاری کرد. توکن روی همین دستگاه می‌ماند و به backendهای رایانشی فرستاده نمی‌شود.",EWt=()=>"مع حفظ رمز، يمكن إبقاء ورقة مفتوحة في لوحة التحكم متزامنة مع مشروع Overleaf في الاتجاهين. يأتي تكامل Git في Overleaf مع خطة Overleaf مدفوعة؛ وبدونها لا يزال بالإمكان رفع ورقة إلى Overleaf كمشروع جديد. يبقى الرمز على هذا الجهاز ولا يُرسَل إلى بيئات التنفيذ.",NWt=()=>"Con un token guardado, un paper abierto en el dashboard puede mantenerse sincronizado con un proyecto de Overleaf en ambas direcciones. La integración con Git de Overleaf requiere un plan de pago; sin él, puedes seguir subiendo un paper a Overleaf como proyecto nuevo. El token se queda en este equipo y no se envía a los backends de cómputo.",zWt=()=>"टोकन सेव होने पर, डैशबोर्ड में खुला कोई पेपर दोनों दिशाओं में Overleaf प्रोजेक्ट के साथ मेल खाता रहता है। Overleaf का Git इंटीग्रेशन एक पेड Overleaf प्लान के साथ आता है; उसके बिना, एक पेपर को अब भी नए प्रोजेक्ट के रूप में Overleaf पर अपलोड किया जा सकता है। टोकन इसी मशीन पर रहता है और कंप्यूट बैकएंड को नहीं भेजा जाता।",jWt=((e={},n={})=>{const t=n.locale??z();return t==="zh-CN"?SWt():t==="fa"?CWt():t==="ar"?EWt():t==="es"?NWt():t==="hi"?zWt():kWt()}),TWt=()=>"Pick a login node first",AWt=()=>"请先选择登录节点",RWt=()=>"ابتدا یک گرهٔ ورود انتخاب کنید",MWt=()=>"اختر عقدة دخول أولًا",OWt=()=>"Elige primero un nodo de acceso",DWt=()=>"पहले एक लॉगिन नोड चुनें",LWt=((e={},n={})=>{const t=n.locale??z();return t==="zh-CN"?AWt():t==="fa"?RWt():t==="ar"?MWt():t==="es"?OWt():t==="hi"?DWt():TWt()}),IWt=()=>"Providers",$Wt=()=>"提供商",BWt=()=>"ارائه‌دهندگان",PWt=()=>"المزوّدون",FWt=()=>"Proveedores",HWt=()=>"प्रोवाइडर",qWt=((e={},n={})=>{const t=n.locale??z();return t==="zh-CN"?$Wt():t==="fa"?BWt():t==="ar"?PWt():t==="es"?FWt():t==="hi"?HWt():IWt()}),UWt=()=>"Reconnect",GWt=()=>"重新连接",VWt=()=>"اتصال دوباره",KWt=()=>"إعادة الاتصال",WWt=()=>"Reconectar",QWt=()=>"फिर से कनेक्ट करें",lL=((e={},n={})=>{const t=n.locale??z();return t==="zh-CN"?GWt():t==="fa"?VWt():t==="ar"?KWt():t==="es"?WWt():t==="hi"?QWt():UWt()}),XWt=e=>`Register this computer with ${e==null?void 0:e.register}, or load a registered key with ${e==null?void 0:e.load}.`,YWt=e=>`使用 ${e==null?void 0:e.register} 注册此计算机,或使用 ${e==null?void 0:e.load} 加载已注册的密钥。`,ZWt=e=>`این رایانه را با ${e==null?void 0:e.register} ثبت کنید، یا کلید ثبت‌شده را با ${e==null?void 0:e.load} بار کنید.`,JWt=e=>`سجّل هذا الحاسوب عبر ${e==null?void 0:e.register}، أو حمّل مفتاحًا مسجّلًا عبر ${e==null?void 0:e.load}.`,eQt=e=>`Registra este equipo con ${e==null?void 0:e.register} o carga una clave registrada con ${e==null?void 0:e.load}.`,tQt=e=>`इस कंप्यूटर को ${e==null?void 0:e.register} से रजिस्टर करें, या ${e==null?void 0:e.load} से एक रजिस्टर्ड की लोड करें।`,nQt=((e,n={})=>{const t=n.locale??z();return t==="zh-CN"?YWt(e):t==="fa"?ZWt(e):t==="ar"?JWt(e):t==="es"?eQt(e):t==="hi"?tQt(e):XWt(e)}),rQt=()=>"Reinstall with the orx installer to get automatic updates.",sQt=()=>"请使用 orx 安装程序重新安装,以获得自动更新。",iQt=()=>"برای دریافت به‌روزرسانی خودکار، با نصب‌کنندهٔ orx دوباره نصب کنید.",aQt=()=>"أعد التثبيت عبر مُثبّت orx للحصول على التحديثات التلقائية.",oQt=()=>"Reinstala con el instalador de orx para recibir actualizaciones automáticas.",lQt=()=>"ऑटोमैटिक अपडेट पाने के लिए orx इंस्टॉलर से फिर से इंस्टॉल करें।",cQt=((e={},n={})=>{const t=n.locale??z();return t==="zh-CN"?sQt():t==="fa"?iQt():t==="ar"?aQt():t==="es"?oQt():t==="hi"?lQt():rQt()}),uQt=()=>"Re-link",_Qt=()=>"重新链接",fQt=()=>"پیوند دوباره",dQt=()=>"إعادة الربط",hQt=()=>"Volver a enlazar",pQt=()=>"फिर से लिंक करें",mQt=((e={},n={})=>{const t=n.locale??z();return t==="zh-CN"?_Qt():t==="fa"?fQt():t==="ar"?dQt():t==="es"?hQt():t==="hi"?pQt():uQt()}),gQt=()=>"Remove cookie",vQt=()=>"移除 cookie",bQt=()=>"حذف کوکی",yQt=()=>"إزالة ملف تعريف الارتباط",xQt=()=>"Quitar cookie",wQt=()=>"कुकी हटाएं",kQt=((e={},n={})=>{const t=n.locale??z();return t==="zh-CN"?vQt():t==="fa"?bQt():t==="ar"?yQt():t==="es"?xQt():t==="hi"?wQt():gQt()}),SQt=()=>"Remove token",CQt=()=>"移除令牌",EQt=()=>"حذف توکن",NQt=()=>"إزالة الرمز",zQt=()=>"Quitar token",jQt=()=>"टोकन हटाएं",TQt=((e={},n={})=>{const t=n.locale??z();return t==="zh-CN"?CQt():t==="fa"?EQt():t==="ar"?NQt():t==="es"?zQt():t==="hi"?jQt():SQt()}),AQt=()=>"Removing…",RQt=()=>"正在移除…",MQt=()=>"در حال حذف…",OQt=()=>"جارٍ الإزالة…",DQt=()=>"Quitando…",LQt=()=>"हटाया जा रहा है…",dz=((e={},n={})=>{const t=n.locale??z();return t==="zh-CN"?RQt():t==="fa"?MQt():t==="ar"?OQt():t==="es"?DQt():t==="hi"?LQt():AQt()}),IQt=()=>"Replace anyway",$Qt=()=>"仍要替换",BQt=()=>"به‌هرحال جایگزین کن",PQt=()=>"الاستبدال على أي حال",FQt=()=>"Reemplazar de todos modos",HQt=()=>"फिर भी बदलें",qQt=((e={},n={})=>{const t=n.locale??z();return t==="zh-CN"?$Qt():t==="fa"?BQt():t==="ar"?PQt():t==="es"?FQt():t==="hi"?HQt():IQt()}),UQt=()=>"Replace key",GQt=()=>"替换密钥",VQt=()=>"جایگزینی کلید",KQt=()=>"استبدال المفتاح",WQt=()=>"Reemplazar clave",QQt=()=>"की बदलें",XQt=((e={},n={})=>{const t=n.locale??z();return t==="zh-CN"?GQt():t==="fa"?VQt():t==="ar"?KQt():t==="es"?WQt():t==="hi"?QQt():UQt()}),YQt=()=>"Replace token",ZQt=()=>"替换令牌",JQt=()=>"جایگزینی توکن",eXt=()=>"استبدال الرمز",tXt=()=>"Reemplazar token",nXt=()=>"टोकन बदलें",rXt=((e={},n={})=>{const t=n.locale??z();return t==="zh-CN"?ZQt():t==="fa"?JQt():t==="ar"?eXt():t==="es"?tXt():t==="hi"?nXt():YQt()}),sXt=e=>`Git and GitHub settings for ${e==null?void 0:e.project}. Local Git powers experiments; publishing is optional.`,iXt=e=>`${e==null?void 0:e.project} 的 Git 和 GitHub 设置。本地 Git 为实验提供支持;发布是可选的。`,aXt=e=>`تنظیمات Git و GitHub برای ${e==null?void 0:e.project}. Git محلی آزمایش‌ها را ممکن می‌کند؛ انتشار اختیاری است.`,oXt=e=>`إعدادات Git وGitHub لـ ${e==null?void 0:e.project}. تعتمد التجارب على Git المحلي؛ والنشر اختياري.`,lXt=e=>`Configuración de Git y GitHub de ${e==null?void 0:e.project}. Git local hace posibles los experimentos; publicar es opcional.`,cXt=e=>`${e==null?void 0:e.project} के लिए Git और GitHub सेटिंग्स। लोकल Git प्रयोगों को चलाता है; प्रकाशन वैकल्पिक है।`,uXt=((e,n={})=>{const t=n.locale??z();return t==="zh-CN"?iXt(e):t==="fa"?aXt(e):t==="ar"?oXt(e):t==="es"?lXt(e):t==="hi"?cXt(e):sXt(e)}),_Xt=e=>`Version ${e==null?void 0:e.installed} is installed. This window is still running ${e==null?void 0:e.current}.`,fXt=e=>`已安装版本 ${e==null?void 0:e.installed}。此窗口仍在运行 ${e==null?void 0:e.current}。`,dXt=e=>`نسخهٔ ${e==null?void 0:e.installed} نصب شده است. این پنجره هنوز نسخهٔ ${e==null?void 0:e.current} را اجرا می‌کند.`,hXt=e=>`الإصدار ${e==null?void 0:e.installed} مثبّت. لا تزال هذه النافذة تعمل بالإصدار ${e==null?void 0:e.current}.`,pXt=e=>`La versión ${e==null?void 0:e.installed} está instalada. Esta ventana sigue ejecutando la ${e==null?void 0:e.current}.`,mXt=e=>`वर्शन ${e==null?void 0:e.installed} इंस्टॉल है। यह विंडो अभी भी ${e==null?void 0:e.current} चला रही है।`,gXt=((e,n={})=>{const t=n.locale??z();return t==="zh-CN"?fXt(e):t==="fa"?dXt(e):t==="ar"?hXt(e):t==="es"?pXt(e):t==="hi"?mXt(e):_Xt(e)}),vXt=()=>"Run `gh auth login` in your terminal.",bXt=()=>"请在终端中运行 `gh auth login`。",yXt=()=>"در پایانه `gh auth login` را اجرا کنید.",xXt=()=>"نفّذ `gh auth login` في طرفيتك.",wXt=()=>"Ejecuta `gh auth login` en tu terminal.",kXt=()=>"अपने टर्मिनल में `gh auth login` चलाएं।",SXt=((e={},n={})=>{const t=n.locale??z();return t==="zh-CN"?bXt():t==="fa"?yXt():t==="ar"?xXt():t==="es"?wXt():t==="hi"?kXt():vXt()}),CXt=()=>"Saved",EXt=()=>"已保存",NXt=()=>"ذخیره شده",zXt=()=>"تم الحفظ",jXt=()=>"Guardado",TXt=()=>"सेव हो गया",hz=((e={},n={})=>{const t=n.locale??z();return t==="zh-CN"?EXt():t==="fa"?NXt():t==="ar"?zXt():t==="es"?jXt():t==="hi"?TXt():CXt()}),AXt=()=>"Set up",RXt=()=>"设置",MXt=()=>"راه‌اندازی",OXt=()=>"إعداد",DXt=()=>"Configurar",LXt=()=>"सेट अप करें",IXt=((e={},n={})=>{const t=n.locale??z();return t==="zh-CN"?RXt():t==="fa"?MXt():t==="ar"?OXt():t==="es"?DXt():t==="hi"?LXt():AXt()}),$Xt=()=>"Set up SSH key",BXt=()=>"设置 SSH 密钥",PXt=()=>"راه‌اندازی کلید SSH",FXt=()=>"إعداد مفتاح SSH",HXt=()=>"Configurar clave SSH",qXt=()=>"SSH की सेट अप करें",UXt=((e={},n={})=>{const t=n.locale??z();return t==="zh-CN"?BXt():t==="fa"?PXt():t==="ar"?FXt():t==="es"?HXt():t==="hi"?qXt():$Xt()}),GXt=()=>"Sign in",VXt=()=>"登录",KXt=()=>"ورود",WXt=()=>"تسجيل الدخول",QXt=()=>"Iniciar sesión",XXt=()=>"साइन इन करें",cL=((e={},n={})=>{const t=n.locale??z();return t==="zh-CN"?VXt():t==="fa"?KXt():t==="ar"?WXt():t==="es"?QXt():t==="hi"?XXt():GXt()}),YXt=e=>`SSH connection terminal for ${e==null?void 0:e.host}`,ZXt=e=>`${e==null?void 0:e.host} 的 SSH 连接终端`,JXt=e=>`پایانهٔ اتصال SSH برای ${e==null?void 0:e.host}`,eYt=e=>`طرفية اتصال SSH لـ ${e==null?void 0:e.host}`,tYt=e=>`Terminal de conexión SSH para ${e==null?void 0:e.host}`,nYt=e=>`${e==null?void 0:e.host} के लिए SSH कनेक्शन टर्मिनल`,uL=((e,n={})=>{const t=n.locale??z();return t==="zh-CN"?ZXt(e):t==="fa"?JXt(e):t==="ar"?eYt(e):t==="es"?tYt(e):t==="hi"?nYt(e):YXt(e)}),rYt=()=>"The local database, run logs, artifacts, and chat attachments. Moving this directory copies the entire store.",sYt=()=>"本地数据库、运行日志、产物和聊天附件。移动此目录会复制整个存储。",iYt=()=>"پایگاه دادهٔ محلی، گزارش اجراها، خروجی‌ها و پیوست‌های گفتگو. انتقال این پوشه، کل مخزن داده را کپی می‌کند.",aYt=()=>"قاعدة البيانات المحلية وسجلات التشغيل والمُخرَجات ومرفقات المحادثة. نقل هذا الدليل ينسخ المخزن بالكامل.",oYt=()=>"La base de datos local, los logs de las ejecuciones, los artefactos y los adjuntos de los chats. Mover este directorio copia todo el almacén.",lYt=()=>"लोकल डेटाबेस, रन लॉग, आर्टिफ़ैक्ट और चैट अटैचमेंट। इस डायरेक्टरी को स्थानांतरित करने पर पूरा स्टोर कॉपी होता है।",cYt=((e={},n={})=>{const t=n.locale??z();return t==="zh-CN"?sYt():t==="fa"?iYt():t==="ar"?aYt():t==="es"?oYt():t==="hi"?lYt():rYt()}),uYt=()=>"The terminal disconnected before setup completed. Try again.",_Yt=()=>"设置完成前终端连接已断开。请重试。",fYt=()=>"ارتباط ترمینال پیش از تکمیل راه‌اندازی قطع شد. دوباره تلاش کنید.",dYt=()=>"انقطعت الطرفية قبل اكتمال الإعداد. حاول مجددًا.",hYt=()=>"La terminal se desconectó antes de completar la configuración. Inténtalo de nuevo.",pYt=()=>"सेटअप पूरा होने से पहले टर्मिनल डिस्कनेक्ट हो गया। फिर से कोशिश करें।",bv=((e={},n={})=>{const t=n.locale??z();return t==="zh-CN"?_Yt():t==="fa"?fYt():t==="ar"?dYt():t==="es"?hYt():t==="hi"?pYt():uYt()}),mYt=()=>"Dark",gYt=()=>"深色",vYt=()=>"تیره",bYt=()=>"داكن",yYt=()=>"Oscuro",xYt=()=>"डार्क",wYt=((e={},n={})=>{const t=n.locale??z();return t==="zh-CN"?gYt():t==="fa"?vYt():t==="ar"?bYt():t==="es"?yYt():t==="hi"?xYt():mYt()}),kYt=()=>"Theme",SYt=()=>"主题",CYt=()=>"پوسته",EYt=()=>"السمة",NYt=()=>"Tema",zYt=()=>"थीम",pz=((e={},n={})=>{const t=n.locale??z();return t==="zh-CN"?SYt():t==="fa"?CYt():t==="ar"?EYt():t==="es"?NYt():t==="hi"?zYt():kYt()}),jYt=()=>"Light",TYt=()=>"浅色",AYt=()=>"روشن",RYt=()=>"فاتح",MYt=()=>"Claro",OYt=()=>"लाइट",DYt=((e={},n={})=>{const t=n.locale??z();return t==="zh-CN"?TYt():t==="fa"?AYt():t==="ar"?RYt():t==="es"?MYt():t==="hi"?OYt():jYt()}),LYt=()=>"System",IYt=()=>"系统",$Yt=()=>"سیستم",BYt=()=>"النظام",PYt=()=>"Sistema",FYt=()=>"सिस्टम",HYt=((e={},n={})=>{const t=n.locale??z();return t==="zh-CN"?IYt():t==="fa"?$Yt():t==="ar"?BYt():t==="es"?PYt():t==="hi"?FYt():LYt()}),qYt=()=>"Set up billing in the Tinker console",UYt=()=>"在 Tinker 控制台设置账单",GYt=()=>"تنظیم پرداخت در کنسول Tinker",VYt=()=>"أعِدّ الفوترة في وحدة تحكم Tinker",KYt=()=>"Configura la facturación en la consola de Tinker",WYt=()=>"Tinker कंसोल में बिलिंग सेट अप करें",QYt=((e={},n={})=>{const t=n.locale??z();return t==="zh-CN"?UYt():t==="fa"?GYt():t==="ar"?VYt():t==="es"?KYt():t==="hi"?WYt():qYt()}),XYt=()=>"Billing setup required",YYt=()=>"需要设置账单",ZYt=()=>"تنظیم پرداخت لازم است",JYt=()=>"مطلوب إعداد الفوترة",eZt=()=>"Hay que configurar la facturación",tZt=()=>"बिलिंग सेटअप ज़रूरी है",nZt=((e={},n={})=>{const t=n.locale??z();return t==="zh-CN"?YYt():t==="fa"?ZYt():t==="ar"?JYt():t==="es"?eZt():t==="hi"?tZt():XYt()}),rZt=()=>"TINKER_API_KEY is set in the process environment and overrides keys saved here. The status reflects that key.",sZt=()=>"进程环境中已设置 TINKER_API_KEY,它会覆盖此处保存的密钥。状态显示的是该密钥的检查结果。",iZt=()=>"متغیر TINKER_API_KEY در محیط فرایند تنظیم شده و بر کلیدهای ذخیره‌شده در اینجا اولویت دارد. وضعیت مربوط به همان کلید است.",aZt=()=>"‏TINKER_API_KEY مضبوط في بيئة العملية ويتجاوز المفاتيح المحفوظة هنا. تعكس الحالة ذلك المفتاح.",oZt=()=>"TINKER_API_KEY está definida en el entorno del proceso y tiene prioridad sobre las claves guardadas aquí. El estado corresponde a esa clave.",lZt=()=>"TINKER_API_KEY प्रोसेस एनवायरनमेंट में सेट है और यहाँ सेव की को ओवरराइड करता है। स्थिति उसी की को दर्शाती है।",cZt=((e={},n={})=>{const t=n.locale??z();return t==="zh-CN"?sZt():t==="fa"?iZt():t==="ar"?aZt():t==="es"?oZt():t==="hi"?lZt():rZt()}),uZt=()=>"Invalid Key",_Zt=()=>"密钥无效",fZt=()=>"کلید نامعتبر",dZt=()=>"مفتاح غير صالح",hZt=()=>"Clave no válida",pZt=()=>"अमान्य की",mZt=((e={},n={})=>{const t=n.locale??z();return t==="zh-CN"?_Zt():t==="fa"?fZt():t==="ar"?dZt():t==="es"?hZt():t==="hi"?pZt():uZt()}),gZt=()=>"Token from",vZt=()=>"令牌来自",bZt=()=>"توکن از",yZt=()=>"الرمز من",xZt=()=>"Token tomado de la",wZt=()=>"टोकन स्रोत",kZt=((e={},n={})=>{const t=n.locale??z();return t==="zh-CN"?vZt():t==="fa"?bZt():t==="ar"?yZt():t==="es"?xZt():t==="hi"?wZt():gZt()}),SZt=()=>"Update now",CZt=()=>"立即更新",EZt=()=>"اکنون به‌روزرسانی کن",NZt=()=>"التحديث الآن",zZt=()=>"Actualizar ahora",jZt=()=>"अभी अपडेट करें",TZt=((e={},n={})=>{const t=n.locale??z();return t==="zh-CN"?CZt():t==="fa"?EZt():t==="ar"?NZt():t==="es"?zZt():t==="hi"?jZt():SZt()}),AZt=e=>`Update to ${e==null?void 0:e.version}`,RZt=e=>`更新到 ${e==null?void 0:e.version}`,MZt=e=>`به‌روزرسانی به ${e==null?void 0:e.version}`,OZt=e=>`التحديث إلى ${e==null?void 0:e.version}`,DZt=e=>`Actualizar a ${e==null?void 0:e.version}`,LZt=e=>`वर्शन ${e==null?void 0:e.version} पर अपडेट करें`,IZt=((e,n={})=>{const t=n.locale??z();return t==="zh-CN"?RZt(e):t==="fa"?MZt(e):t==="ar"?OZt(e):t==="es"?DZt(e):t==="hi"?LZt(e):AZt(e)}),$Zt=()=>" Updates are switched off for this environment by ORX_NO_UPDATE_CHECK, so this setting has no effect.",BZt=()=>" 此环境已通过 ORX_NO_UPDATE_CHECK 关闭更新,因此此设置不会生效。",PZt=()=>" به‌روزرسانی در این محیط با ORX_NO_UPDATE_CHECK خاموش شده است؛ بنابراین این تنظیم اثری ندارد.",FZt=()=>" التحديثات معطّلة لهذه البيئة عبر ORX_NO_UPDATE_CHECK، لذا ليس لهذا الإعداد أثر.",HZt=()=>" ORX_NO_UPDATE_CHECK desactiva las actualizaciones en este entorno, así que este ajuste no tiene efecto.",qZt=()=>" इस एनवायरनमेंट के लिए ORX_NO_UPDATE_CHECK द्वारा अपडेट बंद कर दिए गए हैं, इसलिए इस सेटिंग का कोई असर नहीं है।",UZt=((e={},n={})=>{const t=n.locale??z();return t==="zh-CN"?BZt():t==="fa"?PZt():t==="ar"?FZt():t==="es"?HZt():t==="hi"?qZt():$Zt()}),GZt=()=>"Updating default destination…",VZt=()=>"正在更新默认运行位置…",KZt=()=>"در حال به‌روزرسانی مقصد پیش‌فرض…",WZt=()=>"جارٍ تحديث الوجهة الافتراضية…",QZt=()=>"Actualizando el destino predeterminado…",XZt=()=>"डिफ़ॉल्ट गंतव्य अपडेट हो रहा है…",YZt=((e={},n={})=>{const t=n.locale??z();return t==="zh-CN"?VZt():t==="fa"?KZt():t==="ar"?WZt():t==="es"?QZt():t==="hi"?XZt():GZt()}),ZZt=()=>"Use this repository for automatic experiment-branch pushes when your connected account can write to it. Otherwise, OpenResearch creates a separate private repository for collaboration.",JZt=()=>"当已连接的账户有写入权限时,使用此仓库自动推送实验分支。否则,OpenResearch 会另建一个私有仓库用于协作。",eJt=()=>"اگر حساب متصل اجازهٔ نوشتن داشته باشد، شاخه‌های آزمایش خودکار به این مخزن پوش می‌شوند. در غیر این صورت OpenResearch یک مخزن خصوصی جداگانه برای همکاری می‌سازد.",tJt=()=>"استخدم هذا المستودع لرفع فروع التجارب تلقائيًا عندما يملك حسابك المتصل صلاحية الكتابة فيه. وإلا، ينشئ OpenResearch مستودعًا خاصًا منفصلًا للتعاون.",nJt=()=>"Usar este repositorio para subir automáticamente las ramas de los experimentos si tu cuenta conectada tiene permiso de escritura. Si no, OpenResearch crea un repositorio privado aparte para colaborar.",rJt=()=>"जब आपका कनेक्टेड खाता इसमें लिख सकता है तो ऑटोमैटिक प्रयोग-ब्रांच पुश के लिए इस रिपॉज़िटरी का इस्तेमाल करें। नहीं तो, OpenResearch सहयोग के लिए एक अलग निजी रिपॉज़िटरी बनाता है।",sJt=((e={},n={})=>{const t=n.locale??z();return t==="zh-CN"?JZt():t==="fa"?eJt():t==="ar"?tJt():t==="es"?nJt():t==="hi"?rJt():ZZt()}),iJt=()=>"Validating…",aJt=()=>"正在验证…",oJt=()=>"در حال اعتبارسنجی…",lJt=()=>"جارٍ التحقق…",cJt=()=>"Validando…",uJt=()=>"सत्यापित हो रहा है…",_L=((e={},n={})=>{const t=n.locale??z();return t==="zh-CN"?aJt():t==="fa"?oJt():t==="ar"?lJt():t==="es"?cJt():t==="hi"?uJt():iJt()}),_Jt=()=>"View settings",fJt=()=>"查看设置",dJt=()=>"مشاهدهٔ تنظیمات",hJt=()=>"عرض الإعدادات",pJt=()=>"Ver configuración",mJt=()=>"सेटिंग्स देखें",gJt=((e={},n={})=>{const t=n.locale??z();return t==="zh-CN"?fJt():t==="fa"?dJt():t==="ar"?hJt():t==="es"?pJt():t==="hi"?mJt():_Jt()}),vJt=()=>"Skill",bJt=()=>"技能",yJt=()=>"مهارت",xJt=()=>"مهارة",wJt=()=>"Skill",kJt=()=>"स्किल",SJt=((e={},n={})=>{const t=n.locale??z();return t==="zh-CN"?bJt():t==="fa"?yJt():t==="ar"?xJt():t==="es"?wJt():t==="hi"?kJt():vJt()}),CJt=()=>"Loading skill…",EJt=()=>"正在加载技能…",NJt=()=>"در حال بارگیری مهارت…",zJt=()=>"جارٍ تحميل المهارة…",jJt=()=>"Cargando skill…",TJt=()=>"स्किल लोड हो रही है…",AJt=((e={},n={})=>{const t=n.locale??z();return t==="zh-CN"?EJt():t==="fa"?NJt():t==="ar"?zJt():t==="es"?jJt():t==="hi"?TJt():CJt()}),RJt=()=>"Personal",MJt=()=>"个人",OJt=()=>"شخصی",DJt=()=>"شخصي",LJt=()=>"Personal",IJt=()=>"व्यक्तिगत",$Jt=((e={},n={})=>{const t=n.locale??z();return t==="zh-CN"?MJt():t==="fa"?OJt():t==="ar"?DJt():t==="es"?LJt():t==="hi"?IJt():RJt()}),BJt=()=>"Alternatively, tell your agent to save a reusable skill for you.",PJt=()=>"或者,请你的智能体为你保存可重复使用的技能。",FJt=()=>"یا از عامل خود بخواهید یک مهارت قابل استفادهٔ مجدد برایتان ذخیره کند.",HJt=()=>"أو بدلًا من ذلك، اطلب من وكيلك حفظ مهارة قابلة لإعادة الاستخدام لك.",qJt=()=>"También puedes pedirle a tu agente que guarde una skill reutilizable por ti.",UJt=()=>"या अपने एजेंट से आपके लिए एक पुनः-प्रयोग करने योग्य स्किल सेव करने को कहें।",GJt=((e={},n={})=>{const t=n.locale??z();return t==="zh-CN"?PJt():t==="fa"?FJt():t==="ar"?HJt():t==="es"?qJt():t==="hi"?UJt():BJt()}),VJt=e=>`Delete the “${e==null?void 0:e.name}” skill?`,KJt=e=>`删除技能“${e==null?void 0:e.name}”?`,WJt=e=>`مهارت «${e==null?void 0:e.name}» حذف شود؟`,QJt=e=>`حذف مهارة «${e==null?void 0:e.name}»؟`,XJt=e=>`¿Eliminar la skill “${e==null?void 0:e.name}”?`,YJt=e=>`“${e==null?void 0:e.name}” स्किल हटाएं?`,ZJt=((e,n={})=>{const t=n.locale??z();return t==="zh-CN"?KJt(e):t==="fa"?WJt(e):t==="ar"?QJt(e):t==="es"?XJt(e):t==="hi"?YJt(e):VJt(e)}),JJt=e=>`Delete skill ${e==null?void 0:e.name}`,een=e=>`删除技能 ${e==null?void 0:e.name}`,ten=e=>`حذف مهارت ${e==null?void 0:e.name}`,nen=e=>`حذف المهارة ${e==null?void 0:e.name}`,ren=e=>`Eliminar la skill ${e==null?void 0:e.name}`,sen=e=>`${e==null?void 0:e.name} स्किल हटाएं`,ien=((e,n={})=>{const t=n.locale??z();return t==="zh-CN"?een(e):t==="fa"?ten(e):t==="ar"?nen(e):t==="es"?ren(e):t==="hi"?sen(e):JJt(e)}),aen=e=>`Delete the “${e==null?void 0:e.name}” template?`,oen=e=>`删除模板“${e==null?void 0:e.name}”?`,len=e=>`قالب «${e==null?void 0:e.name}» حذف شود؟`,cen=e=>`حذف قالب «${e==null?void 0:e.name}»؟`,uen=e=>`¿Eliminar la plantilla “${e==null?void 0:e.name}”?`,_en=e=>`“${e==null?void 0:e.name}” टेम्पलेट हटाएं?`,fen=((e,n={})=>{const t=n.locale??z();return t==="zh-CN"?oen(e):t==="fa"?len(e):t==="ar"?cen(e):t==="es"?uen(e):t==="hi"?_en(e):aen(e)}),den=e=>`Delete template ${e==null?void 0:e.name}`,hen=e=>`删除模板 ${e==null?void 0:e.name}`,pen=e=>`حذف قالب ${e==null?void 0:e.name}`,men=e=>`حذف القالب ${e==null?void 0:e.name}`,gen=e=>`Eliminar la plantilla ${e==null?void 0:e.name}`,ven=e=>`${e==null?void 0:e.name} टेम्पलेट हटाएं`,ben=((e,n={})=>{const t=n.locale??z();return t==="zh-CN"?hen(e):t==="fa"?pen(e):t==="ar"?men(e):t==="es"?gen(e):t==="hi"?ven(e):den(e)}),yen=()=>"Invoke skills with /name in chat. Skills from your coding agents are screened for research relevance before importing. Upload a skill to include it yourself. Alternatively, tell your OpenResearch agent to create and add a reusable skill for you.",xen=()=>"在聊天中使用 /name 调用技能。来自编程代理的技能会先经过研究相关性筛选,再导入。您也可以自行上传技能,或让 OpenResearch 代理为您创建并添加可复用技能。",wen=()=>"مهارت‌ها را با /name در گفتگو فراخوانی کنید. مهارت‌های عامل‌های برنامه‌نویسی پیش از وارد شدن از نظر ارتباط با پژوهش بررسی می‌شوند. می‌توانید مهارت را خودتان بارگذاری کنید یا از عامل OpenResearch بخواهید یک مهارت قابل استفادهٔ مجدد بسازد و اضافه کند.",ken=()=>"استدعِ المهارات عبر ‎/name‎ في المحادثة. تُفحَص مهارات وكلاء البرمجة لديك للتأكد من صلتها بالبحث قبل استيرادها. ارفع مهارة لتضمينها بنفسك. أو بدلًا من ذلك، اطلب من وكيل OpenResearch إنشاء مهارة قابلة لإعادة الاستخدام وإضافتها لك.",Sen=()=>"Usa las skills con /nombre en el chat. Las skills de tus agentes de programación se filtran según su relevancia para la investigación antes de importarlas. Sube una skill para incluirla tú mismo. También puedes pedirle a tu agente de OpenResearch que cree y añada una skill reutilizable por ti.",Cen=()=>"चैट में /नाम से स्किल इस्तेमाल करें। आपके कोडिंग एजेंटों की स्किल इंपोर्ट करने से पहले शोध प्रासंगिकता के लिए जाँची जाती हैं। खुद स्किल शामिल करने के लिए एक अपलोड करें। या अपने OpenResearch एजेंट से आपके लिए एक पुनः-प्रयोग करने योग्य स्किल बनाने और जोड़ने को कहें।",Een=((e={},n={})=>{const t=n.locale??z();return t==="zh-CN"?xen():t==="fa"?wen():t==="ar"?ken():t==="es"?Sen():t==="hi"?Cen():yen()}),Nen=()=>"Drop a SKILL.md or .zip here, or click to choose",zen=()=>"将 SKILL.md 或 .zip 拖放到此处,或点击选择",jen=()=>"یک فایل SKILL.md یا .zip را اینجا رها کنید، یا برای انتخاب کلیک کنید",Ten=()=>"أفلِت ملف ‎SKILL.md‎ أو ‎.zip‎ هنا، أو انقر للاختيار",Aen=()=>"Suelta aquí un SKILL.md o un .zip, o haz clic para elegirlo",Ren=()=>"यहाँ एक SKILL.md या .zip छोड़ें, या चुनने के लिए क्लिक करें",Men=((e={},n={})=>{const t=n.locale??z();return t==="zh-CN"?zen():t==="fa"?jen():t==="ar"?Ten():t==="es"?Aen():t==="hi"?Ren():Nen()}),Oen=()=>"Drop a .tex or .zip here, or click to choose",Den=()=>"将 .tex 或 .zip 拖放到此处,或点击选择",Len=()=>"یک فایل .tex یا .zip را اینجا رها کنید، یا برای انتخاب کلیک کنید",Ien=()=>"أفلِت ملف ‎.tex‎ أو ‎.zip‎ هنا، أو انقر للاختيار",$en=()=>"Suelta aquí un .tex o un .zip, o haz clic para elegirlo",Ben=()=>"यहाँ एक .tex या .zip छोड़ें, या चुनने के लिए क्लिक करें",Pen=((e={},n={})=>{const t=n.locale??z();return t==="zh-CN"?Den():t==="fa"?Len():t==="ar"?Ien():t==="es"?$en():t==="hi"?Ben():Oen()}),Fen=()=>"File too large (max 20 MB).",Hen=()=>"文件过大(最大 20 MB)。",qen=()=>"فایل بیش از حد بزرگ است (حداکثر ۲۰ مگابایت).",Uen=()=>"الملف كبير جدًا (بحد أقصى 20 ميغابايت).",Gen=()=>"Archivo demasiado grande (máx. 20 MB).",Ven=()=>"फ़ाइल बहुत बड़ी है (अधिकतम 20 MB)।",fL=((e={},n={})=>{const t=n.locale??z();return t==="zh-CN"?Hen():t==="fa"?qen():t==="ar"?Uen():t==="es"?Gen():t==="hi"?Ven():Fen()}),Ken=()=>" + 1 file",Wen=()=>" + 1 个文件",Qen=()=>" + ۱ فایل",Xen=()=>" + ملف واحد",Yen=()=>" + 1 archivo",Zen=()=>" + 1 फ़ाइल",Jen=((e={},n={})=>{const t=n.locale??z();return t==="zh-CN"?Wen():t==="fa"?Qen():t==="ar"?Xen():t==="es"?Yen():t==="hi"?Zen():Ken()}),etn=()=>"Customize the skills and LaTeX templates available across your projects. Upload them here, or ask an OpenResearch agent to create and add them for you.",ttn=()=>"自定义所有项目中可用的技能和 LaTeX 模板。在此上传,或让 OpenResearch 代理为您创建并添加。",ntn=()=>"مهارت‌ها و قالب‌های LaTeX قابل استفاده در همهٔ پروژه‌ها را سفارشی کنید. آن‌ها را اینجا بارگذاری کنید یا از عامل OpenResearch بخواهید برایتان بسازد و اضافه کند.",rtn=()=>"خصّص المهارات وقوالب LaTeX المتاحة عبر مشاريعك. ارفعها هنا، أو اطلب من وكيل OpenResearch إنشاءها وإضافتها لك.",stn=()=>"Personaliza las skills y plantillas de LaTeX disponibles en todos tus proyectos. Súbelas aquí o pídele a un agente de OpenResearch que las cree y las añada por ti.",itn=()=>"अपने प्रोजेक्ट में उपलब्ध स्किल और LaTeX टेम्पलेट कस्टमाइज़ करें। उन्हें यहाँ अपलोड करें, या किसी OpenResearch एजेंट से आपके लिए उन्हें बनाने और जोड़ने को कहें।",atn=((e={},n={})=>{const t=n.locale??z();return t==="zh-CN"?ttn():t==="fa"?ntn():t==="ar"?rtn():t==="es"?stn():t==="hi"?itn():etn()}),otn=()=>"Remove from OpenResearch",ltn=()=>"从 OpenResearch 移除",ctn=()=>"حذف از OpenResearch",utn=()=>"إزالة من OpenResearch",_tn=()=>"Quitar de OpenResearch",ftn=()=>"OpenResearch से हटाएं",dtn=((e={},n={})=>{const t=n.locale??z();return t==="zh-CN"?ltn():t==="fa"?ctn():t==="ar"?utn():t==="es"?_tn():t==="hi"?ftn():otn()}),htn=e=>`Remove “${e==null?void 0:e.name}” from OpenResearch? Its source files will remain in your coding agent.`,ptn=e=>`从 OpenResearch 移除“${e==null?void 0:e.name}”?源文件将保留在你的编程智能体中。`,mtn=e=>`«${e==null?void 0:e.name}» از OpenResearch حذف شود؟ فایل‌های اصلی در عامل برنامه‌نویسی شما باقی می‌مانند.`,gtn=e=>`إزالة «${e==null?void 0:e.name}» من OpenResearch؟ ستبقى ملفاتها المصدرية في وكيل البرمجة الخاص بك.`,vtn=e=>`¿Quitar “${e==null?void 0:e.name}” de OpenResearch? Sus archivos originales se conservarán en tu agente de programación.`,btn=e=>`“${e==null?void 0:e.name}” को OpenResearch से हटाएं? इसकी सोर्स फ़ाइलें आपके कोडिंग एजेंट में बनी रहेंगी।`,ytn=((e,n={})=>{const t=n.locale??z();return t==="zh-CN"?ptn(e):t==="fa"?mtn(e):t==="ar"?gtn(e):t==="es"?vtn(e):t==="hi"?btn(e):htn(e)}),xtn=e=>`Remove ${e==null?void 0:e.name} from OpenResearch`,wtn=e=>`从 OpenResearch 移除 ${e==null?void 0:e.name}`,ktn=e=>`حذف ${e==null?void 0:e.name} از OpenResearch`,Stn=e=>`إزالة ${e==null?void 0:e.name} من OpenResearch`,Ctn=e=>`Quitar ${e==null?void 0:e.name} de OpenResearch`,Etn=e=>`${e==null?void 0:e.name} को OpenResearch से हटाएं`,Ntn=((e,n={})=>{const t=n.locale??z();return t==="zh-CN"?wtn(e):t==="fa"?ktn(e):t==="ar"?Stn(e):t==="es"?Ctn(e):t==="hi"?Etn(e):xtn(e)}),ztn=e=>` + ${e==null?void 0:e.count} files`,jtn=e=>` + ${e==null?void 0:e.count} 个文件`,Ttn=e=>` + ${e==null?void 0:e.count} فایل`,Atn=e=>` + ملفات (${e==null?void 0:e.count})`,Rtn=e=>` + ${e==null?void 0:e.count} archivos`,Mtn=e=>` + ${e==null?void 0:e.count} फ़ाइलें`,Otn=((e,n={})=>{const t=n.locale??z();return t==="zh-CN"?jtn(e):t==="fa"?Ttn(e):t==="ar"?Atn(e):t==="es"?Rtn(e):t==="hi"?Mtn(e):ztn(e)}),Dtn=()=>"Could not load skills:",Ltn=()=>"无法加载技能:",Itn=()=>"بارگیری مهارت‌ها ممکن نشد:",$tn=()=>"تعذّر تحميل المهارات:",Btn=()=>"No se pudieron cargar las skills:",Ptn=()=>"स्किल लोड नहीं हो सकीं:",Ftn=((e={},n={})=>{const t=n.locale??z();return t==="zh-CN"?Ltn():t==="fa"?Itn():t==="ar"?$tn():t==="es"?Btn():t==="hi"?Ptn():Dtn()}),Htn=()=>"Could not load templates:",qtn=()=>"无法加载模板:",Utn=()=>"بارگیری قالب‌ها ممکن نشد:",Gtn=()=>"تعذّر تحميل القوالب:",Vtn=()=>"No se pudieron cargar las plantillas:",Ktn=()=>"टेम्पलेट लोड नहीं हो सके:",Wtn=((e={},n={})=>{const t=n.locale??z();return t==="zh-CN"?qtn():t==="fa"?Utn():t==="ar"?Gtn():t==="es"?Vtn():t==="hi"?Ktn():Htn()}),Qtn=()=>"Customize",Xtn=()=>"自定义",Ytn=()=>"سفارشی‌سازی",Ztn=()=>"تخصيص",Jtn=()=>"Personalizar",enn=()=>"कस्टमाइज़ करें",tnn=((e={},n={})=>{const t=n.locale??z();return t==="zh-CN"?Xtn():t==="fa"?Ytn():t==="ar"?Ztn():t==="es"?Jtn():t==="hi"?enn():Qtn()}),nnn=()=>"Delete skill",rnn=()=>"删除技能",snn=()=>"حذف مهارت",inn=()=>"حذف المهارة",ann=()=>"Eliminar skill",onn=()=>"स्किल हटाएं",lnn=((e={},n={})=>{const t=n.locale??z();return t==="zh-CN"?rnn():t==="fa"?snn():t==="ar"?inn():t==="es"?ann():t==="hi"?onn():nnn()}),cnn=()=>"Delete template",unn=()=>"删除模板",_nn=()=>"حذف قالب",fnn=()=>"حذف القالب",dnn=()=>"Eliminar plantilla",hnn=()=>"टेम्पलेट हटाएं",pnn=((e={},n={})=>{const t=n.locale??z();return t==="zh-CN"?unn():t==="fa"?_nn():t==="ar"?fnn():t==="es"?dnn():t==="hi"?hnn():cnn()}),mnn=()=>"LaTeX templates",gnn=()=>"LaTeX 模板",vnn=()=>"قالب‌های LaTeX",bnn=()=>"قوالب LaTeX",ynn=()=>"Plantillas de LaTeX",xnn=()=>"LaTeX टेम्पलेट",wnn=((e={},n={})=>{const t=n.locale??z();return t==="zh-CN"?gnn():t==="fa"?vnn():t==="ar"?bnn():t==="es"?ynn():t==="hi"?xnn():mnn()}),knn=()=>"Loading skills…",Snn=()=>"正在加载技能…",Cnn=()=>"در حال بارگیری مهارت‌ها…",Enn=()=>"جارٍ تحميل المهارات…",Nnn=()=>"Cargando skills…",znn=()=>"स्किल लोड हो रही हैं…",jnn=((e={},n={})=>{const t=n.locale??z();return t==="zh-CN"?Snn():t==="fa"?Cnn():t==="ar"?Enn():t==="es"?Nnn():t==="hi"?znn():knn()}),Tnn=()=>"Loading templates…",Ann=()=>"正在加载模板…",Rnn=()=>"در حال بارگیری قالب‌ها…",Mnn=()=>"جارٍ تحميل القوالب…",Onn=()=>"Cargando plantillas…",Dnn=()=>"टेम्पलेट लोड हो रहे हैं…",Lnn=((e={},n={})=>{const t=n.locale??z();return t==="zh-CN"?Ann():t==="fa"?Rnn():t==="ar"?Mnn():t==="es"?Onn():t==="hi"?Dnn():Tnn()}),Inn=()=>"No skills yet.",$nn=()=>"尚无技能。",Bnn=()=>"هنوز مهارتی وجود ندارد.",Pnn=()=>"لا توجد مهارات بعد.",Fnn=()=>"Aún no hay skills.",Hnn=()=>"अभी तक कोई स्किल नहीं।",qnn=((e={},n={})=>{const t=n.locale??z();return t==="zh-CN"?$nn():t==="fa"?Bnn():t==="ar"?Pnn():t==="es"?Fnn():t==="hi"?Hnn():Inn()}),Unn=()=>"No templates yet.",Gnn=()=>"尚无模板。",Vnn=()=>"هنوز قالبی وجود ندارد.",Knn=()=>"لا توجد قوالب بعد.",Wnn=()=>"Aún no hay plantillas.",Qnn=()=>"अभी तक कोई टेम्पलेट नहीं।",Xnn=((e={},n={})=>{const t=n.locale??z();return t==="zh-CN"?Gnn():t==="fa"?Vnn():t==="ar"?Knn():t==="es"?Wnn():t==="hi"?Qnn():Unn()}),Ynn=()=>"Skills",Znn=()=>"技能",Jnn=()=>"مهارت‌ها",ern=()=>"المهارات",trn=()=>"Skills",nrn=()=>"स्किल",rrn=((e={},n={})=>{const t=n.locale??z();return t==="zh-CN"?Znn():t==="fa"?Jnn():t==="ar"?ern():t==="es"?trn():t==="hi"?nrn():Ynn()}),srn=()=>"Uploading…",irn=()=>"正在上传…",arn=()=>"در حال بارگذاری…",orn=()=>"جارٍ الرفع…",lrn=()=>"Subiendo…",crn=()=>"अपलोड हो रहा है…",urn=((e={},n={})=>{const t=n.locale??z();return t==="zh-CN"?irn():t==="fa"?arn():t==="ar"?orn():t==="es"?lrn():t==="hi"?crn():srn()}),_rn=()=>"A conference class or house style the agent writes papers into instead of its default preamble. Upload a .tex file or a .zip containing its .cls and .sty files. Alternatively, tell your OpenResearch agent to create and add a LaTeX template for you. With exactly one template available, the agent uses it without asking.",frn=()=>"代理撰写论文时使用的会议格式或自定义样式,用于替代默认导言区。上传 .tex 文件或包含 .cls 和 .sty 文件的 .zip 压缩包,也可以让 OpenResearch 代理为您创建并添加 LaTeX 模板。只有一个模板可用时,代理会直接使用,无需询问。",drn=()=>"قالب کنفرانس یا سبک اختصاصی که عامل به‌جای پیش‌گفتار پیش‌فرض برای نوشتن مقاله استفاده می‌کند. یک فایل .tex یا فایل .zip شامل فایل‌های .cls و .sty بارگذاری کنید، یا از عامل OpenResearch بخواهید قالب LaTeX بسازد و اضافه کند. اگر تنها یک قالب موجود باشد، عامل بدون پرسش از آن استفاده می‌کند.",hrn=()=>"قالب مؤتمر أو تنسيق خاص بالمؤسسة يستخدمه الوكيل لكتابة الأوراق بدلًا من إعدادات LaTeX الافتراضية. ارفع ملف ‎.tex‎ أو ملف ‎.zip‎ يحتوي على ملفات ‎.cls‎ و‎.sty‎ الخاصة به. أو اطلب من وكيل OpenResearch إنشاء قالب LaTeX وإضافته لك. عند توفّر قالب واحد فقط، يستخدمه الوكيل دون سؤال.",prn=()=>"Un estilo de congreso o de la casa en el que el agente escribe los papers en lugar de usar su preámbulo predeterminado. Sube un archivo .tex o un .zip con sus archivos .cls y .sty. También puedes pedirle a tu agente de OpenResearch que cree y añada una plantilla de LaTeX por ti. Si solo hay una plantilla disponible, el agente la usa sin preguntar.",mrn=()=>"एक कॉन्फ़्रेंस क्लास या हाउस स्टाइल जिसमें एजेंट अपने डिफ़ॉल्ट प्रीएंबल की बजाय पेपर लिखता है। एक .tex फ़ाइल या उसकी .cls और .sty फ़ाइलों वाली .zip अपलोड करें। या अपने OpenResearch एजेंट से आपके लिए एक LaTeX टेम्पलेट बनाने और जोड़ने को कहें। ठीक एक टेम्पलेट उपलब्ध होने पर, एजेंट बिना पूछे उसी का इस्तेमाल करता है।",grn=((e={},n={})=>{const t=n.locale??z();return t==="zh-CN"?frn():t==="fa"?drn():t==="ar"?hrn():t==="es"?prn():t==="hi"?mrn():_rn()}),vrn=()=>"Upload a SKILL.md file or a .zip of a skill folder.",brn=()=>"请上传 SKILL.md 文件或技能文件夹的 .zip 压缩包。",yrn=()=>"یک فایل SKILL.md یا فایل .zip از پوشهٔ مهارت بارگذاری کنید.",xrn=()=>"ارفع ملف ‎SKILL.md‎ أو ملف ‎.zip‎ لمجلد مهارة.",wrn=()=>"Sube un archivo SKILL.md o un .zip con la carpeta de la skill.",krn=()=>"एक SKILL.md फ़ाइल या स्किल फ़ोल्डर की .zip अपलोड करें।",Srn=((e={},n={})=>{const t=n.locale??z();return t==="zh-CN"?brn():t==="fa"?yrn():t==="ar"?xrn():t==="es"?wrn():t==="hi"?krn():vrn()}),Crn=()=>"Upload a .tex file or a .zip of a template folder.",Ern=()=>"请上传 .tex 文件或模板文件夹的 .zip 压缩包。",Nrn=()=>"یک فایل .tex یا فایل .zip از پوشهٔ قالب بارگذاری کنید.",zrn=()=>"ارفع ملف ‎.tex‎ أو ملف ‎.zip‎ لمجلد قالب.",jrn=()=>"Sube un archivo .tex o un .zip con la carpeta de la plantilla.",Trn=()=>"एक .tex फ़ाइल या टेम्पलेट फ़ोल्डर की .zip अपलोड करें।",Arn=((e={},n={})=>{const t=n.locale??z();return t==="zh-CN"?Ern():t==="fa"?Nrn():t==="ar"?zrn():t==="es"?jrn():t==="hi"?Trn():Crn()}),Rrn=()=>"Close SSH config",Mrn=()=>"关闭 SSH 配置",Orn=()=>"بستن پیکربندی SSH",Drn=()=>"إغلاق إعداد SSH",Lrn=()=>"Cerrar la configuración SSH",Irn=()=>"SSH कॉन्फ़िग बंद करें",$rn=((e={},n={})=>{const t=n.locale??z();return t==="zh-CN"?Mrn():t==="fa"?Orn():t==="ar"?Drn():t==="es"?Lrn():t==="hi"?Irn():Rrn()}),Brn=()=>"Discard your unsaved SSH config changes?",Prn=()=>"要放弃未保存的 SSH 配置更改吗?",Frn=()=>"تغییرات ذخیره‌نشدهٔ پیکربندی SSH کنار گذاشته شود؟",Hrn=()=>"تجاهل تغييرات إعداد SSH غير المحفوظة؟",qrn=()=>"¿Descartar los cambios sin guardar en la configuración SSH?",Urn=()=>"आपके सेव न किए गए SSH कॉन्फ़िग बदलाव छोड़ें?",Grn=((e={},n={})=>{const t=n.locale??z();return t==="zh-CN"?Prn():t==="fa"?Frn():t==="ar"?Hrn():t==="es"?qrn():t==="hi"?Urn():Brn()}),Vrn=()=>"Loading SSH config…",Krn=()=>"正在加载 SSH 配置…",Wrn=()=>"در حال بارگیری پیکربندی SSH…",Qrn=()=>"جارٍ تحميل إعداد SSH…",Xrn=()=>"Cargando la configuración SSH…",Yrn=()=>"SSH कॉन्फ़िग लोड हो रहा है…",Zrn=((e={},n={})=>{const t=n.locale??z();return t==="zh-CN"?Krn():t==="fa"?Wrn():t==="ar"?Qrn():t==="es"?Xrn():t==="hi"?Yrn():Vrn()}),Jrn=()=>"SSH config saved",esn=()=>"SSH 配置已保存",tsn=()=>"پیکربندی SSH ذخیره شد",nsn=()=>"تم حفظ إعداد SSH",rsn=()=>"Configuración SSH guardada",ssn=()=>"SSH कॉन्फ़िग सेव हो गया",isn=((e={},n={})=>{const t=n.locale??z();return t==="zh-CN"?esn():t==="fa"?tsn():t==="ar"?nsn():t==="es"?rsn():t==="hi"?ssn():Jrn()}),asn=()=>"SSH config",osn=()=>"SSH 配置",lsn=()=>"پیکربندی SSH",csn=()=>"إعداد SSH",usn=()=>"Configuración SSH",_sn=()=>"SSH कॉन्फ़िग",fsn=((e={},n={})=>{const t=n.locale??z();return t==="zh-CN"?osn():t==="fa"?lsn():t==="ar"?csn():t==="es"?usn():t==="hi"?_sn():asn()}),dsn=()=>"Configure SSH hosts…",hsn=()=>"配置 SSH 主机…",psn=()=>"پیکربندی میزبان‌های SSH…",msn=()=>"إعداد مضيفات SSH…",gsn=()=>"Configurar hosts SSH…",vsn=()=>"SSH होस्ट कॉन्फ़िगर करें…",dL=((e={},n={})=>{const t=n.locale??z();return t==="zh-CN"?hsn():t==="fa"?psn():t==="ar"?msn():t==="es"?gsn():t==="hi"?vsn():dsn()}),bsn=()=>"Container name or ID",ysn=()=>"容器名称或 ID",xsn=()=>"نام یا شناسهٔ کانتینر",wsn=()=>"اسم الحاوية أو معرّفها",ksn=()=>"Nombre o ID del contenedor",Ssn=()=>"कंटेनर का नाम या ID",Csn=((e={},n={})=>{const t=n.locale??z();return t==="zh-CN"?ysn():t==="fa"?xsn():t==="ar"?wsn():t==="es"?ksn():t==="hi"?Ssn():bsn()}),Esn=()=>"Default SSH host",Nsn=()=>"默认 SSH 主机",zsn=()=>"میزبان پیش‌فرض SSH",jsn=()=>"مضيف SSH الافتراضي",Tsn=()=>"Servidor SSH predeterminado",Asn=()=>"डिफ़ॉल्ट SSH होस्ट",Rsn=((e={},n={})=>{const t=n.locale??z();return t==="zh-CN"?Nsn():t==="fa"?zsn():t==="ar"?jsn():t==="es"?Tsn():t==="hi"?Asn():Esn()}),Msn=()=>"Direct host",Osn=()=>"直接在主机上",Dsn=()=>"مستقیماً روی میزبان",Lsn=()=>"المضيف مباشرة",Isn=()=>"Servidor directamente",$sn=()=>"सीधे होस्ट पर",Bsn=((e={},n={})=>{const t=n.locale??z();return t==="zh-CN"?Osn():t==="fa"?Dsn():t==="ar"?Lsn():t==="es"?Isn():t==="hi"?$sn():Msn()}),Psn=()=>"Existing container",Fsn=()=>"现有容器",Hsn=()=>"کانتینر موجود",qsn=()=>"حاوية موجودة",Usn=()=>"Contenedor existente",Gsn=()=>"मौजूदा कंटेनर",Vsn=((e={},n={})=>{const t=n.locale??z();return t==="zh-CN"?Fsn():t==="fa"?Hsn():t==="ar"?qsn():t==="es"?Usn():t==="hi"?Gsn():Psn()}),Ksn=()=>"Run in",Wsn=()=>"运行位置",Qsn=()=>"اجرا در",Xsn=()=>"التشغيل في",Ysn=()=>"Ejecutar en",Zsn=()=>"यहाँ चलाएँ",Jsn=((e={},n={})=>{const t=n.locale??z();return t==="zh-CN"?Wsn():t==="fa"?Qsn():t==="ar"?Xsn():t==="es"?Ysn():t==="hi"?Zsn():Ksn()}),ein=()=>"Cancelled",tin=()=>"已取消",nin=()=>"لغوشده",rin=()=>"ملغى",sin=()=>"Cancelado",iin=()=>"रद्द किया गया",ain=((e={},n={})=>{const t=n.locale??z();return t==="zh-CN"?tin():t==="fa"?nin():t==="ar"?rin():t==="es"?sin():t==="hi"?iin():ein()}),oin=()=>"Cancelling",lin=()=>"正在取消",cin=()=>"در حال لغو",uin=()=>"جارٍ الإلغاء",_in=()=>"Cancelando",fin=()=>"रद्द हो रहा है",din=((e={},n={})=>{const t=n.locale??z();return t==="zh-CN"?lin():t==="fa"?cin():t==="ar"?uin():t==="es"?_in():t==="hi"?fin():oin()}),hin=()=>"Done",pin=()=>"已完成",min=()=>"انجام‌شده",gin=()=>"تم",vin=()=>"Completado",bin=()=>"पूरा हुआ",hL=((e={},n={})=>{const t=n.locale??z();return t==="zh-CN"?pin():t==="fa"?min():t==="ar"?gin():t==="es"?vin():t==="hi"?bin():hin()}),yin=()=>"Editing",xin=()=>"正在编辑",win=()=>"در حال ویرایش",kin=()=>"قيد التعديل",Sin=()=>"Editando",Cin=()=>"संपादित हो रहा है",Ein=((e={},n={})=>{const t=n.locale??z();return t==="zh-CN"?xin():t==="fa"?win():t==="ar"?kin():t==="es"?Sin():t==="hi"?Cin():yin()}),Nin=()=>"Failed",zin=()=>"失败",jin=()=>"ناموفق",Tin=()=>"فشل",Ain=()=>"Error",Rin=()=>"विफल",Min=((e={},n={})=>{const t=n.locale??z();return t==="zh-CN"?zin():t==="fa"?jin():t==="ar"?Tin():t==="es"?Ain():t==="hi"?Rin():Nin()}),Oin=()=>"Idle",Din=()=>"空闲",Lin=()=>"بی‌کار",Iin=()=>"خامل",$in=()=>"Inactivo",Bin=()=>"निष्क्रिय",Pin=((e={},n={})=>{const t=n.locale??z();return t==="zh-CN"?Din():t==="fa"?Lin():t==="ar"?Iin():t==="es"?$in():t==="hi"?Bin():Oin()}),Fin=()=>"Running",Hin=()=>"运行中",qin=()=>"در حال اجرا",Uin=()=>"قيد التشغيل",Gin=()=>"En ejecución",Vin=()=>"चल रहा है",Kin=((e={},n={})=>{const t=n.locale??z();return t==="zh-CN"?Hin():t==="fa"?qin():t==="ar"?Uin():t==="es"?Gin():t==="hi"?Vin():Fin()}),Win=()=>"Starting",Qin=()=>"正在启动",Xin=()=>"در حال آغاز",Yin=()=>"جارٍ البدء",Zin=()=>"Iniciando",Jin=()=>"शुरू हो रहा है",ean=((e={},n={})=>{const t=n.locale??z();return t==="zh-CN"?Qin():t==="fa"?Xin():t==="ar"?Yin():t==="es"?Zin():t==="hi"?Jin():Win()}),tan=()=>"Copying…",nan=()=>"正在复制…",ran=()=>"در حال کپی…",san=()=>"جارٍ النسخ…",ian=()=>"Copiando…",aan=()=>"कॉपी हो रहा है…",oan=((e={},n={})=>{const t=n.locale??z();return t==="zh-CN"?nan():t==="fa"?ran():t==="ar"?san():t==="es"?ian():t==="hi"?aan():tan()}),lan=()=>"Finalizing…",can=()=>"正在完成…",uan=()=>"در حال نهایی‌سازی…",_an=()=>"جارٍ الإنهاء…",fan=()=>"Finalizando…",dan=()=>"अंतिम रूप दिया जा रहा है…",han=((e={},n={})=>{const t=n.locale??z();return t==="zh-CN"?can():t==="fa"?uan():t==="ar"?_an():t==="es"?fan():t==="hi"?dan():lan()}),pan=e=>`${e==null?void 0:e.size} free at target`,man=e=>`目标位置可用空间 ${e==null?void 0:e.size}`,gan=e=>`${e==null?void 0:e.size} فضای آزاد در مقصد`,van=e=>`${e==null?void 0:e.size} متاح في الوجهة`,ban=e=>`${e==null?void 0:e.size} libres en el destino`,yan=e=>`गंतव्य पर ${e==null?void 0:e.size} खाली`,xan=((e,n={})=>{const t=n.locale??z();return t==="zh-CN"?man(e):t==="fa"?gan(e):t==="ar"?van(e):t==="es"?ban(e):t==="hi"?yan(e):pan(e)}),wan=e=>`Move all orx data to: ${e==null?void 0:e.path} -The store is copied to the new location and activated there. Active runs or chats will block the move.`,Hin=e=>`将所有 orx 数据移动到: +The store is copied to the new location and activated there. Active runs or chats will block the move.`,kan=e=>`将所有 orx 数据移动到: ${e==null?void 0:e.path} -存储内容会复制到新位置并在那里启用。活跃的运行或聊天会阻止移动。`,qin=e=>`همهٔ داده‌های orx به این محل منتقل شوند؟ +存储内容会复制到新位置并在那里启用。活跃的运行或聊天会阻止移动。`,San=e=>`همهٔ داده‌های orx به این محل منتقل شوند؟ ${e==null?void 0:e.path} -مخزن داده به محل جدید کپی و همان‌جا فعال می‌شود. اجراها یا گفتگوهای فعال مانع انتقال خواهند شد.`,Uin=e=>`نقل كل بيانات orx إلى: +مخزن داده به محل جدید کپی و همان‌جا فعال می‌شود. اجراها یا گفتگوهای فعال مانع انتقال خواهند شد.`,Can=e=>`نقل كل بيانات orx إلى: ${e==null?void 0:e.path} -يُنسَخ المخزن إلى الموقع الجديد ويُفعَّل هناك. ستمنع عمليات التشغيل أو المحادثات النشطة النقل.`,Gin=e=>`¿Mover todos los datos de orx a esta ubicación? +يُنسَخ المخزن إلى الموقع الجديد ويُفعَّل هناك. ستمنع عمليات التشغيل أو المحادثات النشطة النقل.`,Ean=e=>`¿Mover todos los datos de orx a esta ubicación? ${e==null?void 0:e.path} -El almacén se copia a la nueva ubicación y se activa allí. Si hay ejecuciones o chats activos, no se podrá mover.`,Vin=e=>`सारा orx डेटा यहाँ ले जाएं: +El almacén se copia a la nueva ubicación y se activa allí. Si hay ejecuciones o chats activos, no se podrá mover.`,Nan=e=>`सारा orx डेटा यहाँ ले जाएं: ${e==null?void 0:e.path} -स्टोर की एक कॉपी नए स्थान पर बनाई जाएगी और वहीं सक्रिय की जाएगी। सक्रिय रन या चैट स्थानांतरण को रोक सकते हैं।`,Kin=((e,n={})=>{const t=n.locale??z();return t==="zh-CN"?Hin(e):t==="fa"?qin(e):t==="ar"?Uin(e):t==="es"?Gin(e):t==="hi"?Vin(e):Fin(e)}),Win=()=>"Move data here",Qin=()=>"将数据移动到此处",Xin=()=>"انتقال داده به اینجا",Yin=()=>"نقل البيانات إلى هنا",Zin=()=>"Mover los datos aquí",Jin=()=>"डेटा यहाँ ले जाएं",ean=((e={},n={})=>{const t=n.locale??z();return t==="zh-CN"?Qin():t==="fa"?Xin():t==="ar"?Yin():t==="es"?Zin():t==="hi"?Jin():Win()}),tan=()=>"Moving…",nan=()=>"正在移动…",ran=()=>"در حال جابه‌جایی…",san=()=>"جارٍ النقل…",ian=()=>"Moviendo…",aan=()=>"स्थानांतरित हो रहा है…",oan=((e={},n={})=>{const t=n.locale??z();return t==="zh-CN"?nan():t==="fa"?ran():t==="ar"?san():t==="es"?ian():t==="hi"?aan():tan()}),lan=()=>"Preparing…",can=()=>"正在准备…",uan=()=>"در حال آماده‌سازی…",_an=()=>"جارٍ التحضير…",fan=()=>"Preparando…",dan=()=>"तैयार हो रहा है…",han=((e={},n={})=>{const t=n.locale??z();return t==="zh-CN"?can():t==="fa"?uan():t==="ar"?_an():t==="es"?fan():t==="hi"?dan():lan()}),pan=()=>" (same disk, instant)",man=()=>"(同一磁盘,可立即完成)",gan=()=>" (روی همان دیسک، فوری)",van=()=>" (القرص نفسه، فوري)",ban=()=>" (mismo disco, instantáneo)",yan=()=>" (उसी डिस्क पर, तुरंत)",xan=((e={},n={})=>{const t=n.locale??z();return t==="zh-CN"?man():t==="fa"?gan():t==="ar"?van():t==="es"?ban():t==="hi"?yan():pan()}),wan=()=>"default location",kan=()=>"默认位置",San=()=>"محل پیش‌فرض",Can=()=>"الموقع الافتراضي",Ean=()=>"ubicación predeterminada",Nan=()=>"डिफ़ॉल्ट स्थान",zan=((e={},n={})=>{const t=n.locale??z();return t==="zh-CN"?kan():t==="fa"?San():t==="ar"?Can():t==="es"?Ean():t==="hi"?Nan():wan()}),jan=()=>"ORX_DATA_DIR environment variable",Tan=()=>"ORX_DATA_DIR 环境变量",Aan=()=>"متغیر محیطی ORX_DATA_DIR",Ran=()=>"متغيّر البيئة ORX_DATA_DIR",Man=()=>"variable de entorno ORX_DATA_DIR",Oan=()=>"ORX_DATA_DIR एनवायरनमेंट वेरिएबल",Dan=((e={},n={})=>{const t=n.locale??z();return t==="zh-CN"?Tan():t==="fa"?Aan():t==="ar"?Ran():t==="es"?Man():t==="hi"?Oan():jan()}),Lan=()=>"your saved setting",Ian=()=>"已保存的设置",$an=()=>"تنظیم ذخیره‌شدهٔ شما",Ban=()=>"إعدادك المحفوظ",Pan=()=>"tu ajuste guardado",Fan=()=>"आपकी सेव की गई सेटिंग",Han=((e={},n={})=>{const t=n.locale??z();return t==="zh-CN"?Ian():t==="fa"?$an():t==="ar"?Ban():t==="es"?Pan():t==="hi"?Fan():Lan()}),qan=()=>"XDG_DATA_HOME",Uan=()=>"XDG_DATA_HOME",Gan=()=>"XDG_DATA_HOME",Van=()=>"XDG_DATA_HOME",Kan=()=>"XDG_DATA_HOME",Wan=()=>"XDG_DATA_HOME",Qan=((e={},n={})=>{const t=n.locale??z();return t==="zh-CN"?Uan():t==="fa"?Gan():t==="ar"?Van():t==="es"?Kan():t==="hi"?Wan():qan()}),Xan=()=>"Verifying…",Yan=()=>"正在验证…",Zan=()=>"در حال بررسی…",Jan=()=>"جارٍ التحقق…",eon=()=>"Verificando…",ton=()=>"सत्यापित हो रहा है…",non=((e={},n={})=>{const t=n.locale??z();return t==="zh-CN"?Yan():t==="fa"?Zan():t==="ar"?Jan():t==="es"?eon():t==="hi"?ton():Xan()}),ron=()=>"Loading…",son=()=>"正在加载…",ion=()=>"در حال بارگیری…",aon=()=>"جارٍ التحميل…",oon=()=>"Cargando…",lon=()=>"लोड हो रहा है…",con=((e={},n={})=>{const t=n.locale??z();return t==="zh-CN"?son():t==="fa"?ion():t==="ar"?aon():t==="es"?oon():t==="hi"?lon():ron()}),uon=()=>"This sub-agent is no longer available.",_on=()=>"此子智能体已不可用。",fon=()=>"این عامل فرعی دیگر در دسترس نیست.",don=()=>"لم يعد هذا الوكيل الفرعي متاحًا.",hon=()=>"Este subagente ya no está disponible.",pon=()=>"यह सब-एजेंट अब उपलब्ध नहीं है।",mon=((e={},n={})=>{const t=n.locale??z();return t==="zh-CN"?_on():t==="fa"?fon():t==="ar"?don():t==="es"?hon():t==="hi"?pon():uon()}),gon=e=>`${e==null?void 0:e.label} (preview; double-click or Command/Control K, then Enter to keep open)`,von=e=>`${e==null?void 0:e.label}(预览;双击或按 Command/Control K 后按 Enter 以保持打开)`,bon=e=>`${e==null?void 0:e.label} (پیش‌نمایش؛ برای باز نگه‌داشتن دوبار کلیک کنید یا Command/Control K و سپس Enter را بزنید)`,yon=e=>`${e==null?void 0:e.label} (معاينة؛ انقر نقرًا مزدوجًا أو Command/Control K ثم Enter لإبقائه مفتوحًا)`,xon=e=>`${e==null?void 0:e.label} (vista previa; doble clic o Comando/Control K y luego Intro para mantenerla abierta)`,won=e=>`${e==null?void 0:e.label} (प्रीव्यू; खुला रखने के लिए डबल-क्लिक करें या Command/Control K, फिर Enter दबाएं)`,kon=((e,n={})=>{const t=n.locale??z();return t==="zh-CN"?von(e):t==="fa"?bon(e):t==="ar"?yon(e):t==="es"?xon(e):t==="hi"?won(e):gon(e)}),Son=e=>`${e==null?void 0:e.label} (double-click or ⌘/Ctrl+K Enter to keep open)`,Con=e=>`${e==null?void 0:e.label}(双击或按 ⌘/Ctrl+K 后按 Enter 以保持打开)`,Eon=e=>`${e==null?void 0:e.label} (برای باز نگه‌داشتن دوبار کلیک کنید یا ⌘/Ctrl+K و سپس Enter را بزنید)`,Non=e=>`${e==null?void 0:e.label} (انقر نقرًا مزدوجًا أو ⌘/Ctrl+K ثم Enter لإبقائه مفتوحًا)`,zon=e=>`${e==null?void 0:e.label} (doble clic o ⌘/Ctrl+K Intro para mantenerla abierta)`,jon=e=>`${e==null?void 0:e.label} (खुला रखने के लिए डबल-क्लिक करें या ⌘/Ctrl+K फिर Enter दबाएं)`,Ton=((e,n={})=>{const t=n.locale??z();return t==="zh-CN"?Con(e):t==="fa"?Eon(e):t==="ar"?Non(e):t==="es"?zon(e):t==="hi"?jon(e):Son(e)}),Aon=()=>"Alternatively, tell your agent to add a LaTeX template for you.",Ron=()=>"或者,请你的智能体为你添加 LaTeX 模板。",Mon=()=>"یا از عامل خود بخواهید یک قالب LaTeX برایتان اضافه کند.",Oon=()=>"أو بدلًا من ذلك، اطلب من وكيلك إضافة قالب LaTeX لك.",Don=()=>"También puedes pedirle a tu agente que añada una plantilla de LaTeX por ti.",Lon=()=>"या अपने एजेंट से आपके लिए एक LaTeX टेम्पलेट जोड़ने को कहें।",Ion=((e={},n={})=>{const t=n.locale??z();return t==="zh-CN"?Ron():t==="fa"?Mon():t==="ar"?Oon():t==="es"?Don():t==="hi"?Lon():Aon()}),$on=()=>", a repo for training a mini-GPT from scratch.",Bon=()=>",一个从零训练迷你 GPT 的仓库。",Pon=()=>"، اثر Andrej Karpathy، مخزنی برای آموزش یک GPT کوچک از صفر، استفاده می‌کند.",Fon=()=>" لأندريه كارباثي، المخصّص لتدريب نموذج mini-GPT من الصفر.",Hon=()=>" de Andrej Karpathy, un repositorio para entrenar un mini-GPT desde cero.",qon=()=>", स्क्रैच से एक मिनी-GPT ट्रेन करने के लिए एक रिपॉज़िटरी।",Uon=((e={},n={})=>{const t=n.locale??z();return t==="zh-CN"?Bon():t==="fa"?Pon():t==="ar"?Fon():t==="es"?Hon():t==="hi"?qon():$on()}),Gon=()=>"Close",Von=()=>"关闭",Kon=()=>"بستن",Won=()=>"إغلاق",Qon=()=>"Cerrar",Xon=()=>"बंद करें",o3=((e={},n={})=>{const t=n.locale??z();return t==="zh-CN"?Von():t==="fa"?Kon():t==="ar"?Won():t==="es"?Qon():t==="hi"?Xon():Gon()}),Yon=()=>"Create a new project",Zon=()=>"新建项目",Jon=()=>"ایجاد پروژهٔ جدید",eln=()=>"إنشاء مشروع جديد",tln=()=>"Crear un proyecto nuevo",nln=()=>"नया प्रोजेक्ट बनाएं",rln=((e={},n={})=>{const t=n.locale??z();return t==="zh-CN"?Zon():t==="fa"?Jon():t==="ar"?eln():t==="es"?tln():t==="hi"?nln():Yon()}),sln=()=>"Demo project",iln=()=>"演示项目",aln=()=>"پروژهٔ نمایشی",oln=()=>"مشروع توضيحي",lln=()=>"Proyecto de demostración",cln=()=>"डेमो प्रोजेक्ट",uln=((e={},n={})=>{const t=n.locale??z();return t==="zh-CN"?iln():t==="fa"?aln():t==="ar"?oln():t==="es"?lln():t==="hi"?cln():sln()}),_ln=()=>"Look through the agent conversations, experiments, runs, and artifacts to see how a project on OpenResearch comes together.",fln=()=>"浏览智能体对话、实验、运行和产物,了解 OpenResearch 项目是如何形成的。",dln=()=>"گفتگوهای عامل، آزمایش‌ها، اجراها و خروجی‌ها را ببینید تا با شکل‌گیری یک پروژه در OpenResearch آشنا شوید.",hln=()=>"تصفّح محادثات الوكيل والتجارب وعمليات التشغيل والمُخرَجات لترى كيف يتشكّل مشروع على OpenResearch.",pln=()=>"Explora las conversaciones con el agente, los experimentos, las ejecuciones y los artefactos para ver cómo se construye un proyecto en OpenResearch.",mln=()=>"यह देखने के लिए एजेंट बातचीत, प्रयोग, रन और आर्टिफ़ैक्ट देखें कि OpenResearch पर एक प्रोजेक्ट कैसे आकार लेता है।",gln=((e={},n={})=>{const t=n.locale??z();return t==="zh-CN"?fln():t==="fa"?dln():t==="ar"?hln():t==="es"?pln():t==="hi"?mln():_ln()}),vln=()=>"nanochat",bln=()=>"nanochat",yln=()=>"nanochat",xln=()=>"nanochat",wln=()=>"nanochat",kln=()=>"nanochat",Sln=((e={},n={})=>{const t=n.locale??z();return t==="zh-CN"?bln():t==="fa"?yln():t==="ar"?xln():t==="es"?wln():t==="hi"?kln():vln()}),Cln=()=>"Try the demo experiment",Eln=()=>"试试演示实验",Nln=()=>"آزمایش نمایشی را امتحان کنید",zln=()=>"جرّب التجربة التوضيحية",jln=()=>"Probar el experimento de demostración",Tln=()=>"डेमो प्रयोग आज़माएं",Aln=((e={},n={})=>{const t=n.locale??z();return t==="zh-CN"?Eln():t==="fa"?Nln():t==="ar"?zln():t==="es"?jln():t==="hi"?Tln():Cln()}),Rln=()=>"Couldn’t save your progress. Try again.",Mln=()=>"无法保存进度。请重试。",Oln=()=>"ذخیرهٔ پیشرفت ممکن نشد. دوباره تلاش کنید.",Dln=()=>"تعذّر حفظ تقدّمك. حاول مجددًا.",Lln=()=>"No se pudo guardar tu progreso. Inténtalo de nuevo.",Iln=()=>"आपकी प्रगति सेव नहीं हो सकी। फिर से कोशिश करें।",$ln=((e={},n={})=>{const t=n.locale??z();return t==="zh-CN"?Mln():t==="fa"?Oln():t==="ar"?Dln():t==="es"?Lln():t==="hi"?Iln():Rln()}),Bln=()=>"This is a demo project showing how OpenResearch works. This demo uses Andrej Karpathy's",Pln=()=>"这是一个展示 OpenResearch 工作方式的演示项目。本演示使用 Andrej Karpathy 的",Fln=()=>"این پروژهٔ نمایشی نحوهٔ کار OpenResearch را نشان می‌دهد. این نسخهٔ نمایشی از",Hln=()=>"هذا مشروع توضيحي يبيّن كيف يعمل OpenResearch. يستخدم هذا العرض مستودع",qln=()=>"Este es un proyecto de demostración que muestra cómo funciona OpenResearch. Esta demo usa",Uln=()=>"यह एक डेमो प्रोजेक्ट है जो दिखाता है कि OpenResearch कैसे काम करता है। यह डेमो Andrej Karpathy के",Gln=((e={},n={})=>{const t=n.locale??z();return t==="zh-CN"?Pln():t==="fa"?Fln():t==="ar"?Hln():t==="es"?qln():t==="hi"?Uln():Bln()}),Vln=()=>"Welcome to OpenResearch",Kln=()=>"欢迎使用 OpenResearch",Wln=()=>"به OpenResearch خوش آمدید",Qln=()=>"مرحبًا بك في OpenResearch",Xln=()=>"Te damos la bienvenida a OpenResearch",Yln=()=>"OpenResearch में आपका स्वागत है",Zln=((e={},n={})=>{const t=n.locale??z();return t==="zh-CN"?Kln():t==="fa"?Wln():t==="ar"?Qln():t==="es"?Xln():t==="hi"?Yln():Vln()}),Jln=()=>"Baseline",ecn=()=>"基线",tcn=()=>"مبنا",ncn=()=>"الأساس",rcn=()=>"Base",scn=()=>"बेसलाइन",icn=((e={},n={})=>{const t=n.locale??z();return t==="zh-CN"?ecn():t==="fa"?tcn():t==="ar"?ncn():t==="es"?rcn():t==="hi"?scn():Jln()}),acn=()=>"Experiment",ocn=()=>"实验",lcn=()=>"آزمایش",ccn=()=>"تجربة",ucn=()=>"Experimento",_cn=()=>"प्रयोग",Bl=((e={},n={})=>{const t=n.locale??z();return t==="zh-CN"?ocn():t==="fa"?lcn():t==="ar"?ccn():t==="es"?ucn():t==="hi"?_cn():acn()}),fcn=e=>`${e==null?void 0:e.count} experiments`,dcn=e=>`${e==null?void 0:e.count} 个实验`,hcn=e=>`${e==null?void 0:e.count} آزمایش`,pcn=e=>`التجارب: ${e==null?void 0:e.count}`,mcn=e=>`${e==null?void 0:e.count} experimentos`,gcn=e=>`${e==null?void 0:e.count} प्रयोग`,vcn=((e,n={})=>{const t=n.locale??z();return t==="zh-CN"?dcn(e):t==="fa"?hcn(e):t==="ar"?pcn(e):t==="es"?mcn(e):t==="hi"?gcn(e):fcn(e)}),bcn=()=>"1 experiment",ycn=()=>"1 个实验",xcn=()=>"۱ آزمایش",wcn=()=>"تجربة واحدة",kcn=()=>"1 experimento",Scn=()=>"1 प्रयोग",Ccn=((e={},n={})=>{const t=n.locale??z();return t==="zh-CN"?ycn():t==="fa"?xcn():t==="ar"?wcn():t==="es"?kcn():t==="hi"?Scn():bcn()}),Ecn=()=>"Running",Ncn=()=>"运行中",zcn=()=>"در حال اجرا",jcn=()=>"قيد التشغيل",Tcn=()=>"En ejecución",Acn=()=>"चल रहा है",Rcn=((e={},n={})=>{const t=n.locale??z();return t==="zh-CN"?Ncn():t==="fa"?zcn():t==="ar"?jcn():t==="es"?Tcn():t==="hi"?Acn():Ecn()}),Mcn=()=>"Ask in this task to create one, or switch to Entire project to see all experiments.",Ocn=()=>"在此任务中请求创建实验,或切换到“整个项目”查看所有实验。",Dcn=()=>"در این وظیفه بخواهید یکی ساخته شود، یا برای دیدن همهٔ آزمایش‌ها به «کل پروژه» بروید.",Lcn=()=>"اطلب في هذه المهمة إنشاء واحدة، أو بدّل إلى «المشروع بالكامل» لرؤية جميع التجارب.",Icn=()=>"Pide en esta tarea que se cree uno, o cambia a Todo el proyecto para ver todos los experimentos.",$cn=()=>"इस टास्क में एक बनाने को कहें, या सभी प्रयोग देखने के लिए पूरा प्रोजेक्ट पर स्विच करें।",Bcn=((e={},n={})=>{const t=n.locale??z();return t==="zh-CN"?Ocn():t==="fa"?Dcn():t==="ar"?Lcn():t==="es"?Icn():t==="hi"?$cn():Mcn()}),Pcn=()=>"Ask the agent in chat to create and run your first experiment.",Fcn=()=>"在聊天中让智能体创建并运行你的第一个实验。",Hcn=()=>"در گفتگو از عامل بخواهید نخستین آزمایش شما را بسازد و اجرا کند.",qcn=()=>"اطلب من الوكيل في المحادثة إنشاء أول تجربة لك وتشغيلها.",Ucn=()=>"Pídele al agente en el chat que cree y ejecute tu primer experimento.",Gcn=()=>"एजेंट से चैट में अपना पहला प्रयोग बनाने और चलाने को कहें।",Vcn=((e={},n={})=>{const t=n.locale??z();return t==="zh-CN"?Fcn():t==="fa"?Hcn():t==="ar"?qcn():t==="es"?Ucn():t==="hi"?Gcn():Pcn()}),Kcn=()=>"Code",Wcn=()=>"代码",Qcn=()=>"کد",Xcn=()=>"الشيفرة",Ycn=()=>"Código",Zcn=()=>"कोड",Jcn=((e={},n={})=>{const t=n.locale??z();return t==="zh-CN"?Wcn():t==="fa"?Qcn():t==="ar"?Xcn():t==="es"?Ycn():t==="hi"?Zcn():Kcn()}),eun=()=>"Logs",tun=()=>"日志",nun=()=>"گزارش‌ها",run=()=>"السجلات",sun=()=>"Logs",iun=()=>"लॉग",dL=((e={},n={})=>{const t=n.locale??z();return t==="zh-CN"?tun():t==="fa"?nun():t==="ar"?run():t==="es"?sun():t==="hi"?iun():eun()}),aun=()=>"No experiments from the current task yet",oun=()=>"当前任务尚无实验",lun=()=>"وظیفهٔ فعلی هنوز آزمایشی ندارد",cun=()=>"لا توجد تجارب من المهمة الحالية بعد",uun=()=>"Aún no hay experimentos de la tarea actual",_un=()=>"मौजूदा टास्क से अभी तक कोई प्रयोग नहीं",fun=((e={},n={})=>{const t=n.locale??z();return t==="zh-CN"?oun():t==="fa"?lun():t==="ar"?cun():t==="es"?uun():t==="hi"?_un():aun()}),dun=()=>"No experiments yet",hun=()=>"尚无实验",pun=()=>"هنوز آزمایشی وجود ندارد",mun=()=>"لا توجد تجارب بعد",gun=()=>"Aún no hay experimentos",vun=()=>"अभी तक कोई प्रयोग नहीं",bun=((e={},n={})=>{const t=n.locale??z();return t==="zh-CN"?hun():t==="fa"?pun():t==="ar"?mun():t==="es"?gun():t==="hi"?vun():dun()}),yun=()=>"no runs",xun=()=>"无运行",wun=()=>"بدون اجرا",kun=()=>"لا عمليات تشغيل",Sun=()=>"sin ejecuciones",Cun=()=>"कोई रन नहीं",Eun=((e={},n={})=>{const t=n.locale??z();return t==="zh-CN"?xun():t==="fa"?wun():t==="ar"?kun():t==="es"?Sun():t==="hi"?Cun():yun()}),Nun=()=>"Open logs",zun=()=>"打开日志",jun=()=>"باز کردن گزارش‌ها",Tun=()=>"فتح السجلات",Aun=()=>"Abrir logs",Run=()=>"लॉग खोलें",Mun=((e={},n={})=>{const t=n.locale??z();return t==="zh-CN"?zun():t==="fa"?jun():t==="ar"?Tun():t==="es"?Aun():t==="hi"?Run():Nun()}),Oun=()=>"other tasks",Dun=()=>"其他任务",Lun=()=>"وظایف دیگر",Iun=()=>"مهام أخرى",$un=()=>"otras tareas",Bun=()=>"अन्य टास्क",Pun=((e={},n={})=>{const t=n.locale??z();return t==="zh-CN"?Dun():t==="fa"?Lun():t==="ar"?Iun():t==="es"?$un():t==="hi"?Bun():Oun()}),Fun=()=>"Runs",Hun=()=>"运行",qun=()=>"اجراها",Uun=()=>"عمليات التشغيل",Gun=()=>"Ejecuciones",Vun=()=>"रन",Kun=((e={},n={})=>{const t=n.locale??z();return t==="zh-CN"?Hun():t==="fa"?qun():t==="ar"?Uun():t==="es"?Gun():t==="hi"?Vun():Fun()}),Wun=()=>"Switch to Entire project to see all experiments",Qun=()=>"切换到“整个项目”以查看所有实验",Xun=()=>"برای دیدن همهٔ آزمایش‌ها به «کل پروژه» بروید",Yun=()=>"بدّل إلى «المشروع بالكامل» لرؤية جميع التجارب",Zun=()=>"Cambia a Todo el proyecto para ver todos los experimentos",Jun=()=>"सभी प्रयोग देखने के लिए पूरा प्रोजेक्ट पर स्विच करें",e_n=((e={},n={})=>{const t=n.locale??z();return t==="zh-CN"?Qun():t==="fa"?Xun():t==="ar"?Yun():t==="es"?Zun():t==="hi"?Jun():Wun()}),t_n=e=>`Updated to ${e==null?void 0:e.version}. Restart to use it.`,n_n=e=>`已更新到 ${e==null?void 0:e.version}。重新启动即可使用。`,r_n=e=>`به ${e==null?void 0:e.version} به‌روزرسانی شد. برای استفاده دوباره راه‌اندازی کنید.`,s_n=e=>`تم التحديث إلى ${e==null?void 0:e.version}. أعد التشغيل لاستخدامه.`,i_n=e=>`Actualizado a la versión ${e==null?void 0:e.version}. Reinicia para usarla.`,a_n=e=>`${e==null?void 0:e.version} पर अपडेट हुआ। इस्तेमाल के लिए फिर से शुरू करें।`,o_n=((e,n={})=>{const t=n.locale??z();return t==="zh-CN"?n_n(e):t==="fa"?r_n(e):t==="ar"?s_n(e):t==="es"?i_n(e):t==="hi"?a_n(e):t_n(e)}),l_n=()=>"Dismiss",c_n=()=>"关闭",u_n=()=>"بستن",__n=()=>"تجاهل",f_n=()=>"Descartar",d_n=()=>"खारिज करें",h_n=((e={},n={})=>{const t=n.locale??z();return t==="zh-CN"?c_n():t==="fa"?u_n():t==="ar"?__n():t==="es"?f_n():t==="hi"?d_n():l_n()}),p_n=()=>"Restart now",m_n=()=>"立即重新启动",g_n=()=>"هم‌اکنون دوباره راه‌اندازی کن",v_n=()=>"أعد التشغيل الآن",b_n=()=>"Reiniciar ahora",y_n=()=>"अभी फिर से शुरू करें",hL=((e={},n={})=>{const t=n.locale??z();return t==="zh-CN"?m_n():t==="fa"?g_n():t==="ar"?v_n():t==="es"?b_n():t==="hi"?y_n():p_n()}),x_n=e=>`Could not restart: ${e==null?void 0:e.error}`,w_n=e=>`无法重新启动:${e==null?void 0:e.error}`,k_n=e=>`راه‌اندازی مجدد ممکن نشد: ${e==null?void 0:e.error}`,S_n=e=>`تعذّرت إعادة التشغيل: ${e==null?void 0:e.error}`,C_n=e=>`No se pudo reiniciar: ${e==null?void 0:e.error}`,E_n=e=>`फिर से शुरू नहीं हो सका: ${e==null?void 0:e.error}`,pL=((e,n={})=>{const t=n.locale??z();return t==="zh-CN"?w_n(e):t==="fa"?k_n(e):t==="ar"?S_n(e):t==="es"?C_n(e):t==="hi"?E_n(e):x_n(e)}),N_n=()=>"The updated OpenResearch did not come back in time. Restart it by hand.",z_n=()=>"更新后的 OpenResearch 未能及时恢复。请手动重新启动。",j_n=()=>"OpenResearch به‌روزشده به‌موقع برنگشت. آن را به‌صورت دستی دوباره راه‌اندازی کنید.",T_n=()=>"لم يعد OpenResearch المحدَّث في الوقت المناسب. أعد تشغيله يدويًا.",A_n=()=>"La nueva versión de OpenResearch no se inició a tiempo. Reinícialo manualmente.",R_n=()=>"अपडेट किया गया OpenResearch समय पर वापस नहीं आया। इसे खुद फिर से शुरू करें।",M_n=((e={},n={})=>{const t=n.locale??z();return t==="zh-CN"?z_n():t==="fa"?j_n():t==="ar"?T_n():t==="es"?A_n():t==="hi"?R_n():N_n()}),O_n=()=>"Restarting…",D_n=()=>"正在重新启动…",L_n=()=>"در حال راه‌اندازی مجدد…",I_n=()=>"جارٍ إعادة التشغيل…",$_n=()=>"Reiniciando…",B_n=()=>"फिर से शुरू हो रहा है…",mL=((e={},n={})=>{const t=n.locale??z();return t==="zh-CN"?D_n():t==="fa"?L_n():t==="ar"?I_n():t==="es"?$_n():t==="hi"?B_n():O_n()}),P_n=()=>"macOS app",F_n=()=>"macOS 应用",H_n=()=>"برنامهٔ macOS",q_n=()=>"تطبيق macOS",U_n=()=>"App de macOS",G_n=()=>"macOS ऐप",V_n=((e={},n={})=>{const t=n.locale??z();return t==="zh-CN"?F_n():t==="fa"?H_n():t==="ar"?q_n():t==="es"?U_n():t==="hi"?G_n():P_n()}),K_n=()=>"Installed with cargo",W_n=()=>"通过 cargo 安装",Q_n=()=>"نصب‌شده با cargo",X_n=()=>"مثبّت عبر cargo",Y_n=()=>"Instalado con cargo",Z_n=()=>"cargo से इंस्टॉल किया गया",J_n=((e={},n={})=>{const t=n.locale??z();return t==="zh-CN"?W_n():t==="fa"?Q_n():t==="ar"?X_n():t==="es"?Y_n():t==="hi"?Z_n():K_n()}),efn=()=>"Installed with Homebrew",tfn=()=>"通过 Homebrew 安装",nfn=()=>"نصب‌شده با Homebrew",rfn=()=>"مثبّت عبر Homebrew",sfn=()=>"Instalado con Homebrew",ifn=()=>"Homebrew से इंस्टॉल किया गया",afn=((e={},n={})=>{const t=n.locale??z();return t==="zh-CN"?tfn():t==="fa"?nfn():t==="ar"?rfn():t==="es"?sfn():t==="hi"?ifn():efn()}),ofn=()=>"Installed with the orx installer",lfn=()=>"通过 orx 安装程序安装",cfn=()=>"نصب‌شده با نصب‌کنندهٔ orx",ufn=()=>"مثبّت عبر مُثبّت orx",_fn=()=>"Instalado con el instalador de orx",ffn=()=>"orx इंस्टॉलर से इंस्टॉल किया गया",dfn=((e={},n={})=>{const t=n.locale??z();return t==="zh-CN"?lfn():t==="fa"?cfn():t==="ar"?ufn():t==="es"?_fn():t==="hi"?ffn():ofn()}),hfn=()=>"Managed by Nix",pfn=()=>"由 Nix 管理",mfn=()=>"مدیریت‌شده با Nix",gfn=()=>"مُدار بواسطة Nix",vfn=()=>"Gestionado por Nix",bfn=()=>"Nix द्वारा प्रबंधित",yfn=((e={},n={})=>{const t=n.locale??z();return t==="zh-CN"?pfn():t==="fa"?mfn():t==="ar"?gfn():t==="es"?vfn():t==="hi"?bfn():hfn()}),xfn=()=>"Portable orx.exe",wfn=()=>"便携版 orx.exe",kfn=()=>"orx.exe قابل‌حمل",Sfn=()=>"‏orx.exe المحمول",Cfn=()=>"orx.exe portable",Efn=()=>"पोर्टेबल orx.exe",Nfn=((e={},n={})=>{const t=n.locale??z();return t==="zh-CN"?wfn():t==="fa"?kfn():t==="ar"?Sfn():t==="es"?Cfn():t==="hi"?Efn():xfn()}),zfn=()=>"Unknown install",jfn=()=>"未知安装方式",Tfn=()=>"روش نصب نامشخص",Afn=()=>"تثبيت غير معروف",Rfn=()=>"Instalación desconocida",Mfn=()=>"अज्ञात इंस्टॉल",Ofn=((e={},n={})=>{const t=n.locale??z();return t==="zh-CN"?jfn():t==="fa"?Tfn():t==="ar"?Afn():t==="es"?Rfn():t==="hi"?Mfn():zfn()}),Dfn=()=>"Re-run your cargo install to update.",Lfn=()=>"重新运行 cargo 安装命令以更新。",Ifn=()=>"برای به‌روزرسانی، نصب cargo را دوباره اجرا کنید.",$fn=()=>"أعِد تنفيذ أمر cargo install للتحديث.",Bfn=()=>"Vuelve a ejecutar cargo install para actualizar.",Pfn=()=>"अपडेट करने के लिए अपना cargo install फिर से चलाएं।",Ffn=((e={},n={})=>{const t=n.locale??z();return t==="zh-CN"?Lfn():t==="fa"?Ifn():t==="ar"?$fn():t==="es"?Bfn():t==="hi"?Pfn():Dfn()}),Hfn=()=>"Run brew upgrade to update.",qfn=()=>"运行 brew upgrade 以更新。",Ufn=()=>"برای به‌روزرسانی brew upgrade را اجرا کنید.",Gfn=()=>"نفّذ brew upgrade للتحديث.",Vfn=()=>"Ejecuta brew upgrade para actualizar.",Kfn=()=>"अपडेट करने के लिए brew upgrade चलाएं।",Wfn=((e={},n={})=>{const t=n.locale??z();return t==="zh-CN"?qfn():t==="fa"?Ufn():t==="ar"?Gfn():t==="es"?Vfn():t==="hi"?Kfn():Hfn()}),Qfn=()=>"Update it through your Nix configuration.",Xfn=()=>"通过 Nix 配置进行更新。",Yfn=()=>"از طریق پیکربندی Nix به‌روزرسانی کنید.",Zfn=()=>"حدّثه عبر إعداد Nix الخاص بك.",Jfn=()=>"Actualízalo desde tu configuración de Nix.",edn=()=>"इसे अपने Nix कॉन्फ़िगरेशन के ज़रिए अपडेट करें।",tdn=((e={},n={})=>{const t=n.locale??z();return t==="zh-CN"?Xfn():t==="fa"?Yfn():t==="ar"?Zfn():t==="es"?Jfn():t==="hi"?edn():Qfn()}),ndn=()=>"Active Experiments",rdn=()=>"活跃实验",sdn=()=>"آزمایش‌های فعال",idn=()=>"التجارب النشطة",adn=()=>"Experimentos activos",odn=()=>"सक्रिय प्रयोग",ldn=((e={},n={})=>{const t=n.locale??z();return t==="zh-CN"?rdn():t==="fa"?sdn():t==="ar"?idn():t==="es"?adn():t==="hi"?odn():ndn()}),cdn=()=>"Default compute",udn=()=>"默认计算目标",_dn=()=>"محاسبات پیش‌فرض",fdn=()=>"الحوسبة الافتراضية",ddn=()=>"Cómputo predeterminado",hdn=()=>"डिफ़ॉल्ट कंप्यूट",pdn=((e={},n={})=>{const t=n.locale??z();return t==="zh-CN"?udn():t==="fa"?_dn():t==="ar"?fdn():t==="es"?ddn():t==="hi"?hdn():cdn()}),mdn=()=>"Terminal",gdn=()=>"终端",vdn=()=>"ترمینال",bdn=()=>"الطرفية",ydn=()=>"Terminal",xdn=()=>"टर्मिनल",yv=((e={},n={})=>{const t=n.locale??z();return t==="zh-CN"?gdn():t==="fa"?vdn():t==="ar"?bdn():t==="es"?ydn():t==="hi"?xdn():mdn()}),wdn=()=>"The terminal disconnected.",kdn=()=>"终端连接已断开。",Sdn=()=>"ارتباط ترمینال قطع شد.",Cdn=()=>"انقطعت الطرفية.",Edn=()=>"La terminal se desconectó.",Ndn=()=>"टर्मिनल डिस्कनेक्ट हो गया।",mz=((e={},n={})=>{const t=n.locale??z();return t==="zh-CN"?kdn():t==="fa"?Sdn():t==="ar"?Cdn():t==="es"?Edn():t==="hi"?Ndn():wdn()}),zdn=e=>`Shell exited with code ${e==null?void 0:e.code}.`,jdn=e=>`Shell 已退出,退出码 ${e==null?void 0:e.code}。`,Tdn=e=>`پوسته با کد ${e==null?void 0:e.code} خارج شد.`,Adn=e=>`انتهى Shell برمز الخروج ${e==null?void 0:e.code}.`,Rdn=e=>`El shell terminó con el código ${e==null?void 0:e.code}.`,Mdn=e=>`शेल कोड ${e==null?void 0:e.code} के साथ बंद हो गया।`,Odn=((e,n={})=>{const t=n.locale??z();return t==="zh-CN"?jdn(e):t==="fa"?Tdn(e):t==="ar"?Adn(e):t==="es"?Rdn(e):t==="hi"?Mdn(e):zdn(e)}),Ddn=()=>"Restart shell",Ldn=()=>"重新启动 Shell",Idn=()=>"راه‌اندازی دوباره پوسته",$dn=()=>"إعادة تشغيل Shell",Bdn=()=>"Reiniciar shell",Pdn=()=>"शेल फिर से शुरू करें",Fdn=((e={},n={})=>{const t=n.locale??z();return t==="zh-CN"?Ldn():t==="fa"?Idn():t==="ar"?$dn():t==="es"?Bdn():t==="hi"?Pdn():Ddn()}),Hdn=()=>"This worktree",qdn=()=>"当前工作树",Udn=()=>"این درخت کاری",Gdn=()=>"شجرة العمل هذه",Vdn=()=>"Este árbol de trabajo",Kdn=()=>"यह वर्कट्री",Wdn=((e={},n={})=>{const t=n.locale??z();return t==="zh-CN"?qdn():t==="fa"?Udn():t==="ar"?Gdn():t==="es"?Vdn():t==="hi"?Kdn():Hdn()}),Qdn=()=>"Workspace",Xdn=()=>"工作区",Ydn=()=>"فضای کاری",Zdn=()=>"مساحة العمل",Jdn=()=>"Espacio de trabajo",ehn=()=>"वर्कस्पेस",W2=((e={},n={})=>{const t=n.locale??z();return t==="zh-CN"?Xdn():t==="fa"?Ydn():t==="ar"?Zdn():t==="es"?Jdn():t==="hi"?ehn():Qdn()}),thn=e=>`Current worktree · ${e==null?void 0:e.branch}`,nhn=e=>`当前工作树 · ${e==null?void 0:e.branch}`,rhn=e=>`درخت کاری کنونی · ${e==null?void 0:e.branch}`,shn=e=>`شجرة العمل الحالية · ${e==null?void 0:e.branch}`,ihn=e=>`Árbol de trabajo actual · ${e==null?void 0:e.branch}`,ahn=e=>`मौजूदा वर्कट्री · ${e==null?void 0:e.branch}`,ohn=((e,n={})=>{const t=n.locale??z();return t==="zh-CN"?nhn(e):t==="fa"?rhn(e):t==="ar"?shn(e):t==="es"?ihn(e):t==="hi"?ahn(e):thn(e)}),lhn=e=>`Default branch · ${e==null?void 0:e.branch}`,chn=e=>`默认分支 · ${e==null?void 0:e.branch}`,uhn=e=>`شاخهٔ پیش‌فرض · ${e==null?void 0:e.branch}`,_hn=e=>`الفرع الافتراضي · ${e==null?void 0:e.branch}`,fhn=e=>`Rama predeterminada · ${e==null?void 0:e.branch}`,dhn=e=>`डिफ़ॉल्ट ब्रांच · ${e==null?void 0:e.branch}`,hhn=((e,n={})=>{const t=n.locale??z();return t==="zh-CN"?chn(e):t==="fa"?uhn(e):t==="ar"?_hn(e):t==="es"?fhn(e):t==="hi"?dhn(e):lhn(e)}),phn=e=>`detached at ${e==null?void 0:e.branch}`,mhn=e=>`分离于 ${e==null?void 0:e.branch}`,ghn=e=>`جدا در ${e==null?void 0:e.branch}`,vhn=e=>`منفصل عند ${e==null?void 0:e.branch}`,bhn=e=>`desacoplado en ${e==null?void 0:e.branch}`,yhn=e=>`${e==null?void 0:e.branch} पर डिटैच्ड`,xhn=((e,n={})=>{const t=n.locale??z();return t==="zh-CN"?mhn(e):t==="fa"?ghn(e):t==="ar"?vhn(e):t==="es"?bhn(e):t==="hi"?yhn(e):phn(e)}),whn=()=>"Listing truncated.",khn=()=>"列表已截断。",Shn=()=>"فهرست کوتاه شده است.",Chn=()=>"القائمة مقتطعة.",Ehn=()=>"Listado truncado.",Nhn=()=>"सूची छोटी की गई।",zhn=((e={},n={})=>{const t=n.locale??z();return t==="zh-CN"?khn():t==="fa"?Shn():t==="ar"?Chn():t==="es"?Ehn():t==="hi"?Nhn():whn()}),jhn=()=>"Loading…",Thn=()=>"正在加载…",Ahn=()=>"در حال بارگیری…",Rhn=()=>"جارٍ التحميل…",Mhn=()=>"Cargando…",Ohn=()=>"लोड हो रहा है…",Dhn=((e={},n={})=>{const t=n.locale??z();return t==="zh-CN"?Thn():t==="fa"?Ahn():t==="ar"?Rhn():t==="es"?Mhn():t==="hi"?Ohn():jhn()}),Lhn=()=>"No changes yet.",Ihn=()=>"尚无更改。",$hn=()=>"هنوز تغییری وجود ندارد.",Bhn=()=>"لا توجد تغييرات بعد.",Phn=()=>"Aún no hay cambios.",Fhn=()=>"अभी तक कोई बदलाव नहीं।",Hhn=((e={},n={})=>{const t=n.locale??z();return t==="zh-CN"?Ihn():t==="fa"?$hn():t==="ar"?Bhn():t==="es"?Phn():t==="hi"?Fhn():Lhn()}),qhn=()=>"No files.",Uhn=()=>"没有文件。",Ghn=()=>"فایلی وجود ندارد.",Vhn=()=>"لا توجد ملفات.",Khn=()=>"No hay archivos.",Whn=()=>"कोई फ़ाइल नहीं।",Qhn=((e={},n={})=>{const t=n.locale??z();return t==="zh-CN"?Uhn():t==="fa"?Ghn():t==="ar"?Vhn():t==="es"?Khn():t==="hi"?Whn():qhn()}),Xhn=()=>"Refresh failed:",Yhn=()=>"刷新失败:",Zhn=()=>"تازه‌سازی ناموفق بود:",Jhn=()=>"فشل التحديث:",epn=()=>"Error al actualizar:",tpn=()=>"रीफ़्रेश विफल:",npn=((e={},n={})=>{const t=n.locale??z();return t==="zh-CN"?Yhn():t==="fa"?Zhn():t==="ar"?Jhn():t==="es"?epn():t==="hi"?tpn():Xhn()}),Ne=e=>`⁦${e}⁩`,qo=e=>`⁨${e}⁩`,Jt=e=>new Intl.NumberFormat(z()).format(e),Sp="demo_nanochat_v1",Il=e=>e.startsWith("demo_"),bd="chat_demo_nanochat_v1",bb="chat_demo_nanochat_figures_v1",yb="chat_demo_nanochat_literature_v1",rpn={[bd]:"cpu_end_to_end",[bb]:"figures",[yb]:"literature"},Q2="cpu-apple-silicon-pipeline-results.md",spn={[bd]:"msg_demo_nanochat_assistant_v1",[bb]:"msg_demo_nanochat_figures_assistant_v1",[yb]:"msg_demo_nanochat_literature_assistant_v1"},gz="Run the Muon matrix LR 2× probe experiment. When it finishes, compare its step-100 and step-200 val_bpb against the baseline and tell me whether doubling the matrix learning rate helps early training.";class l3 extends Error{constructor(t,r,s){super(t);Bs(this,"currentVersion");Bs(this,"exists");this.name="FileChangedError",this.currentVersion=r,this.exists=s}}function Zi(e){return(e.status==="running"||e.status==="starting")&&e.cancelRequested?"cancelling":e.status}const gL=new WeakMap;async function fi(e){if(!e.ok){const r=await e.text().catch(()=>"");let s=r;try{const i=JSON.parse(r);if(typeof i=="object"&&i!==null&&("error"in i&&typeof i.error=="string"&&(s=i.error),e.status===409&&"code"in i&&i.code==="fileChanged"&&"exists"in i&&typeof i.exists=="boolean")){const a="currentVersion"in i&&typeof i.currentVersion=="string"?i.currentVersion:null;throw new l3(s,a,i.exists)}}catch(i){if(i instanceof l3)throw i}throw new Error(s||`HTTP ${e.status}`)}const n=await e.json(),t=gL.get(e);if(t&&!$n(t))throw new DOMException("Workspace changed","AbortError");return n}const Ot=(e,n)=>fetch(e,{signal:n}).then(t=>fi(t));async function ca(e,n){const t=Ra(),r=await fetch(e,n);if(!$n(t))throw new DOMException("Workspace changed","AbortError");return gL.set(r,t),r.ok&&IW(e,t),r}const Nt=(e,n,t=!1)=>ca(e,{method:"POST",keepalive:t,headers:n===void 0?{}:{"content-type":"application/json"},body:n===void 0?void 0:JSON.stringify(n)}).then(r=>fi(r)),bh=(e,n)=>ca(e,{method:"PATCH",headers:{"content-type":"application/json"},body:JSON.stringify(n)}).then(t=>fi(t)),vL=(e,n)=>ca(e,{method:"PUT",headers:{"content-type":"application/json"},body:JSON.stringify(n)}).then(t=>fi(t)),ipn=e=>Ot("/api/projects",e).then(n=>n.projects),apn=e=>Ot("/api/projects/activity",e).then(n=>n.activity),opn=e=>Ot("/api/settings/ui-state",e),lpn=(e,n)=>Ot(`/api/projects/${encodeURIComponent(e)}/ui-state`,n),cpn=(e,n,t=!1)=>Nt(`/api/projects/${encodeURIComponent(e)}/ui-state`,n,t),upn=(e,n=!1)=>Nt("/api/settings/ui-state",{workspace:e},n),_pn=e=>Nt("/api/settings/ui-state",e),fpn=(e,n)=>Nt("/api/onboarding/complete",{...e,...n}),dpn=(e="",n)=>{const t=e?`?path=${encodeURIComponent(e)}`:"";return Ot(`/api/project-path/status${t}`,n)},hpn=()=>Nt("/api/project-path/pick").then(e=>e.path),ppn=e=>Nt("/api/projects",e),mpn=(e,n)=>Ot(`/api/papers/search?q=${encodeURIComponent(e)}`,n).then(t=>t.papers),gpn=e=>Ot("/api/github/account",e),vpn=(e,n)=>Ot(`/api/github/project-repo-preview?name=${encodeURIComponent(e)}`,n),bpn=(e,n,t)=>Ot(`/api/github/repo-access?owner=${encodeURIComponent(e)}&repo=${encodeURIComponent(n)}`,t),ypn=(e,n)=>Ot(`/api/papers/resolve?id=${encodeURIComponent(e)}`,n).then(t=>t.paper),xpn=e=>Nt("/api/projects/starter-prompts/prewarm",e),wpn=(e,n,t,r,s)=>Ot(`/api/projects/${e}/starter-prompts?${new URLSearchParams({harness:n,...t?{model:t}:{},locale:r})}`,s),kpn=e=>Nt(`/api/projects/${e}/open`).then(n=>n.project),Spn=e=>ca(`/api/projects/${e}`,{method:"DELETE"}).then(async n=>{if(!n.ok){const t=await n.json().catch(()=>null);throw new Error((t==null?void 0:t.error)??`delete failed (${n.status})`)}DW(e)}),Cpn=(e,n)=>Ot(`/api/projects/${e}/experiments`,n).then(t=>t.experiments),Epn=(e,n)=>Ot(`/api/projects/${e}/runs`,n).then(t=>t.runs),bL=e=>Nt(`/api/runs/${e}/cancel`).then(()=>{}),Npn=(e,n)=>Ot(`/api/runs/${e}/log?offset=${n}`),zpn=(e,n)=>Ot(`/api/runs/${e}/diff`,n),jpn=(e,n)=>Ot(`/api/experiments/${e}/diff`,n),ju=(e,n=new URLSearchParams)=>(e.sessionId&&n.set("sessionId",e.sessionId),e.ref&&n.set("ref",e.ref),n),Tpn=(e,n,t={},r)=>Ot(`/api/projects/${e}/file?${ju(t,new URLSearchParams({path:n}))}`,r),c3=(e,n,t={})=>`/api/projects/${e}/file/raw?${ju(t,new URLSearchParams({path:n}))}`,Apn=(e,n)=>Ot(`/api/files/abs?path=${encodeURIComponent(e)}`,n),yL=e=>`/api/files/abs/raw?path=${encodeURIComponent(e)}`,Rpn=(e,n,t,r)=>vL(`/api/projects/${e}/file`,{path:n,content:t,sessionId:r.sessionId,expectedVersion:r.expectedVersion}),Mpn=(e,n,t,r={})=>bh(`/api/projects/${e}/file`,{path:n,...t,sessionId:r.sessionId}),Opn=(e,n,t={})=>Nt(`/api/projects/${e}/file/open`,{path:n,sessionId:t.sessionId}),Dpn=e=>Ot("/api/latex/engine",e),Lpn=(e,n,t={})=>Nt(`/api/projects/${e}/file/latex`,{path:n,sessionId:t.sessionId}),Ipn=e=>Ot("/api/overleaf/settings",e),xL=e=>Nt("/api/overleaf/token",{token:e}),$pn=()=>ca("/api/overleaf/token",{method:"DELETE"}).then(e=>fi(e)),wL=(e,n={})=>Nt("/api/overleaf/session",{session:e,host:n.host}),Bpn=()=>fetch("/api/overleaf/session",{method:"DELETE"}).then(e=>fi(e)),Ppn=(e={})=>Nt("/api/overleaf/session/import",{host:e.host}),Fpn=(e,n,t={})=>Nt(`/api/projects/${e}/file/overleaf/live`,{path:n,sessionId:t.sessionId,retry:t.retry}),Hpn=(e,n,t={})=>fetch(`/api/projects/${e}/file/overleaf/live?${ju(t,new URLSearchParams({path:n}))}`,{method:"DELETE"}).then(r=>fi(r)),qpn=(e,n,t={},r)=>Ot(`/api/projects/${e}/file/overleaf?${ju(t,new URLSearchParams({path:n}))}`,r),Upn=(e,n,t)=>Nt(`/api/projects/${e}/file/overleaf`,{path:n,project:t.project,sessionId:t.sessionId}),Gpn=(e,n,t={})=>ca(`/api/projects/${e}/file/overleaf?${ju(t,new URLSearchParams({path:n}))}`,{method:"DELETE"}).then(r=>fi(r)),Vpn=(e,n,t={})=>Nt(`/api/projects/${e}/file/overleaf/sync`,{path:n,sessionId:t.sessionId,resolve:t.resolve}),Kpn=(e,n,t={},r)=>Ot(`/api/projects/${e}/file/overleaf/status?${ju(t,new URLSearchParams({path:n}))}`,r),Wpn=(e,n,t={})=>`/api/projects/${e}/file/overleaf/upload?${ju(t,new URLSearchParams({path:n}))}`,Qpn=(e,n={},t)=>{const r=ju(n).toString();return Ot(`/api/projects/${e}/code-tree${r?`?${r}`:""}`,t)},Xpn=(e,n)=>Ot(`/api/chat/sessions/${e}/worktree`,n),xb=(e,n,t)=>`https://github.com/${e}/${n}/tree/${t.split("/").map(encodeURIComponent).join("/")}`,Ypn=e=>Ot("/api/settings/hf",e),Zpn=e=>Nt("/api/settings/hf",{token:e}),Jpn=e=>Ot("/api/settings/tinker",e),e0n=e=>Nt("/api/settings/tinker",{key:e}),t0n=e=>Ot("/api/update",e),n0n=()=>Nt("/api/update/apply"),r0n=()=>Nt("/api/update/restart"),s0n=e=>Nt("/api/update/auto",{enabled:e}),i0n=(e=!1)=>Nt("/api/update/install-cli",{force:e}),a0n=e=>Ot("/api/settings/k8s",e),o0n=e=>Nt("/api/settings/k8s",e),l0n=e=>Ot("/api/settings/modal",e),c0n=(e,n)=>Nt("/api/settings/modal",{tokenId:e,tokenSecret:n}),u0n=e=>Ot("/api/settings/env",e).then(n=>n.vars),kL=(e,n)=>Nt("/api/settings/env",{key:e,value:n}).then(t=>t.vars),_0n=e=>ca(`/api/settings/env/${encodeURIComponent(e)}`,{method:"DELETE"}).then(n=>fi(n)).then(n=>n.vars),f0n=e=>Ot("/api/settings/data-dir",e),d0n=e=>Nt("/api/settings/data-dir/validate",{path:e}),h0n=e=>Nt("/api/settings/data-dir/move",{path:e}),p0n=e=>Ot("/api/settings/ssh",e).then(n=>n.hosts),m0n=e=>Ot("/api/settings/ssh/config",e),g0n=(e,n)=>vL("/api/settings/ssh/config",{content:e,previousContent:n}),v0n=(e,n)=>Ot(`/api/settings/ssh/master?host=${encodeURIComponent(e)}`,n),b0n=e=>Ot("/_orx/runtime",e),y0n=e=>Ot("/api/remote/sessions",e).then(n=>n.sessions),x0n=(e,n)=>Nt("/api/remote/sessions",{host:e,uiPreferences:n}),w0n=e=>Nt("/_orx/install",e),k0n=()=>Nt("/_orx/reconnect"),SL=()=>Nt("/_orx/disconnect"),S0n=()=>Nt("/_orx/start-host"),CL=()=>Ot("/_orx/stop-host"),EL=e=>Nt("/_orx/stop-host",{expectedInstanceId:e.instanceId,expectedPreview:{activeTurnCount:e.activeTurnCount,queuedMessageCount:e.queuedMessageCount,pendingPermissionCount:e.pendingPermissionCount,activeRunCount:e.activeRunCount,attachmentCount:e.attachmentCount}}),C0n=e=>Ot("/api/settings/slurm",e),E0n=e=>Nt("/api/settings/slurm",e),N0n=e=>Ot("/api/settings/ray",e),z0n=e=>Nt("/api/settings/ray",e),j0n=e=>Nt("/api/settings/ray/preflight",{address:e??null}),T0n=(e,n)=>Ot(`/api/settings/compute${e?`?projectId=${encodeURIComponent(e)}`:""}`,n),A0n=e=>Nt("/api/settings/compute/default",e),R0n=e=>Ot("/api/settings/local",e),M0n=e=>Ot("/api/settings/openresearch",e),O0n=(e,n)=>Ot(`/api/projects/${e}/files`,n),D0n=(e,n)=>ca(`/api/projects/${e}/files?path=${encodeURIComponent(n)}`,{method:"DELETE"}).then(t=>fi(t)),L0n=(e,n,t)=>bh(`/api/projects/${e}/files`,{path:n,...t}),F_=(e,n)=>`/api/projects/${e}/files/file?path=${encodeURIComponent(n)}`,NL=512e3,I0n=(e,n)=>{const t=new Uint8Array(e);if(t.includes(0))return{content:"",binary:!0,truncated:n};try{return{content:new TextDecoder("utf-8",{fatal:!0}).decode(t,{stream:n}),binary:!1,truncated:n}}catch{return{content:"",binary:!0,truncated:n}}},$0n=(e,n,t)=>fetch(F_(e,n),{signal:t,headers:{Range:`bytes=0-${NL-1}`}}).then(r=>{var i;if(r.status===404)return null;if(r.status===416&&r.headers.get("content-range")==="bytes */0")return{content:"",binary:!1,truncated:!1};if(!r.ok)throw new Error(`HTTP ${r.status}`);const s=Number((i=r.headers.get("content-range"))==null?void 0:i.split("/").pop());return r.arrayBuffer().then(a=>I0n(a,Number.isFinite(s)&&s>a.byteLength))}),B0n=e=>e==="image"||e==="audio"||e==="video"||e==="pdf"||e==="text"||e==="unknown"||e==="download",P0n=(e,n,t)=>fetch(F_(e,n),{signal:t,method:"HEAD"}).then(r=>{if(r.status===404)return null;if(!r.ok)throw new Error(`HTTP ${r.status}`);const s=r.headers.get("x-openresearch-presentation");return{size:Number(r.headers.get("content-length"))||0,presentation:B0n(s)?s:"download"}}),F0n=e=>Ot("/api/settings/profile",e),H0n=e=>Ot("/api/settings/lit-sources",e),q0n=e=>Nt("/api/settings/lit-sources",e),U0n=e=>Ot("/api/settings/projects",e),zL=(e,n)=>Nt("/api/settings/projects",{githubForNewProjects:e,...n===void 0?{}:{githubDefaultPromptSeen:n}}),G0n=(e,n)=>Ot(`/api/projects/${e}/git`,n),V0n=e=>Nt(`/api/projects/${e}/git/init`),K0n=e=>Nt(`/api/projects/${e}/github`),W0n=e=>Nt(`/api/projects/${e}/github/disable`),Q0n=e=>Ot("/api/settings/telemetry",e),X0n=e=>Nt("/api/settings/telemetry",{enabled:e}),Jc=e=>{Nt("/api/telemetry/event",e).catch(()=>{})};function I1(e){var s;if(!e.id.startsWith("orx-local-"))return e.displayName??_3(e.id);const n=(s=e.displayName)==null?void 0:s.split(" · ").slice(1).join(" · ").replace(/ \(local\)$/,""),t=n==="OpenAI-compatible server"||n==="Custom endpoint"||n==="Custom Endpoint"?Mk():n,r=_3(e.id.replace(/-(?:FP|BF)\d+$/i,""));return t?`${r} · ${t}`:r}const xv="default";function wb(e,n){var a,o,l;const t=e==null?void 0:e.models.find(u=>u.id===n),r=(t==null?void 0:t.reasoningLevels)??((a=e==null?void 0:e.options)==null?void 0:a.reasoningLevels)??[],s=t==null?void 0:t.defaultReasoningLevel,i=s&&r.some(u=>u.id===s)?s:r.some(u=>u.id===xv)?xv:((o=e==null?void 0:e.options)==null?void 0:o.defaultReasoningLevel)??((l=r[0])==null?void 0:l.id)??null;return{choices:r,defaultId:i}}const u3="default";function jL(e,n){var r;if((e==null?void 0:e.id)!=="codex")return[];const t=(r=e.models.find(s=>s.id===n))==null?void 0:r.serviceTiers;return t!=null&&t.length?[{id:u3,label:E6t(),description:b6t()},...t]:[]}function wv(e,n,t){var i;if(!e)return t??null;if(e.id!=="codex"||((i=e.models.find(a=>a.id===n))==null?void 0:i.serviceTiers)===void 0)return null;const s=jL(e,n);return s.length===0?u3:t!=null&&s.some(a=>a.id===t)?t:u3}function TL(e,n,t){if(!e)return t;const{choices:r,defaultId:s}=wb(e,n);return r.length===0?xv:t&&r.some(i=>i.id===t)?t:s}const Y0n=e=>Ot("/api/harnesses/setup/commands",e),AL=(e=!1,n=!1,t)=>{const r=new URLSearchParams;e&&r.set("refresh","1"),n&&r.set("retry","1");const s=r.size>0?`?${r.toString()}`:"";return Ot(`/api/harnesses${s}`,t).then(i=>i.harnesses)},Z0n=(e,n)=>Ot(`/api/skills${n?`?harness=${encodeURIComponent(n)}`:""}`,e),J0n=(e,n,t,r)=>Ot(`/api/skills/${encodeURIComponent(e)}${`?${new URLSearchParams({...n?{project:n}:{},...r?{harness:r}:{}})}`}`,t).then(s=>s.content),emn=e=>Ot("/api/latex-templates",e).then(n=>n.templates),tmn=e=>Nt("/api/latex-templates",e).then(n=>n.template),nmn=e=>ca(`/api/latex-templates?name=${encodeURIComponent(e)}`,{method:"DELETE"}).then(n=>fi(n)),rmn=e=>Ot("/api/user-skills",e),smn=e=>Nt("/api/user-skills",e).then(n=>n.skill),imn=e=>ca(`/api/user-skills?name=${encodeURIComponent(e)}`,{method:"DELETE"}).then(n=>fi(n));function _3(e){const n=(e.split("/").pop()??e).replace(/^~/,"").replace(/^claude-/,""),t=[],r=[];for(const s of n.split("-"))/^\d+(\.\d+)?$/.test(s)?r.push(s):(r.length&&t.push(r.splice(0).join(".")),t.push(s==="gpt"?"GPT":s.charAt(0).toUpperCase()+s.slice(1)));return r.length&&t.push(r.join(".")),t.join(" ")}const amn=(e,n)=>Ot(`/api/chat/sessions?projectId=${encodeURIComponent(e)}`,n).then(t=>t.sessions),omn=(e,n,t={})=>Nt("/api/chat/sessions",{projectId:e,harness:n,...t}).then(r=>r.session),lmn=e=>ca(`/api/chat/sessions/${e}`,{method:"DELETE"}).then(n=>fi(n).then(t=>(gb(e),t))),cmn=(e,n)=>bh(`/api/chat/sessions/${e}`,{archived:n}).then(t=>t.session),umn=(e,n)=>bh(`/api/chat/sessions/${e}`,{title:n}).then(t=>t.session),_mn=(e,n)=>bh(`/api/chat/sessions/${e}`,{planMode:n}).then(t=>t.session),fmn=(e,n)=>bh(`/api/chat/sessions/${e}`,{permissionMode:n}).then(t=>t.session),dmn=(e,n)=>Ot(`/api/chat/sessions/${e}/messages`,n).then(t=>({messages:t.messages,queued:t.queued??[],activeLeafId:t.activeLeafId??null})),hmn=(e,n)=>ca(`/api/chat/sessions/${e}/queue/${encodeURIComponent(n)}`,{method:"DELETE"}).then(t=>fi(t)),pmn=(e,n)=>Nt(`/api/chat/sessions/${e}/queue/${encodeURIComponent(n)}`),mmn=e=>`/api/chat/attachments/${encodeURIComponent(e)}`,vz=(e,n,t={},r,s,i,a)=>Nt(`/api/chat/sessions/${e}/message`,{text:n,clientTurnId:i,model:t.model,serviceTier:t.serviceTier,permissionMode:t.permissionMode,planMode:t.planMode,reasoningLevel:t.reasoningLevel,images:r,annotations:s,mode:a}),gmn=(e,n)=>Nt(`/api/chat/sessions/${e}/shell`,{command:n}),vmn=(e,n,t,r={})=>Nt(`/api/chat/sessions/${e}/turns/${n}/recover`,{action:t,...r}),bmn=(e,n,t)=>Nt(`/api/chat/sessions/${e}/fork`,{messageId:n,text:t}),ymn=(e,n)=>Nt(`/api/chat/sessions/${e}/branch`,{leafId:n}),xmn=e=>Nt(`/api/chat/sessions/${e}/interrupt`),wmn=(e,n)=>Nt(`/api/chat/sessions/${e}/respond`,n);function Vo(e){const n=Math.max(0,Math.floor((Date.now()-e)/1e3)),t=new Intl.RelativeTimeFormat(z(),{numeric:"always",style:"narrow"});if(n<60)return t.format(-n,"second");const r=Math.floor(n/60);if(r<60)return t.format(-r,"minute");const s=Math.floor(r/60);return s<24?t.format(-s,"hour"):t.format(-Math.floor(s/24),"day")}function g0(e){const n=Math.max(0,Math.floor(e/1e3));if(n<60)return dAe({value:Jt(n)});const t=Math.floor(n/60);if(t<60)return aAe({value:Jt(t)});const r=Math.floor(t/60);return r<24?JTe({hours:Jt(r),minutes:Jt(t%60)}):VTe({days:Jt(Math.floor(r/24)),hours:Jt(r%24)})}function Kl(e){const n=["B","KB","MB","GB","TB"];let t=e,r=0;for(;t>=1024&&rOt("/api/local-models",e),Cmn=e=>Nt("/api/local-models/discover",e),Emn=e=>Nt("/api/local-models",e),Nmn=e=>Nt(`/api/local-models/${encodeURIComponent(e)}/check`,{}),zmn=e=>ca(`/api/local-models/${encodeURIComponent(e)}`,{method:"DELETE"}).then(n=>fi(n)),bz=()=>({queryKey:Et("getHfSettings"),queryFn:({signal:e})=>Ypn(e),staleTime:3e5}),yz=()=>({queryKey:Et("getTinkerSettings"),queryFn:({signal:e})=>Jpn(e),staleTime:3e5}),xz=()=>({queryKey:Et("getK8sSettings"),queryFn:({signal:e})=>a0n(e),staleTime:3e4}),wz=()=>({queryKey:Et("getModalSettings"),queryFn:({signal:e})=>l0n(e),staleTime:3e5}),jmn=()=>({queryKey:Et("getSlurmSettings"),queryFn:({signal:e})=>C0n(e),staleTime:3e5}),Tmn=()=>({queryKey:Et("getRaySettings"),queryFn:({signal:e})=>N0n(e),staleTime:3e5}),RL=e=>({queryKey:Et("getComputeSettings",e??null),queryFn:({signal:n})=>T0n(e,n),staleTime:3e4}),Amn=()=>({queryKey:Et("getLocalMachine"),queryFn:({signal:e})=>R0n(e),staleTime:3e5}),Rmn=()=>({queryKey:Et("getOpenResearchSettings"),queryFn:({signal:e})=>M0n(e),staleTime:3e4}),Mmn=()=>({queryKey:Et("getEnvVars"),queryFn:({signal:e})=>u0n(e),staleTime:3e5}),Omn=()=>({queryKey:Et("getDataDir"),queryFn:({signal:e})=>f0n(e),staleTime:3e5}),ML=()=>({queryKey:Et("getSshHosts"),queryFn:({signal:e})=>p0n(e),staleTime:3e5}),Dmn=()=>({queryKey:Et("getSshConfig"),queryFn:({signal:e})=>m0n(e),staleTime:3e5}),kz=e=>({queryKey:Et("getSshMasterStatus",e),queryFn:({signal:n})=>v0n(e,n),staleTime:5e3}),Lmn=()=>({queryKey:["gateway","runtime"],queryFn:({signal:e})=>b0n(e),staleTime:2e3}),Imn=()=>({queryKey:Et("listRemoteSessions"),queryFn:({signal:e})=>y0n(e),staleTime:3e4}),kv=()=>({queryKey:Et("getUpdateStatus"),queryFn:({signal:e,client:n,queryKey:t})=>gh(n,t,()=>t0n(e)),staleTime:3e4}),$mn=()=>({queryKey:Et("getProfile"),queryFn:({signal:e})=>F0n(e),staleTime:3e5}),Bmn=()=>({queryKey:Et("getLitSources"),queryFn:({signal:e})=>H0n(e),staleTime:3e5}),Gk=()=>({queryKey:Et("getProjectDefaults"),queryFn:({signal:e})=>U0n(e),staleTime:3e5}),Pmn=e=>({queryKey:Et("getProjectGitStatus",e),queryFn:({signal:n})=>G0n(e,n),staleTime:3e4}),Fmn=()=>({queryKey:Et("getTelemetry"),queryFn:({signal:e})=>Q0n(e),staleTime:3e5}),OL=()=>({queryKey:Et("getHarnessSetupCommands"),queryFn:({signal:e})=>Y0n(e),staleTime:1/0}),bu=()=>({queryKey:Et("getHarnesses"),queryFn:({signal:e})=>AL(!1,!1,e),staleTime:3e5,refetchInterval:e=>{var n;return(n=e.state.data)!=null&&n.some(t=>t.accountLoading)?1e3:!1}}),Hmn=e=>({queryKey:Et("getSkills",e??null),queryFn:({signal:n})=>Z0n(n,e),select:n=>n.skills,refetchInterval:n=>{var t;return(t=n.state.data)!=null&&t.importing?2e3:3e4},staleTime:3e5}),qmn=(e,n,t)=>({queryKey:Et("getSkillContent",e,n??null,t??null),queryFn:({signal:r})=>J0n(e,n,r,t),staleTime:3e5}),Umn=()=>({queryKey:Et("listLatexTemplates"),queryFn:({signal:e})=>emn(e),refetchInterval:3e4,staleTime:3e5}),Gmn=()=>({queryKey:Et("listUserSkills"),queryFn:({signal:e})=>rmn(e),select:e=>e.skills,refetchInterval:e=>{var n;return(n=e.state.data)!=null&&n.importing?2e3:3e4},staleTime:3e5});async function Xd(e=!1,n=!1){const t=bu();if(!e&&!n)return rt.fetchQuery(t);await rt.cancelQueries(t);const r=await AL(e,n);return $n(t.queryKey)&&rt.setQueryData(t.queryKey,r),r}const Vmn=()=>({queryKey:Et("getLocalModels"),queryFn:({signal:e})=>Smn(e),staleTime:3e4}),Aa=e=>({queryKey:Et("listChatSessions",e),queryFn:({signal:n,client:t,queryKey:r})=>gh(t,r,async()=>{const s=await amn(e,n),i=t.getQueryData(r);return s.filter(a=>!gu.has(a.id)).map(a=>{var o;return{...a,contextUsage:a.contextUsage??((o=i==null?void 0:i.find(l=>l.id===a.id))==null?void 0:o.contextUsage)}})},lm),staleTime:3e4}),Zl=e=>({queryKey:Et("getChatMessages",e),queryFn:async({signal:n,client:t,queryKey:r})=>{var h;const s=t.getQueryData(r),i=await gh(t,r,()=>dmn(e,n),(_,p,m)=>{if(!p)return _;const x=new Set([...m].filter(k=>k.startsWith("message:")).map(k=>k.slice(8)));return{messages:lm(_.messages,p.messages,x,!1),queued:m.has("queued")?p.queued:_.queued,activeLeafId:m.has("branch")||x.size?p.activeLeafId:_.activeLeafId}});n.throwIfAborted();const a=t.getQueryData(r),l=s!==void 0&&i.messages.some(_=>_.role==="user"&&!(s!=null&&s.messages.some(p=>p.id===_.id)))?[]:(a==null?void 0:a.messages.filter(_=>_.id.startsWith("local-")))??[],u=l.some(_=>_.id===(a==null?void 0:a.activeLeafId));return{...i,messages:[...i.messages,...l.filter(_=>!i.messages.some(p=>p.id===_.id))],activeLeafId:a&&(u||!((h=a.activeLeafId)!=null&&h.startsWith("local-"))&&a.activeLeafId!==(s==null?void 0:s.activeLeafId))?a.activeLeafId:i.activeLeafId}},staleTime:1/0,refetchOnMount:"always",refetchOnWindowFocus:"always"}),M_="local-",DL="bash";function Sz(e,n){const t=e.findIndex(r=>r.id===n.id);if(t>=0){const r=e.slice();return r[t]=n,r}return n.role!=="user"?[...e,n]:[...e.filter(r=>!r.id.startsWith(M_)),n]}function Kmn(e,n){switch(n.type){case"upsertMessage":{const t=e.messagesBySession[n.sessionId]??[],r=t.some(o=>o.id===n.message.id),s=e.activeLeafBySession[n.sessionId]??null,i=n.message.role==="user"&&s!==null&&s.startsWith(M_),a=n.message.parentId!=null&&n.message.parentId===s;return{...e,messagesBySession:{...e.messagesBySession,[n.sessionId]:Sz(t,n.message)},activeLeafBySession:r&&!i&&!a?e.activeLeafBySession:{...e.activeLeafBySession,[n.sessionId]:n.message.id}}}case"localError":{const t=e.messagesBySession[n.sessionId]??[],r={id:`${M_}senderr-${Date.now()}`,role:"assistant",parts:[{id:"p0",type:"tool",tool:"error",state:{status:"error",error:n.text}}],createdAt:Date.now(),parentId:e.activeLeafBySession[n.sessionId]??null};return{...e,messagesBySession:{...e.messagesBySession,[n.sessionId]:[...t,r]},activeLeafBySession:{...e.activeLeafBySession,[n.sessionId]:r.id}}}case"localShell":{const t=e.messagesBySession[n.sessionId]??[],r=t.find(i=>i.id===n.id),s={id:n.id,role:"user",parts:[{id:"p0",type:"tool",tool:DL,state:{status:n.error===void 0?"running":"error",input:{command:n.command},error:n.error}}],createdAt:(r==null?void 0:r.createdAt)??Date.now(),parentId:r?r.parentId:e.activeLeafBySession[n.sessionId]??null};return{...e,messagesBySession:{...e.messagesBySession,[n.sessionId]:r?Sz(t,s):[...t,s]},activeLeafBySession:r?e.activeLeafBySession:{...e.activeLeafBySession,[n.sessionId]:s.id}}}case"activeLeaf":return{...e,activeLeafBySession:{...e.activeLeafBySession,[n.sessionId]:n.leafId}};case"optimisticUser":{const t=e.messagesBySession[n.sessionId]??[],r=n.text?[{id:"p0",type:"text",text:n.text}]:[];n.attachments.forEach((i,a)=>r.push({id:`img${a}`,type:"image",text:i.url,name:i.name})),n.annotations.forEach((i,a)=>r.push({id:`annotation${a}`,type:"annotation",text:i.text}));const s={id:`${M_}${Date.now()}`,role:"user",parts:r,createdAt:Date.now(),parentId:e.activeLeafBySession[n.sessionId]??null};return{...e,messagesBySession:{...e.messagesBySession,[n.sessionId]:[...t,s]},activeLeafBySession:{...e.activeLeafBySession,[n.sessionId]:s.id}}}case"setQueued":return{...e,queuedBySession:{...e.queuedBySession,[n.sessionId]:n.items}}}}let LL=0;function IL(e){return(e.query.queryKey[2]==="listChatSessions"||e.query.queryKey[2]==="getChatMessages")&&(e.type==="removed"||e.type==="updated"&&e.action.type==="success")}rt.getQueryCache().subscribe(e=>{IL(e)&&LL++});const Wmn=e=>rt.getQueryCache().subscribe(n=>{IL(n)&&e()}),Qmn=()=>LL;function Xmn(e,n){const t=rt.getQueryData(Aa(e).queryKey)??[],r=new Set(t.filter(a=>a.busy).map(a=>a.id)),s={messagesBySession:{},queuedBySession:{},activeLeafBySession:{},busySessions:r},i=new Set(r);n&&i.add(n);for(const a of i){const o=rt.getQueryData(Zl(a).queryKey);o&&(s.messagesBySession[a]=o.messages,s.queuedBySession[a]=o.queued,s.activeLeafBySession[a]=o.activeLeafId)}return s}function $L(e,n,t=!1){if(n.type==="busy"){Ja(rt,Aa(e).queryKey,n.sessionId),rt.setQueryData(Aa(e).queryKey,l=>l==null?void 0:l.map(u=>u.id===n.sessionId?{...u,busy:n.busy}:u));return}const r=Zl(n.sessionId);if(gu.has(n.sessionId))return;Ja(rt,r.queryKey,n.type==="upsertMessage"?`message:${n.message.id}`:n.type==="setQueued"?"queued":n.type==="activeLeaf"?"branch":"local");const s=rt.getQueryData(r.queryKey);if(t&&!s)return;const i={messagesBySession:s?{[n.sessionId]:s.messages}:{},queuedBySession:s?{[n.sessionId]:s.queued}:{},activeLeafBySession:s?{[n.sessionId]:s.activeLeafId}:{},busySessions:new Set},a=Kmn(i,n),o={messages:a.messagesBySession[n.sessionId]??[],queued:a.queuedBySession[n.sessionId]??[],activeLeafId:a.activeLeafBySession[n.sessionId]??null};rt.setQueryData(r.queryKey,o)}function Ymn(e,n){const t=!!n&&!gu.has(n??""),r=ft({...Zl(n??""),enabled:t,subscribed:t}),s=A.useSyncExternalStore(Wmn,Qmn),i=A.useMemo(()=>Xmn(e,n),[e,n,s]),a=Ra()[1],o=A.useCallback(l=>{$n(["workspace",a])&&$L(e,l)},[e,a]);return[i,o,r]}const $1=new Map;function Zmn(e,n){let t=$1.get(e);return t||(t=new Set,$1.set(e,t)),t.add(n),()=>{t.delete(n),t.size===0&&$1.delete(e)}}function Jmn(e){var n;(n=$1.get(e.runId))==null||n.forEach(t=>t(e))}const f3=new Set;function Sv(e){return f3.add(e),()=>{f3.delete(e)}}function Tl(e){f3.forEach(n=>n(e))}const d3=new Set;function egn(e){return d3.add(e),()=>{d3.delete(e)}}function Al(){d3.forEach(e=>e())}const h3=new Set;function tgn(e){return h3.add(e),()=>{h3.delete(e)}}function Cz(e){h3.forEach(n=>n(e))}const p3=new Set;function BL(e){return p3.add(e),()=>{p3.delete(e)}}function X2(e){p3.forEach(n=>n(e))}const m3=new Set;function ngn(e){return m3.add(e),()=>{m3.delete(e)}}function Ez(e){m3.forEach(n=>n(e))}const g3=new Set;function rgn(e){return g3.add(e),()=>{g3.delete(e)}}function sgn(e){g3.forEach(n=>n(e))}let v3=!0;const b3=new Set;function ign(e){return b3.add(e),()=>{b3.delete(e)}}function Nz(){return v3}function zz(e){e!==v3&&(v3=e,b3.forEach(n=>n()))}const agn=8e3,ogn=3e3;function lgn(e){const n=A.useRef(e);n.current=e,A.useEffect(()=>{let t=null,r=!1,s,i,a=!1;const o=()=>{t==null||t.close();const l=new EventSource("/api/events");t=l,l.onerror=()=>{r||(a=!0,s??(s=window.setTimeout(()=>zz(!1),agn)),l.readyState===EventSource.CLOSED&&i===void 0&&(i=window.setTimeout(()=>{i=void 0,o()},ogn)))},l.onopen=()=>{var h,_;r||(window.clearTimeout(s),s=void 0,zz(!0),a&&(Tl({type:"reconnected"}),Al(),Cz({harness:"*",authState:"unknown"}),(_=(h=n.current).onReconnect)==null||_.call(h)),a=!0)};const u=h=>{try{return JSON.parse(h.data)}catch{return null}};l.addEventListener("resync.required",()=>{var h,_;Tl({type:"reconnected"}),Al(),(_=(h=n.current).onReconnect)==null||_.call(h)}),l.addEventListener("run.updated",h=>{const _=u(h);_!=null&&_.run&&(Al(),n.current.onRun(_.run))}),l.addEventListener("experiment.updated",h=>{var p,m;const _=u(h);_!=null&&_.experiment&&(Al(),(m=(p=n.current).onExperiment)==null||m.call(p,_.experiment))}),l.addEventListener("project.updated",h=>{var p,m;const _=u(h);_!=null&&_.project&&(Al(),(m=(p=n.current).onProject)==null||m.call(p,_.project))}),l.addEventListener("files.updated",h=>{var p,m;const _=u(h);_!=null&&_.projectId&&((m=(p=n.current).onArtifacts)==null||m.call(p,_.projectId))}),l.addEventListener("run.log",h=>{const _=u(h);_!=null&&_.runId&&Jmn(_)}),l.addEventListener("chat.session",h=>{const _=u(h);_!=null&&_.session&&(Al(),Tl({type:"session",session:_.session}))}),l.addEventListener("chat.session.deleted",h=>{const _=u(h);_!=null&&_.sessionId&&(Al(),Tl({type:"sessionDeleted",sessionId:_.sessionId}))}),l.addEventListener("chat.message",h=>{const _=u(h);_!=null&&_.message&&(Al(),Tl({type:"message",sessionId:_.sessionId,message:_.message}))}),l.addEventListener("chat.busy",h=>{const _=u(h);_!=null&&_.sessionId&&(Al(),Tl({type:"busy",sessionId:_.sessionId,busy:_.busy}))}),l.addEventListener("chat.usage",h=>{const _=u(h);_!=null&&_.sessionId&&_.usage&&Tl({type:"usage",sessionId:_.sessionId,usage:_.usage})}),l.addEventListener("chat.queued",h=>{const _=u(h);_!=null&&_.sessionId&&Tl({type:"queued",sessionId:_.sessionId,items:_.items??[]})}),l.addEventListener("chat.branch",h=>{const _=u(h);_!=null&&_.sessionId&&Tl({type:"branch",sessionId:_.sessionId,activeLeafId:_.activeLeafId??null})}),l.addEventListener("harness.auth",h=>{const _=u(h);_!=null&&_.harness&&_.authState&&Cz(_)}),l.addEventListener("datadir.move.progress",h=>{const _=u(h);_&&X2({type:"progress",..._})}),l.addEventListener("datadir.move.done",h=>{const _=u(h);_&&X2({type:"done",path:_.path,oldPathLeft:_.oldPathLeft})}),l.addEventListener("datadir.move.error",h=>{const _=u(h);_&&X2({type:"error",error:_.error})}),l.addEventListener("update.status",h=>{const _=u(h);_&&sgn(_)}),l.addEventListener("overleaf.live",h=>{const _=u(h);_!=null&&_.key&&_.status&&Ez({type:"live",key:_.key,status:_.status})}),l.addEventListener("overleaf.pulled",h=>{const _=u(h);_!=null&&_.key&&Array.isArray(_.paths)&&Ez({type:"pulled",key:_.key,paths:_.paths})})};return o(),()=>{r=!0,window.clearTimeout(s),window.clearTimeout(i),t==null||t.close()}},[])}const Cv=new Set;function cgn(e){const n=A.useRef(e);n.current=e,A.useEffect(()=>{const t={onRun:r=>n.current.onRun(r),onReconnect:()=>{var r,s;return(s=(r=n.current).onReconnect)==null?void 0:s.call(r)}};return Cv.add(t),()=>{Cv.delete(t)}},[])}const jz={onRun:e=>Cv.forEach(n=>n.onRun(e)),onReconnect:()=>Cv.forEach(e=>{var n;return(n=e.onReconnect)==null?void 0:n.call(e)})},v0=()=>({queryKey:Et("listProjects"),queryFn:({signal:e,client:n,queryKey:t})=>gh(n,t,()=>ipn(e),lm),staleTime:3e4}),ugn=()=>({queryKey:Et("listProjectActivity"),queryFn:({signal:e})=>apn(e),staleTime:3e4}),fm=()=>({queryKey:Et("getUiState"),queryFn:({signal:e})=>opn(e),staleTime:3e5}),Vk=e=>({queryKey:Et("getProjectUiState",e),queryFn:({signal:n})=>lpn(e,n),staleTime:3e5}),Zp=(e="")=>({queryKey:Et("getProjectPathStatus",e),queryFn:({signal:n})=>dpn(e,n),staleTime:3e4}),PL=e=>({queryKey:Et("searchPapers",e),queryFn:({signal:n})=>mpn(e,n),staleTime:3e5}),_gn=()=>({queryKey:Et("githubAccount"),queryFn:({signal:e})=>gpn(e),staleTime:3e5}),fgn=e=>({queryKey:Et("githubProjectRepoPreview",e),queryFn:({signal:n})=>vpn(e,n),staleTime:3e4}),Tz=(e,n)=>({queryKey:Et("repoAccess",e,n),queryFn:({signal:t})=>bpn(e,n,t),staleTime:3e4}),y3=e=>({queryKey:Et("resolvePaper",e),queryFn:({signal:n})=>ypn(e,n),staleTime:36e5}),dgn=(e,n,t,r)=>({queryKey:Et("getProjectStarterPrompts",e,n,t,r),queryFn:({signal:s})=>wpn(e,n,t,r,s),staleTime:3e5,refetchOnWindowFocus:!1,retryOnMount:!1}),x3=e=>({queryKey:Et("listExperiments",e),queryFn:({signal:n,client:t,queryKey:r})=>gh(t,r,()=>Cpn(e,n),lm),staleTime:3e4}),_u=e=>({queryKey:Et("listRuns",e),queryFn:({signal:n,client:t,queryKey:r})=>gh(t,r,()=>Epn(e,n),lm),staleTime:3e4});function Gg(e,n){if(!e)return;const t=e.find(r=>r.id===n.id);return t&&t.updatedAt>n.updatedAt?e:t?e.map(r=>r.id===n.id?n:r):[...e,n]}function Az(){const e=Ra();return lgn({onRun(n){var r;if(!$n(e))return;const t=(r=rt.getQueryData(_u(n.projectId).queryKey))==null?void 0:r.find(s=>s.id===n.id);Ja(rt,_u(n.projectId).queryKey,n.id),rt.setQueryData(_u(n.projectId).queryKey,s=>Gg(s,n)),(t==null?void 0:t.commitSha)!==n.commitSha&&(Ca(["getRunDiff"],e,s=>s.queryKey[3]===n.id),Ca(["getExperimentDiff"],e,s=>s.queryKey[3]===n.experimentId)),jz.onRun(n)},onExperiment(n){$n(e)&&(Ja(rt,x3(n.projectId).queryKey,n.id),rt.setQueryData(x3(n.projectId).queryKey,t=>Gg(t,n)),Ca(["getProjectStarterPrompts"],e,t=>t.queryKey[3]===n.projectId),Ca(["getExperimentDiff"],e,t=>t.queryKey[3]===n.id),Ca(["getRunDiff"],e,t=>{var r;return((r=rt.getQueryData(_u(n.projectId).queryKey))==null?void 0:r.some(s=>s.experimentId===n.id&&s.id===t.queryKey[3]))??!1}))},onProject(n){$n(e)&&(Ja(rt,v0().queryKey,n.id),rt.setQueryData(v0().queryKey,t=>Gg(t,n)))},onArtifacts(n){$n(e)&&(Ca(Nk,e,t=>t.queryKey[3]===n),Ca(["resolvedFile"],e,t=>t.queryKey[3]===n&&t.queryKey[5]==="artifacts"))},onReconnect(){$n(e)&&(Ca(MW,e),jz.onReconnect())}}),A.useEffect(()=>{let n;const t=egn(()=>{n??(n=setTimeout(()=>{n=void 0,Ca(["listProjectActivity"],e)},100))}),r=BL(o=>{o.type==="done"&&Ca(["getDataDir"],e)}),s=Sv(o=>{$n(e)&&(o.type==="session"?Ja(rt,Aa(o.session.projectId).queryKey,o.session.id):(o.type==="busy"||o.type==="usage")&&Ja(rt,[...e,"listChatSessions"],o.sessionId),(o.type==="message"||o.type==="queued"||o.type==="branch")&&$L("",o.type==="message"?{type:"upsertMessage",sessionId:o.sessionId,message:o.message}:o.type==="queued"?{type:"setQueued",sessionId:o.sessionId,items:o.items}:{type:"activeLeaf",sessionId:o.sessionId,leafId:o.activeLeafId},!0),o.type==="session"&&!gu.has(o.session.id)?rt.setQueryData(Aa(o.session.projectId).queryKey,l=>{if(!l)return;const u=l.find(h=>h.id===o.session.id);return u?Gg(l,{...o.session,contextUsage:o.session.contextUsage??u.contextUsage}):[o.session,...l]}):o.type==="sessionDeleted"?gb(o.sessionId):(o.type==="busy"||o.type==="usage")&&rt.setQueriesData({queryKey:[...e,"listChatSessions"]},l=>l==null?void 0:l.map(u=>u.id!==o.sessionId?u:o.type==="busy"?{...u,busy:o.busy}:{...u,contextUsage:o.usage})))}),i=tgn(()=>{$n(e)&&Xd(!0).catch(()=>{})}),a=rgn(o=>{$n(e)&&(Ja(rt,kv().queryKey),rt.setQueryData(kv().queryKey,o))});return()=>{clearTimeout(n),t(),r(),s(),i(),a()}},[e[1]]),null}const w3=new Set;function FL(e){if(e!==z()){GO(e,{reload:!1}),document.documentElement.lang=e;for(const n of w3)n()}}function hgn(e){return w3.add(e),()=>w3.delete(e)}function sf(){return A.useSyncExternalStore(hgn,z,z)}const HL="orx:theme";function pgn(){try{const e=localStorage.getItem(HL);if(e==="light"||e==="dark"||e==="system")return e}catch{}return"system"}let Yd=pgn();const k3=new Set;function mgn(e){return e!=="system"?e:window.matchMedia("(prefers-color-scheme: dark)").matches?"dark":"light"}function Kk(){document.documentElement.dataset.theme=mgn(Yd)}function qL(e){Yd=e;try{localStorage.setItem(HL,e)}catch{}Kk();for(const n of k3)n()}function ggn(){return Yd}window.matchMedia("(prefers-color-scheme: dark)").addEventListener("change",()=>{Yd==="system"&&Kk()});Kk();function vgn(e){return k3.add(e),()=>k3.delete(e)}function UL(){return[A.useSyncExternalStore(vgn,()=>Yd,()=>Yd),qL]}const bgn=(e,n)=>{const t=new Array(e.length+n.length);for(let r=0;r({classGroupId:e,validator:n}),GL=(e=new Map,n=null,t)=>({nextPart:e,validators:n,classGroupId:t}),Ev="-",Rz=[],xgn="arbitrary..",wgn=e=>{const n=Sgn(e),{conflictingClassGroups:t,conflictingClassGroupModifiers:r}=e;return{getClassGroupId:a=>{if(a.startsWith("[")&&a.endsWith("]"))return kgn(a);const o=a.split(Ev),l=o[0]===""&&o.length>1?1:0;return VL(o,l,n)},getConflictingClassGroupIds:(a,o)=>{if(o){const l=r[a],u=t[a];return l?u?bgn(u,l):l:u||Rz}return t[a]||Rz}}},VL=(e,n,t)=>{if(e.length-n===0)return t.classGroupId;const s=e[n],i=t.nextPart.get(s);if(i){const u=VL(e,n+1,i);if(u)return u}const a=t.validators;if(a===null)return;const o=n===0?e.join(Ev):e.slice(n).join(Ev),l=a.length;for(let u=0;ue.slice(1,-1).indexOf(":")===-1?void 0:(()=>{const n=e.slice(1,-1),t=n.indexOf(":"),r=n.slice(0,t);return r?xgn+r:void 0})(),Sgn=e=>{const{theme:n,classGroups:t}=e;return Cgn(t,n)},Cgn=(e,n)=>{const t=GL();for(const r in e){const s=e[r];Wk(s,t,r,n)}return t},Wk=(e,n,t,r)=>{const s=e.length;for(let i=0;i{if(typeof e=="string"){Ngn(e,n,t);return}if(typeof e=="function"){zgn(e,n,t,r);return}jgn(e,n,t,r)},Ngn=(e,n,t)=>{const r=e===""?n:KL(n,e);r.classGroupId=t},zgn=(e,n,t,r)=>{if(Tgn(e)){Wk(e(r),n,t,r);return}n.validators===null&&(n.validators=[]),n.validators.push(ygn(t,e))},jgn=(e,n,t,r)=>{const s=Object.entries(e),i=s.length;for(let a=0;a{let t=e;const r=n.split(Ev),s=r.length;for(let i=0;i"isThemeGetter"in e&&e.isThemeGetter===!0,Agn=e=>{if(e<1)return{get:()=>{},set:()=>{}};let n=0,t=Object.create(null),r=Object.create(null);const s=(i,a)=>{t[i]=a,n++,n>e&&(n=0,r=t,t=Object.create(null))};return{get(i){let a=t[i];if(a!==void 0)return a;if((a=r[i])!==void 0)return s(i,a),a},set(i,a){i in t?t[i]=a:s(i,a)}}},S3="!",Mz=":",Rgn=[],Oz=(e,n,t,r,s)=>({modifiers:e,hasImportantModifier:n,baseClassName:t,maybePostfixModifierPosition:r,isExternal:s}),Mgn=e=>{const{prefix:n,experimentalParseClassName:t}=e;let r=s=>{const i=[];let a=0,o=0,l=0,u;const h=s.length;for(let k=0;kl?u-l:void 0;return Oz(i,m,p,x)};if(n){const s=n+Mz,i=r;r=a=>a.startsWith(s)?i(a.slice(s.length)):Oz(Rgn,!1,a,void 0,!0)}if(t){const s=r;r=i=>t({className:i,parseClassName:s})}return r},Ogn=e=>{const n=new Map;return e.orderSensitiveModifiers.forEach((t,r)=>{n.set(t,1e6+r)}),t=>{const r=[];let s=[];for(let i=0;i0&&(s.sort(),r.push(...s),s=[]),r.push(a)):s.push(a)}return s.length>0&&(s.sort(),r.push(...s)),r}},Dgn=e=>({cache:Agn(e.cacheSize),parseClassName:Mgn(e),sortModifiers:Ogn(e),postfixLookupClassGroupIds:Lgn(e),...wgn(e)}),Lgn=e=>{const n=Object.create(null),t=e.postfixLookupClassGroups;if(t)for(let r=0;r{const{parseClassName:t,getClassGroupId:r,getConflictingClassGroupIds:s,sortModifiers:i,postfixLookupClassGroupIds:a}=n,o=[],l=e.trim().split(Ign);let u="";for(let h=l.length-1;h>=0;h-=1){const _=l[h],{isExternal:p,modifiers:m,hasImportantModifier:x,baseClassName:k,maybePostfixModifierPosition:v}=t(_);if(p){u=_+(u.length>0?" "+u:u);continue}let b=!!v,w;if(b){const T=k.substring(0,v);w=r(T);const j=w&&a[w]?r(k):void 0;j&&j!==w&&(w=j,b=!1)}else w=r(k);if(!w){if(!b){u=_+(u.length>0?" "+u:u);continue}if(w=r(k),!w){u=_+(u.length>0?" "+u:u);continue}b=!1}const y=m.length===0?"":m.length===1?m[0]:i(m).join(":"),C=x?y+S3:y,N=C+w;if(o.indexOf(N)>-1)continue;o.push(N);const E=s(w,b);for(let T=0;T0?" "+u:u)}return u},Bgn=(...e)=>{let n=0,t,r,s="";for(;n{if(typeof e=="string")return e;let n,t="";for(let r=0;r{let t,r,s,i;const a=l=>{const u=n.reduce((h,_)=>_(h),e());return t=Dgn(u),r=t.cache.get,s=t.cache.set,i=o,o(l)},o=l=>{const u=r(l);if(u)return u;const h=$gn(l,t);return s(l,h),h};return i=a,(...l)=>i(Bgn(...l))},Pgn=[],ps=e=>{const n=t=>t[e]||Pgn;return n.isThemeGetter=!0,n},QL=/^\[(?:(\w[\w-]*):)?(.+)\]$/i,XL=/^\((?:(\w[\w-]*):)?(.+)\)$/i,Fgn=/^\d+(?:\.\d+)?\/\d+(?:\.\d+)?$/,Hgn=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,qgn=/\d+(%|px|r?em|[sdl]?v([hwib]|min|max)|pt|pc|in|cm|mm|cap|ch|ex|r?lh|cq(w|h|i|b|min|max))|\b(calc|min|max|clamp)\(.+\)|^0$/,Ugn=/^(rgba?|hsla?|hwb|(ok)?(lab|lch)|color-mix)\(.+\)$/,Ggn=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,Vgn=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/,Gc=e=>Fgn.test(e),dn=e=>!!e&&!Number.isNaN(Number(e)),No=e=>!!e&&Number.isInteger(Number(e)),Y2=e=>e.endsWith("%")&&dn(e.slice(0,-1)),Rl=e=>Hgn.test(e),YL=()=>!0,Kgn=e=>qgn.test(e)&&!Ugn.test(e),Qk=()=>!1,Wgn=e=>Ggn.test(e),Qgn=e=>Vgn.test(e),Xgn=e=>!pt(e)&&!vt(e),Ygn=e=>e.startsWith("@container")&&(e[10]==="/"&&e[11]!==void 0||e[11]==="s"&&e[16]!==void 0&&e.startsWith("-size/",10)||e[11]==="n"&&e[18]!==void 0&&e.startsWith("-normal/",10)),Zgn=e=>Tu(e,eI,Qk),pt=e=>QL.test(e),r_=e=>Tu(e,tI,Kgn),Lz=e=>Tu(e,a1n,dn),Jgn=e=>Tu(e,rI,YL),e1n=e=>Tu(e,nI,Qk),Iz=e=>Tu(e,ZL,Qk),t1n=e=>Tu(e,JL,Qgn),Vg=e=>Tu(e,sI,Wgn),vt=e=>XL.test(e),Cp=e=>af(e,tI),n1n=e=>af(e,nI),$z=e=>af(e,ZL),r1n=e=>af(e,eI),s1n=e=>af(e,JL),Kg=e=>af(e,sI,!0),i1n=e=>af(e,rI,!0),Tu=(e,n,t)=>{const r=QL.exec(e);return r?r[1]?n(r[1]):t(r[2]):!1},af=(e,n,t=!1)=>{const r=XL.exec(e);return r?r[1]?n(r[1]):t:!1},ZL=e=>e==="position"||e==="percentage",JL=e=>e==="image"||e==="url",eI=e=>e==="length"||e==="size"||e==="bg-size",tI=e=>e==="length",a1n=e=>e==="number",nI=e=>e==="family-name",rI=e=>e==="number"||e==="weight",sI=e=>e==="shadow",Bz=()=>{const e=ps("color"),n=ps("font"),t=ps("text"),r=ps("font-weight"),s=ps("tracking"),i=ps("leading"),a=ps("breakpoint"),o=ps("container"),l=ps("spacing"),u=ps("radius"),h=ps("shadow"),_=ps("inset-shadow"),p=ps("text-shadow"),m=ps("drop-shadow"),x=ps("blur"),k=ps("perspective"),v=ps("aspect"),b=ps("ease"),w=ps("animate"),y=()=>["auto","avoid","all","avoid-page","page","left","right","column"],C=()=>["center","top","bottom","left","right","top-left","left-top","top-right","right-top","bottom-right","right-bottom","bottom-left","left-bottom"],N=()=>[...C(),vt,pt],E=()=>["auto","hidden","clip","visible","scroll"],T=()=>["auto","contain","none"],j=()=>[vt,pt,l],M=()=>[Gc,"full","auto",...j()],D=()=>[No,"none","subgrid",vt,pt],I=()=>["auto",{span:["full",No,vt,pt]},No,vt,pt],P=()=>[No,"auto",vt,pt],U=()=>["auto","min","max","fr",vt,pt],q=()=>["start","end","center","between","around","evenly","stretch","baseline","center-safe","end-safe"],W=()=>["start","end","center","stretch","center-safe","end-safe"],H=()=>["auto",...j()],Y=()=>[Gc,"auto","full","dvw","dvh","lvw","lvh","svw","svh","min","max","fit",...j()],te=()=>[Gc,"screen","full","dvw","lvw","svw","min","max","fit",...j()],$=()=>[Gc,"screen","full","lh","dvh","lvh","svh","min","max","fit",...j()],L=()=>[e,vt,pt],F=()=>[...C(),$z,Iz,{position:[vt,pt]}],G=()=>["no-repeat",{repeat:["","x","y","space","round"]}],V=()=>["auto","cover","contain",r1n,Zgn,{size:[vt,pt]}],ee=()=>[Y2,Cp,r_],ce=()=>["","none","full",u,vt,pt],ae=()=>["",dn,Cp,r_],se=()=>["solid","dashed","dotted","double"],X=()=>["normal","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","hue","saturation","color","luminosity"],oe=()=>[dn,Y2,$z,Iz],le=()=>["","none",x,vt,pt],_e=()=>["none",dn,vt,pt],pe=()=>["none",dn,vt,pt],Ee=()=>[dn,vt,pt],Ie=()=>[Gc,"full",...j()];return{cacheSize:500,theme:{animate:["spin","ping","pulse","bounce"],aspect:["video"],blur:[Rl],breakpoint:[Rl],color:[YL],container:[Rl],"drop-shadow":[Rl],ease:["in","out","in-out"],font:[Xgn],"font-weight":["thin","extralight","light","normal","medium","semibold","bold","extrabold","black"],"inset-shadow":[Rl],leading:["none","tight","snug","normal","relaxed","loose"],perspective:["dramatic","near","normal","midrange","distant","none"],radius:[Rl],shadow:[Rl],spacing:["px",dn],text:[Rl],"text-shadow":[Rl],tracking:["tighter","tight","normal","wide","wider","widest"]},classGroups:{aspect:[{aspect:["auto","square",Gc,pt,vt,v]}],container:["container"],"container-type":[{"@container":["","normal","size",vt,pt]}],"container-named":[Ygn],columns:[{columns:[dn,pt,vt,o]}],"break-after":[{"break-after":y()}],"break-before":[{"break-before":y()}],"break-inside":[{"break-inside":["auto","avoid","avoid-page","avoid-column"]}],"box-decoration":[{"box-decoration":["slice","clone"]}],box:[{box:["border","content"]}],display:["block","inline-block","inline","flex","inline-flex","table","inline-table","table-caption","table-cell","table-column","table-column-group","table-footer-group","table-header-group","table-row-group","table-row","flow-root","grid","inline-grid","contents","list-item","hidden"],sr:["sr-only","not-sr-only"],float:[{float:["right","left","none","start","end"]}],clear:[{clear:["left","right","both","none","start","end"]}],isolation:["isolate","isolation-auto"],"object-fit":[{object:["contain","cover","fill","none","scale-down"]}],"object-position":[{object:N()}],overflow:[{overflow:E()}],"overflow-x":[{"overflow-x":E()}],"overflow-y":[{"overflow-y":E()}],overscroll:[{overscroll:T()}],"overscroll-x":[{"overscroll-x":T()}],"overscroll-y":[{"overscroll-y":T()}],position:["static","fixed","absolute","relative","sticky"],inset:[{inset:M()}],"inset-x":[{"inset-x":M()}],"inset-y":[{"inset-y":M()}],start:[{"inset-s":M(),start:M()}],end:[{"inset-e":M(),end:M()}],"inset-bs":[{"inset-bs":M()}],"inset-be":[{"inset-be":M()}],top:[{top:M()}],right:[{right:M()}],bottom:[{bottom:M()}],left:[{left:M()}],visibility:["visible","invisible","collapse"],z:[{z:[No,"auto",vt,pt]}],basis:[{basis:[Gc,"full","auto",o,...j()]}],"flex-direction":[{flex:["row","row-reverse","col","col-reverse"]}],"flex-wrap":[{flex:["nowrap","wrap","wrap-reverse"]}],flex:[{flex:[dn,Gc,"auto","initial","none",pt]}],grow:[{grow:["",dn,vt,pt]}],shrink:[{shrink:["",dn,vt,pt]}],order:[{order:[No,"first","last","none",vt,pt]}],"grid-cols":[{"grid-cols":D()}],"col-start-end":[{col:I()}],"col-start":[{"col-start":P()}],"col-end":[{"col-end":P()}],"grid-rows":[{"grid-rows":D()}],"row-start-end":[{row:I()}],"row-start":[{"row-start":P()}],"row-end":[{"row-end":P()}],"grid-flow":[{"grid-flow":["row","col","dense","row-dense","col-dense"]}],"auto-cols":[{"auto-cols":U()}],"auto-rows":[{"auto-rows":U()}],gap:[{gap:j()}],"gap-x":[{"gap-x":j()}],"gap-y":[{"gap-y":j()}],"justify-content":[{justify:[...q(),"normal"]}],"justify-items":[{"justify-items":[...W(),"normal"]}],"justify-self":[{"justify-self":["auto",...W()]}],"align-content":[{content:["normal",...q()]}],"align-items":[{items:[...W(),{baseline:["","last"]}]}],"align-self":[{self:["auto",...W(),{baseline:["","last"]}]}],"place-content":[{"place-content":q()}],"place-items":[{"place-items":[...W(),"baseline"]}],"place-self":[{"place-self":["auto",...W()]}],p:[{p:j()}],px:[{px:j()}],py:[{py:j()}],ps:[{ps:j()}],pe:[{pe:j()}],pbs:[{pbs:j()}],pbe:[{pbe:j()}],pt:[{pt:j()}],pr:[{pr:j()}],pb:[{pb:j()}],pl:[{pl:j()}],m:[{m:H()}],mx:[{mx:H()}],my:[{my:H()}],ms:[{ms:H()}],me:[{me:H()}],mbs:[{mbs:H()}],mbe:[{mbe:H()}],mt:[{mt:H()}],mr:[{mr:H()}],mb:[{mb:H()}],ml:[{ml:H()}],"space-x":[{"space-x":j()}],"space-x-reverse":["space-x-reverse"],"space-y":[{"space-y":j()}],"space-y-reverse":["space-y-reverse"],size:[{size:Y()}],"inline-size":[{inline:["auto",...te()]}],"min-inline-size":[{"min-inline":["auto",...te()]}],"max-inline-size":[{"max-inline":["none",...te()]}],"block-size":[{block:["auto",...$()]}],"min-block-size":[{"min-block":["auto",...$()]}],"max-block-size":[{"max-block":["none",...$()]}],w:[{w:[o,"screen",...Y()]}],"min-w":[{"min-w":[o,"screen","none",...Y()]}],"max-w":[{"max-w":[o,"screen","none","prose",{screen:[a]},...Y()]}],h:[{h:["screen","lh",...Y()]}],"min-h":[{"min-h":["screen","lh","none",...Y()]}],"max-h":[{"max-h":["screen","lh",...Y()]}],"font-size":[{text:["base",t,Cp,r_]}],"font-smoothing":["antialiased","subpixel-antialiased"],"font-style":["italic","not-italic"],"font-weight":[{font:[r,i1n,Jgn]}],"font-stretch":[{"font-stretch":["ultra-condensed","extra-condensed","condensed","semi-condensed","normal","semi-expanded","expanded","extra-expanded","ultra-expanded",Y2,pt]}],"font-family":[{font:[n1n,e1n,n]}],"font-features":[{"font-features":[pt]}],"fvn-normal":["normal-nums"],"fvn-ordinal":["ordinal"],"fvn-slashed-zero":["slashed-zero"],"fvn-figure":["lining-nums","oldstyle-nums"],"fvn-spacing":["proportional-nums","tabular-nums"],"fvn-fraction":["diagonal-fractions","stacked-fractions"],tracking:[{tracking:[s,vt,pt]}],"line-clamp":[{"line-clamp":[dn,"none",vt,Lz]}],leading:[{leading:[i,...j()]}],"list-image":[{"list-image":["none",vt,pt]}],"list-style-position":[{list:["inside","outside"]}],"list-style-type":[{list:["disc","decimal","none",vt,pt]}],"text-alignment":[{text:["left","center","right","justify","start","end"]}],"placeholder-color":[{placeholder:L()}],"text-color":[{text:L()}],"text-decoration":["underline","overline","line-through","no-underline"],"text-decoration-style":[{decoration:[...se(),"wavy"]}],"text-decoration-thickness":[{decoration:[dn,"from-font","auto",vt,r_]}],"text-decoration-color":[{decoration:L()}],"underline-offset":[{"underline-offset":[dn,"auto",vt,pt]}],"text-transform":["uppercase","lowercase","capitalize","normal-case"],"text-overflow":["truncate","text-ellipsis","text-clip"],"text-wrap":[{text:["wrap","nowrap","balance","pretty"]}],indent:[{indent:j()}],"tab-size":[{tab:[No,vt,pt]}],"vertical-align":[{align:["baseline","top","middle","bottom","text-top","text-bottom","sub","super",vt,pt]}],whitespace:[{whitespace:["normal","nowrap","pre","pre-line","pre-wrap","break-spaces"]}],break:[{break:["normal","words","all","keep"]}],wrap:[{wrap:["break-word","anywhere","normal"]}],hyphens:[{hyphens:["none","manual","auto"]}],content:[{content:["none",vt,pt]}],"bg-attachment":[{bg:["fixed","local","scroll"]}],"bg-clip":[{"bg-clip":["border","padding","content","text"]}],"bg-origin":[{"bg-origin":["border","padding","content"]}],"bg-position":[{bg:F()}],"bg-repeat":[{bg:G()}],"bg-size":[{bg:V()}],"bg-image":[{bg:["none",{linear:[{to:["t","tr","r","br","b","bl","l","tl"]},No,vt,pt],radial:["",vt,pt],conic:[No,vt,pt]},s1n,t1n]}],"bg-color":[{bg:L()}],"gradient-from-pos":[{from:ee()}],"gradient-via-pos":[{via:ee()}],"gradient-to-pos":[{to:ee()}],"gradient-from":[{from:L()}],"gradient-via":[{via:L()}],"gradient-to":[{to:L()}],rounded:[{rounded:ce()}],"rounded-s":[{"rounded-s":ce()}],"rounded-e":[{"rounded-e":ce()}],"rounded-t":[{"rounded-t":ce()}],"rounded-r":[{"rounded-r":ce()}],"rounded-b":[{"rounded-b":ce()}],"rounded-l":[{"rounded-l":ce()}],"rounded-ss":[{"rounded-ss":ce()}],"rounded-se":[{"rounded-se":ce()}],"rounded-ee":[{"rounded-ee":ce()}],"rounded-es":[{"rounded-es":ce()}],"rounded-tl":[{"rounded-tl":ce()}],"rounded-tr":[{"rounded-tr":ce()}],"rounded-br":[{"rounded-br":ce()}],"rounded-bl":[{"rounded-bl":ce()}],"border-w":[{border:ae()}],"border-w-x":[{"border-x":ae()}],"border-w-y":[{"border-y":ae()}],"border-w-s":[{"border-s":ae()}],"border-w-e":[{"border-e":ae()}],"border-w-bs":[{"border-bs":ae()}],"border-w-be":[{"border-be":ae()}],"border-w-t":[{"border-t":ae()}],"border-w-r":[{"border-r":ae()}],"border-w-b":[{"border-b":ae()}],"border-w-l":[{"border-l":ae()}],"divide-x":[{"divide-x":ae()}],"divide-x-reverse":["divide-x-reverse"],"divide-y":[{"divide-y":ae()}],"divide-y-reverse":["divide-y-reverse"],"border-style":[{border:[...se(),"hidden","none"]}],"divide-style":[{divide:[...se(),"hidden","none"]}],"border-color":[{border:L()}],"border-color-x":[{"border-x":L()}],"border-color-y":[{"border-y":L()}],"border-color-s":[{"border-s":L()}],"border-color-e":[{"border-e":L()}],"border-color-bs":[{"border-bs":L()}],"border-color-be":[{"border-be":L()}],"border-color-t":[{"border-t":L()}],"border-color-r":[{"border-r":L()}],"border-color-b":[{"border-b":L()}],"border-color-l":[{"border-l":L()}],"divide-color":[{divide:L()}],"outline-style":[{outline:[...se(),"none","hidden"]}],"outline-offset":[{"outline-offset":[dn,vt,pt]}],"outline-w":[{outline:["",dn,Cp,r_]}],"outline-color":[{outline:L()}],shadow:[{shadow:["","none",h,Kg,Vg]}],"shadow-color":[{shadow:L()}],"inset-shadow":[{"inset-shadow":["none",_,Kg,Vg]}],"inset-shadow-color":[{"inset-shadow":L()}],"ring-w":[{ring:ae()}],"ring-w-inset":["ring-inset"],"ring-color":[{ring:L()}],"ring-offset-w":[{"ring-offset":[dn,r_]}],"ring-offset-color":[{"ring-offset":L()}],"inset-ring-w":[{"inset-ring":ae()}],"inset-ring-color":[{"inset-ring":L()}],"text-shadow":[{"text-shadow":["none",p,Kg,Vg]}],"text-shadow-color":[{"text-shadow":L()}],opacity:[{opacity:[dn,vt,pt]}],"mix-blend":[{"mix-blend":[...X(),"plus-darker","plus-lighter"]}],"bg-blend":[{"bg-blend":X()}],"mask-clip":[{"mask-clip":["border","padding","content","fill","stroke","view"]},"mask-no-clip"],"mask-composite":[{mask:["add","subtract","intersect","exclude"]}],"mask-image-linear-pos":[{"mask-linear":[dn]}],"mask-image-linear-from-pos":[{"mask-linear-from":oe()}],"mask-image-linear-to-pos":[{"mask-linear-to":oe()}],"mask-image-linear-from-color":[{"mask-linear-from":L()}],"mask-image-linear-to-color":[{"mask-linear-to":L()}],"mask-image-t-from-pos":[{"mask-t-from":oe()}],"mask-image-t-to-pos":[{"mask-t-to":oe()}],"mask-image-t-from-color":[{"mask-t-from":L()}],"mask-image-t-to-color":[{"mask-t-to":L()}],"mask-image-r-from-pos":[{"mask-r-from":oe()}],"mask-image-r-to-pos":[{"mask-r-to":oe()}],"mask-image-r-from-color":[{"mask-r-from":L()}],"mask-image-r-to-color":[{"mask-r-to":L()}],"mask-image-b-from-pos":[{"mask-b-from":oe()}],"mask-image-b-to-pos":[{"mask-b-to":oe()}],"mask-image-b-from-color":[{"mask-b-from":L()}],"mask-image-b-to-color":[{"mask-b-to":L()}],"mask-image-l-from-pos":[{"mask-l-from":oe()}],"mask-image-l-to-pos":[{"mask-l-to":oe()}],"mask-image-l-from-color":[{"mask-l-from":L()}],"mask-image-l-to-color":[{"mask-l-to":L()}],"mask-image-x-from-pos":[{"mask-x-from":oe()}],"mask-image-x-to-pos":[{"mask-x-to":oe()}],"mask-image-x-from-color":[{"mask-x-from":L()}],"mask-image-x-to-color":[{"mask-x-to":L()}],"mask-image-y-from-pos":[{"mask-y-from":oe()}],"mask-image-y-to-pos":[{"mask-y-to":oe()}],"mask-image-y-from-color":[{"mask-y-from":L()}],"mask-image-y-to-color":[{"mask-y-to":L()}],"mask-image-radial":[{"mask-radial":[vt,pt]}],"mask-image-radial-from-pos":[{"mask-radial-from":oe()}],"mask-image-radial-to-pos":[{"mask-radial-to":oe()}],"mask-image-radial-from-color":[{"mask-radial-from":L()}],"mask-image-radial-to-color":[{"mask-radial-to":L()}],"mask-image-radial-shape":[{"mask-radial":["circle","ellipse"]}],"mask-image-radial-size":[{"mask-radial":[{closest:["side","corner"],farthest:["side","corner"]}]}],"mask-image-radial-pos":[{"mask-radial-at":C()}],"mask-image-conic-pos":[{"mask-conic":[dn]}],"mask-image-conic-from-pos":[{"mask-conic-from":oe()}],"mask-image-conic-to-pos":[{"mask-conic-to":oe()}],"mask-image-conic-from-color":[{"mask-conic-from":L()}],"mask-image-conic-to-color":[{"mask-conic-to":L()}],"mask-mode":[{mask:["alpha","luminance","match"]}],"mask-origin":[{"mask-origin":["border","padding","content","fill","stroke","view"]}],"mask-position":[{mask:F()}],"mask-repeat":[{mask:G()}],"mask-size":[{mask:V()}],"mask-type":[{"mask-type":["alpha","luminance"]}],"mask-image":[{mask:["none",vt,pt]}],filter:[{filter:["","none",vt,pt]}],blur:[{blur:le()}],brightness:[{brightness:[dn,vt,pt]}],contrast:[{contrast:[dn,vt,pt]}],"drop-shadow":[{"drop-shadow":["","none",m,Kg,Vg]}],"drop-shadow-color":[{"drop-shadow":L()}],grayscale:[{grayscale:["",dn,vt,pt]}],"hue-rotate":[{"hue-rotate":[dn,vt,pt]}],invert:[{invert:["",dn,vt,pt]}],saturate:[{saturate:[dn,vt,pt]}],sepia:[{sepia:["",dn,vt,pt]}],"backdrop-filter":[{"backdrop-filter":["","none",vt,pt]}],"backdrop-blur":[{"backdrop-blur":le()}],"backdrop-brightness":[{"backdrop-brightness":[dn,vt,pt]}],"backdrop-contrast":[{"backdrop-contrast":[dn,vt,pt]}],"backdrop-grayscale":[{"backdrop-grayscale":["",dn,vt,pt]}],"backdrop-hue-rotate":[{"backdrop-hue-rotate":[dn,vt,pt]}],"backdrop-invert":[{"backdrop-invert":["",dn,vt,pt]}],"backdrop-opacity":[{"backdrop-opacity":[dn,vt,pt]}],"backdrop-saturate":[{"backdrop-saturate":[dn,vt,pt]}],"backdrop-sepia":[{"backdrop-sepia":["",dn,vt,pt]}],"border-collapse":[{border:["collapse","separate"]}],"border-spacing":[{"border-spacing":j()}],"border-spacing-x":[{"border-spacing-x":j()}],"border-spacing-y":[{"border-spacing-y":j()}],"table-layout":[{table:["auto","fixed"]}],caption:[{caption:["top","bottom"]}],transition:[{transition:["","all","colors","opacity","shadow","transform","none",vt,pt]}],"transition-behavior":[{transition:["normal","discrete"]}],duration:[{duration:[dn,"initial",vt,pt]}],ease:[{ease:["linear","initial",b,vt,pt]}],delay:[{delay:[dn,vt,pt]}],animate:[{animate:["none",w,vt,pt]}],backface:[{backface:["hidden","visible"]}],perspective:[{perspective:[k,vt,pt]}],"perspective-origin":[{"perspective-origin":N()}],rotate:[{rotate:_e()}],"rotate-x":[{"rotate-x":_e()}],"rotate-y":[{"rotate-y":_e()}],"rotate-z":[{"rotate-z":_e()}],scale:[{scale:pe()}],"scale-x":[{"scale-x":pe()}],"scale-y":[{"scale-y":pe()}],"scale-z":[{"scale-z":pe()}],"scale-3d":["scale-3d"],skew:[{skew:Ee()}],"skew-x":[{"skew-x":Ee()}],"skew-y":[{"skew-y":Ee()}],transform:[{transform:[vt,pt,"","none","gpu","cpu"]}],"transform-origin":[{origin:N()}],"transform-style":[{transform:["3d","flat"]}],translate:[{translate:Ie()}],"translate-x":[{"translate-x":Ie()}],"translate-y":[{"translate-y":Ie()}],"translate-z":[{"translate-z":Ie()}],"translate-none":["translate-none"],zoom:[{zoom:[No,vt,pt]}],accent:[{accent:L()}],appearance:[{appearance:["none","auto"]}],"caret-color":[{caret:L()}],"color-scheme":[{scheme:["normal","dark","light","light-dark","only-dark","only-light"]}],cursor:[{cursor:["auto","default","pointer","wait","text","move","help","not-allowed","none","context-menu","progress","cell","crosshair","vertical-text","alias","copy","no-drop","grab","grabbing","all-scroll","col-resize","row-resize","n-resize","e-resize","s-resize","w-resize","ne-resize","nw-resize","se-resize","sw-resize","ew-resize","ns-resize","nesw-resize","nwse-resize","zoom-in","zoom-out",vt,pt]}],"field-sizing":[{"field-sizing":["fixed","content"]}],"pointer-events":[{"pointer-events":["auto","none"]}],resize:[{resize:["none","","y","x"]}],"scroll-behavior":[{scroll:["auto","smooth"]}],"scrollbar-thumb-color":[{"scrollbar-thumb":L()}],"scrollbar-track-color":[{"scrollbar-track":L()}],"scrollbar-gutter":[{"scrollbar-gutter":["auto","stable","both"]}],"scrollbar-w":[{scrollbar:["auto","thin","none"]}],"scroll-m":[{"scroll-m":j()}],"scroll-mx":[{"scroll-mx":j()}],"scroll-my":[{"scroll-my":j()}],"scroll-ms":[{"scroll-ms":j()}],"scroll-me":[{"scroll-me":j()}],"scroll-mbs":[{"scroll-mbs":j()}],"scroll-mbe":[{"scroll-mbe":j()}],"scroll-mt":[{"scroll-mt":j()}],"scroll-mr":[{"scroll-mr":j()}],"scroll-mb":[{"scroll-mb":j()}],"scroll-ml":[{"scroll-ml":j()}],"scroll-p":[{"scroll-p":j()}],"scroll-px":[{"scroll-px":j()}],"scroll-py":[{"scroll-py":j()}],"scroll-ps":[{"scroll-ps":j()}],"scroll-pe":[{"scroll-pe":j()}],"scroll-pbs":[{"scroll-pbs":j()}],"scroll-pbe":[{"scroll-pbe":j()}],"scroll-pt":[{"scroll-pt":j()}],"scroll-pr":[{"scroll-pr":j()}],"scroll-pb":[{"scroll-pb":j()}],"scroll-pl":[{"scroll-pl":j()}],"snap-align":[{snap:["start","end","center","align-none"]}],"snap-stop":[{snap:["normal","always"]}],"snap-type":[{snap:["none","x","y","both"]}],"snap-strictness":[{snap:["mandatory","proximity"]}],touch:[{touch:["auto","none","manipulation"]}],"touch-x":[{"touch-pan":["x","left","right"]}],"touch-y":[{"touch-pan":["y","up","down"]}],"touch-pz":["touch-pinch-zoom"],select:[{select:["none","text","all","auto"]}],"will-change":[{"will-change":["auto","scroll","contents","transform",vt,pt]}],fill:[{fill:["none",...L()]}],"stroke-w":[{stroke:[dn,Cp,r_,Lz]}],stroke:[{stroke:["none",...L()]}],"forced-color-adjust":[{"forced-color-adjust":["auto","none"]}]},conflictingClassGroups:{"container-named":["container-type"],overflow:["overflow-x","overflow-y"],overscroll:["overscroll-x","overscroll-y"],inset:["inset-x","inset-y","inset-bs","inset-be","start","end","top","right","bottom","left"],"inset-x":["right","left"],"inset-y":["top","bottom"],flex:["basis","grow","shrink"],gap:["gap-x","gap-y"],p:["px","py","ps","pe","pbs","pbe","pt","pr","pb","pl"],px:["pr","pl"],py:["pt","pb"],m:["mx","my","ms","me","mbs","mbe","mt","mr","mb","ml"],mx:["mr","ml"],my:["mt","mb"],size:["w","h"],"font-size":["leading"],"fvn-normal":["fvn-ordinal","fvn-slashed-zero","fvn-figure","fvn-spacing","fvn-fraction"],"fvn-ordinal":["fvn-normal"],"fvn-slashed-zero":["fvn-normal"],"fvn-figure":["fvn-normal"],"fvn-spacing":["fvn-normal"],"fvn-fraction":["fvn-normal"],"line-clamp":["display","overflow"],rounded:["rounded-s","rounded-e","rounded-t","rounded-r","rounded-b","rounded-l","rounded-ss","rounded-se","rounded-ee","rounded-es","rounded-tl","rounded-tr","rounded-br","rounded-bl"],"rounded-s":["rounded-ss","rounded-es"],"rounded-e":["rounded-se","rounded-ee"],"rounded-t":["rounded-tl","rounded-tr"],"rounded-r":["rounded-tr","rounded-br"],"rounded-b":["rounded-br","rounded-bl"],"rounded-l":["rounded-tl","rounded-bl"],"border-spacing":["border-spacing-x","border-spacing-y"],"border-w":["border-w-x","border-w-y","border-w-s","border-w-e","border-w-bs","border-w-be","border-w-t","border-w-r","border-w-b","border-w-l"],"border-w-x":["border-w-r","border-w-l"],"border-w-y":["border-w-t","border-w-b"],"border-color":["border-color-x","border-color-y","border-color-s","border-color-e","border-color-bs","border-color-be","border-color-t","border-color-r","border-color-b","border-color-l"],"border-color-x":["border-color-r","border-color-l"],"border-color-y":["border-color-t","border-color-b"],translate:["translate-x","translate-y","translate-none"],"translate-none":["translate","translate-x","translate-y","translate-z"],"scroll-m":["scroll-mx","scroll-my","scroll-ms","scroll-me","scroll-mbs","scroll-mbe","scroll-mt","scroll-mr","scroll-mb","scroll-ml"],"scroll-mx":["scroll-mr","scroll-ml"],"scroll-my":["scroll-mt","scroll-mb"],"scroll-p":["scroll-px","scroll-py","scroll-ps","scroll-pe","scroll-pbs","scroll-pbe","scroll-pt","scroll-pr","scroll-pb","scroll-pl"],"scroll-px":["scroll-pr","scroll-pl"],"scroll-py":["scroll-pt","scroll-pb"],touch:["touch-x","touch-y","touch-pz"],"touch-x":["touch"],"touch-y":["touch"],"touch-pz":["touch"]},conflictingClassGroupModifiers:{"font-size":["leading"]},postfixLookupClassGroups:["container-type"],orderSensitiveModifiers:["*","**","after","backdrop","before","details-content","file","first-letter","first-line","marker","placeholder","selection"]}},o1n=(e,{cacheSize:n,prefix:t,experimentalParseClassName:r,extend:s={},override:i={}})=>(sd(e,"cacheSize",n),sd(e,"prefix",t),sd(e,"experimentalParseClassName",r),Wg(e.theme,i.theme),Wg(e.classGroups,i.classGroups),Wg(e.conflictingClassGroups,i.conflictingClassGroups),Wg(e.conflictingClassGroupModifiers,i.conflictingClassGroupModifiers),sd(e,"postfixLookupClassGroups",i.postfixLookupClassGroups),sd(e,"orderSensitiveModifiers",i.orderSensitiveModifiers),Qg(e.theme,s.theme),Qg(e.classGroups,s.classGroups),Qg(e.conflictingClassGroups,s.conflictingClassGroups),Qg(e.conflictingClassGroupModifiers,s.conflictingClassGroupModifiers),C3(e,s,"postfixLookupClassGroups"),C3(e,s,"orderSensitiveModifiers"),e),sd=(e,n,t)=>{t!==void 0&&(e[n]=t)},Wg=(e,n)=>{if(n)for(const t in n)sd(e,t,n[t])},Qg=(e,n)=>{if(n)for(const t in n)C3(e,n,t)},C3=(e,n,t)=>{const r=n[t];r!==void 0&&(e[t]=e[t]?e[t].concat(r):r)},l1n=(e,...n)=>typeof e=="function"?Dz(Bz,e,...n):Dz(()=>o1n(Bz(),e),...n),c1n=l1n({extend:{theme:{text:["menu"]}}});function vs(...e){return c1n(...e)}const u1n={default:"border-transparent bg-surface text-subtext",success:"border-accent-green bg-accent-green-subtle text-accent-green",error:"border-accent-red bg-accent-red-subtle text-accent-red",warning:"border-accent-amber bg-accent-amber-subtle text-accent-amber"};function Gt({variant:e="default",size:n="default",className:t,...r}){return f.jsx("span",{className:vs("badge inline-flex items-center rounded-full border py-px font-sans",n==="small"?"px-1.5 text-xs font-normal":"px-2 text-sm font-medium",u1n[e],t),...r})}const _1n=["btn inline-flex shrink-0 items-center justify-center gap-1.5 whitespace-nowrap border font-medium","transition-[background,border-color,color] duration-120 ease-standard","focus-visible:outline-2 focus-visible:outline-solid focus-visible:outline-text focus-visible:outline-offset-2","disabled:cursor-default disabled:opacity-45"].join(" "),f1n={default:"border-border bg-background text-text [&:hover:not(:disabled)]:bg-surface [&:active:not(:disabled)]:bg-highlight",primary:"border-primary bg-primary text-background [&:hover:not(:disabled)]:border-primary-hover [&:hover:not(:disabled)]:bg-primary-hover [&:active:not(:disabled)]:border-primary-active [&:active:not(:disabled)]:bg-primary-active",ghost:"border-transparent bg-transparent text-text [&:hover:not(:disabled)]:bg-surface [&:active:not(:disabled)]:bg-highlight [&.active]:bg-surface [&.active]:text-muted",danger:"border-border bg-background text-accent-red [&:hover:not(:disabled)]:bg-danger-hover [&:active:not(:disabled)]:bg-danger-active",warning:"border-accent-amber bg-background text-accent-amber [&:hover:not(:disabled)]:bg-accent-amber-subtle [&:active:not(:disabled)]:bg-highlight"},d1n={default:"h-8 rounded-md px-3.5 text-sm",small:"h-7 rounded-sm px-2.5 text-sm",large:"h-14 rounded-lg px-7 text-xl"};function iI(e,n,t,r){return vs(_1n,f1n[e],d1n[n],t&&"active",r)}function Me({active:e=!1,variant:n="default",size:t="default",className:r,...s}){return f.jsx("button",{className:iI(n,t,e,r),...s})}function Zd({active:e=!1,variant:n="default",size:t="default",className:r,...s}){return f.jsx("a",{className:iI(n,t,e,r),...s})}const h1n=["icon-btn relative inline-flex shrink-0 items-center justify-center","transition-[background,color] duration-120 ease-standard","focus-visible:outline-2 focus-visible:outline-solid focus-visible:outline-text focus-visible:outline-offset-2","disabled:cursor-default disabled:opacity-45"].join(" "),p1n={default:"text-subtext [&:hover:not(:disabled)]:bg-surface [&:hover:not(:disabled)]:text-text [&:active:not(:disabled)]:bg-highlight [&.active]:bg-surface [&.active]:text-primary",primary:"bg-primary text-background [&:hover:not(:disabled)]:bg-primary-hover [&:active:not(:disabled)]:bg-primary-active",stop:"bg-surface text-text [&:hover:not(:disabled)]:bg-stop-hover [&:active:not(:disabled)]:bg-highlight"},m1n={default:"h-8 w-8 rounded-md",small:"h-7 w-7 rounded-sm"};function aI(e,n,t,r,s){return vs(h1n,p1n[e],m1n[n],r==="circle"&&"rounded-full",t&&"active",s)}const Ft=A.forwardRef(function({active:n=!1,shape:t="rounded",size:r="default",variant:s="default",className:i,...a},o){return f.jsx("button",{ref:o,className:aI(s,r,n,t,i),...a})});function dm({active:e=!1,shape:n="rounded",size:t="default",variant:r="default",className:s,...i}){return f.jsx("a",{className:aI(r,t,e,n,s),...i})}const g1n={default:"h-8 rounded-md border border-border bg-background px-2.5 py-1.5 focus:border-text",inline:"h-8 rounded-none border-x-0 border-t-0 border-b border-transparent bg-transparent px-0 py-0 focus:border-text"};function as({variant:e="default",className:n,...t}){return f.jsx("input",{className:vs("w-full font-sans text-sm font-normal text-text outline-none placeholder:text-muted disabled:cursor-default disabled:opacity-45",g1n[e],n),...t})}function nr({active:e=!1,danger:n=!1,size:t="default",className:r,...s}){return f.jsx("button",{className:vs("model-item flex w-full items-center justify-between gap-2 rounded-sm px-2 text-start transition-[background,color] duration-120 ease-standard hover:bg-surface focus-visible:outline-2 focus-visible:outline-solid focus-visible:outline-text focus-visible:outline-offset-2 disabled:cursor-default disabled:opacity-45 [&_.model-id]:block [&_.model-id]:text-xs [&_.model-id]:text-muted",t==="compact"?"min-h-6 py-0.5 text-menu":"min-h-8 py-1.5 text-sm",e&&"bg-surface",n&&"text-accent-red hover:text-accent-red",r),...s})}function Rt({className:e,...n}){return f.jsx("span",{className:vs("spinner h-[13px] w-[13px] shrink-0 animate-[spin_0.8s_linear_infinite] rounded-full border-2 border-border border-t-primary",e),...n})}function os({className:e,...n}){return f.jsx("div",{className:vs("flex items-center gap-2 px-0 py-1 text-sm text-subtext",e),...n})}const v1n={success:"text-accent-green",danger:"text-accent-red",info:"text-accent-teal",warning:"text-accent-amber",caution:"text-accent-orange",accent:"text-accent-purple",neutral:"text-muted"};function yd({tone:e="neutral",live:n=!1,className:t,children:r,...s}){return f.jsxs("span",{className:vs("status-badge inline-flex items-center gap-1.5 whitespace-nowrap text-sm font-medium text-text",t),...s,children:[f.jsx("span",{className:vs("h-[7px] w-[7px] shrink-0 rounded-full bg-current",v1n[e],n&&"animate-[or-pulse_1.2s_ease-in-out_infinite]")}),r]})}const b1n=["relative h-5.5 w-9.5 flex-none rounded-full border border-border bg-surface","transition-[background,border-color] duration-120 ease-standard","[&_span]:absolute [&_span]:start-[3px] [&_span]:top-[3px] [&_span]:h-3.5 [&_span]:w-3.5","[&_span]:rounded-full [&_span]:bg-muted [&_span]:transition-[translate,background] [&_span]:duration-120 [&_span]:ease-standard","hover:border-border-strong","disabled:cursor-default disabled:opacity-45 focus-visible:outline-2 focus-visible:outline-solid focus-visible:outline-text focus-visible:outline-offset-2"].join(" ");function oI(e,n){return vs(b1n,e&&"border-primary bg-primary [&_span]:translate-x-4 [&_span]:bg-background",n)}function Xk({checked:e=!1,className:n,children:t,...r}){return f.jsx("button",{role:"switch","aria-checked":e,className:oI(e,n),...r,children:t??f.jsx("span",{})})}function y1n({checked:e=!1,className:n,...t}){return f.jsx("span",{className:oI(e,n),...t,children:f.jsx("span",{})})}var Oa=lO();const x1n=am(Oa);function w1n(e){if(typeof document>"u")return;let n=document.head||document.getElementsByTagName("head")[0],t=document.createElement("style");t.type="text/css",n.appendChild(t),t.styleSheet?t.styleSheet.cssText=e:t.appendChild(document.createTextNode(e))}const k1n=e=>{switch(e){case"success":return E1n;case"info":return z1n;case"warning":return N1n;case"error":return j1n;default:return null}},S1n=Array(12).fill(0),C1n=({visible:e,className:n})=>et.createElement("div",{className:["sonner-loading-wrapper",n].filter(Boolean).join(" "),"data-visible":e},et.createElement("div",{className:"sonner-spinner"},S1n.map((t,r)=>et.createElement("div",{className:"sonner-loading-bar",key:`spinner-bar-${r}`})))),E1n=et.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor",height:"20",width:"20","aria-hidden":"true"},et.createElement("path",{fillRule:"evenodd",d:"M10 18a8 8 0 100-16 8 8 0 000 16zm3.857-9.809a.75.75 0 00-1.214-.882l-3.483 4.79-1.88-1.88a.75.75 0 10-1.06 1.061l2.5 2.5a.75.75 0 001.137-.089l4-5.5z",clipRule:"evenodd"})),N1n=et.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor",height:"20",width:"20","aria-hidden":"true"},et.createElement("path",{fillRule:"evenodd",d:"M9.401 3.003c1.155-2 4.043-2 5.197 0l7.355 12.748c1.154 2-.29 4.5-2.599 4.5H4.645c-2.309 0-3.752-2.5-2.598-4.5L9.4 3.003zM12 8.25a.75.75 0 01.75.75v3.75a.75.75 0 01-1.5 0V9a.75.75 0 01.75-.75zm0 8.25a.75.75 0 100-1.5.75.75 0 000 1.5z",clipRule:"evenodd"})),z1n=et.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor",height:"20",width:"20","aria-hidden":"true"},et.createElement("path",{fillRule:"evenodd",d:"M18 10a8 8 0 11-16 0 8 8 0 0116 0zm-7-4a1 1 0 11-2 0 1 1 0 012 0zM9 9a.75.75 0 000 1.5h.253a.25.25 0 01.244.304l-.459 2.066A1.75 1.75 0 0010.747 15H11a.75.75 0 000-1.5h-.253a.25.25 0 01-.244-.304l.459-2.066A1.75 1.75 0 009.253 9H9z",clipRule:"evenodd"})),j1n=et.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor",height:"20",width:"20","aria-hidden":"true"},et.createElement("path",{fillRule:"evenodd",d:"M18 10a8 8 0 11-16 0 8 8 0 0116 0zm-8-5a.75.75 0 01.75.75v4.5a.75.75 0 01-1.5 0v-4.5A.75.75 0 0110 5zm0 10a1 1 0 100-2 1 1 0 000 2z",clipRule:"evenodd"})),T1n=et.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",width:"12",height:"12",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true"},et.createElement("line",{x1:"18",y1:"6",x2:"6",y2:"18"}),et.createElement("line",{x1:"6",y1:"6",x2:"18",y2:"18"})),A1n=()=>{const[e,n]=et.useState(document.hidden);return et.useEffect(()=>{const t=()=>{n(document.hidden)};return document.addEventListener("visibilitychange",t),()=>document.removeEventListener("visibilitychange",t)},[]),e};let R1n=1;const M1n=100,Pz=e=>{var n;return typeof(e==null?void 0:e.id)=="number"||(e==null||(n=e.id)==null?void 0:n.length)>0?e.id:R1n++};class O1n{constructor(){this.subscribe=n=>(this.subscribers.push(n),this.getActiveToasts().forEach(t=>n(t)),()=>{const t=this.subscribers.indexOf(n);this.subscribers.splice(t,1)}),this.publish=n=>{this.subscribers.forEach(t=>t(n))},this.addToast=n=>{this.publish(n),this.toasts=[...this.toasts,n],this.trimHistory()},this.trimHistory=()=>{let n=this.toasts.length-M1n;n<=0||(this.toasts=this.toasts.filter(t=>n>0&&this.dismissedToasts.has(t.id)?(this.dismissedToasts.delete(t.id),n--,!1):!0))},this.create=n=>{const{message:t,...r}=n,s=Pz(n),i=this.pendingDismissals.get(s);i!==void 0&&(cancelAnimationFrame(i),this.pendingDismissals.delete(s),this.dismissedToasts.delete(s));const a=this.dismissedToasts.has(s),o=n.dismissible===void 0?!0:n.dismissible;return a&&(this.dismissedToasts.delete(s),this.toasts=this.toasts.filter(u=>u.id!==s)),(a?void 0:this.toasts.find(u=>u.id===s))?this.toasts=this.toasts.map(u=>u.id===s?(this.publish({...u,...n,id:s,title:t}),{...u,...n,id:s,dismissible:o,title:t}):u):this.addToast({title:t,...r,dismissible:o,id:s}),s},this.dismiss=n=>{if(n==null)return this.getActiveToasts().forEach(r=>{this.dismissedToasts.add(r.id),this.subscribers.forEach(s=>s({id:r.id,dismiss:!0}))}),n;this.dismissedToasts.add(n);const t=this.pendingDismissals.get(n);return t!==void 0&&cancelAnimationFrame(t),this.pendingDismissals.set(n,requestAnimationFrame(()=>{this.pendingDismissals.delete(n),this.subscribers.forEach(r=>r({id:n,dismiss:!0}))})),n},this.message=(n,t)=>this.create({...t,message:n,type:void 0}),this.error=(n,t)=>this.create({...t,message:n,type:"error"}),this.success=(n,t)=>this.create({...t,type:"success",message:n}),this.info=(n,t)=>this.create({...t,type:"info",message:n}),this.warning=(n,t)=>this.create({...t,type:"warning",message:n}),this.loading=(n,t)=>this.create({...t,type:"loading",message:n}),this.promise=(n,t)=>{if(!t)return;let r;t.loading!==void 0&&(r=this.create({...t,promise:n,type:"loading",message:t.loading,description:typeof t.description!="function"?t.description:void 0}));const s=Promise.resolve(n instanceof Function?n():n);let i=r!==void 0,a;const o=s.then(async u=>{if(a=["resolve",u],et.isValidElement(u))i=!1,this.create({id:r,type:"default",message:u});else if(L1n(u)&&!u.ok){i=!1;const _=typeof t.error=="function"?await t.error(`HTTP error! status: ${u.status}`):t.error,p=typeof t.description=="function"?await t.description(`HTTP error! status: ${u.status}`):t.description,x=typeof _=="object"&&!et.isValidElement(_)?_:{message:_};this.create({id:r,type:"error",description:p,...x})}else if(u instanceof Error){i=!1;const _=typeof t.error=="function"?await t.error(u):t.error,p=typeof t.description=="function"?await t.description(u):t.description,x=typeof _=="object"&&!et.isValidElement(_)?_:{message:_};this.create({id:r,type:"error",description:p,...x})}else if(t.success!==void 0){i=!1;const _=typeof t.success=="function"?await t.success(u):t.success,p=typeof t.description=="function"?await t.description(u):t.description,x=typeof _=="object"&&!et.isValidElement(_)?_:{message:_};this.create({id:r,type:"success",description:p,...x})}}).catch(async u=>{if(a=["reject",u],t.error!==void 0){i=!1;const h=typeof t.error=="function"?await t.error(u):t.error,_=typeof t.description=="function"?await t.description(u):t.description,m=typeof h=="object"&&!et.isValidElement(h)?h:{message:h};this.create({id:r,type:"error",description:_,...m})}}).finally(()=>{i&&(this.dismiss(r),r=void 0),t.finally==null||t.finally.call(t)}),l=()=>new Promise((u,h)=>o.then(()=>a[0]==="reject"?h(a[1]):u(a[1])).catch(h));return typeof r!="string"&&typeof r!="number"?{unwrap:l}:Object.assign(r,{unwrap:l})},this.custom=(n,t)=>{const r=Pz(t);return this.create({...t,jsx:n(r),id:r,type:void 0}),r},this.getActiveToasts=()=>this.toasts.filter(n=>!this.dismissedToasts.has(n.id)),this.subscribers=[],this.toasts=[],this.dismissedToasts=new Set,this.pendingDismissals=new Map}}const Ei=new O1n,D1n=(e,n)=>Ei.message(e,n),L1n=e=>e&&typeof e=="object"&&"ok"in e&&typeof e.ok=="boolean"&&"status"in e&&typeof e.status=="number",I1n=D1n,$1n=()=>Ei.toasts,B1n=()=>Ei.getActiveToasts(),P1n=Object.assign(I1n,{success:Ei.success,info:Ei.info,warning:Ei.warning,error:Ei.error,custom:Ei.custom,message:Ei.message,promise:Ei.promise,dismiss:Ei.dismiss,loading:Ei.loading},{getHistory:$1n,getToasts:B1n});w1n("[data-sonner-toaster][dir=ltr],html[dir=ltr]{--toast-icon-margin-start:-3px;--toast-icon-margin-end:4px;--toast-svg-margin-start:-1px;--toast-svg-margin-end:0px;--toast-button-margin-start:auto;--toast-button-margin-end:0;--toast-close-button-start:0;--toast-close-button-end:unset;--toast-close-button-transform:translate(-35%, -35%)}[data-sonner-toaster][dir=rtl],html[dir=rtl]{--toast-icon-margin-start:4px;--toast-icon-margin-end:-3px;--toast-svg-margin-start:0px;--toast-svg-margin-end:-1px;--toast-button-margin-start:0;--toast-button-margin-end:auto;--toast-close-button-start:unset;--toast-close-button-end:0;--toast-close-button-transform:translate(35%, -35%)}[data-sonner-toaster]{position:fixed;width:var(--width);font-family:ui-sans-serif,system-ui,-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Helvetica Neue,Arial,Noto Sans,sans-serif,Apple Color Emoji,Segoe UI Emoji,Segoe UI Symbol,Noto Color Emoji;--gray1:hsl(0, 0%, 99%);--gray2:hsl(0, 0%, 97.3%);--gray3:hsl(0, 0%, 95.1%);--gray4:hsl(0, 0%, 93%);--gray5:hsl(0, 0%, 90.9%);--gray6:hsl(0, 0%, 88.7%);--gray7:hsl(0, 0%, 85.8%);--gray8:hsl(0, 0%, 78%);--gray9:hsl(0, 0%, 56.1%);--gray10:hsl(0, 0%, 52.3%);--gray11:hsl(0, 0%, 43.5%);--gray12:hsl(0, 0%, 9%);--border-radius:8px;box-sizing:border-box;padding:0;margin:0;list-style:none;outline:0;z-index:999999999;transition:transform .4s ease}@media (hover:none) and (pointer:coarse){[data-sonner-toaster][data-lifted=true]{transform:none}}[data-sonner-toaster][data-x-position=right]{right:var(--offset-right)}[data-sonner-toaster][data-x-position=left]{left:var(--offset-left)}[data-sonner-toaster][data-x-position=center]{left:50%;transform:translateX(-50%)}[data-sonner-toaster][data-y-position=top]{top:var(--offset-top)}[data-sonner-toaster][data-y-position=bottom]{bottom:var(--offset-bottom)}[data-sonner-toast]{--y:translateY(100%);--lift-amount:calc(var(--lift) * var(--gap));z-index:var(--z-index);position:absolute;opacity:0;transform:var(--y);touch-action:none;transition:transform .4s,opacity .4s,height .4s,box-shadow .2s;box-sizing:border-box;outline:0;overflow-wrap:anywhere}[data-sonner-toast][data-styled=true]{padding:16px;background:var(--normal-bg);border:1px solid var(--normal-border);color:var(--normal-text);border-radius:var(--border-radius);box-shadow:0 4px 12px rgba(0,0,0,.1);width:var(--width);font-size:13px;display:flex;align-items:center;gap:6px}[data-sonner-toast]:focus-visible{box-shadow:0 4px 12px rgba(0,0,0,.1),0 0 0 2px rgba(0,0,0,.2)}[data-sonner-toast][data-y-position=top]{top:0;--y:translateY(-100%);--lift:1;--lift-amount:calc(1 * var(--gap))}[data-sonner-toast][data-y-position=bottom]{bottom:0;--y:translateY(100%);--lift:-1;--lift-amount:calc(var(--lift) * var(--gap))}[data-sonner-toast][data-styled=true] [data-description]{font-weight:400;line-height:1.4;color:#3f3f3f}[data-rich-colors=true][data-sonner-toast][data-styled=true] [data-description]{color:inherit}[data-sonner-toaster][data-sonner-theme=dark] [data-description]{color:#e8e8e8}[data-sonner-toast][data-styled=true] [data-title]{font-weight:500;line-height:1.5;color:inherit}[data-sonner-toast][data-styled=true] [data-icon]{display:flex;height:16px;width:16px;position:relative;justify-content:flex-start;align-items:center;flex-shrink:0;margin-left:var(--toast-icon-margin-start);margin-right:var(--toast-icon-margin-end)}[data-sonner-toast][data-promise=true] [data-icon]>svg{opacity:0;transform:scale(.8);transform-origin:center;animation:sonner-fade-in .3s ease forwards}[data-sonner-toast][data-styled=true] [data-icon]>*{flex-shrink:0}[data-sonner-toast][data-styled=true] [data-icon] svg{margin-left:var(--toast-svg-margin-start);margin-right:var(--toast-svg-margin-end)}[data-sonner-toast][data-styled=true] [data-content]{display:flex;flex-direction:column;gap:2px;flex:1;min-width:0}[data-sonner-toast][data-styled=true] [data-button]{border-radius:4px;padding-left:8px;padding-right:8px;height:24px;font-size:12px;color:var(--normal-bg);background:var(--normal-text);margin-left:var(--toast-button-margin-start);margin-right:var(--toast-button-margin-end);border:none;font-weight:500;cursor:pointer;outline:0;display:flex;align-items:center;flex-shrink:0;transition:opacity .4s,box-shadow .2s}[data-sonner-toast][data-styled=true] [data-button]:focus-visible{box-shadow:0 0 0 2px rgba(0,0,0,.4)}[data-sonner-toast][data-styled=true] [data-button]:first-of-type{margin-left:var(--toast-button-margin-start);margin-right:var(--toast-button-margin-end)}[data-sonner-toast][data-styled=true] [data-cancel]{color:var(--normal-text);background:rgba(0,0,0,.08)}[data-sonner-toaster][data-sonner-theme=dark] [data-sonner-toast][data-styled=true] [data-cancel]{background:rgba(255,255,255,.3)}[data-sonner-toast][data-styled=true] [data-close-button]{position:absolute;left:var(--toast-close-button-start);right:var(--toast-close-button-end);top:0;height:20px;width:20px;display:flex;justify-content:center;align-items:center;padding:0;color:var(--normal-text);background:var(--normal-bg);border:1px solid var(--normal-border);transform:var(--toast-close-button-transform);border-radius:50%;cursor:pointer;z-index:1;transition:opacity .1s,background .2s,border-color .2s}[data-sonner-toast][data-styled=true] [data-close-button]:focus-visible{box-shadow:0 4px 12px rgba(0,0,0,.1),0 0 0 2px rgba(0,0,0,.2)}[data-sonner-toast][data-styled=true] [data-disabled=true]{cursor:not-allowed}[data-sonner-toast][data-styled=true]:hover [data-close-button]:hover{background:var(--gray2);border-color:var(--gray5)}[data-sonner-toast][data-swiping=true]::before{content:'';position:absolute;left:-100%;right:-100%;height:100%;z-index:-1}[data-sonner-toast][data-y-position=top][data-swiping=true]::before{bottom:50%;transform:scaleY(3) translateY(50%)}[data-sonner-toast][data-y-position=bottom][data-swiping=true]::before{top:50%;transform:scaleY(3) translateY(-50%)}[data-sonner-toast][data-swiping=false][data-removed=true]::before{content:'';position:absolute;inset:0;transform:scaleY(2)}[data-sonner-toast][data-expanded=true]::after{content:'';position:absolute;left:0;height:calc(var(--gap) + 1px);bottom:100%;width:100%}[data-sonner-toast][data-mounted=true]{--y:translateY(0);opacity:1}[data-sonner-toast][data-expanded=false][data-front=false]{--scale:var(--toasts-before) * 0.05 + 1;--y:translateY(calc(var(--lift-amount) * var(--toasts-before))) scale(calc(-1 * var(--scale)));height:var(--front-toast-height)}[data-sonner-toast]>*{transition:opacity .4s}[data-sonner-toast][data-x-position=right]{right:0}[data-sonner-toast][data-x-position=left]{left:0}[data-sonner-toast][data-expanded=false][data-front=false][data-styled=true]>*{opacity:0}[data-sonner-toast][data-visible=false]{opacity:0;pointer-events:none}[data-sonner-toast][data-mounted=true][data-expanded=true]{--y:translateY(calc(var(--lift) * var(--offset)));height:var(--initial-height)}[data-sonner-toast][data-removed=true][data-front=true][data-swipe-out=false]{--y:translateY(calc(var(--lift) * -100%));opacity:0}[data-sonner-toast][data-removed=true][data-front=false][data-swipe-out=false][data-expanded=true]{--y:translateY(calc(var(--lift) * var(--offset) + var(--lift) * -100%));opacity:0}[data-sonner-toast][data-removed=true][data-front=false][data-swipe-out=false][data-expanded=false]{--y:translateY(40%);opacity:0;transition:transform .5s,opacity .2s}[data-sonner-toast][data-removed=true][data-front=false]::before{height:calc(var(--initial-height) + 20%)}[data-sonner-toast][data-swiping=true]{transform:var(--y) translateY(var(--swipe-amount-y,0)) translateX(var(--swipe-amount-x,0));transition:none}[data-sonner-toast][data-swiped=true]{-webkit-user-select:none;user-select:none}[data-sonner-toast][data-swipe-out=true][data-y-position=bottom],[data-sonner-toast][data-swipe-out=true][data-y-position=top]{animation-duration:.2s;animation-timing-function:ease-out;animation-fill-mode:forwards}[data-sonner-toast][data-swipe-out=true][data-swipe-direction=left]{animation-name:swipe-out-left}[data-sonner-toast][data-swipe-out=true][data-swipe-direction=right]{animation-name:swipe-out-right}[data-sonner-toast][data-swipe-out=true][data-swipe-direction=up]{animation-name:swipe-out-up}[data-sonner-toast][data-swipe-out=true][data-swipe-direction=down]{animation-name:swipe-out-down}@keyframes swipe-out-left{from{transform:var(--y) translateX(var(--swipe-amount-x));opacity:1}to{transform:var(--y) translateX(calc(var(--swipe-amount-x) - 100%));opacity:0}}@keyframes swipe-out-right{from{transform:var(--y) translateX(var(--swipe-amount-x));opacity:1}to{transform:var(--y) translateX(calc(var(--swipe-amount-x) + 100%));opacity:0}}@keyframes swipe-out-up{from{transform:var(--y) translateY(var(--swipe-amount-y));opacity:1}to{transform:var(--y) translateY(calc(var(--swipe-amount-y) - 100%));opacity:0}}@keyframes swipe-out-down{from{transform:var(--y) translateY(var(--swipe-amount-y));opacity:1}to{transform:var(--y) translateY(calc(var(--swipe-amount-y) + 100%));opacity:0}}@media (max-width:600px){[data-sonner-toaster]{position:fixed;right:var(--mobile-offset-right);left:var(--mobile-offset-left);width:100%}[data-sonner-toaster][dir=rtl]{left:calc(var(--mobile-offset-left) * -1)}[data-sonner-toaster] [data-sonner-toast]{left:0;right:0;width:calc(100% - var(--mobile-offset-left) * 2)}[data-sonner-toaster][data-x-position=left]{left:var(--mobile-offset-left)}[data-sonner-toaster][data-y-position=bottom]{bottom:var(--mobile-offset-bottom)}[data-sonner-toaster][data-y-position=top]{top:var(--mobile-offset-top)}[data-sonner-toaster][data-x-position=center]{left:var(--mobile-offset-left);right:var(--mobile-offset-right);transform:none}}[data-sonner-toaster][data-sonner-theme=light]{--normal-bg:#fff;--normal-border:var(--gray4);--normal-text:var(--gray12);--success-bg:hsl(143, 85%, 96%);--success-border:hsl(145, 92%, 87%);--success-text:hsl(140, 100%, 27%);--info-bg:hsl(208, 100%, 97%);--info-border:hsl(221, 91%, 93%);--info-text:hsl(210, 92%, 45%);--warning-bg:hsl(49, 100%, 97%);--warning-border:hsl(49, 91%, 84%);--warning-text:hsl(31, 92%, 45%);--error-bg:hsl(359, 100%, 97%);--error-border:hsl(359, 100%, 94%);--error-text:hsl(360, 100%, 45%)}[data-sonner-toaster][data-sonner-theme=light] [data-sonner-toast][data-invert=true]{--normal-bg:#000;--normal-border:hsl(0, 0%, 20%);--normal-text:var(--gray1)}[data-sonner-toaster][data-sonner-theme=dark] [data-sonner-toast][data-invert=true]{--normal-bg:#fff;--normal-border:var(--gray3);--normal-text:var(--gray12)}[data-sonner-toaster][data-sonner-theme=dark]{--normal-bg:#000;--normal-bg-hover:hsl(0, 0%, 12%);--normal-border:hsl(0, 0%, 20%);--normal-border-hover:hsl(0, 0%, 25%);--normal-text:var(--gray1);--success-bg:hsl(150, 100%, 6%);--success-border:hsl(147, 100%, 12%);--success-text:hsl(150, 86%, 65%);--info-bg:hsl(215, 100%, 6%);--info-border:hsl(223, 43%, 17%);--info-text:hsl(216, 87%, 65%);--warning-bg:hsl(64, 100%, 6%);--warning-border:hsl(60, 100%, 9%);--warning-text:hsl(46, 87%, 65%);--error-bg:hsl(358, 76%, 10%);--error-border:hsl(357, 89%, 16%);--error-text:hsl(358, 100%, 81%)}[data-sonner-toaster][data-sonner-theme=dark] [data-sonner-toast] [data-close-button]{background:var(--normal-bg);border-color:var(--normal-border);color:var(--normal-text)}[data-sonner-toaster][data-sonner-theme=dark] [data-sonner-toast] [data-close-button]:hover{background:var(--normal-bg-hover);border-color:var(--normal-border-hover)}[data-rich-colors=true][data-sonner-toast][data-type=success]{background:var(--success-bg);border-color:var(--success-border);color:var(--success-text)}[data-rich-colors=true][data-sonner-toast][data-type=success] [data-close-button]{background:var(--success-bg);border-color:var(--success-border);color:var(--success-text)}[data-rich-colors=true][data-sonner-toast][data-type=info]{background:var(--info-bg);border-color:var(--info-border);color:var(--info-text)}[data-rich-colors=true][data-sonner-toast][data-type=info] [data-close-button]{background:var(--info-bg);border-color:var(--info-border);color:var(--info-text)}[data-rich-colors=true][data-sonner-toast][data-type=warning]{background:var(--warning-bg);border-color:var(--warning-border);color:var(--warning-text)}[data-rich-colors=true][data-sonner-toast][data-type=warning] [data-close-button]{background:var(--warning-bg);border-color:var(--warning-border);color:var(--warning-text)}[data-rich-colors=true][data-sonner-toast][data-type=error]{background:var(--error-bg);border-color:var(--error-border);color:var(--error-text)}[data-rich-colors=true][data-sonner-toast][data-type=error] [data-close-button]{background:var(--error-bg);border-color:var(--error-border);color:var(--error-text)}.sonner-loading-wrapper{--size:16px;height:var(--size);width:var(--size);position:absolute;inset:0;z-index:10}.sonner-loading-wrapper[data-visible=false]{transform-origin:center;animation:sonner-fade-out .2s ease forwards}.sonner-spinner{position:relative;top:50%;left:50%;height:var(--size);width:var(--size)}.sonner-loading-bar{animation:sonner-spin 1.2s linear infinite;background:var(--gray11);border-radius:6px;height:8%;left:-10%;position:absolute;top:-3.9%;width:24%}.sonner-loading-bar:first-child{animation-delay:-1.2s;transform:rotate(.0001deg) translate(146%)}.sonner-loading-bar:nth-child(2){animation-delay:-1.1s;transform:rotate(30deg) translate(146%)}.sonner-loading-bar:nth-child(3){animation-delay:-1s;transform:rotate(60deg) translate(146%)}.sonner-loading-bar:nth-child(4){animation-delay:-.9s;transform:rotate(90deg) translate(146%)}.sonner-loading-bar:nth-child(5){animation-delay:-.8s;transform:rotate(120deg) translate(146%)}.sonner-loading-bar:nth-child(6){animation-delay:-.7s;transform:rotate(150deg) translate(146%)}.sonner-loading-bar:nth-child(7){animation-delay:-.6s;transform:rotate(180deg) translate(146%)}.sonner-loading-bar:nth-child(8){animation-delay:-.5s;transform:rotate(210deg) translate(146%)}.sonner-loading-bar:nth-child(9){animation-delay:-.4s;transform:rotate(240deg) translate(146%)}.sonner-loading-bar:nth-child(10){animation-delay:-.3s;transform:rotate(270deg) translate(146%)}.sonner-loading-bar:nth-child(11){animation-delay:-.2s;transform:rotate(300deg) translate(146%)}.sonner-loading-bar:nth-child(12){animation-delay:-.1s;transform:rotate(330deg) translate(146%)}@keyframes sonner-fade-in{0%{opacity:0;transform:scale(.8)}100%{opacity:1;transform:scale(1)}}@keyframes sonner-fade-out{0%{opacity:1;transform:scale(1)}100%{opacity:0;transform:scale(.8)}}@keyframes sonner-spin{0%{opacity:1}100%{opacity:.15}}@media (prefers-reduced-motion){.sonner-loading-bar,[data-sonner-toast],[data-sonner-toast]>*{transition:none!important;animation:none!important}}.sonner-loader{position:absolute;top:50%;left:50%;transform:translate(-50%,-50%);transform-origin:center;transition:opacity .2s,transform .2s}.sonner-loader[data-visible=false]{opacity:0;transform:scale(.8) translate(-50%,-50%)}");function Xg(e){return e.label!==void 0}const F1n=3,H1n="24px",q1n="16px",Fz=4e3,U1n=356,G1n=14,V1n=45,K1n=200;function zo(...e){return e.filter(Boolean).join(" ")}function W1n(e){const[n,t]=e.split("-"),r=[];return n&&r.push(n),t&&r.push(t),r}const Q1n=e=>{var n,t,r,s,i,a,o,l,u;const{invert:h,toast:_,unstyled:p,interacting:m,setHeights:x,visibleToasts:k,heights:v,index:b,toasts:w,expanded:y,removeToast:C,defaultRichColors:N,closeButton:E,style:T,cancelButtonStyle:j,actionButtonStyle:M,className:D="",descriptionClassName:I="",duration:P,position:U,gap:q,expandByDefault:W,classNames:H,icons:Y,closeButtonAriaLabel:te="Close toast"}=e,[$,L]=et.useState(null),[F,G]=et.useState(null),[V,ee]=et.useState(!1),[ce,ae]=et.useState(!1),[se,X]=et.useState(!1),[oe,le]=et.useState(!1),[_e,pe]=et.useState(!1),[Ee,Ie]=et.useState(0),[ze,He]=et.useState(0),Oe=et.useRef(_.duration||P||Fz),Xe=et.useRef(null),_t=et.useRef(null),Vt=b===0,$t=b+1<=k,jt=_.type,mt=jt??"default",we=_.dismissible!==!1,ct=_.className||"",ye=_.descriptionClassName||"",je=et.useMemo(()=>v.findIndex(kt=>kt.toastId===_.id)||0,[v,_.id]),qe=et.useMemo(()=>{var kt;return(kt=_.closeButton)!=null?kt:E},[_.closeButton,E]),at=et.useMemo(()=>_.duration||P||Fz,[_.duration,P]),nt=et.useRef(0),Kt=et.useRef(0),Qe=et.useRef(0),wt=et.useRef(null),[Tt,Yt]=U.split("-"),tn=et.useMemo(()=>v.reduce((kt,cn,jn)=>jn>=je?kt:kt+cn.height,0),[v,je]),rr=A1n(),rn=et.useMemo(()=>{var kt;return(kt=e.swipeDirections)!=null?kt:W1n(U)},[e.swipeDirections,U]),ln=_.invert||h,An=jt==="loading";Kt.current=et.useMemo(()=>je*q+tn,[je,tn]),et.useEffect(()=>{Oe.current=at},[at]),et.useEffect(()=>{ee(!0)},[]),et.useEffect(()=>{const kt=_t.current;if(kt){const cn=kt.getBoundingClientRect().height;return He(cn),x(jn=>[{toastId:_.id,height:cn,position:_.position},...jn]),()=>x(jn=>jn.filter(fn=>fn.toastId!==_.id))}},[x,_.id]),et.useLayoutEffect(()=>{if(!V)return;const kt=_t.current,cn=kt.style.height;kt.style.height="auto";const jn=kt.getBoundingClientRect().height;kt.style.height=cn,He(jn),x(fn=>fn.find(pn=>pn.toastId===_.id)?fn.map(pn=>pn.toastId===_.id?{...pn,height:jn}:pn):[{toastId:_.id,height:jn,position:_.position},...fn])},[V,_.title,_.description,x,_.id,_.jsx,_.action,_.cancel]);const qn=et.useCallback(()=>{ae(!0),Ie(Kt.current),x(kt=>kt.filter(cn=>cn.toastId!==_.id)),setTimeout(()=>{C(_)},K1n)},[_,C,x,Kt]);et.useEffect(()=>{if(_.promise&&jt==="loading"||_.duration===1/0||_.type==="loading")return;let kt;return y||m||rr?(()=>{if(Qe.current{Oe.current!==1/0&&(nt.current=new Date().getTime(),kt=setTimeout(()=>{_.onAutoClose==null||_.onAutoClose.call(_,_),qn()},Oe.current))})(),()=>clearTimeout(kt)},[y,m,_,jt,rr,qn]),et.useEffect(()=>{_.delete&&(qn(),_.onDismiss==null||_.onDismiss.call(_,_))},[qn,_.delete]);function Yn(){var kt;if(Y!=null&&Y.loading){var cn;return et.createElement("div",{className:zo(H==null?void 0:H.loader,_==null||(cn=_.classNames)==null?void 0:cn.loader,"sonner-loader"),"data-visible":jt==="loading"},Y.loading)}return et.createElement(C1n,{className:zo(H==null?void 0:H.loader,_==null||(kt=_.classNames)==null?void 0:kt.loader),visible:jt==="loading"})}const fr=_.icon||(Y==null?void 0:Y[jt])||k1n(jt);var Xr,zr;return et.createElement("li",{tabIndex:0,ref:_t,className:zo(D,ct,H==null?void 0:H.toast,_==null||(n=_.classNames)==null?void 0:n.toast,H==null?void 0:H[mt],_==null||(t=_.classNames)==null?void 0:t[mt]),"data-sonner-toast":"","data-rich-colors":(Xr=_.richColors)!=null?Xr:N,"data-styled":!(_.jsx||_.unstyled||p),"data-mounted":V,"data-promise":!!_.promise,"data-swiped":_e,"data-removed":ce,"data-visible":$t,"data-y-position":Tt,"data-x-position":Yt,"data-index":b,"data-front":Vt,"data-swiping":se,"data-dismissible":we,"data-type":jt,"data-invert":ln,"data-swipe-out":oe,"data-swipe-direction":F,"data-expanded":!!(y||W&&V),"data-testid":_.testId,style:{"--index":b,"--toasts-before":b,"--z-index":w.length-b,"--offset":`${ce?Ee:Kt.current}px`,"--initial-height":W?"auto":`${ze}px`,...T,..._.style},onDragEnd:()=>{X(!1),L(null),wt.current=null},onPointerDown:kt=>{kt.button!==2&&(An||!we||(Xe.current=new Date,Ie(Kt.current),kt.target.setPointerCapture(kt.pointerId),kt.target.tagName!=="BUTTON"&&(X(!0),wt.current={x:kt.clientX,y:kt.clientY})))},onPointerUp:()=>{var kt,cn,jn;if(oe||!we)return;wt.current=null;const fn=Number(((kt=_t.current)==null?void 0:kt.style.getPropertyValue("--swipe-amount-x").replace("px",""))||0),Dn=Number(((cn=_t.current)==null?void 0:cn.style.getPropertyValue("--swipe-amount-y").replace("px",""))||0),pn=new Date().getTime()-((jn=Xe.current)==null?void 0:jn.getTime()),Un=$==="x"?fn:Dn,Rn=Math.abs(Un)/pn;if(($==="x"?rn.includes(fn>0?"right":"left"):rn.includes(Dn>0?"bottom":"top"))&&(Math.abs(Un)>=V1n||Rn>.11)){Ie(Kt.current),_.onDismiss==null||_.onDismiss.call(_,_),G($==="x"?fn>0?"right":"left":Dn>0?"down":"up"),qn(),le(!0);return}else{var Dt,Ue;(Dt=_t.current)==null||Dt.style.setProperty("--swipe-amount-x","0px"),(Ue=_t.current)==null||Ue.style.setProperty("--swipe-amount-y","0px")}pe(!1),X(!1),L(null)},onPointerMove:kt=>{var cn,jn,fn;if(!wt.current||!we||((cn=window.getSelection())==null?void 0:cn.toString().length)>0)return;const pn=kt.clientY-wt.current.y,Un=kt.clientX-wt.current.x;!$&&(Math.abs(Un)>1||Math.abs(pn)>1)&&L(Math.abs(Un)>Math.abs(pn)?"x":"y");let Rn={x:0,y:0};const yt=Dt=>1/(1.5+Math.abs(Dt)/20);if($==="y"){if(rn.includes("top")||rn.includes("bottom"))if(rn.includes("top")&&pn<0||rn.includes("bottom")&&pn>0)Rn.y=pn;else{const Dt=pn*yt(pn);Rn.y=Math.abs(Dt)0)Rn.x=Un;else{const Dt=Un*yt(Un);Rn.x=Math.abs(Dt)0||Math.abs(Rn.y)>0)&&pe(!0),(jn=_t.current)==null||jn.style.setProperty("--swipe-amount-x",`${Rn.x}px`),(fn=_t.current)==null||fn.style.setProperty("--swipe-amount-y",`${Rn.y}px`)}},qe&&!_.jsx&&jt!=="loading"?et.createElement("button",{"aria-label":te,"data-disabled":An,"data-close-button":!0,onClick:An||!we?()=>{}:()=>{qn(),_.onDismiss==null||_.onDismiss.call(_,_)},className:zo(H==null?void 0:H.closeButton,_==null||(r=_.classNames)==null?void 0:r.closeButton)},(zr=Y==null?void 0:Y.close)!=null?zr:T1n):null,(jt||_.icon||_.promise)&&_.icon!==null&&((Y==null?void 0:Y[jt])!==null||_.icon)?et.createElement("div",{"data-icon":"",className:zo(H==null?void 0:H.icon,_==null||(s=_.classNames)==null?void 0:s.icon)},jt==="loading"?_.icon||Yn():_.promise?Yn():null,jt!=="loading"?fr:null):null,et.createElement("div",{"data-content":"",className:zo(H==null?void 0:H.content,_==null||(i=_.classNames)==null?void 0:i.content)},et.createElement("div",{"data-title":"",className:zo(H==null?void 0:H.title,_==null||(a=_.classNames)==null?void 0:a.title)},_.jsx?_.jsx:typeof _.title=="function"?_.title():_.title),_.description?et.createElement("div",{"data-description":"",className:zo(I,ye,H==null?void 0:H.description,_==null||(o=_.classNames)==null?void 0:o.description)},typeof _.description=="function"?_.description():_.description):null),et.isValidElement(_.cancel)?_.cancel:_.cancel&&Xg(_.cancel)?et.createElement("button",{"data-button":!0,"data-cancel":!0,style:_.cancelButtonStyle||j,onClick:kt=>{Xg(_.cancel)&&we&&(_.cancel.onClick==null||_.cancel.onClick.call(_.cancel,kt),qn())},className:zo(H==null?void 0:H.cancelButton,_==null||(l=_.classNames)==null?void 0:l.cancelButton)},_.cancel.label):null,et.isValidElement(_.action)?_.action:_.action&&Xg(_.action)?et.createElement("button",{"data-button":!0,"data-action":!0,style:_.actionButtonStyle||M,onClick:kt=>{Xg(_.action)&&(_.action.onClick==null||_.action.onClick.call(_.action,kt),!kt.defaultPrevented&&qn())},className:zo(H==null?void 0:H.actionButton,_==null||(u=_.classNames)==null?void 0:u.actionButton)},_.action.label):null)};function Hz(){if(typeof window>"u"||typeof document>"u")return"ltr";const e=document.documentElement.getAttribute("dir");return e==="auto"||!e?window.getComputedStyle(document.documentElement).direction:e}function X1n(e,n){const t={};return[e,n].forEach((r,s)=>{const i=s===1,a=i?"--mobile-offset":"--offset",o=i?q1n:H1n;function l(u){["top","right","bottom","left"].forEach(h=>{t[`${a}-${h}`]=typeof u=="number"?`${u}px`:u})}typeof r=="number"||typeof r=="string"?l(r):typeof r=="object"?["top","right","bottom","left"].forEach(u=>{r[u]===void 0?t[`${a}-${u}`]=o:t[`${a}-${u}`]=typeof r[u]=="number"?`${r[u]}px`:r[u]}):l(o)}),t}const Y1n=et.forwardRef(function(n,t){const{id:r,invert:s,position:i="bottom-right",hotkey:a=["altKey","KeyT"],expand:o,closeButton:l,className:u,offset:h,mobileOffset:_,theme:p="light",richColors:m,duration:x,style:k,visibleToasts:v=F1n,toastOptions:b,dir:w=Hz(),gap:y=G1n,icons:C,customAriaLabel:N,containerAriaLabel:E="Notifications"}=n,[T,j]=et.useState([]),M=et.useMemo(()=>r?T.filter(ee=>ee.toasterId===r):T.filter(ee=>!ee.toasterId),[T,r]),D=et.useMemo(()=>Array.from(new Set([i].concat(M.filter(ee=>ee.position).map(ee=>ee.position)))),[M,i]),[I,P]=et.useState([]),[U,q]=et.useState(!1),[W,H]=et.useState(!1),[Y,te]=et.useState(p!=="system"?p:typeof window<"u"&&window.matchMedia&&window.matchMedia("(prefers-color-scheme: dark)").matches?"dark":"light"),$=et.useRef(null),L=a.join("+").replace(/Key/g,"").replace(/Digit/g,""),F=et.useRef(null),G=et.useRef(!1),V=et.useCallback(ee=>{j(ce=>{var ae;return(ae=ce.find(se=>se.id===ee.id))!=null&&ae.delete||Ei.dismiss(ee.id),ce.filter(({id:se})=>se!==ee.id)})},[]);return et.useEffect(()=>Ei.subscribe(ee=>{if(ee.dismiss){requestAnimationFrame(()=>{j(ce=>ce.map(ae=>ae.id===ee.id?{...ae,delete:!0}:ae))});return}setTimeout(()=>{x1n.flushSync(()=>{j(ce=>{const ae=ce.findIndex(se=>se.id===ee.id);return ae!==-1?[...ce.slice(0,ae),{...ce[ae],...ee},...ce.slice(ae+1)]:[ee,...ce]})})})}),[]),et.useEffect(()=>{if(p!=="system"){te(p);return}if(p==="system"&&(window.matchMedia&&window.matchMedia("(prefers-color-scheme: dark)").matches?te("dark"):te("light")),typeof window>"u")return;const ee=window.matchMedia("(prefers-color-scheme: dark)");try{ee.addEventListener("change",({matches:ce})=>{te(ce?"dark":"light")})}catch{ee.addListener(({matches:ae})=>{try{te(ae?"dark":"light")}catch(se){console.error(se)}})}},[p]),et.useEffect(()=>{T.length<=1&&q(!1)},[T]),et.useEffect(()=>{const ee=ce=>{var ae;if(a.length>0&&a.every(oe=>ce[oe]||ce.code===oe)){var X;q(!0),(X=$.current)==null||X.focus()}ce.code==="Escape"&&(document.activeElement===$.current||(ae=$.current)!=null&&ae.contains(document.activeElement))&&q(!1)};return document.addEventListener("keydown",ee),()=>document.removeEventListener("keydown",ee)},[a]),et.useEffect(()=>{if($.current)return()=>{F.current&&(F.current.focus({preventScroll:!0}),F.current=null,G.current=!1)}},[$.current]),et.createElement("section",{ref:t,"aria-label":N??`${E} ${L}`,tabIndex:-1,"aria-live":"polite","aria-relevant":"additions text","aria-atomic":"false",suppressHydrationWarning:!0,"data-react-aria-top-layer":!0},D.map((ee,ce)=>{var ae;const[se,X]=ee.split("-");return M.length?et.createElement("ol",{key:ee,dir:w==="auto"?Hz():w,tabIndex:-1,ref:$,className:u,"data-sonner-toaster":!0,"data-sonner-theme":Y,"data-y-position":se,"data-x-position":X,style:{"--front-toast-height":`${((ae=I[0])==null?void 0:ae.height)||0}px`,"--width":`${U1n}px`,"--gap":`${y}px`,...k,...X1n(h,_)},onBlur:oe=>{G.current&&!oe.currentTarget.contains(oe.relatedTarget)&&(G.current=!1,F.current&&(F.current.focus({preventScroll:!0}),F.current=null))},onFocus:oe=>{oe.target instanceof HTMLElement&&oe.target.dataset.dismissible==="false"||G.current||(G.current=!0,F.current=oe.relatedTarget)},onMouseEnter:()=>q(!0),onMouseMove:()=>q(!0),onMouseLeave:()=>{W||q(!1)},onDragEnd:()=>q(!1),onPointerDown:oe=>{oe.target instanceof HTMLElement&&oe.target.dataset.dismissible==="false"||H(!0)},onPointerUp:()=>H(!1)},M.filter(oe=>!oe.position&&ce===0||oe.position===ee).map((oe,le)=>{var _e,pe;return et.createElement(Q1n,{key:oe.id,icons:C,index:le,toast:oe,defaultRichColors:m,duration:(_e=b==null?void 0:b.duration)!=null?_e:x,className:b==null?void 0:b.className,descriptionClassName:b==null?void 0:b.descriptionClassName,invert:s,visibleToasts:v,closeButton:(pe=b==null?void 0:b.closeButton)!=null?pe:l,interacting:W,position:ee,style:b==null?void 0:b.style,unstyled:b==null?void 0:b.unstyled,classNames:b==null?void 0:b.classNames,cancelButtonStyle:b==null?void 0:b.cancelButtonStyle,actionButtonStyle:b==null?void 0:b.actionButtonStyle,closeButtonAriaLabel:b==null?void 0:b.closeButtonAriaLabel,removeToast:V,toasts:M.filter(Ee=>Ee.position==oe.position),heights:I.filter(Ee=>Ee.position==oe.position),setHeights:P,expandByDefault:o,gap:y,expanded:U,swipeDirections:n.swipeDirections})})):null}))});function Z1n(e){const[n]=UL();return f.jsx(Y1n,{theme:n,...e})}function Vn(e,n,t){P1n[n](e,{duration:n==="warning"||n==="error"?1/0:5e3,position:"top-center",closeButton:!0,...t})}function Yk({content:e,children:n,className:t}){const r=A.useRef(null),s=A.useRef(null);function i(){const o=r.current,l=s.current;if(!o||!l)return;l.matches(":popover-open")||l.showPopover();const u=o.getBoundingClientRect(),h=l.getBoundingClientRect(),_=Math.max(8,Math.min(u.left+u.width/2-h.width/2,window.innerWidth-h.width-8));l.style.left=`${_}px`,l.style.top=`${Math.max(8,u.top-h.height-6)}px`}function a(){var o,l;(o=r.current)!=null&&o.matches(":hover, :focus")||(l=s.current)==null||l.hidePopover()}return A.useEffect(()=>{const o=()=>{var l;return(l=s.current)==null?void 0:l.hidePopover()};return window.addEventListener("scroll",o,!0),window.addEventListener("resize",o),()=>{window.removeEventListener("scroll",o,!0),window.removeEventListener("resize",o)}},[]),f.jsxs("span",{ref:r,className:vs("group relative inline-flex cursor-help rounded-full outline-none focus-visible:outline-2 focus-visible:outline-text focus-visible:outline-offset-2",t),tabIndex:0,role:"img","aria-label":e,onMouseEnter:i,onMouseLeave:a,onFocus:i,onBlur:a,onKeyDown:o=>{var l;o.key==="Escape"&&((l=s.current)!=null&&l.matches(":popover-open"))&&(o.preventDefault(),o.stopPropagation(),s.current.hidePopover())},children:[n,f.jsx("span",{ref:s,popover:"manual",role:"tooltip",className:"pointer-events-none fixed inset-auto m-0 w-max max-w-64 whitespace-normal rounded-sm border-0 bg-text px-2 py-1.5 font-sans text-sm font-normal leading-snug text-background shadow-control-subtle",children:e})]})}const J1n='button:not([disabled]), input:not([disabled]), textarea:not([disabled]), [tabindex]:not([tabindex="-1"])';function kb(e,n,t="[data-initial-focus]"){const r=A.useRef(n);r.current=n,A.useEffect(()=>{const s=e.current;if(!s)return;const i=document.activeElement instanceof HTMLElement?document.activeElement:null,a=()=>[...s.querySelectorAll(J1n)];(s.querySelector(t)??a()[0]??s).focus();const o=l=>{if(l.key==="Escape"){if(s.querySelector(":popover-open"))return;l.preventDefault(),l.stopPropagation(),r.current();return}if(l.key!=="Tab")return;const u=a(),h=u[0],_=u.at(-1);!h||!_?(l.preventDefault(),s.focus()):l.shiftKey&&document.activeElement===h?(l.preventDefault(),_.focus()):!l.shiftKey&&document.activeElement===_&&(l.preventDefault(),h.focus())};return document.addEventListener("keydown",o,!0),()=>{document.removeEventListener("keydown",o,!0),i==null||i.focus()}},[e,t])}function lI({host:e,preview:n,currentClientAttached:t,stopping:r,onClose:s,onConfirm:i}){const a=A.useRef(null),o=Math.max(0,n.attachmentCount-(t?1:0)),l=[];return n.activeTurnCount>0&&l.push(n.activeTurnCount===1?j5t():X5t({count:Jt(n.activeTurnCount)})),n.pendingPermissionCount>0&&l.push(n.pendingPermissionCount===1?t5t():h3t({count:Jt(n.pendingPermissionCount)})),o>0&&l.push(o===1?p5t():L5t({count:Jt(o)})),n.queuedMessageCount>0&&l.push(n.queuedMessageCount===1?w5t():q5t({count:Jt(n.queuedMessageCount)})),n.activeRunCount>0&&l.push(n.activeRunCount===1?l5t():D3t({count:Jt(n.activeRunCount)})),kb(a,s),Oa.createPortal(f.jsx("div",{className:"fixed inset-0 z-200 flex items-center justify-center bg-modal-backdrop p-5",onClick:u=>{!r&&u.target===u.currentTarget&&s()},children:f.jsxs("div",{ref:a,className:"w-120 max-w-full rounded-xl border border-border bg-background p-6 shadow-modal",role:"dialog","aria-modal":"true","aria-labelledby":"remote-stop-dialog-title","aria-describedby":l.length>0?"remote-stop-dialog-impact":void 0,tabIndex:-1,children:[f.jsx("h2",{id:"remote-stop-dialog-title",className:"m-0 text-xl font-medium text-text",children:z3t({host:Ne(e)})}),l.length>0&&f.jsxs("div",{id:"remote-stop-dialog-impact",className:"mt-4 text-sm text-text",children:[f.jsx("p",{className:"m-0 font-medium",children:W3t()}),f.jsx("ul",{className:"mt-2 mb-0 space-y-1 ps-5",children:l.map(u=>f.jsx("li",{children:u},u))})]}),f.jsxs("div",{className:"mt-6 flex justify-end gap-2.5",children:[f.jsx(Me,{disabled:r,onClick:s,children:P_()}),f.jsx(Me,{variant:"danger",disabled:r,onClick:i,children:r?rkt():x3t()})]})]})}),document.body)}/** +स्टोर की एक कॉपी नए स्थान पर बनाई जाएगी और वहीं सक्रिय की जाएगी। सक्रिय रन या चैट स्थानांतरण को रोक सकते हैं।`,zan=((e,n={})=>{const t=n.locale??z();return t==="zh-CN"?kan(e):t==="fa"?San(e):t==="ar"?Can(e):t==="es"?Ean(e):t==="hi"?Nan(e):wan(e)}),jan=()=>"Move data here",Tan=()=>"将数据移动到此处",Aan=()=>"انتقال داده به اینجا",Ran=()=>"نقل البيانات إلى هنا",Man=()=>"Mover los datos aquí",Oan=()=>"डेटा यहाँ ले जाएं",Dan=((e={},n={})=>{const t=n.locale??z();return t==="zh-CN"?Tan():t==="fa"?Aan():t==="ar"?Ran():t==="es"?Man():t==="hi"?Oan():jan()}),Lan=()=>"Moving…",Ian=()=>"正在移动…",$an=()=>"در حال جابه‌جایی…",Ban=()=>"جارٍ النقل…",Pan=()=>"Moviendo…",Fan=()=>"स्थानांतरित हो रहा है…",Han=((e={},n={})=>{const t=n.locale??z();return t==="zh-CN"?Ian():t==="fa"?$an():t==="ar"?Ban():t==="es"?Pan():t==="hi"?Fan():Lan()}),qan=()=>"Preparing…",Uan=()=>"正在准备…",Gan=()=>"در حال آماده‌سازی…",Van=()=>"جارٍ التحضير…",Kan=()=>"Preparando…",Wan=()=>"तैयार हो रहा है…",Qan=((e={},n={})=>{const t=n.locale??z();return t==="zh-CN"?Uan():t==="fa"?Gan():t==="ar"?Van():t==="es"?Kan():t==="hi"?Wan():qan()}),Xan=()=>" (same disk, instant)",Yan=()=>"(同一磁盘,可立即完成)",Zan=()=>" (روی همان دیسک، فوری)",Jan=()=>" (القرص نفسه، فوري)",eon=()=>" (mismo disco, instantáneo)",ton=()=>" (उसी डिस्क पर, तुरंत)",non=((e={},n={})=>{const t=n.locale??z();return t==="zh-CN"?Yan():t==="fa"?Zan():t==="ar"?Jan():t==="es"?eon():t==="hi"?ton():Xan()}),ron=()=>"default location",son=()=>"默认位置",ion=()=>"محل پیش‌فرض",aon=()=>"الموقع الافتراضي",oon=()=>"ubicación predeterminada",lon=()=>"डिफ़ॉल्ट स्थान",con=((e={},n={})=>{const t=n.locale??z();return t==="zh-CN"?son():t==="fa"?ion():t==="ar"?aon():t==="es"?oon():t==="hi"?lon():ron()}),uon=()=>"ORX_DATA_DIR environment variable",_on=()=>"ORX_DATA_DIR 环境变量",fon=()=>"متغیر محیطی ORX_DATA_DIR",don=()=>"متغيّر البيئة ORX_DATA_DIR",hon=()=>"variable de entorno ORX_DATA_DIR",pon=()=>"ORX_DATA_DIR एनवायरनमेंट वेरिएबल",mon=((e={},n={})=>{const t=n.locale??z();return t==="zh-CN"?_on():t==="fa"?fon():t==="ar"?don():t==="es"?hon():t==="hi"?pon():uon()}),gon=()=>"your saved setting",von=()=>"已保存的设置",bon=()=>"تنظیم ذخیره‌شدهٔ شما",yon=()=>"إعدادك المحفوظ",xon=()=>"tu ajuste guardado",won=()=>"आपकी सेव की गई सेटिंग",kon=((e={},n={})=>{const t=n.locale??z();return t==="zh-CN"?von():t==="fa"?bon():t==="ar"?yon():t==="es"?xon():t==="hi"?won():gon()}),Son=()=>"XDG_DATA_HOME",Con=()=>"XDG_DATA_HOME",Eon=()=>"XDG_DATA_HOME",Non=()=>"XDG_DATA_HOME",zon=()=>"XDG_DATA_HOME",jon=()=>"XDG_DATA_HOME",Ton=((e={},n={})=>{const t=n.locale??z();return t==="zh-CN"?Con():t==="fa"?Eon():t==="ar"?Non():t==="es"?zon():t==="hi"?jon():Son()}),Aon=()=>"Verifying…",Ron=()=>"正在验证…",Mon=()=>"در حال بررسی…",Oon=()=>"جارٍ التحقق…",Don=()=>"Verificando…",Lon=()=>"सत्यापित हो रहा है…",Ion=((e={},n={})=>{const t=n.locale??z();return t==="zh-CN"?Ron():t==="fa"?Mon():t==="ar"?Oon():t==="es"?Don():t==="hi"?Lon():Aon()}),$on=()=>"Loading…",Bon=()=>"正在加载…",Pon=()=>"در حال بارگیری…",Fon=()=>"جارٍ التحميل…",Hon=()=>"Cargando…",qon=()=>"लोड हो रहा है…",Uon=((e={},n={})=>{const t=n.locale??z();return t==="zh-CN"?Bon():t==="fa"?Pon():t==="ar"?Fon():t==="es"?Hon():t==="hi"?qon():$on()}),Gon=()=>"This sub-agent is no longer available.",Von=()=>"此子智能体已不可用。",Kon=()=>"این عامل فرعی دیگر در دسترس نیست.",Won=()=>"لم يعد هذا الوكيل الفرعي متاحًا.",Qon=()=>"Este subagente ya no está disponible.",Xon=()=>"यह सब-एजेंट अब उपलब्ध नहीं है।",Yon=((e={},n={})=>{const t=n.locale??z();return t==="zh-CN"?Von():t==="fa"?Kon():t==="ar"?Won():t==="es"?Qon():t==="hi"?Xon():Gon()}),Zon=e=>`${e==null?void 0:e.label} (preview; double-click or Command/Control K, then Enter to keep open)`,Jon=e=>`${e==null?void 0:e.label}(预览;双击或按 Command/Control K 后按 Enter 以保持打开)`,eln=e=>`${e==null?void 0:e.label} (پیش‌نمایش؛ برای باز نگه‌داشتن دوبار کلیک کنید یا Command/Control K و سپس Enter را بزنید)`,tln=e=>`${e==null?void 0:e.label} (معاينة؛ انقر نقرًا مزدوجًا أو Command/Control K ثم Enter لإبقائه مفتوحًا)`,nln=e=>`${e==null?void 0:e.label} (vista previa; doble clic o Comando/Control K y luego Intro para mantenerla abierta)`,rln=e=>`${e==null?void 0:e.label} (प्रीव्यू; खुला रखने के लिए डबल-क्लिक करें या Command/Control K, फिर Enter दबाएं)`,sln=((e,n={})=>{const t=n.locale??z();return t==="zh-CN"?Jon(e):t==="fa"?eln(e):t==="ar"?tln(e):t==="es"?nln(e):t==="hi"?rln(e):Zon(e)}),iln=e=>`${e==null?void 0:e.label} (double-click or ⌘/Ctrl+K Enter to keep open)`,aln=e=>`${e==null?void 0:e.label}(双击或按 ⌘/Ctrl+K 后按 Enter 以保持打开)`,oln=e=>`${e==null?void 0:e.label} (برای باز نگه‌داشتن دوبار کلیک کنید یا ⌘/Ctrl+K و سپس Enter را بزنید)`,lln=e=>`${e==null?void 0:e.label} (انقر نقرًا مزدوجًا أو ⌘/Ctrl+K ثم Enter لإبقائه مفتوحًا)`,cln=e=>`${e==null?void 0:e.label} (doble clic o ⌘/Ctrl+K Intro para mantenerla abierta)`,uln=e=>`${e==null?void 0:e.label} (खुला रखने के लिए डबल-क्लिक करें या ⌘/Ctrl+K फिर Enter दबाएं)`,_ln=((e,n={})=>{const t=n.locale??z();return t==="zh-CN"?aln(e):t==="fa"?oln(e):t==="ar"?lln(e):t==="es"?cln(e):t==="hi"?uln(e):iln(e)}),fln=()=>"Alternatively, tell your agent to add a LaTeX template for you.",dln=()=>"或者,请你的智能体为你添加 LaTeX 模板。",hln=()=>"یا از عامل خود بخواهید یک قالب LaTeX برایتان اضافه کند.",pln=()=>"أو بدلًا من ذلك، اطلب من وكيلك إضافة قالب LaTeX لك.",mln=()=>"También puedes pedirle a tu agente que añada una plantilla de LaTeX por ti.",gln=()=>"या अपने एजेंट से आपके लिए एक LaTeX टेम्पलेट जोड़ने को कहें।",vln=((e={},n={})=>{const t=n.locale??z();return t==="zh-CN"?dln():t==="fa"?hln():t==="ar"?pln():t==="es"?mln():t==="hi"?gln():fln()}),bln=()=>", a repo for training a mini-GPT from scratch.",yln=()=>",一个从零训练迷你 GPT 的仓库。",xln=()=>"، اثر Andrej Karpathy، مخزنی برای آموزش یک GPT کوچک از صفر، استفاده می‌کند.",wln=()=>" لأندريه كارباثي، المخصّص لتدريب نموذج mini-GPT من الصفر.",kln=()=>" de Andrej Karpathy, un repositorio para entrenar un mini-GPT desde cero.",Sln=()=>", स्क्रैच से एक मिनी-GPT ट्रेन करने के लिए एक रिपॉज़िटरी।",Cln=((e={},n={})=>{const t=n.locale??z();return t==="zh-CN"?yln():t==="fa"?xln():t==="ar"?wln():t==="es"?kln():t==="hi"?Sln():bln()}),Eln=()=>"Close",Nln=()=>"关闭",zln=()=>"بستن",jln=()=>"إغلاق",Tln=()=>"Cerrar",Aln=()=>"बंद करें",o3=((e={},n={})=>{const t=n.locale??z();return t==="zh-CN"?Nln():t==="fa"?zln():t==="ar"?jln():t==="es"?Tln():t==="hi"?Aln():Eln()}),Rln=()=>"Create a new project",Mln=()=>"新建项目",Oln=()=>"ایجاد پروژهٔ جدید",Dln=()=>"إنشاء مشروع جديد",Lln=()=>"Crear un proyecto nuevo",Iln=()=>"नया प्रोजेक्ट बनाएं",$ln=((e={},n={})=>{const t=n.locale??z();return t==="zh-CN"?Mln():t==="fa"?Oln():t==="ar"?Dln():t==="es"?Lln():t==="hi"?Iln():Rln()}),Bln=()=>"Demo project",Pln=()=>"演示项目",Fln=()=>"پروژهٔ نمایشی",Hln=()=>"مشروع توضيحي",qln=()=>"Proyecto de demostración",Uln=()=>"डेमो प्रोजेक्ट",Gln=((e={},n={})=>{const t=n.locale??z();return t==="zh-CN"?Pln():t==="fa"?Fln():t==="ar"?Hln():t==="es"?qln():t==="hi"?Uln():Bln()}),Vln=()=>"Look through the agent conversations, experiments, runs, and artifacts to see how a project on OpenResearch comes together.",Kln=()=>"浏览智能体对话、实验、运行和产物,了解 OpenResearch 项目是如何形成的。",Wln=()=>"گفتگوهای عامل، آزمایش‌ها، اجراها و خروجی‌ها را ببینید تا با شکل‌گیری یک پروژه در OpenResearch آشنا شوید.",Qln=()=>"تصفّح محادثات الوكيل والتجارب وعمليات التشغيل والمُخرَجات لترى كيف يتشكّل مشروع على OpenResearch.",Xln=()=>"Explora las conversaciones con el agente, los experimentos, las ejecuciones y los artefactos para ver cómo se construye un proyecto en OpenResearch.",Yln=()=>"यह देखने के लिए एजेंट बातचीत, प्रयोग, रन और आर्टिफ़ैक्ट देखें कि OpenResearch पर एक प्रोजेक्ट कैसे आकार लेता है।",Zln=((e={},n={})=>{const t=n.locale??z();return t==="zh-CN"?Kln():t==="fa"?Wln():t==="ar"?Qln():t==="es"?Xln():t==="hi"?Yln():Vln()}),Jln=()=>"nanochat",ecn=()=>"nanochat",tcn=()=>"nanochat",ncn=()=>"nanochat",rcn=()=>"nanochat",scn=()=>"nanochat",icn=((e={},n={})=>{const t=n.locale??z();return t==="zh-CN"?ecn():t==="fa"?tcn():t==="ar"?ncn():t==="es"?rcn():t==="hi"?scn():Jln()}),acn=()=>"Try the demo experiment",ocn=()=>"试试演示实验",lcn=()=>"آزمایش نمایشی را امتحان کنید",ccn=()=>"جرّب التجربة التوضيحية",ucn=()=>"Probar el experimento de demostración",_cn=()=>"डेमो प्रयोग आज़माएं",fcn=((e={},n={})=>{const t=n.locale??z();return t==="zh-CN"?ocn():t==="fa"?lcn():t==="ar"?ccn():t==="es"?ucn():t==="hi"?_cn():acn()}),dcn=()=>"Couldn’t save your progress. Try again.",hcn=()=>"无法保存进度。请重试。",pcn=()=>"ذخیرهٔ پیشرفت ممکن نشد. دوباره تلاش کنید.",mcn=()=>"تعذّر حفظ تقدّمك. حاول مجددًا.",gcn=()=>"No se pudo guardar tu progreso. Inténtalo de nuevo.",vcn=()=>"आपकी प्रगति सेव नहीं हो सकी। फिर से कोशिश करें।",bcn=((e={},n={})=>{const t=n.locale??z();return t==="zh-CN"?hcn():t==="fa"?pcn():t==="ar"?mcn():t==="es"?gcn():t==="hi"?vcn():dcn()}),ycn=()=>"This is a demo project showing how OpenResearch works. This demo uses Andrej Karpathy's",xcn=()=>"这是一个展示 OpenResearch 工作方式的演示项目。本演示使用 Andrej Karpathy 的",wcn=()=>"این پروژهٔ نمایشی نحوهٔ کار OpenResearch را نشان می‌دهد. این نسخهٔ نمایشی از",kcn=()=>"هذا مشروع توضيحي يبيّن كيف يعمل OpenResearch. يستخدم هذا العرض مستودع",Scn=()=>"Este es un proyecto de demostración que muestra cómo funciona OpenResearch. Esta demo usa",Ccn=()=>"यह एक डेमो प्रोजेक्ट है जो दिखाता है कि OpenResearch कैसे काम करता है। यह डेमो Andrej Karpathy के",Ecn=((e={},n={})=>{const t=n.locale??z();return t==="zh-CN"?xcn():t==="fa"?wcn():t==="ar"?kcn():t==="es"?Scn():t==="hi"?Ccn():ycn()}),Ncn=()=>"Welcome to OpenResearch",zcn=()=>"欢迎使用 OpenResearch",jcn=()=>"به OpenResearch خوش آمدید",Tcn=()=>"مرحبًا بك في OpenResearch",Acn=()=>"Te damos la bienvenida a OpenResearch",Rcn=()=>"OpenResearch में आपका स्वागत है",Mcn=((e={},n={})=>{const t=n.locale??z();return t==="zh-CN"?zcn():t==="fa"?jcn():t==="ar"?Tcn():t==="es"?Acn():t==="hi"?Rcn():Ncn()}),Ocn=()=>"Baseline",Dcn=()=>"基线",Lcn=()=>"مبنا",Icn=()=>"الأساس",$cn=()=>"Base",Bcn=()=>"बेसलाइन",Pcn=((e={},n={})=>{const t=n.locale??z();return t==="zh-CN"?Dcn():t==="fa"?Lcn():t==="ar"?Icn():t==="es"?$cn():t==="hi"?Bcn():Ocn()}),Fcn=()=>"Experiment",Hcn=()=>"实验",qcn=()=>"آزمایش",Ucn=()=>"تجربة",Gcn=()=>"Experimento",Vcn=()=>"प्रयोग",Pl=((e={},n={})=>{const t=n.locale??z();return t==="zh-CN"?Hcn():t==="fa"?qcn():t==="ar"?Ucn():t==="es"?Gcn():t==="hi"?Vcn():Fcn()}),Kcn=e=>`${e==null?void 0:e.count} experiments`,Wcn=e=>`${e==null?void 0:e.count} 个实验`,Qcn=e=>`${e==null?void 0:e.count} آزمایش`,Xcn=e=>`التجارب: ${e==null?void 0:e.count}`,Ycn=e=>`${e==null?void 0:e.count} experimentos`,Zcn=e=>`${e==null?void 0:e.count} प्रयोग`,Jcn=((e,n={})=>{const t=n.locale??z();return t==="zh-CN"?Wcn(e):t==="fa"?Qcn(e):t==="ar"?Xcn(e):t==="es"?Ycn(e):t==="hi"?Zcn(e):Kcn(e)}),eun=()=>"1 experiment",tun=()=>"1 个实验",nun=()=>"۱ آزمایش",run=()=>"تجربة واحدة",sun=()=>"1 experimento",iun=()=>"1 प्रयोग",aun=((e={},n={})=>{const t=n.locale??z();return t==="zh-CN"?tun():t==="fa"?nun():t==="ar"?run():t==="es"?sun():t==="hi"?iun():eun()}),oun=()=>"Running",lun=()=>"运行中",cun=()=>"در حال اجرا",uun=()=>"قيد التشغيل",_un=()=>"En ejecución",fun=()=>"चल रहा है",dun=((e={},n={})=>{const t=n.locale??z();return t==="zh-CN"?lun():t==="fa"?cun():t==="ar"?uun():t==="es"?_un():t==="hi"?fun():oun()}),hun=()=>"Ask in this task to create one, or switch to Entire project to see all experiments.",pun=()=>"在此任务中请求创建实验,或切换到“整个项目”查看所有实验。",mun=()=>"در این وظیفه بخواهید یکی ساخته شود، یا برای دیدن همهٔ آزمایش‌ها به «کل پروژه» بروید.",gun=()=>"اطلب في هذه المهمة إنشاء واحدة، أو بدّل إلى «المشروع بالكامل» لرؤية جميع التجارب.",vun=()=>"Pide en esta tarea que se cree uno, o cambia a Todo el proyecto para ver todos los experimentos.",bun=()=>"इस टास्क में एक बनाने को कहें, या सभी प्रयोग देखने के लिए पूरा प्रोजेक्ट पर स्विच करें।",yun=((e={},n={})=>{const t=n.locale??z();return t==="zh-CN"?pun():t==="fa"?mun():t==="ar"?gun():t==="es"?vun():t==="hi"?bun():hun()}),xun=()=>"Ask the agent in chat to create and run your first experiment.",wun=()=>"在聊天中让智能体创建并运行你的第一个实验。",kun=()=>"در گفتگو از عامل بخواهید نخستین آزمایش شما را بسازد و اجرا کند.",Sun=()=>"اطلب من الوكيل في المحادثة إنشاء أول تجربة لك وتشغيلها.",Cun=()=>"Pídele al agente en el chat que cree y ejecute tu primer experimento.",Eun=()=>"एजेंट से चैट में अपना पहला प्रयोग बनाने और चलाने को कहें।",Nun=((e={},n={})=>{const t=n.locale??z();return t==="zh-CN"?wun():t==="fa"?kun():t==="ar"?Sun():t==="es"?Cun():t==="hi"?Eun():xun()}),zun=()=>"Code",jun=()=>"代码",Tun=()=>"کد",Aun=()=>"الشيفرة",Run=()=>"Código",Mun=()=>"कोड",Oun=((e={},n={})=>{const t=n.locale??z();return t==="zh-CN"?jun():t==="fa"?Tun():t==="ar"?Aun():t==="es"?Run():t==="hi"?Mun():zun()}),Dun=()=>"Logs",Lun=()=>"日志",Iun=()=>"گزارش‌ها",$un=()=>"السجلات",Bun=()=>"Logs",Pun=()=>"लॉग",pL=((e={},n={})=>{const t=n.locale??z();return t==="zh-CN"?Lun():t==="fa"?Iun():t==="ar"?$un():t==="es"?Bun():t==="hi"?Pun():Dun()}),Fun=()=>"No experiments from the current task yet",Hun=()=>"当前任务尚无实验",qun=()=>"وظیفهٔ فعلی هنوز آزمایشی ندارد",Uun=()=>"لا توجد تجارب من المهمة الحالية بعد",Gun=()=>"Aún no hay experimentos de la tarea actual",Vun=()=>"मौजूदा टास्क से अभी तक कोई प्रयोग नहीं",Kun=((e={},n={})=>{const t=n.locale??z();return t==="zh-CN"?Hun():t==="fa"?qun():t==="ar"?Uun():t==="es"?Gun():t==="hi"?Vun():Fun()}),Wun=()=>"No experiments yet",Qun=()=>"尚无实验",Xun=()=>"هنوز آزمایشی وجود ندارد",Yun=()=>"لا توجد تجارب بعد",Zun=()=>"Aún no hay experimentos",Jun=()=>"अभी तक कोई प्रयोग नहीं",e_n=((e={},n={})=>{const t=n.locale??z();return t==="zh-CN"?Qun():t==="fa"?Xun():t==="ar"?Yun():t==="es"?Zun():t==="hi"?Jun():Wun()}),t_n=()=>"no runs",n_n=()=>"无运行",r_n=()=>"بدون اجرا",s_n=()=>"لا عمليات تشغيل",i_n=()=>"sin ejecuciones",a_n=()=>"कोई रन नहीं",o_n=((e={},n={})=>{const t=n.locale??z();return t==="zh-CN"?n_n():t==="fa"?r_n():t==="ar"?s_n():t==="es"?i_n():t==="hi"?a_n():t_n()}),l_n=()=>"Open logs",c_n=()=>"打开日志",u_n=()=>"باز کردن گزارش‌ها",__n=()=>"فتح السجلات",f_n=()=>"Abrir logs",d_n=()=>"लॉग खोलें",h_n=((e={},n={})=>{const t=n.locale??z();return t==="zh-CN"?c_n():t==="fa"?u_n():t==="ar"?__n():t==="es"?f_n():t==="hi"?d_n():l_n()}),p_n=()=>"other tasks",m_n=()=>"其他任务",g_n=()=>"وظایف دیگر",v_n=()=>"مهام أخرى",b_n=()=>"otras tareas",y_n=()=>"अन्य टास्क",x_n=((e={},n={})=>{const t=n.locale??z();return t==="zh-CN"?m_n():t==="fa"?g_n():t==="ar"?v_n():t==="es"?b_n():t==="hi"?y_n():p_n()}),w_n=()=>"Runs",k_n=()=>"运行",S_n=()=>"اجراها",C_n=()=>"عمليات التشغيل",E_n=()=>"Ejecuciones",N_n=()=>"रन",z_n=((e={},n={})=>{const t=n.locale??z();return t==="zh-CN"?k_n():t==="fa"?S_n():t==="ar"?C_n():t==="es"?E_n():t==="hi"?N_n():w_n()}),j_n=()=>"Switch to Entire project to see all experiments",T_n=()=>"切换到“整个项目”以查看所有实验",A_n=()=>"برای دیدن همهٔ آزمایش‌ها به «کل پروژه» بروید",R_n=()=>"بدّل إلى «المشروع بالكامل» لرؤية جميع التجارب",M_n=()=>"Cambia a Todo el proyecto para ver todos los experimentos",O_n=()=>"सभी प्रयोग देखने के लिए पूरा प्रोजेक्ट पर स्विच करें",D_n=((e={},n={})=>{const t=n.locale??z();return t==="zh-CN"?T_n():t==="fa"?A_n():t==="ar"?R_n():t==="es"?M_n():t==="hi"?O_n():j_n()}),L_n=e=>`Updated to ${e==null?void 0:e.version}. Restart to use it.`,I_n=e=>`已更新到 ${e==null?void 0:e.version}。重新启动即可使用。`,$_n=e=>`به ${e==null?void 0:e.version} به‌روزرسانی شد. برای استفاده دوباره راه‌اندازی کنید.`,B_n=e=>`تم التحديث إلى ${e==null?void 0:e.version}. أعد التشغيل لاستخدامه.`,P_n=e=>`Actualizado a la versión ${e==null?void 0:e.version}. Reinicia para usarla.`,F_n=e=>`${e==null?void 0:e.version} पर अपडेट हुआ। इस्तेमाल के लिए फिर से शुरू करें।`,H_n=((e,n={})=>{const t=n.locale??z();return t==="zh-CN"?I_n(e):t==="fa"?$_n(e):t==="ar"?B_n(e):t==="es"?P_n(e):t==="hi"?F_n(e):L_n(e)}),q_n=()=>"Dismiss",U_n=()=>"关闭",G_n=()=>"بستن",V_n=()=>"تجاهل",K_n=()=>"Descartar",W_n=()=>"खारिज करें",Q_n=((e={},n={})=>{const t=n.locale??z();return t==="zh-CN"?U_n():t==="fa"?G_n():t==="ar"?V_n():t==="es"?K_n():t==="hi"?W_n():q_n()}),X_n=()=>"Restart now",Y_n=()=>"立即重新启动",Z_n=()=>"هم‌اکنون دوباره راه‌اندازی کن",J_n=()=>"أعد التشغيل الآن",efn=()=>"Reiniciar ahora",tfn=()=>"अभी फिर से शुरू करें",mL=((e={},n={})=>{const t=n.locale??z();return t==="zh-CN"?Y_n():t==="fa"?Z_n():t==="ar"?J_n():t==="es"?efn():t==="hi"?tfn():X_n()}),nfn=e=>`Could not restart: ${e==null?void 0:e.error}`,rfn=e=>`无法重新启动:${e==null?void 0:e.error}`,sfn=e=>`راه‌اندازی مجدد ممکن نشد: ${e==null?void 0:e.error}`,ifn=e=>`تعذّرت إعادة التشغيل: ${e==null?void 0:e.error}`,afn=e=>`No se pudo reiniciar: ${e==null?void 0:e.error}`,ofn=e=>`फिर से शुरू नहीं हो सका: ${e==null?void 0:e.error}`,gL=((e,n={})=>{const t=n.locale??z();return t==="zh-CN"?rfn(e):t==="fa"?sfn(e):t==="ar"?ifn(e):t==="es"?afn(e):t==="hi"?ofn(e):nfn(e)}),lfn=()=>"The updated OpenResearch did not come back in time. Restart it by hand.",cfn=()=>"更新后的 OpenResearch 未能及时恢复。请手动重新启动。",ufn=()=>"OpenResearch به‌روزشده به‌موقع برنگشت. آن را به‌صورت دستی دوباره راه‌اندازی کنید.",_fn=()=>"لم يعد OpenResearch المحدَّث في الوقت المناسب. أعد تشغيله يدويًا.",ffn=()=>"La nueva versión de OpenResearch no se inició a tiempo. Reinícialo manualmente.",dfn=()=>"अपडेट किया गया OpenResearch समय पर वापस नहीं आया। इसे खुद फिर से शुरू करें।",hfn=((e={},n={})=>{const t=n.locale??z();return t==="zh-CN"?cfn():t==="fa"?ufn():t==="ar"?_fn():t==="es"?ffn():t==="hi"?dfn():lfn()}),pfn=()=>"Restarting…",mfn=()=>"正在重新启动…",gfn=()=>"در حال راه‌اندازی مجدد…",vfn=()=>"جارٍ إعادة التشغيل…",bfn=()=>"Reiniciando…",yfn=()=>"फिर से शुरू हो रहा है…",vL=((e={},n={})=>{const t=n.locale??z();return t==="zh-CN"?mfn():t==="fa"?gfn():t==="ar"?vfn():t==="es"?bfn():t==="hi"?yfn():pfn()}),xfn=()=>"macOS app",wfn=()=>"macOS 应用",kfn=()=>"برنامهٔ macOS",Sfn=()=>"تطبيق macOS",Cfn=()=>"App de macOS",Efn=()=>"macOS ऐप",Nfn=((e={},n={})=>{const t=n.locale??z();return t==="zh-CN"?wfn():t==="fa"?kfn():t==="ar"?Sfn():t==="es"?Cfn():t==="hi"?Efn():xfn()}),zfn=()=>"Installed with cargo",jfn=()=>"通过 cargo 安装",Tfn=()=>"نصب‌شده با cargo",Afn=()=>"مثبّت عبر cargo",Rfn=()=>"Instalado con cargo",Mfn=()=>"cargo से इंस्टॉल किया गया",Ofn=((e={},n={})=>{const t=n.locale??z();return t==="zh-CN"?jfn():t==="fa"?Tfn():t==="ar"?Afn():t==="es"?Rfn():t==="hi"?Mfn():zfn()}),Dfn=()=>"Installed with Homebrew",Lfn=()=>"通过 Homebrew 安装",Ifn=()=>"نصب‌شده با Homebrew",$fn=()=>"مثبّت عبر Homebrew",Bfn=()=>"Instalado con Homebrew",Pfn=()=>"Homebrew से इंस्टॉल किया गया",Ffn=((e={},n={})=>{const t=n.locale??z();return t==="zh-CN"?Lfn():t==="fa"?Ifn():t==="ar"?$fn():t==="es"?Bfn():t==="hi"?Pfn():Dfn()}),Hfn=()=>"Installed with the orx installer",qfn=()=>"通过 orx 安装程序安装",Ufn=()=>"نصب‌شده با نصب‌کنندهٔ orx",Gfn=()=>"مثبّت عبر مُثبّت orx",Vfn=()=>"Instalado con el instalador de orx",Kfn=()=>"orx इंस्टॉलर से इंस्टॉल किया गया",Wfn=((e={},n={})=>{const t=n.locale??z();return t==="zh-CN"?qfn():t==="fa"?Ufn():t==="ar"?Gfn():t==="es"?Vfn():t==="hi"?Kfn():Hfn()}),Qfn=()=>"Managed by Nix",Xfn=()=>"由 Nix 管理",Yfn=()=>"مدیریت‌شده با Nix",Zfn=()=>"مُدار بواسطة Nix",Jfn=()=>"Gestionado por Nix",edn=()=>"Nix द्वारा प्रबंधित",tdn=((e={},n={})=>{const t=n.locale??z();return t==="zh-CN"?Xfn():t==="fa"?Yfn():t==="ar"?Zfn():t==="es"?Jfn():t==="hi"?edn():Qfn()}),ndn=()=>"Portable orx.exe",rdn=()=>"便携版 orx.exe",sdn=()=>"orx.exe قابل‌حمل",idn=()=>"‏orx.exe المحمول",adn=()=>"orx.exe portable",odn=()=>"पोर्टेबल orx.exe",ldn=((e={},n={})=>{const t=n.locale??z();return t==="zh-CN"?rdn():t==="fa"?sdn():t==="ar"?idn():t==="es"?adn():t==="hi"?odn():ndn()}),cdn=()=>"Unknown install",udn=()=>"未知安装方式",_dn=()=>"روش نصب نامشخص",fdn=()=>"تثبيت غير معروف",ddn=()=>"Instalación desconocida",hdn=()=>"अज्ञात इंस्टॉल",pdn=((e={},n={})=>{const t=n.locale??z();return t==="zh-CN"?udn():t==="fa"?_dn():t==="ar"?fdn():t==="es"?ddn():t==="hi"?hdn():cdn()}),mdn=()=>"Re-run your cargo install to update.",gdn=()=>"重新运行 cargo 安装命令以更新。",vdn=()=>"برای به‌روزرسانی، نصب cargo را دوباره اجرا کنید.",bdn=()=>"أعِد تنفيذ أمر cargo install للتحديث.",ydn=()=>"Vuelve a ejecutar cargo install para actualizar.",xdn=()=>"अपडेट करने के लिए अपना cargo install फिर से चलाएं।",wdn=((e={},n={})=>{const t=n.locale??z();return t==="zh-CN"?gdn():t==="fa"?vdn():t==="ar"?bdn():t==="es"?ydn():t==="hi"?xdn():mdn()}),kdn=()=>"Run brew upgrade to update.",Sdn=()=>"运行 brew upgrade 以更新。",Cdn=()=>"برای به‌روزرسانی brew upgrade را اجرا کنید.",Edn=()=>"نفّذ brew upgrade للتحديث.",Ndn=()=>"Ejecuta brew upgrade para actualizar.",zdn=()=>"अपडेट करने के लिए brew upgrade चलाएं।",jdn=((e={},n={})=>{const t=n.locale??z();return t==="zh-CN"?Sdn():t==="fa"?Cdn():t==="ar"?Edn():t==="es"?Ndn():t==="hi"?zdn():kdn()}),Tdn=()=>"Update it through your Nix configuration.",Adn=()=>"通过 Nix 配置进行更新。",Rdn=()=>"از طریق پیکربندی Nix به‌روزرسانی کنید.",Mdn=()=>"حدّثه عبر إعداد Nix الخاص بك.",Odn=()=>"Actualízalo desde tu configuración de Nix.",Ddn=()=>"इसे अपने Nix कॉन्फ़िगरेशन के ज़रिए अपडेट करें।",Ldn=((e={},n={})=>{const t=n.locale??z();return t==="zh-CN"?Adn():t==="fa"?Rdn():t==="ar"?Mdn():t==="es"?Odn():t==="hi"?Ddn():Tdn()}),Idn=()=>"Active Experiments",$dn=()=>"活跃实验",Bdn=()=>"آزمایش‌های فعال",Pdn=()=>"التجارب النشطة",Fdn=()=>"Experimentos activos",Hdn=()=>"सक्रिय प्रयोग",qdn=((e={},n={})=>{const t=n.locale??z();return t==="zh-CN"?$dn():t==="fa"?Bdn():t==="ar"?Pdn():t==="es"?Fdn():t==="hi"?Hdn():Idn()}),Udn=()=>"Default compute",Gdn=()=>"默认计算目标",Vdn=()=>"محاسبات پیش‌فرض",Kdn=()=>"الحوسبة الافتراضية",Wdn=()=>"Cómputo predeterminado",Qdn=()=>"डिफ़ॉल्ट कंप्यूट",Xdn=((e={},n={})=>{const t=n.locale??z();return t==="zh-CN"?Gdn():t==="fa"?Vdn():t==="ar"?Kdn():t==="es"?Wdn():t==="hi"?Qdn():Udn()}),Ydn=()=>"Terminal",Zdn=()=>"终端",Jdn=()=>"ترمینال",ehn=()=>"الطرفية",thn=()=>"Terminal",nhn=()=>"टर्मिनल",yv=((e={},n={})=>{const t=n.locale??z();return t==="zh-CN"?Zdn():t==="fa"?Jdn():t==="ar"?ehn():t==="es"?thn():t==="hi"?nhn():Ydn()}),rhn=()=>"The terminal disconnected.",shn=()=>"终端连接已断开。",ihn=()=>"ارتباط ترمینال قطع شد.",ahn=()=>"انقطعت الطرفية.",ohn=()=>"La terminal se desconectó.",lhn=()=>"टर्मिनल डिस्कनेक्ट हो गया।",mz=((e={},n={})=>{const t=n.locale??z();return t==="zh-CN"?shn():t==="fa"?ihn():t==="ar"?ahn():t==="es"?ohn():t==="hi"?lhn():rhn()}),chn=e=>`Shell exited with code ${e==null?void 0:e.code}.`,uhn=e=>`Shell 已退出,退出码 ${e==null?void 0:e.code}。`,_hn=e=>`پوسته با کد ${e==null?void 0:e.code} خارج شد.`,fhn=e=>`انتهى Shell برمز الخروج ${e==null?void 0:e.code}.`,dhn=e=>`El shell terminó con el código ${e==null?void 0:e.code}.`,hhn=e=>`शेल कोड ${e==null?void 0:e.code} के साथ बंद हो गया।`,phn=((e,n={})=>{const t=n.locale??z();return t==="zh-CN"?uhn(e):t==="fa"?_hn(e):t==="ar"?fhn(e):t==="es"?dhn(e):t==="hi"?hhn(e):chn(e)}),mhn=()=>"Restart shell",ghn=()=>"重新启动 Shell",vhn=()=>"راه‌اندازی دوباره پوسته",bhn=()=>"إعادة تشغيل Shell",yhn=()=>"Reiniciar shell",xhn=()=>"शेल फिर से शुरू करें",whn=((e={},n={})=>{const t=n.locale??z();return t==="zh-CN"?ghn():t==="fa"?vhn():t==="ar"?bhn():t==="es"?yhn():t==="hi"?xhn():mhn()}),khn=()=>"This worktree",Shn=()=>"当前工作树",Chn=()=>"این درخت کاری",Ehn=()=>"شجرة العمل هذه",Nhn=()=>"Este árbol de trabajo",zhn=()=>"यह वर्कट्री",jhn=((e={},n={})=>{const t=n.locale??z();return t==="zh-CN"?Shn():t==="fa"?Chn():t==="ar"?Ehn():t==="es"?Nhn():t==="hi"?zhn():khn()}),Thn=()=>"Workspace",Ahn=()=>"工作区",Rhn=()=>"فضای کاری",Mhn=()=>"مساحة العمل",Ohn=()=>"Espacio de trabajo",Dhn=()=>"वर्कस्पेस",W2=((e={},n={})=>{const t=n.locale??z();return t==="zh-CN"?Ahn():t==="fa"?Rhn():t==="ar"?Mhn():t==="es"?Ohn():t==="hi"?Dhn():Thn()}),Lhn=e=>`Current worktree · ${e==null?void 0:e.branch}`,Ihn=e=>`当前工作树 · ${e==null?void 0:e.branch}`,$hn=e=>`درخت کاری کنونی · ${e==null?void 0:e.branch}`,Bhn=e=>`شجرة العمل الحالية · ${e==null?void 0:e.branch}`,Phn=e=>`Árbol de trabajo actual · ${e==null?void 0:e.branch}`,Fhn=e=>`मौजूदा वर्कट्री · ${e==null?void 0:e.branch}`,Hhn=((e,n={})=>{const t=n.locale??z();return t==="zh-CN"?Ihn(e):t==="fa"?$hn(e):t==="ar"?Bhn(e):t==="es"?Phn(e):t==="hi"?Fhn(e):Lhn(e)}),qhn=e=>`Default branch · ${e==null?void 0:e.branch}`,Uhn=e=>`默认分支 · ${e==null?void 0:e.branch}`,Ghn=e=>`شاخهٔ پیش‌فرض · ${e==null?void 0:e.branch}`,Vhn=e=>`الفرع الافتراضي · ${e==null?void 0:e.branch}`,Khn=e=>`Rama predeterminada · ${e==null?void 0:e.branch}`,Whn=e=>`डिफ़ॉल्ट ब्रांच · ${e==null?void 0:e.branch}`,Qhn=((e,n={})=>{const t=n.locale??z();return t==="zh-CN"?Uhn(e):t==="fa"?Ghn(e):t==="ar"?Vhn(e):t==="es"?Khn(e):t==="hi"?Whn(e):qhn(e)}),Xhn=e=>`detached at ${e==null?void 0:e.branch}`,Yhn=e=>`分离于 ${e==null?void 0:e.branch}`,Zhn=e=>`جدا در ${e==null?void 0:e.branch}`,Jhn=e=>`منفصل عند ${e==null?void 0:e.branch}`,epn=e=>`desacoplado en ${e==null?void 0:e.branch}`,tpn=e=>`${e==null?void 0:e.branch} पर डिटैच्ड`,npn=((e,n={})=>{const t=n.locale??z();return t==="zh-CN"?Yhn(e):t==="fa"?Zhn(e):t==="ar"?Jhn(e):t==="es"?epn(e):t==="hi"?tpn(e):Xhn(e)}),rpn=()=>"Listing truncated.",spn=()=>"列表已截断。",ipn=()=>"فهرست کوتاه شده است.",apn=()=>"القائمة مقتطعة.",opn=()=>"Listado truncado.",lpn=()=>"सूची छोटी की गई।",cpn=((e={},n={})=>{const t=n.locale??z();return t==="zh-CN"?spn():t==="fa"?ipn():t==="ar"?apn():t==="es"?opn():t==="hi"?lpn():rpn()}),upn=()=>"Loading…",_pn=()=>"正在加载…",fpn=()=>"در حال بارگیری…",dpn=()=>"جارٍ التحميل…",hpn=()=>"Cargando…",ppn=()=>"लोड हो रहा है…",mpn=((e={},n={})=>{const t=n.locale??z();return t==="zh-CN"?_pn():t==="fa"?fpn():t==="ar"?dpn():t==="es"?hpn():t==="hi"?ppn():upn()}),gpn=()=>"No changes yet.",vpn=()=>"尚无更改。",bpn=()=>"هنوز تغییری وجود ندارد.",ypn=()=>"لا توجد تغييرات بعد.",xpn=()=>"Aún no hay cambios.",wpn=()=>"अभी तक कोई बदलाव नहीं।",kpn=((e={},n={})=>{const t=n.locale??z();return t==="zh-CN"?vpn():t==="fa"?bpn():t==="ar"?ypn():t==="es"?xpn():t==="hi"?wpn():gpn()}),Spn=()=>"No files.",Cpn=()=>"没有文件。",Epn=()=>"فایلی وجود ندارد.",Npn=()=>"لا توجد ملفات.",zpn=()=>"No hay archivos.",jpn=()=>"कोई फ़ाइल नहीं।",Tpn=((e={},n={})=>{const t=n.locale??z();return t==="zh-CN"?Cpn():t==="fa"?Epn():t==="ar"?Npn():t==="es"?zpn():t==="hi"?jpn():Spn()}),Apn=()=>"Refresh failed:",Rpn=()=>"刷新失败:",Mpn=()=>"تازه‌سازی ناموفق بود:",Opn=()=>"فشل التحديث:",Dpn=()=>"Error al actualizar:",Lpn=()=>"रीफ़्रेश विफल:",Ipn=((e={},n={})=>{const t=n.locale??z();return t==="zh-CN"?Rpn():t==="fa"?Mpn():t==="ar"?Opn():t==="es"?Dpn():t==="hi"?Lpn():Apn()}),Ne=e=>`⁦${e}⁩`,qo=e=>`⁨${e}⁩`,Jt=e=>new Intl.NumberFormat(z()).format(e),Sp="demo_nanochat_v1",$l=e=>e.startsWith("demo_"),bd="chat_demo_nanochat_v1",bb="chat_demo_nanochat_figures_v1",yb="chat_demo_nanochat_literature_v1",$pn={[bd]:"cpu_end_to_end",[bb]:"figures",[yb]:"literature"},Q2="cpu-apple-silicon-pipeline-results.md",Bpn={[bd]:"msg_demo_nanochat_assistant_v1",[bb]:"msg_demo_nanochat_figures_assistant_v1",[yb]:"msg_demo_nanochat_literature_assistant_v1"},gz="Run the Muon matrix LR 2× probe experiment. When it finishes, compare its step-100 and step-200 val_bpb against the baseline and tell me whether doubling the matrix learning rate helps early training.";class l3 extends Error{constructor(t,r,s){super(t);Bs(this,"currentVersion");Bs(this,"exists");this.name="FileChangedError",this.currentVersion=r,this.exists=s}}function Zi(e){return(e.status==="running"||e.status==="starting")&&e.cancelRequested?"cancelling":e.status}const bL=new WeakMap;async function fi(e){if(!e.ok){const r=await e.text().catch(()=>"");let s=r;try{const i=JSON.parse(r);if(typeof i=="object"&&i!==null&&("error"in i&&typeof i.error=="string"&&(s=i.error),e.status===409&&"code"in i&&i.code==="fileChanged"&&"exists"in i&&typeof i.exists=="boolean")){const a="currentVersion"in i&&typeof i.currentVersion=="string"?i.currentVersion:null;throw new l3(s,a,i.exists)}}catch(i){if(i instanceof l3)throw i}throw new Error(s||`HTTP ${e.status}`)}const n=await e.json(),t=bL.get(e);if(t&&!$n(t))throw new DOMException("Workspace changed","AbortError");return n}const Ot=(e,n)=>fetch(e,{signal:n}).then(t=>fi(t));async function ca(e,n){const t=Ra(),r=await fetch(e,n);if(!$n(t))throw new DOMException("Workspace changed","AbortError");return bL.set(r,t),r.ok&&BW(e,t),r}const xt=(e,n,t=!1)=>ca(e,{method:"POST",keepalive:t,headers:n===void 0?{}:{"content-type":"application/json"},body:n===void 0?void 0:JSON.stringify(n)}).then(r=>fi(r)),bh=(e,n)=>ca(e,{method:"PATCH",headers:{"content-type":"application/json"},body:JSON.stringify(n)}).then(t=>fi(t)),yL=(e,n)=>ca(e,{method:"PUT",headers:{"content-type":"application/json"},body:JSON.stringify(n)}).then(t=>fi(t)),Ppn=e=>Ot("/api/projects",e).then(n=>n.projects),Fpn=e=>Ot("/api/projects/activity",e).then(n=>n.activity),Hpn=e=>Ot("/api/settings/ui-state",e),qpn=(e,n)=>Ot(`/api/projects/${encodeURIComponent(e)}/ui-state`,n),Upn=(e,n,t=!1)=>xt(`/api/projects/${encodeURIComponent(e)}/ui-state`,n,t),Gpn=(e,n=!1)=>xt("/api/settings/ui-state",{workspace:e},n),Vpn=e=>xt("/api/settings/ui-state",e),Kpn=(e,n)=>xt("/api/onboarding/complete",{...e,...n}),Wpn=(e="",n)=>{const t=e?`?path=${encodeURIComponent(e)}`:"";return Ot(`/api/project-path/status${t}`,n)},Qpn=()=>xt("/api/project-path/pick").then(e=>e.path),Xpn=e=>xt("/api/projects",e),Ypn=(e,n)=>Ot(`/api/papers/search?q=${encodeURIComponent(e)}`,n).then(t=>t.papers),Zpn=e=>Ot("/api/github/account",e),Jpn=(e,n)=>Ot(`/api/github/project-repo-preview?name=${encodeURIComponent(e)}`,n),e0n=(e,n,t)=>Ot(`/api/github/repo-access?owner=${encodeURIComponent(e)}&repo=${encodeURIComponent(n)}`,t),t0n=(e,n)=>Ot(`/api/papers/resolve?id=${encodeURIComponent(e)}`,n).then(t=>t.paper),n0n=e=>xt("/api/projects/starter-prompts/prewarm",e),r0n=(e,n,t,r,s)=>Ot(`/api/projects/${e}/starter-prompts?${new URLSearchParams({harness:n,...t?{model:t}:{},locale:r})}`,s),s0n=e=>xt(`/api/projects/${e}/open`).then(n=>n.project),i0n=e=>ca(`/api/projects/${e}`,{method:"DELETE"}).then(async n=>{if(!n.ok){const t=await n.json().catch(()=>null);throw new Error((t==null?void 0:t.error)??`delete failed (${n.status})`)}IW(e)}),a0n=(e,n)=>Ot(`/api/projects/${e}/experiments`,n).then(t=>t.experiments),o0n=(e,n)=>Ot(`/api/projects/${e}/runs`,n).then(t=>t.runs),xL=e=>xt(`/api/runs/${e}/cancel`).then(()=>{}),l0n=(e,n)=>Ot(`/api/runs/${e}/log?offset=${n}`),c0n=(e,n)=>Ot(`/api/runs/${e}/diff`,n),u0n=(e,n)=>Ot(`/api/experiments/${e}/diff`,n),ju=(e,n=new URLSearchParams)=>(e.sessionId&&n.set("sessionId",e.sessionId),e.ref&&n.set("ref",e.ref),n),_0n=(e,n,t={},r)=>Ot(`/api/projects/${e}/file?${ju(t,new URLSearchParams({path:n}))}`,r),c3=(e,n,t={})=>`/api/projects/${e}/file/raw?${ju(t,new URLSearchParams({path:n}))}`,f0n=(e,n)=>Ot(`/api/files/abs?path=${encodeURIComponent(e)}`,n),wL=e=>`/api/files/abs/raw?path=${encodeURIComponent(e)}`,d0n=(e,n,t,r)=>yL(`/api/projects/${e}/file`,{path:n,content:t,sessionId:r.sessionId,expectedVersion:r.expectedVersion}),h0n=(e,n,t,r={})=>bh(`/api/projects/${e}/file`,{path:n,...t,sessionId:r.sessionId}),p0n=(e,n,t={})=>xt(`/api/projects/${e}/file/open`,{path:n,sessionId:t.sessionId}),m0n=e=>Ot("/api/latex/engine",e),g0n=(e,n,t={})=>xt(`/api/projects/${e}/file/latex`,{path:n,sessionId:t.sessionId}),v0n=e=>Ot("/api/overleaf/settings",e),kL=e=>xt("/api/overleaf/token",{token:e}),b0n=()=>ca("/api/overleaf/token",{method:"DELETE"}).then(e=>fi(e)),SL=(e,n={})=>xt("/api/overleaf/session",{session:e,host:n.host}),y0n=()=>fetch("/api/overleaf/session",{method:"DELETE"}).then(e=>fi(e)),x0n=(e={})=>xt("/api/overleaf/session/import",{host:e.host}),w0n=(e,n,t={})=>xt(`/api/projects/${e}/file/overleaf/live`,{path:n,sessionId:t.sessionId,retry:t.retry}),k0n=(e,n,t={})=>fetch(`/api/projects/${e}/file/overleaf/live?${ju(t,new URLSearchParams({path:n}))}`,{method:"DELETE"}).then(r=>fi(r)),S0n=(e,n,t={},r)=>Ot(`/api/projects/${e}/file/overleaf?${ju(t,new URLSearchParams({path:n}))}`,r),C0n=(e,n,t)=>xt(`/api/projects/${e}/file/overleaf`,{path:n,project:t.project,sessionId:t.sessionId}),E0n=(e,n,t={})=>ca(`/api/projects/${e}/file/overleaf?${ju(t,new URLSearchParams({path:n}))}`,{method:"DELETE"}).then(r=>fi(r)),N0n=(e,n,t={})=>xt(`/api/projects/${e}/file/overleaf/sync`,{path:n,sessionId:t.sessionId,resolve:t.resolve}),z0n=(e,n,t={},r)=>Ot(`/api/projects/${e}/file/overleaf/status?${ju(t,new URLSearchParams({path:n}))}`,r),j0n=(e,n,t={})=>`/api/projects/${e}/file/overleaf/upload?${ju(t,new URLSearchParams({path:n}))}`,T0n=(e,n={},t)=>{const r=ju(n).toString();return Ot(`/api/projects/${e}/code-tree${r?`?${r}`:""}`,t)},A0n=(e,n)=>Ot(`/api/chat/sessions/${e}/worktree`,n),xb=(e,n,t)=>`https://github.com/${e}/${n}/tree/${t.split("/").map(encodeURIComponent).join("/")}`,R0n=e=>Ot("/api/settings/hf",e),M0n=e=>xt("/api/settings/hf",{token:e}),O0n=e=>Ot("/api/settings/tinker",e),D0n=e=>xt("/api/settings/tinker",{key:e}),L0n=e=>Ot("/api/update",e),I0n=()=>xt("/api/update/apply"),$0n=()=>xt("/api/update/restart"),B0n=e=>xt("/api/update/auto",{enabled:e}),P0n=(e=!1)=>xt("/api/update/install-cli",{force:e}),F0n=e=>Ot("/api/settings/k8s",e),H0n=e=>xt("/api/settings/k8s",e),q0n=e=>Ot("/api/settings/modal",e),U0n=(e,n)=>xt("/api/settings/modal",{tokenId:e,tokenSecret:n}),G0n=e=>Ot("/api/settings/env",e).then(n=>n.vars),CL=(e,n)=>xt("/api/settings/env",{key:e,value:n}).then(t=>t.vars),V0n=e=>ca(`/api/settings/env/${encodeURIComponent(e)}`,{method:"DELETE"}).then(n=>fi(n)).then(n=>n.vars),K0n=e=>Ot("/api/settings/data-dir",e),W0n=e=>xt("/api/settings/data-dir/validate",{path:e}),Q0n=e=>xt("/api/settings/data-dir/move",{path:e}),X0n=e=>Ot("/api/settings/ssh",e),Y0n=e=>xt("/api/settings/ssh",e),Z0n=e=>xt("/api/settings/ssh/default",{host:e}),J0n=(e,n)=>xt("/api/settings/ssh/preflight",{host:e,container:n}),emn=e=>Ot("/api/settings/ssh/config",e),tmn=(e,n)=>yL("/api/settings/ssh/config",{content:e,previousContent:n}),nmn=(e,n)=>Ot(`/api/settings/ssh/master?host=${encodeURIComponent(e)}`,n),rmn=e=>Ot("/_orx/runtime",e),smn=e=>Ot("/api/remote/sessions",e).then(n=>n.sessions),imn=(e,n)=>xt("/api/remote/sessions",{host:e,uiPreferences:n}),amn=e=>xt("/_orx/install",e),omn=()=>xt("/_orx/reconnect"),EL=()=>xt("/_orx/disconnect"),lmn=()=>xt("/_orx/start-host"),NL=()=>Ot("/_orx/stop-host"),zL=e=>xt("/_orx/stop-host",{expectedInstanceId:e.instanceId,expectedPreview:{activeTurnCount:e.activeTurnCount,queuedMessageCount:e.queuedMessageCount,pendingPermissionCount:e.pendingPermissionCount,activeRunCount:e.activeRunCount,attachmentCount:e.attachmentCount}}),cmn=e=>Ot("/api/settings/slurm",e),umn=e=>xt("/api/settings/slurm",e),_mn=e=>Ot("/api/settings/ray",e),fmn=e=>xt("/api/settings/ray",e),dmn=e=>xt("/api/settings/ray/preflight",{address:e??null}),hmn=(e,n)=>Ot(`/api/settings/compute${e?`?projectId=${encodeURIComponent(e)}`:""}`,n),pmn=e=>xt("/api/settings/compute/default",e),mmn=e=>Ot("/api/settings/local",e),gmn=e=>Ot("/api/settings/openresearch",e),vmn=(e,n)=>Ot(`/api/projects/${e}/files`,n),bmn=(e,n)=>ca(`/api/projects/${e}/files?path=${encodeURIComponent(n)}`,{method:"DELETE"}).then(t=>fi(t)),ymn=(e,n,t)=>bh(`/api/projects/${e}/files`,{path:n,...t}),F_=(e,n)=>`/api/projects/${e}/files/file?path=${encodeURIComponent(n)}`,jL=512e3,xmn=(e,n)=>{const t=new Uint8Array(e);if(t.includes(0))return{content:"",binary:!0,truncated:n};try{return{content:new TextDecoder("utf-8",{fatal:!0}).decode(t,{stream:n}),binary:!1,truncated:n}}catch{return{content:"",binary:!0,truncated:n}}},wmn=(e,n,t)=>fetch(F_(e,n),{signal:t,headers:{Range:`bytes=0-${jL-1}`}}).then(r=>{var i;if(r.status===404)return null;if(r.status===416&&r.headers.get("content-range")==="bytes */0")return{content:"",binary:!1,truncated:!1};if(!r.ok)throw new Error(`HTTP ${r.status}`);const s=Number((i=r.headers.get("content-range"))==null?void 0:i.split("/").pop());return r.arrayBuffer().then(a=>xmn(a,Number.isFinite(s)&&s>a.byteLength))}),kmn=e=>e==="image"||e==="audio"||e==="video"||e==="pdf"||e==="text"||e==="unknown"||e==="download",Smn=(e,n,t)=>fetch(F_(e,n),{signal:t,method:"HEAD"}).then(r=>{if(r.status===404)return null;if(!r.ok)throw new Error(`HTTP ${r.status}`);const s=r.headers.get("x-openresearch-presentation");return{size:Number(r.headers.get("content-length"))||0,presentation:kmn(s)?s:"download"}}),Cmn=e=>Ot("/api/settings/profile",e),Emn=e=>Ot("/api/settings/lit-sources",e),Nmn=e=>xt("/api/settings/lit-sources",e),zmn=e=>Ot("/api/settings/projects",e),TL=(e,n)=>xt("/api/settings/projects",{githubForNewProjects:e,...n===void 0?{}:{githubDefaultPromptSeen:n}}),jmn=(e,n)=>Ot(`/api/projects/${e}/git`,n),Tmn=e=>xt(`/api/projects/${e}/git/init`),Amn=e=>xt(`/api/projects/${e}/github`),Rmn=e=>xt(`/api/projects/${e}/github/disable`),Mmn=e=>Ot("/api/settings/telemetry",e),Omn=e=>xt("/api/settings/telemetry",{enabled:e}),eu=e=>{xt("/api/telemetry/event",e).catch(()=>{})};function I1(e){var s;if(!e.id.startsWith("orx-local-"))return e.displayName??_3(e.id);const n=(s=e.displayName)==null?void 0:s.split(" · ").slice(1).join(" · ").replace(/ \(local\)$/,""),t=n==="OpenAI-compatible server"||n==="Custom endpoint"||n==="Custom Endpoint"?Mk():n,r=_3(e.id.replace(/-(?:FP|BF)\d+$/i,""));return t?`${r} · ${t}`:r}const xv="default";function wb(e,n){var a,o,l;const t=e==null?void 0:e.models.find(u=>u.id===n),r=(t==null?void 0:t.reasoningLevels)??((a=e==null?void 0:e.options)==null?void 0:a.reasoningLevels)??[],s=t==null?void 0:t.defaultReasoningLevel,i=s&&r.some(u=>u.id===s)?s:r.some(u=>u.id===xv)?xv:((o=e==null?void 0:e.options)==null?void 0:o.defaultReasoningLevel)??((l=r[0])==null?void 0:l.id)??null;return{choices:r,defaultId:i}}const u3="default";function AL(e,n){var r;if((e==null?void 0:e.id)!=="codex")return[];const t=(r=e.models.find(s=>s.id===n))==null?void 0:r.serviceTiers;return t!=null&&t.length?[{id:u3,label:N6t(),description:y6t()},...t]:[]}function wv(e,n,t){var i;if(!e)return t??null;if(e.id!=="codex"||((i=e.models.find(a=>a.id===n))==null?void 0:i.serviceTiers)===void 0)return null;const s=AL(e,n);return s.length===0?u3:t!=null&&s.some(a=>a.id===t)?t:u3}function RL(e,n,t){if(!e)return t;const{choices:r,defaultId:s}=wb(e,n);return r.length===0?xv:t&&r.some(i=>i.id===t)?t:s}const Dmn=e=>Ot("/api/harnesses/setup/commands",e),ML=(e=!1,n=!1,t)=>{const r=new URLSearchParams;e&&r.set("refresh","1"),n&&r.set("retry","1");const s=r.size>0?`?${r.toString()}`:"";return Ot(`/api/harnesses${s}`,t).then(i=>i.harnesses)},Lmn=(e,n)=>Ot(`/api/skills${n?`?harness=${encodeURIComponent(n)}`:""}`,e),Imn=(e,n,t,r)=>Ot(`/api/skills/${encodeURIComponent(e)}${`?${new URLSearchParams({...n?{project:n}:{},...r?{harness:r}:{}})}`}`,t).then(s=>s.content),$mn=e=>Ot("/api/latex-templates",e).then(n=>n.templates),Bmn=e=>xt("/api/latex-templates",e).then(n=>n.template),Pmn=e=>ca(`/api/latex-templates?name=${encodeURIComponent(e)}`,{method:"DELETE"}).then(n=>fi(n)),Fmn=e=>Ot("/api/user-skills",e),Hmn=e=>xt("/api/user-skills",e).then(n=>n.skill),qmn=e=>ca(`/api/user-skills?name=${encodeURIComponent(e)}`,{method:"DELETE"}).then(n=>fi(n));function _3(e){const n=(e.split("/").pop()??e).replace(/^~/,"").replace(/^claude-/,""),t=[],r=[];for(const s of n.split("-"))/^\d+(\.\d+)?$/.test(s)?r.push(s):(r.length&&t.push(r.splice(0).join(".")),t.push(s==="gpt"?"GPT":s.charAt(0).toUpperCase()+s.slice(1)));return r.length&&t.push(r.join(".")),t.join(" ")}const Umn=(e,n)=>Ot(`/api/chat/sessions?projectId=${encodeURIComponent(e)}`,n).then(t=>t.sessions),Gmn=(e,n,t={})=>xt("/api/chat/sessions",{projectId:e,harness:n,...t}).then(r=>r.session),Vmn=e=>ca(`/api/chat/sessions/${e}`,{method:"DELETE"}).then(n=>fi(n).then(t=>(gb(e),t))),Kmn=(e,n)=>bh(`/api/chat/sessions/${e}`,{archived:n}).then(t=>t.session),Wmn=(e,n)=>bh(`/api/chat/sessions/${e}`,{title:n}).then(t=>t.session),Qmn=(e,n)=>bh(`/api/chat/sessions/${e}`,{planMode:n}).then(t=>t.session),Xmn=(e,n)=>bh(`/api/chat/sessions/${e}`,{permissionMode:n}).then(t=>t.session),Ymn=(e,n)=>Ot(`/api/chat/sessions/${e}/messages`,n).then(t=>({messages:t.messages,queued:t.queued??[],activeLeafId:t.activeLeafId??null})),Zmn=(e,n)=>ca(`/api/chat/sessions/${e}/queue/${encodeURIComponent(n)}`,{method:"DELETE"}).then(t=>fi(t)),Jmn=(e,n)=>xt(`/api/chat/sessions/${e}/queue/${encodeURIComponent(n)}`),egn=e=>`/api/chat/attachments/${encodeURIComponent(e)}`,vz=(e,n,t={},r,s,i,a)=>xt(`/api/chat/sessions/${e}/message`,{text:n,clientTurnId:i,model:t.model,serviceTier:t.serviceTier,permissionMode:t.permissionMode,planMode:t.planMode,reasoningLevel:t.reasoningLevel,images:r,annotations:s,mode:a}),tgn=(e,n)=>xt(`/api/chat/sessions/${e}/shell`,{command:n}),ngn=(e,n,t,r={})=>xt(`/api/chat/sessions/${e}/turns/${n}/recover`,{action:t,...r}),rgn=(e,n,t)=>xt(`/api/chat/sessions/${e}/fork`,{messageId:n,text:t}),sgn=(e,n)=>xt(`/api/chat/sessions/${e}/branch`,{leafId:n}),ign=e=>xt(`/api/chat/sessions/${e}/interrupt`),agn=(e,n)=>xt(`/api/chat/sessions/${e}/respond`,n);function Vo(e){const n=Math.max(0,Math.floor((Date.now()-e)/1e3)),t=new Intl.RelativeTimeFormat(z(),{numeric:"always",style:"narrow"});if(n<60)return t.format(-n,"second");const r=Math.floor(n/60);if(r<60)return t.format(-r,"minute");const s=Math.floor(r/60);return s<24?t.format(-s,"hour"):t.format(-Math.floor(s/24),"day")}function g0(e){const n=Math.max(0,Math.floor(e/1e3));if(n<60)return pAe({value:Jt(n)});const t=Math.floor(n/60);if(t<60)return lAe({value:Jt(t)});const r=Math.floor(t/60);return r<24?tAe({hours:Jt(r),minutes:Jt(t%60)}):WTe({days:Jt(Math.floor(r/24)),hours:Jt(r%24)})}function Wl(e){const n=["B","KB","MB","GB","TB"];let t=e,r=0;for(;t>=1024&&rOt("/api/local-models",e),cgn=e=>xt("/api/local-models/discover",e),ugn=e=>xt("/api/local-models",e),_gn=e=>xt(`/api/local-models/${encodeURIComponent(e)}/check`,{}),fgn=e=>ca(`/api/local-models/${encodeURIComponent(e)}`,{method:"DELETE"}).then(n=>fi(n)),bz=()=>({queryKey:Nt("getHfSettings"),queryFn:({signal:e})=>R0n(e),staleTime:3e5}),yz=()=>({queryKey:Nt("getTinkerSettings"),queryFn:({signal:e})=>O0n(e),staleTime:3e5}),xz=()=>({queryKey:Nt("getK8sSettings"),queryFn:({signal:e})=>F0n(e),staleTime:3e4}),wz=()=>({queryKey:Nt("getModalSettings"),queryFn:({signal:e})=>q0n(e),staleTime:3e5}),dgn=()=>({queryKey:Nt("getSlurmSettings"),queryFn:({signal:e})=>cmn(e),staleTime:3e5}),hgn=()=>({queryKey:Nt("getRaySettings"),queryFn:({signal:e})=>_mn(e),staleTime:3e5}),OL=e=>({queryKey:Nt("getComputeSettings",e??null),queryFn:({signal:n})=>hmn(e,n),staleTime:3e4}),pgn=()=>({queryKey:Nt("getLocalMachine"),queryFn:({signal:e})=>mmn(e),staleTime:3e5}),mgn=()=>({queryKey:Nt("getOpenResearchSettings"),queryFn:({signal:e})=>gmn(e),staleTime:3e4}),ggn=()=>({queryKey:Nt("getEnvVars"),queryFn:({signal:e})=>G0n(e),staleTime:3e5}),vgn=()=>({queryKey:Nt("getDataDir"),queryFn:({signal:e})=>K0n(e),staleTime:3e5}),DL=()=>({queryKey:Nt("getSshSettings"),queryFn:({signal:e})=>X0n(e),staleTime:3e4}),bgn=()=>({queryKey:Nt("getSshConfig"),queryFn:({signal:e})=>emn(e),staleTime:3e5}),kz=e=>({queryKey:Nt("getSshMasterStatus",e),queryFn:({signal:n})=>nmn(e,n),staleTime:5e3}),ygn=()=>({queryKey:["gateway","runtime"],queryFn:({signal:e})=>rmn(e),staleTime:2e3}),xgn=()=>({queryKey:Nt("listRemoteSessions"),queryFn:({signal:e})=>smn(e),staleTime:3e4}),kv=()=>({queryKey:Nt("getUpdateStatus"),queryFn:({signal:e,client:n,queryKey:t})=>gh(n,t,()=>L0n(e)),staleTime:3e4}),wgn=()=>({queryKey:Nt("getProfile"),queryFn:({signal:e})=>Cmn(e),staleTime:3e5}),kgn=()=>({queryKey:Nt("getLitSources"),queryFn:({signal:e})=>Emn(e),staleTime:3e5}),Gk=()=>({queryKey:Nt("getProjectDefaults"),queryFn:({signal:e})=>zmn(e),staleTime:3e5}),Sgn=e=>({queryKey:Nt("getProjectGitStatus",e),queryFn:({signal:n})=>jmn(e,n),staleTime:3e4}),Cgn=()=>({queryKey:Nt("getTelemetry"),queryFn:({signal:e})=>Mmn(e),staleTime:3e5}),LL=()=>({queryKey:Nt("getHarnessSetupCommands"),queryFn:({signal:e})=>Dmn(e),staleTime:1/0}),yu=()=>({queryKey:Nt("getHarnesses"),queryFn:({signal:e})=>ML(!1,!1,e),staleTime:3e5,refetchInterval:e=>{var n;return(n=e.state.data)!=null&&n.some(t=>t.accountLoading)?1e3:!1}}),Egn=e=>({queryKey:Nt("getSkills",e??null),queryFn:({signal:n})=>Lmn(n,e),select:n=>n.skills,refetchInterval:n=>{var t;return(t=n.state.data)!=null&&t.importing?2e3:3e4},staleTime:3e5}),Ngn=(e,n,t)=>({queryKey:Nt("getSkillContent",e,n??null,t??null),queryFn:({signal:r})=>Imn(e,n,r,t),staleTime:3e5}),zgn=()=>({queryKey:Nt("listLatexTemplates"),queryFn:({signal:e})=>$mn(e),refetchInterval:3e4,staleTime:3e5}),jgn=()=>({queryKey:Nt("listUserSkills"),queryFn:({signal:e})=>Fmn(e),select:e=>e.skills,refetchInterval:e=>{var n;return(n=e.state.data)!=null&&n.importing?2e3:3e4},staleTime:3e5});async function Xd(e=!1,n=!1){const t=yu();if(!e&&!n)return rt.fetchQuery(t);await rt.cancelQueries(t);const r=await ML(e,n);return $n(t.queryKey)&&rt.setQueryData(t.queryKey,r),r}const Tgn=()=>({queryKey:Nt("getLocalModels"),queryFn:({signal:e})=>lgn(e),staleTime:3e4}),Aa=e=>({queryKey:Nt("listChatSessions",e),queryFn:({signal:n,client:t,queryKey:r})=>gh(t,r,async()=>{const s=await Umn(e,n),i=t.getQueryData(r);return s.filter(a=>!vu.has(a.id)).map(a=>{var o;return{...a,contextUsage:a.contextUsage??((o=i==null?void 0:i.find(l=>l.id===a.id))==null?void 0:o.contextUsage)}})},lm),staleTime:3e4}),Jl=e=>({queryKey:Nt("getChatMessages",e),queryFn:async({signal:n,client:t,queryKey:r})=>{var h;const s=t.getQueryData(r),i=await gh(t,r,()=>Ymn(e,n),(_,p,m)=>{if(!p)return _;const x=new Set([...m].filter(k=>k.startsWith("message:")).map(k=>k.slice(8)));return{messages:lm(_.messages,p.messages,x,!1),queued:m.has("queued")?p.queued:_.queued,activeLeafId:m.has("branch")||x.size?p.activeLeafId:_.activeLeafId}});n.throwIfAborted();const a=t.getQueryData(r),l=s!==void 0&&i.messages.some(_=>_.role==="user"&&!(s!=null&&s.messages.some(p=>p.id===_.id)))?[]:(a==null?void 0:a.messages.filter(_=>_.id.startsWith("local-")))??[],u=l.some(_=>_.id===(a==null?void 0:a.activeLeafId));return{...i,messages:[...i.messages,...l.filter(_=>!i.messages.some(p=>p.id===_.id))],activeLeafId:a&&(u||!((h=a.activeLeafId)!=null&&h.startsWith("local-"))&&a.activeLeafId!==(s==null?void 0:s.activeLeafId))?a.activeLeafId:i.activeLeafId}},staleTime:1/0,refetchOnMount:"always",refetchOnWindowFocus:"always"}),M_="local-",IL="bash";function Sz(e,n){const t=e.findIndex(r=>r.id===n.id);if(t>=0){const r=e.slice();return r[t]=n,r}return n.role!=="user"?[...e,n]:[...e.filter(r=>!r.id.startsWith(M_)),n]}function Agn(e,n){switch(n.type){case"upsertMessage":{const t=e.messagesBySession[n.sessionId]??[],r=t.some(o=>o.id===n.message.id),s=e.activeLeafBySession[n.sessionId]??null,i=n.message.role==="user"&&s!==null&&s.startsWith(M_),a=n.message.parentId!=null&&n.message.parentId===s;return{...e,messagesBySession:{...e.messagesBySession,[n.sessionId]:Sz(t,n.message)},activeLeafBySession:r&&!i&&!a?e.activeLeafBySession:{...e.activeLeafBySession,[n.sessionId]:n.message.id}}}case"localError":{const t=e.messagesBySession[n.sessionId]??[],r={id:`${M_}senderr-${Date.now()}`,role:"assistant",parts:[{id:"p0",type:"tool",tool:"error",state:{status:"error",error:n.text}}],createdAt:Date.now(),parentId:e.activeLeafBySession[n.sessionId]??null};return{...e,messagesBySession:{...e.messagesBySession,[n.sessionId]:[...t,r]},activeLeafBySession:{...e.activeLeafBySession,[n.sessionId]:r.id}}}case"localShell":{const t=e.messagesBySession[n.sessionId]??[],r=t.find(i=>i.id===n.id),s={id:n.id,role:"user",parts:[{id:"p0",type:"tool",tool:IL,state:{status:n.error===void 0?"running":"error",input:{command:n.command},error:n.error}}],createdAt:(r==null?void 0:r.createdAt)??Date.now(),parentId:r?r.parentId:e.activeLeafBySession[n.sessionId]??null};return{...e,messagesBySession:{...e.messagesBySession,[n.sessionId]:r?Sz(t,s):[...t,s]},activeLeafBySession:r?e.activeLeafBySession:{...e.activeLeafBySession,[n.sessionId]:s.id}}}case"activeLeaf":return{...e,activeLeafBySession:{...e.activeLeafBySession,[n.sessionId]:n.leafId}};case"optimisticUser":{const t=e.messagesBySession[n.sessionId]??[],r=n.text?[{id:"p0",type:"text",text:n.text}]:[];n.attachments.forEach((i,a)=>r.push({id:`img${a}`,type:"image",text:i.url,name:i.name})),n.annotations.forEach((i,a)=>r.push({id:`annotation${a}`,type:"annotation",text:i.text}));const s={id:`${M_}${Date.now()}`,role:"user",parts:r,createdAt:Date.now(),parentId:e.activeLeafBySession[n.sessionId]??null};return{...e,messagesBySession:{...e.messagesBySession,[n.sessionId]:[...t,s]},activeLeafBySession:{...e.activeLeafBySession,[n.sessionId]:s.id}}}case"setQueued":return{...e,queuedBySession:{...e.queuedBySession,[n.sessionId]:n.items}}}}let $L=0;function BL(e){return(e.query.queryKey[2]==="listChatSessions"||e.query.queryKey[2]==="getChatMessages")&&(e.type==="removed"||e.type==="updated"&&e.action.type==="success")}rt.getQueryCache().subscribe(e=>{BL(e)&&$L++});const Rgn=e=>rt.getQueryCache().subscribe(n=>{BL(n)&&e()}),Mgn=()=>$L;function Ogn(e,n){const t=rt.getQueryData(Aa(e).queryKey)??[],r=new Set(t.filter(a=>a.busy).map(a=>a.id)),s={messagesBySession:{},queuedBySession:{},activeLeafBySession:{},busySessions:r},i=new Set(r);n&&i.add(n);for(const a of i){const o=rt.getQueryData(Jl(a).queryKey);o&&(s.messagesBySession[a]=o.messages,s.queuedBySession[a]=o.queued,s.activeLeafBySession[a]=o.activeLeafId)}return s}function PL(e,n,t=!1){if(n.type==="busy"){Ja(rt,Aa(e).queryKey,n.sessionId),rt.setQueryData(Aa(e).queryKey,l=>l==null?void 0:l.map(u=>u.id===n.sessionId?{...u,busy:n.busy}:u));return}const r=Jl(n.sessionId);if(vu.has(n.sessionId))return;Ja(rt,r.queryKey,n.type==="upsertMessage"?`message:${n.message.id}`:n.type==="setQueued"?"queued":n.type==="activeLeaf"?"branch":"local");const s=rt.getQueryData(r.queryKey);if(t&&!s)return;const i={messagesBySession:s?{[n.sessionId]:s.messages}:{},queuedBySession:s?{[n.sessionId]:s.queued}:{},activeLeafBySession:s?{[n.sessionId]:s.activeLeafId}:{},busySessions:new Set},a=Agn(i,n),o={messages:a.messagesBySession[n.sessionId]??[],queued:a.queuedBySession[n.sessionId]??[],activeLeafId:a.activeLeafBySession[n.sessionId]??null};rt.setQueryData(r.queryKey,o)}function Dgn(e,n){const t=!!n&&!vu.has(n??""),r=ft({...Jl(n??""),enabled:t,subscribed:t}),s=T.useSyncExternalStore(Rgn,Mgn),i=T.useMemo(()=>Ogn(e,n),[e,n,s]),a=Ra()[1],o=T.useCallback(l=>{$n(["workspace",a])&&PL(e,l)},[e,a]);return[i,o,r]}const $1=new Map;function Lgn(e,n){let t=$1.get(e);return t||(t=new Set,$1.set(e,t)),t.add(n),()=>{t.delete(n),t.size===0&&$1.delete(e)}}function Ign(e){var n;(n=$1.get(e.runId))==null||n.forEach(t=>t(e))}const f3=new Set;function Sv(e){return f3.add(e),()=>{f3.delete(e)}}function Al(e){f3.forEach(n=>n(e))}const d3=new Set;function $gn(e){return d3.add(e),()=>{d3.delete(e)}}function Rl(){d3.forEach(e=>e())}const h3=new Set;function Bgn(e){return h3.add(e),()=>{h3.delete(e)}}function Cz(e){h3.forEach(n=>n(e))}const p3=new Set;function FL(e){return p3.add(e),()=>{p3.delete(e)}}function X2(e){p3.forEach(n=>n(e))}const m3=new Set;function Pgn(e){return m3.add(e),()=>{m3.delete(e)}}function Ez(e){m3.forEach(n=>n(e))}const g3=new Set;function Fgn(e){return g3.add(e),()=>{g3.delete(e)}}function Hgn(e){g3.forEach(n=>n(e))}let v3=!0;const b3=new Set;function qgn(e){return b3.add(e),()=>{b3.delete(e)}}function Nz(){return v3}function zz(e){e!==v3&&(v3=e,b3.forEach(n=>n()))}const Ugn=8e3,Ggn=3e3;function Vgn(e){const n=T.useRef(e);n.current=e,T.useEffect(()=>{let t=null,r=!1,s,i,a=!1;const o=()=>{t==null||t.close();const l=new EventSource("/api/events");t=l,l.onerror=()=>{r||(a=!0,s??(s=window.setTimeout(()=>zz(!1),Ugn)),l.readyState===EventSource.CLOSED&&i===void 0&&(i=window.setTimeout(()=>{i=void 0,o()},Ggn)))},l.onopen=()=>{var h,_;r||(window.clearTimeout(s),s=void 0,zz(!0),a&&(Al({type:"reconnected"}),Rl(),Cz({harness:"*",authState:"unknown"}),(_=(h=n.current).onReconnect)==null||_.call(h)),a=!0)};const u=h=>{try{return JSON.parse(h.data)}catch{return null}};l.addEventListener("resync.required",()=>{var h,_;Al({type:"reconnected"}),Rl(),(_=(h=n.current).onReconnect)==null||_.call(h)}),l.addEventListener("run.updated",h=>{const _=u(h);_!=null&&_.run&&(Rl(),n.current.onRun(_.run))}),l.addEventListener("experiment.updated",h=>{var p,m;const _=u(h);_!=null&&_.experiment&&(Rl(),(m=(p=n.current).onExperiment)==null||m.call(p,_.experiment))}),l.addEventListener("project.updated",h=>{var p,m;const _=u(h);_!=null&&_.project&&(Rl(),(m=(p=n.current).onProject)==null||m.call(p,_.project))}),l.addEventListener("files.updated",h=>{var p,m;const _=u(h);_!=null&&_.projectId&&((m=(p=n.current).onArtifacts)==null||m.call(p,_.projectId))}),l.addEventListener("run.log",h=>{const _=u(h);_!=null&&_.runId&&Ign(_)}),l.addEventListener("chat.session",h=>{const _=u(h);_!=null&&_.session&&(Rl(),Al({type:"session",session:_.session}))}),l.addEventListener("chat.session.deleted",h=>{const _=u(h);_!=null&&_.sessionId&&(Rl(),Al({type:"sessionDeleted",sessionId:_.sessionId}))}),l.addEventListener("chat.message",h=>{const _=u(h);_!=null&&_.message&&(Rl(),Al({type:"message",sessionId:_.sessionId,message:_.message}))}),l.addEventListener("chat.busy",h=>{const _=u(h);_!=null&&_.sessionId&&(Rl(),Al({type:"busy",sessionId:_.sessionId,busy:_.busy}))}),l.addEventListener("chat.usage",h=>{const _=u(h);_!=null&&_.sessionId&&_.usage&&Al({type:"usage",sessionId:_.sessionId,usage:_.usage})}),l.addEventListener("chat.queued",h=>{const _=u(h);_!=null&&_.sessionId&&Al({type:"queued",sessionId:_.sessionId,items:_.items??[]})}),l.addEventListener("chat.branch",h=>{const _=u(h);_!=null&&_.sessionId&&Al({type:"branch",sessionId:_.sessionId,activeLeafId:_.activeLeafId??null})}),l.addEventListener("harness.auth",h=>{const _=u(h);_!=null&&_.harness&&_.authState&&Cz(_)}),l.addEventListener("datadir.move.progress",h=>{const _=u(h);_&&X2({type:"progress",..._})}),l.addEventListener("datadir.move.done",h=>{const _=u(h);_&&X2({type:"done",path:_.path,oldPathLeft:_.oldPathLeft})}),l.addEventListener("datadir.move.error",h=>{const _=u(h);_&&X2({type:"error",error:_.error})}),l.addEventListener("update.status",h=>{const _=u(h);_&&Hgn(_)}),l.addEventListener("overleaf.live",h=>{const _=u(h);_!=null&&_.key&&_.status&&Ez({type:"live",key:_.key,status:_.status})}),l.addEventListener("overleaf.pulled",h=>{const _=u(h);_!=null&&_.key&&Array.isArray(_.paths)&&Ez({type:"pulled",key:_.key,paths:_.paths})})};return o(),()=>{r=!0,window.clearTimeout(s),window.clearTimeout(i),t==null||t.close()}},[])}const Cv=new Set;function Kgn(e){const n=T.useRef(e);n.current=e,T.useEffect(()=>{const t={onRun:r=>n.current.onRun(r),onReconnect:()=>{var r,s;return(s=(r=n.current).onReconnect)==null?void 0:s.call(r)}};return Cv.add(t),()=>{Cv.delete(t)}},[])}const jz={onRun:e=>Cv.forEach(n=>n.onRun(e)),onReconnect:()=>Cv.forEach(e=>{var n;return(n=e.onReconnect)==null?void 0:n.call(e)})},v0=()=>({queryKey:Nt("listProjects"),queryFn:({signal:e,client:n,queryKey:t})=>gh(n,t,()=>Ppn(e),lm),staleTime:3e4}),Wgn=()=>({queryKey:Nt("listProjectActivity"),queryFn:({signal:e})=>Fpn(e),staleTime:3e4}),fm=()=>({queryKey:Nt("getUiState"),queryFn:({signal:e})=>Hpn(e),staleTime:3e5}),Vk=e=>({queryKey:Nt("getProjectUiState",e),queryFn:({signal:n})=>qpn(e,n),staleTime:3e5}),Zp=(e="")=>({queryKey:Nt("getProjectPathStatus",e),queryFn:({signal:n})=>Wpn(e,n),staleTime:3e4}),HL=e=>({queryKey:Nt("searchPapers",e),queryFn:({signal:n})=>Ypn(e,n),staleTime:3e5}),Qgn=()=>({queryKey:Nt("githubAccount"),queryFn:({signal:e})=>Zpn(e),staleTime:3e5}),Xgn=e=>({queryKey:Nt("githubProjectRepoPreview",e),queryFn:({signal:n})=>Jpn(e,n),staleTime:3e4}),Tz=(e,n)=>({queryKey:Nt("repoAccess",e,n),queryFn:({signal:t})=>e0n(e,n,t),staleTime:3e4}),y3=e=>({queryKey:Nt("resolvePaper",e),queryFn:({signal:n})=>t0n(e,n),staleTime:36e5}),Ygn=(e,n,t,r)=>({queryKey:Nt("getProjectStarterPrompts",e,n,t,r),queryFn:({signal:s})=>r0n(e,n,t,r,s),staleTime:3e5,refetchOnWindowFocus:!1,retryOnMount:!1}),x3=e=>({queryKey:Nt("listExperiments",e),queryFn:({signal:n,client:t,queryKey:r})=>gh(t,r,()=>a0n(e,n),lm),staleTime:3e4}),fu=e=>({queryKey:Nt("listRuns",e),queryFn:({signal:n,client:t,queryKey:r})=>gh(t,r,()=>o0n(e,n),lm),staleTime:3e4});function Gg(e,n){if(!e)return;const t=e.find(r=>r.id===n.id);return t&&t.updatedAt>n.updatedAt?e:t?e.map(r=>r.id===n.id?n:r):[...e,n]}function Az(){const e=Ra();return Vgn({onRun(n){var r;if(!$n(e))return;const t=(r=rt.getQueryData(fu(n.projectId).queryKey))==null?void 0:r.find(s=>s.id===n.id);Ja(rt,fu(n.projectId).queryKey,n.id),rt.setQueryData(fu(n.projectId).queryKey,s=>Gg(s,n)),(t==null?void 0:t.commitSha)!==n.commitSha&&(Ca(["getRunDiff"],e,s=>s.queryKey[3]===n.id),Ca(["getExperimentDiff"],e,s=>s.queryKey[3]===n.experimentId)),jz.onRun(n)},onExperiment(n){$n(e)&&(Ja(rt,x3(n.projectId).queryKey,n.id),rt.setQueryData(x3(n.projectId).queryKey,t=>Gg(t,n)),Ca(["getProjectStarterPrompts"],e,t=>t.queryKey[3]===n.projectId),Ca(["getExperimentDiff"],e,t=>t.queryKey[3]===n.id),Ca(["getRunDiff"],e,t=>{var r;return((r=rt.getQueryData(fu(n.projectId).queryKey))==null?void 0:r.some(s=>s.experimentId===n.id&&s.id===t.queryKey[3]))??!1}))},onProject(n){$n(e)&&(Ja(rt,v0().queryKey,n.id),rt.setQueryData(v0().queryKey,t=>Gg(t,n)))},onArtifacts(n){$n(e)&&(Ca(Nk,e,t=>t.queryKey[3]===n),Ca(["resolvedFile"],e,t=>t.queryKey[3]===n&&t.queryKey[5]==="artifacts"))},onReconnect(){$n(e)&&(Ca(DW,e),jz.onReconnect())}}),T.useEffect(()=>{let n;const t=$gn(()=>{n??(n=setTimeout(()=>{n=void 0,Ca(["listProjectActivity"],e)},100))}),r=FL(o=>{o.type==="done"&&Ca(["getDataDir"],e)}),s=Sv(o=>{$n(e)&&(o.type==="session"?Ja(rt,Aa(o.session.projectId).queryKey,o.session.id):(o.type==="busy"||o.type==="usage")&&Ja(rt,[...e,"listChatSessions"],o.sessionId),(o.type==="message"||o.type==="queued"||o.type==="branch")&&PL("",o.type==="message"?{type:"upsertMessage",sessionId:o.sessionId,message:o.message}:o.type==="queued"?{type:"setQueued",sessionId:o.sessionId,items:o.items}:{type:"activeLeaf",sessionId:o.sessionId,leafId:o.activeLeafId},!0),o.type==="session"&&!vu.has(o.session.id)?rt.setQueryData(Aa(o.session.projectId).queryKey,l=>{if(!l)return;const u=l.find(h=>h.id===o.session.id);return u?Gg(l,{...o.session,contextUsage:o.session.contextUsage??u.contextUsage}):[o.session,...l]}):o.type==="sessionDeleted"?gb(o.sessionId):(o.type==="busy"||o.type==="usage")&&rt.setQueriesData({queryKey:[...e,"listChatSessions"]},l=>l==null?void 0:l.map(u=>u.id!==o.sessionId?u:o.type==="busy"?{...u,busy:o.busy}:{...u,contextUsage:o.usage})))}),i=Bgn(()=>{$n(e)&&Xd(!0).catch(()=>{})}),a=Fgn(o=>{$n(e)&&(Ja(rt,kv().queryKey),rt.setQueryData(kv().queryKey,o))});return()=>{clearTimeout(n),t(),r(),s(),i(),a()}},[e[1]]),null}const w3=new Set;function qL(e){if(e!==z()){GO(e,{reload:!1}),document.documentElement.lang=e;for(const n of w3)n()}}function Zgn(e){return w3.add(e),()=>w3.delete(e)}function sf(){return T.useSyncExternalStore(Zgn,z,z)}const UL="orx:theme";function Jgn(){try{const e=localStorage.getItem(UL);if(e==="light"||e==="dark"||e==="system")return e}catch{}return"system"}let Yd=Jgn();const k3=new Set;function e1n(e){return e!=="system"?e:window.matchMedia("(prefers-color-scheme: dark)").matches?"dark":"light"}function Kk(){document.documentElement.dataset.theme=e1n(Yd)}function GL(e){Yd=e;try{localStorage.setItem(UL,e)}catch{}Kk();for(const n of k3)n()}function t1n(){return Yd}window.matchMedia("(prefers-color-scheme: dark)").addEventListener("change",()=>{Yd==="system"&&Kk()});Kk();function n1n(e){return k3.add(e),()=>k3.delete(e)}function VL(){return[T.useSyncExternalStore(n1n,()=>Yd,()=>Yd),GL]}const r1n=(e,n)=>{const t=new Array(e.length+n.length);for(let r=0;r({classGroupId:e,validator:n}),KL=(e=new Map,n=null,t)=>({nextPart:e,validators:n,classGroupId:t}),Ev="-",Rz=[],i1n="arbitrary..",a1n=e=>{const n=l1n(e),{conflictingClassGroups:t,conflictingClassGroupModifiers:r}=e;return{getClassGroupId:a=>{if(a.startsWith("[")&&a.endsWith("]"))return o1n(a);const o=a.split(Ev),l=o[0]===""&&o.length>1?1:0;return WL(o,l,n)},getConflictingClassGroupIds:(a,o)=>{if(o){const l=r[a],u=t[a];return l?u?r1n(u,l):l:u||Rz}return t[a]||Rz}}},WL=(e,n,t)=>{if(e.length-n===0)return t.classGroupId;const s=e[n],i=t.nextPart.get(s);if(i){const u=WL(e,n+1,i);if(u)return u}const a=t.validators;if(a===null)return;const o=n===0?e.join(Ev):e.slice(n).join(Ev),l=a.length;for(let u=0;ue.slice(1,-1).indexOf(":")===-1?void 0:(()=>{const n=e.slice(1,-1),t=n.indexOf(":"),r=n.slice(0,t);return r?i1n+r:void 0})(),l1n=e=>{const{theme:n,classGroups:t}=e;return c1n(t,n)},c1n=(e,n)=>{const t=KL();for(const r in e){const s=e[r];Wk(s,t,r,n)}return t},Wk=(e,n,t,r)=>{const s=e.length;for(let i=0;i{if(typeof e=="string"){_1n(e,n,t);return}if(typeof e=="function"){f1n(e,n,t,r);return}d1n(e,n,t,r)},_1n=(e,n,t)=>{const r=e===""?n:QL(n,e);r.classGroupId=t},f1n=(e,n,t,r)=>{if(h1n(e)){Wk(e(r),n,t,r);return}n.validators===null&&(n.validators=[]),n.validators.push(s1n(t,e))},d1n=(e,n,t,r)=>{const s=Object.entries(e),i=s.length;for(let a=0;a{let t=e;const r=n.split(Ev),s=r.length;for(let i=0;i"isThemeGetter"in e&&e.isThemeGetter===!0,p1n=e=>{if(e<1)return{get:()=>{},set:()=>{}};let n=0,t=Object.create(null),r=Object.create(null);const s=(i,a)=>{t[i]=a,n++,n>e&&(n=0,r=t,t=Object.create(null))};return{get(i){let a=t[i];if(a!==void 0)return a;if((a=r[i])!==void 0)return s(i,a),a},set(i,a){i in t?t[i]=a:s(i,a)}}},S3="!",Mz=":",m1n=[],Oz=(e,n,t,r,s)=>({modifiers:e,hasImportantModifier:n,baseClassName:t,maybePostfixModifierPosition:r,isExternal:s}),g1n=e=>{const{prefix:n,experimentalParseClassName:t}=e;let r=s=>{const i=[];let a=0,o=0,l=0,u;const h=s.length;for(let k=0;kl?u-l:void 0;return Oz(i,m,p,x)};if(n){const s=n+Mz,i=r;r=a=>a.startsWith(s)?i(a.slice(s.length)):Oz(m1n,!1,a,void 0,!0)}if(t){const s=r;r=i=>t({className:i,parseClassName:s})}return r},v1n=e=>{const n=new Map;return e.orderSensitiveModifiers.forEach((t,r)=>{n.set(t,1e6+r)}),t=>{const r=[];let s=[];for(let i=0;i0&&(s.sort(),r.push(...s),s=[]),r.push(a)):s.push(a)}return s.length>0&&(s.sort(),r.push(...s)),r}},b1n=e=>({cache:p1n(e.cacheSize),parseClassName:g1n(e),sortModifiers:v1n(e),postfixLookupClassGroupIds:y1n(e),...a1n(e)}),y1n=e=>{const n=Object.create(null),t=e.postfixLookupClassGroups;if(t)for(let r=0;r{const{parseClassName:t,getClassGroupId:r,getConflictingClassGroupIds:s,sortModifiers:i,postfixLookupClassGroupIds:a}=n,o=[],l=e.trim().split(x1n);let u="";for(let h=l.length-1;h>=0;h-=1){const _=l[h],{isExternal:p,modifiers:m,hasImportantModifier:x,baseClassName:k,maybePostfixModifierPosition:v}=t(_);if(p){u=_+(u.length>0?" "+u:u);continue}let b=!!v,w;if(b){const A=k.substring(0,v);w=r(A);const j=w&&a[w]?r(k):void 0;j&&j!==w&&(w=j,b=!1)}else w=r(k);if(!w){if(!b){u=_+(u.length>0?" "+u:u);continue}if(w=r(k),!w){u=_+(u.length>0?" "+u:u);continue}b=!1}const y=m.length===0?"":m.length===1?m[0]:i(m).join(":"),C=x?y+S3:y,E=C+w;if(o.indexOf(E)>-1)continue;o.push(E);const N=s(w,b);for(let A=0;A0?" "+u:u)}return u},k1n=(...e)=>{let n=0,t,r,s="";for(;n{if(typeof e=="string")return e;let n,t="";for(let r=0;r{let t,r,s,i;const a=l=>{const u=n.reduce((h,_)=>_(h),e());return t=b1n(u),r=t.cache.get,s=t.cache.set,i=o,o(l)},o=l=>{const u=r(l);if(u)return u;const h=w1n(l,t);return s(l,h),h};return i=a,(...l)=>i(k1n(...l))},S1n=[],ps=e=>{const n=t=>t[e]||S1n;return n.isThemeGetter=!0,n},YL=/^\[(?:(\w[\w-]*):)?(.+)\]$/i,ZL=/^\((?:(\w[\w-]*):)?(.+)\)$/i,C1n=/^\d+(?:\.\d+)?\/\d+(?:\.\d+)?$/,E1n=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,N1n=/\d+(%|px|r?em|[sdl]?v([hwib]|min|max)|pt|pc|in|cm|mm|cap|ch|ex|r?lh|cq(w|h|i|b|min|max))|\b(calc|min|max|clamp)\(.+\)|^0$/,z1n=/^(rgba?|hsla?|hwb|(ok)?(lab|lch)|color-mix)\(.+\)$/,j1n=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,T1n=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/,Vc=e=>C1n.test(e),dn=e=>!!e&&!Number.isNaN(Number(e)),No=e=>!!e&&Number.isInteger(Number(e)),Y2=e=>e.endsWith("%")&&dn(e.slice(0,-1)),Ml=e=>E1n.test(e),JL=()=>!0,A1n=e=>N1n.test(e)&&!z1n.test(e),Qk=()=>!1,R1n=e=>j1n.test(e),M1n=e=>T1n.test(e),O1n=e=>!pt(e)&&!vt(e),D1n=e=>e.startsWith("@container")&&(e[10]==="/"&&e[11]!==void 0||e[11]==="s"&&e[16]!==void 0&&e.startsWith("-size/",10)||e[11]==="n"&&e[18]!==void 0&&e.startsWith("-normal/",10)),L1n=e=>Tu(e,nI,Qk),pt=e=>YL.test(e),r_=e=>Tu(e,rI,A1n),Lz=e=>Tu(e,U1n,dn),I1n=e=>Tu(e,iI,JL),$1n=e=>Tu(e,sI,Qk),Iz=e=>Tu(e,eI,Qk),B1n=e=>Tu(e,tI,M1n),Vg=e=>Tu(e,aI,R1n),vt=e=>ZL.test(e),Cp=e=>af(e,rI),P1n=e=>af(e,sI),$z=e=>af(e,eI),F1n=e=>af(e,nI),H1n=e=>af(e,tI),Kg=e=>af(e,aI,!0),q1n=e=>af(e,iI,!0),Tu=(e,n,t)=>{const r=YL.exec(e);return r?r[1]?n(r[1]):t(r[2]):!1},af=(e,n,t=!1)=>{const r=ZL.exec(e);return r?r[1]?n(r[1]):t:!1},eI=e=>e==="position"||e==="percentage",tI=e=>e==="image"||e==="url",nI=e=>e==="length"||e==="size"||e==="bg-size",rI=e=>e==="length",U1n=e=>e==="number",sI=e=>e==="family-name",iI=e=>e==="number"||e==="weight",aI=e=>e==="shadow",Bz=()=>{const e=ps("color"),n=ps("font"),t=ps("text"),r=ps("font-weight"),s=ps("tracking"),i=ps("leading"),a=ps("breakpoint"),o=ps("container"),l=ps("spacing"),u=ps("radius"),h=ps("shadow"),_=ps("inset-shadow"),p=ps("text-shadow"),m=ps("drop-shadow"),x=ps("blur"),k=ps("perspective"),v=ps("aspect"),b=ps("ease"),w=ps("animate"),y=()=>["auto","avoid","all","avoid-page","page","left","right","column"],C=()=>["center","top","bottom","left","right","top-left","left-top","top-right","right-top","bottom-right","right-bottom","bottom-left","left-bottom"],E=()=>[...C(),vt,pt],N=()=>["auto","hidden","clip","visible","scroll"],A=()=>["auto","contain","none"],j=()=>[vt,pt,l],M=()=>[Vc,"full","auto",...j()],L=()=>[No,"none","subgrid",vt,pt],I=()=>["auto",{span:["full",No,vt,pt]},No,vt,pt],B=()=>[No,"auto",vt,pt],q=()=>["auto","min","max","fr",vt,pt],U=()=>["start","end","center","between","around","evenly","stretch","baseline","center-safe","end-safe"],W=()=>["start","end","center","stretch","center-safe","end-safe"],H=()=>["auto",...j()],Y=()=>[Vc,"auto","full","dvw","dvh","lvw","lvh","svw","svh","min","max","fit",...j()],te=()=>[Vc,"screen","full","dvw","lvw","svw","min","max","fit",...j()],$=()=>[Vc,"screen","full","lh","dvh","lvh","svh","min","max","fit",...j()],D=()=>[e,vt,pt],F=()=>[...C(),$z,Iz,{position:[vt,pt]}],G=()=>["no-repeat",{repeat:["","x","y","space","round"]}],V=()=>["auto","cover","contain",F1n,L1n,{size:[vt,pt]}],ee=()=>[Y2,Cp,r_],ce=()=>["","none","full",u,vt,pt],ae=()=>["",dn,Cp,r_],re=()=>["solid","dashed","dotted","double"],X=()=>["normal","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","hue","saturation","color","luminosity"],oe=()=>[dn,Y2,$z,Iz],le=()=>["","none",x,vt,pt],_e=()=>["none",dn,vt,pt],pe=()=>["none",dn,vt,pt],Ee=()=>[dn,vt,pt],Ie=()=>[Vc,"full",...j()];return{cacheSize:500,theme:{animate:["spin","ping","pulse","bounce"],aspect:["video"],blur:[Ml],breakpoint:[Ml],color:[JL],container:[Ml],"drop-shadow":[Ml],ease:["in","out","in-out"],font:[O1n],"font-weight":["thin","extralight","light","normal","medium","semibold","bold","extrabold","black"],"inset-shadow":[Ml],leading:["none","tight","snug","normal","relaxed","loose"],perspective:["dramatic","near","normal","midrange","distant","none"],radius:[Ml],shadow:[Ml],spacing:["px",dn],text:[Ml],"text-shadow":[Ml],tracking:["tighter","tight","normal","wide","wider","widest"]},classGroups:{aspect:[{aspect:["auto","square",Vc,pt,vt,v]}],container:["container"],"container-type":[{"@container":["","normal","size",vt,pt]}],"container-named":[D1n],columns:[{columns:[dn,pt,vt,o]}],"break-after":[{"break-after":y()}],"break-before":[{"break-before":y()}],"break-inside":[{"break-inside":["auto","avoid","avoid-page","avoid-column"]}],"box-decoration":[{"box-decoration":["slice","clone"]}],box:[{box:["border","content"]}],display:["block","inline-block","inline","flex","inline-flex","table","inline-table","table-caption","table-cell","table-column","table-column-group","table-footer-group","table-header-group","table-row-group","table-row","flow-root","grid","inline-grid","contents","list-item","hidden"],sr:["sr-only","not-sr-only"],float:[{float:["right","left","none","start","end"]}],clear:[{clear:["left","right","both","none","start","end"]}],isolation:["isolate","isolation-auto"],"object-fit":[{object:["contain","cover","fill","none","scale-down"]}],"object-position":[{object:E()}],overflow:[{overflow:N()}],"overflow-x":[{"overflow-x":N()}],"overflow-y":[{"overflow-y":N()}],overscroll:[{overscroll:A()}],"overscroll-x":[{"overscroll-x":A()}],"overscroll-y":[{"overscroll-y":A()}],position:["static","fixed","absolute","relative","sticky"],inset:[{inset:M()}],"inset-x":[{"inset-x":M()}],"inset-y":[{"inset-y":M()}],start:[{"inset-s":M(),start:M()}],end:[{"inset-e":M(),end:M()}],"inset-bs":[{"inset-bs":M()}],"inset-be":[{"inset-be":M()}],top:[{top:M()}],right:[{right:M()}],bottom:[{bottom:M()}],left:[{left:M()}],visibility:["visible","invisible","collapse"],z:[{z:[No,"auto",vt,pt]}],basis:[{basis:[Vc,"full","auto",o,...j()]}],"flex-direction":[{flex:["row","row-reverse","col","col-reverse"]}],"flex-wrap":[{flex:["nowrap","wrap","wrap-reverse"]}],flex:[{flex:[dn,Vc,"auto","initial","none",pt]}],grow:[{grow:["",dn,vt,pt]}],shrink:[{shrink:["",dn,vt,pt]}],order:[{order:[No,"first","last","none",vt,pt]}],"grid-cols":[{"grid-cols":L()}],"col-start-end":[{col:I()}],"col-start":[{"col-start":B()}],"col-end":[{"col-end":B()}],"grid-rows":[{"grid-rows":L()}],"row-start-end":[{row:I()}],"row-start":[{"row-start":B()}],"row-end":[{"row-end":B()}],"grid-flow":[{"grid-flow":["row","col","dense","row-dense","col-dense"]}],"auto-cols":[{"auto-cols":q()}],"auto-rows":[{"auto-rows":q()}],gap:[{gap:j()}],"gap-x":[{"gap-x":j()}],"gap-y":[{"gap-y":j()}],"justify-content":[{justify:[...U(),"normal"]}],"justify-items":[{"justify-items":[...W(),"normal"]}],"justify-self":[{"justify-self":["auto",...W()]}],"align-content":[{content:["normal",...U()]}],"align-items":[{items:[...W(),{baseline:["","last"]}]}],"align-self":[{self:["auto",...W(),{baseline:["","last"]}]}],"place-content":[{"place-content":U()}],"place-items":[{"place-items":[...W(),"baseline"]}],"place-self":[{"place-self":["auto",...W()]}],p:[{p:j()}],px:[{px:j()}],py:[{py:j()}],ps:[{ps:j()}],pe:[{pe:j()}],pbs:[{pbs:j()}],pbe:[{pbe:j()}],pt:[{pt:j()}],pr:[{pr:j()}],pb:[{pb:j()}],pl:[{pl:j()}],m:[{m:H()}],mx:[{mx:H()}],my:[{my:H()}],ms:[{ms:H()}],me:[{me:H()}],mbs:[{mbs:H()}],mbe:[{mbe:H()}],mt:[{mt:H()}],mr:[{mr:H()}],mb:[{mb:H()}],ml:[{ml:H()}],"space-x":[{"space-x":j()}],"space-x-reverse":["space-x-reverse"],"space-y":[{"space-y":j()}],"space-y-reverse":["space-y-reverse"],size:[{size:Y()}],"inline-size":[{inline:["auto",...te()]}],"min-inline-size":[{"min-inline":["auto",...te()]}],"max-inline-size":[{"max-inline":["none",...te()]}],"block-size":[{block:["auto",...$()]}],"min-block-size":[{"min-block":["auto",...$()]}],"max-block-size":[{"max-block":["none",...$()]}],w:[{w:[o,"screen",...Y()]}],"min-w":[{"min-w":[o,"screen","none",...Y()]}],"max-w":[{"max-w":[o,"screen","none","prose",{screen:[a]},...Y()]}],h:[{h:["screen","lh",...Y()]}],"min-h":[{"min-h":["screen","lh","none",...Y()]}],"max-h":[{"max-h":["screen","lh",...Y()]}],"font-size":[{text:["base",t,Cp,r_]}],"font-smoothing":["antialiased","subpixel-antialiased"],"font-style":["italic","not-italic"],"font-weight":[{font:[r,q1n,I1n]}],"font-stretch":[{"font-stretch":["ultra-condensed","extra-condensed","condensed","semi-condensed","normal","semi-expanded","expanded","extra-expanded","ultra-expanded",Y2,pt]}],"font-family":[{font:[P1n,$1n,n]}],"font-features":[{"font-features":[pt]}],"fvn-normal":["normal-nums"],"fvn-ordinal":["ordinal"],"fvn-slashed-zero":["slashed-zero"],"fvn-figure":["lining-nums","oldstyle-nums"],"fvn-spacing":["proportional-nums","tabular-nums"],"fvn-fraction":["diagonal-fractions","stacked-fractions"],tracking:[{tracking:[s,vt,pt]}],"line-clamp":[{"line-clamp":[dn,"none",vt,Lz]}],leading:[{leading:[i,...j()]}],"list-image":[{"list-image":["none",vt,pt]}],"list-style-position":[{list:["inside","outside"]}],"list-style-type":[{list:["disc","decimal","none",vt,pt]}],"text-alignment":[{text:["left","center","right","justify","start","end"]}],"placeholder-color":[{placeholder:D()}],"text-color":[{text:D()}],"text-decoration":["underline","overline","line-through","no-underline"],"text-decoration-style":[{decoration:[...re(),"wavy"]}],"text-decoration-thickness":[{decoration:[dn,"from-font","auto",vt,r_]}],"text-decoration-color":[{decoration:D()}],"underline-offset":[{"underline-offset":[dn,"auto",vt,pt]}],"text-transform":["uppercase","lowercase","capitalize","normal-case"],"text-overflow":["truncate","text-ellipsis","text-clip"],"text-wrap":[{text:["wrap","nowrap","balance","pretty"]}],indent:[{indent:j()}],"tab-size":[{tab:[No,vt,pt]}],"vertical-align":[{align:["baseline","top","middle","bottom","text-top","text-bottom","sub","super",vt,pt]}],whitespace:[{whitespace:["normal","nowrap","pre","pre-line","pre-wrap","break-spaces"]}],break:[{break:["normal","words","all","keep"]}],wrap:[{wrap:["break-word","anywhere","normal"]}],hyphens:[{hyphens:["none","manual","auto"]}],content:[{content:["none",vt,pt]}],"bg-attachment":[{bg:["fixed","local","scroll"]}],"bg-clip":[{"bg-clip":["border","padding","content","text"]}],"bg-origin":[{"bg-origin":["border","padding","content"]}],"bg-position":[{bg:F()}],"bg-repeat":[{bg:G()}],"bg-size":[{bg:V()}],"bg-image":[{bg:["none",{linear:[{to:["t","tr","r","br","b","bl","l","tl"]},No,vt,pt],radial:["",vt,pt],conic:[No,vt,pt]},H1n,B1n]}],"bg-color":[{bg:D()}],"gradient-from-pos":[{from:ee()}],"gradient-via-pos":[{via:ee()}],"gradient-to-pos":[{to:ee()}],"gradient-from":[{from:D()}],"gradient-via":[{via:D()}],"gradient-to":[{to:D()}],rounded:[{rounded:ce()}],"rounded-s":[{"rounded-s":ce()}],"rounded-e":[{"rounded-e":ce()}],"rounded-t":[{"rounded-t":ce()}],"rounded-r":[{"rounded-r":ce()}],"rounded-b":[{"rounded-b":ce()}],"rounded-l":[{"rounded-l":ce()}],"rounded-ss":[{"rounded-ss":ce()}],"rounded-se":[{"rounded-se":ce()}],"rounded-ee":[{"rounded-ee":ce()}],"rounded-es":[{"rounded-es":ce()}],"rounded-tl":[{"rounded-tl":ce()}],"rounded-tr":[{"rounded-tr":ce()}],"rounded-br":[{"rounded-br":ce()}],"rounded-bl":[{"rounded-bl":ce()}],"border-w":[{border:ae()}],"border-w-x":[{"border-x":ae()}],"border-w-y":[{"border-y":ae()}],"border-w-s":[{"border-s":ae()}],"border-w-e":[{"border-e":ae()}],"border-w-bs":[{"border-bs":ae()}],"border-w-be":[{"border-be":ae()}],"border-w-t":[{"border-t":ae()}],"border-w-r":[{"border-r":ae()}],"border-w-b":[{"border-b":ae()}],"border-w-l":[{"border-l":ae()}],"divide-x":[{"divide-x":ae()}],"divide-x-reverse":["divide-x-reverse"],"divide-y":[{"divide-y":ae()}],"divide-y-reverse":["divide-y-reverse"],"border-style":[{border:[...re(),"hidden","none"]}],"divide-style":[{divide:[...re(),"hidden","none"]}],"border-color":[{border:D()}],"border-color-x":[{"border-x":D()}],"border-color-y":[{"border-y":D()}],"border-color-s":[{"border-s":D()}],"border-color-e":[{"border-e":D()}],"border-color-bs":[{"border-bs":D()}],"border-color-be":[{"border-be":D()}],"border-color-t":[{"border-t":D()}],"border-color-r":[{"border-r":D()}],"border-color-b":[{"border-b":D()}],"border-color-l":[{"border-l":D()}],"divide-color":[{divide:D()}],"outline-style":[{outline:[...re(),"none","hidden"]}],"outline-offset":[{"outline-offset":[dn,vt,pt]}],"outline-w":[{outline:["",dn,Cp,r_]}],"outline-color":[{outline:D()}],shadow:[{shadow:["","none",h,Kg,Vg]}],"shadow-color":[{shadow:D()}],"inset-shadow":[{"inset-shadow":["none",_,Kg,Vg]}],"inset-shadow-color":[{"inset-shadow":D()}],"ring-w":[{ring:ae()}],"ring-w-inset":["ring-inset"],"ring-color":[{ring:D()}],"ring-offset-w":[{"ring-offset":[dn,r_]}],"ring-offset-color":[{"ring-offset":D()}],"inset-ring-w":[{"inset-ring":ae()}],"inset-ring-color":[{"inset-ring":D()}],"text-shadow":[{"text-shadow":["none",p,Kg,Vg]}],"text-shadow-color":[{"text-shadow":D()}],opacity:[{opacity:[dn,vt,pt]}],"mix-blend":[{"mix-blend":[...X(),"plus-darker","plus-lighter"]}],"bg-blend":[{"bg-blend":X()}],"mask-clip":[{"mask-clip":["border","padding","content","fill","stroke","view"]},"mask-no-clip"],"mask-composite":[{mask:["add","subtract","intersect","exclude"]}],"mask-image-linear-pos":[{"mask-linear":[dn]}],"mask-image-linear-from-pos":[{"mask-linear-from":oe()}],"mask-image-linear-to-pos":[{"mask-linear-to":oe()}],"mask-image-linear-from-color":[{"mask-linear-from":D()}],"mask-image-linear-to-color":[{"mask-linear-to":D()}],"mask-image-t-from-pos":[{"mask-t-from":oe()}],"mask-image-t-to-pos":[{"mask-t-to":oe()}],"mask-image-t-from-color":[{"mask-t-from":D()}],"mask-image-t-to-color":[{"mask-t-to":D()}],"mask-image-r-from-pos":[{"mask-r-from":oe()}],"mask-image-r-to-pos":[{"mask-r-to":oe()}],"mask-image-r-from-color":[{"mask-r-from":D()}],"mask-image-r-to-color":[{"mask-r-to":D()}],"mask-image-b-from-pos":[{"mask-b-from":oe()}],"mask-image-b-to-pos":[{"mask-b-to":oe()}],"mask-image-b-from-color":[{"mask-b-from":D()}],"mask-image-b-to-color":[{"mask-b-to":D()}],"mask-image-l-from-pos":[{"mask-l-from":oe()}],"mask-image-l-to-pos":[{"mask-l-to":oe()}],"mask-image-l-from-color":[{"mask-l-from":D()}],"mask-image-l-to-color":[{"mask-l-to":D()}],"mask-image-x-from-pos":[{"mask-x-from":oe()}],"mask-image-x-to-pos":[{"mask-x-to":oe()}],"mask-image-x-from-color":[{"mask-x-from":D()}],"mask-image-x-to-color":[{"mask-x-to":D()}],"mask-image-y-from-pos":[{"mask-y-from":oe()}],"mask-image-y-to-pos":[{"mask-y-to":oe()}],"mask-image-y-from-color":[{"mask-y-from":D()}],"mask-image-y-to-color":[{"mask-y-to":D()}],"mask-image-radial":[{"mask-radial":[vt,pt]}],"mask-image-radial-from-pos":[{"mask-radial-from":oe()}],"mask-image-radial-to-pos":[{"mask-radial-to":oe()}],"mask-image-radial-from-color":[{"mask-radial-from":D()}],"mask-image-radial-to-color":[{"mask-radial-to":D()}],"mask-image-radial-shape":[{"mask-radial":["circle","ellipse"]}],"mask-image-radial-size":[{"mask-radial":[{closest:["side","corner"],farthest:["side","corner"]}]}],"mask-image-radial-pos":[{"mask-radial-at":C()}],"mask-image-conic-pos":[{"mask-conic":[dn]}],"mask-image-conic-from-pos":[{"mask-conic-from":oe()}],"mask-image-conic-to-pos":[{"mask-conic-to":oe()}],"mask-image-conic-from-color":[{"mask-conic-from":D()}],"mask-image-conic-to-color":[{"mask-conic-to":D()}],"mask-mode":[{mask:["alpha","luminance","match"]}],"mask-origin":[{"mask-origin":["border","padding","content","fill","stroke","view"]}],"mask-position":[{mask:F()}],"mask-repeat":[{mask:G()}],"mask-size":[{mask:V()}],"mask-type":[{"mask-type":["alpha","luminance"]}],"mask-image":[{mask:["none",vt,pt]}],filter:[{filter:["","none",vt,pt]}],blur:[{blur:le()}],brightness:[{brightness:[dn,vt,pt]}],contrast:[{contrast:[dn,vt,pt]}],"drop-shadow":[{"drop-shadow":["","none",m,Kg,Vg]}],"drop-shadow-color":[{"drop-shadow":D()}],grayscale:[{grayscale:["",dn,vt,pt]}],"hue-rotate":[{"hue-rotate":[dn,vt,pt]}],invert:[{invert:["",dn,vt,pt]}],saturate:[{saturate:[dn,vt,pt]}],sepia:[{sepia:["",dn,vt,pt]}],"backdrop-filter":[{"backdrop-filter":["","none",vt,pt]}],"backdrop-blur":[{"backdrop-blur":le()}],"backdrop-brightness":[{"backdrop-brightness":[dn,vt,pt]}],"backdrop-contrast":[{"backdrop-contrast":[dn,vt,pt]}],"backdrop-grayscale":[{"backdrop-grayscale":["",dn,vt,pt]}],"backdrop-hue-rotate":[{"backdrop-hue-rotate":[dn,vt,pt]}],"backdrop-invert":[{"backdrop-invert":["",dn,vt,pt]}],"backdrop-opacity":[{"backdrop-opacity":[dn,vt,pt]}],"backdrop-saturate":[{"backdrop-saturate":[dn,vt,pt]}],"backdrop-sepia":[{"backdrop-sepia":["",dn,vt,pt]}],"border-collapse":[{border:["collapse","separate"]}],"border-spacing":[{"border-spacing":j()}],"border-spacing-x":[{"border-spacing-x":j()}],"border-spacing-y":[{"border-spacing-y":j()}],"table-layout":[{table:["auto","fixed"]}],caption:[{caption:["top","bottom"]}],transition:[{transition:["","all","colors","opacity","shadow","transform","none",vt,pt]}],"transition-behavior":[{transition:["normal","discrete"]}],duration:[{duration:[dn,"initial",vt,pt]}],ease:[{ease:["linear","initial",b,vt,pt]}],delay:[{delay:[dn,vt,pt]}],animate:[{animate:["none",w,vt,pt]}],backface:[{backface:["hidden","visible"]}],perspective:[{perspective:[k,vt,pt]}],"perspective-origin":[{"perspective-origin":E()}],rotate:[{rotate:_e()}],"rotate-x":[{"rotate-x":_e()}],"rotate-y":[{"rotate-y":_e()}],"rotate-z":[{"rotate-z":_e()}],scale:[{scale:pe()}],"scale-x":[{"scale-x":pe()}],"scale-y":[{"scale-y":pe()}],"scale-z":[{"scale-z":pe()}],"scale-3d":["scale-3d"],skew:[{skew:Ee()}],"skew-x":[{"skew-x":Ee()}],"skew-y":[{"skew-y":Ee()}],transform:[{transform:[vt,pt,"","none","gpu","cpu"]}],"transform-origin":[{origin:E()}],"transform-style":[{transform:["3d","flat"]}],translate:[{translate:Ie()}],"translate-x":[{"translate-x":Ie()}],"translate-y":[{"translate-y":Ie()}],"translate-z":[{"translate-z":Ie()}],"translate-none":["translate-none"],zoom:[{zoom:[No,vt,pt]}],accent:[{accent:D()}],appearance:[{appearance:["none","auto"]}],"caret-color":[{caret:D()}],"color-scheme":[{scheme:["normal","dark","light","light-dark","only-dark","only-light"]}],cursor:[{cursor:["auto","default","pointer","wait","text","move","help","not-allowed","none","context-menu","progress","cell","crosshair","vertical-text","alias","copy","no-drop","grab","grabbing","all-scroll","col-resize","row-resize","n-resize","e-resize","s-resize","w-resize","ne-resize","nw-resize","se-resize","sw-resize","ew-resize","ns-resize","nesw-resize","nwse-resize","zoom-in","zoom-out",vt,pt]}],"field-sizing":[{"field-sizing":["fixed","content"]}],"pointer-events":[{"pointer-events":["auto","none"]}],resize:[{resize:["none","","y","x"]}],"scroll-behavior":[{scroll:["auto","smooth"]}],"scrollbar-thumb-color":[{"scrollbar-thumb":D()}],"scrollbar-track-color":[{"scrollbar-track":D()}],"scrollbar-gutter":[{"scrollbar-gutter":["auto","stable","both"]}],"scrollbar-w":[{scrollbar:["auto","thin","none"]}],"scroll-m":[{"scroll-m":j()}],"scroll-mx":[{"scroll-mx":j()}],"scroll-my":[{"scroll-my":j()}],"scroll-ms":[{"scroll-ms":j()}],"scroll-me":[{"scroll-me":j()}],"scroll-mbs":[{"scroll-mbs":j()}],"scroll-mbe":[{"scroll-mbe":j()}],"scroll-mt":[{"scroll-mt":j()}],"scroll-mr":[{"scroll-mr":j()}],"scroll-mb":[{"scroll-mb":j()}],"scroll-ml":[{"scroll-ml":j()}],"scroll-p":[{"scroll-p":j()}],"scroll-px":[{"scroll-px":j()}],"scroll-py":[{"scroll-py":j()}],"scroll-ps":[{"scroll-ps":j()}],"scroll-pe":[{"scroll-pe":j()}],"scroll-pbs":[{"scroll-pbs":j()}],"scroll-pbe":[{"scroll-pbe":j()}],"scroll-pt":[{"scroll-pt":j()}],"scroll-pr":[{"scroll-pr":j()}],"scroll-pb":[{"scroll-pb":j()}],"scroll-pl":[{"scroll-pl":j()}],"snap-align":[{snap:["start","end","center","align-none"]}],"snap-stop":[{snap:["normal","always"]}],"snap-type":[{snap:["none","x","y","both"]}],"snap-strictness":[{snap:["mandatory","proximity"]}],touch:[{touch:["auto","none","manipulation"]}],"touch-x":[{"touch-pan":["x","left","right"]}],"touch-y":[{"touch-pan":["y","up","down"]}],"touch-pz":["touch-pinch-zoom"],select:[{select:["none","text","all","auto"]}],"will-change":[{"will-change":["auto","scroll","contents","transform",vt,pt]}],fill:[{fill:["none",...D()]}],"stroke-w":[{stroke:[dn,Cp,r_,Lz]}],stroke:[{stroke:["none",...D()]}],"forced-color-adjust":[{"forced-color-adjust":["auto","none"]}]},conflictingClassGroups:{"container-named":["container-type"],overflow:["overflow-x","overflow-y"],overscroll:["overscroll-x","overscroll-y"],inset:["inset-x","inset-y","inset-bs","inset-be","start","end","top","right","bottom","left"],"inset-x":["right","left"],"inset-y":["top","bottom"],flex:["basis","grow","shrink"],gap:["gap-x","gap-y"],p:["px","py","ps","pe","pbs","pbe","pt","pr","pb","pl"],px:["pr","pl"],py:["pt","pb"],m:["mx","my","ms","me","mbs","mbe","mt","mr","mb","ml"],mx:["mr","ml"],my:["mt","mb"],size:["w","h"],"font-size":["leading"],"fvn-normal":["fvn-ordinal","fvn-slashed-zero","fvn-figure","fvn-spacing","fvn-fraction"],"fvn-ordinal":["fvn-normal"],"fvn-slashed-zero":["fvn-normal"],"fvn-figure":["fvn-normal"],"fvn-spacing":["fvn-normal"],"fvn-fraction":["fvn-normal"],"line-clamp":["display","overflow"],rounded:["rounded-s","rounded-e","rounded-t","rounded-r","rounded-b","rounded-l","rounded-ss","rounded-se","rounded-ee","rounded-es","rounded-tl","rounded-tr","rounded-br","rounded-bl"],"rounded-s":["rounded-ss","rounded-es"],"rounded-e":["rounded-se","rounded-ee"],"rounded-t":["rounded-tl","rounded-tr"],"rounded-r":["rounded-tr","rounded-br"],"rounded-b":["rounded-br","rounded-bl"],"rounded-l":["rounded-tl","rounded-bl"],"border-spacing":["border-spacing-x","border-spacing-y"],"border-w":["border-w-x","border-w-y","border-w-s","border-w-e","border-w-bs","border-w-be","border-w-t","border-w-r","border-w-b","border-w-l"],"border-w-x":["border-w-r","border-w-l"],"border-w-y":["border-w-t","border-w-b"],"border-color":["border-color-x","border-color-y","border-color-s","border-color-e","border-color-bs","border-color-be","border-color-t","border-color-r","border-color-b","border-color-l"],"border-color-x":["border-color-r","border-color-l"],"border-color-y":["border-color-t","border-color-b"],translate:["translate-x","translate-y","translate-none"],"translate-none":["translate","translate-x","translate-y","translate-z"],"scroll-m":["scroll-mx","scroll-my","scroll-ms","scroll-me","scroll-mbs","scroll-mbe","scroll-mt","scroll-mr","scroll-mb","scroll-ml"],"scroll-mx":["scroll-mr","scroll-ml"],"scroll-my":["scroll-mt","scroll-mb"],"scroll-p":["scroll-px","scroll-py","scroll-ps","scroll-pe","scroll-pbs","scroll-pbe","scroll-pt","scroll-pr","scroll-pb","scroll-pl"],"scroll-px":["scroll-pr","scroll-pl"],"scroll-py":["scroll-pt","scroll-pb"],touch:["touch-x","touch-y","touch-pz"],"touch-x":["touch"],"touch-y":["touch"],"touch-pz":["touch"]},conflictingClassGroupModifiers:{"font-size":["leading"]},postfixLookupClassGroups:["container-type"],orderSensitiveModifiers:["*","**","after","backdrop","before","details-content","file","first-letter","first-line","marker","placeholder","selection"]}},G1n=(e,{cacheSize:n,prefix:t,experimentalParseClassName:r,extend:s={},override:i={}})=>(sd(e,"cacheSize",n),sd(e,"prefix",t),sd(e,"experimentalParseClassName",r),Wg(e.theme,i.theme),Wg(e.classGroups,i.classGroups),Wg(e.conflictingClassGroups,i.conflictingClassGroups),Wg(e.conflictingClassGroupModifiers,i.conflictingClassGroupModifiers),sd(e,"postfixLookupClassGroups",i.postfixLookupClassGroups),sd(e,"orderSensitiveModifiers",i.orderSensitiveModifiers),Qg(e.theme,s.theme),Qg(e.classGroups,s.classGroups),Qg(e.conflictingClassGroups,s.conflictingClassGroups),Qg(e.conflictingClassGroupModifiers,s.conflictingClassGroupModifiers),C3(e,s,"postfixLookupClassGroups"),C3(e,s,"orderSensitiveModifiers"),e),sd=(e,n,t)=>{t!==void 0&&(e[n]=t)},Wg=(e,n)=>{if(n)for(const t in n)sd(e,t,n[t])},Qg=(e,n)=>{if(n)for(const t in n)C3(e,n,t)},C3=(e,n,t)=>{const r=n[t];r!==void 0&&(e[t]=e[t]?e[t].concat(r):r)},V1n=(e,...n)=>typeof e=="function"?Dz(Bz,e,...n):Dz(()=>G1n(Bz(),e),...n),K1n=V1n({extend:{theme:{text:["menu"]}}});function vs(...e){return K1n(...e)}const W1n={default:"border-transparent bg-surface text-subtext",success:"border-accent-green bg-accent-green-subtle text-accent-green",error:"border-accent-red bg-accent-red-subtle text-accent-red",warning:"border-accent-amber bg-accent-amber-subtle text-accent-amber"};function Gt({variant:e="default",size:n="default",className:t,...r}){return f.jsx("span",{className:vs("badge inline-flex items-center rounded-full border py-px font-sans",n==="small"?"px-1.5 text-xs font-normal":"px-2 text-sm font-medium",W1n[e],t),...r})}const Q1n=["btn inline-flex shrink-0 items-center justify-center gap-1.5 whitespace-nowrap border font-medium","transition-[background,border-color,color] duration-120 ease-standard","focus-visible:outline-2 focus-visible:outline-solid focus-visible:outline-text focus-visible:outline-offset-2","disabled:cursor-default disabled:opacity-45"].join(" "),X1n={default:"border-border bg-background text-text [&:hover:not(:disabled)]:bg-surface [&:active:not(:disabled)]:bg-highlight",primary:"border-primary bg-primary text-background [&:hover:not(:disabled)]:border-primary-hover [&:hover:not(:disabled)]:bg-primary-hover [&:active:not(:disabled)]:border-primary-active [&:active:not(:disabled)]:bg-primary-active",ghost:"border-transparent bg-transparent text-text [&:hover:not(:disabled)]:bg-surface [&:active:not(:disabled)]:bg-highlight [&.active]:bg-surface [&.active]:text-muted",danger:"border-border bg-background text-accent-red [&:hover:not(:disabled)]:bg-danger-hover [&:active:not(:disabled)]:bg-danger-active",warning:"border-accent-amber bg-background text-accent-amber [&:hover:not(:disabled)]:bg-accent-amber-subtle [&:active:not(:disabled)]:bg-highlight"},Y1n={default:"h-8 rounded-md px-3.5 text-sm",small:"h-7 rounded-sm px-2.5 text-sm",large:"h-14 rounded-lg px-7 text-xl"};function oI(e,n,t,r){return vs(Q1n,X1n[e],Y1n[n],t&&"active",r)}function Me({active:e=!1,variant:n="default",size:t="default",className:r,...s}){return f.jsx("button",{className:oI(n,t,e,r),...s})}function Zd({active:e=!1,variant:n="default",size:t="default",className:r,...s}){return f.jsx("a",{className:oI(n,t,e,r),...s})}const Z1n=["icon-btn relative inline-flex shrink-0 items-center justify-center","transition-[background,color] duration-120 ease-standard","focus-visible:outline-2 focus-visible:outline-solid focus-visible:outline-text focus-visible:outline-offset-2","disabled:cursor-default disabled:opacity-45"].join(" "),J1n={default:"text-subtext [&:hover:not(:disabled)]:bg-surface [&:hover:not(:disabled)]:text-text [&:active:not(:disabled)]:bg-highlight [&.active]:bg-surface [&.active]:text-primary",primary:"bg-primary text-background [&:hover:not(:disabled)]:bg-primary-hover [&:active:not(:disabled)]:bg-primary-active",stop:"bg-surface text-text [&:hover:not(:disabled)]:bg-stop-hover [&:active:not(:disabled)]:bg-highlight"},evn={default:"h-8 w-8 rounded-md",small:"h-7 w-7 rounded-sm"};function lI(e,n,t,r,s){return vs(Z1n,J1n[e],evn[n],r==="circle"&&"rounded-full",t&&"active",s)}const Ft=T.forwardRef(function({active:n=!1,shape:t="rounded",size:r="default",variant:s="default",className:i,...a},o){return f.jsx("button",{ref:o,className:lI(s,r,n,t,i),...a})});function dm({active:e=!1,shape:n="rounded",size:t="default",variant:r="default",className:s,...i}){return f.jsx("a",{className:lI(r,t,e,n,s),...i})}const tvn={default:"h-8 rounded-md border border-border bg-background px-2.5 py-1.5 focus:border-text",inline:"h-8 rounded-none border-x-0 border-t-0 border-b border-transparent bg-transparent px-0 py-0 focus:border-text"};function Qr({variant:e="default",className:n,...t}){return f.jsx("input",{className:vs("w-full font-sans text-sm font-normal text-text outline-none placeholder:text-muted disabled:cursor-default disabled:opacity-45",tvn[e],n),...t})}function nr({active:e=!1,danger:n=!1,size:t="default",className:r,...s}){return f.jsx("button",{className:vs("model-item flex w-full items-center justify-between gap-2 rounded-sm px-2 text-start transition-[background,color] duration-120 ease-standard hover:bg-surface focus-visible:outline-2 focus-visible:outline-solid focus-visible:outline-text focus-visible:outline-offset-2 disabled:cursor-default disabled:opacity-45 [&_.model-id]:block [&_.model-id]:text-xs [&_.model-id]:text-muted",t==="compact"?"min-h-6 py-0.5 text-menu":"min-h-8 py-1.5 text-sm",e&&"bg-surface",n&&"text-accent-red hover:text-accent-red",r),...s})}function Rt({className:e,...n}){return f.jsx("span",{className:vs("spinner h-[13px] w-[13px] shrink-0 animate-[spin_0.8s_linear_infinite] rounded-full border-2 border-border border-t-primary",e),...n})}function os({className:e,...n}){return f.jsx("div",{className:vs("flex items-center gap-2 px-0 py-1 text-sm text-subtext",e),...n})}const nvn={success:"text-accent-green",danger:"text-accent-red",info:"text-accent-teal",warning:"text-accent-amber",caution:"text-accent-orange",accent:"text-accent-purple",neutral:"text-muted"};function yd({tone:e="neutral",live:n=!1,className:t,children:r,...s}){return f.jsxs("span",{className:vs("status-badge inline-flex items-center gap-1.5 whitespace-nowrap text-sm font-medium text-text",t),...s,children:[f.jsx("span",{className:vs("h-[7px] w-[7px] shrink-0 rounded-full bg-current",nvn[e],n&&"animate-[or-pulse_1.2s_ease-in-out_infinite]")}),r]})}const rvn=["relative h-5.5 w-9.5 flex-none rounded-full border border-border bg-surface","transition-[background,border-color] duration-120 ease-standard","[&_span]:absolute [&_span]:start-[3px] [&_span]:top-[3px] [&_span]:h-3.5 [&_span]:w-3.5","[&_span]:rounded-full [&_span]:bg-muted [&_span]:transition-[translate,background] [&_span]:duration-120 [&_span]:ease-standard","hover:border-border-strong","disabled:cursor-default disabled:opacity-45 focus-visible:outline-2 focus-visible:outline-solid focus-visible:outline-text focus-visible:outline-offset-2"].join(" ");function cI(e,n){return vs(rvn,e&&"border-primary bg-primary [&_span]:translate-x-4 [&_span]:bg-background",n)}function Xk({checked:e=!1,className:n,children:t,...r}){return f.jsx("button",{role:"switch","aria-checked":e,className:cI(e,n),...r,children:t??f.jsx("span",{})})}function svn({checked:e=!1,className:n,...t}){return f.jsx("span",{className:cI(e,n),...t,children:f.jsx("span",{})})}var Oa=lO();const ivn=am(Oa);function avn(e){if(typeof document>"u")return;let n=document.head||document.getElementsByTagName("head")[0],t=document.createElement("style");t.type="text/css",n.appendChild(t),t.styleSheet?t.styleSheet.cssText=e:t.appendChild(document.createTextNode(e))}const ovn=e=>{switch(e){case"success":return uvn;case"info":return fvn;case"warning":return _vn;case"error":return dvn;default:return null}},lvn=Array(12).fill(0),cvn=({visible:e,className:n})=>et.createElement("div",{className:["sonner-loading-wrapper",n].filter(Boolean).join(" "),"data-visible":e},et.createElement("div",{className:"sonner-spinner"},lvn.map((t,r)=>et.createElement("div",{className:"sonner-loading-bar",key:`spinner-bar-${r}`})))),uvn=et.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor",height:"20",width:"20","aria-hidden":"true"},et.createElement("path",{fillRule:"evenodd",d:"M10 18a8 8 0 100-16 8 8 0 000 16zm3.857-9.809a.75.75 0 00-1.214-.882l-3.483 4.79-1.88-1.88a.75.75 0 10-1.06 1.061l2.5 2.5a.75.75 0 001.137-.089l4-5.5z",clipRule:"evenodd"})),_vn=et.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor",height:"20",width:"20","aria-hidden":"true"},et.createElement("path",{fillRule:"evenodd",d:"M9.401 3.003c1.155-2 4.043-2 5.197 0l7.355 12.748c1.154 2-.29 4.5-2.599 4.5H4.645c-2.309 0-3.752-2.5-2.598-4.5L9.4 3.003zM12 8.25a.75.75 0 01.75.75v3.75a.75.75 0 01-1.5 0V9a.75.75 0 01.75-.75zm0 8.25a.75.75 0 100-1.5.75.75 0 000 1.5z",clipRule:"evenodd"})),fvn=et.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor",height:"20",width:"20","aria-hidden":"true"},et.createElement("path",{fillRule:"evenodd",d:"M18 10a8 8 0 11-16 0 8 8 0 0116 0zm-7-4a1 1 0 11-2 0 1 1 0 012 0zM9 9a.75.75 0 000 1.5h.253a.25.25 0 01.244.304l-.459 2.066A1.75 1.75 0 0010.747 15H11a.75.75 0 000-1.5h-.253a.25.25 0 01-.244-.304l.459-2.066A1.75 1.75 0 009.253 9H9z",clipRule:"evenodd"})),dvn=et.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor",height:"20",width:"20","aria-hidden":"true"},et.createElement("path",{fillRule:"evenodd",d:"M18 10a8 8 0 11-16 0 8 8 0 0116 0zm-8-5a.75.75 0 01.75.75v4.5a.75.75 0 01-1.5 0v-4.5A.75.75 0 0110 5zm0 10a1 1 0 100-2 1 1 0 000 2z",clipRule:"evenodd"})),hvn=et.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",width:"12",height:"12",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true"},et.createElement("line",{x1:"18",y1:"6",x2:"6",y2:"18"}),et.createElement("line",{x1:"6",y1:"6",x2:"18",y2:"18"})),pvn=()=>{const[e,n]=et.useState(document.hidden);return et.useEffect(()=>{const t=()=>{n(document.hidden)};return document.addEventListener("visibilitychange",t),()=>document.removeEventListener("visibilitychange",t)},[]),e};let mvn=1;const gvn=100,Pz=e=>{var n;return typeof(e==null?void 0:e.id)=="number"||(e==null||(n=e.id)==null?void 0:n.length)>0?e.id:mvn++};class vvn{constructor(){this.subscribe=n=>(this.subscribers.push(n),this.getActiveToasts().forEach(t=>n(t)),()=>{const t=this.subscribers.indexOf(n);this.subscribers.splice(t,1)}),this.publish=n=>{this.subscribers.forEach(t=>t(n))},this.addToast=n=>{this.publish(n),this.toasts=[...this.toasts,n],this.trimHistory()},this.trimHistory=()=>{let n=this.toasts.length-gvn;n<=0||(this.toasts=this.toasts.filter(t=>n>0&&this.dismissedToasts.has(t.id)?(this.dismissedToasts.delete(t.id),n--,!1):!0))},this.create=n=>{const{message:t,...r}=n,s=Pz(n),i=this.pendingDismissals.get(s);i!==void 0&&(cancelAnimationFrame(i),this.pendingDismissals.delete(s),this.dismissedToasts.delete(s));const a=this.dismissedToasts.has(s),o=n.dismissible===void 0?!0:n.dismissible;return a&&(this.dismissedToasts.delete(s),this.toasts=this.toasts.filter(u=>u.id!==s)),(a?void 0:this.toasts.find(u=>u.id===s))?this.toasts=this.toasts.map(u=>u.id===s?(this.publish({...u,...n,id:s,title:t}),{...u,...n,id:s,dismissible:o,title:t}):u):this.addToast({title:t,...r,dismissible:o,id:s}),s},this.dismiss=n=>{if(n==null)return this.getActiveToasts().forEach(r=>{this.dismissedToasts.add(r.id),this.subscribers.forEach(s=>s({id:r.id,dismiss:!0}))}),n;this.dismissedToasts.add(n);const t=this.pendingDismissals.get(n);return t!==void 0&&cancelAnimationFrame(t),this.pendingDismissals.set(n,requestAnimationFrame(()=>{this.pendingDismissals.delete(n),this.subscribers.forEach(r=>r({id:n,dismiss:!0}))})),n},this.message=(n,t)=>this.create({...t,message:n,type:void 0}),this.error=(n,t)=>this.create({...t,message:n,type:"error"}),this.success=(n,t)=>this.create({...t,type:"success",message:n}),this.info=(n,t)=>this.create({...t,type:"info",message:n}),this.warning=(n,t)=>this.create({...t,type:"warning",message:n}),this.loading=(n,t)=>this.create({...t,type:"loading",message:n}),this.promise=(n,t)=>{if(!t)return;let r;t.loading!==void 0&&(r=this.create({...t,promise:n,type:"loading",message:t.loading,description:typeof t.description!="function"?t.description:void 0}));const s=Promise.resolve(n instanceof Function?n():n);let i=r!==void 0,a;const o=s.then(async u=>{if(a=["resolve",u],et.isValidElement(u))i=!1,this.create({id:r,type:"default",message:u});else if(yvn(u)&&!u.ok){i=!1;const _=typeof t.error=="function"?await t.error(`HTTP error! status: ${u.status}`):t.error,p=typeof t.description=="function"?await t.description(`HTTP error! status: ${u.status}`):t.description,x=typeof _=="object"&&!et.isValidElement(_)?_:{message:_};this.create({id:r,type:"error",description:p,...x})}else if(u instanceof Error){i=!1;const _=typeof t.error=="function"?await t.error(u):t.error,p=typeof t.description=="function"?await t.description(u):t.description,x=typeof _=="object"&&!et.isValidElement(_)?_:{message:_};this.create({id:r,type:"error",description:p,...x})}else if(t.success!==void 0){i=!1;const _=typeof t.success=="function"?await t.success(u):t.success,p=typeof t.description=="function"?await t.description(u):t.description,x=typeof _=="object"&&!et.isValidElement(_)?_:{message:_};this.create({id:r,type:"success",description:p,...x})}}).catch(async u=>{if(a=["reject",u],t.error!==void 0){i=!1;const h=typeof t.error=="function"?await t.error(u):t.error,_=typeof t.description=="function"?await t.description(u):t.description,m=typeof h=="object"&&!et.isValidElement(h)?h:{message:h};this.create({id:r,type:"error",description:_,...m})}}).finally(()=>{i&&(this.dismiss(r),r=void 0),t.finally==null||t.finally.call(t)}),l=()=>new Promise((u,h)=>o.then(()=>a[0]==="reject"?h(a[1]):u(a[1])).catch(h));return typeof r!="string"&&typeof r!="number"?{unwrap:l}:Object.assign(r,{unwrap:l})},this.custom=(n,t)=>{const r=Pz(t);return this.create({...t,jsx:n(r),id:r,type:void 0}),r},this.getActiveToasts=()=>this.toasts.filter(n=>!this.dismissedToasts.has(n.id)),this.subscribers=[],this.toasts=[],this.dismissedToasts=new Set,this.pendingDismissals=new Map}}const Ei=new vvn,bvn=(e,n)=>Ei.message(e,n),yvn=e=>e&&typeof e=="object"&&"ok"in e&&typeof e.ok=="boolean"&&"status"in e&&typeof e.status=="number",xvn=bvn,wvn=()=>Ei.toasts,kvn=()=>Ei.getActiveToasts(),Svn=Object.assign(xvn,{success:Ei.success,info:Ei.info,warning:Ei.warning,error:Ei.error,custom:Ei.custom,message:Ei.message,promise:Ei.promise,dismiss:Ei.dismiss,loading:Ei.loading},{getHistory:wvn,getToasts:kvn});avn("[data-sonner-toaster][dir=ltr],html[dir=ltr]{--toast-icon-margin-start:-3px;--toast-icon-margin-end:4px;--toast-svg-margin-start:-1px;--toast-svg-margin-end:0px;--toast-button-margin-start:auto;--toast-button-margin-end:0;--toast-close-button-start:0;--toast-close-button-end:unset;--toast-close-button-transform:translate(-35%, -35%)}[data-sonner-toaster][dir=rtl],html[dir=rtl]{--toast-icon-margin-start:4px;--toast-icon-margin-end:-3px;--toast-svg-margin-start:0px;--toast-svg-margin-end:-1px;--toast-button-margin-start:0;--toast-button-margin-end:auto;--toast-close-button-start:unset;--toast-close-button-end:0;--toast-close-button-transform:translate(35%, -35%)}[data-sonner-toaster]{position:fixed;width:var(--width);font-family:ui-sans-serif,system-ui,-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Helvetica Neue,Arial,Noto Sans,sans-serif,Apple Color Emoji,Segoe UI Emoji,Segoe UI Symbol,Noto Color Emoji;--gray1:hsl(0, 0%, 99%);--gray2:hsl(0, 0%, 97.3%);--gray3:hsl(0, 0%, 95.1%);--gray4:hsl(0, 0%, 93%);--gray5:hsl(0, 0%, 90.9%);--gray6:hsl(0, 0%, 88.7%);--gray7:hsl(0, 0%, 85.8%);--gray8:hsl(0, 0%, 78%);--gray9:hsl(0, 0%, 56.1%);--gray10:hsl(0, 0%, 52.3%);--gray11:hsl(0, 0%, 43.5%);--gray12:hsl(0, 0%, 9%);--border-radius:8px;box-sizing:border-box;padding:0;margin:0;list-style:none;outline:0;z-index:999999999;transition:transform .4s ease}@media (hover:none) and (pointer:coarse){[data-sonner-toaster][data-lifted=true]{transform:none}}[data-sonner-toaster][data-x-position=right]{right:var(--offset-right)}[data-sonner-toaster][data-x-position=left]{left:var(--offset-left)}[data-sonner-toaster][data-x-position=center]{left:50%;transform:translateX(-50%)}[data-sonner-toaster][data-y-position=top]{top:var(--offset-top)}[data-sonner-toaster][data-y-position=bottom]{bottom:var(--offset-bottom)}[data-sonner-toast]{--y:translateY(100%);--lift-amount:calc(var(--lift) * var(--gap));z-index:var(--z-index);position:absolute;opacity:0;transform:var(--y);touch-action:none;transition:transform .4s,opacity .4s,height .4s,box-shadow .2s;box-sizing:border-box;outline:0;overflow-wrap:anywhere}[data-sonner-toast][data-styled=true]{padding:16px;background:var(--normal-bg);border:1px solid var(--normal-border);color:var(--normal-text);border-radius:var(--border-radius);box-shadow:0 4px 12px rgba(0,0,0,.1);width:var(--width);font-size:13px;display:flex;align-items:center;gap:6px}[data-sonner-toast]:focus-visible{box-shadow:0 4px 12px rgba(0,0,0,.1),0 0 0 2px rgba(0,0,0,.2)}[data-sonner-toast][data-y-position=top]{top:0;--y:translateY(-100%);--lift:1;--lift-amount:calc(1 * var(--gap))}[data-sonner-toast][data-y-position=bottom]{bottom:0;--y:translateY(100%);--lift:-1;--lift-amount:calc(var(--lift) * var(--gap))}[data-sonner-toast][data-styled=true] [data-description]{font-weight:400;line-height:1.4;color:#3f3f3f}[data-rich-colors=true][data-sonner-toast][data-styled=true] [data-description]{color:inherit}[data-sonner-toaster][data-sonner-theme=dark] [data-description]{color:#e8e8e8}[data-sonner-toast][data-styled=true] [data-title]{font-weight:500;line-height:1.5;color:inherit}[data-sonner-toast][data-styled=true] [data-icon]{display:flex;height:16px;width:16px;position:relative;justify-content:flex-start;align-items:center;flex-shrink:0;margin-left:var(--toast-icon-margin-start);margin-right:var(--toast-icon-margin-end)}[data-sonner-toast][data-promise=true] [data-icon]>svg{opacity:0;transform:scale(.8);transform-origin:center;animation:sonner-fade-in .3s ease forwards}[data-sonner-toast][data-styled=true] [data-icon]>*{flex-shrink:0}[data-sonner-toast][data-styled=true] [data-icon] svg{margin-left:var(--toast-svg-margin-start);margin-right:var(--toast-svg-margin-end)}[data-sonner-toast][data-styled=true] [data-content]{display:flex;flex-direction:column;gap:2px;flex:1;min-width:0}[data-sonner-toast][data-styled=true] [data-button]{border-radius:4px;padding-left:8px;padding-right:8px;height:24px;font-size:12px;color:var(--normal-bg);background:var(--normal-text);margin-left:var(--toast-button-margin-start);margin-right:var(--toast-button-margin-end);border:none;font-weight:500;cursor:pointer;outline:0;display:flex;align-items:center;flex-shrink:0;transition:opacity .4s,box-shadow .2s}[data-sonner-toast][data-styled=true] [data-button]:focus-visible{box-shadow:0 0 0 2px rgba(0,0,0,.4)}[data-sonner-toast][data-styled=true] [data-button]:first-of-type{margin-left:var(--toast-button-margin-start);margin-right:var(--toast-button-margin-end)}[data-sonner-toast][data-styled=true] [data-cancel]{color:var(--normal-text);background:rgba(0,0,0,.08)}[data-sonner-toaster][data-sonner-theme=dark] [data-sonner-toast][data-styled=true] [data-cancel]{background:rgba(255,255,255,.3)}[data-sonner-toast][data-styled=true] [data-close-button]{position:absolute;left:var(--toast-close-button-start);right:var(--toast-close-button-end);top:0;height:20px;width:20px;display:flex;justify-content:center;align-items:center;padding:0;color:var(--normal-text);background:var(--normal-bg);border:1px solid var(--normal-border);transform:var(--toast-close-button-transform);border-radius:50%;cursor:pointer;z-index:1;transition:opacity .1s,background .2s,border-color .2s}[data-sonner-toast][data-styled=true] [data-close-button]:focus-visible{box-shadow:0 4px 12px rgba(0,0,0,.1),0 0 0 2px rgba(0,0,0,.2)}[data-sonner-toast][data-styled=true] [data-disabled=true]{cursor:not-allowed}[data-sonner-toast][data-styled=true]:hover [data-close-button]:hover{background:var(--gray2);border-color:var(--gray5)}[data-sonner-toast][data-swiping=true]::before{content:'';position:absolute;left:-100%;right:-100%;height:100%;z-index:-1}[data-sonner-toast][data-y-position=top][data-swiping=true]::before{bottom:50%;transform:scaleY(3) translateY(50%)}[data-sonner-toast][data-y-position=bottom][data-swiping=true]::before{top:50%;transform:scaleY(3) translateY(-50%)}[data-sonner-toast][data-swiping=false][data-removed=true]::before{content:'';position:absolute;inset:0;transform:scaleY(2)}[data-sonner-toast][data-expanded=true]::after{content:'';position:absolute;left:0;height:calc(var(--gap) + 1px);bottom:100%;width:100%}[data-sonner-toast][data-mounted=true]{--y:translateY(0);opacity:1}[data-sonner-toast][data-expanded=false][data-front=false]{--scale:var(--toasts-before) * 0.05 + 1;--y:translateY(calc(var(--lift-amount) * var(--toasts-before))) scale(calc(-1 * var(--scale)));height:var(--front-toast-height)}[data-sonner-toast]>*{transition:opacity .4s}[data-sonner-toast][data-x-position=right]{right:0}[data-sonner-toast][data-x-position=left]{left:0}[data-sonner-toast][data-expanded=false][data-front=false][data-styled=true]>*{opacity:0}[data-sonner-toast][data-visible=false]{opacity:0;pointer-events:none}[data-sonner-toast][data-mounted=true][data-expanded=true]{--y:translateY(calc(var(--lift) * var(--offset)));height:var(--initial-height)}[data-sonner-toast][data-removed=true][data-front=true][data-swipe-out=false]{--y:translateY(calc(var(--lift) * -100%));opacity:0}[data-sonner-toast][data-removed=true][data-front=false][data-swipe-out=false][data-expanded=true]{--y:translateY(calc(var(--lift) * var(--offset) + var(--lift) * -100%));opacity:0}[data-sonner-toast][data-removed=true][data-front=false][data-swipe-out=false][data-expanded=false]{--y:translateY(40%);opacity:0;transition:transform .5s,opacity .2s}[data-sonner-toast][data-removed=true][data-front=false]::before{height:calc(var(--initial-height) + 20%)}[data-sonner-toast][data-swiping=true]{transform:var(--y) translateY(var(--swipe-amount-y,0)) translateX(var(--swipe-amount-x,0));transition:none}[data-sonner-toast][data-swiped=true]{-webkit-user-select:none;user-select:none}[data-sonner-toast][data-swipe-out=true][data-y-position=bottom],[data-sonner-toast][data-swipe-out=true][data-y-position=top]{animation-duration:.2s;animation-timing-function:ease-out;animation-fill-mode:forwards}[data-sonner-toast][data-swipe-out=true][data-swipe-direction=left]{animation-name:swipe-out-left}[data-sonner-toast][data-swipe-out=true][data-swipe-direction=right]{animation-name:swipe-out-right}[data-sonner-toast][data-swipe-out=true][data-swipe-direction=up]{animation-name:swipe-out-up}[data-sonner-toast][data-swipe-out=true][data-swipe-direction=down]{animation-name:swipe-out-down}@keyframes swipe-out-left{from{transform:var(--y) translateX(var(--swipe-amount-x));opacity:1}to{transform:var(--y) translateX(calc(var(--swipe-amount-x) - 100%));opacity:0}}@keyframes swipe-out-right{from{transform:var(--y) translateX(var(--swipe-amount-x));opacity:1}to{transform:var(--y) translateX(calc(var(--swipe-amount-x) + 100%));opacity:0}}@keyframes swipe-out-up{from{transform:var(--y) translateY(var(--swipe-amount-y));opacity:1}to{transform:var(--y) translateY(calc(var(--swipe-amount-y) - 100%));opacity:0}}@keyframes swipe-out-down{from{transform:var(--y) translateY(var(--swipe-amount-y));opacity:1}to{transform:var(--y) translateY(calc(var(--swipe-amount-y) + 100%));opacity:0}}@media (max-width:600px){[data-sonner-toaster]{position:fixed;right:var(--mobile-offset-right);left:var(--mobile-offset-left);width:100%}[data-sonner-toaster][dir=rtl]{left:calc(var(--mobile-offset-left) * -1)}[data-sonner-toaster] [data-sonner-toast]{left:0;right:0;width:calc(100% - var(--mobile-offset-left) * 2)}[data-sonner-toaster][data-x-position=left]{left:var(--mobile-offset-left)}[data-sonner-toaster][data-y-position=bottom]{bottom:var(--mobile-offset-bottom)}[data-sonner-toaster][data-y-position=top]{top:var(--mobile-offset-top)}[data-sonner-toaster][data-x-position=center]{left:var(--mobile-offset-left);right:var(--mobile-offset-right);transform:none}}[data-sonner-toaster][data-sonner-theme=light]{--normal-bg:#fff;--normal-border:var(--gray4);--normal-text:var(--gray12);--success-bg:hsl(143, 85%, 96%);--success-border:hsl(145, 92%, 87%);--success-text:hsl(140, 100%, 27%);--info-bg:hsl(208, 100%, 97%);--info-border:hsl(221, 91%, 93%);--info-text:hsl(210, 92%, 45%);--warning-bg:hsl(49, 100%, 97%);--warning-border:hsl(49, 91%, 84%);--warning-text:hsl(31, 92%, 45%);--error-bg:hsl(359, 100%, 97%);--error-border:hsl(359, 100%, 94%);--error-text:hsl(360, 100%, 45%)}[data-sonner-toaster][data-sonner-theme=light] [data-sonner-toast][data-invert=true]{--normal-bg:#000;--normal-border:hsl(0, 0%, 20%);--normal-text:var(--gray1)}[data-sonner-toaster][data-sonner-theme=dark] [data-sonner-toast][data-invert=true]{--normal-bg:#fff;--normal-border:var(--gray3);--normal-text:var(--gray12)}[data-sonner-toaster][data-sonner-theme=dark]{--normal-bg:#000;--normal-bg-hover:hsl(0, 0%, 12%);--normal-border:hsl(0, 0%, 20%);--normal-border-hover:hsl(0, 0%, 25%);--normal-text:var(--gray1);--success-bg:hsl(150, 100%, 6%);--success-border:hsl(147, 100%, 12%);--success-text:hsl(150, 86%, 65%);--info-bg:hsl(215, 100%, 6%);--info-border:hsl(223, 43%, 17%);--info-text:hsl(216, 87%, 65%);--warning-bg:hsl(64, 100%, 6%);--warning-border:hsl(60, 100%, 9%);--warning-text:hsl(46, 87%, 65%);--error-bg:hsl(358, 76%, 10%);--error-border:hsl(357, 89%, 16%);--error-text:hsl(358, 100%, 81%)}[data-sonner-toaster][data-sonner-theme=dark] [data-sonner-toast] [data-close-button]{background:var(--normal-bg);border-color:var(--normal-border);color:var(--normal-text)}[data-sonner-toaster][data-sonner-theme=dark] [data-sonner-toast] [data-close-button]:hover{background:var(--normal-bg-hover);border-color:var(--normal-border-hover)}[data-rich-colors=true][data-sonner-toast][data-type=success]{background:var(--success-bg);border-color:var(--success-border);color:var(--success-text)}[data-rich-colors=true][data-sonner-toast][data-type=success] [data-close-button]{background:var(--success-bg);border-color:var(--success-border);color:var(--success-text)}[data-rich-colors=true][data-sonner-toast][data-type=info]{background:var(--info-bg);border-color:var(--info-border);color:var(--info-text)}[data-rich-colors=true][data-sonner-toast][data-type=info] [data-close-button]{background:var(--info-bg);border-color:var(--info-border);color:var(--info-text)}[data-rich-colors=true][data-sonner-toast][data-type=warning]{background:var(--warning-bg);border-color:var(--warning-border);color:var(--warning-text)}[data-rich-colors=true][data-sonner-toast][data-type=warning] [data-close-button]{background:var(--warning-bg);border-color:var(--warning-border);color:var(--warning-text)}[data-rich-colors=true][data-sonner-toast][data-type=error]{background:var(--error-bg);border-color:var(--error-border);color:var(--error-text)}[data-rich-colors=true][data-sonner-toast][data-type=error] [data-close-button]{background:var(--error-bg);border-color:var(--error-border);color:var(--error-text)}.sonner-loading-wrapper{--size:16px;height:var(--size);width:var(--size);position:absolute;inset:0;z-index:10}.sonner-loading-wrapper[data-visible=false]{transform-origin:center;animation:sonner-fade-out .2s ease forwards}.sonner-spinner{position:relative;top:50%;left:50%;height:var(--size);width:var(--size)}.sonner-loading-bar{animation:sonner-spin 1.2s linear infinite;background:var(--gray11);border-radius:6px;height:8%;left:-10%;position:absolute;top:-3.9%;width:24%}.sonner-loading-bar:first-child{animation-delay:-1.2s;transform:rotate(.0001deg) translate(146%)}.sonner-loading-bar:nth-child(2){animation-delay:-1.1s;transform:rotate(30deg) translate(146%)}.sonner-loading-bar:nth-child(3){animation-delay:-1s;transform:rotate(60deg) translate(146%)}.sonner-loading-bar:nth-child(4){animation-delay:-.9s;transform:rotate(90deg) translate(146%)}.sonner-loading-bar:nth-child(5){animation-delay:-.8s;transform:rotate(120deg) translate(146%)}.sonner-loading-bar:nth-child(6){animation-delay:-.7s;transform:rotate(150deg) translate(146%)}.sonner-loading-bar:nth-child(7){animation-delay:-.6s;transform:rotate(180deg) translate(146%)}.sonner-loading-bar:nth-child(8){animation-delay:-.5s;transform:rotate(210deg) translate(146%)}.sonner-loading-bar:nth-child(9){animation-delay:-.4s;transform:rotate(240deg) translate(146%)}.sonner-loading-bar:nth-child(10){animation-delay:-.3s;transform:rotate(270deg) translate(146%)}.sonner-loading-bar:nth-child(11){animation-delay:-.2s;transform:rotate(300deg) translate(146%)}.sonner-loading-bar:nth-child(12){animation-delay:-.1s;transform:rotate(330deg) translate(146%)}@keyframes sonner-fade-in{0%{opacity:0;transform:scale(.8)}100%{opacity:1;transform:scale(1)}}@keyframes sonner-fade-out{0%{opacity:1;transform:scale(1)}100%{opacity:0;transform:scale(.8)}}@keyframes sonner-spin{0%{opacity:1}100%{opacity:.15}}@media (prefers-reduced-motion){.sonner-loading-bar,[data-sonner-toast],[data-sonner-toast]>*{transition:none!important;animation:none!important}}.sonner-loader{position:absolute;top:50%;left:50%;transform:translate(-50%,-50%);transform-origin:center;transition:opacity .2s,transform .2s}.sonner-loader[data-visible=false]{opacity:0;transform:scale(.8) translate(-50%,-50%)}");function Xg(e){return e.label!==void 0}const Cvn=3,Evn="24px",Nvn="16px",Fz=4e3,zvn=356,jvn=14,Tvn=45,Avn=200;function zo(...e){return e.filter(Boolean).join(" ")}function Rvn(e){const[n,t]=e.split("-"),r=[];return n&&r.push(n),t&&r.push(t),r}const Mvn=e=>{var n,t,r,s,i,a,o,l,u;const{invert:h,toast:_,unstyled:p,interacting:m,setHeights:x,visibleToasts:k,heights:v,index:b,toasts:w,expanded:y,removeToast:C,defaultRichColors:E,closeButton:N,style:A,cancelButtonStyle:j,actionButtonStyle:M,className:L="",descriptionClassName:I="",duration:B,position:q,gap:U,expandByDefault:W,classNames:H,icons:Y,closeButtonAriaLabel:te="Close toast"}=e,[$,D]=et.useState(null),[F,G]=et.useState(null),[V,ee]=et.useState(!1),[ce,ae]=et.useState(!1),[re,X]=et.useState(!1),[oe,le]=et.useState(!1),[_e,pe]=et.useState(!1),[Ee,Ie]=et.useState(0),[ze,He]=et.useState(0),Oe=et.useRef(_.duration||B||Fz),Xe=et.useRef(null),_t=et.useRef(null),Vt=b===0,$t=b+1<=k,jt=_.type,mt=jt??"default",we=_.dismissible!==!1,ct=_.className||"",ye=_.descriptionClassName||"",je=et.useMemo(()=>v.findIndex(St=>St.toastId===_.id)||0,[v,_.id]),qe=et.useMemo(()=>{var St;return(St=_.closeButton)!=null?St:N},[_.closeButton,N]),at=et.useMemo(()=>_.duration||B||Fz,[_.duration,B]),nt=et.useRef(0),Kt=et.useRef(0),Qe=et.useRef(0),kt=et.useRef(null),[Tt,Yt]=q.split("-"),tn=et.useMemo(()=>v.reduce((St,cn,jn)=>jn>=je?St:St+cn.height,0),[v,je]),rr=pvn(),rn=et.useMemo(()=>{var St;return(St=e.swipeDirections)!=null?St:Rvn(q)},[e.swipeDirections,q]),ln=_.invert||h,An=jt==="loading";Kt.current=et.useMemo(()=>je*U+tn,[je,tn]),et.useEffect(()=>{Oe.current=at},[at]),et.useEffect(()=>{ee(!0)},[]),et.useEffect(()=>{const St=_t.current;if(St){const cn=St.getBoundingClientRect().height;return He(cn),x(jn=>[{toastId:_.id,height:cn,position:_.position},...jn]),()=>x(jn=>jn.filter(fn=>fn.toastId!==_.id))}},[x,_.id]),et.useLayoutEffect(()=>{if(!V)return;const St=_t.current,cn=St.style.height;St.style.height="auto";const jn=St.getBoundingClientRect().height;St.style.height=cn,He(jn),x(fn=>fn.find(mn=>mn.toastId===_.id)?fn.map(mn=>mn.toastId===_.id?{...mn,height:jn}:mn):[{toastId:_.id,height:jn,position:_.position},...fn])},[V,_.title,_.description,x,_.id,_.jsx,_.action,_.cancel]);const Un=et.useCallback(()=>{ae(!0),Ie(Kt.current),x(St=>St.filter(cn=>cn.toastId!==_.id)),setTimeout(()=>{C(_)},Avn)},[_,C,x,Kt]);et.useEffect(()=>{if(_.promise&&jt==="loading"||_.duration===1/0||_.type==="loading")return;let St;return y||m||rr?(()=>{if(Qe.current{Oe.current!==1/0&&(nt.current=new Date().getTime(),St=setTimeout(()=>{_.onAutoClose==null||_.onAutoClose.call(_,_),Un()},Oe.current))})(),()=>clearTimeout(St)},[y,m,_,jt,rr,Un]),et.useEffect(()=>{_.delete&&(Un(),_.onDismiss==null||_.onDismiss.call(_,_))},[Un,_.delete]);function Yn(){var St;if(Y!=null&&Y.loading){var cn;return et.createElement("div",{className:zo(H==null?void 0:H.loader,_==null||(cn=_.classNames)==null?void 0:cn.loader,"sonner-loader"),"data-visible":jt==="loading"},Y.loading)}return et.createElement(cvn,{className:zo(H==null?void 0:H.loader,_==null||(St=_.classNames)==null?void 0:St.loader),visible:jt==="loading"})}const fr=_.icon||(Y==null?void 0:Y[jt])||ovn(jt);var Yr,zr;return et.createElement("li",{tabIndex:0,ref:_t,className:zo(L,ct,H==null?void 0:H.toast,_==null||(n=_.classNames)==null?void 0:n.toast,H==null?void 0:H[mt],_==null||(t=_.classNames)==null?void 0:t[mt]),"data-sonner-toast":"","data-rich-colors":(Yr=_.richColors)!=null?Yr:E,"data-styled":!(_.jsx||_.unstyled||p),"data-mounted":V,"data-promise":!!_.promise,"data-swiped":_e,"data-removed":ce,"data-visible":$t,"data-y-position":Tt,"data-x-position":Yt,"data-index":b,"data-front":Vt,"data-swiping":re,"data-dismissible":we,"data-type":jt,"data-invert":ln,"data-swipe-out":oe,"data-swipe-direction":F,"data-expanded":!!(y||W&&V),"data-testid":_.testId,style:{"--index":b,"--toasts-before":b,"--z-index":w.length-b,"--offset":`${ce?Ee:Kt.current}px`,"--initial-height":W?"auto":`${ze}px`,...A,..._.style},onDragEnd:()=>{X(!1),D(null),kt.current=null},onPointerDown:St=>{St.button!==2&&(An||!we||(Xe.current=new Date,Ie(Kt.current),St.target.setPointerCapture(St.pointerId),St.target.tagName!=="BUTTON"&&(X(!0),kt.current={x:St.clientX,y:St.clientY})))},onPointerUp:()=>{var St,cn,jn;if(oe||!we)return;kt.current=null;const fn=Number(((St=_t.current)==null?void 0:St.style.getPropertyValue("--swipe-amount-x").replace("px",""))||0),Dn=Number(((cn=_t.current)==null?void 0:cn.style.getPropertyValue("--swipe-amount-y").replace("px",""))||0),mn=new Date().getTime()-((jn=Xe.current)==null?void 0:jn.getTime()),Gn=$==="x"?fn:Dn,Rn=Math.abs(Gn)/mn;if(($==="x"?rn.includes(fn>0?"right":"left"):rn.includes(Dn>0?"bottom":"top"))&&(Math.abs(Gn)>=Tvn||Rn>.11)){Ie(Kt.current),_.onDismiss==null||_.onDismiss.call(_,_),G($==="x"?fn>0?"right":"left":Dn>0?"down":"up"),Un(),le(!0);return}else{var Dt,Ue;(Dt=_t.current)==null||Dt.style.setProperty("--swipe-amount-x","0px"),(Ue=_t.current)==null||Ue.style.setProperty("--swipe-amount-y","0px")}pe(!1),X(!1),D(null)},onPointerMove:St=>{var cn,jn,fn;if(!kt.current||!we||((cn=window.getSelection())==null?void 0:cn.toString().length)>0)return;const mn=St.clientY-kt.current.y,Gn=St.clientX-kt.current.x;!$&&(Math.abs(Gn)>1||Math.abs(mn)>1)&&D(Math.abs(Gn)>Math.abs(mn)?"x":"y");let Rn={x:0,y:0};const yt=Dt=>1/(1.5+Math.abs(Dt)/20);if($==="y"){if(rn.includes("top")||rn.includes("bottom"))if(rn.includes("top")&&mn<0||rn.includes("bottom")&&mn>0)Rn.y=mn;else{const Dt=mn*yt(mn);Rn.y=Math.abs(Dt)0)Rn.x=Gn;else{const Dt=Gn*yt(Gn);Rn.x=Math.abs(Dt)0||Math.abs(Rn.y)>0)&&pe(!0),(jn=_t.current)==null||jn.style.setProperty("--swipe-amount-x",`${Rn.x}px`),(fn=_t.current)==null||fn.style.setProperty("--swipe-amount-y",`${Rn.y}px`)}},qe&&!_.jsx&&jt!=="loading"?et.createElement("button",{"aria-label":te,"data-disabled":An,"data-close-button":!0,onClick:An||!we?()=>{}:()=>{Un(),_.onDismiss==null||_.onDismiss.call(_,_)},className:zo(H==null?void 0:H.closeButton,_==null||(r=_.classNames)==null?void 0:r.closeButton)},(zr=Y==null?void 0:Y.close)!=null?zr:hvn):null,(jt||_.icon||_.promise)&&_.icon!==null&&((Y==null?void 0:Y[jt])!==null||_.icon)?et.createElement("div",{"data-icon":"",className:zo(H==null?void 0:H.icon,_==null||(s=_.classNames)==null?void 0:s.icon)},jt==="loading"?_.icon||Yn():_.promise?Yn():null,jt!=="loading"?fr:null):null,et.createElement("div",{"data-content":"",className:zo(H==null?void 0:H.content,_==null||(i=_.classNames)==null?void 0:i.content)},et.createElement("div",{"data-title":"",className:zo(H==null?void 0:H.title,_==null||(a=_.classNames)==null?void 0:a.title)},_.jsx?_.jsx:typeof _.title=="function"?_.title():_.title),_.description?et.createElement("div",{"data-description":"",className:zo(I,ye,H==null?void 0:H.description,_==null||(o=_.classNames)==null?void 0:o.description)},typeof _.description=="function"?_.description():_.description):null),et.isValidElement(_.cancel)?_.cancel:_.cancel&&Xg(_.cancel)?et.createElement("button",{"data-button":!0,"data-cancel":!0,style:_.cancelButtonStyle||j,onClick:St=>{Xg(_.cancel)&&we&&(_.cancel.onClick==null||_.cancel.onClick.call(_.cancel,St),Un())},className:zo(H==null?void 0:H.cancelButton,_==null||(l=_.classNames)==null?void 0:l.cancelButton)},_.cancel.label):null,et.isValidElement(_.action)?_.action:_.action&&Xg(_.action)?et.createElement("button",{"data-button":!0,"data-action":!0,style:_.actionButtonStyle||M,onClick:St=>{Xg(_.action)&&(_.action.onClick==null||_.action.onClick.call(_.action,St),!St.defaultPrevented&&Un())},className:zo(H==null?void 0:H.actionButton,_==null||(u=_.classNames)==null?void 0:u.actionButton)},_.action.label):null)};function Hz(){if(typeof window>"u"||typeof document>"u")return"ltr";const e=document.documentElement.getAttribute("dir");return e==="auto"||!e?window.getComputedStyle(document.documentElement).direction:e}function Ovn(e,n){const t={};return[e,n].forEach((r,s)=>{const i=s===1,a=i?"--mobile-offset":"--offset",o=i?Nvn:Evn;function l(u){["top","right","bottom","left"].forEach(h=>{t[`${a}-${h}`]=typeof u=="number"?`${u}px`:u})}typeof r=="number"||typeof r=="string"?l(r):typeof r=="object"?["top","right","bottom","left"].forEach(u=>{r[u]===void 0?t[`${a}-${u}`]=o:t[`${a}-${u}`]=typeof r[u]=="number"?`${r[u]}px`:r[u]}):l(o)}),t}const Dvn=et.forwardRef(function(n,t){const{id:r,invert:s,position:i="bottom-right",hotkey:a=["altKey","KeyT"],expand:o,closeButton:l,className:u,offset:h,mobileOffset:_,theme:p="light",richColors:m,duration:x,style:k,visibleToasts:v=Cvn,toastOptions:b,dir:w=Hz(),gap:y=jvn,icons:C,customAriaLabel:E,containerAriaLabel:N="Notifications"}=n,[A,j]=et.useState([]),M=et.useMemo(()=>r?A.filter(ee=>ee.toasterId===r):A.filter(ee=>!ee.toasterId),[A,r]),L=et.useMemo(()=>Array.from(new Set([i].concat(M.filter(ee=>ee.position).map(ee=>ee.position)))),[M,i]),[I,B]=et.useState([]),[q,U]=et.useState(!1),[W,H]=et.useState(!1),[Y,te]=et.useState(p!=="system"?p:typeof window<"u"&&window.matchMedia&&window.matchMedia("(prefers-color-scheme: dark)").matches?"dark":"light"),$=et.useRef(null),D=a.join("+").replace(/Key/g,"").replace(/Digit/g,""),F=et.useRef(null),G=et.useRef(!1),V=et.useCallback(ee=>{j(ce=>{var ae;return(ae=ce.find(re=>re.id===ee.id))!=null&&ae.delete||Ei.dismiss(ee.id),ce.filter(({id:re})=>re!==ee.id)})},[]);return et.useEffect(()=>Ei.subscribe(ee=>{if(ee.dismiss){requestAnimationFrame(()=>{j(ce=>ce.map(ae=>ae.id===ee.id?{...ae,delete:!0}:ae))});return}setTimeout(()=>{ivn.flushSync(()=>{j(ce=>{const ae=ce.findIndex(re=>re.id===ee.id);return ae!==-1?[...ce.slice(0,ae),{...ce[ae],...ee},...ce.slice(ae+1)]:[ee,...ce]})})})}),[]),et.useEffect(()=>{if(p!=="system"){te(p);return}if(p==="system"&&(window.matchMedia&&window.matchMedia("(prefers-color-scheme: dark)").matches?te("dark"):te("light")),typeof window>"u")return;const ee=window.matchMedia("(prefers-color-scheme: dark)");try{ee.addEventListener("change",({matches:ce})=>{te(ce?"dark":"light")})}catch{ee.addListener(({matches:ae})=>{try{te(ae?"dark":"light")}catch(re){console.error(re)}})}},[p]),et.useEffect(()=>{A.length<=1&&U(!1)},[A]),et.useEffect(()=>{const ee=ce=>{var ae;if(a.length>0&&a.every(oe=>ce[oe]||ce.code===oe)){var X;U(!0),(X=$.current)==null||X.focus()}ce.code==="Escape"&&(document.activeElement===$.current||(ae=$.current)!=null&&ae.contains(document.activeElement))&&U(!1)};return document.addEventListener("keydown",ee),()=>document.removeEventListener("keydown",ee)},[a]),et.useEffect(()=>{if($.current)return()=>{F.current&&(F.current.focus({preventScroll:!0}),F.current=null,G.current=!1)}},[$.current]),et.createElement("section",{ref:t,"aria-label":E??`${N} ${D}`,tabIndex:-1,"aria-live":"polite","aria-relevant":"additions text","aria-atomic":"false",suppressHydrationWarning:!0,"data-react-aria-top-layer":!0},L.map((ee,ce)=>{var ae;const[re,X]=ee.split("-");return M.length?et.createElement("ol",{key:ee,dir:w==="auto"?Hz():w,tabIndex:-1,ref:$,className:u,"data-sonner-toaster":!0,"data-sonner-theme":Y,"data-y-position":re,"data-x-position":X,style:{"--front-toast-height":`${((ae=I[0])==null?void 0:ae.height)||0}px`,"--width":`${zvn}px`,"--gap":`${y}px`,...k,...Ovn(h,_)},onBlur:oe=>{G.current&&!oe.currentTarget.contains(oe.relatedTarget)&&(G.current=!1,F.current&&(F.current.focus({preventScroll:!0}),F.current=null))},onFocus:oe=>{oe.target instanceof HTMLElement&&oe.target.dataset.dismissible==="false"||G.current||(G.current=!0,F.current=oe.relatedTarget)},onMouseEnter:()=>U(!0),onMouseMove:()=>U(!0),onMouseLeave:()=>{W||U(!1)},onDragEnd:()=>U(!1),onPointerDown:oe=>{oe.target instanceof HTMLElement&&oe.target.dataset.dismissible==="false"||H(!0)},onPointerUp:()=>H(!1)},M.filter(oe=>!oe.position&&ce===0||oe.position===ee).map((oe,le)=>{var _e,pe;return et.createElement(Mvn,{key:oe.id,icons:C,index:le,toast:oe,defaultRichColors:m,duration:(_e=b==null?void 0:b.duration)!=null?_e:x,className:b==null?void 0:b.className,descriptionClassName:b==null?void 0:b.descriptionClassName,invert:s,visibleToasts:v,closeButton:(pe=b==null?void 0:b.closeButton)!=null?pe:l,interacting:W,position:ee,style:b==null?void 0:b.style,unstyled:b==null?void 0:b.unstyled,classNames:b==null?void 0:b.classNames,cancelButtonStyle:b==null?void 0:b.cancelButtonStyle,actionButtonStyle:b==null?void 0:b.actionButtonStyle,closeButtonAriaLabel:b==null?void 0:b.closeButtonAriaLabel,removeToast:V,toasts:M.filter(Ee=>Ee.position==oe.position),heights:I.filter(Ee=>Ee.position==oe.position),setHeights:B,expandByDefault:o,gap:y,expanded:q,swipeDirections:n.swipeDirections})})):null}))});function Lvn(e){const[n]=VL();return f.jsx(Dvn,{theme:n,...e})}function Bn(e,n,t){Svn[n](e,{duration:n==="warning"||n==="error"?1/0:5e3,position:"top-center",closeButton:!0,...t})}function Yk({content:e,children:n,className:t}){const r=T.useRef(null),s=T.useRef(null);function i(){const o=r.current,l=s.current;if(!o||!l)return;l.matches(":popover-open")||l.showPopover();const u=o.getBoundingClientRect(),h=l.getBoundingClientRect(),_=Math.max(8,Math.min(u.left+u.width/2-h.width/2,window.innerWidth-h.width-8));l.style.left=`${_}px`,l.style.top=`${Math.max(8,u.top-h.height-6)}px`}function a(){var o,l;(o=r.current)!=null&&o.matches(":hover, :focus")||(l=s.current)==null||l.hidePopover()}return T.useEffect(()=>{const o=()=>{var l;return(l=s.current)==null?void 0:l.hidePopover()};return window.addEventListener("scroll",o,!0),window.addEventListener("resize",o),()=>{window.removeEventListener("scroll",o,!0),window.removeEventListener("resize",o)}},[]),f.jsxs("span",{ref:r,className:vs("group relative inline-flex cursor-help rounded-full outline-none focus-visible:outline-2 focus-visible:outline-text focus-visible:outline-offset-2",t),tabIndex:0,role:"img","aria-label":e,onMouseEnter:i,onMouseLeave:a,onFocus:i,onBlur:a,onKeyDown:o=>{var l;o.key==="Escape"&&((l=s.current)!=null&&l.matches(":popover-open"))&&(o.preventDefault(),o.stopPropagation(),s.current.hidePopover())},children:[n,f.jsx("span",{ref:s,popover:"manual",role:"tooltip",className:"pointer-events-none fixed inset-auto m-0 w-max max-w-64 whitespace-normal rounded-sm border-0 bg-text px-2 py-1.5 font-sans text-sm font-normal leading-snug text-background shadow-control-subtle",children:e})]})}const Ivn='button:not([disabled]), input:not([disabled]), textarea:not([disabled]), [tabindex]:not([tabindex="-1"])';function kb(e,n,t="[data-initial-focus]"){const r=T.useRef(n);r.current=n,T.useEffect(()=>{const s=e.current;if(!s)return;const i=document.activeElement instanceof HTMLElement?document.activeElement:null,a=()=>[...s.querySelectorAll(Ivn)];(s.querySelector(t)??a()[0]??s).focus();const o=l=>{if(l.key==="Escape"){if(s.querySelector(":popover-open"))return;l.preventDefault(),l.stopPropagation(),r.current();return}if(l.key!=="Tab")return;const u=a(),h=u[0],_=u.at(-1);!h||!_?(l.preventDefault(),s.focus()):l.shiftKey&&document.activeElement===h?(l.preventDefault(),_.focus()):!l.shiftKey&&document.activeElement===_&&(l.preventDefault(),h.focus())};return document.addEventListener("keydown",o,!0),()=>{document.removeEventListener("keydown",o,!0),i==null||i.focus()}},[e,t])}function uI({host:e,preview:n,currentClientAttached:t,stopping:r,onClose:s,onConfirm:i}){const a=T.useRef(null),o=Math.max(0,n.attachmentCount-(t?1:0)),l=[];return n.activeTurnCount>0&&l.push(n.activeTurnCount===1?T5t():Y5t({count:Jt(n.activeTurnCount)})),n.pendingPermissionCount>0&&l.push(n.pendingPermissionCount===1?n5t():p3t({count:Jt(n.pendingPermissionCount)})),o>0&&l.push(o===1?m5t():I5t({count:Jt(o)})),n.queuedMessageCount>0&&l.push(n.queuedMessageCount===1?k5t():U5t({count:Jt(n.queuedMessageCount)})),n.activeRunCount>0&&l.push(n.activeRunCount===1?c5t():L3t({count:Jt(n.activeRunCount)})),kb(a,s),Oa.createPortal(f.jsx("div",{className:"fixed inset-0 z-200 flex items-center justify-center bg-modal-backdrop p-5",onClick:u=>{!r&&u.target===u.currentTarget&&s()},children:f.jsxs("div",{ref:a,className:"w-120 max-w-full rounded-xl border border-border bg-background p-6 shadow-modal",role:"dialog","aria-modal":"true","aria-labelledby":"remote-stop-dialog-title","aria-describedby":l.length>0?"remote-stop-dialog-impact":void 0,tabIndex:-1,children:[f.jsx("h2",{id:"remote-stop-dialog-title",className:"m-0 text-xl font-medium text-text",children:j3t({host:Ne(e)})}),l.length>0&&f.jsxs("div",{id:"remote-stop-dialog-impact",className:"mt-4 text-sm text-text",children:[f.jsx("p",{className:"m-0 font-medium",children:Q3t()}),f.jsx("ul",{className:"mt-2 mb-0 space-y-1 ps-5",children:l.map(u=>f.jsx("li",{children:u},u))})]}),f.jsxs("div",{className:"mt-6 flex justify-end gap-2.5",children:[f.jsx(Me,{disabled:r,onClick:s,children:P_()}),f.jsx(Me,{variant:"danger",disabled:r,onClick:i,children:r?skt():w3t()})]})]})}),document.body)}/** * @license lucide-react v1.23.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. - */const cI=(...e)=>e.filter((n,t,r)=>!!n&&n.trim()!==""&&r.indexOf(n)===t).join(" ").trim();/** + */const _I=(...e)=>e.filter((n,t,r)=>!!n&&n.trim()!==""&&r.indexOf(n)===t).join(" ").trim();/** * @license lucide-react v1.23.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. - */const evn=e=>e.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase();/** + */const $vn=e=>e.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase();/** * @license lucide-react v1.23.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. - */const tvn=e=>e.replace(/^([A-Z])|[\s-_]+(\w)/g,(n,t,r)=>r?r.toUpperCase():t.toLowerCase());/** + */const Bvn=e=>e.replace(/^([A-Z])|[\s-_]+(\w)/g,(n,t,r)=>r?r.toUpperCase():t.toLowerCase());/** * @license lucide-react v1.23.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. - */const qz=e=>{const n=tvn(e);return n.charAt(0).toUpperCase()+n.slice(1)};/** + */const qz=e=>{const n=Bvn(e);return n.charAt(0).toUpperCase()+n.slice(1)};/** * @license lucide-react v1.23.0 - ISC * * This source code is licensed under the ISC license. @@ -122,450 +122,450 @@ ${e==null?void 0:e.path} * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. - */const nvn=e=>{for(const n in e)if(n.startsWith("aria-")||n==="role"||n==="title")return!0;return!1},rvn=A.createContext({}),svn=()=>A.useContext(rvn),ivn=A.forwardRef(({color:e,size:n,strokeWidth:t,absoluteStrokeWidth:r,className:s="",children:i,iconNode:a,...o},l)=>{const{size:u=24,strokeWidth:h=2,absoluteStrokeWidth:_=!1,color:p="currentColor",className:m=""}=svn()??{},x=r??_?Number(t??h)*24/Number(n??u):t??h;return A.createElement("svg",{ref:l,...Z2,width:n??u??Z2.width,height:n??u??Z2.height,stroke:e??p,strokeWidth:x,className:cI("lucide",m,s),...!i&&!nvn(o)&&{"aria-hidden":"true"},...o},[...a.map(([k,v])=>A.createElement(k,v)),...Array.isArray(i)?i:[i]])});/** + */const Pvn=e=>{for(const n in e)if(n.startsWith("aria-")||n==="role"||n==="title")return!0;return!1},Fvn=T.createContext({}),Hvn=()=>T.useContext(Fvn),qvn=T.forwardRef(({color:e,size:n,strokeWidth:t,absoluteStrokeWidth:r,className:s="",children:i,iconNode:a,...o},l)=>{const{size:u=24,strokeWidth:h=2,absoluteStrokeWidth:_=!1,color:p="currentColor",className:m=""}=Hvn()??{},x=r??_?Number(t??h)*24/Number(n??u):t??h;return T.createElement("svg",{ref:l,...Z2,width:n??u??Z2.width,height:n??u??Z2.height,stroke:e??p,strokeWidth:x,className:_I("lucide",m,s),...!i&&!Pvn(o)&&{"aria-hidden":"true"},...o},[...a.map(([k,v])=>T.createElement(k,v)),...Array.isArray(i)?i:[i]])});/** * @license lucide-react v1.23.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. - */const ut=(e,n)=>{const t=A.forwardRef(({className:r,...s},i)=>A.createElement(ivn,{ref:i,iconNode:n,className:cI(`lucide-${evn(qz(e))}`,`lucide-${e}`,r),...s}));return t.displayName=qz(e),t};/** + */const ut=(e,n)=>{const t=T.forwardRef(({className:r,...s},i)=>T.createElement(qvn,{ref:i,iconNode:n,className:_I(`lucide-${$vn(qz(e))}`,`lucide-${e}`,r),...s}));return t.displayName=qz(e),t};/** * @license lucide-react v1.23.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. - */const avn=[["path",{d:"M12 5v14",key:"s699le"}],["path",{d:"m19 12-7 7-7-7",key:"1idqje"}]],ovn=ut("arrow-down",avn);/** + */const Uvn=[["path",{d:"M12 5v14",key:"s699le"}],["path",{d:"m19 12-7 7-7-7",key:"1idqje"}]],Gvn=ut("arrow-down",Uvn);/** * @license lucide-react v1.23.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. - */const lvn=[["path",{d:"m12 19-7-7 7-7",key:"1l729n"}],["path",{d:"M19 12H5",key:"x3x0zl"}]],b0=ut("arrow-left",lvn);/** + */const Vvn=[["path",{d:"m12 19-7-7 7-7",key:"1l729n"}],["path",{d:"M19 12H5",key:"x3x0zl"}]],b0=ut("arrow-left",Vvn);/** * @license lucide-react v1.23.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. - */const cvn=[["path",{d:"M5 12h14",key:"1ays0h"}],["path",{d:"m12 5 7 7-7 7",key:"xquz4c"}]],B1=ut("arrow-right",cvn);/** + */const Kvn=[["path",{d:"M5 12h14",key:"1ays0h"}],["path",{d:"m12 5 7 7-7 7",key:"xquz4c"}]],B1=ut("arrow-right",Kvn);/** * @license lucide-react v1.23.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. - */const uvn=[["path",{d:"M7 7h10v10",key:"1tivn9"}],["path",{d:"M7 17 17 7",key:"1vkiza"}]],_vn=ut("arrow-up-right",uvn);/** + */const Wvn=[["path",{d:"M7 7h10v10",key:"1tivn9"}],["path",{d:"M7 17 17 7",key:"1vkiza"}]],Qvn=ut("arrow-up-right",Wvn);/** * @license lucide-react v1.23.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. - */const fvn=[["path",{d:"M10 22V7a1 1 0 0 0-1-1H4a2 2 0 0 0-2 2v12a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2v-5a1 1 0 0 0-1-1H2",key:"1ah6g2"}],["rect",{x:"14",y:"2",width:"8",height:"8",rx:"1",key:"88lufb"}]],uI=ut("blocks",fvn);/** + */const Xvn=[["path",{d:"M10 22V7a1 1 0 0 0-1-1H4a2 2 0 0 0-2 2v12a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2v-5a1 1 0 0 0-1-1H2",key:"1ah6g2"}],["rect",{x:"14",y:"2",width:"8",height:"8",rx:"1",key:"88lufb"}]],fI=ut("blocks",Xvn);/** * @license lucide-react v1.23.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. - */const dvn=[["path",{d:"M12 7v14",key:"1akyts"}],["path",{d:"M3 18a1 1 0 0 1-1-1V4a1 1 0 0 1 1-1h5a4 4 0 0 1 4 4 4 4 0 0 1 4-4h5a1 1 0 0 1 1 1v13a1 1 0 0 1-1 1h-6a3 3 0 0 0-3 3 3 3 0 0 0-3-3z",key:"ruj8y"}]],_I=ut("book-open",dvn);/** + */const Yvn=[["path",{d:"M12 7v14",key:"1akyts"}],["path",{d:"M3 18a1 1 0 0 1-1-1V4a1 1 0 0 1 1-1h5a4 4 0 0 1 4 4 4 4 0 0 1 4-4h5a1 1 0 0 1 1 1v13a1 1 0 0 1-1 1h-6a3 3 0 0 0-3 3 3 3 0 0 0-3-3z",key:"ruj8y"}]],dI=ut("book-open",Yvn);/** * @license lucide-react v1.23.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. - */const hvn=[["path",{d:"M8 2v4",key:"1cmpym"}],["path",{d:"M16 2v4",key:"4m81vk"}],["rect",{width:"18",height:"18",x:"3",y:"4",rx:"2",key:"1hopcy"}],["path",{d:"M3 10h18",key:"8toen8"}],["path",{d:"M8 14h.01",key:"6423bh"}],["path",{d:"M12 14h.01",key:"1etili"}],["path",{d:"M16 14h.01",key:"1gbofw"}],["path",{d:"M8 18h.01",key:"lrp35t"}],["path",{d:"M12 18h.01",key:"mhygvu"}],["path",{d:"M16 18h.01",key:"kzsmim"}]],pvn=ut("calendar-days",hvn);/** + */const Zvn=[["path",{d:"M8 2v4",key:"1cmpym"}],["path",{d:"M16 2v4",key:"4m81vk"}],["rect",{width:"18",height:"18",x:"3",y:"4",rx:"2",key:"1hopcy"}],["path",{d:"M3 10h18",key:"8toen8"}],["path",{d:"M8 14h.01",key:"6423bh"}],["path",{d:"M12 14h.01",key:"1etili"}],["path",{d:"M16 14h.01",key:"1gbofw"}],["path",{d:"M8 18h.01",key:"lrp35t"}],["path",{d:"M12 18h.01",key:"mhygvu"}],["path",{d:"M16 18h.01",key:"kzsmim"}]],Jvn=ut("calendar-days",Zvn);/** * @license lucide-react v1.23.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. - */const mvn=[["path",{d:"M3 3v16a2 2 0 0 0 2 2h16",key:"c24i48"}],["path",{d:"M7 16c.5-2 1.5-7 4-7 2 0 2 3 4 3 2.5 0 4.5-5 5-7",key:"lw07rv"}]],gvn=ut("chart-spline",mvn);/** + */const ebn=[["path",{d:"M3 3v16a2 2 0 0 0 2 2h16",key:"c24i48"}],["path",{d:"M7 16c.5-2 1.5-7 4-7 2 0 2 3 4 3 2.5 0 4.5-5 5-7",key:"lw07rv"}]],tbn=ut("chart-spline",ebn);/** * @license lucide-react v1.23.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. - */const vvn=[["path",{d:"M20 6 9 17l-5-5",key:"1gmf2c"}]],Ji=ut("check",vvn);/** + */const nbn=[["path",{d:"M20 6 9 17l-5-5",key:"1gmf2c"}]],Ji=ut("check",nbn);/** * @license lucide-react v1.23.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. - */const bvn=[["path",{d:"m6 9 6 6 6-6",key:"qrunsl"}]],Zo=ut("chevron-down",bvn);/** + */const rbn=[["path",{d:"m6 9 6 6 6-6",key:"qrunsl"}]],Jo=ut("chevron-down",rbn);/** * @license lucide-react v1.23.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. - */const yvn=[["path",{d:"m15 18-6-6 6-6",key:"1wnfg3"}]],fI=ut("chevron-left",yvn);/** + */const sbn=[["path",{d:"m15 18-6-6 6-6",key:"1wnfg3"}]],hI=ut("chevron-left",sbn);/** * @license lucide-react v1.23.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. - */const xvn=[["path",{d:"m9 18 6-6-6-6",key:"mthhwq"}]],Da=ut("chevron-right",xvn);/** + */const ibn=[["path",{d:"m9 18 6-6-6-6",key:"mthhwq"}]],Da=ut("chevron-right",ibn);/** * @license lucide-react v1.23.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. - */const wvn=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["line",{x1:"12",x2:"12",y1:"8",y2:"12",key:"1pkeuh"}],["line",{x1:"12",x2:"12.01",y1:"16",y2:"16",key:"4dfq90"}]],Zk=ut("circle-alert",wvn);/** + */const abn=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["line",{x1:"12",x2:"12",y1:"8",y2:"12",key:"1pkeuh"}],["line",{x1:"12",x2:"12.01",y1:"16",y2:"16",key:"4dfq90"}]],Zk=ut("circle-alert",abn);/** * @license lucide-react v1.23.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. - */const kvn=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M9.09 9a3 3 0 0 1 5.83 1c0 2-3 3-3 3",key:"1u773s"}],["path",{d:"M12 17h.01",key:"p32p05"}]],Svn=ut("circle-question-mark",kvn);/** + */const obn=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M9.09 9a3 3 0 0 1 5.83 1c0 2-3 3-3 3",key:"1u773s"}],["path",{d:"M12 17h.01",key:"p32p05"}]],lbn=ut("circle-question-mark",obn);/** * @license lucide-react v1.23.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. - */const Cvn=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["rect",{x:"9",y:"9",width:"6",height:"6",rx:"1",key:"1ssd4o"}]],dI=ut("circle-stop",Cvn);/** + */const cbn=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["rect",{x:"9",y:"9",width:"6",height:"6",rx:"1",key:"1ssd4o"}]],pI=ut("circle-stop",cbn);/** * @license lucide-react v1.23.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. - */const Evn=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"m15 9-6 6",key:"1uzhvr"}],["path",{d:"m9 9 6 6",key:"z0biqf"}]],hI=ut("circle-x",Evn);/** + */const ubn=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"m15 9-6 6",key:"1uzhvr"}],["path",{d:"m9 9 6 6",key:"z0biqf"}]],mI=ut("circle-x",ubn);/** * @license lucide-react v1.23.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. - */const Nvn=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M12 6v6h4",key:"135r8i"}]],zvn=ut("clock-3",Nvn);/** + */const _bn=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M12 6v6h4",key:"135r8i"}]],fbn=ut("clock-3",_bn);/** * @license lucide-react v1.23.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. - */const jvn=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M12 6v6l4 2",key:"mmk7yg"}]],Tvn=ut("clock",jvn);/** + */const dbn=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M12 6v6l4 2",key:"mmk7yg"}]],hbn=ut("clock",dbn);/** * @license lucide-react v1.23.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. - */const Avn=[["path",{d:"M12 13v8",key:"1l5pq0"}],["path",{d:"M4 14.899A7 7 0 1 1 15.71 8h1.79a4.5 4.5 0 0 1 2.5 8.242",key:"1pljnt"}],["path",{d:"m8 17 4-4 4 4",key:"1quai1"}]],Rvn=ut("cloud-upload",Avn);/** + */const pbn=[["path",{d:"M12 13v8",key:"1l5pq0"}],["path",{d:"M4 14.899A7 7 0 1 1 15.71 8h1.79a4.5 4.5 0 0 1 2.5 8.242",key:"1pljnt"}],["path",{d:"m8 17 4-4 4 4",key:"1quai1"}]],mbn=ut("cloud-upload",pbn);/** * @license lucide-react v1.23.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. - */const Mvn=[["path",{d:"m16 18 6-6-6-6",key:"eg8j8"}],["path",{d:"m8 6-6 6 6 6",key:"ppft3o"}]],E3=ut("code",Mvn);/** + */const gbn=[["path",{d:"m16 18 6-6-6-6",key:"eg8j8"}],["path",{d:"m8 6-6 6 6 6",key:"ppft3o"}]],E3=ut("code",gbn);/** * @license lucide-react v1.23.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. - */const Ovn=[["rect",{width:"14",height:"14",x:"8",y:"8",rx:"2",ry:"2",key:"17jyea"}],["path",{d:"M4 16c-1.1 0-2-.9-2-2V4c0-1.1.9-2 2-2h10c1.1 0 2 .9 2 2",key:"zix9uf"}]],Sb=ut("copy",Ovn);/** + */const vbn=[["rect",{width:"14",height:"14",x:"8",y:"8",rx:"2",ry:"2",key:"17jyea"}],["path",{d:"M4 16c-1.1 0-2-.9-2-2V4c0-1.1.9-2 2-2h10c1.1 0 2 .9 2 2",key:"zix9uf"}]],Sb=ut("copy",vbn);/** * @license lucide-react v1.23.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. - */const Dvn=[["path",{d:"M20 4v7a4 4 0 0 1-4 4H4",key:"6o5b7l"}],["path",{d:"m9 10-5 5 5 5",key:"1kshq7"}]],pI=ut("corner-down-left",Dvn);/** + */const bbn=[["path",{d:"M20 4v7a4 4 0 0 1-4 4H4",key:"6o5b7l"}],["path",{d:"m9 10-5 5 5 5",key:"1kshq7"}]],gI=ut("corner-down-left",bbn);/** * @license lucide-react v1.23.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. - */const Lvn=[["path",{d:"M12 20v2",key:"1lh1kg"}],["path",{d:"M12 2v2",key:"tus03m"}],["path",{d:"M17 20v2",key:"1rnc9c"}],["path",{d:"M17 2v2",key:"11trls"}],["path",{d:"M2 12h2",key:"1t8f8n"}],["path",{d:"M2 17h2",key:"7oei6x"}],["path",{d:"M2 7h2",key:"asdhe0"}],["path",{d:"M20 12h2",key:"1q8mjw"}],["path",{d:"M20 17h2",key:"1fpfkl"}],["path",{d:"M20 7h2",key:"1o8tra"}],["path",{d:"M7 20v2",key:"4gnj0m"}],["path",{d:"M7 2v2",key:"1i4yhu"}],["rect",{x:"4",y:"4",width:"16",height:"16",rx:"2",key:"1vbyd7"}],["rect",{x:"8",y:"8",width:"8",height:"8",rx:"1",key:"z9xiuo"}]],mI=ut("cpu",Lvn);/** + */const ybn=[["path",{d:"M12 20v2",key:"1lh1kg"}],["path",{d:"M12 2v2",key:"tus03m"}],["path",{d:"M17 20v2",key:"1rnc9c"}],["path",{d:"M17 2v2",key:"11trls"}],["path",{d:"M2 12h2",key:"1t8f8n"}],["path",{d:"M2 17h2",key:"7oei6x"}],["path",{d:"M2 7h2",key:"asdhe0"}],["path",{d:"M20 12h2",key:"1q8mjw"}],["path",{d:"M20 17h2",key:"1fpfkl"}],["path",{d:"M20 7h2",key:"1o8tra"}],["path",{d:"M7 20v2",key:"4gnj0m"}],["path",{d:"M7 2v2",key:"1i4yhu"}],["rect",{x:"4",y:"4",width:"16",height:"16",rx:"2",key:"1vbyd7"}],["rect",{x:"8",y:"8",width:"8",height:"8",rx:"1",key:"z9xiuo"}]],vI=ut("cpu",ybn);/** * @license lucide-react v1.23.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. - */const Ivn=[["path",{d:"M12 15V3",key:"m9g1x1"}],["path",{d:"M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4",key:"ih7n3h"}],["path",{d:"m7 10 5 5 5-5",key:"brsn70"}]],gI=ut("download",Ivn);/** + */const xbn=[["path",{d:"M12 15V3",key:"m9g1x1"}],["path",{d:"M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4",key:"ih7n3h"}],["path",{d:"m7 10 5 5 5-5",key:"brsn70"}]],bI=ut("download",xbn);/** * @license lucide-react v1.23.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. - */const $vn=[["circle",{cx:"12",cy:"12",r:"1",key:"41hilf"}],["circle",{cx:"19",cy:"12",r:"1",key:"1wjl8i"}],["circle",{cx:"5",cy:"12",r:"1",key:"1pcz8c"}]],Jk=ut("ellipsis",$vn);/** + */const wbn=[["circle",{cx:"12",cy:"12",r:"1",key:"41hilf"}],["circle",{cx:"19",cy:"12",r:"1",key:"1wjl8i"}],["circle",{cx:"5",cy:"12",r:"1",key:"1pcz8c"}]],Jk=ut("ellipsis",wbn);/** * @license lucide-react v1.23.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. - */const Bvn=[["path",{d:"M15 3h6v6",key:"1q9fwt"}],["path",{d:"M10 14 21 3",key:"gplh6r"}],["path",{d:"M18 13v6a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V8a2 2 0 0 1 2-2h6",key:"a6xqqp"}]],H_=ut("external-link",Bvn);/** + */const kbn=[["path",{d:"M15 3h6v6",key:"1q9fwt"}],["path",{d:"M10 14 21 3",key:"gplh6r"}],["path",{d:"M18 13v6a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V8a2 2 0 0 1 2-2h6",key:"a6xqqp"}]],H_=ut("external-link",kbn);/** * @license lucide-react v1.23.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. - */const Pvn=[["path",{d:"M6 22a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h8a2.4 2.4 0 0 1 1.704.706l3.588 3.588A2.4 2.4 0 0 1 20 8v12a2 2 0 0 1-2 2z",key:"1oefj6"}],["path",{d:"M14 2v5a1 1 0 0 0 1 1h5",key:"wfsgrz"}],["path",{d:"M10 12.5 8 15l2 2.5",key:"1tg20x"}],["path",{d:"m14 12.5 2 2.5-2 2.5",key:"yinavb"}]],vI=ut("file-code",Pvn);/** + */const Sbn=[["path",{d:"M6 22a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h8a2.4 2.4 0 0 1 1.704.706l3.588 3.588A2.4 2.4 0 0 1 20 8v12a2 2 0 0 1-2 2z",key:"1oefj6"}],["path",{d:"M14 2v5a1 1 0 0 0 1 1h5",key:"wfsgrz"}],["path",{d:"M10 12.5 8 15l2 2.5",key:"1tg20x"}],["path",{d:"m14 12.5 2 2.5-2 2.5",key:"yinavb"}]],yI=ut("file-code",Sbn);/** * @license lucide-react v1.23.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. - */const Fvn=[["path",{d:"M4.226 20.925A2 2 0 0 0 6 22h12a2 2 0 0 0 2-2V8a2.4 2.4 0 0 0-.706-1.706l-3.588-3.588A2.4 2.4 0 0 0 14 2H6a2 2 0 0 0-2 2v3.127",key:"wfxp4w"}],["path",{d:"M14 2v5a1 1 0 0 0 1 1h5",key:"wfsgrz"}],["path",{d:"m5 11-3 3",key:"1dgrs4"}],["path",{d:"m5 17-3-3h10",key:"1mvvaf"}]],Hvn=ut("file-output",Fvn);/** + */const Cbn=[["path",{d:"M4.226 20.925A2 2 0 0 0 6 22h12a2 2 0 0 0 2-2V8a2.4 2.4 0 0 0-.706-1.706l-3.588-3.588A2.4 2.4 0 0 0 14 2H6a2 2 0 0 0-2 2v3.127",key:"wfxp4w"}],["path",{d:"M14 2v5a1 1 0 0 0 1 1h5",key:"wfsgrz"}],["path",{d:"m5 11-3 3",key:"1dgrs4"}],["path",{d:"m5 17-3-3h10",key:"1mvvaf"}]],Ebn=ut("file-output",Cbn);/** * @license lucide-react v1.23.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. - */const qvn=[["path",{d:"M6 22a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h8a2.4 2.4 0 0 1 1.704.706l3.588 3.588A2.4 2.4 0 0 1 20 8v12a2 2 0 0 1-2 2z",key:"1oefj6"}],["path",{d:"M14 2v5a1 1 0 0 0 1 1h5",key:"wfsgrz"}],["path",{d:"M10 9H8",key:"b1mrlr"}],["path",{d:"M16 13H8",key:"t4e002"}],["path",{d:"M16 17H8",key:"z1uh3a"}]],Cb=ut("file-text",qvn);/** + */const Nbn=[["path",{d:"M6 22a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h8a2.4 2.4 0 0 1 1.704.706l3.588 3.588A2.4 2.4 0 0 1 20 8v12a2 2 0 0 1-2 2z",key:"1oefj6"}],["path",{d:"M14 2v5a1 1 0 0 0 1 1h5",key:"wfsgrz"}],["path",{d:"M10 9H8",key:"b1mrlr"}],["path",{d:"M16 13H8",key:"t4e002"}],["path",{d:"M16 17H8",key:"z1uh3a"}]],Cb=ut("file-text",Nbn);/** * @license lucide-react v1.23.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. - */const Uvn=[["path",{d:"M14 2v6a2 2 0 0 0 .245.96l5.51 10.08A2 2 0 0 1 18 22H6a2 2 0 0 1-1.755-2.96l5.51-10.08A2 2 0 0 0 10 8V2",key:"18mbvz"}],["path",{d:"M6.453 15h11.094",key:"3shlmq"}],["path",{d:"M8.5 2h7",key:"csnxdl"}]],Jd=ut("flask-conical",Uvn);/** + */const zbn=[["path",{d:"M14 2v6a2 2 0 0 0 .245.96l5.51 10.08A2 2 0 0 1 18 22H6a2 2 0 0 1-1.755-2.96l5.51-10.08A2 2 0 0 0 10 8V2",key:"18mbvz"}],["path",{d:"M6.453 15h11.094",key:"3shlmq"}],["path",{d:"M8.5 2h7",key:"csnxdl"}]],Jd=ut("flask-conical",zbn);/** * @license lucide-react v1.23.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. - */const Gvn=[["path",{d:"M18 19a5 5 0 0 1-5-5v8",key:"sz5oeg"}],["path",{d:"M9 20H4a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h3.9a2 2 0 0 1 1.69.9l.81 1.2a2 2 0 0 0 1.67.9H20a2 2 0 0 1 2 2v5",key:"1w6njk"}],["circle",{cx:"13",cy:"12",r:"2",key:"1j92g6"}],["circle",{cx:"20",cy:"19",r:"2",key:"1obnsp"}]],bI=ut("folder-git-2",Gvn);/** + */const jbn=[["path",{d:"M18 19a5 5 0 0 1-5-5v8",key:"sz5oeg"}],["path",{d:"M9 20H4a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h3.9a2 2 0 0 1 1.69.9l.81 1.2a2 2 0 0 0 1.67.9H20a2 2 0 0 1 2 2v5",key:"1w6njk"}],["circle",{cx:"13",cy:"12",r:"2",key:"1j92g6"}],["circle",{cx:"20",cy:"19",r:"2",key:"1obnsp"}]],xI=ut("folder-git-2",jbn);/** * @license lucide-react v1.23.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. - */const Vvn=[["path",{d:"m6 14 1.5-2.9A2 2 0 0 1 9.24 10H20a2 2 0 0 1 1.94 2.5l-1.54 6a2 2 0 0 1-1.95 1.5H4a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h3.9a2 2 0 0 1 1.69.9l.81 1.2a2 2 0 0 0 1.67.9H18a2 2 0 0 1 2 2v2",key:"usdka0"}]],q_=ut("folder-open",Vvn);/** + */const Tbn=[["path",{d:"m6 14 1.5-2.9A2 2 0 0 1 9.24 10H20a2 2 0 0 1 1.94 2.5l-1.54 6a2 2 0 0 1-1.95 1.5H4a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h3.9a2 2 0 0 1 1.69.9l.81 1.2a2 2 0 0 0 1.67.9H18a2 2 0 0 1 2 2v2",key:"usdka0"}]],q_=ut("folder-open",Tbn);/** * @license lucide-react v1.23.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. - */const Kvn=[["path",{d:"M12 10v6",key:"1bos4e"}],["path",{d:"M9 13h6",key:"1uhe8q"}],["path",{d:"M20 20a2 2 0 0 0 2-2V8a2 2 0 0 0-2-2h-7.9a2 2 0 0 1-1.69-.9L9.6 3.9A2 2 0 0 0 7.93 3H4a2 2 0 0 0-2 2v13a2 2 0 0 0 2 2Z",key:"1kt360"}]],Wvn=ut("folder-plus",Kvn);/** + */const Abn=[["path",{d:"M12 10v6",key:"1bos4e"}],["path",{d:"M9 13h6",key:"1uhe8q"}],["path",{d:"M20 20a2 2 0 0 0 2-2V8a2 2 0 0 0-2-2h-7.9a2 2 0 0 1-1.69-.9L9.6 3.9A2 2 0 0 0 7.93 3H4a2 2 0 0 0-2 2v13a2 2 0 0 0 2 2Z",key:"1kt360"}]],Rbn=ut("folder-plus",Abn);/** * @license lucide-react v1.23.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. - */const Qvn=[["path",{d:"M20 10a1 1 0 0 0 1-1V6a1 1 0 0 0-1-1h-2.5a1 1 0 0 1-.8-.4l-.9-1.2A1 1 0 0 0 15 3h-2a1 1 0 0 0-1 1v5a1 1 0 0 0 1 1Z",key:"hod4my"}],["path",{d:"M20 21a1 1 0 0 0 1-1v-3a1 1 0 0 0-1-1h-2.9a1 1 0 0 1-.88-.55l-.42-.85a1 1 0 0 0-.92-.6H13a1 1 0 0 0-1 1v5a1 1 0 0 0 1 1Z",key:"w4yl2u"}],["path",{d:"M3 5a2 2 0 0 0 2 2h3",key:"f2jnh7"}],["path",{d:"M3 3v13a2 2 0 0 0 2 2h3",key:"k8epm1"}]],Eb=ut("folder-tree",Qvn);/** + */const Mbn=[["path",{d:"M20 10a1 1 0 0 0 1-1V6a1 1 0 0 0-1-1h-2.5a1 1 0 0 1-.8-.4l-.9-1.2A1 1 0 0 0 15 3h-2a1 1 0 0 0-1 1v5a1 1 0 0 0 1 1Z",key:"hod4my"}],["path",{d:"M20 21a1 1 0 0 0 1-1v-3a1 1 0 0 0-1-1h-2.9a1 1 0 0 1-.88-.55l-.42-.85a1 1 0 0 0-.92-.6H13a1 1 0 0 0-1 1v5a1 1 0 0 0 1 1Z",key:"w4yl2u"}],["path",{d:"M3 5a2 2 0 0 0 2 2h3",key:"f2jnh7"}],["path",{d:"M3 3v13a2 2 0 0 0 2 2h3",key:"k8epm1"}]],Eb=ut("folder-tree",Mbn);/** * @license lucide-react v1.23.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. - */const Xvn=[["path",{d:"M10 20a1 1 0 0 0 .553.895l2 1A1 1 0 0 0 14 21v-7a2 2 0 0 1 .517-1.341L21.74 4.67A1 1 0 0 0 21 3H3a1 1 0 0 0-.742 1.67l7.225 7.989A2 2 0 0 1 10 14z",key:"sc7q7i"}]],Yvn=ut("funnel",Xvn);/** + */const Obn=[["path",{d:"M10 20a1 1 0 0 0 .553.895l2 1A1 1 0 0 0 14 21v-7a2 2 0 0 1 .517-1.341L21.74 4.67A1 1 0 0 0 21 3H3a1 1 0 0 0-.742 1.67l7.225 7.989A2 2 0 0 1 10 14z",key:"sc7q7i"}]],Dbn=ut("funnel",Obn);/** * @license lucide-react v1.23.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. - */const Zvn=[["path",{d:"m12 14 4-4",key:"9kzdfg"}],["path",{d:"M3.34 19a10 10 0 1 1 17.32 0",key:"19p75a"}]],Jvn=ut("gauge",Zvn);/** + */const Lbn=[["path",{d:"m12 14 4-4",key:"9kzdfg"}],["path",{d:"M3.34 19a10 10 0 1 1 17.32 0",key:"19p75a"}]],Ibn=ut("gauge",Lbn);/** * @license lucide-react v1.23.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. - */const ebn=[["path",{d:"M15 6a9 9 0 0 0-9 9V3",key:"1cii5b"}],["circle",{cx:"18",cy:"6",r:"3",key:"1h7g24"}],["circle",{cx:"6",cy:"18",r:"3",key:"fqmcym"}]],hm=ut("git-branch",ebn);/** + */const $bn=[["path",{d:"M15 6a9 9 0 0 0-9 9V3",key:"1cii5b"}],["circle",{cx:"18",cy:"6",r:"3",key:"1h7g24"}],["circle",{cx:"6",cy:"18",r:"3",key:"fqmcym"}]],hm=ut("git-branch",$bn);/** * @license lucide-react v1.23.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. - */const tbn=[["circle",{cx:"12",cy:"12",r:"3",key:"1v7zrd"}],["line",{x1:"3",x2:"9",y1:"12",y2:"12",key:"1dyftd"}],["line",{x1:"15",x2:"21",y1:"12",y2:"12",key:"oup4p8"}]],nbn=ut("git-commit-horizontal",tbn);/** + */const Bbn=[["circle",{cx:"12",cy:"12",r:"3",key:"1v7zrd"}],["line",{x1:"3",x2:"9",y1:"12",y2:"12",key:"1dyftd"}],["line",{x1:"15",x2:"21",y1:"12",y2:"12",key:"oup4p8"}]],Pbn=ut("git-commit-horizontal",Bbn);/** * @license lucide-react v1.23.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. - */const rbn=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M12 2a14.5 14.5 0 0 0 0 20 14.5 14.5 0 0 0 0-20",key:"13o1zl"}],["path",{d:"M2 12h20",key:"9i4pu4"}]],sbn=ut("globe",rbn);/** + */const Fbn=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M12 2a14.5 14.5 0 0 0 0 20 14.5 14.5 0 0 0 0-20",key:"13o1zl"}],["path",{d:"M2 12h20",key:"9i4pu4"}]],Hbn=ut("globe",Fbn);/** * @license lucide-react v1.23.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. - */const ibn=[["path",{d:"M3 12a9 9 0 1 0 9-9 9.75 9.75 0 0 0-6.74 2.74L3 8",key:"1357e3"}],["path",{d:"M3 3v5h5",key:"1xhq8a"}],["path",{d:"M12 7v5l4 2",key:"1fdv2h"}]],abn=ut("history",ibn);/** + */const qbn=[["path",{d:"M3 12a9 9 0 1 0 9-9 9.75 9.75 0 0 0-6.74 2.74L3 8",key:"1357e3"}],["path",{d:"M3 3v5h5",key:"1xhq8a"}],["path",{d:"M12 7v5l4 2",key:"1fdv2h"}]],Ubn=ut("history",qbn);/** * @license lucide-react v1.23.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. - */const obn=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M12 16v-4",key:"1dtifu"}],["path",{d:"M12 8h.01",key:"e9boi3"}]],eS=ut("info",obn);/** + */const Gbn=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M12 16v-4",key:"1dtifu"}],["path",{d:"M12 8h.01",key:"e9boi3"}]],eS=ut("info",Gbn);/** * @license lucide-react v1.23.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. - */const lbn=[["path",{d:"M18 5a2 2 0 0 1 2 2v8.526a2 2 0 0 0 .212.897l1.068 2.127a1 1 0 0 1-.9 1.45H3.62a1 1 0 0 1-.9-1.45l1.068-2.127A2 2 0 0 0 4 15.526V7a2 2 0 0 1 2-2z",key:"1pdavp"}],["path",{d:"M20.054 15.987H3.946",key:"14rxg9"}]],cbn=ut("laptop",lbn);/** + */const Vbn=[["path",{d:"M18 5a2 2 0 0 1 2 2v8.526a2 2 0 0 0 .212.897l1.068 2.127a1 1 0 0 1-.9 1.45H3.62a1 1 0 0 1-.9-1.45l1.068-2.127A2 2 0 0 0 4 15.526V7a2 2 0 0 1 2-2z",key:"1pdavp"}],["path",{d:"M20.054 15.987H3.946",key:"14rxg9"}]],Kbn=ut("laptop",Vbn);/** * @license lucide-react v1.23.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. - */const ubn=[["path",{d:"M15 14c.2-1 .7-1.7 1.5-2.5 1-.9 1.5-2.2 1.5-3.5A6 6 0 0 0 6 8c0 1 .2 2.2 1.5 3.5.7.7 1.3 1.5 1.5 2.5",key:"1gvzjb"}],["path",{d:"M9 18h6",key:"x1upvd"}],["path",{d:"M10 22h4",key:"ceow96"}]],_bn=ut("lightbulb",ubn);/** + */const Wbn=[["path",{d:"M15 14c.2-1 .7-1.7 1.5-2.5 1-.9 1.5-2.2 1.5-3.5A6 6 0 0 0 6 8c0 1 .2 2.2 1.5 3.5.7.7 1.3 1.5 1.5 2.5",key:"1gvzjb"}],["path",{d:"M9 18h6",key:"x1upvd"}],["path",{d:"M10 22h4",key:"ceow96"}]],Qbn=ut("lightbulb",Wbn);/** * @license lucide-react v1.23.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. - */const fbn=[["path",{d:"M9 17H7A5 5 0 0 1 7 7h2",key:"8i5ue5"}],["path",{d:"M15 7h2a5 5 0 1 1 0 10h-2",key:"1b9ql8"}],["line",{x1:"8",x2:"16",y1:"12",y2:"12",key:"1jonct"}]],yI=ut("link-2",fbn);/** + */const Xbn=[["path",{d:"M9 17H7A5 5 0 0 1 7 7h2",key:"8i5ue5"}],["path",{d:"M15 7h2a5 5 0 1 1 0 10h-2",key:"1b9ql8"}],["line",{x1:"8",x2:"16",y1:"12",y2:"12",key:"1jonct"}]],wI=ut("link-2",Xbn);/** * @license lucide-react v1.23.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. - */const dbn=[["path",{d:"M13 5h8",key:"a7qcls"}],["path",{d:"M13 12h8",key:"h98zly"}],["path",{d:"M13 19h8",key:"c3s6r1"}],["path",{d:"m3 17 2 2 4-4",key:"1jhpwq"}],["path",{d:"m3 7 2 2 4-4",key:"1obspn"}]],xI=ut("list-checks",dbn);/** + */const Ybn=[["path",{d:"M13 5h8",key:"a7qcls"}],["path",{d:"M13 12h8",key:"h98zly"}],["path",{d:"M13 19h8",key:"c3s6r1"}],["path",{d:"m3 17 2 2 4-4",key:"1jhpwq"}],["path",{d:"m3 7 2 2 4-4",key:"1obspn"}]],kI=ut("list-checks",Ybn);/** * @license lucide-react v1.23.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. - */const hbn=[["rect",{width:"18",height:"11",x:"3",y:"11",rx:"2",ry:"2",key:"1w4ew1"}],["path",{d:"M7 11V7a5 5 0 0 1 10 0v4",key:"fwvmzm"}]],Uz=ut("lock",hbn);/** + */const Zbn=[["rect",{width:"18",height:"11",x:"3",y:"11",rx:"2",ry:"2",key:"1w4ew1"}],["path",{d:"M7 11V7a5 5 0 0 1 10 0v4",key:"fwvmzm"}]],Uz=ut("lock",Zbn);/** * @license lucide-react v1.23.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. - */const pbn=[["path",{d:"M15 3h6v6",key:"1q9fwt"}],["path",{d:"m21 3-7 7",key:"1l2asr"}],["path",{d:"m3 21 7-7",key:"tjx5ai"}],["path",{d:"M9 21H3v-6",key:"wtvkvv"}]],mbn=ut("maximize-2",pbn);/** + */const Jbn=[["path",{d:"M15 3h6v6",key:"1q9fwt"}],["path",{d:"m21 3-7 7",key:"1l2asr"}],["path",{d:"m3 21 7-7",key:"tjx5ai"}],["path",{d:"M9 21H3v-6",key:"wtvkvv"}]],eyn=ut("maximize-2",Jbn);/** * @license lucide-react v1.23.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. - */const gbn=[["path",{d:"M14 14a2 2 0 0 0 2-2V8h-2",key:"1r06pg"}],["path",{d:"M22 17a2 2 0 0 1-2 2H6.828a2 2 0 0 0-1.414.586l-2.202 2.202A.71.71 0 0 1 2 21.286V5a2 2 0 0 1 2-2h16a2 2 0 0 1 2 2z",key:"18887p"}],["path",{d:"M8 14a2 2 0 0 0 2-2V8H8",key:"1jzu5j"}]],wI=ut("message-square-quote",gbn);/** + */const tyn=[["path",{d:"M14 14a2 2 0 0 0 2-2V8h-2",key:"1r06pg"}],["path",{d:"M22 17a2 2 0 0 1-2 2H6.828a2 2 0 0 0-1.414.586l-2.202 2.202A.71.71 0 0 1 2 21.286V5a2 2 0 0 1 2-2h16a2 2 0 0 1 2 2z",key:"18887p"}],["path",{d:"M8 14a2 2 0 0 0 2-2V8H8",key:"1jzu5j"}]],SI=ut("message-square-quote",tyn);/** * @license lucide-react v1.23.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. - */const vbn=[["path",{d:"m14 10 7-7",key:"oa77jy"}],["path",{d:"M20 10h-6V4",key:"mjg0md"}],["path",{d:"m3 21 7-7",key:"tjx5ai"}],["path",{d:"M4 14h6v6",key:"rmj7iw"}]],bbn=ut("minimize-2",vbn);/** + */const nyn=[["path",{d:"m14 10 7-7",key:"oa77jy"}],["path",{d:"M20 10h-6V4",key:"mjg0md"}],["path",{d:"m3 21 7-7",key:"tjx5ai"}],["path",{d:"M4 14h6v6",key:"rmj7iw"}]],ryn=ut("minimize-2",nyn);/** * @license lucide-react v1.23.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. - */const ybn=[["path",{d:"M5 12h14",key:"1ays0h"}]],xbn=ut("minus",ybn);/** + */const syn=[["path",{d:"M5 12h14",key:"1ays0h"}]],iyn=ut("minus",syn);/** * @license lucide-react v1.23.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. - */const wbn=[["rect",{width:"20",height:"14",x:"2",y:"3",rx:"2",key:"48i651"}],["line",{x1:"8",x2:"16",y1:"21",y2:"21",key:"1svkeh"}],["line",{x1:"12",x2:"12",y1:"17",y2:"21",key:"vw1qmm"}]],kbn=ut("monitor",wbn);/** + */const ayn=[["rect",{width:"20",height:"14",x:"2",y:"3",rx:"2",key:"48i651"}],["line",{x1:"8",x2:"16",y1:"21",y2:"21",key:"1svkeh"}],["line",{x1:"12",x2:"12",y1:"17",y2:"21",key:"vw1qmm"}]],oyn=ut("monitor",ayn);/** * @license lucide-react v1.23.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. - */const Sbn=[["path",{d:"M20.985 12.486a9 9 0 1 1-9.473-9.472c.405-.022.617.46.402.803a6 6 0 0 0 8.268 8.268c.344-.215.825-.004.803.401",key:"kfwtm"}]],Cbn=ut("moon",Sbn);/** + */const lyn=[["path",{d:"M20.985 12.486a9 9 0 1 1-9.473-9.472c.405-.022.617.46.402.803a6 6 0 0 0 8.268 8.268c.344-.215.825-.004.803.401",key:"kfwtm"}]],cyn=ut("moon",lyn);/** * @license lucide-react v1.23.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. - */const Ebn=[["path",{d:"M14 4.1 12 6",key:"ita8i4"}],["path",{d:"m5.1 8-2.9-.8",key:"1go3kf"}],["path",{d:"m6 12-1.9 2",key:"mnht97"}],["path",{d:"M7.2 2.2 8 5.1",key:"1cfko1"}],["path",{d:"M9.037 9.69a.498.498 0 0 1 .653-.653l11 4.5a.5.5 0 0 1-.074.949l-4.349 1.041a1 1 0 0 0-.74.739l-1.04 4.35a.5.5 0 0 1-.95.074z",key:"s0h3yz"}]],Nbn=ut("mouse-pointer-click",Ebn);/** + */const uyn=[["path",{d:"M14 4.1 12 6",key:"ita8i4"}],["path",{d:"m5.1 8-2.9-.8",key:"1go3kf"}],["path",{d:"m6 12-1.9 2",key:"mnht97"}],["path",{d:"M7.2 2.2 8 5.1",key:"1cfko1"}],["path",{d:"M9.037 9.69a.498.498 0 0 1 .653-.653l11 4.5a.5.5 0 0 1-.074.949l-4.349 1.041a1 1 0 0 0-.74.739l-1.04 4.35a.5.5 0 0 1-.95.074z",key:"s0h3yz"}]],_yn=ut("mouse-pointer-click",uyn);/** * @license lucide-react v1.23.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. - */const zbn=[["path",{d:"M11 21.73a2 2 0 0 0 2 0l7-4A2 2 0 0 0 21 16V8a2 2 0 0 0-1-1.73l-7-4a2 2 0 0 0-2 0l-7 4A2 2 0 0 0 3 8v8a2 2 0 0 0 1 1.73z",key:"1a0edw"}],["path",{d:"M12 22V12",key:"d0xqtd"}],["polyline",{points:"3.29 7 12 12 20.71 7",key:"ousv84"}],["path",{d:"m7.5 4.27 9 5.15",key:"1c824w"}]],tS=ut("package",zbn);/** + */const fyn=[["path",{d:"M11 21.73a2 2 0 0 0 2 0l7-4A2 2 0 0 0 21 16V8a2 2 0 0 0-1-1.73l-7-4a2 2 0 0 0-2 0l-7 4A2 2 0 0 0 3 8v8a2 2 0 0 0 1 1.73z",key:"1a0edw"}],["path",{d:"M12 22V12",key:"d0xqtd"}],["polyline",{points:"3.29 7 12 12 20.71 7",key:"ousv84"}],["path",{d:"m7.5 4.27 9 5.15",key:"1c824w"}]],tS=ut("package",fyn);/** * @license lucide-react v1.23.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. - */const jbn=[["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2",key:"afitv7"}],["path",{d:"M9 3v18",key:"fh3hqa"}]],kI=ut("panel-left",jbn);/** + */const dyn=[["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2",key:"afitv7"}],["path",{d:"M9 3v18",key:"fh3hqa"}]],CI=ut("panel-left",dyn);/** * @license lucide-react v1.23.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. - */const Tbn=[["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2",key:"afitv7"}],["path",{d:"M15 3v18",key:"14nvp0"}]],SI=ut("panel-right",Tbn);/** + */const hyn=[["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2",key:"afitv7"}],["path",{d:"M15 3v18",key:"14nvp0"}]],EI=ut("panel-right",hyn);/** * @license lucide-react v1.23.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. - */const Abn=[["path",{d:"m16 6-8.414 8.586a2 2 0 0 0 2.829 2.829l8.414-8.586a4 4 0 1 0-5.657-5.657l-8.379 8.551a6 6 0 1 0 8.485 8.485l8.379-8.551",key:"1miecu"}]],Rbn=ut("paperclip",Abn);/** + */const pyn=[["path",{d:"m16 6-8.414 8.586a2 2 0 0 0 2.829 2.829l8.414-8.586a4 4 0 1 0-5.657-5.657l-8.379 8.551a6 6 0 1 0 8.485 8.485l8.379-8.551",key:"1miecu"}]],myn=ut("paperclip",pyn);/** * @license lucide-react v1.23.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. - */const Mbn=[["path",{d:"M21.174 6.812a1 1 0 0 0-3.986-3.987L3.842 16.174a2 2 0 0 0-.5.83l-1.321 4.352a.5.5 0 0 0 .623.622l4.353-1.32a2 2 0 0 0 .83-.497z",key:"1a8usu"}],["path",{d:"m15 5 4 4",key:"1mk7zo"}]],nS=ut("pencil",Mbn);/** + */const gyn=[["path",{d:"M21.174 6.812a1 1 0 0 0-3.986-3.987L3.842 16.174a2 2 0 0 0-.5.83l-1.321 4.352a.5.5 0 0 0 .623.622l4.353-1.32a2 2 0 0 0 .83-.497z",key:"1a8usu"}],["path",{d:"m15 5 4 4",key:"1mk7zo"}]],nS=ut("pencil",gyn);/** * @license lucide-react v1.23.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. - */const Obn=[["path",{d:"M5 5a2 2 0 0 1 3.008-1.728l11.997 6.998a2 2 0 0 1 .003 3.458l-12 7A2 2 0 0 1 5 19z",key:"10ikf1"}]],Dbn=ut("play",Obn);/** + */const vyn=[["path",{d:"M5 5a2 2 0 0 1 3.008-1.728l11.997 6.998a2 2 0 0 1 .003 3.458l-12 7A2 2 0 0 1 5 19z",key:"10ikf1"}]],byn=ut("play",vyn);/** * @license lucide-react v1.23.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. - */const Lbn=[["path",{d:"M5 12h14",key:"1ays0h"}],["path",{d:"M12 5v14",key:"s699le"}]],yh=ut("plus",Lbn);/** + */const yyn=[["path",{d:"M5 12h14",key:"1ays0h"}],["path",{d:"M12 5v14",key:"s699le"}]],yh=ut("plus",yyn);/** * @license lucide-react v1.23.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. - */const Ibn=[["path",{d:"M3 12a9 9 0 0 1 9-9 9.75 9.75 0 0 1 6.74 2.74L21 8",key:"v9h5vc"}],["path",{d:"M21 3v5h-5",key:"1q7to0"}],["path",{d:"M21 12a9 9 0 0 1-9 9 9.75 9.75 0 0 1-6.74-2.74L3 16",key:"3uifl3"}],["path",{d:"M8 16H3v5",key:"1cv678"}]],La=ut("refresh-cw",Ibn);/** + */const xyn=[["path",{d:"M3 12a9 9 0 0 1 9-9 9.75 9.75 0 0 1 6.74 2.74L21 8",key:"v9h5vc"}],["path",{d:"M21 3v5h-5",key:"1q7to0"}],["path",{d:"M21 12a9 9 0 0 1-9 9 9.75 9.75 0 0 1-6.74-2.74L3 16",key:"3uifl3"}],["path",{d:"M8 16H3v5",key:"1cv678"}]],La=ut("refresh-cw",xyn);/** * @license lucide-react v1.23.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. - */const $bn=[["path",{d:"M21 12a9 9 0 1 1-9-9c2.52 0 4.93 1 6.74 2.74L21 8",key:"1p45f6"}],["path",{d:"M21 3v5h-5",key:"1q7to0"}]],Bbn=ut("rotate-cw",$bn);/** + */const wyn=[["path",{d:"M21 12a9 9 0 1 1-9-9c2.52 0 4.93 1 6.74 2.74L21 8",key:"1p45f6"}],["path",{d:"M21 3v5h-5",key:"1q7to0"}]],kyn=ut("rotate-cw",wyn);/** * @license lucide-react v1.23.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. - */const Pbn=[["path",{d:"M15 12h-5",key:"r7krc0"}],["path",{d:"M15 8h-5",key:"1khuty"}],["path",{d:"M19 17V5a2 2 0 0 0-2-2H4",key:"zz82l3"}],["path",{d:"M8 21h12a2 2 0 0 0 2-2v-1a1 1 0 0 0-1-1H11a1 1 0 0 0-1 1v1a2 2 0 1 1-4 0V5a2 2 0 1 0-4 0v2a1 1 0 0 0 1 1h3",key:"1ph1d7"}]],rS=ut("scroll-text",Pbn);/** + */const Syn=[["path",{d:"M15 12h-5",key:"r7krc0"}],["path",{d:"M15 8h-5",key:"1khuty"}],["path",{d:"M19 17V5a2 2 0 0 0-2-2H4",key:"zz82l3"}],["path",{d:"M8 21h12a2 2 0 0 0 2-2v-1a1 1 0 0 0-1-1H11a1 1 0 0 0-1 1v1a2 2 0 1 1-4 0V5a2 2 0 1 0-4 0v2a1 1 0 0 0 1 1h3",key:"1ph1d7"}]],rS=ut("scroll-text",Syn);/** * @license lucide-react v1.23.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. - */const Fbn=[["path",{d:"m21 21-4.34-4.34",key:"14j7rj"}],["circle",{cx:"11",cy:"11",r:"8",key:"4ej97u"}]],CI=ut("search",Fbn);/** + */const Cyn=[["path",{d:"m21 21-4.34-4.34",key:"14j7rj"}],["circle",{cx:"11",cy:"11",r:"8",key:"4ej97u"}]],NI=ut("search",Cyn);/** * @license lucide-react v1.23.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. - */const Hbn=[["rect",{width:"20",height:"8",x:"2",y:"2",rx:"2",ry:"2",key:"ngkwjq"}],["rect",{width:"20",height:"8",x:"2",y:"14",rx:"2",ry:"2",key:"iecqi9"}],["line",{x1:"6",x2:"6.01",y1:"6",y2:"6",key:"16zg32"}],["line",{x1:"6",x2:"6.01",y1:"18",y2:"18",key:"nzw8ys"}]],Gz=ut("server",Hbn);/** + */const Eyn=[["rect",{width:"20",height:"8",x:"2",y:"2",rx:"2",ry:"2",key:"ngkwjq"}],["rect",{width:"20",height:"8",x:"2",y:"14",rx:"2",ry:"2",key:"iecqi9"}],["line",{x1:"6",x2:"6.01",y1:"6",y2:"6",key:"16zg32"}],["line",{x1:"6",x2:"6.01",y1:"18",y2:"18",key:"nzw8ys"}]],Gz=ut("server",Eyn);/** * @license lucide-react v1.23.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. - */const qbn=[["path",{d:"M9.671 4.136a2.34 2.34 0 0 1 4.659 0 2.34 2.34 0 0 0 3.319 1.915 2.34 2.34 0 0 1 2.33 4.033 2.34 2.34 0 0 0 0 3.831 2.34 2.34 0 0 1-2.33 4.033 2.34 2.34 0 0 0-3.319 1.915 2.34 2.34 0 0 1-4.659 0 2.34 2.34 0 0 0-3.32-1.915 2.34 2.34 0 0 1-2.33-4.033 2.34 2.34 0 0 0 0-3.831A2.34 2.34 0 0 1 6.35 6.051a2.34 2.34 0 0 0 3.319-1.915",key:"1i5ecw"}],["circle",{cx:"12",cy:"12",r:"3",key:"1v7zrd"}]],sS=ut("settings",qbn);/** + */const Nyn=[["path",{d:"M9.671 4.136a2.34 2.34 0 0 1 4.659 0 2.34 2.34 0 0 0 3.319 1.915 2.34 2.34 0 0 1 2.33 4.033 2.34 2.34 0 0 0 0 3.831 2.34 2.34 0 0 1-2.33 4.033 2.34 2.34 0 0 0-3.319 1.915 2.34 2.34 0 0 1-4.659 0 2.34 2.34 0 0 0-3.32-1.915 2.34 2.34 0 0 1-2.33-4.033 2.34 2.34 0 0 0 0-3.831A2.34 2.34 0 0 1 6.35 6.051a2.34 2.34 0 0 0 3.319-1.915",key:"1i5ecw"}],["circle",{cx:"12",cy:"12",r:"3",key:"1v7zrd"}]],sS=ut("settings",Nyn);/** * @license lucide-react v1.23.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. - */const Ubn=[["path",{d:"M10 5H3",key:"1qgfaw"}],["path",{d:"M12 19H3",key:"yhmn1j"}],["path",{d:"M14 3v4",key:"1sua03"}],["path",{d:"M16 17v4",key:"1q0r14"}],["path",{d:"M21 12h-9",key:"1o4lsq"}],["path",{d:"M21 19h-5",key:"1rlt1p"}],["path",{d:"M21 5h-7",key:"1oszz2"}],["path",{d:"M8 10v4",key:"tgpxqk"}],["path",{d:"M8 12H3",key:"a7s4jb"}]],EI=ut("sliders-horizontal",Ubn);/** + */const zyn=[["path",{d:"M10 5H3",key:"1qgfaw"}],["path",{d:"M12 19H3",key:"yhmn1j"}],["path",{d:"M14 3v4",key:"1sua03"}],["path",{d:"M16 17v4",key:"1q0r14"}],["path",{d:"M21 12h-9",key:"1o4lsq"}],["path",{d:"M21 19h-5",key:"1rlt1p"}],["path",{d:"M21 5h-7",key:"1oszz2"}],["path",{d:"M8 10v4",key:"tgpxqk"}],["path",{d:"M8 12H3",key:"a7s4jb"}]],zI=ut("sliders-horizontal",zyn);/** * @license lucide-react v1.23.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. - */const Gbn=[["path",{d:"m7 11 2-2-2-2",key:"1lz0vl"}],["path",{d:"M11 13h4",key:"1p7l4v"}],["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2",ry:"2",key:"1m3agn"}]],of=ut("square-terminal",Gbn);/** + */const jyn=[["path",{d:"m7 11 2-2-2-2",key:"1lz0vl"}],["path",{d:"M11 13h4",key:"1p7l4v"}],["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2",ry:"2",key:"1m3agn"}]],of=ut("square-terminal",jyn);/** * @license lucide-react v1.23.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. - */const Vbn=[["circle",{cx:"12",cy:"12",r:"4",key:"4exip2"}],["path",{d:"M12 2v2",key:"tus03m"}],["path",{d:"M12 20v2",key:"1lh1kg"}],["path",{d:"m4.93 4.93 1.41 1.41",key:"149t6j"}],["path",{d:"m17.66 17.66 1.41 1.41",key:"ptbguv"}],["path",{d:"M2 12h2",key:"1t8f8n"}],["path",{d:"M20 12h2",key:"1q8mjw"}],["path",{d:"m6.34 17.66-1.41 1.41",key:"1m8zz5"}],["path",{d:"m19.07 4.93-1.41 1.41",key:"1shlcs"}]],Kbn=ut("sun",Vbn);/** + */const Tyn=[["circle",{cx:"12",cy:"12",r:"4",key:"4exip2"}],["path",{d:"M12 2v2",key:"tus03m"}],["path",{d:"M12 20v2",key:"1lh1kg"}],["path",{d:"m4.93 4.93 1.41 1.41",key:"149t6j"}],["path",{d:"m17.66 17.66 1.41 1.41",key:"ptbguv"}],["path",{d:"M2 12h2",key:"1t8f8n"}],["path",{d:"M20 12h2",key:"1q8mjw"}],["path",{d:"m6.34 17.66-1.41 1.41",key:"1m8zz5"}],["path",{d:"m19.07 4.93-1.41 1.41",key:"1shlcs"}]],Ayn=ut("sun",Tyn);/** * @license lucide-react v1.23.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. - */const Wbn=[["path",{d:"M12 19h8",key:"baeox8"}],["path",{d:"m4 17 6-6-6-6",key:"1yngyt"}]],co=ut("terminal",Wbn);/** + */const Ryn=[["path",{d:"M12 19h8",key:"baeox8"}],["path",{d:"m4 17 6-6-6-6",key:"1yngyt"}]],co=ut("terminal",Ryn);/** * @license lucide-react v1.23.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. - */const Qbn=[["circle",{cx:"15",cy:"12",r:"3",key:"1afu0r"}],["rect",{width:"20",height:"14",x:"2",y:"5",rx:"7",key:"g7kal2"}]],Xbn=ut("toggle-right",Qbn);/** + */const Myn=[["circle",{cx:"15",cy:"12",r:"3",key:"1afu0r"}],["rect",{width:"20",height:"14",x:"2",y:"5",rx:"7",key:"g7kal2"}]],Oyn=ut("toggle-right",Myn);/** * @license lucide-react v1.23.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. - */const Ybn=[["path",{d:"M10 11v6",key:"nco0om"}],["path",{d:"M14 11v6",key:"outv1u"}],["path",{d:"M19 6v14a2 2 0 0 1-2 2H7a2 2 0 0 1-2-2V6",key:"miytrc"}],["path",{d:"M3 6h18",key:"d0wm0j"}],["path",{d:"M8 6V4a2 2 0 0 1 2-2h4a2 2 0 0 1 2 2v2",key:"e791ji"}]],lf=ut("trash-2",Ybn);/** + */const Dyn=[["path",{d:"M10 11v6",key:"nco0om"}],["path",{d:"M14 11v6",key:"outv1u"}],["path",{d:"M19 6v14a2 2 0 0 1-2 2H7a2 2 0 0 1-2-2V6",key:"miytrc"}],["path",{d:"M3 6h18",key:"d0wm0j"}],["path",{d:"M8 6V4a2 2 0 0 1 2-2h4a2 2 0 0 1 2 2v2",key:"e791ji"}]],lf=ut("trash-2",Dyn);/** * @license lucide-react v1.23.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. - */const Zbn=[["path",{d:"m21.73 18-8-14a2 2 0 0 0-3.48 0l-8 14A2 2 0 0 0 4 21h16a2 2 0 0 0 1.73-3",key:"wmoenq"}],["path",{d:"M12 9v4",key:"juzpu7"}],["path",{d:"M12 17h.01",key:"p32p05"}]],iS=ut("triangle-alert",Zbn);/** + */const Lyn=[["path",{d:"m21.73 18-8-14a2 2 0 0 0-3.48 0l-8 14A2 2 0 0 0 4 21h16a2 2 0 0 0 1.73-3",key:"wmoenq"}],["path",{d:"M12 9v4",key:"juzpu7"}],["path",{d:"M12 17h.01",key:"p32p05"}]],iS=ut("triangle-alert",Lyn);/** * @license lucide-react v1.23.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. - */const Jbn=[["path",{d:"M12 3v12",key:"1x0j5s"}],["path",{d:"m17 8-5-5-5 5",key:"7q97r8"}],["path",{d:"M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4",key:"ih7n3h"}]],eyn=ut("upload",Jbn);/** + */const Iyn=[["path",{d:"M12 3v12",key:"1x0j5s"}],["path",{d:"m17 8-5-5-5 5",key:"7q97r8"}],["path",{d:"M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4",key:"ih7n3h"}]],$yn=ut("upload",Iyn);/** * @license lucide-react v1.23.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. - */const tyn=[["path",{d:"M16 21v-2a4 4 0 0 0-4-4H6a4 4 0 0 0-4 4v2",key:"1yyitq"}],["path",{d:"M16 3.128a4 4 0 0 1 0 7.744",key:"16gr8j"}],["path",{d:"M22 21v-2a4 4 0 0 0-3-3.87",key:"kshegd"}],["circle",{cx:"9",cy:"7",r:"4",key:"nufk8"}]],aS=ut("users",tyn);/** + */const Byn=[["path",{d:"M16 21v-2a4 4 0 0 0-4-4H6a4 4 0 0 0-4 4v2",key:"1yyitq"}],["path",{d:"M16 3.128a4 4 0 0 1 0 7.744",key:"16gr8j"}],["path",{d:"M22 21v-2a4 4 0 0 0-3-3.87",key:"kshegd"}],["circle",{cx:"9",cy:"7",r:"4",key:"nufk8"}]],aS=ut("users",Byn);/** * @license lucide-react v1.23.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. - */const nyn=[["path",{d:"m21.64 3.64-1.28-1.28a1.21 1.21 0 0 0-1.72 0L2.36 18.64a1.21 1.21 0 0 0 0 1.72l1.28 1.28a1.2 1.2 0 0 0 1.72 0L21.64 5.36a1.2 1.2 0 0 0 0-1.72",key:"ul74o6"}],["path",{d:"m14 7 3 3",key:"1r5n42"}],["path",{d:"M5 6v4",key:"ilb8ba"}],["path",{d:"M19 14v4",key:"blhpug"}],["path",{d:"M10 2v2",key:"7u0qdc"}],["path",{d:"M7 8H3",key:"zfb6yr"}],["path",{d:"M21 16h-4",key:"1cnmox"}],["path",{d:"M11 3H9",key:"1obp7u"}]],NI=ut("wand-sparkles",nyn);/** + */const Pyn=[["path",{d:"m21.64 3.64-1.28-1.28a1.21 1.21 0 0 0-1.72 0L2.36 18.64a1.21 1.21 0 0 0 0 1.72l1.28 1.28a1.2 1.2 0 0 0 1.72 0L21.64 5.36a1.2 1.2 0 0 0 0-1.72",key:"ul74o6"}],["path",{d:"m14 7 3 3",key:"1r5n42"}],["path",{d:"M5 6v4",key:"ilb8ba"}],["path",{d:"M19 14v4",key:"blhpug"}],["path",{d:"M10 2v2",key:"7u0qdc"}],["path",{d:"M7 8H3",key:"zfb6yr"}],["path",{d:"M21 16h-4",key:"1cnmox"}],["path",{d:"M11 3H9",key:"1obp7u"}]],jI=ut("wand-sparkles",Pyn);/** * @license lucide-react v1.23.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. - */const ryn=[["path",{d:"M18 6 6 18",key:"1bl5f8"}],["path",{d:"m6 6 12 12",key:"d8bk6v"}]],_r=ut("x",ryn);/** + */const Fyn=[["path",{d:"M18 6 6 18",key:"1bl5f8"}],["path",{d:"m6 6 12 12",key:"d8bk6v"}]],_r=ut("x",Fyn);/** * @license lucide-react v1.23.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. - */const syn=[["path",{d:"M4 14a1 1 0 0 1-.78-1.63l9.9-10.2a.5.5 0 0 1 .86.46l-1.92 6.02A1 1 0 0 0 13 10h7a1 1 0 0 1 .78 1.63l-9.9 10.2a.5.5 0 0 1-.86-.46l1.92-6.02A1 1 0 0 0 11 14z",key:"1xq2db"}]],iyn=ut("zap",syn);function pu(e,n){return e&&Object.hasOwn(e.tasks,n)?e.tasks[n]:void 0}const ayn=["settings","harnesses","projects","compute","instances","environment","git","storage"],oyn=e=>ayn.some(n=>n===e),cf=e=>typeof e=="object"&&e!==null&&!Array.isArray(e),Vi=e=>typeof e=="string"&&e.length>0,Yg=e=>e==null||Vi(e);function oS(e){if(!cf(e))return;const n=(...t)=>Object.keys(e).every(r=>t.includes(r));switch(e.kind){case"home":if(n("kind","view")&&(e.view==="experiments"||e.view==="files"||e.view==="artifacts"||e.view==="terminal"))return{kind:"home",view:e.view};break;case"experiment":if(n("kind","experimentId","view","runId")&&Vi(e.experimentId)&&(e.view==="overview"||e.view==="terminal")&&Yg(e.runId))return{kind:"experiment",experimentId:e.experimentId,view:e.view,...Vi(e.runId)?{runId:e.runId}:{}};break;case"file":if(n("kind","path","source","sessionId","ref","line","branchLabel")&&Vi(e.path)&&Yg(e.sessionId)&&Yg(e.ref)&&Yg(e.branchLabel)&&(e.source==null||e.source==="repo"||e.source==="artifacts"||e.source==="abs")&&(e.line==null||typeof e.line=="number"&&Number.isSafeInteger(e.line)&&e.line>0))return{kind:"file",path:e.path,...e.source?{source:e.source}:{},...Vi(e.sessionId)?{sessionId:e.sessionId}:{},...Vi(e.ref)?{ref:e.ref}:{},...typeof e.line=="number"?{line:e.line}:{},...Vi(e.branchLabel)?{branchLabel:e.branchLabel}:{}};break;case"code":if(n("kind","experimentId","branch","view")&&Vi(e.experimentId)&&Vi(e.branch)&&(e.view==="files"||e.view==="changes"))return{kind:"code",experimentId:e.experimentId,branch:e.branch,view:e.view};break;case"plan":if(n("kind","sessionId","promptId")&&Vi(e.sessionId)&&Vi(e.promptId))return{kind:"plan",sessionId:e.sessionId,promptId:e.promptId};break;case"subagent":if(n("kind","sessionId","spawnPartId")&&Vi(e.sessionId)&&Vi(e.spawnPartId))return{kind:"subagent",sessionId:e.sessionId,spawnPartId:e.spawnPartId}}}function U_(e){if(e==="/projects")return{kind:"home"};const n=e.split("/");if(n[0]!==""||n[1]!=="projects"||!n[2])return null;let t,r;try{t=decodeURIComponent(n[2]),r=decodeURIComponent(n[4]??"")}catch{return null}const s=i=>i.length>0&&i!=="."&&i!==".."&&!/[\\/?#\u0000-\u001f\u007f-\u009f]/.test(i);return s(t)?n.length===3||n.length===4&&n[3]===""?{kind:"resume",projectId:t}:n.length===4&&n[3]==="skills"?{kind:"skills",projectId:t}:n.length===5&&n[3]==="tasks"&&s(r)?{kind:"task",projectId:t,...r==="new"?{}:{sessionId:r}}:n.length===5&&n[3]==="settings"&&oyn(r)?{kind:"settings",projectId:t,section:r}:null:null}function Nb(e){if(typeof e!="string"||!e.startsWith("/")||e.startsWith("//")||/[\\#\u0000-\u001f\u007f-\u009f]/.test(e))return null;const n=e.indexOf("?"),t=n===-1?e:e.slice(0,n),r=n===-1?"":e.slice(n+1),s=U_(t);if(!s||s.kind==="resume")return null;const i=new URLSearchParams(r);if([...i.keys()].some(a=>a!=="pane")||i.getAll("pane").length>1)return null;if(i.has("pane"))try{if(!oS(JSON.parse(i.get("pane")??"")))return null}catch{return null}return e}function P1(e,n,t){const r=`/projects/${encodeURIComponent(e)}/tasks/${n?encodeURIComponent(n):"new"}`;return t?`${r}?${new URLSearchParams({pane:JSON.stringify(t)})}`:r}const Vz=()=>({version:1,lastTaskId:null,lastLocation:null,tasks:{}});function zI(e,n){let t,r,s=!1,i=!1,a;async function o(l=!1){if(clearTimeout(a),i||(i=l),s||t===void 0)return;s=!0;const u=t;t=void 0;const h=i;i=!1;try{await e(u,h),r=void 0}catch(_){r=u,n(_)}finally{s=!1,t!==void 0&&o()}}return{queue(l,u=0){t=l,clearTimeout(a),a=setTimeout(()=>void o(),u)},flush:o,retry(){return!s&&t===void 0&&(t=r),o()}}}var J2={exports:{}},Kz;function lyn(){return Kz||(Kz=1,(function(e,n){(function(t,r){e.exports=r()})(self,(()=>(()=>{var t={};return(()=>{var r=t;Object.defineProperty(r,"__esModule",{value:!0}),r.FitAddon=void 0,r.FitAddon=class{activate(s){this._terminal=s}dispose(){}fit(){const s=this.proposeDimensions();if(!s||!this._terminal||isNaN(s.cols)||isNaN(s.rows))return;const i=this._terminal._core;this._terminal.rows===s.rows&&this._terminal.cols===s.cols||(i._renderService.clear(),this._terminal.resize(s.cols,s.rows))}proposeDimensions(){if(!this._terminal||!this._terminal.element||!this._terminal.element.parentElement)return;const s=this._terminal._core,i=s._renderService.dimensions;if(i.css.cell.width===0||i.css.cell.height===0)return;const a=this._terminal.options.scrollback===0?0:s.viewport.scrollBarWidth,o=window.getComputedStyle(this._terminal.element.parentElement),l=parseInt(o.getPropertyValue("height")),u=Math.max(0,parseInt(o.getPropertyValue("width"))),h=window.getComputedStyle(this._terminal.element),_=l-(parseInt(h.getPropertyValue("padding-top"))+parseInt(h.getPropertyValue("padding-bottom"))),p=u-(parseInt(h.getPropertyValue("padding-right"))+parseInt(h.getPropertyValue("padding-left")))-a;return{cols:Math.max(2,Math.floor(p/i.css.cell.width)),rows:Math.max(1,Math.floor(_/i.css.cell.height))}}}})(),t})()))})(J2)),J2.exports}var cyn=lyn(),ew={exports:{}},Wz;function uyn(){return Wz||(Wz=1,(function(e,n){(function(t,r){e.exports=r()})(self,(()=>(()=>{var t={6:(a,o)=>{function l(h){try{const _=new URL(h),p=_.password&&_.username?`${_.protocol}//${_.username}:${_.password}@${_.host}`:_.username?`${_.protocol}//${_.username}@${_.host}`:`${_.protocol}//${_.host}`;return h.toLocaleLowerCase().startsWith(p.toLocaleLowerCase())}catch{return!1}}Object.defineProperty(o,"__esModule",{value:!0}),o.LinkComputer=o.WebLinkProvider=void 0,o.WebLinkProvider=class{constructor(h,_,p,m={}){this._terminal=h,this._regex=_,this._handler=p,this._options=m}provideLinks(h,_){const p=u.computeLink(h,this._regex,this._terminal,this._handler);_(this._addCallbacks(p))}_addCallbacks(h){return h.map((_=>(_.leave=this._options.leave,_.hover=(p,m)=>{if(this._options.hover){const{range:x}=_;this._options.hover(p,m,x)}},_)))}};class u{static computeLink(_,p,m,x){const k=new RegExp(p.source,(p.flags||"")+"g"),[v,b]=u._getWindowedLineStrings(_-1,m),w=v.join("");let y;const C=[];for(;y=k.exec(w);){const N=y[0];if(!l(N))continue;const[E,T]=u._mapStrIdx(m,b,0,y.index),[j,M]=u._mapStrIdx(m,E,T,N.length);if(E===-1||T===-1||j===-1||M===-1)continue;const D={start:{x:T+1,y:E+1},end:{x:M,y:j+1}};C.push({range:D,text:N,activate:x})}return C}static _getWindowedLineStrings(_,p){let m,x=_,k=_,v=0,b="";const w=[];if(m=p.buffer.active.getLine(_)){const y=m.translateToString(!0);if(m.isWrapped&&y[0]!==" "){for(v=0;(m=p.buffer.active.getLine(--x))&&v<2048&&(b=m.translateToString(!0),v+=b.length,w.push(b),m.isWrapped&&b.indexOf(" ")===-1););w.reverse()}for(w.push(y),v=0;(m=p.buffer.active.getLine(++k))&&m.isWrapped&&v<2048&&(b=m.translateToString(!0),v+=b.length,w.push(b),b.indexOf(" ")===-1););}return[w,x]}static _mapStrIdx(_,p,m,x){const k=_.buffer.active,v=k.getNullCell();let b=m;for(;x;){const w=k.getLine(p);if(!w)return[-1,-1];for(let y=b;y{var a=i;Object.defineProperty(a,"__esModule",{value:!0}),a.WebLinksAddon=void 0;const o=s(6),l=/(https?|HTTPS?):[/]{2}[^\s"'!*(){}|\\\^<>`]*[^\s"':,.!?{}|\\\^~\[\]`()<>]/;function u(h,_){const p=window.open();if(p){try{p.opener=null}catch{}p.location.href=_}else console.warn("Opening link blocked as opener could not be cleared")}a.WebLinksAddon=class{constructor(h=u,_={}){this._handler=h,this._options=_}activate(h){this._terminal=h;const _=this._options,p=_.urlRegex||l;this._linkProvider=this._terminal.registerLinkProvider(new o.WebLinkProvider(this._terminal,p,this._handler,_))}dispose(){var h;(h=this._linkProvider)==null||h.dispose()}}})(),i})()))})(ew)),ew.exports}var _yn=uyn(),tw={exports:{}},Qz;function fyn(){return Qz||(Qz=1,(function(e,n){(function(t,r){e.exports=r()})(globalThis,(()=>(()=>{var t={4567:function(a,o,l){var u=this&&this.__decorate||function(w,y,C,N){var E,T=arguments.length,j=T<3?y:N===null?N=Object.getOwnPropertyDescriptor(y,C):N;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")j=Reflect.decorate(w,y,C,N);else for(var M=w.length-1;M>=0;M--)(E=w[M])&&(j=(T<3?E(j):T>3?E(y,C,j):E(y,C))||j);return T>3&&j&&Object.defineProperty(y,C,j),j},h=this&&this.__param||function(w,y){return function(C,N){y(C,N,w)}};Object.defineProperty(o,"__esModule",{value:!0}),o.AccessibilityManager=void 0;const _=l(9042),p=l(9924),m=l(844),x=l(4725),k=l(2585),v=l(3656);let b=o.AccessibilityManager=class extends m.Disposable{constructor(w,y,C,N){super(),this._terminal=w,this._coreBrowserService=C,this._renderService=N,this._rowColumns=new WeakMap,this._liveRegionLineCount=0,this._charsToConsume=[],this._charsToAnnounce="",this._accessibilityContainer=this._coreBrowserService.mainDocument.createElement("div"),this._accessibilityContainer.classList.add("xterm-accessibility"),this._rowContainer=this._coreBrowserService.mainDocument.createElement("div"),this._rowContainer.setAttribute("role","list"),this._rowContainer.classList.add("xterm-accessibility-tree"),this._rowElements=[];for(let E=0;Ethis._handleBoundaryFocus(E,0),this._bottomBoundaryFocusListener=E=>this._handleBoundaryFocus(E,1),this._rowElements[0].addEventListener("focus",this._topBoundaryFocusListener),this._rowElements[this._rowElements.length-1].addEventListener("focus",this._bottomBoundaryFocusListener),this._refreshRowsDimensions(),this._accessibilityContainer.appendChild(this._rowContainer),this._liveRegion=this._coreBrowserService.mainDocument.createElement("div"),this._liveRegion.classList.add("live-region"),this._liveRegion.setAttribute("aria-live","assertive"),this._accessibilityContainer.appendChild(this._liveRegion),this._liveRegionDebouncer=this.register(new p.TimeBasedDebouncer(this._renderRows.bind(this))),!this._terminal.element)throw new Error("Cannot enable accessibility before Terminal.open");this._terminal.element.insertAdjacentElement("afterbegin",this._accessibilityContainer),this.register(this._terminal.onResize((E=>this._handleResize(E.rows)))),this.register(this._terminal.onRender((E=>this._refreshRows(E.start,E.end)))),this.register(this._terminal.onScroll((()=>this._refreshRows()))),this.register(this._terminal.onA11yChar((E=>this._handleChar(E)))),this.register(this._terminal.onLineFeed((()=>this._handleChar(` -`)))),this.register(this._terminal.onA11yTab((E=>this._handleTab(E)))),this.register(this._terminal.onKey((E=>this._handleKey(E.key)))),this.register(this._terminal.onBlur((()=>this._clearLiveRegion()))),this.register(this._renderService.onDimensionsChange((()=>this._refreshRowsDimensions()))),this.register((0,v.addDisposableDomListener)(document,"selectionchange",(()=>this._handleSelectionChange()))),this.register(this._coreBrowserService.onDprChange((()=>this._refreshRowsDimensions()))),this._refreshRows(),this.register((0,m.toDisposable)((()=>{this._accessibilityContainer.remove(),this._rowElements.length=0})))}_handleTab(w){for(let y=0;y0?this._charsToConsume.shift()!==w&&(this._charsToAnnounce+=w):this._charsToAnnounce+=w,w===` -`&&(this._liveRegionLineCount++,this._liveRegionLineCount===21&&(this._liveRegion.textContent+=_.tooMuchOutput)))}_clearLiveRegion(){this._liveRegion.textContent="",this._liveRegionLineCount=0}_handleKey(w){this._clearLiveRegion(),new RegExp("\\p{Control}","u").test(w)||this._charsToConsume.push(w)}_refreshRows(w,y){this._liveRegionDebouncer.refresh(w,y,this._terminal.rows)}_renderRows(w,y){const C=this._terminal.buffer,N=C.lines.length.toString();for(let E=w;E<=y;E++){const T=C.lines.get(C.ydisp+E),j=[],M=(T==null?void 0:T.translateToString(!0,void 0,void 0,j))||"",D=(C.ydisp+E+1).toString(),I=this._rowElements[E];I&&(M.length===0?(I.innerText=" ",this._rowColumns.set(I,[0,1])):(I.textContent=M,this._rowColumns.set(I,j)),I.setAttribute("aria-posinset",D),I.setAttribute("aria-setsize",N))}this._announceCharacters()}_announceCharacters(){this._charsToAnnounce.length!==0&&(this._liveRegion.textContent+=this._charsToAnnounce,this._charsToAnnounce="")}_handleBoundaryFocus(w,y){const C=w.target,N=this._rowElements[y===0?1:this._rowElements.length-2];if(C.getAttribute("aria-posinset")===(y===0?"1":`${this._terminal.buffer.lines.length}`)||w.relatedTarget!==N)return;let E,T;if(y===0?(E=C,T=this._rowElements.pop(),this._rowContainer.removeChild(T)):(E=this._rowElements.shift(),T=C,this._rowContainer.removeChild(E)),E.removeEventListener("focus",this._topBoundaryFocusListener),T.removeEventListener("focus",this._bottomBoundaryFocusListener),y===0){const j=this._createAccessibilityTreeNode();this._rowElements.unshift(j),this._rowContainer.insertAdjacentElement("afterbegin",j)}else{const j=this._createAccessibilityTreeNode();this._rowElements.push(j),this._rowContainer.appendChild(j)}this._rowElements[0].addEventListener("focus",this._topBoundaryFocusListener),this._rowElements[this._rowElements.length-1].addEventListener("focus",this._bottomBoundaryFocusListener),this._terminal.scrollLines(y===0?-1:1),this._rowElements[y===0?1:this._rowElements.length-2].focus(),w.preventDefault(),w.stopImmediatePropagation()}_handleSelectionChange(){var M;if(this._rowElements.length===0)return;const w=document.getSelection();if(!w)return;if(w.isCollapsed)return void(this._rowContainer.contains(w.anchorNode)&&this._terminal.clearSelection());if(!w.anchorNode||!w.focusNode)return void console.error("anchorNode and/or focusNode are null");let y={node:w.anchorNode,offset:w.anchorOffset},C={node:w.focusNode,offset:w.focusOffset};if((y.node.compareDocumentPosition(C.node)&Node.DOCUMENT_POSITION_PRECEDING||y.node===C.node&&y.offset>C.offset)&&([y,C]=[C,y]),y.node.compareDocumentPosition(this._rowElements[0])&(Node.DOCUMENT_POSITION_CONTAINED_BY|Node.DOCUMENT_POSITION_FOLLOWING)&&(y={node:this._rowElements[0].childNodes[0],offset:0}),!this._rowContainer.contains(y.node))return;const N=this._rowElements.slice(-1)[0];if(C.node.compareDocumentPosition(N)&(Node.DOCUMENT_POSITION_CONTAINED_BY|Node.DOCUMENT_POSITION_PRECEDING)&&(C={node:N,offset:((M=N.textContent)==null?void 0:M.length)??0}),!this._rowContainer.contains(C.node))return;const E=({node:D,offset:I})=>{const P=D instanceof Text?D.parentNode:D;let U=parseInt(P==null?void 0:P.getAttribute("aria-posinset"),10)-1;if(isNaN(U))return console.warn("row is invalid. Race condition?"),null;const q=this._rowColumns.get(P);if(!q)return console.warn("columns is null. Race condition?"),null;let W=I=this._terminal.cols&&(++U,W=0),{row:U,column:W}},T=E(y),j=E(C);if(T&&j){if(T.row>j.row||T.row===j.row&&T.column>=j.column)throw new Error("invalid range");this._terminal.select(T.column,T.row,(j.row-T.row)*this._terminal.cols-T.column+j.column)}}_handleResize(w){this._rowElements[this._rowElements.length-1].removeEventListener("focus",this._bottomBoundaryFocusListener);for(let y=this._rowContainer.children.length;yw;)this._rowContainer.removeChild(this._rowElements.pop());this._rowElements[this._rowElements.length-1].addEventListener("focus",this._bottomBoundaryFocusListener),this._refreshRowsDimensions()}_createAccessibilityTreeNode(){const w=this._coreBrowserService.mainDocument.createElement("div");return w.setAttribute("role","listitem"),w.tabIndex=-1,this._refreshRowDimensions(w),w}_refreshRowsDimensions(){if(this._renderService.dimensions.css.cell.height){this._accessibilityContainer.style.width=`${this._renderService.dimensions.css.canvas.width}px`,this._rowElements.length!==this._terminal.rows&&this._handleResize(this._terminal.rows);for(let w=0;w{function l(p){return p.replace(/\r?\n/g,"\r")}function u(p,m){return m?"\x1B[200~"+p+"\x1B[201~":p}function h(p,m,x,k){p=u(p=l(p),x.decPrivateModes.bracketedPasteMode&&k.rawOptions.ignoreBracketedPasteMode!==!0),x.triggerDataEvent(p,!0),m.value=""}function _(p,m,x){const k=x.getBoundingClientRect(),v=p.clientX-k.left-10,b=p.clientY-k.top-10;m.style.width="20px",m.style.height="20px",m.style.left=`${v}px`,m.style.top=`${b}px`,m.style.zIndex="1000",m.focus()}Object.defineProperty(o,"__esModule",{value:!0}),o.rightClickHandler=o.moveTextAreaUnderMouseCursor=o.paste=o.handlePasteEvent=o.copyHandler=o.bracketTextForPaste=o.prepareTextForTerminal=void 0,o.prepareTextForTerminal=l,o.bracketTextForPaste=u,o.copyHandler=function(p,m){p.clipboardData&&p.clipboardData.setData("text/plain",m.selectionText),p.preventDefault()},o.handlePasteEvent=function(p,m,x,k){p.stopPropagation(),p.clipboardData&&h(p.clipboardData.getData("text/plain"),m,x,k)},o.paste=h,o.moveTextAreaUnderMouseCursor=_,o.rightClickHandler=function(p,m,x,k,v){_(p,m,x),v&&k.rightClickSelect(p),m.value=k.selectionText,m.select()}},7239:(a,o,l)=>{Object.defineProperty(o,"__esModule",{value:!0}),o.ColorContrastCache=void 0;const u=l(1505);o.ColorContrastCache=class{constructor(){this._color=new u.TwoKeyMap,this._css=new u.TwoKeyMap}setCss(h,_,p){this._css.set(h,_,p)}getCss(h,_){return this._css.get(h,_)}setColor(h,_,p){this._color.set(h,_,p)}getColor(h,_){return this._color.get(h,_)}clear(){this._color.clear(),this._css.clear()}}},3656:(a,o)=>{Object.defineProperty(o,"__esModule",{value:!0}),o.addDisposableDomListener=void 0,o.addDisposableDomListener=function(l,u,h,_){l.addEventListener(u,h,_);let p=!1;return{dispose:()=>{p||(p=!0,l.removeEventListener(u,h,_))}}}},3551:function(a,o,l){var u=this&&this.__decorate||function(b,w,y,C){var N,E=arguments.length,T=E<3?w:C===null?C=Object.getOwnPropertyDescriptor(w,y):C;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")T=Reflect.decorate(b,w,y,C);else for(var j=b.length-1;j>=0;j--)(N=b[j])&&(T=(E<3?N(T):E>3?N(w,y,T):N(w,y))||T);return E>3&&T&&Object.defineProperty(w,y,T),T},h=this&&this.__param||function(b,w){return function(y,C){w(y,C,b)}};Object.defineProperty(o,"__esModule",{value:!0}),o.Linkifier=void 0;const _=l(3656),p=l(8460),m=l(844),x=l(2585),k=l(4725);let v=o.Linkifier=class extends m.Disposable{get currentLink(){return this._currentLink}constructor(b,w,y,C,N){super(),this._element=b,this._mouseService=w,this._renderService=y,this._bufferService=C,this._linkProviderService=N,this._linkCacheDisposables=[],this._isMouseOut=!0,this._wasResized=!1,this._activeLine=-1,this._onShowLinkUnderline=this.register(new p.EventEmitter),this.onShowLinkUnderline=this._onShowLinkUnderline.event,this._onHideLinkUnderline=this.register(new p.EventEmitter),this.onHideLinkUnderline=this._onHideLinkUnderline.event,this.register((0,m.getDisposeArrayDisposable)(this._linkCacheDisposables)),this.register((0,m.toDisposable)((()=>{var E;this._lastMouseEvent=void 0,(E=this._activeProviderReplies)==null||E.clear()}))),this.register(this._bufferService.onResize((()=>{this._clearCurrentLink(),this._wasResized=!0}))),this.register((0,_.addDisposableDomListener)(this._element,"mouseleave",(()=>{this._isMouseOut=!0,this._clearCurrentLink()}))),this.register((0,_.addDisposableDomListener)(this._element,"mousemove",this._handleMouseMove.bind(this))),this.register((0,_.addDisposableDomListener)(this._element,"mousedown",this._handleMouseDown.bind(this))),this.register((0,_.addDisposableDomListener)(this._element,"mouseup",this._handleMouseUp.bind(this)))}_handleMouseMove(b){this._lastMouseEvent=b;const w=this._positionFromMouseEvent(b,this._element,this._mouseService);if(!w)return;this._isMouseOut=!1;const y=b.composedPath();for(let C=0;C{E==null||E.forEach((T=>{T.link.dispose&&T.link.dispose()}))})),this._activeProviderReplies=new Map,this._activeLine=b.y);let y=!1;for(const[E,T]of this._linkProviderService.linkProviders.entries())w?(N=this._activeProviderReplies)!=null&&N.get(E)&&(y=this._checkLinkProviderResult(E,b,y)):T.provideLinks(b.y,(j=>{var D,I;if(this._isMouseOut)return;const M=j==null?void 0:j.map((P=>({link:P})));(D=this._activeProviderReplies)==null||D.set(E,M),y=this._checkLinkProviderResult(E,b,y),((I=this._activeProviderReplies)==null?void 0:I.size)===this._linkProviderService.linkProviders.length&&this._removeIntersectingLinks(b.y,this._activeProviderReplies)}))}_removeIntersectingLinks(b,w){const y=new Set;for(let C=0;Cb?this._bufferService.cols:T.link.range.end.x;for(let D=j;D<=M;D++){if(y.has(D)){N.splice(E--,1);break}y.add(D)}}}}_checkLinkProviderResult(b,w,y){var E;if(!this._activeProviderReplies)return y;const C=this._activeProviderReplies.get(b);let N=!1;for(let T=0;Tthis._linkAtPosition(j.link,w)));T&&(y=!0,this._handleNewLink(T))}if(this._activeProviderReplies.size===this._linkProviderService.linkProviders.length&&!y)for(let T=0;Tthis._linkAtPosition(M.link,w)));if(j){y=!0,this._handleNewLink(j);break}}return y}_handleMouseDown(){this._mouseDownLink=this._currentLink}_handleMouseUp(b){if(!this._currentLink)return;const w=this._positionFromMouseEvent(b,this._element,this._mouseService);w&&this._mouseDownLink===this._currentLink&&this._linkAtPosition(this._currentLink.link,w)&&this._currentLink.link.activate(b,this._currentLink.link.text)}_clearCurrentLink(b,w){this._currentLink&&this._lastMouseEvent&&(!b||!w||this._currentLink.link.range.start.y>=b&&this._currentLink.link.range.end.y<=w)&&(this._linkLeave(this._element,this._currentLink.link,this._lastMouseEvent),this._currentLink=void 0,(0,m.disposeArray)(this._linkCacheDisposables))}_handleNewLink(b){if(!this._lastMouseEvent)return;const w=this._positionFromMouseEvent(this._lastMouseEvent,this._element,this._mouseService);w&&this._linkAtPosition(b.link,w)&&(this._currentLink=b,this._currentLink.state={decorations:{underline:b.link.decorations===void 0||b.link.decorations.underline,pointerCursor:b.link.decorations===void 0||b.link.decorations.pointerCursor},isHovered:!0},this._linkHover(this._element,b.link,this._lastMouseEvent),b.link.decorations={},Object.defineProperties(b.link.decorations,{pointerCursor:{get:()=>{var y,C;return(C=(y=this._currentLink)==null?void 0:y.state)==null?void 0:C.decorations.pointerCursor},set:y=>{var C;(C=this._currentLink)!=null&&C.state&&this._currentLink.state.decorations.pointerCursor!==y&&(this._currentLink.state.decorations.pointerCursor=y,this._currentLink.state.isHovered&&this._element.classList.toggle("xterm-cursor-pointer",y))}},underline:{get:()=>{var y,C;return(C=(y=this._currentLink)==null?void 0:y.state)==null?void 0:C.decorations.underline},set:y=>{var C,N,E;(C=this._currentLink)!=null&&C.state&&((E=(N=this._currentLink)==null?void 0:N.state)==null?void 0:E.decorations.underline)!==y&&(this._currentLink.state.decorations.underline=y,this._currentLink.state.isHovered&&this._fireUnderlineEvent(b.link,y))}}}),this._linkCacheDisposables.push(this._renderService.onRenderedViewportChange((y=>{if(!this._currentLink)return;const C=y.start===0?0:y.start+1+this._bufferService.buffer.ydisp,N=this._bufferService.buffer.ydisp+1+y.end;if(this._currentLink.link.range.start.y>=C&&this._currentLink.link.range.end.y<=N&&(this._clearCurrentLink(C,N),this._lastMouseEvent)){const E=this._positionFromMouseEvent(this._lastMouseEvent,this._element,this._mouseService);E&&this._askForLink(E,!1)}}))))}_linkHover(b,w,y){var C;(C=this._currentLink)!=null&&C.state&&(this._currentLink.state.isHovered=!0,this._currentLink.state.decorations.underline&&this._fireUnderlineEvent(w,!0),this._currentLink.state.decorations.pointerCursor&&b.classList.add("xterm-cursor-pointer")),w.hover&&w.hover(y,w.text)}_fireUnderlineEvent(b,w){const y=b.range,C=this._bufferService.buffer.ydisp,N=this._createLinkUnderlineEvent(y.start.x-1,y.start.y-C-1,y.end.x,y.end.y-C-1,void 0);(w?this._onShowLinkUnderline:this._onHideLinkUnderline).fire(N)}_linkLeave(b,w,y){var C;(C=this._currentLink)!=null&&C.state&&(this._currentLink.state.isHovered=!1,this._currentLink.state.decorations.underline&&this._fireUnderlineEvent(w,!1),this._currentLink.state.decorations.pointerCursor&&b.classList.remove("xterm-cursor-pointer")),w.leave&&w.leave(y,w.text)}_linkAtPosition(b,w){const y=b.range.start.y*this._bufferService.cols+b.range.start.x,C=b.range.end.y*this._bufferService.cols+b.range.end.x,N=w.y*this._bufferService.cols+w.x;return y<=N&&N<=C}_positionFromMouseEvent(b,w,y){const C=y.getCoords(b,w,this._bufferService.cols,this._bufferService.rows);if(C)return{x:C[0],y:C[1]+this._bufferService.buffer.ydisp}}_createLinkUnderlineEvent(b,w,y,C,N){return{x1:b,y1:w,x2:y,y2:C,cols:this._bufferService.cols,fg:N}}};o.Linkifier=v=u([h(1,k.IMouseService),h(2,k.IRenderService),h(3,x.IBufferService),h(4,k.ILinkProviderService)],v)},9042:(a,o)=>{Object.defineProperty(o,"__esModule",{value:!0}),o.tooMuchOutput=o.promptLabel=void 0,o.promptLabel="Terminal input",o.tooMuchOutput="Too much output to announce, navigate to rows manually to read"},3730:function(a,o,l){var u=this&&this.__decorate||function(k,v,b,w){var y,C=arguments.length,N=C<3?v:w===null?w=Object.getOwnPropertyDescriptor(v,b):w;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")N=Reflect.decorate(k,v,b,w);else for(var E=k.length-1;E>=0;E--)(y=k[E])&&(N=(C<3?y(N):C>3?y(v,b,N):y(v,b))||N);return C>3&&N&&Object.defineProperty(v,b,N),N},h=this&&this.__param||function(k,v){return function(b,w){v(b,w,k)}};Object.defineProperty(o,"__esModule",{value:!0}),o.OscLinkProvider=void 0;const _=l(511),p=l(2585);let m=o.OscLinkProvider=class{constructor(k,v,b){this._bufferService=k,this._optionsService=v,this._oscLinkService=b}provideLinks(k,v){var M;const b=this._bufferService.buffer.lines.get(k-1);if(!b)return void v(void 0);const w=[],y=this._optionsService.rawOptions.linkHandler,C=new _.CellData,N=b.getTrimmedLength();let E=-1,T=-1,j=!1;for(let D=0;Dy?y.activate(q,W,P):x(0,W),hover:(q,W)=>{var H;return(H=y==null?void 0:y.hover)==null?void 0:H.call(y,q,W,P)},leave:(q,W)=>{var H;return(H=y==null?void 0:y.leave)==null?void 0:H.call(y,q,W,P)}})}j=!1,C.hasExtendedAttrs()&&C.extended.urlId?(T=D,E=C.extended.urlId):(T=-1,E=-1)}}v(w)}};function x(k,v){if(confirm(`Do you want to navigate to ${v}? + */const Hyn=[["path",{d:"M4 14a1 1 0 0 1-.78-1.63l9.9-10.2a.5.5 0 0 1 .86.46l-1.92 6.02A1 1 0 0 0 13 10h7a1 1 0 0 1 .78 1.63l-9.9 10.2a.5.5 0 0 1-.86-.46l1.92-6.02A1 1 0 0 0 11 14z",key:"1xq2db"}]],qyn=ut("zap",Hyn);function mu(e,n){return e&&Object.hasOwn(e.tasks,n)?e.tasks[n]:void 0}const Uyn=["settings","harnesses","projects","compute","instances","environment","git","storage"],Gyn=e=>Uyn.some(n=>n===e),cf=e=>typeof e=="object"&&e!==null&&!Array.isArray(e),Vi=e=>typeof e=="string"&&e.length>0,Yg=e=>e==null||Vi(e);function oS(e){if(!cf(e))return;const n=(...t)=>Object.keys(e).every(r=>t.includes(r));switch(e.kind){case"home":if(n("kind","view")&&(e.view==="experiments"||e.view==="files"||e.view==="artifacts"||e.view==="terminal"))return{kind:"home",view:e.view};break;case"experiment":if(n("kind","experimentId","view","runId")&&Vi(e.experimentId)&&(e.view==="overview"||e.view==="terminal")&&Yg(e.runId))return{kind:"experiment",experimentId:e.experimentId,view:e.view,...Vi(e.runId)?{runId:e.runId}:{}};break;case"file":if(n("kind","path","source","sessionId","ref","line","branchLabel")&&Vi(e.path)&&Yg(e.sessionId)&&Yg(e.ref)&&Yg(e.branchLabel)&&(e.source==null||e.source==="repo"||e.source==="artifacts"||e.source==="abs")&&(e.line==null||typeof e.line=="number"&&Number.isSafeInteger(e.line)&&e.line>0))return{kind:"file",path:e.path,...e.source?{source:e.source}:{},...Vi(e.sessionId)?{sessionId:e.sessionId}:{},...Vi(e.ref)?{ref:e.ref}:{},...typeof e.line=="number"?{line:e.line}:{},...Vi(e.branchLabel)?{branchLabel:e.branchLabel}:{}};break;case"code":if(n("kind","experimentId","branch","view")&&Vi(e.experimentId)&&Vi(e.branch)&&(e.view==="files"||e.view==="changes"))return{kind:"code",experimentId:e.experimentId,branch:e.branch,view:e.view};break;case"plan":if(n("kind","sessionId","promptId")&&Vi(e.sessionId)&&Vi(e.promptId))return{kind:"plan",sessionId:e.sessionId,promptId:e.promptId};break;case"subagent":if(n("kind","sessionId","spawnPartId")&&Vi(e.sessionId)&&Vi(e.spawnPartId))return{kind:"subagent",sessionId:e.sessionId,spawnPartId:e.spawnPartId}}}function U_(e){if(e==="/projects")return{kind:"home"};const n=e.split("/");if(n[0]!==""||n[1]!=="projects"||!n[2])return null;let t,r;try{t=decodeURIComponent(n[2]),r=decodeURIComponent(n[4]??"")}catch{return null}const s=i=>i.length>0&&i!=="."&&i!==".."&&!/[\\/?#\u0000-\u001f\u007f-\u009f]/.test(i);return s(t)?n.length===3||n.length===4&&n[3]===""?{kind:"resume",projectId:t}:n.length===4&&n[3]==="skills"?{kind:"skills",projectId:t}:n.length===5&&n[3]==="tasks"&&s(r)?{kind:"task",projectId:t,...r==="new"?{}:{sessionId:r}}:n.length===5&&n[3]==="settings"&&Gyn(r)?{kind:"settings",projectId:t,section:r}:null:null}function Nb(e){if(typeof e!="string"||!e.startsWith("/")||e.startsWith("//")||/[\\#\u0000-\u001f\u007f-\u009f]/.test(e))return null;const n=e.indexOf("?"),t=n===-1?e:e.slice(0,n),r=n===-1?"":e.slice(n+1),s=U_(t);if(!s||s.kind==="resume")return null;const i=new URLSearchParams(r);if([...i.keys()].some(a=>a!=="pane")||i.getAll("pane").length>1)return null;if(i.has("pane"))try{if(!oS(JSON.parse(i.get("pane")??"")))return null}catch{return null}return e}function P1(e,n,t){const r=`/projects/${encodeURIComponent(e)}/tasks/${n?encodeURIComponent(n):"new"}`;return t?`${r}?${new URLSearchParams({pane:JSON.stringify(t)})}`:r}const Vz=()=>({version:1,lastTaskId:null,lastLocation:null,tasks:{}});function TI(e,n){let t,r,s=!1,i=!1,a;async function o(l=!1){if(clearTimeout(a),i||(i=l),s||t===void 0)return;s=!0;const u=t;t=void 0;const h=i;i=!1;try{await e(u,h),r=void 0}catch(_){r=u,n(_)}finally{s=!1,t!==void 0&&o()}}return{queue(l,u=0){t=l,clearTimeout(a),a=setTimeout(()=>void o(),u)},flush:o,retry(){return!s&&t===void 0&&(t=r),o()}}}var J2={exports:{}},Kz;function Vyn(){return Kz||(Kz=1,(function(e,n){(function(t,r){e.exports=r()})(self,(()=>(()=>{var t={};return(()=>{var r=t;Object.defineProperty(r,"__esModule",{value:!0}),r.FitAddon=void 0,r.FitAddon=class{activate(s){this._terminal=s}dispose(){}fit(){const s=this.proposeDimensions();if(!s||!this._terminal||isNaN(s.cols)||isNaN(s.rows))return;const i=this._terminal._core;this._terminal.rows===s.rows&&this._terminal.cols===s.cols||(i._renderService.clear(),this._terminal.resize(s.cols,s.rows))}proposeDimensions(){if(!this._terminal||!this._terminal.element||!this._terminal.element.parentElement)return;const s=this._terminal._core,i=s._renderService.dimensions;if(i.css.cell.width===0||i.css.cell.height===0)return;const a=this._terminal.options.scrollback===0?0:s.viewport.scrollBarWidth,o=window.getComputedStyle(this._terminal.element.parentElement),l=parseInt(o.getPropertyValue("height")),u=Math.max(0,parseInt(o.getPropertyValue("width"))),h=window.getComputedStyle(this._terminal.element),_=l-(parseInt(h.getPropertyValue("padding-top"))+parseInt(h.getPropertyValue("padding-bottom"))),p=u-(parseInt(h.getPropertyValue("padding-right"))+parseInt(h.getPropertyValue("padding-left")))-a;return{cols:Math.max(2,Math.floor(p/i.css.cell.width)),rows:Math.max(1,Math.floor(_/i.css.cell.height))}}}})(),t})()))})(J2)),J2.exports}var Kyn=Vyn(),ew={exports:{}},Wz;function Wyn(){return Wz||(Wz=1,(function(e,n){(function(t,r){e.exports=r()})(self,(()=>(()=>{var t={6:(a,o)=>{function l(h){try{const _=new URL(h),p=_.password&&_.username?`${_.protocol}//${_.username}:${_.password}@${_.host}`:_.username?`${_.protocol}//${_.username}@${_.host}`:`${_.protocol}//${_.host}`;return h.toLocaleLowerCase().startsWith(p.toLocaleLowerCase())}catch{return!1}}Object.defineProperty(o,"__esModule",{value:!0}),o.LinkComputer=o.WebLinkProvider=void 0,o.WebLinkProvider=class{constructor(h,_,p,m={}){this._terminal=h,this._regex=_,this._handler=p,this._options=m}provideLinks(h,_){const p=u.computeLink(h,this._regex,this._terminal,this._handler);_(this._addCallbacks(p))}_addCallbacks(h){return h.map((_=>(_.leave=this._options.leave,_.hover=(p,m)=>{if(this._options.hover){const{range:x}=_;this._options.hover(p,m,x)}},_)))}};class u{static computeLink(_,p,m,x){const k=new RegExp(p.source,(p.flags||"")+"g"),[v,b]=u._getWindowedLineStrings(_-1,m),w=v.join("");let y;const C=[];for(;y=k.exec(w);){const E=y[0];if(!l(E))continue;const[N,A]=u._mapStrIdx(m,b,0,y.index),[j,M]=u._mapStrIdx(m,N,A,E.length);if(N===-1||A===-1||j===-1||M===-1)continue;const L={start:{x:A+1,y:N+1},end:{x:M,y:j+1}};C.push({range:L,text:E,activate:x})}return C}static _getWindowedLineStrings(_,p){let m,x=_,k=_,v=0,b="";const w=[];if(m=p.buffer.active.getLine(_)){const y=m.translateToString(!0);if(m.isWrapped&&y[0]!==" "){for(v=0;(m=p.buffer.active.getLine(--x))&&v<2048&&(b=m.translateToString(!0),v+=b.length,w.push(b),m.isWrapped&&b.indexOf(" ")===-1););w.reverse()}for(w.push(y),v=0;(m=p.buffer.active.getLine(++k))&&m.isWrapped&&v<2048&&(b=m.translateToString(!0),v+=b.length,w.push(b),b.indexOf(" ")===-1););}return[w,x]}static _mapStrIdx(_,p,m,x){const k=_.buffer.active,v=k.getNullCell();let b=m;for(;x;){const w=k.getLine(p);if(!w)return[-1,-1];for(let y=b;y{var a=i;Object.defineProperty(a,"__esModule",{value:!0}),a.WebLinksAddon=void 0;const o=s(6),l=/(https?|HTTPS?):[/]{2}[^\s"'!*(){}|\\\^<>`]*[^\s"':,.!?{}|\\\^~\[\]`()<>]/;function u(h,_){const p=window.open();if(p){try{p.opener=null}catch{}p.location.href=_}else console.warn("Opening link blocked as opener could not be cleared")}a.WebLinksAddon=class{constructor(h=u,_={}){this._handler=h,this._options=_}activate(h){this._terminal=h;const _=this._options,p=_.urlRegex||l;this._linkProvider=this._terminal.registerLinkProvider(new o.WebLinkProvider(this._terminal,p,this._handler,_))}dispose(){var h;(h=this._linkProvider)==null||h.dispose()}}})(),i})()))})(ew)),ew.exports}var Qyn=Wyn(),tw={exports:{}},Qz;function Xyn(){return Qz||(Qz=1,(function(e,n){(function(t,r){e.exports=r()})(globalThis,(()=>(()=>{var t={4567:function(a,o,l){var u=this&&this.__decorate||function(w,y,C,E){var N,A=arguments.length,j=A<3?y:E===null?E=Object.getOwnPropertyDescriptor(y,C):E;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")j=Reflect.decorate(w,y,C,E);else for(var M=w.length-1;M>=0;M--)(N=w[M])&&(j=(A<3?N(j):A>3?N(y,C,j):N(y,C))||j);return A>3&&j&&Object.defineProperty(y,C,j),j},h=this&&this.__param||function(w,y){return function(C,E){y(C,E,w)}};Object.defineProperty(o,"__esModule",{value:!0}),o.AccessibilityManager=void 0;const _=l(9042),p=l(9924),m=l(844),x=l(4725),k=l(2585),v=l(3656);let b=o.AccessibilityManager=class extends m.Disposable{constructor(w,y,C,E){super(),this._terminal=w,this._coreBrowserService=C,this._renderService=E,this._rowColumns=new WeakMap,this._liveRegionLineCount=0,this._charsToConsume=[],this._charsToAnnounce="",this._accessibilityContainer=this._coreBrowserService.mainDocument.createElement("div"),this._accessibilityContainer.classList.add("xterm-accessibility"),this._rowContainer=this._coreBrowserService.mainDocument.createElement("div"),this._rowContainer.setAttribute("role","list"),this._rowContainer.classList.add("xterm-accessibility-tree"),this._rowElements=[];for(let N=0;Nthis._handleBoundaryFocus(N,0),this._bottomBoundaryFocusListener=N=>this._handleBoundaryFocus(N,1),this._rowElements[0].addEventListener("focus",this._topBoundaryFocusListener),this._rowElements[this._rowElements.length-1].addEventListener("focus",this._bottomBoundaryFocusListener),this._refreshRowsDimensions(),this._accessibilityContainer.appendChild(this._rowContainer),this._liveRegion=this._coreBrowserService.mainDocument.createElement("div"),this._liveRegion.classList.add("live-region"),this._liveRegion.setAttribute("aria-live","assertive"),this._accessibilityContainer.appendChild(this._liveRegion),this._liveRegionDebouncer=this.register(new p.TimeBasedDebouncer(this._renderRows.bind(this))),!this._terminal.element)throw new Error("Cannot enable accessibility before Terminal.open");this._terminal.element.insertAdjacentElement("afterbegin",this._accessibilityContainer),this.register(this._terminal.onResize((N=>this._handleResize(N.rows)))),this.register(this._terminal.onRender((N=>this._refreshRows(N.start,N.end)))),this.register(this._terminal.onScroll((()=>this._refreshRows()))),this.register(this._terminal.onA11yChar((N=>this._handleChar(N)))),this.register(this._terminal.onLineFeed((()=>this._handleChar(` +`)))),this.register(this._terminal.onA11yTab((N=>this._handleTab(N)))),this.register(this._terminal.onKey((N=>this._handleKey(N.key)))),this.register(this._terminal.onBlur((()=>this._clearLiveRegion()))),this.register(this._renderService.onDimensionsChange((()=>this._refreshRowsDimensions()))),this.register((0,v.addDisposableDomListener)(document,"selectionchange",(()=>this._handleSelectionChange()))),this.register(this._coreBrowserService.onDprChange((()=>this._refreshRowsDimensions()))),this._refreshRows(),this.register((0,m.toDisposable)((()=>{this._accessibilityContainer.remove(),this._rowElements.length=0})))}_handleTab(w){for(let y=0;y0?this._charsToConsume.shift()!==w&&(this._charsToAnnounce+=w):this._charsToAnnounce+=w,w===` +`&&(this._liveRegionLineCount++,this._liveRegionLineCount===21&&(this._liveRegion.textContent+=_.tooMuchOutput)))}_clearLiveRegion(){this._liveRegion.textContent="",this._liveRegionLineCount=0}_handleKey(w){this._clearLiveRegion(),new RegExp("\\p{Control}","u").test(w)||this._charsToConsume.push(w)}_refreshRows(w,y){this._liveRegionDebouncer.refresh(w,y,this._terminal.rows)}_renderRows(w,y){const C=this._terminal.buffer,E=C.lines.length.toString();for(let N=w;N<=y;N++){const A=C.lines.get(C.ydisp+N),j=[],M=(A==null?void 0:A.translateToString(!0,void 0,void 0,j))||"",L=(C.ydisp+N+1).toString(),I=this._rowElements[N];I&&(M.length===0?(I.innerText=" ",this._rowColumns.set(I,[0,1])):(I.textContent=M,this._rowColumns.set(I,j)),I.setAttribute("aria-posinset",L),I.setAttribute("aria-setsize",E))}this._announceCharacters()}_announceCharacters(){this._charsToAnnounce.length!==0&&(this._liveRegion.textContent+=this._charsToAnnounce,this._charsToAnnounce="")}_handleBoundaryFocus(w,y){const C=w.target,E=this._rowElements[y===0?1:this._rowElements.length-2];if(C.getAttribute("aria-posinset")===(y===0?"1":`${this._terminal.buffer.lines.length}`)||w.relatedTarget!==E)return;let N,A;if(y===0?(N=C,A=this._rowElements.pop(),this._rowContainer.removeChild(A)):(N=this._rowElements.shift(),A=C,this._rowContainer.removeChild(N)),N.removeEventListener("focus",this._topBoundaryFocusListener),A.removeEventListener("focus",this._bottomBoundaryFocusListener),y===0){const j=this._createAccessibilityTreeNode();this._rowElements.unshift(j),this._rowContainer.insertAdjacentElement("afterbegin",j)}else{const j=this._createAccessibilityTreeNode();this._rowElements.push(j),this._rowContainer.appendChild(j)}this._rowElements[0].addEventListener("focus",this._topBoundaryFocusListener),this._rowElements[this._rowElements.length-1].addEventListener("focus",this._bottomBoundaryFocusListener),this._terminal.scrollLines(y===0?-1:1),this._rowElements[y===0?1:this._rowElements.length-2].focus(),w.preventDefault(),w.stopImmediatePropagation()}_handleSelectionChange(){var M;if(this._rowElements.length===0)return;const w=document.getSelection();if(!w)return;if(w.isCollapsed)return void(this._rowContainer.contains(w.anchorNode)&&this._terminal.clearSelection());if(!w.anchorNode||!w.focusNode)return void console.error("anchorNode and/or focusNode are null");let y={node:w.anchorNode,offset:w.anchorOffset},C={node:w.focusNode,offset:w.focusOffset};if((y.node.compareDocumentPosition(C.node)&Node.DOCUMENT_POSITION_PRECEDING||y.node===C.node&&y.offset>C.offset)&&([y,C]=[C,y]),y.node.compareDocumentPosition(this._rowElements[0])&(Node.DOCUMENT_POSITION_CONTAINED_BY|Node.DOCUMENT_POSITION_FOLLOWING)&&(y={node:this._rowElements[0].childNodes[0],offset:0}),!this._rowContainer.contains(y.node))return;const E=this._rowElements.slice(-1)[0];if(C.node.compareDocumentPosition(E)&(Node.DOCUMENT_POSITION_CONTAINED_BY|Node.DOCUMENT_POSITION_PRECEDING)&&(C={node:E,offset:((M=E.textContent)==null?void 0:M.length)??0}),!this._rowContainer.contains(C.node))return;const N=({node:L,offset:I})=>{const B=L instanceof Text?L.parentNode:L;let q=parseInt(B==null?void 0:B.getAttribute("aria-posinset"),10)-1;if(isNaN(q))return console.warn("row is invalid. Race condition?"),null;const U=this._rowColumns.get(B);if(!U)return console.warn("columns is null. Race condition?"),null;let W=I=this._terminal.cols&&(++q,W=0),{row:q,column:W}},A=N(y),j=N(C);if(A&&j){if(A.row>j.row||A.row===j.row&&A.column>=j.column)throw new Error("invalid range");this._terminal.select(A.column,A.row,(j.row-A.row)*this._terminal.cols-A.column+j.column)}}_handleResize(w){this._rowElements[this._rowElements.length-1].removeEventListener("focus",this._bottomBoundaryFocusListener);for(let y=this._rowContainer.children.length;yw;)this._rowContainer.removeChild(this._rowElements.pop());this._rowElements[this._rowElements.length-1].addEventListener("focus",this._bottomBoundaryFocusListener),this._refreshRowsDimensions()}_createAccessibilityTreeNode(){const w=this._coreBrowserService.mainDocument.createElement("div");return w.setAttribute("role","listitem"),w.tabIndex=-1,this._refreshRowDimensions(w),w}_refreshRowsDimensions(){if(this._renderService.dimensions.css.cell.height){this._accessibilityContainer.style.width=`${this._renderService.dimensions.css.canvas.width}px`,this._rowElements.length!==this._terminal.rows&&this._handleResize(this._terminal.rows);for(let w=0;w{function l(p){return p.replace(/\r?\n/g,"\r")}function u(p,m){return m?"\x1B[200~"+p+"\x1B[201~":p}function h(p,m,x,k){p=u(p=l(p),x.decPrivateModes.bracketedPasteMode&&k.rawOptions.ignoreBracketedPasteMode!==!0),x.triggerDataEvent(p,!0),m.value=""}function _(p,m,x){const k=x.getBoundingClientRect(),v=p.clientX-k.left-10,b=p.clientY-k.top-10;m.style.width="20px",m.style.height="20px",m.style.left=`${v}px`,m.style.top=`${b}px`,m.style.zIndex="1000",m.focus()}Object.defineProperty(o,"__esModule",{value:!0}),o.rightClickHandler=o.moveTextAreaUnderMouseCursor=o.paste=o.handlePasteEvent=o.copyHandler=o.bracketTextForPaste=o.prepareTextForTerminal=void 0,o.prepareTextForTerminal=l,o.bracketTextForPaste=u,o.copyHandler=function(p,m){p.clipboardData&&p.clipboardData.setData("text/plain",m.selectionText),p.preventDefault()},o.handlePasteEvent=function(p,m,x,k){p.stopPropagation(),p.clipboardData&&h(p.clipboardData.getData("text/plain"),m,x,k)},o.paste=h,o.moveTextAreaUnderMouseCursor=_,o.rightClickHandler=function(p,m,x,k,v){_(p,m,x),v&&k.rightClickSelect(p),m.value=k.selectionText,m.select()}},7239:(a,o,l)=>{Object.defineProperty(o,"__esModule",{value:!0}),o.ColorContrastCache=void 0;const u=l(1505);o.ColorContrastCache=class{constructor(){this._color=new u.TwoKeyMap,this._css=new u.TwoKeyMap}setCss(h,_,p){this._css.set(h,_,p)}getCss(h,_){return this._css.get(h,_)}setColor(h,_,p){this._color.set(h,_,p)}getColor(h,_){return this._color.get(h,_)}clear(){this._color.clear(),this._css.clear()}}},3656:(a,o)=>{Object.defineProperty(o,"__esModule",{value:!0}),o.addDisposableDomListener=void 0,o.addDisposableDomListener=function(l,u,h,_){l.addEventListener(u,h,_);let p=!1;return{dispose:()=>{p||(p=!0,l.removeEventListener(u,h,_))}}}},3551:function(a,o,l){var u=this&&this.__decorate||function(b,w,y,C){var E,N=arguments.length,A=N<3?w:C===null?C=Object.getOwnPropertyDescriptor(w,y):C;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")A=Reflect.decorate(b,w,y,C);else for(var j=b.length-1;j>=0;j--)(E=b[j])&&(A=(N<3?E(A):N>3?E(w,y,A):E(w,y))||A);return N>3&&A&&Object.defineProperty(w,y,A),A},h=this&&this.__param||function(b,w){return function(y,C){w(y,C,b)}};Object.defineProperty(o,"__esModule",{value:!0}),o.Linkifier=void 0;const _=l(3656),p=l(8460),m=l(844),x=l(2585),k=l(4725);let v=o.Linkifier=class extends m.Disposable{get currentLink(){return this._currentLink}constructor(b,w,y,C,E){super(),this._element=b,this._mouseService=w,this._renderService=y,this._bufferService=C,this._linkProviderService=E,this._linkCacheDisposables=[],this._isMouseOut=!0,this._wasResized=!1,this._activeLine=-1,this._onShowLinkUnderline=this.register(new p.EventEmitter),this.onShowLinkUnderline=this._onShowLinkUnderline.event,this._onHideLinkUnderline=this.register(new p.EventEmitter),this.onHideLinkUnderline=this._onHideLinkUnderline.event,this.register((0,m.getDisposeArrayDisposable)(this._linkCacheDisposables)),this.register((0,m.toDisposable)((()=>{var N;this._lastMouseEvent=void 0,(N=this._activeProviderReplies)==null||N.clear()}))),this.register(this._bufferService.onResize((()=>{this._clearCurrentLink(),this._wasResized=!0}))),this.register((0,_.addDisposableDomListener)(this._element,"mouseleave",(()=>{this._isMouseOut=!0,this._clearCurrentLink()}))),this.register((0,_.addDisposableDomListener)(this._element,"mousemove",this._handleMouseMove.bind(this))),this.register((0,_.addDisposableDomListener)(this._element,"mousedown",this._handleMouseDown.bind(this))),this.register((0,_.addDisposableDomListener)(this._element,"mouseup",this._handleMouseUp.bind(this)))}_handleMouseMove(b){this._lastMouseEvent=b;const w=this._positionFromMouseEvent(b,this._element,this._mouseService);if(!w)return;this._isMouseOut=!1;const y=b.composedPath();for(let C=0;C{N==null||N.forEach((A=>{A.link.dispose&&A.link.dispose()}))})),this._activeProviderReplies=new Map,this._activeLine=b.y);let y=!1;for(const[N,A]of this._linkProviderService.linkProviders.entries())w?(E=this._activeProviderReplies)!=null&&E.get(N)&&(y=this._checkLinkProviderResult(N,b,y)):A.provideLinks(b.y,(j=>{var L,I;if(this._isMouseOut)return;const M=j==null?void 0:j.map((B=>({link:B})));(L=this._activeProviderReplies)==null||L.set(N,M),y=this._checkLinkProviderResult(N,b,y),((I=this._activeProviderReplies)==null?void 0:I.size)===this._linkProviderService.linkProviders.length&&this._removeIntersectingLinks(b.y,this._activeProviderReplies)}))}_removeIntersectingLinks(b,w){const y=new Set;for(let C=0;Cb?this._bufferService.cols:A.link.range.end.x;for(let L=j;L<=M;L++){if(y.has(L)){E.splice(N--,1);break}y.add(L)}}}}_checkLinkProviderResult(b,w,y){var N;if(!this._activeProviderReplies)return y;const C=this._activeProviderReplies.get(b);let E=!1;for(let A=0;Athis._linkAtPosition(j.link,w)));A&&(y=!0,this._handleNewLink(A))}if(this._activeProviderReplies.size===this._linkProviderService.linkProviders.length&&!y)for(let A=0;Athis._linkAtPosition(M.link,w)));if(j){y=!0,this._handleNewLink(j);break}}return y}_handleMouseDown(){this._mouseDownLink=this._currentLink}_handleMouseUp(b){if(!this._currentLink)return;const w=this._positionFromMouseEvent(b,this._element,this._mouseService);w&&this._mouseDownLink===this._currentLink&&this._linkAtPosition(this._currentLink.link,w)&&this._currentLink.link.activate(b,this._currentLink.link.text)}_clearCurrentLink(b,w){this._currentLink&&this._lastMouseEvent&&(!b||!w||this._currentLink.link.range.start.y>=b&&this._currentLink.link.range.end.y<=w)&&(this._linkLeave(this._element,this._currentLink.link,this._lastMouseEvent),this._currentLink=void 0,(0,m.disposeArray)(this._linkCacheDisposables))}_handleNewLink(b){if(!this._lastMouseEvent)return;const w=this._positionFromMouseEvent(this._lastMouseEvent,this._element,this._mouseService);w&&this._linkAtPosition(b.link,w)&&(this._currentLink=b,this._currentLink.state={decorations:{underline:b.link.decorations===void 0||b.link.decorations.underline,pointerCursor:b.link.decorations===void 0||b.link.decorations.pointerCursor},isHovered:!0},this._linkHover(this._element,b.link,this._lastMouseEvent),b.link.decorations={},Object.defineProperties(b.link.decorations,{pointerCursor:{get:()=>{var y,C;return(C=(y=this._currentLink)==null?void 0:y.state)==null?void 0:C.decorations.pointerCursor},set:y=>{var C;(C=this._currentLink)!=null&&C.state&&this._currentLink.state.decorations.pointerCursor!==y&&(this._currentLink.state.decorations.pointerCursor=y,this._currentLink.state.isHovered&&this._element.classList.toggle("xterm-cursor-pointer",y))}},underline:{get:()=>{var y,C;return(C=(y=this._currentLink)==null?void 0:y.state)==null?void 0:C.decorations.underline},set:y=>{var C,E,N;(C=this._currentLink)!=null&&C.state&&((N=(E=this._currentLink)==null?void 0:E.state)==null?void 0:N.decorations.underline)!==y&&(this._currentLink.state.decorations.underline=y,this._currentLink.state.isHovered&&this._fireUnderlineEvent(b.link,y))}}}),this._linkCacheDisposables.push(this._renderService.onRenderedViewportChange((y=>{if(!this._currentLink)return;const C=y.start===0?0:y.start+1+this._bufferService.buffer.ydisp,E=this._bufferService.buffer.ydisp+1+y.end;if(this._currentLink.link.range.start.y>=C&&this._currentLink.link.range.end.y<=E&&(this._clearCurrentLink(C,E),this._lastMouseEvent)){const N=this._positionFromMouseEvent(this._lastMouseEvent,this._element,this._mouseService);N&&this._askForLink(N,!1)}}))))}_linkHover(b,w,y){var C;(C=this._currentLink)!=null&&C.state&&(this._currentLink.state.isHovered=!0,this._currentLink.state.decorations.underline&&this._fireUnderlineEvent(w,!0),this._currentLink.state.decorations.pointerCursor&&b.classList.add("xterm-cursor-pointer")),w.hover&&w.hover(y,w.text)}_fireUnderlineEvent(b,w){const y=b.range,C=this._bufferService.buffer.ydisp,E=this._createLinkUnderlineEvent(y.start.x-1,y.start.y-C-1,y.end.x,y.end.y-C-1,void 0);(w?this._onShowLinkUnderline:this._onHideLinkUnderline).fire(E)}_linkLeave(b,w,y){var C;(C=this._currentLink)!=null&&C.state&&(this._currentLink.state.isHovered=!1,this._currentLink.state.decorations.underline&&this._fireUnderlineEvent(w,!1),this._currentLink.state.decorations.pointerCursor&&b.classList.remove("xterm-cursor-pointer")),w.leave&&w.leave(y,w.text)}_linkAtPosition(b,w){const y=b.range.start.y*this._bufferService.cols+b.range.start.x,C=b.range.end.y*this._bufferService.cols+b.range.end.x,E=w.y*this._bufferService.cols+w.x;return y<=E&&E<=C}_positionFromMouseEvent(b,w,y){const C=y.getCoords(b,w,this._bufferService.cols,this._bufferService.rows);if(C)return{x:C[0],y:C[1]+this._bufferService.buffer.ydisp}}_createLinkUnderlineEvent(b,w,y,C,E){return{x1:b,y1:w,x2:y,y2:C,cols:this._bufferService.cols,fg:E}}};o.Linkifier=v=u([h(1,k.IMouseService),h(2,k.IRenderService),h(3,x.IBufferService),h(4,k.ILinkProviderService)],v)},9042:(a,o)=>{Object.defineProperty(o,"__esModule",{value:!0}),o.tooMuchOutput=o.promptLabel=void 0,o.promptLabel="Terminal input",o.tooMuchOutput="Too much output to announce, navigate to rows manually to read"},3730:function(a,o,l){var u=this&&this.__decorate||function(k,v,b,w){var y,C=arguments.length,E=C<3?v:w===null?w=Object.getOwnPropertyDescriptor(v,b):w;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")E=Reflect.decorate(k,v,b,w);else for(var N=k.length-1;N>=0;N--)(y=k[N])&&(E=(C<3?y(E):C>3?y(v,b,E):y(v,b))||E);return C>3&&E&&Object.defineProperty(v,b,E),E},h=this&&this.__param||function(k,v){return function(b,w){v(b,w,k)}};Object.defineProperty(o,"__esModule",{value:!0}),o.OscLinkProvider=void 0;const _=l(511),p=l(2585);let m=o.OscLinkProvider=class{constructor(k,v,b){this._bufferService=k,this._optionsService=v,this._oscLinkService=b}provideLinks(k,v){var M;const b=this._bufferService.buffer.lines.get(k-1);if(!b)return void v(void 0);const w=[],y=this._optionsService.rawOptions.linkHandler,C=new _.CellData,E=b.getTrimmedLength();let N=-1,A=-1,j=!1;for(let L=0;Ly?y.activate(U,W,B):x(0,W),hover:(U,W)=>{var H;return(H=y==null?void 0:y.hover)==null?void 0:H.call(y,U,W,B)},leave:(U,W)=>{var H;return(H=y==null?void 0:y.leave)==null?void 0:H.call(y,U,W,B)}})}j=!1,C.hasExtendedAttrs()&&C.extended.urlId?(A=L,N=C.extended.urlId):(A=-1,N=-1)}}v(w)}};function x(k,v){if(confirm(`Do you want to navigate to ${v}? -WARNING: This link could potentially be dangerous`)){const b=window.open();if(b){try{b.opener=null}catch{}b.location.href=v}else console.warn("Opening link blocked as opener could not be cleared")}}o.OscLinkProvider=m=u([h(0,p.IBufferService),h(1,p.IOptionsService),h(2,p.IOscLinkService)],m)},6193:(a,o)=>{Object.defineProperty(o,"__esModule",{value:!0}),o.RenderDebouncer=void 0,o.RenderDebouncer=class{constructor(l,u){this._renderCallback=l,this._coreBrowserService=u,this._refreshCallbacks=[]}dispose(){this._animationFrame&&(this._coreBrowserService.window.cancelAnimationFrame(this._animationFrame),this._animationFrame=void 0)}addRefreshCallback(l){return this._refreshCallbacks.push(l),this._animationFrame||(this._animationFrame=this._coreBrowserService.window.requestAnimationFrame((()=>this._innerRefresh()))),this._animationFrame}refresh(l,u,h){this._rowCount=h,l=l!==void 0?l:0,u=u!==void 0?u:this._rowCount-1,this._rowStart=this._rowStart!==void 0?Math.min(this._rowStart,l):l,this._rowEnd=this._rowEnd!==void 0?Math.max(this._rowEnd,u):u,this._animationFrame||(this._animationFrame=this._coreBrowserService.window.requestAnimationFrame((()=>this._innerRefresh())))}_innerRefresh(){if(this._animationFrame=void 0,this._rowStart===void 0||this._rowEnd===void 0||this._rowCount===void 0)return void this._runRefreshCallbacks();const l=Math.max(this._rowStart,0),u=Math.min(this._rowEnd,this._rowCount-1);this._rowStart=void 0,this._rowEnd=void 0,this._renderCallback(l,u),this._runRefreshCallbacks()}_runRefreshCallbacks(){for(const l of this._refreshCallbacks)l(0);this._refreshCallbacks=[]}}},3236:(a,o,l)=>{Object.defineProperty(o,"__esModule",{value:!0}),o.Terminal=void 0;const u=l(3614),h=l(3656),_=l(3551),p=l(9042),m=l(3730),x=l(1680),k=l(3107),v=l(5744),b=l(2950),w=l(1296),y=l(428),C=l(4269),N=l(5114),E=l(8934),T=l(3230),j=l(9312),M=l(4725),D=l(6731),I=l(8055),P=l(8969),U=l(8460),q=l(844),W=l(6114),H=l(8437),Y=l(2584),te=l(7399),$=l(5941),L=l(9074),F=l(2585),G=l(5435),V=l(4567),ee=l(779);class ce extends P.CoreTerminal{get onFocus(){return this._onFocus.event}get onBlur(){return this._onBlur.event}get onA11yChar(){return this._onA11yCharEmitter.event}get onA11yTab(){return this._onA11yTabEmitter.event}get onWillOpen(){return this._onWillOpen.event}constructor(se={}){super(se),this.browser=W,this._keyDownHandled=!1,this._keyDownSeen=!1,this._keyPressHandled=!1,this._unprocessedDeadKey=!1,this._accessibilityManager=this.register(new q.MutableDisposable),this._onCursorMove=this.register(new U.EventEmitter),this.onCursorMove=this._onCursorMove.event,this._onKey=this.register(new U.EventEmitter),this.onKey=this._onKey.event,this._onRender=this.register(new U.EventEmitter),this.onRender=this._onRender.event,this._onSelectionChange=this.register(new U.EventEmitter),this.onSelectionChange=this._onSelectionChange.event,this._onTitleChange=this.register(new U.EventEmitter),this.onTitleChange=this._onTitleChange.event,this._onBell=this.register(new U.EventEmitter),this.onBell=this._onBell.event,this._onFocus=this.register(new U.EventEmitter),this._onBlur=this.register(new U.EventEmitter),this._onA11yCharEmitter=this.register(new U.EventEmitter),this._onA11yTabEmitter=this.register(new U.EventEmitter),this._onWillOpen=this.register(new U.EventEmitter),this._setup(),this._decorationService=this._instantiationService.createInstance(L.DecorationService),this._instantiationService.setService(F.IDecorationService,this._decorationService),this._linkProviderService=this._instantiationService.createInstance(ee.LinkProviderService),this._instantiationService.setService(M.ILinkProviderService,this._linkProviderService),this._linkProviderService.registerLinkProvider(this._instantiationService.createInstance(m.OscLinkProvider)),this.register(this._inputHandler.onRequestBell((()=>this._onBell.fire()))),this.register(this._inputHandler.onRequestRefreshRows(((X,oe)=>this.refresh(X,oe)))),this.register(this._inputHandler.onRequestSendFocus((()=>this._reportFocus()))),this.register(this._inputHandler.onRequestReset((()=>this.reset()))),this.register(this._inputHandler.onRequestWindowsOptionsReport((X=>this._reportWindowsOptions(X)))),this.register(this._inputHandler.onColor((X=>this._handleColorEvent(X)))),this.register((0,U.forwardEvent)(this._inputHandler.onCursorMove,this._onCursorMove)),this.register((0,U.forwardEvent)(this._inputHandler.onTitleChange,this._onTitleChange)),this.register((0,U.forwardEvent)(this._inputHandler.onA11yChar,this._onA11yCharEmitter)),this.register((0,U.forwardEvent)(this._inputHandler.onA11yTab,this._onA11yTabEmitter)),this.register(this._bufferService.onResize((X=>this._afterResize(X.cols,X.rows)))),this.register((0,q.toDisposable)((()=>{var X,oe;this._customKeyEventHandler=void 0,(oe=(X=this.element)==null?void 0:X.parentNode)==null||oe.removeChild(this.element)})))}_handleColorEvent(se){if(this._themeService)for(const X of se){let oe,le="";switch(X.index){case 256:oe="foreground",le="10";break;case 257:oe="background",le="11";break;case 258:oe="cursor",le="12";break;default:oe="ansi",le="4;"+X.index}switch(X.type){case 0:const _e=I.color.toColorRGB(oe==="ansi"?this._themeService.colors.ansi[X.index]:this._themeService.colors[oe]);this.coreService.triggerDataEvent(`${Y.C0.ESC}]${le};${(0,$.toRgbString)(_e)}${Y.C1_ESCAPED.ST}`);break;case 1:if(oe==="ansi")this._themeService.modifyColors((pe=>pe.ansi[X.index]=I.channels.toColor(...X.color)));else{const pe=oe;this._themeService.modifyColors((Ee=>Ee[pe]=I.channels.toColor(...X.color)))}break;case 2:this._themeService.restoreColor(X.index)}}}_setup(){super._setup(),this._customKeyEventHandler=void 0}get buffer(){return this.buffers.active}focus(){this.textarea&&this.textarea.focus({preventScroll:!0})}_handleScreenReaderModeOptionChange(se){se?!this._accessibilityManager.value&&this._renderService&&(this._accessibilityManager.value=this._instantiationService.createInstance(V.AccessibilityManager,this)):this._accessibilityManager.clear()}_handleTextAreaFocus(se){this.coreService.decPrivateModes.sendFocus&&this.coreService.triggerDataEvent(Y.C0.ESC+"[I"),this.element.classList.add("focus"),this._showCursor(),this._onFocus.fire()}blur(){var se;return(se=this.textarea)==null?void 0:se.blur()}_handleTextAreaBlur(){this.textarea.value="",this.refresh(this.buffer.y,this.buffer.y),this.coreService.decPrivateModes.sendFocus&&this.coreService.triggerDataEvent(Y.C0.ESC+"[O"),this.element.classList.remove("focus"),this._onBlur.fire()}_syncTextArea(){if(!this.textarea||!this.buffer.isCursorInViewport||this._compositionHelper.isComposing||!this._renderService)return;const se=this.buffer.ybase+this.buffer.y,X=this.buffer.lines.get(se);if(!X)return;const oe=Math.min(this.buffer.x,this.cols-1),le=this._renderService.dimensions.css.cell.height,_e=X.getWidth(oe),pe=this._renderService.dimensions.css.cell.width*_e,Ee=this.buffer.y*this._renderService.dimensions.css.cell.height,Ie=oe*this._renderService.dimensions.css.cell.width;this.textarea.style.left=Ie+"px",this.textarea.style.top=Ee+"px",this.textarea.style.width=pe+"px",this.textarea.style.height=le+"px",this.textarea.style.lineHeight=le+"px",this.textarea.style.zIndex="-5"}_initGlobal(){this._bindKeys(),this.register((0,h.addDisposableDomListener)(this.element,"copy",(X=>{this.hasSelection()&&(0,u.copyHandler)(X,this._selectionService)})));const se=X=>(0,u.handlePasteEvent)(X,this.textarea,this.coreService,this.optionsService);this.register((0,h.addDisposableDomListener)(this.textarea,"paste",se)),this.register((0,h.addDisposableDomListener)(this.element,"paste",se)),W.isFirefox?this.register((0,h.addDisposableDomListener)(this.element,"mousedown",(X=>{X.button===2&&(0,u.rightClickHandler)(X,this.textarea,this.screenElement,this._selectionService,this.options.rightClickSelectsWord)}))):this.register((0,h.addDisposableDomListener)(this.element,"contextmenu",(X=>{(0,u.rightClickHandler)(X,this.textarea,this.screenElement,this._selectionService,this.options.rightClickSelectsWord)}))),W.isLinux&&this.register((0,h.addDisposableDomListener)(this.element,"auxclick",(X=>{X.button===1&&(0,u.moveTextAreaUnderMouseCursor)(X,this.textarea,this.screenElement)})))}_bindKeys(){this.register((0,h.addDisposableDomListener)(this.textarea,"keyup",(se=>this._keyUp(se)),!0)),this.register((0,h.addDisposableDomListener)(this.textarea,"keydown",(se=>this._keyDown(se)),!0)),this.register((0,h.addDisposableDomListener)(this.textarea,"keypress",(se=>this._keyPress(se)),!0)),this.register((0,h.addDisposableDomListener)(this.textarea,"compositionstart",(()=>this._compositionHelper.compositionstart()))),this.register((0,h.addDisposableDomListener)(this.textarea,"compositionupdate",(se=>this._compositionHelper.compositionupdate(se)))),this.register((0,h.addDisposableDomListener)(this.textarea,"compositionend",(()=>this._compositionHelper.compositionend()))),this.register((0,h.addDisposableDomListener)(this.textarea,"input",(se=>this._inputEvent(se)),!0)),this.register(this.onRender((()=>this._compositionHelper.updateCompositionElements())))}open(se){var oe;if(!se)throw new Error("Terminal requires a parent element.");if(se.isConnected||this._logService.debug("Terminal.open was called on an element that was not attached to the DOM"),((oe=this.element)==null?void 0:oe.ownerDocument.defaultView)&&this._coreBrowserService)return void(this.element.ownerDocument.defaultView!==this._coreBrowserService.window&&(this._coreBrowserService.window=this.element.ownerDocument.defaultView));this._document=se.ownerDocument,this.options.documentOverride&&this.options.documentOverride instanceof Document&&(this._document=this.optionsService.rawOptions.documentOverride),this.element=this._document.createElement("div"),this.element.dir="ltr",this.element.classList.add("terminal"),this.element.classList.add("xterm"),se.appendChild(this.element);const X=this._document.createDocumentFragment();this._viewportElement=this._document.createElement("div"),this._viewportElement.classList.add("xterm-viewport"),X.appendChild(this._viewportElement),this._viewportScrollArea=this._document.createElement("div"),this._viewportScrollArea.classList.add("xterm-scroll-area"),this._viewportElement.appendChild(this._viewportScrollArea),this.screenElement=this._document.createElement("div"),this.screenElement.classList.add("xterm-screen"),this.register((0,h.addDisposableDomListener)(this.screenElement,"mousemove",(le=>this.updateCursorStyle(le)))),this._helperContainer=this._document.createElement("div"),this._helperContainer.classList.add("xterm-helpers"),this.screenElement.appendChild(this._helperContainer),X.appendChild(this.screenElement),this.textarea=this._document.createElement("textarea"),this.textarea.classList.add("xterm-helper-textarea"),this.textarea.setAttribute("aria-label",p.promptLabel),W.isChromeOS||this.textarea.setAttribute("aria-multiline","false"),this.textarea.setAttribute("autocorrect","off"),this.textarea.setAttribute("autocapitalize","off"),this.textarea.setAttribute("spellcheck","false"),this.textarea.tabIndex=0,this._coreBrowserService=this.register(this._instantiationService.createInstance(N.CoreBrowserService,this.textarea,se.ownerDocument.defaultView??window,this._document??typeof window<"u"?window.document:null)),this._instantiationService.setService(M.ICoreBrowserService,this._coreBrowserService),this.register((0,h.addDisposableDomListener)(this.textarea,"focus",(le=>this._handleTextAreaFocus(le)))),this.register((0,h.addDisposableDomListener)(this.textarea,"blur",(()=>this._handleTextAreaBlur()))),this._helperContainer.appendChild(this.textarea),this._charSizeService=this._instantiationService.createInstance(y.CharSizeService,this._document,this._helperContainer),this._instantiationService.setService(M.ICharSizeService,this._charSizeService),this._themeService=this._instantiationService.createInstance(D.ThemeService),this._instantiationService.setService(M.IThemeService,this._themeService),this._characterJoinerService=this._instantiationService.createInstance(C.CharacterJoinerService),this._instantiationService.setService(M.ICharacterJoinerService,this._characterJoinerService),this._renderService=this.register(this._instantiationService.createInstance(T.RenderService,this.rows,this.screenElement)),this._instantiationService.setService(M.IRenderService,this._renderService),this.register(this._renderService.onRenderedViewportChange((le=>this._onRender.fire(le)))),this.onResize((le=>this._renderService.resize(le.cols,le.rows))),this._compositionView=this._document.createElement("div"),this._compositionView.classList.add("composition-view"),this._compositionHelper=this._instantiationService.createInstance(b.CompositionHelper,this.textarea,this._compositionView),this._helperContainer.appendChild(this._compositionView),this._mouseService=this._instantiationService.createInstance(E.MouseService),this._instantiationService.setService(M.IMouseService,this._mouseService),this.linkifier=this.register(this._instantiationService.createInstance(_.Linkifier,this.screenElement)),this.element.appendChild(X);try{this._onWillOpen.fire(this.element)}catch{}this._renderService.hasRenderer()||this._renderService.setRenderer(this._createRenderer()),this.viewport=this._instantiationService.createInstance(x.Viewport,this._viewportElement,this._viewportScrollArea),this.viewport.onRequestScrollLines((le=>this.scrollLines(le.amount,le.suppressScrollEvent,1))),this.register(this._inputHandler.onRequestSyncScrollBar((()=>this.viewport.syncScrollArea()))),this.register(this.viewport),this.register(this.onCursorMove((()=>{this._renderService.handleCursorMove(),this._syncTextArea()}))),this.register(this.onResize((()=>this._renderService.handleResize(this.cols,this.rows)))),this.register(this.onBlur((()=>this._renderService.handleBlur()))),this.register(this.onFocus((()=>this._renderService.handleFocus()))),this.register(this._renderService.onDimensionsChange((()=>this.viewport.syncScrollArea()))),this._selectionService=this.register(this._instantiationService.createInstance(j.SelectionService,this.element,this.screenElement,this.linkifier)),this._instantiationService.setService(M.ISelectionService,this._selectionService),this.register(this._selectionService.onRequestScrollLines((le=>this.scrollLines(le.amount,le.suppressScrollEvent)))),this.register(this._selectionService.onSelectionChange((()=>this._onSelectionChange.fire()))),this.register(this._selectionService.onRequestRedraw((le=>this._renderService.handleSelectionChanged(le.start,le.end,le.columnSelectMode)))),this.register(this._selectionService.onLinuxMouseSelection((le=>{this.textarea.value=le,this.textarea.focus(),this.textarea.select()}))),this.register(this._onScroll.event((le=>{this.viewport.syncScrollArea(),this._selectionService.refresh()}))),this.register((0,h.addDisposableDomListener)(this._viewportElement,"scroll",(()=>this._selectionService.refresh()))),this.register(this._instantiationService.createInstance(k.BufferDecorationRenderer,this.screenElement)),this.register((0,h.addDisposableDomListener)(this.element,"mousedown",(le=>this._selectionService.handleMouseDown(le)))),this.coreMouseService.areMouseEventsActive?(this._selectionService.disable(),this.element.classList.add("enable-mouse-events")):this._selectionService.enable(),this.options.screenReaderMode&&(this._accessibilityManager.value=this._instantiationService.createInstance(V.AccessibilityManager,this)),this.register(this.optionsService.onSpecificOptionChange("screenReaderMode",(le=>this._handleScreenReaderModeOptionChange(le)))),this.options.overviewRulerWidth&&(this._overviewRulerRenderer=this.register(this._instantiationService.createInstance(v.OverviewRulerRenderer,this._viewportElement,this.screenElement))),this.optionsService.onSpecificOptionChange("overviewRulerWidth",(le=>{!this._overviewRulerRenderer&&le&&this._viewportElement&&this.screenElement&&(this._overviewRulerRenderer=this.register(this._instantiationService.createInstance(v.OverviewRulerRenderer,this._viewportElement,this.screenElement)))})),this._charSizeService.measure(),this.refresh(0,this.rows-1),this._initGlobal(),this.bindMouse()}_createRenderer(){return this._instantiationService.createInstance(w.DomRenderer,this,this._document,this.element,this.screenElement,this._viewportElement,this._helperContainer,this.linkifier)}bindMouse(){const se=this,X=this.element;function oe(pe){const Ee=se._mouseService.getMouseReportCoords(pe,se.screenElement);if(!Ee)return!1;let Ie,ze;switch(pe.overrideType||pe.type){case"mousemove":ze=32,pe.buttons===void 0?(Ie=3,pe.button!==void 0&&(Ie=pe.button<3?pe.button:3)):Ie=1&pe.buttons?0:4&pe.buttons?1:2&pe.buttons?2:3;break;case"mouseup":ze=0,Ie=pe.button<3?pe.button:3;break;case"mousedown":ze=1,Ie=pe.button<3?pe.button:3;break;case"wheel":if(se._customWheelEventHandler&&se._customWheelEventHandler(pe)===!1||se.viewport.getLinesScrolled(pe)===0)return!1;ze=pe.deltaY<0?0:1,Ie=4;break;default:return!1}return!(ze===void 0||Ie===void 0||Ie>4)&&se.coreMouseService.triggerMouseEvent({col:Ee.col,row:Ee.row,x:Ee.x,y:Ee.y,button:Ie,action:ze,ctrl:pe.ctrlKey,alt:pe.altKey,shift:pe.shiftKey})}const le={mouseup:null,wheel:null,mousedrag:null,mousemove:null},_e={mouseup:pe=>(oe(pe),pe.buttons||(this._document.removeEventListener("mouseup",le.mouseup),le.mousedrag&&this._document.removeEventListener("mousemove",le.mousedrag)),this.cancel(pe)),wheel:pe=>(oe(pe),this.cancel(pe,!0)),mousedrag:pe=>{pe.buttons&&oe(pe)},mousemove:pe=>{pe.buttons||oe(pe)}};this.register(this.coreMouseService.onProtocolChange((pe=>{pe?(this.optionsService.rawOptions.logLevel==="debug"&&this._logService.debug("Binding to mouse events:",this.coreMouseService.explainEvents(pe)),this.element.classList.add("enable-mouse-events"),this._selectionService.disable()):(this._logService.debug("Unbinding from mouse events."),this.element.classList.remove("enable-mouse-events"),this._selectionService.enable()),8&pe?le.mousemove||(X.addEventListener("mousemove",_e.mousemove),le.mousemove=_e.mousemove):(X.removeEventListener("mousemove",le.mousemove),le.mousemove=null),16&pe?le.wheel||(X.addEventListener("wheel",_e.wheel,{passive:!1}),le.wheel=_e.wheel):(X.removeEventListener("wheel",le.wheel),le.wheel=null),2&pe?le.mouseup||(le.mouseup=_e.mouseup):(this._document.removeEventListener("mouseup",le.mouseup),le.mouseup=null),4&pe?le.mousedrag||(le.mousedrag=_e.mousedrag):(this._document.removeEventListener("mousemove",le.mousedrag),le.mousedrag=null)}))),this.coreMouseService.activeProtocol=this.coreMouseService.activeProtocol,this.register((0,h.addDisposableDomListener)(X,"mousedown",(pe=>{if(pe.preventDefault(),this.focus(),this.coreMouseService.areMouseEventsActive&&!this._selectionService.shouldForceSelection(pe))return oe(pe),le.mouseup&&this._document.addEventListener("mouseup",le.mouseup),le.mousedrag&&this._document.addEventListener("mousemove",le.mousedrag),this.cancel(pe)}))),this.register((0,h.addDisposableDomListener)(X,"wheel",(pe=>{if(!le.wheel){if(this._customWheelEventHandler&&this._customWheelEventHandler(pe)===!1)return!1;if(!this.buffer.hasScrollback){const Ee=this.viewport.getLinesScrolled(pe);if(Ee===0)return;const Ie=Y.C0.ESC+(this.coreService.decPrivateModes.applicationCursorKeys?"O":"[")+(pe.deltaY<0?"A":"B");let ze="";for(let He=0;He{if(!this.coreMouseService.areMouseEventsActive)return this.viewport.handleTouchStart(pe),this.cancel(pe)}),{passive:!0})),this.register((0,h.addDisposableDomListener)(X,"touchmove",(pe=>{if(!this.coreMouseService.areMouseEventsActive)return this.viewport.handleTouchMove(pe)?void 0:this.cancel(pe)}),{passive:!1}))}refresh(se,X){var oe;(oe=this._renderService)==null||oe.refreshRows(se,X)}updateCursorStyle(se){var X;(X=this._selectionService)!=null&&X.shouldColumnSelect(se)?this.element.classList.add("column-select"):this.element.classList.remove("column-select")}_showCursor(){this.coreService.isCursorInitialized||(this.coreService.isCursorInitialized=!0,this.refresh(this.buffer.y,this.buffer.y))}scrollLines(se,X,oe=0){var le;oe===1?(super.scrollLines(se,X,oe),this.refresh(0,this.rows-1)):(le=this.viewport)==null||le.scrollLines(se)}paste(se){(0,u.paste)(se,this.textarea,this.coreService,this.optionsService)}attachCustomKeyEventHandler(se){this._customKeyEventHandler=se}attachCustomWheelEventHandler(se){this._customWheelEventHandler=se}registerLinkProvider(se){return this._linkProviderService.registerLinkProvider(se)}registerCharacterJoiner(se){if(!this._characterJoinerService)throw new Error("Terminal must be opened first");const X=this._characterJoinerService.register(se);return this.refresh(0,this.rows-1),X}deregisterCharacterJoiner(se){if(!this._characterJoinerService)throw new Error("Terminal must be opened first");this._characterJoinerService.deregister(se)&&this.refresh(0,this.rows-1)}get markers(){return this.buffer.markers}registerMarker(se){return this.buffer.addMarker(this.buffer.ybase+this.buffer.y+se)}registerDecoration(se){return this._decorationService.registerDecoration(se)}hasSelection(){return!!this._selectionService&&this._selectionService.hasSelection}select(se,X,oe){this._selectionService.setSelection(se,X,oe)}getSelection(){return this._selectionService?this._selectionService.selectionText:""}getSelectionPosition(){if(this._selectionService&&this._selectionService.hasSelection)return{start:{x:this._selectionService.selectionStart[0],y:this._selectionService.selectionStart[1]},end:{x:this._selectionService.selectionEnd[0],y:this._selectionService.selectionEnd[1]}}}clearSelection(){var se;(se=this._selectionService)==null||se.clearSelection()}selectAll(){var se;(se=this._selectionService)==null||se.selectAll()}selectLines(se,X){var oe;(oe=this._selectionService)==null||oe.selectLines(se,X)}_keyDown(se){if(this._keyDownHandled=!1,this._keyDownSeen=!0,this._customKeyEventHandler&&this._customKeyEventHandler(se)===!1)return!1;const X=this.browser.isMac&&this.options.macOptionIsMeta&&se.altKey;if(!X&&!this._compositionHelper.keydown(se))return this.options.scrollOnUserInput&&this.buffer.ybase!==this.buffer.ydisp&&this.scrollToBottom(),!1;X||se.key!=="Dead"&&se.key!=="AltGraph"||(this._unprocessedDeadKey=!0);const oe=(0,te.evaluateKeyboardEvent)(se,this.coreService.decPrivateModes.applicationCursorKeys,this.browser.isMac,this.options.macOptionIsMeta);if(this.updateCursorStyle(se),oe.type===3||oe.type===2){const le=this.rows-1;return this.scrollLines(oe.type===2?-le:le),this.cancel(se,!0)}return oe.type===1&&this.selectAll(),!!this._isThirdLevelShift(this.browser,se)||(oe.cancel&&this.cancel(se,!0),!oe.key||!!(se.key&&!se.ctrlKey&&!se.altKey&&!se.metaKey&&se.key.length===1&&se.key.charCodeAt(0)>=65&&se.key.charCodeAt(0)<=90)||(this._unprocessedDeadKey?(this._unprocessedDeadKey=!1,!0):(oe.key!==Y.C0.ETX&&oe.key!==Y.C0.CR||(this.textarea.value=""),this._onKey.fire({key:oe.key,domEvent:se}),this._showCursor(),this.coreService.triggerDataEvent(oe.key,!0),!this.optionsService.rawOptions.screenReaderMode||se.altKey||se.ctrlKey?this.cancel(se,!0):void(this._keyDownHandled=!0))))}_isThirdLevelShift(se,X){const oe=se.isMac&&!this.options.macOptionIsMeta&&X.altKey&&!X.ctrlKey&&!X.metaKey||se.isWindows&&X.altKey&&X.ctrlKey&&!X.metaKey||se.isWindows&&X.getModifierState("AltGraph");return X.type==="keypress"?oe:oe&&(!X.keyCode||X.keyCode>47)}_keyUp(se){this._keyDownSeen=!1,this._customKeyEventHandler&&this._customKeyEventHandler(se)===!1||((function(X){return X.keyCode===16||X.keyCode===17||X.keyCode===18})(se)||this.focus(),this.updateCursorStyle(se),this._keyPressHandled=!1)}_keyPress(se){let X;if(this._keyPressHandled=!1,this._keyDownHandled||this._customKeyEventHandler&&this._customKeyEventHandler(se)===!1)return!1;if(this.cancel(se),se.charCode)X=se.charCode;else if(se.which===null||se.which===void 0)X=se.keyCode;else{if(se.which===0||se.charCode===0)return!1;X=se.which}return!(!X||(se.altKey||se.ctrlKey||se.metaKey)&&!this._isThirdLevelShift(this.browser,se)||(X=String.fromCharCode(X),this._onKey.fire({key:X,domEvent:se}),this._showCursor(),this.coreService.triggerDataEvent(X,!0),this._keyPressHandled=!0,this._unprocessedDeadKey=!1,0))}_inputEvent(se){if(se.data&&se.inputType==="insertText"&&(!se.composed||!this._keyDownSeen)&&!this.optionsService.rawOptions.screenReaderMode){if(this._keyPressHandled)return!1;this._unprocessedDeadKey=!1;const X=se.data;return this.coreService.triggerDataEvent(X,!0),this.cancel(se),!0}return!1}resize(se,X){se!==this.cols||X!==this.rows?super.resize(se,X):this._charSizeService&&!this._charSizeService.hasValidSize&&this._charSizeService.measure()}_afterResize(se,X){var oe,le;(oe=this._charSizeService)==null||oe.measure(),(le=this.viewport)==null||le.syncScrollArea(!0)}clear(){var se;if(this.buffer.ybase!==0||this.buffer.y!==0){this.buffer.clearAllMarkers(),this.buffer.lines.set(0,this.buffer.lines.get(this.buffer.ybase+this.buffer.y)),this.buffer.lines.length=1,this.buffer.ydisp=0,this.buffer.ybase=0,this.buffer.y=0;for(let X=1;X{Object.defineProperty(o,"__esModule",{value:!0}),o.TimeBasedDebouncer=void 0,o.TimeBasedDebouncer=class{constructor(l,u=1e3){this._renderCallback=l,this._debounceThresholdMS=u,this._lastRefreshMs=0,this._additionalRefreshRequested=!1}dispose(){this._refreshTimeoutID&&clearTimeout(this._refreshTimeoutID)}refresh(l,u,h){this._rowCount=h,l=l!==void 0?l:0,u=u!==void 0?u:this._rowCount-1,this._rowStart=this._rowStart!==void 0?Math.min(this._rowStart,l):l,this._rowEnd=this._rowEnd!==void 0?Math.max(this._rowEnd,u):u;const _=Date.now();if(_-this._lastRefreshMs>=this._debounceThresholdMS)this._lastRefreshMs=_,this._innerRefresh();else if(!this._additionalRefreshRequested){const p=_-this._lastRefreshMs,m=this._debounceThresholdMS-p;this._additionalRefreshRequested=!0,this._refreshTimeoutID=window.setTimeout((()=>{this._lastRefreshMs=Date.now(),this._innerRefresh(),this._additionalRefreshRequested=!1,this._refreshTimeoutID=void 0}),m)}}_innerRefresh(){if(this._rowStart===void 0||this._rowEnd===void 0||this._rowCount===void 0)return;const l=Math.max(this._rowStart,0),u=Math.min(this._rowEnd,this._rowCount-1);this._rowStart=void 0,this._rowEnd=void 0,this._renderCallback(l,u)}}},1680:function(a,o,l){var u=this&&this.__decorate||function(b,w,y,C){var N,E=arguments.length,T=E<3?w:C===null?C=Object.getOwnPropertyDescriptor(w,y):C;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")T=Reflect.decorate(b,w,y,C);else for(var j=b.length-1;j>=0;j--)(N=b[j])&&(T=(E<3?N(T):E>3?N(w,y,T):N(w,y))||T);return E>3&&T&&Object.defineProperty(w,y,T),T},h=this&&this.__param||function(b,w){return function(y,C){w(y,C,b)}};Object.defineProperty(o,"__esModule",{value:!0}),o.Viewport=void 0;const _=l(3656),p=l(4725),m=l(8460),x=l(844),k=l(2585);let v=o.Viewport=class extends x.Disposable{constructor(b,w,y,C,N,E,T,j){super(),this._viewportElement=b,this._scrollArea=w,this._bufferService=y,this._optionsService=C,this._charSizeService=N,this._renderService=E,this._coreBrowserService=T,this.scrollBarWidth=0,this._currentRowHeight=0,this._currentDeviceCellHeight=0,this._lastRecordedBufferLength=0,this._lastRecordedViewportHeight=0,this._lastRecordedBufferHeight=0,this._lastTouchY=0,this._lastScrollTop=0,this._wheelPartialScroll=0,this._refreshAnimationFrame=null,this._ignoreNextScrollEvent=!1,this._smoothScrollState={startTime:0,origin:-1,target:-1},this._onRequestScrollLines=this.register(new m.EventEmitter),this.onRequestScrollLines=this._onRequestScrollLines.event,this.scrollBarWidth=this._viewportElement.offsetWidth-this._scrollArea.offsetWidth||15,this.register((0,_.addDisposableDomListener)(this._viewportElement,"scroll",this._handleScroll.bind(this))),this._activeBuffer=this._bufferService.buffer,this.register(this._bufferService.buffers.onBufferActivate((M=>this._activeBuffer=M.activeBuffer))),this._renderDimensions=this._renderService.dimensions,this.register(this._renderService.onDimensionsChange((M=>this._renderDimensions=M))),this._handleThemeChange(j.colors),this.register(j.onChangeColors((M=>this._handleThemeChange(M)))),this.register(this._optionsService.onSpecificOptionChange("scrollback",(()=>this.syncScrollArea()))),setTimeout((()=>this.syncScrollArea()))}_handleThemeChange(b){this._viewportElement.style.backgroundColor=b.background.css}reset(){this._currentRowHeight=0,this._currentDeviceCellHeight=0,this._lastRecordedBufferLength=0,this._lastRecordedViewportHeight=0,this._lastRecordedBufferHeight=0,this._lastTouchY=0,this._lastScrollTop=0,this._coreBrowserService.window.requestAnimationFrame((()=>this.syncScrollArea()))}_refresh(b){if(b)return this._innerRefresh(),void(this._refreshAnimationFrame!==null&&this._coreBrowserService.window.cancelAnimationFrame(this._refreshAnimationFrame));this._refreshAnimationFrame===null&&(this._refreshAnimationFrame=this._coreBrowserService.window.requestAnimationFrame((()=>this._innerRefresh())))}_innerRefresh(){if(this._charSizeService.height>0){this._currentRowHeight=this._renderDimensions.device.cell.height/this._coreBrowserService.dpr,this._currentDeviceCellHeight=this._renderDimensions.device.cell.height,this._lastRecordedViewportHeight=this._viewportElement.offsetHeight;const w=Math.round(this._currentRowHeight*this._lastRecordedBufferLength)+(this._lastRecordedViewportHeight-this._renderDimensions.css.canvas.height);this._lastRecordedBufferHeight!==w&&(this._lastRecordedBufferHeight=w,this._scrollArea.style.height=this._lastRecordedBufferHeight+"px")}const b=this._bufferService.buffer.ydisp*this._currentRowHeight;this._viewportElement.scrollTop!==b&&(this._ignoreNextScrollEvent=!0,this._viewportElement.scrollTop=b),this._refreshAnimationFrame=null}syncScrollArea(b=!1){if(this._lastRecordedBufferLength!==this._bufferService.buffer.lines.length)return this._lastRecordedBufferLength=this._bufferService.buffer.lines.length,void this._refresh(b);this._lastRecordedViewportHeight===this._renderService.dimensions.css.canvas.height&&this._lastScrollTop===this._activeBuffer.ydisp*this._currentRowHeight&&this._renderDimensions.device.cell.height===this._currentDeviceCellHeight||this._refresh(b)}_handleScroll(b){if(this._lastScrollTop=this._viewportElement.scrollTop,!this._viewportElement.offsetParent)return;if(this._ignoreNextScrollEvent)return this._ignoreNextScrollEvent=!1,void this._onRequestScrollLines.fire({amount:0,suppressScrollEvent:!0});const w=Math.round(this._lastScrollTop/this._currentRowHeight)-this._bufferService.buffer.ydisp;this._onRequestScrollLines.fire({amount:w,suppressScrollEvent:!0})}_smoothScroll(){if(this._isDisposed||this._smoothScrollState.origin===-1||this._smoothScrollState.target===-1)return;const b=this._smoothScrollPercent();this._viewportElement.scrollTop=this._smoothScrollState.origin+Math.round(b*(this._smoothScrollState.target-this._smoothScrollState.origin)),b<1?this._coreBrowserService.window.requestAnimationFrame((()=>this._smoothScroll())):this._clearSmoothScrollState()}_smoothScrollPercent(){return this._optionsService.rawOptions.smoothScrollDuration&&this._smoothScrollState.startTime?Math.max(Math.min((Date.now()-this._smoothScrollState.startTime)/this._optionsService.rawOptions.smoothScrollDuration,1),0):1}_clearSmoothScrollState(){this._smoothScrollState.startTime=0,this._smoothScrollState.origin=-1,this._smoothScrollState.target=-1}_bubbleScroll(b,w){const y=this._viewportElement.scrollTop+this._lastRecordedViewportHeight;return!(w<0&&this._viewportElement.scrollTop!==0||w>0&&y0&&(y=P),C=""}}return{bufferElements:N,cursorElement:y}}getLinesScrolled(b){if(b.deltaY===0||b.shiftKey)return 0;let w=this._applyScrollModifier(b.deltaY,b);return b.deltaMode===WheelEvent.DOM_DELTA_PIXEL?(w/=this._currentRowHeight+0,this._wheelPartialScroll+=w,w=Math.floor(Math.abs(this._wheelPartialScroll))*(this._wheelPartialScroll>0?1:-1),this._wheelPartialScroll%=1):b.deltaMode===WheelEvent.DOM_DELTA_PAGE&&(w*=this._bufferService.rows),w}_applyScrollModifier(b,w){const y=this._optionsService.rawOptions.fastScrollModifier;return y==="alt"&&w.altKey||y==="ctrl"&&w.ctrlKey||y==="shift"&&w.shiftKey?b*this._optionsService.rawOptions.fastScrollSensitivity*this._optionsService.rawOptions.scrollSensitivity:b*this._optionsService.rawOptions.scrollSensitivity}handleTouchStart(b){this._lastTouchY=b.touches[0].pageY}handleTouchMove(b){const w=this._lastTouchY-b.touches[0].pageY;return this._lastTouchY=b.touches[0].pageY,w!==0&&(this._viewportElement.scrollTop+=w,this._bubbleScroll(b,w))}};o.Viewport=v=u([h(2,k.IBufferService),h(3,k.IOptionsService),h(4,p.ICharSizeService),h(5,p.IRenderService),h(6,p.ICoreBrowserService),h(7,p.IThemeService)],v)},3107:function(a,o,l){var u=this&&this.__decorate||function(k,v,b,w){var y,C=arguments.length,N=C<3?v:w===null?w=Object.getOwnPropertyDescriptor(v,b):w;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")N=Reflect.decorate(k,v,b,w);else for(var E=k.length-1;E>=0;E--)(y=k[E])&&(N=(C<3?y(N):C>3?y(v,b,N):y(v,b))||N);return C>3&&N&&Object.defineProperty(v,b,N),N},h=this&&this.__param||function(k,v){return function(b,w){v(b,w,k)}};Object.defineProperty(o,"__esModule",{value:!0}),o.BufferDecorationRenderer=void 0;const _=l(4725),p=l(844),m=l(2585);let x=o.BufferDecorationRenderer=class extends p.Disposable{constructor(k,v,b,w,y){super(),this._screenElement=k,this._bufferService=v,this._coreBrowserService=b,this._decorationService=w,this._renderService=y,this._decorationElements=new Map,this._altBufferIsActive=!1,this._dimensionsChanged=!1,this._container=document.createElement("div"),this._container.classList.add("xterm-decoration-container"),this._screenElement.appendChild(this._container),this.register(this._renderService.onRenderedViewportChange((()=>this._doRefreshDecorations()))),this.register(this._renderService.onDimensionsChange((()=>{this._dimensionsChanged=!0,this._queueRefresh()}))),this.register(this._coreBrowserService.onDprChange((()=>this._queueRefresh()))),this.register(this._bufferService.buffers.onBufferActivate((()=>{this._altBufferIsActive=this._bufferService.buffer===this._bufferService.buffers.alt}))),this.register(this._decorationService.onDecorationRegistered((()=>this._queueRefresh()))),this.register(this._decorationService.onDecorationRemoved((C=>this._removeDecoration(C)))),this.register((0,p.toDisposable)((()=>{this._container.remove(),this._decorationElements.clear()})))}_queueRefresh(){this._animationFrame===void 0&&(this._animationFrame=this._renderService.addRefreshCallback((()=>{this._doRefreshDecorations(),this._animationFrame=void 0})))}_doRefreshDecorations(){for(const k of this._decorationService.decorations)this._renderDecoration(k);this._dimensionsChanged=!1}_renderDecoration(k){this._refreshStyle(k),this._dimensionsChanged&&this._refreshXPosition(k)}_createElement(k){var w;const v=this._coreBrowserService.mainDocument.createElement("div");v.classList.add("xterm-decoration"),v.classList.toggle("xterm-decoration-top-layer",((w=k==null?void 0:k.options)==null?void 0:w.layer)==="top"),v.style.width=`${Math.round((k.options.width||1)*this._renderService.dimensions.css.cell.width)}px`,v.style.height=(k.options.height||1)*this._renderService.dimensions.css.cell.height+"px",v.style.top=(k.marker.line-this._bufferService.buffers.active.ydisp)*this._renderService.dimensions.css.cell.height+"px",v.style.lineHeight=`${this._renderService.dimensions.css.cell.height}px`;const b=k.options.x??0;return b&&b>this._bufferService.cols&&(v.style.display="none"),this._refreshXPosition(k,v),v}_refreshStyle(k){const v=k.marker.line-this._bufferService.buffers.active.ydisp;if(v<0||v>=this._bufferService.rows)k.element&&(k.element.style.display="none",k.onRenderEmitter.fire(k.element));else{let b=this._decorationElements.get(k);b||(b=this._createElement(k),k.element=b,this._decorationElements.set(k,b),this._container.appendChild(b),k.onDispose((()=>{this._decorationElements.delete(k),b.remove()}))),b.style.top=v*this._renderService.dimensions.css.cell.height+"px",b.style.display=this._altBufferIsActive?"none":"block",k.onRenderEmitter.fire(b)}}_refreshXPosition(k,v=k.element){if(!v)return;const b=k.options.x??0;(k.options.anchor||"left")==="right"?v.style.right=b?b*this._renderService.dimensions.css.cell.width+"px":"":v.style.left=b?b*this._renderService.dimensions.css.cell.width+"px":""}_removeDecoration(k){var v;(v=this._decorationElements.get(k))==null||v.remove(),this._decorationElements.delete(k),k.dispose()}};o.BufferDecorationRenderer=x=u([h(1,m.IBufferService),h(2,_.ICoreBrowserService),h(3,m.IDecorationService),h(4,_.IRenderService)],x)},5871:(a,o)=>{Object.defineProperty(o,"__esModule",{value:!0}),o.ColorZoneStore=void 0,o.ColorZoneStore=class{constructor(){this._zones=[],this._zonePool=[],this._zonePoolIndex=0,this._linePadding={full:0,left:0,center:0,right:0}}get zones(){return this._zonePool.length=Math.min(this._zonePool.length,this._zones.length),this._zones}clear(){this._zones.length=0,this._zonePoolIndex=0}addDecoration(l){if(l.options.overviewRulerOptions){for(const u of this._zones)if(u.color===l.options.overviewRulerOptions.color&&u.position===l.options.overviewRulerOptions.position){if(this._lineIntersectsZone(u,l.marker.line))return;if(this._lineAdjacentToZone(u,l.marker.line,l.options.overviewRulerOptions.position))return void this._addLineToZone(u,l.marker.line)}if(this._zonePoolIndex=l.startBufferLine&&u<=l.endBufferLine}_lineAdjacentToZone(l,u,h){return u>=l.startBufferLine-this._linePadding[h||"full"]&&u<=l.endBufferLine+this._linePadding[h||"full"]}_addLineToZone(l,u){l.startBufferLine=Math.min(l.startBufferLine,u),l.endBufferLine=Math.max(l.endBufferLine,u)}}},5744:function(a,o,l){var u=this&&this.__decorate||function(y,C,N,E){var T,j=arguments.length,M=j<3?C:E===null?E=Object.getOwnPropertyDescriptor(C,N):E;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")M=Reflect.decorate(y,C,N,E);else for(var D=y.length-1;D>=0;D--)(T=y[D])&&(M=(j<3?T(M):j>3?T(C,N,M):T(C,N))||M);return j>3&&M&&Object.defineProperty(C,N,M),M},h=this&&this.__param||function(y,C){return function(N,E){C(N,E,y)}};Object.defineProperty(o,"__esModule",{value:!0}),o.OverviewRulerRenderer=void 0;const _=l(5871),p=l(4725),m=l(844),x=l(2585),k={full:0,left:0,center:0,right:0},v={full:0,left:0,center:0,right:0},b={full:0,left:0,center:0,right:0};let w=o.OverviewRulerRenderer=class extends m.Disposable{get _width(){return this._optionsService.options.overviewRulerWidth||0}constructor(y,C,N,E,T,j,M){var I;super(),this._viewportElement=y,this._screenElement=C,this._bufferService=N,this._decorationService=E,this._renderService=T,this._optionsService=j,this._coreBrowserService=M,this._colorZoneStore=new _.ColorZoneStore,this._shouldUpdateDimensions=!0,this._shouldUpdateAnchor=!0,this._lastKnownBufferLength=0,this._canvas=this._coreBrowserService.mainDocument.createElement("canvas"),this._canvas.classList.add("xterm-decoration-overview-ruler"),this._refreshCanvasDimensions(),(I=this._viewportElement.parentElement)==null||I.insertBefore(this._canvas,this._viewportElement);const D=this._canvas.getContext("2d");if(!D)throw new Error("Ctx cannot be null");this._ctx=D,this._registerDecorationListeners(),this._registerBufferChangeListeners(),this._registerDimensionChangeListeners(),this.register((0,m.toDisposable)((()=>{var P;(P=this._canvas)==null||P.remove()})))}_registerDecorationListeners(){this.register(this._decorationService.onDecorationRegistered((()=>this._queueRefresh(void 0,!0)))),this.register(this._decorationService.onDecorationRemoved((()=>this._queueRefresh(void 0,!0))))}_registerBufferChangeListeners(){this.register(this._renderService.onRenderedViewportChange((()=>this._queueRefresh()))),this.register(this._bufferService.buffers.onBufferActivate((()=>{this._canvas.style.display=this._bufferService.buffer===this._bufferService.buffers.alt?"none":"block"}))),this.register(this._bufferService.onScroll((()=>{this._lastKnownBufferLength!==this._bufferService.buffers.normal.lines.length&&(this._refreshDrawHeightConstants(),this._refreshColorZonePadding())})))}_registerDimensionChangeListeners(){this.register(this._renderService.onRender((()=>{this._containerHeight&&this._containerHeight===this._screenElement.clientHeight||(this._queueRefresh(!0),this._containerHeight=this._screenElement.clientHeight)}))),this.register(this._optionsService.onSpecificOptionChange("overviewRulerWidth",(()=>this._queueRefresh(!0)))),this.register(this._coreBrowserService.onDprChange((()=>this._queueRefresh(!0)))),this._queueRefresh(!0)}_refreshDrawConstants(){const y=Math.floor(this._canvas.width/3),C=Math.ceil(this._canvas.width/3);v.full=this._canvas.width,v.left=y,v.center=C,v.right=y,this._refreshDrawHeightConstants(),b.full=0,b.left=0,b.center=v.left,b.right=v.left+v.center}_refreshDrawHeightConstants(){k.full=Math.round(2*this._coreBrowserService.dpr);const y=this._canvas.height/this._bufferService.buffer.lines.length,C=Math.round(Math.max(Math.min(y,12),6)*this._coreBrowserService.dpr);k.left=C,k.center=C,k.right=C}_refreshColorZonePadding(){this._colorZoneStore.setPadding({full:Math.floor(this._bufferService.buffers.active.lines.length/(this._canvas.height-1)*k.full),left:Math.floor(this._bufferService.buffers.active.lines.length/(this._canvas.height-1)*k.left),center:Math.floor(this._bufferService.buffers.active.lines.length/(this._canvas.height-1)*k.center),right:Math.floor(this._bufferService.buffers.active.lines.length/(this._canvas.height-1)*k.right)}),this._lastKnownBufferLength=this._bufferService.buffers.normal.lines.length}_refreshCanvasDimensions(){this._canvas.style.width=`${this._width}px`,this._canvas.width=Math.round(this._width*this._coreBrowserService.dpr),this._canvas.style.height=`${this._screenElement.clientHeight}px`,this._canvas.height=Math.round(this._screenElement.clientHeight*this._coreBrowserService.dpr),this._refreshDrawConstants(),this._refreshColorZonePadding()}_refreshDecorations(){this._shouldUpdateDimensions&&this._refreshCanvasDimensions(),this._ctx.clearRect(0,0,this._canvas.width,this._canvas.height),this._colorZoneStore.clear();for(const C of this._decorationService.decorations)this._colorZoneStore.addDecoration(C);this._ctx.lineWidth=1;const y=this._colorZoneStore.zones;for(const C of y)C.position!=="full"&&this._renderColorZone(C);for(const C of y)C.position==="full"&&this._renderColorZone(C);this._shouldUpdateDimensions=!1,this._shouldUpdateAnchor=!1}_renderColorZone(y){this._ctx.fillStyle=y.color,this._ctx.fillRect(b[y.position||"full"],Math.round((this._canvas.height-1)*(y.startBufferLine/this._bufferService.buffers.active.lines.length)-k[y.position||"full"]/2),v[y.position||"full"],Math.round((this._canvas.height-1)*((y.endBufferLine-y.startBufferLine)/this._bufferService.buffers.active.lines.length)+k[y.position||"full"]))}_queueRefresh(y,C){this._shouldUpdateDimensions=y||this._shouldUpdateDimensions,this._shouldUpdateAnchor=C||this._shouldUpdateAnchor,this._animationFrame===void 0&&(this._animationFrame=this._coreBrowserService.window.requestAnimationFrame((()=>{this._refreshDecorations(),this._animationFrame=void 0})))}};o.OverviewRulerRenderer=w=u([h(2,x.IBufferService),h(3,x.IDecorationService),h(4,p.IRenderService),h(5,x.IOptionsService),h(6,p.ICoreBrowserService)],w)},2950:function(a,o,l){var u=this&&this.__decorate||function(k,v,b,w){var y,C=arguments.length,N=C<3?v:w===null?w=Object.getOwnPropertyDescriptor(v,b):w;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")N=Reflect.decorate(k,v,b,w);else for(var E=k.length-1;E>=0;E--)(y=k[E])&&(N=(C<3?y(N):C>3?y(v,b,N):y(v,b))||N);return C>3&&N&&Object.defineProperty(v,b,N),N},h=this&&this.__param||function(k,v){return function(b,w){v(b,w,k)}};Object.defineProperty(o,"__esModule",{value:!0}),o.CompositionHelper=void 0;const _=l(4725),p=l(2585),m=l(2584);let x=o.CompositionHelper=class{get isComposing(){return this._isComposing}constructor(k,v,b,w,y,C){this._textarea=k,this._compositionView=v,this._bufferService=b,this._optionsService=w,this._coreService=y,this._renderService=C,this._isComposing=!1,this._isSendingComposition=!1,this._compositionPosition={start:0,end:0},this._dataAlreadySent=""}compositionstart(){this._isComposing=!0,this._compositionPosition.start=this._textarea.value.length,this._compositionView.textContent="",this._dataAlreadySent="",this._compositionView.classList.add("active")}compositionupdate(k){this._compositionView.textContent=k.data,this.updateCompositionElements(),setTimeout((()=>{this._compositionPosition.end=this._textarea.value.length}),0)}compositionend(){this._finalizeComposition(!0)}keydown(k){if(this._isComposing||this._isSendingComposition){if(k.keyCode===229||k.keyCode===16||k.keyCode===17||k.keyCode===18)return!1;this._finalizeComposition(!1)}return k.keyCode!==229||(this._handleAnyTextareaChanges(),!1)}_finalizeComposition(k){if(this._compositionView.classList.remove("active"),this._isComposing=!1,k){const v={start:this._compositionPosition.start,end:this._compositionPosition.end};this._isSendingComposition=!0,setTimeout((()=>{if(this._isSendingComposition){let b;this._isSendingComposition=!1,v.start+=this._dataAlreadySent.length,b=this._isComposing?this._textarea.value.substring(v.start,v.end):this._textarea.value.substring(v.start),b.length>0&&this._coreService.triggerDataEvent(b,!0)}}),0)}else{this._isSendingComposition=!1;const v=this._textarea.value.substring(this._compositionPosition.start,this._compositionPosition.end);this._coreService.triggerDataEvent(v,!0)}}_handleAnyTextareaChanges(){const k=this._textarea.value;setTimeout((()=>{if(!this._isComposing){const v=this._textarea.value,b=v.replace(k,"");this._dataAlreadySent=b,v.length>k.length?this._coreService.triggerDataEvent(b,!0):v.lengththis.updateCompositionElements(!0)),0)}}};o.CompositionHelper=x=u([h(2,p.IBufferService),h(3,p.IOptionsService),h(4,p.ICoreService),h(5,_.IRenderService)],x)},9806:(a,o)=>{function l(u,h,_){const p=_.getBoundingClientRect(),m=u.getComputedStyle(_),x=parseInt(m.getPropertyValue("padding-left")),k=parseInt(m.getPropertyValue("padding-top"));return[h.clientX-p.left-x,h.clientY-p.top-k]}Object.defineProperty(o,"__esModule",{value:!0}),o.getCoords=o.getCoordsRelativeToElement=void 0,o.getCoordsRelativeToElement=l,o.getCoords=function(u,h,_,p,m,x,k,v,b){if(!x)return;const w=l(u,h,_);return w?(w[0]=Math.ceil((w[0]+(b?k/2:0))/k),w[1]=Math.ceil(w[1]/v),w[0]=Math.min(Math.max(w[0],1),p+(b?1:0)),w[1]=Math.min(Math.max(w[1],1),m),w):void 0}},9504:(a,o,l)=>{Object.defineProperty(o,"__esModule",{value:!0}),o.moveToCellSequence=void 0;const u=l(2584);function h(v,b,w,y){const C=v-_(v,w),N=b-_(b,w),E=Math.abs(C-N)-(function(T,j,M){let D=0;const I=T-_(T,M),P=j-_(j,M);for(let U=0;U=0&&vb?"A":"B"}function m(v,b,w,y,C,N){let E=v,T=b,j="";for(;E!==w||T!==y;)E+=C?1:-1,C&&E>N.cols-1?(j+=N.buffer.translateBufferLineToString(T,!1,v,E),E=0,v=0,T++):!C&&E<0&&(j+=N.buffer.translateBufferLineToString(T,!1,0,v+1),E=N.cols-1,v=E,T--);return j+N.buffer.translateBufferLineToString(T,!1,v,E)}function x(v,b){const w=b?"O":"[";return u.C0.ESC+w+v}function k(v,b){v=Math.floor(v);let w="";for(let y=0;y0?I-_(I,P):M;const W=I,H=(function(Y,te,$,L,F,G){let V;return V=h($,L,F,G).length>0?L-_(L,F):te,Y<$&&V<=L||Y>=$&&Vv?"D":"C",k(Math.abs(C-v),x(E,y));E=N>b?"D":"C";const T=Math.abs(N-b);return k((function(j,M){return M.cols-j})(N>b?v:C,w)+(T-1)*w.cols+1+((N>b?C:v)-1),x(E,y))}},1296:function(a,o,l){var u=this&&this.__decorate||function(U,q,W,H){var Y,te=arguments.length,$=te<3?q:H===null?H=Object.getOwnPropertyDescriptor(q,W):H;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")$=Reflect.decorate(U,q,W,H);else for(var L=U.length-1;L>=0;L--)(Y=U[L])&&($=(te<3?Y($):te>3?Y(q,W,$):Y(q,W))||$);return te>3&&$&&Object.defineProperty(q,W,$),$},h=this&&this.__param||function(U,q){return function(W,H){q(W,H,U)}};Object.defineProperty(o,"__esModule",{value:!0}),o.DomRenderer=void 0;const _=l(3787),p=l(2550),m=l(2223),x=l(6171),k=l(6052),v=l(4725),b=l(8055),w=l(8460),y=l(844),C=l(2585),N="xterm-dom-renderer-owner-",E="xterm-rows",T="xterm-fg-",j="xterm-bg-",M="xterm-focus",D="xterm-selection";let I=1,P=o.DomRenderer=class extends y.Disposable{constructor(U,q,W,H,Y,te,$,L,F,G,V,ee,ce){super(),this._terminal=U,this._document=q,this._element=W,this._screenElement=H,this._viewportElement=Y,this._helperContainer=te,this._linkifier2=$,this._charSizeService=F,this._optionsService=G,this._bufferService=V,this._coreBrowserService=ee,this._themeService=ce,this._terminalClass=I++,this._rowElements=[],this._selectionRenderModel=(0,k.createSelectionRenderModel)(),this.onRequestRedraw=this.register(new w.EventEmitter).event,this._rowContainer=this._document.createElement("div"),this._rowContainer.classList.add(E),this._rowContainer.style.lineHeight="normal",this._rowContainer.setAttribute("aria-hidden","true"),this._refreshRowElements(this._bufferService.cols,this._bufferService.rows),this._selectionContainer=this._document.createElement("div"),this._selectionContainer.classList.add(D),this._selectionContainer.setAttribute("aria-hidden","true"),this.dimensions=(0,x.createRenderDimensions)(),this._updateDimensions(),this.register(this._optionsService.onOptionChange((()=>this._handleOptionsChanged()))),this.register(this._themeService.onChangeColors((ae=>this._injectCss(ae)))),this._injectCss(this._themeService.colors),this._rowFactory=L.createInstance(_.DomRendererRowFactory,document),this._element.classList.add(N+this._terminalClass),this._screenElement.appendChild(this._rowContainer),this._screenElement.appendChild(this._selectionContainer),this.register(this._linkifier2.onShowLinkUnderline((ae=>this._handleLinkHover(ae)))),this.register(this._linkifier2.onHideLinkUnderline((ae=>this._handleLinkLeave(ae)))),this.register((0,y.toDisposable)((()=>{this._element.classList.remove(N+this._terminalClass),this._rowContainer.remove(),this._selectionContainer.remove(),this._widthCache.dispose(),this._themeStyleElement.remove(),this._dimensionsStyleElement.remove()}))),this._widthCache=new p.WidthCache(this._document,this._helperContainer),this._widthCache.setFont(this._optionsService.rawOptions.fontFamily,this._optionsService.rawOptions.fontSize,this._optionsService.rawOptions.fontWeight,this._optionsService.rawOptions.fontWeightBold),this._setDefaultSpacing()}_updateDimensions(){const U=this._coreBrowserService.dpr;this.dimensions.device.char.width=this._charSizeService.width*U,this.dimensions.device.char.height=Math.ceil(this._charSizeService.height*U),this.dimensions.device.cell.width=this.dimensions.device.char.width+Math.round(this._optionsService.rawOptions.letterSpacing),this.dimensions.device.cell.height=Math.floor(this.dimensions.device.char.height*this._optionsService.rawOptions.lineHeight),this.dimensions.device.char.left=0,this.dimensions.device.char.top=0,this.dimensions.device.canvas.width=this.dimensions.device.cell.width*this._bufferService.cols,this.dimensions.device.canvas.height=this.dimensions.device.cell.height*this._bufferService.rows,this.dimensions.css.canvas.width=Math.round(this.dimensions.device.canvas.width/U),this.dimensions.css.canvas.height=Math.round(this.dimensions.device.canvas.height/U),this.dimensions.css.cell.width=this.dimensions.css.canvas.width/this._bufferService.cols,this.dimensions.css.cell.height=this.dimensions.css.canvas.height/this._bufferService.rows;for(const W of this._rowElements)W.style.width=`${this.dimensions.css.canvas.width}px`,W.style.height=`${this.dimensions.css.cell.height}px`,W.style.lineHeight=`${this.dimensions.css.cell.height}px`,W.style.overflow="hidden";this._dimensionsStyleElement||(this._dimensionsStyleElement=this._document.createElement("style"),this._screenElement.appendChild(this._dimensionsStyleElement));const q=`${this._terminalSelector} .${E} span { display: inline-block; height: 100%; vertical-align: top;}`;this._dimensionsStyleElement.textContent=q,this._selectionContainer.style.height=this._viewportElement.style.height,this._screenElement.style.width=`${this.dimensions.css.canvas.width}px`,this._screenElement.style.height=`${this.dimensions.css.canvas.height}px`}_injectCss(U){this._themeStyleElement||(this._themeStyleElement=this._document.createElement("style"),this._screenElement.appendChild(this._themeStyleElement));let q=`${this._terminalSelector} .${E} { color: ${U.foreground.css}; font-family: ${this._optionsService.rawOptions.fontFamily}; font-size: ${this._optionsService.rawOptions.fontSize}px; font-kerning: none; white-space: pre}`;q+=`${this._terminalSelector} .${E} .xterm-dim { color: ${b.color.multiplyOpacity(U.foreground,.5).css};}`,q+=`${this._terminalSelector} span:not(.xterm-bold) { font-weight: ${this._optionsService.rawOptions.fontWeight};}${this._terminalSelector} span.xterm-bold { font-weight: ${this._optionsService.rawOptions.fontWeightBold};}${this._terminalSelector} span.xterm-italic { font-style: italic;}`;const W=`blink_underline_${this._terminalClass}`,H=`blink_bar_${this._terminalClass}`,Y=`blink_block_${this._terminalClass}`;q+=`@keyframes ${W} { 50% { border-bottom-style: hidden; }}`,q+=`@keyframes ${H} { 50% { box-shadow: none; }}`,q+=`@keyframes ${Y} { 0% { background-color: ${U.cursor.css}; color: ${U.cursorAccent.css}; } 50% { background-color: inherit; color: ${U.cursor.css}; }}`,q+=`${this._terminalSelector} .${E}.${M} .xterm-cursor.xterm-cursor-blink.xterm-cursor-underline { animation: ${W} 1s step-end infinite;}${this._terminalSelector} .${E}.${M} .xterm-cursor.xterm-cursor-blink.xterm-cursor-bar { animation: ${H} 1s step-end infinite;}${this._terminalSelector} .${E}.${M} .xterm-cursor.xterm-cursor-blink.xterm-cursor-block { animation: ${Y} 1s step-end infinite;}${this._terminalSelector} .${E} .xterm-cursor.xterm-cursor-block { background-color: ${U.cursor.css}; color: ${U.cursorAccent.css};}${this._terminalSelector} .${E} .xterm-cursor.xterm-cursor-block:not(.xterm-cursor-blink) { background-color: ${U.cursor.css} !important; color: ${U.cursorAccent.css} !important;}${this._terminalSelector} .${E} .xterm-cursor.xterm-cursor-outline { outline: 1px solid ${U.cursor.css}; outline-offset: -1px;}${this._terminalSelector} .${E} .xterm-cursor.xterm-cursor-bar { box-shadow: ${this._optionsService.rawOptions.cursorWidth}px 0 0 ${U.cursor.css} inset;}${this._terminalSelector} .${E} .xterm-cursor.xterm-cursor-underline { border-bottom: 1px ${U.cursor.css}; border-bottom-style: solid; height: calc(100% - 1px);}`,q+=`${this._terminalSelector} .${D} { position: absolute; top: 0; left: 0; z-index: 1; pointer-events: none;}${this._terminalSelector}.focus .${D} div { position: absolute; background-color: ${U.selectionBackgroundOpaque.css};}${this._terminalSelector} .${D} div { position: absolute; background-color: ${U.selectionInactiveBackgroundOpaque.css};}`;for(const[te,$]of U.ansi.entries())q+=`${this._terminalSelector} .${T}${te} { color: ${$.css}; }${this._terminalSelector} .${T}${te}.xterm-dim { color: ${b.color.multiplyOpacity($,.5).css}; }${this._terminalSelector} .${j}${te} { background-color: ${$.css}; }`;q+=`${this._terminalSelector} .${T}${m.INVERTED_DEFAULT_COLOR} { color: ${b.color.opaque(U.background).css}; }${this._terminalSelector} .${T}${m.INVERTED_DEFAULT_COLOR}.xterm-dim { color: ${b.color.multiplyOpacity(b.color.opaque(U.background),.5).css}; }${this._terminalSelector} .${j}${m.INVERTED_DEFAULT_COLOR} { background-color: ${U.foreground.css}; }`,this._themeStyleElement.textContent=q}_setDefaultSpacing(){const U=this.dimensions.css.cell.width-this._widthCache.get("W",!1,!1);this._rowContainer.style.letterSpacing=`${U}px`,this._rowFactory.defaultSpacing=U}handleDevicePixelRatioChange(){this._updateDimensions(),this._widthCache.clear(),this._setDefaultSpacing()}_refreshRowElements(U,q){for(let W=this._rowElements.length;W<=q;W++){const H=this._document.createElement("div");this._rowContainer.appendChild(H),this._rowElements.push(H)}for(;this._rowElements.length>q;)this._rowContainer.removeChild(this._rowElements.pop())}handleResize(U,q){this._refreshRowElements(U,q),this._updateDimensions(),this.handleSelectionChanged(this._selectionRenderModel.selectionStart,this._selectionRenderModel.selectionEnd,this._selectionRenderModel.columnSelectMode)}handleCharSizeChanged(){this._updateDimensions(),this._widthCache.clear(),this._setDefaultSpacing()}handleBlur(){this._rowContainer.classList.remove(M),this.renderRows(0,this._bufferService.rows-1)}handleFocus(){this._rowContainer.classList.add(M),this.renderRows(this._bufferService.buffer.y,this._bufferService.buffer.y)}handleSelectionChanged(U,q,W){if(this._selectionContainer.replaceChildren(),this._rowFactory.handleSelectionChanged(U,q,W),this.renderRows(0,this._bufferService.rows-1),!U||!q)return;this._selectionRenderModel.update(this._terminal,U,q,W);const H=this._selectionRenderModel.viewportStartRow,Y=this._selectionRenderModel.viewportEndRow,te=this._selectionRenderModel.viewportCappedStartRow,$=this._selectionRenderModel.viewportCappedEndRow;if(te>=this._bufferService.rows||$<0)return;const L=this._document.createDocumentFragment();if(W){const F=U[0]>q[0];L.appendChild(this._createSelectionElement(te,F?q[0]:U[0],F?U[0]:q[0],$-te+1))}else{const F=H===te?U[0]:0,G=te===Y?q[0]:this._bufferService.cols;L.appendChild(this._createSelectionElement(te,F,G));const V=$-te-1;if(L.appendChild(this._createSelectionElement(te+1,0,this._bufferService.cols,V)),te!==$){const ee=Y===$?q[0]:this._bufferService.cols;L.appendChild(this._createSelectionElement($,0,ee))}}this._selectionContainer.appendChild(L)}_createSelectionElement(U,q,W,H=1){const Y=this._document.createElement("div"),te=q*this.dimensions.css.cell.width;let $=this.dimensions.css.cell.width*(W-q);return te+$>this.dimensions.css.canvas.width&&($=this.dimensions.css.canvas.width-te),Y.style.height=H*this.dimensions.css.cell.height+"px",Y.style.top=U*this.dimensions.css.cell.height+"px",Y.style.left=`${te}px`,Y.style.width=`${$}px`,Y}handleCursorMove(){}_handleOptionsChanged(){this._updateDimensions(),this._injectCss(this._themeService.colors),this._widthCache.setFont(this._optionsService.rawOptions.fontFamily,this._optionsService.rawOptions.fontSize,this._optionsService.rawOptions.fontWeight,this._optionsService.rawOptions.fontWeightBold),this._setDefaultSpacing()}clear(){for(const U of this._rowElements)U.replaceChildren()}renderRows(U,q){const W=this._bufferService.buffer,H=W.ybase+W.y,Y=Math.min(W.x,this._bufferService.cols-1),te=this._optionsService.rawOptions.cursorBlink,$=this._optionsService.rawOptions.cursorStyle,L=this._optionsService.rawOptions.cursorInactiveStyle;for(let F=U;F<=q;F++){const G=F+W.ydisp,V=this._rowElements[F],ee=W.lines.get(G);if(!V||!ee)break;V.replaceChildren(...this._rowFactory.createRow(ee,G,G===H,$,L,Y,te,this.dimensions.css.cell.width,this._widthCache,-1,-1))}}get _terminalSelector(){return`.${N}${this._terminalClass}`}_handleLinkHover(U){this._setCellUnderline(U.x1,U.x2,U.y1,U.y2,U.cols,!0)}_handleLinkLeave(U){this._setCellUnderline(U.x1,U.x2,U.y1,U.y2,U.cols,!1)}_setCellUnderline(U,q,W,H,Y,te){W<0&&(U=0),H<0&&(q=0);const $=this._bufferService.rows-1;W=Math.max(Math.min(W,$),0),H=Math.max(Math.min(H,$),0),Y=Math.min(Y,this._bufferService.cols);const L=this._bufferService.buffer,F=L.ybase+L.y,G=Math.min(L.x,Y-1),V=this._optionsService.rawOptions.cursorBlink,ee=this._optionsService.rawOptions.cursorStyle,ce=this._optionsService.rawOptions.cursorInactiveStyle;for(let ae=W;ae<=H;++ae){const se=ae+L.ydisp,X=this._rowElements[ae],oe=L.lines.get(se);if(!X||!oe)break;X.replaceChildren(...this._rowFactory.createRow(oe,se,se===F,ee,ce,G,V,this.dimensions.css.cell.width,this._widthCache,te?ae===W?U:0:-1,te?(ae===H?q:Y)-1:-1))}}};o.DomRenderer=P=u([h(7,C.IInstantiationService),h(8,v.ICharSizeService),h(9,C.IOptionsService),h(10,C.IBufferService),h(11,v.ICoreBrowserService),h(12,v.IThemeService)],P)},3787:function(a,o,l){var u=this&&this.__decorate||function(E,T,j,M){var D,I=arguments.length,P=I<3?T:M===null?M=Object.getOwnPropertyDescriptor(T,j):M;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")P=Reflect.decorate(E,T,j,M);else for(var U=E.length-1;U>=0;U--)(D=E[U])&&(P=(I<3?D(P):I>3?D(T,j,P):D(T,j))||P);return I>3&&P&&Object.defineProperty(T,j,P),P},h=this&&this.__param||function(E,T){return function(j,M){T(j,M,E)}};Object.defineProperty(o,"__esModule",{value:!0}),o.DomRendererRowFactory=void 0;const _=l(2223),p=l(643),m=l(511),x=l(2585),k=l(8055),v=l(4725),b=l(4269),w=l(6171),y=l(3734);let C=o.DomRendererRowFactory=class{constructor(E,T,j,M,D,I,P){this._document=E,this._characterJoinerService=T,this._optionsService=j,this._coreBrowserService=M,this._coreService=D,this._decorationService=I,this._themeService=P,this._workCell=new m.CellData,this._columnSelectMode=!1,this.defaultSpacing=0}handleSelectionChanged(E,T,j){this._selectionStart=E,this._selectionEnd=T,this._columnSelectMode=j}createRow(E,T,j,M,D,I,P,U,q,W,H){const Y=[],te=this._characterJoinerService.getJoinedCharacters(T),$=this._themeService.colors;let L,F=E.getNoBgTrimmedLength();j&&F0&&Ee===te[0][0]){ze=!0;const Qe=te.shift();Oe=new b.JoinedCellData(this._workCell,E.translateToString(!0,Qe[0],Qe[1]),Qe[1]-Qe[0]),He=Qe[1]-1,Ie=Oe.getWidth()}const Xe=this._isCellInSelection(Ee,T),_t=j&&Ee===I,Vt=pe&&Ee>=W&&Ee<=H;let $t=!1;this._decorationService.forEachDecorationAtCell(Ee,T,void 0,(Qe=>{$t=!0}));let jt=Oe.getChars()||p.WHITESPACE_CELL_CHAR;if(jt===" "&&(Oe.isUnderline()||Oe.isOverline())&&(jt=" "),le=Ie*U-q.get(jt,Oe.isBold(),Oe.isItalic()),L){if(G&&(Xe&&oe||!Xe&&!oe&&Oe.bg===ee)&&(Xe&&oe&&$.selectionForeground||Oe.fg===ce)&&Oe.extended.ext===ae&&Vt===se&&le===X&&!_t&&!ze&&!$t){Oe.isInvisible()?V+=p.WHITESPACE_CELL_CHAR:V+=jt,G++;continue}G&&(L.textContent=V),L=this._document.createElement("span"),G=0,V=""}else L=this._document.createElement("span");if(ee=Oe.bg,ce=Oe.fg,ae=Oe.extended.ext,se=Vt,X=le,oe=Xe,ze&&I>=Ee&&I<=He&&(I=Ee),!this._coreService.isCursorHidden&&_t&&this._coreService.isCursorInitialized){if(_e.push("xterm-cursor"),this._coreBrowserService.isFocused)P&&_e.push("xterm-cursor-blink"),_e.push(M==="bar"?"xterm-cursor-bar":M==="underline"?"xterm-cursor-underline":"xterm-cursor-block");else if(D)switch(D){case"outline":_e.push("xterm-cursor-outline");break;case"block":_e.push("xterm-cursor-block");break;case"bar":_e.push("xterm-cursor-bar");break;case"underline":_e.push("xterm-cursor-underline")}}if(Oe.isBold()&&_e.push("xterm-bold"),Oe.isItalic()&&_e.push("xterm-italic"),Oe.isDim()&&_e.push("xterm-dim"),V=Oe.isInvisible()?p.WHITESPACE_CELL_CHAR:Oe.getChars()||p.WHITESPACE_CELL_CHAR,Oe.isUnderline()&&(_e.push(`xterm-underline-${Oe.extended.underlineStyle}`),V===" "&&(V=" "),!Oe.isUnderlineColorDefault()))if(Oe.isUnderlineColorRGB())L.style.textDecorationColor=`rgb(${y.AttributeData.toColorRGB(Oe.getUnderlineColor()).join(",")})`;else{let Qe=Oe.getUnderlineColor();this._optionsService.rawOptions.drawBoldTextInBrightColors&&Oe.isBold()&&Qe<8&&(Qe+=8),L.style.textDecorationColor=$.ansi[Qe].css}Oe.isOverline()&&(_e.push("xterm-overline"),V===" "&&(V=" ")),Oe.isStrikethrough()&&_e.push("xterm-strikethrough"),Vt&&(L.style.textDecoration="underline");let mt=Oe.getFgColor(),we=Oe.getFgColorMode(),ct=Oe.getBgColor(),ye=Oe.getBgColorMode();const je=!!Oe.isInverse();if(je){const Qe=mt;mt=ct,ct=Qe;const wt=we;we=ye,ye=wt}let qe,at,nt,Kt=!1;switch(this._decorationService.forEachDecorationAtCell(Ee,T,void 0,(Qe=>{Qe.options.layer!=="top"&&Kt||(Qe.backgroundColorRGB&&(ye=50331648,ct=Qe.backgroundColorRGB.rgba>>8&16777215,qe=Qe.backgroundColorRGB),Qe.foregroundColorRGB&&(we=50331648,mt=Qe.foregroundColorRGB.rgba>>8&16777215,at=Qe.foregroundColorRGB),Kt=Qe.options.layer==="top")})),!Kt&&Xe&&(qe=this._coreBrowserService.isFocused?$.selectionBackgroundOpaque:$.selectionInactiveBackgroundOpaque,ct=qe.rgba>>8&16777215,ye=50331648,Kt=!0,$.selectionForeground&&(we=50331648,mt=$.selectionForeground.rgba>>8&16777215,at=$.selectionForeground)),Kt&&_e.push("xterm-decoration-top"),ye){case 16777216:case 33554432:nt=$.ansi[ct],_e.push(`xterm-bg-${ct}`);break;case 50331648:nt=k.channels.toColor(ct>>16,ct>>8&255,255&ct),this._addStyle(L,`background-color:#${N((ct>>>0).toString(16),"0",6)}`);break;default:je?(nt=$.foreground,_e.push(`xterm-bg-${_.INVERTED_DEFAULT_COLOR}`)):nt=$.background}switch(qe||Oe.isDim()&&(qe=k.color.multiplyOpacity(nt,.5)),we){case 16777216:case 33554432:Oe.isBold()&&mt<8&&this._optionsService.rawOptions.drawBoldTextInBrightColors&&(mt+=8),this._applyMinimumContrast(L,nt,$.ansi[mt],Oe,qe,void 0)||_e.push(`xterm-fg-${mt}`);break;case 50331648:const Qe=k.channels.toColor(mt>>16&255,mt>>8&255,255&mt);this._applyMinimumContrast(L,nt,Qe,Oe,qe,at)||this._addStyle(L,`color:#${N(mt.toString(16),"0",6)}`);break;default:this._applyMinimumContrast(L,nt,$.foreground,Oe,qe,at)||je&&_e.push(`xterm-fg-${_.INVERTED_DEFAULT_COLOR}`)}_e.length&&(L.className=_e.join(" "),_e.length=0),_t||ze||$t?L.textContent=V:G++,le!==this.defaultSpacing&&(L.style.letterSpacing=`${le}px`),Y.push(L),Ee=He}return L&&G&&(L.textContent=V),Y}_applyMinimumContrast(E,T,j,M,D,I){if(this._optionsService.rawOptions.minimumContrastRatio===1||(0,w.treatGlyphAsBackgroundColor)(M.getCode()))return!1;const P=this._getContrastCache(M);let U;if(D||I||(U=P.getColor(T.rgba,j.rgba)),U===void 0){const q=this._optionsService.rawOptions.minimumContrastRatio/(M.isDim()?2:1);U=k.color.ensureContrastRatio(D||T,I||j,q),P.setColor((D||T).rgba,(I||j).rgba,U??null)}return!!U&&(this._addStyle(E,`color:${U.css}`),!0)}_getContrastCache(E){return E.isDim()?this._themeService.colors.halfContrastCache:this._themeService.colors.contrastCache}_addStyle(E,T){E.setAttribute("style",`${E.getAttribute("style")||""}${T};`)}_isCellInSelection(E,T){const j=this._selectionStart,M=this._selectionEnd;return!(!j||!M)&&(this._columnSelectMode?j[0]<=M[0]?E>=j[0]&&T>=j[1]&&E=j[1]&&E>=M[0]&&T<=M[1]:T>j[1]&&T=j[0]&&E=j[0])}};function N(E,T,j){for(;E.length{Object.defineProperty(o,"__esModule",{value:!0}),o.WidthCache=void 0,o.WidthCache=class{constructor(l,u){this._flat=new Float32Array(256),this._font="",this._fontSize=0,this._weight="normal",this._weightBold="bold",this._measureElements=[],this._container=l.createElement("div"),this._container.classList.add("xterm-width-cache-measure-container"),this._container.setAttribute("aria-hidden","true"),this._container.style.whiteSpace="pre",this._container.style.fontKerning="none";const h=l.createElement("span");h.classList.add("xterm-char-measure-element");const _=l.createElement("span");_.classList.add("xterm-char-measure-element"),_.style.fontWeight="bold";const p=l.createElement("span");p.classList.add("xterm-char-measure-element"),p.style.fontStyle="italic";const m=l.createElement("span");m.classList.add("xterm-char-measure-element"),m.style.fontWeight="bold",m.style.fontStyle="italic",this._measureElements=[h,_,p,m],this._container.appendChild(h),this._container.appendChild(_),this._container.appendChild(p),this._container.appendChild(m),u.appendChild(this._container),this.clear()}dispose(){this._container.remove(),this._measureElements.length=0,this._holey=void 0}clear(){this._flat.fill(-9999),this._holey=new Map}setFont(l,u,h,_){l===this._font&&u===this._fontSize&&h===this._weight&&_===this._weightBold||(this._font=l,this._fontSize=u,this._weight=h,this._weightBold=_,this._container.style.fontFamily=this._font,this._container.style.fontSize=`${this._fontSize}px`,this._measureElements[0].style.fontWeight=`${h}`,this._measureElements[1].style.fontWeight=`${_}`,this._measureElements[2].style.fontWeight=`${h}`,this._measureElements[3].style.fontWeight=`${_}`,this.clear())}get(l,u,h){let _=0;if(!u&&!h&&l.length===1&&(_=l.charCodeAt(0))<256){if(this._flat[_]!==-9999)return this._flat[_];const x=this._measure(l,0);return x>0&&(this._flat[_]=x),x}let p=l;u&&(p+="B"),h&&(p+="I");let m=this._holey.get(p);if(m===void 0){let x=0;u&&(x|=1),h&&(x|=2),m=this._measure(l,x),m>0&&this._holey.set(p,m)}return m}_measure(l,u){const h=this._measureElements[u];return h.textContent=l.repeat(32),h.offsetWidth/32}}},2223:(a,o,l)=>{Object.defineProperty(o,"__esModule",{value:!0}),o.TEXT_BASELINE=o.DIM_OPACITY=o.INVERTED_DEFAULT_COLOR=void 0;const u=l(6114);o.INVERTED_DEFAULT_COLOR=257,o.DIM_OPACITY=.5,o.TEXT_BASELINE=u.isFirefox||u.isLegacyEdge?"bottom":"ideographic"},6171:(a,o)=>{function l(h){return 57508<=h&&h<=57558}function u(h){return h>=128512&&h<=128591||h>=127744&&h<=128511||h>=128640&&h<=128767||h>=9728&&h<=9983||h>=9984&&h<=10175||h>=65024&&h<=65039||h>=129280&&h<=129535||h>=127462&&h<=127487}Object.defineProperty(o,"__esModule",{value:!0}),o.computeNextVariantOffset=o.createRenderDimensions=o.treatGlyphAsBackgroundColor=o.allowRescaling=o.isEmoji=o.isRestrictedPowerlineGlyph=o.isPowerlineGlyph=o.throwIfFalsy=void 0,o.throwIfFalsy=function(h){if(!h)throw new Error("value must not be falsy");return h},o.isPowerlineGlyph=l,o.isRestrictedPowerlineGlyph=function(h){return 57520<=h&&h<=57527},o.isEmoji=u,o.allowRescaling=function(h,_,p,m){return _===1&&p>Math.ceil(1.5*m)&&h!==void 0&&h>255&&!u(h)&&!l(h)&&!(function(x){return 57344<=x&&x<=63743})(h)},o.treatGlyphAsBackgroundColor=function(h){return l(h)||(function(_){return 9472<=_&&_<=9631})(h)},o.createRenderDimensions=function(){return{css:{canvas:{width:0,height:0},cell:{width:0,height:0}},device:{canvas:{width:0,height:0},cell:{width:0,height:0},char:{width:0,height:0,left:0,top:0}}}},o.computeNextVariantOffset=function(h,_,p=0){return(h-(2*Math.round(_)-p))%(2*Math.round(_))}},6052:(a,o)=>{Object.defineProperty(o,"__esModule",{value:!0}),o.createSelectionRenderModel=void 0;class l{constructor(){this.clear()}clear(){this.hasSelection=!1,this.columnSelectMode=!1,this.viewportStartRow=0,this.viewportEndRow=0,this.viewportCappedStartRow=0,this.viewportCappedEndRow=0,this.startCol=0,this.endCol=0,this.selectionStart=void 0,this.selectionEnd=void 0}update(h,_,p,m=!1){if(this.selectionStart=_,this.selectionEnd=p,!_||!p||_[0]===p[0]&&_[1]===p[1])return void this.clear();const x=h.buffers.active.ydisp,k=_[1]-x,v=p[1]-x,b=Math.max(k,0),w=Math.min(v,h.rows-1);b>=h.rows||w<0?this.clear():(this.hasSelection=!0,this.columnSelectMode=m,this.viewportStartRow=k,this.viewportEndRow=v,this.viewportCappedStartRow=b,this.viewportCappedEndRow=w,this.startCol=_[0],this.endCol=p[0])}isCellSelected(h,_,p){return!!this.hasSelection&&(p-=h.buffer.active.viewportY,this.columnSelectMode?this.startCol<=this.endCol?_>=this.startCol&&p>=this.viewportCappedStartRow&&_=this.viewportCappedStartRow&&_>=this.endCol&&p<=this.viewportCappedEndRow:p>this.viewportStartRow&&p=this.startCol&&_=this.startCol)}}o.createSelectionRenderModel=function(){return new l}},456:(a,o)=>{Object.defineProperty(o,"__esModule",{value:!0}),o.SelectionModel=void 0,o.SelectionModel=class{constructor(l){this._bufferService=l,this.isSelectAllActive=!1,this.selectionStartLength=0}clearSelection(){this.selectionStart=void 0,this.selectionEnd=void 0,this.isSelectAllActive=!1,this.selectionStartLength=0}get finalSelectionStart(){return this.isSelectAllActive?[0,0]:this.selectionEnd&&this.selectionStart&&this.areSelectionValuesReversed()?this.selectionEnd:this.selectionStart}get finalSelectionEnd(){if(this.isSelectAllActive)return[this._bufferService.cols,this._bufferService.buffer.ybase+this._bufferService.rows-1];if(this.selectionStart){if(!this.selectionEnd||this.areSelectionValuesReversed()){const l=this.selectionStart[0]+this.selectionStartLength;return l>this._bufferService.cols?l%this._bufferService.cols==0?[this._bufferService.cols,this.selectionStart[1]+Math.floor(l/this._bufferService.cols)-1]:[l%this._bufferService.cols,this.selectionStart[1]+Math.floor(l/this._bufferService.cols)]:[l,this.selectionStart[1]]}if(this.selectionStartLength&&this.selectionEnd[1]===this.selectionStart[1]){const l=this.selectionStart[0]+this.selectionStartLength;return l>this._bufferService.cols?[l%this._bufferService.cols,this.selectionStart[1]+Math.floor(l/this._bufferService.cols)]:[Math.max(l,this.selectionEnd[0]),this.selectionEnd[1]]}return this.selectionEnd}}areSelectionValuesReversed(){const l=this.selectionStart,u=this.selectionEnd;return!(!l||!u)&&(l[1]>u[1]||l[1]===u[1]&&l[0]>u[0])}handleTrim(l){return this.selectionStart&&(this.selectionStart[1]-=l),this.selectionEnd&&(this.selectionEnd[1]-=l),this.selectionEnd&&this.selectionEnd[1]<0?(this.clearSelection(),!0):(this.selectionStart&&this.selectionStart[1]<0&&(this.selectionStart[1]=0),!1)}}},428:function(a,o,l){var u=this&&this.__decorate||function(w,y,C,N){var E,T=arguments.length,j=T<3?y:N===null?N=Object.getOwnPropertyDescriptor(y,C):N;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")j=Reflect.decorate(w,y,C,N);else for(var M=w.length-1;M>=0;M--)(E=w[M])&&(j=(T<3?E(j):T>3?E(y,C,j):E(y,C))||j);return T>3&&j&&Object.defineProperty(y,C,j),j},h=this&&this.__param||function(w,y){return function(C,N){y(C,N,w)}};Object.defineProperty(o,"__esModule",{value:!0}),o.CharSizeService=void 0;const _=l(2585),p=l(8460),m=l(844);let x=o.CharSizeService=class extends m.Disposable{get hasValidSize(){return this.width>0&&this.height>0}constructor(w,y,C){super(),this._optionsService=C,this.width=0,this.height=0,this._onCharSizeChange=this.register(new p.EventEmitter),this.onCharSizeChange=this._onCharSizeChange.event;try{this._measureStrategy=this.register(new b(this._optionsService))}catch{this._measureStrategy=this.register(new v(w,y,this._optionsService))}this.register(this._optionsService.onMultipleOptionChange(["fontFamily","fontSize"],(()=>this.measure())))}measure(){const w=this._measureStrategy.measure();w.width===this.width&&w.height===this.height||(this.width=w.width,this.height=w.height,this._onCharSizeChange.fire())}};o.CharSizeService=x=u([h(2,_.IOptionsService)],x);class k extends m.Disposable{constructor(){super(...arguments),this._result={width:0,height:0}}_validateAndSet(y,C){y!==void 0&&y>0&&C!==void 0&&C>0&&(this._result.width=y,this._result.height=C)}}class v extends k{constructor(y,C,N){super(),this._document=y,this._parentElement=C,this._optionsService=N,this._measureElement=this._document.createElement("span"),this._measureElement.classList.add("xterm-char-measure-element"),this._measureElement.textContent="W".repeat(32),this._measureElement.setAttribute("aria-hidden","true"),this._measureElement.style.whiteSpace="pre",this._measureElement.style.fontKerning="none",this._parentElement.appendChild(this._measureElement)}measure(){return this._measureElement.style.fontFamily=this._optionsService.rawOptions.fontFamily,this._measureElement.style.fontSize=`${this._optionsService.rawOptions.fontSize}px`,this._validateAndSet(Number(this._measureElement.offsetWidth)/32,Number(this._measureElement.offsetHeight)),this._result}}class b extends k{constructor(y){super(),this._optionsService=y,this._canvas=new OffscreenCanvas(100,100),this._ctx=this._canvas.getContext("2d");const C=this._ctx.measureText("W");if(!("width"in C&&"fontBoundingBoxAscent"in C&&"fontBoundingBoxDescent"in C))throw new Error("Required font metrics not supported")}measure(){this._ctx.font=`${this._optionsService.rawOptions.fontSize}px ${this._optionsService.rawOptions.fontFamily}`;const y=this._ctx.measureText("W");return this._validateAndSet(y.width,y.fontBoundingBoxAscent+y.fontBoundingBoxDescent),this._result}}},4269:function(a,o,l){var u=this&&this.__decorate||function(b,w,y,C){var N,E=arguments.length,T=E<3?w:C===null?C=Object.getOwnPropertyDescriptor(w,y):C;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")T=Reflect.decorate(b,w,y,C);else for(var j=b.length-1;j>=0;j--)(N=b[j])&&(T=(E<3?N(T):E>3?N(w,y,T):N(w,y))||T);return E>3&&T&&Object.defineProperty(w,y,T),T},h=this&&this.__param||function(b,w){return function(y,C){w(y,C,b)}};Object.defineProperty(o,"__esModule",{value:!0}),o.CharacterJoinerService=o.JoinedCellData=void 0;const _=l(3734),p=l(643),m=l(511),x=l(2585);class k extends _.AttributeData{constructor(w,y,C){super(),this.content=0,this.combinedData="",this.fg=w.fg,this.bg=w.bg,this.combinedData=y,this._width=C}isCombined(){return 2097152}getWidth(){return this._width}getChars(){return this.combinedData}getCode(){return 2097151}setFromCharData(w){throw new Error("not implemented")}getAsCharData(){return[this.fg,this.getChars(),this.getWidth(),this.getCode()]}}o.JoinedCellData=k;let v=o.CharacterJoinerService=class jI{constructor(w){this._bufferService=w,this._characterJoiners=[],this._nextCharacterJoinerId=0,this._workCell=new m.CellData}register(w){const y={id:this._nextCharacterJoinerId++,handler:w};return this._characterJoiners.push(y),y.id}deregister(w){for(let y=0;y1){const P=this._getJoinedRanges(N,j,T,y,E);for(let U=0;U1){const I=this._getJoinedRanges(N,j,T,y,E);for(let P=0;P{Object.defineProperty(o,"__esModule",{value:!0}),o.CoreBrowserService=void 0;const u=l(844),h=l(8460),_=l(3656);class p extends u.Disposable{constructor(k,v,b){super(),this._textarea=k,this._window=v,this.mainDocument=b,this._isFocused=!1,this._cachedIsFocused=void 0,this._screenDprMonitor=new m(this._window),this._onDprChange=this.register(new h.EventEmitter),this.onDprChange=this._onDprChange.event,this._onWindowChange=this.register(new h.EventEmitter),this.onWindowChange=this._onWindowChange.event,this.register(this.onWindowChange((w=>this._screenDprMonitor.setWindow(w)))),this.register((0,h.forwardEvent)(this._screenDprMonitor.onDprChange,this._onDprChange)),this._textarea.addEventListener("focus",(()=>this._isFocused=!0)),this._textarea.addEventListener("blur",(()=>this._isFocused=!1))}get window(){return this._window}set window(k){this._window!==k&&(this._window=k,this._onWindowChange.fire(this._window))}get dpr(){return this.window.devicePixelRatio}get isFocused(){return this._cachedIsFocused===void 0&&(this._cachedIsFocused=this._isFocused&&this._textarea.ownerDocument.hasFocus(),queueMicrotask((()=>this._cachedIsFocused=void 0))),this._cachedIsFocused}}o.CoreBrowserService=p;class m extends u.Disposable{constructor(k){super(),this._parentWindow=k,this._windowResizeListener=this.register(new u.MutableDisposable),this._onDprChange=this.register(new h.EventEmitter),this.onDprChange=this._onDprChange.event,this._outerListener=()=>this._setDprAndFireIfDiffers(),this._currentDevicePixelRatio=this._parentWindow.devicePixelRatio,this._updateDpr(),this._setWindowResizeListener(),this.register((0,u.toDisposable)((()=>this.clearListener())))}setWindow(k){this._parentWindow=k,this._setWindowResizeListener(),this._setDprAndFireIfDiffers()}_setWindowResizeListener(){this._windowResizeListener.value=(0,_.addDisposableDomListener)(this._parentWindow,"resize",(()=>this._setDprAndFireIfDiffers()))}_setDprAndFireIfDiffers(){this._parentWindow.devicePixelRatio!==this._currentDevicePixelRatio&&this._onDprChange.fire(this._parentWindow.devicePixelRatio),this._updateDpr()}_updateDpr(){var k;this._outerListener&&((k=this._resolutionMediaMatchList)==null||k.removeListener(this._outerListener),this._currentDevicePixelRatio=this._parentWindow.devicePixelRatio,this._resolutionMediaMatchList=this._parentWindow.matchMedia(`screen and (resolution: ${this._parentWindow.devicePixelRatio}dppx)`),this._resolutionMediaMatchList.addListener(this._outerListener))}clearListener(){this._resolutionMediaMatchList&&this._outerListener&&(this._resolutionMediaMatchList.removeListener(this._outerListener),this._resolutionMediaMatchList=void 0,this._outerListener=void 0)}}},779:(a,o,l)=>{Object.defineProperty(o,"__esModule",{value:!0}),o.LinkProviderService=void 0;const u=l(844);class h extends u.Disposable{constructor(){super(),this.linkProviders=[],this.register((0,u.toDisposable)((()=>this.linkProviders.length=0)))}registerLinkProvider(p){return this.linkProviders.push(p),{dispose:()=>{const m=this.linkProviders.indexOf(p);m!==-1&&this.linkProviders.splice(m,1)}}}}o.LinkProviderService=h},8934:function(a,o,l){var u=this&&this.__decorate||function(x,k,v,b){var w,y=arguments.length,C=y<3?k:b===null?b=Object.getOwnPropertyDescriptor(k,v):b;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")C=Reflect.decorate(x,k,v,b);else for(var N=x.length-1;N>=0;N--)(w=x[N])&&(C=(y<3?w(C):y>3?w(k,v,C):w(k,v))||C);return y>3&&C&&Object.defineProperty(k,v,C),C},h=this&&this.__param||function(x,k){return function(v,b){k(v,b,x)}};Object.defineProperty(o,"__esModule",{value:!0}),o.MouseService=void 0;const _=l(4725),p=l(9806);let m=o.MouseService=class{constructor(x,k){this._renderService=x,this._charSizeService=k}getCoords(x,k,v,b,w){return(0,p.getCoords)(window,x,k,v,b,this._charSizeService.hasValidSize,this._renderService.dimensions.css.cell.width,this._renderService.dimensions.css.cell.height,w)}getMouseReportCoords(x,k){const v=(0,p.getCoordsRelativeToElement)(window,x,k);if(this._charSizeService.hasValidSize)return v[0]=Math.min(Math.max(v[0],0),this._renderService.dimensions.css.canvas.width-1),v[1]=Math.min(Math.max(v[1],0),this._renderService.dimensions.css.canvas.height-1),{col:Math.floor(v[0]/this._renderService.dimensions.css.cell.width),row:Math.floor(v[1]/this._renderService.dimensions.css.cell.height),x:Math.floor(v[0]),y:Math.floor(v[1])}}};o.MouseService=m=u([h(0,_.IRenderService),h(1,_.ICharSizeService)],m)},3230:function(a,o,l){var u=this&&this.__decorate||function(w,y,C,N){var E,T=arguments.length,j=T<3?y:N===null?N=Object.getOwnPropertyDescriptor(y,C):N;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")j=Reflect.decorate(w,y,C,N);else for(var M=w.length-1;M>=0;M--)(E=w[M])&&(j=(T<3?E(j):T>3?E(y,C,j):E(y,C))||j);return T>3&&j&&Object.defineProperty(y,C,j),j},h=this&&this.__param||function(w,y){return function(C,N){y(C,N,w)}};Object.defineProperty(o,"__esModule",{value:!0}),o.RenderService=void 0;const _=l(6193),p=l(4725),m=l(8460),x=l(844),k=l(7226),v=l(2585);let b=o.RenderService=class extends x.Disposable{get dimensions(){return this._renderer.value.dimensions}constructor(w,y,C,N,E,T,j,M){super(),this._rowCount=w,this._charSizeService=N,this._renderer=this.register(new x.MutableDisposable),this._pausedResizeTask=new k.DebouncedIdleTask,this._observerDisposable=this.register(new x.MutableDisposable),this._isPaused=!1,this._needsFullRefresh=!1,this._isNextRenderRedrawOnly=!0,this._needsSelectionRefresh=!1,this._canvasWidth=0,this._canvasHeight=0,this._selectionState={start:void 0,end:void 0,columnSelectMode:!1},this._onDimensionsChange=this.register(new m.EventEmitter),this.onDimensionsChange=this._onDimensionsChange.event,this._onRenderedViewportChange=this.register(new m.EventEmitter),this.onRenderedViewportChange=this._onRenderedViewportChange.event,this._onRender=this.register(new m.EventEmitter),this.onRender=this._onRender.event,this._onRefreshRequest=this.register(new m.EventEmitter),this.onRefreshRequest=this._onRefreshRequest.event,this._renderDebouncer=new _.RenderDebouncer(((D,I)=>this._renderRows(D,I)),j),this.register(this._renderDebouncer),this.register(j.onDprChange((()=>this.handleDevicePixelRatioChange()))),this.register(T.onResize((()=>this._fullRefresh()))),this.register(T.buffers.onBufferActivate((()=>{var D;return(D=this._renderer.value)==null?void 0:D.clear()}))),this.register(C.onOptionChange((()=>this._handleOptionsChanged()))),this.register(this._charSizeService.onCharSizeChange((()=>this.handleCharSizeChanged()))),this.register(E.onDecorationRegistered((()=>this._fullRefresh()))),this.register(E.onDecorationRemoved((()=>this._fullRefresh()))),this.register(C.onMultipleOptionChange(["customGlyphs","drawBoldTextInBrightColors","letterSpacing","lineHeight","fontFamily","fontSize","fontWeight","fontWeightBold","minimumContrastRatio","rescaleOverlappingGlyphs"],(()=>{this.clear(),this.handleResize(T.cols,T.rows),this._fullRefresh()}))),this.register(C.onMultipleOptionChange(["cursorBlink","cursorStyle"],(()=>this.refreshRows(T.buffer.y,T.buffer.y,!0)))),this.register(M.onChangeColors((()=>this._fullRefresh()))),this._registerIntersectionObserver(j.window,y),this.register(j.onWindowChange((D=>this._registerIntersectionObserver(D,y))))}_registerIntersectionObserver(w,y){if("IntersectionObserver"in w){const C=new w.IntersectionObserver((N=>this._handleIntersectionChange(N[N.length-1])),{threshold:0});C.observe(y),this._observerDisposable.value=(0,x.toDisposable)((()=>C.disconnect()))}}_handleIntersectionChange(w){this._isPaused=w.isIntersecting===void 0?w.intersectionRatio===0:!w.isIntersecting,this._isPaused||this._charSizeService.hasValidSize||this._charSizeService.measure(),!this._isPaused&&this._needsFullRefresh&&(this._pausedResizeTask.flush(),this.refreshRows(0,this._rowCount-1),this._needsFullRefresh=!1)}refreshRows(w,y,C=!1){this._isPaused?this._needsFullRefresh=!0:(C||(this._isNextRenderRedrawOnly=!1),this._renderDebouncer.refresh(w,y,this._rowCount))}_renderRows(w,y){this._renderer.value&&(w=Math.min(w,this._rowCount-1),y=Math.min(y,this._rowCount-1),this._renderer.value.renderRows(w,y),this._needsSelectionRefresh&&(this._renderer.value.handleSelectionChanged(this._selectionState.start,this._selectionState.end,this._selectionState.columnSelectMode),this._needsSelectionRefresh=!1),this._isNextRenderRedrawOnly||this._onRenderedViewportChange.fire({start:w,end:y}),this._onRender.fire({start:w,end:y}),this._isNextRenderRedrawOnly=!0)}resize(w,y){this._rowCount=y,this._fireOnCanvasResize()}_handleOptionsChanged(){this._renderer.value&&(this.refreshRows(0,this._rowCount-1),this._fireOnCanvasResize())}_fireOnCanvasResize(){this._renderer.value&&(this._renderer.value.dimensions.css.canvas.width===this._canvasWidth&&this._renderer.value.dimensions.css.canvas.height===this._canvasHeight||this._onDimensionsChange.fire(this._renderer.value.dimensions))}hasRenderer(){return!!this._renderer.value}setRenderer(w){this._renderer.value=w,this._renderer.value&&(this._renderer.value.onRequestRedraw((y=>this.refreshRows(y.start,y.end,!0))),this._needsSelectionRefresh=!0,this._fullRefresh())}addRefreshCallback(w){return this._renderDebouncer.addRefreshCallback(w)}_fullRefresh(){this._isPaused?this._needsFullRefresh=!0:this.refreshRows(0,this._rowCount-1)}clearTextureAtlas(){var w,y;this._renderer.value&&((y=(w=this._renderer.value).clearTextureAtlas)==null||y.call(w),this._fullRefresh())}handleDevicePixelRatioChange(){this._charSizeService.measure(),this._renderer.value&&(this._renderer.value.handleDevicePixelRatioChange(),this.refreshRows(0,this._rowCount-1))}handleResize(w,y){this._renderer.value&&(this._isPaused?this._pausedResizeTask.set((()=>{var C;return(C=this._renderer.value)==null?void 0:C.handleResize(w,y)})):this._renderer.value.handleResize(w,y),this._fullRefresh())}handleCharSizeChanged(){var w;(w=this._renderer.value)==null||w.handleCharSizeChanged()}handleBlur(){var w;(w=this._renderer.value)==null||w.handleBlur()}handleFocus(){var w;(w=this._renderer.value)==null||w.handleFocus()}handleSelectionChanged(w,y,C){var N;this._selectionState.start=w,this._selectionState.end=y,this._selectionState.columnSelectMode=C,(N=this._renderer.value)==null||N.handleSelectionChanged(w,y,C)}handleCursorMove(){var w;(w=this._renderer.value)==null||w.handleCursorMove()}clear(){var w;(w=this._renderer.value)==null||w.clear()}};o.RenderService=b=u([h(2,v.IOptionsService),h(3,p.ICharSizeService),h(4,v.IDecorationService),h(5,v.IBufferService),h(6,p.ICoreBrowserService),h(7,p.IThemeService)],b)},9312:function(a,o,l){var u=this&&this.__decorate||function(j,M,D,I){var P,U=arguments.length,q=U<3?M:I===null?I=Object.getOwnPropertyDescriptor(M,D):I;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")q=Reflect.decorate(j,M,D,I);else for(var W=j.length-1;W>=0;W--)(P=j[W])&&(q=(U<3?P(q):U>3?P(M,D,q):P(M,D))||q);return U>3&&q&&Object.defineProperty(M,D,q),q},h=this&&this.__param||function(j,M){return function(D,I){M(D,I,j)}};Object.defineProperty(o,"__esModule",{value:!0}),o.SelectionService=void 0;const _=l(9806),p=l(9504),m=l(456),x=l(4725),k=l(8460),v=l(844),b=l(6114),w=l(4841),y=l(511),C=l(2585),N=" ",E=new RegExp(N,"g");let T=o.SelectionService=class extends v.Disposable{constructor(j,M,D,I,P,U,q,W,H){super(),this._element=j,this._screenElement=M,this._linkifier=D,this._bufferService=I,this._coreService=P,this._mouseService=U,this._optionsService=q,this._renderService=W,this._coreBrowserService=H,this._dragScrollAmount=0,this._enabled=!0,this._workCell=new y.CellData,this._mouseDownTimeStamp=0,this._oldHasSelection=!1,this._oldSelectionStart=void 0,this._oldSelectionEnd=void 0,this._onLinuxMouseSelection=this.register(new k.EventEmitter),this.onLinuxMouseSelection=this._onLinuxMouseSelection.event,this._onRedrawRequest=this.register(new k.EventEmitter),this.onRequestRedraw=this._onRedrawRequest.event,this._onSelectionChange=this.register(new k.EventEmitter),this.onSelectionChange=this._onSelectionChange.event,this._onRequestScrollLines=this.register(new k.EventEmitter),this.onRequestScrollLines=this._onRequestScrollLines.event,this._mouseMoveListener=Y=>this._handleMouseMove(Y),this._mouseUpListener=Y=>this._handleMouseUp(Y),this._coreService.onUserInput((()=>{this.hasSelection&&this.clearSelection()})),this._trimListener=this._bufferService.buffer.lines.onTrim((Y=>this._handleTrim(Y))),this.register(this._bufferService.buffers.onBufferActivate((Y=>this._handleBufferActivate(Y)))),this.enable(),this._model=new m.SelectionModel(this._bufferService),this._activeSelectionMode=0,this.register((0,v.toDisposable)((()=>{this._removeMouseDownListeners()})))}reset(){this.clearSelection()}disable(){this.clearSelection(),this._enabled=!1}enable(){this._enabled=!0}get selectionStart(){return this._model.finalSelectionStart}get selectionEnd(){return this._model.finalSelectionEnd}get hasSelection(){const j=this._model.finalSelectionStart,M=this._model.finalSelectionEnd;return!(!j||!M||j[0]===M[0]&&j[1]===M[1])}get selectionText(){const j=this._model.finalSelectionStart,M=this._model.finalSelectionEnd;if(!j||!M)return"";const D=this._bufferService.buffer,I=[];if(this._activeSelectionMode===3){if(j[0]===M[0])return"";const P=j[0]P.replace(E," "))).join(b.isWindows?`\r +WARNING: This link could potentially be dangerous`)){const b=window.open();if(b){try{b.opener=null}catch{}b.location.href=v}else console.warn("Opening link blocked as opener could not be cleared")}}o.OscLinkProvider=m=u([h(0,p.IBufferService),h(1,p.IOptionsService),h(2,p.IOscLinkService)],m)},6193:(a,o)=>{Object.defineProperty(o,"__esModule",{value:!0}),o.RenderDebouncer=void 0,o.RenderDebouncer=class{constructor(l,u){this._renderCallback=l,this._coreBrowserService=u,this._refreshCallbacks=[]}dispose(){this._animationFrame&&(this._coreBrowserService.window.cancelAnimationFrame(this._animationFrame),this._animationFrame=void 0)}addRefreshCallback(l){return this._refreshCallbacks.push(l),this._animationFrame||(this._animationFrame=this._coreBrowserService.window.requestAnimationFrame((()=>this._innerRefresh()))),this._animationFrame}refresh(l,u,h){this._rowCount=h,l=l!==void 0?l:0,u=u!==void 0?u:this._rowCount-1,this._rowStart=this._rowStart!==void 0?Math.min(this._rowStart,l):l,this._rowEnd=this._rowEnd!==void 0?Math.max(this._rowEnd,u):u,this._animationFrame||(this._animationFrame=this._coreBrowserService.window.requestAnimationFrame((()=>this._innerRefresh())))}_innerRefresh(){if(this._animationFrame=void 0,this._rowStart===void 0||this._rowEnd===void 0||this._rowCount===void 0)return void this._runRefreshCallbacks();const l=Math.max(this._rowStart,0),u=Math.min(this._rowEnd,this._rowCount-1);this._rowStart=void 0,this._rowEnd=void 0,this._renderCallback(l,u),this._runRefreshCallbacks()}_runRefreshCallbacks(){for(const l of this._refreshCallbacks)l(0);this._refreshCallbacks=[]}}},3236:(a,o,l)=>{Object.defineProperty(o,"__esModule",{value:!0}),o.Terminal=void 0;const u=l(3614),h=l(3656),_=l(3551),p=l(9042),m=l(3730),x=l(1680),k=l(3107),v=l(5744),b=l(2950),w=l(1296),y=l(428),C=l(4269),E=l(5114),N=l(8934),A=l(3230),j=l(9312),M=l(4725),L=l(6731),I=l(8055),B=l(8969),q=l(8460),U=l(844),W=l(6114),H=l(8437),Y=l(2584),te=l(7399),$=l(5941),D=l(9074),F=l(2585),G=l(5435),V=l(4567),ee=l(779);class ce extends B.CoreTerminal{get onFocus(){return this._onFocus.event}get onBlur(){return this._onBlur.event}get onA11yChar(){return this._onA11yCharEmitter.event}get onA11yTab(){return this._onA11yTabEmitter.event}get onWillOpen(){return this._onWillOpen.event}constructor(re={}){super(re),this.browser=W,this._keyDownHandled=!1,this._keyDownSeen=!1,this._keyPressHandled=!1,this._unprocessedDeadKey=!1,this._accessibilityManager=this.register(new U.MutableDisposable),this._onCursorMove=this.register(new q.EventEmitter),this.onCursorMove=this._onCursorMove.event,this._onKey=this.register(new q.EventEmitter),this.onKey=this._onKey.event,this._onRender=this.register(new q.EventEmitter),this.onRender=this._onRender.event,this._onSelectionChange=this.register(new q.EventEmitter),this.onSelectionChange=this._onSelectionChange.event,this._onTitleChange=this.register(new q.EventEmitter),this.onTitleChange=this._onTitleChange.event,this._onBell=this.register(new q.EventEmitter),this.onBell=this._onBell.event,this._onFocus=this.register(new q.EventEmitter),this._onBlur=this.register(new q.EventEmitter),this._onA11yCharEmitter=this.register(new q.EventEmitter),this._onA11yTabEmitter=this.register(new q.EventEmitter),this._onWillOpen=this.register(new q.EventEmitter),this._setup(),this._decorationService=this._instantiationService.createInstance(D.DecorationService),this._instantiationService.setService(F.IDecorationService,this._decorationService),this._linkProviderService=this._instantiationService.createInstance(ee.LinkProviderService),this._instantiationService.setService(M.ILinkProviderService,this._linkProviderService),this._linkProviderService.registerLinkProvider(this._instantiationService.createInstance(m.OscLinkProvider)),this.register(this._inputHandler.onRequestBell((()=>this._onBell.fire()))),this.register(this._inputHandler.onRequestRefreshRows(((X,oe)=>this.refresh(X,oe)))),this.register(this._inputHandler.onRequestSendFocus((()=>this._reportFocus()))),this.register(this._inputHandler.onRequestReset((()=>this.reset()))),this.register(this._inputHandler.onRequestWindowsOptionsReport((X=>this._reportWindowsOptions(X)))),this.register(this._inputHandler.onColor((X=>this._handleColorEvent(X)))),this.register((0,q.forwardEvent)(this._inputHandler.onCursorMove,this._onCursorMove)),this.register((0,q.forwardEvent)(this._inputHandler.onTitleChange,this._onTitleChange)),this.register((0,q.forwardEvent)(this._inputHandler.onA11yChar,this._onA11yCharEmitter)),this.register((0,q.forwardEvent)(this._inputHandler.onA11yTab,this._onA11yTabEmitter)),this.register(this._bufferService.onResize((X=>this._afterResize(X.cols,X.rows)))),this.register((0,U.toDisposable)((()=>{var X,oe;this._customKeyEventHandler=void 0,(oe=(X=this.element)==null?void 0:X.parentNode)==null||oe.removeChild(this.element)})))}_handleColorEvent(re){if(this._themeService)for(const X of re){let oe,le="";switch(X.index){case 256:oe="foreground",le="10";break;case 257:oe="background",le="11";break;case 258:oe="cursor",le="12";break;default:oe="ansi",le="4;"+X.index}switch(X.type){case 0:const _e=I.color.toColorRGB(oe==="ansi"?this._themeService.colors.ansi[X.index]:this._themeService.colors[oe]);this.coreService.triggerDataEvent(`${Y.C0.ESC}]${le};${(0,$.toRgbString)(_e)}${Y.C1_ESCAPED.ST}`);break;case 1:if(oe==="ansi")this._themeService.modifyColors((pe=>pe.ansi[X.index]=I.channels.toColor(...X.color)));else{const pe=oe;this._themeService.modifyColors((Ee=>Ee[pe]=I.channels.toColor(...X.color)))}break;case 2:this._themeService.restoreColor(X.index)}}}_setup(){super._setup(),this._customKeyEventHandler=void 0}get buffer(){return this.buffers.active}focus(){this.textarea&&this.textarea.focus({preventScroll:!0})}_handleScreenReaderModeOptionChange(re){re?!this._accessibilityManager.value&&this._renderService&&(this._accessibilityManager.value=this._instantiationService.createInstance(V.AccessibilityManager,this)):this._accessibilityManager.clear()}_handleTextAreaFocus(re){this.coreService.decPrivateModes.sendFocus&&this.coreService.triggerDataEvent(Y.C0.ESC+"[I"),this.element.classList.add("focus"),this._showCursor(),this._onFocus.fire()}blur(){var re;return(re=this.textarea)==null?void 0:re.blur()}_handleTextAreaBlur(){this.textarea.value="",this.refresh(this.buffer.y,this.buffer.y),this.coreService.decPrivateModes.sendFocus&&this.coreService.triggerDataEvent(Y.C0.ESC+"[O"),this.element.classList.remove("focus"),this._onBlur.fire()}_syncTextArea(){if(!this.textarea||!this.buffer.isCursorInViewport||this._compositionHelper.isComposing||!this._renderService)return;const re=this.buffer.ybase+this.buffer.y,X=this.buffer.lines.get(re);if(!X)return;const oe=Math.min(this.buffer.x,this.cols-1),le=this._renderService.dimensions.css.cell.height,_e=X.getWidth(oe),pe=this._renderService.dimensions.css.cell.width*_e,Ee=this.buffer.y*this._renderService.dimensions.css.cell.height,Ie=oe*this._renderService.dimensions.css.cell.width;this.textarea.style.left=Ie+"px",this.textarea.style.top=Ee+"px",this.textarea.style.width=pe+"px",this.textarea.style.height=le+"px",this.textarea.style.lineHeight=le+"px",this.textarea.style.zIndex="-5"}_initGlobal(){this._bindKeys(),this.register((0,h.addDisposableDomListener)(this.element,"copy",(X=>{this.hasSelection()&&(0,u.copyHandler)(X,this._selectionService)})));const re=X=>(0,u.handlePasteEvent)(X,this.textarea,this.coreService,this.optionsService);this.register((0,h.addDisposableDomListener)(this.textarea,"paste",re)),this.register((0,h.addDisposableDomListener)(this.element,"paste",re)),W.isFirefox?this.register((0,h.addDisposableDomListener)(this.element,"mousedown",(X=>{X.button===2&&(0,u.rightClickHandler)(X,this.textarea,this.screenElement,this._selectionService,this.options.rightClickSelectsWord)}))):this.register((0,h.addDisposableDomListener)(this.element,"contextmenu",(X=>{(0,u.rightClickHandler)(X,this.textarea,this.screenElement,this._selectionService,this.options.rightClickSelectsWord)}))),W.isLinux&&this.register((0,h.addDisposableDomListener)(this.element,"auxclick",(X=>{X.button===1&&(0,u.moveTextAreaUnderMouseCursor)(X,this.textarea,this.screenElement)})))}_bindKeys(){this.register((0,h.addDisposableDomListener)(this.textarea,"keyup",(re=>this._keyUp(re)),!0)),this.register((0,h.addDisposableDomListener)(this.textarea,"keydown",(re=>this._keyDown(re)),!0)),this.register((0,h.addDisposableDomListener)(this.textarea,"keypress",(re=>this._keyPress(re)),!0)),this.register((0,h.addDisposableDomListener)(this.textarea,"compositionstart",(()=>this._compositionHelper.compositionstart()))),this.register((0,h.addDisposableDomListener)(this.textarea,"compositionupdate",(re=>this._compositionHelper.compositionupdate(re)))),this.register((0,h.addDisposableDomListener)(this.textarea,"compositionend",(()=>this._compositionHelper.compositionend()))),this.register((0,h.addDisposableDomListener)(this.textarea,"input",(re=>this._inputEvent(re)),!0)),this.register(this.onRender((()=>this._compositionHelper.updateCompositionElements())))}open(re){var oe;if(!re)throw new Error("Terminal requires a parent element.");if(re.isConnected||this._logService.debug("Terminal.open was called on an element that was not attached to the DOM"),((oe=this.element)==null?void 0:oe.ownerDocument.defaultView)&&this._coreBrowserService)return void(this.element.ownerDocument.defaultView!==this._coreBrowserService.window&&(this._coreBrowserService.window=this.element.ownerDocument.defaultView));this._document=re.ownerDocument,this.options.documentOverride&&this.options.documentOverride instanceof Document&&(this._document=this.optionsService.rawOptions.documentOverride),this.element=this._document.createElement("div"),this.element.dir="ltr",this.element.classList.add("terminal"),this.element.classList.add("xterm"),re.appendChild(this.element);const X=this._document.createDocumentFragment();this._viewportElement=this._document.createElement("div"),this._viewportElement.classList.add("xterm-viewport"),X.appendChild(this._viewportElement),this._viewportScrollArea=this._document.createElement("div"),this._viewportScrollArea.classList.add("xterm-scroll-area"),this._viewportElement.appendChild(this._viewportScrollArea),this.screenElement=this._document.createElement("div"),this.screenElement.classList.add("xterm-screen"),this.register((0,h.addDisposableDomListener)(this.screenElement,"mousemove",(le=>this.updateCursorStyle(le)))),this._helperContainer=this._document.createElement("div"),this._helperContainer.classList.add("xterm-helpers"),this.screenElement.appendChild(this._helperContainer),X.appendChild(this.screenElement),this.textarea=this._document.createElement("textarea"),this.textarea.classList.add("xterm-helper-textarea"),this.textarea.setAttribute("aria-label",p.promptLabel),W.isChromeOS||this.textarea.setAttribute("aria-multiline","false"),this.textarea.setAttribute("autocorrect","off"),this.textarea.setAttribute("autocapitalize","off"),this.textarea.setAttribute("spellcheck","false"),this.textarea.tabIndex=0,this._coreBrowserService=this.register(this._instantiationService.createInstance(E.CoreBrowserService,this.textarea,re.ownerDocument.defaultView??window,this._document??typeof window<"u"?window.document:null)),this._instantiationService.setService(M.ICoreBrowserService,this._coreBrowserService),this.register((0,h.addDisposableDomListener)(this.textarea,"focus",(le=>this._handleTextAreaFocus(le)))),this.register((0,h.addDisposableDomListener)(this.textarea,"blur",(()=>this._handleTextAreaBlur()))),this._helperContainer.appendChild(this.textarea),this._charSizeService=this._instantiationService.createInstance(y.CharSizeService,this._document,this._helperContainer),this._instantiationService.setService(M.ICharSizeService,this._charSizeService),this._themeService=this._instantiationService.createInstance(L.ThemeService),this._instantiationService.setService(M.IThemeService,this._themeService),this._characterJoinerService=this._instantiationService.createInstance(C.CharacterJoinerService),this._instantiationService.setService(M.ICharacterJoinerService,this._characterJoinerService),this._renderService=this.register(this._instantiationService.createInstance(A.RenderService,this.rows,this.screenElement)),this._instantiationService.setService(M.IRenderService,this._renderService),this.register(this._renderService.onRenderedViewportChange((le=>this._onRender.fire(le)))),this.onResize((le=>this._renderService.resize(le.cols,le.rows))),this._compositionView=this._document.createElement("div"),this._compositionView.classList.add("composition-view"),this._compositionHelper=this._instantiationService.createInstance(b.CompositionHelper,this.textarea,this._compositionView),this._helperContainer.appendChild(this._compositionView),this._mouseService=this._instantiationService.createInstance(N.MouseService),this._instantiationService.setService(M.IMouseService,this._mouseService),this.linkifier=this.register(this._instantiationService.createInstance(_.Linkifier,this.screenElement)),this.element.appendChild(X);try{this._onWillOpen.fire(this.element)}catch{}this._renderService.hasRenderer()||this._renderService.setRenderer(this._createRenderer()),this.viewport=this._instantiationService.createInstance(x.Viewport,this._viewportElement,this._viewportScrollArea),this.viewport.onRequestScrollLines((le=>this.scrollLines(le.amount,le.suppressScrollEvent,1))),this.register(this._inputHandler.onRequestSyncScrollBar((()=>this.viewport.syncScrollArea()))),this.register(this.viewport),this.register(this.onCursorMove((()=>{this._renderService.handleCursorMove(),this._syncTextArea()}))),this.register(this.onResize((()=>this._renderService.handleResize(this.cols,this.rows)))),this.register(this.onBlur((()=>this._renderService.handleBlur()))),this.register(this.onFocus((()=>this._renderService.handleFocus()))),this.register(this._renderService.onDimensionsChange((()=>this.viewport.syncScrollArea()))),this._selectionService=this.register(this._instantiationService.createInstance(j.SelectionService,this.element,this.screenElement,this.linkifier)),this._instantiationService.setService(M.ISelectionService,this._selectionService),this.register(this._selectionService.onRequestScrollLines((le=>this.scrollLines(le.amount,le.suppressScrollEvent)))),this.register(this._selectionService.onSelectionChange((()=>this._onSelectionChange.fire()))),this.register(this._selectionService.onRequestRedraw((le=>this._renderService.handleSelectionChanged(le.start,le.end,le.columnSelectMode)))),this.register(this._selectionService.onLinuxMouseSelection((le=>{this.textarea.value=le,this.textarea.focus(),this.textarea.select()}))),this.register(this._onScroll.event((le=>{this.viewport.syncScrollArea(),this._selectionService.refresh()}))),this.register((0,h.addDisposableDomListener)(this._viewportElement,"scroll",(()=>this._selectionService.refresh()))),this.register(this._instantiationService.createInstance(k.BufferDecorationRenderer,this.screenElement)),this.register((0,h.addDisposableDomListener)(this.element,"mousedown",(le=>this._selectionService.handleMouseDown(le)))),this.coreMouseService.areMouseEventsActive?(this._selectionService.disable(),this.element.classList.add("enable-mouse-events")):this._selectionService.enable(),this.options.screenReaderMode&&(this._accessibilityManager.value=this._instantiationService.createInstance(V.AccessibilityManager,this)),this.register(this.optionsService.onSpecificOptionChange("screenReaderMode",(le=>this._handleScreenReaderModeOptionChange(le)))),this.options.overviewRulerWidth&&(this._overviewRulerRenderer=this.register(this._instantiationService.createInstance(v.OverviewRulerRenderer,this._viewportElement,this.screenElement))),this.optionsService.onSpecificOptionChange("overviewRulerWidth",(le=>{!this._overviewRulerRenderer&&le&&this._viewportElement&&this.screenElement&&(this._overviewRulerRenderer=this.register(this._instantiationService.createInstance(v.OverviewRulerRenderer,this._viewportElement,this.screenElement)))})),this._charSizeService.measure(),this.refresh(0,this.rows-1),this._initGlobal(),this.bindMouse()}_createRenderer(){return this._instantiationService.createInstance(w.DomRenderer,this,this._document,this.element,this.screenElement,this._viewportElement,this._helperContainer,this.linkifier)}bindMouse(){const re=this,X=this.element;function oe(pe){const Ee=re._mouseService.getMouseReportCoords(pe,re.screenElement);if(!Ee)return!1;let Ie,ze;switch(pe.overrideType||pe.type){case"mousemove":ze=32,pe.buttons===void 0?(Ie=3,pe.button!==void 0&&(Ie=pe.button<3?pe.button:3)):Ie=1&pe.buttons?0:4&pe.buttons?1:2&pe.buttons?2:3;break;case"mouseup":ze=0,Ie=pe.button<3?pe.button:3;break;case"mousedown":ze=1,Ie=pe.button<3?pe.button:3;break;case"wheel":if(re._customWheelEventHandler&&re._customWheelEventHandler(pe)===!1||re.viewport.getLinesScrolled(pe)===0)return!1;ze=pe.deltaY<0?0:1,Ie=4;break;default:return!1}return!(ze===void 0||Ie===void 0||Ie>4)&&re.coreMouseService.triggerMouseEvent({col:Ee.col,row:Ee.row,x:Ee.x,y:Ee.y,button:Ie,action:ze,ctrl:pe.ctrlKey,alt:pe.altKey,shift:pe.shiftKey})}const le={mouseup:null,wheel:null,mousedrag:null,mousemove:null},_e={mouseup:pe=>(oe(pe),pe.buttons||(this._document.removeEventListener("mouseup",le.mouseup),le.mousedrag&&this._document.removeEventListener("mousemove",le.mousedrag)),this.cancel(pe)),wheel:pe=>(oe(pe),this.cancel(pe,!0)),mousedrag:pe=>{pe.buttons&&oe(pe)},mousemove:pe=>{pe.buttons||oe(pe)}};this.register(this.coreMouseService.onProtocolChange((pe=>{pe?(this.optionsService.rawOptions.logLevel==="debug"&&this._logService.debug("Binding to mouse events:",this.coreMouseService.explainEvents(pe)),this.element.classList.add("enable-mouse-events"),this._selectionService.disable()):(this._logService.debug("Unbinding from mouse events."),this.element.classList.remove("enable-mouse-events"),this._selectionService.enable()),8&pe?le.mousemove||(X.addEventListener("mousemove",_e.mousemove),le.mousemove=_e.mousemove):(X.removeEventListener("mousemove",le.mousemove),le.mousemove=null),16&pe?le.wheel||(X.addEventListener("wheel",_e.wheel,{passive:!1}),le.wheel=_e.wheel):(X.removeEventListener("wheel",le.wheel),le.wheel=null),2&pe?le.mouseup||(le.mouseup=_e.mouseup):(this._document.removeEventListener("mouseup",le.mouseup),le.mouseup=null),4&pe?le.mousedrag||(le.mousedrag=_e.mousedrag):(this._document.removeEventListener("mousemove",le.mousedrag),le.mousedrag=null)}))),this.coreMouseService.activeProtocol=this.coreMouseService.activeProtocol,this.register((0,h.addDisposableDomListener)(X,"mousedown",(pe=>{if(pe.preventDefault(),this.focus(),this.coreMouseService.areMouseEventsActive&&!this._selectionService.shouldForceSelection(pe))return oe(pe),le.mouseup&&this._document.addEventListener("mouseup",le.mouseup),le.mousedrag&&this._document.addEventListener("mousemove",le.mousedrag),this.cancel(pe)}))),this.register((0,h.addDisposableDomListener)(X,"wheel",(pe=>{if(!le.wheel){if(this._customWheelEventHandler&&this._customWheelEventHandler(pe)===!1)return!1;if(!this.buffer.hasScrollback){const Ee=this.viewport.getLinesScrolled(pe);if(Ee===0)return;const Ie=Y.C0.ESC+(this.coreService.decPrivateModes.applicationCursorKeys?"O":"[")+(pe.deltaY<0?"A":"B");let ze="";for(let He=0;He{if(!this.coreMouseService.areMouseEventsActive)return this.viewport.handleTouchStart(pe),this.cancel(pe)}),{passive:!0})),this.register((0,h.addDisposableDomListener)(X,"touchmove",(pe=>{if(!this.coreMouseService.areMouseEventsActive)return this.viewport.handleTouchMove(pe)?void 0:this.cancel(pe)}),{passive:!1}))}refresh(re,X){var oe;(oe=this._renderService)==null||oe.refreshRows(re,X)}updateCursorStyle(re){var X;(X=this._selectionService)!=null&&X.shouldColumnSelect(re)?this.element.classList.add("column-select"):this.element.classList.remove("column-select")}_showCursor(){this.coreService.isCursorInitialized||(this.coreService.isCursorInitialized=!0,this.refresh(this.buffer.y,this.buffer.y))}scrollLines(re,X,oe=0){var le;oe===1?(super.scrollLines(re,X,oe),this.refresh(0,this.rows-1)):(le=this.viewport)==null||le.scrollLines(re)}paste(re){(0,u.paste)(re,this.textarea,this.coreService,this.optionsService)}attachCustomKeyEventHandler(re){this._customKeyEventHandler=re}attachCustomWheelEventHandler(re){this._customWheelEventHandler=re}registerLinkProvider(re){return this._linkProviderService.registerLinkProvider(re)}registerCharacterJoiner(re){if(!this._characterJoinerService)throw new Error("Terminal must be opened first");const X=this._characterJoinerService.register(re);return this.refresh(0,this.rows-1),X}deregisterCharacterJoiner(re){if(!this._characterJoinerService)throw new Error("Terminal must be opened first");this._characterJoinerService.deregister(re)&&this.refresh(0,this.rows-1)}get markers(){return this.buffer.markers}registerMarker(re){return this.buffer.addMarker(this.buffer.ybase+this.buffer.y+re)}registerDecoration(re){return this._decorationService.registerDecoration(re)}hasSelection(){return!!this._selectionService&&this._selectionService.hasSelection}select(re,X,oe){this._selectionService.setSelection(re,X,oe)}getSelection(){return this._selectionService?this._selectionService.selectionText:""}getSelectionPosition(){if(this._selectionService&&this._selectionService.hasSelection)return{start:{x:this._selectionService.selectionStart[0],y:this._selectionService.selectionStart[1]},end:{x:this._selectionService.selectionEnd[0],y:this._selectionService.selectionEnd[1]}}}clearSelection(){var re;(re=this._selectionService)==null||re.clearSelection()}selectAll(){var re;(re=this._selectionService)==null||re.selectAll()}selectLines(re,X){var oe;(oe=this._selectionService)==null||oe.selectLines(re,X)}_keyDown(re){if(this._keyDownHandled=!1,this._keyDownSeen=!0,this._customKeyEventHandler&&this._customKeyEventHandler(re)===!1)return!1;const X=this.browser.isMac&&this.options.macOptionIsMeta&&re.altKey;if(!X&&!this._compositionHelper.keydown(re))return this.options.scrollOnUserInput&&this.buffer.ybase!==this.buffer.ydisp&&this.scrollToBottom(),!1;X||re.key!=="Dead"&&re.key!=="AltGraph"||(this._unprocessedDeadKey=!0);const oe=(0,te.evaluateKeyboardEvent)(re,this.coreService.decPrivateModes.applicationCursorKeys,this.browser.isMac,this.options.macOptionIsMeta);if(this.updateCursorStyle(re),oe.type===3||oe.type===2){const le=this.rows-1;return this.scrollLines(oe.type===2?-le:le),this.cancel(re,!0)}return oe.type===1&&this.selectAll(),!!this._isThirdLevelShift(this.browser,re)||(oe.cancel&&this.cancel(re,!0),!oe.key||!!(re.key&&!re.ctrlKey&&!re.altKey&&!re.metaKey&&re.key.length===1&&re.key.charCodeAt(0)>=65&&re.key.charCodeAt(0)<=90)||(this._unprocessedDeadKey?(this._unprocessedDeadKey=!1,!0):(oe.key!==Y.C0.ETX&&oe.key!==Y.C0.CR||(this.textarea.value=""),this._onKey.fire({key:oe.key,domEvent:re}),this._showCursor(),this.coreService.triggerDataEvent(oe.key,!0),!this.optionsService.rawOptions.screenReaderMode||re.altKey||re.ctrlKey?this.cancel(re,!0):void(this._keyDownHandled=!0))))}_isThirdLevelShift(re,X){const oe=re.isMac&&!this.options.macOptionIsMeta&&X.altKey&&!X.ctrlKey&&!X.metaKey||re.isWindows&&X.altKey&&X.ctrlKey&&!X.metaKey||re.isWindows&&X.getModifierState("AltGraph");return X.type==="keypress"?oe:oe&&(!X.keyCode||X.keyCode>47)}_keyUp(re){this._keyDownSeen=!1,this._customKeyEventHandler&&this._customKeyEventHandler(re)===!1||((function(X){return X.keyCode===16||X.keyCode===17||X.keyCode===18})(re)||this.focus(),this.updateCursorStyle(re),this._keyPressHandled=!1)}_keyPress(re){let X;if(this._keyPressHandled=!1,this._keyDownHandled||this._customKeyEventHandler&&this._customKeyEventHandler(re)===!1)return!1;if(this.cancel(re),re.charCode)X=re.charCode;else if(re.which===null||re.which===void 0)X=re.keyCode;else{if(re.which===0||re.charCode===0)return!1;X=re.which}return!(!X||(re.altKey||re.ctrlKey||re.metaKey)&&!this._isThirdLevelShift(this.browser,re)||(X=String.fromCharCode(X),this._onKey.fire({key:X,domEvent:re}),this._showCursor(),this.coreService.triggerDataEvent(X,!0),this._keyPressHandled=!0,this._unprocessedDeadKey=!1,0))}_inputEvent(re){if(re.data&&re.inputType==="insertText"&&(!re.composed||!this._keyDownSeen)&&!this.optionsService.rawOptions.screenReaderMode){if(this._keyPressHandled)return!1;this._unprocessedDeadKey=!1;const X=re.data;return this.coreService.triggerDataEvent(X,!0),this.cancel(re),!0}return!1}resize(re,X){re!==this.cols||X!==this.rows?super.resize(re,X):this._charSizeService&&!this._charSizeService.hasValidSize&&this._charSizeService.measure()}_afterResize(re,X){var oe,le;(oe=this._charSizeService)==null||oe.measure(),(le=this.viewport)==null||le.syncScrollArea(!0)}clear(){var re;if(this.buffer.ybase!==0||this.buffer.y!==0){this.buffer.clearAllMarkers(),this.buffer.lines.set(0,this.buffer.lines.get(this.buffer.ybase+this.buffer.y)),this.buffer.lines.length=1,this.buffer.ydisp=0,this.buffer.ybase=0,this.buffer.y=0;for(let X=1;X{Object.defineProperty(o,"__esModule",{value:!0}),o.TimeBasedDebouncer=void 0,o.TimeBasedDebouncer=class{constructor(l,u=1e3){this._renderCallback=l,this._debounceThresholdMS=u,this._lastRefreshMs=0,this._additionalRefreshRequested=!1}dispose(){this._refreshTimeoutID&&clearTimeout(this._refreshTimeoutID)}refresh(l,u,h){this._rowCount=h,l=l!==void 0?l:0,u=u!==void 0?u:this._rowCount-1,this._rowStart=this._rowStart!==void 0?Math.min(this._rowStart,l):l,this._rowEnd=this._rowEnd!==void 0?Math.max(this._rowEnd,u):u;const _=Date.now();if(_-this._lastRefreshMs>=this._debounceThresholdMS)this._lastRefreshMs=_,this._innerRefresh();else if(!this._additionalRefreshRequested){const p=_-this._lastRefreshMs,m=this._debounceThresholdMS-p;this._additionalRefreshRequested=!0,this._refreshTimeoutID=window.setTimeout((()=>{this._lastRefreshMs=Date.now(),this._innerRefresh(),this._additionalRefreshRequested=!1,this._refreshTimeoutID=void 0}),m)}}_innerRefresh(){if(this._rowStart===void 0||this._rowEnd===void 0||this._rowCount===void 0)return;const l=Math.max(this._rowStart,0),u=Math.min(this._rowEnd,this._rowCount-1);this._rowStart=void 0,this._rowEnd=void 0,this._renderCallback(l,u)}}},1680:function(a,o,l){var u=this&&this.__decorate||function(b,w,y,C){var E,N=arguments.length,A=N<3?w:C===null?C=Object.getOwnPropertyDescriptor(w,y):C;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")A=Reflect.decorate(b,w,y,C);else for(var j=b.length-1;j>=0;j--)(E=b[j])&&(A=(N<3?E(A):N>3?E(w,y,A):E(w,y))||A);return N>3&&A&&Object.defineProperty(w,y,A),A},h=this&&this.__param||function(b,w){return function(y,C){w(y,C,b)}};Object.defineProperty(o,"__esModule",{value:!0}),o.Viewport=void 0;const _=l(3656),p=l(4725),m=l(8460),x=l(844),k=l(2585);let v=o.Viewport=class extends x.Disposable{constructor(b,w,y,C,E,N,A,j){super(),this._viewportElement=b,this._scrollArea=w,this._bufferService=y,this._optionsService=C,this._charSizeService=E,this._renderService=N,this._coreBrowserService=A,this.scrollBarWidth=0,this._currentRowHeight=0,this._currentDeviceCellHeight=0,this._lastRecordedBufferLength=0,this._lastRecordedViewportHeight=0,this._lastRecordedBufferHeight=0,this._lastTouchY=0,this._lastScrollTop=0,this._wheelPartialScroll=0,this._refreshAnimationFrame=null,this._ignoreNextScrollEvent=!1,this._smoothScrollState={startTime:0,origin:-1,target:-1},this._onRequestScrollLines=this.register(new m.EventEmitter),this.onRequestScrollLines=this._onRequestScrollLines.event,this.scrollBarWidth=this._viewportElement.offsetWidth-this._scrollArea.offsetWidth||15,this.register((0,_.addDisposableDomListener)(this._viewportElement,"scroll",this._handleScroll.bind(this))),this._activeBuffer=this._bufferService.buffer,this.register(this._bufferService.buffers.onBufferActivate((M=>this._activeBuffer=M.activeBuffer))),this._renderDimensions=this._renderService.dimensions,this.register(this._renderService.onDimensionsChange((M=>this._renderDimensions=M))),this._handleThemeChange(j.colors),this.register(j.onChangeColors((M=>this._handleThemeChange(M)))),this.register(this._optionsService.onSpecificOptionChange("scrollback",(()=>this.syncScrollArea()))),setTimeout((()=>this.syncScrollArea()))}_handleThemeChange(b){this._viewportElement.style.backgroundColor=b.background.css}reset(){this._currentRowHeight=0,this._currentDeviceCellHeight=0,this._lastRecordedBufferLength=0,this._lastRecordedViewportHeight=0,this._lastRecordedBufferHeight=0,this._lastTouchY=0,this._lastScrollTop=0,this._coreBrowserService.window.requestAnimationFrame((()=>this.syncScrollArea()))}_refresh(b){if(b)return this._innerRefresh(),void(this._refreshAnimationFrame!==null&&this._coreBrowserService.window.cancelAnimationFrame(this._refreshAnimationFrame));this._refreshAnimationFrame===null&&(this._refreshAnimationFrame=this._coreBrowserService.window.requestAnimationFrame((()=>this._innerRefresh())))}_innerRefresh(){if(this._charSizeService.height>0){this._currentRowHeight=this._renderDimensions.device.cell.height/this._coreBrowserService.dpr,this._currentDeviceCellHeight=this._renderDimensions.device.cell.height,this._lastRecordedViewportHeight=this._viewportElement.offsetHeight;const w=Math.round(this._currentRowHeight*this._lastRecordedBufferLength)+(this._lastRecordedViewportHeight-this._renderDimensions.css.canvas.height);this._lastRecordedBufferHeight!==w&&(this._lastRecordedBufferHeight=w,this._scrollArea.style.height=this._lastRecordedBufferHeight+"px")}const b=this._bufferService.buffer.ydisp*this._currentRowHeight;this._viewportElement.scrollTop!==b&&(this._ignoreNextScrollEvent=!0,this._viewportElement.scrollTop=b),this._refreshAnimationFrame=null}syncScrollArea(b=!1){if(this._lastRecordedBufferLength!==this._bufferService.buffer.lines.length)return this._lastRecordedBufferLength=this._bufferService.buffer.lines.length,void this._refresh(b);this._lastRecordedViewportHeight===this._renderService.dimensions.css.canvas.height&&this._lastScrollTop===this._activeBuffer.ydisp*this._currentRowHeight&&this._renderDimensions.device.cell.height===this._currentDeviceCellHeight||this._refresh(b)}_handleScroll(b){if(this._lastScrollTop=this._viewportElement.scrollTop,!this._viewportElement.offsetParent)return;if(this._ignoreNextScrollEvent)return this._ignoreNextScrollEvent=!1,void this._onRequestScrollLines.fire({amount:0,suppressScrollEvent:!0});const w=Math.round(this._lastScrollTop/this._currentRowHeight)-this._bufferService.buffer.ydisp;this._onRequestScrollLines.fire({amount:w,suppressScrollEvent:!0})}_smoothScroll(){if(this._isDisposed||this._smoothScrollState.origin===-1||this._smoothScrollState.target===-1)return;const b=this._smoothScrollPercent();this._viewportElement.scrollTop=this._smoothScrollState.origin+Math.round(b*(this._smoothScrollState.target-this._smoothScrollState.origin)),b<1?this._coreBrowserService.window.requestAnimationFrame((()=>this._smoothScroll())):this._clearSmoothScrollState()}_smoothScrollPercent(){return this._optionsService.rawOptions.smoothScrollDuration&&this._smoothScrollState.startTime?Math.max(Math.min((Date.now()-this._smoothScrollState.startTime)/this._optionsService.rawOptions.smoothScrollDuration,1),0):1}_clearSmoothScrollState(){this._smoothScrollState.startTime=0,this._smoothScrollState.origin=-1,this._smoothScrollState.target=-1}_bubbleScroll(b,w){const y=this._viewportElement.scrollTop+this._lastRecordedViewportHeight;return!(w<0&&this._viewportElement.scrollTop!==0||w>0&&y0&&(y=B),C=""}}return{bufferElements:E,cursorElement:y}}getLinesScrolled(b){if(b.deltaY===0||b.shiftKey)return 0;let w=this._applyScrollModifier(b.deltaY,b);return b.deltaMode===WheelEvent.DOM_DELTA_PIXEL?(w/=this._currentRowHeight+0,this._wheelPartialScroll+=w,w=Math.floor(Math.abs(this._wheelPartialScroll))*(this._wheelPartialScroll>0?1:-1),this._wheelPartialScroll%=1):b.deltaMode===WheelEvent.DOM_DELTA_PAGE&&(w*=this._bufferService.rows),w}_applyScrollModifier(b,w){const y=this._optionsService.rawOptions.fastScrollModifier;return y==="alt"&&w.altKey||y==="ctrl"&&w.ctrlKey||y==="shift"&&w.shiftKey?b*this._optionsService.rawOptions.fastScrollSensitivity*this._optionsService.rawOptions.scrollSensitivity:b*this._optionsService.rawOptions.scrollSensitivity}handleTouchStart(b){this._lastTouchY=b.touches[0].pageY}handleTouchMove(b){const w=this._lastTouchY-b.touches[0].pageY;return this._lastTouchY=b.touches[0].pageY,w!==0&&(this._viewportElement.scrollTop+=w,this._bubbleScroll(b,w))}};o.Viewport=v=u([h(2,k.IBufferService),h(3,k.IOptionsService),h(4,p.ICharSizeService),h(5,p.IRenderService),h(6,p.ICoreBrowserService),h(7,p.IThemeService)],v)},3107:function(a,o,l){var u=this&&this.__decorate||function(k,v,b,w){var y,C=arguments.length,E=C<3?v:w===null?w=Object.getOwnPropertyDescriptor(v,b):w;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")E=Reflect.decorate(k,v,b,w);else for(var N=k.length-1;N>=0;N--)(y=k[N])&&(E=(C<3?y(E):C>3?y(v,b,E):y(v,b))||E);return C>3&&E&&Object.defineProperty(v,b,E),E},h=this&&this.__param||function(k,v){return function(b,w){v(b,w,k)}};Object.defineProperty(o,"__esModule",{value:!0}),o.BufferDecorationRenderer=void 0;const _=l(4725),p=l(844),m=l(2585);let x=o.BufferDecorationRenderer=class extends p.Disposable{constructor(k,v,b,w,y){super(),this._screenElement=k,this._bufferService=v,this._coreBrowserService=b,this._decorationService=w,this._renderService=y,this._decorationElements=new Map,this._altBufferIsActive=!1,this._dimensionsChanged=!1,this._container=document.createElement("div"),this._container.classList.add("xterm-decoration-container"),this._screenElement.appendChild(this._container),this.register(this._renderService.onRenderedViewportChange((()=>this._doRefreshDecorations()))),this.register(this._renderService.onDimensionsChange((()=>{this._dimensionsChanged=!0,this._queueRefresh()}))),this.register(this._coreBrowserService.onDprChange((()=>this._queueRefresh()))),this.register(this._bufferService.buffers.onBufferActivate((()=>{this._altBufferIsActive=this._bufferService.buffer===this._bufferService.buffers.alt}))),this.register(this._decorationService.onDecorationRegistered((()=>this._queueRefresh()))),this.register(this._decorationService.onDecorationRemoved((C=>this._removeDecoration(C)))),this.register((0,p.toDisposable)((()=>{this._container.remove(),this._decorationElements.clear()})))}_queueRefresh(){this._animationFrame===void 0&&(this._animationFrame=this._renderService.addRefreshCallback((()=>{this._doRefreshDecorations(),this._animationFrame=void 0})))}_doRefreshDecorations(){for(const k of this._decorationService.decorations)this._renderDecoration(k);this._dimensionsChanged=!1}_renderDecoration(k){this._refreshStyle(k),this._dimensionsChanged&&this._refreshXPosition(k)}_createElement(k){var w;const v=this._coreBrowserService.mainDocument.createElement("div");v.classList.add("xterm-decoration"),v.classList.toggle("xterm-decoration-top-layer",((w=k==null?void 0:k.options)==null?void 0:w.layer)==="top"),v.style.width=`${Math.round((k.options.width||1)*this._renderService.dimensions.css.cell.width)}px`,v.style.height=(k.options.height||1)*this._renderService.dimensions.css.cell.height+"px",v.style.top=(k.marker.line-this._bufferService.buffers.active.ydisp)*this._renderService.dimensions.css.cell.height+"px",v.style.lineHeight=`${this._renderService.dimensions.css.cell.height}px`;const b=k.options.x??0;return b&&b>this._bufferService.cols&&(v.style.display="none"),this._refreshXPosition(k,v),v}_refreshStyle(k){const v=k.marker.line-this._bufferService.buffers.active.ydisp;if(v<0||v>=this._bufferService.rows)k.element&&(k.element.style.display="none",k.onRenderEmitter.fire(k.element));else{let b=this._decorationElements.get(k);b||(b=this._createElement(k),k.element=b,this._decorationElements.set(k,b),this._container.appendChild(b),k.onDispose((()=>{this._decorationElements.delete(k),b.remove()}))),b.style.top=v*this._renderService.dimensions.css.cell.height+"px",b.style.display=this._altBufferIsActive?"none":"block",k.onRenderEmitter.fire(b)}}_refreshXPosition(k,v=k.element){if(!v)return;const b=k.options.x??0;(k.options.anchor||"left")==="right"?v.style.right=b?b*this._renderService.dimensions.css.cell.width+"px":"":v.style.left=b?b*this._renderService.dimensions.css.cell.width+"px":""}_removeDecoration(k){var v;(v=this._decorationElements.get(k))==null||v.remove(),this._decorationElements.delete(k),k.dispose()}};o.BufferDecorationRenderer=x=u([h(1,m.IBufferService),h(2,_.ICoreBrowserService),h(3,m.IDecorationService),h(4,_.IRenderService)],x)},5871:(a,o)=>{Object.defineProperty(o,"__esModule",{value:!0}),o.ColorZoneStore=void 0,o.ColorZoneStore=class{constructor(){this._zones=[],this._zonePool=[],this._zonePoolIndex=0,this._linePadding={full:0,left:0,center:0,right:0}}get zones(){return this._zonePool.length=Math.min(this._zonePool.length,this._zones.length),this._zones}clear(){this._zones.length=0,this._zonePoolIndex=0}addDecoration(l){if(l.options.overviewRulerOptions){for(const u of this._zones)if(u.color===l.options.overviewRulerOptions.color&&u.position===l.options.overviewRulerOptions.position){if(this._lineIntersectsZone(u,l.marker.line))return;if(this._lineAdjacentToZone(u,l.marker.line,l.options.overviewRulerOptions.position))return void this._addLineToZone(u,l.marker.line)}if(this._zonePoolIndex=l.startBufferLine&&u<=l.endBufferLine}_lineAdjacentToZone(l,u,h){return u>=l.startBufferLine-this._linePadding[h||"full"]&&u<=l.endBufferLine+this._linePadding[h||"full"]}_addLineToZone(l,u){l.startBufferLine=Math.min(l.startBufferLine,u),l.endBufferLine=Math.max(l.endBufferLine,u)}}},5744:function(a,o,l){var u=this&&this.__decorate||function(y,C,E,N){var A,j=arguments.length,M=j<3?C:N===null?N=Object.getOwnPropertyDescriptor(C,E):N;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")M=Reflect.decorate(y,C,E,N);else for(var L=y.length-1;L>=0;L--)(A=y[L])&&(M=(j<3?A(M):j>3?A(C,E,M):A(C,E))||M);return j>3&&M&&Object.defineProperty(C,E,M),M},h=this&&this.__param||function(y,C){return function(E,N){C(E,N,y)}};Object.defineProperty(o,"__esModule",{value:!0}),o.OverviewRulerRenderer=void 0;const _=l(5871),p=l(4725),m=l(844),x=l(2585),k={full:0,left:0,center:0,right:0},v={full:0,left:0,center:0,right:0},b={full:0,left:0,center:0,right:0};let w=o.OverviewRulerRenderer=class extends m.Disposable{get _width(){return this._optionsService.options.overviewRulerWidth||0}constructor(y,C,E,N,A,j,M){var I;super(),this._viewportElement=y,this._screenElement=C,this._bufferService=E,this._decorationService=N,this._renderService=A,this._optionsService=j,this._coreBrowserService=M,this._colorZoneStore=new _.ColorZoneStore,this._shouldUpdateDimensions=!0,this._shouldUpdateAnchor=!0,this._lastKnownBufferLength=0,this._canvas=this._coreBrowserService.mainDocument.createElement("canvas"),this._canvas.classList.add("xterm-decoration-overview-ruler"),this._refreshCanvasDimensions(),(I=this._viewportElement.parentElement)==null||I.insertBefore(this._canvas,this._viewportElement);const L=this._canvas.getContext("2d");if(!L)throw new Error("Ctx cannot be null");this._ctx=L,this._registerDecorationListeners(),this._registerBufferChangeListeners(),this._registerDimensionChangeListeners(),this.register((0,m.toDisposable)((()=>{var B;(B=this._canvas)==null||B.remove()})))}_registerDecorationListeners(){this.register(this._decorationService.onDecorationRegistered((()=>this._queueRefresh(void 0,!0)))),this.register(this._decorationService.onDecorationRemoved((()=>this._queueRefresh(void 0,!0))))}_registerBufferChangeListeners(){this.register(this._renderService.onRenderedViewportChange((()=>this._queueRefresh()))),this.register(this._bufferService.buffers.onBufferActivate((()=>{this._canvas.style.display=this._bufferService.buffer===this._bufferService.buffers.alt?"none":"block"}))),this.register(this._bufferService.onScroll((()=>{this._lastKnownBufferLength!==this._bufferService.buffers.normal.lines.length&&(this._refreshDrawHeightConstants(),this._refreshColorZonePadding())})))}_registerDimensionChangeListeners(){this.register(this._renderService.onRender((()=>{this._containerHeight&&this._containerHeight===this._screenElement.clientHeight||(this._queueRefresh(!0),this._containerHeight=this._screenElement.clientHeight)}))),this.register(this._optionsService.onSpecificOptionChange("overviewRulerWidth",(()=>this._queueRefresh(!0)))),this.register(this._coreBrowserService.onDprChange((()=>this._queueRefresh(!0)))),this._queueRefresh(!0)}_refreshDrawConstants(){const y=Math.floor(this._canvas.width/3),C=Math.ceil(this._canvas.width/3);v.full=this._canvas.width,v.left=y,v.center=C,v.right=y,this._refreshDrawHeightConstants(),b.full=0,b.left=0,b.center=v.left,b.right=v.left+v.center}_refreshDrawHeightConstants(){k.full=Math.round(2*this._coreBrowserService.dpr);const y=this._canvas.height/this._bufferService.buffer.lines.length,C=Math.round(Math.max(Math.min(y,12),6)*this._coreBrowserService.dpr);k.left=C,k.center=C,k.right=C}_refreshColorZonePadding(){this._colorZoneStore.setPadding({full:Math.floor(this._bufferService.buffers.active.lines.length/(this._canvas.height-1)*k.full),left:Math.floor(this._bufferService.buffers.active.lines.length/(this._canvas.height-1)*k.left),center:Math.floor(this._bufferService.buffers.active.lines.length/(this._canvas.height-1)*k.center),right:Math.floor(this._bufferService.buffers.active.lines.length/(this._canvas.height-1)*k.right)}),this._lastKnownBufferLength=this._bufferService.buffers.normal.lines.length}_refreshCanvasDimensions(){this._canvas.style.width=`${this._width}px`,this._canvas.width=Math.round(this._width*this._coreBrowserService.dpr),this._canvas.style.height=`${this._screenElement.clientHeight}px`,this._canvas.height=Math.round(this._screenElement.clientHeight*this._coreBrowserService.dpr),this._refreshDrawConstants(),this._refreshColorZonePadding()}_refreshDecorations(){this._shouldUpdateDimensions&&this._refreshCanvasDimensions(),this._ctx.clearRect(0,0,this._canvas.width,this._canvas.height),this._colorZoneStore.clear();for(const C of this._decorationService.decorations)this._colorZoneStore.addDecoration(C);this._ctx.lineWidth=1;const y=this._colorZoneStore.zones;for(const C of y)C.position!=="full"&&this._renderColorZone(C);for(const C of y)C.position==="full"&&this._renderColorZone(C);this._shouldUpdateDimensions=!1,this._shouldUpdateAnchor=!1}_renderColorZone(y){this._ctx.fillStyle=y.color,this._ctx.fillRect(b[y.position||"full"],Math.round((this._canvas.height-1)*(y.startBufferLine/this._bufferService.buffers.active.lines.length)-k[y.position||"full"]/2),v[y.position||"full"],Math.round((this._canvas.height-1)*((y.endBufferLine-y.startBufferLine)/this._bufferService.buffers.active.lines.length)+k[y.position||"full"]))}_queueRefresh(y,C){this._shouldUpdateDimensions=y||this._shouldUpdateDimensions,this._shouldUpdateAnchor=C||this._shouldUpdateAnchor,this._animationFrame===void 0&&(this._animationFrame=this._coreBrowserService.window.requestAnimationFrame((()=>{this._refreshDecorations(),this._animationFrame=void 0})))}};o.OverviewRulerRenderer=w=u([h(2,x.IBufferService),h(3,x.IDecorationService),h(4,p.IRenderService),h(5,x.IOptionsService),h(6,p.ICoreBrowserService)],w)},2950:function(a,o,l){var u=this&&this.__decorate||function(k,v,b,w){var y,C=arguments.length,E=C<3?v:w===null?w=Object.getOwnPropertyDescriptor(v,b):w;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")E=Reflect.decorate(k,v,b,w);else for(var N=k.length-1;N>=0;N--)(y=k[N])&&(E=(C<3?y(E):C>3?y(v,b,E):y(v,b))||E);return C>3&&E&&Object.defineProperty(v,b,E),E},h=this&&this.__param||function(k,v){return function(b,w){v(b,w,k)}};Object.defineProperty(o,"__esModule",{value:!0}),o.CompositionHelper=void 0;const _=l(4725),p=l(2585),m=l(2584);let x=o.CompositionHelper=class{get isComposing(){return this._isComposing}constructor(k,v,b,w,y,C){this._textarea=k,this._compositionView=v,this._bufferService=b,this._optionsService=w,this._coreService=y,this._renderService=C,this._isComposing=!1,this._isSendingComposition=!1,this._compositionPosition={start:0,end:0},this._dataAlreadySent=""}compositionstart(){this._isComposing=!0,this._compositionPosition.start=this._textarea.value.length,this._compositionView.textContent="",this._dataAlreadySent="",this._compositionView.classList.add("active")}compositionupdate(k){this._compositionView.textContent=k.data,this.updateCompositionElements(),setTimeout((()=>{this._compositionPosition.end=this._textarea.value.length}),0)}compositionend(){this._finalizeComposition(!0)}keydown(k){if(this._isComposing||this._isSendingComposition){if(k.keyCode===229||k.keyCode===16||k.keyCode===17||k.keyCode===18)return!1;this._finalizeComposition(!1)}return k.keyCode!==229||(this._handleAnyTextareaChanges(),!1)}_finalizeComposition(k){if(this._compositionView.classList.remove("active"),this._isComposing=!1,k){const v={start:this._compositionPosition.start,end:this._compositionPosition.end};this._isSendingComposition=!0,setTimeout((()=>{if(this._isSendingComposition){let b;this._isSendingComposition=!1,v.start+=this._dataAlreadySent.length,b=this._isComposing?this._textarea.value.substring(v.start,v.end):this._textarea.value.substring(v.start),b.length>0&&this._coreService.triggerDataEvent(b,!0)}}),0)}else{this._isSendingComposition=!1;const v=this._textarea.value.substring(this._compositionPosition.start,this._compositionPosition.end);this._coreService.triggerDataEvent(v,!0)}}_handleAnyTextareaChanges(){const k=this._textarea.value;setTimeout((()=>{if(!this._isComposing){const v=this._textarea.value,b=v.replace(k,"");this._dataAlreadySent=b,v.length>k.length?this._coreService.triggerDataEvent(b,!0):v.lengththis.updateCompositionElements(!0)),0)}}};o.CompositionHelper=x=u([h(2,p.IBufferService),h(3,p.IOptionsService),h(4,p.ICoreService),h(5,_.IRenderService)],x)},9806:(a,o)=>{function l(u,h,_){const p=_.getBoundingClientRect(),m=u.getComputedStyle(_),x=parseInt(m.getPropertyValue("padding-left")),k=parseInt(m.getPropertyValue("padding-top"));return[h.clientX-p.left-x,h.clientY-p.top-k]}Object.defineProperty(o,"__esModule",{value:!0}),o.getCoords=o.getCoordsRelativeToElement=void 0,o.getCoordsRelativeToElement=l,o.getCoords=function(u,h,_,p,m,x,k,v,b){if(!x)return;const w=l(u,h,_);return w?(w[0]=Math.ceil((w[0]+(b?k/2:0))/k),w[1]=Math.ceil(w[1]/v),w[0]=Math.min(Math.max(w[0],1),p+(b?1:0)),w[1]=Math.min(Math.max(w[1],1),m),w):void 0}},9504:(a,o,l)=>{Object.defineProperty(o,"__esModule",{value:!0}),o.moveToCellSequence=void 0;const u=l(2584);function h(v,b,w,y){const C=v-_(v,w),E=b-_(b,w),N=Math.abs(C-E)-(function(A,j,M){let L=0;const I=A-_(A,M),B=j-_(j,M);for(let q=0;q=0&&vb?"A":"B"}function m(v,b,w,y,C,E){let N=v,A=b,j="";for(;N!==w||A!==y;)N+=C?1:-1,C&&N>E.cols-1?(j+=E.buffer.translateBufferLineToString(A,!1,v,N),N=0,v=0,A++):!C&&N<0&&(j+=E.buffer.translateBufferLineToString(A,!1,0,v+1),N=E.cols-1,v=N,A--);return j+E.buffer.translateBufferLineToString(A,!1,v,N)}function x(v,b){const w=b?"O":"[";return u.C0.ESC+w+v}function k(v,b){v=Math.floor(v);let w="";for(let y=0;y0?I-_(I,B):M;const W=I,H=(function(Y,te,$,D,F,G){let V;return V=h($,D,F,G).length>0?D-_(D,F):te,Y<$&&V<=D||Y>=$&&Vv?"D":"C",k(Math.abs(C-v),x(N,y));N=E>b?"D":"C";const A=Math.abs(E-b);return k((function(j,M){return M.cols-j})(E>b?v:C,w)+(A-1)*w.cols+1+((E>b?C:v)-1),x(N,y))}},1296:function(a,o,l){var u=this&&this.__decorate||function(q,U,W,H){var Y,te=arguments.length,$=te<3?U:H===null?H=Object.getOwnPropertyDescriptor(U,W):H;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")$=Reflect.decorate(q,U,W,H);else for(var D=q.length-1;D>=0;D--)(Y=q[D])&&($=(te<3?Y($):te>3?Y(U,W,$):Y(U,W))||$);return te>3&&$&&Object.defineProperty(U,W,$),$},h=this&&this.__param||function(q,U){return function(W,H){U(W,H,q)}};Object.defineProperty(o,"__esModule",{value:!0}),o.DomRenderer=void 0;const _=l(3787),p=l(2550),m=l(2223),x=l(6171),k=l(6052),v=l(4725),b=l(8055),w=l(8460),y=l(844),C=l(2585),E="xterm-dom-renderer-owner-",N="xterm-rows",A="xterm-fg-",j="xterm-bg-",M="xterm-focus",L="xterm-selection";let I=1,B=o.DomRenderer=class extends y.Disposable{constructor(q,U,W,H,Y,te,$,D,F,G,V,ee,ce){super(),this._terminal=q,this._document=U,this._element=W,this._screenElement=H,this._viewportElement=Y,this._helperContainer=te,this._linkifier2=$,this._charSizeService=F,this._optionsService=G,this._bufferService=V,this._coreBrowserService=ee,this._themeService=ce,this._terminalClass=I++,this._rowElements=[],this._selectionRenderModel=(0,k.createSelectionRenderModel)(),this.onRequestRedraw=this.register(new w.EventEmitter).event,this._rowContainer=this._document.createElement("div"),this._rowContainer.classList.add(N),this._rowContainer.style.lineHeight="normal",this._rowContainer.setAttribute("aria-hidden","true"),this._refreshRowElements(this._bufferService.cols,this._bufferService.rows),this._selectionContainer=this._document.createElement("div"),this._selectionContainer.classList.add(L),this._selectionContainer.setAttribute("aria-hidden","true"),this.dimensions=(0,x.createRenderDimensions)(),this._updateDimensions(),this.register(this._optionsService.onOptionChange((()=>this._handleOptionsChanged()))),this.register(this._themeService.onChangeColors((ae=>this._injectCss(ae)))),this._injectCss(this._themeService.colors),this._rowFactory=D.createInstance(_.DomRendererRowFactory,document),this._element.classList.add(E+this._terminalClass),this._screenElement.appendChild(this._rowContainer),this._screenElement.appendChild(this._selectionContainer),this.register(this._linkifier2.onShowLinkUnderline((ae=>this._handleLinkHover(ae)))),this.register(this._linkifier2.onHideLinkUnderline((ae=>this._handleLinkLeave(ae)))),this.register((0,y.toDisposable)((()=>{this._element.classList.remove(E+this._terminalClass),this._rowContainer.remove(),this._selectionContainer.remove(),this._widthCache.dispose(),this._themeStyleElement.remove(),this._dimensionsStyleElement.remove()}))),this._widthCache=new p.WidthCache(this._document,this._helperContainer),this._widthCache.setFont(this._optionsService.rawOptions.fontFamily,this._optionsService.rawOptions.fontSize,this._optionsService.rawOptions.fontWeight,this._optionsService.rawOptions.fontWeightBold),this._setDefaultSpacing()}_updateDimensions(){const q=this._coreBrowserService.dpr;this.dimensions.device.char.width=this._charSizeService.width*q,this.dimensions.device.char.height=Math.ceil(this._charSizeService.height*q),this.dimensions.device.cell.width=this.dimensions.device.char.width+Math.round(this._optionsService.rawOptions.letterSpacing),this.dimensions.device.cell.height=Math.floor(this.dimensions.device.char.height*this._optionsService.rawOptions.lineHeight),this.dimensions.device.char.left=0,this.dimensions.device.char.top=0,this.dimensions.device.canvas.width=this.dimensions.device.cell.width*this._bufferService.cols,this.dimensions.device.canvas.height=this.dimensions.device.cell.height*this._bufferService.rows,this.dimensions.css.canvas.width=Math.round(this.dimensions.device.canvas.width/q),this.dimensions.css.canvas.height=Math.round(this.dimensions.device.canvas.height/q),this.dimensions.css.cell.width=this.dimensions.css.canvas.width/this._bufferService.cols,this.dimensions.css.cell.height=this.dimensions.css.canvas.height/this._bufferService.rows;for(const W of this._rowElements)W.style.width=`${this.dimensions.css.canvas.width}px`,W.style.height=`${this.dimensions.css.cell.height}px`,W.style.lineHeight=`${this.dimensions.css.cell.height}px`,W.style.overflow="hidden";this._dimensionsStyleElement||(this._dimensionsStyleElement=this._document.createElement("style"),this._screenElement.appendChild(this._dimensionsStyleElement));const U=`${this._terminalSelector} .${N} span { display: inline-block; height: 100%; vertical-align: top;}`;this._dimensionsStyleElement.textContent=U,this._selectionContainer.style.height=this._viewportElement.style.height,this._screenElement.style.width=`${this.dimensions.css.canvas.width}px`,this._screenElement.style.height=`${this.dimensions.css.canvas.height}px`}_injectCss(q){this._themeStyleElement||(this._themeStyleElement=this._document.createElement("style"),this._screenElement.appendChild(this._themeStyleElement));let U=`${this._terminalSelector} .${N} { color: ${q.foreground.css}; font-family: ${this._optionsService.rawOptions.fontFamily}; font-size: ${this._optionsService.rawOptions.fontSize}px; font-kerning: none; white-space: pre}`;U+=`${this._terminalSelector} .${N} .xterm-dim { color: ${b.color.multiplyOpacity(q.foreground,.5).css};}`,U+=`${this._terminalSelector} span:not(.xterm-bold) { font-weight: ${this._optionsService.rawOptions.fontWeight};}${this._terminalSelector} span.xterm-bold { font-weight: ${this._optionsService.rawOptions.fontWeightBold};}${this._terminalSelector} span.xterm-italic { font-style: italic;}`;const W=`blink_underline_${this._terminalClass}`,H=`blink_bar_${this._terminalClass}`,Y=`blink_block_${this._terminalClass}`;U+=`@keyframes ${W} { 50% { border-bottom-style: hidden; }}`,U+=`@keyframes ${H} { 50% { box-shadow: none; }}`,U+=`@keyframes ${Y} { 0% { background-color: ${q.cursor.css}; color: ${q.cursorAccent.css}; } 50% { background-color: inherit; color: ${q.cursor.css}; }}`,U+=`${this._terminalSelector} .${N}.${M} .xterm-cursor.xterm-cursor-blink.xterm-cursor-underline { animation: ${W} 1s step-end infinite;}${this._terminalSelector} .${N}.${M} .xterm-cursor.xterm-cursor-blink.xterm-cursor-bar { animation: ${H} 1s step-end infinite;}${this._terminalSelector} .${N}.${M} .xterm-cursor.xterm-cursor-blink.xterm-cursor-block { animation: ${Y} 1s step-end infinite;}${this._terminalSelector} .${N} .xterm-cursor.xterm-cursor-block { background-color: ${q.cursor.css}; color: ${q.cursorAccent.css};}${this._terminalSelector} .${N} .xterm-cursor.xterm-cursor-block:not(.xterm-cursor-blink) { background-color: ${q.cursor.css} !important; color: ${q.cursorAccent.css} !important;}${this._terminalSelector} .${N} .xterm-cursor.xterm-cursor-outline { outline: 1px solid ${q.cursor.css}; outline-offset: -1px;}${this._terminalSelector} .${N} .xterm-cursor.xterm-cursor-bar { box-shadow: ${this._optionsService.rawOptions.cursorWidth}px 0 0 ${q.cursor.css} inset;}${this._terminalSelector} .${N} .xterm-cursor.xterm-cursor-underline { border-bottom: 1px ${q.cursor.css}; border-bottom-style: solid; height: calc(100% - 1px);}`,U+=`${this._terminalSelector} .${L} { position: absolute; top: 0; left: 0; z-index: 1; pointer-events: none;}${this._terminalSelector}.focus .${L} div { position: absolute; background-color: ${q.selectionBackgroundOpaque.css};}${this._terminalSelector} .${L} div { position: absolute; background-color: ${q.selectionInactiveBackgroundOpaque.css};}`;for(const[te,$]of q.ansi.entries())U+=`${this._terminalSelector} .${A}${te} { color: ${$.css}; }${this._terminalSelector} .${A}${te}.xterm-dim { color: ${b.color.multiplyOpacity($,.5).css}; }${this._terminalSelector} .${j}${te} { background-color: ${$.css}; }`;U+=`${this._terminalSelector} .${A}${m.INVERTED_DEFAULT_COLOR} { color: ${b.color.opaque(q.background).css}; }${this._terminalSelector} .${A}${m.INVERTED_DEFAULT_COLOR}.xterm-dim { color: ${b.color.multiplyOpacity(b.color.opaque(q.background),.5).css}; }${this._terminalSelector} .${j}${m.INVERTED_DEFAULT_COLOR} { background-color: ${q.foreground.css}; }`,this._themeStyleElement.textContent=U}_setDefaultSpacing(){const q=this.dimensions.css.cell.width-this._widthCache.get("W",!1,!1);this._rowContainer.style.letterSpacing=`${q}px`,this._rowFactory.defaultSpacing=q}handleDevicePixelRatioChange(){this._updateDimensions(),this._widthCache.clear(),this._setDefaultSpacing()}_refreshRowElements(q,U){for(let W=this._rowElements.length;W<=U;W++){const H=this._document.createElement("div");this._rowContainer.appendChild(H),this._rowElements.push(H)}for(;this._rowElements.length>U;)this._rowContainer.removeChild(this._rowElements.pop())}handleResize(q,U){this._refreshRowElements(q,U),this._updateDimensions(),this.handleSelectionChanged(this._selectionRenderModel.selectionStart,this._selectionRenderModel.selectionEnd,this._selectionRenderModel.columnSelectMode)}handleCharSizeChanged(){this._updateDimensions(),this._widthCache.clear(),this._setDefaultSpacing()}handleBlur(){this._rowContainer.classList.remove(M),this.renderRows(0,this._bufferService.rows-1)}handleFocus(){this._rowContainer.classList.add(M),this.renderRows(this._bufferService.buffer.y,this._bufferService.buffer.y)}handleSelectionChanged(q,U,W){if(this._selectionContainer.replaceChildren(),this._rowFactory.handleSelectionChanged(q,U,W),this.renderRows(0,this._bufferService.rows-1),!q||!U)return;this._selectionRenderModel.update(this._terminal,q,U,W);const H=this._selectionRenderModel.viewportStartRow,Y=this._selectionRenderModel.viewportEndRow,te=this._selectionRenderModel.viewportCappedStartRow,$=this._selectionRenderModel.viewportCappedEndRow;if(te>=this._bufferService.rows||$<0)return;const D=this._document.createDocumentFragment();if(W){const F=q[0]>U[0];D.appendChild(this._createSelectionElement(te,F?U[0]:q[0],F?q[0]:U[0],$-te+1))}else{const F=H===te?q[0]:0,G=te===Y?U[0]:this._bufferService.cols;D.appendChild(this._createSelectionElement(te,F,G));const V=$-te-1;if(D.appendChild(this._createSelectionElement(te+1,0,this._bufferService.cols,V)),te!==$){const ee=Y===$?U[0]:this._bufferService.cols;D.appendChild(this._createSelectionElement($,0,ee))}}this._selectionContainer.appendChild(D)}_createSelectionElement(q,U,W,H=1){const Y=this._document.createElement("div"),te=U*this.dimensions.css.cell.width;let $=this.dimensions.css.cell.width*(W-U);return te+$>this.dimensions.css.canvas.width&&($=this.dimensions.css.canvas.width-te),Y.style.height=H*this.dimensions.css.cell.height+"px",Y.style.top=q*this.dimensions.css.cell.height+"px",Y.style.left=`${te}px`,Y.style.width=`${$}px`,Y}handleCursorMove(){}_handleOptionsChanged(){this._updateDimensions(),this._injectCss(this._themeService.colors),this._widthCache.setFont(this._optionsService.rawOptions.fontFamily,this._optionsService.rawOptions.fontSize,this._optionsService.rawOptions.fontWeight,this._optionsService.rawOptions.fontWeightBold),this._setDefaultSpacing()}clear(){for(const q of this._rowElements)q.replaceChildren()}renderRows(q,U){const W=this._bufferService.buffer,H=W.ybase+W.y,Y=Math.min(W.x,this._bufferService.cols-1),te=this._optionsService.rawOptions.cursorBlink,$=this._optionsService.rawOptions.cursorStyle,D=this._optionsService.rawOptions.cursorInactiveStyle;for(let F=q;F<=U;F++){const G=F+W.ydisp,V=this._rowElements[F],ee=W.lines.get(G);if(!V||!ee)break;V.replaceChildren(...this._rowFactory.createRow(ee,G,G===H,$,D,Y,te,this.dimensions.css.cell.width,this._widthCache,-1,-1))}}get _terminalSelector(){return`.${E}${this._terminalClass}`}_handleLinkHover(q){this._setCellUnderline(q.x1,q.x2,q.y1,q.y2,q.cols,!0)}_handleLinkLeave(q){this._setCellUnderline(q.x1,q.x2,q.y1,q.y2,q.cols,!1)}_setCellUnderline(q,U,W,H,Y,te){W<0&&(q=0),H<0&&(U=0);const $=this._bufferService.rows-1;W=Math.max(Math.min(W,$),0),H=Math.max(Math.min(H,$),0),Y=Math.min(Y,this._bufferService.cols);const D=this._bufferService.buffer,F=D.ybase+D.y,G=Math.min(D.x,Y-1),V=this._optionsService.rawOptions.cursorBlink,ee=this._optionsService.rawOptions.cursorStyle,ce=this._optionsService.rawOptions.cursorInactiveStyle;for(let ae=W;ae<=H;++ae){const re=ae+D.ydisp,X=this._rowElements[ae],oe=D.lines.get(re);if(!X||!oe)break;X.replaceChildren(...this._rowFactory.createRow(oe,re,re===F,ee,ce,G,V,this.dimensions.css.cell.width,this._widthCache,te?ae===W?q:0:-1,te?(ae===H?U:Y)-1:-1))}}};o.DomRenderer=B=u([h(7,C.IInstantiationService),h(8,v.ICharSizeService),h(9,C.IOptionsService),h(10,C.IBufferService),h(11,v.ICoreBrowserService),h(12,v.IThemeService)],B)},3787:function(a,o,l){var u=this&&this.__decorate||function(N,A,j,M){var L,I=arguments.length,B=I<3?A:M===null?M=Object.getOwnPropertyDescriptor(A,j):M;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")B=Reflect.decorate(N,A,j,M);else for(var q=N.length-1;q>=0;q--)(L=N[q])&&(B=(I<3?L(B):I>3?L(A,j,B):L(A,j))||B);return I>3&&B&&Object.defineProperty(A,j,B),B},h=this&&this.__param||function(N,A){return function(j,M){A(j,M,N)}};Object.defineProperty(o,"__esModule",{value:!0}),o.DomRendererRowFactory=void 0;const _=l(2223),p=l(643),m=l(511),x=l(2585),k=l(8055),v=l(4725),b=l(4269),w=l(6171),y=l(3734);let C=o.DomRendererRowFactory=class{constructor(N,A,j,M,L,I,B){this._document=N,this._characterJoinerService=A,this._optionsService=j,this._coreBrowserService=M,this._coreService=L,this._decorationService=I,this._themeService=B,this._workCell=new m.CellData,this._columnSelectMode=!1,this.defaultSpacing=0}handleSelectionChanged(N,A,j){this._selectionStart=N,this._selectionEnd=A,this._columnSelectMode=j}createRow(N,A,j,M,L,I,B,q,U,W,H){const Y=[],te=this._characterJoinerService.getJoinedCharacters(A),$=this._themeService.colors;let D,F=N.getNoBgTrimmedLength();j&&F0&&Ee===te[0][0]){ze=!0;const Qe=te.shift();Oe=new b.JoinedCellData(this._workCell,N.translateToString(!0,Qe[0],Qe[1]),Qe[1]-Qe[0]),He=Qe[1]-1,Ie=Oe.getWidth()}const Xe=this._isCellInSelection(Ee,A),_t=j&&Ee===I,Vt=pe&&Ee>=W&&Ee<=H;let $t=!1;this._decorationService.forEachDecorationAtCell(Ee,A,void 0,(Qe=>{$t=!0}));let jt=Oe.getChars()||p.WHITESPACE_CELL_CHAR;if(jt===" "&&(Oe.isUnderline()||Oe.isOverline())&&(jt=" "),le=Ie*q-U.get(jt,Oe.isBold(),Oe.isItalic()),D){if(G&&(Xe&&oe||!Xe&&!oe&&Oe.bg===ee)&&(Xe&&oe&&$.selectionForeground||Oe.fg===ce)&&Oe.extended.ext===ae&&Vt===re&&le===X&&!_t&&!ze&&!$t){Oe.isInvisible()?V+=p.WHITESPACE_CELL_CHAR:V+=jt,G++;continue}G&&(D.textContent=V),D=this._document.createElement("span"),G=0,V=""}else D=this._document.createElement("span");if(ee=Oe.bg,ce=Oe.fg,ae=Oe.extended.ext,re=Vt,X=le,oe=Xe,ze&&I>=Ee&&I<=He&&(I=Ee),!this._coreService.isCursorHidden&&_t&&this._coreService.isCursorInitialized){if(_e.push("xterm-cursor"),this._coreBrowserService.isFocused)B&&_e.push("xterm-cursor-blink"),_e.push(M==="bar"?"xterm-cursor-bar":M==="underline"?"xterm-cursor-underline":"xterm-cursor-block");else if(L)switch(L){case"outline":_e.push("xterm-cursor-outline");break;case"block":_e.push("xterm-cursor-block");break;case"bar":_e.push("xterm-cursor-bar");break;case"underline":_e.push("xterm-cursor-underline")}}if(Oe.isBold()&&_e.push("xterm-bold"),Oe.isItalic()&&_e.push("xterm-italic"),Oe.isDim()&&_e.push("xterm-dim"),V=Oe.isInvisible()?p.WHITESPACE_CELL_CHAR:Oe.getChars()||p.WHITESPACE_CELL_CHAR,Oe.isUnderline()&&(_e.push(`xterm-underline-${Oe.extended.underlineStyle}`),V===" "&&(V=" "),!Oe.isUnderlineColorDefault()))if(Oe.isUnderlineColorRGB())D.style.textDecorationColor=`rgb(${y.AttributeData.toColorRGB(Oe.getUnderlineColor()).join(",")})`;else{let Qe=Oe.getUnderlineColor();this._optionsService.rawOptions.drawBoldTextInBrightColors&&Oe.isBold()&&Qe<8&&(Qe+=8),D.style.textDecorationColor=$.ansi[Qe].css}Oe.isOverline()&&(_e.push("xterm-overline"),V===" "&&(V=" ")),Oe.isStrikethrough()&&_e.push("xterm-strikethrough"),Vt&&(D.style.textDecoration="underline");let mt=Oe.getFgColor(),we=Oe.getFgColorMode(),ct=Oe.getBgColor(),ye=Oe.getBgColorMode();const je=!!Oe.isInverse();if(je){const Qe=mt;mt=ct,ct=Qe;const kt=we;we=ye,ye=kt}let qe,at,nt,Kt=!1;switch(this._decorationService.forEachDecorationAtCell(Ee,A,void 0,(Qe=>{Qe.options.layer!=="top"&&Kt||(Qe.backgroundColorRGB&&(ye=50331648,ct=Qe.backgroundColorRGB.rgba>>8&16777215,qe=Qe.backgroundColorRGB),Qe.foregroundColorRGB&&(we=50331648,mt=Qe.foregroundColorRGB.rgba>>8&16777215,at=Qe.foregroundColorRGB),Kt=Qe.options.layer==="top")})),!Kt&&Xe&&(qe=this._coreBrowserService.isFocused?$.selectionBackgroundOpaque:$.selectionInactiveBackgroundOpaque,ct=qe.rgba>>8&16777215,ye=50331648,Kt=!0,$.selectionForeground&&(we=50331648,mt=$.selectionForeground.rgba>>8&16777215,at=$.selectionForeground)),Kt&&_e.push("xterm-decoration-top"),ye){case 16777216:case 33554432:nt=$.ansi[ct],_e.push(`xterm-bg-${ct}`);break;case 50331648:nt=k.channels.toColor(ct>>16,ct>>8&255,255&ct),this._addStyle(D,`background-color:#${E((ct>>>0).toString(16),"0",6)}`);break;default:je?(nt=$.foreground,_e.push(`xterm-bg-${_.INVERTED_DEFAULT_COLOR}`)):nt=$.background}switch(qe||Oe.isDim()&&(qe=k.color.multiplyOpacity(nt,.5)),we){case 16777216:case 33554432:Oe.isBold()&&mt<8&&this._optionsService.rawOptions.drawBoldTextInBrightColors&&(mt+=8),this._applyMinimumContrast(D,nt,$.ansi[mt],Oe,qe,void 0)||_e.push(`xterm-fg-${mt}`);break;case 50331648:const Qe=k.channels.toColor(mt>>16&255,mt>>8&255,255&mt);this._applyMinimumContrast(D,nt,Qe,Oe,qe,at)||this._addStyle(D,`color:#${E(mt.toString(16),"0",6)}`);break;default:this._applyMinimumContrast(D,nt,$.foreground,Oe,qe,at)||je&&_e.push(`xterm-fg-${_.INVERTED_DEFAULT_COLOR}`)}_e.length&&(D.className=_e.join(" "),_e.length=0),_t||ze||$t?D.textContent=V:G++,le!==this.defaultSpacing&&(D.style.letterSpacing=`${le}px`),Y.push(D),Ee=He}return D&&G&&(D.textContent=V),Y}_applyMinimumContrast(N,A,j,M,L,I){if(this._optionsService.rawOptions.minimumContrastRatio===1||(0,w.treatGlyphAsBackgroundColor)(M.getCode()))return!1;const B=this._getContrastCache(M);let q;if(L||I||(q=B.getColor(A.rgba,j.rgba)),q===void 0){const U=this._optionsService.rawOptions.minimumContrastRatio/(M.isDim()?2:1);q=k.color.ensureContrastRatio(L||A,I||j,U),B.setColor((L||A).rgba,(I||j).rgba,q??null)}return!!q&&(this._addStyle(N,`color:${q.css}`),!0)}_getContrastCache(N){return N.isDim()?this._themeService.colors.halfContrastCache:this._themeService.colors.contrastCache}_addStyle(N,A){N.setAttribute("style",`${N.getAttribute("style")||""}${A};`)}_isCellInSelection(N,A){const j=this._selectionStart,M=this._selectionEnd;return!(!j||!M)&&(this._columnSelectMode?j[0]<=M[0]?N>=j[0]&&A>=j[1]&&N=j[1]&&N>=M[0]&&A<=M[1]:A>j[1]&&A=j[0]&&N=j[0])}};function E(N,A,j){for(;N.length{Object.defineProperty(o,"__esModule",{value:!0}),o.WidthCache=void 0,o.WidthCache=class{constructor(l,u){this._flat=new Float32Array(256),this._font="",this._fontSize=0,this._weight="normal",this._weightBold="bold",this._measureElements=[],this._container=l.createElement("div"),this._container.classList.add("xterm-width-cache-measure-container"),this._container.setAttribute("aria-hidden","true"),this._container.style.whiteSpace="pre",this._container.style.fontKerning="none";const h=l.createElement("span");h.classList.add("xterm-char-measure-element");const _=l.createElement("span");_.classList.add("xterm-char-measure-element"),_.style.fontWeight="bold";const p=l.createElement("span");p.classList.add("xterm-char-measure-element"),p.style.fontStyle="italic";const m=l.createElement("span");m.classList.add("xterm-char-measure-element"),m.style.fontWeight="bold",m.style.fontStyle="italic",this._measureElements=[h,_,p,m],this._container.appendChild(h),this._container.appendChild(_),this._container.appendChild(p),this._container.appendChild(m),u.appendChild(this._container),this.clear()}dispose(){this._container.remove(),this._measureElements.length=0,this._holey=void 0}clear(){this._flat.fill(-9999),this._holey=new Map}setFont(l,u,h,_){l===this._font&&u===this._fontSize&&h===this._weight&&_===this._weightBold||(this._font=l,this._fontSize=u,this._weight=h,this._weightBold=_,this._container.style.fontFamily=this._font,this._container.style.fontSize=`${this._fontSize}px`,this._measureElements[0].style.fontWeight=`${h}`,this._measureElements[1].style.fontWeight=`${_}`,this._measureElements[2].style.fontWeight=`${h}`,this._measureElements[3].style.fontWeight=`${_}`,this.clear())}get(l,u,h){let _=0;if(!u&&!h&&l.length===1&&(_=l.charCodeAt(0))<256){if(this._flat[_]!==-9999)return this._flat[_];const x=this._measure(l,0);return x>0&&(this._flat[_]=x),x}let p=l;u&&(p+="B"),h&&(p+="I");let m=this._holey.get(p);if(m===void 0){let x=0;u&&(x|=1),h&&(x|=2),m=this._measure(l,x),m>0&&this._holey.set(p,m)}return m}_measure(l,u){const h=this._measureElements[u];return h.textContent=l.repeat(32),h.offsetWidth/32}}},2223:(a,o,l)=>{Object.defineProperty(o,"__esModule",{value:!0}),o.TEXT_BASELINE=o.DIM_OPACITY=o.INVERTED_DEFAULT_COLOR=void 0;const u=l(6114);o.INVERTED_DEFAULT_COLOR=257,o.DIM_OPACITY=.5,o.TEXT_BASELINE=u.isFirefox||u.isLegacyEdge?"bottom":"ideographic"},6171:(a,o)=>{function l(h){return 57508<=h&&h<=57558}function u(h){return h>=128512&&h<=128591||h>=127744&&h<=128511||h>=128640&&h<=128767||h>=9728&&h<=9983||h>=9984&&h<=10175||h>=65024&&h<=65039||h>=129280&&h<=129535||h>=127462&&h<=127487}Object.defineProperty(o,"__esModule",{value:!0}),o.computeNextVariantOffset=o.createRenderDimensions=o.treatGlyphAsBackgroundColor=o.allowRescaling=o.isEmoji=o.isRestrictedPowerlineGlyph=o.isPowerlineGlyph=o.throwIfFalsy=void 0,o.throwIfFalsy=function(h){if(!h)throw new Error("value must not be falsy");return h},o.isPowerlineGlyph=l,o.isRestrictedPowerlineGlyph=function(h){return 57520<=h&&h<=57527},o.isEmoji=u,o.allowRescaling=function(h,_,p,m){return _===1&&p>Math.ceil(1.5*m)&&h!==void 0&&h>255&&!u(h)&&!l(h)&&!(function(x){return 57344<=x&&x<=63743})(h)},o.treatGlyphAsBackgroundColor=function(h){return l(h)||(function(_){return 9472<=_&&_<=9631})(h)},o.createRenderDimensions=function(){return{css:{canvas:{width:0,height:0},cell:{width:0,height:0}},device:{canvas:{width:0,height:0},cell:{width:0,height:0},char:{width:0,height:0,left:0,top:0}}}},o.computeNextVariantOffset=function(h,_,p=0){return(h-(2*Math.round(_)-p))%(2*Math.round(_))}},6052:(a,o)=>{Object.defineProperty(o,"__esModule",{value:!0}),o.createSelectionRenderModel=void 0;class l{constructor(){this.clear()}clear(){this.hasSelection=!1,this.columnSelectMode=!1,this.viewportStartRow=0,this.viewportEndRow=0,this.viewportCappedStartRow=0,this.viewportCappedEndRow=0,this.startCol=0,this.endCol=0,this.selectionStart=void 0,this.selectionEnd=void 0}update(h,_,p,m=!1){if(this.selectionStart=_,this.selectionEnd=p,!_||!p||_[0]===p[0]&&_[1]===p[1])return void this.clear();const x=h.buffers.active.ydisp,k=_[1]-x,v=p[1]-x,b=Math.max(k,0),w=Math.min(v,h.rows-1);b>=h.rows||w<0?this.clear():(this.hasSelection=!0,this.columnSelectMode=m,this.viewportStartRow=k,this.viewportEndRow=v,this.viewportCappedStartRow=b,this.viewportCappedEndRow=w,this.startCol=_[0],this.endCol=p[0])}isCellSelected(h,_,p){return!!this.hasSelection&&(p-=h.buffer.active.viewportY,this.columnSelectMode?this.startCol<=this.endCol?_>=this.startCol&&p>=this.viewportCappedStartRow&&_=this.viewportCappedStartRow&&_>=this.endCol&&p<=this.viewportCappedEndRow:p>this.viewportStartRow&&p=this.startCol&&_=this.startCol)}}o.createSelectionRenderModel=function(){return new l}},456:(a,o)=>{Object.defineProperty(o,"__esModule",{value:!0}),o.SelectionModel=void 0,o.SelectionModel=class{constructor(l){this._bufferService=l,this.isSelectAllActive=!1,this.selectionStartLength=0}clearSelection(){this.selectionStart=void 0,this.selectionEnd=void 0,this.isSelectAllActive=!1,this.selectionStartLength=0}get finalSelectionStart(){return this.isSelectAllActive?[0,0]:this.selectionEnd&&this.selectionStart&&this.areSelectionValuesReversed()?this.selectionEnd:this.selectionStart}get finalSelectionEnd(){if(this.isSelectAllActive)return[this._bufferService.cols,this._bufferService.buffer.ybase+this._bufferService.rows-1];if(this.selectionStart){if(!this.selectionEnd||this.areSelectionValuesReversed()){const l=this.selectionStart[0]+this.selectionStartLength;return l>this._bufferService.cols?l%this._bufferService.cols==0?[this._bufferService.cols,this.selectionStart[1]+Math.floor(l/this._bufferService.cols)-1]:[l%this._bufferService.cols,this.selectionStart[1]+Math.floor(l/this._bufferService.cols)]:[l,this.selectionStart[1]]}if(this.selectionStartLength&&this.selectionEnd[1]===this.selectionStart[1]){const l=this.selectionStart[0]+this.selectionStartLength;return l>this._bufferService.cols?[l%this._bufferService.cols,this.selectionStart[1]+Math.floor(l/this._bufferService.cols)]:[Math.max(l,this.selectionEnd[0]),this.selectionEnd[1]]}return this.selectionEnd}}areSelectionValuesReversed(){const l=this.selectionStart,u=this.selectionEnd;return!(!l||!u)&&(l[1]>u[1]||l[1]===u[1]&&l[0]>u[0])}handleTrim(l){return this.selectionStart&&(this.selectionStart[1]-=l),this.selectionEnd&&(this.selectionEnd[1]-=l),this.selectionEnd&&this.selectionEnd[1]<0?(this.clearSelection(),!0):(this.selectionStart&&this.selectionStart[1]<0&&(this.selectionStart[1]=0),!1)}}},428:function(a,o,l){var u=this&&this.__decorate||function(w,y,C,E){var N,A=arguments.length,j=A<3?y:E===null?E=Object.getOwnPropertyDescriptor(y,C):E;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")j=Reflect.decorate(w,y,C,E);else for(var M=w.length-1;M>=0;M--)(N=w[M])&&(j=(A<3?N(j):A>3?N(y,C,j):N(y,C))||j);return A>3&&j&&Object.defineProperty(y,C,j),j},h=this&&this.__param||function(w,y){return function(C,E){y(C,E,w)}};Object.defineProperty(o,"__esModule",{value:!0}),o.CharSizeService=void 0;const _=l(2585),p=l(8460),m=l(844);let x=o.CharSizeService=class extends m.Disposable{get hasValidSize(){return this.width>0&&this.height>0}constructor(w,y,C){super(),this._optionsService=C,this.width=0,this.height=0,this._onCharSizeChange=this.register(new p.EventEmitter),this.onCharSizeChange=this._onCharSizeChange.event;try{this._measureStrategy=this.register(new b(this._optionsService))}catch{this._measureStrategy=this.register(new v(w,y,this._optionsService))}this.register(this._optionsService.onMultipleOptionChange(["fontFamily","fontSize"],(()=>this.measure())))}measure(){const w=this._measureStrategy.measure();w.width===this.width&&w.height===this.height||(this.width=w.width,this.height=w.height,this._onCharSizeChange.fire())}};o.CharSizeService=x=u([h(2,_.IOptionsService)],x);class k extends m.Disposable{constructor(){super(...arguments),this._result={width:0,height:0}}_validateAndSet(y,C){y!==void 0&&y>0&&C!==void 0&&C>0&&(this._result.width=y,this._result.height=C)}}class v extends k{constructor(y,C,E){super(),this._document=y,this._parentElement=C,this._optionsService=E,this._measureElement=this._document.createElement("span"),this._measureElement.classList.add("xterm-char-measure-element"),this._measureElement.textContent="W".repeat(32),this._measureElement.setAttribute("aria-hidden","true"),this._measureElement.style.whiteSpace="pre",this._measureElement.style.fontKerning="none",this._parentElement.appendChild(this._measureElement)}measure(){return this._measureElement.style.fontFamily=this._optionsService.rawOptions.fontFamily,this._measureElement.style.fontSize=`${this._optionsService.rawOptions.fontSize}px`,this._validateAndSet(Number(this._measureElement.offsetWidth)/32,Number(this._measureElement.offsetHeight)),this._result}}class b extends k{constructor(y){super(),this._optionsService=y,this._canvas=new OffscreenCanvas(100,100),this._ctx=this._canvas.getContext("2d");const C=this._ctx.measureText("W");if(!("width"in C&&"fontBoundingBoxAscent"in C&&"fontBoundingBoxDescent"in C))throw new Error("Required font metrics not supported")}measure(){this._ctx.font=`${this._optionsService.rawOptions.fontSize}px ${this._optionsService.rawOptions.fontFamily}`;const y=this._ctx.measureText("W");return this._validateAndSet(y.width,y.fontBoundingBoxAscent+y.fontBoundingBoxDescent),this._result}}},4269:function(a,o,l){var u=this&&this.__decorate||function(b,w,y,C){var E,N=arguments.length,A=N<3?w:C===null?C=Object.getOwnPropertyDescriptor(w,y):C;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")A=Reflect.decorate(b,w,y,C);else for(var j=b.length-1;j>=0;j--)(E=b[j])&&(A=(N<3?E(A):N>3?E(w,y,A):E(w,y))||A);return N>3&&A&&Object.defineProperty(w,y,A),A},h=this&&this.__param||function(b,w){return function(y,C){w(y,C,b)}};Object.defineProperty(o,"__esModule",{value:!0}),o.CharacterJoinerService=o.JoinedCellData=void 0;const _=l(3734),p=l(643),m=l(511),x=l(2585);class k extends _.AttributeData{constructor(w,y,C){super(),this.content=0,this.combinedData="",this.fg=w.fg,this.bg=w.bg,this.combinedData=y,this._width=C}isCombined(){return 2097152}getWidth(){return this._width}getChars(){return this.combinedData}getCode(){return 2097151}setFromCharData(w){throw new Error("not implemented")}getAsCharData(){return[this.fg,this.getChars(),this.getWidth(),this.getCode()]}}o.JoinedCellData=k;let v=o.CharacterJoinerService=class AI{constructor(w){this._bufferService=w,this._characterJoiners=[],this._nextCharacterJoinerId=0,this._workCell=new m.CellData}register(w){const y={id:this._nextCharacterJoinerId++,handler:w};return this._characterJoiners.push(y),y.id}deregister(w){for(let y=0;y1){const B=this._getJoinedRanges(E,j,A,y,N);for(let q=0;q1){const I=this._getJoinedRanges(E,j,A,y,N);for(let B=0;B{Object.defineProperty(o,"__esModule",{value:!0}),o.CoreBrowserService=void 0;const u=l(844),h=l(8460),_=l(3656);class p extends u.Disposable{constructor(k,v,b){super(),this._textarea=k,this._window=v,this.mainDocument=b,this._isFocused=!1,this._cachedIsFocused=void 0,this._screenDprMonitor=new m(this._window),this._onDprChange=this.register(new h.EventEmitter),this.onDprChange=this._onDprChange.event,this._onWindowChange=this.register(new h.EventEmitter),this.onWindowChange=this._onWindowChange.event,this.register(this.onWindowChange((w=>this._screenDprMonitor.setWindow(w)))),this.register((0,h.forwardEvent)(this._screenDprMonitor.onDprChange,this._onDprChange)),this._textarea.addEventListener("focus",(()=>this._isFocused=!0)),this._textarea.addEventListener("blur",(()=>this._isFocused=!1))}get window(){return this._window}set window(k){this._window!==k&&(this._window=k,this._onWindowChange.fire(this._window))}get dpr(){return this.window.devicePixelRatio}get isFocused(){return this._cachedIsFocused===void 0&&(this._cachedIsFocused=this._isFocused&&this._textarea.ownerDocument.hasFocus(),queueMicrotask((()=>this._cachedIsFocused=void 0))),this._cachedIsFocused}}o.CoreBrowserService=p;class m extends u.Disposable{constructor(k){super(),this._parentWindow=k,this._windowResizeListener=this.register(new u.MutableDisposable),this._onDprChange=this.register(new h.EventEmitter),this.onDprChange=this._onDprChange.event,this._outerListener=()=>this._setDprAndFireIfDiffers(),this._currentDevicePixelRatio=this._parentWindow.devicePixelRatio,this._updateDpr(),this._setWindowResizeListener(),this.register((0,u.toDisposable)((()=>this.clearListener())))}setWindow(k){this._parentWindow=k,this._setWindowResizeListener(),this._setDprAndFireIfDiffers()}_setWindowResizeListener(){this._windowResizeListener.value=(0,_.addDisposableDomListener)(this._parentWindow,"resize",(()=>this._setDprAndFireIfDiffers()))}_setDprAndFireIfDiffers(){this._parentWindow.devicePixelRatio!==this._currentDevicePixelRatio&&this._onDprChange.fire(this._parentWindow.devicePixelRatio),this._updateDpr()}_updateDpr(){var k;this._outerListener&&((k=this._resolutionMediaMatchList)==null||k.removeListener(this._outerListener),this._currentDevicePixelRatio=this._parentWindow.devicePixelRatio,this._resolutionMediaMatchList=this._parentWindow.matchMedia(`screen and (resolution: ${this._parentWindow.devicePixelRatio}dppx)`),this._resolutionMediaMatchList.addListener(this._outerListener))}clearListener(){this._resolutionMediaMatchList&&this._outerListener&&(this._resolutionMediaMatchList.removeListener(this._outerListener),this._resolutionMediaMatchList=void 0,this._outerListener=void 0)}}},779:(a,o,l)=>{Object.defineProperty(o,"__esModule",{value:!0}),o.LinkProviderService=void 0;const u=l(844);class h extends u.Disposable{constructor(){super(),this.linkProviders=[],this.register((0,u.toDisposable)((()=>this.linkProviders.length=0)))}registerLinkProvider(p){return this.linkProviders.push(p),{dispose:()=>{const m=this.linkProviders.indexOf(p);m!==-1&&this.linkProviders.splice(m,1)}}}}o.LinkProviderService=h},8934:function(a,o,l){var u=this&&this.__decorate||function(x,k,v,b){var w,y=arguments.length,C=y<3?k:b===null?b=Object.getOwnPropertyDescriptor(k,v):b;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")C=Reflect.decorate(x,k,v,b);else for(var E=x.length-1;E>=0;E--)(w=x[E])&&(C=(y<3?w(C):y>3?w(k,v,C):w(k,v))||C);return y>3&&C&&Object.defineProperty(k,v,C),C},h=this&&this.__param||function(x,k){return function(v,b){k(v,b,x)}};Object.defineProperty(o,"__esModule",{value:!0}),o.MouseService=void 0;const _=l(4725),p=l(9806);let m=o.MouseService=class{constructor(x,k){this._renderService=x,this._charSizeService=k}getCoords(x,k,v,b,w){return(0,p.getCoords)(window,x,k,v,b,this._charSizeService.hasValidSize,this._renderService.dimensions.css.cell.width,this._renderService.dimensions.css.cell.height,w)}getMouseReportCoords(x,k){const v=(0,p.getCoordsRelativeToElement)(window,x,k);if(this._charSizeService.hasValidSize)return v[0]=Math.min(Math.max(v[0],0),this._renderService.dimensions.css.canvas.width-1),v[1]=Math.min(Math.max(v[1],0),this._renderService.dimensions.css.canvas.height-1),{col:Math.floor(v[0]/this._renderService.dimensions.css.cell.width),row:Math.floor(v[1]/this._renderService.dimensions.css.cell.height),x:Math.floor(v[0]),y:Math.floor(v[1])}}};o.MouseService=m=u([h(0,_.IRenderService),h(1,_.ICharSizeService)],m)},3230:function(a,o,l){var u=this&&this.__decorate||function(w,y,C,E){var N,A=arguments.length,j=A<3?y:E===null?E=Object.getOwnPropertyDescriptor(y,C):E;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")j=Reflect.decorate(w,y,C,E);else for(var M=w.length-1;M>=0;M--)(N=w[M])&&(j=(A<3?N(j):A>3?N(y,C,j):N(y,C))||j);return A>3&&j&&Object.defineProperty(y,C,j),j},h=this&&this.__param||function(w,y){return function(C,E){y(C,E,w)}};Object.defineProperty(o,"__esModule",{value:!0}),o.RenderService=void 0;const _=l(6193),p=l(4725),m=l(8460),x=l(844),k=l(7226),v=l(2585);let b=o.RenderService=class extends x.Disposable{get dimensions(){return this._renderer.value.dimensions}constructor(w,y,C,E,N,A,j,M){super(),this._rowCount=w,this._charSizeService=E,this._renderer=this.register(new x.MutableDisposable),this._pausedResizeTask=new k.DebouncedIdleTask,this._observerDisposable=this.register(new x.MutableDisposable),this._isPaused=!1,this._needsFullRefresh=!1,this._isNextRenderRedrawOnly=!0,this._needsSelectionRefresh=!1,this._canvasWidth=0,this._canvasHeight=0,this._selectionState={start:void 0,end:void 0,columnSelectMode:!1},this._onDimensionsChange=this.register(new m.EventEmitter),this.onDimensionsChange=this._onDimensionsChange.event,this._onRenderedViewportChange=this.register(new m.EventEmitter),this.onRenderedViewportChange=this._onRenderedViewportChange.event,this._onRender=this.register(new m.EventEmitter),this.onRender=this._onRender.event,this._onRefreshRequest=this.register(new m.EventEmitter),this.onRefreshRequest=this._onRefreshRequest.event,this._renderDebouncer=new _.RenderDebouncer(((L,I)=>this._renderRows(L,I)),j),this.register(this._renderDebouncer),this.register(j.onDprChange((()=>this.handleDevicePixelRatioChange()))),this.register(A.onResize((()=>this._fullRefresh()))),this.register(A.buffers.onBufferActivate((()=>{var L;return(L=this._renderer.value)==null?void 0:L.clear()}))),this.register(C.onOptionChange((()=>this._handleOptionsChanged()))),this.register(this._charSizeService.onCharSizeChange((()=>this.handleCharSizeChanged()))),this.register(N.onDecorationRegistered((()=>this._fullRefresh()))),this.register(N.onDecorationRemoved((()=>this._fullRefresh()))),this.register(C.onMultipleOptionChange(["customGlyphs","drawBoldTextInBrightColors","letterSpacing","lineHeight","fontFamily","fontSize","fontWeight","fontWeightBold","minimumContrastRatio","rescaleOverlappingGlyphs"],(()=>{this.clear(),this.handleResize(A.cols,A.rows),this._fullRefresh()}))),this.register(C.onMultipleOptionChange(["cursorBlink","cursorStyle"],(()=>this.refreshRows(A.buffer.y,A.buffer.y,!0)))),this.register(M.onChangeColors((()=>this._fullRefresh()))),this._registerIntersectionObserver(j.window,y),this.register(j.onWindowChange((L=>this._registerIntersectionObserver(L,y))))}_registerIntersectionObserver(w,y){if("IntersectionObserver"in w){const C=new w.IntersectionObserver((E=>this._handleIntersectionChange(E[E.length-1])),{threshold:0});C.observe(y),this._observerDisposable.value=(0,x.toDisposable)((()=>C.disconnect()))}}_handleIntersectionChange(w){this._isPaused=w.isIntersecting===void 0?w.intersectionRatio===0:!w.isIntersecting,this._isPaused||this._charSizeService.hasValidSize||this._charSizeService.measure(),!this._isPaused&&this._needsFullRefresh&&(this._pausedResizeTask.flush(),this.refreshRows(0,this._rowCount-1),this._needsFullRefresh=!1)}refreshRows(w,y,C=!1){this._isPaused?this._needsFullRefresh=!0:(C||(this._isNextRenderRedrawOnly=!1),this._renderDebouncer.refresh(w,y,this._rowCount))}_renderRows(w,y){this._renderer.value&&(w=Math.min(w,this._rowCount-1),y=Math.min(y,this._rowCount-1),this._renderer.value.renderRows(w,y),this._needsSelectionRefresh&&(this._renderer.value.handleSelectionChanged(this._selectionState.start,this._selectionState.end,this._selectionState.columnSelectMode),this._needsSelectionRefresh=!1),this._isNextRenderRedrawOnly||this._onRenderedViewportChange.fire({start:w,end:y}),this._onRender.fire({start:w,end:y}),this._isNextRenderRedrawOnly=!0)}resize(w,y){this._rowCount=y,this._fireOnCanvasResize()}_handleOptionsChanged(){this._renderer.value&&(this.refreshRows(0,this._rowCount-1),this._fireOnCanvasResize())}_fireOnCanvasResize(){this._renderer.value&&(this._renderer.value.dimensions.css.canvas.width===this._canvasWidth&&this._renderer.value.dimensions.css.canvas.height===this._canvasHeight||this._onDimensionsChange.fire(this._renderer.value.dimensions))}hasRenderer(){return!!this._renderer.value}setRenderer(w){this._renderer.value=w,this._renderer.value&&(this._renderer.value.onRequestRedraw((y=>this.refreshRows(y.start,y.end,!0))),this._needsSelectionRefresh=!0,this._fullRefresh())}addRefreshCallback(w){return this._renderDebouncer.addRefreshCallback(w)}_fullRefresh(){this._isPaused?this._needsFullRefresh=!0:this.refreshRows(0,this._rowCount-1)}clearTextureAtlas(){var w,y;this._renderer.value&&((y=(w=this._renderer.value).clearTextureAtlas)==null||y.call(w),this._fullRefresh())}handleDevicePixelRatioChange(){this._charSizeService.measure(),this._renderer.value&&(this._renderer.value.handleDevicePixelRatioChange(),this.refreshRows(0,this._rowCount-1))}handleResize(w,y){this._renderer.value&&(this._isPaused?this._pausedResizeTask.set((()=>{var C;return(C=this._renderer.value)==null?void 0:C.handleResize(w,y)})):this._renderer.value.handleResize(w,y),this._fullRefresh())}handleCharSizeChanged(){var w;(w=this._renderer.value)==null||w.handleCharSizeChanged()}handleBlur(){var w;(w=this._renderer.value)==null||w.handleBlur()}handleFocus(){var w;(w=this._renderer.value)==null||w.handleFocus()}handleSelectionChanged(w,y,C){var E;this._selectionState.start=w,this._selectionState.end=y,this._selectionState.columnSelectMode=C,(E=this._renderer.value)==null||E.handleSelectionChanged(w,y,C)}handleCursorMove(){var w;(w=this._renderer.value)==null||w.handleCursorMove()}clear(){var w;(w=this._renderer.value)==null||w.clear()}};o.RenderService=b=u([h(2,v.IOptionsService),h(3,p.ICharSizeService),h(4,v.IDecorationService),h(5,v.IBufferService),h(6,p.ICoreBrowserService),h(7,p.IThemeService)],b)},9312:function(a,o,l){var u=this&&this.__decorate||function(j,M,L,I){var B,q=arguments.length,U=q<3?M:I===null?I=Object.getOwnPropertyDescriptor(M,L):I;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")U=Reflect.decorate(j,M,L,I);else for(var W=j.length-1;W>=0;W--)(B=j[W])&&(U=(q<3?B(U):q>3?B(M,L,U):B(M,L))||U);return q>3&&U&&Object.defineProperty(M,L,U),U},h=this&&this.__param||function(j,M){return function(L,I){M(L,I,j)}};Object.defineProperty(o,"__esModule",{value:!0}),o.SelectionService=void 0;const _=l(9806),p=l(9504),m=l(456),x=l(4725),k=l(8460),v=l(844),b=l(6114),w=l(4841),y=l(511),C=l(2585),E=" ",N=new RegExp(E,"g");let A=o.SelectionService=class extends v.Disposable{constructor(j,M,L,I,B,q,U,W,H){super(),this._element=j,this._screenElement=M,this._linkifier=L,this._bufferService=I,this._coreService=B,this._mouseService=q,this._optionsService=U,this._renderService=W,this._coreBrowserService=H,this._dragScrollAmount=0,this._enabled=!0,this._workCell=new y.CellData,this._mouseDownTimeStamp=0,this._oldHasSelection=!1,this._oldSelectionStart=void 0,this._oldSelectionEnd=void 0,this._onLinuxMouseSelection=this.register(new k.EventEmitter),this.onLinuxMouseSelection=this._onLinuxMouseSelection.event,this._onRedrawRequest=this.register(new k.EventEmitter),this.onRequestRedraw=this._onRedrawRequest.event,this._onSelectionChange=this.register(new k.EventEmitter),this.onSelectionChange=this._onSelectionChange.event,this._onRequestScrollLines=this.register(new k.EventEmitter),this.onRequestScrollLines=this._onRequestScrollLines.event,this._mouseMoveListener=Y=>this._handleMouseMove(Y),this._mouseUpListener=Y=>this._handleMouseUp(Y),this._coreService.onUserInput((()=>{this.hasSelection&&this.clearSelection()})),this._trimListener=this._bufferService.buffer.lines.onTrim((Y=>this._handleTrim(Y))),this.register(this._bufferService.buffers.onBufferActivate((Y=>this._handleBufferActivate(Y)))),this.enable(),this._model=new m.SelectionModel(this._bufferService),this._activeSelectionMode=0,this.register((0,v.toDisposable)((()=>{this._removeMouseDownListeners()})))}reset(){this.clearSelection()}disable(){this.clearSelection(),this._enabled=!1}enable(){this._enabled=!0}get selectionStart(){return this._model.finalSelectionStart}get selectionEnd(){return this._model.finalSelectionEnd}get hasSelection(){const j=this._model.finalSelectionStart,M=this._model.finalSelectionEnd;return!(!j||!M||j[0]===M[0]&&j[1]===M[1])}get selectionText(){const j=this._model.finalSelectionStart,M=this._model.finalSelectionEnd;if(!j||!M)return"";const L=this._bufferService.buffer,I=[];if(this._activeSelectionMode===3){if(j[0]===M[0])return"";const B=j[0]B.replace(N," "))).join(b.isWindows?`\r `:` -`)}clearSelection(){this._model.clearSelection(),this._removeMouseDownListeners(),this.refresh(),this._onSelectionChange.fire()}refresh(j){this._refreshAnimationFrame||(this._refreshAnimationFrame=this._coreBrowserService.window.requestAnimationFrame((()=>this._refresh()))),b.isLinux&&j&&this.selectionText.length&&this._onLinuxMouseSelection.fire(this.selectionText)}_refresh(){this._refreshAnimationFrame=void 0,this._onRedrawRequest.fire({start:this._model.finalSelectionStart,end:this._model.finalSelectionEnd,columnSelectMode:this._activeSelectionMode===3})}_isClickInSelection(j){const M=this._getMouseBufferCoords(j),D=this._model.finalSelectionStart,I=this._model.finalSelectionEnd;return!!(D&&I&&M)&&this._areCoordsInSelection(M,D,I)}isCellInSelection(j,M){const D=this._model.finalSelectionStart,I=this._model.finalSelectionEnd;return!(!D||!I)&&this._areCoordsInSelection([j,M],D,I)}_areCoordsInSelection(j,M,D){return j[1]>M[1]&&j[1]=M[0]&&j[0]=M[0]}_selectWordAtCursor(j,M){var P,U;const D=(U=(P=this._linkifier.currentLink)==null?void 0:P.link)==null?void 0:U.range;if(D)return this._model.selectionStart=[D.start.x-1,D.start.y-1],this._model.selectionStartLength=(0,w.getRangeLength)(D,this._bufferService.cols),this._model.selectionEnd=void 0,!0;const I=this._getMouseBufferCoords(j);return!!I&&(this._selectWordAt(I,M),this._model.selectionEnd=void 0,!0)}selectAll(){this._model.isSelectAllActive=!0,this.refresh(),this._onSelectionChange.fire()}selectLines(j,M){this._model.clearSelection(),j=Math.max(j,0),M=Math.min(M,this._bufferService.buffer.lines.length-1),this._model.selectionStart=[0,j],this._model.selectionEnd=[this._bufferService.cols,M],this.refresh(),this._onSelectionChange.fire()}_handleTrim(j){this._model.handleTrim(j)&&this.refresh()}_getMouseBufferCoords(j){const M=this._mouseService.getCoords(j,this._screenElement,this._bufferService.cols,this._bufferService.rows,!0);if(M)return M[0]--,M[1]--,M[1]+=this._bufferService.buffer.ydisp,M}_getMouseEventScrollAmount(j){let M=(0,_.getCoordsRelativeToElement)(this._coreBrowserService.window,j,this._screenElement)[1];const D=this._renderService.dimensions.css.canvas.height;return M>=0&&M<=D?0:(M>D&&(M-=D),M=Math.min(Math.max(M,-50),50),M/=50,M/Math.abs(M)+Math.round(14*M))}shouldForceSelection(j){return b.isMac?j.altKey&&this._optionsService.rawOptions.macOptionClickForcesSelection:j.shiftKey}handleMouseDown(j){if(this._mouseDownTimeStamp=j.timeStamp,(j.button!==2||!this.hasSelection)&&j.button===0){if(!this._enabled){if(!this.shouldForceSelection(j))return;j.stopPropagation()}j.preventDefault(),this._dragScrollAmount=0,this._enabled&&j.shiftKey?this._handleIncrementalClick(j):j.detail===1?this._handleSingleClick(j):j.detail===2?this._handleDoubleClick(j):j.detail===3&&this._handleTripleClick(j),this._addMouseDownListeners(),this.refresh(!0)}}_addMouseDownListeners(){this._screenElement.ownerDocument&&(this._screenElement.ownerDocument.addEventListener("mousemove",this._mouseMoveListener),this._screenElement.ownerDocument.addEventListener("mouseup",this._mouseUpListener)),this._dragScrollIntervalTimer=this._coreBrowserService.window.setInterval((()=>this._dragScroll()),50)}_removeMouseDownListeners(){this._screenElement.ownerDocument&&(this._screenElement.ownerDocument.removeEventListener("mousemove",this._mouseMoveListener),this._screenElement.ownerDocument.removeEventListener("mouseup",this._mouseUpListener)),this._coreBrowserService.window.clearInterval(this._dragScrollIntervalTimer),this._dragScrollIntervalTimer=void 0}_handleIncrementalClick(j){this._model.selectionStart&&(this._model.selectionEnd=this._getMouseBufferCoords(j))}_handleSingleClick(j){if(this._model.selectionStartLength=0,this._model.isSelectAllActive=!1,this._activeSelectionMode=this.shouldColumnSelect(j)?3:0,this._model.selectionStart=this._getMouseBufferCoords(j),!this._model.selectionStart)return;this._model.selectionEnd=void 0;const M=this._bufferService.buffer.lines.get(this._model.selectionStart[1]);M&&M.length!==this._model.selectionStart[0]&&M.hasWidth(this._model.selectionStart[0])===0&&this._model.selectionStart[0]++}_handleDoubleClick(j){this._selectWordAtCursor(j,!0)&&(this._activeSelectionMode=1)}_handleTripleClick(j){const M=this._getMouseBufferCoords(j);M&&(this._activeSelectionMode=2,this._selectLineAt(M[1]))}shouldColumnSelect(j){return j.altKey&&!(b.isMac&&this._optionsService.rawOptions.macOptionClickForcesSelection)}_handleMouseMove(j){if(j.stopImmediatePropagation(),!this._model.selectionStart)return;const M=this._model.selectionEnd?[this._model.selectionEnd[0],this._model.selectionEnd[1]]:null;if(this._model.selectionEnd=this._getMouseBufferCoords(j),!this._model.selectionEnd)return void this.refresh(!0);this._activeSelectionMode===2?this._model.selectionEnd[1]0?this._model.selectionEnd[0]=this._bufferService.cols:this._dragScrollAmount<0&&(this._model.selectionEnd[0]=0));const D=this._bufferService.buffer;if(this._model.selectionEnd[1]0?(this._activeSelectionMode!==3&&(this._model.selectionEnd[0]=this._bufferService.cols),this._model.selectionEnd[1]=Math.min(j.ydisp+this._bufferService.rows,j.lines.length-1)):(this._activeSelectionMode!==3&&(this._model.selectionEnd[0]=0),this._model.selectionEnd[1]=j.ydisp),this.refresh()}}_handleMouseUp(j){const M=j.timeStamp-this._mouseDownTimeStamp;if(this._removeMouseDownListeners(),this.selectionText.length<=1&&M<500&&j.altKey&&this._optionsService.rawOptions.altClickMovesCursor){if(this._bufferService.buffer.ybase===this._bufferService.buffer.ydisp){const D=this._mouseService.getCoords(j,this._element,this._bufferService.cols,this._bufferService.rows,!1);if(D&&D[0]!==void 0&&D[1]!==void 0){const I=(0,p.moveToCellSequence)(D[0]-1,D[1]-1,this._bufferService,this._coreService.decPrivateModes.applicationCursorKeys);this._coreService.triggerDataEvent(I,!0)}}}else this._fireEventIfSelectionChanged()}_fireEventIfSelectionChanged(){const j=this._model.finalSelectionStart,M=this._model.finalSelectionEnd,D=!(!j||!M||j[0]===M[0]&&j[1]===M[1]);D?j&&M&&(this._oldSelectionStart&&this._oldSelectionEnd&&j[0]===this._oldSelectionStart[0]&&j[1]===this._oldSelectionStart[1]&&M[0]===this._oldSelectionEnd[0]&&M[1]===this._oldSelectionEnd[1]||this._fireOnSelectionChange(j,M,D)):this._oldHasSelection&&this._fireOnSelectionChange(j,M,D)}_fireOnSelectionChange(j,M,D){this._oldSelectionStart=j,this._oldSelectionEnd=M,this._oldHasSelection=D,this._onSelectionChange.fire()}_handleBufferActivate(j){this.clearSelection(),this._trimListener.dispose(),this._trimListener=j.activeBuffer.lines.onTrim((M=>this._handleTrim(M)))}_convertViewportColToCharacterIndex(j,M){let D=M;for(let I=0;M>=I;I++){const P=j.loadCell(I,this._workCell).getChars().length;this._workCell.getWidth()===0?D--:P>1&&M!==I&&(D+=P-1)}return D}setSelection(j,M,D){this._model.clearSelection(),this._removeMouseDownListeners(),this._model.selectionStart=[j,M],this._model.selectionStartLength=D,this.refresh(),this._fireEventIfSelectionChanged()}rightClickSelect(j){this._isClickInSelection(j)||(this._selectWordAtCursor(j,!1)&&this.refresh(!0),this._fireEventIfSelectionChanged())}_getWordAt(j,M,D=!0,I=!0){if(j[0]>=this._bufferService.cols)return;const P=this._bufferService.buffer,U=P.lines.get(j[1]);if(!U)return;const q=P.translateBufferLineToString(j[1],!1);let W=this._convertViewportColToCharacterIndex(U,j[0]),H=W;const Y=j[0]-W;let te=0,$=0,L=0,F=0;if(q.charAt(W)===" "){for(;W>0&&q.charAt(W-1)===" ";)W--;for(;H1&&(F+=ae-1,H+=ae-1);ee>0&&W>0&&!this._isCharWordSeparator(U.loadCell(ee-1,this._workCell));){U.loadCell(ee-1,this._workCell);const se=this._workCell.getChars().length;this._workCell.getWidth()===0?(te++,ee--):se>1&&(L+=se-1,W-=se-1),W--,ee--}for(;ce1&&(F+=se-1,H+=se-1),H++,ce++}}H++;let G=W+Y-te+L,V=Math.min(this._bufferService.cols,H-W+te+$-L-F);if(M||q.slice(W,H).trim()!==""){if(D&&G===0&&U.getCodePoint(0)!==32){const ee=P.lines.get(j[1]-1);if(ee&&U.isWrapped&&ee.getCodePoint(this._bufferService.cols-1)!==32){const ce=this._getWordAt([this._bufferService.cols-1,j[1]-1],!1,!0,!1);if(ce){const ae=this._bufferService.cols-ce.start;G-=ae,V+=ae}}}if(I&&G+V===this._bufferService.cols&&U.getCodePoint(this._bufferService.cols-1)!==32){const ee=P.lines.get(j[1]+1);if(ee!=null&&ee.isWrapped&&ee.getCodePoint(0)!==32){const ce=this._getWordAt([0,j[1]+1],!1,!1,!0);ce&&(V+=ce.length)}}return{start:G,length:V}}}_selectWordAt(j,M){const D=this._getWordAt(j,M);if(D){for(;D.start<0;)D.start+=this._bufferService.cols,j[1]--;this._model.selectionStart=[D.start,j[1]],this._model.selectionStartLength=D.length}}_selectToWordAt(j){const M=this._getWordAt(j,!0);if(M){let D=j[1];for(;M.start<0;)M.start+=this._bufferService.cols,D--;if(!this._model.areSelectionValuesReversed())for(;M.start+M.length>this._bufferService.cols;)M.length-=this._bufferService.cols,D++;this._model.selectionEnd=[this._model.areSelectionValuesReversed()?M.start:M.start+M.length,D]}}_isCharWordSeparator(j){return j.getWidth()!==0&&this._optionsService.rawOptions.wordSeparator.indexOf(j.getChars())>=0}_selectLineAt(j){const M=this._bufferService.buffer.getWrappedRangeForLine(j),D={start:{x:0,y:M.first},end:{x:this._bufferService.cols-1,y:M.last}};this._model.selectionStart=[0,M.first],this._model.selectionEnd=void 0,this._model.selectionStartLength=(0,w.getRangeLength)(D,this._bufferService.cols)}};o.SelectionService=T=u([h(3,C.IBufferService),h(4,C.ICoreService),h(5,x.IMouseService),h(6,C.IOptionsService),h(7,x.IRenderService),h(8,x.ICoreBrowserService)],T)},4725:(a,o,l)=>{Object.defineProperty(o,"__esModule",{value:!0}),o.ILinkProviderService=o.IThemeService=o.ICharacterJoinerService=o.ISelectionService=o.IRenderService=o.IMouseService=o.ICoreBrowserService=o.ICharSizeService=void 0;const u=l(8343);o.ICharSizeService=(0,u.createDecorator)("CharSizeService"),o.ICoreBrowserService=(0,u.createDecorator)("CoreBrowserService"),o.IMouseService=(0,u.createDecorator)("MouseService"),o.IRenderService=(0,u.createDecorator)("RenderService"),o.ISelectionService=(0,u.createDecorator)("SelectionService"),o.ICharacterJoinerService=(0,u.createDecorator)("CharacterJoinerService"),o.IThemeService=(0,u.createDecorator)("ThemeService"),o.ILinkProviderService=(0,u.createDecorator)("LinkProviderService")},6731:function(a,o,l){var u=this&&this.__decorate||function(T,j,M,D){var I,P=arguments.length,U=P<3?j:D===null?D=Object.getOwnPropertyDescriptor(j,M):D;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")U=Reflect.decorate(T,j,M,D);else for(var q=T.length-1;q>=0;q--)(I=T[q])&&(U=(P<3?I(U):P>3?I(j,M,U):I(j,M))||U);return P>3&&U&&Object.defineProperty(j,M,U),U},h=this&&this.__param||function(T,j){return function(M,D){j(M,D,T)}};Object.defineProperty(o,"__esModule",{value:!0}),o.ThemeService=o.DEFAULT_ANSI_COLORS=void 0;const _=l(7239),p=l(8055),m=l(8460),x=l(844),k=l(2585),v=p.css.toColor("#ffffff"),b=p.css.toColor("#000000"),w=p.css.toColor("#ffffff"),y=p.css.toColor("#000000"),C={css:"rgba(255, 255, 255, 0.3)",rgba:4294967117};o.DEFAULT_ANSI_COLORS=Object.freeze((()=>{const T=[p.css.toColor("#2e3436"),p.css.toColor("#cc0000"),p.css.toColor("#4e9a06"),p.css.toColor("#c4a000"),p.css.toColor("#3465a4"),p.css.toColor("#75507b"),p.css.toColor("#06989a"),p.css.toColor("#d3d7cf"),p.css.toColor("#555753"),p.css.toColor("#ef2929"),p.css.toColor("#8ae234"),p.css.toColor("#fce94f"),p.css.toColor("#729fcf"),p.css.toColor("#ad7fa8"),p.css.toColor("#34e2e2"),p.css.toColor("#eeeeec")],j=[0,95,135,175,215,255];for(let M=0;M<216;M++){const D=j[M/36%6|0],I=j[M/6%6|0],P=j[M%6];T.push({css:p.channels.toCss(D,I,P),rgba:p.channels.toRgba(D,I,P)})}for(let M=0;M<24;M++){const D=8+10*M;T.push({css:p.channels.toCss(D,D,D),rgba:p.channels.toRgba(D,D,D)})}return T})());let N=o.ThemeService=class extends x.Disposable{get colors(){return this._colors}constructor(T){super(),this._optionsService=T,this._contrastCache=new _.ColorContrastCache,this._halfContrastCache=new _.ColorContrastCache,this._onChangeColors=this.register(new m.EventEmitter),this.onChangeColors=this._onChangeColors.event,this._colors={foreground:v,background:b,cursor:w,cursorAccent:y,selectionForeground:void 0,selectionBackgroundTransparent:C,selectionBackgroundOpaque:p.color.blend(b,C),selectionInactiveBackgroundTransparent:C,selectionInactiveBackgroundOpaque:p.color.blend(b,C),ansi:o.DEFAULT_ANSI_COLORS.slice(),contrastCache:this._contrastCache,halfContrastCache:this._halfContrastCache},this._updateRestoreColors(),this._setTheme(this._optionsService.rawOptions.theme),this.register(this._optionsService.onSpecificOptionChange("minimumContrastRatio",(()=>this._contrastCache.clear()))),this.register(this._optionsService.onSpecificOptionChange("theme",(()=>this._setTheme(this._optionsService.rawOptions.theme))))}_setTheme(T={}){const j=this._colors;if(j.foreground=E(T.foreground,v),j.background=E(T.background,b),j.cursor=E(T.cursor,w),j.cursorAccent=E(T.cursorAccent,y),j.selectionBackgroundTransparent=E(T.selectionBackground,C),j.selectionBackgroundOpaque=p.color.blend(j.background,j.selectionBackgroundTransparent),j.selectionInactiveBackgroundTransparent=E(T.selectionInactiveBackground,j.selectionBackgroundTransparent),j.selectionInactiveBackgroundOpaque=p.color.blend(j.background,j.selectionInactiveBackgroundTransparent),j.selectionForeground=T.selectionForeground?E(T.selectionForeground,p.NULL_COLOR):void 0,j.selectionForeground===p.NULL_COLOR&&(j.selectionForeground=void 0),p.color.isOpaque(j.selectionBackgroundTransparent)&&(j.selectionBackgroundTransparent=p.color.opacity(j.selectionBackgroundTransparent,.3)),p.color.isOpaque(j.selectionInactiveBackgroundTransparent)&&(j.selectionInactiveBackgroundTransparent=p.color.opacity(j.selectionInactiveBackgroundTransparent,.3)),j.ansi=o.DEFAULT_ANSI_COLORS.slice(),j.ansi[0]=E(T.black,o.DEFAULT_ANSI_COLORS[0]),j.ansi[1]=E(T.red,o.DEFAULT_ANSI_COLORS[1]),j.ansi[2]=E(T.green,o.DEFAULT_ANSI_COLORS[2]),j.ansi[3]=E(T.yellow,o.DEFAULT_ANSI_COLORS[3]),j.ansi[4]=E(T.blue,o.DEFAULT_ANSI_COLORS[4]),j.ansi[5]=E(T.magenta,o.DEFAULT_ANSI_COLORS[5]),j.ansi[6]=E(T.cyan,o.DEFAULT_ANSI_COLORS[6]),j.ansi[7]=E(T.white,o.DEFAULT_ANSI_COLORS[7]),j.ansi[8]=E(T.brightBlack,o.DEFAULT_ANSI_COLORS[8]),j.ansi[9]=E(T.brightRed,o.DEFAULT_ANSI_COLORS[9]),j.ansi[10]=E(T.brightGreen,o.DEFAULT_ANSI_COLORS[10]),j.ansi[11]=E(T.brightYellow,o.DEFAULT_ANSI_COLORS[11]),j.ansi[12]=E(T.brightBlue,o.DEFAULT_ANSI_COLORS[12]),j.ansi[13]=E(T.brightMagenta,o.DEFAULT_ANSI_COLORS[13]),j.ansi[14]=E(T.brightCyan,o.DEFAULT_ANSI_COLORS[14]),j.ansi[15]=E(T.brightWhite,o.DEFAULT_ANSI_COLORS[15]),T.extendedAnsi){const M=Math.min(j.ansi.length-16,T.extendedAnsi.length);for(let D=0;D{Object.defineProperty(o,"__esModule",{value:!0}),o.CircularList=void 0;const u=l(8460),h=l(844);class _ extends h.Disposable{constructor(m){super(),this._maxLength=m,this.onDeleteEmitter=this.register(new u.EventEmitter),this.onDelete=this.onDeleteEmitter.event,this.onInsertEmitter=this.register(new u.EventEmitter),this.onInsert=this.onInsertEmitter.event,this.onTrimEmitter=this.register(new u.EventEmitter),this.onTrim=this.onTrimEmitter.event,this._array=new Array(this._maxLength),this._startIndex=0,this._length=0}get maxLength(){return this._maxLength}set maxLength(m){if(this._maxLength===m)return;const x=new Array(m);for(let k=0;kthis._length)for(let x=this._length;x=m;v--)this._array[this._getCyclicIndex(v+k.length)]=this._array[this._getCyclicIndex(v)];for(let v=0;vthis._maxLength){const v=this._length+k.length-this._maxLength;this._startIndex+=v,this._length=this._maxLength,this.onTrimEmitter.fire(v)}else this._length+=k.length}trimStart(m){m>this._length&&(m=this._length),this._startIndex+=m,this._length-=m,this.onTrimEmitter.fire(m)}shiftElements(m,x,k){if(!(x<=0)){if(m<0||m>=this._length)throw new Error("start argument out of range");if(m+k<0)throw new Error("Cannot shift elements in list beyond index 0");if(k>0){for(let b=x-1;b>=0;b--)this.set(m+b+k,this.get(m+b));const v=m+x+k-this._length;if(v>0)for(this._length+=v;this._length>this._maxLength;)this._length--,this._startIndex++,this.onTrimEmitter.fire(1)}else for(let v=0;v{Object.defineProperty(o,"__esModule",{value:!0}),o.clone=void 0,o.clone=function l(u,h=5){if(typeof u!="object")return u;const _=Array.isArray(u)?[]:{};for(const p in u)_[p]=h<=1?u[p]:u[p]&&l(u[p],h-1);return _}},8055:(a,o)=>{Object.defineProperty(o,"__esModule",{value:!0}),o.contrastRatio=o.toPaddedHex=o.rgba=o.rgb=o.css=o.color=o.channels=o.NULL_COLOR=void 0;let l=0,u=0,h=0,_=0;var p,m,x,k,v;function b(y){const C=y.toString(16);return C.length<2?"0"+C:C}function w(y,C){return y>>0},y.toColor=function(C,N,E,T){return{css:y.toCss(C,N,E,T),rgba:y.toRgba(C,N,E,T)}}})(p||(o.channels=p={})),(function(y){function C(N,E){return _=Math.round(255*E),[l,u,h]=v.toChannels(N.rgba),{css:p.toCss(l,u,h,_),rgba:p.toRgba(l,u,h,_)}}y.blend=function(N,E){if(_=(255&E.rgba)/255,_===1)return{css:E.css,rgba:E.rgba};const T=E.rgba>>24&255,j=E.rgba>>16&255,M=E.rgba>>8&255,D=N.rgba>>24&255,I=N.rgba>>16&255,P=N.rgba>>8&255;return l=D+Math.round((T-D)*_),u=I+Math.round((j-I)*_),h=P+Math.round((M-P)*_),{css:p.toCss(l,u,h),rgba:p.toRgba(l,u,h)}},y.isOpaque=function(N){return(255&N.rgba)==255},y.ensureContrastRatio=function(N,E,T){const j=v.ensureContrastRatio(N.rgba,E.rgba,T);if(j)return p.toColor(j>>24&255,j>>16&255,j>>8&255)},y.opaque=function(N){const E=(255|N.rgba)>>>0;return[l,u,h]=v.toChannels(E),{css:p.toCss(l,u,h),rgba:E}},y.opacity=C,y.multiplyOpacity=function(N,E){return _=255&N.rgba,C(N,_*E/255)},y.toColorRGB=function(N){return[N.rgba>>24&255,N.rgba>>16&255,N.rgba>>8&255]}})(m||(o.color=m={})),(function(y){let C,N;try{const E=document.createElement("canvas");E.width=1,E.height=1;const T=E.getContext("2d",{willReadFrequently:!0});T&&(C=T,C.globalCompositeOperation="copy",N=C.createLinearGradient(0,0,1,1))}catch{}y.toColor=function(E){if(E.match(/#[\da-f]{3,8}/i))switch(E.length){case 4:return l=parseInt(E.slice(1,2).repeat(2),16),u=parseInt(E.slice(2,3).repeat(2),16),h=parseInt(E.slice(3,4).repeat(2),16),p.toColor(l,u,h);case 5:return l=parseInt(E.slice(1,2).repeat(2),16),u=parseInt(E.slice(2,3).repeat(2),16),h=parseInt(E.slice(3,4).repeat(2),16),_=parseInt(E.slice(4,5).repeat(2),16),p.toColor(l,u,h,_);case 7:return{css:E,rgba:(parseInt(E.slice(1),16)<<8|255)>>>0};case 9:return{css:E,rgba:parseInt(E.slice(1),16)>>>0}}const T=E.match(/rgba?\(\s*(\d{1,3})\s*,\s*(\d{1,3})\s*,\s*(\d{1,3})\s*(,\s*(0|1|\d?\.(\d+))\s*)?\)/);if(T)return l=parseInt(T[1]),u=parseInt(T[2]),h=parseInt(T[3]),_=Math.round(255*(T[5]===void 0?1:parseFloat(T[5]))),p.toColor(l,u,h,_);if(!C||!N)throw new Error("css.toColor: Unsupported css format");if(C.fillStyle=N,C.fillStyle=E,typeof C.fillStyle!="string")throw new Error("css.toColor: Unsupported css format");if(C.fillRect(0,0,1,1),[l,u,h,_]=C.getImageData(0,0,1,1).data,_!==255)throw new Error("css.toColor: Unsupported css format");return{rgba:p.toRgba(l,u,h,_),css:E}}})(x||(o.css=x={})),(function(y){function C(N,E,T){const j=N/255,M=E/255,D=T/255;return .2126*(j<=.03928?j/12.92:Math.pow((j+.055)/1.055,2.4))+.7152*(M<=.03928?M/12.92:Math.pow((M+.055)/1.055,2.4))+.0722*(D<=.03928?D/12.92:Math.pow((D+.055)/1.055,2.4))}y.relativeLuminance=function(N){return C(N>>16&255,N>>8&255,255&N)},y.relativeLuminance2=C})(k||(o.rgb=k={})),(function(y){function C(E,T,j){const M=E>>24&255,D=E>>16&255,I=E>>8&255;let P=T>>24&255,U=T>>16&255,q=T>>8&255,W=w(k.relativeLuminance2(P,U,q),k.relativeLuminance2(M,D,I));for(;W0||U>0||q>0);)P-=Math.max(0,Math.ceil(.1*P)),U-=Math.max(0,Math.ceil(.1*U)),q-=Math.max(0,Math.ceil(.1*q)),W=w(k.relativeLuminance2(P,U,q),k.relativeLuminance2(M,D,I));return(P<<24|U<<16|q<<8|255)>>>0}function N(E,T,j){const M=E>>24&255,D=E>>16&255,I=E>>8&255;let P=T>>24&255,U=T>>16&255,q=T>>8&255,W=w(k.relativeLuminance2(P,U,q),k.relativeLuminance2(M,D,I));for(;W>>0}y.blend=function(E,T){if(_=(255&T)/255,_===1)return T;const j=T>>24&255,M=T>>16&255,D=T>>8&255,I=E>>24&255,P=E>>16&255,U=E>>8&255;return l=I+Math.round((j-I)*_),u=P+Math.round((M-P)*_),h=U+Math.round((D-U)*_),p.toRgba(l,u,h)},y.ensureContrastRatio=function(E,T,j){const M=k.relativeLuminance(E>>8),D=k.relativeLuminance(T>>8);if(w(M,D)>8));if(qw(M,k.relativeLuminance(W>>8))?U:W}return U}const I=N(E,T,j),P=w(M,k.relativeLuminance(I>>8));if(Pw(M,k.relativeLuminance(U>>8))?I:U}return I}},y.reduceLuminance=C,y.increaseLuminance=N,y.toChannels=function(E){return[E>>24&255,E>>16&255,E>>8&255,255&E]}})(v||(o.rgba=v={})),o.toPaddedHex=b,o.contrastRatio=w},8969:(a,o,l)=>{Object.defineProperty(o,"__esModule",{value:!0}),o.CoreTerminal=void 0;const u=l(844),h=l(2585),_=l(4348),p=l(7866),m=l(744),x=l(7302),k=l(6975),v=l(8460),b=l(1753),w=l(1480),y=l(7994),C=l(9282),N=l(5435),E=l(5981),T=l(2660);let j=!1;class M extends u.Disposable{get onScroll(){return this._onScrollApi||(this._onScrollApi=this.register(new v.EventEmitter),this._onScroll.event((I=>{var P;(P=this._onScrollApi)==null||P.fire(I.position)}))),this._onScrollApi.event}get cols(){return this._bufferService.cols}get rows(){return this._bufferService.rows}get buffers(){return this._bufferService.buffers}get options(){return this.optionsService.options}set options(I){for(const P in I)this.optionsService.options[P]=I[P]}constructor(I){super(),this._windowsWrappingHeuristics=this.register(new u.MutableDisposable),this._onBinary=this.register(new v.EventEmitter),this.onBinary=this._onBinary.event,this._onData=this.register(new v.EventEmitter),this.onData=this._onData.event,this._onLineFeed=this.register(new v.EventEmitter),this.onLineFeed=this._onLineFeed.event,this._onResize=this.register(new v.EventEmitter),this.onResize=this._onResize.event,this._onWriteParsed=this.register(new v.EventEmitter),this.onWriteParsed=this._onWriteParsed.event,this._onScroll=this.register(new v.EventEmitter),this._instantiationService=new _.InstantiationService,this.optionsService=this.register(new x.OptionsService(I)),this._instantiationService.setService(h.IOptionsService,this.optionsService),this._bufferService=this.register(this._instantiationService.createInstance(m.BufferService)),this._instantiationService.setService(h.IBufferService,this._bufferService),this._logService=this.register(this._instantiationService.createInstance(p.LogService)),this._instantiationService.setService(h.ILogService,this._logService),this.coreService=this.register(this._instantiationService.createInstance(k.CoreService)),this._instantiationService.setService(h.ICoreService,this.coreService),this.coreMouseService=this.register(this._instantiationService.createInstance(b.CoreMouseService)),this._instantiationService.setService(h.ICoreMouseService,this.coreMouseService),this.unicodeService=this.register(this._instantiationService.createInstance(w.UnicodeService)),this._instantiationService.setService(h.IUnicodeService,this.unicodeService),this._charsetService=this._instantiationService.createInstance(y.CharsetService),this._instantiationService.setService(h.ICharsetService,this._charsetService),this._oscLinkService=this._instantiationService.createInstance(T.OscLinkService),this._instantiationService.setService(h.IOscLinkService,this._oscLinkService),this._inputHandler=this.register(new N.InputHandler(this._bufferService,this._charsetService,this.coreService,this._logService,this.optionsService,this._oscLinkService,this.coreMouseService,this.unicodeService)),this.register((0,v.forwardEvent)(this._inputHandler.onLineFeed,this._onLineFeed)),this.register(this._inputHandler),this.register((0,v.forwardEvent)(this._bufferService.onResize,this._onResize)),this.register((0,v.forwardEvent)(this.coreService.onData,this._onData)),this.register((0,v.forwardEvent)(this.coreService.onBinary,this._onBinary)),this.register(this.coreService.onRequestScrollToBottom((()=>this.scrollToBottom()))),this.register(this.coreService.onUserInput((()=>this._writeBuffer.handleUserInput()))),this.register(this.optionsService.onMultipleOptionChange(["windowsMode","windowsPty"],(()=>this._handleWindowsPtyOptionChange()))),this.register(this._bufferService.onScroll((P=>{this._onScroll.fire({position:this._bufferService.buffer.ydisp,source:0}),this._inputHandler.markRangeDirty(this._bufferService.buffer.scrollTop,this._bufferService.buffer.scrollBottom)}))),this.register(this._inputHandler.onScroll((P=>{this._onScroll.fire({position:this._bufferService.buffer.ydisp,source:0}),this._inputHandler.markRangeDirty(this._bufferService.buffer.scrollTop,this._bufferService.buffer.scrollBottom)}))),this._writeBuffer=this.register(new E.WriteBuffer(((P,U)=>this._inputHandler.parse(P,U)))),this.register((0,v.forwardEvent)(this._writeBuffer.onWriteParsed,this._onWriteParsed))}write(I,P){this._writeBuffer.write(I,P)}writeSync(I,P){this._logService.logLevel<=h.LogLevelEnum.WARN&&!j&&(this._logService.warn("writeSync is unreliable and will be removed soon."),j=!0),this._writeBuffer.writeSync(I,P)}input(I,P=!0){this.coreService.triggerDataEvent(I,P)}resize(I,P){isNaN(I)||isNaN(P)||(I=Math.max(I,m.MINIMUM_COLS),P=Math.max(P,m.MINIMUM_ROWS),this._bufferService.resize(I,P))}scroll(I,P=!1){this._bufferService.scroll(I,P)}scrollLines(I,P,U){this._bufferService.scrollLines(I,P,U)}scrollPages(I){this.scrollLines(I*(this.rows-1))}scrollToTop(){this.scrollLines(-this._bufferService.buffer.ydisp)}scrollToBottom(){this.scrollLines(this._bufferService.buffer.ybase-this._bufferService.buffer.ydisp)}scrollToLine(I){const P=I-this._bufferService.buffer.ydisp;P!==0&&this.scrollLines(P)}registerEscHandler(I,P){return this._inputHandler.registerEscHandler(I,P)}registerDcsHandler(I,P){return this._inputHandler.registerDcsHandler(I,P)}registerCsiHandler(I,P){return this._inputHandler.registerCsiHandler(I,P)}registerOscHandler(I,P){return this._inputHandler.registerOscHandler(I,P)}_setup(){this._handleWindowsPtyOptionChange()}reset(){this._inputHandler.reset(),this._bufferService.reset(),this._charsetService.reset(),this.coreService.reset(),this.coreMouseService.reset()}_handleWindowsPtyOptionChange(){let I=!1;const P=this.optionsService.rawOptions.windowsPty;P&&P.buildNumber!==void 0&&P.buildNumber!==void 0?I=P.backend==="conpty"&&P.buildNumber<21376:this.optionsService.rawOptions.windowsMode&&(I=!0),I?this._enableWindowsWrappingHeuristics():this._windowsWrappingHeuristics.clear()}_enableWindowsWrappingHeuristics(){if(!this._windowsWrappingHeuristics.value){const I=[];I.push(this.onLineFeed(C.updateWindowsModeWrappedState.bind(null,this._bufferService))),I.push(this.registerCsiHandler({final:"H"},(()=>((0,C.updateWindowsModeWrappedState)(this._bufferService),!1)))),this._windowsWrappingHeuristics.value=(0,u.toDisposable)((()=>{for(const P of I)P.dispose()}))}}}o.CoreTerminal=M},8460:(a,o)=>{Object.defineProperty(o,"__esModule",{value:!0}),o.runAndSubscribe=o.forwardEvent=o.EventEmitter=void 0,o.EventEmitter=class{constructor(){this._listeners=[],this._disposed=!1}get event(){return this._event||(this._event=l=>(this._listeners.push(l),{dispose:()=>{if(!this._disposed){for(let u=0;uu.fire(h)))},o.runAndSubscribe=function(l,u){return u(void 0),l((h=>u(h)))}},5435:function(a,o,l){var u=this&&this.__decorate||function(te,$,L,F){var G,V=arguments.length,ee=V<3?$:F===null?F=Object.getOwnPropertyDescriptor($,L):F;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")ee=Reflect.decorate(te,$,L,F);else for(var ce=te.length-1;ce>=0;ce--)(G=te[ce])&&(ee=(V<3?G(ee):V>3?G($,L,ee):G($,L))||ee);return V>3&&ee&&Object.defineProperty($,L,ee),ee},h=this&&this.__param||function(te,$){return function(L,F){$(L,F,te)}};Object.defineProperty(o,"__esModule",{value:!0}),o.InputHandler=o.WindowsOptionsReportType=void 0;const _=l(2584),p=l(7116),m=l(2015),x=l(844),k=l(482),v=l(8437),b=l(8460),w=l(643),y=l(511),C=l(3734),N=l(2585),E=l(1480),T=l(6242),j=l(6351),M=l(5941),D={"(":0,")":1,"*":2,"+":3,"-":1,".":2},I=131072;function P(te,$){if(te>24)return $.setWinLines||!1;switch(te){case 1:return!!$.restoreWin;case 2:return!!$.minimizeWin;case 3:return!!$.setWinPosition;case 4:return!!$.setWinSizePixels;case 5:return!!$.raiseWin;case 6:return!!$.lowerWin;case 7:return!!$.refreshWin;case 8:return!!$.setWinSizeChars;case 9:return!!$.maximizeWin;case 10:return!!$.fullscreenWin;case 11:return!!$.getWinState;case 13:return!!$.getWinPosition;case 14:return!!$.getWinSizePixels;case 15:return!!$.getScreenSizePixels;case 16:return!!$.getCellSizePixels;case 18:return!!$.getWinSizeChars;case 19:return!!$.getScreenSizeChars;case 20:return!!$.getIconTitle;case 21:return!!$.getWinTitle;case 22:return!!$.pushTitle;case 23:return!!$.popTitle;case 24:return!!$.setWinLines}return!1}var U;(function(te){te[te.GET_WIN_SIZE_PIXELS=0]="GET_WIN_SIZE_PIXELS",te[te.GET_CELL_SIZE_PIXELS=1]="GET_CELL_SIZE_PIXELS"})(U||(o.WindowsOptionsReportType=U={}));let q=0;class W extends x.Disposable{getAttrData(){return this._curAttrData}constructor($,L,F,G,V,ee,ce,ae,se=new m.EscapeSequenceParser){super(),this._bufferService=$,this._charsetService=L,this._coreService=F,this._logService=G,this._optionsService=V,this._oscLinkService=ee,this._coreMouseService=ce,this._unicodeService=ae,this._parser=se,this._parseBuffer=new Uint32Array(4096),this._stringDecoder=new k.StringToUtf32,this._utf8Decoder=new k.Utf8ToUtf32,this._workCell=new y.CellData,this._windowTitle="",this._iconName="",this._windowTitleStack=[],this._iconNameStack=[],this._curAttrData=v.DEFAULT_ATTR_DATA.clone(),this._eraseAttrDataInternal=v.DEFAULT_ATTR_DATA.clone(),this._onRequestBell=this.register(new b.EventEmitter),this.onRequestBell=this._onRequestBell.event,this._onRequestRefreshRows=this.register(new b.EventEmitter),this.onRequestRefreshRows=this._onRequestRefreshRows.event,this._onRequestReset=this.register(new b.EventEmitter),this.onRequestReset=this._onRequestReset.event,this._onRequestSendFocus=this.register(new b.EventEmitter),this.onRequestSendFocus=this._onRequestSendFocus.event,this._onRequestSyncScrollBar=this.register(new b.EventEmitter),this.onRequestSyncScrollBar=this._onRequestSyncScrollBar.event,this._onRequestWindowsOptionsReport=this.register(new b.EventEmitter),this.onRequestWindowsOptionsReport=this._onRequestWindowsOptionsReport.event,this._onA11yChar=this.register(new b.EventEmitter),this.onA11yChar=this._onA11yChar.event,this._onA11yTab=this.register(new b.EventEmitter),this.onA11yTab=this._onA11yTab.event,this._onCursorMove=this.register(new b.EventEmitter),this.onCursorMove=this._onCursorMove.event,this._onLineFeed=this.register(new b.EventEmitter),this.onLineFeed=this._onLineFeed.event,this._onScroll=this.register(new b.EventEmitter),this.onScroll=this._onScroll.event,this._onTitleChange=this.register(new b.EventEmitter),this.onTitleChange=this._onTitleChange.event,this._onColor=this.register(new b.EventEmitter),this.onColor=this._onColor.event,this._parseStack={paused:!1,cursorStartX:0,cursorStartY:0,decodedLength:0,position:0},this._specialColors=[256,257,258],this.register(this._parser),this._dirtyRowTracker=new H(this._bufferService),this._activeBuffer=this._bufferService.buffer,this.register(this._bufferService.buffers.onBufferActivate((X=>this._activeBuffer=X.activeBuffer))),this._parser.setCsiHandlerFallback(((X,oe)=>{this._logService.debug("Unknown CSI code: ",{identifier:this._parser.identToString(X),params:oe.toArray()})})),this._parser.setEscHandlerFallback((X=>{this._logService.debug("Unknown ESC code: ",{identifier:this._parser.identToString(X)})})),this._parser.setExecuteHandlerFallback((X=>{this._logService.debug("Unknown EXECUTE code: ",{code:X})})),this._parser.setOscHandlerFallback(((X,oe,le)=>{this._logService.debug("Unknown OSC code: ",{identifier:X,action:oe,data:le})})),this._parser.setDcsHandlerFallback(((X,oe,le)=>{oe==="HOOK"&&(le=le.toArray()),this._logService.debug("Unknown DCS code: ",{identifier:this._parser.identToString(X),action:oe,payload:le})})),this._parser.setPrintHandler(((X,oe,le)=>this.print(X,oe,le))),this._parser.registerCsiHandler({final:"@"},(X=>this.insertChars(X))),this._parser.registerCsiHandler({intermediates:" ",final:"@"},(X=>this.scrollLeft(X))),this._parser.registerCsiHandler({final:"A"},(X=>this.cursorUp(X))),this._parser.registerCsiHandler({intermediates:" ",final:"A"},(X=>this.scrollRight(X))),this._parser.registerCsiHandler({final:"B"},(X=>this.cursorDown(X))),this._parser.registerCsiHandler({final:"C"},(X=>this.cursorForward(X))),this._parser.registerCsiHandler({final:"D"},(X=>this.cursorBackward(X))),this._parser.registerCsiHandler({final:"E"},(X=>this.cursorNextLine(X))),this._parser.registerCsiHandler({final:"F"},(X=>this.cursorPrecedingLine(X))),this._parser.registerCsiHandler({final:"G"},(X=>this.cursorCharAbsolute(X))),this._parser.registerCsiHandler({final:"H"},(X=>this.cursorPosition(X))),this._parser.registerCsiHandler({final:"I"},(X=>this.cursorForwardTab(X))),this._parser.registerCsiHandler({final:"J"},(X=>this.eraseInDisplay(X,!1))),this._parser.registerCsiHandler({prefix:"?",final:"J"},(X=>this.eraseInDisplay(X,!0))),this._parser.registerCsiHandler({final:"K"},(X=>this.eraseInLine(X,!1))),this._parser.registerCsiHandler({prefix:"?",final:"K"},(X=>this.eraseInLine(X,!0))),this._parser.registerCsiHandler({final:"L"},(X=>this.insertLines(X))),this._parser.registerCsiHandler({final:"M"},(X=>this.deleteLines(X))),this._parser.registerCsiHandler({final:"P"},(X=>this.deleteChars(X))),this._parser.registerCsiHandler({final:"S"},(X=>this.scrollUp(X))),this._parser.registerCsiHandler({final:"T"},(X=>this.scrollDown(X))),this._parser.registerCsiHandler({final:"X"},(X=>this.eraseChars(X))),this._parser.registerCsiHandler({final:"Z"},(X=>this.cursorBackwardTab(X))),this._parser.registerCsiHandler({final:"`"},(X=>this.charPosAbsolute(X))),this._parser.registerCsiHandler({final:"a"},(X=>this.hPositionRelative(X))),this._parser.registerCsiHandler({final:"b"},(X=>this.repeatPrecedingCharacter(X))),this._parser.registerCsiHandler({final:"c"},(X=>this.sendDeviceAttributesPrimary(X))),this._parser.registerCsiHandler({prefix:">",final:"c"},(X=>this.sendDeviceAttributesSecondary(X))),this._parser.registerCsiHandler({final:"d"},(X=>this.linePosAbsolute(X))),this._parser.registerCsiHandler({final:"e"},(X=>this.vPositionRelative(X))),this._parser.registerCsiHandler({final:"f"},(X=>this.hVPosition(X))),this._parser.registerCsiHandler({final:"g"},(X=>this.tabClear(X))),this._parser.registerCsiHandler({final:"h"},(X=>this.setMode(X))),this._parser.registerCsiHandler({prefix:"?",final:"h"},(X=>this.setModePrivate(X))),this._parser.registerCsiHandler({final:"l"},(X=>this.resetMode(X))),this._parser.registerCsiHandler({prefix:"?",final:"l"},(X=>this.resetModePrivate(X))),this._parser.registerCsiHandler({final:"m"},(X=>this.charAttributes(X))),this._parser.registerCsiHandler({final:"n"},(X=>this.deviceStatus(X))),this._parser.registerCsiHandler({prefix:"?",final:"n"},(X=>this.deviceStatusPrivate(X))),this._parser.registerCsiHandler({intermediates:"!",final:"p"},(X=>this.softReset(X))),this._parser.registerCsiHandler({intermediates:" ",final:"q"},(X=>this.setCursorStyle(X))),this._parser.registerCsiHandler({final:"r"},(X=>this.setScrollRegion(X))),this._parser.registerCsiHandler({final:"s"},(X=>this.saveCursor(X))),this._parser.registerCsiHandler({final:"t"},(X=>this.windowOptions(X))),this._parser.registerCsiHandler({final:"u"},(X=>this.restoreCursor(X))),this._parser.registerCsiHandler({intermediates:"'",final:"}"},(X=>this.insertColumns(X))),this._parser.registerCsiHandler({intermediates:"'",final:"~"},(X=>this.deleteColumns(X))),this._parser.registerCsiHandler({intermediates:'"',final:"q"},(X=>this.selectProtected(X))),this._parser.registerCsiHandler({intermediates:"$",final:"p"},(X=>this.requestMode(X,!0))),this._parser.registerCsiHandler({prefix:"?",intermediates:"$",final:"p"},(X=>this.requestMode(X,!1))),this._parser.setExecuteHandler(_.C0.BEL,(()=>this.bell())),this._parser.setExecuteHandler(_.C0.LF,(()=>this.lineFeed())),this._parser.setExecuteHandler(_.C0.VT,(()=>this.lineFeed())),this._parser.setExecuteHandler(_.C0.FF,(()=>this.lineFeed())),this._parser.setExecuteHandler(_.C0.CR,(()=>this.carriageReturn())),this._parser.setExecuteHandler(_.C0.BS,(()=>this.backspace())),this._parser.setExecuteHandler(_.C0.HT,(()=>this.tab())),this._parser.setExecuteHandler(_.C0.SO,(()=>this.shiftOut())),this._parser.setExecuteHandler(_.C0.SI,(()=>this.shiftIn())),this._parser.setExecuteHandler(_.C1.IND,(()=>this.index())),this._parser.setExecuteHandler(_.C1.NEL,(()=>this.nextLine())),this._parser.setExecuteHandler(_.C1.HTS,(()=>this.tabSet())),this._parser.registerOscHandler(0,new T.OscHandler((X=>(this.setTitle(X),this.setIconName(X),!0)))),this._parser.registerOscHandler(1,new T.OscHandler((X=>this.setIconName(X)))),this._parser.registerOscHandler(2,new T.OscHandler((X=>this.setTitle(X)))),this._parser.registerOscHandler(4,new T.OscHandler((X=>this.setOrReportIndexedColor(X)))),this._parser.registerOscHandler(8,new T.OscHandler((X=>this.setHyperlink(X)))),this._parser.registerOscHandler(10,new T.OscHandler((X=>this.setOrReportFgColor(X)))),this._parser.registerOscHandler(11,new T.OscHandler((X=>this.setOrReportBgColor(X)))),this._parser.registerOscHandler(12,new T.OscHandler((X=>this.setOrReportCursorColor(X)))),this._parser.registerOscHandler(104,new T.OscHandler((X=>this.restoreIndexedColor(X)))),this._parser.registerOscHandler(110,new T.OscHandler((X=>this.restoreFgColor(X)))),this._parser.registerOscHandler(111,new T.OscHandler((X=>this.restoreBgColor(X)))),this._parser.registerOscHandler(112,new T.OscHandler((X=>this.restoreCursorColor(X)))),this._parser.registerEscHandler({final:"7"},(()=>this.saveCursor())),this._parser.registerEscHandler({final:"8"},(()=>this.restoreCursor())),this._parser.registerEscHandler({final:"D"},(()=>this.index())),this._parser.registerEscHandler({final:"E"},(()=>this.nextLine())),this._parser.registerEscHandler({final:"H"},(()=>this.tabSet())),this._parser.registerEscHandler({final:"M"},(()=>this.reverseIndex())),this._parser.registerEscHandler({final:"="},(()=>this.keypadApplicationMode())),this._parser.registerEscHandler({final:">"},(()=>this.keypadNumericMode())),this._parser.registerEscHandler({final:"c"},(()=>this.fullReset())),this._parser.registerEscHandler({final:"n"},(()=>this.setgLevel(2))),this._parser.registerEscHandler({final:"o"},(()=>this.setgLevel(3))),this._parser.registerEscHandler({final:"|"},(()=>this.setgLevel(3))),this._parser.registerEscHandler({final:"}"},(()=>this.setgLevel(2))),this._parser.registerEscHandler({final:"~"},(()=>this.setgLevel(1))),this._parser.registerEscHandler({intermediates:"%",final:"@"},(()=>this.selectDefaultCharset())),this._parser.registerEscHandler({intermediates:"%",final:"G"},(()=>this.selectDefaultCharset()));for(const X in p.CHARSETS)this._parser.registerEscHandler({intermediates:"(",final:X},(()=>this.selectCharset("("+X))),this._parser.registerEscHandler({intermediates:")",final:X},(()=>this.selectCharset(")"+X))),this._parser.registerEscHandler({intermediates:"*",final:X},(()=>this.selectCharset("*"+X))),this._parser.registerEscHandler({intermediates:"+",final:X},(()=>this.selectCharset("+"+X))),this._parser.registerEscHandler({intermediates:"-",final:X},(()=>this.selectCharset("-"+X))),this._parser.registerEscHandler({intermediates:".",final:X},(()=>this.selectCharset("."+X))),this._parser.registerEscHandler({intermediates:"/",final:X},(()=>this.selectCharset("/"+X)));this._parser.registerEscHandler({intermediates:"#",final:"8"},(()=>this.screenAlignmentPattern())),this._parser.setErrorHandler((X=>(this._logService.error("Parsing error: ",X),X))),this._parser.registerDcsHandler({intermediates:"$",final:"q"},new j.DcsHandler(((X,oe)=>this.requestStatusString(X,oe))))}_preserveStack($,L,F,G){this._parseStack.paused=!0,this._parseStack.cursorStartX=$,this._parseStack.cursorStartY=L,this._parseStack.decodedLength=F,this._parseStack.position=G}_logSlowResolvingAsync($){this._logService.logLevel<=N.LogLevelEnum.WARN&&Promise.race([$,new Promise(((L,F)=>setTimeout((()=>F("#SLOW_TIMEOUT")),5e3)))]).catch((L=>{if(L!=="#SLOW_TIMEOUT")throw L;console.warn("async parser handler taking longer than 5000 ms")}))}_getCurrentLinkId(){return this._curAttrData.extended.urlId}parse($,L){let F,G=this._activeBuffer.x,V=this._activeBuffer.y,ee=0;const ce=this._parseStack.paused;if(ce){if(F=this._parser.parse(this._parseBuffer,this._parseStack.decodedLength,L))return this._logSlowResolvingAsync(F),F;G=this._parseStack.cursorStartX,V=this._parseStack.cursorStartY,this._parseStack.paused=!1,$.length>I&&(ee=this._parseStack.position+I)}if(this._logService.logLevel<=N.LogLevelEnum.DEBUG&&this._logService.debug("parsing data"+(typeof $=="string"?` "${$}"`:` "${Array.prototype.map.call($,(X=>String.fromCharCode(X))).join("")}"`),typeof $=="string"?$.split("").map((X=>X.charCodeAt(0))):$),this._parseBuffer.length<$.length&&this._parseBuffer.lengthI)for(let X=ee;X<$.length;X+=I){const oe=X+I<$.length?X+I:$.length,le=typeof $=="string"?this._stringDecoder.decode($.substring(X,oe),this._parseBuffer):this._utf8Decoder.decode($.subarray(X,oe),this._parseBuffer);if(F=this._parser.parse(this._parseBuffer,le))return this._preserveStack(G,V,le,X),this._logSlowResolvingAsync(F),F}else if(!ce){const X=typeof $=="string"?this._stringDecoder.decode($,this._parseBuffer):this._utf8Decoder.decode($,this._parseBuffer);if(F=this._parser.parse(this._parseBuffer,X))return this._preserveStack(G,V,X,0),this._logSlowResolvingAsync(F),F}this._activeBuffer.x===G&&this._activeBuffer.y===V||this._onCursorMove.fire();const ae=this._dirtyRowTracker.end+(this._bufferService.buffer.ybase-this._bufferService.buffer.ydisp),se=this._dirtyRowTracker.start+(this._bufferService.buffer.ybase-this._bufferService.buffer.ydisp);se0&&le.getWidth(this._activeBuffer.x-1)===2&&le.setCellFromCodepoint(this._activeBuffer.x-1,0,1,oe);let _e=this._parser.precedingJoinState;for(let pe=L;peae){if(se){const He=le;let Oe=this._activeBuffer.x-ze;for(this._activeBuffer.x=ze,this._activeBuffer.y++,this._activeBuffer.y===this._activeBuffer.scrollBottom+1?(this._activeBuffer.y--,this._bufferService.scroll(this._eraseAttrData(),!0)):(this._activeBuffer.y>=this._bufferService.rows&&(this._activeBuffer.y=this._bufferService.rows-1),this._activeBuffer.lines.get(this._activeBuffer.ybase+this._activeBuffer.y).isWrapped=!0),le=this._activeBuffer.lines.get(this._activeBuffer.ybase+this._activeBuffer.y),ze>0&&le instanceof v.BufferLine&&le.copyCellsFrom(He,Oe,0,ze,!1);Oe=0;)le.setCellFromCodepoint(this._activeBuffer.x++,0,0,oe)}else if(X&&(le.insertCells(this._activeBuffer.x,V-ze,this._activeBuffer.getNullCell(oe)),le.getWidth(ae-1)===2&&le.setCellFromCodepoint(ae-1,w.NULL_CELL_CODE,w.NULL_CELL_WIDTH,oe)),le.setCellFromCodepoint(this._activeBuffer.x++,G,V,oe),V>0)for(;--V;)le.setCellFromCodepoint(this._activeBuffer.x++,0,0,oe)}this._parser.precedingJoinState=_e,this._activeBuffer.x0&&le.getWidth(this._activeBuffer.x)===0&&!le.hasContent(this._activeBuffer.x)&&le.setCellFromCodepoint(this._activeBuffer.x,0,1,oe),this._dirtyRowTracker.markDirty(this._activeBuffer.y)}registerCsiHandler($,L){return $.final!=="t"||$.prefix||$.intermediates?this._parser.registerCsiHandler($,L):this._parser.registerCsiHandler($,(F=>!P(F.params[0],this._optionsService.rawOptions.windowOptions)||L(F)))}registerDcsHandler($,L){return this._parser.registerDcsHandler($,new j.DcsHandler(L))}registerEscHandler($,L){return this._parser.registerEscHandler($,L)}registerOscHandler($,L){return this._parser.registerOscHandler($,new T.OscHandler(L))}bell(){return this._onRequestBell.fire(),!0}lineFeed(){return this._dirtyRowTracker.markDirty(this._activeBuffer.y),this._optionsService.rawOptions.convertEol&&(this._activeBuffer.x=0),this._activeBuffer.y++,this._activeBuffer.y===this._activeBuffer.scrollBottom+1?(this._activeBuffer.y--,this._bufferService.scroll(this._eraseAttrData())):this._activeBuffer.y>=this._bufferService.rows?this._activeBuffer.y=this._bufferService.rows-1:this._activeBuffer.lines.get(this._activeBuffer.ybase+this._activeBuffer.y).isWrapped=!1,this._activeBuffer.x>=this._bufferService.cols&&this._activeBuffer.x--,this._dirtyRowTracker.markDirty(this._activeBuffer.y),this._onLineFeed.fire(),!0}carriageReturn(){return this._activeBuffer.x=0,!0}backspace(){var $;if(!this._coreService.decPrivateModes.reverseWraparound)return this._restrictCursor(),this._activeBuffer.x>0&&this._activeBuffer.x--,!0;if(this._restrictCursor(this._bufferService.cols),this._activeBuffer.x>0)this._activeBuffer.x--;else if(this._activeBuffer.x===0&&this._activeBuffer.y>this._activeBuffer.scrollTop&&this._activeBuffer.y<=this._activeBuffer.scrollBottom&&(($=this._activeBuffer.lines.get(this._activeBuffer.ybase+this._activeBuffer.y))!=null&&$.isWrapped)){this._activeBuffer.lines.get(this._activeBuffer.ybase+this._activeBuffer.y).isWrapped=!1,this._activeBuffer.y--,this._activeBuffer.x=this._bufferService.cols-1;const L=this._activeBuffer.lines.get(this._activeBuffer.ybase+this._activeBuffer.y);L.hasWidth(this._activeBuffer.x)&&!L.hasContent(this._activeBuffer.x)&&this._activeBuffer.x--}return this._restrictCursor(),!0}tab(){if(this._activeBuffer.x>=this._bufferService.cols)return!0;const $=this._activeBuffer.x;return this._activeBuffer.x=this._activeBuffer.nextStop(),this._optionsService.rawOptions.screenReaderMode&&this._onA11yTab.fire(this._activeBuffer.x-$),!0}shiftOut(){return this._charsetService.setgLevel(1),!0}shiftIn(){return this._charsetService.setgLevel(0),!0}_restrictCursor($=this._bufferService.cols-1){this._activeBuffer.x=Math.min($,Math.max(0,this._activeBuffer.x)),this._activeBuffer.y=this._coreService.decPrivateModes.origin?Math.min(this._activeBuffer.scrollBottom,Math.max(this._activeBuffer.scrollTop,this._activeBuffer.y)):Math.min(this._bufferService.rows-1,Math.max(0,this._activeBuffer.y)),this._dirtyRowTracker.markDirty(this._activeBuffer.y)}_setCursor($,L){this._dirtyRowTracker.markDirty(this._activeBuffer.y),this._coreService.decPrivateModes.origin?(this._activeBuffer.x=$,this._activeBuffer.y=this._activeBuffer.scrollTop+L):(this._activeBuffer.x=$,this._activeBuffer.y=L),this._restrictCursor(),this._dirtyRowTracker.markDirty(this._activeBuffer.y)}_moveCursor($,L){this._restrictCursor(),this._setCursor(this._activeBuffer.x+$,this._activeBuffer.y+L)}cursorUp($){const L=this._activeBuffer.y-this._activeBuffer.scrollTop;return L>=0?this._moveCursor(0,-Math.min(L,$.params[0]||1)):this._moveCursor(0,-($.params[0]||1)),!0}cursorDown($){const L=this._activeBuffer.scrollBottom-this._activeBuffer.y;return L>=0?this._moveCursor(0,Math.min(L,$.params[0]||1)):this._moveCursor(0,$.params[0]||1),!0}cursorForward($){return this._moveCursor($.params[0]||1,0),!0}cursorBackward($){return this._moveCursor(-($.params[0]||1),0),!0}cursorNextLine($){return this.cursorDown($),this._activeBuffer.x=0,!0}cursorPrecedingLine($){return this.cursorUp($),this._activeBuffer.x=0,!0}cursorCharAbsolute($){return this._setCursor(($.params[0]||1)-1,this._activeBuffer.y),!0}cursorPosition($){return this._setCursor($.length>=2?($.params[1]||1)-1:0,($.params[0]||1)-1),!0}charPosAbsolute($){return this._setCursor(($.params[0]||1)-1,this._activeBuffer.y),!0}hPositionRelative($){return this._moveCursor($.params[0]||1,0),!0}linePosAbsolute($){return this._setCursor(this._activeBuffer.x,($.params[0]||1)-1),!0}vPositionRelative($){return this._moveCursor(0,$.params[0]||1),!0}hVPosition($){return this.cursorPosition($),!0}tabClear($){const L=$.params[0];return L===0?delete this._activeBuffer.tabs[this._activeBuffer.x]:L===3&&(this._activeBuffer.tabs={}),!0}cursorForwardTab($){if(this._activeBuffer.x>=this._bufferService.cols)return!0;let L=$.params[0]||1;for(;L--;)this._activeBuffer.x=this._activeBuffer.nextStop();return!0}cursorBackwardTab($){if(this._activeBuffer.x>=this._bufferService.cols)return!0;let L=$.params[0]||1;for(;L--;)this._activeBuffer.x=this._activeBuffer.prevStop();return!0}selectProtected($){const L=$.params[0];return L===1&&(this._curAttrData.bg|=536870912),L!==2&&L!==0||(this._curAttrData.bg&=-536870913),!0}_eraseInBufferLine($,L,F,G=!1,V=!1){const ee=this._activeBuffer.lines.get(this._activeBuffer.ybase+$);ee.replaceCells(L,F,this._activeBuffer.getNullCell(this._eraseAttrData()),V),G&&(ee.isWrapped=!1)}_resetBufferLine($,L=!1){const F=this._activeBuffer.lines.get(this._activeBuffer.ybase+$);F&&(F.fill(this._activeBuffer.getNullCell(this._eraseAttrData()),L),this._bufferService.buffer.clearMarkers(this._activeBuffer.ybase+$),F.isWrapped=!1)}eraseInDisplay($,L=!1){let F;switch(this._restrictCursor(this._bufferService.cols),$.params[0]){case 0:for(F=this._activeBuffer.y,this._dirtyRowTracker.markDirty(F),this._eraseInBufferLine(F++,this._activeBuffer.x,this._bufferService.cols,this._activeBuffer.x===0,L);F=this._bufferService.cols&&(this._activeBuffer.lines.get(F+1).isWrapped=!1);F--;)this._resetBufferLine(F,L);this._dirtyRowTracker.markDirty(0);break;case 2:for(F=this._bufferService.rows,this._dirtyRowTracker.markDirty(F-1);F--;)this._resetBufferLine(F,L);this._dirtyRowTracker.markDirty(0);break;case 3:const G=this._activeBuffer.lines.length-this._bufferService.rows;G>0&&(this._activeBuffer.lines.trimStart(G),this._activeBuffer.ybase=Math.max(this._activeBuffer.ybase-G,0),this._activeBuffer.ydisp=Math.max(this._activeBuffer.ydisp-G,0),this._onScroll.fire(0))}return!0}eraseInLine($,L=!1){switch(this._restrictCursor(this._bufferService.cols),$.params[0]){case 0:this._eraseInBufferLine(this._activeBuffer.y,this._activeBuffer.x,this._bufferService.cols,this._activeBuffer.x===0,L);break;case 1:this._eraseInBufferLine(this._activeBuffer.y,0,this._activeBuffer.x+1,!1,L);break;case 2:this._eraseInBufferLine(this._activeBuffer.y,0,this._bufferService.cols,!0,L)}return this._dirtyRowTracker.markDirty(this._activeBuffer.y),!0}insertLines($){this._restrictCursor();let L=$.params[0]||1;if(this._activeBuffer.y>this._activeBuffer.scrollBottom||this._activeBuffer.ythis._activeBuffer.scrollBottom||this._activeBuffer.ythis._activeBuffer.scrollBottom||this._activeBuffer.ythis._activeBuffer.scrollBottom||this._activeBuffer.ythis._activeBuffer.scrollBottom||this._activeBuffer.ythis._activeBuffer.scrollBottom||this._activeBuffer.y65535?2:1}let se=ae;for(let X=1;X0||(this._is("xterm")||this._is("rxvt-unicode")||this._is("screen")?this._coreService.triggerDataEvent(_.C0.ESC+"[?1;2c"):this._is("linux")&&this._coreService.triggerDataEvent(_.C0.ESC+"[?6c")),!0}sendDeviceAttributesSecondary($){return $.params[0]>0||(this._is("xterm")?this._coreService.triggerDataEvent(_.C0.ESC+"[>0;276;0c"):this._is("rxvt-unicode")?this._coreService.triggerDataEvent(_.C0.ESC+"[>85;95;0c"):this._is("linux")?this._coreService.triggerDataEvent($.params[0]+"c"):this._is("screen")&&this._coreService.triggerDataEvent(_.C0.ESC+"[>83;40003;0c")),!0}_is($){return(this._optionsService.rawOptions.termName+"").indexOf($)===0}setMode($){for(let L=0;L<$.length;L++)switch($.params[L]){case 4:this._coreService.modes.insertMode=!0;break;case 20:this._optionsService.options.convertEol=!0}return!0}setModePrivate($){for(let L=0;L<$.length;L++)switch($.params[L]){case 1:this._coreService.decPrivateModes.applicationCursorKeys=!0;break;case 2:this._charsetService.setgCharset(0,p.DEFAULT_CHARSET),this._charsetService.setgCharset(1,p.DEFAULT_CHARSET),this._charsetService.setgCharset(2,p.DEFAULT_CHARSET),this._charsetService.setgCharset(3,p.DEFAULT_CHARSET);break;case 3:this._optionsService.rawOptions.windowOptions.setWinLines&&(this._bufferService.resize(132,this._bufferService.rows),this._onRequestReset.fire());break;case 6:this._coreService.decPrivateModes.origin=!0,this._setCursor(0,0);break;case 7:this._coreService.decPrivateModes.wraparound=!0;break;case 12:this._optionsService.options.cursorBlink=!0;break;case 45:this._coreService.decPrivateModes.reverseWraparound=!0;break;case 66:this._logService.debug("Serial port requested application keypad."),this._coreService.decPrivateModes.applicationKeypad=!0,this._onRequestSyncScrollBar.fire();break;case 9:this._coreMouseService.activeProtocol="X10";break;case 1e3:this._coreMouseService.activeProtocol="VT200";break;case 1002:this._coreMouseService.activeProtocol="DRAG";break;case 1003:this._coreMouseService.activeProtocol="ANY";break;case 1004:this._coreService.decPrivateModes.sendFocus=!0,this._onRequestSendFocus.fire();break;case 1005:this._logService.debug("DECSET 1005 not supported (see #2507)");break;case 1006:this._coreMouseService.activeEncoding="SGR";break;case 1015:this._logService.debug("DECSET 1015 not supported (see #2507)");break;case 1016:this._coreMouseService.activeEncoding="SGR_PIXELS";break;case 25:this._coreService.isCursorHidden=!1;break;case 1048:this.saveCursor();break;case 1049:this.saveCursor();case 47:case 1047:this._bufferService.buffers.activateAltBuffer(this._eraseAttrData()),this._coreService.isCursorInitialized=!0,this._onRequestRefreshRows.fire(0,this._bufferService.rows-1),this._onRequestSyncScrollBar.fire();break;case 2004:this._coreService.decPrivateModes.bracketedPasteMode=!0}return!0}resetMode($){for(let L=0;L<$.length;L++)switch($.params[L]){case 4:this._coreService.modes.insertMode=!1;break;case 20:this._optionsService.options.convertEol=!1}return!0}resetModePrivate($){for(let L=0;L<$.length;L++)switch($.params[L]){case 1:this._coreService.decPrivateModes.applicationCursorKeys=!1;break;case 3:this._optionsService.rawOptions.windowOptions.setWinLines&&(this._bufferService.resize(80,this._bufferService.rows),this._onRequestReset.fire());break;case 6:this._coreService.decPrivateModes.origin=!1,this._setCursor(0,0);break;case 7:this._coreService.decPrivateModes.wraparound=!1;break;case 12:this._optionsService.options.cursorBlink=!1;break;case 45:this._coreService.decPrivateModes.reverseWraparound=!1;break;case 66:this._logService.debug("Switching back to normal keypad."),this._coreService.decPrivateModes.applicationKeypad=!1,this._onRequestSyncScrollBar.fire();break;case 9:case 1e3:case 1002:case 1003:this._coreMouseService.activeProtocol="NONE";break;case 1004:this._coreService.decPrivateModes.sendFocus=!1;break;case 1005:this._logService.debug("DECRST 1005 not supported (see #2507)");break;case 1006:case 1016:this._coreMouseService.activeEncoding="DEFAULT";break;case 1015:this._logService.debug("DECRST 1015 not supported (see #2507)");break;case 25:this._coreService.isCursorHidden=!0;break;case 1048:this.restoreCursor();break;case 1049:case 47:case 1047:this._bufferService.buffers.activateNormalBuffer(),$.params[L]===1049&&this.restoreCursor(),this._coreService.isCursorInitialized=!0,this._onRequestRefreshRows.fire(0,this._bufferService.rows-1),this._onRequestSyncScrollBar.fire();break;case 2004:this._coreService.decPrivateModes.bracketedPasteMode=!1}return!0}requestMode($,L){const F=this._coreService.decPrivateModes,{activeProtocol:G,activeEncoding:V}=this._coreMouseService,ee=this._coreService,{buffers:ce,cols:ae}=this._bufferService,{active:se,alt:X}=ce,oe=this._optionsService.rawOptions,le=Ie=>Ie?1:2,_e=$.params[0];return pe=_e,Ee=L?_e===2?4:_e===4?le(ee.modes.insertMode):_e===12?3:_e===20?le(oe.convertEol):0:_e===1?le(F.applicationCursorKeys):_e===3?oe.windowOptions.setWinLines?ae===80?2:ae===132?1:0:0:_e===6?le(F.origin):_e===7?le(F.wraparound):_e===8?3:_e===9?le(G==="X10"):_e===12?le(oe.cursorBlink):_e===25?le(!ee.isCursorHidden):_e===45?le(F.reverseWraparound):_e===66?le(F.applicationKeypad):_e===67?4:_e===1e3?le(G==="VT200"):_e===1002?le(G==="DRAG"):_e===1003?le(G==="ANY"):_e===1004?le(F.sendFocus):_e===1005?4:_e===1006?le(V==="SGR"):_e===1015?4:_e===1016?le(V==="SGR_PIXELS"):_e===1048?1:_e===47||_e===1047||_e===1049?le(se===X):_e===2004?le(F.bracketedPasteMode):0,ee.triggerDataEvent(`${_.C0.ESC}[${L?"":"?"}${pe};${Ee}$y`),!0;var pe,Ee}_updateAttrColor($,L,F,G,V){return L===2?($|=50331648,$&=-16777216,$|=C.AttributeData.fromColorRGB([F,G,V])):L===5&&($&=-50331904,$|=33554432|255&F),$}_extractColor($,L,F){const G=[0,0,-1,0,0,0];let V=0,ee=0;do{if(G[ee+V]=$.params[L+ee],$.hasSubParams(L+ee)){const ce=$.getSubParams(L+ee);let ae=0;do G[1]===5&&(V=1),G[ee+ae+1+V]=ce[ae];while(++ae=2||G[1]===2&&ee+V>=5)break;G[1]&&(V=1)}while(++ee+L<$.length&&ee+V5)&&($=1),L.extended.underlineStyle=$,L.fg|=268435456,$===0&&(L.fg&=-268435457),L.updateExtended()}_processSGR0($){$.fg=v.DEFAULT_ATTR_DATA.fg,$.bg=v.DEFAULT_ATTR_DATA.bg,$.extended=$.extended.clone(),$.extended.underlineStyle=0,$.extended.underlineColor&=-67108864,$.updateExtended()}charAttributes($){if($.length===1&&$.params[0]===0)return this._processSGR0(this._curAttrData),!0;const L=$.length;let F;const G=this._curAttrData;for(let V=0;V=30&&F<=37?(G.fg&=-50331904,G.fg|=16777216|F-30):F>=40&&F<=47?(G.bg&=-50331904,G.bg|=16777216|F-40):F>=90&&F<=97?(G.fg&=-50331904,G.fg|=16777224|F-90):F>=100&&F<=107?(G.bg&=-50331904,G.bg|=16777224|F-100):F===0?this._processSGR0(G):F===1?G.fg|=134217728:F===3?G.bg|=67108864:F===4?(G.fg|=268435456,this._processUnderline($.hasSubParams(V)?$.getSubParams(V)[0]:1,G)):F===5?G.fg|=536870912:F===7?G.fg|=67108864:F===8?G.fg|=1073741824:F===9?G.fg|=2147483648:F===2?G.bg|=134217728:F===21?this._processUnderline(2,G):F===22?(G.fg&=-134217729,G.bg&=-134217729):F===23?G.bg&=-67108865:F===24?(G.fg&=-268435457,this._processUnderline(0,G)):F===25?G.fg&=-536870913:F===27?G.fg&=-67108865:F===28?G.fg&=-1073741825:F===29?G.fg&=2147483647:F===39?(G.fg&=-67108864,G.fg|=16777215&v.DEFAULT_ATTR_DATA.fg):F===49?(G.bg&=-67108864,G.bg|=16777215&v.DEFAULT_ATTR_DATA.bg):F===38||F===48||F===58?V+=this._extractColor($,V,G):F===53?G.bg|=1073741824:F===55?G.bg&=-1073741825:F===59?(G.extended=G.extended.clone(),G.extended.underlineColor=-1,G.updateExtended()):F===100?(G.fg&=-67108864,G.fg|=16777215&v.DEFAULT_ATTR_DATA.fg,G.bg&=-67108864,G.bg|=16777215&v.DEFAULT_ATTR_DATA.bg):this._logService.debug("Unknown SGR attribute: %d.",F);return!0}deviceStatus($){switch($.params[0]){case 5:this._coreService.triggerDataEvent(`${_.C0.ESC}[0n`);break;case 6:const L=this._activeBuffer.y+1,F=this._activeBuffer.x+1;this._coreService.triggerDataEvent(`${_.C0.ESC}[${L};${F}R`)}return!0}deviceStatusPrivate($){if($.params[0]===6){const L=this._activeBuffer.y+1,F=this._activeBuffer.x+1;this._coreService.triggerDataEvent(`${_.C0.ESC}[?${L};${F}R`)}return!0}softReset($){return this._coreService.isCursorHidden=!1,this._onRequestSyncScrollBar.fire(),this._activeBuffer.scrollTop=0,this._activeBuffer.scrollBottom=this._bufferService.rows-1,this._curAttrData=v.DEFAULT_ATTR_DATA.clone(),this._coreService.reset(),this._charsetService.reset(),this._activeBuffer.savedX=0,this._activeBuffer.savedY=this._activeBuffer.ybase,this._activeBuffer.savedCurAttrData.fg=this._curAttrData.fg,this._activeBuffer.savedCurAttrData.bg=this._curAttrData.bg,this._activeBuffer.savedCharset=this._charsetService.charset,this._coreService.decPrivateModes.origin=!1,!0}setCursorStyle($){const L=$.params[0]||1;switch(L){case 1:case 2:this._optionsService.options.cursorStyle="block";break;case 3:case 4:this._optionsService.options.cursorStyle="underline";break;case 5:case 6:this._optionsService.options.cursorStyle="bar"}const F=L%2==1;return this._optionsService.options.cursorBlink=F,!0}setScrollRegion($){const L=$.params[0]||1;let F;return($.length<2||(F=$.params[1])>this._bufferService.rows||F===0)&&(F=this._bufferService.rows),F>L&&(this._activeBuffer.scrollTop=L-1,this._activeBuffer.scrollBottom=F-1,this._setCursor(0,0)),!0}windowOptions($){if(!P($.params[0],this._optionsService.rawOptions.windowOptions))return!0;const L=$.length>1?$.params[1]:0;switch($.params[0]){case 14:L!==2&&this._onRequestWindowsOptionsReport.fire(U.GET_WIN_SIZE_PIXELS);break;case 16:this._onRequestWindowsOptionsReport.fire(U.GET_CELL_SIZE_PIXELS);break;case 18:this._bufferService&&this._coreService.triggerDataEvent(`${_.C0.ESC}[8;${this._bufferService.rows};${this._bufferService.cols}t`);break;case 22:L!==0&&L!==2||(this._windowTitleStack.push(this._windowTitle),this._windowTitleStack.length>10&&this._windowTitleStack.shift()),L!==0&&L!==1||(this._iconNameStack.push(this._iconName),this._iconNameStack.length>10&&this._iconNameStack.shift());break;case 23:L!==0&&L!==2||this._windowTitleStack.length&&this.setTitle(this._windowTitleStack.pop()),L!==0&&L!==1||this._iconNameStack.length&&this.setIconName(this._iconNameStack.pop())}return!0}saveCursor($){return this._activeBuffer.savedX=this._activeBuffer.x,this._activeBuffer.savedY=this._activeBuffer.ybase+this._activeBuffer.y,this._activeBuffer.savedCurAttrData.fg=this._curAttrData.fg,this._activeBuffer.savedCurAttrData.bg=this._curAttrData.bg,this._activeBuffer.savedCharset=this._charsetService.charset,!0}restoreCursor($){return this._activeBuffer.x=this._activeBuffer.savedX||0,this._activeBuffer.y=Math.max(this._activeBuffer.savedY-this._activeBuffer.ybase,0),this._curAttrData.fg=this._activeBuffer.savedCurAttrData.fg,this._curAttrData.bg=this._activeBuffer.savedCurAttrData.bg,this._charsetService.charset=this._savedCharset,this._activeBuffer.savedCharset&&(this._charsetService.charset=this._activeBuffer.savedCharset),this._restrictCursor(),!0}setTitle($){return this._windowTitle=$,this._onTitleChange.fire($),!0}setIconName($){return this._iconName=$,!0}setOrReportIndexedColor($){const L=[],F=$.split(";");for(;F.length>1;){const G=F.shift(),V=F.shift();if(/^\d+$/.exec(G)){const ee=parseInt(G);if(Y(ee))if(V==="?")L.push({type:0,index:ee});else{const ce=(0,M.parseColor)(V);ce&&L.push({type:1,index:ee,color:ce})}}}return L.length&&this._onColor.fire(L),!0}setHyperlink($){const L=$.split(";");return!(L.length<2)&&(L[1]?this._createHyperlink(L[0],L[1]):!L[0]&&this._finishHyperlink())}_createHyperlink($,L){this._getCurrentLinkId()&&this._finishHyperlink();const F=$.split(":");let G;const V=F.findIndex((ee=>ee.startsWith("id=")));return V!==-1&&(G=F[V].slice(3)||void 0),this._curAttrData.extended=this._curAttrData.extended.clone(),this._curAttrData.extended.urlId=this._oscLinkService.registerLink({id:G,uri:L}),this._curAttrData.updateExtended(),!0}_finishHyperlink(){return this._curAttrData.extended=this._curAttrData.extended.clone(),this._curAttrData.extended.urlId=0,this._curAttrData.updateExtended(),!0}_setOrReportSpecialColor($,L){const F=$.split(";");for(let G=0;G=this._specialColors.length);++G,++L)if(F[G]==="?")this._onColor.fire([{type:0,index:this._specialColors[L]}]);else{const V=(0,M.parseColor)(F[G]);V&&this._onColor.fire([{type:1,index:this._specialColors[L],color:V}])}return!0}setOrReportFgColor($){return this._setOrReportSpecialColor($,0)}setOrReportBgColor($){return this._setOrReportSpecialColor($,1)}setOrReportCursorColor($){return this._setOrReportSpecialColor($,2)}restoreIndexedColor($){if(!$)return this._onColor.fire([{type:2}]),!0;const L=[],F=$.split(";");for(let G=0;G=this._bufferService.rows&&(this._activeBuffer.y=this._bufferService.rows-1),this._restrictCursor(),!0}tabSet(){return this._activeBuffer.tabs[this._activeBuffer.x]=!0,!0}reverseIndex(){if(this._restrictCursor(),this._activeBuffer.y===this._activeBuffer.scrollTop){const $=this._activeBuffer.scrollBottom-this._activeBuffer.scrollTop;this._activeBuffer.lines.shiftElements(this._activeBuffer.ybase+this._activeBuffer.y,$,1),this._activeBuffer.lines.set(this._activeBuffer.ybase+this._activeBuffer.y,this._activeBuffer.getBlankLine(this._eraseAttrData())),this._dirtyRowTracker.markRangeDirty(this._activeBuffer.scrollTop,this._activeBuffer.scrollBottom)}else this._activeBuffer.y--,this._restrictCursor();return!0}fullReset(){return this._parser.reset(),this._onRequestReset.fire(),!0}reset(){this._curAttrData=v.DEFAULT_ATTR_DATA.clone(),this._eraseAttrDataInternal=v.DEFAULT_ATTR_DATA.clone()}_eraseAttrData(){return this._eraseAttrDataInternal.bg&=-67108864,this._eraseAttrDataInternal.bg|=67108863&this._curAttrData.bg,this._eraseAttrDataInternal}setgLevel($){return this._charsetService.setgLevel($),!0}screenAlignmentPattern(){const $=new y.CellData;$.content=4194373,$.fg=this._curAttrData.fg,$.bg=this._curAttrData.bg,this._setCursor(0,0);for(let L=0;L(this._coreService.triggerDataEvent(`${_.C0.ESC}${V}${_.C0.ESC}\\`),!0))($==='"q'?`P1$r${this._curAttrData.isProtected()?1:0}"q`:$==='"p'?'P1$r61;1"p':$==="r"?`P1$r${F.scrollTop+1};${F.scrollBottom+1}r`:$==="m"?"P1$r0m":$===" q"?`P1$r${{block:2,underline:4,bar:6}[G.cursorStyle]-(G.cursorBlink?1:0)} q`:"P0$r")}markRangeDirty($,L){this._dirtyRowTracker.markRangeDirty($,L)}}o.InputHandler=W;let H=class{constructor(te){this._bufferService=te,this.clearRange()}clearRange(){this.start=this._bufferService.buffer.y,this.end=this._bufferService.buffer.y}markDirty(te){tethis.end&&(this.end=te)}markRangeDirty(te,$){te>$&&(q=te,te=$,$=q),tethis.end&&(this.end=$)}markAllDirty(){this.markRangeDirty(0,this._bufferService.rows-1)}};function Y(te){return 0<=te&&te<256}H=u([h(0,N.IBufferService)],H)},844:(a,o)=>{function l(u){for(const h of u)h.dispose();u.length=0}Object.defineProperty(o,"__esModule",{value:!0}),o.getDisposeArrayDisposable=o.disposeArray=o.toDisposable=o.MutableDisposable=o.Disposable=void 0,o.Disposable=class{constructor(){this._disposables=[],this._isDisposed=!1}dispose(){this._isDisposed=!0;for(const u of this._disposables)u.dispose();this._disposables.length=0}register(u){return this._disposables.push(u),u}unregister(u){const h=this._disposables.indexOf(u);h!==-1&&this._disposables.splice(h,1)}},o.MutableDisposable=class{constructor(){this._isDisposed=!1}get value(){return this._isDisposed?void 0:this._value}set value(u){var h;this._isDisposed||u===this._value||((h=this._value)==null||h.dispose(),this._value=u)}clear(){this.value=void 0}dispose(){var u;this._isDisposed=!0,(u=this._value)==null||u.dispose(),this._value=void 0}},o.toDisposable=function(u){return{dispose:u}},o.disposeArray=l,o.getDisposeArrayDisposable=function(u){return{dispose:()=>l(u)}}},1505:(a,o)=>{Object.defineProperty(o,"__esModule",{value:!0}),o.FourKeyMap=o.TwoKeyMap=void 0;class l{constructor(){this._data={}}set(h,_,p){this._data[h]||(this._data[h]={}),this._data[h][_]=p}get(h,_){return this._data[h]?this._data[h][_]:void 0}clear(){this._data={}}}o.TwoKeyMap=l,o.FourKeyMap=class{constructor(){this._data=new l}set(u,h,_,p,m){this._data.get(u,h)||this._data.set(u,h,new l),this._data.get(u,h).set(_,p,m)}get(u,h,_,p){var m;return(m=this._data.get(u,h))==null?void 0:m.get(_,p)}clear(){this._data.clear()}}},6114:(a,o)=>{Object.defineProperty(o,"__esModule",{value:!0}),o.isChromeOS=o.isLinux=o.isWindows=o.isIphone=o.isIpad=o.isMac=o.getSafariVersion=o.isSafari=o.isLegacyEdge=o.isFirefox=o.isNode=void 0,o.isNode=typeof process<"u"&&"title"in process;const l=o.isNode?"node":navigator.userAgent,u=o.isNode?"node":navigator.platform;o.isFirefox=l.includes("Firefox"),o.isLegacyEdge=l.includes("Edge"),o.isSafari=/^((?!chrome|android).)*safari/i.test(l),o.getSafariVersion=function(){if(!o.isSafari)return 0;const h=l.match(/Version\/(\d+)/);return h===null||h.length<2?0:parseInt(h[1])},o.isMac=["Macintosh","MacIntel","MacPPC","Mac68K"].includes(u),o.isIpad=u==="iPad",o.isIphone=u==="iPhone",o.isWindows=["Windows","Win16","Win32","WinCE"].includes(u),o.isLinux=u.indexOf("Linux")>=0,o.isChromeOS=/\bCrOS\b/.test(l)},6106:(a,o)=>{Object.defineProperty(o,"__esModule",{value:!0}),o.SortedList=void 0;let l=0;o.SortedList=class{constructor(u){this._getKey=u,this._array=[]}clear(){this._array.length=0}insert(u){this._array.length!==0?(l=this._search(this._getKey(u)),this._array.splice(l,0,u)):this._array.push(u)}delete(u){if(this._array.length===0)return!1;const h=this._getKey(u);if(h===void 0||(l=this._search(h),l===-1)||this._getKey(this._array[l])!==h)return!1;do if(this._array[l]===u)return this._array.splice(l,1),!0;while(++l=this._array.length)&&this._getKey(this._array[l])===u))do yield this._array[l];while(++l=this._array.length)&&this._getKey(this._array[l])===u))do h(this._array[l]);while(++l=h;){let p=h+_>>1;const m=this._getKey(this._array[p]);if(m>u)_=p-1;else{if(!(m0&&this._getKey(this._array[p-1])===u;)p--;return p}h=p+1}}return h}}},7226:(a,o,l)=>{Object.defineProperty(o,"__esModule",{value:!0}),o.DebouncedIdleTask=o.IdleTaskQueue=o.PriorityTaskQueue=void 0;const u=l(6114);class h{constructor(){this._tasks=[],this._i=0}enqueue(m){this._tasks.push(m),this._start()}flush(){for(;this._ib)return v-x<-20&&console.warn(`task queue exceeded allotted deadline by ${Math.abs(Math.round(v-x))}ms`),void this._start();v=b}this.clear()}}class _ extends h{_requestCallback(m){return setTimeout((()=>m(this._createDeadline(16))))}_cancelCallback(m){clearTimeout(m)}_createDeadline(m){const x=Date.now()+m;return{timeRemaining:()=>Math.max(0,x-Date.now())}}}o.PriorityTaskQueue=_,o.IdleTaskQueue=!u.isNode&&"requestIdleCallback"in window?class extends h{_requestCallback(p){return requestIdleCallback(p)}_cancelCallback(p){cancelIdleCallback(p)}}:_,o.DebouncedIdleTask=class{constructor(){this._queue=new o.IdleTaskQueue}set(p){this._queue.clear(),this._queue.enqueue(p)}flush(){this._queue.flush()}}},9282:(a,o,l)=>{Object.defineProperty(o,"__esModule",{value:!0}),o.updateWindowsModeWrappedState=void 0;const u=l(643);o.updateWindowsModeWrappedState=function(h){const _=h.buffer.lines.get(h.buffer.ybase+h.buffer.y-1),p=_==null?void 0:_.get(h.cols-1),m=h.buffer.lines.get(h.buffer.ybase+h.buffer.y);m&&p&&(m.isWrapped=p[u.CHAR_DATA_CODE_INDEX]!==u.NULL_CELL_CODE&&p[u.CHAR_DATA_CODE_INDEX]!==u.WHITESPACE_CELL_CODE)}},3734:(a,o)=>{Object.defineProperty(o,"__esModule",{value:!0}),o.ExtendedAttrs=o.AttributeData=void 0;class l{constructor(){this.fg=0,this.bg=0,this.extended=new u}static toColorRGB(_){return[_>>>16&255,_>>>8&255,255&_]}static fromColorRGB(_){return(255&_[0])<<16|(255&_[1])<<8|255&_[2]}clone(){const _=new l;return _.fg=this.fg,_.bg=this.bg,_.extended=this.extended.clone(),_}isInverse(){return 67108864&this.fg}isBold(){return 134217728&this.fg}isUnderline(){return this.hasExtendedAttrs()&&this.extended.underlineStyle!==0?1:268435456&this.fg}isBlink(){return 536870912&this.fg}isInvisible(){return 1073741824&this.fg}isItalic(){return 67108864&this.bg}isDim(){return 134217728&this.bg}isStrikethrough(){return 2147483648&this.fg}isProtected(){return 536870912&this.bg}isOverline(){return 1073741824&this.bg}getFgColorMode(){return 50331648&this.fg}getBgColorMode(){return 50331648&this.bg}isFgRGB(){return(50331648&this.fg)==50331648}isBgRGB(){return(50331648&this.bg)==50331648}isFgPalette(){return(50331648&this.fg)==16777216||(50331648&this.fg)==33554432}isBgPalette(){return(50331648&this.bg)==16777216||(50331648&this.bg)==33554432}isFgDefault(){return(50331648&this.fg)==0}isBgDefault(){return(50331648&this.bg)==0}isAttributeDefault(){return this.fg===0&&this.bg===0}getFgColor(){switch(50331648&this.fg){case 16777216:case 33554432:return 255&this.fg;case 50331648:return 16777215&this.fg;default:return-1}}getBgColor(){switch(50331648&this.bg){case 16777216:case 33554432:return 255&this.bg;case 50331648:return 16777215&this.bg;default:return-1}}hasExtendedAttrs(){return 268435456&this.bg}updateExtended(){this.extended.isEmpty()?this.bg&=-268435457:this.bg|=268435456}getUnderlineColor(){if(268435456&this.bg&&~this.extended.underlineColor)switch(50331648&this.extended.underlineColor){case 16777216:case 33554432:return 255&this.extended.underlineColor;case 50331648:return 16777215&this.extended.underlineColor;default:return this.getFgColor()}return this.getFgColor()}getUnderlineColorMode(){return 268435456&this.bg&&~this.extended.underlineColor?50331648&this.extended.underlineColor:this.getFgColorMode()}isUnderlineColorRGB(){return 268435456&this.bg&&~this.extended.underlineColor?(50331648&this.extended.underlineColor)==50331648:this.isFgRGB()}isUnderlineColorPalette(){return 268435456&this.bg&&~this.extended.underlineColor?(50331648&this.extended.underlineColor)==16777216||(50331648&this.extended.underlineColor)==33554432:this.isFgPalette()}isUnderlineColorDefault(){return 268435456&this.bg&&~this.extended.underlineColor?(50331648&this.extended.underlineColor)==0:this.isFgDefault()}getUnderlineStyle(){return 268435456&this.fg?268435456&this.bg?this.extended.underlineStyle:1:0}getUnderlineVariantOffset(){return this.extended.underlineVariantOffset}}o.AttributeData=l;class u{get ext(){return this._urlId?-469762049&this._ext|this.underlineStyle<<26:this._ext}set ext(_){this._ext=_}get underlineStyle(){return this._urlId?5:(469762048&this._ext)>>26}set underlineStyle(_){this._ext&=-469762049,this._ext|=_<<26&469762048}get underlineColor(){return 67108863&this._ext}set underlineColor(_){this._ext&=-67108864,this._ext|=67108863&_}get urlId(){return this._urlId}set urlId(_){this._urlId=_}get underlineVariantOffset(){const _=(3758096384&this._ext)>>29;return _<0?4294967288^_:_}set underlineVariantOffset(_){this._ext&=536870911,this._ext|=_<<29&3758096384}constructor(_=0,p=0){this._ext=0,this._urlId=0,this._ext=_,this._urlId=p}clone(){return new u(this._ext,this._urlId)}isEmpty(){return this.underlineStyle===0&&this._urlId===0}}o.ExtendedAttrs=u},9092:(a,o,l)=>{Object.defineProperty(o,"__esModule",{value:!0}),o.Buffer=o.MAX_BUFFER_SIZE=void 0;const u=l(6349),h=l(7226),_=l(3734),p=l(8437),m=l(4634),x=l(511),k=l(643),v=l(4863),b=l(7116);o.MAX_BUFFER_SIZE=4294967295,o.Buffer=class{constructor(w,y,C){this._hasScrollback=w,this._optionsService=y,this._bufferService=C,this.ydisp=0,this.ybase=0,this.y=0,this.x=0,this.tabs={},this.savedY=0,this.savedX=0,this.savedCurAttrData=p.DEFAULT_ATTR_DATA.clone(),this.savedCharset=b.DEFAULT_CHARSET,this.markers=[],this._nullCell=x.CellData.fromCharData([0,k.NULL_CELL_CHAR,k.NULL_CELL_WIDTH,k.NULL_CELL_CODE]),this._whitespaceCell=x.CellData.fromCharData([0,k.WHITESPACE_CELL_CHAR,k.WHITESPACE_CELL_WIDTH,k.WHITESPACE_CELL_CODE]),this._isClearing=!1,this._memoryCleanupQueue=new h.IdleTaskQueue,this._memoryCleanupPosition=0,this._cols=this._bufferService.cols,this._rows=this._bufferService.rows,this.lines=new u.CircularList(this._getCorrectBufferLength(this._rows)),this.scrollTop=0,this.scrollBottom=this._rows-1,this.setupTabStops()}getNullCell(w){return w?(this._nullCell.fg=w.fg,this._nullCell.bg=w.bg,this._nullCell.extended=w.extended):(this._nullCell.fg=0,this._nullCell.bg=0,this._nullCell.extended=new _.ExtendedAttrs),this._nullCell}getWhitespaceCell(w){return w?(this._whitespaceCell.fg=w.fg,this._whitespaceCell.bg=w.bg,this._whitespaceCell.extended=w.extended):(this._whitespaceCell.fg=0,this._whitespaceCell.bg=0,this._whitespaceCell.extended=new _.ExtendedAttrs),this._whitespaceCell}getBlankLine(w,y){return new p.BufferLine(this._bufferService.cols,this.getNullCell(w),y)}get hasScrollback(){return this._hasScrollback&&this.lines.maxLength>this._rows}get isCursorInViewport(){const w=this.ybase+this.y-this.ydisp;return w>=0&&wo.MAX_BUFFER_SIZE?o.MAX_BUFFER_SIZE:y}fillViewportRows(w){if(this.lines.length===0){w===void 0&&(w=p.DEFAULT_ATTR_DATA);let y=this._rows;for(;y--;)this.lines.push(this.getBlankLine(w))}}clear(){this.ydisp=0,this.ybase=0,this.y=0,this.x=0,this.lines=new u.CircularList(this._getCorrectBufferLength(this._rows)),this.scrollTop=0,this.scrollBottom=this._rows-1,this.setupTabStops()}resize(w,y){const C=this.getNullCell(p.DEFAULT_ATTR_DATA);let N=0;const E=this._getCorrectBufferLength(y);if(E>this.lines.maxLength&&(this.lines.maxLength=E),this.lines.length>0){if(this._cols0&&this.lines.length<=this.ybase+this.y+T+1?(this.ybase--,T++,this.ydisp>0&&this.ydisp--):this.lines.push(new p.BufferLine(w,C)));else for(let j=this._rows;j>y;j--)this.lines.length>y+this.ybase&&(this.lines.length>this.ybase+this.y+1?this.lines.pop():(this.ybase++,this.ydisp++));if(E0&&(this.lines.trimStart(j),this.ybase=Math.max(this.ybase-j,0),this.ydisp=Math.max(this.ydisp-j,0),this.savedY=Math.max(this.savedY-j,0)),this.lines.maxLength=E}this.x=Math.min(this.x,w-1),this.y=Math.min(this.y,y-1),T&&(this.y+=T),this.savedX=Math.min(this.savedX,w-1),this.scrollTop=0}if(this.scrollBottom=y-1,this._isReflowEnabled&&(this._reflow(w,y),this._cols>w))for(let T=0;T.1*this.lines.length&&(this._memoryCleanupPosition=0,this._memoryCleanupQueue.enqueue((()=>this._batchedMemoryCleanup())))}_batchedMemoryCleanup(){let w=!0;this._memoryCleanupPosition>=this.lines.length&&(this._memoryCleanupPosition=0,w=!1);let y=0;for(;this._memoryCleanupPosition100)return!0;return w}get _isReflowEnabled(){const w=this._optionsService.rawOptions.windowsPty;return w&&w.buildNumber?this._hasScrollback&&w.backend==="conpty"&&w.buildNumber>=21376:this._hasScrollback&&!this._optionsService.rawOptions.windowsMode}_reflow(w,y){this._cols!==w&&(w>this._cols?this._reflowLarger(w,y):this._reflowSmaller(w,y))}_reflowLarger(w,y){const C=(0,m.reflowLargerGetLinesToRemove)(this.lines,this._cols,w,this.ybase+this.y,this.getNullCell(p.DEFAULT_ATTR_DATA));if(C.length>0){const N=(0,m.reflowLargerCreateNewLayout)(this.lines,C);(0,m.reflowLargerApplyNewLayout)(this.lines,N.layout),this._reflowLargerAdjustViewport(w,y,N.countRemoved)}}_reflowLargerAdjustViewport(w,y,C){const N=this.getNullCell(p.DEFAULT_ATTR_DATA);let E=C;for(;E-- >0;)this.ybase===0?(this.y>0&&this.y--,this.lines.length=0;T--){let j=this.lines.get(T);if(!j||!j.isWrapped&&j.getTrimmedLength()<=w)continue;const M=[j];for(;j.isWrapped&&T>0;)j=this.lines.get(--T),M.unshift(j);const D=this.ybase+this.y;if(D>=T&&D0&&(N.push({start:T+M.length+E,newLines:W}),E+=W.length),M.push(...W);let H=P.length-1,Y=P[H];Y===0&&(H--,Y=P[H]);let te=M.length-U-1,$=I;for(;te>=0;){const F=Math.min($,Y);if(M[H]===void 0)break;if(M[H].copyCellsFrom(M[te],$-F,Y-F,F,!0),Y-=F,Y===0&&(H--,Y=P[H]),$-=F,$===0){te--;const G=Math.max(te,0);$=(0,m.getWrappedLineTrimmedLength)(M,G,this._cols)}}for(let F=0;F0;)this.ybase===0?this.y0){const T=[],j=[];for(let H=0;H=0;H--)if(P&&P.start>D+U){for(let Y=P.newLines.length-1;Y>=0;Y--)this.lines.set(H--,P.newLines[Y]);H++,T.push({index:D+1,amount:P.newLines.length}),U+=P.newLines.length,P=N[++I]}else this.lines.set(H,j[D--]);let q=0;for(let H=T.length-1;H>=0;H--)T[H].index+=q,this.lines.onInsertEmitter.fire(T[H]),q+=T[H].amount;const W=Math.max(0,M+E-this.lines.maxLength);W>0&&this.lines.onTrimEmitter.fire(W)}}translateBufferLineToString(w,y,C=0,N){const E=this.lines.get(w);return E?E.translateToString(y,C,N):""}getWrappedRangeForLine(w){let y=w,C=w;for(;y>0&&this.lines.get(y).isWrapped;)y--;for(;C+10;);return w>=this._cols?this._cols-1:w<0?0:w}nextStop(w){for(w==null&&(w=this.x);!this.tabs[++w]&&w=this._cols?this._cols-1:w<0?0:w}clearMarkers(w){this._isClearing=!0;for(let y=0;y{y.line-=C,y.line<0&&y.dispose()}))),y.register(this.lines.onInsert((C=>{y.line>=C.index&&(y.line+=C.amount)}))),y.register(this.lines.onDelete((C=>{y.line>=C.index&&y.lineC.index&&(y.line-=C.amount)}))),y.register(y.onDispose((()=>this._removeMarker(y)))),y}_removeMarker(w){this._isClearing||this.markers.splice(this.markers.indexOf(w),1)}}},8437:(a,o,l)=>{Object.defineProperty(o,"__esModule",{value:!0}),o.BufferLine=o.DEFAULT_ATTR_DATA=void 0;const u=l(3734),h=l(511),_=l(643),p=l(482);o.DEFAULT_ATTR_DATA=Object.freeze(new u.AttributeData);let m=0;class x{constructor(v,b,w=!1){this.isWrapped=w,this._combined={},this._extendedAttrs={},this._data=new Uint32Array(3*v);const y=b||h.CellData.fromCharData([0,_.NULL_CELL_CHAR,_.NULL_CELL_WIDTH,_.NULL_CELL_CODE]);for(let C=0;C>22,2097152&b?this._combined[v].charCodeAt(this._combined[v].length-1):w]}set(v,b){this._data[3*v+1]=b[_.CHAR_DATA_ATTR_INDEX],b[_.CHAR_DATA_CHAR_INDEX].length>1?(this._combined[v]=b[1],this._data[3*v+0]=2097152|v|b[_.CHAR_DATA_WIDTH_INDEX]<<22):this._data[3*v+0]=b[_.CHAR_DATA_CHAR_INDEX].charCodeAt(0)|b[_.CHAR_DATA_WIDTH_INDEX]<<22}getWidth(v){return this._data[3*v+0]>>22}hasWidth(v){return 12582912&this._data[3*v+0]}getFg(v){return this._data[3*v+1]}getBg(v){return this._data[3*v+2]}hasContent(v){return 4194303&this._data[3*v+0]}getCodePoint(v){const b=this._data[3*v+0];return 2097152&b?this._combined[v].charCodeAt(this._combined[v].length-1):2097151&b}isCombined(v){return 2097152&this._data[3*v+0]}getString(v){const b=this._data[3*v+0];return 2097152&b?this._combined[v]:2097151&b?(0,p.stringFromCodePoint)(2097151&b):""}isProtected(v){return 536870912&this._data[3*v+2]}loadCell(v,b){return m=3*v,b.content=this._data[m+0],b.fg=this._data[m+1],b.bg=this._data[m+2],2097152&b.content&&(b.combinedData=this._combined[v]),268435456&b.bg&&(b.extended=this._extendedAttrs[v]),b}setCell(v,b){2097152&b.content&&(this._combined[v]=b.combinedData),268435456&b.bg&&(this._extendedAttrs[v]=b.extended),this._data[3*v+0]=b.content,this._data[3*v+1]=b.fg,this._data[3*v+2]=b.bg}setCellFromCodepoint(v,b,w,y){268435456&y.bg&&(this._extendedAttrs[v]=y.extended),this._data[3*v+0]=b|w<<22,this._data[3*v+1]=y.fg,this._data[3*v+2]=y.bg}addCodepointToCell(v,b,w){let y=this._data[3*v+0];2097152&y?this._combined[v]+=(0,p.stringFromCodePoint)(b):2097151&y?(this._combined[v]=(0,p.stringFromCodePoint)(2097151&y)+(0,p.stringFromCodePoint)(b),y&=-2097152,y|=2097152):y=b|4194304,w&&(y&=-12582913,y|=w<<22),this._data[3*v+0]=y}insertCells(v,b,w){if((v%=this.length)&&this.getWidth(v-1)===2&&this.setCellFromCodepoint(v-1,0,1,w),b=0;--C)this.setCell(v+b+C,this.loadCell(v+C,y));for(let C=0;Cthis.length){if(this._data.buffer.byteLength>=4*w)this._data=new Uint32Array(this._data.buffer,0,w);else{const y=new Uint32Array(w);y.set(this._data),this._data=y}for(let y=this.length;y=v&&delete this._combined[E]}const C=Object.keys(this._extendedAttrs);for(let N=0;N=v&&delete this._extendedAttrs[E]}}return this.length=v,4*w*2=0;--v)if(4194303&this._data[3*v+0])return v+(this._data[3*v+0]>>22);return 0}getNoBgTrimmedLength(){for(let v=this.length-1;v>=0;--v)if(4194303&this._data[3*v+0]||50331648&this._data[3*v+2])return v+(this._data[3*v+0]>>22);return 0}copyCellsFrom(v,b,w,y,C){const N=v._data;if(C)for(let T=y-1;T>=0;T--){for(let j=0;j<3;j++)this._data[3*(w+T)+j]=N[3*(b+T)+j];268435456&N[3*(b+T)+2]&&(this._extendedAttrs[w+T]=v._extendedAttrs[b+T])}else for(let T=0;T=b&&(this._combined[j-b+w]=v._combined[j])}}translateToString(v,b,w,y){b=b??0,w=w??this.length,v&&(w=Math.min(w,this.getTrimmedLength())),y&&(y.length=0);let C="";for(;b>22||1}return y&&y.push(b),C}}o.BufferLine=x},4841:(a,o)=>{Object.defineProperty(o,"__esModule",{value:!0}),o.getRangeLength=void 0,o.getRangeLength=function(l,u){if(l.start.y>l.end.y)throw new Error(`Buffer range end (${l.end.x}, ${l.end.y}) cannot be before start (${l.start.x}, ${l.start.y})`);return u*(l.end.y-l.start.y)+(l.end.x-l.start.x+1)}},4634:(a,o)=>{function l(u,h,_){if(h===u.length-1)return u[h].getTrimmedLength();const p=!u[h].hasContent(_-1)&&u[h].getWidth(_-1)===1,m=u[h+1].getWidth(0)===2;return p&&m?_-1:_}Object.defineProperty(o,"__esModule",{value:!0}),o.getWrappedLineTrimmedLength=o.reflowSmallerGetNewLineLengths=o.reflowLargerApplyNewLayout=o.reflowLargerCreateNewLayout=o.reflowLargerGetLinesToRemove=void 0,o.reflowLargerGetLinesToRemove=function(u,h,_,p,m){const x=[];for(let k=0;k=k&&p0&&(j>y||w[j].getTrimmedLength()===0);j--)T++;T>0&&(x.push(k+w.length-T),x.push(T)),k+=w.length-1}return x},o.reflowLargerCreateNewLayout=function(u,h){const _=[];let p=0,m=h[p],x=0;for(let k=0;kl(u,w,h))).reduce(((b,w)=>b+w));let x=0,k=0,v=0;for(;vb&&(x-=b,k++);const w=u[k].getWidth(x-1)===2;w&&x--;const y=w?_-1:_;p.push(y),v+=y}return p},o.getWrappedLineTrimmedLength=l},5295:(a,o,l)=>{Object.defineProperty(o,"__esModule",{value:!0}),o.BufferSet=void 0;const u=l(8460),h=l(844),_=l(9092);class p extends h.Disposable{constructor(x,k){super(),this._optionsService=x,this._bufferService=k,this._onBufferActivate=this.register(new u.EventEmitter),this.onBufferActivate=this._onBufferActivate.event,this.reset(),this.register(this._optionsService.onSpecificOptionChange("scrollback",(()=>this.resize(this._bufferService.cols,this._bufferService.rows)))),this.register(this._optionsService.onSpecificOptionChange("tabStopWidth",(()=>this.setupTabStops())))}reset(){this._normal=new _.Buffer(!0,this._optionsService,this._bufferService),this._normal.fillViewportRows(),this._alt=new _.Buffer(!1,this._optionsService,this._bufferService),this._activeBuffer=this._normal,this._onBufferActivate.fire({activeBuffer:this._normal,inactiveBuffer:this._alt}),this.setupTabStops()}get alt(){return this._alt}get active(){return this._activeBuffer}get normal(){return this._normal}activateNormalBuffer(){this._activeBuffer!==this._normal&&(this._normal.x=this._alt.x,this._normal.y=this._alt.y,this._alt.clearAllMarkers(),this._alt.clear(),this._activeBuffer=this._normal,this._onBufferActivate.fire({activeBuffer:this._normal,inactiveBuffer:this._alt}))}activateAltBuffer(x){this._activeBuffer!==this._alt&&(this._alt.fillViewportRows(x),this._alt.x=this._normal.x,this._alt.y=this._normal.y,this._activeBuffer=this._alt,this._onBufferActivate.fire({activeBuffer:this._alt,inactiveBuffer:this._normal}))}resize(x,k){this._normal.resize(x,k),this._alt.resize(x,k),this.setupTabStops(x)}setupTabStops(x){this._normal.setupTabStops(x),this._alt.setupTabStops(x)}}o.BufferSet=p},511:(a,o,l)=>{Object.defineProperty(o,"__esModule",{value:!0}),o.CellData=void 0;const u=l(482),h=l(643),_=l(3734);class p extends _.AttributeData{constructor(){super(...arguments),this.content=0,this.fg=0,this.bg=0,this.extended=new _.ExtendedAttrs,this.combinedData=""}static fromCharData(x){const k=new p;return k.setFromCharData(x),k}isCombined(){return 2097152&this.content}getWidth(){return this.content>>22}getChars(){return 2097152&this.content?this.combinedData:2097151&this.content?(0,u.stringFromCodePoint)(2097151&this.content):""}getCode(){return this.isCombined()?this.combinedData.charCodeAt(this.combinedData.length-1):2097151&this.content}setFromCharData(x){this.fg=x[h.CHAR_DATA_ATTR_INDEX],this.bg=0;let k=!1;if(x[h.CHAR_DATA_CHAR_INDEX].length>2)k=!0;else if(x[h.CHAR_DATA_CHAR_INDEX].length===2){const v=x[h.CHAR_DATA_CHAR_INDEX].charCodeAt(0);if(55296<=v&&v<=56319){const b=x[h.CHAR_DATA_CHAR_INDEX].charCodeAt(1);56320<=b&&b<=57343?this.content=1024*(v-55296)+b-56320+65536|x[h.CHAR_DATA_WIDTH_INDEX]<<22:k=!0}else k=!0}else this.content=x[h.CHAR_DATA_CHAR_INDEX].charCodeAt(0)|x[h.CHAR_DATA_WIDTH_INDEX]<<22;k&&(this.combinedData=x[h.CHAR_DATA_CHAR_INDEX],this.content=2097152|x[h.CHAR_DATA_WIDTH_INDEX]<<22)}getAsCharData(){return[this.fg,this.getChars(),this.getWidth(),this.getCode()]}}o.CellData=p},643:(a,o)=>{Object.defineProperty(o,"__esModule",{value:!0}),o.WHITESPACE_CELL_CODE=o.WHITESPACE_CELL_WIDTH=o.WHITESPACE_CELL_CHAR=o.NULL_CELL_CODE=o.NULL_CELL_WIDTH=o.NULL_CELL_CHAR=o.CHAR_DATA_CODE_INDEX=o.CHAR_DATA_WIDTH_INDEX=o.CHAR_DATA_CHAR_INDEX=o.CHAR_DATA_ATTR_INDEX=o.DEFAULT_EXT=o.DEFAULT_ATTR=o.DEFAULT_COLOR=void 0,o.DEFAULT_COLOR=0,o.DEFAULT_ATTR=256|o.DEFAULT_COLOR<<9,o.DEFAULT_EXT=0,o.CHAR_DATA_ATTR_INDEX=0,o.CHAR_DATA_CHAR_INDEX=1,o.CHAR_DATA_WIDTH_INDEX=2,o.CHAR_DATA_CODE_INDEX=3,o.NULL_CELL_CHAR="",o.NULL_CELL_WIDTH=1,o.NULL_CELL_CODE=0,o.WHITESPACE_CELL_CHAR=" ",o.WHITESPACE_CELL_WIDTH=1,o.WHITESPACE_CELL_CODE=32},4863:(a,o,l)=>{Object.defineProperty(o,"__esModule",{value:!0}),o.Marker=void 0;const u=l(8460),h=l(844);class _{get id(){return this._id}constructor(m){this.line=m,this.isDisposed=!1,this._disposables=[],this._id=_._nextId++,this._onDispose=this.register(new u.EventEmitter),this.onDispose=this._onDispose.event}dispose(){this.isDisposed||(this.isDisposed=!0,this.line=-1,this._onDispose.fire(),(0,h.disposeArray)(this._disposables),this._disposables.length=0)}register(m){return this._disposables.push(m),m}}o.Marker=_,_._nextId=1},7116:(a,o)=>{Object.defineProperty(o,"__esModule",{value:!0}),o.DEFAULT_CHARSET=o.CHARSETS=void 0,o.CHARSETS={},o.DEFAULT_CHARSET=o.CHARSETS.B,o.CHARSETS[0]={"`":"◆",a:"▒",b:"␉",c:"␌",d:"␍",e:"␊",f:"°",g:"±",h:"␤",i:"␋",j:"┘",k:"┐",l:"┌",m:"└",n:"┼",o:"⎺",p:"⎻",q:"─",r:"⎼",s:"⎽",t:"├",u:"┤",v:"┴",w:"┬",x:"│",y:"≤",z:"≥","{":"π","|":"≠","}":"£","~":"·"},o.CHARSETS.A={"#":"£"},o.CHARSETS.B=void 0,o.CHARSETS[4]={"#":"£","@":"¾","[":"ij","\\":"½","]":"|","{":"¨","|":"f","}":"¼","~":"´"},o.CHARSETS.C=o.CHARSETS[5]={"[":"Ä","\\":"Ö","]":"Å","^":"Ü","`":"é","{":"ä","|":"ö","}":"å","~":"ü"},o.CHARSETS.R={"#":"£","@":"à","[":"°","\\":"ç","]":"§","{":"é","|":"ù","}":"è","~":"¨"},o.CHARSETS.Q={"@":"à","[":"â","\\":"ç","]":"ê","^":"î","`":"ô","{":"é","|":"ù","}":"è","~":"û"},o.CHARSETS.K={"@":"§","[":"Ä","\\":"Ö","]":"Ü","{":"ä","|":"ö","}":"ü","~":"ß"},o.CHARSETS.Y={"#":"£","@":"§","[":"°","\\":"ç","]":"é","`":"ù","{":"à","|":"ò","}":"è","~":"ì"},o.CHARSETS.E=o.CHARSETS[6]={"@":"Ä","[":"Æ","\\":"Ø","]":"Å","^":"Ü","`":"ä","{":"æ","|":"ø","}":"å","~":"ü"},o.CHARSETS.Z={"#":"£","@":"§","[":"¡","\\":"Ñ","]":"¿","{":"°","|":"ñ","}":"ç"},o.CHARSETS.H=o.CHARSETS[7]={"@":"É","[":"Ä","\\":"Ö","]":"Å","^":"Ü","`":"é","{":"ä","|":"ö","}":"å","~":"ü"},o.CHARSETS["="]={"#":"ù","@":"à","[":"é","\\":"ç","]":"ê","^":"î",_:"è","`":"ô","{":"ä","|":"ö","}":"ü","~":"û"}},2584:(a,o)=>{var l,u,h;Object.defineProperty(o,"__esModule",{value:!0}),o.C1_ESCAPED=o.C1=o.C0=void 0,(function(_){_.NUL="\0",_.SOH="",_.STX="",_.ETX="",_.EOT="",_.ENQ="",_.ACK="",_.BEL="\x07",_.BS="\b",_.HT=" ",_.LF=` -`,_.VT="\v",_.FF="\f",_.CR="\r",_.SO="",_.SI="",_.DLE="",_.DC1="",_.DC2="",_.DC3="",_.DC4="",_.NAK="",_.SYN="",_.ETB="",_.CAN="",_.EM="",_.SUB="",_.ESC="\x1B",_.FS="",_.GS="",_.RS="",_.US="",_.SP=" ",_.DEL=""})(l||(o.C0=l={})),(function(_){_.PAD="€",_.HOP="",_.BPH="‚",_.NBH="ƒ",_.IND="„",_.NEL="…",_.SSA="†",_.ESA="‡",_.HTS="ˆ",_.HTJ="‰",_.VTS="Š",_.PLD="‹",_.PLU="Œ",_.RI="",_.SS2="Ž",_.SS3="",_.DCS="",_.PU1="‘",_.PU2="’",_.STS="“",_.CCH="”",_.MW="•",_.SPA="–",_.EPA="—",_.SOS="˜",_.SGCI="™",_.SCI="š",_.CSI="›",_.ST="œ",_.OSC="",_.PM="ž",_.APC="Ÿ"})(u||(o.C1=u={})),(function(_){_.ST=`${l.ESC}\\`})(h||(o.C1_ESCAPED=h={}))},7399:(a,o,l)=>{Object.defineProperty(o,"__esModule",{value:!0}),o.evaluateKeyboardEvent=void 0;const u=l(2584),h={48:["0",")"],49:["1","!"],50:["2","@"],51:["3","#"],52:["4","$"],53:["5","%"],54:["6","^"],55:["7","&"],56:["8","*"],57:["9","("],186:[";",":"],187:["=","+"],188:[",","<"],189:["-","_"],190:[".",">"],191:["/","?"],192:["`","~"],219:["[","{"],220:["\\","|"],221:["]","}"],222:["'",'"']};o.evaluateKeyboardEvent=function(_,p,m,x){const k={type:0,cancel:!1,key:void 0},v=(_.shiftKey?1:0)|(_.altKey?2:0)|(_.ctrlKey?4:0)|(_.metaKey?8:0);switch(_.keyCode){case 0:_.key==="UIKeyInputUpArrow"?k.key=p?u.C0.ESC+"OA":u.C0.ESC+"[A":_.key==="UIKeyInputLeftArrow"?k.key=p?u.C0.ESC+"OD":u.C0.ESC+"[D":_.key==="UIKeyInputRightArrow"?k.key=p?u.C0.ESC+"OC":u.C0.ESC+"[C":_.key==="UIKeyInputDownArrow"&&(k.key=p?u.C0.ESC+"OB":u.C0.ESC+"[B");break;case 8:k.key=_.ctrlKey?"\b":u.C0.DEL,_.altKey&&(k.key=u.C0.ESC+k.key);break;case 9:if(_.shiftKey){k.key=u.C0.ESC+"[Z";break}k.key=u.C0.HT,k.cancel=!0;break;case 13:k.key=_.altKey?u.C0.ESC+u.C0.CR:u.C0.CR,k.cancel=!0;break;case 27:k.key=u.C0.ESC,_.altKey&&(k.key=u.C0.ESC+u.C0.ESC),k.cancel=!0;break;case 37:if(_.metaKey)break;v?(k.key=u.C0.ESC+"[1;"+(v+1)+"D",k.key===u.C0.ESC+"[1;3D"&&(k.key=u.C0.ESC+(m?"b":"[1;5D"))):k.key=p?u.C0.ESC+"OD":u.C0.ESC+"[D";break;case 39:if(_.metaKey)break;v?(k.key=u.C0.ESC+"[1;"+(v+1)+"C",k.key===u.C0.ESC+"[1;3C"&&(k.key=u.C0.ESC+(m?"f":"[1;5C"))):k.key=p?u.C0.ESC+"OC":u.C0.ESC+"[C";break;case 38:if(_.metaKey)break;v?(k.key=u.C0.ESC+"[1;"+(v+1)+"A",m||k.key!==u.C0.ESC+"[1;3A"||(k.key=u.C0.ESC+"[1;5A")):k.key=p?u.C0.ESC+"OA":u.C0.ESC+"[A";break;case 40:if(_.metaKey)break;v?(k.key=u.C0.ESC+"[1;"+(v+1)+"B",m||k.key!==u.C0.ESC+"[1;3B"||(k.key=u.C0.ESC+"[1;5B")):k.key=p?u.C0.ESC+"OB":u.C0.ESC+"[B";break;case 45:_.shiftKey||_.ctrlKey||(k.key=u.C0.ESC+"[2~");break;case 46:k.key=v?u.C0.ESC+"[3;"+(v+1)+"~":u.C0.ESC+"[3~";break;case 36:k.key=v?u.C0.ESC+"[1;"+(v+1)+"H":p?u.C0.ESC+"OH":u.C0.ESC+"[H";break;case 35:k.key=v?u.C0.ESC+"[1;"+(v+1)+"F":p?u.C0.ESC+"OF":u.C0.ESC+"[F";break;case 33:_.shiftKey?k.type=2:_.ctrlKey?k.key=u.C0.ESC+"[5;"+(v+1)+"~":k.key=u.C0.ESC+"[5~";break;case 34:_.shiftKey?k.type=3:_.ctrlKey?k.key=u.C0.ESC+"[6;"+(v+1)+"~":k.key=u.C0.ESC+"[6~";break;case 112:k.key=v?u.C0.ESC+"[1;"+(v+1)+"P":u.C0.ESC+"OP";break;case 113:k.key=v?u.C0.ESC+"[1;"+(v+1)+"Q":u.C0.ESC+"OQ";break;case 114:k.key=v?u.C0.ESC+"[1;"+(v+1)+"R":u.C0.ESC+"OR";break;case 115:k.key=v?u.C0.ESC+"[1;"+(v+1)+"S":u.C0.ESC+"OS";break;case 116:k.key=v?u.C0.ESC+"[15;"+(v+1)+"~":u.C0.ESC+"[15~";break;case 117:k.key=v?u.C0.ESC+"[17;"+(v+1)+"~":u.C0.ESC+"[17~";break;case 118:k.key=v?u.C0.ESC+"[18;"+(v+1)+"~":u.C0.ESC+"[18~";break;case 119:k.key=v?u.C0.ESC+"[19;"+(v+1)+"~":u.C0.ESC+"[19~";break;case 120:k.key=v?u.C0.ESC+"[20;"+(v+1)+"~":u.C0.ESC+"[20~";break;case 121:k.key=v?u.C0.ESC+"[21;"+(v+1)+"~":u.C0.ESC+"[21~";break;case 122:k.key=v?u.C0.ESC+"[23;"+(v+1)+"~":u.C0.ESC+"[23~";break;case 123:k.key=v?u.C0.ESC+"[24;"+(v+1)+"~":u.C0.ESC+"[24~";break;default:if(!_.ctrlKey||_.shiftKey||_.altKey||_.metaKey)if(m&&!x||!_.altKey||_.metaKey)!m||_.altKey||_.ctrlKey||_.shiftKey||!_.metaKey?_.key&&!_.ctrlKey&&!_.altKey&&!_.metaKey&&_.keyCode>=48&&_.key.length===1?k.key=_.key:_.key&&_.ctrlKey&&(_.key==="_"&&(k.key=u.C0.US),_.key==="@"&&(k.key=u.C0.NUL)):_.keyCode===65&&(k.type=1);else{const b=h[_.keyCode],w=b==null?void 0:b[_.shiftKey?1:0];if(w)k.key=u.C0.ESC+w;else if(_.keyCode>=65&&_.keyCode<=90){const y=_.ctrlKey?_.keyCode-64:_.keyCode+32;let C=String.fromCharCode(y);_.shiftKey&&(C=C.toUpperCase()),k.key=u.C0.ESC+C}else if(_.keyCode===32)k.key=u.C0.ESC+(_.ctrlKey?u.C0.NUL:" ");else if(_.key==="Dead"&&_.code.startsWith("Key")){let y=_.code.slice(3,4);_.shiftKey||(y=y.toLowerCase()),k.key=u.C0.ESC+y,k.cancel=!0}}else _.keyCode>=65&&_.keyCode<=90?k.key=String.fromCharCode(_.keyCode-64):_.keyCode===32?k.key=u.C0.NUL:_.keyCode>=51&&_.keyCode<=55?k.key=String.fromCharCode(_.keyCode-51+27):_.keyCode===56?k.key=u.C0.DEL:_.keyCode===219?k.key=u.C0.ESC:_.keyCode===220?k.key=u.C0.FS:_.keyCode===221&&(k.key=u.C0.GS)}return k}},482:(a,o)=>{Object.defineProperty(o,"__esModule",{value:!0}),o.Utf8ToUtf32=o.StringToUtf32=o.utf32ToString=o.stringFromCodePoint=void 0,o.stringFromCodePoint=function(l){return l>65535?(l-=65536,String.fromCharCode(55296+(l>>10))+String.fromCharCode(l%1024+56320)):String.fromCharCode(l)},o.utf32ToString=function(l,u=0,h=l.length){let _="";for(let p=u;p65535?(m-=65536,_+=String.fromCharCode(55296+(m>>10))+String.fromCharCode(m%1024+56320)):_+=String.fromCharCode(m)}return _},o.StringToUtf32=class{constructor(){this._interim=0}clear(){this._interim=0}decode(l,u){const h=l.length;if(!h)return 0;let _=0,p=0;if(this._interim){const m=l.charCodeAt(p++);56320<=m&&m<=57343?u[_++]=1024*(this._interim-55296)+m-56320+65536:(u[_++]=this._interim,u[_++]=m),this._interim=0}for(let m=p;m=h)return this._interim=x,_;const k=l.charCodeAt(m);56320<=k&&k<=57343?u[_++]=1024*(x-55296)+k-56320+65536:(u[_++]=x,u[_++]=k)}else x!==65279&&(u[_++]=x)}return _}},o.Utf8ToUtf32=class{constructor(){this.interim=new Uint8Array(3)}clear(){this.interim.fill(0)}decode(l,u){const h=l.length;if(!h)return 0;let _,p,m,x,k=0,v=0,b=0;if(this.interim[0]){let C=!1,N=this.interim[0];N&=(224&N)==192?31:(240&N)==224?15:7;let E,T=0;for(;(E=63&this.interim[++T])&&T<4;)N<<=6,N|=E;const j=(224&this.interim[0])==192?2:(240&this.interim[0])==224?3:4,M=j-T;for(;b=h)return 0;if(E=l[b++],(192&E)!=128){b--,C=!0;break}this.interim[T++]=E,N<<=6,N|=63&E}C||(j===2?N<128?b--:u[k++]=N:j===3?N<2048||N>=55296&&N<=57343||N===65279||(u[k++]=N):N<65536||N>1114111||(u[k++]=N)),this.interim.fill(0)}const w=h-4;let y=b;for(;y=h)return this.interim[0]=_,k;if(p=l[y++],(192&p)!=128){y--;continue}if(v=(31&_)<<6|63&p,v<128){y--;continue}u[k++]=v}else if((240&_)==224){if(y>=h)return this.interim[0]=_,k;if(p=l[y++],(192&p)!=128){y--;continue}if(y>=h)return this.interim[0]=_,this.interim[1]=p,k;if(m=l[y++],(192&m)!=128){y--;continue}if(v=(15&_)<<12|(63&p)<<6|63&m,v<2048||v>=55296&&v<=57343||v===65279)continue;u[k++]=v}else if((248&_)==240){if(y>=h)return this.interim[0]=_,k;if(p=l[y++],(192&p)!=128){y--;continue}if(y>=h)return this.interim[0]=_,this.interim[1]=p,k;if(m=l[y++],(192&m)!=128){y--;continue}if(y>=h)return this.interim[0]=_,this.interim[1]=p,this.interim[2]=m,k;if(x=l[y++],(192&x)!=128){y--;continue}if(v=(7&_)<<18|(63&p)<<12|(63&m)<<6|63&x,v<65536||v>1114111)continue;u[k++]=v}}return k}}},225:(a,o,l)=>{Object.defineProperty(o,"__esModule",{value:!0}),o.UnicodeV6=void 0;const u=l(1480),h=[[768,879],[1155,1158],[1160,1161],[1425,1469],[1471,1471],[1473,1474],[1476,1477],[1479,1479],[1536,1539],[1552,1557],[1611,1630],[1648,1648],[1750,1764],[1767,1768],[1770,1773],[1807,1807],[1809,1809],[1840,1866],[1958,1968],[2027,2035],[2305,2306],[2364,2364],[2369,2376],[2381,2381],[2385,2388],[2402,2403],[2433,2433],[2492,2492],[2497,2500],[2509,2509],[2530,2531],[2561,2562],[2620,2620],[2625,2626],[2631,2632],[2635,2637],[2672,2673],[2689,2690],[2748,2748],[2753,2757],[2759,2760],[2765,2765],[2786,2787],[2817,2817],[2876,2876],[2879,2879],[2881,2883],[2893,2893],[2902,2902],[2946,2946],[3008,3008],[3021,3021],[3134,3136],[3142,3144],[3146,3149],[3157,3158],[3260,3260],[3263,3263],[3270,3270],[3276,3277],[3298,3299],[3393,3395],[3405,3405],[3530,3530],[3538,3540],[3542,3542],[3633,3633],[3636,3642],[3655,3662],[3761,3761],[3764,3769],[3771,3772],[3784,3789],[3864,3865],[3893,3893],[3895,3895],[3897,3897],[3953,3966],[3968,3972],[3974,3975],[3984,3991],[3993,4028],[4038,4038],[4141,4144],[4146,4146],[4150,4151],[4153,4153],[4184,4185],[4448,4607],[4959,4959],[5906,5908],[5938,5940],[5970,5971],[6002,6003],[6068,6069],[6071,6077],[6086,6086],[6089,6099],[6109,6109],[6155,6157],[6313,6313],[6432,6434],[6439,6440],[6450,6450],[6457,6459],[6679,6680],[6912,6915],[6964,6964],[6966,6970],[6972,6972],[6978,6978],[7019,7027],[7616,7626],[7678,7679],[8203,8207],[8234,8238],[8288,8291],[8298,8303],[8400,8431],[12330,12335],[12441,12442],[43014,43014],[43019,43019],[43045,43046],[64286,64286],[65024,65039],[65056,65059],[65279,65279],[65529,65531]],_=[[68097,68099],[68101,68102],[68108,68111],[68152,68154],[68159,68159],[119143,119145],[119155,119170],[119173,119179],[119210,119213],[119362,119364],[917505,917505],[917536,917631],[917760,917999]];let p;o.UnicodeV6=class{constructor(){if(this.version="6",!p){p=new Uint8Array(65536),p.fill(1),p[0]=0,p.fill(0,1,32),p.fill(0,127,160),p.fill(2,4352,4448),p[9001]=2,p[9002]=2,p.fill(2,11904,42192),p[12351]=1,p.fill(2,44032,55204),p.fill(2,63744,64256),p.fill(2,65040,65050),p.fill(2,65072,65136),p.fill(2,65280,65377),p.fill(2,65504,65511);for(let m=0;mk[w][1])return!1;for(;w>=b;)if(v=b+w>>1,x>k[v][1])b=v+1;else{if(!(x=131072&&m<=196605||m>=196608&&m<=262141?2:1}charProperties(m,x){let k=this.wcwidth(m),v=k===0&&x!==0;if(v){const b=u.UnicodeService.extractWidth(x);b===0?v=!1:b>k&&(k=b)}return u.UnicodeService.createPropertyValue(0,k,v)}}},5981:(a,o,l)=>{Object.defineProperty(o,"__esModule",{value:!0}),o.WriteBuffer=void 0;const u=l(8460),h=l(844);class _ extends h.Disposable{constructor(m){super(),this._action=m,this._writeBuffer=[],this._callbacks=[],this._pendingData=0,this._bufferOffset=0,this._isSyncWriting=!1,this._syncCalls=0,this._didUserInput=!1,this._onWriteParsed=this.register(new u.EventEmitter),this.onWriteParsed=this._onWriteParsed.event}handleUserInput(){this._didUserInput=!0}writeSync(m,x){if(x!==void 0&&this._syncCalls>x)return void(this._syncCalls=0);if(this._pendingData+=m.length,this._writeBuffer.push(m),this._callbacks.push(void 0),this._syncCalls++,this._isSyncWriting)return;let k;for(this._isSyncWriting=!0;k=this._writeBuffer.shift();){this._action(k);const v=this._callbacks.shift();v&&v()}this._pendingData=0,this._bufferOffset=2147483647,this._isSyncWriting=!1,this._syncCalls=0}write(m,x){if(this._pendingData>5e7)throw new Error("write data discarded, use flow control to avoid losing data");if(!this._writeBuffer.length){if(this._bufferOffset=0,this._didUserInput)return this._didUserInput=!1,this._pendingData+=m.length,this._writeBuffer.push(m),this._callbacks.push(x),void this._innerWrite();setTimeout((()=>this._innerWrite()))}this._pendingData+=m.length,this._writeBuffer.push(m),this._callbacks.push(x)}_innerWrite(m=0,x=!0){const k=m||Date.now();for(;this._writeBuffer.length>this._bufferOffset;){const v=this._writeBuffer[this._bufferOffset],b=this._action(v,x);if(b){const y=C=>Date.now()-k>=12?setTimeout((()=>this._innerWrite(0,C))):this._innerWrite(k,C);return void b.catch((C=>(queueMicrotask((()=>{throw C})),Promise.resolve(!1)))).then(y)}const w=this._callbacks[this._bufferOffset];if(w&&w(),this._bufferOffset++,this._pendingData-=v.length,Date.now()-k>=12)break}this._writeBuffer.length>this._bufferOffset?(this._bufferOffset>50&&(this._writeBuffer=this._writeBuffer.slice(this._bufferOffset),this._callbacks=this._callbacks.slice(this._bufferOffset),this._bufferOffset=0),setTimeout((()=>this._innerWrite()))):(this._writeBuffer.length=0,this._callbacks.length=0,this._pendingData=0,this._bufferOffset=0),this._onWriteParsed.fire()}}o.WriteBuffer=_},5941:(a,o)=>{Object.defineProperty(o,"__esModule",{value:!0}),o.toRgbString=o.parseColor=void 0;const l=/^([\da-f])\/([\da-f])\/([\da-f])$|^([\da-f]{2})\/([\da-f]{2})\/([\da-f]{2})$|^([\da-f]{3})\/([\da-f]{3})\/([\da-f]{3})$|^([\da-f]{4})\/([\da-f]{4})\/([\da-f]{4})$/,u=/^[\da-f]+$/;function h(_,p){const m=_.toString(16),x=m.length<2?"0"+m:m;switch(p){case 4:return m[0];case 8:return x;case 12:return(x+x).slice(0,3);default:return x+x}}o.parseColor=function(_){if(!_)return;let p=_.toLowerCase();if(p.indexOf("rgb:")===0){p=p.slice(4);const m=l.exec(p);if(m){const x=m[1]?15:m[4]?255:m[7]?4095:65535;return[Math.round(parseInt(m[1]||m[4]||m[7]||m[10],16)/x*255),Math.round(parseInt(m[2]||m[5]||m[8]||m[11],16)/x*255),Math.round(parseInt(m[3]||m[6]||m[9]||m[12],16)/x*255)]}}else if(p.indexOf("#")===0&&(p=p.slice(1),u.exec(p)&&[3,6,9,12].includes(p.length))){const m=p.length/3,x=[0,0,0];for(let k=0;k<3;++k){const v=parseInt(p.slice(m*k,m*k+m),16);x[k]=m===1?v<<4:m===2?v:m===3?v>>4:v>>8}return x}},o.toRgbString=function(_,p=16){const[m,x,k]=_;return`rgb:${h(m,p)}/${h(x,p)}/${h(k,p)}`}},5770:(a,o)=>{Object.defineProperty(o,"__esModule",{value:!0}),o.PAYLOAD_LIMIT=void 0,o.PAYLOAD_LIMIT=1e7},6351:(a,o,l)=>{Object.defineProperty(o,"__esModule",{value:!0}),o.DcsHandler=o.DcsParser=void 0;const u=l(482),h=l(8742),_=l(5770),p=[];o.DcsParser=class{constructor(){this._handlers=Object.create(null),this._active=p,this._ident=0,this._handlerFb=()=>{},this._stack={paused:!1,loopPosition:0,fallThrough:!1}}dispose(){this._handlers=Object.create(null),this._handlerFb=()=>{},this._active=p}registerHandler(x,k){this._handlers[x]===void 0&&(this._handlers[x]=[]);const v=this._handlers[x];return v.push(k),{dispose:()=>{const b=v.indexOf(k);b!==-1&&v.splice(b,1)}}}clearHandler(x){this._handlers[x]&&delete this._handlers[x]}setHandlerFallback(x){this._handlerFb=x}reset(){if(this._active.length)for(let x=this._stack.paused?this._stack.loopPosition-1:this._active.length-1;x>=0;--x)this._active[x].unhook(!1);this._stack.paused=!1,this._active=p,this._ident=0}hook(x,k){if(this.reset(),this._ident=x,this._active=this._handlers[x]||p,this._active.length)for(let v=this._active.length-1;v>=0;v--)this._active[v].hook(k);else this._handlerFb(this._ident,"HOOK",k)}put(x,k,v){if(this._active.length)for(let b=this._active.length-1;b>=0;b--)this._active[b].put(x,k,v);else this._handlerFb(this._ident,"PUT",(0,u.utf32ToString)(x,k,v))}unhook(x,k=!0){if(this._active.length){let v=!1,b=this._active.length-1,w=!1;if(this._stack.paused&&(b=this._stack.loopPosition-1,v=k,w=this._stack.fallThrough,this._stack.paused=!1),!w&&v===!1){for(;b>=0&&(v=this._active[b].unhook(x),v!==!0);b--)if(v instanceof Promise)return this._stack.paused=!0,this._stack.loopPosition=b,this._stack.fallThrough=!1,v;b--}for(;b>=0;b--)if(v=this._active[b].unhook(!1),v instanceof Promise)return this._stack.paused=!0,this._stack.loopPosition=b,this._stack.fallThrough=!0,v}else this._handlerFb(this._ident,"UNHOOK",x);this._active=p,this._ident=0}};const m=new h.Params;m.addParam(0),o.DcsHandler=class{constructor(x){this._handler=x,this._data="",this._params=m,this._hitLimit=!1}hook(x){this._params=x.length>1||x.params[0]?x.clone():m,this._data="",this._hitLimit=!1}put(x,k,v){this._hitLimit||(this._data+=(0,u.utf32ToString)(x,k,v),this._data.length>_.PAYLOAD_LIMIT&&(this._data="",this._hitLimit=!0))}unhook(x){let k=!1;if(this._hitLimit)k=!1;else if(x&&(k=this._handler(this._data,this._params),k instanceof Promise))return k.then((v=>(this._params=m,this._data="",this._hitLimit=!1,v)));return this._params=m,this._data="",this._hitLimit=!1,k}}},2015:(a,o,l)=>{Object.defineProperty(o,"__esModule",{value:!0}),o.EscapeSequenceParser=o.VT500_TRANSITION_TABLE=o.TransitionTable=void 0;const u=l(844),h=l(8742),_=l(6242),p=l(6351);class m{constructor(b){this.table=new Uint8Array(b)}setDefault(b,w){this.table.fill(b<<4|w)}add(b,w,y,C){this.table[w<<8|b]=y<<4|C}addMany(b,w,y,C){for(let N=0;Nj)),w=(T,j)=>b.slice(T,j),y=w(32,127),C=w(0,24);C.push(25),C.push.apply(C,w(28,32));const N=w(0,14);let E;for(E in v.setDefault(1,0),v.addMany(y,0,2,0),N)v.addMany([24,26,153,154],E,3,0),v.addMany(w(128,144),E,3,0),v.addMany(w(144,152),E,3,0),v.add(156,E,0,0),v.add(27,E,11,1),v.add(157,E,4,8),v.addMany([152,158,159],E,0,7),v.add(155,E,11,3),v.add(144,E,11,9);return v.addMany(C,0,3,0),v.addMany(C,1,3,1),v.add(127,1,0,1),v.addMany(C,8,0,8),v.addMany(C,3,3,3),v.add(127,3,0,3),v.addMany(C,4,3,4),v.add(127,4,0,4),v.addMany(C,6,3,6),v.addMany(C,5,3,5),v.add(127,5,0,5),v.addMany(C,2,3,2),v.add(127,2,0,2),v.add(93,1,4,8),v.addMany(y,8,5,8),v.add(127,8,5,8),v.addMany([156,27,24,26,7],8,6,0),v.addMany(w(28,32),8,0,8),v.addMany([88,94,95],1,0,7),v.addMany(y,7,0,7),v.addMany(C,7,0,7),v.add(156,7,0,0),v.add(127,7,0,7),v.add(91,1,11,3),v.addMany(w(64,127),3,7,0),v.addMany(w(48,60),3,8,4),v.addMany([60,61,62,63],3,9,4),v.addMany(w(48,60),4,8,4),v.addMany(w(64,127),4,7,0),v.addMany([60,61,62,63],4,0,6),v.addMany(w(32,64),6,0,6),v.add(127,6,0,6),v.addMany(w(64,127),6,0,0),v.addMany(w(32,48),3,9,5),v.addMany(w(32,48),5,9,5),v.addMany(w(48,64),5,0,6),v.addMany(w(64,127),5,7,0),v.addMany(w(32,48),4,9,5),v.addMany(w(32,48),1,9,2),v.addMany(w(32,48),2,9,2),v.addMany(w(48,127),2,10,0),v.addMany(w(48,80),1,10,0),v.addMany(w(81,88),1,10,0),v.addMany([89,90,92],1,10,0),v.addMany(w(96,127),1,10,0),v.add(80,1,11,9),v.addMany(C,9,0,9),v.add(127,9,0,9),v.addMany(w(28,32),9,0,9),v.addMany(w(32,48),9,9,12),v.addMany(w(48,60),9,8,10),v.addMany([60,61,62,63],9,9,10),v.addMany(C,11,0,11),v.addMany(w(32,128),11,0,11),v.addMany(w(28,32),11,0,11),v.addMany(C,10,0,10),v.add(127,10,0,10),v.addMany(w(28,32),10,0,10),v.addMany(w(48,60),10,8,10),v.addMany([60,61,62,63],10,0,11),v.addMany(w(32,48),10,9,12),v.addMany(C,12,0,12),v.add(127,12,0,12),v.addMany(w(28,32),12,0,12),v.addMany(w(32,48),12,9,12),v.addMany(w(48,64),12,0,11),v.addMany(w(64,127),12,12,13),v.addMany(w(64,127),10,12,13),v.addMany(w(64,127),9,12,13),v.addMany(C,13,13,13),v.addMany(y,13,13,13),v.add(127,13,0,13),v.addMany([27,156,24,26],13,14,0),v.add(x,0,2,0),v.add(x,8,5,8),v.add(x,6,0,6),v.add(x,11,0,11),v.add(x,13,13,13),v})();class k extends u.Disposable{constructor(b=o.VT500_TRANSITION_TABLE){super(),this._transitions=b,this._parseStack={state:0,handlers:[],handlerPos:0,transition:0,chunkPos:0},this.initialState=0,this.currentState=this.initialState,this._params=new h.Params,this._params.addParam(0),this._collect=0,this.precedingJoinState=0,this._printHandlerFb=(w,y,C)=>{},this._executeHandlerFb=w=>{},this._csiHandlerFb=(w,y)=>{},this._escHandlerFb=w=>{},this._errorHandlerFb=w=>w,this._printHandler=this._printHandlerFb,this._executeHandlers=Object.create(null),this._csiHandlers=Object.create(null),this._escHandlers=Object.create(null),this.register((0,u.toDisposable)((()=>{this._csiHandlers=Object.create(null),this._executeHandlers=Object.create(null),this._escHandlers=Object.create(null)}))),this._oscParser=this.register(new _.OscParser),this._dcsParser=this.register(new p.DcsParser),this._errorHandler=this._errorHandlerFb,this.registerEscHandler({final:"\\"},(()=>!0))}_identifier(b,w=[64,126]){let y=0;if(b.prefix){if(b.prefix.length>1)throw new Error("only one byte as prefix supported");if(y=b.prefix.charCodeAt(0),y&&60>y||y>63)throw new Error("prefix must be in range 0x3c .. 0x3f")}if(b.intermediates){if(b.intermediates.length>2)throw new Error("only two bytes as intermediates are supported");for(let N=0;NE||E>47)throw new Error("intermediate must be in range 0x20 .. 0x2f");y<<=8,y|=E}}if(b.final.length!==1)throw new Error("final must be a single byte");const C=b.final.charCodeAt(0);if(w[0]>C||C>w[1])throw new Error(`final must be in range ${w[0]} .. ${w[1]}`);return y<<=8,y|=C,y}identToString(b){const w=[];for(;b;)w.push(String.fromCharCode(255&b)),b>>=8;return w.reverse().join("")}setPrintHandler(b){this._printHandler=b}clearPrintHandler(){this._printHandler=this._printHandlerFb}registerEscHandler(b,w){const y=this._identifier(b,[48,126]);this._escHandlers[y]===void 0&&(this._escHandlers[y]=[]);const C=this._escHandlers[y];return C.push(w),{dispose:()=>{const N=C.indexOf(w);N!==-1&&C.splice(N,1)}}}clearEscHandler(b){this._escHandlers[this._identifier(b,[48,126])]&&delete this._escHandlers[this._identifier(b,[48,126])]}setEscHandlerFallback(b){this._escHandlerFb=b}setExecuteHandler(b,w){this._executeHandlers[b.charCodeAt(0)]=w}clearExecuteHandler(b){this._executeHandlers[b.charCodeAt(0)]&&delete this._executeHandlers[b.charCodeAt(0)]}setExecuteHandlerFallback(b){this._executeHandlerFb=b}registerCsiHandler(b,w){const y=this._identifier(b);this._csiHandlers[y]===void 0&&(this._csiHandlers[y]=[]);const C=this._csiHandlers[y];return C.push(w),{dispose:()=>{const N=C.indexOf(w);N!==-1&&C.splice(N,1)}}}clearCsiHandler(b){this._csiHandlers[this._identifier(b)]&&delete this._csiHandlers[this._identifier(b)]}setCsiHandlerFallback(b){this._csiHandlerFb=b}registerDcsHandler(b,w){return this._dcsParser.registerHandler(this._identifier(b),w)}clearDcsHandler(b){this._dcsParser.clearHandler(this._identifier(b))}setDcsHandlerFallback(b){this._dcsParser.setHandlerFallback(b)}registerOscHandler(b,w){return this._oscParser.registerHandler(b,w)}clearOscHandler(b){this._oscParser.clearHandler(b)}setOscHandlerFallback(b){this._oscParser.setHandlerFallback(b)}setErrorHandler(b){this._errorHandler=b}clearErrorHandler(){this._errorHandler=this._errorHandlerFb}reset(){this.currentState=this.initialState,this._oscParser.reset(),this._dcsParser.reset(),this._params.reset(),this._params.addParam(0),this._collect=0,this.precedingJoinState=0,this._parseStack.state!==0&&(this._parseStack.state=2,this._parseStack.handlers=[])}_preserveStack(b,w,y,C,N){this._parseStack.state=b,this._parseStack.handlers=w,this._parseStack.handlerPos=y,this._parseStack.transition=C,this._parseStack.chunkPos=N}parse(b,w,y){let C,N=0,E=0,T=0;if(this._parseStack.state)if(this._parseStack.state===2)this._parseStack.state=0,T=this._parseStack.chunkPos+1;else{if(y===void 0||this._parseStack.state===1)throw this._parseStack.state=1,new Error("improper continuation due to previous async handler, giving up parsing");const j=this._parseStack.handlers;let M=this._parseStack.handlerPos-1;switch(this._parseStack.state){case 3:if(y===!1&&M>-1){for(;M>=0&&(C=j[M](this._params),C!==!0);M--)if(C instanceof Promise)return this._parseStack.handlerPos=M,C}this._parseStack.handlers=[];break;case 4:if(y===!1&&M>-1){for(;M>=0&&(C=j[M](),C!==!0);M--)if(C instanceof Promise)return this._parseStack.handlerPos=M,C}this._parseStack.handlers=[];break;case 6:if(N=b[this._parseStack.chunkPos],C=this._dcsParser.unhook(N!==24&&N!==26,y),C)return C;N===27&&(this._parseStack.transition|=1),this._params.reset(),this._params.addParam(0),this._collect=0;break;case 5:if(N=b[this._parseStack.chunkPos],C=this._oscParser.end(N!==24&&N!==26,y),C)return C;N===27&&(this._parseStack.transition|=1),this._params.reset(),this._params.addParam(0),this._collect=0}this._parseStack.state=0,T=this._parseStack.chunkPos+1,this.precedingJoinState=0,this.currentState=15&this._parseStack.transition}for(let j=T;j>4){case 2:for(let U=j+1;;++U){if(U>=w||(N=b[U])<32||N>126&&N=w||(N=b[U])<32||N>126&&N=w||(N=b[U])<32||N>126&&N=w||(N=b[U])<32||N>126&&N=0&&(C=M[D](this._params),C!==!0);D--)if(C instanceof Promise)return this._preserveStack(3,M,D,E,j),C;D<0&&this._csiHandlerFb(this._collect<<8|N,this._params),this.precedingJoinState=0;break;case 8:do switch(N){case 59:this._params.addParam(0);break;case 58:this._params.addSubParam(-1);break;default:this._params.addDigit(N-48)}while(++j47&&N<60);j--;break;case 9:this._collect<<=8,this._collect|=N;break;case 10:const I=this._escHandlers[this._collect<<8|N];let P=I?I.length-1:-1;for(;P>=0&&(C=I[P](),C!==!0);P--)if(C instanceof Promise)return this._preserveStack(4,I,P,E,j),C;P<0&&this._escHandlerFb(this._collect<<8|N),this.precedingJoinState=0;break;case 11:this._params.reset(),this._params.addParam(0),this._collect=0;break;case 12:this._dcsParser.hook(this._collect<<8|N,this._params);break;case 13:for(let U=j+1;;++U)if(U>=w||(N=b[U])===24||N===26||N===27||N>127&&N=w||(N=b[U])<32||N>127&&N{Object.defineProperty(o,"__esModule",{value:!0}),o.OscHandler=o.OscParser=void 0;const u=l(5770),h=l(482),_=[];o.OscParser=class{constructor(){this._state=0,this._active=_,this._id=-1,this._handlers=Object.create(null),this._handlerFb=()=>{},this._stack={paused:!1,loopPosition:0,fallThrough:!1}}registerHandler(p,m){this._handlers[p]===void 0&&(this._handlers[p]=[]);const x=this._handlers[p];return x.push(m),{dispose:()=>{const k=x.indexOf(m);k!==-1&&x.splice(k,1)}}}clearHandler(p){this._handlers[p]&&delete this._handlers[p]}setHandlerFallback(p){this._handlerFb=p}dispose(){this._handlers=Object.create(null),this._handlerFb=()=>{},this._active=_}reset(){if(this._state===2)for(let p=this._stack.paused?this._stack.loopPosition-1:this._active.length-1;p>=0;--p)this._active[p].end(!1);this._stack.paused=!1,this._active=_,this._id=-1,this._state=0}_start(){if(this._active=this._handlers[this._id]||_,this._active.length)for(let p=this._active.length-1;p>=0;p--)this._active[p].start();else this._handlerFb(this._id,"START")}_put(p,m,x){if(this._active.length)for(let k=this._active.length-1;k>=0;k--)this._active[k].put(p,m,x);else this._handlerFb(this._id,"PUT",(0,h.utf32ToString)(p,m,x))}start(){this.reset(),this._state=1}put(p,m,x){if(this._state!==3){if(this._state===1)for(;m0&&this._put(p,m,x)}}end(p,m=!0){if(this._state!==0){if(this._state!==3)if(this._state===1&&this._start(),this._active.length){let x=!1,k=this._active.length-1,v=!1;if(this._stack.paused&&(k=this._stack.loopPosition-1,x=m,v=this._stack.fallThrough,this._stack.paused=!1),!v&&x===!1){for(;k>=0&&(x=this._active[k].end(p),x!==!0);k--)if(x instanceof Promise)return this._stack.paused=!0,this._stack.loopPosition=k,this._stack.fallThrough=!1,x;k--}for(;k>=0;k--)if(x=this._active[k].end(!1),x instanceof Promise)return this._stack.paused=!0,this._stack.loopPosition=k,this._stack.fallThrough=!0,x}else this._handlerFb(this._id,"END",p);this._active=_,this._id=-1,this._state=0}}},o.OscHandler=class{constructor(p){this._handler=p,this._data="",this._hitLimit=!1}start(){this._data="",this._hitLimit=!1}put(p,m,x){this._hitLimit||(this._data+=(0,h.utf32ToString)(p,m,x),this._data.length>u.PAYLOAD_LIMIT&&(this._data="",this._hitLimit=!0))}end(p){let m=!1;if(this._hitLimit)m=!1;else if(p&&(m=this._handler(this._data),m instanceof Promise))return m.then((x=>(this._data="",this._hitLimit=!1,x)));return this._data="",this._hitLimit=!1,m}}},8742:(a,o)=>{Object.defineProperty(o,"__esModule",{value:!0}),o.Params=void 0;const l=2147483647;class u{static fromArray(_){const p=new u;if(!_.length)return p;for(let m=Array.isArray(_[0])?1:0;m<_.length;++m){const x=_[m];if(Array.isArray(x))for(let k=0;k256)throw new Error("maxSubParamsLength must not be greater than 256");this.params=new Int32Array(_),this.length=0,this._subParams=new Int32Array(p),this._subParamsLength=0,this._subParamsIdx=new Uint16Array(_),this._rejectDigits=!1,this._rejectSubDigits=!1,this._digitIsSub=!1}clone(){const _=new u(this.maxLength,this.maxSubParamsLength);return _.params.set(this.params),_.length=this.length,_._subParams.set(this._subParams),_._subParamsLength=this._subParamsLength,_._subParamsIdx.set(this._subParamsIdx),_._rejectDigits=this._rejectDigits,_._rejectSubDigits=this._rejectSubDigits,_._digitIsSub=this._digitIsSub,_}toArray(){const _=[];for(let p=0;p>8,x=255&this._subParamsIdx[p];x-m>0&&_.push(Array.prototype.slice.call(this._subParams,m,x))}return _}reset(){this.length=0,this._subParamsLength=0,this._rejectDigits=!1,this._rejectSubDigits=!1,this._digitIsSub=!1}addParam(_){if(this._digitIsSub=!1,this.length>=this.maxLength)this._rejectDigits=!0;else{if(_<-1)throw new Error("values lesser than -1 are not allowed");this._subParamsIdx[this.length]=this._subParamsLength<<8|this._subParamsLength,this.params[this.length++]=_>l?l:_}}addSubParam(_){if(this._digitIsSub=!0,this.length)if(this._rejectDigits||this._subParamsLength>=this.maxSubParamsLength)this._rejectSubDigits=!0;else{if(_<-1)throw new Error("values lesser than -1 are not allowed");this._subParams[this._subParamsLength++]=_>l?l:_,this._subParamsIdx[this.length-1]++}}hasSubParams(_){return(255&this._subParamsIdx[_])-(this._subParamsIdx[_]>>8)>0}getSubParams(_){const p=this._subParamsIdx[_]>>8,m=255&this._subParamsIdx[_];return m-p>0?this._subParams.subarray(p,m):null}getSubParamsAll(){const _={};for(let p=0;p>8,x=255&this._subParamsIdx[p];x-m>0&&(_[p]=this._subParams.slice(m,x))}return _}addDigit(_){let p;if(this._rejectDigits||!(p=this._digitIsSub?this._subParamsLength:this.length)||this._digitIsSub&&this._rejectSubDigits)return;const m=this._digitIsSub?this._subParams:this.params,x=m[p-1];m[p-1]=~x?Math.min(10*x+_,l):_}}o.Params=u},5741:(a,o)=>{Object.defineProperty(o,"__esModule",{value:!0}),o.AddonManager=void 0,o.AddonManager=class{constructor(){this._addons=[]}dispose(){for(let l=this._addons.length-1;l>=0;l--)this._addons[l].instance.dispose()}loadAddon(l,u){const h={instance:u,dispose:u.dispose,isDisposed:!1};this._addons.push(h),u.dispose=()=>this._wrappedAddonDispose(h),u.activate(l)}_wrappedAddonDispose(l){if(l.isDisposed)return;let u=-1;for(let h=0;h{Object.defineProperty(o,"__esModule",{value:!0}),o.BufferApiView=void 0;const u=l(3785),h=l(511);o.BufferApiView=class{constructor(_,p){this._buffer=_,this.type=p}init(_){return this._buffer=_,this}get cursorY(){return this._buffer.y}get cursorX(){return this._buffer.x}get viewportY(){return this._buffer.ydisp}get baseY(){return this._buffer.ybase}get length(){return this._buffer.lines.length}getLine(_){const p=this._buffer.lines.get(_);if(p)return new u.BufferLineApiView(p)}getNullCell(){return new h.CellData}}},3785:(a,o,l)=>{Object.defineProperty(o,"__esModule",{value:!0}),o.BufferLineApiView=void 0;const u=l(511);o.BufferLineApiView=class{constructor(h){this._line=h}get isWrapped(){return this._line.isWrapped}get length(){return this._line.length}getCell(h,_){if(!(h<0||h>=this._line.length))return _?(this._line.loadCell(h,_),_):this._line.loadCell(h,new u.CellData)}translateToString(h,_,p){return this._line.translateToString(h,_,p)}}},8285:(a,o,l)=>{Object.defineProperty(o,"__esModule",{value:!0}),o.BufferNamespaceApi=void 0;const u=l(8771),h=l(8460),_=l(844);class p extends _.Disposable{constructor(x){super(),this._core=x,this._onBufferChange=this.register(new h.EventEmitter),this.onBufferChange=this._onBufferChange.event,this._normal=new u.BufferApiView(this._core.buffers.normal,"normal"),this._alternate=new u.BufferApiView(this._core.buffers.alt,"alternate"),this._core.buffers.onBufferActivate((()=>this._onBufferChange.fire(this.active)))}get active(){if(this._core.buffers.active===this._core.buffers.normal)return this.normal;if(this._core.buffers.active===this._core.buffers.alt)return this.alternate;throw new Error("Active buffer is neither normal nor alternate")}get normal(){return this._normal.init(this._core.buffers.normal)}get alternate(){return this._alternate.init(this._core.buffers.alt)}}o.BufferNamespaceApi=p},7975:(a,o)=>{Object.defineProperty(o,"__esModule",{value:!0}),o.ParserApi=void 0,o.ParserApi=class{constructor(l){this._core=l}registerCsiHandler(l,u){return this._core.registerCsiHandler(l,(h=>u(h.toArray())))}addCsiHandler(l,u){return this.registerCsiHandler(l,u)}registerDcsHandler(l,u){return this._core.registerDcsHandler(l,((h,_)=>u(h,_.toArray())))}addDcsHandler(l,u){return this.registerDcsHandler(l,u)}registerEscHandler(l,u){return this._core.registerEscHandler(l,u)}addEscHandler(l,u){return this.registerEscHandler(l,u)}registerOscHandler(l,u){return this._core.registerOscHandler(l,u)}addOscHandler(l,u){return this.registerOscHandler(l,u)}}},7090:(a,o)=>{Object.defineProperty(o,"__esModule",{value:!0}),o.UnicodeApi=void 0,o.UnicodeApi=class{constructor(l){this._core=l}register(l){this._core.unicodeService.register(l)}get versions(){return this._core.unicodeService.versions}get activeVersion(){return this._core.unicodeService.activeVersion}set activeVersion(l){this._core.unicodeService.activeVersion=l}}},744:function(a,o,l){var u=this&&this.__decorate||function(v,b,w,y){var C,N=arguments.length,E=N<3?b:y===null?y=Object.getOwnPropertyDescriptor(b,w):y;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")E=Reflect.decorate(v,b,w,y);else for(var T=v.length-1;T>=0;T--)(C=v[T])&&(E=(N<3?C(E):N>3?C(b,w,E):C(b,w))||E);return N>3&&E&&Object.defineProperty(b,w,E),E},h=this&&this.__param||function(v,b){return function(w,y){b(w,y,v)}};Object.defineProperty(o,"__esModule",{value:!0}),o.BufferService=o.MINIMUM_ROWS=o.MINIMUM_COLS=void 0;const _=l(8460),p=l(844),m=l(5295),x=l(2585);o.MINIMUM_COLS=2,o.MINIMUM_ROWS=1;let k=o.BufferService=class extends p.Disposable{get buffer(){return this.buffers.active}constructor(v){super(),this.isUserScrolling=!1,this._onResize=this.register(new _.EventEmitter),this.onResize=this._onResize.event,this._onScroll=this.register(new _.EventEmitter),this.onScroll=this._onScroll.event,this.cols=Math.max(v.rawOptions.cols||0,o.MINIMUM_COLS),this.rows=Math.max(v.rawOptions.rows||0,o.MINIMUM_ROWS),this.buffers=this.register(new m.BufferSet(v,this))}resize(v,b){this.cols=v,this.rows=b,this.buffers.resize(v,b),this._onResize.fire({cols:v,rows:b})}reset(){this.buffers.reset(),this.isUserScrolling=!1}scroll(v,b=!1){const w=this.buffer;let y;y=this._cachedBlankLine,y&&y.length===this.cols&&y.getFg(0)===v.fg&&y.getBg(0)===v.bg||(y=w.getBlankLine(v,b),this._cachedBlankLine=y),y.isWrapped=b;const C=w.ybase+w.scrollTop,N=w.ybase+w.scrollBottom;if(w.scrollTop===0){const E=w.lines.isFull;N===w.lines.length-1?E?w.lines.recycle().copyFrom(y):w.lines.push(y.clone()):w.lines.splice(N+1,0,y.clone()),E?this.isUserScrolling&&(w.ydisp=Math.max(w.ydisp-1,0)):(w.ybase++,this.isUserScrolling||w.ydisp++)}else{const E=N-C+1;w.lines.shiftElements(C+1,E-1,-1),w.lines.set(N,y.clone())}this.isUserScrolling||(w.ydisp=w.ybase),this._onScroll.fire(w.ydisp)}scrollLines(v,b,w){const y=this.buffer;if(v<0){if(y.ydisp===0)return;this.isUserScrolling=!0}else v+y.ydisp>=y.ybase&&(this.isUserScrolling=!1);const C=y.ydisp;y.ydisp=Math.max(Math.min(y.ydisp+v,y.ybase),0),C!==y.ydisp&&(b||this._onScroll.fire(y.ydisp))}};o.BufferService=k=u([h(0,x.IOptionsService)],k)},7994:(a,o)=>{Object.defineProperty(o,"__esModule",{value:!0}),o.CharsetService=void 0,o.CharsetService=class{constructor(){this.glevel=0,this._charsets=[]}reset(){this.charset=void 0,this._charsets=[],this.glevel=0}setgLevel(l){this.glevel=l,this.charset=this._charsets[l]}setgCharset(l,u){this._charsets[l]=u,this.glevel===l&&(this.charset=u)}}},1753:function(a,o,l){var u=this&&this.__decorate||function(y,C,N,E){var T,j=arguments.length,M=j<3?C:E===null?E=Object.getOwnPropertyDescriptor(C,N):E;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")M=Reflect.decorate(y,C,N,E);else for(var D=y.length-1;D>=0;D--)(T=y[D])&&(M=(j<3?T(M):j>3?T(C,N,M):T(C,N))||M);return j>3&&M&&Object.defineProperty(C,N,M),M},h=this&&this.__param||function(y,C){return function(N,E){C(N,E,y)}};Object.defineProperty(o,"__esModule",{value:!0}),o.CoreMouseService=void 0;const _=l(2585),p=l(8460),m=l(844),x={NONE:{events:0,restrict:()=>!1},X10:{events:1,restrict:y=>y.button!==4&&y.action===1&&(y.ctrl=!1,y.alt=!1,y.shift=!1,!0)},VT200:{events:19,restrict:y=>y.action!==32},DRAG:{events:23,restrict:y=>y.action!==32||y.button!==3},ANY:{events:31,restrict:y=>!0}};function k(y,C){let N=(y.ctrl?16:0)|(y.shift?4:0)|(y.alt?8:0);return y.button===4?(N|=64,N|=y.action):(N|=3&y.button,4&y.button&&(N|=64),8&y.button&&(N|=128),y.action===32?N|=32:y.action!==0||C||(N|=3)),N}const v=String.fromCharCode,b={DEFAULT:y=>{const C=[k(y,!1)+32,y.col+32,y.row+32];return C[0]>255||C[1]>255||C[2]>255?"":`\x1B[M${v(C[0])}${v(C[1])}${v(C[2])}`},SGR:y=>{const C=y.action===0&&y.button!==4?"m":"M";return`\x1B[<${k(y,!0)};${y.col};${y.row}${C}`},SGR_PIXELS:y=>{const C=y.action===0&&y.button!==4?"m":"M";return`\x1B[<${k(y,!0)};${y.x};${y.y}${C}`}};let w=o.CoreMouseService=class extends m.Disposable{constructor(y,C){super(),this._bufferService=y,this._coreService=C,this._protocols={},this._encodings={},this._activeProtocol="",this._activeEncoding="",this._lastEvent=null,this._onProtocolChange=this.register(new p.EventEmitter),this.onProtocolChange=this._onProtocolChange.event;for(const N of Object.keys(x))this.addProtocol(N,x[N]);for(const N of Object.keys(b))this.addEncoding(N,b[N]);this.reset()}addProtocol(y,C){this._protocols[y]=C}addEncoding(y,C){this._encodings[y]=C}get activeProtocol(){return this._activeProtocol}get areMouseEventsActive(){return this._protocols[this._activeProtocol].events!==0}set activeProtocol(y){if(!this._protocols[y])throw new Error(`unknown protocol "${y}"`);this._activeProtocol=y,this._onProtocolChange.fire(this._protocols[y].events)}get activeEncoding(){return this._activeEncoding}set activeEncoding(y){if(!this._encodings[y])throw new Error(`unknown encoding "${y}"`);this._activeEncoding=y}reset(){this.activeProtocol="NONE",this.activeEncoding="DEFAULT",this._lastEvent=null}triggerMouseEvent(y){if(y.col<0||y.col>=this._bufferService.cols||y.row<0||y.row>=this._bufferService.rows||y.button===4&&y.action===32||y.button===3&&y.action!==32||y.button!==4&&(y.action===2||y.action===3)||(y.col++,y.row++,y.action===32&&this._lastEvent&&this._equalEvents(this._lastEvent,y,this._activeEncoding==="SGR_PIXELS"))||!this._protocols[this._activeProtocol].restrict(y))return!1;const C=this._encodings[this._activeEncoding](y);return C&&(this._activeEncoding==="DEFAULT"?this._coreService.triggerBinaryEvent(C):this._coreService.triggerDataEvent(C,!0)),this._lastEvent=y,!0}explainEvents(y){return{down:!!(1&y),up:!!(2&y),drag:!!(4&y),move:!!(8&y),wheel:!!(16&y)}}_equalEvents(y,C,N){if(N){if(y.x!==C.x||y.y!==C.y)return!1}else if(y.col!==C.col||y.row!==C.row)return!1;return y.button===C.button&&y.action===C.action&&y.ctrl===C.ctrl&&y.alt===C.alt&&y.shift===C.shift}};o.CoreMouseService=w=u([h(0,_.IBufferService),h(1,_.ICoreService)],w)},6975:function(a,o,l){var u=this&&this.__decorate||function(w,y,C,N){var E,T=arguments.length,j=T<3?y:N===null?N=Object.getOwnPropertyDescriptor(y,C):N;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")j=Reflect.decorate(w,y,C,N);else for(var M=w.length-1;M>=0;M--)(E=w[M])&&(j=(T<3?E(j):T>3?E(y,C,j):E(y,C))||j);return T>3&&j&&Object.defineProperty(y,C,j),j},h=this&&this.__param||function(w,y){return function(C,N){y(C,N,w)}};Object.defineProperty(o,"__esModule",{value:!0}),o.CoreService=void 0;const _=l(1439),p=l(8460),m=l(844),x=l(2585),k=Object.freeze({insertMode:!1}),v=Object.freeze({applicationCursorKeys:!1,applicationKeypad:!1,bracketedPasteMode:!1,origin:!1,reverseWraparound:!1,sendFocus:!1,wraparound:!0});let b=o.CoreService=class extends m.Disposable{constructor(w,y,C){super(),this._bufferService=w,this._logService=y,this._optionsService=C,this.isCursorInitialized=!1,this.isCursorHidden=!1,this._onData=this.register(new p.EventEmitter),this.onData=this._onData.event,this._onUserInput=this.register(new p.EventEmitter),this.onUserInput=this._onUserInput.event,this._onBinary=this.register(new p.EventEmitter),this.onBinary=this._onBinary.event,this._onRequestScrollToBottom=this.register(new p.EventEmitter),this.onRequestScrollToBottom=this._onRequestScrollToBottom.event,this.modes=(0,_.clone)(k),this.decPrivateModes=(0,_.clone)(v)}reset(){this.modes=(0,_.clone)(k),this.decPrivateModes=(0,_.clone)(v)}triggerDataEvent(w,y=!1){if(this._optionsService.rawOptions.disableStdin)return;const C=this._bufferService.buffer;y&&this._optionsService.rawOptions.scrollOnUserInput&&C.ybase!==C.ydisp&&this._onRequestScrollToBottom.fire(),y&&this._onUserInput.fire(),this._logService.debug(`sending data "${w}"`,(()=>w.split("").map((N=>N.charCodeAt(0))))),this._onData.fire(w)}triggerBinaryEvent(w){this._optionsService.rawOptions.disableStdin||(this._logService.debug(`sending binary "${w}"`,(()=>w.split("").map((y=>y.charCodeAt(0))))),this._onBinary.fire(w))}};o.CoreService=b=u([h(0,x.IBufferService),h(1,x.ILogService),h(2,x.IOptionsService)],b)},9074:(a,o,l)=>{Object.defineProperty(o,"__esModule",{value:!0}),o.DecorationService=void 0;const u=l(8055),h=l(8460),_=l(844),p=l(6106);let m=0,x=0;class k extends _.Disposable{get decorations(){return this._decorations.values()}constructor(){super(),this._decorations=new p.SortedList((w=>w==null?void 0:w.marker.line)),this._onDecorationRegistered=this.register(new h.EventEmitter),this.onDecorationRegistered=this._onDecorationRegistered.event,this._onDecorationRemoved=this.register(new h.EventEmitter),this.onDecorationRemoved=this._onDecorationRemoved.event,this.register((0,_.toDisposable)((()=>this.reset())))}registerDecoration(w){if(w.marker.isDisposed)return;const y=new v(w);if(y){const C=y.marker.onDispose((()=>y.dispose()));y.onDispose((()=>{y&&(this._decorations.delete(y)&&this._onDecorationRemoved.fire(y),C.dispose())})),this._decorations.insert(y),this._onDecorationRegistered.fire(y)}return y}reset(){for(const w of this._decorations.values())w.dispose();this._decorations.clear()}*getDecorationsAtCell(w,y,C){let N=0,E=0;for(const T of this._decorations.getKeyIterator(y))N=T.options.x??0,E=N+(T.options.width??1),w>=N&&w{m=E.options.x??0,x=m+(E.options.width??1),w>=m&&w{Object.defineProperty(o,"__esModule",{value:!0}),o.InstantiationService=o.ServiceCollection=void 0;const u=l(2585),h=l(8343);class _{constructor(...m){this._entries=new Map;for(const[x,k]of m)this.set(x,k)}set(m,x){const k=this._entries.get(m);return this._entries.set(m,x),k}forEach(m){for(const[x,k]of this._entries.entries())m(x,k)}has(m){return this._entries.has(m)}get(m){return this._entries.get(m)}}o.ServiceCollection=_,o.InstantiationService=class{constructor(){this._services=new _,this._services.set(u.IInstantiationService,this)}setService(p,m){this._services.set(p,m)}getService(p){return this._services.get(p)}createInstance(p,...m){const x=(0,h.getServiceDependencies)(p).sort(((b,w)=>b.index-w.index)),k=[];for(const b of x){const w=this._services.get(b.id);if(!w)throw new Error(`[createInstance] ${p.name} depends on UNKNOWN service ${b.id}.`);k.push(w)}const v=x.length>0?x[0].index:m.length;if(m.length!==v)throw new Error(`[createInstance] First service dependency of ${p.name} at position ${v+1} conflicts with ${m.length} static arguments`);return new p(...m,...k)}}},7866:function(a,o,l){var u=this&&this.__decorate||function(v,b,w,y){var C,N=arguments.length,E=N<3?b:y===null?y=Object.getOwnPropertyDescriptor(b,w):y;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")E=Reflect.decorate(v,b,w,y);else for(var T=v.length-1;T>=0;T--)(C=v[T])&&(E=(N<3?C(E):N>3?C(b,w,E):C(b,w))||E);return N>3&&E&&Object.defineProperty(b,w,E),E},h=this&&this.__param||function(v,b){return function(w,y){b(w,y,v)}};Object.defineProperty(o,"__esModule",{value:!0}),o.traceCall=o.setTraceLogger=o.LogService=void 0;const _=l(844),p=l(2585),m={trace:p.LogLevelEnum.TRACE,debug:p.LogLevelEnum.DEBUG,info:p.LogLevelEnum.INFO,warn:p.LogLevelEnum.WARN,error:p.LogLevelEnum.ERROR,off:p.LogLevelEnum.OFF};let x,k=o.LogService=class extends _.Disposable{get logLevel(){return this._logLevel}constructor(v){super(),this._optionsService=v,this._logLevel=p.LogLevelEnum.OFF,this._updateLogLevel(),this.register(this._optionsService.onSpecificOptionChange("logLevel",(()=>this._updateLogLevel()))),x=this}_updateLogLevel(){this._logLevel=m[this._optionsService.rawOptions.logLevel]}_evalLazyOptionalParams(v){for(let b=0;bJSON.stringify(E))).join(", ")})`);const N=y.apply(this,C);return x.trace(`GlyphRenderer#${y.name} return`,N),N}}},7302:(a,o,l)=>{Object.defineProperty(o,"__esModule",{value:!0}),o.OptionsService=o.DEFAULT_OPTIONS=void 0;const u=l(8460),h=l(844),_=l(6114);o.DEFAULT_OPTIONS={cols:80,rows:24,cursorBlink:!1,cursorStyle:"block",cursorWidth:1,cursorInactiveStyle:"outline",customGlyphs:!0,drawBoldTextInBrightColors:!0,documentOverride:null,fastScrollModifier:"alt",fastScrollSensitivity:5,fontFamily:"courier-new, courier, monospace",fontSize:15,fontWeight:"normal",fontWeightBold:"bold",ignoreBracketedPasteMode:!1,lineHeight:1,letterSpacing:0,linkHandler:null,logLevel:"info",logger:null,scrollback:1e3,scrollOnUserInput:!0,scrollSensitivity:1,screenReaderMode:!1,smoothScrollDuration:0,macOptionIsMeta:!1,macOptionClickForcesSelection:!1,minimumContrastRatio:1,disableStdin:!1,allowProposedApi:!1,allowTransparency:!1,tabStopWidth:8,theme:{},rescaleOverlappingGlyphs:!1,rightClickSelectsWord:_.isMac,windowOptions:{},windowsMode:!1,windowsPty:{},wordSeparator:" ()[]{}',\"`",altClickMovesCursor:!0,convertEol:!1,termName:"xterm",cancelEvents:!1,overviewRulerWidth:0};const p=["normal","bold","100","200","300","400","500","600","700","800","900"];class m extends h.Disposable{constructor(k){super(),this._onOptionChange=this.register(new u.EventEmitter),this.onOptionChange=this._onOptionChange.event;const v={...o.DEFAULT_OPTIONS};for(const b in k)if(b in v)try{const w=k[b];v[b]=this._sanitizeAndValidateOption(b,w)}catch(w){console.error(w)}this.rawOptions=v,this.options={...v},this._setupOptions(),this.register((0,h.toDisposable)((()=>{this.rawOptions.linkHandler=null,this.rawOptions.documentOverride=null})))}onSpecificOptionChange(k,v){return this.onOptionChange((b=>{b===k&&v(this.rawOptions[k])}))}onMultipleOptionChange(k,v){return this.onOptionChange((b=>{k.indexOf(b)!==-1&&v()}))}_setupOptions(){const k=b=>{if(!(b in o.DEFAULT_OPTIONS))throw new Error(`No option with key "${b}"`);return this.rawOptions[b]},v=(b,w)=>{if(!(b in o.DEFAULT_OPTIONS))throw new Error(`No option with key "${b}"`);w=this._sanitizeAndValidateOption(b,w),this.rawOptions[b]!==w&&(this.rawOptions[b]=w,this._onOptionChange.fire(b))};for(const b in this.rawOptions){const w={get:k.bind(this,b),set:v.bind(this,b)};Object.defineProperty(this.options,b,w)}}_sanitizeAndValidateOption(k,v){switch(k){case"cursorStyle":if(v||(v=o.DEFAULT_OPTIONS[k]),!(function(b){return b==="block"||b==="underline"||b==="bar"})(v))throw new Error(`"${v}" is not a valid value for ${k}`);break;case"wordSeparator":v||(v=o.DEFAULT_OPTIONS[k]);break;case"fontWeight":case"fontWeightBold":if(typeof v=="number"&&1<=v&&v<=1e3)break;v=p.includes(v)?v:o.DEFAULT_OPTIONS[k];break;case"cursorWidth":v=Math.floor(v);case"lineHeight":case"tabStopWidth":if(v<1)throw new Error(`${k} cannot be less than 1, value: ${v}`);break;case"minimumContrastRatio":v=Math.max(1,Math.min(21,Math.round(10*v)/10));break;case"scrollback":if((v=Math.min(v,4294967295))<0)throw new Error(`${k} cannot be less than 0, value: ${v}`);break;case"fastScrollSensitivity":case"scrollSensitivity":if(v<=0)throw new Error(`${k} cannot be less than or equal to 0, value: ${v}`);break;case"rows":case"cols":if(!v&&v!==0)throw new Error(`${k} must be numeric, value: ${v}`);break;case"windowsPty":v=v??{}}return v}}o.OptionsService=m},2660:function(a,o,l){var u=this&&this.__decorate||function(m,x,k,v){var b,w=arguments.length,y=w<3?x:v===null?v=Object.getOwnPropertyDescriptor(x,k):v;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")y=Reflect.decorate(m,x,k,v);else for(var C=m.length-1;C>=0;C--)(b=m[C])&&(y=(w<3?b(y):w>3?b(x,k,y):b(x,k))||y);return w>3&&y&&Object.defineProperty(x,k,y),y},h=this&&this.__param||function(m,x){return function(k,v){x(k,v,m)}};Object.defineProperty(o,"__esModule",{value:!0}),o.OscLinkService=void 0;const _=l(2585);let p=o.OscLinkService=class{constructor(m){this._bufferService=m,this._nextId=1,this._entriesWithId=new Map,this._dataByLinkId=new Map}registerLink(m){const x=this._bufferService.buffer;if(m.id===void 0){const C=x.addMarker(x.ybase+x.y),N={data:m,id:this._nextId++,lines:[C]};return C.onDispose((()=>this._removeMarkerFromLink(N,C))),this._dataByLinkId.set(N.id,N),N.id}const k=m,v=this._getEntryIdKey(k),b=this._entriesWithId.get(v);if(b)return this.addLineToLink(b.id,x.ybase+x.y),b.id;const w=x.addMarker(x.ybase+x.y),y={id:this._nextId++,key:this._getEntryIdKey(k),data:k,lines:[w]};return w.onDispose((()=>this._removeMarkerFromLink(y,w))),this._entriesWithId.set(y.key,y),this._dataByLinkId.set(y.id,y),y.id}addLineToLink(m,x){const k=this._dataByLinkId.get(m);if(k&&k.lines.every((v=>v.line!==x))){const v=this._bufferService.buffer.addMarker(x);k.lines.push(v),v.onDispose((()=>this._removeMarkerFromLink(k,v)))}}getLinkData(m){var x;return(x=this._dataByLinkId.get(m))==null?void 0:x.data}_getEntryIdKey(m){return`${m.id};;${m.uri}`}_removeMarkerFromLink(m,x){const k=m.lines.indexOf(x);k!==-1&&(m.lines.splice(k,1),m.lines.length===0&&(m.data.id!==void 0&&this._entriesWithId.delete(m.key),this._dataByLinkId.delete(m.id)))}};o.OscLinkService=p=u([h(0,_.IBufferService)],p)},8343:(a,o)=>{Object.defineProperty(o,"__esModule",{value:!0}),o.createDecorator=o.getServiceDependencies=o.serviceRegistry=void 0;const l="di$target",u="di$dependencies";o.serviceRegistry=new Map,o.getServiceDependencies=function(h){return h[u]||[]},o.createDecorator=function(h){if(o.serviceRegistry.has(h))return o.serviceRegistry.get(h);const _=function(p,m,x){if(arguments.length!==3)throw new Error("@IServiceName-decorator can only be used to decorate a parameter");(function(k,v,b){v[l]===v?v[u].push({id:k,index:b}):(v[u]=[{id:k,index:b}],v[l]=v)})(_,p,x)};return _.toString=()=>h,o.serviceRegistry.set(h,_),_}},2585:(a,o,l)=>{Object.defineProperty(o,"__esModule",{value:!0}),o.IDecorationService=o.IUnicodeService=o.IOscLinkService=o.IOptionsService=o.ILogService=o.LogLevelEnum=o.IInstantiationService=o.ICharsetService=o.ICoreService=o.ICoreMouseService=o.IBufferService=void 0;const u=l(8343);var h;o.IBufferService=(0,u.createDecorator)("BufferService"),o.ICoreMouseService=(0,u.createDecorator)("CoreMouseService"),o.ICoreService=(0,u.createDecorator)("CoreService"),o.ICharsetService=(0,u.createDecorator)("CharsetService"),o.IInstantiationService=(0,u.createDecorator)("InstantiationService"),(function(_){_[_.TRACE=0]="TRACE",_[_.DEBUG=1]="DEBUG",_[_.INFO=2]="INFO",_[_.WARN=3]="WARN",_[_.ERROR=4]="ERROR",_[_.OFF=5]="OFF"})(h||(o.LogLevelEnum=h={})),o.ILogService=(0,u.createDecorator)("LogService"),o.IOptionsService=(0,u.createDecorator)("OptionsService"),o.IOscLinkService=(0,u.createDecorator)("OscLinkService"),o.IUnicodeService=(0,u.createDecorator)("UnicodeService"),o.IDecorationService=(0,u.createDecorator)("DecorationService")},1480:(a,o,l)=>{Object.defineProperty(o,"__esModule",{value:!0}),o.UnicodeService=void 0;const u=l(8460),h=l(225);class _{static extractShouldJoin(m){return(1&m)!=0}static extractWidth(m){return m>>1&3}static extractCharKind(m){return m>>3}static createPropertyValue(m,x,k=!1){return(16777215&m)<<3|(3&x)<<1|(k?1:0)}constructor(){this._providers=Object.create(null),this._active="",this._onChange=new u.EventEmitter,this.onChange=this._onChange.event;const m=new h.UnicodeV6;this.register(m),this._active=m.version,this._activeProvider=m}dispose(){this._onChange.dispose()}get versions(){return Object.keys(this._providers)}get activeVersion(){return this._active}set activeVersion(m){if(!this._providers[m])throw new Error(`unknown Unicode version "${m}"`);this._active=m,this._activeProvider=this._providers[m],this._onChange.fire(m)}register(m){this._providers[m.version]=m}wcwidth(m){return this._activeProvider.wcwidth(m)}getStringCellWidth(m){let x=0,k=0;const v=m.length;for(let b=0;b=v)return x+this.wcwidth(w);const N=m.charCodeAt(b);56320<=N&&N<=57343?w=1024*(w-55296)+N-56320+65536:x+=this.wcwidth(N)}const y=this.charProperties(w,k);let C=_.extractWidth(y);_.extractShouldJoin(y)&&(C-=_.extractWidth(k)),x+=C,k=y}return x}charProperties(m,x){return this._activeProvider.charProperties(m,x)}}o.UnicodeService=_}},r={};function s(a){var o=r[a];if(o!==void 0)return o.exports;var l=r[a]={exports:{}};return t[a].call(l.exports,l,l.exports,s),l.exports}var i={};return(()=>{var a=i;Object.defineProperty(a,"__esModule",{value:!0}),a.Terminal=void 0;const o=s(9042),l=s(3236),u=s(844),h=s(5741),_=s(8285),p=s(7975),m=s(7090),x=["cols","rows"];class k extends u.Disposable{constructor(b){super(),this._core=this.register(new l.Terminal(b)),this._addonManager=this.register(new h.AddonManager),this._publicOptions={...this._core.options};const w=C=>this._core.options[C],y=(C,N)=>{this._checkReadonlyOptions(C),this._core.options[C]=N};for(const C in this._core.options){const N={get:w.bind(this,C),set:y.bind(this,C)};Object.defineProperty(this._publicOptions,C,N)}}_checkReadonlyOptions(b){if(x.includes(b))throw new Error(`Option "${b}" can only be set in the constructor`)}_checkProposedApi(){if(!this._core.optionsService.rawOptions.allowProposedApi)throw new Error("You must set the allowProposedApi option to true to use proposed API")}get onBell(){return this._core.onBell}get onBinary(){return this._core.onBinary}get onCursorMove(){return this._core.onCursorMove}get onData(){return this._core.onData}get onKey(){return this._core.onKey}get onLineFeed(){return this._core.onLineFeed}get onRender(){return this._core.onRender}get onResize(){return this._core.onResize}get onScroll(){return this._core.onScroll}get onSelectionChange(){return this._core.onSelectionChange}get onTitleChange(){return this._core.onTitleChange}get onWriteParsed(){return this._core.onWriteParsed}get element(){return this._core.element}get parser(){return this._parser||(this._parser=new p.ParserApi(this._core)),this._parser}get unicode(){return this._checkProposedApi(),new m.UnicodeApi(this._core)}get textarea(){return this._core.textarea}get rows(){return this._core.rows}get cols(){return this._core.cols}get buffer(){return this._buffer||(this._buffer=this.register(new _.BufferNamespaceApi(this._core))),this._buffer}get markers(){return this._checkProposedApi(),this._core.markers}get modes(){const b=this._core.coreService.decPrivateModes;let w="none";switch(this._core.coreMouseService.activeProtocol){case"X10":w="x10";break;case"VT200":w="vt200";break;case"DRAG":w="drag";break;case"ANY":w="any"}return{applicationCursorKeysMode:b.applicationCursorKeys,applicationKeypadMode:b.applicationKeypad,bracketedPasteMode:b.bracketedPasteMode,insertMode:this._core.coreService.modes.insertMode,mouseTrackingMode:w,originMode:b.origin,reverseWraparoundMode:b.reverseWraparound,sendFocusMode:b.sendFocus,wraparoundMode:b.wraparound}}get options(){return this._publicOptions}set options(b){for(const w in b)this._publicOptions[w]=b[w]}blur(){this._core.blur()}focus(){this._core.focus()}input(b,w=!0){this._core.input(b,w)}resize(b,w){this._verifyIntegers(b,w),this._core.resize(b,w)}open(b){this._core.open(b)}attachCustomKeyEventHandler(b){this._core.attachCustomKeyEventHandler(b)}attachCustomWheelEventHandler(b){this._core.attachCustomWheelEventHandler(b)}registerLinkProvider(b){return this._core.registerLinkProvider(b)}registerCharacterJoiner(b){return this._checkProposedApi(),this._core.registerCharacterJoiner(b)}deregisterCharacterJoiner(b){this._checkProposedApi(),this._core.deregisterCharacterJoiner(b)}registerMarker(b=0){return this._verifyIntegers(b),this._core.registerMarker(b)}registerDecoration(b){return this._checkProposedApi(),this._verifyPositiveIntegers(b.x??0,b.width??0,b.height??0),this._core.registerDecoration(b)}hasSelection(){return this._core.hasSelection()}select(b,w,y){this._verifyIntegers(b,w,y),this._core.select(b,w,y)}getSelection(){return this._core.getSelection()}getSelectionPosition(){return this._core.getSelectionPosition()}clearSelection(){this._core.clearSelection()}selectAll(){this._core.selectAll()}selectLines(b,w){this._verifyIntegers(b,w),this._core.selectLines(b,w)}dispose(){super.dispose()}scrollLines(b){this._verifyIntegers(b),this._core.scrollLines(b)}scrollPages(b){this._verifyIntegers(b),this._core.scrollPages(b)}scrollToTop(){this._core.scrollToTop()}scrollToBottom(){this._core.scrollToBottom()}scrollToLine(b){this._verifyIntegers(b),this._core.scrollToLine(b)}clear(){this._core.clear()}write(b,w){this._core.write(b,w)}writeln(b,w){this._core.write(b),this._core.write(`\r -`,w)}paste(b){this._core.paste(b)}refresh(b,w){this._verifyIntegers(b,w),this._core.refresh(b,w)}reset(){this._core.reset()}clearTextureAtlas(){this._core.clearTextureAtlas()}loadAddon(b){this._addonManager.loadAddon(this,b)}static get strings(){return o}_verifyIntegers(...b){for(const w of b)if(w===1/0||isNaN(w)||w%1!=0)throw new Error("This API only accepts integers")}_verifyPositiveIntegers(...b){for(const w of b)if(w&&(w===1/0||isNaN(w)||w%1!=0||w<0))throw new Error("This API only accepts positive integers")}}a.Terminal=k})(),i})()))})(tw)),tw.exports}var TI=fyn();const dyn=["black","red","green","yellow","blue","magenta","cyan","white","brightBlack","brightRed","brightGreen","brightYellow","brightBlue","brightMagenta","brightCyan","brightWhite"];function Xz(e,n){const t=document.documentElement,r=getComputedStyle(t),s=a=>r.getPropertyValue(n==="app"?`--term-app-${a}`:`--term-${a}`).trim(),i={};if(n==="app"&&t.dataset.theme!=="dark")for(const a of dyn){const o=r.getPropertyValue(`--term-app-ansi-${a.replace(/[A-Z]/g,l=>`-${l.toLowerCase()}`)}`).trim();o&&(i[a]=o)}return{...i,background:s("bg"),foreground:s("foreground"),cursor:s(e?"bg":"foreground"),cursorAccent:s("bg"),selectionBackground:s("selection")}}function zb(e,n,t=!1,r="dark"){const s=getComputedStyle(document.documentElement),i=new TI.Terminal({convertEol:!0,disableStdin:n,cursorBlink:!n,cursorStyle:"bar",cursorWidth:2,fontSize:12,fontFamily:s.getPropertyValue("--mono").trim()||"ui-monospace, Menlo, Consolas, monospace",scrollback:2e4,theme:Xz(n,r)}),a=r==="app"?new MutationObserver(()=>{i.options.theme=Xz(i.options.disableStdin??n,r)}):null;a==null||a.observe(document.documentElement,{attributes:!0,attributeFilter:["data-theme"]});const o=new cyn.FitAddon;i.loadAddon(o),t&&i.loadAddon(new _yn.WebLinksAddon((w,y)=>{let C;try{C=new URL(y)}catch{return}(C.protocol==="http:"||C.protocol==="https:")&&window.open(C,"_blank","noopener,noreferrer")}));const l=e.style.overflowY;e.style.overflowY="auto",i.open(e);let u=!0,h=null;const _=()=>{if(h===e.scrollTop){h=null;return}h=null,u=e.scrollTop+e.clientHeight>=e.scrollHeight-1};e.addEventListener("scroll",_);const p=()=>{var j;const w=i.element,y=w==null?void 0:w.querySelector(".xterm-screen"),C=w==null?void 0:w.querySelector(".xterm-viewport");if(!w||!(y instanceof HTMLElement)||!(C instanceof HTMLElement))return;const N=i.buffer.active;let E=Math.max(0,N.baseY+N.cursorY-N.viewportY+1);for(let M=i.rows-1;M>=E;M--)if((j=N.getLine(N.viewportY+M))!=null&&j.translateToString(!0).trim()){E=M+1;break}const T=y.getBoundingClientRect().height;w.style.height=`${Math.max(e.clientHeight,Math.min(E,i.rows)*T/i.rows)}px`,w.style.overflow="hidden",C.style.height=`${T}px`},m=()=>{try{const w=o.proposeDimensions();w&&(i.resize(w.cols,Math.max(w.rows,n?1:40)),p())}catch{}};m();const x=new ResizeObserver(m);x.observe(e);const k=i.onWriteParsed(()=>{var y;const w=u&&i.buffer.active.viewportY===i.buffer.active.baseY;if(p(),w){const C=(y=i.element)==null?void 0:y.querySelector(".xterm-screen");if(C instanceof HTMLElement){const N=(i.buffer.active.cursorY+1)*C.getBoundingClientRect().height/i.rows;e.scrollTop=Math.max(0,N-e.clientHeight),h=e.scrollTop}}}),v=i.onScroll(p),b=w=>{(w.deltaY<0?e.scrollTop>0:e.scrollTop+e.clientHeighttypeof n=="string")}function hyn(e){return cf(e)&&typeof e.reachable=="boolean"&&typeof e.toolsFound=="boolean"&&(e.missingTools===void 0||RI(e.missingTools))&&(e.error===null||typeof e.error=="string")&&typeof e.testedAt=="number"}function pyn(e){return cf(e)&&typeof e.reachable=="boolean"&&typeof e.slurmFound=="boolean"&&typeof e.toolsFound=="boolean"&&RI(e.partitions)&&(e.error===null||typeof e.error=="string")}function myn(e){return!cf(e)||e.type!=="complete"?null:e.backend==="ssh"&&hyn(e.result)?{backend:"ssh",result:e.result}:e.backend==="slurm"&&pyn(e.result)?{backend:"slurm",result:e.result}:null}function MI(e){return cf(e)&&e.type==="complete"}function gyn(e){return cf(e)&&e.type==="error"&&typeof e.error=="string"?e.error:null}function lS({host:e,backend:n,path:t="/api/settings/ssh/connect",active:r=!0,onComplete:s,onError:i}){const a=new URLSearchParams({host:e,backend:n});return f.jsx(jb,{path:`${t}?${a}`,label:lL({host:Ne(e)}),active:r,onError:i,onComplete:o=>{const l=myn(o);return l?(s(l),!0):!1}})}function vyn({login:e,onComplete:n,onError:t}){return f.jsx(jb,{path:e?"/api/settings/openresearch/login":"/api/settings/openresearch/ssh-key",label:e?"orx login":"orx ssh-key add",heightClass:"h-96",onError:t,onComplete:r=>MI(r)?(n(),!0):!1})}function byn({path:e,label:n,onComplete:t,onError:r,onClose:s}){const[i,a]=A.useState("running");return f.jsxs("div",{className:"mt-4 overflow-hidden rounded-lg border border-border",children:[f.jsxs("div",{className:"flex h-9 items-center gap-3 border-b border-b-border-variant bg-surface ps-3 pe-1.5",children:[f.jsx("code",{dir:"ltr",className:"min-w-0 flex-1 truncate font-mono text-xs text-subtext",children:n}),f.jsx("span",{role:"status",className:"flex shrink-0 items-center gap-1.5 text-xs text-subtext",children:i==="running"?f.jsxs(f.Fragment,{children:[f.jsx(Rt,{className:"border-t-accent-amber"})," ",HCt()]}):i==="done"?f.jsxs(f.Fragment,{children:[f.jsx(Ji,{size:13,strokeWidth:2.5,className:"text-accent-green"})," ",zCt()]}):i==="failed"?f.jsxs(f.Fragment,{children:[f.jsx(_r,{size:13,strokeWidth:2.5,className:"text-accent-red"})," ",DCt()]}):xCt()}),f.jsx("button",{type:"button",onClick:s,"aria-label":sz(),title:sz(),className:"ms-1 inline-flex h-6 w-6 shrink-0 cursor-pointer items-center justify-center rounded-md border-0 bg-transparent text-muted [&:hover]:bg-highlight [&:hover]:text-text",children:f.jsx(_r,{size:14})})]}),f.jsx(jb,{path:e,label:n,heightClass:"h-80",frame:"bare",palette:"app",shellAfter:!0,onError:(o,l)=>{a("failed"),l&&r(o)},onComplete:o=>MI(o)?(a("done"),t(),!0):!1,onClosed:()=>a(o=>o==="running"?"closed":o)})]})}function jb({path:e,label:n,command:t,heightClass:r="h-40",frame:s="card",palette:i="dark",shellAfter:a=!1,active:o=!0,awaitingApproval:l=!1,onComplete:u,onError:h,onClosed:_}){const p=A.useRef(null),m=A.useRef(null),x=A.useRef(u),k=A.useRef(h),v=A.useRef(_),[b,w]=A.useState(null);return x.current=u,k.current=h,v.current=_,A.useEffect(()=>{const y=p.current;if(!y)return;const{terminal:C,dispose:N}=zb(y,l,!0,i);if(m.current=C,l)return t&&C.writeln(`$ ${t}`),()=>{m.current=null,N()};C.focus();const E=location.protocol==="https:"?"wss:":"ws:",T=new URL(e,`${E}//${location.host}`),j=new WebSocket(T);j.binaryType="arraybuffer";let M=!1,D=!1,I=!1;const P=(W,H)=>{var Y;if(D){H||C.writeln(W);return}D=!0,(!I||a)&&C.writeln(W),(Y=k.current)==null||Y.call(k,W,H),!(a&&!H)&&(C.options.disableStdin=!0,C.blur(),w(W))},U=C.onData(W=>{j.readyState===WebSocket.OPEN&&j.send(new TextEncoder().encode(W))}),q=C.onResize(({cols:W,rows:H})=>{j.readyState===WebSocket.OPEN&&j.send(JSON.stringify({type:"resize",cols:W,rows:H}))});return j.onopen=()=>{t&&C.writeln(`$ ${t}`),j.send(JSON.stringify({type:"resize",cols:C.cols,rows:C.rows}))},j.onmessage=W=>{if(W.data instanceof ArrayBuffer){I=!0,C.write(new Uint8Array(W.data));return}if(typeof W.data!="string")return;let H;try{H=JSON.parse(W.data)}catch{return}if(x.current(H)){M=!0,a||j.close();return}const Y=gyn(H);Y&&(M?C.writeln(Y):P(Y,!a))},j.onerror=()=>P(bv(),!0),j.onclose=()=>{var W;if(!M&&!D){P(bv(),!0);return}a&&(C.options.disableStdin=!0,C.blur(),(W=v.current)==null||W.call(v))},()=>{j.onopen=null,j.onmessage=null,j.onerror=null,j.onclose=null,U.dispose(),q.dispose(),j.close(),m.current=null,N()}},[e,t,l,i,a]),A.useEffect(()=>{const y=m.current;y&&(y.options.disableStdin=l||!o||b!==null,!l&&o&&b===null?y.focus():y.blur())},[o,b,l]),f.jsxs("div",{className:s==="card"?"mt-3":void 0,children:[f.jsx("div",{className:`${r} ${s==="card"?AI:`overflow-hidden p-3 ${i==="app"?"bg-terminal-app":"bg-terminal"}`}`,role:"group","aria-label":n,children:f.jsx("div",{ref:p,className:"h-full overflow-hidden"})}),b?f.jsx("p",{role:"alert",className:"sr-only",children:b}):null]})}function yyn({host:e,transcript:n}){const t=A.useRef(null);return A.useEffect(()=>{const r=t.current;if(!r)return;const{terminal:s,dispose:i}=zb(r,!0,!0);return s.write(n),i},[n]),f.jsx("div",{className:`mt-3 h-40 ${AI}`,role:"group","aria-label":lL({host:Ne(e)}),children:f.jsx("div",{ref:t,className:"h-full overflow-hidden"})})}let Nv=null,Fp=0;const cS=()=>Nv;function OI(){const e=Fp;return zI(async(n,t)=>{if(e!==Fp)return;const r=await upn(n,t);e===Fp&&rt.setQueryData(fm().queryKey,s=>s?{...s,workspace:r.workspace}:r)},n=>{e===Fp&&Vn(n instanceof Error?n.message:String(n),"error",{id:"workspace-save",action:{label:Vs(),onClick:()=>void Tb.retry()}})})}let F1=OI();function xyn(){Fp++,Nv=null,F1=OI()}const Tb={flush:(e=!1)=>F1.flush(e),retry:()=>F1.retry(),queue(e,n=0){const t=Nv;t&&t.lastLocation===e.lastLocation&&t.railOpen===e.railOpen&&t.panelWidth===e.panelWidth&&t.experimentsView===e.experimentsView||(Nv=e,F1.queue(e,n))}};window.addEventListener("pagehide",()=>void Tb.flush(!0));function Wl(e,n){if(typeof e=="string")return{kind:"home",view:e};if("code"in e)return{kind:"code",experimentId:e.experimentId,branch:e.branch,view:e.view};if("kind"in e)return e.kind==="plan"?{kind:"plan",sessionId:e.sessionId,promptId:e.promptId}:{kind:"subagent",sessionId:e.sessionId,spawnPartId:e.spawnPartId};if("path"in e)return{kind:"file",path:e.path,source:e.source,sessionId:e.sessionId,ref:e.ref,line:e.line,branchLabel:e.branchLabel};const t=n===void 0?e.runId:n;return{kind:"experiment",experimentId:e.id,view:e.view,...t?{runId:t}:{}}}function eo(e){switch(e.kind){case"home":return e.view;case"experiment":return{id:e.experimentId,view:e.view,...e.runId?{runId:e.runId}:{}};case"file":return{path:e.path,source:e.source,sessionId:e.sessionId,ref:e.ref,line:e.line,branchLabel:e.branchLabel};case"code":return{code:!0,experimentId:e.experimentId,branch:e.branch,view:e.view,toggled:new Set};case"plan":return{kind:"plan",sessionId:e.sessionId,promptId:e.promptId,plan:""};case"subagent":return{kind:"subagent",sessionId:e.sessionId,spawnPartId:e.spawnPartId}}}function DI(e,n,t){const r=[];e.filesTabOpen&&r.push("files"),e.terminalTabOpen&&r.push("terminal"),e.artifactsTabOpen&&r.push("artifacts"),e.experimentsTabOpen&&r.push("experiments");const s=[...e.expTabs,...e.fileTabs,...e.planTabs,...e.subagentTabs,...e.codeTabs],i=new Map(s.map(u=>[At(u),u])),a=e.contentTabOrder.flatMap(u=>{const h=i.get(u);return h?[h]:[]}),o=At(e.rightTab);return{tabs:[...r,...a].map(u=>Wl(u,At(u)===o?e.selectedRunId:void 0)),active:e.panelOpen?Wl(e.rightTab,e.selectedRunId):null,previewKey:e.previewTab?At(e.previewTab):null,history:e.tabHistory.map(At),expanded:Object.fromEntries([["files",[...e.filesToggled]],...e.codeTabs.map(u=>[At(u),[...u.toggled]])]),scroll:n,sourceModes:t,filesView:e.filesView,scope:e.scope,panelMax:e.panelMax,treeViewport:e.treeViewport}}function wyn(e,n){const t=_S();e&&(t.filesView=e.filesView,t.filesToggled=new Set(e.expanded.files??[]),t.scope=e.scope,t.panelMax=e.panelMax,t.treeViewport=e.treeViewport??null);const r=[...(e==null?void 0:e.tabs)??[]];if(n){const i=r.findIndex(a=>At(eo(a))===At(eo(n)));i===-1?r.push(n):r[i]=n}for(const i of r){const a=eo(i);if(typeof a=="string"){a==="experiments"&&(t.experimentsTabOpen=!0),a==="files"&&(t.filesTabOpen=!0),a==="artifacts"&&(t.artifactsTabOpen=!0),a==="terminal"&&(t.terminalTabOpen=!0);continue}"code"in a?(a.toggled=new Set((e==null?void 0:e.expanded[At(a)])??[]),t.codeTabs.push(a)):"path"in a?t.fileTabs.push(a):"kind"in a?a.kind==="plan"?t.planTabs.push(a):t.subagentTabs.push(a):t.expTabs.push(a),t.contentTabOrder.push(At(a))}const s=new Map(r.map(i=>{const a=eo(i);return[At(a),a]}));return t.tabHistory=((e==null?void 0:e.history)??[]).flatMap(i=>{const a=s.get(i);return a?[a]:[]}),t.previewTab=e!=null&&e.previewKey?s.get(e.previewKey)??null:null,t.rightTab=n?eo(n):e!=null&&e.active?eo(e.active):"experiments",t.panelOpen=n!==void 0,t.selectedRunId=(n==null?void 0:n.kind)==="experiment"?n.runId??null:null,II(t,n)}const nw=(e,n)=>e.id===n.id&&e.view===n.view,s_=(e,n)=>e.path===n.path&&(e.source??"repo")===(n.source??"repo")&&e.sessionId===n.sessionId&&e.ref===n.ref,uS=e=>`${e.source??"repo"}:${e.sessionId??""}:${e.ref??""}:${e.path}`,Ls=(e,n,t)=>`${e}:${n??""}:${uS(t)}`,LI=e=>({...e,lineScrollRequest:void 0});function Zg(e){return typeof e=="object"&&"path"in e?LI(e):e}const Xf=(e,n)=>e.branch===n.branch;function At(e){return typeof e=="string"?`home:${e}`:"code"in e?`code:${e.branch}`:"kind"in e?e.kind==="plan"?`plan:${e.promptId}`:`subagent:${e.spawnPartId}`:"path"in e?`file:${uS(e)}`:`experiment:${e.id}:${e.view}`}function Ep(e,n){const t=e.filter(r=>At(r)!==n);return t.length===e.length?e:t}function kyn(e){return e!==void 0}function _S(e,n=!1){const t={rightTab:"experiments",tabHistory:[],experimentsTabOpen:!1,filesTabOpen:!1,artifactsTabOpen:!1,terminalTabOpen:!1,expTabs:[],fileTabs:[],planTabs:[],subagentTabs:[],codeTabs:[],contentTabOrder:[],previewTab:null,filesView:"files",filesToggled:new Set,selectedRunId:null,scope:"project",panelOpen:!1,panelMax:!1,treeViewport:null};if(e===bd&&n){const r="experiments";return{...t,rightTab:r,tabHistory:[r],experimentsTabOpen:!0,panelOpen:!0}}if(e===bb){const r=[{path:"nanochat-base-training-curves.svg",source:"artifacts"},{path:"nanochat-sft-training-curves.svg",source:"artifacts"},{path:"nanochat-training-throughput.svg",source:"artifacts"},{path:"nanochat-core-evaluation.svg",source:"artifacts"}];return{...t,rightTab:r[0],tabHistory:[...r.slice(1),r[0]],fileTabs:r,contentTabOrder:r.map(At),panelOpen:!0}}if(e===yb){const r=[{path:"nanochat-bottleneck-diagnosis.md",source:"artifacts"}];return{...t,rightTab:r[0],tabHistory:[r[0]],fileTabs:r,contentTabOrder:r.map(At),panelOpen:!0}}return t}function fS(e,n){const t=_S(e,n);return t.panelOpen?DI(t,{},{}):void 0}function II(e,n){if(!n)return e;const t=eo(n),r=At(t),s=[...e.expTabs,...e.fileTabs,...e.codeTabs,...e.planTabs,...e.subagentTabs].find(l=>At(l)===r),i=(l,u)=>{const h=l.findIndex(_=>At(_)===r);return h<0?[...l,u]:JSON.stringify(Wl(l[h]))===JSON.stringify(Wl(u))?l:l.map((_,p)=>p===h?{..._,...u}:_)},a={...e};typeof t=="string"?t==="files"?a.filesTabOpen=!0:t==="artifacts"?a.artifactsTabOpen=!0:t==="terminal"?a.terminalTabOpen=!0:a.experimentsTabOpen=!0:("path"in t?a.fileTabs=i(e.fileTabs,t):"id"in t?a.expTabs=i(e.expTabs,{...t,runId:n.kind==="experiment"?n.runId:void 0}):"code"in t?a.codeTabs=i(e.codeTabs,{...t,toggled:s&&"code"in s?s.toggled:t.toggled}):t.kind==="plan"?a.planTabs=i(e.planTabs,t):a.subagentTabs=i(e.subagentTabs,t),e.contentTabOrder.includes(r)||(a.contentTabOrder=[...e.contentTabOrder,r]));const o=e.tabHistory.at(-1);return o&&At(o)===r&&JSON.stringify(Wl(o))===JSON.stringify(Wl(t))||(a.tabHistory=[...e.tabHistory.filter(l=>At(l)!==r),t]),a}let to=0;const y0=new Map,zv=new Map,N3=new Set,z3=()=>{for(const e of N3)e()},Syn=e=>(N3.add(e),()=>{N3.delete(e)}),x0=new Map,no=new Map,$I=e=>no.get(e);function Cyn(){to++,no.clear(),x0.clear(),y0.clear(),zv.clear(),z3()}function Eyn(e,n){const t=no.get(e);if(!(t!=null&&t.tasks.new)||pu(t,n))return;const r=t.tasks.new,s=a=>Object.fromEntries(r.tabs.flatMap(o=>{if(o.kind!=="file")return[];const l=eo(o);if(typeof l=="string"||!("path"in l))return[];const u=Ls(e,null,l);return u in a?[[Ls(e,n,l),a[u]]]:[]})),i={...t.tasks,[n]:{...r,scroll:s(r.scroll),sourceModes:s(r.sourceModes)}};delete i.new,x0.set(e,n),no.set(e,{...t,tasks:i})}function Nyn(e){let n=y0.get(e);if(!n){const t=to;n=zI(async(r,s)=>{if(t!==to)return;const i=await cpn(e,r,s);t===to&&rt.setQueryData(Vk(e).queryKey,i),t===to&&zv.delete(e)&&z3()},r=>{t===to&&(zv.set(e,r instanceof Error?r.message:String(r)),z3())}),y0.set(e,n)}return n}function rw(e,n,t,r){const s=no.get(e);if(!s||t==="new"&&x0.has(e))return;const i=Nb(n)??s.lastLocation,a=t?t==="new"?null:t:s.lastTaskId,o=t?pu(s,t):void 0;if(i===s.lastLocation&&a===s.lastTaskId&&(!r||JSON.stringify(r)===JSON.stringify(o)))return;const l={...s,lastLocation:i,lastTaskId:a,tasks:t&&r?{...s.tasks,[t]:r}:s.tasks},u=o&&r&&i===s.lastLocation&&JSON.stringify({...o,scroll:{},sourceModes:{}})===JSON.stringify({...r,scroll:{},sourceModes:{}});no.set(e,l),Nyn(e).queue(l,u?250:0)}function Yz(e,n,t,r){const s=new Set(e.state.fileTabs.map(h=>Ls(t,r==="new"?null:r,h))),i=Object.fromEntries(Object.entries(e.getScroll()).filter(([h])=>s.has(h))),a=Object.fromEntries(Object.entries(e.sourceModes).filter(([h])=>s.has(h))),o=DI(e.state,i,a),l=e.pane??(n==null?void 0:n.active),u=l?At(eo(l)):null;return o.active=o.tabs.find(h=>At(eo(h))===u)??null,o}function zyn(e){const{projectId:n,taskKey:t,location:r,pane:s,isTask:i,firstDemoOpen:a,state:o,apply:l,getScroll:u,sourceModes:h,revision:_}=e,p=A.useRef(Vz()),m=A.useSyncExternalStore(Syn,()=>n?zv.get(n)??null:null),[x,k]=A.useState(null),[v,b]=A.useState(0),[w,y]=A.useState(null),[C,N]=A.useState(null),E=A.useRef(null),T=A.useRef(null),j=A.useRef(null),M=A.useRef(e);M.current=e;const D=JSON.stringify([n,t,i]),I=JSON.stringify(s??null),P=A.useCallback(()=>{const q=j.current;if(!q)return;const W=Yz({...M.current,state:q.state,pane:q.pane},pu(no.get(q.projectId),q.taskKey),q.projectId,q.taskKey);rw(q.projectId,q.location,q.taskKey,W)},[]);A.useEffect(()=>{let q=!0;const W=to;if(k(null),y(null),!!n)return no.has(n)?y(n):rt.fetchQuery(Vk(n)).then(H=>{!q||W!==to||(no.set(n,H??Vz()),y(n))}).catch(H=>{q&&W===to&&k(H instanceof Error?H.message:String(H))}),()=>{q=!1}},[n,v]),A.useLayoutEffect(()=>{if(j.current&&j.current.scope!==D){const H=j.current.projectId;P(),x0.get(H)===t&&x0.delete(H),j.current=null}if(!n||w!==n)return;const q=no.get(n);if(!q)return;if(p.current=q,E.current!==D){if(E.current=D,T.current=I,i){const H=pu(q,t)??(Il(n)?fS(t,a):void 0);l(wyn(H,s),H,!0)}N(D);return}if(C!==D)return;let W=o;T.current!==I&&(T.current=I,i&&s&&(W=II(o,s),l(W,void 0,!1))),i?(rw(n,r,t,Yz({state:W,pane:s,getScroll:u,sourceModes:h},pu(q,t),n,t)),j.current={projectId:n,taskKey:t,scope:D,location:r,pane:s,state:W}):rw(n,r),p.current=no.get(n)??q},[n,t,r,s,I,i,a,o,l,u,h,_,w,D,C,P]),A.useEffect(()=>{const q=to,W=Y=>{if(q===to){P();for(const te of y0.values())te.flush(Y)}},H=()=>W(!0);return window.addEventListener("pagehide",H),()=>{window.removeEventListener("pagehide",H),W(!1)}},[P]);const U=A.useCallback(()=>{var q;n&&(x?b(W=>W+1):(q=y0.get(n))==null||q.retry())},[n,x]);return{ready:n===null||w===n&&C===D,loaded:n===null||w===n,error:x??m,retry:U,capture:P,workspace:p}}const jyn="data:image/svg+xml,"+encodeURIComponent(''),j3=A.createContext(null);function Tyn(e){var n;return e.kind==="local"?"local":`${e.session.id}:${((n=e.session.installPaths)==null?void 0:n.database)??""}`}function BI(){const e=A.useContext(j3);if(!e)throw new Error("Runtime is not connected");return e}function Ayn(e){const n=document.querySelector('link[rel="icon"]');n&&(n.href=e?jyn:"/favicon.svg")}function Zz(e){try{return localStorage.getItem(e)!==null}catch{return!1}}function Ryn(e){if(e.kind!=="ssh")return;const{theme:n,locale:t}=e.session.uiPreferences;!Zz("orx:theme")&&(n==="light"||n==="dark"||n==="system")&&qL(n),!Zz("orx:locale")&&t&&VO(t)&&FL(t)}function Myn(e){return e.includes("ssh ")&&e.includes("failed")}function Jz({host:e,overlay:n=!1}){return f.jsx("div",{className:n?"w-full max-w-2xl":"app flex h-full items-center justify-center bg-background p-6",children:f.jsxs("section",{className:"w-full max-w-2xl rounded-xl border border-border bg-background p-7 shadow-modal",children:[f.jsx("h1",{id:"remote-setup-title",className:"m-0 text-2xl font-semibold text-text",children:BD({host:Ne(e)})}),f.jsx("p",{className:"mt-2 mb-0 text-base text-text",children:J4()}),f.jsx("p",{className:"mt-2 mb-0 text-sm text-subtext",children:B2t()})]})})}function ej({runtime:e,overlay:n=!1,retriedInteractiveError:t,setRetriedInteractiveError:r}){var M,D,I;const{session:s}=e,[i,a]=A.useState(s.installPaths),[o,l]=A.useState(!1),[u,h]=A.useState(null);A.useEffect(()=>a(s.installPaths),[(M=s.installPaths)==null?void 0:M.binary,(D=s.installPaths)==null?void 0:D.database,(I=s.installPaths)==null?void 0:I.cache]);async function _(){if(i){l(!0);try{await w0n(i)}catch(P){Vn(P instanceof Error?P.message:String(P),"error")}finally{l(!1)}}}async function p(P=!1){r(P?s.error:null),l(!0);try{await k0n()}catch(U){Vn(U instanceof Error?U.message:String(U),"error")}finally{l(!1)}}async function m(){l(!0);try{await SL()}catch(P){Vn(P instanceof Error?P.message:String(P),"error")}finally{l(!1)}}async function x(){l(!0);try{h(await CL())}catch(P){Vn(P instanceof Error?P.message:String(P),"error")}finally{l(!1)}}async function k(){if(u){l(!0);try{await EL(u),h(null)}catch(P){h(null),Vn(P instanceof Error?P.message:String(P),"error")}finally{l(!1)}}}async function v(){l(!0);try{await S0n()}catch(P){Vn(P instanceof Error?P.message:String(P),"error")}finally{l(!1)}}const b=s.status==="applying"||o,w=s.status==="needsInstall",y=s.status==="needsUpdate",C=i&&w,N=["connecting","applying","reconnecting"].includes(s.status),E=s.status==="disconnected"&&s.error!==null&&Myn(s.error)&&t!==s.error&&!s.canStartNewHost,T=w?Nwt():y?kkt():s.status==="applying"?axt({host:Ne(s.host)}):s.status==="reconnecting"?H4t({host:Ne(s.host)}):s.status==="disconnected"?s.error?R2t({host:Ne(s.host)}):s.canStartNewHost?J2t({host:Ne(s.host)}):BD({host:Ne(s.host)}):Pxt({host:Ne(s.host)}),j=s.error??(s.canStartNewHost?V2t():w?Wwt({user:Ne(s.user??""),host:Ne(s.host)}):y?mkt({host:Ne(s.host)}):s.status==="applying"?Jyt():s.status==="reconnecting"?D4t():s.status==="disconnected"?b2t():Mxt());return f.jsxs(f.Fragment,{children:[f.jsx("main",{className:n?"w-full max-w-2xl":"app flex h-full items-center justify-center bg-background p-6",children:f.jsxs("section",{className:"w-full max-w-2xl rounded-xl border border-border bg-background p-7 shadow-modal",children:[f.jsxs("div",{className:"flex items-start gap-3",children:[N&&f.jsx(Rt,{className:"mt-2"}),f.jsxs("div",{className:"min-w-0 flex-1",children:[f.jsx("h1",{id:"remote-setup-title",className:"m-0 text-2xl font-semibold text-text",children:T}),!E&&f.jsx("p",{className:"mt-2 mb-0 text-base text-text",children:j})]})]}),E&&f.jsx(lS,{host:s.host,backend:"ssh",path:"/_orx/ssh/connect",onComplete:()=>void p(!0)}),C&&f.jsxs("div",{className:"mt-6 grid gap-4 border-t border-border-variant pt-5",children:[f.jsx("p",{className:"m-0 text-sm text-subtext",children:ywt()}),[["binary",awt()],["database",dwt()]].map(([P,U])=>f.jsxs("label",{className:"grid gap-1 text-sm font-medium text-subtext",children:[U,f.jsx(as,{value:i[P],onChange:q=>a({...i,[P]:q.target.value}),disabled:b,dir:"ltr"})]},P)),!s.error&&f.jsx("div",{className:"flex justify-end pt-1",children:f.jsx(Me,{variant:"primary",disabled:b,onClick:()=>void _(),children:b?f.jsxs(f.Fragment,{children:[f.jsx(Rt,{})," ",Owt()]}):y?rz():YD()})})]}),y&&i&&f.jsx("div",{className:"mt-6 flex justify-end",children:!s.error&&f.jsx(Me,{variant:"primary",disabled:b,onClick:()=>void _(),children:b?f.jsxs(f.Fragment,{children:[f.jsx(Rt,{})," ",Tkt()]}):rz()})}),s.status==="disconnected"&&f.jsx("div",{className:"mt-6 flex justify-end border-t border-border-variant pt-5",children:s.canStartNewHost?f.jsxs(Me,{variant:"primary",disabled:o,onClick:()=>void v(),children:[o?f.jsx(Rt,{}):null,s.error?tz():o3t()]}):f.jsxs(Me,{variant:"primary",disabled:o,onClick:()=>void p(),children:[o?f.jsx(Rt,{}):null,tz()]})}),(s.status==="connecting"||s.status==="reconnecting")&&f.jsx("div",{className:"mt-6 flex justify-end border-t border-border-variant pt-5",children:f.jsx(Me,{disabled:o,onClick:()=>void m(),children:r3()})}),y&&s.error&&f.jsxs("div",{className:"mt-6 flex justify-end gap-2 border-t border-border-variant pt-5",children:[f.jsx(Me,{disabled:o,onClick:()=>void m(),children:r3()}),s.installPaths!==null&&(s.dashboardProtocol===null||s.dashboardProtocolvoid p(),children:[o?f.jsx(Rt,{}):null,ez()]}),s.installPaths===null&&s.dashboardProtocol!==null&&s.dashboardProtocolvoid x(),children:[o?f.jsx(Rt,{}):null,PD()]})]}),w&&s.error&&f.jsx("div",{className:"mt-6 flex justify-end",children:f.jsxs(Me,{variant:"primary",disabled:o,onClick:()=>void p(),children:[o?f.jsx(Rt,{}):null,ez()]})})]})}),u&&f.jsx(lI,{host:s.host,preview:u,currentClientAttached:!1,stopping:o,onClose:()=>{o||h(null)},onConfirm:()=>void k()})]})}function Oyn({children:e}){const n=A.useRef(null);return A.useEffect(()=>{var t;return(t=n.current)==null?void 0:t.focus()},[]),f.jsx("div",{ref:n,role:"alertdialog","aria-modal":"true","aria-labelledby":"remote-setup-title",tabIndex:-1,className:"absolute inset-0 z-100 flex items-center justify-center bg-modal-backdrop p-6",children:e})}function Dyn(){A.useSyncExternalStore(P9,NV),A.useEffect(()=>P9(()=>{xyn(),Cyn()}),[]);const e=RW({select:x=>x.pathname==="/remote-launch"}),[n,t]=A.useState(null),[r,s]=A.useState(null),i=A.useRef(!1),a=A.useRef(!1),o=A.useRef(!1),l=A.useRef(null),[u,h]=A.useState(null),_=ft({...Lmn(),enabled:!e,refetchInterval:x=>{var k;return x.state.status==="error"||((k=x.state.data)==null?void 0:k.kind)==="ssh"?2e3:!1},refetchIntervalInBackground:!0});if(A.useEffect(()=>{var v,b;if(e)return;const x=_.data;if(!x){s(((v=_.error)==null?void 0:v.message)??null);return}const k=Tyn(x);zV(k),l.current!==null&&l.current!==k&&(i.current=!1,a.current=!1,o.current=!1),l.current=k,x.kind==="ssh"&&(o.current||(o.current=!0,Ryn(x)),x.session.status==="connected"?(i.current=!0,a.current=!0,h(null)):x.session.status==="disconnected"&&x.session.error===null&&(a.current=!1)),t(x),s(((b=_.error)==null?void 0:b.message)??null)},[e,_.data,_.error]),A.useEffect(()=>{const x=(n==null?void 0:n.kind)==="ssh";Ayn(x),x&&(!i.current||n.session.status==="disconnected"&&!n.session.error)&&(document.title="OpenResearch")},[n]),e)return f.jsxs("main",{className:"app flex h-full items-center justify-center gap-3 bg-background text-base text-text",children:[f.jsx(Rt,{})," ",w4t()]});if(!n)return f.jsx("main",{className:"app flex h-full items-center justify-center gap-3 bg-background text-base text-text",children:r?f.jsxs(f.Fragment,{children:[f.jsx("span",{children:r}),f.jsx(Me,{onClick:()=>location.reload(),children:Vs()})]}):f.jsx(Rt,{})});if(n.kind==="local")return f.jsxs(j3,{value:n,children:[f.jsx(Az,{}),f.jsx(f0,{})]},Ra()[1]);if(!(a.current&&(n.session.status!=="disconnected"||n.session.error!==null))&&n.session.status!=="connected")return r?f.jsx(Jz,{host:n.session.host}):f.jsx(ej,{runtime:n,retriedInteractiveError:u,setRetriedInteractiveError:h});const m=n.session.status!=="connected"||r!==null;return f.jsxs("div",{className:"relative h-full",children:[f.jsx("div",{className:"h-full",inert:m,children:f.jsxs(j3,{value:n,children:[f.jsx(Az,{}),f.jsx(f0,{})]},Ra()[1])}),m&&f.jsx(Oyn,{children:r?f.jsx(Jz,{host:n.session.host,overlay:!0}):f.jsx(ej,{runtime:n,overlay:!0,retriedInteractiveError:u,setRetriedInteractiveError:h})})]})}const Ab=pW()({component:Dyn}),dS="orx:demo-read-sessions";function PI(){try{const e=JSON.parse(sessionStorage.getItem(dS)??"[]");return new Set(Array.isArray(e)?e.filter(n=>typeof n=="string"):[])}catch{return new Set}}function Lyn(e){try{const n=PI();n.add(e),sessionStorage.setItem(dS,JSON.stringify([...n]))}catch{}}function Iyn(){try{sessionStorage.removeItem(dS)}catch{}}function FI(e,n){const t=U_(e.split("?")[0]);return!!(t&&(!t.sessionId||n.some(r=>r.id===t.sessionId&&r.projectId===t.projectId)))}async function $yn(e=rt){var i;const[n,t]=await Promise.all([e.fetchQuery(fm()),e.fetchQuery(v0())]),r=Nb((i=cS()??n.workspace)==null?void 0:i.lastLocation);if(!r)return"/projects";const s=U_(r.split("?")[0]);return!(s!=null&&s.projectId)||!t.some(a=>a.id===s.projectId)||s.sessionId&&!FI(r,await e.fetchQuery(Aa(s.projectId)))?"/projects":r}async function Byn(e,n=rt){var h;const[t,r]=await Promise.all([n.fetchQuery(Vk(e)),n.fetchQuery(Aa(e))]),s=$I(e)??t,i=Nb(s==null?void 0:s.lastLocation);if(i&&((h=U_(i.split("?")[0]))==null?void 0:h.projectId)===e&&FI(i,r))return i;const a=r.find(_=>!_.archived),o=Il(e)?fS(a==null?void 0:a.id,!(await n.fetchQuery(fm())).tourCompleted):void 0,l=pu(s,(a==null?void 0:a.id)??"new"),u=l?l.active:o==null?void 0:o.active;return P1(e,(a==null?void 0:a.id)??null,u)}const jv=360,Pyn=272,Fyn=380,Hyn=Pyn+56;function Hp(){return Math.max(jv,window.innerWidth-Hyn-Fyn)}function HI(){const e=Hp();return Math.max(jv,Math.min(480,e,Math.round(window.innerWidth*.25)))}function hS(){return f.jsxs("svg",{viewBox:"0 0 100 100","aria-hidden":"true",children:[f.jsx("rect",{width:"100",height:"100",rx:"8",fill:"#9a2036"}),f.jsx("path",{d:"M15.375 16.782v63.843a4 4 0 0 0 4 4h63.843c3.564 0 5.348-4.309 2.829-6.828L22.203 13.953c-2.52-2.52-6.828-.735-6.828 2.829",fill:"#fff"})]})}function sw(){return f.jsxs("span",{className:"wordmark inline-flex items-center gap-[0.4em] text-text [&_svg]:w-[1em] [&_svg]:h-[1em] [&_svg]:shrink-0",children:[f.jsx(hS,{}),"OpenResearch"]})}const tj="inline-flex items-center p-0.5 border-0 rounded-xs bg-none bg-transparent text-muted cursor-pointer [&:hover]:bg-surface [&:hover]:text-text";function qyn({cmd:e,onRun:n}){const[t,r]=A.useState(!1);return f.jsxs("span",{className:"cmd-inline inline-flex items-center gap-1 align-baseline",children:[f.jsx("code",{dir:"ltr",className:"font-mono text-sm",children:e}),n&&f.jsx("button",{type:"button",className:`cmd-inline-run ${tj}`,onClick:n,"aria-label":zE({value:Ne(e)}),title:zE({value:Ne(e)}),children:f.jsx(Dbn,{size:11})}),f.jsx("button",{type:"button",className:`cmd-inline-copy ${tj}`,onClick:()=>{navigator.clipboard.writeText(e).then(()=>{r(!0),setTimeout(()=>r(!1),1500)}).catch(()=>{})},"aria-label":t?m0():nX({value:Ne(e)}),title:t?m0():Ok(),children:t?f.jsx(Ji,{size:11,strokeWidth:3}):f.jsx(Sb,{size:11})})]})}function eh(e,n){return e?e.split(/`([^`]+)`/).map((t,r)=>r%2===1?f.jsx(qyn,{cmd:t,onRun:n!=null&&n.canRun(t)?()=>n.onRun(t):void 0},r):t):null}function w0({harness:e,size:n=16}){const t="block shrink-0";return e==="claude-code"?f.jsx("svg",{className:t,width:n,height:n,viewBox:"0 0 24 24",fill:"#d97757","aria-hidden":"true",children:f.jsx("path",{d:"m4.7144 15.9555 4.7174-2.6471.079-.2307-.079-.1275h-.2307l-.7893-.0486-2.6956-.0729-2.3375-.0971-2.2646-.1214-.5707-.1215-.5343-.7042.0546-.3522.4797-.3218.686.0608 1.5179.1032 2.2767.1578 1.6514.0972 2.4468.255h.3886l.0546-.1579-.1336-.0971-.1032-.0972L6.973 9.8356l-2.55-1.6879-1.3356-.9714-.7225-.4918-.3643-.4614-.1578-1.0078.6557-.7225.8803.0607.2246.0607.8925.686 1.9064 1.4754 2.4893 1.8336.3643.3035.1457-.1032.0182-.0728-.164-.2733-1.3539-2.4467-1.445-2.4893-.6435-1.032-.17-.6194c-.0607-.255-.1032-.4674-.1032-.7285L6.287.1335 6.6997 0l.9957.1336.419.3642.6192 1.4147 1.0018 2.2282 1.5543 3.0296.4553.8985.2429.8318.091.255h.1579v-.1457l.1275-1.706.2368-2.0947.2307-2.6957.0789-.7589.3764-.9107.7468-.4918.5828.2793.4797.686-.0668.4433-.2853 1.8517-.5586 2.9021-.3643 1.9429h.2125l.2429-.2429.9835-1.3053 1.6514-2.0643.7286-.8196.85-.9046.5464-.4311h1.0321l.759 1.1293-.34 1.1657-1.0625 1.3478-.8804 1.1414-1.2628 1.7-.7893 1.36.0729.1093.1882-.0183 2.8535-.607 1.5421-.2794 1.8396-.3157.8318.3886.091.3946-.3278.8075-1.967.4857-2.3072.4614-3.4364.8136-.0425.0304.0486.0607 1.5482.1457.6618.0364h1.621l3.0175.2247.7892.522.4736.6376-.079.4857-1.2142.6193-1.6393-.3886-3.825-.9107-1.3113-.3279h-.1822v.1093l1.0929 1.0686 2.0035 1.8092 2.5075 2.3314.1275.5768-.3218.4554-.34-.0486-2.2039-1.6575-.85-.7468-1.9246-1.621h-.1275v.17l.4432.6496 2.3436 3.5214.1214 1.0807-.17.3521-.6071.2125-.6679-.1214-1.3721-1.9246L14.38 17.959l-1.1414-1.9428-.1397.079-.674 7.2552-.3156.3703-.7286.2793-.6071-.4614-.3218-.7468.3218-1.4753.3886-1.9246.3157-1.53.2853-1.9004.17-.6314-.0121-.0425-.1397.0182-1.4328 1.9672-2.1796 2.9446-1.7243 1.8456-.4128.164-.7164-.3704.0667-.6618.4008-.5889 2.386-3.0357 1.4389-1.882.929-1.0868-.0062-.1579h-.0546l-6.3385 4.1164-1.1293.1457-.4857-.4554.0608-.7467.2307-.2429 1.9064-1.3114Z"})}):e==="opencode"?f.jsx("svg",{className:t,width:n,height:n,viewBox:"0 0 24 24",fill:"currentColor","aria-hidden":"true",children:f.jsx("path",{d:"M22 24H2V0h20zM17 4.8H7v14.4h10z"})}):e==="cursor"?f.jsxs("svg",{className:t,width:n,height:n,viewBox:"388 395 191 191",fill:"none","aria-hidden":"true",children:[f.jsx("path",{fill:"#72716D",d:"M483.395 490.5L566 538.297C565.493 539.178 564.757 539.93 563.845 540.456L486.636 585.13C484.632 586.29 482.159 586.29 480.154 585.13L402.945 540.456C402.034 539.93 401.297 539.178 400.79 538.297L483.395 490.5Z"}),f.jsx("path",{fill:"#55544F",d:"M483.395 395V490.5L400.79 538.297C400.282 537.416 400 536.398 400 535.346V445.654C400 443.545 401.122 441.6 402.945 440.544L480.15 395.87C481.154 395.29 482.273 395 483.391 395H483.395Z"}),f.jsx("path",{fill:"#43413C",d:"M565.996 442.703C565.489 441.822 564.752 441.07 563.841 440.544L486.632 395.87C485.632 395.29 484.513 395 483.395 395V490.5L566 538.297C566.507 537.416 566.789 536.398 566.789 535.346V445.654C566.789 444.598 566.511 443.588 566 442.703H565.996Z"}),f.jsx("path",{fill:"#D6D5D2",d:"M560.218 446.049C560.686 446.858 560.751 447.896 560.218 448.82L485.235 578.974C484.732 579.855 483.392 579.493 483.392 578.479V492.713C483.392 492.029 483.209 491.37 482.877 490.794L560.215 446.045H560.218V446.049Z"}),f.jsx("path",{fill:"#FFFFFF",d:"M560.218 446.049L482.88 490.797C482.552 490.224 482.073 489.737 481.48 489.394L407.369 446.511C406.49 446.006 406.851 444.663 407.862 444.663H557.824C558.889 444.663 559.754 445.239 560.218 446.049Z"})]}):e==="antigravity"?f.jsx("svg",{className:t,width:n,height:n,viewBox:"13 18 85 80",fill:"#3186FF","aria-hidden":"true",children:f.jsx("path",{d:"M89.6992 93.695C94.3659 97.195 101.366 94.8617 94.9492 88.445C75.6992 69.7783 79.7825 18.445 55.8659 18.445C31.9492 18.445 36.0325 69.7783 16.7825 88.445C9.78251 95.445 17.3658 97.195 22.0325 93.695C40.1159 81.445 38.9492 59.8617 55.8659 59.8617C72.7825 59.8617 71.6159 81.445 89.6992 93.695Z"})}):f.jsx("svg",{className:t,width:n,height:n,viewBox:"146 227 268 265",fill:"currentColor","aria-hidden":"true",children:f.jsx("path",{d:"M249.176 323.434V298.276C249.176 296.158 249.971 294.569 251.825 293.509L302.406 264.381C309.29 260.409 317.5 258.555 325.973 258.555C357.75 258.555 377.877 283.185 377.877 309.399C377.877 311.253 377.877 313.371 377.611 315.49L325.178 284.771C322.001 282.919 318.822 282.919 315.645 284.771L249.176 323.434ZM367.283 421.415V361.301C367.283 357.592 365.694 354.945 362.516 353.092L296.048 314.43L317.763 301.982C319.617 300.925 321.206 300.925 323.058 301.982L373.639 331.112C388.205 339.586 398.003 357.592 398.003 375.069C398.003 395.195 386.087 413.733 367.283 421.412V421.415ZM233.553 368.452L211.838 355.742C209.986 354.684 209.19 353.095 209.19 350.975V292.718C209.19 264.383 230.905 242.932 260.301 242.932C271.423 242.932 281.748 246.641 290.49 253.26L238.321 283.449C235.146 285.303 233.555 287.951 233.555 291.659V368.455L233.553 368.452ZM280.292 395.462L249.176 377.985V340.913L280.292 323.436L311.407 340.913V377.985L280.292 395.462ZM300.286 475.968C289.163 475.968 278.837 472.259 270.097 465.64L322.264 435.449C325.441 433.597 327.03 430.949 327.03 427.239V350.445L349.011 363.155C350.865 364.213 351.66 365.802 351.66 367.922V426.179C351.66 454.514 329.679 475.965 300.286 475.965V475.968ZM237.525 416.915L186.944 387.785C172.378 379.31 162.582 361.305 162.582 343.827C162.582 323.436 174.763 305.164 193.563 297.485V357.861C193.563 361.571 195.154 364.217 198.33 366.071L264.535 404.467L242.82 416.915C240.967 417.972 239.377 417.972 237.525 416.915ZM234.614 460.343C204.689 460.343 182.71 437.833 182.71 410.028C182.71 407.91 182.976 405.792 183.238 403.672L235.405 433.863C238.582 435.715 241.763 435.715 244.938 433.863L311.407 395.466V420.622C311.407 422.742 310.612 424.331 308.758 425.389L258.179 454.519C251.293 458.491 243.083 460.343 234.611 460.343H234.614ZM300.286 491.854C332.329 491.854 359.073 469.082 365.167 438.892C394.825 431.211 413.892 403.406 413.892 375.073C413.892 356.535 405.948 338.529 391.648 325.552C392.972 319.991 393.766 314.43 393.766 308.87C393.766 271.003 363.048 242.666 327.562 242.666C320.413 242.666 313.528 243.723 306.644 246.109C294.725 234.457 278.307 227.042 260.301 227.042C228.258 227.042 201.513 249.815 195.42 280.004C165.761 287.685 146.694 315.49 146.694 343.824C146.694 362.362 154.638 380.368 168.938 393.344C167.613 398.906 166.819 404.467 166.819 410.027C166.819 447.894 197.538 476.231 233.024 476.231C240.172 476.231 247.058 475.173 253.943 472.788C265.859 484.441 282.278 491.854 300.286 491.854Z"})})}function T3(e){return!e.installed||e.installBroken?"install":e.authState==="unsupported"&&!e.needsConfigRepair?"update":"login"}function Uyn(e,n){return e.needsConfigRepair?"error":n==="login"?"running":"preview"}function nj(e,n){return n||e==="preview"}function Gyn(e,n){if(!e||e.needsConfigRepair)return null;const t=T3(e);return t===n?null:t}function qI({harness:e,commands:n,onReady:t,onClose:r}){const s=A.useRef(null),i=A.useRef(!1),[a,o]=A.useState(()=>T3(e)),[l,u]=A.useState(0),[h,_]=A.useState(()=>Uyn(e,T3(e))),[p,m]=A.useState(h==="running"),[x,k]=A.useState(e.needsConfigRepair),[v,b]=A.useState(e.needsConfigRepair?e.agentNote??null:null),w=h==="running"||h==="checking",y=n[a].includes(` -`)?void 0:n[a];A.useEffect(()=>{i.current=!1;const N=s.current;return N==null||N.showModal(),()=>{i.current=!0,N==null||N.close()}},[]);const C=async()=>{_("checking"),b(null);try{const N=await Xd(!0,!0);if(i.current)return;const E=N.find(T=>T.id===e.id);if(k((E==null?void 0:E.needsConfigRepair)??!1),E!=null&&E.agentReady&&(a!=="login"||E.authenticated))t==null||t(E),_("success"),e.id==="antigravity"&&a==="login"&&r();else if(a!=="login"&&(E!=null&&E.installed)&&!E.installBroken&&!E.needsConfigRepair&&E.authState==="needsLogin")o("login"),m(!0),_("running");else{const T=Gyn(E,a);T&&(o(T),m(!1)),b((E==null?void 0:E.agentNote)??kD()),_("error")}}catch(N){if(i.current)return;b(N instanceof Error?N.message:String(N)),_("error")}};return f.jsxs("dialog",{ref:s,className:"m-auto w-180 max-w-[calc(100vw_-_40px)] max-h-[calc(100vh_-_40px)] overflow-y-auto rounded-xl border border-border bg-background p-5 text-text shadow-modal backdrop:bg-modal-backdrop-light","aria-labelledby":"harness-setup-title",onKeyDown:N=>{N.key==="Escape"&&w&&N.preventDefault()},onCancel:N=>{N.preventDefault(),w||r()},children:[f.jsxs("div",{className:"flex items-center gap-3",children:[f.jsx(w0,{harness:e.id,size:26}),f.jsx("h2",{id:"harness-setup-title",className:"m-0 text-xl font-medium",children:SN({agent:e.name})})]}),h==="preview"?f.jsx("p",{className:"my-4 text-sm text-subtext",children:a==="install"?hUe({agent:e.name}):yGe({agent:e.name})}):y&&nj(h,p)?f.jsx("p",{className:"my-4 text-sm text-subtext [&_.cmd-inline]:mx-2 [&_.cmd-inline]:gap-2",children:eh(eGe({command:y}))}):null,h!=="running"&&h!=="preview"&&f.jsxs("p",{className:"my-4 flex items-center gap-2 text-sm",role:"status",children:[h==="checking"&&f.jsx(Rt,{}),h==="success"?Wqe({agent:e.name}):h==="error"?xD():Fqe()]}),a==="install"&&n.requiresNpm&&f.jsx("p",{className:"text-sm text-subtext",children:KUe()}),nj(h,p)&&f.jsx(jb,{path:`/api/harnesses/setup?${new URLSearchParams({harness:e.id,action:a})}`,label:SN({agent:e.name}),command:y,heightClass:"h-96",active:h==="running",awaitingApproval:h==="preview",onComplete:N=>typeof N!="object"||N===null||!("type"in N)||N.type!=="complete"?!1:(C(),!0),onError:N=>{b(N),_("error")}},`${a}-${l}`),v&&f.jsx("p",{role:"alert",className:"text-sm text-accent-red",children:eh(v)}),f.jsxs("div",{className:"mt-5 flex justify-end gap-2",children:[h==="error"&&f.jsx(Me,{variant:"ghost",onClick:()=>{b(null),C()},children:gv()}),h==="error"&&!x&&f.jsx(Me,{onClick:()=>{b(null),m(!0),_("running"),u(N=>N+1)},children:Vs()}),f.jsx(Me,{variant:h==="success"?"primary":"default",onClick:r,children:h==="success"?fL():w?Oqe():p0()}),h==="preview"&&f.jsx(Me,{variant:"primary",onClick:()=>{m(!0),_("running")},children:Nqe()})]})]})}const Vyn={header:"min-w-0 flex-1 overflow-hidden text-ellipsis whitespace-nowrap text-base font-semibold text-text",list:"text-sm font-medium text-text"};function k0({variant:e="list",className:n,...t}){return f.jsx("span",{className:vs("title",Vyn[e],n),...t})}const rj=["onb-gate-hint text-base font-medium leading-normal text-text","onb-agent-hint mt-0 mx-0 mb-2.5"].join(" "),O_=["onb-card-meta text-sm text-subtext [&_code]:font-mono","[&_code]:text-xs [&_code]:bg-panel","[&_code]:border [&_code]:border-border-variant [&_code]:rounded-xs","[&_code]:py-px [&_code]:px-[5px] [&_code]:whitespace-nowrap"].join(" "),iw=["onb-gate-hint mt-4.5 mx-0 mb-0 text-base font-medium leading-normal","text-text onb-git-hint mt-2"].join(" "),UI=["onb-card flex flex-col gap-[5px] bg-background","border border-border rounded-lg py-4.5 px-5"].join(" "),Kyn=["onb-gate-hint mt-4.5 mx-0 mb-0 text-base font-medium leading-normal","text-text"].join(" "),Wyn=[{id:"AI/ML",label:vit},{id:"Biology",label:Cit},{id:"Physics",label:Bit},{id:"Other",label:Rit}],Qyn=["welcome","environment","profile"];function Xyn({onDone:e,preferredAgent:n,remote:t}){var mt;const r=vn({mutationFn:we=>fpn(...we)}),[s,i]=A.useState(0);A.useEffect(()=>{const we=Qyn[s];we&&Jc({name:"onboarding_step_viewed",step:we})},[s]);const a=ft(bu()),o=ft(Zp()),l=ft(OL()),[u,h]=A.useState(null),[_,p]=A.useState(!1),m=A.useRef(null),x=A.useRef(""),k=A.useRef(null),v=A.useRef(!1);A.useEffect(()=>()=>{var we;return(we=m.current)==null?void 0:we.close()},[]);const b=a.data??null,w=(mt=o.data)==null?void 0:mt.gitVersion,[y,C]=A.useState(!1),[N,E]=A.useState(null),[T,j]=A.useState(""),[M,D]=A.useState(null),[I,P]=A.useState(!1),[U,q]=A.useState([]),[W,H]=A.useState(""),[Y,te]=A.useState(""),[$,L]=A.useState([]),[F,G]=A.useState(""),[V,ee]=A.useState([]),[ce,ae]=A.useState(!1),se=A.useRef(0),[X,oe]=A.useState(!1),[le,_e]=A.useState(!1),pe=(b==null?void 0:b.some(we=>we.agentReady))??!1,Ee=w!=null,Ie=A.useRef(0),ze=(we,ct=!1)=>{const ye=++Ie.current;P(!0),oe(!1),_e(!1);const je=()=>ye===Ie.current;Promise.allSettled([Xd(we,ct),rt.fetchQuery({...Zp(),staleTime:we?0:3e4})]).then(([qe,at])=>{je()&&(qe.status==="rejected"&&oe(!0),at.status==="rejected"&&_e(!0))}).finally(()=>je()&&P(!1))};A.useEffect(()=>ze(!1),[]),A.useEffect(()=>{if(b===null)return;const we=b.filter(ct=>ct.agentReady);D(ct=>{var je;if(ct&&we.some(qe=>qe.id===ct))return ct;const ye=n&&we.find(qe=>qe.id===n.harness);return(ye==null?void 0:ye.id)??((je=we[0])==null?void 0:je.id)??null})},[b,n]),A.useEffect(()=>oe(a.isError),[a.isError,a.dataUpdatedAt]),A.useEffect(()=>_e(o.isError),[o.isError,o.dataUpdatedAt]),A.useEffect(()=>{rt.fetchQuery($mn()).then(we=>{q(we.researchAreas),H(we.otherArea??""),te(we.background??""),L(we.papers)}).catch(()=>{})},[]),A.useEffect(()=>{const we=F.trim();if(we.length<3){ee([]),ae(!1);return}const ct=++se.current;ae(!0);const ye=setTimeout(()=>{rt.fetchQuery(PL(we)).then(je=>ct===se.current&&ee(je)).catch(()=>ct===se.current&&ee([])).finally(()=>ct===se.current&&ae(!1))},350);return()=>clearTimeout(ye)},[F]);const He=we=>{const ct=$.some(ye=>ye.paperId===we.paperId);L(ye=>ye.some(je=>je.paperId===we.paperId)?ye:[...ye,{paperId:we.paperId,title:sj(we.title)}]),G(""),ee([]),ct||rt.fetchQuery(y3(we.paperId)).then(ye=>{var qe;const je=(qe=ye.title)==null?void 0:qe.trim();je&&L(at=>at.map(nt=>nt.paperId===we.paperId?{...nt,title:je}:nt))}).catch(()=>{})},Oe=we=>L(ct=>ct.filter(ye=>ye.paperId!==we)),Xe=we=>{q(ct=>ct.includes(we)?ct.filter(ye=>ye!==we):[...ct,we])},_t=U.length>0&&(!U.includes("Other")||W.trim().length>0),Vt=()=>{if(k.current)return k.current;x.current="",v.current=!0,p(!0);const we=(async()=>{await new Promise((je,qe)=>{const at=location.protocol==="https:"?"wss:":"ws:",nt=new WebSocket(`${at}//${location.host}/api/harnesses/setup?harness=opencode&action=install&trigger=automatic`);nt.binaryType="arraybuffer";const Kt=new TextDecoder,Qe=new TI.Terminal;Qe.onData(Tt=>{nt.readyState===WebSocket.OPEN&&nt.send(new TextEncoder().encode(Tt))}),m.current=nt;let wt=!1;nt.onmessage=Tt=>{if(Tt.data instanceof ArrayBuffer){Qe.write(new Uint8Array(Tt.data)),x.current=(x.current+Kt.decode(Tt.data,{stream:!0})).slice(-65536);return}if(typeof Tt.data!="string")return;let Yt;try{Yt=JSON.parse(Tt.data)}catch{return}typeof Yt!="object"||Yt===null||!("type"in Yt)||(Yt.type==="complete"?(wt=!0,nt.close(),je()):Yt.type==="error"&&(nt.close(),qe(new Error("error"in Yt&&typeof Yt.error=="string"?Yt.error:xD()))))},nt.onerror=()=>{nt.close(),qe(new Error(bv()))},nt.onclose=()=>{Qe.dispose(),m.current=null,wt||qe(new Error(bv()))}});const ye=(await Xd(!0,!0)).find(je=>je.id==="opencode"&&je.agentReady);if(!ye)throw new Error(yct());return D("opencode"),ye})();return k.current=we,we.catch(()=>{}),we};A.useEffect(()=>{t||v.current||!(b!=null&&b.length)||!b.every(we=>!we.installed&&!we.installBroken)||Vt()},[b,t]),A.useEffect(()=>{s===1&&_&&i(2)},[s,_]);const $t=()=>{i(_?2:1)},jt=async(we="complete")=>{var ct;if(!(y||we==="complete"&&(!_t||!Ee))){C(!0),E(null),j("");try{const ye=_?await Vt():b==null?void 0:b.find(at=>at.id===M&&at.agentReady);if(!ye)throw new Error(kD());if(we==="setup")return;const je=Zyn(ye,((ct=ye.models[0])==null?void 0:ct.id)??null),qe=await r.mutateAsync([je,{researchAreas:U,otherArea:U.includes("Other")?W:null,background:Y||null,papers:$}]);e(qe.project,qe.selection)}catch(ye){_&&(k.current=null);const je=ye instanceof Error?ye.message:String(ye);E(je),j([x.current,je].filter(Boolean).join(` +`)}clearSelection(){this._model.clearSelection(),this._removeMouseDownListeners(),this.refresh(),this._onSelectionChange.fire()}refresh(j){this._refreshAnimationFrame||(this._refreshAnimationFrame=this._coreBrowserService.window.requestAnimationFrame((()=>this._refresh()))),b.isLinux&&j&&this.selectionText.length&&this._onLinuxMouseSelection.fire(this.selectionText)}_refresh(){this._refreshAnimationFrame=void 0,this._onRedrawRequest.fire({start:this._model.finalSelectionStart,end:this._model.finalSelectionEnd,columnSelectMode:this._activeSelectionMode===3})}_isClickInSelection(j){const M=this._getMouseBufferCoords(j),L=this._model.finalSelectionStart,I=this._model.finalSelectionEnd;return!!(L&&I&&M)&&this._areCoordsInSelection(M,L,I)}isCellInSelection(j,M){const L=this._model.finalSelectionStart,I=this._model.finalSelectionEnd;return!(!L||!I)&&this._areCoordsInSelection([j,M],L,I)}_areCoordsInSelection(j,M,L){return j[1]>M[1]&&j[1]=M[0]&&j[0]=M[0]}_selectWordAtCursor(j,M){var B,q;const L=(q=(B=this._linkifier.currentLink)==null?void 0:B.link)==null?void 0:q.range;if(L)return this._model.selectionStart=[L.start.x-1,L.start.y-1],this._model.selectionStartLength=(0,w.getRangeLength)(L,this._bufferService.cols),this._model.selectionEnd=void 0,!0;const I=this._getMouseBufferCoords(j);return!!I&&(this._selectWordAt(I,M),this._model.selectionEnd=void 0,!0)}selectAll(){this._model.isSelectAllActive=!0,this.refresh(),this._onSelectionChange.fire()}selectLines(j,M){this._model.clearSelection(),j=Math.max(j,0),M=Math.min(M,this._bufferService.buffer.lines.length-1),this._model.selectionStart=[0,j],this._model.selectionEnd=[this._bufferService.cols,M],this.refresh(),this._onSelectionChange.fire()}_handleTrim(j){this._model.handleTrim(j)&&this.refresh()}_getMouseBufferCoords(j){const M=this._mouseService.getCoords(j,this._screenElement,this._bufferService.cols,this._bufferService.rows,!0);if(M)return M[0]--,M[1]--,M[1]+=this._bufferService.buffer.ydisp,M}_getMouseEventScrollAmount(j){let M=(0,_.getCoordsRelativeToElement)(this._coreBrowserService.window,j,this._screenElement)[1];const L=this._renderService.dimensions.css.canvas.height;return M>=0&&M<=L?0:(M>L&&(M-=L),M=Math.min(Math.max(M,-50),50),M/=50,M/Math.abs(M)+Math.round(14*M))}shouldForceSelection(j){return b.isMac?j.altKey&&this._optionsService.rawOptions.macOptionClickForcesSelection:j.shiftKey}handleMouseDown(j){if(this._mouseDownTimeStamp=j.timeStamp,(j.button!==2||!this.hasSelection)&&j.button===0){if(!this._enabled){if(!this.shouldForceSelection(j))return;j.stopPropagation()}j.preventDefault(),this._dragScrollAmount=0,this._enabled&&j.shiftKey?this._handleIncrementalClick(j):j.detail===1?this._handleSingleClick(j):j.detail===2?this._handleDoubleClick(j):j.detail===3&&this._handleTripleClick(j),this._addMouseDownListeners(),this.refresh(!0)}}_addMouseDownListeners(){this._screenElement.ownerDocument&&(this._screenElement.ownerDocument.addEventListener("mousemove",this._mouseMoveListener),this._screenElement.ownerDocument.addEventListener("mouseup",this._mouseUpListener)),this._dragScrollIntervalTimer=this._coreBrowserService.window.setInterval((()=>this._dragScroll()),50)}_removeMouseDownListeners(){this._screenElement.ownerDocument&&(this._screenElement.ownerDocument.removeEventListener("mousemove",this._mouseMoveListener),this._screenElement.ownerDocument.removeEventListener("mouseup",this._mouseUpListener)),this._coreBrowserService.window.clearInterval(this._dragScrollIntervalTimer),this._dragScrollIntervalTimer=void 0}_handleIncrementalClick(j){this._model.selectionStart&&(this._model.selectionEnd=this._getMouseBufferCoords(j))}_handleSingleClick(j){if(this._model.selectionStartLength=0,this._model.isSelectAllActive=!1,this._activeSelectionMode=this.shouldColumnSelect(j)?3:0,this._model.selectionStart=this._getMouseBufferCoords(j),!this._model.selectionStart)return;this._model.selectionEnd=void 0;const M=this._bufferService.buffer.lines.get(this._model.selectionStart[1]);M&&M.length!==this._model.selectionStart[0]&&M.hasWidth(this._model.selectionStart[0])===0&&this._model.selectionStart[0]++}_handleDoubleClick(j){this._selectWordAtCursor(j,!0)&&(this._activeSelectionMode=1)}_handleTripleClick(j){const M=this._getMouseBufferCoords(j);M&&(this._activeSelectionMode=2,this._selectLineAt(M[1]))}shouldColumnSelect(j){return j.altKey&&!(b.isMac&&this._optionsService.rawOptions.macOptionClickForcesSelection)}_handleMouseMove(j){if(j.stopImmediatePropagation(),!this._model.selectionStart)return;const M=this._model.selectionEnd?[this._model.selectionEnd[0],this._model.selectionEnd[1]]:null;if(this._model.selectionEnd=this._getMouseBufferCoords(j),!this._model.selectionEnd)return void this.refresh(!0);this._activeSelectionMode===2?this._model.selectionEnd[1]0?this._model.selectionEnd[0]=this._bufferService.cols:this._dragScrollAmount<0&&(this._model.selectionEnd[0]=0));const L=this._bufferService.buffer;if(this._model.selectionEnd[1]0?(this._activeSelectionMode!==3&&(this._model.selectionEnd[0]=this._bufferService.cols),this._model.selectionEnd[1]=Math.min(j.ydisp+this._bufferService.rows,j.lines.length-1)):(this._activeSelectionMode!==3&&(this._model.selectionEnd[0]=0),this._model.selectionEnd[1]=j.ydisp),this.refresh()}}_handleMouseUp(j){const M=j.timeStamp-this._mouseDownTimeStamp;if(this._removeMouseDownListeners(),this.selectionText.length<=1&&M<500&&j.altKey&&this._optionsService.rawOptions.altClickMovesCursor){if(this._bufferService.buffer.ybase===this._bufferService.buffer.ydisp){const L=this._mouseService.getCoords(j,this._element,this._bufferService.cols,this._bufferService.rows,!1);if(L&&L[0]!==void 0&&L[1]!==void 0){const I=(0,p.moveToCellSequence)(L[0]-1,L[1]-1,this._bufferService,this._coreService.decPrivateModes.applicationCursorKeys);this._coreService.triggerDataEvent(I,!0)}}}else this._fireEventIfSelectionChanged()}_fireEventIfSelectionChanged(){const j=this._model.finalSelectionStart,M=this._model.finalSelectionEnd,L=!(!j||!M||j[0]===M[0]&&j[1]===M[1]);L?j&&M&&(this._oldSelectionStart&&this._oldSelectionEnd&&j[0]===this._oldSelectionStart[0]&&j[1]===this._oldSelectionStart[1]&&M[0]===this._oldSelectionEnd[0]&&M[1]===this._oldSelectionEnd[1]||this._fireOnSelectionChange(j,M,L)):this._oldHasSelection&&this._fireOnSelectionChange(j,M,L)}_fireOnSelectionChange(j,M,L){this._oldSelectionStart=j,this._oldSelectionEnd=M,this._oldHasSelection=L,this._onSelectionChange.fire()}_handleBufferActivate(j){this.clearSelection(),this._trimListener.dispose(),this._trimListener=j.activeBuffer.lines.onTrim((M=>this._handleTrim(M)))}_convertViewportColToCharacterIndex(j,M){let L=M;for(let I=0;M>=I;I++){const B=j.loadCell(I,this._workCell).getChars().length;this._workCell.getWidth()===0?L--:B>1&&M!==I&&(L+=B-1)}return L}setSelection(j,M,L){this._model.clearSelection(),this._removeMouseDownListeners(),this._model.selectionStart=[j,M],this._model.selectionStartLength=L,this.refresh(),this._fireEventIfSelectionChanged()}rightClickSelect(j){this._isClickInSelection(j)||(this._selectWordAtCursor(j,!1)&&this.refresh(!0),this._fireEventIfSelectionChanged())}_getWordAt(j,M,L=!0,I=!0){if(j[0]>=this._bufferService.cols)return;const B=this._bufferService.buffer,q=B.lines.get(j[1]);if(!q)return;const U=B.translateBufferLineToString(j[1],!1);let W=this._convertViewportColToCharacterIndex(q,j[0]),H=W;const Y=j[0]-W;let te=0,$=0,D=0,F=0;if(U.charAt(W)===" "){for(;W>0&&U.charAt(W-1)===" ";)W--;for(;H1&&(F+=ae-1,H+=ae-1);ee>0&&W>0&&!this._isCharWordSeparator(q.loadCell(ee-1,this._workCell));){q.loadCell(ee-1,this._workCell);const re=this._workCell.getChars().length;this._workCell.getWidth()===0?(te++,ee--):re>1&&(D+=re-1,W-=re-1),W--,ee--}for(;ce1&&(F+=re-1,H+=re-1),H++,ce++}}H++;let G=W+Y-te+D,V=Math.min(this._bufferService.cols,H-W+te+$-D-F);if(M||U.slice(W,H).trim()!==""){if(L&&G===0&&q.getCodePoint(0)!==32){const ee=B.lines.get(j[1]-1);if(ee&&q.isWrapped&&ee.getCodePoint(this._bufferService.cols-1)!==32){const ce=this._getWordAt([this._bufferService.cols-1,j[1]-1],!1,!0,!1);if(ce){const ae=this._bufferService.cols-ce.start;G-=ae,V+=ae}}}if(I&&G+V===this._bufferService.cols&&q.getCodePoint(this._bufferService.cols-1)!==32){const ee=B.lines.get(j[1]+1);if(ee!=null&&ee.isWrapped&&ee.getCodePoint(0)!==32){const ce=this._getWordAt([0,j[1]+1],!1,!1,!0);ce&&(V+=ce.length)}}return{start:G,length:V}}}_selectWordAt(j,M){const L=this._getWordAt(j,M);if(L){for(;L.start<0;)L.start+=this._bufferService.cols,j[1]--;this._model.selectionStart=[L.start,j[1]],this._model.selectionStartLength=L.length}}_selectToWordAt(j){const M=this._getWordAt(j,!0);if(M){let L=j[1];for(;M.start<0;)M.start+=this._bufferService.cols,L--;if(!this._model.areSelectionValuesReversed())for(;M.start+M.length>this._bufferService.cols;)M.length-=this._bufferService.cols,L++;this._model.selectionEnd=[this._model.areSelectionValuesReversed()?M.start:M.start+M.length,L]}}_isCharWordSeparator(j){return j.getWidth()!==0&&this._optionsService.rawOptions.wordSeparator.indexOf(j.getChars())>=0}_selectLineAt(j){const M=this._bufferService.buffer.getWrappedRangeForLine(j),L={start:{x:0,y:M.first},end:{x:this._bufferService.cols-1,y:M.last}};this._model.selectionStart=[0,M.first],this._model.selectionEnd=void 0,this._model.selectionStartLength=(0,w.getRangeLength)(L,this._bufferService.cols)}};o.SelectionService=A=u([h(3,C.IBufferService),h(4,C.ICoreService),h(5,x.IMouseService),h(6,C.IOptionsService),h(7,x.IRenderService),h(8,x.ICoreBrowserService)],A)},4725:(a,o,l)=>{Object.defineProperty(o,"__esModule",{value:!0}),o.ILinkProviderService=o.IThemeService=o.ICharacterJoinerService=o.ISelectionService=o.IRenderService=o.IMouseService=o.ICoreBrowserService=o.ICharSizeService=void 0;const u=l(8343);o.ICharSizeService=(0,u.createDecorator)("CharSizeService"),o.ICoreBrowserService=(0,u.createDecorator)("CoreBrowserService"),o.IMouseService=(0,u.createDecorator)("MouseService"),o.IRenderService=(0,u.createDecorator)("RenderService"),o.ISelectionService=(0,u.createDecorator)("SelectionService"),o.ICharacterJoinerService=(0,u.createDecorator)("CharacterJoinerService"),o.IThemeService=(0,u.createDecorator)("ThemeService"),o.ILinkProviderService=(0,u.createDecorator)("LinkProviderService")},6731:function(a,o,l){var u=this&&this.__decorate||function(A,j,M,L){var I,B=arguments.length,q=B<3?j:L===null?L=Object.getOwnPropertyDescriptor(j,M):L;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")q=Reflect.decorate(A,j,M,L);else for(var U=A.length-1;U>=0;U--)(I=A[U])&&(q=(B<3?I(q):B>3?I(j,M,q):I(j,M))||q);return B>3&&q&&Object.defineProperty(j,M,q),q},h=this&&this.__param||function(A,j){return function(M,L){j(M,L,A)}};Object.defineProperty(o,"__esModule",{value:!0}),o.ThemeService=o.DEFAULT_ANSI_COLORS=void 0;const _=l(7239),p=l(8055),m=l(8460),x=l(844),k=l(2585),v=p.css.toColor("#ffffff"),b=p.css.toColor("#000000"),w=p.css.toColor("#ffffff"),y=p.css.toColor("#000000"),C={css:"rgba(255, 255, 255, 0.3)",rgba:4294967117};o.DEFAULT_ANSI_COLORS=Object.freeze((()=>{const A=[p.css.toColor("#2e3436"),p.css.toColor("#cc0000"),p.css.toColor("#4e9a06"),p.css.toColor("#c4a000"),p.css.toColor("#3465a4"),p.css.toColor("#75507b"),p.css.toColor("#06989a"),p.css.toColor("#d3d7cf"),p.css.toColor("#555753"),p.css.toColor("#ef2929"),p.css.toColor("#8ae234"),p.css.toColor("#fce94f"),p.css.toColor("#729fcf"),p.css.toColor("#ad7fa8"),p.css.toColor("#34e2e2"),p.css.toColor("#eeeeec")],j=[0,95,135,175,215,255];for(let M=0;M<216;M++){const L=j[M/36%6|0],I=j[M/6%6|0],B=j[M%6];A.push({css:p.channels.toCss(L,I,B),rgba:p.channels.toRgba(L,I,B)})}for(let M=0;M<24;M++){const L=8+10*M;A.push({css:p.channels.toCss(L,L,L),rgba:p.channels.toRgba(L,L,L)})}return A})());let E=o.ThemeService=class extends x.Disposable{get colors(){return this._colors}constructor(A){super(),this._optionsService=A,this._contrastCache=new _.ColorContrastCache,this._halfContrastCache=new _.ColorContrastCache,this._onChangeColors=this.register(new m.EventEmitter),this.onChangeColors=this._onChangeColors.event,this._colors={foreground:v,background:b,cursor:w,cursorAccent:y,selectionForeground:void 0,selectionBackgroundTransparent:C,selectionBackgroundOpaque:p.color.blend(b,C),selectionInactiveBackgroundTransparent:C,selectionInactiveBackgroundOpaque:p.color.blend(b,C),ansi:o.DEFAULT_ANSI_COLORS.slice(),contrastCache:this._contrastCache,halfContrastCache:this._halfContrastCache},this._updateRestoreColors(),this._setTheme(this._optionsService.rawOptions.theme),this.register(this._optionsService.onSpecificOptionChange("minimumContrastRatio",(()=>this._contrastCache.clear()))),this.register(this._optionsService.onSpecificOptionChange("theme",(()=>this._setTheme(this._optionsService.rawOptions.theme))))}_setTheme(A={}){const j=this._colors;if(j.foreground=N(A.foreground,v),j.background=N(A.background,b),j.cursor=N(A.cursor,w),j.cursorAccent=N(A.cursorAccent,y),j.selectionBackgroundTransparent=N(A.selectionBackground,C),j.selectionBackgroundOpaque=p.color.blend(j.background,j.selectionBackgroundTransparent),j.selectionInactiveBackgroundTransparent=N(A.selectionInactiveBackground,j.selectionBackgroundTransparent),j.selectionInactiveBackgroundOpaque=p.color.blend(j.background,j.selectionInactiveBackgroundTransparent),j.selectionForeground=A.selectionForeground?N(A.selectionForeground,p.NULL_COLOR):void 0,j.selectionForeground===p.NULL_COLOR&&(j.selectionForeground=void 0),p.color.isOpaque(j.selectionBackgroundTransparent)&&(j.selectionBackgroundTransparent=p.color.opacity(j.selectionBackgroundTransparent,.3)),p.color.isOpaque(j.selectionInactiveBackgroundTransparent)&&(j.selectionInactiveBackgroundTransparent=p.color.opacity(j.selectionInactiveBackgroundTransparent,.3)),j.ansi=o.DEFAULT_ANSI_COLORS.slice(),j.ansi[0]=N(A.black,o.DEFAULT_ANSI_COLORS[0]),j.ansi[1]=N(A.red,o.DEFAULT_ANSI_COLORS[1]),j.ansi[2]=N(A.green,o.DEFAULT_ANSI_COLORS[2]),j.ansi[3]=N(A.yellow,o.DEFAULT_ANSI_COLORS[3]),j.ansi[4]=N(A.blue,o.DEFAULT_ANSI_COLORS[4]),j.ansi[5]=N(A.magenta,o.DEFAULT_ANSI_COLORS[5]),j.ansi[6]=N(A.cyan,o.DEFAULT_ANSI_COLORS[6]),j.ansi[7]=N(A.white,o.DEFAULT_ANSI_COLORS[7]),j.ansi[8]=N(A.brightBlack,o.DEFAULT_ANSI_COLORS[8]),j.ansi[9]=N(A.brightRed,o.DEFAULT_ANSI_COLORS[9]),j.ansi[10]=N(A.brightGreen,o.DEFAULT_ANSI_COLORS[10]),j.ansi[11]=N(A.brightYellow,o.DEFAULT_ANSI_COLORS[11]),j.ansi[12]=N(A.brightBlue,o.DEFAULT_ANSI_COLORS[12]),j.ansi[13]=N(A.brightMagenta,o.DEFAULT_ANSI_COLORS[13]),j.ansi[14]=N(A.brightCyan,o.DEFAULT_ANSI_COLORS[14]),j.ansi[15]=N(A.brightWhite,o.DEFAULT_ANSI_COLORS[15]),A.extendedAnsi){const M=Math.min(j.ansi.length-16,A.extendedAnsi.length);for(let L=0;L{Object.defineProperty(o,"__esModule",{value:!0}),o.CircularList=void 0;const u=l(8460),h=l(844);class _ extends h.Disposable{constructor(m){super(),this._maxLength=m,this.onDeleteEmitter=this.register(new u.EventEmitter),this.onDelete=this.onDeleteEmitter.event,this.onInsertEmitter=this.register(new u.EventEmitter),this.onInsert=this.onInsertEmitter.event,this.onTrimEmitter=this.register(new u.EventEmitter),this.onTrim=this.onTrimEmitter.event,this._array=new Array(this._maxLength),this._startIndex=0,this._length=0}get maxLength(){return this._maxLength}set maxLength(m){if(this._maxLength===m)return;const x=new Array(m);for(let k=0;kthis._length)for(let x=this._length;x=m;v--)this._array[this._getCyclicIndex(v+k.length)]=this._array[this._getCyclicIndex(v)];for(let v=0;vthis._maxLength){const v=this._length+k.length-this._maxLength;this._startIndex+=v,this._length=this._maxLength,this.onTrimEmitter.fire(v)}else this._length+=k.length}trimStart(m){m>this._length&&(m=this._length),this._startIndex+=m,this._length-=m,this.onTrimEmitter.fire(m)}shiftElements(m,x,k){if(!(x<=0)){if(m<0||m>=this._length)throw new Error("start argument out of range");if(m+k<0)throw new Error("Cannot shift elements in list beyond index 0");if(k>0){for(let b=x-1;b>=0;b--)this.set(m+b+k,this.get(m+b));const v=m+x+k-this._length;if(v>0)for(this._length+=v;this._length>this._maxLength;)this._length--,this._startIndex++,this.onTrimEmitter.fire(1)}else for(let v=0;v{Object.defineProperty(o,"__esModule",{value:!0}),o.clone=void 0,o.clone=function l(u,h=5){if(typeof u!="object")return u;const _=Array.isArray(u)?[]:{};for(const p in u)_[p]=h<=1?u[p]:u[p]&&l(u[p],h-1);return _}},8055:(a,o)=>{Object.defineProperty(o,"__esModule",{value:!0}),o.contrastRatio=o.toPaddedHex=o.rgba=o.rgb=o.css=o.color=o.channels=o.NULL_COLOR=void 0;let l=0,u=0,h=0,_=0;var p,m,x,k,v;function b(y){const C=y.toString(16);return C.length<2?"0"+C:C}function w(y,C){return y>>0},y.toColor=function(C,E,N,A){return{css:y.toCss(C,E,N,A),rgba:y.toRgba(C,E,N,A)}}})(p||(o.channels=p={})),(function(y){function C(E,N){return _=Math.round(255*N),[l,u,h]=v.toChannels(E.rgba),{css:p.toCss(l,u,h,_),rgba:p.toRgba(l,u,h,_)}}y.blend=function(E,N){if(_=(255&N.rgba)/255,_===1)return{css:N.css,rgba:N.rgba};const A=N.rgba>>24&255,j=N.rgba>>16&255,M=N.rgba>>8&255,L=E.rgba>>24&255,I=E.rgba>>16&255,B=E.rgba>>8&255;return l=L+Math.round((A-L)*_),u=I+Math.round((j-I)*_),h=B+Math.round((M-B)*_),{css:p.toCss(l,u,h),rgba:p.toRgba(l,u,h)}},y.isOpaque=function(E){return(255&E.rgba)==255},y.ensureContrastRatio=function(E,N,A){const j=v.ensureContrastRatio(E.rgba,N.rgba,A);if(j)return p.toColor(j>>24&255,j>>16&255,j>>8&255)},y.opaque=function(E){const N=(255|E.rgba)>>>0;return[l,u,h]=v.toChannels(N),{css:p.toCss(l,u,h),rgba:N}},y.opacity=C,y.multiplyOpacity=function(E,N){return _=255&E.rgba,C(E,_*N/255)},y.toColorRGB=function(E){return[E.rgba>>24&255,E.rgba>>16&255,E.rgba>>8&255]}})(m||(o.color=m={})),(function(y){let C,E;try{const N=document.createElement("canvas");N.width=1,N.height=1;const A=N.getContext("2d",{willReadFrequently:!0});A&&(C=A,C.globalCompositeOperation="copy",E=C.createLinearGradient(0,0,1,1))}catch{}y.toColor=function(N){if(N.match(/#[\da-f]{3,8}/i))switch(N.length){case 4:return l=parseInt(N.slice(1,2).repeat(2),16),u=parseInt(N.slice(2,3).repeat(2),16),h=parseInt(N.slice(3,4).repeat(2),16),p.toColor(l,u,h);case 5:return l=parseInt(N.slice(1,2).repeat(2),16),u=parseInt(N.slice(2,3).repeat(2),16),h=parseInt(N.slice(3,4).repeat(2),16),_=parseInt(N.slice(4,5).repeat(2),16),p.toColor(l,u,h,_);case 7:return{css:N,rgba:(parseInt(N.slice(1),16)<<8|255)>>>0};case 9:return{css:N,rgba:parseInt(N.slice(1),16)>>>0}}const A=N.match(/rgba?\(\s*(\d{1,3})\s*,\s*(\d{1,3})\s*,\s*(\d{1,3})\s*(,\s*(0|1|\d?\.(\d+))\s*)?\)/);if(A)return l=parseInt(A[1]),u=parseInt(A[2]),h=parseInt(A[3]),_=Math.round(255*(A[5]===void 0?1:parseFloat(A[5]))),p.toColor(l,u,h,_);if(!C||!E)throw new Error("css.toColor: Unsupported css format");if(C.fillStyle=E,C.fillStyle=N,typeof C.fillStyle!="string")throw new Error("css.toColor: Unsupported css format");if(C.fillRect(0,0,1,1),[l,u,h,_]=C.getImageData(0,0,1,1).data,_!==255)throw new Error("css.toColor: Unsupported css format");return{rgba:p.toRgba(l,u,h,_),css:N}}})(x||(o.css=x={})),(function(y){function C(E,N,A){const j=E/255,M=N/255,L=A/255;return .2126*(j<=.03928?j/12.92:Math.pow((j+.055)/1.055,2.4))+.7152*(M<=.03928?M/12.92:Math.pow((M+.055)/1.055,2.4))+.0722*(L<=.03928?L/12.92:Math.pow((L+.055)/1.055,2.4))}y.relativeLuminance=function(E){return C(E>>16&255,E>>8&255,255&E)},y.relativeLuminance2=C})(k||(o.rgb=k={})),(function(y){function C(N,A,j){const M=N>>24&255,L=N>>16&255,I=N>>8&255;let B=A>>24&255,q=A>>16&255,U=A>>8&255,W=w(k.relativeLuminance2(B,q,U),k.relativeLuminance2(M,L,I));for(;W0||q>0||U>0);)B-=Math.max(0,Math.ceil(.1*B)),q-=Math.max(0,Math.ceil(.1*q)),U-=Math.max(0,Math.ceil(.1*U)),W=w(k.relativeLuminance2(B,q,U),k.relativeLuminance2(M,L,I));return(B<<24|q<<16|U<<8|255)>>>0}function E(N,A,j){const M=N>>24&255,L=N>>16&255,I=N>>8&255;let B=A>>24&255,q=A>>16&255,U=A>>8&255,W=w(k.relativeLuminance2(B,q,U),k.relativeLuminance2(M,L,I));for(;W>>0}y.blend=function(N,A){if(_=(255&A)/255,_===1)return A;const j=A>>24&255,M=A>>16&255,L=A>>8&255,I=N>>24&255,B=N>>16&255,q=N>>8&255;return l=I+Math.round((j-I)*_),u=B+Math.round((M-B)*_),h=q+Math.round((L-q)*_),p.toRgba(l,u,h)},y.ensureContrastRatio=function(N,A,j){const M=k.relativeLuminance(N>>8),L=k.relativeLuminance(A>>8);if(w(M,L)>8));if(Uw(M,k.relativeLuminance(W>>8))?q:W}return q}const I=E(N,A,j),B=w(M,k.relativeLuminance(I>>8));if(Bw(M,k.relativeLuminance(q>>8))?I:q}return I}},y.reduceLuminance=C,y.increaseLuminance=E,y.toChannels=function(N){return[N>>24&255,N>>16&255,N>>8&255,255&N]}})(v||(o.rgba=v={})),o.toPaddedHex=b,o.contrastRatio=w},8969:(a,o,l)=>{Object.defineProperty(o,"__esModule",{value:!0}),o.CoreTerminal=void 0;const u=l(844),h=l(2585),_=l(4348),p=l(7866),m=l(744),x=l(7302),k=l(6975),v=l(8460),b=l(1753),w=l(1480),y=l(7994),C=l(9282),E=l(5435),N=l(5981),A=l(2660);let j=!1;class M extends u.Disposable{get onScroll(){return this._onScrollApi||(this._onScrollApi=this.register(new v.EventEmitter),this._onScroll.event((I=>{var B;(B=this._onScrollApi)==null||B.fire(I.position)}))),this._onScrollApi.event}get cols(){return this._bufferService.cols}get rows(){return this._bufferService.rows}get buffers(){return this._bufferService.buffers}get options(){return this.optionsService.options}set options(I){for(const B in I)this.optionsService.options[B]=I[B]}constructor(I){super(),this._windowsWrappingHeuristics=this.register(new u.MutableDisposable),this._onBinary=this.register(new v.EventEmitter),this.onBinary=this._onBinary.event,this._onData=this.register(new v.EventEmitter),this.onData=this._onData.event,this._onLineFeed=this.register(new v.EventEmitter),this.onLineFeed=this._onLineFeed.event,this._onResize=this.register(new v.EventEmitter),this.onResize=this._onResize.event,this._onWriteParsed=this.register(new v.EventEmitter),this.onWriteParsed=this._onWriteParsed.event,this._onScroll=this.register(new v.EventEmitter),this._instantiationService=new _.InstantiationService,this.optionsService=this.register(new x.OptionsService(I)),this._instantiationService.setService(h.IOptionsService,this.optionsService),this._bufferService=this.register(this._instantiationService.createInstance(m.BufferService)),this._instantiationService.setService(h.IBufferService,this._bufferService),this._logService=this.register(this._instantiationService.createInstance(p.LogService)),this._instantiationService.setService(h.ILogService,this._logService),this.coreService=this.register(this._instantiationService.createInstance(k.CoreService)),this._instantiationService.setService(h.ICoreService,this.coreService),this.coreMouseService=this.register(this._instantiationService.createInstance(b.CoreMouseService)),this._instantiationService.setService(h.ICoreMouseService,this.coreMouseService),this.unicodeService=this.register(this._instantiationService.createInstance(w.UnicodeService)),this._instantiationService.setService(h.IUnicodeService,this.unicodeService),this._charsetService=this._instantiationService.createInstance(y.CharsetService),this._instantiationService.setService(h.ICharsetService,this._charsetService),this._oscLinkService=this._instantiationService.createInstance(A.OscLinkService),this._instantiationService.setService(h.IOscLinkService,this._oscLinkService),this._inputHandler=this.register(new E.InputHandler(this._bufferService,this._charsetService,this.coreService,this._logService,this.optionsService,this._oscLinkService,this.coreMouseService,this.unicodeService)),this.register((0,v.forwardEvent)(this._inputHandler.onLineFeed,this._onLineFeed)),this.register(this._inputHandler),this.register((0,v.forwardEvent)(this._bufferService.onResize,this._onResize)),this.register((0,v.forwardEvent)(this.coreService.onData,this._onData)),this.register((0,v.forwardEvent)(this.coreService.onBinary,this._onBinary)),this.register(this.coreService.onRequestScrollToBottom((()=>this.scrollToBottom()))),this.register(this.coreService.onUserInput((()=>this._writeBuffer.handleUserInput()))),this.register(this.optionsService.onMultipleOptionChange(["windowsMode","windowsPty"],(()=>this._handleWindowsPtyOptionChange()))),this.register(this._bufferService.onScroll((B=>{this._onScroll.fire({position:this._bufferService.buffer.ydisp,source:0}),this._inputHandler.markRangeDirty(this._bufferService.buffer.scrollTop,this._bufferService.buffer.scrollBottom)}))),this.register(this._inputHandler.onScroll((B=>{this._onScroll.fire({position:this._bufferService.buffer.ydisp,source:0}),this._inputHandler.markRangeDirty(this._bufferService.buffer.scrollTop,this._bufferService.buffer.scrollBottom)}))),this._writeBuffer=this.register(new N.WriteBuffer(((B,q)=>this._inputHandler.parse(B,q)))),this.register((0,v.forwardEvent)(this._writeBuffer.onWriteParsed,this._onWriteParsed))}write(I,B){this._writeBuffer.write(I,B)}writeSync(I,B){this._logService.logLevel<=h.LogLevelEnum.WARN&&!j&&(this._logService.warn("writeSync is unreliable and will be removed soon."),j=!0),this._writeBuffer.writeSync(I,B)}input(I,B=!0){this.coreService.triggerDataEvent(I,B)}resize(I,B){isNaN(I)||isNaN(B)||(I=Math.max(I,m.MINIMUM_COLS),B=Math.max(B,m.MINIMUM_ROWS),this._bufferService.resize(I,B))}scroll(I,B=!1){this._bufferService.scroll(I,B)}scrollLines(I,B,q){this._bufferService.scrollLines(I,B,q)}scrollPages(I){this.scrollLines(I*(this.rows-1))}scrollToTop(){this.scrollLines(-this._bufferService.buffer.ydisp)}scrollToBottom(){this.scrollLines(this._bufferService.buffer.ybase-this._bufferService.buffer.ydisp)}scrollToLine(I){const B=I-this._bufferService.buffer.ydisp;B!==0&&this.scrollLines(B)}registerEscHandler(I,B){return this._inputHandler.registerEscHandler(I,B)}registerDcsHandler(I,B){return this._inputHandler.registerDcsHandler(I,B)}registerCsiHandler(I,B){return this._inputHandler.registerCsiHandler(I,B)}registerOscHandler(I,B){return this._inputHandler.registerOscHandler(I,B)}_setup(){this._handleWindowsPtyOptionChange()}reset(){this._inputHandler.reset(),this._bufferService.reset(),this._charsetService.reset(),this.coreService.reset(),this.coreMouseService.reset()}_handleWindowsPtyOptionChange(){let I=!1;const B=this.optionsService.rawOptions.windowsPty;B&&B.buildNumber!==void 0&&B.buildNumber!==void 0?I=B.backend==="conpty"&&B.buildNumber<21376:this.optionsService.rawOptions.windowsMode&&(I=!0),I?this._enableWindowsWrappingHeuristics():this._windowsWrappingHeuristics.clear()}_enableWindowsWrappingHeuristics(){if(!this._windowsWrappingHeuristics.value){const I=[];I.push(this.onLineFeed(C.updateWindowsModeWrappedState.bind(null,this._bufferService))),I.push(this.registerCsiHandler({final:"H"},(()=>((0,C.updateWindowsModeWrappedState)(this._bufferService),!1)))),this._windowsWrappingHeuristics.value=(0,u.toDisposable)((()=>{for(const B of I)B.dispose()}))}}}o.CoreTerminal=M},8460:(a,o)=>{Object.defineProperty(o,"__esModule",{value:!0}),o.runAndSubscribe=o.forwardEvent=o.EventEmitter=void 0,o.EventEmitter=class{constructor(){this._listeners=[],this._disposed=!1}get event(){return this._event||(this._event=l=>(this._listeners.push(l),{dispose:()=>{if(!this._disposed){for(let u=0;uu.fire(h)))},o.runAndSubscribe=function(l,u){return u(void 0),l((h=>u(h)))}},5435:function(a,o,l){var u=this&&this.__decorate||function(te,$,D,F){var G,V=arguments.length,ee=V<3?$:F===null?F=Object.getOwnPropertyDescriptor($,D):F;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")ee=Reflect.decorate(te,$,D,F);else for(var ce=te.length-1;ce>=0;ce--)(G=te[ce])&&(ee=(V<3?G(ee):V>3?G($,D,ee):G($,D))||ee);return V>3&&ee&&Object.defineProperty($,D,ee),ee},h=this&&this.__param||function(te,$){return function(D,F){$(D,F,te)}};Object.defineProperty(o,"__esModule",{value:!0}),o.InputHandler=o.WindowsOptionsReportType=void 0;const _=l(2584),p=l(7116),m=l(2015),x=l(844),k=l(482),v=l(8437),b=l(8460),w=l(643),y=l(511),C=l(3734),E=l(2585),N=l(1480),A=l(6242),j=l(6351),M=l(5941),L={"(":0,")":1,"*":2,"+":3,"-":1,".":2},I=131072;function B(te,$){if(te>24)return $.setWinLines||!1;switch(te){case 1:return!!$.restoreWin;case 2:return!!$.minimizeWin;case 3:return!!$.setWinPosition;case 4:return!!$.setWinSizePixels;case 5:return!!$.raiseWin;case 6:return!!$.lowerWin;case 7:return!!$.refreshWin;case 8:return!!$.setWinSizeChars;case 9:return!!$.maximizeWin;case 10:return!!$.fullscreenWin;case 11:return!!$.getWinState;case 13:return!!$.getWinPosition;case 14:return!!$.getWinSizePixels;case 15:return!!$.getScreenSizePixels;case 16:return!!$.getCellSizePixels;case 18:return!!$.getWinSizeChars;case 19:return!!$.getScreenSizeChars;case 20:return!!$.getIconTitle;case 21:return!!$.getWinTitle;case 22:return!!$.pushTitle;case 23:return!!$.popTitle;case 24:return!!$.setWinLines}return!1}var q;(function(te){te[te.GET_WIN_SIZE_PIXELS=0]="GET_WIN_SIZE_PIXELS",te[te.GET_CELL_SIZE_PIXELS=1]="GET_CELL_SIZE_PIXELS"})(q||(o.WindowsOptionsReportType=q={}));let U=0;class W extends x.Disposable{getAttrData(){return this._curAttrData}constructor($,D,F,G,V,ee,ce,ae,re=new m.EscapeSequenceParser){super(),this._bufferService=$,this._charsetService=D,this._coreService=F,this._logService=G,this._optionsService=V,this._oscLinkService=ee,this._coreMouseService=ce,this._unicodeService=ae,this._parser=re,this._parseBuffer=new Uint32Array(4096),this._stringDecoder=new k.StringToUtf32,this._utf8Decoder=new k.Utf8ToUtf32,this._workCell=new y.CellData,this._windowTitle="",this._iconName="",this._windowTitleStack=[],this._iconNameStack=[],this._curAttrData=v.DEFAULT_ATTR_DATA.clone(),this._eraseAttrDataInternal=v.DEFAULT_ATTR_DATA.clone(),this._onRequestBell=this.register(new b.EventEmitter),this.onRequestBell=this._onRequestBell.event,this._onRequestRefreshRows=this.register(new b.EventEmitter),this.onRequestRefreshRows=this._onRequestRefreshRows.event,this._onRequestReset=this.register(new b.EventEmitter),this.onRequestReset=this._onRequestReset.event,this._onRequestSendFocus=this.register(new b.EventEmitter),this.onRequestSendFocus=this._onRequestSendFocus.event,this._onRequestSyncScrollBar=this.register(new b.EventEmitter),this.onRequestSyncScrollBar=this._onRequestSyncScrollBar.event,this._onRequestWindowsOptionsReport=this.register(new b.EventEmitter),this.onRequestWindowsOptionsReport=this._onRequestWindowsOptionsReport.event,this._onA11yChar=this.register(new b.EventEmitter),this.onA11yChar=this._onA11yChar.event,this._onA11yTab=this.register(new b.EventEmitter),this.onA11yTab=this._onA11yTab.event,this._onCursorMove=this.register(new b.EventEmitter),this.onCursorMove=this._onCursorMove.event,this._onLineFeed=this.register(new b.EventEmitter),this.onLineFeed=this._onLineFeed.event,this._onScroll=this.register(new b.EventEmitter),this.onScroll=this._onScroll.event,this._onTitleChange=this.register(new b.EventEmitter),this.onTitleChange=this._onTitleChange.event,this._onColor=this.register(new b.EventEmitter),this.onColor=this._onColor.event,this._parseStack={paused:!1,cursorStartX:0,cursorStartY:0,decodedLength:0,position:0},this._specialColors=[256,257,258],this.register(this._parser),this._dirtyRowTracker=new H(this._bufferService),this._activeBuffer=this._bufferService.buffer,this.register(this._bufferService.buffers.onBufferActivate((X=>this._activeBuffer=X.activeBuffer))),this._parser.setCsiHandlerFallback(((X,oe)=>{this._logService.debug("Unknown CSI code: ",{identifier:this._parser.identToString(X),params:oe.toArray()})})),this._parser.setEscHandlerFallback((X=>{this._logService.debug("Unknown ESC code: ",{identifier:this._parser.identToString(X)})})),this._parser.setExecuteHandlerFallback((X=>{this._logService.debug("Unknown EXECUTE code: ",{code:X})})),this._parser.setOscHandlerFallback(((X,oe,le)=>{this._logService.debug("Unknown OSC code: ",{identifier:X,action:oe,data:le})})),this._parser.setDcsHandlerFallback(((X,oe,le)=>{oe==="HOOK"&&(le=le.toArray()),this._logService.debug("Unknown DCS code: ",{identifier:this._parser.identToString(X),action:oe,payload:le})})),this._parser.setPrintHandler(((X,oe,le)=>this.print(X,oe,le))),this._parser.registerCsiHandler({final:"@"},(X=>this.insertChars(X))),this._parser.registerCsiHandler({intermediates:" ",final:"@"},(X=>this.scrollLeft(X))),this._parser.registerCsiHandler({final:"A"},(X=>this.cursorUp(X))),this._parser.registerCsiHandler({intermediates:" ",final:"A"},(X=>this.scrollRight(X))),this._parser.registerCsiHandler({final:"B"},(X=>this.cursorDown(X))),this._parser.registerCsiHandler({final:"C"},(X=>this.cursorForward(X))),this._parser.registerCsiHandler({final:"D"},(X=>this.cursorBackward(X))),this._parser.registerCsiHandler({final:"E"},(X=>this.cursorNextLine(X))),this._parser.registerCsiHandler({final:"F"},(X=>this.cursorPrecedingLine(X))),this._parser.registerCsiHandler({final:"G"},(X=>this.cursorCharAbsolute(X))),this._parser.registerCsiHandler({final:"H"},(X=>this.cursorPosition(X))),this._parser.registerCsiHandler({final:"I"},(X=>this.cursorForwardTab(X))),this._parser.registerCsiHandler({final:"J"},(X=>this.eraseInDisplay(X,!1))),this._parser.registerCsiHandler({prefix:"?",final:"J"},(X=>this.eraseInDisplay(X,!0))),this._parser.registerCsiHandler({final:"K"},(X=>this.eraseInLine(X,!1))),this._parser.registerCsiHandler({prefix:"?",final:"K"},(X=>this.eraseInLine(X,!0))),this._parser.registerCsiHandler({final:"L"},(X=>this.insertLines(X))),this._parser.registerCsiHandler({final:"M"},(X=>this.deleteLines(X))),this._parser.registerCsiHandler({final:"P"},(X=>this.deleteChars(X))),this._parser.registerCsiHandler({final:"S"},(X=>this.scrollUp(X))),this._parser.registerCsiHandler({final:"T"},(X=>this.scrollDown(X))),this._parser.registerCsiHandler({final:"X"},(X=>this.eraseChars(X))),this._parser.registerCsiHandler({final:"Z"},(X=>this.cursorBackwardTab(X))),this._parser.registerCsiHandler({final:"`"},(X=>this.charPosAbsolute(X))),this._parser.registerCsiHandler({final:"a"},(X=>this.hPositionRelative(X))),this._parser.registerCsiHandler({final:"b"},(X=>this.repeatPrecedingCharacter(X))),this._parser.registerCsiHandler({final:"c"},(X=>this.sendDeviceAttributesPrimary(X))),this._parser.registerCsiHandler({prefix:">",final:"c"},(X=>this.sendDeviceAttributesSecondary(X))),this._parser.registerCsiHandler({final:"d"},(X=>this.linePosAbsolute(X))),this._parser.registerCsiHandler({final:"e"},(X=>this.vPositionRelative(X))),this._parser.registerCsiHandler({final:"f"},(X=>this.hVPosition(X))),this._parser.registerCsiHandler({final:"g"},(X=>this.tabClear(X))),this._parser.registerCsiHandler({final:"h"},(X=>this.setMode(X))),this._parser.registerCsiHandler({prefix:"?",final:"h"},(X=>this.setModePrivate(X))),this._parser.registerCsiHandler({final:"l"},(X=>this.resetMode(X))),this._parser.registerCsiHandler({prefix:"?",final:"l"},(X=>this.resetModePrivate(X))),this._parser.registerCsiHandler({final:"m"},(X=>this.charAttributes(X))),this._parser.registerCsiHandler({final:"n"},(X=>this.deviceStatus(X))),this._parser.registerCsiHandler({prefix:"?",final:"n"},(X=>this.deviceStatusPrivate(X))),this._parser.registerCsiHandler({intermediates:"!",final:"p"},(X=>this.softReset(X))),this._parser.registerCsiHandler({intermediates:" ",final:"q"},(X=>this.setCursorStyle(X))),this._parser.registerCsiHandler({final:"r"},(X=>this.setScrollRegion(X))),this._parser.registerCsiHandler({final:"s"},(X=>this.saveCursor(X))),this._parser.registerCsiHandler({final:"t"},(X=>this.windowOptions(X))),this._parser.registerCsiHandler({final:"u"},(X=>this.restoreCursor(X))),this._parser.registerCsiHandler({intermediates:"'",final:"}"},(X=>this.insertColumns(X))),this._parser.registerCsiHandler({intermediates:"'",final:"~"},(X=>this.deleteColumns(X))),this._parser.registerCsiHandler({intermediates:'"',final:"q"},(X=>this.selectProtected(X))),this._parser.registerCsiHandler({intermediates:"$",final:"p"},(X=>this.requestMode(X,!0))),this._parser.registerCsiHandler({prefix:"?",intermediates:"$",final:"p"},(X=>this.requestMode(X,!1))),this._parser.setExecuteHandler(_.C0.BEL,(()=>this.bell())),this._parser.setExecuteHandler(_.C0.LF,(()=>this.lineFeed())),this._parser.setExecuteHandler(_.C0.VT,(()=>this.lineFeed())),this._parser.setExecuteHandler(_.C0.FF,(()=>this.lineFeed())),this._parser.setExecuteHandler(_.C0.CR,(()=>this.carriageReturn())),this._parser.setExecuteHandler(_.C0.BS,(()=>this.backspace())),this._parser.setExecuteHandler(_.C0.HT,(()=>this.tab())),this._parser.setExecuteHandler(_.C0.SO,(()=>this.shiftOut())),this._parser.setExecuteHandler(_.C0.SI,(()=>this.shiftIn())),this._parser.setExecuteHandler(_.C1.IND,(()=>this.index())),this._parser.setExecuteHandler(_.C1.NEL,(()=>this.nextLine())),this._parser.setExecuteHandler(_.C1.HTS,(()=>this.tabSet())),this._parser.registerOscHandler(0,new A.OscHandler((X=>(this.setTitle(X),this.setIconName(X),!0)))),this._parser.registerOscHandler(1,new A.OscHandler((X=>this.setIconName(X)))),this._parser.registerOscHandler(2,new A.OscHandler((X=>this.setTitle(X)))),this._parser.registerOscHandler(4,new A.OscHandler((X=>this.setOrReportIndexedColor(X)))),this._parser.registerOscHandler(8,new A.OscHandler((X=>this.setHyperlink(X)))),this._parser.registerOscHandler(10,new A.OscHandler((X=>this.setOrReportFgColor(X)))),this._parser.registerOscHandler(11,new A.OscHandler((X=>this.setOrReportBgColor(X)))),this._parser.registerOscHandler(12,new A.OscHandler((X=>this.setOrReportCursorColor(X)))),this._parser.registerOscHandler(104,new A.OscHandler((X=>this.restoreIndexedColor(X)))),this._parser.registerOscHandler(110,new A.OscHandler((X=>this.restoreFgColor(X)))),this._parser.registerOscHandler(111,new A.OscHandler((X=>this.restoreBgColor(X)))),this._parser.registerOscHandler(112,new A.OscHandler((X=>this.restoreCursorColor(X)))),this._parser.registerEscHandler({final:"7"},(()=>this.saveCursor())),this._parser.registerEscHandler({final:"8"},(()=>this.restoreCursor())),this._parser.registerEscHandler({final:"D"},(()=>this.index())),this._parser.registerEscHandler({final:"E"},(()=>this.nextLine())),this._parser.registerEscHandler({final:"H"},(()=>this.tabSet())),this._parser.registerEscHandler({final:"M"},(()=>this.reverseIndex())),this._parser.registerEscHandler({final:"="},(()=>this.keypadApplicationMode())),this._parser.registerEscHandler({final:">"},(()=>this.keypadNumericMode())),this._parser.registerEscHandler({final:"c"},(()=>this.fullReset())),this._parser.registerEscHandler({final:"n"},(()=>this.setgLevel(2))),this._parser.registerEscHandler({final:"o"},(()=>this.setgLevel(3))),this._parser.registerEscHandler({final:"|"},(()=>this.setgLevel(3))),this._parser.registerEscHandler({final:"}"},(()=>this.setgLevel(2))),this._parser.registerEscHandler({final:"~"},(()=>this.setgLevel(1))),this._parser.registerEscHandler({intermediates:"%",final:"@"},(()=>this.selectDefaultCharset())),this._parser.registerEscHandler({intermediates:"%",final:"G"},(()=>this.selectDefaultCharset()));for(const X in p.CHARSETS)this._parser.registerEscHandler({intermediates:"(",final:X},(()=>this.selectCharset("("+X))),this._parser.registerEscHandler({intermediates:")",final:X},(()=>this.selectCharset(")"+X))),this._parser.registerEscHandler({intermediates:"*",final:X},(()=>this.selectCharset("*"+X))),this._parser.registerEscHandler({intermediates:"+",final:X},(()=>this.selectCharset("+"+X))),this._parser.registerEscHandler({intermediates:"-",final:X},(()=>this.selectCharset("-"+X))),this._parser.registerEscHandler({intermediates:".",final:X},(()=>this.selectCharset("."+X))),this._parser.registerEscHandler({intermediates:"/",final:X},(()=>this.selectCharset("/"+X)));this._parser.registerEscHandler({intermediates:"#",final:"8"},(()=>this.screenAlignmentPattern())),this._parser.setErrorHandler((X=>(this._logService.error("Parsing error: ",X),X))),this._parser.registerDcsHandler({intermediates:"$",final:"q"},new j.DcsHandler(((X,oe)=>this.requestStatusString(X,oe))))}_preserveStack($,D,F,G){this._parseStack.paused=!0,this._parseStack.cursorStartX=$,this._parseStack.cursorStartY=D,this._parseStack.decodedLength=F,this._parseStack.position=G}_logSlowResolvingAsync($){this._logService.logLevel<=E.LogLevelEnum.WARN&&Promise.race([$,new Promise(((D,F)=>setTimeout((()=>F("#SLOW_TIMEOUT")),5e3)))]).catch((D=>{if(D!=="#SLOW_TIMEOUT")throw D;console.warn("async parser handler taking longer than 5000 ms")}))}_getCurrentLinkId(){return this._curAttrData.extended.urlId}parse($,D){let F,G=this._activeBuffer.x,V=this._activeBuffer.y,ee=0;const ce=this._parseStack.paused;if(ce){if(F=this._parser.parse(this._parseBuffer,this._parseStack.decodedLength,D))return this._logSlowResolvingAsync(F),F;G=this._parseStack.cursorStartX,V=this._parseStack.cursorStartY,this._parseStack.paused=!1,$.length>I&&(ee=this._parseStack.position+I)}if(this._logService.logLevel<=E.LogLevelEnum.DEBUG&&this._logService.debug("parsing data"+(typeof $=="string"?` "${$}"`:` "${Array.prototype.map.call($,(X=>String.fromCharCode(X))).join("")}"`),typeof $=="string"?$.split("").map((X=>X.charCodeAt(0))):$),this._parseBuffer.length<$.length&&this._parseBuffer.lengthI)for(let X=ee;X<$.length;X+=I){const oe=X+I<$.length?X+I:$.length,le=typeof $=="string"?this._stringDecoder.decode($.substring(X,oe),this._parseBuffer):this._utf8Decoder.decode($.subarray(X,oe),this._parseBuffer);if(F=this._parser.parse(this._parseBuffer,le))return this._preserveStack(G,V,le,X),this._logSlowResolvingAsync(F),F}else if(!ce){const X=typeof $=="string"?this._stringDecoder.decode($,this._parseBuffer):this._utf8Decoder.decode($,this._parseBuffer);if(F=this._parser.parse(this._parseBuffer,X))return this._preserveStack(G,V,X,0),this._logSlowResolvingAsync(F),F}this._activeBuffer.x===G&&this._activeBuffer.y===V||this._onCursorMove.fire();const ae=this._dirtyRowTracker.end+(this._bufferService.buffer.ybase-this._bufferService.buffer.ydisp),re=this._dirtyRowTracker.start+(this._bufferService.buffer.ybase-this._bufferService.buffer.ydisp);re0&&le.getWidth(this._activeBuffer.x-1)===2&&le.setCellFromCodepoint(this._activeBuffer.x-1,0,1,oe);let _e=this._parser.precedingJoinState;for(let pe=D;peae){if(re){const He=le;let Oe=this._activeBuffer.x-ze;for(this._activeBuffer.x=ze,this._activeBuffer.y++,this._activeBuffer.y===this._activeBuffer.scrollBottom+1?(this._activeBuffer.y--,this._bufferService.scroll(this._eraseAttrData(),!0)):(this._activeBuffer.y>=this._bufferService.rows&&(this._activeBuffer.y=this._bufferService.rows-1),this._activeBuffer.lines.get(this._activeBuffer.ybase+this._activeBuffer.y).isWrapped=!0),le=this._activeBuffer.lines.get(this._activeBuffer.ybase+this._activeBuffer.y),ze>0&&le instanceof v.BufferLine&&le.copyCellsFrom(He,Oe,0,ze,!1);Oe=0;)le.setCellFromCodepoint(this._activeBuffer.x++,0,0,oe)}else if(X&&(le.insertCells(this._activeBuffer.x,V-ze,this._activeBuffer.getNullCell(oe)),le.getWidth(ae-1)===2&&le.setCellFromCodepoint(ae-1,w.NULL_CELL_CODE,w.NULL_CELL_WIDTH,oe)),le.setCellFromCodepoint(this._activeBuffer.x++,G,V,oe),V>0)for(;--V;)le.setCellFromCodepoint(this._activeBuffer.x++,0,0,oe)}this._parser.precedingJoinState=_e,this._activeBuffer.x0&&le.getWidth(this._activeBuffer.x)===0&&!le.hasContent(this._activeBuffer.x)&&le.setCellFromCodepoint(this._activeBuffer.x,0,1,oe),this._dirtyRowTracker.markDirty(this._activeBuffer.y)}registerCsiHandler($,D){return $.final!=="t"||$.prefix||$.intermediates?this._parser.registerCsiHandler($,D):this._parser.registerCsiHandler($,(F=>!B(F.params[0],this._optionsService.rawOptions.windowOptions)||D(F)))}registerDcsHandler($,D){return this._parser.registerDcsHandler($,new j.DcsHandler(D))}registerEscHandler($,D){return this._parser.registerEscHandler($,D)}registerOscHandler($,D){return this._parser.registerOscHandler($,new A.OscHandler(D))}bell(){return this._onRequestBell.fire(),!0}lineFeed(){return this._dirtyRowTracker.markDirty(this._activeBuffer.y),this._optionsService.rawOptions.convertEol&&(this._activeBuffer.x=0),this._activeBuffer.y++,this._activeBuffer.y===this._activeBuffer.scrollBottom+1?(this._activeBuffer.y--,this._bufferService.scroll(this._eraseAttrData())):this._activeBuffer.y>=this._bufferService.rows?this._activeBuffer.y=this._bufferService.rows-1:this._activeBuffer.lines.get(this._activeBuffer.ybase+this._activeBuffer.y).isWrapped=!1,this._activeBuffer.x>=this._bufferService.cols&&this._activeBuffer.x--,this._dirtyRowTracker.markDirty(this._activeBuffer.y),this._onLineFeed.fire(),!0}carriageReturn(){return this._activeBuffer.x=0,!0}backspace(){var $;if(!this._coreService.decPrivateModes.reverseWraparound)return this._restrictCursor(),this._activeBuffer.x>0&&this._activeBuffer.x--,!0;if(this._restrictCursor(this._bufferService.cols),this._activeBuffer.x>0)this._activeBuffer.x--;else if(this._activeBuffer.x===0&&this._activeBuffer.y>this._activeBuffer.scrollTop&&this._activeBuffer.y<=this._activeBuffer.scrollBottom&&(($=this._activeBuffer.lines.get(this._activeBuffer.ybase+this._activeBuffer.y))!=null&&$.isWrapped)){this._activeBuffer.lines.get(this._activeBuffer.ybase+this._activeBuffer.y).isWrapped=!1,this._activeBuffer.y--,this._activeBuffer.x=this._bufferService.cols-1;const D=this._activeBuffer.lines.get(this._activeBuffer.ybase+this._activeBuffer.y);D.hasWidth(this._activeBuffer.x)&&!D.hasContent(this._activeBuffer.x)&&this._activeBuffer.x--}return this._restrictCursor(),!0}tab(){if(this._activeBuffer.x>=this._bufferService.cols)return!0;const $=this._activeBuffer.x;return this._activeBuffer.x=this._activeBuffer.nextStop(),this._optionsService.rawOptions.screenReaderMode&&this._onA11yTab.fire(this._activeBuffer.x-$),!0}shiftOut(){return this._charsetService.setgLevel(1),!0}shiftIn(){return this._charsetService.setgLevel(0),!0}_restrictCursor($=this._bufferService.cols-1){this._activeBuffer.x=Math.min($,Math.max(0,this._activeBuffer.x)),this._activeBuffer.y=this._coreService.decPrivateModes.origin?Math.min(this._activeBuffer.scrollBottom,Math.max(this._activeBuffer.scrollTop,this._activeBuffer.y)):Math.min(this._bufferService.rows-1,Math.max(0,this._activeBuffer.y)),this._dirtyRowTracker.markDirty(this._activeBuffer.y)}_setCursor($,D){this._dirtyRowTracker.markDirty(this._activeBuffer.y),this._coreService.decPrivateModes.origin?(this._activeBuffer.x=$,this._activeBuffer.y=this._activeBuffer.scrollTop+D):(this._activeBuffer.x=$,this._activeBuffer.y=D),this._restrictCursor(),this._dirtyRowTracker.markDirty(this._activeBuffer.y)}_moveCursor($,D){this._restrictCursor(),this._setCursor(this._activeBuffer.x+$,this._activeBuffer.y+D)}cursorUp($){const D=this._activeBuffer.y-this._activeBuffer.scrollTop;return D>=0?this._moveCursor(0,-Math.min(D,$.params[0]||1)):this._moveCursor(0,-($.params[0]||1)),!0}cursorDown($){const D=this._activeBuffer.scrollBottom-this._activeBuffer.y;return D>=0?this._moveCursor(0,Math.min(D,$.params[0]||1)):this._moveCursor(0,$.params[0]||1),!0}cursorForward($){return this._moveCursor($.params[0]||1,0),!0}cursorBackward($){return this._moveCursor(-($.params[0]||1),0),!0}cursorNextLine($){return this.cursorDown($),this._activeBuffer.x=0,!0}cursorPrecedingLine($){return this.cursorUp($),this._activeBuffer.x=0,!0}cursorCharAbsolute($){return this._setCursor(($.params[0]||1)-1,this._activeBuffer.y),!0}cursorPosition($){return this._setCursor($.length>=2?($.params[1]||1)-1:0,($.params[0]||1)-1),!0}charPosAbsolute($){return this._setCursor(($.params[0]||1)-1,this._activeBuffer.y),!0}hPositionRelative($){return this._moveCursor($.params[0]||1,0),!0}linePosAbsolute($){return this._setCursor(this._activeBuffer.x,($.params[0]||1)-1),!0}vPositionRelative($){return this._moveCursor(0,$.params[0]||1),!0}hVPosition($){return this.cursorPosition($),!0}tabClear($){const D=$.params[0];return D===0?delete this._activeBuffer.tabs[this._activeBuffer.x]:D===3&&(this._activeBuffer.tabs={}),!0}cursorForwardTab($){if(this._activeBuffer.x>=this._bufferService.cols)return!0;let D=$.params[0]||1;for(;D--;)this._activeBuffer.x=this._activeBuffer.nextStop();return!0}cursorBackwardTab($){if(this._activeBuffer.x>=this._bufferService.cols)return!0;let D=$.params[0]||1;for(;D--;)this._activeBuffer.x=this._activeBuffer.prevStop();return!0}selectProtected($){const D=$.params[0];return D===1&&(this._curAttrData.bg|=536870912),D!==2&&D!==0||(this._curAttrData.bg&=-536870913),!0}_eraseInBufferLine($,D,F,G=!1,V=!1){const ee=this._activeBuffer.lines.get(this._activeBuffer.ybase+$);ee.replaceCells(D,F,this._activeBuffer.getNullCell(this._eraseAttrData()),V),G&&(ee.isWrapped=!1)}_resetBufferLine($,D=!1){const F=this._activeBuffer.lines.get(this._activeBuffer.ybase+$);F&&(F.fill(this._activeBuffer.getNullCell(this._eraseAttrData()),D),this._bufferService.buffer.clearMarkers(this._activeBuffer.ybase+$),F.isWrapped=!1)}eraseInDisplay($,D=!1){let F;switch(this._restrictCursor(this._bufferService.cols),$.params[0]){case 0:for(F=this._activeBuffer.y,this._dirtyRowTracker.markDirty(F),this._eraseInBufferLine(F++,this._activeBuffer.x,this._bufferService.cols,this._activeBuffer.x===0,D);F=this._bufferService.cols&&(this._activeBuffer.lines.get(F+1).isWrapped=!1);F--;)this._resetBufferLine(F,D);this._dirtyRowTracker.markDirty(0);break;case 2:for(F=this._bufferService.rows,this._dirtyRowTracker.markDirty(F-1);F--;)this._resetBufferLine(F,D);this._dirtyRowTracker.markDirty(0);break;case 3:const G=this._activeBuffer.lines.length-this._bufferService.rows;G>0&&(this._activeBuffer.lines.trimStart(G),this._activeBuffer.ybase=Math.max(this._activeBuffer.ybase-G,0),this._activeBuffer.ydisp=Math.max(this._activeBuffer.ydisp-G,0),this._onScroll.fire(0))}return!0}eraseInLine($,D=!1){switch(this._restrictCursor(this._bufferService.cols),$.params[0]){case 0:this._eraseInBufferLine(this._activeBuffer.y,this._activeBuffer.x,this._bufferService.cols,this._activeBuffer.x===0,D);break;case 1:this._eraseInBufferLine(this._activeBuffer.y,0,this._activeBuffer.x+1,!1,D);break;case 2:this._eraseInBufferLine(this._activeBuffer.y,0,this._bufferService.cols,!0,D)}return this._dirtyRowTracker.markDirty(this._activeBuffer.y),!0}insertLines($){this._restrictCursor();let D=$.params[0]||1;if(this._activeBuffer.y>this._activeBuffer.scrollBottom||this._activeBuffer.ythis._activeBuffer.scrollBottom||this._activeBuffer.ythis._activeBuffer.scrollBottom||this._activeBuffer.ythis._activeBuffer.scrollBottom||this._activeBuffer.ythis._activeBuffer.scrollBottom||this._activeBuffer.ythis._activeBuffer.scrollBottom||this._activeBuffer.y65535?2:1}let re=ae;for(let X=1;X0||(this._is("xterm")||this._is("rxvt-unicode")||this._is("screen")?this._coreService.triggerDataEvent(_.C0.ESC+"[?1;2c"):this._is("linux")&&this._coreService.triggerDataEvent(_.C0.ESC+"[?6c")),!0}sendDeviceAttributesSecondary($){return $.params[0]>0||(this._is("xterm")?this._coreService.triggerDataEvent(_.C0.ESC+"[>0;276;0c"):this._is("rxvt-unicode")?this._coreService.triggerDataEvent(_.C0.ESC+"[>85;95;0c"):this._is("linux")?this._coreService.triggerDataEvent($.params[0]+"c"):this._is("screen")&&this._coreService.triggerDataEvent(_.C0.ESC+"[>83;40003;0c")),!0}_is($){return(this._optionsService.rawOptions.termName+"").indexOf($)===0}setMode($){for(let D=0;D<$.length;D++)switch($.params[D]){case 4:this._coreService.modes.insertMode=!0;break;case 20:this._optionsService.options.convertEol=!0}return!0}setModePrivate($){for(let D=0;D<$.length;D++)switch($.params[D]){case 1:this._coreService.decPrivateModes.applicationCursorKeys=!0;break;case 2:this._charsetService.setgCharset(0,p.DEFAULT_CHARSET),this._charsetService.setgCharset(1,p.DEFAULT_CHARSET),this._charsetService.setgCharset(2,p.DEFAULT_CHARSET),this._charsetService.setgCharset(3,p.DEFAULT_CHARSET);break;case 3:this._optionsService.rawOptions.windowOptions.setWinLines&&(this._bufferService.resize(132,this._bufferService.rows),this._onRequestReset.fire());break;case 6:this._coreService.decPrivateModes.origin=!0,this._setCursor(0,0);break;case 7:this._coreService.decPrivateModes.wraparound=!0;break;case 12:this._optionsService.options.cursorBlink=!0;break;case 45:this._coreService.decPrivateModes.reverseWraparound=!0;break;case 66:this._logService.debug("Serial port requested application keypad."),this._coreService.decPrivateModes.applicationKeypad=!0,this._onRequestSyncScrollBar.fire();break;case 9:this._coreMouseService.activeProtocol="X10";break;case 1e3:this._coreMouseService.activeProtocol="VT200";break;case 1002:this._coreMouseService.activeProtocol="DRAG";break;case 1003:this._coreMouseService.activeProtocol="ANY";break;case 1004:this._coreService.decPrivateModes.sendFocus=!0,this._onRequestSendFocus.fire();break;case 1005:this._logService.debug("DECSET 1005 not supported (see #2507)");break;case 1006:this._coreMouseService.activeEncoding="SGR";break;case 1015:this._logService.debug("DECSET 1015 not supported (see #2507)");break;case 1016:this._coreMouseService.activeEncoding="SGR_PIXELS";break;case 25:this._coreService.isCursorHidden=!1;break;case 1048:this.saveCursor();break;case 1049:this.saveCursor();case 47:case 1047:this._bufferService.buffers.activateAltBuffer(this._eraseAttrData()),this._coreService.isCursorInitialized=!0,this._onRequestRefreshRows.fire(0,this._bufferService.rows-1),this._onRequestSyncScrollBar.fire();break;case 2004:this._coreService.decPrivateModes.bracketedPasteMode=!0}return!0}resetMode($){for(let D=0;D<$.length;D++)switch($.params[D]){case 4:this._coreService.modes.insertMode=!1;break;case 20:this._optionsService.options.convertEol=!1}return!0}resetModePrivate($){for(let D=0;D<$.length;D++)switch($.params[D]){case 1:this._coreService.decPrivateModes.applicationCursorKeys=!1;break;case 3:this._optionsService.rawOptions.windowOptions.setWinLines&&(this._bufferService.resize(80,this._bufferService.rows),this._onRequestReset.fire());break;case 6:this._coreService.decPrivateModes.origin=!1,this._setCursor(0,0);break;case 7:this._coreService.decPrivateModes.wraparound=!1;break;case 12:this._optionsService.options.cursorBlink=!1;break;case 45:this._coreService.decPrivateModes.reverseWraparound=!1;break;case 66:this._logService.debug("Switching back to normal keypad."),this._coreService.decPrivateModes.applicationKeypad=!1,this._onRequestSyncScrollBar.fire();break;case 9:case 1e3:case 1002:case 1003:this._coreMouseService.activeProtocol="NONE";break;case 1004:this._coreService.decPrivateModes.sendFocus=!1;break;case 1005:this._logService.debug("DECRST 1005 not supported (see #2507)");break;case 1006:case 1016:this._coreMouseService.activeEncoding="DEFAULT";break;case 1015:this._logService.debug("DECRST 1015 not supported (see #2507)");break;case 25:this._coreService.isCursorHidden=!0;break;case 1048:this.restoreCursor();break;case 1049:case 47:case 1047:this._bufferService.buffers.activateNormalBuffer(),$.params[D]===1049&&this.restoreCursor(),this._coreService.isCursorInitialized=!0,this._onRequestRefreshRows.fire(0,this._bufferService.rows-1),this._onRequestSyncScrollBar.fire();break;case 2004:this._coreService.decPrivateModes.bracketedPasteMode=!1}return!0}requestMode($,D){const F=this._coreService.decPrivateModes,{activeProtocol:G,activeEncoding:V}=this._coreMouseService,ee=this._coreService,{buffers:ce,cols:ae}=this._bufferService,{active:re,alt:X}=ce,oe=this._optionsService.rawOptions,le=Ie=>Ie?1:2,_e=$.params[0];return pe=_e,Ee=D?_e===2?4:_e===4?le(ee.modes.insertMode):_e===12?3:_e===20?le(oe.convertEol):0:_e===1?le(F.applicationCursorKeys):_e===3?oe.windowOptions.setWinLines?ae===80?2:ae===132?1:0:0:_e===6?le(F.origin):_e===7?le(F.wraparound):_e===8?3:_e===9?le(G==="X10"):_e===12?le(oe.cursorBlink):_e===25?le(!ee.isCursorHidden):_e===45?le(F.reverseWraparound):_e===66?le(F.applicationKeypad):_e===67?4:_e===1e3?le(G==="VT200"):_e===1002?le(G==="DRAG"):_e===1003?le(G==="ANY"):_e===1004?le(F.sendFocus):_e===1005?4:_e===1006?le(V==="SGR"):_e===1015?4:_e===1016?le(V==="SGR_PIXELS"):_e===1048?1:_e===47||_e===1047||_e===1049?le(re===X):_e===2004?le(F.bracketedPasteMode):0,ee.triggerDataEvent(`${_.C0.ESC}[${D?"":"?"}${pe};${Ee}$y`),!0;var pe,Ee}_updateAttrColor($,D,F,G,V){return D===2?($|=50331648,$&=-16777216,$|=C.AttributeData.fromColorRGB([F,G,V])):D===5&&($&=-50331904,$|=33554432|255&F),$}_extractColor($,D,F){const G=[0,0,-1,0,0,0];let V=0,ee=0;do{if(G[ee+V]=$.params[D+ee],$.hasSubParams(D+ee)){const ce=$.getSubParams(D+ee);let ae=0;do G[1]===5&&(V=1),G[ee+ae+1+V]=ce[ae];while(++ae=2||G[1]===2&&ee+V>=5)break;G[1]&&(V=1)}while(++ee+D<$.length&&ee+V5)&&($=1),D.extended.underlineStyle=$,D.fg|=268435456,$===0&&(D.fg&=-268435457),D.updateExtended()}_processSGR0($){$.fg=v.DEFAULT_ATTR_DATA.fg,$.bg=v.DEFAULT_ATTR_DATA.bg,$.extended=$.extended.clone(),$.extended.underlineStyle=0,$.extended.underlineColor&=-67108864,$.updateExtended()}charAttributes($){if($.length===1&&$.params[0]===0)return this._processSGR0(this._curAttrData),!0;const D=$.length;let F;const G=this._curAttrData;for(let V=0;V=30&&F<=37?(G.fg&=-50331904,G.fg|=16777216|F-30):F>=40&&F<=47?(G.bg&=-50331904,G.bg|=16777216|F-40):F>=90&&F<=97?(G.fg&=-50331904,G.fg|=16777224|F-90):F>=100&&F<=107?(G.bg&=-50331904,G.bg|=16777224|F-100):F===0?this._processSGR0(G):F===1?G.fg|=134217728:F===3?G.bg|=67108864:F===4?(G.fg|=268435456,this._processUnderline($.hasSubParams(V)?$.getSubParams(V)[0]:1,G)):F===5?G.fg|=536870912:F===7?G.fg|=67108864:F===8?G.fg|=1073741824:F===9?G.fg|=2147483648:F===2?G.bg|=134217728:F===21?this._processUnderline(2,G):F===22?(G.fg&=-134217729,G.bg&=-134217729):F===23?G.bg&=-67108865:F===24?(G.fg&=-268435457,this._processUnderline(0,G)):F===25?G.fg&=-536870913:F===27?G.fg&=-67108865:F===28?G.fg&=-1073741825:F===29?G.fg&=2147483647:F===39?(G.fg&=-67108864,G.fg|=16777215&v.DEFAULT_ATTR_DATA.fg):F===49?(G.bg&=-67108864,G.bg|=16777215&v.DEFAULT_ATTR_DATA.bg):F===38||F===48||F===58?V+=this._extractColor($,V,G):F===53?G.bg|=1073741824:F===55?G.bg&=-1073741825:F===59?(G.extended=G.extended.clone(),G.extended.underlineColor=-1,G.updateExtended()):F===100?(G.fg&=-67108864,G.fg|=16777215&v.DEFAULT_ATTR_DATA.fg,G.bg&=-67108864,G.bg|=16777215&v.DEFAULT_ATTR_DATA.bg):this._logService.debug("Unknown SGR attribute: %d.",F);return!0}deviceStatus($){switch($.params[0]){case 5:this._coreService.triggerDataEvent(`${_.C0.ESC}[0n`);break;case 6:const D=this._activeBuffer.y+1,F=this._activeBuffer.x+1;this._coreService.triggerDataEvent(`${_.C0.ESC}[${D};${F}R`)}return!0}deviceStatusPrivate($){if($.params[0]===6){const D=this._activeBuffer.y+1,F=this._activeBuffer.x+1;this._coreService.triggerDataEvent(`${_.C0.ESC}[?${D};${F}R`)}return!0}softReset($){return this._coreService.isCursorHidden=!1,this._onRequestSyncScrollBar.fire(),this._activeBuffer.scrollTop=0,this._activeBuffer.scrollBottom=this._bufferService.rows-1,this._curAttrData=v.DEFAULT_ATTR_DATA.clone(),this._coreService.reset(),this._charsetService.reset(),this._activeBuffer.savedX=0,this._activeBuffer.savedY=this._activeBuffer.ybase,this._activeBuffer.savedCurAttrData.fg=this._curAttrData.fg,this._activeBuffer.savedCurAttrData.bg=this._curAttrData.bg,this._activeBuffer.savedCharset=this._charsetService.charset,this._coreService.decPrivateModes.origin=!1,!0}setCursorStyle($){const D=$.params[0]||1;switch(D){case 1:case 2:this._optionsService.options.cursorStyle="block";break;case 3:case 4:this._optionsService.options.cursorStyle="underline";break;case 5:case 6:this._optionsService.options.cursorStyle="bar"}const F=D%2==1;return this._optionsService.options.cursorBlink=F,!0}setScrollRegion($){const D=$.params[0]||1;let F;return($.length<2||(F=$.params[1])>this._bufferService.rows||F===0)&&(F=this._bufferService.rows),F>D&&(this._activeBuffer.scrollTop=D-1,this._activeBuffer.scrollBottom=F-1,this._setCursor(0,0)),!0}windowOptions($){if(!B($.params[0],this._optionsService.rawOptions.windowOptions))return!0;const D=$.length>1?$.params[1]:0;switch($.params[0]){case 14:D!==2&&this._onRequestWindowsOptionsReport.fire(q.GET_WIN_SIZE_PIXELS);break;case 16:this._onRequestWindowsOptionsReport.fire(q.GET_CELL_SIZE_PIXELS);break;case 18:this._bufferService&&this._coreService.triggerDataEvent(`${_.C0.ESC}[8;${this._bufferService.rows};${this._bufferService.cols}t`);break;case 22:D!==0&&D!==2||(this._windowTitleStack.push(this._windowTitle),this._windowTitleStack.length>10&&this._windowTitleStack.shift()),D!==0&&D!==1||(this._iconNameStack.push(this._iconName),this._iconNameStack.length>10&&this._iconNameStack.shift());break;case 23:D!==0&&D!==2||this._windowTitleStack.length&&this.setTitle(this._windowTitleStack.pop()),D!==0&&D!==1||this._iconNameStack.length&&this.setIconName(this._iconNameStack.pop())}return!0}saveCursor($){return this._activeBuffer.savedX=this._activeBuffer.x,this._activeBuffer.savedY=this._activeBuffer.ybase+this._activeBuffer.y,this._activeBuffer.savedCurAttrData.fg=this._curAttrData.fg,this._activeBuffer.savedCurAttrData.bg=this._curAttrData.bg,this._activeBuffer.savedCharset=this._charsetService.charset,!0}restoreCursor($){return this._activeBuffer.x=this._activeBuffer.savedX||0,this._activeBuffer.y=Math.max(this._activeBuffer.savedY-this._activeBuffer.ybase,0),this._curAttrData.fg=this._activeBuffer.savedCurAttrData.fg,this._curAttrData.bg=this._activeBuffer.savedCurAttrData.bg,this._charsetService.charset=this._savedCharset,this._activeBuffer.savedCharset&&(this._charsetService.charset=this._activeBuffer.savedCharset),this._restrictCursor(),!0}setTitle($){return this._windowTitle=$,this._onTitleChange.fire($),!0}setIconName($){return this._iconName=$,!0}setOrReportIndexedColor($){const D=[],F=$.split(";");for(;F.length>1;){const G=F.shift(),V=F.shift();if(/^\d+$/.exec(G)){const ee=parseInt(G);if(Y(ee))if(V==="?")D.push({type:0,index:ee});else{const ce=(0,M.parseColor)(V);ce&&D.push({type:1,index:ee,color:ce})}}}return D.length&&this._onColor.fire(D),!0}setHyperlink($){const D=$.split(";");return!(D.length<2)&&(D[1]?this._createHyperlink(D[0],D[1]):!D[0]&&this._finishHyperlink())}_createHyperlink($,D){this._getCurrentLinkId()&&this._finishHyperlink();const F=$.split(":");let G;const V=F.findIndex((ee=>ee.startsWith("id=")));return V!==-1&&(G=F[V].slice(3)||void 0),this._curAttrData.extended=this._curAttrData.extended.clone(),this._curAttrData.extended.urlId=this._oscLinkService.registerLink({id:G,uri:D}),this._curAttrData.updateExtended(),!0}_finishHyperlink(){return this._curAttrData.extended=this._curAttrData.extended.clone(),this._curAttrData.extended.urlId=0,this._curAttrData.updateExtended(),!0}_setOrReportSpecialColor($,D){const F=$.split(";");for(let G=0;G=this._specialColors.length);++G,++D)if(F[G]==="?")this._onColor.fire([{type:0,index:this._specialColors[D]}]);else{const V=(0,M.parseColor)(F[G]);V&&this._onColor.fire([{type:1,index:this._specialColors[D],color:V}])}return!0}setOrReportFgColor($){return this._setOrReportSpecialColor($,0)}setOrReportBgColor($){return this._setOrReportSpecialColor($,1)}setOrReportCursorColor($){return this._setOrReportSpecialColor($,2)}restoreIndexedColor($){if(!$)return this._onColor.fire([{type:2}]),!0;const D=[],F=$.split(";");for(let G=0;G=this._bufferService.rows&&(this._activeBuffer.y=this._bufferService.rows-1),this._restrictCursor(),!0}tabSet(){return this._activeBuffer.tabs[this._activeBuffer.x]=!0,!0}reverseIndex(){if(this._restrictCursor(),this._activeBuffer.y===this._activeBuffer.scrollTop){const $=this._activeBuffer.scrollBottom-this._activeBuffer.scrollTop;this._activeBuffer.lines.shiftElements(this._activeBuffer.ybase+this._activeBuffer.y,$,1),this._activeBuffer.lines.set(this._activeBuffer.ybase+this._activeBuffer.y,this._activeBuffer.getBlankLine(this._eraseAttrData())),this._dirtyRowTracker.markRangeDirty(this._activeBuffer.scrollTop,this._activeBuffer.scrollBottom)}else this._activeBuffer.y--,this._restrictCursor();return!0}fullReset(){return this._parser.reset(),this._onRequestReset.fire(),!0}reset(){this._curAttrData=v.DEFAULT_ATTR_DATA.clone(),this._eraseAttrDataInternal=v.DEFAULT_ATTR_DATA.clone()}_eraseAttrData(){return this._eraseAttrDataInternal.bg&=-67108864,this._eraseAttrDataInternal.bg|=67108863&this._curAttrData.bg,this._eraseAttrDataInternal}setgLevel($){return this._charsetService.setgLevel($),!0}screenAlignmentPattern(){const $=new y.CellData;$.content=4194373,$.fg=this._curAttrData.fg,$.bg=this._curAttrData.bg,this._setCursor(0,0);for(let D=0;D(this._coreService.triggerDataEvent(`${_.C0.ESC}${V}${_.C0.ESC}\\`),!0))($==='"q'?`P1$r${this._curAttrData.isProtected()?1:0}"q`:$==='"p'?'P1$r61;1"p':$==="r"?`P1$r${F.scrollTop+1};${F.scrollBottom+1}r`:$==="m"?"P1$r0m":$===" q"?`P1$r${{block:2,underline:4,bar:6}[G.cursorStyle]-(G.cursorBlink?1:0)} q`:"P0$r")}markRangeDirty($,D){this._dirtyRowTracker.markRangeDirty($,D)}}o.InputHandler=W;let H=class{constructor(te){this._bufferService=te,this.clearRange()}clearRange(){this.start=this._bufferService.buffer.y,this.end=this._bufferService.buffer.y}markDirty(te){tethis.end&&(this.end=te)}markRangeDirty(te,$){te>$&&(U=te,te=$,$=U),tethis.end&&(this.end=$)}markAllDirty(){this.markRangeDirty(0,this._bufferService.rows-1)}};function Y(te){return 0<=te&&te<256}H=u([h(0,E.IBufferService)],H)},844:(a,o)=>{function l(u){for(const h of u)h.dispose();u.length=0}Object.defineProperty(o,"__esModule",{value:!0}),o.getDisposeArrayDisposable=o.disposeArray=o.toDisposable=o.MutableDisposable=o.Disposable=void 0,o.Disposable=class{constructor(){this._disposables=[],this._isDisposed=!1}dispose(){this._isDisposed=!0;for(const u of this._disposables)u.dispose();this._disposables.length=0}register(u){return this._disposables.push(u),u}unregister(u){const h=this._disposables.indexOf(u);h!==-1&&this._disposables.splice(h,1)}},o.MutableDisposable=class{constructor(){this._isDisposed=!1}get value(){return this._isDisposed?void 0:this._value}set value(u){var h;this._isDisposed||u===this._value||((h=this._value)==null||h.dispose(),this._value=u)}clear(){this.value=void 0}dispose(){var u;this._isDisposed=!0,(u=this._value)==null||u.dispose(),this._value=void 0}},o.toDisposable=function(u){return{dispose:u}},o.disposeArray=l,o.getDisposeArrayDisposable=function(u){return{dispose:()=>l(u)}}},1505:(a,o)=>{Object.defineProperty(o,"__esModule",{value:!0}),o.FourKeyMap=o.TwoKeyMap=void 0;class l{constructor(){this._data={}}set(h,_,p){this._data[h]||(this._data[h]={}),this._data[h][_]=p}get(h,_){return this._data[h]?this._data[h][_]:void 0}clear(){this._data={}}}o.TwoKeyMap=l,o.FourKeyMap=class{constructor(){this._data=new l}set(u,h,_,p,m){this._data.get(u,h)||this._data.set(u,h,new l),this._data.get(u,h).set(_,p,m)}get(u,h,_,p){var m;return(m=this._data.get(u,h))==null?void 0:m.get(_,p)}clear(){this._data.clear()}}},6114:(a,o)=>{Object.defineProperty(o,"__esModule",{value:!0}),o.isChromeOS=o.isLinux=o.isWindows=o.isIphone=o.isIpad=o.isMac=o.getSafariVersion=o.isSafari=o.isLegacyEdge=o.isFirefox=o.isNode=void 0,o.isNode=typeof process<"u"&&"title"in process;const l=o.isNode?"node":navigator.userAgent,u=o.isNode?"node":navigator.platform;o.isFirefox=l.includes("Firefox"),o.isLegacyEdge=l.includes("Edge"),o.isSafari=/^((?!chrome|android).)*safari/i.test(l),o.getSafariVersion=function(){if(!o.isSafari)return 0;const h=l.match(/Version\/(\d+)/);return h===null||h.length<2?0:parseInt(h[1])},o.isMac=["Macintosh","MacIntel","MacPPC","Mac68K"].includes(u),o.isIpad=u==="iPad",o.isIphone=u==="iPhone",o.isWindows=["Windows","Win16","Win32","WinCE"].includes(u),o.isLinux=u.indexOf("Linux")>=0,o.isChromeOS=/\bCrOS\b/.test(l)},6106:(a,o)=>{Object.defineProperty(o,"__esModule",{value:!0}),o.SortedList=void 0;let l=0;o.SortedList=class{constructor(u){this._getKey=u,this._array=[]}clear(){this._array.length=0}insert(u){this._array.length!==0?(l=this._search(this._getKey(u)),this._array.splice(l,0,u)):this._array.push(u)}delete(u){if(this._array.length===0)return!1;const h=this._getKey(u);if(h===void 0||(l=this._search(h),l===-1)||this._getKey(this._array[l])!==h)return!1;do if(this._array[l]===u)return this._array.splice(l,1),!0;while(++l=this._array.length)&&this._getKey(this._array[l])===u))do yield this._array[l];while(++l=this._array.length)&&this._getKey(this._array[l])===u))do h(this._array[l]);while(++l=h;){let p=h+_>>1;const m=this._getKey(this._array[p]);if(m>u)_=p-1;else{if(!(m0&&this._getKey(this._array[p-1])===u;)p--;return p}h=p+1}}return h}}},7226:(a,o,l)=>{Object.defineProperty(o,"__esModule",{value:!0}),o.DebouncedIdleTask=o.IdleTaskQueue=o.PriorityTaskQueue=void 0;const u=l(6114);class h{constructor(){this._tasks=[],this._i=0}enqueue(m){this._tasks.push(m),this._start()}flush(){for(;this._ib)return v-x<-20&&console.warn(`task queue exceeded allotted deadline by ${Math.abs(Math.round(v-x))}ms`),void this._start();v=b}this.clear()}}class _ extends h{_requestCallback(m){return setTimeout((()=>m(this._createDeadline(16))))}_cancelCallback(m){clearTimeout(m)}_createDeadline(m){const x=Date.now()+m;return{timeRemaining:()=>Math.max(0,x-Date.now())}}}o.PriorityTaskQueue=_,o.IdleTaskQueue=!u.isNode&&"requestIdleCallback"in window?class extends h{_requestCallback(p){return requestIdleCallback(p)}_cancelCallback(p){cancelIdleCallback(p)}}:_,o.DebouncedIdleTask=class{constructor(){this._queue=new o.IdleTaskQueue}set(p){this._queue.clear(),this._queue.enqueue(p)}flush(){this._queue.flush()}}},9282:(a,o,l)=>{Object.defineProperty(o,"__esModule",{value:!0}),o.updateWindowsModeWrappedState=void 0;const u=l(643);o.updateWindowsModeWrappedState=function(h){const _=h.buffer.lines.get(h.buffer.ybase+h.buffer.y-1),p=_==null?void 0:_.get(h.cols-1),m=h.buffer.lines.get(h.buffer.ybase+h.buffer.y);m&&p&&(m.isWrapped=p[u.CHAR_DATA_CODE_INDEX]!==u.NULL_CELL_CODE&&p[u.CHAR_DATA_CODE_INDEX]!==u.WHITESPACE_CELL_CODE)}},3734:(a,o)=>{Object.defineProperty(o,"__esModule",{value:!0}),o.ExtendedAttrs=o.AttributeData=void 0;class l{constructor(){this.fg=0,this.bg=0,this.extended=new u}static toColorRGB(_){return[_>>>16&255,_>>>8&255,255&_]}static fromColorRGB(_){return(255&_[0])<<16|(255&_[1])<<8|255&_[2]}clone(){const _=new l;return _.fg=this.fg,_.bg=this.bg,_.extended=this.extended.clone(),_}isInverse(){return 67108864&this.fg}isBold(){return 134217728&this.fg}isUnderline(){return this.hasExtendedAttrs()&&this.extended.underlineStyle!==0?1:268435456&this.fg}isBlink(){return 536870912&this.fg}isInvisible(){return 1073741824&this.fg}isItalic(){return 67108864&this.bg}isDim(){return 134217728&this.bg}isStrikethrough(){return 2147483648&this.fg}isProtected(){return 536870912&this.bg}isOverline(){return 1073741824&this.bg}getFgColorMode(){return 50331648&this.fg}getBgColorMode(){return 50331648&this.bg}isFgRGB(){return(50331648&this.fg)==50331648}isBgRGB(){return(50331648&this.bg)==50331648}isFgPalette(){return(50331648&this.fg)==16777216||(50331648&this.fg)==33554432}isBgPalette(){return(50331648&this.bg)==16777216||(50331648&this.bg)==33554432}isFgDefault(){return(50331648&this.fg)==0}isBgDefault(){return(50331648&this.bg)==0}isAttributeDefault(){return this.fg===0&&this.bg===0}getFgColor(){switch(50331648&this.fg){case 16777216:case 33554432:return 255&this.fg;case 50331648:return 16777215&this.fg;default:return-1}}getBgColor(){switch(50331648&this.bg){case 16777216:case 33554432:return 255&this.bg;case 50331648:return 16777215&this.bg;default:return-1}}hasExtendedAttrs(){return 268435456&this.bg}updateExtended(){this.extended.isEmpty()?this.bg&=-268435457:this.bg|=268435456}getUnderlineColor(){if(268435456&this.bg&&~this.extended.underlineColor)switch(50331648&this.extended.underlineColor){case 16777216:case 33554432:return 255&this.extended.underlineColor;case 50331648:return 16777215&this.extended.underlineColor;default:return this.getFgColor()}return this.getFgColor()}getUnderlineColorMode(){return 268435456&this.bg&&~this.extended.underlineColor?50331648&this.extended.underlineColor:this.getFgColorMode()}isUnderlineColorRGB(){return 268435456&this.bg&&~this.extended.underlineColor?(50331648&this.extended.underlineColor)==50331648:this.isFgRGB()}isUnderlineColorPalette(){return 268435456&this.bg&&~this.extended.underlineColor?(50331648&this.extended.underlineColor)==16777216||(50331648&this.extended.underlineColor)==33554432:this.isFgPalette()}isUnderlineColorDefault(){return 268435456&this.bg&&~this.extended.underlineColor?(50331648&this.extended.underlineColor)==0:this.isFgDefault()}getUnderlineStyle(){return 268435456&this.fg?268435456&this.bg?this.extended.underlineStyle:1:0}getUnderlineVariantOffset(){return this.extended.underlineVariantOffset}}o.AttributeData=l;class u{get ext(){return this._urlId?-469762049&this._ext|this.underlineStyle<<26:this._ext}set ext(_){this._ext=_}get underlineStyle(){return this._urlId?5:(469762048&this._ext)>>26}set underlineStyle(_){this._ext&=-469762049,this._ext|=_<<26&469762048}get underlineColor(){return 67108863&this._ext}set underlineColor(_){this._ext&=-67108864,this._ext|=67108863&_}get urlId(){return this._urlId}set urlId(_){this._urlId=_}get underlineVariantOffset(){const _=(3758096384&this._ext)>>29;return _<0?4294967288^_:_}set underlineVariantOffset(_){this._ext&=536870911,this._ext|=_<<29&3758096384}constructor(_=0,p=0){this._ext=0,this._urlId=0,this._ext=_,this._urlId=p}clone(){return new u(this._ext,this._urlId)}isEmpty(){return this.underlineStyle===0&&this._urlId===0}}o.ExtendedAttrs=u},9092:(a,o,l)=>{Object.defineProperty(o,"__esModule",{value:!0}),o.Buffer=o.MAX_BUFFER_SIZE=void 0;const u=l(6349),h=l(7226),_=l(3734),p=l(8437),m=l(4634),x=l(511),k=l(643),v=l(4863),b=l(7116);o.MAX_BUFFER_SIZE=4294967295,o.Buffer=class{constructor(w,y,C){this._hasScrollback=w,this._optionsService=y,this._bufferService=C,this.ydisp=0,this.ybase=0,this.y=0,this.x=0,this.tabs={},this.savedY=0,this.savedX=0,this.savedCurAttrData=p.DEFAULT_ATTR_DATA.clone(),this.savedCharset=b.DEFAULT_CHARSET,this.markers=[],this._nullCell=x.CellData.fromCharData([0,k.NULL_CELL_CHAR,k.NULL_CELL_WIDTH,k.NULL_CELL_CODE]),this._whitespaceCell=x.CellData.fromCharData([0,k.WHITESPACE_CELL_CHAR,k.WHITESPACE_CELL_WIDTH,k.WHITESPACE_CELL_CODE]),this._isClearing=!1,this._memoryCleanupQueue=new h.IdleTaskQueue,this._memoryCleanupPosition=0,this._cols=this._bufferService.cols,this._rows=this._bufferService.rows,this.lines=new u.CircularList(this._getCorrectBufferLength(this._rows)),this.scrollTop=0,this.scrollBottom=this._rows-1,this.setupTabStops()}getNullCell(w){return w?(this._nullCell.fg=w.fg,this._nullCell.bg=w.bg,this._nullCell.extended=w.extended):(this._nullCell.fg=0,this._nullCell.bg=0,this._nullCell.extended=new _.ExtendedAttrs),this._nullCell}getWhitespaceCell(w){return w?(this._whitespaceCell.fg=w.fg,this._whitespaceCell.bg=w.bg,this._whitespaceCell.extended=w.extended):(this._whitespaceCell.fg=0,this._whitespaceCell.bg=0,this._whitespaceCell.extended=new _.ExtendedAttrs),this._whitespaceCell}getBlankLine(w,y){return new p.BufferLine(this._bufferService.cols,this.getNullCell(w),y)}get hasScrollback(){return this._hasScrollback&&this.lines.maxLength>this._rows}get isCursorInViewport(){const w=this.ybase+this.y-this.ydisp;return w>=0&&wo.MAX_BUFFER_SIZE?o.MAX_BUFFER_SIZE:y}fillViewportRows(w){if(this.lines.length===0){w===void 0&&(w=p.DEFAULT_ATTR_DATA);let y=this._rows;for(;y--;)this.lines.push(this.getBlankLine(w))}}clear(){this.ydisp=0,this.ybase=0,this.y=0,this.x=0,this.lines=new u.CircularList(this._getCorrectBufferLength(this._rows)),this.scrollTop=0,this.scrollBottom=this._rows-1,this.setupTabStops()}resize(w,y){const C=this.getNullCell(p.DEFAULT_ATTR_DATA);let E=0;const N=this._getCorrectBufferLength(y);if(N>this.lines.maxLength&&(this.lines.maxLength=N),this.lines.length>0){if(this._cols0&&this.lines.length<=this.ybase+this.y+A+1?(this.ybase--,A++,this.ydisp>0&&this.ydisp--):this.lines.push(new p.BufferLine(w,C)));else for(let j=this._rows;j>y;j--)this.lines.length>y+this.ybase&&(this.lines.length>this.ybase+this.y+1?this.lines.pop():(this.ybase++,this.ydisp++));if(N0&&(this.lines.trimStart(j),this.ybase=Math.max(this.ybase-j,0),this.ydisp=Math.max(this.ydisp-j,0),this.savedY=Math.max(this.savedY-j,0)),this.lines.maxLength=N}this.x=Math.min(this.x,w-1),this.y=Math.min(this.y,y-1),A&&(this.y+=A),this.savedX=Math.min(this.savedX,w-1),this.scrollTop=0}if(this.scrollBottom=y-1,this._isReflowEnabled&&(this._reflow(w,y),this._cols>w))for(let A=0;A.1*this.lines.length&&(this._memoryCleanupPosition=0,this._memoryCleanupQueue.enqueue((()=>this._batchedMemoryCleanup())))}_batchedMemoryCleanup(){let w=!0;this._memoryCleanupPosition>=this.lines.length&&(this._memoryCleanupPosition=0,w=!1);let y=0;for(;this._memoryCleanupPosition100)return!0;return w}get _isReflowEnabled(){const w=this._optionsService.rawOptions.windowsPty;return w&&w.buildNumber?this._hasScrollback&&w.backend==="conpty"&&w.buildNumber>=21376:this._hasScrollback&&!this._optionsService.rawOptions.windowsMode}_reflow(w,y){this._cols!==w&&(w>this._cols?this._reflowLarger(w,y):this._reflowSmaller(w,y))}_reflowLarger(w,y){const C=(0,m.reflowLargerGetLinesToRemove)(this.lines,this._cols,w,this.ybase+this.y,this.getNullCell(p.DEFAULT_ATTR_DATA));if(C.length>0){const E=(0,m.reflowLargerCreateNewLayout)(this.lines,C);(0,m.reflowLargerApplyNewLayout)(this.lines,E.layout),this._reflowLargerAdjustViewport(w,y,E.countRemoved)}}_reflowLargerAdjustViewport(w,y,C){const E=this.getNullCell(p.DEFAULT_ATTR_DATA);let N=C;for(;N-- >0;)this.ybase===0?(this.y>0&&this.y--,this.lines.length=0;A--){let j=this.lines.get(A);if(!j||!j.isWrapped&&j.getTrimmedLength()<=w)continue;const M=[j];for(;j.isWrapped&&A>0;)j=this.lines.get(--A),M.unshift(j);const L=this.ybase+this.y;if(L>=A&&L0&&(E.push({start:A+M.length+N,newLines:W}),N+=W.length),M.push(...W);let H=B.length-1,Y=B[H];Y===0&&(H--,Y=B[H]);let te=M.length-q-1,$=I;for(;te>=0;){const F=Math.min($,Y);if(M[H]===void 0)break;if(M[H].copyCellsFrom(M[te],$-F,Y-F,F,!0),Y-=F,Y===0&&(H--,Y=B[H]),$-=F,$===0){te--;const G=Math.max(te,0);$=(0,m.getWrappedLineTrimmedLength)(M,G,this._cols)}}for(let F=0;F0;)this.ybase===0?this.y0){const A=[],j=[];for(let H=0;H=0;H--)if(B&&B.start>L+q){for(let Y=B.newLines.length-1;Y>=0;Y--)this.lines.set(H--,B.newLines[Y]);H++,A.push({index:L+1,amount:B.newLines.length}),q+=B.newLines.length,B=E[++I]}else this.lines.set(H,j[L--]);let U=0;for(let H=A.length-1;H>=0;H--)A[H].index+=U,this.lines.onInsertEmitter.fire(A[H]),U+=A[H].amount;const W=Math.max(0,M+N-this.lines.maxLength);W>0&&this.lines.onTrimEmitter.fire(W)}}translateBufferLineToString(w,y,C=0,E){const N=this.lines.get(w);return N?N.translateToString(y,C,E):""}getWrappedRangeForLine(w){let y=w,C=w;for(;y>0&&this.lines.get(y).isWrapped;)y--;for(;C+10;);return w>=this._cols?this._cols-1:w<0?0:w}nextStop(w){for(w==null&&(w=this.x);!this.tabs[++w]&&w=this._cols?this._cols-1:w<0?0:w}clearMarkers(w){this._isClearing=!0;for(let y=0;y{y.line-=C,y.line<0&&y.dispose()}))),y.register(this.lines.onInsert((C=>{y.line>=C.index&&(y.line+=C.amount)}))),y.register(this.lines.onDelete((C=>{y.line>=C.index&&y.lineC.index&&(y.line-=C.amount)}))),y.register(y.onDispose((()=>this._removeMarker(y)))),y}_removeMarker(w){this._isClearing||this.markers.splice(this.markers.indexOf(w),1)}}},8437:(a,o,l)=>{Object.defineProperty(o,"__esModule",{value:!0}),o.BufferLine=o.DEFAULT_ATTR_DATA=void 0;const u=l(3734),h=l(511),_=l(643),p=l(482);o.DEFAULT_ATTR_DATA=Object.freeze(new u.AttributeData);let m=0;class x{constructor(v,b,w=!1){this.isWrapped=w,this._combined={},this._extendedAttrs={},this._data=new Uint32Array(3*v);const y=b||h.CellData.fromCharData([0,_.NULL_CELL_CHAR,_.NULL_CELL_WIDTH,_.NULL_CELL_CODE]);for(let C=0;C>22,2097152&b?this._combined[v].charCodeAt(this._combined[v].length-1):w]}set(v,b){this._data[3*v+1]=b[_.CHAR_DATA_ATTR_INDEX],b[_.CHAR_DATA_CHAR_INDEX].length>1?(this._combined[v]=b[1],this._data[3*v+0]=2097152|v|b[_.CHAR_DATA_WIDTH_INDEX]<<22):this._data[3*v+0]=b[_.CHAR_DATA_CHAR_INDEX].charCodeAt(0)|b[_.CHAR_DATA_WIDTH_INDEX]<<22}getWidth(v){return this._data[3*v+0]>>22}hasWidth(v){return 12582912&this._data[3*v+0]}getFg(v){return this._data[3*v+1]}getBg(v){return this._data[3*v+2]}hasContent(v){return 4194303&this._data[3*v+0]}getCodePoint(v){const b=this._data[3*v+0];return 2097152&b?this._combined[v].charCodeAt(this._combined[v].length-1):2097151&b}isCombined(v){return 2097152&this._data[3*v+0]}getString(v){const b=this._data[3*v+0];return 2097152&b?this._combined[v]:2097151&b?(0,p.stringFromCodePoint)(2097151&b):""}isProtected(v){return 536870912&this._data[3*v+2]}loadCell(v,b){return m=3*v,b.content=this._data[m+0],b.fg=this._data[m+1],b.bg=this._data[m+2],2097152&b.content&&(b.combinedData=this._combined[v]),268435456&b.bg&&(b.extended=this._extendedAttrs[v]),b}setCell(v,b){2097152&b.content&&(this._combined[v]=b.combinedData),268435456&b.bg&&(this._extendedAttrs[v]=b.extended),this._data[3*v+0]=b.content,this._data[3*v+1]=b.fg,this._data[3*v+2]=b.bg}setCellFromCodepoint(v,b,w,y){268435456&y.bg&&(this._extendedAttrs[v]=y.extended),this._data[3*v+0]=b|w<<22,this._data[3*v+1]=y.fg,this._data[3*v+2]=y.bg}addCodepointToCell(v,b,w){let y=this._data[3*v+0];2097152&y?this._combined[v]+=(0,p.stringFromCodePoint)(b):2097151&y?(this._combined[v]=(0,p.stringFromCodePoint)(2097151&y)+(0,p.stringFromCodePoint)(b),y&=-2097152,y|=2097152):y=b|4194304,w&&(y&=-12582913,y|=w<<22),this._data[3*v+0]=y}insertCells(v,b,w){if((v%=this.length)&&this.getWidth(v-1)===2&&this.setCellFromCodepoint(v-1,0,1,w),b=0;--C)this.setCell(v+b+C,this.loadCell(v+C,y));for(let C=0;Cthis.length){if(this._data.buffer.byteLength>=4*w)this._data=new Uint32Array(this._data.buffer,0,w);else{const y=new Uint32Array(w);y.set(this._data),this._data=y}for(let y=this.length;y=v&&delete this._combined[N]}const C=Object.keys(this._extendedAttrs);for(let E=0;E=v&&delete this._extendedAttrs[N]}}return this.length=v,4*w*2=0;--v)if(4194303&this._data[3*v+0])return v+(this._data[3*v+0]>>22);return 0}getNoBgTrimmedLength(){for(let v=this.length-1;v>=0;--v)if(4194303&this._data[3*v+0]||50331648&this._data[3*v+2])return v+(this._data[3*v+0]>>22);return 0}copyCellsFrom(v,b,w,y,C){const E=v._data;if(C)for(let A=y-1;A>=0;A--){for(let j=0;j<3;j++)this._data[3*(w+A)+j]=E[3*(b+A)+j];268435456&E[3*(b+A)+2]&&(this._extendedAttrs[w+A]=v._extendedAttrs[b+A])}else for(let A=0;A=b&&(this._combined[j-b+w]=v._combined[j])}}translateToString(v,b,w,y){b=b??0,w=w??this.length,v&&(w=Math.min(w,this.getTrimmedLength())),y&&(y.length=0);let C="";for(;b>22||1}return y&&y.push(b),C}}o.BufferLine=x},4841:(a,o)=>{Object.defineProperty(o,"__esModule",{value:!0}),o.getRangeLength=void 0,o.getRangeLength=function(l,u){if(l.start.y>l.end.y)throw new Error(`Buffer range end (${l.end.x}, ${l.end.y}) cannot be before start (${l.start.x}, ${l.start.y})`);return u*(l.end.y-l.start.y)+(l.end.x-l.start.x+1)}},4634:(a,o)=>{function l(u,h,_){if(h===u.length-1)return u[h].getTrimmedLength();const p=!u[h].hasContent(_-1)&&u[h].getWidth(_-1)===1,m=u[h+1].getWidth(0)===2;return p&&m?_-1:_}Object.defineProperty(o,"__esModule",{value:!0}),o.getWrappedLineTrimmedLength=o.reflowSmallerGetNewLineLengths=o.reflowLargerApplyNewLayout=o.reflowLargerCreateNewLayout=o.reflowLargerGetLinesToRemove=void 0,o.reflowLargerGetLinesToRemove=function(u,h,_,p,m){const x=[];for(let k=0;k=k&&p0&&(j>y||w[j].getTrimmedLength()===0);j--)A++;A>0&&(x.push(k+w.length-A),x.push(A)),k+=w.length-1}return x},o.reflowLargerCreateNewLayout=function(u,h){const _=[];let p=0,m=h[p],x=0;for(let k=0;kl(u,w,h))).reduce(((b,w)=>b+w));let x=0,k=0,v=0;for(;vb&&(x-=b,k++);const w=u[k].getWidth(x-1)===2;w&&x--;const y=w?_-1:_;p.push(y),v+=y}return p},o.getWrappedLineTrimmedLength=l},5295:(a,o,l)=>{Object.defineProperty(o,"__esModule",{value:!0}),o.BufferSet=void 0;const u=l(8460),h=l(844),_=l(9092);class p extends h.Disposable{constructor(x,k){super(),this._optionsService=x,this._bufferService=k,this._onBufferActivate=this.register(new u.EventEmitter),this.onBufferActivate=this._onBufferActivate.event,this.reset(),this.register(this._optionsService.onSpecificOptionChange("scrollback",(()=>this.resize(this._bufferService.cols,this._bufferService.rows)))),this.register(this._optionsService.onSpecificOptionChange("tabStopWidth",(()=>this.setupTabStops())))}reset(){this._normal=new _.Buffer(!0,this._optionsService,this._bufferService),this._normal.fillViewportRows(),this._alt=new _.Buffer(!1,this._optionsService,this._bufferService),this._activeBuffer=this._normal,this._onBufferActivate.fire({activeBuffer:this._normal,inactiveBuffer:this._alt}),this.setupTabStops()}get alt(){return this._alt}get active(){return this._activeBuffer}get normal(){return this._normal}activateNormalBuffer(){this._activeBuffer!==this._normal&&(this._normal.x=this._alt.x,this._normal.y=this._alt.y,this._alt.clearAllMarkers(),this._alt.clear(),this._activeBuffer=this._normal,this._onBufferActivate.fire({activeBuffer:this._normal,inactiveBuffer:this._alt}))}activateAltBuffer(x){this._activeBuffer!==this._alt&&(this._alt.fillViewportRows(x),this._alt.x=this._normal.x,this._alt.y=this._normal.y,this._activeBuffer=this._alt,this._onBufferActivate.fire({activeBuffer:this._alt,inactiveBuffer:this._normal}))}resize(x,k){this._normal.resize(x,k),this._alt.resize(x,k),this.setupTabStops(x)}setupTabStops(x){this._normal.setupTabStops(x),this._alt.setupTabStops(x)}}o.BufferSet=p},511:(a,o,l)=>{Object.defineProperty(o,"__esModule",{value:!0}),o.CellData=void 0;const u=l(482),h=l(643),_=l(3734);class p extends _.AttributeData{constructor(){super(...arguments),this.content=0,this.fg=0,this.bg=0,this.extended=new _.ExtendedAttrs,this.combinedData=""}static fromCharData(x){const k=new p;return k.setFromCharData(x),k}isCombined(){return 2097152&this.content}getWidth(){return this.content>>22}getChars(){return 2097152&this.content?this.combinedData:2097151&this.content?(0,u.stringFromCodePoint)(2097151&this.content):""}getCode(){return this.isCombined()?this.combinedData.charCodeAt(this.combinedData.length-1):2097151&this.content}setFromCharData(x){this.fg=x[h.CHAR_DATA_ATTR_INDEX],this.bg=0;let k=!1;if(x[h.CHAR_DATA_CHAR_INDEX].length>2)k=!0;else if(x[h.CHAR_DATA_CHAR_INDEX].length===2){const v=x[h.CHAR_DATA_CHAR_INDEX].charCodeAt(0);if(55296<=v&&v<=56319){const b=x[h.CHAR_DATA_CHAR_INDEX].charCodeAt(1);56320<=b&&b<=57343?this.content=1024*(v-55296)+b-56320+65536|x[h.CHAR_DATA_WIDTH_INDEX]<<22:k=!0}else k=!0}else this.content=x[h.CHAR_DATA_CHAR_INDEX].charCodeAt(0)|x[h.CHAR_DATA_WIDTH_INDEX]<<22;k&&(this.combinedData=x[h.CHAR_DATA_CHAR_INDEX],this.content=2097152|x[h.CHAR_DATA_WIDTH_INDEX]<<22)}getAsCharData(){return[this.fg,this.getChars(),this.getWidth(),this.getCode()]}}o.CellData=p},643:(a,o)=>{Object.defineProperty(o,"__esModule",{value:!0}),o.WHITESPACE_CELL_CODE=o.WHITESPACE_CELL_WIDTH=o.WHITESPACE_CELL_CHAR=o.NULL_CELL_CODE=o.NULL_CELL_WIDTH=o.NULL_CELL_CHAR=o.CHAR_DATA_CODE_INDEX=o.CHAR_DATA_WIDTH_INDEX=o.CHAR_DATA_CHAR_INDEX=o.CHAR_DATA_ATTR_INDEX=o.DEFAULT_EXT=o.DEFAULT_ATTR=o.DEFAULT_COLOR=void 0,o.DEFAULT_COLOR=0,o.DEFAULT_ATTR=256|o.DEFAULT_COLOR<<9,o.DEFAULT_EXT=0,o.CHAR_DATA_ATTR_INDEX=0,o.CHAR_DATA_CHAR_INDEX=1,o.CHAR_DATA_WIDTH_INDEX=2,o.CHAR_DATA_CODE_INDEX=3,o.NULL_CELL_CHAR="",o.NULL_CELL_WIDTH=1,o.NULL_CELL_CODE=0,o.WHITESPACE_CELL_CHAR=" ",o.WHITESPACE_CELL_WIDTH=1,o.WHITESPACE_CELL_CODE=32},4863:(a,o,l)=>{Object.defineProperty(o,"__esModule",{value:!0}),o.Marker=void 0;const u=l(8460),h=l(844);class _{get id(){return this._id}constructor(m){this.line=m,this.isDisposed=!1,this._disposables=[],this._id=_._nextId++,this._onDispose=this.register(new u.EventEmitter),this.onDispose=this._onDispose.event}dispose(){this.isDisposed||(this.isDisposed=!0,this.line=-1,this._onDispose.fire(),(0,h.disposeArray)(this._disposables),this._disposables.length=0)}register(m){return this._disposables.push(m),m}}o.Marker=_,_._nextId=1},7116:(a,o)=>{Object.defineProperty(o,"__esModule",{value:!0}),o.DEFAULT_CHARSET=o.CHARSETS=void 0,o.CHARSETS={},o.DEFAULT_CHARSET=o.CHARSETS.B,o.CHARSETS[0]={"`":"◆",a:"▒",b:"␉",c:"␌",d:"␍",e:"␊",f:"°",g:"±",h:"␤",i:"␋",j:"┘",k:"┐",l:"┌",m:"└",n:"┼",o:"⎺",p:"⎻",q:"─",r:"⎼",s:"⎽",t:"├",u:"┤",v:"┴",w:"┬",x:"│",y:"≤",z:"≥","{":"π","|":"≠","}":"£","~":"·"},o.CHARSETS.A={"#":"£"},o.CHARSETS.B=void 0,o.CHARSETS[4]={"#":"£","@":"¾","[":"ij","\\":"½","]":"|","{":"¨","|":"f","}":"¼","~":"´"},o.CHARSETS.C=o.CHARSETS[5]={"[":"Ä","\\":"Ö","]":"Å","^":"Ü","`":"é","{":"ä","|":"ö","}":"å","~":"ü"},o.CHARSETS.R={"#":"£","@":"à","[":"°","\\":"ç","]":"§","{":"é","|":"ù","}":"è","~":"¨"},o.CHARSETS.Q={"@":"à","[":"â","\\":"ç","]":"ê","^":"î","`":"ô","{":"é","|":"ù","}":"è","~":"û"},o.CHARSETS.K={"@":"§","[":"Ä","\\":"Ö","]":"Ü","{":"ä","|":"ö","}":"ü","~":"ß"},o.CHARSETS.Y={"#":"£","@":"§","[":"°","\\":"ç","]":"é","`":"ù","{":"à","|":"ò","}":"è","~":"ì"},o.CHARSETS.E=o.CHARSETS[6]={"@":"Ä","[":"Æ","\\":"Ø","]":"Å","^":"Ü","`":"ä","{":"æ","|":"ø","}":"å","~":"ü"},o.CHARSETS.Z={"#":"£","@":"§","[":"¡","\\":"Ñ","]":"¿","{":"°","|":"ñ","}":"ç"},o.CHARSETS.H=o.CHARSETS[7]={"@":"É","[":"Ä","\\":"Ö","]":"Å","^":"Ü","`":"é","{":"ä","|":"ö","}":"å","~":"ü"},o.CHARSETS["="]={"#":"ù","@":"à","[":"é","\\":"ç","]":"ê","^":"î",_:"è","`":"ô","{":"ä","|":"ö","}":"ü","~":"û"}},2584:(a,o)=>{var l,u,h;Object.defineProperty(o,"__esModule",{value:!0}),o.C1_ESCAPED=o.C1=o.C0=void 0,(function(_){_.NUL="\0",_.SOH="",_.STX="",_.ETX="",_.EOT="",_.ENQ="",_.ACK="",_.BEL="\x07",_.BS="\b",_.HT=" ",_.LF=` +`,_.VT="\v",_.FF="\f",_.CR="\r",_.SO="",_.SI="",_.DLE="",_.DC1="",_.DC2="",_.DC3="",_.DC4="",_.NAK="",_.SYN="",_.ETB="",_.CAN="",_.EM="",_.SUB="",_.ESC="\x1B",_.FS="",_.GS="",_.RS="",_.US="",_.SP=" ",_.DEL=""})(l||(o.C0=l={})),(function(_){_.PAD="€",_.HOP="",_.BPH="‚",_.NBH="ƒ",_.IND="„",_.NEL="…",_.SSA="†",_.ESA="‡",_.HTS="ˆ",_.HTJ="‰",_.VTS="Š",_.PLD="‹",_.PLU="Œ",_.RI="",_.SS2="Ž",_.SS3="",_.DCS="",_.PU1="‘",_.PU2="’",_.STS="“",_.CCH="”",_.MW="•",_.SPA="–",_.EPA="—",_.SOS="˜",_.SGCI="™",_.SCI="š",_.CSI="›",_.ST="œ",_.OSC="",_.PM="ž",_.APC="Ÿ"})(u||(o.C1=u={})),(function(_){_.ST=`${l.ESC}\\`})(h||(o.C1_ESCAPED=h={}))},7399:(a,o,l)=>{Object.defineProperty(o,"__esModule",{value:!0}),o.evaluateKeyboardEvent=void 0;const u=l(2584),h={48:["0",")"],49:["1","!"],50:["2","@"],51:["3","#"],52:["4","$"],53:["5","%"],54:["6","^"],55:["7","&"],56:["8","*"],57:["9","("],186:[";",":"],187:["=","+"],188:[",","<"],189:["-","_"],190:[".",">"],191:["/","?"],192:["`","~"],219:["[","{"],220:["\\","|"],221:["]","}"],222:["'",'"']};o.evaluateKeyboardEvent=function(_,p,m,x){const k={type:0,cancel:!1,key:void 0},v=(_.shiftKey?1:0)|(_.altKey?2:0)|(_.ctrlKey?4:0)|(_.metaKey?8:0);switch(_.keyCode){case 0:_.key==="UIKeyInputUpArrow"?k.key=p?u.C0.ESC+"OA":u.C0.ESC+"[A":_.key==="UIKeyInputLeftArrow"?k.key=p?u.C0.ESC+"OD":u.C0.ESC+"[D":_.key==="UIKeyInputRightArrow"?k.key=p?u.C0.ESC+"OC":u.C0.ESC+"[C":_.key==="UIKeyInputDownArrow"&&(k.key=p?u.C0.ESC+"OB":u.C0.ESC+"[B");break;case 8:k.key=_.ctrlKey?"\b":u.C0.DEL,_.altKey&&(k.key=u.C0.ESC+k.key);break;case 9:if(_.shiftKey){k.key=u.C0.ESC+"[Z";break}k.key=u.C0.HT,k.cancel=!0;break;case 13:k.key=_.altKey?u.C0.ESC+u.C0.CR:u.C0.CR,k.cancel=!0;break;case 27:k.key=u.C0.ESC,_.altKey&&(k.key=u.C0.ESC+u.C0.ESC),k.cancel=!0;break;case 37:if(_.metaKey)break;v?(k.key=u.C0.ESC+"[1;"+(v+1)+"D",k.key===u.C0.ESC+"[1;3D"&&(k.key=u.C0.ESC+(m?"b":"[1;5D"))):k.key=p?u.C0.ESC+"OD":u.C0.ESC+"[D";break;case 39:if(_.metaKey)break;v?(k.key=u.C0.ESC+"[1;"+(v+1)+"C",k.key===u.C0.ESC+"[1;3C"&&(k.key=u.C0.ESC+(m?"f":"[1;5C"))):k.key=p?u.C0.ESC+"OC":u.C0.ESC+"[C";break;case 38:if(_.metaKey)break;v?(k.key=u.C0.ESC+"[1;"+(v+1)+"A",m||k.key!==u.C0.ESC+"[1;3A"||(k.key=u.C0.ESC+"[1;5A")):k.key=p?u.C0.ESC+"OA":u.C0.ESC+"[A";break;case 40:if(_.metaKey)break;v?(k.key=u.C0.ESC+"[1;"+(v+1)+"B",m||k.key!==u.C0.ESC+"[1;3B"||(k.key=u.C0.ESC+"[1;5B")):k.key=p?u.C0.ESC+"OB":u.C0.ESC+"[B";break;case 45:_.shiftKey||_.ctrlKey||(k.key=u.C0.ESC+"[2~");break;case 46:k.key=v?u.C0.ESC+"[3;"+(v+1)+"~":u.C0.ESC+"[3~";break;case 36:k.key=v?u.C0.ESC+"[1;"+(v+1)+"H":p?u.C0.ESC+"OH":u.C0.ESC+"[H";break;case 35:k.key=v?u.C0.ESC+"[1;"+(v+1)+"F":p?u.C0.ESC+"OF":u.C0.ESC+"[F";break;case 33:_.shiftKey?k.type=2:_.ctrlKey?k.key=u.C0.ESC+"[5;"+(v+1)+"~":k.key=u.C0.ESC+"[5~";break;case 34:_.shiftKey?k.type=3:_.ctrlKey?k.key=u.C0.ESC+"[6;"+(v+1)+"~":k.key=u.C0.ESC+"[6~";break;case 112:k.key=v?u.C0.ESC+"[1;"+(v+1)+"P":u.C0.ESC+"OP";break;case 113:k.key=v?u.C0.ESC+"[1;"+(v+1)+"Q":u.C0.ESC+"OQ";break;case 114:k.key=v?u.C0.ESC+"[1;"+(v+1)+"R":u.C0.ESC+"OR";break;case 115:k.key=v?u.C0.ESC+"[1;"+(v+1)+"S":u.C0.ESC+"OS";break;case 116:k.key=v?u.C0.ESC+"[15;"+(v+1)+"~":u.C0.ESC+"[15~";break;case 117:k.key=v?u.C0.ESC+"[17;"+(v+1)+"~":u.C0.ESC+"[17~";break;case 118:k.key=v?u.C0.ESC+"[18;"+(v+1)+"~":u.C0.ESC+"[18~";break;case 119:k.key=v?u.C0.ESC+"[19;"+(v+1)+"~":u.C0.ESC+"[19~";break;case 120:k.key=v?u.C0.ESC+"[20;"+(v+1)+"~":u.C0.ESC+"[20~";break;case 121:k.key=v?u.C0.ESC+"[21;"+(v+1)+"~":u.C0.ESC+"[21~";break;case 122:k.key=v?u.C0.ESC+"[23;"+(v+1)+"~":u.C0.ESC+"[23~";break;case 123:k.key=v?u.C0.ESC+"[24;"+(v+1)+"~":u.C0.ESC+"[24~";break;default:if(!_.ctrlKey||_.shiftKey||_.altKey||_.metaKey)if(m&&!x||!_.altKey||_.metaKey)!m||_.altKey||_.ctrlKey||_.shiftKey||!_.metaKey?_.key&&!_.ctrlKey&&!_.altKey&&!_.metaKey&&_.keyCode>=48&&_.key.length===1?k.key=_.key:_.key&&_.ctrlKey&&(_.key==="_"&&(k.key=u.C0.US),_.key==="@"&&(k.key=u.C0.NUL)):_.keyCode===65&&(k.type=1);else{const b=h[_.keyCode],w=b==null?void 0:b[_.shiftKey?1:0];if(w)k.key=u.C0.ESC+w;else if(_.keyCode>=65&&_.keyCode<=90){const y=_.ctrlKey?_.keyCode-64:_.keyCode+32;let C=String.fromCharCode(y);_.shiftKey&&(C=C.toUpperCase()),k.key=u.C0.ESC+C}else if(_.keyCode===32)k.key=u.C0.ESC+(_.ctrlKey?u.C0.NUL:" ");else if(_.key==="Dead"&&_.code.startsWith("Key")){let y=_.code.slice(3,4);_.shiftKey||(y=y.toLowerCase()),k.key=u.C0.ESC+y,k.cancel=!0}}else _.keyCode>=65&&_.keyCode<=90?k.key=String.fromCharCode(_.keyCode-64):_.keyCode===32?k.key=u.C0.NUL:_.keyCode>=51&&_.keyCode<=55?k.key=String.fromCharCode(_.keyCode-51+27):_.keyCode===56?k.key=u.C0.DEL:_.keyCode===219?k.key=u.C0.ESC:_.keyCode===220?k.key=u.C0.FS:_.keyCode===221&&(k.key=u.C0.GS)}return k}},482:(a,o)=>{Object.defineProperty(o,"__esModule",{value:!0}),o.Utf8ToUtf32=o.StringToUtf32=o.utf32ToString=o.stringFromCodePoint=void 0,o.stringFromCodePoint=function(l){return l>65535?(l-=65536,String.fromCharCode(55296+(l>>10))+String.fromCharCode(l%1024+56320)):String.fromCharCode(l)},o.utf32ToString=function(l,u=0,h=l.length){let _="";for(let p=u;p65535?(m-=65536,_+=String.fromCharCode(55296+(m>>10))+String.fromCharCode(m%1024+56320)):_+=String.fromCharCode(m)}return _},o.StringToUtf32=class{constructor(){this._interim=0}clear(){this._interim=0}decode(l,u){const h=l.length;if(!h)return 0;let _=0,p=0;if(this._interim){const m=l.charCodeAt(p++);56320<=m&&m<=57343?u[_++]=1024*(this._interim-55296)+m-56320+65536:(u[_++]=this._interim,u[_++]=m),this._interim=0}for(let m=p;m=h)return this._interim=x,_;const k=l.charCodeAt(m);56320<=k&&k<=57343?u[_++]=1024*(x-55296)+k-56320+65536:(u[_++]=x,u[_++]=k)}else x!==65279&&(u[_++]=x)}return _}},o.Utf8ToUtf32=class{constructor(){this.interim=new Uint8Array(3)}clear(){this.interim.fill(0)}decode(l,u){const h=l.length;if(!h)return 0;let _,p,m,x,k=0,v=0,b=0;if(this.interim[0]){let C=!1,E=this.interim[0];E&=(224&E)==192?31:(240&E)==224?15:7;let N,A=0;for(;(N=63&this.interim[++A])&&A<4;)E<<=6,E|=N;const j=(224&this.interim[0])==192?2:(240&this.interim[0])==224?3:4,M=j-A;for(;b=h)return 0;if(N=l[b++],(192&N)!=128){b--,C=!0;break}this.interim[A++]=N,E<<=6,E|=63&N}C||(j===2?E<128?b--:u[k++]=E:j===3?E<2048||E>=55296&&E<=57343||E===65279||(u[k++]=E):E<65536||E>1114111||(u[k++]=E)),this.interim.fill(0)}const w=h-4;let y=b;for(;y=h)return this.interim[0]=_,k;if(p=l[y++],(192&p)!=128){y--;continue}if(v=(31&_)<<6|63&p,v<128){y--;continue}u[k++]=v}else if((240&_)==224){if(y>=h)return this.interim[0]=_,k;if(p=l[y++],(192&p)!=128){y--;continue}if(y>=h)return this.interim[0]=_,this.interim[1]=p,k;if(m=l[y++],(192&m)!=128){y--;continue}if(v=(15&_)<<12|(63&p)<<6|63&m,v<2048||v>=55296&&v<=57343||v===65279)continue;u[k++]=v}else if((248&_)==240){if(y>=h)return this.interim[0]=_,k;if(p=l[y++],(192&p)!=128){y--;continue}if(y>=h)return this.interim[0]=_,this.interim[1]=p,k;if(m=l[y++],(192&m)!=128){y--;continue}if(y>=h)return this.interim[0]=_,this.interim[1]=p,this.interim[2]=m,k;if(x=l[y++],(192&x)!=128){y--;continue}if(v=(7&_)<<18|(63&p)<<12|(63&m)<<6|63&x,v<65536||v>1114111)continue;u[k++]=v}}return k}}},225:(a,o,l)=>{Object.defineProperty(o,"__esModule",{value:!0}),o.UnicodeV6=void 0;const u=l(1480),h=[[768,879],[1155,1158],[1160,1161],[1425,1469],[1471,1471],[1473,1474],[1476,1477],[1479,1479],[1536,1539],[1552,1557],[1611,1630],[1648,1648],[1750,1764],[1767,1768],[1770,1773],[1807,1807],[1809,1809],[1840,1866],[1958,1968],[2027,2035],[2305,2306],[2364,2364],[2369,2376],[2381,2381],[2385,2388],[2402,2403],[2433,2433],[2492,2492],[2497,2500],[2509,2509],[2530,2531],[2561,2562],[2620,2620],[2625,2626],[2631,2632],[2635,2637],[2672,2673],[2689,2690],[2748,2748],[2753,2757],[2759,2760],[2765,2765],[2786,2787],[2817,2817],[2876,2876],[2879,2879],[2881,2883],[2893,2893],[2902,2902],[2946,2946],[3008,3008],[3021,3021],[3134,3136],[3142,3144],[3146,3149],[3157,3158],[3260,3260],[3263,3263],[3270,3270],[3276,3277],[3298,3299],[3393,3395],[3405,3405],[3530,3530],[3538,3540],[3542,3542],[3633,3633],[3636,3642],[3655,3662],[3761,3761],[3764,3769],[3771,3772],[3784,3789],[3864,3865],[3893,3893],[3895,3895],[3897,3897],[3953,3966],[3968,3972],[3974,3975],[3984,3991],[3993,4028],[4038,4038],[4141,4144],[4146,4146],[4150,4151],[4153,4153],[4184,4185],[4448,4607],[4959,4959],[5906,5908],[5938,5940],[5970,5971],[6002,6003],[6068,6069],[6071,6077],[6086,6086],[6089,6099],[6109,6109],[6155,6157],[6313,6313],[6432,6434],[6439,6440],[6450,6450],[6457,6459],[6679,6680],[6912,6915],[6964,6964],[6966,6970],[6972,6972],[6978,6978],[7019,7027],[7616,7626],[7678,7679],[8203,8207],[8234,8238],[8288,8291],[8298,8303],[8400,8431],[12330,12335],[12441,12442],[43014,43014],[43019,43019],[43045,43046],[64286,64286],[65024,65039],[65056,65059],[65279,65279],[65529,65531]],_=[[68097,68099],[68101,68102],[68108,68111],[68152,68154],[68159,68159],[119143,119145],[119155,119170],[119173,119179],[119210,119213],[119362,119364],[917505,917505],[917536,917631],[917760,917999]];let p;o.UnicodeV6=class{constructor(){if(this.version="6",!p){p=new Uint8Array(65536),p.fill(1),p[0]=0,p.fill(0,1,32),p.fill(0,127,160),p.fill(2,4352,4448),p[9001]=2,p[9002]=2,p.fill(2,11904,42192),p[12351]=1,p.fill(2,44032,55204),p.fill(2,63744,64256),p.fill(2,65040,65050),p.fill(2,65072,65136),p.fill(2,65280,65377),p.fill(2,65504,65511);for(let m=0;mk[w][1])return!1;for(;w>=b;)if(v=b+w>>1,x>k[v][1])b=v+1;else{if(!(x=131072&&m<=196605||m>=196608&&m<=262141?2:1}charProperties(m,x){let k=this.wcwidth(m),v=k===0&&x!==0;if(v){const b=u.UnicodeService.extractWidth(x);b===0?v=!1:b>k&&(k=b)}return u.UnicodeService.createPropertyValue(0,k,v)}}},5981:(a,o,l)=>{Object.defineProperty(o,"__esModule",{value:!0}),o.WriteBuffer=void 0;const u=l(8460),h=l(844);class _ extends h.Disposable{constructor(m){super(),this._action=m,this._writeBuffer=[],this._callbacks=[],this._pendingData=0,this._bufferOffset=0,this._isSyncWriting=!1,this._syncCalls=0,this._didUserInput=!1,this._onWriteParsed=this.register(new u.EventEmitter),this.onWriteParsed=this._onWriteParsed.event}handleUserInput(){this._didUserInput=!0}writeSync(m,x){if(x!==void 0&&this._syncCalls>x)return void(this._syncCalls=0);if(this._pendingData+=m.length,this._writeBuffer.push(m),this._callbacks.push(void 0),this._syncCalls++,this._isSyncWriting)return;let k;for(this._isSyncWriting=!0;k=this._writeBuffer.shift();){this._action(k);const v=this._callbacks.shift();v&&v()}this._pendingData=0,this._bufferOffset=2147483647,this._isSyncWriting=!1,this._syncCalls=0}write(m,x){if(this._pendingData>5e7)throw new Error("write data discarded, use flow control to avoid losing data");if(!this._writeBuffer.length){if(this._bufferOffset=0,this._didUserInput)return this._didUserInput=!1,this._pendingData+=m.length,this._writeBuffer.push(m),this._callbacks.push(x),void this._innerWrite();setTimeout((()=>this._innerWrite()))}this._pendingData+=m.length,this._writeBuffer.push(m),this._callbacks.push(x)}_innerWrite(m=0,x=!0){const k=m||Date.now();for(;this._writeBuffer.length>this._bufferOffset;){const v=this._writeBuffer[this._bufferOffset],b=this._action(v,x);if(b){const y=C=>Date.now()-k>=12?setTimeout((()=>this._innerWrite(0,C))):this._innerWrite(k,C);return void b.catch((C=>(queueMicrotask((()=>{throw C})),Promise.resolve(!1)))).then(y)}const w=this._callbacks[this._bufferOffset];if(w&&w(),this._bufferOffset++,this._pendingData-=v.length,Date.now()-k>=12)break}this._writeBuffer.length>this._bufferOffset?(this._bufferOffset>50&&(this._writeBuffer=this._writeBuffer.slice(this._bufferOffset),this._callbacks=this._callbacks.slice(this._bufferOffset),this._bufferOffset=0),setTimeout((()=>this._innerWrite()))):(this._writeBuffer.length=0,this._callbacks.length=0,this._pendingData=0,this._bufferOffset=0),this._onWriteParsed.fire()}}o.WriteBuffer=_},5941:(a,o)=>{Object.defineProperty(o,"__esModule",{value:!0}),o.toRgbString=o.parseColor=void 0;const l=/^([\da-f])\/([\da-f])\/([\da-f])$|^([\da-f]{2})\/([\da-f]{2})\/([\da-f]{2})$|^([\da-f]{3})\/([\da-f]{3})\/([\da-f]{3})$|^([\da-f]{4})\/([\da-f]{4})\/([\da-f]{4})$/,u=/^[\da-f]+$/;function h(_,p){const m=_.toString(16),x=m.length<2?"0"+m:m;switch(p){case 4:return m[0];case 8:return x;case 12:return(x+x).slice(0,3);default:return x+x}}o.parseColor=function(_){if(!_)return;let p=_.toLowerCase();if(p.indexOf("rgb:")===0){p=p.slice(4);const m=l.exec(p);if(m){const x=m[1]?15:m[4]?255:m[7]?4095:65535;return[Math.round(parseInt(m[1]||m[4]||m[7]||m[10],16)/x*255),Math.round(parseInt(m[2]||m[5]||m[8]||m[11],16)/x*255),Math.round(parseInt(m[3]||m[6]||m[9]||m[12],16)/x*255)]}}else if(p.indexOf("#")===0&&(p=p.slice(1),u.exec(p)&&[3,6,9,12].includes(p.length))){const m=p.length/3,x=[0,0,0];for(let k=0;k<3;++k){const v=parseInt(p.slice(m*k,m*k+m),16);x[k]=m===1?v<<4:m===2?v:m===3?v>>4:v>>8}return x}},o.toRgbString=function(_,p=16){const[m,x,k]=_;return`rgb:${h(m,p)}/${h(x,p)}/${h(k,p)}`}},5770:(a,o)=>{Object.defineProperty(o,"__esModule",{value:!0}),o.PAYLOAD_LIMIT=void 0,o.PAYLOAD_LIMIT=1e7},6351:(a,o,l)=>{Object.defineProperty(o,"__esModule",{value:!0}),o.DcsHandler=o.DcsParser=void 0;const u=l(482),h=l(8742),_=l(5770),p=[];o.DcsParser=class{constructor(){this._handlers=Object.create(null),this._active=p,this._ident=0,this._handlerFb=()=>{},this._stack={paused:!1,loopPosition:0,fallThrough:!1}}dispose(){this._handlers=Object.create(null),this._handlerFb=()=>{},this._active=p}registerHandler(x,k){this._handlers[x]===void 0&&(this._handlers[x]=[]);const v=this._handlers[x];return v.push(k),{dispose:()=>{const b=v.indexOf(k);b!==-1&&v.splice(b,1)}}}clearHandler(x){this._handlers[x]&&delete this._handlers[x]}setHandlerFallback(x){this._handlerFb=x}reset(){if(this._active.length)for(let x=this._stack.paused?this._stack.loopPosition-1:this._active.length-1;x>=0;--x)this._active[x].unhook(!1);this._stack.paused=!1,this._active=p,this._ident=0}hook(x,k){if(this.reset(),this._ident=x,this._active=this._handlers[x]||p,this._active.length)for(let v=this._active.length-1;v>=0;v--)this._active[v].hook(k);else this._handlerFb(this._ident,"HOOK",k)}put(x,k,v){if(this._active.length)for(let b=this._active.length-1;b>=0;b--)this._active[b].put(x,k,v);else this._handlerFb(this._ident,"PUT",(0,u.utf32ToString)(x,k,v))}unhook(x,k=!0){if(this._active.length){let v=!1,b=this._active.length-1,w=!1;if(this._stack.paused&&(b=this._stack.loopPosition-1,v=k,w=this._stack.fallThrough,this._stack.paused=!1),!w&&v===!1){for(;b>=0&&(v=this._active[b].unhook(x),v!==!0);b--)if(v instanceof Promise)return this._stack.paused=!0,this._stack.loopPosition=b,this._stack.fallThrough=!1,v;b--}for(;b>=0;b--)if(v=this._active[b].unhook(!1),v instanceof Promise)return this._stack.paused=!0,this._stack.loopPosition=b,this._stack.fallThrough=!0,v}else this._handlerFb(this._ident,"UNHOOK",x);this._active=p,this._ident=0}};const m=new h.Params;m.addParam(0),o.DcsHandler=class{constructor(x){this._handler=x,this._data="",this._params=m,this._hitLimit=!1}hook(x){this._params=x.length>1||x.params[0]?x.clone():m,this._data="",this._hitLimit=!1}put(x,k,v){this._hitLimit||(this._data+=(0,u.utf32ToString)(x,k,v),this._data.length>_.PAYLOAD_LIMIT&&(this._data="",this._hitLimit=!0))}unhook(x){let k=!1;if(this._hitLimit)k=!1;else if(x&&(k=this._handler(this._data,this._params),k instanceof Promise))return k.then((v=>(this._params=m,this._data="",this._hitLimit=!1,v)));return this._params=m,this._data="",this._hitLimit=!1,k}}},2015:(a,o,l)=>{Object.defineProperty(o,"__esModule",{value:!0}),o.EscapeSequenceParser=o.VT500_TRANSITION_TABLE=o.TransitionTable=void 0;const u=l(844),h=l(8742),_=l(6242),p=l(6351);class m{constructor(b){this.table=new Uint8Array(b)}setDefault(b,w){this.table.fill(b<<4|w)}add(b,w,y,C){this.table[w<<8|b]=y<<4|C}addMany(b,w,y,C){for(let E=0;Ej)),w=(A,j)=>b.slice(A,j),y=w(32,127),C=w(0,24);C.push(25),C.push.apply(C,w(28,32));const E=w(0,14);let N;for(N in v.setDefault(1,0),v.addMany(y,0,2,0),E)v.addMany([24,26,153,154],N,3,0),v.addMany(w(128,144),N,3,0),v.addMany(w(144,152),N,3,0),v.add(156,N,0,0),v.add(27,N,11,1),v.add(157,N,4,8),v.addMany([152,158,159],N,0,7),v.add(155,N,11,3),v.add(144,N,11,9);return v.addMany(C,0,3,0),v.addMany(C,1,3,1),v.add(127,1,0,1),v.addMany(C,8,0,8),v.addMany(C,3,3,3),v.add(127,3,0,3),v.addMany(C,4,3,4),v.add(127,4,0,4),v.addMany(C,6,3,6),v.addMany(C,5,3,5),v.add(127,5,0,5),v.addMany(C,2,3,2),v.add(127,2,0,2),v.add(93,1,4,8),v.addMany(y,8,5,8),v.add(127,8,5,8),v.addMany([156,27,24,26,7],8,6,0),v.addMany(w(28,32),8,0,8),v.addMany([88,94,95],1,0,7),v.addMany(y,7,0,7),v.addMany(C,7,0,7),v.add(156,7,0,0),v.add(127,7,0,7),v.add(91,1,11,3),v.addMany(w(64,127),3,7,0),v.addMany(w(48,60),3,8,4),v.addMany([60,61,62,63],3,9,4),v.addMany(w(48,60),4,8,4),v.addMany(w(64,127),4,7,0),v.addMany([60,61,62,63],4,0,6),v.addMany(w(32,64),6,0,6),v.add(127,6,0,6),v.addMany(w(64,127),6,0,0),v.addMany(w(32,48),3,9,5),v.addMany(w(32,48),5,9,5),v.addMany(w(48,64),5,0,6),v.addMany(w(64,127),5,7,0),v.addMany(w(32,48),4,9,5),v.addMany(w(32,48),1,9,2),v.addMany(w(32,48),2,9,2),v.addMany(w(48,127),2,10,0),v.addMany(w(48,80),1,10,0),v.addMany(w(81,88),1,10,0),v.addMany([89,90,92],1,10,0),v.addMany(w(96,127),1,10,0),v.add(80,1,11,9),v.addMany(C,9,0,9),v.add(127,9,0,9),v.addMany(w(28,32),9,0,9),v.addMany(w(32,48),9,9,12),v.addMany(w(48,60),9,8,10),v.addMany([60,61,62,63],9,9,10),v.addMany(C,11,0,11),v.addMany(w(32,128),11,0,11),v.addMany(w(28,32),11,0,11),v.addMany(C,10,0,10),v.add(127,10,0,10),v.addMany(w(28,32),10,0,10),v.addMany(w(48,60),10,8,10),v.addMany([60,61,62,63],10,0,11),v.addMany(w(32,48),10,9,12),v.addMany(C,12,0,12),v.add(127,12,0,12),v.addMany(w(28,32),12,0,12),v.addMany(w(32,48),12,9,12),v.addMany(w(48,64),12,0,11),v.addMany(w(64,127),12,12,13),v.addMany(w(64,127),10,12,13),v.addMany(w(64,127),9,12,13),v.addMany(C,13,13,13),v.addMany(y,13,13,13),v.add(127,13,0,13),v.addMany([27,156,24,26],13,14,0),v.add(x,0,2,0),v.add(x,8,5,8),v.add(x,6,0,6),v.add(x,11,0,11),v.add(x,13,13,13),v})();class k extends u.Disposable{constructor(b=o.VT500_TRANSITION_TABLE){super(),this._transitions=b,this._parseStack={state:0,handlers:[],handlerPos:0,transition:0,chunkPos:0},this.initialState=0,this.currentState=this.initialState,this._params=new h.Params,this._params.addParam(0),this._collect=0,this.precedingJoinState=0,this._printHandlerFb=(w,y,C)=>{},this._executeHandlerFb=w=>{},this._csiHandlerFb=(w,y)=>{},this._escHandlerFb=w=>{},this._errorHandlerFb=w=>w,this._printHandler=this._printHandlerFb,this._executeHandlers=Object.create(null),this._csiHandlers=Object.create(null),this._escHandlers=Object.create(null),this.register((0,u.toDisposable)((()=>{this._csiHandlers=Object.create(null),this._executeHandlers=Object.create(null),this._escHandlers=Object.create(null)}))),this._oscParser=this.register(new _.OscParser),this._dcsParser=this.register(new p.DcsParser),this._errorHandler=this._errorHandlerFb,this.registerEscHandler({final:"\\"},(()=>!0))}_identifier(b,w=[64,126]){let y=0;if(b.prefix){if(b.prefix.length>1)throw new Error("only one byte as prefix supported");if(y=b.prefix.charCodeAt(0),y&&60>y||y>63)throw new Error("prefix must be in range 0x3c .. 0x3f")}if(b.intermediates){if(b.intermediates.length>2)throw new Error("only two bytes as intermediates are supported");for(let E=0;EN||N>47)throw new Error("intermediate must be in range 0x20 .. 0x2f");y<<=8,y|=N}}if(b.final.length!==1)throw new Error("final must be a single byte");const C=b.final.charCodeAt(0);if(w[0]>C||C>w[1])throw new Error(`final must be in range ${w[0]} .. ${w[1]}`);return y<<=8,y|=C,y}identToString(b){const w=[];for(;b;)w.push(String.fromCharCode(255&b)),b>>=8;return w.reverse().join("")}setPrintHandler(b){this._printHandler=b}clearPrintHandler(){this._printHandler=this._printHandlerFb}registerEscHandler(b,w){const y=this._identifier(b,[48,126]);this._escHandlers[y]===void 0&&(this._escHandlers[y]=[]);const C=this._escHandlers[y];return C.push(w),{dispose:()=>{const E=C.indexOf(w);E!==-1&&C.splice(E,1)}}}clearEscHandler(b){this._escHandlers[this._identifier(b,[48,126])]&&delete this._escHandlers[this._identifier(b,[48,126])]}setEscHandlerFallback(b){this._escHandlerFb=b}setExecuteHandler(b,w){this._executeHandlers[b.charCodeAt(0)]=w}clearExecuteHandler(b){this._executeHandlers[b.charCodeAt(0)]&&delete this._executeHandlers[b.charCodeAt(0)]}setExecuteHandlerFallback(b){this._executeHandlerFb=b}registerCsiHandler(b,w){const y=this._identifier(b);this._csiHandlers[y]===void 0&&(this._csiHandlers[y]=[]);const C=this._csiHandlers[y];return C.push(w),{dispose:()=>{const E=C.indexOf(w);E!==-1&&C.splice(E,1)}}}clearCsiHandler(b){this._csiHandlers[this._identifier(b)]&&delete this._csiHandlers[this._identifier(b)]}setCsiHandlerFallback(b){this._csiHandlerFb=b}registerDcsHandler(b,w){return this._dcsParser.registerHandler(this._identifier(b),w)}clearDcsHandler(b){this._dcsParser.clearHandler(this._identifier(b))}setDcsHandlerFallback(b){this._dcsParser.setHandlerFallback(b)}registerOscHandler(b,w){return this._oscParser.registerHandler(b,w)}clearOscHandler(b){this._oscParser.clearHandler(b)}setOscHandlerFallback(b){this._oscParser.setHandlerFallback(b)}setErrorHandler(b){this._errorHandler=b}clearErrorHandler(){this._errorHandler=this._errorHandlerFb}reset(){this.currentState=this.initialState,this._oscParser.reset(),this._dcsParser.reset(),this._params.reset(),this._params.addParam(0),this._collect=0,this.precedingJoinState=0,this._parseStack.state!==0&&(this._parseStack.state=2,this._parseStack.handlers=[])}_preserveStack(b,w,y,C,E){this._parseStack.state=b,this._parseStack.handlers=w,this._parseStack.handlerPos=y,this._parseStack.transition=C,this._parseStack.chunkPos=E}parse(b,w,y){let C,E=0,N=0,A=0;if(this._parseStack.state)if(this._parseStack.state===2)this._parseStack.state=0,A=this._parseStack.chunkPos+1;else{if(y===void 0||this._parseStack.state===1)throw this._parseStack.state=1,new Error("improper continuation due to previous async handler, giving up parsing");const j=this._parseStack.handlers;let M=this._parseStack.handlerPos-1;switch(this._parseStack.state){case 3:if(y===!1&&M>-1){for(;M>=0&&(C=j[M](this._params),C!==!0);M--)if(C instanceof Promise)return this._parseStack.handlerPos=M,C}this._parseStack.handlers=[];break;case 4:if(y===!1&&M>-1){for(;M>=0&&(C=j[M](),C!==!0);M--)if(C instanceof Promise)return this._parseStack.handlerPos=M,C}this._parseStack.handlers=[];break;case 6:if(E=b[this._parseStack.chunkPos],C=this._dcsParser.unhook(E!==24&&E!==26,y),C)return C;E===27&&(this._parseStack.transition|=1),this._params.reset(),this._params.addParam(0),this._collect=0;break;case 5:if(E=b[this._parseStack.chunkPos],C=this._oscParser.end(E!==24&&E!==26,y),C)return C;E===27&&(this._parseStack.transition|=1),this._params.reset(),this._params.addParam(0),this._collect=0}this._parseStack.state=0,A=this._parseStack.chunkPos+1,this.precedingJoinState=0,this.currentState=15&this._parseStack.transition}for(let j=A;j>4){case 2:for(let q=j+1;;++q){if(q>=w||(E=b[q])<32||E>126&&E=w||(E=b[q])<32||E>126&&E=w||(E=b[q])<32||E>126&&E=w||(E=b[q])<32||E>126&&E=0&&(C=M[L](this._params),C!==!0);L--)if(C instanceof Promise)return this._preserveStack(3,M,L,N,j),C;L<0&&this._csiHandlerFb(this._collect<<8|E,this._params),this.precedingJoinState=0;break;case 8:do switch(E){case 59:this._params.addParam(0);break;case 58:this._params.addSubParam(-1);break;default:this._params.addDigit(E-48)}while(++j47&&E<60);j--;break;case 9:this._collect<<=8,this._collect|=E;break;case 10:const I=this._escHandlers[this._collect<<8|E];let B=I?I.length-1:-1;for(;B>=0&&(C=I[B](),C!==!0);B--)if(C instanceof Promise)return this._preserveStack(4,I,B,N,j),C;B<0&&this._escHandlerFb(this._collect<<8|E),this.precedingJoinState=0;break;case 11:this._params.reset(),this._params.addParam(0),this._collect=0;break;case 12:this._dcsParser.hook(this._collect<<8|E,this._params);break;case 13:for(let q=j+1;;++q)if(q>=w||(E=b[q])===24||E===26||E===27||E>127&&E=w||(E=b[q])<32||E>127&&E{Object.defineProperty(o,"__esModule",{value:!0}),o.OscHandler=o.OscParser=void 0;const u=l(5770),h=l(482),_=[];o.OscParser=class{constructor(){this._state=0,this._active=_,this._id=-1,this._handlers=Object.create(null),this._handlerFb=()=>{},this._stack={paused:!1,loopPosition:0,fallThrough:!1}}registerHandler(p,m){this._handlers[p]===void 0&&(this._handlers[p]=[]);const x=this._handlers[p];return x.push(m),{dispose:()=>{const k=x.indexOf(m);k!==-1&&x.splice(k,1)}}}clearHandler(p){this._handlers[p]&&delete this._handlers[p]}setHandlerFallback(p){this._handlerFb=p}dispose(){this._handlers=Object.create(null),this._handlerFb=()=>{},this._active=_}reset(){if(this._state===2)for(let p=this._stack.paused?this._stack.loopPosition-1:this._active.length-1;p>=0;--p)this._active[p].end(!1);this._stack.paused=!1,this._active=_,this._id=-1,this._state=0}_start(){if(this._active=this._handlers[this._id]||_,this._active.length)for(let p=this._active.length-1;p>=0;p--)this._active[p].start();else this._handlerFb(this._id,"START")}_put(p,m,x){if(this._active.length)for(let k=this._active.length-1;k>=0;k--)this._active[k].put(p,m,x);else this._handlerFb(this._id,"PUT",(0,h.utf32ToString)(p,m,x))}start(){this.reset(),this._state=1}put(p,m,x){if(this._state!==3){if(this._state===1)for(;m0&&this._put(p,m,x)}}end(p,m=!0){if(this._state!==0){if(this._state!==3)if(this._state===1&&this._start(),this._active.length){let x=!1,k=this._active.length-1,v=!1;if(this._stack.paused&&(k=this._stack.loopPosition-1,x=m,v=this._stack.fallThrough,this._stack.paused=!1),!v&&x===!1){for(;k>=0&&(x=this._active[k].end(p),x!==!0);k--)if(x instanceof Promise)return this._stack.paused=!0,this._stack.loopPosition=k,this._stack.fallThrough=!1,x;k--}for(;k>=0;k--)if(x=this._active[k].end(!1),x instanceof Promise)return this._stack.paused=!0,this._stack.loopPosition=k,this._stack.fallThrough=!0,x}else this._handlerFb(this._id,"END",p);this._active=_,this._id=-1,this._state=0}}},o.OscHandler=class{constructor(p){this._handler=p,this._data="",this._hitLimit=!1}start(){this._data="",this._hitLimit=!1}put(p,m,x){this._hitLimit||(this._data+=(0,h.utf32ToString)(p,m,x),this._data.length>u.PAYLOAD_LIMIT&&(this._data="",this._hitLimit=!0))}end(p){let m=!1;if(this._hitLimit)m=!1;else if(p&&(m=this._handler(this._data),m instanceof Promise))return m.then((x=>(this._data="",this._hitLimit=!1,x)));return this._data="",this._hitLimit=!1,m}}},8742:(a,o)=>{Object.defineProperty(o,"__esModule",{value:!0}),o.Params=void 0;const l=2147483647;class u{static fromArray(_){const p=new u;if(!_.length)return p;for(let m=Array.isArray(_[0])?1:0;m<_.length;++m){const x=_[m];if(Array.isArray(x))for(let k=0;k256)throw new Error("maxSubParamsLength must not be greater than 256");this.params=new Int32Array(_),this.length=0,this._subParams=new Int32Array(p),this._subParamsLength=0,this._subParamsIdx=new Uint16Array(_),this._rejectDigits=!1,this._rejectSubDigits=!1,this._digitIsSub=!1}clone(){const _=new u(this.maxLength,this.maxSubParamsLength);return _.params.set(this.params),_.length=this.length,_._subParams.set(this._subParams),_._subParamsLength=this._subParamsLength,_._subParamsIdx.set(this._subParamsIdx),_._rejectDigits=this._rejectDigits,_._rejectSubDigits=this._rejectSubDigits,_._digitIsSub=this._digitIsSub,_}toArray(){const _=[];for(let p=0;p>8,x=255&this._subParamsIdx[p];x-m>0&&_.push(Array.prototype.slice.call(this._subParams,m,x))}return _}reset(){this.length=0,this._subParamsLength=0,this._rejectDigits=!1,this._rejectSubDigits=!1,this._digitIsSub=!1}addParam(_){if(this._digitIsSub=!1,this.length>=this.maxLength)this._rejectDigits=!0;else{if(_<-1)throw new Error("values lesser than -1 are not allowed");this._subParamsIdx[this.length]=this._subParamsLength<<8|this._subParamsLength,this.params[this.length++]=_>l?l:_}}addSubParam(_){if(this._digitIsSub=!0,this.length)if(this._rejectDigits||this._subParamsLength>=this.maxSubParamsLength)this._rejectSubDigits=!0;else{if(_<-1)throw new Error("values lesser than -1 are not allowed");this._subParams[this._subParamsLength++]=_>l?l:_,this._subParamsIdx[this.length-1]++}}hasSubParams(_){return(255&this._subParamsIdx[_])-(this._subParamsIdx[_]>>8)>0}getSubParams(_){const p=this._subParamsIdx[_]>>8,m=255&this._subParamsIdx[_];return m-p>0?this._subParams.subarray(p,m):null}getSubParamsAll(){const _={};for(let p=0;p>8,x=255&this._subParamsIdx[p];x-m>0&&(_[p]=this._subParams.slice(m,x))}return _}addDigit(_){let p;if(this._rejectDigits||!(p=this._digitIsSub?this._subParamsLength:this.length)||this._digitIsSub&&this._rejectSubDigits)return;const m=this._digitIsSub?this._subParams:this.params,x=m[p-1];m[p-1]=~x?Math.min(10*x+_,l):_}}o.Params=u},5741:(a,o)=>{Object.defineProperty(o,"__esModule",{value:!0}),o.AddonManager=void 0,o.AddonManager=class{constructor(){this._addons=[]}dispose(){for(let l=this._addons.length-1;l>=0;l--)this._addons[l].instance.dispose()}loadAddon(l,u){const h={instance:u,dispose:u.dispose,isDisposed:!1};this._addons.push(h),u.dispose=()=>this._wrappedAddonDispose(h),u.activate(l)}_wrappedAddonDispose(l){if(l.isDisposed)return;let u=-1;for(let h=0;h{Object.defineProperty(o,"__esModule",{value:!0}),o.BufferApiView=void 0;const u=l(3785),h=l(511);o.BufferApiView=class{constructor(_,p){this._buffer=_,this.type=p}init(_){return this._buffer=_,this}get cursorY(){return this._buffer.y}get cursorX(){return this._buffer.x}get viewportY(){return this._buffer.ydisp}get baseY(){return this._buffer.ybase}get length(){return this._buffer.lines.length}getLine(_){const p=this._buffer.lines.get(_);if(p)return new u.BufferLineApiView(p)}getNullCell(){return new h.CellData}}},3785:(a,o,l)=>{Object.defineProperty(o,"__esModule",{value:!0}),o.BufferLineApiView=void 0;const u=l(511);o.BufferLineApiView=class{constructor(h){this._line=h}get isWrapped(){return this._line.isWrapped}get length(){return this._line.length}getCell(h,_){if(!(h<0||h>=this._line.length))return _?(this._line.loadCell(h,_),_):this._line.loadCell(h,new u.CellData)}translateToString(h,_,p){return this._line.translateToString(h,_,p)}}},8285:(a,o,l)=>{Object.defineProperty(o,"__esModule",{value:!0}),o.BufferNamespaceApi=void 0;const u=l(8771),h=l(8460),_=l(844);class p extends _.Disposable{constructor(x){super(),this._core=x,this._onBufferChange=this.register(new h.EventEmitter),this.onBufferChange=this._onBufferChange.event,this._normal=new u.BufferApiView(this._core.buffers.normal,"normal"),this._alternate=new u.BufferApiView(this._core.buffers.alt,"alternate"),this._core.buffers.onBufferActivate((()=>this._onBufferChange.fire(this.active)))}get active(){if(this._core.buffers.active===this._core.buffers.normal)return this.normal;if(this._core.buffers.active===this._core.buffers.alt)return this.alternate;throw new Error("Active buffer is neither normal nor alternate")}get normal(){return this._normal.init(this._core.buffers.normal)}get alternate(){return this._alternate.init(this._core.buffers.alt)}}o.BufferNamespaceApi=p},7975:(a,o)=>{Object.defineProperty(o,"__esModule",{value:!0}),o.ParserApi=void 0,o.ParserApi=class{constructor(l){this._core=l}registerCsiHandler(l,u){return this._core.registerCsiHandler(l,(h=>u(h.toArray())))}addCsiHandler(l,u){return this.registerCsiHandler(l,u)}registerDcsHandler(l,u){return this._core.registerDcsHandler(l,((h,_)=>u(h,_.toArray())))}addDcsHandler(l,u){return this.registerDcsHandler(l,u)}registerEscHandler(l,u){return this._core.registerEscHandler(l,u)}addEscHandler(l,u){return this.registerEscHandler(l,u)}registerOscHandler(l,u){return this._core.registerOscHandler(l,u)}addOscHandler(l,u){return this.registerOscHandler(l,u)}}},7090:(a,o)=>{Object.defineProperty(o,"__esModule",{value:!0}),o.UnicodeApi=void 0,o.UnicodeApi=class{constructor(l){this._core=l}register(l){this._core.unicodeService.register(l)}get versions(){return this._core.unicodeService.versions}get activeVersion(){return this._core.unicodeService.activeVersion}set activeVersion(l){this._core.unicodeService.activeVersion=l}}},744:function(a,o,l){var u=this&&this.__decorate||function(v,b,w,y){var C,E=arguments.length,N=E<3?b:y===null?y=Object.getOwnPropertyDescriptor(b,w):y;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")N=Reflect.decorate(v,b,w,y);else for(var A=v.length-1;A>=0;A--)(C=v[A])&&(N=(E<3?C(N):E>3?C(b,w,N):C(b,w))||N);return E>3&&N&&Object.defineProperty(b,w,N),N},h=this&&this.__param||function(v,b){return function(w,y){b(w,y,v)}};Object.defineProperty(o,"__esModule",{value:!0}),o.BufferService=o.MINIMUM_ROWS=o.MINIMUM_COLS=void 0;const _=l(8460),p=l(844),m=l(5295),x=l(2585);o.MINIMUM_COLS=2,o.MINIMUM_ROWS=1;let k=o.BufferService=class extends p.Disposable{get buffer(){return this.buffers.active}constructor(v){super(),this.isUserScrolling=!1,this._onResize=this.register(new _.EventEmitter),this.onResize=this._onResize.event,this._onScroll=this.register(new _.EventEmitter),this.onScroll=this._onScroll.event,this.cols=Math.max(v.rawOptions.cols||0,o.MINIMUM_COLS),this.rows=Math.max(v.rawOptions.rows||0,o.MINIMUM_ROWS),this.buffers=this.register(new m.BufferSet(v,this))}resize(v,b){this.cols=v,this.rows=b,this.buffers.resize(v,b),this._onResize.fire({cols:v,rows:b})}reset(){this.buffers.reset(),this.isUserScrolling=!1}scroll(v,b=!1){const w=this.buffer;let y;y=this._cachedBlankLine,y&&y.length===this.cols&&y.getFg(0)===v.fg&&y.getBg(0)===v.bg||(y=w.getBlankLine(v,b),this._cachedBlankLine=y),y.isWrapped=b;const C=w.ybase+w.scrollTop,E=w.ybase+w.scrollBottom;if(w.scrollTop===0){const N=w.lines.isFull;E===w.lines.length-1?N?w.lines.recycle().copyFrom(y):w.lines.push(y.clone()):w.lines.splice(E+1,0,y.clone()),N?this.isUserScrolling&&(w.ydisp=Math.max(w.ydisp-1,0)):(w.ybase++,this.isUserScrolling||w.ydisp++)}else{const N=E-C+1;w.lines.shiftElements(C+1,N-1,-1),w.lines.set(E,y.clone())}this.isUserScrolling||(w.ydisp=w.ybase),this._onScroll.fire(w.ydisp)}scrollLines(v,b,w){const y=this.buffer;if(v<0){if(y.ydisp===0)return;this.isUserScrolling=!0}else v+y.ydisp>=y.ybase&&(this.isUserScrolling=!1);const C=y.ydisp;y.ydisp=Math.max(Math.min(y.ydisp+v,y.ybase),0),C!==y.ydisp&&(b||this._onScroll.fire(y.ydisp))}};o.BufferService=k=u([h(0,x.IOptionsService)],k)},7994:(a,o)=>{Object.defineProperty(o,"__esModule",{value:!0}),o.CharsetService=void 0,o.CharsetService=class{constructor(){this.glevel=0,this._charsets=[]}reset(){this.charset=void 0,this._charsets=[],this.glevel=0}setgLevel(l){this.glevel=l,this.charset=this._charsets[l]}setgCharset(l,u){this._charsets[l]=u,this.glevel===l&&(this.charset=u)}}},1753:function(a,o,l){var u=this&&this.__decorate||function(y,C,E,N){var A,j=arguments.length,M=j<3?C:N===null?N=Object.getOwnPropertyDescriptor(C,E):N;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")M=Reflect.decorate(y,C,E,N);else for(var L=y.length-1;L>=0;L--)(A=y[L])&&(M=(j<3?A(M):j>3?A(C,E,M):A(C,E))||M);return j>3&&M&&Object.defineProperty(C,E,M),M},h=this&&this.__param||function(y,C){return function(E,N){C(E,N,y)}};Object.defineProperty(o,"__esModule",{value:!0}),o.CoreMouseService=void 0;const _=l(2585),p=l(8460),m=l(844),x={NONE:{events:0,restrict:()=>!1},X10:{events:1,restrict:y=>y.button!==4&&y.action===1&&(y.ctrl=!1,y.alt=!1,y.shift=!1,!0)},VT200:{events:19,restrict:y=>y.action!==32},DRAG:{events:23,restrict:y=>y.action!==32||y.button!==3},ANY:{events:31,restrict:y=>!0}};function k(y,C){let E=(y.ctrl?16:0)|(y.shift?4:0)|(y.alt?8:0);return y.button===4?(E|=64,E|=y.action):(E|=3&y.button,4&y.button&&(E|=64),8&y.button&&(E|=128),y.action===32?E|=32:y.action!==0||C||(E|=3)),E}const v=String.fromCharCode,b={DEFAULT:y=>{const C=[k(y,!1)+32,y.col+32,y.row+32];return C[0]>255||C[1]>255||C[2]>255?"":`\x1B[M${v(C[0])}${v(C[1])}${v(C[2])}`},SGR:y=>{const C=y.action===0&&y.button!==4?"m":"M";return`\x1B[<${k(y,!0)};${y.col};${y.row}${C}`},SGR_PIXELS:y=>{const C=y.action===0&&y.button!==4?"m":"M";return`\x1B[<${k(y,!0)};${y.x};${y.y}${C}`}};let w=o.CoreMouseService=class extends m.Disposable{constructor(y,C){super(),this._bufferService=y,this._coreService=C,this._protocols={},this._encodings={},this._activeProtocol="",this._activeEncoding="",this._lastEvent=null,this._onProtocolChange=this.register(new p.EventEmitter),this.onProtocolChange=this._onProtocolChange.event;for(const E of Object.keys(x))this.addProtocol(E,x[E]);for(const E of Object.keys(b))this.addEncoding(E,b[E]);this.reset()}addProtocol(y,C){this._protocols[y]=C}addEncoding(y,C){this._encodings[y]=C}get activeProtocol(){return this._activeProtocol}get areMouseEventsActive(){return this._protocols[this._activeProtocol].events!==0}set activeProtocol(y){if(!this._protocols[y])throw new Error(`unknown protocol "${y}"`);this._activeProtocol=y,this._onProtocolChange.fire(this._protocols[y].events)}get activeEncoding(){return this._activeEncoding}set activeEncoding(y){if(!this._encodings[y])throw new Error(`unknown encoding "${y}"`);this._activeEncoding=y}reset(){this.activeProtocol="NONE",this.activeEncoding="DEFAULT",this._lastEvent=null}triggerMouseEvent(y){if(y.col<0||y.col>=this._bufferService.cols||y.row<0||y.row>=this._bufferService.rows||y.button===4&&y.action===32||y.button===3&&y.action!==32||y.button!==4&&(y.action===2||y.action===3)||(y.col++,y.row++,y.action===32&&this._lastEvent&&this._equalEvents(this._lastEvent,y,this._activeEncoding==="SGR_PIXELS"))||!this._protocols[this._activeProtocol].restrict(y))return!1;const C=this._encodings[this._activeEncoding](y);return C&&(this._activeEncoding==="DEFAULT"?this._coreService.triggerBinaryEvent(C):this._coreService.triggerDataEvent(C,!0)),this._lastEvent=y,!0}explainEvents(y){return{down:!!(1&y),up:!!(2&y),drag:!!(4&y),move:!!(8&y),wheel:!!(16&y)}}_equalEvents(y,C,E){if(E){if(y.x!==C.x||y.y!==C.y)return!1}else if(y.col!==C.col||y.row!==C.row)return!1;return y.button===C.button&&y.action===C.action&&y.ctrl===C.ctrl&&y.alt===C.alt&&y.shift===C.shift}};o.CoreMouseService=w=u([h(0,_.IBufferService),h(1,_.ICoreService)],w)},6975:function(a,o,l){var u=this&&this.__decorate||function(w,y,C,E){var N,A=arguments.length,j=A<3?y:E===null?E=Object.getOwnPropertyDescriptor(y,C):E;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")j=Reflect.decorate(w,y,C,E);else for(var M=w.length-1;M>=0;M--)(N=w[M])&&(j=(A<3?N(j):A>3?N(y,C,j):N(y,C))||j);return A>3&&j&&Object.defineProperty(y,C,j),j},h=this&&this.__param||function(w,y){return function(C,E){y(C,E,w)}};Object.defineProperty(o,"__esModule",{value:!0}),o.CoreService=void 0;const _=l(1439),p=l(8460),m=l(844),x=l(2585),k=Object.freeze({insertMode:!1}),v=Object.freeze({applicationCursorKeys:!1,applicationKeypad:!1,bracketedPasteMode:!1,origin:!1,reverseWraparound:!1,sendFocus:!1,wraparound:!0});let b=o.CoreService=class extends m.Disposable{constructor(w,y,C){super(),this._bufferService=w,this._logService=y,this._optionsService=C,this.isCursorInitialized=!1,this.isCursorHidden=!1,this._onData=this.register(new p.EventEmitter),this.onData=this._onData.event,this._onUserInput=this.register(new p.EventEmitter),this.onUserInput=this._onUserInput.event,this._onBinary=this.register(new p.EventEmitter),this.onBinary=this._onBinary.event,this._onRequestScrollToBottom=this.register(new p.EventEmitter),this.onRequestScrollToBottom=this._onRequestScrollToBottom.event,this.modes=(0,_.clone)(k),this.decPrivateModes=(0,_.clone)(v)}reset(){this.modes=(0,_.clone)(k),this.decPrivateModes=(0,_.clone)(v)}triggerDataEvent(w,y=!1){if(this._optionsService.rawOptions.disableStdin)return;const C=this._bufferService.buffer;y&&this._optionsService.rawOptions.scrollOnUserInput&&C.ybase!==C.ydisp&&this._onRequestScrollToBottom.fire(),y&&this._onUserInput.fire(),this._logService.debug(`sending data "${w}"`,(()=>w.split("").map((E=>E.charCodeAt(0))))),this._onData.fire(w)}triggerBinaryEvent(w){this._optionsService.rawOptions.disableStdin||(this._logService.debug(`sending binary "${w}"`,(()=>w.split("").map((y=>y.charCodeAt(0))))),this._onBinary.fire(w))}};o.CoreService=b=u([h(0,x.IBufferService),h(1,x.ILogService),h(2,x.IOptionsService)],b)},9074:(a,o,l)=>{Object.defineProperty(o,"__esModule",{value:!0}),o.DecorationService=void 0;const u=l(8055),h=l(8460),_=l(844),p=l(6106);let m=0,x=0;class k extends _.Disposable{get decorations(){return this._decorations.values()}constructor(){super(),this._decorations=new p.SortedList((w=>w==null?void 0:w.marker.line)),this._onDecorationRegistered=this.register(new h.EventEmitter),this.onDecorationRegistered=this._onDecorationRegistered.event,this._onDecorationRemoved=this.register(new h.EventEmitter),this.onDecorationRemoved=this._onDecorationRemoved.event,this.register((0,_.toDisposable)((()=>this.reset())))}registerDecoration(w){if(w.marker.isDisposed)return;const y=new v(w);if(y){const C=y.marker.onDispose((()=>y.dispose()));y.onDispose((()=>{y&&(this._decorations.delete(y)&&this._onDecorationRemoved.fire(y),C.dispose())})),this._decorations.insert(y),this._onDecorationRegistered.fire(y)}return y}reset(){for(const w of this._decorations.values())w.dispose();this._decorations.clear()}*getDecorationsAtCell(w,y,C){let E=0,N=0;for(const A of this._decorations.getKeyIterator(y))E=A.options.x??0,N=E+(A.options.width??1),w>=E&&w{m=N.options.x??0,x=m+(N.options.width??1),w>=m&&w{Object.defineProperty(o,"__esModule",{value:!0}),o.InstantiationService=o.ServiceCollection=void 0;const u=l(2585),h=l(8343);class _{constructor(...m){this._entries=new Map;for(const[x,k]of m)this.set(x,k)}set(m,x){const k=this._entries.get(m);return this._entries.set(m,x),k}forEach(m){for(const[x,k]of this._entries.entries())m(x,k)}has(m){return this._entries.has(m)}get(m){return this._entries.get(m)}}o.ServiceCollection=_,o.InstantiationService=class{constructor(){this._services=new _,this._services.set(u.IInstantiationService,this)}setService(p,m){this._services.set(p,m)}getService(p){return this._services.get(p)}createInstance(p,...m){const x=(0,h.getServiceDependencies)(p).sort(((b,w)=>b.index-w.index)),k=[];for(const b of x){const w=this._services.get(b.id);if(!w)throw new Error(`[createInstance] ${p.name} depends on UNKNOWN service ${b.id}.`);k.push(w)}const v=x.length>0?x[0].index:m.length;if(m.length!==v)throw new Error(`[createInstance] First service dependency of ${p.name} at position ${v+1} conflicts with ${m.length} static arguments`);return new p(...m,...k)}}},7866:function(a,o,l){var u=this&&this.__decorate||function(v,b,w,y){var C,E=arguments.length,N=E<3?b:y===null?y=Object.getOwnPropertyDescriptor(b,w):y;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")N=Reflect.decorate(v,b,w,y);else for(var A=v.length-1;A>=0;A--)(C=v[A])&&(N=(E<3?C(N):E>3?C(b,w,N):C(b,w))||N);return E>3&&N&&Object.defineProperty(b,w,N),N},h=this&&this.__param||function(v,b){return function(w,y){b(w,y,v)}};Object.defineProperty(o,"__esModule",{value:!0}),o.traceCall=o.setTraceLogger=o.LogService=void 0;const _=l(844),p=l(2585),m={trace:p.LogLevelEnum.TRACE,debug:p.LogLevelEnum.DEBUG,info:p.LogLevelEnum.INFO,warn:p.LogLevelEnum.WARN,error:p.LogLevelEnum.ERROR,off:p.LogLevelEnum.OFF};let x,k=o.LogService=class extends _.Disposable{get logLevel(){return this._logLevel}constructor(v){super(),this._optionsService=v,this._logLevel=p.LogLevelEnum.OFF,this._updateLogLevel(),this.register(this._optionsService.onSpecificOptionChange("logLevel",(()=>this._updateLogLevel()))),x=this}_updateLogLevel(){this._logLevel=m[this._optionsService.rawOptions.logLevel]}_evalLazyOptionalParams(v){for(let b=0;bJSON.stringify(N))).join(", ")})`);const E=y.apply(this,C);return x.trace(`GlyphRenderer#${y.name} return`,E),E}}},7302:(a,o,l)=>{Object.defineProperty(o,"__esModule",{value:!0}),o.OptionsService=o.DEFAULT_OPTIONS=void 0;const u=l(8460),h=l(844),_=l(6114);o.DEFAULT_OPTIONS={cols:80,rows:24,cursorBlink:!1,cursorStyle:"block",cursorWidth:1,cursorInactiveStyle:"outline",customGlyphs:!0,drawBoldTextInBrightColors:!0,documentOverride:null,fastScrollModifier:"alt",fastScrollSensitivity:5,fontFamily:"courier-new, courier, monospace",fontSize:15,fontWeight:"normal",fontWeightBold:"bold",ignoreBracketedPasteMode:!1,lineHeight:1,letterSpacing:0,linkHandler:null,logLevel:"info",logger:null,scrollback:1e3,scrollOnUserInput:!0,scrollSensitivity:1,screenReaderMode:!1,smoothScrollDuration:0,macOptionIsMeta:!1,macOptionClickForcesSelection:!1,minimumContrastRatio:1,disableStdin:!1,allowProposedApi:!1,allowTransparency:!1,tabStopWidth:8,theme:{},rescaleOverlappingGlyphs:!1,rightClickSelectsWord:_.isMac,windowOptions:{},windowsMode:!1,windowsPty:{},wordSeparator:" ()[]{}',\"`",altClickMovesCursor:!0,convertEol:!1,termName:"xterm",cancelEvents:!1,overviewRulerWidth:0};const p=["normal","bold","100","200","300","400","500","600","700","800","900"];class m extends h.Disposable{constructor(k){super(),this._onOptionChange=this.register(new u.EventEmitter),this.onOptionChange=this._onOptionChange.event;const v={...o.DEFAULT_OPTIONS};for(const b in k)if(b in v)try{const w=k[b];v[b]=this._sanitizeAndValidateOption(b,w)}catch(w){console.error(w)}this.rawOptions=v,this.options={...v},this._setupOptions(),this.register((0,h.toDisposable)((()=>{this.rawOptions.linkHandler=null,this.rawOptions.documentOverride=null})))}onSpecificOptionChange(k,v){return this.onOptionChange((b=>{b===k&&v(this.rawOptions[k])}))}onMultipleOptionChange(k,v){return this.onOptionChange((b=>{k.indexOf(b)!==-1&&v()}))}_setupOptions(){const k=b=>{if(!(b in o.DEFAULT_OPTIONS))throw new Error(`No option with key "${b}"`);return this.rawOptions[b]},v=(b,w)=>{if(!(b in o.DEFAULT_OPTIONS))throw new Error(`No option with key "${b}"`);w=this._sanitizeAndValidateOption(b,w),this.rawOptions[b]!==w&&(this.rawOptions[b]=w,this._onOptionChange.fire(b))};for(const b in this.rawOptions){const w={get:k.bind(this,b),set:v.bind(this,b)};Object.defineProperty(this.options,b,w)}}_sanitizeAndValidateOption(k,v){switch(k){case"cursorStyle":if(v||(v=o.DEFAULT_OPTIONS[k]),!(function(b){return b==="block"||b==="underline"||b==="bar"})(v))throw new Error(`"${v}" is not a valid value for ${k}`);break;case"wordSeparator":v||(v=o.DEFAULT_OPTIONS[k]);break;case"fontWeight":case"fontWeightBold":if(typeof v=="number"&&1<=v&&v<=1e3)break;v=p.includes(v)?v:o.DEFAULT_OPTIONS[k];break;case"cursorWidth":v=Math.floor(v);case"lineHeight":case"tabStopWidth":if(v<1)throw new Error(`${k} cannot be less than 1, value: ${v}`);break;case"minimumContrastRatio":v=Math.max(1,Math.min(21,Math.round(10*v)/10));break;case"scrollback":if((v=Math.min(v,4294967295))<0)throw new Error(`${k} cannot be less than 0, value: ${v}`);break;case"fastScrollSensitivity":case"scrollSensitivity":if(v<=0)throw new Error(`${k} cannot be less than or equal to 0, value: ${v}`);break;case"rows":case"cols":if(!v&&v!==0)throw new Error(`${k} must be numeric, value: ${v}`);break;case"windowsPty":v=v??{}}return v}}o.OptionsService=m},2660:function(a,o,l){var u=this&&this.__decorate||function(m,x,k,v){var b,w=arguments.length,y=w<3?x:v===null?v=Object.getOwnPropertyDescriptor(x,k):v;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")y=Reflect.decorate(m,x,k,v);else for(var C=m.length-1;C>=0;C--)(b=m[C])&&(y=(w<3?b(y):w>3?b(x,k,y):b(x,k))||y);return w>3&&y&&Object.defineProperty(x,k,y),y},h=this&&this.__param||function(m,x){return function(k,v){x(k,v,m)}};Object.defineProperty(o,"__esModule",{value:!0}),o.OscLinkService=void 0;const _=l(2585);let p=o.OscLinkService=class{constructor(m){this._bufferService=m,this._nextId=1,this._entriesWithId=new Map,this._dataByLinkId=new Map}registerLink(m){const x=this._bufferService.buffer;if(m.id===void 0){const C=x.addMarker(x.ybase+x.y),E={data:m,id:this._nextId++,lines:[C]};return C.onDispose((()=>this._removeMarkerFromLink(E,C))),this._dataByLinkId.set(E.id,E),E.id}const k=m,v=this._getEntryIdKey(k),b=this._entriesWithId.get(v);if(b)return this.addLineToLink(b.id,x.ybase+x.y),b.id;const w=x.addMarker(x.ybase+x.y),y={id:this._nextId++,key:this._getEntryIdKey(k),data:k,lines:[w]};return w.onDispose((()=>this._removeMarkerFromLink(y,w))),this._entriesWithId.set(y.key,y),this._dataByLinkId.set(y.id,y),y.id}addLineToLink(m,x){const k=this._dataByLinkId.get(m);if(k&&k.lines.every((v=>v.line!==x))){const v=this._bufferService.buffer.addMarker(x);k.lines.push(v),v.onDispose((()=>this._removeMarkerFromLink(k,v)))}}getLinkData(m){var x;return(x=this._dataByLinkId.get(m))==null?void 0:x.data}_getEntryIdKey(m){return`${m.id};;${m.uri}`}_removeMarkerFromLink(m,x){const k=m.lines.indexOf(x);k!==-1&&(m.lines.splice(k,1),m.lines.length===0&&(m.data.id!==void 0&&this._entriesWithId.delete(m.key),this._dataByLinkId.delete(m.id)))}};o.OscLinkService=p=u([h(0,_.IBufferService)],p)},8343:(a,o)=>{Object.defineProperty(o,"__esModule",{value:!0}),o.createDecorator=o.getServiceDependencies=o.serviceRegistry=void 0;const l="di$target",u="di$dependencies";o.serviceRegistry=new Map,o.getServiceDependencies=function(h){return h[u]||[]},o.createDecorator=function(h){if(o.serviceRegistry.has(h))return o.serviceRegistry.get(h);const _=function(p,m,x){if(arguments.length!==3)throw new Error("@IServiceName-decorator can only be used to decorate a parameter");(function(k,v,b){v[l]===v?v[u].push({id:k,index:b}):(v[u]=[{id:k,index:b}],v[l]=v)})(_,p,x)};return _.toString=()=>h,o.serviceRegistry.set(h,_),_}},2585:(a,o,l)=>{Object.defineProperty(o,"__esModule",{value:!0}),o.IDecorationService=o.IUnicodeService=o.IOscLinkService=o.IOptionsService=o.ILogService=o.LogLevelEnum=o.IInstantiationService=o.ICharsetService=o.ICoreService=o.ICoreMouseService=o.IBufferService=void 0;const u=l(8343);var h;o.IBufferService=(0,u.createDecorator)("BufferService"),o.ICoreMouseService=(0,u.createDecorator)("CoreMouseService"),o.ICoreService=(0,u.createDecorator)("CoreService"),o.ICharsetService=(0,u.createDecorator)("CharsetService"),o.IInstantiationService=(0,u.createDecorator)("InstantiationService"),(function(_){_[_.TRACE=0]="TRACE",_[_.DEBUG=1]="DEBUG",_[_.INFO=2]="INFO",_[_.WARN=3]="WARN",_[_.ERROR=4]="ERROR",_[_.OFF=5]="OFF"})(h||(o.LogLevelEnum=h={})),o.ILogService=(0,u.createDecorator)("LogService"),o.IOptionsService=(0,u.createDecorator)("OptionsService"),o.IOscLinkService=(0,u.createDecorator)("OscLinkService"),o.IUnicodeService=(0,u.createDecorator)("UnicodeService"),o.IDecorationService=(0,u.createDecorator)("DecorationService")},1480:(a,o,l)=>{Object.defineProperty(o,"__esModule",{value:!0}),o.UnicodeService=void 0;const u=l(8460),h=l(225);class _{static extractShouldJoin(m){return(1&m)!=0}static extractWidth(m){return m>>1&3}static extractCharKind(m){return m>>3}static createPropertyValue(m,x,k=!1){return(16777215&m)<<3|(3&x)<<1|(k?1:0)}constructor(){this._providers=Object.create(null),this._active="",this._onChange=new u.EventEmitter,this.onChange=this._onChange.event;const m=new h.UnicodeV6;this.register(m),this._active=m.version,this._activeProvider=m}dispose(){this._onChange.dispose()}get versions(){return Object.keys(this._providers)}get activeVersion(){return this._active}set activeVersion(m){if(!this._providers[m])throw new Error(`unknown Unicode version "${m}"`);this._active=m,this._activeProvider=this._providers[m],this._onChange.fire(m)}register(m){this._providers[m.version]=m}wcwidth(m){return this._activeProvider.wcwidth(m)}getStringCellWidth(m){let x=0,k=0;const v=m.length;for(let b=0;b=v)return x+this.wcwidth(w);const E=m.charCodeAt(b);56320<=E&&E<=57343?w=1024*(w-55296)+E-56320+65536:x+=this.wcwidth(E)}const y=this.charProperties(w,k);let C=_.extractWidth(y);_.extractShouldJoin(y)&&(C-=_.extractWidth(k)),x+=C,k=y}return x}charProperties(m,x){return this._activeProvider.charProperties(m,x)}}o.UnicodeService=_}},r={};function s(a){var o=r[a];if(o!==void 0)return o.exports;var l=r[a]={exports:{}};return t[a].call(l.exports,l,l.exports,s),l.exports}var i={};return(()=>{var a=i;Object.defineProperty(a,"__esModule",{value:!0}),a.Terminal=void 0;const o=s(9042),l=s(3236),u=s(844),h=s(5741),_=s(8285),p=s(7975),m=s(7090),x=["cols","rows"];class k extends u.Disposable{constructor(b){super(),this._core=this.register(new l.Terminal(b)),this._addonManager=this.register(new h.AddonManager),this._publicOptions={...this._core.options};const w=C=>this._core.options[C],y=(C,E)=>{this._checkReadonlyOptions(C),this._core.options[C]=E};for(const C in this._core.options){const E={get:w.bind(this,C),set:y.bind(this,C)};Object.defineProperty(this._publicOptions,C,E)}}_checkReadonlyOptions(b){if(x.includes(b))throw new Error(`Option "${b}" can only be set in the constructor`)}_checkProposedApi(){if(!this._core.optionsService.rawOptions.allowProposedApi)throw new Error("You must set the allowProposedApi option to true to use proposed API")}get onBell(){return this._core.onBell}get onBinary(){return this._core.onBinary}get onCursorMove(){return this._core.onCursorMove}get onData(){return this._core.onData}get onKey(){return this._core.onKey}get onLineFeed(){return this._core.onLineFeed}get onRender(){return this._core.onRender}get onResize(){return this._core.onResize}get onScroll(){return this._core.onScroll}get onSelectionChange(){return this._core.onSelectionChange}get onTitleChange(){return this._core.onTitleChange}get onWriteParsed(){return this._core.onWriteParsed}get element(){return this._core.element}get parser(){return this._parser||(this._parser=new p.ParserApi(this._core)),this._parser}get unicode(){return this._checkProposedApi(),new m.UnicodeApi(this._core)}get textarea(){return this._core.textarea}get rows(){return this._core.rows}get cols(){return this._core.cols}get buffer(){return this._buffer||(this._buffer=this.register(new _.BufferNamespaceApi(this._core))),this._buffer}get markers(){return this._checkProposedApi(),this._core.markers}get modes(){const b=this._core.coreService.decPrivateModes;let w="none";switch(this._core.coreMouseService.activeProtocol){case"X10":w="x10";break;case"VT200":w="vt200";break;case"DRAG":w="drag";break;case"ANY":w="any"}return{applicationCursorKeysMode:b.applicationCursorKeys,applicationKeypadMode:b.applicationKeypad,bracketedPasteMode:b.bracketedPasteMode,insertMode:this._core.coreService.modes.insertMode,mouseTrackingMode:w,originMode:b.origin,reverseWraparoundMode:b.reverseWraparound,sendFocusMode:b.sendFocus,wraparoundMode:b.wraparound}}get options(){return this._publicOptions}set options(b){for(const w in b)this._publicOptions[w]=b[w]}blur(){this._core.blur()}focus(){this._core.focus()}input(b,w=!0){this._core.input(b,w)}resize(b,w){this._verifyIntegers(b,w),this._core.resize(b,w)}open(b){this._core.open(b)}attachCustomKeyEventHandler(b){this._core.attachCustomKeyEventHandler(b)}attachCustomWheelEventHandler(b){this._core.attachCustomWheelEventHandler(b)}registerLinkProvider(b){return this._core.registerLinkProvider(b)}registerCharacterJoiner(b){return this._checkProposedApi(),this._core.registerCharacterJoiner(b)}deregisterCharacterJoiner(b){this._checkProposedApi(),this._core.deregisterCharacterJoiner(b)}registerMarker(b=0){return this._verifyIntegers(b),this._core.registerMarker(b)}registerDecoration(b){return this._checkProposedApi(),this._verifyPositiveIntegers(b.x??0,b.width??0,b.height??0),this._core.registerDecoration(b)}hasSelection(){return this._core.hasSelection()}select(b,w,y){this._verifyIntegers(b,w,y),this._core.select(b,w,y)}getSelection(){return this._core.getSelection()}getSelectionPosition(){return this._core.getSelectionPosition()}clearSelection(){this._core.clearSelection()}selectAll(){this._core.selectAll()}selectLines(b,w){this._verifyIntegers(b,w),this._core.selectLines(b,w)}dispose(){super.dispose()}scrollLines(b){this._verifyIntegers(b),this._core.scrollLines(b)}scrollPages(b){this._verifyIntegers(b),this._core.scrollPages(b)}scrollToTop(){this._core.scrollToTop()}scrollToBottom(){this._core.scrollToBottom()}scrollToLine(b){this._verifyIntegers(b),this._core.scrollToLine(b)}clear(){this._core.clear()}write(b,w){this._core.write(b,w)}writeln(b,w){this._core.write(b),this._core.write(`\r +`,w)}paste(b){this._core.paste(b)}refresh(b,w){this._verifyIntegers(b,w),this._core.refresh(b,w)}reset(){this._core.reset()}clearTextureAtlas(){this._core.clearTextureAtlas()}loadAddon(b){this._addonManager.loadAddon(this,b)}static get strings(){return o}_verifyIntegers(...b){for(const w of b)if(w===1/0||isNaN(w)||w%1!=0)throw new Error("This API only accepts integers")}_verifyPositiveIntegers(...b){for(const w of b)if(w&&(w===1/0||isNaN(w)||w%1!=0||w<0))throw new Error("This API only accepts positive integers")}}a.Terminal=k})(),i})()))})(tw)),tw.exports}var RI=Xyn();const Yyn=["black","red","green","yellow","blue","magenta","cyan","white","brightBlack","brightRed","brightGreen","brightYellow","brightBlue","brightMagenta","brightCyan","brightWhite"];function Xz(e,n){const t=document.documentElement,r=getComputedStyle(t),s=a=>r.getPropertyValue(n==="app"?`--term-app-${a}`:`--term-${a}`).trim(),i={};if(n==="app"&&t.dataset.theme!=="dark")for(const a of Yyn){const o=r.getPropertyValue(`--term-app-ansi-${a.replace(/[A-Z]/g,l=>`-${l.toLowerCase()}`)}`).trim();o&&(i[a]=o)}return{...i,background:s("bg"),foreground:s("foreground"),cursor:s(e?"bg":"foreground"),cursorAccent:s("bg"),selectionBackground:s("selection")}}function zb(e,n,t=!1,r="dark"){const s=getComputedStyle(document.documentElement),i=new RI.Terminal({convertEol:!0,disableStdin:n,cursorBlink:!n,cursorStyle:"bar",cursorWidth:2,fontSize:12,fontFamily:s.getPropertyValue("--mono").trim()||"ui-monospace, Menlo, Consolas, monospace",scrollback:2e4,theme:Xz(n,r)}),a=r==="app"?new MutationObserver(()=>{i.options.theme=Xz(i.options.disableStdin??n,r)}):null;a==null||a.observe(document.documentElement,{attributes:!0,attributeFilter:["data-theme"]});const o=new Kyn.FitAddon;i.loadAddon(o),t&&i.loadAddon(new Qyn.WebLinksAddon((w,y)=>{let C;try{C=new URL(y)}catch{return}(C.protocol==="http:"||C.protocol==="https:")&&window.open(C,"_blank","noopener,noreferrer")}));const l=e.style.overflowY;e.style.overflowY="auto",i.open(e);let u=!0,h=null;const _=()=>{if(h===e.scrollTop){h=null;return}h=null,u=e.scrollTop+e.clientHeight>=e.scrollHeight-1};e.addEventListener("scroll",_);const p=()=>{var j;const w=i.element,y=w==null?void 0:w.querySelector(".xterm-screen"),C=w==null?void 0:w.querySelector(".xterm-viewport");if(!w||!(y instanceof HTMLElement)||!(C instanceof HTMLElement))return;const E=i.buffer.active;let N=Math.max(0,E.baseY+E.cursorY-E.viewportY+1);for(let M=i.rows-1;M>=N;M--)if((j=E.getLine(E.viewportY+M))!=null&&j.translateToString(!0).trim()){N=M+1;break}const A=y.getBoundingClientRect().height;w.style.height=`${Math.max(e.clientHeight,Math.min(N,i.rows)*A/i.rows)}px`,w.style.overflow="hidden",C.style.height=`${A}px`},m=()=>{try{const w=o.proposeDimensions();w&&(i.resize(w.cols,Math.max(w.rows,n?1:40)),p())}catch{}};m();const x=new ResizeObserver(m);x.observe(e);const k=i.onWriteParsed(()=>{var y;const w=u&&i.buffer.active.viewportY===i.buffer.active.baseY;if(p(),w){const C=(y=i.element)==null?void 0:y.querySelector(".xterm-screen");if(C instanceof HTMLElement){const E=(i.buffer.active.cursorY+1)*C.getBoundingClientRect().height/i.rows;e.scrollTop=Math.max(0,E-e.clientHeight),h=e.scrollTop}}}),v=i.onScroll(p),b=w=>{(w.deltaY<0?e.scrollTop>0:e.scrollTop+e.clientHeighttypeof n=="string")}function Zyn(e){return cf(e)&&typeof e.reachable=="boolean"&&typeof e.toolsFound=="boolean"&&(e.missingTools===void 0||OI(e.missingTools))&&(e.error===null||typeof e.error=="string")&&typeof e.testedAt=="number"}function Jyn(e){return cf(e)&&typeof e.reachable=="boolean"&&typeof e.slurmFound=="boolean"&&typeof e.toolsFound=="boolean"&&OI(e.partitions)&&(e.error===null||typeof e.error=="string")}function exn(e){return!cf(e)||e.type!=="complete"?null:e.backend==="ssh"&&Zyn(e.result)?{backend:"ssh",result:e.result}:e.backend==="slurm"&&Jyn(e.result)?{backend:"slurm",result:e.result}:null}function DI(e){return cf(e)&&e.type==="complete"}function txn(e){return cf(e)&&e.type==="error"&&typeof e.error=="string"?e.error:null}function lS({host:e,backend:n,path:t="/api/settings/ssh/connect",active:r=!0,onComplete:s,onError:i}){const a=new URLSearchParams({host:e,backend:n});return f.jsx(jb,{path:`${t}?${a}`,label:uL({host:Ne(e)}),active:r,onError:i,onComplete:o=>{const l=exn(o);return l?(s(l),!0):!1}})}function nxn({login:e,onComplete:n,onError:t}){return f.jsx(jb,{path:e?"/api/settings/openresearch/login":"/api/settings/openresearch/ssh-key",label:e?"orx login":"orx ssh-key add",heightClass:"h-96",onError:t,onComplete:r=>DI(r)?(n(),!0):!1})}function rxn({path:e,label:n,onComplete:t,onError:r,onClose:s}){const[i,a]=T.useState("running");return f.jsxs("div",{className:"mt-4 overflow-hidden rounded-lg border border-border",children:[f.jsxs("div",{className:"flex h-9 items-center gap-3 border-b border-b-border-variant bg-surface ps-3 pe-1.5",children:[f.jsx("code",{dir:"ltr",className:"min-w-0 flex-1 truncate font-mono text-xs text-subtext",children:n}),f.jsx("span",{role:"status",className:"flex shrink-0 items-center gap-1.5 text-xs text-subtext",children:i==="running"?f.jsxs(f.Fragment,{children:[f.jsx(Rt,{className:"border-t-accent-amber"})," ",qCt()]}):i==="done"?f.jsxs(f.Fragment,{children:[f.jsx(Ji,{size:13,strokeWidth:2.5,className:"text-accent-green"})," ",jCt()]}):i==="failed"?f.jsxs(f.Fragment,{children:[f.jsx(_r,{size:13,strokeWidth:2.5,className:"text-accent-red"})," ",LCt()]}):wCt()}),f.jsx("button",{type:"button",onClick:s,"aria-label":sz(),title:sz(),className:"ms-1 inline-flex h-6 w-6 shrink-0 cursor-pointer items-center justify-center rounded-md border-0 bg-transparent text-muted [&:hover]:bg-highlight [&:hover]:text-text",children:f.jsx(_r,{size:14})})]}),f.jsx(jb,{path:e,label:n,heightClass:"h-80",frame:"bare",palette:"app",shellAfter:!0,onError:(o,l)=>{a("failed"),l&&r(o)},onComplete:o=>DI(o)?(a("done"),t(),!0):!1,onClosed:()=>a(o=>o==="running"?"closed":o)})]})}function jb({path:e,label:n,command:t,heightClass:r="h-40",frame:s="card",palette:i="dark",shellAfter:a=!1,active:o=!0,awaitingApproval:l=!1,onComplete:u,onError:h,onClosed:_}){const p=T.useRef(null),m=T.useRef(null),x=T.useRef(u),k=T.useRef(h),v=T.useRef(_),[b,w]=T.useState(null);return x.current=u,k.current=h,v.current=_,T.useEffect(()=>{const y=p.current;if(!y)return;const{terminal:C,dispose:E}=zb(y,l,!0,i);if(m.current=C,l)return t&&C.writeln(`$ ${t}`),()=>{m.current=null,E()};C.focus();const N=location.protocol==="https:"?"wss:":"ws:",A=new URL(e,`${N}//${location.host}`),j=new WebSocket(A);j.binaryType="arraybuffer";let M=!1,L=!1,I=!1;const B=(W,H)=>{var Y;if(L){H||C.writeln(W);return}L=!0,(!I||a)&&C.writeln(W),(Y=k.current)==null||Y.call(k,W,H),!(a&&!H)&&(C.options.disableStdin=!0,C.blur(),w(W))},q=C.onData(W=>{j.readyState===WebSocket.OPEN&&j.send(new TextEncoder().encode(W))}),U=C.onResize(({cols:W,rows:H})=>{j.readyState===WebSocket.OPEN&&j.send(JSON.stringify({type:"resize",cols:W,rows:H}))});return j.onopen=()=>{t&&C.writeln(`$ ${t}`),j.send(JSON.stringify({type:"resize",cols:C.cols,rows:C.rows}))},j.onmessage=W=>{if(W.data instanceof ArrayBuffer){I=!0,C.write(new Uint8Array(W.data));return}if(typeof W.data!="string")return;let H;try{H=JSON.parse(W.data)}catch{return}if(x.current(H)){M=!0,a||j.close();return}const Y=txn(H);Y&&(M?C.writeln(Y):B(Y,!a))},j.onerror=()=>B(bv(),!0),j.onclose=()=>{var W;if(!M&&!L){B(bv(),!0);return}a&&(C.options.disableStdin=!0,C.blur(),(W=v.current)==null||W.call(v))},()=>{j.onopen=null,j.onmessage=null,j.onerror=null,j.onclose=null,q.dispose(),U.dispose(),j.close(),m.current=null,E()}},[e,t,l,i,a]),T.useEffect(()=>{const y=m.current;y&&(y.options.disableStdin=l||!o||b!==null,!l&&o&&b===null?y.focus():y.blur())},[o,b,l]),f.jsxs("div",{className:s==="card"?"mt-3":void 0,children:[f.jsx("div",{className:`${r} ${s==="card"?MI:`overflow-hidden p-3 ${i==="app"?"bg-terminal-app":"bg-terminal"}`}`,role:"group","aria-label":n,children:f.jsx("div",{ref:p,className:"h-full overflow-hidden"})}),b?f.jsx("p",{role:"alert",className:"sr-only",children:b}):null]})}function sxn({host:e,transcript:n}){const t=T.useRef(null);return T.useEffect(()=>{const r=t.current;if(!r)return;const{terminal:s,dispose:i}=zb(r,!0,!0);return s.write(n),i},[n]),f.jsx("div",{className:`mt-3 h-40 ${MI}`,role:"group","aria-label":uL({host:Ne(e)}),children:f.jsx("div",{ref:t,className:"h-full overflow-hidden"})})}let Nv=null,Fp=0;const cS=()=>Nv;function LI(){const e=Fp;return TI(async(n,t)=>{if(e!==Fp)return;const r=await Gpn(n,t);e===Fp&&rt.setQueryData(fm().queryKey,s=>s?{...s,workspace:r.workspace}:r)},n=>{e===Fp&&Bn(n instanceof Error?n.message:String(n),"error",{id:"workspace-save",action:{label:Vs(),onClick:()=>void Tb.retry()}})})}let F1=LI();function ixn(){Fp++,Nv=null,F1=LI()}const Tb={flush:(e=!1)=>F1.flush(e),retry:()=>F1.retry(),queue(e,n=0){const t=Nv;t&&t.lastLocation===e.lastLocation&&t.railOpen===e.railOpen&&t.panelWidth===e.panelWidth&&t.experimentsView===e.experimentsView||(Nv=e,F1.queue(e,n))}};window.addEventListener("pagehide",()=>void Tb.flush(!0));function Ql(e,n){if(typeof e=="string")return{kind:"home",view:e};if("code"in e)return{kind:"code",experimentId:e.experimentId,branch:e.branch,view:e.view};if("kind"in e)return e.kind==="plan"?{kind:"plan",sessionId:e.sessionId,promptId:e.promptId}:{kind:"subagent",sessionId:e.sessionId,spawnPartId:e.spawnPartId};if("path"in e)return{kind:"file",path:e.path,source:e.source,sessionId:e.sessionId,ref:e.ref,line:e.line,branchLabel:e.branchLabel};const t=n===void 0?e.runId:n;return{kind:"experiment",experimentId:e.id,view:e.view,...t?{runId:t}:{}}}function eo(e){switch(e.kind){case"home":return e.view;case"experiment":return{id:e.experimentId,view:e.view,...e.runId?{runId:e.runId}:{}};case"file":return{path:e.path,source:e.source,sessionId:e.sessionId,ref:e.ref,line:e.line,branchLabel:e.branchLabel};case"code":return{code:!0,experimentId:e.experimentId,branch:e.branch,view:e.view,toggled:new Set};case"plan":return{kind:"plan",sessionId:e.sessionId,promptId:e.promptId,plan:""};case"subagent":return{kind:"subagent",sessionId:e.sessionId,spawnPartId:e.spawnPartId}}}function II(e,n,t){const r=[];e.filesTabOpen&&r.push("files"),e.terminalTabOpen&&r.push("terminal"),e.artifactsTabOpen&&r.push("artifacts"),e.experimentsTabOpen&&r.push("experiments");const s=[...e.expTabs,...e.fileTabs,...e.planTabs,...e.subagentTabs,...e.codeTabs],i=new Map(s.map(u=>[At(u),u])),a=e.contentTabOrder.flatMap(u=>{const h=i.get(u);return h?[h]:[]}),o=At(e.rightTab);return{tabs:[...r,...a].map(u=>Ql(u,At(u)===o?e.selectedRunId:void 0)),active:e.panelOpen?Ql(e.rightTab,e.selectedRunId):null,previewKey:e.previewTab?At(e.previewTab):null,history:e.tabHistory.map(At),expanded:Object.fromEntries([["files",[...e.filesToggled]],...e.codeTabs.map(u=>[At(u),[...u.toggled]])]),scroll:n,sourceModes:t,filesView:e.filesView,scope:e.scope,panelMax:e.panelMax,treeViewport:e.treeViewport}}function axn(e,n){const t=_S();e&&(t.filesView=e.filesView,t.filesToggled=new Set(e.expanded.files??[]),t.scope=e.scope,t.panelMax=e.panelMax,t.treeViewport=e.treeViewport??null);const r=[...(e==null?void 0:e.tabs)??[]];if(n){const i=r.findIndex(a=>At(eo(a))===At(eo(n)));i===-1?r.push(n):r[i]=n}for(const i of r){const a=eo(i);if(typeof a=="string"){a==="experiments"&&(t.experimentsTabOpen=!0),a==="files"&&(t.filesTabOpen=!0),a==="artifacts"&&(t.artifactsTabOpen=!0),a==="terminal"&&(t.terminalTabOpen=!0);continue}"code"in a?(a.toggled=new Set((e==null?void 0:e.expanded[At(a)])??[]),t.codeTabs.push(a)):"path"in a?t.fileTabs.push(a):"kind"in a?a.kind==="plan"?t.planTabs.push(a):t.subagentTabs.push(a):t.expTabs.push(a),t.contentTabOrder.push(At(a))}const s=new Map(r.map(i=>{const a=eo(i);return[At(a),a]}));return t.tabHistory=((e==null?void 0:e.history)??[]).flatMap(i=>{const a=s.get(i);return a?[a]:[]}),t.previewTab=e!=null&&e.previewKey?s.get(e.previewKey)??null:null,t.rightTab=n?eo(n):e!=null&&e.active?eo(e.active):"experiments",t.panelOpen=n!==void 0,t.selectedRunId=(n==null?void 0:n.kind)==="experiment"?n.runId??null:null,BI(t,n)}const nw=(e,n)=>e.id===n.id&&e.view===n.view,s_=(e,n)=>e.path===n.path&&(e.source??"repo")===(n.source??"repo")&&e.sessionId===n.sessionId&&e.ref===n.ref,uS=e=>`${e.source??"repo"}:${e.sessionId??""}:${e.ref??""}:${e.path}`,Ls=(e,n,t)=>`${e}:${n??""}:${uS(t)}`,$I=e=>({...e,lineScrollRequest:void 0});function Zg(e){return typeof e=="object"&&"path"in e?$I(e):e}const Xf=(e,n)=>e.branch===n.branch;function At(e){return typeof e=="string"?`home:${e}`:"code"in e?`code:${e.branch}`:"kind"in e?e.kind==="plan"?`plan:${e.promptId}`:`subagent:${e.spawnPartId}`:"path"in e?`file:${uS(e)}`:`experiment:${e.id}:${e.view}`}function Ep(e,n){const t=e.filter(r=>At(r)!==n);return t.length===e.length?e:t}function oxn(e){return e!==void 0}function _S(e,n=!1){const t={rightTab:"experiments",tabHistory:[],experimentsTabOpen:!1,filesTabOpen:!1,artifactsTabOpen:!1,terminalTabOpen:!1,expTabs:[],fileTabs:[],planTabs:[],subagentTabs:[],codeTabs:[],contentTabOrder:[],previewTab:null,filesView:"files",filesToggled:new Set,selectedRunId:null,scope:"project",panelOpen:!1,panelMax:!1,treeViewport:null};if(e===bd&&n){const r="experiments";return{...t,rightTab:r,tabHistory:[r],experimentsTabOpen:!0,panelOpen:!0}}if(e===bb){const r=[{path:"nanochat-base-training-curves.svg",source:"artifacts"},{path:"nanochat-sft-training-curves.svg",source:"artifacts"},{path:"nanochat-training-throughput.svg",source:"artifacts"},{path:"nanochat-core-evaluation.svg",source:"artifacts"}];return{...t,rightTab:r[0],tabHistory:[...r.slice(1),r[0]],fileTabs:r,contentTabOrder:r.map(At),panelOpen:!0}}if(e===yb){const r=[{path:"nanochat-bottleneck-diagnosis.md",source:"artifacts"}];return{...t,rightTab:r[0],tabHistory:[r[0]],fileTabs:r,contentTabOrder:r.map(At),panelOpen:!0}}return t}function fS(e,n){const t=_S(e,n);return t.panelOpen?II(t,{},{}):void 0}function BI(e,n){if(!n)return e;const t=eo(n),r=At(t),s=[...e.expTabs,...e.fileTabs,...e.codeTabs,...e.planTabs,...e.subagentTabs].find(l=>At(l)===r),i=(l,u)=>{const h=l.findIndex(_=>At(_)===r);return h<0?[...l,u]:JSON.stringify(Ql(l[h]))===JSON.stringify(Ql(u))?l:l.map((_,p)=>p===h?{..._,...u}:_)},a={...e};typeof t=="string"?t==="files"?a.filesTabOpen=!0:t==="artifacts"?a.artifactsTabOpen=!0:t==="terminal"?a.terminalTabOpen=!0:a.experimentsTabOpen=!0:("path"in t?a.fileTabs=i(e.fileTabs,t):"id"in t?a.expTabs=i(e.expTabs,{...t,runId:n.kind==="experiment"?n.runId:void 0}):"code"in t?a.codeTabs=i(e.codeTabs,{...t,toggled:s&&"code"in s?s.toggled:t.toggled}):t.kind==="plan"?a.planTabs=i(e.planTabs,t):a.subagentTabs=i(e.subagentTabs,t),e.contentTabOrder.includes(r)||(a.contentTabOrder=[...e.contentTabOrder,r]));const o=e.tabHistory.at(-1);return o&&At(o)===r&&JSON.stringify(Ql(o))===JSON.stringify(Ql(t))||(a.tabHistory=[...e.tabHistory.filter(l=>At(l)!==r),t]),a}let to=0;const y0=new Map,zv=new Map,N3=new Set,z3=()=>{for(const e of N3)e()},lxn=e=>(N3.add(e),()=>{N3.delete(e)}),x0=new Map,no=new Map,PI=e=>no.get(e);function cxn(){to++,no.clear(),x0.clear(),y0.clear(),zv.clear(),z3()}function uxn(e,n){const t=no.get(e);if(!(t!=null&&t.tasks.new)||mu(t,n))return;const r=t.tasks.new,s=a=>Object.fromEntries(r.tabs.flatMap(o=>{if(o.kind!=="file")return[];const l=eo(o);if(typeof l=="string"||!("path"in l))return[];const u=Ls(e,null,l);return u in a?[[Ls(e,n,l),a[u]]]:[]})),i={...t.tasks,[n]:{...r,scroll:s(r.scroll),sourceModes:s(r.sourceModes)}};delete i.new,x0.set(e,n),no.set(e,{...t,tasks:i})}function _xn(e){let n=y0.get(e);if(!n){const t=to;n=TI(async(r,s)=>{if(t!==to)return;const i=await Upn(e,r,s);t===to&&rt.setQueryData(Vk(e).queryKey,i),t===to&&zv.delete(e)&&z3()},r=>{t===to&&(zv.set(e,r instanceof Error?r.message:String(r)),z3())}),y0.set(e,n)}return n}function rw(e,n,t,r){const s=no.get(e);if(!s||t==="new"&&x0.has(e))return;const i=Nb(n)??s.lastLocation,a=t?t==="new"?null:t:s.lastTaskId,o=t?mu(s,t):void 0;if(i===s.lastLocation&&a===s.lastTaskId&&(!r||JSON.stringify(r)===JSON.stringify(o)))return;const l={...s,lastLocation:i,lastTaskId:a,tasks:t&&r?{...s.tasks,[t]:r}:s.tasks},u=o&&r&&i===s.lastLocation&&JSON.stringify({...o,scroll:{},sourceModes:{}})===JSON.stringify({...r,scroll:{},sourceModes:{}});no.set(e,l),_xn(e).queue(l,u?250:0)}function Yz(e,n,t,r){const s=new Set(e.state.fileTabs.map(h=>Ls(t,r==="new"?null:r,h))),i=Object.fromEntries(Object.entries(e.getScroll()).filter(([h])=>s.has(h))),a=Object.fromEntries(Object.entries(e.sourceModes).filter(([h])=>s.has(h))),o=II(e.state,i,a),l=e.pane??(n==null?void 0:n.active),u=l?At(eo(l)):null;return o.active=o.tabs.find(h=>At(eo(h))===u)??null,o}function fxn(e){const{projectId:n,taskKey:t,location:r,pane:s,isTask:i,firstDemoOpen:a,state:o,apply:l,getScroll:u,sourceModes:h,revision:_}=e,p=T.useRef(Vz()),m=T.useSyncExternalStore(lxn,()=>n?zv.get(n)??null:null),[x,k]=T.useState(null),[v,b]=T.useState(0),[w,y]=T.useState(null),[C,E]=T.useState(null),N=T.useRef(null),A=T.useRef(null),j=T.useRef(null),M=T.useRef(e);M.current=e;const L=JSON.stringify([n,t,i]),I=JSON.stringify(s??null),B=T.useCallback(()=>{const U=j.current;if(!U)return;const W=Yz({...M.current,state:U.state,pane:U.pane},mu(no.get(U.projectId),U.taskKey),U.projectId,U.taskKey);rw(U.projectId,U.location,U.taskKey,W)},[]);T.useEffect(()=>{let U=!0;const W=to;if(k(null),y(null),!!n)return no.has(n)?y(n):rt.fetchQuery(Vk(n)).then(H=>{!U||W!==to||(no.set(n,H??Vz()),y(n))}).catch(H=>{U&&W===to&&k(H instanceof Error?H.message:String(H))}),()=>{U=!1}},[n,v]),T.useLayoutEffect(()=>{if(j.current&&j.current.scope!==L){const H=j.current.projectId;B(),x0.get(H)===t&&x0.delete(H),j.current=null}if(!n||w!==n)return;const U=no.get(n);if(!U)return;if(p.current=U,N.current!==L){if(N.current=L,A.current=I,i){const H=mu(U,t)??($l(n)?fS(t,a):void 0);l(axn(H,s),H,!0)}E(L);return}if(C!==L)return;let W=o;A.current!==I&&(A.current=I,i&&s&&(W=BI(o,s),l(W,void 0,!1))),i?(rw(n,r,t,Yz({state:W,pane:s,getScroll:u,sourceModes:h},mu(U,t),n,t)),j.current={projectId:n,taskKey:t,scope:L,location:r,pane:s,state:W}):rw(n,r),p.current=no.get(n)??U},[n,t,r,s,I,i,a,o,l,u,h,_,w,L,C,B]),T.useEffect(()=>{const U=to,W=Y=>{if(U===to){B();for(const te of y0.values())te.flush(Y)}},H=()=>W(!0);return window.addEventListener("pagehide",H),()=>{window.removeEventListener("pagehide",H),W(!1)}},[B]);const q=T.useCallback(()=>{var U;n&&(x?b(W=>W+1):(U=y0.get(n))==null||U.retry())},[n,x]);return{ready:n===null||w===n&&C===L,loaded:n===null||w===n,error:x??m,retry:q,capture:B,workspace:p}}const dxn="data:image/svg+xml,"+encodeURIComponent(''),j3=T.createContext(null);function hxn(e){var n;return e.kind==="local"?"local":`${e.session.id}:${((n=e.session.installPaths)==null?void 0:n.database)??""}`}function FI(){const e=T.useContext(j3);if(!e)throw new Error("Runtime is not connected");return e}function pxn(e){const n=document.querySelector('link[rel="icon"]');n&&(n.href=e?dxn:"/favicon.svg")}function Zz(e){try{return localStorage.getItem(e)!==null}catch{return!1}}function mxn(e){if(e.kind!=="ssh")return;const{theme:n,locale:t}=e.session.uiPreferences;!Zz("orx:theme")&&(n==="light"||n==="dark"||n==="system")&&GL(n),!Zz("orx:locale")&&t&&VO(t)&&qL(t)}function gxn(e){return e.includes("ssh ")&&e.includes("failed")}function Jz({host:e,overlay:n=!1}){return f.jsx("div",{className:n?"w-full max-w-2xl":"app flex h-full items-center justify-center bg-background p-6",children:f.jsxs("section",{className:"w-full max-w-2xl rounded-xl border border-border bg-background p-7 shadow-modal",children:[f.jsx("h1",{id:"remote-setup-title",className:"m-0 text-2xl font-semibold text-text",children:PD({host:Ne(e)})}),f.jsx("p",{className:"mt-2 mb-0 text-base text-text",children:J4()}),f.jsx("p",{className:"mt-2 mb-0 text-sm text-subtext",children:P2t()})]})})}function ej({runtime:e,overlay:n=!1,retriedInteractiveError:t,setRetriedInteractiveError:r}){var M,L,I;const{session:s}=e,[i,a]=T.useState(s.installPaths),[o,l]=T.useState(!1),[u,h]=T.useState(null);T.useEffect(()=>a(s.installPaths),[(M=s.installPaths)==null?void 0:M.binary,(L=s.installPaths)==null?void 0:L.database,(I=s.installPaths)==null?void 0:I.cache]);async function _(){if(i){l(!0);try{await amn(i)}catch(B){Bn(B instanceof Error?B.message:String(B),"error")}finally{l(!1)}}}async function p(B=!1){r(B?s.error:null),l(!0);try{await omn()}catch(q){Bn(q instanceof Error?q.message:String(q),"error")}finally{l(!1)}}async function m(){l(!0);try{await EL()}catch(B){Bn(B instanceof Error?B.message:String(B),"error")}finally{l(!1)}}async function x(){l(!0);try{h(await NL())}catch(B){Bn(B instanceof Error?B.message:String(B),"error")}finally{l(!1)}}async function k(){if(u){l(!0);try{await zL(u),h(null)}catch(B){h(null),Bn(B instanceof Error?B.message:String(B),"error")}finally{l(!1)}}}async function v(){l(!0);try{await lmn()}catch(B){Bn(B instanceof Error?B.message:String(B),"error")}finally{l(!1)}}const b=s.status==="applying"||o,w=s.status==="needsInstall",y=s.status==="needsUpdate",C=i&&w,E=["connecting","applying","reconnecting"].includes(s.status),N=s.status==="disconnected"&&s.error!==null&&gxn(s.error)&&t!==s.error&&!s.canStartNewHost,A=w?zwt():y?Skt():s.status==="applying"?oxt({host:Ne(s.host)}):s.status==="reconnecting"?q4t({host:Ne(s.host)}):s.status==="disconnected"?s.error?M2t({host:Ne(s.host)}):s.canStartNewHost?ewt({host:Ne(s.host)}):PD({host:Ne(s.host)}):Fxt({host:Ne(s.host)}),j=s.error??(s.canStartNewHost?K2t():w?Qwt({user:Ne(s.user??""),host:Ne(s.host)}):y?gkt({host:Ne(s.host)}):s.status==="applying"?ext():s.status==="reconnecting"?L4t():s.status==="disconnected"?y2t():Oxt());return f.jsxs(f.Fragment,{children:[f.jsx("main",{className:n?"w-full max-w-2xl":"app flex h-full items-center justify-center bg-background p-6",children:f.jsxs("section",{className:"w-full max-w-2xl rounded-xl border border-border bg-background p-7 shadow-modal",children:[f.jsxs("div",{className:"flex items-start gap-3",children:[E&&f.jsx(Rt,{className:"mt-2"}),f.jsxs("div",{className:"min-w-0 flex-1",children:[f.jsx("h1",{id:"remote-setup-title",className:"m-0 text-2xl font-semibold text-text",children:A}),!N&&f.jsx("p",{className:"mt-2 mb-0 text-base text-text",children:j})]})]}),N&&f.jsx(lS,{host:s.host,backend:"ssh",path:"/_orx/ssh/connect",onComplete:()=>void p(!0)}),C&&f.jsxs("div",{className:"mt-6 grid gap-4 border-t border-border-variant pt-5",children:[f.jsx("p",{className:"m-0 text-sm text-subtext",children:xwt()}),[["binary",owt()],["database",hwt()]].map(([B,q])=>f.jsxs("label",{className:"grid gap-1 text-sm font-medium text-subtext",children:[q,f.jsx(Qr,{value:i[B],onChange:U=>a({...i,[B]:U.target.value}),disabled:b,dir:"ltr"})]},B)),!s.error&&f.jsx("div",{className:"flex justify-end pt-1",children:f.jsx(Me,{variant:"primary",disabled:b,onClick:()=>void _(),children:b?f.jsxs(f.Fragment,{children:[f.jsx(Rt,{})," ",Dwt()]}):y?rz():ZD()})})]}),y&&i&&f.jsx("div",{className:"mt-6 flex justify-end",children:!s.error&&f.jsx(Me,{variant:"primary",disabled:b,onClick:()=>void _(),children:b?f.jsxs(f.Fragment,{children:[f.jsx(Rt,{})," ",Akt()]}):rz()})}),s.status==="disconnected"&&f.jsx("div",{className:"mt-6 flex justify-end border-t border-border-variant pt-5",children:s.canStartNewHost?f.jsxs(Me,{variant:"primary",disabled:o,onClick:()=>void v(),children:[o?f.jsx(Rt,{}):null,s.error?tz():l3t()]}):f.jsxs(Me,{variant:"primary",disabled:o,onClick:()=>void p(),children:[o?f.jsx(Rt,{}):null,tz()]})}),(s.status==="connecting"||s.status==="reconnecting")&&f.jsx("div",{className:"mt-6 flex justify-end border-t border-border-variant pt-5",children:f.jsx(Me,{disabled:o,onClick:()=>void m(),children:r3()})}),y&&s.error&&f.jsxs("div",{className:"mt-6 flex justify-end gap-2 border-t border-border-variant pt-5",children:[f.jsx(Me,{disabled:o,onClick:()=>void m(),children:r3()}),s.installPaths!==null&&(s.dashboardProtocol===null||s.dashboardProtocolvoid p(),children:[o?f.jsx(Rt,{}):null,ez()]}),s.installPaths===null&&s.dashboardProtocol!==null&&s.dashboardProtocolvoid x(),children:[o?f.jsx(Rt,{}):null,FD()]})]}),w&&s.error&&f.jsx("div",{className:"mt-6 flex justify-end",children:f.jsxs(Me,{variant:"primary",disabled:o,onClick:()=>void p(),children:[o?f.jsx(Rt,{}):null,ez()]})})]})}),u&&f.jsx(uI,{host:s.host,preview:u,currentClientAttached:!1,stopping:o,onClose:()=>{o||h(null)},onConfirm:()=>void k()})]})}function vxn({children:e}){const n=T.useRef(null);return T.useEffect(()=>{var t;return(t=n.current)==null?void 0:t.focus()},[]),f.jsx("div",{ref:n,role:"alertdialog","aria-modal":"true","aria-labelledby":"remote-setup-title",tabIndex:-1,className:"absolute inset-0 z-100 flex items-center justify-center bg-modal-backdrop p-6",children:e})}function bxn(){T.useSyncExternalStore(P9,jV),T.useEffect(()=>P9(()=>{ixn(),cxn()}),[]);const e=OW({select:x=>x.pathname==="/remote-launch"}),[n,t]=T.useState(null),[r,s]=T.useState(null),i=T.useRef(!1),a=T.useRef(!1),o=T.useRef(!1),l=T.useRef(null),[u,h]=T.useState(null),_=ft({...ygn(),enabled:!e,refetchInterval:x=>{var k;return x.state.status==="error"||((k=x.state.data)==null?void 0:k.kind)==="ssh"?2e3:!1},refetchIntervalInBackground:!0});if(T.useEffect(()=>{var v,b;if(e)return;const x=_.data;if(!x){s(((v=_.error)==null?void 0:v.message)??null);return}const k=hxn(x);TV(k),l.current!==null&&l.current!==k&&(i.current=!1,a.current=!1,o.current=!1),l.current=k,x.kind==="ssh"&&(o.current||(o.current=!0,mxn(x)),x.session.status==="connected"?(i.current=!0,a.current=!0,h(null)):x.session.status==="disconnected"&&x.session.error===null&&(a.current=!1)),t(x),s(((b=_.error)==null?void 0:b.message)??null)},[e,_.data,_.error]),T.useEffect(()=>{const x=(n==null?void 0:n.kind)==="ssh";pxn(x),x&&(!i.current||n.session.status==="disconnected"&&!n.session.error)&&(document.title="OpenResearch")},[n]),e)return f.jsxs("main",{className:"app flex h-full items-center justify-center gap-3 bg-background text-base text-text",children:[f.jsx(Rt,{})," ",k4t()]});if(!n)return f.jsx("main",{className:"app flex h-full items-center justify-center gap-3 bg-background text-base text-text",children:r?f.jsxs(f.Fragment,{children:[f.jsx("span",{children:r}),f.jsx(Me,{onClick:()=>location.reload(),children:Vs()})]}):f.jsx(Rt,{})});if(n.kind==="local")return f.jsxs(j3,{value:n,children:[f.jsx(Az,{}),f.jsx(f0,{})]},Ra()[1]);if(!(a.current&&(n.session.status!=="disconnected"||n.session.error!==null))&&n.session.status!=="connected")return r?f.jsx(Jz,{host:n.session.host}):f.jsx(ej,{runtime:n,retriedInteractiveError:u,setRetriedInteractiveError:h});const m=n.session.status!=="connected"||r!==null;return f.jsxs("div",{className:"relative h-full",children:[f.jsx("div",{className:"h-full",inert:m,children:f.jsxs(j3,{value:n,children:[f.jsx(Az,{}),f.jsx(f0,{})]},Ra()[1])}),m&&f.jsx(vxn,{children:r?f.jsx(Jz,{host:n.session.host,overlay:!0}):f.jsx(ej,{runtime:n,overlay:!0,retriedInteractiveError:u,setRetriedInteractiveError:h})})]})}const Ab=gW()({component:bxn}),dS="orx:demo-read-sessions";function HI(){try{const e=JSON.parse(sessionStorage.getItem(dS)??"[]");return new Set(Array.isArray(e)?e.filter(n=>typeof n=="string"):[])}catch{return new Set}}function yxn(e){try{const n=HI();n.add(e),sessionStorage.setItem(dS,JSON.stringify([...n]))}catch{}}function xxn(){try{sessionStorage.removeItem(dS)}catch{}}function qI(e,n){const t=U_(e.split("?")[0]);return!!(t&&(!t.sessionId||n.some(r=>r.id===t.sessionId&&r.projectId===t.projectId)))}async function wxn(e=rt){var i;const[n,t]=await Promise.all([e.fetchQuery(fm()),e.fetchQuery(v0())]),r=Nb((i=cS()??n.workspace)==null?void 0:i.lastLocation);if(!r)return"/projects";const s=U_(r.split("?")[0]);return!(s!=null&&s.projectId)||!t.some(a=>a.id===s.projectId)||s.sessionId&&!qI(r,await e.fetchQuery(Aa(s.projectId)))?"/projects":r}async function kxn(e,n=rt){var h;const[t,r]=await Promise.all([n.fetchQuery(Vk(e)),n.fetchQuery(Aa(e))]),s=PI(e)??t,i=Nb(s==null?void 0:s.lastLocation);if(i&&((h=U_(i.split("?")[0]))==null?void 0:h.projectId)===e&&qI(i,r))return i;const a=r.find(_=>!_.archived),o=$l(e)?fS(a==null?void 0:a.id,!(await n.fetchQuery(fm())).tourCompleted):void 0,l=mu(s,(a==null?void 0:a.id)??"new"),u=l?l.active:o==null?void 0:o.active;return P1(e,(a==null?void 0:a.id)??null,u)}const jv=360,Sxn=272,Cxn=380,Exn=Sxn+56;function Hp(){return Math.max(jv,window.innerWidth-Exn-Cxn)}function UI(){const e=Hp();return Math.max(jv,Math.min(480,e,Math.round(window.innerWidth*.25)))}function hS(){return f.jsxs("svg",{viewBox:"0 0 100 100","aria-hidden":"true",children:[f.jsx("rect",{width:"100",height:"100",rx:"8",fill:"#9a2036"}),f.jsx("path",{d:"M15.375 16.782v63.843a4 4 0 0 0 4 4h63.843c3.564 0 5.348-4.309 2.829-6.828L22.203 13.953c-2.52-2.52-6.828-.735-6.828 2.829",fill:"#fff"})]})}function sw(){return f.jsxs("span",{className:"wordmark inline-flex items-center gap-[0.4em] text-text [&_svg]:w-[1em] [&_svg]:h-[1em] [&_svg]:shrink-0",children:[f.jsx(hS,{}),"OpenResearch"]})}const tj="inline-flex items-center p-0.5 border-0 rounded-xs bg-none bg-transparent text-muted cursor-pointer [&:hover]:bg-surface [&:hover]:text-text";function Nxn({cmd:e,onRun:n}){const[t,r]=T.useState(!1);return f.jsxs("span",{className:"cmd-inline inline-flex items-center gap-1 align-baseline",children:[f.jsx("code",{dir:"ltr",className:"font-mono text-sm",children:e}),n&&f.jsx("button",{type:"button",className:`cmd-inline-run ${tj}`,onClick:n,"aria-label":zE({value:Ne(e)}),title:zE({value:Ne(e)}),children:f.jsx(byn,{size:11})}),f.jsx("button",{type:"button",className:`cmd-inline-copy ${tj}`,onClick:()=>{navigator.clipboard.writeText(e).then(()=>{r(!0),setTimeout(()=>r(!1),1500)}).catch(()=>{})},"aria-label":t?m0():sX({value:Ne(e)}),title:t?m0():Ok(),children:t?f.jsx(Ji,{size:11,strokeWidth:3}):f.jsx(Sb,{size:11})})]})}function eh(e,n){return e?e.split(/`([^`]+)`/).map((t,r)=>r%2===1?f.jsx(Nxn,{cmd:t,onRun:n!=null&&n.canRun(t)?()=>n.onRun(t):void 0},r):t):null}function w0({harness:e,size:n=16}){const t="block shrink-0";return e==="claude-code"?f.jsx("svg",{className:t,width:n,height:n,viewBox:"0 0 24 24",fill:"#d97757","aria-hidden":"true",children:f.jsx("path",{d:"m4.7144 15.9555 4.7174-2.6471.079-.2307-.079-.1275h-.2307l-.7893-.0486-2.6956-.0729-2.3375-.0971-2.2646-.1214-.5707-.1215-.5343-.7042.0546-.3522.4797-.3218.686.0608 1.5179.1032 2.2767.1578 1.6514.0972 2.4468.255h.3886l.0546-.1579-.1336-.0971-.1032-.0972L6.973 9.8356l-2.55-1.6879-1.3356-.9714-.7225-.4918-.3643-.4614-.1578-1.0078.6557-.7225.8803.0607.2246.0607.8925.686 1.9064 1.4754 2.4893 1.8336.3643.3035.1457-.1032.0182-.0728-.164-.2733-1.3539-2.4467-1.445-2.4893-.6435-1.032-.17-.6194c-.0607-.255-.1032-.4674-.1032-.7285L6.287.1335 6.6997 0l.9957.1336.419.3642.6192 1.4147 1.0018 2.2282 1.5543 3.0296.4553.8985.2429.8318.091.255h.1579v-.1457l.1275-1.706.2368-2.0947.2307-2.6957.0789-.7589.3764-.9107.7468-.4918.5828.2793.4797.686-.0668.4433-.2853 1.8517-.5586 2.9021-.3643 1.9429h.2125l.2429-.2429.9835-1.3053 1.6514-2.0643.7286-.8196.85-.9046.5464-.4311h1.0321l.759 1.1293-.34 1.1657-1.0625 1.3478-.8804 1.1414-1.2628 1.7-.7893 1.36.0729.1093.1882-.0183 2.8535-.607 1.5421-.2794 1.8396-.3157.8318.3886.091.3946-.3278.8075-1.967.4857-2.3072.4614-3.4364.8136-.0425.0304.0486.0607 1.5482.1457.6618.0364h1.621l3.0175.2247.7892.522.4736.6376-.079.4857-1.2142.6193-1.6393-.3886-3.825-.9107-1.3113-.3279h-.1822v.1093l1.0929 1.0686 2.0035 1.8092 2.5075 2.3314.1275.5768-.3218.4554-.34-.0486-2.2039-1.6575-.85-.7468-1.9246-1.621h-.1275v.17l.4432.6496 2.3436 3.5214.1214 1.0807-.17.3521-.6071.2125-.6679-.1214-1.3721-1.9246L14.38 17.959l-1.1414-1.9428-.1397.079-.674 7.2552-.3156.3703-.7286.2793-.6071-.4614-.3218-.7468.3218-1.4753.3886-1.9246.3157-1.53.2853-1.9004.17-.6314-.0121-.0425-.1397.0182-1.4328 1.9672-2.1796 2.9446-1.7243 1.8456-.4128.164-.7164-.3704.0667-.6618.4008-.5889 2.386-3.0357 1.4389-1.882.929-1.0868-.0062-.1579h-.0546l-6.3385 4.1164-1.1293.1457-.4857-.4554.0608-.7467.2307-.2429 1.9064-1.3114Z"})}):e==="opencode"?f.jsx("svg",{className:t,width:n,height:n,viewBox:"0 0 24 24",fill:"currentColor","aria-hidden":"true",children:f.jsx("path",{d:"M22 24H2V0h20zM17 4.8H7v14.4h10z"})}):e==="cursor"?f.jsxs("svg",{className:t,width:n,height:n,viewBox:"388 395 191 191",fill:"none","aria-hidden":"true",children:[f.jsx("path",{fill:"#72716D",d:"M483.395 490.5L566 538.297C565.493 539.178 564.757 539.93 563.845 540.456L486.636 585.13C484.632 586.29 482.159 586.29 480.154 585.13L402.945 540.456C402.034 539.93 401.297 539.178 400.79 538.297L483.395 490.5Z"}),f.jsx("path",{fill:"#55544F",d:"M483.395 395V490.5L400.79 538.297C400.282 537.416 400 536.398 400 535.346V445.654C400 443.545 401.122 441.6 402.945 440.544L480.15 395.87C481.154 395.29 482.273 395 483.391 395H483.395Z"}),f.jsx("path",{fill:"#43413C",d:"M565.996 442.703C565.489 441.822 564.752 441.07 563.841 440.544L486.632 395.87C485.632 395.29 484.513 395 483.395 395V490.5L566 538.297C566.507 537.416 566.789 536.398 566.789 535.346V445.654C566.789 444.598 566.511 443.588 566 442.703H565.996Z"}),f.jsx("path",{fill:"#D6D5D2",d:"M560.218 446.049C560.686 446.858 560.751 447.896 560.218 448.82L485.235 578.974C484.732 579.855 483.392 579.493 483.392 578.479V492.713C483.392 492.029 483.209 491.37 482.877 490.794L560.215 446.045H560.218V446.049Z"}),f.jsx("path",{fill:"#FFFFFF",d:"M560.218 446.049L482.88 490.797C482.552 490.224 482.073 489.737 481.48 489.394L407.369 446.511C406.49 446.006 406.851 444.663 407.862 444.663H557.824C558.889 444.663 559.754 445.239 560.218 446.049Z"})]}):e==="antigravity"?f.jsx("svg",{className:t,width:n,height:n,viewBox:"13 18 85 80",fill:"#3186FF","aria-hidden":"true",children:f.jsx("path",{d:"M89.6992 93.695C94.3659 97.195 101.366 94.8617 94.9492 88.445C75.6992 69.7783 79.7825 18.445 55.8659 18.445C31.9492 18.445 36.0325 69.7783 16.7825 88.445C9.78251 95.445 17.3658 97.195 22.0325 93.695C40.1159 81.445 38.9492 59.8617 55.8659 59.8617C72.7825 59.8617 71.6159 81.445 89.6992 93.695Z"})}):f.jsx("svg",{className:t,width:n,height:n,viewBox:"146 227 268 265",fill:"currentColor","aria-hidden":"true",children:f.jsx("path",{d:"M249.176 323.434V298.276C249.176 296.158 249.971 294.569 251.825 293.509L302.406 264.381C309.29 260.409 317.5 258.555 325.973 258.555C357.75 258.555 377.877 283.185 377.877 309.399C377.877 311.253 377.877 313.371 377.611 315.49L325.178 284.771C322.001 282.919 318.822 282.919 315.645 284.771L249.176 323.434ZM367.283 421.415V361.301C367.283 357.592 365.694 354.945 362.516 353.092L296.048 314.43L317.763 301.982C319.617 300.925 321.206 300.925 323.058 301.982L373.639 331.112C388.205 339.586 398.003 357.592 398.003 375.069C398.003 395.195 386.087 413.733 367.283 421.412V421.415ZM233.553 368.452L211.838 355.742C209.986 354.684 209.19 353.095 209.19 350.975V292.718C209.19 264.383 230.905 242.932 260.301 242.932C271.423 242.932 281.748 246.641 290.49 253.26L238.321 283.449C235.146 285.303 233.555 287.951 233.555 291.659V368.455L233.553 368.452ZM280.292 395.462L249.176 377.985V340.913L280.292 323.436L311.407 340.913V377.985L280.292 395.462ZM300.286 475.968C289.163 475.968 278.837 472.259 270.097 465.64L322.264 435.449C325.441 433.597 327.03 430.949 327.03 427.239V350.445L349.011 363.155C350.865 364.213 351.66 365.802 351.66 367.922V426.179C351.66 454.514 329.679 475.965 300.286 475.965V475.968ZM237.525 416.915L186.944 387.785C172.378 379.31 162.582 361.305 162.582 343.827C162.582 323.436 174.763 305.164 193.563 297.485V357.861C193.563 361.571 195.154 364.217 198.33 366.071L264.535 404.467L242.82 416.915C240.967 417.972 239.377 417.972 237.525 416.915ZM234.614 460.343C204.689 460.343 182.71 437.833 182.71 410.028C182.71 407.91 182.976 405.792 183.238 403.672L235.405 433.863C238.582 435.715 241.763 435.715 244.938 433.863L311.407 395.466V420.622C311.407 422.742 310.612 424.331 308.758 425.389L258.179 454.519C251.293 458.491 243.083 460.343 234.611 460.343H234.614ZM300.286 491.854C332.329 491.854 359.073 469.082 365.167 438.892C394.825 431.211 413.892 403.406 413.892 375.073C413.892 356.535 405.948 338.529 391.648 325.552C392.972 319.991 393.766 314.43 393.766 308.87C393.766 271.003 363.048 242.666 327.562 242.666C320.413 242.666 313.528 243.723 306.644 246.109C294.725 234.457 278.307 227.042 260.301 227.042C228.258 227.042 201.513 249.815 195.42 280.004C165.761 287.685 146.694 315.49 146.694 343.824C146.694 362.362 154.638 380.368 168.938 393.344C167.613 398.906 166.819 404.467 166.819 410.027C166.819 447.894 197.538 476.231 233.024 476.231C240.172 476.231 247.058 475.173 253.943 472.788C265.859 484.441 282.278 491.854 300.286 491.854Z"})})}function T3(e){return!e.installed||e.installBroken?"install":e.authState==="unsupported"&&!e.needsConfigRepair?"update":"login"}function zxn(e,n){return e.needsConfigRepair?"error":n==="login"?"running":"preview"}function nj(e,n){return n||e==="preview"}function jxn(e,n){if(!e||e.needsConfigRepair)return null;const t=T3(e);return t===n?null:t}function GI({harness:e,commands:n,onReady:t,onClose:r}){const s=T.useRef(null),i=T.useRef(!1),[a,o]=T.useState(()=>T3(e)),[l,u]=T.useState(0),[h,_]=T.useState(()=>zxn(e,T3(e))),[p,m]=T.useState(h==="running"),[x,k]=T.useState(e.needsConfigRepair),[v,b]=T.useState(e.needsConfigRepair?e.agentNote??null:null),w=h==="running"||h==="checking",y=n[a].includes(` +`)?void 0:n[a];T.useEffect(()=>{i.current=!1;const E=s.current;return E==null||E.showModal(),()=>{i.current=!0,E==null||E.close()}},[]);const C=async()=>{_("checking"),b(null);try{const E=await Xd(!0,!0);if(i.current)return;const N=E.find(A=>A.id===e.id);if(k((N==null?void 0:N.needsConfigRepair)??!1),N!=null&&N.agentReady&&(a!=="login"||N.authenticated))t==null||t(N),_("success"),e.id==="antigravity"&&a==="login"&&r();else if(a!=="login"&&(N!=null&&N.installed)&&!N.installBroken&&!N.needsConfigRepair&&N.authState==="needsLogin")o("login"),m(!0),_("running");else{const A=jxn(N,a);A&&(o(A),m(!1)),b((N==null?void 0:N.agentNote)??kD()),_("error")}}catch(E){if(i.current)return;b(E instanceof Error?E.message:String(E)),_("error")}};return f.jsxs("dialog",{ref:s,className:"m-auto w-180 max-w-[calc(100vw_-_40px)] max-h-[calc(100vh_-_40px)] overflow-y-auto rounded-xl border border-border bg-background p-5 text-text shadow-modal backdrop:bg-modal-backdrop-light","aria-labelledby":"harness-setup-title",onKeyDown:E=>{E.key==="Escape"&&w&&E.preventDefault()},onCancel:E=>{E.preventDefault(),w||r()},children:[f.jsxs("div",{className:"flex items-center gap-3",children:[f.jsx(w0,{harness:e.id,size:26}),f.jsx("h2",{id:"harness-setup-title",className:"m-0 text-xl font-medium",children:SN({agent:e.name})})]}),h==="preview"?f.jsx("p",{className:"my-4 text-sm text-subtext",children:a==="install"?mUe({agent:e.name}):wGe({agent:e.name})}):y&&nj(h,p)?f.jsx("p",{className:"my-4 text-sm text-subtext [&_.cmd-inline]:mx-2 [&_.cmd-inline]:gap-2",children:eh(nGe({command:y}))}):null,h!=="running"&&h!=="preview"&&f.jsxs("p",{className:"my-4 flex items-center gap-2 text-sm",role:"status",children:[h==="checking"&&f.jsx(Rt,{}),h==="success"?Xqe({agent:e.name}):h==="error"?xD():qqe()]}),a==="install"&&n.requiresNpm&&f.jsx("p",{className:"text-sm text-subtext",children:QUe()}),nj(h,p)&&f.jsx(jb,{path:`/api/harnesses/setup?${new URLSearchParams({harness:e.id,action:a})}`,label:SN({agent:e.name}),command:y,heightClass:"h-96",active:h==="running",awaitingApproval:h==="preview",onComplete:E=>typeof E!="object"||E===null||!("type"in E)||E.type!=="complete"?!1:(C(),!0),onError:E=>{b(E),_("error")}},`${a}-${l}`),v&&f.jsx("p",{role:"alert",className:"text-sm text-accent-red",children:eh(v)}),f.jsxs("div",{className:"mt-5 flex justify-end gap-2",children:[h==="error"&&f.jsx(Me,{variant:"ghost",onClick:()=>{b(null),C()},children:gv()}),h==="error"&&!x&&f.jsx(Me,{onClick:()=>{b(null),m(!0),_("running"),u(E=>E+1)},children:Vs()}),f.jsx(Me,{variant:h==="success"?"primary":"default",onClick:r,children:h==="success"?hL():w?Lqe():p0()}),h==="preview"&&f.jsx(Me,{variant:"primary",onClick:()=>{m(!0),_("running")},children:jqe()})]})]})}const Txn={header:"min-w-0 flex-1 overflow-hidden text-ellipsis whitespace-nowrap text-base font-semibold text-text",list:"text-sm font-medium text-text"};function k0({variant:e="list",className:n,...t}){return f.jsx("span",{className:vs("title",Txn[e],n),...t})}const rj=["onb-gate-hint text-base font-medium leading-normal text-text","onb-agent-hint mt-0 mx-0 mb-2.5"].join(" "),O_=["onb-card-meta text-sm text-subtext [&_code]:font-mono","[&_code]:text-xs [&_code]:bg-panel","[&_code]:border [&_code]:border-border-variant [&_code]:rounded-xs","[&_code]:py-px [&_code]:px-[5px] [&_code]:whitespace-nowrap"].join(" "),iw=["onb-gate-hint mt-4.5 mx-0 mb-0 text-base font-medium leading-normal","text-text onb-git-hint mt-2"].join(" "),VI=["onb-card flex flex-col gap-[5px] bg-background","border border-border rounded-lg py-4.5 px-5"].join(" "),Axn=["onb-gate-hint mt-4.5 mx-0 mb-0 text-base font-medium leading-normal","text-text"].join(" "),Rxn=[{id:"AI/ML",label:bit},{id:"Biology",label:Eit},{id:"Physics",label:Pit},{id:"Other",label:Mit}],Mxn=["welcome","environment","profile"];function Oxn({onDone:e,preferredAgent:n,remote:t}){var mt;const r=hn({mutationFn:we=>Kpn(...we)}),[s,i]=T.useState(0);T.useEffect(()=>{const we=Mxn[s];we&&eu({name:"onboarding_step_viewed",step:we})},[s]);const a=ft(yu()),o=ft(Zp()),l=ft(LL()),[u,h]=T.useState(null),[_,p]=T.useState(!1),m=T.useRef(null),x=T.useRef(""),k=T.useRef(null),v=T.useRef(!1);T.useEffect(()=>()=>{var we;return(we=m.current)==null?void 0:we.close()},[]);const b=a.data??null,w=(mt=o.data)==null?void 0:mt.gitVersion,[y,C]=T.useState(!1),[E,N]=T.useState(null),[A,j]=T.useState(""),[M,L]=T.useState(null),[I,B]=T.useState(!1),[q,U]=T.useState([]),[W,H]=T.useState(""),[Y,te]=T.useState(""),[$,D]=T.useState([]),[F,G]=T.useState(""),[V,ee]=T.useState([]),[ce,ae]=T.useState(!1),re=T.useRef(0),[X,oe]=T.useState(!1),[le,_e]=T.useState(!1),pe=(b==null?void 0:b.some(we=>we.agentReady))??!1,Ee=w!=null,Ie=T.useRef(0),ze=(we,ct=!1)=>{const ye=++Ie.current;B(!0),oe(!1),_e(!1);const je=()=>ye===Ie.current;Promise.allSettled([Xd(we,ct),rt.fetchQuery({...Zp(),staleTime:we?0:3e4})]).then(([qe,at])=>{je()&&(qe.status==="rejected"&&oe(!0),at.status==="rejected"&&_e(!0))}).finally(()=>je()&&B(!1))};T.useEffect(()=>ze(!1),[]),T.useEffect(()=>{if(b===null)return;const we=b.filter(ct=>ct.agentReady);L(ct=>{var je;if(ct&&we.some(qe=>qe.id===ct))return ct;const ye=n&&we.find(qe=>qe.id===n.harness);return(ye==null?void 0:ye.id)??((je=we[0])==null?void 0:je.id)??null})},[b,n]),T.useEffect(()=>oe(a.isError),[a.isError,a.dataUpdatedAt]),T.useEffect(()=>_e(o.isError),[o.isError,o.dataUpdatedAt]),T.useEffect(()=>{rt.fetchQuery(wgn()).then(we=>{U(we.researchAreas),H(we.otherArea??""),te(we.background??""),D(we.papers)}).catch(()=>{})},[]),T.useEffect(()=>{const we=F.trim();if(we.length<3){ee([]),ae(!1);return}const ct=++re.current;ae(!0);const ye=setTimeout(()=>{rt.fetchQuery(HL(we)).then(je=>ct===re.current&&ee(je)).catch(()=>ct===re.current&&ee([])).finally(()=>ct===re.current&&ae(!1))},350);return()=>clearTimeout(ye)},[F]);const He=we=>{const ct=$.some(ye=>ye.paperId===we.paperId);D(ye=>ye.some(je=>je.paperId===we.paperId)?ye:[...ye,{paperId:we.paperId,title:sj(we.title)}]),G(""),ee([]),ct||rt.fetchQuery(y3(we.paperId)).then(ye=>{var qe;const je=(qe=ye.title)==null?void 0:qe.trim();je&&D(at=>at.map(nt=>nt.paperId===we.paperId?{...nt,title:je}:nt))}).catch(()=>{})},Oe=we=>D(ct=>ct.filter(ye=>ye.paperId!==we)),Xe=we=>{U(ct=>ct.includes(we)?ct.filter(ye=>ye!==we):[...ct,we])},_t=q.length>0&&(!q.includes("Other")||W.trim().length>0),Vt=()=>{if(k.current)return k.current;x.current="",v.current=!0,p(!0);const we=(async()=>{await new Promise((je,qe)=>{const at=location.protocol==="https:"?"wss:":"ws:",nt=new WebSocket(`${at}//${location.host}/api/harnesses/setup?harness=opencode&action=install&trigger=automatic`);nt.binaryType="arraybuffer";const Kt=new TextDecoder,Qe=new RI.Terminal;Qe.onData(Tt=>{nt.readyState===WebSocket.OPEN&&nt.send(new TextEncoder().encode(Tt))}),m.current=nt;let kt=!1;nt.onmessage=Tt=>{if(Tt.data instanceof ArrayBuffer){Qe.write(new Uint8Array(Tt.data)),x.current=(x.current+Kt.decode(Tt.data,{stream:!0})).slice(-65536);return}if(typeof Tt.data!="string")return;let Yt;try{Yt=JSON.parse(Tt.data)}catch{return}typeof Yt!="object"||Yt===null||!("type"in Yt)||(Yt.type==="complete"?(kt=!0,nt.close(),je()):Yt.type==="error"&&(nt.close(),qe(new Error("error"in Yt&&typeof Yt.error=="string"?Yt.error:xD()))))},nt.onerror=()=>{nt.close(),qe(new Error(bv()))},nt.onclose=()=>{Qe.dispose(),m.current=null,kt||qe(new Error(bv()))}});const ye=(await Xd(!0,!0)).find(je=>je.id==="opencode"&&je.agentReady);if(!ye)throw new Error(xct());return L("opencode"),ye})();return k.current=we,we.catch(()=>{}),we};T.useEffect(()=>{t||v.current||!(b!=null&&b.length)||!b.every(we=>!we.installed&&!we.installBroken)||Vt()},[b,t]),T.useEffect(()=>{s===1&&_&&i(2)},[s,_]);const $t=()=>{i(_?2:1)},jt=async(we="complete")=>{var ct;if(!(y||we==="complete"&&(!_t||!Ee))){C(!0),N(null),j("");try{const ye=_?await Vt():b==null?void 0:b.find(at=>at.id===M&&at.agentReady);if(!ye)throw new Error(kD());if(we==="setup")return;const je=Lxn(ye,((ct=ye.models[0])==null?void 0:ct.id)??null),qe=await r.mutateAsync([je,{researchAreas:q,otherArea:q.includes("Other")?W:null,background:Y||null,papers:$}]);e(qe.project,qe.selection)}catch(ye){_&&(k.current=null);const je=ye instanceof Error?ye.message:String(ye);N(je),j([x.current,je].filter(Boolean).join(` -`))}finally{C(!1)}}};return f.jsxs("div",{className:`home flex-1 min-h-0 overflow-y-auto [scrollbar-gutter:stable_both-edges] bg-canvas onboarding ${s===0?"[&_.home-inner]:max-w-300 [&_.home-inner]:pt-0 [&_.home-inner]:pb-0":"[&_.home-inner]:max-w-140 [&_.home-inner]:pt-24"}`,children:[!t&&u&&l.data&&f.jsx(qI,{harness:u,commands:l.data[u.id],onReady:we=>{D(we.id)},onClose:()=>{h(null)}}),f.jsx("div",{className:`home-inner max-w-155 my-0 mx-auto ${s===0?"px-8 sm:px-12":"pt-12 px-6 pb-16"}`,children:s===0?f.jsxs("div",{className:"onb-intro relative flex min-h-dvh flex-col justify-center gap-4 py-12 min-[1120px]:grid min-[1120px]:grid-cols-[minmax(0,_1.1fr)_minmax(28rem,_1fr)] min-[1120px]:grid-rows-[auto_auto] min-[1120px]:content-center min-[1120px]:gap-x-20 min-[1120px]:gap-y-10",children:[f.jsxs("div",{className:"onb-intro-copy relative z-10 min-[1120px]:col-start-1 min-[1120px]:row-start-1 min-[1120px]:self-start",children:[f.jsx("div",{className:"onb-intro-brand mb-10 text-6xl font-semibold leading-none tracking-[-0.035em]",children:f.jsx(sw,{})}),f.jsx("h2",{className:"onb-title mt-0 mx-0 text-4xl font-medium leading-[1.08] tracking-[-0.035em]",children:Zst()})]}),f.jsxs("div",{className:"onb-intro-features relative min-[1120px]:col-start-2 min-[1120px]:row-start-1 min-[1120px]:self-end",children:[f.jsx("div",{"aria-hidden":"true",className:"absolute -inset-14 rounded-full bg-primary-subtle opacity-70 blur-3xl"}),f.jsxs("ul",{className:"onb-intro-list relative flex flex-col gap-4 m-0 p-0 list-none",children:[f.jsx("li",{className:"rounded-2xl border border-border bg-background p-6 shadow-card",children:f.jsxs("span",{children:[f.jsx("strong",{className:"mb-1.5 block text-xl font-semibold tracking-[-0.015em]",children:oot()}),f.jsx("span",{className:"block text-lg leading-[1.55] text-text",children:tft()})]})}),f.jsx("li",{className:"rounded-2xl border border-border bg-background p-6 shadow-card",children:f.jsxs("span",{children:[f.jsx("strong",{className:"mb-1.5 block text-xl font-semibold tracking-[-0.015em]",children:hlt()}),f.jsx("span",{className:"block text-lg leading-[1.55] text-text",children:y_t()})]})}),f.jsx("li",{className:"rounded-2xl border border-border bg-background p-6 shadow-card",children:f.jsxs("span",{children:[f.jsx("strong",{className:"mb-1.5 block text-xl font-semibold tracking-[-0.015em]",children:Wot()}),f.jsx("span",{className:"block text-lg leading-[1.55] text-text",children:qft()})]})})]})]}),f.jsx("div",{className:"onb-intro-actions relative z-10 mt-8 flex justify-end min-[1120px]:col-start-2 min-[1120px]:row-start-2 min-[1120px]:mt-0 min-[1120px]:self-start",children:f.jsxs(Me,{variant:"primary",size:"large",onClick:$t,disabled:I&&b===null,children:[I&&b===null?f.jsx(Rt,{}):null,UN()," ",f.jsx(B1,{size:20})]})})]}):s===1?f.jsxs(f.Fragment,{children:[f.jsxs("div",{className:"onb-eyebrow mb-4.5 flex items-center gap-2 text-xl font-medium text-muted",children:[f.jsx(sw,{}),f.jsx("span",{children:N_t()})]}),f.jsx("h2",{className:"onb-title mt-0 mx-0 mb-1.5 text-3xl tracking-[-0.01em]",children:bat()}),f.jsx("p",{className:"onb-sub text-text text-base leading-[1.55] mt-0 mx-0 mb-5.5 max-w-120",children:dct()}),b!==null&&!pe&&f.jsx("p",{className:rj,children:a_t()}),b!==null&&pe&&M===null&&f.jsx("p",{className:rj,children:Eat()}),(w===null||le)&&f.jsxs("div",{className:"onb-git-check mt-7",role:"status","aria-live":"polite",children:[f.jsx(ij,{gitVersion:w,error:le}),le?f.jsx("p",{className:iw,children:V2()}):f.jsx("p",{className:iw,children:GN()})]}),f.jsx("div",{className:"onb-cards flex flex-col gap-3.5",children:b!==null?b.map(we=>{var ct;return f.jsx(exn,{h:we,remote:t,selected:M===we.id,onSelect:()=>D(we.id),commands:(ct=l.data)==null?void 0:ct[we.id],onSetup:()=>h(we)},we.id)}):X?f.jsx("div",{className:O_,children:V2()}):f.jsxs(os,{className:"py-2",children:[f.jsx(Rt,{})," ",Not()]})}),l.isError&&f.jsxs("p",{className:O_,children:[xUe()," ",f.jsx(Me,{variant:"ghost",onClick:()=>void l.refetch(),children:Vs()})]}),f.jsxs("div",{className:"onb-actions flex items-center gap-2.5 mt-5.5",children:[f.jsxs(Me,{variant:"ghost",onClick:()=>i(0),children:[f.jsx(b0,{size:12})," ",qN()]}),f.jsxs(Me,{variant:"ghost",onClick:()=>ze(!0,!0),disabled:I,children:[f.jsx(La,{size:12,className:I?"animate-[spin_0.9s_linear_infinite]":""})," ",gv()]}),f.jsx("div",{className:"flex-1"}),f.jsxs(Me,{variant:"primary",onClick:()=>i(2),disabled:I||!pe||M===null||!Ee,title:I?jft():pe?M===null?eot():le?Vct():w===void 0?wft():w===null?zlt():void 0:Jut(),children:[UN()," ",f.jsx(B1,{size:13})]})]})]}):f.jsxs(f.Fragment,{children:[f.jsxs("div",{className:"onb-eyebrow mb-4.5 flex items-center gap-2 text-xl font-medium text-muted",children:[f.jsx(sw,{}),!_&&f.jsx("span",{children:O_t()})]}),f.jsx("h2",{className:"onb-title mt-0 mx-0 mb-1.5 text-3xl tracking-[-0.01em] onb-profile-title mb-5.5",children:F_t()}),f.jsx("div",{className:"onb-cards flex flex-col gap-2.5",children:f.jsxs("div",{className:UI,children:[f.jsxs("fieldset",{className:"onb-fieldset border-0 mt-0 mx-0 mb-4.5 p-0 [&_legend]:text-base [&_legend]:font-medium [&_legend]:mb-1.5",children:[f.jsx("legend",{children:Lft()}),f.jsx("p",{className:"onb-field-hint text-muted text-sm leading-[1.4] mt-0 mx-0 mb-2",children:Kat()}),f.jsx("div",{className:"onb-area-options grid grid-cols-[repeat(2,_minmax(0,_1fr))] gap-2",children:Wyn.map(we=>f.jsxs("label",{className:"onb-area-option flex items-center gap-2 border border-border rounded-md cursor-pointer py-[9px] px-2.5 [&:has(input:checked)]:border-accent [&:has(input:checked)]:bg-primary-subtle [&_input]:m-0",children:[f.jsx("input",{type:"checkbox",checked:U.includes(we.id),onChange:()=>Xe(we.id),disabled:y}),f.jsx("span",{children:we.label()})]},we.id))}),U.includes("Other")&&f.jsx("input",{className:"onb-other-area w-full mt-2",value:W,onChange:we=>H(we.target.value),disabled:y,placeholder:W_t(),"aria-label":Nct()})]}),f.jsx("label",{className:"onb-field-label text-base font-medium mb-1.5",htmlFor:"onb-background",children:aut()}),f.jsx("textarea",{id:"onb-background",className:"onb-textarea w-full resize-y min-h-19.5 leading-normal text-base mb-3.5",value:Y,onChange:we=>te(we.target.value),disabled:y,rows:4,placeholder:Oot()}),f.jsx("label",{className:"onb-field-label text-base font-medium mb-1.5",htmlFor:"onb-paper-search",children:Jct()}),f.jsx("p",{className:"onb-field-hint text-muted text-sm leading-[1.4] mt-0 mx-0 mb-2",children:iit()}),f.jsxs("div",{className:"onb-paper-search flex flex-col gap-1.5 mt-3 [&_input]:w-full",children:[f.jsx("input",{id:"onb-paper-search",value:F,onChange:we=>G(we.target.value),disabled:y,placeholder:but()}),ce?f.jsx("div",{className:O_,children:Eut()}):V.length>0?f.jsx("div",{className:"onb-paper-results flex flex-col border border-border rounded-md max-h-50 overflow-y-auto [&_button]:flex [&_button]:flex-col [&_button]:items-start [&_button]:gap-0.5 [&_button]:py-2 [&_button]:px-2.5 [&_button]:bg-none [&_button]:bg-transparent [&_button]:border-0 [&_button]:border-b [&_button]:border-b-border-variant [&_button]:text-start [&_button]:[font:inherit] [&_button]:text-text [&_button]:cursor-pointer [&_button:last-child]:border-b-0 [&_button:hover]:bg-surface [&_.title]:text-sm [&_.title]:font-medium [&_.id]:text-xs [&_.id]:text-muted",children:V.map(we=>f.jsxs("button",{type:"button",onClick:()=>He(we),disabled:y,children:[f.jsx(k0,{children:sj(we.title)}),f.jsx("span",{className:"id",children:we.paperId})]},we.paperId))}):null]}),$.length>0&&f.jsx("div",{className:"onb-paper-chips flex flex-wrap gap-1.5 mt-2.5",children:$.map(we=>f.jsxs("span",{className:"onb-paper-chip inline-flex items-center gap-1.5 pt-1 pe-1 pb-1 ps-2.5 border border-border rounded-sm bg-surface text-sm max-w-full [&_.title]:font-medium [&_.title]:overflow-hidden [&_.title]:text-ellipsis [&_.title]:whitespace-nowrap [&_.title]:max-w-60 [&_.id]:text-xs [&_.id]:text-muted [&_button]:inline-flex [&_button]:items-center [&_button]:justify-center [&_button]:p-0.5 [&_button]:border-0 [&_button]:bg-none [&_button]:bg-transparent [&_button]:text-muted [&_button]:cursor-pointer [&_button]:rounded-xs [&_button:hover]:text-text [&_button:hover]:bg-panel",children:[f.jsx(k0,{children:we.title||we.paperId}),f.jsx("span",{className:"id",children:we.paperId}),f.jsx("button",{type:"button","aria-label":mZ({name:Ne(we.paperId)}),onClick:()=>Oe(we.paperId),disabled:y,children:f.jsx(_r,{size:12})})]},we.paperId))})]})}),!_t&&f.jsx("p",{className:"onb-profile-hint text-accent-red text-sm mt-2 mx-0 mb-0",children:U.length===0?Pat():yot()}),_&&!Ee&&f.jsxs("div",{className:"mt-5",role:"status",children:[f.jsx(ij,{gitVersion:w,error:le}),f.jsx("p",{className:iw,children:le?V2():GN()}),f.jsx(Me,{onClick:()=>ze(!0,!0),disabled:I,children:gv()})]}),f.jsxs("div",{className:"onb-actions flex items-center gap-2.5 mt-5.5",children:[f.jsxs(Me,{variant:"ghost",onClick:()=>i(_?0:1),disabled:y,children:[f.jsx(b0,{size:12})," ",qN()]}),f.jsx("div",{className:"flex-1"}),f.jsx(Me,{variant:"primary",onClick:()=>void jt(),disabled:y||!Ee||!_&&M===null||!_t,children:y?f.jsxs(f.Fragment,{children:[f.jsx(Rt,{})," ",Vut()]}):f.jsxs(f.Fragment,{children:[tlt()," ",f.jsx(B1,{size:13})]})})]}),M===null&&!_&&f.jsx("p",{className:Kyn,children:Xft()}),N&&f.jsxs("div",{role:"alert",className:"mt-8 grid grid-cols-[auto_minmax(0,1fr)_auto] items-center gap-2.5 rounded-md border border-danger-notice-border bg-accent-red-subtle px-3 py-2",children:[f.jsx(Zk,{size:16,className:"shrink-0 text-accent-red"}),f.jsx("p",{className:"m-0 min-w-0 flex-1 text-sm text-text break-words",children:N}),_&&f.jsx(Me,{size:"small",onClick:()=>void jt(_t&&Ee?"complete":"setup"),disabled:y,children:Vs()}),_&&f.jsx(Me,{variant:"ghost",size:"small",className:"col-start-2 justify-self-start",disabled:y,onClick:()=>{p(!1),E(null),i(1)},children:Mat()}),f.jsxs("details",{className:"col-start-2 col-span-2 min-w-0 text-sm text-text",children:[f.jsx("summary",{className:"cursor-pointer",children:Fot()}),f.jsx("pre",{className:"mt-2 mb-0 max-h-48 overflow-auto whitespace-pre-wrap break-words rounded-md border border-danger-notice-border bg-background px-2 py-1.5 font-mono text-xs",children:T||N})]})]})]})})]})}function sj(e){return e.replace(/^\[[^\]]*\]\s*/,"").replace(/\s*[-–|]\s*arXiv\s*$/i,"")}function Yyn(e){return e.agentReady?{tone:"success",label:e.authMethod==="local"||!e.authenticated?Lk():d_t()}:e.installed?e.installBroken?{tone:"warning",label:xlt()}:e.authMethod==="local"?{tone:"warning",label:AD()}:e.needsConfigRepair||e.authState==="unknown"?{tone:"warning",label:lft()}:e.authState==="unsupported"?{tone:"warning",label:pft()}:e.installed?{tone:"warning",label:TD()}:{tone:"neutral",label:VN()}:{tone:"neutral",label:VN()}}function Zyn(e,n){var t;return{harness:e.id,model:n,permissionMode:((t=e.options)==null?void 0:t.defaultPermissionMode)??null,reasoningLevel:wb(e,n).defaultId}}function Jyn({harness:e}){return f.jsx(w0,{harness:e,size:26})}function exn({h:e,remote:n,selected:t,onSelect:r,commands:s,onSetup:i}){var x;const a=!n&&!e.needsConfigRepair&&(!e.installed||e.installBroken||e.authState==="unsupported"||e.authMethod!=="local"&&e.authMethod!=="apiKey"&&(e.authState==="needsLogin"||e.authState==="unknown")),o=!e.agentReady&&a,l=a&&(!e.installed||!e.agentReady&&e.authState==="needsLogin"),u=Yyn(e),h=t?{tone:"success",label:Mut()}:u,_=(x=e.version)==null?void 0:x.replace(/\s*\(.*\)$/,""),p=[e.id==="opencode"&&e.account!=="opencode"&&e.account,e.id==="opencode"&&e.plan].filter(Boolean).join(" · "),m=f.jsxs("div",{className:"onb-card-head flex flex-wrap items-center justify-between gap-3",children:[f.jsxs("span",{className:"onb-card-identity flex items-center gap-3 min-w-0",children:[f.jsx(Jyn,{harness:e.id}),f.jsxs("span",{className:"flex flex-col gap-1",children:[f.jsxs("span",{className:"onb-card-name flex flex-wrap items-center gap-2 text-base font-semibold tracking-[-0.01em]",children:[e.name,l&&f.jsx(yd,{tone:u.tone,className:"font-normal",children:u.label})]}),o&&!l&&f.jsx(yd,{tone:h.tone,children:h.label})]})]}),o?f.jsxs(Me,{size:"small",onClick:i,disabled:!s,"aria-haspopup":"dialog",title:PUe(),children:[f.jsx(co,{size:14}),!e.installed||e.installBroken?oUe():e.authState==="unsupported"?dGe():wD()]}):f.jsx(yd,{tone:h.tone,children:h.label})]});return e.agentReady?f.jsxs("button",{type:"button",className:`onb-card flex flex-col gap-2.5 bg-background border border-border rounded-lg py-4 px-4 onb-agent-choice w-full text-inherit [font:inherit] text-start transition-[border-color,box-shadow] duration-120 ease-standard [button&]:cursor-pointer [button&:hover]:border-muted [&.selected]:border-accent [&.selected]:shadow-selected${t?" selected":""}`,"aria-pressed":t,onClick:r,children:[m,e.id!=="opencode"&&f.jsx("div",{className:"onb-card-detail flex items-center gap-1.5 text-sm",children:e.accountLoading?f.jsxs(f.Fragment,{children:[f.jsx(Rt,{})," ",Dlt()]}):f.jsxs(f.Fragment,{children:[e.account??(e.authMethod==="apiKey"?Dk():null),e.plan?` · ${e.plan}`:""]})}),p&&f.jsx("div",{className:O_,children:p})]}):f.jsxs("div",{className:"onb-card flex flex-col gap-2.5 bg-background border border-border rounded-lg py-4 px-4 onb-agent-choice w-full text-inherit [font:inherit] text-start transition-[border-color,box-shadow] duration-120 ease-standard [button&]:cursor-pointer [button&:hover]:border-muted [&.selected]:border-accent [&.selected]:shadow-selected",children:[m,e.authState==="unsupported"&&_&&f.jsx("div",{className:O_,children:_}),!o&&e.agentNote&&f.jsx("div",{className:`${O_} [&_code]:whitespace-pre-wrap break-words`,children:eh(e.agentNote)})]})}function ij({gitVersion:e,error:n}){return f.jsxs("div",{className:UI,children:[f.jsxs("div",{className:"onb-card-head flex items-center justify-between gap-3",children:[f.jsx("span",{className:"onb-card-name font-semibold text-base",children:Hlt()}),f.jsx(yd,{tone:e?"success":n||e===null?"danger":"warning",children:e?Lk():n?Zit():e===null?jD():iat()})]}),(e||!n&&e===void 0)&&f.jsx("div",{className:O_,children:e??fat()})]})}const txn="/assets/slurm-logo-aGSXVZcE.svg",nxn="/assets/thinking-machines-BOdslTfm.png";function rxn(e){switch(e){case"modal_job":return"Modal";case"hf_job":return"Hugging Face";case"k8s_job":return"Kubernetes";case"ssh_job":return"SSH";case"slurm_job":return"Slurm";case"ray_job":return"Ray";case"openresearch_job":return"OpenResearch";case"local_job":return hD();case"tinker_job":return"Tinker";default:return e||"—"}}function sxn({size:e=16}){return f.jsxs("svg",{width:e,height:e,viewBox:"0 0 24 24","aria-hidden":"true",children:[f.jsx("path",{d:"M2.25 11.535c0-3.407 1.847-6.554 4.844-8.258a9.822 9.822 0 019.687 0c2.997 1.704 4.844 4.851 4.844 8.258 0 5.266-4.337 9.535-9.687 9.535S2.25 16.8 2.25 11.535z",fill:"#FF9D0B"}),f.jsx("path",{d:"M11.938 20.086c4.797 0 8.687-3.829 8.687-8.551 0-4.722-3.89-8.55-8.687-8.55-4.798 0-8.688 3.828-8.688 8.55 0 4.722 3.89 8.55 8.688 8.55z",fill:"#FFD21E"}),f.jsx("path",{d:"M11.875 15.113c2.457 0 3.25-2.156 3.25-3.263 0-0.576-.393-.394-1.023-.089-0.582.283-1.365.675-2.224.675-1.798 0-3.25-1.693-3.25-0.586 0 1.107.79 3.263 3.25 3.263h-.003z",fill:"#FF323D"}),f.jsx("path",{d:"M14.76 9.21c.32.108.445.753.767.585.447-.233.707-.708.659-1.204a1.235 1.235 0 00-.879-1.059 1.262 1.262 0 00-1.33.394c-.322.384-.377.92-.14 1.36.153.283.638-.177.925-.079l-.002.003zm-5.887 0c-.32.108-.448.753-.768.585a1.226 1.226 0 01-.658-1.204c.048-.495.395-.913.878-1.059a1.262 1.262 0 011.33.394c.322.384.377.92.14 1.36-.152.283-.64-.177-.925-.079l.003.003z",fill:"#3A3B45"}),f.jsx("path",{d:"M17.812 10.366a.806.806 0 00.813-.8c0-.441-.364-.8-.813-.8a.806.806 0 00-.812.8c0 .442.364.8.812.8zm-11.624 0a.806.806 0 00.812-.8c0-.441-.364-.8-.812-.8a.806.806 0 00-.813.8c0 .442.364.8.813.8z",fill:"#3A3B45"}),f.jsx("path",{d:"M4.515 13.073c-.405 0-.765.162-1.017.46a1.455 1.455 0 00-.333.925 1.801 1.801 0 00-.485-.074c-.387 0-.737.146-.985.409a1.41 1.41 0 00-.2 1.722 1.302 1.302 0 00-.447.694c-.06.222-.12.69.2 1.166a1.267 1.267 0 00-.093 1.236c.238.533.81.958 1.89 1.405l.24.096c.768.3 1.473.492 1.478.494.89.243 1.808.375 2.732.394 1.465 0 2.513-.443 3.115-1.314.93-1.342.842-2.575-.274-3.763l-.151-.154c-.692-.684-1.155-1.69-1.25-1.912-.195-.655-.71-1.383-1.562-1.383-.46.007-.889.233-1.15.605-.25-.31-.495-0.553-.715-.694a1.87 1.87 0 00-.993-.312zm14.97 0c.405 0 .767.162 1.017.46.216.262.333.588.333.925.158-.047.322-.071.487-.074.388 0 .738.146.985.409a1.41 1.41 0 01.2 1.722c.22.178.377.422.445.694.06.222.12.69-.2 1.166.244.37.279.836.093 1.236-.238.533-.81.958-1.889 1.405l-.239.096c-.77.3-1.475.492-1.48.494-.89.243-1.808.375-2.732.394-1.465 0-2.513-.443-3.115-1.314-.93-1.342-.842-2.575.274-3.763l.151-.154c.695-.684 1.157-1.69 1.252-1.912.195-.655.708-1.383 1.56-1.383.46.007.889.233 1.15.605.25-.31.495-0.553.718-.694.244-.162.523-.265.814-.3l.176-.012z",fill:"#FF9D0B"}),f.jsx("path",{d:"M9.785 20.132c.688-.994.638-1.74-.305-2.667-.945-.928-1.495-2.288-1.495-2.288s-.205-.788-.672-.714c-.468.074-.81 1.25.17 1.971.977.721-.195 1.21-0.573.534-.375-.677-1.405-2.416-1.94-2.751-0.532-.332-.907-.148-.782.541.125.687 2.357 2.35 2.14 2.707-.218.362-.983-.42-.983-.42S2.953 14.9 2.43 15.46c-0.52.558.398 1.026 1.7 1.803 1.308.778 1.41.985 1.225 1.28-.187.295-3.07-2.1-3.34-1.083-.27 1.011 2.943 1.304 2.745 2.006-.2.7-2.265-1.324-2.685-0.537-.425.79 2.913 1.718 2.94 1.725 1.075.276 3.813.859 4.77-0.522zm4.432 0c-.687-.994-.64-1.74.305-2.667.943-.928 1.493-2.288 1.493-2.288s.205-.788.675-.714c.465.074.807 1.25-.17 1.971-.98.721.195 1.21.57.534.377-.677 1.407-2.416 1.94-2.751.532-.332.91-.148.782.541-.125.687-2.355 2.35-2.137 2.707.215.362.98-.42.98-.42S21.05 14.9 21.57 15.46c.52.558-.395 1.026-1.7 1.803-1.308.778-1.408.985-1.225 1.28.187.295 3.07-2.1 3.34-1.083.27 1.011-2.94 1.304-2.743 2.006.2.7 2.263-1.324 2.685-0.537.423.79-2.912 1.718-2.94 1.725-1.077.276-3.815.859-4.77-0.522z",fill:"#FFD21E"})]})}function ixn({size:e=16}){return f.jsxs("svg",{width:e,height:e,viewBox:"0 0 300 300",fill:"none","aria-hidden":"true",children:[f.jsx("path",{d:"M121.683 75.25L149.997 124L91.4816 224.75C90.3128 226.757 88.155 228 85.8174 228H32.9664C31.7976 228 30.6778 227.691 29.697 227.131C28.7161 226.57 27.8906 225.758 27.3021 224.75L0.876625 179.25C-0.292208 177.243 -0.292208 174.765 0.876625 172.75L57.512 75.25C58.0923 74.2425 58.9259 73.43 59.9068 72.8694C60.8876 72.3088 62.0074 72 63.1762 72H116.027C118.365 72 120.523 73.2431 121.692 75.25H121.683ZM299.125 172.75L242.49 75.25C241.91 74.2425 241.076 73.43 240.095 72.8694C239.114 72.3088 237.995 72 236.826 72H183.975C181.637 72 179.479 73.2431 178.311 75.25L149.997 124L208.512 224.75C209.681 226.757 211.839 228 214.177 228H267.027C268.196 228 269.316 227.691 270.297 227.131C271.278 226.57 272.103 225.758 272.692 224.75L299.117 179.25C300.286 177.243 300.286 174.765 299.117 172.75H299.125Z",fill:"#62DE61"}),f.jsx("path",{d:"M89.6018 124H150.005L121.692 75.25C120.523 73.2431 118.365 72 116.027 72H63.1763C62.0074 72 60.8876 72.3088 59.9068 72.8694L89.6018 124Z",fill:"url(#orxModalA)"}),f.jsx("path",{d:"M89.6018 124L59.9068 72.8694C58.9259 73.43 58.1005 74.2425 57.512 75.25L0.876625 172.75C-0.292208 174.765 -0.292208 177.235 0.876625 179.25L27.3021 224.75C27.8825 225.758 28.7161 226.57 29.697 227.131L89.5936 124H89.6018Z",fill:"url(#orxModalB)"}),f.jsx("path",{d:"M149.997 124H89.5936L29.697 227.131C30.6778 227.691 31.7976 228 32.9664 228H85.8174C88.155 228 90.3128 226.757 91.4816 224.75L149.997 124Z",fill:"#09AF58"}),f.jsx("path",{d:"M299.125 179.25C299.706 178.243 300 177.121 300 176H240.61L210.915 227.131C211.896 227.691 213.016 228 214.185 228H267.036C269.373 228 271.531 226.757 272.7 224.75L299.125 179.25Z",fill:"#09AF58"}),f.jsx("path",{d:"M183.975 72C182.806 72 181.686 72.3088 180.705 72.8694L240.602 176H299.992C299.992 174.879 299.698 173.758 299.117 172.75L242.49 75.25C241.321 73.2431 239.163 72 236.826 72H183.967H183.975Z",fill:"url(#orxModalC)"}),f.jsx("path",{d:"M210.907 227.131L240.602 176L180.705 72.8694C179.725 73.43 178.899 74.2425 178.311 75.25L149.997 124L208.512 224.75C209.093 225.758 209.926 226.57 210.907 227.131Z",fill:"url(#orxModalD)"}),f.jsxs("defs",{children:[f.jsxs("linearGradient",{id:"orxModalA",x1:"127.348",y1:"137",x2:"82.9561",y2:"59.6398",gradientUnits:"userSpaceOnUse",children:[f.jsx("stop",{stopColor:"#BFF9B4"}),f.jsx("stop",{offset:"1",stopColor:"#80EE64"})]}),f.jsxs("linearGradient",{id:"orxModalB",x1:"7.04774",y1:"214.131",x2:"81.1284",y2:"85.0556",gradientUnits:"userSpaceOnUse",children:[f.jsx("stop",{stopColor:"#80EE64"}),f.jsx("stop",{offset:"0.18",stopColor:"#7BEB63"}),f.jsx("stop",{offset:"0.36",stopColor:"#6FE562"}),f.jsx("stop",{offset:"0.55",stopColor:"#5ADA60"}),f.jsx("stop",{offset:"0.74",stopColor:"#3DCA5D"}),f.jsx("stop",{offset:"0.93",stopColor:"#18B759"}),f.jsx("stop",{offset:"1",stopColor:"#09AF58"})]}),f.jsxs("linearGradient",{id:"orxModalC",x1:"278.103",y1:"188.561",x2:"204.022",y2:"59.4863",gradientUnits:"userSpaceOnUse",children:[f.jsx("stop",{stopColor:"#BFF9B4"}),f.jsx("stop",{offset:"1",stopColor:"#80EE64"})]}),f.jsxs("linearGradient",{id:"orxModalD",x1:"232.804",y1:"214.569",x2:"158.724",y2:"85.4864",gradientUnits:"userSpaceOnUse",children:[f.jsx("stop",{stopColor:"#80EE64"}),f.jsx("stop",{offset:"0.18",stopColor:"#7BEB63"}),f.jsx("stop",{offset:"0.36",stopColor:"#6FE562"}),f.jsx("stop",{offset:"0.55",stopColor:"#5ADA60"}),f.jsx("stop",{offset:"0.74",stopColor:"#3DCA5D"}),f.jsx("stop",{offset:"0.93",stopColor:"#18B759"}),f.jsx("stop",{offset:"1",stopColor:"#09AF58"})]})]})]})}function axn({size:e=16}){return f.jsx("svg",{width:e,height:e,viewBox:"0 0 24 24",fill:"#326CE5","aria-hidden":"true",children:f.jsx("path",{d:"M10.204 14.35l.007.01-.999 2.413a5.171 5.171 0 0 1-2.075-2.597l2.578-.437.004.005a.44.44 0 0 1 .484.606zm-.833-2.129a.44.44 0 0 0 .173-.756l.002-.011L7.585 9.7a5.143 5.143 0 0 0-.73 3.255l2.514-.725.002-.009zm1.145-1.98a.44.44 0 0 0 .699-.337l.01-.005.15-2.62a5.144 5.144 0 0 0-3.01 1.442l2.147 1.523.004-.002zm.76 2.75l.723.349.722-.347.18-.78-0.5-.623h-.804l-0.5.623.179.779zm1.5-3.095a.44.44 0 0 0 .7.336l.008.003 2.134-1.513a5.188 5.188 0 0 0-2.992-1.442l.148 2.615.002.001zm10.876 5.97l-5.773 7.181a1.6 1.6 0 0 1-1.248.594l-9.261.003a1.6 1.6 0 0 1-1.247-0.596l-5.776-7.18a1.583 1.583 0 0 1-.307-1.34L2.1 5.573c.108-.47.425-.864.863-1.073L11.305.513a1.606 1.606 0 0 1 1.385 0l8.345 3.985c.438.209.755.604.863 1.073l2.062 8.955c.108.47-.005.963-.308 1.34zm-3.289-2.057c-.042-.01-.103-.026-.145-.034-.174-.033-.315-.025-.479-.038-.35-.037-.638-.067-.895-.148-.105-.04-.18-.165-.216-.216l-.201-.059a6.45 6.45 0 0 0-.105-2.332 6.465 6.465 0 0 0-.936-2.163c.052-.047.15-.133.177-.159.008-.09.001-.183.094-.282.197-.185.444-.338.743-0.522.142-.084.273-.137.415-.242.032-.024.076-.062.11-.089.24-.191.295-0.52.123-.736-.172-.216-0.506-.236-.745-.045-.034.027-.08.062-.111.088-.134.116-.217.23-.33.35-.246.25-.45.458-.673.609-.097.056-.239.037-.303.033l-.19.135a6.545 6.545 0 0 0-4.146-2.003l-.012-.223c-.065-.062-.143-.115-.163-.25-.022-.268.015-0.557.057-.905.023-.163.061-.298.068-.475.001-.04-.001-.099-.001-.142 0-.306-.224-0.555-0.5-0.555-.275 0-.499.249-.499.555l.001.014c0 .041-.002.092 0 .128.006.177.044.312.067.475.042.348.078.637.056.906a.545.545 0 0 1-.162.258l-.012.211a6.424 6.424 0 0 0-4.166 2.003 8.373 8.373 0 0 1-.18-.128c-.09.012-.18.04-.297-.029-.223-.15-.427-.358-.673-.608-.113-.12-.195-.234-.329-.349-.03-.026-.077-.062-.111-.088a.594.594 0 0 0-.348-.132.481.481 0 0 0-.398.176c-.172.216-.117.546.123.737l.007.005.104.083c.142.105.272.159.414.242.299.185.546.338.743.522.076.082.09.226.1.288l.16.143a6.462 6.462 0 0 0-1.02 4.506l-.208.06c-.055.072-.133.184-.215.217-.257.081-0.546.11-.895.147-.164.014-.305.006-.48.039-.037.007-.09.02-.133.03l-.004.002-.007.002c-.295.071-.484.342-.423.608.061.267.349.429.645.365l.007-.001.01-.003.129-.029c.17-.046.294-.113.448-.172.33-.118.604-.217.87-.256.112-.009.23.069.288.101l.217-.037a6.5 6.5 0 0 0 2.88 3.596l-.09.218c.033.084.069.199.044.282-.097.252-.263.517-.452.813-.091.136-.185.242-.268.399-.02.037-.045.095-.064.134-.128.275-.034.591.213.71.248.12.556-.007.69-.282v-.002c.02-.039.046-.09.062-.127.07-.162.094-.301.144-.458.132-.332.205-.68.387-.897.05-.06.13-.082.215-.105l.113-.205a6.453 6.453 0 0 0 4.609.012l.106.192c.086.028.18.042.256.155.136.232.229.507.342.84.05.156.074.295.145.457.016.037.043.09.062.129.133.276.442.402.69.282.247-.118.341-.435.213-.71-.02-.039-.045-.096-.065-.134-.083-.156-.177-.261-.268-.398-.19-.296-.346-0.541-.443-.793-.04-.13.007-.21.038-.294-.018-.022-.059-.144-.083-.202a6.499 6.499 0 0 0 2.88-3.622c.064.01.176.03.213.038.075-.05.144-.114.28-.104.266.039.54.138.87.256.154.06.277.128.448.173.036.01.088.019.13.028l.009.003.007.001c.297.064.584-.098.645-.365.06-.266-.128-0.537-.423-.608zM16.4 9.701l-1.95 1.746v.005a.44.44 0 0 0 .173.757l.003.01 2.526.728a5.199 5.199 0 0 0-.108-1.674A5.208 5.208 0 0 0 16.4 9.7zm-4.013 5.325a.437.437 0 0 0-.404-.232.44.44 0 0 0-.372.233h-.002l-1.268 2.292a5.164 5.164 0 0 0 3.326.003l-1.27-2.296h-.01zm1.888-1.293a.44.44 0 0 0-.27.036.44.44 0 0 0-.214.572l-.003.004 1.01 2.438a5.15 5.15 0 0 0 2.081-2.615l-2.6-.44-.004.005z"})})}function oxn({size:e=16}){return f.jsx("svg",{width:e,height:e,viewBox:"0 0 24 24",fill:"#028CF0","aria-hidden":"true",children:f.jsx("path",{d:"M16.153 12.826c-.63-.183-1.03.15-1.378.846-0.58 1.13-1.643 1.644-2.888 1.594-1.245-.05-2.257-.63-2.788-1.776-.233-.498-.498-.664-1.046-.68-.93-.017-1.643.016-2.174 1.062-.631 1.261-2.258 1.693-3.619 1.261a3.234 3.234 0 0 1-2.257-3.22 3.198 3.198 0 0 1 2.29-3.02 3.276 3.276 0 0 1 3.702 1.327c.216.315.216.863.597.93.648.1 1.328.033 1.992.033.299 0 .316-.266.399-.465.58-1.295 1.61-1.959 2.987-1.975 1.361-.017 2.39.647 2.955 1.892.215.465.48.598.946.548.166-.017.332.016.498 0 .464-.083 1.062.282 1.344-.448.282-.73-.382-.913-.68-1.245-.847-.946-1.81-1.793-2.673-2.706-.415-.465-.763-.614-1.41-.415-1.876.614-3.619-.431-4.15-2.357-.448-1.676.714-3.535 2.44-3.917a3.293 3.293 0 0 1 3.95 2.457c.017.05.017.083.033.133.117.564.117 1.145-.132 1.626-.283.531-.133.83.249 1.195a152.61 152.61 0 0 1 3.286 3.27c.299.299.498.349.913.2 1.51-0.565 2.97-.1 3.884 1.161a3.266 3.266 0 0 1-.067 3.801c-.896 1.195-2.357 1.643-3.834 1.079-.381-.15-0.58-.1-.846.182a163.619 163.619 0 0 1-3.403 3.386c-.299.3-.415.532-.232.98a3.198 3.198 0 0 1-1.278 3.917A3.298 3.298 0 0 1 9.646 23c-1.062-1.062-1.228-2.688-.415-4.033a3.196 3.196 0 0 1 3.835-1.294c.498.182.78.083 1.145-.283 1.012-1.045 2.058-2.058 3.087-3.103.266-.266.68-.449.432-1.03-.233-0.547-.631-.414-1.03-.431zM11.97 4.942c.913.016 1.643-.714 1.66-1.627v-.05a1.646 1.646 0 0 0-1.76-1.56 1.63 1.63 0 0 0-1.543 1.527 1.638 1.638 0 0 0 1.577 1.71zm.033 5.41a1.658 1.658 0 0 0-1.676 1.61v.084a1.73 1.73 0 0 0 1.643 1.66c.847.016 1.643-.78 1.677-1.627a1.648 1.648 0 0 0-1.577-1.71c-.017-.016-.05-.016-.067-.016zm7.088 1.694c.016.896.747 1.61 1.626 1.643a1.723 1.723 0 0 0 1.66-1.726 1.666 1.666 0 0 0-1.66-1.61 1.623 1.623 0 0 0-1.643 1.577c.017.05.017.083.017.116zM3.24 10.353a1.692 1.692 0 0 0-1.66 1.626c-.017.847.863 1.727 1.693 1.71a1.687 1.687 0 0 0 1.626-1.743 1.615 1.615 0 0 0-1.643-1.593Zm8.68 12c.98.033 1.71-.647 1.727-1.593a1.646 1.646 0 0 0-1.51-1.793 1.646 1.646 0 0 0-1.793 1.51v.233a1.609 1.609 0 0 0 1.543 1.66c0-.017.017-.017.033-.017z"})})}function lxn({size:e=16}){return f.jsxs("svg",{width:e,height:e,viewBox:"0 0 100 100","aria-hidden":"true",children:[f.jsx("rect",{width:"100",height:"100",rx:"8",fill:"#9a2036"}),f.jsx("path",{d:"M15.375 16.782v63.843a4 4 0 0 0 4 4h63.843c3.564 0 5.348-4.309 2.829-6.828L22.203 13.953c-2.52-2.52-6.828-.735-6.828 2.829",fill:"#fff"})]})}function cxn({size:e=16}){return f.jsx("img",{className:"tinker-logo block flex-none object-contain",src:nxn,width:e,height:e,style:{transform:e>=48?`translateX(${Math.round(e*.18)}px) scale(1.65)`:"scale(1.22)"},alt:"","aria-hidden":"true"})}function uxn({size:e=16}){return f.jsx("img",{className:"block flex-none object-contain",src:txn,width:e,height:e,alt:"","aria-hidden":"true"})}function Rb({size:e=16}){return f.jsx("svg",{width:e,height:e,viewBox:"0 0 24 24",fill:"currentColor","aria-hidden":"true",children:f.jsx("path",{d:"M12 0C5.37 0 0 5.37 0 12c0 5.31 3.435 9.795 8.205 11.385.6.105.825-.255.825-0.57 0-.285-.015-1.23-.015-2.235-3.015.555-3.795-.735-4.035-1.41-.135-.345-.72-1.41-1.23-1.695-.42-.225-1.02-.78-.015-.795.945-.015 1.62.87 1.845 1.23 1.08 1.815 2.805 1.305 3.495.99.105-.78.42-1.305.765-1.605-2.67-.3-5.46-1.335-5.46-5.925 0-1.305.465-2.385 1.23-3.225-.12-.3-0.54-1.53.12-3.18 0 0 1.005-.315 3.3 1.23.96-.27 1.98-.405 3-.405s2.04.135 3 .405c2.295-1.56 3.3-1.23 3.3-1.23.66 1.65.24 2.88.12 3.18.765.84 1.23 1.905 1.23 3.225 0 4.605-2.805 5.625-5.475 5.925.435.375.81 1.095.81 2.22 0 1.605-.015 2.895-.015 3.3 0 .315.225.69.825.57A12.02 12.02 0 0 0 24 12c0-6.63-5.37-12-12-12z"})})}function xh({kind:e,size:n=16}){switch(e){case"modal_job":return f.jsx(ixn,{size:n});case"hf_job":return f.jsx(sxn,{size:n});case"k8s_job":return f.jsx(axn,{size:n});case"ssh_job":return f.jsx(Gz,{size:n,strokeWidth:1.5});case"slurm_job":return f.jsx(uxn,{size:n});case"ray_job":return f.jsx(oxn,{size:n});case"openresearch_job":return f.jsx(lxn,{size:n});case"tinker_job":return f.jsx(cxn,{size:n});case"local_job":return f.jsx(cbn,{size:n,strokeWidth:1.5});default:return f.jsx(Gz,{size:n})}}function pS({backend:e}){const n=Uk(e),t=kmn(e);return n?f.jsxs("span",{className:"backend-badge inline-flex items-center gap-[7px] [&_svg]:flex-none [&_svg]:block [&_.backend-name]:font-medium [&_.backend-detail]:text-muted [&.muted]:text-muted",children:[f.jsx(xh,{kind:n}),f.jsx("span",{className:"backend-name",children:rxn(n)}),t&&f.jsx("span",{className:"backend-detail text-sm",children:t})]}):f.jsx("span",{className:"backend-badge inline-flex items-center gap-[7px] [&_svg]:flex-none [&_svg]:block [&_.backend-name]:font-medium [&_.backend-detail]:text-muted [&.muted]:text-muted muted text-muted",children:"—"})}function aw(e,n){const[t,r]=A.useState(e);return A.useEffect(()=>{const s=setTimeout(()=>r(e),n);return()=>clearTimeout(s)},[e,n]),t}function Jg(e,n){const t=e.toLowerCase().replace(/[^a-z0-9]+/g,"-").replace(/^-+|-+$/g,"");return(n?t.slice(0,n):t)||"research-project"}function _xn(e){const t=(e.trim().split(/[?#]/)[0].split("/").filter(Boolean).pop()??"").replace(/\.(pdf|md)$/i,"");return/^\d{4}\.\d{4,5}(v\d+)?$/.test(t)?t:null}function fxn(e){const n=e==null?void 0:e.trim().match(/github\.com[/:]([^/]+)\/([^/?#]+)/i);return n?{owner:n[1],repo:n[2].replace(/\.git$/,"")}:null}function dxn(e){return e.trim().replace(/^https?:\/\//i,"").replace(/^git@([^:]+):/i,"$1/").replace(/\.git$/i,"").replace(/\/$/,"")}function hxn({onCreated:e,onCancel:n,remote:t=!1}){var Dn,pn,Un,Rn;const[r,s]=A.useState("blank"),[i,a]=A.useState(""),[o,l]=A.useState(!1),[u,h]=A.useState(""),[_,p]=A.useState(!1),[m,x]=A.useState(!1),[k,v]=A.useState(!1),[b,w]=A.useState(null),[y,C]=A.useState(!1),[N,E]=A.useState(!1),[T,j]=A.useState(""),[M,D]=A.useState(null),[I,P]=A.useState(!1),U=A.useRef(0),q=A.useRef(0),W=A.useRef({blank:{name:"",nameTouched:!1,path:"",pathTouched:!1},folder:{name:"",nameTouched:!1,path:"",pathTouched:!1},paper:{name:"",nameTouched:!1,path:"",pathTouched:!1}}),H=r==="paper"?fxn(M==null?void 0:M.repoUrl):null,Y=i.trim()?`~/OpenResearch/${Jg(i,48)}`:"",te=`~/OpenResearch/${Jg(i||(M==null?void 0:M.title)||(M==null?void 0:M.paperId)||"")}`,$=r==="blank"&&!_?Y:r==="paper"&&M&&!_?te:u,L=aw($.trim(),200),F=ft({...Zp(L),enabled:!!L&&L===$.trim()}),G=L===$.trim()?F.data??null:null,V=L===$.trim()?((Dn=F.error)==null?void 0:Dn.message)??null:null,ee=!!$.trim()&&(L!==$.trim()||F.isFetching),ce=H??(r==="folder"&&(G!=null&&G.githubOwner)&&G.githubRepo?{owner:G.githubOwner,repo:G.githubRepo}:null),ae=ft(_gn()),se=((pn=ae.data)==null?void 0:pn.login)??(ae.isPending?void 0:null),X=ft(Gk()),oe=A.useRef(!1);A.useEffect(()=>{oe.current||!X.data||(oe.current=!0,E(X.data.githubForNewProjects))},[X.data]);const le=aw(i.trim(),150),_e=ft({...fgn(le),enabled:le===i.trim()}),pe=le===i.trim()?((Un=_e.data)==null?void 0:Un.repo)??Jg(i,48):Jg(i,48),Ee=le!==i.trim()||_e.isFetching,Ie=ft({...Tz((ce==null?void 0:ce.owner)??"",(ce==null?void 0:ce.repo)??""),enabled:!!ce,subscribed:!!ce}),ze=!!ce&&Ie.isFetching,He=ce&&((Rn=Ie.data)!=null&&Rn.canPush)?`github.com/${ce.owner}/${ce.repo}`:null,Oe=aw(T.trim(),350),Xe=_xn(Oe),_t=r==="paper"&&!M&&Oe===T.trim(),Vt=ft({...PL(Oe),enabled:_t&&!Xe&&Oe.length>=3,subscribed:_t&&!Xe&&Oe.length>=3}),$t=ft({...y3(Xe??""),enabled:_t&&!!Xe,subscribed:_t&&!!Xe}),jt=_t&&!Xe?Vt.data??[]:[],mt=_t&&Vt.isSuccess?Oe:"",we=I||r==="paper"&&!M&&(Oe!==T.trim()||(Xe?$t.isFetching:Vt.isFetching));A.useEffect(()=>{var yt;!_t||!Xe||!$t.data||(D($t.data),o||a(((yt=$t.data.title)==null?void 0:yt.trim())||$t.data.paperId))},[_t,Xe,$t.data,o]),A.useEffect(()=>{const yt=Xe?$t.error:Vt.error;_t&&yt&&w(yt.message)},[_t,Xe,$t.error,Vt.error]);const ct=vn({mutationFn:ppn});async function ye(yt){var Ue;const Dt=++U.current;P(!0),w(null);try{const gt=await rt.fetchQuery(y3(yt));if(Dt!==U.current)return;D(gt),o||a(((Ue=gt.title)==null?void 0:Ue.trim())||gt.paperId)}catch(gt){Dt===U.current&&w(gt instanceof Error?gt.message:String(gt))}finally{Dt===U.current&&P(!1)}}function je(){U.current+=1,q.current+=1,D(null),j(""),P(!1),x(!1),h(""),p(!1),W.current.paper={name:o?i:"",nameTouched:o,path:"",pathTouched:!1},o||a("")}function qe(yt){if(yt===r)return;U.current+=1,q.current+=1,W.current[r]={name:i,nameTouched:o,path:u,pathTouched:_};const Dt=W.current[yt];s(yt),w(null),P(!1),x(!1),a(Dt.name),l(Dt.nameTouched),h(Dt.path),p(Dt.pathTouched)}async function at(){if(m)return;const yt=++q.current;x(!0),w(null);try{const Dt=await hpn();if(yt!==q.current||!Dt)return;if(p(!0),h(Dt),rt.invalidateQueries(Zp(Dt)),r==="folder"&&!o){const Ue=Dt.replace(/[\\/]+$/,"").split(/[\\/]/).pop();Ue&&a(Ue)}}catch(Dt){yt===q.current&&w(Dt instanceof Error?Dt.message:String(Dt))}finally{yt===q.current&&x(!1)}}async function nt(yt){if(yt.preventDefault(),!!kt){v(!0),w(null);try{const Dt=await rt.fetchQuery({...Zp($.trim()),staleTime:0});if(Dt.exists&&Dt.directory===!1)throw new Error(U2());if(r==="blank"&&Dt.exists)throw new Error(IN());if(r==="paper"&&Dt.empty===!1)throw new Error(HN());N&&ce&&await rt.fetchQuery({...Tz(ce.owner,ce.repo),staleTime:0}).catch(()=>null);const Ue=await ct.mutateAsync({name:i.trim(),path:$.trim(),creationMode:r,createFolder:r!=="folder",requireNewFolder:r==="blank",initializeGit:!0,githubSyncEnabled:N,locale:z(),...r==="paper"&&M?{paperId:M.paperId,cloneUrl:M.repoUrl??void 0}:{}});e(Ue.project,Ue.githubPublicationError)}catch(Dt){w(Dt instanceof Error?Dt.message:String(Dt))}finally{v(!1)}}}const Kt=i.trim(),Qe=r==="paper"&&M&&!M.repoUrl?M.paperId:null,wt=r==="folder"&&(G==null?void 0:G.gitState)==="ready"?G.resolvedPath??null:null,Tt=Kt!==""&&(Qe!==null||wt!==null);A.useEffect(()=>{if(!Tt)return;const yt=window.setTimeout(()=>{xpn({name:Kt,paperId:Qe??void 0,path:wt??void 0,locale:z()}).catch(()=>{})},1200);return()=>window.clearTimeout(yt)},[Tt,Kt,Qe,wt]);const Yt=(G==null?void 0:G.gitVersion)===null,tn=r==="folder"&&!!$.trim()&&G!==null&&G.exists===!1,rr=r==="blank"&&(G==null?void 0:G.exists)===!0,rn=!!$.trim()&&(G==null?void 0:G.exists)===!0&&G.directory===!1,ln=r==="paper"&&!!(M!=null&&M.repoUrl)&&(G==null?void 0:G.empty)===!1,An=r==="paper"&&!!M&&!(M!=null&&M.repoUrl)&&(G==null?void 0:G.empty)===!1,qn=r==="folder"&&((G==null?void 0:G.gitState)==="detached"||(G==null?void 0:G.gitState)==="invalid"),Yn=_&&!$.trim()||rn||ln||An,fr=_&&!$.trim()||rn||rr,Xr=_&&!$.trim()?FN():rn?U2():rr?IN():null,zr=_&&!$.trim()?FN():rn?U2():ln?HN():An?IJe():null,kt=!!(i.trim()&&$.trim())&&!k&&!m&&!ee&&G!==null&&!V&&!Yt&&!tn&&!rr&&!rn&&!ln&&!An&&!qn&&(r!=="paper"||!!M)&&(!N||typeof se=="string"&&!Ee&&!ze),cn=He??`github.com/${se??"you"}/${pe}`,jn=se===void 0||Ee||ze,fn=r==="paper"&&!M&&T.trim().length>=3&&mt===T.trim()&&!we&&jt.length===0&&!b;return f.jsxs("form",{className:"form [&_.form-seg]:self-start [&_.form-seg]:mb-0.5 [&_.form-seg_button]:py-[5px] [&_.form-seg_button]:px-3 [&_.repo-hint]:font-normal [&_.repo-hint]:text-sm [&_.repo-hint]:text-muted [&_.repo-hint.ok]:text-accent-teal [&_.folder-picker-control]:flex [&_.folder-picker-control]:items-center [&_.folder-picker-control]:gap-[9px] [&_.folder-picker-control]:w-full [&_.folder-picker-control]:min-w-0 [&_.folder-picker-control]:py-2 [&_.folder-picker-control]:px-2.5 [&_.folder-picker-control]:overflow-hidden [&_.folder-picker-control]:bg-background [&_.folder-picker-control]:border [&_.folder-picker-control]:border-border [&_.folder-picker-control]:rounded-md [&_.folder-picker-control]:cursor-pointer [&_.folder-picker-control]:text-start [&_.folder-picker-control]:transition-[border-color,box-shadow] [&_.folder-picker-control]:duration-120 [&_.folder-picker-control]:ease-standard [&_.folder-picker-control:hover:not(:disabled)]:border-muted [&_.folder-picker-control:hover:not(:disabled)]:shadow-control-subtle [&_.folder-picker-control:focus-visible]:outline-2 [&_.folder-picker-control:focus-visible]:outline-solid [&_.folder-picker-control:focus-visible]:outline-text [&_.folder-picker-control:focus-visible]:outline-offset-2 [&_.folder-picker-control_span]:flex-1 [&_.folder-picker-control_span]:min-w-0 [&_.folder-picker-control_span]:overflow-hidden [&_.folder-picker-control_span]:text-ellipsis [&_.folder-picker-control_span]:whitespace-nowrap [&_.folder-picker-control_.placeholder]:text-muted [&_.folder-picker-icon]:flex-none [&_.folder-picker-icon]:text-current [&_.folder-picker-chevron]:flex-none [&_.folder-picker-chevron]:text-muted [&_.folder-picker-control:hover:not(:disabled)_.folder-picker-chevron]:text-subtext [&_.folder-picker-hint]:text-subtext [&_.folder-picker-hint]:text-sm [&_.folder-picker-hint]:font-normal [&_.folder-picker-hint]:leading-[1.4] [&_.project-location-field]:flex [&_.project-location-field]:flex-col [&_.project-location-field]:gap-2 [&_.project-location-label]:text-text [&_.project-location-label]:text-base [&_.project-location-label]:font-medium [&_.project-field-label]:text-text [&_.project-field-label]:text-base [&_.project-field-label]:font-medium [&_.folder-picker-control:disabled]:cursor-default [&_.folder-picker-control:disabled]:opacity-65 [&_.paper-destination]:flex [&_.paper-destination]:items-center [&_.paper-destination]:gap-2.5 [&_.paper-destination]:pt-2 [&_.paper-destination]:pe-2 [&_.paper-destination]:pb-2 [&_.paper-destination]:ps-3 [&_.paper-destination]:border [&_.paper-destination]:border-border [&_.paper-destination]:rounded-md [&_.paper-destination]:bg-background [&_.paper-destination_code]:flex-1 [&_.paper-destination_code]:min-w-0 [&_.paper-destination_code]:overflow-hidden [&_.paper-destination_code]:text-text [&_.paper-destination_code]:text-sm [&_.paper-destination_code]:font-normal [&_.paper-destination_code]:text-ellipsis [&_.paper-destination_code]:whitespace-nowrap [&_.paper-destination_.btn]:flex-none [&_.project-path-notice]:py-[9px] [&_.project-path-notice]:px-[11px] [&_.project-path-notice]:border [&_.project-path-notice]:border-border-variant [&_.project-path-notice]:rounded-sm [&_.project-path-notice]:bg-surface [&_.project-path-notice]:text-subtext [&_.project-path-notice]:text-sm [&_.project-path-notice]:leading-[1.4] [&_.project-path-notice.error]:border-danger-notice-border [&_.paper-results]:flex [&_.paper-results]:flex-col [&_.paper-results]:border [&_.paper-results]:border-border [&_.paper-results]:rounded-md [&_.paper-results]:max-h-60 [&_.paper-results]:overflow-y-auto [&_.paper-results_button]:flex [&_.paper-results_button]:flex-col [&_.paper-results_button]:items-start [&_.paper-results_button]:gap-0.5 [&_.paper-results_button]:py-2 [&_.paper-results_button]:px-2.5 [&_.paper-results_button]:bg-none [&_.paper-results_button]:bg-transparent [&_.paper-results_button]:border-0 [&_.paper-results_button]:border-b [&_.paper-results_button]:border-b-border-variant [&_.paper-results_button]:text-start [&_.paper-results_button]:[font:inherit] [&_.paper-results_button]:text-text [&_.paper-results_button]:cursor-pointer [&_.paper-results_button:last-child]:border-b-0 [&_.paper-results_button:hover]:bg-surface [&_.paper-results_.title]:text-sm [&_.paper-results_.title]:font-medium [&_.paper-results_.id]:text-xs [&_.paper-results_.id]:text-muted [&_.paper-pick_.id]:text-xs [&_.paper-pick_.id]:text-muted [&_.paper-pick]:flex [&_.paper-pick]:items-center [&_.paper-pick]:justify-between [&_.paper-pick]:gap-2.5 [&_.paper-pick]:py-2.5 [&_.paper-pick]:px-3 [&_.paper-pick]:border [&_.paper-pick]:border-border [&_.paper-pick]:rounded-md [&_.paper-pick]:bg-surface [&_.paper-pick_.meta]:min-w-0 [&_.paper-pick_.title]:text-sm [&_.paper-pick_.title]:font-medium flex flex-col [&_label]:flex [&_label]:flex-col [&_label]:gap-1 [&_label]:text-sm [&_label]:text-text [&_label]:font-medium [&_.row2]:grid [&_.row2]:grid-cols-2 [&_.row2]:gap-2.5 [&_.actions]:flex [&_.actions]:justify-end [&_.actions]:gap-2.5 [&_.actions]:mt-1.5 [&_.new-project-actions]:justify-start [&_.new-project-actions]:mt-2.5 [&_.error]:text-accent-red [&_.error]:text-sm [&_.error]:whitespace-pre-wrap new-project-form gap-4.5 [&_>_label]:gap-2",onSubmit:nt,children:[f.jsxs("div",{className:"seg inline-flex items-center gap-0.5 p-[3px] rounded-md bg-hover-subtle [&_button]:py-[3px] [&_button]:px-3 [&_button]:text-sm [&_button]:font-medium [&_button]:text-text [&_button]:rounded-sm [&_button:not(:disabled):hover]:text-text [&_button.active]:bg-background [&_button.active]:shadow-segment [&_button:disabled]:text-muted [&_button:disabled]:cursor-default form-seg",children:[f.jsx("button",{type:"button",className:r==="blank"?"active":"","aria-pressed":r==="blank",onClick:()=>qe("blank"),children:Yet()}),f.jsx("span",{"aria-hidden":!0,className:`h-6 w-px bg-border${r==="paper"?"":" invisible"}`}),f.jsx("button",{type:"button",className:r==="folder"?"active":"","aria-pressed":r==="folder",onClick:()=>qe("folder"),children:$tt()}),f.jsx("span",{"aria-hidden":!0,className:`h-6 w-px bg-border${r==="blank"?"":" invisible"}`}),f.jsx("button",{type:"button",className:r==="paper"?"active":"","aria-pressed":r==="paper",onClick:()=>qe("paper"),children:Ztt()})]}),r==="paper"&&!M&&f.jsxs("label",{className:"!font-normal",children:[Bnt(),f.jsx("input",{className:"text-sm font-normal","data-initial-focus":!0,value:T,onChange:yt=>{w(null),j(yt.target.value)},placeholder:srt()}),!fn&&f.jsx("span",{className:"repo-hint",children:we?Rst():vst()}),fn&&f.jsx("span",{className:"project-path-notice block",children:vnt()}),jt.length>0&&f.jsx("div",{className:"paper-results",children:jt.map(yt=>f.jsxs("button",{type:"button",onClick:()=>void ye(yt.paperId),children:[f.jsx(k0,{children:yt.title}),f.jsx("span",{className:"id",children:yt.paperId})]},yt.paperId))})]}),M&&r==="paper"&&f.jsxs("div",{className:"paper-pick !flex-col !items-stretch",children:[f.jsxs("div",{className:"flex items-start justify-between gap-2.5",children:[f.jsxs("div",{className:"meta",children:[f.jsx(k0,{className:"block",children:M.title||M.paperId}),M.repoUrl&&f.jsx("div",{className:"id",children:dxn(M.repoUrl)})]}),f.jsx(Me,{size:"small",type:"button","aria-label":vtt(),onClick:je,children:_tt()})]}),!M.repoUrl&&f.jsxs("div",{className:"flex w-full flex-col items-start gap-1 rounded-md border border-border-variant bg-background px-[9px] py-1 text-sm font-normal text-subtext",children:[f.jsxs("span",{className:"flex items-center gap-[5px] text-sm",children:[f.jsx(Zk,{size:16})," ",Cnt()]}),f.jsx("span",{className:"text-sm font-normal text-accent-amber",children:Rnt()})]})]}),(r!=="paper"||M)&&f.jsxs(f.Fragment,{children:[r==="blank"&&f.jsxs("label",{className:"!font-normal",children:[f.jsx("span",{className:"project-field-label !font-medium",children:PN()}),f.jsx("input",{className:"text-sm font-normal","data-initial-focus":!0,value:i,onChange:yt=>{l(!0),a(yt.target.value)},placeholder:BN()})]}),r==="paper"?f.jsxs("label",{className:"project-location-field",children:[f.jsx("span",{className:"project-location-label !font-medium",children:M!=null&&M.repoUrl?_et():G2()}),f.jsx("input",{className:"text-sm font-normal",value:$,onChange:yt=>{p(!0),h(yt.target.value)},"aria-describedby":Yn?"paper-destination-description":void 0,placeholder:"~/OpenResearch/paper-title",spellCheck:!1}),ee&&f.jsx("span",{className:"sr-only",role:"status","aria-live":"polite",children:$N()}),Yn&&f.jsx("span",{id:"paper-destination-description",className:"folder-picker-hint error !text-accent-red",role:"alert",children:zr})]}):r==="folder"&&!t?f.jsxs("button",{"data-initial-focus":!0,type:"button",className:"folder-picker-control","aria-label":u?UJe({path:Ne(u)}):DN(),disabled:m,title:u||void 0,onClick:()=>void at(),children:[f.jsx(q_,{className:u?"folder-picker-icon":"folder-picker-icon placeholder",size:16}),f.jsx("span",{className:u?"text-sm":"placeholder",children:m?ret():u||DN()}),f.jsx(Da,{className:"folder-picker-chevron",size:15})]}):r==="folder"?f.jsxs("label",{className:"project-location-field",children:[f.jsx("span",{className:"project-location-label !font-medium",children:G2()}),f.jsx("input",{"data-initial-focus":!0,className:"text-sm font-normal",value:u,onChange:yt=>{p(!0),h(yt.target.value)},placeholder:"/home/user/project",spellCheck:!1,dir:"ltr"})]}):i.trim()?f.jsxs("label",{className:"project-location-field",children:[f.jsx("span",{className:"project-location-label !font-medium",children:G2()}),f.jsx("input",{className:"text-sm font-normal",value:$,onChange:yt=>{p(!0),h(yt.target.value)},placeholder:"~/OpenResearch/my-research","aria-describedby":fr?"blank-destination-description":void 0,spellCheck:!1}),ee&&f.jsx("span",{className:"sr-only",role:"status","aria-live":"polite",children:$N()}),fr&&f.jsx("span",{id:"blank-destination-description",className:"folder-picker-hint error !text-accent-red",role:"alert",children:Xr})]}):null,r!=="blank"&&$&&f.jsxs("label",{className:"!font-normal",children:[f.jsx("span",{className:"project-field-label !font-medium",children:PN()}),f.jsx("input",{className:"text-sm font-normal",value:i,onChange:yt=>{l(!0),a(yt.target.value)},placeholder:BN()})]}),Yt&&f.jsx("div",{className:"project-path-notice error",children:int()}),!Yt&&r==="folder"&&u.trim()&&!ee&&(G==null?void 0:G.exists)===!1&&f.jsx("div",{className:"project-path-notice error",children:vrt()}),!Yt&&r==="folder"&&u.trim()&&!ee&&rn&&f.jsx("div",{className:"project-path-notice error",children:Rrt()}),!Yt&&r==="folder"&&!ee&&(G==null?void 0:G.gitState)==="detached"&&f.jsx("div",{className:"project-path-notice error",children:Ctt()}),!Yt&&r==="folder"&&!ee&&(G==null?void 0:G.gitState)==="invalid"&&f.jsx("div",{className:"project-path-notice error",children:Crt()}),V&&f.jsx("div",{className:"project-path-notice error",role:"alert",children:V})]}),b&&f.jsx("div",{className:"error",role:"alert",children:b}),(r!=="paper"||M)&&$&&(r!=="blank"||i.trim())&&f.jsxs("div",{className:"flex w-full flex-col items-start gap-2",children:[f.jsxs("button",{type:"button",className:`inline-flex items-center gap-1 text-sm font-medium${N&&se===null?" text-accent-red":" text-text"}`,"aria-expanded":y,"aria-controls":"new-project-advanced-settings",onClick:()=>C(yt=>!yt),children:[N?se===null?kJe():TJe():mJe(),f.jsx(Zo,{className:y?"rotate-180":"",size:16})]}),y&&f.jsxs("label",{id:"new-project-advanced-settings",className:"flex w-full flex-col items-stretch gap-[7px] font-normal",children:[f.jsxs("span",{className:"flex flex-row items-center gap-[9px]",children:[f.jsx("input",{className:"m-0",type:"checkbox",checked:N,onChange:yt=>E(yt.target.checked),disabled:k}),f.jsx("strong",{className:"text-base font-medium leading-[1.3] text-text",children:_rt()})]}),f.jsxs("span",{className:"flex flex-col gap-[3px] font-sans text-sm font-normal leading-[1.4] text-subtext",children:[f.jsx("span",{children:jn?Brt({repository:Ne(cn)}):He?Jrt({repository:Ne(cn)}):Vrt({repository:Ne(cn)})}),f.jsx("span",{children:Gtt()}),se===null&&f.jsx("span",{children:Cst({command:Ne("gh auth login")})})]})]})]}),f.jsxs("div",{className:"actions new-project-actions",children:[n&&f.jsx(Me,{type:"button",onClick:n,children:stt()}),f.jsx(Me,{variant:"primary",className:"ms-auto",disabled:!kt,children:k?Ret():r==="paper"?M!=null&&M.repoUrl?vet():LN():r==="folder"?Bst():LN()})]})]})}function GI({onClose:e,onCreated:n,remote:t=!1}){const r=A.useRef(null),s=A.useRef(e);return s.current=e,A.useEffect(()=>{const i=r.current;if(!i)return;const a=document.activeElement instanceof HTMLElement?document.activeElement:null,o=()=>[...i.querySelectorAll('button:not([disabled]), input:not([disabled]), select:not([disabled]), textarea:not([disabled]), a[href], [tabindex]:not([tabindex="-1"])')];(i.querySelector("[data-initial-focus]")??o()[0]??i).focus();const l=u=>{if(u.key==="Escape"){u.preventDefault(),u.stopPropagation(),s.current();return}if(u.key==="Enter"&&(u.metaKey||u.ctrlKey)&&!u.altKey&&u.shiftKey){u.preventDefault(),u.stopPropagation();return}if(u.key!=="Tab")return;const h=o();if(h.length===0){u.preventDefault(),i.focus();return}const _=h[0],p=h[h.length-1];u.shiftKey&&document.activeElement===_?(u.preventDefault(),p.focus()):!u.shiftKey&&document.activeElement===p&&(u.preventDefault(),_.focus())};return document.addEventListener("keydown",l,!0),()=>{document.removeEventListener("keydown",l,!0),a==null||a.focus()}},[]),f.jsx("div",{className:"modal-backdrop fixed inset-0 bg-modal-backdrop flex items-start justify-center p-5 [--new-project-modal-top:clamp(4rem,20vh,24rem)] pt-[var(--new-project-modal-top)] overflow-y-auto z-100",onClick:i=>{i.target===i.currentTarget&&e()},children:f.jsxs("div",{ref:r,className:"modal w-120 max-w-full max-h-[calc(100vh_-_var(--new-project-modal-top)_-_1.25rem)] overflow-y-auto bg-background border border-border rounded-xl shadow-modal p-6 [&_h2]:mt-0 [&_h2]:mx-0 [&_h2]:mb-3.5 [&_h2]:text-xl [&_h2]:font-medium",role:"dialog","aria-modal":"true","aria-labelledby":"new-project-dialog-title",tabIndex:-1,children:[f.jsx("h2",{id:"new-project-dialog-title",children:$D()}),f.jsx(hxn,{onCancel:e,onCreated:n,remote:t})]})})}function pxn({project:e,deleting:n,error:t,onClose:r,onConfirm:s}){const i=A.useRef(null),a=A.useRef(r),o=A.useRef(n);a.current=r,o.current=n,A.useEffect(()=>{const u=i.current;if(!u)return;const h=document.activeElement instanceof HTMLElement?document.activeElement:null,_=()=>[...u.querySelectorAll('button:not([disabled]), [tabindex]:not([tabindex="-1"])')];(_()[0]??u).focus();const p=m=>{if(m.key==="Escape"){m.preventDefault(),o.current||a.current();return}if(m.key!=="Tab")return;const x=_();if(x.length===0){m.preventDefault(),u.focus();return}const k=x[0],v=x[x.length-1];m.shiftKey&&document.activeElement===k?(m.preventDefault(),v.focus()):!m.shiftKey&&document.activeElement===v&&(m.preventDefault(),k.focus())};return document.addEventListener("keydown",p,!0),()=>{document.removeEventListener("keydown",p,!0),h==null||h.focus()}},[]);const l=!!(e.githubEnabled&&(e.githubUrl||e.githubOwner&&e.githubRepo));return f.jsx("div",{className:"modal-backdrop fixed inset-0 bg-modal-backdrop flex items-center justify-center p-5 overflow-y-auto z-100",onClick:u=>{!n&&u.target===u.currentTarget&&r()},children:f.jsxs("div",{ref:i,className:"modal w-110 max-w-full bg-background border border-border rounded-xl shadow-modal p-6",role:"dialog","aria-modal":"true","aria-labelledby":"delete-project-dialog-title","aria-describedby":"delete-project-dialog-description",tabIndex:-1,children:[f.jsx("h2",{id:"delete-project-dialog-title",className:"mt-0 mb-3 text-xl",children:ebt()}),f.jsxs("div",{id:"delete-project-dialog-description",className:"flex flex-col gap-2 text-sm leading-normal text-subtext",children:[f.jsx("p",{className:"m-0",children:yvt({name:qo(e.name)})}),f.jsx("p",{className:"m-0",children:l?Nbt():Obt()}),t&&f.jsx("p",{className:"m-0 text-accent-red",role:"alert",children:t})]}),f.jsxs("div",{className:"mt-5 flex justify-end gap-2",children:[f.jsx(Me,{disabled:n,onClick:r,children:Pvt()}),f.jsx(Me,{variant:"danger",disabled:n,onClick:s,children:n?hbt():obt()})]})]})})}function aj(){return f.jsx("span",{className:"activity-pulse h-2 w-2 shrink-0 rounded-full bg-accent-teal animate-[or-pulse_1.2s_ease-in-out_infinite]"})}function mxn({projects:e,onOpen:n,onCreated:t,onDeleted:r,remote:s=!1}){const[i,a]=A.useState(!1),[o,l]=A.useState(null),[u,h]=A.useState(null),[_,p]=A.useState(null),m=ft(ugn()),x=Object.fromEntries((m.data??[]).map(v=>[v.projectId,v]));async function k(v){l(v.id),h(null);try{await Spn(v.id),h(null),p(null),r(v.id)}catch(b){h(b instanceof Error?b.message:String(b))}finally{l(null)}}return f.jsxs("div",{className:"home flex-1 min-h-0 overflow-y-auto [scrollbar-gutter:stable_both-edges] bg-canvas",children:[f.jsxs("div",{className:"home-inner max-w-290 my-0 mx-auto pt-12 px-6 pb-16 [@media((max-width:_960px))]:pt-6 [@media((max-width:_960px))]:px-4",children:[f.jsxs("div",{className:"home-head flex items-center justify-between gap-3 mb-4.5 [&_h2]:m-0 [&_h2]:text-4xl [&_h2]:tracking-[-0.02em] [@media((max-width:_520px))]:items-start [@media((max-width:_520px))]:flex-col",children:[f.jsx("h2",{children:oyt()}),f.jsxs(Me,{onClick:()=>a(!0),children:[f.jsx(yh,{size:15})," ",$D()]})]}),f.jsx("div",{className:"home-list overflow-hidden rounded-lg border border-border bg-background",children:f.jsxs("div",{children:[f.jsxs("div",{className:"grid grid-cols-[minmax(0,1fr)_9rem_9rem_minmax(18rem,max-content)] items-center gap-3 border-b border-border bg-background py-2.5 ps-4 pe-2 text-xs font-medium tracking-[0.06em] text-text uppercase [@media((max-width:_960px))]:hidden",children:[f.jsx("span",{children:eyt()}),f.jsx("span",{children:XN()}),f.jsx("span",{children:YN()}),f.jsx("span",{children:ZN()})]}),e.length===0?f.jsx("div",{className:"py-8 px-4 text-sm text-muted",children:Kbt()}):[...e].sort((v,b)=>{var C,N;const w=((C=x[v.id])==null?void 0:C.lastMessageAt)??v.createdAt;return(((N=x[b.id])==null?void 0:N.lastMessageAt)??b.createdAt)-w||v.name.localeCompare(b.name)}).map(v=>{const b=x[v.id],w=v.githubEnabled?v.githubUrl??(v.githubOwner&&v.githubRepo?`https://github.com/${v.githubOwner}/${v.githubRepo}`:null):null,y=w?v.githubOwner&&v.githubRepo?`${v.githubOwner}/${v.githubRepo}`:w.replace(/^https?:\/\/github\.com\//,"").replace(/\.git$/,"").replace(/\/$/,""):vv(),C=b?b.activeAgents>0?avt({count:Jt(b.activeAgents)}):yyt():"—",N=b?b.totalAgents===1?Myt():dvt({count:Jt(b.totalAgents)}):"—",E=b?b.runningExperiments>0?Pyt({count:Jt(b.runningExperiments)}):b.totalExperiments===0?Bk():JN({count:Jt(b.totalExperiments)}):"—",T=b&&b.runningExperiments>0?JN({count:Jt(b.totalExperiments)}):null;return f.jsxs("div",{className:"group project-row relative grid cursor-pointer grid-cols-[minmax(0,1fr)_9rem_9rem_minmax(18rem,max-content)] items-center gap-3 border-b border-border-variant py-4 ps-4 pe-2 text-start transition-colors duration-120 ease-standard last:border-b-0 hover:bg-surface-bright focus-within:bg-surface-bright [@media((max-width:_960px))]:grid-cols-[minmax(0,0.8fr)_minmax(0,0.8fr)_minmax(0,1.4fr)] [@media((max-width:_960px))]:items-start [@media((max-width:_960px))]:gap-x-4 [@media((max-width:_960px))]:gap-y-3 [@media((max-width:_960px))]:py-4 [@media((max-width:_960px))]:px-4 [@media((max-width:_600px))]:grid-cols-2",children:[f.jsx("button",{className:"project-row-open absolute inset-0 z-0 cursor-pointer rounded-[inherit] focus-visible:outline focus-visible:outline-2 focus-visible:outline-text focus-visible:outline-offset-[-2px]","aria-label":wY({name:qo(v.name)}),onClick:()=>n(v.id)}),f.jsxs("div",{className:"relative z-1 flex min-w-0 flex-col gap-1 pointer-events-none [@media((max-width:_960px))]:col-span-3 [@media((max-width:_600px))]:col-span-2",children:[f.jsx("span",{dir:"auto",className:"project-row-title whitespace-normal break-words text-base font-semibold text-text pointer-events-none",children:v.name}),f.jsxs("span",{className:"relative z-2 flex items-center gap-1.5 text-xs text-muted [@media((max-width:_960px))]:flex-wrap",children:[f.jsxs("span",{children:[Kvt()," ",Vo(v.createdAt)]}),v.paperId&&f.jsx("span",{"aria-hidden":"true",children:"·"}),v.paperId&&f.jsxs("span",{children:[Mvt()," ",Ne(v.paperId)]}),f.jsx("button",{className:"project-row-secondary project-row-delete inline-flex h-5 w-5 shrink-0 items-center justify-center rounded-sm leading-0 text-muted opacity-0 pointer-events-none transition-opacity hover:bg-surface hover:text-accent-red group-hover:opacity-100 group-hover:pointer-events-auto group-focus-within:opacity-100 group-focus-within:pointer-events-auto focus:opacity-100 focus:pointer-events-auto focus-visible:outline focus-visible:outline-2 focus-visible:outline-text","aria-label":Q4({name:qo(v.name)}),disabled:o===v.id,onClick:j=>{j.stopPropagation(),h(null),p(v)},children:f.jsx(lf,{size:14})})]})]}),f.jsxs("div",{className:"relative z-1 flex min-w-0 flex-col gap-1 pointer-events-none",children:[f.jsx("span",{className:"hidden text-xs font-medium tracking-[0.06em] text-text uppercase [@media((max-width:_960px))]:block",children:XN()}),f.jsxs("span",{className:"inline-flex items-center gap-2 text-sm text-text",children:[b&&b.activeAgents>0&&f.jsx(aj,{}),C]}),f.jsx("span",{className:"text-xs text-muted",children:N})]}),f.jsxs("div",{className:"relative z-1 flex min-w-0 flex-col gap-1 pointer-events-none",children:[f.jsx("span",{className:"hidden text-xs font-medium tracking-[0.06em] text-text uppercase [@media((max-width:_960px))]:block",children:YN()}),f.jsxs("span",{className:"inline-flex items-center gap-2 text-sm text-text",children:[b&&b.runningExperiments>0&&f.jsx(aj,{}),E]}),T&&f.jsx("span",{className:"text-xs text-muted",children:T})]}),f.jsxs("div",{className:"relative z-1 min-w-0 pointer-events-none [@media((max-width:_600px))]:col-span-2",children:[f.jsx("span",{className:"hidden text-xs font-medium tracking-[0.06em] text-text uppercase [@media((max-width:_960px))]:mb-1 [@media((max-width:_960px))]:block",children:ZN()}),w?f.jsxs("a",{className:"project-row-secondary inline-flex max-w-full items-center gap-2 text-sm text-text no-underline pointer-events-auto hover:underline underline-offset-2",href:w,target:"_blank",rel:"noreferrer","aria-label":hv({name:qo(v.name)}),children:[f.jsx("span",{className:"inline-flex shrink-0",children:f.jsx(Rb,{size:14})}),f.jsx("span",{className:"overflow-hidden text-ellipsis whitespace-nowrap [@media((max-width:_960px))]:whitespace-normal [@media((max-width:_960px))]:break-all",children:Ne(y)})]}):f.jsx("span",{className:"text-sm text-text pointer-events-none",children:y})]})]},v.id)})]})})]}),i&&f.jsx(GI,{remote:s,onClose:()=>a(!1),onCreated:(v,b)=>{a(!1),t(v,b)}}),_&&f.jsx(pxn,{project:_,deleting:o===_.id,error:u,onClose:()=>{h(null),p(null)},onConfirm:()=>void k(_)})]})}function VI(){const e=A.useSyncExternalStore(ign,Nz,Nz);return f.jsxs(f.Fragment,{children:[f.jsx("span",{className:"sr-only",role:"status","aria-live":"polite",children:e?"":J4()}),!e&&f.jsxs("div",{className:"offline-banner flex items-center gap-2 shrink-0 py-1.5 px-3.5 text-sm text-text bg-accent-amber-subtle border-b border-b-accent-amber","aria-hidden":!0,children:[f.jsx(Zk,{size:13,className:"shrink-0 text-accent-amber"}),f.jsx("span",{dir:"auto",className:"min-w-0",children:J4()})]})]})}function gxn({onClose:e,onConfigureSsh:n}){var v,b;const t=vn({mutationFn:w=>x0n(...w)}),r=ft(ML()),s=ft(Imn()),i=r.data??null,a=s.data??[],[o,l]=A.useState(""),u=i?null:((v=r.error)==null?void 0:v.message)??((b=s.error)==null?void 0:b.message)??null,[h,_]=A.useState(null),p=A.useRef(null);kb(p,e);async function m(w){const y=window.open("/remote-launch","_blank");if(!y){Vn(p4t(),"error");return}_(w);try{const C=await t.mutateAsync([w,{theme:ggn(),locale:z()}]);y.location.replace(C.gatewayUrl),e()}catch(C){y.close(),Vn(C instanceof Error?C.message:String(C),"error")}finally{_(null)}}const x=i==null?void 0:i.filter(w=>w.host.toLocaleLowerCase().includes(o.trim().toLocaleLowerCase())),k=new Map(a.map(w=>[w.host,w]));return Oa.createPortal(f.jsx("div",{className:"fixed inset-0 z-200 flex items-center justify-center bg-modal-backdrop p-5",onClick:w=>{w.target===w.currentTarget&&e()},children:f.jsxs("div",{ref:p,className:"relative flex h-[min(42rem,calc(100vh-2.5rem))] w-160 max-w-full flex-col overflow-hidden rounded-xl border border-border bg-background shadow-modal",role:"dialog","aria-modal":"true","aria-labelledby":"remote-host-dialog-title",tabIndex:-1,children:[f.jsx(Ft,{className:"absolute end-3.5 top-3.5","aria-label":Kxt(),onClick:e,children:f.jsx(_r,{size:16})}),f.jsxs("div",{className:"shrink-0 px-6 pt-5 pb-4 pe-14",children:[f.jsx("h2",{id:"remote-host-dialog-title",className:"m-0 text-xl font-medium",children:n3()}),f.jsx("p",{className:"mt-2 mb-0 text-sm leading-normal text-subtext",children:e2t()}),f.jsx(as,{"data-initial-focus":!0,className:"mt-4",value:o,onChange:w=>l(w.target.value),placeholder:nz(),"aria-label":nz()})]}),f.jsx("div",{className:"min-h-0 flex-1 overflow-y-auto border-t border-border-variant p-2",children:u?f.jsx("p",{className:"m-3 text-sm text-accent-red",children:u}):i===null?f.jsxs("div",{className:"flex items-center gap-2 p-3 text-sm text-subtext",children:[f.jsx(Rt,{})," ",tL()]}):(x==null?void 0:x.length)===0?f.jsx("p",{className:"m-3 text-sm text-subtext",children:Fwt()}):x==null?void 0:x.map(w=>{const y=k.get(w.host);return f.jsxs(Me,{variant:"ghost",className:"w-full justify-start text-base font-normal",disabled:h===w.host,onClick:()=>void m(w.host),children:[f.jsx("span",{className:"min-w-0 flex-1 truncate text-start",children:w.host}),h===w.host?f.jsx(Rt,{}):y?f.jsx("span",{className:"text-sm text-subtext",children:t4t()}):null]},w.host)})}),f.jsx("div",{className:"shrink-0 border-t border-border-variant p-2",children:f.jsxs(Me,{variant:"ghost",className:"w-full justify-start text-base font-normal",onClick:n,children:[f.jsx(EI,{size:15}),_L()]})})]})}),document.body)}function Tv({size:e=16,className:n}){return f.jsxs("svg",{width:e,height:e,viewBox:"0 0 16 16",fill:"currentColor",className:n,"aria-hidden":"true",children:[f.jsx("path",{d:"M3.14573 5.14704C3.34064 4.95221 3.65776 4.95237 3.85277 5.14704L7.85277 9.14704L7.85374 9.14606C8.04873 9.34105 8.0487 9.65809 7.85374 9.8531L3.85374 13.8531C3.7558 13.951 3.62815 13.9995 3.50023 13.9996C3.37223 13.9996 3.24373 13.9501 3.14573 13.8531C2.95103 13.6581 2.95083 13.341 3.14573 13.1461L6.79222 9.50056L3.14573 5.85407C2.95104 5.65905 2.95084 5.34194 3.14573 5.14704Z"}),f.jsx("path",{d:"M12.1457 1.14704C12.3406 0.952206 12.6578 0.952371 12.8528 1.14704C13.0477 1.34202 13.0477 1.65907 12.8528 1.85407L9.20726 5.50056L12.8537 9.14704C13.0487 9.34202 13.0487 9.65907 12.8537 9.85407C12.7558 9.95101 12.6282 10.0005 12.5002 10.0006C12.3722 10.0006 12.2437 9.95207 12.1457 9.85407L8.14573 5.85407C7.95104 5.65905 7.95084 5.34194 8.14573 5.14704L12.1457 1.14704Z"})]})}const vxn="data:image/svg+xml,%3csvg%20width='512'%20height='512'%20viewBox='0%200%20512%20512'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3cpath%20d='M0%20179.2C0%20116.474%200%2085.1112%2012.2073%2061.1531C22.9451%2040.0789%2040.0789%2022.9451%2061.1531%2012.2073C85.1112%200%20116.474%200%20179.2%200H332.8C395.526%200%20426.889%200%20450.847%2012.2073C471.921%2022.9451%20489.055%2040.0789%20499.793%2061.1531C512%2085.1112%20512%20116.474%20512%20179.2V332.8C512%20395.526%20512%20426.889%20499.793%20450.847C489.055%20471.921%20471.921%20489.055%20450.847%20499.793C426.889%20512%20395.526%20512%20332.8%20512H179.2C116.474%20512%2085.1112%20512%2061.1531%20499.793C40.0789%20489.055%2022.9451%20471.921%2012.2073%20450.847C0%20426.889%200%20395.526%200%20332.8V179.2Z'%20fill='url(%23paint0_linear_496_292)'/%3e%3crect%20opacity='0.25'%20x='128'%20y='84'%20width='224'%20height='44'%20rx='22'%20fill='white'%20style='fill:white;fill-opacity:1;'/%3e%3crect%20x='64'%20y='84'%20width='224'%20height='44'%20rx='22'%20fill='white'%20style='fill:white;fill-opacity:1;'/%3e%3crect%20opacity='0.25'%20x='224'%20y='144'%20width='224'%20height='44'%20rx='22'%20fill='white'%20style='fill:white;fill-opacity:1;'/%3e%3crect%20x='160'%20y='144'%20width='224'%20height='44'%20rx='22'%20fill='white'%20style='fill:white;fill-opacity:1;'/%3e%3crect%20opacity='0.25'%20x='168'%20y='204'%20width='224'%20height='44'%20rx='22'%20fill='white'%20style='fill:white;fill-opacity:1;'/%3e%3crect%20x='104'%20y='204'%20width='224'%20height='44'%20rx='22'%20fill='white'%20style='fill:white;fill-opacity:1;'/%3e%3crect%20opacity='0.25'%20x='112'%20y='264'%20width='224'%20height='44'%20rx='22'%20fill='white'%20style='fill:white;fill-opacity:1;'/%3e%3crect%20x='48'%20y='264'%20width='224'%20height='44'%20rx='22'%20fill='white'%20style='fill:white;fill-opacity:1;'/%3e%3crect%20opacity='0.25'%20x='176'%20y='324'%20width='224'%20height='44'%20rx='22'%20fill='white'%20style='fill:white;fill-opacity:1;'/%3e%3crect%20x='112'%20y='324'%20width='224'%20height='44'%20rx='22'%20fill='white'%20style='fill:white;fill-opacity:1;'/%3e%3crect%20opacity='0.25'%20x='304'%20y='384'%20width='152'%20height='44'%20rx='22'%20fill='white'%20style='fill:white;fill-opacity:1;'/%3e%3crect%20x='240'%20y='384'%20width='152'%20height='44'%20rx='22'%20fill='white'%20style='fill:white;fill-opacity:1;'/%3e%3cdefs%3e%3clinearGradient%20id='paint0_linear_496_292'%20x1='-219.792'%20y1='229.426'%20x2='239.06'%20y2='702.601'%20gradientUnits='userSpaceOnUse'%3e%3cstop%20stop-color='%236E7EF3'%20style='stop-color:%236E7EF3;stop-color:color(display-p3%200.4303%200.4946%200.9515);stop-opacity:1;'/%3e%3cstop%20offset='1'%20stop-color='%234F13BE'%20style='stop-color:%234F13BE;stop-color:color(display-p3%200.3079%200.0763%200.7470);stop-opacity:1;'/%3e%3c/linearGradient%3e%3c/defs%3e%3c/svg%3e",bxn="/assets/ollama-logo-Bt9O-2K_.png",yxn="data:image/svg+xml,%3csvg%20xmlns='http://www.w3.org/2000/svg'%20width='160'%20height='160'%20viewBox='0%200%20160%20160'%3e%3cdefs%3e%3cfilter%20id='shadow'%20x='-10%25'%20y='-10%25'%20width='130%25'%20height='130%25'%3e%3cfeDropShadow%20dx='0'%20dy='2'%20stdDeviation='6'%20flood-color='%23000'%20flood-opacity='0.15'/%3e%3c/filter%3e%3clinearGradient%20id='bg'%20x1='0'%20y1='0'%20x2='0'%20y2='1'%3e%3cstop%20offset='0%25'%20stop-color='%23ffffff'/%3e%3cstop%20offset='100%25'%20stop-color='%23f0f0f0'/%3e%3c/linearGradient%3e%3c/defs%3e%3crect%20x='10'%20y='10'%20width='140'%20height='140'%20rx='32'%20fill='url(%23bg)'%20filter='url(%23shadow)'/%3e%3cg%20transform='translate(25,%2025)%20scale(0.0221)'%3e%3cg%20transform='translate(0,4970)%20scale(1,-1)'%20fill='%23000000'%20stroke='none'%3e%3cpath%20d='M2275%204349%20c-408%20-39%20-769%20-207%20-1056%20-492%20-196%20-194%20-333%20-428%20-418%20-715%20-47%20-158%20-67%20-281%20-101%20-617%20-66%20-662%20-116%20-944%20-245%20-1387%20-102%20-352%20-271%20-774%20-420%20-1051%20-19%20-35%20-35%20-70%20-35%20-76%200%20-8%2050%20-11%20163%20-11%20l164%200%2080%20168%20c168%20348%20303%20739%20408%201175%2073%20307%20109%20532%20155%20982%2052%20500%2072%20627%20122%20785%20162%20507%20570%20860%201096%20951%20155%2026%20389%2026%20544%200%20221%20-38%20440%20-129%20620%20-258%2045%20-32%20152%20-126%20237%20-209%2086%20-82%20178%20-165%20204%20-183%20106%20-72%20312%20-150%20495%20-186%20l32%20-7%20-86%20-54%20c-110%20-69%20-170%20-117%20-267%20-212%20-93%20-91%20-143%20-154%20-191%20-243%20-105%20-191%20-130%20-406%20-75%20-623%2029%20-115%2081%20-239%20217%20-516%20234%20-480%20343%20-769%20411%20-1091%2036%20-172%2048%20-252%2057%20-381%20l7%20-98%20158%200%20158%200%20-4%2028%20c-2%2015%20-6%2066%20-9%20113%20-14%20218%20-95%20560%20-201%20849%20-81%20220%20-165%20407%20-363%20810%20-120%20245%20-147%20320%20-161%20443%20-38%20338%20202%20621%20766%20906%20131%2065%20166%20126%20106%20183%20-33%2031%20-86%2047%20-288%2088%20-177%2036%20-274%2061%20-370%2097%20-140%2052%20-190%2088%20-377%20270%20-140%20137%20-202%20189%20-300%20254%20-378%20250%20-782%20351%20-1233%20308z%20M3050%203391%20c-57%20-11%20-122%20-53%20-154%20-99%20-41%20-57%20-49%20-158%20-18%20-218%2029%20-56%2066%20-92%20120%20-117%20153%20-69%20323%2037%20325%20203%201%20147%20-131%20259%20-273%20231z%20M1985%201391%20c-68%20-31%20-70%20-40%20-66%20-271%201%20-114%20-2%20-243%20-9%20-290%20-40%20-307%20-124%20-555%20-255%20-754%20-25%20-38%20-45%20-71%20-45%20-72%200%20-2%2079%20-4%20176%20-4%20l175%200%2054%20113%20c117%20247%20182%20512%20201%20812%207%20126%20-9%20319%20-32%20374%20-26%2063%20-86%20111%20-136%20111%20-13%200%20-41%20-9%20-63%20-19z'/%3e%3c/g%3e%3c/g%3e%3c/svg%3e",KI={id:"lmstudio",label:"LM Studio",icon:vxn,url:"http://127.0.0.1:1234/v1"},H1=[KI,{id:"omlx",label:"oMLX",icon:yxn,url:"http://127.0.0.1:8000/v1"},{id:"ollama",label:"Ollama",icon:bxn,url:"http://127.0.0.1:11434/v1"},{id:"openai-compatible",label:"Custom Endpoint",icon:null,url:"http://127.0.0.1:8000/v1"}];function WI({installed:e,onConnected:n,dialogOnly:t=!1,onClose:r}){var Y,te;const s=mh(),i=ft({...Vmn(),enabled:!t}),a=ft(bu()),o=(Y=a.data)==null?void 0:Y.find($=>$.id==="opencode"),[l,u]=A.useState(t),h=()=>{u(!1),r==null||r()},[_,p]=A.useState("lmstudio"),m=H1.find($=>$.id===_)??KI,[x,k]=A.useState({}),v=x[m.id]??{baseUrl:m.url,apiKey:"",models:[],model:null,contextWindow:"32768",error:null},{baseUrl:b,models:w,model:y,contextWindow:C,error:N}=v,E=m.id==="ollama"?"":v.apiKey,T=$=>{k(L=>({...L,[m.id]:{...L[m.id]??v,...$}}))},j=vn({mutationFn:Cmn}),M=vn({mutationFn:async $=>{var G;const L=await Emn($);if(!((G=(await s.fetchQuery({...bu(),staleTime:0})).find(V=>V.id==="opencode"))!=null&&G.models.some(V=>V.id===L.model)))throw new Error(oQe());return L}}),D=vn({mutationFn:zmn}),I=Number(C),P=j.isPending||M.isPending,U=($={})=>T({models:[],model:null,error:null,...$}),q=async()=>{U();try{const $=await j.mutateAsync({baseUrl:b.trim(),apiKey:E});T({models:$.models,model:$.models[0]??null})}catch($){T({error:$ instanceof Error?$.message:String($)})}},W=async()=>{if(y){T({error:null});try{const $=await M.mutateAsync({name:m.label,baseUrl:b.trim(),apiKey:E,model:y,contextWindow:I});h(),n==null||n($.model)}catch($){T({error:$ instanceof Error?$.message:String($)})}}},H=async $=>{try{await D.mutateAsync($)}catch(L){Vn(L instanceof Error?L.message:String(L),"error")}};return f.jsxs(f.Fragment,{children:[!t&&f.jsxs("section",{className:"mt-4 space-y-3 border-t border-border pt-4","aria-label":AN(),children:[f.jsxs("div",{className:"flex flex-wrap items-center justify-between gap-3",children:[f.jsx("h3",{className:"text-base font-medium",children:AN()}),f.jsxs(Me,{disabled:P,onClick:()=>u(!0),"aria-haspopup":"dialog",children:[f.jsx(yh,{size:14}),SD()]})]}),i.error&&f.jsx("p",{className:"text-sm text-accent-red",role:"alert",children:i.error.message}),f.jsx("div",{className:"space-y-3",children:(te=i.data)==null?void 0:te.map($=>f.jsx(xxn,{connection:$,harnessReady:(o==null?void 0:o.agentReady)??!1,availableModels:(o==null?void 0:o.models.map(L=>L.id))??[],checking:a.isFetching,unknown:a.isError||!a.data,disabled:P||D.isPending,onRemove:()=>void H($.id)},$.id))})]}),l&&f.jsx(wxn,{busy:P,onClose:h,footer:f.jsxs(Me,{variant:"primary",disabled:P||!e||w.length>0&&(!y||!Number.isSafeInteger(I)||I<4096),onClick:()=>void(w.length>0?W():q()),children:[P&&f.jsx(Rt,{}),w.length>0?pXe():WWe()]}),children:f.jsxs("div",{className:"space-y-4",children:[!e&&f.jsxs("div",{className:"text-sm text-text",children:[f.jsx("p",{children:tXe()}),f.jsx(Zd,{href:"https://opencode.ai/docs/#install",target:"_blank",rel:"noreferrer",children:WQe()})]}),f.jsx(yu,{choices:H1,value:_,title:TN(),header:TN(),variant:"field",floating:!0,dropDown:!0,disabled:P,renderLabel:$=>f.jsxs(f.Fragment,{children:[$.id==="openai-compatible"?Mk():$.label,$.id==="openai-compatible"&&f.jsx("span",{className:"ml-1 text-xs font-normal text-subtext",children:CD()})]}),renderIcon:$=>{var F;const L=(F=H1.find(G=>G.id===$.id))==null?void 0:F.icon;return L?f.jsx("img",{src:L,alt:"",width:14,height:14,className:`size-3.5 shrink-0 object-contain${$.id==="ollama"?" dark:invert":""}`}):f.jsx(yI,{size:14,className:"shrink-0"})},onSelect:p}),f.jsxs("label",{className:"block space-y-1 text-sm text-subtext",children:[f.jsx("span",{children:FWe()}),f.jsx(as,{value:b,disabled:P,onChange:$=>{U({baseUrl:$.target.value})}})]}),m.id!=="ollama"&&f.jsxs("details",{className:"text-sm text-text",children:[f.jsx("summary",{className:"cursor-pointer",children:VD()}),f.jsxs("label",{className:"block space-y-1 mt-3 text-sm text-subtext",children:[f.jsx("span",{children:m.id==="lmstudio"?OXe():lXe()}),f.jsx(as,{type:"password",autoComplete:"off",value:E,disabled:P,onChange:$=>U({apiKey:$.target.value})})]})]},m.id),w.length>0&&f.jsxs(f.Fragment,{children:[f.jsx(yu,{choices:w.map($=>({id:$,label:$})),value:y,searchPlaceholder:zD(),title:Yp(),header:Yp(),variant:"field",floating:!0,dropDown:!0,disabled:P,onSelect:$=>{T({model:$})}}),f.jsxs("label",{className:"block space-y-1 text-sm text-subtext",children:[f.jsx("span",{children:xQe()}),f.jsx(as,{type:"number",min:4096,step:1024,value:C,disabled:P,onChange:$=>{T({contextWindow:$.target.value})}})]}),f.jsx("p",{className:"text-sm text-subtext",children:zQe()})]}),N&&f.jsx("p",{className:"text-sm text-accent-red",role:"alert",children:N})]})})]})}function xxn({connection:e,harnessReady:n,availableModels:t,checking:r,unknown:s,disabled:i,onRemove:a}){const o=vn({mutationFn:async()=>{try{await Nmn(e.id)}finally{await Xd(!0)}}}),l=H1.find(x=>x.label===e.name||x.id==="openai-compatible"&&["OpenAI-compatible server","Custom endpoint"].includes(e.name)),u=Object.keys(e.models),h=u.length>0&&n&&u.every(x=>t.includes(`${e.id}/${x}`)),_=o.isPending||r,p=s,m=h;return f.jsxs("div",{className:"@container min-w-0 px-4 py-4",children:[f.jsxs("div",{className:"flex flex-col items-stretch gap-3 @sm:flex-row @sm:items-center @sm:justify-between",children:[f.jsxs("div",{className:"flex min-w-0 flex-1 items-start gap-3",children:[l!=null&&l.icon?f.jsx("img",{src:l.icon,alt:"",width:20,height:20,className:`mt-0.5 size-5 shrink-0 object-contain${l.id==="ollama"?" dark:invert":""}`}):f.jsx(yI,{size:20,className:"mt-0.5 shrink-0"}),f.jsxs("div",{className:"min-w-0 space-y-1",children:[f.jsx("div",{className:"text-base font-medium break-words",children:u.join(", ")}),f.jsxs("div",{className:"text-sm text-subtext break-all",children:[(l==null?void 0:l.id)==="openai-compatible"?Mk():(l==null?void 0:l.label)??e.name,(l==null?void 0:l.id)==="openai-compatible"&&f.jsx("span",{className:"ml-1 text-xs font-normal text-subtext",children:CD()})," · ",e.baseUrl]})]})]}),f.jsxs("div",{className:"flex shrink-0 flex-col items-end gap-1 self-end @sm:self-auto @lg:flex-row @lg:items-center @lg:gap-2",children:[f.jsx("span",{role:"status",children:f.jsx(Gt,{variant:_||p?"default":m?"success":"warning",children:_?sa():p?rL():m?hQe():so()})}),f.jsxs("div",{className:"flex items-center gap-1",children:[f.jsxs(Me,{variant:"ghost",disabled:i||o.isPending,onClick:()=>o.mutate(),children:[f.jsx(La,{size:14}),gv()]}),f.jsx(Ft,{"aria-label":FQe({name:e.name}),disabled:i||o.isPending,onClick:a,children:f.jsx(lf,{size:14})})]})]})]}),o.error&&!m&&f.jsx("p",{className:"mt-2 text-sm text-accent-red",role:"alert",children:o.error.message})]})}function wxn({busy:e,onClose:n,footer:t,children:r}){const s=A.useRef(null),i=()=>{e||n()};return kb(s,i,"input"),Oa.createPortal(f.jsx("div",{className:"fixed inset-0 z-200 flex items-center justify-center bg-modal-backdrop p-5",onClick:a=>{a.target===a.currentTarget&&i()},children:f.jsxs("div",{ref:s,role:"dialog","aria-modal":"true","aria-labelledby":"local-model-dialog-title",tabIndex:-1,className:"relative flex max-h-full w-140 max-w-full flex-col rounded-xl border border-border bg-background shadow-modal",children:[f.jsx("div",{className:"shrink-0 px-6 pt-5 pb-4 pe-14",children:f.jsx("h2",{id:"local-model-dialog-title",className:"m-0 text-xl font-medium",children:SD()})}),f.jsx(Ft,{className:"absolute end-3.5 top-3.5","aria-label":P_(),onClick:i,disabled:e,children:f.jsx(_r,{size:16})}),f.jsx("div",{className:"min-h-0 overflow-y-auto px-6 pb-2",children:r}),f.jsxs("div",{className:"flex shrink-0 justify-end gap-2 px-6 py-4",children:[f.jsx(Me,{onClick:i,disabled:e,children:P_()}),t]})]})}),document.body)}const QI=["model-group flex items-center justify-between gap-2","text-sm font-medium text-text pt-2.5 px-2 pb-1.5"].join(" "),oj=["model-more [&_code]:font-mono [&_code]:text-xs","[&_code]:bg-panel [&_code]:border [&_code]:border-border-variant","[&_code]:rounded-xs [&_code]:py-px [&_code]:px-[5px] [&_code]:whitespace-nowrap","pt-1 px-2 pb-2 text-sm text-muted"].join(" "),qp={"claude-code":"Claude Code",codex:"Codex",opencode:"OpenCode",cursor:"Cursor",antigravity:"Google Antigravity"};function kxn(e){var r,s;const n=e.find(i=>i.agentReady);if(!n)return null;const t=((r=n.models[0])==null?void 0:r.id)??null;return{harness:n.id,model:t,serviceTier:wv(n,t,null),permissionMode:((s=n.options)==null?void 0:s.defaultPermissionMode)??null,reasoningLevel:wb(n,t).defaultId}}function _o(e){const[n,t]=A.useState(!1),r=A.useRef(null);return A.useEffect(()=>{if(!n)return;const s=a=>{var o,l;a.target instanceof Node&&!((o=r.current)!=null&&o.contains(a.target))&&!((l=e==null?void 0:e.current)!=null&&l.contains(a.target))&&t(!1)},i=a=>{var o;a.key==="Escape"&&(a.preventDefault(),a.stopPropagation(),t(!1),(o=e==null?void 0:e.current)==null||o.focus())};return document.addEventListener("mousedown",s,!0),document.addEventListener("keydown",i,!0),()=>{document.removeEventListener("mousedown",s,!0),document.removeEventListener("keydown",i,!0)}},[n,e]),{open:n,setOpen:t,ref:r}}function Sxn({value:e,onSelect:n,onOpenSettings:t,permissionChoices:r=[],defaultPermissionId:s,onSelectPermission:i,reasoningChoices:a=[],defaultReasoningId:o,onSelectReasoning:l,lockHarness:u=!1,className:h}){var X,oe,le,_e,pe,Ee,Ie;const{data:_=Cxn}=ft(bu()),p=mh(),[m,x]=A.useState(!1),k=A.useRef(null),v=A.useRef(null),{open:b,setOpen:w,ref:y}=_o(k),[C,N]=A.useState(""),[E,T]=A.useState("root"),j=()=>{w(!1),T("root"),N("")};A.useEffect(()=>{var ze;b&&(E==="reasoning"||E==="speed"||E==="permissions")&&((ze=v.current)==null||ze.focus())},[b,E]);const M=A.useMemo(()=>{const ze=C.trim().toLowerCase();return(u&&e?_.filter(Oe=>Oe.id===e.harness):_).map(Oe=>{let Xe=Oe.models;return ze?Xe=Xe.filter(_t=>`${_t.id} ${I1(_t)}`.toLowerCase().includes(ze)):(Oe.id==="opencode"||Oe.id==="cursor"||Oe.id==="antigravity")&&(Xe=Xe.slice(0,5)),{harness:Oe,models:Xe,hidden:ze?0:Oe.models.length-Xe.length}})},[_,C,u,e]),D=(ze,He)=>{var Xe;const Oe=(e==null?void 0:e.harness)===ze.id;n({harness:ze.id,model:He,serviceTier:wv(ze,He,Oe?e==null?void 0:e.serviceTier:null),permissionMode:Oe?e.permissionMode:((Xe=ze.options)==null?void 0:Xe.defaultPermissionMode)??null,reasoningLevel:TL(ze,He,Oe?e.reasoningLevel:null)}),j()},I=(e==null?void 0:e.model)!=null?(X=_.find(ze=>ze.id===e.harness))==null?void 0:X.models.find(ze=>ze.id===e.model):void 0,P=e?e.model?I?I1(I):_3(e.model):RN():Yp(),U=(e==null?void 0:e.reasoningLevel)??o??((oe=a[0])==null?void 0:oe.id),q=(le=a.find(ze=>ze.id===U))==null?void 0:le.label,W=(e==null?void 0:e.permissionMode)??s??((_e=r[0])==null?void 0:_e.id),H=(pe=r.find(ze=>ze.id===W))==null?void 0:pe.label,Y=(e==null?void 0:e.harness)==="opencode"?cJe():GYe(),te=_.find(ze=>ze.id===(e==null?void 0:e.harness)),$=jL(te,e==null?void 0:e.model),L=wv(te,e==null?void 0:e.model,e==null?void 0:e.serviceTier),F=(Ee=$.find(ze=>ze.id===L))==null?void 0:Ee.label,G=ze=>{l==null||l(ze),j()},V=ze=>{i==null||i(ze),j()},ee=ze=>{e&&n({...e,serviceTier:ze}),j()},ce=(ze,He,Oe)=>f.jsxs("button",{type:"button",className:"model-root-row flex w-full items-center gap-2 rounded-sm px-2 py-1.5 text-start text-sm text-text hover:bg-surface","aria-haspopup":"menu",onClick:()=>T(Oe),children:[f.jsx("span",{className:"flex-1",children:ze}),He&&f.jsx("span",{className:"max-w-36 truncate text-sm text-muted",children:He}),f.jsx(Da,{size:14,className:"shrink-0 text-muted"})]}),ae=ze=>f.jsxs("div",{className:"flex shrink-0 items-center border-b border-border-variant px-1 py-1",children:[f.jsx(Ft,{ref:v,type:"button",size:"small",className:"model-submenu-header","aria-label":ID(),onClick:()=>{T("root"),N("")},children:f.jsx(fI,{size:15})}),f.jsx("span",{className:"min-w-0 flex-1 text-sm font-medium text-text",children:ze}),E==="models"&&f.jsx(Ft,{type:"button",size:"small","aria-label":i3(),onClick:()=>{j(),t()},children:f.jsx(sS,{size:15,"aria-hidden":"true"})})]}),se=(ze,He,Oe,Xe)=>f.jsx("div",{className:"model-menu-list overflow-y-auto p-1.5",children:ze.map(_t=>f.jsxs(nr,{onClick:()=>Xe(_t.id),children:[f.jsxs("span",{className:"flex min-w-0 flex-col items-start gap-0.5",children:[f.jsxs("span",{children:[_t.label,_t.id===Oe&&f.jsxs("span",{className:"font-normal text-muted",children:[" ",ND()]})]}),_t.description&&f.jsx("span",{className:"max-w-72 text-sm font-normal leading-snug text-muted",children:_t.description})]}),_t.id===He&&f.jsx(Ji,{size:13})]},_t.id))});return f.jsxs("div",{className:"model-picker relative inline-flex min-w-0","data-onboarding":"model-picker",ref:y,children:[f.jsxs("button",{ref:k,type:"button",className:vs("composer-pill inline-flex h-8 min-w-0 max-w-full items-center gap-[5px] rounded-md px-2 text-sm text-text whitespace-nowrap transition-[background,color] duration-150 ease-standard hover:bg-surface",h),title:zQ({label:`${P}${q?` · ${q}`:""}${F?` · ${F}`:""}`}),"aria-haspopup":"menu","aria-expanded":b,onClick:()=>{b?j():(T("root"),w(!0))},children:[L==="priority"?f.jsx(iyn,{size:14,fill:"currentColor","aria-hidden":"true"}):e!=null&&e.harness?f.jsx(w0,{harness:e.harness,size:14}):null,L==="priority"&&f.jsxs("span",{className:"sr-only",children:[ZYe()," "]}),f.jsxs("span",{className:"model-picker-label min-w-0 overflow-hidden text-ellipsis whitespace-nowrap",children:[P,q&&f.jsx("span",{className:"model-picker-reasoning ms-1 text-muted",children:q})]}),f.jsx(Zo,{size:14,className:"shrink-0 text-muted"})]}),b&&f.jsxs("div",{className:"model-menu absolute bottom-[calc(100%_+_8px)] start-0 max-h-100 flex flex-col bg-background border border-border rounded-md shadow-dropdown z-50 overflow-hidden w-72 [&.align-right]:start-auto [&.align-right]:end-0 [&_input]:rounded-none [&_input]:border-0 [&_input]:border-b [&_input]:border-b-border-variant [&_input]:bg-none [&_input]:bg-transparent [&_input]:py-2 [&_input]:px-2.5 [&_input]:text-sm [&_input]:outline-none align-right",children:[E==="root"&&f.jsxs("div",{className:"model-root-menu p-1",children:[ce(Yp(),P,"models"),a.length>0&&ce(Y,q,"reasoning"),$.length>0&&ce(ON(),F,"speed"),r.length>0&&ce(MN(),H,"permissions")]}),E==="models"&&f.jsxs(f.Fragment,{children:[ae(Yp()),f.jsx("input",{autoFocus:!0,type:"text",placeholder:zD(),value:C,onChange:ze=>N(ze.target.value)}),f.jsxs("div",{className:"model-menu-list overflow-y-auto p-1.5",children:[M.map(({harness:ze,models:He,hidden:Oe})=>f.jsxs("div",{className:"[&_.model-item]:ps-6",children:[f.jsxs("div",{className:QI,children:[f.jsxs("span",{className:"inline-flex items-center gap-1.5",children:[f.jsx(w0,{harness:ze.id,size:14}),ze.name]}),!ze.agentReady&&f.jsxs("span",{className:"model-group-status inline-flex items-center gap-1 text-accent-amber font-normal",children:[f.jsx(Uz,{size:10})," ",so()]})]}),ze.agentReady?f.jsxs(f.Fragment,{children:[ze.models.length===0&&f.jsxs(nr,{onClick:()=>D(ze,null),children:[f.jsxs("span",{children:[RN(),f.jsx("span",{className:"model-id",children:ED()})]}),(e==null?void 0:e.harness)===ze.id&&(e==null?void 0:e.model)===null&&f.jsx(Ji,{size:13})]}),He.map(Xe=>f.jsxs(nr,{title:Xe.id,onClick:()=>D(ze,Xe.id),children:[f.jsx("span",{children:I1(Xe)}),(e==null?void 0:e.harness)===ze.id&&(e==null?void 0:e.model)===Xe.id&&f.jsx(Ji,{size:13})]},Xe.id)),C.trim().length>0&&!ze.models.some(Xe=>Xe.id===C.trim())&&f.jsx(nr,{onClick:()=>D(ze,C.trim()),children:f.jsx("span",{children:nJe({id:Ne(C.trim())})})})]}):f.jsx("div",{className:"model-more [&_code]:font-mono [&_code]:text-xs [&_code]:bg-panel [&_code]:border [&_code]:border-border-variant [&_code]:rounded-xs [&_code]:py-px [&_code]:px-[5px] [&_code]:whitespace-nowrap pt-1 px-2 pb-2 text-sm text-muted model-unavailable leading-normal border-b border-b-border-variant",children:ze.agentNote?eh(ze.agentNote):SZe()}),ze.id==="opencode"&&f.jsx(nr,{type:"button",className:"font-medium","aria-haspopup":"dialog",onClick:()=>{var Xe;j(),(Xe=k.current)==null||Xe.focus(),x(!0)},children:f.jsxs("span",{className:"inline-flex items-center gap-1.5",children:[dYe(),f.jsx(yh,{size:14,"aria-hidden":"true"})]})}),ze.agentReady&&Oe>0&&f.jsx("div",{className:oj,children:gZe({count:Jt(Oe)})})]},ze.id)),_.length===0&&f.jsx("div",{className:oj,children:$Ye()})]}),u&&e&&_.length>1&&f.jsxs("div",{className:"model-locked-note py-[7px] px-3 text-sm text-muted border-t border-t-border-variant",children:[f.jsx(Uz,{size:11,className:"inline-block align-baseline me-1","aria-hidden":"true"}),IZe()]})]}),E==="reasoning"&&f.jsxs(f.Fragment,{children:[ae(Y),se(a,U,o,G)]}),E==="permissions"&&f.jsxs(f.Fragment,{children:[ae(MN()),se(r,W,s,V)]}),E==="speed"&&f.jsxs(f.Fragment,{children:[ae(ON()),se($,L??void 0,"default",ee)]})]}),m&&f.jsx(WI,{dialogOnly:!0,installed:((Ie=_.find(ze=>ze.id==="opencode"))==null?void 0:Ie.installed)??!1,onClose:()=>x(!1),onConnected:ze=>{var Oe;const He=(Oe=p.getQueryData(bu().queryKey))==null?void 0:Oe.find(Xe=>Xe.id==="opencode");He&&(!u||(e==null?void 0:e.harness)==="opencode")&&D(He,ze)}})]})}function yu({choices:e,value:n,defaultId:t,header:r,align:s="left",dropDown:i=!1,disabled:a=!1,variant:o="pill",title:l,numbered:u=!1,searchPlaceholder:h,renderIcon:_,renderLabel:p,floating:m=!1,onSelect:x,className:k}){var W,H;const v=A.useRef(null),{open:b,setOpen:w,ref:y}=_o(v),C=A.useRef(null),[N,E]=A.useState("");if(A.useLayoutEffect(()=>{var L;const Y=C.current,te=y.current;if(!b||!m||!Y||!te)return;Y.matches(":popover-open")||(Y.showPopover(),(L=Y.querySelector("input"))==null||L.focus());const $=()=>{const F=te.getBoundingClientRect(),G=window.innerHeight-F.bottom-12,V=F.top-12,ee=Math.min(380,Y.scrollHeight),ce=i?G>=ee||G>=V:VV;Y.style.width=`${F.width}px`,Y.style.minWidth="0",Y.style.maxHeight=`${Math.max(0,Math.min(380,ce?G:V))}px`,Y.style.left=`${F.left}px`,Y.style.top=`${ce?F.bottom+4:F.top-Y.getBoundingClientRect().height-4}px`};return $(),window.addEventListener("resize",$),window.addEventListener("scroll",$,!0),()=>{window.removeEventListener("resize",$),window.removeEventListener("scroll",$,!0)}},[b,m,i,N,e.length,y]),e.length===0)return null;const T=n??t??((W=e[0])==null?void 0:W.id)??null,j=e.find(Y=>Y.id===T),M=e.find(Y=>Y.id===t),D=o==="bare"&&(M==null?void 0:M.id)===xv?M:void 0,P=(D?e.filter(Y=>Y.id!==D.id):e).filter(Y=>`${Y.label} ${Y.id}`.toLowerCase().includes(N.toLowerCase())),U=(j==null?void 0:j.label)??((H=e[0])==null?void 0:H.label)??"",q=Y=>{var te;x(Y),w(!1),(te=v.current)==null||te.focus()};return f.jsxs("div",{className:`option-picker relative inline-flex${o==="field"?" w-full":""}`,ref:y,children:[f.jsxs("button",{ref:v,type:"button",className:vs(o==="field"?"inline-flex h-9 w-full items-center justify-between gap-2 rounded-md border border-border bg-background px-3 text-sm font-normal text-text transition-colors duration-120 ease-standard hover:bg-surface disabled:opacity-45":`inline-flex h-8 items-center rounded-md transition-[background,color] duration-150 ease-standard hover:bg-surface ${o==="pill"?"composer-pill gap-[5px] px-2 text-sm text-text whitespace-nowrap":"composer-bare gap-[3px] px-1 text-sm text-text"}`,k),title:l,"aria-haspopup":"menu","aria-expanded":b,disabled:a,onClick:()=>{E(""),w(Y=>!Y)},children:[f.jsxs("span",{className:"inline-flex min-w-0 items-center gap-2",children:[j&&(_==null?void 0:_(j)),f.jsx("span",{className:"truncate",children:j?(p==null?void 0:p(j))??U:U})]}),f.jsx(Zo,{size:12})]}),b&&f.jsxs("div",{ref:C,popover:m?"manual":void 0,style:m?{position:"fixed",inset:"auto",margin:0}:void 0,className:`option-menu absolute bottom-[calc(100%_+_8px)] start-0 max-h-95 flex flex-col bg-background border border-border rounded-lg shadow-menu z-50 overflow-hidden min-w-47.5 p-1.5 [&.align-right]:start-auto [&.align-right]:end-0 [&.drop-down]:bottom-auto [&.drop-down]:top-[calc(100%_+_4px)] [&.session-menu]:start-auto [&.session-menu]:end-1.5 [&.session-menu]:top-[calc(100%_-_2px)] [&.session-menu]:min-w-35 ${e.some(Y=>Y.description)?"min-w-80":""} ${o==="field"?"min-w-full text-text":""} ${s==="right"?"align-right":""} ${i?"drop-down":""}`,children:[r&&f.jsx("div",{className:QI,children:r}),h&&f.jsx("input",{autoFocus:!0,"aria-label":h,placeholder:h,value:N,onChange:Y=>E(Y.target.value),className:"shrink-0 border-b border-border bg-background px-2 py-2 text-sm outline-none"}),f.jsxs("div",{className:"min-h-0 overflow-y-auto",children:[D&&f.jsxs(f.Fragment,{children:[f.jsxs(nr,{type:"button",onClick:()=>q(D.id),children:[f.jsxs("span",{className:"inline-flex items-center gap-2",children:[_==null?void 0:_(D),f.jsxs("span",{children:[(p==null?void 0:p(D))??D.label,f.jsx("span",{className:"option-default text-muted font-normal",children:ED()})]})]}),T===D.id&&f.jsx(Ji,{size:13})]}),f.jsx("div",{className:"option-sep h-px my-[5px] mx-1 bg-border-variant"})]}),P.map((Y,te)=>f.jsxs(nr,{type:"button",onClick:()=>q(Y.id),children:[f.jsxs("span",{className:"flex min-w-0 items-center gap-2",children:[_==null?void 0:_(Y),f.jsxs("span",{className:"flex min-w-0 flex-col items-start gap-0.5",children:[f.jsxs("span",{children:[(p==null?void 0:p(Y))??Y.label,!D&&Y.id===t&&f.jsxs("span",{className:"option-default text-muted font-normal",children:[" ",ND()]})]}),Y.description&&f.jsx("span",{className:"max-w-68 text-sm font-normal leading-snug text-muted",children:Y.description})]})]}),T===Y.id?f.jsx(Ji,{size:13}):u&&f.jsx("span",{className:"option-num text-muted text-xs tabular-nums",children:te+1})]},Y.id))]})]})]})}const Cxn=[];function A3({runtime:e,corner:n=!1}){const[t,r]=A.useState(!1),[s,i]=A.useState(!1),[a,o]=A.useState(!1),[l,u]=A.useState(null),h=_o();async function _(){if(l){o(!0);try{await EL(l),u(null)}catch(p){u(null),Vn(p instanceof Error?p.message:String(p),"error")}finally{o(!1)}}}return f.jsxs(f.Fragment,{children:[f.jsxs("div",{className:n?"fixed bottom-0 start-0 z-50":"relative shrink-0 rounded-b-lg border-t border-border bg-background",ref:h.ref,children:[h.open&&f.jsxs("div",{className:"option-menu absolute bottom-[calc(100%_+_6px)] start-2 z-50 min-w-60 rounded-lg border border-border bg-background p-1.5 shadow-menu",children:[f.jsxs("div",{className:"border-b border-border-variant px-2 pt-1 pb-2",children:[f.jsx("div",{className:"text-sm font-medium text-text",children:Ext({host:Ne(e.session.host),user:Ne(e.session.user??"")})}),f.jsxs("div",{className:"mt-0.5 text-xs text-subtext",children:["OpenResearch ",Ne(e.session.version??"…")]})]}),f.jsxs("div",{className:"flex items-center rounded-sm hover:bg-surface",children:[f.jsx(nr,{className:"hover:bg-transparent",disabled:t,onClick:async()=>{r(!0);try{await SL(),h.setOpen(!1)}catch(p){Vn(p instanceof Error?p.message:String(p),"error")}finally{r(!1)}},children:t?bxt():r3()}),f.jsx(Yk,{content:l4t(),className:"me-2 shrink-0 text-subtext",children:f.jsx(eS,{size:15})})]}),f.jsx(nr,{danger:!0,disabled:s,onClick:async()=>{i(!0);try{u(await CL()),h.setOpen(!1)}catch(p){Vn(p instanceof Error?p.message:String(p),"error")}finally{i(!1)}},children:PD()})]}),n?f.jsxs(Me,{variant:"default",className:"h-auto w-auto max-w-48 justify-start rounded-none border-accent-blue bg-accent-blue px-2.5 py-1.5 font-normal text-white [&:hover:not(:disabled)]:border-accent-blue [&:hover:not(:disabled)]:bg-accent-blue/90","aria-haspopup":"menu","aria-expanded":h.open,onClick:()=>h.setOpen(p=>!p),children:[f.jsx(Tv,{size:14,className:"shrink-0"}),f.jsx("span",{className:"min-w-0 truncate text-sm leading-tight",children:K2({host:Ne(e.session.host)})})]}):f.jsxs("div",{className:"flex items-center gap-1.5 py-2 ps-1 pe-2.5",children:[f.jsx(Ft,{size:"small","aria-label":K2({host:Ne(e.session.host)}),"aria-haspopup":"menu","aria-expanded":h.open,onClick:()=>h.setOpen(p=>!p),children:f.jsx(Tv,{size:14,className:"shrink-0"})}),f.jsxs("span",{className:"flex min-w-0 flex-col gap-1 text-start text-text",children:[f.jsx("span",{className:"-my-0.5 max-w-full self-start truncate rounded-sm bg-accent-blue px-1.5 py-0.5 text-sm leading-tight text-white",children:K2({host:Ne(e.session.host)})}),f.jsxs("span",{className:"truncate text-xs leading-tight text-subtext",children:["OpenResearch ",Ne(e.session.version??"…")]})]})]})]}),l&&f.jsx(lI,{host:e.session.host,preview:l,currentClientAttached:e.session.status==="connected",stopping:a,onClose:()=>{a||u(null)},onConfirm:()=>void _()})]})}const Av="code-source-text",XI="code-source-wrap",YI="file-view-gutter text-right text-muted select-none";function ZI(e){const n=String(e).length+2;return{ruleCh:n,codeCh:n+2}}const Exn={cjs:"javascript",console:"bash",cts:"typescript",fish:"bash",html:"markup",js:"javascript",jsx:"javascript",md:"markdown",mjs:"javascript",mts:"typescript",py:"python",rb:"ruby",sh:"bash",shell:"bash",svg:"markup",terminal:"bash",ts:"typescript",tsx:"typescript",xml:"markup",yml:"yaml",zsh:"bash"},Nxn={containerfile:"docker",dockerfile:"docker",justfile:"makefile",makefile:"makefile"};function R3(e){const n=e.trim().toLowerCase();return Exn[n]??n}function mS(e){var s;if(!e)return null;const n=((s=e.split("/").pop())==null?void 0:s.toLowerCase())??"",t=Nxn[n];if(t)return R3(t);const r=n.lastIndexOf(".");return r===-1||r===n.length-1?null:R3(n.slice(r+1))}Jo.displayName="clike";Jo.aliases=[];function Jo(e){e.languages.clike={comment:[{pattern:/(^|[^\\])\/\*[\s\S]*?(?:\*\/|$)/,lookbehind:!0,greedy:!0},{pattern:/(^|[^\\:])\/\/.*/,lookbehind:!0,greedy:!0}],string:{pattern:/(["'])(?:\\(?:\r\n|[\s\S])|(?!\1)[^\\\r\n])*\1/,greedy:!0},"class-name":{pattern:/(\b(?:class|extends|implements|instanceof|interface|new|trait)\s+|\bcatch\s+\()[\w.\\]+/i,lookbehind:!0,inside:{punctuation:/[.\\]/}},keyword:/\b(?:break|catch|continue|do|else|finally|for|function|if|in|instanceof|new|null|return|throw|try|while)\b/,boolean:/\b(?:false|true)\b/,function:/\b\w+(?=\()/,number:/\b0x[\da-f]+\b|(?:\b\d+(?:\.\d*)?|\B\.\d+)(?:e[+-]?\d+)?/i,operator:/[<>]=?|[!=]=?=?|--?|\+\+?|&&?|\|\|?|[?*/~^%]/,punctuation:/[{}[\];(),.:]/}}pm.displayName="c";pm.aliases=[];function pm(e){e.register(Jo),e.languages.c=e.languages.extend("clike",{comment:{pattern:/\/\/(?:[^\r\n\\]|\\(?:\r\n?|\n|(?![\r\n])))*|\/\*[\s\S]*?(?:\*\/|$)/,greedy:!0},string:{pattern:/"(?:\\(?:\r\n|[\s\S])|[^"\\\r\n])*"/,greedy:!0},"class-name":{pattern:/(\b(?:enum|struct)\s+(?:__attribute__\s*\(\([\s\S]*?\)\)\s*)?)\w+|\b[a-z]\w*_t\b/,lookbehind:!0},keyword:/\b(?:_Alignas|_Alignof|_Atomic|_Bool|_Complex|_Generic|_Imaginary|_Noreturn|_Static_assert|_Thread_local|__attribute__|asm|auto|break|case|char|const|continue|default|do|double|else|enum|extern|float|for|goto|if|inline|int|long|register|return|short|signed|sizeof|static|struct|switch|typedef|typeof|union|unsigned|void|volatile|while)\b/,function:/\b[a-z_]\w*(?=\s*\()/i,number:/(?:\b0x(?:[\da-f]+(?:\.[\da-f]*)?|\.[\da-f]+)(?:p[+-]?\d+)?|(?:\b\d+(?:\.\d*)?|\B\.\d+)(?:e[+-]?\d+)?)[ful]{0,4}/i,operator:/>>=?|<<=?|->|([-+&|:])\1|[?:~]|[-+*/%&|^!=<>]=?/}),e.languages.insertBefore("c","string",{char:{pattern:/'(?:\\(?:\r\n|[\s\S])|[^'\\\r\n]){0,32}'/,greedy:!0}}),e.languages.insertBefore("c","string",{macro:{pattern:/(^[\t ]*)#\s*[a-z](?:[^\r\n\\/]|\/(?!\*)|\/\*(?:[^*]|\*(?!\/))*\*\/|\\(?:\r\n|[\s\S]))*/im,lookbehind:!0,greedy:!0,alias:"property",inside:{string:[{pattern:/^(#\s*include\s*)<[^>]+>/,lookbehind:!0},e.languages.c.string],char:e.languages.c.char,comment:e.languages.c.comment,"macro-name":[{pattern:/(^#\s*define\s+)\w+\b(?!\()/i,lookbehind:!0},{pattern:/(^#\s*define\s+)\w+\b(?=\()/i,lookbehind:!0,alias:"function"}],directive:{pattern:/^(#\s*)[a-z]+/,lookbehind:!0,alias:"keyword"},"directive-hash":/^#/,punctuation:/##|\\(?=[\r\n])/,expression:{pattern:/\S[\s\S]*/,inside:e.languages.c}}}}),e.languages.insertBefore("c","function",{constant:/\b(?:EOF|NULL|SEEK_CUR|SEEK_END|SEEK_SET|__DATE__|__FILE__|__LINE__|__TIMESTAMP__|__TIME__|__func__|stderr|stdin|stdout)\b/}),delete e.languages.c.boolean}Mb.displayName="cpp";Mb.aliases=[];function Mb(e){e.register(pm),(function(n){var t=/\b(?:alignas|alignof|asm|auto|bool|break|case|catch|char|char16_t|char32_t|char8_t|class|co_await|co_return|co_yield|compl|concept|const|const_cast|consteval|constexpr|constinit|continue|decltype|default|delete|do|double|dynamic_cast|else|enum|explicit|export|extern|final|float|for|friend|goto|if|import|inline|int|int16_t|int32_t|int64_t|int8_t|long|module|mutable|namespace|new|noexcept|nullptr|operator|override|private|protected|public|register|reinterpret_cast|requires|return|short|signed|sizeof|static|static_assert|static_cast|struct|switch|template|this|thread_local|throw|try|typedef|typeid|typename|uint16_t|uint32_t|uint64_t|uint8_t|union|unsigned|using|virtual|void|volatile|wchar_t|while)\b/,r=/\b(?!)\w+(?:\s*\.\s*\w+)*\b/.source.replace(//g,function(){return t.source});n.languages.cpp=n.languages.extend("c",{"class-name":[{pattern:RegExp(/(\b(?:class|concept|enum|struct|typename)\s+)(?!)\w+/.source.replace(//g,function(){return t.source})),lookbehind:!0},/\b[A-Z]\w*(?=\s*::\s*\w+\s*\()/,/\b[A-Z_]\w*(?=\s*::\s*~\w+\s*\()/i,/\b\w+(?=\s*<(?:[^<>]|<(?:[^<>]|<[^<>]*>)*>)*>\s*::\s*\w+\s*\()/],keyword:t,number:{pattern:/(?:\b0b[01']+|\b0x(?:[\da-f']+(?:\.[\da-f']*)?|\.[\da-f']+)(?:p[+-]?[\d']+)?|(?:\b[\d']+(?:\.[\d']*)?|\B\.[\d']+)(?:e[+-]?[\d']+)?)[ful]{0,4}/i,greedy:!0},operator:/>>=?|<<=?|->|--|\+\+|&&|\|\||[?:~]|<=>|[-+*/%&|^!=<>]=?|\b(?:and|and_eq|bitand|bitor|not|not_eq|or|or_eq|xor|xor_eq)\b/,boolean:/\b(?:false|true)\b/}),n.languages.insertBefore("cpp","string",{module:{pattern:RegExp(/(\b(?:import|module)\s+)/.source+"(?:"+/"(?:\\(?:\r\n|[\s\S])|[^"\\\r\n])*"|<[^<>\r\n]*>/.source+"|"+/(?:\s*:\s*)?|:\s*/.source.replace(//g,function(){return r})+")"),lookbehind:!0,greedy:!0,inside:{string:/^[<"][\s\S]+/,operator:/:/,punctuation:/\./}},"raw-string":{pattern:/R"([^()\\ ]{0,16})\([\s\S]*?\)\1"/,alias:"string",greedy:!0}}),n.languages.insertBefore("cpp","keyword",{"generic-function":{pattern:/\b(?!operator\b)[a-z_]\w*\s*<(?:[^<>]|<[^<>]*>)*>(?=\s*\()/i,inside:{function:/^\w+/,generic:{pattern:/<[\s\S]+/,alias:"class-name",inside:n.languages.cpp}}}}),n.languages.insertBefore("cpp","operator",{"double-colon":{pattern:/::/,alias:"punctuation"}}),n.languages.insertBefore("cpp","class-name",{"base-clause":{pattern:/(\b(?:class|struct)\s+\w+\s*:\s*)[^;{}"'\s]+(?:\s+[^;{}"'\s]+)*(?=\s*[;{])/,lookbehind:!0,greedy:!0,inside:n.languages.extend("cpp",{})}}),n.languages.insertBefore("inside","double-colon",{"class-name":/\b[a-z_]\w*\b(?!\s*::)/i},n.languages.cpp["base-clause"])})(e)}gS.displayName="arduino";gS.aliases=["ino"];function gS(e){e.register(Mb),e.languages.arduino=e.languages.extend("cpp",{keyword:/\b(?:String|array|bool|boolean|break|byte|case|catch|continue|default|do|double|else|finally|for|function|goto|if|in|instanceof|int|integer|long|loop|new|null|return|setup|string|switch|throw|try|void|while|word)\b/,constant:/\b(?:ANALOG_MESSAGE|DEFAULT|DIGITAL_MESSAGE|EXTERNAL|FIRMATA_STRING|HIGH|INPUT|INPUT_PULLUP|INTERNAL|INTERNAL1V1|INTERNAL2V56|LED_BUILTIN|LOW|OUTPUT|REPORT_ANALOG|REPORT_DIGITAL|SET_PIN_MODE|SYSEX_START|SYSTEM_RESET)\b/,builtin:/\b(?:Audio|BSSID|Bridge|Client|Console|EEPROM|Esplora|EsploraTFT|Ethernet|EthernetClient|EthernetServer|EthernetUDP|File|FileIO|FileSystem|Firmata|GPRS|GSM|GSMBand|GSMClient|GSMModem|GSMPIN|GSMScanner|GSMServer|GSMVoiceCall|GSM_SMS|HttpClient|IPAddress|IRread|Keyboard|KeyboardController|LiquidCrystal|LiquidCrystal_I2C|Mailbox|Mouse|MouseController|PImage|Process|RSSI|RobotControl|RobotMotor|SD|SPI|SSID|Scheduler|Serial|Server|Servo|SoftwareSerial|Stepper|Stream|TFT|Task|USBHost|WiFi|WiFiClient|WiFiServer|WiFiUDP|Wire|YunClient|YunServer|abs|addParameter|analogRead|analogReadResolution|analogReference|analogWrite|analogWriteResolution|answerCall|attach|attachGPRS|attachInterrupt|attached|autoscroll|available|background|beep|begin|beginPacket|beginSD|beginSMS|beginSpeaker|beginTFT|beginTransmission|beginWrite|bit|bitClear|bitRead|bitSet|bitWrite|blink|blinkVersion|buffer|changePIN|checkPIN|checkPUK|checkReg|circle|cityNameRead|cityNameWrite|clear|clearScreen|click|close|compassRead|config|connect|connected|constrain|cos|countryNameRead|countryNameWrite|createChar|cursor|debugPrint|delay|delayMicroseconds|detach|detachInterrupt|digitalRead|digitalWrite|disconnect|display|displayLogos|drawBMP|drawCompass|encryptionType|end|endPacket|endSMS|endTransmission|endWrite|exists|exitValue|fill|find|findUntil|flush|gatewayIP|get|getAsynchronously|getBand|getButton|getCurrentCarrier|getIMEI|getKey|getModifiers|getOemKey|getPINUsed|getResult|getSignalStrength|getSocket|getVoiceCallStatus|getXChange|getYChange|hangCall|height|highByte|home|image|interrupts|isActionDone|isDirectory|isListening|isPIN|isPressed|isValid|keyPressed|keyReleased|keyboardRead|knobRead|leftToRight|line|lineFollowConfig|listen|listenOnLocalhost|loadImage|localIP|lowByte|macAddress|maintain|map|max|messageAvailable|micros|millis|min|mkdir|motorsStop|motorsWrite|mouseDragged|mouseMoved|mousePressed|mouseReleased|move|noAutoscroll|noBlink|noBuffer|noCursor|noDisplay|noFill|noInterrupts|noListenOnLocalhost|noStroke|noTone|onReceive|onRequest|open|openNextFile|overflow|parseCommand|parseFloat|parseInt|parsePacket|pauseMode|peek|pinMode|playFile|playMelody|point|pointTo|position|pow|prepare|press|print|printFirmwareVersion|printVersion|println|process|processInput|pulseIn|put|random|randomSeed|read|readAccelerometer|readBlue|readButton|readBytes|readBytesUntil|readGreen|readJoystickButton|readJoystickSwitch|readJoystickX|readJoystickY|readLightSensor|readMessage|readMicrophone|readNetworks|readRed|readSlider|readString|readStringUntil|readTemperature|ready|rect|release|releaseAll|remoteIP|remoteNumber|remotePort|remove|requestFrom|retrieveCallingNumber|rewindDirectory|rightToLeft|rmdir|robotNameRead|robotNameWrite|run|runAsynchronously|runShellCommand|runShellCommandAsynchronously|running|scanNetworks|scrollDisplayLeft|scrollDisplayRight|seek|sendAnalog|sendDigitalPortPair|sendDigitalPorts|sendString|sendSysex|serialEvent|setBand|setBitOrder|setClockDivider|setCursor|setDNS|setDataMode|setFirmwareVersion|setMode|setPINUsed|setSpeed|setTextSize|setTimeout|shiftIn|shiftOut|shutdown|sin|size|sqrt|startLoop|step|stop|stroke|subnetMask|switchPIN|tan|tempoWrite|text|tone|transfer|tuneWrite|turn|updateIR|userNameRead|userNameWrite|voiceCall|waitContinue|width|write|writeBlue|writeGreen|writeJSON|writeMessage|writeMicroseconds|writeRGB|writeRed|yield)\b/}),e.languages.ino=e.languages.arduino}vS.displayName="bash";vS.aliases=["sh","shell"];function vS(e){(function(n){var t="\\b(?:BASH|BASHOPTS|BASH_ALIASES|BASH_ARGC|BASH_ARGV|BASH_CMDS|BASH_COMPLETION_COMPAT_DIR|BASH_LINENO|BASH_REMATCH|BASH_SOURCE|BASH_VERSINFO|BASH_VERSION|COLORTERM|COLUMNS|COMP_WORDBREAKS|DBUS_SESSION_BUS_ADDRESS|DEFAULTS_PATH|DESKTOP_SESSION|DIRSTACK|DISPLAY|EUID|GDMSESSION|GDM_LANG|GNOME_KEYRING_CONTROL|GNOME_KEYRING_PID|GPG_AGENT_INFO|GROUPS|HISTCONTROL|HISTFILE|HISTFILESIZE|HISTSIZE|HOME|HOSTNAME|HOSTTYPE|IFS|INSTANCE|JOB|LANG|LANGUAGE|LC_ADDRESS|LC_ALL|LC_IDENTIFICATION|LC_MEASUREMENT|LC_MONETARY|LC_NAME|LC_NUMERIC|LC_PAPER|LC_TELEPHONE|LC_TIME|LESSCLOSE|LESSOPEN|LINES|LOGNAME|LS_COLORS|MACHTYPE|MAILCHECK|MANDATORY_PATH|NO_AT_BRIDGE|OLDPWD|OPTERR|OPTIND|ORBIT_SOCKETDIR|OSTYPE|PAPERSIZE|PATH|PIPESTATUS|PPID|PS1|PS2|PS3|PS4|PWD|RANDOM|REPLY|SECONDS|SELINUX_INIT|SESSION|SESSIONTYPE|SESSION_MANAGER|SHELL|SHELLOPTS|SHLVL|SSH_AUTH_SOCK|TERM|UID|UPSTART_EVENTS|UPSTART_INSTANCE|UPSTART_JOB|UPSTART_SESSION|USER|WINDOWID|XAUTHORITY|XDG_CONFIG_DIRS|XDG_CURRENT_DESKTOP|XDG_DATA_DIRS|XDG_GREETER_DATA_DIR|XDG_MENU_PREFIX|XDG_RUNTIME_DIR|XDG_SEAT|XDG_SEAT_PATH|XDG_SESSION_DESKTOP|XDG_SESSION_ID|XDG_SESSION_PATH|XDG_SESSION_TYPE|XDG_VTNR|XMODIFIERS)\\b",r={pattern:/(^(["']?)\w+\2)[ \t]+\S.*/,lookbehind:!0,alias:"punctuation",inside:null},s={bash:r,environment:{pattern:RegExp("\\$"+t),alias:"constant"},variable:[{pattern:/\$?\(\([\s\S]+?\)\)/,greedy:!0,inside:{variable:[{pattern:/(^\$\(\([\s\S]+)\)\)/,lookbehind:!0},/^\$\(\(/],number:/\b0x[\dA-Fa-f]+\b|(?:\b\d+(?:\.\d*)?|\B\.\d+)(?:[Ee]-?\d+)?/,operator:/--|\+\+|\*\*=?|<<=?|>>=?|&&|\|\||[=!+\-*/%<>^&|]=?|[?~:]/,punctuation:/\(\(?|\)\)?|,|;/}},{pattern:/\$\((?:\([^)]+\)|[^()])+\)|`[^`]+`/,greedy:!0,inside:{variable:/^\$\(|^`|\)$|`$/}},{pattern:/\$\{[^}]+\}/,greedy:!0,inside:{operator:/:[-=?+]?|[!\/]|##?|%%?|\^\^?|,,?/,punctuation:/[\[\]]/,environment:{pattern:RegExp("(\\{)"+t),lookbehind:!0,alias:"constant"}}},/\$(?:\w+|[#?*!@$])/],entity:/\\(?:[abceEfnrtv\\"]|O?[0-7]{1,3}|U[0-9a-fA-F]{8}|u[0-9a-fA-F]{4}|x[0-9a-fA-F]{1,2})/};n.languages.bash={shebang:{pattern:/^#!\s*\/.*/,alias:"important"},comment:{pattern:/(^|[^"{\\$])#.*/,lookbehind:!0},"function-name":[{pattern:/(\bfunction\s+)[\w-]+(?=(?:\s*\(?:\s*\))?\s*\{)/,lookbehind:!0,alias:"function"},{pattern:/\b[\w-]+(?=\s*\(\s*\)\s*\{)/,alias:"function"}],"for-or-select":{pattern:/(\b(?:for|select)\s+)\w+(?=\s+in\s)/,alias:"variable",lookbehind:!0},"assign-left":{pattern:/(^|[\s;|&]|[<>]\()\w+(?:\.\w+)*(?=\+?=)/,inside:{environment:{pattern:RegExp("(^|[\\s;|&]|[<>]\\()"+t),lookbehind:!0,alias:"constant"}},alias:"variable",lookbehind:!0},parameter:{pattern:/(^|\s)-{1,2}(?:\w+:[+-]?)?\w+(?:\.\w+)*(?=[=\s]|$)/,alias:"variable",lookbehind:!0},string:[{pattern:/((?:^|[^<])<<-?\s*)(\w+)\s[\s\S]*?(?:\r?\n|\r)\2/,lookbehind:!0,greedy:!0,inside:s},{pattern:/((?:^|[^<])<<-?\s*)(["'])(\w+)\2\s[\s\S]*?(?:\r?\n|\r)\3/,lookbehind:!0,greedy:!0,inside:{bash:r}},{pattern:/(^|[^\\](?:\\\\)*)"(?:\\[\s\S]|\$\([^)]+\)|\$(?!\()|`[^`]+`|[^"\\`$])*"/,lookbehind:!0,greedy:!0,inside:s},{pattern:/(^|[^$\\])'[^']*'/,lookbehind:!0,greedy:!0},{pattern:/\$'(?:[^'\\]|\\[\s\S])*'/,greedy:!0,inside:{entity:s.entity}}],environment:{pattern:RegExp("\\$?"+t),alias:"constant"},variable:s.variable,function:{pattern:/(^|[\s;|&]|[<>]\()(?:add|apropos|apt|apt-cache|apt-get|aptitude|aspell|automysqlbackup|awk|basename|bash|bc|bconsole|bg|bzip2|cal|cargo|cat|cfdisk|chgrp|chkconfig|chmod|chown|chroot|cksum|clear|cmp|column|comm|composer|cp|cron|crontab|csplit|curl|cut|date|dc|dd|ddrescue|debootstrap|df|diff|diff3|dig|dir|dircolors|dirname|dirs|dmesg|docker|docker-compose|du|egrep|eject|env|ethtool|expand|expect|expr|fdformat|fdisk|fg|fgrep|file|find|fmt|fold|format|free|fsck|ftp|fuser|gawk|git|gparted|grep|groupadd|groupdel|groupmod|groups|grub-mkconfig|gzip|halt|head|hg|history|host|hostname|htop|iconv|id|ifconfig|ifdown|ifup|import|install|ip|java|jobs|join|kill|killall|less|link|ln|locate|logname|logrotate|look|lpc|lpr|lprint|lprintd|lprintq|lprm|ls|lsof|lynx|make|man|mc|mdadm|mkconfig|mkdir|mke2fs|mkfifo|mkfs|mkisofs|mknod|mkswap|mmv|more|most|mount|mtools|mtr|mutt|mv|nano|nc|netstat|nice|nl|node|nohup|notify-send|npm|nslookup|op|open|parted|passwd|paste|pathchk|ping|pkill|pnpm|podman|podman-compose|popd|pr|printcap|printenv|ps|pushd|pv|quota|quotacheck|quotactl|ram|rar|rcp|reboot|remsync|rename|renice|rev|rm|rmdir|rpm|rsync|scp|screen|sdiff|sed|sendmail|seq|service|sftp|sh|shellcheck|shuf|shutdown|sleep|slocate|sort|split|ssh|stat|strace|su|sudo|sum|suspend|swapon|sync|sysctl|tac|tail|tar|tee|time|timeout|top|touch|tr|traceroute|tsort|tty|umount|uname|unexpand|uniq|units|unrar|unshar|unzip|update-grub|uptime|useradd|userdel|usermod|users|uudecode|uuencode|v|vcpkg|vdir|vi|vim|virsh|vmstat|wait|watch|wc|wget|whereis|which|who|whoami|write|xargs|xdg-open|yarn|yes|zenity|zip|zsh|zypper)(?=$|[)\s;|&])/,lookbehind:!0},keyword:{pattern:/(^|[\s;|&]|[<>]\()(?:case|do|done|elif|else|esac|fi|for|function|if|in|select|then|until|while)(?=$|[)\s;|&])/,lookbehind:!0},builtin:{pattern:/(^|[\s;|&]|[<>]\()(?:\.|:|alias|bind|break|builtin|caller|cd|command|continue|declare|echo|enable|eval|exec|exit|export|getopts|hash|help|let|local|logout|mapfile|printf|pwd|read|readarray|readonly|return|set|shift|shopt|source|test|times|trap|type|typeset|ulimit|umask|unalias|unset)(?=$|[)\s;|&])/,lookbehind:!0,alias:"class-name"},boolean:{pattern:/(^|[\s;|&]|[<>]\()(?:false|true)(?=$|[)\s;|&])/,lookbehind:!0},"file-descriptor":{pattern:/\B&\d\b/,alias:"important"},operator:{pattern:/\d?<>|>\||\+=|=[=~]?|!=?|<<[<-]?|[&\d]?>>|\d[<>]&?|[<>][&=]?|&[>&]?|\|[&|]?/,inside:{"file-descriptor":{pattern:/^\d/,alias:"important"}}},punctuation:/\$?\(\(?|\)\)?|\.\.|[{}[\];\\]/,number:{pattern:/(^|\s)(?:[1-9]\d*|0)(?:[.,]\d+)?\b/,lookbehind:!0}},r.inside=n.languages.bash;for(var i=["comment","function-name","for-or-select","assign-left","parameter","string","environment","function","keyword","builtin","boolean","file-descriptor","operator","punctuation","number"],a=s.variable[1].inside,o=0;o>/g,function(G,V){return"(?:"+F[+V]+")"})}function r(L,F,G){return RegExp(t(L,F),"")}function s(L,F){for(var G=0;G>/g,function(){return"(?:"+L+")"});return L.replace(/<>/g,"[^\\s\\S]")}var i={type:"bool byte char decimal double dynamic float int long object sbyte short string uint ulong ushort var void",typeDeclaration:"class enum interface record struct",contextual:"add alias and ascending async await by descending from(?=\\s*(?:\\w|$)) get global group into init(?=\\s*;) join let nameof not notnull on or orderby partial remove select set unmanaged value when where with(?=\\s*{)",other:"abstract as base break case catch checked const continue default delegate do else event explicit extern finally fixed for foreach goto if implicit in internal is lock namespace new null operator out override params private protected public readonly ref return sealed sizeof stackalloc static switch this throw try typeof unchecked unsafe using virtual volatile while yield"};function a(L){return"\\b(?:"+L.trim().replace(/ /g,"|")+")\\b"}var o=a(i.typeDeclaration),l=RegExp(a(i.type+" "+i.typeDeclaration+" "+i.contextual+" "+i.other)),u=a(i.typeDeclaration+" "+i.contextual+" "+i.other),h=a(i.type+" "+i.typeDeclaration+" "+i.other),_=s(/<(?:[^<>;=+\-*/%&|^]|<>)*>/.source,2),p=s(/\((?:[^()]|<>)*\)/.source,2),m=/@?\b[A-Za-z_]\w*\b/.source,x=t(/<<0>>(?:\s*<<1>>)?/.source,[m,_]),k=t(/(?!<<0>>)<<1>>(?:\s*\.\s*<<1>>)*/.source,[u,x]),v=/\[\s*(?:,\s*)*\]/.source,b=t(/<<0>>(?:\s*(?:\?\s*)?<<1>>)*(?:\s*\?)?/.source,[k,v]),w=t(/[^,()<>[\];=+\-*/%&|^]|<<0>>|<<1>>|<<2>>/.source,[_,p,v]),y=t(/\(<<0>>+(?:,<<0>>+)+\)/.source,[w]),C=t(/(?:<<0>>|<<1>>)(?:\s*(?:\?\s*)?<<2>>)*(?:\s*\?)?/.source,[y,k,v]),N={keyword:l,punctuation:/[<>()?,.:[\]]/},E=/'(?:[^\r\n'\\]|\\.|\\[Uux][\da-fA-F]{1,8})'/.source,T=/"(?:\\.|[^\\"\r\n])*"/.source,j=/@"(?:""|\\[\s\S]|[^\\"])*"(?!")/.source;n.languages.csharp=n.languages.extend("clike",{string:[{pattern:r(/(^|[^$\\])<<0>>/.source,[j]),lookbehind:!0,greedy:!0},{pattern:r(/(^|[^@$\\])<<0>>/.source,[T]),lookbehind:!0,greedy:!0}],"class-name":[{pattern:r(/(\busing\s+static\s+)<<0>>(?=\s*;)/.source,[k]),lookbehind:!0,inside:N},{pattern:r(/(\busing\s+<<0>>\s*=\s*)<<1>>(?=\s*;)/.source,[m,C]),lookbehind:!0,inside:N},{pattern:r(/(\busing\s+)<<0>>(?=\s*=)/.source,[m]),lookbehind:!0},{pattern:r(/(\b<<0>>\s+)<<1>>/.source,[o,x]),lookbehind:!0,inside:N},{pattern:r(/(\bcatch\s*\(\s*)<<0>>/.source,[k]),lookbehind:!0,inside:N},{pattern:r(/(\bwhere\s+)<<0>>/.source,[m]),lookbehind:!0},{pattern:r(/(\b(?:is(?:\s+not)?|as)\s+)<<0>>/.source,[b]),lookbehind:!0,inside:N},{pattern:r(/\b<<0>>(?=\s+(?!<<1>>|with\s*\{)<<2>>(?:\s*[=,;:{)\]]|\s+(?:in|when)\b))/.source,[C,h,m]),inside:N}],keyword:l,number:/(?:\b0(?:x[\da-f_]*[\da-f]|b[01_]*[01])|(?:\B\.\d+(?:_+\d+)*|\b\d+(?:_+\d+)*(?:\.\d+(?:_+\d+)*)?)(?:e[-+]?\d+(?:_+\d+)*)?)(?:[dflmu]|lu|ul)?\b/i,operator:/>>=?|<<=?|[-=]>|([-+&|])\1|~|\?\?=?|[-+*/%&|^!=<>]=?/,punctuation:/\?\.?|::|[{}[\];(),.:]/}),n.languages.insertBefore("csharp","number",{range:{pattern:/\.\./,alias:"operator"}}),n.languages.insertBefore("csharp","punctuation",{"named-parameter":{pattern:r(/([(,]\s*)<<0>>(?=\s*:)/.source,[m]),lookbehind:!0,alias:"punctuation"}}),n.languages.insertBefore("csharp","class-name",{namespace:{pattern:r(/(\b(?:namespace|using)\s+)<<0>>(?:\s*\.\s*<<0>>)*(?=\s*[;{])/.source,[m]),lookbehind:!0,inside:{punctuation:/\./}},"type-expression":{pattern:r(/(\b(?:default|sizeof|typeof)\s*\(\s*(?!\s))(?:[^()\s]|\s(?!\s)|<<0>>)*(?=\s*\))/.source,[p]),lookbehind:!0,alias:"class-name",inside:N},"return-type":{pattern:r(/<<0>>(?=\s+(?:<<1>>\s*(?:=>|[({]|\.\s*this\s*\[)|this\s*\[))/.source,[C,k]),inside:N,alias:"class-name"},"constructor-invocation":{pattern:r(/(\bnew\s+)<<0>>(?=\s*[[({])/.source,[C]),lookbehind:!0,inside:N,alias:"class-name"},"generic-method":{pattern:r(/<<0>>\s*<<1>>(?=\s*\()/.source,[m,_]),inside:{function:r(/^<<0>>/.source,[m]),generic:{pattern:RegExp(_),alias:"class-name",inside:N}}},"type-list":{pattern:r(/\b((?:<<0>>\s+<<1>>|record\s+<<1>>\s*<<5>>|where\s+<<2>>)\s*:\s*)(?:<<3>>|<<4>>|<<1>>\s*<<5>>|<<6>>)(?:\s*,\s*(?:<<3>>|<<4>>|<<6>>))*(?=\s*(?:where|[{;]|=>|$))/.source,[o,x,m,C,l.source,p,/\bnew\s*\(\s*\)/.source]),lookbehind:!0,inside:{"record-arguments":{pattern:r(/(^(?!new\s*\()<<0>>\s*)<<1>>/.source,[x,p]),lookbehind:!0,greedy:!0,inside:n.languages.csharp},keyword:l,"class-name":{pattern:RegExp(C),greedy:!0,inside:N},punctuation:/[,()]/}},preprocessor:{pattern:/(^[\t ]*)#.*/m,lookbehind:!0,alias:"property",inside:{directive:{pattern:/(#)\b(?:define|elif|else|endif|endregion|error|if|line|nullable|pragma|region|undef|warning)\b/,lookbehind:!0,alias:"keyword"}}}});var M=T+"|"+E,D=t(/\/(?![*/])|\/\/[^\r\n]*[\r\n]|\/\*(?:[^*]|\*(?!\/))*\*\/|<<0>>/.source,[M]),I=s(t(/[^"'/()]|<<0>>|\(<>*\)/.source,[D]),2),P=/\b(?:assembly|event|field|method|module|param|property|return|type)\b/.source,U=t(/<<0>>(?:\s*\(<<1>>*\))?/.source,[k,I]);n.languages.insertBefore("csharp","class-name",{attribute:{pattern:r(/((?:^|[^\s\w>)?])\s*\[\s*)(?:<<0>>\s*:\s*)?<<1>>(?:\s*,\s*<<1>>)*(?=\s*\])/.source,[P,U]),lookbehind:!0,greedy:!0,inside:{target:{pattern:r(/^<<0>>(?=\s*:)/.source,[P]),alias:"keyword"},"attribute-arguments":{pattern:r(/\(<<0>>*\)/.source,[I]),inside:n.languages.csharp},"class-name":{pattern:RegExp(k),inside:{punctuation:/\./}},punctuation:/[:,]/}}});var q=/:[^}\r\n]+/.source,W=s(t(/[^"'/()]|<<0>>|\(<>*\)/.source,[D]),2),H=t(/\{(?!\{)(?:(?![}:])<<0>>)*<<1>>?\}/.source,[W,q]),Y=s(t(/[^"'/()]|\/(?!\*)|\/\*(?:[^*]|\*(?!\/))*\*\/|<<0>>|\(<>*\)/.source,[M]),2),te=t(/\{(?!\{)(?:(?![}:])<<0>>)*<<1>>?\}/.source,[Y,q]);function $(L,F){return{interpolation:{pattern:r(/((?:^|[^{])(?:\{\{)*)<<0>>/.source,[L]),lookbehind:!0,inside:{"format-string":{pattern:r(/(^\{(?:(?![}:])<<0>>)*)<<1>>(?=\}$)/.source,[F,q]),lookbehind:!0,inside:{punctuation:/^:/}},punctuation:/^\{|\}$/,expression:{pattern:/[\s\S]+/,alias:"language-csharp",inside:n.languages.csharp}}},string:/[\s\S]+/}}n.languages.insertBefore("csharp","string",{"interpolation-string":[{pattern:r(/(^|[^\\])(?:\$@|@\$)"(?:""|\\[\s\S]|\{\{|<<0>>|[^\\{"])*"/.source,[H]),lookbehind:!0,greedy:!0,inside:$(H,W)},{pattern:r(/(^|[^@\\])\$"(?:\\.|\{\{|<<0>>|[^\\"{])*"/.source,[te]),lookbehind:!0,greedy:!0,inside:$(te,Y)}],char:{pattern:RegExp(E),greedy:!0}}),n.languages.dotnet=n.languages.cs=n.languages.csharp})(e)}mm.displayName="markup";mm.aliases=["atom","html","mathml","rss","ssml","svg","xml"];function mm(e){e.languages.markup={comment:{pattern://,greedy:!0},prolog:{pattern:/<\?[\s\S]+?\?>/,greedy:!0},doctype:{pattern:/"'[\]]|"[^"]*"|'[^']*')+(?:\[(?:[^<"'\]]|"[^"]*"|'[^']*'|<(?!!--)|)*\]\s*)?>/i,greedy:!0,inside:{"internal-subset":{pattern:/(^[^\[]*\[)[\s\S]+(?=\]>$)/,lookbehind:!0,greedy:!0,inside:null},string:{pattern:/"[^"]*"|'[^']*'/,greedy:!0},punctuation:/^$|[[\]]/,"doctype-tag":/^DOCTYPE/i,name:/[^\s<>'"]+/}},cdata:{pattern://i,greedy:!0},tag:{pattern:/<\/?(?!\d)[^\s>\/=$<%]+(?:\s(?:\s*[^\s>\/=]+(?:\s*=\s*(?:"[^"]*"|'[^']*'|[^\s'">=]+(?=[\s>]))|(?=[\s/>])))+)?\s*\/?>/,greedy:!0,inside:{tag:{pattern:/^<\/?[^\s>\/]+/,inside:{punctuation:/^<\/?/,namespace:/^[^\s>\/:]+:/}},"special-attr":[],"attr-value":{pattern:/=\s*(?:"[^"]*"|'[^']*'|[^\s'">=]+)/,inside:{punctuation:[{pattern:/^=/,alias:"attr-equals"},{pattern:/^(\s*)["']|["']$/,lookbehind:!0}]}},punctuation:/\/?>/,"attr-name":{pattern:/[^\s>\/]+/,inside:{namespace:/^[^\s>\/:]+:/}}}},entity:[{pattern:/&[\da-z]{1,8};/i,alias:"named-entity"},/&#x?[\da-f]{1,8};/i]},e.languages.markup.tag.inside["attr-value"].inside.entity=e.languages.markup.entity,e.languages.markup.doctype.inside["internal-subset"].inside=e.languages.markup,e.hooks.add("wrap",function(n){n.type==="entity"&&(n.attributes.title=n.content.value.replace(/&/,"&"))}),Object.defineProperty(e.languages.markup.tag,"addInlined",{value:function(t,r){var s={};s["language-"+r]={pattern:/(^$)/i,lookbehind:!0,inside:e.languages[r]},s.cdata=/^$/i;var i={"included-cdata":{pattern://i,inside:s}};i["language-"+r]={pattern:/[\s\S]+/,inside:e.languages[r]};var a={};a[t]={pattern:RegExp(/(<__[^>]*>)(?:))*\]\]>|(?!)/.source.replace(/__/g,function(){return t}),"i"),lookbehind:!0,greedy:!0,inside:i},e.languages.insertBefore("markup","cdata",a)}}),Object.defineProperty(e.languages.markup.tag,"addAttribute",{value:function(n,t){e.languages.markup.tag.inside["special-attr"].push({pattern:RegExp(/(^|["'\s])/.source+"(?:"+n+")"+/\s*=\s*(?:"[^"]*"|'[^']*'|[^\s'">=]+(?=[\s>]))/.source,"i"),lookbehind:!0,inside:{"attr-name":/^[^\s=]+/,"attr-value":{pattern:/=[\s\S]+/,inside:{value:{pattern:/(^=\s*(["']|(?!["'])))\S[\s\S]*(?=\2$)/,lookbehind:!0,alias:[t,"language-"+t],inside:e.languages[t]},punctuation:[{pattern:/^=/,alias:"attr-equals"},/"|'/]}}}})}}),e.languages.html=e.languages.markup,e.languages.mathml=e.languages.markup,e.languages.svg=e.languages.markup,e.languages.xml=e.languages.extend("markup",{}),e.languages.ssml=e.languages.xml,e.languages.atom=e.languages.xml,e.languages.rss=e.languages.xml}wh.displayName="css";wh.aliases=[];function wh(e){(function(n){var t=/(?:"(?:\\(?:\r\n|[\s\S])|[^"\\\r\n])*"|'(?:\\(?:\r\n|[\s\S])|[^'\\\r\n])*')/;n.languages.css={comment:/\/\*[\s\S]*?\*\//,atrule:{pattern:RegExp("@[\\w-](?:"+/[^;{\s"']|\s+(?!\s)/.source+"|"+t.source+")*?"+/(?:;|(?=\s*\{))/.source),inside:{rule:/^@[\w-]+/,"selector-function-argument":{pattern:/(\bselector\s*\(\s*(?![\s)]))(?:[^()\s]|\s+(?![\s)])|\((?:[^()]|\([^()]*\))*\))+(?=\s*\))/,lookbehind:!0,alias:"selector"},keyword:{pattern:/(^|[^\w-])(?:and|not|only|or)(?![\w-])/,lookbehind:!0}}},url:{pattern:RegExp("\\burl\\((?:"+t.source+"|"+/(?:[^\\\r\n()"']|\\[\s\S])*/.source+")\\)","i"),greedy:!0,inside:{function:/^url/i,punctuation:/^\(|\)$/,string:{pattern:RegExp("^"+t.source+"$"),alias:"url"}}},selector:{pattern:RegExp(`(^|[{}\\s])[^{}\\s](?:[^{};"'\\s]|\\s+(?![\\s{])|`+t.source+")*(?=\\s*\\{)"),lookbehind:!0},string:{pattern:t,greedy:!0},property:{pattern:/(^|[^-\w\xA0-\uFFFF])(?!\s)[-_a-z\xA0-\uFFFF](?:(?!\s)[-\w\xA0-\uFFFF])*(?=\s*:)/i,lookbehind:!0},important:/!important\b/i,function:{pattern:/(^|[^-a-z0-9])[-a-z0-9]+(?=\()/i,lookbehind:!0},punctuation:/[(){};:,]/},n.languages.css.atrule.inside.rest=n.languages.css;var r=n.languages.markup;r&&(r.tag.addInlined("style","css"),r.tag.addAttribute("style","css"))})(e)}yS.displayName="diff";yS.aliases=[];function yS(e){(function(n){n.languages.diff={coord:[/^(?:\*{3}|-{3}|\+{3}).*$/m,/^@@.*@@$/m,/^\d.*$/m]};var t={"deleted-sign":"-","deleted-arrow":"<","inserted-sign":"+","inserted-arrow":">",unchanged:" ",diff:"!"};Object.keys(t).forEach(function(r){var s=t[r],i=[];/^\w+$/.test(r)||i.push(/\w+/.exec(r)[0]),r==="diff"&&i.push("bold"),n.languages.diff[r]={pattern:RegExp("^(?:["+s+`].*(?:\r +`))}finally{C(!1)}}};return f.jsxs("div",{className:`home flex-1 min-h-0 overflow-y-auto [scrollbar-gutter:stable_both-edges] bg-canvas onboarding ${s===0?"[&_.home-inner]:max-w-300 [&_.home-inner]:pt-0 [&_.home-inner]:pb-0":"[&_.home-inner]:max-w-140 [&_.home-inner]:pt-24"}`,children:[!t&&u&&l.data&&f.jsx(GI,{harness:u,commands:l.data[u.id],onReady:we=>{L(we.id)},onClose:()=>{h(null)}}),f.jsx("div",{className:`home-inner max-w-155 my-0 mx-auto ${s===0?"px-8 sm:px-12":"pt-12 px-6 pb-16"}`,children:s===0?f.jsxs("div",{className:"onb-intro relative flex min-h-dvh flex-col justify-center gap-4 py-12 min-[1120px]:grid min-[1120px]:grid-cols-[minmax(0,_1.1fr)_minmax(28rem,_1fr)] min-[1120px]:grid-rows-[auto_auto] min-[1120px]:content-center min-[1120px]:gap-x-20 min-[1120px]:gap-y-10",children:[f.jsxs("div",{className:"onb-intro-copy relative z-10 min-[1120px]:col-start-1 min-[1120px]:row-start-1 min-[1120px]:self-start",children:[f.jsx("div",{className:"onb-intro-brand mb-10 text-6xl font-semibold leading-none tracking-[-0.035em]",children:f.jsx(sw,{})}),f.jsx("h2",{className:"onb-title mt-0 mx-0 text-4xl font-medium leading-[1.08] tracking-[-0.035em]",children:Jst()})]}),f.jsxs("div",{className:"onb-intro-features relative min-[1120px]:col-start-2 min-[1120px]:row-start-1 min-[1120px]:self-end",children:[f.jsx("div",{"aria-hidden":"true",className:"absolute -inset-14 rounded-full bg-primary-subtle opacity-70 blur-3xl"}),f.jsxs("ul",{className:"onb-intro-list relative flex flex-col gap-4 m-0 p-0 list-none",children:[f.jsx("li",{className:"rounded-2xl border border-border bg-background p-6 shadow-card",children:f.jsxs("span",{children:[f.jsx("strong",{className:"mb-1.5 block text-xl font-semibold tracking-[-0.015em]",children:lot()}),f.jsx("span",{className:"block text-lg leading-[1.55] text-text",children:nft()})]})}),f.jsx("li",{className:"rounded-2xl border border-border bg-background p-6 shadow-card",children:f.jsxs("span",{children:[f.jsx("strong",{className:"mb-1.5 block text-xl font-semibold tracking-[-0.015em]",children:plt()}),f.jsx("span",{className:"block text-lg leading-[1.55] text-text",children:x_t()})]})}),f.jsx("li",{className:"rounded-2xl border border-border bg-background p-6 shadow-card",children:f.jsxs("span",{children:[f.jsx("strong",{className:"mb-1.5 block text-xl font-semibold tracking-[-0.015em]",children:Qot()}),f.jsx("span",{className:"block text-lg leading-[1.55] text-text",children:Uft()})]})})]})]}),f.jsx("div",{className:"onb-intro-actions relative z-10 mt-8 flex justify-end min-[1120px]:col-start-2 min-[1120px]:row-start-2 min-[1120px]:mt-0 min-[1120px]:self-start",children:f.jsxs(Me,{variant:"primary",size:"large",onClick:$t,disabled:I&&b===null,children:[I&&b===null?f.jsx(Rt,{}):null,UN()," ",f.jsx(B1,{size:20})]})})]}):s===1?f.jsxs(f.Fragment,{children:[f.jsxs("div",{className:"onb-eyebrow mb-4.5 flex items-center gap-2 text-xl font-medium text-muted",children:[f.jsx(sw,{}),f.jsx("span",{children:z_t()})]}),f.jsx("h2",{className:"onb-title mt-0 mx-0 mb-1.5 text-3xl tracking-[-0.01em]",children:yat()}),f.jsx("p",{className:"onb-sub text-text text-base leading-[1.55] mt-0 mx-0 mb-5.5 max-w-120",children:hct()}),b!==null&&!pe&&f.jsx("p",{className:rj,children:o_t()}),b!==null&&pe&&M===null&&f.jsx("p",{className:rj,children:Nat()}),(w===null||le)&&f.jsxs("div",{className:"onb-git-check mt-7",role:"status","aria-live":"polite",children:[f.jsx(ij,{gitVersion:w,error:le}),le?f.jsx("p",{className:iw,children:V2()}):f.jsx("p",{className:iw,children:GN()})]}),f.jsx("div",{className:"onb-cards flex flex-col gap-3.5",children:b!==null?b.map(we=>{var ct;return f.jsx($xn,{h:we,remote:t,selected:M===we.id,onSelect:()=>L(we.id),commands:(ct=l.data)==null?void 0:ct[we.id],onSetup:()=>h(we)},we.id)}):X?f.jsx("div",{className:O_,children:V2()}):f.jsxs(os,{className:"py-2",children:[f.jsx(Rt,{})," ",zot()]})}),l.isError&&f.jsxs("p",{className:O_,children:[kUe()," ",f.jsx(Me,{variant:"ghost",onClick:()=>void l.refetch(),children:Vs()})]}),f.jsxs("div",{className:"onb-actions flex items-center gap-2.5 mt-5.5",children:[f.jsxs(Me,{variant:"ghost",onClick:()=>i(0),children:[f.jsx(b0,{size:12})," ",qN()]}),f.jsxs(Me,{variant:"ghost",onClick:()=>ze(!0,!0),disabled:I,children:[f.jsx(La,{size:12,className:I?"animate-[spin_0.9s_linear_infinite]":""})," ",gv()]}),f.jsx("div",{className:"flex-1"}),f.jsxs(Me,{variant:"primary",onClick:()=>i(2),disabled:I||!pe||M===null||!Ee,title:I?Tft():pe?M===null?tot():le?Kct():w===void 0?kft():w===null?jlt():void 0:e_t(),children:[UN()," ",f.jsx(B1,{size:13})]})]})]}):f.jsxs(f.Fragment,{children:[f.jsxs("div",{className:"onb-eyebrow mb-4.5 flex items-center gap-2 text-xl font-medium text-muted",children:[f.jsx(sw,{}),!_&&f.jsx("span",{children:D_t()})]}),f.jsx("h2",{className:"onb-title mt-0 mx-0 mb-1.5 text-3xl tracking-[-0.01em] onb-profile-title mb-5.5",children:H_t()}),f.jsx("div",{className:"onb-cards flex flex-col gap-2.5",children:f.jsxs("div",{className:VI,children:[f.jsxs("fieldset",{className:"onb-fieldset border-0 mt-0 mx-0 mb-4.5 p-0 [&_legend]:text-base [&_legend]:font-medium [&_legend]:mb-1.5",children:[f.jsx("legend",{children:Ift()}),f.jsx("p",{className:"onb-field-hint text-muted text-sm leading-[1.4] mt-0 mx-0 mb-2",children:Wat()}),f.jsx("div",{className:"onb-area-options grid grid-cols-[repeat(2,_minmax(0,_1fr))] gap-2",children:Rxn.map(we=>f.jsxs("label",{className:"onb-area-option flex items-center gap-2 border border-border rounded-md cursor-pointer py-[9px] px-2.5 [&:has(input:checked)]:border-accent [&:has(input:checked)]:bg-primary-subtle [&_input]:m-0",children:[f.jsx("input",{type:"checkbox",checked:q.includes(we.id),onChange:()=>Xe(we.id),disabled:y}),f.jsx("span",{children:we.label()})]},we.id))}),q.includes("Other")&&f.jsx("input",{className:"onb-other-area w-full mt-2",value:W,onChange:we=>H(we.target.value),disabled:y,placeholder:Q_t(),"aria-label":zct()})]}),f.jsx("label",{className:"onb-field-label text-base font-medium mb-1.5",htmlFor:"onb-background",children:out()}),f.jsx("textarea",{id:"onb-background",className:"onb-textarea w-full resize-y min-h-19.5 leading-normal text-base mb-3.5",value:Y,onChange:we=>te(we.target.value),disabled:y,rows:4,placeholder:Dot()}),f.jsx("label",{className:"onb-field-label text-base font-medium mb-1.5",htmlFor:"onb-paper-search",children:eut()}),f.jsx("p",{className:"onb-field-hint text-muted text-sm leading-[1.4] mt-0 mx-0 mb-2",children:ait()}),f.jsxs("div",{className:"onb-paper-search flex flex-col gap-1.5 mt-3 [&_input]:w-full",children:[f.jsx("input",{id:"onb-paper-search",value:F,onChange:we=>G(we.target.value),disabled:y,placeholder:yut()}),ce?f.jsx("div",{className:O_,children:Nut()}):V.length>0?f.jsx("div",{className:"onb-paper-results flex flex-col border border-border rounded-md max-h-50 overflow-y-auto [&_button]:flex [&_button]:flex-col [&_button]:items-start [&_button]:gap-0.5 [&_button]:py-2 [&_button]:px-2.5 [&_button]:bg-none [&_button]:bg-transparent [&_button]:border-0 [&_button]:border-b [&_button]:border-b-border-variant [&_button]:text-start [&_button]:[font:inherit] [&_button]:text-text [&_button]:cursor-pointer [&_button:last-child]:border-b-0 [&_button:hover]:bg-surface [&_.title]:text-sm [&_.title]:font-medium [&_.id]:text-xs [&_.id]:text-muted",children:V.map(we=>f.jsxs("button",{type:"button",onClick:()=>He(we),disabled:y,children:[f.jsx(k0,{children:sj(we.title)}),f.jsx("span",{className:"id",children:we.paperId})]},we.paperId))}):null]}),$.length>0&&f.jsx("div",{className:"onb-paper-chips flex flex-wrap gap-1.5 mt-2.5",children:$.map(we=>f.jsxs("span",{className:"onb-paper-chip inline-flex items-center gap-1.5 pt-1 pe-1 pb-1 ps-2.5 border border-border rounded-sm bg-surface text-sm max-w-full [&_.title]:font-medium [&_.title]:overflow-hidden [&_.title]:text-ellipsis [&_.title]:whitespace-nowrap [&_.title]:max-w-60 [&_.id]:text-xs [&_.id]:text-muted [&_button]:inline-flex [&_button]:items-center [&_button]:justify-center [&_button]:p-0.5 [&_button]:border-0 [&_button]:bg-none [&_button]:bg-transparent [&_button]:text-muted [&_button]:cursor-pointer [&_button]:rounded-xs [&_button:hover]:text-text [&_button:hover]:bg-panel",children:[f.jsx(k0,{children:we.title||we.paperId}),f.jsx("span",{className:"id",children:we.paperId}),f.jsx("button",{type:"button","aria-label":vZ({name:Ne(we.paperId)}),onClick:()=>Oe(we.paperId),disabled:y,children:f.jsx(_r,{size:12})})]},we.paperId))})]})}),!_t&&f.jsx("p",{className:"onb-profile-hint text-accent-red text-sm mt-2 mx-0 mb-0",children:q.length===0?Fat():xot()}),_&&!Ee&&f.jsxs("div",{className:"mt-5",role:"status",children:[f.jsx(ij,{gitVersion:w,error:le}),f.jsx("p",{className:iw,children:le?V2():GN()}),f.jsx(Me,{onClick:()=>ze(!0,!0),disabled:I,children:gv()})]}),f.jsxs("div",{className:"onb-actions flex items-center gap-2.5 mt-5.5",children:[f.jsxs(Me,{variant:"ghost",onClick:()=>i(_?0:1),disabled:y,children:[f.jsx(b0,{size:12})," ",qN()]}),f.jsx("div",{className:"flex-1"}),f.jsx(Me,{variant:"primary",onClick:()=>void jt(),disabled:y||!Ee||!_&&M===null||!_t,children:y?f.jsxs(f.Fragment,{children:[f.jsx(Rt,{})," ",Kut()]}):f.jsxs(f.Fragment,{children:[nlt()," ",f.jsx(B1,{size:13})]})})]}),M===null&&!_&&f.jsx("p",{className:Axn,children:Yft()}),E&&f.jsxs("div",{role:"alert",className:"mt-8 grid grid-cols-[auto_minmax(0,1fr)_auto] items-center gap-2.5 rounded-md border border-danger-notice-border bg-accent-red-subtle px-3 py-2",children:[f.jsx(Zk,{size:16,className:"shrink-0 text-accent-red"}),f.jsx("p",{className:"m-0 min-w-0 flex-1 text-sm text-text break-words",children:E}),_&&f.jsx(Me,{size:"small",onClick:()=>void jt(_t&&Ee?"complete":"setup"),disabled:y,children:Vs()}),_&&f.jsx(Me,{variant:"ghost",size:"small",className:"col-start-2 justify-self-start",disabled:y,onClick:()=>{p(!1),N(null),i(1)},children:Oat()}),f.jsxs("details",{className:"col-start-2 col-span-2 min-w-0 text-sm text-text",children:[f.jsx("summary",{className:"cursor-pointer",children:Hot()}),f.jsx("pre",{className:"mt-2 mb-0 max-h-48 overflow-auto whitespace-pre-wrap break-words rounded-md border border-danger-notice-border bg-background px-2 py-1.5 font-mono text-xs",children:A||E})]})]})]})})]})}function sj(e){return e.replace(/^\[[^\]]*\]\s*/,"").replace(/\s*[-–|]\s*arXiv\s*$/i,"")}function Dxn(e){return e.agentReady?{tone:"success",label:e.authMethod==="local"||!e.authenticated?Lk():h_t()}:e.installed?e.installBroken?{tone:"warning",label:wlt()}:e.authMethod==="local"?{tone:"warning",label:RD()}:e.needsConfigRepair||e.authState==="unknown"?{tone:"warning",label:cft()}:e.authState==="unsupported"?{tone:"warning",label:mft()}:e.installed?{tone:"warning",label:AD()}:{tone:"neutral",label:VN()}:{tone:"neutral",label:VN()}}function Lxn(e,n){var t;return{harness:e.id,model:n,permissionMode:((t=e.options)==null?void 0:t.defaultPermissionMode)??null,reasoningLevel:wb(e,n).defaultId}}function Ixn({harness:e}){return f.jsx(w0,{harness:e,size:26})}function $xn({h:e,remote:n,selected:t,onSelect:r,commands:s,onSetup:i}){var x;const a=!n&&!e.needsConfigRepair&&(!e.installed||e.installBroken||e.authState==="unsupported"||e.authMethod!=="local"&&e.authMethod!=="apiKey"&&(e.authState==="needsLogin"||e.authState==="unknown")),o=!e.agentReady&&a,l=a&&(!e.installed||!e.agentReady&&e.authState==="needsLogin"),u=Dxn(e),h=t?{tone:"success",label:Out()}:u,_=(x=e.version)==null?void 0:x.replace(/\s*\(.*\)$/,""),p=[e.id==="opencode"&&e.account!=="opencode"&&e.account,e.id==="opencode"&&e.plan].filter(Boolean).join(" · "),m=f.jsxs("div",{className:"onb-card-head flex flex-wrap items-center justify-between gap-3",children:[f.jsxs("span",{className:"onb-card-identity flex items-center gap-3 min-w-0",children:[f.jsx(Ixn,{harness:e.id}),f.jsxs("span",{className:"flex flex-col gap-1",children:[f.jsxs("span",{className:"onb-card-name flex flex-wrap items-center gap-2 text-base font-semibold tracking-[-0.01em]",children:[e.name,l&&f.jsx(yd,{tone:u.tone,className:"font-normal",children:u.label})]}),o&&!l&&f.jsx(yd,{tone:h.tone,children:h.label})]})]}),o?f.jsxs(Me,{size:"small",onClick:i,disabled:!s,"aria-haspopup":"dialog",title:HUe(),children:[f.jsx(co,{size:14}),!e.installed||e.installBroken?cUe():e.authState==="unsupported"?pGe():wD()]}):f.jsx(yd,{tone:h.tone,children:h.label})]});return e.agentReady?f.jsxs("button",{type:"button",className:`onb-card flex flex-col gap-2.5 bg-background border border-border rounded-lg py-4 px-4 onb-agent-choice w-full text-inherit [font:inherit] text-start transition-[border-color,box-shadow] duration-120 ease-standard [button&]:cursor-pointer [button&:hover]:border-muted [&.selected]:border-accent [&.selected]:shadow-selected${t?" selected":""}`,"aria-pressed":t,onClick:r,children:[m,e.id!=="opencode"&&f.jsx("div",{className:"onb-card-detail flex items-center gap-1.5 text-sm",children:e.accountLoading?f.jsxs(f.Fragment,{children:[f.jsx(Rt,{})," ",Llt()]}):f.jsxs(f.Fragment,{children:[e.account??(e.authMethod==="apiKey"?Dk():null),e.plan?` · ${e.plan}`:""]})}),p&&f.jsx("div",{className:O_,children:p})]}):f.jsxs("div",{className:"onb-card flex flex-col gap-2.5 bg-background border border-border rounded-lg py-4 px-4 onb-agent-choice w-full text-inherit [font:inherit] text-start transition-[border-color,box-shadow] duration-120 ease-standard [button&]:cursor-pointer [button&:hover]:border-muted [&.selected]:border-accent [&.selected]:shadow-selected",children:[m,e.authState==="unsupported"&&_&&f.jsx("div",{className:O_,children:_}),!o&&e.agentNote&&f.jsx("div",{className:`${O_} [&_code]:whitespace-pre-wrap break-words`,children:eh(e.agentNote)})]})}function ij({gitVersion:e,error:n}){return f.jsxs("div",{className:VI,children:[f.jsxs("div",{className:"onb-card-head flex items-center justify-between gap-3",children:[f.jsx("span",{className:"onb-card-name font-semibold text-base",children:qlt()}),f.jsx(yd,{tone:e?"success":n||e===null?"danger":"warning",children:e?Lk():n?Jit():e===null?TD():aat()})]}),(e||!n&&e===void 0)&&f.jsx("div",{className:O_,children:e??dat()})]})}const Bxn="/assets/slurm-logo-aGSXVZcE.svg",Pxn="/assets/thinking-machines-BOdslTfm.png";function Fxn(e){switch(e){case"modal_job":return"Modal";case"hf_job":return"Hugging Face";case"k8s_job":return"Kubernetes";case"ssh_job":return"SSH";case"slurm_job":return"Slurm";case"ray_job":return"Ray";case"openresearch_job":return"OpenResearch";case"local_job":return hD();case"tinker_job":return"Tinker";default:return e||"—"}}function Hxn({size:e=16}){return f.jsxs("svg",{width:e,height:e,viewBox:"0 0 24 24","aria-hidden":"true",children:[f.jsx("path",{d:"M2.25 11.535c0-3.407 1.847-6.554 4.844-8.258a9.822 9.822 0 019.687 0c2.997 1.704 4.844 4.851 4.844 8.258 0 5.266-4.337 9.535-9.687 9.535S2.25 16.8 2.25 11.535z",fill:"#FF9D0B"}),f.jsx("path",{d:"M11.938 20.086c4.797 0 8.687-3.829 8.687-8.551 0-4.722-3.89-8.55-8.687-8.55-4.798 0-8.688 3.828-8.688 8.55 0 4.722 3.89 8.55 8.688 8.55z",fill:"#FFD21E"}),f.jsx("path",{d:"M11.875 15.113c2.457 0 3.25-2.156 3.25-3.263 0-0.576-.393-.394-1.023-.089-0.582.283-1.365.675-2.224.675-1.798 0-3.25-1.693-3.25-0.586 0 1.107.79 3.263 3.25 3.263h-.003z",fill:"#FF323D"}),f.jsx("path",{d:"M14.76 9.21c.32.108.445.753.767.585.447-.233.707-.708.659-1.204a1.235 1.235 0 00-.879-1.059 1.262 1.262 0 00-1.33.394c-.322.384-.377.92-.14 1.36.153.283.638-.177.925-.079l-.002.003zm-5.887 0c-.32.108-.448.753-.768.585a1.226 1.226 0 01-.658-1.204c.048-.495.395-.913.878-1.059a1.262 1.262 0 011.33.394c.322.384.377.92.14 1.36-.152.283-.64-.177-.925-.079l.003.003z",fill:"#3A3B45"}),f.jsx("path",{d:"M17.812 10.366a.806.806 0 00.813-.8c0-.441-.364-.8-.813-.8a.806.806 0 00-.812.8c0 .442.364.8.812.8zm-11.624 0a.806.806 0 00.812-.8c0-.441-.364-.8-.812-.8a.806.806 0 00-.813.8c0 .442.364.8.813.8z",fill:"#3A3B45"}),f.jsx("path",{d:"M4.515 13.073c-.405 0-.765.162-1.017.46a1.455 1.455 0 00-.333.925 1.801 1.801 0 00-.485-.074c-.387 0-.737.146-.985.409a1.41 1.41 0 00-.2 1.722 1.302 1.302 0 00-.447.694c-.06.222-.12.69.2 1.166a1.267 1.267 0 00-.093 1.236c.238.533.81.958 1.89 1.405l.24.096c.768.3 1.473.492 1.478.494.89.243 1.808.375 2.732.394 1.465 0 2.513-.443 3.115-1.314.93-1.342.842-2.575-.274-3.763l-.151-.154c-.692-.684-1.155-1.69-1.25-1.912-.195-.655-.71-1.383-1.562-1.383-.46.007-.889.233-1.15.605-.25-.31-.495-0.553-.715-.694a1.87 1.87 0 00-.993-.312zm14.97 0c.405 0 .767.162 1.017.46.216.262.333.588.333.925.158-.047.322-.071.487-.074.388 0 .738.146.985.409a1.41 1.41 0 01.2 1.722c.22.178.377.422.445.694.06.222.12.69-.2 1.166.244.37.279.836.093 1.236-.238.533-.81.958-1.889 1.405l-.239.096c-.77.3-1.475.492-1.48.494-.89.243-1.808.375-2.732.394-1.465 0-2.513-.443-3.115-1.314-.93-1.342-.842-2.575.274-3.763l.151-.154c.695-.684 1.157-1.69 1.252-1.912.195-.655.708-1.383 1.56-1.383.46.007.889.233 1.15.605.25-.31.495-0.553.718-.694.244-.162.523-.265.814-.3l.176-.012z",fill:"#FF9D0B"}),f.jsx("path",{d:"M9.785 20.132c.688-.994.638-1.74-.305-2.667-.945-.928-1.495-2.288-1.495-2.288s-.205-.788-.672-.714c-.468.074-.81 1.25.17 1.971.977.721-.195 1.21-0.573.534-.375-.677-1.405-2.416-1.94-2.751-0.532-.332-.907-.148-.782.541.125.687 2.357 2.35 2.14 2.707-.218.362-.983-.42-.983-.42S2.953 14.9 2.43 15.46c-0.52.558.398 1.026 1.7 1.803 1.308.778 1.41.985 1.225 1.28-.187.295-3.07-2.1-3.34-1.083-.27 1.011 2.943 1.304 2.745 2.006-.2.7-2.265-1.324-2.685-0.537-.425.79 2.913 1.718 2.94 1.725 1.075.276 3.813.859 4.77-0.522zm4.432 0c-.687-.994-.64-1.74.305-2.667.943-.928 1.493-2.288 1.493-2.288s.205-.788.675-.714c.465.074.807 1.25-.17 1.971-.98.721.195 1.21.57.534.377-.677 1.407-2.416 1.94-2.751.532-.332.91-.148.782.541-.125.687-2.355 2.35-2.137 2.707.215.362.98-.42.98-.42S21.05 14.9 21.57 15.46c.52.558-.395 1.026-1.7 1.803-1.308.778-1.408.985-1.225 1.28.187.295 3.07-2.1 3.34-1.083.27 1.011-2.94 1.304-2.743 2.006.2.7 2.263-1.324 2.685-0.537.423.79-2.912 1.718-2.94 1.725-1.077.276-3.815.859-4.77-0.522z",fill:"#FFD21E"})]})}function qxn({size:e=16}){return f.jsxs("svg",{width:e,height:e,viewBox:"0 0 300 300",fill:"none","aria-hidden":"true",children:[f.jsx("path",{d:"M121.683 75.25L149.997 124L91.4816 224.75C90.3128 226.757 88.155 228 85.8174 228H32.9664C31.7976 228 30.6778 227.691 29.697 227.131C28.7161 226.57 27.8906 225.758 27.3021 224.75L0.876625 179.25C-0.292208 177.243 -0.292208 174.765 0.876625 172.75L57.512 75.25C58.0923 74.2425 58.9259 73.43 59.9068 72.8694C60.8876 72.3088 62.0074 72 63.1762 72H116.027C118.365 72 120.523 73.2431 121.692 75.25H121.683ZM299.125 172.75L242.49 75.25C241.91 74.2425 241.076 73.43 240.095 72.8694C239.114 72.3088 237.995 72 236.826 72H183.975C181.637 72 179.479 73.2431 178.311 75.25L149.997 124L208.512 224.75C209.681 226.757 211.839 228 214.177 228H267.027C268.196 228 269.316 227.691 270.297 227.131C271.278 226.57 272.103 225.758 272.692 224.75L299.117 179.25C300.286 177.243 300.286 174.765 299.117 172.75H299.125Z",fill:"#62DE61"}),f.jsx("path",{d:"M89.6018 124H150.005L121.692 75.25C120.523 73.2431 118.365 72 116.027 72H63.1763C62.0074 72 60.8876 72.3088 59.9068 72.8694L89.6018 124Z",fill:"url(#orxModalA)"}),f.jsx("path",{d:"M89.6018 124L59.9068 72.8694C58.9259 73.43 58.1005 74.2425 57.512 75.25L0.876625 172.75C-0.292208 174.765 -0.292208 177.235 0.876625 179.25L27.3021 224.75C27.8825 225.758 28.7161 226.57 29.697 227.131L89.5936 124H89.6018Z",fill:"url(#orxModalB)"}),f.jsx("path",{d:"M149.997 124H89.5936L29.697 227.131C30.6778 227.691 31.7976 228 32.9664 228H85.8174C88.155 228 90.3128 226.757 91.4816 224.75L149.997 124Z",fill:"#09AF58"}),f.jsx("path",{d:"M299.125 179.25C299.706 178.243 300 177.121 300 176H240.61L210.915 227.131C211.896 227.691 213.016 228 214.185 228H267.036C269.373 228 271.531 226.757 272.7 224.75L299.125 179.25Z",fill:"#09AF58"}),f.jsx("path",{d:"M183.975 72C182.806 72 181.686 72.3088 180.705 72.8694L240.602 176H299.992C299.992 174.879 299.698 173.758 299.117 172.75L242.49 75.25C241.321 73.2431 239.163 72 236.826 72H183.967H183.975Z",fill:"url(#orxModalC)"}),f.jsx("path",{d:"M210.907 227.131L240.602 176L180.705 72.8694C179.725 73.43 178.899 74.2425 178.311 75.25L149.997 124L208.512 224.75C209.093 225.758 209.926 226.57 210.907 227.131Z",fill:"url(#orxModalD)"}),f.jsxs("defs",{children:[f.jsxs("linearGradient",{id:"orxModalA",x1:"127.348",y1:"137",x2:"82.9561",y2:"59.6398",gradientUnits:"userSpaceOnUse",children:[f.jsx("stop",{stopColor:"#BFF9B4"}),f.jsx("stop",{offset:"1",stopColor:"#80EE64"})]}),f.jsxs("linearGradient",{id:"orxModalB",x1:"7.04774",y1:"214.131",x2:"81.1284",y2:"85.0556",gradientUnits:"userSpaceOnUse",children:[f.jsx("stop",{stopColor:"#80EE64"}),f.jsx("stop",{offset:"0.18",stopColor:"#7BEB63"}),f.jsx("stop",{offset:"0.36",stopColor:"#6FE562"}),f.jsx("stop",{offset:"0.55",stopColor:"#5ADA60"}),f.jsx("stop",{offset:"0.74",stopColor:"#3DCA5D"}),f.jsx("stop",{offset:"0.93",stopColor:"#18B759"}),f.jsx("stop",{offset:"1",stopColor:"#09AF58"})]}),f.jsxs("linearGradient",{id:"orxModalC",x1:"278.103",y1:"188.561",x2:"204.022",y2:"59.4863",gradientUnits:"userSpaceOnUse",children:[f.jsx("stop",{stopColor:"#BFF9B4"}),f.jsx("stop",{offset:"1",stopColor:"#80EE64"})]}),f.jsxs("linearGradient",{id:"orxModalD",x1:"232.804",y1:"214.569",x2:"158.724",y2:"85.4864",gradientUnits:"userSpaceOnUse",children:[f.jsx("stop",{stopColor:"#80EE64"}),f.jsx("stop",{offset:"0.18",stopColor:"#7BEB63"}),f.jsx("stop",{offset:"0.36",stopColor:"#6FE562"}),f.jsx("stop",{offset:"0.55",stopColor:"#5ADA60"}),f.jsx("stop",{offset:"0.74",stopColor:"#3DCA5D"}),f.jsx("stop",{offset:"0.93",stopColor:"#18B759"}),f.jsx("stop",{offset:"1",stopColor:"#09AF58"})]})]})]})}function Uxn({size:e=16}){return f.jsx("svg",{width:e,height:e,viewBox:"0 0 24 24",fill:"#326CE5","aria-hidden":"true",children:f.jsx("path",{d:"M10.204 14.35l.007.01-.999 2.413a5.171 5.171 0 0 1-2.075-2.597l2.578-.437.004.005a.44.44 0 0 1 .484.606zm-.833-2.129a.44.44 0 0 0 .173-.756l.002-.011L7.585 9.7a5.143 5.143 0 0 0-.73 3.255l2.514-.725.002-.009zm1.145-1.98a.44.44 0 0 0 .699-.337l.01-.005.15-2.62a5.144 5.144 0 0 0-3.01 1.442l2.147 1.523.004-.002zm.76 2.75l.723.349.722-.347.18-.78-0.5-.623h-.804l-0.5.623.179.779zm1.5-3.095a.44.44 0 0 0 .7.336l.008.003 2.134-1.513a5.188 5.188 0 0 0-2.992-1.442l.148 2.615.002.001zm10.876 5.97l-5.773 7.181a1.6 1.6 0 0 1-1.248.594l-9.261.003a1.6 1.6 0 0 1-1.247-0.596l-5.776-7.18a1.583 1.583 0 0 1-.307-1.34L2.1 5.573c.108-.47.425-.864.863-1.073L11.305.513a1.606 1.606 0 0 1 1.385 0l8.345 3.985c.438.209.755.604.863 1.073l2.062 8.955c.108.47-.005.963-.308 1.34zm-3.289-2.057c-.042-.01-.103-.026-.145-.034-.174-.033-.315-.025-.479-.038-.35-.037-.638-.067-.895-.148-.105-.04-.18-.165-.216-.216l-.201-.059a6.45 6.45 0 0 0-.105-2.332 6.465 6.465 0 0 0-.936-2.163c.052-.047.15-.133.177-.159.008-.09.001-.183.094-.282.197-.185.444-.338.743-0.522.142-.084.273-.137.415-.242.032-.024.076-.062.11-.089.24-.191.295-0.52.123-.736-.172-.216-0.506-.236-.745-.045-.034.027-.08.062-.111.088-.134.116-.217.23-.33.35-.246.25-.45.458-.673.609-.097.056-.239.037-.303.033l-.19.135a6.545 6.545 0 0 0-4.146-2.003l-.012-.223c-.065-.062-.143-.115-.163-.25-.022-.268.015-0.557.057-.905.023-.163.061-.298.068-.475.001-.04-.001-.099-.001-.142 0-.306-.224-0.555-0.5-0.555-.275 0-.499.249-.499.555l.001.014c0 .041-.002.092 0 .128.006.177.044.312.067.475.042.348.078.637.056.906a.545.545 0 0 1-.162.258l-.012.211a6.424 6.424 0 0 0-4.166 2.003 8.373 8.373 0 0 1-.18-.128c-.09.012-.18.04-.297-.029-.223-.15-.427-.358-.673-.608-.113-.12-.195-.234-.329-.349-.03-.026-.077-.062-.111-.088a.594.594 0 0 0-.348-.132.481.481 0 0 0-.398.176c-.172.216-.117.546.123.737l.007.005.104.083c.142.105.272.159.414.242.299.185.546.338.743.522.076.082.09.226.1.288l.16.143a6.462 6.462 0 0 0-1.02 4.506l-.208.06c-.055.072-.133.184-.215.217-.257.081-0.546.11-.895.147-.164.014-.305.006-.48.039-.037.007-.09.02-.133.03l-.004.002-.007.002c-.295.071-.484.342-.423.608.061.267.349.429.645.365l.007-.001.01-.003.129-.029c.17-.046.294-.113.448-.172.33-.118.604-.217.87-.256.112-.009.23.069.288.101l.217-.037a6.5 6.5 0 0 0 2.88 3.596l-.09.218c.033.084.069.199.044.282-.097.252-.263.517-.452.813-.091.136-.185.242-.268.399-.02.037-.045.095-.064.134-.128.275-.034.591.213.71.248.12.556-.007.69-.282v-.002c.02-.039.046-.09.062-.127.07-.162.094-.301.144-.458.132-.332.205-.68.387-.897.05-.06.13-.082.215-.105l.113-.205a6.453 6.453 0 0 0 4.609.012l.106.192c.086.028.18.042.256.155.136.232.229.507.342.84.05.156.074.295.145.457.016.037.043.09.062.129.133.276.442.402.69.282.247-.118.341-.435.213-.71-.02-.039-.045-.096-.065-.134-.083-.156-.177-.261-.268-.398-.19-.296-.346-0.541-.443-.793-.04-.13.007-.21.038-.294-.018-.022-.059-.144-.083-.202a6.499 6.499 0 0 0 2.88-3.622c.064.01.176.03.213.038.075-.05.144-.114.28-.104.266.039.54.138.87.256.154.06.277.128.448.173.036.01.088.019.13.028l.009.003.007.001c.297.064.584-.098.645-.365.06-.266-.128-0.537-.423-.608zM16.4 9.701l-1.95 1.746v.005a.44.44 0 0 0 .173.757l.003.01 2.526.728a5.199 5.199 0 0 0-.108-1.674A5.208 5.208 0 0 0 16.4 9.7zm-4.013 5.325a.437.437 0 0 0-.404-.232.44.44 0 0 0-.372.233h-.002l-1.268 2.292a5.164 5.164 0 0 0 3.326.003l-1.27-2.296h-.01zm1.888-1.293a.44.44 0 0 0-.27.036.44.44 0 0 0-.214.572l-.003.004 1.01 2.438a5.15 5.15 0 0 0 2.081-2.615l-2.6-.44-.004.005z"})})}function Gxn({size:e=16}){return f.jsx("svg",{width:e,height:e,viewBox:"0 0 24 24",fill:"#028CF0","aria-hidden":"true",children:f.jsx("path",{d:"M16.153 12.826c-.63-.183-1.03.15-1.378.846-0.58 1.13-1.643 1.644-2.888 1.594-1.245-.05-2.257-.63-2.788-1.776-.233-.498-.498-.664-1.046-.68-.93-.017-1.643.016-2.174 1.062-.631 1.261-2.258 1.693-3.619 1.261a3.234 3.234 0 0 1-2.257-3.22 3.198 3.198 0 0 1 2.29-3.02 3.276 3.276 0 0 1 3.702 1.327c.216.315.216.863.597.93.648.1 1.328.033 1.992.033.299 0 .316-.266.399-.465.58-1.295 1.61-1.959 2.987-1.975 1.361-.017 2.39.647 2.955 1.892.215.465.48.598.946.548.166-.017.332.016.498 0 .464-.083 1.062.282 1.344-.448.282-.73-.382-.913-.68-1.245-.847-.946-1.81-1.793-2.673-2.706-.415-.465-.763-.614-1.41-.415-1.876.614-3.619-.431-4.15-2.357-.448-1.676.714-3.535 2.44-3.917a3.293 3.293 0 0 1 3.95 2.457c.017.05.017.083.033.133.117.564.117 1.145-.132 1.626-.283.531-.133.83.249 1.195a152.61 152.61 0 0 1 3.286 3.27c.299.299.498.349.913.2 1.51-0.565 2.97-.1 3.884 1.161a3.266 3.266 0 0 1-.067 3.801c-.896 1.195-2.357 1.643-3.834 1.079-.381-.15-0.58-.1-.846.182a163.619 163.619 0 0 1-3.403 3.386c-.299.3-.415.532-.232.98a3.198 3.198 0 0 1-1.278 3.917A3.298 3.298 0 0 1 9.646 23c-1.062-1.062-1.228-2.688-.415-4.033a3.196 3.196 0 0 1 3.835-1.294c.498.182.78.083 1.145-.283 1.012-1.045 2.058-2.058 3.087-3.103.266-.266.68-.449.432-1.03-.233-0.547-.631-.414-1.03-.431zM11.97 4.942c.913.016 1.643-.714 1.66-1.627v-.05a1.646 1.646 0 0 0-1.76-1.56 1.63 1.63 0 0 0-1.543 1.527 1.638 1.638 0 0 0 1.577 1.71zm.033 5.41a1.658 1.658 0 0 0-1.676 1.61v.084a1.73 1.73 0 0 0 1.643 1.66c.847.016 1.643-.78 1.677-1.627a1.648 1.648 0 0 0-1.577-1.71c-.017-.016-.05-.016-.067-.016zm7.088 1.694c.016.896.747 1.61 1.626 1.643a1.723 1.723 0 0 0 1.66-1.726 1.666 1.666 0 0 0-1.66-1.61 1.623 1.623 0 0 0-1.643 1.577c.017.05.017.083.017.116zM3.24 10.353a1.692 1.692 0 0 0-1.66 1.626c-.017.847.863 1.727 1.693 1.71a1.687 1.687 0 0 0 1.626-1.743 1.615 1.615 0 0 0-1.643-1.593Zm8.68 12c.98.033 1.71-.647 1.727-1.593a1.646 1.646 0 0 0-1.51-1.793 1.646 1.646 0 0 0-1.793 1.51v.233a1.609 1.609 0 0 0 1.543 1.66c0-.017.017-.017.033-.017z"})})}function Vxn({size:e=16}){return f.jsxs("svg",{width:e,height:e,viewBox:"0 0 100 100","aria-hidden":"true",children:[f.jsx("rect",{width:"100",height:"100",rx:"8",fill:"#9a2036"}),f.jsx("path",{d:"M15.375 16.782v63.843a4 4 0 0 0 4 4h63.843c3.564 0 5.348-4.309 2.829-6.828L22.203 13.953c-2.52-2.52-6.828-.735-6.828 2.829",fill:"#fff"})]})}function Kxn({size:e=16}){return f.jsx("img",{className:"tinker-logo block flex-none object-contain",src:Pxn,width:e,height:e,style:{transform:e>=48?`translateX(${Math.round(e*.18)}px) scale(1.65)`:"scale(1.22)"},alt:"","aria-hidden":"true"})}function Wxn({size:e=16}){return f.jsx("img",{className:"block flex-none object-contain",src:Bxn,width:e,height:e,alt:"","aria-hidden":"true"})}function Rb({size:e=16}){return f.jsx("svg",{width:e,height:e,viewBox:"0 0 24 24",fill:"currentColor","aria-hidden":"true",children:f.jsx("path",{d:"M12 0C5.37 0 0 5.37 0 12c0 5.31 3.435 9.795 8.205 11.385.6.105.825-.255.825-0.57 0-.285-.015-1.23-.015-2.235-3.015.555-3.795-.735-4.035-1.41-.135-.345-.72-1.41-1.23-1.695-.42-.225-1.02-.78-.015-.795.945-.015 1.62.87 1.845 1.23 1.08 1.815 2.805 1.305 3.495.99.105-.78.42-1.305.765-1.605-2.67-.3-5.46-1.335-5.46-5.925 0-1.305.465-2.385 1.23-3.225-.12-.3-0.54-1.53.12-3.18 0 0 1.005-.315 3.3 1.23.96-.27 1.98-.405 3-.405s2.04.135 3 .405c2.295-1.56 3.3-1.23 3.3-1.23.66 1.65.24 2.88.12 3.18.765.84 1.23 1.905 1.23 3.225 0 4.605-2.805 5.625-5.475 5.925.435.375.81 1.095.81 2.22 0 1.605-.015 2.895-.015 3.3 0 .315.225.69.825.57A12.02 12.02 0 0 0 24 12c0-6.63-5.37-12-12-12z"})})}function xh({kind:e,size:n=16}){switch(e){case"modal_job":return f.jsx(qxn,{size:n});case"hf_job":return f.jsx(Hxn,{size:n});case"k8s_job":return f.jsx(Uxn,{size:n});case"ssh_job":return f.jsx(Gz,{size:n,strokeWidth:1.5});case"slurm_job":return f.jsx(Wxn,{size:n});case"ray_job":return f.jsx(Gxn,{size:n});case"openresearch_job":return f.jsx(Vxn,{size:n});case"tinker_job":return f.jsx(Kxn,{size:n});case"local_job":return f.jsx(Kbn,{size:n,strokeWidth:1.5});default:return f.jsx(Gz,{size:n})}}function pS({backend:e}){const n=Uk(e),t=ogn(e);return n?f.jsxs("span",{className:"backend-badge inline-flex items-center gap-[7px] [&_svg]:flex-none [&_svg]:block [&_.backend-name]:font-medium [&_.backend-detail]:text-muted [&.muted]:text-muted",children:[f.jsx(xh,{kind:n}),f.jsx("span",{className:"backend-name",children:Fxn(n)}),t&&f.jsx("span",{className:"backend-detail text-sm",children:t})]}):f.jsx("span",{className:"backend-badge inline-flex items-center gap-[7px] [&_svg]:flex-none [&_svg]:block [&_.backend-name]:font-medium [&_.backend-detail]:text-muted [&.muted]:text-muted muted text-muted",children:"—"})}function aw(e,n){const[t,r]=T.useState(e);return T.useEffect(()=>{const s=setTimeout(()=>r(e),n);return()=>clearTimeout(s)},[e,n]),t}function Jg(e,n){const t=e.toLowerCase().replace(/[^a-z0-9]+/g,"-").replace(/^-+|-+$/g,"");return(n?t.slice(0,n):t)||"research-project"}function Qxn(e){const t=(e.trim().split(/[?#]/)[0].split("/").filter(Boolean).pop()??"").replace(/\.(pdf|md)$/i,"");return/^\d{4}\.\d{4,5}(v\d+)?$/.test(t)?t:null}function Xxn(e){const n=e==null?void 0:e.trim().match(/github\.com[/:]([^/]+)\/([^/?#]+)/i);return n?{owner:n[1],repo:n[2].replace(/\.git$/,"")}:null}function Yxn(e){return e.trim().replace(/^https?:\/\//i,"").replace(/^git@([^:]+):/i,"$1/").replace(/\.git$/i,"").replace(/\/$/,"")}function Zxn({onCreated:e,onCancel:n,remote:t=!1}){var Dn,mn,Gn,Rn;const[r,s]=T.useState("blank"),[i,a]=T.useState(""),[o,l]=T.useState(!1),[u,h]=T.useState(""),[_,p]=T.useState(!1),[m,x]=T.useState(!1),[k,v]=T.useState(!1),[b,w]=T.useState(null),[y,C]=T.useState(!1),[E,N]=T.useState(!1),[A,j]=T.useState(""),[M,L]=T.useState(null),[I,B]=T.useState(!1),q=T.useRef(0),U=T.useRef(0),W=T.useRef({blank:{name:"",nameTouched:!1,path:"",pathTouched:!1},folder:{name:"",nameTouched:!1,path:"",pathTouched:!1},paper:{name:"",nameTouched:!1,path:"",pathTouched:!1}}),H=r==="paper"?Xxn(M==null?void 0:M.repoUrl):null,Y=i.trim()?`~/OpenResearch/${Jg(i,48)}`:"",te=`~/OpenResearch/${Jg(i||(M==null?void 0:M.title)||(M==null?void 0:M.paperId)||"")}`,$=r==="blank"&&!_?Y:r==="paper"&&M&&!_?te:u,D=aw($.trim(),200),F=ft({...Zp(D),enabled:!!D&&D===$.trim()}),G=D===$.trim()?F.data??null:null,V=D===$.trim()?((Dn=F.error)==null?void 0:Dn.message)??null:null,ee=!!$.trim()&&(D!==$.trim()||F.isFetching),ce=H??(r==="folder"&&(G!=null&&G.githubOwner)&&G.githubRepo?{owner:G.githubOwner,repo:G.githubRepo}:null),ae=ft(Qgn()),re=((mn=ae.data)==null?void 0:mn.login)??(ae.isPending?void 0:null),X=ft(Gk()),oe=T.useRef(!1);T.useEffect(()=>{oe.current||!X.data||(oe.current=!0,N(X.data.githubForNewProjects))},[X.data]);const le=aw(i.trim(),150),_e=ft({...Xgn(le),enabled:le===i.trim()}),pe=le===i.trim()?((Gn=_e.data)==null?void 0:Gn.repo)??Jg(i,48):Jg(i,48),Ee=le!==i.trim()||_e.isFetching,Ie=ft({...Tz((ce==null?void 0:ce.owner)??"",(ce==null?void 0:ce.repo)??""),enabled:!!ce,subscribed:!!ce}),ze=!!ce&&Ie.isFetching,He=ce&&((Rn=Ie.data)!=null&&Rn.canPush)?`github.com/${ce.owner}/${ce.repo}`:null,Oe=aw(A.trim(),350),Xe=Qxn(Oe),_t=r==="paper"&&!M&&Oe===A.trim(),Vt=ft({...HL(Oe),enabled:_t&&!Xe&&Oe.length>=3,subscribed:_t&&!Xe&&Oe.length>=3}),$t=ft({...y3(Xe??""),enabled:_t&&!!Xe,subscribed:_t&&!!Xe}),jt=_t&&!Xe?Vt.data??[]:[],mt=_t&&Vt.isSuccess?Oe:"",we=I||r==="paper"&&!M&&(Oe!==A.trim()||(Xe?$t.isFetching:Vt.isFetching));T.useEffect(()=>{var yt;!_t||!Xe||!$t.data||(L($t.data),o||a(((yt=$t.data.title)==null?void 0:yt.trim())||$t.data.paperId))},[_t,Xe,$t.data,o]),T.useEffect(()=>{const yt=Xe?$t.error:Vt.error;_t&&yt&&w(yt.message)},[_t,Xe,$t.error,Vt.error]);const ct=hn({mutationFn:Xpn});async function ye(yt){var Ue;const Dt=++q.current;B(!0),w(null);try{const gt=await rt.fetchQuery(y3(yt));if(Dt!==q.current)return;L(gt),o||a(((Ue=gt.title)==null?void 0:Ue.trim())||gt.paperId)}catch(gt){Dt===q.current&&w(gt instanceof Error?gt.message:String(gt))}finally{Dt===q.current&&B(!1)}}function je(){q.current+=1,U.current+=1,L(null),j(""),B(!1),x(!1),h(""),p(!1),W.current.paper={name:o?i:"",nameTouched:o,path:"",pathTouched:!1},o||a("")}function qe(yt){if(yt===r)return;q.current+=1,U.current+=1,W.current[r]={name:i,nameTouched:o,path:u,pathTouched:_};const Dt=W.current[yt];s(yt),w(null),B(!1),x(!1),a(Dt.name),l(Dt.nameTouched),h(Dt.path),p(Dt.pathTouched)}async function at(){if(m)return;const yt=++U.current;x(!0),w(null);try{const Dt=await Qpn();if(yt!==U.current||!Dt)return;if(p(!0),h(Dt),rt.invalidateQueries(Zp(Dt)),r==="folder"&&!o){const Ue=Dt.replace(/[\\/]+$/,"").split(/[\\/]/).pop();Ue&&a(Ue)}}catch(Dt){yt===U.current&&w(Dt instanceof Error?Dt.message:String(Dt))}finally{yt===U.current&&x(!1)}}async function nt(yt){if(yt.preventDefault(),!!St){v(!0),w(null);try{const Dt=await rt.fetchQuery({...Zp($.trim()),staleTime:0});if(Dt.exists&&Dt.directory===!1)throw new Error(U2());if(r==="blank"&&Dt.exists)throw new Error(IN());if(r==="paper"&&Dt.empty===!1)throw new Error(HN());E&&ce&&await rt.fetchQuery({...Tz(ce.owner,ce.repo),staleTime:0}).catch(()=>null);const Ue=await ct.mutateAsync({name:i.trim(),path:$.trim(),creationMode:r,createFolder:r!=="folder",requireNewFolder:r==="blank",initializeGit:!0,githubSyncEnabled:E,locale:z(),...r==="paper"&&M?{paperId:M.paperId,cloneUrl:M.repoUrl??void 0}:{}});e(Ue.project,Ue.githubPublicationError)}catch(Dt){w(Dt instanceof Error?Dt.message:String(Dt))}finally{v(!1)}}}const Kt=i.trim(),Qe=r==="paper"&&M&&!M.repoUrl?M.paperId:null,kt=r==="folder"&&(G==null?void 0:G.gitState)==="ready"?G.resolvedPath??null:null,Tt=Kt!==""&&(Qe!==null||kt!==null);T.useEffect(()=>{if(!Tt)return;const yt=window.setTimeout(()=>{n0n({name:Kt,paperId:Qe??void 0,path:kt??void 0,locale:z()}).catch(()=>{})},1200);return()=>window.clearTimeout(yt)},[Tt,Kt,Qe,kt]);const Yt=(G==null?void 0:G.gitVersion)===null,tn=r==="folder"&&!!$.trim()&&G!==null&&G.exists===!1,rr=r==="blank"&&(G==null?void 0:G.exists)===!0,rn=!!$.trim()&&(G==null?void 0:G.exists)===!0&&G.directory===!1,ln=r==="paper"&&!!(M!=null&&M.repoUrl)&&(G==null?void 0:G.empty)===!1,An=r==="paper"&&!!M&&!(M!=null&&M.repoUrl)&&(G==null?void 0:G.empty)===!1,Un=r==="folder"&&((G==null?void 0:G.gitState)==="detached"||(G==null?void 0:G.gitState)==="invalid"),Yn=_&&!$.trim()||rn||ln||An,fr=_&&!$.trim()||rn||rr,Yr=_&&!$.trim()?FN():rn?U2():rr?IN():null,zr=_&&!$.trim()?FN():rn?U2():ln?HN():An?$Je():null,St=!!(i.trim()&&$.trim())&&!k&&!m&&!ee&&G!==null&&!V&&!Yt&&!tn&&!rr&&!rn&&!ln&&!An&&!Un&&(r!=="paper"||!!M)&&(!E||typeof re=="string"&&!Ee&&!ze),cn=He??`github.com/${re??"you"}/${pe}`,jn=re===void 0||Ee||ze,fn=r==="paper"&&!M&&A.trim().length>=3&&mt===A.trim()&&!we&&jt.length===0&&!b;return f.jsxs("form",{className:"form [&_.form-seg]:self-start [&_.form-seg]:mb-0.5 [&_.form-seg_button]:py-[5px] [&_.form-seg_button]:px-3 [&_.repo-hint]:font-normal [&_.repo-hint]:text-sm [&_.repo-hint]:text-muted [&_.repo-hint.ok]:text-accent-teal [&_.folder-picker-control]:flex [&_.folder-picker-control]:items-center [&_.folder-picker-control]:gap-[9px] [&_.folder-picker-control]:w-full [&_.folder-picker-control]:min-w-0 [&_.folder-picker-control]:py-2 [&_.folder-picker-control]:px-2.5 [&_.folder-picker-control]:overflow-hidden [&_.folder-picker-control]:bg-background [&_.folder-picker-control]:border [&_.folder-picker-control]:border-border [&_.folder-picker-control]:rounded-md [&_.folder-picker-control]:cursor-pointer [&_.folder-picker-control]:text-start [&_.folder-picker-control]:transition-[border-color,box-shadow] [&_.folder-picker-control]:duration-120 [&_.folder-picker-control]:ease-standard [&_.folder-picker-control:hover:not(:disabled)]:border-muted [&_.folder-picker-control:hover:not(:disabled)]:shadow-control-subtle [&_.folder-picker-control:focus-visible]:outline-2 [&_.folder-picker-control:focus-visible]:outline-solid [&_.folder-picker-control:focus-visible]:outline-text [&_.folder-picker-control:focus-visible]:outline-offset-2 [&_.folder-picker-control_span]:flex-1 [&_.folder-picker-control_span]:min-w-0 [&_.folder-picker-control_span]:overflow-hidden [&_.folder-picker-control_span]:text-ellipsis [&_.folder-picker-control_span]:whitespace-nowrap [&_.folder-picker-control_.placeholder]:text-muted [&_.folder-picker-icon]:flex-none [&_.folder-picker-icon]:text-current [&_.folder-picker-chevron]:flex-none [&_.folder-picker-chevron]:text-muted [&_.folder-picker-control:hover:not(:disabled)_.folder-picker-chevron]:text-subtext [&_.folder-picker-hint]:text-subtext [&_.folder-picker-hint]:text-sm [&_.folder-picker-hint]:font-normal [&_.folder-picker-hint]:leading-[1.4] [&_.project-location-field]:flex [&_.project-location-field]:flex-col [&_.project-location-field]:gap-2 [&_.project-location-label]:text-text [&_.project-location-label]:text-base [&_.project-location-label]:font-medium [&_.project-field-label]:text-text [&_.project-field-label]:text-base [&_.project-field-label]:font-medium [&_.folder-picker-control:disabled]:cursor-default [&_.folder-picker-control:disabled]:opacity-65 [&_.paper-destination]:flex [&_.paper-destination]:items-center [&_.paper-destination]:gap-2.5 [&_.paper-destination]:pt-2 [&_.paper-destination]:pe-2 [&_.paper-destination]:pb-2 [&_.paper-destination]:ps-3 [&_.paper-destination]:border [&_.paper-destination]:border-border [&_.paper-destination]:rounded-md [&_.paper-destination]:bg-background [&_.paper-destination_code]:flex-1 [&_.paper-destination_code]:min-w-0 [&_.paper-destination_code]:overflow-hidden [&_.paper-destination_code]:text-text [&_.paper-destination_code]:text-sm [&_.paper-destination_code]:font-normal [&_.paper-destination_code]:text-ellipsis [&_.paper-destination_code]:whitespace-nowrap [&_.paper-destination_.btn]:flex-none [&_.project-path-notice]:py-[9px] [&_.project-path-notice]:px-[11px] [&_.project-path-notice]:border [&_.project-path-notice]:border-border-variant [&_.project-path-notice]:rounded-sm [&_.project-path-notice]:bg-surface [&_.project-path-notice]:text-subtext [&_.project-path-notice]:text-sm [&_.project-path-notice]:leading-[1.4] [&_.project-path-notice.error]:border-danger-notice-border [&_.paper-results]:flex [&_.paper-results]:flex-col [&_.paper-results]:border [&_.paper-results]:border-border [&_.paper-results]:rounded-md [&_.paper-results]:max-h-60 [&_.paper-results]:overflow-y-auto [&_.paper-results_button]:flex [&_.paper-results_button]:flex-col [&_.paper-results_button]:items-start [&_.paper-results_button]:gap-0.5 [&_.paper-results_button]:py-2 [&_.paper-results_button]:px-2.5 [&_.paper-results_button]:bg-none [&_.paper-results_button]:bg-transparent [&_.paper-results_button]:border-0 [&_.paper-results_button]:border-b [&_.paper-results_button]:border-b-border-variant [&_.paper-results_button]:text-start [&_.paper-results_button]:[font:inherit] [&_.paper-results_button]:text-text [&_.paper-results_button]:cursor-pointer [&_.paper-results_button:last-child]:border-b-0 [&_.paper-results_button:hover]:bg-surface [&_.paper-results_.title]:text-sm [&_.paper-results_.title]:font-medium [&_.paper-results_.id]:text-xs [&_.paper-results_.id]:text-muted [&_.paper-pick_.id]:text-xs [&_.paper-pick_.id]:text-muted [&_.paper-pick]:flex [&_.paper-pick]:items-center [&_.paper-pick]:justify-between [&_.paper-pick]:gap-2.5 [&_.paper-pick]:py-2.5 [&_.paper-pick]:px-3 [&_.paper-pick]:border [&_.paper-pick]:border-border [&_.paper-pick]:rounded-md [&_.paper-pick]:bg-surface [&_.paper-pick_.meta]:min-w-0 [&_.paper-pick_.title]:text-sm [&_.paper-pick_.title]:font-medium flex flex-col [&_label]:flex [&_label]:flex-col [&_label]:gap-1 [&_label]:text-sm [&_label]:text-text [&_label]:font-medium [&_.row2]:grid [&_.row2]:grid-cols-2 [&_.row2]:gap-2.5 [&_.actions]:flex [&_.actions]:justify-end [&_.actions]:gap-2.5 [&_.actions]:mt-1.5 [&_.new-project-actions]:justify-start [&_.new-project-actions]:mt-2.5 [&_.error]:text-accent-red [&_.error]:text-sm [&_.error]:whitespace-pre-wrap new-project-form gap-4.5 [&_>_label]:gap-2",onSubmit:nt,children:[f.jsxs("div",{className:"seg inline-flex items-center gap-0.5 p-[3px] rounded-md bg-hover-subtle [&_button]:py-[3px] [&_button]:px-3 [&_button]:text-sm [&_button]:font-medium [&_button]:text-text [&_button]:rounded-sm [&_button:not(:disabled):hover]:text-text [&_button.active]:bg-background [&_button.active]:shadow-segment [&_button:disabled]:text-muted [&_button:disabled]:cursor-default form-seg",children:[f.jsx("button",{type:"button",className:r==="blank"?"active":"","aria-pressed":r==="blank",onClick:()=>qe("blank"),children:Zet()}),f.jsx("span",{"aria-hidden":!0,className:`h-6 w-px bg-border${r==="paper"?"":" invisible"}`}),f.jsx("button",{type:"button",className:r==="folder"?"active":"","aria-pressed":r==="folder",onClick:()=>qe("folder"),children:Btt()}),f.jsx("span",{"aria-hidden":!0,className:`h-6 w-px bg-border${r==="blank"?"":" invisible"}`}),f.jsx("button",{type:"button",className:r==="paper"?"active":"","aria-pressed":r==="paper",onClick:()=>qe("paper"),children:Jtt()})]}),r==="paper"&&!M&&f.jsxs("label",{className:"!font-normal",children:[Pnt(),f.jsx("input",{className:"text-sm font-normal","data-initial-focus":!0,value:A,onChange:yt=>{w(null),j(yt.target.value)},placeholder:irt()}),!fn&&f.jsx("span",{className:"repo-hint",children:we?Mst():bst()}),fn&&f.jsx("span",{className:"project-path-notice block",children:bnt()}),jt.length>0&&f.jsx("div",{className:"paper-results",children:jt.map(yt=>f.jsxs("button",{type:"button",onClick:()=>void ye(yt.paperId),children:[f.jsx(k0,{children:yt.title}),f.jsx("span",{className:"id",children:yt.paperId})]},yt.paperId))})]}),M&&r==="paper"&&f.jsxs("div",{className:"paper-pick !flex-col !items-stretch",children:[f.jsxs("div",{className:"flex items-start justify-between gap-2.5",children:[f.jsxs("div",{className:"meta",children:[f.jsx(k0,{className:"block",children:M.title||M.paperId}),M.repoUrl&&f.jsx("div",{className:"id",children:Yxn(M.repoUrl)})]}),f.jsx(Me,{size:"small",type:"button","aria-label":btt(),onClick:je,children:ftt()})]}),!M.repoUrl&&f.jsxs("div",{className:"flex w-full flex-col items-start gap-1 rounded-md border border-border-variant bg-background px-[9px] py-1 text-sm font-normal text-subtext",children:[f.jsxs("span",{className:"flex items-center gap-[5px] text-sm",children:[f.jsx(Zk,{size:16})," ",Ent()]}),f.jsx("span",{className:"text-sm font-normal text-accent-amber",children:Mnt()})]})]}),(r!=="paper"||M)&&f.jsxs(f.Fragment,{children:[r==="blank"&&f.jsxs("label",{className:"!font-normal",children:[f.jsx("span",{className:"project-field-label !font-medium",children:PN()}),f.jsx("input",{className:"text-sm font-normal","data-initial-focus":!0,value:i,onChange:yt=>{l(!0),a(yt.target.value)},placeholder:BN()})]}),r==="paper"?f.jsxs("label",{className:"project-location-field",children:[f.jsx("span",{className:"project-location-label !font-medium",children:M!=null&&M.repoUrl?fet():G2()}),f.jsx("input",{className:"text-sm font-normal",value:$,onChange:yt=>{p(!0),h(yt.target.value)},"aria-describedby":Yn?"paper-destination-description":void 0,placeholder:"~/OpenResearch/paper-title",spellCheck:!1}),ee&&f.jsx("span",{className:"sr-only",role:"status","aria-live":"polite",children:$N()}),Yn&&f.jsx("span",{id:"paper-destination-description",className:"folder-picker-hint error !text-accent-red",role:"alert",children:zr})]}):r==="folder"&&!t?f.jsxs("button",{"data-initial-focus":!0,type:"button",className:"folder-picker-control","aria-label":u?GJe({path:Ne(u)}):DN(),disabled:m,title:u||void 0,onClick:()=>void at(),children:[f.jsx(q_,{className:u?"folder-picker-icon":"folder-picker-icon placeholder",size:16}),f.jsx("span",{className:u?"text-sm":"placeholder",children:m?set():u||DN()}),f.jsx(Da,{className:"folder-picker-chevron",size:15})]}):r==="folder"?f.jsxs("label",{className:"project-location-field",children:[f.jsx("span",{className:"project-location-label !font-medium",children:G2()}),f.jsx("input",{"data-initial-focus":!0,className:"text-sm font-normal",value:u,onChange:yt=>{p(!0),h(yt.target.value)},placeholder:"/home/user/project",spellCheck:!1,dir:"ltr"})]}):i.trim()?f.jsxs("label",{className:"project-location-field",children:[f.jsx("span",{className:"project-location-label !font-medium",children:G2()}),f.jsx("input",{className:"text-sm font-normal",value:$,onChange:yt=>{p(!0),h(yt.target.value)},placeholder:"~/OpenResearch/my-research","aria-describedby":fr?"blank-destination-description":void 0,spellCheck:!1}),ee&&f.jsx("span",{className:"sr-only",role:"status","aria-live":"polite",children:$N()}),fr&&f.jsx("span",{id:"blank-destination-description",className:"folder-picker-hint error !text-accent-red",role:"alert",children:Yr})]}):null,r!=="blank"&&$&&f.jsxs("label",{className:"!font-normal",children:[f.jsx("span",{className:"project-field-label !font-medium",children:PN()}),f.jsx("input",{className:"text-sm font-normal",value:i,onChange:yt=>{l(!0),a(yt.target.value)},placeholder:BN()})]}),Yt&&f.jsx("div",{className:"project-path-notice error",children:ant()}),!Yt&&r==="folder"&&u.trim()&&!ee&&(G==null?void 0:G.exists)===!1&&f.jsx("div",{className:"project-path-notice error",children:brt()}),!Yt&&r==="folder"&&u.trim()&&!ee&&rn&&f.jsx("div",{className:"project-path-notice error",children:Mrt()}),!Yt&&r==="folder"&&!ee&&(G==null?void 0:G.gitState)==="detached"&&f.jsx("div",{className:"project-path-notice error",children:Ett()}),!Yt&&r==="folder"&&!ee&&(G==null?void 0:G.gitState)==="invalid"&&f.jsx("div",{className:"project-path-notice error",children:Ert()}),V&&f.jsx("div",{className:"project-path-notice error",role:"alert",children:V})]}),b&&f.jsx("div",{className:"error",role:"alert",children:b}),(r!=="paper"||M)&&$&&(r!=="blank"||i.trim())&&f.jsxs("div",{className:"flex w-full flex-col items-start gap-2",children:[f.jsxs("button",{type:"button",className:`inline-flex items-center gap-1 text-sm font-medium${E&&re===null?" text-accent-red":" text-text"}`,"aria-expanded":y,"aria-controls":"new-project-advanced-settings",onClick:()=>C(yt=>!yt),children:[E?re===null?SJe():AJe():jD(),f.jsx(Jo,{className:y?"rotate-180":"",size:16})]}),y&&f.jsxs("label",{id:"new-project-advanced-settings",className:"flex w-full flex-col items-stretch gap-[7px] font-normal",children:[f.jsxs("span",{className:"flex flex-row items-center gap-[9px]",children:[f.jsx("input",{className:"m-0",type:"checkbox",checked:E,onChange:yt=>N(yt.target.checked),disabled:k}),f.jsx("strong",{className:"text-base font-medium leading-[1.3] text-text",children:frt()})]}),f.jsxs("span",{className:"flex flex-col gap-[3px] font-sans text-sm font-normal leading-[1.4] text-subtext",children:[f.jsx("span",{children:jn?Prt({repository:Ne(cn)}):He?est({repository:Ne(cn)}):Krt({repository:Ne(cn)})}),f.jsx("span",{children:Vtt()}),re===null&&f.jsx("span",{children:Est({command:Ne("gh auth login")})})]})]})]}),f.jsxs("div",{className:"actions new-project-actions",children:[n&&f.jsx(Me,{type:"button",onClick:n,children:itt()}),f.jsx(Me,{variant:"primary",className:"ms-auto",disabled:!St,children:k?Met():r==="paper"?M!=null&&M.repoUrl?bet():LN():r==="folder"?Pst():LN()})]})]})}function KI({onClose:e,onCreated:n,remote:t=!1}){const r=T.useRef(null),s=T.useRef(e);return s.current=e,T.useEffect(()=>{const i=r.current;if(!i)return;const a=document.activeElement instanceof HTMLElement?document.activeElement:null,o=()=>[...i.querySelectorAll('button:not([disabled]), input:not([disabled]), select:not([disabled]), textarea:not([disabled]), a[href], [tabindex]:not([tabindex="-1"])')];(i.querySelector("[data-initial-focus]")??o()[0]??i).focus();const l=u=>{if(u.key==="Escape"){u.preventDefault(),u.stopPropagation(),s.current();return}if(u.key==="Enter"&&(u.metaKey||u.ctrlKey)&&!u.altKey&&u.shiftKey){u.preventDefault(),u.stopPropagation();return}if(u.key!=="Tab")return;const h=o();if(h.length===0){u.preventDefault(),i.focus();return}const _=h[0],p=h[h.length-1];u.shiftKey&&document.activeElement===_?(u.preventDefault(),p.focus()):!u.shiftKey&&document.activeElement===p&&(u.preventDefault(),_.focus())};return document.addEventListener("keydown",l,!0),()=>{document.removeEventListener("keydown",l,!0),a==null||a.focus()}},[]),f.jsx("div",{className:"modal-backdrop fixed inset-0 bg-modal-backdrop flex items-start justify-center p-5 [--new-project-modal-top:clamp(4rem,20vh,24rem)] pt-[var(--new-project-modal-top)] overflow-y-auto z-100",onClick:i=>{i.target===i.currentTarget&&e()},children:f.jsxs("div",{ref:r,className:"modal w-120 max-w-full max-h-[calc(100vh_-_var(--new-project-modal-top)_-_1.25rem)] overflow-y-auto bg-background border border-border rounded-xl shadow-modal p-6 [&_h2]:mt-0 [&_h2]:mx-0 [&_h2]:mb-3.5 [&_h2]:text-xl [&_h2]:font-medium",role:"dialog","aria-modal":"true","aria-labelledby":"new-project-dialog-title",tabIndex:-1,children:[f.jsx("h2",{id:"new-project-dialog-title",children:BD()}),f.jsx(Zxn,{onCancel:e,onCreated:n,remote:t})]})})}function Jxn({project:e,deleting:n,error:t,onClose:r,onConfirm:s}){const i=T.useRef(null),a=T.useRef(r),o=T.useRef(n);a.current=r,o.current=n,T.useEffect(()=>{const u=i.current;if(!u)return;const h=document.activeElement instanceof HTMLElement?document.activeElement:null,_=()=>[...u.querySelectorAll('button:not([disabled]), [tabindex]:not([tabindex="-1"])')];(_()[0]??u).focus();const p=m=>{if(m.key==="Escape"){m.preventDefault(),o.current||a.current();return}if(m.key!=="Tab")return;const x=_();if(x.length===0){m.preventDefault(),u.focus();return}const k=x[0],v=x[x.length-1];m.shiftKey&&document.activeElement===k?(m.preventDefault(),v.focus()):!m.shiftKey&&document.activeElement===v&&(m.preventDefault(),k.focus())};return document.addEventListener("keydown",p,!0),()=>{document.removeEventListener("keydown",p,!0),h==null||h.focus()}},[]);const l=!!(e.githubEnabled&&(e.githubUrl||e.githubOwner&&e.githubRepo));return f.jsx("div",{className:"modal-backdrop fixed inset-0 bg-modal-backdrop flex items-center justify-center p-5 overflow-y-auto z-100",onClick:u=>{!n&&u.target===u.currentTarget&&r()},children:f.jsxs("div",{ref:i,className:"modal w-110 max-w-full bg-background border border-border rounded-xl shadow-modal p-6",role:"dialog","aria-modal":"true","aria-labelledby":"delete-project-dialog-title","aria-describedby":"delete-project-dialog-description",tabIndex:-1,children:[f.jsx("h2",{id:"delete-project-dialog-title",className:"mt-0 mb-3 text-xl",children:tbt()}),f.jsxs("div",{id:"delete-project-dialog-description",className:"flex flex-col gap-2 text-sm leading-normal text-subtext",children:[f.jsx("p",{className:"m-0",children:xvt({name:qo(e.name)})}),f.jsx("p",{className:"m-0",children:l?zbt():Dbt()}),t&&f.jsx("p",{className:"m-0 text-accent-red",role:"alert",children:t})]}),f.jsxs("div",{className:"mt-5 flex justify-end gap-2",children:[f.jsx(Me,{disabled:n,onClick:r,children:Fvt()}),f.jsx(Me,{variant:"danger",disabled:n,onClick:s,children:n?pbt():lbt()})]})]})})}function aj(){return f.jsx("span",{className:"activity-pulse h-2 w-2 shrink-0 rounded-full bg-accent-teal animate-[or-pulse_1.2s_ease-in-out_infinite]"})}function e2n({projects:e,onOpen:n,onCreated:t,onDeleted:r,remote:s=!1}){const[i,a]=T.useState(!1),[o,l]=T.useState(null),[u,h]=T.useState(null),[_,p]=T.useState(null),m=ft(Wgn()),x=Object.fromEntries((m.data??[]).map(v=>[v.projectId,v]));async function k(v){l(v.id),h(null);try{await i0n(v.id),h(null),p(null),r(v.id)}catch(b){h(b instanceof Error?b.message:String(b))}finally{l(null)}}return f.jsxs("div",{className:"home flex-1 min-h-0 overflow-y-auto [scrollbar-gutter:stable_both-edges] bg-canvas",children:[f.jsxs("div",{className:"home-inner max-w-290 my-0 mx-auto pt-12 px-6 pb-16 [@media((max-width:_960px))]:pt-6 [@media((max-width:_960px))]:px-4",children:[f.jsxs("div",{className:"home-head flex items-center justify-between gap-3 mb-4.5 [&_h2]:m-0 [&_h2]:text-4xl [&_h2]:tracking-[-0.02em] [@media((max-width:_520px))]:items-start [@media((max-width:_520px))]:flex-col",children:[f.jsx("h2",{children:lyt()}),f.jsxs(Me,{onClick:()=>a(!0),children:[f.jsx(yh,{size:15})," ",BD()]})]}),f.jsx("div",{className:"home-list overflow-hidden rounded-lg border border-border bg-background",children:f.jsxs("div",{children:[f.jsxs("div",{className:"grid grid-cols-[minmax(0,1fr)_9rem_9rem_minmax(18rem,max-content)] items-center gap-3 border-b border-border bg-background py-2.5 ps-4 pe-2 text-xs font-medium tracking-[0.06em] text-text uppercase [@media((max-width:_960px))]:hidden",children:[f.jsx("span",{children:tyt()}),f.jsx("span",{children:XN()}),f.jsx("span",{children:YN()}),f.jsx("span",{children:ZN()})]}),e.length===0?f.jsx("div",{className:"py-8 px-4 text-sm text-muted",children:Wbt()}):[...e].sort((v,b)=>{var C,E;const w=((C=x[v.id])==null?void 0:C.lastMessageAt)??v.createdAt;return(((E=x[b.id])==null?void 0:E.lastMessageAt)??b.createdAt)-w||v.name.localeCompare(b.name)}).map(v=>{const b=x[v.id],w=v.githubEnabled?v.githubUrl??(v.githubOwner&&v.githubRepo?`https://github.com/${v.githubOwner}/${v.githubRepo}`:null):null,y=w?v.githubOwner&&v.githubRepo?`${v.githubOwner}/${v.githubRepo}`:w.replace(/^https?:\/\/github\.com\//,"").replace(/\.git$/,"").replace(/\/$/,""):vv(),C=b?b.activeAgents>0?ovt({count:Jt(b.activeAgents)}):xyt():"—",E=b?b.totalAgents===1?Oyt():hvt({count:Jt(b.totalAgents)}):"—",N=b?b.runningExperiments>0?Fyt({count:Jt(b.runningExperiments)}):b.totalExperiments===0?Bk():JN({count:Jt(b.totalExperiments)}):"—",A=b&&b.runningExperiments>0?JN({count:Jt(b.totalExperiments)}):null;return f.jsxs("div",{className:"group project-row relative grid cursor-pointer grid-cols-[minmax(0,1fr)_9rem_9rem_minmax(18rem,max-content)] items-center gap-3 border-b border-border-variant py-4 ps-4 pe-2 text-start transition-colors duration-120 ease-standard last:border-b-0 hover:bg-surface-bright focus-within:bg-surface-bright [@media((max-width:_960px))]:grid-cols-[minmax(0,0.8fr)_minmax(0,0.8fr)_minmax(0,1.4fr)] [@media((max-width:_960px))]:items-start [@media((max-width:_960px))]:gap-x-4 [@media((max-width:_960px))]:gap-y-3 [@media((max-width:_960px))]:py-4 [@media((max-width:_960px))]:px-4 [@media((max-width:_600px))]:grid-cols-2",children:[f.jsx("button",{className:"project-row-open absolute inset-0 z-0 cursor-pointer rounded-[inherit] focus-visible:outline focus-visible:outline-2 focus-visible:outline-text focus-visible:outline-offset-[-2px]","aria-label":SY({name:qo(v.name)}),onClick:()=>n(v.id)}),f.jsxs("div",{className:"relative z-1 flex min-w-0 flex-col gap-1 pointer-events-none [@media((max-width:_960px))]:col-span-3 [@media((max-width:_600px))]:col-span-2",children:[f.jsx("span",{dir:"auto",className:"project-row-title whitespace-normal break-words text-base font-semibold text-text pointer-events-none",children:v.name}),f.jsxs("span",{className:"relative z-2 flex items-center gap-1.5 text-xs text-muted [@media((max-width:_960px))]:flex-wrap",children:[f.jsxs("span",{children:[Wvt()," ",Vo(v.createdAt)]}),v.paperId&&f.jsx("span",{"aria-hidden":"true",children:"·"}),v.paperId&&f.jsxs("span",{children:[Ovt()," ",Ne(v.paperId)]}),f.jsx("button",{className:"project-row-secondary project-row-delete inline-flex h-5 w-5 shrink-0 items-center justify-center rounded-sm leading-0 text-muted opacity-0 pointer-events-none transition-opacity hover:bg-surface hover:text-accent-red group-hover:opacity-100 group-hover:pointer-events-auto group-focus-within:opacity-100 group-focus-within:pointer-events-auto focus:opacity-100 focus:pointer-events-auto focus-visible:outline focus-visible:outline-2 focus-visible:outline-text","aria-label":Q4({name:qo(v.name)}),disabled:o===v.id,onClick:j=>{j.stopPropagation(),h(null),p(v)},children:f.jsx(lf,{size:14})})]})]}),f.jsxs("div",{className:"relative z-1 flex min-w-0 flex-col gap-1 pointer-events-none",children:[f.jsx("span",{className:"hidden text-xs font-medium tracking-[0.06em] text-text uppercase [@media((max-width:_960px))]:block",children:XN()}),f.jsxs("span",{className:"inline-flex items-center gap-2 text-sm text-text",children:[b&&b.activeAgents>0&&f.jsx(aj,{}),C]}),f.jsx("span",{className:"text-xs text-muted",children:E})]}),f.jsxs("div",{className:"relative z-1 flex min-w-0 flex-col gap-1 pointer-events-none",children:[f.jsx("span",{className:"hidden text-xs font-medium tracking-[0.06em] text-text uppercase [@media((max-width:_960px))]:block",children:YN()}),f.jsxs("span",{className:"inline-flex items-center gap-2 text-sm text-text",children:[b&&b.runningExperiments>0&&f.jsx(aj,{}),N]}),A&&f.jsx("span",{className:"text-xs text-muted",children:A})]}),f.jsxs("div",{className:"relative z-1 min-w-0 pointer-events-none [@media((max-width:_600px))]:col-span-2",children:[f.jsx("span",{className:"hidden text-xs font-medium tracking-[0.06em] text-text uppercase [@media((max-width:_960px))]:mb-1 [@media((max-width:_960px))]:block",children:ZN()}),w?f.jsxs("a",{className:"project-row-secondary inline-flex max-w-full items-center gap-2 text-sm text-text no-underline pointer-events-auto hover:underline underline-offset-2",href:w,target:"_blank",rel:"noreferrer","aria-label":hv({name:qo(v.name)}),children:[f.jsx("span",{className:"inline-flex shrink-0",children:f.jsx(Rb,{size:14})}),f.jsx("span",{className:"overflow-hidden text-ellipsis whitespace-nowrap [@media((max-width:_960px))]:whitespace-normal [@media((max-width:_960px))]:break-all",children:Ne(y)})]}):f.jsx("span",{className:"text-sm text-text pointer-events-none",children:y})]})]},v.id)})]})})]}),i&&f.jsx(KI,{remote:s,onClose:()=>a(!1),onCreated:(v,b)=>{a(!1),t(v,b)}}),_&&f.jsx(Jxn,{project:_,deleting:o===_.id,error:u,onClose:()=>{h(null),p(null)},onConfirm:()=>void k(_)})]})}function WI(){const e=T.useSyncExternalStore(qgn,Nz,Nz);return f.jsxs(f.Fragment,{children:[f.jsx("span",{className:"sr-only",role:"status","aria-live":"polite",children:e?"":J4()}),!e&&f.jsxs("div",{className:"offline-banner flex items-center gap-2 shrink-0 py-1.5 px-3.5 text-sm text-text bg-accent-amber-subtle border-b border-b-accent-amber","aria-hidden":!0,children:[f.jsx(Zk,{size:13,className:"shrink-0 text-accent-amber"}),f.jsx("span",{dir:"auto",className:"min-w-0",children:J4()})]})]})}function t2n({onClose:e,onConfigureSsh:n}){var v,b,w;const t=hn({mutationFn:y=>imn(...y)}),r=ft(DL()),s=ft(xgn()),i=((v=r.data)==null?void 0:v.hosts)??null,a=s.data??[],[o,l]=T.useState(""),u=i?null:((b=r.error)==null?void 0:b.message)??((w=s.error)==null?void 0:w.message)??null,[h,_]=T.useState(null),p=T.useRef(null);kb(p,e);async function m(y){const C=window.open("/remote-launch","_blank");if(!C){Bn(m4t(),"error");return}_(y);try{const E=await t.mutateAsync([y,{theme:t1n(),locale:z()}]);C.location.replace(E.gatewayUrl),e()}catch(E){C.close(),Bn(E instanceof Error?E.message:String(E),"error")}finally{_(null)}}const x=i==null?void 0:i.filter(y=>y.host.toLocaleLowerCase().includes(o.trim().toLocaleLowerCase())),k=new Map(a.map(y=>[y.host,y]));return Oa.createPortal(f.jsx("div",{className:"fixed inset-0 z-200 flex items-center justify-center bg-modal-backdrop p-5",onClick:y=>{y.target===y.currentTarget&&e()},children:f.jsxs("div",{ref:p,className:"relative flex h-[min(42rem,calc(100vh-2.5rem))] w-160 max-w-full flex-col overflow-hidden rounded-xl border border-border bg-background shadow-modal",role:"dialog","aria-modal":"true","aria-labelledby":"remote-host-dialog-title",tabIndex:-1,children:[f.jsx(Ft,{className:"absolute end-3.5 top-3.5","aria-label":Wxt(),onClick:e,children:f.jsx(_r,{size:16})}),f.jsxs("div",{className:"shrink-0 px-6 pt-5 pb-4 pe-14",children:[f.jsx("h2",{id:"remote-host-dialog-title",className:"m-0 text-xl font-medium",children:n3()}),f.jsx("p",{className:"mt-2 mb-0 text-sm leading-normal text-subtext",children:t2t()}),f.jsx(Qr,{"data-initial-focus":!0,className:"mt-4",value:o,onChange:y=>l(y.target.value),placeholder:nz(),"aria-label":nz()})]}),f.jsx("div",{className:"min-h-0 flex-1 overflow-y-auto border-t border-border-variant p-2",children:u?f.jsx("p",{className:"m-3 text-sm text-accent-red",children:u}):i===null?f.jsxs("div",{className:"flex items-center gap-2 p-3 text-sm text-subtext",children:[f.jsx(Rt,{})," ",rL()]}):(x==null?void 0:x.length)===0?f.jsx("p",{className:"m-3 text-sm text-subtext",children:Hwt()}):x==null?void 0:x.map(y=>{const C=k.get(y.host);return f.jsxs(Me,{variant:"ghost",className:"w-full justify-start text-base font-normal",disabled:h===y.host,onClick:()=>void m(y.host),children:[f.jsx("span",{className:"min-w-0 flex-1 truncate text-start",children:y.host}),h===y.host?f.jsx(Rt,{}):C?f.jsx("span",{className:"text-sm text-subtext",children:n4t()}):null]},y.host)})}),f.jsx("div",{className:"shrink-0 border-t border-border-variant p-2",children:f.jsxs(Me,{variant:"ghost",className:"w-full justify-start text-base font-normal",onClick:n,children:[f.jsx(zI,{size:15}),dL()]})})]})}),document.body)}function Tv({size:e=16,className:n}){return f.jsxs("svg",{width:e,height:e,viewBox:"0 0 16 16",fill:"currentColor",className:n,"aria-hidden":"true",children:[f.jsx("path",{d:"M3.14573 5.14704C3.34064 4.95221 3.65776 4.95237 3.85277 5.14704L7.85277 9.14704L7.85374 9.14606C8.04873 9.34105 8.0487 9.65809 7.85374 9.8531L3.85374 13.8531C3.7558 13.951 3.62815 13.9995 3.50023 13.9996C3.37223 13.9996 3.24373 13.9501 3.14573 13.8531C2.95103 13.6581 2.95083 13.341 3.14573 13.1461L6.79222 9.50056L3.14573 5.85407C2.95104 5.65905 2.95084 5.34194 3.14573 5.14704Z"}),f.jsx("path",{d:"M12.1457 1.14704C12.3406 0.952206 12.6578 0.952371 12.8528 1.14704C13.0477 1.34202 13.0477 1.65907 12.8528 1.85407L9.20726 5.50056L12.8537 9.14704C13.0487 9.34202 13.0487 9.65907 12.8537 9.85407C12.7558 9.95101 12.6282 10.0005 12.5002 10.0006C12.3722 10.0006 12.2437 9.95207 12.1457 9.85407L8.14573 5.85407C7.95104 5.65905 7.95084 5.34194 8.14573 5.14704L12.1457 1.14704Z"})]})}const n2n="data:image/svg+xml,%3csvg%20width='512'%20height='512'%20viewBox='0%200%20512%20512'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3cpath%20d='M0%20179.2C0%20116.474%200%2085.1112%2012.2073%2061.1531C22.9451%2040.0789%2040.0789%2022.9451%2061.1531%2012.2073C85.1112%200%20116.474%200%20179.2%200H332.8C395.526%200%20426.889%200%20450.847%2012.2073C471.921%2022.9451%20489.055%2040.0789%20499.793%2061.1531C512%2085.1112%20512%20116.474%20512%20179.2V332.8C512%20395.526%20512%20426.889%20499.793%20450.847C489.055%20471.921%20471.921%20489.055%20450.847%20499.793C426.889%20512%20395.526%20512%20332.8%20512H179.2C116.474%20512%2085.1112%20512%2061.1531%20499.793C40.0789%20489.055%2022.9451%20471.921%2012.2073%20450.847C0%20426.889%200%20395.526%200%20332.8V179.2Z'%20fill='url(%23paint0_linear_496_292)'/%3e%3crect%20opacity='0.25'%20x='128'%20y='84'%20width='224'%20height='44'%20rx='22'%20fill='white'%20style='fill:white;fill-opacity:1;'/%3e%3crect%20x='64'%20y='84'%20width='224'%20height='44'%20rx='22'%20fill='white'%20style='fill:white;fill-opacity:1;'/%3e%3crect%20opacity='0.25'%20x='224'%20y='144'%20width='224'%20height='44'%20rx='22'%20fill='white'%20style='fill:white;fill-opacity:1;'/%3e%3crect%20x='160'%20y='144'%20width='224'%20height='44'%20rx='22'%20fill='white'%20style='fill:white;fill-opacity:1;'/%3e%3crect%20opacity='0.25'%20x='168'%20y='204'%20width='224'%20height='44'%20rx='22'%20fill='white'%20style='fill:white;fill-opacity:1;'/%3e%3crect%20x='104'%20y='204'%20width='224'%20height='44'%20rx='22'%20fill='white'%20style='fill:white;fill-opacity:1;'/%3e%3crect%20opacity='0.25'%20x='112'%20y='264'%20width='224'%20height='44'%20rx='22'%20fill='white'%20style='fill:white;fill-opacity:1;'/%3e%3crect%20x='48'%20y='264'%20width='224'%20height='44'%20rx='22'%20fill='white'%20style='fill:white;fill-opacity:1;'/%3e%3crect%20opacity='0.25'%20x='176'%20y='324'%20width='224'%20height='44'%20rx='22'%20fill='white'%20style='fill:white;fill-opacity:1;'/%3e%3crect%20x='112'%20y='324'%20width='224'%20height='44'%20rx='22'%20fill='white'%20style='fill:white;fill-opacity:1;'/%3e%3crect%20opacity='0.25'%20x='304'%20y='384'%20width='152'%20height='44'%20rx='22'%20fill='white'%20style='fill:white;fill-opacity:1;'/%3e%3crect%20x='240'%20y='384'%20width='152'%20height='44'%20rx='22'%20fill='white'%20style='fill:white;fill-opacity:1;'/%3e%3cdefs%3e%3clinearGradient%20id='paint0_linear_496_292'%20x1='-219.792'%20y1='229.426'%20x2='239.06'%20y2='702.601'%20gradientUnits='userSpaceOnUse'%3e%3cstop%20stop-color='%236E7EF3'%20style='stop-color:%236E7EF3;stop-color:color(display-p3%200.4303%200.4946%200.9515);stop-opacity:1;'/%3e%3cstop%20offset='1'%20stop-color='%234F13BE'%20style='stop-color:%234F13BE;stop-color:color(display-p3%200.3079%200.0763%200.7470);stop-opacity:1;'/%3e%3c/linearGradient%3e%3c/defs%3e%3c/svg%3e",r2n="/assets/ollama-logo-Bt9O-2K_.png",s2n="data:image/svg+xml,%3csvg%20xmlns='http://www.w3.org/2000/svg'%20width='160'%20height='160'%20viewBox='0%200%20160%20160'%3e%3cdefs%3e%3cfilter%20id='shadow'%20x='-10%25'%20y='-10%25'%20width='130%25'%20height='130%25'%3e%3cfeDropShadow%20dx='0'%20dy='2'%20stdDeviation='6'%20flood-color='%23000'%20flood-opacity='0.15'/%3e%3c/filter%3e%3clinearGradient%20id='bg'%20x1='0'%20y1='0'%20x2='0'%20y2='1'%3e%3cstop%20offset='0%25'%20stop-color='%23ffffff'/%3e%3cstop%20offset='100%25'%20stop-color='%23f0f0f0'/%3e%3c/linearGradient%3e%3c/defs%3e%3crect%20x='10'%20y='10'%20width='140'%20height='140'%20rx='32'%20fill='url(%23bg)'%20filter='url(%23shadow)'/%3e%3cg%20transform='translate(25,%2025)%20scale(0.0221)'%3e%3cg%20transform='translate(0,4970)%20scale(1,-1)'%20fill='%23000000'%20stroke='none'%3e%3cpath%20d='M2275%204349%20c-408%20-39%20-769%20-207%20-1056%20-492%20-196%20-194%20-333%20-428%20-418%20-715%20-47%20-158%20-67%20-281%20-101%20-617%20-66%20-662%20-116%20-944%20-245%20-1387%20-102%20-352%20-271%20-774%20-420%20-1051%20-19%20-35%20-35%20-70%20-35%20-76%200%20-8%2050%20-11%20163%20-11%20l164%200%2080%20168%20c168%20348%20303%20739%20408%201175%2073%20307%20109%20532%20155%20982%2052%20500%2072%20627%20122%20785%20162%20507%20570%20860%201096%20951%20155%2026%20389%2026%20544%200%20221%20-38%20440%20-129%20620%20-258%2045%20-32%20152%20-126%20237%20-209%2086%20-82%20178%20-165%20204%20-183%20106%20-72%20312%20-150%20495%20-186%20l32%20-7%20-86%20-54%20c-110%20-69%20-170%20-117%20-267%20-212%20-93%20-91%20-143%20-154%20-191%20-243%20-105%20-191%20-130%20-406%20-75%20-623%2029%20-115%2081%20-239%20217%20-516%20234%20-480%20343%20-769%20411%20-1091%2036%20-172%2048%20-252%2057%20-381%20l7%20-98%20158%200%20158%200%20-4%2028%20c-2%2015%20-6%2066%20-9%20113%20-14%20218%20-95%20560%20-201%20849%20-81%20220%20-165%20407%20-363%20810%20-120%20245%20-147%20320%20-161%20443%20-38%20338%20202%20621%20766%20906%20131%2065%20166%20126%20106%20183%20-33%2031%20-86%2047%20-288%2088%20-177%2036%20-274%2061%20-370%2097%20-140%2052%20-190%2088%20-377%20270%20-140%20137%20-202%20189%20-300%20254%20-378%20250%20-782%20351%20-1233%20308z%20M3050%203391%20c-57%20-11%20-122%20-53%20-154%20-99%20-41%20-57%20-49%20-158%20-18%20-218%2029%20-56%2066%20-92%20120%20-117%20153%20-69%20323%2037%20325%20203%201%20147%20-131%20259%20-273%20231z%20M1985%201391%20c-68%20-31%20-70%20-40%20-66%20-271%201%20-114%20-2%20-243%20-9%20-290%20-40%20-307%20-124%20-555%20-255%20-754%20-25%20-38%20-45%20-71%20-45%20-72%200%20-2%2079%20-4%20176%20-4%20l175%200%2054%20113%20c117%20247%20182%20512%20201%20812%207%20126%20-9%20319%20-32%20374%20-26%2063%20-86%20111%20-136%20111%20-13%200%20-41%20-9%20-63%20-19z'/%3e%3c/g%3e%3c/g%3e%3c/svg%3e",QI={id:"lmstudio",label:"LM Studio",icon:n2n,url:"http://127.0.0.1:1234/v1"},H1=[QI,{id:"omlx",label:"oMLX",icon:s2n,url:"http://127.0.0.1:8000/v1"},{id:"ollama",label:"Ollama",icon:r2n,url:"http://127.0.0.1:11434/v1"},{id:"openai-compatible",label:"Custom Endpoint",icon:null,url:"http://127.0.0.1:8000/v1"}];function XI({installed:e,onConnected:n,dialogOnly:t=!1,onClose:r}){var Y,te;const s=mh(),i=ft({...Tgn(),enabled:!t}),a=ft(yu()),o=(Y=a.data)==null?void 0:Y.find($=>$.id==="opencode"),[l,u]=T.useState(t),h=()=>{u(!1),r==null||r()},[_,p]=T.useState("lmstudio"),m=H1.find($=>$.id===_)??QI,[x,k]=T.useState({}),v=x[m.id]??{baseUrl:m.url,apiKey:"",models:[],model:null,contextWindow:"32768",error:null},{baseUrl:b,models:w,model:y,contextWindow:C,error:E}=v,N=m.id==="ollama"?"":v.apiKey,A=$=>{k(D=>({...D,[m.id]:{...D[m.id]??v,...$}}))},j=hn({mutationFn:cgn}),M=hn({mutationFn:async $=>{var G;const D=await ugn($);if(!((G=(await s.fetchQuery({...yu(),staleTime:0})).find(V=>V.id==="opencode"))!=null&&G.models.some(V=>V.id===D.model)))throw new Error(cQe());return D}}),L=hn({mutationFn:fgn}),I=Number(C),B=j.isPending||M.isPending,q=($={})=>A({models:[],model:null,error:null,...$}),U=async()=>{q();try{const $=await j.mutateAsync({baseUrl:b.trim(),apiKey:N});A({models:$.models,model:$.models[0]??null})}catch($){A({error:$ instanceof Error?$.message:String($)})}},W=async()=>{if(y){A({error:null});try{const $=await M.mutateAsync({name:m.label,baseUrl:b.trim(),apiKey:N,model:y,contextWindow:I});h(),n==null||n($.model)}catch($){A({error:$ instanceof Error?$.message:String($)})}}},H=async $=>{try{await L.mutateAsync($)}catch(D){Bn(D instanceof Error?D.message:String(D),"error")}};return f.jsxs(f.Fragment,{children:[!t&&f.jsxs("section",{className:"mt-4 space-y-3 border-t border-border pt-4","aria-label":AN(),children:[f.jsxs("div",{className:"flex flex-wrap items-center justify-between gap-3",children:[f.jsx("h3",{className:"text-base font-medium",children:AN()}),f.jsxs(Me,{disabled:B,onClick:()=>u(!0),"aria-haspopup":"dialog",children:[f.jsx(yh,{size:14}),SD()]})]}),i.error&&f.jsx("p",{className:"text-sm text-accent-red",role:"alert",children:i.error.message}),f.jsx("div",{className:"space-y-3",children:(te=i.data)==null?void 0:te.map($=>f.jsx(i2n,{connection:$,harnessReady:(o==null?void 0:o.agentReady)??!1,availableModels:(o==null?void 0:o.models.map(D=>D.id))??[],checking:a.isFetching,unknown:a.isError||!a.data,disabled:B||L.isPending,onRemove:()=>void H($.id)},$.id))})]}),l&&f.jsx(a2n,{busy:B,onClose:h,footer:f.jsxs(Me,{variant:"primary",disabled:B||!e||w.length>0&&(!y||!Number.isSafeInteger(I)||I<4096),onClick:()=>void(w.length>0?W():U()),children:[B&&f.jsx(Rt,{}),w.length>0?gXe():XWe()]}),children:f.jsxs("div",{className:"space-y-4",children:[!e&&f.jsxs("div",{className:"text-sm text-text",children:[f.jsx("p",{children:rXe()}),f.jsx(Zd,{href:"https://opencode.ai/docs/#install",target:"_blank",rel:"noreferrer",children:XQe()})]}),f.jsx(Ko,{choices:H1,value:_,title:TN(),header:TN(),variant:"field",floating:!0,dropDown:!0,disabled:B,renderLabel:$=>f.jsxs(f.Fragment,{children:[$.id==="openai-compatible"?Mk():$.label,$.id==="openai-compatible"&&f.jsx("span",{className:"ml-1 text-xs font-normal text-subtext",children:CD()})]}),renderIcon:$=>{var F;const D=(F=H1.find(G=>G.id===$.id))==null?void 0:F.icon;return D?f.jsx("img",{src:D,alt:"",width:14,height:14,className:`size-3.5 shrink-0 object-contain${$.id==="ollama"?" dark:invert":""}`}):f.jsx(wI,{size:14,className:"shrink-0"})},onSelect:p}),f.jsxs("label",{className:"block space-y-1 text-sm text-subtext",children:[f.jsx("span",{children:qWe()}),f.jsx(Qr,{value:b,disabled:B,onChange:$=>{q({baseUrl:$.target.value})}})]}),m.id!=="ollama"&&f.jsxs("details",{className:"text-sm text-text",children:[f.jsx("summary",{className:"cursor-pointer",children:KD()}),f.jsxs("label",{className:"block space-y-1 mt-3 text-sm text-subtext",children:[f.jsx("span",{children:m.id==="lmstudio"?LXe():uXe()}),f.jsx(Qr,{type:"password",autoComplete:"off",value:N,disabled:B,onChange:$=>q({apiKey:$.target.value})})]})]},m.id),w.length>0&&f.jsxs(f.Fragment,{children:[f.jsx(Ko,{choices:w.map($=>({id:$,label:$})),value:y,searchPlaceholder:zD(),title:Yp(),header:Yp(),variant:"field",floating:!0,dropDown:!0,disabled:B,onSelect:$=>{A({model:$})}}),f.jsxs("label",{className:"block space-y-1 text-sm text-subtext",children:[f.jsx("span",{children:kQe()}),f.jsx(Qr,{type:"number",min:4096,step:1024,value:C,disabled:B,onChange:$=>{A({contextWindow:$.target.value})}})]}),f.jsx("p",{className:"text-sm text-subtext",children:TQe()})]}),E&&f.jsx("p",{className:"text-sm text-accent-red",role:"alert",children:E})]})})]})}function i2n({connection:e,harnessReady:n,availableModels:t,checking:r,unknown:s,disabled:i,onRemove:a}){const o=hn({mutationFn:async()=>{try{await _gn(e.id)}finally{await Xd(!0)}}}),l=H1.find(x=>x.label===e.name||x.id==="openai-compatible"&&["OpenAI-compatible server","Custom endpoint"].includes(e.name)),u=Object.keys(e.models),h=u.length>0&&n&&u.every(x=>t.includes(`${e.id}/${x}`)),_=o.isPending||r,p=s,m=h;return f.jsxs("div",{className:"@container min-w-0 px-4 py-4",children:[f.jsxs("div",{className:"flex flex-col items-stretch gap-3 @sm:flex-row @sm:items-center @sm:justify-between",children:[f.jsxs("div",{className:"flex min-w-0 flex-1 items-start gap-3",children:[l!=null&&l.icon?f.jsx("img",{src:l.icon,alt:"",width:20,height:20,className:`mt-0.5 size-5 shrink-0 object-contain${l.id==="ollama"?" dark:invert":""}`}):f.jsx(wI,{size:20,className:"mt-0.5 shrink-0"}),f.jsxs("div",{className:"min-w-0 space-y-1",children:[f.jsx("div",{className:"text-base font-medium break-words",children:u.join(", ")}),f.jsxs("div",{className:"text-sm text-subtext break-all",children:[(l==null?void 0:l.id)==="openai-compatible"?Mk():(l==null?void 0:l.label)??e.name,(l==null?void 0:l.id)==="openai-compatible"&&f.jsx("span",{className:"ml-1 text-xs font-normal text-subtext",children:CD()})," · ",e.baseUrl]})]})]}),f.jsxs("div",{className:"flex shrink-0 flex-col items-end gap-1 self-end @sm:self-auto @lg:flex-row @lg:items-center @lg:gap-2",children:[f.jsx("span",{role:"status",children:f.jsx(Gt,{variant:_||p?"default":m?"success":"warning",children:_?sa():p?iL():m?mQe():so()})}),f.jsxs("div",{className:"flex items-center gap-1",children:[f.jsxs(Me,{variant:"ghost",disabled:i||o.isPending,onClick:()=>o.mutate(),children:[f.jsx(La,{size:14}),gv()]}),f.jsx(Ft,{"aria-label":qQe({name:e.name}),disabled:i||o.isPending,onClick:a,children:f.jsx(lf,{size:14})})]})]})]}),o.error&&!m&&f.jsx("p",{className:"mt-2 text-sm text-accent-red",role:"alert",children:o.error.message})]})}function a2n({busy:e,onClose:n,footer:t,children:r}){const s=T.useRef(null),i=()=>{e||n()};return kb(s,i,"input"),Oa.createPortal(f.jsx("div",{className:"fixed inset-0 z-200 flex items-center justify-center bg-modal-backdrop p-5",onClick:a=>{a.target===a.currentTarget&&i()},children:f.jsxs("div",{ref:s,role:"dialog","aria-modal":"true","aria-labelledby":"local-model-dialog-title",tabIndex:-1,className:"relative flex max-h-full w-140 max-w-full flex-col rounded-xl border border-border bg-background shadow-modal",children:[f.jsx("div",{className:"shrink-0 px-6 pt-5 pb-4 pe-14",children:f.jsx("h2",{id:"local-model-dialog-title",className:"m-0 text-xl font-medium",children:SD()})}),f.jsx(Ft,{className:"absolute end-3.5 top-3.5","aria-label":P_(),onClick:i,disabled:e,children:f.jsx(_r,{size:16})}),f.jsx("div",{className:"min-h-0 overflow-y-auto px-6 pb-2",children:r}),f.jsxs("div",{className:"flex shrink-0 justify-end gap-2 px-6 py-4",children:[f.jsx(Me,{onClick:i,disabled:e,children:P_()}),t]})]})}),document.body)}const YI=["model-group flex items-center justify-between gap-2","text-sm font-medium text-text pt-2.5 px-2 pb-1.5"].join(" "),oj=["model-more [&_code]:font-mono [&_code]:text-xs","[&_code]:bg-panel [&_code]:border [&_code]:border-border-variant","[&_code]:rounded-xs [&_code]:py-px [&_code]:px-[5px] [&_code]:whitespace-nowrap","pt-1 px-2 pb-2 text-sm text-muted"].join(" "),qp={"claude-code":"Claude Code",codex:"Codex",opencode:"OpenCode",cursor:"Cursor",antigravity:"Google Antigravity"};function o2n(e){var r,s;const n=e.find(i=>i.agentReady);if(!n)return null;const t=((r=n.models[0])==null?void 0:r.id)??null;return{harness:n.id,model:t,serviceTier:wv(n,t,null),permissionMode:((s=n.options)==null?void 0:s.defaultPermissionMode)??null,reasoningLevel:wb(n,t).defaultId}}function _o(e){const[n,t]=T.useState(!1),r=T.useRef(null);return T.useEffect(()=>{if(!n)return;const s=a=>{var o,l;a.target instanceof Node&&!((o=r.current)!=null&&o.contains(a.target))&&!((l=e==null?void 0:e.current)!=null&&l.contains(a.target))&&t(!1)},i=a=>{var o;a.key==="Escape"&&(a.preventDefault(),a.stopPropagation(),t(!1),(o=e==null?void 0:e.current)==null||o.focus())};return document.addEventListener("mousedown",s,!0),document.addEventListener("keydown",i,!0),()=>{document.removeEventListener("mousedown",s,!0),document.removeEventListener("keydown",i,!0)}},[n,e]),{open:n,setOpen:t,ref:r}}function l2n({value:e,onSelect:n,onOpenSettings:t,permissionChoices:r=[],defaultPermissionId:s,onSelectPermission:i,reasoningChoices:a=[],defaultReasoningId:o,onSelectReasoning:l,lockHarness:u=!1,className:h}){var X,oe,le,_e,pe,Ee,Ie;const{data:_=c2n}=ft(yu()),p=mh(),[m,x]=T.useState(!1),k=T.useRef(null),v=T.useRef(null),{open:b,setOpen:w,ref:y}=_o(k),[C,E]=T.useState(""),[N,A]=T.useState("root"),j=()=>{w(!1),A("root"),E("")};T.useEffect(()=>{var ze;b&&(N==="reasoning"||N==="speed"||N==="permissions")&&((ze=v.current)==null||ze.focus())},[b,N]);const M=T.useMemo(()=>{const ze=C.trim().toLowerCase();return(u&&e?_.filter(Oe=>Oe.id===e.harness):_).map(Oe=>{let Xe=Oe.models;return ze?Xe=Xe.filter(_t=>`${_t.id} ${I1(_t)}`.toLowerCase().includes(ze)):(Oe.id==="opencode"||Oe.id==="cursor"||Oe.id==="antigravity")&&(Xe=Xe.slice(0,5)),{harness:Oe,models:Xe,hidden:ze?0:Oe.models.length-Xe.length}})},[_,C,u,e]),L=(ze,He)=>{var Xe;const Oe=(e==null?void 0:e.harness)===ze.id;n({harness:ze.id,model:He,serviceTier:wv(ze,He,Oe?e==null?void 0:e.serviceTier:null),permissionMode:Oe?e.permissionMode:((Xe=ze.options)==null?void 0:Xe.defaultPermissionMode)??null,reasoningLevel:RL(ze,He,Oe?e.reasoningLevel:null)}),j()},I=(e==null?void 0:e.model)!=null?(X=_.find(ze=>ze.id===e.harness))==null?void 0:X.models.find(ze=>ze.id===e.model):void 0,B=e?e.model?I?I1(I):_3(e.model):RN():Yp(),q=(e==null?void 0:e.reasoningLevel)??o??((oe=a[0])==null?void 0:oe.id),U=(le=a.find(ze=>ze.id===q))==null?void 0:le.label,W=(e==null?void 0:e.permissionMode)??s??((_e=r[0])==null?void 0:_e.id),H=(pe=r.find(ze=>ze.id===W))==null?void 0:pe.label,Y=(e==null?void 0:e.harness)==="opencode"?_Je():KYe(),te=_.find(ze=>ze.id===(e==null?void 0:e.harness)),$=AL(te,e==null?void 0:e.model),D=wv(te,e==null?void 0:e.model,e==null?void 0:e.serviceTier),F=(Ee=$.find(ze=>ze.id===D))==null?void 0:Ee.label,G=ze=>{l==null||l(ze),j()},V=ze=>{i==null||i(ze),j()},ee=ze=>{e&&n({...e,serviceTier:ze}),j()},ce=(ze,He,Oe)=>f.jsxs("button",{type:"button",className:"model-root-row flex w-full items-center gap-2 rounded-sm px-2 py-1.5 text-start text-sm text-text hover:bg-surface","aria-haspopup":"menu",onClick:()=>A(Oe),children:[f.jsx("span",{className:"flex-1",children:ze}),He&&f.jsx("span",{className:"max-w-36 truncate text-sm text-muted",children:He}),f.jsx(Da,{size:14,className:"shrink-0 text-muted"})]}),ae=ze=>f.jsxs("div",{className:"flex shrink-0 items-center border-b border-border-variant px-1 py-1",children:[f.jsx(Ft,{ref:v,type:"button",size:"small",className:"model-submenu-header","aria-label":$D(),onClick:()=>{A("root"),E("")},children:f.jsx(hI,{size:15})}),f.jsx("span",{className:"min-w-0 flex-1 text-sm font-medium text-text",children:ze}),N==="models"&&f.jsx(Ft,{type:"button",size:"small","aria-label":i3(),onClick:()=>{j(),t()},children:f.jsx(sS,{size:15,"aria-hidden":"true"})})]}),re=(ze,He,Oe,Xe)=>f.jsx("div",{className:"model-menu-list overflow-y-auto p-1.5",children:ze.map(_t=>f.jsxs(nr,{onClick:()=>Xe(_t.id),children:[f.jsxs("span",{className:"flex min-w-0 flex-col items-start gap-0.5",children:[f.jsxs("span",{children:[_t.label,_t.id===Oe&&f.jsxs("span",{className:"font-normal text-muted",children:[" ",ND()]})]}),_t.description&&f.jsx("span",{className:"max-w-72 text-sm font-normal leading-snug text-muted",children:_t.description})]}),_t.id===He&&f.jsx(Ji,{size:13})]},_t.id))});return f.jsxs("div",{className:"model-picker relative inline-flex min-w-0","data-onboarding":"model-picker",ref:y,children:[f.jsxs("button",{ref:k,type:"button",className:vs("composer-pill inline-flex h-8 min-w-0 max-w-full items-center gap-[5px] rounded-md px-2 text-sm text-text whitespace-nowrap transition-[background,color] duration-150 ease-standard hover:bg-surface",h),title:TQ({label:`${B}${U?` · ${U}`:""}${F?` · ${F}`:""}`}),"aria-haspopup":"menu","aria-expanded":b,onClick:()=>{b?j():(A("root"),w(!0))},children:[D==="priority"?f.jsx(qyn,{size:14,fill:"currentColor","aria-hidden":"true"}):e!=null&&e.harness?f.jsx(w0,{harness:e.harness,size:14}):null,D==="priority"&&f.jsxs("span",{className:"sr-only",children:[eZe()," "]}),f.jsxs("span",{className:"model-picker-label min-w-0 overflow-hidden text-ellipsis whitespace-nowrap",children:[B,U&&f.jsx("span",{className:"model-picker-reasoning ms-1 text-muted",children:U})]}),f.jsx(Jo,{size:14,className:"shrink-0 text-muted"})]}),b&&f.jsxs("div",{className:"model-menu absolute bottom-[calc(100%_+_8px)] start-0 max-h-100 flex flex-col bg-background border border-border rounded-md shadow-dropdown z-50 overflow-hidden w-72 [&.align-right]:start-auto [&.align-right]:end-0 [&_input]:rounded-none [&_input]:border-0 [&_input]:border-b [&_input]:border-b-border-variant [&_input]:bg-none [&_input]:bg-transparent [&_input]:py-2 [&_input]:px-2.5 [&_input]:text-sm [&_input]:outline-none align-right",children:[N==="root"&&f.jsxs("div",{className:"model-root-menu p-1",children:[ce(Yp(),B,"models"),a.length>0&&ce(Y,U,"reasoning"),$.length>0&&ce(ON(),F,"speed"),r.length>0&&ce(MN(),H,"permissions")]}),N==="models"&&f.jsxs(f.Fragment,{children:[ae(Yp()),f.jsx("input",{autoFocus:!0,type:"text",placeholder:zD(),value:C,onChange:ze=>E(ze.target.value)}),f.jsxs("div",{className:"model-menu-list overflow-y-auto p-1.5",children:[M.map(({harness:ze,models:He,hidden:Oe})=>f.jsxs("div",{className:"[&_.model-item]:ps-6",children:[f.jsxs("div",{className:YI,children:[f.jsxs("span",{className:"inline-flex items-center gap-1.5",children:[f.jsx(w0,{harness:ze.id,size:14}),ze.name]}),!ze.agentReady&&f.jsxs("span",{className:"model-group-status inline-flex items-center gap-1 text-accent-amber font-normal",children:[f.jsx(Uz,{size:10})," ",so()]})]}),ze.agentReady?f.jsxs(f.Fragment,{children:[ze.models.length===0&&f.jsxs(nr,{onClick:()=>L(ze,null),children:[f.jsxs("span",{children:[RN(),f.jsx("span",{className:"model-id",children:ED()})]}),(e==null?void 0:e.harness)===ze.id&&(e==null?void 0:e.model)===null&&f.jsx(Ji,{size:13})]}),He.map(Xe=>f.jsxs(nr,{title:Xe.id,onClick:()=>L(ze,Xe.id),children:[f.jsx("span",{children:I1(Xe)}),(e==null?void 0:e.harness)===ze.id&&(e==null?void 0:e.model)===Xe.id&&f.jsx(Ji,{size:13})]},Xe.id)),C.trim().length>0&&!ze.models.some(Xe=>Xe.id===C.trim())&&f.jsx(nr,{onClick:()=>L(ze,C.trim()),children:f.jsx("span",{children:sJe({id:Ne(C.trim())})})})]}):f.jsx("div",{className:"model-more [&_code]:font-mono [&_code]:text-xs [&_code]:bg-panel [&_code]:border [&_code]:border-border-variant [&_code]:rounded-xs [&_code]:py-px [&_code]:px-[5px] [&_code]:whitespace-nowrap pt-1 px-2 pb-2 text-sm text-muted model-unavailable leading-normal border-b border-b-border-variant",children:ze.agentNote?eh(ze.agentNote):EZe()}),ze.id==="opencode"&&f.jsx(nr,{type:"button",className:"font-medium","aria-haspopup":"dialog",onClick:()=>{var Xe;j(),(Xe=k.current)==null||Xe.focus(),x(!0)},children:f.jsxs("span",{className:"inline-flex items-center gap-1.5",children:[pYe(),f.jsx(yh,{size:14,"aria-hidden":"true"})]})}),ze.agentReady&&Oe>0&&f.jsx("div",{className:oj,children:bZe({count:Jt(Oe)})})]},ze.id)),_.length===0&&f.jsx("div",{className:oj,children:PYe()})]}),u&&e&&_.length>1&&f.jsxs("div",{className:"model-locked-note py-[7px] px-3 text-sm text-muted border-t border-t-border-variant",children:[f.jsx(Uz,{size:11,className:"inline-block align-baseline me-1","aria-hidden":"true"}),BZe()]})]}),N==="reasoning"&&f.jsxs(f.Fragment,{children:[ae(Y),re(a,q,o,G)]}),N==="permissions"&&f.jsxs(f.Fragment,{children:[ae(MN()),re(r,W,s,V)]}),N==="speed"&&f.jsxs(f.Fragment,{children:[ae(ON()),re($,D??void 0,"default",ee)]})]}),m&&f.jsx(XI,{dialogOnly:!0,installed:((Ie=_.find(ze=>ze.id==="opencode"))==null?void 0:Ie.installed)??!1,onClose:()=>x(!1),onConnected:ze=>{var Oe;const He=(Oe=p.getQueryData(yu().queryKey))==null?void 0:Oe.find(Xe=>Xe.id==="opencode");He&&(!u||(e==null?void 0:e.harness)==="opencode")&&L(He,ze)}})]})}function Ko({choices:e,value:n,defaultId:t,header:r,align:s="left",dropDown:i=!1,disabled:a=!1,variant:o="pill",title:l,numbered:u=!1,searchPlaceholder:h,renderIcon:_,renderLabel:p,floating:m=!1,onSelect:x,className:k}){var W,H;const v=T.useRef(null),{open:b,setOpen:w,ref:y}=_o(v),C=T.useRef(null),[E,N]=T.useState("");if(T.useLayoutEffect(()=>{var D;const Y=C.current,te=y.current;if(!b||!m||!Y||!te)return;Y.matches(":popover-open")||(Y.showPopover(),(D=Y.querySelector("input"))==null||D.focus());const $=()=>{const F=te.getBoundingClientRect(),G=window.innerHeight-F.bottom-12,V=F.top-12,ee=Math.min(380,Y.scrollHeight),ce=i?G>=ee||G>=V:VV;Y.style.width=`${F.width}px`,Y.style.minWidth="0",Y.style.maxHeight=`${Math.max(0,Math.min(380,ce?G:V))}px`,Y.style.left=`${F.left}px`,Y.style.top=`${ce?F.bottom+4:F.top-Y.getBoundingClientRect().height-4}px`};return $(),window.addEventListener("resize",$),window.addEventListener("scroll",$,!0),()=>{window.removeEventListener("resize",$),window.removeEventListener("scroll",$,!0)}},[b,m,i,E,e.length,y]),e.length===0)return null;const A=n??t??((W=e[0])==null?void 0:W.id)??null,j=e.find(Y=>Y.id===A),M=e.find(Y=>Y.id===t),L=o==="bare"&&(M==null?void 0:M.id)===xv?M:void 0,B=(L?e.filter(Y=>Y.id!==L.id):e).filter(Y=>`${Y.label} ${Y.id}`.toLowerCase().includes(E.toLowerCase())),q=(j==null?void 0:j.label)??((H=e[0])==null?void 0:H.label)??"",U=Y=>{var te;x(Y),w(!1),(te=v.current)==null||te.focus()};return f.jsxs("div",{className:`option-picker relative inline-flex${o==="field"?" w-full":""}`,ref:y,children:[f.jsxs("button",{ref:v,type:"button",className:vs(o==="field"?"inline-flex h-9 w-full items-center justify-between gap-2 rounded-md border border-border bg-background px-3 text-sm font-normal text-text transition-colors duration-120 ease-standard hover:bg-surface disabled:opacity-45":`inline-flex h-8 items-center rounded-md transition-[background,color] duration-150 ease-standard hover:bg-surface ${o==="pill"?"composer-pill gap-[5px] px-2 text-sm text-text whitespace-nowrap":"composer-bare gap-[3px] px-1 text-sm text-text"}`,k),title:l,"aria-haspopup":"menu","aria-expanded":b,disabled:a,onClick:()=>{N(""),w(Y=>!Y)},children:[f.jsxs("span",{className:"inline-flex min-w-0 items-center gap-2",children:[j&&(_==null?void 0:_(j)),f.jsx("span",{className:"truncate",children:j?(p==null?void 0:p(j))??q:q})]}),f.jsx(Jo,{size:12})]}),b&&f.jsxs("div",{ref:C,popover:m?"manual":void 0,style:m?{position:"fixed",inset:"auto",margin:0}:void 0,className:`option-menu absolute bottom-[calc(100%_+_8px)] start-0 max-h-95 flex flex-col bg-background border border-border rounded-lg shadow-menu z-50 overflow-hidden min-w-47.5 p-1.5 [&.align-right]:start-auto [&.align-right]:end-0 [&.drop-down]:bottom-auto [&.drop-down]:top-[calc(100%_+_4px)] [&.session-menu]:start-auto [&.session-menu]:end-1.5 [&.session-menu]:top-[calc(100%_-_2px)] [&.session-menu]:min-w-35 ${e.some(Y=>Y.description)?"min-w-80":""} ${o==="field"?"min-w-full text-text":""} ${s==="right"?"align-right":""} ${i?"drop-down":""}`,children:[r&&f.jsx("div",{className:YI,children:r}),h&&f.jsx("input",{autoFocus:!0,"aria-label":h,placeholder:h,value:E,onChange:Y=>N(Y.target.value),className:"shrink-0 border-b border-border bg-background px-2 py-2 text-sm outline-none"}),f.jsxs("div",{className:"min-h-0 overflow-y-auto",children:[L&&f.jsxs(f.Fragment,{children:[f.jsxs(nr,{type:"button",onClick:()=>U(L.id),children:[f.jsxs("span",{className:"inline-flex items-center gap-2",children:[_==null?void 0:_(L),f.jsxs("span",{children:[(p==null?void 0:p(L))??L.label,f.jsx("span",{className:"option-default text-muted font-normal",children:ED()})]})]}),A===L.id&&f.jsx(Ji,{size:13})]}),f.jsx("div",{className:"option-sep h-px my-[5px] mx-1 bg-border-variant"})]}),B.map((Y,te)=>f.jsxs(nr,{type:"button",onClick:()=>U(Y.id),children:[f.jsxs("span",{className:"flex min-w-0 items-center gap-2",children:[_==null?void 0:_(Y),f.jsxs("span",{className:"flex min-w-0 flex-col items-start gap-0.5",children:[f.jsxs("span",{children:[(p==null?void 0:p(Y))??Y.label,!L&&Y.id===t&&f.jsxs("span",{className:"option-default text-muted font-normal",children:[" ",ND()]})]}),Y.description&&f.jsx("span",{className:"max-w-68 text-sm font-normal leading-snug text-muted",children:Y.description})]})]}),A===Y.id?f.jsx(Ji,{size:13}):u&&f.jsx("span",{className:"option-num text-muted text-xs tabular-nums",children:te+1})]},Y.id))]})]})]})}const c2n=[];function A3({runtime:e,corner:n=!1}){const[t,r]=T.useState(!1),[s,i]=T.useState(!1),[a,o]=T.useState(!1),[l,u]=T.useState(null),h=_o();async function _(){if(l){o(!0);try{await zL(l),u(null)}catch(p){u(null),Bn(p instanceof Error?p.message:String(p),"error")}finally{o(!1)}}}return f.jsxs(f.Fragment,{children:[f.jsxs("div",{className:n?"fixed bottom-0 start-0 z-50":"relative shrink-0 rounded-b-lg border-t border-border bg-background",ref:h.ref,children:[h.open&&f.jsxs("div",{className:"option-menu absolute bottom-[calc(100%_+_6px)] start-2 z-50 min-w-60 rounded-lg border border-border bg-background p-1.5 shadow-menu",children:[f.jsxs("div",{className:"border-b border-border-variant px-2 pt-1 pb-2",children:[f.jsx("div",{className:"text-sm font-medium text-text",children:Nxt({host:Ne(e.session.host),user:Ne(e.session.user??"")})}),f.jsxs("div",{className:"mt-0.5 text-xs text-subtext",children:["OpenResearch ",Ne(e.session.version??"…")]})]}),f.jsxs("div",{className:"flex items-center rounded-sm hover:bg-surface",children:[f.jsx(nr,{className:"hover:bg-transparent",disabled:t,onClick:async()=>{r(!0);try{await EL(),h.setOpen(!1)}catch(p){Bn(p instanceof Error?p.message:String(p),"error")}finally{r(!1)}},children:t?yxt():r3()}),f.jsx(Yk,{content:c4t(),className:"me-2 shrink-0 text-subtext",children:f.jsx(eS,{size:15})})]}),f.jsx(nr,{danger:!0,disabled:s,onClick:async()=>{i(!0);try{u(await NL()),h.setOpen(!1)}catch(p){Bn(p instanceof Error?p.message:String(p),"error")}finally{i(!1)}},children:FD()})]}),n?f.jsxs(Me,{variant:"default",className:"h-auto w-auto max-w-48 justify-start rounded-none border-accent-blue bg-accent-blue px-2.5 py-1.5 font-normal text-white [&:hover:not(:disabled)]:border-accent-blue [&:hover:not(:disabled)]:bg-accent-blue/90","aria-haspopup":"menu","aria-expanded":h.open,onClick:()=>h.setOpen(p=>!p),children:[f.jsx(Tv,{size:14,className:"shrink-0"}),f.jsx("span",{className:"min-w-0 truncate text-sm leading-tight",children:K2({host:Ne(e.session.host)})})]}):f.jsxs("div",{className:"flex items-center gap-1.5 py-2 ps-1 pe-2.5",children:[f.jsx(Ft,{size:"small","aria-label":K2({host:Ne(e.session.host)}),"aria-haspopup":"menu","aria-expanded":h.open,onClick:()=>h.setOpen(p=>!p),children:f.jsx(Tv,{size:14,className:"shrink-0"})}),f.jsxs("span",{className:"flex min-w-0 flex-col gap-1 text-start text-text",children:[f.jsx("span",{className:"-my-0.5 max-w-full self-start truncate rounded-sm bg-accent-blue px-1.5 py-0.5 text-sm leading-tight text-white",children:K2({host:Ne(e.session.host)})}),f.jsxs("span",{className:"truncate text-xs leading-tight text-subtext",children:["OpenResearch ",Ne(e.session.version??"…")]})]})]})]}),l&&f.jsx(uI,{host:e.session.host,preview:l,currentClientAttached:e.session.status==="connected",stopping:a,onClose:()=>{a||u(null)},onConfirm:()=>void _()})]})}const Av="code-source-text",ZI="code-source-wrap",JI="file-view-gutter text-right text-muted select-none";function e$(e){const n=String(e).length+2;return{ruleCh:n,codeCh:n+2}}const u2n={cjs:"javascript",console:"bash",cts:"typescript",fish:"bash",html:"markup",js:"javascript",jsx:"javascript",md:"markdown",mjs:"javascript",mts:"typescript",py:"python",rb:"ruby",sh:"bash",shell:"bash",svg:"markup",terminal:"bash",ts:"typescript",tsx:"typescript",xml:"markup",yml:"yaml",zsh:"bash"},_2n={containerfile:"docker",dockerfile:"docker",justfile:"makefile",makefile:"makefile"};function R3(e){const n=e.trim().toLowerCase();return u2n[n]??n}function mS(e){var s;if(!e)return null;const n=((s=e.split("/").pop())==null?void 0:s.toLowerCase())??"",t=_2n[n];if(t)return R3(t);const r=n.lastIndexOf(".");return r===-1||r===n.length-1?null:R3(n.slice(r+1))}el.displayName="clike";el.aliases=[];function el(e){e.languages.clike={comment:[{pattern:/(^|[^\\])\/\*[\s\S]*?(?:\*\/|$)/,lookbehind:!0,greedy:!0},{pattern:/(^|[^\\:])\/\/.*/,lookbehind:!0,greedy:!0}],string:{pattern:/(["'])(?:\\(?:\r\n|[\s\S])|(?!\1)[^\\\r\n])*\1/,greedy:!0},"class-name":{pattern:/(\b(?:class|extends|implements|instanceof|interface|new|trait)\s+|\bcatch\s+\()[\w.\\]+/i,lookbehind:!0,inside:{punctuation:/[.\\]/}},keyword:/\b(?:break|catch|continue|do|else|finally|for|function|if|in|instanceof|new|null|return|throw|try|while)\b/,boolean:/\b(?:false|true)\b/,function:/\b\w+(?=\()/,number:/\b0x[\da-f]+\b|(?:\b\d+(?:\.\d*)?|\B\.\d+)(?:e[+-]?\d+)?/i,operator:/[<>]=?|[!=]=?=?|--?|\+\+?|&&?|\|\|?|[?*/~^%]/,punctuation:/[{}[\];(),.:]/}}pm.displayName="c";pm.aliases=[];function pm(e){e.register(el),e.languages.c=e.languages.extend("clike",{comment:{pattern:/\/\/(?:[^\r\n\\]|\\(?:\r\n?|\n|(?![\r\n])))*|\/\*[\s\S]*?(?:\*\/|$)/,greedy:!0},string:{pattern:/"(?:\\(?:\r\n|[\s\S])|[^"\\\r\n])*"/,greedy:!0},"class-name":{pattern:/(\b(?:enum|struct)\s+(?:__attribute__\s*\(\([\s\S]*?\)\)\s*)?)\w+|\b[a-z]\w*_t\b/,lookbehind:!0},keyword:/\b(?:_Alignas|_Alignof|_Atomic|_Bool|_Complex|_Generic|_Imaginary|_Noreturn|_Static_assert|_Thread_local|__attribute__|asm|auto|break|case|char|const|continue|default|do|double|else|enum|extern|float|for|goto|if|inline|int|long|register|return|short|signed|sizeof|static|struct|switch|typedef|typeof|union|unsigned|void|volatile|while)\b/,function:/\b[a-z_]\w*(?=\s*\()/i,number:/(?:\b0x(?:[\da-f]+(?:\.[\da-f]*)?|\.[\da-f]+)(?:p[+-]?\d+)?|(?:\b\d+(?:\.\d*)?|\B\.\d+)(?:e[+-]?\d+)?)[ful]{0,4}/i,operator:/>>=?|<<=?|->|([-+&|:])\1|[?:~]|[-+*/%&|^!=<>]=?/}),e.languages.insertBefore("c","string",{char:{pattern:/'(?:\\(?:\r\n|[\s\S])|[^'\\\r\n]){0,32}'/,greedy:!0}}),e.languages.insertBefore("c","string",{macro:{pattern:/(^[\t ]*)#\s*[a-z](?:[^\r\n\\/]|\/(?!\*)|\/\*(?:[^*]|\*(?!\/))*\*\/|\\(?:\r\n|[\s\S]))*/im,lookbehind:!0,greedy:!0,alias:"property",inside:{string:[{pattern:/^(#\s*include\s*)<[^>]+>/,lookbehind:!0},e.languages.c.string],char:e.languages.c.char,comment:e.languages.c.comment,"macro-name":[{pattern:/(^#\s*define\s+)\w+\b(?!\()/i,lookbehind:!0},{pattern:/(^#\s*define\s+)\w+\b(?=\()/i,lookbehind:!0,alias:"function"}],directive:{pattern:/^(#\s*)[a-z]+/,lookbehind:!0,alias:"keyword"},"directive-hash":/^#/,punctuation:/##|\\(?=[\r\n])/,expression:{pattern:/\S[\s\S]*/,inside:e.languages.c}}}}),e.languages.insertBefore("c","function",{constant:/\b(?:EOF|NULL|SEEK_CUR|SEEK_END|SEEK_SET|__DATE__|__FILE__|__LINE__|__TIMESTAMP__|__TIME__|__func__|stderr|stdin|stdout)\b/}),delete e.languages.c.boolean}Mb.displayName="cpp";Mb.aliases=[];function Mb(e){e.register(pm),(function(n){var t=/\b(?:alignas|alignof|asm|auto|bool|break|case|catch|char|char16_t|char32_t|char8_t|class|co_await|co_return|co_yield|compl|concept|const|const_cast|consteval|constexpr|constinit|continue|decltype|default|delete|do|double|dynamic_cast|else|enum|explicit|export|extern|final|float|for|friend|goto|if|import|inline|int|int16_t|int32_t|int64_t|int8_t|long|module|mutable|namespace|new|noexcept|nullptr|operator|override|private|protected|public|register|reinterpret_cast|requires|return|short|signed|sizeof|static|static_assert|static_cast|struct|switch|template|this|thread_local|throw|try|typedef|typeid|typename|uint16_t|uint32_t|uint64_t|uint8_t|union|unsigned|using|virtual|void|volatile|wchar_t|while)\b/,r=/\b(?!)\w+(?:\s*\.\s*\w+)*\b/.source.replace(//g,function(){return t.source});n.languages.cpp=n.languages.extend("c",{"class-name":[{pattern:RegExp(/(\b(?:class|concept|enum|struct|typename)\s+)(?!)\w+/.source.replace(//g,function(){return t.source})),lookbehind:!0},/\b[A-Z]\w*(?=\s*::\s*\w+\s*\()/,/\b[A-Z_]\w*(?=\s*::\s*~\w+\s*\()/i,/\b\w+(?=\s*<(?:[^<>]|<(?:[^<>]|<[^<>]*>)*>)*>\s*::\s*\w+\s*\()/],keyword:t,number:{pattern:/(?:\b0b[01']+|\b0x(?:[\da-f']+(?:\.[\da-f']*)?|\.[\da-f']+)(?:p[+-]?[\d']+)?|(?:\b[\d']+(?:\.[\d']*)?|\B\.[\d']+)(?:e[+-]?[\d']+)?)[ful]{0,4}/i,greedy:!0},operator:/>>=?|<<=?|->|--|\+\+|&&|\|\||[?:~]|<=>|[-+*/%&|^!=<>]=?|\b(?:and|and_eq|bitand|bitor|not|not_eq|or|or_eq|xor|xor_eq)\b/,boolean:/\b(?:false|true)\b/}),n.languages.insertBefore("cpp","string",{module:{pattern:RegExp(/(\b(?:import|module)\s+)/.source+"(?:"+/"(?:\\(?:\r\n|[\s\S])|[^"\\\r\n])*"|<[^<>\r\n]*>/.source+"|"+/(?:\s*:\s*)?|:\s*/.source.replace(//g,function(){return r})+")"),lookbehind:!0,greedy:!0,inside:{string:/^[<"][\s\S]+/,operator:/:/,punctuation:/\./}},"raw-string":{pattern:/R"([^()\\ ]{0,16})\([\s\S]*?\)\1"/,alias:"string",greedy:!0}}),n.languages.insertBefore("cpp","keyword",{"generic-function":{pattern:/\b(?!operator\b)[a-z_]\w*\s*<(?:[^<>]|<[^<>]*>)*>(?=\s*\()/i,inside:{function:/^\w+/,generic:{pattern:/<[\s\S]+/,alias:"class-name",inside:n.languages.cpp}}}}),n.languages.insertBefore("cpp","operator",{"double-colon":{pattern:/::/,alias:"punctuation"}}),n.languages.insertBefore("cpp","class-name",{"base-clause":{pattern:/(\b(?:class|struct)\s+\w+\s*:\s*)[^;{}"'\s]+(?:\s+[^;{}"'\s]+)*(?=\s*[;{])/,lookbehind:!0,greedy:!0,inside:n.languages.extend("cpp",{})}}),n.languages.insertBefore("inside","double-colon",{"class-name":/\b[a-z_]\w*\b(?!\s*::)/i},n.languages.cpp["base-clause"])})(e)}gS.displayName="arduino";gS.aliases=["ino"];function gS(e){e.register(Mb),e.languages.arduino=e.languages.extend("cpp",{keyword:/\b(?:String|array|bool|boolean|break|byte|case|catch|continue|default|do|double|else|finally|for|function|goto|if|in|instanceof|int|integer|long|loop|new|null|return|setup|string|switch|throw|try|void|while|word)\b/,constant:/\b(?:ANALOG_MESSAGE|DEFAULT|DIGITAL_MESSAGE|EXTERNAL|FIRMATA_STRING|HIGH|INPUT|INPUT_PULLUP|INTERNAL|INTERNAL1V1|INTERNAL2V56|LED_BUILTIN|LOW|OUTPUT|REPORT_ANALOG|REPORT_DIGITAL|SET_PIN_MODE|SYSEX_START|SYSTEM_RESET)\b/,builtin:/\b(?:Audio|BSSID|Bridge|Client|Console|EEPROM|Esplora|EsploraTFT|Ethernet|EthernetClient|EthernetServer|EthernetUDP|File|FileIO|FileSystem|Firmata|GPRS|GSM|GSMBand|GSMClient|GSMModem|GSMPIN|GSMScanner|GSMServer|GSMVoiceCall|GSM_SMS|HttpClient|IPAddress|IRread|Keyboard|KeyboardController|LiquidCrystal|LiquidCrystal_I2C|Mailbox|Mouse|MouseController|PImage|Process|RSSI|RobotControl|RobotMotor|SD|SPI|SSID|Scheduler|Serial|Server|Servo|SoftwareSerial|Stepper|Stream|TFT|Task|USBHost|WiFi|WiFiClient|WiFiServer|WiFiUDP|Wire|YunClient|YunServer|abs|addParameter|analogRead|analogReadResolution|analogReference|analogWrite|analogWriteResolution|answerCall|attach|attachGPRS|attachInterrupt|attached|autoscroll|available|background|beep|begin|beginPacket|beginSD|beginSMS|beginSpeaker|beginTFT|beginTransmission|beginWrite|bit|bitClear|bitRead|bitSet|bitWrite|blink|blinkVersion|buffer|changePIN|checkPIN|checkPUK|checkReg|circle|cityNameRead|cityNameWrite|clear|clearScreen|click|close|compassRead|config|connect|connected|constrain|cos|countryNameRead|countryNameWrite|createChar|cursor|debugPrint|delay|delayMicroseconds|detach|detachInterrupt|digitalRead|digitalWrite|disconnect|display|displayLogos|drawBMP|drawCompass|encryptionType|end|endPacket|endSMS|endTransmission|endWrite|exists|exitValue|fill|find|findUntil|flush|gatewayIP|get|getAsynchronously|getBand|getButton|getCurrentCarrier|getIMEI|getKey|getModifiers|getOemKey|getPINUsed|getResult|getSignalStrength|getSocket|getVoiceCallStatus|getXChange|getYChange|hangCall|height|highByte|home|image|interrupts|isActionDone|isDirectory|isListening|isPIN|isPressed|isValid|keyPressed|keyReleased|keyboardRead|knobRead|leftToRight|line|lineFollowConfig|listen|listenOnLocalhost|loadImage|localIP|lowByte|macAddress|maintain|map|max|messageAvailable|micros|millis|min|mkdir|motorsStop|motorsWrite|mouseDragged|mouseMoved|mousePressed|mouseReleased|move|noAutoscroll|noBlink|noBuffer|noCursor|noDisplay|noFill|noInterrupts|noListenOnLocalhost|noStroke|noTone|onReceive|onRequest|open|openNextFile|overflow|parseCommand|parseFloat|parseInt|parsePacket|pauseMode|peek|pinMode|playFile|playMelody|point|pointTo|position|pow|prepare|press|print|printFirmwareVersion|printVersion|println|process|processInput|pulseIn|put|random|randomSeed|read|readAccelerometer|readBlue|readButton|readBytes|readBytesUntil|readGreen|readJoystickButton|readJoystickSwitch|readJoystickX|readJoystickY|readLightSensor|readMessage|readMicrophone|readNetworks|readRed|readSlider|readString|readStringUntil|readTemperature|ready|rect|release|releaseAll|remoteIP|remoteNumber|remotePort|remove|requestFrom|retrieveCallingNumber|rewindDirectory|rightToLeft|rmdir|robotNameRead|robotNameWrite|run|runAsynchronously|runShellCommand|runShellCommandAsynchronously|running|scanNetworks|scrollDisplayLeft|scrollDisplayRight|seek|sendAnalog|sendDigitalPortPair|sendDigitalPorts|sendString|sendSysex|serialEvent|setBand|setBitOrder|setClockDivider|setCursor|setDNS|setDataMode|setFirmwareVersion|setMode|setPINUsed|setSpeed|setTextSize|setTimeout|shiftIn|shiftOut|shutdown|sin|size|sqrt|startLoop|step|stop|stroke|subnetMask|switchPIN|tan|tempoWrite|text|tone|transfer|tuneWrite|turn|updateIR|userNameRead|userNameWrite|voiceCall|waitContinue|width|write|writeBlue|writeGreen|writeJSON|writeMessage|writeMicroseconds|writeRGB|writeRed|yield)\b/}),e.languages.ino=e.languages.arduino}vS.displayName="bash";vS.aliases=["sh","shell"];function vS(e){(function(n){var t="\\b(?:BASH|BASHOPTS|BASH_ALIASES|BASH_ARGC|BASH_ARGV|BASH_CMDS|BASH_COMPLETION_COMPAT_DIR|BASH_LINENO|BASH_REMATCH|BASH_SOURCE|BASH_VERSINFO|BASH_VERSION|COLORTERM|COLUMNS|COMP_WORDBREAKS|DBUS_SESSION_BUS_ADDRESS|DEFAULTS_PATH|DESKTOP_SESSION|DIRSTACK|DISPLAY|EUID|GDMSESSION|GDM_LANG|GNOME_KEYRING_CONTROL|GNOME_KEYRING_PID|GPG_AGENT_INFO|GROUPS|HISTCONTROL|HISTFILE|HISTFILESIZE|HISTSIZE|HOME|HOSTNAME|HOSTTYPE|IFS|INSTANCE|JOB|LANG|LANGUAGE|LC_ADDRESS|LC_ALL|LC_IDENTIFICATION|LC_MEASUREMENT|LC_MONETARY|LC_NAME|LC_NUMERIC|LC_PAPER|LC_TELEPHONE|LC_TIME|LESSCLOSE|LESSOPEN|LINES|LOGNAME|LS_COLORS|MACHTYPE|MAILCHECK|MANDATORY_PATH|NO_AT_BRIDGE|OLDPWD|OPTERR|OPTIND|ORBIT_SOCKETDIR|OSTYPE|PAPERSIZE|PATH|PIPESTATUS|PPID|PS1|PS2|PS3|PS4|PWD|RANDOM|REPLY|SECONDS|SELINUX_INIT|SESSION|SESSIONTYPE|SESSION_MANAGER|SHELL|SHELLOPTS|SHLVL|SSH_AUTH_SOCK|TERM|UID|UPSTART_EVENTS|UPSTART_INSTANCE|UPSTART_JOB|UPSTART_SESSION|USER|WINDOWID|XAUTHORITY|XDG_CONFIG_DIRS|XDG_CURRENT_DESKTOP|XDG_DATA_DIRS|XDG_GREETER_DATA_DIR|XDG_MENU_PREFIX|XDG_RUNTIME_DIR|XDG_SEAT|XDG_SEAT_PATH|XDG_SESSION_DESKTOP|XDG_SESSION_ID|XDG_SESSION_PATH|XDG_SESSION_TYPE|XDG_VTNR|XMODIFIERS)\\b",r={pattern:/(^(["']?)\w+\2)[ \t]+\S.*/,lookbehind:!0,alias:"punctuation",inside:null},s={bash:r,environment:{pattern:RegExp("\\$"+t),alias:"constant"},variable:[{pattern:/\$?\(\([\s\S]+?\)\)/,greedy:!0,inside:{variable:[{pattern:/(^\$\(\([\s\S]+)\)\)/,lookbehind:!0},/^\$\(\(/],number:/\b0x[\dA-Fa-f]+\b|(?:\b\d+(?:\.\d*)?|\B\.\d+)(?:[Ee]-?\d+)?/,operator:/--|\+\+|\*\*=?|<<=?|>>=?|&&|\|\||[=!+\-*/%<>^&|]=?|[?~:]/,punctuation:/\(\(?|\)\)?|,|;/}},{pattern:/\$\((?:\([^)]+\)|[^()])+\)|`[^`]+`/,greedy:!0,inside:{variable:/^\$\(|^`|\)$|`$/}},{pattern:/\$\{[^}]+\}/,greedy:!0,inside:{operator:/:[-=?+]?|[!\/]|##?|%%?|\^\^?|,,?/,punctuation:/[\[\]]/,environment:{pattern:RegExp("(\\{)"+t),lookbehind:!0,alias:"constant"}}},/\$(?:\w+|[#?*!@$])/],entity:/\\(?:[abceEfnrtv\\"]|O?[0-7]{1,3}|U[0-9a-fA-F]{8}|u[0-9a-fA-F]{4}|x[0-9a-fA-F]{1,2})/};n.languages.bash={shebang:{pattern:/^#!\s*\/.*/,alias:"important"},comment:{pattern:/(^|[^"{\\$])#.*/,lookbehind:!0},"function-name":[{pattern:/(\bfunction\s+)[\w-]+(?=(?:\s*\(?:\s*\))?\s*\{)/,lookbehind:!0,alias:"function"},{pattern:/\b[\w-]+(?=\s*\(\s*\)\s*\{)/,alias:"function"}],"for-or-select":{pattern:/(\b(?:for|select)\s+)\w+(?=\s+in\s)/,alias:"variable",lookbehind:!0},"assign-left":{pattern:/(^|[\s;|&]|[<>]\()\w+(?:\.\w+)*(?=\+?=)/,inside:{environment:{pattern:RegExp("(^|[\\s;|&]|[<>]\\()"+t),lookbehind:!0,alias:"constant"}},alias:"variable",lookbehind:!0},parameter:{pattern:/(^|\s)-{1,2}(?:\w+:[+-]?)?\w+(?:\.\w+)*(?=[=\s]|$)/,alias:"variable",lookbehind:!0},string:[{pattern:/((?:^|[^<])<<-?\s*)(\w+)\s[\s\S]*?(?:\r?\n|\r)\2/,lookbehind:!0,greedy:!0,inside:s},{pattern:/((?:^|[^<])<<-?\s*)(["'])(\w+)\2\s[\s\S]*?(?:\r?\n|\r)\3/,lookbehind:!0,greedy:!0,inside:{bash:r}},{pattern:/(^|[^\\](?:\\\\)*)"(?:\\[\s\S]|\$\([^)]+\)|\$(?!\()|`[^`]+`|[^"\\`$])*"/,lookbehind:!0,greedy:!0,inside:s},{pattern:/(^|[^$\\])'[^']*'/,lookbehind:!0,greedy:!0},{pattern:/\$'(?:[^'\\]|\\[\s\S])*'/,greedy:!0,inside:{entity:s.entity}}],environment:{pattern:RegExp("\\$?"+t),alias:"constant"},variable:s.variable,function:{pattern:/(^|[\s;|&]|[<>]\()(?:add|apropos|apt|apt-cache|apt-get|aptitude|aspell|automysqlbackup|awk|basename|bash|bc|bconsole|bg|bzip2|cal|cargo|cat|cfdisk|chgrp|chkconfig|chmod|chown|chroot|cksum|clear|cmp|column|comm|composer|cp|cron|crontab|csplit|curl|cut|date|dc|dd|ddrescue|debootstrap|df|diff|diff3|dig|dir|dircolors|dirname|dirs|dmesg|docker|docker-compose|du|egrep|eject|env|ethtool|expand|expect|expr|fdformat|fdisk|fg|fgrep|file|find|fmt|fold|format|free|fsck|ftp|fuser|gawk|git|gparted|grep|groupadd|groupdel|groupmod|groups|grub-mkconfig|gzip|halt|head|hg|history|host|hostname|htop|iconv|id|ifconfig|ifdown|ifup|import|install|ip|java|jobs|join|kill|killall|less|link|ln|locate|logname|logrotate|look|lpc|lpr|lprint|lprintd|lprintq|lprm|ls|lsof|lynx|make|man|mc|mdadm|mkconfig|mkdir|mke2fs|mkfifo|mkfs|mkisofs|mknod|mkswap|mmv|more|most|mount|mtools|mtr|mutt|mv|nano|nc|netstat|nice|nl|node|nohup|notify-send|npm|nslookup|op|open|parted|passwd|paste|pathchk|ping|pkill|pnpm|podman|podman-compose|popd|pr|printcap|printenv|ps|pushd|pv|quota|quotacheck|quotactl|ram|rar|rcp|reboot|remsync|rename|renice|rev|rm|rmdir|rpm|rsync|scp|screen|sdiff|sed|sendmail|seq|service|sftp|sh|shellcheck|shuf|shutdown|sleep|slocate|sort|split|ssh|stat|strace|su|sudo|sum|suspend|swapon|sync|sysctl|tac|tail|tar|tee|time|timeout|top|touch|tr|traceroute|tsort|tty|umount|uname|unexpand|uniq|units|unrar|unshar|unzip|update-grub|uptime|useradd|userdel|usermod|users|uudecode|uuencode|v|vcpkg|vdir|vi|vim|virsh|vmstat|wait|watch|wc|wget|whereis|which|who|whoami|write|xargs|xdg-open|yarn|yes|zenity|zip|zsh|zypper)(?=$|[)\s;|&])/,lookbehind:!0},keyword:{pattern:/(^|[\s;|&]|[<>]\()(?:case|do|done|elif|else|esac|fi|for|function|if|in|select|then|until|while)(?=$|[)\s;|&])/,lookbehind:!0},builtin:{pattern:/(^|[\s;|&]|[<>]\()(?:\.|:|alias|bind|break|builtin|caller|cd|command|continue|declare|echo|enable|eval|exec|exit|export|getopts|hash|help|let|local|logout|mapfile|printf|pwd|read|readarray|readonly|return|set|shift|shopt|source|test|times|trap|type|typeset|ulimit|umask|unalias|unset)(?=$|[)\s;|&])/,lookbehind:!0,alias:"class-name"},boolean:{pattern:/(^|[\s;|&]|[<>]\()(?:false|true)(?=$|[)\s;|&])/,lookbehind:!0},"file-descriptor":{pattern:/\B&\d\b/,alias:"important"},operator:{pattern:/\d?<>|>\||\+=|=[=~]?|!=?|<<[<-]?|[&\d]?>>|\d[<>]&?|[<>][&=]?|&[>&]?|\|[&|]?/,inside:{"file-descriptor":{pattern:/^\d/,alias:"important"}}},punctuation:/\$?\(\(?|\)\)?|\.\.|[{}[\];\\]/,number:{pattern:/(^|\s)(?:[1-9]\d*|0)(?:[.,]\d+)?\b/,lookbehind:!0}},r.inside=n.languages.bash;for(var i=["comment","function-name","for-or-select","assign-left","parameter","string","environment","function","keyword","builtin","boolean","file-descriptor","operator","punctuation","number"],a=s.variable[1].inside,o=0;o>/g,function(G,V){return"(?:"+F[+V]+")"})}function r(D,F,G){return RegExp(t(D,F),"")}function s(D,F){for(var G=0;G>/g,function(){return"(?:"+D+")"});return D.replace(/<>/g,"[^\\s\\S]")}var i={type:"bool byte char decimal double dynamic float int long object sbyte short string uint ulong ushort var void",typeDeclaration:"class enum interface record struct",contextual:"add alias and ascending async await by descending from(?=\\s*(?:\\w|$)) get global group into init(?=\\s*;) join let nameof not notnull on or orderby partial remove select set unmanaged value when where with(?=\\s*{)",other:"abstract as base break case catch checked const continue default delegate do else event explicit extern finally fixed for foreach goto if implicit in internal is lock namespace new null operator out override params private protected public readonly ref return sealed sizeof stackalloc static switch this throw try typeof unchecked unsafe using virtual volatile while yield"};function a(D){return"\\b(?:"+D.trim().replace(/ /g,"|")+")\\b"}var o=a(i.typeDeclaration),l=RegExp(a(i.type+" "+i.typeDeclaration+" "+i.contextual+" "+i.other)),u=a(i.typeDeclaration+" "+i.contextual+" "+i.other),h=a(i.type+" "+i.typeDeclaration+" "+i.other),_=s(/<(?:[^<>;=+\-*/%&|^]|<>)*>/.source,2),p=s(/\((?:[^()]|<>)*\)/.source,2),m=/@?\b[A-Za-z_]\w*\b/.source,x=t(/<<0>>(?:\s*<<1>>)?/.source,[m,_]),k=t(/(?!<<0>>)<<1>>(?:\s*\.\s*<<1>>)*/.source,[u,x]),v=/\[\s*(?:,\s*)*\]/.source,b=t(/<<0>>(?:\s*(?:\?\s*)?<<1>>)*(?:\s*\?)?/.source,[k,v]),w=t(/[^,()<>[\];=+\-*/%&|^]|<<0>>|<<1>>|<<2>>/.source,[_,p,v]),y=t(/\(<<0>>+(?:,<<0>>+)+\)/.source,[w]),C=t(/(?:<<0>>|<<1>>)(?:\s*(?:\?\s*)?<<2>>)*(?:\s*\?)?/.source,[y,k,v]),E={keyword:l,punctuation:/[<>()?,.:[\]]/},N=/'(?:[^\r\n'\\]|\\.|\\[Uux][\da-fA-F]{1,8})'/.source,A=/"(?:\\.|[^\\"\r\n])*"/.source,j=/@"(?:""|\\[\s\S]|[^\\"])*"(?!")/.source;n.languages.csharp=n.languages.extend("clike",{string:[{pattern:r(/(^|[^$\\])<<0>>/.source,[j]),lookbehind:!0,greedy:!0},{pattern:r(/(^|[^@$\\])<<0>>/.source,[A]),lookbehind:!0,greedy:!0}],"class-name":[{pattern:r(/(\busing\s+static\s+)<<0>>(?=\s*;)/.source,[k]),lookbehind:!0,inside:E},{pattern:r(/(\busing\s+<<0>>\s*=\s*)<<1>>(?=\s*;)/.source,[m,C]),lookbehind:!0,inside:E},{pattern:r(/(\busing\s+)<<0>>(?=\s*=)/.source,[m]),lookbehind:!0},{pattern:r(/(\b<<0>>\s+)<<1>>/.source,[o,x]),lookbehind:!0,inside:E},{pattern:r(/(\bcatch\s*\(\s*)<<0>>/.source,[k]),lookbehind:!0,inside:E},{pattern:r(/(\bwhere\s+)<<0>>/.source,[m]),lookbehind:!0},{pattern:r(/(\b(?:is(?:\s+not)?|as)\s+)<<0>>/.source,[b]),lookbehind:!0,inside:E},{pattern:r(/\b<<0>>(?=\s+(?!<<1>>|with\s*\{)<<2>>(?:\s*[=,;:{)\]]|\s+(?:in|when)\b))/.source,[C,h,m]),inside:E}],keyword:l,number:/(?:\b0(?:x[\da-f_]*[\da-f]|b[01_]*[01])|(?:\B\.\d+(?:_+\d+)*|\b\d+(?:_+\d+)*(?:\.\d+(?:_+\d+)*)?)(?:e[-+]?\d+(?:_+\d+)*)?)(?:[dflmu]|lu|ul)?\b/i,operator:/>>=?|<<=?|[-=]>|([-+&|])\1|~|\?\?=?|[-+*/%&|^!=<>]=?/,punctuation:/\?\.?|::|[{}[\];(),.:]/}),n.languages.insertBefore("csharp","number",{range:{pattern:/\.\./,alias:"operator"}}),n.languages.insertBefore("csharp","punctuation",{"named-parameter":{pattern:r(/([(,]\s*)<<0>>(?=\s*:)/.source,[m]),lookbehind:!0,alias:"punctuation"}}),n.languages.insertBefore("csharp","class-name",{namespace:{pattern:r(/(\b(?:namespace|using)\s+)<<0>>(?:\s*\.\s*<<0>>)*(?=\s*[;{])/.source,[m]),lookbehind:!0,inside:{punctuation:/\./}},"type-expression":{pattern:r(/(\b(?:default|sizeof|typeof)\s*\(\s*(?!\s))(?:[^()\s]|\s(?!\s)|<<0>>)*(?=\s*\))/.source,[p]),lookbehind:!0,alias:"class-name",inside:E},"return-type":{pattern:r(/<<0>>(?=\s+(?:<<1>>\s*(?:=>|[({]|\.\s*this\s*\[)|this\s*\[))/.source,[C,k]),inside:E,alias:"class-name"},"constructor-invocation":{pattern:r(/(\bnew\s+)<<0>>(?=\s*[[({])/.source,[C]),lookbehind:!0,inside:E,alias:"class-name"},"generic-method":{pattern:r(/<<0>>\s*<<1>>(?=\s*\()/.source,[m,_]),inside:{function:r(/^<<0>>/.source,[m]),generic:{pattern:RegExp(_),alias:"class-name",inside:E}}},"type-list":{pattern:r(/\b((?:<<0>>\s+<<1>>|record\s+<<1>>\s*<<5>>|where\s+<<2>>)\s*:\s*)(?:<<3>>|<<4>>|<<1>>\s*<<5>>|<<6>>)(?:\s*,\s*(?:<<3>>|<<4>>|<<6>>))*(?=\s*(?:where|[{;]|=>|$))/.source,[o,x,m,C,l.source,p,/\bnew\s*\(\s*\)/.source]),lookbehind:!0,inside:{"record-arguments":{pattern:r(/(^(?!new\s*\()<<0>>\s*)<<1>>/.source,[x,p]),lookbehind:!0,greedy:!0,inside:n.languages.csharp},keyword:l,"class-name":{pattern:RegExp(C),greedy:!0,inside:E},punctuation:/[,()]/}},preprocessor:{pattern:/(^[\t ]*)#.*/m,lookbehind:!0,alias:"property",inside:{directive:{pattern:/(#)\b(?:define|elif|else|endif|endregion|error|if|line|nullable|pragma|region|undef|warning)\b/,lookbehind:!0,alias:"keyword"}}}});var M=A+"|"+N,L=t(/\/(?![*/])|\/\/[^\r\n]*[\r\n]|\/\*(?:[^*]|\*(?!\/))*\*\/|<<0>>/.source,[M]),I=s(t(/[^"'/()]|<<0>>|\(<>*\)/.source,[L]),2),B=/\b(?:assembly|event|field|method|module|param|property|return|type)\b/.source,q=t(/<<0>>(?:\s*\(<<1>>*\))?/.source,[k,I]);n.languages.insertBefore("csharp","class-name",{attribute:{pattern:r(/((?:^|[^\s\w>)?])\s*\[\s*)(?:<<0>>\s*:\s*)?<<1>>(?:\s*,\s*<<1>>)*(?=\s*\])/.source,[B,q]),lookbehind:!0,greedy:!0,inside:{target:{pattern:r(/^<<0>>(?=\s*:)/.source,[B]),alias:"keyword"},"attribute-arguments":{pattern:r(/\(<<0>>*\)/.source,[I]),inside:n.languages.csharp},"class-name":{pattern:RegExp(k),inside:{punctuation:/\./}},punctuation:/[:,]/}}});var U=/:[^}\r\n]+/.source,W=s(t(/[^"'/()]|<<0>>|\(<>*\)/.source,[L]),2),H=t(/\{(?!\{)(?:(?![}:])<<0>>)*<<1>>?\}/.source,[W,U]),Y=s(t(/[^"'/()]|\/(?!\*)|\/\*(?:[^*]|\*(?!\/))*\*\/|<<0>>|\(<>*\)/.source,[M]),2),te=t(/\{(?!\{)(?:(?![}:])<<0>>)*<<1>>?\}/.source,[Y,U]);function $(D,F){return{interpolation:{pattern:r(/((?:^|[^{])(?:\{\{)*)<<0>>/.source,[D]),lookbehind:!0,inside:{"format-string":{pattern:r(/(^\{(?:(?![}:])<<0>>)*)<<1>>(?=\}$)/.source,[F,U]),lookbehind:!0,inside:{punctuation:/^:/}},punctuation:/^\{|\}$/,expression:{pattern:/[\s\S]+/,alias:"language-csharp",inside:n.languages.csharp}}},string:/[\s\S]+/}}n.languages.insertBefore("csharp","string",{"interpolation-string":[{pattern:r(/(^|[^\\])(?:\$@|@\$)"(?:""|\\[\s\S]|\{\{|<<0>>|[^\\{"])*"/.source,[H]),lookbehind:!0,greedy:!0,inside:$(H,W)},{pattern:r(/(^|[^@\\])\$"(?:\\.|\{\{|<<0>>|[^\\"{])*"/.source,[te]),lookbehind:!0,greedy:!0,inside:$(te,Y)}],char:{pattern:RegExp(N),greedy:!0}}),n.languages.dotnet=n.languages.cs=n.languages.csharp})(e)}mm.displayName="markup";mm.aliases=["atom","html","mathml","rss","ssml","svg","xml"];function mm(e){e.languages.markup={comment:{pattern://,greedy:!0},prolog:{pattern:/<\?[\s\S]+?\?>/,greedy:!0},doctype:{pattern:/"'[\]]|"[^"]*"|'[^']*')+(?:\[(?:[^<"'\]]|"[^"]*"|'[^']*'|<(?!!--)|)*\]\s*)?>/i,greedy:!0,inside:{"internal-subset":{pattern:/(^[^\[]*\[)[\s\S]+(?=\]>$)/,lookbehind:!0,greedy:!0,inside:null},string:{pattern:/"[^"]*"|'[^']*'/,greedy:!0},punctuation:/^$|[[\]]/,"doctype-tag":/^DOCTYPE/i,name:/[^\s<>'"]+/}},cdata:{pattern://i,greedy:!0},tag:{pattern:/<\/?(?!\d)[^\s>\/=$<%]+(?:\s(?:\s*[^\s>\/=]+(?:\s*=\s*(?:"[^"]*"|'[^']*'|[^\s'">=]+(?=[\s>]))|(?=[\s/>])))+)?\s*\/?>/,greedy:!0,inside:{tag:{pattern:/^<\/?[^\s>\/]+/,inside:{punctuation:/^<\/?/,namespace:/^[^\s>\/:]+:/}},"special-attr":[],"attr-value":{pattern:/=\s*(?:"[^"]*"|'[^']*'|[^\s'">=]+)/,inside:{punctuation:[{pattern:/^=/,alias:"attr-equals"},{pattern:/^(\s*)["']|["']$/,lookbehind:!0}]}},punctuation:/\/?>/,"attr-name":{pattern:/[^\s>\/]+/,inside:{namespace:/^[^\s>\/:]+:/}}}},entity:[{pattern:/&[\da-z]{1,8};/i,alias:"named-entity"},/&#x?[\da-f]{1,8};/i]},e.languages.markup.tag.inside["attr-value"].inside.entity=e.languages.markup.entity,e.languages.markup.doctype.inside["internal-subset"].inside=e.languages.markup,e.hooks.add("wrap",function(n){n.type==="entity"&&(n.attributes.title=n.content.value.replace(/&/,"&"))}),Object.defineProperty(e.languages.markup.tag,"addInlined",{value:function(t,r){var s={};s["language-"+r]={pattern:/(^$)/i,lookbehind:!0,inside:e.languages[r]},s.cdata=/^$/i;var i={"included-cdata":{pattern://i,inside:s}};i["language-"+r]={pattern:/[\s\S]+/,inside:e.languages[r]};var a={};a[t]={pattern:RegExp(/(<__[^>]*>)(?:))*\]\]>|(?!)/.source.replace(/__/g,function(){return t}),"i"),lookbehind:!0,greedy:!0,inside:i},e.languages.insertBefore("markup","cdata",a)}}),Object.defineProperty(e.languages.markup.tag,"addAttribute",{value:function(n,t){e.languages.markup.tag.inside["special-attr"].push({pattern:RegExp(/(^|["'\s])/.source+"(?:"+n+")"+/\s*=\s*(?:"[^"]*"|'[^']*'|[^\s'">=]+(?=[\s>]))/.source,"i"),lookbehind:!0,inside:{"attr-name":/^[^\s=]+/,"attr-value":{pattern:/=[\s\S]+/,inside:{value:{pattern:/(^=\s*(["']|(?!["'])))\S[\s\S]*(?=\2$)/,lookbehind:!0,alias:[t,"language-"+t],inside:e.languages[t]},punctuation:[{pattern:/^=/,alias:"attr-equals"},/"|'/]}}}})}}),e.languages.html=e.languages.markup,e.languages.mathml=e.languages.markup,e.languages.svg=e.languages.markup,e.languages.xml=e.languages.extend("markup",{}),e.languages.ssml=e.languages.xml,e.languages.atom=e.languages.xml,e.languages.rss=e.languages.xml}wh.displayName="css";wh.aliases=[];function wh(e){(function(n){var t=/(?:"(?:\\(?:\r\n|[\s\S])|[^"\\\r\n])*"|'(?:\\(?:\r\n|[\s\S])|[^'\\\r\n])*')/;n.languages.css={comment:/\/\*[\s\S]*?\*\//,atrule:{pattern:RegExp("@[\\w-](?:"+/[^;{\s"']|\s+(?!\s)/.source+"|"+t.source+")*?"+/(?:;|(?=\s*\{))/.source),inside:{rule:/^@[\w-]+/,"selector-function-argument":{pattern:/(\bselector\s*\(\s*(?![\s)]))(?:[^()\s]|\s+(?![\s)])|\((?:[^()]|\([^()]*\))*\))+(?=\s*\))/,lookbehind:!0,alias:"selector"},keyword:{pattern:/(^|[^\w-])(?:and|not|only|or)(?![\w-])/,lookbehind:!0}}},url:{pattern:RegExp("\\burl\\((?:"+t.source+"|"+/(?:[^\\\r\n()"']|\\[\s\S])*/.source+")\\)","i"),greedy:!0,inside:{function:/^url/i,punctuation:/^\(|\)$/,string:{pattern:RegExp("^"+t.source+"$"),alias:"url"}}},selector:{pattern:RegExp(`(^|[{}\\s])[^{}\\s](?:[^{};"'\\s]|\\s+(?![\\s{])|`+t.source+")*(?=\\s*\\{)"),lookbehind:!0},string:{pattern:t,greedy:!0},property:{pattern:/(^|[^-\w\xA0-\uFFFF])(?!\s)[-_a-z\xA0-\uFFFF](?:(?!\s)[-\w\xA0-\uFFFF])*(?=\s*:)/i,lookbehind:!0},important:/!important\b/i,function:{pattern:/(^|[^-a-z0-9])[-a-z0-9]+(?=\()/i,lookbehind:!0},punctuation:/[(){};:,]/},n.languages.css.atrule.inside.rest=n.languages.css;var r=n.languages.markup;r&&(r.tag.addInlined("style","css"),r.tag.addAttribute("style","css"))})(e)}yS.displayName="diff";yS.aliases=[];function yS(e){(function(n){n.languages.diff={coord:[/^(?:\*{3}|-{3}|\+{3}).*$/m,/^@@.*@@$/m,/^\d.*$/m]};var t={"deleted-sign":"-","deleted-arrow":"<","inserted-sign":"+","inserted-arrow":">",unchanged:" ",diff:"!"};Object.keys(t).forEach(function(r){var s=t[r],i=[];/^\w+$/.test(r)||i.push(/\w+/.exec(r)[0]),r==="diff"&&i.push("bold"),n.languages.diff[r]={pattern:RegExp("^(?:["+s+`].*(?:\r ?| -|(?![\\s\\S])))+`,"m"),alias:i,inside:{line:{pattern:/(.)(?=[\s\S]).*(?:\r\n?|\n)?/,lookbehind:!0},prefix:{pattern:/[\s\S]/,alias:/\w+/.exec(r)[0]}}}}),Object.defineProperty(n.languages.diff,"PREFIXES",{value:t})})(e)}xS.displayName="go";xS.aliases=[];function xS(e){e.register(Jo),e.languages.go=e.languages.extend("clike",{string:{pattern:/(^|[^\\])"(?:\\.|[^"\\\r\n])*"|`[^`]*`/,lookbehind:!0,greedy:!0},keyword:/\b(?:break|case|chan|const|continue|default|defer|else|fallthrough|for|func|go(?:to)?|if|import|interface|map|package|range|return|select|struct|switch|type|var)\b/,boolean:/\b(?:_|false|iota|nil|true)\b/,number:[/\b0(?:b[01_]+|o[0-7_]+)i?\b/i,/\b0x(?:[a-f\d_]+(?:\.[a-f\d_]*)?|\.[a-f\d_]+)(?:p[+-]?\d+(?:_\d+)*)?i?(?!\w)/i,/(?:\b\d[\d_]*(?:\.[\d_]*)?|\B\.\d[\d_]*)(?:e[+-]?[\d_]+)?i?(?!\w)/i],operator:/[*\/%^!=]=?|\+[=+]?|-[=-]?|\|[=|]?|&(?:=|&|\^=?)?|>(?:>=?|=)?|<(?:<=?|=|-)?|:=|\.\.\./,builtin:/\b(?:append|bool|byte|cap|close|complex|complex(?:64|128)|copy|delete|error|float(?:32|64)|u?int(?:8|16|32|64)?|imag|len|make|new|panic|print(?:ln)?|real|recover|rune|string|uintptr)\b/}),e.languages.insertBefore("go","string",{char:{pattern:/'(?:\\.|[^'\\\r\n]){0,10}'/,greedy:!0}}),delete e.languages.go["class-name"]}wS.displayName="ini";wS.aliases=[];function wS(e){e.languages.ini={comment:{pattern:/(^[ \f\t\v]*)[#;][^\n\r]*/m,lookbehind:!0},section:{pattern:/(^[ \f\t\v]*)\[[^\n\r\]]*\]?/m,lookbehind:!0,inside:{"section-name":{pattern:/(^\[[ \f\t\v]*)[^ \f\t\v\]]+(?:[ \f\t\v]+[^ \f\t\v\]]+)*/,lookbehind:!0,alias:"selector"},punctuation:/\[|\]/}},key:{pattern:/(^[ \f\t\v]*)[^ \f\n\r\t\v=]+(?:[ \f\t\v]+[^ \f\n\r\t\v=]+)*(?=[ \f\t\v]*=)/m,lookbehind:!0,alias:"attr-name"},value:{pattern:/(=[ \f\t\v]*)[^ \f\n\r\t\v]+(?:[ \f\t\v]+[^ \f\n\r\t\v]+)*/,lookbehind:!0,alias:"attr-value",inside:{"inner-value":{pattern:/^("|').+(?=\1$)/,lookbehind:!0}}},punctuation:/=/}}kS.displayName="java";kS.aliases=[];function kS(e){e.register(Jo),(function(n){var t=/\b(?:abstract|assert|boolean|break|byte|case|catch|char|class|const|continue|default|do|double|else|enum|exports|extends|final|finally|float|for|goto|if|implements|import|instanceof|int|interface|long|module|native|new|non-sealed|null|open|opens|package|permits|private|protected|provides|public|record(?!\s*[(){}[\]<>=%~.:,;?+\-*/&|^])|requires|return|sealed|short|static|strictfp|super|switch|synchronized|this|throw|throws|to|transient|transitive|try|uses|var|void|volatile|while|with|yield)\b/,r=/(?:[a-z]\w*\s*\.\s*)*(?:[A-Z]\w*\s*\.\s*)*/.source,s={pattern:RegExp(/(^|[^\w.])/.source+r+/[A-Z](?:[\d_A-Z]*[a-z]\w*)?\b/.source),lookbehind:!0,inside:{namespace:{pattern:/^[a-z]\w*(?:\s*\.\s*[a-z]\w*)*(?:\s*\.)?/,inside:{punctuation:/\./}},punctuation:/\./}};n.languages.java=n.languages.extend("clike",{string:{pattern:/(^|[^\\])"(?:\\.|[^"\\\r\n])*"/,lookbehind:!0,greedy:!0},"class-name":[s,{pattern:RegExp(/(^|[^\w.])/.source+r+/[A-Z]\w*(?=\s+\w+\s*[;,=()]|\s*(?:\[[\s,]*\]\s*)?::\s*new\b)/.source),lookbehind:!0,inside:s.inside},{pattern:RegExp(/(\b(?:class|enum|extends|implements|instanceof|interface|new|record|throws)\s+)/.source+r+/[A-Z]\w*\b/.source),lookbehind:!0,inside:s.inside}],keyword:t,function:[n.languages.clike.function,{pattern:/(::\s*)[a-z_]\w*/,lookbehind:!0}],number:/\b0b[01][01_]*L?\b|\b0x(?:\.[\da-f_p+-]+|[\da-f_]+(?:\.[\da-f_p+-]+)?)\b|(?:\b\d[\d_]*(?:\.[\d_]*)?|\B\.\d[\d_]*)(?:e[+-]?\d[\d_]*)?[dfl]?/i,operator:{pattern:/(^|[^.])(?:<<=?|>>>?=?|->|--|\+\+|&&|\|\||::|[?:~]|[-+*/%&|^!=<>]=?)/m,lookbehind:!0},constant:/\b[A-Z][A-Z_\d]+\b/}),n.languages.insertBefore("java","string",{"triple-quoted-string":{pattern:/"""[ \t]*[\r\n](?:(?:"|"")?(?:\\.|[^"\\]))*"""/,greedy:!0,alias:"string"},char:{pattern:/'(?:\\.|[^'\\\r\n]){1,6}'/,greedy:!0}}),n.languages.insertBefore("java","class-name",{annotation:{pattern:/(^|[^.])@\w+(?:\s*\.\s*\w+)*/,lookbehind:!0,alias:"punctuation"},generics:{pattern:/<(?:[\w\s,.?]|&(?!&)|<(?:[\w\s,.?]|&(?!&)|<(?:[\w\s,.?]|&(?!&)|<(?:[\w\s,.?]|&(?!&))*>)*>)*>)*>/,inside:{"class-name":s,keyword:t,punctuation:/[<>(),.:]/,operator:/[?&|]/}},import:[{pattern:RegExp(/(\bimport\s+)/.source+r+/(?:[A-Z]\w*|\*)(?=\s*;)/.source),lookbehind:!0,inside:{namespace:s.inside.namespace,punctuation:/\./,operator:/\*/,"class-name":/\w+/}},{pattern:RegExp(/(\bimport\s+static\s+)/.source+r+/(?:\w+|\*)(?=\s*;)/.source),lookbehind:!0,alias:"static",inside:{namespace:s.inside.namespace,static:/\b\w+$/,punctuation:/\./,operator:/\*/,"class-name":/\w+/}}],namespace:{pattern:RegExp(/(\b(?:exports|import(?:\s+static)?|module|open|opens|package|provides|requires|to|transitive|uses|with)\s+)(?!)[a-z]\w*(?:\.[a-z]\w*)*\.?/.source.replace(//g,function(){return t.source})),lookbehind:!0,inside:{punctuation:/\./}}})})(e)}SS.displayName="regex";SS.aliases=[];function SS(e){(function(n){var t={pattern:/\\[\\(){}[\]^$+*?|.]/,alias:"escape"},r=/\\(?:x[\da-fA-F]{2}|u[\da-fA-F]{4}|u\{[\da-fA-F]+\}|0[0-7]{0,2}|[123][0-7]{2}|c[a-zA-Z]|.)/,s={pattern:/\.|\\[wsd]|\\p\{[^{}]+\}/i,alias:"class-name"},i={pattern:/\\[wsd]|\\p\{[^{}]+\}/i,alias:"class-name"},a="(?:[^\\\\-]|"+r.source+")",o=RegExp(a+"-"+a),l={pattern:/(<|')[^<>']+(?=[>']$)/,lookbehind:!0,alias:"variable"};n.languages.regex={"char-class":{pattern:/((?:^|[^\\])(?:\\\\)*)\[(?:[^\\\]]|\\[\s\S])*\]/,lookbehind:!0,inside:{"char-class-negation":{pattern:/(^\[)\^/,lookbehind:!0,alias:"operator"},"char-class-punctuation":{pattern:/^\[|\]$/,alias:"punctuation"},range:{pattern:o,inside:{escape:r,"range-punctuation":{pattern:/-/,alias:"operator"}}},"special-escape":t,"char-set":i,escape:r}},"special-escape":t,"char-set":s,backreference:[{pattern:/\\(?![123][0-7]{2})[1-9]/,alias:"keyword"},{pattern:/\\k<[^<>']+>/,alias:"keyword",inside:{"group-name":l}}],anchor:{pattern:/[$^]|\\[ABbGZz]/,alias:"function"},escape:r,group:[{pattern:/\((?:\?(?:<[^<>']+>|'[^<>']+'|[>:]||&&=?|\|\|=?|[!=]==|<<=?|>>>?=?|[-+*/%&|^!=<>]=?|\.{3}|\?\?=?|\?\.?|[~:]/}),e.languages.javascript["class-name"][0].pattern=/(\b(?:class|extends|implements|instanceof|interface|new)\s+)[\w.\\]+/,e.languages.insertBefore("javascript","keyword",{regex:{pattern:RegExp(/((?:^|[^$\w\xA0-\uFFFF."'\])\s]|\b(?:return|yield))\s*)/.source+/\//.source+"(?:"+/(?:\[(?:[^\]\\\r\n]|\\.)*\]|\\.|[^/\\\[\r\n])+\/[dgimyus]{0,7}/.source+"|"+/(?:\[(?:[^[\]\\\r\n]|\\.|\[(?:[^[\]\\\r\n]|\\.|\[(?:[^[\]\\\r\n]|\\.)*\])*\])*\]|\\.|[^/\\\[\r\n])+\/[dgimyus]{0,7}v[dgimyus]{0,7}/.source+")"+/(?=(?:\s|\/\*(?:[^*]|\*(?!\/))*\*\/)*(?:$|[\r\n,.;:})\]]|\/\/))/.source),lookbehind:!0,greedy:!0,inside:{"regex-source":{pattern:/^(\/)[\s\S]+(?=\/[a-z]*$)/,lookbehind:!0,alias:"language-regex",inside:e.languages.regex},"regex-delimiter":/^\/|\/$/,"regex-flags":/^[a-z]+$/}},"function-variable":{pattern:/#?(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\s*[=:]\s*(?:async\s*)?(?:\bfunction\b|(?:\((?:[^()]|\([^()]*\))*\)|(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*)\s*=>))/,alias:"function"},parameter:[{pattern:/(function(?:\s+(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*)?\s*\(\s*)(?!\s)(?:[^()\s]|\s+(?![\s)])|\([^()]*\))+(?=\s*\))/,lookbehind:!0,inside:e.languages.javascript},{pattern:/(^|[^$\w\xA0-\uFFFF])(?!\s)[_$a-z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\s*=>)/i,lookbehind:!0,inside:e.languages.javascript},{pattern:/(\(\s*)(?!\s)(?:[^()\s]|\s+(?![\s)])|\([^()]*\))+(?=\s*\)\s*=>)/,lookbehind:!0,inside:e.languages.javascript},{pattern:/((?:\b|\s|^)(?!(?:as|async|await|break|case|catch|class|const|continue|debugger|default|delete|do|else|enum|export|extends|finally|for|from|function|get|if|implements|import|in|instanceof|interface|let|new|null|of|package|private|protected|public|return|set|static|super|switch|this|throw|try|typeof|undefined|var|void|while|with|yield)(?![$\w\xA0-\uFFFF]))(?:(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*\s*)\(\s*|\]\s*\(\s*)(?!\s)(?:[^()\s]|\s+(?![\s)])|\([^()]*\))+(?=\s*\)\s*\{)/,lookbehind:!0,inside:e.languages.javascript}],constant:/\b[A-Z](?:[A-Z_]|\dx?)*\b/}),e.languages.insertBefore("javascript","string",{hashbang:{pattern:/^#!.*/,greedy:!0,alias:"comment"},"template-string":{pattern:/`(?:\\[\s\S]|\$\{(?:[^{}]|\{(?:[^{}]|\{[^}]*\})*\})+\}|(?!\$\{)[^\\`])*`/,greedy:!0,inside:{"template-punctuation":{pattern:/^`|`$/,alias:"string"},interpolation:{pattern:/((?:^|[^\\])(?:\\{2})*)\$\{(?:[^{}]|\{(?:[^{}]|\{[^}]*\})*\})+\}/,lookbehind:!0,inside:{"interpolation-punctuation":{pattern:/^\$\{|\}$/,alias:"punctuation"},rest:e.languages.javascript}},string:/[\s\S]+/}},"string-property":{pattern:/((?:^|[,{])[ \t]*)(["'])(?:\\(?:\r\n|[\s\S])|(?!\2)[^\\\r\n])*\2(?=\s*:)/m,lookbehind:!0,greedy:!0,alias:"property"}}),e.languages.insertBefore("javascript","operator",{"literal-property":{pattern:/((?:^|[,{])[ \t]*)(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\s*:)/m,lookbehind:!0,alias:"property"}}),e.languages.markup&&(e.languages.markup.tag.addInlined("script","javascript"),e.languages.markup.tag.addAttribute(/on(?:abort|blur|change|click|composition(?:end|start|update)|dblclick|error|focus(?:in|out)?|key(?:down|up)|load|mouse(?:down|enter|leave|move|out|over|up)|reset|resize|scroll|select|slotchange|submit|unload|wheel)/.source,"javascript")),e.languages.js=e.languages.javascript}CS.displayName="json";CS.aliases=["webmanifest"];function CS(e){e.languages.json={property:{pattern:/(^|[^\\])"(?:\\.|[^\\"\r\n])*"(?=\s*:)/,lookbehind:!0,greedy:!0},string:{pattern:/(^|[^\\])"(?:\\.|[^\\"\r\n])*"(?!\s*:)/,lookbehind:!0,greedy:!0},comment:{pattern:/\/\/.*|\/\*[\s\S]*?(?:\*\/|$)/,greedy:!0},number:/-?\b\d+(?:\.\d+)?(?:e[+-]?\d+)?\b/i,punctuation:/[{}[\],]/,operator:/:/,boolean:/\b(?:false|true)\b/,null:{pattern:/\bnull\b/,alias:"keyword"}},e.languages.webmanifest=e.languages.json}ES.displayName="kotlin";ES.aliases=["kt","kts"];function ES(e){e.register(Jo),(function(n){n.languages.kotlin=n.languages.extend("clike",{keyword:{pattern:/(^|[^.])\b(?:abstract|actual|annotation|as|break|by|catch|class|companion|const|constructor|continue|crossinline|data|do|dynamic|else|enum|expect|external|final|finally|for|fun|get|if|import|in|infix|init|inline|inner|interface|internal|is|lateinit|noinline|null|object|open|operator|out|override|package|private|protected|public|reified|return|sealed|set|super|suspend|tailrec|this|throw|to|try|typealias|val|var|vararg|when|where|while)\b/,lookbehind:!0},function:[{pattern:/(?:`[^\r\n`]+`|\b\w+)(?=\s*\()/,greedy:!0},{pattern:/(\.)(?:`[^\r\n`]+`|\w+)(?=\s*\{)/,lookbehind:!0,greedy:!0}],number:/\b(?:0[xX][\da-fA-F]+(?:_[\da-fA-F]+)*|0[bB][01]+(?:_[01]+)*|\d+(?:_\d+)*(?:\.\d+(?:_\d+)*)?(?:[eE][+-]?\d+(?:_\d+)*)?[fFL]?)\b/,operator:/\+[+=]?|-[-=>]?|==?=?|!(?:!|==?)?|[\/*%<>]=?|[?:]:?|\.\.|&&|\|\||\b(?:and|inv|or|shl|shr|ushr|xor)\b/}),delete n.languages.kotlin["class-name"];var t={"interpolation-punctuation":{pattern:/^\$\{?|\}$/,alias:"punctuation"},expression:{pattern:/[\s\S]+/,inside:n.languages.kotlin}};n.languages.insertBefore("kotlin","string",{"string-literal":[{pattern:/"""(?:[^$]|\$(?:(?!\{)|\{[^{}]*\}))*?"""/,alias:"multiline",inside:{interpolation:{pattern:/\$(?:[a-z_]\w*|\{[^{}]*\})/i,inside:t},string:/[\s\S]+/}},{pattern:/"(?:[^"\\\r\n$]|\\.|\$(?:(?!\{)|\{[^{}]*\}))*"/,alias:"singleline",inside:{interpolation:{pattern:/((?:^|[^\\])(?:\\{2})*)\$(?:[a-z_]\w*|\{[^{}]*\})/i,lookbehind:!0,inside:t},string:/[\s\S]+/}}],char:{pattern:/'(?:[^'\\\r\n]|\\(?:.|u[a-fA-F0-9]{0,4}))'/,greedy:!0}}),delete n.languages.kotlin.string,n.languages.insertBefore("kotlin","keyword",{annotation:{pattern:/\B@(?:\w+:)?(?:[A-Z]\w*|\[[^\]]+\])/,alias:"builtin"}}),n.languages.insertBefore("kotlin","function",{label:{pattern:/\b\w+@|@\w+\b/,alias:"symbol"}}),n.languages.kt=n.languages.kotlin,n.languages.kts=n.languages.kotlin})(e)}NS.displayName="less";NS.aliases=[];function NS(e){e.register(wh),e.languages.less=e.languages.extend("css",{comment:[/\/\*[\s\S]*?\*\//,{pattern:/(^|[^\\])\/\/.*/,lookbehind:!0}],atrule:{pattern:/@[\w-](?:\((?:[^(){}]|\([^(){}]*\))*\)|[^(){};\s]|\s+(?!\s))*?(?=\s*\{)/,inside:{punctuation:/[:()]/}},selector:{pattern:/(?:@\{[\w-]+\}|[^{};\s@])(?:@\{[\w-]+\}|\((?:[^(){}]|\([^(){}]*\))*\)|[^(){};@\s]|\s+(?!\s))*?(?=\s*\{)/,inside:{variable:/@+[\w-]+/}},property:/(?:@\{[\w-]+\}|[\w-])+(?:\+_?)?(?=\s*:)/,operator:/[+\-*\/]/}),e.languages.insertBefore("less","property",{variable:[{pattern:/@[\w-]+\s*:/,inside:{punctuation:/:/}},/@@?[\w-]+/],"mixin-usage":{pattern:/([{;]\s*)[.#](?!\d)[\w-].*?(?=[(;])/,lookbehind:!0,alias:"function"}})}zS.displayName="lua";zS.aliases=[];function zS(e){e.languages.lua={comment:/^#!.+|--(?:\[(=*)\[[\s\S]*?\]\1\]|.*)/m,string:{pattern:/(["'])(?:(?!\1)[^\\\r\n]|\\z(?:\r\n|\s)|\\(?:\r\n|[^z]))*\1|\[(=*)\[[\s\S]*?\]\2\]/,greedy:!0},number:/\b0x[a-f\d]+(?:\.[a-f\d]*)?(?:p[+-]?\d+)?\b|\b\d+(?:\.\B|(?:\.\d*)?(?:e[+-]?\d+)?\b)|\B\.\d+(?:e[+-]?\d+)?\b/i,keyword:/\b(?:and|break|do|else|elseif|end|false|for|function|goto|if|in|local|nil|not|or|repeat|return|then|true|until|while)\b/,function:/(?!\d)\w+(?=\s*(?:[({]))/,operator:[/[-+*%^&|#]|\/\/?|<[<=]?|>[>=]?|[=~]=?/,{pattern:/(^|[^.])\.\.(?!\.)/,lookbehind:!0}],punctuation:/[\[\](){},;]|\.+|:+/}}jS.displayName="makefile";jS.aliases=[];function jS(e){e.languages.makefile={comment:{pattern:/(^|[^\\])#(?:\\(?:\r\n|[\s\S])|[^\\\r\n])*/,lookbehind:!0},string:{pattern:/(["'])(?:\\(?:\r\n|[\s\S])|(?!\1)[^\\\r\n])*\1/,greedy:!0},"builtin-target":{pattern:/\.[A-Z][^:#=\s]+(?=\s*:(?!=))/,alias:"builtin"},target:{pattern:/^(?:[^:=\s]|[ \t]+(?![\s:]))+(?=\s*:(?!=))/m,alias:"symbol",inside:{variable:/\$+(?:(?!\$)[^(){}:#=\s]+|(?=[({]))/}},variable:/\$+(?:(?!\$)[^(){}:#=\s]+|\([@*%<^+?][DF]\)|(?=[({]))/,keyword:/-include\b|\b(?:define|else|endef|endif|export|ifn?def|ifn?eq|include|override|private|sinclude|undefine|unexport|vpath)\b/,function:{pattern:/(\()(?:abspath|addsuffix|and|basename|call|dir|error|eval|file|filter(?:-out)?|findstring|firstword|flavor|foreach|guile|if|info|join|lastword|load|notdir|or|origin|patsubst|realpath|shell|sort|strip|subst|suffix|value|warning|wildcard|word(?:list|s)?)(?=[ \t])/,lookbehind:!0},operator:/(?:::|[?:+!])?=|[|@]/,punctuation:/[:;(){}]/}}TS.displayName="yaml";TS.aliases=["yml"];function TS(e){(function(n){var t=/[*&][^\s[\]{},]+/,r=/!(?:<[\w\-%#;/?:@&=+$,.!~*'()[\]]+>|(?:[a-zA-Z\d-]*!)?[\w\-%#;/?:@&=+$.~*'()]+)?/,s="(?:"+r.source+"(?:[ ]+"+t.source+")?|"+t.source+"(?:[ ]+"+r.source+")?)",i=/(?:[^\s\x00-\x08\x0e-\x1f!"#%&'*,\-:>?@[\]`{|}\x7f-\x84\x86-\x9f\ud800-\udfff\ufffe\uffff]|[?:-])(?:[ \t]*(?:(?![#:])|:))*/.source.replace(//g,function(){return/[^\s\x00-\x08\x0e-\x1f,[\]{}\x7f-\x84\x86-\x9f\ud800-\udfff\ufffe\uffff]/.source}),a=/"(?:[^"\\\r\n]|\\.)*"|'(?:[^'\\\r\n]|\\.)*'/.source;function o(l,u){u=(u||"").replace(/m/g,"")+"m";var h=/([:\-,[{]\s*(?:\s<>[ \t]+)?)(?:<>)(?=[ \t]*(?:$|,|\]|\}|(?:[\r\n]\s*)?#))/.source.replace(/<>/g,function(){return s}).replace(/<>/g,function(){return l});return RegExp(h,u)}n.languages.yaml={scalar:{pattern:RegExp(/([\-:]\s*(?:\s<>[ \t]+)?[|>])[ \t]*(?:((?:\r?\n|\r)[ \t]+)\S[^\r\n]*(?:\2[^\r\n]+)*)/.source.replace(/<>/g,function(){return s})),lookbehind:!0,alias:"string"},comment:/#.*/,key:{pattern:RegExp(/((?:^|[:\-,[{\r\n?])[ \t]*(?:<>[ \t]+)?)<>(?=\s*:\s)/.source.replace(/<>/g,function(){return s}).replace(/<>/g,function(){return"(?:"+i+"|"+a+")"})),lookbehind:!0,greedy:!0,alias:"atrule"},directive:{pattern:/(^[ \t]*)%.+/m,lookbehind:!0,alias:"important"},datetime:{pattern:o(/\d{4}-\d\d?-\d\d?(?:[tT]|[ \t]+)\d\d?:\d{2}:\d{2}(?:\.\d*)?(?:[ \t]*(?:Z|[-+]\d\d?(?::\d{2})?))?|\d{4}-\d{2}-\d{2}|\d\d?:\d{2}(?::\d{2}(?:\.\d*)?)?/.source),lookbehind:!0,alias:"number"},boolean:{pattern:o(/false|true/.source,"i"),lookbehind:!0,alias:"important"},null:{pattern:o(/null|~/.source,"i"),lookbehind:!0,alias:"important"},string:{pattern:o(a),lookbehind:!0,greedy:!0},number:{pattern:o(/[+-]?(?:0x[\da-f]+|0o[0-7]+|(?:\d+(?:\.\d*)?|\.\d+)(?:e[+-]?\d+)?|\.inf|\.nan)/.source,"i"),lookbehind:!0},tag:r,important:t,punctuation:/---|[:[\]{}\-,|>?]|\.\.\./},n.languages.yml=n.languages.yaml})(e)}AS.displayName="markdown";AS.aliases=["md"];function AS(e){e.register(mm),(function(n){var t=/(?:\\.|[^\\\n\r]|(?:\n|\r\n?)(?![\r\n]))/.source;function r(o){return o=o.replace(//g,function(){return t}),RegExp(/((?:^|[^\\])(?:\\{2})*)/.source+"(?:"+o+")")}var s=/(?:\\.|``(?:[^`\r\n]|`(?!`))+``|`[^`\r\n]+`|[^\\|\r\n`])+/.source,i=/\|?__(?:\|__)+\|?(?:(?:\n|\r\n?)|(?![\s\S]))/.source.replace(/__/g,function(){return s}),a=/\|?[ \t]*:?-{3,}:?[ \t]*(?:\|[ \t]*:?-{3,}:?[ \t]*)+\|?(?:\n|\r\n?)/.source;n.languages.markdown=n.languages.extend("markup",{}),n.languages.insertBefore("markdown","prolog",{"front-matter-block":{pattern:/(^(?:\s*[\r\n])?)---(?!.)[\s\S]*?[\r\n]---(?!.)/,lookbehind:!0,greedy:!0,inside:{punctuation:/^---|---$/,"front-matter":{pattern:/\S+(?:\s+\S+)*/,alias:["yaml","language-yaml"],inside:n.languages.yaml}}},blockquote:{pattern:/^>(?:[\t ]*>)*/m,alias:"punctuation"},table:{pattern:RegExp("^"+i+a+"(?:"+i+")*","m"),inside:{"table-data-rows":{pattern:RegExp("^("+i+a+")(?:"+i+")*$"),lookbehind:!0,inside:{"table-data":{pattern:RegExp(s),inside:n.languages.markdown},punctuation:/\|/}},"table-line":{pattern:RegExp("^("+i+")"+a+"$"),lookbehind:!0,inside:{punctuation:/\||:?-{3,}:?/}},"table-header-row":{pattern:RegExp("^"+i+"$"),inside:{"table-header":{pattern:RegExp(s),alias:"important",inside:n.languages.markdown},punctuation:/\|/}}}},code:[{pattern:/((?:^|\n)[ \t]*\n|(?:^|\r\n?)[ \t]*\r\n?)(?: {4}|\t).+(?:(?:\n|\r\n?)(?: {4}|\t).+)*/,lookbehind:!0,alias:"keyword"},{pattern:/^```[\s\S]*?^```$/m,greedy:!0,inside:{"code-block":{pattern:/^(```.*(?:\n|\r\n?))[\s\S]+?(?=(?:\n|\r\n?)^```$)/m,lookbehind:!0},"code-language":{pattern:/^(```).+/,lookbehind:!0},punctuation:/```/}}],title:[{pattern:/\S.*(?:\n|\r\n?)(?:==+|--+)(?=[ \t]*$)/m,alias:"important",inside:{punctuation:/==+$|--+$/}},{pattern:/(^\s*)#.+/m,lookbehind:!0,alias:"important",inside:{punctuation:/^#+|#+$/}}],hr:{pattern:/(^\s*)([*-])(?:[\t ]*\2){2,}(?=\s*$)/m,lookbehind:!0,alias:"punctuation"},list:{pattern:/(^\s*)(?:[*+-]|\d+\.)(?=[\t ].)/m,lookbehind:!0,alias:"punctuation"},"url-reference":{pattern:/!?\[[^\]]+\]:[\t ]+(?:\S+|<(?:\\.|[^>\\])+>)(?:[\t ]+(?:"(?:\\.|[^"\\])*"|'(?:\\.|[^'\\])*'|\((?:\\.|[^)\\])*\)))?/,inside:{variable:{pattern:/^(!?\[)[^\]]+/,lookbehind:!0},string:/(?:"(?:\\.|[^"\\])*"|'(?:\\.|[^'\\])*'|\((?:\\.|[^)\\])*\))$/,punctuation:/^[\[\]!:]|[<>]/},alias:"url"},bold:{pattern:r(/\b__(?:(?!_)|_(?:(?!_))+_)+__\b|\*\*(?:(?!\*)|\*(?:(?!\*))+\*)+\*\*/.source),lookbehind:!0,greedy:!0,inside:{content:{pattern:/(^..)[\s\S]+(?=..$)/,lookbehind:!0,inside:{}},punctuation:/\*\*|__/}},italic:{pattern:r(/\b_(?:(?!_)|__(?:(?!_))+__)+_\b|\*(?:(?!\*)|\*\*(?:(?!\*))+\*\*)+\*/.source),lookbehind:!0,greedy:!0,inside:{content:{pattern:/(^.)[\s\S]+(?=.$)/,lookbehind:!0,inside:{}},punctuation:/[*_]/}},strike:{pattern:r(/(~~?)(?:(?!~))+\2/.source),lookbehind:!0,greedy:!0,inside:{content:{pattern:/(^~~?)[\s\S]+(?=\1$)/,lookbehind:!0,inside:{}},punctuation:/~~?/}},"code-snippet":{pattern:/(^|[^\\`])(?:``[^`\r\n]+(?:`[^`\r\n]+)*``(?!`)|`[^`\r\n]+`(?!`))/,lookbehind:!0,greedy:!0,alias:["code","keyword"]},url:{pattern:r(/!?\[(?:(?!\]))+\](?:\([^\s)]+(?:[\t ]+"(?:\\.|[^"\\])*")?\)|[ \t]?\[(?:(?!\]))+\])/.source),lookbehind:!0,greedy:!0,inside:{operator:/^!/,content:{pattern:/(^\[)[^\]]+(?=\])/,lookbehind:!0,inside:{}},variable:{pattern:/(^\][ \t]?\[)[^\]]+(?=\]$)/,lookbehind:!0},url:{pattern:/(^\]\()[^\s)]+/,lookbehind:!0},string:{pattern:/(^[ \t]+)"(?:\\.|[^"\\])*"(?=\)$)/,lookbehind:!0}}}}),["url","bold","italic","strike"].forEach(function(o){["url","bold","italic","strike","code-snippet"].forEach(function(l){o!==l&&(n.languages.markdown[o].inside.content.inside[l]=n.languages.markdown[l])})}),n.hooks.add("after-tokenize",function(o){if(o.language!=="markdown"&&o.language!=="md")return;function l(u){if(!(!u||typeof u=="string"))for(var h=0,_=u.length;h<_;h++){var p=u[h];if(p.type!=="code"){l(p.content);continue}var m=p.content[1],x=p.content[3];if(m&&x&&m.type==="code-language"&&x.type==="code-block"&&typeof m.content=="string"){var k=m.content.replace(/\b#/g,"sharp").replace(/\b\+\+/g,"pp");k=(/[a-z][\w-]*/i.exec(k)||[""])[0].toLowerCase();var v="language-"+k;x.alias?typeof x.alias=="string"?x.alias=[x.alias,v]:x.alias.push(v):x.alias=[v]}}}l(o.tokens)}),n.hooks.add("wrap",function(o){if(o.type==="code-block"){for(var l="",u=0,h=o.classes.length;u]?|\+\+?|!=?|<>?=?|==?|&&?|\|\|?|[~^%?*\/@]/}),delete e.languages.objectivec["class-name"],e.languages.objc=e.languages.objectivec}MS.displayName="perl";MS.aliases=[];function MS(e){(function(n){var t=/(?:\((?:[^()\\]|\\[\s\S])*\)|\{(?:[^{}\\]|\\[\s\S])*\}|\[(?:[^[\]\\]|\\[\s\S])*\]|<(?:[^<>\\]|\\[\s\S])*>)/.source;n.languages.perl={comment:[{pattern:/(^\s*)=\w[\s\S]*?=cut.*/m,lookbehind:!0,greedy:!0},{pattern:/(^|[^\\$])#.*/,lookbehind:!0,greedy:!0}],string:[{pattern:RegExp(/\b(?:q|qq|qw|qx)(?![a-zA-Z0-9])\s*/.source+"(?:"+[/([^a-zA-Z0-9\s{(\[<])(?:(?!\1)[^\\]|\\[\s\S])*\1/.source,/([a-zA-Z0-9])(?:(?!\2)[^\\]|\\[\s\S])*\2/.source,t].join("|")+")"),greedy:!0},{pattern:/("|`)(?:(?!\1)[^\\]|\\[\s\S])*\1/,greedy:!0},{pattern:/'(?:[^'\\\r\n]|\\.)*'/,greedy:!0}],regex:[{pattern:RegExp(/\b(?:m|qr)(?![a-zA-Z0-9])\s*/.source+"(?:"+[/([^a-zA-Z0-9\s{(\[<])(?:(?!\1)[^\\]|\\[\s\S])*\1/.source,/([a-zA-Z0-9])(?:(?!\2)[^\\]|\\[\s\S])*\2/.source,t].join("|")+")"+/[msixpodualngc]*/.source),greedy:!0},{pattern:RegExp(/(^|[^-])\b(?:s|tr|y)(?![a-zA-Z0-9])\s*/.source+"(?:"+[/([^a-zA-Z0-9\s{(\[<])(?:(?!\2)[^\\]|\\[\s\S])*\2(?:(?!\2)[^\\]|\\[\s\S])*\2/.source,/([a-zA-Z0-9])(?:(?!\3)[^\\]|\\[\s\S])*\3(?:(?!\3)[^\\]|\\[\s\S])*\3/.source,t+/\s*/.source+t].join("|")+")"+/[msixpodualngcer]*/.source),lookbehind:!0,greedy:!0},{pattern:/\/(?:[^\/\\\r\n]|\\.)*\/[msixpodualngc]*(?=\s*(?:$|[\r\n,.;})&|\-+*~<>!?^]|(?:and|cmp|eq|ge|gt|le|lt|ne|not|or|x|xor)\b))/,greedy:!0}],variable:[/[&*$@%]\{\^[A-Z]+\}/,/[&*$@%]\^[A-Z_]/,/[&*$@%]#?(?=\{)/,/[&*$@%]#?(?:(?:::)*'?(?!\d)[\w$]+(?![\w$]))+(?:::)*/,/[&*$@%]\d+/,/(?!%=)[$@%][!"#$%&'()*+,\-.\/:;<=>?@[\\\]^_`{|}~]/],filehandle:{pattern:/<(?![<=])\S*?>|\b_\b/,alias:"symbol"},"v-string":{pattern:/v\d+(?:\.\d+)*|\d+(?:\.\d+){2,}/,alias:"string"},function:{pattern:/(\bsub[ \t]+)\w+/,lookbehind:!0},keyword:/\b(?:any|break|continue|default|delete|die|do|else|elsif|eval|for|foreach|given|goto|if|last|local|my|next|our|package|print|redo|require|return|say|state|sub|switch|undef|unless|until|use|when|while)\b/,number:/\b(?:0x[\dA-Fa-f](?:_?[\dA-Fa-f])*|0b[01](?:_?[01])*|(?:(?:\d(?:_?\d)*)?\.)?\d(?:_?\d)*(?:[Ee][+-]?\d+)?)\b/,operator:/-[rwxoRWXOezsfdlpSbctugkTBMAC]\b|\+[+=]?|-[-=>]?|\*\*?=?|\/\/?=?|=[=~>]?|~[~=]?|\|\|?=?|&&?=?|<(?:=>?|<=?)?|>>?=?|![~=]?|[%^]=?|\.(?:=|\.\.?)?|[\\?]|\bx(?:=|\b)|\b(?:and|cmp|eq|ge|gt|le|lt|ne|not|or|xor)\b/,punctuation:/[{}[\];(),:]/}})(e)}Db.displayName="markup-templating";Db.aliases=[];function Db(e){e.register(mm),(function(n){function t(r,s){return"___"+r.toUpperCase()+s+"___"}Object.defineProperties(n.languages["markup-templating"]={},{buildPlaceholders:{value:function(r,s,i,a){if(r.language===s){var o=r.tokenStack=[];r.code=r.code.replace(i,function(l){if(typeof a=="function"&&!a(l))return l;for(var u=o.length,h;r.code.indexOf(h=t(s,u))!==-1;)++u;return o[u]=l,h}),r.grammar=n.languages.markup}}},tokenizePlaceholders:{value:function(r,s){if(r.language!==s||!r.tokenStack)return;r.grammar=n.languages[s];var i=0,a=Object.keys(r.tokenStack);function o(l){for(var u=0;u=a.length);u++){var h=l[u];if(typeof h=="string"||h.content&&typeof h.content=="string"){var _=a[i],p=r.tokenStack[_],m=typeof h=="string"?h:h.content,x=t(s,_),k=m.indexOf(x);if(k>-1){++i;var v=m.substring(0,k),b=new n.Token(s,n.tokenize(p,r.grammar),"language-"+s,p),w=m.substring(k+x.length),y=[];v&&y.push.apply(y,o([v])),y.push(b),w&&y.push.apply(y,o([w])),typeof h=="string"?l.splice.apply(l,[u,1].concat(y)):h.content=y}}else h.content&&o(h.content)}return l}o(r.tokens)}}})})(e)}OS.displayName="php";OS.aliases=[];function OS(e){e.register(Db),(function(n){var t=/\/\*[\s\S]*?\*\/|\/\/.*|#(?!\[).*/,r=[{pattern:/\b(?:false|true)\b/i,alias:"boolean"},{pattern:/(::\s*)\b[a-z_]\w*\b(?!\s*\()/i,greedy:!0,lookbehind:!0},{pattern:/(\b(?:case|const)\s+)\b[a-z_]\w*(?=\s*[;=])/i,greedy:!0,lookbehind:!0},/\b(?:null)\b/i,/\b[A-Z_][A-Z0-9_]*\b(?!\s*\()/],s=/\b0b[01]+(?:_[01]+)*\b|\b0o[0-7]+(?:_[0-7]+)*\b|\b0x[\da-f]+(?:_[\da-f]+)*\b|(?:\b\d+(?:_\d+)*\.?(?:\d+(?:_\d+)*)?|\B\.\d+)(?:e[+-]?\d+)?/i,i=/|\?\?=?|\.{3}|\??->|[!=]=?=?|::|\*\*=?|--|\+\+|&&|\|\||<<|>>|[?~]|[/^|%*&<>.+-]=?/,a=/[{}\[\](),:;]/;n.languages.php={delimiter:{pattern:/\?>$|^<\?(?:php(?=\s)|=)?/i,alias:"important"},comment:t,variable:/\$+(?:\w+\b|(?=\{))/,package:{pattern:/(namespace\s+|use\s+(?:function\s+)?)(?:\\?\b[a-z_]\w*)+\b(?!\\)/i,lookbehind:!0,inside:{punctuation:/\\/}},"class-name-definition":{pattern:/(\b(?:class|enum|interface|trait)\s+)\b[a-z_]\w*(?!\\)\b/i,lookbehind:!0,alias:"class-name"},"function-definition":{pattern:/(\bfunction\s+)[a-z_]\w*(?=\s*\()/i,lookbehind:!0,alias:"function"},keyword:[{pattern:/(\(\s*)\b(?:array|bool|boolean|float|int|integer|object|string)\b(?=\s*\))/i,alias:"type-casting",greedy:!0,lookbehind:!0},{pattern:/([(,?]\s*)\b(?:array(?!\s*\()|bool|callable|(?:false|null)(?=\s*\|)|float|int|iterable|mixed|object|self|static|string)\b(?=\s*\$)/i,alias:"type-hint",greedy:!0,lookbehind:!0},{pattern:/(\)\s*:\s*(?:\?\s*)?)\b(?:array(?!\s*\()|bool|callable|(?:false|null)(?=\s*\|)|float|int|iterable|mixed|never|object|self|static|string|void)\b/i,alias:"return-type",greedy:!0,lookbehind:!0},{pattern:/\b(?:array(?!\s*\()|bool|float|int|iterable|mixed|object|string|void)\b/i,alias:"type-declaration",greedy:!0},{pattern:/(\|\s*)(?:false|null)\b|\b(?:false|null)(?=\s*\|)/i,alias:"type-declaration",greedy:!0,lookbehind:!0},{pattern:/\b(?:parent|self|static)(?=\s*::)/i,alias:"static-context",greedy:!0},{pattern:/(\byield\s+)from\b/i,lookbehind:!0},/\bclass\b/i,{pattern:/((?:^|[^\s>:]|(?:^|[^-])>|(?:^|[^:]):)\s*)\b(?:abstract|and|array|as|break|callable|case|catch|clone|const|continue|declare|default|die|do|echo|else|elseif|empty|enddeclare|endfor|endforeach|endif|endswitch|endwhile|enum|eval|exit|extends|final|finally|fn|for|foreach|function|global|goto|if|implements|include|include_once|instanceof|insteadof|interface|isset|list|match|namespace|never|new|or|parent|print|private|protected|public|readonly|require|require_once|return|self|static|switch|throw|trait|try|unset|use|var|while|xor|yield|__halt_compiler)\b/i,lookbehind:!0}],"argument-name":{pattern:/([(,]\s*)\b[a-z_]\w*(?=\s*:(?!:))/i,lookbehind:!0},"class-name":[{pattern:/(\b(?:extends|implements|instanceof|new(?!\s+self|\s+static))\s+|\bcatch\s*\()\b[a-z_]\w*(?!\\)\b/i,greedy:!0,lookbehind:!0},{pattern:/(\|\s*)\b[a-z_]\w*(?!\\)\b/i,greedy:!0,lookbehind:!0},{pattern:/\b[a-z_]\w*(?!\\)\b(?=\s*\|)/i,greedy:!0},{pattern:/(\|\s*)(?:\\?\b[a-z_]\w*)+\b/i,alias:"class-name-fully-qualified",greedy:!0,lookbehind:!0,inside:{punctuation:/\\/}},{pattern:/(?:\\?\b[a-z_]\w*)+\b(?=\s*\|)/i,alias:"class-name-fully-qualified",greedy:!0,inside:{punctuation:/\\/}},{pattern:/(\b(?:extends|implements|instanceof|new(?!\s+self\b|\s+static\b))\s+|\bcatch\s*\()(?:\\?\b[a-z_]\w*)+\b(?!\\)/i,alias:"class-name-fully-qualified",greedy:!0,lookbehind:!0,inside:{punctuation:/\\/}},{pattern:/\b[a-z_]\w*(?=\s*\$)/i,alias:"type-declaration",greedy:!0},{pattern:/(?:\\?\b[a-z_]\w*)+(?=\s*\$)/i,alias:["class-name-fully-qualified","type-declaration"],greedy:!0,inside:{punctuation:/\\/}},{pattern:/\b[a-z_]\w*(?=\s*::)/i,alias:"static-context",greedy:!0},{pattern:/(?:\\?\b[a-z_]\w*)+(?=\s*::)/i,alias:["class-name-fully-qualified","static-context"],greedy:!0,inside:{punctuation:/\\/}},{pattern:/([(,?]\s*)[a-z_]\w*(?=\s*\$)/i,alias:"type-hint",greedy:!0,lookbehind:!0},{pattern:/([(,?]\s*)(?:\\?\b[a-z_]\w*)+(?=\s*\$)/i,alias:["class-name-fully-qualified","type-hint"],greedy:!0,lookbehind:!0,inside:{punctuation:/\\/}},{pattern:/(\)\s*:\s*(?:\?\s*)?)\b[a-z_]\w*(?!\\)\b/i,alias:"return-type",greedy:!0,lookbehind:!0},{pattern:/(\)\s*:\s*(?:\?\s*)?)(?:\\?\b[a-z_]\w*)+\b(?!\\)/i,alias:["class-name-fully-qualified","return-type"],greedy:!0,lookbehind:!0,inside:{punctuation:/\\/}}],constant:r,function:{pattern:/(^|[^\\\w])\\?[a-z_](?:[\w\\]*\w)?(?=\s*\()/i,lookbehind:!0,inside:{punctuation:/\\/}},property:{pattern:/(->\s*)\w+/,lookbehind:!0},number:s,operator:i,punctuation:a};var o={pattern:/\{\$(?:\{(?:\{[^{}]+\}|[^{}]+)\}|[^{}])+\}|(^|[^\\{])\$+(?:\w+(?:\[[^\r\n\[\]]+\]|->\w+)?)/,lookbehind:!0,inside:n.languages.php},l=[{pattern:/<<<'([^']+)'[\r\n](?:.*[\r\n])*?\1;/,alias:"nowdoc-string",greedy:!0,inside:{delimiter:{pattern:/^<<<'[^']+'|[a-z_]\w*;$/i,alias:"symbol",inside:{punctuation:/^<<<'?|[';]$/}}}},{pattern:/<<<(?:"([^"]+)"[\r\n](?:.*[\r\n])*?\1;|([a-z_]\w*)[\r\n](?:.*[\r\n])*?\2;)/i,alias:"heredoc-string",greedy:!0,inside:{delimiter:{pattern:/^<<<(?:"[^"]+"|[a-z_]\w*)|[a-z_]\w*;$/i,alias:"symbol",inside:{punctuation:/^<<<"?|[";]$/}},interpolation:o}},{pattern:/`(?:\\[\s\S]|[^\\`])*`/,alias:"backtick-quoted-string",greedy:!0},{pattern:/'(?:\\[\s\S]|[^\\'])*'/,alias:"single-quoted-string",greedy:!0},{pattern:/"(?:\\[\s\S]|[^\\"])*"/,alias:"double-quoted-string",greedy:!0,inside:{interpolation:o}}];n.languages.insertBefore("php","variable",{string:l,attribute:{pattern:/#\[(?:[^"'\/#]|\/(?![*/])|\/\/.*$|#(?!\[).*$|\/\*(?:[^*]|\*(?!\/))*\*\/|"(?:\\[\s\S]|[^\\"])*"|'(?:\\[\s\S]|[^\\'])*')+\](?=\s*[a-z$#])/im,greedy:!0,inside:{"attribute-content":{pattern:/^(#\[)[\s\S]+(?=\]$)/,lookbehind:!0,inside:{comment:t,string:l,"attribute-class-name":[{pattern:/([^:]|^)\b[a-z_]\w*(?!\\)\b/i,alias:"class-name",greedy:!0,lookbehind:!0},{pattern:/([^:]|^)(?:\\?\b[a-z_]\w*)+/i,alias:["class-name","class-name-fully-qualified"],greedy:!0,lookbehind:!0,inside:{punctuation:/\\/}}],constant:r,number:s,operator:i,punctuation:a}},delimiter:{pattern:/^#\[|\]$/,alias:"punctuation"}}}}),n.hooks.add("before-tokenize",function(u){if(/<\?/.test(u.code)){var h=/<\?(?:[^"'/#]|\/(?![*/])|("|')(?:\\[\s\S]|(?!\1)[^\\])*\1|(?:\/\/|#(?!\[))(?:[^?\n\r]|\?(?!>))*(?=$|\?>|[\r\n])|#\[|\/\*(?:[^*]|\*(?!\/))*(?:\*\/|$))*?(?:\?>|$)/g;n.languages["markup-templating"].buildPlaceholders(u,"php",h)}}),n.hooks.add("after-tokenize",function(u){n.languages["markup-templating"].tokenizePlaceholders(u,"php")})})(e)}DS.displayName="python";DS.aliases=["py"];function DS(e){e.languages.python={comment:{pattern:/(^|[^\\])#.*/,lookbehind:!0,greedy:!0},"string-interpolation":{pattern:/(?:f|fr|rf)(?:("""|''')[\s\S]*?\1|("|')(?:\\.|(?!\2)[^\\\r\n])*\2)/i,greedy:!0,inside:{interpolation:{pattern:/((?:^|[^{])(?:\{\{)*)\{(?!\{)(?:[^{}]|\{(?!\{)(?:[^{}]|\{(?!\{)(?:[^{}])+\})+\})+\}/,lookbehind:!0,inside:{"format-spec":{pattern:/(:)[^:(){}]+(?=\}$)/,lookbehind:!0},"conversion-option":{pattern:/![sra](?=[:}]$)/,alias:"punctuation"},rest:null}},string:/[\s\S]+/}},"triple-quoted-string":{pattern:/(?:[rub]|br|rb)?("""|''')[\s\S]*?\1/i,greedy:!0,alias:"string"},string:{pattern:/(?:[rub]|br|rb)?("|')(?:\\.|(?!\1)[^\\\r\n])*\1/i,greedy:!0},function:{pattern:/((?:^|\s)def[ \t]+)[a-zA-Z_]\w*(?=\s*\()/g,lookbehind:!0},"class-name":{pattern:/(\bclass\s+)\w+/i,lookbehind:!0},decorator:{pattern:/(^[\t ]*)@\w+(?:\.\w+)*/m,lookbehind:!0,alias:["annotation","punctuation"],inside:{punctuation:/\./}},keyword:/\b(?:_(?=\s*:)|and|as|assert|async|await|break|case|class|continue|def|del|elif|else|except|exec|finally|for|from|global|if|import|in|is|lambda|match|nonlocal|not|or|pass|print|raise|return|try|while|with|yield)\b/,builtin:/\b(?:__import__|abs|all|any|apply|ascii|basestring|bin|bool|buffer|bytearray|bytes|callable|chr|classmethod|cmp|coerce|compile|complex|delattr|dict|dir|divmod|enumerate|eval|execfile|file|filter|float|format|frozenset|getattr|globals|hasattr|hash|help|hex|id|input|int|intern|isinstance|issubclass|iter|len|list|locals|long|map|max|memoryview|min|next|object|oct|open|ord|pow|property|range|raw_input|reduce|reload|repr|reversed|round|set|setattr|slice|sorted|staticmethod|str|sum|super|tuple|type|unichr|unicode|vars|xrange|zip)\b/,boolean:/\b(?:False|None|True)\b/,number:/\b0(?:b(?:_?[01])+|o(?:_?[0-7])+|x(?:_?[a-f0-9])+)\b|(?:\b\d+(?:_\d+)*(?:\.(?:\d+(?:_\d+)*)?)?|\B\.\d+(?:_\d+)*)(?:e[+-]?\d+(?:_\d+)*)?j?(?!\w)/i,operator:/[-+%=]=?|!=|:=|\*\*?=?|\/\/?=?|<[<=>]?|>[=>]?|[&|^~]/,punctuation:/[{}[\];(),.:]/},e.languages.python["string-interpolation"].inside.interpolation.inside.rest=e.languages.python,e.languages.py=e.languages.python}LS.displayName="r";LS.aliases=[];function LS(e){e.languages.r={comment:/#.*/,string:{pattern:/(['"])(?:\\.|(?!\1)[^\\\r\n])*\1/,greedy:!0},"percent-operator":{pattern:/%[^%\s]*%/,alias:"operator"},boolean:/\b(?:FALSE|TRUE)\b/,ellipsis:/\.\.(?:\.|\d+)/,number:[/\b(?:Inf|NaN)\b/,/(?:\b0x[\dA-Fa-f]+(?:\.\d*)?|\b\d+(?:\.\d*)?|\B\.\d+)(?:[EePp][+-]?\d+)?[iL]?/],keyword:/\b(?:NA|NA_character_|NA_complex_|NA_integer_|NA_real_|NULL|break|else|for|function|if|in|next|repeat|while)\b/,operator:/->?>?|<(?:=|=!]=?|::?|&&?|\|\|?|[+*\/^$@~]/,punctuation:/[(){}\[\],;]/}}IS.displayName="ruby";IS.aliases=["rb"];function IS(e){e.register(Jo),(function(n){n.languages.ruby=n.languages.extend("clike",{comment:{pattern:/#.*|^=begin\s[\s\S]*?^=end/m,greedy:!0},"class-name":{pattern:/(\b(?:class|module)\s+|\bcatch\s+\()[\w.\\]+|\b[A-Z_]\w*(?=\s*\.\s*new\b)/,lookbehind:!0,inside:{punctuation:/[.\\]/}},keyword:/\b(?:BEGIN|END|alias|and|begin|break|case|class|def|define_method|defined|do|each|else|elsif|end|ensure|extend|for|if|in|include|module|new|next|nil|not|or|prepend|private|protected|public|raise|redo|require|rescue|retry|return|self|super|then|throw|undef|unless|until|when|while|yield)\b/,operator:/\.{2,3}|&\.|===||[!=]?~|(?:&&|\|\||<<|>>|\*\*|[+\-*/%<>!^&|=])=?|[?:]/,punctuation:/[(){}[\].,;]/}),n.languages.insertBefore("ruby","operator",{"double-colon":{pattern:/::/,alias:"punctuation"}});var t={pattern:/((?:^|[^\\])(?:\\{2})*)#\{(?:[^{}]|\{[^{}]*\})*\}/,lookbehind:!0,inside:{content:{pattern:/^(#\{)[\s\S]+(?=\}$)/,lookbehind:!0,inside:n.languages.ruby},delimiter:{pattern:/^#\{|\}$/,alias:"punctuation"}}};delete n.languages.ruby.function;var r="(?:"+[/([^a-zA-Z0-9\s{(\[<=])(?:(?!\1)[^\\]|\\[\s\S])*\1/.source,/\((?:[^()\\]|\\[\s\S]|\((?:[^()\\]|\\[\s\S])*\))*\)/.source,/\{(?:[^{}\\]|\\[\s\S]|\{(?:[^{}\\]|\\[\s\S])*\})*\}/.source,/\[(?:[^\[\]\\]|\\[\s\S]|\[(?:[^\[\]\\]|\\[\s\S])*\])*\]/.source,/<(?:[^<>\\]|\\[\s\S]|<(?:[^<>\\]|\\[\s\S])*>)*>/.source].join("|")+")",s=/(?:"(?:\\.|[^"\\\r\n])*"|(?:\b[a-zA-Z_]\w*|[^\s\0-\x7F]+)[?!]?|\$.)/.source;n.languages.insertBefore("ruby","keyword",{"regex-literal":[{pattern:RegExp(/%r/.source+r+/[egimnosux]{0,6}/.source),greedy:!0,inside:{interpolation:t,regex:/[\s\S]+/}},{pattern:/(^|[^/])\/(?!\/)(?:\[[^\r\n\]]+\]|\\.|[^[/\\\r\n])+\/[egimnosux]{0,6}(?=\s*(?:$|[\r\n,.;})#]))/,lookbehind:!0,greedy:!0,inside:{interpolation:t,regex:/[\s\S]+/}}],variable:/[@$]+[a-zA-Z_]\w*(?:[?!]|\b)/,symbol:[{pattern:RegExp(/(^|[^:]):/.source+s),lookbehind:!0,greedy:!0},{pattern:RegExp(/([\r\n{(,][ \t]*)/.source+s+/(?=:(?!:))/.source),lookbehind:!0,greedy:!0}],"method-definition":{pattern:/(\bdef\s+)\w+(?:\s*\.\s*\w+)?/,lookbehind:!0,inside:{function:/\b\w+$/,keyword:/^self\b/,"class-name":/^\w+/,punctuation:/\./}}}),n.languages.insertBefore("ruby","string",{"string-literal":[{pattern:RegExp(/%[qQiIwWs]?/.source+r),greedy:!0,inside:{interpolation:t,string:/[\s\S]+/}},{pattern:/("|')(?:#\{[^}]+\}|#(?!\{)|\\(?:\r\n|[\s\S])|(?!\1)[^\\#\r\n])*\1/,greedy:!0,inside:{interpolation:t,string:/[\s\S]+/}},{pattern:/<<[-~]?([a-z_]\w*)[\r\n](?:.*[\r\n])*?[\t ]*\1/i,alias:"heredoc-string",greedy:!0,inside:{delimiter:{pattern:/^<<[-~]?[a-z_]\w*|\b[a-z_]\w*$/i,inside:{symbol:/\b\w+/,punctuation:/^<<[-~]?/}},interpolation:t,string:/[\s\S]+/}},{pattern:/<<[-~]?'([a-z_]\w*)'[\r\n](?:.*[\r\n])*?[\t ]*\1/i,alias:"heredoc-string",greedy:!0,inside:{delimiter:{pattern:/^<<[-~]?'[a-z_]\w*'|\b[a-z_]\w*$/i,inside:{symbol:/\b\w+/,punctuation:/^<<[-~]?'|'$/}},string:/[\s\S]+/}}],"command-literal":[{pattern:RegExp(/%x/.source+r),greedy:!0,inside:{interpolation:t,command:{pattern:/[\s\S]+/,alias:"string"}}},{pattern:/`(?:#\{[^}]+\}|#(?!\{)|\\(?:\r\n|[\s\S])|[^\\`#\r\n])*`/,greedy:!0,inside:{interpolation:t,command:{pattern:/[\s\S]+/,alias:"string"}}}]}),delete n.languages.ruby.string,n.languages.insertBefore("ruby","number",{builtin:/\b(?:Array|Bignum|Binding|Class|Continuation|Dir|Exception|FalseClass|File|Fixnum|Float|Hash|IO|Integer|MatchData|Method|Module|NilClass|Numeric|Object|Proc|Range|Regexp|Stat|String|Struct|Symbol|TMS|Thread|ThreadGroup|Time|TrueClass)\b/,constant:/\b[A-Z][A-Z0-9_]*(?:[?!]|\b)/}),n.languages.rb=n.languages.ruby})(e)}$S.displayName="rust";$S.aliases=[];function $S(e){(function(n){for(var t=/\/\*(?:[^*/]|\*(?!\/)|\/(?!\*)|)*\*\//.source,r=0;r<2;r++)t=t.replace(//g,function(){return t});t=t.replace(//g,function(){return/[^\s\S]/.source}),n.languages.rust={comment:[{pattern:RegExp(/(^|[^\\])/.source+t),lookbehind:!0,greedy:!0},{pattern:/(^|[^\\:])\/\/.*/,lookbehind:!0,greedy:!0}],string:{pattern:/b?"(?:\\[\s\S]|[^\\"])*"|b?r(#*)"(?:[^"]|"(?!\1))*"\1/,greedy:!0},char:{pattern:/b?'(?:\\(?:x[0-7][\da-fA-F]|u\{(?:[\da-fA-F]_*){1,6}\}|.)|[^\\\r\n\t'])'/,greedy:!0},attribute:{pattern:/#!?\[(?:[^\[\]"]|"(?:\\[\s\S]|[^\\"])*")*\]/,greedy:!0,alias:"attr-name",inside:{string:null}},"closure-params":{pattern:/([=(,:]\s*|\bmove\s*)\|[^|]*\||\|[^|]*\|(?=\s*(?:\{|->))/,lookbehind:!0,greedy:!0,inside:{"closure-punctuation":{pattern:/^\||\|$/,alias:"punctuation"},rest:null}},"lifetime-annotation":{pattern:/'\w+/,alias:"symbol"},"fragment-specifier":{pattern:/(\$\w+:)[a-z]+/,lookbehind:!0,alias:"punctuation"},variable:/\$\w+/,"function-definition":{pattern:/(\bfn\s+)\w+/,lookbehind:!0,alias:"function"},"type-definition":{pattern:/(\b(?:enum|struct|trait|type|union)\s+)\w+/,lookbehind:!0,alias:"class-name"},"module-declaration":[{pattern:/(\b(?:crate|mod)\s+)[a-z][a-z_\d]*/,lookbehind:!0,alias:"namespace"},{pattern:/(\b(?:crate|self|super)\s*)::\s*[a-z][a-z_\d]*\b(?:\s*::(?:\s*[a-z][a-z_\d]*\s*::)*)?/,lookbehind:!0,alias:"namespace",inside:{punctuation:/::/}}],keyword:[/\b(?:Self|abstract|as|async|await|become|box|break|const|continue|crate|do|dyn|else|enum|extern|final|fn|for|if|impl|in|let|loop|macro|match|mod|move|mut|override|priv|pub|ref|return|self|static|struct|super|trait|try|type|typeof|union|unsafe|unsized|use|virtual|where|while|yield)\b/,/\b(?:bool|char|f(?:32|64)|[ui](?:8|16|32|64|128|size)|str)\b/],function:/\b[a-z_]\w*(?=\s*(?:::\s*<|\())/,macro:{pattern:/\b\w+!/,alias:"property"},constant:/\b[A-Z_][A-Z_\d]+\b/,"class-name":/\b[A-Z]\w*\b/,namespace:{pattern:/(?:\b[a-z][a-z_\d]*\s*::\s*)*\b[a-z][a-z_\d]*\s*::(?!\s*<)/,inside:{punctuation:/::/}},number:/\b(?:0x[\dA-Fa-f](?:_?[\dA-Fa-f])*|0o[0-7](?:_?[0-7])*|0b[01](?:_?[01])*|(?:(?:\d(?:_?\d)*)?\.)?\d(?:_?\d)*(?:[Ee][+-]?\d+)?)(?:_?(?:f32|f64|[iu](?:8|16|32|64|size)?))?\b/,boolean:/\b(?:false|true)\b/,punctuation:/->|\.\.=|\.{1,3}|::|[{}[\];(),:]/,operator:/[-+*\/%!^]=?|=[=>]?|&[&=]?|\|[|=]?|<>?=?|[@?]/},n.languages.rust["closure-params"].inside.rest=n.languages.rust,n.languages.rust.attribute.inside.string=n.languages.rust.string})(e)}BS.displayName="sass";BS.aliases=[];function BS(e){e.register(wh),(function(n){n.languages.sass=n.languages.extend("css",{comment:{pattern:/^([ \t]*)\/[\/*].*(?:(?:\r?\n|\r)\1[ \t].+)*/m,lookbehind:!0,greedy:!0}}),n.languages.insertBefore("sass","atrule",{"atrule-line":{pattern:/^(?:[ \t]*)[@+=].+/m,greedy:!0,inside:{atrule:/(?:@[\w-]+|[+=])/}}}),delete n.languages.sass.atrule;var t=/\$[-\w]+|#\{\$[-\w]+\}/,r=[/[+*\/%]|[=!]=|<=?|>=?|\b(?:and|not|or)\b/,{pattern:/(\s)-(?=\s)/,lookbehind:!0}];n.languages.insertBefore("sass","property",{"variable-line":{pattern:/^[ \t]*\$.+/m,greedy:!0,inside:{punctuation:/:/,variable:t,operator:r}},"property-line":{pattern:/^[ \t]*(?:[^:\s]+ *:.*|:[^:\s].*)/m,greedy:!0,inside:{property:[/[^:\s]+(?=\s*:)/,{pattern:/(:)[^:\s]+/,lookbehind:!0}],punctuation:/:/,variable:t,operator:r,important:n.languages.sass.important}}}),delete n.languages.sass.property,delete n.languages.sass.important,n.languages.insertBefore("sass","punctuation",{selector:{pattern:/^([ \t]*)\S(?:,[^,\r\n]+|[^,\r\n]*)(?:,[^,\r\n]+)*(?:,(?:\r?\n|\r)\1[ \t]+\S(?:,[^,\r\n]+|[^,\r\n]*)(?:,[^,\r\n]+)*)*/m,lookbehind:!0,greedy:!0}})})(e)}PS.displayName="scss";PS.aliases=[];function PS(e){e.register(wh),e.languages.scss=e.languages.extend("css",{comment:{pattern:/(^|[^\\])(?:\/\*[\s\S]*?\*\/|\/\/.*)/,lookbehind:!0},atrule:{pattern:/@[\w-](?:\([^()]+\)|[^()\s]|\s+(?!\s))*?(?=\s+[{;])/,inside:{rule:/@[\w-]+/}},url:/(?:[-a-z]+-)?url(?=\()/i,selector:{pattern:/(?=\S)[^@;{}()]?(?:[^@;{}()\s]|\s+(?!\s)|#\{\$[-\w]+\})+(?=\s*\{(?:\}|\s|[^}][^:{}]*[:{][^}]))/,inside:{parent:{pattern:/&/,alias:"important"},placeholder:/%[-\w]+/,variable:/\$[-\w]+|#\{\$[-\w]+\}/}},property:{pattern:/(?:[-\w]|\$[-\w]|#\{\$[-\w]+\})+(?=\s*:)/,inside:{variable:/\$[-\w]+|#\{\$[-\w]+\}/}}}),e.languages.insertBefore("scss","atrule",{keyword:[/@(?:content|debug|each|else(?: if)?|extend|for|forward|function|if|import|include|mixin|return|use|warn|while)\b/i,{pattern:/( )(?:from|through)(?= )/,lookbehind:!0}]}),e.languages.insertBefore("scss","important",{variable:/\$[-\w]+|#\{\$[-\w]+\}/}),e.languages.insertBefore("scss","function",{"module-modifier":{pattern:/\b(?:as|hide|show|with)\b/i,alias:"keyword"},placeholder:{pattern:/%[-\w]+/,alias:"selector"},statement:{pattern:/\B!(?:default|optional)\b/i,alias:"keyword"},boolean:/\b(?:false|true)\b/,null:{pattern:/\bnull\b/,alias:"keyword"},operator:{pattern:/(\s)(?:[-+*\/%]|[=!]=|<=?|>=?|and|not|or)(?=\s)/,lookbehind:!0}}),e.languages.scss.atrule.inside.rest=e.languages.scss}FS.displayName="sql";FS.aliases=[];function FS(e){e.languages.sql={comment:{pattern:/(^|[^\\])(?:\/\*[\s\S]*?\*\/|(?:--|\/\/|#).*)/,lookbehind:!0},variable:[{pattern:/@(["'`])(?:\\[\s\S]|(?!\1)[^\\])+\1/,greedy:!0},/@[\w.$]+/],string:{pattern:/(^|[^@\\])("|')(?:\\[\s\S]|(?!\2)[^\\]|\2\2)*\2/,greedy:!0,lookbehind:!0},identifier:{pattern:/(^|[^@\\])`(?:\\[\s\S]|[^`\\]|``)*`/,greedy:!0,lookbehind:!0,inside:{punctuation:/^`|`$/}},function:/\b(?:AVG|COUNT|FIRST|FORMAT|LAST|LCASE|LEN|MAX|MID|MIN|MOD|NOW|ROUND|SUM|UCASE)(?=\s*\()/i,keyword:/\b(?:ACTION|ADD|AFTER|ALGORITHM|ALL|ALTER|ANALYZE|ANY|APPLY|AS|ASC|AUTHORIZATION|AUTO_INCREMENT|BACKUP|BDB|BEGIN|BERKELEYDB|BIGINT|BINARY|BIT|BLOB|BOOL|BOOLEAN|BREAK|BROWSE|BTREE|BULK|BY|CALL|CASCADED?|CASE|CHAIN|CHAR(?:ACTER|SET)?|CHECK(?:POINT)?|CLOSE|CLUSTERED|COALESCE|COLLATE|COLUMNS?|COMMENT|COMMIT(?:TED)?|COMPUTE|CONNECT|CONSISTENT|CONSTRAINT|CONTAINS(?:TABLE)?|CONTINUE|CONVERT|CREATE|CROSS|CURRENT(?:_DATE|_TIME|_TIMESTAMP|_USER)?|CURSOR|CYCLE|DATA(?:BASES?)?|DATE(?:TIME)?|DAY|DBCC|DEALLOCATE|DEC|DECIMAL|DECLARE|DEFAULT|DEFINER|DELAYED|DELETE|DELIMITERS?|DENY|DESC|DESCRIBE|DETERMINISTIC|DISABLE|DISCARD|DISK|DISTINCT|DISTINCTROW|DISTRIBUTED|DO|DOUBLE|DROP|DUMMY|DUMP(?:FILE)?|DUPLICATE|ELSE(?:IF)?|ENABLE|ENCLOSED|END|ENGINE|ENUM|ERRLVL|ERRORS|ESCAPED?|EXCEPT|EXEC(?:UTE)?|EXISTS|EXIT|EXPLAIN|EXTENDED|FETCH|FIELDS|FILE|FILLFACTOR|FIRST|FIXED|FLOAT|FOLLOWING|FOR(?: EACH ROW)?|FORCE|FOREIGN|FREETEXT(?:TABLE)?|FROM|FULL|FUNCTION|GEOMETRY(?:COLLECTION)?|GLOBAL|GOTO|GRANT|GROUP|HANDLER|HASH|HAVING|HOLDLOCK|HOUR|IDENTITY(?:COL|_INSERT)?|IF|IGNORE|IMPORT|INDEX|INFILE|INNER|INNODB|INOUT|INSERT|INT|INTEGER|INTERSECT|INTERVAL|INTO|INVOKER|ISOLATION|ITERATE|JOIN|KEYS?|KILL|LANGUAGE|LAST|LEAVE|LEFT|LEVEL|LIMIT|LINENO|LINES|LINESTRING|LOAD|LOCAL|LOCK|LONG(?:BLOB|TEXT)|LOOP|MATCH(?:ED)?|MEDIUM(?:BLOB|INT|TEXT)|MERGE|MIDDLEINT|MINUTE|MODE|MODIFIES|MODIFY|MONTH|MULTI(?:LINESTRING|POINT|POLYGON)|NATIONAL|NATURAL|NCHAR|NEXT|NO|NONCLUSTERED|NULLIF|NUMERIC|OFF?|OFFSETS?|ON|OPEN(?:DATASOURCE|QUERY|ROWSET)?|OPTIMIZE|OPTION(?:ALLY)?|ORDER|OUT(?:ER|FILE)?|OVER|PARTIAL|PARTITION|PERCENT|PIVOT|PLAN|POINT|POLYGON|PRECEDING|PRECISION|PREPARE|PREV|PRIMARY|PRINT|PRIVILEGES|PROC(?:EDURE)?|PUBLIC|PURGE|QUICK|RAISERROR|READS?|REAL|RECONFIGURE|REFERENCES|RELEASE|RENAME|REPEAT(?:ABLE)?|REPLACE|REPLICATION|REQUIRE|RESIGNAL|RESTORE|RESTRICT|RETURN(?:ING|S)?|REVOKE|RIGHT|ROLLBACK|ROUTINE|ROW(?:COUNT|GUIDCOL|S)?|RTREE|RULE|SAVE(?:POINT)?|SCHEMA|SECOND|SELECT|SERIAL(?:IZABLE)?|SESSION(?:_USER)?|SET(?:USER)?|SHARE|SHOW|SHUTDOWN|SIMPLE|SMALLINT|SNAPSHOT|SOME|SONAME|SQL|START(?:ING)?|STATISTICS|STATUS|STRIPED|SYSTEM_USER|TABLES?|TABLESPACE|TEMP(?:ORARY|TABLE)?|TERMINATED|TEXT(?:SIZE)?|THEN|TIME(?:STAMP)?|TINY(?:BLOB|INT|TEXT)|TOP?|TRAN(?:SACTIONS?)?|TRIGGER|TRUNCATE|TSEQUAL|TYPES?|UNBOUNDED|UNCOMMITTED|UNDEFINED|UNION|UNIQUE|UNLOCK|UNPIVOT|UNSIGNED|UPDATE(?:TEXT)?|USAGE|USE|USER|USING|VALUES?|VAR(?:BINARY|CHAR|CHARACTER|YING)|VIEW|WAITFOR|WARNINGS|WHEN|WHERE|WHILE|WITH(?: ROLLUP|IN)?|WORK|WRITE(?:TEXT)?|YEAR)\b/i,boolean:/\b(?:FALSE|NULL|TRUE)\b/i,number:/\b0x[\da-f]+\b|\b\d+(?:\.\d*)?|\B\.\d+\b/i,operator:/[-+*\/=%^~]|&&?|\|\|?|!=?|<(?:=>?|<|>)?|>[>=]?|\b(?:AND|BETWEEN|DIV|ILIKE|IN|IS|LIKE|NOT|OR|REGEXP|RLIKE|SOUNDS LIKE|XOR)\b/i,punctuation:/[;[\]()`,.]/}}HS.displayName="swift";HS.aliases=[];function HS(e){e.languages.swift={comment:{pattern:/(^|[^\\:])(?:\/\/.*|\/\*(?:[^/*]|\/(?!\*)|\*(?!\/)|\/\*(?:[^*]|\*(?!\/))*\*\/)*\*\/)/,lookbehind:!0,greedy:!0},"string-literal":[{pattern:RegExp(/(^|[^"#])/.source+"(?:"+/"(?:\\(?:\((?:[^()]|\([^()]*\))*\)|\r\n|[^(])|[^\\\r\n"])*"/.source+"|"+/"""(?:\\(?:\((?:[^()]|\([^()]*\))*\)|[^(])|[^\\"]|"(?!""))*"""/.source+")"+/(?!["#])/.source),lookbehind:!0,greedy:!0,inside:{interpolation:{pattern:/(\\\()(?:[^()]|\([^()]*\))*(?=\))/,lookbehind:!0,inside:null},"interpolation-punctuation":{pattern:/^\)|\\\($/,alias:"punctuation"},punctuation:/\\(?=[\r\n])/,string:/[\s\S]+/}},{pattern:RegExp(/(^|[^"#])(#+)/.source+"(?:"+/"(?:\\(?:#+\((?:[^()]|\([^()]*\))*\)|\r\n|[^#])|[^\\\r\n])*?"/.source+"|"+/"""(?:\\(?:#+\((?:[^()]|\([^()]*\))*\)|[^#])|[^\\])*?"""/.source+")\\2"),lookbehind:!0,greedy:!0,inside:{interpolation:{pattern:/(\\#+\()(?:[^()]|\([^()]*\))*(?=\))/,lookbehind:!0,inside:null},"interpolation-punctuation":{pattern:/^\)|\\#+\($/,alias:"punctuation"},string:/[\s\S]+/}}],directive:{pattern:RegExp(/#/.source+"(?:"+(/(?:elseif|if)\b/.source+"(?:[ ]*"+/(?:![ \t]*)?(?:\b\w+\b(?:[ \t]*\((?:[^()]|\([^()]*\))*\))?|\((?:[^()]|\([^()]*\))*\))(?:[ \t]*(?:&&|\|\|))?/.source+")+")+"|"+/(?:else|endif)\b/.source+")"),alias:"property",inside:{"directive-name":/^#\w+/,boolean:/\b(?:false|true)\b/,number:/\b\d+(?:\.\d+)*\b/,operator:/!|&&|\|\||[<>]=?/,punctuation:/[(),]/}},literal:{pattern:/#(?:colorLiteral|column|dsohandle|file(?:ID|Literal|Path)?|function|imageLiteral|line)\b/,alias:"constant"},"other-directive":{pattern:/#\w+\b/,alias:"property"},attribute:{pattern:/@\w+/,alias:"atrule"},"function-definition":{pattern:/(\bfunc\s+)\w+/,lookbehind:!0,alias:"function"},label:{pattern:/\b(break|continue)\s+\w+|\b[a-zA-Z_]\w*(?=\s*:\s*(?:for|repeat|while)\b)/,lookbehind:!0,alias:"important"},keyword:/\b(?:Any|Protocol|Self|Type|actor|as|assignment|associatedtype|associativity|async|await|break|case|catch|class|continue|convenience|default|defer|deinit|didSet|do|dynamic|else|enum|extension|fallthrough|fileprivate|final|for|func|get|guard|higherThan|if|import|in|indirect|infix|init|inout|internal|is|isolated|lazy|left|let|lowerThan|mutating|none|nonisolated|nonmutating|open|operator|optional|override|postfix|precedencegroup|prefix|private|protocol|public|repeat|required|rethrows|return|right|safe|self|set|some|static|struct|subscript|super|switch|throw|throws|try|typealias|unowned|unsafe|var|weak|where|while|willSet)\b/,boolean:/\b(?:false|true)\b/,nil:{pattern:/\bnil\b/,alias:"constant"},"short-argument":/\$\d+\b/,omit:{pattern:/\b_\b/,alias:"keyword"},number:/\b(?:[\d_]+(?:\.[\de_]+)?|0x[a-f0-9_]+(?:\.[a-f0-9p_]+)?|0b[01_]+|0o[0-7_]+)\b/i,"class-name":/\b[A-Z](?:[A-Z_\d]*[a-z]\w*)?\b/,function:/\b[a-z_]\w*(?=\s*\()/i,constant:/\b(?:[A-Z_]{2,}|k[A-Z][A-Za-z_]+)\b/,operator:/[-+*/%=!<>&|^~?]+|\.[.\-+*/%=!<>&|^~?]+/,punctuation:/[{}[\]();,.:\\]/},e.languages.swift["string-literal"].forEach(function(n){n.inside.interpolation.inside=e.languages.swift})}qS.displayName="typescript";qS.aliases=["ts"];function qS(e){e.register(Ob),(function(n){n.languages.typescript=n.languages.extend("javascript",{"class-name":{pattern:/(\b(?:class|extends|implements|instanceof|interface|new|type)\s+)(?!keyof\b)(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?:\s*<(?:[^<>]|<(?:[^<>]|<[^<>]*>)*>)*>)?/,lookbehind:!0,greedy:!0,inside:null},builtin:/\b(?:Array|Function|Promise|any|boolean|console|never|number|string|symbol|unknown)\b/}),n.languages.typescript.keyword.push(/\b(?:abstract|declare|is|keyof|readonly|require)\b/,/\b(?:asserts|infer|interface|module|namespace|type)\b(?=\s*(?:[{_$a-zA-Z\xA0-\uFFFF]|$))/,/\btype\b(?=\s*(?:[\{*]|$))/),delete n.languages.typescript.parameter,delete n.languages.typescript["literal-property"];var t=n.languages.extend("typescript",{});delete t["class-name"],n.languages.typescript["class-name"].inside=t,n.languages.insertBefore("typescript","function",{decorator:{pattern:/@[$\w\xA0-\uFFFF]+/,inside:{at:{pattern:/^@/,alias:"operator"},function:/^[\s\S]+/}},"generic-function":{pattern:/#?(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*\s*<(?:[^<>]|<(?:[^<>]|<[^<>]*>)*>)*>(?=\s*\()/,greedy:!0,inside:{function:/^#?(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*/,generic:{pattern:/<[\s\S]+/,alias:"class-name",inside:t}}}}),n.languages.ts=n.languages.typescript})(e)}Lb.displayName="basic";Lb.aliases=[];function Lb(e){e.languages.basic={comment:{pattern:/(?:!|REM\b).+/i,inside:{keyword:/^REM/i}},string:{pattern:/"(?:""|[!#$%&'()*,\/:;<=>?^\w +\-.])*"/,greedy:!0},number:/(?:\b\d+(?:\.\d*)?|\B\.\d+)(?:E[+-]?\d+)?/i,keyword:/\b(?:AS|BEEP|BLOAD|BSAVE|CALL(?: ABSOLUTE)?|CASE|CHAIN|CHDIR|CLEAR|CLOSE|CLS|COM|COMMON|CONST|DATA|DECLARE|DEF(?: FN| SEG|DBL|INT|LNG|SNG|STR)|DIM|DO|DOUBLE|ELSE|ELSEIF|END|ENVIRON|ERASE|ERROR|EXIT|FIELD|FILES|FOR|FUNCTION|GET|GOSUB|GOTO|IF|INPUT|INTEGER|IOCTL|KEY|KILL|LINE INPUT|LOCATE|LOCK|LONG|LOOP|LSET|MKDIR|NAME|NEXT|OFF|ON(?: COM| ERROR| KEY| TIMER)?|OPEN|OPTION BASE|OUT|POKE|PUT|READ|REDIM|REM|RESTORE|RESUME|RETURN|RMDIR|RSET|RUN|SELECT CASE|SHARED|SHELL|SINGLE|SLEEP|STATIC|STEP|STOP|STRING|SUB|SWAP|SYSTEM|THEN|TIMER|TO|TROFF|TRON|TYPE|UNLOCK|UNTIL|USING|VIEW PRINT|WAIT|WEND|WHILE|WRITE)(?:\$|\b)/i,function:/\b(?:ABS|ACCESS|ACOS|ANGLE|AREA|ARITHMETIC|ARRAY|ASIN|ASK|AT|ATN|BASE|BEGIN|BREAK|CAUSE|CEIL|CHR|CLIP|COLLATE|COLOR|CON|COS|COSH|COT|CSC|DATE|DATUM|DEBUG|DECIMAL|DEF|DEG|DEGREES|DELETE|DET|DEVICE|DISPLAY|DOT|ELAPSED|EPS|ERASABLE|EXLINE|EXP|EXTERNAL|EXTYPE|FILETYPE|FIXED|FP|GO|GRAPH|HANDLER|IDN|IMAGE|IN|INT|INTERNAL|IP|IS|KEYED|LBOUND|LCASE|LEFT|LEN|LENGTH|LET|LINE|LINES|LOG|LOG10|LOG2|LTRIM|MARGIN|MAT|MAX|MAXNUM|MID|MIN|MISSING|MOD|NATIVE|NUL|NUMERIC|OF|OPTION|ORD|ORGANIZATION|OUTIN|OUTPUT|PI|POINT|POINTER|POINTS|POS|PRINT|PROGRAM|PROMPT|RAD|RADIANS|RANDOMIZE|RECORD|RECSIZE|RECTYPE|RELATIVE|REMAINDER|REPEAT|REST|RETRY|REWRITE|RIGHT|RND|ROUND|RTRIM|SAME|SEC|SELECT|SEQUENTIAL|SET|SETTER|SGN|SIN|SINH|SIZE|SKIP|SQR|STANDARD|STATUS|STR|STREAM|STYLE|TAB|TAN|TANH|TEMPLATE|TEXT|THERE|TIME|TIMEOUT|TRACE|TRANSFORM|TRUNCATE|UBOUND|UCASE|USE|VAL|VARIABLE|VIEWPORT|WHEN|WINDOW|WITH|ZER|ZONEWIDTH)(?:\$|\b)/i,operator:/<[=>]?|>=?|[+\-*\/^=&]|\b(?:AND|EQV|IMP|NOT|OR|XOR)\b/i,punctuation:/[,;:()]/}}US.displayName="vbnet";US.aliases=[];function US(e){e.register(Lb),e.languages.vbnet=e.languages.extend("basic",{comment:[{pattern:/(?:!|REM\b).+/i,inside:{keyword:/^REM/i}},{pattern:/(^|[^\\:])'.*/,lookbehind:!0,greedy:!0}],string:{pattern:/(^|[^"])"(?:""|[^"])*"(?!")/,lookbehind:!0,greedy:!0},keyword:/(?:\b(?:ADDHANDLER|ADDRESSOF|ALIAS|AND|ANDALSO|AS|BEEP|BLOAD|BOOLEAN|BSAVE|BYREF|BYTE|BYVAL|CALL(?: ABSOLUTE)?|CASE|CATCH|CBOOL|CBYTE|CCHAR|CDATE|CDBL|CDEC|CHAIN|CHAR|CHDIR|CINT|CLASS|CLEAR|CLNG|CLOSE|CLS|COBJ|COM|COMMON|CONST|CONTINUE|CSBYTE|CSHORT|CSNG|CSTR|CTYPE|CUINT|CULNG|CUSHORT|DATA|DATE|DECIMAL|DECLARE|DEF(?: FN| SEG|DBL|INT|LNG|SNG|STR)|DEFAULT|DELEGATE|DIM|DIRECTCAST|DO|DOUBLE|ELSE|ELSEIF|END|ENUM|ENVIRON|ERASE|ERROR|EVENT|EXIT|FALSE|FIELD|FILES|FINALLY|FOR(?: EACH)?|FRIEND|FUNCTION|GET|GETTYPE|GETXMLNAMESPACE|GLOBAL|GOSUB|GOTO|HANDLES|IF|IMPLEMENTS|IMPORTS|IN|INHERITS|INPUT|INTEGER|INTERFACE|IOCTL|IS|ISNOT|KEY|KILL|LET|LIB|LIKE|LINE INPUT|LOCATE|LOCK|LONG|LOOP|LSET|ME|MKDIR|MOD|MODULE|MUSTINHERIT|MUSTOVERRIDE|MYBASE|MYCLASS|NAME|NAMESPACE|NARROWING|NEW|NEXT|NOT|NOTHING|NOTINHERITABLE|NOTOVERRIDABLE|OBJECT|OF|OFF|ON(?: COM| ERROR| KEY| TIMER)?|OPEN|OPERATOR|OPTION(?: BASE)?|OPTIONAL|OR|ORELSE|OUT|OVERLOADS|OVERRIDABLE|OVERRIDES|PARAMARRAY|PARTIAL|POKE|PRIVATE|PROPERTY|PROTECTED|PUBLIC|PUT|RAISEEVENT|READ|READONLY|REDIM|REM|REMOVEHANDLER|RESTORE|RESUME|RETURN|RMDIR|RSET|RUN|SBYTE|SELECT(?: CASE)?|SET|SHADOWS|SHARED|SHELL|SHORT|SINGLE|SLEEP|STATIC|STEP|STOP|STRING|STRUCTURE|SUB|SWAP|SYNCLOCK|SYSTEM|THEN|THROW|TIMER|TO|TROFF|TRON|TRUE|TRY|TRYCAST|TYPE|TYPEOF|UINTEGER|ULONG|UNLOCK|UNTIL|USHORT|USING|VIEW PRINT|WAIT|WEND|WHEN|WHILE|WIDENING|WITH|WITHEVENTS|WRITE|WRITEONLY|XOR)|\B(?:#CONST|#ELSE|#ELSEIF|#END|#IF))(?:\$|\b)/i,punctuation:/[,;:(){}]/})}class gm{constructor(n,t,r){this.normal=t,this.property=n,r&&(this.space=r)}}gm.prototype.normal={};gm.prototype.property={};gm.prototype.space=void 0;function JI(e,n){const t={},r={};for(const s of e)Object.assign(t,s.property),Object.assign(r,s.normal);return new gm(t,r,n)}function S0(e){return e.toLowerCase()}class Ti{constructor(n,t){this.attribute=t,this.property=n}}Ti.prototype.attribute="";Ti.prototype.booleanish=!1;Ti.prototype.boolean=!1;Ti.prototype.commaOrSpaceSeparated=!1;Ti.prototype.commaSeparated=!1;Ti.prototype.defined=!1;Ti.prototype.mustUseProperty=!1;Ti.prototype.number=!1;Ti.prototype.overloadedBoolean=!1;Ti.prototype.property="";Ti.prototype.spaceSeparated=!1;Ti.prototype.space=void 0;let zxn=0;const Zt=uf(),rs=uf(),M3=uf(),Ye=uf(),or=uf(),D_=uf(),Ki=uf();function uf(){return 2**++zxn}const O3=Object.freeze(Object.defineProperty({__proto__:null,boolean:Zt,booleanish:rs,commaOrSpaceSeparated:Ki,commaSeparated:D_,number:Ye,overloadedBoolean:M3,spaceSeparated:or},Symbol.toStringTag,{value:"Module"})),ow=Object.keys(O3);class GS extends Ti{constructor(n,t,r,s){let i=-1;if(super(n,t),lj(this,"space",s),typeof r=="number")for(;++i4&&t.slice(0,4)==="data"&&Mxn.test(n)){if(n.charAt(4)==="-"){const i=n.slice(5).replace(cj,Dxn);r="data"+i.charAt(0).toUpperCase()+i.slice(1)}else{const i=n.slice(4);if(!cj.test(i)){let a=i.replace(Rxn,Oxn);a.charAt(0)!=="-"&&(a="-"+a),n="data"+a}}s=GS}return new s(r,n)}function Oxn(e){return"-"+e.toLowerCase()}function Dxn(e){return e.charAt(1).toUpperCase()}const o$=JI([e$,jxn,r$,s$,i$],"html"),Ib=JI([e$,Txn,r$,s$,i$],"svg");function uj(e){const n=[],t=String(e||"");let r=t.indexOf(","),s=0,i=!1;for(;!i;){r===-1&&(r=t.length,i=!0);const a=t.slice(s,r).trim();(a||!i)&&n.push(a),s=r+1,r=t.indexOf(",",s)}return n}function Lxn(e,n){const t={};return(e[e.length-1]===""?[...e,""]:e).join((t.padRight?" ":"")+","+(t.padLeft===!1?"":" ")).trim()}const _j=/[#.]/g;function Ixn(e,n){const t=e||"",r={};let s=0,i,a;for(;s=48&&n<=57}function Vxn(e){const n=typeof e=="string"?e.charCodeAt(0):e;return n>=97&&n<=102||n>=65&&n<=70||n>=48&&n<=57}function Kxn(e){const n=typeof e=="string"?e.charCodeAt(0):e;return n>=97&&n<=122||n>=65&&n<=90}function pj(e){return Kxn(e)||u$(e)}const mj=document.createElement("i");function C0(e){const n="&"+e+";";mj.innerHTML=n;const t=mj.textContent;return t.charCodeAt(t.length-1)===59&&e!=="semi"||t===n?!1:t}const Wxn=["","Named character references must be terminated by a semicolon","Numeric character references must be terminated by a semicolon","Named character references cannot be empty","Numeric character references cannot be empty","Named character references must be known","Numeric character references cannot be disallowed","Numeric character references cannot be outside the permissible Unicode range"];function Qxn(e,n){const t={},r=typeof t.additional=="string"?t.additional.charCodeAt(0):t.additional,s=[];let i=0,a=-1,o="",l,u;t.position&&("start"in t.position||"indent"in t.position?(u=t.position.indent,l=t.position.start):l=t.position);let h=(l?l.line:0)||1,_=(l?l.column:0)||1,p=x(),m;for(i--;++i<=e.length;)if(m===10&&(_=(u?u[a]:0)||1),m=e.charCodeAt(i),m===38){const b=e.charCodeAt(i+1);if(b===9||b===10||b===12||b===32||b===38||b===60||Number.isNaN(b)||r&&b===r){o+=String.fromCharCode(m),_++;continue}const w=i+1;let y=w,C=w,N;if(b===35){C=++y;const U=e.charCodeAt(C);U===88||U===120?(N="hexadecimal",C=++y):N="decimal"}else N="named";let E="",T="",j="";const M=N==="named"?pj:N==="decimal"?u$:Vxn;for(C--;++C<=e.length;){const U=e.charCodeAt(C);if(!M(U))break;j+=String.fromCharCode(U),N==="named"&&Gxn.includes(j)&&(E=j,T=C0(j))}let D=e.charCodeAt(C)===59;if(D){C++;const U=N==="named"?C0(j):!1;U&&(E=j,T=U)}let I=1+C-w,P="";if(!(!D&&t.nonTerminated===!1))if(!j)N!=="named"&&k(4,I);else if(N==="named"){if(D&&!T)k(5,1);else if(E!==j&&(C=y+E.length,I=1+C-y,D=!1),!D){const U=E?1:3;if(t.attribute){const q=e.charCodeAt(C);q===61?(k(U,I),T=""):pj(q)?T="":k(U,I)}else k(U,I)}P=T}else{D||k(2,I);let U=Number.parseInt(j,N==="hexadecimal"?16:10);if(Xxn(U))k(7,I),P="�";else if(U in hj)k(6,I),P=hj[U];else{let q="";Yxn(U)&&k(6,I),U>65535&&(U-=65536,q+=String.fromCharCode(U>>>10|55296),U=56320|U&1023),P=q+String.fromCharCode(U)}}if(P){v(),p=x(),i=C-1,_+=C-w+1,s.push(P);const U=x();U.offset++,t.reference&&t.reference.call(t.referenceContext||void 0,P,{start:p,end:U},e.slice(w-1,C)),p=U}else j=e.slice(w-1,C),o+=j,_+=j.length,i=C-1}else m===10&&(h++,a++,_=0),Number.isNaN(m)?v():(o+=String.fromCharCode(m),_++);return s.join("");function x(){return{line:h,column:_,offset:i+((l?l.offset:0)||0)}}function k(b,w){let y;t.warning&&(y=x(),y.column+=w,y.offset+=w,t.warning.call(t.warningContext||void 0,Wxn[b],y,b))}function v(){o&&(s.push(o),t.text&&t.text.call(t.textContext||void 0,o,{start:p,end:x()}),o="")}}function Xxn(e){return e>=55296&&e<=57343||e>1114111}function Yxn(e){return e>=1&&e<=8||e===11||e>=13&&e<=31||e>=127&&e<=159||e>=64976&&e<=65007||(e&65535)===65535||(e&65535)===65534}var Zxn=0,e1={},zs={util:{type:function(e){return Object.prototype.toString.call(e).slice(8,-1)},objId:function(e){return e.__id||Object.defineProperty(e,"__id",{value:++Zxn}),e.__id},clone:function e(n,t){t=t||{};var r,s;switch(zs.util.type(n)){case"Object":if(s=zs.util.objId(n),t[s])return t[s];r={},t[s]=r;for(var i in n)n.hasOwnProperty(i)&&(r[i]=e(n[i],t));return r;case"Array":return s=zs.util.objId(n),t[s]?t[s]:(r=[],t[s]=r,n.forEach(function(a,o){r[o]=e(a,t)}),r);default:return n}}},languages:{plain:e1,plaintext:e1,text:e1,txt:e1,extend:function(e,n){var t=zs.util.clone(zs.languages[e]);for(var r in n)t[r]=n[r];return t},insertBefore:function(e,n,t,r){r=r||zs.languages;var s=r[e],i={};for(var a in s)if(s.hasOwnProperty(a)){if(a==n)for(var o in t)t.hasOwnProperty(o)&&(i[o]=t[o]);t.hasOwnProperty(a)||(i[a]=s[a])}var l=r[e];return r[e]=i,zs.languages.DFS(zs.languages,function(u,h){h===l&&u!=e&&(this[u]=i)}),i},DFS:function e(n,t,r,s){s=s||{};var i=zs.util.objId;for(var a in n)if(n.hasOwnProperty(a)){t.call(n,a,n[a],r||a);var o=n[a],l=zs.util.type(o);l==="Object"&&!s[i(o)]?(s[i(o)]=!0,e(o,t,null,s)):l==="Array"&&!s[i(o)]&&(s[i(o)]=!0,e(o,t,a,s))}}},plugins:{},highlight:function(e,n,t){var r={code:e,grammar:n,language:t};if(zs.hooks.run("before-tokenize",r),!r.grammar)throw new Error('The language "'+r.language+'" has no grammar.');return r.tokens=zs.tokenize(r.code,r.grammar),zs.hooks.run("after-tokenize",r),Jp.stringify(zs.util.encode(r.tokens),r.language)},tokenize:function(e,n){var t=n.rest;if(t){for(var r in t)n[r]=t[r];delete n.rest}var s=new Jxn;return q1(s,s.head,e),_$(e,s,n,s.head,0),t2n(s)},hooks:{all:{},add:function(e,n){var t=zs.hooks.all;t[e]=t[e]||[],t[e].push(n)},run:function(e,n){var t=zs.hooks.all[e];if(!(!t||!t.length))for(var r=0,s;s=t[r++];)s(n)}},Token:Jp};function Jp(e,n,t,r){this.type=e,this.content=n,this.alias=t,this.length=(r||"").length|0}function gj(e,n,t,r){e.lastIndex=n;var s=e.exec(t);if(s&&r&&s[1]){var i=s[1].length;s.index+=i,s[0]=s[0].slice(i)}return s}function _$(e,n,t,r,s,i){for(var a in t)if(!(!t.hasOwnProperty(a)||!t[a])){var o=t[a];o=Array.isArray(o)?o:[o];for(var l=0;l=i.reach);b+=v.value.length,v=v.next){var w=v.value;if(n.length>e.length)return;if(!(w instanceof Jp)){var y=1,C;if(p){if(C=gj(k,b,e,_),!C||C.index>=e.length)break;var j=C.index,N=C.index+C[0].length,E=b;for(E+=v.value.length;j>=E;)v=v.next,E+=v.value.length;if(E-=v.value.length,b=E,v.value instanceof Jp)continue;for(var T=v;T!==n.tail&&(Ei.reach&&(i.reach=P);var U=v.prev;D&&(U=q1(n,U,D),b+=D.length),e2n(n,U,y);var q=new Jp(a,h?zs.tokenize(M,h):M,m,M);if(v=q1(n,U,q),I&&q1(n,v,I),y>1){var W={cause:a+","+l,reach:P};_$(e,n,t,v.prev,b,W),i&&W.reach>i.reach&&(i.reach=W.reach)}}}}}}function Jxn(){var e={value:null,prev:null,next:null},n={value:null,prev:e,next:null};e.next=n,this.head=e,this.tail=n,this.length=0}function q1(e,n,t){var r=n.next,s={value:t,prev:n,next:r};return n.next=s,r.prev=s,e.length++,s}function e2n(e,n,t){for(var r=n.next,s=0;st)return null;try{return Mt.highlight(e,n).children}catch{return null}}function p$(e,n){var t;return e.type==="text"?e.value??"":e.type!=="element"?null:f.jsx("span",{className:(((t=e.properties)==null?void 0:t.className)??[]).join(" "),children:(e.children??[]).map(p$)},n)}function c2n(e,n,t=3e5){var r;return((r=h$(e,n,t))==null?void 0:r.map(p$))??e}function m$(e,n,t=3e5){const r=h$(e,n,t);if(!r)return e.split(` +|(?![\\s\\S])))+`,"m"),alias:i,inside:{line:{pattern:/(.)(?=[\s\S]).*(?:\r\n?|\n)?/,lookbehind:!0},prefix:{pattern:/[\s\S]/,alias:/\w+/.exec(r)[0]}}}}),Object.defineProperty(n.languages.diff,"PREFIXES",{value:t})})(e)}xS.displayName="go";xS.aliases=[];function xS(e){e.register(el),e.languages.go=e.languages.extend("clike",{string:{pattern:/(^|[^\\])"(?:\\.|[^"\\\r\n])*"|`[^`]*`/,lookbehind:!0,greedy:!0},keyword:/\b(?:break|case|chan|const|continue|default|defer|else|fallthrough|for|func|go(?:to)?|if|import|interface|map|package|range|return|select|struct|switch|type|var)\b/,boolean:/\b(?:_|false|iota|nil|true)\b/,number:[/\b0(?:b[01_]+|o[0-7_]+)i?\b/i,/\b0x(?:[a-f\d_]+(?:\.[a-f\d_]*)?|\.[a-f\d_]+)(?:p[+-]?\d+(?:_\d+)*)?i?(?!\w)/i,/(?:\b\d[\d_]*(?:\.[\d_]*)?|\B\.\d[\d_]*)(?:e[+-]?[\d_]+)?i?(?!\w)/i],operator:/[*\/%^!=]=?|\+[=+]?|-[=-]?|\|[=|]?|&(?:=|&|\^=?)?|>(?:>=?|=)?|<(?:<=?|=|-)?|:=|\.\.\./,builtin:/\b(?:append|bool|byte|cap|close|complex|complex(?:64|128)|copy|delete|error|float(?:32|64)|u?int(?:8|16|32|64)?|imag|len|make|new|panic|print(?:ln)?|real|recover|rune|string|uintptr)\b/}),e.languages.insertBefore("go","string",{char:{pattern:/'(?:\\.|[^'\\\r\n]){0,10}'/,greedy:!0}}),delete e.languages.go["class-name"]}wS.displayName="ini";wS.aliases=[];function wS(e){e.languages.ini={comment:{pattern:/(^[ \f\t\v]*)[#;][^\n\r]*/m,lookbehind:!0},section:{pattern:/(^[ \f\t\v]*)\[[^\n\r\]]*\]?/m,lookbehind:!0,inside:{"section-name":{pattern:/(^\[[ \f\t\v]*)[^ \f\t\v\]]+(?:[ \f\t\v]+[^ \f\t\v\]]+)*/,lookbehind:!0,alias:"selector"},punctuation:/\[|\]/}},key:{pattern:/(^[ \f\t\v]*)[^ \f\n\r\t\v=]+(?:[ \f\t\v]+[^ \f\n\r\t\v=]+)*(?=[ \f\t\v]*=)/m,lookbehind:!0,alias:"attr-name"},value:{pattern:/(=[ \f\t\v]*)[^ \f\n\r\t\v]+(?:[ \f\t\v]+[^ \f\n\r\t\v]+)*/,lookbehind:!0,alias:"attr-value",inside:{"inner-value":{pattern:/^("|').+(?=\1$)/,lookbehind:!0}}},punctuation:/=/}}kS.displayName="java";kS.aliases=[];function kS(e){e.register(el),(function(n){var t=/\b(?:abstract|assert|boolean|break|byte|case|catch|char|class|const|continue|default|do|double|else|enum|exports|extends|final|finally|float|for|goto|if|implements|import|instanceof|int|interface|long|module|native|new|non-sealed|null|open|opens|package|permits|private|protected|provides|public|record(?!\s*[(){}[\]<>=%~.:,;?+\-*/&|^])|requires|return|sealed|short|static|strictfp|super|switch|synchronized|this|throw|throws|to|transient|transitive|try|uses|var|void|volatile|while|with|yield)\b/,r=/(?:[a-z]\w*\s*\.\s*)*(?:[A-Z]\w*\s*\.\s*)*/.source,s={pattern:RegExp(/(^|[^\w.])/.source+r+/[A-Z](?:[\d_A-Z]*[a-z]\w*)?\b/.source),lookbehind:!0,inside:{namespace:{pattern:/^[a-z]\w*(?:\s*\.\s*[a-z]\w*)*(?:\s*\.)?/,inside:{punctuation:/\./}},punctuation:/\./}};n.languages.java=n.languages.extend("clike",{string:{pattern:/(^|[^\\])"(?:\\.|[^"\\\r\n])*"/,lookbehind:!0,greedy:!0},"class-name":[s,{pattern:RegExp(/(^|[^\w.])/.source+r+/[A-Z]\w*(?=\s+\w+\s*[;,=()]|\s*(?:\[[\s,]*\]\s*)?::\s*new\b)/.source),lookbehind:!0,inside:s.inside},{pattern:RegExp(/(\b(?:class|enum|extends|implements|instanceof|interface|new|record|throws)\s+)/.source+r+/[A-Z]\w*\b/.source),lookbehind:!0,inside:s.inside}],keyword:t,function:[n.languages.clike.function,{pattern:/(::\s*)[a-z_]\w*/,lookbehind:!0}],number:/\b0b[01][01_]*L?\b|\b0x(?:\.[\da-f_p+-]+|[\da-f_]+(?:\.[\da-f_p+-]+)?)\b|(?:\b\d[\d_]*(?:\.[\d_]*)?|\B\.\d[\d_]*)(?:e[+-]?\d[\d_]*)?[dfl]?/i,operator:{pattern:/(^|[^.])(?:<<=?|>>>?=?|->|--|\+\+|&&|\|\||::|[?:~]|[-+*/%&|^!=<>]=?)/m,lookbehind:!0},constant:/\b[A-Z][A-Z_\d]+\b/}),n.languages.insertBefore("java","string",{"triple-quoted-string":{pattern:/"""[ \t]*[\r\n](?:(?:"|"")?(?:\\.|[^"\\]))*"""/,greedy:!0,alias:"string"},char:{pattern:/'(?:\\.|[^'\\\r\n]){1,6}'/,greedy:!0}}),n.languages.insertBefore("java","class-name",{annotation:{pattern:/(^|[^.])@\w+(?:\s*\.\s*\w+)*/,lookbehind:!0,alias:"punctuation"},generics:{pattern:/<(?:[\w\s,.?]|&(?!&)|<(?:[\w\s,.?]|&(?!&)|<(?:[\w\s,.?]|&(?!&)|<(?:[\w\s,.?]|&(?!&))*>)*>)*>)*>/,inside:{"class-name":s,keyword:t,punctuation:/[<>(),.:]/,operator:/[?&|]/}},import:[{pattern:RegExp(/(\bimport\s+)/.source+r+/(?:[A-Z]\w*|\*)(?=\s*;)/.source),lookbehind:!0,inside:{namespace:s.inside.namespace,punctuation:/\./,operator:/\*/,"class-name":/\w+/}},{pattern:RegExp(/(\bimport\s+static\s+)/.source+r+/(?:\w+|\*)(?=\s*;)/.source),lookbehind:!0,alias:"static",inside:{namespace:s.inside.namespace,static:/\b\w+$/,punctuation:/\./,operator:/\*/,"class-name":/\w+/}}],namespace:{pattern:RegExp(/(\b(?:exports|import(?:\s+static)?|module|open|opens|package|provides|requires|to|transitive|uses|with)\s+)(?!)[a-z]\w*(?:\.[a-z]\w*)*\.?/.source.replace(//g,function(){return t.source})),lookbehind:!0,inside:{punctuation:/\./}}})})(e)}SS.displayName="regex";SS.aliases=[];function SS(e){(function(n){var t={pattern:/\\[\\(){}[\]^$+*?|.]/,alias:"escape"},r=/\\(?:x[\da-fA-F]{2}|u[\da-fA-F]{4}|u\{[\da-fA-F]+\}|0[0-7]{0,2}|[123][0-7]{2}|c[a-zA-Z]|.)/,s={pattern:/\.|\\[wsd]|\\p\{[^{}]+\}/i,alias:"class-name"},i={pattern:/\\[wsd]|\\p\{[^{}]+\}/i,alias:"class-name"},a="(?:[^\\\\-]|"+r.source+")",o=RegExp(a+"-"+a),l={pattern:/(<|')[^<>']+(?=[>']$)/,lookbehind:!0,alias:"variable"};n.languages.regex={"char-class":{pattern:/((?:^|[^\\])(?:\\\\)*)\[(?:[^\\\]]|\\[\s\S])*\]/,lookbehind:!0,inside:{"char-class-negation":{pattern:/(^\[)\^/,lookbehind:!0,alias:"operator"},"char-class-punctuation":{pattern:/^\[|\]$/,alias:"punctuation"},range:{pattern:o,inside:{escape:r,"range-punctuation":{pattern:/-/,alias:"operator"}}},"special-escape":t,"char-set":i,escape:r}},"special-escape":t,"char-set":s,backreference:[{pattern:/\\(?![123][0-7]{2})[1-9]/,alias:"keyword"},{pattern:/\\k<[^<>']+>/,alias:"keyword",inside:{"group-name":l}}],anchor:{pattern:/[$^]|\\[ABbGZz]/,alias:"function"},escape:r,group:[{pattern:/\((?:\?(?:<[^<>']+>|'[^<>']+'|[>:]||&&=?|\|\|=?|[!=]==|<<=?|>>>?=?|[-+*/%&|^!=<>]=?|\.{3}|\?\?=?|\?\.?|[~:]/}),e.languages.javascript["class-name"][0].pattern=/(\b(?:class|extends|implements|instanceof|interface|new)\s+)[\w.\\]+/,e.languages.insertBefore("javascript","keyword",{regex:{pattern:RegExp(/((?:^|[^$\w\xA0-\uFFFF."'\])\s]|\b(?:return|yield))\s*)/.source+/\//.source+"(?:"+/(?:\[(?:[^\]\\\r\n]|\\.)*\]|\\.|[^/\\\[\r\n])+\/[dgimyus]{0,7}/.source+"|"+/(?:\[(?:[^[\]\\\r\n]|\\.|\[(?:[^[\]\\\r\n]|\\.|\[(?:[^[\]\\\r\n]|\\.)*\])*\])*\]|\\.|[^/\\\[\r\n])+\/[dgimyus]{0,7}v[dgimyus]{0,7}/.source+")"+/(?=(?:\s|\/\*(?:[^*]|\*(?!\/))*\*\/)*(?:$|[\r\n,.;:})\]]|\/\/))/.source),lookbehind:!0,greedy:!0,inside:{"regex-source":{pattern:/^(\/)[\s\S]+(?=\/[a-z]*$)/,lookbehind:!0,alias:"language-regex",inside:e.languages.regex},"regex-delimiter":/^\/|\/$/,"regex-flags":/^[a-z]+$/}},"function-variable":{pattern:/#?(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\s*[=:]\s*(?:async\s*)?(?:\bfunction\b|(?:\((?:[^()]|\([^()]*\))*\)|(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*)\s*=>))/,alias:"function"},parameter:[{pattern:/(function(?:\s+(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*)?\s*\(\s*)(?!\s)(?:[^()\s]|\s+(?![\s)])|\([^()]*\))+(?=\s*\))/,lookbehind:!0,inside:e.languages.javascript},{pattern:/(^|[^$\w\xA0-\uFFFF])(?!\s)[_$a-z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\s*=>)/i,lookbehind:!0,inside:e.languages.javascript},{pattern:/(\(\s*)(?!\s)(?:[^()\s]|\s+(?![\s)])|\([^()]*\))+(?=\s*\)\s*=>)/,lookbehind:!0,inside:e.languages.javascript},{pattern:/((?:\b|\s|^)(?!(?:as|async|await|break|case|catch|class|const|continue|debugger|default|delete|do|else|enum|export|extends|finally|for|from|function|get|if|implements|import|in|instanceof|interface|let|new|null|of|package|private|protected|public|return|set|static|super|switch|this|throw|try|typeof|undefined|var|void|while|with|yield)(?![$\w\xA0-\uFFFF]))(?:(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*\s*)\(\s*|\]\s*\(\s*)(?!\s)(?:[^()\s]|\s+(?![\s)])|\([^()]*\))+(?=\s*\)\s*\{)/,lookbehind:!0,inside:e.languages.javascript}],constant:/\b[A-Z](?:[A-Z_]|\dx?)*\b/}),e.languages.insertBefore("javascript","string",{hashbang:{pattern:/^#!.*/,greedy:!0,alias:"comment"},"template-string":{pattern:/`(?:\\[\s\S]|\$\{(?:[^{}]|\{(?:[^{}]|\{[^}]*\})*\})+\}|(?!\$\{)[^\\`])*`/,greedy:!0,inside:{"template-punctuation":{pattern:/^`|`$/,alias:"string"},interpolation:{pattern:/((?:^|[^\\])(?:\\{2})*)\$\{(?:[^{}]|\{(?:[^{}]|\{[^}]*\})*\})+\}/,lookbehind:!0,inside:{"interpolation-punctuation":{pattern:/^\$\{|\}$/,alias:"punctuation"},rest:e.languages.javascript}},string:/[\s\S]+/}},"string-property":{pattern:/((?:^|[,{])[ \t]*)(["'])(?:\\(?:\r\n|[\s\S])|(?!\2)[^\\\r\n])*\2(?=\s*:)/m,lookbehind:!0,greedy:!0,alias:"property"}}),e.languages.insertBefore("javascript","operator",{"literal-property":{pattern:/((?:^|[,{])[ \t]*)(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\s*:)/m,lookbehind:!0,alias:"property"}}),e.languages.markup&&(e.languages.markup.tag.addInlined("script","javascript"),e.languages.markup.tag.addAttribute(/on(?:abort|blur|change|click|composition(?:end|start|update)|dblclick|error|focus(?:in|out)?|key(?:down|up)|load|mouse(?:down|enter|leave|move|out|over|up)|reset|resize|scroll|select|slotchange|submit|unload|wheel)/.source,"javascript")),e.languages.js=e.languages.javascript}CS.displayName="json";CS.aliases=["webmanifest"];function CS(e){e.languages.json={property:{pattern:/(^|[^\\])"(?:\\.|[^\\"\r\n])*"(?=\s*:)/,lookbehind:!0,greedy:!0},string:{pattern:/(^|[^\\])"(?:\\.|[^\\"\r\n])*"(?!\s*:)/,lookbehind:!0,greedy:!0},comment:{pattern:/\/\/.*|\/\*[\s\S]*?(?:\*\/|$)/,greedy:!0},number:/-?\b\d+(?:\.\d+)?(?:e[+-]?\d+)?\b/i,punctuation:/[{}[\],]/,operator:/:/,boolean:/\b(?:false|true)\b/,null:{pattern:/\bnull\b/,alias:"keyword"}},e.languages.webmanifest=e.languages.json}ES.displayName="kotlin";ES.aliases=["kt","kts"];function ES(e){e.register(el),(function(n){n.languages.kotlin=n.languages.extend("clike",{keyword:{pattern:/(^|[^.])\b(?:abstract|actual|annotation|as|break|by|catch|class|companion|const|constructor|continue|crossinline|data|do|dynamic|else|enum|expect|external|final|finally|for|fun|get|if|import|in|infix|init|inline|inner|interface|internal|is|lateinit|noinline|null|object|open|operator|out|override|package|private|protected|public|reified|return|sealed|set|super|suspend|tailrec|this|throw|to|try|typealias|val|var|vararg|when|where|while)\b/,lookbehind:!0},function:[{pattern:/(?:`[^\r\n`]+`|\b\w+)(?=\s*\()/,greedy:!0},{pattern:/(\.)(?:`[^\r\n`]+`|\w+)(?=\s*\{)/,lookbehind:!0,greedy:!0}],number:/\b(?:0[xX][\da-fA-F]+(?:_[\da-fA-F]+)*|0[bB][01]+(?:_[01]+)*|\d+(?:_\d+)*(?:\.\d+(?:_\d+)*)?(?:[eE][+-]?\d+(?:_\d+)*)?[fFL]?)\b/,operator:/\+[+=]?|-[-=>]?|==?=?|!(?:!|==?)?|[\/*%<>]=?|[?:]:?|\.\.|&&|\|\||\b(?:and|inv|or|shl|shr|ushr|xor)\b/}),delete n.languages.kotlin["class-name"];var t={"interpolation-punctuation":{pattern:/^\$\{?|\}$/,alias:"punctuation"},expression:{pattern:/[\s\S]+/,inside:n.languages.kotlin}};n.languages.insertBefore("kotlin","string",{"string-literal":[{pattern:/"""(?:[^$]|\$(?:(?!\{)|\{[^{}]*\}))*?"""/,alias:"multiline",inside:{interpolation:{pattern:/\$(?:[a-z_]\w*|\{[^{}]*\})/i,inside:t},string:/[\s\S]+/}},{pattern:/"(?:[^"\\\r\n$]|\\.|\$(?:(?!\{)|\{[^{}]*\}))*"/,alias:"singleline",inside:{interpolation:{pattern:/((?:^|[^\\])(?:\\{2})*)\$(?:[a-z_]\w*|\{[^{}]*\})/i,lookbehind:!0,inside:t},string:/[\s\S]+/}}],char:{pattern:/'(?:[^'\\\r\n]|\\(?:.|u[a-fA-F0-9]{0,4}))'/,greedy:!0}}),delete n.languages.kotlin.string,n.languages.insertBefore("kotlin","keyword",{annotation:{pattern:/\B@(?:\w+:)?(?:[A-Z]\w*|\[[^\]]+\])/,alias:"builtin"}}),n.languages.insertBefore("kotlin","function",{label:{pattern:/\b\w+@|@\w+\b/,alias:"symbol"}}),n.languages.kt=n.languages.kotlin,n.languages.kts=n.languages.kotlin})(e)}NS.displayName="less";NS.aliases=[];function NS(e){e.register(wh),e.languages.less=e.languages.extend("css",{comment:[/\/\*[\s\S]*?\*\//,{pattern:/(^|[^\\])\/\/.*/,lookbehind:!0}],atrule:{pattern:/@[\w-](?:\((?:[^(){}]|\([^(){}]*\))*\)|[^(){};\s]|\s+(?!\s))*?(?=\s*\{)/,inside:{punctuation:/[:()]/}},selector:{pattern:/(?:@\{[\w-]+\}|[^{};\s@])(?:@\{[\w-]+\}|\((?:[^(){}]|\([^(){}]*\))*\)|[^(){};@\s]|\s+(?!\s))*?(?=\s*\{)/,inside:{variable:/@+[\w-]+/}},property:/(?:@\{[\w-]+\}|[\w-])+(?:\+_?)?(?=\s*:)/,operator:/[+\-*\/]/}),e.languages.insertBefore("less","property",{variable:[{pattern:/@[\w-]+\s*:/,inside:{punctuation:/:/}},/@@?[\w-]+/],"mixin-usage":{pattern:/([{;]\s*)[.#](?!\d)[\w-].*?(?=[(;])/,lookbehind:!0,alias:"function"}})}zS.displayName="lua";zS.aliases=[];function zS(e){e.languages.lua={comment:/^#!.+|--(?:\[(=*)\[[\s\S]*?\]\1\]|.*)/m,string:{pattern:/(["'])(?:(?!\1)[^\\\r\n]|\\z(?:\r\n|\s)|\\(?:\r\n|[^z]))*\1|\[(=*)\[[\s\S]*?\]\2\]/,greedy:!0},number:/\b0x[a-f\d]+(?:\.[a-f\d]*)?(?:p[+-]?\d+)?\b|\b\d+(?:\.\B|(?:\.\d*)?(?:e[+-]?\d+)?\b)|\B\.\d+(?:e[+-]?\d+)?\b/i,keyword:/\b(?:and|break|do|else|elseif|end|false|for|function|goto|if|in|local|nil|not|or|repeat|return|then|true|until|while)\b/,function:/(?!\d)\w+(?=\s*(?:[({]))/,operator:[/[-+*%^&|#]|\/\/?|<[<=]?|>[>=]?|[=~]=?/,{pattern:/(^|[^.])\.\.(?!\.)/,lookbehind:!0}],punctuation:/[\[\](){},;]|\.+|:+/}}jS.displayName="makefile";jS.aliases=[];function jS(e){e.languages.makefile={comment:{pattern:/(^|[^\\])#(?:\\(?:\r\n|[\s\S])|[^\\\r\n])*/,lookbehind:!0},string:{pattern:/(["'])(?:\\(?:\r\n|[\s\S])|(?!\1)[^\\\r\n])*\1/,greedy:!0},"builtin-target":{pattern:/\.[A-Z][^:#=\s]+(?=\s*:(?!=))/,alias:"builtin"},target:{pattern:/^(?:[^:=\s]|[ \t]+(?![\s:]))+(?=\s*:(?!=))/m,alias:"symbol",inside:{variable:/\$+(?:(?!\$)[^(){}:#=\s]+|(?=[({]))/}},variable:/\$+(?:(?!\$)[^(){}:#=\s]+|\([@*%<^+?][DF]\)|(?=[({]))/,keyword:/-include\b|\b(?:define|else|endef|endif|export|ifn?def|ifn?eq|include|override|private|sinclude|undefine|unexport|vpath)\b/,function:{pattern:/(\()(?:abspath|addsuffix|and|basename|call|dir|error|eval|file|filter(?:-out)?|findstring|firstword|flavor|foreach|guile|if|info|join|lastword|load|notdir|or|origin|patsubst|realpath|shell|sort|strip|subst|suffix|value|warning|wildcard|word(?:list|s)?)(?=[ \t])/,lookbehind:!0},operator:/(?:::|[?:+!])?=|[|@]/,punctuation:/[:;(){}]/}}TS.displayName="yaml";TS.aliases=["yml"];function TS(e){(function(n){var t=/[*&][^\s[\]{},]+/,r=/!(?:<[\w\-%#;/?:@&=+$,.!~*'()[\]]+>|(?:[a-zA-Z\d-]*!)?[\w\-%#;/?:@&=+$.~*'()]+)?/,s="(?:"+r.source+"(?:[ ]+"+t.source+")?|"+t.source+"(?:[ ]+"+r.source+")?)",i=/(?:[^\s\x00-\x08\x0e-\x1f!"#%&'*,\-:>?@[\]`{|}\x7f-\x84\x86-\x9f\ud800-\udfff\ufffe\uffff]|[?:-])(?:[ \t]*(?:(?![#:])|:))*/.source.replace(//g,function(){return/[^\s\x00-\x08\x0e-\x1f,[\]{}\x7f-\x84\x86-\x9f\ud800-\udfff\ufffe\uffff]/.source}),a=/"(?:[^"\\\r\n]|\\.)*"|'(?:[^'\\\r\n]|\\.)*'/.source;function o(l,u){u=(u||"").replace(/m/g,"")+"m";var h=/([:\-,[{]\s*(?:\s<>[ \t]+)?)(?:<>)(?=[ \t]*(?:$|,|\]|\}|(?:[\r\n]\s*)?#))/.source.replace(/<>/g,function(){return s}).replace(/<>/g,function(){return l});return RegExp(h,u)}n.languages.yaml={scalar:{pattern:RegExp(/([\-:]\s*(?:\s<>[ \t]+)?[|>])[ \t]*(?:((?:\r?\n|\r)[ \t]+)\S[^\r\n]*(?:\2[^\r\n]+)*)/.source.replace(/<>/g,function(){return s})),lookbehind:!0,alias:"string"},comment:/#.*/,key:{pattern:RegExp(/((?:^|[:\-,[{\r\n?])[ \t]*(?:<>[ \t]+)?)<>(?=\s*:\s)/.source.replace(/<>/g,function(){return s}).replace(/<>/g,function(){return"(?:"+i+"|"+a+")"})),lookbehind:!0,greedy:!0,alias:"atrule"},directive:{pattern:/(^[ \t]*)%.+/m,lookbehind:!0,alias:"important"},datetime:{pattern:o(/\d{4}-\d\d?-\d\d?(?:[tT]|[ \t]+)\d\d?:\d{2}:\d{2}(?:\.\d*)?(?:[ \t]*(?:Z|[-+]\d\d?(?::\d{2})?))?|\d{4}-\d{2}-\d{2}|\d\d?:\d{2}(?::\d{2}(?:\.\d*)?)?/.source),lookbehind:!0,alias:"number"},boolean:{pattern:o(/false|true/.source,"i"),lookbehind:!0,alias:"important"},null:{pattern:o(/null|~/.source,"i"),lookbehind:!0,alias:"important"},string:{pattern:o(a),lookbehind:!0,greedy:!0},number:{pattern:o(/[+-]?(?:0x[\da-f]+|0o[0-7]+|(?:\d+(?:\.\d*)?|\.\d+)(?:e[+-]?\d+)?|\.inf|\.nan)/.source,"i"),lookbehind:!0},tag:r,important:t,punctuation:/---|[:[\]{}\-,|>?]|\.\.\./},n.languages.yml=n.languages.yaml})(e)}AS.displayName="markdown";AS.aliases=["md"];function AS(e){e.register(mm),(function(n){var t=/(?:\\.|[^\\\n\r]|(?:\n|\r\n?)(?![\r\n]))/.source;function r(o){return o=o.replace(//g,function(){return t}),RegExp(/((?:^|[^\\])(?:\\{2})*)/.source+"(?:"+o+")")}var s=/(?:\\.|``(?:[^`\r\n]|`(?!`))+``|`[^`\r\n]+`|[^\\|\r\n`])+/.source,i=/\|?__(?:\|__)+\|?(?:(?:\n|\r\n?)|(?![\s\S]))/.source.replace(/__/g,function(){return s}),a=/\|?[ \t]*:?-{3,}:?[ \t]*(?:\|[ \t]*:?-{3,}:?[ \t]*)+\|?(?:\n|\r\n?)/.source;n.languages.markdown=n.languages.extend("markup",{}),n.languages.insertBefore("markdown","prolog",{"front-matter-block":{pattern:/(^(?:\s*[\r\n])?)---(?!.)[\s\S]*?[\r\n]---(?!.)/,lookbehind:!0,greedy:!0,inside:{punctuation:/^---|---$/,"front-matter":{pattern:/\S+(?:\s+\S+)*/,alias:["yaml","language-yaml"],inside:n.languages.yaml}}},blockquote:{pattern:/^>(?:[\t ]*>)*/m,alias:"punctuation"},table:{pattern:RegExp("^"+i+a+"(?:"+i+")*","m"),inside:{"table-data-rows":{pattern:RegExp("^("+i+a+")(?:"+i+")*$"),lookbehind:!0,inside:{"table-data":{pattern:RegExp(s),inside:n.languages.markdown},punctuation:/\|/}},"table-line":{pattern:RegExp("^("+i+")"+a+"$"),lookbehind:!0,inside:{punctuation:/\||:?-{3,}:?/}},"table-header-row":{pattern:RegExp("^"+i+"$"),inside:{"table-header":{pattern:RegExp(s),alias:"important",inside:n.languages.markdown},punctuation:/\|/}}}},code:[{pattern:/((?:^|\n)[ \t]*\n|(?:^|\r\n?)[ \t]*\r\n?)(?: {4}|\t).+(?:(?:\n|\r\n?)(?: {4}|\t).+)*/,lookbehind:!0,alias:"keyword"},{pattern:/^```[\s\S]*?^```$/m,greedy:!0,inside:{"code-block":{pattern:/^(```.*(?:\n|\r\n?))[\s\S]+?(?=(?:\n|\r\n?)^```$)/m,lookbehind:!0},"code-language":{pattern:/^(```).+/,lookbehind:!0},punctuation:/```/}}],title:[{pattern:/\S.*(?:\n|\r\n?)(?:==+|--+)(?=[ \t]*$)/m,alias:"important",inside:{punctuation:/==+$|--+$/}},{pattern:/(^\s*)#.+/m,lookbehind:!0,alias:"important",inside:{punctuation:/^#+|#+$/}}],hr:{pattern:/(^\s*)([*-])(?:[\t ]*\2){2,}(?=\s*$)/m,lookbehind:!0,alias:"punctuation"},list:{pattern:/(^\s*)(?:[*+-]|\d+\.)(?=[\t ].)/m,lookbehind:!0,alias:"punctuation"},"url-reference":{pattern:/!?\[[^\]]+\]:[\t ]+(?:\S+|<(?:\\.|[^>\\])+>)(?:[\t ]+(?:"(?:\\.|[^"\\])*"|'(?:\\.|[^'\\])*'|\((?:\\.|[^)\\])*\)))?/,inside:{variable:{pattern:/^(!?\[)[^\]]+/,lookbehind:!0},string:/(?:"(?:\\.|[^"\\])*"|'(?:\\.|[^'\\])*'|\((?:\\.|[^)\\])*\))$/,punctuation:/^[\[\]!:]|[<>]/},alias:"url"},bold:{pattern:r(/\b__(?:(?!_)|_(?:(?!_))+_)+__\b|\*\*(?:(?!\*)|\*(?:(?!\*))+\*)+\*\*/.source),lookbehind:!0,greedy:!0,inside:{content:{pattern:/(^..)[\s\S]+(?=..$)/,lookbehind:!0,inside:{}},punctuation:/\*\*|__/}},italic:{pattern:r(/\b_(?:(?!_)|__(?:(?!_))+__)+_\b|\*(?:(?!\*)|\*\*(?:(?!\*))+\*\*)+\*/.source),lookbehind:!0,greedy:!0,inside:{content:{pattern:/(^.)[\s\S]+(?=.$)/,lookbehind:!0,inside:{}},punctuation:/[*_]/}},strike:{pattern:r(/(~~?)(?:(?!~))+\2/.source),lookbehind:!0,greedy:!0,inside:{content:{pattern:/(^~~?)[\s\S]+(?=\1$)/,lookbehind:!0,inside:{}},punctuation:/~~?/}},"code-snippet":{pattern:/(^|[^\\`])(?:``[^`\r\n]+(?:`[^`\r\n]+)*``(?!`)|`[^`\r\n]+`(?!`))/,lookbehind:!0,greedy:!0,alias:["code","keyword"]},url:{pattern:r(/!?\[(?:(?!\]))+\](?:\([^\s)]+(?:[\t ]+"(?:\\.|[^"\\])*")?\)|[ \t]?\[(?:(?!\]))+\])/.source),lookbehind:!0,greedy:!0,inside:{operator:/^!/,content:{pattern:/(^\[)[^\]]+(?=\])/,lookbehind:!0,inside:{}},variable:{pattern:/(^\][ \t]?\[)[^\]]+(?=\]$)/,lookbehind:!0},url:{pattern:/(^\]\()[^\s)]+/,lookbehind:!0},string:{pattern:/(^[ \t]+)"(?:\\.|[^"\\])*"(?=\)$)/,lookbehind:!0}}}}),["url","bold","italic","strike"].forEach(function(o){["url","bold","italic","strike","code-snippet"].forEach(function(l){o!==l&&(n.languages.markdown[o].inside.content.inside[l]=n.languages.markdown[l])})}),n.hooks.add("after-tokenize",function(o){if(o.language!=="markdown"&&o.language!=="md")return;function l(u){if(!(!u||typeof u=="string"))for(var h=0,_=u.length;h<_;h++){var p=u[h];if(p.type!=="code"){l(p.content);continue}var m=p.content[1],x=p.content[3];if(m&&x&&m.type==="code-language"&&x.type==="code-block"&&typeof m.content=="string"){var k=m.content.replace(/\b#/g,"sharp").replace(/\b\+\+/g,"pp");k=(/[a-z][\w-]*/i.exec(k)||[""])[0].toLowerCase();var v="language-"+k;x.alias?typeof x.alias=="string"?x.alias=[x.alias,v]:x.alias.push(v):x.alias=[v]}}}l(o.tokens)}),n.hooks.add("wrap",function(o){if(o.type==="code-block"){for(var l="",u=0,h=o.classes.length;u]?|\+\+?|!=?|<>?=?|==?|&&?|\|\|?|[~^%?*\/@]/}),delete e.languages.objectivec["class-name"],e.languages.objc=e.languages.objectivec}MS.displayName="perl";MS.aliases=[];function MS(e){(function(n){var t=/(?:\((?:[^()\\]|\\[\s\S])*\)|\{(?:[^{}\\]|\\[\s\S])*\}|\[(?:[^[\]\\]|\\[\s\S])*\]|<(?:[^<>\\]|\\[\s\S])*>)/.source;n.languages.perl={comment:[{pattern:/(^\s*)=\w[\s\S]*?=cut.*/m,lookbehind:!0,greedy:!0},{pattern:/(^|[^\\$])#.*/,lookbehind:!0,greedy:!0}],string:[{pattern:RegExp(/\b(?:q|qq|qw|qx)(?![a-zA-Z0-9])\s*/.source+"(?:"+[/([^a-zA-Z0-9\s{(\[<])(?:(?!\1)[^\\]|\\[\s\S])*\1/.source,/([a-zA-Z0-9])(?:(?!\2)[^\\]|\\[\s\S])*\2/.source,t].join("|")+")"),greedy:!0},{pattern:/("|`)(?:(?!\1)[^\\]|\\[\s\S])*\1/,greedy:!0},{pattern:/'(?:[^'\\\r\n]|\\.)*'/,greedy:!0}],regex:[{pattern:RegExp(/\b(?:m|qr)(?![a-zA-Z0-9])\s*/.source+"(?:"+[/([^a-zA-Z0-9\s{(\[<])(?:(?!\1)[^\\]|\\[\s\S])*\1/.source,/([a-zA-Z0-9])(?:(?!\2)[^\\]|\\[\s\S])*\2/.source,t].join("|")+")"+/[msixpodualngc]*/.source),greedy:!0},{pattern:RegExp(/(^|[^-])\b(?:s|tr|y)(?![a-zA-Z0-9])\s*/.source+"(?:"+[/([^a-zA-Z0-9\s{(\[<])(?:(?!\2)[^\\]|\\[\s\S])*\2(?:(?!\2)[^\\]|\\[\s\S])*\2/.source,/([a-zA-Z0-9])(?:(?!\3)[^\\]|\\[\s\S])*\3(?:(?!\3)[^\\]|\\[\s\S])*\3/.source,t+/\s*/.source+t].join("|")+")"+/[msixpodualngcer]*/.source),lookbehind:!0,greedy:!0},{pattern:/\/(?:[^\/\\\r\n]|\\.)*\/[msixpodualngc]*(?=\s*(?:$|[\r\n,.;})&|\-+*~<>!?^]|(?:and|cmp|eq|ge|gt|le|lt|ne|not|or|x|xor)\b))/,greedy:!0}],variable:[/[&*$@%]\{\^[A-Z]+\}/,/[&*$@%]\^[A-Z_]/,/[&*$@%]#?(?=\{)/,/[&*$@%]#?(?:(?:::)*'?(?!\d)[\w$]+(?![\w$]))+(?:::)*/,/[&*$@%]\d+/,/(?!%=)[$@%][!"#$%&'()*+,\-.\/:;<=>?@[\\\]^_`{|}~]/],filehandle:{pattern:/<(?![<=])\S*?>|\b_\b/,alias:"symbol"},"v-string":{pattern:/v\d+(?:\.\d+)*|\d+(?:\.\d+){2,}/,alias:"string"},function:{pattern:/(\bsub[ \t]+)\w+/,lookbehind:!0},keyword:/\b(?:any|break|continue|default|delete|die|do|else|elsif|eval|for|foreach|given|goto|if|last|local|my|next|our|package|print|redo|require|return|say|state|sub|switch|undef|unless|until|use|when|while)\b/,number:/\b(?:0x[\dA-Fa-f](?:_?[\dA-Fa-f])*|0b[01](?:_?[01])*|(?:(?:\d(?:_?\d)*)?\.)?\d(?:_?\d)*(?:[Ee][+-]?\d+)?)\b/,operator:/-[rwxoRWXOezsfdlpSbctugkTBMAC]\b|\+[+=]?|-[-=>]?|\*\*?=?|\/\/?=?|=[=~>]?|~[~=]?|\|\|?=?|&&?=?|<(?:=>?|<=?)?|>>?=?|![~=]?|[%^]=?|\.(?:=|\.\.?)?|[\\?]|\bx(?:=|\b)|\b(?:and|cmp|eq|ge|gt|le|lt|ne|not|or|xor)\b/,punctuation:/[{}[\];(),:]/}})(e)}Db.displayName="markup-templating";Db.aliases=[];function Db(e){e.register(mm),(function(n){function t(r,s){return"___"+r.toUpperCase()+s+"___"}Object.defineProperties(n.languages["markup-templating"]={},{buildPlaceholders:{value:function(r,s,i,a){if(r.language===s){var o=r.tokenStack=[];r.code=r.code.replace(i,function(l){if(typeof a=="function"&&!a(l))return l;for(var u=o.length,h;r.code.indexOf(h=t(s,u))!==-1;)++u;return o[u]=l,h}),r.grammar=n.languages.markup}}},tokenizePlaceholders:{value:function(r,s){if(r.language!==s||!r.tokenStack)return;r.grammar=n.languages[s];var i=0,a=Object.keys(r.tokenStack);function o(l){for(var u=0;u=a.length);u++){var h=l[u];if(typeof h=="string"||h.content&&typeof h.content=="string"){var _=a[i],p=r.tokenStack[_],m=typeof h=="string"?h:h.content,x=t(s,_),k=m.indexOf(x);if(k>-1){++i;var v=m.substring(0,k),b=new n.Token(s,n.tokenize(p,r.grammar),"language-"+s,p),w=m.substring(k+x.length),y=[];v&&y.push.apply(y,o([v])),y.push(b),w&&y.push.apply(y,o([w])),typeof h=="string"?l.splice.apply(l,[u,1].concat(y)):h.content=y}}else h.content&&o(h.content)}return l}o(r.tokens)}}})})(e)}OS.displayName="php";OS.aliases=[];function OS(e){e.register(Db),(function(n){var t=/\/\*[\s\S]*?\*\/|\/\/.*|#(?!\[).*/,r=[{pattern:/\b(?:false|true)\b/i,alias:"boolean"},{pattern:/(::\s*)\b[a-z_]\w*\b(?!\s*\()/i,greedy:!0,lookbehind:!0},{pattern:/(\b(?:case|const)\s+)\b[a-z_]\w*(?=\s*[;=])/i,greedy:!0,lookbehind:!0},/\b(?:null)\b/i,/\b[A-Z_][A-Z0-9_]*\b(?!\s*\()/],s=/\b0b[01]+(?:_[01]+)*\b|\b0o[0-7]+(?:_[0-7]+)*\b|\b0x[\da-f]+(?:_[\da-f]+)*\b|(?:\b\d+(?:_\d+)*\.?(?:\d+(?:_\d+)*)?|\B\.\d+)(?:e[+-]?\d+)?/i,i=/|\?\?=?|\.{3}|\??->|[!=]=?=?|::|\*\*=?|--|\+\+|&&|\|\||<<|>>|[?~]|[/^|%*&<>.+-]=?/,a=/[{}\[\](),:;]/;n.languages.php={delimiter:{pattern:/\?>$|^<\?(?:php(?=\s)|=)?/i,alias:"important"},comment:t,variable:/\$+(?:\w+\b|(?=\{))/,package:{pattern:/(namespace\s+|use\s+(?:function\s+)?)(?:\\?\b[a-z_]\w*)+\b(?!\\)/i,lookbehind:!0,inside:{punctuation:/\\/}},"class-name-definition":{pattern:/(\b(?:class|enum|interface|trait)\s+)\b[a-z_]\w*(?!\\)\b/i,lookbehind:!0,alias:"class-name"},"function-definition":{pattern:/(\bfunction\s+)[a-z_]\w*(?=\s*\()/i,lookbehind:!0,alias:"function"},keyword:[{pattern:/(\(\s*)\b(?:array|bool|boolean|float|int|integer|object|string)\b(?=\s*\))/i,alias:"type-casting",greedy:!0,lookbehind:!0},{pattern:/([(,?]\s*)\b(?:array(?!\s*\()|bool|callable|(?:false|null)(?=\s*\|)|float|int|iterable|mixed|object|self|static|string)\b(?=\s*\$)/i,alias:"type-hint",greedy:!0,lookbehind:!0},{pattern:/(\)\s*:\s*(?:\?\s*)?)\b(?:array(?!\s*\()|bool|callable|(?:false|null)(?=\s*\|)|float|int|iterable|mixed|never|object|self|static|string|void)\b/i,alias:"return-type",greedy:!0,lookbehind:!0},{pattern:/\b(?:array(?!\s*\()|bool|float|int|iterable|mixed|object|string|void)\b/i,alias:"type-declaration",greedy:!0},{pattern:/(\|\s*)(?:false|null)\b|\b(?:false|null)(?=\s*\|)/i,alias:"type-declaration",greedy:!0,lookbehind:!0},{pattern:/\b(?:parent|self|static)(?=\s*::)/i,alias:"static-context",greedy:!0},{pattern:/(\byield\s+)from\b/i,lookbehind:!0},/\bclass\b/i,{pattern:/((?:^|[^\s>:]|(?:^|[^-])>|(?:^|[^:]):)\s*)\b(?:abstract|and|array|as|break|callable|case|catch|clone|const|continue|declare|default|die|do|echo|else|elseif|empty|enddeclare|endfor|endforeach|endif|endswitch|endwhile|enum|eval|exit|extends|final|finally|fn|for|foreach|function|global|goto|if|implements|include|include_once|instanceof|insteadof|interface|isset|list|match|namespace|never|new|or|parent|print|private|protected|public|readonly|require|require_once|return|self|static|switch|throw|trait|try|unset|use|var|while|xor|yield|__halt_compiler)\b/i,lookbehind:!0}],"argument-name":{pattern:/([(,]\s*)\b[a-z_]\w*(?=\s*:(?!:))/i,lookbehind:!0},"class-name":[{pattern:/(\b(?:extends|implements|instanceof|new(?!\s+self|\s+static))\s+|\bcatch\s*\()\b[a-z_]\w*(?!\\)\b/i,greedy:!0,lookbehind:!0},{pattern:/(\|\s*)\b[a-z_]\w*(?!\\)\b/i,greedy:!0,lookbehind:!0},{pattern:/\b[a-z_]\w*(?!\\)\b(?=\s*\|)/i,greedy:!0},{pattern:/(\|\s*)(?:\\?\b[a-z_]\w*)+\b/i,alias:"class-name-fully-qualified",greedy:!0,lookbehind:!0,inside:{punctuation:/\\/}},{pattern:/(?:\\?\b[a-z_]\w*)+\b(?=\s*\|)/i,alias:"class-name-fully-qualified",greedy:!0,inside:{punctuation:/\\/}},{pattern:/(\b(?:extends|implements|instanceof|new(?!\s+self\b|\s+static\b))\s+|\bcatch\s*\()(?:\\?\b[a-z_]\w*)+\b(?!\\)/i,alias:"class-name-fully-qualified",greedy:!0,lookbehind:!0,inside:{punctuation:/\\/}},{pattern:/\b[a-z_]\w*(?=\s*\$)/i,alias:"type-declaration",greedy:!0},{pattern:/(?:\\?\b[a-z_]\w*)+(?=\s*\$)/i,alias:["class-name-fully-qualified","type-declaration"],greedy:!0,inside:{punctuation:/\\/}},{pattern:/\b[a-z_]\w*(?=\s*::)/i,alias:"static-context",greedy:!0},{pattern:/(?:\\?\b[a-z_]\w*)+(?=\s*::)/i,alias:["class-name-fully-qualified","static-context"],greedy:!0,inside:{punctuation:/\\/}},{pattern:/([(,?]\s*)[a-z_]\w*(?=\s*\$)/i,alias:"type-hint",greedy:!0,lookbehind:!0},{pattern:/([(,?]\s*)(?:\\?\b[a-z_]\w*)+(?=\s*\$)/i,alias:["class-name-fully-qualified","type-hint"],greedy:!0,lookbehind:!0,inside:{punctuation:/\\/}},{pattern:/(\)\s*:\s*(?:\?\s*)?)\b[a-z_]\w*(?!\\)\b/i,alias:"return-type",greedy:!0,lookbehind:!0},{pattern:/(\)\s*:\s*(?:\?\s*)?)(?:\\?\b[a-z_]\w*)+\b(?!\\)/i,alias:["class-name-fully-qualified","return-type"],greedy:!0,lookbehind:!0,inside:{punctuation:/\\/}}],constant:r,function:{pattern:/(^|[^\\\w])\\?[a-z_](?:[\w\\]*\w)?(?=\s*\()/i,lookbehind:!0,inside:{punctuation:/\\/}},property:{pattern:/(->\s*)\w+/,lookbehind:!0},number:s,operator:i,punctuation:a};var o={pattern:/\{\$(?:\{(?:\{[^{}]+\}|[^{}]+)\}|[^{}])+\}|(^|[^\\{])\$+(?:\w+(?:\[[^\r\n\[\]]+\]|->\w+)?)/,lookbehind:!0,inside:n.languages.php},l=[{pattern:/<<<'([^']+)'[\r\n](?:.*[\r\n])*?\1;/,alias:"nowdoc-string",greedy:!0,inside:{delimiter:{pattern:/^<<<'[^']+'|[a-z_]\w*;$/i,alias:"symbol",inside:{punctuation:/^<<<'?|[';]$/}}}},{pattern:/<<<(?:"([^"]+)"[\r\n](?:.*[\r\n])*?\1;|([a-z_]\w*)[\r\n](?:.*[\r\n])*?\2;)/i,alias:"heredoc-string",greedy:!0,inside:{delimiter:{pattern:/^<<<(?:"[^"]+"|[a-z_]\w*)|[a-z_]\w*;$/i,alias:"symbol",inside:{punctuation:/^<<<"?|[";]$/}},interpolation:o}},{pattern:/`(?:\\[\s\S]|[^\\`])*`/,alias:"backtick-quoted-string",greedy:!0},{pattern:/'(?:\\[\s\S]|[^\\'])*'/,alias:"single-quoted-string",greedy:!0},{pattern:/"(?:\\[\s\S]|[^\\"])*"/,alias:"double-quoted-string",greedy:!0,inside:{interpolation:o}}];n.languages.insertBefore("php","variable",{string:l,attribute:{pattern:/#\[(?:[^"'\/#]|\/(?![*/])|\/\/.*$|#(?!\[).*$|\/\*(?:[^*]|\*(?!\/))*\*\/|"(?:\\[\s\S]|[^\\"])*"|'(?:\\[\s\S]|[^\\'])*')+\](?=\s*[a-z$#])/im,greedy:!0,inside:{"attribute-content":{pattern:/^(#\[)[\s\S]+(?=\]$)/,lookbehind:!0,inside:{comment:t,string:l,"attribute-class-name":[{pattern:/([^:]|^)\b[a-z_]\w*(?!\\)\b/i,alias:"class-name",greedy:!0,lookbehind:!0},{pattern:/([^:]|^)(?:\\?\b[a-z_]\w*)+/i,alias:["class-name","class-name-fully-qualified"],greedy:!0,lookbehind:!0,inside:{punctuation:/\\/}}],constant:r,number:s,operator:i,punctuation:a}},delimiter:{pattern:/^#\[|\]$/,alias:"punctuation"}}}}),n.hooks.add("before-tokenize",function(u){if(/<\?/.test(u.code)){var h=/<\?(?:[^"'/#]|\/(?![*/])|("|')(?:\\[\s\S]|(?!\1)[^\\])*\1|(?:\/\/|#(?!\[))(?:[^?\n\r]|\?(?!>))*(?=$|\?>|[\r\n])|#\[|\/\*(?:[^*]|\*(?!\/))*(?:\*\/|$))*?(?:\?>|$)/g;n.languages["markup-templating"].buildPlaceholders(u,"php",h)}}),n.hooks.add("after-tokenize",function(u){n.languages["markup-templating"].tokenizePlaceholders(u,"php")})})(e)}DS.displayName="python";DS.aliases=["py"];function DS(e){e.languages.python={comment:{pattern:/(^|[^\\])#.*/,lookbehind:!0,greedy:!0},"string-interpolation":{pattern:/(?:f|fr|rf)(?:("""|''')[\s\S]*?\1|("|')(?:\\.|(?!\2)[^\\\r\n])*\2)/i,greedy:!0,inside:{interpolation:{pattern:/((?:^|[^{])(?:\{\{)*)\{(?!\{)(?:[^{}]|\{(?!\{)(?:[^{}]|\{(?!\{)(?:[^{}])+\})+\})+\}/,lookbehind:!0,inside:{"format-spec":{pattern:/(:)[^:(){}]+(?=\}$)/,lookbehind:!0},"conversion-option":{pattern:/![sra](?=[:}]$)/,alias:"punctuation"},rest:null}},string:/[\s\S]+/}},"triple-quoted-string":{pattern:/(?:[rub]|br|rb)?("""|''')[\s\S]*?\1/i,greedy:!0,alias:"string"},string:{pattern:/(?:[rub]|br|rb)?("|')(?:\\.|(?!\1)[^\\\r\n])*\1/i,greedy:!0},function:{pattern:/((?:^|\s)def[ \t]+)[a-zA-Z_]\w*(?=\s*\()/g,lookbehind:!0},"class-name":{pattern:/(\bclass\s+)\w+/i,lookbehind:!0},decorator:{pattern:/(^[\t ]*)@\w+(?:\.\w+)*/m,lookbehind:!0,alias:["annotation","punctuation"],inside:{punctuation:/\./}},keyword:/\b(?:_(?=\s*:)|and|as|assert|async|await|break|case|class|continue|def|del|elif|else|except|exec|finally|for|from|global|if|import|in|is|lambda|match|nonlocal|not|or|pass|print|raise|return|try|while|with|yield)\b/,builtin:/\b(?:__import__|abs|all|any|apply|ascii|basestring|bin|bool|buffer|bytearray|bytes|callable|chr|classmethod|cmp|coerce|compile|complex|delattr|dict|dir|divmod|enumerate|eval|execfile|file|filter|float|format|frozenset|getattr|globals|hasattr|hash|help|hex|id|input|int|intern|isinstance|issubclass|iter|len|list|locals|long|map|max|memoryview|min|next|object|oct|open|ord|pow|property|range|raw_input|reduce|reload|repr|reversed|round|set|setattr|slice|sorted|staticmethod|str|sum|super|tuple|type|unichr|unicode|vars|xrange|zip)\b/,boolean:/\b(?:False|None|True)\b/,number:/\b0(?:b(?:_?[01])+|o(?:_?[0-7])+|x(?:_?[a-f0-9])+)\b|(?:\b\d+(?:_\d+)*(?:\.(?:\d+(?:_\d+)*)?)?|\B\.\d+(?:_\d+)*)(?:e[+-]?\d+(?:_\d+)*)?j?(?!\w)/i,operator:/[-+%=]=?|!=|:=|\*\*?=?|\/\/?=?|<[<=>]?|>[=>]?|[&|^~]/,punctuation:/[{}[\];(),.:]/},e.languages.python["string-interpolation"].inside.interpolation.inside.rest=e.languages.python,e.languages.py=e.languages.python}LS.displayName="r";LS.aliases=[];function LS(e){e.languages.r={comment:/#.*/,string:{pattern:/(['"])(?:\\.|(?!\1)[^\\\r\n])*\1/,greedy:!0},"percent-operator":{pattern:/%[^%\s]*%/,alias:"operator"},boolean:/\b(?:FALSE|TRUE)\b/,ellipsis:/\.\.(?:\.|\d+)/,number:[/\b(?:Inf|NaN)\b/,/(?:\b0x[\dA-Fa-f]+(?:\.\d*)?|\b\d+(?:\.\d*)?|\B\.\d+)(?:[EePp][+-]?\d+)?[iL]?/],keyword:/\b(?:NA|NA_character_|NA_complex_|NA_integer_|NA_real_|NULL|break|else|for|function|if|in|next|repeat|while)\b/,operator:/->?>?|<(?:=|=!]=?|::?|&&?|\|\|?|[+*\/^$@~]/,punctuation:/[(){}\[\],;]/}}IS.displayName="ruby";IS.aliases=["rb"];function IS(e){e.register(el),(function(n){n.languages.ruby=n.languages.extend("clike",{comment:{pattern:/#.*|^=begin\s[\s\S]*?^=end/m,greedy:!0},"class-name":{pattern:/(\b(?:class|module)\s+|\bcatch\s+\()[\w.\\]+|\b[A-Z_]\w*(?=\s*\.\s*new\b)/,lookbehind:!0,inside:{punctuation:/[.\\]/}},keyword:/\b(?:BEGIN|END|alias|and|begin|break|case|class|def|define_method|defined|do|each|else|elsif|end|ensure|extend|for|if|in|include|module|new|next|nil|not|or|prepend|private|protected|public|raise|redo|require|rescue|retry|return|self|super|then|throw|undef|unless|until|when|while|yield)\b/,operator:/\.{2,3}|&\.|===||[!=]?~|(?:&&|\|\||<<|>>|\*\*|[+\-*/%<>!^&|=])=?|[?:]/,punctuation:/[(){}[\].,;]/}),n.languages.insertBefore("ruby","operator",{"double-colon":{pattern:/::/,alias:"punctuation"}});var t={pattern:/((?:^|[^\\])(?:\\{2})*)#\{(?:[^{}]|\{[^{}]*\})*\}/,lookbehind:!0,inside:{content:{pattern:/^(#\{)[\s\S]+(?=\}$)/,lookbehind:!0,inside:n.languages.ruby},delimiter:{pattern:/^#\{|\}$/,alias:"punctuation"}}};delete n.languages.ruby.function;var r="(?:"+[/([^a-zA-Z0-9\s{(\[<=])(?:(?!\1)[^\\]|\\[\s\S])*\1/.source,/\((?:[^()\\]|\\[\s\S]|\((?:[^()\\]|\\[\s\S])*\))*\)/.source,/\{(?:[^{}\\]|\\[\s\S]|\{(?:[^{}\\]|\\[\s\S])*\})*\}/.source,/\[(?:[^\[\]\\]|\\[\s\S]|\[(?:[^\[\]\\]|\\[\s\S])*\])*\]/.source,/<(?:[^<>\\]|\\[\s\S]|<(?:[^<>\\]|\\[\s\S])*>)*>/.source].join("|")+")",s=/(?:"(?:\\.|[^"\\\r\n])*"|(?:\b[a-zA-Z_]\w*|[^\s\0-\x7F]+)[?!]?|\$.)/.source;n.languages.insertBefore("ruby","keyword",{"regex-literal":[{pattern:RegExp(/%r/.source+r+/[egimnosux]{0,6}/.source),greedy:!0,inside:{interpolation:t,regex:/[\s\S]+/}},{pattern:/(^|[^/])\/(?!\/)(?:\[[^\r\n\]]+\]|\\.|[^[/\\\r\n])+\/[egimnosux]{0,6}(?=\s*(?:$|[\r\n,.;})#]))/,lookbehind:!0,greedy:!0,inside:{interpolation:t,regex:/[\s\S]+/}}],variable:/[@$]+[a-zA-Z_]\w*(?:[?!]|\b)/,symbol:[{pattern:RegExp(/(^|[^:]):/.source+s),lookbehind:!0,greedy:!0},{pattern:RegExp(/([\r\n{(,][ \t]*)/.source+s+/(?=:(?!:))/.source),lookbehind:!0,greedy:!0}],"method-definition":{pattern:/(\bdef\s+)\w+(?:\s*\.\s*\w+)?/,lookbehind:!0,inside:{function:/\b\w+$/,keyword:/^self\b/,"class-name":/^\w+/,punctuation:/\./}}}),n.languages.insertBefore("ruby","string",{"string-literal":[{pattern:RegExp(/%[qQiIwWs]?/.source+r),greedy:!0,inside:{interpolation:t,string:/[\s\S]+/}},{pattern:/("|')(?:#\{[^}]+\}|#(?!\{)|\\(?:\r\n|[\s\S])|(?!\1)[^\\#\r\n])*\1/,greedy:!0,inside:{interpolation:t,string:/[\s\S]+/}},{pattern:/<<[-~]?([a-z_]\w*)[\r\n](?:.*[\r\n])*?[\t ]*\1/i,alias:"heredoc-string",greedy:!0,inside:{delimiter:{pattern:/^<<[-~]?[a-z_]\w*|\b[a-z_]\w*$/i,inside:{symbol:/\b\w+/,punctuation:/^<<[-~]?/}},interpolation:t,string:/[\s\S]+/}},{pattern:/<<[-~]?'([a-z_]\w*)'[\r\n](?:.*[\r\n])*?[\t ]*\1/i,alias:"heredoc-string",greedy:!0,inside:{delimiter:{pattern:/^<<[-~]?'[a-z_]\w*'|\b[a-z_]\w*$/i,inside:{symbol:/\b\w+/,punctuation:/^<<[-~]?'|'$/}},string:/[\s\S]+/}}],"command-literal":[{pattern:RegExp(/%x/.source+r),greedy:!0,inside:{interpolation:t,command:{pattern:/[\s\S]+/,alias:"string"}}},{pattern:/`(?:#\{[^}]+\}|#(?!\{)|\\(?:\r\n|[\s\S])|[^\\`#\r\n])*`/,greedy:!0,inside:{interpolation:t,command:{pattern:/[\s\S]+/,alias:"string"}}}]}),delete n.languages.ruby.string,n.languages.insertBefore("ruby","number",{builtin:/\b(?:Array|Bignum|Binding|Class|Continuation|Dir|Exception|FalseClass|File|Fixnum|Float|Hash|IO|Integer|MatchData|Method|Module|NilClass|Numeric|Object|Proc|Range|Regexp|Stat|String|Struct|Symbol|TMS|Thread|ThreadGroup|Time|TrueClass)\b/,constant:/\b[A-Z][A-Z0-9_]*(?:[?!]|\b)/}),n.languages.rb=n.languages.ruby})(e)}$S.displayName="rust";$S.aliases=[];function $S(e){(function(n){for(var t=/\/\*(?:[^*/]|\*(?!\/)|\/(?!\*)|)*\*\//.source,r=0;r<2;r++)t=t.replace(//g,function(){return t});t=t.replace(//g,function(){return/[^\s\S]/.source}),n.languages.rust={comment:[{pattern:RegExp(/(^|[^\\])/.source+t),lookbehind:!0,greedy:!0},{pattern:/(^|[^\\:])\/\/.*/,lookbehind:!0,greedy:!0}],string:{pattern:/b?"(?:\\[\s\S]|[^\\"])*"|b?r(#*)"(?:[^"]|"(?!\1))*"\1/,greedy:!0},char:{pattern:/b?'(?:\\(?:x[0-7][\da-fA-F]|u\{(?:[\da-fA-F]_*){1,6}\}|.)|[^\\\r\n\t'])'/,greedy:!0},attribute:{pattern:/#!?\[(?:[^\[\]"]|"(?:\\[\s\S]|[^\\"])*")*\]/,greedy:!0,alias:"attr-name",inside:{string:null}},"closure-params":{pattern:/([=(,:]\s*|\bmove\s*)\|[^|]*\||\|[^|]*\|(?=\s*(?:\{|->))/,lookbehind:!0,greedy:!0,inside:{"closure-punctuation":{pattern:/^\||\|$/,alias:"punctuation"},rest:null}},"lifetime-annotation":{pattern:/'\w+/,alias:"symbol"},"fragment-specifier":{pattern:/(\$\w+:)[a-z]+/,lookbehind:!0,alias:"punctuation"},variable:/\$\w+/,"function-definition":{pattern:/(\bfn\s+)\w+/,lookbehind:!0,alias:"function"},"type-definition":{pattern:/(\b(?:enum|struct|trait|type|union)\s+)\w+/,lookbehind:!0,alias:"class-name"},"module-declaration":[{pattern:/(\b(?:crate|mod)\s+)[a-z][a-z_\d]*/,lookbehind:!0,alias:"namespace"},{pattern:/(\b(?:crate|self|super)\s*)::\s*[a-z][a-z_\d]*\b(?:\s*::(?:\s*[a-z][a-z_\d]*\s*::)*)?/,lookbehind:!0,alias:"namespace",inside:{punctuation:/::/}}],keyword:[/\b(?:Self|abstract|as|async|await|become|box|break|const|continue|crate|do|dyn|else|enum|extern|final|fn|for|if|impl|in|let|loop|macro|match|mod|move|mut|override|priv|pub|ref|return|self|static|struct|super|trait|try|type|typeof|union|unsafe|unsized|use|virtual|where|while|yield)\b/,/\b(?:bool|char|f(?:32|64)|[ui](?:8|16|32|64|128|size)|str)\b/],function:/\b[a-z_]\w*(?=\s*(?:::\s*<|\())/,macro:{pattern:/\b\w+!/,alias:"property"},constant:/\b[A-Z_][A-Z_\d]+\b/,"class-name":/\b[A-Z]\w*\b/,namespace:{pattern:/(?:\b[a-z][a-z_\d]*\s*::\s*)*\b[a-z][a-z_\d]*\s*::(?!\s*<)/,inside:{punctuation:/::/}},number:/\b(?:0x[\dA-Fa-f](?:_?[\dA-Fa-f])*|0o[0-7](?:_?[0-7])*|0b[01](?:_?[01])*|(?:(?:\d(?:_?\d)*)?\.)?\d(?:_?\d)*(?:[Ee][+-]?\d+)?)(?:_?(?:f32|f64|[iu](?:8|16|32|64|size)?))?\b/,boolean:/\b(?:false|true)\b/,punctuation:/->|\.\.=|\.{1,3}|::|[{}[\];(),:]/,operator:/[-+*\/%!^]=?|=[=>]?|&[&=]?|\|[|=]?|<>?=?|[@?]/},n.languages.rust["closure-params"].inside.rest=n.languages.rust,n.languages.rust.attribute.inside.string=n.languages.rust.string})(e)}BS.displayName="sass";BS.aliases=[];function BS(e){e.register(wh),(function(n){n.languages.sass=n.languages.extend("css",{comment:{pattern:/^([ \t]*)\/[\/*].*(?:(?:\r?\n|\r)\1[ \t].+)*/m,lookbehind:!0,greedy:!0}}),n.languages.insertBefore("sass","atrule",{"atrule-line":{pattern:/^(?:[ \t]*)[@+=].+/m,greedy:!0,inside:{atrule:/(?:@[\w-]+|[+=])/}}}),delete n.languages.sass.atrule;var t=/\$[-\w]+|#\{\$[-\w]+\}/,r=[/[+*\/%]|[=!]=|<=?|>=?|\b(?:and|not|or)\b/,{pattern:/(\s)-(?=\s)/,lookbehind:!0}];n.languages.insertBefore("sass","property",{"variable-line":{pattern:/^[ \t]*\$.+/m,greedy:!0,inside:{punctuation:/:/,variable:t,operator:r}},"property-line":{pattern:/^[ \t]*(?:[^:\s]+ *:.*|:[^:\s].*)/m,greedy:!0,inside:{property:[/[^:\s]+(?=\s*:)/,{pattern:/(:)[^:\s]+/,lookbehind:!0}],punctuation:/:/,variable:t,operator:r,important:n.languages.sass.important}}}),delete n.languages.sass.property,delete n.languages.sass.important,n.languages.insertBefore("sass","punctuation",{selector:{pattern:/^([ \t]*)\S(?:,[^,\r\n]+|[^,\r\n]*)(?:,[^,\r\n]+)*(?:,(?:\r?\n|\r)\1[ \t]+\S(?:,[^,\r\n]+|[^,\r\n]*)(?:,[^,\r\n]+)*)*/m,lookbehind:!0,greedy:!0}})})(e)}PS.displayName="scss";PS.aliases=[];function PS(e){e.register(wh),e.languages.scss=e.languages.extend("css",{comment:{pattern:/(^|[^\\])(?:\/\*[\s\S]*?\*\/|\/\/.*)/,lookbehind:!0},atrule:{pattern:/@[\w-](?:\([^()]+\)|[^()\s]|\s+(?!\s))*?(?=\s+[{;])/,inside:{rule:/@[\w-]+/}},url:/(?:[-a-z]+-)?url(?=\()/i,selector:{pattern:/(?=\S)[^@;{}()]?(?:[^@;{}()\s]|\s+(?!\s)|#\{\$[-\w]+\})+(?=\s*\{(?:\}|\s|[^}][^:{}]*[:{][^}]))/,inside:{parent:{pattern:/&/,alias:"important"},placeholder:/%[-\w]+/,variable:/\$[-\w]+|#\{\$[-\w]+\}/}},property:{pattern:/(?:[-\w]|\$[-\w]|#\{\$[-\w]+\})+(?=\s*:)/,inside:{variable:/\$[-\w]+|#\{\$[-\w]+\}/}}}),e.languages.insertBefore("scss","atrule",{keyword:[/@(?:content|debug|each|else(?: if)?|extend|for|forward|function|if|import|include|mixin|return|use|warn|while)\b/i,{pattern:/( )(?:from|through)(?= )/,lookbehind:!0}]}),e.languages.insertBefore("scss","important",{variable:/\$[-\w]+|#\{\$[-\w]+\}/}),e.languages.insertBefore("scss","function",{"module-modifier":{pattern:/\b(?:as|hide|show|with)\b/i,alias:"keyword"},placeholder:{pattern:/%[-\w]+/,alias:"selector"},statement:{pattern:/\B!(?:default|optional)\b/i,alias:"keyword"},boolean:/\b(?:false|true)\b/,null:{pattern:/\bnull\b/,alias:"keyword"},operator:{pattern:/(\s)(?:[-+*\/%]|[=!]=|<=?|>=?|and|not|or)(?=\s)/,lookbehind:!0}}),e.languages.scss.atrule.inside.rest=e.languages.scss}FS.displayName="sql";FS.aliases=[];function FS(e){e.languages.sql={comment:{pattern:/(^|[^\\])(?:\/\*[\s\S]*?\*\/|(?:--|\/\/|#).*)/,lookbehind:!0},variable:[{pattern:/@(["'`])(?:\\[\s\S]|(?!\1)[^\\])+\1/,greedy:!0},/@[\w.$]+/],string:{pattern:/(^|[^@\\])("|')(?:\\[\s\S]|(?!\2)[^\\]|\2\2)*\2/,greedy:!0,lookbehind:!0},identifier:{pattern:/(^|[^@\\])`(?:\\[\s\S]|[^`\\]|``)*`/,greedy:!0,lookbehind:!0,inside:{punctuation:/^`|`$/}},function:/\b(?:AVG|COUNT|FIRST|FORMAT|LAST|LCASE|LEN|MAX|MID|MIN|MOD|NOW|ROUND|SUM|UCASE)(?=\s*\()/i,keyword:/\b(?:ACTION|ADD|AFTER|ALGORITHM|ALL|ALTER|ANALYZE|ANY|APPLY|AS|ASC|AUTHORIZATION|AUTO_INCREMENT|BACKUP|BDB|BEGIN|BERKELEYDB|BIGINT|BINARY|BIT|BLOB|BOOL|BOOLEAN|BREAK|BROWSE|BTREE|BULK|BY|CALL|CASCADED?|CASE|CHAIN|CHAR(?:ACTER|SET)?|CHECK(?:POINT)?|CLOSE|CLUSTERED|COALESCE|COLLATE|COLUMNS?|COMMENT|COMMIT(?:TED)?|COMPUTE|CONNECT|CONSISTENT|CONSTRAINT|CONTAINS(?:TABLE)?|CONTINUE|CONVERT|CREATE|CROSS|CURRENT(?:_DATE|_TIME|_TIMESTAMP|_USER)?|CURSOR|CYCLE|DATA(?:BASES?)?|DATE(?:TIME)?|DAY|DBCC|DEALLOCATE|DEC|DECIMAL|DECLARE|DEFAULT|DEFINER|DELAYED|DELETE|DELIMITERS?|DENY|DESC|DESCRIBE|DETERMINISTIC|DISABLE|DISCARD|DISK|DISTINCT|DISTINCTROW|DISTRIBUTED|DO|DOUBLE|DROP|DUMMY|DUMP(?:FILE)?|DUPLICATE|ELSE(?:IF)?|ENABLE|ENCLOSED|END|ENGINE|ENUM|ERRLVL|ERRORS|ESCAPED?|EXCEPT|EXEC(?:UTE)?|EXISTS|EXIT|EXPLAIN|EXTENDED|FETCH|FIELDS|FILE|FILLFACTOR|FIRST|FIXED|FLOAT|FOLLOWING|FOR(?: EACH ROW)?|FORCE|FOREIGN|FREETEXT(?:TABLE)?|FROM|FULL|FUNCTION|GEOMETRY(?:COLLECTION)?|GLOBAL|GOTO|GRANT|GROUP|HANDLER|HASH|HAVING|HOLDLOCK|HOUR|IDENTITY(?:COL|_INSERT)?|IF|IGNORE|IMPORT|INDEX|INFILE|INNER|INNODB|INOUT|INSERT|INT|INTEGER|INTERSECT|INTERVAL|INTO|INVOKER|ISOLATION|ITERATE|JOIN|KEYS?|KILL|LANGUAGE|LAST|LEAVE|LEFT|LEVEL|LIMIT|LINENO|LINES|LINESTRING|LOAD|LOCAL|LOCK|LONG(?:BLOB|TEXT)|LOOP|MATCH(?:ED)?|MEDIUM(?:BLOB|INT|TEXT)|MERGE|MIDDLEINT|MINUTE|MODE|MODIFIES|MODIFY|MONTH|MULTI(?:LINESTRING|POINT|POLYGON)|NATIONAL|NATURAL|NCHAR|NEXT|NO|NONCLUSTERED|NULLIF|NUMERIC|OFF?|OFFSETS?|ON|OPEN(?:DATASOURCE|QUERY|ROWSET)?|OPTIMIZE|OPTION(?:ALLY)?|ORDER|OUT(?:ER|FILE)?|OVER|PARTIAL|PARTITION|PERCENT|PIVOT|PLAN|POINT|POLYGON|PRECEDING|PRECISION|PREPARE|PREV|PRIMARY|PRINT|PRIVILEGES|PROC(?:EDURE)?|PUBLIC|PURGE|QUICK|RAISERROR|READS?|REAL|RECONFIGURE|REFERENCES|RELEASE|RENAME|REPEAT(?:ABLE)?|REPLACE|REPLICATION|REQUIRE|RESIGNAL|RESTORE|RESTRICT|RETURN(?:ING|S)?|REVOKE|RIGHT|ROLLBACK|ROUTINE|ROW(?:COUNT|GUIDCOL|S)?|RTREE|RULE|SAVE(?:POINT)?|SCHEMA|SECOND|SELECT|SERIAL(?:IZABLE)?|SESSION(?:_USER)?|SET(?:USER)?|SHARE|SHOW|SHUTDOWN|SIMPLE|SMALLINT|SNAPSHOT|SOME|SONAME|SQL|START(?:ING)?|STATISTICS|STATUS|STRIPED|SYSTEM_USER|TABLES?|TABLESPACE|TEMP(?:ORARY|TABLE)?|TERMINATED|TEXT(?:SIZE)?|THEN|TIME(?:STAMP)?|TINY(?:BLOB|INT|TEXT)|TOP?|TRAN(?:SACTIONS?)?|TRIGGER|TRUNCATE|TSEQUAL|TYPES?|UNBOUNDED|UNCOMMITTED|UNDEFINED|UNION|UNIQUE|UNLOCK|UNPIVOT|UNSIGNED|UPDATE(?:TEXT)?|USAGE|USE|USER|USING|VALUES?|VAR(?:BINARY|CHAR|CHARACTER|YING)|VIEW|WAITFOR|WARNINGS|WHEN|WHERE|WHILE|WITH(?: ROLLUP|IN)?|WORK|WRITE(?:TEXT)?|YEAR)\b/i,boolean:/\b(?:FALSE|NULL|TRUE)\b/i,number:/\b0x[\da-f]+\b|\b\d+(?:\.\d*)?|\B\.\d+\b/i,operator:/[-+*\/=%^~]|&&?|\|\|?|!=?|<(?:=>?|<|>)?|>[>=]?|\b(?:AND|BETWEEN|DIV|ILIKE|IN|IS|LIKE|NOT|OR|REGEXP|RLIKE|SOUNDS LIKE|XOR)\b/i,punctuation:/[;[\]()`,.]/}}HS.displayName="swift";HS.aliases=[];function HS(e){e.languages.swift={comment:{pattern:/(^|[^\\:])(?:\/\/.*|\/\*(?:[^/*]|\/(?!\*)|\*(?!\/)|\/\*(?:[^*]|\*(?!\/))*\*\/)*\*\/)/,lookbehind:!0,greedy:!0},"string-literal":[{pattern:RegExp(/(^|[^"#])/.source+"(?:"+/"(?:\\(?:\((?:[^()]|\([^()]*\))*\)|\r\n|[^(])|[^\\\r\n"])*"/.source+"|"+/"""(?:\\(?:\((?:[^()]|\([^()]*\))*\)|[^(])|[^\\"]|"(?!""))*"""/.source+")"+/(?!["#])/.source),lookbehind:!0,greedy:!0,inside:{interpolation:{pattern:/(\\\()(?:[^()]|\([^()]*\))*(?=\))/,lookbehind:!0,inside:null},"interpolation-punctuation":{pattern:/^\)|\\\($/,alias:"punctuation"},punctuation:/\\(?=[\r\n])/,string:/[\s\S]+/}},{pattern:RegExp(/(^|[^"#])(#+)/.source+"(?:"+/"(?:\\(?:#+\((?:[^()]|\([^()]*\))*\)|\r\n|[^#])|[^\\\r\n])*?"/.source+"|"+/"""(?:\\(?:#+\((?:[^()]|\([^()]*\))*\)|[^#])|[^\\])*?"""/.source+")\\2"),lookbehind:!0,greedy:!0,inside:{interpolation:{pattern:/(\\#+\()(?:[^()]|\([^()]*\))*(?=\))/,lookbehind:!0,inside:null},"interpolation-punctuation":{pattern:/^\)|\\#+\($/,alias:"punctuation"},string:/[\s\S]+/}}],directive:{pattern:RegExp(/#/.source+"(?:"+(/(?:elseif|if)\b/.source+"(?:[ ]*"+/(?:![ \t]*)?(?:\b\w+\b(?:[ \t]*\((?:[^()]|\([^()]*\))*\))?|\((?:[^()]|\([^()]*\))*\))(?:[ \t]*(?:&&|\|\|))?/.source+")+")+"|"+/(?:else|endif)\b/.source+")"),alias:"property",inside:{"directive-name":/^#\w+/,boolean:/\b(?:false|true)\b/,number:/\b\d+(?:\.\d+)*\b/,operator:/!|&&|\|\||[<>]=?/,punctuation:/[(),]/}},literal:{pattern:/#(?:colorLiteral|column|dsohandle|file(?:ID|Literal|Path)?|function|imageLiteral|line)\b/,alias:"constant"},"other-directive":{pattern:/#\w+\b/,alias:"property"},attribute:{pattern:/@\w+/,alias:"atrule"},"function-definition":{pattern:/(\bfunc\s+)\w+/,lookbehind:!0,alias:"function"},label:{pattern:/\b(break|continue)\s+\w+|\b[a-zA-Z_]\w*(?=\s*:\s*(?:for|repeat|while)\b)/,lookbehind:!0,alias:"important"},keyword:/\b(?:Any|Protocol|Self|Type|actor|as|assignment|associatedtype|associativity|async|await|break|case|catch|class|continue|convenience|default|defer|deinit|didSet|do|dynamic|else|enum|extension|fallthrough|fileprivate|final|for|func|get|guard|higherThan|if|import|in|indirect|infix|init|inout|internal|is|isolated|lazy|left|let|lowerThan|mutating|none|nonisolated|nonmutating|open|operator|optional|override|postfix|precedencegroup|prefix|private|protocol|public|repeat|required|rethrows|return|right|safe|self|set|some|static|struct|subscript|super|switch|throw|throws|try|typealias|unowned|unsafe|var|weak|where|while|willSet)\b/,boolean:/\b(?:false|true)\b/,nil:{pattern:/\bnil\b/,alias:"constant"},"short-argument":/\$\d+\b/,omit:{pattern:/\b_\b/,alias:"keyword"},number:/\b(?:[\d_]+(?:\.[\de_]+)?|0x[a-f0-9_]+(?:\.[a-f0-9p_]+)?|0b[01_]+|0o[0-7_]+)\b/i,"class-name":/\b[A-Z](?:[A-Z_\d]*[a-z]\w*)?\b/,function:/\b[a-z_]\w*(?=\s*\()/i,constant:/\b(?:[A-Z_]{2,}|k[A-Z][A-Za-z_]+)\b/,operator:/[-+*/%=!<>&|^~?]+|\.[.\-+*/%=!<>&|^~?]+/,punctuation:/[{}[\]();,.:\\]/},e.languages.swift["string-literal"].forEach(function(n){n.inside.interpolation.inside=e.languages.swift})}qS.displayName="typescript";qS.aliases=["ts"];function qS(e){e.register(Ob),(function(n){n.languages.typescript=n.languages.extend("javascript",{"class-name":{pattern:/(\b(?:class|extends|implements|instanceof|interface|new|type)\s+)(?!keyof\b)(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?:\s*<(?:[^<>]|<(?:[^<>]|<[^<>]*>)*>)*>)?/,lookbehind:!0,greedy:!0,inside:null},builtin:/\b(?:Array|Function|Promise|any|boolean|console|never|number|string|symbol|unknown)\b/}),n.languages.typescript.keyword.push(/\b(?:abstract|declare|is|keyof|readonly|require)\b/,/\b(?:asserts|infer|interface|module|namespace|type)\b(?=\s*(?:[{_$a-zA-Z\xA0-\uFFFF]|$))/,/\btype\b(?=\s*(?:[\{*]|$))/),delete n.languages.typescript.parameter,delete n.languages.typescript["literal-property"];var t=n.languages.extend("typescript",{});delete t["class-name"],n.languages.typescript["class-name"].inside=t,n.languages.insertBefore("typescript","function",{decorator:{pattern:/@[$\w\xA0-\uFFFF]+/,inside:{at:{pattern:/^@/,alias:"operator"},function:/^[\s\S]+/}},"generic-function":{pattern:/#?(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*\s*<(?:[^<>]|<(?:[^<>]|<[^<>]*>)*>)*>(?=\s*\()/,greedy:!0,inside:{function:/^#?(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*/,generic:{pattern:/<[\s\S]+/,alias:"class-name",inside:t}}}}),n.languages.ts=n.languages.typescript})(e)}Lb.displayName="basic";Lb.aliases=[];function Lb(e){e.languages.basic={comment:{pattern:/(?:!|REM\b).+/i,inside:{keyword:/^REM/i}},string:{pattern:/"(?:""|[!#$%&'()*,\/:;<=>?^\w +\-.])*"/,greedy:!0},number:/(?:\b\d+(?:\.\d*)?|\B\.\d+)(?:E[+-]?\d+)?/i,keyword:/\b(?:AS|BEEP|BLOAD|BSAVE|CALL(?: ABSOLUTE)?|CASE|CHAIN|CHDIR|CLEAR|CLOSE|CLS|COM|COMMON|CONST|DATA|DECLARE|DEF(?: FN| SEG|DBL|INT|LNG|SNG|STR)|DIM|DO|DOUBLE|ELSE|ELSEIF|END|ENVIRON|ERASE|ERROR|EXIT|FIELD|FILES|FOR|FUNCTION|GET|GOSUB|GOTO|IF|INPUT|INTEGER|IOCTL|KEY|KILL|LINE INPUT|LOCATE|LOCK|LONG|LOOP|LSET|MKDIR|NAME|NEXT|OFF|ON(?: COM| ERROR| KEY| TIMER)?|OPEN|OPTION BASE|OUT|POKE|PUT|READ|REDIM|REM|RESTORE|RESUME|RETURN|RMDIR|RSET|RUN|SELECT CASE|SHARED|SHELL|SINGLE|SLEEP|STATIC|STEP|STOP|STRING|SUB|SWAP|SYSTEM|THEN|TIMER|TO|TROFF|TRON|TYPE|UNLOCK|UNTIL|USING|VIEW PRINT|WAIT|WEND|WHILE|WRITE)(?:\$|\b)/i,function:/\b(?:ABS|ACCESS|ACOS|ANGLE|AREA|ARITHMETIC|ARRAY|ASIN|ASK|AT|ATN|BASE|BEGIN|BREAK|CAUSE|CEIL|CHR|CLIP|COLLATE|COLOR|CON|COS|COSH|COT|CSC|DATE|DATUM|DEBUG|DECIMAL|DEF|DEG|DEGREES|DELETE|DET|DEVICE|DISPLAY|DOT|ELAPSED|EPS|ERASABLE|EXLINE|EXP|EXTERNAL|EXTYPE|FILETYPE|FIXED|FP|GO|GRAPH|HANDLER|IDN|IMAGE|IN|INT|INTERNAL|IP|IS|KEYED|LBOUND|LCASE|LEFT|LEN|LENGTH|LET|LINE|LINES|LOG|LOG10|LOG2|LTRIM|MARGIN|MAT|MAX|MAXNUM|MID|MIN|MISSING|MOD|NATIVE|NUL|NUMERIC|OF|OPTION|ORD|ORGANIZATION|OUTIN|OUTPUT|PI|POINT|POINTER|POINTS|POS|PRINT|PROGRAM|PROMPT|RAD|RADIANS|RANDOMIZE|RECORD|RECSIZE|RECTYPE|RELATIVE|REMAINDER|REPEAT|REST|RETRY|REWRITE|RIGHT|RND|ROUND|RTRIM|SAME|SEC|SELECT|SEQUENTIAL|SET|SETTER|SGN|SIN|SINH|SIZE|SKIP|SQR|STANDARD|STATUS|STR|STREAM|STYLE|TAB|TAN|TANH|TEMPLATE|TEXT|THERE|TIME|TIMEOUT|TRACE|TRANSFORM|TRUNCATE|UBOUND|UCASE|USE|VAL|VARIABLE|VIEWPORT|WHEN|WINDOW|WITH|ZER|ZONEWIDTH)(?:\$|\b)/i,operator:/<[=>]?|>=?|[+\-*\/^=&]|\b(?:AND|EQV|IMP|NOT|OR|XOR)\b/i,punctuation:/[,;:()]/}}US.displayName="vbnet";US.aliases=[];function US(e){e.register(Lb),e.languages.vbnet=e.languages.extend("basic",{comment:[{pattern:/(?:!|REM\b).+/i,inside:{keyword:/^REM/i}},{pattern:/(^|[^\\:])'.*/,lookbehind:!0,greedy:!0}],string:{pattern:/(^|[^"])"(?:""|[^"])*"(?!")/,lookbehind:!0,greedy:!0},keyword:/(?:\b(?:ADDHANDLER|ADDRESSOF|ALIAS|AND|ANDALSO|AS|BEEP|BLOAD|BOOLEAN|BSAVE|BYREF|BYTE|BYVAL|CALL(?: ABSOLUTE)?|CASE|CATCH|CBOOL|CBYTE|CCHAR|CDATE|CDBL|CDEC|CHAIN|CHAR|CHDIR|CINT|CLASS|CLEAR|CLNG|CLOSE|CLS|COBJ|COM|COMMON|CONST|CONTINUE|CSBYTE|CSHORT|CSNG|CSTR|CTYPE|CUINT|CULNG|CUSHORT|DATA|DATE|DECIMAL|DECLARE|DEF(?: FN| SEG|DBL|INT|LNG|SNG|STR)|DEFAULT|DELEGATE|DIM|DIRECTCAST|DO|DOUBLE|ELSE|ELSEIF|END|ENUM|ENVIRON|ERASE|ERROR|EVENT|EXIT|FALSE|FIELD|FILES|FINALLY|FOR(?: EACH)?|FRIEND|FUNCTION|GET|GETTYPE|GETXMLNAMESPACE|GLOBAL|GOSUB|GOTO|HANDLES|IF|IMPLEMENTS|IMPORTS|IN|INHERITS|INPUT|INTEGER|INTERFACE|IOCTL|IS|ISNOT|KEY|KILL|LET|LIB|LIKE|LINE INPUT|LOCATE|LOCK|LONG|LOOP|LSET|ME|MKDIR|MOD|MODULE|MUSTINHERIT|MUSTOVERRIDE|MYBASE|MYCLASS|NAME|NAMESPACE|NARROWING|NEW|NEXT|NOT|NOTHING|NOTINHERITABLE|NOTOVERRIDABLE|OBJECT|OF|OFF|ON(?: COM| ERROR| KEY| TIMER)?|OPEN|OPERATOR|OPTION(?: BASE)?|OPTIONAL|OR|ORELSE|OUT|OVERLOADS|OVERRIDABLE|OVERRIDES|PARAMARRAY|PARTIAL|POKE|PRIVATE|PROPERTY|PROTECTED|PUBLIC|PUT|RAISEEVENT|READ|READONLY|REDIM|REM|REMOVEHANDLER|RESTORE|RESUME|RETURN|RMDIR|RSET|RUN|SBYTE|SELECT(?: CASE)?|SET|SHADOWS|SHARED|SHELL|SHORT|SINGLE|SLEEP|STATIC|STEP|STOP|STRING|STRUCTURE|SUB|SWAP|SYNCLOCK|SYSTEM|THEN|THROW|TIMER|TO|TROFF|TRON|TRUE|TRY|TRYCAST|TYPE|TYPEOF|UINTEGER|ULONG|UNLOCK|UNTIL|USHORT|USING|VIEW PRINT|WAIT|WEND|WHEN|WHILE|WIDENING|WITH|WITHEVENTS|WRITE|WRITEONLY|XOR)|\B(?:#CONST|#ELSE|#ELSEIF|#END|#IF))(?:\$|\b)/i,punctuation:/[,;:(){}]/})}class gm{constructor(n,t,r){this.normal=t,this.property=n,r&&(this.space=r)}}gm.prototype.normal={};gm.prototype.property={};gm.prototype.space=void 0;function t$(e,n){const t={},r={};for(const s of e)Object.assign(t,s.property),Object.assign(r,s.normal);return new gm(t,r,n)}function S0(e){return e.toLowerCase()}class Ti{constructor(n,t){this.attribute=t,this.property=n}}Ti.prototype.attribute="";Ti.prototype.booleanish=!1;Ti.prototype.boolean=!1;Ti.prototype.commaOrSpaceSeparated=!1;Ti.prototype.commaSeparated=!1;Ti.prototype.defined=!1;Ti.prototype.mustUseProperty=!1;Ti.prototype.number=!1;Ti.prototype.overloadedBoolean=!1;Ti.prototype.property="";Ti.prototype.spaceSeparated=!1;Ti.prototype.space=void 0;let f2n=0;const Zt=uf(),ss=uf(),M3=uf(),Ye=uf(),or=uf(),D_=uf(),Ki=uf();function uf(){return 2**++f2n}const O3=Object.freeze(Object.defineProperty({__proto__:null,boolean:Zt,booleanish:ss,commaOrSpaceSeparated:Ki,commaSeparated:D_,number:Ye,overloadedBoolean:M3,spaceSeparated:or},Symbol.toStringTag,{value:"Module"})),ow=Object.keys(O3);class GS extends Ti{constructor(n,t,r,s){let i=-1;if(super(n,t),lj(this,"space",s),typeof r=="number")for(;++i4&&t.slice(0,4)==="data"&&g2n.test(n)){if(n.charAt(4)==="-"){const i=n.slice(5).replace(cj,b2n);r="data"+i.charAt(0).toUpperCase()+i.slice(1)}else{const i=n.slice(4);if(!cj.test(i)){let a=i.replace(m2n,v2n);a.charAt(0)!=="-"&&(a="-"+a),n="data"+a}}s=GS}return new s(r,n)}function v2n(e){return"-"+e.toLowerCase()}function b2n(e){return e.charAt(1).toUpperCase()}const c$=t$([n$,d2n,i$,a$,o$],"html"),Ib=t$([n$,h2n,i$,a$,o$],"svg");function uj(e){const n=[],t=String(e||"");let r=t.indexOf(","),s=0,i=!1;for(;!i;){r===-1&&(r=t.length,i=!0);const a=t.slice(s,r).trim();(a||!i)&&n.push(a),s=r+1,r=t.indexOf(",",s)}return n}function y2n(e,n){const t={};return(e[e.length-1]===""?[...e,""]:e).join((t.padRight?" ":"")+","+(t.padLeft===!1?"":" ")).trim()}const _j=/[#.]/g;function x2n(e,n){const t=e||"",r={};let s=0,i,a;for(;s=48&&n<=57}function T2n(e){const n=typeof e=="string"?e.charCodeAt(0):e;return n>=97&&n<=102||n>=65&&n<=70||n>=48&&n<=57}function A2n(e){const n=typeof e=="string"?e.charCodeAt(0):e;return n>=97&&n<=122||n>=65&&n<=90}function pj(e){return A2n(e)||f$(e)}const mj=document.createElement("i");function C0(e){const n="&"+e+";";mj.innerHTML=n;const t=mj.textContent;return t.charCodeAt(t.length-1)===59&&e!=="semi"||t===n?!1:t}const R2n=["","Named character references must be terminated by a semicolon","Numeric character references must be terminated by a semicolon","Named character references cannot be empty","Numeric character references cannot be empty","Named character references must be known","Numeric character references cannot be disallowed","Numeric character references cannot be outside the permissible Unicode range"];function M2n(e,n){const t={},r=typeof t.additional=="string"?t.additional.charCodeAt(0):t.additional,s=[];let i=0,a=-1,o="",l,u;t.position&&("start"in t.position||"indent"in t.position?(u=t.position.indent,l=t.position.start):l=t.position);let h=(l?l.line:0)||1,_=(l?l.column:0)||1,p=x(),m;for(i--;++i<=e.length;)if(m===10&&(_=(u?u[a]:0)||1),m=e.charCodeAt(i),m===38){const b=e.charCodeAt(i+1);if(b===9||b===10||b===12||b===32||b===38||b===60||Number.isNaN(b)||r&&b===r){o+=String.fromCharCode(m),_++;continue}const w=i+1;let y=w,C=w,E;if(b===35){C=++y;const q=e.charCodeAt(C);q===88||q===120?(E="hexadecimal",C=++y):E="decimal"}else E="named";let N="",A="",j="";const M=E==="named"?pj:E==="decimal"?f$:T2n;for(C--;++C<=e.length;){const q=e.charCodeAt(C);if(!M(q))break;j+=String.fromCharCode(q),E==="named"&&j2n.includes(j)&&(N=j,A=C0(j))}let L=e.charCodeAt(C)===59;if(L){C++;const q=E==="named"?C0(j):!1;q&&(N=j,A=q)}let I=1+C-w,B="";if(!(!L&&t.nonTerminated===!1))if(!j)E!=="named"&&k(4,I);else if(E==="named"){if(L&&!A)k(5,1);else if(N!==j&&(C=y+N.length,I=1+C-y,L=!1),!L){const q=N?1:3;if(t.attribute){const U=e.charCodeAt(C);U===61?(k(q,I),A=""):pj(U)?A="":k(q,I)}else k(q,I)}B=A}else{L||k(2,I);let q=Number.parseInt(j,E==="hexadecimal"?16:10);if(O2n(q))k(7,I),B="�";else if(q in hj)k(6,I),B=hj[q];else{let U="";D2n(q)&&k(6,I),q>65535&&(q-=65536,U+=String.fromCharCode(q>>>10|55296),q=56320|q&1023),B=U+String.fromCharCode(q)}}if(B){v(),p=x(),i=C-1,_+=C-w+1,s.push(B);const q=x();q.offset++,t.reference&&t.reference.call(t.referenceContext||void 0,B,{start:p,end:q},e.slice(w-1,C)),p=q}else j=e.slice(w-1,C),o+=j,_+=j.length,i=C-1}else m===10&&(h++,a++,_=0),Number.isNaN(m)?v():(o+=String.fromCharCode(m),_++);return s.join("");function x(){return{line:h,column:_,offset:i+((l?l.offset:0)||0)}}function k(b,w){let y;t.warning&&(y=x(),y.column+=w,y.offset+=w,t.warning.call(t.warningContext||void 0,R2n[b],y,b))}function v(){o&&(s.push(o),t.text&&t.text.call(t.textContext||void 0,o,{start:p,end:x()}),o="")}}function O2n(e){return e>=55296&&e<=57343||e>1114111}function D2n(e){return e>=1&&e<=8||e===11||e>=13&&e<=31||e>=127&&e<=159||e>=64976&&e<=65007||(e&65535)===65535||(e&65535)===65534}var L2n=0,e1={},zs={util:{type:function(e){return Object.prototype.toString.call(e).slice(8,-1)},objId:function(e){return e.__id||Object.defineProperty(e,"__id",{value:++L2n}),e.__id},clone:function e(n,t){t=t||{};var r,s;switch(zs.util.type(n)){case"Object":if(s=zs.util.objId(n),t[s])return t[s];r={},t[s]=r;for(var i in n)n.hasOwnProperty(i)&&(r[i]=e(n[i],t));return r;case"Array":return s=zs.util.objId(n),t[s]?t[s]:(r=[],t[s]=r,n.forEach(function(a,o){r[o]=e(a,t)}),r);default:return n}}},languages:{plain:e1,plaintext:e1,text:e1,txt:e1,extend:function(e,n){var t=zs.util.clone(zs.languages[e]);for(var r in n)t[r]=n[r];return t},insertBefore:function(e,n,t,r){r=r||zs.languages;var s=r[e],i={};for(var a in s)if(s.hasOwnProperty(a)){if(a==n)for(var o in t)t.hasOwnProperty(o)&&(i[o]=t[o]);t.hasOwnProperty(a)||(i[a]=s[a])}var l=r[e];return r[e]=i,zs.languages.DFS(zs.languages,function(u,h){h===l&&u!=e&&(this[u]=i)}),i},DFS:function e(n,t,r,s){s=s||{};var i=zs.util.objId;for(var a in n)if(n.hasOwnProperty(a)){t.call(n,a,n[a],r||a);var o=n[a],l=zs.util.type(o);l==="Object"&&!s[i(o)]?(s[i(o)]=!0,e(o,t,null,s)):l==="Array"&&!s[i(o)]&&(s[i(o)]=!0,e(o,t,a,s))}}},plugins:{},highlight:function(e,n,t){var r={code:e,grammar:n,language:t};if(zs.hooks.run("before-tokenize",r),!r.grammar)throw new Error('The language "'+r.language+'" has no grammar.');return r.tokens=zs.tokenize(r.code,r.grammar),zs.hooks.run("after-tokenize",r),Jp.stringify(zs.util.encode(r.tokens),r.language)},tokenize:function(e,n){var t=n.rest;if(t){for(var r in t)n[r]=t[r];delete n.rest}var s=new I2n;return q1(s,s.head,e),d$(e,s,n,s.head,0),B2n(s)},hooks:{all:{},add:function(e,n){var t=zs.hooks.all;t[e]=t[e]||[],t[e].push(n)},run:function(e,n){var t=zs.hooks.all[e];if(!(!t||!t.length))for(var r=0,s;s=t[r++];)s(n)}},Token:Jp};function Jp(e,n,t,r){this.type=e,this.content=n,this.alias=t,this.length=(r||"").length|0}function gj(e,n,t,r){e.lastIndex=n;var s=e.exec(t);if(s&&r&&s[1]){var i=s[1].length;s.index+=i,s[0]=s[0].slice(i)}return s}function d$(e,n,t,r,s,i){for(var a in t)if(!(!t.hasOwnProperty(a)||!t[a])){var o=t[a];o=Array.isArray(o)?o:[o];for(var l=0;l=i.reach);b+=v.value.length,v=v.next){var w=v.value;if(n.length>e.length)return;if(!(w instanceof Jp)){var y=1,C;if(p){if(C=gj(k,b,e,_),!C||C.index>=e.length)break;var j=C.index,E=C.index+C[0].length,N=b;for(N+=v.value.length;j>=N;)v=v.next,N+=v.value.length;if(N-=v.value.length,b=N,v.value instanceof Jp)continue;for(var A=v;A!==n.tail&&(Ni.reach&&(i.reach=B);var q=v.prev;L&&(q=q1(n,q,L),b+=L.length),$2n(n,q,y);var U=new Jp(a,h?zs.tokenize(M,h):M,m,M);if(v=q1(n,q,U),I&&q1(n,v,I),y>1){var W={cause:a+","+l,reach:B};d$(e,n,t,v.prev,b,W),i&&W.reach>i.reach&&(i.reach=W.reach)}}}}}}function I2n(){var e={value:null,prev:null,next:null},n={value:null,prev:e,next:null};e.next=n,this.head=e,this.tail=n,this.length=0}function q1(e,n,t){var r=n.next,s={value:t,prev:n,next:r};return n.next=s,r.prev=s,e.length++,s}function $2n(e,n,t){for(var r=n.next,s=0;st)return null;try{return Mt.highlight(e,n).children}catch{return null}}function g$(e,n){var t;return e.type==="text"?e.value??"":e.type!=="element"?null:f.jsx("span",{className:(((t=e.properties)==null?void 0:t.className)??[]).join(" "),children:(e.children??[]).map(g$)},n)}function K2n(e,n,t=3e5){var r;return((r=m$(e,n,t))==null?void 0:r.map(g$))??e}function v$(e,n,t=3e5){const r=m$(e,n,t);if(!r)return e.split(` `);const s=[];let i=[];const a=[];let o=0;const l=h=>{let _=h;for(let p=a.length-1;p>=0;p--)_=f.jsx("span",{className:a[p],children:_},o++);i.push(_)},u=h=>{var _;if(h.type==="text"){(h.value??"").split(` -`).forEach((p,m)=>{m>0&&(s.push(i),i=[]),p&&l(p)});return}h.type==="element"&&(a.push((((_=h.properties)==null?void 0:_.className)??[]).join(" ")),(h.children??[]).forEach(u),a.pop())};return r.forEach(u),s.push(i),s}function g$(e){return Array.isArray(e)?e.length===0:e===""}function v$({value:e,onChange:n,onSave:t,onBlur:r,readOnly:s=!1,path:i,highlightLine:a,scrollRequest:o,onScrollRequestHandled:l,scrollPosition:u,onScrollPositionChange:h}){const _=A.useMemo(()=>m$(e,mS(i)),[e,i]),{ruleCh:p,codeCh:m}=ZI(_.length),x=A.useRef(null),k=A.useRef(null),v=()=>{const C=x.current;C&&k.current&&(k.current.scrollTop=C.scrollTop)},b=A.useRef(u);A.useLayoutEffect(()=>{const C=x.current;!C||!b.current||(C.scrollTop=b.current.top,C.scrollLeft=b.current.left,v())},[i]),A.useLayoutEffect(v,[e]),A.useLayoutEffect(()=>{var M;const C=x.current;if(!C||!a||o===void 0)return;const N=e.split(` -`),E=Math.min(Math.max(Math.trunc(a),1),N.length);let T=0;for(let D=0;D{if(!s){if((C.metaKey||C.ctrlKey)&&C.key.toLowerCase()==="s"){C.preventDefault(),t();return}if(C.key==="Tab"){C.preventDefault();const N=C.currentTarget,{selectionStart:E,selectionEnd:T}=N,j=e.slice(0,E)+" "+e.slice(T);n(j),requestAnimationFrame(()=>{N.selectionStart=N.selectionEnd=E+1})}}},y=`absolute inset-0 m-0 py-3.5 pe-4 ${Av} ${XI} [scrollbar-gutter:stable]`;return f.jsxs("div",{className:`file-view-editwrap relative h-full min-h-0 ${Av}`,children:[f.jsx("div",{className:"absolute start-0 top-0 bottom-0 border-e border-e-border-variant pointer-events-none",style:{width:`${p}ch`},"aria-hidden":"true"}),f.jsx("div",{ref:k,className:`file-view-code ${y} overflow-hidden pointer-events-none`,"aria-hidden":"true",children:_.map((C,N)=>f.jsxs("div",{"data-line":N+1,className:"relative",style:{paddingInlineStart:`${m}ch`},children:[f.jsx("span",{className:`${YI} absolute start-0 pe-[1ch]`,style:{width:`${p}ch`},children:N+1}),g$(C)?f.jsx("br",{}):C]},N))}),f.jsx("textarea",{ref:x,className:`file-view-editarea ${y} overflow-y-auto overflow-x-hidden resize-none border-0 bg-transparent text-transparent caret-text outline-none`,style:{paddingInlineStart:`${m}ch`},value:e,onChange:C=>{s||n(C.target.value)},onScroll:C=>{v(),h==null||h({top:Math.max(0,C.currentTarget.scrollTop),left:Math.max(0,C.currentTarget.scrollLeft)})},onKeyDown:w,onBlur:s?void 0:r,readOnly:s,spellCheck:!1,autoComplete:"off",autoCorrect:"off",autoCapitalize:"off"})]})}function b$({onClose:e,onSaved:n}){const t=Dmn(),r=ft(t),[s,i]=A.useState(()=>r.data??null),[a,o]=A.useState(()=>{var y;return((y=r.data)==null?void 0:y.content)??""}),l=!s&&r.error?r.error.message:null,u=vn({mutationFn:({content:y,previous:C})=>g0n(y,C)}),[h,_]=A.useState(!1),p=A.useRef(null),m=A.useRef(e),x=s!==null&&a!==s.content,k=A.useRef(x),v=A.useRef(h);k.current=x,v.current=h,m.current=e,A.useEffect(()=>{!r.data||k.current||v.current||(i(r.data),o(r.data.content))},[r.data]);const b=()=>{v.current||k.current&&!window.confirm(Grn())||m.current()};kb(p,b,"textarea");async function w(){if(!(!s||!x||h)){_(!0);try{if(await u.mutateAsync({content:a,previous:s.content}),!$n(t.queryKey))return;Qr(t.queryKey,{...s,content:a}),i({...s,content:a}),n==null||n(),Vn(isn(),"success")}catch(y){Vn(y instanceof Error?y.message:String(y),"error")}finally{_(!1)}}}return Oa.createPortal(f.jsx("div",{className:"fixed inset-0 z-200 flex items-center justify-center bg-modal-backdrop p-5",onClick:y=>{y.target===y.currentTarget&&b()},children:f.jsxs("div",{ref:p,className:"relative flex h-[min(48rem,calc(100vh-2.5rem))] w-200 max-w-full flex-col overflow-hidden rounded-xl border border-border bg-background shadow-modal",role:"dialog","aria-modal":"true","aria-labelledby":"ssh-config-dialog-title",tabIndex:-1,children:[f.jsxs("div",{className:"shrink-0 px-6 pt-5 pb-4 pe-14",children:[f.jsx("h2",{id:"ssh-config-dialog-title",className:"m-0 text-xl font-medium",children:fsn()}),f.jsx("code",{className:"mt-1 block font-mono text-sm text-subtext",children:"~/.ssh/config"})]}),f.jsx(Ft,{className:"absolute end-3.5 top-3.5","aria-label":$rn(),onClick:b,disabled:h,children:f.jsx(_r,{size:16})}),f.jsx("div",{className:"file-view min-h-0 flex-1 border-y border-border-variant bg-background",children:l?f.jsx("p",{className:"m-5 text-sm text-accent-red",children:l}):s===null?f.jsxs("div",{className:"flex items-center gap-2 p-5 text-sm text-subtext",children:[f.jsx(Rt,{})," ",Zrn()]}):f.jsx(v$,{value:a,onChange:o,onSave:()=>void w(),path:s.path})}),f.jsxs("div",{className:"flex shrink-0 justify-end gap-2.5 p-4",children:[f.jsx(Me,{onClick:b,disabled:h,children:P_()}),f.jsx(Me,{variant:"primary",onClick:()=>void w(),disabled:!x||h,children:h?la():Yo()})]})]})}),document.body)}function y$({runtime:e,corner:n=!1}){const[t,r]=A.useState(null);return e.kind==="ssh"?f.jsx(A3,{runtime:e,corner:n}):f.jsxs(f.Fragment,{children:[n?f.jsx("div",{className:"fixed bottom-0 start-0 z-50",children:f.jsxs(Me,{className:"h-auto max-w-48 justify-start rounded-none border-b-0 border-s-0 px-2.5 py-1.5 font-normal",title:n3(),"aria-haspopup":"dialog",onClick:()=>r("hosts"),children:[f.jsx(Tv,{size:14,className:"shrink-0"}),f.jsx("span",{className:"min-w-0 truncate text-sm leading-tight",children:vv()})]})}):f.jsx("div",{className:"relative shrink-0 border-t border-border",children:f.jsxs("div",{className:"flex items-center gap-1.5 py-2 ps-1 pe-2.5",children:[f.jsx(Ft,{size:"small","aria-label":n3(),"aria-haspopup":"dialog",onClick:()=>r("hosts"),children:f.jsx(Tv,{size:14,className:"shrink-0"})}),f.jsxs("span",{className:"flex min-w-0 flex-col gap-1 text-start text-text",children:[f.jsx("span",{className:"truncate text-sm leading-tight",children:vv()}),f.jsxs("span",{className:"truncate text-xs leading-tight text-subtext",children:["OpenResearch ",Ne(e.version)]})]})]})}),t==="hosts"&&f.jsx(gxn,{onClose:()=>r(null),onConfigureSsh:()=>r("config")}),t==="config"&&f.jsx(b$,{onClose:()=>r("hosts")})]})}function KS(e=!0){var r;const n=kv(),t=ft({...n,enabled:e});return{status:t.data??null,error:((r=t.error)==null?void 0:r.message)??null,apply:s=>Qr(n.queryKey,s)}}const u2n=6e4,_2n=500;function x$(e){const[n,t]=A.useState(!1),[r,s]=A.useState(null),i=A.useRef(!1);A.useEffect(()=>(i.current=!1,()=>{i.current=!0}),[]);const a=e!=null&&e.restartRequired?e.instance:null;return{restarting:n,error:r,restart:()=>{if(!a||n)return;const l=kv(),u=()=>i.current||!$n(l.queryKey);t(!0),s(null),(async()=>{try{if(await r0n(),u())return;const h=Date.now()+u2n;for(;Date.now()setTimeout(p,_2n)),u())return;const _=await rt.fetchQuery({...l,staleTime:0}).catch(()=>null);if(u())return;if(_&&_.instance!==a){window.location.reload();return}}throw new Error(M_n())}catch(h){if(u())return;s(h instanceof Error?h.message:String(h)),t(!1)}})()}}}function w$({status:e}){const[n,t]=A.useState(null),r=e!=null&&e.restartRequired?e.installedVersion:null,{restarting:s,error:i,restart:a}=x$(e);return!r||n===r?null:f.jsxs("div",{className:"update-banner flex items-center gap-2 shrink-0 py-1.5 px-3.5 text-sm text-text bg-surface border-b border-b-border",role:"status",children:[f.jsx(La,{size:13,className:`shrink-0 text-subtext${s?" animate-spin":""}`}),f.jsx("span",{className:"min-w-0",children:i?pL({error:i}):o_n({version:Ne(r)})}),(e==null?void 0:e.canRestart)&&f.jsx(Me,{type:"button",size:"small",disabled:s,onClick:a,children:s?mL():hL()}),f.jsx(Ft,{type:"button",size:"small",className:"ms-auto","aria-label":h_n(),disabled:s,onClick:()=>t(r),children:f.jsx(_r,{size:13})})]})}function WS(){return f.jsx("div",{className:"flex flex-1 h-full items-center justify-center",children:f.jsx(Rt,{})})}function f2n(){return f.jsxs("div",{className:"flex flex-1 h-full flex-col items-center justify-center gap-3 text-subtext",children:[f.jsx("p",{children:so()}),f.jsx(pb,{to:"/projects",children:Xp()})]})}function QS({error:e,reset:n}){return f.jsxs("div",{className:"flex flex-1 h-full flex-col items-center justify-center gap-3 text-subtext",children:[f.jsx("p",{role:"alert",children:e.message}),f.jsx(Me,{onClick:n,children:Vs()}),f.jsx(pb,{to:"/projects",children:Xp()})]})}function k$({projectId:e}){const{queryClient:n}=Ek({from:"__root__"}),t=hb(),[r,s]=A.useState(null),[i,a]=A.useState(0);return A.useEffect(()=>{let o=!0;return s(null),(e?Byn(e,n):$yn(n)).then(l=>{o&&t({href:l,replace:!0})}).catch(l=>{o&&(_V(l)?a(u=>u+1):s(l instanceof Error?l:new Error(String(l))))}),()=>{o=!1}},[e,i,t,n]),r?f.jsx(QS,{error:r,reset:()=>a(o=>o+1)}):f.jsx(WS,{})}function d2n(){return f.jsx(k$,{})}function h2n({projectId:e}){return f.jsx(k$,{projectId:e})}function p2n(){const e=BI(),n=hb(),t=v0(),r=ft(t),s=ft(fm()),i=r.data,a=s.data,o=(i==null?void 0:i.length)===0&&(a==null?void 0:a.onboardingCompleted)===!1,l=r.error??s.error,u=()=>{r.refetch(),s.refetch()},{status:h}=KS(e.kind==="local");A.useEffect(()=>{document.title="OpenResearch",a&&Tb.queue({...cS()??a.workspace??{railOpen:!0,panelWidth:HI(),experimentsView:"table"},lastLocation:"/projects"})},[a]);const _=p=>void n({to:"/projects/$projectId",params:{projectId:p}});return f.jsxs("div",{className:"app flex flex-col h-full",children:[e.kind==="local"&&f.jsxs(f.Fragment,{children:[f.jsx(VI,{}),f.jsx(w$,{status:h})]}),l&&(!i||!a)?f.jsx(QS,{error:l,reset:u}):!i||!a?f.jsx(WS,{}):o?f.jsx(Xyn,{remote:e.kind==="ssh",preferredAgent:a.preferredAgent,onDone:p=>{Iyn(),_(p.id)}}):f.jsx(mxn,{remote:e.kind==="ssh",projects:i,onOpen:_,onCreated:(p,m)=>{m?(Vn(m,"error"),n({to:"/projects/$projectId/settings/$tab",params:{projectId:p.id,tab:"git"}})):_(p.id)},onDeleted:p=>Qr(t.queryKey,m=>m==null?void 0:m.filter(x=>x.id!==p))}),(e.kind==="ssh"||i&&a&&!o)&&f.jsx(y$,{runtime:e,corner:!0})]})}const m2n=Xo()({component:d2n}),g2n=Xo()({component:f0}),v2n=Xo()({}),b2n=Xo()({component:p2n}),y2n=e=>({queryKey:Et("getRunDiff",e),queryFn:({signal:n})=>zpn(e,n),staleTime:3e4}),S$=e=>({queryKey:Et("getExperimentDiff",e),queryFn:({signal:n})=>jpn(e,n),staleTime:3e4}),Rv=(e,n,t={})=>({queryKey:Et("getProjectFile",e,n,{...t}),queryFn:({signal:r})=>Tpn(e,n,t,r),staleTime:t.ref?Qd(t.ref)?1/0:3e4:1/0,refetchOnMount:t.ref?!0:"always",refetchOnWindowFocus:t.ref?!0:"always"}),C$=e=>({queryKey:Et("getAbsoluteFile",e),queryFn:({signal:n})=>Apn(e,n),staleTime:1/0,refetchOnMount:"always",refetchOnWindowFocus:"always"}),E$=(e,n={})=>({queryKey:Et("getCodeTree",e,{...n}),queryFn:({signal:t})=>Qpn(e,n,t),staleTime:n.ref&&Qd(n.ref)?1/0:3e4}),Mv=e=>({queryKey:Et("getSessionWorktree",e),queryFn:({signal:n})=>Xpn(e,n),staleTime:3e4}),x2n=e=>({queryKey:Et("getArtifacts",e),queryFn:({signal:n})=>O0n(e,n),staleTime:3e4}),XS=(e,n)=>({queryKey:Et("getArtifactFileText",e,n),queryFn:({signal:t})=>$0n(e,n,t),staleTime:1/0,refetchOnMount:"always",refetchOnWindowFocus:"always"}),N$=(e,n)=>({queryKey:Et("getArtifactFileMetadata",e,n),queryFn:({signal:t})=>P0n(e,n,t),staleTime:2e3}),w2n=()=>({queryKey:Et("getLatexEngine"),queryFn:({signal:e})=>Dpn(e),staleTime:3e5}),k2n=()=>({queryKey:Et("getOverleafSettings"),queryFn:({signal:e})=>Ipn(e),staleTime:3e5}),S2n=(e,n,t={})=>({queryKey:Et("getOverleafState",e,n,{...t}),queryFn:({signal:r})=>qpn(e,n,t,r),staleTime:3e5}),C2n=(e,n,t={})=>({queryKey:Et("getOverleafStatus",e,n,{...t}),queryFn:({signal:r})=>Kpn(e,n,t,r),staleTime:3e4}),z$=(e,n,t,r,s)=>({queryKey:Et("resolvedFile",e,n,t,r??null,s??null),staleTime:s&&!Qd(s)?3e4:1/0,refetchOnMount:s?!0:"always",refetchOnWindowFocus:s?!0:"always",queryFn:async({signal:i,client:a})=>{const o=async m=>{i.throwIfAborted();const x=await a.fetchQuery({...m,staleTime:s?m.staleTime:0});return i.throwIfAborted(),x},l=t==="abs",u=t==="artifacts",h=async()=>{const m=await o(N$(e,n)),x=(m==null?void 0:m.presentation)==="text"||(m==null?void 0:m.presentation)==="unknown",k=m&&x?await o(XS(e,n)):null,v=m===null||x&&k===null;return{path:n,content:(k==null?void 0:k.content)??"",truncated:(k==null?void 0:k.truncated)??!1,binary:(k==null?void 0:k.binary)??(m==null?void 0:m.presentation)==="download",notFound:v,presentation:k?k.binary?"download":"text":(m==null?void 0:m.presentation)??"download"}},_=async()=>{for(const m of[`artifacts/${n}`,n]){const x=await o(Rv(e,m,{sessionId:r})).catch(()=>(i.throwIfAborted(),null));if(x&&!x.notFound)return x}return null},p=await(l?o(C$(n)).then(m=>({source:"absolute",file:m})):u?h().then(async m=>{if(!m.notFound)return{source:"artifact",file:m};const x=await _();return x?{source:"checkout",file:x}:{source:"artifact",file:m}}):o(Rv(e,n,{sessionId:r,ref:s})).then(m=>m.notFound&&!s?h().then(x=>x.notFound?{source:"checkout",file:m}:{source:"artifact",file:x,checkoutRoot:m.root}):{source:"checkout",file:m}));return i.throwIfAborted(),p}});async function E2n(e,n,t,r,s){if(Qd(s))return;const i=z$(e,n,t,r,s),a=[i.queryKey,...t==="abs"?[C$(n).queryKey]:[Rv(e,n,{sessionId:r,ref:s}).queryKey,Rv(e,`artifacts/${n}`,{sessionId:r}).queryKey,XS(e,n).queryKey,N$(e,n).queryKey]];await Promise.all(a.map(o=>rt.cancelQueries({queryKey:o,exact:!0}))),await Promise.all(a.map(o=>rt.invalidateQueries({queryKey:o,exact:!0,refetchType:"none"}))),await rt.invalidateQueries({queryKey:i.queryKey,exact:!0})}function N2n(e,n,t){return t?n.flatMap(r=>{if(r.status!=="starting"&&r.status!=="running")return[];const s=e.find(i=>i.id===r.experimentId&&i.chatSessionId===t);return s?[{experiment:s,run:r}]:[]}):[]}const vj={done:{tone:"success",live:!1},failed:{tone:"danger",live:!1},running:{tone:"info",live:!0},starting:{tone:"warning",live:!0},cancelling:{tone:"caution",live:!0},cancelled:{tone:"caution",live:!1},editing:{tone:"accent",live:!0},idle:{tone:"neutral",live:!1}};function z2n(e){return vj[e]??vj.idle}const j2n={done:fL,failed:Zsn,running:fin,starting:bin,cancelling:Rsn,cancelled:Csn,editing:Gsn,idle:iin};function YS(e){const n=j2n[e];return n?n():e.charAt(0).toUpperCase()+e.slice(1)}function Jl({status:e,label:n,className:t}){const r=z2n(e);return f.jsx(yd,{tone:r.tone,live:r.live,className:t,children:n??YS(e)})}const G_={local:hD,tinker:gje,hf:mze,modal:Lze,k8s:kze,ssh:uje,slurm:rje,ray:Xze,openresearch:qze};function bj(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);n&&(r=r.filter((function(s){return Object.getOwnPropertyDescriptor(e,s).enumerable}))),t.push.apply(t,r)}return t}function Bn(e){for(var n=1;n=0||(h[l]=a[l]);return h})(e,n);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(e,t)&&(s[t]=e[t])}return s}function En(e,n){return T$(e)||(function(t,r){var s=t==null?null:typeof Symbol<"u"&&t[Symbol.iterator]||t["@@iterator"];if(s!=null){var i,a,o,l,u=[],h=!0,_=!1;try{if(o=(s=s.call(t)).next,r===0){if(Object(s)!==s)return;h=!1}else for(;!(h=(i=o.call(s)).done)&&(u.push(i.value),u.length!==r);h=!0);}catch(p){_=!0,a=p}finally{try{if(!h&&s.return!=null&&(l=s.return(),Object(l)!==l))return}finally{if(_)throw a}}return u}})(e,n)||$b(e,n)||R$()}function j$(e){return T$(e)||A$(e)||$b(e)||R$()}function ea(e){return(function(n){if(Array.isArray(n))return $3(n)})(e)||A$(e)||$b(e)||(function(){throw new TypeError(`Invalid attempt to spread non-iterable instance. -In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)})()}function T$(e){if(Array.isArray(e))return e}function A$(e){if(typeof Symbol<"u"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function $b(e,n){if(e){if(typeof e=="string")return $3(e,n);var t=Object.prototype.toString.call(e).slice(8,-1);return t==="Object"&&e.constructor&&(t=e.constructor.name),t==="Map"||t==="Set"?Array.from(e):t==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t)?$3(e,n):void 0}}function $3(e,n){(n==null||n>e.length)&&(n=e.length);for(var t=0,r=new Array(n);t{m>0&&(s.push(i),i=[]),p&&l(p)});return}h.type==="element"&&(a.push((((_=h.properties)==null?void 0:_.className)??[]).join(" ")),(h.children??[]).forEach(u),a.pop())};return r.forEach(u),s.push(i),s}function b$(e){return Array.isArray(e)?e.length===0:e===""}function y$({value:e,onChange:n,onSave:t,onBlur:r,readOnly:s=!1,path:i,highlightLine:a,scrollRequest:o,onScrollRequestHandled:l,scrollPosition:u,onScrollPositionChange:h}){const _=T.useMemo(()=>v$(e,mS(i)),[e,i]),{ruleCh:p,codeCh:m}=e$(_.length),x=T.useRef(null),k=T.useRef(null),v=()=>{const C=x.current;C&&k.current&&(k.current.scrollTop=C.scrollTop)},b=T.useRef(u);T.useLayoutEffect(()=>{const C=x.current;!C||!b.current||(C.scrollTop=b.current.top,C.scrollLeft=b.current.left,v())},[i]),T.useLayoutEffect(v,[e]),T.useLayoutEffect(()=>{var M;const C=x.current;if(!C||!a||o===void 0)return;const E=e.split(` +`),N=Math.min(Math.max(Math.trunc(a),1),E.length);let A=0;for(let L=0;L{if(!s){if((C.metaKey||C.ctrlKey)&&C.key.toLowerCase()==="s"){C.preventDefault(),t();return}if(C.key==="Tab"){C.preventDefault();const E=C.currentTarget,{selectionStart:N,selectionEnd:A}=E,j=e.slice(0,N)+" "+e.slice(A);n(j),requestAnimationFrame(()=>{E.selectionStart=E.selectionEnd=N+1})}}},y=`absolute inset-0 m-0 py-3.5 pe-4 ${Av} ${ZI} [scrollbar-gutter:stable]`;return f.jsxs("div",{className:`file-view-editwrap relative h-full min-h-0 ${Av}`,children:[f.jsx("div",{className:"absolute start-0 top-0 bottom-0 border-e border-e-border-variant pointer-events-none",style:{width:`${p}ch`},"aria-hidden":"true"}),f.jsx("div",{ref:k,className:`file-view-code ${y} overflow-hidden pointer-events-none`,"aria-hidden":"true",children:_.map((C,E)=>f.jsxs("div",{"data-line":E+1,className:"relative",style:{paddingInlineStart:`${m}ch`},children:[f.jsx("span",{className:`${JI} absolute start-0 pe-[1ch]`,style:{width:`${p}ch`},children:E+1}),b$(C)?f.jsx("br",{}):C]},E))}),f.jsx("textarea",{ref:x,className:`file-view-editarea ${y} overflow-y-auto overflow-x-hidden resize-none border-0 bg-transparent text-transparent caret-text outline-none`,style:{paddingInlineStart:`${m}ch`},value:e,onChange:C=>{s||n(C.target.value)},onScroll:C=>{v(),h==null||h({top:Math.max(0,C.currentTarget.scrollTop),left:Math.max(0,C.currentTarget.scrollLeft)})},onKeyDown:w,onBlur:s?void 0:r,readOnly:s,spellCheck:!1,autoComplete:"off",autoCorrect:"off",autoCapitalize:"off"})]})}function x$({onClose:e,onSaved:n}){const t=bgn(),r=ft(t),[s,i]=T.useState(()=>r.data??null),[a,o]=T.useState(()=>{var y;return((y=r.data)==null?void 0:y.content)??""}),l=!s&&r.error?r.error.message:null,u=hn({mutationFn:({content:y,previous:C})=>tmn(y,C)}),[h,_]=T.useState(!1),p=T.useRef(null),m=T.useRef(e),x=s!==null&&a!==s.content,k=T.useRef(x),v=T.useRef(h);k.current=x,v.current=h,m.current=e,T.useEffect(()=>{!r.data||k.current||v.current||(i(r.data),o(r.data.content))},[r.data]);const b=()=>{v.current||k.current&&!window.confirm(Grn())||m.current()};kb(p,b,"textarea");async function w(){if(!(!s||!x||h)){_(!0);try{if(await u.mutateAsync({content:a,previous:s.content}),!$n(t.queryKey))return;Xr(t.queryKey,{...s,content:a}),i({...s,content:a}),n==null||n(),Bn(isn(),"success")}catch(y){Bn(y instanceof Error?y.message:String(y),"error")}finally{_(!1)}}}return Oa.createPortal(f.jsx("div",{className:"fixed inset-0 z-200 flex items-center justify-center bg-modal-backdrop p-5",onClick:y=>{y.target===y.currentTarget&&b()},children:f.jsxs("div",{ref:p,className:"relative flex h-[min(48rem,calc(100vh-2.5rem))] w-200 max-w-full flex-col overflow-hidden rounded-xl border border-border bg-background shadow-modal",role:"dialog","aria-modal":"true","aria-labelledby":"ssh-config-dialog-title",tabIndex:-1,children:[f.jsxs("div",{className:"shrink-0 px-6 pt-5 pb-4 pe-14",children:[f.jsx("h2",{id:"ssh-config-dialog-title",className:"m-0 text-xl font-medium",children:fsn()}),f.jsx("code",{className:"mt-1 block font-mono text-sm text-subtext",children:"~/.ssh/config"})]}),f.jsx(Ft,{className:"absolute end-3.5 top-3.5","aria-label":$rn(),onClick:b,disabled:h,children:f.jsx(_r,{size:16})}),f.jsx("div",{className:"file-view min-h-0 flex-1 border-y border-border-variant bg-background",children:l?f.jsx("p",{className:"m-5 text-sm text-accent-red",children:l}):s===null?f.jsxs("div",{className:"flex items-center gap-2 p-5 text-sm text-subtext",children:[f.jsx(Rt,{})," ",Zrn()]}):f.jsx(y$,{value:a,onChange:o,onSave:()=>void w(),path:s.path})}),f.jsxs("div",{className:"flex shrink-0 justify-end gap-2.5 p-4",children:[f.jsx(Me,{onClick:b,disabled:h,children:P_()}),f.jsx(Me,{variant:"primary",onClick:()=>void w(),disabled:!x||h,children:h?la():Zo()})]})]})}),document.body)}function w$({runtime:e,corner:n=!1}){const[t,r]=T.useState(null);return e.kind==="ssh"?f.jsx(A3,{runtime:e,corner:n}):f.jsxs(f.Fragment,{children:[n?f.jsx("div",{className:"fixed bottom-0 start-0 z-50",children:f.jsxs(Me,{className:"h-auto max-w-48 justify-start rounded-none border-b-0 border-s-0 px-2.5 py-1.5 font-normal",title:n3(),"aria-haspopup":"dialog",onClick:()=>r("hosts"),children:[f.jsx(Tv,{size:14,className:"shrink-0"}),f.jsx("span",{className:"min-w-0 truncate text-sm leading-tight",children:vv()})]})}):f.jsx("div",{className:"relative shrink-0 border-t border-border",children:f.jsxs("div",{className:"flex items-center gap-1.5 py-2 ps-1 pe-2.5",children:[f.jsx(Ft,{size:"small","aria-label":n3(),"aria-haspopup":"dialog",onClick:()=>r("hosts"),children:f.jsx(Tv,{size:14,className:"shrink-0"})}),f.jsxs("span",{className:"flex min-w-0 flex-col gap-1 text-start text-text",children:[f.jsx("span",{className:"truncate text-sm leading-tight",children:vv()}),f.jsxs("span",{className:"truncate text-xs leading-tight text-subtext",children:["OpenResearch ",Ne(e.version)]})]})]})}),t==="hosts"&&f.jsx(t2n,{onClose:()=>r(null),onConfigureSsh:()=>r("config")}),t==="config"&&f.jsx(x$,{onClose:()=>r("hosts")})]})}function KS(e=!0){var r;const n=kv(),t=ft({...n,enabled:e});return{status:t.data??null,error:((r=t.error)==null?void 0:r.message)??null,apply:s=>Xr(n.queryKey,s)}}const W2n=6e4,Q2n=500;function k$(e){const[n,t]=T.useState(!1),[r,s]=T.useState(null),i=T.useRef(!1);T.useEffect(()=>(i.current=!1,()=>{i.current=!0}),[]);const a=e!=null&&e.restartRequired?e.instance:null;return{restarting:n,error:r,restart:()=>{if(!a||n)return;const l=kv(),u=()=>i.current||!$n(l.queryKey);t(!0),s(null),(async()=>{try{if(await $0n(),u())return;const h=Date.now()+W2n;for(;Date.now()setTimeout(p,Q2n)),u())return;const _=await rt.fetchQuery({...l,staleTime:0}).catch(()=>null);if(u())return;if(_&&_.instance!==a){window.location.reload();return}}throw new Error(hfn())}catch(h){if(u())return;s(h instanceof Error?h.message:String(h)),t(!1)}})()}}}function S$({status:e}){const[n,t]=T.useState(null),r=e!=null&&e.restartRequired?e.installedVersion:null,{restarting:s,error:i,restart:a}=k$(e);return!r||n===r?null:f.jsxs("div",{className:"update-banner flex items-center gap-2 shrink-0 py-1.5 px-3.5 text-sm text-text bg-surface border-b border-b-border",role:"status",children:[f.jsx(La,{size:13,className:`shrink-0 text-subtext${s?" animate-spin":""}`}),f.jsx("span",{className:"min-w-0",children:i?gL({error:i}):H_n({version:Ne(r)})}),(e==null?void 0:e.canRestart)&&f.jsx(Me,{type:"button",size:"small",disabled:s,onClick:a,children:s?vL():mL()}),f.jsx(Ft,{type:"button",size:"small",className:"ms-auto","aria-label":Q_n(),disabled:s,onClick:()=>t(r),children:f.jsx(_r,{size:13})})]})}function WS(){return f.jsx("div",{className:"flex flex-1 h-full items-center justify-center",children:f.jsx(Rt,{})})}function X2n(){return f.jsxs("div",{className:"flex flex-1 h-full flex-col items-center justify-center gap-3 text-subtext",children:[f.jsx("p",{children:so()}),f.jsx(pb,{to:"/projects",children:Xp()})]})}function QS({error:e,reset:n}){return f.jsxs("div",{className:"flex flex-1 h-full flex-col items-center justify-center gap-3 text-subtext",children:[f.jsx("p",{role:"alert",children:e.message}),f.jsx(Me,{onClick:n,children:Vs()}),f.jsx(pb,{to:"/projects",children:Xp()})]})}function C$({projectId:e}){const{queryClient:n}=Ek({from:"__root__"}),t=hb(),[r,s]=T.useState(null),[i,a]=T.useState(0);return T.useEffect(()=>{let o=!0;return s(null),(e?kxn(e,n):wxn(n)).then(l=>{o&&t({href:l,replace:!0})}).catch(l=>{o&&(dV(l)?a(u=>u+1):s(l instanceof Error?l:new Error(String(l))))}),()=>{o=!1}},[e,i,t,n]),r?f.jsx(QS,{error:r,reset:()=>a(o=>o+1)}):f.jsx(WS,{})}function Y2n(){return f.jsx(C$,{})}function Z2n({projectId:e}){return f.jsx(C$,{projectId:e})}function J2n(){const e=FI(),n=hb(),t=v0(),r=ft(t),s=ft(fm()),i=r.data,a=s.data,o=(i==null?void 0:i.length)===0&&(a==null?void 0:a.onboardingCompleted)===!1,l=r.error??s.error,u=()=>{r.refetch(),s.refetch()},{status:h}=KS(e.kind==="local");T.useEffect(()=>{document.title="OpenResearch",a&&Tb.queue({...cS()??a.workspace??{railOpen:!0,panelWidth:UI(),experimentsView:"table"},lastLocation:"/projects"})},[a]);const _=p=>void n({to:"/projects/$projectId",params:{projectId:p}});return f.jsxs("div",{className:"app flex flex-col h-full",children:[e.kind==="local"&&f.jsxs(f.Fragment,{children:[f.jsx(WI,{}),f.jsx(S$,{status:h})]}),l&&(!i||!a)?f.jsx(QS,{error:l,reset:u}):!i||!a?f.jsx(WS,{}):o?f.jsx(Oxn,{remote:e.kind==="ssh",preferredAgent:a.preferredAgent,onDone:p=>{xxn(),_(p.id)}}):f.jsx(e2n,{remote:e.kind==="ssh",projects:i,onOpen:_,onCreated:(p,m)=>{m?(Bn(m,"error"),n({to:"/projects/$projectId/settings/$tab",params:{projectId:p.id,tab:"git"}})):_(p.id)},onDeleted:p=>Xr(t.queryKey,m=>m==null?void 0:m.filter(x=>x.id!==p))}),(e.kind==="ssh"||i&&a&&!o)&&f.jsx(w$,{runtime:e,corner:!0})]})}const ewn=Yo()({component:Y2n}),twn=Yo()({component:f0}),nwn=Yo()({}),rwn=Yo()({component:J2n}),swn=e=>({queryKey:Nt("getRunDiff",e),queryFn:({signal:n})=>c0n(e,n),staleTime:3e4}),E$=e=>({queryKey:Nt("getExperimentDiff",e),queryFn:({signal:n})=>u0n(e,n),staleTime:3e4}),Rv=(e,n,t={})=>({queryKey:Nt("getProjectFile",e,n,{...t}),queryFn:({signal:r})=>_0n(e,n,t,r),staleTime:t.ref?Qd(t.ref)?1/0:3e4:1/0,refetchOnMount:t.ref?!0:"always",refetchOnWindowFocus:t.ref?!0:"always"}),N$=e=>({queryKey:Nt("getAbsoluteFile",e),queryFn:({signal:n})=>f0n(e,n),staleTime:1/0,refetchOnMount:"always",refetchOnWindowFocus:"always"}),z$=(e,n={})=>({queryKey:Nt("getCodeTree",e,{...n}),queryFn:({signal:t})=>T0n(e,n,t),staleTime:n.ref&&Qd(n.ref)?1/0:3e4}),Mv=e=>({queryKey:Nt("getSessionWorktree",e),queryFn:({signal:n})=>A0n(e,n),staleTime:3e4}),iwn=e=>({queryKey:Nt("getArtifacts",e),queryFn:({signal:n})=>vmn(e,n),staleTime:3e4}),XS=(e,n)=>({queryKey:Nt("getArtifactFileText",e,n),queryFn:({signal:t})=>wmn(e,n,t),staleTime:1/0,refetchOnMount:"always",refetchOnWindowFocus:"always"}),j$=(e,n)=>({queryKey:Nt("getArtifactFileMetadata",e,n),queryFn:({signal:t})=>Smn(e,n,t),staleTime:2e3}),awn=()=>({queryKey:Nt("getLatexEngine"),queryFn:({signal:e})=>m0n(e),staleTime:3e5}),own=()=>({queryKey:Nt("getOverleafSettings"),queryFn:({signal:e})=>v0n(e),staleTime:3e5}),lwn=(e,n,t={})=>({queryKey:Nt("getOverleafState",e,n,{...t}),queryFn:({signal:r})=>S0n(e,n,t,r),staleTime:3e5}),cwn=(e,n,t={})=>({queryKey:Nt("getOverleafStatus",e,n,{...t}),queryFn:({signal:r})=>z0n(e,n,t,r),staleTime:3e4}),T$=(e,n,t,r,s)=>({queryKey:Nt("resolvedFile",e,n,t,r??null,s??null),staleTime:s&&!Qd(s)?3e4:1/0,refetchOnMount:s?!0:"always",refetchOnWindowFocus:s?!0:"always",queryFn:async({signal:i,client:a})=>{const o=async m=>{i.throwIfAborted();const x=await a.fetchQuery({...m,staleTime:s?m.staleTime:0});return i.throwIfAborted(),x},l=t==="abs",u=t==="artifacts",h=async()=>{const m=await o(j$(e,n)),x=(m==null?void 0:m.presentation)==="text"||(m==null?void 0:m.presentation)==="unknown",k=m&&x?await o(XS(e,n)):null,v=m===null||x&&k===null;return{path:n,content:(k==null?void 0:k.content)??"",truncated:(k==null?void 0:k.truncated)??!1,binary:(k==null?void 0:k.binary)??(m==null?void 0:m.presentation)==="download",notFound:v,presentation:k?k.binary?"download":"text":(m==null?void 0:m.presentation)??"download"}},_=async()=>{for(const m of[`artifacts/${n}`,n]){const x=await o(Rv(e,m,{sessionId:r})).catch(()=>(i.throwIfAborted(),null));if(x&&!x.notFound)return x}return null},p=await(l?o(N$(n)).then(m=>({source:"absolute",file:m})):u?h().then(async m=>{if(!m.notFound)return{source:"artifact",file:m};const x=await _();return x?{source:"checkout",file:x}:{source:"artifact",file:m}}):o(Rv(e,n,{sessionId:r,ref:s})).then(m=>m.notFound&&!s?h().then(x=>x.notFound?{source:"checkout",file:m}:{source:"artifact",file:x,checkoutRoot:m.root}):{source:"checkout",file:m}));return i.throwIfAborted(),p}});async function uwn(e,n,t,r,s){if(Qd(s))return;const i=T$(e,n,t,r,s),a=[i.queryKey,...t==="abs"?[N$(n).queryKey]:[Rv(e,n,{sessionId:r,ref:s}).queryKey,Rv(e,`artifacts/${n}`,{sessionId:r}).queryKey,XS(e,n).queryKey,j$(e,n).queryKey]];await Promise.all(a.map(o=>rt.cancelQueries({queryKey:o,exact:!0}))),await Promise.all(a.map(o=>rt.invalidateQueries({queryKey:o,exact:!0,refetchType:"none"}))),await rt.invalidateQueries({queryKey:i.queryKey,exact:!0})}function _wn(e,n,t){return t?n.flatMap(r=>{if(r.status!=="starting"&&r.status!=="running")return[];const s=e.find(i=>i.id===r.experimentId&&i.chatSessionId===t);return s?[{experiment:s,run:r}]:[]}):[]}const vj={done:{tone:"success",live:!1},failed:{tone:"danger",live:!1},running:{tone:"info",live:!0},starting:{tone:"warning",live:!0},cancelling:{tone:"caution",live:!0},cancelled:{tone:"caution",live:!1},editing:{tone:"accent",live:!0},idle:{tone:"neutral",live:!1}};function fwn(e){return vj[e]??vj.idle}const dwn={done:hL,failed:Min,running:Kin,starting:ean,cancelling:din,cancelled:ain,editing:Ein,idle:Pin};function YS(e){const n=dwn[e];return n?n():e.charAt(0).toUpperCase()+e.slice(1)}function ec({status:e,label:n,className:t}){const r=fwn(e);return f.jsx(yd,{tone:r.tone,live:r.live,className:t,children:n??YS(e)})}const G_={local:hD,tinker:bje,hf:vze,modal:$ze,k8s:Cze,ssh:fje,slurm:ije,ray:Zze,openresearch:Gze};function bj(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);n&&(r=r.filter((function(s){return Object.getOwnPropertyDescriptor(e,s).enumerable}))),t.push.apply(t,r)}return t}function Pn(e){for(var n=1;n=0||(h[l]=a[l]);return h})(e,n);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(e,t)&&(s[t]=e[t])}return s}function En(e,n){return R$(e)||(function(t,r){var s=t==null?null:typeof Symbol<"u"&&t[Symbol.iterator]||t["@@iterator"];if(s!=null){var i,a,o,l,u=[],h=!0,_=!1;try{if(o=(s=s.call(t)).next,r===0){if(Object(s)!==s)return;h=!1}else for(;!(h=(i=o.call(s)).done)&&(u.push(i.value),u.length!==r);h=!0);}catch(p){_=!0,a=p}finally{try{if(!h&&s.return!=null&&(l=s.return(),Object(l)!==l))return}finally{if(_)throw a}}return u}})(e,n)||$b(e,n)||O$()}function A$(e){return R$(e)||M$(e)||$b(e)||O$()}function ea(e){return(function(n){if(Array.isArray(n))return $3(n)})(e)||M$(e)||$b(e)||(function(){throw new TypeError(`Invalid attempt to spread non-iterable instance. +In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)})()}function R$(e){if(Array.isArray(e))return e}function M$(e){if(typeof Symbol<"u"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function $b(e,n){if(e){if(typeof e=="string")return $3(e,n);var t=Object.prototype.toString.call(e).slice(8,-1);return t==="Object"&&e.constructor&&(t=e.constructor.name),t==="Map"||t==="Set"?Array.from(e):t==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t)?$3(e,n):void 0}}function $3(e,n){(n==null||n>e.length)&&(n=e.length);for(var t=0,r=new Array(n);t=e.length?{done:!0}:{done:!1,value:e[r++]}},e:function(l){throw l},f:s}}throw new TypeError(`Invalid attempt to iterate non-iterable instance. In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}var i,a=!0,o=!1;return{s:function(){t=t.call(e)},n:function(){var l=t.next();return a=l.done,l},e:function(l){o=!0,i=l},f:function(){try{a||t.return==null||t.return()}finally{if(o)throw i}}}}var t1=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function vm(e,n){return e(n={exports:{}},n.exports),n.exports}var Yi=vm((function(e){/*! Copyright (c) 2018 Jed Watson. Licensed under the MIT License (MIT), see http://jedwatson.github.io/classnames -*/(function(){var n={}.hasOwnProperty;function t(){for(var r=[],s=0;s-1?b.slice(0,y):C;switch(C){case"diff":k--;break e;case"deleted":case"new":var N=b.slice(y+1);N.indexOf("file mode")===0&&(a[C==="new"?"newMode":"oldMode"]=N.slice(10));break;case"similarity":a.similarity=parseInt(b.split(" ")[2],10);break;case"index":var E=b.slice(y+1).split(" "),T=E[0].split("..");a.oldRevision=T[0],a.newRevision=T[1],E[1]&&(a.oldMode=a.newMode=E[1]);break;case"copy":case"rename":var j=b.slice(y+1);j.indexOf("from")===0?a.oldPath=j.slice(5):a.newPath=j.slice(3),w=C;break;case"---":var M=b.slice(y+1),D=m[++k].slice(4);M==="/dev/null"?(D=D.slice(2),w="add"):D==="/dev/null"?(M=M.slice(2),w="delete"):(w="modify",M=M.slice(2),D=D.slice(2)),M&&(a.oldPath=M),D&&(a.newPath=D),p=5;break e}}a.type=w||"modify"}else if(v.indexOf("Binary")===0)a.isBinary=!0,a.type=v.indexOf("/dev/null and")>=0?"add":v.indexOf("and /dev/null")>=0?"delete":"modify",p=2,a=null;else if(p===5)if(v.indexOf("@@")===0){var I=/^@@\s+-([0-9]+)(,([0-9]+))?\s+\+([0-9]+)(,([0-9]+))?/.exec(v);o={content:v,oldStart:I[1]-0,newStart:I[4]-0,oldLines:I[3]-0||1,newLines:I[6]-0||1,changes:[]},a.hunks.push(o),l=o.oldStart,u=o.newStart}else{var P=v.slice(0,1),U={content:v.slice(1)};switch(P){case"+":U.type="insert",U.isInsert=!0,U.lineNumber=u,u++;break;case"-":U.type="delete",U.isDelete=!0,U.lineNumber=l,l++;break;case" ":U.type="normal",U.isNormal=!0,U.oldLineNumber=l,U.newLineNumber=u,l++,u++;break;case"\\":var q=o.changes[o.changes.length-1];q.isDelete||(a.newEndingNewLine=!1),q.isInsert||(a.oldEndingNewLine=!1)}U.type&&o.changes.push(U)}k++}return _}};e.exports=s})()}));function Au(e){return e.type==="insert"}function ta(e){return e.type==="delete"}function nc(e){return e.type==="normal"}function M2n(e,n){var t=n.nearbySequences==="zip"?(function(r){var s=r.reduce((function(i,a,o){var l=En(i,3),u=l[0],h=l[1],_=l[2];return h?Au(a)&&_>=0?(u.splice(_+1,0,a),[u,a,_+2]):(u.push(a),[u,a,ta(a)&&ta(h)?_:o]):(u.push(a),[u,a,ta(a)?o:-1])}),[[],null,-1]);return En(s,1)[0]})(e.changes):e.changes;return Bn(Bn({},e),{},{isPlain:!1,changes:t})}function B3(e){var n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},t=(function(r){if(r.startsWith("diff --git"))return r;var s=r.indexOf(` +*/(function(){var n={}.hasOwnProperty;function t(){for(var r=[],s=0;s-1?b.slice(0,y):C;switch(C){case"diff":k--;break e;case"deleted":case"new":var E=b.slice(y+1);E.indexOf("file mode")===0&&(a[C==="new"?"newMode":"oldMode"]=E.slice(10));break;case"similarity":a.similarity=parseInt(b.split(" ")[2],10);break;case"index":var N=b.slice(y+1).split(" "),A=N[0].split("..");a.oldRevision=A[0],a.newRevision=A[1],N[1]&&(a.oldMode=a.newMode=N[1]);break;case"copy":case"rename":var j=b.slice(y+1);j.indexOf("from")===0?a.oldPath=j.slice(5):a.newPath=j.slice(3),w=C;break;case"---":var M=b.slice(y+1),L=m[++k].slice(4);M==="/dev/null"?(L=L.slice(2),w="add"):L==="/dev/null"?(M=M.slice(2),w="delete"):(w="modify",M=M.slice(2),L=L.slice(2)),M&&(a.oldPath=M),L&&(a.newPath=L),p=5;break e}}a.type=w||"modify"}else if(v.indexOf("Binary")===0)a.isBinary=!0,a.type=v.indexOf("/dev/null and")>=0?"add":v.indexOf("and /dev/null")>=0?"delete":"modify",p=2,a=null;else if(p===5)if(v.indexOf("@@")===0){var I=/^@@\s+-([0-9]+)(,([0-9]+))?\s+\+([0-9]+)(,([0-9]+))?/.exec(v);o={content:v,oldStart:I[1]-0,newStart:I[4]-0,oldLines:I[3]-0||1,newLines:I[6]-0||1,changes:[]},a.hunks.push(o),l=o.oldStart,u=o.newStart}else{var B=v.slice(0,1),q={content:v.slice(1)};switch(B){case"+":q.type="insert",q.isInsert=!0,q.lineNumber=u,u++;break;case"-":q.type="delete",q.isDelete=!0,q.lineNumber=l,l++;break;case" ":q.type="normal",q.isNormal=!0,q.oldLineNumber=l,q.newLineNumber=u,l++,u++;break;case"\\":var U=o.changes[o.changes.length-1];U.isDelete||(a.newEndingNewLine=!1),U.isInsert||(a.oldEndingNewLine=!1)}q.type&&o.changes.push(q)}k++}return _}};e.exports=s})()}));function Au(e){return e.type==="insert"}function ta(e){return e.type==="delete"}function rc(e){return e.type==="normal"}function gwn(e,n){var t=n.nearbySequences==="zip"?(function(r){var s=r.reduce((function(i,a,o){var l=En(i,3),u=l[0],h=l[1],_=l[2];return h?Au(a)&&_>=0?(u.splice(_+1,0,a),[u,a,_+2]):(u.push(a),[u,a,ta(a)&&ta(h)?_:o]):(u.push(a),[u,a,ta(a)?o:-1])}),[[],null,-1]);return En(s,1)[0]})(e.changes):e.changes;return Pn(Pn({},e),{},{isPlain:!1,changes:t})}function B3(e){var n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},t=(function(r){if(r.startsWith("diff --git"))return r;var s=r.indexOf(` `),i=r.indexOf(` `,s+1),a=r.slice(0,s),o=r.slice(s+1,i),l=a.split(" ").slice(1,-3).join(" "),u=o.split(" ").slice(1,-3).join(" ");return["diff --git a/".concat(l," b/").concat(u),"index 1111111..2222222 100644","--- a/".concat(l),"+++ b/".concat(u),r.slice(i+1)].join(` -`)})(e.trimStart());return R2n.parse(t).map((function(r){return(function(s,i){var a=s.hunks.map((function(o){return M2n(o,i)}));return Bn(Bn({},s),{},{hunks:a})})(r,n)}))}function O2n(e){return e[0]}function D2n(e){return e[e.length-1]}function P3(e){return["".concat(e,"Start"),"".concat(e,"Lines")]}function E0(e){return e==="old"?function(n){return Au(n)?-1:nc(n)?n.oldLineNumber:n.lineNumber}:function(n){return ta(n)?-1:nc(n)?n.newLineNumber:n.lineNumber}}function O$(e,n){return function(t,r){var s=t[e],i=s+t[n];return r>=s&&r=i&&s-1},q2n=function(e,n){var t=this.__data__,r=Bb(t,e);return r<0?(++this.size,t.push([e,n])):t[r][1]=n,this};function id(e){var n=-1,t=e==null?0:e.length;for(this.clear();++no))return!1;var u=i.get(e),h=i.get(n);if(u&&h)return u==n&&h==e;var _=-1,p=!0,m=2&t?new Ewn:void 0;for(i.set(e,n),i.set(n,e);++_-1&&e%1==0&&e-1&&e%1==0&&e<=9007199254740991},pr={};pr["[object Float32Array]"]=pr["[object Float64Array]"]=pr["[object Int8Array]"]=pr["[object Int16Array]"]=pr["[object Int32Array]"]=pr["[object Uint8Array]"]=pr["[object Uint8ClampedArray]"]=pr["[object Uint16Array]"]=pr["[object Uint32Array]"]=!0,pr["[object Arguments]"]=pr["[object Array]"]=pr["[object ArrayBuffer]"]=pr["[object Boolean]"]=pr["[object DataView]"]=pr["[object Date]"]=pr["[object Error]"]=pr["[object Function]"]=pr["[object Map]"]=pr["[object Number]"]=pr["[object Object]"]=pr["[object RegExp]"]=pr["[object Set]"]=pr["[object String]"]=pr["[object WeakMap]"]=!1;var Hwn=function(e){return th(e)&&e6(e.length)&&!!pr[Sh(e)]},qwn=function(e){return function(n){return e(n)}},Nj=vm((function(e,n){var t=n&&!n.nodeType&&n,r=t&&e&&!e.nodeType&&e,s=r&&r.exports===t&&I$.process,i=(function(){try{var a=r&&r.require&&r.require("util").types;return a||s&&s.binding&&s.binding("util")}catch{}})();e.exports=i})),zj=Nj&&Nj.isTypedArray,t6=zj?qwn(zj):Hwn,Uwn=Object.prototype.hasOwnProperty,Gwn=function(e,n){var t=ia(e),r=!t&&qb(e),s=!t&&!r&&Ov(e),i=!t&&!r&&!s&&t6(e),a=t||r||s||i,o=a?Iwn(e.length,String):[],l=o.length;for(var u in e)!Uwn.call(e,u)||a&&(u=="length"||s&&(u=="offset"||u=="parent")||i&&(u=="buffer"||u=="byteLength"||u=="byteOffset")||q$(u,l))||o.push(u);return o},Vwn=Object.prototype,U$=function(e){var n=e&&e.constructor;return e===(typeof n=="function"&&n.prototype||Vwn)},Kwn=(function(e,n){return function(t){return e(n(t))}})(Object.keys,Object),Wwn=Object.prototype.hasOwnProperty,G$=function(e){if(!U$(e))return Kwn(e);var n=[];for(var t in Object(e))Wwn.call(e,t)&&t!="constructor"&&n.push(t);return n},Ub=function(e){return e!=null&&e6(e.length)&&!B$(e)},n6=function(e){return Ub(e)?Gwn(e):G$(e)},jj=function(e){return Rwn(e,n6,Lwn)},Qwn=Object.prototype.hasOwnProperty,Xwn=function(e,n,t,r,s,i){var a=1&t,o=jj(e),l=o.length;if(l!=jj(n).length&&!a)return!1;for(var u=l;u--;){var h=o[u];if(!(a?h in n:Qwn.call(n,h)))return!1}var _=i.get(e),p=i.get(n);if(_&&p)return _==n&&p==e;var m=!0;i.set(e,n),i.set(n,e);for(var x=a;++u1)return!1;if(e.length===1){var n=En(e,1)[0];return n.type==="text"&&!n.value}return!0}function $4n(e){var n=e.changeKey,t=e.text,r=e.tokens,s=e.renderToken,i=xu(e,L4n),a=s?function(o,l){return s(o,Oj,l)}:Oj;return f.jsx("td",Bn(Bn({},i),{},{"data-change-key":n,children:r?I4n(r)?" ":r.map(a):t||" "}))}var J$=A.memo($4n);function eB(e,n){return function(){var t=n==="old"?Qb(e):Xb(e);return t===-1?void 0:t}}function tB(e,n){return function(t){return e&&t?f.jsx("a",{href:n?"#"+n:void 0,children:t}):t}}function Dv(e,n){return n?function(t){e(),n(t)}:e}function Dj(e,n,t,r){return A.useMemo((function(){var s=Z$(e,(function(i){return function(a){return i&&i(n,a)}}));return s.onMouseEnter=Dv(t,s.onMouseEnter),s.onMouseLeave=Dv(r,s.onMouseLeave),s}),[e,t,r,n])}function Lj(e,n,t,r,s,i,a,o,l){var u={change:n,side:r,inHoverState:o,renderDefault:eB(n,r),wrapInAnchor:tB(s,i)};return f.jsx("td",Bn(Bn({className:e},a),{},{"data-change-key":t,children:l(u)}))}function B4n(e){var n,t,r,s=e.change,i=e.selected,a=e.tokens,o=e.className,l=e.generateLineClassName,u=e.gutterClassName,h=e.codeClassName,_=e.gutterEvents,p=e.codeEvents,m=e.hideGutter,x=e.gutterAnchor,k=e.generateAnchorID,v=e.renderToken,b=e.renderGutter,w=s.type,y=s.content,C=mu(s),N=(n=En(A.useState(!1),2),t=n[0],r=n[1],[t,A.useCallback((function(){return r(!0)}),[]),A.useCallback((function(){return r(!1)}),[])]),E=En(N,3),T=E[0],j=E[1],M=E[2],D=A.useMemo((function(){return{change:s}}),[s]),I=Dj(_,D,j,M),P=Dj(p,D,j,M),U=k(s),q=l({changes:[s],defaultGenerate:function(){return o}}),W=Yi("diff-gutter","diff-gutter-".concat(w),u,{"diff-gutter-selected":i}),H=Yi("diff-code","diff-code-".concat(w),h,{"diff-code-selected":i});return f.jsxs("tr",{id:U,className:Yi("diff-line",q),children:[!m&&Lj(W,s,C,"old",x,U,I,T,b),!m&&Lj(W,s,C,"new",x,U,I,T,b),f.jsx(J$,Bn({className:H,changeKey:C,text:y,tokens:a,renderToken:v},P))]})}var P4n=A.memo(B4n);function F4n(e){var n=e.hideGutter,t=e.element;return f.jsx("tr",{className:"diff-widget",children:f.jsx("td",{colSpan:n?1:3,className:"diff-widget-content",children:t})})}var H4n=["hideGutter","selectedChanges","tokens","lineClassName"],q4n=["hunk","widgets","className"];function U4n(e){var n=e.hunk,t=e.widgets,r=e.className,s=xu(e,q4n),i=(function(a,o){return a.reduce((function(l,u){var h=mu(u);l.push(["change",h,u]);var _=o[h];return _&&l.push(["widget",h,_]),l}),[])})(n.changes,t);return f.jsx("tbody",{className:Yi("diff-hunk",r),children:i.map((function(a){return(function(o,l){var u=En(o,3),h=u[0],_=u[1],p=u[2],m=l.hideGutter,x=l.selectedChanges,k=l.tokens,v=l.lineClassName,b=xu(l,H4n);if(h==="change"){var w=ta(p)?"old":"new",y=ta(p)?Qb(p):Xb(p),C=k?k[w][y-1]:null;return f.jsx(P4n,Bn({className:v,change:p,hideGutter:m,selected:x.includes(_),tokens:C},b),"change".concat(_))}return h==="widget"?f.jsx(F4n,{hideGutter:m,element:p},"widget".concat(_)):null})(a,s)}))})}var nB=0;function r1(e,n,t,r){var s=A.useCallback((function(){return n(e)}),[e,n]),i=A.useCallback((function(){return n("")}),[n]);return A.useMemo((function(){var a=Z$(r,(function(o){return function(l){return o&&o({side:e,change:t},l)}}));return a.onMouseEnter=Dv(s,a.onMouseEnter),a.onMouseLeave=Dv(i,a.onMouseLeave),a}),[t,r,s,e,i])}function uw(e){var n=e.change,t=e.side,r=e.selected,s=e.tokens,i=e.gutterClassName,a=e.codeClassName,o=e.gutterEvents,l=e.codeEvents,u=e.anchorID,h=e.gutterAnchor,_=e.gutterAnchorTarget,p=e.hideGutter,m=e.hover,x=e.renderToken,k=e.renderGutter;if(!n){var v=Yi("diff-gutter","diff-gutter-omit",i),b=Yi("diff-code","diff-code-omit",a);return[!p&&f.jsx("td",{className:v},"gutter"),f.jsx("td",{className:b},"code")]}var w=n.type,y=n.content,C=mu(n),N=t===nB?"old":"new",E=Bn({id:u||void 0,className:Yi("diff-gutter","diff-gutter-".concat(w),I3({"diff-gutter-selected":r},"diff-line-hover-"+N,m),i),children:k({change:n,side:N,inHoverState:m,renderDefault:eB(n,N),wrapInAnchor:tB(h,_)})},o),T=Yi("diff-code","diff-code-".concat(w),I3({"diff-code-selected":r},"diff-line-hover-"+N,m),a);return[!p&&f.jsx("td",Bn(Bn({},E),{},{"data-change-key":C}),"gutter"),f.jsx(J$,Bn({className:T,changeKey:C,text:y,tokens:s,renderToken:x},l),"code")]}function G4n(e){var n=e.className,t=e.oldChange,r=e.newChange,s=e.oldSelected,i=e.newSelected,a=e.oldTokens,o=e.newTokens,l=e.monotonous,u=e.gutterClassName,h=e.codeClassName,_=e.gutterEvents,p=e.codeEvents,m=e.hideGutter,x=e.generateAnchorID,k=e.generateLineClassName,v=e.gutterAnchor,b=e.renderToken,w=e.renderGutter,y=En(A.useState(""),2),C=y[0],N=y[1],E=r1("old",N,t,_),T=r1("new",N,r,_),j=r1("old",N,t,p),M=r1("new",N,r,p),D=t&&x(t),I=r&&x(r),P=k({changes:[t,r],defaultGenerate:function(){return n}}),U={monotonous:l,hideGutter:m,gutterClassName:u,codeClassName:h,gutterEvents:_,codeEvents:p,renderToken:b,renderGutter:w},q=Bn(Bn({},U),{},{change:t,side:nB,selected:s,tokens:a,gutterEvents:E,codeEvents:j,anchorID:D,gutterAnchor:v,gutterAnchorTarget:D,hover:C==="old"}),W=Bn(Bn({},U),{},{change:r,side:1,selected:i,tokens:o,gutterEvents:T,codeEvents:M,anchorID:t===r?null:I,gutterAnchor:v,gutterAnchorTarget:t===r?D:I,hover:C==="new"});if(l)return f.jsx("tr",{className:Yi("diff-line",P),children:uw(t?q:W)});var H=(function(Y,te){return Y&&!te?"diff-line-old-only":!Y&&te?"diff-line-new-only":Y===te?"diff-line-normal":"diff-line-compare"})(t,r);return f.jsxs("tr",{className:Yi("diff-line",H,P),children:[uw(q),uw(W)]})}var V4n=A.memo(G4n);function K4n(e){var n=e.hideGutter,t=e.oldElement,r=e.newElement;return e.monotonous?f.jsx("tr",{className:"diff-widget",children:f.jsx("td",{colSpan:n?1:2,className:"diff-widget-content",children:t||r})}):t===r?f.jsx("tr",{className:"diff-widget",children:f.jsx("td",{colSpan:n?2:4,className:"diff-widget-content",children:t})}):f.jsxs("tr",{className:"diff-widget",children:[f.jsx("td",{colSpan:n?1:2,className:"diff-widget-content",children:t}),f.jsx("td",{colSpan:n?1:2,className:"diff-widget-content",children:r})]})}var W4n=["selectedChanges","monotonous","hideGutter","tokens","lineClassName"],Q4n=["hunk","widgets","className"];function s1(e,n){return(e?mu(e):"00")+(n?mu(n):"00")}function X4n(e){var n=e.hunk,t=e.widgets,r=e.className,s=xu(e,Q4n),i=(function(a,o){for(var l=function(b){if(!b)return null;var w=mu(b);return o[w]||null},u=[],h=0;h=s&&r=i&&s-1},Nwn=function(e,n){var t=this.__data__,r=Bb(t,e);return r<0?(++this.size,t.push([e,n])):t[r][1]=n,this};function id(e){var n=-1,t=e==null?0:e.length;for(this.clear();++no))return!1;var u=i.get(e),h=i.get(n);if(u&&h)return u==n&&h==e;var _=-1,p=!0,m=2&t?new u4n:void 0;for(i.set(e,n),i.set(n,e);++_-1&&e%1==0&&e-1&&e%1==0&&e<=9007199254740991},pr={};pr["[object Float32Array]"]=pr["[object Float64Array]"]=pr["[object Int8Array]"]=pr["[object Int16Array]"]=pr["[object Int32Array]"]=pr["[object Uint8Array]"]=pr["[object Uint8ClampedArray]"]=pr["[object Uint16Array]"]=pr["[object Uint32Array]"]=!0,pr["[object Arguments]"]=pr["[object Array]"]=pr["[object ArrayBuffer]"]=pr["[object Boolean]"]=pr["[object DataView]"]=pr["[object Date]"]=pr["[object Error]"]=pr["[object Function]"]=pr["[object Map]"]=pr["[object Number]"]=pr["[object Object]"]=pr["[object RegExp]"]=pr["[object Set]"]=pr["[object String]"]=pr["[object WeakMap]"]=!1;var E4n=function(e){return th(e)&&e6(e.length)&&!!pr[Sh(e)]},N4n=function(e){return function(n){return e(n)}},Nj=vm((function(e,n){var t=n&&!n.nodeType&&n,r=t&&e&&!e.nodeType&&e,s=r&&r.exports===t&&B$.process,i=(function(){try{var a=r&&r.require&&r.require("util").types;return a||s&&s.binding&&s.binding("util")}catch{}})();e.exports=i})),zj=Nj&&Nj.isTypedArray,t6=zj?N4n(zj):E4n,z4n=Object.prototype.hasOwnProperty,j4n=function(e,n){var t=ia(e),r=!t&&qb(e),s=!t&&!r&&Ov(e),i=!t&&!r&&!s&&t6(e),a=t||r||s||i,o=a?x4n(e.length,String):[],l=o.length;for(var u in e)!z4n.call(e,u)||a&&(u=="length"||s&&(u=="offset"||u=="parent")||i&&(u=="buffer"||u=="byteLength"||u=="byteOffset")||G$(u,l))||o.push(u);return o},T4n=Object.prototype,V$=function(e){var n=e&&e.constructor;return e===(typeof n=="function"&&n.prototype||T4n)},A4n=(function(e,n){return function(t){return e(n(t))}})(Object.keys,Object),R4n=Object.prototype.hasOwnProperty,K$=function(e){if(!V$(e))return A4n(e);var n=[];for(var t in Object(e))R4n.call(e,t)&&t!="constructor"&&n.push(t);return n},Ub=function(e){return e!=null&&e6(e.length)&&!F$(e)},n6=function(e){return Ub(e)?j4n(e):K$(e)},jj=function(e){return m4n(e,n6,y4n)},M4n=Object.prototype.hasOwnProperty,O4n=function(e,n,t,r,s,i){var a=1&t,o=jj(e),l=o.length;if(l!=jj(n).length&&!a)return!1;for(var u=l;u--;){var h=o[u];if(!(a?h in n:M4n.call(n,h)))return!1}var _=i.get(e),p=i.get(n);if(_&&p)return _==n&&p==e;var m=!0;i.set(e,n),i.set(n,e);for(var x=a;++u1)return!1;if(e.length===1){var n=En(e,1)[0];return n.type==="text"&&!n.value}return!0}function w3n(e){var n=e.changeKey,t=e.text,r=e.tokens,s=e.renderToken,i=xu(e,y3n),a=s?function(o,l){return s(o,Oj,l)}:Oj;return f.jsx("td",Pn(Pn({},i),{},{"data-change-key":n,children:r?x3n(r)?" ":r.map(a):t||" "}))}var tB=T.memo(w3n);function nB(e,n){return function(){var t=n==="old"?Qb(e):Xb(e);return t===-1?void 0:t}}function rB(e,n){return function(t){return e&&t?f.jsx("a",{href:n?"#"+n:void 0,children:t}):t}}function Dv(e,n){return n?function(t){e(),n(t)}:e}function Dj(e,n,t,r){return T.useMemo((function(){var s=eB(e,(function(i){return function(a){return i&&i(n,a)}}));return s.onMouseEnter=Dv(t,s.onMouseEnter),s.onMouseLeave=Dv(r,s.onMouseLeave),s}),[e,t,r,n])}function Lj(e,n,t,r,s,i,a,o,l){var u={change:n,side:r,inHoverState:o,renderDefault:nB(n,r),wrapInAnchor:rB(s,i)};return f.jsx("td",Pn(Pn({className:e},a),{},{"data-change-key":t,children:l(u)}))}function k3n(e){var n,t,r,s=e.change,i=e.selected,a=e.tokens,o=e.className,l=e.generateLineClassName,u=e.gutterClassName,h=e.codeClassName,_=e.gutterEvents,p=e.codeEvents,m=e.hideGutter,x=e.gutterAnchor,k=e.generateAnchorID,v=e.renderToken,b=e.renderGutter,w=s.type,y=s.content,C=gu(s),E=(n=En(T.useState(!1),2),t=n[0],r=n[1],[t,T.useCallback((function(){return r(!0)}),[]),T.useCallback((function(){return r(!1)}),[])]),N=En(E,3),A=N[0],j=N[1],M=N[2],L=T.useMemo((function(){return{change:s}}),[s]),I=Dj(_,L,j,M),B=Dj(p,L,j,M),q=k(s),U=l({changes:[s],defaultGenerate:function(){return o}}),W=Yi("diff-gutter","diff-gutter-".concat(w),u,{"diff-gutter-selected":i}),H=Yi("diff-code","diff-code-".concat(w),h,{"diff-code-selected":i});return f.jsxs("tr",{id:q,className:Yi("diff-line",U),children:[!m&&Lj(W,s,C,"old",x,q,I,A,b),!m&&Lj(W,s,C,"new",x,q,I,A,b),f.jsx(tB,Pn({className:H,changeKey:C,text:y,tokens:a,renderToken:v},B))]})}var S3n=T.memo(k3n);function C3n(e){var n=e.hideGutter,t=e.element;return f.jsx("tr",{className:"diff-widget",children:f.jsx("td",{colSpan:n?1:3,className:"diff-widget-content",children:t})})}var E3n=["hideGutter","selectedChanges","tokens","lineClassName"],N3n=["hunk","widgets","className"];function z3n(e){var n=e.hunk,t=e.widgets,r=e.className,s=xu(e,N3n),i=(function(a,o){return a.reduce((function(l,u){var h=gu(u);l.push(["change",h,u]);var _=o[h];return _&&l.push(["widget",h,_]),l}),[])})(n.changes,t);return f.jsx("tbody",{className:Yi("diff-hunk",r),children:i.map((function(a){return(function(o,l){var u=En(o,3),h=u[0],_=u[1],p=u[2],m=l.hideGutter,x=l.selectedChanges,k=l.tokens,v=l.lineClassName,b=xu(l,E3n);if(h==="change"){var w=ta(p)?"old":"new",y=ta(p)?Qb(p):Xb(p),C=k?k[w][y-1]:null;return f.jsx(S3n,Pn({className:v,change:p,hideGutter:m,selected:x.includes(_),tokens:C},b),"change".concat(_))}return h==="widget"?f.jsx(C3n,{hideGutter:m,element:p},"widget".concat(_)):null})(a,s)}))})}var sB=0;function r1(e,n,t,r){var s=T.useCallback((function(){return n(e)}),[e,n]),i=T.useCallback((function(){return n("")}),[n]);return T.useMemo((function(){var a=eB(r,(function(o){return function(l){return o&&o({side:e,change:t},l)}}));return a.onMouseEnter=Dv(s,a.onMouseEnter),a.onMouseLeave=Dv(i,a.onMouseLeave),a}),[t,r,s,e,i])}function uw(e){var n=e.change,t=e.side,r=e.selected,s=e.tokens,i=e.gutterClassName,a=e.codeClassName,o=e.gutterEvents,l=e.codeEvents,u=e.anchorID,h=e.gutterAnchor,_=e.gutterAnchorTarget,p=e.hideGutter,m=e.hover,x=e.renderToken,k=e.renderGutter;if(!n){var v=Yi("diff-gutter","diff-gutter-omit",i),b=Yi("diff-code","diff-code-omit",a);return[!p&&f.jsx("td",{className:v},"gutter"),f.jsx("td",{className:b},"code")]}var w=n.type,y=n.content,C=gu(n),E=t===sB?"old":"new",N=Pn({id:u||void 0,className:Yi("diff-gutter","diff-gutter-".concat(w),I3({"diff-gutter-selected":r},"diff-line-hover-"+E,m),i),children:k({change:n,side:E,inHoverState:m,renderDefault:nB(n,E),wrapInAnchor:rB(h,_)})},o),A=Yi("diff-code","diff-code-".concat(w),I3({"diff-code-selected":r},"diff-line-hover-"+E,m),a);return[!p&&f.jsx("td",Pn(Pn({},N),{},{"data-change-key":C}),"gutter"),f.jsx(tB,Pn({className:A,changeKey:C,text:y,tokens:s,renderToken:x},l),"code")]}function j3n(e){var n=e.className,t=e.oldChange,r=e.newChange,s=e.oldSelected,i=e.newSelected,a=e.oldTokens,o=e.newTokens,l=e.monotonous,u=e.gutterClassName,h=e.codeClassName,_=e.gutterEvents,p=e.codeEvents,m=e.hideGutter,x=e.generateAnchorID,k=e.generateLineClassName,v=e.gutterAnchor,b=e.renderToken,w=e.renderGutter,y=En(T.useState(""),2),C=y[0],E=y[1],N=r1("old",E,t,_),A=r1("new",E,r,_),j=r1("old",E,t,p),M=r1("new",E,r,p),L=t&&x(t),I=r&&x(r),B=k({changes:[t,r],defaultGenerate:function(){return n}}),q={monotonous:l,hideGutter:m,gutterClassName:u,codeClassName:h,gutterEvents:_,codeEvents:p,renderToken:b,renderGutter:w},U=Pn(Pn({},q),{},{change:t,side:sB,selected:s,tokens:a,gutterEvents:N,codeEvents:j,anchorID:L,gutterAnchor:v,gutterAnchorTarget:L,hover:C==="old"}),W=Pn(Pn({},q),{},{change:r,side:1,selected:i,tokens:o,gutterEvents:A,codeEvents:M,anchorID:t===r?null:I,gutterAnchor:v,gutterAnchorTarget:t===r?L:I,hover:C==="new"});if(l)return f.jsx("tr",{className:Yi("diff-line",B),children:uw(t?U:W)});var H=(function(Y,te){return Y&&!te?"diff-line-old-only":!Y&&te?"diff-line-new-only":Y===te?"diff-line-normal":"diff-line-compare"})(t,r);return f.jsxs("tr",{className:Yi("diff-line",H,B),children:[uw(U),uw(W)]})}var T3n=T.memo(j3n);function A3n(e){var n=e.hideGutter,t=e.oldElement,r=e.newElement;return e.monotonous?f.jsx("tr",{className:"diff-widget",children:f.jsx("td",{colSpan:n?1:2,className:"diff-widget-content",children:t||r})}):t===r?f.jsx("tr",{className:"diff-widget",children:f.jsx("td",{colSpan:n?2:4,className:"diff-widget-content",children:t})}):f.jsxs("tr",{className:"diff-widget",children:[f.jsx("td",{colSpan:n?1:2,className:"diff-widget-content",children:t}),f.jsx("td",{colSpan:n?1:2,className:"diff-widget-content",children:r})]})}var R3n=["selectedChanges","monotonous","hideGutter","tokens","lineClassName"],M3n=["hunk","widgets","className"];function s1(e,n){return(e?gu(e):"00")+(n?gu(n):"00")}function O3n(e){var n=e.hunk,t=e.widgets,r=e.className,s=xu(e,M3n),i=(function(a,o){for(var l=function(b){if(!b)return null;var w=gu(b);return o[w]||null},u=[],h=0;h=(i==null?void 0:i.value.length))return[e];var o=function(_,p){var m=i.value.slice(_,p);return[].concat(ea(s),[Bn(Bn({},i),{},{value:m})])};if(n>0){var l=o(0,n);a.push(_d(l))}var u=o(Math.max(n,0),t);if(a.push(r?(function(_,p){return[p].concat(ea(_d(_)))})(u,r):_d(u)),t1&&arguments[1]!==void 0?arguments[1]:[],t=arguments.length>2&&arguments[2]!==void 0?arguments[2]:[];if(e.children){var r=e.children,s=xu(e,m3n);t.push(s);var i,a=ZS(r);try{for(a.s();!(i=a.n()).done;)aB(i.value,n,t)}catch(o){a.e(o)}finally{a.f()}t.pop()}else n.push(_d([].concat(ea(t.slice(1)),[e])));return n}function g3n(e){return e.reduce((function(n,t){var r=n[n.length-1],s=(function(l){var u=o6(l);return u.value.includes(` +`)})(n.oldSource,e),r=n.highlight?function(l){return n.refractor.highlight(l,n.language)}:function(l){return[{type:"text",value:l}]};return[i1(r(n.oldSource)),i1(r(t))]}var s=En(Q3n(e),2),i=s[0],a=s[1],o=n.highlight?function(l){return i1(n.refractor.highlight(l,n.language))}:function(l){return i1([{type:"text",value:l}])};return[o(i),o(a)]}function _d(e){return e.map((function(n){return Pn({},n)}))}function Y3n(e,n){return[].concat(ea(_d(e.slice(0,-1))),[n])}function Z3n(e){return e.type==="text"}function o6(e){var n=e[e.length-1];if(Z3n(n))return n;throw new Error("Invalid token path with leaf of type ".concat(n.type))}function J3n(e,n,t,r){var s=e.slice(0,-1),i=o6(e),a=[];if(t<=0||n>=(i==null?void 0:i.value.length))return[e];var o=function(_,p){var m=i.value.slice(_,p);return[].concat(ea(s),[Pn(Pn({},i),{},{value:m})])};if(n>0){var l=o(0,n);a.push(_d(l))}var u=o(Math.max(n,0),t);if(a.push(r?(function(_,p){return[p].concat(ea(_d(_)))})(u,r):_d(u)),t1&&arguments[1]!==void 0?arguments[1]:[],t=arguments.length>2&&arguments[2]!==void 0?arguments[2]:[];if(e.children){var r=e.children,s=xu(e,e5n);t.push(s);var i,a=ZS(r);try{for(a.s();!(i=a.n()).done;)lB(i.value,n,t)}catch(o){a.e(o)}finally{a.f()}t.pop()}else n.push(_d([].concat(ea(t.slice(1)),[e])));return n}function t5n(e){return e.reduce((function(n,t){var r=n[n.length-1],s=(function(l){var u=o6(l);return u.value.includes(` `)?u.value.split(` -`).map((function(h){return d3n(l,Bn(Bn({},u),{},{value:h}))})):[l]})(t),i=j$(s),a=i[0],o=i.slice(1);return[].concat(ea(n.slice(0,-1)),[[].concat(ea(r),[a])],ea(o.map((function(l){return[l]}))))}),[[]])}function Pj(e){return g3n(aB(e))}var v3n=function(e,n,t){var r=(t=typeof t=="function"?t:void 0)?t(e,n):void 0;return r===void 0?Gb(e,n,void 0,t):!!r},b3n=function(e,n){return Gb(e,n)},y3n=function(e){var n=e==null?0:e.length;return n?e[n-1]:void 0};function x3n(e,n){if(!e.children)throw new Error("parent node missing children property");var t,r,s=y3n(e.children);return s&&(r=n,(t=s).type===r.type&&(t.type==="text"||t.children&&r.children&&v3n(t,r,(function(i,a,o){return o==="chlidren"||b3n(i,a)}))))?e.children[e.children.length-1]=(function(i,a){return"value"in i&&"value"in a?Bn(Bn({},i),{},{value:"".concat(i.value).concat(a.value)}):i})(s,n):e.children.push(n),e.children[e.children.length-1]}function Fj(e){var n,t={type:"root",children:[]},r=ZS(e);try{var s=function(){var i=n.value;i.reduce((function(a,o,l){return x3n(a,l===i.length-1?Bn({},o):Bn(Bn({},o),{},{children:[]}))}),t)};for(r.s();!(n=r.n()).done;)s()}catch(i){r.e(i)}finally{r.f()}return t}var w3n=Object.prototype.hasOwnProperty,k3n=sB((function(e,n,t){w3n.call(e,t)?e[t].push(n):i6(e,t,[n])})),S3n=Object.prototype.hasOwnProperty,C3n=function(e){if(e==null)return!0;if(Ub(e)&&(ia(e)||typeof e=="string"||typeof e.splice=="function"||Ov(e)||t6(e)||qb(e)))return!e.length;var n=G3(e);if(n=="[object Map]"||n=="[object Set]")return!e.size;if(U$(e))return!G$(e).length;for(var t in e)if(S3n.call(e,t))return!1;return!0},E3n=function(e,n){var t=n.start,r=n.length,s=t+r,i=e.reduce((function(a,o){var l=En(a,2),u=l[0],h=l[1],_=h+o6(o).value.length;if(h>s||_r.length?t:r,l=t.length>r.length?r:t,u=o.indexOf(l);if(u!=-1)return a=[new n.Diff(1,o.substring(0,u)),new n.Diff(0,l),new n.Diff(1,o.substring(u+l.length))],t.length>r.length&&(a[0][0]=a[2][0]=-1),a;if(l.length==1)return[new n.Diff(-1,t),new n.Diff(1,r)];var h=this.diff_halfMatch_(t,r);if(h){var _=h[0],p=h[1],m=h[2],x=h[3],k=h[4],v=this.diff_main(_,m,s,i),b=this.diff_main(p,x,s,i);return v.concat([new n.Diff(0,k)],b)}return s&&t.length>100&&r.length>100?this.diff_lineMode_(t,r,i):this.diff_bisect_(t,r,i)},n.prototype.diff_lineMode_=function(t,r,s){var i=this.diff_linesToChars_(t,r);t=i.chars1,r=i.chars2;var a=i.lineArray,o=this.diff_main(t,r,!1,s);this.diff_charsToLines_(o,a),this.diff_cleanupSemantic(o),o.push(new n.Diff(0,""));for(var l=0,u=0,h=0,_="",p="";l=1&&h>=1){o.splice(l-u-h,u+h),l=l-u-h;for(var m=this.diff_main(_,p,!1,s),x=m.length-1;x>=0;x--)o.splice(l,0,m[x]);l+=m.length}h=0,u=0,_="",p=""}l++}return o.pop(),o},n.prototype.diff_bisect_=function(t,r,s){for(var i=t.length,a=r.length,o=Math.ceil((i+a)/2),l=o,u=2*o,h=new Array(u),_=new Array(u),p=0;ps);y++){for(var C=-y+k;C<=y-v;C+=2){for(var N=l+C,E=(I=C==-y||C!=y&&h[N-1]i)v+=2;else if(E>a)k+=2;else if(x&&(M=l+m-C)>=0&&M=(j=i-_[M]))return this.diff_bisectSplit_(t,r,I,E,s)}for(var T=-y+b;T<=y-w;T+=2){for(var j,M=l+T,D=(j=T==-y||T!=y&&_[M-1]<_[M+1]?_[M+1]:_[M-1]+1)-T;ji)w+=2;else if(D>a)b+=2;else if(!x&&(N=l+m-T)>=0&&N=(j=i-j))return this.diff_bisectSplit_(t,r,I,E,s)}}}return[new n.Diff(-1,t),new n.Diff(1,r)]},n.prototype.diff_bisectSplit_=function(t,r,s,i,a){var o=t.substring(0,s),l=r.substring(0,i),u=t.substring(s),h=r.substring(i),_=this.diff_main(o,l,!1,a),p=this.diff_main(u,h,!1,a);return _.concat(p)},n.prototype.diff_linesToChars_=function(t,r){var s=[],i={};function a(u){for(var h="",_=0,p=-1,m=s.length;pi?t=t.substring(s-i):sr.length?t:r,i=t.length>r.length?r:t;if(s.length<4||2*i.length=k.length?[w,y,C,N,j]:null}var l,u,h,_,p,m=o(s,i,Math.ceil(s.length/4)),x=o(s,i,Math.ceil(s.length/2));return m||x?(l=x?m&&m[4].length>x[4].length?m:x:m,t.length>r.length?(u=l[0],h=l[1],_=l[2],p=l[3]):(_=l[0],p=l[1],u=l[2],h=l[3]),[u,h,_,p,l[4]]):null},n.prototype.diff_cleanupSemantic=function(t){for(var r=!1,s=[],i=0,a=null,o=0,l=0,u=0,h=0,_=0;o0?s[i-1]:-1,l=0,u=0,h=0,_=0,a=null,r=!0)),o++;for(r&&this.diff_cleanupMerge(t),this.diff_cleanupSemanticLossless(t),o=1;o=k?(x>=p.length/2||x>=m.length/2)&&(t.splice(o,0,new n.Diff(0,m.substring(0,x))),t[o-1][1]=p.substring(0,p.length-x),t[o+1][1]=m.substring(x),o++):(k>=p.length/2||k>=m.length/2)&&(t.splice(o,0,new n.Diff(0,p.substring(0,k))),t[o-1][0]=1,t[o-1][1]=m.substring(0,m.length-k),t[o+1][0]=-1,t[o+1][1]=p.substring(k),o++),o++}o++}},n.prototype.diff_cleanupSemanticLossless=function(t){function r(k,v){if(!k||!v)return 6;var b=k.charAt(k.length-1),w=v.charAt(0),y=b.match(n.nonAlphaNumericRegex_),C=w.match(n.nonAlphaNumericRegex_),N=y&&b.match(n.whitespaceRegex_),E=C&&w.match(n.whitespaceRegex_),T=N&&b.match(n.linebreakRegex_),j=E&&w.match(n.linebreakRegex_),M=T&&k.match(n.blanklineEndRegex_),D=j&&v.match(n.blanklineStartRegex_);return M||D?5:T||j?4:y&&!N&&E?3:N||E?2:y||C?1:0}for(var s=1;s=m&&(m=x,h=i,_=a,p=o)}t[s-1][1]!=h&&(h?t[s-1][1]=h:(t.splice(s-1,1),s--),t[s][1]=_,p?t[s+1][1]=p:(t.splice(s+1,1),s--))}s++}},n.nonAlphaNumericRegex_=/[^a-zA-Z0-9]/,n.whitespaceRegex_=/\s/,n.linebreakRegex_=/[\r\n]/,n.blanklineEndRegex_=/\n\r?\n$/,n.blanklineStartRegex_=/^\r?\n\r?\n/,n.prototype.diff_cleanupEfficiency=function(t){for(var r=!1,s=[],i=0,a=null,o=0,l=!1,u=!1,h=!1,_=!1;o0?s[i-1]:-1,h=_=!1),r=!0)),o++;r&&this.diff_cleanupMerge(t)},n.prototype.diff_cleanupMerge=function(t){t.push(new n.Diff(0,""));for(var r,s=0,i=0,a=0,o="",l="";s1?(i!==0&&a!==0&&((r=this.diff_commonPrefix(l,o))!==0&&(s-i-a>0&&t[s-i-a-1][0]==0?t[s-i-a-1][1]+=l.substring(0,r):(t.splice(0,0,new n.Diff(0,l.substring(0,r))),s++),l=l.substring(r),o=o.substring(r)),(r=this.diff_commonSuffix(l,o))!==0&&(t[s][1]=l.substring(l.length-r)+t[s][1],l=l.substring(0,l.length-r),o=o.substring(0,o.length-r))),s-=i+a,t.splice(s,i+a),o.length&&(t.splice(s,0,new n.Diff(-1,o)),s++),l.length&&(t.splice(s,0,new n.Diff(1,l)),s++),s++):s!==0&&t[s-1][0]==0?(t[s-1][1]+=t[s][1],t.splice(s,1)):s++,a=0,i=0,o="",l=""}t[t.length-1][1]===""&&t.pop();var u=!1;for(s=1;sr));s++)o=i,l=a;return t.length!=s&&t[s][0]===-1?l:l+(r-o)},n.prototype.diff_prettyHtml=function(t){for(var r=[],s=/&/g,i=//g,o=/\n/g,l=0;l");switch(u){case 1:r[l]=''+h+"";break;case-1:r[l]=''+h+"";break;case 0:r[l]=""+h+""}}return r.join("")},n.prototype.diff_text1=function(t){for(var r=[],s=0;sthis.Match_MaxBits)throw new Error("Pattern too long for this browser.");var i=this.match_alphabet_(r),a=this;function o(E,T){var j=E/r.length,M=Math.abs(s-T);return a.Match_Distance?j+M/a.Match_Distance:M?1:j}var l=this.Match_Threshold,u=t.indexOf(r,s);u!=-1&&(l=Math.min(o(0,u),l),(u=t.lastIndexOf(r,s+r.length))!=-1&&(l=Math.min(o(0,u),l)));var h,_,p=1<=v;y--){var C=i[t.charAt(y-1)];if(w[y]=k===0?(w[y+1]<<1|1)&C:(w[y+1]<<1|1)&C|(m[y+1]|m[y])<<1|1|m[y+1],w[y]&p){var N=o(k,y-1);if(N<=l){if(l=N,!((u=y-1)>s))break;v=Math.max(1,2*s-u)}}}if(o(k+1,s)>l)break;m=w}return u},n.prototype.match_alphabet_=function(t){for(var r={},s=0;s2&&(this.diff_cleanupSemantic(a),this.diff_cleanupEfficiency(a));else if(t&&typeof t=="object"&&r===void 0&&s===void 0)a=t,i=this.diff_text1(a);else if(typeof t=="string"&&r&&typeof r=="object"&&s===void 0)i=t,a=r;else{if(typeof t!="string"||typeof r!="string"||!s||typeof s!="object")throw new Error("Unknown call format to patch_make.");i=t,a=s}if(a.length===0)return[];for(var o=[],l=new n.patch_obj,u=0,h=0,_=0,p=i,m=i,x=0;x=2*this.Patch_Margin&&u&&(this.patch_addContext_(l,p),o.push(l),l=new n.patch_obj,u=0,p=m,h=_)}k!==1&&(h+=v.length),k!==-1&&(_+=v.length)}return u&&(this.patch_addContext_(l,p),o.push(l)),o},n.prototype.patch_deepCopy=function(t){for(var r=[],s=0;sthis.Match_MaxBits?(l=this.match_main(r,_.substring(0,this.Match_MaxBits),h))!=-1&&((p=this.match_main(r,_.substring(_.length-this.Match_MaxBits),h+_.length-this.Match_MaxBits))==-1||l>=p)&&(l=-1):l=this.match_main(r,_,h),l==-1)a[o]=!1,i-=t[o].length2-t[o].length1;else if(a[o]=!0,i=l-h,_==(u=p==-1?r.substring(l,l+_.length):r.substring(l,p+this.Match_MaxBits)))r=r.substring(0,l)+this.diff_text2(t[o].diffs)+r.substring(l+_.length);else{var m=this.diff_main(_,u,!1);if(_.length>this.Match_MaxBits&&this.diff_levenshtein(m)/_.length>this.Patch_DeleteThreshold)a[o]=!1;else{this.diff_cleanupSemanticLossless(m);for(var x,k=0,v=0;vo[0][1].length){var l=r-o[0][1].length;o[0][1]=s.substring(o[0][1].length)+o[0][1],a.start1-=l,a.start2-=l,a.length1+=l,a.length2+=l}return(o=(a=t[t.length-1]).diffs).length==0||o[o.length-1][0]!=0?(o.push(new n.Diff(0,s)),a.length1+=r,a.length2+=r):r>o[o.length-1][1].length&&(l=r-o[o.length-1][1].length,o[o.length-1][1]+=s.substring(0,l),a.length1+=l,a.length2+=l),s},n.prototype.patch_splitMax=function(t){for(var r=this.Match_MaxBits,s=0;s2*r?(u.length1+=p.length,a+=p.length,h=!1,u.diffs.push(new n.Diff(_,p)),i.diffs.shift()):(p=p.substring(0,r-u.length1-this.Patch_Margin),u.length1+=p.length,a+=p.length,_===0?(u.length2+=p.length,o+=p.length):h=!1,u.diffs.push(new n.Diff(_,p)),p==i.diffs[0][1]?i.diffs.shift():i.diffs[0][1]=i.diffs[0][1].substring(p.length))}l=(l=this.diff_text2(u.diffs)).substring(l.length-this.Patch_Margin);var m=this.diff_text1(i.diffs).substring(0,this.Patch_Margin);m!==""&&(u.length1+=m.length,u.length2+=m.length,u.diffs.length!==0&&u.diffs[u.diffs.length-1][0]===0?u.diffs[u.diffs.length-1][1]+=m:u.diffs.push(new n.Diff(0,m))),h||t.splice(++s,0,u)}}},n.prototype.patch_toText=function(t){for(var r=[],s=0;ss||_r.length?t:r,l=t.length>r.length?r:t,u=o.indexOf(l);if(u!=-1)return a=[new n.Diff(1,o.substring(0,u)),new n.Diff(0,l),new n.Diff(1,o.substring(u+l.length))],t.length>r.length&&(a[0][0]=a[2][0]=-1),a;if(l.length==1)return[new n.Diff(-1,t),new n.Diff(1,r)];var h=this.diff_halfMatch_(t,r);if(h){var _=h[0],p=h[1],m=h[2],x=h[3],k=h[4],v=this.diff_main(_,m,s,i),b=this.diff_main(p,x,s,i);return v.concat([new n.Diff(0,k)],b)}return s&&t.length>100&&r.length>100?this.diff_lineMode_(t,r,i):this.diff_bisect_(t,r,i)},n.prototype.diff_lineMode_=function(t,r,s){var i=this.diff_linesToChars_(t,r);t=i.chars1,r=i.chars2;var a=i.lineArray,o=this.diff_main(t,r,!1,s);this.diff_charsToLines_(o,a),this.diff_cleanupSemantic(o),o.push(new n.Diff(0,""));for(var l=0,u=0,h=0,_="",p="";l=1&&h>=1){o.splice(l-u-h,u+h),l=l-u-h;for(var m=this.diff_main(_,p,!1,s),x=m.length-1;x>=0;x--)o.splice(l,0,m[x]);l+=m.length}h=0,u=0,_="",p=""}l++}return o.pop(),o},n.prototype.diff_bisect_=function(t,r,s){for(var i=t.length,a=r.length,o=Math.ceil((i+a)/2),l=o,u=2*o,h=new Array(u),_=new Array(u),p=0;ps);y++){for(var C=-y+k;C<=y-v;C+=2){for(var E=l+C,N=(I=C==-y||C!=y&&h[E-1]i)v+=2;else if(N>a)k+=2;else if(x&&(M=l+m-C)>=0&&M=(j=i-_[M]))return this.diff_bisectSplit_(t,r,I,N,s)}for(var A=-y+b;A<=y-w;A+=2){for(var j,M=l+A,L=(j=A==-y||A!=y&&_[M-1]<_[M+1]?_[M+1]:_[M-1]+1)-A;ji)w+=2;else if(L>a)b+=2;else if(!x&&(E=l+m-A)>=0&&E=(j=i-j))return this.diff_bisectSplit_(t,r,I,N,s)}}}return[new n.Diff(-1,t),new n.Diff(1,r)]},n.prototype.diff_bisectSplit_=function(t,r,s,i,a){var o=t.substring(0,s),l=r.substring(0,i),u=t.substring(s),h=r.substring(i),_=this.diff_main(o,l,!1,a),p=this.diff_main(u,h,!1,a);return _.concat(p)},n.prototype.diff_linesToChars_=function(t,r){var s=[],i={};function a(u){for(var h="",_=0,p=-1,m=s.length;pi?t=t.substring(s-i):sr.length?t:r,i=t.length>r.length?r:t;if(s.length<4||2*i.length=k.length?[w,y,C,E,j]:null}var l,u,h,_,p,m=o(s,i,Math.ceil(s.length/4)),x=o(s,i,Math.ceil(s.length/2));return m||x?(l=x?m&&m[4].length>x[4].length?m:x:m,t.length>r.length?(u=l[0],h=l[1],_=l[2],p=l[3]):(_=l[0],p=l[1],u=l[2],h=l[3]),[u,h,_,p,l[4]]):null},n.prototype.diff_cleanupSemantic=function(t){for(var r=!1,s=[],i=0,a=null,o=0,l=0,u=0,h=0,_=0;o0?s[i-1]:-1,l=0,u=0,h=0,_=0,a=null,r=!0)),o++;for(r&&this.diff_cleanupMerge(t),this.diff_cleanupSemanticLossless(t),o=1;o=k?(x>=p.length/2||x>=m.length/2)&&(t.splice(o,0,new n.Diff(0,m.substring(0,x))),t[o-1][1]=p.substring(0,p.length-x),t[o+1][1]=m.substring(x),o++):(k>=p.length/2||k>=m.length/2)&&(t.splice(o,0,new n.Diff(0,p.substring(0,k))),t[o-1][0]=1,t[o-1][1]=m.substring(0,m.length-k),t[o+1][0]=-1,t[o+1][1]=p.substring(k),o++),o++}o++}},n.prototype.diff_cleanupSemanticLossless=function(t){function r(k,v){if(!k||!v)return 6;var b=k.charAt(k.length-1),w=v.charAt(0),y=b.match(n.nonAlphaNumericRegex_),C=w.match(n.nonAlphaNumericRegex_),E=y&&b.match(n.whitespaceRegex_),N=C&&w.match(n.whitespaceRegex_),A=E&&b.match(n.linebreakRegex_),j=N&&w.match(n.linebreakRegex_),M=A&&k.match(n.blanklineEndRegex_),L=j&&v.match(n.blanklineStartRegex_);return M||L?5:A||j?4:y&&!E&&N?3:E||N?2:y||C?1:0}for(var s=1;s=m&&(m=x,h=i,_=a,p=o)}t[s-1][1]!=h&&(h?t[s-1][1]=h:(t.splice(s-1,1),s--),t[s][1]=_,p?t[s+1][1]=p:(t.splice(s+1,1),s--))}s++}},n.nonAlphaNumericRegex_=/[^a-zA-Z0-9]/,n.whitespaceRegex_=/\s/,n.linebreakRegex_=/[\r\n]/,n.blanklineEndRegex_=/\n\r?\n$/,n.blanklineStartRegex_=/^\r?\n\r?\n/,n.prototype.diff_cleanupEfficiency=function(t){for(var r=!1,s=[],i=0,a=null,o=0,l=!1,u=!1,h=!1,_=!1;o0?s[i-1]:-1,h=_=!1),r=!0)),o++;r&&this.diff_cleanupMerge(t)},n.prototype.diff_cleanupMerge=function(t){t.push(new n.Diff(0,""));for(var r,s=0,i=0,a=0,o="",l="";s1?(i!==0&&a!==0&&((r=this.diff_commonPrefix(l,o))!==0&&(s-i-a>0&&t[s-i-a-1][0]==0?t[s-i-a-1][1]+=l.substring(0,r):(t.splice(0,0,new n.Diff(0,l.substring(0,r))),s++),l=l.substring(r),o=o.substring(r)),(r=this.diff_commonSuffix(l,o))!==0&&(t[s][1]=l.substring(l.length-r)+t[s][1],l=l.substring(0,l.length-r),o=o.substring(0,o.length-r))),s-=i+a,t.splice(s,i+a),o.length&&(t.splice(s,0,new n.Diff(-1,o)),s++),l.length&&(t.splice(s,0,new n.Diff(1,l)),s++),s++):s!==0&&t[s-1][0]==0?(t[s-1][1]+=t[s][1],t.splice(s,1)):s++,a=0,i=0,o="",l=""}t[t.length-1][1]===""&&t.pop();var u=!1;for(s=1;sr));s++)o=i,l=a;return t.length!=s&&t[s][0]===-1?l:l+(r-o)},n.prototype.diff_prettyHtml=function(t){for(var r=[],s=/&/g,i=//g,o=/\n/g,l=0;l");switch(u){case 1:r[l]=''+h+"";break;case-1:r[l]=''+h+"";break;case 0:r[l]=""+h+""}}return r.join("")},n.prototype.diff_text1=function(t){for(var r=[],s=0;sthis.Match_MaxBits)throw new Error("Pattern too long for this browser.");var i=this.match_alphabet_(r),a=this;function o(N,A){var j=N/r.length,M=Math.abs(s-A);return a.Match_Distance?j+M/a.Match_Distance:M?1:j}var l=this.Match_Threshold,u=t.indexOf(r,s);u!=-1&&(l=Math.min(o(0,u),l),(u=t.lastIndexOf(r,s+r.length))!=-1&&(l=Math.min(o(0,u),l)));var h,_,p=1<=v;y--){var C=i[t.charAt(y-1)];if(w[y]=k===0?(w[y+1]<<1|1)&C:(w[y+1]<<1|1)&C|(m[y+1]|m[y])<<1|1|m[y+1],w[y]&p){var E=o(k,y-1);if(E<=l){if(l=E,!((u=y-1)>s))break;v=Math.max(1,2*s-u)}}}if(o(k+1,s)>l)break;m=w}return u},n.prototype.match_alphabet_=function(t){for(var r={},s=0;s2&&(this.diff_cleanupSemantic(a),this.diff_cleanupEfficiency(a));else if(t&&typeof t=="object"&&r===void 0&&s===void 0)a=t,i=this.diff_text1(a);else if(typeof t=="string"&&r&&typeof r=="object"&&s===void 0)i=t,a=r;else{if(typeof t!="string"||typeof r!="string"||!s||typeof s!="object")throw new Error("Unknown call format to patch_make.");i=t,a=s}if(a.length===0)return[];for(var o=[],l=new n.patch_obj,u=0,h=0,_=0,p=i,m=i,x=0;x=2*this.Patch_Margin&&u&&(this.patch_addContext_(l,p),o.push(l),l=new n.patch_obj,u=0,p=m,h=_)}k!==1&&(h+=v.length),k!==-1&&(_+=v.length)}return u&&(this.patch_addContext_(l,p),o.push(l)),o},n.prototype.patch_deepCopy=function(t){for(var r=[],s=0;sthis.Match_MaxBits?(l=this.match_main(r,_.substring(0,this.Match_MaxBits),h))!=-1&&((p=this.match_main(r,_.substring(_.length-this.Match_MaxBits),h+_.length-this.Match_MaxBits))==-1||l>=p)&&(l=-1):l=this.match_main(r,_,h),l==-1)a[o]=!1,i-=t[o].length2-t[o].length1;else if(a[o]=!0,i=l-h,_==(u=p==-1?r.substring(l,l+_.length):r.substring(l,p+this.Match_MaxBits)))r=r.substring(0,l)+this.diff_text2(t[o].diffs)+r.substring(l+_.length);else{var m=this.diff_main(_,u,!1);if(_.length>this.Match_MaxBits&&this.diff_levenshtein(m)/_.length>this.Patch_DeleteThreshold)a[o]=!1;else{this.diff_cleanupSemanticLossless(m);for(var x,k=0,v=0;vo[0][1].length){var l=r-o[0][1].length;o[0][1]=s.substring(o[0][1].length)+o[0][1],a.start1-=l,a.start2-=l,a.length1+=l,a.length2+=l}return(o=(a=t[t.length-1]).diffs).length==0||o[o.length-1][0]!=0?(o.push(new n.Diff(0,s)),a.length1+=r,a.length2+=r):r>o[o.length-1][1].length&&(l=r-o[o.length-1][1].length,o[o.length-1][1]+=s.substring(0,l),a.length1+=l,a.length2+=l),s},n.prototype.patch_splitMax=function(t){for(var r=this.Match_MaxBits,s=0;s2*r?(u.length1+=p.length,a+=p.length,h=!1,u.diffs.push(new n.Diff(_,p)),i.diffs.shift()):(p=p.substring(0,r-u.length1-this.Patch_Margin),u.length1+=p.length,a+=p.length,_===0?(u.length2+=p.length,o+=p.length):h=!1,u.diffs.push(new n.Diff(_,p)),p==i.diffs[0][1]?i.diffs.shift():i.diffs[0][1]=i.diffs[0][1].substring(p.length))}l=(l=this.diff_text2(u.diffs)).substring(l.length-this.Patch_Margin);var m=this.diff_text1(i.diffs).substring(0,this.Patch_Margin);m!==""&&(u.length1+=m.length,u.length2+=m.length,u.diffs.length!==0&&u.diffs[u.diffs.length-1][0]===0?u.diffs[u.diffs.length-1][1]+=m:u.diffs.push(new n.Diff(0,m))),h||t.splice(++s,0,u)}}},n.prototype.patch_toText=function(t){for(var r=[],s=0;s1&&arguments[1]!==void 0?arguments[1]:{}).type,t=(n===void 0?"block":n)==="block"?R3n:M3n,r=a6(e.map((function(o){return o.changes})),oB).map(t).reduce((function(o,l){var u=En(o,2),h=u[0],_=u[1],p=En(l,2),m=p[0],x=p[1];return[h.concat(m),_.concat(x)]}),[[],[]]),s=En(r,2),i=s[0],a=s[1];return N3n(qj(i),qj(a))}var D3n=["enhancers"],Kj=function(e){var n,t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},r=t.enhancers,s=r===void 0?[]:r,i=En(f3n(e,xu(t,D3n)),2),a=i[0],o=i[1],l=[Pj(a),Pj(o)],u=(n=[l[0],l[1]],s.reduce((function(k,v){return v(k)}),n)),h=En(u,2),_=h[0],p=h[1],m=[_.map(Fj),p.map(Fj)],x=m[1];return{old:m[0].map((function(k){var v;return(v=k.children)!==null&&v!==void 0?v:[]})),new:x.map((function(k){var v;return(v=k.children)!==null&&v!==void 0?v:[]}))}};const K3=["openresearch-diff flex flex-col gap-4","[&_.openresearch-diff-file]:[--diff-background-color:var(--base)]","[&_.openresearch-diff-file]:[--diff-text-color:var(--text)]","[&_.openresearch-diff-file]:[--diff-font-family:var(--mono)]","[&_.openresearch-diff-file]:[--diff-selection-text-color:var(--primary)]","[&_.openresearch-diff-file]:[--diff-selection-background-color:var(--color-diff-selection)]","[&_.openresearch-diff-file]:[--diff-gutter-selected-text-color:var(--diff-selection-text-color)]","[&_.openresearch-diff-file]:[--diff-gutter-selected-background-color:var(--color-diff-gutter-selection)]","[&_.openresearch-diff-file]:[--diff-code-selected-text-color:var(--diff-selection-text-color)]","[&_.openresearch-diff-file]:[--diff-code-selected-background-color:var(--diff-selection-background-color)]","[&_.openresearch-diff-file]:[--diff-gutter-insert-text-color:var(--accent-green)]","[&_.openresearch-diff-file]:[--diff-gutter-insert-background-color:var(--color-diff-insert-gutter)]","[&_.openresearch-diff-file]:[--diff-gutter-delete-text-color:var(--accent-red)]","[&_.openresearch-diff-file]:[--diff-gutter-delete-background-color:var(--color-diff-delete-gutter)]","[&_.openresearch-diff-file]:[--diff-code-insert-text-color:var(--diff-text-color)]","[&_.openresearch-diff-file]:[--diff-code-insert-background-color:var(--color-diff-insert-code)]","[&_.openresearch-diff-file]:[--diff-code-delete-text-color:var(--diff-text-color)]","[&_.openresearch-diff-file]:[--diff-code-delete-background-color:var(--color-diff-delete-code)]","[&_.openresearch-diff-file]:[--diff-code-insert-edit-text-color:var(--diff-text-color)]","[&_.openresearch-diff-file]:[--diff-code-insert-edit-background-color:var(--color-diff-insert-edit)]","[&_.openresearch-diff-file]:[--diff-code-delete-edit-text-color:var(--diff-text-color)]","[&_.openresearch-diff-file]:[--diff-code-delete-edit-background-color:var(--color-diff-delete-edit)]","[&_.openresearch-diff-file]:[--diff-omit-gutter-line-color:var(--color-diff-omit-gutter)]","[&_.openresearch-diff-file]:w-full","[&_.openresearch-diff-file.diff-unified]:table-fixed","[&_.openresearch-diff-file.diff-unified_col.diff-gutter-col:first-child]:collapse","[&_.openresearch-diff-file.diff-unified_col.diff-gutter-col:first-child]:w-0","[&_.openresearch-diff-file.diff-unified_.diff-line_>_td:first-child]:p-0","[&_.openresearch-diff-file.diff-unified_col.diff-gutter-col:nth-child(2)]:w-[7ch]","[&_.openresearch-diff-file.diff-unified_.diff-line_>_td:nth-child(2)]:w-[7ch]","[&_.openresearch-diff-file.diff-unified_.diff-line_>_td:nth-child(2)]:pt-0 [&_.openresearch-diff-file.diff-unified_.diff-line_>_td:nth-child(2)]:pe-2.5 [&_.openresearch-diff-file.diff-unified_.diff-line_>_td:nth-child(2)]:pb-0 [&_.openresearch-diff-file.diff-unified_.diff-line_>_td:nth-child(2)]:ps-3.5","[&_.openresearch-diff-file.diff-unified_.diff-line_>_td:nth-child(2)]:whitespace-nowrap","[&_.openresearch-diff-file.diff-unified_.diff-line_>_td:nth-child(2)]:text-end","[&_.openresearch-diff-file.diff-unified_.diff-line_>_td:nth-child(2)]:text-diff-gutter-text","[&_.openresearch-diff-file.diff-unified_.diff-line_>_td:nth-child(2)]:border-e [&_.openresearch-diff-file.diff-unified_.diff-line_>_td:nth-child(2)]:border-e-border","[&_.openresearch-diff-file.diff-unified_.diff-line_>_td:nth-child(2)]:select-none","[&_.openresearch-diff-file.diff-unified_.diff-line_>_td:nth-child(2)]:cursor-default","[&_.openresearch-diff-file_.diff-line:has(.diff-code-insert)]:bg-diff-insert-code","[&_.openresearch-diff-file_.diff-line:has(.diff-code-delete)]:bg-diff-delete-code","[&_.openresearch-diff-file_.diff-code]:py-0 [&_.openresearch-diff-file_.diff-code]:ps-[2ch] [&_.openresearch-diff-file_.diff-code]:pe-4","[&_.openresearch-diff-file_.diff-hunk_+_.diff-hunk_.diff-line:first-child_>_td]:border-t [&_.openresearch-diff-file_.diff-hunk_+_.diff-hunk_.diff-line:first-child_>_td]:border-t-border"].join(" "),L3n=2e3,I3n={highlight(e,n){return Mt.highlight(e,n).children}};function $3n(e){return e.type==="normal"?e.newLineNumber:e.lineNumber}function Zb(e){let n=0,t=0;for(const r of e.hunks)for(const s of r.changes)s.type==="insert"?n++:s.type==="delete"&&t++;return{additions:n,deletions:t}}function B3n(e){return e.newPath==="/dev/null"?e.oldPath:(e.oldPath==="/dev/null",e.newPath)}function W3(e){switch(e.type){case"delete":return e.oldPath;case"add":case"modify":return e.newPath;case"rename":case"copy":return`${e.oldPath} → ${e.newPath}`}}function P3n(e){const n=[O3n(e.hunks,{type:"line"})],t=mS(B3n(e));return t&&Mt.registered(t)?Kj(e.hunks,{enhancers:n,highlight:!0,language:t,refractor:I3n}):Kj(e.hunks,{enhancers:n,highlight:!1})}function cB(e,n){if(!e.trim())return{files:[],failed:!1};try{return{files:B3(e,{nearbySequences:"zip"}),failed:!1}}catch{if(n){const t=Array.from(e.matchAll(/^diff --git /gm),s=>s.index),r=t[t.length-1];if(t.length>1&&r!==void 0)try{return{files:B3(e.slice(0,r),{nearbySequences:"zip"}),failed:!1}}catch{return{files:[],failed:!0}}}return{files:[],failed:!0}}}const F3n=({change:e,side:n})=>n==="old"?null:$3n(e);function uB({bytesRead:e,byteLimit:n}){return f.jsxs("div",{className:"truncated-notice border border-accent-amber rounded-md bg-accent-amber-subtle py-3 px-3.5 text-sm [&_h4]:mt-0 [&_h4]:mx-0 [&_h4]:mb-1 [&_h4]:text-sm [&_h4]:text-accent-amber [&_p]:m-0 [&_p]:text-subtext",children:[f.jsx("h4",{children:iHe()}),f.jsx("p",{children:aqe({limit:Ne(Kl(n)),read:Ne(Kl(e))})})]})}function _B({file:e,defaultExpanded:n}){const[t,r]=A.useState(n),{additions:s,deletions:i}=A.useMemo(()=>Zb(e),[e]),a=t&&s+i<=L3n,o=A.useMemo(()=>{if(a)try{return P3n(e)}catch{return}},[e,a]);return f.jsxs("section",{className:`diff-file-card overflow-hidden border border-border rounded-md bg-background [&.expanded_.diff-file-header]:border-b [&.expanded_.diff-file-header]:border-b-border ${t?"expanded":""}`,children:[f.jsxs("button",{className:"diff-file-header sticky top-0 z-10 flex items-center justify-between gap-3 w-full text-start py-2 px-3 bg-canvas cursor-pointer [&_.chev]:text-muted [&_.chev]:text-xs [&_.chev]:shrink-0 [&_.chev]:w-3 [&_.path]:flex [&_.path]:items-center [&_.path]:gap-2 [&_.path]:min-w-0 [&_.path]:flex-1 [&_.path_code]:min-w-0 [&_.path_code]:flex-1 [&_.path_code]:overflow-hidden [&_.path_code]:text-ellipsis [&_.path_code]:whitespace-nowrap [&_.path_code]:font-mono [&_.path_code]:text-xs [&_.path_code]:font-medium [&_.path_code]:text-text [&_.stats]:flex [&_.stats]:items-center [&_.stats]:gap-2 [&_.stats]:shrink-0 [&_.stats]:font-mono [&_.stats]:text-xs [&_.stats]:font-medium [&_.stats]:tabular-nums","aria-expanded":t,onClick:()=>r(l=>!l),children:[f.jsx("span",{className:"chev",children:t?f.jsx(Zo,{size:14}):f.jsx(Da,{size:14})}),f.jsx("span",{className:"path",children:f.jsx("code",{children:W3(e)})}),f.jsxs("span",{className:"stats",children:[f.jsxs("span",{className:"diff-stat-add text-accent-green",children:["+",s]}),f.jsxs("span",{className:"diff-stat-del text-accent-red",children:["−",i]})]})]}),t&&(e.hunks.length===0?f.jsx("div",{className:"diff-empty py-2 px-3 text-muted text-sm",children:MHe()}):f.jsx("div",{className:"diff-file-body min-w-0 py-3.5 bg-background",children:f.jsx(n3n,{className:"openresearch-diff-file",diffType:e.type,gutterType:"default",hunks:e.hunks,renderGutter:F3n,tokens:o,viewType:"unified"})}))]})}function H3n({files:e,className:n}){return f.jsx("div",{className:n?`${K3} ${n}`:K3,children:e.map((t,r)=>f.jsx(_B,{file:t,defaultExpanded:r===0},`${t.oldPath}→${t.newPath}#${r}`))})}function q3n(e){switch(e.type){case"add":return"A";case"delete":return"D";case"rename":return"R";case"copy":return"C";case"modify":return"M"}}function fB({diff:e,partial:n=!1}){var p;const t=A.useMemo(()=>cB(e,n),[e,n]),r=t.files,s=A.useMemo(()=>r.map((m,x)=>({file:m,key:`${m.oldPath}→${m.newPath}#${x}`,changes:Zb(m)})),[r]),[i,a]=A.useState(null),[o,l]=A.useState(!1),u=o&&!n,h=s.some(m=>m.key===i)?i:((p=s[0])==null?void 0:p.key)??null,_=s.find(m=>m.key===h)??null;return t.failed?f.jsx("div",{className:"diff-empty py-2 px-3 text-muted text-sm",children:n?EHe():JHe()}):s.length===0?f.jsx("div",{className:"diff-empty py-2 px-3 text-muted text-sm",children:bHe()}):f.jsxs("div",{className:"diff-explorer @container",children:[f.jsxs("div",{className:"diff-explorer-toolbar flex items-center justify-between gap-3 mb-2.5 text-sm [&_button]:py-0.5 [&_button]:px-0 [&_button]:text-muted [&_button]:text-sm [&_button]:font-medium [&_button:hover]:text-text [&_button:hover]:underline [&_button:hover]:underline-offset-2",children:[f.jsx("strong",{className:"font-medium",children:n?s.length===1?VHe():fHe({count:Jt(s.length)}):s.length===1?yD():bD({count:Jt(s.length)})}),!n&&f.jsx("button",{type:"button",onClick:()=>l(m=>!m),children:u?BFe():dqe()})]}),u?f.jsx(H3n,{files:r}):f.jsxs("div",{className:"diff-explorer-layout grid grid-cols-[minmax(180px,_260px)_minmax(0,_1fr)] items-start gap-3.5 [@container((max-width:_960px))]:grid-cols-1",children:[f.jsx("div",{className:"diff-explorer-files sticky top-0 max-h-[min(70vh,_720px)] overflow-auto border border-border rounded-md bg-background [&_button]:grid [&_button]:grid-cols-[18px_minmax(0,_1fr)_auto_auto] [&_button]:items-center [&_button]:gap-[7px] [&_button]:w-full [&_button]:py-2 [&_button]:px-[9px] [&_button]:border-b [&_button]:border-b-border-variant [&_button]:text-text [&_button]:text-start [&_button:last-child]:border-b-0 [&_button:hover]:bg-surface [&_button.active]:bg-surface [&_button.active]:shadow-diff-active [&_code]:overflow-hidden [&_code]:text-ellipsis [&_code]:whitespace-nowrap [&_code]:text-xs [@container((max-width:_960px))]:static [@container((max-width:_960px))]:max-h-55","aria-label":ZFe(),children:s.map(m=>f.jsxs("button",{type:"button",className:m.key===h?"active":"","aria-pressed":m.key===h,onClick:()=>a(m.key),children:[f.jsx("span",{className:`diff-file-status font-mono text-xs font-medium text-muted [&.status-add]:text-accent-green [&.status-delete]:text-accent-red [&.status-rename]:text-accent-blue [&.status-copy]:text-accent-blue status-${m.file.type}`,children:q3n(m.file)}),f.jsx("code",{title:W3(m.file),children:W3(m.file)}),f.jsxs("span",{className:"diff-explorer-stat font-mono text-xs diff-stat-add text-accent-green",children:["+",m.changes.additions]}),f.jsxs("span",{className:"diff-explorer-stat font-mono text-xs diff-stat-del text-accent-red",children:["−",m.changes.deletions]})]},m.key))}),f.jsx("div",{className:`${K3} diff-explorer-preview min-w-0`,children:_&&f.jsx(_B,{file:_.file,defaultExpanded:!0},_.key)})]})]})}function U3n({expanded:e,experiments:n,runs:t,onOpenExperiment:r,rightOffset:s,activeView:i,projectId:a,onCompute:o,sessionId:l,busy:u,onChanges:h,onFiles:_,onTerminal:p,onArtifacts:m,onExperiments:x}){var C,N;const k=N2n(n,t,l),v=ft({...RL(a),enabled:e}),b=((C=v.data)==null?void 0:C.configuredDefaultBackend)??((N=v.data)==null?void 0:N.defaultBackend),w=b?G_[b]():v.isPending?"…":v.isError?so():s3(),y=[{id:"files",label:X4(),Icon:q_,onClick:_},{id:"terminal",label:yv(),Icon:co,onClick:p},{id:"artifacts",label:ZO(),Icon:tS,onClick:m},{id:"experiments",label:JO(),Icon:Jd,onClick:x}];return f.jsx("div",{className:"workspace-tools absolute end-3.5 top-7 z-30",style:{insetInlineEnd:s},children:e?f.jsxs("nav",{"aria-label":W2(),className:"workspace-tools-card flex w-60 flex-col gap-0.5 rounded-xl border border-border bg-background px-1.5 py-2 shadow-elevated",children:[f.jsx("h2",{className:"m-0 px-2 pt-1 pb-2 text-sm font-normal text-subtext",children:W2()}),y.filter(E=>E.id!=="files"&&E.id!=="terminal").map(({id:E,label:T,Icon:j,onClick:M})=>f.jsx(nr,{className:"min-h-7 py-1","data-onboarding":E==="artifacts"?"nav-artifacts":void 0,onClick:M,children:f.jsxs("span",{className:"flex items-center gap-4",children:[f.jsx(j,{size:15}),T]})},E)),f.jsx(nr,{className:"py-1",onClick:o,children:f.jsxs("span",{className:"flex min-w-0 flex-col gap-0.5",children:[f.jsxs("span",{className:"flex items-center gap-4 text-sm text-text",children:[f.jsx(mI,{size:15,className:"shrink-0"}),pdn()]}),f.jsxs("span",{className:"flex items-center gap-1.5 ps-[31px] text-menu text-subtext",children:[b&&f.jsx(xh,{kind:`${b}_job`,size:12}),f.jsx("span",{className:"wrap-anywhere",children:w})]})]})}),f.jsxs("div",{className:"mt-2 border-t border-border/50 pt-3",children:[f.jsx("h2",{className:"m-0 px-2 pt-1 pb-2 text-sm font-normal text-subtext",children:Wdn()}),f.jsx(nr,{className:"min-h-7 py-1",onClick:_,children:f.jsxs("span",{className:"flex items-center gap-4",children:[f.jsx(q_,{size:15}),X4()]})}),f.jsx(nr,{className:"min-h-7 py-1",onClick:p,children:f.jsxs("span",{className:"flex items-center gap-4",children:[f.jsx(co,{size:15}),yv()]})}),l&&f.jsx(G3n,{sessionId:l,busy:u,onChanges:h},l),k.length>0&&f.jsxs("div",{children:[f.jsxs("h2",{className:"m-0 flex items-center gap-4 px-2 py-1 text-sm font-normal text-text",children:[f.jsx("span",{className:"flex w-[15px] shrink-0 justify-center",children:f.jsx(yd,{tone:"success",live:!0})}),f.jsx("span",{children:ldn()})]}),k.map(E=>f.jsx(nr,{className:"min-h-7 py-1",onClick:()=>r(E.experiment.id,E.run.id),children:f.jsx("span",{className:"min-w-0 truncate ps-[31px] text-menu text-subtext",title:`${E.experiment.title||E.experiment.slug} · ${YS(Zi(E.run))}`,children:E.experiment.title||E.experiment.slug})},E.run.id))]})]})]}):f.jsx("nav",{"aria-label":W2(),className:"flex items-center justify-end gap-3",children:y.map(({id:E,label:T,Icon:j,onClick:M})=>f.jsx(Ft,{active:i===E,className:"text-text [&.active]:text-text","data-tip":T,"data-tip-align":E==="experiments"?"end":void 0,"aria-label":T,"aria-pressed":i===E,onClick:M,children:f.jsx(j,{size:15})},E))})})}function G3n({sessionId:e,busy:n,onChanges:t}){var l,u;const r=ft({...Mv(e),refetchInterval:n?5e3:!1}),s=A.useRef(n),{refetch:i}=r;A.useEffect(()=>{s.current&&!n&&i(),s.current=n},[n,i]);const a=r.data,o=A.useMemo(()=>{if(!(a!=null&&a.diff)||a.diff.truncated)return null;const h=cB(a.diff.diff,!1);return h.failed?null:h.files.map(Zb).reduce((_,p)=>({additions:_.additions+p.additions,deletions:_.deletions+p.deletions}),{additions:0,deletions:0})},[a==null?void 0:a.diff]);return a!=null&&a.exists?f.jsxs(nr,{className:"min-h-7 py-1",onClick:t,title:a.branch??$k(),children:[f.jsxs("span",{className:"flex min-w-0 items-center gap-4",children:[f.jsx(hm,{size:15,className:"shrink-0"}),f.jsx("span",{children:cD()})]}),o?f.jsxs("span",{className:"flex shrink-0 gap-1 text-xs tabular-nums",children:[f.jsxs("span",{className:"text-accent-green",children:["+",Jt(o.additions)]}),f.jsxs("span",{className:"text-accent-red",children:["−",Jt(o.deletions)]})]}):f.jsx("span",{className:"shrink-0 text-xs text-subtext",children:((l=a.files)==null?void 0:l.length)===1?yD():bD({count:Jt(((u=a.files)==null?void 0:u.length)??0)})})]}):null}function V3n({projectId:e,sessionId:n,active:t}){const r=A.useRef(null),s=A.useRef(null),[i,a]=A.useState(null),[o,l]=A.useState(0);return A.useEffect(()=>{const u=r.current;if(!u)return;const h=zb(u,!1,!0,"app"),{terminal:_,dispose:p}=h;s.current=h,a(null);const m=location.protocol==="https:"?"wss:":"ws:",x=new URL(`/api/projects/${encodeURIComponent(e)}/terminal`,`${m}//${location.host}`);n&&x.searchParams.set("sessionId",n);const k=new WebSocket(x);k.binaryType="arraybuffer";let v=!1;const b=C=>{v||(v=!0,_.options.disableStdin=!0,_.blur(),_.writeln(`\r -${C}`),a(C))},w=_.onData(C=>{k.readyState===WebSocket.OPEN&&k.send(new TextEncoder().encode(C))}),y=_.onResize(({cols:C,rows:N})=>{k.readyState===WebSocket.OPEN&&k.send(JSON.stringify({type:"resize",cols:C,rows:N}))});return k.onopen=()=>{k.send(JSON.stringify({type:"resize",cols:_.cols,rows:_.rows}))},k.onmessage=C=>{if(C.data instanceof ArrayBuffer){_.write(new Uint8Array(C.data));return}if(typeof C.data!="string")return;let N;try{N=JSON.parse(C.data)}catch{return}cf(N)&&(N.type==="exit"?b(Odn({code:String(N.code)})):N.type==="error"&&typeof N.error=="string"&&b(N.error))},k.onclose=()=>b(mz()),k.onerror=()=>b(mz()),()=>{k.onopen=null,k.onmessage=null,k.onerror=null,k.onclose=null,w.dispose(),y.dispose(),k.close(),s.current=null,p()}},[e,n,o]),A.useEffect(()=>{if(!t||i!==null)return;const u=requestAnimationFrame(()=>{var h,_;(h=s.current)==null||h.fit(),(_=s.current)==null||_.terminal.focus()});return()=>cancelAnimationFrame(u)},[t,i,o]),f.jsxs("div",{className:"flex h-full min-h-0 flex-col bg-terminal-app p-2",role:"group","aria-label":yv(),children:[f.jsx("div",{ref:r,className:"min-h-0 flex-1 overflow-hidden"}),f.jsx("p",{role:"status","aria-live":"polite",className:"sr-only",children:i??""}),i!==null&&f.jsx("div",{className:"flex shrink-0 justify-end pt-2",children:f.jsx(Me,{autoFocus:!0,onClick:()=>l(u=>u+1),children:Fdn()})})]})}function l6(e){return/^[a-z][a-z0-9+.-]*:/i.test(e)||e.startsWith("//")}function Q3(e,n,t=!1){const r=n.indexOf("#"),s=r===-1?n:n.slice(0,r),i=r===-1?"":n.slice(r),a=s.indexOf("?"),o=a===-1?s:s.slice(0,a),l=a===-1?"":s.slice(a+1);let u;try{u=decodeURI(o)}catch{return null}if(!u||u.includes("\0"))return null;const h=u.startsWith("/"),_=h?[]:e.split("/").filter(Boolean);for(const p of u.split("/"))if(!(!p||p===".")){if(p===".."){if(_.length===0)return null;_.pop();continue}_.push(p)}return _.length===0?null:{path:`${t&&(h||e.startsWith("/"))?"/":""}${_.join("/")}`,query:l,hash:i}}function K3n(e,n){return`${e}${n.query?`&${n.query}`:""}${n.hash}`}function c6(e){return/^[a-z]:[\\/]/i.test(e)}function dB(e){const n=c6(e);if(!n&&l6(e))return null;const t=Q3("",n?e.replaceAll("\\","/"):e,!0);if(!t)return null;const r={path:t.path,hash:t.hash};return r.path.startsWith("/")||r.path.startsWith("~/")||n?{...r,source:"absolute"}:r.path.startsWith("artifacts/")?{...r,path:r.path.slice(10),source:"artifact"}:{...r,source:"checkout"}}function W3n(e,n,t){const r=new Array(e);return new Proxy(r,{get(s,i,a){if(typeof i=="string"){const o=i.charCodeAt(0);if(o>=48&&o<=57){const l=+i;if(Number.isInteger(l)&&l>=0&&lr[h]!==u))&&(r=o,s=n(...o),t!=null&&t.onChange&&!(i&&t.skipInitialOnChange)&&t.onChange(s),i=!1),s}return a.updateDeps=o=>{r=o},a}function Wj(e,n){if(e===void 0)throw new Error("Unexpected undefined");return e}const Q3n=(e,n)=>Math.abs(e-n)<1.01,X3n=(e,n,t)=>{let r;return Object.assign(function(...s){e.clearTimeout(r),r=e.setTimeout(()=>n.apply(this,s),t)},{cancel:()=>{e.clearTimeout(r)}})};let zp;const _w=()=>{if(zp!==void 0)return zp;if(typeof navigator>"u")return zp=!1;if(/iP(hone|od|ad)/.test(navigator.userAgent))return zp=!0;const e=navigator.maxTouchPoints;return zp=navigator.platform==="MacIntel"&&e!==void 0&&e>0},Qj=e=>{const{offsetWidth:n,offsetHeight:t}=e;return{width:n,height:t}},Y3n=e=>e,hB=e=>{const n=Math.max(e.startIndex-e.overscan,0),r=Math.min(e.endIndex+e.overscan,e.count-1)-n+1,s=new Array(r);for(let i=0;i{const t=e.scrollElement;if(!t)return;const r=e.targetWindow;if(!r)return;const s=a=>{const{width:o,height:l}=a;n({width:Math.round(o),height:Math.round(l)})};if(s(Qj(t)),!r.ResizeObserver)return()=>{};const i=new r.ResizeObserver(a=>{const o=()=>{const l=a[0];if(l!=null&&l.borderBoxSize){const u=l.borderBoxSize[0];if(u){s({width:u.inlineSize,height:u.blockSize});return}}s(Qj(t))};e.options.useAnimationFrameWithResizeObserver?requestAnimationFrame(o):o()});return i.observe(t,{box:"border-box"}),()=>{i.unobserve(t)}},Lv={passive:!0},J3n=typeof window>"u"?!0:"onscrollend"in window,e5n=(e,n,t)=>{const r=e.scrollElement;if(!r)return;const s=e.targetWindow;if(!s)return;const i=e.options.useScrollendEvent&&J3n;let a=0;const o=i?null:X3n(s,()=>n(a,!1),e.options.isScrollingResetDelay),l=_=>()=>{a=t(r),o==null||o(),n(a,_)},u=l(!0),h=l(!1);return r.addEventListener("scroll",u,Lv),i&&r.addEventListener("scrollend",h,Lv),()=>{r.removeEventListener("scroll",u),i&&r.removeEventListener("scrollend",h),o==null||o.cancel()}},t5n=(e,n)=>e5n(e,n,t=>{const{horizontal:r,isRtl:s}=e.options;return r?t.scrollLeft*(s&&-1||1):t.scrollTop}),n5n=(e,n,t)=>{if(t.options.useCachedMeasurements){const r=t.indexFromElement(e),s=t.options.getItemKey(r);return t.itemSizeCache.get(s)??t.options.estimateSize(r)}if(n!=null&&n.borderBoxSize){const r=n.borderBoxSize[0];if(r)return Math.round(r[t.options.horizontal?"inlineSize":"blockSize"])}if(!n){const r=t.indexFromElement(e),s=t.options.getItemKey(r),i=t.itemSizeCache.get(s);if(i!==void 0)return i}return e[t.options.horizontal?"offsetWidth":"offsetHeight"]},r5n=(e,{adjustments:n=0,behavior:t},r)=>{var s,i;(i=(s=r.scrollElement)==null?void 0:s.scrollTo)==null||i.call(s,{[r.options.horizontal?"left":"top"]:e+n,behavior:t})},s5n=r5n;class i5n{constructor(n){this.unsubs=[],this.scrollElement=null,this.targetWindow=null,this.isScrolling=!1,this.scrollState=null,this.measurementsCache=[],this._flatMeasurements=null,this.itemSizeCache=new Map,this.itemSizeCacheVersion=0,this.laneAssignments=new Map,this.pendingMin=null,this.prevLanes=void 0,this.lanesChangedFlag=!1,this.lanesSettling=!1,this.pendingScrollAnchor=null,this.scrollRect=null,this.scrollOffset=null,this.scrollDirection=null,this.scrollAdjustments=0,this._iosDeferredAdjustment=0,this._iosTouching=!1,this._iosJustTouchEnded=!1,this._iosTouchEndTimerId=null,this._intendedScrollOffset=null,this._clampedAdjustment=null,this.elementsCache=new Map,this.now=()=>{var t,r,s;return((s=(r=(t=this.targetWindow)==null?void 0:t.performance)==null?void 0:r.now)==null?void 0:s.call(r))??Date.now()},this.observer=(()=>{let t=null;const r=()=>t||(!this.targetWindow||!this.targetWindow.ResizeObserver?null:t=new this.targetWindow.ResizeObserver(s=>{s.forEach(i=>{const a=()=>{const o=i.target,l=this.indexFromElement(o);if(!o.isConnected){this.observer.unobserve(o);for(const[u,h]of this.elementsCache)if(h===o){this.elementsCache.delete(u);break}return}this.isIndexInRange(l)&&this.shouldMeasureDuringScroll(l)&&this.resizeItem(l,this.options.measureElement(o,i,this))};this.options.useAnimationFrameWithResizeObserver?requestAnimationFrame(a):a()})}));return{disconnect:()=>{var s;(s=r())==null||s.disconnect(),t=null},observe:s=>{var i;return(i=r())==null?void 0:i.observe(s,{box:"border-box"})},unobserve:s=>{var i;return(i=r())==null?void 0:i.unobserve(s)}}})(),this.range=null,this.setOptions=t=>{var r,s;const i={debug:!1,initialOffset:0,overscan:1,paddingStart:0,paddingEnd:0,scrollPaddingStart:0,scrollPaddingEnd:0,horizontal:!1,getItemKey:Y3n,rangeExtractor:hB,onChange:()=>{},measureElement:n5n,initialRect:{width:0,height:0},scrollMargin:0,gap:0,indexAttribute:"data-index",initialMeasurementsCache:[],lanes:1,anchorTo:"start",followOnAppend:!1,scrollEndThreshold:1,isScrollingResetDelay:150,enabled:!0,isRtl:!1,useScrollendEvent:!1,useAnimationFrameWithResizeObserver:!1,laneAssignmentMode:"estimate",useCachedMeasurements:!1};for(const p in t){const m=t[p];m!==void 0&&(i[p]=m)}const a=this.options;let o=null,l=null,u=!1;if(a!==void 0&&a.enabled&&i.enabled&&i.anchorTo==="end"&&this.scrollElement!==null){const p=a.count,m=i.count,x=this.getMeasurements(),k=p>0?((r=x[0])==null?void 0:r.key)??a.getItemKey(0):null,v=p>0?((s=x[p-1])==null?void 0:s.key)??a.getItemKey(p-1):null;if(m!==p||p>0&&m>0&&(i.getItemKey(0)!==k||i.getItemKey(m-1)!==v)){u=!0;const y=p>0?this.getVirtualItemForOffset(this.getScrollOffset())??x[0]:null;y&&(o=[y.key,this.getScrollOffset()-y.start]);const C=i.followOnAppend===!0?"auto":i.followOnAppend||null;C&&m>p&&this.isAtEnd(a.scrollEndThreshold)&&(p===0||i.getItemKey(m-1)!==v)&&(l=C)}}this.options=i,u&&(this.pendingMin=0,this.itemSizeCacheVersion++);let h=!1,_=0;if(o&&this.scrollOffset!==null){const[p,m]=o,x=this.getMeasurements(),{count:k,getItemKey:v}=this.options;let b=0;for(;b{var r,s;(s=(r=this.options).onChange)==null||s.call(r,this,t)},this.maybeNotify=Yf(()=>(this.calculateRange(),[this.isScrolling,this.range?this.range.startIndex:null,this.range?this.range.endIndex:null]),t=>{this.notify(t)},{key:!1,debug:()=>this.options.debug,initialDeps:[this.isScrolling,this.range?this.range.startIndex:null,this.range?this.range.endIndex:null]}),this.cleanup=()=>{this.unsubs.filter(Boolean).forEach(t=>t()),this.unsubs=[],this.observer.disconnect(),this.rafId!=null&&this.targetWindow&&(this.targetWindow.cancelAnimationFrame(this.rafId),this.rafId=null),this.scrollState=null,this.isScrolling=!1,this.scrollDirection=null,this._iosDeferredAdjustment=0,this._iosTouching=!1,this._iosJustTouchEnded=!1,this._clampedAdjustment=null,this.scrollElement=null,this.targetWindow=null},this._didMount=()=>()=>{this.cleanup()},this._willUpdate=()=>{var t;const r=this.options.enabled?this.options.getScrollElement():null;if(this.scrollElement!==r){if(this.cleanup(),!r){this.maybeNotify();return}if(this.scrollElement=r,this.scrollElement&&"ownerDocument"in this.scrollElement?this.targetWindow=this.scrollElement.ownerDocument.defaultView:this.targetWindow=((t=this.scrollElement)==null?void 0:t.window)??null,this.elementsCache.forEach(i=>{this.observer.observe(i)}),this.unsubs.push(this.options.observeElementRect(this,i=>{this.scrollRect=i,this.maybeNotify()})),this.unsubs.push(this.options.observeElementOffset(this,(i,a)=>{if(a&&this._intendedScrollOffset===null&&i===this.scrollOffset)return;this._intendedScrollOffset!==null&&Math.abs(i-this._intendedScrollOffset)<1.5&&(i=this._intendedScrollOffset),this._intendedScrollOffset=null,this._clampedAdjustment!==null&&Math.abs(i-this._clampedAdjustment.maxAtWrite)>=1.5&&(this._clampedAdjustment=null),this.scrollAdjustments=0;const o=this.getScrollOffset();this.scrollDirection=a?o===i?this.scrollDirection:o{this._iosTouching=!0,this._iosJustTouchEnded=!1,this._iosTouchEndTimerId!==null&&this.targetWindow!=null&&(this.targetWindow.clearTimeout(this._iosTouchEndTimerId),this._iosTouchEndTimerId=null)},o=()=>{this._iosTouching=!1,!(!_w()||this.targetWindow==null)&&(this._iosJustTouchEnded=!0,this._iosTouchEndTimerId=this.targetWindow.setTimeout(()=>{this._iosJustTouchEnded=!1,this._iosTouchEndTimerId=null,this._flushIosDeferredIfReady()},150))};i.addEventListener("touchstart",a,Lv),i.addEventListener("touchend",o,Lv),this.unsubs.push(()=>{i.removeEventListener("touchstart",a),i.removeEventListener("touchend",o),this._iosTouchEndTimerId!==null&&this.targetWindow!=null&&(this.targetWindow.clearTimeout(this._iosTouchEndTimerId),this._iosTouchEndTimerId=null)})}this._scrollToOffset(this.getScrollOffset(),{adjustments:void 0,behavior:void 0})}const s=this.pendingScrollAnchor;if(this.pendingScrollAnchor=null,s&&this.scrollElement&&this.options.enabled){const[i,a,o,l]=s;i!==null&&!o&&(_w()&&(this.isScrolling||this._iosTouching||this._iosJustTouchEnded)?l!==0&&(this._iosDeferredAdjustment+=l):this._scrollToOffset(this.getScrollOffset(),{adjustments:void 0,behavior:void 0})),o&&this.scrollToEnd({behavior:o})}this._retryClampedAdjustment()},this._retryClampedAdjustment=()=>{if(this._clampedAdjustment===null||!this.scrollElement||!this.options.enabled)return;const{target:t,maxAtWrite:r}=this._clampedAdjustment,s=this.getMaxScrollOffset();s>r+.5&&(this._clampedAdjustment=t>s+.5?{target:t,maxAtWrite:s}:null,this._scrollToOffset(t,{adjustments:void 0,behavior:void 0}))},this._flushIosDeferredIfReady=()=>{if(this._iosDeferredAdjustment===0||this.isScrolling||this._iosTouching||this._iosJustTouchEnded)return;const t=this.getScrollOffset(),r=this.getMaxScrollOffset();if(t<0||t>r)return;if(this._iosDeferredAdjustment<0&&t>=r-1){this._iosDeferredAdjustment=0;return}const s=this._iosDeferredAdjustment;this._iosDeferredAdjustment=0,this._scrollToOffset(t,{adjustments:this.scrollAdjustments+=s,behavior:void 0})},this.rafId=null,this.getSize=()=>this.options.enabled?(this.scrollRect=this.scrollRect??this.options.initialRect,this.scrollRect[this.options.horizontal?"width":"height"]):(this.scrollRect=null,0),this.getScrollOffset=()=>this.options.enabled?(this.scrollOffset=this.scrollOffset??(typeof this.options.initialOffset=="function"?this.options.initialOffset():this.options.initialOffset),this.scrollOffset):(this.scrollOffset=null,0),this.getMeasurementOptions=Yf(()=>[this.options.count,this.options.paddingStart,this.options.scrollMargin,this.options.getItemKey,this.options.enabled,this.options.lanes,this.options.laneAssignmentMode,this.options.gap],(t,r,s,i,a,o,l,u)=>(this.prevLanes!==void 0&&this.prevLanes!==o&&(this.lanesChangedFlag=!0),this.prevLanes=o,this.pendingMin=null,{count:t,paddingStart:r,scrollMargin:s,getItemKey:i,enabled:a,lanes:o,laneAssignmentMode:l,gap:u}),{key:!1}),this.isIndexInRange=t=>t>=0&&t[this.getMeasurementOptions(),this.itemSizeCacheVersion],({count:t,paddingStart:r,scrollMargin:s,getItemKey:i,enabled:a,lanes:o,laneAssignmentMode:l,gap:u},h)=>{const _=this.itemSizeCache;if(!a)return this.measurementsCache=[],this.itemSizeCache.clear(),this.laneAssignments.clear(),[];if(this.laneAssignments.size>t)for(const b of this.laneAssignments.keys())b>=t&&this.laneAssignments.delete(b);this.lanesChangedFlag&&(this.lanesChangedFlag=!1,this.lanesSettling=!0,this.measurementsCache=[],this.itemSizeCache.clear(),this.laneAssignments.clear(),this.pendingMin=null),this.measurementsCache.length===0&&!this.lanesSettling&&(this.measurementsCache=this.options.initialMeasurementsCache,this.measurementsCache.forEach(b=>{this.itemSizeCache.set(b.key,b.size)}));const p=this.lanesSettling?0:this.pendingMin??0;if(this.pendingMin=null,this.lanesSettling&&this.measurementsCache.length===t&&(this.lanesSettling=!1),o===1){const b=t*2;let w=this._flatMeasurements;if(!w||w.length0&&N.set(w.subarray(0,p*2)),w=N,this._flatMeasurements=w}let y;if(p===0)y=r+s;else{const N=p-1;y=w[N*2]+w[N*2+1]+u}for(let N=p;N1){C=y;const D=x[C],I=D!==void 0?m[D]:void 0;N=I?I.end+u:r+s}else if(v===o){let D=0,I=k[0],P=x[0];for(let U=1;Uthis.options.debug}),this.calculateRange=Yf(()=>[this.getMeasurements(),this.getSize(),this.getScrollOffset(),this.options.lanes],(t,r,s,i)=>t.length===0||r===0?(this.range=null,null):(this.range=o5n(t,r,s,i,i===1&&this._flatMeasurements!=null?this._flatMeasurements:null),this.range),{key:!1,debug:()=>this.options.debug}),this.getVirtualIndexes=Yf(()=>{let t=null,r=null;const s=this.calculateRange();return s&&(t=s.startIndex,r=s.endIndex),this.maybeNotify.updateDeps([this.isScrolling,t,r]),[this.options.rangeExtractor,this.options.overscan,this.options.count,t,r]},(t,r,s,i,a)=>i===null||a===null?[]:t({startIndex:i,endIndex:a,overscan:r,count:s}),{key:!1,debug:()=>this.options.debug}),this.indexFromElement=t=>{const r=this.options.indexAttribute,s=t.getAttribute(r);return s?parseInt(s,10):(console.warn(`Missing attribute name '${r}={index}' on measured element.`),-1)},this.shouldMeasureDuringScroll=t=>{var r;if(!this.scrollState||this.scrollState.behavior!=="smooth")return!0;const s=this.scrollState.index??((r=this.getVirtualItemForOffset(this.scrollState.lastTargetOffset))==null?void 0:r.index);if(s!==void 0&&this.range){const i=Math.max(this.options.overscan,Math.ceil((this.range.endIndex-this.range.startIndex)/2)),a=Math.max(0,s-i),o=Math.min(this.options.count-1,s+i);return t>=a&&t<=o}return!0},this.measureElement=t=>{if(!t){this.elementsCache.forEach((a,o)=>{a.isConnected||(this.observer.unobserve(a),this.elementsCache.delete(o))});return}const r=this.indexFromElement(t);if(!this.isIndexInRange(r))return;const s=this.options.getItemKey(r),i=this.elementsCache.get(s);i!==t&&(i&&this.observer.unobserve(i),this.observer.observe(t),this.elementsCache.set(s,t)),(!this.isScrolling||this.scrollState)&&this.shouldMeasureDuringScroll(r)&&this.resizeItem(r,this.options.measureElement(t,void 0,this))},this.resizeItem=(t,r)=>{var s,i;if(!this.isIndexInRange(t))return;let a,o,l;const u=this._flatMeasurements;if(this.options.lanes===1&&u!==null)l=this.options.getItemKey(t),o=u[t*2],a=u[t*2+1];else{const p=this.measurementsCache[t];if(!p)return;l=p.key,o=p.start,a=p.size}const h=this.itemSizeCache.get(l)??a,_=r-h;if(_!==0){const p=this.options.anchorTo==="end"&&((s=this.scrollState)==null?void 0:s.behavior)!=="smooth"&&this.getVirtualDistanceFromEnd()<=this.options.scrollEndThreshold,m=p?this.getTotalSize():0,x=this.getScrollOffset()+this.scrollAdjustments,v=!this.itemSizeCache.has(l)?o[this.getVirtualIndexes(),this.getMeasurements()],(t,r)=>{const s=[];for(let i=0,a=t.length;ithis.options.debug}),this.getVirtualItemForOffset=t=>{const r=this.getMeasurements();if(r.length===0)return;const s=this._flatMeasurements,i=this.options.lanes===1&&s!=null,a=pB(0,r.length-1,i?o=>s[o*2]:o=>Wj(r[o]).start,t);return Wj(r[a])},this.getMaxScrollOffset=()=>{if(!this.scrollElement)return 0;if("scrollHeight"in this.scrollElement)return this.options.horizontal?this.scrollElement.scrollWidth-this.scrollElement.clientWidth:this.scrollElement.scrollHeight-this.scrollElement.clientHeight;{const t=this.scrollElement.document.documentElement;return this.options.horizontal?t.scrollWidth-this.scrollElement.innerWidth:t.scrollHeight-this.scrollElement.innerHeight}},this.getVirtualDistanceFromEnd=()=>Math.max(this.getTotalSize()-this.getSize()-this.getScrollOffset(),0),this.getDistanceFromEnd=()=>Math.max(this.getMaxScrollOffset()-this.getScrollOffset(),0),this.isAtEnd=(t=this.options.scrollEndThreshold)=>this.getDistanceFromEnd()<=t,this.getOffsetForAlignment=(t,r,s=0)=>{if(!this.scrollElement)return 0;const i=this.getSize(),a=this.getScrollOffset();r==="auto"&&(r=t>=a+i?"end":"start"),r==="center"?t+=(s-i)/2:r==="end"&&(t-=i);const o=this.getMaxScrollOffset();return Math.max(Math.min(o,t),0)},this.getOffsetForIndex=(t,r="auto")=>{t=Math.max(0,Math.min(t,this.options.count-1));const s=this.getSize(),i=this.getScrollOffset(),a=this.measurementsCache[t];if(!a)return;if(r==="auto")if(a.end>=i+s-this.options.scrollPaddingEnd)r="end";else if(a.start<=i+this.options.scrollPaddingStart)r="start";else return[i,r];if(r==="end"&&t===this.options.count-1)return[this.getMaxScrollOffset(),r];const o=r==="end"?a.end+this.options.scrollPaddingEnd:a.start-this.options.scrollPaddingStart;return[this.getOffsetForAlignment(o,r,a.size),r]},this.scrollToOffset=(t,{align:r="start",behavior:s="auto"}={})=>{this._iosDeferredAdjustment=0;const i=this.getOffsetForAlignment(t,r),a=this.now();this.scrollState={index:null,align:r,behavior:s,startedAt:a,lastTargetOffset:i,stableFrames:0},this._scrollToOffset(i,{adjustments:void 0,behavior:s}),this.scheduleScrollReconcile()},this.scrollToIndex=(t,{align:r="auto",behavior:s="auto"}={})=>{this._iosDeferredAdjustment=0,t=Math.max(0,Math.min(t,this.options.count-1));const i=this.getOffsetForIndex(t,r);if(!i)return;const[a,o]=i,l=this.now();this.scrollState={index:t,align:o,behavior:s,startedAt:l,lastTargetOffset:a,stableFrames:0},this._scrollToOffset(a,{adjustments:void 0,behavior:s}),this.scheduleScrollReconcile()},this.scrollBy=(t,{behavior:r="auto"}={})=>{const s=this.getScrollOffset()+t,i=this.now();this.scrollState={index:null,align:"start",behavior:r,startedAt:i,lastTargetOffset:s,stableFrames:0},this._scrollToOffset(s,{adjustments:void 0,behavior:r}),this.scheduleScrollReconcile()},this.scrollToEnd=({behavior:t="auto"}={})=>{if(this.options.count>0){this.scrollToIndex(this.options.count-1,{align:"end",behavior:t});return}this.scrollToOffset(Math.max(this.getTotalSize()-this.getSize(),0),{behavior:t})},this.getTotalSize=()=>{var t;const r=this.getMeasurements();let s;if(r.length===0)s=this.options.paddingStart;else if(this.options.lanes===1){const i=r.length-1,a=this._flatMeasurements;a!=null?s=a[i*2]+a[i*2+1]:s=((t=r[i])==null?void 0:t.end)??0}else{const i=Array(this.options.lanes).fill(null);let a=r.length-1;for(;a>=0&&i.some(o=>o===null);){const o=r[a];i[o.lane]===null&&(i[o.lane]=o.end),a--}s=Math.max(...i.filter(o=>o!==null))}return Math.max(s-this.options.scrollMargin+this.options.paddingEnd,0)},this.takeSnapshot=()=>{const t=[];if(this.itemSizeCache.size===0)return t;const r=this.getMeasurements();for(const s of r)s&&this.itemSizeCache.has(s.key)&&t.push({index:s.index,key:s.key,start:s.start,size:s.size,end:s.end,lane:s.lane});return t},this._scrollToOffset=(t,{adjustments:r,behavior:s})=>{this._intendedScrollOffset=t+(r??0),this.options.scrollToFn(t,{behavior:s,adjustments:r},this)},this.measure=()=>{this.pendingMin=null,this.itemSizeCache.clear(),this.laneAssignments.clear(),this.itemSizeCacheVersion++,this.notify(!1)},this.setOptions(n)}applyScrollAdjustment(n,t){if(n===0)return!1;if(_w()&&(this.isScrolling||this._iosTouching||this._iosJustTouchEnded))return this._iosDeferredAdjustment+=n,!1;{const r=this.getScrollOffset()+this.scrollAdjustments+n,s=this.scrollElement,i=s!==null&&("scrollHeight"in s||"document"in s)?this.getMaxScrollOffset():null;return this._clampedAdjustment=i!==null&&r>i+.5?{target:r,maxAtWrite:i}:null,this._scrollToOffset(this.getScrollOffset(),{adjustments:this.scrollAdjustments+=n,behavior:t}),this.scrollOffset!==null&&(this.scrollOffset+=this.scrollAdjustments,this.scrollOffset<0&&(this.scrollOffset=0),this.scrollAdjustments=0),!0}}scheduleScrollReconcile(){if(!this.targetWindow){this.scrollState=null;return}this.rafId==null&&(this.rafId=this.targetWindow.requestAnimationFrame(()=>{this.rafId=null,this.reconcileScroll()}))}reconcileScroll(){if(!this.scrollState||!this.scrollElement)return;if(this.now()-this.scrollState.startedAt>5e3){this.scrollState=null;return}const r=this.scrollState.index!=null?this.getOffsetForIndex(this.scrollState.index,this.scrollState.align):void 0,s=r?r[0]:this.scrollState.lastTargetOffset,i=1,a=s!==this.scrollState.lastTargetOffset;if(!a&&Q3n(s,this.getScrollOffset())){if(this.scrollState.stableFrames++,this.scrollState.stableFrames>=i){this.getScrollOffset()!==s&&this._scrollToOffset(s,{adjustments:void 0,behavior:"auto"}),this.scrollState=null;return}}else if(this.scrollState.stableFrames=0,a){const o=this.getSize()||600,l=Math.abs(s-this.getScrollOffset()),u=this.scrollState.behavior==="smooth"&&l>o;this.scrollState.lastTargetOffset=s,u||(this.scrollState.behavior="auto"),this._scrollToOffset(s,{adjustments:void 0,behavior:u?"smooth":"auto"})}this.scheduleScrollReconcile()}}const pB=(e,n,t,r)=>{for(;e<=n;){const s=(e+n)/2|0,i=t(s);if(ir)n=s-1;else return s}return e>0?e-1:0};function a5n(e,n,t){let r=0;for(;r<=n;){const s=(r+n)/2|0,i=e[s*2];if(it)n=s-1;else return s}return r>0?r-1:0}function o5n(e,n,t,r,s){const i=e.length-1;if(e.length<=r)return{startIndex:0,endIndex:i};if(r===1&&s!==null){const u=a5n(s,i,t);let h=u;const _=t+n;for(;he[u].start,t),l=o;if(r===1)for(;l1){const u=Array(r).fill(0);for(;l_=0&&h.some(_=>_>=t);){const _=e[o];h[_.lane]=_.start,o--}o=Math.max(0,o-o%r),l=Math.min(i,l+(r-1-l%r))}return{startIndex:o,endIndex:l}}const fw=typeof document<"u"?A.useLayoutEffect:A.useEffect;function l5n({useFlushSync:e=!0,directDomUpdates:n=!1,directDomUpdatesMode:t="transform",...r}){const s=A.useReducer(h=>h+1,0)[1],i=A.useRef({enabled:n,mode:t,container:null,lastSize:null,lastPositions:new WeakMap,prevRange:null});i.current.enabled=n,i.current.mode=t;const a=h=>{const _=i.current;if(!_.enabled||!_.container)return;const p=h.getTotalSize();if(p!==_.lastSize){_.lastSize=p;const m=h.options.horizontal?"width":"height";_.container.style[m]=`${p}px`}},o=h=>{const _=i.current;if(!_.enabled||!_.container)return;a(h);const p=!!h.options.horizontal,m=_.mode==="transform",x=p?"left":"top",k=h.options.scrollMargin,v=h.getVirtualItems();for(const b of v){const w=b.start-k,y=h.elementsCache.get(b.key);y&&_.lastPositions.get(y)!==w&&(_.lastPositions.set(y,w),m?y.style.transform=p?`translate3d(${w}px, 0, 0)`:`translate3d(0, ${w}px, 0)`:y.style[x]=`${w}px`)}},l={...r,onChange:(h,_)=>{var p;const m=i.current;let x=!0;if(m.enabled){o(h);const k=h.range,v=m.prevRange;x=!v||v.isScrolling!==h.isScrolling||v.startIndex!==(k==null?void 0:k.startIndex)||v.endIndex!==(k==null?void 0:k.endIndex),x&&(m.prevRange=k?{startIndex:k.startIndex,endIndex:k.endIndex,isScrolling:h.isScrolling}:null)}x&&(e&&_?Oa.flushSync(s):s()),(p=r.onChange)==null||p.call(r,h,_)}},[u]=A.useState(()=>{const h=new i5n(l);return Object.assign(h,{containerRef:_=>{const p=i.current;if(p.container=_,p.lastSize=null,_&&p.enabled){const m=h.getTotalSize();p.lastSize=m;const x=h.options.horizontal?"width":"height";_.style[x]=`${m}px`}}})});return u.setOptions(l),fw(()=>u._didMount(),[]),fw(()=>(a(u),u._willUpdate())),fw(()=>{o(u)}),u}function c5n(e){return l5n({observeElementRect:Z3n,observeElementOffset:t5n,scrollToFn:s5n,...e})}function u5n(e,n){if(!n)return e;const t=new Map(e.map(i=>[i.id,i]));let r=t.get(n);if(!r)return e;const s=[];for(;r;)s.push(r),r=r.parentId?t.get(r.parentId):void 0;return s.reverse()}function _5n(e,n,t){var a;let r=e;for(;r&&r.role!=="user";)r=r.parentId?n.get(r.parentId):void 0;const s=e.role==="user"?e.parentId??null:(r==null?void 0:r.id)??null,i=(a=t.get(s))==null?void 0:a.filter(o=>o.role===e.role);return i!=null&&i.length?i:[e]}function f5n(e,n,t,r){const s=e.filter(u=>!r(u.id)),i=new Map(s.map(u=>[u.id,u])),a=new Map;for(const u of s){const h=u.parentId??null,_=a.get(h);_?_.push(u):a.set(h,[u])}const o=new Set(n.map(u=>u.id)),l=new Map;for(const u of t){const h=_5n(u,i,a),_=h.findIndex(p=>o.has(p.id));l.set(u.id,{count:h.length,index:_,prevId:_>0?h[_-1].id:void 0,nextId:_=0;i--)for(const a of e[i].parts)if(!(a.type!=="prompt"||(r=a.prompt)!=null&&r.resolved||((s=a.prompt)==null?void 0:s.kind)!=="question"))return a.prompt.nativeId&&!t?null:a.id;return null}function nh(e,n){var t;if(e.type==="tool"&&((t=e.tool)==null?void 0:t.toLowerCase())==="interrupted")return!1;if(e.type==="prompt"){if(!e.prompt)return!1;if(e.prompt.kind==="permission"){if(e.prompt.resolved)return!1;if(n!==void 0)return e.id===n}return!0}return e.type==="reasoning"?!1:e.type==="text"?!!e.text:!0}function bm(e){return e.id==="turn-retry"||e.id==="turn-recovery"}function mB(e){var n;for(let t=e.length-1;t>=0;t--){const r=e[t];if(!(r.type==="steer"||bm(r)||!nh(r)))return r.type!=="tool"||((n=r.state)==null?void 0:n.status)==="error"?null:r.id}return null}function gB(e){const n=e.at(-1);if((n==null?void 0:n.role)!=="assistant")return null;const t=mB(n.parts);return t?{messageId:n.id,toolId:t}:null}function h5n(e){const n=e.at(-1);if((n==null?void 0:n.role)!=="assistant")return!1;for(let t=n.parts.length-1;t>=0;t--){const r=n.parts[t];if(!(r.type==="steer"||bm(r)))return r.type==="text"&&!!r.text}return!1}function p5n(e,n,t,r,s){const i=[...n].filter(o=>!t.has(o)&&r.some(l=>l.id===o)&&o!==s);if(i.length===0&&!(s&&e.has(s)))return e;const a=new Set(e);for(const o of i)a.add(o);return s&&a.delete(s),a}function m5n(e,n){if(e.some(r=>{var s;return r.type==="prompt"&&!((s=r.prompt)!=null&&s.resolved)}))return{work:[],answer:e};let t=e.findIndex(r=>r.type==="text"&&r.phase==="final_answer");if(t<0&&!n&&!e.some(r=>r.phase))for(let r=e.length-1;r>=0;r--){const s=e[r];if(s.type!=="reasoning"){if(s.type!=="text")break;s.text&&(t=r)}}return t<0||!n&&!e.slice(t).some(r=>nh(r))||!e.slice(0,t).some(r=>nh(r))?{work:[],answer:e}:{work:e.slice(0,t),answer:e.slice(t)}}function vB(e){var n,t;return e.type==="tool"&&e.tool==="error"&&/^(?:ActionRequiredError:\s*)?Named models unavailable\b/i.test(((t=(n=e.state)==null?void 0:n.error)==null?void 0:t.trim())??"")}function X3(e){var t,r,s;if(vB(e)||((r=(t=e.state)==null?void 0:t.input)==null?void 0:r.errorKind)==="claude_usage_limit")return!0;const n=e.type==="text"?e.text:e.tool==="error"?(s=e.state)==null?void 0:s.error:null;return e.type==="tool"&&e.tool==="error"&&n&&/usageLimitExceeded|rateLimitExceeded|insufficient_quota|(?:usage|rate|session) limit|(?:exceeded|exhausted) (?:your |the |current )*quota|insufficient (?:credits|balance)|(?:credit|quota)[ _-](?:exhausted|exceeded)/i.test(n)?!0:!!(n&&(/^(?:claude: )?you(?:'ve| have) reached your .+ limit\./i.test(n.trim())&&n.includes("claude.ai/settings/usage")||/^(?:claude: )?you(?:'ve| have) hit your session limit · resets /i.test(n.trim())))}const To=e=>new Intl.NumberFormat(z()).format(e);function g5n(e,n){const t=typeof e.nextRetryAt=="number"?Math.max(0,Math.ceil((e.nextRetryAt-n)/1e3)):null;return e.retryOwner==="native"&&e.maximum==null&&t==null?BSt():typeof e.attempt=="number"&&typeof e.maximum=="number"&&t!=null?CSt({attempt:To(e.attempt),maximum:To(e.maximum),seconds:To(t)}):typeof e.attempt=="number"&&typeof e.maximum=="number"?vSt({attempt:To(e.attempt),maximum:To(e.maximum)}):typeof e.attempt=="number"&&t!=null?RSt({attempt:To(e.attempt),seconds:To(t)}):typeof e.attempt=="number"?_St({attempt:To(e.attempt)}):t!=null?VSt({seconds:To(t)}):FD()}function v5n(e,n){if(typeof e!="number")return JSt();const t=Math.max(0,Math.ceil((e-n)/1e3));return a6t({seconds:To(t)})}function bB(e){return e==="retry"||e==="continue"?e:null}function b5n(e){const n={};return e.model!==void 0&&(n.model=e.model),e.serviceTier!==void 0&&(n.serviceTier=e.serviceTier),e.permissionMode!==void 0&&(n.permissionMode=e.permissionMode),e.planMode!==void 0&&(n.planMode=e.planMode),e.reasoningLevel!==void 0&&(n.reasoningLevel=e.reasoningLevel),n}const dw={draft:"",attachments:[],annotations:[]};function y5n(e,n){return(e.draft===""||e.draft===n)&&e.attachments.length===0&&e.annotations.length===0?null:{...e,annotations:e.annotations.map(({range:r,...s})=>s)}}function x5n(e){return["*","?","[","]","{","}"].some(n=>e.includes(n))}function Xj(e){return e==="alphaxiv"||e==="openalex"||e==="biorxiv"?e:void 0}function w5n(e){const n=e.trim(),t=n.toLowerCase();if(t.includes("biorxiv.org"))return"biorxiv";if(t.includes("openalex.org"))return"openalex";const r=n.match(/10\.\d+\/\S+/);if(r)return r[0].startsWith("10.1101/")?"biorxiv":"openalex";const s=n.split("/").pop()??"";return/^W\d+$/i.test(s)?"openalex":"alphaxiv"}function u6(e){const n=[];let t="",r=!1,s=null;const i=()=>{r&&n.push(t),t="",r=!1};for(let a=0;a1&&arguments[1]!==void 0?arguments[1]:{}).type,t=(n===void 0?"block":n)==="block"?m5n:g5n,r=a6(e.map((function(o){return o.changes})),cB).map(t).reduce((function(o,l){var u=En(o,2),h=u[0],_=u[1],p=En(l,2),m=p[0],x=p[1];return[h.concat(m),_.concat(x)]}),[[],[]]),s=En(r,2),i=s[0],a=s[1];return _5n(qj(i),qj(a))}var b5n=["enhancers"],Kj=function(e){var n,t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},r=t.enhancers,s=r===void 0?[]:r,i=En(X3n(e,xu(t,b5n)),2),a=i[0],o=i[1],l=[Pj(a),Pj(o)],u=(n=[l[0],l[1]],s.reduce((function(k,v){return v(k)}),n)),h=En(u,2),_=h[0],p=h[1],m=[_.map(Fj),p.map(Fj)],x=m[1];return{old:m[0].map((function(k){var v;return(v=k.children)!==null&&v!==void 0?v:[]})),new:x.map((function(k){var v;return(v=k.children)!==null&&v!==void 0?v:[]}))}};const K3=["openresearch-diff flex flex-col gap-4","[&_.openresearch-diff-file]:[--diff-background-color:var(--base)]","[&_.openresearch-diff-file]:[--diff-text-color:var(--text)]","[&_.openresearch-diff-file]:[--diff-font-family:var(--mono)]","[&_.openresearch-diff-file]:[--diff-selection-text-color:var(--primary)]","[&_.openresearch-diff-file]:[--diff-selection-background-color:var(--color-diff-selection)]","[&_.openresearch-diff-file]:[--diff-gutter-selected-text-color:var(--diff-selection-text-color)]","[&_.openresearch-diff-file]:[--diff-gutter-selected-background-color:var(--color-diff-gutter-selection)]","[&_.openresearch-diff-file]:[--diff-code-selected-text-color:var(--diff-selection-text-color)]","[&_.openresearch-diff-file]:[--diff-code-selected-background-color:var(--diff-selection-background-color)]","[&_.openresearch-diff-file]:[--diff-gutter-insert-text-color:var(--accent-green)]","[&_.openresearch-diff-file]:[--diff-gutter-insert-background-color:var(--color-diff-insert-gutter)]","[&_.openresearch-diff-file]:[--diff-gutter-delete-text-color:var(--accent-red)]","[&_.openresearch-diff-file]:[--diff-gutter-delete-background-color:var(--color-diff-delete-gutter)]","[&_.openresearch-diff-file]:[--diff-code-insert-text-color:var(--diff-text-color)]","[&_.openresearch-diff-file]:[--diff-code-insert-background-color:var(--color-diff-insert-code)]","[&_.openresearch-diff-file]:[--diff-code-delete-text-color:var(--diff-text-color)]","[&_.openresearch-diff-file]:[--diff-code-delete-background-color:var(--color-diff-delete-code)]","[&_.openresearch-diff-file]:[--diff-code-insert-edit-text-color:var(--diff-text-color)]","[&_.openresearch-diff-file]:[--diff-code-insert-edit-background-color:var(--color-diff-insert-edit)]","[&_.openresearch-diff-file]:[--diff-code-delete-edit-text-color:var(--diff-text-color)]","[&_.openresearch-diff-file]:[--diff-code-delete-edit-background-color:var(--color-diff-delete-edit)]","[&_.openresearch-diff-file]:[--diff-omit-gutter-line-color:var(--color-diff-omit-gutter)]","[&_.openresearch-diff-file]:w-full","[&_.openresearch-diff-file.diff-unified]:table-fixed","[&_.openresearch-diff-file.diff-unified_col.diff-gutter-col:first-child]:collapse","[&_.openresearch-diff-file.diff-unified_col.diff-gutter-col:first-child]:w-0","[&_.openresearch-diff-file.diff-unified_.diff-line_>_td:first-child]:p-0","[&_.openresearch-diff-file.diff-unified_col.diff-gutter-col:nth-child(2)]:w-[7ch]","[&_.openresearch-diff-file.diff-unified_.diff-line_>_td:nth-child(2)]:w-[7ch]","[&_.openresearch-diff-file.diff-unified_.diff-line_>_td:nth-child(2)]:pt-0 [&_.openresearch-diff-file.diff-unified_.diff-line_>_td:nth-child(2)]:pe-2.5 [&_.openresearch-diff-file.diff-unified_.diff-line_>_td:nth-child(2)]:pb-0 [&_.openresearch-diff-file.diff-unified_.diff-line_>_td:nth-child(2)]:ps-3.5","[&_.openresearch-diff-file.diff-unified_.diff-line_>_td:nth-child(2)]:whitespace-nowrap","[&_.openresearch-diff-file.diff-unified_.diff-line_>_td:nth-child(2)]:text-end","[&_.openresearch-diff-file.diff-unified_.diff-line_>_td:nth-child(2)]:text-diff-gutter-text","[&_.openresearch-diff-file.diff-unified_.diff-line_>_td:nth-child(2)]:border-e [&_.openresearch-diff-file.diff-unified_.diff-line_>_td:nth-child(2)]:border-e-border","[&_.openresearch-diff-file.diff-unified_.diff-line_>_td:nth-child(2)]:select-none","[&_.openresearch-diff-file.diff-unified_.diff-line_>_td:nth-child(2)]:cursor-default","[&_.openresearch-diff-file_.diff-line:has(.diff-code-insert)]:bg-diff-insert-code","[&_.openresearch-diff-file_.diff-line:has(.diff-code-delete)]:bg-diff-delete-code","[&_.openresearch-diff-file_.diff-code]:py-0 [&_.openresearch-diff-file_.diff-code]:ps-[2ch] [&_.openresearch-diff-file_.diff-code]:pe-4","[&_.openresearch-diff-file_.diff-hunk_+_.diff-hunk_.diff-line:first-child_>_td]:border-t [&_.openresearch-diff-file_.diff-hunk_+_.diff-hunk_.diff-line:first-child_>_td]:border-t-border"].join(" "),y5n=2e3,x5n={highlight(e,n){return Mt.highlight(e,n).children}};function w5n(e){return e.type==="normal"?e.newLineNumber:e.lineNumber}function Zb(e){let n=0,t=0;for(const r of e.hunks)for(const s of r.changes)s.type==="insert"?n++:s.type==="delete"&&t++;return{additions:n,deletions:t}}function k5n(e){return e.newPath==="/dev/null"?e.oldPath:(e.oldPath==="/dev/null",e.newPath)}function W3(e){switch(e.type){case"delete":return e.oldPath;case"add":case"modify":return e.newPath;case"rename":case"copy":return`${e.oldPath} → ${e.newPath}`}}function S5n(e){const n=[v5n(e.hunks,{type:"line"})],t=mS(k5n(e));return t&&Mt.registered(t)?Kj(e.hunks,{enhancers:n,highlight:!0,language:t,refractor:x5n}):Kj(e.hunks,{enhancers:n,highlight:!1})}function _B(e,n){if(!e.trim())return{files:[],failed:!1};try{return{files:B3(e,{nearbySequences:"zip"}),failed:!1}}catch{if(n){const t=Array.from(e.matchAll(/^diff --git /gm),s=>s.index),r=t[t.length-1];if(t.length>1&&r!==void 0)try{return{files:B3(e.slice(0,r),{nearbySequences:"zip"}),failed:!1}}catch{return{files:[],failed:!0}}}return{files:[],failed:!0}}}const C5n=({change:e,side:n})=>n==="old"?null:w5n(e);function fB({bytesRead:e,byteLimit:n}){return f.jsxs("div",{className:"truncated-notice border border-accent-amber rounded-md bg-accent-amber-subtle py-3 px-3.5 text-sm [&_h4]:mt-0 [&_h4]:mx-0 [&_h4]:mb-1 [&_h4]:text-sm [&_h4]:text-accent-amber [&_p]:m-0 [&_p]:text-subtext",children:[f.jsx("h4",{children:oHe()}),f.jsx("p",{children:lqe({limit:Ne(Wl(n)),read:Ne(Wl(e))})})]})}function dB({file:e,defaultExpanded:n}){const[t,r]=T.useState(n),{additions:s,deletions:i}=T.useMemo(()=>Zb(e),[e]),a=t&&s+i<=y5n,o=T.useMemo(()=>{if(a)try{return S5n(e)}catch{return}},[e,a]);return f.jsxs("section",{className:`diff-file-card overflow-hidden border border-border rounded-md bg-background [&.expanded_.diff-file-header]:border-b [&.expanded_.diff-file-header]:border-b-border ${t?"expanded":""}`,children:[f.jsxs("button",{className:"diff-file-header sticky top-0 z-10 flex items-center justify-between gap-3 w-full text-start py-2 px-3 bg-canvas cursor-pointer [&_.chev]:text-muted [&_.chev]:text-xs [&_.chev]:shrink-0 [&_.chev]:w-3 [&_.path]:flex [&_.path]:items-center [&_.path]:gap-2 [&_.path]:min-w-0 [&_.path]:flex-1 [&_.path_code]:min-w-0 [&_.path_code]:flex-1 [&_.path_code]:overflow-hidden [&_.path_code]:text-ellipsis [&_.path_code]:whitespace-nowrap [&_.path_code]:font-mono [&_.path_code]:text-xs [&_.path_code]:font-medium [&_.path_code]:text-text [&_.stats]:flex [&_.stats]:items-center [&_.stats]:gap-2 [&_.stats]:shrink-0 [&_.stats]:font-mono [&_.stats]:text-xs [&_.stats]:font-medium [&_.stats]:tabular-nums","aria-expanded":t,onClick:()=>r(l=>!l),children:[f.jsx("span",{className:"chev",children:t?f.jsx(Jo,{size:14}):f.jsx(Da,{size:14})}),f.jsx("span",{className:"path",children:f.jsx("code",{children:W3(e)})}),f.jsxs("span",{className:"stats",children:[f.jsxs("span",{className:"diff-stat-add text-accent-green",children:["+",s]}),f.jsxs("span",{className:"diff-stat-del text-accent-red",children:["−",i]})]})]}),t&&(e.hunks.length===0?f.jsx("div",{className:"diff-empty py-2 px-3 text-muted text-sm",children:DHe()}):f.jsx("div",{className:"diff-file-body min-w-0 py-3.5 bg-background",children:f.jsx(P3n,{className:"openresearch-diff-file",diffType:e.type,gutterType:"default",hunks:e.hunks,renderGutter:C5n,tokens:o,viewType:"unified"})}))]})}function E5n({files:e,className:n}){return f.jsx("div",{className:n?`${K3} ${n}`:K3,children:e.map((t,r)=>f.jsx(dB,{file:t,defaultExpanded:r===0},`${t.oldPath}→${t.newPath}#${r}`))})}function N5n(e){switch(e.type){case"add":return"A";case"delete":return"D";case"rename":return"R";case"copy":return"C";case"modify":return"M"}}function hB({diff:e,partial:n=!1}){var p;const t=T.useMemo(()=>_B(e,n),[e,n]),r=t.files,s=T.useMemo(()=>r.map((m,x)=>({file:m,key:`${m.oldPath}→${m.newPath}#${x}`,changes:Zb(m)})),[r]),[i,a]=T.useState(null),[o,l]=T.useState(!1),u=o&&!n,h=s.some(m=>m.key===i)?i:((p=s[0])==null?void 0:p.key)??null,_=s.find(m=>m.key===h)??null;return t.failed?f.jsx("div",{className:"diff-empty py-2 px-3 text-muted text-sm",children:n?zHe():tqe()}):s.length===0?f.jsx("div",{className:"diff-empty py-2 px-3 text-muted text-sm",children:xHe()}):f.jsxs("div",{className:"diff-explorer @container",children:[f.jsxs("div",{className:"diff-explorer-toolbar flex items-center justify-between gap-3 mb-2.5 text-sm [&_button]:py-0.5 [&_button]:px-0 [&_button]:text-muted [&_button]:text-sm [&_button]:font-medium [&_button:hover]:text-text [&_button:hover]:underline [&_button:hover]:underline-offset-2",children:[f.jsx("strong",{className:"font-medium",children:n?s.length===1?WHe():hHe({count:Jt(s.length)}):s.length===1?yD():bD({count:Jt(s.length)})}),!n&&f.jsx("button",{type:"button",onClick:()=>l(m=>!m),children:u?FFe():pqe()})]}),u?f.jsx(E5n,{files:r}):f.jsxs("div",{className:"diff-explorer-layout grid grid-cols-[minmax(180px,_260px)_minmax(0,_1fr)] items-start gap-3.5 [@container((max-width:_960px))]:grid-cols-1",children:[f.jsx("div",{className:"diff-explorer-files sticky top-0 max-h-[min(70vh,_720px)] overflow-auto border border-border rounded-md bg-background [&_button]:grid [&_button]:grid-cols-[18px_minmax(0,_1fr)_auto_auto] [&_button]:items-center [&_button]:gap-[7px] [&_button]:w-full [&_button]:py-2 [&_button]:px-[9px] [&_button]:border-b [&_button]:border-b-border-variant [&_button]:text-text [&_button]:text-start [&_button:last-child]:border-b-0 [&_button:hover]:bg-surface [&_button.active]:bg-surface [&_button.active]:shadow-diff-active [&_code]:overflow-hidden [&_code]:text-ellipsis [&_code]:whitespace-nowrap [&_code]:text-xs [@container((max-width:_960px))]:static [@container((max-width:_960px))]:max-h-55","aria-label":eHe(),children:s.map(m=>f.jsxs("button",{type:"button",className:m.key===h?"active":"","aria-pressed":m.key===h,onClick:()=>a(m.key),children:[f.jsx("span",{className:`diff-file-status font-mono text-xs font-medium text-muted [&.status-add]:text-accent-green [&.status-delete]:text-accent-red [&.status-rename]:text-accent-blue [&.status-copy]:text-accent-blue status-${m.file.type}`,children:N5n(m.file)}),f.jsx("code",{title:W3(m.file),children:W3(m.file)}),f.jsxs("span",{className:"diff-explorer-stat font-mono text-xs diff-stat-add text-accent-green",children:["+",m.changes.additions]}),f.jsxs("span",{className:"diff-explorer-stat font-mono text-xs diff-stat-del text-accent-red",children:["−",m.changes.deletions]})]},m.key))}),f.jsx("div",{className:`${K3} diff-explorer-preview min-w-0`,children:_&&f.jsx(dB,{file:_.file,defaultExpanded:!0},_.key)})]})]})}function z5n({expanded:e,experiments:n,runs:t,onOpenExperiment:r,rightOffset:s,activeView:i,projectId:a,onCompute:o,sessionId:l,busy:u,onChanges:h,onFiles:_,onTerminal:p,onArtifacts:m,onExperiments:x}){var C,E;const k=_wn(n,t,l),v=ft({...OL(a),enabled:e}),b=((C=v.data)==null?void 0:C.configuredDefaultBackend)??((E=v.data)==null?void 0:E.defaultBackend),w=b?G_[b]():v.isPending?"…":v.isError?so():s3(),y=[{id:"files",label:X4(),Icon:q_,onClick:_},{id:"terminal",label:yv(),Icon:co,onClick:p},{id:"artifacts",label:ZO(),Icon:tS,onClick:m},{id:"experiments",label:JO(),Icon:Jd,onClick:x}];return f.jsx("div",{className:"workspace-tools absolute end-3.5 top-7 z-30",style:{insetInlineEnd:s},children:e?f.jsxs("nav",{"aria-label":W2(),className:"workspace-tools-card flex w-60 flex-col gap-0.5 rounded-xl border border-border bg-background px-1.5 py-2 shadow-elevated",children:[f.jsx("h2",{className:"m-0 px-2 pt-1 pb-2 text-sm font-normal text-subtext",children:W2()}),y.filter(N=>N.id!=="files"&&N.id!=="terminal").map(({id:N,label:A,Icon:j,onClick:M})=>f.jsx(nr,{className:"min-h-7 py-1","data-onboarding":N==="artifacts"?"nav-artifacts":void 0,onClick:M,children:f.jsxs("span",{className:"flex items-center gap-4",children:[f.jsx(j,{size:15}),A]})},N)),f.jsx(nr,{className:"py-1",onClick:o,children:f.jsxs("span",{className:"flex min-w-0 flex-col gap-0.5",children:[f.jsxs("span",{className:"flex items-center gap-4 text-sm text-text",children:[f.jsx(vI,{size:15,className:"shrink-0"}),Xdn()]}),f.jsxs("span",{className:"flex items-center gap-1.5 ps-[31px] text-menu text-subtext",children:[b&&f.jsx(xh,{kind:`${b}_job`,size:12}),f.jsx("span",{className:"wrap-anywhere",children:w})]})]})}),f.jsxs("div",{className:"mt-2 border-t border-border/50 pt-3",children:[f.jsx("h2",{className:"m-0 px-2 pt-1 pb-2 text-sm font-normal text-subtext",children:jhn()}),f.jsx(nr,{className:"min-h-7 py-1",onClick:_,children:f.jsxs("span",{className:"flex items-center gap-4",children:[f.jsx(q_,{size:15}),X4()]})}),f.jsx(nr,{className:"min-h-7 py-1",onClick:p,children:f.jsxs("span",{className:"flex items-center gap-4",children:[f.jsx(co,{size:15}),yv()]})}),l&&f.jsx(j5n,{sessionId:l,busy:u,onChanges:h},l),k.length>0&&f.jsxs("div",{children:[f.jsxs("h2",{className:"m-0 flex items-center gap-4 px-2 py-1 text-sm font-normal text-text",children:[f.jsx("span",{className:"flex w-[15px] shrink-0 justify-center",children:f.jsx(yd,{tone:"success",live:!0})}),f.jsx("span",{children:qdn()})]}),k.map(N=>f.jsx(nr,{className:"min-h-7 py-1",onClick:()=>r(N.experiment.id,N.run.id),children:f.jsx("span",{className:"min-w-0 truncate ps-[31px] text-menu text-subtext",title:`${N.experiment.title||N.experiment.slug} · ${YS(Zi(N.run))}`,children:N.experiment.title||N.experiment.slug})},N.run.id))]})]})]}):f.jsx("nav",{"aria-label":W2(),className:"flex items-center justify-end gap-3",children:y.map(({id:N,label:A,Icon:j,onClick:M})=>f.jsx(Ft,{active:i===N,className:"text-text [&.active]:text-text","data-tip":A,"data-tip-align":N==="experiments"?"end":void 0,"aria-label":A,"aria-pressed":i===N,onClick:M,children:f.jsx(j,{size:15})},N))})})}function j5n({sessionId:e,busy:n,onChanges:t}){var l,u;const r=ft({...Mv(e),refetchInterval:n?5e3:!1}),s=T.useRef(n),{refetch:i}=r;T.useEffect(()=>{s.current&&!n&&i(),s.current=n},[n,i]);const a=r.data,o=T.useMemo(()=>{if(!(a!=null&&a.diff)||a.diff.truncated)return null;const h=_B(a.diff.diff,!1);return h.failed?null:h.files.map(Zb).reduce((_,p)=>({additions:_.additions+p.additions,deletions:_.deletions+p.deletions}),{additions:0,deletions:0})},[a==null?void 0:a.diff]);return a!=null&&a.exists?f.jsxs(nr,{className:"min-h-7 py-1",onClick:t,title:a.branch??$k(),children:[f.jsxs("span",{className:"flex min-w-0 items-center gap-4",children:[f.jsx(hm,{size:15,className:"shrink-0"}),f.jsx("span",{children:cD()})]}),o?f.jsxs("span",{className:"flex shrink-0 gap-1 text-xs tabular-nums",children:[f.jsxs("span",{className:"text-accent-green",children:["+",Jt(o.additions)]}),f.jsxs("span",{className:"text-accent-red",children:["−",Jt(o.deletions)]})]}):f.jsx("span",{className:"shrink-0 text-xs text-subtext",children:((l=a.files)==null?void 0:l.length)===1?yD():bD({count:Jt(((u=a.files)==null?void 0:u.length)??0)})})]}):null}function T5n({projectId:e,sessionId:n,active:t}){const r=T.useRef(null),s=T.useRef(null),[i,a]=T.useState(null),[o,l]=T.useState(0);return T.useEffect(()=>{const u=r.current;if(!u)return;const h=zb(u,!1,!0,"app"),{terminal:_,dispose:p}=h;s.current=h,a(null);const m=location.protocol==="https:"?"wss:":"ws:",x=new URL(`/api/projects/${encodeURIComponent(e)}/terminal`,`${m}//${location.host}`);n&&x.searchParams.set("sessionId",n);const k=new WebSocket(x);k.binaryType="arraybuffer";let v=!1;const b=C=>{v||(v=!0,_.options.disableStdin=!0,_.blur(),_.writeln(`\r +${C}`),a(C))},w=_.onData(C=>{k.readyState===WebSocket.OPEN&&k.send(new TextEncoder().encode(C))}),y=_.onResize(({cols:C,rows:E})=>{k.readyState===WebSocket.OPEN&&k.send(JSON.stringify({type:"resize",cols:C,rows:E}))});return k.onopen=()=>{k.send(JSON.stringify({type:"resize",cols:_.cols,rows:_.rows}))},k.onmessage=C=>{if(C.data instanceof ArrayBuffer){_.write(new Uint8Array(C.data));return}if(typeof C.data!="string")return;let E;try{E=JSON.parse(C.data)}catch{return}cf(E)&&(E.type==="exit"?b(phn({code:String(E.code)})):E.type==="error"&&typeof E.error=="string"&&b(E.error))},k.onclose=()=>b(mz()),k.onerror=()=>b(mz()),()=>{k.onopen=null,k.onmessage=null,k.onerror=null,k.onclose=null,w.dispose(),y.dispose(),k.close(),s.current=null,p()}},[e,n,o]),T.useEffect(()=>{if(!t||i!==null)return;const u=requestAnimationFrame(()=>{var h,_;(h=s.current)==null||h.fit(),(_=s.current)==null||_.terminal.focus()});return()=>cancelAnimationFrame(u)},[t,i,o]),f.jsxs("div",{className:"flex h-full min-h-0 flex-col bg-terminal-app p-2",role:"group","aria-label":yv(),children:[f.jsx("div",{ref:r,className:"min-h-0 flex-1 overflow-hidden"}),f.jsx("p",{role:"status","aria-live":"polite",className:"sr-only",children:i??""}),i!==null&&f.jsx("div",{className:"flex shrink-0 justify-end pt-2",children:f.jsx(Me,{autoFocus:!0,onClick:()=>l(u=>u+1),children:whn()})})]})}function l6(e){return/^[a-z][a-z0-9+.-]*:/i.test(e)||e.startsWith("//")}function Q3(e,n,t=!1){const r=n.indexOf("#"),s=r===-1?n:n.slice(0,r),i=r===-1?"":n.slice(r),a=s.indexOf("?"),o=a===-1?s:s.slice(0,a),l=a===-1?"":s.slice(a+1);let u;try{u=decodeURI(o)}catch{return null}if(!u||u.includes("\0"))return null;const h=u.startsWith("/"),_=h?[]:e.split("/").filter(Boolean);for(const p of u.split("/"))if(!(!p||p===".")){if(p===".."){if(_.length===0)return null;_.pop();continue}_.push(p)}return _.length===0?null:{path:`${t&&(h||e.startsWith("/"))?"/":""}${_.join("/")}`,query:l,hash:i}}function A5n(e,n){return`${e}${n.query?`&${n.query}`:""}${n.hash}`}function c6(e){return/^[a-z]:[\\/]/i.test(e)}function pB(e){const n=c6(e);if(!n&&l6(e))return null;const t=Q3("",n?e.replaceAll("\\","/"):e,!0);if(!t)return null;const r={path:t.path,hash:t.hash};return r.path.startsWith("/")||r.path.startsWith("~/")||n?{...r,source:"absolute"}:r.path.startsWith("artifacts/")?{...r,path:r.path.slice(10),source:"artifact"}:{...r,source:"checkout"}}function R5n(e,n,t){const r=new Array(e);return new Proxy(r,{get(s,i,a){if(typeof i=="string"){const o=i.charCodeAt(0);if(o>=48&&o<=57){const l=+i;if(Number.isInteger(l)&&l>=0&&lr[h]!==u))&&(r=o,s=n(...o),t!=null&&t.onChange&&!(i&&t.skipInitialOnChange)&&t.onChange(s),i=!1),s}return a.updateDeps=o=>{r=o},a}function Wj(e,n){if(e===void 0)throw new Error("Unexpected undefined");return e}const M5n=(e,n)=>Math.abs(e-n)<1.01,O5n=(e,n,t)=>{let r;return Object.assign(function(...s){e.clearTimeout(r),r=e.setTimeout(()=>n.apply(this,s),t)},{cancel:()=>{e.clearTimeout(r)}})};let zp;const _w=()=>{if(zp!==void 0)return zp;if(typeof navigator>"u")return zp=!1;if(/iP(hone|od|ad)/.test(navigator.userAgent))return zp=!0;const e=navigator.maxTouchPoints;return zp=navigator.platform==="MacIntel"&&e!==void 0&&e>0},Qj=e=>{const{offsetWidth:n,offsetHeight:t}=e;return{width:n,height:t}},D5n=e=>e,mB=e=>{const n=Math.max(e.startIndex-e.overscan,0),r=Math.min(e.endIndex+e.overscan,e.count-1)-n+1,s=new Array(r);for(let i=0;i{const t=e.scrollElement;if(!t)return;const r=e.targetWindow;if(!r)return;const s=a=>{const{width:o,height:l}=a;n({width:Math.round(o),height:Math.round(l)})};if(s(Qj(t)),!r.ResizeObserver)return()=>{};const i=new r.ResizeObserver(a=>{const o=()=>{const l=a[0];if(l!=null&&l.borderBoxSize){const u=l.borderBoxSize[0];if(u){s({width:u.inlineSize,height:u.blockSize});return}}s(Qj(t))};e.options.useAnimationFrameWithResizeObserver?requestAnimationFrame(o):o()});return i.observe(t,{box:"border-box"}),()=>{i.unobserve(t)}},Lv={passive:!0},I5n=typeof window>"u"?!0:"onscrollend"in window,$5n=(e,n,t)=>{const r=e.scrollElement;if(!r)return;const s=e.targetWindow;if(!s)return;const i=e.options.useScrollendEvent&&I5n;let a=0;const o=i?null:O5n(s,()=>n(a,!1),e.options.isScrollingResetDelay),l=_=>()=>{a=t(r),o==null||o(),n(a,_)},u=l(!0),h=l(!1);return r.addEventListener("scroll",u,Lv),i&&r.addEventListener("scrollend",h,Lv),()=>{r.removeEventListener("scroll",u),i&&r.removeEventListener("scrollend",h),o==null||o.cancel()}},B5n=(e,n)=>$5n(e,n,t=>{const{horizontal:r,isRtl:s}=e.options;return r?t.scrollLeft*(s&&-1||1):t.scrollTop}),P5n=(e,n,t)=>{if(t.options.useCachedMeasurements){const r=t.indexFromElement(e),s=t.options.getItemKey(r);return t.itemSizeCache.get(s)??t.options.estimateSize(r)}if(n!=null&&n.borderBoxSize){const r=n.borderBoxSize[0];if(r)return Math.round(r[t.options.horizontal?"inlineSize":"blockSize"])}if(!n){const r=t.indexFromElement(e),s=t.options.getItemKey(r),i=t.itemSizeCache.get(s);if(i!==void 0)return i}return e[t.options.horizontal?"offsetWidth":"offsetHeight"]},F5n=(e,{adjustments:n=0,behavior:t},r)=>{var s,i;(i=(s=r.scrollElement)==null?void 0:s.scrollTo)==null||i.call(s,{[r.options.horizontal?"left":"top"]:e+n,behavior:t})},H5n=F5n;class q5n{constructor(n){this.unsubs=[],this.scrollElement=null,this.targetWindow=null,this.isScrolling=!1,this.scrollState=null,this.measurementsCache=[],this._flatMeasurements=null,this.itemSizeCache=new Map,this.itemSizeCacheVersion=0,this.laneAssignments=new Map,this.pendingMin=null,this.prevLanes=void 0,this.lanesChangedFlag=!1,this.lanesSettling=!1,this.pendingScrollAnchor=null,this.scrollRect=null,this.scrollOffset=null,this.scrollDirection=null,this.scrollAdjustments=0,this._iosDeferredAdjustment=0,this._iosTouching=!1,this._iosJustTouchEnded=!1,this._iosTouchEndTimerId=null,this._intendedScrollOffset=null,this._clampedAdjustment=null,this.elementsCache=new Map,this.now=()=>{var t,r,s;return((s=(r=(t=this.targetWindow)==null?void 0:t.performance)==null?void 0:r.now)==null?void 0:s.call(r))??Date.now()},this.observer=(()=>{let t=null;const r=()=>t||(!this.targetWindow||!this.targetWindow.ResizeObserver?null:t=new this.targetWindow.ResizeObserver(s=>{s.forEach(i=>{const a=()=>{const o=i.target,l=this.indexFromElement(o);if(!o.isConnected){this.observer.unobserve(o);for(const[u,h]of this.elementsCache)if(h===o){this.elementsCache.delete(u);break}return}this.isIndexInRange(l)&&this.shouldMeasureDuringScroll(l)&&this.resizeItem(l,this.options.measureElement(o,i,this))};this.options.useAnimationFrameWithResizeObserver?requestAnimationFrame(a):a()})}));return{disconnect:()=>{var s;(s=r())==null||s.disconnect(),t=null},observe:s=>{var i;return(i=r())==null?void 0:i.observe(s,{box:"border-box"})},unobserve:s=>{var i;return(i=r())==null?void 0:i.unobserve(s)}}})(),this.range=null,this.setOptions=t=>{var r,s;const i={debug:!1,initialOffset:0,overscan:1,paddingStart:0,paddingEnd:0,scrollPaddingStart:0,scrollPaddingEnd:0,horizontal:!1,getItemKey:D5n,rangeExtractor:mB,onChange:()=>{},measureElement:P5n,initialRect:{width:0,height:0},scrollMargin:0,gap:0,indexAttribute:"data-index",initialMeasurementsCache:[],lanes:1,anchorTo:"start",followOnAppend:!1,scrollEndThreshold:1,isScrollingResetDelay:150,enabled:!0,isRtl:!1,useScrollendEvent:!1,useAnimationFrameWithResizeObserver:!1,laneAssignmentMode:"estimate",useCachedMeasurements:!1};for(const p in t){const m=t[p];m!==void 0&&(i[p]=m)}const a=this.options;let o=null,l=null,u=!1;if(a!==void 0&&a.enabled&&i.enabled&&i.anchorTo==="end"&&this.scrollElement!==null){const p=a.count,m=i.count,x=this.getMeasurements(),k=p>0?((r=x[0])==null?void 0:r.key)??a.getItemKey(0):null,v=p>0?((s=x[p-1])==null?void 0:s.key)??a.getItemKey(p-1):null;if(m!==p||p>0&&m>0&&(i.getItemKey(0)!==k||i.getItemKey(m-1)!==v)){u=!0;const y=p>0?this.getVirtualItemForOffset(this.getScrollOffset())??x[0]:null;y&&(o=[y.key,this.getScrollOffset()-y.start]);const C=i.followOnAppend===!0?"auto":i.followOnAppend||null;C&&m>p&&this.isAtEnd(a.scrollEndThreshold)&&(p===0||i.getItemKey(m-1)!==v)&&(l=C)}}this.options=i,u&&(this.pendingMin=0,this.itemSizeCacheVersion++);let h=!1,_=0;if(o&&this.scrollOffset!==null){const[p,m]=o,x=this.getMeasurements(),{count:k,getItemKey:v}=this.options;let b=0;for(;b{var r,s;(s=(r=this.options).onChange)==null||s.call(r,this,t)},this.maybeNotify=Yf(()=>(this.calculateRange(),[this.isScrolling,this.range?this.range.startIndex:null,this.range?this.range.endIndex:null]),t=>{this.notify(t)},{key:!1,debug:()=>this.options.debug,initialDeps:[this.isScrolling,this.range?this.range.startIndex:null,this.range?this.range.endIndex:null]}),this.cleanup=()=>{this.unsubs.filter(Boolean).forEach(t=>t()),this.unsubs=[],this.observer.disconnect(),this.rafId!=null&&this.targetWindow&&(this.targetWindow.cancelAnimationFrame(this.rafId),this.rafId=null),this.scrollState=null,this.isScrolling=!1,this.scrollDirection=null,this._iosDeferredAdjustment=0,this._iosTouching=!1,this._iosJustTouchEnded=!1,this._clampedAdjustment=null,this.scrollElement=null,this.targetWindow=null},this._didMount=()=>()=>{this.cleanup()},this._willUpdate=()=>{var t;const r=this.options.enabled?this.options.getScrollElement():null;if(this.scrollElement!==r){if(this.cleanup(),!r){this.maybeNotify();return}if(this.scrollElement=r,this.scrollElement&&"ownerDocument"in this.scrollElement?this.targetWindow=this.scrollElement.ownerDocument.defaultView:this.targetWindow=((t=this.scrollElement)==null?void 0:t.window)??null,this.elementsCache.forEach(i=>{this.observer.observe(i)}),this.unsubs.push(this.options.observeElementRect(this,i=>{this.scrollRect=i,this.maybeNotify()})),this.unsubs.push(this.options.observeElementOffset(this,(i,a)=>{if(a&&this._intendedScrollOffset===null&&i===this.scrollOffset)return;this._intendedScrollOffset!==null&&Math.abs(i-this._intendedScrollOffset)<1.5&&(i=this._intendedScrollOffset),this._intendedScrollOffset=null,this._clampedAdjustment!==null&&Math.abs(i-this._clampedAdjustment.maxAtWrite)>=1.5&&(this._clampedAdjustment=null),this.scrollAdjustments=0;const o=this.getScrollOffset();this.scrollDirection=a?o===i?this.scrollDirection:o{this._iosTouching=!0,this._iosJustTouchEnded=!1,this._iosTouchEndTimerId!==null&&this.targetWindow!=null&&(this.targetWindow.clearTimeout(this._iosTouchEndTimerId),this._iosTouchEndTimerId=null)},o=()=>{this._iosTouching=!1,!(!_w()||this.targetWindow==null)&&(this._iosJustTouchEnded=!0,this._iosTouchEndTimerId=this.targetWindow.setTimeout(()=>{this._iosJustTouchEnded=!1,this._iosTouchEndTimerId=null,this._flushIosDeferredIfReady()},150))};i.addEventListener("touchstart",a,Lv),i.addEventListener("touchend",o,Lv),this.unsubs.push(()=>{i.removeEventListener("touchstart",a),i.removeEventListener("touchend",o),this._iosTouchEndTimerId!==null&&this.targetWindow!=null&&(this.targetWindow.clearTimeout(this._iosTouchEndTimerId),this._iosTouchEndTimerId=null)})}this._scrollToOffset(this.getScrollOffset(),{adjustments:void 0,behavior:void 0})}const s=this.pendingScrollAnchor;if(this.pendingScrollAnchor=null,s&&this.scrollElement&&this.options.enabled){const[i,a,o,l]=s;i!==null&&!o&&(_w()&&(this.isScrolling||this._iosTouching||this._iosJustTouchEnded)?l!==0&&(this._iosDeferredAdjustment+=l):this._scrollToOffset(this.getScrollOffset(),{adjustments:void 0,behavior:void 0})),o&&this.scrollToEnd({behavior:o})}this._retryClampedAdjustment()},this._retryClampedAdjustment=()=>{if(this._clampedAdjustment===null||!this.scrollElement||!this.options.enabled)return;const{target:t,maxAtWrite:r}=this._clampedAdjustment,s=this.getMaxScrollOffset();s>r+.5&&(this._clampedAdjustment=t>s+.5?{target:t,maxAtWrite:s}:null,this._scrollToOffset(t,{adjustments:void 0,behavior:void 0}))},this._flushIosDeferredIfReady=()=>{if(this._iosDeferredAdjustment===0||this.isScrolling||this._iosTouching||this._iosJustTouchEnded)return;const t=this.getScrollOffset(),r=this.getMaxScrollOffset();if(t<0||t>r)return;if(this._iosDeferredAdjustment<0&&t>=r-1){this._iosDeferredAdjustment=0;return}const s=this._iosDeferredAdjustment;this._iosDeferredAdjustment=0,this._scrollToOffset(t,{adjustments:this.scrollAdjustments+=s,behavior:void 0})},this.rafId=null,this.getSize=()=>this.options.enabled?(this.scrollRect=this.scrollRect??this.options.initialRect,this.scrollRect[this.options.horizontal?"width":"height"]):(this.scrollRect=null,0),this.getScrollOffset=()=>this.options.enabled?(this.scrollOffset=this.scrollOffset??(typeof this.options.initialOffset=="function"?this.options.initialOffset():this.options.initialOffset),this.scrollOffset):(this.scrollOffset=null,0),this.getMeasurementOptions=Yf(()=>[this.options.count,this.options.paddingStart,this.options.scrollMargin,this.options.getItemKey,this.options.enabled,this.options.lanes,this.options.laneAssignmentMode,this.options.gap],(t,r,s,i,a,o,l,u)=>(this.prevLanes!==void 0&&this.prevLanes!==o&&(this.lanesChangedFlag=!0),this.prevLanes=o,this.pendingMin=null,{count:t,paddingStart:r,scrollMargin:s,getItemKey:i,enabled:a,lanes:o,laneAssignmentMode:l,gap:u}),{key:!1}),this.isIndexInRange=t=>t>=0&&t[this.getMeasurementOptions(),this.itemSizeCacheVersion],({count:t,paddingStart:r,scrollMargin:s,getItemKey:i,enabled:a,lanes:o,laneAssignmentMode:l,gap:u},h)=>{const _=this.itemSizeCache;if(!a)return this.measurementsCache=[],this.itemSizeCache.clear(),this.laneAssignments.clear(),[];if(this.laneAssignments.size>t)for(const b of this.laneAssignments.keys())b>=t&&this.laneAssignments.delete(b);this.lanesChangedFlag&&(this.lanesChangedFlag=!1,this.lanesSettling=!0,this.measurementsCache=[],this.itemSizeCache.clear(),this.laneAssignments.clear(),this.pendingMin=null),this.measurementsCache.length===0&&!this.lanesSettling&&(this.measurementsCache=this.options.initialMeasurementsCache,this.measurementsCache.forEach(b=>{this.itemSizeCache.set(b.key,b.size)}));const p=this.lanesSettling?0:this.pendingMin??0;if(this.pendingMin=null,this.lanesSettling&&this.measurementsCache.length===t&&(this.lanesSettling=!1),o===1){const b=t*2;let w=this._flatMeasurements;if(!w||w.length0&&E.set(w.subarray(0,p*2)),w=E,this._flatMeasurements=w}let y;if(p===0)y=r+s;else{const E=p-1;y=w[E*2]+w[E*2+1]+u}for(let E=p;E1){C=y;const L=x[C],I=L!==void 0?m[L]:void 0;E=I?I.end+u:r+s}else if(v===o){let L=0,I=k[0],B=x[0];for(let q=1;qthis.options.debug}),this.calculateRange=Yf(()=>[this.getMeasurements(),this.getSize(),this.getScrollOffset(),this.options.lanes],(t,r,s,i)=>t.length===0||r===0?(this.range=null,null):(this.range=G5n(t,r,s,i,i===1&&this._flatMeasurements!=null?this._flatMeasurements:null),this.range),{key:!1,debug:()=>this.options.debug}),this.getVirtualIndexes=Yf(()=>{let t=null,r=null;const s=this.calculateRange();return s&&(t=s.startIndex,r=s.endIndex),this.maybeNotify.updateDeps([this.isScrolling,t,r]),[this.options.rangeExtractor,this.options.overscan,this.options.count,t,r]},(t,r,s,i,a)=>i===null||a===null?[]:t({startIndex:i,endIndex:a,overscan:r,count:s}),{key:!1,debug:()=>this.options.debug}),this.indexFromElement=t=>{const r=this.options.indexAttribute,s=t.getAttribute(r);return s?parseInt(s,10):(console.warn(`Missing attribute name '${r}={index}' on measured element.`),-1)},this.shouldMeasureDuringScroll=t=>{var r;if(!this.scrollState||this.scrollState.behavior!=="smooth")return!0;const s=this.scrollState.index??((r=this.getVirtualItemForOffset(this.scrollState.lastTargetOffset))==null?void 0:r.index);if(s!==void 0&&this.range){const i=Math.max(this.options.overscan,Math.ceil((this.range.endIndex-this.range.startIndex)/2)),a=Math.max(0,s-i),o=Math.min(this.options.count-1,s+i);return t>=a&&t<=o}return!0},this.measureElement=t=>{if(!t){this.elementsCache.forEach((a,o)=>{a.isConnected||(this.observer.unobserve(a),this.elementsCache.delete(o))});return}const r=this.indexFromElement(t);if(!this.isIndexInRange(r))return;const s=this.options.getItemKey(r),i=this.elementsCache.get(s);i!==t&&(i&&this.observer.unobserve(i),this.observer.observe(t),this.elementsCache.set(s,t)),(!this.isScrolling||this.scrollState)&&this.shouldMeasureDuringScroll(r)&&this.resizeItem(r,this.options.measureElement(t,void 0,this))},this.resizeItem=(t,r)=>{var s,i;if(!this.isIndexInRange(t))return;let a,o,l;const u=this._flatMeasurements;if(this.options.lanes===1&&u!==null)l=this.options.getItemKey(t),o=u[t*2],a=u[t*2+1];else{const p=this.measurementsCache[t];if(!p)return;l=p.key,o=p.start,a=p.size}const h=this.itemSizeCache.get(l)??a,_=r-h;if(_!==0){const p=this.options.anchorTo==="end"&&((s=this.scrollState)==null?void 0:s.behavior)!=="smooth"&&this.getVirtualDistanceFromEnd()<=this.options.scrollEndThreshold,m=p?this.getTotalSize():0,x=this.getScrollOffset()+this.scrollAdjustments,v=!this.itemSizeCache.has(l)?o[this.getVirtualIndexes(),this.getMeasurements()],(t,r)=>{const s=[];for(let i=0,a=t.length;ithis.options.debug}),this.getVirtualItemForOffset=t=>{const r=this.getMeasurements();if(r.length===0)return;const s=this._flatMeasurements,i=this.options.lanes===1&&s!=null,a=gB(0,r.length-1,i?o=>s[o*2]:o=>Wj(r[o]).start,t);return Wj(r[a])},this.getMaxScrollOffset=()=>{if(!this.scrollElement)return 0;if("scrollHeight"in this.scrollElement)return this.options.horizontal?this.scrollElement.scrollWidth-this.scrollElement.clientWidth:this.scrollElement.scrollHeight-this.scrollElement.clientHeight;{const t=this.scrollElement.document.documentElement;return this.options.horizontal?t.scrollWidth-this.scrollElement.innerWidth:t.scrollHeight-this.scrollElement.innerHeight}},this.getVirtualDistanceFromEnd=()=>Math.max(this.getTotalSize()-this.getSize()-this.getScrollOffset(),0),this.getDistanceFromEnd=()=>Math.max(this.getMaxScrollOffset()-this.getScrollOffset(),0),this.isAtEnd=(t=this.options.scrollEndThreshold)=>this.getDistanceFromEnd()<=t,this.getOffsetForAlignment=(t,r,s=0)=>{if(!this.scrollElement)return 0;const i=this.getSize(),a=this.getScrollOffset();r==="auto"&&(r=t>=a+i?"end":"start"),r==="center"?t+=(s-i)/2:r==="end"&&(t-=i);const o=this.getMaxScrollOffset();return Math.max(Math.min(o,t),0)},this.getOffsetForIndex=(t,r="auto")=>{t=Math.max(0,Math.min(t,this.options.count-1));const s=this.getSize(),i=this.getScrollOffset(),a=this.measurementsCache[t];if(!a)return;if(r==="auto")if(a.end>=i+s-this.options.scrollPaddingEnd)r="end";else if(a.start<=i+this.options.scrollPaddingStart)r="start";else return[i,r];if(r==="end"&&t===this.options.count-1)return[this.getMaxScrollOffset(),r];const o=r==="end"?a.end+this.options.scrollPaddingEnd:a.start-this.options.scrollPaddingStart;return[this.getOffsetForAlignment(o,r,a.size),r]},this.scrollToOffset=(t,{align:r="start",behavior:s="auto"}={})=>{this._iosDeferredAdjustment=0;const i=this.getOffsetForAlignment(t,r),a=this.now();this.scrollState={index:null,align:r,behavior:s,startedAt:a,lastTargetOffset:i,stableFrames:0},this._scrollToOffset(i,{adjustments:void 0,behavior:s}),this.scheduleScrollReconcile()},this.scrollToIndex=(t,{align:r="auto",behavior:s="auto"}={})=>{this._iosDeferredAdjustment=0,t=Math.max(0,Math.min(t,this.options.count-1));const i=this.getOffsetForIndex(t,r);if(!i)return;const[a,o]=i,l=this.now();this.scrollState={index:t,align:o,behavior:s,startedAt:l,lastTargetOffset:a,stableFrames:0},this._scrollToOffset(a,{adjustments:void 0,behavior:s}),this.scheduleScrollReconcile()},this.scrollBy=(t,{behavior:r="auto"}={})=>{const s=this.getScrollOffset()+t,i=this.now();this.scrollState={index:null,align:"start",behavior:r,startedAt:i,lastTargetOffset:s,stableFrames:0},this._scrollToOffset(s,{adjustments:void 0,behavior:r}),this.scheduleScrollReconcile()},this.scrollToEnd=({behavior:t="auto"}={})=>{if(this.options.count>0){this.scrollToIndex(this.options.count-1,{align:"end",behavior:t});return}this.scrollToOffset(Math.max(this.getTotalSize()-this.getSize(),0),{behavior:t})},this.getTotalSize=()=>{var t;const r=this.getMeasurements();let s;if(r.length===0)s=this.options.paddingStart;else if(this.options.lanes===1){const i=r.length-1,a=this._flatMeasurements;a!=null?s=a[i*2]+a[i*2+1]:s=((t=r[i])==null?void 0:t.end)??0}else{const i=Array(this.options.lanes).fill(null);let a=r.length-1;for(;a>=0&&i.some(o=>o===null);){const o=r[a];i[o.lane]===null&&(i[o.lane]=o.end),a--}s=Math.max(...i.filter(o=>o!==null))}return Math.max(s-this.options.scrollMargin+this.options.paddingEnd,0)},this.takeSnapshot=()=>{const t=[];if(this.itemSizeCache.size===0)return t;const r=this.getMeasurements();for(const s of r)s&&this.itemSizeCache.has(s.key)&&t.push({index:s.index,key:s.key,start:s.start,size:s.size,end:s.end,lane:s.lane});return t},this._scrollToOffset=(t,{adjustments:r,behavior:s})=>{this._intendedScrollOffset=t+(r??0),this.options.scrollToFn(t,{behavior:s,adjustments:r},this)},this.measure=()=>{this.pendingMin=null,this.itemSizeCache.clear(),this.laneAssignments.clear(),this.itemSizeCacheVersion++,this.notify(!1)},this.setOptions(n)}applyScrollAdjustment(n,t){if(n===0)return!1;if(_w()&&(this.isScrolling||this._iosTouching||this._iosJustTouchEnded))return this._iosDeferredAdjustment+=n,!1;{const r=this.getScrollOffset()+this.scrollAdjustments+n,s=this.scrollElement,i=s!==null&&("scrollHeight"in s||"document"in s)?this.getMaxScrollOffset():null;return this._clampedAdjustment=i!==null&&r>i+.5?{target:r,maxAtWrite:i}:null,this._scrollToOffset(this.getScrollOffset(),{adjustments:this.scrollAdjustments+=n,behavior:t}),this.scrollOffset!==null&&(this.scrollOffset+=this.scrollAdjustments,this.scrollOffset<0&&(this.scrollOffset=0),this.scrollAdjustments=0),!0}}scheduleScrollReconcile(){if(!this.targetWindow){this.scrollState=null;return}this.rafId==null&&(this.rafId=this.targetWindow.requestAnimationFrame(()=>{this.rafId=null,this.reconcileScroll()}))}reconcileScroll(){if(!this.scrollState||!this.scrollElement)return;if(this.now()-this.scrollState.startedAt>5e3){this.scrollState=null;return}const r=this.scrollState.index!=null?this.getOffsetForIndex(this.scrollState.index,this.scrollState.align):void 0,s=r?r[0]:this.scrollState.lastTargetOffset,i=1,a=s!==this.scrollState.lastTargetOffset;if(!a&&M5n(s,this.getScrollOffset())){if(this.scrollState.stableFrames++,this.scrollState.stableFrames>=i){this.getScrollOffset()!==s&&this._scrollToOffset(s,{adjustments:void 0,behavior:"auto"}),this.scrollState=null;return}}else if(this.scrollState.stableFrames=0,a){const o=this.getSize()||600,l=Math.abs(s-this.getScrollOffset()),u=this.scrollState.behavior==="smooth"&&l>o;this.scrollState.lastTargetOffset=s,u||(this.scrollState.behavior="auto"),this._scrollToOffset(s,{adjustments:void 0,behavior:u?"smooth":"auto"})}this.scheduleScrollReconcile()}}const gB=(e,n,t,r)=>{for(;e<=n;){const s=(e+n)/2|0,i=t(s);if(ir)n=s-1;else return s}return e>0?e-1:0};function U5n(e,n,t){let r=0;for(;r<=n;){const s=(r+n)/2|0,i=e[s*2];if(it)n=s-1;else return s}return r>0?r-1:0}function G5n(e,n,t,r,s){const i=e.length-1;if(e.length<=r)return{startIndex:0,endIndex:i};if(r===1&&s!==null){const u=U5n(s,i,t);let h=u;const _=t+n;for(;he[u].start,t),l=o;if(r===1)for(;l1){const u=Array(r).fill(0);for(;l_=0&&h.some(_=>_>=t);){const _=e[o];h[_.lane]=_.start,o--}o=Math.max(0,o-o%r),l=Math.min(i,l+(r-1-l%r))}return{startIndex:o,endIndex:l}}const fw=typeof document<"u"?T.useLayoutEffect:T.useEffect;function V5n({useFlushSync:e=!0,directDomUpdates:n=!1,directDomUpdatesMode:t="transform",...r}){const s=T.useReducer(h=>h+1,0)[1],i=T.useRef({enabled:n,mode:t,container:null,lastSize:null,lastPositions:new WeakMap,prevRange:null});i.current.enabled=n,i.current.mode=t;const a=h=>{const _=i.current;if(!_.enabled||!_.container)return;const p=h.getTotalSize();if(p!==_.lastSize){_.lastSize=p;const m=h.options.horizontal?"width":"height";_.container.style[m]=`${p}px`}},o=h=>{const _=i.current;if(!_.enabled||!_.container)return;a(h);const p=!!h.options.horizontal,m=_.mode==="transform",x=p?"left":"top",k=h.options.scrollMargin,v=h.getVirtualItems();for(const b of v){const w=b.start-k,y=h.elementsCache.get(b.key);y&&_.lastPositions.get(y)!==w&&(_.lastPositions.set(y,w),m?y.style.transform=p?`translate3d(${w}px, 0, 0)`:`translate3d(0, ${w}px, 0)`:y.style[x]=`${w}px`)}},l={...r,onChange:(h,_)=>{var p;const m=i.current;let x=!0;if(m.enabled){o(h);const k=h.range,v=m.prevRange;x=!v||v.isScrolling!==h.isScrolling||v.startIndex!==(k==null?void 0:k.startIndex)||v.endIndex!==(k==null?void 0:k.endIndex),x&&(m.prevRange=k?{startIndex:k.startIndex,endIndex:k.endIndex,isScrolling:h.isScrolling}:null)}x&&(e&&_?Oa.flushSync(s):s()),(p=r.onChange)==null||p.call(r,h,_)}},[u]=T.useState(()=>{const h=new q5n(l);return Object.assign(h,{containerRef:_=>{const p=i.current;if(p.container=_,p.lastSize=null,_&&p.enabled){const m=h.getTotalSize();p.lastSize=m;const x=h.options.horizontal?"width":"height";_.style[x]=`${m}px`}}})});return u.setOptions(l),fw(()=>u._didMount(),[]),fw(()=>(a(u),u._willUpdate())),fw(()=>{o(u)}),u}function K5n(e){return V5n({observeElementRect:L5n,observeElementOffset:B5n,scrollToFn:H5n,...e})}function W5n(e,n){if(!n)return e;const t=new Map(e.map(i=>[i.id,i]));let r=t.get(n);if(!r)return e;const s=[];for(;r;)s.push(r),r=r.parentId?t.get(r.parentId):void 0;return s.reverse()}function Q5n(e,n,t){var a;let r=e;for(;r&&r.role!=="user";)r=r.parentId?n.get(r.parentId):void 0;const s=e.role==="user"?e.parentId??null:(r==null?void 0:r.id)??null,i=(a=t.get(s))==null?void 0:a.filter(o=>o.role===e.role);return i!=null&&i.length?i:[e]}function X5n(e,n,t,r){const s=e.filter(u=>!r(u.id)),i=new Map(s.map(u=>[u.id,u])),a=new Map;for(const u of s){const h=u.parentId??null,_=a.get(h);_?_.push(u):a.set(h,[u])}const o=new Set(n.map(u=>u.id)),l=new Map;for(const u of t){const h=Q5n(u,i,a),_=h.findIndex(p=>o.has(p.id));l.set(u.id,{count:h.length,index:_,prevId:_>0?h[_-1].id:void 0,nextId:_=0;i--)for(const a of e[i].parts)if(!(a.type!=="prompt"||(r=a.prompt)!=null&&r.resolved||((s=a.prompt)==null?void 0:s.kind)!=="question"))return a.prompt.nativeId&&!t?null:a.id;return null}function nh(e,n){var t;if(e.type==="tool"&&((t=e.tool)==null?void 0:t.toLowerCase())==="interrupted")return!1;if(e.type==="prompt"){if(!e.prompt)return!1;if(e.prompt.kind==="permission"){if(e.prompt.resolved)return!1;if(n!==void 0)return e.id===n}return!0}return e.type==="reasoning"?!1:e.type==="text"?!!e.text:!0}function bm(e){return e.id==="turn-retry"||e.id==="turn-recovery"}function vB(e){var n;for(let t=e.length-1;t>=0;t--){const r=e[t];if(!(r.type==="steer"||bm(r)||!nh(r)))return r.type!=="tool"||((n=r.state)==null?void 0:n.status)==="error"?null:r.id}return null}function bB(e){const n=e.at(-1);if((n==null?void 0:n.role)!=="assistant")return null;const t=vB(n.parts);return t?{messageId:n.id,toolId:t}:null}function Z5n(e){const n=e.at(-1);if((n==null?void 0:n.role)!=="assistant")return!1;for(let t=n.parts.length-1;t>=0;t--){const r=n.parts[t];if(!(r.type==="steer"||bm(r)))return r.type==="text"&&!!r.text}return!1}function J5n(e,n,t,r,s){const i=[...n].filter(o=>!t.has(o)&&r.some(l=>l.id===o)&&o!==s);if(i.length===0&&!(s&&e.has(s)))return e;const a=new Set(e);for(const o of i)a.add(o);return s&&a.delete(s),a}function ekn(e,n){if(e.some(r=>{var s;return r.type==="prompt"&&!((s=r.prompt)!=null&&s.resolved)}))return{work:[],answer:e};let t=e.findIndex(r=>r.type==="text"&&r.phase==="final_answer");if(t<0&&!n&&!e.some(r=>r.phase))for(let r=e.length-1;r>=0;r--){const s=e[r];if(s.type!=="reasoning"){if(s.type!=="text")break;s.text&&(t=r)}}return t<0||!n&&!e.slice(t).some(r=>nh(r))||!e.slice(0,t).some(r=>nh(r))?{work:[],answer:e}:{work:e.slice(0,t),answer:e.slice(t)}}function yB(e){var n,t;return e.type==="tool"&&e.tool==="error"&&/^(?:ActionRequiredError:\s*)?Named models unavailable\b/i.test(((t=(n=e.state)==null?void 0:n.error)==null?void 0:t.trim())??"")}function X3(e){var t,r,s;if(yB(e)||((r=(t=e.state)==null?void 0:t.input)==null?void 0:r.errorKind)==="claude_usage_limit")return!0;const n=e.type==="text"?e.text:e.tool==="error"?(s=e.state)==null?void 0:s.error:null;return e.type==="tool"&&e.tool==="error"&&n&&/usageLimitExceeded|rateLimitExceeded|insufficient_quota|(?:usage|rate|session) limit|(?:exceeded|exhausted) (?:your |the |current )*quota|insufficient (?:credits|balance)|(?:credit|quota)[ _-](?:exhausted|exceeded)/i.test(n)?!0:!!(n&&(/^(?:claude: )?you(?:'ve| have) reached your .+ limit\./i.test(n.trim())&&n.includes("claude.ai/settings/usage")||/^(?:claude: )?you(?:'ve| have) hit your session limit · resets /i.test(n.trim())))}const To=e=>new Intl.NumberFormat(z()).format(e);function tkn(e,n){const t=typeof e.nextRetryAt=="number"?Math.max(0,Math.ceil((e.nextRetryAt-n)/1e3)):null;return e.retryOwner==="native"&&e.maximum==null&&t==null?PSt():typeof e.attempt=="number"&&typeof e.maximum=="number"&&t!=null?ESt({attempt:To(e.attempt),maximum:To(e.maximum),seconds:To(t)}):typeof e.attempt=="number"&&typeof e.maximum=="number"?bSt({attempt:To(e.attempt),maximum:To(e.maximum)}):typeof e.attempt=="number"&&t!=null?MSt({attempt:To(e.attempt),seconds:To(t)}):typeof e.attempt=="number"?fSt({attempt:To(e.attempt)}):t!=null?KSt({seconds:To(t)}):HD()}function nkn(e,n){if(typeof e!="number")return e6t();const t=Math.max(0,Math.ceil((e-n)/1e3));return o6t({seconds:To(t)})}function xB(e){return e==="retry"||e==="continue"?e:null}function rkn(e){const n={};return e.model!==void 0&&(n.model=e.model),e.serviceTier!==void 0&&(n.serviceTier=e.serviceTier),e.permissionMode!==void 0&&(n.permissionMode=e.permissionMode),e.planMode!==void 0&&(n.planMode=e.planMode),e.reasoningLevel!==void 0&&(n.reasoningLevel=e.reasoningLevel),n}const dw={draft:"",attachments:[],annotations:[]};function skn(e,n){return(e.draft===""||e.draft===n)&&e.attachments.length===0&&e.annotations.length===0?null:{...e,annotations:e.annotations.map(({range:r,...s})=>s)}}function ikn(e){return["*","?","[","]","{","}"].some(n=>e.includes(n))}function Xj(e){return e==="alphaxiv"||e==="openalex"||e==="biorxiv"?e:void 0}function akn(e){const n=e.trim(),t=n.toLowerCase();if(t.includes("biorxiv.org"))return"biorxiv";if(t.includes("openalex.org"))return"openalex";const r=n.match(/10\.\d+\/\S+/);if(r)return r[0].startsWith("10.1101/")?"biorxiv":"openalex";const s=n.split("/").pop()??"";return/^W\d+$/i.test(s)?"openalex":"alphaxiv"}function u6(e){const n=[];let t="",r=!1,s=null;const i=()=>{r&&n.push(t),t="",r=!1};for(let a=0;a"||o==="&")break;/\s/.test(o)?i():(t+=o,r=!0)}return i(),n}function k5n(e){const n=e[0];if((n==='"'||n==="'")&&e.at(-1)===n){const t=u6(e);if(t.length===1)return t[0]}return e}function S5n(e){var t,r,s;let n=0;for(;["do","then","else","if","while","until"].includes(e[n]);)n++;for(;/^[A-Za-z_][A-Za-z0-9_]*=/.test(e[n]??"");)n++;if(e[n]==="env")for(n++;(t=e[n])!=null&&t.startsWith("-")||/^[A-Za-z_][A-Za-z0-9_]*=/.test(e[n]??"");)n++;if(e[n]==="command"){if(n++,["-v","-V"].includes(e[n]))return null;for(;(r=e[n])!=null&&r.startsWith("-");)n++}return((s=e[n])==null?void 0:s.split("/").pop())!=="orx"?null:e.slice(n+1)}function rh(e){return S5n(typeof e=="string"?u6(e):e)}function C5n(e){var t;const n=(t=e[0])==null?void 0:t.split("/").pop();return!n||!["sh","bash","zsh"].includes(n)||e[1]!=="-lc"?null:e[2]??null}function E5n(e,n){const t=rh(e);return t===null?!1:n.split("\\s+").every((s,i)=>t[i]!==void 0&&new RegExp(`^(?:${s})$`,"i").test(t[i]))}function N5n(e){var l;const n=rh(e);if(!n)return null;const t=n[0];if(t!=="paper"&&t!=="discover")return null;let r;const s=[],i=new Set(["--limit","--published-after","--published-before","--prioritize"]);for(let u=1;u +`&&(t+=l,r=!0);continue}if(s){o===s?s=null:t+=o,r=!0;continue}if(o==='"'||o==="'"){s=o,r=!0;continue}if(o==="|"||o===";"||o===">"||o==="&")break;/\s/.test(o)?i():(t+=o,r=!0)}return i(),n}function okn(e){const n=e[0];if((n==='"'||n==="'")&&e.at(-1)===n){const t=u6(e);if(t.length===1)return t[0]}return e}function lkn(e){var t,r,s;let n=0;for(;["do","then","else","if","while","until"].includes(e[n]);)n++;for(;/^[A-Za-z_][A-Za-z0-9_]*=/.test(e[n]??"");)n++;if(e[n]==="env")for(n++;(t=e[n])!=null&&t.startsWith("-")||/^[A-Za-z_][A-Za-z0-9_]*=/.test(e[n]??"");)n++;if(e[n]==="command"){if(n++,["-v","-V"].includes(e[n]))return null;for(;(r=e[n])!=null&&r.startsWith("-");)n++}return((s=e[n])==null?void 0:s.split("/").pop())!=="orx"?null:e.slice(n+1)}function rh(e){return lkn(typeof e=="string"?u6(e):e)}function ckn(e){var t;const n=(t=e[0])==null?void 0:t.split("/").pop();return!n||!["sh","bash","zsh"].includes(n)||e[1]!=="-lc"?null:e[2]??null}function ukn(e,n){const t=rh(e);return t===null?!1:n.split("\\s+").every((s,i)=>t[i]!==void 0&&new RegExp(`^(?:${s})$`,"i").test(t[i]))}function _kn(e){var l;const n=rh(e);if(!n)return null;const t=n[0];if(t!=="paper"&&t!=="discover")return null;let r;const s=[],i=new Set(["--limit","--published-after","--published-before","--prioritize"]);for(let u=1;u -`,j5n='',T5n=` +`,dkn='',hkn=` -`,yB={alphaxiv:"alphaXiv",openalex:"OpenAlex",biorxiv:"bioRxiv"},A5n={alphaxiv:z5n,openalex:T5n,biorxiv:j5n};function xB({source:e,size:n=16,decorative:t=!1,className:r=""}){return f.jsx("span",{className:`lit-logo flex-none inline-flex items-center justify-center p-[1.5px] box-border bg-white rounded-[3px] shadow-logo [&_svg]:w-full [&_svg]:h-full [&_svg]:block ${r}`,style:{width:n,height:n},...t?{"aria-hidden":!0}:{role:"img","aria-label":yB[e]},dangerouslySetInnerHTML:{__html:A5n[e]}})}function R5n(e){const t=e.trim().replace(/^https?:\/\/doi\.org\//i,"").replace(/^doi:/i,"").match(/10\.\d+\/[^\s?#]+/);return t?t[0].replace(/[.,)]+$/,"").replace(/v\d+(\.[a-z][a-z-]*)*$/i,""):null}function M5n(e,n){const t=n.trim();if(e==="alphaxiv"){const i=(t.split(/[?#]/)[0].split("/").pop()||t).replace(/\.(pdf|md)$/i,"");return`https://www.alphaxiv.org/abs/${encodeURIComponent(i)}`}const r=R5n(t);if(r)return`https://doi.org/${r}`;if(e==="openalex"){const s=t.split("/").pop()||t;return`https://openalex.org/${encodeURIComponent(s)}`}return`https://doi.org/${t}`}const O5n=["alphaxiv","openalex","biorxiv"];function D5n(){const e=Bmn(),{data:n}=ft(e),t=vn({mutationFn:q0n,onSuccess:i=>Qr(e.queryKey,i)}),r=t.isPending,s=i=>{n&&!r&&t.mutate({...n,[i]:!n[i]})};return n?f.jsx("div",{className:"flex flex-col",children:O5n.map(i=>{const a=n[i];return f.jsxs(nr,{type:"button",role:"switch","aria-checked":a,disabled:r,onClick:()=>s(i),children:[f.jsxs("span",{className:"inline-flex items-center gap-[9px]",children:[f.jsx(xB,{source:i,size:16,decorative:!0}),yB[i]]}),f.jsx(y1n,{checked:a,"aria-hidden":"true"})]},i)})}):f.jsx("div",{className:"py-1.5 px-2 text-muted text-sm",children:zWe()})}function hw(e,n){if(!e)throw new Error("Assertion Error")}function i_(e,n){if(e==null)throw new Error(`Unexpected ${e}`);return e}function L5n(e,n){const t={type:"element",tagName:"blockquote",properties:{},children:e.wrap(e.all(n),!0)};return e.patch(n,t),e.applyData(n,t)}function I5n(e,n){const t={type:"element",tagName:"br",properties:{},children:[]};return e.patch(n,t),[e.applyData(n,t),{type:"text",value:` -`}]}function $5n(e,n){const t=n.value?n.value+` -`:"",r={},s=n.lang?n.lang.split(/\s+/):[];s.length>0&&(r.className=["language-"+s[0]]);let i={type:"element",tagName:"code",properties:r,children:[{type:"text",value:t}]};return n.meta&&(i.data={meta:n.meta}),e.patch(n,i),i=e.applyData(n,i),i={type:"element",tagName:"pre",properties:{},children:[i]},e.patch(n,i),i}function B5n(e,n){const t={type:"element",tagName:"del",properties:{},children:e.all(n)};return e.patch(n,t),e.applyData(n,t)}function P5n(e,n){const t={type:"element",tagName:"em",properties:{},children:e.all(n)};return e.patch(n,t),e.applyData(n,t)}const ci=Ru(/[A-Za-z]/),Gs=Ru(/[\dA-Za-z]/),F5n=Ru(/[#-'*+\--9=?A-Z^-~]/);function Iv(e){return e!==null&&(e<32||e===127)}const Y3=Ru(/\d/),H5n=Ru(/[\dA-Fa-f]/),q5n=Ru(/[!-/:-@[-`{-~]/);function Ct(e){return e!==null&&e<-2}function lr(e){return e!==null&&(e<0||e===32)}function bn(e){return e===-2||e===-1||e===32}const Jb=Ru(new RegExp("\\p{P}|\\p{S}","u")),V_=Ru(/\s/);function Ru(e){return n;function n(t){return t!==null&&t>-1&&e.test(String.fromCharCode(t))}}function Ch(e){const n=[];let t=-1,r=0,s=0;for(;++t55295&&i<57344){const o=e.charCodeAt(t+1);i<56320&&o>56319&&o<57344?(a=String.fromCharCode(i,o),s=1):a="�"}else a=String.fromCharCode(i);a&&(n.push(e.slice(r,t),encodeURIComponent(a)),r=t+s+1,a=""),s&&(t+=s,s=0)}return n.join("")+e.slice(r)}function U5n(e,n){const t=typeof e.options.clobberPrefix=="string"?e.options.clobberPrefix:"user-content-",r=String(n.identifier).toUpperCase(),s=Ch(r.toLowerCase()),i=e.footnoteOrder.indexOf(r);let a,o=e.footnoteCounts.get(r);o===void 0?(o=0,e.footnoteOrder.push(r),a=e.footnoteOrder.length):a=i+1,o+=1,e.footnoteCounts.set(r,o);const l={type:"element",tagName:"a",properties:{href:"#"+t+"fn-"+s,id:t+"fnref-"+s+(o>1?"-"+o:""),dataFootnoteRef:!0,ariaDescribedBy:["footnote-label"]},children:[{type:"text",value:String(a)}]};e.patch(n,l);const u={type:"element",tagName:"sup",properties:{},children:[l]};return e.patch(n,u),e.applyData(n,u)}function G5n(e,n){const t={type:"element",tagName:"h"+n.depth,properties:{},children:e.all(n)};return e.patch(n,t),e.applyData(n,t)}function V5n(e,n){if(e.options.allowDangerousHtml){const t={type:"raw",value:n.value};return e.patch(n,t),e.applyData(n,t)}}function wB(e,n){const t=n.referenceType;let r="]";if(t==="collapsed"?r+="[]":t==="full"&&(r+="["+(n.label||n.identifier)+"]"),n.type==="imageReference")return[{type:"text",value:"!["+n.alt+r}];const s=e.all(n),i=s[0];i&&i.type==="text"?i.value="["+i.value:s.unshift({type:"text",value:"["});const a=s[s.length-1];return a&&a.type==="text"?a.value+=r:s.push({type:"text",value:r}),s}function K5n(e,n){const t=String(n.identifier).toUpperCase(),r=e.definitionById.get(t);if(!r)return wB(e,n);const s={src:Ch(r.url||""),alt:n.alt};r.title!==null&&r.title!==void 0&&(s.title=r.title);const i={type:"element",tagName:"img",properties:s,children:[]};return e.patch(n,i),e.applyData(n,i)}function W5n(e,n){const t={src:Ch(n.url)};n.alt!==null&&n.alt!==void 0&&(t.alt=n.alt),n.title!==null&&n.title!==void 0&&(t.title=n.title);const r={type:"element",tagName:"img",properties:t,children:[]};return e.patch(n,r),e.applyData(n,r)}function Q5n(e,n){const t={type:"text",value:n.value.replace(/\r?\n|\r/g," ")};e.patch(n,t);const r={type:"element",tagName:"code",properties:{},children:[t]};return e.patch(n,r),e.applyData(n,r)}function X5n(e,n){const t=String(n.identifier).toUpperCase(),r=e.definitionById.get(t);if(!r)return wB(e,n);const s={href:Ch(r.url||"")};r.title!==null&&r.title!==void 0&&(s.title=r.title);const i={type:"element",tagName:"a",properties:s,children:e.all(n)};return e.patch(n,i),e.applyData(n,i)}function Y5n(e,n){const t={href:Ch(n.url)};n.title!==null&&n.title!==void 0&&(t.title=n.title);const r={type:"element",tagName:"a",properties:t,children:e.all(n)};return e.patch(n,r),e.applyData(n,r)}function Z5n(e,n,t){const r=e.all(n),s=t?J5n(t):kB(n),i={},a=[];if(typeof n.checked=="boolean"){const h=r[0];let _;h&&h.type==="element"&&h.tagName==="p"?_=h:(_={type:"element",tagName:"p",properties:{},children:[]},r.unshift(_)),_.children.length>0&&_.children.unshift({type:"text",value:" "}),_.children.unshift({type:"element",tagName:"input",properties:{type:"checkbox",checked:n.checked,disabled:!0},children:[]}),i.className=["task-list-item"]}let o=-1;for(;++oXr(e.queryKey,i)}),r=t.isPending,s=i=>{n&&!r&&t.mutate({...n,[i]:!n[i]})};return n?f.jsx("div",{className:"flex flex-col",children:vkn.map(i=>{const a=n[i];return f.jsxs(nr,{type:"button",role:"switch","aria-checked":a,disabled:r,onClick:()=>s(i),children:[f.jsxs("span",{className:"inline-flex items-center gap-[9px]",children:[f.jsx(kB,{source:i,size:16,decorative:!0}),wB[i]]}),f.jsx(svn,{checked:a,"aria-hidden":"true"})]},i)})}):f.jsx("div",{className:"py-1.5 px-2 text-muted text-sm",children:TWe()})}function hw(e,n){if(!e)throw new Error("Assertion Error")}function i_(e,n){if(e==null)throw new Error(`Unexpected ${e}`);return e}function ykn(e,n){const t={type:"element",tagName:"blockquote",properties:{},children:e.wrap(e.all(n),!0)};return e.patch(n,t),e.applyData(n,t)}function xkn(e,n){const t={type:"element",tagName:"br",properties:{},children:[]};return e.patch(n,t),[e.applyData(n,t),{type:"text",value:` +`}]}function wkn(e,n){const t=n.value?n.value+` +`:"",r={},s=n.lang?n.lang.split(/\s+/):[];s.length>0&&(r.className=["language-"+s[0]]);let i={type:"element",tagName:"code",properties:r,children:[{type:"text",value:t}]};return n.meta&&(i.data={meta:n.meta}),e.patch(n,i),i=e.applyData(n,i),i={type:"element",tagName:"pre",properties:{},children:[i]},e.patch(n,i),i}function kkn(e,n){const t={type:"element",tagName:"del",properties:{},children:e.all(n)};return e.patch(n,t),e.applyData(n,t)}function Skn(e,n){const t={type:"element",tagName:"em",properties:{},children:e.all(n)};return e.patch(n,t),e.applyData(n,t)}const ci=Ru(/[A-Za-z]/),Gs=Ru(/[\dA-Za-z]/),Ckn=Ru(/[#-'*+\--9=?A-Z^-~]/);function Iv(e){return e!==null&&(e<32||e===127)}const Y3=Ru(/\d/),Ekn=Ru(/[\dA-Fa-f]/),Nkn=Ru(/[!-/:-@[-`{-~]/);function Et(e){return e!==null&&e<-2}function lr(e){return e!==null&&(e<0||e===32)}function bn(e){return e===-2||e===-1||e===32}const Jb=Ru(new RegExp("\\p{P}|\\p{S}","u")),V_=Ru(/\s/);function Ru(e){return n;function n(t){return t!==null&&t>-1&&e.test(String.fromCharCode(t))}}function Ch(e){const n=[];let t=-1,r=0,s=0;for(;++t55295&&i<57344){const o=e.charCodeAt(t+1);i<56320&&o>56319&&o<57344?(a=String.fromCharCode(i,o),s=1):a="�"}else a=String.fromCharCode(i);a&&(n.push(e.slice(r,t),encodeURIComponent(a)),r=t+s+1,a=""),s&&(t+=s,s=0)}return n.join("")+e.slice(r)}function zkn(e,n){const t=typeof e.options.clobberPrefix=="string"?e.options.clobberPrefix:"user-content-",r=String(n.identifier).toUpperCase(),s=Ch(r.toLowerCase()),i=e.footnoteOrder.indexOf(r);let a,o=e.footnoteCounts.get(r);o===void 0?(o=0,e.footnoteOrder.push(r),a=e.footnoteOrder.length):a=i+1,o+=1,e.footnoteCounts.set(r,o);const l={type:"element",tagName:"a",properties:{href:"#"+t+"fn-"+s,id:t+"fnref-"+s+(o>1?"-"+o:""),dataFootnoteRef:!0,ariaDescribedBy:["footnote-label"]},children:[{type:"text",value:String(a)}]};e.patch(n,l);const u={type:"element",tagName:"sup",properties:{},children:[l]};return e.patch(n,u),e.applyData(n,u)}function jkn(e,n){const t={type:"element",tagName:"h"+n.depth,properties:{},children:e.all(n)};return e.patch(n,t),e.applyData(n,t)}function Tkn(e,n){if(e.options.allowDangerousHtml){const t={type:"raw",value:n.value};return e.patch(n,t),e.applyData(n,t)}}function SB(e,n){const t=n.referenceType;let r="]";if(t==="collapsed"?r+="[]":t==="full"&&(r+="["+(n.label||n.identifier)+"]"),n.type==="imageReference")return[{type:"text",value:"!["+n.alt+r}];const s=e.all(n),i=s[0];i&&i.type==="text"?i.value="["+i.value:s.unshift({type:"text",value:"["});const a=s[s.length-1];return a&&a.type==="text"?a.value+=r:s.push({type:"text",value:r}),s}function Akn(e,n){const t=String(n.identifier).toUpperCase(),r=e.definitionById.get(t);if(!r)return SB(e,n);const s={src:Ch(r.url||""),alt:n.alt};r.title!==null&&r.title!==void 0&&(s.title=r.title);const i={type:"element",tagName:"img",properties:s,children:[]};return e.patch(n,i),e.applyData(n,i)}function Rkn(e,n){const t={src:Ch(n.url)};n.alt!==null&&n.alt!==void 0&&(t.alt=n.alt),n.title!==null&&n.title!==void 0&&(t.title=n.title);const r={type:"element",tagName:"img",properties:t,children:[]};return e.patch(n,r),e.applyData(n,r)}function Mkn(e,n){const t={type:"text",value:n.value.replace(/\r?\n|\r/g," ")};e.patch(n,t);const r={type:"element",tagName:"code",properties:{},children:[t]};return e.patch(n,r),e.applyData(n,r)}function Okn(e,n){const t=String(n.identifier).toUpperCase(),r=e.definitionById.get(t);if(!r)return SB(e,n);const s={href:Ch(r.url||"")};r.title!==null&&r.title!==void 0&&(s.title=r.title);const i={type:"element",tagName:"a",properties:s,children:e.all(n)};return e.patch(n,i),e.applyData(n,i)}function Dkn(e,n){const t={href:Ch(n.url)};n.title!==null&&n.title!==void 0&&(t.title=n.title);const r={type:"element",tagName:"a",properties:t,children:e.all(n)};return e.patch(n,r),e.applyData(n,r)}function Lkn(e,n,t){const r=e.all(n),s=t?Ikn(t):CB(n),i={},a=[];if(typeof n.checked=="boolean"){const h=r[0];let _;h&&h.type==="element"&&h.tagName==="p"?_=h:(_={type:"element",tagName:"p",properties:{},children:[]},r.unshift(_)),_.children.length>0&&_.children.unshift({type:"text",value:" "}),_.children.unshift({type:"element",tagName:"input",properties:{type:"checkbox",checked:n.checked,disabled:!0},children:[]}),i.className=["task-list-item"]}let o=-1;for(;++o1}function ekn(e,n){const t={},r=e.all(n);let s=-1;for(typeof n.start=="number"&&n.start!==1&&(t.start=n.start);++s0&&typeof r.column=="number"&&r.column>0)return{line:r.line,column:r.column,offset:typeof r.offset=="number"&&r.offset>-1?r.offset:void 0}}}function skn(e){const n=_6(e),t=SB(e);if(n&&t)return{start:n,end:t}}function ikn(e,n){const t=e.all(n),r=t.shift(),s=[];if(r){const a={type:"element",tagName:"thead",properties:{},children:e.wrap([r],!0)};e.patch(n.children[0],a),s.push(a)}if(t.length>0){const a={type:"element",tagName:"tbody",properties:{},children:e.wrap(t,!0)},o=_6(n.children[1]),l=SB(n.children[n.children.length-1]);o&&l&&(a.position={start:o,end:l}),s.push(a)}const i={type:"element",tagName:"table",properties:{},children:e.wrap(s,!0)};return e.patch(n,i),e.applyData(n,i)}function akn(e,n,t){const r=t?t.children:void 0,i=(r?r.indexOf(n):1)===0?"th":"td",a=t&&t.type==="table"?t.align:void 0,o=a?a.length:n.children.length;let l=-1;const u=[];for(;++l0,!0),r[0]),s=r.index+r[0].length,r=t.exec(n);return i.push(Jj(n.slice(s),s>0,!1)),i.join("")}function Jj(e,n,t){let r=0,s=e.length;if(n){let i=e.codePointAt(r);for(;i===Yj||i===Zj;)r++,i=e.codePointAt(r)}if(t){let i=e.codePointAt(s-1);for(;i===Yj||i===Zj;)s--,i=e.codePointAt(s-1)}return s>r?e.slice(r,s):""}function ckn(e,n){const t={type:"text",value:lkn(String(n.value))};return e.patch(n,t),e.applyData(n,t)}function ukn(e,n){const t={type:"element",tagName:"hr",properties:{},children:[]};return e.patch(n,t),e.applyData(n,t)}const _kn={blockquote:L5n,break:I5n,code:$5n,delete:B5n,emphasis:P5n,footnoteReference:U5n,heading:G5n,html:V5n,imageReference:K5n,image:W5n,inlineCode:Q5n,linkReference:X5n,link:Y5n,listItem:Z5n,list:ekn,paragraph:tkn,root:nkn,strong:rkn,table:ikn,tableCell:okn,tableRow:akn,text:ckn,thematicBreak:ukn,toml:a1,yaml:a1,definition:a1,footnoteDefinition:a1};function a1(){}const EB=-1,ey=0,e0=1,$v=2,f6=3,d6=4,h6=5,p6=6,NB=7,zB=8,fkn=typeof self=="object"?self:globalThis,eT=(e,n)=>{switch(e){case"Function":case"SharedWorker":case"Worker":case"eval":case"setInterval":case"setTimeout":throw new TypeError("unable to deserialize "+e)}return new fkn[e](n)},dkn=(e,n)=>{const t=(s,i)=>(e.set(i,s),s),r=s=>{if(e.has(s))return e.get(s);const[i,a]=n[s];switch(i){case ey:case EB:return t(a,s);case e0:{const o=t([],s);for(const l of a)o.push(r(l));return o}case $v:{const o=t({},s);for(const[l,u]of a)o[r(l)]=r(u);return o}case f6:return t(new Date(a),s);case d6:{const{source:o,flags:l}=a;return t(new RegExp(o,l),s)}case h6:{const o=t(new Map,s);for(const[l,u]of a)o.set(r(l),r(u));return o}case p6:{const o=t(new Set,s);for(const l of a)o.add(r(l));return o}case NB:{const{name:o,message:l}=a;return t(eT(o,l),s)}case zB:return t(BigInt(a),s);case"BigInt":return t(Object(BigInt(a)),s);case"ArrayBuffer":return t(new Uint8Array(a).buffer,a);case"DataView":{const{buffer:o}=new Uint8Array(a);return t(new DataView(o),a)}}return t(eT(i,a),s)};return r},tT=e=>dkn(new Map,e)(0),u_="",{toString:hkn}={},{keys:pkn}=Object,jp=e=>{const n=typeof e;if(n!=="object"||!e)return[ey,n];const t=hkn.call(e).slice(8,-1);switch(t){case"Array":return[e0,u_];case"Object":return[$v,u_];case"Date":return[f6,u_];case"RegExp":return[d6,u_];case"Map":return[h6,u_];case"Set":return[p6,u_];case"DataView":return[e0,t]}return t.includes("Array")?[e0,t]:t.includes("Error")?[NB,t]:[$v,t]},o1=([e,n])=>e===ey&&(n==="function"||n==="symbol"),mkn=(e,n,t,r)=>{const s=(a,o)=>{const l=r.push(a)-1;return t.set(o,l),l},i=a=>{if(t.has(a))return t.get(a);let[o,l]=jp(a);switch(o){case ey:{let h=a;switch(l){case"bigint":o=zB,h=a.toString();break;case"function":case"symbol":if(e)throw new TypeError("unable to serialize "+l);h=null;break;case"undefined":return s([EB],a)}return s([o,h],a)}case e0:{if(l){let p=a;return l==="DataView"?p=new Uint8Array(a.buffer):l==="ArrayBuffer"&&(p=new Uint8Array(a)),s([l,[...p]],a)}const h=[],_=s([o,h],a);for(const p of a)h.push(i(p));return _}case $v:{if(l)switch(l){case"BigInt":return s([l,a.toString()],a);case"Boolean":case"Number":case"String":return s([l,a.valueOf()],a)}if(n&&"toJSON"in a)return i(a.toJSON());const h=[],_=s([o,h],a);for(const p of pkn(a))(e||!o1(jp(a[p])))&&h.push([i(p),i(a[p])]);return _}case f6:return s([o,isNaN(a.getTime())?u_:a.toISOString()],a);case d6:{const{source:h,flags:_}=a;return s([o,{source:h,flags:_}],a)}case h6:{const h=[],_=s([o,h],a);for(const[p,m]of a)(e||!(o1(jp(p))||o1(jp(m))))&&h.push([i(p),i(m)]);return _}case p6:{const h=[],_=s([o,h],a);for(const p of a)(e||!o1(jp(p)))&&h.push(i(p));return _}}const{message:u}=a;return s([o,{name:l,message:u}],a)};return i},nT=(e,{json:n,lossy:t}={})=>{const r=[];return mkn(!(n||t),!!n,new Map,r)(e),r},Bv=typeof structuredClone=="function"?(e,n)=>n&&("json"in n||"lossy"in n)?tT(nT(e,n)):structuredClone(e):(e,n)=>tT(nT(e,n));function gkn(e,n){const t=[{type:"text",value:"↩"}];return n>1&&t.push({type:"element",tagName:"sup",properties:{},children:[{type:"text",value:String(n)}]}),t}function vkn(e,n){return"Back to reference "+(e+1)+(n>1?"-"+n:"")}function bkn(e){const n=typeof e.options.clobberPrefix=="string"?e.options.clobberPrefix:"user-content-",t=e.options.footnoteBackContent||gkn,r=e.options.footnoteBackLabel||vkn,s=e.options.footnoteLabel||"Footnotes",i=e.options.footnoteLabelTagName||"h2",a=e.options.footnoteLabelProperties||{className:["sr-only"]},o=[];let l=-1;for(;++l0&&x.push({type:"text",value:" "});let w=typeof t=="string"?t:t(l,m);typeof w=="string"&&(w={type:"text",value:w}),x.push({type:"element",tagName:"a",properties:{href:"#"+n+"fnref-"+p+(m>1?"-"+m:""),dataFootnoteBackref:"",ariaLabel:typeof r=="string"?r:r(l,m),className:["data-footnote-backref"]},children:Array.isArray(w)?w:[w]})}const v=h[h.length-1];if(v&&v.type==="element"&&v.tagName==="p"){const w=v.children[v.children.length-1];w&&w.type==="text"?w.value+=" ":v.children.push({type:"text",value:" "}),v.children.push(...x)}else h.push(...x);const b={type:"element",tagName:"li",properties:{id:n+"fn-"+p},children:e.wrap(h,!0)};e.patch(u,b),o.push(b)}if(o.length!==0)return{type:"element",tagName:"section",properties:{dataFootnotes:!0,className:["footnotes"]},children:[{type:"element",tagName:i,properties:{...Bv(a),id:"footnote-label"},children:[{type:"text",value:s}]},{type:"text",value:` +`});const u={type:"element",tagName:"li",properties:i,children:a};return e.patch(n,u),e.applyData(n,u)}function Ikn(e){let n=!1;if(e.type==="list"){n=e.spread||!1;const t=e.children;let r=-1;for(;!n&&++r1}function $kn(e,n){const t={},r=e.all(n);let s=-1;for(typeof n.start=="number"&&n.start!==1&&(t.start=n.start);++s0&&typeof r.column=="number"&&r.column>0)return{line:r.line,column:r.column,offset:typeof r.offset=="number"&&r.offset>-1?r.offset:void 0}}}function Hkn(e){const n=_6(e),t=EB(e);if(n&&t)return{start:n,end:t}}function qkn(e,n){const t=e.all(n),r=t.shift(),s=[];if(r){const a={type:"element",tagName:"thead",properties:{},children:e.wrap([r],!0)};e.patch(n.children[0],a),s.push(a)}if(t.length>0){const a={type:"element",tagName:"tbody",properties:{},children:e.wrap(t,!0)},o=_6(n.children[1]),l=EB(n.children[n.children.length-1]);o&&l&&(a.position={start:o,end:l}),s.push(a)}const i={type:"element",tagName:"table",properties:{},children:e.wrap(s,!0)};return e.patch(n,i),e.applyData(n,i)}function Ukn(e,n,t){const r=t?t.children:void 0,i=(r?r.indexOf(n):1)===0?"th":"td",a=t&&t.type==="table"?t.align:void 0,o=a?a.length:n.children.length;let l=-1;const u=[];for(;++l0,!0),r[0]),s=r.index+r[0].length,r=t.exec(n);return i.push(Jj(n.slice(s),s>0,!1)),i.join("")}function Jj(e,n,t){let r=0,s=e.length;if(n){let i=e.codePointAt(r);for(;i===Yj||i===Zj;)r++,i=e.codePointAt(r)}if(t){let i=e.codePointAt(s-1);for(;i===Yj||i===Zj;)s--,i=e.codePointAt(s-1)}return s>r?e.slice(r,s):""}function Kkn(e,n){const t={type:"text",value:Vkn(String(n.value))};return e.patch(n,t),e.applyData(n,t)}function Wkn(e,n){const t={type:"element",tagName:"hr",properties:{},children:[]};return e.patch(n,t),e.applyData(n,t)}const Qkn={blockquote:ykn,break:xkn,code:wkn,delete:kkn,emphasis:Skn,footnoteReference:zkn,heading:jkn,html:Tkn,imageReference:Akn,image:Rkn,inlineCode:Mkn,linkReference:Okn,link:Dkn,listItem:Lkn,list:$kn,paragraph:Bkn,root:Pkn,strong:Fkn,table:qkn,tableCell:Gkn,tableRow:Ukn,text:Kkn,thematicBreak:Wkn,toml:a1,yaml:a1,definition:a1,footnoteDefinition:a1};function a1(){}const zB=-1,ey=0,e0=1,$v=2,f6=3,d6=4,h6=5,p6=6,jB=7,TB=8,Xkn=typeof self=="object"?self:globalThis,eT=(e,n)=>{switch(e){case"Function":case"SharedWorker":case"Worker":case"eval":case"setInterval":case"setTimeout":throw new TypeError("unable to deserialize "+e)}return new Xkn[e](n)},Ykn=(e,n)=>{const t=(s,i)=>(e.set(i,s),s),r=s=>{if(e.has(s))return e.get(s);const[i,a]=n[s];switch(i){case ey:case zB:return t(a,s);case e0:{const o=t([],s);for(const l of a)o.push(r(l));return o}case $v:{const o=t({},s);for(const[l,u]of a)o[r(l)]=r(u);return o}case f6:return t(new Date(a),s);case d6:{const{source:o,flags:l}=a;return t(new RegExp(o,l),s)}case h6:{const o=t(new Map,s);for(const[l,u]of a)o.set(r(l),r(u));return o}case p6:{const o=t(new Set,s);for(const l of a)o.add(r(l));return o}case jB:{const{name:o,message:l}=a;return t(eT(o,l),s)}case TB:return t(BigInt(a),s);case"BigInt":return t(Object(BigInt(a)),s);case"ArrayBuffer":return t(new Uint8Array(a).buffer,a);case"DataView":{const{buffer:o}=new Uint8Array(a);return t(new DataView(o),a)}}return t(eT(i,a),s)};return r},tT=e=>Ykn(new Map,e)(0),u_="",{toString:Zkn}={},{keys:Jkn}=Object,jp=e=>{const n=typeof e;if(n!=="object"||!e)return[ey,n];const t=Zkn.call(e).slice(8,-1);switch(t){case"Array":return[e0,u_];case"Object":return[$v,u_];case"Date":return[f6,u_];case"RegExp":return[d6,u_];case"Map":return[h6,u_];case"Set":return[p6,u_];case"DataView":return[e0,t]}return t.includes("Array")?[e0,t]:t.includes("Error")?[jB,t]:[$v,t]},o1=([e,n])=>e===ey&&(n==="function"||n==="symbol"),eSn=(e,n,t,r)=>{const s=(a,o)=>{const l=r.push(a)-1;return t.set(o,l),l},i=a=>{if(t.has(a))return t.get(a);let[o,l]=jp(a);switch(o){case ey:{let h=a;switch(l){case"bigint":o=TB,h=a.toString();break;case"function":case"symbol":if(e)throw new TypeError("unable to serialize "+l);h=null;break;case"undefined":return s([zB],a)}return s([o,h],a)}case e0:{if(l){let p=a;return l==="DataView"?p=new Uint8Array(a.buffer):l==="ArrayBuffer"&&(p=new Uint8Array(a)),s([l,[...p]],a)}const h=[],_=s([o,h],a);for(const p of a)h.push(i(p));return _}case $v:{if(l)switch(l){case"BigInt":return s([l,a.toString()],a);case"Boolean":case"Number":case"String":return s([l,a.valueOf()],a)}if(n&&"toJSON"in a)return i(a.toJSON());const h=[],_=s([o,h],a);for(const p of Jkn(a))(e||!o1(jp(a[p])))&&h.push([i(p),i(a[p])]);return _}case f6:return s([o,isNaN(a.getTime())?u_:a.toISOString()],a);case d6:{const{source:h,flags:_}=a;return s([o,{source:h,flags:_}],a)}case h6:{const h=[],_=s([o,h],a);for(const[p,m]of a)(e||!(o1(jp(p))||o1(jp(m))))&&h.push([i(p),i(m)]);return _}case p6:{const h=[],_=s([o,h],a);for(const p of a)(e||!o1(jp(p)))&&h.push(i(p));return _}}const{message:u}=a;return s([o,{name:l,message:u}],a)};return i},nT=(e,{json:n,lossy:t}={})=>{const r=[];return eSn(!(n||t),!!n,new Map,r)(e),r},Bv=typeof structuredClone=="function"?(e,n)=>n&&("json"in n||"lossy"in n)?tT(nT(e,n)):structuredClone(e):(e,n)=>tT(nT(e,n));function tSn(e,n){const t=[{type:"text",value:"↩"}];return n>1&&t.push({type:"element",tagName:"sup",properties:{},children:[{type:"text",value:String(n)}]}),t}function nSn(e,n){return"Back to reference "+(e+1)+(n>1?"-"+n:"")}function rSn(e){const n=typeof e.options.clobberPrefix=="string"?e.options.clobberPrefix:"user-content-",t=e.options.footnoteBackContent||tSn,r=e.options.footnoteBackLabel||nSn,s=e.options.footnoteLabel||"Footnotes",i=e.options.footnoteLabelTagName||"h2",a=e.options.footnoteLabelProperties||{className:["sr-only"]},o=[];let l=-1;for(;++l0&&x.push({type:"text",value:" "});let w=typeof t=="string"?t:t(l,m);typeof w=="string"&&(w={type:"text",value:w}),x.push({type:"element",tagName:"a",properties:{href:"#"+n+"fnref-"+p+(m>1?"-"+m:""),dataFootnoteBackref:"",ariaLabel:typeof r=="string"?r:r(l,m),className:["data-footnote-backref"]},children:Array.isArray(w)?w:[w]})}const v=h[h.length-1];if(v&&v.type==="element"&&v.tagName==="p"){const w=v.children[v.children.length-1];w&&w.type==="text"?w.value+=" ":v.children.push({type:"text",value:" "}),v.children.push(...x)}else h.push(...x);const b={type:"element",tagName:"li",properties:{id:n+"fn-"+p},children:e.wrap(h,!0)};e.patch(u,b),o.push(b)}if(o.length!==0)return{type:"element",tagName:"section",properties:{dataFootnotes:!0,className:["footnotes"]},children:[{type:"element",tagName:i,properties:{...Bv(a),id:"footnote-label"},children:[{type:"text",value:s}]},{type:"text",value:` `},{type:"element",tagName:"ol",properties:{},children:e.wrap(o,!0)},{type:"text",value:` -`}]}}const ym=(function(e){if(e==null)return kkn;if(typeof e=="function")return ty(e);if(typeof e=="object")return Array.isArray(e)?ykn(e):xkn(e);if(typeof e=="string")return wkn(e);throw new Error("Expected function, string, or object as test")});function ykn(e){const n=[];let t=-1;for(;++t":""))+")"})}return p;function p(){let m=jB,x,k,v;if((!n||i(l,u,h[h.length-1]||void 0))&&(m=Ekn(t(l,h)),m[0]===Z3))return m;if("children"in l&&l.children){const b=l;if(b.children&&m[0]!==TB)for(k=(r?b.children.length:-1)+a,v=h.concat(b);k>-1&&k":""))+")"})}return p;function p(){let m=AB,x,k,v;if((!n||i(l,u,h[h.length-1]||void 0))&&(m=uSn(t(l,h)),m[0]===Z3))return m;if("children"in l&&l.children){const b=l;if(b.children&&m[0]!==RB)for(k=(r?b.children.length:-1)+a,v=h.concat(b);k>-1&&k0&&t.push({type:"text",value:` -`}),t}function rT(e){let n=0,t=e.charCodeAt(n);for(;t===9||t===32;)n++,t=e.charCodeAt(n);return e.slice(n)}function sT(e,n){const t=zkn(e,n),r=t.one(e,void 0),s=bkn(t),i=Array.isArray(r)?{type:"root",children:r}:r||{type:"root",children:[]};return s&&i.children.push({type:"text",value:` -`},s),i}function Pv(e,n){return e&&"run"in e?async function(t,r){const s=sT(t,{file:r,...n});await e.run(s,r)}:function(t,r){return sT(t,{file:r,...e||n})}}function iT(e){if(e)throw e}var pw,aT;function Mkn(){if(aT)return pw;aT=1;var e=Object.prototype.hasOwnProperty,n=Object.prototype.toString,t=Object.defineProperty,r=Object.getOwnPropertyDescriptor,s=function(u){return typeof Array.isArray=="function"?Array.isArray(u):n.call(u)==="[object Array]"},i=function(u){if(!u||n.call(u)!=="[object Object]")return!1;var h=e.call(u,"constructor"),_=u.constructor&&u.constructor.prototype&&e.call(u.constructor.prototype,"isPrototypeOf");if(u.constructor&&!h&&!_)return!1;var p;for(p in u);return typeof p>"u"||e.call(u,p)},a=function(u,h){t&&h.name==="__proto__"?t(u,h.name,{enumerable:!0,configurable:!0,value:h.newValue,writable:!0}):u[h.name]=h.newValue},o=function(u,h){if(h==="__proto__")if(e.call(u,h)){if(r)return r(u,h).value}else return;return u[h]};return pw=function l(){var u,h,_,p,m,x,k=arguments[0],v=1,b=arguments.length,w=!1;for(typeof k=="boolean"&&(w=k,k=arguments[1]||{},v=2),(k==null||typeof k!="object"&&typeof k!="function")&&(k={});va.length;let l;o&&a.push(s);try{l=e.apply(this,a)}catch(u){const h=u;if(o&&t)throw h;return s(h)}o||(l&&l.then&&typeof l.then=="function"?l.then(i,s):l instanceof Error?s(l):i(l))}function s(a,...o){t||(t=!0,n(a,...o))}function i(a){s(null,a)}}function t0(e){return!e||typeof e!="object"?"":"position"in e||"type"in e?oT(e.position):"start"in e||"end"in e?oT(e):"line"in e||"column"in e?t5(e):""}function t5(e){return lT(e&&e.line)+":"+lT(e&&e.column)}function oT(e){return t5(e&&e.start)+"-"+t5(e&&e.end)}function lT(e){return e&&typeof e=="number"?e:1}class Ws extends Error{constructor(n,t,r){super(),typeof t=="string"&&(r=t,t=void 0);let s="",i={},a=!1;if(t&&("line"in t&&"column"in t?i={place:t}:"start"in t&&"end"in t?i={place:t}:"type"in t?i={ancestors:[t],place:t.position}:i={...t}),typeof n=="string"?s=n:!i.cause&&n&&(a=!0,s=n.message,i.cause=n),!i.ruleId&&!i.source&&typeof r=="string"){const l=r.indexOf(":");l===-1?i.ruleId=r:(i.source=r.slice(0,l),i.ruleId=r.slice(l+1))}if(!i.place&&i.ancestors&&i.ancestors){const l=i.ancestors[i.ancestors.length-1];l&&(i.place=l.position)}const o=i.place&&"start"in i.place?i.place.start:i.place;this.ancestors=i.ancestors||void 0,this.cause=i.cause||void 0,this.column=o?o.column:void 0,this.fatal=void 0,this.file="",this.message=s,this.line=o?o.line:void 0,this.name=t0(i.place)||"1:1",this.place=i.place||void 0,this.reason=this.message,this.ruleId=i.ruleId||void 0,this.source=i.source||void 0,this.stack=a&&i.cause&&typeof i.cause.stack=="string"?i.cause.stack:"",this.actual=void 0,this.expected=void 0,this.note=void 0,this.url=void 0}}Ws.prototype.file="";Ws.prototype.name="";Ws.prototype.reason="";Ws.prototype.message="";Ws.prototype.stack="";Ws.prototype.column=void 0;Ws.prototype.line=void 0;Ws.prototype.ancestors=void 0;Ws.prototype.cause=void 0;Ws.prototype.fatal=void 0;Ws.prototype.place=void 0;Ws.prototype.ruleId=void 0;Ws.prototype.source=void 0;const Ao={basename:Ikn,dirname:$kn,extname:Bkn,join:Pkn,sep:"/"};function Ikn(e,n){if(n!==void 0&&typeof n!="string")throw new TypeError('"ext" argument must be a string');xm(e);let t=0,r=-1,s=e.length,i;if(n===void 0||n.length===0||n.length>e.length){for(;s--;)if(e.codePointAt(s)===47){if(i){t=s+1;break}}else r<0&&(i=!0,r=s+1);return r<0?"":e.slice(t,r)}if(n===e)return"";let a=-1,o=n.length-1;for(;s--;)if(e.codePointAt(s)===47){if(i){t=s+1;break}}else a<0&&(i=!0,a=s+1),o>-1&&(e.codePointAt(s)===n.codePointAt(o--)?o<0&&(r=s):(o=-1,r=a));return t===r?r=a:r<0&&(r=e.length),e.slice(t,r)}function $kn(e){if(xm(e),e.length===0)return".";let n=-1,t=e.length,r;for(;--t;)if(e.codePointAt(t)===47){if(r){n=t;break}}else r||(r=!0);return n<0?e.codePointAt(0)===47?"/":".":n===1&&e.codePointAt(0)===47?"//":e.slice(0,n)}function Bkn(e){xm(e);let n=e.length,t=-1,r=0,s=-1,i=0,a;for(;n--;){const o=e.codePointAt(n);if(o===47){if(a){r=n+1;break}continue}t<0&&(a=!0,t=n+1),o===46?s<0?s=n:i!==1&&(i=1):s>-1&&(i=-1)}return s<0||t<0||i===0||i===1&&s===t-1&&s===r+1?"":e.slice(s,t)}function Pkn(...e){let n=-1,t;for(;++n0&&e.codePointAt(e.length-1)===47&&(t+="/"),n?"/"+t:t}function Hkn(e,n){let t="",r=0,s=-1,i=0,a=-1,o,l;for(;++a<=e.length;){if(a2){if(l=t.lastIndexOf("/"),l!==t.length-1){l<0?(t="",r=0):(t=t.slice(0,l),r=t.length-1-t.lastIndexOf("/")),s=a,i=0;continue}}else if(t.length>0){t="",r=0,s=a,i=0;continue}}n&&(t=t.length>0?t+"/..":"..",r=2)}else t.length>0?t+="/"+e.slice(s+1,a):t=e.slice(s+1,a),r=a-s-1;s=a,i=0}else o===46&&i>-1?i++:i=-1}return t}function xm(e){if(typeof e!="string")throw new TypeError("Path must be a string. Received "+JSON.stringify(e))}const qkn={cwd:Ukn};function Ukn(){return"/"}function n5(e){return!!(e!==null&&typeof e=="object"&&"href"in e&&e.href&&"protocol"in e&&e.protocol&&e.auth===void 0)}function Gkn(e){if(typeof e=="string")e=new URL(e);else if(!n5(e)){const n=new TypeError('The "path" argument must be of type string or an instance of URL. Received `'+e+"`");throw n.code="ERR_INVALID_ARG_TYPE",n}if(e.protocol!=="file:"){const n=new TypeError("The URL must be of scheme file");throw n.code="ERR_INVALID_URL_SCHEME",n}return Vkn(e)}function Vkn(e){if(e.hostname!==""){const r=new TypeError('File URL host must be "localhost" or empty on darwin');throw r.code="ERR_INVALID_FILE_URL_HOST",r}const n=e.pathname;let t=-1;for(;++t0){let[m,...x]=h;const k=r[p][1];e5(k)&&e5(m)&&(m=mw(!0,k,m)),r[p]=[u,m,...x]}}}}const ny=new v6().freeze();function yw(e,n){if(typeof n!="function")throw new TypeError("Cannot `"+e+"` without `parser`")}function xw(e,n){if(typeof n!="function")throw new TypeError("Cannot `"+e+"` without `compiler`")}function ww(e,n){if(n)throw new Error("Cannot call `"+e+"` on a frozen processor.\nCreate a new processor first, by calling it: use `processor()` instead of `processor`.")}function uT(e){if(!e5(e)||typeof e.type!="string")throw new TypeError("Expected node, got `"+e+"`")}function _T(e,n,t){if(!t)throw new Error("`"+e+"` finished async. Use `"+n+"` instead")}function l1(e){return Xkn(e)?e:new AB(e)}function Xkn(e){return!!(e&&typeof e=="object"&&"message"in e&&"messages"in e)}function Ykn(e){return typeof e=="string"||Zkn(e)}function Zkn(e){return!!(e&&typeof e=="object"&&"byteLength"in e&&"byteOffset"in e)}var fT=Object.prototype.hasOwnProperty;function dT(e,n,t){for(t of e.keys())if(n0(t,n))return t}function n0(e,n){var t,r,s;if(e===n)return!0;if(e&&n&&(t=e.constructor)===n.constructor){if(t===Date)return e.getTime()===n.getTime();if(t===RegExp)return e.toString()===n.toString();if(t===Array){if((r=e.length)===n.length)for(;r--&&n0(e[r],n[r]););return r===-1}if(t===Set){if(e.size!==n.size)return!1;for(r of e)if(s=r,s&&typeof s=="object"&&(s=dT(n,s),!s)||!n.has(s))return!1;return!0}if(t===Map){if(e.size!==n.size)return!1;for(r of e)if(s=r[0],s&&typeof s=="object"&&(s=dT(n,s),!s)||!n0(r[1],n.get(s)))return!1;return!0}if(t===ArrayBuffer)e=new Uint8Array(e),n=new Uint8Array(n);else if(t===DataView){if((r=e.byteLength)===n.byteLength)for(;r--&&e.getInt8(r)===n.getInt8(r););return r===-1}if(ArrayBuffer.isView(e)){if((r=e.byteLength)===n.byteLength)for(;r--&&e[r]===n[r];);return r===-1}if(!t||typeof e=="object"){r=0;for(t in e)if(fT.call(e,t)&&++r&&!fT.call(n,t)||!(t in n)||!n0(e[t],n[t]))return!1;return Object.keys(n).length===r}}return e!==e&&n!==n}const Jkn=/^[$_\p{ID_Start}][$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,eSn=/^[$_\p{ID_Start}][-$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,tSn={};function hT(e,n){return(tSn.jsx?eSn:Jkn).test(e)}const nSn=/[ \t\n\f\r]/g;function rSn(e){return typeof e=="object"?e.type==="text"?pT(e.value):!1:pT(e)}function pT(e){return e.replace(nSn,"")===""}var Zf={},kw,mT;function sSn(){if(mT)return kw;mT=1;var e=/\/\*[^*]*\*+([^/*][^*]*\*+)*\//g,n=/\n/g,t=/^\s*/,r=/^(\*?[-#/*\\\w]+(\[[0-9a-z_-]+\])?)\s*/,s=/^:\s*/,i=/^((?:'(?:\\'|.)*?'|"(?:\\"|.)*?"|\([^)]*?\)|[^};])+)/,a=/^[;\s]*/,o=/^\s+|\s+$/g,l=` -`,u="/",h="*",_="",p="comment",m="declaration";function x(v,b){if(typeof v!="string")throw new TypeError("First argument must be a string");if(!v)return[];b=b||{};var w=1,y=1;function C(q){var W=q.match(n);W&&(w+=W.length);var H=q.lastIndexOf(l);y=~H?q.length-H:y+q.length}function N(){var q={line:w,column:y};return function(W){return W.position=new E(q),M(),W}}function E(q){this.start=q,this.end={line:w,column:y},this.source=b.source}E.prototype.content=v;function T(q){var W=new Error(b.source+":"+w+":"+y+": "+q);if(W.reason=q,W.filename=b.source,W.line=w,W.column=y,W.source=v,!b.silent)throw W}function j(q){var W=q.exec(v);if(W){var H=W[0];return C(H),v=v.slice(H.length),W}}function M(){j(t)}function D(q){var W;for(q=q||[];W=I();)W!==!1&&q.push(W);return q}function I(){var q=N();if(!(u!=v.charAt(0)||h!=v.charAt(1))){for(var W=2;_!=v.charAt(W)&&(h!=v.charAt(W)||u!=v.charAt(W+1));)++W;if(W+=2,_===v.charAt(W-1))return T("End of comment missing");var H=v.slice(2,W-2);return y+=2,C(H),v=v.slice(W),y+=2,q({type:p,comment:H})}}function P(){var q=N(),W=j(r);if(W){if(I(),!j(s))return T("property missing ':'");var H=j(i),Y=q({type:m,property:k(W[0].replace(e,_)),value:H?k(H[0].replace(e,_)):_});return j(a),Y}}function U(){var q=[];D(q);for(var W;W=P();)W!==!1&&(q.push(W),D(q));return q}return M(),U()}function k(v){return v?v.replace(o,_):_}return kw=x,kw}var gT;function iSn(){if(gT)return Zf;gT=1;var e=Zf&&Zf.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(Zf,"__esModule",{value:!0}),Zf.default=t;const n=e(sSn());function t(r,s){let i=null;if(!r||typeof r!="string")return i;const a=(0,n.default)(r),o=typeof s=="function";return a.forEach(l=>{if(l.type!=="declaration")return;const{property:u,value:h}=l;o?s(u,h,l):h&&(i=i||{},i[u]=h)}),i}return Zf}var Tp={},vT;function aSn(){if(vT)return Tp;vT=1,Object.defineProperty(Tp,"__esModule",{value:!0}),Tp.camelCase=void 0;var e=/^--[a-zA-Z0-9_-]+$/,n=/-([a-z])/g,t=/^[^-]+$/,r=/^-(webkit|moz|ms|o|khtml)-/,s=/^-(ms)-/,i=function(u){return!u||t.test(u)||e.test(u)},a=function(u,h){return h.toUpperCase()},o=function(u,h){return"".concat(h,"-")},l=function(u,h){return h===void 0&&(h={}),i(u)?u:(u=u.toLowerCase(),h.reactCompat?u=u.replace(s,o):u=u.replace(r,o),u.replace(n,a))};return Tp.camelCase=l,Tp}var Ap,bT;function oSn(){if(bT)return Ap;bT=1;var e=Ap&&Ap.__importDefault||function(s){return s&&s.__esModule?s:{default:s}},n=e(iSn()),t=aSn();function r(s,i){var a={};return!s||typeof s!="string"||(0,n.default)(s,function(o,l){o&&l&&(a[(0,t.camelCase)(o,i)]=l)}),a}return r.default=r,Ap=r,Ap}var lSn=oSn();const cSn=am(lSn),b6={}.hasOwnProperty,uSn=new Map,_Sn=/[A-Z]/g,fSn=new Set(["table","tbody","thead","tfoot","tr"]),dSn=new Set(["td","th"]),RB="https://github.com/syntax-tree/hast-util-to-jsx-runtime";function MB(e,n){if(!n||n.Fragment===void 0)throw new TypeError("Expected `Fragment` in options");const t=n.filePath||void 0;let r;if(n.development){if(typeof n.jsxDEV!="function")throw new TypeError("Expected `jsxDEV` in options when `development: true`");r=xSn(t,n.jsxDEV)}else{if(typeof n.jsx!="function")throw new TypeError("Expected `jsx` in production options");if(typeof n.jsxs!="function")throw new TypeError("Expected `jsxs` in production options");r=ySn(t,n.jsx,n.jsxs)}const s={Fragment:n.Fragment,ancestors:[],components:n.components||{},create:r,elementAttributeNameCase:n.elementAttributeNameCase||"react",evaluater:n.createEvaluater?n.createEvaluater():void 0,filePath:t,ignoreInvalidStyle:n.ignoreInvalidStyle||!1,passKeys:n.passKeys!==!1,passNode:n.passNode||!1,schema:n.space==="svg"?Ib:o$,stylePropertyNameCase:n.stylePropertyNameCase||"dom",tableCellAlignToStyle:n.tableCellAlignToStyle!==!1},i=OB(s,e,void 0);return i&&typeof i!="string"?i:s.create(e,s.Fragment,{children:i||void 0},void 0)}function OB(e,n,t){if(n.type==="element")return hSn(e,n,t);if(n.type==="mdxFlowExpression"||n.type==="mdxTextExpression")return pSn(e,n);if(n.type==="mdxJsxFlowElement"||n.type==="mdxJsxTextElement")return gSn(e,n,t);if(n.type==="mdxjsEsm")return mSn(e,n);if(n.type==="root")return vSn(e,n,t);if(n.type==="text")return bSn(e,n)}function hSn(e,n,t){const r=e.schema;let s=r;n.tagName.toLowerCase()==="svg"&&r.space==="html"&&(s=Ib,e.schema=s),e.ancestors.push(n);const i=LB(e,n.tagName,!1),a=wSn(e,n);let o=x6(e,n);return fSn.has(n.tagName)&&(o=o.filter(function(l){return typeof l=="string"?!rSn(l):!0})),DB(e,a,i,n),y6(a,o),e.ancestors.pop(),e.schema=r,e.create(n,i,a,t)}function pSn(e,n){if(n.data&&n.data.estree&&e.evaluater){const r=n.data.estree.body[0];return r.type,e.evaluater.evaluateExpression(r.expression)}T0(e,n.position)}function mSn(e,n){if(n.data&&n.data.estree&&e.evaluater)return e.evaluater.evaluateProgram(n.data.estree);T0(e,n.position)}function gSn(e,n,t){const r=e.schema;let s=r;n.name==="svg"&&r.space==="html"&&(s=Ib,e.schema=s),e.ancestors.push(n);const i=n.name===null?e.Fragment:LB(e,n.name,!0),a=kSn(e,n),o=x6(e,n);return DB(e,a,i,n),y6(a,o),e.ancestors.pop(),e.schema=r,e.create(n,i,a,t)}function vSn(e,n,t){const r={};return y6(r,x6(e,n)),e.create(n,e.Fragment,r,t)}function bSn(e,n){return n.value}function DB(e,n,t,r){typeof t!="string"&&t!==e.Fragment&&e.passNode&&(n.node=r)}function y6(e,n){if(n.length>0){const t=n.length>1?n:n[0];t&&(e.children=t)}}function ySn(e,n,t){return r;function r(s,i,a,o){const u=Array.isArray(a.children)?t:n;return o?u(i,a,o):u(i,a)}}function xSn(e,n){return t;function t(r,s,i,a){const o=Array.isArray(i.children),l=_6(r);return n(s,i,a,o,{columnNumber:l?l.column-1:void 0,fileName:e,lineNumber:l?l.line:void 0},void 0)}}function wSn(e,n){const t={};let r,s;for(s in n.properties)if(s!=="children"&&b6.call(n.properties,s)){const i=SSn(e,s,n.properties[s]);if(i){const[a,o]=i;e.tableCellAlignToStyle&&a==="align"&&typeof o=="string"&&dSn.has(n.tagName)?r=o:t[a]=o}}if(r){const i=t.style||(t.style={});i[e.stylePropertyNameCase==="css"?"text-align":"textAlign"]=r}return t}function kSn(e,n){const t={};for(const r of n.attributes)if(r.type==="mdxJsxExpressionAttribute")if(r.data&&r.data.estree&&e.evaluater){const i=r.data.estree.body[0];i.type;const a=i.expression;a.type;const o=a.properties[0];o.type,Object.assign(t,e.evaluater.evaluateExpression(o.argument))}else T0(e,n.position);else{const s=r.name;let i;if(r.value&&typeof r.value=="object")if(r.value.data&&r.value.data.estree&&e.evaluater){const o=r.value.data.estree.body[0];o.type,i=e.evaluater.evaluateExpression(o.expression)}else T0(e,n.position);else i=r.value===null?!0:r.value;t[s]=i}return t}function x6(e,n){const t=[];let r=-1;const s=e.passKeys?new Map:uSn;for(;++ry.key).filter(y=>y!==void 0));let u=0;for(;u=e.children.length-h&&(E=s.length-(e.children.length-y)),E>=0&&(N=((b=s[E])==null?void 0:b.key)??N);N&&l.has(N)&&((w=s[E])==null?void 0:w.key)!==N;)N=`${N}+`;N&&l.add(N);const T=IB(C,s[E]??null,t,N);i.push(T),T.react!==void 0&&a.push(T.react)}const _=n!==null&&RSn(e,n.node);if(n&&n.key===r&&_&&s.length===i.length&&i.every((y,C)=>y===s[C]))return n;const p=e.type==="element"&&jSn.has(e.tagName)?a.filter(y=>typeof y!="string"||!TSn.test(y)):a,m=p.length>0?p.length===1?p[0]:p:null;let x=_?n==null?void 0:n.shell:null;if(!x){const y=MB({...e,children:[]},t);x={props:y.props,type:y.type}}return{children:i,key:r,node:e,react:f.jsx(x.type,{...x.props,children:m},r),shell:x}}function RSn(e,n){if(e===n)return!0;const{children:t,position:r,...s}=e,{children:i,position:a,...o}=n;return n0(s,o)}function xd(e,n){if(e===n)return!0;if(Array.isArray(e)||Array.isArray(n)){if(!Array.isArray(e)||!Array.isArray(n)||e.length!==n.length)return!1;for(let a=0;as?0:s+n:n=n>s?s:n,t=t>0?t:0,r.length<1e4)a=Array.from(r),a.unshift(n,t),e.splice(...a);else for(t&&e.splice(n,t);i0?(na(e,e.length,0,n),e):n}const xT={}.hasOwnProperty;function BB(e){const n={};let t=-1;for(;++t13&&t<32||t>126&&t<160||t>55295&&t<57344||t>64975&&t<65008||(t&65535)===65535||(t&65535)===65534||t>1114111?"�":String.fromCodePoint(t)}function oo(e){return e.replace(/[\t\n\r ]+/g," ").replace(/^ | $/g,"").toLowerCase().toUpperCase()}function hn(e,n,t,r){const s=r?r-1:Number.POSITIVE_INFINITY;let i=0;return a;function a(l){return bn(l)?(e.enter(t),o(l)):n(l)}function o(l){return bn(l)&&i++a))return;const T=n.events.length;let j=T,M,D;for(;j--;)if(n.events[j][0]==="exit"&&n.events[j][1].type==="chunkFlow"){if(M){D=n.events[j][1].end;break}M=!0}for(b(r),E=T;Ey;){const N=t[C];n.containerState=N[1],N[0].exit.call(n,e)}t.length=y}function w(){s.write([null]),i=void 0,s=void 0,n.containerState._closeFlow=void 0}}function FSn(e,n,t){return hn(e,e.attempt(this.parser.constructs.document,n,t),"linePrefix",this.parser.constructs.disable.null.includes("codeIndented")?void 0:4)}function sh(e){if(e===null||lr(e)||V_(e))return 1;if(Jb(e))return 2}function ry(e,n,t){const r=[];let s=-1;for(;++s1&&e[t][1].end.offset-e[t][1].start.offset>1?2:1;const _={...e[r][1].end},p={...e[t][1].start};kT(_,-l),kT(p,l),a={type:l>1?"strongSequence":"emphasisSequence",start:_,end:{...e[r][1].end}},o={type:l>1?"strongSequence":"emphasisSequence",start:{...e[t][1].start},end:p},i={type:l>1?"strongText":"emphasisText",start:{...e[r][1].end},end:{...e[t][1].start}},s={type:l>1?"strong":"emphasis",start:{...a.start},end:{...o.end}},e[r][1].end={...a.start},e[t][1].start={...o.end},u=[],e[r][1].end.offset-e[r][1].start.offset&&(u=za(u,[["enter",e[r][1],n],["exit",e[r][1],n]])),u=za(u,[["enter",s,n],["enter",a,n],["exit",a,n],["enter",i,n]]),u=za(u,ry(n.parser.constructs.insideSpan.null,e.slice(r+1,t),n)),u=za(u,[["exit",i,n],["enter",o,n],["exit",o,n],["exit",s,n]]),e[t][1].end.offset-e[t][1].start.offset?(h=2,u=za(u,[["enter",e[t][1],n],["exit",e[t][1],n]])):h=0,na(e,r-1,t-r+3,u),t=r+u.length-h-2;break}}for(t=-1;++t0&&bn(E)?hn(e,w,"linePrefix",i+1)(E):w(E)}function w(E){return E===null||Ct(E)?e.check(ST,k,C)(E):(e.enter("codeFlowValue"),y(E))}function y(E){return E===null||Ct(E)?(e.exit("codeFlowValue"),w(E)):(e.consume(E),y)}function C(E){return e.exit("codeFenced"),n(E)}function N(E,T,j){let M=0;return D;function D(W){return E.enter("lineEnding"),E.consume(W),E.exit("lineEnding"),I}function I(W){return E.enter("codeFencedFence"),bn(W)?hn(E,P,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(W):P(W)}function P(W){return W===o?(E.enter("codeFencedFenceSequence"),U(W)):j(W)}function U(W){return W===o?(M++,E.consume(W),U):M>=a?(E.exit("codeFencedFenceSequence"),bn(W)?hn(E,q,"whitespace")(W):q(W)):j(W)}function q(W){return W===null||Ct(W)?(E.exit("codeFencedFence"),T(W)):j(W)}}}function JSn(e,n,t){const r=this;return s;function s(a){return a===null?t(a):(e.enter("lineEnding"),e.consume(a),e.exit("lineEnding"),i)}function i(a){return r.parser.lazy[r.now().line]?t(a):n(a)}}const Sw={name:"codeIndented",tokenize:t6n},e6n={partial:!0,tokenize:n6n};function t6n(e,n,t){const r=this;return s;function s(u){return e.enter("codeIndented"),hn(e,i,"linePrefix",5)(u)}function i(u){const h=r.events[r.events.length-1];return h&&h[1].type==="linePrefix"&&h[2].sliceSerialize(h[1],!0).length>=4?a(u):t(u)}function a(u){return u===null?l(u):Ct(u)?e.attempt(e6n,a,l)(u):(e.enter("codeFlowValue"),o(u))}function o(u){return u===null||Ct(u)?(e.exit("codeFlowValue"),a(u)):(e.consume(u),o)}function l(u){return e.exit("codeIndented"),n(u)}}function n6n(e,n,t){const r=this;return s;function s(a){return r.parser.lazy[r.now().line]?t(a):Ct(a)?(e.enter("lineEnding"),e.consume(a),e.exit("lineEnding"),s):hn(e,i,"linePrefix",5)(a)}function i(a){const o=r.events[r.events.length-1];return o&&o[1].type==="linePrefix"&&o[2].sliceSerialize(o[1],!0).length>=4?n(a):Ct(a)?s(a):t(a)}}const r6n={name:"codeText",previous:i6n,resolve:s6n,tokenize:a6n};function s6n(e){let n=e.length-4,t=3,r,s;if((e[t][1].type==="lineEnding"||e[t][1].type==="space")&&(e[n][1].type==="lineEnding"||e[n][1].type==="space")){for(r=t;++r=this.left.length+this.right.length)throw new RangeError("Cannot access index `"+n+"` in a splice buffer of size `"+(this.left.length+this.right.length)+"`");return nthis.left.length?this.right.slice(this.right.length-r+this.left.length,this.right.length-n+this.left.length).reverse():this.left.slice(n).concat(this.right.slice(this.right.length-r+this.left.length).reverse())}splice(n,t,r){const s=t||0;this.setCursor(Math.trunc(n));const i=this.right.splice(this.right.length-s,Number.POSITIVE_INFINITY);return r&&Rp(this.left,r),i.reverse()}pop(){return this.setCursor(Number.POSITIVE_INFINITY),this.left.pop()}push(n){this.setCursor(Number.POSITIVE_INFINITY),this.left.push(n)}pushMany(n){this.setCursor(Number.POSITIVE_INFINITY),Rp(this.left,n)}unshift(n){this.setCursor(0),this.right.push(n)}unshiftMany(n){this.setCursor(0),Rp(this.right,n.reverse())}setCursor(n){if(!(n===this.left.length||n>this.left.length&&this.right.length===0||n<0&&this.left.length===0))if(n=4?n(a):e.interrupt(r.parser.constructs.flow,t,n)(a)}}function GB(e,n,t,r,s,i,a,o,l){const u=l||Number.POSITIVE_INFINITY;let h=0;return _;function _(b){return b===60?(e.enter(r),e.enter(s),e.enter(i),e.consume(b),e.exit(i),p):b===null||b===32||b===41||Iv(b)?t(b):(e.enter(r),e.enter(a),e.enter(o),e.enter("chunkString",{contentType:"string"}),k(b))}function p(b){return b===62?(e.enter(i),e.consume(b),e.exit(i),e.exit(s),e.exit(r),n):(e.enter(o),e.enter("chunkString",{contentType:"string"}),m(b))}function m(b){return b===62?(e.exit("chunkString"),e.exit(o),p(b)):b===null||b===60||Ct(b)?t(b):(e.consume(b),b===92?x:m)}function x(b){return b===60||b===62||b===92?(e.consume(b),m):m(b)}function k(b){return!h&&(b===null||b===41||lr(b))?(e.exit("chunkString"),e.exit(o),e.exit(a),e.exit(r),n(b)):h999||m===null||m===91||m===93&&!l||m===94&&!o&&"_hiddenFootnoteSupport"in a.parser.constructs?t(m):m===93?(e.exit(i),e.enter(s),e.consume(m),e.exit(s),e.exit(r),n):Ct(m)?(e.enter("lineEnding"),e.consume(m),e.exit("lineEnding"),h):(e.enter("chunkString",{contentType:"string"}),_(m))}function _(m){return m===null||m===91||m===93||Ct(m)||o++>999?(e.exit("chunkString"),h(m)):(e.consume(m),l||(l=!bn(m)),m===92?p:_)}function p(m){return m===91||m===92||m===93?(e.consume(m),o++,_):_(m)}}function KB(e,n,t,r,s,i){let a;return o;function o(p){return p===34||p===39||p===40?(e.enter(r),e.enter(s),e.consume(p),e.exit(s),a=p===40?41:p,l):t(p)}function l(p){return p===a?(e.enter(s),e.consume(p),e.exit(s),e.exit(r),n):(e.enter(i),u(p))}function u(p){return p===a?(e.exit(i),l(a)):p===null?t(p):Ct(p)?(e.enter("lineEnding"),e.consume(p),e.exit("lineEnding"),hn(e,u,"linePrefix")):(e.enter("chunkString",{contentType:"string"}),h(p))}function h(p){return p===a||p===null||Ct(p)?(e.exit("chunkString"),u(p)):(e.consume(p),p===92?_:h)}function _(p){return p===a||p===92?(e.consume(p),h):h(p)}}function r0(e,n){let t;return r;function r(s){return Ct(s)?(e.enter("lineEnding"),e.consume(s),e.exit("lineEnding"),t=!0,r):bn(s)?hn(e,r,t?"linePrefix":"lineSuffix")(s):n(s)}}const h6n={name:"definition",tokenize:m6n},p6n={partial:!0,tokenize:g6n};function m6n(e,n,t){const r=this;let s;return i;function i(m){return e.enter("definition"),a(m)}function a(m){return VB.call(r,e,o,t,"definitionLabel","definitionLabelMarker","definitionLabelString")(m)}function o(m){return s=oo(r.sliceSerialize(r.events[r.events.length-1][1]).slice(1,-1)),m===58?(e.enter("definitionMarker"),e.consume(m),e.exit("definitionMarker"),l):t(m)}function l(m){return lr(m)?r0(e,u)(m):u(m)}function u(m){return GB(e,h,t,"definitionDestination","definitionDestinationLiteral","definitionDestinationLiteralMarker","definitionDestinationRaw","definitionDestinationString")(m)}function h(m){return e.attempt(p6n,_,_)(m)}function _(m){return bn(m)?hn(e,p,"whitespace")(m):p(m)}function p(m){return m===null||Ct(m)?(e.exit("definition"),r.parser.defined.push(s),n(m)):t(m)}}function g6n(e,n,t){return r;function r(o){return lr(o)?r0(e,s)(o):t(o)}function s(o){return KB(e,i,t,"definitionTitle","definitionTitleMarker","definitionTitleString")(o)}function i(o){return bn(o)?hn(e,a,"whitespace")(o):a(o)}function a(o){return o===null||Ct(o)?n(o):t(o)}}const v6n={name:"hardBreakEscape",tokenize:b6n};function b6n(e,n,t){return r;function r(i){return e.enter("hardBreakEscape"),e.consume(i),s}function s(i){return Ct(i)?(e.exit("hardBreakEscape"),n(i)):t(i)}}const y6n={name:"headingAtx",resolve:x6n,tokenize:w6n};function x6n(e,n){let t=e.length-2,r=3,s,i;return e[r][1].type==="whitespace"&&(r+=2),t-2>r&&e[t][1].type==="whitespace"&&(t-=2),e[t][1].type==="atxHeadingSequence"&&(r===t-1||t-4>r&&e[t-2][1].type==="whitespace")&&(t-=r+1===t?2:4),t>r&&(s={type:"atxHeadingText",start:e[r][1].start,end:e[t][1].end},i={type:"chunkText",start:e[r][1].start,end:e[t][1].end,contentType:"text"},na(e,r,t-r+1,[["enter",s,n],["enter",i,n],["exit",i,n],["exit",s,n]])),e}function w6n(e,n,t){let r=0;return s;function s(h){return e.enter("atxHeading"),i(h)}function i(h){return e.enter("atxHeadingSequence"),a(h)}function a(h){return h===35&&r++<6?(e.consume(h),a):h===null||lr(h)?(e.exit("atxHeadingSequence"),o(h)):t(h)}function o(h){return h===35?(e.enter("atxHeadingSequence"),l(h)):h===null||Ct(h)?(e.exit("atxHeading"),n(h)):bn(h)?hn(e,o,"whitespace")(h):(e.enter("atxHeadingText"),u(h))}function l(h){return h===35?(e.consume(h),l):(e.exit("atxHeadingSequence"),o(h))}function u(h){return h===null||h===35||lr(h)?(e.exit("atxHeadingText"),o(h)):(e.consume(h),u)}}const k6n=["address","article","aside","base","basefont","blockquote","body","caption","center","col","colgroup","dd","details","dialog","dir","div","dl","dt","fieldset","figcaption","figure","footer","form","frame","frameset","h1","h2","h3","h4","h5","h6","head","header","hr","html","iframe","legend","li","link","main","menu","menuitem","nav","noframes","ol","optgroup","option","p","param","search","section","summary","table","tbody","td","tfoot","th","thead","title","tr","track","ul"],ET=["pre","script","style","textarea"],S6n={concrete:!0,name:"htmlFlow",resolveTo:N6n,tokenize:z6n},C6n={partial:!0,tokenize:T6n},E6n={partial:!0,tokenize:j6n};function N6n(e){let n=e.length;for(;n--&&!(e[n][0]==="enter"&&e[n][1].type==="htmlFlow"););return n>1&&e[n-2][1].type==="linePrefix"&&(e[n][1].start=e[n-2][1].start,e[n+1][1].start=e[n-2][1].start,e.splice(n-2,2)),e}function z6n(e,n,t){const r=this;let s,i,a,o,l;return u;function u(V){return h(V)}function h(V){return e.enter("htmlFlow"),e.enter("htmlFlowData"),e.consume(V),_}function _(V){return V===33?(e.consume(V),p):V===47?(e.consume(V),i=!0,k):V===63?(e.consume(V),s=3,r.interrupt?n:L):ci(V)?(e.consume(V),a=String.fromCharCode(V),v):t(V)}function p(V){return V===45?(e.consume(V),s=2,m):V===91?(e.consume(V),s=5,o=0,x):ci(V)?(e.consume(V),s=4,r.interrupt?n:L):t(V)}function m(V){return V===45?(e.consume(V),r.interrupt?n:L):t(V)}function x(V){const ee="CDATA[";return V===ee.charCodeAt(o++)?(e.consume(V),o===ee.length?r.interrupt?n:P:x):t(V)}function k(V){return ci(V)?(e.consume(V),a=String.fromCharCode(V),v):t(V)}function v(V){if(V===null||V===47||V===62||lr(V)){const ee=V===47,ce=a.toLowerCase();return!ee&&!i&&ET.includes(ce)?(s=1,r.interrupt?n(V):P(V)):k6n.includes(a.toLowerCase())?(s=6,ee?(e.consume(V),b):r.interrupt?n(V):P(V)):(s=7,r.interrupt&&!r.parser.lazy[r.now().line]?t(V):i?w(V):y(V))}return V===45||Gs(V)?(e.consume(V),a+=String.fromCharCode(V),v):t(V)}function b(V){return V===62?(e.consume(V),r.interrupt?n:P):t(V)}function w(V){return bn(V)?(e.consume(V),w):D(V)}function y(V){return V===47?(e.consume(V),D):V===58||V===95||ci(V)?(e.consume(V),C):bn(V)?(e.consume(V),y):D(V)}function C(V){return V===45||V===46||V===58||V===95||Gs(V)?(e.consume(V),C):N(V)}function N(V){return V===61?(e.consume(V),E):bn(V)?(e.consume(V),N):y(V)}function E(V){return V===null||V===60||V===61||V===62||V===96?t(V):V===34||V===39?(e.consume(V),l=V,T):bn(V)?(e.consume(V),E):j(V)}function T(V){return V===l?(e.consume(V),l=null,M):V===null||Ct(V)?t(V):(e.consume(V),T)}function j(V){return V===null||V===34||V===39||V===47||V===60||V===61||V===62||V===96||lr(V)?N(V):(e.consume(V),j)}function M(V){return V===47||V===62||bn(V)?y(V):t(V)}function D(V){return V===62?(e.consume(V),I):t(V)}function I(V){return V===null||Ct(V)?P(V):bn(V)?(e.consume(V),I):t(V)}function P(V){return V===45&&s===2?(e.consume(V),H):V===60&&s===1?(e.consume(V),Y):V===62&&s===4?(e.consume(V),F):V===63&&s===3?(e.consume(V),L):V===93&&s===5?(e.consume(V),$):Ct(V)&&(s===6||s===7)?(e.exit("htmlFlowData"),e.check(C6n,G,U)(V)):V===null||Ct(V)?(e.exit("htmlFlowData"),U(V)):(e.consume(V),P)}function U(V){return e.check(E6n,q,G)(V)}function q(V){return e.enter("lineEnding"),e.consume(V),e.exit("lineEnding"),W}function W(V){return V===null||Ct(V)?U(V):(e.enter("htmlFlowData"),P(V))}function H(V){return V===45?(e.consume(V),L):P(V)}function Y(V){return V===47?(e.consume(V),a="",te):P(V)}function te(V){if(V===62){const ee=a.toLowerCase();return ET.includes(ee)?(e.consume(V),F):P(V)}return ci(V)&&a.length<8?(e.consume(V),a+=String.fromCharCode(V),te):P(V)}function $(V){return V===93?(e.consume(V),L):P(V)}function L(V){return V===62?(e.consume(V),F):V===45&&s===2?(e.consume(V),L):P(V)}function F(V){return V===null||Ct(V)?(e.exit("htmlFlowData"),G(V)):(e.consume(V),F)}function G(V){return e.exit("htmlFlow"),n(V)}}function j6n(e,n,t){const r=this;return s;function s(a){return Ct(a)?(e.enter("lineEnding"),e.consume(a),e.exit("lineEnding"),i):t(a)}function i(a){return r.parser.lazy[r.now().line]?t(a):n(a)}}function T6n(e,n,t){return r;function r(s){return e.enter("lineEnding"),e.consume(s),e.exit("lineEnding"),e.attempt(wm,n,t)}}const A6n={name:"htmlText",tokenize:R6n};function R6n(e,n,t){const r=this;let s,i,a;return o;function o(L){return e.enter("htmlText"),e.enter("htmlTextData"),e.consume(L),l}function l(L){return L===33?(e.consume(L),u):L===47?(e.consume(L),N):L===63?(e.consume(L),y):ci(L)?(e.consume(L),j):t(L)}function u(L){return L===45?(e.consume(L),h):L===91?(e.consume(L),i=0,x):ci(L)?(e.consume(L),w):t(L)}function h(L){return L===45?(e.consume(L),m):t(L)}function _(L){return L===null?t(L):L===45?(e.consume(L),p):Ct(L)?(a=_,Y(L)):(e.consume(L),_)}function p(L){return L===45?(e.consume(L),m):_(L)}function m(L){return L===62?H(L):L===45?p(L):_(L)}function x(L){const F="CDATA[";return L===F.charCodeAt(i++)?(e.consume(L),i===F.length?k:x):t(L)}function k(L){return L===null?t(L):L===93?(e.consume(L),v):Ct(L)?(a=k,Y(L)):(e.consume(L),k)}function v(L){return L===93?(e.consume(L),b):k(L)}function b(L){return L===62?H(L):L===93?(e.consume(L),b):k(L)}function w(L){return L===null||L===62?H(L):Ct(L)?(a=w,Y(L)):(e.consume(L),w)}function y(L){return L===null?t(L):L===63?(e.consume(L),C):Ct(L)?(a=y,Y(L)):(e.consume(L),y)}function C(L){return L===62?H(L):y(L)}function N(L){return ci(L)?(e.consume(L),E):t(L)}function E(L){return L===45||Gs(L)?(e.consume(L),E):T(L)}function T(L){return Ct(L)?(a=T,Y(L)):bn(L)?(e.consume(L),T):H(L)}function j(L){return L===45||Gs(L)?(e.consume(L),j):L===47||L===62||lr(L)?M(L):t(L)}function M(L){return L===47?(e.consume(L),H):L===58||L===95||ci(L)?(e.consume(L),D):Ct(L)?(a=M,Y(L)):bn(L)?(e.consume(L),M):H(L)}function D(L){return L===45||L===46||L===58||L===95||Gs(L)?(e.consume(L),D):I(L)}function I(L){return L===61?(e.consume(L),P):Ct(L)?(a=I,Y(L)):bn(L)?(e.consume(L),I):M(L)}function P(L){return L===null||L===60||L===61||L===62||L===96?t(L):L===34||L===39?(e.consume(L),s=L,U):Ct(L)?(a=P,Y(L)):bn(L)?(e.consume(L),P):(e.consume(L),q)}function U(L){return L===s?(e.consume(L),s=void 0,W):L===null?t(L):Ct(L)?(a=U,Y(L)):(e.consume(L),U)}function q(L){return L===null||L===34||L===39||L===60||L===61||L===96?t(L):L===47||L===62||lr(L)?M(L):(e.consume(L),q)}function W(L){return L===47||L===62||lr(L)?M(L):t(L)}function H(L){return L===62?(e.consume(L),e.exit("htmlTextData"),e.exit("htmlText"),n):t(L)}function Y(L){return e.exit("htmlTextData"),e.enter("lineEnding"),e.consume(L),e.exit("lineEnding"),te}function te(L){return bn(L)?hn(e,$,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(L):$(L)}function $(L){return e.enter("htmlTextData"),a(L)}}const k6={name:"labelEnd",resolveAll:L6n,resolveTo:I6n,tokenize:$6n},M6n={tokenize:B6n},O6n={tokenize:P6n},D6n={tokenize:F6n};function L6n(e){let n=-1;const t=[];for(;++n=3&&(u===null||Ct(u))?(e.exit("thematicBreak"),n(u)):t(u)}function l(u){return u===s?(e.consume(u),r++,l):(e.exit("thematicBreakSequence"),bn(u)?hn(e,o,"whitespace")(u):o(u))}}const Ci={continuation:{tokenize:Y6n},exit:J6n,name:"list",tokenize:X6n},W6n={partial:!0,tokenize:e7n},Q6n={partial:!0,tokenize:Z6n};function X6n(e,n,t){const r=this,s=r.events[r.events.length-1];let i=s&&s[1].type==="linePrefix"?s[2].sliceSerialize(s[1],!0).length:0,a=0;return o;function o(m){const x=r.containerState.type||(m===42||m===43||m===45?"listUnordered":"listOrdered");if(x==="listUnordered"?!r.containerState.marker||m===r.containerState.marker:Y3(m)){if(r.containerState.type||(r.containerState.type=x,e.enter(x,{_container:!0})),x==="listUnordered")return e.enter("listItemPrefix"),m===42||m===45?e.check(V1,t,u)(m):u(m);if(!r.interrupt||m===49)return e.enter("listItemPrefix"),e.enter("listItemValue"),l(m)}return t(m)}function l(m){return Y3(m)&&++a<10?(e.consume(m),l):(!r.interrupt||a<2)&&(r.containerState.marker?m===r.containerState.marker:m===41||m===46)?(e.exit("listItemValue"),u(m)):t(m)}function u(m){return e.enter("listItemMarker"),e.consume(m),e.exit("listItemMarker"),r.containerState.marker=r.containerState.marker||m,e.check(wm,r.interrupt?t:h,e.attempt(W6n,p,_))}function h(m){return r.containerState.initialBlankLine=!0,i++,p(m)}function _(m){return bn(m)?(e.enter("listItemPrefixWhitespace"),e.consume(m),e.exit("listItemPrefixWhitespace"),p):t(m)}function p(m){return r.containerState.size=i+r.sliceSerialize(e.exit("listItemPrefix"),!0).length,n(m)}}function Y6n(e,n,t){const r=this;return r.containerState._closeFlow=void 0,e.check(wm,s,i);function s(o){return r.containerState.furtherBlankLines=r.containerState.furtherBlankLines||r.containerState.initialBlankLine,hn(e,n,"listItemIndent",r.containerState.size+1)(o)}function i(o){return r.containerState.furtherBlankLines||!bn(o)?(r.containerState.furtherBlankLines=void 0,r.containerState.initialBlankLine=void 0,a(o)):(r.containerState.furtherBlankLines=void 0,r.containerState.initialBlankLine=void 0,e.attempt(Q6n,n,a)(o))}function a(o){return r.containerState._closeFlow=!0,r.interrupt=void 0,hn(e,e.attempt(Ci,n,t),"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(o)}}function Z6n(e,n,t){const r=this;return hn(e,s,"listItemIndent",r.containerState.size+1);function s(i){const a=r.events[r.events.length-1];return a&&a[1].type==="listItemIndent"&&a[2].sliceSerialize(a[1],!0).length===r.containerState.size?n(i):t(i)}}function J6n(e){e.exit(this.containerState.type)}function e7n(e,n,t){const r=this;return hn(e,s,"listItemPrefixWhitespace",r.parser.constructs.disable.null.includes("codeIndented")?void 0:5);function s(i){const a=r.events[r.events.length-1];return!bn(i)&&a&&a[1].type==="listItemPrefixWhitespace"?n(i):t(i)}}const NT={name:"setextUnderline",resolveTo:t7n,tokenize:n7n};function t7n(e,n){let t=e.length,r,s,i;for(;t--;)if(e[t][0]==="enter"){if(e[t][1].type==="content"){r=t;break}e[t][1].type==="paragraph"&&(s=t)}else e[t][1].type==="content"&&e.splice(t,1),!i&&e[t][1].type==="definition"&&(i=t);const a={type:"setextHeading",start:{...e[r][1].start},end:{...e[e.length-1][1].end}};return e[s][1].type="setextHeadingText",i?(e.splice(s,0,["enter",a,n]),e.splice(i+1,0,["exit",e[r][1],n]),e[r][1].end={...e[i][1].end}):e[r][1]=a,e.push(["exit",a,n]),e}function n7n(e,n,t){const r=this;let s;return i;function i(u){let h=r.events.length,_;for(;h--;)if(r.events[h][1].type!=="lineEnding"&&r.events[h][1].type!=="linePrefix"&&r.events[h][1].type!=="content"){_=r.events[h][1].type==="paragraph";break}return!r.parser.lazy[r.now().line]&&(r.interrupt||_)?(e.enter("setextHeadingLine"),s=u,a(u)):t(u)}function a(u){return e.enter("setextHeadingLineSequence"),o(u)}function o(u){return u===s?(e.consume(u),o):(e.exit("setextHeadingLineSequence"),bn(u)?hn(e,l,"lineSuffix")(u):l(u))}function l(u){return u===null||Ct(u)?(e.exit("setextHeadingLine"),n(u)):t(u)}}const r7n={tokenize:s7n};function s7n(e){const n=this,t=e.attempt(wm,r,e.attempt(this.parser.constructs.flowInitial,s,hn(e,e.attempt(this.parser.constructs.flow,s,e.attempt(c6n,s)),"linePrefix")));return t;function r(i){if(i===null){e.consume(i);return}return e.enter("lineEndingBlank"),e.consume(i),e.exit("lineEndingBlank"),n.currentConstruct=void 0,t}function s(i){if(i===null){e.consume(i);return}return e.enter("lineEnding"),e.consume(i),e.exit("lineEnding"),n.currentConstruct=void 0,t}}const i7n={resolveAll:QB()},a7n=WB("string"),o7n=WB("text");function WB(e){return{resolveAll:QB(e==="text"?l7n:void 0),tokenize:n};function n(t){const r=this,s=this.parser.constructs[e],i=t.attempt(s,a,o);return a;function a(h){return u(h)?i(h):o(h)}function o(h){if(h===null){t.consume(h);return}return t.enter("data"),t.consume(h),l}function l(h){return u(h)?(t.exit("data"),i(h)):(t.consume(h),l)}function u(h){if(h===null)return!0;const _=s[h];let p=-1;if(_)for(;++p<_.length;){const m=_[p];if(!m.previous||m.previous.call(r,r.previous))return!0}return!1}}}function QB(e){return n;function n(t,r){let s=-1,i;for(;++s<=t.length;)i===void 0?t[s]&&t[s][1].type==="data"&&(i=s,s++):(!t[s]||t[s][1].type!=="data")&&(s!==i+2&&(t[i][1].end=t[s-1][1].end,t.splice(i+2,s-i-2),s=i+2),i=void 0);return e?e(t,r):t}}function l7n(e,n){let t=0;for(;++t<=e.length;)if((t===e.length||e[t][1].type==="lineEnding")&&e[t-1][1].type==="data"){const r=e[t-1][1],s=n.sliceStream(r);let i=s.length,a=-1,o=0,l;for(;i--;){const u=s[i];if(typeof u=="string"){for(a=u.length;u.charCodeAt(a-1)===32;)o++,a--;if(a)break;a=-1}else if(u===-2)l=!0,o++;else if(u!==-1){i++;break}}if(n._contentTypeTextTrailing&&t===e.length&&(o=0),o){const u={type:t===e.length||l||o<2?"lineSuffix":"hardBreakTrailing",start:{_bufferIndex:i?a:r.start._bufferIndex+a,_index:r.start._index+i,line:r.end.line,column:r.end.column-o,offset:r.end.offset-o},end:{...r.end}};r.end={...u.start},r.start.offset===r.end.offset?Object.assign(r,u):(e.splice(t,0,["enter",u,n],["exit",u,n]),t+=2)}t++}return e}const c7n={42:Ci,43:Ci,45:Ci,48:Ci,49:Ci,50:Ci,51:Ci,52:Ci,53:Ci,54:Ci,55:Ci,56:Ci,57:Ci,62:FB},u7n={91:h6n},_7n={[-2]:Sw,[-1]:Sw,32:Sw},f7n={35:y6n,42:V1,45:[NT,V1],60:S6n,61:NT,95:V1,96:CT,126:CT},d7n={38:qB,92:HB},h7n={[-5]:Cw,[-4]:Cw,[-3]:Cw,33:H6n,38:qB,42:r5,60:[USn,A6n],91:U6n,92:[v6n,HB],93:k6,95:r5,96:r6n},p7n={null:[r5,i7n]},m7n={null:[42,95]},g7n={null:[]},v7n=Object.freeze(Object.defineProperty({__proto__:null,attentionMarkers:m7n,contentInitial:u7n,disable:g7n,document:c7n,flow:f7n,flowInitial:_7n,insideSpan:p7n,string:d7n,text:h7n},Symbol.toStringTag,{value:"Module"}));function b7n(e,n,t){let r={_bufferIndex:-1,_index:0,line:t&&t.line||1,column:t&&t.column||1,offset:t&&t.offset||0};const s={},i=[];let a=[],o=[];const l={attempt:T(N),check:T(E),consume:w,enter:y,exit:C,interrupt:T(E,{interrupt:!0})},u={code:null,containerState:{},defineSkip:k,events:[],now:x,parser:e,previous:null,sliceSerialize:p,sliceStream:m,write:_};let h=n.tokenize.call(u,l);return n.resolveAll&&i.push(n),u;function _(I){return a=za(a,I),v(),a[a.length-1]!==null?[]:(j(n,0),u.events=ry(i,u.events,u),u.events)}function p(I,P){return x7n(m(I),P)}function m(I){return y7n(a,I)}function x(){const{_bufferIndex:I,_index:P,line:U,column:q,offset:W}=r;return{_bufferIndex:I,_index:P,line:U,column:q,offset:W}}function k(I){s[I.line]=I.column,D()}function v(){let I;for(;r._index-1){const o=a[0];typeof o=="string"?a[0]=o.slice(r):a.shift()}i>0&&a.push(e[s].slice(0,i))}return a}function x7n(e,n){let t=-1;const r=[];let s;for(;++t"u"||e.call(u,p)},a=function(u,h){t&&h.name==="__proto__"?t(u,h.name,{enumerable:!0,configurable:!0,value:h.newValue,writable:!0}):u[h.name]=h.newValue},o=function(u,h){if(h==="__proto__")if(e.call(u,h)){if(r)return r(u,h).value}else return;return u[h]};return pw=function l(){var u,h,_,p,m,x,k=arguments[0],v=1,b=arguments.length,w=!1;for(typeof k=="boolean"&&(w=k,k=arguments[1]||{},v=2),(k==null||typeof k!="object"&&typeof k!="function")&&(k={});va.length;let l;o&&a.push(s);try{l=e.apply(this,a)}catch(u){const h=u;if(o&&t)throw h;return s(h)}o||(l&&l.then&&typeof l.then=="function"?l.then(i,s):l instanceof Error?s(l):i(l))}function s(a,...o){t||(t=!0,n(a,...o))}function i(a){s(null,a)}}function t0(e){return!e||typeof e!="object"?"":"position"in e||"type"in e?oT(e.position):"start"in e||"end"in e?oT(e):"line"in e||"column"in e?t5(e):""}function t5(e){return lT(e&&e.line)+":"+lT(e&&e.column)}function oT(e){return t5(e&&e.start)+"-"+t5(e&&e.end)}function lT(e){return e&&typeof e=="number"?e:1}class Ws extends Error{constructor(n,t,r){super(),typeof t=="string"&&(r=t,t=void 0);let s="",i={},a=!1;if(t&&("line"in t&&"column"in t?i={place:t}:"start"in t&&"end"in t?i={place:t}:"type"in t?i={ancestors:[t],place:t.position}:i={...t}),typeof n=="string"?s=n:!i.cause&&n&&(a=!0,s=n.message,i.cause=n),!i.ruleId&&!i.source&&typeof r=="string"){const l=r.indexOf(":");l===-1?i.ruleId=r:(i.source=r.slice(0,l),i.ruleId=r.slice(l+1))}if(!i.place&&i.ancestors&&i.ancestors){const l=i.ancestors[i.ancestors.length-1];l&&(i.place=l.position)}const o=i.place&&"start"in i.place?i.place.start:i.place;this.ancestors=i.ancestors||void 0,this.cause=i.cause||void 0,this.column=o?o.column:void 0,this.fatal=void 0,this.file="",this.message=s,this.line=o?o.line:void 0,this.name=t0(i.place)||"1:1",this.place=i.place||void 0,this.reason=this.message,this.ruleId=i.ruleId||void 0,this.source=i.source||void 0,this.stack=a&&i.cause&&typeof i.cause.stack=="string"?i.cause.stack:"",this.actual=void 0,this.expected=void 0,this.note=void 0,this.url=void 0}}Ws.prototype.file="";Ws.prototype.name="";Ws.prototype.reason="";Ws.prototype.message="";Ws.prototype.stack="";Ws.prototype.column=void 0;Ws.prototype.line=void 0;Ws.prototype.ancestors=void 0;Ws.prototype.cause=void 0;Ws.prototype.fatal=void 0;Ws.prototype.place=void 0;Ws.prototype.ruleId=void 0;Ws.prototype.source=void 0;const Ao={basename:xSn,dirname:wSn,extname:kSn,join:SSn,sep:"/"};function xSn(e,n){if(n!==void 0&&typeof n!="string")throw new TypeError('"ext" argument must be a string');xm(e);let t=0,r=-1,s=e.length,i;if(n===void 0||n.length===0||n.length>e.length){for(;s--;)if(e.codePointAt(s)===47){if(i){t=s+1;break}}else r<0&&(i=!0,r=s+1);return r<0?"":e.slice(t,r)}if(n===e)return"";let a=-1,o=n.length-1;for(;s--;)if(e.codePointAt(s)===47){if(i){t=s+1;break}}else a<0&&(i=!0,a=s+1),o>-1&&(e.codePointAt(s)===n.codePointAt(o--)?o<0&&(r=s):(o=-1,r=a));return t===r?r=a:r<0&&(r=e.length),e.slice(t,r)}function wSn(e){if(xm(e),e.length===0)return".";let n=-1,t=e.length,r;for(;--t;)if(e.codePointAt(t)===47){if(r){n=t;break}}else r||(r=!0);return n<0?e.codePointAt(0)===47?"/":".":n===1&&e.codePointAt(0)===47?"//":e.slice(0,n)}function kSn(e){xm(e);let n=e.length,t=-1,r=0,s=-1,i=0,a;for(;n--;){const o=e.codePointAt(n);if(o===47){if(a){r=n+1;break}continue}t<0&&(a=!0,t=n+1),o===46?s<0?s=n:i!==1&&(i=1):s>-1&&(i=-1)}return s<0||t<0||i===0||i===1&&s===t-1&&s===r+1?"":e.slice(s,t)}function SSn(...e){let n=-1,t;for(;++n0&&e.codePointAt(e.length-1)===47&&(t+="/"),n?"/"+t:t}function ESn(e,n){let t="",r=0,s=-1,i=0,a=-1,o,l;for(;++a<=e.length;){if(a2){if(l=t.lastIndexOf("/"),l!==t.length-1){l<0?(t="",r=0):(t=t.slice(0,l),r=t.length-1-t.lastIndexOf("/")),s=a,i=0;continue}}else if(t.length>0){t="",r=0,s=a,i=0;continue}}n&&(t=t.length>0?t+"/..":"..",r=2)}else t.length>0?t+="/"+e.slice(s+1,a):t=e.slice(s+1,a),r=a-s-1;s=a,i=0}else o===46&&i>-1?i++:i=-1}return t}function xm(e){if(typeof e!="string")throw new TypeError("Path must be a string. Received "+JSON.stringify(e))}const NSn={cwd:zSn};function zSn(){return"/"}function n5(e){return!!(e!==null&&typeof e=="object"&&"href"in e&&e.href&&"protocol"in e&&e.protocol&&e.auth===void 0)}function jSn(e){if(typeof e=="string")e=new URL(e);else if(!n5(e)){const n=new TypeError('The "path" argument must be of type string or an instance of URL. Received `'+e+"`");throw n.code="ERR_INVALID_ARG_TYPE",n}if(e.protocol!=="file:"){const n=new TypeError("The URL must be of scheme file");throw n.code="ERR_INVALID_URL_SCHEME",n}return TSn(e)}function TSn(e){if(e.hostname!==""){const r=new TypeError('File URL host must be "localhost" or empty on darwin');throw r.code="ERR_INVALID_FILE_URL_HOST",r}const n=e.pathname;let t=-1;for(;++t0){let[m,...x]=h;const k=r[p][1];e5(k)&&e5(m)&&(m=mw(!0,k,m)),r[p]=[u,m,...x]}}}}const ny=new v6().freeze();function yw(e,n){if(typeof n!="function")throw new TypeError("Cannot `"+e+"` without `parser`")}function xw(e,n){if(typeof n!="function")throw new TypeError("Cannot `"+e+"` without `compiler`")}function ww(e,n){if(n)throw new Error("Cannot call `"+e+"` on a frozen processor.\nCreate a new processor first, by calling it: use `processor()` instead of `processor`.")}function uT(e){if(!e5(e)||typeof e.type!="string")throw new TypeError("Expected node, got `"+e+"`")}function _T(e,n,t){if(!t)throw new Error("`"+e+"` finished async. Use `"+n+"` instead")}function l1(e){return OSn(e)?e:new MB(e)}function OSn(e){return!!(e&&typeof e=="object"&&"message"in e&&"messages"in e)}function DSn(e){return typeof e=="string"||LSn(e)}function LSn(e){return!!(e&&typeof e=="object"&&"byteLength"in e&&"byteOffset"in e)}var fT=Object.prototype.hasOwnProperty;function dT(e,n,t){for(t of e.keys())if(n0(t,n))return t}function n0(e,n){var t,r,s;if(e===n)return!0;if(e&&n&&(t=e.constructor)===n.constructor){if(t===Date)return e.getTime()===n.getTime();if(t===RegExp)return e.toString()===n.toString();if(t===Array){if((r=e.length)===n.length)for(;r--&&n0(e[r],n[r]););return r===-1}if(t===Set){if(e.size!==n.size)return!1;for(r of e)if(s=r,s&&typeof s=="object"&&(s=dT(n,s),!s)||!n.has(s))return!1;return!0}if(t===Map){if(e.size!==n.size)return!1;for(r of e)if(s=r[0],s&&typeof s=="object"&&(s=dT(n,s),!s)||!n0(r[1],n.get(s)))return!1;return!0}if(t===ArrayBuffer)e=new Uint8Array(e),n=new Uint8Array(n);else if(t===DataView){if((r=e.byteLength)===n.byteLength)for(;r--&&e.getInt8(r)===n.getInt8(r););return r===-1}if(ArrayBuffer.isView(e)){if((r=e.byteLength)===n.byteLength)for(;r--&&e[r]===n[r];);return r===-1}if(!t||typeof e=="object"){r=0;for(t in e)if(fT.call(e,t)&&++r&&!fT.call(n,t)||!(t in n)||!n0(e[t],n[t]))return!1;return Object.keys(n).length===r}}return e!==e&&n!==n}const ISn=/^[$_\p{ID_Start}][$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,$Sn=/^[$_\p{ID_Start}][-$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,BSn={};function hT(e,n){return(BSn.jsx?$Sn:ISn).test(e)}const PSn=/[ \t\n\f\r]/g;function FSn(e){return typeof e=="object"?e.type==="text"?pT(e.value):!1:pT(e)}function pT(e){return e.replace(PSn,"")===""}var Zf={},kw,mT;function HSn(){if(mT)return kw;mT=1;var e=/\/\*[^*]*\*+([^/*][^*]*\*+)*\//g,n=/\n/g,t=/^\s*/,r=/^(\*?[-#/*\\\w]+(\[[0-9a-z_-]+\])?)\s*/,s=/^:\s*/,i=/^((?:'(?:\\'|.)*?'|"(?:\\"|.)*?"|\([^)]*?\)|[^};])+)/,a=/^[;\s]*/,o=/^\s+|\s+$/g,l=` +`,u="/",h="*",_="",p="comment",m="declaration";function x(v,b){if(typeof v!="string")throw new TypeError("First argument must be a string");if(!v)return[];b=b||{};var w=1,y=1;function C(U){var W=U.match(n);W&&(w+=W.length);var H=U.lastIndexOf(l);y=~H?U.length-H:y+U.length}function E(){var U={line:w,column:y};return function(W){return W.position=new N(U),M(),W}}function N(U){this.start=U,this.end={line:w,column:y},this.source=b.source}N.prototype.content=v;function A(U){var W=new Error(b.source+":"+w+":"+y+": "+U);if(W.reason=U,W.filename=b.source,W.line=w,W.column=y,W.source=v,!b.silent)throw W}function j(U){var W=U.exec(v);if(W){var H=W[0];return C(H),v=v.slice(H.length),W}}function M(){j(t)}function L(U){var W;for(U=U||[];W=I();)W!==!1&&U.push(W);return U}function I(){var U=E();if(!(u!=v.charAt(0)||h!=v.charAt(1))){for(var W=2;_!=v.charAt(W)&&(h!=v.charAt(W)||u!=v.charAt(W+1));)++W;if(W+=2,_===v.charAt(W-1))return A("End of comment missing");var H=v.slice(2,W-2);return y+=2,C(H),v=v.slice(W),y+=2,U({type:p,comment:H})}}function B(){var U=E(),W=j(r);if(W){if(I(),!j(s))return A("property missing ':'");var H=j(i),Y=U({type:m,property:k(W[0].replace(e,_)),value:H?k(H[0].replace(e,_)):_});return j(a),Y}}function q(){var U=[];L(U);for(var W;W=B();)W!==!1&&(U.push(W),L(U));return U}return M(),q()}function k(v){return v?v.replace(o,_):_}return kw=x,kw}var gT;function qSn(){if(gT)return Zf;gT=1;var e=Zf&&Zf.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(Zf,"__esModule",{value:!0}),Zf.default=t;const n=e(HSn());function t(r,s){let i=null;if(!r||typeof r!="string")return i;const a=(0,n.default)(r),o=typeof s=="function";return a.forEach(l=>{if(l.type!=="declaration")return;const{property:u,value:h}=l;o?s(u,h,l):h&&(i=i||{},i[u]=h)}),i}return Zf}var Tp={},vT;function USn(){if(vT)return Tp;vT=1,Object.defineProperty(Tp,"__esModule",{value:!0}),Tp.camelCase=void 0;var e=/^--[a-zA-Z0-9_-]+$/,n=/-([a-z])/g,t=/^[^-]+$/,r=/^-(webkit|moz|ms|o|khtml)-/,s=/^-(ms)-/,i=function(u){return!u||t.test(u)||e.test(u)},a=function(u,h){return h.toUpperCase()},o=function(u,h){return"".concat(h,"-")},l=function(u,h){return h===void 0&&(h={}),i(u)?u:(u=u.toLowerCase(),h.reactCompat?u=u.replace(s,o):u=u.replace(r,o),u.replace(n,a))};return Tp.camelCase=l,Tp}var Ap,bT;function GSn(){if(bT)return Ap;bT=1;var e=Ap&&Ap.__importDefault||function(s){return s&&s.__esModule?s:{default:s}},n=e(qSn()),t=USn();function r(s,i){var a={};return!s||typeof s!="string"||(0,n.default)(s,function(o,l){o&&l&&(a[(0,t.camelCase)(o,i)]=l)}),a}return r.default=r,Ap=r,Ap}var VSn=GSn();const KSn=am(VSn),b6={}.hasOwnProperty,WSn=new Map,QSn=/[A-Z]/g,XSn=new Set(["table","tbody","thead","tfoot","tr"]),YSn=new Set(["td","th"]),OB="https://github.com/syntax-tree/hast-util-to-jsx-runtime";function DB(e,n){if(!n||n.Fragment===void 0)throw new TypeError("Expected `Fragment` in options");const t=n.filePath||void 0;let r;if(n.development){if(typeof n.jsxDEV!="function")throw new TypeError("Expected `jsxDEV` in options when `development: true`");r=i6n(t,n.jsxDEV)}else{if(typeof n.jsx!="function")throw new TypeError("Expected `jsx` in production options");if(typeof n.jsxs!="function")throw new TypeError("Expected `jsxs` in production options");r=s6n(t,n.jsx,n.jsxs)}const s={Fragment:n.Fragment,ancestors:[],components:n.components||{},create:r,elementAttributeNameCase:n.elementAttributeNameCase||"react",evaluater:n.createEvaluater?n.createEvaluater():void 0,filePath:t,ignoreInvalidStyle:n.ignoreInvalidStyle||!1,passKeys:n.passKeys!==!1,passNode:n.passNode||!1,schema:n.space==="svg"?Ib:c$,stylePropertyNameCase:n.stylePropertyNameCase||"dom",tableCellAlignToStyle:n.tableCellAlignToStyle!==!1},i=LB(s,e,void 0);return i&&typeof i!="string"?i:s.create(e,s.Fragment,{children:i||void 0},void 0)}function LB(e,n,t){if(n.type==="element")return ZSn(e,n,t);if(n.type==="mdxFlowExpression"||n.type==="mdxTextExpression")return JSn(e,n);if(n.type==="mdxJsxFlowElement"||n.type==="mdxJsxTextElement")return t6n(e,n,t);if(n.type==="mdxjsEsm")return e6n(e,n);if(n.type==="root")return n6n(e,n,t);if(n.type==="text")return r6n(e,n)}function ZSn(e,n,t){const r=e.schema;let s=r;n.tagName.toLowerCase()==="svg"&&r.space==="html"&&(s=Ib,e.schema=s),e.ancestors.push(n);const i=$B(e,n.tagName,!1),a=a6n(e,n);let o=x6(e,n);return XSn.has(n.tagName)&&(o=o.filter(function(l){return typeof l=="string"?!FSn(l):!0})),IB(e,a,i,n),y6(a,o),e.ancestors.pop(),e.schema=r,e.create(n,i,a,t)}function JSn(e,n){if(n.data&&n.data.estree&&e.evaluater){const r=n.data.estree.body[0];return r.type,e.evaluater.evaluateExpression(r.expression)}T0(e,n.position)}function e6n(e,n){if(n.data&&n.data.estree&&e.evaluater)return e.evaluater.evaluateProgram(n.data.estree);T0(e,n.position)}function t6n(e,n,t){const r=e.schema;let s=r;n.name==="svg"&&r.space==="html"&&(s=Ib,e.schema=s),e.ancestors.push(n);const i=n.name===null?e.Fragment:$B(e,n.name,!0),a=o6n(e,n),o=x6(e,n);return IB(e,a,i,n),y6(a,o),e.ancestors.pop(),e.schema=r,e.create(n,i,a,t)}function n6n(e,n,t){const r={};return y6(r,x6(e,n)),e.create(n,e.Fragment,r,t)}function r6n(e,n){return n.value}function IB(e,n,t,r){typeof t!="string"&&t!==e.Fragment&&e.passNode&&(n.node=r)}function y6(e,n){if(n.length>0){const t=n.length>1?n:n[0];t&&(e.children=t)}}function s6n(e,n,t){return r;function r(s,i,a,o){const u=Array.isArray(a.children)?t:n;return o?u(i,a,o):u(i,a)}}function i6n(e,n){return t;function t(r,s,i,a){const o=Array.isArray(i.children),l=_6(r);return n(s,i,a,o,{columnNumber:l?l.column-1:void 0,fileName:e,lineNumber:l?l.line:void 0},void 0)}}function a6n(e,n){const t={};let r,s;for(s in n.properties)if(s!=="children"&&b6.call(n.properties,s)){const i=l6n(e,s,n.properties[s]);if(i){const[a,o]=i;e.tableCellAlignToStyle&&a==="align"&&typeof o=="string"&&YSn.has(n.tagName)?r=o:t[a]=o}}if(r){const i=t.style||(t.style={});i[e.stylePropertyNameCase==="css"?"text-align":"textAlign"]=r}return t}function o6n(e,n){const t={};for(const r of n.attributes)if(r.type==="mdxJsxExpressionAttribute")if(r.data&&r.data.estree&&e.evaluater){const i=r.data.estree.body[0];i.type;const a=i.expression;a.type;const o=a.properties[0];o.type,Object.assign(t,e.evaluater.evaluateExpression(o.argument))}else T0(e,n.position);else{const s=r.name;let i;if(r.value&&typeof r.value=="object")if(r.value.data&&r.value.data.estree&&e.evaluater){const o=r.value.data.estree.body[0];o.type,i=e.evaluater.evaluateExpression(o.expression)}else T0(e,n.position);else i=r.value===null?!0:r.value;t[s]=i}return t}function x6(e,n){const t=[];let r=-1;const s=e.passKeys?new Map:WSn;for(;++ry.key).filter(y=>y!==void 0));let u=0;for(;u=e.children.length-h&&(N=s.length-(e.children.length-y)),N>=0&&(E=((b=s[N])==null?void 0:b.key)??E);E&&l.has(E)&&((w=s[N])==null?void 0:w.key)!==E;)E=`${E}+`;E&&l.add(E);const A=BB(C,s[N]??null,t,E);i.push(A),A.react!==void 0&&a.push(A.react)}const _=n!==null&&m6n(e,n.node);if(n&&n.key===r&&_&&s.length===i.length&&i.every((y,C)=>y===s[C]))return n;const p=e.type==="element"&&d6n.has(e.tagName)?a.filter(y=>typeof y!="string"||!h6n.test(y)):a,m=p.length>0?p.length===1?p[0]:p:null;let x=_?n==null?void 0:n.shell:null;if(!x){const y=DB({...e,children:[]},t);x={props:y.props,type:y.type}}return{children:i,key:r,node:e,react:f.jsx(x.type,{...x.props,children:m},r),shell:x}}function m6n(e,n){if(e===n)return!0;const{children:t,position:r,...s}=e,{children:i,position:a,...o}=n;return n0(s,o)}function xd(e,n){if(e===n)return!0;if(Array.isArray(e)||Array.isArray(n)){if(!Array.isArray(e)||!Array.isArray(n)||e.length!==n.length)return!1;for(let a=0;as?0:s+n:n=n>s?s:n,t=t>0?t:0,r.length<1e4)a=Array.from(r),a.unshift(n,t),e.splice(...a);else for(t&&e.splice(n,t);i0?(na(e,e.length,0,n),e):n}const xT={}.hasOwnProperty;function FB(e){const n={};let t=-1;for(;++t13&&t<32||t>126&&t<160||t>55295&&t<57344||t>64975&&t<65008||(t&65535)===65535||(t&65535)===65534||t>1114111?"�":String.fromCodePoint(t)}function oo(e){return e.replace(/[\t\n\r ]+/g," ").replace(/^ | $/g,"").toLowerCase().toUpperCase()}function pn(e,n,t,r){const s=r?r-1:Number.POSITIVE_INFINITY;let i=0;return a;function a(l){return bn(l)?(e.enter(t),o(l)):n(l)}function o(l){return bn(l)&&i++a))return;const A=n.events.length;let j=A,M,L;for(;j--;)if(n.events[j][0]==="exit"&&n.events[j][1].type==="chunkFlow"){if(M){L=n.events[j][1].end;break}M=!0}for(b(r),N=A;Ny;){const E=t[C];n.containerState=E[1],E[0].exit.call(n,e)}t.length=y}function w(){s.write([null]),i=void 0,s=void 0,n.containerState._closeFlow=void 0}}function C6n(e,n,t){return pn(e,e.attempt(this.parser.constructs.document,n,t),"linePrefix",this.parser.constructs.disable.null.includes("codeIndented")?void 0:4)}function sh(e){if(e===null||lr(e)||V_(e))return 1;if(Jb(e))return 2}function ry(e,n,t){const r=[];let s=-1;for(;++s1&&e[t][1].end.offset-e[t][1].start.offset>1?2:1;const _={...e[r][1].end},p={...e[t][1].start};kT(_,-l),kT(p,l),a={type:l>1?"strongSequence":"emphasisSequence",start:_,end:{...e[r][1].end}},o={type:l>1?"strongSequence":"emphasisSequence",start:{...e[t][1].start},end:p},i={type:l>1?"strongText":"emphasisText",start:{...e[r][1].end},end:{...e[t][1].start}},s={type:l>1?"strong":"emphasis",start:{...a.start},end:{...o.end}},e[r][1].end={...a.start},e[t][1].start={...o.end},u=[],e[r][1].end.offset-e[r][1].start.offset&&(u=za(u,[["enter",e[r][1],n],["exit",e[r][1],n]])),u=za(u,[["enter",s,n],["enter",a,n],["exit",a,n],["enter",i,n]]),u=za(u,ry(n.parser.constructs.insideSpan.null,e.slice(r+1,t),n)),u=za(u,[["exit",i,n],["enter",o,n],["exit",o,n],["exit",s,n]]),e[t][1].end.offset-e[t][1].start.offset?(h=2,u=za(u,[["enter",e[t][1],n],["exit",e[t][1],n]])):h=0,na(e,r-1,t-r+3,u),t=r+u.length-h-2;break}}for(t=-1;++t0&&bn(N)?pn(e,w,"linePrefix",i+1)(N):w(N)}function w(N){return N===null||Et(N)?e.check(ST,k,C)(N):(e.enter("codeFlowValue"),y(N))}function y(N){return N===null||Et(N)?(e.exit("codeFlowValue"),w(N)):(e.consume(N),y)}function C(N){return e.exit("codeFenced"),n(N)}function E(N,A,j){let M=0;return L;function L(W){return N.enter("lineEnding"),N.consume(W),N.exit("lineEnding"),I}function I(W){return N.enter("codeFencedFence"),bn(W)?pn(N,B,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(W):B(W)}function B(W){return W===o?(N.enter("codeFencedFenceSequence"),q(W)):j(W)}function q(W){return W===o?(M++,N.consume(W),q):M>=a?(N.exit("codeFencedFenceSequence"),bn(W)?pn(N,U,"whitespace")(W):U(W)):j(W)}function U(W){return W===null||Et(W)?(N.exit("codeFencedFence"),A(W)):j(W)}}}function I6n(e,n,t){const r=this;return s;function s(a){return a===null?t(a):(e.enter("lineEnding"),e.consume(a),e.exit("lineEnding"),i)}function i(a){return r.parser.lazy[r.now().line]?t(a):n(a)}}const Sw={name:"codeIndented",tokenize:B6n},$6n={partial:!0,tokenize:P6n};function B6n(e,n,t){const r=this;return s;function s(u){return e.enter("codeIndented"),pn(e,i,"linePrefix",5)(u)}function i(u){const h=r.events[r.events.length-1];return h&&h[1].type==="linePrefix"&&h[2].sliceSerialize(h[1],!0).length>=4?a(u):t(u)}function a(u){return u===null?l(u):Et(u)?e.attempt($6n,a,l)(u):(e.enter("codeFlowValue"),o(u))}function o(u){return u===null||Et(u)?(e.exit("codeFlowValue"),a(u)):(e.consume(u),o)}function l(u){return e.exit("codeIndented"),n(u)}}function P6n(e,n,t){const r=this;return s;function s(a){return r.parser.lazy[r.now().line]?t(a):Et(a)?(e.enter("lineEnding"),e.consume(a),e.exit("lineEnding"),s):pn(e,i,"linePrefix",5)(a)}function i(a){const o=r.events[r.events.length-1];return o&&o[1].type==="linePrefix"&&o[2].sliceSerialize(o[1],!0).length>=4?n(a):Et(a)?s(a):t(a)}}const F6n={name:"codeText",previous:q6n,resolve:H6n,tokenize:U6n};function H6n(e){let n=e.length-4,t=3,r,s;if((e[t][1].type==="lineEnding"||e[t][1].type==="space")&&(e[n][1].type==="lineEnding"||e[n][1].type==="space")){for(r=t;++r=this.left.length+this.right.length)throw new RangeError("Cannot access index `"+n+"` in a splice buffer of size `"+(this.left.length+this.right.length)+"`");return nthis.left.length?this.right.slice(this.right.length-r+this.left.length,this.right.length-n+this.left.length).reverse():this.left.slice(n).concat(this.right.slice(this.right.length-r+this.left.length).reverse())}splice(n,t,r){const s=t||0;this.setCursor(Math.trunc(n));const i=this.right.splice(this.right.length-s,Number.POSITIVE_INFINITY);return r&&Rp(this.left,r),i.reverse()}pop(){return this.setCursor(Number.POSITIVE_INFINITY),this.left.pop()}push(n){this.setCursor(Number.POSITIVE_INFINITY),this.left.push(n)}pushMany(n){this.setCursor(Number.POSITIVE_INFINITY),Rp(this.left,n)}unshift(n){this.setCursor(0),this.right.push(n)}unshiftMany(n){this.setCursor(0),Rp(this.right,n.reverse())}setCursor(n){if(!(n===this.left.length||n>this.left.length&&this.right.length===0||n<0&&this.left.length===0))if(n=4?n(a):e.interrupt(r.parser.constructs.flow,t,n)(a)}}function KB(e,n,t,r,s,i,a,o,l){const u=l||Number.POSITIVE_INFINITY;let h=0;return _;function _(b){return b===60?(e.enter(r),e.enter(s),e.enter(i),e.consume(b),e.exit(i),p):b===null||b===32||b===41||Iv(b)?t(b):(e.enter(r),e.enter(a),e.enter(o),e.enter("chunkString",{contentType:"string"}),k(b))}function p(b){return b===62?(e.enter(i),e.consume(b),e.exit(i),e.exit(s),e.exit(r),n):(e.enter(o),e.enter("chunkString",{contentType:"string"}),m(b))}function m(b){return b===62?(e.exit("chunkString"),e.exit(o),p(b)):b===null||b===60||Et(b)?t(b):(e.consume(b),b===92?x:m)}function x(b){return b===60||b===62||b===92?(e.consume(b),m):m(b)}function k(b){return!h&&(b===null||b===41||lr(b))?(e.exit("chunkString"),e.exit(o),e.exit(a),e.exit(r),n(b)):h999||m===null||m===91||m===93&&!l||m===94&&!o&&"_hiddenFootnoteSupport"in a.parser.constructs?t(m):m===93?(e.exit(i),e.enter(s),e.consume(m),e.exit(s),e.exit(r),n):Et(m)?(e.enter("lineEnding"),e.consume(m),e.exit("lineEnding"),h):(e.enter("chunkString",{contentType:"string"}),_(m))}function _(m){return m===null||m===91||m===93||Et(m)||o++>999?(e.exit("chunkString"),h(m)):(e.consume(m),l||(l=!bn(m)),m===92?p:_)}function p(m){return m===91||m===92||m===93?(e.consume(m),o++,_):_(m)}}function QB(e,n,t,r,s,i){let a;return o;function o(p){return p===34||p===39||p===40?(e.enter(r),e.enter(s),e.consume(p),e.exit(s),a=p===40?41:p,l):t(p)}function l(p){return p===a?(e.enter(s),e.consume(p),e.exit(s),e.exit(r),n):(e.enter(i),u(p))}function u(p){return p===a?(e.exit(i),l(a)):p===null?t(p):Et(p)?(e.enter("lineEnding"),e.consume(p),e.exit("lineEnding"),pn(e,u,"linePrefix")):(e.enter("chunkString",{contentType:"string"}),h(p))}function h(p){return p===a||p===null||Et(p)?(e.exit("chunkString"),u(p)):(e.consume(p),p===92?_:h)}function _(p){return p===a||p===92?(e.consume(p),h):h(p)}}function r0(e,n){let t;return r;function r(s){return Et(s)?(e.enter("lineEnding"),e.consume(s),e.exit("lineEnding"),t=!0,r):bn(s)?pn(e,r,t?"linePrefix":"lineSuffix")(s):n(s)}}const Z6n={name:"definition",tokenize:e7n},J6n={partial:!0,tokenize:t7n};function e7n(e,n,t){const r=this;let s;return i;function i(m){return e.enter("definition"),a(m)}function a(m){return WB.call(r,e,o,t,"definitionLabel","definitionLabelMarker","definitionLabelString")(m)}function o(m){return s=oo(r.sliceSerialize(r.events[r.events.length-1][1]).slice(1,-1)),m===58?(e.enter("definitionMarker"),e.consume(m),e.exit("definitionMarker"),l):t(m)}function l(m){return lr(m)?r0(e,u)(m):u(m)}function u(m){return KB(e,h,t,"definitionDestination","definitionDestinationLiteral","definitionDestinationLiteralMarker","definitionDestinationRaw","definitionDestinationString")(m)}function h(m){return e.attempt(J6n,_,_)(m)}function _(m){return bn(m)?pn(e,p,"whitespace")(m):p(m)}function p(m){return m===null||Et(m)?(e.exit("definition"),r.parser.defined.push(s),n(m)):t(m)}}function t7n(e,n,t){return r;function r(o){return lr(o)?r0(e,s)(o):t(o)}function s(o){return QB(e,i,t,"definitionTitle","definitionTitleMarker","definitionTitleString")(o)}function i(o){return bn(o)?pn(e,a,"whitespace")(o):a(o)}function a(o){return o===null||Et(o)?n(o):t(o)}}const n7n={name:"hardBreakEscape",tokenize:r7n};function r7n(e,n,t){return r;function r(i){return e.enter("hardBreakEscape"),e.consume(i),s}function s(i){return Et(i)?(e.exit("hardBreakEscape"),n(i)):t(i)}}const s7n={name:"headingAtx",resolve:i7n,tokenize:a7n};function i7n(e,n){let t=e.length-2,r=3,s,i;return e[r][1].type==="whitespace"&&(r+=2),t-2>r&&e[t][1].type==="whitespace"&&(t-=2),e[t][1].type==="atxHeadingSequence"&&(r===t-1||t-4>r&&e[t-2][1].type==="whitespace")&&(t-=r+1===t?2:4),t>r&&(s={type:"atxHeadingText",start:e[r][1].start,end:e[t][1].end},i={type:"chunkText",start:e[r][1].start,end:e[t][1].end,contentType:"text"},na(e,r,t-r+1,[["enter",s,n],["enter",i,n],["exit",i,n],["exit",s,n]])),e}function a7n(e,n,t){let r=0;return s;function s(h){return e.enter("atxHeading"),i(h)}function i(h){return e.enter("atxHeadingSequence"),a(h)}function a(h){return h===35&&r++<6?(e.consume(h),a):h===null||lr(h)?(e.exit("atxHeadingSequence"),o(h)):t(h)}function o(h){return h===35?(e.enter("atxHeadingSequence"),l(h)):h===null||Et(h)?(e.exit("atxHeading"),n(h)):bn(h)?pn(e,o,"whitespace")(h):(e.enter("atxHeadingText"),u(h))}function l(h){return h===35?(e.consume(h),l):(e.exit("atxHeadingSequence"),o(h))}function u(h){return h===null||h===35||lr(h)?(e.exit("atxHeadingText"),o(h)):(e.consume(h),u)}}const o7n=["address","article","aside","base","basefont","blockquote","body","caption","center","col","colgroup","dd","details","dialog","dir","div","dl","dt","fieldset","figcaption","figure","footer","form","frame","frameset","h1","h2","h3","h4","h5","h6","head","header","hr","html","iframe","legend","li","link","main","menu","menuitem","nav","noframes","ol","optgroup","option","p","param","search","section","summary","table","tbody","td","tfoot","th","thead","title","tr","track","ul"],ET=["pre","script","style","textarea"],l7n={concrete:!0,name:"htmlFlow",resolveTo:_7n,tokenize:f7n},c7n={partial:!0,tokenize:h7n},u7n={partial:!0,tokenize:d7n};function _7n(e){let n=e.length;for(;n--&&!(e[n][0]==="enter"&&e[n][1].type==="htmlFlow"););return n>1&&e[n-2][1].type==="linePrefix"&&(e[n][1].start=e[n-2][1].start,e[n+1][1].start=e[n-2][1].start,e.splice(n-2,2)),e}function f7n(e,n,t){const r=this;let s,i,a,o,l;return u;function u(V){return h(V)}function h(V){return e.enter("htmlFlow"),e.enter("htmlFlowData"),e.consume(V),_}function _(V){return V===33?(e.consume(V),p):V===47?(e.consume(V),i=!0,k):V===63?(e.consume(V),s=3,r.interrupt?n:D):ci(V)?(e.consume(V),a=String.fromCharCode(V),v):t(V)}function p(V){return V===45?(e.consume(V),s=2,m):V===91?(e.consume(V),s=5,o=0,x):ci(V)?(e.consume(V),s=4,r.interrupt?n:D):t(V)}function m(V){return V===45?(e.consume(V),r.interrupt?n:D):t(V)}function x(V){const ee="CDATA[";return V===ee.charCodeAt(o++)?(e.consume(V),o===ee.length?r.interrupt?n:B:x):t(V)}function k(V){return ci(V)?(e.consume(V),a=String.fromCharCode(V),v):t(V)}function v(V){if(V===null||V===47||V===62||lr(V)){const ee=V===47,ce=a.toLowerCase();return!ee&&!i&&ET.includes(ce)?(s=1,r.interrupt?n(V):B(V)):o7n.includes(a.toLowerCase())?(s=6,ee?(e.consume(V),b):r.interrupt?n(V):B(V)):(s=7,r.interrupt&&!r.parser.lazy[r.now().line]?t(V):i?w(V):y(V))}return V===45||Gs(V)?(e.consume(V),a+=String.fromCharCode(V),v):t(V)}function b(V){return V===62?(e.consume(V),r.interrupt?n:B):t(V)}function w(V){return bn(V)?(e.consume(V),w):L(V)}function y(V){return V===47?(e.consume(V),L):V===58||V===95||ci(V)?(e.consume(V),C):bn(V)?(e.consume(V),y):L(V)}function C(V){return V===45||V===46||V===58||V===95||Gs(V)?(e.consume(V),C):E(V)}function E(V){return V===61?(e.consume(V),N):bn(V)?(e.consume(V),E):y(V)}function N(V){return V===null||V===60||V===61||V===62||V===96?t(V):V===34||V===39?(e.consume(V),l=V,A):bn(V)?(e.consume(V),N):j(V)}function A(V){return V===l?(e.consume(V),l=null,M):V===null||Et(V)?t(V):(e.consume(V),A)}function j(V){return V===null||V===34||V===39||V===47||V===60||V===61||V===62||V===96||lr(V)?E(V):(e.consume(V),j)}function M(V){return V===47||V===62||bn(V)?y(V):t(V)}function L(V){return V===62?(e.consume(V),I):t(V)}function I(V){return V===null||Et(V)?B(V):bn(V)?(e.consume(V),I):t(V)}function B(V){return V===45&&s===2?(e.consume(V),H):V===60&&s===1?(e.consume(V),Y):V===62&&s===4?(e.consume(V),F):V===63&&s===3?(e.consume(V),D):V===93&&s===5?(e.consume(V),$):Et(V)&&(s===6||s===7)?(e.exit("htmlFlowData"),e.check(c7n,G,q)(V)):V===null||Et(V)?(e.exit("htmlFlowData"),q(V)):(e.consume(V),B)}function q(V){return e.check(u7n,U,G)(V)}function U(V){return e.enter("lineEnding"),e.consume(V),e.exit("lineEnding"),W}function W(V){return V===null||Et(V)?q(V):(e.enter("htmlFlowData"),B(V))}function H(V){return V===45?(e.consume(V),D):B(V)}function Y(V){return V===47?(e.consume(V),a="",te):B(V)}function te(V){if(V===62){const ee=a.toLowerCase();return ET.includes(ee)?(e.consume(V),F):B(V)}return ci(V)&&a.length<8?(e.consume(V),a+=String.fromCharCode(V),te):B(V)}function $(V){return V===93?(e.consume(V),D):B(V)}function D(V){return V===62?(e.consume(V),F):V===45&&s===2?(e.consume(V),D):B(V)}function F(V){return V===null||Et(V)?(e.exit("htmlFlowData"),G(V)):(e.consume(V),F)}function G(V){return e.exit("htmlFlow"),n(V)}}function d7n(e,n,t){const r=this;return s;function s(a){return Et(a)?(e.enter("lineEnding"),e.consume(a),e.exit("lineEnding"),i):t(a)}function i(a){return r.parser.lazy[r.now().line]?t(a):n(a)}}function h7n(e,n,t){return r;function r(s){return e.enter("lineEnding"),e.consume(s),e.exit("lineEnding"),e.attempt(wm,n,t)}}const p7n={name:"htmlText",tokenize:m7n};function m7n(e,n,t){const r=this;let s,i,a;return o;function o(D){return e.enter("htmlText"),e.enter("htmlTextData"),e.consume(D),l}function l(D){return D===33?(e.consume(D),u):D===47?(e.consume(D),E):D===63?(e.consume(D),y):ci(D)?(e.consume(D),j):t(D)}function u(D){return D===45?(e.consume(D),h):D===91?(e.consume(D),i=0,x):ci(D)?(e.consume(D),w):t(D)}function h(D){return D===45?(e.consume(D),m):t(D)}function _(D){return D===null?t(D):D===45?(e.consume(D),p):Et(D)?(a=_,Y(D)):(e.consume(D),_)}function p(D){return D===45?(e.consume(D),m):_(D)}function m(D){return D===62?H(D):D===45?p(D):_(D)}function x(D){const F="CDATA[";return D===F.charCodeAt(i++)?(e.consume(D),i===F.length?k:x):t(D)}function k(D){return D===null?t(D):D===93?(e.consume(D),v):Et(D)?(a=k,Y(D)):(e.consume(D),k)}function v(D){return D===93?(e.consume(D),b):k(D)}function b(D){return D===62?H(D):D===93?(e.consume(D),b):k(D)}function w(D){return D===null||D===62?H(D):Et(D)?(a=w,Y(D)):(e.consume(D),w)}function y(D){return D===null?t(D):D===63?(e.consume(D),C):Et(D)?(a=y,Y(D)):(e.consume(D),y)}function C(D){return D===62?H(D):y(D)}function E(D){return ci(D)?(e.consume(D),N):t(D)}function N(D){return D===45||Gs(D)?(e.consume(D),N):A(D)}function A(D){return Et(D)?(a=A,Y(D)):bn(D)?(e.consume(D),A):H(D)}function j(D){return D===45||Gs(D)?(e.consume(D),j):D===47||D===62||lr(D)?M(D):t(D)}function M(D){return D===47?(e.consume(D),H):D===58||D===95||ci(D)?(e.consume(D),L):Et(D)?(a=M,Y(D)):bn(D)?(e.consume(D),M):H(D)}function L(D){return D===45||D===46||D===58||D===95||Gs(D)?(e.consume(D),L):I(D)}function I(D){return D===61?(e.consume(D),B):Et(D)?(a=I,Y(D)):bn(D)?(e.consume(D),I):M(D)}function B(D){return D===null||D===60||D===61||D===62||D===96?t(D):D===34||D===39?(e.consume(D),s=D,q):Et(D)?(a=B,Y(D)):bn(D)?(e.consume(D),B):(e.consume(D),U)}function q(D){return D===s?(e.consume(D),s=void 0,W):D===null?t(D):Et(D)?(a=q,Y(D)):(e.consume(D),q)}function U(D){return D===null||D===34||D===39||D===60||D===61||D===96?t(D):D===47||D===62||lr(D)?M(D):(e.consume(D),U)}function W(D){return D===47||D===62||lr(D)?M(D):t(D)}function H(D){return D===62?(e.consume(D),e.exit("htmlTextData"),e.exit("htmlText"),n):t(D)}function Y(D){return e.exit("htmlTextData"),e.enter("lineEnding"),e.consume(D),e.exit("lineEnding"),te}function te(D){return bn(D)?pn(e,$,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(D):$(D)}function $(D){return e.enter("htmlTextData"),a(D)}}const k6={name:"labelEnd",resolveAll:y7n,resolveTo:x7n,tokenize:w7n},g7n={tokenize:k7n},v7n={tokenize:S7n},b7n={tokenize:C7n};function y7n(e){let n=-1;const t=[];for(;++n=3&&(u===null||Et(u))?(e.exit("thematicBreak"),n(u)):t(u)}function l(u){return u===s?(e.consume(u),r++,l):(e.exit("thematicBreakSequence"),bn(u)?pn(e,o,"whitespace")(u):o(u))}}const Ci={continuation:{tokenize:D7n},exit:I7n,name:"list",tokenize:O7n},R7n={partial:!0,tokenize:$7n},M7n={partial:!0,tokenize:L7n};function O7n(e,n,t){const r=this,s=r.events[r.events.length-1];let i=s&&s[1].type==="linePrefix"?s[2].sliceSerialize(s[1],!0).length:0,a=0;return o;function o(m){const x=r.containerState.type||(m===42||m===43||m===45?"listUnordered":"listOrdered");if(x==="listUnordered"?!r.containerState.marker||m===r.containerState.marker:Y3(m)){if(r.containerState.type||(r.containerState.type=x,e.enter(x,{_container:!0})),x==="listUnordered")return e.enter("listItemPrefix"),m===42||m===45?e.check(V1,t,u)(m):u(m);if(!r.interrupt||m===49)return e.enter("listItemPrefix"),e.enter("listItemValue"),l(m)}return t(m)}function l(m){return Y3(m)&&++a<10?(e.consume(m),l):(!r.interrupt||a<2)&&(r.containerState.marker?m===r.containerState.marker:m===41||m===46)?(e.exit("listItemValue"),u(m)):t(m)}function u(m){return e.enter("listItemMarker"),e.consume(m),e.exit("listItemMarker"),r.containerState.marker=r.containerState.marker||m,e.check(wm,r.interrupt?t:h,e.attempt(R7n,p,_))}function h(m){return r.containerState.initialBlankLine=!0,i++,p(m)}function _(m){return bn(m)?(e.enter("listItemPrefixWhitespace"),e.consume(m),e.exit("listItemPrefixWhitespace"),p):t(m)}function p(m){return r.containerState.size=i+r.sliceSerialize(e.exit("listItemPrefix"),!0).length,n(m)}}function D7n(e,n,t){const r=this;return r.containerState._closeFlow=void 0,e.check(wm,s,i);function s(o){return r.containerState.furtherBlankLines=r.containerState.furtherBlankLines||r.containerState.initialBlankLine,pn(e,n,"listItemIndent",r.containerState.size+1)(o)}function i(o){return r.containerState.furtherBlankLines||!bn(o)?(r.containerState.furtherBlankLines=void 0,r.containerState.initialBlankLine=void 0,a(o)):(r.containerState.furtherBlankLines=void 0,r.containerState.initialBlankLine=void 0,e.attempt(M7n,n,a)(o))}function a(o){return r.containerState._closeFlow=!0,r.interrupt=void 0,pn(e,e.attempt(Ci,n,t),"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(o)}}function L7n(e,n,t){const r=this;return pn(e,s,"listItemIndent",r.containerState.size+1);function s(i){const a=r.events[r.events.length-1];return a&&a[1].type==="listItemIndent"&&a[2].sliceSerialize(a[1],!0).length===r.containerState.size?n(i):t(i)}}function I7n(e){e.exit(this.containerState.type)}function $7n(e,n,t){const r=this;return pn(e,s,"listItemPrefixWhitespace",r.parser.constructs.disable.null.includes("codeIndented")?void 0:5);function s(i){const a=r.events[r.events.length-1];return!bn(i)&&a&&a[1].type==="listItemPrefixWhitespace"?n(i):t(i)}}const NT={name:"setextUnderline",resolveTo:B7n,tokenize:P7n};function B7n(e,n){let t=e.length,r,s,i;for(;t--;)if(e[t][0]==="enter"){if(e[t][1].type==="content"){r=t;break}e[t][1].type==="paragraph"&&(s=t)}else e[t][1].type==="content"&&e.splice(t,1),!i&&e[t][1].type==="definition"&&(i=t);const a={type:"setextHeading",start:{...e[r][1].start},end:{...e[e.length-1][1].end}};return e[s][1].type="setextHeadingText",i?(e.splice(s,0,["enter",a,n]),e.splice(i+1,0,["exit",e[r][1],n]),e[r][1].end={...e[i][1].end}):e[r][1]=a,e.push(["exit",a,n]),e}function P7n(e,n,t){const r=this;let s;return i;function i(u){let h=r.events.length,_;for(;h--;)if(r.events[h][1].type!=="lineEnding"&&r.events[h][1].type!=="linePrefix"&&r.events[h][1].type!=="content"){_=r.events[h][1].type==="paragraph";break}return!r.parser.lazy[r.now().line]&&(r.interrupt||_)?(e.enter("setextHeadingLine"),s=u,a(u)):t(u)}function a(u){return e.enter("setextHeadingLineSequence"),o(u)}function o(u){return u===s?(e.consume(u),o):(e.exit("setextHeadingLineSequence"),bn(u)?pn(e,l,"lineSuffix")(u):l(u))}function l(u){return u===null||Et(u)?(e.exit("setextHeadingLine"),n(u)):t(u)}}const F7n={tokenize:H7n};function H7n(e){const n=this,t=e.attempt(wm,r,e.attempt(this.parser.constructs.flowInitial,s,pn(e,e.attempt(this.parser.constructs.flow,s,e.attempt(K6n,s)),"linePrefix")));return t;function r(i){if(i===null){e.consume(i);return}return e.enter("lineEndingBlank"),e.consume(i),e.exit("lineEndingBlank"),n.currentConstruct=void 0,t}function s(i){if(i===null){e.consume(i);return}return e.enter("lineEnding"),e.consume(i),e.exit("lineEnding"),n.currentConstruct=void 0,t}}const q7n={resolveAll:YB()},U7n=XB("string"),G7n=XB("text");function XB(e){return{resolveAll:YB(e==="text"?V7n:void 0),tokenize:n};function n(t){const r=this,s=this.parser.constructs[e],i=t.attempt(s,a,o);return a;function a(h){return u(h)?i(h):o(h)}function o(h){if(h===null){t.consume(h);return}return t.enter("data"),t.consume(h),l}function l(h){return u(h)?(t.exit("data"),i(h)):(t.consume(h),l)}function u(h){if(h===null)return!0;const _=s[h];let p=-1;if(_)for(;++p<_.length;){const m=_[p];if(!m.previous||m.previous.call(r,r.previous))return!0}return!1}}}function YB(e){return n;function n(t,r){let s=-1,i;for(;++s<=t.length;)i===void 0?t[s]&&t[s][1].type==="data"&&(i=s,s++):(!t[s]||t[s][1].type!=="data")&&(s!==i+2&&(t[i][1].end=t[s-1][1].end,t.splice(i+2,s-i-2),s=i+2),i=void 0);return e?e(t,r):t}}function V7n(e,n){let t=0;for(;++t<=e.length;)if((t===e.length||e[t][1].type==="lineEnding")&&e[t-1][1].type==="data"){const r=e[t-1][1],s=n.sliceStream(r);let i=s.length,a=-1,o=0,l;for(;i--;){const u=s[i];if(typeof u=="string"){for(a=u.length;u.charCodeAt(a-1)===32;)o++,a--;if(a)break;a=-1}else if(u===-2)l=!0,o++;else if(u!==-1){i++;break}}if(n._contentTypeTextTrailing&&t===e.length&&(o=0),o){const u={type:t===e.length||l||o<2?"lineSuffix":"hardBreakTrailing",start:{_bufferIndex:i?a:r.start._bufferIndex+a,_index:r.start._index+i,line:r.end.line,column:r.end.column-o,offset:r.end.offset-o},end:{...r.end}};r.end={...u.start},r.start.offset===r.end.offset?Object.assign(r,u):(e.splice(t,0,["enter",u,n],["exit",u,n]),t+=2)}t++}return e}const K7n={42:Ci,43:Ci,45:Ci,48:Ci,49:Ci,50:Ci,51:Ci,52:Ci,53:Ci,54:Ci,55:Ci,56:Ci,57:Ci,62:qB},W7n={91:Z6n},Q7n={[-2]:Sw,[-1]:Sw,32:Sw},X7n={35:s7n,42:V1,45:[NT,V1],60:l7n,61:NT,95:V1,96:CT,126:CT},Y7n={38:GB,92:UB},Z7n={[-5]:Cw,[-4]:Cw,[-3]:Cw,33:E7n,38:GB,42:r5,60:[z6n,p7n],91:z7n,92:[n7n,UB],93:k6,95:r5,96:F6n},J7n={null:[r5,q7n]},eCn={null:[42,95]},tCn={null:[]},nCn=Object.freeze(Object.defineProperty({__proto__:null,attentionMarkers:eCn,contentInitial:W7n,disable:tCn,document:K7n,flow:X7n,flowInitial:Q7n,insideSpan:J7n,string:Y7n,text:Z7n},Symbol.toStringTag,{value:"Module"}));function rCn(e,n,t){let r={_bufferIndex:-1,_index:0,line:t&&t.line||1,column:t&&t.column||1,offset:t&&t.offset||0};const s={},i=[];let a=[],o=[];const l={attempt:A(E),check:A(N),consume:w,enter:y,exit:C,interrupt:A(N,{interrupt:!0})},u={code:null,containerState:{},defineSkip:k,events:[],now:x,parser:e,previous:null,sliceSerialize:p,sliceStream:m,write:_};let h=n.tokenize.call(u,l);return n.resolveAll&&i.push(n),u;function _(I){return a=za(a,I),v(),a[a.length-1]!==null?[]:(j(n,0),u.events=ry(i,u.events,u),u.events)}function p(I,B){return iCn(m(I),B)}function m(I){return sCn(a,I)}function x(){const{_bufferIndex:I,_index:B,line:q,column:U,offset:W}=r;return{_bufferIndex:I,_index:B,line:q,column:U,offset:W}}function k(I){s[I.line]=I.column,L()}function v(){let I;for(;r._index-1){const o=a[0];typeof o=="string"?a[0]=o.slice(r):a.shift()}i>0&&a.push(e[s].slice(0,i))}return a}function iCn(e,n){let t=-1;const r=[];let s;for(;++t0){const Kt=qe.tokenStack[qe.tokenStack.length-1];(Kt[1]||jT).call(qe,void 0,Kt[0])}for(je.position={start:Vc(ye.length>0?ye[0][1].start:{line:1,column:1,offset:0}),end:Vc(ye.length>0?ye[ye.length-2][1].end:{line:1,column:1,offset:0})},nt=-1;++nt0&&(Ge(this,cu,ue(this,cu)+t.slice(0,r.commitIndex)),t=t.slice(r.commitIndex),r=TT(t)),ue(this,cu)+q7n(t,r)}}cu=new WeakMap;const R7n=new Set(["*","**","_","__"]);function TT(e){const n={commitIndex:0,delims:[],exclusive:null,links:[],pendingDelim:null,pendingHtml:null};for(let t=0;t0){const Kt=qe.tokenStack[qe.tokenStack.length-1];(Kt[1]||jT).call(qe,void 0,Kt[0])}for(je.position={start:Kc(ye.length>0?ye[0][1].start:{line:1,column:1,offset:0}),end:Kc(ye.length>0?ye[ye.length-2][1].end:{line:1,column:1,offset:0})},nt=-1;++nt0&&(Ge(this,uu,ue(this,uu)+t.slice(0,r.commitIndex)),t=t.slice(r.commitIndex),r=TT(t)),ue(this,uu)+NCn(t,r)}}uu=new WeakMap;const mCn=new Set(["*","**","_","__"]);function TT(e){const n={commitIndex:0,delims:[],exclusive:null,links:[],pendingDelim:null,pendingHtml:null};for(let t=0;tt){t=s-1;continue}if(n.exclusive)continue;if(H7n(n)){AT(n,t,r);continue}const i=I7n(n,e,t);if(i>t){t=i-1;continue}const a=$7n(n,e,t);if(a>t){t=a-1;continue}lo(e,t)||AT(n,t,r)}return n}function M7n(e,n,t){const r=n[t];return r==="`"?O7n(e,n,t):r==="$"?D7n(e,n,t):r==="~"?L7n(e,n,t):t}function O7n(e,n,t){const r=S6(n,t),s="`".repeat(r),i=e.exclusive;return(i==null?void 0:i.kind)==="fence"?(i.token[0]==="`"&&Fv(n,t)&&!lo(n,t)&&r>=i.token.length&&(e.exclusive=null),t+r):(i==null?void 0:i.kind)==="code"?(!lo(n,t)&&r>=i.token.length&&(e.exclusive=null),t+r):i||lo(n,t)?t+r:r>=3&&Fv(n,t)?(e.exclusive={kind:"fence",start:t,token:s},t+r):(e.exclusive={kind:"code",start:t,token:s},t+r)}function D7n(e,n,t){const r=S6(n,t),s=e.exclusive;return(s==null?void 0:s.kind)==="math"?(!lo(n,t)&&r>=s.token.length&&(e.exclusive=null),t+r):(s||lo(n,t)||(e.exclusive={kind:"math",start:t,token:r>=2?"$$":"$"}),t+r)}function L7n(e,n,t){const r=S6(n,t),s=e.exclusive;return(s==null?void 0:s.kind)==="fence"&&s.token[0]==="~"?(Fv(n,t)&&!lo(n,t)&&r>=s.token.length&&(e.exclusive=null),t+r):s||r<3||!Fv(n,t)||lo(n,t)?t:(e.exclusive={kind:"fence",start:t,token:"~".repeat(r)},t+r)}function I7n(e,n,t){if(n[t]!=="<"||lo(n,t))return t;const r=n[t+1];if(r!==void 0&&!eP(r))return t;e.pendingHtml=t;for(let s=t+1;s"||n[s]===` -`)return e.pendingHtml=null,s+1;return n.length}function $7n(e,n,t){const r=B7n(n,t);if(!r)return t;if(lo(n,t))return t+r.length;const s=e.delims.findLastIndex(i=>i.token===r);return s!==-1?(e.delims.splice(s,1),t+r.length):t+r.length===n.length?(e.pendingDelim={start:t,token:r},t+r.length):(P7n(n,t,r)&&e.delims.push({start:t,token:r}),t+r.length)}function B7n(e,n){const t=e[n];if(t==="*")return e.startsWith("***",n)?"***":e.startsWith("**",n)?"**":"*";if(t==="_")return e.startsWith("__",n)?"__":"_";if(t==="~"&&e.startsWith("~~",n))return"~~"}function P7n(e,n,t){const r=e[n+t.length];if(!r||/\s/.test(r))return!1;const s=e[n-1];return!OT(s)||!OT(r)}function AT(e,n,t){const r=e.links.at(-1);if(t==="["){e.links.push({phase:"text",start:n});return}if(t==="]"&&(r==null?void 0:r.phase)==="text"){e.links[e.links.length-1]={phase:"url_wait",start:r.start,textEnd:n};return}if(t==="("&&(r==null?void 0:r.phase)==="url_wait"){e.links[e.links.length-1]={phase:"url",start:r.start,textEnd:r.textEnd,parenDepth:0};return}if(t==="("&&(r==null?void 0:r.phase)==="url"){r.parenDepth+=1;return}if(t===")"&&(r==null?void 0:r.phase)==="url"){if(r.parenDepth>0){r.parenDepth-=1;return}e.links.pop()}}function F7n(e){var n,t;e.delims.length=0,e.links.length=0,((n=e.exclusive)==null?void 0:n.kind)!=="fence"&&(((t=e.exclusive)==null?void 0:t.kind)==="math"&&e.exclusive.token==="$$"||(e.exclusive=null))}function H7n(e){var t;const n=(t=e.links.at(-1))==null?void 0:t.phase;return n==="url_wait"||n==="url"}function q7n(e,n){n.pendingHtml!==null&&(e=e.slice(0,V7n(e,n.pendingHtml)));const t=n.links.at(-1);if(t)return jo(U7n(e,t));const r=G7n(n);if(r)return jo(fd(e,r));const s=Q7n(n);return s?s.kind==="delim"?jo(s5(e,s.start,s.token.length)?ZB(e,s.token):e.slice(0,s.start)):s5(e,s.start,s.token.length)?s.kind==="fence"?jo(e):s.kind==="code"?jo(fd(e,s.token)):s.token==="$$"?jo(fd(e,(e.endsWith(` +`){CCn(n),n.exclusive||(n.commitIndex=t+1);continue}const s=gCn(n,e,t);if(s>t){t=s-1;continue}if(n.exclusive)continue;if(ECn(n)){AT(n,t,r);continue}const i=xCn(n,e,t);if(i>t){t=i-1;continue}const a=wCn(n,e,t);if(a>t){t=a-1;continue}lo(e,t)||AT(n,t,r)}return n}function gCn(e,n,t){const r=n[t];return r==="`"?vCn(e,n,t):r==="$"?bCn(e,n,t):r==="~"?yCn(e,n,t):t}function vCn(e,n,t){const r=S6(n,t),s="`".repeat(r),i=e.exclusive;return(i==null?void 0:i.kind)==="fence"?(i.token[0]==="`"&&Fv(n,t)&&!lo(n,t)&&r>=i.token.length&&(e.exclusive=null),t+r):(i==null?void 0:i.kind)==="code"?(!lo(n,t)&&r>=i.token.length&&(e.exclusive=null),t+r):i||lo(n,t)?t+r:r>=3&&Fv(n,t)?(e.exclusive={kind:"fence",start:t,token:s},t+r):(e.exclusive={kind:"code",start:t,token:s},t+r)}function bCn(e,n,t){const r=S6(n,t),s=e.exclusive;return(s==null?void 0:s.kind)==="math"?(!lo(n,t)&&r>=s.token.length&&(e.exclusive=null),t+r):(s||lo(n,t)||(e.exclusive={kind:"math",start:t,token:r>=2?"$$":"$"}),t+r)}function yCn(e,n,t){const r=S6(n,t),s=e.exclusive;return(s==null?void 0:s.kind)==="fence"&&s.token[0]==="~"?(Fv(n,t)&&!lo(n,t)&&r>=s.token.length&&(e.exclusive=null),t+r):s||r<3||!Fv(n,t)||lo(n,t)?t:(e.exclusive={kind:"fence",start:t,token:"~".repeat(r)},t+r)}function xCn(e,n,t){if(n[t]!=="<"||lo(n,t))return t;const r=n[t+1];if(r!==void 0&&!nP(r))return t;e.pendingHtml=t;for(let s=t+1;s"||n[s]===` +`)return e.pendingHtml=null,s+1;return n.length}function wCn(e,n,t){const r=kCn(n,t);if(!r)return t;if(lo(n,t))return t+r.length;const s=e.delims.findLastIndex(i=>i.token===r);return s!==-1?(e.delims.splice(s,1),t+r.length):t+r.length===n.length?(e.pendingDelim={start:t,token:r},t+r.length):(SCn(n,t,r)&&e.delims.push({start:t,token:r}),t+r.length)}function kCn(e,n){const t=e[n];if(t==="*")return e.startsWith("***",n)?"***":e.startsWith("**",n)?"**":"*";if(t==="_")return e.startsWith("__",n)?"__":"_";if(t==="~"&&e.startsWith("~~",n))return"~~"}function SCn(e,n,t){const r=e[n+t.length];if(!r||/\s/.test(r))return!1;const s=e[n-1];return!OT(s)||!OT(r)}function AT(e,n,t){const r=e.links.at(-1);if(t==="["){e.links.push({phase:"text",start:n});return}if(t==="]"&&(r==null?void 0:r.phase)==="text"){e.links[e.links.length-1]={phase:"url_wait",start:r.start,textEnd:n};return}if(t==="("&&(r==null?void 0:r.phase)==="url_wait"){e.links[e.links.length-1]={phase:"url",start:r.start,textEnd:r.textEnd,parenDepth:0};return}if(t==="("&&(r==null?void 0:r.phase)==="url"){r.parenDepth+=1;return}if(t===")"&&(r==null?void 0:r.phase)==="url"){if(r.parenDepth>0){r.parenDepth-=1;return}e.links.pop()}}function CCn(e){var n,t;e.delims.length=0,e.links.length=0,((n=e.exclusive)==null?void 0:n.kind)!=="fence"&&(((t=e.exclusive)==null?void 0:t.kind)==="math"&&e.exclusive.token==="$$"||(e.exclusive=null))}function ECn(e){var t;const n=(t=e.links.at(-1))==null?void 0:t.phase;return n==="url_wait"||n==="url"}function NCn(e,n){n.pendingHtml!==null&&(e=e.slice(0,TCn(e,n.pendingHtml)));const t=n.links.at(-1);if(t)return jo(zCn(e,t));const r=jCn(n);if(r)return jo(fd(e,r));const s=MCn(n);return s?s.kind==="delim"?jo(s5(e,s.start,s.token.length)?eP(e,s.token):e.slice(0,s.start)):s5(e,s.start,s.token.length)?s.kind==="fence"?jo(e):s.kind==="code"?jo(fd(e,s.token)):s.token==="$$"?jo(fd(e,(e.endsWith(` `)?"":` -`)+"$$")):/\s/.test(e[e.length-1]??"")?jo(e):jo(fd(e,"$")):jo(s.kind==="fence"?e:e.slice(0,s.start)):jo(n.pendingDelim?e.slice(0,n.pendingDelim.start):e)}function U7n(e,n){const t=e.slice(0,n.start);if(n.phase==="text")return s5(e,n.start,1)?t+e.slice(n.start+1):t;const r=e.slice(n.start+1,n.textEnd);return n.phase==="url_wait"?t+r+e.slice(n.textEnd+1):t+r}function G7n(e){const n=[];if(e.exclusive){if(e.exclusive.kind!=="code")return;n.push(e.exclusive.token)}for(let t=e.delims.length-1;t>=0;t--){const r=e.delims[t].token;if(!R7n.has(r))return;n.push(r)}if(!(n.length<2))return n.join("")}function V7n(e,n){let t=n,r=n;for(;r>0;){const s=e.lastIndexOf("<",r-1);if(s===-1||!K7n(e,s,r))break;t=s,r=s}return t}function K7n(e,n,t){if(e[t-1]!==">"||lo(e,n))return!1;const r=e[n+1];if(r!==void 0&&!eP(r))return!1;for(let s=n+1;s"||i===` +`)+"$$")):/\s/.test(e[e.length-1]??"")?jo(e):jo(fd(e,"$")):jo(s.kind==="fence"?e:e.slice(0,s.start)):jo(n.pendingDelim?e.slice(0,n.pendingDelim.start):e)}function zCn(e,n){const t=e.slice(0,n.start);if(n.phase==="text")return s5(e,n.start,1)?t+e.slice(n.start+1):t;const r=e.slice(n.start+1,n.textEnd);return n.phase==="url_wait"?t+r+e.slice(n.textEnd+1):t+r}function jCn(e){const n=[];if(e.exclusive){if(e.exclusive.kind!=="code")return;n.push(e.exclusive.token)}for(let t=e.delims.length-1;t>=0;t--){const r=e.delims[t].token;if(!mCn.has(r))return;n.push(r)}if(!(n.length<2))return n.join("")}function TCn(e,n){let t=n,r=n;for(;r>0;){const s=e.lastIndexOf("<",r-1);if(s===-1||!ACn(e,s,r))break;t=s,r=s}return t}function ACn(e,n,t){if(e[t-1]!==">"||lo(e,n))return!1;const r=e[n+1];if(r!==void 0&&!nP(r))return!1;for(let s=n+1;s"||i===` `)return!1}return!0}function jo(e){var v;const n=e.lastIndexOf(` `),t=n===-1?0:n+2,r=e.slice(0,t),s=e.slice(t),i=s.indexOf(` -`),a=i===-1?s:s.slice(0,i),o=(v=a.match(/^( *)\|/))==null?void 0:v[1];if(o===void 0)return e;if(RT(a)<2&&!X7n(a,o))return r;const l=a.trimEnd().endsWith("|")?a:ZB(a," |"),u=RT(l),h=u<2?0:l.trimEnd().endsWith("|")?u-1:u;if(h===0)return e;const _=i===-1?"":s.slice(i+1),p=MT(o,Array.from({length:h},()=>"-"));if(_.length===0)return r+l+` +`),a=i===-1?s:s.slice(0,i),o=(v=a.match(/^( *)\|/))==null?void 0:v[1];if(o===void 0)return e;if(RT(a)<2&&!OCn(a,o))return r;const l=a.trimEnd().endsWith("|")?a:eP(a," |"),u=RT(l),h=u<2?0:l.trimEnd().endsWith("|")?u-1:u;if(h===0)return e;const _=i===-1?"":s.slice(i+1),p=MT(o,Array.from({length:h},()=>"-"));if(_.length===0)return r+l+` `+p;const m=_.indexOf(` -`),x=m===-1?_:_.slice(0,m),k=m===-1?"":_.slice(m);if(Y7n(x,o,h))return e;if(x.startsWith(o+"|")&&/^[ |:\-\t]*$/.test(x.slice(o.length))){const b=JB(x,o).map(w=>{const y=w.trim();if(y.length===0)return"-";let C=0;for(let N=0;N1&&y.endsWith(":")?":":"")});for(;b.length{const y=w.trim();if(y.length===0)return"-";let C=0;for(let E=0;E1&&y.endsWith(":")?":":"")});for(;b.length0;t-=1)if(e.endsWith(n.slice(0,t)))return t;return 0}function Q7n(e){const n=e.delims.at(-1);return e.exclusive&&(!n||e.exclusive.start>n.start)?e.exclusive:n?{kind:"delim",start:n.start,token:n.token}:e.exclusive}function RT(e){let n=0;for(let t=0;t0}function MT(e,n){return e+"|"+n.map(t=>` ${t} |`).join("")}function JB(e,n){const t=e.slice(n.length+1).split("|");return e.trimEnd().endsWith("|")&&t.pop(),t}function Y7n(e,n,t){if(!e.startsWith(n))return!1;const r=e.slice(n.length).trim();if(!r.startsWith("|")||!r.endsWith("|"))return!1;const s=JB(r,"").map(i=>i.trim());return s.length===t&&s.every(i=>/^:?-+:?$/.test(i))}function S6(e,n){let t=n+1;for(;tn+t}function Fv(e,n){return n===0||e[n-1]===` -`}function lo(e,n){let t=0;for(let r=n-1;r>=0&&e[r]==="\\";r--)t+=1;return t%2===1}function OT(e){return!!e&&/[A-Za-z0-9]/.test(e)}function eP(e){return!!e&&/[A-Za-z]/.test(e)}const tP=ny().use(sy);var tm,qd,Ud,j_,Gd,nm,rm,sm,T_,im,A_;class Z7n{constructor(){lt(this,tm,tP);lt(this,qd,null);lt(this,Ud,{});lt(this,j_,null);lt(this,Gd,"");lt(this,nm,[]);lt(this,rm,[]);lt(this,sm,[]);lt(this,T_,0);lt(this,im,[]);lt(this,A_,[])}reconfigure(n,t,r){ue(this,qd)!==null&&ue(this,tm)===n&&nP(ue(this,Ud),r)&&!!ue(this,j_)===t||(Ge(this,tm,n),n.attachers.some(s=>s[0]===Pv)||(n=n(),n.use(Pv),n.freeze()),Ge(this,qd,n),Ge(this,Ud,r),Ge(this,Gd,""),Ge(this,nm,[]),Ge(this,rm,[]),Ge(this,sm,[]),Ge(this,T_,0),Ge(this,im,[]),Ge(this,j_,t?new A7n:null))}update(n){ue(this,j_)&&(n=ue(this,j_).update(n));let t=ue(this,Gd);if(n===t)return ue(this,A_);const r=ue(this,nm),s=J7n(n,t);let i=r.length-1;for(;i>=0&&!(s>=r[i]);i-=1);let a=r[i]??0;i===-1&&(i=0);const o=i_(ue(this,qd)),l=ue(this,rm),u=l.slice(i).some(E=>E.some(i5));let h=o.parse(n.slice(a)),_=h.children.map(E=>i_(i_(E.position).start.offset)+a);Ge(this,Gd,n),hw(r.length===l.length),r.splice(i,r.length-i,..._);{const E=Ew(h,_,a);hw(E.length===_.length),l.splice(i,l.length-i,...E)}if(u||i5(h)){i=0,a=0,h=o.parse(n),_=h.children.map(T=>i_(i_(T.position).start.offset)+a),r.splice(0,r.length,..._);const E=Ew(h,_,a);hw(E.length===_.length),l.splice(0,l.length,...E)}const p=Ew(o.runSync(h),_,a),m=ue(this,sm),x=ue(this,im),k=ue(this,A_),v=x.length;let b=null,w=0;for(;wv&&(m.length=x.length=r.length);for(let E=r.length=C?M=v-(r.length-T):T=v){m[T]=String(ue(this,T_)),Ge(this,T_,ue(this,T_)+1),x[T]=null,b&&(b[T]=void 0);continue}m[T]=m[M]??String(vp(this,T_)._++),x[T]=x[M]??null,b&&(b[T]=k[M])}r.length[]);let s=0;for(const a of e.children){const o=(i=a.position)==null?void 0:i.start.offset;if(o!==void 0){for(;s+1s||t!==-1&&n>t||r!==-1&&n>r||aCn.test(e.slice(0,n))?e:""}const zw={html:"http://www.w3.org/1999/xhtml",svg:"http://www.w3.org/2000/svg"};function fCn(e,n){return sP(e,{})||{type:"root",children:[]}}function sP(e,n){const t=dCn(e,n);return t&&n.afterTransform&&n.afterTransform(e,t),t}function dCn(e,n){switch(e.nodeType){case 1:return gCn(e,n);case 3:return pCn(e);case 8:return mCn(e);case 9:return $T(e,n);case 10:return hCn();case 11:return $T(e,n);default:return}}function $T(e,n){return{type:"root",children:iP(e,n)}}function hCn(){return{type:"doctype"}}function pCn(e){return{type:"text",value:e.nodeValue||""}}function mCn(e){return{type:"comment",value:e.nodeValue||""}}function gCn(e,n){const t=e.namespaceURI,r=t===zw.svg?Uxn:c$,s=t===zw.html?e.tagName.toLowerCase():e.tagName,i=t===zw.html&&s==="template"?e.content:e,a=e.getAttributeNames(),o={};let l=-1;for(;++lu&&(u=h):h&&(u!==void 0&&u>-1&&l.push(` -`.repeat(u)||" "),u=-1,l.push(h))}return l.join("")}function oP(e,n,t){return e.type==="element"?NCn(e,n,t):e.type==="text"?t.whitespace==="normal"?lP(e,t):zCn(e):[]}function NCn(e,n,t){const r=cP(e,t),s=e.children||[];let i=-1,a=[];if(CCn(e))return a;let o,l;for(a5(e)||qT(e)&&BT(n,e,qT)?l=` -`:SCn(e)?(o=2,l=2):aP(e)&&(o=1,l=1);++i15?u="…"+o.slice(s-15,s):u=o.slice(0,s);var h;i+15e.replace(MCn,"-$1").toLowerCase(),DCn={"&":"&",">":">","<":"<",'"':""","'":"'"},LCn=/[&><"']/g,Ks=e=>String(e).replace(LCn,n=>DCn[n]),K1=e=>e.type==="ordgroup"||e.type==="color"?e.body.length===1?K1(e.body[0]):e:e.type==="font"?K1(e.body):e,ICn=new Set(["mathord","textord","atom"]),ac=e=>ICn.has(K1(e).type),$Cn=e=>{var n=/^[\x00-\x20]*([^\\/#?]*?)(:|�*58|�*3a|&colon)/i.exec(e);return n?n[2]!==":"||!/^[a-zA-Z][a-zA-Z0-9+\-.]*$/.test(n[1])?null:n[1].toLowerCase():"_relative"},o5={displayMode:{type:"boolean",description:"Render math in display mode, which puts the math in display style (so \\int and \\sum are large, for example), and centers the math on the page on its own line.",cli:"-d, --display-mode"},output:{type:{enum:["htmlAndMathml","html","mathml"]},description:"Determines the markup language of the output.",cli:"-F, --format "},leqno:{type:"boolean",description:"Render display math in leqno style (left-justified tags)."},fleqn:{type:"boolean",description:"Render display math flush left."},throwOnError:{type:"boolean",default:!0,cli:"-t, --no-throw-on-error",cliDescription:"Render errors (in the color given by --error-color) instead of throwing a ParseError exception when encountering an error."},errorColor:{type:"string",default:"#cc0000",cli:"-c, --error-color ",cliDescription:"A color string given in the format 'rgb' or 'rrggbb' (no #). This option determines the color of errors rendered by the -t option.",cliProcessor:e=>"#"+e},macros:{type:"object",cli:"-m, --macro ",cliDescription:"Define custom macro of the form '\\foo:expansion' (use multiple -m arguments for multiple macros).",cliDefault:[],cliProcessor:(e,n)=>(n.push(e),n)},minRuleThickness:{type:"number",description:"Specifies a minimum thickness, in ems, for fraction lines, `\\sqrt` top lines, `{array}` vertical lines, `\\hline`, `\\hdashline`, `\\underline`, `\\overline`, and the borders of `\\fbox`, `\\boxed`, and `\\fcolorbox`.",processor:e=>Math.max(0,e),cli:"--min-rule-thickness ",cliProcessor:parseFloat},colorIsTextColor:{type:"boolean",description:"Makes \\color behave like LaTeX's 2-argument \\textcolor, instead of LaTeX's one-argument \\color mode change.",cli:"-b, --color-is-text-color"},strict:{type:[{enum:["warn","ignore","error"]},"boolean","function"],description:"Turn on strict / LaTeX faithfulness mode, which throws an error if the input uses features that are not supported by LaTeX.",cli:"-S, --strict",cliDefault:!1},trust:{type:["boolean","function"],description:"Trust the input, enabling all HTML features such as \\url.",cli:"-T, --trust"},maxSize:{type:"number",default:1/0,description:"If non-zero, all user-specified sizes, e.g. in \\rule{500em}{500em}, will be capped to maxSize ems. Otherwise, elements and spaces can be arbitrarily large",processor:e=>Math.max(0,e),cli:"-s, --max-size ",cliProcessor:parseInt},maxExpand:{type:"number",default:1e3,description:"Limit the number of macro expansions to the specified number, to prevent e.g. infinite macro loops. If set to Infinity, the macro expander will try to fully expand as in LaTeX.",processor:e=>Math.max(0,e),cli:"-e, --max-expand ",cliProcessor:e=>e==="Infinity"?1/0:parseInt(e)},globalGroup:{type:"boolean",cli:!1}};function BCn(e){if(typeof e!="string")return e.enum[0];switch(e){case"boolean":return!1;case"string":return"";case"number":return 0;case"object":return{};default:throw new Error("Unexpected schema type; settings must declare an explicit default.")}}function PCn(e){if(e.default!==void 0)return e.default;var n=Array.isArray(e.type)?e.type[0]:e.type;return BCn(n)}function FCn(e,n,t,r){var s=t[n];e[n]=s!==void 0?r.processor?r.processor(s):s:PCn(r)}class E6{constructor(n){n===void 0&&(n={}),this.displayMode=void 0,this.output=void 0,this.leqno=void 0,this.fleqn=void 0,this.throwOnError=void 0,this.errorColor=void 0,this.macros=void 0,this.minRuleThickness=void 0,this.colorIsTextColor=void 0,this.strict=void 0,this.trust=void 0,this.maxSize=void 0,this.maxExpand=void 0,this.globalGroup=void 0,n=n||{};for(var t of Object.keys(o5)){var r=o5[t];r&&FCn(this,t,n,r)}}reportNonstrict(n,t,r){var s=this.strict;if(typeof s=="function"&&(s=s(n,t,r)),!(!s||s==="ignore")){if(s===!0||s==="error")throw new Ze("LaTeX-incompatible input and strict mode is set to 'error': "+(t+" ["+n+"]"),r);s==="warn"?typeof console<"u"&&console.warn("LaTeX-incompatible input and strict mode is set to 'warn': "+(t+" ["+n+"]")):typeof console<"u"&&console.warn("LaTeX-incompatible input and strict mode is set to "+("unrecognized '"+s+"': "+t+" ["+n+"]"))}}useStrictBehavior(n,t,r){var s=this.strict;if(typeof s=="function")try{s=s(n,t,r)}catch{s="error"}return!s||s==="ignore"?!1:s===!0||s==="error"?!0:s==="warn"?(typeof console<"u"&&console.warn("LaTeX-incompatible input and strict mode is set to 'warn': "+(t+" ["+n+"]")),!1):(typeof console<"u"&&console.warn("LaTeX-incompatible input and strict mode is set to "+("unrecognized '"+s+"': "+t+" ["+n+"]")),!1)}isTrusted(n){if("url"in n&&n.url&&!n.protocol){var t=$Cn(n.url);if(t==null)return!1;n.protocol=t}var r=typeof this.trust=="function"?this.trust(n):this.trust;return!!r}}class Kc{constructor(n,t,r){this.id=void 0,this.size=void 0,this.cramped=void 0,this.id=n,this.size=t,this.cramped=r}sup(){return Io[HCn[this.id]]}sub(){return Io[qCn[this.id]]}fracNum(){return Io[UCn[this.id]]}fracDen(){return Io[GCn[this.id]]}cramp(){return Io[VCn[this.id]]}text(){return Io[KCn[this.id]]}isTight(){return this.size>=2}}var N6=0,Hv=1,wd=2,ec=3,A0=4,ja=5,ih=6,ui=7,Io=[new Kc(N6,0,!1),new Kc(Hv,0,!0),new Kc(wd,1,!1),new Kc(ec,1,!0),new Kc(A0,2,!1),new Kc(ja,2,!0),new Kc(ih,3,!1),new Kc(ui,3,!0)],HCn=[A0,ja,A0,ja,ih,ui,ih,ui],qCn=[ja,ja,ja,ja,ui,ui,ui,ui],UCn=[wd,ec,A0,ja,ih,ui,ih,ui],GCn=[ec,ec,ja,ja,ui,ui,ui,ui],VCn=[Hv,Hv,ec,ec,ja,ja,ui,ui],KCn=[N6,Hv,wd,ec,wd,ec,wd,ec],en={DISPLAY:Io[N6],TEXT:Io[wd],SCRIPT:Io[A0],SCRIPTSCRIPT:Io[ih]},l5=[{name:"latin",blocks:[[256,591],[768,879]]},{name:"cyrillic",blocks:[[1024,1279]]},{name:"armenian",blocks:[[1328,1423]]},{name:"brahmic",blocks:[[2304,4255]]},{name:"georgian",blocks:[[4256,4351]]},{name:"cjk",blocks:[[12288,12543],[19968,40879],[65280,65376]]},{name:"hangul",blocks:[[44032,55215]]}];function WCn(e){for(var n=0;n=s[0]&&e<=s[1])return t.name}return null}var W1=[];l5.forEach(e=>e.blocks.forEach(n=>W1.push(...n)));function uP(e){for(var n=0;n=W1[n]&&e<=W1[n+1])return!0;return!1}var gs=e=>e+" "+e,Jf=80,QCn=function(n,t){return"M95,"+(622+n+t)+` +`+_}function fd(e,n){return e+n.slice(RCn(e,n))}function eP(e,n){var s;const t=(s=e.match(/[^\S\n]+$/))==null?void 0:s[0];if(!t)return fd(e,n);const r=e.slice(0,-t.length);return fd(r,n)+t}function RCn(e,n){for(let t=Math.min(e.length,n.length);t>0;t-=1)if(e.endsWith(n.slice(0,t)))return t;return 0}function MCn(e){const n=e.delims.at(-1);return e.exclusive&&(!n||e.exclusive.start>n.start)?e.exclusive:n?{kind:"delim",start:n.start,token:n.token}:e.exclusive}function RT(e){let n=0;for(let t=0;t0}function MT(e,n){return e+"|"+n.map(t=>` ${t} |`).join("")}function tP(e,n){const t=e.slice(n.length+1).split("|");return e.trimEnd().endsWith("|")&&t.pop(),t}function DCn(e,n,t){if(!e.startsWith(n))return!1;const r=e.slice(n.length).trim();if(!r.startsWith("|")||!r.endsWith("|"))return!1;const s=tP(r,"").map(i=>i.trim());return s.length===t&&s.every(i=>/^:?-+:?$/.test(i))}function S6(e,n){let t=n+1;for(;tn+t}function Fv(e,n){return n===0||e[n-1]===` +`}function lo(e,n){let t=0;for(let r=n-1;r>=0&&e[r]==="\\";r--)t+=1;return t%2===1}function OT(e){return!!e&&/[A-Za-z0-9]/.test(e)}function nP(e){return!!e&&/[A-Za-z]/.test(e)}const rP=ny().use(sy);var tm,qd,Ud,j_,Gd,nm,rm,sm,T_,im,A_;class LCn{constructor(){lt(this,tm,rP);lt(this,qd,null);lt(this,Ud,{});lt(this,j_,null);lt(this,Gd,"");lt(this,nm,[]);lt(this,rm,[]);lt(this,sm,[]);lt(this,T_,0);lt(this,im,[]);lt(this,A_,[])}reconfigure(n,t,r){ue(this,qd)!==null&&ue(this,tm)===n&&sP(ue(this,Ud),r)&&!!ue(this,j_)===t||(Ge(this,tm,n),n.attachers.some(s=>s[0]===Pv)||(n=n(),n.use(Pv),n.freeze()),Ge(this,qd,n),Ge(this,Ud,r),Ge(this,Gd,""),Ge(this,nm,[]),Ge(this,rm,[]),Ge(this,sm,[]),Ge(this,T_,0),Ge(this,im,[]),Ge(this,j_,t?new pCn:null))}update(n){ue(this,j_)&&(n=ue(this,j_).update(n));let t=ue(this,Gd);if(n===t)return ue(this,A_);const r=ue(this,nm),s=ICn(n,t);let i=r.length-1;for(;i>=0&&!(s>=r[i]);i-=1);let a=r[i]??0;i===-1&&(i=0);const o=i_(ue(this,qd)),l=ue(this,rm),u=l.slice(i).some(N=>N.some(i5));let h=o.parse(n.slice(a)),_=h.children.map(N=>i_(i_(N.position).start.offset)+a);Ge(this,Gd,n),hw(r.length===l.length),r.splice(i,r.length-i,..._);{const N=Ew(h,_,a);hw(N.length===_.length),l.splice(i,l.length-i,...N)}if(u||i5(h)){i=0,a=0,h=o.parse(n),_=h.children.map(A=>i_(i_(A.position).start.offset)+a),r.splice(0,r.length,..._);const N=Ew(h,_,a);hw(N.length===_.length),l.splice(0,l.length,...N)}const p=Ew(o.runSync(h),_,a),m=ue(this,sm),x=ue(this,im),k=ue(this,A_),v=x.length;let b=null,w=0;for(;wv&&(m.length=x.length=r.length);for(let N=r.length=C?M=v-(r.length-A):A=v){m[A]=String(ue(this,T_)),Ge(this,T_,ue(this,T_)+1),x[A]=null,b&&(b[A]=void 0);continue}m[A]=m[M]??String(vp(this,T_)._++),x[A]=x[M]??null,b&&(b[A]=k[M])}r.length[]);let s=0;for(const a of e.children){const o=(i=a.position)==null?void 0:i.start.offset;if(o!==void 0){for(;s+1s||t!==-1&&n>t||r!==-1&&n>r||UCn.test(e.slice(0,n))?e:""}const zw={html:"http://www.w3.org/1999/xhtml",svg:"http://www.w3.org/2000/svg"};function XCn(e,n){return aP(e,{})||{type:"root",children:[]}}function aP(e,n){const t=YCn(e,n);return t&&n.afterTransform&&n.afterTransform(e,t),t}function YCn(e,n){switch(e.nodeType){case 1:return t8n(e,n);case 3:return JCn(e);case 8:return e8n(e);case 9:return $T(e,n);case 10:return ZCn();case 11:return $T(e,n);default:return}}function $T(e,n){return{type:"root",children:oP(e,n)}}function ZCn(){return{type:"doctype"}}function JCn(e){return{type:"text",value:e.nodeValue||""}}function e8n(e){return{type:"comment",value:e.nodeValue||""}}function t8n(e,n){const t=e.namespaceURI,r=t===zw.svg?z2n:_$,s=t===zw.html?e.tagName.toLowerCase():e.tagName,i=t===zw.html&&s==="template"?e.content:e,a=e.getAttributeNames(),o={};let l=-1;for(;++lu&&(u=h):h&&(u!==void 0&&u>-1&&l.push(` +`.repeat(u)||" "),u=-1,l.push(h))}return l.join("")}function cP(e,n,t){return e.type==="element"?_8n(e,n,t):e.type==="text"?t.whitespace==="normal"?uP(e,t):f8n(e):[]}function _8n(e,n,t){const r=_P(e,t),s=e.children||[];let i=-1,a=[];if(c8n(e))return a;let o,l;for(a5(e)||qT(e)&&BT(n,e,qT)?l=` +`:l8n(e)?(o=2,l=2):lP(e)&&(o=1,l=1);++i15?u="…"+o.slice(s-15,s):u=o.slice(0,s);var h;i+15e.replace(g8n,"-$1").toLowerCase(),b8n={"&":"&",">":">","<":"<",'"':""","'":"'"},y8n=/[&><"']/g,Ks=e=>String(e).replace(y8n,n=>b8n[n]),K1=e=>e.type==="ordgroup"||e.type==="color"?e.body.length===1?K1(e.body[0]):e:e.type==="font"?K1(e.body):e,x8n=new Set(["mathord","textord","atom"]),oc=e=>x8n.has(K1(e).type),w8n=e=>{var n=/^[\x00-\x20]*([^\\/#?]*?)(:|�*58|�*3a|&colon)/i.exec(e);return n?n[2]!==":"||!/^[a-zA-Z][a-zA-Z0-9+\-.]*$/.test(n[1])?null:n[1].toLowerCase():"_relative"},o5={displayMode:{type:"boolean",description:"Render math in display mode, which puts the math in display style (so \\int and \\sum are large, for example), and centers the math on the page on its own line.",cli:"-d, --display-mode"},output:{type:{enum:["htmlAndMathml","html","mathml"]},description:"Determines the markup language of the output.",cli:"-F, --format "},leqno:{type:"boolean",description:"Render display math in leqno style (left-justified tags)."},fleqn:{type:"boolean",description:"Render display math flush left."},throwOnError:{type:"boolean",default:!0,cli:"-t, --no-throw-on-error",cliDescription:"Render errors (in the color given by --error-color) instead of throwing a ParseError exception when encountering an error."},errorColor:{type:"string",default:"#cc0000",cli:"-c, --error-color ",cliDescription:"A color string given in the format 'rgb' or 'rrggbb' (no #). This option determines the color of errors rendered by the -t option.",cliProcessor:e=>"#"+e},macros:{type:"object",cli:"-m, --macro ",cliDescription:"Define custom macro of the form '\\foo:expansion' (use multiple -m arguments for multiple macros).",cliDefault:[],cliProcessor:(e,n)=>(n.push(e),n)},minRuleThickness:{type:"number",description:"Specifies a minimum thickness, in ems, for fraction lines, `\\sqrt` top lines, `{array}` vertical lines, `\\hline`, `\\hdashline`, `\\underline`, `\\overline`, and the borders of `\\fbox`, `\\boxed`, and `\\fcolorbox`.",processor:e=>Math.max(0,e),cli:"--min-rule-thickness ",cliProcessor:parseFloat},colorIsTextColor:{type:"boolean",description:"Makes \\color behave like LaTeX's 2-argument \\textcolor, instead of LaTeX's one-argument \\color mode change.",cli:"-b, --color-is-text-color"},strict:{type:[{enum:["warn","ignore","error"]},"boolean","function"],description:"Turn on strict / LaTeX faithfulness mode, which throws an error if the input uses features that are not supported by LaTeX.",cli:"-S, --strict",cliDefault:!1},trust:{type:["boolean","function"],description:"Trust the input, enabling all HTML features such as \\url.",cli:"-T, --trust"},maxSize:{type:"number",default:1/0,description:"If non-zero, all user-specified sizes, e.g. in \\rule{500em}{500em}, will be capped to maxSize ems. Otherwise, elements and spaces can be arbitrarily large",processor:e=>Math.max(0,e),cli:"-s, --max-size ",cliProcessor:parseInt},maxExpand:{type:"number",default:1e3,description:"Limit the number of macro expansions to the specified number, to prevent e.g. infinite macro loops. If set to Infinity, the macro expander will try to fully expand as in LaTeX.",processor:e=>Math.max(0,e),cli:"-e, --max-expand ",cliProcessor:e=>e==="Infinity"?1/0:parseInt(e)},globalGroup:{type:"boolean",cli:!1}};function k8n(e){if(typeof e!="string")return e.enum[0];switch(e){case"boolean":return!1;case"string":return"";case"number":return 0;case"object":return{};default:throw new Error("Unexpected schema type; settings must declare an explicit default.")}}function S8n(e){if(e.default!==void 0)return e.default;var n=Array.isArray(e.type)?e.type[0]:e.type;return k8n(n)}function C8n(e,n,t,r){var s=t[n];e[n]=s!==void 0?r.processor?r.processor(s):s:S8n(r)}class E6{constructor(n){n===void 0&&(n={}),this.displayMode=void 0,this.output=void 0,this.leqno=void 0,this.fleqn=void 0,this.throwOnError=void 0,this.errorColor=void 0,this.macros=void 0,this.minRuleThickness=void 0,this.colorIsTextColor=void 0,this.strict=void 0,this.trust=void 0,this.maxSize=void 0,this.maxExpand=void 0,this.globalGroup=void 0,n=n||{};for(var t of Object.keys(o5)){var r=o5[t];r&&C8n(this,t,n,r)}}reportNonstrict(n,t,r){var s=this.strict;if(typeof s=="function"&&(s=s(n,t,r)),!(!s||s==="ignore")){if(s===!0||s==="error")throw new Ze("LaTeX-incompatible input and strict mode is set to 'error': "+(t+" ["+n+"]"),r);s==="warn"?typeof console<"u"&&console.warn("LaTeX-incompatible input and strict mode is set to 'warn': "+(t+" ["+n+"]")):typeof console<"u"&&console.warn("LaTeX-incompatible input and strict mode is set to "+("unrecognized '"+s+"': "+t+" ["+n+"]"))}}useStrictBehavior(n,t,r){var s=this.strict;if(typeof s=="function")try{s=s(n,t,r)}catch{s="error"}return!s||s==="ignore"?!1:s===!0||s==="error"?!0:s==="warn"?(typeof console<"u"&&console.warn("LaTeX-incompatible input and strict mode is set to 'warn': "+(t+" ["+n+"]")),!1):(typeof console<"u"&&console.warn("LaTeX-incompatible input and strict mode is set to "+("unrecognized '"+s+"': "+t+" ["+n+"]")),!1)}isTrusted(n){if("url"in n&&n.url&&!n.protocol){var t=w8n(n.url);if(t==null)return!1;n.protocol=t}var r=typeof this.trust=="function"?this.trust(n):this.trust;return!!r}}class Wc{constructor(n,t,r){this.id=void 0,this.size=void 0,this.cramped=void 0,this.id=n,this.size=t,this.cramped=r}sup(){return Io[E8n[this.id]]}sub(){return Io[N8n[this.id]]}fracNum(){return Io[z8n[this.id]]}fracDen(){return Io[j8n[this.id]]}cramp(){return Io[T8n[this.id]]}text(){return Io[A8n[this.id]]}isTight(){return this.size>=2}}var N6=0,Hv=1,wd=2,tc=3,A0=4,ja=5,ih=6,ui=7,Io=[new Wc(N6,0,!1),new Wc(Hv,0,!0),new Wc(wd,1,!1),new Wc(tc,1,!0),new Wc(A0,2,!1),new Wc(ja,2,!0),new Wc(ih,3,!1),new Wc(ui,3,!0)],E8n=[A0,ja,A0,ja,ih,ui,ih,ui],N8n=[ja,ja,ja,ja,ui,ui,ui,ui],z8n=[wd,tc,A0,ja,ih,ui,ih,ui],j8n=[tc,tc,ja,ja,ui,ui,ui,ui],T8n=[Hv,Hv,tc,tc,ja,ja,ui,ui],A8n=[N6,Hv,wd,tc,wd,tc,wd,tc],en={DISPLAY:Io[N6],TEXT:Io[wd],SCRIPT:Io[A0],SCRIPTSCRIPT:Io[ih]},l5=[{name:"latin",blocks:[[256,591],[768,879]]},{name:"cyrillic",blocks:[[1024,1279]]},{name:"armenian",blocks:[[1328,1423]]},{name:"brahmic",blocks:[[2304,4255]]},{name:"georgian",blocks:[[4256,4351]]},{name:"cjk",blocks:[[12288,12543],[19968,40879],[65280,65376]]},{name:"hangul",blocks:[[44032,55215]]}];function R8n(e){for(var n=0;n=s[0]&&e<=s[1])return t.name}return null}var W1=[];l5.forEach(e=>e.blocks.forEach(n=>W1.push(...n)));function fP(e){for(var n=0;n=W1[n]&&e<=W1[n+1])return!0;return!1}var gs=e=>e+" "+e,Jf=80,M8n=function(n,t){return"M95,"+(622+n+t)+` c-2.7,0,-7.17,-2.7,-13.5,-8c-5.8,-5.3,-9.5,-10,-9.5,-14 c0,-2,0.3,-3.3,1,-4c1.3,-2.7,23.83,-20.7,67.5,-54 c44.2,-33.3,65.8,-50.3,66.5,-51c1.3,-1.3,3,-2,5,-2c4.7,0,8.7,3.3,12,10 @@ -748,7 +748,7 @@ c5.3,-9.3,12,-14,20,-14 H400000v`+(40+n)+`H845.2724 s-225.272,467,-225.272,467s-235,486,-235,486c-2.7,4.7,-9,7,-19,7 c-6,0,-10,-1,-12,-3s-194,-422,-194,-422s-65,47,-65,47z -M`+(834+n)+" "+t+"h400000v"+(40+n)+"h-400000z"},XCn=function(n,t){return"M263,"+(601+n+t)+`c0.7,0,18,39.7,52,119 +M`+(834+n)+" "+t+"h400000v"+(40+n)+"h-400000z"},O8n=function(n,t){return"M263,"+(601+n+t)+`c0.7,0,18,39.7,52,119 c34,79.3,68.167,158.7,102.5,238c34.3,79.3,51.8,119.3,52.5,120 c340,-704.7,510.7,-1060.3,512,-1067 l`+n/2.084+" -"+n+` @@ -758,7 +758,7 @@ s-271.3,567,-271.3,567c-38.7,80.7,-84,175,-136,283c-52,108,-89.167,185.3,-111.5, c-22.3,46.7,-33.8,70.3,-34.5,71c-4.7,4.7,-12.3,7,-23,7s-12,-1,-12,-1 s-109,-253,-109,-253c-72.7,-168,-109.3,-252,-110,-252c-10.7,8,-22,16.7,-34,26 c-22,17.3,-33.3,26,-34,26s-26,-26,-26,-26s76,-59,76,-59s76,-60,76,-60z -M`+(1001+n)+" "+t+"h400000v"+(40+n)+"h-400000z"},YCn=function(n,t){return"M983 "+(10+n+t)+` +M`+(1001+n)+" "+t+"h400000v"+(40+n)+"h-400000z"},D8n=function(n,t){return"M983 "+(10+n+t)+` l`+n/3.13+" -"+n+` c4,-6.7,10,-10,18,-10 H400000v`+(40+n)+` H1013.1s-83.4,268,-264.1,840c-180.7,572,-277,876.3,-289,913c-4.7,4.7,-12.7,7,-24,7 @@ -767,7 +767,7 @@ c-10,12,-21,25,-33,39s-32,39,-32,39c-6,-5.3,-15,-14,-27,-26s25,-30,25,-30 c26.7,-32.7,52,-63,76,-91s52,-60,52,-60s208,722,208,722 c56,-175.3,126.3,-397.3,211,-666c84.7,-268.7,153.8,-488.2,207.5,-658.5 c53.7,-170.3,84.5,-266.8,92.5,-289.5z -M`+(1001+n)+" "+t+"h400000v"+(40+n)+"h-400000z"},ZCn=function(n,t){return"M424,"+(2398+n+t)+` +M`+(1001+n)+" "+t+"h400000v"+(40+n)+"h-400000z"},L8n=function(n,t){return"M424,"+(2398+n+t)+` c-1.3,-0.7,-38.5,-172,-111.5,-514c-73,-342,-109.8,-513.3,-110.5,-514 c0,-2,-10.7,14.3,-32,49c-4.7,7.3,-9.8,15.7,-15.5,25c-5.7,9.3,-9.8,16,-12.5,20 s-5,7,-5,7c-4,-3.3,-8.3,-7.7,-13,-13s-13,-13,-13,-13s76,-122,76,-122s77,-121,77,-121 @@ -777,18 +777,18 @@ v`+(40+n)+`H1014.6 s-87.3,378.7,-272.6,1166c-185.3,787.3,-279.3,1182.3,-282,1185 c-2,6,-10,9,-24,9 c-8,0,-12,-0.7,-12,-2z M`+(1001+n)+" "+t+` -h400000v`+(40+n)+"h-400000z"},JCn=function(n,t){return"M473,"+(2713+n+t)+` +h400000v`+(40+n)+"h-400000z"},I8n=function(n,t){return"M473,"+(2713+n+t)+` c339.3,-1799.3,509.3,-2700,510,-2702 l`+n/5.298+" -"+n+` c3.3,-7.3,9.3,-11,18,-11 H400000v`+(40+n)+`H1017.7 s-90.5,478,-276.2,1466c-185.7,988,-279.5,1483,-281.5,1485c-2,6,-10,9,-24,9 c-8,0,-12,-0.7,-12,-2c0,-1.3,-5.3,-32,-16,-92c-50.7,-293.3,-119.7,-693.3,-207,-1200 c0,-1.3,-5.3,8.7,-16,30c-10.7,21.3,-21.3,42.7,-32,64s-16,33,-16,33s-26,-26,-26,-26 s76,-153,76,-153s77,-151,77,-151c0.7,0.7,35.7,202,105,604c67.3,400.7,102,602.7,104, -606zM`+(1001+n)+" "+t+"h400000v"+(40+n)+"H1017.7z"},e8n=function(n){var t=n/2;return"M400000 "+n+" H0 L"+t+" 0 l65 45 L145 "+(n-80)+" H400000z"},t8n=function(n,t,r){var s=r-54-t-n;return"M702 "+(n+t)+"H400000"+(40+n)+` +606zM`+(1001+n)+" "+t+"h400000v"+(40+n)+"H1017.7z"},$8n=function(n){var t=n/2;return"M400000 "+n+" H0 L"+t+" 0 l65 45 L145 "+(n-80)+" H400000z"},B8n=function(n,t,r){var s=r-54-t-n;return"M702 "+(n+t)+"H400000"+(40+n)+` H742v`+s+`l-4 4-4 4c-.667.7 -2 1.5-4 2.5s-4.167 1.833-6.5 2.5-5.5 1-9.5 1 h-12l-28-84c-16.667-52-96.667 -294.333-240-727l-212 -643 -85 170 c-4-3.333-8.333-7.667-13 -13l-13-13l77-155 77-156c66 199.333 139 419.667 -219 661 l218 661zM702 `+t+"H400000v"+(40+n)+"H742z"},n8n=function(n,t,r){t=1e3*t;var s="";switch(n){case"sqrtMain":s=QCn(t,Jf);break;case"sqrtSize1":s=XCn(t,Jf);break;case"sqrtSize2":s=YCn(t,Jf);break;case"sqrtSize3":s=ZCn(t,Jf);break;case"sqrtSize4":s=JCn(t,Jf);break;case"sqrtTall":s=t8n(t,Jf,r)}return s},r8n=function(n,t){switch(n){case"⎜":return gs("M291 0 H417 V"+t+" H291z");case"∣":return gs("M145 0 H188 V"+t+" H145z");case"∥":return gs("M145 0 H188 V"+t+" H145z")+gs("M367 0 H410 V"+t+" H367z");case"⎟":return gs("M457 0 H583 V"+t+" H457z");case"⎢":return gs("M319 0 H403 V"+t+" H319z");case"⎥":return gs("M263 0 H347 V"+t+" H263z");case"⎪":return gs("M384 0 H504 V"+t+" H384z");case"⏐":return gs("M312 0 H355 V"+t+" H312z");case"‖":return gs("M257 0 H300 V"+t+" H257z")+gs("M478 0 H521 V"+t+" H478z");default:return""}},UT={doubleleftarrow:`M262 157 +219 661 l218 661zM702 `+t+"H400000v"+(40+n)+"H742z"},P8n=function(n,t,r){t=1e3*t;var s="";switch(n){case"sqrtMain":s=M8n(t,Jf);break;case"sqrtSize1":s=O8n(t,Jf);break;case"sqrtSize2":s=D8n(t,Jf);break;case"sqrtSize3":s=L8n(t,Jf);break;case"sqrtSize4":s=I8n(t,Jf);break;case"sqrtTall":s=B8n(t,Jf,r)}return s},F8n=function(n,t){switch(n){case"⎜":return gs("M291 0 H417 V"+t+" H291z");case"∣":return gs("M145 0 H188 V"+t+" H145z");case"∥":return gs("M145 0 H188 V"+t+" H145z")+gs("M367 0 H410 V"+t+" H367z");case"⎟":return gs("M457 0 H583 V"+t+" H457z");case"⎢":return gs("M319 0 H403 V"+t+" H319z");case"⎥":return gs("M263 0 H347 V"+t+" H263z");case"⎪":return gs("M384 0 H504 V"+t+" H384z");case"⏐":return gs("M312 0 H355 V"+t+" H312z");case"‖":return gs("M257 0 H300 V"+t+" H257z")+gs("M478 0 H521 V"+t+" H478z");default:return""}},UT={doubleleftarrow:`M262 157 l10-10c34-36 62.7-77 86-123 3.3-8 5-13.3 5-16 0-5.3-6.7-8-20-8-7.3 0-12.2.5-14.5 1.5-2.3 1-4.8 4.5-7.5 10.5-49.3 97.3-121.7 169.3-217 216-28 14-57.3 25-88 33-6.7 2-11 3.8-13 5.5-2 1.7-3 4.2-3 7.5s1 5.8 3 7.5 @@ -959,7 +959,7 @@ M93 435 v40 H400000 v-40z M500 241 v40 H400000 v-40z M500 241 v40 H400000 v-40z` c4.7,-4.7,7,-9.3,7,-14c0,-9.3,-3.7,-15.3,-11,-18c-92.7,-56.7,-159,-133.7,-199, -231c-3.3,-9.3,-6,-14.7,-8,-16c-2,-1.3,-7,-2,-15,-2c-10.7,0,-16.7,2,-18,6 c-2,2.7,-1,9.7,3,21c15.3,42,36.7,81.8,64,119.5c27.3,37.7,58,69.2,92,94.5z -M500 241 v40 H399408 v-40z M500 435 v40 H400000 v-40z`},s8n=function(n,t){switch(n){case"lbrack":return"M403 1759 V84 H666 V0 H319 V1759 v"+t+` v1759 v84 h347 v-84 +M500 241 v40 H399408 v-40z M500 435 v40 H400000 v-40z`},H8n=function(n,t){switch(n){case"lbrack":return"M403 1759 V84 H666 V0 H319 V1759 v"+t+` v1759 v84 h347 v-84 H403z M403 1759 V0 H319 V1759 v`+t+" v1759 v84 h84z";case"rbrack":return"M347 1759 V0 H0 V84 H263 V1759 v"+t+` v1759 H0 v84 H347z M347 1759 V0 H263 V1759 v`+t+" v1759 h84z";case"vert":return"M145 15 v585 v"+t+` v585 c2.667,10,9.667,15,21,15 c10,0,16.667,-5,20,-15 v-585 v`+-t+` v-585 c-2.667,-10,-9.667,-15,-21,-15 @@ -987,44 +987,44 @@ c-55.7,194.7,-131.8,370.3,-228.5,527c-20.7,34.7,-41.7,66.3,-63,95c-2,3.3,-4,7,-6 c0,7.3,5.7,11,17,11c0,0,11,0,11,0c9.3,0,14.3,-0.3,15,-1c5.3,-5.3,10.3,-11,15,-17 c242.7,-294.7,395.3,-681.7,458,-1161c21.3,-164.7,33.3,-350.7,36,-558 l0,-`+(t+144)+`c-2,-159.3,-10,-310.7,-24,-454c-53.3,-528,-210,-949.7, --470,-1265c-4.7,-6,-9.7,-11.7,-15,-17c-0.7,-0.7,-6.7,-1,-18,-1z`;default:throw new Error("Unknown stretchy delimiter.")}};function i8n(e){return"toText"in e}class Eh{constructor(n){this.children=void 0,this.classes=void 0,this.height=void 0,this.depth=void 0,this.maxFontSize=void 0,this.style=void 0,this.children=n,this.classes=[],this.height=0,this.depth=0,this.maxFontSize=0,this.style={}}hasClass(n){return this.classes.includes(n)}toNode(){for(var n=document.createDocumentFragment(),t=0;t{if(i8n(n))return n.toText();throw new Error("Expected MathDomNode with toText, got "+n.constructor.name)}).join("")}}var c5={pt:1,mm:7227/2540,cm:7227/254,in:72.27,bp:803/800,pc:12,dd:1238/1157,cc:14856/1157,nd:685/642,nc:1370/107,sp:1/65536,px:803/800},a8n={ex:!0,em:!0,mu:!0},_P=function(n){return typeof n!="string"&&(n=n.unit),n in c5||n in a8n||n==="ex"},Or=function(n,t){var r;if(n.unit in c5)r=c5[n.unit]/t.fontMetrics().ptPerEm/t.sizeMultiplier;else if(n.unit==="mu")r=t.fontMetrics().cssEmPerMu;else{var s;if(t.style.isTight()?s=t.havingStyle(t.style.text()):s=t,n.unit==="ex")r=s.fontMetrics().xHeight;else if(n.unit==="em")r=s.fontMetrics().quad;else throw new Ze("Invalid unit: '"+n.unit+"'");s!==t&&(r*=s.sizeMultiplier/t.sizeMultiplier)}return Math.min(n.number*r,t.maxSize)},tt=function(n){return+n.toFixed(4)+"em"},wu=function(n){return n.filter(t=>t).join(" ")},z6=function(n){var t="";for(var r of Object.keys(n)){var s=n[r];s!==void 0&&(t+=OCn(r)+":"+s+";")}return t},fP=function(n,t,r){if(this.classes=n||[],this.attributes={},this.height=0,this.depth=0,this.maxFontSize=0,this.style=r||{},t){t.style.isTight()&&this.classes.push("mtight");var s=t.getColor();s&&(this.style.color=s)}},dP=function(n){var t=document.createElement(n);t.className=wu(this.classes),Object.assign(t.style,this.style);for(var r of Object.keys(this.attributes))t.setAttribute(r,this.attributes[r]);for(var s=0;s/=\x00-\x1f]/,hP=function(n){var t="<"+n;this.classes.length&&(t+=' class="'+Ks(wu(this.classes))+'"');var r=z6(this.style);r&&(t+=' style="'+Ks(r)+'"');for(var s of Object.keys(this.attributes)){if(o8n.test(s))throw new Ze("Invalid attribute name '"+s+"'");t+=" "+s+'="'+Ks(this.attributes[s])+'"'}t+=">";for(var i=0;i",t};class Nh{constructor(n,t,r,s){this.children=void 0,this.attributes=void 0,this.classes=void 0,this.height=void 0,this.depth=void 0,this.width=void 0,this.maxFontSize=void 0,this.style=void 0,this.italic=void 0,fP.call(this,n,r,s),this.children=t||[]}setAttribute(n,t){this.attributes[n]=t}hasClass(n){return this.classes.includes(n)}toNode(){return dP.call(this,"span")}toMarkup(){return hP.call(this,"span")}}class iy{constructor(n,t,r,s){this.children=void 0,this.attributes=void 0,this.classes=void 0,this.height=void 0,this.depth=void 0,this.maxFontSize=void 0,this.style=void 0,fP.call(this,t,s),this.children=r||[],this.setAttribute("href",n)}setAttribute(n,t){this.attributes[n]=t}hasClass(n){return this.classes.includes(n)}toNode(){return dP.call(this,"a")}toMarkup(){return hP.call(this,"a")}}class l8n{constructor(n,t,r){this.src=void 0,this.alt=void 0,this.classes=void 0,this.height=void 0,this.depth=void 0,this.maxFontSize=void 0,this.style=void 0,this.alt=t,this.src=n,this.classes=["mord"],this.height=0,this.depth=0,this.maxFontSize=0,this.style=r}hasClass(n){return this.classes.includes(n)}toNode(){var n=document.createElement("img");return n.src=this.src,n.alt=this.alt,n.className="mord",Object.assign(n.style,this.style),n}toMarkup(){var n=''+Ks(this.alt)+'0&&(t=document.createElement("span"),t.style.marginRight=tt(this.italic)),this.classes.length>0&&(t=t||document.createElement("span"),t.className=wu(this.classes)),Object.keys(this.style).length>0&&(t=t||document.createElement("span"),Object.assign(t.style,this.style)),t?(t.appendChild(n),t):n}toMarkup(){var n=!1,t="0&&(r+="margin-right:"+tt(this.italic)+";"),r+=z6(this.style),r&&(n=!0,t+=' style="'+Ks(r)+'"');var s=Ks(this.text);return n?(t+=">",t+=s,t+="",t):s}}class rc{constructor(n,t){this.children=void 0,this.attributes=void 0,this.children=n||[],this.attributes=t||{}}toNode(){var n="http://www.w3.org/2000/svg",t=document.createElementNS(n,"svg");for(var r of Object.keys(this.attributes))t.setAttribute(r,this.attributes[r]);for(var s=0;s':''}}class u5{constructor(n){this.attributes=void 0,this.attributes=n||{}}toNode(){var n="http://www.w3.org/2000/svg",t=document.createElementNS(n,"line");for(var r of Object.keys(this.attributes))t.setAttribute(r,this.attributes[r]);return t}toMarkup(){var n=" but got "+String(e)+".")}var f8n=e=>e instanceof Nh||e instanceof iy||e instanceof Eh,Bo={"AMS-Regular":{32:[0,0,0,0,.25],65:[0,.68889,0,0,.72222],66:[0,.68889,0,0,.66667],67:[0,.68889,0,0,.72222],68:[0,.68889,0,0,.72222],69:[0,.68889,0,0,.66667],70:[0,.68889,0,0,.61111],71:[0,.68889,0,0,.77778],72:[0,.68889,0,0,.77778],73:[0,.68889,0,0,.38889],74:[.16667,.68889,0,0,.5],75:[0,.68889,0,0,.77778],76:[0,.68889,0,0,.66667],77:[0,.68889,0,0,.94445],78:[0,.68889,0,0,.72222],79:[.16667,.68889,0,0,.77778],80:[0,.68889,0,0,.61111],81:[.16667,.68889,0,0,.77778],82:[0,.68889,0,0,.72222],83:[0,.68889,0,0,.55556],84:[0,.68889,0,0,.66667],85:[0,.68889,0,0,.72222],86:[0,.68889,0,0,.72222],87:[0,.68889,0,0,1],88:[0,.68889,0,0,.72222],89:[0,.68889,0,0,.72222],90:[0,.68889,0,0,.66667],107:[0,.68889,0,0,.55556],160:[0,0,0,0,.25],165:[0,.675,.025,0,.75],174:[.15559,.69224,0,0,.94666],240:[0,.68889,0,0,.55556],295:[0,.68889,0,0,.54028],710:[0,.825,0,0,2.33334],732:[0,.9,0,0,2.33334],770:[0,.825,0,0,2.33334],771:[0,.9,0,0,2.33334],989:[.08167,.58167,0,0,.77778],1008:[0,.43056,.04028,0,.66667],8245:[0,.54986,0,0,.275],8463:[0,.68889,0,0,.54028],8487:[0,.68889,0,0,.72222],8498:[0,.68889,0,0,.55556],8502:[0,.68889,0,0,.66667],8503:[0,.68889,0,0,.44445],8504:[0,.68889,0,0,.66667],8513:[0,.68889,0,0,.63889],8592:[-.03598,.46402,0,0,.5],8594:[-.03598,.46402,0,0,.5],8602:[-.13313,.36687,0,0,1],8603:[-.13313,.36687,0,0,1],8606:[.01354,.52239,0,0,1],8608:[.01354,.52239,0,0,1],8610:[.01354,.52239,0,0,1.11111],8611:[.01354,.52239,0,0,1.11111],8619:[0,.54986,0,0,1],8620:[0,.54986,0,0,1],8621:[-.13313,.37788,0,0,1.38889],8622:[-.13313,.36687,0,0,1],8624:[0,.69224,0,0,.5],8625:[0,.69224,0,0,.5],8630:[0,.43056,0,0,1],8631:[0,.43056,0,0,1],8634:[.08198,.58198,0,0,.77778],8635:[.08198,.58198,0,0,.77778],8638:[.19444,.69224,0,0,.41667],8639:[.19444,.69224,0,0,.41667],8642:[.19444,.69224,0,0,.41667],8643:[.19444,.69224,0,0,.41667],8644:[.1808,.675,0,0,1],8646:[.1808,.675,0,0,1],8647:[.1808,.675,0,0,1],8648:[.19444,.69224,0,0,.83334],8649:[.1808,.675,0,0,1],8650:[.19444,.69224,0,0,.83334],8651:[.01354,.52239,0,0,1],8652:[.01354,.52239,0,0,1],8653:[-.13313,.36687,0,0,1],8654:[-.13313,.36687,0,0,1],8655:[-.13313,.36687,0,0,1],8666:[.13667,.63667,0,0,1],8667:[.13667,.63667,0,0,1],8669:[-.13313,.37788,0,0,1],8672:[-.064,.437,0,0,1.334],8674:[-.064,.437,0,0,1.334],8705:[0,.825,0,0,.5],8708:[0,.68889,0,0,.55556],8709:[.08167,.58167,0,0,.77778],8717:[0,.43056,0,0,.42917],8722:[-.03598,.46402,0,0,.5],8724:[.08198,.69224,0,0,.77778],8726:[.08167,.58167,0,0,.77778],8733:[0,.69224,0,0,.77778],8736:[0,.69224,0,0,.72222],8737:[0,.69224,0,0,.72222],8738:[.03517,.52239,0,0,.72222],8739:[.08167,.58167,0,0,.22222],8740:[.25142,.74111,0,0,.27778],8741:[.08167,.58167,0,0,.38889],8742:[.25142,.74111,0,0,.5],8756:[0,.69224,0,0,.66667],8757:[0,.69224,0,0,.66667],8764:[-.13313,.36687,0,0,.77778],8765:[-.13313,.37788,0,0,.77778],8769:[-.13313,.36687,0,0,.77778],8770:[-.03625,.46375,0,0,.77778],8774:[.30274,.79383,0,0,.77778],8776:[-.01688,.48312,0,0,.77778],8778:[.08167,.58167,0,0,.77778],8782:[.06062,.54986,0,0,.77778],8783:[.06062,.54986,0,0,.77778],8785:[.08198,.58198,0,0,.77778],8786:[.08198,.58198,0,0,.77778],8787:[.08198,.58198,0,0,.77778],8790:[0,.69224,0,0,.77778],8791:[.22958,.72958,0,0,.77778],8796:[.08198,.91667,0,0,.77778],8806:[.25583,.75583,0,0,.77778],8807:[.25583,.75583,0,0,.77778],8808:[.25142,.75726,0,0,.77778],8809:[.25142,.75726,0,0,.77778],8812:[.25583,.75583,0,0,.5],8814:[.20576,.70576,0,0,.77778],8815:[.20576,.70576,0,0,.77778],8816:[.30274,.79383,0,0,.77778],8817:[.30274,.79383,0,0,.77778],8818:[.22958,.72958,0,0,.77778],8819:[.22958,.72958,0,0,.77778],8822:[.1808,.675,0,0,.77778],8823:[.1808,.675,0,0,.77778],8828:[.13667,.63667,0,0,.77778],8829:[.13667,.63667,0,0,.77778],8830:[.22958,.72958,0,0,.77778],8831:[.22958,.72958,0,0,.77778],8832:[.20576,.70576,0,0,.77778],8833:[.20576,.70576,0,0,.77778],8840:[.30274,.79383,0,0,.77778],8841:[.30274,.79383,0,0,.77778],8842:[.13597,.63597,0,0,.77778],8843:[.13597,.63597,0,0,.77778],8847:[.03517,.54986,0,0,.77778],8848:[.03517,.54986,0,0,.77778],8858:[.08198,.58198,0,0,.77778],8859:[.08198,.58198,0,0,.77778],8861:[.08198,.58198,0,0,.77778],8862:[0,.675,0,0,.77778],8863:[0,.675,0,0,.77778],8864:[0,.675,0,0,.77778],8865:[0,.675,0,0,.77778],8872:[0,.69224,0,0,.61111],8873:[0,.69224,0,0,.72222],8874:[0,.69224,0,0,.88889],8876:[0,.68889,0,0,.61111],8877:[0,.68889,0,0,.61111],8878:[0,.68889,0,0,.72222],8879:[0,.68889,0,0,.72222],8882:[.03517,.54986,0,0,.77778],8883:[.03517,.54986,0,0,.77778],8884:[.13667,.63667,0,0,.77778],8885:[.13667,.63667,0,0,.77778],8888:[0,.54986,0,0,1.11111],8890:[.19444,.43056,0,0,.55556],8891:[.19444,.69224,0,0,.61111],8892:[.19444,.69224,0,0,.61111],8901:[0,.54986,0,0,.27778],8903:[.08167,.58167,0,0,.77778],8905:[.08167,.58167,0,0,.77778],8906:[.08167,.58167,0,0,.77778],8907:[0,.69224,0,0,.77778],8908:[0,.69224,0,0,.77778],8909:[-.03598,.46402,0,0,.77778],8910:[0,.54986,0,0,.76042],8911:[0,.54986,0,0,.76042],8912:[.03517,.54986,0,0,.77778],8913:[.03517,.54986,0,0,.77778],8914:[0,.54986,0,0,.66667],8915:[0,.54986,0,0,.66667],8916:[0,.69224,0,0,.66667],8918:[.0391,.5391,0,0,.77778],8919:[.0391,.5391,0,0,.77778],8920:[.03517,.54986,0,0,1.33334],8921:[.03517,.54986,0,0,1.33334],8922:[.38569,.88569,0,0,.77778],8923:[.38569,.88569,0,0,.77778],8926:[.13667,.63667,0,0,.77778],8927:[.13667,.63667,0,0,.77778],8928:[.30274,.79383,0,0,.77778],8929:[.30274,.79383,0,0,.77778],8934:[.23222,.74111,0,0,.77778],8935:[.23222,.74111,0,0,.77778],8936:[.23222,.74111,0,0,.77778],8937:[.23222,.74111,0,0,.77778],8938:[.20576,.70576,0,0,.77778],8939:[.20576,.70576,0,0,.77778],8940:[.30274,.79383,0,0,.77778],8941:[.30274,.79383,0,0,.77778],8994:[.19444,.69224,0,0,.77778],8995:[.19444,.69224,0,0,.77778],9416:[.15559,.69224,0,0,.90222],9484:[0,.69224,0,0,.5],9488:[0,.69224,0,0,.5],9492:[0,.37788,0,0,.5],9496:[0,.37788,0,0,.5],9585:[.19444,.68889,0,0,.88889],9586:[.19444,.74111,0,0,.88889],9632:[0,.675,0,0,.77778],9633:[0,.675,0,0,.77778],9650:[0,.54986,0,0,.72222],9651:[0,.54986,0,0,.72222],9654:[.03517,.54986,0,0,.77778],9660:[0,.54986,0,0,.72222],9661:[0,.54986,0,0,.72222],9664:[.03517,.54986,0,0,.77778],9674:[.11111,.69224,0,0,.66667],9733:[.19444,.69224,0,0,.94445],10003:[0,.69224,0,0,.83334],10016:[0,.69224,0,0,.83334],10731:[.11111,.69224,0,0,.66667],10846:[.19444,.75583,0,0,.61111],10877:[.13667,.63667,0,0,.77778],10878:[.13667,.63667,0,0,.77778],10885:[.25583,.75583,0,0,.77778],10886:[.25583,.75583,0,0,.77778],10887:[.13597,.63597,0,0,.77778],10888:[.13597,.63597,0,0,.77778],10889:[.26167,.75726,0,0,.77778],10890:[.26167,.75726,0,0,.77778],10891:[.48256,.98256,0,0,.77778],10892:[.48256,.98256,0,0,.77778],10901:[.13667,.63667,0,0,.77778],10902:[.13667,.63667,0,0,.77778],10933:[.25142,.75726,0,0,.77778],10934:[.25142,.75726,0,0,.77778],10935:[.26167,.75726,0,0,.77778],10936:[.26167,.75726,0,0,.77778],10937:[.26167,.75726,0,0,.77778],10938:[.26167,.75726,0,0,.77778],10949:[.25583,.75583,0,0,.77778],10950:[.25583,.75583,0,0,.77778],10955:[.28481,.79383,0,0,.77778],10956:[.28481,.79383,0,0,.77778],57350:[.08167,.58167,0,0,.22222],57351:[.08167,.58167,0,0,.38889],57352:[.08167,.58167,0,0,.77778],57353:[0,.43056,.04028,0,.66667],57356:[.25142,.75726,0,0,.77778],57357:[.25142,.75726,0,0,.77778],57358:[.41951,.91951,0,0,.77778],57359:[.30274,.79383,0,0,.77778],57360:[.30274,.79383,0,0,.77778],57361:[.41951,.91951,0,0,.77778],57366:[.25142,.75726,0,0,.77778],57367:[.25142,.75726,0,0,.77778],57368:[.25142,.75726,0,0,.77778],57369:[.25142,.75726,0,0,.77778],57370:[.13597,.63597,0,0,.77778],57371:[.13597,.63597,0,0,.77778]},"Caligraphic-Regular":{32:[0,0,0,0,.25],65:[0,.68333,0,.19445,.79847],66:[0,.68333,.03041,.13889,.65681],67:[0,.68333,.05834,.13889,.52653],68:[0,.68333,.02778,.08334,.77139],69:[0,.68333,.08944,.11111,.52778],70:[0,.68333,.09931,.11111,.71875],71:[.09722,.68333,.0593,.11111,.59487],72:[0,.68333,.00965,.11111,.84452],73:[0,.68333,.07382,0,.54452],74:[.09722,.68333,.18472,.16667,.67778],75:[0,.68333,.01445,.05556,.76195],76:[0,.68333,0,.13889,.68972],77:[0,.68333,0,.13889,1.2009],78:[0,.68333,.14736,.08334,.82049],79:[0,.68333,.02778,.11111,.79611],80:[0,.68333,.08222,.08334,.69556],81:[.09722,.68333,0,.11111,.81667],82:[0,.68333,0,.08334,.8475],83:[0,.68333,.075,.13889,.60556],84:[0,.68333,.25417,0,.54464],85:[0,.68333,.09931,.08334,.62583],86:[0,.68333,.08222,0,.61278],87:[0,.68333,.08222,.08334,.98778],88:[0,.68333,.14643,.13889,.7133],89:[.09722,.68333,.08222,.08334,.66834],90:[0,.68333,.07944,.13889,.72473],160:[0,0,0,0,.25]},"Fraktur-Regular":{32:[0,0,0,0,.25],33:[0,.69141,0,0,.29574],34:[0,.69141,0,0,.21471],38:[0,.69141,0,0,.73786],39:[0,.69141,0,0,.21201],40:[.24982,.74947,0,0,.38865],41:[.24982,.74947,0,0,.38865],42:[0,.62119,0,0,.27764],43:[.08319,.58283,0,0,.75623],44:[0,.10803,0,0,.27764],45:[.08319,.58283,0,0,.75623],46:[0,.10803,0,0,.27764],47:[.24982,.74947,0,0,.50181],48:[0,.47534,0,0,.50181],49:[0,.47534,0,0,.50181],50:[0,.47534,0,0,.50181],51:[.18906,.47534,0,0,.50181],52:[.18906,.47534,0,0,.50181],53:[.18906,.47534,0,0,.50181],54:[0,.69141,0,0,.50181],55:[.18906,.47534,0,0,.50181],56:[0,.69141,0,0,.50181],57:[.18906,.47534,0,0,.50181],58:[0,.47534,0,0,.21606],59:[.12604,.47534,0,0,.21606],61:[-.13099,.36866,0,0,.75623],63:[0,.69141,0,0,.36245],65:[0,.69141,0,0,.7176],66:[0,.69141,0,0,.88397],67:[0,.69141,0,0,.61254],68:[0,.69141,0,0,.83158],69:[0,.69141,0,0,.66278],70:[.12604,.69141,0,0,.61119],71:[0,.69141,0,0,.78539],72:[.06302,.69141,0,0,.7203],73:[0,.69141,0,0,.55448],74:[.12604,.69141,0,0,.55231],75:[0,.69141,0,0,.66845],76:[0,.69141,0,0,.66602],77:[0,.69141,0,0,1.04953],78:[0,.69141,0,0,.83212],79:[0,.69141,0,0,.82699],80:[.18906,.69141,0,0,.82753],81:[.03781,.69141,0,0,.82699],82:[0,.69141,0,0,.82807],83:[0,.69141,0,0,.82861],84:[0,.69141,0,0,.66899],85:[0,.69141,0,0,.64576],86:[0,.69141,0,0,.83131],87:[0,.69141,0,0,1.04602],88:[0,.69141,0,0,.71922],89:[.18906,.69141,0,0,.83293],90:[.12604,.69141,0,0,.60201],91:[.24982,.74947,0,0,.27764],93:[.24982,.74947,0,0,.27764],94:[0,.69141,0,0,.49965],97:[0,.47534,0,0,.50046],98:[0,.69141,0,0,.51315],99:[0,.47534,0,0,.38946],100:[0,.62119,0,0,.49857],101:[0,.47534,0,0,.40053],102:[.18906,.69141,0,0,.32626],103:[.18906,.47534,0,0,.5037],104:[.18906,.69141,0,0,.52126],105:[0,.69141,0,0,.27899],106:[0,.69141,0,0,.28088],107:[0,.69141,0,0,.38946],108:[0,.69141,0,0,.27953],109:[0,.47534,0,0,.76676],110:[0,.47534,0,0,.52666],111:[0,.47534,0,0,.48885],112:[.18906,.52396,0,0,.50046],113:[.18906,.47534,0,0,.48912],114:[0,.47534,0,0,.38919],115:[0,.47534,0,0,.44266],116:[0,.62119,0,0,.33301],117:[0,.47534,0,0,.5172],118:[0,.52396,0,0,.5118],119:[0,.52396,0,0,.77351],120:[.18906,.47534,0,0,.38865],121:[.18906,.47534,0,0,.49884],122:[.18906,.47534,0,0,.39054],160:[0,0,0,0,.25],8216:[0,.69141,0,0,.21471],8217:[0,.69141,0,0,.21471],58112:[0,.62119,0,0,.49749],58113:[0,.62119,0,0,.4983],58114:[.18906,.69141,0,0,.33328],58115:[.18906,.69141,0,0,.32923],58116:[.18906,.47534,0,0,.50343],58117:[0,.69141,0,0,.33301],58118:[0,.62119,0,0,.33409],58119:[0,.47534,0,0,.50073]},"Main-Bold":{32:[0,0,0,0,.25],33:[0,.69444,0,0,.35],34:[0,.69444,0,0,.60278],35:[.19444,.69444,0,0,.95833],36:[.05556,.75,0,0,.575],37:[.05556,.75,0,0,.95833],38:[0,.69444,0,0,.89444],39:[0,.69444,0,0,.31944],40:[.25,.75,0,0,.44722],41:[.25,.75,0,0,.44722],42:[0,.75,0,0,.575],43:[.13333,.63333,0,0,.89444],44:[.19444,.15556,0,0,.31944],45:[0,.44444,0,0,.38333],46:[0,.15556,0,0,.31944],47:[.25,.75,0,0,.575],48:[0,.64444,0,0,.575],49:[0,.64444,0,0,.575],50:[0,.64444,0,0,.575],51:[0,.64444,0,0,.575],52:[0,.64444,0,0,.575],53:[0,.64444,0,0,.575],54:[0,.64444,0,0,.575],55:[0,.64444,0,0,.575],56:[0,.64444,0,0,.575],57:[0,.64444,0,0,.575],58:[0,.44444,0,0,.31944],59:[.19444,.44444,0,0,.31944],60:[.08556,.58556,0,0,.89444],61:[-.10889,.39111,0,0,.89444],62:[.08556,.58556,0,0,.89444],63:[0,.69444,0,0,.54305],64:[0,.69444,0,0,.89444],65:[0,.68611,0,0,.86944],66:[0,.68611,0,0,.81805],67:[0,.68611,0,0,.83055],68:[0,.68611,0,0,.88194],69:[0,.68611,0,0,.75555],70:[0,.68611,0,0,.72361],71:[0,.68611,0,0,.90416],72:[0,.68611,0,0,.9],73:[0,.68611,0,0,.43611],74:[0,.68611,0,0,.59444],75:[0,.68611,0,0,.90138],76:[0,.68611,0,0,.69166],77:[0,.68611,0,0,1.09166],78:[0,.68611,0,0,.9],79:[0,.68611,0,0,.86388],80:[0,.68611,0,0,.78611],81:[.19444,.68611,0,0,.86388],82:[0,.68611,0,0,.8625],83:[0,.68611,0,0,.63889],84:[0,.68611,0,0,.8],85:[0,.68611,0,0,.88472],86:[0,.68611,.01597,0,.86944],87:[0,.68611,.01597,0,1.18888],88:[0,.68611,0,0,.86944],89:[0,.68611,.02875,0,.86944],90:[0,.68611,0,0,.70277],91:[.25,.75,0,0,.31944],92:[.25,.75,0,0,.575],93:[.25,.75,0,0,.31944],94:[0,.69444,0,0,.575],95:[.31,.13444,.03194,0,.575],97:[0,.44444,0,0,.55902],98:[0,.69444,0,0,.63889],99:[0,.44444,0,0,.51111],100:[0,.69444,0,0,.63889],101:[0,.44444,0,0,.52708],102:[0,.69444,.10903,0,.35139],103:[.19444,.44444,.01597,0,.575],104:[0,.69444,0,0,.63889],105:[0,.69444,0,0,.31944],106:[.19444,.69444,0,0,.35139],107:[0,.69444,0,0,.60694],108:[0,.69444,0,0,.31944],109:[0,.44444,0,0,.95833],110:[0,.44444,0,0,.63889],111:[0,.44444,0,0,.575],112:[.19444,.44444,0,0,.63889],113:[.19444,.44444,0,0,.60694],114:[0,.44444,0,0,.47361],115:[0,.44444,0,0,.45361],116:[0,.63492,0,0,.44722],117:[0,.44444,0,0,.63889],118:[0,.44444,.01597,0,.60694],119:[0,.44444,.01597,0,.83055],120:[0,.44444,0,0,.60694],121:[.19444,.44444,.01597,0,.60694],122:[0,.44444,0,0,.51111],123:[.25,.75,0,0,.575],124:[.25,.75,0,0,.31944],125:[.25,.75,0,0,.575],126:[.35,.34444,0,0,.575],160:[0,0,0,0,.25],163:[0,.69444,0,0,.86853],168:[0,.69444,0,0,.575],172:[0,.44444,0,0,.76666],176:[0,.69444,0,0,.86944],177:[.13333,.63333,0,0,.89444],184:[.17014,0,0,0,.51111],198:[0,.68611,0,0,1.04166],215:[.13333,.63333,0,0,.89444],216:[.04861,.73472,0,0,.89444],223:[0,.69444,0,0,.59722],230:[0,.44444,0,0,.83055],247:[.13333,.63333,0,0,.89444],248:[.09722,.54167,0,0,.575],305:[0,.44444,0,0,.31944],338:[0,.68611,0,0,1.16944],339:[0,.44444,0,0,.89444],567:[.19444,.44444,0,0,.35139],710:[0,.69444,0,0,.575],711:[0,.63194,0,0,.575],713:[0,.59611,0,0,.575],714:[0,.69444,0,0,.575],715:[0,.69444,0,0,.575],728:[0,.69444,0,0,.575],729:[0,.69444,0,0,.31944],730:[0,.69444,0,0,.86944],732:[0,.69444,0,0,.575],733:[0,.69444,0,0,.575],915:[0,.68611,0,0,.69166],916:[0,.68611,0,0,.95833],920:[0,.68611,0,0,.89444],923:[0,.68611,0,0,.80555],926:[0,.68611,0,0,.76666],928:[0,.68611,0,0,.9],931:[0,.68611,0,0,.83055],933:[0,.68611,0,0,.89444],934:[0,.68611,0,0,.83055],936:[0,.68611,0,0,.89444],937:[0,.68611,0,0,.83055],8211:[0,.44444,.03194,0,.575],8212:[0,.44444,.03194,0,1.14999],8216:[0,.69444,0,0,.31944],8217:[0,.69444,0,0,.31944],8220:[0,.69444,0,0,.60278],8221:[0,.69444,0,0,.60278],8224:[.19444,.69444,0,0,.51111],8225:[.19444,.69444,0,0,.51111],8242:[0,.55556,0,0,.34444],8407:[0,.72444,.15486,0,.575],8463:[0,.69444,0,0,.66759],8465:[0,.69444,0,0,.83055],8467:[0,.69444,0,0,.47361],8472:[.19444,.44444,0,0,.74027],8476:[0,.69444,0,0,.83055],8501:[0,.69444,0,0,.70277],8592:[-.10889,.39111,0,0,1.14999],8593:[.19444,.69444,0,0,.575],8594:[-.10889,.39111,0,0,1.14999],8595:[.19444,.69444,0,0,.575],8596:[-.10889,.39111,0,0,1.14999],8597:[.25,.75,0,0,.575],8598:[.19444,.69444,0,0,1.14999],8599:[.19444,.69444,0,0,1.14999],8600:[.19444,.69444,0,0,1.14999],8601:[.19444,.69444,0,0,1.14999],8636:[-.10889,.39111,0,0,1.14999],8637:[-.10889,.39111,0,0,1.14999],8640:[-.10889,.39111,0,0,1.14999],8641:[-.10889,.39111,0,0,1.14999],8656:[-.10889,.39111,0,0,1.14999],8657:[.19444,.69444,0,0,.70277],8658:[-.10889,.39111,0,0,1.14999],8659:[.19444,.69444,0,0,.70277],8660:[-.10889,.39111,0,0,1.14999],8661:[.25,.75,0,0,.70277],8704:[0,.69444,0,0,.63889],8706:[0,.69444,.06389,0,.62847],8707:[0,.69444,0,0,.63889],8709:[.05556,.75,0,0,.575],8711:[0,.68611,0,0,.95833],8712:[.08556,.58556,0,0,.76666],8715:[.08556,.58556,0,0,.76666],8722:[.13333,.63333,0,0,.89444],8723:[.13333,.63333,0,0,.89444],8725:[.25,.75,0,0,.575],8726:[.25,.75,0,0,.575],8727:[-.02778,.47222,0,0,.575],8728:[-.02639,.47361,0,0,.575],8729:[-.02639,.47361,0,0,.575],8730:[.18,.82,0,0,.95833],8733:[0,.44444,0,0,.89444],8734:[0,.44444,0,0,1.14999],8736:[0,.69224,0,0,.72222],8739:[.25,.75,0,0,.31944],8741:[.25,.75,0,0,.575],8743:[0,.55556,0,0,.76666],8744:[0,.55556,0,0,.76666],8745:[0,.55556,0,0,.76666],8746:[0,.55556,0,0,.76666],8747:[.19444,.69444,.12778,0,.56875],8764:[-.10889,.39111,0,0,.89444],8768:[.19444,.69444,0,0,.31944],8771:[.00222,.50222,0,0,.89444],8773:[.027,.638,0,0,.894],8776:[.02444,.52444,0,0,.89444],8781:[.00222,.50222,0,0,.89444],8801:[.00222,.50222,0,0,.89444],8804:[.19667,.69667,0,0,.89444],8805:[.19667,.69667,0,0,.89444],8810:[.08556,.58556,0,0,1.14999],8811:[.08556,.58556,0,0,1.14999],8826:[.08556,.58556,0,0,.89444],8827:[.08556,.58556,0,0,.89444],8834:[.08556,.58556,0,0,.89444],8835:[.08556,.58556,0,0,.89444],8838:[.19667,.69667,0,0,.89444],8839:[.19667,.69667,0,0,.89444],8846:[0,.55556,0,0,.76666],8849:[.19667,.69667,0,0,.89444],8850:[.19667,.69667,0,0,.89444],8851:[0,.55556,0,0,.76666],8852:[0,.55556,0,0,.76666],8853:[.13333,.63333,0,0,.89444],8854:[.13333,.63333,0,0,.89444],8855:[.13333,.63333,0,0,.89444],8856:[.13333,.63333,0,0,.89444],8857:[.13333,.63333,0,0,.89444],8866:[0,.69444,0,0,.70277],8867:[0,.69444,0,0,.70277],8868:[0,.69444,0,0,.89444],8869:[0,.69444,0,0,.89444],8900:[-.02639,.47361,0,0,.575],8901:[-.02639,.47361,0,0,.31944],8902:[-.02778,.47222,0,0,.575],8968:[.25,.75,0,0,.51111],8969:[.25,.75,0,0,.51111],8970:[.25,.75,0,0,.51111],8971:[.25,.75,0,0,.51111],8994:[-.13889,.36111,0,0,1.14999],8995:[-.13889,.36111,0,0,1.14999],9651:[.19444,.69444,0,0,1.02222],9657:[-.02778,.47222,0,0,.575],9661:[.19444,.69444,0,0,1.02222],9667:[-.02778,.47222,0,0,.575],9711:[.19444,.69444,0,0,1.14999],9824:[.12963,.69444,0,0,.89444],9825:[.12963,.69444,0,0,.89444],9826:[.12963,.69444,0,0,.89444],9827:[.12963,.69444,0,0,.89444],9837:[0,.75,0,0,.44722],9838:[.19444,.69444,0,0,.44722],9839:[.19444,.69444,0,0,.44722],10216:[.25,.75,0,0,.44722],10217:[.25,.75,0,0,.44722],10815:[0,.68611,0,0,.9],10927:[.19667,.69667,0,0,.89444],10928:[.19667,.69667,0,0,.89444],57376:[.19444,.69444,0,0,0]},"Main-BoldItalic":{32:[0,0,0,0,.25],33:[0,.69444,.11417,0,.38611],34:[0,.69444,.07939,0,.62055],35:[.19444,.69444,.06833,0,.94444],37:[.05556,.75,.12861,0,.94444],38:[0,.69444,.08528,0,.88555],39:[0,.69444,.12945,0,.35555],40:[.25,.75,.15806,0,.47333],41:[.25,.75,.03306,0,.47333],42:[0,.75,.14333,0,.59111],43:[.10333,.60333,.03306,0,.88555],44:[.19444,.14722,0,0,.35555],45:[0,.44444,.02611,0,.41444],46:[0,.14722,0,0,.35555],47:[.25,.75,.15806,0,.59111],48:[0,.64444,.13167,0,.59111],49:[0,.64444,.13167,0,.59111],50:[0,.64444,.13167,0,.59111],51:[0,.64444,.13167,0,.59111],52:[.19444,.64444,.13167,0,.59111],53:[0,.64444,.13167,0,.59111],54:[0,.64444,.13167,0,.59111],55:[.19444,.64444,.13167,0,.59111],56:[0,.64444,.13167,0,.59111],57:[0,.64444,.13167,0,.59111],58:[0,.44444,.06695,0,.35555],59:[.19444,.44444,.06695,0,.35555],61:[-.10889,.39111,.06833,0,.88555],63:[0,.69444,.11472,0,.59111],64:[0,.69444,.09208,0,.88555],65:[0,.68611,0,0,.86555],66:[0,.68611,.0992,0,.81666],67:[0,.68611,.14208,0,.82666],68:[0,.68611,.09062,0,.87555],69:[0,.68611,.11431,0,.75666],70:[0,.68611,.12903,0,.72722],71:[0,.68611,.07347,0,.89527],72:[0,.68611,.17208,0,.8961],73:[0,.68611,.15681,0,.47166],74:[0,.68611,.145,0,.61055],75:[0,.68611,.14208,0,.89499],76:[0,.68611,0,0,.69777],77:[0,.68611,.17208,0,1.07277],78:[0,.68611,.17208,0,.8961],79:[0,.68611,.09062,0,.85499],80:[0,.68611,.0992,0,.78721],81:[.19444,.68611,.09062,0,.85499],82:[0,.68611,.02559,0,.85944],83:[0,.68611,.11264,0,.64999],84:[0,.68611,.12903,0,.7961],85:[0,.68611,.17208,0,.88083],86:[0,.68611,.18625,0,.86555],87:[0,.68611,.18625,0,1.15999],88:[0,.68611,.15681,0,.86555],89:[0,.68611,.19803,0,.86555],90:[0,.68611,.14208,0,.70888],91:[.25,.75,.1875,0,.35611],93:[.25,.75,.09972,0,.35611],94:[0,.69444,.06709,0,.59111],95:[.31,.13444,.09811,0,.59111],97:[0,.44444,.09426,0,.59111],98:[0,.69444,.07861,0,.53222],99:[0,.44444,.05222,0,.53222],100:[0,.69444,.10861,0,.59111],101:[0,.44444,.085,0,.53222],102:[.19444,.69444,.21778,0,.4],103:[.19444,.44444,.105,0,.53222],104:[0,.69444,.09426,0,.59111],105:[0,.69326,.11387,0,.35555],106:[.19444,.69326,.1672,0,.35555],107:[0,.69444,.11111,0,.53222],108:[0,.69444,.10861,0,.29666],109:[0,.44444,.09426,0,.94444],110:[0,.44444,.09426,0,.64999],111:[0,.44444,.07861,0,.59111],112:[.19444,.44444,.07861,0,.59111],113:[.19444,.44444,.105,0,.53222],114:[0,.44444,.11111,0,.50167],115:[0,.44444,.08167,0,.48694],116:[0,.63492,.09639,0,.385],117:[0,.44444,.09426,0,.62055],118:[0,.44444,.11111,0,.53222],119:[0,.44444,.11111,0,.76777],120:[0,.44444,.12583,0,.56055],121:[.19444,.44444,.105,0,.56166],122:[0,.44444,.13889,0,.49055],126:[.35,.34444,.11472,0,.59111],160:[0,0,0,0,.25],168:[0,.69444,.11473,0,.59111],176:[0,.69444,0,0,.94888],184:[.17014,0,0,0,.53222],198:[0,.68611,.11431,0,1.02277],216:[.04861,.73472,.09062,0,.88555],223:[.19444,.69444,.09736,0,.665],230:[0,.44444,.085,0,.82666],248:[.09722,.54167,.09458,0,.59111],305:[0,.44444,.09426,0,.35555],338:[0,.68611,.11431,0,1.14054],339:[0,.44444,.085,0,.82666],567:[.19444,.44444,.04611,0,.385],710:[0,.69444,.06709,0,.59111],711:[0,.63194,.08271,0,.59111],713:[0,.59444,.10444,0,.59111],714:[0,.69444,.08528,0,.59111],715:[0,.69444,0,0,.59111],728:[0,.69444,.10333,0,.59111],729:[0,.69444,.12945,0,.35555],730:[0,.69444,0,0,.94888],732:[0,.69444,.11472,0,.59111],733:[0,.69444,.11472,0,.59111],915:[0,.68611,.12903,0,.69777],916:[0,.68611,0,0,.94444],920:[0,.68611,.09062,0,.88555],923:[0,.68611,0,0,.80666],926:[0,.68611,.15092,0,.76777],928:[0,.68611,.17208,0,.8961],931:[0,.68611,.11431,0,.82666],933:[0,.68611,.10778,0,.88555],934:[0,.68611,.05632,0,.82666],936:[0,.68611,.10778,0,.88555],937:[0,.68611,.0992,0,.82666],8211:[0,.44444,.09811,0,.59111],8212:[0,.44444,.09811,0,1.18221],8216:[0,.69444,.12945,0,.35555],8217:[0,.69444,.12945,0,.35555],8220:[0,.69444,.16772,0,.62055],8221:[0,.69444,.07939,0,.62055]},"Main-Italic":{32:[0,0,0,0,.25],33:[0,.69444,.12417,0,.30667],34:[0,.69444,.06961,0,.51444],35:[.19444,.69444,.06616,0,.81777],37:[.05556,.75,.13639,0,.81777],38:[0,.69444,.09694,0,.76666],39:[0,.69444,.12417,0,.30667],40:[.25,.75,.16194,0,.40889],41:[.25,.75,.03694,0,.40889],42:[0,.75,.14917,0,.51111],43:[.05667,.56167,.03694,0,.76666],44:[.19444,.10556,0,0,.30667],45:[0,.43056,.02826,0,.35778],46:[0,.10556,0,0,.30667],47:[.25,.75,.16194,0,.51111],48:[0,.64444,.13556,0,.51111],49:[0,.64444,.13556,0,.51111],50:[0,.64444,.13556,0,.51111],51:[0,.64444,.13556,0,.51111],52:[.19444,.64444,.13556,0,.51111],53:[0,.64444,.13556,0,.51111],54:[0,.64444,.13556,0,.51111],55:[.19444,.64444,.13556,0,.51111],56:[0,.64444,.13556,0,.51111],57:[0,.64444,.13556,0,.51111],58:[0,.43056,.0582,0,.30667],59:[.19444,.43056,.0582,0,.30667],61:[-.13313,.36687,.06616,0,.76666],63:[0,.69444,.1225,0,.51111],64:[0,.69444,.09597,0,.76666],65:[0,.68333,0,0,.74333],66:[0,.68333,.10257,0,.70389],67:[0,.68333,.14528,0,.71555],68:[0,.68333,.09403,0,.755],69:[0,.68333,.12028,0,.67833],70:[0,.68333,.13305,0,.65277],71:[0,.68333,.08722,0,.77361],72:[0,.68333,.16389,0,.74333],73:[0,.68333,.15806,0,.38555],74:[0,.68333,.14028,0,.525],75:[0,.68333,.14528,0,.76888],76:[0,.68333,0,0,.62722],77:[0,.68333,.16389,0,.89666],78:[0,.68333,.16389,0,.74333],79:[0,.68333,.09403,0,.76666],80:[0,.68333,.10257,0,.67833],81:[.19444,.68333,.09403,0,.76666],82:[0,.68333,.03868,0,.72944],83:[0,.68333,.11972,0,.56222],84:[0,.68333,.13305,0,.71555],85:[0,.68333,.16389,0,.74333],86:[0,.68333,.18361,0,.74333],87:[0,.68333,.18361,0,.99888],88:[0,.68333,.15806,0,.74333],89:[0,.68333,.19383,0,.74333],90:[0,.68333,.14528,0,.61333],91:[.25,.75,.1875,0,.30667],93:[.25,.75,.10528,0,.30667],94:[0,.69444,.06646,0,.51111],95:[.31,.12056,.09208,0,.51111],97:[0,.43056,.07671,0,.51111],98:[0,.69444,.06312,0,.46],99:[0,.43056,.05653,0,.46],100:[0,.69444,.10333,0,.51111],101:[0,.43056,.07514,0,.46],102:[.19444,.69444,.21194,0,.30667],103:[.19444,.43056,.08847,0,.46],104:[0,.69444,.07671,0,.51111],105:[0,.65536,.1019,0,.30667],106:[.19444,.65536,.14467,0,.30667],107:[0,.69444,.10764,0,.46],108:[0,.69444,.10333,0,.25555],109:[0,.43056,.07671,0,.81777],110:[0,.43056,.07671,0,.56222],111:[0,.43056,.06312,0,.51111],112:[.19444,.43056,.06312,0,.51111],113:[.19444,.43056,.08847,0,.46],114:[0,.43056,.10764,0,.42166],115:[0,.43056,.08208,0,.40889],116:[0,.61508,.09486,0,.33222],117:[0,.43056,.07671,0,.53666],118:[0,.43056,.10764,0,.46],119:[0,.43056,.10764,0,.66444],120:[0,.43056,.12042,0,.46389],121:[.19444,.43056,.08847,0,.48555],122:[0,.43056,.12292,0,.40889],126:[.35,.31786,.11585,0,.51111],160:[0,0,0,0,.25],168:[0,.66786,.10474,0,.51111],176:[0,.69444,0,0,.83129],184:[.17014,0,0,0,.46],198:[0,.68333,.12028,0,.88277],216:[.04861,.73194,.09403,0,.76666],223:[.19444,.69444,.10514,0,.53666],230:[0,.43056,.07514,0,.71555],248:[.09722,.52778,.09194,0,.51111],338:[0,.68333,.12028,0,.98499],339:[0,.43056,.07514,0,.71555],710:[0,.69444,.06646,0,.51111],711:[0,.62847,.08295,0,.51111],713:[0,.56167,.10333,0,.51111],714:[0,.69444,.09694,0,.51111],715:[0,.69444,0,0,.51111],728:[0,.69444,.10806,0,.51111],729:[0,.66786,.11752,0,.30667],730:[0,.69444,0,0,.83129],732:[0,.66786,.11585,0,.51111],733:[0,.69444,.1225,0,.51111],915:[0,.68333,.13305,0,.62722],916:[0,.68333,0,0,.81777],920:[0,.68333,.09403,0,.76666],923:[0,.68333,0,0,.69222],926:[0,.68333,.15294,0,.66444],928:[0,.68333,.16389,0,.74333],931:[0,.68333,.12028,0,.71555],933:[0,.68333,.11111,0,.76666],934:[0,.68333,.05986,0,.71555],936:[0,.68333,.11111,0,.76666],937:[0,.68333,.10257,0,.71555],8211:[0,.43056,.09208,0,.51111],8212:[0,.43056,.09208,0,1.02222],8216:[0,.69444,.12417,0,.30667],8217:[0,.69444,.12417,0,.30667],8220:[0,.69444,.1685,0,.51444],8221:[0,.69444,.06961,0,.51444],8463:[0,.68889,0,0,.54028]},"Main-Regular":{32:[0,0,0,0,.25],33:[0,.69444,0,0,.27778],34:[0,.69444,0,0,.5],35:[.19444,.69444,0,0,.83334],36:[.05556,.75,0,0,.5],37:[.05556,.75,0,0,.83334],38:[0,.69444,0,0,.77778],39:[0,.69444,0,0,.27778],40:[.25,.75,0,0,.38889],41:[.25,.75,0,0,.38889],42:[0,.75,0,0,.5],43:[.08333,.58333,0,0,.77778],44:[.19444,.10556,0,0,.27778],45:[0,.43056,0,0,.33333],46:[0,.10556,0,0,.27778],47:[.25,.75,0,0,.5],48:[0,.64444,0,0,.5],49:[0,.64444,0,0,.5],50:[0,.64444,0,0,.5],51:[0,.64444,0,0,.5],52:[0,.64444,0,0,.5],53:[0,.64444,0,0,.5],54:[0,.64444,0,0,.5],55:[0,.64444,0,0,.5],56:[0,.64444,0,0,.5],57:[0,.64444,0,0,.5],58:[0,.43056,0,0,.27778],59:[.19444,.43056,0,0,.27778],60:[.0391,.5391,0,0,.77778],61:[-.13313,.36687,0,0,.77778],62:[.0391,.5391,0,0,.77778],63:[0,.69444,0,0,.47222],64:[0,.69444,0,0,.77778],65:[0,.68333,0,0,.75],66:[0,.68333,0,0,.70834],67:[0,.68333,0,0,.72222],68:[0,.68333,0,0,.76389],69:[0,.68333,0,0,.68056],70:[0,.68333,0,0,.65278],71:[0,.68333,0,0,.78472],72:[0,.68333,0,0,.75],73:[0,.68333,0,0,.36111],74:[0,.68333,0,0,.51389],75:[0,.68333,0,0,.77778],76:[0,.68333,0,0,.625],77:[0,.68333,0,0,.91667],78:[0,.68333,0,0,.75],79:[0,.68333,0,0,.77778],80:[0,.68333,0,0,.68056],81:[.19444,.68333,0,0,.77778],82:[0,.68333,0,0,.73611],83:[0,.68333,0,0,.55556],84:[0,.68333,0,0,.72222],85:[0,.68333,0,0,.75],86:[0,.68333,.01389,0,.75],87:[0,.68333,.01389,0,1.02778],88:[0,.68333,0,0,.75],89:[0,.68333,.025,0,.75],90:[0,.68333,0,0,.61111],91:[.25,.75,0,0,.27778],92:[.25,.75,0,0,.5],93:[.25,.75,0,0,.27778],94:[0,.69444,0,0,.5],95:[.31,.12056,.02778,0,.5],97:[0,.43056,0,0,.5],98:[0,.69444,0,0,.55556],99:[0,.43056,0,0,.44445],100:[0,.69444,0,0,.55556],101:[0,.43056,0,0,.44445],102:[0,.69444,.07778,0,.30556],103:[.19444,.43056,.01389,0,.5],104:[0,.69444,0,0,.55556],105:[0,.66786,0,0,.27778],106:[.19444,.66786,0,0,.30556],107:[0,.69444,0,0,.52778],108:[0,.69444,0,0,.27778],109:[0,.43056,0,0,.83334],110:[0,.43056,0,0,.55556],111:[0,.43056,0,0,.5],112:[.19444,.43056,0,0,.55556],113:[.19444,.43056,0,0,.52778],114:[0,.43056,0,0,.39167],115:[0,.43056,0,0,.39445],116:[0,.61508,0,0,.38889],117:[0,.43056,0,0,.55556],118:[0,.43056,.01389,0,.52778],119:[0,.43056,.01389,0,.72222],120:[0,.43056,0,0,.52778],121:[.19444,.43056,.01389,0,.52778],122:[0,.43056,0,0,.44445],123:[.25,.75,0,0,.5],124:[.25,.75,0,0,.27778],125:[.25,.75,0,0,.5],126:[.35,.31786,0,0,.5],160:[0,0,0,0,.25],163:[0,.69444,0,0,.76909],167:[.19444,.69444,0,0,.44445],168:[0,.66786,0,0,.5],172:[0,.43056,0,0,.66667],176:[0,.69444,0,0,.75],177:[.08333,.58333,0,0,.77778],182:[.19444,.69444,0,0,.61111],184:[.17014,0,0,0,.44445],198:[0,.68333,0,0,.90278],215:[.08333,.58333,0,0,.77778],216:[.04861,.73194,0,0,.77778],223:[0,.69444,0,0,.5],230:[0,.43056,0,0,.72222],247:[.08333,.58333,0,0,.77778],248:[.09722,.52778,0,0,.5],305:[0,.43056,0,0,.27778],338:[0,.68333,0,0,1.01389],339:[0,.43056,0,0,.77778],567:[.19444,.43056,0,0,.30556],710:[0,.69444,0,0,.5],711:[0,.62847,0,0,.5],713:[0,.56778,0,0,.5],714:[0,.69444,0,0,.5],715:[0,.69444,0,0,.5],728:[0,.69444,0,0,.5],729:[0,.66786,0,0,.27778],730:[0,.69444,0,0,.75],732:[0,.66786,0,0,.5],733:[0,.69444,0,0,.5],915:[0,.68333,0,0,.625],916:[0,.68333,0,0,.83334],920:[0,.68333,0,0,.77778],923:[0,.68333,0,0,.69445],926:[0,.68333,0,0,.66667],928:[0,.68333,0,0,.75],931:[0,.68333,0,0,.72222],933:[0,.68333,0,0,.77778],934:[0,.68333,0,0,.72222],936:[0,.68333,0,0,.77778],937:[0,.68333,0,0,.72222],8211:[0,.43056,.02778,0,.5],8212:[0,.43056,.02778,0,1],8216:[0,.69444,0,0,.27778],8217:[0,.69444,0,0,.27778],8220:[0,.69444,0,0,.5],8221:[0,.69444,0,0,.5],8224:[.19444,.69444,0,0,.44445],8225:[.19444,.69444,0,0,.44445],8230:[0,.123,0,0,1.172],8242:[0,.55556,0,0,.275],8407:[0,.71444,.15382,0,.5],8463:[0,.68889,0,0,.54028],8465:[0,.69444,0,0,.72222],8467:[0,.69444,0,.11111,.41667],8472:[.19444,.43056,0,.11111,.63646],8476:[0,.69444,0,0,.72222],8501:[0,.69444,0,0,.61111],8592:[-.13313,.36687,0,0,1],8593:[.19444,.69444,0,0,.5],8594:[-.13313,.36687,0,0,1],8595:[.19444,.69444,0,0,.5],8596:[-.13313,.36687,0,0,1],8597:[.25,.75,0,0,.5],8598:[.19444,.69444,0,0,1],8599:[.19444,.69444,0,0,1],8600:[.19444,.69444,0,0,1],8601:[.19444,.69444,0,0,1],8614:[.011,.511,0,0,1],8617:[.011,.511,0,0,1.126],8618:[.011,.511,0,0,1.126],8636:[-.13313,.36687,0,0,1],8637:[-.13313,.36687,0,0,1],8640:[-.13313,.36687,0,0,1],8641:[-.13313,.36687,0,0,1],8652:[.011,.671,0,0,1],8656:[-.13313,.36687,0,0,1],8657:[.19444,.69444,0,0,.61111],8658:[-.13313,.36687,0,0,1],8659:[.19444,.69444,0,0,.61111],8660:[-.13313,.36687,0,0,1],8661:[.25,.75,0,0,.61111],8704:[0,.69444,0,0,.55556],8706:[0,.69444,.05556,.08334,.5309],8707:[0,.69444,0,0,.55556],8709:[.05556,.75,0,0,.5],8711:[0,.68333,0,0,.83334],8712:[.0391,.5391,0,0,.66667],8715:[.0391,.5391,0,0,.66667],8722:[.08333,.58333,0,0,.77778],8723:[.08333,.58333,0,0,.77778],8725:[.25,.75,0,0,.5],8726:[.25,.75,0,0,.5],8727:[-.03472,.46528,0,0,.5],8728:[-.05555,.44445,0,0,.5],8729:[-.05555,.44445,0,0,.5],8730:[.2,.8,0,0,.83334],8733:[0,.43056,0,0,.77778],8734:[0,.43056,0,0,1],8736:[0,.69224,0,0,.72222],8739:[.25,.75,0,0,.27778],8741:[.25,.75,0,0,.5],8743:[0,.55556,0,0,.66667],8744:[0,.55556,0,0,.66667],8745:[0,.55556,0,0,.66667],8746:[0,.55556,0,0,.66667],8747:[.19444,.69444,.11111,0,.41667],8764:[-.13313,.36687,0,0,.77778],8768:[.19444,.69444,0,0,.27778],8771:[-.03625,.46375,0,0,.77778],8773:[-.022,.589,0,0,.778],8776:[-.01688,.48312,0,0,.77778],8781:[-.03625,.46375,0,0,.77778],8784:[-.133,.673,0,0,.778],8801:[-.03625,.46375,0,0,.77778],8804:[.13597,.63597,0,0,.77778],8805:[.13597,.63597,0,0,.77778],8810:[.0391,.5391,0,0,1],8811:[.0391,.5391,0,0,1],8826:[.0391,.5391,0,0,.77778],8827:[.0391,.5391,0,0,.77778],8834:[.0391,.5391,0,0,.77778],8835:[.0391,.5391,0,0,.77778],8838:[.13597,.63597,0,0,.77778],8839:[.13597,.63597,0,0,.77778],8846:[0,.55556,0,0,.66667],8849:[.13597,.63597,0,0,.77778],8850:[.13597,.63597,0,0,.77778],8851:[0,.55556,0,0,.66667],8852:[0,.55556,0,0,.66667],8853:[.08333,.58333,0,0,.77778],8854:[.08333,.58333,0,0,.77778],8855:[.08333,.58333,0,0,.77778],8856:[.08333,.58333,0,0,.77778],8857:[.08333,.58333,0,0,.77778],8866:[0,.69444,0,0,.61111],8867:[0,.69444,0,0,.61111],8868:[0,.69444,0,0,.77778],8869:[0,.69444,0,0,.77778],8872:[.249,.75,0,0,.867],8900:[-.05555,.44445,0,0,.5],8901:[-.05555,.44445,0,0,.27778],8902:[-.03472,.46528,0,0,.5],8904:[.005,.505,0,0,.9],8942:[.03,.903,0,0,.278],8943:[-.19,.313,0,0,1.172],8945:[-.1,.823,0,0,1.282],8968:[.25,.75,0,0,.44445],8969:[.25,.75,0,0,.44445],8970:[.25,.75,0,0,.44445],8971:[.25,.75,0,0,.44445],8994:[-.14236,.35764,0,0,1],8995:[-.14236,.35764,0,0,1],9136:[.244,.744,0,0,.412],9137:[.244,.745,0,0,.412],9651:[.19444,.69444,0,0,.88889],9657:[-.03472,.46528,0,0,.5],9661:[.19444,.69444,0,0,.88889],9667:[-.03472,.46528,0,0,.5],9711:[.19444,.69444,0,0,1],9824:[.12963,.69444,0,0,.77778],9825:[.12963,.69444,0,0,.77778],9826:[.12963,.69444,0,0,.77778],9827:[.12963,.69444,0,0,.77778],9837:[0,.75,0,0,.38889],9838:[.19444,.69444,0,0,.38889],9839:[.19444,.69444,0,0,.38889],10216:[.25,.75,0,0,.38889],10217:[.25,.75,0,0,.38889],10222:[.244,.744,0,0,.412],10223:[.244,.745,0,0,.412],10229:[.011,.511,0,0,1.609],10230:[.011,.511,0,0,1.638],10231:[.011,.511,0,0,1.859],10232:[.024,.525,0,0,1.609],10233:[.024,.525,0,0,1.638],10234:[.024,.525,0,0,1.858],10236:[.011,.511,0,0,1.638],10815:[0,.68333,0,0,.75],10927:[.13597,.63597,0,0,.77778],10928:[.13597,.63597,0,0,.77778],57376:[.19444,.69444,0,0,0]},"Math-BoldItalic":{32:[0,0,0,0,.25],48:[0,.44444,0,0,.575],49:[0,.44444,0,0,.575],50:[0,.44444,0,0,.575],51:[.19444,.44444,0,0,.575],52:[.19444,.44444,0,0,.575],53:[.19444,.44444,0,0,.575],54:[0,.64444,0,0,.575],55:[.19444,.44444,0,0,.575],56:[0,.64444,0,0,.575],57:[.19444,.44444,0,0,.575],65:[0,.68611,0,0,.86944],66:[0,.68611,.04835,0,.8664],67:[0,.68611,.06979,0,.81694],68:[0,.68611,.03194,0,.93812],69:[0,.68611,.05451,0,.81007],70:[0,.68611,.15972,0,.68889],71:[0,.68611,0,0,.88673],72:[0,.68611,.08229,0,.98229],73:[0,.68611,.07778,0,.51111],74:[0,.68611,.10069,0,.63125],75:[0,.68611,.06979,0,.97118],76:[0,.68611,0,0,.75555],77:[0,.68611,.11424,0,1.14201],78:[0,.68611,.11424,0,.95034],79:[0,.68611,.03194,0,.83666],80:[0,.68611,.15972,0,.72309],81:[.19444,.68611,0,0,.86861],82:[0,.68611,.00421,0,.87235],83:[0,.68611,.05382,0,.69271],84:[0,.68611,.15972,0,.63663],85:[0,.68611,.11424,0,.80027],86:[0,.68611,.25555,0,.67778],87:[0,.68611,.15972,0,1.09305],88:[0,.68611,.07778,0,.94722],89:[0,.68611,.25555,0,.67458],90:[0,.68611,.06979,0,.77257],97:[0,.44444,0,0,.63287],98:[0,.69444,0,0,.52083],99:[0,.44444,0,0,.51342],100:[0,.69444,0,0,.60972],101:[0,.44444,0,0,.55361],102:[.19444,.69444,.11042,0,.56806],103:[.19444,.44444,.03704,0,.5449],104:[0,.69444,0,0,.66759],105:[0,.69326,0,0,.4048],106:[.19444,.69326,.0622,0,.47083],107:[0,.69444,.01852,0,.6037],108:[0,.69444,.0088,0,.34815],109:[0,.44444,0,0,1.0324],110:[0,.44444,0,0,.71296],111:[0,.44444,0,0,.58472],112:[.19444,.44444,0,0,.60092],113:[.19444,.44444,.03704,0,.54213],114:[0,.44444,.03194,0,.5287],115:[0,.44444,0,0,.53125],116:[0,.63492,0,0,.41528],117:[0,.44444,0,0,.68102],118:[0,.44444,.03704,0,.56666],119:[0,.44444,.02778,0,.83148],120:[0,.44444,0,0,.65903],121:[.19444,.44444,.03704,0,.59028],122:[0,.44444,.04213,0,.55509],160:[0,0,0,0,.25],915:[0,.68611,.15972,0,.65694],916:[0,.68611,0,0,.95833],920:[0,.68611,.03194,0,.86722],923:[0,.68611,0,0,.80555],926:[0,.68611,.07458,0,.84125],928:[0,.68611,.08229,0,.98229],931:[0,.68611,.05451,0,.88507],933:[0,.68611,.15972,0,.67083],934:[0,.68611,0,0,.76666],936:[0,.68611,.11653,0,.71402],937:[0,.68611,.04835,0,.8789],945:[0,.44444,0,0,.76064],946:[.19444,.69444,.03403,0,.65972],947:[.19444,.44444,.06389,0,.59003],948:[0,.69444,.03819,0,.52222],949:[0,.44444,0,0,.52882],950:[.19444,.69444,.06215,0,.50833],951:[.19444,.44444,.03704,0,.6],952:[0,.69444,.03194,0,.5618],953:[0,.44444,0,0,.41204],954:[0,.44444,0,0,.66759],955:[0,.69444,0,0,.67083],956:[.19444,.44444,0,0,.70787],957:[0,.44444,.06898,0,.57685],958:[.19444,.69444,.03021,0,.50833],959:[0,.44444,0,0,.58472],960:[0,.44444,.03704,0,.68241],961:[.19444,.44444,0,0,.6118],962:[.09722,.44444,.07917,0,.42361],963:[0,.44444,.03704,0,.68588],964:[0,.44444,.13472,0,.52083],965:[0,.44444,.03704,0,.63055],966:[.19444,.44444,0,0,.74722],967:[.19444,.44444,0,0,.71805],968:[.19444,.69444,.03704,0,.75833],969:[0,.44444,.03704,0,.71782],977:[0,.69444,0,0,.69155],981:[.19444,.69444,0,0,.7125],982:[0,.44444,.03194,0,.975],1009:[.19444,.44444,0,0,.6118],1013:[0,.44444,0,0,.48333],57649:[0,.44444,0,0,.39352],57911:[.19444,.44444,0,0,.43889]},"Math-Italic":{32:[0,0,0,0,.25],48:[0,.43056,0,0,.5],49:[0,.43056,0,0,.5],50:[0,.43056,0,0,.5],51:[.19444,.43056,0,0,.5],52:[.19444,.43056,0,0,.5],53:[.19444,.43056,0,0,.5],54:[0,.64444,0,0,.5],55:[.19444,.43056,0,0,.5],56:[0,.64444,0,0,.5],57:[.19444,.43056,0,0,.5],65:[0,.68333,0,.13889,.75],66:[0,.68333,.05017,.08334,.75851],67:[0,.68333,.07153,.08334,.71472],68:[0,.68333,.02778,.05556,.82792],69:[0,.68333,.05764,.08334,.7382],70:[0,.68333,.13889,.08334,.64306],71:[0,.68333,0,.08334,.78625],72:[0,.68333,.08125,.05556,.83125],73:[0,.68333,.07847,.11111,.43958],74:[0,.68333,.09618,.16667,.55451],75:[0,.68333,.07153,.05556,.84931],76:[0,.68333,0,.02778,.68056],77:[0,.68333,.10903,.08334,.97014],78:[0,.68333,.10903,.08334,.80347],79:[0,.68333,.02778,.08334,.76278],80:[0,.68333,.13889,.08334,.64201],81:[.19444,.68333,0,.08334,.79056],82:[0,.68333,.00773,.08334,.75929],83:[0,.68333,.05764,.08334,.6132],84:[0,.68333,.13889,.08334,.58438],85:[0,.68333,.10903,.02778,.68278],86:[0,.68333,.22222,0,.58333],87:[0,.68333,.13889,0,.94445],88:[0,.68333,.07847,.08334,.82847],89:[0,.68333,.22222,0,.58056],90:[0,.68333,.07153,.08334,.68264],97:[0,.43056,0,0,.52859],98:[0,.69444,0,0,.42917],99:[0,.43056,0,.05556,.43276],100:[0,.69444,0,.16667,.52049],101:[0,.43056,0,.05556,.46563],102:[.19444,.69444,.10764,.16667,.48959],103:[.19444,.43056,.03588,.02778,.47697],104:[0,.69444,0,0,.57616],105:[0,.65952,0,0,.34451],106:[.19444,.65952,.05724,0,.41181],107:[0,.69444,.03148,0,.5206],108:[0,.69444,.01968,.08334,.29838],109:[0,.43056,0,0,.87801],110:[0,.43056,0,0,.60023],111:[0,.43056,0,.05556,.48472],112:[.19444,.43056,0,.08334,.50313],113:[.19444,.43056,.03588,.08334,.44641],114:[0,.43056,.02778,.05556,.45116],115:[0,.43056,0,.05556,.46875],116:[0,.61508,0,.08334,.36111],117:[0,.43056,0,.02778,.57246],118:[0,.43056,.03588,.02778,.48472],119:[0,.43056,.02691,.08334,.71592],120:[0,.43056,0,.02778,.57153],121:[.19444,.43056,.03588,.05556,.49028],122:[0,.43056,.04398,.05556,.46505],160:[0,0,0,0,.25],915:[0,.68333,.13889,.08334,.61528],916:[0,.68333,0,.16667,.83334],920:[0,.68333,.02778,.08334,.76278],923:[0,.68333,0,.16667,.69445],926:[0,.68333,.07569,.08334,.74236],928:[0,.68333,.08125,.05556,.83125],931:[0,.68333,.05764,.08334,.77986],933:[0,.68333,.13889,.05556,.58333],934:[0,.68333,0,.08334,.66667],936:[0,.68333,.11,.05556,.61222],937:[0,.68333,.05017,.08334,.7724],945:[0,.43056,.0037,.02778,.6397],946:[.19444,.69444,.05278,.08334,.56563],947:[.19444,.43056,.05556,0,.51773],948:[0,.69444,.03785,.05556,.44444],949:[0,.43056,0,.08334,.46632],950:[.19444,.69444,.07378,.08334,.4375],951:[.19444,.43056,.03588,.05556,.49653],952:[0,.69444,.02778,.08334,.46944],953:[0,.43056,0,.05556,.35394],954:[0,.43056,0,0,.57616],955:[0,.69444,0,0,.58334],956:[.19444,.43056,0,.02778,.60255],957:[0,.43056,.06366,.02778,.49398],958:[.19444,.69444,.04601,.11111,.4375],959:[0,.43056,0,.05556,.48472],960:[0,.43056,.03588,0,.57003],961:[.19444,.43056,0,.08334,.51702],962:[.09722,.43056,.07986,.08334,.36285],963:[0,.43056,.03588,0,.57141],964:[0,.43056,.1132,.02778,.43715],965:[0,.43056,.03588,.02778,.54028],966:[.19444,.43056,0,.08334,.65417],967:[.19444,.43056,0,.05556,.62569],968:[.19444,.69444,.03588,.11111,.65139],969:[0,.43056,.03588,0,.62245],977:[0,.69444,0,.08334,.59144],981:[.19444,.69444,0,.08334,.59583],982:[0,.43056,.02778,0,.82813],1009:[.19444,.43056,0,.08334,.51702],1013:[0,.43056,0,.05556,.4059],57649:[0,.43056,0,.02778,.32246],57911:[.19444,.43056,0,.08334,.38403]},"SansSerif-Bold":{32:[0,0,0,0,.25],33:[0,.69444,0,0,.36667],34:[0,.69444,0,0,.55834],35:[.19444,.69444,0,0,.91667],36:[.05556,.75,0,0,.55],37:[.05556,.75,0,0,1.02912],38:[0,.69444,0,0,.83056],39:[0,.69444,0,0,.30556],40:[.25,.75,0,0,.42778],41:[.25,.75,0,0,.42778],42:[0,.75,0,0,.55],43:[.11667,.61667,0,0,.85556],44:[.10556,.13056,0,0,.30556],45:[0,.45833,0,0,.36667],46:[0,.13056,0,0,.30556],47:[.25,.75,0,0,.55],48:[0,.69444,0,0,.55],49:[0,.69444,0,0,.55],50:[0,.69444,0,0,.55],51:[0,.69444,0,0,.55],52:[0,.69444,0,0,.55],53:[0,.69444,0,0,.55],54:[0,.69444,0,0,.55],55:[0,.69444,0,0,.55],56:[0,.69444,0,0,.55],57:[0,.69444,0,0,.55],58:[0,.45833,0,0,.30556],59:[.10556,.45833,0,0,.30556],61:[-.09375,.40625,0,0,.85556],63:[0,.69444,0,0,.51945],64:[0,.69444,0,0,.73334],65:[0,.69444,0,0,.73334],66:[0,.69444,0,0,.73334],67:[0,.69444,0,0,.70278],68:[0,.69444,0,0,.79445],69:[0,.69444,0,0,.64167],70:[0,.69444,0,0,.61111],71:[0,.69444,0,0,.73334],72:[0,.69444,0,0,.79445],73:[0,.69444,0,0,.33056],74:[0,.69444,0,0,.51945],75:[0,.69444,0,0,.76389],76:[0,.69444,0,0,.58056],77:[0,.69444,0,0,.97778],78:[0,.69444,0,0,.79445],79:[0,.69444,0,0,.79445],80:[0,.69444,0,0,.70278],81:[.10556,.69444,0,0,.79445],82:[0,.69444,0,0,.70278],83:[0,.69444,0,0,.61111],84:[0,.69444,0,0,.73334],85:[0,.69444,0,0,.76389],86:[0,.69444,.01528,0,.73334],87:[0,.69444,.01528,0,1.03889],88:[0,.69444,0,0,.73334],89:[0,.69444,.0275,0,.73334],90:[0,.69444,0,0,.67223],91:[.25,.75,0,0,.34306],93:[.25,.75,0,0,.34306],94:[0,.69444,0,0,.55],95:[.35,.10833,.03056,0,.55],97:[0,.45833,0,0,.525],98:[0,.69444,0,0,.56111],99:[0,.45833,0,0,.48889],100:[0,.69444,0,0,.56111],101:[0,.45833,0,0,.51111],102:[0,.69444,.07639,0,.33611],103:[.19444,.45833,.01528,0,.55],104:[0,.69444,0,0,.56111],105:[0,.69444,0,0,.25556],106:[.19444,.69444,0,0,.28611],107:[0,.69444,0,0,.53056],108:[0,.69444,0,0,.25556],109:[0,.45833,0,0,.86667],110:[0,.45833,0,0,.56111],111:[0,.45833,0,0,.55],112:[.19444,.45833,0,0,.56111],113:[.19444,.45833,0,0,.56111],114:[0,.45833,.01528,0,.37222],115:[0,.45833,0,0,.42167],116:[0,.58929,0,0,.40417],117:[0,.45833,0,0,.56111],118:[0,.45833,.01528,0,.5],119:[0,.45833,.01528,0,.74445],120:[0,.45833,0,0,.5],121:[.19444,.45833,.01528,0,.5],122:[0,.45833,0,0,.47639],126:[.35,.34444,0,0,.55],160:[0,0,0,0,.25],168:[0,.69444,0,0,.55],176:[0,.69444,0,0,.73334],180:[0,.69444,0,0,.55],184:[.17014,0,0,0,.48889],305:[0,.45833,0,0,.25556],567:[.19444,.45833,0,0,.28611],710:[0,.69444,0,0,.55],711:[0,.63542,0,0,.55],713:[0,.63778,0,0,.55],728:[0,.69444,0,0,.55],729:[0,.69444,0,0,.30556],730:[0,.69444,0,0,.73334],732:[0,.69444,0,0,.55],733:[0,.69444,0,0,.55],915:[0,.69444,0,0,.58056],916:[0,.69444,0,0,.91667],920:[0,.69444,0,0,.85556],923:[0,.69444,0,0,.67223],926:[0,.69444,0,0,.73334],928:[0,.69444,0,0,.79445],931:[0,.69444,0,0,.79445],933:[0,.69444,0,0,.85556],934:[0,.69444,0,0,.79445],936:[0,.69444,0,0,.85556],937:[0,.69444,0,0,.79445],8211:[0,.45833,.03056,0,.55],8212:[0,.45833,.03056,0,1.10001],8216:[0,.69444,0,0,.30556],8217:[0,.69444,0,0,.30556],8220:[0,.69444,0,0,.55834],8221:[0,.69444,0,0,.55834]},"SansSerif-Italic":{32:[0,0,0,0,.25],33:[0,.69444,.05733,0,.31945],34:[0,.69444,.00316,0,.5],35:[.19444,.69444,.05087,0,.83334],36:[.05556,.75,.11156,0,.5],37:[.05556,.75,.03126,0,.83334],38:[0,.69444,.03058,0,.75834],39:[0,.69444,.07816,0,.27778],40:[.25,.75,.13164,0,.38889],41:[.25,.75,.02536,0,.38889],42:[0,.75,.11775,0,.5],43:[.08333,.58333,.02536,0,.77778],44:[.125,.08333,0,0,.27778],45:[0,.44444,.01946,0,.33333],46:[0,.08333,0,0,.27778],47:[.25,.75,.13164,0,.5],48:[0,.65556,.11156,0,.5],49:[0,.65556,.11156,0,.5],50:[0,.65556,.11156,0,.5],51:[0,.65556,.11156,0,.5],52:[0,.65556,.11156,0,.5],53:[0,.65556,.11156,0,.5],54:[0,.65556,.11156,0,.5],55:[0,.65556,.11156,0,.5],56:[0,.65556,.11156,0,.5],57:[0,.65556,.11156,0,.5],58:[0,.44444,.02502,0,.27778],59:[.125,.44444,.02502,0,.27778],61:[-.13,.37,.05087,0,.77778],63:[0,.69444,.11809,0,.47222],64:[0,.69444,.07555,0,.66667],65:[0,.69444,0,0,.66667],66:[0,.69444,.08293,0,.66667],67:[0,.69444,.11983,0,.63889],68:[0,.69444,.07555,0,.72223],69:[0,.69444,.11983,0,.59722],70:[0,.69444,.13372,0,.56945],71:[0,.69444,.11983,0,.66667],72:[0,.69444,.08094,0,.70834],73:[0,.69444,.13372,0,.27778],74:[0,.69444,.08094,0,.47222],75:[0,.69444,.11983,0,.69445],76:[0,.69444,0,0,.54167],77:[0,.69444,.08094,0,.875],78:[0,.69444,.08094,0,.70834],79:[0,.69444,.07555,0,.73611],80:[0,.69444,.08293,0,.63889],81:[.125,.69444,.07555,0,.73611],82:[0,.69444,.08293,0,.64584],83:[0,.69444,.09205,0,.55556],84:[0,.69444,.13372,0,.68056],85:[0,.69444,.08094,0,.6875],86:[0,.69444,.1615,0,.66667],87:[0,.69444,.1615,0,.94445],88:[0,.69444,.13372,0,.66667],89:[0,.69444,.17261,0,.66667],90:[0,.69444,.11983,0,.61111],91:[.25,.75,.15942,0,.28889],93:[.25,.75,.08719,0,.28889],94:[0,.69444,.0799,0,.5],95:[.35,.09444,.08616,0,.5],97:[0,.44444,.00981,0,.48056],98:[0,.69444,.03057,0,.51667],99:[0,.44444,.08336,0,.44445],100:[0,.69444,.09483,0,.51667],101:[0,.44444,.06778,0,.44445],102:[0,.69444,.21705,0,.30556],103:[.19444,.44444,.10836,0,.5],104:[0,.69444,.01778,0,.51667],105:[0,.67937,.09718,0,.23889],106:[.19444,.67937,.09162,0,.26667],107:[0,.69444,.08336,0,.48889],108:[0,.69444,.09483,0,.23889],109:[0,.44444,.01778,0,.79445],110:[0,.44444,.01778,0,.51667],111:[0,.44444,.06613,0,.5],112:[.19444,.44444,.0389,0,.51667],113:[.19444,.44444,.04169,0,.51667],114:[0,.44444,.10836,0,.34167],115:[0,.44444,.0778,0,.38333],116:[0,.57143,.07225,0,.36111],117:[0,.44444,.04169,0,.51667],118:[0,.44444,.10836,0,.46111],119:[0,.44444,.10836,0,.68334],120:[0,.44444,.09169,0,.46111],121:[.19444,.44444,.10836,0,.46111],122:[0,.44444,.08752,0,.43472],126:[.35,.32659,.08826,0,.5],160:[0,0,0,0,.25],168:[0,.67937,.06385,0,.5],176:[0,.69444,0,0,.73752],184:[.17014,0,0,0,.44445],305:[0,.44444,.04169,0,.23889],567:[.19444,.44444,.04169,0,.26667],710:[0,.69444,.0799,0,.5],711:[0,.63194,.08432,0,.5],713:[0,.60889,.08776,0,.5],714:[0,.69444,.09205,0,.5],715:[0,.69444,0,0,.5],728:[0,.69444,.09483,0,.5],729:[0,.67937,.07774,0,.27778],730:[0,.69444,0,0,.73752],732:[0,.67659,.08826,0,.5],733:[0,.69444,.09205,0,.5],915:[0,.69444,.13372,0,.54167],916:[0,.69444,0,0,.83334],920:[0,.69444,.07555,0,.77778],923:[0,.69444,0,0,.61111],926:[0,.69444,.12816,0,.66667],928:[0,.69444,.08094,0,.70834],931:[0,.69444,.11983,0,.72222],933:[0,.69444,.09031,0,.77778],934:[0,.69444,.04603,0,.72222],936:[0,.69444,.09031,0,.77778],937:[0,.69444,.08293,0,.72222],8211:[0,.44444,.08616,0,.5],8212:[0,.44444,.08616,0,1],8216:[0,.69444,.07816,0,.27778],8217:[0,.69444,.07816,0,.27778],8220:[0,.69444,.14205,0,.5],8221:[0,.69444,.00316,0,.5]},"SansSerif-Regular":{32:[0,0,0,0,.25],33:[0,.69444,0,0,.31945],34:[0,.69444,0,0,.5],35:[.19444,.69444,0,0,.83334],36:[.05556,.75,0,0,.5],37:[.05556,.75,0,0,.83334],38:[0,.69444,0,0,.75834],39:[0,.69444,0,0,.27778],40:[.25,.75,0,0,.38889],41:[.25,.75,0,0,.38889],42:[0,.75,0,0,.5],43:[.08333,.58333,0,0,.77778],44:[.125,.08333,0,0,.27778],45:[0,.44444,0,0,.33333],46:[0,.08333,0,0,.27778],47:[.25,.75,0,0,.5],48:[0,.65556,0,0,.5],49:[0,.65556,0,0,.5],50:[0,.65556,0,0,.5],51:[0,.65556,0,0,.5],52:[0,.65556,0,0,.5],53:[0,.65556,0,0,.5],54:[0,.65556,0,0,.5],55:[0,.65556,0,0,.5],56:[0,.65556,0,0,.5],57:[0,.65556,0,0,.5],58:[0,.44444,0,0,.27778],59:[.125,.44444,0,0,.27778],61:[-.13,.37,0,0,.77778],63:[0,.69444,0,0,.47222],64:[0,.69444,0,0,.66667],65:[0,.69444,0,0,.66667],66:[0,.69444,0,0,.66667],67:[0,.69444,0,0,.63889],68:[0,.69444,0,0,.72223],69:[0,.69444,0,0,.59722],70:[0,.69444,0,0,.56945],71:[0,.69444,0,0,.66667],72:[0,.69444,0,0,.70834],73:[0,.69444,0,0,.27778],74:[0,.69444,0,0,.47222],75:[0,.69444,0,0,.69445],76:[0,.69444,0,0,.54167],77:[0,.69444,0,0,.875],78:[0,.69444,0,0,.70834],79:[0,.69444,0,0,.73611],80:[0,.69444,0,0,.63889],81:[.125,.69444,0,0,.73611],82:[0,.69444,0,0,.64584],83:[0,.69444,0,0,.55556],84:[0,.69444,0,0,.68056],85:[0,.69444,0,0,.6875],86:[0,.69444,.01389,0,.66667],87:[0,.69444,.01389,0,.94445],88:[0,.69444,0,0,.66667],89:[0,.69444,.025,0,.66667],90:[0,.69444,0,0,.61111],91:[.25,.75,0,0,.28889],93:[.25,.75,0,0,.28889],94:[0,.69444,0,0,.5],95:[.35,.09444,.02778,0,.5],97:[0,.44444,0,0,.48056],98:[0,.69444,0,0,.51667],99:[0,.44444,0,0,.44445],100:[0,.69444,0,0,.51667],101:[0,.44444,0,0,.44445],102:[0,.69444,.06944,0,.30556],103:[.19444,.44444,.01389,0,.5],104:[0,.69444,0,0,.51667],105:[0,.67937,0,0,.23889],106:[.19444,.67937,0,0,.26667],107:[0,.69444,0,0,.48889],108:[0,.69444,0,0,.23889],109:[0,.44444,0,0,.79445],110:[0,.44444,0,0,.51667],111:[0,.44444,0,0,.5],112:[.19444,.44444,0,0,.51667],113:[.19444,.44444,0,0,.51667],114:[0,.44444,.01389,0,.34167],115:[0,.44444,0,0,.38333],116:[0,.57143,0,0,.36111],117:[0,.44444,0,0,.51667],118:[0,.44444,.01389,0,.46111],119:[0,.44444,.01389,0,.68334],120:[0,.44444,0,0,.46111],121:[.19444,.44444,.01389,0,.46111],122:[0,.44444,0,0,.43472],126:[.35,.32659,0,0,.5],160:[0,0,0,0,.25],168:[0,.67937,0,0,.5],176:[0,.69444,0,0,.66667],184:[.17014,0,0,0,.44445],305:[0,.44444,0,0,.23889],567:[.19444,.44444,0,0,.26667],710:[0,.69444,0,0,.5],711:[0,.63194,0,0,.5],713:[0,.60889,0,0,.5],714:[0,.69444,0,0,.5],715:[0,.69444,0,0,.5],728:[0,.69444,0,0,.5],729:[0,.67937,0,0,.27778],730:[0,.69444,0,0,.66667],732:[0,.67659,0,0,.5],733:[0,.69444,0,0,.5],915:[0,.69444,0,0,.54167],916:[0,.69444,0,0,.83334],920:[0,.69444,0,0,.77778],923:[0,.69444,0,0,.61111],926:[0,.69444,0,0,.66667],928:[0,.69444,0,0,.70834],931:[0,.69444,0,0,.72222],933:[0,.69444,0,0,.77778],934:[0,.69444,0,0,.72222],936:[0,.69444,0,0,.77778],937:[0,.69444,0,0,.72222],8211:[0,.44444,.02778,0,.5],8212:[0,.44444,.02778,0,1],8216:[0,.69444,0,0,.27778],8217:[0,.69444,0,0,.27778],8220:[0,.69444,0,0,.5],8221:[0,.69444,0,0,.5]},"Script-Regular":{32:[0,0,0,0,.25],65:[0,.7,.22925,0,.80253],66:[0,.7,.04087,0,.90757],67:[0,.7,.1689,0,.66619],68:[0,.7,.09371,0,.77443],69:[0,.7,.18583,0,.56162],70:[0,.7,.13634,0,.89544],71:[0,.7,.17322,0,.60961],72:[0,.7,.29694,0,.96919],73:[0,.7,.19189,0,.80907],74:[.27778,.7,.19189,0,1.05159],75:[0,.7,.31259,0,.91364],76:[0,.7,.19189,0,.87373],77:[0,.7,.15981,0,1.08031],78:[0,.7,.3525,0,.9015],79:[0,.7,.08078,0,.73787],80:[0,.7,.08078,0,1.01262],81:[0,.7,.03305,0,.88282],82:[0,.7,.06259,0,.85],83:[0,.7,.19189,0,.86767],84:[0,.7,.29087,0,.74697],85:[0,.7,.25815,0,.79996],86:[0,.7,.27523,0,.62204],87:[0,.7,.27523,0,.80532],88:[0,.7,.26006,0,.94445],89:[0,.7,.2939,0,.70961],90:[0,.7,.24037,0,.8212],160:[0,0,0,0,.25]},"Size1-Regular":{32:[0,0,0,0,.25],40:[.35001,.85,0,0,.45834],41:[.35001,.85,0,0,.45834],47:[.35001,.85,0,0,.57778],91:[.35001,.85,0,0,.41667],92:[.35001,.85,0,0,.57778],93:[.35001,.85,0,0,.41667],123:[.35001,.85,0,0,.58334],125:[.35001,.85,0,0,.58334],160:[0,0,0,0,.25],710:[0,.72222,0,0,.55556],732:[0,.72222,0,0,.55556],770:[0,.72222,0,0,.55556],771:[0,.72222,0,0,.55556],8214:[-99e-5,.601,0,0,.77778],8593:[1e-5,.6,0,0,.66667],8595:[1e-5,.6,0,0,.66667],8657:[1e-5,.6,0,0,.77778],8659:[1e-5,.6,0,0,.77778],8719:[.25001,.75,0,0,.94445],8720:[.25001,.75,0,0,.94445],8721:[.25001,.75,0,0,1.05556],8730:[.35001,.85,0,0,1],8739:[-.00599,.606,0,0,.33333],8741:[-.00599,.606,0,0,.55556],8747:[.30612,.805,.19445,0,.47222],8748:[.306,.805,.19445,0,.47222],8749:[.306,.805,.19445,0,.47222],8750:[.30612,.805,.19445,0,.47222],8896:[.25001,.75,0,0,.83334],8897:[.25001,.75,0,0,.83334],8898:[.25001,.75,0,0,.83334],8899:[.25001,.75,0,0,.83334],8968:[.35001,.85,0,0,.47222],8969:[.35001,.85,0,0,.47222],8970:[.35001,.85,0,0,.47222],8971:[.35001,.85,0,0,.47222],9168:[-99e-5,.601,0,0,.66667],10216:[.35001,.85,0,0,.47222],10217:[.35001,.85,0,0,.47222],10752:[.25001,.75,0,0,1.11111],10753:[.25001,.75,0,0,1.11111],10754:[.25001,.75,0,0,1.11111],10756:[.25001,.75,0,0,.83334],10758:[.25001,.75,0,0,.83334]},"Size2-Regular":{32:[0,0,0,0,.25],40:[.65002,1.15,0,0,.59722],41:[.65002,1.15,0,0,.59722],47:[.65002,1.15,0,0,.81111],91:[.65002,1.15,0,0,.47222],92:[.65002,1.15,0,0,.81111],93:[.65002,1.15,0,0,.47222],123:[.65002,1.15,0,0,.66667],125:[.65002,1.15,0,0,.66667],160:[0,0,0,0,.25],710:[0,.75,0,0,1],732:[0,.75,0,0,1],770:[0,.75,0,0,1],771:[0,.75,0,0,1],8719:[.55001,1.05,0,0,1.27778],8720:[.55001,1.05,0,0,1.27778],8721:[.55001,1.05,0,0,1.44445],8730:[.65002,1.15,0,0,1],8747:[.86225,1.36,.44445,0,.55556],8748:[.862,1.36,.44445,0,.55556],8749:[.862,1.36,.44445,0,.55556],8750:[.86225,1.36,.44445,0,.55556],8896:[.55001,1.05,0,0,1.11111],8897:[.55001,1.05,0,0,1.11111],8898:[.55001,1.05,0,0,1.11111],8899:[.55001,1.05,0,0,1.11111],8968:[.65002,1.15,0,0,.52778],8969:[.65002,1.15,0,0,.52778],8970:[.65002,1.15,0,0,.52778],8971:[.65002,1.15,0,0,.52778],10216:[.65002,1.15,0,0,.61111],10217:[.65002,1.15,0,0,.61111],10752:[.55001,1.05,0,0,1.51112],10753:[.55001,1.05,0,0,1.51112],10754:[.55001,1.05,0,0,1.51112],10756:[.55001,1.05,0,0,1.11111],10758:[.55001,1.05,0,0,1.11111]},"Size3-Regular":{32:[0,0,0,0,.25],40:[.95003,1.45,0,0,.73611],41:[.95003,1.45,0,0,.73611],47:[.95003,1.45,0,0,1.04445],91:[.95003,1.45,0,0,.52778],92:[.95003,1.45,0,0,1.04445],93:[.95003,1.45,0,0,.52778],123:[.95003,1.45,0,0,.75],125:[.95003,1.45,0,0,.75],160:[0,0,0,0,.25],710:[0,.75,0,0,1.44445],732:[0,.75,0,0,1.44445],770:[0,.75,0,0,1.44445],771:[0,.75,0,0,1.44445],8730:[.95003,1.45,0,0,1],8968:[.95003,1.45,0,0,.58334],8969:[.95003,1.45,0,0,.58334],8970:[.95003,1.45,0,0,.58334],8971:[.95003,1.45,0,0,.58334],10216:[.95003,1.45,0,0,.75],10217:[.95003,1.45,0,0,.75]},"Size4-Regular":{32:[0,0,0,0,.25],40:[1.25003,1.75,0,0,.79167],41:[1.25003,1.75,0,0,.79167],47:[1.25003,1.75,0,0,1.27778],91:[1.25003,1.75,0,0,.58334],92:[1.25003,1.75,0,0,1.27778],93:[1.25003,1.75,0,0,.58334],123:[1.25003,1.75,0,0,.80556],125:[1.25003,1.75,0,0,.80556],160:[0,0,0,0,.25],710:[0,.825,0,0,1.8889],732:[0,.825,0,0,1.8889],770:[0,.825,0,0,1.8889],771:[0,.825,0,0,1.8889],8730:[1.25003,1.75,0,0,1],8968:[1.25003,1.75,0,0,.63889],8969:[1.25003,1.75,0,0,.63889],8970:[1.25003,1.75,0,0,.63889],8971:[1.25003,1.75,0,0,.63889],9115:[.64502,1.155,0,0,.875],9116:[1e-5,.6,0,0,.875],9117:[.64502,1.155,0,0,.875],9118:[.64502,1.155,0,0,.875],9119:[1e-5,.6,0,0,.875],9120:[.64502,1.155,0,0,.875],9121:[.64502,1.155,0,0,.66667],9122:[-99e-5,.601,0,0,.66667],9123:[.64502,1.155,0,0,.66667],9124:[.64502,1.155,0,0,.66667],9125:[-99e-5,.601,0,0,.66667],9126:[.64502,1.155,0,0,.66667],9127:[1e-5,.9,0,0,.88889],9128:[.65002,1.15,0,0,.88889],9129:[.90001,0,0,0,.88889],9130:[0,.3,0,0,.88889],9131:[1e-5,.9,0,0,.88889],9132:[.65002,1.15,0,0,.88889],9133:[.90001,0,0,0,.88889],9143:[.88502,.915,0,0,1.05556],10216:[1.25003,1.75,0,0,.80556],10217:[1.25003,1.75,0,0,.80556],57344:[-.00499,.605,0,0,1.05556],57345:[-.00499,.605,0,0,1.05556],57680:[0,.12,0,0,.45],57681:[0,.12,0,0,.45],57682:[0,.12,0,0,.45],57683:[0,.12,0,0,.45]},"Typewriter-Regular":{32:[0,0,0,0,.525],33:[0,.61111,0,0,.525],34:[0,.61111,0,0,.525],35:[0,.61111,0,0,.525],36:[.08333,.69444,0,0,.525],37:[.08333,.69444,0,0,.525],38:[0,.61111,0,0,.525],39:[0,.61111,0,0,.525],40:[.08333,.69444,0,0,.525],41:[.08333,.69444,0,0,.525],42:[0,.52083,0,0,.525],43:[-.08056,.53055,0,0,.525],44:[.13889,.125,0,0,.525],45:[-.08056,.53055,0,0,.525],46:[0,.125,0,0,.525],47:[.08333,.69444,0,0,.525],48:[0,.61111,0,0,.525],49:[0,.61111,0,0,.525],50:[0,.61111,0,0,.525],51:[0,.61111,0,0,.525],52:[0,.61111,0,0,.525],53:[0,.61111,0,0,.525],54:[0,.61111,0,0,.525],55:[0,.61111,0,0,.525],56:[0,.61111,0,0,.525],57:[0,.61111,0,0,.525],58:[0,.43056,0,0,.525],59:[.13889,.43056,0,0,.525],60:[-.05556,.55556,0,0,.525],61:[-.19549,.41562,0,0,.525],62:[-.05556,.55556,0,0,.525],63:[0,.61111,0,0,.525],64:[0,.61111,0,0,.525],65:[0,.61111,0,0,.525],66:[0,.61111,0,0,.525],67:[0,.61111,0,0,.525],68:[0,.61111,0,0,.525],69:[0,.61111,0,0,.525],70:[0,.61111,0,0,.525],71:[0,.61111,0,0,.525],72:[0,.61111,0,0,.525],73:[0,.61111,0,0,.525],74:[0,.61111,0,0,.525],75:[0,.61111,0,0,.525],76:[0,.61111,0,0,.525],77:[0,.61111,0,0,.525],78:[0,.61111,0,0,.525],79:[0,.61111,0,0,.525],80:[0,.61111,0,0,.525],81:[.13889,.61111,0,0,.525],82:[0,.61111,0,0,.525],83:[0,.61111,0,0,.525],84:[0,.61111,0,0,.525],85:[0,.61111,0,0,.525],86:[0,.61111,0,0,.525],87:[0,.61111,0,0,.525],88:[0,.61111,0,0,.525],89:[0,.61111,0,0,.525],90:[0,.61111,0,0,.525],91:[.08333,.69444,0,0,.525],92:[.08333,.69444,0,0,.525],93:[.08333,.69444,0,0,.525],94:[0,.61111,0,0,.525],95:[.09514,0,0,0,.525],96:[0,.61111,0,0,.525],97:[0,.43056,0,0,.525],98:[0,.61111,0,0,.525],99:[0,.43056,0,0,.525],100:[0,.61111,0,0,.525],101:[0,.43056,0,0,.525],102:[0,.61111,0,0,.525],103:[.22222,.43056,0,0,.525],104:[0,.61111,0,0,.525],105:[0,.61111,0,0,.525],106:[.22222,.61111,0,0,.525],107:[0,.61111,0,0,.525],108:[0,.61111,0,0,.525],109:[0,.43056,0,0,.525],110:[0,.43056,0,0,.525],111:[0,.43056,0,0,.525],112:[.22222,.43056,0,0,.525],113:[.22222,.43056,0,0,.525],114:[0,.43056,0,0,.525],115:[0,.43056,0,0,.525],116:[0,.55358,0,0,.525],117:[0,.43056,0,0,.525],118:[0,.43056,0,0,.525],119:[0,.43056,0,0,.525],120:[0,.43056,0,0,.525],121:[.22222,.43056,0,0,.525],122:[0,.43056,0,0,.525],123:[.08333,.69444,0,0,.525],124:[.08333,.69444,0,0,.525],125:[.08333,.69444,0,0,.525],126:[0,.61111,0,0,.525],127:[0,.61111,0,0,.525],160:[0,0,0,0,.525],176:[0,.61111,0,0,.525],184:[.19445,0,0,0,.525],305:[0,.43056,0,0,.525],567:[.22222,.43056,0,0,.525],711:[0,.56597,0,0,.525],713:[0,.56555,0,0,.525],714:[0,.61111,0,0,.525],715:[0,.61111,0,0,.525],728:[0,.61111,0,0,.525],730:[0,.61111,0,0,.525],770:[0,.61111,0,0,.525],771:[0,.61111,0,0,.525],776:[0,.61111,0,0,.525],915:[0,.61111,0,0,.525],916:[0,.61111,0,0,.525],920:[0,.61111,0,0,.525],923:[0,.61111,0,0,.525],926:[0,.61111,0,0,.525],928:[0,.61111,0,0,.525],931:[0,.61111,0,0,.525],933:[0,.61111,0,0,.525],934:[0,.61111,0,0,.525],936:[0,.61111,0,0,.525],937:[0,.61111,0,0,.525],8216:[0,.61111,0,0,.525],8217:[0,.61111,0,0,.525],8242:[0,.61111,0,0,.525],9251:[.11111,.21944,0,0,.525]}},c1={slant:[.25,.25,.25],space:[0,0,0],stretch:[0,0,0],shrink:[0,0,0],xHeight:[.431,.431,.431],quad:[1,1.171,1.472],extraSpace:[0,0,0],num1:[.677,.732,.925],num2:[.394,.384,.387],num3:[.444,.471,.504],denom1:[.686,.752,1.025],denom2:[.345,.344,.532],sup1:[.413,.503,.504],sup2:[.363,.431,.404],sup3:[.289,.286,.294],sub1:[.15,.143,.2],sub2:[.247,.286,.4],supDrop:[.386,.353,.494],subDrop:[.05,.071,.1],delim1:[2.39,1.7,1.98],delim2:[1.01,1.157,1.42],axisHeight:[.25,.25,.25],defaultRuleThickness:[.04,.049,.049],bigOpSpacing1:[.111,.111,.111],bigOpSpacing2:[.166,.166,.166],bigOpSpacing3:[.2,.2,.2],bigOpSpacing4:[.6,.611,.611],bigOpSpacing5:[.1,.143,.143],sqrtRuleThickness:[.04,.04,.04],ptPerEm:[10,10,10],doubleRuleSep:[.2,.2,.2],arrayRuleWidth:[.04,.04,.04],fboxsep:[.3,.3,.3],fboxrule:[.04,.04,.04]},GT={Å:"A",Ð:"D",Þ:"o",å:"a",ð:"d",þ:"o",А:"A",Б:"B",В:"B",Г:"F",Д:"A",Е:"E",Ж:"K",З:"3",И:"N",Й:"N",К:"K",Л:"N",М:"M",Н:"H",О:"O",П:"N",Р:"P",С:"C",Т:"T",У:"y",Ф:"O",Х:"X",Ц:"U",Ч:"h",Ш:"W",Щ:"W",Ъ:"B",Ы:"X",Ь:"B",Э:"3",Ю:"X",Я:"R",а:"a",б:"b",в:"a",г:"r",д:"y",е:"e",ж:"m",з:"e",и:"n",й:"n",к:"n",л:"n",м:"m",н:"n",о:"o",п:"n",р:"p",с:"c",т:"o",у:"y",ф:"b",х:"x",ц:"n",ч:"n",ш:"w",щ:"w",ъ:"a",ы:"m",ь:"a",э:"e",ю:"m",я:"r"};function d8n(e,n){Bo[e]=n}function j6(e,n,t){if(!Bo[n])throw new Error("Font metrics not found for font: "+n+".");var r=e.charCodeAt(0),s=Bo[n][r];if(!s&&e[0]in GT&&(r=GT[e[0]].charCodeAt(0),s=Bo[n][r]),!s&&t==="text"&&uP(r)&&(s=Bo[n][77]),s)return{depth:s[0],height:s[1],italic:s[2],skew:s[3],width:s[4]}}var jw={};function h8n(e){var n;if(e>=5?n=0:e>=3?n=1:n=2,!jw[n]){var t=jw[n]={cssEmPerMu:c1.quad[n]/18};for(var r in c1)c1.hasOwnProperty(r)&&(t[r]=c1[r][n])}return jw[n]}var Sr={math:{},text:{}};function B(e,n,t,r,s,i){Sr[e][s]={font:n,group:t,replace:r},i&&r&&(Sr[e][r]=Sr[e][s])}var K="math",Ve="text",J="main",fe="ams",Er="accent-token",ht="bin",di="close",zh="inner",Pt="mathord",ls="op-token",ua="open",km="punct",de="rel",oc="spacing",ve="textord";B(K,J,de,"≡","\\equiv",!0);B(K,J,de,"≺","\\prec",!0);B(K,J,de,"≻","\\succ",!0);B(K,J,de,"∼","\\sim",!0);B(K,J,de,"⊥","\\perp");B(K,J,de,"⪯","\\preceq",!0);B(K,J,de,"⪰","\\succeq",!0);B(K,J,de,"≃","\\simeq",!0);B(K,J,de,"∣","\\mid",!0);B(K,J,de,"≪","\\ll",!0);B(K,J,de,"≫","\\gg",!0);B(K,J,de,"≍","\\asymp",!0);B(K,J,de,"∥","\\parallel");B(K,J,de,"⋈","\\bowtie",!0);B(K,J,de,"⌣","\\smile",!0);B(K,J,de,"⊑","\\sqsubseteq",!0);B(K,J,de,"⊒","\\sqsupseteq",!0);B(K,J,de,"≐","\\doteq",!0);B(K,J,de,"⌢","\\frown",!0);B(K,J,de,"∋","\\ni",!0);B(K,J,de,"∝","\\propto",!0);B(K,J,de,"⊢","\\vdash",!0);B(K,J,de,"⊣","\\dashv",!0);B(K,J,de,"∋","\\owns");B(K,J,km,".","\\ldotp");B(K,J,km,"⋅","\\cdotp");B(K,J,km,"⋅","·");B(Ve,J,ve,"⋅","·");B(K,J,ve,"#","\\#");B(Ve,J,ve,"#","\\#");B(K,J,ve,"&","\\&");B(Ve,J,ve,"&","\\&");B(K,J,ve,"ℵ","\\aleph",!0);B(K,J,ve,"∀","\\forall",!0);B(K,J,ve,"ℏ","\\hbar",!0);B(K,J,ve,"∃","\\exists",!0);B(K,J,ve,"∇","\\nabla",!0);B(K,J,ve,"♭","\\flat",!0);B(K,J,ve,"ℓ","\\ell",!0);B(K,J,ve,"♮","\\natural",!0);B(K,J,ve,"♣","\\clubsuit",!0);B(K,J,ve,"℘","\\wp",!0);B(K,J,ve,"♯","\\sharp",!0);B(K,J,ve,"♢","\\diamondsuit",!0);B(K,J,ve,"ℜ","\\Re",!0);B(K,J,ve,"♡","\\heartsuit",!0);B(K,J,ve,"ℑ","\\Im",!0);B(K,J,ve,"♠","\\spadesuit",!0);B(K,J,ve,"§","\\S",!0);B(Ve,J,ve,"§","\\S");B(K,J,ve,"¶","\\P",!0);B(Ve,J,ve,"¶","\\P");B(K,J,ve,"†","\\dag");B(Ve,J,ve,"†","\\dag");B(Ve,J,ve,"†","\\textdagger");B(K,J,ve,"‡","\\ddag");B(Ve,J,ve,"‡","\\ddag");B(Ve,J,ve,"‡","\\textdaggerdbl");B(K,J,di,"⎱","\\rmoustache",!0);B(K,J,ua,"⎰","\\lmoustache",!0);B(K,J,di,"⟯","\\rgroup",!0);B(K,J,ua,"⟮","\\lgroup",!0);B(K,J,ht,"∓","\\mp",!0);B(K,J,ht,"⊖","\\ominus",!0);B(K,J,ht,"⊎","\\uplus",!0);B(K,J,ht,"⊓","\\sqcap",!0);B(K,J,ht,"∗","\\ast");B(K,J,ht,"⊔","\\sqcup",!0);B(K,J,ht,"◯","\\bigcirc",!0);B(K,J,ht,"∙","\\bullet",!0);B(K,J,ht,"‡","\\ddagger");B(K,J,ht,"≀","\\wr",!0);B(K,J,ht,"⨿","\\amalg");B(K,J,ht,"&","\\And");B(K,J,de,"⟵","\\longleftarrow",!0);B(K,J,de,"⇐","\\Leftarrow",!0);B(K,J,de,"⟸","\\Longleftarrow",!0);B(K,J,de,"⟶","\\longrightarrow",!0);B(K,J,de,"⇒","\\Rightarrow",!0);B(K,J,de,"⟹","\\Longrightarrow",!0);B(K,J,de,"↔","\\leftrightarrow",!0);B(K,J,de,"⟷","\\longleftrightarrow",!0);B(K,J,de,"⇔","\\Leftrightarrow",!0);B(K,J,de,"⟺","\\Longleftrightarrow",!0);B(K,J,de,"↦","\\mapsto",!0);B(K,J,de,"⟼","\\longmapsto",!0);B(K,J,de,"↗","\\nearrow",!0);B(K,J,de,"↩","\\hookleftarrow",!0);B(K,J,de,"↪","\\hookrightarrow",!0);B(K,J,de,"↘","\\searrow",!0);B(K,J,de,"↼","\\leftharpoonup",!0);B(K,J,de,"⇀","\\rightharpoonup",!0);B(K,J,de,"↙","\\swarrow",!0);B(K,J,de,"↽","\\leftharpoondown",!0);B(K,J,de,"⇁","\\rightharpoondown",!0);B(K,J,de,"↖","\\nwarrow",!0);B(K,J,de,"⇌","\\rightleftharpoons",!0);B(K,fe,de,"≮","\\nless",!0);B(K,fe,de,"","\\@nleqslant");B(K,fe,de,"","\\@nleqq");B(K,fe,de,"⪇","\\lneq",!0);B(K,fe,de,"≨","\\lneqq",!0);B(K,fe,de,"","\\@lvertneqq");B(K,fe,de,"⋦","\\lnsim",!0);B(K,fe,de,"⪉","\\lnapprox",!0);B(K,fe,de,"⊀","\\nprec",!0);B(K,fe,de,"⋠","\\npreceq",!0);B(K,fe,de,"⋨","\\precnsim",!0);B(K,fe,de,"⪹","\\precnapprox",!0);B(K,fe,de,"≁","\\nsim",!0);B(K,fe,de,"","\\@nshortmid");B(K,fe,de,"∤","\\nmid",!0);B(K,fe,de,"⊬","\\nvdash",!0);B(K,fe,de,"⊭","\\nvDash",!0);B(K,fe,de,"⋪","\\ntriangleleft");B(K,fe,de,"⋬","\\ntrianglelefteq",!0);B(K,fe,de,"⊊","\\subsetneq",!0);B(K,fe,de,"","\\@varsubsetneq");B(K,fe,de,"⫋","\\subsetneqq",!0);B(K,fe,de,"","\\@varsubsetneqq");B(K,fe,de,"≯","\\ngtr",!0);B(K,fe,de,"","\\@ngeqslant");B(K,fe,de,"","\\@ngeqq");B(K,fe,de,"⪈","\\gneq",!0);B(K,fe,de,"≩","\\gneqq",!0);B(K,fe,de,"","\\@gvertneqq");B(K,fe,de,"⋧","\\gnsim",!0);B(K,fe,de,"⪊","\\gnapprox",!0);B(K,fe,de,"⊁","\\nsucc",!0);B(K,fe,de,"⋡","\\nsucceq",!0);B(K,fe,de,"⋩","\\succnsim",!0);B(K,fe,de,"⪺","\\succnapprox",!0);B(K,fe,de,"≆","\\ncong",!0);B(K,fe,de,"","\\@nshortparallel");B(K,fe,de,"∦","\\nparallel",!0);B(K,fe,de,"⊯","\\nVDash",!0);B(K,fe,de,"⋫","\\ntriangleright");B(K,fe,de,"⋭","\\ntrianglerighteq",!0);B(K,fe,de,"","\\@nsupseteqq");B(K,fe,de,"⊋","\\supsetneq",!0);B(K,fe,de,"","\\@varsupsetneq");B(K,fe,de,"⫌","\\supsetneqq",!0);B(K,fe,de,"","\\@varsupsetneqq");B(K,fe,de,"⊮","\\nVdash",!0);B(K,fe,de,"⪵","\\precneqq",!0);B(K,fe,de,"⪶","\\succneqq",!0);B(K,fe,de,"","\\@nsubseteqq");B(K,fe,ht,"⊴","\\unlhd");B(K,fe,ht,"⊵","\\unrhd");B(K,fe,de,"↚","\\nleftarrow",!0);B(K,fe,de,"↛","\\nrightarrow",!0);B(K,fe,de,"⇍","\\nLeftarrow",!0);B(K,fe,de,"⇏","\\nRightarrow",!0);B(K,fe,de,"↮","\\nleftrightarrow",!0);B(K,fe,de,"⇎","\\nLeftrightarrow",!0);B(K,fe,de,"△","\\vartriangle");B(K,fe,ve,"ℏ","\\hslash");B(K,fe,ve,"▽","\\triangledown");B(K,fe,ve,"◊","\\lozenge");B(K,fe,ve,"Ⓢ","\\circledS");B(K,fe,ve,"®","\\circledR");B(Ve,fe,ve,"®","\\circledR");B(K,fe,ve,"∡","\\measuredangle",!0);B(K,fe,ve,"∄","\\nexists");B(K,fe,ve,"℧","\\mho");B(K,fe,ve,"Ⅎ","\\Finv",!0);B(K,fe,ve,"⅁","\\Game",!0);B(K,fe,ve,"‵","\\backprime");B(K,fe,ve,"▲","\\blacktriangle");B(K,fe,ve,"▼","\\blacktriangledown");B(K,fe,ve,"■","\\blacksquare");B(K,fe,ve,"⧫","\\blacklozenge");B(K,fe,ve,"★","\\bigstar");B(K,fe,ve,"∢","\\sphericalangle",!0);B(K,fe,ve,"∁","\\complement",!0);B(K,fe,ve,"ð","\\eth",!0);B(Ve,J,ve,"ð","ð");B(K,fe,ve,"╱","\\diagup");B(K,fe,ve,"╲","\\diagdown");B(K,fe,ve,"□","\\square");B(K,fe,ve,"□","\\Box");B(K,fe,ve,"◊","\\Diamond");B(K,fe,ve,"¥","\\yen",!0);B(Ve,fe,ve,"¥","\\yen",!0);B(K,fe,ve,"✓","\\checkmark",!0);B(Ve,fe,ve,"✓","\\checkmark");B(K,fe,ve,"ℶ","\\beth",!0);B(K,fe,ve,"ℸ","\\daleth",!0);B(K,fe,ve,"ℷ","\\gimel",!0);B(K,fe,ve,"ϝ","\\digamma",!0);B(K,fe,ve,"ϰ","\\varkappa");B(K,fe,ua,"┌","\\@ulcorner",!0);B(K,fe,di,"┐","\\@urcorner",!0);B(K,fe,ua,"└","\\@llcorner",!0);B(K,fe,di,"┘","\\@lrcorner",!0);B(K,fe,de,"≦","\\leqq",!0);B(K,fe,de,"⩽","\\leqslant",!0);B(K,fe,de,"⪕","\\eqslantless",!0);B(K,fe,de,"≲","\\lesssim",!0);B(K,fe,de,"⪅","\\lessapprox",!0);B(K,fe,de,"≊","\\approxeq",!0);B(K,fe,ht,"⋖","\\lessdot");B(K,fe,de,"⋘","\\lll",!0);B(K,fe,de,"≶","\\lessgtr",!0);B(K,fe,de,"⋚","\\lesseqgtr",!0);B(K,fe,de,"⪋","\\lesseqqgtr",!0);B(K,fe,de,"≑","\\doteqdot");B(K,fe,de,"≓","\\risingdotseq",!0);B(K,fe,de,"≒","\\fallingdotseq",!0);B(K,fe,de,"∽","\\backsim",!0);B(K,fe,de,"⋍","\\backsimeq",!0);B(K,fe,de,"⫅","\\subseteqq",!0);B(K,fe,de,"⋐","\\Subset",!0);B(K,fe,de,"⊏","\\sqsubset",!0);B(K,fe,de,"≼","\\preccurlyeq",!0);B(K,fe,de,"⋞","\\curlyeqprec",!0);B(K,fe,de,"≾","\\precsim",!0);B(K,fe,de,"⪷","\\precapprox",!0);B(K,fe,de,"⊲","\\vartriangleleft");B(K,fe,de,"⊴","\\trianglelefteq");B(K,fe,de,"⊨","\\vDash",!0);B(K,fe,de,"⊪","\\Vvdash",!0);B(K,fe,de,"⌣","\\smallsmile");B(K,fe,de,"⌢","\\smallfrown");B(K,fe,de,"≏","\\bumpeq",!0);B(K,fe,de,"≎","\\Bumpeq",!0);B(K,fe,de,"≧","\\geqq",!0);B(K,fe,de,"⩾","\\geqslant",!0);B(K,fe,de,"⪖","\\eqslantgtr",!0);B(K,fe,de,"≳","\\gtrsim",!0);B(K,fe,de,"⪆","\\gtrapprox",!0);B(K,fe,ht,"⋗","\\gtrdot");B(K,fe,de,"⋙","\\ggg",!0);B(K,fe,de,"≷","\\gtrless",!0);B(K,fe,de,"⋛","\\gtreqless",!0);B(K,fe,de,"⪌","\\gtreqqless",!0);B(K,fe,de,"≖","\\eqcirc",!0);B(K,fe,de,"≗","\\circeq",!0);B(K,fe,de,"≜","\\triangleq",!0);B(K,fe,de,"∼","\\thicksim");B(K,fe,de,"≈","\\thickapprox");B(K,fe,de,"⫆","\\supseteqq",!0);B(K,fe,de,"⋑","\\Supset",!0);B(K,fe,de,"⊐","\\sqsupset",!0);B(K,fe,de,"≽","\\succcurlyeq",!0);B(K,fe,de,"⋟","\\curlyeqsucc",!0);B(K,fe,de,"≿","\\succsim",!0);B(K,fe,de,"⪸","\\succapprox",!0);B(K,fe,de,"⊳","\\vartriangleright");B(K,fe,de,"⊵","\\trianglerighteq");B(K,fe,de,"⊩","\\Vdash",!0);B(K,fe,de,"∣","\\shortmid");B(K,fe,de,"∥","\\shortparallel");B(K,fe,de,"≬","\\between",!0);B(K,fe,de,"⋔","\\pitchfork",!0);B(K,fe,de,"∝","\\varpropto");B(K,fe,de,"◀","\\blacktriangleleft");B(K,fe,de,"∴","\\therefore",!0);B(K,fe,de,"∍","\\backepsilon");B(K,fe,de,"▶","\\blacktriangleright");B(K,fe,de,"∵","\\because",!0);B(K,fe,de,"⋘","\\llless");B(K,fe,de,"⋙","\\gggtr");B(K,fe,ht,"⊲","\\lhd");B(K,fe,ht,"⊳","\\rhd");B(K,fe,de,"≂","\\eqsim",!0);B(K,J,de,"⋈","\\Join");B(K,fe,de,"≑","\\Doteq",!0);B(K,fe,ht,"∔","\\dotplus",!0);B(K,fe,ht,"∖","\\smallsetminus");B(K,fe,ht,"⋒","\\Cap",!0);B(K,fe,ht,"⋓","\\Cup",!0);B(K,fe,ht,"⩞","\\doublebarwedge",!0);B(K,fe,ht,"⊟","\\boxminus",!0);B(K,fe,ht,"⊞","\\boxplus",!0);B(K,fe,ht,"⋇","\\divideontimes",!0);B(K,fe,ht,"⋉","\\ltimes",!0);B(K,fe,ht,"⋊","\\rtimes",!0);B(K,fe,ht,"⋋","\\leftthreetimes",!0);B(K,fe,ht,"⋌","\\rightthreetimes",!0);B(K,fe,ht,"⋏","\\curlywedge",!0);B(K,fe,ht,"⋎","\\curlyvee",!0);B(K,fe,ht,"⊝","\\circleddash",!0);B(K,fe,ht,"⊛","\\circledast",!0);B(K,fe,ht,"⋅","\\centerdot");B(K,fe,ht,"⊺","\\intercal",!0);B(K,fe,ht,"⋒","\\doublecap");B(K,fe,ht,"⋓","\\doublecup");B(K,fe,ht,"⊠","\\boxtimes",!0);B(K,fe,de,"⇢","\\dashrightarrow",!0);B(K,fe,de,"⇠","\\dashleftarrow",!0);B(K,fe,de,"⇇","\\leftleftarrows",!0);B(K,fe,de,"⇆","\\leftrightarrows",!0);B(K,fe,de,"⇚","\\Lleftarrow",!0);B(K,fe,de,"↞","\\twoheadleftarrow",!0);B(K,fe,de,"↢","\\leftarrowtail",!0);B(K,fe,de,"↫","\\looparrowleft",!0);B(K,fe,de,"⇋","\\leftrightharpoons",!0);B(K,fe,de,"↶","\\curvearrowleft",!0);B(K,fe,de,"↺","\\circlearrowleft",!0);B(K,fe,de,"↰","\\Lsh",!0);B(K,fe,de,"⇈","\\upuparrows",!0);B(K,fe,de,"↿","\\upharpoonleft",!0);B(K,fe,de,"⇃","\\downharpoonleft",!0);B(K,J,de,"⊶","\\origof",!0);B(K,J,de,"⊷","\\imageof",!0);B(K,fe,de,"⊸","\\multimap",!0);B(K,fe,de,"↭","\\leftrightsquigarrow",!0);B(K,fe,de,"⇉","\\rightrightarrows",!0);B(K,fe,de,"⇄","\\rightleftarrows",!0);B(K,fe,de,"↠","\\twoheadrightarrow",!0);B(K,fe,de,"↣","\\rightarrowtail",!0);B(K,fe,de,"↬","\\looparrowright",!0);B(K,fe,de,"↷","\\curvearrowright",!0);B(K,fe,de,"↻","\\circlearrowright",!0);B(K,fe,de,"↱","\\Rsh",!0);B(K,fe,de,"⇊","\\downdownarrows",!0);B(K,fe,de,"↾","\\upharpoonright",!0);B(K,fe,de,"⇂","\\downharpoonright",!0);B(K,fe,de,"⇝","\\rightsquigarrow",!0);B(K,fe,de,"⇝","\\leadsto");B(K,fe,de,"⇛","\\Rrightarrow",!0);B(K,fe,de,"↾","\\restriction");B(K,J,ve,"‘","`");B(K,J,ve,"$","\\$");B(Ve,J,ve,"$","\\$");B(Ve,J,ve,"$","\\textdollar");B(K,J,ve,"%","\\%");B(Ve,J,ve,"%","\\%");B(K,J,ve,"_","\\_");B(Ve,J,ve,"_","\\_");B(Ve,J,ve,"_","\\textunderscore");B(K,J,ve,"∠","\\angle",!0);B(K,J,ve,"∞","\\infty",!0);B(K,J,ve,"′","\\prime");B(K,J,ve,"△","\\triangle");B(K,J,ve,"Γ","\\Gamma",!0);B(K,J,ve,"Δ","\\Delta",!0);B(K,J,ve,"Θ","\\Theta",!0);B(K,J,ve,"Λ","\\Lambda",!0);B(K,J,ve,"Ξ","\\Xi",!0);B(K,J,ve,"Π","\\Pi",!0);B(K,J,ve,"Σ","\\Sigma",!0);B(K,J,ve,"Υ","\\Upsilon",!0);B(K,J,ve,"Φ","\\Phi",!0);B(K,J,ve,"Ψ","\\Psi",!0);B(K,J,ve,"Ω","\\Omega",!0);B(K,J,ve,"A","Α");B(K,J,ve,"B","Β");B(K,J,ve,"E","Ε");B(K,J,ve,"Z","Ζ");B(K,J,ve,"H","Η");B(K,J,ve,"I","Ι");B(K,J,ve,"K","Κ");B(K,J,ve,"M","Μ");B(K,J,ve,"N","Ν");B(K,J,ve,"O","Ο");B(K,J,ve,"P","Ρ");B(K,J,ve,"T","Τ");B(K,J,ve,"X","Χ");B(K,J,ve,"¬","\\neg",!0);B(K,J,ve,"¬","\\lnot");B(K,J,ve,"⊤","\\top");B(K,J,ve,"⊥","\\bot");B(K,J,ve,"∅","\\emptyset");B(K,fe,ve,"∅","\\varnothing");B(K,J,Pt,"α","\\alpha",!0);B(K,J,Pt,"β","\\beta",!0);B(K,J,Pt,"γ","\\gamma",!0);B(K,J,Pt,"δ","\\delta",!0);B(K,J,Pt,"ϵ","\\epsilon",!0);B(K,J,Pt,"ζ","\\zeta",!0);B(K,J,Pt,"η","\\eta",!0);B(K,J,Pt,"θ","\\theta",!0);B(K,J,Pt,"ι","\\iota",!0);B(K,J,Pt,"κ","\\kappa",!0);B(K,J,Pt,"λ","\\lambda",!0);B(K,J,Pt,"μ","\\mu",!0);B(K,J,Pt,"ν","\\nu",!0);B(K,J,Pt,"ξ","\\xi",!0);B(K,J,Pt,"ο","\\omicron",!0);B(K,J,Pt,"π","\\pi",!0);B(K,J,Pt,"ρ","\\rho",!0);B(K,J,Pt,"σ","\\sigma",!0);B(K,J,Pt,"τ","\\tau",!0);B(K,J,Pt,"υ","\\upsilon",!0);B(K,J,Pt,"ϕ","\\phi",!0);B(K,J,Pt,"χ","\\chi",!0);B(K,J,Pt,"ψ","\\psi",!0);B(K,J,Pt,"ω","\\omega",!0);B(K,J,Pt,"ε","\\varepsilon",!0);B(K,J,Pt,"ϑ","\\vartheta",!0);B(K,J,Pt,"ϖ","\\varpi",!0);B(K,J,Pt,"ϱ","\\varrho",!0);B(K,J,Pt,"ς","\\varsigma",!0);B(K,J,Pt,"φ","\\varphi",!0);B(K,J,ht,"∗","*",!0);B(K,J,ht,"+","+");B(K,J,ht,"−","-",!0);B(K,J,ht,"⋅","\\cdot",!0);B(K,J,ht,"∘","\\circ",!0);B(K,J,ht,"÷","\\div",!0);B(K,J,ht,"±","\\pm",!0);B(K,J,ht,"×","\\times",!0);B(K,J,ht,"∩","\\cap",!0);B(K,J,ht,"∪","\\cup",!0);B(K,J,ht,"∖","\\setminus",!0);B(K,J,ht,"∧","\\land");B(K,J,ht,"∨","\\lor");B(K,J,ht,"∧","\\wedge",!0);B(K,J,ht,"∨","\\vee",!0);B(K,J,ve,"√","\\surd");B(K,J,ua,"⟨","\\langle",!0);B(K,J,ua,"∣","\\lvert");B(K,J,ua,"∥","\\lVert");B(K,J,di,"?","?");B(K,J,di,"!","!");B(K,J,di,"⟩","\\rangle",!0);B(K,J,di,"∣","\\rvert");B(K,J,di,"∥","\\rVert");B(K,J,de,"=","=");B(K,J,de,":",":");B(K,J,de,"≈","\\approx",!0);B(K,J,de,"≅","\\cong",!0);B(K,J,de,"≥","\\ge");B(K,J,de,"≥","\\geq",!0);B(K,J,de,"←","\\gets");B(K,J,de,">","\\gt",!0);B(K,J,de,"∈","\\in",!0);B(K,J,de,"","\\@not");B(K,J,de,"⊂","\\subset",!0);B(K,J,de,"⊃","\\supset",!0);B(K,J,de,"⊆","\\subseteq",!0);B(K,J,de,"⊇","\\supseteq",!0);B(K,fe,de,"⊈","\\nsubseteq",!0);B(K,fe,de,"⊉","\\nsupseteq",!0);B(K,J,de,"⊨","\\models");B(K,J,de,"←","\\leftarrow",!0);B(K,J,de,"≤","\\le");B(K,J,de,"≤","\\leq",!0);B(K,J,de,"<","\\lt",!0);B(K,J,de,"→","\\rightarrow",!0);B(K,J,de,"→","\\to");B(K,fe,de,"≱","\\ngeq",!0);B(K,fe,de,"≰","\\nleq",!0);B(K,J,oc," ","\\ ");B(K,J,oc," ","\\space");B(K,J,oc," ","\\nobreakspace");B(Ve,J,oc," ","\\ ");B(Ve,J,oc," "," ");B(Ve,J,oc," ","\\space");B(Ve,J,oc," ","\\nobreakspace");B(K,J,oc,"","\\nobreak");B(K,J,oc,"","\\allowbreak");B(K,J,km,",",",");B(K,J,km,";",";");B(K,fe,ht,"⊼","\\barwedge",!0);B(K,fe,ht,"⊻","\\veebar",!0);B(K,J,ht,"⊙","\\odot",!0);B(K,J,ht,"⊕","\\oplus",!0);B(K,J,ht,"⊗","\\otimes",!0);B(K,J,ve,"∂","\\partial",!0);B(K,J,ht,"⊘","\\oslash",!0);B(K,fe,ht,"⊚","\\circledcirc",!0);B(K,fe,ht,"⊡","\\boxdot",!0);B(K,J,ht,"△","\\bigtriangleup");B(K,J,ht,"▽","\\bigtriangledown");B(K,J,ht,"†","\\dagger");B(K,J,ht,"⋄","\\diamond");B(K,J,ht,"⋆","\\star");B(K,J,ht,"◃","\\triangleleft");B(K,J,ht,"▹","\\triangleright");B(K,J,ua,"{","\\{");B(Ve,J,ve,"{","\\{");B(Ve,J,ve,"{","\\textbraceleft");B(K,J,di,"}","\\}");B(Ve,J,ve,"}","\\}");B(Ve,J,ve,"}","\\textbraceright");B(K,J,ua,"{","\\lbrace");B(K,J,di,"}","\\rbrace");B(K,J,ua,"[","\\lbrack",!0);B(Ve,J,ve,"[","\\lbrack",!0);B(K,J,di,"]","\\rbrack",!0);B(Ve,J,ve,"]","\\rbrack",!0);B(K,J,ua,"(","\\lparen",!0);B(K,J,di,")","\\rparen",!0);B(Ve,J,ve,"<","\\textless",!0);B(Ve,J,ve,">","\\textgreater",!0);B(K,J,ua,"⌊","\\lfloor",!0);B(K,J,di,"⌋","\\rfloor",!0);B(K,J,ua,"⌈","\\lceil",!0);B(K,J,di,"⌉","\\rceil",!0);B(K,J,ve,"\\","\\backslash");B(K,J,ve,"∣","|");B(K,J,ve,"∣","\\vert");B(Ve,J,ve,"|","\\textbar",!0);B(K,J,ve,"∥","\\|");B(K,J,ve,"∥","\\Vert");B(Ve,J,ve,"∥","\\textbardbl");B(Ve,J,ve,"~","\\textasciitilde");B(Ve,J,ve,"\\","\\textbackslash");B(Ve,J,ve,"^","\\textasciicircum");B(K,J,de,"↑","\\uparrow",!0);B(K,J,de,"⇑","\\Uparrow",!0);B(K,J,de,"↓","\\downarrow",!0);B(K,J,de,"⇓","\\Downarrow",!0);B(K,J,de,"↕","\\updownarrow",!0);B(K,J,de,"⇕","\\Updownarrow",!0);B(K,J,ls,"∐","\\coprod");B(K,J,ls,"⋁","\\bigvee");B(K,J,ls,"⋀","\\bigwedge");B(K,J,ls,"⨄","\\biguplus");B(K,J,ls,"⋂","\\bigcap");B(K,J,ls,"⋃","\\bigcup");B(K,J,ls,"∫","\\int");B(K,J,ls,"∫","\\intop");B(K,J,ls,"∬","\\iint");B(K,J,ls,"∭","\\iiint");B(K,J,ls,"∏","\\prod");B(K,J,ls,"∑","\\sum");B(K,J,ls,"⨂","\\bigotimes");B(K,J,ls,"⨁","\\bigoplus");B(K,J,ls,"⨀","\\bigodot");B(K,J,ls,"∮","\\oint");B(K,J,ls,"∯","\\oiint");B(K,J,ls,"∰","\\oiiint");B(K,J,ls,"⨆","\\bigsqcup");B(K,J,ls,"∫","\\smallint");B(Ve,J,zh,"…","\\textellipsis");B(K,J,zh,"…","\\mathellipsis");B(Ve,J,zh,"…","\\ldots",!0);B(K,J,zh,"…","\\ldots",!0);B(K,J,zh,"⋯","\\@cdots",!0);B(K,J,zh,"⋱","\\ddots",!0);B(K,J,ve,"⋮","\\varvdots");B(Ve,J,ve,"⋮","\\varvdots");B(K,J,Er,"ˊ","\\acute");B(K,J,Er,"ˋ","\\grave");B(K,J,Er,"¨","\\ddot");B(K,J,Er,"~","\\tilde");B(K,J,Er,"ˉ","\\bar");B(K,J,Er,"˘","\\breve");B(K,J,Er,"ˇ","\\check");B(K,J,Er,"^","\\hat");B(K,J,Er,"⃗","\\vec");B(K,J,Er,"˙","\\dot");B(K,J,Er,"˚","\\mathring");B(K,J,Pt,"","\\@imath");B(K,J,Pt,"","\\@jmath");B(K,J,ve,"ı","ı");B(K,J,ve,"ȷ","ȷ");B(Ve,J,ve,"ı","\\i",!0);B(Ve,J,ve,"ȷ","\\j",!0);B(Ve,J,ve,"ß","\\ss",!0);B(Ve,J,ve,"æ","\\ae",!0);B(Ve,J,ve,"œ","\\oe",!0);B(Ve,J,ve,"ø","\\o",!0);B(Ve,J,ve,"Æ","\\AE",!0);B(Ve,J,ve,"Œ","\\OE",!0);B(Ve,J,ve,"Ø","\\O",!0);B(Ve,J,Er,"ˊ","\\'");B(Ve,J,Er,"ˋ","\\`");B(Ve,J,Er,"ˆ","\\^");B(Ve,J,Er,"˜","\\~");B(Ve,J,Er,"ˉ","\\=");B(Ve,J,Er,"˘","\\u");B(Ve,J,Er,"˙","\\.");B(Ve,J,Er,"¸","\\c");B(Ve,J,Er,"˚","\\r");B(Ve,J,Er,"ˇ","\\v");B(Ve,J,Er,"¨",'\\"');B(Ve,J,Er,"˝","\\H");B(Ve,J,Er,"◯","\\textcircled");var pP={"--":!0,"---":!0,"``":!0,"''":!0};B(Ve,J,ve,"–","--",!0);B(Ve,J,ve,"–","\\textendash");B(Ve,J,ve,"—","---",!0);B(Ve,J,ve,"—","\\textemdash");B(Ve,J,ve,"‘","`",!0);B(Ve,J,ve,"‘","\\textquoteleft");B(Ve,J,ve,"’","'",!0);B(Ve,J,ve,"’","\\textquoteright");B(Ve,J,ve,"“","``",!0);B(Ve,J,ve,"“","\\textquotedblleft");B(Ve,J,ve,"”","''",!0);B(Ve,J,ve,"”","\\textquotedblright");B(K,J,ve,"°","\\degree",!0);B(Ve,J,ve,"°","\\degree");B(Ve,J,ve,"°","\\textdegree",!0);B(K,J,ve,"£","\\pounds");B(K,J,ve,"£","\\mathsterling",!0);B(Ve,J,ve,"£","\\pounds");B(Ve,J,ve,"£","\\textsterling",!0);B(K,fe,ve,"✠","\\maltese");B(Ve,fe,ve,"✠","\\maltese");var VT='0123456789/@."';for(var Tw=0;Tw{var n=e.charCodeAt(0),t=e.charCodeAt(1),r=(n-55296)*1024+(t-56320)+65536;if(119808<=r&&r<120484){var s=Math.floor((r-119808)/26);return nA[s]}else if(120782<=r&&r<=120831){var i=Math.floor((r-120782)/10);return m8n[i]}else{if(r===120485||r===120486)return nA[0];if(120486{if(wu(e.classes)!==wu(n.classes)||e.skew!==n.skew||e.maxFontSize!==n.maxFontSize||e.italic!==0&&e.hasClass("mathnormal"))return!1;if(e.classes.length===1){var t=e.classes[0];if(t==="mbin"||t==="mord")return!1}for(var r of Object.keys(e.style))if(e.style[r]!==n.style[r])return!1;for(var s of Object.keys(n.style))if(e.style[s]!==n.style[s])return!1;return!0},mP=e=>{for(var n=0;nt&&(t=a.height),a.depth>r&&(r=a.depth),a.maxFontSize>s&&(s=a.maxFontSize)}n.height=t,n.depth=r,n.maxFontSize=s},We=function(n,t,r,s){var i=new Nh(n,t,r,s);return A6(i),i},Su=(e,n,t,r)=>new Nh(e,n,t,r),ah=function(n,t,r){var s=We([n],[],t);return s.height=Math.max(r||t.fontMetrics().defaultRuleThickness,t.minRuleThickness),s.style.borderBottomWidth=tt(s.height),s.maxFontSize=1,s},y8n=function(n,t,r,s){var i=new iy(n,t,r,s);return A6(i),i},lc=function(n){var t=new Eh(n);return A6(t),t},oh=function(n,t){return n instanceof Eh?We([],[n],t):n},x8n=function(n){if(n.positionType==="individualShift"){for(var t=n.children,r=[t[0]],s=-t[0].shift-t[0].elem.depth,i=s,a=1;a{var t=We(["mspace"],[],n),r=Or(e,n);return t.style.marginRight=tt(r),t},f1=(e,n,t)=>{var r,s;switch(e){case"amsrm":r="AMS";break;case"textrm":r="Main";break;case"textsf":r="SansSerif";break;case"texttt":r="Typewriter";break;default:r=e}return n==="textbf"&&t==="textit"?s="BoldItalic":n==="textbf"?s="Bold":t==="textit"?s="Italic":s="Regular",r+"-"+s},m5={mathbf:{variant:"bold",fontName:"Main-Bold"},mathrm:{variant:"normal",fontName:"Main-Regular"},textit:{variant:"italic",fontName:"Main-Italic"},mathit:{variant:"italic",fontName:"Main-Italic"},mathnormal:{variant:"italic",fontName:"Math-Italic"},mathsfit:{variant:"sans-serif-italic",fontName:"SansSerif-Italic"},mathbb:{variant:"double-struck",fontName:"AMS-Regular"},mathcal:{variant:"script",fontName:"Caligraphic-Regular"},mathfrak:{variant:"fraktur",fontName:"Fraktur-Regular"},mathscr:{variant:"script",fontName:"Script-Regular"},mathsf:{variant:"sans-serif",fontName:"SansSerif-Regular"},mathtt:{variant:"monospace",fontName:"Typewriter-Regular"}},vP={vec:["vec",.471,.714],oiintSize1:["oiintSize1",.957,.499],oiintSize2:["oiintSize2",1.472,.659],oiiintSize1:["oiiintSize1",1.304,.499],oiiintSize2:["oiiintSize2",1.98,.659]},bP=function(n,t){var[r,s,i]=vP[n],a=new ku(r),o=new rc([a],{width:tt(s),height:tt(i),style:"width:"+tt(s),viewBox:"0 0 "+1e3*s+" "+1e3*i,preserveAspectRatio:"xMinYMin"}),l=Su(["overlay"],[o],t);return l.height=i,l.style.height=tt(i),l.style.width=tt(s),l},Rr={number:3,unit:"mu"},o_={number:4,unit:"mu"},Ml={number:5,unit:"mu"},w8n={mord:{mop:Rr,mbin:o_,mrel:Ml,minner:Rr},mop:{mord:Rr,mop:Rr,mrel:Ml,minner:Rr},mbin:{mord:o_,mop:o_,mopen:o_,minner:o_},mrel:{mord:Ml,mop:Ml,mopen:Ml,minner:Ml},mopen:{},mclose:{mop:Rr,mbin:o_,mrel:Ml,minner:Rr},mpunct:{mord:Rr,mop:Rr,mrel:Ml,mopen:Rr,mclose:Rr,mpunct:Rr,minner:Rr},minner:{mord:Rr,mop:Rr,mbin:o_,mrel:Ml,mopen:Rr,mpunct:Rr,minner:Rr}},k8n={mord:{mop:Rr},mop:{mord:Rr,mop:Rr},mbin:{},mrel:{},mopen:{},mclose:{mop:Rr},mpunct:{},minner:{mop:Rr}},yP={},Uv={},Gv={};function dt(e){for(var{type:n,names:t,props:r,handler:s,htmlBuilder:i,mathmlBuilder:a}=e,o={type:n,numArgs:r.numArgs,argTypes:r.argTypes,allowedInArgument:!!r.allowedInArgument,allowedInText:!!r.allowedInText,allowedInMath:r.allowedInMath===void 0?!0:r.allowedInMath,numOptionalArgs:r.numOptionalArgs||0,infix:!!r.infix,primitive:!!r.primitive,handler:s},l=0;l{var v=k.classes[0],b=x.classes[0];v==="mbin"&&C8n.has(b)?k.classes[0]="mord":b==="mbin"&&S8n.has(v)&&(x.classes[0]="mord")},{node:_},p,m),g5(i,(x,k)=>{var v,b,w=b5(k),y=b5(x),C=w&&y?x.hasClass("mtight")?(v=k8n[w])==null?void 0:v[y]:(b=w8n[w])==null?void 0:b[y]:null;if(C)return gP(C,u)},{node:_},p,m),i},g5=function(n,t,r,s,i){s&&n.push(s);for(var a=0;ap=>{n.splice(_+1,0,p),a++})(a)}s&&n.pop()},xP=function(n){return n instanceof Eh||n instanceof iy||n instanceof Nh&&n.hasClass("enclosing")?n:null},v5=function(n,t){var r=xP(n);if(r){var s=r.children;if(s.length){if(t==="right")return v5(s[s.length-1],"right");if(t==="left")return v5(s[0],"left")}}return n},b5=function(n,t){if(!n)return null;t&&(n=v5(n,t));var r=n.classes[0];return N8n[r]||null},R0=function(n,t){var r=["nulldelimiter"].concat(n.baseSizingClasses());return We(t.concat(r))},Hn=function(n,t,r){if(!n)return We();if(Uv[n.type]){var s=Uv[n.type](n,t);if(r&&t.size!==r.size){s=We(t.sizingClasses(r),[s],t);var i=t.sizeMultiplier/r.sizeMultiplier;s.height*=i,s.depth*=i}return s}else throw new Ze("Got group of unknown type: '"+n.type+"'")};function d1(e,n){var t=We(["base"],e,n),r=We(["strut"]);return r.style.height=tt(t.height+t.depth),t.depth&&(r.style.verticalAlign=tt(-t.depth)),t.children.unshift(r),t}function y5(e,n){var t=null;e.length===1&&e[0].type==="tag"&&(t=e[0].tag,e=e[0].body);var r=bs(e,n,"root"),s;r.length===2&&r[1].hasClass("tag")&&(s=r.pop());for(var i=[],a=[],o=0;o0&&(i.push(d1(a,n)),a=[]),i.push(r[o]));a.length>0&&i.push(d1(a,n));var u;t?(u=d1(bs(t,n,!0),n),u.classes=["tag"],i.push(u)):s&&i.push(s);var h=We(["katex-html"],i);if(h.setAttribute("aria-hidden","true"),u){var _=u.children[0];_.style.height=tt(h.height+h.depth),h.depth&&(_.style.verticalAlign=tt(-h.depth))}return h}function wP(e){return new Eh(e)}class Je{constructor(n,t,r){this.type=void 0,this.attributes=void 0,this.children=void 0,this.classes=void 0,this.type=n,this.attributes={},this.children=t||[],this.classes=r||[]}setAttribute(n,t){this.attributes[n]=t}getAttribute(n){return this.attributes[n]}toNode(){var n=document.createElementNS("http://www.w3.org/1998/Math/MathML",this.type);for(var t in this.attributes)Object.prototype.hasOwnProperty.call(this.attributes,t)&&n.setAttribute(t,this.attributes[t]);this.classes.length>0&&(n.className=wu(this.classes));for(var r=0;r0&&(n+=' class ="'+Ks(wu(this.classes))+'"'),n+=">";for(var r=0;r",n}toText(){return this.children.map(n=>n.toText()).join("")}}class is{constructor(n){this.text=void 0,this.text=n}toNode(){return document.createTextNode(this.text)}toMarkup(){return Ks(this.toText())}toText(){return this.text}}class kP{constructor(n){this.width=void 0,this.character=void 0,this.width=n,n>=.05555&&n<=.05556?this.character=" ":n>=.1666&&n<=.1667?this.character=" ":n>=.2222&&n<=.2223?this.character=" ":n>=.2777&&n<=.2778?this.character="  ":n>=-.05556&&n<=-.05555?this.character=" ⁣":n>=-.1667&&n<=-.1666?this.character=" ⁣":n>=-.2223&&n<=-.2222?this.character=" ⁣":n>=-.2778&&n<=-.2777?this.character=" ⁣":this.character=null}toNode(){if(this.character)return document.createTextNode(this.character);var n=document.createElementNS("http://www.w3.org/1998/Math/MathML","mspace");return n.setAttribute("width",tt(this.width)),n}toMarkup(){return this.character?""+this.character+"":''}toText(){return this.character?this.character:" "}}var z8n=new Set(["\\imath","\\jmath"]),j8n=new Set(["mrow","mtable"]),Ma=function(n,t,r){return Sr[t][n]&&Sr[t][n].replace&&n.charCodeAt(0)!==55349&&!(pP.hasOwnProperty(n)&&r&&(r.fontFamily&&r.fontFamily.slice(4,6)==="tt"||r.font&&r.font.slice(4,6)==="tt"))&&(n=Sr[t][n].replace),new is(n)},R6=function(n){return n.length===1?n[0]:new Je("mrow",n)},T8n={mathit:"italic",boldsymbol:e=>e.type==="textord"?"bold":"bold-italic",mathbf:"bold",mathbb:"double-struck",mathsfit:"sans-serif-italic",mathfrak:"fraktur",mathscr:"script",mathcal:"script",mathsf:"sans-serif",mathtt:"monospace"},M6=(e,n)=>{if(e.mode==="text"){if(n.fontFamily==="texttt")return"monospace";if(n.fontFamily==="textsf")return n.fontShape==="textit"&&n.fontWeight==="textbf"?"sans-serif-bold-italic":n.fontShape==="textit"?"sans-serif-italic":n.fontWeight==="textbf"?"bold-sans-serif":"sans-serif";if(n.fontShape==="textit"&&n.fontWeight==="textbf")return"bold-italic";if(n.fontShape==="textit")return"italic";if(n.fontWeight==="textbf")return"bold"}var t=n.font;if(!t||t==="mathnormal")return null;var r=e.mode,s=T8n[t];if(s)return typeof s=="function"?s(e):s;var i=e.text;if(z8n.has(i))return null;if(Sr[r][i]){var a=Sr[r][i].replace;a&&(i=a)}var o=m5[t].fontName;return j6(i,o,r)?m5[t].variant:null};function Ow(e){if(!e)return!1;if(e.type==="mi"&&e.children.length===1){var n=e.children[0];return n instanceof is&&n.text==="."}else if(e.type==="mo"&&e.children.length===1&&e.getAttribute("separator")==="true"&&e.getAttribute("lspace")==="0em"&&e.getAttribute("rspace")==="0em"){var t=e.children[0];return t instanceof is&&t.text===","}else return!1}var _a=function(n,t,r){if(n.length===1){var s=cr(n[0],t);return r&&s instanceof Je&&s.type==="mo"&&(s.setAttribute("lspace","0em"),s.setAttribute("rspace","0em")),[s]}for(var i=[],a,o=0;o=1&&(a.type==="mn"||Ow(a))){var u=l.children[0];u instanceof Je&&u.type==="mn"&&(u.children=[...a.children,...u.children],i.pop())}else if(a.type==="mi"&&a.children.length===1){var h=a.children[0];if(h instanceof is&&h.text==="̸"&&(l.type==="mo"||l.type==="mi"||l.type==="mn")){var _=l.children[0];_ instanceof is&&_.text.length>0&&(_.text=_.text.slice(0,1)+"̸"+_.text.slice(1),i.pop())}}}i.push(l),a=l}return i},Cu=function(n,t,r){return R6(_a(n,t,r))},cr=function(n,t){if(!n)return new Je("mrow");if(Gv[n.type])return Gv[n.type](n,t);throw new Ze("Got group of unknown type: '"+n.type+"'")};function rA(e,n,t,r,s){var i=_a(e,t),a;i.length===1&&i[0]instanceof Je&&j8n.has(i[0].type)?a=i[0]:a=new Je("mrow",i);var o=new Je("annotation",[new is(n)]);o.setAttribute("encoding","application/x-tex");var l=new Je("semantics",[a,o]),u=new Je("math",[l]);u.setAttribute("xmlns","http://www.w3.org/1998/Math/MathML"),r&&u.setAttribute("display","block");var h=s?"katex":"katex-mathml";return We([h],[u])}var A8n=[[1,1,1],[2,1,1],[3,1,1],[4,2,1],[5,2,1],[6,3,1],[7,4,2],[8,6,3],[9,7,6],[10,8,7],[11,10,9]],sA=[.5,.6,.7,.8,.9,1,1.2,1.44,1.728,2.074,2.488],iA=function(n,t){return t.size<2?n:A8n[n-1][t.size-1]};class Pl{constructor(n){this.style=void 0,this.color=void 0,this.size=void 0,this.textSize=void 0,this.phantom=void 0,this.font=void 0,this.fontFamily=void 0,this.fontWeight=void 0,this.fontShape=void 0,this.sizeMultiplier=void 0,this.maxSize=void 0,this.minRuleThickness=void 0,this._fontMetrics=void 0,this.style=n.style,this.color=n.color,this.size=n.size||Pl.BASESIZE,this.textSize=n.textSize||this.size,this.phantom=!!n.phantom,this.font=n.font||"",this.fontFamily=n.fontFamily||"",this.fontWeight=n.fontWeight||"",this.fontShape=n.fontShape||"",this.sizeMultiplier=sA[this.size-1],this.maxSize=n.maxSize,this.minRuleThickness=n.minRuleThickness,this._fontMetrics=void 0}extend(n){var t={style:this.style,size:this.size,textSize:this.textSize,color:this.color,phantom:this.phantom,font:this.font,fontFamily:this.fontFamily,fontWeight:this.fontWeight,fontShape:this.fontShape,maxSize:this.maxSize,minRuleThickness:this.minRuleThickness};return Object.assign(t,n),new Pl(t)}havingStyle(n){return this.style===n?this:this.extend({style:n,size:iA(this.textSize,n)})}havingCrampedStyle(){return this.havingStyle(this.style.cramp())}havingSize(n){return this.size===n&&this.textSize===n?this:this.extend({style:this.style.text(),size:n,textSize:n,sizeMultiplier:sA[n-1]})}havingBaseStyle(n){n=n||this.style.text();var t=iA(Pl.BASESIZE,n);return this.size===t&&this.textSize===Pl.BASESIZE&&this.style===n?this:this.extend({style:n,size:t})}havingBaseSizing(){var n;switch(this.style.id){case 4:case 5:n=3;break;case 6:case 7:n=1;break;default:n=6}return this.extend({style:this.style.text(),size:n})}withColor(n){return this.extend({color:n})}withPhantom(){return this.extend({phantom:!0})}withFont(n){return this.extend({font:n})}withTextFontFamily(n){return this.extend({fontFamily:n,font:""})}withTextFontWeight(n){return this.extend({fontWeight:n,font:""})}withTextFontShape(n){return this.extend({fontShape:n,font:""})}sizingClasses(n){return n.size!==this.size?["sizing","reset-size"+n.size,"size"+this.size]:[]}baseSizingClasses(){return this.size!==Pl.BASESIZE?["sizing","reset-size"+this.size,"size"+Pl.BASESIZE]:[]}fontMetrics(){return this._fontMetrics||(this._fontMetrics=h8n(this.size)),this._fontMetrics}getColor(){return this.phantom?"transparent":this.color}}Pl.BASESIZE=6;var SP=function(n){return new Pl({style:n.displayMode?en.DISPLAY:en.TEXT,maxSize:n.maxSize,minRuleThickness:n.minRuleThickness})},CP=function(n,t){if(t.displayMode){var r=["katex-display"];t.leqno&&r.push("leqno"),t.fleqn&&r.push("fleqn"),n=We(r,[n])}return n},R8n=function(n,t,r){var s=SP(r),i;if(r.output==="mathml")return rA(n,t,s,r.displayMode,!0);if(r.output==="html"){var a=y5(n,s);i=We(["katex"],[a])}else{var o=rA(n,t,s,r.displayMode,!1),l=y5(n,s);i=We(["katex"],[o,l])}return CP(i,r)},M8n=function(n,t,r){var s=SP(r),i=y5(n,s),a=We(["katex"],[i]);return CP(a,r)},O8n={widehat:"^",widecheck:"ˇ",widetilde:"~",utilde:"~",overleftarrow:"←",underleftarrow:"←",xleftarrow:"←",overrightarrow:"→",underrightarrow:"→",xrightarrow:"→",underbrace:"⏟",overbrace:"⏞",underbracket:"⎵",overbracket:"⎴",overgroup:"⏠",undergroup:"⏡",overleftrightarrow:"↔",underleftrightarrow:"↔",xleftrightarrow:"↔",Overrightarrow:"⇒",xRightarrow:"⇒",overleftharpoon:"↼",xleftharpoonup:"↼",overrightharpoon:"⇀",xrightharpoonup:"⇀",xLeftarrow:"⇐",xLeftrightarrow:"⇔",xhookleftarrow:"↩",xhookrightarrow:"↪",xmapsto:"↦",xrightharpoondown:"⇁",xleftharpoondown:"↽",xrightleftharpoons:"⇌",xleftrightharpoons:"⇋",xtwoheadleftarrow:"↞",xtwoheadrightarrow:"↠",xlongequal:"=",xtofrom:"⇄",xrightleftarrows:"⇄",xrightequilibrium:"⇌",xleftequilibrium:"⇋","\\cdrightarrow":"→","\\cdleftarrow":"←","\\cdlongequal":"="},ly=function(n){var t=new Je("mo",[new is(O8n[n.replace(/^\\/,"")])]);return t.setAttribute("stretchy","true"),t},D8n={overrightarrow:[["rightarrow"],.888,522,"xMaxYMin"],overleftarrow:[["leftarrow"],.888,522,"xMinYMin"],underrightarrow:[["rightarrow"],.888,522,"xMaxYMin"],underleftarrow:[["leftarrow"],.888,522,"xMinYMin"],xrightarrow:[["rightarrow"],1.469,522,"xMaxYMin"],"\\cdrightarrow":[["rightarrow"],3,522,"xMaxYMin"],xleftarrow:[["leftarrow"],1.469,522,"xMinYMin"],"\\cdleftarrow":[["leftarrow"],3,522,"xMinYMin"],Overrightarrow:[["doublerightarrow"],.888,560,"xMaxYMin"],xRightarrow:[["doublerightarrow"],1.526,560,"xMaxYMin"],xLeftarrow:[["doubleleftarrow"],1.526,560,"xMinYMin"],overleftharpoon:[["leftharpoon"],.888,522,"xMinYMin"],xleftharpoonup:[["leftharpoon"],.888,522,"xMinYMin"],xleftharpoondown:[["leftharpoondown"],.888,522,"xMinYMin"],overrightharpoon:[["rightharpoon"],.888,522,"xMaxYMin"],xrightharpoonup:[["rightharpoon"],.888,522,"xMaxYMin"],xrightharpoondown:[["rightharpoondown"],.888,522,"xMaxYMin"],xlongequal:[["longequal"],.888,334,"xMinYMin"],"\\cdlongequal":[["longequal"],3,334,"xMinYMin"],xtwoheadleftarrow:[["twoheadleftarrow"],.888,334,"xMinYMin"],xtwoheadrightarrow:[["twoheadrightarrow"],.888,334,"xMaxYMin"],overleftrightarrow:[["leftarrow","rightarrow"],.888,522],overbrace:[["leftbrace","midbrace","rightbrace"],1.6,548],underbrace:[["leftbraceunder","midbraceunder","rightbraceunder"],1.6,548],underleftrightarrow:[["leftarrow","rightarrow"],.888,522],xleftrightarrow:[["leftarrow","rightarrow"],1.75,522],xLeftrightarrow:[["doubleleftarrow","doublerightarrow"],1.75,560],xrightleftharpoons:[["leftharpoondownplus","rightharpoonplus"],1.75,716],xleftrightharpoons:[["leftharpoonplus","rightharpoondownplus"],1.75,716],xhookleftarrow:[["leftarrow","righthook"],1.08,522],xhookrightarrow:[["lefthook","rightarrow"],1.08,522],overlinesegment:[["leftlinesegment","rightlinesegment"],.888,522],underlinesegment:[["leftlinesegment","rightlinesegment"],.888,522],overbracket:[["leftbracketover","rightbracketover"],1.6,440],underbracket:[["leftbracketunder","rightbracketunder"],1.6,410],overgroup:[["leftgroup","rightgroup"],.888,342],undergroup:[["leftgroupunder","rightgroupunder"],.888,342],xmapsto:[["leftmapsto","rightarrow"],1.5,522],xtofrom:[["leftToFrom","rightToFrom"],1.75,528],xrightleftarrows:[["baraboveleftarrow","rightarrowabovebar"],1.75,901],xrightequilibrium:[["baraboveshortleftharpoon","rightharpoonaboveshortbar"],1.75,716],xleftequilibrium:[["shortbaraboveleftharpoon","shortrightharpoonabovebar"],1.75,716]},L8n=new Set(["widehat","widecheck","widetilde","utilde"]),cy=function(n,t){function r(){var o=4e5,l=n.label.slice(1);if(L8n.has(l)&&"base"in n){var u=n.base.type==="ordgroup"?n.base.body.length:1,h,_,p;if(u>5)l==="widehat"||l==="widecheck"?(h=420,o=2364,p=.42,_=l+"4"):(h=312,o=2340,p=.34,_="tilde4");else{var m=[1,1,2,2,3,3][u];l==="widehat"||l==="widecheck"?(o=[0,1062,2364,2364,2364][m],h=[0,239,300,360,420][m],p=[0,.24,.3,.3,.36,.42][m],_=l+m):(o=[0,600,1033,2339,2340][m],h=[0,260,286,306,312][m],p=[0,.26,.286,.3,.306,.34][m],_="tilde"+m)}var x=new ku(_),k=new rc([x],{width:"100%",height:tt(p),viewBox:"0 0 "+o+" "+h,preserveAspectRatio:"none"});return{span:Su([],[k],t),minWidth:0,height:p}}else{var v=[],b=D8n[l];if(!b)throw new Error('No SVG data for "'+l+'".');var[w,y,C]=b,N=C/1e3,E=w.length,T,j;if(E===1){if(b.length!==4)throw new Error('Expected 4-tuple for single-path SVG data "'+l+'".');T=["hide-tail"],j=[b[3]]}else if(E===2)T=["halfarrow-left","halfarrow-right"],j=["xMinYMin","xMaxYMin"];else if(E===3)T=["brace-left","brace-center","brace-right"],j=["xMinYMin","xMidYMin","xMaxYMin"];else throw new Error(`Correct katexImagesData or update code here to support - `+E+" children.");for(var M=0;M0&&(s.style.minWidth=tt(i)),s},I8n=function(n,t,r,s,i){var a,o=n.height+n.depth+r+s;if(/fbox|color|angl/.test(t)){if(a=We(["stretchy",t],[],i),t==="fbox"){var l=i.color&&i.getColor();l&&(a.style.borderColor=l)}}else{var u=[];/^[bx]cancel$/.test(t)&&u.push(new u5({x1:"0",y1:"0",x2:"100%",y2:"100%","stroke-width":"0.046em"})),/^x?cancel$/.test(t)&&u.push(new u5({x1:"0",y1:"100%",x2:"100%",y2:"0","stroke-width":"0.046em"}));var h=new rc(u,{width:"100%",height:tt(o)});a=Su([],[h],i)}return a.height=o,a.style.height=tt(o),a},$8n={bin:1,close:1,inner:1,open:1,punct:1,rel:1},B8n={"accent-token":1,mathord:1,"op-token":1,spacing:1,textord:1};function P8n(e){return e in $8n}function on(e,n){if(!e||e.type!==n)throw new Error("Expected node of type "+n+", but got "+(e?"node of type "+e.type:String(e)));return e}function uy(e){var n=_y(e);if(!n)throw new Error("Expected node of symbol group type, but got "+(e?"node of type "+e.type:String(e)));return n}function _y(e){return e&&(e.type==="atom"||B8n.hasOwnProperty(e.type))?e:null}var EP=e=>{if(e instanceof aa)return e;if(f8n(e)&&e.children.length===1)return EP(e.children[0])},O6=(e,n)=>{var t,r,s;e&&e.type==="supsub"?(r=on(e.base,"accent"),t=r.base,e.base=t,s=_8n(Hn(e,n)),e.base=r):(r=on(e,"accent"),t=r.base);var i=Hn(t,n.havingCrampedStyle()),a=r.isShifty&&ac(t),o=0;if(a){var l,u;o=(l=(u=EP(i))==null?void 0:u.skew)!=null?l:0}var h=r.label==="\\c",_=h?i.height+i.depth:Math.min(i.height,n.fontMetrics().xHeight),p;if(r.isStretchy)p=cy(r,n),p=Pn({positionType:"firstBaseline",children:[{type:"elem",elem:i},{type:"elem",elem:p,wrapperClasses:["svg-align"],wrapperStyle:o>0?{width:"calc(100% - "+tt(2*o)+")",marginLeft:tt(2*o)}:void 0}]});else{var m,x;r.label==="\\vec"?(m=bP("vec",n),x=vP.vec[1]):(m=oy({mode:r.mode,text:r.label},n,"textord"),m=u8n(m),m.italic=0,x=m.width,h&&(_+=m.depth)),p=We(["accent-body"],[m]);var k=r.label==="\\textcircled";k&&(p.classes.push("accent-full"),_=i.height);var v=o;k||(v-=x/2),p.style.left=tt(v),r.label==="\\textcircled"&&(p.style.top=".2em"),p=Pn({positionType:"firstBaseline",children:[{type:"elem",elem:i},{type:"kern",size:-_},{type:"elem",elem:p}]})}var b=We(["mord","accent"],[p],n);return s?(s.children[0]=b,s.height=Math.max(b.height,s.height),s.classes[0]="mord",s):b},NP=(e,n)=>{var t=e.isStretchy?ly(e.label):new Je("mo",[Ma(e.label,e.mode)]),r=new Je("mover",[cr(e.base,n),t]);return r.setAttribute("accent","true"),r},F8n=new RegExp(["\\acute","\\grave","\\ddot","\\tilde","\\bar","\\breve","\\check","\\hat","\\vec","\\dot","\\mathring"].map(e=>"\\"+e).join("|"));dt({type:"accent",names:["\\acute","\\grave","\\ddot","\\tilde","\\bar","\\breve","\\check","\\hat","\\vec","\\dot","\\mathring","\\widecheck","\\widehat","\\widetilde","\\overrightarrow","\\overleftarrow","\\Overrightarrow","\\overleftrightarrow","\\overgroup","\\overlinesegment","\\overleftharpoon","\\overrightharpoon"],props:{numArgs:1},handler:(e,n)=>{var t=Vv(n[0]),r=!F8n.test(e.funcName),s=!r||e.funcName==="\\widehat"||e.funcName==="\\widetilde"||e.funcName==="\\widecheck";return{type:"accent",mode:e.parser.mode,label:e.funcName,isStretchy:r,isShifty:s,base:t}},htmlBuilder:O6,mathmlBuilder:NP});dt({type:"accent",names:["\\'","\\`","\\^","\\~","\\=","\\u","\\.",'\\"',"\\c","\\r","\\H","\\v","\\textcircled"],props:{numArgs:1,allowedInText:!0,allowedInMath:!0,argTypes:["primitive"]},handler:(e,n)=>{var t=n[0],r=e.parser.mode;return r==="math"&&(e.parser.settings.reportNonstrict("mathVsTextAccents","LaTeX's accent "+e.funcName+" works only in text mode"),r="text"),{type:"accent",mode:r,label:e.funcName,isStretchy:!1,isShifty:!0,base:t}},htmlBuilder:O6,mathmlBuilder:NP});dt({type:"accentUnder",names:["\\underleftarrow","\\underrightarrow","\\underleftrightarrow","\\undergroup","\\underlinesegment","\\utilde"],props:{numArgs:1},handler:(e,n)=>{var{parser:t,funcName:r}=e,s=n[0];return{type:"accentUnder",mode:t.mode,label:r,base:s}},htmlBuilder:(e,n)=>{var t=Hn(e.base,n),r=cy(e,n),s=e.label==="\\utilde"?.12:0,i=Pn({positionType:"top",positionData:t.height,children:[{type:"elem",elem:r,wrapperClasses:["svg-align"]},{type:"kern",size:s},{type:"elem",elem:t}]});return We(["mord","accentunder"],[i],n)},mathmlBuilder:(e,n)=>{var t=ly(e.label),r=new Je("munder",[cr(e.base,n),t]);return r.setAttribute("accentunder","true"),r}});var h1=e=>{var n=new Je("mpadded",e?[e]:[]);return n.setAttribute("width","+0.6em"),n.setAttribute("lspace","0.3em"),n};dt({type:"xArrow",names:["\\xleftarrow","\\xrightarrow","\\xLeftarrow","\\xRightarrow","\\xleftrightarrow","\\xLeftrightarrow","\\xhookleftarrow","\\xhookrightarrow","\\xmapsto","\\xrightharpoondown","\\xrightharpoonup","\\xleftharpoondown","\\xleftharpoonup","\\xrightleftharpoons","\\xleftrightharpoons","\\xlongequal","\\xtwoheadrightarrow","\\xtwoheadleftarrow","\\xtofrom","\\xrightleftarrows","\\xrightequilibrium","\\xleftequilibrium","\\\\cdrightarrow","\\\\cdleftarrow","\\\\cdlongequal"],props:{numArgs:1,numOptionalArgs:1},handler(e,n,t){var{parser:r,funcName:s}=e;return{type:"xArrow",mode:r.mode,label:s,body:n[0],below:t[0]}},htmlBuilder(e,n){var t=n.style,r=n.havingStyle(t.sup()),s=oh(Hn(e.body,r,n),n),i=e.label.slice(0,2)==="\\x"?"x":"cd";s.classes.push(i+"-arrow-pad");var a;e.below&&(r=n.havingStyle(t.sub()),a=oh(Hn(e.below,r,n),n),a.classes.push(i+"-arrow-pad"));var o=cy(e,n),l=-n.fontMetrics().axisHeight+.5*o.height,u=-n.fontMetrics().axisHeight-.5*o.height-.111;(s.depth>.25||e.label==="\\xleftequilibrium")&&(u-=s.depth);var h;if(a){var _=-n.fontMetrics().axisHeight+a.height+.5*o.height+.111;h=Pn({positionType:"individualShift",children:[{type:"elem",elem:s,shift:u},{type:"elem",elem:o,shift:l,wrapperClasses:["svg-align"]},{type:"elem",elem:a,shift:_}]})}else h=Pn({positionType:"individualShift",children:[{type:"elem",elem:s,shift:u},{type:"elem",elem:o,shift:l,wrapperClasses:["svg-align"]}]});return We(["mrel","x-arrow"],[h],n)},mathmlBuilder(e,n){var t=ly(e.label);t.setAttribute("minsize",e.label.charAt(0)==="x"?"1.75em":"3.0em");var r;if(e.body){var s=h1(cr(e.body,n));if(e.below){var i=h1(cr(e.below,n));r=new Je("munderover",[t,i,s])}else r=new Je("mover",[t,s])}else if(e.below){var a=h1(cr(e.below,n));r=new Je("munder",[t,a])}else r=h1(),r=new Je("mover",[t,r]);return r}});function zP(e,n){var t=bs(e.body,n,!0);return We([e.mclass],t,n)}function jP(e,n){var t,r=_a(e.body,n);return e.mclass==="minner"?t=new Je("mpadded",r):e.mclass==="mord"?e.isCharacterBox?(t=r[0],t.type="mi"):t=new Je("mi",r):(e.isCharacterBox?(t=r[0],t.type="mo"):t=new Je("mo",r),e.mclass==="mbin"?(t.attributes.lspace="0.22em",t.attributes.rspace="0.22em"):e.mclass==="mpunct"?(t.attributes.lspace="0em",t.attributes.rspace="0.17em"):e.mclass==="mopen"||e.mclass==="mclose"?(t.attributes.lspace="0em",t.attributes.rspace="0em"):e.mclass==="minner"&&(t.attributes.lspace="0.0556em",t.attributes.width="+0.1111em")),t}dt({type:"mclass",names:["\\mathord","\\mathbin","\\mathrel","\\mathopen","\\mathclose","\\mathpunct","\\mathinner"],props:{numArgs:1,primitive:!0},handler(e,n){var{parser:t,funcName:r}=e,s=n[0];return{type:"mclass",mode:t.mode,mclass:"m"+r.slice(5),body:ss(s),isCharacterBox:ac(s)}},htmlBuilder:zP,mathmlBuilder:jP});var fy=e=>{var n=e.type==="ordgroup"&&e.body.length?e.body[0]:e;return n.type==="atom"&&(n.family==="bin"||n.family==="rel")?"m"+n.family:"mord"};dt({type:"mclass",names:["\\@binrel"],props:{numArgs:2},handler(e,n){var{parser:t}=e;return{type:"mclass",mode:t.mode,mclass:fy(n[0]),body:ss(n[1]),isCharacterBox:ac(n[1])}}});dt({type:"mclass",names:["\\stackrel","\\overset","\\underset"],props:{numArgs:2},handler(e,n){var{parser:t,funcName:r}=e,s=n[1],i=n[0],a;r!=="\\stackrel"?a=fy(s):a="mrel";var o={type:"op",mode:s.mode,limits:!0,alwaysHandleSupSub:!0,parentIsSupSub:!1,symbol:!1,suppressBaseShift:r!=="\\stackrel",body:ss(s)},l={type:"supsub",mode:i.mode,base:o,sup:r==="\\underset"?null:i,sub:r==="\\underset"?i:null};return{type:"mclass",mode:t.mode,mclass:a,body:[l],isCharacterBox:ac(l)}},htmlBuilder:zP,mathmlBuilder:jP});dt({type:"pmb",names:["\\pmb"],props:{numArgs:1,allowedInText:!0},handler(e,n){var{parser:t}=e;return{type:"pmb",mode:t.mode,mclass:fy(n[0]),body:ss(n[0])}},htmlBuilder(e,n){var t=bs(e.body,n,!0),r=We([e.mclass],t,n);return r.style.textShadow="0.02em 0.01em 0.04px",r},mathmlBuilder(e,n){var t=_a(e.body,n),r=new Je("mstyle",t);return r.setAttribute("style","text-shadow: 0.02em 0.01em 0.04px"),r}});var H8n={">":"\\\\cdrightarrow","<":"\\\\cdleftarrow","=":"\\\\cdlongequal",A:"\\uparrow",V:"\\downarrow","|":"\\Vert",".":"no arrow"},aA=()=>({type:"styling",body:[],mode:"math",style:"display",resetFont:!0}),oA=e=>e.type==="textord"&&e.text==="@",q8n=(e,n)=>(e.type==="mathord"||e.type==="atom")&&e.text===n;function U8n(e,n,t){var r=H8n[e];switch(r){case"\\\\cdrightarrow":case"\\\\cdleftarrow":return t.callFunction(r,[n[0]],[n[1]]);case"\\uparrow":case"\\downarrow":{var s=t.callFunction("\\\\cdleft",[n[0]],[]),i={type:"atom",text:r,mode:"math",family:"rel"},a=t.callFunction("\\Big",[i],[]),o=t.callFunction("\\\\cdright",[n[1]],[]),l={type:"ordgroup",mode:"math",body:[s,a,o]};return t.callFunction("\\\\cdparent",[l],[])}case"\\\\cdlongequal":return t.callFunction("\\\\cdlongequal",[],[]);case"\\Vert":{var u={type:"textord",text:"\\Vert",mode:"math"};return t.callFunction("\\Big",[u],[])}default:return{type:"textord",text:" ",mode:"math"}}}function G8n(e){var n=[];for(e.gullet.beginGroup(),e.gullet.macros.set("\\cr","\\\\\\relax"),e.gullet.beginGroup();;){n.push(e.parseExpression(!1,"\\\\")),e.gullet.endGroup(),e.gullet.beginGroup();var t=e.fetch().text;if(t==="&"||t==="\\\\")e.consume();else if(t==="\\end"){n[n.length-1].length===0&&n.pop();break}else throw new Ze("Expected \\\\ or \\cr or \\end",e.nextToken)}for(var r=[],s=[r],i=0;iAV".includes(u))for(var _=0;_<2;_++){for(var p=!0,m=l+1;mAV=|." after @',a[l]);var x=U8n(u,h,e),k={type:"styling",body:[x],mode:"math",style:"display",resetFont:!0};r.push(k),o=aA()}i%2===0?r.push(o):r.shift(),r=[],s.push(r)}e.gullet.endGroup(),e.gullet.endGroup();var v=new Array(s[0].length).fill({type:"align",align:"c",pregap:.25,postgap:.25});return{type:"array",mode:"math",body:s,arraystretch:1,addJot:!0,rowGaps:[null],cols:v,colSeparationType:"CD",hLinesBeforeRow:new Array(s.length+1).fill([])}}dt({type:"cdlabel",names:["\\\\cdleft","\\\\cdright"],props:{numArgs:1},handler(e,n){var{parser:t,funcName:r}=e;return{type:"cdlabel",mode:t.mode,side:r.slice(4),label:n[0]}},htmlBuilder(e,n){var t=n.havingStyle(n.style.sup()),r=oh(Hn(e.label,t,n),n);return r.classes.push("cd-label-"+e.side),r.style.bottom=tt(.8-r.depth),r.height=0,r.depth=0,r},mathmlBuilder(e,n){var t=new Je("mrow",[cr(e.label,n)]);return t=new Je("mpadded",[t]),t.setAttribute("width","0"),e.side==="left"&&t.setAttribute("lspace","-1width"),t.setAttribute("voffset","0.7em"),t=new Je("mstyle",[t]),t.setAttribute("displaystyle","false"),t.setAttribute("scriptlevel","1"),t}});dt({type:"cdlabelparent",names:["\\\\cdparent"],props:{numArgs:1},handler(e,n){var{parser:t}=e;return{type:"cdlabelparent",mode:t.mode,fragment:n[0]}},htmlBuilder(e,n){var t=oh(Hn(e.fragment,n),n);return t.classes.push("cd-vert-arrow"),t},mathmlBuilder(e,n){return new Je("mrow",[cr(e.fragment,n)])}});dt({type:"textord",names:["\\@char"],props:{numArgs:1,allowedInText:!0},handler(e,n){for(var{parser:t}=e,r=on(n[0],"ordgroup"),s=r.body,i="",a=0;a=1114111)throw new Ze("\\@char with invalid code point "+i);return l<=65535?u=String.fromCharCode(l):(l-=65536,u=String.fromCharCode((l>>10)+55296,(l&1023)+56320)),{type:"textord",mode:t.mode,text:u}}});var TP=(e,n)=>{var t=bs(e.body,n.withColor(e.color),!1);return lc(t)},AP=(e,n)=>{var t=_a(e.body,n.withColor(e.color)),r=new Je("mstyle",t);return r.setAttribute("mathcolor",e.color),r};dt({type:"color",names:["\\textcolor"],props:{numArgs:2,allowedInText:!0,argTypes:["color","original"]},handler(e,n){var{parser:t}=e,r=on(n[0],"color-token").color,s=n[1];return{type:"color",mode:t.mode,color:r,body:ss(s)}},htmlBuilder:TP,mathmlBuilder:AP});dt({type:"color",names:["\\color"],props:{numArgs:1,allowedInText:!0,argTypes:["color"]},handler(e,n){var{parser:t,breakOnTokenText:r}=e,s=on(n[0],"color-token").color;t.gullet.macros.set("\\current@color",s);var i=t.parseExpression(!0,r);return{type:"color",mode:t.mode,color:s,body:i}},htmlBuilder:TP,mathmlBuilder:AP});dt({type:"cr",names:["\\\\"],props:{numArgs:0,numOptionalArgs:0,allowedInText:!0},handler(e,n,t){var{parser:r}=e,s=r.gullet.future().text==="["?r.parseSizeGroup(!0):null,i=!r.settings.displayMode||!r.settings.useStrictBehavior("newLineInDisplayMode","In LaTeX, \\\\ or \\newline does nothing in display mode");return{type:"cr",mode:r.mode,newLine:i,size:s&&on(s,"size").value}},htmlBuilder(e,n){var t=We(["mspace"],[],n);return e.newLine&&(t.classes.push("newline"),e.size&&(t.style.marginTop=tt(Or(e.size,n)))),t},mathmlBuilder(e,n){var t=new Je("mspace");return e.newLine&&(t.setAttribute("linebreak","newline"),e.size&&t.setAttribute("height",tt(Or(e.size,n)))),t}});var x5={"\\global":"\\global","\\long":"\\\\globallong","\\\\globallong":"\\\\globallong","\\def":"\\gdef","\\gdef":"\\gdef","\\edef":"\\xdef","\\xdef":"\\xdef","\\let":"\\\\globallet","\\futurelet":"\\\\globalfuture"},RP=e=>{var n=e.text;if(/^(?:[\\{}$&#^_]|EOF)$/.test(n))throw new Ze("Expected a control sequence",e);return n},V8n=e=>{var n=e.gullet.popToken();return n.text==="="&&(n=e.gullet.popToken(),n.text===" "&&(n=e.gullet.popToken())),n},MP=(e,n,t,r)=>{var s=e.gullet.macros.get(t.text);s==null&&(t.noexpand=!0,s={tokens:[t],numArgs:0,unexpandable:!e.gullet.isExpandable(t.text)}),e.gullet.macros.set(n,s,r)};dt({type:"internal",names:["\\global","\\long","\\\\globallong"],props:{numArgs:0,allowedInText:!0},handler(e){var{parser:n,funcName:t}=e;n.consumeSpaces();var r=n.fetch();if(x5[r.text])return(t==="\\global"||t==="\\\\globallong")&&(r.text=x5[r.text]),on(n.parseFunction(),"internal");throw new Ze("Invalid token after macro prefix",r)}});dt({type:"internal",names:["\\def","\\gdef","\\edef","\\xdef"],props:{numArgs:0,allowedInText:!0,primitive:!0},handler(e){var{parser:n,funcName:t}=e,r=n.gullet.popToken(),s=r.text;if(/^(?:[\\{}$&#^_]|EOF)$/.test(s))throw new Ze("Expected a control sequence",r);for(var i=0,a,o=[[]];n.gullet.future().text!=="{";)if(r=n.gullet.popToken(),r.text==="#"){if(n.gullet.future().text==="{"){a=n.gullet.future(),o[i].push("{");break}if(r=n.gullet.popToken(),!/^[1-9]$/.test(r.text))throw new Ze('Invalid argument number "'+r.text+'"');if(parseInt(r.text)!==i+1)throw new Ze('Argument number "'+r.text+'" out of order');i++,o.push([])}else{if(r.text==="EOF")throw new Ze("Expected a macro definition");o[i].push(r.text)}var{tokens:l}=n.gullet.consumeArg();return a&&l.unshift(a),(t==="\\edef"||t==="\\xdef")&&(l=n.gullet.expandTokens(l),l.reverse()),n.gullet.macros.set(s,{tokens:l,numArgs:i,delimiters:o},t===x5[t]),{type:"internal",mode:n.mode}}});dt({type:"internal",names:["\\let","\\\\globallet"],props:{numArgs:0,allowedInText:!0,primitive:!0},handler(e){var{parser:n,funcName:t}=e,r=RP(n.gullet.popToken());n.gullet.consumeSpaces();var s=V8n(n);return MP(n,r,s,t==="\\\\globallet"),{type:"internal",mode:n.mode}}});dt({type:"internal",names:["\\futurelet","\\\\globalfuture"],props:{numArgs:0,allowedInText:!0,primitive:!0},handler(e){var{parser:n,funcName:t}=e,r=RP(n.gullet.popToken()),s=n.gullet.popToken(),i=n.gullet.popToken();return MP(n,r,i,t==="\\\\globalfuture"),n.gullet.pushToken(i),n.gullet.pushToken(s),{type:"internal",mode:n.mode}}});var Up=function(n,t,r){var s=Sr.math[n]&&Sr.math[n].replace,i=j6(s||n,t,r);if(!i)throw new Error("Unsupported symbol "+n+" and font size "+t+".");return i},D6=function(n,t,r,s){var i=r.havingBaseStyle(t),a=We(s.concat(i.sizingClasses(r)),[n],r),o=i.sizeMultiplier/r.sizeMultiplier;return a.height*=o,a.depth*=o,a.maxFontSize=i.sizeMultiplier,a},OP=function(n,t,r){var s=t.havingBaseStyle(r),i=(1-t.sizeMultiplier/s.sizeMultiplier)*t.fontMetrics().axisHeight;n.classes.push("delimcenter"),n.style.top=tt(i),n.height-=i,n.depth+=i},K8n=function(n,t,r,s,i,a){var o=li(n,"Main-Regular",i,s),l=D6(o,t,s,a);return OP(l,s,t),l},W8n=function(n,t,r,s){return li(n,"Size"+t+"-Regular",r,s)},DP=function(n,t,r,s,i,a){var o=W8n(n,t,i,s),l=D6(We(["delimsizing","size"+t],[o],s),en.TEXT,s,a);return r&&OP(l,s,en.TEXT),l},Dw=function(n,t,r){var s;t==="Size1-Regular"?s="delim-size1":s="delim-size4";var i=We(["delimsizinginner",s],[We([],[li(n,t,r)])]);return{type:"elem",elem:i}},Lw=function(n,t,r){var s=Bo["Size4-Regular"][n.charCodeAt(0)]?Bo["Size4-Regular"][n.charCodeAt(0)][4]:Bo["Size1-Regular"][n.charCodeAt(0)][4],i=new ku("inner",r8n(n,Math.round(1e3*t))),a=new rc([i],{width:tt(s),height:tt(t),style:"width:"+tt(s),viewBox:"0 0 "+1e3*s+" "+Math.round(1e3*t),preserveAspectRatio:"xMinYMin"}),o=Su([],[a],r);return o.height=t,o.style.height=tt(t),o.style.width=tt(s),{type:"elem",elem:o}},w5=.008,p1={type:"kern",size:-1*w5},Q8n=new Set(["|","\\lvert","\\rvert","\\vert"]),X8n=new Set(["\\|","\\lVert","\\rVert","\\Vert"]),LP=function(n,t,r,s,i,a){var o,l,u,h,_="",p=0;o=u=h=n,l=null;var m="Size1-Regular";n==="\\uparrow"?u=h="⏐":n==="\\Uparrow"?u=h="‖":n==="\\downarrow"?o=u="⏐":n==="\\Downarrow"?o=u="‖":n==="\\updownarrow"?(o="\\uparrow",u="⏐",h="\\downarrow"):n==="\\Updownarrow"?(o="\\Uparrow",u="‖",h="\\Downarrow"):Q8n.has(n)?(u="∣",_="vert",p=333):X8n.has(n)?(u="∥",_="doublevert",p=556):n==="["||n==="\\lbrack"?(o="⎡",u="⎢",h="⎣",m="Size4-Regular",_="lbrack",p=667):n==="]"||n==="\\rbrack"?(o="⎤",u="⎥",h="⎦",m="Size4-Regular",_="rbrack",p=667):n==="\\lfloor"||n==="⌊"?(u=o="⎢",h="⎣",m="Size4-Regular",_="lfloor",p=667):n==="\\lceil"||n==="⌈"?(o="⎡",u=h="⎢",m="Size4-Regular",_="lceil",p=667):n==="\\rfloor"||n==="⌋"?(u=o="⎥",h="⎦",m="Size4-Regular",_="rfloor",p=667):n==="\\rceil"||n==="⌉"?(o="⎤",u=h="⎥",m="Size4-Regular",_="rceil",p=667):n==="("||n==="\\lparen"?(o="⎛",u="⎜",h="⎝",m="Size4-Regular",_="lparen",p=875):n===")"||n==="\\rparen"?(o="⎞",u="⎟",h="⎠",m="Size4-Regular",_="rparen",p=875):n==="\\{"||n==="\\lbrace"?(o="⎧",l="⎨",h="⎩",u="⎪",m="Size4-Regular"):n==="\\}"||n==="\\rbrace"?(o="⎫",l="⎬",h="⎭",u="⎪",m="Size4-Regular"):n==="\\lgroup"||n==="⟮"?(o="⎧",h="⎩",u="⎪",m="Size4-Regular"):n==="\\rgroup"||n==="⟯"?(o="⎫",h="⎭",u="⎪",m="Size4-Regular"):n==="\\lmoustache"||n==="⎰"?(o="⎧",h="⎭",u="⎪",m="Size4-Regular"):(n==="\\rmoustache"||n==="⎱")&&(o="⎫",h="⎩",u="⎪",m="Size4-Regular");var x=Up(o,m,i),k=x.height+x.depth,v=Up(u,m,i),b=v.height+v.depth,w=Up(h,m,i),y=w.height+w.depth,C=0,N=1;if(l!==null){var E=Up(l,m,i);C=E.height+E.depth,N=2}var T=k+y+C,j=Math.max(0,Math.ceil((t-T)/(N*b))),M=T+j*N*b,D=s.fontMetrics().axisHeight;r&&(D*=s.sizeMultiplier);var I=M/2-D,P=[];if(_.length>0){var U=M-k-y,q=Math.round(M*1e3),W=s8n(_,Math.round(U*1e3)),H=new ku(_,W),Y=tt(p/1e3),te=tt(q/1e3),$=new rc([H],{width:Y,height:te,viewBox:"0 0 "+p+" "+q}),L=Su([],[$],s);L.height=q/1e3,L.style.width=Y,L.style.height=te,P.push({type:"elem",elem:L})}else{if(P.push(Dw(h,m,i)),P.push(p1),l===null){var F=M-k-y+2*w5;P.push(Lw(u,F,s))}else{var G=(M-k-y-C)/2+2*w5;P.push(Lw(u,G,s)),P.push(p1),P.push(Dw(l,m,i)),P.push(p1),P.push(Lw(u,G,s))}P.push(p1),P.push(Dw(o,m,i))}var V=s.havingBaseStyle(en.TEXT),ee=Pn({positionType:"bottom",positionData:I,children:P});return D6(We(["delimsizing","mult"],[ee],V),en.TEXT,s,a)},Iw=80,$w=.08,Bw=function(n,t,r,s,i){var a=n8n(n,s,r),o=new ku(n,a),l=new rc([o],{width:"400em",height:tt(t),viewBox:"0 0 400000 "+r,preserveAspectRatio:"xMinYMin slice"});return Su(["hide-tail"],[l],i)},Y8n=function(n,t){var r=t.havingBaseSizing(),s=FP("\\surd",n*r.sizeMultiplier,PP,r),i=r.sizeMultiplier,a=Math.max(0,t.minRuleThickness-t.fontMetrics().sqrtRuleThickness),o,l,u,h,_;return s.type==="small"?(h=1e3+1e3*a+Iw,n<1?i=1:n<1.4&&(i=.7),l=(1+a+$w)/i,u=(1+a)/i,o=Bw("sqrtMain",l,h,a,t),o.style.minWidth="0.853em",_=.833/i):s.type==="large"?(h=(1e3+Iw)*s0[s.size],u=(s0[s.size]+a)/i,l=(s0[s.size]+a+$w)/i,o=Bw("sqrtSize"+s.size,l,h,a,t),o.style.minWidth="1.02em",_=1/i):(l=n+a+$w,u=n+a,h=Math.floor(1e3*n+a)+Iw,o=Bw("sqrtTall",l,h,a,t),o.style.minWidth="0.742em",_=1.056),o.height=u,o.style.height=tt(l),{span:o,advanceWidth:_,ruleWidth:(t.fontMetrics().sqrtRuleThickness+a)*i}},IP=new Set(["(","\\lparen",")","\\rparen","[","\\lbrack","]","\\rbrack","\\{","\\lbrace","\\}","\\rbrace","\\lfloor","\\rfloor","⌊","⌋","\\lceil","\\rceil","⌈","⌉","\\surd"]),Z8n=new Set(["\\uparrow","\\downarrow","\\updownarrow","\\Uparrow","\\Downarrow","\\Updownarrow","|","\\|","\\vert","\\Vert","\\lvert","\\rvert","\\lVert","\\rVert","\\lgroup","\\rgroup","⟮","⟯","\\lmoustache","\\rmoustache","⎰","⎱"]),$P=new Set(["<",">","\\langle","\\rangle","/","\\backslash","\\lt","\\gt"]),s0=[0,1.2,1.8,2.4,3],BP=function(n,t,r,s,i){if(n==="<"||n==="\\lt"||n==="⟨"?n="\\langle":(n===">"||n==="\\gt"||n==="⟩")&&(n="\\rangle"),IP.has(n)||$P.has(n))return DP(n,t,!1,r,s,i);if(Z8n.has(n))return LP(n,s0[t],!1,r,s,i);throw new Ze("Illegal delimiter: '"+n+"'")},J8n=[{type:"small",style:en.SCRIPTSCRIPT},{type:"small",style:en.SCRIPT},{type:"small",style:en.TEXT},{type:"large",size:1},{type:"large",size:2},{type:"large",size:3},{type:"large",size:4}],e9n=[{type:"small",style:en.SCRIPTSCRIPT},{type:"small",style:en.SCRIPT},{type:"small",style:en.TEXT},{type:"stack"}],PP=[{type:"small",style:en.SCRIPTSCRIPT},{type:"small",style:en.SCRIPT},{type:"small",style:en.TEXT},{type:"large",size:1},{type:"large",size:2},{type:"large",size:3},{type:"large",size:4},{type:"stack"}],t9n=function(n){if(n.type==="small")return"Main-Regular";if(n.type==="large")return"Size"+n.size+"-Regular";if(n.type==="stack")return"Size4-Regular";var t=n.type;throw new Error("Add support for delim type '"+t+"' here.")},FP=function(n,t,r,s){for(var i=Math.min(2,3-s.style.size),a=i;at)return o}return r[r.length-1]},k5=function(n,t,r,s,i,a){n==="<"||n==="\\lt"||n==="⟨"?n="\\langle":(n===">"||n==="\\gt"||n==="⟩")&&(n="\\rangle");var o;$P.has(n)?o=J8n:IP.has(n)?o=PP:o=e9n;var l=FP(n,t,o,s);return l.type==="small"?K8n(n,l.style,r,s,i,a):l.type==="large"?DP(n,l.size,r,s,i,a):LP(n,t,r,s,i,a)},Pw=function(n,t,r,s,i,a){var o=s.fontMetrics().axisHeight*s.sizeMultiplier,l=901,u=5/s.fontMetrics().ptPerEm,h=Math.max(t-o,r+o),_=Math.max(h/500*l,2*h-u);return k5(n,_,!0,s,i,a)},lA={"\\bigl":{mclass:"mopen",size:1},"\\Bigl":{mclass:"mopen",size:2},"\\biggl":{mclass:"mopen",size:3},"\\Biggl":{mclass:"mopen",size:4},"\\bigr":{mclass:"mclose",size:1},"\\Bigr":{mclass:"mclose",size:2},"\\biggr":{mclass:"mclose",size:3},"\\Biggr":{mclass:"mclose",size:4},"\\bigm":{mclass:"mrel",size:1},"\\Bigm":{mclass:"mrel",size:2},"\\biggm":{mclass:"mrel",size:3},"\\Biggm":{mclass:"mrel",size:4},"\\big":{mclass:"mord",size:1},"\\Big":{mclass:"mord",size:2},"\\bigg":{mclass:"mord",size:3},"\\Bigg":{mclass:"mord",size:4}},n9n=new Set(["(","\\lparen",")","\\rparen","[","\\lbrack","]","\\rbrack","\\{","\\lbrace","\\}","\\rbrace","\\lfloor","\\rfloor","⌊","⌋","\\lceil","\\rceil","⌈","⌉","<",">","\\langle","⟨","\\rangle","⟩","\\lt","\\gt","\\lvert","\\rvert","\\lVert","\\rVert","\\lgroup","\\rgroup","⟮","⟯","\\lmoustache","\\rmoustache","⎰","⎱","/","\\backslash","|","\\vert","\\|","\\Vert","\\uparrow","\\Uparrow","\\downarrow","\\Downarrow","\\updownarrow","\\Updownarrow","."]);function cA(e){return"isMiddle"in e}function dy(e,n){var t=_y(e);if(t&&n9n.has(t.text))return t;throw t?new Ze("Invalid delimiter '"+t.text+"' after '"+n.funcName+"'",e):new Ze("Invalid delimiter type '"+e.type+"'",e)}dt({type:"delimsizing",names:["\\bigl","\\Bigl","\\biggl","\\Biggl","\\bigr","\\Bigr","\\biggr","\\Biggr","\\bigm","\\Bigm","\\biggm","\\Biggm","\\big","\\Big","\\bigg","\\Bigg"],props:{numArgs:1,argTypes:["primitive"]},handler:(e,n)=>{var t=dy(n[0],e);return{type:"delimsizing",mode:e.parser.mode,size:lA[e.funcName].size,mclass:lA[e.funcName].mclass,delim:t.text}},htmlBuilder:(e,n)=>e.delim==="."?We([e.mclass]):BP(e.delim,e.size,n,e.mode,[e.mclass]),mathmlBuilder:e=>{var n=[];e.delim!=="."&&n.push(Ma(e.delim,e.mode));var t=new Je("mo",n);e.mclass==="mopen"||e.mclass==="mclose"?t.setAttribute("fence","true"):t.setAttribute("fence","false"),t.setAttribute("stretchy","true");var r=tt(s0[e.size]);return t.setAttribute("minsize",r),t.setAttribute("maxsize",r),t}});function uA(e){if(!e.body)throw new Error("Bug: The leftright ParseNode wasn't fully parsed.")}dt({type:"leftright-right",names:["\\right"],props:{numArgs:1,primitive:!0},handler:(e,n)=>{var t=e.parser.gullet.macros.get("\\current@color");if(t&&typeof t!="string")throw new Ze("\\current@color set to non-string in \\right");return{type:"leftright-right",mode:e.parser.mode,delim:dy(n[0],e).text,color:t}}});dt({type:"leftright",names:["\\left"],props:{numArgs:1,primitive:!0},handler:(e,n)=>{var t=dy(n[0],e),r=e.parser;++r.leftrightDepth;var s=r.parseExpression(!1);--r.leftrightDepth,r.expect("\\right",!1);var i=on(r.parseFunction(),"leftright-right");return{type:"leftright",mode:r.mode,body:s,left:t.text,right:i.delim,rightColor:i.color}},htmlBuilder:(e,n)=>{uA(e);for(var t=bs(e.body,n,!0,["mopen","mclose"]),r=0,s=0,i=!1,a=0;a{uA(e);var t=_a(e.body,n);if(e.left!=="."){var r=new Je("mo",[Ma(e.left,e.mode)]);r.setAttribute("fence","true"),t.unshift(r)}if(e.right!=="."){var s=new Je("mo",[Ma(e.right,e.mode)]);s.setAttribute("fence","true"),e.rightColor&&s.setAttribute("mathcolor",e.rightColor),t.push(s)}return R6(t)}});dt({type:"middle",names:["\\middle"],props:{numArgs:1,primitive:!0},handler:(e,n)=>{var t=dy(n[0],e);if(!e.parser.leftrightDepth)throw new Ze("\\middle without preceding \\left",t);return{type:"middle",mode:e.parser.mode,delim:t.text}},htmlBuilder:(e,n)=>{var t;return e.delim==="."?t=R0(n,[]):(t=BP(e.delim,1,n,e.mode,[]),t.isMiddle={delim:e.delim,options:n}),t},mathmlBuilder:(e,n)=>{var t=e.delim==="\\vert"||e.delim==="|"?Ma("|","text"):Ma(e.delim,e.mode),r=new Je("mo",[t]);return r.setAttribute("fence","true"),r.setAttribute("lspace","0.05em"),r.setAttribute("rspace","0.05em"),r}});var hy=(e,n)=>{var t=oh(Hn(e.body,n),n),r=e.label.slice(1),s=n.sizeMultiplier,i,a,o=ac(e.body);if(r==="sout")i=We(["stretchy","sout"]),i.height=n.fontMetrics().defaultRuleThickness/s,a=-.5*n.fontMetrics().xHeight;else if(r==="phase"){var l=Or({number:.6,unit:"pt"},n),u=Or({number:.35,unit:"ex"},n),h=n.havingBaseSizing();s=s/h.sizeMultiplier;var _=t.height+t.depth+l+u;t.style.paddingLeft=tt(_/2+l);var p=Math.floor(1e3*_*s),m=e8n(p),x=new rc([new ku("phase",m)],{width:"400em",height:tt(p/1e3),viewBox:"0 0 400000 "+p,preserveAspectRatio:"xMinYMin slice"});i=Su(["hide-tail"],[x],n),i.style.height=tt(_),a=t.depth+l+u}else{/cancel/.test(r)?o||t.classes.push("cancel-pad"):r==="angl"?t.classes.push("anglpad"):t.classes.push("boxpad");var k,v,b=0;/box/.test(r)?(b=Math.max(n.fontMetrics().fboxrule,n.minRuleThickness),k=n.fontMetrics().fboxsep+(r==="colorbox"?0:b),v=k):r==="angl"?(b=Math.max(n.fontMetrics().defaultRuleThickness,n.minRuleThickness),k=4*b,v=Math.max(0,.25-t.depth)):(k=o?.2:0,v=k),i=I8n(t,r,k,v,n),/fbox|boxed|fcolorbox/.test(r)?(i.style.borderStyle="solid",i.style.borderWidth=tt(b)):r==="angl"&&b!==.049&&(i.style.borderTopWidth=tt(b),i.style.borderRightWidth=tt(b)),a=t.depth+v,e.backgroundColor&&(i.style.backgroundColor=e.backgroundColor,e.borderColor&&(i.style.borderColor=e.borderColor))}var w;if(e.backgroundColor)w=Pn({positionType:"individualShift",children:[{type:"elem",elem:i,shift:a},{type:"elem",elem:t,shift:0}]});else{var y=/cancel|phase/.test(r)?["svg-align"]:[];w=Pn({positionType:"individualShift",children:[{type:"elem",elem:t,shift:0},{type:"elem",elem:i,shift:a,wrapperClasses:y}]})}return/cancel/.test(r)&&(w.height=t.height,w.depth=t.depth),/cancel/.test(r)&&!o?We(["mord","cancel-lap"],[w],n):We(["mord"],[w],n)},py=(e,n)=>{var t,r=new Je(e.label.includes("colorbox")?"mpadded":"menclose",[cr(e.body,n)]);switch(e.label){case"\\cancel":r.setAttribute("notation","updiagonalstrike");break;case"\\bcancel":r.setAttribute("notation","downdiagonalstrike");break;case"\\phase":r.setAttribute("notation","phasorangle");break;case"\\sout":r.setAttribute("notation","horizontalstrike");break;case"\\fbox":r.setAttribute("notation","box");break;case"\\angl":r.setAttribute("notation","actuarial");break;case"\\fcolorbox":case"\\colorbox":if(t=n.fontMetrics().fboxsep*n.fontMetrics().ptPerEm,r.setAttribute("width","+"+2*t+"pt"),r.setAttribute("height","+"+2*t+"pt"),r.setAttribute("lspace",t+"pt"),r.setAttribute("voffset",t+"pt"),e.label==="\\fcolorbox"){var s=Math.max(n.fontMetrics().fboxrule,n.minRuleThickness);r.setAttribute("style","border: "+tt(s)+" solid "+e.borderColor)}break;case"\\xcancel":r.setAttribute("notation","updiagonalstrike downdiagonalstrike");break}return e.backgroundColor&&r.setAttribute("mathbackground",e.backgroundColor),r};dt({type:"enclose",names:["\\colorbox"],props:{numArgs:2,allowedInText:!0,argTypes:["color","hbox"]},handler(e,n,t){var{parser:r,funcName:s}=e,i=on(n[0],"color-token").color,a=n[1];return{type:"enclose",mode:r.mode,label:s,backgroundColor:i,body:a}},htmlBuilder:hy,mathmlBuilder:py});dt({type:"enclose",names:["\\fcolorbox"],props:{numArgs:3,allowedInText:!0,argTypes:["color","color","hbox"]},handler(e,n,t){var{parser:r,funcName:s}=e,i=on(n[0],"color-token").color,a=on(n[1],"color-token").color,o=n[2];return{type:"enclose",mode:r.mode,label:s,backgroundColor:a,borderColor:i,body:o}},htmlBuilder:hy,mathmlBuilder:py});dt({type:"enclose",names:["\\fbox"],props:{numArgs:1,argTypes:["hbox"],allowedInText:!0},handler(e,n){var{parser:t}=e;return{type:"enclose",mode:t.mode,label:"\\fbox",body:n[0]}}});dt({type:"enclose",names:["\\cancel","\\bcancel","\\xcancel","\\phase"],props:{numArgs:1},handler(e,n){var{parser:t,funcName:r}=e,s=n[0];return{type:"enclose",mode:t.mode,label:r,body:s}},htmlBuilder:hy,mathmlBuilder:py});dt({type:"enclose",names:["\\sout"],props:{numArgs:1,allowedInText:!0},handler(e,n){var{parser:t,funcName:r}=e;t.mode==="math"&&t.settings.reportNonstrict("mathVsSout","LaTeX's \\sout works only in text mode");var s=n[0];return{type:"enclose",mode:t.mode,label:r,body:s}},htmlBuilder:hy,mathmlBuilder:py});dt({type:"enclose",names:["\\angl"],props:{numArgs:1,argTypes:["hbox"],allowedInText:!1},handler(e,n){var{parser:t}=e;return{type:"enclose",mode:t.mode,label:"\\angl",body:n[0]}}});var HP={};function el(e){for(var{type:n,names:t,props:r,handler:s,htmlBuilder:i,mathmlBuilder:a}=e,o={type:n,numArgs:r.numArgs||0,allowedInText:!1,numOptionalArgs:0,handler:s},l=0;l{var n=e.parser.settings;if(!n.displayMode)throw new Ze("{"+e.envName+"} can be used only in display mode.")},r9n=new Set(["gather","gather*"]);function L6(e){if(!e.includes("ed"))return!e.includes("*")}function Mu(e,n,t){var{hskipBeforeAndAfter:r,addJot:s,cols:i,arraystretch:a,colSeparationType:o,autoTag:l,singleRow:u,emptySingleRow:h,maxNumCols:_,leqno:p}=n;if(e.gullet.beginGroup(),u||e.gullet.macros.set("\\cr","\\\\\\relax"),!a){var m=e.gullet.expandMacroAsText("\\arraystretch");if(m==null)a=1;else if(a=parseFloat(m),!a||a<0)throw new Ze("Invalid \\arraystretch: "+m)}e.gullet.beginGroup();var x=[],k=[x],v=[],b=[],w=l!=null?[]:void 0;function y(){l&&e.gullet.macros.set("\\@eqnsw","1",!0)}function C(){w&&(e.gullet.macros.get("\\df@tag")?(w.push(e.subparse([new ra("\\df@tag")])),e.gullet.macros.set("\\df@tag",void 0,!0)):w.push(!!l&&e.gullet.macros.get("\\@eqnsw")==="1"))}for(y(),b.push(_A(e));;){var N=e.parseExpression(!1,u?"\\end":"\\\\");e.gullet.endGroup(),e.gullet.beginGroup();var E={type:"ordgroup",mode:e.mode,body:N};t&&(E={type:"styling",mode:e.mode,style:t,resetFont:!0,body:[E]}),x.push(E);var T=e.fetch().text;if(T==="&"){if(_&&x.length===_){if(u||o)throw new Ze("Too many tab characters: &",e.nextToken);e.settings.reportNonstrict("textEnv","Too few columns specified in the {array} column argument.")}e.consume()}else if(T==="\\end"){C(),x.length===1&&E.type==="styling"&&E.body.length===1&&E.body[0].type==="ordgroup"&&E.body[0].body.length===0&&(k.length>1||!h)&&k.pop(),b.length0&&(y+=.25),u.push({pos:y,isDashed:qe[at]})}for(C(a[0]),r=0;r0&&(I+=w,Tqe))for(r=0;r=o)){var oe=void 0;if(s>0||n.hskipBeforeAndAfter){var le,_e;oe=(le=(_e=V)==null?void 0:_e.pregap)!=null?le:p,oe!==0&&(W=We(["arraycolsep"],[]),W.style.width=tt(oe),q.push(W))}var pe=[];for(r=0;r0){for(var $t=ah("hline",t,h),jt=ah("hdashline",t,h),mt=[{type:"elem",elem:Vt,shift:0}];u.length>0;){var we=u.pop(),ct=we.pos-P;we.isDashed?mt.push({type:"elem",elem:jt,shift:ct}):mt.push({type:"elem",elem:$t,shift:ct})}Vt=Pn({positionType:"individualShift",children:mt})}if(Y.length===0)return We(["mord"],[Vt],t);var ye=Pn({positionType:"individualShift",children:Y}),je=We(["tag"],[ye],t);return lc([Vt,je])},s9n={c:"center ",l:"left ",r:"right "},nl=function(n,t){for(var r=[],s=new Je("mtd",[],["mtr-glue"]),i=new Je("mtd",[],["mml-eqn-num"]),a=0;a0){var x=n.cols,k="",v=!1,b=0,w=x.length;x[0].type==="separator"&&(p+="top ",b=1),x[x.length-1].type==="separator"&&(p+="bottom ",w-=1);for(var y=b;y0?"left ":"",p+=M[M.length-1].length>0?"right ":"";for(var D=1;D0&&m&&(v=1),r[x]={type:"align",align:k,pregap:v,postgap:0}}return a.colSeparationType=m?"align":"alignat",a};el({type:"array",names:["array","darray"],props:{numArgs:1},handler(e,n){var t=_y(n[0]),r=t?[n[0]]:on(n[0],"ordgroup").body,s=r.map(function(a){var o=uy(a),l=o.text;if("lcr".includes(l))return{type:"align",align:l};if(l==="|")return{type:"separator",separator:"|"};if(l===":")return{type:"separator",separator:":"};throw new Ze("Unknown column alignment: "+l,a)}),i={cols:s,hskipBeforeAndAfter:!0,maxNumCols:s.length};return Mu(e.parser,i,I6(e.envName))},htmlBuilder:tl,mathmlBuilder:nl});el({type:"array",names:["matrix","pmatrix","bmatrix","Bmatrix","vmatrix","Vmatrix","matrix*","pmatrix*","bmatrix*","Bmatrix*","vmatrix*","Vmatrix*"],props:{numArgs:0},handler(e){var n={matrix:null,pmatrix:["(",")"],bmatrix:["[","]"],Bmatrix:["\\{","\\}"],vmatrix:["|","|"],Vmatrix:["\\Vert","\\Vert"]}[e.envName.replace("*","")],t="c",r={hskipBeforeAndAfter:!1,cols:[{type:"align",align:t}]};if(e.envName.charAt(e.envName.length-1)==="*"){var s=e.parser;if(s.consumeSpaces(),s.fetch().text==="["){if(s.consume(),s.consumeSpaces(),t=s.fetch().text,!"lcr".includes(t))throw new Ze("Expected l or c or r",s.nextToken);s.consume(),s.consumeSpaces(),s.expect("]"),s.consume(),r.cols=[{type:"align",align:t}]}}var i=Mu(e.parser,r,I6(e.envName)),a=Math.max(0,...i.body.map(o=>o.length));return i.cols=new Array(a).fill({type:"align",align:t}),n?{type:"leftright",mode:e.mode,body:[i],left:n[0],right:n[1],rightColor:void 0}:i},htmlBuilder:tl,mathmlBuilder:nl});el({type:"array",names:["smallmatrix"],props:{numArgs:0},handler(e){var n={arraystretch:.5},t=Mu(e.parser,n,"script");return t.colSeparationType="small",t},htmlBuilder:tl,mathmlBuilder:nl});el({type:"array",names:["subarray"],props:{numArgs:1},handler(e,n){var t=_y(n[0]),r=t?[n[0]]:on(n[0],"ordgroup").body,s=r.map(function(o){var l=uy(o),u=l.text;if("lc".includes(u))return{type:"align",align:u};throw new Ze("Unknown column alignment: "+u,o)});if(s.length>1)throw new Ze("{subarray} can contain only one column");var i={cols:s,hskipBeforeAndAfter:!1,arraystretch:.5},a=Mu(e.parser,i,"script");if(a.body.length>0&&a.body[0].length>1)throw new Ze("{subarray} can contain only one column");return a},htmlBuilder:tl,mathmlBuilder:nl});el({type:"array",names:["cases","dcases","rcases","drcases"],props:{numArgs:0},handler(e){var n={arraystretch:1.2,cols:[{type:"align",align:"l",pregap:0,postgap:1},{type:"align",align:"l",pregap:0,postgap:0}]},t=Mu(e.parser,n,I6(e.envName));return{type:"leftright",mode:e.mode,body:[t],left:e.envName.includes("r")?".":"\\{",right:e.envName.includes("r")?"\\}":".",rightColor:void 0}},htmlBuilder:tl,mathmlBuilder:nl});el({type:"array",names:["align","align*","aligned","split"],props:{numArgs:0},handler:UP,htmlBuilder:tl,mathmlBuilder:nl});el({type:"array",names:["gathered","gather","gather*"],props:{numArgs:0},handler(e){r9n.has(e.envName)&&my(e);var n={cols:[{type:"align",align:"c"}],addJot:!0,colSeparationType:"gather",autoTag:L6(e.envName),emptySingleRow:!0,leqno:e.parser.settings.leqno};return Mu(e.parser,n,"display")},htmlBuilder:tl,mathmlBuilder:nl});el({type:"array",names:["alignat","alignat*","alignedat"],props:{numArgs:1},handler:UP,htmlBuilder:tl,mathmlBuilder:nl});el({type:"array",names:["equation","equation*"],props:{numArgs:0},handler(e){my(e);var n={autoTag:L6(e.envName),emptySingleRow:!0,singleRow:!0,maxNumCols:1,leqno:e.parser.settings.leqno};return Mu(e.parser,n,"display")},htmlBuilder:tl,mathmlBuilder:nl});el({type:"array",names:["CD"],props:{numArgs:0},handler(e){return my(e),G8n(e.parser)},htmlBuilder:tl,mathmlBuilder:nl});ie("\\nonumber","\\gdef\\@eqnsw{0}");ie("\\notag","\\nonumber");dt({type:"text",names:["\\hline","\\hdashline"],props:{numArgs:0,allowedInText:!0,allowedInMath:!0},handler(e,n){throw new Ze(e.funcName+" valid only within array environment")}});var fA=HP;dt({type:"environment",names:["\\begin","\\end"],props:{numArgs:1,argTypes:["text"]},handler(e,n){var{parser:t,funcName:r}=e,s=n[0];if(s.type!=="ordgroup")throw new Ze("Invalid environment name",s);for(var i="",a=0;a{var t=e.font,r=n.withFont(t);return Hn(e.body,r)},VP=(e,n)=>{var t=e.font,r=n.withFont(t);return cr(e.body,r)},dA={"\\Bbb":"\\mathbb","\\bold":"\\mathbf","\\frak":"\\mathfrak"};dt({type:"font",names:["\\mathrm","\\mathit","\\mathbf","\\mathnormal","\\mathsfit","\\mathbb","\\mathcal","\\mathfrak","\\mathscr","\\mathsf","\\mathtt","\\Bbb","\\bold","\\frak"],props:{numArgs:1,allowedInArgument:!0},handler:(e,n)=>{var{parser:t,funcName:r}=e,s=Vv(n[0]),i=r;return i in dA&&(i=dA[i]),{type:"font",mode:t.mode,font:i.slice(1),body:s}},htmlBuilder:GP,mathmlBuilder:VP});dt({type:"mclass",names:["\\boldsymbol","\\bm"],props:{numArgs:1},handler:(e,n)=>{var{parser:t}=e,r=n[0];return{type:"mclass",mode:t.mode,mclass:fy(r),body:[{type:"font",mode:t.mode,font:"boldsymbol",body:r}],isCharacterBox:ac(r)}}});dt({type:"font",names:["\\rm","\\sf","\\tt","\\bf","\\it","\\cal"],props:{numArgs:0,allowedInText:!0},handler:(e,n)=>{var{parser:t,funcName:r,breakOnTokenText:s}=e,{mode:i}=t,a=t.parseExpression(!0,s);return{type:"font",mode:i,font:"math"+r.slice(1),body:{type:"ordgroup",mode:t.mode,body:a}}},htmlBuilder:GP,mathmlBuilder:VP});var i9n=(e,n)=>{var t=n.style,r=t.fracNum(),s=t.fracDen(),i;i=n.havingStyle(r);var a=Hn(e.numer,i,n);if(e.continued){var o=8.5/n.fontMetrics().ptPerEm,l=3.5/n.fontMetrics().ptPerEm;a.height=a.height0?x=3*p:x=7*p,k=n.fontMetrics().denom1):(_>0?(m=n.fontMetrics().num2,x=p):(m=n.fontMetrics().num3,x=3*p),k=n.fontMetrics().denom2);var v;if(h){var w=n.fontMetrics().axisHeight;m-a.depth-(w+.5*_){var t=new Je("mfrac",[cr(e.numer,n),cr(e.denom,n)]);if(!e.hasBarLine)t.setAttribute("linethickness","0px");else if(e.barSize){var r=Or(e.barSize,n);t.setAttribute("linethickness",tt(r))}if(e.leftDelim!=null||e.rightDelim!=null){var s=[];if(e.leftDelim!=null){var i=new Je("mo",[new is(e.leftDelim.replace("\\",""))]);i.setAttribute("fence","true"),s.push(i)}if(s.push(t),e.rightDelim!=null){var a=new Je("mo",[new is(e.rightDelim.replace("\\",""))]);a.setAttribute("fence","true"),s.push(a)}return R6(s)}return t},KP=(e,n)=>{if(!n)return e;var t={type:"styling",mode:e.mode,style:n,body:[e]};return t};dt({type:"genfrac",names:["\\cfrac","\\dfrac","\\frac","\\tfrac","\\dbinom","\\binom","\\tbinom","\\\\atopfrac","\\\\bracefrac","\\\\brackfrac"],props:{numArgs:2,allowedInArgument:!0},handler:(e,n)=>{var{parser:t,funcName:r}=e,s=n[0],i=n[1],a,o=null,l=null;switch(r){case"\\cfrac":case"\\dfrac":case"\\frac":case"\\tfrac":a=!0;break;case"\\\\atopfrac":a=!1;break;case"\\dbinom":case"\\binom":case"\\tbinom":a=!1,o="(",l=")";break;case"\\\\bracefrac":a=!1,o="\\{",l="\\}";break;case"\\\\brackfrac":a=!1,o="[",l="]";break;default:throw new Error("Unrecognized genfrac command")}var u=r==="\\cfrac",h=null;return u||r.startsWith("\\d")?h="display":r.startsWith("\\t")&&(h="text"),KP({type:"genfrac",mode:t.mode,numer:s,denom:i,continued:u,hasBarLine:a,leftDelim:o,rightDelim:l,barSize:null},h)},htmlBuilder:i9n,mathmlBuilder:a9n});dt({type:"infix",names:["\\over","\\choose","\\atop","\\brace","\\brack"],props:{numArgs:0,infix:!0},handler(e){var{parser:n,funcName:t,token:r}=e,s;switch(t){case"\\over":s="\\frac";break;case"\\choose":s="\\binom";break;case"\\atop":s="\\\\atopfrac";break;case"\\brace":s="\\\\bracefrac";break;case"\\brack":s="\\\\brackfrac";break;default:throw new Error("Unrecognized infix genfrac command")}return{type:"infix",mode:n.mode,replaceWith:s,token:r}}});var hA=["display","text","script","scriptscript"],pA=function(n){var t=null;return n.length>0&&(t=n,t=t==="."?null:t),t};dt({type:"genfrac",names:["\\genfrac"],props:{numArgs:6,allowedInArgument:!0,argTypes:["math","math","size","text","math","math"]},handler(e,n){var{parser:t}=e,r=n[4],s=n[5],i=Vv(n[0]),a=i.type==="atom"&&i.family==="open"?pA(i.text):null,o=Vv(n[1]),l=o.type==="atom"&&o.family==="close"?pA(o.text):null,u=on(n[2],"size"),h,_=null;u.isBlank?h=!0:(_=u.value,h=_.number>0);var p=null,m=n[3];if(m.type==="ordgroup"){if(m.body.length>0){var x=on(m.body[0],"textord");p=hA[Number(x.text)]}}else m=on(m,"textord"),p=hA[Number(m.text)];return KP({type:"genfrac",mode:t.mode,numer:r,denom:s,continued:!1,hasBarLine:h,barSize:_,leftDelim:a,rightDelim:l},p)}});dt({type:"infix",names:["\\above"],props:{numArgs:1,argTypes:["size"],infix:!0},handler(e,n){var{parser:t,funcName:r,token:s}=e;return{type:"infix",mode:t.mode,replaceWith:"\\\\abovefrac",size:on(n[0],"size").value,token:s}}});dt({type:"genfrac",names:["\\\\abovefrac"],props:{numArgs:3,argTypes:["math","size","math"]},handler:(e,n)=>{var{parser:t,funcName:r}=e,s=n[0],i=on(n[1],"infix").size;if(!i)throw new Error("\\\\abovefrac expected size, but got "+String(i));var a=n[2],o=i.number>0;return{type:"genfrac",mode:t.mode,numer:s,denom:a,continued:!1,hasBarLine:o,barSize:i,leftDelim:null,rightDelim:null}}});var WP=(e,n)=>{var t=n.style,r,s;e.type==="supsub"?(r=e.sup?Hn(e.sup,n.havingStyle(t.sup()),n):Hn(e.sub,n.havingStyle(t.sub()),n),s=on(e.base,"horizBrace")):s=on(e,"horizBrace");var i=Hn(s.base,n.havingBaseStyle(en.DISPLAY)),a=cy(s,n),o;if(s.isOver?o=Pn({positionType:"firstBaseline",children:[{type:"elem",elem:i},{type:"kern",size:.1},{type:"elem",elem:a,wrapperClasses:["svg-align"]}]}):o=Pn({positionType:"bottom",positionData:i.depth+.1+a.height,children:[{type:"elem",elem:a,wrapperClasses:["svg-align"]},{type:"kern",size:.1},{type:"elem",elem:i}]}),r){var l=We(["minner",s.isOver?"mover":"munder"],[o],n);s.isOver?o=Pn({positionType:"firstBaseline",children:[{type:"elem",elem:l},{type:"kern",size:.2},{type:"elem",elem:r}]}):o=Pn({positionType:"bottom",positionData:l.depth+.2+r.height+r.depth,children:[{type:"elem",elem:r},{type:"kern",size:.2},{type:"elem",elem:l}]})}return We(["minner",s.isOver?"mover":"munder"],[o],n)},o9n=(e,n)=>{var t=ly(e.label);return new Je(e.isOver?"mover":"munder",[cr(e.base,n),t])};dt({type:"horizBrace",names:["\\overbrace","\\underbrace","\\overbracket","\\underbracket"],props:{numArgs:1},handler(e,n){var{parser:t,funcName:r}=e;return{type:"horizBrace",mode:t.mode,label:r,isOver:r.includes("\\over"),base:n[0]}},htmlBuilder:WP,mathmlBuilder:o9n});dt({type:"href",names:["\\href"],props:{numArgs:2,argTypes:["url","original"],allowedInText:!0},handler:(e,n)=>{var{parser:t}=e,r=n[1],s=on(n[0],"url").url;return t.settings.isTrusted({command:"\\href",url:s})?{type:"href",mode:t.mode,href:s,body:ss(r)}:t.formatUnsupportedCmd("\\href")},htmlBuilder:(e,n)=>{var t=bs(e.body,n,!1);return y8n(e.href,[],t,n)},mathmlBuilder:(e,n)=>{var t=Cu(e.body,n);return t instanceof Je||(t=new Je("mrow",[t])),t.setAttribute("href",e.href),t}});dt({type:"href",names:["\\url"],props:{numArgs:1,argTypes:["url"],allowedInText:!0},handler:(e,n)=>{var{parser:t}=e,r=on(n[0],"url").url;if(!t.settings.isTrusted({command:"\\url",url:r}))return t.formatUnsupportedCmd("\\url");for(var s=[],i=0;i{var{parser:t,funcName:r,token:s}=e,i=on(n[0],"raw").string,a=n[1];t.settings.strict&&t.settings.reportNonstrict("htmlExtension","HTML extension is disabled on strict mode");var o,l={};switch(r){case"\\htmlClass":l.class=i,o={command:"\\htmlClass",class:i};break;case"\\htmlId":l.id=i,o={command:"\\htmlId",id:i};break;case"\\htmlStyle":l.style=i,o={command:"\\htmlStyle",style:i};break;case"\\htmlData":{for(var u=i.split(","),h=0;h{var t=bs(e.body,n,!1),r=["enclosing"];e.attributes.class&&r.push(...e.attributes.class.trim().split(/\s+/));var s=We(r,t,n);for(var i in e.attributes)i!=="class"&&e.attributes.hasOwnProperty(i)&&s.setAttribute(i,e.attributes[i]);return s},mathmlBuilder:(e,n)=>Cu(e.body,n)});dt({type:"htmlmathml",names:["\\html@mathml"],props:{numArgs:2,allowedInArgument:!0,allowedInText:!0},handler:(e,n)=>{var{parser:t}=e;return{type:"htmlmathml",mode:t.mode,html:ss(n[0]),mathml:ss(n[1])}},htmlBuilder:(e,n)=>{var t=bs(e.html,n,!1);return lc(t)},mathmlBuilder:(e,n)=>Cu(e.mathml,n)});var Fw=function(n){if(/^[-+]? *(\d+(\.\d*)?|\.\d+)$/.test(n))return{number:+n,unit:"bp"};var t=/([-+]?) *(\d+(?:\.\d*)?|\.\d+) *([a-z]{2})/.exec(n);if(!t)throw new Ze("Invalid size: '"+n+"' in \\includegraphics");var r={number:+(t[1]+t[2]),unit:t[3]};if(!_P(r))throw new Ze("Invalid unit: '"+r.unit+"' in \\includegraphics.");return r};dt({type:"includegraphics",names:["\\includegraphics"],props:{numArgs:1,numOptionalArgs:1,argTypes:["raw","url"],allowedInText:!1},handler:(e,n,t)=>{var{parser:r}=e,s={number:0,unit:"em"},i={number:.9,unit:"em"},a={number:0,unit:"em"},o="";if(t[0])for(var l=on(t[0],"raw").string,u=l.split(","),h=0;h{var t=Or(e.height,n),r=0;e.totalheight.number>0&&(r=Or(e.totalheight,n)-t);var s=0;e.width.number>0&&(s=Or(e.width,n));var i={height:tt(t+r)};s>0&&(i.width=tt(s)),r>0&&(i.verticalAlign=tt(-r));var a=new l8n(e.src,e.alt,i);return a.height=t,a.depth=r,a},mathmlBuilder:(e,n)=>{var t=new Je("mglyph",[]);t.setAttribute("alt",e.alt);var r=Or(e.height,n),s=0;if(e.totalheight.number>0&&(s=Or(e.totalheight,n)-r,t.setAttribute("valign",tt(-s))),t.setAttribute("height",tt(r+s)),e.width.number>0){var i=Or(e.width,n);t.setAttribute("width",tt(i))}return t.setAttribute("src",e.src),t}});dt({type:"kern",names:["\\kern","\\mkern","\\hskip","\\mskip"],props:{numArgs:1,argTypes:["size"],primitive:!0,allowedInText:!0},handler(e,n){var{parser:t,funcName:r}=e,s=on(n[0],"size");if(t.settings.strict){var i=r[1]==="m",a=s.value.unit==="mu";i?(a||t.settings.reportNonstrict("mathVsTextUnits","LaTeX's "+r+" supports only mu units, "+("not "+s.value.unit+" units")),t.mode!=="math"&&t.settings.reportNonstrict("mathVsTextUnits","LaTeX's "+r+" works only in math mode")):a&&t.settings.reportNonstrict("mathVsTextUnits","LaTeX's "+r+" doesn't support mu units")}return{type:"kern",mode:t.mode,dimension:s.value}},htmlBuilder(e,n){return gP(e.dimension,n)},mathmlBuilder(e,n){var t=Or(e.dimension,n);return new kP(t)}});dt({type:"lap",names:["\\mathllap","\\mathrlap","\\mathclap"],props:{numArgs:1,allowedInText:!0},handler:(e,n)=>{var{parser:t,funcName:r}=e,s=n[0];return{type:"lap",mode:t.mode,alignment:r.slice(5),body:s}},htmlBuilder:(e,n)=>{var t;e.alignment==="clap"?(t=We([],[Hn(e.body,n)]),t=We(["inner"],[t],n)):t=We(["inner"],[Hn(e.body,n)]);var r=We(["fix"],[]),s=We([e.alignment],[t,r],n),i=We(["strut"]);return i.style.height=tt(s.height+s.depth),s.depth&&(i.style.verticalAlign=tt(-s.depth)),s.children.unshift(i),s=We(["thinbox"],[s],n),We(["mord","vbox"],[s],n)},mathmlBuilder:(e,n)=>{var t=new Je("mpadded",[cr(e.body,n)]);if(e.alignment!=="rlap"){var r=e.alignment==="llap"?"-1":"-0.5";t.setAttribute("lspace",r+"width")}return t.setAttribute("width","0px"),t}});dt({type:"styling",names:["\\(","$"],props:{numArgs:0,allowedInText:!0,allowedInMath:!1},handler(e,n){var{funcName:t,parser:r}=e,s=r.mode;r.switchMode("math");var i=t==="\\("?"\\)":"$",a=r.parseExpression(!1,i);return r.expect(i),r.switchMode(s),{type:"styling",mode:r.mode,style:"text",resetFont:!0,body:a}}});dt({type:"text",names:["\\)","\\]"],props:{numArgs:0,allowedInText:!0,allowedInMath:!1},handler(e,n){throw new Ze("Mismatched "+e.funcName)}});var mA=(e,n)=>{switch(n.style.size){case en.DISPLAY.size:return e.display;case en.TEXT.size:return e.text;case en.SCRIPT.size:return e.script;case en.SCRIPTSCRIPT.size:return e.scriptscript;default:return e.text}};dt({type:"mathchoice",names:["\\mathchoice"],props:{numArgs:4,primitive:!0},handler:(e,n)=>{var{parser:t}=e;return{type:"mathchoice",mode:t.mode,display:ss(n[0]),text:ss(n[1]),script:ss(n[2]),scriptscript:ss(n[3])}},htmlBuilder:(e,n)=>{var t=mA(e,n),r=bs(t,n,!1);return lc(r)},mathmlBuilder:(e,n)=>{var t=mA(e,n);return Cu(t,n)}});var QP=(e,n,t,r,s,i,a)=>{e=We([],[e]);var o=t&&ac(t),l,u;if(n){var h=Hn(n,r.havingStyle(s.sup()),r);u={elem:h,kern:Math.max(r.fontMetrics().bigOpSpacing1,r.fontMetrics().bigOpSpacing3-h.depth)}}if(t){var _=Hn(t,r.havingStyle(s.sub()),r);l={elem:_,kern:Math.max(r.fontMetrics().bigOpSpacing2,r.fontMetrics().bigOpSpacing4-_.height)}}var p;if(u&&l){var m=r.fontMetrics().bigOpSpacing5+l.elem.height+l.elem.depth+l.kern+e.depth+a;p=Pn({positionType:"bottom",positionData:m,children:[{type:"kern",size:r.fontMetrics().bigOpSpacing5},{type:"elem",elem:l.elem,marginLeft:tt(-i)},{type:"kern",size:l.kern},{type:"elem",elem:e},{type:"kern",size:u.kern},{type:"elem",elem:u.elem,marginLeft:tt(i)},{type:"kern",size:r.fontMetrics().bigOpSpacing5}]})}else if(l){var x=e.height-a;p=Pn({positionType:"top",positionData:x,children:[{type:"kern",size:r.fontMetrics().bigOpSpacing5},{type:"elem",elem:l.elem,marginLeft:tt(-i)},{type:"kern",size:l.kern},{type:"elem",elem:e}]})}else if(u){var k=e.depth+a;p=Pn({positionType:"bottom",positionData:k,children:[{type:"elem",elem:e},{type:"kern",size:u.kern},{type:"elem",elem:u.elem,marginLeft:tt(i)},{type:"kern",size:r.fontMetrics().bigOpSpacing5}]})}else return e;var v=[p];if(l&&i!==0&&!o){var b=We(["mspace"],[],r);b.style.marginRight=tt(i),v.unshift(b)}return We(["mop","op-limits"],v,r)},XP=new Set(["\\smallint"]),jh=(e,n)=>{var t,r,s=!1,i;e.type==="supsub"?(t=e.sup,r=e.sub,i=on(e.base,"op"),s=!0):i=on(e,"op");var a=n.style,o=!1;a.size===en.DISPLAY.size&&i.symbol&&!XP.has(i.name)&&(o=!0);var l,u;if(i.symbol){var h=o?"Size2-Regular":"Size1-Regular",_="";if((i.name==="\\oiint"||i.name==="\\oiiint")&&(_=i.name.slice(1),i.name=_==="oiint"?"\\iint":"\\iiint"),l=li(i.name,h,"math",n,["mop","op-symbol",o?"large-op":"small-op"]),u=l.italic,_.length>0){var p=bP(_+"Size"+(o?"2":"1"),n);l=Pn({positionType:"individualShift",children:[{type:"elem",elem:l,shift:0},{type:"elem",elem:p,shift:o?.08:0}]}),i.name="\\"+_,l.classes.unshift("mop"),l.italic=u}}else if(i.body){var m=bs(i.body,n,!0);m.length===1&&m[0]instanceof aa?(l=m[0],l.classes[0]="mop"):l=We(["mop"],m,n)}else{for(var x=[],k=1;k{var t;if(e.symbol)t=new Je("mo",[Ma(e.name,e.mode)]),XP.has(e.name)&&t.setAttribute("largeop","false");else if(e.body)t=new Je("mo",_a(e.body,n));else{t=new Je("mi",[new is(e.name.slice(1))]);var r=new Je("mo",[Ma("⁡","text")]);e.parentIsSupSub?t=new Je("mrow",[t,r]):t=wP([t,r])}return t},l9n={"∏":"\\prod","∐":"\\coprod","∑":"\\sum","⋀":"\\bigwedge","⋁":"\\bigvee","⋂":"\\bigcap","⋃":"\\bigcup","⨀":"\\bigodot","⨁":"\\bigoplus","⨂":"\\bigotimes","⨄":"\\biguplus","⨆":"\\bigsqcup"};dt({type:"op",names:["\\coprod","\\bigvee","\\bigwedge","\\biguplus","\\bigcap","\\bigcup","\\intop","\\prod","\\sum","\\bigotimes","\\bigoplus","\\bigodot","\\bigsqcup","\\smallint","∏","∐","∑","⋀","⋁","⋂","⋃","⨀","⨁","⨂","⨄","⨆"],props:{numArgs:0},handler:(e,n)=>{var{parser:t,funcName:r}=e,s=r;return s.length===1&&(s=l9n[s]),{type:"op",mode:t.mode,limits:!0,parentIsSupSub:!1,symbol:!0,name:s}},htmlBuilder:jh,mathmlBuilder:Sm});dt({type:"op",names:["\\mathop"],props:{numArgs:1,primitive:!0},handler:(e,n)=>{var{parser:t}=e,r=n[0];return{type:"op",mode:t.mode,limits:!1,parentIsSupSub:!1,symbol:!1,body:ss(r)}},htmlBuilder:jh,mathmlBuilder:Sm});var c9n={"∫":"\\int","∬":"\\iint","∭":"\\iiint","∮":"\\oint","∯":"\\oiint","∰":"\\oiiint"};dt({type:"op",names:["\\arcsin","\\arccos","\\arctan","\\arctg","\\arcctg","\\arg","\\ch","\\cos","\\cosec","\\cosh","\\cot","\\cotg","\\coth","\\csc","\\ctg","\\cth","\\deg","\\dim","\\exp","\\hom","\\ker","\\lg","\\ln","\\log","\\sec","\\sin","\\sinh","\\sh","\\tan","\\tanh","\\tg","\\th"],props:{numArgs:0},handler(e){var{parser:n,funcName:t}=e;return{type:"op",mode:n.mode,limits:!1,parentIsSupSub:!1,symbol:!1,name:t}},htmlBuilder:jh,mathmlBuilder:Sm});dt({type:"op",names:["\\det","\\gcd","\\inf","\\lim","\\max","\\min","\\Pr","\\sup"],props:{numArgs:0},handler(e){var{parser:n,funcName:t}=e;return{type:"op",mode:n.mode,limits:!0,parentIsSupSub:!1,symbol:!1,name:t}},htmlBuilder:jh,mathmlBuilder:Sm});dt({type:"op",names:["\\int","\\iint","\\iiint","\\oint","\\oiint","\\oiiint","∫","∬","∭","∮","∯","∰"],props:{numArgs:0,allowedInArgument:!0},handler(e){var{parser:n,funcName:t}=e,r=t;return r.length===1&&(r=c9n[r]),{type:"op",mode:n.mode,limits:!1,parentIsSupSub:!1,symbol:!0,name:r}},htmlBuilder:jh,mathmlBuilder:Sm});var YP=(e,n)=>{var t,r,s=!1,i;e.type==="supsub"?(t=e.sup,r=e.sub,i=on(e.base,"operatorname"),s=!0):i=on(e,"operatorname");var a;if(i.body.length>0){for(var o=i.body.map(_=>{var p="text"in _?_.text:void 0;return typeof p=="string"?{type:"textord",mode:_.mode,text:p}:_}),l=bs(o,n.withFont("mathrm"),!0),u=0;u{for(var t=_a(e.body,n.withFont("mathrm")),r=!0,s=0;sh.toText()).join("");t=[new is(o)]}var l=new Je("mi",t);l.setAttribute("mathvariant","normal");var u=new Je("mo",[Ma("⁡","text")]);return e.parentIsSupSub?new Je("mrow",[l,u]):wP([l,u])};dt({type:"operatorname",names:["\\operatorname@","\\operatornamewithlimits"],props:{numArgs:1},handler:(e,n)=>{var{parser:t,funcName:r}=e,s=n[0];return{type:"operatorname",mode:t.mode,body:ss(s),alwaysHandleSupSub:r==="\\operatornamewithlimits",limits:!1,parentIsSupSub:!1}},htmlBuilder:YP,mathmlBuilder:u9n});ie("\\operatorname","\\@ifstar\\operatornamewithlimits\\operatorname@");hf({type:"ordgroup",htmlBuilder(e,n){return e.semisimple?lc(bs(e.body,n,!1)):We(["mord"],bs(e.body,n,!0),n)},mathmlBuilder(e,n){return Cu(e.body,n,!0)}});dt({type:"overline",names:["\\overline"],props:{numArgs:1},handler(e,n){var{parser:t}=e,r=n[0];return{type:"overline",mode:t.mode,body:r}},htmlBuilder(e,n){var t=Hn(e.body,n.havingCrampedStyle()),r=ah("overline-line",n),s=n.fontMetrics().defaultRuleThickness,i=Pn({positionType:"firstBaseline",children:[{type:"elem",elem:t},{type:"kern",size:3*s},{type:"elem",elem:r},{type:"kern",size:s}]});return We(["mord","overline"],[i],n)},mathmlBuilder(e,n){var t=new Je("mo",[new is("‾")]);t.setAttribute("stretchy","true");var r=new Je("mover",[cr(e.body,n),t]);return r.setAttribute("accent","true"),r}});dt({type:"phantom",names:["\\phantom"],props:{numArgs:1,allowedInText:!0},handler:(e,n)=>{var{parser:t}=e,r=n[0];return{type:"phantom",mode:t.mode,body:ss(r)}},htmlBuilder:(e,n)=>{var t=bs(e.body,n.withPhantom(),!1);return lc(t)},mathmlBuilder:(e,n)=>{var t=_a(e.body,n);return new Je("mphantom",t)}});ie("\\hphantom","\\smash{\\phantom{#1}}");dt({type:"vphantom",names:["\\vphantom"],props:{numArgs:1,allowedInText:!0},handler:(e,n)=>{var{parser:t}=e,r=n[0];return{type:"vphantom",mode:t.mode,body:r}},htmlBuilder:(e,n)=>{var t=We(["inner"],[Hn(e.body,n.withPhantom())]),r=We(["fix"],[]);return We(["mord","rlap"],[t,r],n)},mathmlBuilder:(e,n)=>{var t=_a(ss(e.body),n),r=new Je("mphantom",t),s=new Je("mpadded",[r]);return s.setAttribute("width","0px"),s}});dt({type:"raisebox",names:["\\raisebox"],props:{numArgs:2,argTypes:["size","hbox"],allowedInText:!0},handler(e,n){var{parser:t}=e,r=on(n[0],"size").value,s=n[1];return{type:"raisebox",mode:t.mode,dy:r,body:s}},htmlBuilder(e,n){var t=Hn(e.body,n),r=Or(e.dy,n);return Pn({positionType:"shift",positionData:-r,children:[{type:"elem",elem:t}]})},mathmlBuilder(e,n){var t=new Je("mpadded",[cr(e.body,n)]),r=e.dy.number+e.dy.unit;return t.setAttribute("voffset",r),t}});dt({type:"internal",names:["\\relax"],props:{numArgs:0,allowedInText:!0,allowedInArgument:!0},handler(e){var{parser:n}=e;return{type:"internal",mode:n.mode}}});dt({type:"rule",names:["\\rule"],props:{numArgs:2,numOptionalArgs:1,allowedInText:!0,allowedInMath:!0,argTypes:["size","size","size"]},handler(e,n,t){var{parser:r}=e,s=t[0],i=on(n[0],"size"),a=on(n[1],"size");return{type:"rule",mode:r.mode,shift:s&&on(s,"size").value,width:i.value,height:a.value}},htmlBuilder(e,n){var t=We(["mord","rule"],[],n),r=Or(e.width,n),s=Or(e.height,n),i=e.shift?Or(e.shift,n):0;return t.style.borderRightWidth=tt(r),t.style.borderTopWidth=tt(s),t.style.bottom=tt(i),t.width=r,t.height=s+i,t.depth=-i,t.maxFontSize=s*1.125*n.sizeMultiplier,t},mathmlBuilder(e,n){var t=Or(e.width,n),r=Or(e.height,n),s=e.shift?Or(e.shift,n):0,i=n.color&&n.getColor()||"black",a=new Je("mspace");a.setAttribute("mathbackground",i),a.setAttribute("width",tt(t)),a.setAttribute("height",tt(r));var o=new Je("mpadded",[a]);return s>=0?o.setAttribute("height",tt(s)):(o.setAttribute("height",tt(s)),o.setAttribute("depth",tt(-s))),o.setAttribute("voffset",tt(s)),o}});function ZP(e,n,t){for(var r=bs(e,n,!1),s=n.sizeMultiplier/t.sizeMultiplier,i=0;i{var t=n.havingSize(e.size);return ZP(e.body,t,n)};dt({type:"sizing",names:gA,props:{numArgs:0,allowedInText:!0},handler:(e,n)=>{var{breakOnTokenText:t,funcName:r,parser:s}=e,i=s.parseExpression(!1,t);return{type:"sizing",mode:s.mode,size:gA.indexOf(r)+1,body:i}},htmlBuilder:_9n,mathmlBuilder:(e,n)=>{var t=n.havingSize(e.size),r=_a(e.body,t),s=new Je("mstyle",r);return s.setAttribute("mathsize",tt(t.sizeMultiplier)),s}});dt({type:"smash",names:["\\smash"],props:{numArgs:1,numOptionalArgs:1,allowedInText:!0},handler:(e,n,t)=>{var{parser:r}=e,s=!1,i=!1,a=t[0]&&on(t[0],"ordgroup");if(a)for(var o,l=0;l{var t=We([],[Hn(e.body,n)]);if(!e.smashHeight&&!e.smashDepth)return t;if(e.smashHeight&&(t.height=0),e.smashDepth&&(t.depth=0),e.smashHeight&&e.smashDepth)return We(["mord","smash"],[t],n);if(t.children)for(var r=0;r{var t=new Je("mpadded",[cr(e.body,n)]);return e.smashHeight&&t.setAttribute("height","0px"),e.smashDepth&&t.setAttribute("depth","0px"),t}});dt({type:"sqrt",names:["\\sqrt"],props:{numArgs:1,numOptionalArgs:1},handler(e,n,t){var{parser:r}=e,s=t[0],i=n[0];return{type:"sqrt",mode:r.mode,body:i,index:s}},htmlBuilder(e,n){var t=Hn(e.body,n.havingCrampedStyle());t.height===0&&(t.height=n.fontMetrics().xHeight),t=oh(t,n);var r=n.fontMetrics(),s=r.defaultRuleThickness,i=s;n.style.idt.height+t.depth+a&&(a=(a+_-t.height-t.depth)/2);var p=l.height-t.height-a-u;t.style.paddingLeft=tt(h);var m=Pn({positionType:"firstBaseline",children:[{type:"elem",elem:t,wrapperClasses:["svg-align"]},{type:"kern",size:-(t.height+p)},{type:"elem",elem:l},{type:"kern",size:u}]});if(e.index){var x=n.havingStyle(en.SCRIPTSCRIPT),k=Hn(e.index,x,n),v=.6*(m.height-m.depth),b=Pn({positionType:"shift",positionData:-v,children:[{type:"elem",elem:k}]}),w=We(["root"],[b]);return We(["mord","sqrt"],[w,m],n)}else return We(["mord","sqrt"],[m],n)},mathmlBuilder(e,n){var{body:t,index:r}=e;return r?new Je("mroot",[cr(t,n),cr(r,n)]):new Je("msqrt",[cr(t,n)])}});var S5={display:en.DISPLAY,text:en.TEXT,script:en.SCRIPT,scriptscript:en.SCRIPTSCRIPT};function f9n(e){return e in S5}dt({type:"styling",names:["\\displaystyle","\\textstyle","\\scriptstyle","\\scriptscriptstyle"],props:{numArgs:0,allowedInText:!0,primitive:!0},handler(e,n){var{breakOnTokenText:t,funcName:r,parser:s}=e,i=s.parseExpression(!0,t),a=r.slice(1,r.length-5);if(!f9n(a))throw new Error("Unknown style: "+a);return{type:"styling",mode:s.mode,style:a,body:i}},htmlBuilder(e,n){var t=S5[e.style],r=n.havingStyle(t);return e.resetFont&&(r=r.withFont("")),ZP(e.body,r,n)},mathmlBuilder(e,n){var t=S5[e.style],r=n.havingStyle(t);e.resetFont&&(r=r.withFont(""));var s=_a(e.body,r),i=new Je("mstyle",s),a={display:["0","true"],text:["0","false"],script:["1","false"],scriptscript:["2","false"]},o=a[e.style];return i.setAttribute("scriptlevel",o[0]),i.setAttribute("displaystyle",o[1]),i}});var d9n=function(n,t){var r=n.base;if(r)if(r.type==="op"){var s=r.limits&&(t.style.size===en.DISPLAY.size||r.alwaysHandleSupSub);return s?jh:null}else if(r.type==="operatorname"){var i=r.alwaysHandleSupSub&&(t.style.size===en.DISPLAY.size||r.limits);return i?YP:null}else{if(r.type==="accent")return ac(r.base)?O6:null;if(r.type==="horizBrace"){var a=!n.sub;return a===r.isOver?WP:null}else return null}else return null};hf({type:"supsub",htmlBuilder(e,n){var t=d9n(e,n);if(t)return t(e,n);var{base:r,sup:s,sub:i}=e,a=Hn(r,n),o,l,u=n.fontMetrics(),h=0,_=0,p=r&&ac(r);if(s){var m=n.havingStyle(n.style.sup());o=Hn(s,m,n),p||(h=a.height-m.fontMetrics().supDrop*m.sizeMultiplier/n.sizeMultiplier)}if(i){var x=n.havingStyle(n.style.sub());l=Hn(i,x,n),p||(_=a.depth+x.fontMetrics().subDrop*x.sizeMultiplier/n.sizeMultiplier)}var k;n.style===en.DISPLAY?k=u.sup1:n.style.cramped?k=u.sup3:k=u.sup2;var v=n.sizeMultiplier,b=tt(.5/u.ptPerEm/v),w=null;if(l){var y=e.base&&e.base.type==="op"&&e.base.name&&(e.base.name==="\\oiint"||e.base.name==="\\oiiint");if(a instanceof aa||y){var C;w=tt(-((C=a.italic)!=null?C:0))}}var N;if(o&&l){h=Math.max(h,k,o.depth+.25*u.xHeight),_=Math.max(_,u.sub2);var E=u.defaultRuleThickness,T=4*E;if(h-o.depth-(l.height-_)0&&(h+=j,_-=j)}var M=[{type:"elem",elem:l,shift:_,marginRight:b,marginLeft:w},{type:"elem",elem:o,shift:-h,marginRight:b}];N=Pn({positionType:"individualShift",children:M})}else if(l){_=Math.max(_,u.sub1,l.height-.8*u.xHeight);var D=[{type:"elem",elem:l,marginLeft:w,marginRight:b}];N=Pn({positionType:"shift",positionData:_,children:D})}else if(o)h=Math.max(h,k,o.depth+.25*u.xHeight),N=Pn({positionType:"shift",positionData:-h,children:[{type:"elem",elem:o,marginRight:b}]});else throw new Error("supsub must have either sup or sub.");var I=b5(a,"right")||"mord";return We([I],[a,We(["msupsub"],[N])],n)},mathmlBuilder(e,n){var t=!1,r,s;e.base&&e.base.type==="horizBrace"&&(s=!!e.sup,s===e.base.isOver&&(t=!0,r=e.base.isOver)),e.base&&(e.base.type==="op"||e.base.type==="operatorname")&&(e.base.parentIsSupSub=!0);var i=[cr(e.base,n)];e.sub&&i.push(cr(e.sub,n)),e.sup&&i.push(cr(e.sup,n));var a;if(t)a=r?"mover":"munder";else if(e.sub)if(e.sup){var u=e.base;u&&u.type==="op"&&u.limits&&n.style===en.DISPLAY||u&&u.type==="operatorname"&&u.alwaysHandleSupSub&&(n.style===en.DISPLAY||u.limits)?a="munderover":a="msubsup"}else{var l=e.base;l&&l.type==="op"&&l.limits&&(n.style===en.DISPLAY||l.alwaysHandleSupSub)||l&&l.type==="operatorname"&&l.alwaysHandleSupSub&&(l.limits||n.style===en.DISPLAY)?a="munder":a="msub"}else{var o=e.base;o&&o.type==="op"&&o.limits&&(n.style===en.DISPLAY||o.alwaysHandleSupSub)||o&&o.type==="operatorname"&&o.alwaysHandleSupSub&&(o.limits||n.style===en.DISPLAY)?a="mover":a="msup"}return new Je(a,i)}});hf({type:"atom",htmlBuilder(e,n){return T6(e.text,e.mode,n,["m"+e.family])},mathmlBuilder(e,n){var t=new Je("mo",[Ma(e.text,e.mode)]);if(e.family==="bin"){var r=M6(e,n);r==="bold-italic"&&t.setAttribute("mathvariant",r)}else e.family==="punct"?t.setAttribute("separator","true"):(e.family==="open"||e.family==="close")&&t.setAttribute("stretchy","false");return t}});var JP={mi:"italic",mn:"normal",mtext:"normal"};hf({type:"mathord",htmlBuilder(e,n){return oy(e,n,"mathord")},mathmlBuilder(e,n){var t=new Je("mi",[Ma(e.text,e.mode,n)]),r=M6(e,n)||"italic";return r!==JP[t.type]&&t.setAttribute("mathvariant",r),t}});hf({type:"textord",htmlBuilder(e,n){return oy(e,n,"textord")},mathmlBuilder(e,n){var t=Ma(e.text,e.mode,n),r=M6(e,n)||"normal",s;return e.mode==="text"?s=new Je("mtext",[t]):/[0-9]/.test(e.text)?s=new Je("mn",[t]):e.text==="\\prime"?s=new Je("mo",[t]):s=new Je("mi",[t]),r!==JP[s.type]&&s.setAttribute("mathvariant",r),s}});var Hw={"\\nobreak":"nobreak","\\allowbreak":"allowbreak"},qw={" ":{},"\\ ":{},"~":{className:"nobreak"},"\\space":{},"\\nobreakspace":{className:"nobreak"}};hf({type:"spacing",htmlBuilder(e,n){if(qw.hasOwnProperty(e.text)){var t=qw[e.text].className||"";if(e.mode==="text"){var r=oy(e,n,"textord");return r.classes.push(t),r}else return We(["mspace",t],[T6(e.text,e.mode,n)],n)}else{if(Hw.hasOwnProperty(e.text))return We(["mspace",Hw[e.text]],[],n);throw new Ze('Unknown type of space "'+e.text+'"')}},mathmlBuilder(e,n){var t;if(qw.hasOwnProperty(e.text))t=new Je("mtext",[new is(" ")]);else{if(Hw.hasOwnProperty(e.text))return new Je("mspace");throw new Ze('Unknown type of space "'+e.text+'"')}return t}});var vA=()=>{var e=new Je("mtd",[]);return e.setAttribute("width","50%"),e};hf({type:"tag",mathmlBuilder(e,n){var t=new Je("mtable",[new Je("mtr",[vA(),new Je("mtd",[Cu(e.body,n)]),vA(),new Je("mtd",[Cu(e.tag,n)])])]);return t.setAttribute("width","100%"),t}});var bA={"\\text":void 0,"\\textrm":"textrm","\\textsf":"textsf","\\texttt":"texttt","\\textnormal":"textrm"},yA={"\\textbf":"textbf","\\textmd":"textmd"},h9n={"\\textit":"textit","\\textup":"textup"},xA=(e,n)=>{var t=e.font;if(t){if(bA[t])return n.withTextFontFamily(bA[t]);if(yA[t])return n.withTextFontWeight(yA[t]);if(t==="\\emph")return n.fontShape==="textit"?n.withTextFontShape("textup"):n.withTextFontShape("textit")}else return n;return n.withTextFontShape(h9n[t])};dt({type:"text",names:["\\text","\\textrm","\\textsf","\\texttt","\\textnormal","\\textbf","\\textmd","\\textit","\\textup","\\emph"],props:{numArgs:1,argTypes:["text"],allowedInArgument:!0,allowedInText:!0},handler(e,n){var{parser:t,funcName:r}=e,s=n[0];return{type:"text",mode:t.mode,body:ss(s),font:r}},htmlBuilder(e,n){var t=xA(e,n),r=bs(e.body,t,!0);return We(["mord","text"],r,t)},mathmlBuilder(e,n){var t=xA(e,n);return Cu(e.body,t)}});dt({type:"underline",names:["\\underline"],props:{numArgs:1,allowedInText:!0},handler(e,n){var{parser:t}=e;return{type:"underline",mode:t.mode,body:n[0]}},htmlBuilder(e,n){var t=Hn(e.body,n),r=ah("underline-line",n),s=n.fontMetrics().defaultRuleThickness,i=Pn({positionType:"top",positionData:t.height,children:[{type:"kern",size:s},{type:"elem",elem:r},{type:"kern",size:3*s},{type:"elem",elem:t}]});return We(["mord","underline"],[i],n)},mathmlBuilder(e,n){var t=new Je("mo",[new is("‾")]);t.setAttribute("stretchy","true");var r=new Je("munder",[cr(e.body,n),t]);return r.setAttribute("accentunder","true"),r}});dt({type:"vcenter",names:["\\vcenter"],props:{numArgs:1,argTypes:["original"],allowedInText:!1},handler(e,n){var{parser:t}=e;return{type:"vcenter",mode:t.mode,body:n[0]}},htmlBuilder(e,n){var t=Hn(e.body,n),r=n.fontMetrics().axisHeight,s=.5*(t.height-r-(t.depth+r));return Pn({positionType:"shift",positionData:s,children:[{type:"elem",elem:t}]})},mathmlBuilder(e,n){var t=new Je("mpadded",[cr(e.body,n)],["vcenter"]);return new Je("mrow",[t])}});dt({type:"verb",names:["\\verb"],props:{numArgs:0,allowedInText:!0},handler(e,n,t){throw new Ze("\\verb ended by end of line instead of matching delimiter")},htmlBuilder(e,n){for(var t=wA(e),r=[],s=n.havingStyle(n.style.text()),i=0;ie.body.replace(/ /g,e.star?"␣":" "),fu=yP,eF=`[ \r - ]`,p9n="\\\\[a-zA-Z@]+",m9n="\\\\[^\uD800-\uDFFF]",g9n="("+p9n+")"+eF+"*",v9n=`\\\\( +-470,-1265c-4.7,-6,-9.7,-11.7,-15,-17c-0.7,-0.7,-6.7,-1,-18,-1z`;default:throw new Error("Unknown stretchy delimiter.")}};function q8n(e){return"toText"in e}class Eh{constructor(n){this.children=void 0,this.classes=void 0,this.height=void 0,this.depth=void 0,this.maxFontSize=void 0,this.style=void 0,this.children=n,this.classes=[],this.height=0,this.depth=0,this.maxFontSize=0,this.style={}}hasClass(n){return this.classes.includes(n)}toNode(){for(var n=document.createDocumentFragment(),t=0;t{if(q8n(n))return n.toText();throw new Error("Expected MathDomNode with toText, got "+n.constructor.name)}).join("")}}var c5={pt:1,mm:7227/2540,cm:7227/254,in:72.27,bp:803/800,pc:12,dd:1238/1157,cc:14856/1157,nd:685/642,nc:1370/107,sp:1/65536,px:803/800},U8n={ex:!0,em:!0,mu:!0},dP=function(n){return typeof n!="string"&&(n=n.unit),n in c5||n in U8n||n==="ex"},Or=function(n,t){var r;if(n.unit in c5)r=c5[n.unit]/t.fontMetrics().ptPerEm/t.sizeMultiplier;else if(n.unit==="mu")r=t.fontMetrics().cssEmPerMu;else{var s;if(t.style.isTight()?s=t.havingStyle(t.style.text()):s=t,n.unit==="ex")r=s.fontMetrics().xHeight;else if(n.unit==="em")r=s.fontMetrics().quad;else throw new Ze("Invalid unit: '"+n.unit+"'");s!==t&&(r*=s.sizeMultiplier/t.sizeMultiplier)}return Math.min(n.number*r,t.maxSize)},tt=function(n){return+n.toFixed(4)+"em"},wu=function(n){return n.filter(t=>t).join(" ")},z6=function(n){var t="";for(var r of Object.keys(n)){var s=n[r];s!==void 0&&(t+=v8n(r)+":"+s+";")}return t},hP=function(n,t,r){if(this.classes=n||[],this.attributes={},this.height=0,this.depth=0,this.maxFontSize=0,this.style=r||{},t){t.style.isTight()&&this.classes.push("mtight");var s=t.getColor();s&&(this.style.color=s)}},pP=function(n){var t=document.createElement(n);t.className=wu(this.classes),Object.assign(t.style,this.style);for(var r of Object.keys(this.attributes))t.setAttribute(r,this.attributes[r]);for(var s=0;s/=\x00-\x1f]/,mP=function(n){var t="<"+n;this.classes.length&&(t+=' class="'+Ks(wu(this.classes))+'"');var r=z6(this.style);r&&(t+=' style="'+Ks(r)+'"');for(var s of Object.keys(this.attributes)){if(G8n.test(s))throw new Ze("Invalid attribute name '"+s+"'");t+=" "+s+'="'+Ks(this.attributes[s])+'"'}t+=">";for(var i=0;i",t};class Nh{constructor(n,t,r,s){this.children=void 0,this.attributes=void 0,this.classes=void 0,this.height=void 0,this.depth=void 0,this.width=void 0,this.maxFontSize=void 0,this.style=void 0,this.italic=void 0,hP.call(this,n,r,s),this.children=t||[]}setAttribute(n,t){this.attributes[n]=t}hasClass(n){return this.classes.includes(n)}toNode(){return pP.call(this,"span")}toMarkup(){return mP.call(this,"span")}}class iy{constructor(n,t,r,s){this.children=void 0,this.attributes=void 0,this.classes=void 0,this.height=void 0,this.depth=void 0,this.maxFontSize=void 0,this.style=void 0,hP.call(this,t,s),this.children=r||[],this.setAttribute("href",n)}setAttribute(n,t){this.attributes[n]=t}hasClass(n){return this.classes.includes(n)}toNode(){return pP.call(this,"a")}toMarkup(){return mP.call(this,"a")}}class V8n{constructor(n,t,r){this.src=void 0,this.alt=void 0,this.classes=void 0,this.height=void 0,this.depth=void 0,this.maxFontSize=void 0,this.style=void 0,this.alt=t,this.src=n,this.classes=["mord"],this.height=0,this.depth=0,this.maxFontSize=0,this.style=r}hasClass(n){return this.classes.includes(n)}toNode(){var n=document.createElement("img");return n.src=this.src,n.alt=this.alt,n.className="mord",Object.assign(n.style,this.style),n}toMarkup(){var n=''+Ks(this.alt)+'0&&(t=document.createElement("span"),t.style.marginRight=tt(this.italic)),this.classes.length>0&&(t=t||document.createElement("span"),t.className=wu(this.classes)),Object.keys(this.style).length>0&&(t=t||document.createElement("span"),Object.assign(t.style,this.style)),t?(t.appendChild(n),t):n}toMarkup(){var n=!1,t="0&&(r+="margin-right:"+tt(this.italic)+";"),r+=z6(this.style),r&&(n=!0,t+=' style="'+Ks(r)+'"');var s=Ks(this.text);return n?(t+=">",t+=s,t+="",t):s}}class sc{constructor(n,t){this.children=void 0,this.attributes=void 0,this.children=n||[],this.attributes=t||{}}toNode(){var n="http://www.w3.org/2000/svg",t=document.createElementNS(n,"svg");for(var r of Object.keys(this.attributes))t.setAttribute(r,this.attributes[r]);for(var s=0;s':''}}class u5{constructor(n){this.attributes=void 0,this.attributes=n||{}}toNode(){var n="http://www.w3.org/2000/svg",t=document.createElementNS(n,"line");for(var r of Object.keys(this.attributes))t.setAttribute(r,this.attributes[r]);return t}toMarkup(){var n=" but got "+String(e)+".")}var X8n=e=>e instanceof Nh||e instanceof iy||e instanceof Eh,Bo={"AMS-Regular":{32:[0,0,0,0,.25],65:[0,.68889,0,0,.72222],66:[0,.68889,0,0,.66667],67:[0,.68889,0,0,.72222],68:[0,.68889,0,0,.72222],69:[0,.68889,0,0,.66667],70:[0,.68889,0,0,.61111],71:[0,.68889,0,0,.77778],72:[0,.68889,0,0,.77778],73:[0,.68889,0,0,.38889],74:[.16667,.68889,0,0,.5],75:[0,.68889,0,0,.77778],76:[0,.68889,0,0,.66667],77:[0,.68889,0,0,.94445],78:[0,.68889,0,0,.72222],79:[.16667,.68889,0,0,.77778],80:[0,.68889,0,0,.61111],81:[.16667,.68889,0,0,.77778],82:[0,.68889,0,0,.72222],83:[0,.68889,0,0,.55556],84:[0,.68889,0,0,.66667],85:[0,.68889,0,0,.72222],86:[0,.68889,0,0,.72222],87:[0,.68889,0,0,1],88:[0,.68889,0,0,.72222],89:[0,.68889,0,0,.72222],90:[0,.68889,0,0,.66667],107:[0,.68889,0,0,.55556],160:[0,0,0,0,.25],165:[0,.675,.025,0,.75],174:[.15559,.69224,0,0,.94666],240:[0,.68889,0,0,.55556],295:[0,.68889,0,0,.54028],710:[0,.825,0,0,2.33334],732:[0,.9,0,0,2.33334],770:[0,.825,0,0,2.33334],771:[0,.9,0,0,2.33334],989:[.08167,.58167,0,0,.77778],1008:[0,.43056,.04028,0,.66667],8245:[0,.54986,0,0,.275],8463:[0,.68889,0,0,.54028],8487:[0,.68889,0,0,.72222],8498:[0,.68889,0,0,.55556],8502:[0,.68889,0,0,.66667],8503:[0,.68889,0,0,.44445],8504:[0,.68889,0,0,.66667],8513:[0,.68889,0,0,.63889],8592:[-.03598,.46402,0,0,.5],8594:[-.03598,.46402,0,0,.5],8602:[-.13313,.36687,0,0,1],8603:[-.13313,.36687,0,0,1],8606:[.01354,.52239,0,0,1],8608:[.01354,.52239,0,0,1],8610:[.01354,.52239,0,0,1.11111],8611:[.01354,.52239,0,0,1.11111],8619:[0,.54986,0,0,1],8620:[0,.54986,0,0,1],8621:[-.13313,.37788,0,0,1.38889],8622:[-.13313,.36687,0,0,1],8624:[0,.69224,0,0,.5],8625:[0,.69224,0,0,.5],8630:[0,.43056,0,0,1],8631:[0,.43056,0,0,1],8634:[.08198,.58198,0,0,.77778],8635:[.08198,.58198,0,0,.77778],8638:[.19444,.69224,0,0,.41667],8639:[.19444,.69224,0,0,.41667],8642:[.19444,.69224,0,0,.41667],8643:[.19444,.69224,0,0,.41667],8644:[.1808,.675,0,0,1],8646:[.1808,.675,0,0,1],8647:[.1808,.675,0,0,1],8648:[.19444,.69224,0,0,.83334],8649:[.1808,.675,0,0,1],8650:[.19444,.69224,0,0,.83334],8651:[.01354,.52239,0,0,1],8652:[.01354,.52239,0,0,1],8653:[-.13313,.36687,0,0,1],8654:[-.13313,.36687,0,0,1],8655:[-.13313,.36687,0,0,1],8666:[.13667,.63667,0,0,1],8667:[.13667,.63667,0,0,1],8669:[-.13313,.37788,0,0,1],8672:[-.064,.437,0,0,1.334],8674:[-.064,.437,0,0,1.334],8705:[0,.825,0,0,.5],8708:[0,.68889,0,0,.55556],8709:[.08167,.58167,0,0,.77778],8717:[0,.43056,0,0,.42917],8722:[-.03598,.46402,0,0,.5],8724:[.08198,.69224,0,0,.77778],8726:[.08167,.58167,0,0,.77778],8733:[0,.69224,0,0,.77778],8736:[0,.69224,0,0,.72222],8737:[0,.69224,0,0,.72222],8738:[.03517,.52239,0,0,.72222],8739:[.08167,.58167,0,0,.22222],8740:[.25142,.74111,0,0,.27778],8741:[.08167,.58167,0,0,.38889],8742:[.25142,.74111,0,0,.5],8756:[0,.69224,0,0,.66667],8757:[0,.69224,0,0,.66667],8764:[-.13313,.36687,0,0,.77778],8765:[-.13313,.37788,0,0,.77778],8769:[-.13313,.36687,0,0,.77778],8770:[-.03625,.46375,0,0,.77778],8774:[.30274,.79383,0,0,.77778],8776:[-.01688,.48312,0,0,.77778],8778:[.08167,.58167,0,0,.77778],8782:[.06062,.54986,0,0,.77778],8783:[.06062,.54986,0,0,.77778],8785:[.08198,.58198,0,0,.77778],8786:[.08198,.58198,0,0,.77778],8787:[.08198,.58198,0,0,.77778],8790:[0,.69224,0,0,.77778],8791:[.22958,.72958,0,0,.77778],8796:[.08198,.91667,0,0,.77778],8806:[.25583,.75583,0,0,.77778],8807:[.25583,.75583,0,0,.77778],8808:[.25142,.75726,0,0,.77778],8809:[.25142,.75726,0,0,.77778],8812:[.25583,.75583,0,0,.5],8814:[.20576,.70576,0,0,.77778],8815:[.20576,.70576,0,0,.77778],8816:[.30274,.79383,0,0,.77778],8817:[.30274,.79383,0,0,.77778],8818:[.22958,.72958,0,0,.77778],8819:[.22958,.72958,0,0,.77778],8822:[.1808,.675,0,0,.77778],8823:[.1808,.675,0,0,.77778],8828:[.13667,.63667,0,0,.77778],8829:[.13667,.63667,0,0,.77778],8830:[.22958,.72958,0,0,.77778],8831:[.22958,.72958,0,0,.77778],8832:[.20576,.70576,0,0,.77778],8833:[.20576,.70576,0,0,.77778],8840:[.30274,.79383,0,0,.77778],8841:[.30274,.79383,0,0,.77778],8842:[.13597,.63597,0,0,.77778],8843:[.13597,.63597,0,0,.77778],8847:[.03517,.54986,0,0,.77778],8848:[.03517,.54986,0,0,.77778],8858:[.08198,.58198,0,0,.77778],8859:[.08198,.58198,0,0,.77778],8861:[.08198,.58198,0,0,.77778],8862:[0,.675,0,0,.77778],8863:[0,.675,0,0,.77778],8864:[0,.675,0,0,.77778],8865:[0,.675,0,0,.77778],8872:[0,.69224,0,0,.61111],8873:[0,.69224,0,0,.72222],8874:[0,.69224,0,0,.88889],8876:[0,.68889,0,0,.61111],8877:[0,.68889,0,0,.61111],8878:[0,.68889,0,0,.72222],8879:[0,.68889,0,0,.72222],8882:[.03517,.54986,0,0,.77778],8883:[.03517,.54986,0,0,.77778],8884:[.13667,.63667,0,0,.77778],8885:[.13667,.63667,0,0,.77778],8888:[0,.54986,0,0,1.11111],8890:[.19444,.43056,0,0,.55556],8891:[.19444,.69224,0,0,.61111],8892:[.19444,.69224,0,0,.61111],8901:[0,.54986,0,0,.27778],8903:[.08167,.58167,0,0,.77778],8905:[.08167,.58167,0,0,.77778],8906:[.08167,.58167,0,0,.77778],8907:[0,.69224,0,0,.77778],8908:[0,.69224,0,0,.77778],8909:[-.03598,.46402,0,0,.77778],8910:[0,.54986,0,0,.76042],8911:[0,.54986,0,0,.76042],8912:[.03517,.54986,0,0,.77778],8913:[.03517,.54986,0,0,.77778],8914:[0,.54986,0,0,.66667],8915:[0,.54986,0,0,.66667],8916:[0,.69224,0,0,.66667],8918:[.0391,.5391,0,0,.77778],8919:[.0391,.5391,0,0,.77778],8920:[.03517,.54986,0,0,1.33334],8921:[.03517,.54986,0,0,1.33334],8922:[.38569,.88569,0,0,.77778],8923:[.38569,.88569,0,0,.77778],8926:[.13667,.63667,0,0,.77778],8927:[.13667,.63667,0,0,.77778],8928:[.30274,.79383,0,0,.77778],8929:[.30274,.79383,0,0,.77778],8934:[.23222,.74111,0,0,.77778],8935:[.23222,.74111,0,0,.77778],8936:[.23222,.74111,0,0,.77778],8937:[.23222,.74111,0,0,.77778],8938:[.20576,.70576,0,0,.77778],8939:[.20576,.70576,0,0,.77778],8940:[.30274,.79383,0,0,.77778],8941:[.30274,.79383,0,0,.77778],8994:[.19444,.69224,0,0,.77778],8995:[.19444,.69224,0,0,.77778],9416:[.15559,.69224,0,0,.90222],9484:[0,.69224,0,0,.5],9488:[0,.69224,0,0,.5],9492:[0,.37788,0,0,.5],9496:[0,.37788,0,0,.5],9585:[.19444,.68889,0,0,.88889],9586:[.19444,.74111,0,0,.88889],9632:[0,.675,0,0,.77778],9633:[0,.675,0,0,.77778],9650:[0,.54986,0,0,.72222],9651:[0,.54986,0,0,.72222],9654:[.03517,.54986,0,0,.77778],9660:[0,.54986,0,0,.72222],9661:[0,.54986,0,0,.72222],9664:[.03517,.54986,0,0,.77778],9674:[.11111,.69224,0,0,.66667],9733:[.19444,.69224,0,0,.94445],10003:[0,.69224,0,0,.83334],10016:[0,.69224,0,0,.83334],10731:[.11111,.69224,0,0,.66667],10846:[.19444,.75583,0,0,.61111],10877:[.13667,.63667,0,0,.77778],10878:[.13667,.63667,0,0,.77778],10885:[.25583,.75583,0,0,.77778],10886:[.25583,.75583,0,0,.77778],10887:[.13597,.63597,0,0,.77778],10888:[.13597,.63597,0,0,.77778],10889:[.26167,.75726,0,0,.77778],10890:[.26167,.75726,0,0,.77778],10891:[.48256,.98256,0,0,.77778],10892:[.48256,.98256,0,0,.77778],10901:[.13667,.63667,0,0,.77778],10902:[.13667,.63667,0,0,.77778],10933:[.25142,.75726,0,0,.77778],10934:[.25142,.75726,0,0,.77778],10935:[.26167,.75726,0,0,.77778],10936:[.26167,.75726,0,0,.77778],10937:[.26167,.75726,0,0,.77778],10938:[.26167,.75726,0,0,.77778],10949:[.25583,.75583,0,0,.77778],10950:[.25583,.75583,0,0,.77778],10955:[.28481,.79383,0,0,.77778],10956:[.28481,.79383,0,0,.77778],57350:[.08167,.58167,0,0,.22222],57351:[.08167,.58167,0,0,.38889],57352:[.08167,.58167,0,0,.77778],57353:[0,.43056,.04028,0,.66667],57356:[.25142,.75726,0,0,.77778],57357:[.25142,.75726,0,0,.77778],57358:[.41951,.91951,0,0,.77778],57359:[.30274,.79383,0,0,.77778],57360:[.30274,.79383,0,0,.77778],57361:[.41951,.91951,0,0,.77778],57366:[.25142,.75726,0,0,.77778],57367:[.25142,.75726,0,0,.77778],57368:[.25142,.75726,0,0,.77778],57369:[.25142,.75726,0,0,.77778],57370:[.13597,.63597,0,0,.77778],57371:[.13597,.63597,0,0,.77778]},"Caligraphic-Regular":{32:[0,0,0,0,.25],65:[0,.68333,0,.19445,.79847],66:[0,.68333,.03041,.13889,.65681],67:[0,.68333,.05834,.13889,.52653],68:[0,.68333,.02778,.08334,.77139],69:[0,.68333,.08944,.11111,.52778],70:[0,.68333,.09931,.11111,.71875],71:[.09722,.68333,.0593,.11111,.59487],72:[0,.68333,.00965,.11111,.84452],73:[0,.68333,.07382,0,.54452],74:[.09722,.68333,.18472,.16667,.67778],75:[0,.68333,.01445,.05556,.76195],76:[0,.68333,0,.13889,.68972],77:[0,.68333,0,.13889,1.2009],78:[0,.68333,.14736,.08334,.82049],79:[0,.68333,.02778,.11111,.79611],80:[0,.68333,.08222,.08334,.69556],81:[.09722,.68333,0,.11111,.81667],82:[0,.68333,0,.08334,.8475],83:[0,.68333,.075,.13889,.60556],84:[0,.68333,.25417,0,.54464],85:[0,.68333,.09931,.08334,.62583],86:[0,.68333,.08222,0,.61278],87:[0,.68333,.08222,.08334,.98778],88:[0,.68333,.14643,.13889,.7133],89:[.09722,.68333,.08222,.08334,.66834],90:[0,.68333,.07944,.13889,.72473],160:[0,0,0,0,.25]},"Fraktur-Regular":{32:[0,0,0,0,.25],33:[0,.69141,0,0,.29574],34:[0,.69141,0,0,.21471],38:[0,.69141,0,0,.73786],39:[0,.69141,0,0,.21201],40:[.24982,.74947,0,0,.38865],41:[.24982,.74947,0,0,.38865],42:[0,.62119,0,0,.27764],43:[.08319,.58283,0,0,.75623],44:[0,.10803,0,0,.27764],45:[.08319,.58283,0,0,.75623],46:[0,.10803,0,0,.27764],47:[.24982,.74947,0,0,.50181],48:[0,.47534,0,0,.50181],49:[0,.47534,0,0,.50181],50:[0,.47534,0,0,.50181],51:[.18906,.47534,0,0,.50181],52:[.18906,.47534,0,0,.50181],53:[.18906,.47534,0,0,.50181],54:[0,.69141,0,0,.50181],55:[.18906,.47534,0,0,.50181],56:[0,.69141,0,0,.50181],57:[.18906,.47534,0,0,.50181],58:[0,.47534,0,0,.21606],59:[.12604,.47534,0,0,.21606],61:[-.13099,.36866,0,0,.75623],63:[0,.69141,0,0,.36245],65:[0,.69141,0,0,.7176],66:[0,.69141,0,0,.88397],67:[0,.69141,0,0,.61254],68:[0,.69141,0,0,.83158],69:[0,.69141,0,0,.66278],70:[.12604,.69141,0,0,.61119],71:[0,.69141,0,0,.78539],72:[.06302,.69141,0,0,.7203],73:[0,.69141,0,0,.55448],74:[.12604,.69141,0,0,.55231],75:[0,.69141,0,0,.66845],76:[0,.69141,0,0,.66602],77:[0,.69141,0,0,1.04953],78:[0,.69141,0,0,.83212],79:[0,.69141,0,0,.82699],80:[.18906,.69141,0,0,.82753],81:[.03781,.69141,0,0,.82699],82:[0,.69141,0,0,.82807],83:[0,.69141,0,0,.82861],84:[0,.69141,0,0,.66899],85:[0,.69141,0,0,.64576],86:[0,.69141,0,0,.83131],87:[0,.69141,0,0,1.04602],88:[0,.69141,0,0,.71922],89:[.18906,.69141,0,0,.83293],90:[.12604,.69141,0,0,.60201],91:[.24982,.74947,0,0,.27764],93:[.24982,.74947,0,0,.27764],94:[0,.69141,0,0,.49965],97:[0,.47534,0,0,.50046],98:[0,.69141,0,0,.51315],99:[0,.47534,0,0,.38946],100:[0,.62119,0,0,.49857],101:[0,.47534,0,0,.40053],102:[.18906,.69141,0,0,.32626],103:[.18906,.47534,0,0,.5037],104:[.18906,.69141,0,0,.52126],105:[0,.69141,0,0,.27899],106:[0,.69141,0,0,.28088],107:[0,.69141,0,0,.38946],108:[0,.69141,0,0,.27953],109:[0,.47534,0,0,.76676],110:[0,.47534,0,0,.52666],111:[0,.47534,0,0,.48885],112:[.18906,.52396,0,0,.50046],113:[.18906,.47534,0,0,.48912],114:[0,.47534,0,0,.38919],115:[0,.47534,0,0,.44266],116:[0,.62119,0,0,.33301],117:[0,.47534,0,0,.5172],118:[0,.52396,0,0,.5118],119:[0,.52396,0,0,.77351],120:[.18906,.47534,0,0,.38865],121:[.18906,.47534,0,0,.49884],122:[.18906,.47534,0,0,.39054],160:[0,0,0,0,.25],8216:[0,.69141,0,0,.21471],8217:[0,.69141,0,0,.21471],58112:[0,.62119,0,0,.49749],58113:[0,.62119,0,0,.4983],58114:[.18906,.69141,0,0,.33328],58115:[.18906,.69141,0,0,.32923],58116:[.18906,.47534,0,0,.50343],58117:[0,.69141,0,0,.33301],58118:[0,.62119,0,0,.33409],58119:[0,.47534,0,0,.50073]},"Main-Bold":{32:[0,0,0,0,.25],33:[0,.69444,0,0,.35],34:[0,.69444,0,0,.60278],35:[.19444,.69444,0,0,.95833],36:[.05556,.75,0,0,.575],37:[.05556,.75,0,0,.95833],38:[0,.69444,0,0,.89444],39:[0,.69444,0,0,.31944],40:[.25,.75,0,0,.44722],41:[.25,.75,0,0,.44722],42:[0,.75,0,0,.575],43:[.13333,.63333,0,0,.89444],44:[.19444,.15556,0,0,.31944],45:[0,.44444,0,0,.38333],46:[0,.15556,0,0,.31944],47:[.25,.75,0,0,.575],48:[0,.64444,0,0,.575],49:[0,.64444,0,0,.575],50:[0,.64444,0,0,.575],51:[0,.64444,0,0,.575],52:[0,.64444,0,0,.575],53:[0,.64444,0,0,.575],54:[0,.64444,0,0,.575],55:[0,.64444,0,0,.575],56:[0,.64444,0,0,.575],57:[0,.64444,0,0,.575],58:[0,.44444,0,0,.31944],59:[.19444,.44444,0,0,.31944],60:[.08556,.58556,0,0,.89444],61:[-.10889,.39111,0,0,.89444],62:[.08556,.58556,0,0,.89444],63:[0,.69444,0,0,.54305],64:[0,.69444,0,0,.89444],65:[0,.68611,0,0,.86944],66:[0,.68611,0,0,.81805],67:[0,.68611,0,0,.83055],68:[0,.68611,0,0,.88194],69:[0,.68611,0,0,.75555],70:[0,.68611,0,0,.72361],71:[0,.68611,0,0,.90416],72:[0,.68611,0,0,.9],73:[0,.68611,0,0,.43611],74:[0,.68611,0,0,.59444],75:[0,.68611,0,0,.90138],76:[0,.68611,0,0,.69166],77:[0,.68611,0,0,1.09166],78:[0,.68611,0,0,.9],79:[0,.68611,0,0,.86388],80:[0,.68611,0,0,.78611],81:[.19444,.68611,0,0,.86388],82:[0,.68611,0,0,.8625],83:[0,.68611,0,0,.63889],84:[0,.68611,0,0,.8],85:[0,.68611,0,0,.88472],86:[0,.68611,.01597,0,.86944],87:[0,.68611,.01597,0,1.18888],88:[0,.68611,0,0,.86944],89:[0,.68611,.02875,0,.86944],90:[0,.68611,0,0,.70277],91:[.25,.75,0,0,.31944],92:[.25,.75,0,0,.575],93:[.25,.75,0,0,.31944],94:[0,.69444,0,0,.575],95:[.31,.13444,.03194,0,.575],97:[0,.44444,0,0,.55902],98:[0,.69444,0,0,.63889],99:[0,.44444,0,0,.51111],100:[0,.69444,0,0,.63889],101:[0,.44444,0,0,.52708],102:[0,.69444,.10903,0,.35139],103:[.19444,.44444,.01597,0,.575],104:[0,.69444,0,0,.63889],105:[0,.69444,0,0,.31944],106:[.19444,.69444,0,0,.35139],107:[0,.69444,0,0,.60694],108:[0,.69444,0,0,.31944],109:[0,.44444,0,0,.95833],110:[0,.44444,0,0,.63889],111:[0,.44444,0,0,.575],112:[.19444,.44444,0,0,.63889],113:[.19444,.44444,0,0,.60694],114:[0,.44444,0,0,.47361],115:[0,.44444,0,0,.45361],116:[0,.63492,0,0,.44722],117:[0,.44444,0,0,.63889],118:[0,.44444,.01597,0,.60694],119:[0,.44444,.01597,0,.83055],120:[0,.44444,0,0,.60694],121:[.19444,.44444,.01597,0,.60694],122:[0,.44444,0,0,.51111],123:[.25,.75,0,0,.575],124:[.25,.75,0,0,.31944],125:[.25,.75,0,0,.575],126:[.35,.34444,0,0,.575],160:[0,0,0,0,.25],163:[0,.69444,0,0,.86853],168:[0,.69444,0,0,.575],172:[0,.44444,0,0,.76666],176:[0,.69444,0,0,.86944],177:[.13333,.63333,0,0,.89444],184:[.17014,0,0,0,.51111],198:[0,.68611,0,0,1.04166],215:[.13333,.63333,0,0,.89444],216:[.04861,.73472,0,0,.89444],223:[0,.69444,0,0,.59722],230:[0,.44444,0,0,.83055],247:[.13333,.63333,0,0,.89444],248:[.09722,.54167,0,0,.575],305:[0,.44444,0,0,.31944],338:[0,.68611,0,0,1.16944],339:[0,.44444,0,0,.89444],567:[.19444,.44444,0,0,.35139],710:[0,.69444,0,0,.575],711:[0,.63194,0,0,.575],713:[0,.59611,0,0,.575],714:[0,.69444,0,0,.575],715:[0,.69444,0,0,.575],728:[0,.69444,0,0,.575],729:[0,.69444,0,0,.31944],730:[0,.69444,0,0,.86944],732:[0,.69444,0,0,.575],733:[0,.69444,0,0,.575],915:[0,.68611,0,0,.69166],916:[0,.68611,0,0,.95833],920:[0,.68611,0,0,.89444],923:[0,.68611,0,0,.80555],926:[0,.68611,0,0,.76666],928:[0,.68611,0,0,.9],931:[0,.68611,0,0,.83055],933:[0,.68611,0,0,.89444],934:[0,.68611,0,0,.83055],936:[0,.68611,0,0,.89444],937:[0,.68611,0,0,.83055],8211:[0,.44444,.03194,0,.575],8212:[0,.44444,.03194,0,1.14999],8216:[0,.69444,0,0,.31944],8217:[0,.69444,0,0,.31944],8220:[0,.69444,0,0,.60278],8221:[0,.69444,0,0,.60278],8224:[.19444,.69444,0,0,.51111],8225:[.19444,.69444,0,0,.51111],8242:[0,.55556,0,0,.34444],8407:[0,.72444,.15486,0,.575],8463:[0,.69444,0,0,.66759],8465:[0,.69444,0,0,.83055],8467:[0,.69444,0,0,.47361],8472:[.19444,.44444,0,0,.74027],8476:[0,.69444,0,0,.83055],8501:[0,.69444,0,0,.70277],8592:[-.10889,.39111,0,0,1.14999],8593:[.19444,.69444,0,0,.575],8594:[-.10889,.39111,0,0,1.14999],8595:[.19444,.69444,0,0,.575],8596:[-.10889,.39111,0,0,1.14999],8597:[.25,.75,0,0,.575],8598:[.19444,.69444,0,0,1.14999],8599:[.19444,.69444,0,0,1.14999],8600:[.19444,.69444,0,0,1.14999],8601:[.19444,.69444,0,0,1.14999],8636:[-.10889,.39111,0,0,1.14999],8637:[-.10889,.39111,0,0,1.14999],8640:[-.10889,.39111,0,0,1.14999],8641:[-.10889,.39111,0,0,1.14999],8656:[-.10889,.39111,0,0,1.14999],8657:[.19444,.69444,0,0,.70277],8658:[-.10889,.39111,0,0,1.14999],8659:[.19444,.69444,0,0,.70277],8660:[-.10889,.39111,0,0,1.14999],8661:[.25,.75,0,0,.70277],8704:[0,.69444,0,0,.63889],8706:[0,.69444,.06389,0,.62847],8707:[0,.69444,0,0,.63889],8709:[.05556,.75,0,0,.575],8711:[0,.68611,0,0,.95833],8712:[.08556,.58556,0,0,.76666],8715:[.08556,.58556,0,0,.76666],8722:[.13333,.63333,0,0,.89444],8723:[.13333,.63333,0,0,.89444],8725:[.25,.75,0,0,.575],8726:[.25,.75,0,0,.575],8727:[-.02778,.47222,0,0,.575],8728:[-.02639,.47361,0,0,.575],8729:[-.02639,.47361,0,0,.575],8730:[.18,.82,0,0,.95833],8733:[0,.44444,0,0,.89444],8734:[0,.44444,0,0,1.14999],8736:[0,.69224,0,0,.72222],8739:[.25,.75,0,0,.31944],8741:[.25,.75,0,0,.575],8743:[0,.55556,0,0,.76666],8744:[0,.55556,0,0,.76666],8745:[0,.55556,0,0,.76666],8746:[0,.55556,0,0,.76666],8747:[.19444,.69444,.12778,0,.56875],8764:[-.10889,.39111,0,0,.89444],8768:[.19444,.69444,0,0,.31944],8771:[.00222,.50222,0,0,.89444],8773:[.027,.638,0,0,.894],8776:[.02444,.52444,0,0,.89444],8781:[.00222,.50222,0,0,.89444],8801:[.00222,.50222,0,0,.89444],8804:[.19667,.69667,0,0,.89444],8805:[.19667,.69667,0,0,.89444],8810:[.08556,.58556,0,0,1.14999],8811:[.08556,.58556,0,0,1.14999],8826:[.08556,.58556,0,0,.89444],8827:[.08556,.58556,0,0,.89444],8834:[.08556,.58556,0,0,.89444],8835:[.08556,.58556,0,0,.89444],8838:[.19667,.69667,0,0,.89444],8839:[.19667,.69667,0,0,.89444],8846:[0,.55556,0,0,.76666],8849:[.19667,.69667,0,0,.89444],8850:[.19667,.69667,0,0,.89444],8851:[0,.55556,0,0,.76666],8852:[0,.55556,0,0,.76666],8853:[.13333,.63333,0,0,.89444],8854:[.13333,.63333,0,0,.89444],8855:[.13333,.63333,0,0,.89444],8856:[.13333,.63333,0,0,.89444],8857:[.13333,.63333,0,0,.89444],8866:[0,.69444,0,0,.70277],8867:[0,.69444,0,0,.70277],8868:[0,.69444,0,0,.89444],8869:[0,.69444,0,0,.89444],8900:[-.02639,.47361,0,0,.575],8901:[-.02639,.47361,0,0,.31944],8902:[-.02778,.47222,0,0,.575],8968:[.25,.75,0,0,.51111],8969:[.25,.75,0,0,.51111],8970:[.25,.75,0,0,.51111],8971:[.25,.75,0,0,.51111],8994:[-.13889,.36111,0,0,1.14999],8995:[-.13889,.36111,0,0,1.14999],9651:[.19444,.69444,0,0,1.02222],9657:[-.02778,.47222,0,0,.575],9661:[.19444,.69444,0,0,1.02222],9667:[-.02778,.47222,0,0,.575],9711:[.19444,.69444,0,0,1.14999],9824:[.12963,.69444,0,0,.89444],9825:[.12963,.69444,0,0,.89444],9826:[.12963,.69444,0,0,.89444],9827:[.12963,.69444,0,0,.89444],9837:[0,.75,0,0,.44722],9838:[.19444,.69444,0,0,.44722],9839:[.19444,.69444,0,0,.44722],10216:[.25,.75,0,0,.44722],10217:[.25,.75,0,0,.44722],10815:[0,.68611,0,0,.9],10927:[.19667,.69667,0,0,.89444],10928:[.19667,.69667,0,0,.89444],57376:[.19444,.69444,0,0,0]},"Main-BoldItalic":{32:[0,0,0,0,.25],33:[0,.69444,.11417,0,.38611],34:[0,.69444,.07939,0,.62055],35:[.19444,.69444,.06833,0,.94444],37:[.05556,.75,.12861,0,.94444],38:[0,.69444,.08528,0,.88555],39:[0,.69444,.12945,0,.35555],40:[.25,.75,.15806,0,.47333],41:[.25,.75,.03306,0,.47333],42:[0,.75,.14333,0,.59111],43:[.10333,.60333,.03306,0,.88555],44:[.19444,.14722,0,0,.35555],45:[0,.44444,.02611,0,.41444],46:[0,.14722,0,0,.35555],47:[.25,.75,.15806,0,.59111],48:[0,.64444,.13167,0,.59111],49:[0,.64444,.13167,0,.59111],50:[0,.64444,.13167,0,.59111],51:[0,.64444,.13167,0,.59111],52:[.19444,.64444,.13167,0,.59111],53:[0,.64444,.13167,0,.59111],54:[0,.64444,.13167,0,.59111],55:[.19444,.64444,.13167,0,.59111],56:[0,.64444,.13167,0,.59111],57:[0,.64444,.13167,0,.59111],58:[0,.44444,.06695,0,.35555],59:[.19444,.44444,.06695,0,.35555],61:[-.10889,.39111,.06833,0,.88555],63:[0,.69444,.11472,0,.59111],64:[0,.69444,.09208,0,.88555],65:[0,.68611,0,0,.86555],66:[0,.68611,.0992,0,.81666],67:[0,.68611,.14208,0,.82666],68:[0,.68611,.09062,0,.87555],69:[0,.68611,.11431,0,.75666],70:[0,.68611,.12903,0,.72722],71:[0,.68611,.07347,0,.89527],72:[0,.68611,.17208,0,.8961],73:[0,.68611,.15681,0,.47166],74:[0,.68611,.145,0,.61055],75:[0,.68611,.14208,0,.89499],76:[0,.68611,0,0,.69777],77:[0,.68611,.17208,0,1.07277],78:[0,.68611,.17208,0,.8961],79:[0,.68611,.09062,0,.85499],80:[0,.68611,.0992,0,.78721],81:[.19444,.68611,.09062,0,.85499],82:[0,.68611,.02559,0,.85944],83:[0,.68611,.11264,0,.64999],84:[0,.68611,.12903,0,.7961],85:[0,.68611,.17208,0,.88083],86:[0,.68611,.18625,0,.86555],87:[0,.68611,.18625,0,1.15999],88:[0,.68611,.15681,0,.86555],89:[0,.68611,.19803,0,.86555],90:[0,.68611,.14208,0,.70888],91:[.25,.75,.1875,0,.35611],93:[.25,.75,.09972,0,.35611],94:[0,.69444,.06709,0,.59111],95:[.31,.13444,.09811,0,.59111],97:[0,.44444,.09426,0,.59111],98:[0,.69444,.07861,0,.53222],99:[0,.44444,.05222,0,.53222],100:[0,.69444,.10861,0,.59111],101:[0,.44444,.085,0,.53222],102:[.19444,.69444,.21778,0,.4],103:[.19444,.44444,.105,0,.53222],104:[0,.69444,.09426,0,.59111],105:[0,.69326,.11387,0,.35555],106:[.19444,.69326,.1672,0,.35555],107:[0,.69444,.11111,0,.53222],108:[0,.69444,.10861,0,.29666],109:[0,.44444,.09426,0,.94444],110:[0,.44444,.09426,0,.64999],111:[0,.44444,.07861,0,.59111],112:[.19444,.44444,.07861,0,.59111],113:[.19444,.44444,.105,0,.53222],114:[0,.44444,.11111,0,.50167],115:[0,.44444,.08167,0,.48694],116:[0,.63492,.09639,0,.385],117:[0,.44444,.09426,0,.62055],118:[0,.44444,.11111,0,.53222],119:[0,.44444,.11111,0,.76777],120:[0,.44444,.12583,0,.56055],121:[.19444,.44444,.105,0,.56166],122:[0,.44444,.13889,0,.49055],126:[.35,.34444,.11472,0,.59111],160:[0,0,0,0,.25],168:[0,.69444,.11473,0,.59111],176:[0,.69444,0,0,.94888],184:[.17014,0,0,0,.53222],198:[0,.68611,.11431,0,1.02277],216:[.04861,.73472,.09062,0,.88555],223:[.19444,.69444,.09736,0,.665],230:[0,.44444,.085,0,.82666],248:[.09722,.54167,.09458,0,.59111],305:[0,.44444,.09426,0,.35555],338:[0,.68611,.11431,0,1.14054],339:[0,.44444,.085,0,.82666],567:[.19444,.44444,.04611,0,.385],710:[0,.69444,.06709,0,.59111],711:[0,.63194,.08271,0,.59111],713:[0,.59444,.10444,0,.59111],714:[0,.69444,.08528,0,.59111],715:[0,.69444,0,0,.59111],728:[0,.69444,.10333,0,.59111],729:[0,.69444,.12945,0,.35555],730:[0,.69444,0,0,.94888],732:[0,.69444,.11472,0,.59111],733:[0,.69444,.11472,0,.59111],915:[0,.68611,.12903,0,.69777],916:[0,.68611,0,0,.94444],920:[0,.68611,.09062,0,.88555],923:[0,.68611,0,0,.80666],926:[0,.68611,.15092,0,.76777],928:[0,.68611,.17208,0,.8961],931:[0,.68611,.11431,0,.82666],933:[0,.68611,.10778,0,.88555],934:[0,.68611,.05632,0,.82666],936:[0,.68611,.10778,0,.88555],937:[0,.68611,.0992,0,.82666],8211:[0,.44444,.09811,0,.59111],8212:[0,.44444,.09811,0,1.18221],8216:[0,.69444,.12945,0,.35555],8217:[0,.69444,.12945,0,.35555],8220:[0,.69444,.16772,0,.62055],8221:[0,.69444,.07939,0,.62055]},"Main-Italic":{32:[0,0,0,0,.25],33:[0,.69444,.12417,0,.30667],34:[0,.69444,.06961,0,.51444],35:[.19444,.69444,.06616,0,.81777],37:[.05556,.75,.13639,0,.81777],38:[0,.69444,.09694,0,.76666],39:[0,.69444,.12417,0,.30667],40:[.25,.75,.16194,0,.40889],41:[.25,.75,.03694,0,.40889],42:[0,.75,.14917,0,.51111],43:[.05667,.56167,.03694,0,.76666],44:[.19444,.10556,0,0,.30667],45:[0,.43056,.02826,0,.35778],46:[0,.10556,0,0,.30667],47:[.25,.75,.16194,0,.51111],48:[0,.64444,.13556,0,.51111],49:[0,.64444,.13556,0,.51111],50:[0,.64444,.13556,0,.51111],51:[0,.64444,.13556,0,.51111],52:[.19444,.64444,.13556,0,.51111],53:[0,.64444,.13556,0,.51111],54:[0,.64444,.13556,0,.51111],55:[.19444,.64444,.13556,0,.51111],56:[0,.64444,.13556,0,.51111],57:[0,.64444,.13556,0,.51111],58:[0,.43056,.0582,0,.30667],59:[.19444,.43056,.0582,0,.30667],61:[-.13313,.36687,.06616,0,.76666],63:[0,.69444,.1225,0,.51111],64:[0,.69444,.09597,0,.76666],65:[0,.68333,0,0,.74333],66:[0,.68333,.10257,0,.70389],67:[0,.68333,.14528,0,.71555],68:[0,.68333,.09403,0,.755],69:[0,.68333,.12028,0,.67833],70:[0,.68333,.13305,0,.65277],71:[0,.68333,.08722,0,.77361],72:[0,.68333,.16389,0,.74333],73:[0,.68333,.15806,0,.38555],74:[0,.68333,.14028,0,.525],75:[0,.68333,.14528,0,.76888],76:[0,.68333,0,0,.62722],77:[0,.68333,.16389,0,.89666],78:[0,.68333,.16389,0,.74333],79:[0,.68333,.09403,0,.76666],80:[0,.68333,.10257,0,.67833],81:[.19444,.68333,.09403,0,.76666],82:[0,.68333,.03868,0,.72944],83:[0,.68333,.11972,0,.56222],84:[0,.68333,.13305,0,.71555],85:[0,.68333,.16389,0,.74333],86:[0,.68333,.18361,0,.74333],87:[0,.68333,.18361,0,.99888],88:[0,.68333,.15806,0,.74333],89:[0,.68333,.19383,0,.74333],90:[0,.68333,.14528,0,.61333],91:[.25,.75,.1875,0,.30667],93:[.25,.75,.10528,0,.30667],94:[0,.69444,.06646,0,.51111],95:[.31,.12056,.09208,0,.51111],97:[0,.43056,.07671,0,.51111],98:[0,.69444,.06312,0,.46],99:[0,.43056,.05653,0,.46],100:[0,.69444,.10333,0,.51111],101:[0,.43056,.07514,0,.46],102:[.19444,.69444,.21194,0,.30667],103:[.19444,.43056,.08847,0,.46],104:[0,.69444,.07671,0,.51111],105:[0,.65536,.1019,0,.30667],106:[.19444,.65536,.14467,0,.30667],107:[0,.69444,.10764,0,.46],108:[0,.69444,.10333,0,.25555],109:[0,.43056,.07671,0,.81777],110:[0,.43056,.07671,0,.56222],111:[0,.43056,.06312,0,.51111],112:[.19444,.43056,.06312,0,.51111],113:[.19444,.43056,.08847,0,.46],114:[0,.43056,.10764,0,.42166],115:[0,.43056,.08208,0,.40889],116:[0,.61508,.09486,0,.33222],117:[0,.43056,.07671,0,.53666],118:[0,.43056,.10764,0,.46],119:[0,.43056,.10764,0,.66444],120:[0,.43056,.12042,0,.46389],121:[.19444,.43056,.08847,0,.48555],122:[0,.43056,.12292,0,.40889],126:[.35,.31786,.11585,0,.51111],160:[0,0,0,0,.25],168:[0,.66786,.10474,0,.51111],176:[0,.69444,0,0,.83129],184:[.17014,0,0,0,.46],198:[0,.68333,.12028,0,.88277],216:[.04861,.73194,.09403,0,.76666],223:[.19444,.69444,.10514,0,.53666],230:[0,.43056,.07514,0,.71555],248:[.09722,.52778,.09194,0,.51111],338:[0,.68333,.12028,0,.98499],339:[0,.43056,.07514,0,.71555],710:[0,.69444,.06646,0,.51111],711:[0,.62847,.08295,0,.51111],713:[0,.56167,.10333,0,.51111],714:[0,.69444,.09694,0,.51111],715:[0,.69444,0,0,.51111],728:[0,.69444,.10806,0,.51111],729:[0,.66786,.11752,0,.30667],730:[0,.69444,0,0,.83129],732:[0,.66786,.11585,0,.51111],733:[0,.69444,.1225,0,.51111],915:[0,.68333,.13305,0,.62722],916:[0,.68333,0,0,.81777],920:[0,.68333,.09403,0,.76666],923:[0,.68333,0,0,.69222],926:[0,.68333,.15294,0,.66444],928:[0,.68333,.16389,0,.74333],931:[0,.68333,.12028,0,.71555],933:[0,.68333,.11111,0,.76666],934:[0,.68333,.05986,0,.71555],936:[0,.68333,.11111,0,.76666],937:[0,.68333,.10257,0,.71555],8211:[0,.43056,.09208,0,.51111],8212:[0,.43056,.09208,0,1.02222],8216:[0,.69444,.12417,0,.30667],8217:[0,.69444,.12417,0,.30667],8220:[0,.69444,.1685,0,.51444],8221:[0,.69444,.06961,0,.51444],8463:[0,.68889,0,0,.54028]},"Main-Regular":{32:[0,0,0,0,.25],33:[0,.69444,0,0,.27778],34:[0,.69444,0,0,.5],35:[.19444,.69444,0,0,.83334],36:[.05556,.75,0,0,.5],37:[.05556,.75,0,0,.83334],38:[0,.69444,0,0,.77778],39:[0,.69444,0,0,.27778],40:[.25,.75,0,0,.38889],41:[.25,.75,0,0,.38889],42:[0,.75,0,0,.5],43:[.08333,.58333,0,0,.77778],44:[.19444,.10556,0,0,.27778],45:[0,.43056,0,0,.33333],46:[0,.10556,0,0,.27778],47:[.25,.75,0,0,.5],48:[0,.64444,0,0,.5],49:[0,.64444,0,0,.5],50:[0,.64444,0,0,.5],51:[0,.64444,0,0,.5],52:[0,.64444,0,0,.5],53:[0,.64444,0,0,.5],54:[0,.64444,0,0,.5],55:[0,.64444,0,0,.5],56:[0,.64444,0,0,.5],57:[0,.64444,0,0,.5],58:[0,.43056,0,0,.27778],59:[.19444,.43056,0,0,.27778],60:[.0391,.5391,0,0,.77778],61:[-.13313,.36687,0,0,.77778],62:[.0391,.5391,0,0,.77778],63:[0,.69444,0,0,.47222],64:[0,.69444,0,0,.77778],65:[0,.68333,0,0,.75],66:[0,.68333,0,0,.70834],67:[0,.68333,0,0,.72222],68:[0,.68333,0,0,.76389],69:[0,.68333,0,0,.68056],70:[0,.68333,0,0,.65278],71:[0,.68333,0,0,.78472],72:[0,.68333,0,0,.75],73:[0,.68333,0,0,.36111],74:[0,.68333,0,0,.51389],75:[0,.68333,0,0,.77778],76:[0,.68333,0,0,.625],77:[0,.68333,0,0,.91667],78:[0,.68333,0,0,.75],79:[0,.68333,0,0,.77778],80:[0,.68333,0,0,.68056],81:[.19444,.68333,0,0,.77778],82:[0,.68333,0,0,.73611],83:[0,.68333,0,0,.55556],84:[0,.68333,0,0,.72222],85:[0,.68333,0,0,.75],86:[0,.68333,.01389,0,.75],87:[0,.68333,.01389,0,1.02778],88:[0,.68333,0,0,.75],89:[0,.68333,.025,0,.75],90:[0,.68333,0,0,.61111],91:[.25,.75,0,0,.27778],92:[.25,.75,0,0,.5],93:[.25,.75,0,0,.27778],94:[0,.69444,0,0,.5],95:[.31,.12056,.02778,0,.5],97:[0,.43056,0,0,.5],98:[0,.69444,0,0,.55556],99:[0,.43056,0,0,.44445],100:[0,.69444,0,0,.55556],101:[0,.43056,0,0,.44445],102:[0,.69444,.07778,0,.30556],103:[.19444,.43056,.01389,0,.5],104:[0,.69444,0,0,.55556],105:[0,.66786,0,0,.27778],106:[.19444,.66786,0,0,.30556],107:[0,.69444,0,0,.52778],108:[0,.69444,0,0,.27778],109:[0,.43056,0,0,.83334],110:[0,.43056,0,0,.55556],111:[0,.43056,0,0,.5],112:[.19444,.43056,0,0,.55556],113:[.19444,.43056,0,0,.52778],114:[0,.43056,0,0,.39167],115:[0,.43056,0,0,.39445],116:[0,.61508,0,0,.38889],117:[0,.43056,0,0,.55556],118:[0,.43056,.01389,0,.52778],119:[0,.43056,.01389,0,.72222],120:[0,.43056,0,0,.52778],121:[.19444,.43056,.01389,0,.52778],122:[0,.43056,0,0,.44445],123:[.25,.75,0,0,.5],124:[.25,.75,0,0,.27778],125:[.25,.75,0,0,.5],126:[.35,.31786,0,0,.5],160:[0,0,0,0,.25],163:[0,.69444,0,0,.76909],167:[.19444,.69444,0,0,.44445],168:[0,.66786,0,0,.5],172:[0,.43056,0,0,.66667],176:[0,.69444,0,0,.75],177:[.08333,.58333,0,0,.77778],182:[.19444,.69444,0,0,.61111],184:[.17014,0,0,0,.44445],198:[0,.68333,0,0,.90278],215:[.08333,.58333,0,0,.77778],216:[.04861,.73194,0,0,.77778],223:[0,.69444,0,0,.5],230:[0,.43056,0,0,.72222],247:[.08333,.58333,0,0,.77778],248:[.09722,.52778,0,0,.5],305:[0,.43056,0,0,.27778],338:[0,.68333,0,0,1.01389],339:[0,.43056,0,0,.77778],567:[.19444,.43056,0,0,.30556],710:[0,.69444,0,0,.5],711:[0,.62847,0,0,.5],713:[0,.56778,0,0,.5],714:[0,.69444,0,0,.5],715:[0,.69444,0,0,.5],728:[0,.69444,0,0,.5],729:[0,.66786,0,0,.27778],730:[0,.69444,0,0,.75],732:[0,.66786,0,0,.5],733:[0,.69444,0,0,.5],915:[0,.68333,0,0,.625],916:[0,.68333,0,0,.83334],920:[0,.68333,0,0,.77778],923:[0,.68333,0,0,.69445],926:[0,.68333,0,0,.66667],928:[0,.68333,0,0,.75],931:[0,.68333,0,0,.72222],933:[0,.68333,0,0,.77778],934:[0,.68333,0,0,.72222],936:[0,.68333,0,0,.77778],937:[0,.68333,0,0,.72222],8211:[0,.43056,.02778,0,.5],8212:[0,.43056,.02778,0,1],8216:[0,.69444,0,0,.27778],8217:[0,.69444,0,0,.27778],8220:[0,.69444,0,0,.5],8221:[0,.69444,0,0,.5],8224:[.19444,.69444,0,0,.44445],8225:[.19444,.69444,0,0,.44445],8230:[0,.123,0,0,1.172],8242:[0,.55556,0,0,.275],8407:[0,.71444,.15382,0,.5],8463:[0,.68889,0,0,.54028],8465:[0,.69444,0,0,.72222],8467:[0,.69444,0,.11111,.41667],8472:[.19444,.43056,0,.11111,.63646],8476:[0,.69444,0,0,.72222],8501:[0,.69444,0,0,.61111],8592:[-.13313,.36687,0,0,1],8593:[.19444,.69444,0,0,.5],8594:[-.13313,.36687,0,0,1],8595:[.19444,.69444,0,0,.5],8596:[-.13313,.36687,0,0,1],8597:[.25,.75,0,0,.5],8598:[.19444,.69444,0,0,1],8599:[.19444,.69444,0,0,1],8600:[.19444,.69444,0,0,1],8601:[.19444,.69444,0,0,1],8614:[.011,.511,0,0,1],8617:[.011,.511,0,0,1.126],8618:[.011,.511,0,0,1.126],8636:[-.13313,.36687,0,0,1],8637:[-.13313,.36687,0,0,1],8640:[-.13313,.36687,0,0,1],8641:[-.13313,.36687,0,0,1],8652:[.011,.671,0,0,1],8656:[-.13313,.36687,0,0,1],8657:[.19444,.69444,0,0,.61111],8658:[-.13313,.36687,0,0,1],8659:[.19444,.69444,0,0,.61111],8660:[-.13313,.36687,0,0,1],8661:[.25,.75,0,0,.61111],8704:[0,.69444,0,0,.55556],8706:[0,.69444,.05556,.08334,.5309],8707:[0,.69444,0,0,.55556],8709:[.05556,.75,0,0,.5],8711:[0,.68333,0,0,.83334],8712:[.0391,.5391,0,0,.66667],8715:[.0391,.5391,0,0,.66667],8722:[.08333,.58333,0,0,.77778],8723:[.08333,.58333,0,0,.77778],8725:[.25,.75,0,0,.5],8726:[.25,.75,0,0,.5],8727:[-.03472,.46528,0,0,.5],8728:[-.05555,.44445,0,0,.5],8729:[-.05555,.44445,0,0,.5],8730:[.2,.8,0,0,.83334],8733:[0,.43056,0,0,.77778],8734:[0,.43056,0,0,1],8736:[0,.69224,0,0,.72222],8739:[.25,.75,0,0,.27778],8741:[.25,.75,0,0,.5],8743:[0,.55556,0,0,.66667],8744:[0,.55556,0,0,.66667],8745:[0,.55556,0,0,.66667],8746:[0,.55556,0,0,.66667],8747:[.19444,.69444,.11111,0,.41667],8764:[-.13313,.36687,0,0,.77778],8768:[.19444,.69444,0,0,.27778],8771:[-.03625,.46375,0,0,.77778],8773:[-.022,.589,0,0,.778],8776:[-.01688,.48312,0,0,.77778],8781:[-.03625,.46375,0,0,.77778],8784:[-.133,.673,0,0,.778],8801:[-.03625,.46375,0,0,.77778],8804:[.13597,.63597,0,0,.77778],8805:[.13597,.63597,0,0,.77778],8810:[.0391,.5391,0,0,1],8811:[.0391,.5391,0,0,1],8826:[.0391,.5391,0,0,.77778],8827:[.0391,.5391,0,0,.77778],8834:[.0391,.5391,0,0,.77778],8835:[.0391,.5391,0,0,.77778],8838:[.13597,.63597,0,0,.77778],8839:[.13597,.63597,0,0,.77778],8846:[0,.55556,0,0,.66667],8849:[.13597,.63597,0,0,.77778],8850:[.13597,.63597,0,0,.77778],8851:[0,.55556,0,0,.66667],8852:[0,.55556,0,0,.66667],8853:[.08333,.58333,0,0,.77778],8854:[.08333,.58333,0,0,.77778],8855:[.08333,.58333,0,0,.77778],8856:[.08333,.58333,0,0,.77778],8857:[.08333,.58333,0,0,.77778],8866:[0,.69444,0,0,.61111],8867:[0,.69444,0,0,.61111],8868:[0,.69444,0,0,.77778],8869:[0,.69444,0,0,.77778],8872:[.249,.75,0,0,.867],8900:[-.05555,.44445,0,0,.5],8901:[-.05555,.44445,0,0,.27778],8902:[-.03472,.46528,0,0,.5],8904:[.005,.505,0,0,.9],8942:[.03,.903,0,0,.278],8943:[-.19,.313,0,0,1.172],8945:[-.1,.823,0,0,1.282],8968:[.25,.75,0,0,.44445],8969:[.25,.75,0,0,.44445],8970:[.25,.75,0,0,.44445],8971:[.25,.75,0,0,.44445],8994:[-.14236,.35764,0,0,1],8995:[-.14236,.35764,0,0,1],9136:[.244,.744,0,0,.412],9137:[.244,.745,0,0,.412],9651:[.19444,.69444,0,0,.88889],9657:[-.03472,.46528,0,0,.5],9661:[.19444,.69444,0,0,.88889],9667:[-.03472,.46528,0,0,.5],9711:[.19444,.69444,0,0,1],9824:[.12963,.69444,0,0,.77778],9825:[.12963,.69444,0,0,.77778],9826:[.12963,.69444,0,0,.77778],9827:[.12963,.69444,0,0,.77778],9837:[0,.75,0,0,.38889],9838:[.19444,.69444,0,0,.38889],9839:[.19444,.69444,0,0,.38889],10216:[.25,.75,0,0,.38889],10217:[.25,.75,0,0,.38889],10222:[.244,.744,0,0,.412],10223:[.244,.745,0,0,.412],10229:[.011,.511,0,0,1.609],10230:[.011,.511,0,0,1.638],10231:[.011,.511,0,0,1.859],10232:[.024,.525,0,0,1.609],10233:[.024,.525,0,0,1.638],10234:[.024,.525,0,0,1.858],10236:[.011,.511,0,0,1.638],10815:[0,.68333,0,0,.75],10927:[.13597,.63597,0,0,.77778],10928:[.13597,.63597,0,0,.77778],57376:[.19444,.69444,0,0,0]},"Math-BoldItalic":{32:[0,0,0,0,.25],48:[0,.44444,0,0,.575],49:[0,.44444,0,0,.575],50:[0,.44444,0,0,.575],51:[.19444,.44444,0,0,.575],52:[.19444,.44444,0,0,.575],53:[.19444,.44444,0,0,.575],54:[0,.64444,0,0,.575],55:[.19444,.44444,0,0,.575],56:[0,.64444,0,0,.575],57:[.19444,.44444,0,0,.575],65:[0,.68611,0,0,.86944],66:[0,.68611,.04835,0,.8664],67:[0,.68611,.06979,0,.81694],68:[0,.68611,.03194,0,.93812],69:[0,.68611,.05451,0,.81007],70:[0,.68611,.15972,0,.68889],71:[0,.68611,0,0,.88673],72:[0,.68611,.08229,0,.98229],73:[0,.68611,.07778,0,.51111],74:[0,.68611,.10069,0,.63125],75:[0,.68611,.06979,0,.97118],76:[0,.68611,0,0,.75555],77:[0,.68611,.11424,0,1.14201],78:[0,.68611,.11424,0,.95034],79:[0,.68611,.03194,0,.83666],80:[0,.68611,.15972,0,.72309],81:[.19444,.68611,0,0,.86861],82:[0,.68611,.00421,0,.87235],83:[0,.68611,.05382,0,.69271],84:[0,.68611,.15972,0,.63663],85:[0,.68611,.11424,0,.80027],86:[0,.68611,.25555,0,.67778],87:[0,.68611,.15972,0,1.09305],88:[0,.68611,.07778,0,.94722],89:[0,.68611,.25555,0,.67458],90:[0,.68611,.06979,0,.77257],97:[0,.44444,0,0,.63287],98:[0,.69444,0,0,.52083],99:[0,.44444,0,0,.51342],100:[0,.69444,0,0,.60972],101:[0,.44444,0,0,.55361],102:[.19444,.69444,.11042,0,.56806],103:[.19444,.44444,.03704,0,.5449],104:[0,.69444,0,0,.66759],105:[0,.69326,0,0,.4048],106:[.19444,.69326,.0622,0,.47083],107:[0,.69444,.01852,0,.6037],108:[0,.69444,.0088,0,.34815],109:[0,.44444,0,0,1.0324],110:[0,.44444,0,0,.71296],111:[0,.44444,0,0,.58472],112:[.19444,.44444,0,0,.60092],113:[.19444,.44444,.03704,0,.54213],114:[0,.44444,.03194,0,.5287],115:[0,.44444,0,0,.53125],116:[0,.63492,0,0,.41528],117:[0,.44444,0,0,.68102],118:[0,.44444,.03704,0,.56666],119:[0,.44444,.02778,0,.83148],120:[0,.44444,0,0,.65903],121:[.19444,.44444,.03704,0,.59028],122:[0,.44444,.04213,0,.55509],160:[0,0,0,0,.25],915:[0,.68611,.15972,0,.65694],916:[0,.68611,0,0,.95833],920:[0,.68611,.03194,0,.86722],923:[0,.68611,0,0,.80555],926:[0,.68611,.07458,0,.84125],928:[0,.68611,.08229,0,.98229],931:[0,.68611,.05451,0,.88507],933:[0,.68611,.15972,0,.67083],934:[0,.68611,0,0,.76666],936:[0,.68611,.11653,0,.71402],937:[0,.68611,.04835,0,.8789],945:[0,.44444,0,0,.76064],946:[.19444,.69444,.03403,0,.65972],947:[.19444,.44444,.06389,0,.59003],948:[0,.69444,.03819,0,.52222],949:[0,.44444,0,0,.52882],950:[.19444,.69444,.06215,0,.50833],951:[.19444,.44444,.03704,0,.6],952:[0,.69444,.03194,0,.5618],953:[0,.44444,0,0,.41204],954:[0,.44444,0,0,.66759],955:[0,.69444,0,0,.67083],956:[.19444,.44444,0,0,.70787],957:[0,.44444,.06898,0,.57685],958:[.19444,.69444,.03021,0,.50833],959:[0,.44444,0,0,.58472],960:[0,.44444,.03704,0,.68241],961:[.19444,.44444,0,0,.6118],962:[.09722,.44444,.07917,0,.42361],963:[0,.44444,.03704,0,.68588],964:[0,.44444,.13472,0,.52083],965:[0,.44444,.03704,0,.63055],966:[.19444,.44444,0,0,.74722],967:[.19444,.44444,0,0,.71805],968:[.19444,.69444,.03704,0,.75833],969:[0,.44444,.03704,0,.71782],977:[0,.69444,0,0,.69155],981:[.19444,.69444,0,0,.7125],982:[0,.44444,.03194,0,.975],1009:[.19444,.44444,0,0,.6118],1013:[0,.44444,0,0,.48333],57649:[0,.44444,0,0,.39352],57911:[.19444,.44444,0,0,.43889]},"Math-Italic":{32:[0,0,0,0,.25],48:[0,.43056,0,0,.5],49:[0,.43056,0,0,.5],50:[0,.43056,0,0,.5],51:[.19444,.43056,0,0,.5],52:[.19444,.43056,0,0,.5],53:[.19444,.43056,0,0,.5],54:[0,.64444,0,0,.5],55:[.19444,.43056,0,0,.5],56:[0,.64444,0,0,.5],57:[.19444,.43056,0,0,.5],65:[0,.68333,0,.13889,.75],66:[0,.68333,.05017,.08334,.75851],67:[0,.68333,.07153,.08334,.71472],68:[0,.68333,.02778,.05556,.82792],69:[0,.68333,.05764,.08334,.7382],70:[0,.68333,.13889,.08334,.64306],71:[0,.68333,0,.08334,.78625],72:[0,.68333,.08125,.05556,.83125],73:[0,.68333,.07847,.11111,.43958],74:[0,.68333,.09618,.16667,.55451],75:[0,.68333,.07153,.05556,.84931],76:[0,.68333,0,.02778,.68056],77:[0,.68333,.10903,.08334,.97014],78:[0,.68333,.10903,.08334,.80347],79:[0,.68333,.02778,.08334,.76278],80:[0,.68333,.13889,.08334,.64201],81:[.19444,.68333,0,.08334,.79056],82:[0,.68333,.00773,.08334,.75929],83:[0,.68333,.05764,.08334,.6132],84:[0,.68333,.13889,.08334,.58438],85:[0,.68333,.10903,.02778,.68278],86:[0,.68333,.22222,0,.58333],87:[0,.68333,.13889,0,.94445],88:[0,.68333,.07847,.08334,.82847],89:[0,.68333,.22222,0,.58056],90:[0,.68333,.07153,.08334,.68264],97:[0,.43056,0,0,.52859],98:[0,.69444,0,0,.42917],99:[0,.43056,0,.05556,.43276],100:[0,.69444,0,.16667,.52049],101:[0,.43056,0,.05556,.46563],102:[.19444,.69444,.10764,.16667,.48959],103:[.19444,.43056,.03588,.02778,.47697],104:[0,.69444,0,0,.57616],105:[0,.65952,0,0,.34451],106:[.19444,.65952,.05724,0,.41181],107:[0,.69444,.03148,0,.5206],108:[0,.69444,.01968,.08334,.29838],109:[0,.43056,0,0,.87801],110:[0,.43056,0,0,.60023],111:[0,.43056,0,.05556,.48472],112:[.19444,.43056,0,.08334,.50313],113:[.19444,.43056,.03588,.08334,.44641],114:[0,.43056,.02778,.05556,.45116],115:[0,.43056,0,.05556,.46875],116:[0,.61508,0,.08334,.36111],117:[0,.43056,0,.02778,.57246],118:[0,.43056,.03588,.02778,.48472],119:[0,.43056,.02691,.08334,.71592],120:[0,.43056,0,.02778,.57153],121:[.19444,.43056,.03588,.05556,.49028],122:[0,.43056,.04398,.05556,.46505],160:[0,0,0,0,.25],915:[0,.68333,.13889,.08334,.61528],916:[0,.68333,0,.16667,.83334],920:[0,.68333,.02778,.08334,.76278],923:[0,.68333,0,.16667,.69445],926:[0,.68333,.07569,.08334,.74236],928:[0,.68333,.08125,.05556,.83125],931:[0,.68333,.05764,.08334,.77986],933:[0,.68333,.13889,.05556,.58333],934:[0,.68333,0,.08334,.66667],936:[0,.68333,.11,.05556,.61222],937:[0,.68333,.05017,.08334,.7724],945:[0,.43056,.0037,.02778,.6397],946:[.19444,.69444,.05278,.08334,.56563],947:[.19444,.43056,.05556,0,.51773],948:[0,.69444,.03785,.05556,.44444],949:[0,.43056,0,.08334,.46632],950:[.19444,.69444,.07378,.08334,.4375],951:[.19444,.43056,.03588,.05556,.49653],952:[0,.69444,.02778,.08334,.46944],953:[0,.43056,0,.05556,.35394],954:[0,.43056,0,0,.57616],955:[0,.69444,0,0,.58334],956:[.19444,.43056,0,.02778,.60255],957:[0,.43056,.06366,.02778,.49398],958:[.19444,.69444,.04601,.11111,.4375],959:[0,.43056,0,.05556,.48472],960:[0,.43056,.03588,0,.57003],961:[.19444,.43056,0,.08334,.51702],962:[.09722,.43056,.07986,.08334,.36285],963:[0,.43056,.03588,0,.57141],964:[0,.43056,.1132,.02778,.43715],965:[0,.43056,.03588,.02778,.54028],966:[.19444,.43056,0,.08334,.65417],967:[.19444,.43056,0,.05556,.62569],968:[.19444,.69444,.03588,.11111,.65139],969:[0,.43056,.03588,0,.62245],977:[0,.69444,0,.08334,.59144],981:[.19444,.69444,0,.08334,.59583],982:[0,.43056,.02778,0,.82813],1009:[.19444,.43056,0,.08334,.51702],1013:[0,.43056,0,.05556,.4059],57649:[0,.43056,0,.02778,.32246],57911:[.19444,.43056,0,.08334,.38403]},"SansSerif-Bold":{32:[0,0,0,0,.25],33:[0,.69444,0,0,.36667],34:[0,.69444,0,0,.55834],35:[.19444,.69444,0,0,.91667],36:[.05556,.75,0,0,.55],37:[.05556,.75,0,0,1.02912],38:[0,.69444,0,0,.83056],39:[0,.69444,0,0,.30556],40:[.25,.75,0,0,.42778],41:[.25,.75,0,0,.42778],42:[0,.75,0,0,.55],43:[.11667,.61667,0,0,.85556],44:[.10556,.13056,0,0,.30556],45:[0,.45833,0,0,.36667],46:[0,.13056,0,0,.30556],47:[.25,.75,0,0,.55],48:[0,.69444,0,0,.55],49:[0,.69444,0,0,.55],50:[0,.69444,0,0,.55],51:[0,.69444,0,0,.55],52:[0,.69444,0,0,.55],53:[0,.69444,0,0,.55],54:[0,.69444,0,0,.55],55:[0,.69444,0,0,.55],56:[0,.69444,0,0,.55],57:[0,.69444,0,0,.55],58:[0,.45833,0,0,.30556],59:[.10556,.45833,0,0,.30556],61:[-.09375,.40625,0,0,.85556],63:[0,.69444,0,0,.51945],64:[0,.69444,0,0,.73334],65:[0,.69444,0,0,.73334],66:[0,.69444,0,0,.73334],67:[0,.69444,0,0,.70278],68:[0,.69444,0,0,.79445],69:[0,.69444,0,0,.64167],70:[0,.69444,0,0,.61111],71:[0,.69444,0,0,.73334],72:[0,.69444,0,0,.79445],73:[0,.69444,0,0,.33056],74:[0,.69444,0,0,.51945],75:[0,.69444,0,0,.76389],76:[0,.69444,0,0,.58056],77:[0,.69444,0,0,.97778],78:[0,.69444,0,0,.79445],79:[0,.69444,0,0,.79445],80:[0,.69444,0,0,.70278],81:[.10556,.69444,0,0,.79445],82:[0,.69444,0,0,.70278],83:[0,.69444,0,0,.61111],84:[0,.69444,0,0,.73334],85:[0,.69444,0,0,.76389],86:[0,.69444,.01528,0,.73334],87:[0,.69444,.01528,0,1.03889],88:[0,.69444,0,0,.73334],89:[0,.69444,.0275,0,.73334],90:[0,.69444,0,0,.67223],91:[.25,.75,0,0,.34306],93:[.25,.75,0,0,.34306],94:[0,.69444,0,0,.55],95:[.35,.10833,.03056,0,.55],97:[0,.45833,0,0,.525],98:[0,.69444,0,0,.56111],99:[0,.45833,0,0,.48889],100:[0,.69444,0,0,.56111],101:[0,.45833,0,0,.51111],102:[0,.69444,.07639,0,.33611],103:[.19444,.45833,.01528,0,.55],104:[0,.69444,0,0,.56111],105:[0,.69444,0,0,.25556],106:[.19444,.69444,0,0,.28611],107:[0,.69444,0,0,.53056],108:[0,.69444,0,0,.25556],109:[0,.45833,0,0,.86667],110:[0,.45833,0,0,.56111],111:[0,.45833,0,0,.55],112:[.19444,.45833,0,0,.56111],113:[.19444,.45833,0,0,.56111],114:[0,.45833,.01528,0,.37222],115:[0,.45833,0,0,.42167],116:[0,.58929,0,0,.40417],117:[0,.45833,0,0,.56111],118:[0,.45833,.01528,0,.5],119:[0,.45833,.01528,0,.74445],120:[0,.45833,0,0,.5],121:[.19444,.45833,.01528,0,.5],122:[0,.45833,0,0,.47639],126:[.35,.34444,0,0,.55],160:[0,0,0,0,.25],168:[0,.69444,0,0,.55],176:[0,.69444,0,0,.73334],180:[0,.69444,0,0,.55],184:[.17014,0,0,0,.48889],305:[0,.45833,0,0,.25556],567:[.19444,.45833,0,0,.28611],710:[0,.69444,0,0,.55],711:[0,.63542,0,0,.55],713:[0,.63778,0,0,.55],728:[0,.69444,0,0,.55],729:[0,.69444,0,0,.30556],730:[0,.69444,0,0,.73334],732:[0,.69444,0,0,.55],733:[0,.69444,0,0,.55],915:[0,.69444,0,0,.58056],916:[0,.69444,0,0,.91667],920:[0,.69444,0,0,.85556],923:[0,.69444,0,0,.67223],926:[0,.69444,0,0,.73334],928:[0,.69444,0,0,.79445],931:[0,.69444,0,0,.79445],933:[0,.69444,0,0,.85556],934:[0,.69444,0,0,.79445],936:[0,.69444,0,0,.85556],937:[0,.69444,0,0,.79445],8211:[0,.45833,.03056,0,.55],8212:[0,.45833,.03056,0,1.10001],8216:[0,.69444,0,0,.30556],8217:[0,.69444,0,0,.30556],8220:[0,.69444,0,0,.55834],8221:[0,.69444,0,0,.55834]},"SansSerif-Italic":{32:[0,0,0,0,.25],33:[0,.69444,.05733,0,.31945],34:[0,.69444,.00316,0,.5],35:[.19444,.69444,.05087,0,.83334],36:[.05556,.75,.11156,0,.5],37:[.05556,.75,.03126,0,.83334],38:[0,.69444,.03058,0,.75834],39:[0,.69444,.07816,0,.27778],40:[.25,.75,.13164,0,.38889],41:[.25,.75,.02536,0,.38889],42:[0,.75,.11775,0,.5],43:[.08333,.58333,.02536,0,.77778],44:[.125,.08333,0,0,.27778],45:[0,.44444,.01946,0,.33333],46:[0,.08333,0,0,.27778],47:[.25,.75,.13164,0,.5],48:[0,.65556,.11156,0,.5],49:[0,.65556,.11156,0,.5],50:[0,.65556,.11156,0,.5],51:[0,.65556,.11156,0,.5],52:[0,.65556,.11156,0,.5],53:[0,.65556,.11156,0,.5],54:[0,.65556,.11156,0,.5],55:[0,.65556,.11156,0,.5],56:[0,.65556,.11156,0,.5],57:[0,.65556,.11156,0,.5],58:[0,.44444,.02502,0,.27778],59:[.125,.44444,.02502,0,.27778],61:[-.13,.37,.05087,0,.77778],63:[0,.69444,.11809,0,.47222],64:[0,.69444,.07555,0,.66667],65:[0,.69444,0,0,.66667],66:[0,.69444,.08293,0,.66667],67:[0,.69444,.11983,0,.63889],68:[0,.69444,.07555,0,.72223],69:[0,.69444,.11983,0,.59722],70:[0,.69444,.13372,0,.56945],71:[0,.69444,.11983,0,.66667],72:[0,.69444,.08094,0,.70834],73:[0,.69444,.13372,0,.27778],74:[0,.69444,.08094,0,.47222],75:[0,.69444,.11983,0,.69445],76:[0,.69444,0,0,.54167],77:[0,.69444,.08094,0,.875],78:[0,.69444,.08094,0,.70834],79:[0,.69444,.07555,0,.73611],80:[0,.69444,.08293,0,.63889],81:[.125,.69444,.07555,0,.73611],82:[0,.69444,.08293,0,.64584],83:[0,.69444,.09205,0,.55556],84:[0,.69444,.13372,0,.68056],85:[0,.69444,.08094,0,.6875],86:[0,.69444,.1615,0,.66667],87:[0,.69444,.1615,0,.94445],88:[0,.69444,.13372,0,.66667],89:[0,.69444,.17261,0,.66667],90:[0,.69444,.11983,0,.61111],91:[.25,.75,.15942,0,.28889],93:[.25,.75,.08719,0,.28889],94:[0,.69444,.0799,0,.5],95:[.35,.09444,.08616,0,.5],97:[0,.44444,.00981,0,.48056],98:[0,.69444,.03057,0,.51667],99:[0,.44444,.08336,0,.44445],100:[0,.69444,.09483,0,.51667],101:[0,.44444,.06778,0,.44445],102:[0,.69444,.21705,0,.30556],103:[.19444,.44444,.10836,0,.5],104:[0,.69444,.01778,0,.51667],105:[0,.67937,.09718,0,.23889],106:[.19444,.67937,.09162,0,.26667],107:[0,.69444,.08336,0,.48889],108:[0,.69444,.09483,0,.23889],109:[0,.44444,.01778,0,.79445],110:[0,.44444,.01778,0,.51667],111:[0,.44444,.06613,0,.5],112:[.19444,.44444,.0389,0,.51667],113:[.19444,.44444,.04169,0,.51667],114:[0,.44444,.10836,0,.34167],115:[0,.44444,.0778,0,.38333],116:[0,.57143,.07225,0,.36111],117:[0,.44444,.04169,0,.51667],118:[0,.44444,.10836,0,.46111],119:[0,.44444,.10836,0,.68334],120:[0,.44444,.09169,0,.46111],121:[.19444,.44444,.10836,0,.46111],122:[0,.44444,.08752,0,.43472],126:[.35,.32659,.08826,0,.5],160:[0,0,0,0,.25],168:[0,.67937,.06385,0,.5],176:[0,.69444,0,0,.73752],184:[.17014,0,0,0,.44445],305:[0,.44444,.04169,0,.23889],567:[.19444,.44444,.04169,0,.26667],710:[0,.69444,.0799,0,.5],711:[0,.63194,.08432,0,.5],713:[0,.60889,.08776,0,.5],714:[0,.69444,.09205,0,.5],715:[0,.69444,0,0,.5],728:[0,.69444,.09483,0,.5],729:[0,.67937,.07774,0,.27778],730:[0,.69444,0,0,.73752],732:[0,.67659,.08826,0,.5],733:[0,.69444,.09205,0,.5],915:[0,.69444,.13372,0,.54167],916:[0,.69444,0,0,.83334],920:[0,.69444,.07555,0,.77778],923:[0,.69444,0,0,.61111],926:[0,.69444,.12816,0,.66667],928:[0,.69444,.08094,0,.70834],931:[0,.69444,.11983,0,.72222],933:[0,.69444,.09031,0,.77778],934:[0,.69444,.04603,0,.72222],936:[0,.69444,.09031,0,.77778],937:[0,.69444,.08293,0,.72222],8211:[0,.44444,.08616,0,.5],8212:[0,.44444,.08616,0,1],8216:[0,.69444,.07816,0,.27778],8217:[0,.69444,.07816,0,.27778],8220:[0,.69444,.14205,0,.5],8221:[0,.69444,.00316,0,.5]},"SansSerif-Regular":{32:[0,0,0,0,.25],33:[0,.69444,0,0,.31945],34:[0,.69444,0,0,.5],35:[.19444,.69444,0,0,.83334],36:[.05556,.75,0,0,.5],37:[.05556,.75,0,0,.83334],38:[0,.69444,0,0,.75834],39:[0,.69444,0,0,.27778],40:[.25,.75,0,0,.38889],41:[.25,.75,0,0,.38889],42:[0,.75,0,0,.5],43:[.08333,.58333,0,0,.77778],44:[.125,.08333,0,0,.27778],45:[0,.44444,0,0,.33333],46:[0,.08333,0,0,.27778],47:[.25,.75,0,0,.5],48:[0,.65556,0,0,.5],49:[0,.65556,0,0,.5],50:[0,.65556,0,0,.5],51:[0,.65556,0,0,.5],52:[0,.65556,0,0,.5],53:[0,.65556,0,0,.5],54:[0,.65556,0,0,.5],55:[0,.65556,0,0,.5],56:[0,.65556,0,0,.5],57:[0,.65556,0,0,.5],58:[0,.44444,0,0,.27778],59:[.125,.44444,0,0,.27778],61:[-.13,.37,0,0,.77778],63:[0,.69444,0,0,.47222],64:[0,.69444,0,0,.66667],65:[0,.69444,0,0,.66667],66:[0,.69444,0,0,.66667],67:[0,.69444,0,0,.63889],68:[0,.69444,0,0,.72223],69:[0,.69444,0,0,.59722],70:[0,.69444,0,0,.56945],71:[0,.69444,0,0,.66667],72:[0,.69444,0,0,.70834],73:[0,.69444,0,0,.27778],74:[0,.69444,0,0,.47222],75:[0,.69444,0,0,.69445],76:[0,.69444,0,0,.54167],77:[0,.69444,0,0,.875],78:[0,.69444,0,0,.70834],79:[0,.69444,0,0,.73611],80:[0,.69444,0,0,.63889],81:[.125,.69444,0,0,.73611],82:[0,.69444,0,0,.64584],83:[0,.69444,0,0,.55556],84:[0,.69444,0,0,.68056],85:[0,.69444,0,0,.6875],86:[0,.69444,.01389,0,.66667],87:[0,.69444,.01389,0,.94445],88:[0,.69444,0,0,.66667],89:[0,.69444,.025,0,.66667],90:[0,.69444,0,0,.61111],91:[.25,.75,0,0,.28889],93:[.25,.75,0,0,.28889],94:[0,.69444,0,0,.5],95:[.35,.09444,.02778,0,.5],97:[0,.44444,0,0,.48056],98:[0,.69444,0,0,.51667],99:[0,.44444,0,0,.44445],100:[0,.69444,0,0,.51667],101:[0,.44444,0,0,.44445],102:[0,.69444,.06944,0,.30556],103:[.19444,.44444,.01389,0,.5],104:[0,.69444,0,0,.51667],105:[0,.67937,0,0,.23889],106:[.19444,.67937,0,0,.26667],107:[0,.69444,0,0,.48889],108:[0,.69444,0,0,.23889],109:[0,.44444,0,0,.79445],110:[0,.44444,0,0,.51667],111:[0,.44444,0,0,.5],112:[.19444,.44444,0,0,.51667],113:[.19444,.44444,0,0,.51667],114:[0,.44444,.01389,0,.34167],115:[0,.44444,0,0,.38333],116:[0,.57143,0,0,.36111],117:[0,.44444,0,0,.51667],118:[0,.44444,.01389,0,.46111],119:[0,.44444,.01389,0,.68334],120:[0,.44444,0,0,.46111],121:[.19444,.44444,.01389,0,.46111],122:[0,.44444,0,0,.43472],126:[.35,.32659,0,0,.5],160:[0,0,0,0,.25],168:[0,.67937,0,0,.5],176:[0,.69444,0,0,.66667],184:[.17014,0,0,0,.44445],305:[0,.44444,0,0,.23889],567:[.19444,.44444,0,0,.26667],710:[0,.69444,0,0,.5],711:[0,.63194,0,0,.5],713:[0,.60889,0,0,.5],714:[0,.69444,0,0,.5],715:[0,.69444,0,0,.5],728:[0,.69444,0,0,.5],729:[0,.67937,0,0,.27778],730:[0,.69444,0,0,.66667],732:[0,.67659,0,0,.5],733:[0,.69444,0,0,.5],915:[0,.69444,0,0,.54167],916:[0,.69444,0,0,.83334],920:[0,.69444,0,0,.77778],923:[0,.69444,0,0,.61111],926:[0,.69444,0,0,.66667],928:[0,.69444,0,0,.70834],931:[0,.69444,0,0,.72222],933:[0,.69444,0,0,.77778],934:[0,.69444,0,0,.72222],936:[0,.69444,0,0,.77778],937:[0,.69444,0,0,.72222],8211:[0,.44444,.02778,0,.5],8212:[0,.44444,.02778,0,1],8216:[0,.69444,0,0,.27778],8217:[0,.69444,0,0,.27778],8220:[0,.69444,0,0,.5],8221:[0,.69444,0,0,.5]},"Script-Regular":{32:[0,0,0,0,.25],65:[0,.7,.22925,0,.80253],66:[0,.7,.04087,0,.90757],67:[0,.7,.1689,0,.66619],68:[0,.7,.09371,0,.77443],69:[0,.7,.18583,0,.56162],70:[0,.7,.13634,0,.89544],71:[0,.7,.17322,0,.60961],72:[0,.7,.29694,0,.96919],73:[0,.7,.19189,0,.80907],74:[.27778,.7,.19189,0,1.05159],75:[0,.7,.31259,0,.91364],76:[0,.7,.19189,0,.87373],77:[0,.7,.15981,0,1.08031],78:[0,.7,.3525,0,.9015],79:[0,.7,.08078,0,.73787],80:[0,.7,.08078,0,1.01262],81:[0,.7,.03305,0,.88282],82:[0,.7,.06259,0,.85],83:[0,.7,.19189,0,.86767],84:[0,.7,.29087,0,.74697],85:[0,.7,.25815,0,.79996],86:[0,.7,.27523,0,.62204],87:[0,.7,.27523,0,.80532],88:[0,.7,.26006,0,.94445],89:[0,.7,.2939,0,.70961],90:[0,.7,.24037,0,.8212],160:[0,0,0,0,.25]},"Size1-Regular":{32:[0,0,0,0,.25],40:[.35001,.85,0,0,.45834],41:[.35001,.85,0,0,.45834],47:[.35001,.85,0,0,.57778],91:[.35001,.85,0,0,.41667],92:[.35001,.85,0,0,.57778],93:[.35001,.85,0,0,.41667],123:[.35001,.85,0,0,.58334],125:[.35001,.85,0,0,.58334],160:[0,0,0,0,.25],710:[0,.72222,0,0,.55556],732:[0,.72222,0,0,.55556],770:[0,.72222,0,0,.55556],771:[0,.72222,0,0,.55556],8214:[-99e-5,.601,0,0,.77778],8593:[1e-5,.6,0,0,.66667],8595:[1e-5,.6,0,0,.66667],8657:[1e-5,.6,0,0,.77778],8659:[1e-5,.6,0,0,.77778],8719:[.25001,.75,0,0,.94445],8720:[.25001,.75,0,0,.94445],8721:[.25001,.75,0,0,1.05556],8730:[.35001,.85,0,0,1],8739:[-.00599,.606,0,0,.33333],8741:[-.00599,.606,0,0,.55556],8747:[.30612,.805,.19445,0,.47222],8748:[.306,.805,.19445,0,.47222],8749:[.306,.805,.19445,0,.47222],8750:[.30612,.805,.19445,0,.47222],8896:[.25001,.75,0,0,.83334],8897:[.25001,.75,0,0,.83334],8898:[.25001,.75,0,0,.83334],8899:[.25001,.75,0,0,.83334],8968:[.35001,.85,0,0,.47222],8969:[.35001,.85,0,0,.47222],8970:[.35001,.85,0,0,.47222],8971:[.35001,.85,0,0,.47222],9168:[-99e-5,.601,0,0,.66667],10216:[.35001,.85,0,0,.47222],10217:[.35001,.85,0,0,.47222],10752:[.25001,.75,0,0,1.11111],10753:[.25001,.75,0,0,1.11111],10754:[.25001,.75,0,0,1.11111],10756:[.25001,.75,0,0,.83334],10758:[.25001,.75,0,0,.83334]},"Size2-Regular":{32:[0,0,0,0,.25],40:[.65002,1.15,0,0,.59722],41:[.65002,1.15,0,0,.59722],47:[.65002,1.15,0,0,.81111],91:[.65002,1.15,0,0,.47222],92:[.65002,1.15,0,0,.81111],93:[.65002,1.15,0,0,.47222],123:[.65002,1.15,0,0,.66667],125:[.65002,1.15,0,0,.66667],160:[0,0,0,0,.25],710:[0,.75,0,0,1],732:[0,.75,0,0,1],770:[0,.75,0,0,1],771:[0,.75,0,0,1],8719:[.55001,1.05,0,0,1.27778],8720:[.55001,1.05,0,0,1.27778],8721:[.55001,1.05,0,0,1.44445],8730:[.65002,1.15,0,0,1],8747:[.86225,1.36,.44445,0,.55556],8748:[.862,1.36,.44445,0,.55556],8749:[.862,1.36,.44445,0,.55556],8750:[.86225,1.36,.44445,0,.55556],8896:[.55001,1.05,0,0,1.11111],8897:[.55001,1.05,0,0,1.11111],8898:[.55001,1.05,0,0,1.11111],8899:[.55001,1.05,0,0,1.11111],8968:[.65002,1.15,0,0,.52778],8969:[.65002,1.15,0,0,.52778],8970:[.65002,1.15,0,0,.52778],8971:[.65002,1.15,0,0,.52778],10216:[.65002,1.15,0,0,.61111],10217:[.65002,1.15,0,0,.61111],10752:[.55001,1.05,0,0,1.51112],10753:[.55001,1.05,0,0,1.51112],10754:[.55001,1.05,0,0,1.51112],10756:[.55001,1.05,0,0,1.11111],10758:[.55001,1.05,0,0,1.11111]},"Size3-Regular":{32:[0,0,0,0,.25],40:[.95003,1.45,0,0,.73611],41:[.95003,1.45,0,0,.73611],47:[.95003,1.45,0,0,1.04445],91:[.95003,1.45,0,0,.52778],92:[.95003,1.45,0,0,1.04445],93:[.95003,1.45,0,0,.52778],123:[.95003,1.45,0,0,.75],125:[.95003,1.45,0,0,.75],160:[0,0,0,0,.25],710:[0,.75,0,0,1.44445],732:[0,.75,0,0,1.44445],770:[0,.75,0,0,1.44445],771:[0,.75,0,0,1.44445],8730:[.95003,1.45,0,0,1],8968:[.95003,1.45,0,0,.58334],8969:[.95003,1.45,0,0,.58334],8970:[.95003,1.45,0,0,.58334],8971:[.95003,1.45,0,0,.58334],10216:[.95003,1.45,0,0,.75],10217:[.95003,1.45,0,0,.75]},"Size4-Regular":{32:[0,0,0,0,.25],40:[1.25003,1.75,0,0,.79167],41:[1.25003,1.75,0,0,.79167],47:[1.25003,1.75,0,0,1.27778],91:[1.25003,1.75,0,0,.58334],92:[1.25003,1.75,0,0,1.27778],93:[1.25003,1.75,0,0,.58334],123:[1.25003,1.75,0,0,.80556],125:[1.25003,1.75,0,0,.80556],160:[0,0,0,0,.25],710:[0,.825,0,0,1.8889],732:[0,.825,0,0,1.8889],770:[0,.825,0,0,1.8889],771:[0,.825,0,0,1.8889],8730:[1.25003,1.75,0,0,1],8968:[1.25003,1.75,0,0,.63889],8969:[1.25003,1.75,0,0,.63889],8970:[1.25003,1.75,0,0,.63889],8971:[1.25003,1.75,0,0,.63889],9115:[.64502,1.155,0,0,.875],9116:[1e-5,.6,0,0,.875],9117:[.64502,1.155,0,0,.875],9118:[.64502,1.155,0,0,.875],9119:[1e-5,.6,0,0,.875],9120:[.64502,1.155,0,0,.875],9121:[.64502,1.155,0,0,.66667],9122:[-99e-5,.601,0,0,.66667],9123:[.64502,1.155,0,0,.66667],9124:[.64502,1.155,0,0,.66667],9125:[-99e-5,.601,0,0,.66667],9126:[.64502,1.155,0,0,.66667],9127:[1e-5,.9,0,0,.88889],9128:[.65002,1.15,0,0,.88889],9129:[.90001,0,0,0,.88889],9130:[0,.3,0,0,.88889],9131:[1e-5,.9,0,0,.88889],9132:[.65002,1.15,0,0,.88889],9133:[.90001,0,0,0,.88889],9143:[.88502,.915,0,0,1.05556],10216:[1.25003,1.75,0,0,.80556],10217:[1.25003,1.75,0,0,.80556],57344:[-.00499,.605,0,0,1.05556],57345:[-.00499,.605,0,0,1.05556],57680:[0,.12,0,0,.45],57681:[0,.12,0,0,.45],57682:[0,.12,0,0,.45],57683:[0,.12,0,0,.45]},"Typewriter-Regular":{32:[0,0,0,0,.525],33:[0,.61111,0,0,.525],34:[0,.61111,0,0,.525],35:[0,.61111,0,0,.525],36:[.08333,.69444,0,0,.525],37:[.08333,.69444,0,0,.525],38:[0,.61111,0,0,.525],39:[0,.61111,0,0,.525],40:[.08333,.69444,0,0,.525],41:[.08333,.69444,0,0,.525],42:[0,.52083,0,0,.525],43:[-.08056,.53055,0,0,.525],44:[.13889,.125,0,0,.525],45:[-.08056,.53055,0,0,.525],46:[0,.125,0,0,.525],47:[.08333,.69444,0,0,.525],48:[0,.61111,0,0,.525],49:[0,.61111,0,0,.525],50:[0,.61111,0,0,.525],51:[0,.61111,0,0,.525],52:[0,.61111,0,0,.525],53:[0,.61111,0,0,.525],54:[0,.61111,0,0,.525],55:[0,.61111,0,0,.525],56:[0,.61111,0,0,.525],57:[0,.61111,0,0,.525],58:[0,.43056,0,0,.525],59:[.13889,.43056,0,0,.525],60:[-.05556,.55556,0,0,.525],61:[-.19549,.41562,0,0,.525],62:[-.05556,.55556,0,0,.525],63:[0,.61111,0,0,.525],64:[0,.61111,0,0,.525],65:[0,.61111,0,0,.525],66:[0,.61111,0,0,.525],67:[0,.61111,0,0,.525],68:[0,.61111,0,0,.525],69:[0,.61111,0,0,.525],70:[0,.61111,0,0,.525],71:[0,.61111,0,0,.525],72:[0,.61111,0,0,.525],73:[0,.61111,0,0,.525],74:[0,.61111,0,0,.525],75:[0,.61111,0,0,.525],76:[0,.61111,0,0,.525],77:[0,.61111,0,0,.525],78:[0,.61111,0,0,.525],79:[0,.61111,0,0,.525],80:[0,.61111,0,0,.525],81:[.13889,.61111,0,0,.525],82:[0,.61111,0,0,.525],83:[0,.61111,0,0,.525],84:[0,.61111,0,0,.525],85:[0,.61111,0,0,.525],86:[0,.61111,0,0,.525],87:[0,.61111,0,0,.525],88:[0,.61111,0,0,.525],89:[0,.61111,0,0,.525],90:[0,.61111,0,0,.525],91:[.08333,.69444,0,0,.525],92:[.08333,.69444,0,0,.525],93:[.08333,.69444,0,0,.525],94:[0,.61111,0,0,.525],95:[.09514,0,0,0,.525],96:[0,.61111,0,0,.525],97:[0,.43056,0,0,.525],98:[0,.61111,0,0,.525],99:[0,.43056,0,0,.525],100:[0,.61111,0,0,.525],101:[0,.43056,0,0,.525],102:[0,.61111,0,0,.525],103:[.22222,.43056,0,0,.525],104:[0,.61111,0,0,.525],105:[0,.61111,0,0,.525],106:[.22222,.61111,0,0,.525],107:[0,.61111,0,0,.525],108:[0,.61111,0,0,.525],109:[0,.43056,0,0,.525],110:[0,.43056,0,0,.525],111:[0,.43056,0,0,.525],112:[.22222,.43056,0,0,.525],113:[.22222,.43056,0,0,.525],114:[0,.43056,0,0,.525],115:[0,.43056,0,0,.525],116:[0,.55358,0,0,.525],117:[0,.43056,0,0,.525],118:[0,.43056,0,0,.525],119:[0,.43056,0,0,.525],120:[0,.43056,0,0,.525],121:[.22222,.43056,0,0,.525],122:[0,.43056,0,0,.525],123:[.08333,.69444,0,0,.525],124:[.08333,.69444,0,0,.525],125:[.08333,.69444,0,0,.525],126:[0,.61111,0,0,.525],127:[0,.61111,0,0,.525],160:[0,0,0,0,.525],176:[0,.61111,0,0,.525],184:[.19445,0,0,0,.525],305:[0,.43056,0,0,.525],567:[.22222,.43056,0,0,.525],711:[0,.56597,0,0,.525],713:[0,.56555,0,0,.525],714:[0,.61111,0,0,.525],715:[0,.61111,0,0,.525],728:[0,.61111,0,0,.525],730:[0,.61111,0,0,.525],770:[0,.61111,0,0,.525],771:[0,.61111,0,0,.525],776:[0,.61111,0,0,.525],915:[0,.61111,0,0,.525],916:[0,.61111,0,0,.525],920:[0,.61111,0,0,.525],923:[0,.61111,0,0,.525],926:[0,.61111,0,0,.525],928:[0,.61111,0,0,.525],931:[0,.61111,0,0,.525],933:[0,.61111,0,0,.525],934:[0,.61111,0,0,.525],936:[0,.61111,0,0,.525],937:[0,.61111,0,0,.525],8216:[0,.61111,0,0,.525],8217:[0,.61111,0,0,.525],8242:[0,.61111,0,0,.525],9251:[.11111,.21944,0,0,.525]}},c1={slant:[.25,.25,.25],space:[0,0,0],stretch:[0,0,0],shrink:[0,0,0],xHeight:[.431,.431,.431],quad:[1,1.171,1.472],extraSpace:[0,0,0],num1:[.677,.732,.925],num2:[.394,.384,.387],num3:[.444,.471,.504],denom1:[.686,.752,1.025],denom2:[.345,.344,.532],sup1:[.413,.503,.504],sup2:[.363,.431,.404],sup3:[.289,.286,.294],sub1:[.15,.143,.2],sub2:[.247,.286,.4],supDrop:[.386,.353,.494],subDrop:[.05,.071,.1],delim1:[2.39,1.7,1.98],delim2:[1.01,1.157,1.42],axisHeight:[.25,.25,.25],defaultRuleThickness:[.04,.049,.049],bigOpSpacing1:[.111,.111,.111],bigOpSpacing2:[.166,.166,.166],bigOpSpacing3:[.2,.2,.2],bigOpSpacing4:[.6,.611,.611],bigOpSpacing5:[.1,.143,.143],sqrtRuleThickness:[.04,.04,.04],ptPerEm:[10,10,10],doubleRuleSep:[.2,.2,.2],arrayRuleWidth:[.04,.04,.04],fboxsep:[.3,.3,.3],fboxrule:[.04,.04,.04]},GT={Å:"A",Ð:"D",Þ:"o",å:"a",ð:"d",þ:"o",А:"A",Б:"B",В:"B",Г:"F",Д:"A",Е:"E",Ж:"K",З:"3",И:"N",Й:"N",К:"K",Л:"N",М:"M",Н:"H",О:"O",П:"N",Р:"P",С:"C",Т:"T",У:"y",Ф:"O",Х:"X",Ц:"U",Ч:"h",Ш:"W",Щ:"W",Ъ:"B",Ы:"X",Ь:"B",Э:"3",Ю:"X",Я:"R",а:"a",б:"b",в:"a",г:"r",д:"y",е:"e",ж:"m",з:"e",и:"n",й:"n",к:"n",л:"n",м:"m",н:"n",о:"o",п:"n",р:"p",с:"c",т:"o",у:"y",ф:"b",х:"x",ц:"n",ч:"n",ш:"w",щ:"w",ъ:"a",ы:"m",ь:"a",э:"e",ю:"m",я:"r"};function Y8n(e,n){Bo[e]=n}function j6(e,n,t){if(!Bo[n])throw new Error("Font metrics not found for font: "+n+".");var r=e.charCodeAt(0),s=Bo[n][r];if(!s&&e[0]in GT&&(r=GT[e[0]].charCodeAt(0),s=Bo[n][r]),!s&&t==="text"&&fP(r)&&(s=Bo[n][77]),s)return{depth:s[0],height:s[1],italic:s[2],skew:s[3],width:s[4]}}var jw={};function Z8n(e){var n;if(e>=5?n=0:e>=3?n=1:n=2,!jw[n]){var t=jw[n]={cssEmPerMu:c1.quad[n]/18};for(var r in c1)c1.hasOwnProperty(r)&&(t[r]=c1[r][n])}return jw[n]}var Sr={math:{},text:{}};function P(e,n,t,r,s,i){Sr[e][s]={font:n,group:t,replace:r},i&&r&&(Sr[e][r]=Sr[e][s])}var K="math",Ve="text",J="main",fe="ams",Er="accent-token",ht="bin",di="close",zh="inner",Pt="mathord",ls="op-token",ua="open",km="punct",de="rel",lc="spacing",ve="textord";P(K,J,de,"≡","\\equiv",!0);P(K,J,de,"≺","\\prec",!0);P(K,J,de,"≻","\\succ",!0);P(K,J,de,"∼","\\sim",!0);P(K,J,de,"⊥","\\perp");P(K,J,de,"⪯","\\preceq",!0);P(K,J,de,"⪰","\\succeq",!0);P(K,J,de,"≃","\\simeq",!0);P(K,J,de,"∣","\\mid",!0);P(K,J,de,"≪","\\ll",!0);P(K,J,de,"≫","\\gg",!0);P(K,J,de,"≍","\\asymp",!0);P(K,J,de,"∥","\\parallel");P(K,J,de,"⋈","\\bowtie",!0);P(K,J,de,"⌣","\\smile",!0);P(K,J,de,"⊑","\\sqsubseteq",!0);P(K,J,de,"⊒","\\sqsupseteq",!0);P(K,J,de,"≐","\\doteq",!0);P(K,J,de,"⌢","\\frown",!0);P(K,J,de,"∋","\\ni",!0);P(K,J,de,"∝","\\propto",!0);P(K,J,de,"⊢","\\vdash",!0);P(K,J,de,"⊣","\\dashv",!0);P(K,J,de,"∋","\\owns");P(K,J,km,".","\\ldotp");P(K,J,km,"⋅","\\cdotp");P(K,J,km,"⋅","·");P(Ve,J,ve,"⋅","·");P(K,J,ve,"#","\\#");P(Ve,J,ve,"#","\\#");P(K,J,ve,"&","\\&");P(Ve,J,ve,"&","\\&");P(K,J,ve,"ℵ","\\aleph",!0);P(K,J,ve,"∀","\\forall",!0);P(K,J,ve,"ℏ","\\hbar",!0);P(K,J,ve,"∃","\\exists",!0);P(K,J,ve,"∇","\\nabla",!0);P(K,J,ve,"♭","\\flat",!0);P(K,J,ve,"ℓ","\\ell",!0);P(K,J,ve,"♮","\\natural",!0);P(K,J,ve,"♣","\\clubsuit",!0);P(K,J,ve,"℘","\\wp",!0);P(K,J,ve,"♯","\\sharp",!0);P(K,J,ve,"♢","\\diamondsuit",!0);P(K,J,ve,"ℜ","\\Re",!0);P(K,J,ve,"♡","\\heartsuit",!0);P(K,J,ve,"ℑ","\\Im",!0);P(K,J,ve,"♠","\\spadesuit",!0);P(K,J,ve,"§","\\S",!0);P(Ve,J,ve,"§","\\S");P(K,J,ve,"¶","\\P",!0);P(Ve,J,ve,"¶","\\P");P(K,J,ve,"†","\\dag");P(Ve,J,ve,"†","\\dag");P(Ve,J,ve,"†","\\textdagger");P(K,J,ve,"‡","\\ddag");P(Ve,J,ve,"‡","\\ddag");P(Ve,J,ve,"‡","\\textdaggerdbl");P(K,J,di,"⎱","\\rmoustache",!0);P(K,J,ua,"⎰","\\lmoustache",!0);P(K,J,di,"⟯","\\rgroup",!0);P(K,J,ua,"⟮","\\lgroup",!0);P(K,J,ht,"∓","\\mp",!0);P(K,J,ht,"⊖","\\ominus",!0);P(K,J,ht,"⊎","\\uplus",!0);P(K,J,ht,"⊓","\\sqcap",!0);P(K,J,ht,"∗","\\ast");P(K,J,ht,"⊔","\\sqcup",!0);P(K,J,ht,"◯","\\bigcirc",!0);P(K,J,ht,"∙","\\bullet",!0);P(K,J,ht,"‡","\\ddagger");P(K,J,ht,"≀","\\wr",!0);P(K,J,ht,"⨿","\\amalg");P(K,J,ht,"&","\\And");P(K,J,de,"⟵","\\longleftarrow",!0);P(K,J,de,"⇐","\\Leftarrow",!0);P(K,J,de,"⟸","\\Longleftarrow",!0);P(K,J,de,"⟶","\\longrightarrow",!0);P(K,J,de,"⇒","\\Rightarrow",!0);P(K,J,de,"⟹","\\Longrightarrow",!0);P(K,J,de,"↔","\\leftrightarrow",!0);P(K,J,de,"⟷","\\longleftrightarrow",!0);P(K,J,de,"⇔","\\Leftrightarrow",!0);P(K,J,de,"⟺","\\Longleftrightarrow",!0);P(K,J,de,"↦","\\mapsto",!0);P(K,J,de,"⟼","\\longmapsto",!0);P(K,J,de,"↗","\\nearrow",!0);P(K,J,de,"↩","\\hookleftarrow",!0);P(K,J,de,"↪","\\hookrightarrow",!0);P(K,J,de,"↘","\\searrow",!0);P(K,J,de,"↼","\\leftharpoonup",!0);P(K,J,de,"⇀","\\rightharpoonup",!0);P(K,J,de,"↙","\\swarrow",!0);P(K,J,de,"↽","\\leftharpoondown",!0);P(K,J,de,"⇁","\\rightharpoondown",!0);P(K,J,de,"↖","\\nwarrow",!0);P(K,J,de,"⇌","\\rightleftharpoons",!0);P(K,fe,de,"≮","\\nless",!0);P(K,fe,de,"","\\@nleqslant");P(K,fe,de,"","\\@nleqq");P(K,fe,de,"⪇","\\lneq",!0);P(K,fe,de,"≨","\\lneqq",!0);P(K,fe,de,"","\\@lvertneqq");P(K,fe,de,"⋦","\\lnsim",!0);P(K,fe,de,"⪉","\\lnapprox",!0);P(K,fe,de,"⊀","\\nprec",!0);P(K,fe,de,"⋠","\\npreceq",!0);P(K,fe,de,"⋨","\\precnsim",!0);P(K,fe,de,"⪹","\\precnapprox",!0);P(K,fe,de,"≁","\\nsim",!0);P(K,fe,de,"","\\@nshortmid");P(K,fe,de,"∤","\\nmid",!0);P(K,fe,de,"⊬","\\nvdash",!0);P(K,fe,de,"⊭","\\nvDash",!0);P(K,fe,de,"⋪","\\ntriangleleft");P(K,fe,de,"⋬","\\ntrianglelefteq",!0);P(K,fe,de,"⊊","\\subsetneq",!0);P(K,fe,de,"","\\@varsubsetneq");P(K,fe,de,"⫋","\\subsetneqq",!0);P(K,fe,de,"","\\@varsubsetneqq");P(K,fe,de,"≯","\\ngtr",!0);P(K,fe,de,"","\\@ngeqslant");P(K,fe,de,"","\\@ngeqq");P(K,fe,de,"⪈","\\gneq",!0);P(K,fe,de,"≩","\\gneqq",!0);P(K,fe,de,"","\\@gvertneqq");P(K,fe,de,"⋧","\\gnsim",!0);P(K,fe,de,"⪊","\\gnapprox",!0);P(K,fe,de,"⊁","\\nsucc",!0);P(K,fe,de,"⋡","\\nsucceq",!0);P(K,fe,de,"⋩","\\succnsim",!0);P(K,fe,de,"⪺","\\succnapprox",!0);P(K,fe,de,"≆","\\ncong",!0);P(K,fe,de,"","\\@nshortparallel");P(K,fe,de,"∦","\\nparallel",!0);P(K,fe,de,"⊯","\\nVDash",!0);P(K,fe,de,"⋫","\\ntriangleright");P(K,fe,de,"⋭","\\ntrianglerighteq",!0);P(K,fe,de,"","\\@nsupseteqq");P(K,fe,de,"⊋","\\supsetneq",!0);P(K,fe,de,"","\\@varsupsetneq");P(K,fe,de,"⫌","\\supsetneqq",!0);P(K,fe,de,"","\\@varsupsetneqq");P(K,fe,de,"⊮","\\nVdash",!0);P(K,fe,de,"⪵","\\precneqq",!0);P(K,fe,de,"⪶","\\succneqq",!0);P(K,fe,de,"","\\@nsubseteqq");P(K,fe,ht,"⊴","\\unlhd");P(K,fe,ht,"⊵","\\unrhd");P(K,fe,de,"↚","\\nleftarrow",!0);P(K,fe,de,"↛","\\nrightarrow",!0);P(K,fe,de,"⇍","\\nLeftarrow",!0);P(K,fe,de,"⇏","\\nRightarrow",!0);P(K,fe,de,"↮","\\nleftrightarrow",!0);P(K,fe,de,"⇎","\\nLeftrightarrow",!0);P(K,fe,de,"△","\\vartriangle");P(K,fe,ve,"ℏ","\\hslash");P(K,fe,ve,"▽","\\triangledown");P(K,fe,ve,"◊","\\lozenge");P(K,fe,ve,"Ⓢ","\\circledS");P(K,fe,ve,"®","\\circledR");P(Ve,fe,ve,"®","\\circledR");P(K,fe,ve,"∡","\\measuredangle",!0);P(K,fe,ve,"∄","\\nexists");P(K,fe,ve,"℧","\\mho");P(K,fe,ve,"Ⅎ","\\Finv",!0);P(K,fe,ve,"⅁","\\Game",!0);P(K,fe,ve,"‵","\\backprime");P(K,fe,ve,"▲","\\blacktriangle");P(K,fe,ve,"▼","\\blacktriangledown");P(K,fe,ve,"■","\\blacksquare");P(K,fe,ve,"⧫","\\blacklozenge");P(K,fe,ve,"★","\\bigstar");P(K,fe,ve,"∢","\\sphericalangle",!0);P(K,fe,ve,"∁","\\complement",!0);P(K,fe,ve,"ð","\\eth",!0);P(Ve,J,ve,"ð","ð");P(K,fe,ve,"╱","\\diagup");P(K,fe,ve,"╲","\\diagdown");P(K,fe,ve,"□","\\square");P(K,fe,ve,"□","\\Box");P(K,fe,ve,"◊","\\Diamond");P(K,fe,ve,"¥","\\yen",!0);P(Ve,fe,ve,"¥","\\yen",!0);P(K,fe,ve,"✓","\\checkmark",!0);P(Ve,fe,ve,"✓","\\checkmark");P(K,fe,ve,"ℶ","\\beth",!0);P(K,fe,ve,"ℸ","\\daleth",!0);P(K,fe,ve,"ℷ","\\gimel",!0);P(K,fe,ve,"ϝ","\\digamma",!0);P(K,fe,ve,"ϰ","\\varkappa");P(K,fe,ua,"┌","\\@ulcorner",!0);P(K,fe,di,"┐","\\@urcorner",!0);P(K,fe,ua,"└","\\@llcorner",!0);P(K,fe,di,"┘","\\@lrcorner",!0);P(K,fe,de,"≦","\\leqq",!0);P(K,fe,de,"⩽","\\leqslant",!0);P(K,fe,de,"⪕","\\eqslantless",!0);P(K,fe,de,"≲","\\lesssim",!0);P(K,fe,de,"⪅","\\lessapprox",!0);P(K,fe,de,"≊","\\approxeq",!0);P(K,fe,ht,"⋖","\\lessdot");P(K,fe,de,"⋘","\\lll",!0);P(K,fe,de,"≶","\\lessgtr",!0);P(K,fe,de,"⋚","\\lesseqgtr",!0);P(K,fe,de,"⪋","\\lesseqqgtr",!0);P(K,fe,de,"≑","\\doteqdot");P(K,fe,de,"≓","\\risingdotseq",!0);P(K,fe,de,"≒","\\fallingdotseq",!0);P(K,fe,de,"∽","\\backsim",!0);P(K,fe,de,"⋍","\\backsimeq",!0);P(K,fe,de,"⫅","\\subseteqq",!0);P(K,fe,de,"⋐","\\Subset",!0);P(K,fe,de,"⊏","\\sqsubset",!0);P(K,fe,de,"≼","\\preccurlyeq",!0);P(K,fe,de,"⋞","\\curlyeqprec",!0);P(K,fe,de,"≾","\\precsim",!0);P(K,fe,de,"⪷","\\precapprox",!0);P(K,fe,de,"⊲","\\vartriangleleft");P(K,fe,de,"⊴","\\trianglelefteq");P(K,fe,de,"⊨","\\vDash",!0);P(K,fe,de,"⊪","\\Vvdash",!0);P(K,fe,de,"⌣","\\smallsmile");P(K,fe,de,"⌢","\\smallfrown");P(K,fe,de,"≏","\\bumpeq",!0);P(K,fe,de,"≎","\\Bumpeq",!0);P(K,fe,de,"≧","\\geqq",!0);P(K,fe,de,"⩾","\\geqslant",!0);P(K,fe,de,"⪖","\\eqslantgtr",!0);P(K,fe,de,"≳","\\gtrsim",!0);P(K,fe,de,"⪆","\\gtrapprox",!0);P(K,fe,ht,"⋗","\\gtrdot");P(K,fe,de,"⋙","\\ggg",!0);P(K,fe,de,"≷","\\gtrless",!0);P(K,fe,de,"⋛","\\gtreqless",!0);P(K,fe,de,"⪌","\\gtreqqless",!0);P(K,fe,de,"≖","\\eqcirc",!0);P(K,fe,de,"≗","\\circeq",!0);P(K,fe,de,"≜","\\triangleq",!0);P(K,fe,de,"∼","\\thicksim");P(K,fe,de,"≈","\\thickapprox");P(K,fe,de,"⫆","\\supseteqq",!0);P(K,fe,de,"⋑","\\Supset",!0);P(K,fe,de,"⊐","\\sqsupset",!0);P(K,fe,de,"≽","\\succcurlyeq",!0);P(K,fe,de,"⋟","\\curlyeqsucc",!0);P(K,fe,de,"≿","\\succsim",!0);P(K,fe,de,"⪸","\\succapprox",!0);P(K,fe,de,"⊳","\\vartriangleright");P(K,fe,de,"⊵","\\trianglerighteq");P(K,fe,de,"⊩","\\Vdash",!0);P(K,fe,de,"∣","\\shortmid");P(K,fe,de,"∥","\\shortparallel");P(K,fe,de,"≬","\\between",!0);P(K,fe,de,"⋔","\\pitchfork",!0);P(K,fe,de,"∝","\\varpropto");P(K,fe,de,"◀","\\blacktriangleleft");P(K,fe,de,"∴","\\therefore",!0);P(K,fe,de,"∍","\\backepsilon");P(K,fe,de,"▶","\\blacktriangleright");P(K,fe,de,"∵","\\because",!0);P(K,fe,de,"⋘","\\llless");P(K,fe,de,"⋙","\\gggtr");P(K,fe,ht,"⊲","\\lhd");P(K,fe,ht,"⊳","\\rhd");P(K,fe,de,"≂","\\eqsim",!0);P(K,J,de,"⋈","\\Join");P(K,fe,de,"≑","\\Doteq",!0);P(K,fe,ht,"∔","\\dotplus",!0);P(K,fe,ht,"∖","\\smallsetminus");P(K,fe,ht,"⋒","\\Cap",!0);P(K,fe,ht,"⋓","\\Cup",!0);P(K,fe,ht,"⩞","\\doublebarwedge",!0);P(K,fe,ht,"⊟","\\boxminus",!0);P(K,fe,ht,"⊞","\\boxplus",!0);P(K,fe,ht,"⋇","\\divideontimes",!0);P(K,fe,ht,"⋉","\\ltimes",!0);P(K,fe,ht,"⋊","\\rtimes",!0);P(K,fe,ht,"⋋","\\leftthreetimes",!0);P(K,fe,ht,"⋌","\\rightthreetimes",!0);P(K,fe,ht,"⋏","\\curlywedge",!0);P(K,fe,ht,"⋎","\\curlyvee",!0);P(K,fe,ht,"⊝","\\circleddash",!0);P(K,fe,ht,"⊛","\\circledast",!0);P(K,fe,ht,"⋅","\\centerdot");P(K,fe,ht,"⊺","\\intercal",!0);P(K,fe,ht,"⋒","\\doublecap");P(K,fe,ht,"⋓","\\doublecup");P(K,fe,ht,"⊠","\\boxtimes",!0);P(K,fe,de,"⇢","\\dashrightarrow",!0);P(K,fe,de,"⇠","\\dashleftarrow",!0);P(K,fe,de,"⇇","\\leftleftarrows",!0);P(K,fe,de,"⇆","\\leftrightarrows",!0);P(K,fe,de,"⇚","\\Lleftarrow",!0);P(K,fe,de,"↞","\\twoheadleftarrow",!0);P(K,fe,de,"↢","\\leftarrowtail",!0);P(K,fe,de,"↫","\\looparrowleft",!0);P(K,fe,de,"⇋","\\leftrightharpoons",!0);P(K,fe,de,"↶","\\curvearrowleft",!0);P(K,fe,de,"↺","\\circlearrowleft",!0);P(K,fe,de,"↰","\\Lsh",!0);P(K,fe,de,"⇈","\\upuparrows",!0);P(K,fe,de,"↿","\\upharpoonleft",!0);P(K,fe,de,"⇃","\\downharpoonleft",!0);P(K,J,de,"⊶","\\origof",!0);P(K,J,de,"⊷","\\imageof",!0);P(K,fe,de,"⊸","\\multimap",!0);P(K,fe,de,"↭","\\leftrightsquigarrow",!0);P(K,fe,de,"⇉","\\rightrightarrows",!0);P(K,fe,de,"⇄","\\rightleftarrows",!0);P(K,fe,de,"↠","\\twoheadrightarrow",!0);P(K,fe,de,"↣","\\rightarrowtail",!0);P(K,fe,de,"↬","\\looparrowright",!0);P(K,fe,de,"↷","\\curvearrowright",!0);P(K,fe,de,"↻","\\circlearrowright",!0);P(K,fe,de,"↱","\\Rsh",!0);P(K,fe,de,"⇊","\\downdownarrows",!0);P(K,fe,de,"↾","\\upharpoonright",!0);P(K,fe,de,"⇂","\\downharpoonright",!0);P(K,fe,de,"⇝","\\rightsquigarrow",!0);P(K,fe,de,"⇝","\\leadsto");P(K,fe,de,"⇛","\\Rrightarrow",!0);P(K,fe,de,"↾","\\restriction");P(K,J,ve,"‘","`");P(K,J,ve,"$","\\$");P(Ve,J,ve,"$","\\$");P(Ve,J,ve,"$","\\textdollar");P(K,J,ve,"%","\\%");P(Ve,J,ve,"%","\\%");P(K,J,ve,"_","\\_");P(Ve,J,ve,"_","\\_");P(Ve,J,ve,"_","\\textunderscore");P(K,J,ve,"∠","\\angle",!0);P(K,J,ve,"∞","\\infty",!0);P(K,J,ve,"′","\\prime");P(K,J,ve,"△","\\triangle");P(K,J,ve,"Γ","\\Gamma",!0);P(K,J,ve,"Δ","\\Delta",!0);P(K,J,ve,"Θ","\\Theta",!0);P(K,J,ve,"Λ","\\Lambda",!0);P(K,J,ve,"Ξ","\\Xi",!0);P(K,J,ve,"Π","\\Pi",!0);P(K,J,ve,"Σ","\\Sigma",!0);P(K,J,ve,"Υ","\\Upsilon",!0);P(K,J,ve,"Φ","\\Phi",!0);P(K,J,ve,"Ψ","\\Psi",!0);P(K,J,ve,"Ω","\\Omega",!0);P(K,J,ve,"A","Α");P(K,J,ve,"B","Β");P(K,J,ve,"E","Ε");P(K,J,ve,"Z","Ζ");P(K,J,ve,"H","Η");P(K,J,ve,"I","Ι");P(K,J,ve,"K","Κ");P(K,J,ve,"M","Μ");P(K,J,ve,"N","Ν");P(K,J,ve,"O","Ο");P(K,J,ve,"P","Ρ");P(K,J,ve,"T","Τ");P(K,J,ve,"X","Χ");P(K,J,ve,"¬","\\neg",!0);P(K,J,ve,"¬","\\lnot");P(K,J,ve,"⊤","\\top");P(K,J,ve,"⊥","\\bot");P(K,J,ve,"∅","\\emptyset");P(K,fe,ve,"∅","\\varnothing");P(K,J,Pt,"α","\\alpha",!0);P(K,J,Pt,"β","\\beta",!0);P(K,J,Pt,"γ","\\gamma",!0);P(K,J,Pt,"δ","\\delta",!0);P(K,J,Pt,"ϵ","\\epsilon",!0);P(K,J,Pt,"ζ","\\zeta",!0);P(K,J,Pt,"η","\\eta",!0);P(K,J,Pt,"θ","\\theta",!0);P(K,J,Pt,"ι","\\iota",!0);P(K,J,Pt,"κ","\\kappa",!0);P(K,J,Pt,"λ","\\lambda",!0);P(K,J,Pt,"μ","\\mu",!0);P(K,J,Pt,"ν","\\nu",!0);P(K,J,Pt,"ξ","\\xi",!0);P(K,J,Pt,"ο","\\omicron",!0);P(K,J,Pt,"π","\\pi",!0);P(K,J,Pt,"ρ","\\rho",!0);P(K,J,Pt,"σ","\\sigma",!0);P(K,J,Pt,"τ","\\tau",!0);P(K,J,Pt,"υ","\\upsilon",!0);P(K,J,Pt,"ϕ","\\phi",!0);P(K,J,Pt,"χ","\\chi",!0);P(K,J,Pt,"ψ","\\psi",!0);P(K,J,Pt,"ω","\\omega",!0);P(K,J,Pt,"ε","\\varepsilon",!0);P(K,J,Pt,"ϑ","\\vartheta",!0);P(K,J,Pt,"ϖ","\\varpi",!0);P(K,J,Pt,"ϱ","\\varrho",!0);P(K,J,Pt,"ς","\\varsigma",!0);P(K,J,Pt,"φ","\\varphi",!0);P(K,J,ht,"∗","*",!0);P(K,J,ht,"+","+");P(K,J,ht,"−","-",!0);P(K,J,ht,"⋅","\\cdot",!0);P(K,J,ht,"∘","\\circ",!0);P(K,J,ht,"÷","\\div",!0);P(K,J,ht,"±","\\pm",!0);P(K,J,ht,"×","\\times",!0);P(K,J,ht,"∩","\\cap",!0);P(K,J,ht,"∪","\\cup",!0);P(K,J,ht,"∖","\\setminus",!0);P(K,J,ht,"∧","\\land");P(K,J,ht,"∨","\\lor");P(K,J,ht,"∧","\\wedge",!0);P(K,J,ht,"∨","\\vee",!0);P(K,J,ve,"√","\\surd");P(K,J,ua,"⟨","\\langle",!0);P(K,J,ua,"∣","\\lvert");P(K,J,ua,"∥","\\lVert");P(K,J,di,"?","?");P(K,J,di,"!","!");P(K,J,di,"⟩","\\rangle",!0);P(K,J,di,"∣","\\rvert");P(K,J,di,"∥","\\rVert");P(K,J,de,"=","=");P(K,J,de,":",":");P(K,J,de,"≈","\\approx",!0);P(K,J,de,"≅","\\cong",!0);P(K,J,de,"≥","\\ge");P(K,J,de,"≥","\\geq",!0);P(K,J,de,"←","\\gets");P(K,J,de,">","\\gt",!0);P(K,J,de,"∈","\\in",!0);P(K,J,de,"","\\@not");P(K,J,de,"⊂","\\subset",!0);P(K,J,de,"⊃","\\supset",!0);P(K,J,de,"⊆","\\subseteq",!0);P(K,J,de,"⊇","\\supseteq",!0);P(K,fe,de,"⊈","\\nsubseteq",!0);P(K,fe,de,"⊉","\\nsupseteq",!0);P(K,J,de,"⊨","\\models");P(K,J,de,"←","\\leftarrow",!0);P(K,J,de,"≤","\\le");P(K,J,de,"≤","\\leq",!0);P(K,J,de,"<","\\lt",!0);P(K,J,de,"→","\\rightarrow",!0);P(K,J,de,"→","\\to");P(K,fe,de,"≱","\\ngeq",!0);P(K,fe,de,"≰","\\nleq",!0);P(K,J,lc," ","\\ ");P(K,J,lc," ","\\space");P(K,J,lc," ","\\nobreakspace");P(Ve,J,lc," ","\\ ");P(Ve,J,lc," "," ");P(Ve,J,lc," ","\\space");P(Ve,J,lc," ","\\nobreakspace");P(K,J,lc,"","\\nobreak");P(K,J,lc,"","\\allowbreak");P(K,J,km,",",",");P(K,J,km,";",";");P(K,fe,ht,"⊼","\\barwedge",!0);P(K,fe,ht,"⊻","\\veebar",!0);P(K,J,ht,"⊙","\\odot",!0);P(K,J,ht,"⊕","\\oplus",!0);P(K,J,ht,"⊗","\\otimes",!0);P(K,J,ve,"∂","\\partial",!0);P(K,J,ht,"⊘","\\oslash",!0);P(K,fe,ht,"⊚","\\circledcirc",!0);P(K,fe,ht,"⊡","\\boxdot",!0);P(K,J,ht,"△","\\bigtriangleup");P(K,J,ht,"▽","\\bigtriangledown");P(K,J,ht,"†","\\dagger");P(K,J,ht,"⋄","\\diamond");P(K,J,ht,"⋆","\\star");P(K,J,ht,"◃","\\triangleleft");P(K,J,ht,"▹","\\triangleright");P(K,J,ua,"{","\\{");P(Ve,J,ve,"{","\\{");P(Ve,J,ve,"{","\\textbraceleft");P(K,J,di,"}","\\}");P(Ve,J,ve,"}","\\}");P(Ve,J,ve,"}","\\textbraceright");P(K,J,ua,"{","\\lbrace");P(K,J,di,"}","\\rbrace");P(K,J,ua,"[","\\lbrack",!0);P(Ve,J,ve,"[","\\lbrack",!0);P(K,J,di,"]","\\rbrack",!0);P(Ve,J,ve,"]","\\rbrack",!0);P(K,J,ua,"(","\\lparen",!0);P(K,J,di,")","\\rparen",!0);P(Ve,J,ve,"<","\\textless",!0);P(Ve,J,ve,">","\\textgreater",!0);P(K,J,ua,"⌊","\\lfloor",!0);P(K,J,di,"⌋","\\rfloor",!0);P(K,J,ua,"⌈","\\lceil",!0);P(K,J,di,"⌉","\\rceil",!0);P(K,J,ve,"\\","\\backslash");P(K,J,ve,"∣","|");P(K,J,ve,"∣","\\vert");P(Ve,J,ve,"|","\\textbar",!0);P(K,J,ve,"∥","\\|");P(K,J,ve,"∥","\\Vert");P(Ve,J,ve,"∥","\\textbardbl");P(Ve,J,ve,"~","\\textasciitilde");P(Ve,J,ve,"\\","\\textbackslash");P(Ve,J,ve,"^","\\textasciicircum");P(K,J,de,"↑","\\uparrow",!0);P(K,J,de,"⇑","\\Uparrow",!0);P(K,J,de,"↓","\\downarrow",!0);P(K,J,de,"⇓","\\Downarrow",!0);P(K,J,de,"↕","\\updownarrow",!0);P(K,J,de,"⇕","\\Updownarrow",!0);P(K,J,ls,"∐","\\coprod");P(K,J,ls,"⋁","\\bigvee");P(K,J,ls,"⋀","\\bigwedge");P(K,J,ls,"⨄","\\biguplus");P(K,J,ls,"⋂","\\bigcap");P(K,J,ls,"⋃","\\bigcup");P(K,J,ls,"∫","\\int");P(K,J,ls,"∫","\\intop");P(K,J,ls,"∬","\\iint");P(K,J,ls,"∭","\\iiint");P(K,J,ls,"∏","\\prod");P(K,J,ls,"∑","\\sum");P(K,J,ls,"⨂","\\bigotimes");P(K,J,ls,"⨁","\\bigoplus");P(K,J,ls,"⨀","\\bigodot");P(K,J,ls,"∮","\\oint");P(K,J,ls,"∯","\\oiint");P(K,J,ls,"∰","\\oiiint");P(K,J,ls,"⨆","\\bigsqcup");P(K,J,ls,"∫","\\smallint");P(Ve,J,zh,"…","\\textellipsis");P(K,J,zh,"…","\\mathellipsis");P(Ve,J,zh,"…","\\ldots",!0);P(K,J,zh,"…","\\ldots",!0);P(K,J,zh,"⋯","\\@cdots",!0);P(K,J,zh,"⋱","\\ddots",!0);P(K,J,ve,"⋮","\\varvdots");P(Ve,J,ve,"⋮","\\varvdots");P(K,J,Er,"ˊ","\\acute");P(K,J,Er,"ˋ","\\grave");P(K,J,Er,"¨","\\ddot");P(K,J,Er,"~","\\tilde");P(K,J,Er,"ˉ","\\bar");P(K,J,Er,"˘","\\breve");P(K,J,Er,"ˇ","\\check");P(K,J,Er,"^","\\hat");P(K,J,Er,"⃗","\\vec");P(K,J,Er,"˙","\\dot");P(K,J,Er,"˚","\\mathring");P(K,J,Pt,"","\\@imath");P(K,J,Pt,"","\\@jmath");P(K,J,ve,"ı","ı");P(K,J,ve,"ȷ","ȷ");P(Ve,J,ve,"ı","\\i",!0);P(Ve,J,ve,"ȷ","\\j",!0);P(Ve,J,ve,"ß","\\ss",!0);P(Ve,J,ve,"æ","\\ae",!0);P(Ve,J,ve,"œ","\\oe",!0);P(Ve,J,ve,"ø","\\o",!0);P(Ve,J,ve,"Æ","\\AE",!0);P(Ve,J,ve,"Œ","\\OE",!0);P(Ve,J,ve,"Ø","\\O",!0);P(Ve,J,Er,"ˊ","\\'");P(Ve,J,Er,"ˋ","\\`");P(Ve,J,Er,"ˆ","\\^");P(Ve,J,Er,"˜","\\~");P(Ve,J,Er,"ˉ","\\=");P(Ve,J,Er,"˘","\\u");P(Ve,J,Er,"˙","\\.");P(Ve,J,Er,"¸","\\c");P(Ve,J,Er,"˚","\\r");P(Ve,J,Er,"ˇ","\\v");P(Ve,J,Er,"¨",'\\"');P(Ve,J,Er,"˝","\\H");P(Ve,J,Er,"◯","\\textcircled");var gP={"--":!0,"---":!0,"``":!0,"''":!0};P(Ve,J,ve,"–","--",!0);P(Ve,J,ve,"–","\\textendash");P(Ve,J,ve,"—","---",!0);P(Ve,J,ve,"—","\\textemdash");P(Ve,J,ve,"‘","`",!0);P(Ve,J,ve,"‘","\\textquoteleft");P(Ve,J,ve,"’","'",!0);P(Ve,J,ve,"’","\\textquoteright");P(Ve,J,ve,"“","``",!0);P(Ve,J,ve,"“","\\textquotedblleft");P(Ve,J,ve,"”","''",!0);P(Ve,J,ve,"”","\\textquotedblright");P(K,J,ve,"°","\\degree",!0);P(Ve,J,ve,"°","\\degree");P(Ve,J,ve,"°","\\textdegree",!0);P(K,J,ve,"£","\\pounds");P(K,J,ve,"£","\\mathsterling",!0);P(Ve,J,ve,"£","\\pounds");P(Ve,J,ve,"£","\\textsterling",!0);P(K,fe,ve,"✠","\\maltese");P(Ve,fe,ve,"✠","\\maltese");var VT='0123456789/@."';for(var Tw=0;Tw{var n=e.charCodeAt(0),t=e.charCodeAt(1),r=(n-55296)*1024+(t-56320)+65536;if(119808<=r&&r<120484){var s=Math.floor((r-119808)/26);return nA[s]}else if(120782<=r&&r<=120831){var i=Math.floor((r-120782)/10);return e9n[i]}else{if(r===120485||r===120486)return nA[0];if(120486{if(wu(e.classes)!==wu(n.classes)||e.skew!==n.skew||e.maxFontSize!==n.maxFontSize||e.italic!==0&&e.hasClass("mathnormal"))return!1;if(e.classes.length===1){var t=e.classes[0];if(t==="mbin"||t==="mord")return!1}for(var r of Object.keys(e.style))if(e.style[r]!==n.style[r])return!1;for(var s of Object.keys(n.style))if(e.style[s]!==n.style[s])return!1;return!0},vP=e=>{for(var n=0;nt&&(t=a.height),a.depth>r&&(r=a.depth),a.maxFontSize>s&&(s=a.maxFontSize)}n.height=t,n.depth=r,n.maxFontSize=s},We=function(n,t,r,s){var i=new Nh(n,t,r,s);return A6(i),i},Su=(e,n,t,r)=>new Nh(e,n,t,r),ah=function(n,t,r){var s=We([n],[],t);return s.height=Math.max(r||t.fontMetrics().defaultRuleThickness,t.minRuleThickness),s.style.borderBottomWidth=tt(s.height),s.maxFontSize=1,s},s9n=function(n,t,r,s){var i=new iy(n,t,r,s);return A6(i),i},cc=function(n){var t=new Eh(n);return A6(t),t},oh=function(n,t){return n instanceof Eh?We([],[n],t):n},i9n=function(n){if(n.positionType==="individualShift"){for(var t=n.children,r=[t[0]],s=-t[0].shift-t[0].elem.depth,i=s,a=1;a{var t=We(["mspace"],[],n),r=Or(e,n);return t.style.marginRight=tt(r),t},f1=(e,n,t)=>{var r,s;switch(e){case"amsrm":r="AMS";break;case"textrm":r="Main";break;case"textsf":r="SansSerif";break;case"texttt":r="Typewriter";break;default:r=e}return n==="textbf"&&t==="textit"?s="BoldItalic":n==="textbf"?s="Bold":t==="textit"?s="Italic":s="Regular",r+"-"+s},m5={mathbf:{variant:"bold",fontName:"Main-Bold"},mathrm:{variant:"normal",fontName:"Main-Regular"},textit:{variant:"italic",fontName:"Main-Italic"},mathit:{variant:"italic",fontName:"Main-Italic"},mathnormal:{variant:"italic",fontName:"Math-Italic"},mathsfit:{variant:"sans-serif-italic",fontName:"SansSerif-Italic"},mathbb:{variant:"double-struck",fontName:"AMS-Regular"},mathcal:{variant:"script",fontName:"Caligraphic-Regular"},mathfrak:{variant:"fraktur",fontName:"Fraktur-Regular"},mathscr:{variant:"script",fontName:"Script-Regular"},mathsf:{variant:"sans-serif",fontName:"SansSerif-Regular"},mathtt:{variant:"monospace",fontName:"Typewriter-Regular"}},yP={vec:["vec",.471,.714],oiintSize1:["oiintSize1",.957,.499],oiintSize2:["oiintSize2",1.472,.659],oiiintSize1:["oiiintSize1",1.304,.499],oiiintSize2:["oiiintSize2",1.98,.659]},xP=function(n,t){var[r,s,i]=yP[n],a=new ku(r),o=new sc([a],{width:tt(s),height:tt(i),style:"width:"+tt(s),viewBox:"0 0 "+1e3*s+" "+1e3*i,preserveAspectRatio:"xMinYMin"}),l=Su(["overlay"],[o],t);return l.height=i,l.style.height=tt(i),l.style.width=tt(s),l},Rr={number:3,unit:"mu"},o_={number:4,unit:"mu"},Ol={number:5,unit:"mu"},a9n={mord:{mop:Rr,mbin:o_,mrel:Ol,minner:Rr},mop:{mord:Rr,mop:Rr,mrel:Ol,minner:Rr},mbin:{mord:o_,mop:o_,mopen:o_,minner:o_},mrel:{mord:Ol,mop:Ol,mopen:Ol,minner:Ol},mopen:{},mclose:{mop:Rr,mbin:o_,mrel:Ol,minner:Rr},mpunct:{mord:Rr,mop:Rr,mrel:Ol,mopen:Rr,mclose:Rr,mpunct:Rr,minner:Rr},minner:{mord:Rr,mop:Rr,mbin:o_,mrel:Ol,mopen:Rr,mpunct:Rr,minner:Rr}},o9n={mord:{mop:Rr},mop:{mord:Rr,mop:Rr},mbin:{},mrel:{},mopen:{},mclose:{mop:Rr},mpunct:{},minner:{mop:Rr}},wP={},Uv={},Gv={};function dt(e){for(var{type:n,names:t,props:r,handler:s,htmlBuilder:i,mathmlBuilder:a}=e,o={type:n,numArgs:r.numArgs,argTypes:r.argTypes,allowedInArgument:!!r.allowedInArgument,allowedInText:!!r.allowedInText,allowedInMath:r.allowedInMath===void 0?!0:r.allowedInMath,numOptionalArgs:r.numOptionalArgs||0,infix:!!r.infix,primitive:!!r.primitive,handler:s},l=0;l{var v=k.classes[0],b=x.classes[0];v==="mbin"&&c9n.has(b)?k.classes[0]="mord":b==="mbin"&&l9n.has(v)&&(x.classes[0]="mord")},{node:_},p,m),g5(i,(x,k)=>{var v,b,w=b5(k),y=b5(x),C=w&&y?x.hasClass("mtight")?(v=o9n[w])==null?void 0:v[y]:(b=a9n[w])==null?void 0:b[y]:null;if(C)return bP(C,u)},{node:_},p,m),i},g5=function(n,t,r,s,i){s&&n.push(s);for(var a=0;ap=>{n.splice(_+1,0,p),a++})(a)}s&&n.pop()},kP=function(n){return n instanceof Eh||n instanceof iy||n instanceof Nh&&n.hasClass("enclosing")?n:null},v5=function(n,t){var r=kP(n);if(r){var s=r.children;if(s.length){if(t==="right")return v5(s[s.length-1],"right");if(t==="left")return v5(s[0],"left")}}return n},b5=function(n,t){if(!n)return null;t&&(n=v5(n,t));var r=n.classes[0];return _9n[r]||null},R0=function(n,t){var r=["nulldelimiter"].concat(n.baseSizingClasses());return We(t.concat(r))},qn=function(n,t,r){if(!n)return We();if(Uv[n.type]){var s=Uv[n.type](n,t);if(r&&t.size!==r.size){s=We(t.sizingClasses(r),[s],t);var i=t.sizeMultiplier/r.sizeMultiplier;s.height*=i,s.depth*=i}return s}else throw new Ze("Got group of unknown type: '"+n.type+"'")};function d1(e,n){var t=We(["base"],e,n),r=We(["strut"]);return r.style.height=tt(t.height+t.depth),t.depth&&(r.style.verticalAlign=tt(-t.depth)),t.children.unshift(r),t}function y5(e,n){var t=null;e.length===1&&e[0].type==="tag"&&(t=e[0].tag,e=e[0].body);var r=bs(e,n,"root"),s;r.length===2&&r[1].hasClass("tag")&&(s=r.pop());for(var i=[],a=[],o=0;o0&&(i.push(d1(a,n)),a=[]),i.push(r[o]));a.length>0&&i.push(d1(a,n));var u;t?(u=d1(bs(t,n,!0),n),u.classes=["tag"],i.push(u)):s&&i.push(s);var h=We(["katex-html"],i);if(h.setAttribute("aria-hidden","true"),u){var _=u.children[0];_.style.height=tt(h.height+h.depth),h.depth&&(_.style.verticalAlign=tt(-h.depth))}return h}function SP(e){return new Eh(e)}class Je{constructor(n,t,r){this.type=void 0,this.attributes=void 0,this.children=void 0,this.classes=void 0,this.type=n,this.attributes={},this.children=t||[],this.classes=r||[]}setAttribute(n,t){this.attributes[n]=t}getAttribute(n){return this.attributes[n]}toNode(){var n=document.createElementNS("http://www.w3.org/1998/Math/MathML",this.type);for(var t in this.attributes)Object.prototype.hasOwnProperty.call(this.attributes,t)&&n.setAttribute(t,this.attributes[t]);this.classes.length>0&&(n.className=wu(this.classes));for(var r=0;r0&&(n+=' class ="'+Ks(wu(this.classes))+'"'),n+=">";for(var r=0;r",n}toText(){return this.children.map(n=>n.toText()).join("")}}class as{constructor(n){this.text=void 0,this.text=n}toNode(){return document.createTextNode(this.text)}toMarkup(){return Ks(this.toText())}toText(){return this.text}}class CP{constructor(n){this.width=void 0,this.character=void 0,this.width=n,n>=.05555&&n<=.05556?this.character=" ":n>=.1666&&n<=.1667?this.character=" ":n>=.2222&&n<=.2223?this.character=" ":n>=.2777&&n<=.2778?this.character="  ":n>=-.05556&&n<=-.05555?this.character=" ⁣":n>=-.1667&&n<=-.1666?this.character=" ⁣":n>=-.2223&&n<=-.2222?this.character=" ⁣":n>=-.2778&&n<=-.2777?this.character=" ⁣":this.character=null}toNode(){if(this.character)return document.createTextNode(this.character);var n=document.createElementNS("http://www.w3.org/1998/Math/MathML","mspace");return n.setAttribute("width",tt(this.width)),n}toMarkup(){return this.character?""+this.character+"":''}toText(){return this.character?this.character:" "}}var f9n=new Set(["\\imath","\\jmath"]),d9n=new Set(["mrow","mtable"]),Ma=function(n,t,r){return Sr[t][n]&&Sr[t][n].replace&&n.charCodeAt(0)!==55349&&!(gP.hasOwnProperty(n)&&r&&(r.fontFamily&&r.fontFamily.slice(4,6)==="tt"||r.font&&r.font.slice(4,6)==="tt"))&&(n=Sr[t][n].replace),new as(n)},R6=function(n){return n.length===1?n[0]:new Je("mrow",n)},h9n={mathit:"italic",boldsymbol:e=>e.type==="textord"?"bold":"bold-italic",mathbf:"bold",mathbb:"double-struck",mathsfit:"sans-serif-italic",mathfrak:"fraktur",mathscr:"script",mathcal:"script",mathsf:"sans-serif",mathtt:"monospace"},M6=(e,n)=>{if(e.mode==="text"){if(n.fontFamily==="texttt")return"monospace";if(n.fontFamily==="textsf")return n.fontShape==="textit"&&n.fontWeight==="textbf"?"sans-serif-bold-italic":n.fontShape==="textit"?"sans-serif-italic":n.fontWeight==="textbf"?"bold-sans-serif":"sans-serif";if(n.fontShape==="textit"&&n.fontWeight==="textbf")return"bold-italic";if(n.fontShape==="textit")return"italic";if(n.fontWeight==="textbf")return"bold"}var t=n.font;if(!t||t==="mathnormal")return null;var r=e.mode,s=h9n[t];if(s)return typeof s=="function"?s(e):s;var i=e.text;if(f9n.has(i))return null;if(Sr[r][i]){var a=Sr[r][i].replace;a&&(i=a)}var o=m5[t].fontName;return j6(i,o,r)?m5[t].variant:null};function Ow(e){if(!e)return!1;if(e.type==="mi"&&e.children.length===1){var n=e.children[0];return n instanceof as&&n.text==="."}else if(e.type==="mo"&&e.children.length===1&&e.getAttribute("separator")==="true"&&e.getAttribute("lspace")==="0em"&&e.getAttribute("rspace")==="0em"){var t=e.children[0];return t instanceof as&&t.text===","}else return!1}var _a=function(n,t,r){if(n.length===1){var s=cr(n[0],t);return r&&s instanceof Je&&s.type==="mo"&&(s.setAttribute("lspace","0em"),s.setAttribute("rspace","0em")),[s]}for(var i=[],a,o=0;o=1&&(a.type==="mn"||Ow(a))){var u=l.children[0];u instanceof Je&&u.type==="mn"&&(u.children=[...a.children,...u.children],i.pop())}else if(a.type==="mi"&&a.children.length===1){var h=a.children[0];if(h instanceof as&&h.text==="̸"&&(l.type==="mo"||l.type==="mi"||l.type==="mn")){var _=l.children[0];_ instanceof as&&_.text.length>0&&(_.text=_.text.slice(0,1)+"̸"+_.text.slice(1),i.pop())}}}i.push(l),a=l}return i},Cu=function(n,t,r){return R6(_a(n,t,r))},cr=function(n,t){if(!n)return new Je("mrow");if(Gv[n.type])return Gv[n.type](n,t);throw new Ze("Got group of unknown type: '"+n.type+"'")};function rA(e,n,t,r,s){var i=_a(e,t),a;i.length===1&&i[0]instanceof Je&&d9n.has(i[0].type)?a=i[0]:a=new Je("mrow",i);var o=new Je("annotation",[new as(n)]);o.setAttribute("encoding","application/x-tex");var l=new Je("semantics",[a,o]),u=new Je("math",[l]);u.setAttribute("xmlns","http://www.w3.org/1998/Math/MathML"),r&&u.setAttribute("display","block");var h=s?"katex":"katex-mathml";return We([h],[u])}var p9n=[[1,1,1],[2,1,1],[3,1,1],[4,2,1],[5,2,1],[6,3,1],[7,4,2],[8,6,3],[9,7,6],[10,8,7],[11,10,9]],sA=[.5,.6,.7,.8,.9,1,1.2,1.44,1.728,2.074,2.488],iA=function(n,t){return t.size<2?n:p9n[n-1][t.size-1]};class Fl{constructor(n){this.style=void 0,this.color=void 0,this.size=void 0,this.textSize=void 0,this.phantom=void 0,this.font=void 0,this.fontFamily=void 0,this.fontWeight=void 0,this.fontShape=void 0,this.sizeMultiplier=void 0,this.maxSize=void 0,this.minRuleThickness=void 0,this._fontMetrics=void 0,this.style=n.style,this.color=n.color,this.size=n.size||Fl.BASESIZE,this.textSize=n.textSize||this.size,this.phantom=!!n.phantom,this.font=n.font||"",this.fontFamily=n.fontFamily||"",this.fontWeight=n.fontWeight||"",this.fontShape=n.fontShape||"",this.sizeMultiplier=sA[this.size-1],this.maxSize=n.maxSize,this.minRuleThickness=n.minRuleThickness,this._fontMetrics=void 0}extend(n){var t={style:this.style,size:this.size,textSize:this.textSize,color:this.color,phantom:this.phantom,font:this.font,fontFamily:this.fontFamily,fontWeight:this.fontWeight,fontShape:this.fontShape,maxSize:this.maxSize,minRuleThickness:this.minRuleThickness};return Object.assign(t,n),new Fl(t)}havingStyle(n){return this.style===n?this:this.extend({style:n,size:iA(this.textSize,n)})}havingCrampedStyle(){return this.havingStyle(this.style.cramp())}havingSize(n){return this.size===n&&this.textSize===n?this:this.extend({style:this.style.text(),size:n,textSize:n,sizeMultiplier:sA[n-1]})}havingBaseStyle(n){n=n||this.style.text();var t=iA(Fl.BASESIZE,n);return this.size===t&&this.textSize===Fl.BASESIZE&&this.style===n?this:this.extend({style:n,size:t})}havingBaseSizing(){var n;switch(this.style.id){case 4:case 5:n=3;break;case 6:case 7:n=1;break;default:n=6}return this.extend({style:this.style.text(),size:n})}withColor(n){return this.extend({color:n})}withPhantom(){return this.extend({phantom:!0})}withFont(n){return this.extend({font:n})}withTextFontFamily(n){return this.extend({fontFamily:n,font:""})}withTextFontWeight(n){return this.extend({fontWeight:n,font:""})}withTextFontShape(n){return this.extend({fontShape:n,font:""})}sizingClasses(n){return n.size!==this.size?["sizing","reset-size"+n.size,"size"+this.size]:[]}baseSizingClasses(){return this.size!==Fl.BASESIZE?["sizing","reset-size"+this.size,"size"+Fl.BASESIZE]:[]}fontMetrics(){return this._fontMetrics||(this._fontMetrics=Z8n(this.size)),this._fontMetrics}getColor(){return this.phantom?"transparent":this.color}}Fl.BASESIZE=6;var EP=function(n){return new Fl({style:n.displayMode?en.DISPLAY:en.TEXT,maxSize:n.maxSize,minRuleThickness:n.minRuleThickness})},NP=function(n,t){if(t.displayMode){var r=["katex-display"];t.leqno&&r.push("leqno"),t.fleqn&&r.push("fleqn"),n=We(r,[n])}return n},m9n=function(n,t,r){var s=EP(r),i;if(r.output==="mathml")return rA(n,t,s,r.displayMode,!0);if(r.output==="html"){var a=y5(n,s);i=We(["katex"],[a])}else{var o=rA(n,t,s,r.displayMode,!1),l=y5(n,s);i=We(["katex"],[o,l])}return NP(i,r)},g9n=function(n,t,r){var s=EP(r),i=y5(n,s),a=We(["katex"],[i]);return NP(a,r)},v9n={widehat:"^",widecheck:"ˇ",widetilde:"~",utilde:"~",overleftarrow:"←",underleftarrow:"←",xleftarrow:"←",overrightarrow:"→",underrightarrow:"→",xrightarrow:"→",underbrace:"⏟",overbrace:"⏞",underbracket:"⎵",overbracket:"⎴",overgroup:"⏠",undergroup:"⏡",overleftrightarrow:"↔",underleftrightarrow:"↔",xleftrightarrow:"↔",Overrightarrow:"⇒",xRightarrow:"⇒",overleftharpoon:"↼",xleftharpoonup:"↼",overrightharpoon:"⇀",xrightharpoonup:"⇀",xLeftarrow:"⇐",xLeftrightarrow:"⇔",xhookleftarrow:"↩",xhookrightarrow:"↪",xmapsto:"↦",xrightharpoondown:"⇁",xleftharpoondown:"↽",xrightleftharpoons:"⇌",xleftrightharpoons:"⇋",xtwoheadleftarrow:"↞",xtwoheadrightarrow:"↠",xlongequal:"=",xtofrom:"⇄",xrightleftarrows:"⇄",xrightequilibrium:"⇌",xleftequilibrium:"⇋","\\cdrightarrow":"→","\\cdleftarrow":"←","\\cdlongequal":"="},ly=function(n){var t=new Je("mo",[new as(v9n[n.replace(/^\\/,"")])]);return t.setAttribute("stretchy","true"),t},b9n={overrightarrow:[["rightarrow"],.888,522,"xMaxYMin"],overleftarrow:[["leftarrow"],.888,522,"xMinYMin"],underrightarrow:[["rightarrow"],.888,522,"xMaxYMin"],underleftarrow:[["leftarrow"],.888,522,"xMinYMin"],xrightarrow:[["rightarrow"],1.469,522,"xMaxYMin"],"\\cdrightarrow":[["rightarrow"],3,522,"xMaxYMin"],xleftarrow:[["leftarrow"],1.469,522,"xMinYMin"],"\\cdleftarrow":[["leftarrow"],3,522,"xMinYMin"],Overrightarrow:[["doublerightarrow"],.888,560,"xMaxYMin"],xRightarrow:[["doublerightarrow"],1.526,560,"xMaxYMin"],xLeftarrow:[["doubleleftarrow"],1.526,560,"xMinYMin"],overleftharpoon:[["leftharpoon"],.888,522,"xMinYMin"],xleftharpoonup:[["leftharpoon"],.888,522,"xMinYMin"],xleftharpoondown:[["leftharpoondown"],.888,522,"xMinYMin"],overrightharpoon:[["rightharpoon"],.888,522,"xMaxYMin"],xrightharpoonup:[["rightharpoon"],.888,522,"xMaxYMin"],xrightharpoondown:[["rightharpoondown"],.888,522,"xMaxYMin"],xlongequal:[["longequal"],.888,334,"xMinYMin"],"\\cdlongequal":[["longequal"],3,334,"xMinYMin"],xtwoheadleftarrow:[["twoheadleftarrow"],.888,334,"xMinYMin"],xtwoheadrightarrow:[["twoheadrightarrow"],.888,334,"xMaxYMin"],overleftrightarrow:[["leftarrow","rightarrow"],.888,522],overbrace:[["leftbrace","midbrace","rightbrace"],1.6,548],underbrace:[["leftbraceunder","midbraceunder","rightbraceunder"],1.6,548],underleftrightarrow:[["leftarrow","rightarrow"],.888,522],xleftrightarrow:[["leftarrow","rightarrow"],1.75,522],xLeftrightarrow:[["doubleleftarrow","doublerightarrow"],1.75,560],xrightleftharpoons:[["leftharpoondownplus","rightharpoonplus"],1.75,716],xleftrightharpoons:[["leftharpoonplus","rightharpoondownplus"],1.75,716],xhookleftarrow:[["leftarrow","righthook"],1.08,522],xhookrightarrow:[["lefthook","rightarrow"],1.08,522],overlinesegment:[["leftlinesegment","rightlinesegment"],.888,522],underlinesegment:[["leftlinesegment","rightlinesegment"],.888,522],overbracket:[["leftbracketover","rightbracketover"],1.6,440],underbracket:[["leftbracketunder","rightbracketunder"],1.6,410],overgroup:[["leftgroup","rightgroup"],.888,342],undergroup:[["leftgroupunder","rightgroupunder"],.888,342],xmapsto:[["leftmapsto","rightarrow"],1.5,522],xtofrom:[["leftToFrom","rightToFrom"],1.75,528],xrightleftarrows:[["baraboveleftarrow","rightarrowabovebar"],1.75,901],xrightequilibrium:[["baraboveshortleftharpoon","rightharpoonaboveshortbar"],1.75,716],xleftequilibrium:[["shortbaraboveleftharpoon","shortrightharpoonabovebar"],1.75,716]},y9n=new Set(["widehat","widecheck","widetilde","utilde"]),cy=function(n,t){function r(){var o=4e5,l=n.label.slice(1);if(y9n.has(l)&&"base"in n){var u=n.base.type==="ordgroup"?n.base.body.length:1,h,_,p;if(u>5)l==="widehat"||l==="widecheck"?(h=420,o=2364,p=.42,_=l+"4"):(h=312,o=2340,p=.34,_="tilde4");else{var m=[1,1,2,2,3,3][u];l==="widehat"||l==="widecheck"?(o=[0,1062,2364,2364,2364][m],h=[0,239,300,360,420][m],p=[0,.24,.3,.3,.36,.42][m],_=l+m):(o=[0,600,1033,2339,2340][m],h=[0,260,286,306,312][m],p=[0,.26,.286,.3,.306,.34][m],_="tilde"+m)}var x=new ku(_),k=new sc([x],{width:"100%",height:tt(p),viewBox:"0 0 "+o+" "+h,preserveAspectRatio:"none"});return{span:Su([],[k],t),minWidth:0,height:p}}else{var v=[],b=b9n[l];if(!b)throw new Error('No SVG data for "'+l+'".');var[w,y,C]=b,E=C/1e3,N=w.length,A,j;if(N===1){if(b.length!==4)throw new Error('Expected 4-tuple for single-path SVG data "'+l+'".');A=["hide-tail"],j=[b[3]]}else if(N===2)A=["halfarrow-left","halfarrow-right"],j=["xMinYMin","xMaxYMin"];else if(N===3)A=["brace-left","brace-center","brace-right"],j=["xMinYMin","xMidYMin","xMaxYMin"];else throw new Error(`Correct katexImagesData or update code here to support + `+N+" children.");for(var M=0;M0&&(s.style.minWidth=tt(i)),s},x9n=function(n,t,r,s,i){var a,o=n.height+n.depth+r+s;if(/fbox|color|angl/.test(t)){if(a=We(["stretchy",t],[],i),t==="fbox"){var l=i.color&&i.getColor();l&&(a.style.borderColor=l)}}else{var u=[];/^[bx]cancel$/.test(t)&&u.push(new u5({x1:"0",y1:"0",x2:"100%",y2:"100%","stroke-width":"0.046em"})),/^x?cancel$/.test(t)&&u.push(new u5({x1:"0",y1:"100%",x2:"100%",y2:"0","stroke-width":"0.046em"}));var h=new sc(u,{width:"100%",height:tt(o)});a=Su([],[h],i)}return a.height=o,a.style.height=tt(o),a},w9n={bin:1,close:1,inner:1,open:1,punct:1,rel:1},k9n={"accent-token":1,mathord:1,"op-token":1,spacing:1,textord:1};function S9n(e){return e in w9n}function on(e,n){if(!e||e.type!==n)throw new Error("Expected node of type "+n+", but got "+(e?"node of type "+e.type:String(e)));return e}function uy(e){var n=_y(e);if(!n)throw new Error("Expected node of symbol group type, but got "+(e?"node of type "+e.type:String(e)));return n}function _y(e){return e&&(e.type==="atom"||k9n.hasOwnProperty(e.type))?e:null}var zP=e=>{if(e instanceof aa)return e;if(X8n(e)&&e.children.length===1)return zP(e.children[0])},O6=(e,n)=>{var t,r,s;e&&e.type==="supsub"?(r=on(e.base,"accent"),t=r.base,e.base=t,s=Q8n(qn(e,n)),e.base=r):(r=on(e,"accent"),t=r.base);var i=qn(t,n.havingCrampedStyle()),a=r.isShifty&&oc(t),o=0;if(a){var l,u;o=(l=(u=zP(i))==null?void 0:u.skew)!=null?l:0}var h=r.label==="\\c",_=h?i.height+i.depth:Math.min(i.height,n.fontMetrics().xHeight),p;if(r.isStretchy)p=cy(r,n),p=Fn({positionType:"firstBaseline",children:[{type:"elem",elem:i},{type:"elem",elem:p,wrapperClasses:["svg-align"],wrapperStyle:o>0?{width:"calc(100% - "+tt(2*o)+")",marginLeft:tt(2*o)}:void 0}]});else{var m,x;r.label==="\\vec"?(m=xP("vec",n),x=yP.vec[1]):(m=oy({mode:r.mode,text:r.label},n,"textord"),m=W8n(m),m.italic=0,x=m.width,h&&(_+=m.depth)),p=We(["accent-body"],[m]);var k=r.label==="\\textcircled";k&&(p.classes.push("accent-full"),_=i.height);var v=o;k||(v-=x/2),p.style.left=tt(v),r.label==="\\textcircled"&&(p.style.top=".2em"),p=Fn({positionType:"firstBaseline",children:[{type:"elem",elem:i},{type:"kern",size:-_},{type:"elem",elem:p}]})}var b=We(["mord","accent"],[p],n);return s?(s.children[0]=b,s.height=Math.max(b.height,s.height),s.classes[0]="mord",s):b},jP=(e,n)=>{var t=e.isStretchy?ly(e.label):new Je("mo",[Ma(e.label,e.mode)]),r=new Je("mover",[cr(e.base,n),t]);return r.setAttribute("accent","true"),r},C9n=new RegExp(["\\acute","\\grave","\\ddot","\\tilde","\\bar","\\breve","\\check","\\hat","\\vec","\\dot","\\mathring"].map(e=>"\\"+e).join("|"));dt({type:"accent",names:["\\acute","\\grave","\\ddot","\\tilde","\\bar","\\breve","\\check","\\hat","\\vec","\\dot","\\mathring","\\widecheck","\\widehat","\\widetilde","\\overrightarrow","\\overleftarrow","\\Overrightarrow","\\overleftrightarrow","\\overgroup","\\overlinesegment","\\overleftharpoon","\\overrightharpoon"],props:{numArgs:1},handler:(e,n)=>{var t=Vv(n[0]),r=!C9n.test(e.funcName),s=!r||e.funcName==="\\widehat"||e.funcName==="\\widetilde"||e.funcName==="\\widecheck";return{type:"accent",mode:e.parser.mode,label:e.funcName,isStretchy:r,isShifty:s,base:t}},htmlBuilder:O6,mathmlBuilder:jP});dt({type:"accent",names:["\\'","\\`","\\^","\\~","\\=","\\u","\\.",'\\"',"\\c","\\r","\\H","\\v","\\textcircled"],props:{numArgs:1,allowedInText:!0,allowedInMath:!0,argTypes:["primitive"]},handler:(e,n)=>{var t=n[0],r=e.parser.mode;return r==="math"&&(e.parser.settings.reportNonstrict("mathVsTextAccents","LaTeX's accent "+e.funcName+" works only in text mode"),r="text"),{type:"accent",mode:r,label:e.funcName,isStretchy:!1,isShifty:!0,base:t}},htmlBuilder:O6,mathmlBuilder:jP});dt({type:"accentUnder",names:["\\underleftarrow","\\underrightarrow","\\underleftrightarrow","\\undergroup","\\underlinesegment","\\utilde"],props:{numArgs:1},handler:(e,n)=>{var{parser:t,funcName:r}=e,s=n[0];return{type:"accentUnder",mode:t.mode,label:r,base:s}},htmlBuilder:(e,n)=>{var t=qn(e.base,n),r=cy(e,n),s=e.label==="\\utilde"?.12:0,i=Fn({positionType:"top",positionData:t.height,children:[{type:"elem",elem:r,wrapperClasses:["svg-align"]},{type:"kern",size:s},{type:"elem",elem:t}]});return We(["mord","accentunder"],[i],n)},mathmlBuilder:(e,n)=>{var t=ly(e.label),r=new Je("munder",[cr(e.base,n),t]);return r.setAttribute("accentunder","true"),r}});var h1=e=>{var n=new Je("mpadded",e?[e]:[]);return n.setAttribute("width","+0.6em"),n.setAttribute("lspace","0.3em"),n};dt({type:"xArrow",names:["\\xleftarrow","\\xrightarrow","\\xLeftarrow","\\xRightarrow","\\xleftrightarrow","\\xLeftrightarrow","\\xhookleftarrow","\\xhookrightarrow","\\xmapsto","\\xrightharpoondown","\\xrightharpoonup","\\xleftharpoondown","\\xleftharpoonup","\\xrightleftharpoons","\\xleftrightharpoons","\\xlongequal","\\xtwoheadrightarrow","\\xtwoheadleftarrow","\\xtofrom","\\xrightleftarrows","\\xrightequilibrium","\\xleftequilibrium","\\\\cdrightarrow","\\\\cdleftarrow","\\\\cdlongequal"],props:{numArgs:1,numOptionalArgs:1},handler(e,n,t){var{parser:r,funcName:s}=e;return{type:"xArrow",mode:r.mode,label:s,body:n[0],below:t[0]}},htmlBuilder(e,n){var t=n.style,r=n.havingStyle(t.sup()),s=oh(qn(e.body,r,n),n),i=e.label.slice(0,2)==="\\x"?"x":"cd";s.classes.push(i+"-arrow-pad");var a;e.below&&(r=n.havingStyle(t.sub()),a=oh(qn(e.below,r,n),n),a.classes.push(i+"-arrow-pad"));var o=cy(e,n),l=-n.fontMetrics().axisHeight+.5*o.height,u=-n.fontMetrics().axisHeight-.5*o.height-.111;(s.depth>.25||e.label==="\\xleftequilibrium")&&(u-=s.depth);var h;if(a){var _=-n.fontMetrics().axisHeight+a.height+.5*o.height+.111;h=Fn({positionType:"individualShift",children:[{type:"elem",elem:s,shift:u},{type:"elem",elem:o,shift:l,wrapperClasses:["svg-align"]},{type:"elem",elem:a,shift:_}]})}else h=Fn({positionType:"individualShift",children:[{type:"elem",elem:s,shift:u},{type:"elem",elem:o,shift:l,wrapperClasses:["svg-align"]}]});return We(["mrel","x-arrow"],[h],n)},mathmlBuilder(e,n){var t=ly(e.label);t.setAttribute("minsize",e.label.charAt(0)==="x"?"1.75em":"3.0em");var r;if(e.body){var s=h1(cr(e.body,n));if(e.below){var i=h1(cr(e.below,n));r=new Je("munderover",[t,i,s])}else r=new Je("mover",[t,s])}else if(e.below){var a=h1(cr(e.below,n));r=new Je("munder",[t,a])}else r=h1(),r=new Je("mover",[t,r]);return r}});function TP(e,n){var t=bs(e.body,n,!0);return We([e.mclass],t,n)}function AP(e,n){var t,r=_a(e.body,n);return e.mclass==="minner"?t=new Je("mpadded",r):e.mclass==="mord"?e.isCharacterBox?(t=r[0],t.type="mi"):t=new Je("mi",r):(e.isCharacterBox?(t=r[0],t.type="mo"):t=new Je("mo",r),e.mclass==="mbin"?(t.attributes.lspace="0.22em",t.attributes.rspace="0.22em"):e.mclass==="mpunct"?(t.attributes.lspace="0em",t.attributes.rspace="0.17em"):e.mclass==="mopen"||e.mclass==="mclose"?(t.attributes.lspace="0em",t.attributes.rspace="0em"):e.mclass==="minner"&&(t.attributes.lspace="0.0556em",t.attributes.width="+0.1111em")),t}dt({type:"mclass",names:["\\mathord","\\mathbin","\\mathrel","\\mathopen","\\mathclose","\\mathpunct","\\mathinner"],props:{numArgs:1,primitive:!0},handler(e,n){var{parser:t,funcName:r}=e,s=n[0];return{type:"mclass",mode:t.mode,mclass:"m"+r.slice(5),body:is(s),isCharacterBox:oc(s)}},htmlBuilder:TP,mathmlBuilder:AP});var fy=e=>{var n=e.type==="ordgroup"&&e.body.length?e.body[0]:e;return n.type==="atom"&&(n.family==="bin"||n.family==="rel")?"m"+n.family:"mord"};dt({type:"mclass",names:["\\@binrel"],props:{numArgs:2},handler(e,n){var{parser:t}=e;return{type:"mclass",mode:t.mode,mclass:fy(n[0]),body:is(n[1]),isCharacterBox:oc(n[1])}}});dt({type:"mclass",names:["\\stackrel","\\overset","\\underset"],props:{numArgs:2},handler(e,n){var{parser:t,funcName:r}=e,s=n[1],i=n[0],a;r!=="\\stackrel"?a=fy(s):a="mrel";var o={type:"op",mode:s.mode,limits:!0,alwaysHandleSupSub:!0,parentIsSupSub:!1,symbol:!1,suppressBaseShift:r!=="\\stackrel",body:is(s)},l={type:"supsub",mode:i.mode,base:o,sup:r==="\\underset"?null:i,sub:r==="\\underset"?i:null};return{type:"mclass",mode:t.mode,mclass:a,body:[l],isCharacterBox:oc(l)}},htmlBuilder:TP,mathmlBuilder:AP});dt({type:"pmb",names:["\\pmb"],props:{numArgs:1,allowedInText:!0},handler(e,n){var{parser:t}=e;return{type:"pmb",mode:t.mode,mclass:fy(n[0]),body:is(n[0])}},htmlBuilder(e,n){var t=bs(e.body,n,!0),r=We([e.mclass],t,n);return r.style.textShadow="0.02em 0.01em 0.04px",r},mathmlBuilder(e,n){var t=_a(e.body,n),r=new Je("mstyle",t);return r.setAttribute("style","text-shadow: 0.02em 0.01em 0.04px"),r}});var E9n={">":"\\\\cdrightarrow","<":"\\\\cdleftarrow","=":"\\\\cdlongequal",A:"\\uparrow",V:"\\downarrow","|":"\\Vert",".":"no arrow"},aA=()=>({type:"styling",body:[],mode:"math",style:"display",resetFont:!0}),oA=e=>e.type==="textord"&&e.text==="@",N9n=(e,n)=>(e.type==="mathord"||e.type==="atom")&&e.text===n;function z9n(e,n,t){var r=E9n[e];switch(r){case"\\\\cdrightarrow":case"\\\\cdleftarrow":return t.callFunction(r,[n[0]],[n[1]]);case"\\uparrow":case"\\downarrow":{var s=t.callFunction("\\\\cdleft",[n[0]],[]),i={type:"atom",text:r,mode:"math",family:"rel"},a=t.callFunction("\\Big",[i],[]),o=t.callFunction("\\\\cdright",[n[1]],[]),l={type:"ordgroup",mode:"math",body:[s,a,o]};return t.callFunction("\\\\cdparent",[l],[])}case"\\\\cdlongequal":return t.callFunction("\\\\cdlongequal",[],[]);case"\\Vert":{var u={type:"textord",text:"\\Vert",mode:"math"};return t.callFunction("\\Big",[u],[])}default:return{type:"textord",text:" ",mode:"math"}}}function j9n(e){var n=[];for(e.gullet.beginGroup(),e.gullet.macros.set("\\cr","\\\\\\relax"),e.gullet.beginGroup();;){n.push(e.parseExpression(!1,"\\\\")),e.gullet.endGroup(),e.gullet.beginGroup();var t=e.fetch().text;if(t==="&"||t==="\\\\")e.consume();else if(t==="\\end"){n[n.length-1].length===0&&n.pop();break}else throw new Ze("Expected \\\\ or \\cr or \\end",e.nextToken)}for(var r=[],s=[r],i=0;iAV".includes(u))for(var _=0;_<2;_++){for(var p=!0,m=l+1;mAV=|." after @',a[l]);var x=z9n(u,h,e),k={type:"styling",body:[x],mode:"math",style:"display",resetFont:!0};r.push(k),o=aA()}i%2===0?r.push(o):r.shift(),r=[],s.push(r)}e.gullet.endGroup(),e.gullet.endGroup();var v=new Array(s[0].length).fill({type:"align",align:"c",pregap:.25,postgap:.25});return{type:"array",mode:"math",body:s,arraystretch:1,addJot:!0,rowGaps:[null],cols:v,colSeparationType:"CD",hLinesBeforeRow:new Array(s.length+1).fill([])}}dt({type:"cdlabel",names:["\\\\cdleft","\\\\cdright"],props:{numArgs:1},handler(e,n){var{parser:t,funcName:r}=e;return{type:"cdlabel",mode:t.mode,side:r.slice(4),label:n[0]}},htmlBuilder(e,n){var t=n.havingStyle(n.style.sup()),r=oh(qn(e.label,t,n),n);return r.classes.push("cd-label-"+e.side),r.style.bottom=tt(.8-r.depth),r.height=0,r.depth=0,r},mathmlBuilder(e,n){var t=new Je("mrow",[cr(e.label,n)]);return t=new Je("mpadded",[t]),t.setAttribute("width","0"),e.side==="left"&&t.setAttribute("lspace","-1width"),t.setAttribute("voffset","0.7em"),t=new Je("mstyle",[t]),t.setAttribute("displaystyle","false"),t.setAttribute("scriptlevel","1"),t}});dt({type:"cdlabelparent",names:["\\\\cdparent"],props:{numArgs:1},handler(e,n){var{parser:t}=e;return{type:"cdlabelparent",mode:t.mode,fragment:n[0]}},htmlBuilder(e,n){var t=oh(qn(e.fragment,n),n);return t.classes.push("cd-vert-arrow"),t},mathmlBuilder(e,n){return new Je("mrow",[cr(e.fragment,n)])}});dt({type:"textord",names:["\\@char"],props:{numArgs:1,allowedInText:!0},handler(e,n){for(var{parser:t}=e,r=on(n[0],"ordgroup"),s=r.body,i="",a=0;a=1114111)throw new Ze("\\@char with invalid code point "+i);return l<=65535?u=String.fromCharCode(l):(l-=65536,u=String.fromCharCode((l>>10)+55296,(l&1023)+56320)),{type:"textord",mode:t.mode,text:u}}});var RP=(e,n)=>{var t=bs(e.body,n.withColor(e.color),!1);return cc(t)},MP=(e,n)=>{var t=_a(e.body,n.withColor(e.color)),r=new Je("mstyle",t);return r.setAttribute("mathcolor",e.color),r};dt({type:"color",names:["\\textcolor"],props:{numArgs:2,allowedInText:!0,argTypes:["color","original"]},handler(e,n){var{parser:t}=e,r=on(n[0],"color-token").color,s=n[1];return{type:"color",mode:t.mode,color:r,body:is(s)}},htmlBuilder:RP,mathmlBuilder:MP});dt({type:"color",names:["\\color"],props:{numArgs:1,allowedInText:!0,argTypes:["color"]},handler(e,n){var{parser:t,breakOnTokenText:r}=e,s=on(n[0],"color-token").color;t.gullet.macros.set("\\current@color",s);var i=t.parseExpression(!0,r);return{type:"color",mode:t.mode,color:s,body:i}},htmlBuilder:RP,mathmlBuilder:MP});dt({type:"cr",names:["\\\\"],props:{numArgs:0,numOptionalArgs:0,allowedInText:!0},handler(e,n,t){var{parser:r}=e,s=r.gullet.future().text==="["?r.parseSizeGroup(!0):null,i=!r.settings.displayMode||!r.settings.useStrictBehavior("newLineInDisplayMode","In LaTeX, \\\\ or \\newline does nothing in display mode");return{type:"cr",mode:r.mode,newLine:i,size:s&&on(s,"size").value}},htmlBuilder(e,n){var t=We(["mspace"],[],n);return e.newLine&&(t.classes.push("newline"),e.size&&(t.style.marginTop=tt(Or(e.size,n)))),t},mathmlBuilder(e,n){var t=new Je("mspace");return e.newLine&&(t.setAttribute("linebreak","newline"),e.size&&t.setAttribute("height",tt(Or(e.size,n)))),t}});var x5={"\\global":"\\global","\\long":"\\\\globallong","\\\\globallong":"\\\\globallong","\\def":"\\gdef","\\gdef":"\\gdef","\\edef":"\\xdef","\\xdef":"\\xdef","\\let":"\\\\globallet","\\futurelet":"\\\\globalfuture"},OP=e=>{var n=e.text;if(/^(?:[\\{}$&#^_]|EOF)$/.test(n))throw new Ze("Expected a control sequence",e);return n},T9n=e=>{var n=e.gullet.popToken();return n.text==="="&&(n=e.gullet.popToken(),n.text===" "&&(n=e.gullet.popToken())),n},DP=(e,n,t,r)=>{var s=e.gullet.macros.get(t.text);s==null&&(t.noexpand=!0,s={tokens:[t],numArgs:0,unexpandable:!e.gullet.isExpandable(t.text)}),e.gullet.macros.set(n,s,r)};dt({type:"internal",names:["\\global","\\long","\\\\globallong"],props:{numArgs:0,allowedInText:!0},handler(e){var{parser:n,funcName:t}=e;n.consumeSpaces();var r=n.fetch();if(x5[r.text])return(t==="\\global"||t==="\\\\globallong")&&(r.text=x5[r.text]),on(n.parseFunction(),"internal");throw new Ze("Invalid token after macro prefix",r)}});dt({type:"internal",names:["\\def","\\gdef","\\edef","\\xdef"],props:{numArgs:0,allowedInText:!0,primitive:!0},handler(e){var{parser:n,funcName:t}=e,r=n.gullet.popToken(),s=r.text;if(/^(?:[\\{}$&#^_]|EOF)$/.test(s))throw new Ze("Expected a control sequence",r);for(var i=0,a,o=[[]];n.gullet.future().text!=="{";)if(r=n.gullet.popToken(),r.text==="#"){if(n.gullet.future().text==="{"){a=n.gullet.future(),o[i].push("{");break}if(r=n.gullet.popToken(),!/^[1-9]$/.test(r.text))throw new Ze('Invalid argument number "'+r.text+'"');if(parseInt(r.text)!==i+1)throw new Ze('Argument number "'+r.text+'" out of order');i++,o.push([])}else{if(r.text==="EOF")throw new Ze("Expected a macro definition");o[i].push(r.text)}var{tokens:l}=n.gullet.consumeArg();return a&&l.unshift(a),(t==="\\edef"||t==="\\xdef")&&(l=n.gullet.expandTokens(l),l.reverse()),n.gullet.macros.set(s,{tokens:l,numArgs:i,delimiters:o},t===x5[t]),{type:"internal",mode:n.mode}}});dt({type:"internal",names:["\\let","\\\\globallet"],props:{numArgs:0,allowedInText:!0,primitive:!0},handler(e){var{parser:n,funcName:t}=e,r=OP(n.gullet.popToken());n.gullet.consumeSpaces();var s=T9n(n);return DP(n,r,s,t==="\\\\globallet"),{type:"internal",mode:n.mode}}});dt({type:"internal",names:["\\futurelet","\\\\globalfuture"],props:{numArgs:0,allowedInText:!0,primitive:!0},handler(e){var{parser:n,funcName:t}=e,r=OP(n.gullet.popToken()),s=n.gullet.popToken(),i=n.gullet.popToken();return DP(n,r,i,t==="\\\\globalfuture"),n.gullet.pushToken(i),n.gullet.pushToken(s),{type:"internal",mode:n.mode}}});var Up=function(n,t,r){var s=Sr.math[n]&&Sr.math[n].replace,i=j6(s||n,t,r);if(!i)throw new Error("Unsupported symbol "+n+" and font size "+t+".");return i},D6=function(n,t,r,s){var i=r.havingBaseStyle(t),a=We(s.concat(i.sizingClasses(r)),[n],r),o=i.sizeMultiplier/r.sizeMultiplier;return a.height*=o,a.depth*=o,a.maxFontSize=i.sizeMultiplier,a},LP=function(n,t,r){var s=t.havingBaseStyle(r),i=(1-t.sizeMultiplier/s.sizeMultiplier)*t.fontMetrics().axisHeight;n.classes.push("delimcenter"),n.style.top=tt(i),n.height-=i,n.depth+=i},A9n=function(n,t,r,s,i,a){var o=li(n,"Main-Regular",i,s),l=D6(o,t,s,a);return LP(l,s,t),l},R9n=function(n,t,r,s){return li(n,"Size"+t+"-Regular",r,s)},IP=function(n,t,r,s,i,a){var o=R9n(n,t,i,s),l=D6(We(["delimsizing","size"+t],[o],s),en.TEXT,s,a);return r&&LP(l,s,en.TEXT),l},Dw=function(n,t,r){var s;t==="Size1-Regular"?s="delim-size1":s="delim-size4";var i=We(["delimsizinginner",s],[We([],[li(n,t,r)])]);return{type:"elem",elem:i}},Lw=function(n,t,r){var s=Bo["Size4-Regular"][n.charCodeAt(0)]?Bo["Size4-Regular"][n.charCodeAt(0)][4]:Bo["Size1-Regular"][n.charCodeAt(0)][4],i=new ku("inner",F8n(n,Math.round(1e3*t))),a=new sc([i],{width:tt(s),height:tt(t),style:"width:"+tt(s),viewBox:"0 0 "+1e3*s+" "+Math.round(1e3*t),preserveAspectRatio:"xMinYMin"}),o=Su([],[a],r);return o.height=t,o.style.height=tt(t),o.style.width=tt(s),{type:"elem",elem:o}},w5=.008,p1={type:"kern",size:-1*w5},M9n=new Set(["|","\\lvert","\\rvert","\\vert"]),O9n=new Set(["\\|","\\lVert","\\rVert","\\Vert"]),$P=function(n,t,r,s,i,a){var o,l,u,h,_="",p=0;o=u=h=n,l=null;var m="Size1-Regular";n==="\\uparrow"?u=h="⏐":n==="\\Uparrow"?u=h="‖":n==="\\downarrow"?o=u="⏐":n==="\\Downarrow"?o=u="‖":n==="\\updownarrow"?(o="\\uparrow",u="⏐",h="\\downarrow"):n==="\\Updownarrow"?(o="\\Uparrow",u="‖",h="\\Downarrow"):M9n.has(n)?(u="∣",_="vert",p=333):O9n.has(n)?(u="∥",_="doublevert",p=556):n==="["||n==="\\lbrack"?(o="⎡",u="⎢",h="⎣",m="Size4-Regular",_="lbrack",p=667):n==="]"||n==="\\rbrack"?(o="⎤",u="⎥",h="⎦",m="Size4-Regular",_="rbrack",p=667):n==="\\lfloor"||n==="⌊"?(u=o="⎢",h="⎣",m="Size4-Regular",_="lfloor",p=667):n==="\\lceil"||n==="⌈"?(o="⎡",u=h="⎢",m="Size4-Regular",_="lceil",p=667):n==="\\rfloor"||n==="⌋"?(u=o="⎥",h="⎦",m="Size4-Regular",_="rfloor",p=667):n==="\\rceil"||n==="⌉"?(o="⎤",u=h="⎥",m="Size4-Regular",_="rceil",p=667):n==="("||n==="\\lparen"?(o="⎛",u="⎜",h="⎝",m="Size4-Regular",_="lparen",p=875):n===")"||n==="\\rparen"?(o="⎞",u="⎟",h="⎠",m="Size4-Regular",_="rparen",p=875):n==="\\{"||n==="\\lbrace"?(o="⎧",l="⎨",h="⎩",u="⎪",m="Size4-Regular"):n==="\\}"||n==="\\rbrace"?(o="⎫",l="⎬",h="⎭",u="⎪",m="Size4-Regular"):n==="\\lgroup"||n==="⟮"?(o="⎧",h="⎩",u="⎪",m="Size4-Regular"):n==="\\rgroup"||n==="⟯"?(o="⎫",h="⎭",u="⎪",m="Size4-Regular"):n==="\\lmoustache"||n==="⎰"?(o="⎧",h="⎭",u="⎪",m="Size4-Regular"):(n==="\\rmoustache"||n==="⎱")&&(o="⎫",h="⎩",u="⎪",m="Size4-Regular");var x=Up(o,m,i),k=x.height+x.depth,v=Up(u,m,i),b=v.height+v.depth,w=Up(h,m,i),y=w.height+w.depth,C=0,E=1;if(l!==null){var N=Up(l,m,i);C=N.height+N.depth,E=2}var A=k+y+C,j=Math.max(0,Math.ceil((t-A)/(E*b))),M=A+j*E*b,L=s.fontMetrics().axisHeight;r&&(L*=s.sizeMultiplier);var I=M/2-L,B=[];if(_.length>0){var q=M-k-y,U=Math.round(M*1e3),W=H8n(_,Math.round(q*1e3)),H=new ku(_,W),Y=tt(p/1e3),te=tt(U/1e3),$=new sc([H],{width:Y,height:te,viewBox:"0 0 "+p+" "+U}),D=Su([],[$],s);D.height=U/1e3,D.style.width=Y,D.style.height=te,B.push({type:"elem",elem:D})}else{if(B.push(Dw(h,m,i)),B.push(p1),l===null){var F=M-k-y+2*w5;B.push(Lw(u,F,s))}else{var G=(M-k-y-C)/2+2*w5;B.push(Lw(u,G,s)),B.push(p1),B.push(Dw(l,m,i)),B.push(p1),B.push(Lw(u,G,s))}B.push(p1),B.push(Dw(o,m,i))}var V=s.havingBaseStyle(en.TEXT),ee=Fn({positionType:"bottom",positionData:I,children:B});return D6(We(["delimsizing","mult"],[ee],V),en.TEXT,s,a)},Iw=80,$w=.08,Bw=function(n,t,r,s,i){var a=P8n(n,s,r),o=new ku(n,a),l=new sc([o],{width:"400em",height:tt(t),viewBox:"0 0 400000 "+r,preserveAspectRatio:"xMinYMin slice"});return Su(["hide-tail"],[l],i)},D9n=function(n,t){var r=t.havingBaseSizing(),s=qP("\\surd",n*r.sizeMultiplier,HP,r),i=r.sizeMultiplier,a=Math.max(0,t.minRuleThickness-t.fontMetrics().sqrtRuleThickness),o,l,u,h,_;return s.type==="small"?(h=1e3+1e3*a+Iw,n<1?i=1:n<1.4&&(i=.7),l=(1+a+$w)/i,u=(1+a)/i,o=Bw("sqrtMain",l,h,a,t),o.style.minWidth="0.853em",_=.833/i):s.type==="large"?(h=(1e3+Iw)*s0[s.size],u=(s0[s.size]+a)/i,l=(s0[s.size]+a+$w)/i,o=Bw("sqrtSize"+s.size,l,h,a,t),o.style.minWidth="1.02em",_=1/i):(l=n+a+$w,u=n+a,h=Math.floor(1e3*n+a)+Iw,o=Bw("sqrtTall",l,h,a,t),o.style.minWidth="0.742em",_=1.056),o.height=u,o.style.height=tt(l),{span:o,advanceWidth:_,ruleWidth:(t.fontMetrics().sqrtRuleThickness+a)*i}},BP=new Set(["(","\\lparen",")","\\rparen","[","\\lbrack","]","\\rbrack","\\{","\\lbrace","\\}","\\rbrace","\\lfloor","\\rfloor","⌊","⌋","\\lceil","\\rceil","⌈","⌉","\\surd"]),L9n=new Set(["\\uparrow","\\downarrow","\\updownarrow","\\Uparrow","\\Downarrow","\\Updownarrow","|","\\|","\\vert","\\Vert","\\lvert","\\rvert","\\lVert","\\rVert","\\lgroup","\\rgroup","⟮","⟯","\\lmoustache","\\rmoustache","⎰","⎱"]),PP=new Set(["<",">","\\langle","\\rangle","/","\\backslash","\\lt","\\gt"]),s0=[0,1.2,1.8,2.4,3],FP=function(n,t,r,s,i){if(n==="<"||n==="\\lt"||n==="⟨"?n="\\langle":(n===">"||n==="\\gt"||n==="⟩")&&(n="\\rangle"),BP.has(n)||PP.has(n))return IP(n,t,!1,r,s,i);if(L9n.has(n))return $P(n,s0[t],!1,r,s,i);throw new Ze("Illegal delimiter: '"+n+"'")},I9n=[{type:"small",style:en.SCRIPTSCRIPT},{type:"small",style:en.SCRIPT},{type:"small",style:en.TEXT},{type:"large",size:1},{type:"large",size:2},{type:"large",size:3},{type:"large",size:4}],$9n=[{type:"small",style:en.SCRIPTSCRIPT},{type:"small",style:en.SCRIPT},{type:"small",style:en.TEXT},{type:"stack"}],HP=[{type:"small",style:en.SCRIPTSCRIPT},{type:"small",style:en.SCRIPT},{type:"small",style:en.TEXT},{type:"large",size:1},{type:"large",size:2},{type:"large",size:3},{type:"large",size:4},{type:"stack"}],B9n=function(n){if(n.type==="small")return"Main-Regular";if(n.type==="large")return"Size"+n.size+"-Regular";if(n.type==="stack")return"Size4-Regular";var t=n.type;throw new Error("Add support for delim type '"+t+"' here.")},qP=function(n,t,r,s){for(var i=Math.min(2,3-s.style.size),a=i;at)return o}return r[r.length-1]},k5=function(n,t,r,s,i,a){n==="<"||n==="\\lt"||n==="⟨"?n="\\langle":(n===">"||n==="\\gt"||n==="⟩")&&(n="\\rangle");var o;PP.has(n)?o=I9n:BP.has(n)?o=HP:o=$9n;var l=qP(n,t,o,s);return l.type==="small"?A9n(n,l.style,r,s,i,a):l.type==="large"?IP(n,l.size,r,s,i,a):$P(n,t,r,s,i,a)},Pw=function(n,t,r,s,i,a){var o=s.fontMetrics().axisHeight*s.sizeMultiplier,l=901,u=5/s.fontMetrics().ptPerEm,h=Math.max(t-o,r+o),_=Math.max(h/500*l,2*h-u);return k5(n,_,!0,s,i,a)},lA={"\\bigl":{mclass:"mopen",size:1},"\\Bigl":{mclass:"mopen",size:2},"\\biggl":{mclass:"mopen",size:3},"\\Biggl":{mclass:"mopen",size:4},"\\bigr":{mclass:"mclose",size:1},"\\Bigr":{mclass:"mclose",size:2},"\\biggr":{mclass:"mclose",size:3},"\\Biggr":{mclass:"mclose",size:4},"\\bigm":{mclass:"mrel",size:1},"\\Bigm":{mclass:"mrel",size:2},"\\biggm":{mclass:"mrel",size:3},"\\Biggm":{mclass:"mrel",size:4},"\\big":{mclass:"mord",size:1},"\\Big":{mclass:"mord",size:2},"\\bigg":{mclass:"mord",size:3},"\\Bigg":{mclass:"mord",size:4}},P9n=new Set(["(","\\lparen",")","\\rparen","[","\\lbrack","]","\\rbrack","\\{","\\lbrace","\\}","\\rbrace","\\lfloor","\\rfloor","⌊","⌋","\\lceil","\\rceil","⌈","⌉","<",">","\\langle","⟨","\\rangle","⟩","\\lt","\\gt","\\lvert","\\rvert","\\lVert","\\rVert","\\lgroup","\\rgroup","⟮","⟯","\\lmoustache","\\rmoustache","⎰","⎱","/","\\backslash","|","\\vert","\\|","\\Vert","\\uparrow","\\Uparrow","\\downarrow","\\Downarrow","\\updownarrow","\\Updownarrow","."]);function cA(e){return"isMiddle"in e}function dy(e,n){var t=_y(e);if(t&&P9n.has(t.text))return t;throw t?new Ze("Invalid delimiter '"+t.text+"' after '"+n.funcName+"'",e):new Ze("Invalid delimiter type '"+e.type+"'",e)}dt({type:"delimsizing",names:["\\bigl","\\Bigl","\\biggl","\\Biggl","\\bigr","\\Bigr","\\biggr","\\Biggr","\\bigm","\\Bigm","\\biggm","\\Biggm","\\big","\\Big","\\bigg","\\Bigg"],props:{numArgs:1,argTypes:["primitive"]},handler:(e,n)=>{var t=dy(n[0],e);return{type:"delimsizing",mode:e.parser.mode,size:lA[e.funcName].size,mclass:lA[e.funcName].mclass,delim:t.text}},htmlBuilder:(e,n)=>e.delim==="."?We([e.mclass]):FP(e.delim,e.size,n,e.mode,[e.mclass]),mathmlBuilder:e=>{var n=[];e.delim!=="."&&n.push(Ma(e.delim,e.mode));var t=new Je("mo",n);e.mclass==="mopen"||e.mclass==="mclose"?t.setAttribute("fence","true"):t.setAttribute("fence","false"),t.setAttribute("stretchy","true");var r=tt(s0[e.size]);return t.setAttribute("minsize",r),t.setAttribute("maxsize",r),t}});function uA(e){if(!e.body)throw new Error("Bug: The leftright ParseNode wasn't fully parsed.")}dt({type:"leftright-right",names:["\\right"],props:{numArgs:1,primitive:!0},handler:(e,n)=>{var t=e.parser.gullet.macros.get("\\current@color");if(t&&typeof t!="string")throw new Ze("\\current@color set to non-string in \\right");return{type:"leftright-right",mode:e.parser.mode,delim:dy(n[0],e).text,color:t}}});dt({type:"leftright",names:["\\left"],props:{numArgs:1,primitive:!0},handler:(e,n)=>{var t=dy(n[0],e),r=e.parser;++r.leftrightDepth;var s=r.parseExpression(!1);--r.leftrightDepth,r.expect("\\right",!1);var i=on(r.parseFunction(),"leftright-right");return{type:"leftright",mode:r.mode,body:s,left:t.text,right:i.delim,rightColor:i.color}},htmlBuilder:(e,n)=>{uA(e);for(var t=bs(e.body,n,!0,["mopen","mclose"]),r=0,s=0,i=!1,a=0;a{uA(e);var t=_a(e.body,n);if(e.left!=="."){var r=new Je("mo",[Ma(e.left,e.mode)]);r.setAttribute("fence","true"),t.unshift(r)}if(e.right!=="."){var s=new Je("mo",[Ma(e.right,e.mode)]);s.setAttribute("fence","true"),e.rightColor&&s.setAttribute("mathcolor",e.rightColor),t.push(s)}return R6(t)}});dt({type:"middle",names:["\\middle"],props:{numArgs:1,primitive:!0},handler:(e,n)=>{var t=dy(n[0],e);if(!e.parser.leftrightDepth)throw new Ze("\\middle without preceding \\left",t);return{type:"middle",mode:e.parser.mode,delim:t.text}},htmlBuilder:(e,n)=>{var t;return e.delim==="."?t=R0(n,[]):(t=FP(e.delim,1,n,e.mode,[]),t.isMiddle={delim:e.delim,options:n}),t},mathmlBuilder:(e,n)=>{var t=e.delim==="\\vert"||e.delim==="|"?Ma("|","text"):Ma(e.delim,e.mode),r=new Je("mo",[t]);return r.setAttribute("fence","true"),r.setAttribute("lspace","0.05em"),r.setAttribute("rspace","0.05em"),r}});var hy=(e,n)=>{var t=oh(qn(e.body,n),n),r=e.label.slice(1),s=n.sizeMultiplier,i,a,o=oc(e.body);if(r==="sout")i=We(["stretchy","sout"]),i.height=n.fontMetrics().defaultRuleThickness/s,a=-.5*n.fontMetrics().xHeight;else if(r==="phase"){var l=Or({number:.6,unit:"pt"},n),u=Or({number:.35,unit:"ex"},n),h=n.havingBaseSizing();s=s/h.sizeMultiplier;var _=t.height+t.depth+l+u;t.style.paddingLeft=tt(_/2+l);var p=Math.floor(1e3*_*s),m=$8n(p),x=new sc([new ku("phase",m)],{width:"400em",height:tt(p/1e3),viewBox:"0 0 400000 "+p,preserveAspectRatio:"xMinYMin slice"});i=Su(["hide-tail"],[x],n),i.style.height=tt(_),a=t.depth+l+u}else{/cancel/.test(r)?o||t.classes.push("cancel-pad"):r==="angl"?t.classes.push("anglpad"):t.classes.push("boxpad");var k,v,b=0;/box/.test(r)?(b=Math.max(n.fontMetrics().fboxrule,n.minRuleThickness),k=n.fontMetrics().fboxsep+(r==="colorbox"?0:b),v=k):r==="angl"?(b=Math.max(n.fontMetrics().defaultRuleThickness,n.minRuleThickness),k=4*b,v=Math.max(0,.25-t.depth)):(k=o?.2:0,v=k),i=x9n(t,r,k,v,n),/fbox|boxed|fcolorbox/.test(r)?(i.style.borderStyle="solid",i.style.borderWidth=tt(b)):r==="angl"&&b!==.049&&(i.style.borderTopWidth=tt(b),i.style.borderRightWidth=tt(b)),a=t.depth+v,e.backgroundColor&&(i.style.backgroundColor=e.backgroundColor,e.borderColor&&(i.style.borderColor=e.borderColor))}var w;if(e.backgroundColor)w=Fn({positionType:"individualShift",children:[{type:"elem",elem:i,shift:a},{type:"elem",elem:t,shift:0}]});else{var y=/cancel|phase/.test(r)?["svg-align"]:[];w=Fn({positionType:"individualShift",children:[{type:"elem",elem:t,shift:0},{type:"elem",elem:i,shift:a,wrapperClasses:y}]})}return/cancel/.test(r)&&(w.height=t.height,w.depth=t.depth),/cancel/.test(r)&&!o?We(["mord","cancel-lap"],[w],n):We(["mord"],[w],n)},py=(e,n)=>{var t,r=new Je(e.label.includes("colorbox")?"mpadded":"menclose",[cr(e.body,n)]);switch(e.label){case"\\cancel":r.setAttribute("notation","updiagonalstrike");break;case"\\bcancel":r.setAttribute("notation","downdiagonalstrike");break;case"\\phase":r.setAttribute("notation","phasorangle");break;case"\\sout":r.setAttribute("notation","horizontalstrike");break;case"\\fbox":r.setAttribute("notation","box");break;case"\\angl":r.setAttribute("notation","actuarial");break;case"\\fcolorbox":case"\\colorbox":if(t=n.fontMetrics().fboxsep*n.fontMetrics().ptPerEm,r.setAttribute("width","+"+2*t+"pt"),r.setAttribute("height","+"+2*t+"pt"),r.setAttribute("lspace",t+"pt"),r.setAttribute("voffset",t+"pt"),e.label==="\\fcolorbox"){var s=Math.max(n.fontMetrics().fboxrule,n.minRuleThickness);r.setAttribute("style","border: "+tt(s)+" solid "+e.borderColor)}break;case"\\xcancel":r.setAttribute("notation","updiagonalstrike downdiagonalstrike");break}return e.backgroundColor&&r.setAttribute("mathbackground",e.backgroundColor),r};dt({type:"enclose",names:["\\colorbox"],props:{numArgs:2,allowedInText:!0,argTypes:["color","hbox"]},handler(e,n,t){var{parser:r,funcName:s}=e,i=on(n[0],"color-token").color,a=n[1];return{type:"enclose",mode:r.mode,label:s,backgroundColor:i,body:a}},htmlBuilder:hy,mathmlBuilder:py});dt({type:"enclose",names:["\\fcolorbox"],props:{numArgs:3,allowedInText:!0,argTypes:["color","color","hbox"]},handler(e,n,t){var{parser:r,funcName:s}=e,i=on(n[0],"color-token").color,a=on(n[1],"color-token").color,o=n[2];return{type:"enclose",mode:r.mode,label:s,backgroundColor:a,borderColor:i,body:o}},htmlBuilder:hy,mathmlBuilder:py});dt({type:"enclose",names:["\\fbox"],props:{numArgs:1,argTypes:["hbox"],allowedInText:!0},handler(e,n){var{parser:t}=e;return{type:"enclose",mode:t.mode,label:"\\fbox",body:n[0]}}});dt({type:"enclose",names:["\\cancel","\\bcancel","\\xcancel","\\phase"],props:{numArgs:1},handler(e,n){var{parser:t,funcName:r}=e,s=n[0];return{type:"enclose",mode:t.mode,label:r,body:s}},htmlBuilder:hy,mathmlBuilder:py});dt({type:"enclose",names:["\\sout"],props:{numArgs:1,allowedInText:!0},handler(e,n){var{parser:t,funcName:r}=e;t.mode==="math"&&t.settings.reportNonstrict("mathVsSout","LaTeX's \\sout works only in text mode");var s=n[0];return{type:"enclose",mode:t.mode,label:r,body:s}},htmlBuilder:hy,mathmlBuilder:py});dt({type:"enclose",names:["\\angl"],props:{numArgs:1,argTypes:["hbox"],allowedInText:!1},handler(e,n){var{parser:t}=e;return{type:"enclose",mode:t.mode,label:"\\angl",body:n[0]}}});var UP={};function tl(e){for(var{type:n,names:t,props:r,handler:s,htmlBuilder:i,mathmlBuilder:a}=e,o={type:n,numArgs:r.numArgs||0,allowedInText:!1,numOptionalArgs:0,handler:s},l=0;l{var n=e.parser.settings;if(!n.displayMode)throw new Ze("{"+e.envName+"} can be used only in display mode.")},F9n=new Set(["gather","gather*"]);function L6(e){if(!e.includes("ed"))return!e.includes("*")}function Mu(e,n,t){var{hskipBeforeAndAfter:r,addJot:s,cols:i,arraystretch:a,colSeparationType:o,autoTag:l,singleRow:u,emptySingleRow:h,maxNumCols:_,leqno:p}=n;if(e.gullet.beginGroup(),u||e.gullet.macros.set("\\cr","\\\\\\relax"),!a){var m=e.gullet.expandMacroAsText("\\arraystretch");if(m==null)a=1;else if(a=parseFloat(m),!a||a<0)throw new Ze("Invalid \\arraystretch: "+m)}e.gullet.beginGroup();var x=[],k=[x],v=[],b=[],w=l!=null?[]:void 0;function y(){l&&e.gullet.macros.set("\\@eqnsw","1",!0)}function C(){w&&(e.gullet.macros.get("\\df@tag")?(w.push(e.subparse([new ra("\\df@tag")])),e.gullet.macros.set("\\df@tag",void 0,!0)):w.push(!!l&&e.gullet.macros.get("\\@eqnsw")==="1"))}for(y(),b.push(_A(e));;){var E=e.parseExpression(!1,u?"\\end":"\\\\");e.gullet.endGroup(),e.gullet.beginGroup();var N={type:"ordgroup",mode:e.mode,body:E};t&&(N={type:"styling",mode:e.mode,style:t,resetFont:!0,body:[N]}),x.push(N);var A=e.fetch().text;if(A==="&"){if(_&&x.length===_){if(u||o)throw new Ze("Too many tab characters: &",e.nextToken);e.settings.reportNonstrict("textEnv","Too few columns specified in the {array} column argument.")}e.consume()}else if(A==="\\end"){C(),x.length===1&&N.type==="styling"&&N.body.length===1&&N.body[0].type==="ordgroup"&&N.body[0].body.length===0&&(k.length>1||!h)&&k.pop(),b.length0&&(y+=.25),u.push({pos:y,isDashed:qe[at]})}for(C(a[0]),r=0;r0&&(I+=w,Aqe))for(r=0;r=o)){var oe=void 0;if(s>0||n.hskipBeforeAndAfter){var le,_e;oe=(le=(_e=V)==null?void 0:_e.pregap)!=null?le:p,oe!==0&&(W=We(["arraycolsep"],[]),W.style.width=tt(oe),U.push(W))}var pe=[];for(r=0;r0){for(var $t=ah("hline",t,h),jt=ah("hdashline",t,h),mt=[{type:"elem",elem:Vt,shift:0}];u.length>0;){var we=u.pop(),ct=we.pos-B;we.isDashed?mt.push({type:"elem",elem:jt,shift:ct}):mt.push({type:"elem",elem:$t,shift:ct})}Vt=Fn({positionType:"individualShift",children:mt})}if(Y.length===0)return We(["mord"],[Vt],t);var ye=Fn({positionType:"individualShift",children:Y}),je=We(["tag"],[ye],t);return cc([Vt,je])},H9n={c:"center ",l:"left ",r:"right "},rl=function(n,t){for(var r=[],s=new Je("mtd",[],["mtr-glue"]),i=new Je("mtd",[],["mml-eqn-num"]),a=0;a0){var x=n.cols,k="",v=!1,b=0,w=x.length;x[0].type==="separator"&&(p+="top ",b=1),x[x.length-1].type==="separator"&&(p+="bottom ",w-=1);for(var y=b;y0?"left ":"",p+=M[M.length-1].length>0?"right ":"";for(var L=1;L0&&m&&(v=1),r[x]={type:"align",align:k,pregap:v,postgap:0}}return a.colSeparationType=m?"align":"alignat",a};tl({type:"array",names:["array","darray"],props:{numArgs:1},handler(e,n){var t=_y(n[0]),r=t?[n[0]]:on(n[0],"ordgroup").body,s=r.map(function(a){var o=uy(a),l=o.text;if("lcr".includes(l))return{type:"align",align:l};if(l==="|")return{type:"separator",separator:"|"};if(l===":")return{type:"separator",separator:":"};throw new Ze("Unknown column alignment: "+l,a)}),i={cols:s,hskipBeforeAndAfter:!0,maxNumCols:s.length};return Mu(e.parser,i,I6(e.envName))},htmlBuilder:nl,mathmlBuilder:rl});tl({type:"array",names:["matrix","pmatrix","bmatrix","Bmatrix","vmatrix","Vmatrix","matrix*","pmatrix*","bmatrix*","Bmatrix*","vmatrix*","Vmatrix*"],props:{numArgs:0},handler(e){var n={matrix:null,pmatrix:["(",")"],bmatrix:["[","]"],Bmatrix:["\\{","\\}"],vmatrix:["|","|"],Vmatrix:["\\Vert","\\Vert"]}[e.envName.replace("*","")],t="c",r={hskipBeforeAndAfter:!1,cols:[{type:"align",align:t}]};if(e.envName.charAt(e.envName.length-1)==="*"){var s=e.parser;if(s.consumeSpaces(),s.fetch().text==="["){if(s.consume(),s.consumeSpaces(),t=s.fetch().text,!"lcr".includes(t))throw new Ze("Expected l or c or r",s.nextToken);s.consume(),s.consumeSpaces(),s.expect("]"),s.consume(),r.cols=[{type:"align",align:t}]}}var i=Mu(e.parser,r,I6(e.envName)),a=Math.max(0,...i.body.map(o=>o.length));return i.cols=new Array(a).fill({type:"align",align:t}),n?{type:"leftright",mode:e.mode,body:[i],left:n[0],right:n[1],rightColor:void 0}:i},htmlBuilder:nl,mathmlBuilder:rl});tl({type:"array",names:["smallmatrix"],props:{numArgs:0},handler(e){var n={arraystretch:.5},t=Mu(e.parser,n,"script");return t.colSeparationType="small",t},htmlBuilder:nl,mathmlBuilder:rl});tl({type:"array",names:["subarray"],props:{numArgs:1},handler(e,n){var t=_y(n[0]),r=t?[n[0]]:on(n[0],"ordgroup").body,s=r.map(function(o){var l=uy(o),u=l.text;if("lc".includes(u))return{type:"align",align:u};throw new Ze("Unknown column alignment: "+u,o)});if(s.length>1)throw new Ze("{subarray} can contain only one column");var i={cols:s,hskipBeforeAndAfter:!1,arraystretch:.5},a=Mu(e.parser,i,"script");if(a.body.length>0&&a.body[0].length>1)throw new Ze("{subarray} can contain only one column");return a},htmlBuilder:nl,mathmlBuilder:rl});tl({type:"array",names:["cases","dcases","rcases","drcases"],props:{numArgs:0},handler(e){var n={arraystretch:1.2,cols:[{type:"align",align:"l",pregap:0,postgap:1},{type:"align",align:"l",pregap:0,postgap:0}]},t=Mu(e.parser,n,I6(e.envName));return{type:"leftright",mode:e.mode,body:[t],left:e.envName.includes("r")?".":"\\{",right:e.envName.includes("r")?"\\}":".",rightColor:void 0}},htmlBuilder:nl,mathmlBuilder:rl});tl({type:"array",names:["align","align*","aligned","split"],props:{numArgs:0},handler:VP,htmlBuilder:nl,mathmlBuilder:rl});tl({type:"array",names:["gathered","gather","gather*"],props:{numArgs:0},handler(e){F9n.has(e.envName)&&my(e);var n={cols:[{type:"align",align:"c"}],addJot:!0,colSeparationType:"gather",autoTag:L6(e.envName),emptySingleRow:!0,leqno:e.parser.settings.leqno};return Mu(e.parser,n,"display")},htmlBuilder:nl,mathmlBuilder:rl});tl({type:"array",names:["alignat","alignat*","alignedat"],props:{numArgs:1},handler:VP,htmlBuilder:nl,mathmlBuilder:rl});tl({type:"array",names:["equation","equation*"],props:{numArgs:0},handler(e){my(e);var n={autoTag:L6(e.envName),emptySingleRow:!0,singleRow:!0,maxNumCols:1,leqno:e.parser.settings.leqno};return Mu(e.parser,n,"display")},htmlBuilder:nl,mathmlBuilder:rl});tl({type:"array",names:["CD"],props:{numArgs:0},handler(e){return my(e),j9n(e.parser)},htmlBuilder:nl,mathmlBuilder:rl});ie("\\nonumber","\\gdef\\@eqnsw{0}");ie("\\notag","\\nonumber");dt({type:"text",names:["\\hline","\\hdashline"],props:{numArgs:0,allowedInText:!0,allowedInMath:!0},handler(e,n){throw new Ze(e.funcName+" valid only within array environment")}});var fA=UP;dt({type:"environment",names:["\\begin","\\end"],props:{numArgs:1,argTypes:["text"]},handler(e,n){var{parser:t,funcName:r}=e,s=n[0];if(s.type!=="ordgroup")throw new Ze("Invalid environment name",s);for(var i="",a=0;a{var t=e.font,r=n.withFont(t);return qn(e.body,r)},WP=(e,n)=>{var t=e.font,r=n.withFont(t);return cr(e.body,r)},dA={"\\Bbb":"\\mathbb","\\bold":"\\mathbf","\\frak":"\\mathfrak"};dt({type:"font",names:["\\mathrm","\\mathit","\\mathbf","\\mathnormal","\\mathsfit","\\mathbb","\\mathcal","\\mathfrak","\\mathscr","\\mathsf","\\mathtt","\\Bbb","\\bold","\\frak"],props:{numArgs:1,allowedInArgument:!0},handler:(e,n)=>{var{parser:t,funcName:r}=e,s=Vv(n[0]),i=r;return i in dA&&(i=dA[i]),{type:"font",mode:t.mode,font:i.slice(1),body:s}},htmlBuilder:KP,mathmlBuilder:WP});dt({type:"mclass",names:["\\boldsymbol","\\bm"],props:{numArgs:1},handler:(e,n)=>{var{parser:t}=e,r=n[0];return{type:"mclass",mode:t.mode,mclass:fy(r),body:[{type:"font",mode:t.mode,font:"boldsymbol",body:r}],isCharacterBox:oc(r)}}});dt({type:"font",names:["\\rm","\\sf","\\tt","\\bf","\\it","\\cal"],props:{numArgs:0,allowedInText:!0},handler:(e,n)=>{var{parser:t,funcName:r,breakOnTokenText:s}=e,{mode:i}=t,a=t.parseExpression(!0,s);return{type:"font",mode:i,font:"math"+r.slice(1),body:{type:"ordgroup",mode:t.mode,body:a}}},htmlBuilder:KP,mathmlBuilder:WP});var q9n=(e,n)=>{var t=n.style,r=t.fracNum(),s=t.fracDen(),i;i=n.havingStyle(r);var a=qn(e.numer,i,n);if(e.continued){var o=8.5/n.fontMetrics().ptPerEm,l=3.5/n.fontMetrics().ptPerEm;a.height=a.height0?x=3*p:x=7*p,k=n.fontMetrics().denom1):(_>0?(m=n.fontMetrics().num2,x=p):(m=n.fontMetrics().num3,x=3*p),k=n.fontMetrics().denom2);var v;if(h){var w=n.fontMetrics().axisHeight;m-a.depth-(w+.5*_){var t=new Je("mfrac",[cr(e.numer,n),cr(e.denom,n)]);if(!e.hasBarLine)t.setAttribute("linethickness","0px");else if(e.barSize){var r=Or(e.barSize,n);t.setAttribute("linethickness",tt(r))}if(e.leftDelim!=null||e.rightDelim!=null){var s=[];if(e.leftDelim!=null){var i=new Je("mo",[new as(e.leftDelim.replace("\\",""))]);i.setAttribute("fence","true"),s.push(i)}if(s.push(t),e.rightDelim!=null){var a=new Je("mo",[new as(e.rightDelim.replace("\\",""))]);a.setAttribute("fence","true"),s.push(a)}return R6(s)}return t},QP=(e,n)=>{if(!n)return e;var t={type:"styling",mode:e.mode,style:n,body:[e]};return t};dt({type:"genfrac",names:["\\cfrac","\\dfrac","\\frac","\\tfrac","\\dbinom","\\binom","\\tbinom","\\\\atopfrac","\\\\bracefrac","\\\\brackfrac"],props:{numArgs:2,allowedInArgument:!0},handler:(e,n)=>{var{parser:t,funcName:r}=e,s=n[0],i=n[1],a,o=null,l=null;switch(r){case"\\cfrac":case"\\dfrac":case"\\frac":case"\\tfrac":a=!0;break;case"\\\\atopfrac":a=!1;break;case"\\dbinom":case"\\binom":case"\\tbinom":a=!1,o="(",l=")";break;case"\\\\bracefrac":a=!1,o="\\{",l="\\}";break;case"\\\\brackfrac":a=!1,o="[",l="]";break;default:throw new Error("Unrecognized genfrac command")}var u=r==="\\cfrac",h=null;return u||r.startsWith("\\d")?h="display":r.startsWith("\\t")&&(h="text"),QP({type:"genfrac",mode:t.mode,numer:s,denom:i,continued:u,hasBarLine:a,leftDelim:o,rightDelim:l,barSize:null},h)},htmlBuilder:q9n,mathmlBuilder:U9n});dt({type:"infix",names:["\\over","\\choose","\\atop","\\brace","\\brack"],props:{numArgs:0,infix:!0},handler(e){var{parser:n,funcName:t,token:r}=e,s;switch(t){case"\\over":s="\\frac";break;case"\\choose":s="\\binom";break;case"\\atop":s="\\\\atopfrac";break;case"\\brace":s="\\\\bracefrac";break;case"\\brack":s="\\\\brackfrac";break;default:throw new Error("Unrecognized infix genfrac command")}return{type:"infix",mode:n.mode,replaceWith:s,token:r}}});var hA=["display","text","script","scriptscript"],pA=function(n){var t=null;return n.length>0&&(t=n,t=t==="."?null:t),t};dt({type:"genfrac",names:["\\genfrac"],props:{numArgs:6,allowedInArgument:!0,argTypes:["math","math","size","text","math","math"]},handler(e,n){var{parser:t}=e,r=n[4],s=n[5],i=Vv(n[0]),a=i.type==="atom"&&i.family==="open"?pA(i.text):null,o=Vv(n[1]),l=o.type==="atom"&&o.family==="close"?pA(o.text):null,u=on(n[2],"size"),h,_=null;u.isBlank?h=!0:(_=u.value,h=_.number>0);var p=null,m=n[3];if(m.type==="ordgroup"){if(m.body.length>0){var x=on(m.body[0],"textord");p=hA[Number(x.text)]}}else m=on(m,"textord"),p=hA[Number(m.text)];return QP({type:"genfrac",mode:t.mode,numer:r,denom:s,continued:!1,hasBarLine:h,barSize:_,leftDelim:a,rightDelim:l},p)}});dt({type:"infix",names:["\\above"],props:{numArgs:1,argTypes:["size"],infix:!0},handler(e,n){var{parser:t,funcName:r,token:s}=e;return{type:"infix",mode:t.mode,replaceWith:"\\\\abovefrac",size:on(n[0],"size").value,token:s}}});dt({type:"genfrac",names:["\\\\abovefrac"],props:{numArgs:3,argTypes:["math","size","math"]},handler:(e,n)=>{var{parser:t,funcName:r}=e,s=n[0],i=on(n[1],"infix").size;if(!i)throw new Error("\\\\abovefrac expected size, but got "+String(i));var a=n[2],o=i.number>0;return{type:"genfrac",mode:t.mode,numer:s,denom:a,continued:!1,hasBarLine:o,barSize:i,leftDelim:null,rightDelim:null}}});var XP=(e,n)=>{var t=n.style,r,s;e.type==="supsub"?(r=e.sup?qn(e.sup,n.havingStyle(t.sup()),n):qn(e.sub,n.havingStyle(t.sub()),n),s=on(e.base,"horizBrace")):s=on(e,"horizBrace");var i=qn(s.base,n.havingBaseStyle(en.DISPLAY)),a=cy(s,n),o;if(s.isOver?o=Fn({positionType:"firstBaseline",children:[{type:"elem",elem:i},{type:"kern",size:.1},{type:"elem",elem:a,wrapperClasses:["svg-align"]}]}):o=Fn({positionType:"bottom",positionData:i.depth+.1+a.height,children:[{type:"elem",elem:a,wrapperClasses:["svg-align"]},{type:"kern",size:.1},{type:"elem",elem:i}]}),r){var l=We(["minner",s.isOver?"mover":"munder"],[o],n);s.isOver?o=Fn({positionType:"firstBaseline",children:[{type:"elem",elem:l},{type:"kern",size:.2},{type:"elem",elem:r}]}):o=Fn({positionType:"bottom",positionData:l.depth+.2+r.height+r.depth,children:[{type:"elem",elem:r},{type:"kern",size:.2},{type:"elem",elem:l}]})}return We(["minner",s.isOver?"mover":"munder"],[o],n)},G9n=(e,n)=>{var t=ly(e.label);return new Je(e.isOver?"mover":"munder",[cr(e.base,n),t])};dt({type:"horizBrace",names:["\\overbrace","\\underbrace","\\overbracket","\\underbracket"],props:{numArgs:1},handler(e,n){var{parser:t,funcName:r}=e;return{type:"horizBrace",mode:t.mode,label:r,isOver:r.includes("\\over"),base:n[0]}},htmlBuilder:XP,mathmlBuilder:G9n});dt({type:"href",names:["\\href"],props:{numArgs:2,argTypes:["url","original"],allowedInText:!0},handler:(e,n)=>{var{parser:t}=e,r=n[1],s=on(n[0],"url").url;return t.settings.isTrusted({command:"\\href",url:s})?{type:"href",mode:t.mode,href:s,body:is(r)}:t.formatUnsupportedCmd("\\href")},htmlBuilder:(e,n)=>{var t=bs(e.body,n,!1);return s9n(e.href,[],t,n)},mathmlBuilder:(e,n)=>{var t=Cu(e.body,n);return t instanceof Je||(t=new Je("mrow",[t])),t.setAttribute("href",e.href),t}});dt({type:"href",names:["\\url"],props:{numArgs:1,argTypes:["url"],allowedInText:!0},handler:(e,n)=>{var{parser:t}=e,r=on(n[0],"url").url;if(!t.settings.isTrusted({command:"\\url",url:r}))return t.formatUnsupportedCmd("\\url");for(var s=[],i=0;i{var{parser:t,funcName:r,token:s}=e,i=on(n[0],"raw").string,a=n[1];t.settings.strict&&t.settings.reportNonstrict("htmlExtension","HTML extension is disabled on strict mode");var o,l={};switch(r){case"\\htmlClass":l.class=i,o={command:"\\htmlClass",class:i};break;case"\\htmlId":l.id=i,o={command:"\\htmlId",id:i};break;case"\\htmlStyle":l.style=i,o={command:"\\htmlStyle",style:i};break;case"\\htmlData":{for(var u=i.split(","),h=0;h{var t=bs(e.body,n,!1),r=["enclosing"];e.attributes.class&&r.push(...e.attributes.class.trim().split(/\s+/));var s=We(r,t,n);for(var i in e.attributes)i!=="class"&&e.attributes.hasOwnProperty(i)&&s.setAttribute(i,e.attributes[i]);return s},mathmlBuilder:(e,n)=>Cu(e.body,n)});dt({type:"htmlmathml",names:["\\html@mathml"],props:{numArgs:2,allowedInArgument:!0,allowedInText:!0},handler:(e,n)=>{var{parser:t}=e;return{type:"htmlmathml",mode:t.mode,html:is(n[0]),mathml:is(n[1])}},htmlBuilder:(e,n)=>{var t=bs(e.html,n,!1);return cc(t)},mathmlBuilder:(e,n)=>Cu(e.mathml,n)});var Fw=function(n){if(/^[-+]? *(\d+(\.\d*)?|\.\d+)$/.test(n))return{number:+n,unit:"bp"};var t=/([-+]?) *(\d+(?:\.\d*)?|\.\d+) *([a-z]{2})/.exec(n);if(!t)throw new Ze("Invalid size: '"+n+"' in \\includegraphics");var r={number:+(t[1]+t[2]),unit:t[3]};if(!dP(r))throw new Ze("Invalid unit: '"+r.unit+"' in \\includegraphics.");return r};dt({type:"includegraphics",names:["\\includegraphics"],props:{numArgs:1,numOptionalArgs:1,argTypes:["raw","url"],allowedInText:!1},handler:(e,n,t)=>{var{parser:r}=e,s={number:0,unit:"em"},i={number:.9,unit:"em"},a={number:0,unit:"em"},o="";if(t[0])for(var l=on(t[0],"raw").string,u=l.split(","),h=0;h{var t=Or(e.height,n),r=0;e.totalheight.number>0&&(r=Or(e.totalheight,n)-t);var s=0;e.width.number>0&&(s=Or(e.width,n));var i={height:tt(t+r)};s>0&&(i.width=tt(s)),r>0&&(i.verticalAlign=tt(-r));var a=new V8n(e.src,e.alt,i);return a.height=t,a.depth=r,a},mathmlBuilder:(e,n)=>{var t=new Je("mglyph",[]);t.setAttribute("alt",e.alt);var r=Or(e.height,n),s=0;if(e.totalheight.number>0&&(s=Or(e.totalheight,n)-r,t.setAttribute("valign",tt(-s))),t.setAttribute("height",tt(r+s)),e.width.number>0){var i=Or(e.width,n);t.setAttribute("width",tt(i))}return t.setAttribute("src",e.src),t}});dt({type:"kern",names:["\\kern","\\mkern","\\hskip","\\mskip"],props:{numArgs:1,argTypes:["size"],primitive:!0,allowedInText:!0},handler(e,n){var{parser:t,funcName:r}=e,s=on(n[0],"size");if(t.settings.strict){var i=r[1]==="m",a=s.value.unit==="mu";i?(a||t.settings.reportNonstrict("mathVsTextUnits","LaTeX's "+r+" supports only mu units, "+("not "+s.value.unit+" units")),t.mode!=="math"&&t.settings.reportNonstrict("mathVsTextUnits","LaTeX's "+r+" works only in math mode")):a&&t.settings.reportNonstrict("mathVsTextUnits","LaTeX's "+r+" doesn't support mu units")}return{type:"kern",mode:t.mode,dimension:s.value}},htmlBuilder(e,n){return bP(e.dimension,n)},mathmlBuilder(e,n){var t=Or(e.dimension,n);return new CP(t)}});dt({type:"lap",names:["\\mathllap","\\mathrlap","\\mathclap"],props:{numArgs:1,allowedInText:!0},handler:(e,n)=>{var{parser:t,funcName:r}=e,s=n[0];return{type:"lap",mode:t.mode,alignment:r.slice(5),body:s}},htmlBuilder:(e,n)=>{var t;e.alignment==="clap"?(t=We([],[qn(e.body,n)]),t=We(["inner"],[t],n)):t=We(["inner"],[qn(e.body,n)]);var r=We(["fix"],[]),s=We([e.alignment],[t,r],n),i=We(["strut"]);return i.style.height=tt(s.height+s.depth),s.depth&&(i.style.verticalAlign=tt(-s.depth)),s.children.unshift(i),s=We(["thinbox"],[s],n),We(["mord","vbox"],[s],n)},mathmlBuilder:(e,n)=>{var t=new Je("mpadded",[cr(e.body,n)]);if(e.alignment!=="rlap"){var r=e.alignment==="llap"?"-1":"-0.5";t.setAttribute("lspace",r+"width")}return t.setAttribute("width","0px"),t}});dt({type:"styling",names:["\\(","$"],props:{numArgs:0,allowedInText:!0,allowedInMath:!1},handler(e,n){var{funcName:t,parser:r}=e,s=r.mode;r.switchMode("math");var i=t==="\\("?"\\)":"$",a=r.parseExpression(!1,i);return r.expect(i),r.switchMode(s),{type:"styling",mode:r.mode,style:"text",resetFont:!0,body:a}}});dt({type:"text",names:["\\)","\\]"],props:{numArgs:0,allowedInText:!0,allowedInMath:!1},handler(e,n){throw new Ze("Mismatched "+e.funcName)}});var mA=(e,n)=>{switch(n.style.size){case en.DISPLAY.size:return e.display;case en.TEXT.size:return e.text;case en.SCRIPT.size:return e.script;case en.SCRIPTSCRIPT.size:return e.scriptscript;default:return e.text}};dt({type:"mathchoice",names:["\\mathchoice"],props:{numArgs:4,primitive:!0},handler:(e,n)=>{var{parser:t}=e;return{type:"mathchoice",mode:t.mode,display:is(n[0]),text:is(n[1]),script:is(n[2]),scriptscript:is(n[3])}},htmlBuilder:(e,n)=>{var t=mA(e,n),r=bs(t,n,!1);return cc(r)},mathmlBuilder:(e,n)=>{var t=mA(e,n);return Cu(t,n)}});var YP=(e,n,t,r,s,i,a)=>{e=We([],[e]);var o=t&&oc(t),l,u;if(n){var h=qn(n,r.havingStyle(s.sup()),r);u={elem:h,kern:Math.max(r.fontMetrics().bigOpSpacing1,r.fontMetrics().bigOpSpacing3-h.depth)}}if(t){var _=qn(t,r.havingStyle(s.sub()),r);l={elem:_,kern:Math.max(r.fontMetrics().bigOpSpacing2,r.fontMetrics().bigOpSpacing4-_.height)}}var p;if(u&&l){var m=r.fontMetrics().bigOpSpacing5+l.elem.height+l.elem.depth+l.kern+e.depth+a;p=Fn({positionType:"bottom",positionData:m,children:[{type:"kern",size:r.fontMetrics().bigOpSpacing5},{type:"elem",elem:l.elem,marginLeft:tt(-i)},{type:"kern",size:l.kern},{type:"elem",elem:e},{type:"kern",size:u.kern},{type:"elem",elem:u.elem,marginLeft:tt(i)},{type:"kern",size:r.fontMetrics().bigOpSpacing5}]})}else if(l){var x=e.height-a;p=Fn({positionType:"top",positionData:x,children:[{type:"kern",size:r.fontMetrics().bigOpSpacing5},{type:"elem",elem:l.elem,marginLeft:tt(-i)},{type:"kern",size:l.kern},{type:"elem",elem:e}]})}else if(u){var k=e.depth+a;p=Fn({positionType:"bottom",positionData:k,children:[{type:"elem",elem:e},{type:"kern",size:u.kern},{type:"elem",elem:u.elem,marginLeft:tt(i)},{type:"kern",size:r.fontMetrics().bigOpSpacing5}]})}else return e;var v=[p];if(l&&i!==0&&!o){var b=We(["mspace"],[],r);b.style.marginRight=tt(i),v.unshift(b)}return We(["mop","op-limits"],v,r)},ZP=new Set(["\\smallint"]),jh=(e,n)=>{var t,r,s=!1,i;e.type==="supsub"?(t=e.sup,r=e.sub,i=on(e.base,"op"),s=!0):i=on(e,"op");var a=n.style,o=!1;a.size===en.DISPLAY.size&&i.symbol&&!ZP.has(i.name)&&(o=!0);var l,u;if(i.symbol){var h=o?"Size2-Regular":"Size1-Regular",_="";if((i.name==="\\oiint"||i.name==="\\oiiint")&&(_=i.name.slice(1),i.name=_==="oiint"?"\\iint":"\\iiint"),l=li(i.name,h,"math",n,["mop","op-symbol",o?"large-op":"small-op"]),u=l.italic,_.length>0){var p=xP(_+"Size"+(o?"2":"1"),n);l=Fn({positionType:"individualShift",children:[{type:"elem",elem:l,shift:0},{type:"elem",elem:p,shift:o?.08:0}]}),i.name="\\"+_,l.classes.unshift("mop"),l.italic=u}}else if(i.body){var m=bs(i.body,n,!0);m.length===1&&m[0]instanceof aa?(l=m[0],l.classes[0]="mop"):l=We(["mop"],m,n)}else{for(var x=[],k=1;k{var t;if(e.symbol)t=new Je("mo",[Ma(e.name,e.mode)]),ZP.has(e.name)&&t.setAttribute("largeop","false");else if(e.body)t=new Je("mo",_a(e.body,n));else{t=new Je("mi",[new as(e.name.slice(1))]);var r=new Je("mo",[Ma("⁡","text")]);e.parentIsSupSub?t=new Je("mrow",[t,r]):t=SP([t,r])}return t},V9n={"∏":"\\prod","∐":"\\coprod","∑":"\\sum","⋀":"\\bigwedge","⋁":"\\bigvee","⋂":"\\bigcap","⋃":"\\bigcup","⨀":"\\bigodot","⨁":"\\bigoplus","⨂":"\\bigotimes","⨄":"\\biguplus","⨆":"\\bigsqcup"};dt({type:"op",names:["\\coprod","\\bigvee","\\bigwedge","\\biguplus","\\bigcap","\\bigcup","\\intop","\\prod","\\sum","\\bigotimes","\\bigoplus","\\bigodot","\\bigsqcup","\\smallint","∏","∐","∑","⋀","⋁","⋂","⋃","⨀","⨁","⨂","⨄","⨆"],props:{numArgs:0},handler:(e,n)=>{var{parser:t,funcName:r}=e,s=r;return s.length===1&&(s=V9n[s]),{type:"op",mode:t.mode,limits:!0,parentIsSupSub:!1,symbol:!0,name:s}},htmlBuilder:jh,mathmlBuilder:Sm});dt({type:"op",names:["\\mathop"],props:{numArgs:1,primitive:!0},handler:(e,n)=>{var{parser:t}=e,r=n[0];return{type:"op",mode:t.mode,limits:!1,parentIsSupSub:!1,symbol:!1,body:is(r)}},htmlBuilder:jh,mathmlBuilder:Sm});var K9n={"∫":"\\int","∬":"\\iint","∭":"\\iiint","∮":"\\oint","∯":"\\oiint","∰":"\\oiiint"};dt({type:"op",names:["\\arcsin","\\arccos","\\arctan","\\arctg","\\arcctg","\\arg","\\ch","\\cos","\\cosec","\\cosh","\\cot","\\cotg","\\coth","\\csc","\\ctg","\\cth","\\deg","\\dim","\\exp","\\hom","\\ker","\\lg","\\ln","\\log","\\sec","\\sin","\\sinh","\\sh","\\tan","\\tanh","\\tg","\\th"],props:{numArgs:0},handler(e){var{parser:n,funcName:t}=e;return{type:"op",mode:n.mode,limits:!1,parentIsSupSub:!1,symbol:!1,name:t}},htmlBuilder:jh,mathmlBuilder:Sm});dt({type:"op",names:["\\det","\\gcd","\\inf","\\lim","\\max","\\min","\\Pr","\\sup"],props:{numArgs:0},handler(e){var{parser:n,funcName:t}=e;return{type:"op",mode:n.mode,limits:!0,parentIsSupSub:!1,symbol:!1,name:t}},htmlBuilder:jh,mathmlBuilder:Sm});dt({type:"op",names:["\\int","\\iint","\\iiint","\\oint","\\oiint","\\oiiint","∫","∬","∭","∮","∯","∰"],props:{numArgs:0,allowedInArgument:!0},handler(e){var{parser:n,funcName:t}=e,r=t;return r.length===1&&(r=K9n[r]),{type:"op",mode:n.mode,limits:!1,parentIsSupSub:!1,symbol:!0,name:r}},htmlBuilder:jh,mathmlBuilder:Sm});var JP=(e,n)=>{var t,r,s=!1,i;e.type==="supsub"?(t=e.sup,r=e.sub,i=on(e.base,"operatorname"),s=!0):i=on(e,"operatorname");var a;if(i.body.length>0){for(var o=i.body.map(_=>{var p="text"in _?_.text:void 0;return typeof p=="string"?{type:"textord",mode:_.mode,text:p}:_}),l=bs(o,n.withFont("mathrm"),!0),u=0;u{for(var t=_a(e.body,n.withFont("mathrm")),r=!0,s=0;sh.toText()).join("");t=[new as(o)]}var l=new Je("mi",t);l.setAttribute("mathvariant","normal");var u=new Je("mo",[Ma("⁡","text")]);return e.parentIsSupSub?new Je("mrow",[l,u]):SP([l,u])};dt({type:"operatorname",names:["\\operatorname@","\\operatornamewithlimits"],props:{numArgs:1},handler:(e,n)=>{var{parser:t,funcName:r}=e,s=n[0];return{type:"operatorname",mode:t.mode,body:is(s),alwaysHandleSupSub:r==="\\operatornamewithlimits",limits:!1,parentIsSupSub:!1}},htmlBuilder:JP,mathmlBuilder:W9n});ie("\\operatorname","\\@ifstar\\operatornamewithlimits\\operatorname@");hf({type:"ordgroup",htmlBuilder(e,n){return e.semisimple?cc(bs(e.body,n,!1)):We(["mord"],bs(e.body,n,!0),n)},mathmlBuilder(e,n){return Cu(e.body,n,!0)}});dt({type:"overline",names:["\\overline"],props:{numArgs:1},handler(e,n){var{parser:t}=e,r=n[0];return{type:"overline",mode:t.mode,body:r}},htmlBuilder(e,n){var t=qn(e.body,n.havingCrampedStyle()),r=ah("overline-line",n),s=n.fontMetrics().defaultRuleThickness,i=Fn({positionType:"firstBaseline",children:[{type:"elem",elem:t},{type:"kern",size:3*s},{type:"elem",elem:r},{type:"kern",size:s}]});return We(["mord","overline"],[i],n)},mathmlBuilder(e,n){var t=new Je("mo",[new as("‾")]);t.setAttribute("stretchy","true");var r=new Je("mover",[cr(e.body,n),t]);return r.setAttribute("accent","true"),r}});dt({type:"phantom",names:["\\phantom"],props:{numArgs:1,allowedInText:!0},handler:(e,n)=>{var{parser:t}=e,r=n[0];return{type:"phantom",mode:t.mode,body:is(r)}},htmlBuilder:(e,n)=>{var t=bs(e.body,n.withPhantom(),!1);return cc(t)},mathmlBuilder:(e,n)=>{var t=_a(e.body,n);return new Je("mphantom",t)}});ie("\\hphantom","\\smash{\\phantom{#1}}");dt({type:"vphantom",names:["\\vphantom"],props:{numArgs:1,allowedInText:!0},handler:(e,n)=>{var{parser:t}=e,r=n[0];return{type:"vphantom",mode:t.mode,body:r}},htmlBuilder:(e,n)=>{var t=We(["inner"],[qn(e.body,n.withPhantom())]),r=We(["fix"],[]);return We(["mord","rlap"],[t,r],n)},mathmlBuilder:(e,n)=>{var t=_a(is(e.body),n),r=new Je("mphantom",t),s=new Je("mpadded",[r]);return s.setAttribute("width","0px"),s}});dt({type:"raisebox",names:["\\raisebox"],props:{numArgs:2,argTypes:["size","hbox"],allowedInText:!0},handler(e,n){var{parser:t}=e,r=on(n[0],"size").value,s=n[1];return{type:"raisebox",mode:t.mode,dy:r,body:s}},htmlBuilder(e,n){var t=qn(e.body,n),r=Or(e.dy,n);return Fn({positionType:"shift",positionData:-r,children:[{type:"elem",elem:t}]})},mathmlBuilder(e,n){var t=new Je("mpadded",[cr(e.body,n)]),r=e.dy.number+e.dy.unit;return t.setAttribute("voffset",r),t}});dt({type:"internal",names:["\\relax"],props:{numArgs:0,allowedInText:!0,allowedInArgument:!0},handler(e){var{parser:n}=e;return{type:"internal",mode:n.mode}}});dt({type:"rule",names:["\\rule"],props:{numArgs:2,numOptionalArgs:1,allowedInText:!0,allowedInMath:!0,argTypes:["size","size","size"]},handler(e,n,t){var{parser:r}=e,s=t[0],i=on(n[0],"size"),a=on(n[1],"size");return{type:"rule",mode:r.mode,shift:s&&on(s,"size").value,width:i.value,height:a.value}},htmlBuilder(e,n){var t=We(["mord","rule"],[],n),r=Or(e.width,n),s=Or(e.height,n),i=e.shift?Or(e.shift,n):0;return t.style.borderRightWidth=tt(r),t.style.borderTopWidth=tt(s),t.style.bottom=tt(i),t.width=r,t.height=s+i,t.depth=-i,t.maxFontSize=s*1.125*n.sizeMultiplier,t},mathmlBuilder(e,n){var t=Or(e.width,n),r=Or(e.height,n),s=e.shift?Or(e.shift,n):0,i=n.color&&n.getColor()||"black",a=new Je("mspace");a.setAttribute("mathbackground",i),a.setAttribute("width",tt(t)),a.setAttribute("height",tt(r));var o=new Je("mpadded",[a]);return s>=0?o.setAttribute("height",tt(s)):(o.setAttribute("height",tt(s)),o.setAttribute("depth",tt(-s))),o.setAttribute("voffset",tt(s)),o}});function eF(e,n,t){for(var r=bs(e,n,!1),s=n.sizeMultiplier/t.sizeMultiplier,i=0;i{var t=n.havingSize(e.size);return eF(e.body,t,n)};dt({type:"sizing",names:gA,props:{numArgs:0,allowedInText:!0},handler:(e,n)=>{var{breakOnTokenText:t,funcName:r,parser:s}=e,i=s.parseExpression(!1,t);return{type:"sizing",mode:s.mode,size:gA.indexOf(r)+1,body:i}},htmlBuilder:Q9n,mathmlBuilder:(e,n)=>{var t=n.havingSize(e.size),r=_a(e.body,t),s=new Je("mstyle",r);return s.setAttribute("mathsize",tt(t.sizeMultiplier)),s}});dt({type:"smash",names:["\\smash"],props:{numArgs:1,numOptionalArgs:1,allowedInText:!0},handler:(e,n,t)=>{var{parser:r}=e,s=!1,i=!1,a=t[0]&&on(t[0],"ordgroup");if(a)for(var o,l=0;l{var t=We([],[qn(e.body,n)]);if(!e.smashHeight&&!e.smashDepth)return t;if(e.smashHeight&&(t.height=0),e.smashDepth&&(t.depth=0),e.smashHeight&&e.smashDepth)return We(["mord","smash"],[t],n);if(t.children)for(var r=0;r{var t=new Je("mpadded",[cr(e.body,n)]);return e.smashHeight&&t.setAttribute("height","0px"),e.smashDepth&&t.setAttribute("depth","0px"),t}});dt({type:"sqrt",names:["\\sqrt"],props:{numArgs:1,numOptionalArgs:1},handler(e,n,t){var{parser:r}=e,s=t[0],i=n[0];return{type:"sqrt",mode:r.mode,body:i,index:s}},htmlBuilder(e,n){var t=qn(e.body,n.havingCrampedStyle());t.height===0&&(t.height=n.fontMetrics().xHeight),t=oh(t,n);var r=n.fontMetrics(),s=r.defaultRuleThickness,i=s;n.style.idt.height+t.depth+a&&(a=(a+_-t.height-t.depth)/2);var p=l.height-t.height-a-u;t.style.paddingLeft=tt(h);var m=Fn({positionType:"firstBaseline",children:[{type:"elem",elem:t,wrapperClasses:["svg-align"]},{type:"kern",size:-(t.height+p)},{type:"elem",elem:l},{type:"kern",size:u}]});if(e.index){var x=n.havingStyle(en.SCRIPTSCRIPT),k=qn(e.index,x,n),v=.6*(m.height-m.depth),b=Fn({positionType:"shift",positionData:-v,children:[{type:"elem",elem:k}]}),w=We(["root"],[b]);return We(["mord","sqrt"],[w,m],n)}else return We(["mord","sqrt"],[m],n)},mathmlBuilder(e,n){var{body:t,index:r}=e;return r?new Je("mroot",[cr(t,n),cr(r,n)]):new Je("msqrt",[cr(t,n)])}});var S5={display:en.DISPLAY,text:en.TEXT,script:en.SCRIPT,scriptscript:en.SCRIPTSCRIPT};function X9n(e){return e in S5}dt({type:"styling",names:["\\displaystyle","\\textstyle","\\scriptstyle","\\scriptscriptstyle"],props:{numArgs:0,allowedInText:!0,primitive:!0},handler(e,n){var{breakOnTokenText:t,funcName:r,parser:s}=e,i=s.parseExpression(!0,t),a=r.slice(1,r.length-5);if(!X9n(a))throw new Error("Unknown style: "+a);return{type:"styling",mode:s.mode,style:a,body:i}},htmlBuilder(e,n){var t=S5[e.style],r=n.havingStyle(t);return e.resetFont&&(r=r.withFont("")),eF(e.body,r,n)},mathmlBuilder(e,n){var t=S5[e.style],r=n.havingStyle(t);e.resetFont&&(r=r.withFont(""));var s=_a(e.body,r),i=new Je("mstyle",s),a={display:["0","true"],text:["0","false"],script:["1","false"],scriptscript:["2","false"]},o=a[e.style];return i.setAttribute("scriptlevel",o[0]),i.setAttribute("displaystyle",o[1]),i}});var Y9n=function(n,t){var r=n.base;if(r)if(r.type==="op"){var s=r.limits&&(t.style.size===en.DISPLAY.size||r.alwaysHandleSupSub);return s?jh:null}else if(r.type==="operatorname"){var i=r.alwaysHandleSupSub&&(t.style.size===en.DISPLAY.size||r.limits);return i?JP:null}else{if(r.type==="accent")return oc(r.base)?O6:null;if(r.type==="horizBrace"){var a=!n.sub;return a===r.isOver?XP:null}else return null}else return null};hf({type:"supsub",htmlBuilder(e,n){var t=Y9n(e,n);if(t)return t(e,n);var{base:r,sup:s,sub:i}=e,a=qn(r,n),o,l,u=n.fontMetrics(),h=0,_=0,p=r&&oc(r);if(s){var m=n.havingStyle(n.style.sup());o=qn(s,m,n),p||(h=a.height-m.fontMetrics().supDrop*m.sizeMultiplier/n.sizeMultiplier)}if(i){var x=n.havingStyle(n.style.sub());l=qn(i,x,n),p||(_=a.depth+x.fontMetrics().subDrop*x.sizeMultiplier/n.sizeMultiplier)}var k;n.style===en.DISPLAY?k=u.sup1:n.style.cramped?k=u.sup3:k=u.sup2;var v=n.sizeMultiplier,b=tt(.5/u.ptPerEm/v),w=null;if(l){var y=e.base&&e.base.type==="op"&&e.base.name&&(e.base.name==="\\oiint"||e.base.name==="\\oiiint");if(a instanceof aa||y){var C;w=tt(-((C=a.italic)!=null?C:0))}}var E;if(o&&l){h=Math.max(h,k,o.depth+.25*u.xHeight),_=Math.max(_,u.sub2);var N=u.defaultRuleThickness,A=4*N;if(h-o.depth-(l.height-_)0&&(h+=j,_-=j)}var M=[{type:"elem",elem:l,shift:_,marginRight:b,marginLeft:w},{type:"elem",elem:o,shift:-h,marginRight:b}];E=Fn({positionType:"individualShift",children:M})}else if(l){_=Math.max(_,u.sub1,l.height-.8*u.xHeight);var L=[{type:"elem",elem:l,marginLeft:w,marginRight:b}];E=Fn({positionType:"shift",positionData:_,children:L})}else if(o)h=Math.max(h,k,o.depth+.25*u.xHeight),E=Fn({positionType:"shift",positionData:-h,children:[{type:"elem",elem:o,marginRight:b}]});else throw new Error("supsub must have either sup or sub.");var I=b5(a,"right")||"mord";return We([I],[a,We(["msupsub"],[E])],n)},mathmlBuilder(e,n){var t=!1,r,s;e.base&&e.base.type==="horizBrace"&&(s=!!e.sup,s===e.base.isOver&&(t=!0,r=e.base.isOver)),e.base&&(e.base.type==="op"||e.base.type==="operatorname")&&(e.base.parentIsSupSub=!0);var i=[cr(e.base,n)];e.sub&&i.push(cr(e.sub,n)),e.sup&&i.push(cr(e.sup,n));var a;if(t)a=r?"mover":"munder";else if(e.sub)if(e.sup){var u=e.base;u&&u.type==="op"&&u.limits&&n.style===en.DISPLAY||u&&u.type==="operatorname"&&u.alwaysHandleSupSub&&(n.style===en.DISPLAY||u.limits)?a="munderover":a="msubsup"}else{var l=e.base;l&&l.type==="op"&&l.limits&&(n.style===en.DISPLAY||l.alwaysHandleSupSub)||l&&l.type==="operatorname"&&l.alwaysHandleSupSub&&(l.limits||n.style===en.DISPLAY)?a="munder":a="msub"}else{var o=e.base;o&&o.type==="op"&&o.limits&&(n.style===en.DISPLAY||o.alwaysHandleSupSub)||o&&o.type==="operatorname"&&o.alwaysHandleSupSub&&(o.limits||n.style===en.DISPLAY)?a="mover":a="msup"}return new Je(a,i)}});hf({type:"atom",htmlBuilder(e,n){return T6(e.text,e.mode,n,["m"+e.family])},mathmlBuilder(e,n){var t=new Je("mo",[Ma(e.text,e.mode)]);if(e.family==="bin"){var r=M6(e,n);r==="bold-italic"&&t.setAttribute("mathvariant",r)}else e.family==="punct"?t.setAttribute("separator","true"):(e.family==="open"||e.family==="close")&&t.setAttribute("stretchy","false");return t}});var tF={mi:"italic",mn:"normal",mtext:"normal"};hf({type:"mathord",htmlBuilder(e,n){return oy(e,n,"mathord")},mathmlBuilder(e,n){var t=new Je("mi",[Ma(e.text,e.mode,n)]),r=M6(e,n)||"italic";return r!==tF[t.type]&&t.setAttribute("mathvariant",r),t}});hf({type:"textord",htmlBuilder(e,n){return oy(e,n,"textord")},mathmlBuilder(e,n){var t=Ma(e.text,e.mode,n),r=M6(e,n)||"normal",s;return e.mode==="text"?s=new Je("mtext",[t]):/[0-9]/.test(e.text)?s=new Je("mn",[t]):e.text==="\\prime"?s=new Je("mo",[t]):s=new Je("mi",[t]),r!==tF[s.type]&&s.setAttribute("mathvariant",r),s}});var Hw={"\\nobreak":"nobreak","\\allowbreak":"allowbreak"},qw={" ":{},"\\ ":{},"~":{className:"nobreak"},"\\space":{},"\\nobreakspace":{className:"nobreak"}};hf({type:"spacing",htmlBuilder(e,n){if(qw.hasOwnProperty(e.text)){var t=qw[e.text].className||"";if(e.mode==="text"){var r=oy(e,n,"textord");return r.classes.push(t),r}else return We(["mspace",t],[T6(e.text,e.mode,n)],n)}else{if(Hw.hasOwnProperty(e.text))return We(["mspace",Hw[e.text]],[],n);throw new Ze('Unknown type of space "'+e.text+'"')}},mathmlBuilder(e,n){var t;if(qw.hasOwnProperty(e.text))t=new Je("mtext",[new as(" ")]);else{if(Hw.hasOwnProperty(e.text))return new Je("mspace");throw new Ze('Unknown type of space "'+e.text+'"')}return t}});var vA=()=>{var e=new Je("mtd",[]);return e.setAttribute("width","50%"),e};hf({type:"tag",mathmlBuilder(e,n){var t=new Je("mtable",[new Je("mtr",[vA(),new Je("mtd",[Cu(e.body,n)]),vA(),new Je("mtd",[Cu(e.tag,n)])])]);return t.setAttribute("width","100%"),t}});var bA={"\\text":void 0,"\\textrm":"textrm","\\textsf":"textsf","\\texttt":"texttt","\\textnormal":"textrm"},yA={"\\textbf":"textbf","\\textmd":"textmd"},Z9n={"\\textit":"textit","\\textup":"textup"},xA=(e,n)=>{var t=e.font;if(t){if(bA[t])return n.withTextFontFamily(bA[t]);if(yA[t])return n.withTextFontWeight(yA[t]);if(t==="\\emph")return n.fontShape==="textit"?n.withTextFontShape("textup"):n.withTextFontShape("textit")}else return n;return n.withTextFontShape(Z9n[t])};dt({type:"text",names:["\\text","\\textrm","\\textsf","\\texttt","\\textnormal","\\textbf","\\textmd","\\textit","\\textup","\\emph"],props:{numArgs:1,argTypes:["text"],allowedInArgument:!0,allowedInText:!0},handler(e,n){var{parser:t,funcName:r}=e,s=n[0];return{type:"text",mode:t.mode,body:is(s),font:r}},htmlBuilder(e,n){var t=xA(e,n),r=bs(e.body,t,!0);return We(["mord","text"],r,t)},mathmlBuilder(e,n){var t=xA(e,n);return Cu(e.body,t)}});dt({type:"underline",names:["\\underline"],props:{numArgs:1,allowedInText:!0},handler(e,n){var{parser:t}=e;return{type:"underline",mode:t.mode,body:n[0]}},htmlBuilder(e,n){var t=qn(e.body,n),r=ah("underline-line",n),s=n.fontMetrics().defaultRuleThickness,i=Fn({positionType:"top",positionData:t.height,children:[{type:"kern",size:s},{type:"elem",elem:r},{type:"kern",size:3*s},{type:"elem",elem:t}]});return We(["mord","underline"],[i],n)},mathmlBuilder(e,n){var t=new Je("mo",[new as("‾")]);t.setAttribute("stretchy","true");var r=new Je("munder",[cr(e.body,n),t]);return r.setAttribute("accentunder","true"),r}});dt({type:"vcenter",names:["\\vcenter"],props:{numArgs:1,argTypes:["original"],allowedInText:!1},handler(e,n){var{parser:t}=e;return{type:"vcenter",mode:t.mode,body:n[0]}},htmlBuilder(e,n){var t=qn(e.body,n),r=n.fontMetrics().axisHeight,s=.5*(t.height-r-(t.depth+r));return Fn({positionType:"shift",positionData:s,children:[{type:"elem",elem:t}]})},mathmlBuilder(e,n){var t=new Je("mpadded",[cr(e.body,n)],["vcenter"]);return new Je("mrow",[t])}});dt({type:"verb",names:["\\verb"],props:{numArgs:0,allowedInText:!0},handler(e,n,t){throw new Ze("\\verb ended by end of line instead of matching delimiter")},htmlBuilder(e,n){for(var t=wA(e),r=[],s=n.havingStyle(n.style.text()),i=0;ie.body.replace(/ /g,e.star?"␣":" "),du=wP,nF=`[ \r + ]`,J9n="\\\\[a-zA-Z@]+",eEn="\\\\[^\uD800-\uDFFF]",tEn="("+J9n+")"+nF+"*",nEn=`\\\\( |[ \r ]+ -?)[ \r ]*`,C5="[̀-ͯ]",b9n=new RegExp(C5+"+$"),y9n="("+eF+"+)|"+(v9n+"|")+"([!-\\[\\]-‧‪-퟿豈-￿]"+(C5+"*")+"|[\uD800-\uDBFF][\uDC00-\uDFFF]"+(C5+"*")+"|\\\\verb\\*([^]).*?\\4|\\\\verb([^*a-zA-Z]).*?\\5"+("|"+g9n)+("|"+m9n+")");class kA{constructor(n,t){this.input=void 0,this.settings=void 0,this.tokenRegex=void 0,this.catcodes=void 0,this.input=n,this.settings=t,this.tokenRegex=new RegExp(y9n,"g"),this.catcodes={"%":14,"~":13}}setCatcode(n,t){this.catcodes[n]=t}lex(){var n=this.input,t=this.tokenRegex.lastIndex;if(t===n.length)return new ra("EOF",new Ni(this,t,t));var r=this.tokenRegex.exec(n);if(r===null||r.index!==t)throw new Ze("Unexpected character: '"+n[t]+"'",new ra(n[t],new Ni(this,t,t+1)));var s=r[6]||r[3]||(r[2]?"\\ ":" ");if(this.catcodes[s]===14){var i=n.indexOf(` -`,this.tokenRegex.lastIndex);return i===-1?(this.tokenRegex.lastIndex=n.length,this.settings.reportNonstrict("commentAtEnd","% comment has no terminating newline; LaTeX would fail because of commenting the end of math mode (e.g. $)")):this.tokenRegex.lastIndex=i+1,this.lex()}return new ra(s,new Ni(this,t,this.tokenRegex.lastIndex))}}class x9n{constructor(n,t){n===void 0&&(n={}),t===void 0&&(t={}),this.current=void 0,this.builtins=void 0,this.undefStack=void 0,this.current=t,this.builtins=n,this.undefStack=[]}beginGroup(){this.undefStack.push({})}endGroup(){if(this.undefStack.length===0)throw new Ze("Unbalanced namespace destruction: attempt to pop global namespace; please report this as a bug");var n=this.undefStack.pop();for(var t in n)n.hasOwnProperty(t)&&(n[t]==null?delete this.current[t]:this.current[t]=n[t])}endGroups(){for(;this.undefStack.length>0;)this.endGroup()}has(n){return this.current.hasOwnProperty(n)||this.builtins.hasOwnProperty(n)}get(n){return this.current.hasOwnProperty(n)?this.current[n]:this.builtins[n]}set(n,t,r){if(r===void 0&&(r=!1),r){for(var s=0;s0&&(this.undefStack[this.undefStack.length-1][n]=t)}else{var i=this.undefStack[this.undefStack.length-1];i&&!i.hasOwnProperty(n)&&(i[n]=this.current[n])}t==null?delete this.current[n]:this.current[n]=t}}var w9n=qP;ie("\\noexpand",function(e){var n=e.popToken();return e.isExpandable(n.text)&&(n.noexpand=!0,n.treatAsRelax=!0),{tokens:[n],numArgs:0}});ie("\\expandafter",function(e){var n=e.popToken();return e.expandOnce(!0),{tokens:[n],numArgs:0}});ie("\\@firstoftwo",function(e){var n=e.consumeArgs(2);return{tokens:n[0],numArgs:0}});ie("\\@secondoftwo",function(e){var n=e.consumeArgs(2);return{tokens:n[1],numArgs:0}});ie("\\@ifnextchar",function(e){var n=e.consumeArgs(3);e.consumeSpaces();var t=e.future();return n[0].length===1&&n[0][0].text===t.text?{tokens:n[1],numArgs:0}:{tokens:n[2],numArgs:0}});ie("\\@ifstar","\\@ifnextchar *{\\@firstoftwo{#1}}");ie("\\TextOrMath",function(e){var n=e.consumeArgs(2);return e.mode==="text"?{tokens:n[0],numArgs:0}:{tokens:n[1],numArgs:0}});var SA={0:0,1:1,2:2,3:3,4:4,5:5,6:6,7:7,8:8,9:9,a:10,A:10,b:11,B:11,c:12,C:12,d:13,D:13,e:14,E:14,f:15,F:15};ie("\\char",function(e){var n=e.popToken(),t,r=0;if(n.text==="'")t=8,n=e.popToken();else if(n.text==='"')t=16,n=e.popToken();else if(n.text==="`")if(n=e.popToken(),n.text[0]==="\\")r=n.text.charCodeAt(1);else{if(n.text==="EOF")throw new Ze("\\char` missing argument");r=n.text.charCodeAt(0)}else t=10;if(t){if(r=SA[n.text],r==null||r>=t)throw new Ze("Invalid base-"+t+" digit "+n.text);for(var s;(s=SA[e.future().text])!=null&&s{var s=e.consumeArg().tokens;if(s.length!==1)throw new Ze("\\newcommand's first argument must be a macro name");var i=s[0].text,a=e.isDefined(i);if(a&&!n)throw new Ze("\\newcommand{"+i+"} attempting to redefine "+(i+"; use \\renewcommand"));if(!a&&!t)throw new Ze("\\renewcommand{"+i+"} when command "+i+" does not yet exist; use \\newcommand");var o=0;if(s=e.consumeArg().tokens,s.length===1&&s[0].text==="["){for(var l="",u=e.expandNextToken();u.text!=="]"&&u.text!=="EOF";)l+=u.text,u=e.expandNextToken();if(!l.match(/^\s*[0-9]+\s*$/))throw new Ze("Invalid number of arguments: "+l);o=parseInt(l),s=e.consumeArg().tokens}return a&&r||e.macros.set(i,{tokens:s,numArgs:o}),""};ie("\\newcommand",e=>$6(e,!1,!0,!1));ie("\\renewcommand",e=>$6(e,!0,!1,!1));ie("\\providecommand",e=>$6(e,!0,!0,!0));ie("\\message",e=>{var n=e.consumeArgs(1)[0];return console.log(n.reverse().map(t=>t.text).join("")),""});ie("\\errmessage",e=>{var n=e.consumeArgs(1)[0];return console.error(n.reverse().map(t=>t.text).join("")),""});ie("\\show",e=>{var n=e.popToken(),t=n.text;return console.log(n,e.macros.get(t),fu[t],Sr.math[t],Sr.text[t]),""});ie("\\bgroup","{");ie("\\egroup","}");ie("~","\\nobreakspace");ie("\\lq","`");ie("\\rq","'");ie("\\aa","\\r a");ie("\\AA","\\r A");ie("\\textcopyright","\\html@mathml{\\textcircled{c}}{\\char`©}");ie("\\copyright","\\TextOrMath{\\textcopyright}{\\text{\\textcopyright}}");ie("\\textregistered","\\html@mathml{\\textcircled{\\scriptsize R}}{\\char`®}");ie("ℬ","\\mathscr{B}");ie("ℰ","\\mathscr{E}");ie("ℱ","\\mathscr{F}");ie("ℋ","\\mathscr{H}");ie("ℐ","\\mathscr{I}");ie("ℒ","\\mathscr{L}");ie("ℳ","\\mathscr{M}");ie("ℛ","\\mathscr{R}");ie("ℭ","\\mathfrak{C}");ie("ℌ","\\mathfrak{H}");ie("ℨ","\\mathfrak{Z}");ie("\\Bbbk","\\Bbb{k}");ie("\\llap","\\mathllap{\\textrm{#1}}");ie("\\rlap","\\mathrlap{\\textrm{#1}}");ie("\\clap","\\mathclap{\\textrm{#1}}");ie("\\mathstrut","\\vphantom{(}");ie("\\underbar","\\underline{\\text{#1}}");ie("\\not",'\\html@mathml{\\mathrel{\\mathrlap\\@not}\\nobreak}{\\char"338}');ie("\\neq","\\html@mathml{\\mathrel{\\not=}}{\\mathrel{\\char`≠}}");ie("\\ne","\\neq");ie("≠","\\neq");ie("\\notin","\\html@mathml{\\mathrel{{\\in}\\mathllap{/\\mskip1mu}}}{\\mathrel{\\char`∉}}");ie("∉","\\notin");ie("≘","\\html@mathml{\\mathrel{=\\kern{-1em}\\raisebox{0.4em}{$\\scriptsize\\frown$}}}{\\mathrel{\\char`≘}}");ie("≙","\\html@mathml{\\stackrel{\\tiny\\wedge}{=}}{\\mathrel{\\char`≘}}");ie("≚","\\html@mathml{\\stackrel{\\tiny\\vee}{=}}{\\mathrel{\\char`≚}}");ie("≛","\\html@mathml{\\stackrel{\\scriptsize\\star}{=}}{\\mathrel{\\char`≛}}");ie("≝","\\html@mathml{\\stackrel{\\tiny\\mathrm{def}}{=}}{\\mathrel{\\char`≝}}");ie("≞","\\html@mathml{\\stackrel{\\tiny\\mathrm{m}}{=}}{\\mathrel{\\char`≞}}");ie("≟","\\html@mathml{\\stackrel{\\tiny?}{=}}{\\mathrel{\\char`≟}}");ie("⟂","\\perp");ie("‼","\\mathclose{!\\mkern-0.8mu!}");ie("∌","\\notni");ie("⌜","\\ulcorner");ie("⌝","\\urcorner");ie("⌞","\\llcorner");ie("⌟","\\lrcorner");ie("©","\\copyright");ie("®","\\textregistered");ie("\\ulcorner",'\\html@mathml{\\@ulcorner}{\\mathop{\\char"231c}}');ie("\\urcorner",'\\html@mathml{\\@urcorner}{\\mathop{\\char"231d}}');ie("\\llcorner",'\\html@mathml{\\@llcorner}{\\mathop{\\char"231e}}');ie("\\lrcorner",'\\html@mathml{\\@lrcorner}{\\mathop{\\char"231f}}');ie("\\vdots","{\\varvdots\\rule{0pt}{15pt}}");ie("⋮","\\vdots");ie("\\varGamma","\\mathit{\\Gamma}");ie("\\varDelta","\\mathit{\\Delta}");ie("\\varTheta","\\mathit{\\Theta}");ie("\\varLambda","\\mathit{\\Lambda}");ie("\\varXi","\\mathit{\\Xi}");ie("\\varPi","\\mathit{\\Pi}");ie("\\varSigma","\\mathit{\\Sigma}");ie("\\varUpsilon","\\mathit{\\Upsilon}");ie("\\varPhi","\\mathit{\\Phi}");ie("\\varPsi","\\mathit{\\Psi}");ie("\\varOmega","\\mathit{\\Omega}");ie("\\substack","\\begin{subarray}{c}#1\\end{subarray}");ie("\\colon","\\nobreak\\mskip2mu\\mathpunct{}\\mathchoice{\\mkern-3mu}{\\mkern-3mu}{}{}{:}\\mskip6mu\\relax");ie("\\boxed","\\fbox{$\\displaystyle{#1}$}");ie("\\iff","\\DOTSB\\;\\Longleftrightarrow\\;");ie("\\implies","\\DOTSB\\;\\Longrightarrow\\;");ie("\\impliedby","\\DOTSB\\;\\Longleftarrow\\;");ie("\\dddot","{\\overset{\\raisebox{-0.1ex}{\\normalsize ...}}{#1}}");ie("\\ddddot","{\\overset{\\raisebox{-0.1ex}{\\normalsize ....}}{#1}}");var CA={",":"\\dotsc","\\not":"\\dotsb","+":"\\dotsb","=":"\\dotsb","<":"\\dotsb",">":"\\dotsb","-":"\\dotsb","*":"\\dotsb",":":"\\dotsb","\\DOTSB":"\\dotsb","\\coprod":"\\dotsb","\\bigvee":"\\dotsb","\\bigwedge":"\\dotsb","\\biguplus":"\\dotsb","\\bigcap":"\\dotsb","\\bigcup":"\\dotsb","\\prod":"\\dotsb","\\sum":"\\dotsb","\\bigotimes":"\\dotsb","\\bigoplus":"\\dotsb","\\bigodot":"\\dotsb","\\bigsqcup":"\\dotsb","\\And":"\\dotsb","\\longrightarrow":"\\dotsb","\\Longrightarrow":"\\dotsb","\\longleftarrow":"\\dotsb","\\Longleftarrow":"\\dotsb","\\longleftrightarrow":"\\dotsb","\\Longleftrightarrow":"\\dotsb","\\mapsto":"\\dotsb","\\longmapsto":"\\dotsb","\\hookrightarrow":"\\dotsb","\\doteq":"\\dotsb","\\mathbin":"\\dotsb","\\mathrel":"\\dotsb","\\relbar":"\\dotsb","\\Relbar":"\\dotsb","\\xrightarrow":"\\dotsb","\\xleftarrow":"\\dotsb","\\DOTSI":"\\dotsi","\\int":"\\dotsi","\\oint":"\\dotsi","\\iint":"\\dotsi","\\iiint":"\\dotsi","\\iiiint":"\\dotsi","\\idotsint":"\\dotsi","\\DOTSX":"\\dotsx"},k9n=new Set(["bin","rel"]);ie("\\dots",function(e){var n="\\dotso",t=e.expandAfterFuture().text;return t in CA?n=CA[t]:(t.slice(0,4)==="\\not"||t in Sr.math&&k9n.has(Sr.math[t].group))&&(n="\\dotsb"),n});var B6={")":!0,"]":!0,"\\rbrack":!0,"\\}":!0,"\\rbrace":!0,"\\rangle":!0,"\\rceil":!0,"\\rfloor":!0,"\\rgroup":!0,"\\rmoustache":!0,"\\right":!0,"\\bigr":!0,"\\biggr":!0,"\\Bigr":!0,"\\Biggr":!0,$:!0,";":!0,".":!0,",":!0};ie("\\dotso",function(e){var n=e.future().text;return n in B6?"\\ldots\\,":"\\ldots"});ie("\\dotsc",function(e){var n=e.future().text;return n in B6&&n!==","?"\\ldots\\,":"\\ldots"});ie("\\cdots",function(e){var n=e.future().text;return n in B6?"\\@cdots\\,":"\\@cdots"});ie("\\dotsb","\\cdots");ie("\\dotsm","\\cdots");ie("\\dotsi","\\!\\cdots");ie("\\dotsx","\\ldots\\,");ie("\\DOTSI","\\relax");ie("\\DOTSB","\\relax");ie("\\DOTSX","\\relax");ie("\\tmspace","\\TextOrMath{\\kern#1#3}{\\mskip#1#2}\\relax");ie("\\,","\\tmspace+{3mu}{.1667em}");ie("\\thinspace","\\,");ie("\\>","\\mskip{4mu}");ie("\\:","\\tmspace+{4mu}{.2222em}");ie("\\medspace","\\:");ie("\\;","\\tmspace+{5mu}{.2777em}");ie("\\thickspace","\\;");ie("\\!","\\tmspace-{3mu}{.1667em}");ie("\\negthinspace","\\!");ie("\\negmedspace","\\tmspace-{4mu}{.2222em}");ie("\\negthickspace","\\tmspace-{5mu}{.277em}");ie("\\enspace","\\kern.5em ");ie("\\enskip","\\hskip.5em\\relax");ie("\\quad","\\hskip1em\\relax");ie("\\qquad","\\hskip2em\\relax");ie("\\tag","\\@ifstar\\tag@literal\\tag@paren");ie("\\tag@paren","\\tag@literal{({#1})}");ie("\\tag@literal",e=>{if(e.macros.get("\\df@tag"))throw new Ze("Multiple \\tag");return"\\gdef\\df@tag{\\text{#1}}"});ie("\\bmod","\\mathchoice{\\mskip1mu}{\\mskip1mu}{\\mskip5mu}{\\mskip5mu}\\mathbin{\\rm mod}\\mathchoice{\\mskip1mu}{\\mskip1mu}{\\mskip5mu}{\\mskip5mu}");ie("\\pod","\\allowbreak\\mathchoice{\\mkern18mu}{\\mkern8mu}{\\mkern8mu}{\\mkern8mu}(#1)");ie("\\pmod","\\pod{{\\rm mod}\\mkern6mu#1}");ie("\\mod","\\allowbreak\\mathchoice{\\mkern18mu}{\\mkern12mu}{\\mkern12mu}{\\mkern12mu}{\\rm mod}\\,\\,#1");ie("\\newline","\\\\\\relax");ie("\\TeX","\\textrm{\\html@mathml{T\\kern-.1667em\\raisebox{-.5ex}{E}\\kern-.125emX}{TeX}}");var tF=tt(Bo["Main-Regular"][84][1]-.7*Bo["Main-Regular"][65][1]);ie("\\LaTeX","\\textrm{\\html@mathml{"+("L\\kern-.36em\\raisebox{"+tF+"}{\\scriptstyle A}")+"\\kern-.15em\\TeX}{LaTeX}}");ie("\\KaTeX","\\textrm{\\html@mathml{"+("K\\kern-.17em\\raisebox{"+tF+"}{\\scriptstyle A}")+"\\kern-.15em\\TeX}{KaTeX}}");ie("\\hspace","\\@ifstar\\@hspacer\\@hspace");ie("\\@hspace","\\hskip #1\\relax");ie("\\@hspacer","\\rule{0pt}{0pt}\\hskip #1\\relax");ie("\\ordinarycolon",":");ie("\\vcentcolon","\\mathrel{\\mathop\\ordinarycolon}");ie("\\dblcolon",'\\html@mathml{\\mathrel{\\vcentcolon\\mathrel{\\mkern-.9mu}\\vcentcolon}}{\\mathop{\\char"2237}}');ie("\\coloneqq",'\\html@mathml{\\mathrel{\\vcentcolon\\mathrel{\\mkern-1.2mu}=}}{\\mathop{\\char"2254}}');ie("\\Coloneqq",'\\html@mathml{\\mathrel{\\dblcolon\\mathrel{\\mkern-1.2mu}=}}{\\mathop{\\char"2237\\char"3d}}');ie("\\coloneq",'\\html@mathml{\\mathrel{\\vcentcolon\\mathrel{\\mkern-1.2mu}\\mathrel{-}}}{\\mathop{\\char"3a\\char"2212}}');ie("\\Coloneq",'\\html@mathml{\\mathrel{\\dblcolon\\mathrel{\\mkern-1.2mu}\\mathrel{-}}}{\\mathop{\\char"2237\\char"2212}}');ie("\\eqqcolon",'\\html@mathml{\\mathrel{=\\mathrel{\\mkern-1.2mu}\\vcentcolon}}{\\mathop{\\char"2255}}');ie("\\Eqqcolon",'\\html@mathml{\\mathrel{=\\mathrel{\\mkern-1.2mu}\\dblcolon}}{\\mathop{\\char"3d\\char"2237}}');ie("\\eqcolon",'\\html@mathml{\\mathrel{\\mathrel{-}\\mathrel{\\mkern-1.2mu}\\vcentcolon}}{\\mathop{\\char"2239}}');ie("\\Eqcolon",'\\html@mathml{\\mathrel{\\mathrel{-}\\mathrel{\\mkern-1.2mu}\\dblcolon}}{\\mathop{\\char"2212\\char"2237}}');ie("\\colonapprox",'\\html@mathml{\\mathrel{\\vcentcolon\\mathrel{\\mkern-1.2mu}\\approx}}{\\mathop{\\char"3a\\char"2248}}');ie("\\Colonapprox",'\\html@mathml{\\mathrel{\\dblcolon\\mathrel{\\mkern-1.2mu}\\approx}}{\\mathop{\\char"2237\\char"2248}}');ie("\\colonsim",'\\html@mathml{\\mathrel{\\vcentcolon\\mathrel{\\mkern-1.2mu}\\sim}}{\\mathop{\\char"3a\\char"223c}}');ie("\\Colonsim",'\\html@mathml{\\mathrel{\\dblcolon\\mathrel{\\mkern-1.2mu}\\sim}}{\\mathop{\\char"2237\\char"223c}}');ie("∷","\\dblcolon");ie("∹","\\eqcolon");ie("≔","\\coloneqq");ie("≕","\\eqqcolon");ie("⩴","\\Coloneqq");ie("\\ratio","\\vcentcolon");ie("\\coloncolon","\\dblcolon");ie("\\colonequals","\\coloneqq");ie("\\coloncolonequals","\\Coloneqq");ie("\\equalscolon","\\eqqcolon");ie("\\equalscoloncolon","\\Eqqcolon");ie("\\colonminus","\\coloneq");ie("\\coloncolonminus","\\Coloneq");ie("\\minuscolon","\\eqcolon");ie("\\minuscoloncolon","\\Eqcolon");ie("\\coloncolonapprox","\\Colonapprox");ie("\\coloncolonsim","\\Colonsim");ie("\\simcolon","\\mathrel{\\sim\\mathrel{\\mkern-1.2mu}\\vcentcolon}");ie("\\simcoloncolon","\\mathrel{\\sim\\mathrel{\\mkern-1.2mu}\\dblcolon}");ie("\\approxcolon","\\mathrel{\\approx\\mathrel{\\mkern-1.2mu}\\vcentcolon}");ie("\\approxcoloncolon","\\mathrel{\\approx\\mathrel{\\mkern-1.2mu}\\dblcolon}");ie("\\notni","\\html@mathml{\\not\\ni}{\\mathrel{\\char`∌}}");ie("\\limsup","\\DOTSB\\operatorname*{lim\\,sup}");ie("\\liminf","\\DOTSB\\operatorname*{lim\\,inf}");ie("\\injlim","\\DOTSB\\operatorname*{inj\\,lim}");ie("\\projlim","\\DOTSB\\operatorname*{proj\\,lim}");ie("\\varlimsup","\\DOTSB\\operatorname*{\\overline{lim}}");ie("\\varliminf","\\DOTSB\\operatorname*{\\underline{lim}}");ie("\\varinjlim","\\DOTSB\\operatorname*{\\underrightarrow{lim}}");ie("\\varprojlim","\\DOTSB\\operatorname*{\\underleftarrow{lim}}");ie("\\gvertneqq","\\html@mathml{\\@gvertneqq}{≩}");ie("\\lvertneqq","\\html@mathml{\\@lvertneqq}{≨}");ie("\\ngeqq","\\html@mathml{\\@ngeqq}{≱}");ie("\\ngeqslant","\\html@mathml{\\@ngeqslant}{≱}");ie("\\nleqq","\\html@mathml{\\@nleqq}{≰}");ie("\\nleqslant","\\html@mathml{\\@nleqslant}{≰}");ie("\\nshortmid","\\html@mathml{\\@nshortmid}{∤}");ie("\\nshortparallel","\\html@mathml{\\@nshortparallel}{∦}");ie("\\nsubseteqq","\\html@mathml{\\@nsubseteqq}{⊈}");ie("\\nsupseteqq","\\html@mathml{\\@nsupseteqq}{⊉}");ie("\\varsubsetneq","\\html@mathml{\\@varsubsetneq}{⊊}");ie("\\varsubsetneqq","\\html@mathml{\\@varsubsetneqq}{⫋}");ie("\\varsupsetneq","\\html@mathml{\\@varsupsetneq}{⊋}");ie("\\varsupsetneqq","\\html@mathml{\\@varsupsetneqq}{⫌}");ie("\\imath","\\html@mathml{\\@imath}{ı}");ie("\\jmath","\\html@mathml{\\@jmath}{ȷ}");ie("\\llbracket","\\html@mathml{\\mathopen{[\\mkern-3.2mu[}}{\\mathopen{\\char`⟦}}");ie("\\rrbracket","\\html@mathml{\\mathclose{]\\mkern-3.2mu]}}{\\mathclose{\\char`⟧}}");ie("⟦","\\llbracket");ie("⟧","\\rrbracket");ie("\\lBrace","\\html@mathml{\\mathopen{\\{\\mkern-3.2mu[}}{\\mathopen{\\char`⦃}}");ie("\\rBrace","\\html@mathml{\\mathclose{]\\mkern-3.2mu\\}}}{\\mathclose{\\char`⦄}}");ie("⦃","\\lBrace");ie("⦄","\\rBrace");ie("\\minuso","\\mathbin{\\html@mathml{{\\mathrlap{\\mathchoice{\\kern{0.145em}}{\\kern{0.145em}}{\\kern{0.1015em}}{\\kern{0.0725em}}\\circ}{-}}}{\\char`⦵}}");ie("⦵","\\minuso");ie("\\darr","\\downarrow");ie("\\dArr","\\Downarrow");ie("\\Darr","\\Downarrow");ie("\\lang","\\langle");ie("\\rang","\\rangle");ie("\\uarr","\\uparrow");ie("\\uArr","\\Uparrow");ie("\\Uarr","\\Uparrow");ie("\\N","\\mathbb{N}");ie("\\R","\\mathbb{R}");ie("\\Z","\\mathbb{Z}");ie("\\alef","\\aleph");ie("\\alefsym","\\aleph");ie("\\Alpha","\\mathrm{A}");ie("\\Beta","\\mathrm{B}");ie("\\bull","\\bullet");ie("\\Chi","\\mathrm{X}");ie("\\clubs","\\clubsuit");ie("\\cnums","\\mathbb{C}");ie("\\Complex","\\mathbb{C}");ie("\\Dagger","\\ddagger");ie("\\diamonds","\\diamondsuit");ie("\\empty","\\emptyset");ie("\\Epsilon","\\mathrm{E}");ie("\\Eta","\\mathrm{H}");ie("\\exist","\\exists");ie("\\harr","\\leftrightarrow");ie("\\hArr","\\Leftrightarrow");ie("\\Harr","\\Leftrightarrow");ie("\\hearts","\\heartsuit");ie("\\image","\\Im");ie("\\infin","\\infty");ie("\\Iota","\\mathrm{I}");ie("\\isin","\\in");ie("\\Kappa","\\mathrm{K}");ie("\\larr","\\leftarrow");ie("\\lArr","\\Leftarrow");ie("\\Larr","\\Leftarrow");ie("\\lrarr","\\leftrightarrow");ie("\\lrArr","\\Leftrightarrow");ie("\\Lrarr","\\Leftrightarrow");ie("\\Mu","\\mathrm{M}");ie("\\natnums","\\mathbb{N}");ie("\\Nu","\\mathrm{N}");ie("\\Omicron","\\mathrm{O}");ie("\\plusmn","\\pm");ie("\\rarr","\\rightarrow");ie("\\rArr","\\Rightarrow");ie("\\Rarr","\\Rightarrow");ie("\\real","\\Re");ie("\\reals","\\mathbb{R}");ie("\\Reals","\\mathbb{R}");ie("\\Rho","\\mathrm{P}");ie("\\sdot","\\cdot");ie("\\sect","\\S");ie("\\spades","\\spadesuit");ie("\\sub","\\subset");ie("\\sube","\\subseteq");ie("\\supe","\\supseteq");ie("\\Tau","\\mathrm{T}");ie("\\thetasym","\\vartheta");ie("\\weierp","\\wp");ie("\\Zeta","\\mathrm{Z}");ie("\\argmin","\\DOTSB\\operatorname*{arg\\,min}");ie("\\argmax","\\DOTSB\\operatorname*{arg\\,max}");ie("\\plim","\\DOTSB\\mathop{\\operatorname{plim}}\\limits");ie("\\bra","\\mathinner{\\langle{#1}|}");ie("\\ket","\\mathinner{|{#1}\\rangle}");ie("\\braket","\\mathinner{\\langle{#1}\\rangle}");ie("\\Bra","\\left\\langle#1\\right|");ie("\\Ket","\\left|#1\\right\\rangle");var nF=e=>n=>{var t=n.consumeArg().tokens,r=n.consumeArg().tokens,s=n.consumeArg().tokens,i=n.consumeArg().tokens,a=n.macros.get("|"),o=n.macros.get("\\|");n.macros.beginGroup();var l=_=>p=>{e&&(p.macros.set("|",a),s.length&&p.macros.set("\\|",o));var m=_;if(!_&&s.length){var x=p.future();x.text==="|"&&(p.popToken(),m=!0)}return{tokens:m?s:r,numArgs:0}};n.macros.set("|",l(!1)),s.length&&n.macros.set("\\|",l(!0));var u=n.consumeArg().tokens,h=n.expandTokens([...i,...u,...t]);return n.macros.endGroup(),{tokens:h.reverse(),numArgs:0}};ie("\\bra@ket",nF(!1));ie("\\bra@set",nF(!0));ie("\\Braket","\\bra@ket{\\left\\langle}{\\,\\middle\\vert\\,}{\\,\\middle\\vert\\,}{\\right\\rangle}");ie("\\Set","\\bra@set{\\left\\{\\:}{\\;\\middle\\vert\\;}{\\;\\middle\\Vert\\;}{\\:\\right\\}}");ie("\\set","\\bra@set{\\{\\,}{\\mid}{}{\\,\\}}");ie("\\angln","{\\angl n}");ie("\\blue","\\textcolor{##6495ed}{#1}");ie("\\orange","\\textcolor{##ffa500}{#1}");ie("\\pink","\\textcolor{##ff00af}{#1}");ie("\\red","\\textcolor{##df0030}{#1}");ie("\\green","\\textcolor{##28ae7b}{#1}");ie("\\gray","\\textcolor{gray}{#1}");ie("\\purple","\\textcolor{##9d38bd}{#1}");ie("\\blueA","\\textcolor{##ccfaff}{#1}");ie("\\blueB","\\textcolor{##80f6ff}{#1}");ie("\\blueC","\\textcolor{##63d9ea}{#1}");ie("\\blueD","\\textcolor{##11accd}{#1}");ie("\\blueE","\\textcolor{##0c7f99}{#1}");ie("\\tealA","\\textcolor{##94fff5}{#1}");ie("\\tealB","\\textcolor{##26edd5}{#1}");ie("\\tealC","\\textcolor{##01d1c1}{#1}");ie("\\tealD","\\textcolor{##01a995}{#1}");ie("\\tealE","\\textcolor{##208170}{#1}");ie("\\greenA","\\textcolor{##b6ffb0}{#1}");ie("\\greenB","\\textcolor{##8af281}{#1}");ie("\\greenC","\\textcolor{##74cf70}{#1}");ie("\\greenD","\\textcolor{##1fab54}{#1}");ie("\\greenE","\\textcolor{##0d923f}{#1}");ie("\\goldA","\\textcolor{##ffd0a9}{#1}");ie("\\goldB","\\textcolor{##ffbb71}{#1}");ie("\\goldC","\\textcolor{##ff9c39}{#1}");ie("\\goldD","\\textcolor{##e07d10}{#1}");ie("\\goldE","\\textcolor{##a75a05}{#1}");ie("\\redA","\\textcolor{##fca9a9}{#1}");ie("\\redB","\\textcolor{##ff8482}{#1}");ie("\\redC","\\textcolor{##f9685d}{#1}");ie("\\redD","\\textcolor{##e84d39}{#1}");ie("\\redE","\\textcolor{##bc2612}{#1}");ie("\\maroonA","\\textcolor{##ffbde0}{#1}");ie("\\maroonB","\\textcolor{##ff92c6}{#1}");ie("\\maroonC","\\textcolor{##ed5fa6}{#1}");ie("\\maroonD","\\textcolor{##ca337c}{#1}");ie("\\maroonE","\\textcolor{##9e034e}{#1}");ie("\\purpleA","\\textcolor{##ddd7ff}{#1}");ie("\\purpleB","\\textcolor{##c6b9fc}{#1}");ie("\\purpleC","\\textcolor{##aa87ff}{#1}");ie("\\purpleD","\\textcolor{##7854ab}{#1}");ie("\\purpleE","\\textcolor{##543b78}{#1}");ie("\\mintA","\\textcolor{##f5f9e8}{#1}");ie("\\mintB","\\textcolor{##edf2df}{#1}");ie("\\mintC","\\textcolor{##e0e5cc}{#1}");ie("\\grayA","\\textcolor{##f6f7f7}{#1}");ie("\\grayB","\\textcolor{##f0f1f2}{#1}");ie("\\grayC","\\textcolor{##e3e5e6}{#1}");ie("\\grayD","\\textcolor{##d6d8da}{#1}");ie("\\grayE","\\textcolor{##babec2}{#1}");ie("\\grayF","\\textcolor{##888d93}{#1}");ie("\\grayG","\\textcolor{##626569}{#1}");ie("\\grayH","\\textcolor{##3b3e40}{#1}");ie("\\grayI","\\textcolor{##21242c}{#1}");ie("\\kaBlue","\\textcolor{##314453}{#1}");ie("\\kaGreen","\\textcolor{##71B307}{#1}");var rF={"^":!0,_:!0,"\\limits":!0,"\\nolimits":!0};class S9n{constructor(n,t,r){this.settings=void 0,this.expansionCount=void 0,this.lexer=void 0,this.macros=void 0,this.stack=void 0,this.mode=void 0,this.settings=t,this.expansionCount=0,this.feed(n),this.macros=new x9n(w9n,t.macros),this.mode=r,this.stack=[]}feed(n){this.lexer=new kA(n,this.settings)}switchMode(n){this.mode=n}beginGroup(){this.macros.beginGroup()}endGroup(){this.macros.endGroup()}endGroups(){this.macros.endGroups()}future(){return this.stack.length===0&&this.pushToken(this.lexer.lex()),this.stack[this.stack.length-1]}popToken(){return this.future(),this.stack.pop()}pushToken(n){this.stack.push(n)}pushTokens(n){this.stack.push(...n)}scanArgument(n){var t,r,s;if(n){if(this.consumeSpaces(),this.future().text!=="[")return null;t=this.popToken(),{tokens:s,end:r}=this.consumeArg(["]"])}else({tokens:s,start:t,end:r}=this.consumeArg());return this.pushToken(new ra("EOF",r.loc)),this.pushTokens(s),new ra("",Ni.range(t,r))}consumeSpaces(){for(;;){var n=this.future();if(n.text===" ")this.stack.pop();else break}}consumeArg(n){var t=[],r=n&&n.length>0;r||this.consumeSpaces();var s=this.future(),i,a=0,o=0;do{if(i=this.popToken(),t.push(i),i.text==="{")++a;else if(i.text==="}"){if(--a,a===-1)throw new Ze("Extra }",i)}else if(i.text==="EOF")throw new Ze("Unexpected end of input in a macro argument, expected '"+(n&&r?n[o]:"}")+"'",i);if(n&&r)if((a===0||a===1&&n[o]==="{")&&i.text===n[o]){if(++o,o===n.length){t.splice(-o,o);break}}else o=0}while(a!==0||r);return s.text==="{"&&t[t.length-1].text==="}"&&(t.pop(),t.shift()),t.reverse(),{tokens:t,start:s,end:i}}consumeArgs(n,t){if(t){if(t.length!==n+1)throw new Ze("The length of delimiters doesn't match the number of args!");for(var r=t[0],s=0;sthis.settings.maxExpand)throw new Ze("Too many expansions: infinite loop or need to increase maxExpand setting")}expandOnce(n){var t=this.popToken(),r=t.text,s=t.noexpand?null:this._getExpansion(r);if(s==null||n&&s.unexpandable){if(n&&s==null&&r[0]==="\\"&&!this.isDefined(r))throw new Ze("Undefined control sequence: "+r);return this.pushToken(t),!1}this.countExpansion(1);var i=s.tokens,a=this.consumeArgs(s.numArgs,s.delimiters);if(s.numArgs){i=i.slice();for(var o=i.length-1;o>=0;--o){var l=i[o];if(l.text==="#"){if(o===0)throw new Ze("Incomplete placeholder at end of macro body",l);if(l=i[--o],l.text==="#")i.splice(o+1,1);else if(/^[1-9]$/.test(l.text))i.splice(o,2,...a[+l.text-1]);else throw new Ze("Not a valid argument number",l)}}}return this.pushTokens(i),i.length}expandAfterFuture(){return this.expandOnce(),this.future()}expandNextToken(){for(;;)if(this.expandOnce()===!1){var n=this.stack.pop();return n.treatAsRelax&&(n.text="\\relax"),n}}expandMacro(n){return this.macros.has(n)?this.expandTokens([new ra(n)]):void 0}expandTokens(n){var t=[],r=this.stack.length;for(this.pushTokens(n);this.stack.length>r;)if(this.expandOnce(!0)===!1){var s=this.stack.pop();s.treatAsRelax&&(s.noexpand=!1,s.treatAsRelax=!1),t.push(s)}return this.countExpansion(t.length),t}expandMacroAsText(n){var t=this.expandMacro(n);return t&&t.map(r=>r.text).join("")}_getExpansion(n){var t=this.macros.get(n);if(t==null)return t;if(n.length===1){var r=this.lexer.catcodes[n];if(r!=null&&r!==13)return}var s=typeof t=="function"?t(this):t;if(typeof s=="string"){var i=0;if(s.includes("#"))for(var a=s.replace(/##/g,"");a.includes("#"+(i+1));)++i;for(var o=new kA(s,this.settings),l=[],u=o.lex();u.text!=="EOF";)l.push(u),u=o.lex();l.reverse();var h={tokens:l,numArgs:i};return h}return s}isDefined(n){return this.macros.has(n)||fu.hasOwnProperty(n)||Sr.math.hasOwnProperty(n)||Sr.text.hasOwnProperty(n)||rF.hasOwnProperty(n)}isExpandable(n){var t=this.macros.get(n);return t!=null?typeof t=="string"||typeof t=="function"||!t.unexpandable:fu.hasOwnProperty(n)&&!fu[n].primitive}}var EA=/^[₊₋₌₍₎₀₁₂₃₄₅₆₇₈₉ₐₑₕᵢⱼₖₗₘₙₒₚᵣₛₜᵤᵥₓᵦᵧᵨᵩᵪ]/,m1=Object.freeze({"₊":"+","₋":"-","₌":"=","₍":"(","₎":")","₀":"0","₁":"1","₂":"2","₃":"3","₄":"4","₅":"5","₆":"6","₇":"7","₈":"8","₉":"9","ₐ":"a","ₑ":"e","ₕ":"h","ᵢ":"i","ⱼ":"j","ₖ":"k","ₗ":"l","ₘ":"m","ₙ":"n","ₒ":"o","ₚ":"p","ᵣ":"r","ₛ":"s","ₜ":"t","ᵤ":"u","ᵥ":"v","ₓ":"x","ᵦ":"β","ᵧ":"γ","ᵨ":"ρ","ᵩ":"ϕ","ᵪ":"χ","⁺":"+","⁻":"-","⁼":"=","⁽":"(","⁾":")","⁰":"0","¹":"1","²":"2","³":"3","⁴":"4","⁵":"5","⁶":"6","⁷":"7","⁸":"8","⁹":"9","ᴬ":"A","ᴮ":"B","ᴰ":"D","ᴱ":"E","ᴳ":"G","ᴴ":"H","ᴵ":"I","ᴶ":"J","ᴷ":"K","ᴸ":"L","ᴹ":"M","ᴺ":"N","ᴼ":"O","ᴾ":"P","ᴿ":"R","ᵀ":"T","ᵁ":"U","ⱽ":"V","ᵂ":"W","ᵃ":"a","ᵇ":"b","ᶜ":"c","ᵈ":"d","ᵉ":"e","ᶠ":"f","ᵍ":"g",ʰ:"h","ⁱ":"i",ʲ:"j","ᵏ":"k",ˡ:"l","ᵐ":"m",ⁿ:"n","ᵒ":"o","ᵖ":"p",ʳ:"r",ˢ:"s","ᵗ":"t","ᵘ":"u","ᵛ":"v",ʷ:"w",ˣ:"x",ʸ:"y","ᶻ":"z","ᵝ":"β","ᵞ":"γ","ᵟ":"δ","ᵠ":"ϕ","ᵡ":"χ","ᶿ":"θ"}),Uw={"́":{text:"\\'",math:"\\acute"},"̀":{text:"\\`",math:"\\grave"},"̈":{text:'\\"',math:"\\ddot"},"̃":{text:"\\~",math:"\\tilde"},"̄":{text:"\\=",math:"\\bar"},"̆":{text:"\\u",math:"\\breve"},"̌":{text:"\\v",math:"\\check"},"̂":{text:"\\^",math:"\\hat"},"̇":{text:"\\.",math:"\\dot"},"̊":{text:"\\r",math:"\\mathring"},"̋":{text:"\\H"},"̧":{text:"\\c"}},NA={á:"á",à:"à",ä:"ä",ǟ:"ǟ",ã:"ã",ā:"ā",ă:"ă",ắ:"ắ",ằ:"ằ",ẵ:"ẵ",ǎ:"ǎ",â:"â",ấ:"ấ",ầ:"ầ",ẫ:"ẫ",ȧ:"ȧ",ǡ:"ǡ",å:"å",ǻ:"ǻ",ḃ:"ḃ",ć:"ć",ḉ:"ḉ",č:"č",ĉ:"ĉ",ċ:"ċ",ç:"ç",ď:"ď",ḋ:"ḋ",ḑ:"ḑ",é:"é",è:"è",ë:"ë",ẽ:"ẽ",ē:"ē",ḗ:"ḗ",ḕ:"ḕ",ĕ:"ĕ",ḝ:"ḝ",ě:"ě",ê:"ê",ế:"ế",ề:"ề",ễ:"ễ",ė:"ė",ȩ:"ȩ",ḟ:"ḟ",ǵ:"ǵ",ḡ:"ḡ",ğ:"ğ",ǧ:"ǧ",ĝ:"ĝ",ġ:"ġ",ģ:"ģ",ḧ:"ḧ",ȟ:"ȟ",ĥ:"ĥ",ḣ:"ḣ",ḩ:"ḩ",í:"í",ì:"ì",ï:"ï",ḯ:"ḯ",ĩ:"ĩ",ī:"ī",ĭ:"ĭ",ǐ:"ǐ",î:"î",ǰ:"ǰ",ĵ:"ĵ",ḱ:"ḱ",ǩ:"ǩ",ķ:"ķ",ĺ:"ĺ",ľ:"ľ",ļ:"ļ",ḿ:"ḿ",ṁ:"ṁ",ń:"ń",ǹ:"ǹ",ñ:"ñ",ň:"ň",ṅ:"ṅ",ņ:"ņ",ó:"ó",ò:"ò",ö:"ö",ȫ:"ȫ",õ:"õ",ṍ:"ṍ",ṏ:"ṏ",ȭ:"ȭ",ō:"ō",ṓ:"ṓ",ṑ:"ṑ",ŏ:"ŏ",ǒ:"ǒ",ô:"ô",ố:"ố",ồ:"ồ",ỗ:"ỗ",ȯ:"ȯ",ȱ:"ȱ",ő:"ő",ṕ:"ṕ",ṗ:"ṗ",ŕ:"ŕ",ř:"ř",ṙ:"ṙ",ŗ:"ŗ",ś:"ś",ṥ:"ṥ",š:"š",ṧ:"ṧ",ŝ:"ŝ",ṡ:"ṡ",ş:"ş",ẗ:"ẗ",ť:"ť",ṫ:"ṫ",ţ:"ţ",ú:"ú",ù:"ù",ü:"ü",ǘ:"ǘ",ǜ:"ǜ",ǖ:"ǖ",ǚ:"ǚ",ũ:"ũ",ṹ:"ṹ",ū:"ū",ṻ:"ṻ",ŭ:"ŭ",ǔ:"ǔ",û:"û",ů:"ů",ű:"ű",ṽ:"ṽ",ẃ:"ẃ",ẁ:"ẁ",ẅ:"ẅ",ŵ:"ŵ",ẇ:"ẇ",ẘ:"ẘ",ẍ:"ẍ",ẋ:"ẋ",ý:"ý",ỳ:"ỳ",ÿ:"ÿ",ỹ:"ỹ",ȳ:"ȳ",ŷ:"ŷ",ẏ:"ẏ",ẙ:"ẙ",ź:"ź",ž:"ž",ẑ:"ẑ",ż:"ż",Á:"Á",À:"À",Ä:"Ä",Ǟ:"Ǟ",Ã:"Ã",Ā:"Ā",Ă:"Ă",Ắ:"Ắ",Ằ:"Ằ",Ẵ:"Ẵ",Ǎ:"Ǎ",Â:"Â",Ấ:"Ấ",Ầ:"Ầ",Ẫ:"Ẫ",Ȧ:"Ȧ",Ǡ:"Ǡ",Å:"Å",Ǻ:"Ǻ",Ḃ:"Ḃ",Ć:"Ć",Ḉ:"Ḉ",Č:"Č",Ĉ:"Ĉ",Ċ:"Ċ",Ç:"Ç",Ď:"Ď",Ḋ:"Ḋ",Ḑ:"Ḑ",É:"É",È:"È",Ë:"Ë",Ẽ:"Ẽ",Ē:"Ē",Ḗ:"Ḗ",Ḕ:"Ḕ",Ĕ:"Ĕ",Ḝ:"Ḝ",Ě:"Ě",Ê:"Ê",Ế:"Ế",Ề:"Ề",Ễ:"Ễ",Ė:"Ė",Ȩ:"Ȩ",Ḟ:"Ḟ",Ǵ:"Ǵ",Ḡ:"Ḡ",Ğ:"Ğ",Ǧ:"Ǧ",Ĝ:"Ĝ",Ġ:"Ġ",Ģ:"Ģ",Ḧ:"Ḧ",Ȟ:"Ȟ",Ĥ:"Ĥ",Ḣ:"Ḣ",Ḩ:"Ḩ",Í:"Í",Ì:"Ì",Ï:"Ï",Ḯ:"Ḯ",Ĩ:"Ĩ",Ī:"Ī",Ĭ:"Ĭ",Ǐ:"Ǐ",Î:"Î",İ:"İ",Ĵ:"Ĵ",Ḱ:"Ḱ",Ǩ:"Ǩ",Ķ:"Ķ",Ĺ:"Ĺ",Ľ:"Ľ",Ļ:"Ļ",Ḿ:"Ḿ",Ṁ:"Ṁ",Ń:"Ń",Ǹ:"Ǹ",Ñ:"Ñ",Ň:"Ň",Ṅ:"Ṅ",Ņ:"Ņ",Ó:"Ó",Ò:"Ò",Ö:"Ö",Ȫ:"Ȫ",Õ:"Õ",Ṍ:"Ṍ",Ṏ:"Ṏ",Ȭ:"Ȭ",Ō:"Ō",Ṓ:"Ṓ",Ṑ:"Ṑ",Ŏ:"Ŏ",Ǒ:"Ǒ",Ô:"Ô",Ố:"Ố",Ồ:"Ồ",Ỗ:"Ỗ",Ȯ:"Ȯ",Ȱ:"Ȱ",Ő:"Ő",Ṕ:"Ṕ",Ṗ:"Ṗ",Ŕ:"Ŕ",Ř:"Ř",Ṙ:"Ṙ",Ŗ:"Ŗ",Ś:"Ś",Ṥ:"Ṥ",Š:"Š",Ṧ:"Ṧ",Ŝ:"Ŝ",Ṡ:"Ṡ",Ş:"Ş",Ť:"Ť",Ṫ:"Ṫ",Ţ:"Ţ",Ú:"Ú",Ù:"Ù",Ü:"Ü",Ǘ:"Ǘ",Ǜ:"Ǜ",Ǖ:"Ǖ",Ǚ:"Ǚ",Ũ:"Ũ",Ṹ:"Ṹ",Ū:"Ū",Ṻ:"Ṻ",Ŭ:"Ŭ",Ǔ:"Ǔ",Û:"Û",Ů:"Ů",Ű:"Ű",Ṽ:"Ṽ",Ẃ:"Ẃ",Ẁ:"Ẁ",Ẅ:"Ẅ",Ŵ:"Ŵ",Ẇ:"Ẇ",Ẍ:"Ẍ",Ẋ:"Ẋ",Ý:"Ý",Ỳ:"Ỳ",Ÿ:"Ÿ",Ỹ:"Ỹ",Ȳ:"Ȳ",Ŷ:"Ŷ",Ẏ:"Ẏ",Ź:"Ź",Ž:"Ž",Ẑ:"Ẑ",Ż:"Ż",ά:"ά",ὰ:"ὰ",ᾱ:"ᾱ",ᾰ:"ᾰ",έ:"έ",ὲ:"ὲ",ή:"ή",ὴ:"ὴ",ί:"ί",ὶ:"ὶ",ϊ:"ϊ",ΐ:"ΐ",ῒ:"ῒ",ῑ:"ῑ",ῐ:"ῐ",ό:"ό",ὸ:"ὸ",ύ:"ύ",ὺ:"ὺ",ϋ:"ϋ",ΰ:"ΰ",ῢ:"ῢ",ῡ:"ῡ",ῠ:"ῠ",ώ:"ώ",ὼ:"ὼ",Ύ:"Ύ",Ὺ:"Ὺ",Ϋ:"Ϋ",Ῡ:"Ῡ",Ῠ:"Ῠ",Ώ:"Ώ",Ὼ:"Ὼ"};class gy{constructor(n,t){this.mode=void 0,this.gullet=void 0,this.settings=void 0,this.leftrightDepth=void 0,this.nextToken=void 0,this.mode="math",this.gullet=new S9n(n,t,this.mode),this.settings=t,this.leftrightDepth=0,this.nextToken=null}expect(n,t){if(t===void 0&&(t=!0),this.fetch().text!==n)throw new Ze("Expected '"+n+"', got '"+this.fetch().text+"'",this.fetch());t&&this.consume()}consume(){this.nextToken=null}fetch(){return this.nextToken==null&&(this.nextToken=this.gullet.expandNextToken()),this.nextToken}switchMode(n){this.mode=n,this.gullet.switchMode(n)}parse(){this.settings.globalGroup||this.gullet.beginGroup(),this.settings.colorIsTextColor&&this.gullet.macros.set("\\color","\\textcolor");try{var n=this.parseExpression(!1);return this.expect("EOF"),this.settings.globalGroup||this.gullet.endGroup(),n}finally{this.gullet.endGroups()}}subparse(n){var t=this.nextToken;this.consume(),this.gullet.pushToken(new ra("}")),this.gullet.pushTokens(n);var r=this.parseExpression(!1);return this.expect("}"),this.nextToken=t,r}parseExpression(n,t){for(var r=[];;){this.mode==="math"&&this.consumeSpaces();var s=this.fetch();if(gy.endOfExpression.has(s.text)||t&&s.text===t||n&&fu[s.text]&&fu[s.text].infix)break;var i=this.parseAtom(t);if(i){if(i.type==="internal")continue}else break;r.push(i)}return this.mode==="text"&&this.formLigatures(r),this.handleInfixNodes(r)}handleInfixNodes(n){for(var t=-1,r,s=0;s=128)this.settings.strict&&(uP(t.charCodeAt(0))?this.mode==="math"&&this.settings.reportNonstrict("unicodeTextInMathMode",'Unicode text character "'+t[0]+'" used in math mode',n):this.settings.reportNonstrict("unknownSymbol",'Unrecognized Unicode character "'+t[0]+'"'+(" ("+t.charCodeAt(0)+")"),n)),a={type:"textord",mode:"text",loc:Ni.range(n),text:t};else return null;if(this.consume(),i)for(var h=0;h0?{type:"text",value:E}:void 0),E===!1?p.lastIndex=C+1:(x!==C&&w.push({type:"text",value:u.value.slice(x,C)}),Array.isArray(E)?w.push(...E):E&&w.push(E),x=C+y[0].length,b=!0),!p.global)break;y=p.exec(u.value)}return b?(x?\]}]+$/.exec(e);if(!n)return[e,void 0];e=e.slice(0,n.index);let t=n[0],r=t.indexOf(")");const s=jA(e,"(");let i=jA(e,")");for(;r!==-1&&s>i;)e+=t.slice(0,r+1),t=t.slice(r+1),r=t.indexOf(")"),i++;return[e,t]}function oF(e,n){const t=e.input.charCodeAt(e.index-1);return(e.index===0||V_(t)||Jb(t))&&(!n||t!==47)}lF.peek=rEn;function Q9n(){this.buffer()}function X9n(e){this.enter({type:"footnoteReference",identifier:"",label:""},e)}function Y9n(){this.buffer()}function Z9n(e){this.enter({type:"footnoteDefinition",identifier:"",label:"",children:[]},e)}function J9n(e){const n=this.resume(),t=this.stack[this.stack.length-1];t.type,t.identifier=oo(this.sliceSerialize(e)).toLowerCase(),t.label=n}function eEn(e){this.exit(e)}function tEn(e){const n=this.resume(),t=this.stack[this.stack.length-1];t.type,t.identifier=oo(this.sliceSerialize(e)).toLowerCase(),t.label=n}function nEn(e){this.exit(e)}function rEn(){return"["}function lF(e,n,t,r){const s=t.createTracker(r);let i=s.move("[^");const a=t.enter("footnoteReference"),o=t.enter("reference");return i+=s.move(t.safe(t.associationId(e),{after:"]",before:i})),o(),a(),i+=s.move("]"),i}function sEn(){return{enter:{gfmFootnoteCallString:Q9n,gfmFootnoteCall:X9n,gfmFootnoteDefinitionLabelString:Y9n,gfmFootnoteDefinition:Z9n},exit:{gfmFootnoteCallString:J9n,gfmFootnoteCall:eEn,gfmFootnoteDefinitionLabelString:tEn,gfmFootnoteDefinition:nEn}}}function iEn(e){let n=!1;return e&&e.firstLineBlank&&(n=!0),{handlers:{footnoteDefinition:t,footnoteReference:lF},unsafe:[{character:"[",inConstruct:["label","phrasing","reference"]}]};function t(r,s,i,a){const o=i.createTracker(a);let l=o.move("[^");const u=i.enter("footnoteDefinition"),h=i.enter("label");return l+=o.move(i.safe(i.associationId(r),{before:l,after:"]"})),h(),l+=o.move("]:"),r.children&&r.children.length>0&&(o.shift(4),l+=o.move((n?` -`:" ")+i.indentLines(i.containerFlow(r,o.current()),n?cF:aEn))),u(),l}}function aEn(e,n,t){return n===0?e:cF(e,n,t)}function cF(e,n,t){return(t?"":" ")+e}const oEn=["autolink","destinationLiteral","destinationRaw","reference","titleQuote","titleApostrophe"];uF.peek=fEn;function lEn(){return{canContainEols:["delete"],enter:{strikethrough:uEn},exit:{strikethrough:_En}}}function cEn(){return{unsafe:[{character:"~",inConstruct:"phrasing",notInConstruct:oEn}],handlers:{delete:uF}}}function uEn(e){this.enter({type:"delete",children:[]},e)}function _En(e){this.exit(e)}function uF(e,n,t,r){const s=t.createTracker(r),i=t.enter("strikethrough");let a=s.move("~~");return a+=t.containerPhrasing(e,{...s.current(),before:a,after:"~"}),a+=s.move("~~"),i(),a}function fEn(){return"~"}function dEn(e){return e.length}function hEn(e,n){const t=n||{},r=(t.align||[]).concat(),s=t.stringLength||dEn,i=[],a=[],o=[],l=[];let u=0,h=-1;for(;++hu&&(u=e[h].length);++bl[b])&&(l[b]=y)}k.push(w)}a[h]=k,o[h]=v}let _=-1;if(typeof r=="object"&&"length"in r)for(;++_l[_]&&(l[_]=w),m[_]=w),p[_]=y}a.splice(1,0,p),o.splice(1,0,m),h=-1;const x=[];for(;++h "),i.shift(2);const a=t.indentLines(t.containerFlow(e,i.current()),gEn);return s(),a}function gEn(e,n,t){return">"+(t?"":" ")+e}function vEn(e,n){return AA(e,n.inConstruct,!0)&&!AA(e,n.notInConstruct,!1)}function AA(e,n,t){if(typeof n=="string"&&(n=[n]),!n||n.length===0)return t;let r=-1;for(;++ra&&(a=i):i=1,s=r+n.length,r=t.indexOf(n,s);return a}function bEn(e,n){return!!(n.options.fences===!1&&e.value&&!e.lang&&/[^ \r\n]/.test(e.value)&&!/^[\t ]*(?:[\r\n]|$)|(?:^|[\r\n])[\t ]*$/.test(e.value))}function yEn(e){const n=e.options.fence||"`";if(n!=="`"&&n!=="~")throw new Error("Cannot serialize code with `"+n+"` for `options.fence`, expected `` ` `` or `~`");return n}function xEn(e,n,t,r){const s=yEn(t),i=e.value||"",a=s==="`"?"GraveAccent":"Tilde";if(bEn(e,t)){const _=t.enter("codeIndented"),p=t.indentLines(i,wEn);return _(),p}const o=t.createTracker(r),l=s.repeat(Math.max(_F(i,s)+1,3)),u=t.enter("codeFenced");let h=o.move(l);if(e.lang){const _=t.enter(`codeFencedLang${a}`);h+=o.move(t.safe(e.lang,{before:h,after:" ",encode:["`"],...o.current()})),_()}if(e.lang&&e.meta){const _=t.enter(`codeFencedMeta${a}`);h+=o.move(" "),h+=o.move(t.safe(e.meta,{before:h,after:` +?)[ \r ]*`,C5="[̀-ͯ]",rEn=new RegExp(C5+"+$"),sEn="("+nF+"+)|"+(nEn+"|")+"([!-\\[\\]-‧‪-퟿豈-￿]"+(C5+"*")+"|[\uD800-\uDBFF][\uDC00-\uDFFF]"+(C5+"*")+"|\\\\verb\\*([^]).*?\\4|\\\\verb([^*a-zA-Z]).*?\\5"+("|"+tEn)+("|"+eEn+")");class kA{constructor(n,t){this.input=void 0,this.settings=void 0,this.tokenRegex=void 0,this.catcodes=void 0,this.input=n,this.settings=t,this.tokenRegex=new RegExp(sEn,"g"),this.catcodes={"%":14,"~":13}}setCatcode(n,t){this.catcodes[n]=t}lex(){var n=this.input,t=this.tokenRegex.lastIndex;if(t===n.length)return new ra("EOF",new Ni(this,t,t));var r=this.tokenRegex.exec(n);if(r===null||r.index!==t)throw new Ze("Unexpected character: '"+n[t]+"'",new ra(n[t],new Ni(this,t,t+1)));var s=r[6]||r[3]||(r[2]?"\\ ":" ");if(this.catcodes[s]===14){var i=n.indexOf(` +`,this.tokenRegex.lastIndex);return i===-1?(this.tokenRegex.lastIndex=n.length,this.settings.reportNonstrict("commentAtEnd","% comment has no terminating newline; LaTeX would fail because of commenting the end of math mode (e.g. $)")):this.tokenRegex.lastIndex=i+1,this.lex()}return new ra(s,new Ni(this,t,this.tokenRegex.lastIndex))}}class iEn{constructor(n,t){n===void 0&&(n={}),t===void 0&&(t={}),this.current=void 0,this.builtins=void 0,this.undefStack=void 0,this.current=t,this.builtins=n,this.undefStack=[]}beginGroup(){this.undefStack.push({})}endGroup(){if(this.undefStack.length===0)throw new Ze("Unbalanced namespace destruction: attempt to pop global namespace; please report this as a bug");var n=this.undefStack.pop();for(var t in n)n.hasOwnProperty(t)&&(n[t]==null?delete this.current[t]:this.current[t]=n[t])}endGroups(){for(;this.undefStack.length>0;)this.endGroup()}has(n){return this.current.hasOwnProperty(n)||this.builtins.hasOwnProperty(n)}get(n){return this.current.hasOwnProperty(n)?this.current[n]:this.builtins[n]}set(n,t,r){if(r===void 0&&(r=!1),r){for(var s=0;s0&&(this.undefStack[this.undefStack.length-1][n]=t)}else{var i=this.undefStack[this.undefStack.length-1];i&&!i.hasOwnProperty(n)&&(i[n]=this.current[n])}t==null?delete this.current[n]:this.current[n]=t}}var aEn=GP;ie("\\noexpand",function(e){var n=e.popToken();return e.isExpandable(n.text)&&(n.noexpand=!0,n.treatAsRelax=!0),{tokens:[n],numArgs:0}});ie("\\expandafter",function(e){var n=e.popToken();return e.expandOnce(!0),{tokens:[n],numArgs:0}});ie("\\@firstoftwo",function(e){var n=e.consumeArgs(2);return{tokens:n[0],numArgs:0}});ie("\\@secondoftwo",function(e){var n=e.consumeArgs(2);return{tokens:n[1],numArgs:0}});ie("\\@ifnextchar",function(e){var n=e.consumeArgs(3);e.consumeSpaces();var t=e.future();return n[0].length===1&&n[0][0].text===t.text?{tokens:n[1],numArgs:0}:{tokens:n[2],numArgs:0}});ie("\\@ifstar","\\@ifnextchar *{\\@firstoftwo{#1}}");ie("\\TextOrMath",function(e){var n=e.consumeArgs(2);return e.mode==="text"?{tokens:n[0],numArgs:0}:{tokens:n[1],numArgs:0}});var SA={0:0,1:1,2:2,3:3,4:4,5:5,6:6,7:7,8:8,9:9,a:10,A:10,b:11,B:11,c:12,C:12,d:13,D:13,e:14,E:14,f:15,F:15};ie("\\char",function(e){var n=e.popToken(),t,r=0;if(n.text==="'")t=8,n=e.popToken();else if(n.text==='"')t=16,n=e.popToken();else if(n.text==="`")if(n=e.popToken(),n.text[0]==="\\")r=n.text.charCodeAt(1);else{if(n.text==="EOF")throw new Ze("\\char` missing argument");r=n.text.charCodeAt(0)}else t=10;if(t){if(r=SA[n.text],r==null||r>=t)throw new Ze("Invalid base-"+t+" digit "+n.text);for(var s;(s=SA[e.future().text])!=null&&s{var s=e.consumeArg().tokens;if(s.length!==1)throw new Ze("\\newcommand's first argument must be a macro name");var i=s[0].text,a=e.isDefined(i);if(a&&!n)throw new Ze("\\newcommand{"+i+"} attempting to redefine "+(i+"; use \\renewcommand"));if(!a&&!t)throw new Ze("\\renewcommand{"+i+"} when command "+i+" does not yet exist; use \\newcommand");var o=0;if(s=e.consumeArg().tokens,s.length===1&&s[0].text==="["){for(var l="",u=e.expandNextToken();u.text!=="]"&&u.text!=="EOF";)l+=u.text,u=e.expandNextToken();if(!l.match(/^\s*[0-9]+\s*$/))throw new Ze("Invalid number of arguments: "+l);o=parseInt(l),s=e.consumeArg().tokens}return a&&r||e.macros.set(i,{tokens:s,numArgs:o}),""};ie("\\newcommand",e=>$6(e,!1,!0,!1));ie("\\renewcommand",e=>$6(e,!0,!1,!1));ie("\\providecommand",e=>$6(e,!0,!0,!0));ie("\\message",e=>{var n=e.consumeArgs(1)[0];return console.log(n.reverse().map(t=>t.text).join("")),""});ie("\\errmessage",e=>{var n=e.consumeArgs(1)[0];return console.error(n.reverse().map(t=>t.text).join("")),""});ie("\\show",e=>{var n=e.popToken(),t=n.text;return console.log(n,e.macros.get(t),du[t],Sr.math[t],Sr.text[t]),""});ie("\\bgroup","{");ie("\\egroup","}");ie("~","\\nobreakspace");ie("\\lq","`");ie("\\rq","'");ie("\\aa","\\r a");ie("\\AA","\\r A");ie("\\textcopyright","\\html@mathml{\\textcircled{c}}{\\char`©}");ie("\\copyright","\\TextOrMath{\\textcopyright}{\\text{\\textcopyright}}");ie("\\textregistered","\\html@mathml{\\textcircled{\\scriptsize R}}{\\char`®}");ie("ℬ","\\mathscr{B}");ie("ℰ","\\mathscr{E}");ie("ℱ","\\mathscr{F}");ie("ℋ","\\mathscr{H}");ie("ℐ","\\mathscr{I}");ie("ℒ","\\mathscr{L}");ie("ℳ","\\mathscr{M}");ie("ℛ","\\mathscr{R}");ie("ℭ","\\mathfrak{C}");ie("ℌ","\\mathfrak{H}");ie("ℨ","\\mathfrak{Z}");ie("\\Bbbk","\\Bbb{k}");ie("\\llap","\\mathllap{\\textrm{#1}}");ie("\\rlap","\\mathrlap{\\textrm{#1}}");ie("\\clap","\\mathclap{\\textrm{#1}}");ie("\\mathstrut","\\vphantom{(}");ie("\\underbar","\\underline{\\text{#1}}");ie("\\not",'\\html@mathml{\\mathrel{\\mathrlap\\@not}\\nobreak}{\\char"338}');ie("\\neq","\\html@mathml{\\mathrel{\\not=}}{\\mathrel{\\char`≠}}");ie("\\ne","\\neq");ie("≠","\\neq");ie("\\notin","\\html@mathml{\\mathrel{{\\in}\\mathllap{/\\mskip1mu}}}{\\mathrel{\\char`∉}}");ie("∉","\\notin");ie("≘","\\html@mathml{\\mathrel{=\\kern{-1em}\\raisebox{0.4em}{$\\scriptsize\\frown$}}}{\\mathrel{\\char`≘}}");ie("≙","\\html@mathml{\\stackrel{\\tiny\\wedge}{=}}{\\mathrel{\\char`≘}}");ie("≚","\\html@mathml{\\stackrel{\\tiny\\vee}{=}}{\\mathrel{\\char`≚}}");ie("≛","\\html@mathml{\\stackrel{\\scriptsize\\star}{=}}{\\mathrel{\\char`≛}}");ie("≝","\\html@mathml{\\stackrel{\\tiny\\mathrm{def}}{=}}{\\mathrel{\\char`≝}}");ie("≞","\\html@mathml{\\stackrel{\\tiny\\mathrm{m}}{=}}{\\mathrel{\\char`≞}}");ie("≟","\\html@mathml{\\stackrel{\\tiny?}{=}}{\\mathrel{\\char`≟}}");ie("⟂","\\perp");ie("‼","\\mathclose{!\\mkern-0.8mu!}");ie("∌","\\notni");ie("⌜","\\ulcorner");ie("⌝","\\urcorner");ie("⌞","\\llcorner");ie("⌟","\\lrcorner");ie("©","\\copyright");ie("®","\\textregistered");ie("\\ulcorner",'\\html@mathml{\\@ulcorner}{\\mathop{\\char"231c}}');ie("\\urcorner",'\\html@mathml{\\@urcorner}{\\mathop{\\char"231d}}');ie("\\llcorner",'\\html@mathml{\\@llcorner}{\\mathop{\\char"231e}}');ie("\\lrcorner",'\\html@mathml{\\@lrcorner}{\\mathop{\\char"231f}}');ie("\\vdots","{\\varvdots\\rule{0pt}{15pt}}");ie("⋮","\\vdots");ie("\\varGamma","\\mathit{\\Gamma}");ie("\\varDelta","\\mathit{\\Delta}");ie("\\varTheta","\\mathit{\\Theta}");ie("\\varLambda","\\mathit{\\Lambda}");ie("\\varXi","\\mathit{\\Xi}");ie("\\varPi","\\mathit{\\Pi}");ie("\\varSigma","\\mathit{\\Sigma}");ie("\\varUpsilon","\\mathit{\\Upsilon}");ie("\\varPhi","\\mathit{\\Phi}");ie("\\varPsi","\\mathit{\\Psi}");ie("\\varOmega","\\mathit{\\Omega}");ie("\\substack","\\begin{subarray}{c}#1\\end{subarray}");ie("\\colon","\\nobreak\\mskip2mu\\mathpunct{}\\mathchoice{\\mkern-3mu}{\\mkern-3mu}{}{}{:}\\mskip6mu\\relax");ie("\\boxed","\\fbox{$\\displaystyle{#1}$}");ie("\\iff","\\DOTSB\\;\\Longleftrightarrow\\;");ie("\\implies","\\DOTSB\\;\\Longrightarrow\\;");ie("\\impliedby","\\DOTSB\\;\\Longleftarrow\\;");ie("\\dddot","{\\overset{\\raisebox{-0.1ex}{\\normalsize ...}}{#1}}");ie("\\ddddot","{\\overset{\\raisebox{-0.1ex}{\\normalsize ....}}{#1}}");var CA={",":"\\dotsc","\\not":"\\dotsb","+":"\\dotsb","=":"\\dotsb","<":"\\dotsb",">":"\\dotsb","-":"\\dotsb","*":"\\dotsb",":":"\\dotsb","\\DOTSB":"\\dotsb","\\coprod":"\\dotsb","\\bigvee":"\\dotsb","\\bigwedge":"\\dotsb","\\biguplus":"\\dotsb","\\bigcap":"\\dotsb","\\bigcup":"\\dotsb","\\prod":"\\dotsb","\\sum":"\\dotsb","\\bigotimes":"\\dotsb","\\bigoplus":"\\dotsb","\\bigodot":"\\dotsb","\\bigsqcup":"\\dotsb","\\And":"\\dotsb","\\longrightarrow":"\\dotsb","\\Longrightarrow":"\\dotsb","\\longleftarrow":"\\dotsb","\\Longleftarrow":"\\dotsb","\\longleftrightarrow":"\\dotsb","\\Longleftrightarrow":"\\dotsb","\\mapsto":"\\dotsb","\\longmapsto":"\\dotsb","\\hookrightarrow":"\\dotsb","\\doteq":"\\dotsb","\\mathbin":"\\dotsb","\\mathrel":"\\dotsb","\\relbar":"\\dotsb","\\Relbar":"\\dotsb","\\xrightarrow":"\\dotsb","\\xleftarrow":"\\dotsb","\\DOTSI":"\\dotsi","\\int":"\\dotsi","\\oint":"\\dotsi","\\iint":"\\dotsi","\\iiint":"\\dotsi","\\iiiint":"\\dotsi","\\idotsint":"\\dotsi","\\DOTSX":"\\dotsx"},oEn=new Set(["bin","rel"]);ie("\\dots",function(e){var n="\\dotso",t=e.expandAfterFuture().text;return t in CA?n=CA[t]:(t.slice(0,4)==="\\not"||t in Sr.math&&oEn.has(Sr.math[t].group))&&(n="\\dotsb"),n});var B6={")":!0,"]":!0,"\\rbrack":!0,"\\}":!0,"\\rbrace":!0,"\\rangle":!0,"\\rceil":!0,"\\rfloor":!0,"\\rgroup":!0,"\\rmoustache":!0,"\\right":!0,"\\bigr":!0,"\\biggr":!0,"\\Bigr":!0,"\\Biggr":!0,$:!0,";":!0,".":!0,",":!0};ie("\\dotso",function(e){var n=e.future().text;return n in B6?"\\ldots\\,":"\\ldots"});ie("\\dotsc",function(e){var n=e.future().text;return n in B6&&n!==","?"\\ldots\\,":"\\ldots"});ie("\\cdots",function(e){var n=e.future().text;return n in B6?"\\@cdots\\,":"\\@cdots"});ie("\\dotsb","\\cdots");ie("\\dotsm","\\cdots");ie("\\dotsi","\\!\\cdots");ie("\\dotsx","\\ldots\\,");ie("\\DOTSI","\\relax");ie("\\DOTSB","\\relax");ie("\\DOTSX","\\relax");ie("\\tmspace","\\TextOrMath{\\kern#1#3}{\\mskip#1#2}\\relax");ie("\\,","\\tmspace+{3mu}{.1667em}");ie("\\thinspace","\\,");ie("\\>","\\mskip{4mu}");ie("\\:","\\tmspace+{4mu}{.2222em}");ie("\\medspace","\\:");ie("\\;","\\tmspace+{5mu}{.2777em}");ie("\\thickspace","\\;");ie("\\!","\\tmspace-{3mu}{.1667em}");ie("\\negthinspace","\\!");ie("\\negmedspace","\\tmspace-{4mu}{.2222em}");ie("\\negthickspace","\\tmspace-{5mu}{.277em}");ie("\\enspace","\\kern.5em ");ie("\\enskip","\\hskip.5em\\relax");ie("\\quad","\\hskip1em\\relax");ie("\\qquad","\\hskip2em\\relax");ie("\\tag","\\@ifstar\\tag@literal\\tag@paren");ie("\\tag@paren","\\tag@literal{({#1})}");ie("\\tag@literal",e=>{if(e.macros.get("\\df@tag"))throw new Ze("Multiple \\tag");return"\\gdef\\df@tag{\\text{#1}}"});ie("\\bmod","\\mathchoice{\\mskip1mu}{\\mskip1mu}{\\mskip5mu}{\\mskip5mu}\\mathbin{\\rm mod}\\mathchoice{\\mskip1mu}{\\mskip1mu}{\\mskip5mu}{\\mskip5mu}");ie("\\pod","\\allowbreak\\mathchoice{\\mkern18mu}{\\mkern8mu}{\\mkern8mu}{\\mkern8mu}(#1)");ie("\\pmod","\\pod{{\\rm mod}\\mkern6mu#1}");ie("\\mod","\\allowbreak\\mathchoice{\\mkern18mu}{\\mkern12mu}{\\mkern12mu}{\\mkern12mu}{\\rm mod}\\,\\,#1");ie("\\newline","\\\\\\relax");ie("\\TeX","\\textrm{\\html@mathml{T\\kern-.1667em\\raisebox{-.5ex}{E}\\kern-.125emX}{TeX}}");var rF=tt(Bo["Main-Regular"][84][1]-.7*Bo["Main-Regular"][65][1]);ie("\\LaTeX","\\textrm{\\html@mathml{"+("L\\kern-.36em\\raisebox{"+rF+"}{\\scriptstyle A}")+"\\kern-.15em\\TeX}{LaTeX}}");ie("\\KaTeX","\\textrm{\\html@mathml{"+("K\\kern-.17em\\raisebox{"+rF+"}{\\scriptstyle A}")+"\\kern-.15em\\TeX}{KaTeX}}");ie("\\hspace","\\@ifstar\\@hspacer\\@hspace");ie("\\@hspace","\\hskip #1\\relax");ie("\\@hspacer","\\rule{0pt}{0pt}\\hskip #1\\relax");ie("\\ordinarycolon",":");ie("\\vcentcolon","\\mathrel{\\mathop\\ordinarycolon}");ie("\\dblcolon",'\\html@mathml{\\mathrel{\\vcentcolon\\mathrel{\\mkern-.9mu}\\vcentcolon}}{\\mathop{\\char"2237}}');ie("\\coloneqq",'\\html@mathml{\\mathrel{\\vcentcolon\\mathrel{\\mkern-1.2mu}=}}{\\mathop{\\char"2254}}');ie("\\Coloneqq",'\\html@mathml{\\mathrel{\\dblcolon\\mathrel{\\mkern-1.2mu}=}}{\\mathop{\\char"2237\\char"3d}}');ie("\\coloneq",'\\html@mathml{\\mathrel{\\vcentcolon\\mathrel{\\mkern-1.2mu}\\mathrel{-}}}{\\mathop{\\char"3a\\char"2212}}');ie("\\Coloneq",'\\html@mathml{\\mathrel{\\dblcolon\\mathrel{\\mkern-1.2mu}\\mathrel{-}}}{\\mathop{\\char"2237\\char"2212}}');ie("\\eqqcolon",'\\html@mathml{\\mathrel{=\\mathrel{\\mkern-1.2mu}\\vcentcolon}}{\\mathop{\\char"2255}}');ie("\\Eqqcolon",'\\html@mathml{\\mathrel{=\\mathrel{\\mkern-1.2mu}\\dblcolon}}{\\mathop{\\char"3d\\char"2237}}');ie("\\eqcolon",'\\html@mathml{\\mathrel{\\mathrel{-}\\mathrel{\\mkern-1.2mu}\\vcentcolon}}{\\mathop{\\char"2239}}');ie("\\Eqcolon",'\\html@mathml{\\mathrel{\\mathrel{-}\\mathrel{\\mkern-1.2mu}\\dblcolon}}{\\mathop{\\char"2212\\char"2237}}');ie("\\colonapprox",'\\html@mathml{\\mathrel{\\vcentcolon\\mathrel{\\mkern-1.2mu}\\approx}}{\\mathop{\\char"3a\\char"2248}}');ie("\\Colonapprox",'\\html@mathml{\\mathrel{\\dblcolon\\mathrel{\\mkern-1.2mu}\\approx}}{\\mathop{\\char"2237\\char"2248}}');ie("\\colonsim",'\\html@mathml{\\mathrel{\\vcentcolon\\mathrel{\\mkern-1.2mu}\\sim}}{\\mathop{\\char"3a\\char"223c}}');ie("\\Colonsim",'\\html@mathml{\\mathrel{\\dblcolon\\mathrel{\\mkern-1.2mu}\\sim}}{\\mathop{\\char"2237\\char"223c}}');ie("∷","\\dblcolon");ie("∹","\\eqcolon");ie("≔","\\coloneqq");ie("≕","\\eqqcolon");ie("⩴","\\Coloneqq");ie("\\ratio","\\vcentcolon");ie("\\coloncolon","\\dblcolon");ie("\\colonequals","\\coloneqq");ie("\\coloncolonequals","\\Coloneqq");ie("\\equalscolon","\\eqqcolon");ie("\\equalscoloncolon","\\Eqqcolon");ie("\\colonminus","\\coloneq");ie("\\coloncolonminus","\\Coloneq");ie("\\minuscolon","\\eqcolon");ie("\\minuscoloncolon","\\Eqcolon");ie("\\coloncolonapprox","\\Colonapprox");ie("\\coloncolonsim","\\Colonsim");ie("\\simcolon","\\mathrel{\\sim\\mathrel{\\mkern-1.2mu}\\vcentcolon}");ie("\\simcoloncolon","\\mathrel{\\sim\\mathrel{\\mkern-1.2mu}\\dblcolon}");ie("\\approxcolon","\\mathrel{\\approx\\mathrel{\\mkern-1.2mu}\\vcentcolon}");ie("\\approxcoloncolon","\\mathrel{\\approx\\mathrel{\\mkern-1.2mu}\\dblcolon}");ie("\\notni","\\html@mathml{\\not\\ni}{\\mathrel{\\char`∌}}");ie("\\limsup","\\DOTSB\\operatorname*{lim\\,sup}");ie("\\liminf","\\DOTSB\\operatorname*{lim\\,inf}");ie("\\injlim","\\DOTSB\\operatorname*{inj\\,lim}");ie("\\projlim","\\DOTSB\\operatorname*{proj\\,lim}");ie("\\varlimsup","\\DOTSB\\operatorname*{\\overline{lim}}");ie("\\varliminf","\\DOTSB\\operatorname*{\\underline{lim}}");ie("\\varinjlim","\\DOTSB\\operatorname*{\\underrightarrow{lim}}");ie("\\varprojlim","\\DOTSB\\operatorname*{\\underleftarrow{lim}}");ie("\\gvertneqq","\\html@mathml{\\@gvertneqq}{≩}");ie("\\lvertneqq","\\html@mathml{\\@lvertneqq}{≨}");ie("\\ngeqq","\\html@mathml{\\@ngeqq}{≱}");ie("\\ngeqslant","\\html@mathml{\\@ngeqslant}{≱}");ie("\\nleqq","\\html@mathml{\\@nleqq}{≰}");ie("\\nleqslant","\\html@mathml{\\@nleqslant}{≰}");ie("\\nshortmid","\\html@mathml{\\@nshortmid}{∤}");ie("\\nshortparallel","\\html@mathml{\\@nshortparallel}{∦}");ie("\\nsubseteqq","\\html@mathml{\\@nsubseteqq}{⊈}");ie("\\nsupseteqq","\\html@mathml{\\@nsupseteqq}{⊉}");ie("\\varsubsetneq","\\html@mathml{\\@varsubsetneq}{⊊}");ie("\\varsubsetneqq","\\html@mathml{\\@varsubsetneqq}{⫋}");ie("\\varsupsetneq","\\html@mathml{\\@varsupsetneq}{⊋}");ie("\\varsupsetneqq","\\html@mathml{\\@varsupsetneqq}{⫌}");ie("\\imath","\\html@mathml{\\@imath}{ı}");ie("\\jmath","\\html@mathml{\\@jmath}{ȷ}");ie("\\llbracket","\\html@mathml{\\mathopen{[\\mkern-3.2mu[}}{\\mathopen{\\char`⟦}}");ie("\\rrbracket","\\html@mathml{\\mathclose{]\\mkern-3.2mu]}}{\\mathclose{\\char`⟧}}");ie("⟦","\\llbracket");ie("⟧","\\rrbracket");ie("\\lBrace","\\html@mathml{\\mathopen{\\{\\mkern-3.2mu[}}{\\mathopen{\\char`⦃}}");ie("\\rBrace","\\html@mathml{\\mathclose{]\\mkern-3.2mu\\}}}{\\mathclose{\\char`⦄}}");ie("⦃","\\lBrace");ie("⦄","\\rBrace");ie("\\minuso","\\mathbin{\\html@mathml{{\\mathrlap{\\mathchoice{\\kern{0.145em}}{\\kern{0.145em}}{\\kern{0.1015em}}{\\kern{0.0725em}}\\circ}{-}}}{\\char`⦵}}");ie("⦵","\\minuso");ie("\\darr","\\downarrow");ie("\\dArr","\\Downarrow");ie("\\Darr","\\Downarrow");ie("\\lang","\\langle");ie("\\rang","\\rangle");ie("\\uarr","\\uparrow");ie("\\uArr","\\Uparrow");ie("\\Uarr","\\Uparrow");ie("\\N","\\mathbb{N}");ie("\\R","\\mathbb{R}");ie("\\Z","\\mathbb{Z}");ie("\\alef","\\aleph");ie("\\alefsym","\\aleph");ie("\\Alpha","\\mathrm{A}");ie("\\Beta","\\mathrm{B}");ie("\\bull","\\bullet");ie("\\Chi","\\mathrm{X}");ie("\\clubs","\\clubsuit");ie("\\cnums","\\mathbb{C}");ie("\\Complex","\\mathbb{C}");ie("\\Dagger","\\ddagger");ie("\\diamonds","\\diamondsuit");ie("\\empty","\\emptyset");ie("\\Epsilon","\\mathrm{E}");ie("\\Eta","\\mathrm{H}");ie("\\exist","\\exists");ie("\\harr","\\leftrightarrow");ie("\\hArr","\\Leftrightarrow");ie("\\Harr","\\Leftrightarrow");ie("\\hearts","\\heartsuit");ie("\\image","\\Im");ie("\\infin","\\infty");ie("\\Iota","\\mathrm{I}");ie("\\isin","\\in");ie("\\Kappa","\\mathrm{K}");ie("\\larr","\\leftarrow");ie("\\lArr","\\Leftarrow");ie("\\Larr","\\Leftarrow");ie("\\lrarr","\\leftrightarrow");ie("\\lrArr","\\Leftrightarrow");ie("\\Lrarr","\\Leftrightarrow");ie("\\Mu","\\mathrm{M}");ie("\\natnums","\\mathbb{N}");ie("\\Nu","\\mathrm{N}");ie("\\Omicron","\\mathrm{O}");ie("\\plusmn","\\pm");ie("\\rarr","\\rightarrow");ie("\\rArr","\\Rightarrow");ie("\\Rarr","\\Rightarrow");ie("\\real","\\Re");ie("\\reals","\\mathbb{R}");ie("\\Reals","\\mathbb{R}");ie("\\Rho","\\mathrm{P}");ie("\\sdot","\\cdot");ie("\\sect","\\S");ie("\\spades","\\spadesuit");ie("\\sub","\\subset");ie("\\sube","\\subseteq");ie("\\supe","\\supseteq");ie("\\Tau","\\mathrm{T}");ie("\\thetasym","\\vartheta");ie("\\weierp","\\wp");ie("\\Zeta","\\mathrm{Z}");ie("\\argmin","\\DOTSB\\operatorname*{arg\\,min}");ie("\\argmax","\\DOTSB\\operatorname*{arg\\,max}");ie("\\plim","\\DOTSB\\mathop{\\operatorname{plim}}\\limits");ie("\\bra","\\mathinner{\\langle{#1}|}");ie("\\ket","\\mathinner{|{#1}\\rangle}");ie("\\braket","\\mathinner{\\langle{#1}\\rangle}");ie("\\Bra","\\left\\langle#1\\right|");ie("\\Ket","\\left|#1\\right\\rangle");var sF=e=>n=>{var t=n.consumeArg().tokens,r=n.consumeArg().tokens,s=n.consumeArg().tokens,i=n.consumeArg().tokens,a=n.macros.get("|"),o=n.macros.get("\\|");n.macros.beginGroup();var l=_=>p=>{e&&(p.macros.set("|",a),s.length&&p.macros.set("\\|",o));var m=_;if(!_&&s.length){var x=p.future();x.text==="|"&&(p.popToken(),m=!0)}return{tokens:m?s:r,numArgs:0}};n.macros.set("|",l(!1)),s.length&&n.macros.set("\\|",l(!0));var u=n.consumeArg().tokens,h=n.expandTokens([...i,...u,...t]);return n.macros.endGroup(),{tokens:h.reverse(),numArgs:0}};ie("\\bra@ket",sF(!1));ie("\\bra@set",sF(!0));ie("\\Braket","\\bra@ket{\\left\\langle}{\\,\\middle\\vert\\,}{\\,\\middle\\vert\\,}{\\right\\rangle}");ie("\\Set","\\bra@set{\\left\\{\\:}{\\;\\middle\\vert\\;}{\\;\\middle\\Vert\\;}{\\:\\right\\}}");ie("\\set","\\bra@set{\\{\\,}{\\mid}{}{\\,\\}}");ie("\\angln","{\\angl n}");ie("\\blue","\\textcolor{##6495ed}{#1}");ie("\\orange","\\textcolor{##ffa500}{#1}");ie("\\pink","\\textcolor{##ff00af}{#1}");ie("\\red","\\textcolor{##df0030}{#1}");ie("\\green","\\textcolor{##28ae7b}{#1}");ie("\\gray","\\textcolor{gray}{#1}");ie("\\purple","\\textcolor{##9d38bd}{#1}");ie("\\blueA","\\textcolor{##ccfaff}{#1}");ie("\\blueB","\\textcolor{##80f6ff}{#1}");ie("\\blueC","\\textcolor{##63d9ea}{#1}");ie("\\blueD","\\textcolor{##11accd}{#1}");ie("\\blueE","\\textcolor{##0c7f99}{#1}");ie("\\tealA","\\textcolor{##94fff5}{#1}");ie("\\tealB","\\textcolor{##26edd5}{#1}");ie("\\tealC","\\textcolor{##01d1c1}{#1}");ie("\\tealD","\\textcolor{##01a995}{#1}");ie("\\tealE","\\textcolor{##208170}{#1}");ie("\\greenA","\\textcolor{##b6ffb0}{#1}");ie("\\greenB","\\textcolor{##8af281}{#1}");ie("\\greenC","\\textcolor{##74cf70}{#1}");ie("\\greenD","\\textcolor{##1fab54}{#1}");ie("\\greenE","\\textcolor{##0d923f}{#1}");ie("\\goldA","\\textcolor{##ffd0a9}{#1}");ie("\\goldB","\\textcolor{##ffbb71}{#1}");ie("\\goldC","\\textcolor{##ff9c39}{#1}");ie("\\goldD","\\textcolor{##e07d10}{#1}");ie("\\goldE","\\textcolor{##a75a05}{#1}");ie("\\redA","\\textcolor{##fca9a9}{#1}");ie("\\redB","\\textcolor{##ff8482}{#1}");ie("\\redC","\\textcolor{##f9685d}{#1}");ie("\\redD","\\textcolor{##e84d39}{#1}");ie("\\redE","\\textcolor{##bc2612}{#1}");ie("\\maroonA","\\textcolor{##ffbde0}{#1}");ie("\\maroonB","\\textcolor{##ff92c6}{#1}");ie("\\maroonC","\\textcolor{##ed5fa6}{#1}");ie("\\maroonD","\\textcolor{##ca337c}{#1}");ie("\\maroonE","\\textcolor{##9e034e}{#1}");ie("\\purpleA","\\textcolor{##ddd7ff}{#1}");ie("\\purpleB","\\textcolor{##c6b9fc}{#1}");ie("\\purpleC","\\textcolor{##aa87ff}{#1}");ie("\\purpleD","\\textcolor{##7854ab}{#1}");ie("\\purpleE","\\textcolor{##543b78}{#1}");ie("\\mintA","\\textcolor{##f5f9e8}{#1}");ie("\\mintB","\\textcolor{##edf2df}{#1}");ie("\\mintC","\\textcolor{##e0e5cc}{#1}");ie("\\grayA","\\textcolor{##f6f7f7}{#1}");ie("\\grayB","\\textcolor{##f0f1f2}{#1}");ie("\\grayC","\\textcolor{##e3e5e6}{#1}");ie("\\grayD","\\textcolor{##d6d8da}{#1}");ie("\\grayE","\\textcolor{##babec2}{#1}");ie("\\grayF","\\textcolor{##888d93}{#1}");ie("\\grayG","\\textcolor{##626569}{#1}");ie("\\grayH","\\textcolor{##3b3e40}{#1}");ie("\\grayI","\\textcolor{##21242c}{#1}");ie("\\kaBlue","\\textcolor{##314453}{#1}");ie("\\kaGreen","\\textcolor{##71B307}{#1}");var iF={"^":!0,_:!0,"\\limits":!0,"\\nolimits":!0};class lEn{constructor(n,t,r){this.settings=void 0,this.expansionCount=void 0,this.lexer=void 0,this.macros=void 0,this.stack=void 0,this.mode=void 0,this.settings=t,this.expansionCount=0,this.feed(n),this.macros=new iEn(aEn,t.macros),this.mode=r,this.stack=[]}feed(n){this.lexer=new kA(n,this.settings)}switchMode(n){this.mode=n}beginGroup(){this.macros.beginGroup()}endGroup(){this.macros.endGroup()}endGroups(){this.macros.endGroups()}future(){return this.stack.length===0&&this.pushToken(this.lexer.lex()),this.stack[this.stack.length-1]}popToken(){return this.future(),this.stack.pop()}pushToken(n){this.stack.push(n)}pushTokens(n){this.stack.push(...n)}scanArgument(n){var t,r,s;if(n){if(this.consumeSpaces(),this.future().text!=="[")return null;t=this.popToken(),{tokens:s,end:r}=this.consumeArg(["]"])}else({tokens:s,start:t,end:r}=this.consumeArg());return this.pushToken(new ra("EOF",r.loc)),this.pushTokens(s),new ra("",Ni.range(t,r))}consumeSpaces(){for(;;){var n=this.future();if(n.text===" ")this.stack.pop();else break}}consumeArg(n){var t=[],r=n&&n.length>0;r||this.consumeSpaces();var s=this.future(),i,a=0,o=0;do{if(i=this.popToken(),t.push(i),i.text==="{")++a;else if(i.text==="}"){if(--a,a===-1)throw new Ze("Extra }",i)}else if(i.text==="EOF")throw new Ze("Unexpected end of input in a macro argument, expected '"+(n&&r?n[o]:"}")+"'",i);if(n&&r)if((a===0||a===1&&n[o]==="{")&&i.text===n[o]){if(++o,o===n.length){t.splice(-o,o);break}}else o=0}while(a!==0||r);return s.text==="{"&&t[t.length-1].text==="}"&&(t.pop(),t.shift()),t.reverse(),{tokens:t,start:s,end:i}}consumeArgs(n,t){if(t){if(t.length!==n+1)throw new Ze("The length of delimiters doesn't match the number of args!");for(var r=t[0],s=0;sthis.settings.maxExpand)throw new Ze("Too many expansions: infinite loop or need to increase maxExpand setting")}expandOnce(n){var t=this.popToken(),r=t.text,s=t.noexpand?null:this._getExpansion(r);if(s==null||n&&s.unexpandable){if(n&&s==null&&r[0]==="\\"&&!this.isDefined(r))throw new Ze("Undefined control sequence: "+r);return this.pushToken(t),!1}this.countExpansion(1);var i=s.tokens,a=this.consumeArgs(s.numArgs,s.delimiters);if(s.numArgs){i=i.slice();for(var o=i.length-1;o>=0;--o){var l=i[o];if(l.text==="#"){if(o===0)throw new Ze("Incomplete placeholder at end of macro body",l);if(l=i[--o],l.text==="#")i.splice(o+1,1);else if(/^[1-9]$/.test(l.text))i.splice(o,2,...a[+l.text-1]);else throw new Ze("Not a valid argument number",l)}}}return this.pushTokens(i),i.length}expandAfterFuture(){return this.expandOnce(),this.future()}expandNextToken(){for(;;)if(this.expandOnce()===!1){var n=this.stack.pop();return n.treatAsRelax&&(n.text="\\relax"),n}}expandMacro(n){return this.macros.has(n)?this.expandTokens([new ra(n)]):void 0}expandTokens(n){var t=[],r=this.stack.length;for(this.pushTokens(n);this.stack.length>r;)if(this.expandOnce(!0)===!1){var s=this.stack.pop();s.treatAsRelax&&(s.noexpand=!1,s.treatAsRelax=!1),t.push(s)}return this.countExpansion(t.length),t}expandMacroAsText(n){var t=this.expandMacro(n);return t&&t.map(r=>r.text).join("")}_getExpansion(n){var t=this.macros.get(n);if(t==null)return t;if(n.length===1){var r=this.lexer.catcodes[n];if(r!=null&&r!==13)return}var s=typeof t=="function"?t(this):t;if(typeof s=="string"){var i=0;if(s.includes("#"))for(var a=s.replace(/##/g,"");a.includes("#"+(i+1));)++i;for(var o=new kA(s,this.settings),l=[],u=o.lex();u.text!=="EOF";)l.push(u),u=o.lex();l.reverse();var h={tokens:l,numArgs:i};return h}return s}isDefined(n){return this.macros.has(n)||du.hasOwnProperty(n)||Sr.math.hasOwnProperty(n)||Sr.text.hasOwnProperty(n)||iF.hasOwnProperty(n)}isExpandable(n){var t=this.macros.get(n);return t!=null?typeof t=="string"||typeof t=="function"||!t.unexpandable:du.hasOwnProperty(n)&&!du[n].primitive}}var EA=/^[₊₋₌₍₎₀₁₂₃₄₅₆₇₈₉ₐₑₕᵢⱼₖₗₘₙₒₚᵣₛₜᵤᵥₓᵦᵧᵨᵩᵪ]/,m1=Object.freeze({"₊":"+","₋":"-","₌":"=","₍":"(","₎":")","₀":"0","₁":"1","₂":"2","₃":"3","₄":"4","₅":"5","₆":"6","₇":"7","₈":"8","₉":"9","ₐ":"a","ₑ":"e","ₕ":"h","ᵢ":"i","ⱼ":"j","ₖ":"k","ₗ":"l","ₘ":"m","ₙ":"n","ₒ":"o","ₚ":"p","ᵣ":"r","ₛ":"s","ₜ":"t","ᵤ":"u","ᵥ":"v","ₓ":"x","ᵦ":"β","ᵧ":"γ","ᵨ":"ρ","ᵩ":"ϕ","ᵪ":"χ","⁺":"+","⁻":"-","⁼":"=","⁽":"(","⁾":")","⁰":"0","¹":"1","²":"2","³":"3","⁴":"4","⁵":"5","⁶":"6","⁷":"7","⁸":"8","⁹":"9","ᴬ":"A","ᴮ":"B","ᴰ":"D","ᴱ":"E","ᴳ":"G","ᴴ":"H","ᴵ":"I","ᴶ":"J","ᴷ":"K","ᴸ":"L","ᴹ":"M","ᴺ":"N","ᴼ":"O","ᴾ":"P","ᴿ":"R","ᵀ":"T","ᵁ":"U","ⱽ":"V","ᵂ":"W","ᵃ":"a","ᵇ":"b","ᶜ":"c","ᵈ":"d","ᵉ":"e","ᶠ":"f","ᵍ":"g",ʰ:"h","ⁱ":"i",ʲ:"j","ᵏ":"k",ˡ:"l","ᵐ":"m",ⁿ:"n","ᵒ":"o","ᵖ":"p",ʳ:"r",ˢ:"s","ᵗ":"t","ᵘ":"u","ᵛ":"v",ʷ:"w",ˣ:"x",ʸ:"y","ᶻ":"z","ᵝ":"β","ᵞ":"γ","ᵟ":"δ","ᵠ":"ϕ","ᵡ":"χ","ᶿ":"θ"}),Uw={"́":{text:"\\'",math:"\\acute"},"̀":{text:"\\`",math:"\\grave"},"̈":{text:'\\"',math:"\\ddot"},"̃":{text:"\\~",math:"\\tilde"},"̄":{text:"\\=",math:"\\bar"},"̆":{text:"\\u",math:"\\breve"},"̌":{text:"\\v",math:"\\check"},"̂":{text:"\\^",math:"\\hat"},"̇":{text:"\\.",math:"\\dot"},"̊":{text:"\\r",math:"\\mathring"},"̋":{text:"\\H"},"̧":{text:"\\c"}},NA={á:"á",à:"à",ä:"ä",ǟ:"ǟ",ã:"ã",ā:"ā",ă:"ă",ắ:"ắ",ằ:"ằ",ẵ:"ẵ",ǎ:"ǎ",â:"â",ấ:"ấ",ầ:"ầ",ẫ:"ẫ",ȧ:"ȧ",ǡ:"ǡ",å:"å",ǻ:"ǻ",ḃ:"ḃ",ć:"ć",ḉ:"ḉ",č:"č",ĉ:"ĉ",ċ:"ċ",ç:"ç",ď:"ď",ḋ:"ḋ",ḑ:"ḑ",é:"é",è:"è",ë:"ë",ẽ:"ẽ",ē:"ē",ḗ:"ḗ",ḕ:"ḕ",ĕ:"ĕ",ḝ:"ḝ",ě:"ě",ê:"ê",ế:"ế",ề:"ề",ễ:"ễ",ė:"ė",ȩ:"ȩ",ḟ:"ḟ",ǵ:"ǵ",ḡ:"ḡ",ğ:"ğ",ǧ:"ǧ",ĝ:"ĝ",ġ:"ġ",ģ:"ģ",ḧ:"ḧ",ȟ:"ȟ",ĥ:"ĥ",ḣ:"ḣ",ḩ:"ḩ",í:"í",ì:"ì",ï:"ï",ḯ:"ḯ",ĩ:"ĩ",ī:"ī",ĭ:"ĭ",ǐ:"ǐ",î:"î",ǰ:"ǰ",ĵ:"ĵ",ḱ:"ḱ",ǩ:"ǩ",ķ:"ķ",ĺ:"ĺ",ľ:"ľ",ļ:"ļ",ḿ:"ḿ",ṁ:"ṁ",ń:"ń",ǹ:"ǹ",ñ:"ñ",ň:"ň",ṅ:"ṅ",ņ:"ņ",ó:"ó",ò:"ò",ö:"ö",ȫ:"ȫ",õ:"õ",ṍ:"ṍ",ṏ:"ṏ",ȭ:"ȭ",ō:"ō",ṓ:"ṓ",ṑ:"ṑ",ŏ:"ŏ",ǒ:"ǒ",ô:"ô",ố:"ố",ồ:"ồ",ỗ:"ỗ",ȯ:"ȯ",ȱ:"ȱ",ő:"ő",ṕ:"ṕ",ṗ:"ṗ",ŕ:"ŕ",ř:"ř",ṙ:"ṙ",ŗ:"ŗ",ś:"ś",ṥ:"ṥ",š:"š",ṧ:"ṧ",ŝ:"ŝ",ṡ:"ṡ",ş:"ş",ẗ:"ẗ",ť:"ť",ṫ:"ṫ",ţ:"ţ",ú:"ú",ù:"ù",ü:"ü",ǘ:"ǘ",ǜ:"ǜ",ǖ:"ǖ",ǚ:"ǚ",ũ:"ũ",ṹ:"ṹ",ū:"ū",ṻ:"ṻ",ŭ:"ŭ",ǔ:"ǔ",û:"û",ů:"ů",ű:"ű",ṽ:"ṽ",ẃ:"ẃ",ẁ:"ẁ",ẅ:"ẅ",ŵ:"ŵ",ẇ:"ẇ",ẘ:"ẘ",ẍ:"ẍ",ẋ:"ẋ",ý:"ý",ỳ:"ỳ",ÿ:"ÿ",ỹ:"ỹ",ȳ:"ȳ",ŷ:"ŷ",ẏ:"ẏ",ẙ:"ẙ",ź:"ź",ž:"ž",ẑ:"ẑ",ż:"ż",Á:"Á",À:"À",Ä:"Ä",Ǟ:"Ǟ",Ã:"Ã",Ā:"Ā",Ă:"Ă",Ắ:"Ắ",Ằ:"Ằ",Ẵ:"Ẵ",Ǎ:"Ǎ",Â:"Â",Ấ:"Ấ",Ầ:"Ầ",Ẫ:"Ẫ",Ȧ:"Ȧ",Ǡ:"Ǡ",Å:"Å",Ǻ:"Ǻ",Ḃ:"Ḃ",Ć:"Ć",Ḉ:"Ḉ",Č:"Č",Ĉ:"Ĉ",Ċ:"Ċ",Ç:"Ç",Ď:"Ď",Ḋ:"Ḋ",Ḑ:"Ḑ",É:"É",È:"È",Ë:"Ë",Ẽ:"Ẽ",Ē:"Ē",Ḗ:"Ḗ",Ḕ:"Ḕ",Ĕ:"Ĕ",Ḝ:"Ḝ",Ě:"Ě",Ê:"Ê",Ế:"Ế",Ề:"Ề",Ễ:"Ễ",Ė:"Ė",Ȩ:"Ȩ",Ḟ:"Ḟ",Ǵ:"Ǵ",Ḡ:"Ḡ",Ğ:"Ğ",Ǧ:"Ǧ",Ĝ:"Ĝ",Ġ:"Ġ",Ģ:"Ģ",Ḧ:"Ḧ",Ȟ:"Ȟ",Ĥ:"Ĥ",Ḣ:"Ḣ",Ḩ:"Ḩ",Í:"Í",Ì:"Ì",Ï:"Ï",Ḯ:"Ḯ",Ĩ:"Ĩ",Ī:"Ī",Ĭ:"Ĭ",Ǐ:"Ǐ",Î:"Î",İ:"İ",Ĵ:"Ĵ",Ḱ:"Ḱ",Ǩ:"Ǩ",Ķ:"Ķ",Ĺ:"Ĺ",Ľ:"Ľ",Ļ:"Ļ",Ḿ:"Ḿ",Ṁ:"Ṁ",Ń:"Ń",Ǹ:"Ǹ",Ñ:"Ñ",Ň:"Ň",Ṅ:"Ṅ",Ņ:"Ņ",Ó:"Ó",Ò:"Ò",Ö:"Ö",Ȫ:"Ȫ",Õ:"Õ",Ṍ:"Ṍ",Ṏ:"Ṏ",Ȭ:"Ȭ",Ō:"Ō",Ṓ:"Ṓ",Ṑ:"Ṑ",Ŏ:"Ŏ",Ǒ:"Ǒ",Ô:"Ô",Ố:"Ố",Ồ:"Ồ",Ỗ:"Ỗ",Ȯ:"Ȯ",Ȱ:"Ȱ",Ő:"Ő",Ṕ:"Ṕ",Ṗ:"Ṗ",Ŕ:"Ŕ",Ř:"Ř",Ṙ:"Ṙ",Ŗ:"Ŗ",Ś:"Ś",Ṥ:"Ṥ",Š:"Š",Ṧ:"Ṧ",Ŝ:"Ŝ",Ṡ:"Ṡ",Ş:"Ş",Ť:"Ť",Ṫ:"Ṫ",Ţ:"Ţ",Ú:"Ú",Ù:"Ù",Ü:"Ü",Ǘ:"Ǘ",Ǜ:"Ǜ",Ǖ:"Ǖ",Ǚ:"Ǚ",Ũ:"Ũ",Ṹ:"Ṹ",Ū:"Ū",Ṻ:"Ṻ",Ŭ:"Ŭ",Ǔ:"Ǔ",Û:"Û",Ů:"Ů",Ű:"Ű",Ṽ:"Ṽ",Ẃ:"Ẃ",Ẁ:"Ẁ",Ẅ:"Ẅ",Ŵ:"Ŵ",Ẇ:"Ẇ",Ẍ:"Ẍ",Ẋ:"Ẋ",Ý:"Ý",Ỳ:"Ỳ",Ÿ:"Ÿ",Ỹ:"Ỹ",Ȳ:"Ȳ",Ŷ:"Ŷ",Ẏ:"Ẏ",Ź:"Ź",Ž:"Ž",Ẑ:"Ẑ",Ż:"Ż",ά:"ά",ὰ:"ὰ",ᾱ:"ᾱ",ᾰ:"ᾰ",έ:"έ",ὲ:"ὲ",ή:"ή",ὴ:"ὴ",ί:"ί",ὶ:"ὶ",ϊ:"ϊ",ΐ:"ΐ",ῒ:"ῒ",ῑ:"ῑ",ῐ:"ῐ",ό:"ό",ὸ:"ὸ",ύ:"ύ",ὺ:"ὺ",ϋ:"ϋ",ΰ:"ΰ",ῢ:"ῢ",ῡ:"ῡ",ῠ:"ῠ",ώ:"ώ",ὼ:"ὼ",Ύ:"Ύ",Ὺ:"Ὺ",Ϋ:"Ϋ",Ῡ:"Ῡ",Ῠ:"Ῠ",Ώ:"Ώ",Ὼ:"Ὼ"};class gy{constructor(n,t){this.mode=void 0,this.gullet=void 0,this.settings=void 0,this.leftrightDepth=void 0,this.nextToken=void 0,this.mode="math",this.gullet=new lEn(n,t,this.mode),this.settings=t,this.leftrightDepth=0,this.nextToken=null}expect(n,t){if(t===void 0&&(t=!0),this.fetch().text!==n)throw new Ze("Expected '"+n+"', got '"+this.fetch().text+"'",this.fetch());t&&this.consume()}consume(){this.nextToken=null}fetch(){return this.nextToken==null&&(this.nextToken=this.gullet.expandNextToken()),this.nextToken}switchMode(n){this.mode=n,this.gullet.switchMode(n)}parse(){this.settings.globalGroup||this.gullet.beginGroup(),this.settings.colorIsTextColor&&this.gullet.macros.set("\\color","\\textcolor");try{var n=this.parseExpression(!1);return this.expect("EOF"),this.settings.globalGroup||this.gullet.endGroup(),n}finally{this.gullet.endGroups()}}subparse(n){var t=this.nextToken;this.consume(),this.gullet.pushToken(new ra("}")),this.gullet.pushTokens(n);var r=this.parseExpression(!1);return this.expect("}"),this.nextToken=t,r}parseExpression(n,t){for(var r=[];;){this.mode==="math"&&this.consumeSpaces();var s=this.fetch();if(gy.endOfExpression.has(s.text)||t&&s.text===t||n&&du[s.text]&&du[s.text].infix)break;var i=this.parseAtom(t);if(i){if(i.type==="internal")continue}else break;r.push(i)}return this.mode==="text"&&this.formLigatures(r),this.handleInfixNodes(r)}handleInfixNodes(n){for(var t=-1,r,s=0;s=128)this.settings.strict&&(fP(t.charCodeAt(0))?this.mode==="math"&&this.settings.reportNonstrict("unicodeTextInMathMode",'Unicode text character "'+t[0]+'" used in math mode',n):this.settings.reportNonstrict("unknownSymbol",'Unrecognized Unicode character "'+t[0]+'"'+(" ("+t.charCodeAt(0)+")"),n)),a={type:"textord",mode:"text",loc:Ni.range(n),text:t};else return null;if(this.consume(),i)for(var h=0;h0?{type:"text",value:N}:void 0),N===!1?p.lastIndex=C+1:(x!==C&&w.push({type:"text",value:u.value.slice(x,C)}),Array.isArray(N)?w.push(...N):N&&w.push(N),x=C+y[0].length,b=!0),!p.global)break;y=p.exec(u.value)}return b?(x?\]}]+$/.exec(e);if(!n)return[e,void 0];e=e.slice(0,n.index);let t=n[0],r=t.indexOf(")");const s=jA(e,"(");let i=jA(e,")");for(;r!==-1&&s>i;)e+=t.slice(0,r+1),t=t.slice(r+1),r=t.indexOf(")"),i++;return[e,t]}function cF(e,n){const t=e.input.charCodeAt(e.index-1);return(e.index===0||V_(t)||Jb(t))&&(!n||t!==47)}uF.peek=FEn;function MEn(){this.buffer()}function OEn(e){this.enter({type:"footnoteReference",identifier:"",label:""},e)}function DEn(){this.buffer()}function LEn(e){this.enter({type:"footnoteDefinition",identifier:"",label:"",children:[]},e)}function IEn(e){const n=this.resume(),t=this.stack[this.stack.length-1];t.type,t.identifier=oo(this.sliceSerialize(e)).toLowerCase(),t.label=n}function $En(e){this.exit(e)}function BEn(e){const n=this.resume(),t=this.stack[this.stack.length-1];t.type,t.identifier=oo(this.sliceSerialize(e)).toLowerCase(),t.label=n}function PEn(e){this.exit(e)}function FEn(){return"["}function uF(e,n,t,r){const s=t.createTracker(r);let i=s.move("[^");const a=t.enter("footnoteReference"),o=t.enter("reference");return i+=s.move(t.safe(t.associationId(e),{after:"]",before:i})),o(),a(),i+=s.move("]"),i}function HEn(){return{enter:{gfmFootnoteCallString:MEn,gfmFootnoteCall:OEn,gfmFootnoteDefinitionLabelString:DEn,gfmFootnoteDefinition:LEn},exit:{gfmFootnoteCallString:IEn,gfmFootnoteCall:$En,gfmFootnoteDefinitionLabelString:BEn,gfmFootnoteDefinition:PEn}}}function qEn(e){let n=!1;return e&&e.firstLineBlank&&(n=!0),{handlers:{footnoteDefinition:t,footnoteReference:uF},unsafe:[{character:"[",inConstruct:["label","phrasing","reference"]}]};function t(r,s,i,a){const o=i.createTracker(a);let l=o.move("[^");const u=i.enter("footnoteDefinition"),h=i.enter("label");return l+=o.move(i.safe(i.associationId(r),{before:l,after:"]"})),h(),l+=o.move("]:"),r.children&&r.children.length>0&&(o.shift(4),l+=o.move((n?` +`:" ")+i.indentLines(i.containerFlow(r,o.current()),n?_F:UEn))),u(),l}}function UEn(e,n,t){return n===0?e:_F(e,n,t)}function _F(e,n,t){return(t?"":" ")+e}const GEn=["autolink","destinationLiteral","destinationRaw","reference","titleQuote","titleApostrophe"];fF.peek=XEn;function VEn(){return{canContainEols:["delete"],enter:{strikethrough:WEn},exit:{strikethrough:QEn}}}function KEn(){return{unsafe:[{character:"~",inConstruct:"phrasing",notInConstruct:GEn}],handlers:{delete:fF}}}function WEn(e){this.enter({type:"delete",children:[]},e)}function QEn(e){this.exit(e)}function fF(e,n,t,r){const s=t.createTracker(r),i=t.enter("strikethrough");let a=s.move("~~");return a+=t.containerPhrasing(e,{...s.current(),before:a,after:"~"}),a+=s.move("~~"),i(),a}function XEn(){return"~"}function YEn(e){return e.length}function ZEn(e,n){const t=n||{},r=(t.align||[]).concat(),s=t.stringLength||YEn,i=[],a=[],o=[],l=[];let u=0,h=-1;for(;++hu&&(u=e[h].length);++bl[b])&&(l[b]=y)}k.push(w)}a[h]=k,o[h]=v}let _=-1;if(typeof r=="object"&&"length"in r)for(;++_l[_]&&(l[_]=w),m[_]=w),p[_]=y}a.splice(1,0,p),o.splice(1,0,m),h=-1;const x=[];for(;++h "),i.shift(2);const a=t.indentLines(t.containerFlow(e,i.current()),tNn);return s(),a}function tNn(e,n,t){return">"+(t?"":" ")+e}function nNn(e,n){return AA(e,n.inConstruct,!0)&&!AA(e,n.notInConstruct,!1)}function AA(e,n,t){if(typeof n=="string"&&(n=[n]),!n||n.length===0)return t;let r=-1;for(;++ra&&(a=i):i=1,s=r+n.length,r=t.indexOf(n,s);return a}function rNn(e,n){return!!(n.options.fences===!1&&e.value&&!e.lang&&/[^ \r\n]/.test(e.value)&&!/^[\t ]*(?:[\r\n]|$)|(?:^|[\r\n])[\t ]*$/.test(e.value))}function sNn(e){const n=e.options.fence||"`";if(n!=="`"&&n!=="~")throw new Error("Cannot serialize code with `"+n+"` for `options.fence`, expected `` ` `` or `~`");return n}function iNn(e,n,t,r){const s=sNn(t),i=e.value||"",a=s==="`"?"GraveAccent":"Tilde";if(rNn(e,t)){const _=t.enter("codeIndented"),p=t.indentLines(i,aNn);return _(),p}const o=t.createTracker(r),l=s.repeat(Math.max(dF(i,s)+1,3)),u=t.enter("codeFenced");let h=o.move(l);if(e.lang){const _=t.enter(`codeFencedLang${a}`);h+=o.move(t.safe(e.lang,{before:h,after:" ",encode:["`"],...o.current()})),_()}if(e.lang&&e.meta){const _=t.enter(`codeFencedMeta${a}`);h+=o.move(" "),h+=o.move(t.safe(e.meta,{before:h,after:` `,encode:["`"],...o.current()})),_()}return h+=o.move(` `),i&&(h+=o.move(i+` -`)),h+=o.move(l),u(),h}function wEn(e,n,t){return(t?"":" ")+e}function H6(e){const n=e.options.quote||'"';if(n!=='"'&&n!=="'")throw new Error("Cannot serialize title with `"+n+"` for `options.quote`, expected `\"`, or `'`");return n}function kEn(e,n,t,r){const s=H6(t),i=s==='"'?"Quote":"Apostrophe",a=t.enter("definition");let o=t.enter("label");const l=t.createTracker(r);let u=l.move("[");return u+=l.move(t.safe(t.associationId(e),{before:u,after:"]",...l.current()})),u+=l.move("]: "),o(),!e.url||/[\0- \u007F]/.test(e.url)?(o=t.enter("destinationLiteral"),u+=l.move("<"),u+=l.move(t.safe(e.url,{before:u,after:">",...l.current()})),u+=l.move(">")):(o=t.enter("destinationRaw"),u+=l.move(t.safe(e.url,{before:u,after:e.title?" ":` -`,...l.current()}))),o(),e.title&&(o=t.enter(`title${i}`),u+=l.move(" "+s),u+=l.move(t.safe(e.title,{before:u,after:s,...l.current()})),u+=l.move(s),o()),a(),u}function SEn(e){const n=e.options.emphasis||"*";if(n!=="*"&&n!=="_")throw new Error("Cannot serialize emphasis with `"+n+"` for `options.emphasis`, expected `*`, or `_`");return n}function M0(e){return"&#x"+e.toString(16).toUpperCase()+";"}function Kv(e,n,t){const r=sh(e),s=sh(n);return r===void 0?s===void 0?t==="_"?{inside:!0,outside:!0}:{inside:!1,outside:!1}:s===1?{inside:!0,outside:!0}:{inside:!1,outside:!0}:r===1?s===void 0?{inside:!1,outside:!1}:s===1?{inside:!0,outside:!0}:{inside:!1,outside:!1}:s===void 0?{inside:!1,outside:!1}:s===1?{inside:!0,outside:!1}:{inside:!1,outside:!1}}fF.peek=CEn;function fF(e,n,t,r){const s=SEn(t),i=t.enter("emphasis"),a=t.createTracker(r),o=a.move(s);let l=a.move(t.containerPhrasing(e,{after:s,before:o,...a.current()}));const u=l.charCodeAt(0),h=Kv(r.before.charCodeAt(r.before.length-1),u,s);h.inside&&(l=M0(u)+l.slice(1));const _=l.charCodeAt(l.length-1),p=Kv(r.after.charCodeAt(0),_,s);p.inside&&(l=l.slice(0,-1)+M0(_));const m=a.move(s);return i(),t.attentionEncodeSurroundingInfo={after:p.outside,before:h.outside},o+l+m}function CEn(e,n,t){return t.options.emphasis||"*"}function EEn(e,n){let t=!1;return g6(e,function(r){if("value"in r&&/\r?\n|\r/.test(r.value)||r.type==="break")return t=!0,Z3}),!!((!e.depth||e.depth<3)&&w6(e)&&(n.options.setext||t))}function NEn(e,n,t,r){const s=Math.max(Math.min(6,e.depth||1),1),i=t.createTracker(r);if(EEn(e,t)){const h=t.enter("headingSetext"),_=t.enter("phrasing"),p=t.containerPhrasing(e,{...i.current(),before:` +`)),h+=o.move(l),u(),h}function aNn(e,n,t){return(t?"":" ")+e}function H6(e){const n=e.options.quote||'"';if(n!=='"'&&n!=="'")throw new Error("Cannot serialize title with `"+n+"` for `options.quote`, expected `\"`, or `'`");return n}function oNn(e,n,t,r){const s=H6(t),i=s==='"'?"Quote":"Apostrophe",a=t.enter("definition");let o=t.enter("label");const l=t.createTracker(r);let u=l.move("[");return u+=l.move(t.safe(t.associationId(e),{before:u,after:"]",...l.current()})),u+=l.move("]: "),o(),!e.url||/[\0- \u007F]/.test(e.url)?(o=t.enter("destinationLiteral"),u+=l.move("<"),u+=l.move(t.safe(e.url,{before:u,after:">",...l.current()})),u+=l.move(">")):(o=t.enter("destinationRaw"),u+=l.move(t.safe(e.url,{before:u,after:e.title?" ":` +`,...l.current()}))),o(),e.title&&(o=t.enter(`title${i}`),u+=l.move(" "+s),u+=l.move(t.safe(e.title,{before:u,after:s,...l.current()})),u+=l.move(s),o()),a(),u}function lNn(e){const n=e.options.emphasis||"*";if(n!=="*"&&n!=="_")throw new Error("Cannot serialize emphasis with `"+n+"` for `options.emphasis`, expected `*`, or `_`");return n}function M0(e){return"&#x"+e.toString(16).toUpperCase()+";"}function Kv(e,n,t){const r=sh(e),s=sh(n);return r===void 0?s===void 0?t==="_"?{inside:!0,outside:!0}:{inside:!1,outside:!1}:s===1?{inside:!0,outside:!0}:{inside:!1,outside:!0}:r===1?s===void 0?{inside:!1,outside:!1}:s===1?{inside:!0,outside:!0}:{inside:!1,outside:!1}:s===void 0?{inside:!1,outside:!1}:s===1?{inside:!0,outside:!1}:{inside:!1,outside:!1}}hF.peek=cNn;function hF(e,n,t,r){const s=lNn(t),i=t.enter("emphasis"),a=t.createTracker(r),o=a.move(s);let l=a.move(t.containerPhrasing(e,{after:s,before:o,...a.current()}));const u=l.charCodeAt(0),h=Kv(r.before.charCodeAt(r.before.length-1),u,s);h.inside&&(l=M0(u)+l.slice(1));const _=l.charCodeAt(l.length-1),p=Kv(r.after.charCodeAt(0),_,s);p.inside&&(l=l.slice(0,-1)+M0(_));const m=a.move(s);return i(),t.attentionEncodeSurroundingInfo={after:p.outside,before:h.outside},o+l+m}function cNn(e,n,t){return t.options.emphasis||"*"}function uNn(e,n){let t=!1;return g6(e,function(r){if("value"in r&&/\r?\n|\r/.test(r.value)||r.type==="break")return t=!0,Z3}),!!((!e.depth||e.depth<3)&&w6(e)&&(n.options.setext||t))}function _Nn(e,n,t,r){const s=Math.max(Math.min(6,e.depth||1),1),i=t.createTracker(r);if(uNn(e,t)){const h=t.enter("headingSetext"),_=t.enter("phrasing"),p=t.containerPhrasing(e,{...i.current(),before:` `,after:` `});return _(),h(),p+` `+(s===1?"=":"-").repeat(p.length-(Math.max(p.lastIndexOf("\r"),p.lastIndexOf(` `))+1))}const a="#".repeat(s),o=t.enter("headingAtx"),l=t.enter("phrasing");i.move(a+" ");let u=t.containerPhrasing(e,{before:"# ",after:` -`,...i.current()});return/^[\t ]/.test(u)&&(u=M0(u.charCodeAt(0))+u.slice(1)),u=u?a+" "+u:a,t.options.closeAtx&&(u+=" "+a),l(),o(),u}dF.peek=zEn;function dF(e){return e.value||""}function zEn(){return"<"}hF.peek=jEn;function hF(e,n,t,r){const s=H6(t),i=s==='"'?"Quote":"Apostrophe",a=t.enter("image");let o=t.enter("label");const l=t.createTracker(r);let u=l.move("![");return u+=l.move(t.safe(e.alt,{before:u,after:"]",...l.current()})),u+=l.move("]("),o(),!e.url&&e.title||/[\0- \u007F]/.test(e.url)?(o=t.enter("destinationLiteral"),u+=l.move("<"),u+=l.move(t.safe(e.url,{before:u,after:">",...l.current()})),u+=l.move(">")):(o=t.enter("destinationRaw"),u+=l.move(t.safe(e.url,{before:u,after:e.title?" ":")",...l.current()}))),o(),e.title&&(o=t.enter(`title${i}`),u+=l.move(" "+s),u+=l.move(t.safe(e.title,{before:u,after:s,...l.current()})),u+=l.move(s),o()),u+=l.move(")"),a(),u}function jEn(){return"!"}pF.peek=TEn;function pF(e,n,t,r){const s=e.referenceType,i=t.enter("imageReference");let a=t.enter("label");const o=t.createTracker(r);let l=o.move("![");const u=t.safe(e.alt,{before:l,after:"]",...o.current()});l+=o.move(u+"]["),a();const h=t.stack;t.stack=[],a=t.enter("reference");const _=t.safe(t.associationId(e),{before:l,after:"]",...o.current()});return a(),t.stack=h,i(),s==="full"||!u||u!==_?l+=o.move(_+"]"):s==="shortcut"?l=l.slice(0,-1):l+=o.move("]"),l}function TEn(){return"!"}mF.peek=AEn;function mF(e,n,t){let r=e.value||"",s="`",i=-1;for(;new RegExp("(^|[^`])"+s+"([^`]|$)").test(r);)s+="`";for(/[^ \r\n]/.test(r)&&(/^[ \r\n]/.test(r)&&/[ \r\n]$/.test(r)||/^`|`$/.test(r))&&(r=" "+r+" ");++i\u007F]/.test(e.url))}vF.peek=REn;function vF(e,n,t,r){const s=H6(t),i=s==='"'?"Quote":"Apostrophe",a=t.createTracker(r);let o,l;if(gF(e,t)){const h=t.stack;t.stack=[],o=t.enter("autolink");let _=a.move("<");return _+=a.move(t.containerPhrasing(e,{before:_,after:">",...a.current()})),_+=a.move(">"),o(),t.stack=h,_}o=t.enter("link"),l=t.enter("label");let u=a.move("[");return u+=a.move(t.containerPhrasing(e,{before:u,after:"](",...a.current()})),u+=a.move("]("),l(),!e.url&&e.title||/[\0- \u007F]/.test(e.url)?(l=t.enter("destinationLiteral"),u+=a.move("<"),u+=a.move(t.safe(e.url,{before:u,after:">",...a.current()})),u+=a.move(">")):(l=t.enter("destinationRaw"),u+=a.move(t.safe(e.url,{before:u,after:e.title?" ":")",...a.current()}))),l(),e.title&&(l=t.enter(`title${i}`),u+=a.move(" "+s),u+=a.move(t.safe(e.title,{before:u,after:s,...a.current()})),u+=a.move(s),l()),u+=a.move(")"),o(),u}function REn(e,n,t){return gF(e,t)?"<":"["}bF.peek=MEn;function bF(e,n,t,r){const s=e.referenceType,i=t.enter("linkReference");let a=t.enter("label");const o=t.createTracker(r);let l=o.move("[");const u=t.containerPhrasing(e,{before:l,after:"]",...o.current()});l+=o.move(u+"]["),a();const h=t.stack;t.stack=[],a=t.enter("reference");const _=t.safe(t.associationId(e),{before:l,after:"]",...o.current()});return a(),t.stack=h,i(),s==="full"||!u||u!==_?l+=o.move(_+"]"):s==="shortcut"?l=l.slice(0,-1):l+=o.move("]"),l}function MEn(){return"["}function q6(e){const n=e.options.bullet||"*";if(n!=="*"&&n!=="+"&&n!=="-")throw new Error("Cannot serialize items with `"+n+"` for `options.bullet`, expected `*`, `+`, or `-`");return n}function OEn(e){const n=q6(e),t=e.options.bulletOther;if(!t)return n==="*"?"-":"*";if(t!=="*"&&t!=="+"&&t!=="-")throw new Error("Cannot serialize items with `"+t+"` for `options.bulletOther`, expected `*`, `+`, or `-`");if(t===n)throw new Error("Expected `bullet` (`"+n+"`) and `bulletOther` (`"+t+"`) to be different");return t}function DEn(e){const n=e.options.bulletOrdered||".";if(n!=="."&&n!==")")throw new Error("Cannot serialize items with `"+n+"` for `options.bulletOrdered`, expected `.` or `)`");return n}function yF(e){const n=e.options.rule||"*";if(n!=="*"&&n!=="-"&&n!=="_")throw new Error("Cannot serialize rules with `"+n+"` for `options.rule`, expected `*`, `-`, or `_`");return n}function LEn(e,n,t,r){const s=t.enter("list"),i=t.bulletCurrent;let a=e.ordered?DEn(t):q6(t);const o=e.ordered?a==="."?")":".":OEn(t);let l=n&&t.bulletLastUsed?a===t.bulletLastUsed:!1;if(!e.ordered){const h=e.children?e.children[0]:void 0;if((a==="*"||a==="-")&&h&&(!h.children||!h.children[0])&&t.stack[t.stack.length-1]==="list"&&t.stack[t.stack.length-2]==="listItem"&&t.stack[t.stack.length-3]==="list"&&t.stack[t.stack.length-4]==="listItem"&&t.indexStack[t.indexStack.length-1]===0&&t.indexStack[t.indexStack.length-2]===0&&t.indexStack[t.indexStack.length-3]===0&&(l=!0),yF(t)===a&&h){let _=-1;for(;++_-1?n.start:1)+(t.options.incrementListMarker===!1?0:n.children.indexOf(e))+i);let a=i.length+1;(s==="tab"||s==="mixed"&&(n&&n.type==="list"&&n.spread||e.spread))&&(a=Math.ceil(a/4)*4);const o=t.createTracker(r);o.move(i+" ".repeat(a-i.length)),o.shift(a);const l=t.enter("listItem"),u=t.indentLines(t.containerFlow(e,o.current()),h);return l(),u;function h(_,p,m){return p?(m?"":" ".repeat(a))+_:(m?i:i+" ".repeat(a-i.length))+_}}function BEn(e,n,t,r){const s=t.enter("paragraph"),i=t.enter("phrasing"),a=t.containerPhrasing(e,r);return i(),s(),a}const PEn=ym(["break","delete","emphasis","footnote","footnoteReference","image","imageReference","inlineCode","inlineMath","link","linkReference","mdxJsxTextElement","mdxTextExpression","strong","text","textDirective"]);function FEn(e,n,t,r){return(e.children.some(function(a){return PEn(a)})?t.containerPhrasing:t.containerFlow).call(t,e,r)}function HEn(e){const n=e.options.strong||"*";if(n!=="*"&&n!=="_")throw new Error("Cannot serialize strong with `"+n+"` for `options.strong`, expected `*`, or `_`");return n}xF.peek=qEn;function xF(e,n,t,r){const s=HEn(t),i=t.enter("strong"),a=t.createTracker(r),o=a.move(s+s);let l=a.move(t.containerPhrasing(e,{after:s,before:o,...a.current()}));const u=l.charCodeAt(0),h=Kv(r.before.charCodeAt(r.before.length-1),u,s);h.inside&&(l=M0(u)+l.slice(1));const _=l.charCodeAt(l.length-1),p=Kv(r.after.charCodeAt(0),_,s);p.inside&&(l=l.slice(0,-1)+M0(_));const m=a.move(s+s);return i(),t.attentionEncodeSurroundingInfo={after:p.outside,before:h.outside},o+l+m}function qEn(e,n,t){return t.options.strong||"*"}function UEn(e,n,t,r){return t.safe(e.value,r)}function GEn(e){const n=e.options.ruleRepetition||3;if(n<3)throw new Error("Cannot serialize rules with repetition `"+n+"` for `options.ruleRepetition`, expected `3` or more");return n}function VEn(e,n,t){const r=(yF(t)+(t.options.ruleSpaces?" ":"")).repeat(GEn(t));return t.options.ruleSpaces?r.slice(0,-1):r}const wF={blockquote:mEn,break:RA,code:xEn,definition:kEn,emphasis:fF,hardBreak:RA,heading:NEn,html:dF,image:hF,imageReference:pF,inlineCode:mF,link:vF,linkReference:bF,list:LEn,listItem:$En,paragraph:BEn,root:FEn,strong:xF,text:UEn,thematicBreak:VEn};function KEn(){return{enter:{table:WEn,tableData:MA,tableHeader:MA,tableRow:XEn},exit:{codeText:YEn,table:QEn,tableData:Ww,tableHeader:Ww,tableRow:Ww}}}function WEn(e){const n=e._align;this.enter({type:"table",align:n.map(function(t){return t==="none"?null:t}),children:[]},e),this.data.inTable=!0}function QEn(e){this.exit(e),this.data.inTable=void 0}function XEn(e){this.enter({type:"tableRow",children:[]},e)}function Ww(e){this.exit(e)}function MA(e){this.enter({type:"tableCell",children:[]},e)}function YEn(e){let n=this.resume();this.data.inTable&&(n=n.replace(/\\([\\|])/g,ZEn));const t=this.stack[this.stack.length-1];t.type,t.value=n,this.exit(e)}function ZEn(e,n){return n==="|"?n:e}function JEn(e){const n=e||{},t=n.tableCellPadding,r=n.tablePipeAlign,s=n.stringLength,i=t?" ":"|";return{unsafe:[{character:"\r",inConstruct:"tableCell"},{character:` +`,...i.current()});return/^[\t ]/.test(u)&&(u=M0(u.charCodeAt(0))+u.slice(1)),u=u?a+" "+u:a,t.options.closeAtx&&(u+=" "+a),l(),o(),u}pF.peek=fNn;function pF(e){return e.value||""}function fNn(){return"<"}mF.peek=dNn;function mF(e,n,t,r){const s=H6(t),i=s==='"'?"Quote":"Apostrophe",a=t.enter("image");let o=t.enter("label");const l=t.createTracker(r);let u=l.move("![");return u+=l.move(t.safe(e.alt,{before:u,after:"]",...l.current()})),u+=l.move("]("),o(),!e.url&&e.title||/[\0- \u007F]/.test(e.url)?(o=t.enter("destinationLiteral"),u+=l.move("<"),u+=l.move(t.safe(e.url,{before:u,after:">",...l.current()})),u+=l.move(">")):(o=t.enter("destinationRaw"),u+=l.move(t.safe(e.url,{before:u,after:e.title?" ":")",...l.current()}))),o(),e.title&&(o=t.enter(`title${i}`),u+=l.move(" "+s),u+=l.move(t.safe(e.title,{before:u,after:s,...l.current()})),u+=l.move(s),o()),u+=l.move(")"),a(),u}function dNn(){return"!"}gF.peek=hNn;function gF(e,n,t,r){const s=e.referenceType,i=t.enter("imageReference");let a=t.enter("label");const o=t.createTracker(r);let l=o.move("![");const u=t.safe(e.alt,{before:l,after:"]",...o.current()});l+=o.move(u+"]["),a();const h=t.stack;t.stack=[],a=t.enter("reference");const _=t.safe(t.associationId(e),{before:l,after:"]",...o.current()});return a(),t.stack=h,i(),s==="full"||!u||u!==_?l+=o.move(_+"]"):s==="shortcut"?l=l.slice(0,-1):l+=o.move("]"),l}function hNn(){return"!"}vF.peek=pNn;function vF(e,n,t){let r=e.value||"",s="`",i=-1;for(;new RegExp("(^|[^`])"+s+"([^`]|$)").test(r);)s+="`";for(/[^ \r\n]/.test(r)&&(/^[ \r\n]/.test(r)&&/[ \r\n]$/.test(r)||/^`|`$/.test(r))&&(r=" "+r+" ");++i\u007F]/.test(e.url))}yF.peek=mNn;function yF(e,n,t,r){const s=H6(t),i=s==='"'?"Quote":"Apostrophe",a=t.createTracker(r);let o,l;if(bF(e,t)){const h=t.stack;t.stack=[],o=t.enter("autolink");let _=a.move("<");return _+=a.move(t.containerPhrasing(e,{before:_,after:">",...a.current()})),_+=a.move(">"),o(),t.stack=h,_}o=t.enter("link"),l=t.enter("label");let u=a.move("[");return u+=a.move(t.containerPhrasing(e,{before:u,after:"](",...a.current()})),u+=a.move("]("),l(),!e.url&&e.title||/[\0- \u007F]/.test(e.url)?(l=t.enter("destinationLiteral"),u+=a.move("<"),u+=a.move(t.safe(e.url,{before:u,after:">",...a.current()})),u+=a.move(">")):(l=t.enter("destinationRaw"),u+=a.move(t.safe(e.url,{before:u,after:e.title?" ":")",...a.current()}))),l(),e.title&&(l=t.enter(`title${i}`),u+=a.move(" "+s),u+=a.move(t.safe(e.title,{before:u,after:s,...a.current()})),u+=a.move(s),l()),u+=a.move(")"),o(),u}function mNn(e,n,t){return bF(e,t)?"<":"["}xF.peek=gNn;function xF(e,n,t,r){const s=e.referenceType,i=t.enter("linkReference");let a=t.enter("label");const o=t.createTracker(r);let l=o.move("[");const u=t.containerPhrasing(e,{before:l,after:"]",...o.current()});l+=o.move(u+"]["),a();const h=t.stack;t.stack=[],a=t.enter("reference");const _=t.safe(t.associationId(e),{before:l,after:"]",...o.current()});return a(),t.stack=h,i(),s==="full"||!u||u!==_?l+=o.move(_+"]"):s==="shortcut"?l=l.slice(0,-1):l+=o.move("]"),l}function gNn(){return"["}function q6(e){const n=e.options.bullet||"*";if(n!=="*"&&n!=="+"&&n!=="-")throw new Error("Cannot serialize items with `"+n+"` for `options.bullet`, expected `*`, `+`, or `-`");return n}function vNn(e){const n=q6(e),t=e.options.bulletOther;if(!t)return n==="*"?"-":"*";if(t!=="*"&&t!=="+"&&t!=="-")throw new Error("Cannot serialize items with `"+t+"` for `options.bulletOther`, expected `*`, `+`, or `-`");if(t===n)throw new Error("Expected `bullet` (`"+n+"`) and `bulletOther` (`"+t+"`) to be different");return t}function bNn(e){const n=e.options.bulletOrdered||".";if(n!=="."&&n!==")")throw new Error("Cannot serialize items with `"+n+"` for `options.bulletOrdered`, expected `.` or `)`");return n}function wF(e){const n=e.options.rule||"*";if(n!=="*"&&n!=="-"&&n!=="_")throw new Error("Cannot serialize rules with `"+n+"` for `options.rule`, expected `*`, `-`, or `_`");return n}function yNn(e,n,t,r){const s=t.enter("list"),i=t.bulletCurrent;let a=e.ordered?bNn(t):q6(t);const o=e.ordered?a==="."?")":".":vNn(t);let l=n&&t.bulletLastUsed?a===t.bulletLastUsed:!1;if(!e.ordered){const h=e.children?e.children[0]:void 0;if((a==="*"||a==="-")&&h&&(!h.children||!h.children[0])&&t.stack[t.stack.length-1]==="list"&&t.stack[t.stack.length-2]==="listItem"&&t.stack[t.stack.length-3]==="list"&&t.stack[t.stack.length-4]==="listItem"&&t.indexStack[t.indexStack.length-1]===0&&t.indexStack[t.indexStack.length-2]===0&&t.indexStack[t.indexStack.length-3]===0&&(l=!0),wF(t)===a&&h){let _=-1;for(;++_-1?n.start:1)+(t.options.incrementListMarker===!1?0:n.children.indexOf(e))+i);let a=i.length+1;(s==="tab"||s==="mixed"&&(n&&n.type==="list"&&n.spread||e.spread))&&(a=Math.ceil(a/4)*4);const o=t.createTracker(r);o.move(i+" ".repeat(a-i.length)),o.shift(a);const l=t.enter("listItem"),u=t.indentLines(t.containerFlow(e,o.current()),h);return l(),u;function h(_,p,m){return p?(m?"":" ".repeat(a))+_:(m?i:i+" ".repeat(a-i.length))+_}}function kNn(e,n,t,r){const s=t.enter("paragraph"),i=t.enter("phrasing"),a=t.containerPhrasing(e,r);return i(),s(),a}const SNn=ym(["break","delete","emphasis","footnote","footnoteReference","image","imageReference","inlineCode","inlineMath","link","linkReference","mdxJsxTextElement","mdxTextExpression","strong","text","textDirective"]);function CNn(e,n,t,r){return(e.children.some(function(a){return SNn(a)})?t.containerPhrasing:t.containerFlow).call(t,e,r)}function ENn(e){const n=e.options.strong||"*";if(n!=="*"&&n!=="_")throw new Error("Cannot serialize strong with `"+n+"` for `options.strong`, expected `*`, or `_`");return n}kF.peek=NNn;function kF(e,n,t,r){const s=ENn(t),i=t.enter("strong"),a=t.createTracker(r),o=a.move(s+s);let l=a.move(t.containerPhrasing(e,{after:s,before:o,...a.current()}));const u=l.charCodeAt(0),h=Kv(r.before.charCodeAt(r.before.length-1),u,s);h.inside&&(l=M0(u)+l.slice(1));const _=l.charCodeAt(l.length-1),p=Kv(r.after.charCodeAt(0),_,s);p.inside&&(l=l.slice(0,-1)+M0(_));const m=a.move(s+s);return i(),t.attentionEncodeSurroundingInfo={after:p.outside,before:h.outside},o+l+m}function NNn(e,n,t){return t.options.strong||"*"}function zNn(e,n,t,r){return t.safe(e.value,r)}function jNn(e){const n=e.options.ruleRepetition||3;if(n<3)throw new Error("Cannot serialize rules with repetition `"+n+"` for `options.ruleRepetition`, expected `3` or more");return n}function TNn(e,n,t){const r=(wF(t)+(t.options.ruleSpaces?" ":"")).repeat(jNn(t));return t.options.ruleSpaces?r.slice(0,-1):r}const SF={blockquote:eNn,break:RA,code:iNn,definition:oNn,emphasis:hF,hardBreak:RA,heading:_Nn,html:pF,image:mF,imageReference:gF,inlineCode:vF,link:yF,linkReference:xF,list:yNn,listItem:wNn,paragraph:kNn,root:CNn,strong:kF,text:zNn,thematicBreak:TNn};function ANn(){return{enter:{table:RNn,tableData:MA,tableHeader:MA,tableRow:ONn},exit:{codeText:DNn,table:MNn,tableData:Ww,tableHeader:Ww,tableRow:Ww}}}function RNn(e){const n=e._align;this.enter({type:"table",align:n.map(function(t){return t==="none"?null:t}),children:[]},e),this.data.inTable=!0}function MNn(e){this.exit(e),this.data.inTable=void 0}function ONn(e){this.enter({type:"tableRow",children:[]},e)}function Ww(e){this.exit(e)}function MA(e){this.enter({type:"tableCell",children:[]},e)}function DNn(e){let n=this.resume();this.data.inTable&&(n=n.replace(/\\([\\|])/g,LNn));const t=this.stack[this.stack.length-1];t.type,t.value=n,this.exit(e)}function LNn(e,n){return n==="|"?n:e}function INn(e){const n=e||{},t=n.tableCellPadding,r=n.tablePipeAlign,s=n.stringLength,i=t?" ":"|";return{unsafe:[{character:"\r",inConstruct:"tableCell"},{character:` `,inConstruct:"tableCell"},{atBreak:!0,character:"|",after:"[ :-]"},{character:"|",inConstruct:"tableCell"},{atBreak:!0,character:":",after:"-"},{atBreak:!0,character:"-",after:"[:|-]"}],handlers:{inlineCode:p,table:a,tableCell:l,tableRow:o}};function a(m,x,k,v){return u(h(m,k,v),m.align)}function o(m,x,k,v){const b=_(m,k,v),w=u([b]);return w.slice(0,w.indexOf(` -`))}function l(m,x,k,v){const b=k.enter("tableCell"),w=k.enter("phrasing"),y=k.containerPhrasing(m,{...v,before:i,after:i});return w(),b(),y}function u(m,x){return hEn(m,{align:x,alignDelimiters:r,padding:t,stringLength:s})}function h(m,x,k){const v=m.children;let b=-1;const w=[],y=x.enter("table");for(;++b0&&!t&&(e[e.length-1][1]._gfmAutolinkLiteralWalkedInto=!0),t}const gNn={tokenize:CNn,partial:!0};function vNn(){return{document:{91:{name:"gfmFootnoteDefinition",tokenize:wNn,continuation:{tokenize:kNn},exit:SNn}},text:{91:{name:"gfmFootnoteCall",tokenize:xNn},93:{name:"gfmPotentialFootnoteCall",add:"after",tokenize:bNn,resolveTo:yNn}}}}function bNn(e,n,t){const r=this;let s=r.events.length;const i=r.parser.gfmFootnotes||(r.parser.gfmFootnotes=[]);let a;for(;s--;){const l=r.events[s][1];if(l.type==="labelImage"){a=l;break}if(l.type==="gfmFootnoteCall"||l.type==="labelLink"||l.type==="label"||l.type==="image"||l.type==="link")break}return o;function o(l){if(!a||!a._balanced)return t(l);const u=oo(r.sliceSerialize({start:a.end,end:r.now()}));return u.codePointAt(0)!==94||!i.includes(u.slice(1))?t(l):(e.enter("gfmFootnoteCallLabelMarker"),e.consume(l),e.exit("gfmFootnoteCallLabelMarker"),n(l))}}function yNn(e,n){let t=e.length;for(;t--;)if(e[t][1].type==="labelImage"&&e[t][0]==="enter"){e[t][1];break}e[t+1][1].type="data",e[t+3][1].type="gfmFootnoteCallLabelMarker";const r={type:"gfmFootnoteCall",start:Object.assign({},e[t+3][1].start),end:Object.assign({},e[e.length-1][1].end)},s={type:"gfmFootnoteCallMarker",start:Object.assign({},e[t+3][1].end),end:Object.assign({},e[t+3][1].end)};s.end.column++,s.end.offset++,s.end._bufferIndex++;const i={type:"gfmFootnoteCallString",start:Object.assign({},s.end),end:Object.assign({},e[e.length-1][1].start)},a={type:"chunkString",contentType:"string",start:Object.assign({},i.start),end:Object.assign({},i.end)},o=[e[t+1],e[t+2],["enter",r,n],e[t+3],e[t+4],["enter",s,n],["exit",s,n],["enter",i,n],["enter",a,n],["exit",a,n],["exit",i,n],e[e.length-2],e[e.length-1],["exit",r,n]];return e.splice(t,e.length-t+1,...o),e}function xNn(e,n,t){const r=this,s=r.parser.gfmFootnotes||(r.parser.gfmFootnotes=[]);let i=0,a;return o;function o(_){return e.enter("gfmFootnoteCall"),e.enter("gfmFootnoteCallLabelMarker"),e.consume(_),e.exit("gfmFootnoteCallLabelMarker"),l}function l(_){return _!==94?t(_):(e.enter("gfmFootnoteCallMarker"),e.consume(_),e.exit("gfmFootnoteCallMarker"),e.enter("gfmFootnoteCallString"),e.enter("chunkString").contentType="string",u)}function u(_){if(i>999||_===93&&!a||_===null||_===91||lr(_))return t(_);if(_===93){e.exit("chunkString");const p=e.exit("gfmFootnoteCallString");return s.includes(oo(r.sliceSerialize(p)))?(e.enter("gfmFootnoteCallLabelMarker"),e.consume(_),e.exit("gfmFootnoteCallLabelMarker"),e.exit("gfmFootnoteCall"),n):t(_)}return lr(_)||(a=!0),i++,e.consume(_),_===92?h:u}function h(_){return _===91||_===92||_===93?(e.consume(_),i++,u):u(_)}}function wNn(e,n,t){const r=this,s=r.parser.gfmFootnotes||(r.parser.gfmFootnotes=[]);let i,a=0,o;return l;function l(x){return e.enter("gfmFootnoteDefinition")._container=!0,e.enter("gfmFootnoteDefinitionLabel"),e.enter("gfmFootnoteDefinitionLabelMarker"),e.consume(x),e.exit("gfmFootnoteDefinitionLabelMarker"),u}function u(x){return x===94?(e.enter("gfmFootnoteDefinitionMarker"),e.consume(x),e.exit("gfmFootnoteDefinitionMarker"),e.enter("gfmFootnoteDefinitionLabelString"),e.enter("chunkString").contentType="string",h):t(x)}function h(x){if(a>999||x===93&&!o||x===null||x===91||lr(x))return t(x);if(x===93){e.exit("chunkString");const k=e.exit("gfmFootnoteDefinitionLabelString");return i=oo(r.sliceSerialize(k)),e.enter("gfmFootnoteDefinitionLabelMarker"),e.consume(x),e.exit("gfmFootnoteDefinitionLabelMarker"),e.exit("gfmFootnoteDefinitionLabel"),p}return lr(x)||(o=!0),a++,e.consume(x),x===92?_:h}function _(x){return x===91||x===92||x===93?(e.consume(x),a++,h):h(x)}function p(x){return x===58?(e.enter("definitionMarker"),e.consume(x),e.exit("definitionMarker"),s.includes(i)||s.push(i),hn(e,m,"gfmFootnoteDefinitionWhitespace")):t(x)}function m(x){return n(x)}}function kNn(e,n,t){return e.check(wm,n,e.attempt(gNn,n,t))}function SNn(e){e.exit("gfmFootnoteDefinition")}function CNn(e,n,t){const r=this;return hn(e,s,"gfmFootnoteDefinitionIndent",5);function s(i){const a=r.events[r.events.length-1];return a&&a[1].type==="gfmFootnoteDefinitionIndent"&&a[2].sliceSerialize(a[1],!0).length===4?n(i):t(i)}}function ENn(e){let t=(e||{}).singleTilde;const r={name:"strikethrough",tokenize:i,resolveAll:s};return t==null&&(t=!0),{text:{126:r},insideSpan:{null:[r]},attentionMarkers:{null:[126]}};function s(a,o){let l=-1;for(;++l1?l(x):(a.consume(x),_++,m);if(_<2&&!t)return l(x);const v=a.exit("strikethroughSequenceTemporary"),b=sh(x);return v._open=!b||b===2&&!!k,v._close=!k||k===2&&!!b,o(x)}}}class NNn{constructor(){this.map=[]}add(n,t,r){zNn(this,n,t,r)}consume(n){if(this.map.sort(function(i,a){return i[0]-a[0]}),this.map.length===0)return;let t=this.map.length;const r=[];for(;t>0;)t-=1,r.push(n.slice(this.map[t][0]+this.map[t][1]),this.map[t][2]),n.length=this.map[t][0];r.push(n.slice()),n.length=0;let s=r.pop();for(;s;){for(const i of s)n.push(i);s=r.pop()}this.map.length=0}}function zNn(e,n,t,r){let s=0;if(!(t===0&&r.length===0)){for(;s-1;){const q=r.events[I][1].type;if(q==="lineEnding"||q==="linePrefix")I--;else break}const P=I>-1?r.events[I][1].type:null,U=P==="tableHead"||P==="tableRow"?E:l;return U===E&&r.parser.lazy[r.now().line]?t(D):U(D)}function l(D){return e.enter("tableHead"),e.enter("tableRow"),u(D)}function u(D){return D===124||(a=!0,i+=1),h(D)}function h(D){return D===null?t(D):Ct(D)?i>1?(i=0,r.interrupt=!0,e.exit("tableRow"),e.enter("lineEnding"),e.consume(D),e.exit("lineEnding"),m):t(D):bn(D)?hn(e,h,"whitespace")(D):(i+=1,a&&(a=!1,s+=1),D===124?(e.enter("tableCellDivider"),e.consume(D),e.exit("tableCellDivider"),a=!0,h):(e.enter("data"),_(D)))}function _(D){return D===null||D===124||lr(D)?(e.exit("data"),h(D)):(e.consume(D),D===92?p:_)}function p(D){return D===92||D===124?(e.consume(D),_):_(D)}function m(D){return r.interrupt=!1,r.parser.lazy[r.now().line]?t(D):(e.enter("tableDelimiterRow"),a=!1,bn(D)?hn(e,x,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(D):x(D))}function x(D){return D===45||D===58?v(D):D===124?(a=!0,e.enter("tableCellDivider"),e.consume(D),e.exit("tableCellDivider"),k):N(D)}function k(D){return bn(D)?hn(e,v,"whitespace")(D):v(D)}function v(D){return D===58?(i+=1,a=!0,e.enter("tableDelimiterMarker"),e.consume(D),e.exit("tableDelimiterMarker"),b):D===45?(i+=1,b(D)):D===null||Ct(D)?C(D):N(D)}function b(D){return D===45?(e.enter("tableDelimiterFiller"),w(D)):N(D)}function w(D){return D===45?(e.consume(D),w):D===58?(a=!0,e.exit("tableDelimiterFiller"),e.enter("tableDelimiterMarker"),e.consume(D),e.exit("tableDelimiterMarker"),y):(e.exit("tableDelimiterFiller"),y(D))}function y(D){return bn(D)?hn(e,C,"whitespace")(D):C(D)}function C(D){return D===124?x(D):D===null||Ct(D)?!a||s!==i?N(D):(e.exit("tableDelimiterRow"),e.exit("tableHead"),n(D)):N(D)}function N(D){return t(D)}function E(D){return e.enter("tableRow"),T(D)}function T(D){return D===124?(e.enter("tableCellDivider"),e.consume(D),e.exit("tableCellDivider"),T):D===null||Ct(D)?(e.exit("tableRow"),n(D)):bn(D)?hn(e,T,"whitespace")(D):(e.enter("data"),j(D))}function j(D){return D===null||D===124||lr(D)?(e.exit("data"),T(D)):(e.consume(D),D===92?M:j)}function M(D){return D===92||D===124?(e.consume(D),j):j(D)}}function RNn(e,n){let t=-1,r=!0,s=0,i=[0,0,0,0],a=[0,0,0,0],o=!1,l=0,u,h,_;const p=new NNn;for(;++tt[2]+1){const x=t[2]+1,k=t[3]-t[2]-1;e.add(x,k,[])}}e.add(t[3]+1,0,[["exit",_,n]])}return s!==void 0&&(i.end=Object.assign({},cd(n.events,s)),e.add(s,0,[["exit",i,n]]),i=void 0),i}function DA(e,n,t,r,s){const i=[],a=cd(n.events,t);s&&(s.end=Object.assign({},a),i.push(["exit",s,n])),r.end=Object.assign({},a),i.push(["exit",r,n]),e.add(t+1,0,i)}function cd(e,n){const t=e[n],r=t[0]==="enter"?"start":"end";return t[1][r]}const MNn={name:"tasklistCheck",tokenize:DNn};function ONn(){return{text:{91:MNn}}}function DNn(e,n,t){const r=this;return s;function s(l){return r.previous!==null||!r._gfmTasklistFirstContentOfListItem?t(l):(e.enter("taskListCheck"),e.enter("taskListCheckMarker"),e.consume(l),e.exit("taskListCheckMarker"),i)}function i(l){return lr(l)?(e.enter("taskListCheckValueUnchecked"),e.consume(l),e.exit("taskListCheckValueUnchecked"),a):l===88||l===120?(e.enter("taskListCheckValueChecked"),e.consume(l),e.exit("taskListCheckValueChecked"),a):t(l)}function a(l){return l===93?(e.enter("taskListCheckMarker"),e.consume(l),e.exit("taskListCheckMarker"),e.exit("taskListCheck"),o):t(l)}function o(l){return Ct(l)?n(l):bn(l)?e.check({tokenize:LNn},n,t)(l):t(l)}}function LNn(e,n,t){return hn(e,r,"whitespace");function r(s){return s===null?t(s):n(s)}}function INn(e){return BB([lNn(),vNn(),ENn(e),TNn(),ONn()])}const $Nn={};function AF(e){const n=this,t=e||$Nn,r=n.data(),s=r.micromarkExtensions||(r.micromarkExtensions=[]),i=r.fromMarkdownExtensions||(r.fromMarkdownExtensions=[]),a=r.toMarkdownExtensions||(r.toMarkdownExtensions=[]);s.push(INn(t)),i.push(sNn()),a.push(iNn(t))}function BNn(){return{enter:{mathFlow:e,mathFlowFenceMeta:n,mathText:i},exit:{mathFlow:s,mathFlowFence:r,mathFlowFenceMeta:t,mathFlowValue:o,mathText:a,mathTextData:o}};function e(l){const u={type:"element",tagName:"code",properties:{className:["language-math","math-display"]},children:[]};this.enter({type:"math",meta:null,value:"",data:{hName:"pre",hChildren:[u]}},l)}function n(){this.buffer()}function t(){const l=this.resume(),u=this.stack[this.stack.length-1];u.type,u.meta=l}function r(){this.data.mathFlowInside||(this.buffer(),this.data.mathFlowInside=!0)}function s(l){const u=this.resume().replace(/^(\r?\n|\r)|(\r?\n|\r)$/g,""),h=this.stack[this.stack.length-1];h.type,this.exit(l),h.value=u;const _=h.data.hChildren[0];_.type,_.tagName,_.children.push({type:"text",value:u}),this.data.mathFlowInside=void 0}function i(l){this.enter({type:"inlineMath",value:"",data:{hName:"code",hProperties:{className:["language-math","math-inline"]},hChildren:[]}},l),this.buffer()}function a(l){const u=this.resume(),h=this.stack[this.stack.length-1];h.type,this.exit(l),h.value=u,h.data.hChildren.push({type:"text",value:u})}function o(l){this.config.enter.data.call(this,l),this.config.exit.data.call(this,l)}}function PNn(e){let n=(e||{}).singleDollarTextMath;return n==null&&(n=!0),r.peek=s,{unsafe:[{character:"\r",inConstruct:"mathFlowMeta"},{character:` -`,inConstruct:"mathFlowMeta"},{character:"$",after:n?void 0:"\\$",inConstruct:"phrasing"},{character:"$",inConstruct:"mathFlowMeta"},{atBreak:!0,character:"$",after:"\\$"}],handlers:{math:t,inlineMath:r}};function t(i,a,o,l){const u=i.value||"",h=o.createTracker(l),_="$".repeat(Math.max(_F(u,"$")+1,2)),p=o.enter("mathFlow");let m=h.move(_);if(i.meta){const x=o.enter("mathFlowMeta");m+=h.move(o.safe(i.meta,{after:` +`))}function l(m,x,k,v){const b=k.enter("tableCell"),w=k.enter("phrasing"),y=k.containerPhrasing(m,{...v,before:i,after:i});return w(),b(),y}function u(m,x){return ZEn(m,{align:x,alignDelimiters:r,padding:t,stringLength:s})}function h(m,x,k){const v=m.children;let b=-1;const w=[],y=x.enter("table");for(;++b0&&!t&&(e[e.length-1][1]._gfmAutolinkLiteralWalkedInto=!0),t}const tzn={tokenize:czn,partial:!0};function nzn(){return{document:{91:{name:"gfmFootnoteDefinition",tokenize:azn,continuation:{tokenize:ozn},exit:lzn}},text:{91:{name:"gfmFootnoteCall",tokenize:izn},93:{name:"gfmPotentialFootnoteCall",add:"after",tokenize:rzn,resolveTo:szn}}}}function rzn(e,n,t){const r=this;let s=r.events.length;const i=r.parser.gfmFootnotes||(r.parser.gfmFootnotes=[]);let a;for(;s--;){const l=r.events[s][1];if(l.type==="labelImage"){a=l;break}if(l.type==="gfmFootnoteCall"||l.type==="labelLink"||l.type==="label"||l.type==="image"||l.type==="link")break}return o;function o(l){if(!a||!a._balanced)return t(l);const u=oo(r.sliceSerialize({start:a.end,end:r.now()}));return u.codePointAt(0)!==94||!i.includes(u.slice(1))?t(l):(e.enter("gfmFootnoteCallLabelMarker"),e.consume(l),e.exit("gfmFootnoteCallLabelMarker"),n(l))}}function szn(e,n){let t=e.length;for(;t--;)if(e[t][1].type==="labelImage"&&e[t][0]==="enter"){e[t][1];break}e[t+1][1].type="data",e[t+3][1].type="gfmFootnoteCallLabelMarker";const r={type:"gfmFootnoteCall",start:Object.assign({},e[t+3][1].start),end:Object.assign({},e[e.length-1][1].end)},s={type:"gfmFootnoteCallMarker",start:Object.assign({},e[t+3][1].end),end:Object.assign({},e[t+3][1].end)};s.end.column++,s.end.offset++,s.end._bufferIndex++;const i={type:"gfmFootnoteCallString",start:Object.assign({},s.end),end:Object.assign({},e[e.length-1][1].start)},a={type:"chunkString",contentType:"string",start:Object.assign({},i.start),end:Object.assign({},i.end)},o=[e[t+1],e[t+2],["enter",r,n],e[t+3],e[t+4],["enter",s,n],["exit",s,n],["enter",i,n],["enter",a,n],["exit",a,n],["exit",i,n],e[e.length-2],e[e.length-1],["exit",r,n]];return e.splice(t,e.length-t+1,...o),e}function izn(e,n,t){const r=this,s=r.parser.gfmFootnotes||(r.parser.gfmFootnotes=[]);let i=0,a;return o;function o(_){return e.enter("gfmFootnoteCall"),e.enter("gfmFootnoteCallLabelMarker"),e.consume(_),e.exit("gfmFootnoteCallLabelMarker"),l}function l(_){return _!==94?t(_):(e.enter("gfmFootnoteCallMarker"),e.consume(_),e.exit("gfmFootnoteCallMarker"),e.enter("gfmFootnoteCallString"),e.enter("chunkString").contentType="string",u)}function u(_){if(i>999||_===93&&!a||_===null||_===91||lr(_))return t(_);if(_===93){e.exit("chunkString");const p=e.exit("gfmFootnoteCallString");return s.includes(oo(r.sliceSerialize(p)))?(e.enter("gfmFootnoteCallLabelMarker"),e.consume(_),e.exit("gfmFootnoteCallLabelMarker"),e.exit("gfmFootnoteCall"),n):t(_)}return lr(_)||(a=!0),i++,e.consume(_),_===92?h:u}function h(_){return _===91||_===92||_===93?(e.consume(_),i++,u):u(_)}}function azn(e,n,t){const r=this,s=r.parser.gfmFootnotes||(r.parser.gfmFootnotes=[]);let i,a=0,o;return l;function l(x){return e.enter("gfmFootnoteDefinition")._container=!0,e.enter("gfmFootnoteDefinitionLabel"),e.enter("gfmFootnoteDefinitionLabelMarker"),e.consume(x),e.exit("gfmFootnoteDefinitionLabelMarker"),u}function u(x){return x===94?(e.enter("gfmFootnoteDefinitionMarker"),e.consume(x),e.exit("gfmFootnoteDefinitionMarker"),e.enter("gfmFootnoteDefinitionLabelString"),e.enter("chunkString").contentType="string",h):t(x)}function h(x){if(a>999||x===93&&!o||x===null||x===91||lr(x))return t(x);if(x===93){e.exit("chunkString");const k=e.exit("gfmFootnoteDefinitionLabelString");return i=oo(r.sliceSerialize(k)),e.enter("gfmFootnoteDefinitionLabelMarker"),e.consume(x),e.exit("gfmFootnoteDefinitionLabelMarker"),e.exit("gfmFootnoteDefinitionLabel"),p}return lr(x)||(o=!0),a++,e.consume(x),x===92?_:h}function _(x){return x===91||x===92||x===93?(e.consume(x),a++,h):h(x)}function p(x){return x===58?(e.enter("definitionMarker"),e.consume(x),e.exit("definitionMarker"),s.includes(i)||s.push(i),pn(e,m,"gfmFootnoteDefinitionWhitespace")):t(x)}function m(x){return n(x)}}function ozn(e,n,t){return e.check(wm,n,e.attempt(tzn,n,t))}function lzn(e){e.exit("gfmFootnoteDefinition")}function czn(e,n,t){const r=this;return pn(e,s,"gfmFootnoteDefinitionIndent",5);function s(i){const a=r.events[r.events.length-1];return a&&a[1].type==="gfmFootnoteDefinitionIndent"&&a[2].sliceSerialize(a[1],!0).length===4?n(i):t(i)}}function uzn(e){let t=(e||{}).singleTilde;const r={name:"strikethrough",tokenize:i,resolveAll:s};return t==null&&(t=!0),{text:{126:r},insideSpan:{null:[r]},attentionMarkers:{null:[126]}};function s(a,o){let l=-1;for(;++l1?l(x):(a.consume(x),_++,m);if(_<2&&!t)return l(x);const v=a.exit("strikethroughSequenceTemporary"),b=sh(x);return v._open=!b||b===2&&!!k,v._close=!k||k===2&&!!b,o(x)}}}class _zn{constructor(){this.map=[]}add(n,t,r){fzn(this,n,t,r)}consume(n){if(this.map.sort(function(i,a){return i[0]-a[0]}),this.map.length===0)return;let t=this.map.length;const r=[];for(;t>0;)t-=1,r.push(n.slice(this.map[t][0]+this.map[t][1]),this.map[t][2]),n.length=this.map[t][0];r.push(n.slice()),n.length=0;let s=r.pop();for(;s;){for(const i of s)n.push(i);s=r.pop()}this.map.length=0}}function fzn(e,n,t,r){let s=0;if(!(t===0&&r.length===0)){for(;s-1;){const U=r.events[I][1].type;if(U==="lineEnding"||U==="linePrefix")I--;else break}const B=I>-1?r.events[I][1].type:null,q=B==="tableHead"||B==="tableRow"?N:l;return q===N&&r.parser.lazy[r.now().line]?t(L):q(L)}function l(L){return e.enter("tableHead"),e.enter("tableRow"),u(L)}function u(L){return L===124||(a=!0,i+=1),h(L)}function h(L){return L===null?t(L):Et(L)?i>1?(i=0,r.interrupt=!0,e.exit("tableRow"),e.enter("lineEnding"),e.consume(L),e.exit("lineEnding"),m):t(L):bn(L)?pn(e,h,"whitespace")(L):(i+=1,a&&(a=!1,s+=1),L===124?(e.enter("tableCellDivider"),e.consume(L),e.exit("tableCellDivider"),a=!0,h):(e.enter("data"),_(L)))}function _(L){return L===null||L===124||lr(L)?(e.exit("data"),h(L)):(e.consume(L),L===92?p:_)}function p(L){return L===92||L===124?(e.consume(L),_):_(L)}function m(L){return r.interrupt=!1,r.parser.lazy[r.now().line]?t(L):(e.enter("tableDelimiterRow"),a=!1,bn(L)?pn(e,x,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(L):x(L))}function x(L){return L===45||L===58?v(L):L===124?(a=!0,e.enter("tableCellDivider"),e.consume(L),e.exit("tableCellDivider"),k):E(L)}function k(L){return bn(L)?pn(e,v,"whitespace")(L):v(L)}function v(L){return L===58?(i+=1,a=!0,e.enter("tableDelimiterMarker"),e.consume(L),e.exit("tableDelimiterMarker"),b):L===45?(i+=1,b(L)):L===null||Et(L)?C(L):E(L)}function b(L){return L===45?(e.enter("tableDelimiterFiller"),w(L)):E(L)}function w(L){return L===45?(e.consume(L),w):L===58?(a=!0,e.exit("tableDelimiterFiller"),e.enter("tableDelimiterMarker"),e.consume(L),e.exit("tableDelimiterMarker"),y):(e.exit("tableDelimiterFiller"),y(L))}function y(L){return bn(L)?pn(e,C,"whitespace")(L):C(L)}function C(L){return L===124?x(L):L===null||Et(L)?!a||s!==i?E(L):(e.exit("tableDelimiterRow"),e.exit("tableHead"),n(L)):E(L)}function E(L){return t(L)}function N(L){return e.enter("tableRow"),A(L)}function A(L){return L===124?(e.enter("tableCellDivider"),e.consume(L),e.exit("tableCellDivider"),A):L===null||Et(L)?(e.exit("tableRow"),n(L)):bn(L)?pn(e,A,"whitespace")(L):(e.enter("data"),j(L))}function j(L){return L===null||L===124||lr(L)?(e.exit("data"),A(L)):(e.consume(L),L===92?M:j)}function M(L){return L===92||L===124?(e.consume(L),j):j(L)}}function mzn(e,n){let t=-1,r=!0,s=0,i=[0,0,0,0],a=[0,0,0,0],o=!1,l=0,u,h,_;const p=new _zn;for(;++tt[2]+1){const x=t[2]+1,k=t[3]-t[2]-1;e.add(x,k,[])}}e.add(t[3]+1,0,[["exit",_,n]])}return s!==void 0&&(i.end=Object.assign({},cd(n.events,s)),e.add(s,0,[["exit",i,n]]),i=void 0),i}function DA(e,n,t,r,s){const i=[],a=cd(n.events,t);s&&(s.end=Object.assign({},a),i.push(["exit",s,n])),r.end=Object.assign({},a),i.push(["exit",r,n]),e.add(t+1,0,i)}function cd(e,n){const t=e[n],r=t[0]==="enter"?"start":"end";return t[1][r]}const gzn={name:"tasklistCheck",tokenize:bzn};function vzn(){return{text:{91:gzn}}}function bzn(e,n,t){const r=this;return s;function s(l){return r.previous!==null||!r._gfmTasklistFirstContentOfListItem?t(l):(e.enter("taskListCheck"),e.enter("taskListCheckMarker"),e.consume(l),e.exit("taskListCheckMarker"),i)}function i(l){return lr(l)?(e.enter("taskListCheckValueUnchecked"),e.consume(l),e.exit("taskListCheckValueUnchecked"),a):l===88||l===120?(e.enter("taskListCheckValueChecked"),e.consume(l),e.exit("taskListCheckValueChecked"),a):t(l)}function a(l){return l===93?(e.enter("taskListCheckMarker"),e.consume(l),e.exit("taskListCheckMarker"),e.exit("taskListCheck"),o):t(l)}function o(l){return Et(l)?n(l):bn(l)?e.check({tokenize:yzn},n,t)(l):t(l)}}function yzn(e,n,t){return pn(e,r,"whitespace");function r(s){return s===null?t(s):n(s)}}function xzn(e){return FB([VNn(),nzn(),uzn(e),hzn(),vzn()])}const wzn={};function MF(e){const n=this,t=e||wzn,r=n.data(),s=r.micromarkExtensions||(r.micromarkExtensions=[]),i=r.fromMarkdownExtensions||(r.fromMarkdownExtensions=[]),a=r.toMarkdownExtensions||(r.toMarkdownExtensions=[]);s.push(xzn(t)),i.push(HNn()),a.push(qNn(t))}function kzn(){return{enter:{mathFlow:e,mathFlowFenceMeta:n,mathText:i},exit:{mathFlow:s,mathFlowFence:r,mathFlowFenceMeta:t,mathFlowValue:o,mathText:a,mathTextData:o}};function e(l){const u={type:"element",tagName:"code",properties:{className:["language-math","math-display"]},children:[]};this.enter({type:"math",meta:null,value:"",data:{hName:"pre",hChildren:[u]}},l)}function n(){this.buffer()}function t(){const l=this.resume(),u=this.stack[this.stack.length-1];u.type,u.meta=l}function r(){this.data.mathFlowInside||(this.buffer(),this.data.mathFlowInside=!0)}function s(l){const u=this.resume().replace(/^(\r?\n|\r)|(\r?\n|\r)$/g,""),h=this.stack[this.stack.length-1];h.type,this.exit(l),h.value=u;const _=h.data.hChildren[0];_.type,_.tagName,_.children.push({type:"text",value:u}),this.data.mathFlowInside=void 0}function i(l){this.enter({type:"inlineMath",value:"",data:{hName:"code",hProperties:{className:["language-math","math-inline"]},hChildren:[]}},l),this.buffer()}function a(l){const u=this.resume(),h=this.stack[this.stack.length-1];h.type,this.exit(l),h.value=u,h.data.hChildren.push({type:"text",value:u})}function o(l){this.config.enter.data.call(this,l),this.config.exit.data.call(this,l)}}function Szn(e){let n=(e||{}).singleDollarTextMath;return n==null&&(n=!0),r.peek=s,{unsafe:[{character:"\r",inConstruct:"mathFlowMeta"},{character:` +`,inConstruct:"mathFlowMeta"},{character:"$",after:n?void 0:"\\$",inConstruct:"phrasing"},{character:"$",inConstruct:"mathFlowMeta"},{atBreak:!0,character:"$",after:"\\$"}],handlers:{math:t,inlineMath:r}};function t(i,a,o,l){const u=i.value||"",h=o.createTracker(l),_="$".repeat(Math.max(dF(u,"$")+1,2)),p=o.enter("mathFlow");let m=h.move(_);if(i.meta){const x=o.enter("mathFlowMeta");m+=h.move(o.safe(i.meta,{after:` `,before:m,encode:["$"],...h.current()})),x()}return m+=h.move(` `),u&&(m+=h.move(u+` -`)),m+=h.move(_),p(),m}function r(i,a,o){let l=i.value||"",u=1;for(n||u++;new RegExp("(^|[^$])"+"\\$".repeat(u)+"([^$]|$)").test(l);)u++;const h="$".repeat(u);/[^ \r\n]/.test(l)&&(/^[ \r\n]/.test(l)&&/[ \r\n]$/.test(l)||/^\$|\$$/.test(l))&&(l=" "+l+" ");let _=-1;for(;++_=0&&e[r]==="\\";r-=1)t+=1;return t%2===1}function N5(e){var a;let n=!1,t=0,r=0,s=0;for(;r[ \t]?/.exec(e.slice(r));if(o){r+=o[0].length,s+=1;continue}const l=/^ {0,3}(?:[-+*]|\d+[.)])[ \t]+/.exec(e.slice(r));if(!l)break;r+=l[0].length,t+=l[0].length,n=!0}const i=((a=/^[ \t]*/.exec(e.slice(r)))==null?void 0:a[0].length)??0;return{hasListMarker:n,indentation:i,listIndent:t,offset:r+i,quoteDepth:s}}function YNn(e,n){const t=e[n];if(t!=="`"&&t!=="~"||O0(e,n)||lh(e,n,t)<3)return!1;const r=e.lastIndexOf(` +`)),m+=h.move(_),p(),m}function r(i,a,o){let l=i.value||"",u=1;for(n||u++;new RegExp("(^|[^$])"+"\\$".repeat(u)+"([^$]|$)").test(l);)u++;const h="$".repeat(u);/[^ \r\n]/.test(l)&&(/^[ \r\n]/.test(l)&&/[ \r\n]$/.test(l)||/^\$|\$$/.test(l))&&(l=" "+l+" ");let _=-1;for(;++_=0&&e[r]==="\\";r-=1)t+=1;return t%2===1}function N5(e){var a;let n=!1,t=0,r=0,s=0;for(;r[ \t]?/.exec(e.slice(r));if(o){r+=o[0].length,s+=1;continue}const l=/^ {0,3}(?:[-+*]|\d+[.)])[ \t]+/.exec(e.slice(r));if(!l)break;r+=l[0].length,t+=l[0].length,n=!0}const i=((a=/^[ \t]*/.exec(e.slice(r)))==null?void 0:a[0].length)??0;return{hasListMarker:n,indentation:i,listIndent:t,offset:r+i,quoteDepth:s}}function Dzn(e,n){const t=e[n];if(t!=="`"&&t!=="~"||O0(e,n)||lh(e,n,t)<3)return!1;const r=e.lastIndexOf(` `,n-1)+1,s=e.indexOf(` -`,n),i=e.slice(r,s===-1?e.length:s),a=N5(i);return a.indentation<=3&&r+a.offset===n}function ZNn(e,n){const t=e[n],r=lh(e,n,t),s=e.lastIndexOf(` +`,n),i=e.slice(r,s===-1?e.length:s),a=N5(i);return a.indentation<=3&&r+a.offset===n}function Lzn(e,n){const t=e[n],r=lh(e,n,t),s=e.lastIndexOf(` `,n-1)+1,i=e.indexOf(` `,n),a=N5(e.slice(s,i===-1?e.length:i));let o=e.indexOf(` `,n+r);if(o===-1)return e.length;for(o+=1;o=a.listIndent&&_.indentation<=a.listIndent+3&&m>=r&&/^[ \t\r]*$/.test(e.slice(p+m,u)))return l===-1?e.length:l+1;if(l===-1)return e.length;o=l+1}return e.length}function JNn(e,n,t){const r=lh(e,n,"`");let s=n+r;for(;s")return s+1}return t?e.length:null}function tzn(e){const n=[];for(let t=0;t|()[\]-]+$/.test(t)?/^[eE][+-]?\d+$/.test(t)||/[+*/=^_{}\\<>|()]/.test(t)?!0:/^[A-Za-z][A-Za-z0-9]*$/.test(t):!1:!0}function rzn(e,{predictMath:n=!1}={}){const t=tzn(e),r=new Set,s=new Set;for(let u=0;u=a.listIndent&&_.indentation<=a.listIndent+3&&m>=r&&/^[ \t\r]*$/.test(e.slice(p+m,u)))return l===-1?e.length:l+1;if(l===-1)return e.length;o=l+1}return e.length}function Izn(e,n,t){const r=lh(e,n,"`");let s=n+r;for(;s")return s+1}return t?e.length:null}function Bzn(e){const n=[];for(let t=0;t|()[\]-]+$/.test(t)?/^[eE][+-]?\d+$/.test(t)||/[+*/=^_{}\\<>|()]/.test(t)?!0:/^[A-Za-z][A-Za-z0-9]*$/.test(t):!1:!0}function Fzn(e,{predictMath:n=!1}={}){const t=Bzn(e),r=new Set,s=new Set;for(let u=0;u`$$${s}$$`).replace(/\\\(([\s\S]+?)\\\)/g,(r,s)=>`$$${s}$$`);return n.predictMath&&(t=t.replace(/\\\[([\s\S]*)$/,(r,s)=>`$$${s}`).replace(/\\\(([\s\S]*)$/,(r,s)=>`$$${s}`)),rzn(t,n)}function OF(e,n={}){let t="",r=0,s=0;for(;ss!==n);return{order:e.order.filter(s=>s!==n),previewKey:e.previewKey===n?null:e.previewKey,fallbackKey:r[r.length-1]??null}}function azn(e){return e==="Enter"?"keepOpen":e===" "?"preview":null}function qr(e,n={}){const t=r=>{n.stopPropagation&&r.stopPropagation()};return{onClick:r=>{t(r),e("preview")},onDoubleClick:r=>{t(r),e("keepOpen")},onAuxClick:r=>{r.button===1&&(r.preventDefault(),t(r),e("keepOpen"))},onKeyDown:r=>{const s=azn(r.key);s&&(r.preventDefault(),t(r),e(s))}}}const DF=A.createContext(void 0);function LF({projectId:e,sessionId:n,children:t}){const r=A.useMemo(()=>(s,i=!1)=>{if(/^(https?:)?\/\//i.test(s))return s;const a=dB(s);return a?(a.source==="absolute"?yL(a.path):a.source==="artifact"&&!i?F_(e,a.path):c3(e,a.source==="artifact"?`artifacts/${a.path}`:a.path,{sessionId:n??void 0}))+a.hash:null},[e,n]);return f.jsx(DF,{value:r,children:t})}function ozn({src:e,alt:n,name:t,onClose:r}){const s=A.useRef(null),i=A.useRef(null),[a,o]=A.useState(1),[l,u]=A.useState({width:0,height:0}),[h,_]=A.useState({width:0,height:0});A.useEffect(()=>{const m=s.current;m==null||m.showModal(),m==null||m.focus();const x=i.current,k=new ResizeObserver(([v])=>{u({width:v.contentRect.width,height:v.contentRect.height})});return x&&k.observe(x),()=>{k.disconnect(),m==null||m.close()}},[]);const p=h.width&&l.width?Math.min(1,l.width*.9/h.width,l.height*.9/h.height):1;return Oa.createPortal(f.jsxs("dialog",{ref:s,tabIndex:-1,"aria-label":n||aD(),onCancel:m=>{m.preventDefault(),r()},className:"fixed inset-0 m-0 max-w-none max-h-none w-full h-dvh border-0 outline-none bg-transparent p-0 text-text backdrop:bg-image-backdrop",onClick:m=>{m.stopPropagation(),m.target===m.currentTarget&&r()},children:[f.jsx("div",{ref:i,className:"absolute inset-x-4 sm:inset-x-12 top-16 bottom-32 overflow-auto overscroll-contain",onClick:m=>{m.target===m.currentTarget&&r()},children:f.jsx("div",{className:"flex min-h-full min-w-full w-max pointer-events-none",children:f.jsx("img",{src:e,alt:n,onLoad:m=>_({width:m.currentTarget.naturalWidth,height:m.currentTarget.naturalHeight}),style:h.width?{width:h.width*p*a,height:h.height*p*a}:void 0,className:`pointer-events-auto block m-auto shrink-0 max-w-none rounded-lg shadow-modal ${h.width&&l.width?"visible":"invisible"}`})})}),f.jsxs("div",{className:"absolute top-5 right-5 flex gap-2",children:[f.jsx(dm,{shape:"circle",href:e,download:t||!0,"aria-label":mv(),title:mv(),className:"bg-background shadow-popover",children:f.jsx(gI,{size:16})}),f.jsx(Ft,{shape:"circle",onClick:r,"aria-label":o3(),title:o3(),className:"bg-background shadow-popover",children:f.jsx(_r,{size:16})})]}),f.jsxs("div",{className:"absolute bottom-6 inset-x-6 flex flex-col items-center gap-3 pointer-events-none",children:[n&&f.jsx("div",{className:"max-w-xl line-clamp-2 rounded-xl bg-background px-4 py-2 text-center text-sm leading-snug shadow-popover",children:n}),f.jsxs("div",{className:"pointer-events-auto flex items-center gap-1 rounded-full bg-background p-1.5 shadow-popover",children:[f.jsx(Ft,{shape:"circle",disabled:a<=.25,onClick:()=>o(m=>Math.max(.25,m-.25)),"aria-label":zN(),title:zN(),children:f.jsx(xbn,{size:16})}),f.jsxs(Me,{variant:"ghost",className:"min-w-16 tabular-nums",onClick:()=>o(1),title:jN(),"aria-label":jN(),children:[Math.round(a*100),"%"]}),f.jsx(Ft,{shape:"circle",disabled:a>=4,onClick:()=>o(m=>Math.min(4,m+.25)),"aria-label":NN(),title:NN(),children:f.jsx(yh,{size:16})})]})]})]}),document.body)}function lzn({src:e,fallbackSrc:n,downloadName:t,alt:r="",...s}){const[i,a]=A.useState(!1),[o,l]=A.useState(!1),u=i&&n?n:e;return f.jsxs(f.Fragment,{children:[f.jsx("img",{...s,src:u,alt:r,role:"button",tabIndex:0,"aria-haspopup":"dialog",onClick:h=>{h.preventDefault(),h.stopPropagation(),l(!0)},onKeyDown:h=>{(h.key==="Enter"||h.key===" ")&&(h.preventDefault(),h.stopPropagation(),l(!0))},onError:!i&&n&&n!==e?()=>a(!0):void 0}),o&&u&&f.jsx(ozn,{src:u,alt:r,name:t,onClose:()=>l(!1)})]})}const czn=1e5;function uzn({code:e,lang:n}){const[t,r]=A.useState(!1),s=()=>{var i;(i=navigator.clipboard)==null||i.writeText(e).then(()=>{r(!0),setTimeout(()=>r(!1),1500)})};return f.jsxs("div",{className:"md-code relative my-2.5 mx-0 [&_pre]:m-0 [&:hover_.md-code-copy]:opacity-100",children:[f.jsx(Ft,{size:"small",className:"md-code-copy absolute top-1.5 end-1.5 bg-background opacity-0",title:Ok(),"aria-label":KXe(),onClick:s,children:t?f.jsx(Ji,{size:13}):f.jsx(Sb,{size:13})}),f.jsx("pre",{children:f.jsx("code",{children:c2n(e,n,czn)})})]})}function _zn(e){const n={};for(const t of e.matchAll(/([\w-]+)=(["'])(.*?)\2/g)){const r=t[1];r&&(n[r.toLowerCase()]=t[3]??"")}return n}function BA(e,n,t){let r=n.line,s=n.column;for(let i=0;i]*?)\/?>/gi,r=[];let s=0,i=!1;for(const a of n.matchAll(t)){const o=(a[1]??"").toLowerCase(),l=_zn(a[2]??"");if(!l[o==="run"?"id":"path"])continue;i=!0,a.index>s&&r.push({type:"text",value:n.slice(s,a.index),position:Xw(e,s,a.index)});const h=a.index+a[0].length;r.push({children:[],data:{hName:o==="run"?"run-mention":"file-mention",hProperties:l},position:Xw(e,a.index,h),type:o==="run"?"runMention":"fileMention"}),s=h}return i?(sIF(e)}function dzn(){return e=>{const n=t=>{var r;for(const s of["href","src"])if(t.properties&&Object.hasOwn(t.properties,s)){const i=String(t.properties[s]||"");t.properties[s]=s==="src"&&t.tagName==="img"&&c6(i)?i:rP(i)}(r=t.children)==null||r.forEach(n)};n(e)}}function FA({path:e,lines:n,exp:t,onOpenFile:r}){const s=e.split("/").pop()||e,i=n&&Number.parseInt(n,10)||void 0,a=i!=null?`${s}:${i}`:s;return f.jsxs("button",{className:"file-chip",title:r?pY({path:Ne(e)}):e,...qr(o=>r==null?void 0:r(e,i,t,void 0,o)),disabled:!r,children:[f.jsx(vI,{size:12}),f.jsx("span",{className:"file-chip-label",children:a}),f.jsx(SI,{className:"file-chip-open",size:12,"aria-hidden":"true"})]})}function hzn({id:e,label:n,onOpenRun:t}){return f.jsxs("button",{className:"file-chip run-chip",title:t?HY({id:Ne(e)}):qZ({id:Ne(e)}),...qr(r=>t==null?void 0:t(e,r)),disabled:!t,children:[f.jsx(rS,{size:12}),f.jsx("span",{className:"file-chip-label",children:n||dL()}),f.jsx(SI,{className:"file-chip-open",size:12,"aria-hidden":"true"})]})}const $F={singleDollarTextMath:!0},pzn=ny().use(sy).use(AF).use(RF,$F).use(XNn).use(fzn).use(Pv).use(dzn).use(aF);function mzn(e){return!(/^[a-z][a-z0-9+.-]*:/i.test(e)||e.startsWith("#")||e.startsWith("//"))}const BF={code:({node:e,className:n,children:t,...r})=>{const s=n??"",i=/language-(\w+)/.exec(s),a=String(t??"").replace(/\n$/,"");if(!(i!=null||a.includes(` -`)))return f.jsx("code",{className:s,...r,children:t});const l=i?R3(i[1]):null;return f.jsx(uzn,{code:a,lang:l})},pre:({children:e})=>f.jsx(f.Fragment,{children:e})};function gzn({children:e}){return f.jsx("figure",{className:"my-6 mx-auto max-w-full text-left [&_img]:mx-auto [&_img]:my-0 [&_img]:w-auto [&_img]:h-auto [&_img]:max-h-[min(480px,60vh)] [&_img]:object-contain [&_img]:border-0 [&_img]:rounded-none",children:e})}const Wo=A.memo(function({text:n,onOpenFile:t,onOpenRun:r,resolveFilePath:s,resolveImageSrc:i,predict:a=!1}){sf();const o=A.useContext(DF),l=i??o,u=A.useMemo(()=>({"file-mention":h=>f.jsx(FA,{path:h.path,lines:h.lines,exp:h.exp,onOpenFile:t}),"run-mention":h=>f.jsx(hzn,{id:h.id,label:h.label,onOpenRun:r}),a:({node:h,href:_,children:p,"data-figure-src":m,...x})=>{const k=typeof m=="string"?dB(m):null;if(k&&t){const v=k.source==="artifact"?`artifacts/${k.path}`:k.path,b=s?s(v):v;if(b)return f.jsx("button",{type:"button",className:"text-primary underline cursor-pointer text-start",...qr(w=>t(b,void 0,void 0,void 0,w)),children:p})}if(_&&mzn(_)&&t){let v;try{v=decodeURI(_)}catch{return f.jsx("span",{children:p})}const b=s?s(v):v;return b?f.jsx(FA,{path:b,onOpenFile:t}):f.jsx("span",{children:p})}return f.jsx("a",{href:_,target:"_blank",rel:"noopener noreferrer",...x,children:p})},figure:({children:h})=>f.jsx(gzn,{children:h}),figcaption:({children:h})=>f.jsx("figcaption",{className:"mt-3 text-sm italic leading-relaxed text-text",children:h}),th:({node:h,..._})=>f.jsx("th",{dir:"auto",..._}),td:({node:h,..._})=>f.jsx("td",{dir:"auto",..._}),img:({node:h,src:_,alt:p,className:m,...x})=>{var v;if(!_||typeof _!="string")return null;const k=l?l(_):_;return k?A.createElement(lzn,{...x,key:k,downloadName:(v=_.split(/[\\/]/).pop())==null?void 0:v.split(/[?#]/)[0],src:k,fallbackSrc:i?null:o==null?void 0:o(_,!0),alt:p??"",loading:"lazy",className:`block max-w-full h-auto my-3 rounded-sm border border-border cursor-zoom-in focus-visible:outline-2 focus-visible:outline-primary ${m??""}`}):null},...BF}),[t,r,s,i,o,l]);return f.jsx("div",{dir:"auto","data-streaming":a||void 0,className:"md min-w-0 wrap-anywhere text-text leading-[1.62] [&_>_*:first-child]:mt-0 [&_>_*:last-child]:mb-0 [&_p]:my-2.5 [&_p]:mx-0 [&_strong]:text-text [&_strong]:font-semibold [&_pre]:bg-surface [&_pre]:border [&_pre]:border-border-muted [&_pre]:rounded-md [&_pre]:py-2 [&_pre]:px-3 [&_pre]:overflow-x-auto [&_pre]:text-sm [&_pre]:text-text [&_code]:font-mono [&_code]:text-sm [&_code]:font-medium [&_code]:text-primary [&_code]:bg-panel [&_code]:border [&_code]:border-border-variant [&_code]:rounded-xs [&_code]:py-px [&_code]:px-[5px] [&_.katex]:text-prose-emphasis [&_.katex-display]:my-3 [&_.katex-display]:mx-0 [&_.katex-display]:overflow-x-auto [&_.katex-display]:overflow-y-hidden [&_.katex-display]:py-0.5 [&_.katex-display]:px-0 [&_.file-chip]:inline-flex [&_.file-chip]:items-center [&_.file-chip]:gap-1 [&_.file-chip]:max-w-full [&_.file-chip]:my-0 [&_.file-chip]:mx-px [&_.file-chip]:py-0 [&_.file-chip]:px-1.5 [&_.file-chip]:align-baseline [&_.file-chip]:font-mono [&_.file-chip]:text-sm [&_.file-chip]:font-medium [&_.file-chip]:text-text [&_.file-chip]:bg-panel [&_.file-chip]:border [&_.file-chip]:border-border-variant [&_.file-chip]:rounded-xs [&_.file-chip]:cursor-pointer [&_.file-chip:hover:not(:disabled)]:bg-surface [&_.file-chip:hover:not(:disabled)]:text-primary [&_.file-chip_svg]:flex-none [&_.file-chip_svg]:opacity-60 [&_.file-chip-label]:max-w-65 [&_.file-chip-label]:overflow-hidden [&_.file-chip-label]:text-ellipsis [&_.file-chip-label]:whitespace-nowrap [&_.run-chip_svg]:opacity-100 [&_.run-chip_svg]:text-primary [&_pre_code]:bg-none [&_pre_code]:bg-transparent [&_pre_code]:border-0 [&_pre_code]:text-inherit [&_pre_code]:p-0 [&_pre_code]:font-normal [&_h1]:text-text [&_h1]:text-prose-emphasis [&_h1]:font-semibold [&_h1]:mt-3 [&_h1]:mx-0 [&_h1]:mb-1.5 [&_h2]:text-text [&_h2]:text-prose-emphasis [&_h2]:font-semibold [&_h2]:mt-3 [&_h2]:mx-0 [&_h2]:mb-1.5 [&_h3]:text-text [&_h3]:text-prose-emphasis [&_h3]:font-semibold [&_h3]:mt-3 [&_h3]:mx-0 [&_h3]:mb-1.5 [&_h4]:text-text [&_h4]:text-prose-emphasis [&_h4]:font-semibold [&_h4]:mt-3 [&_h4]:mx-0 [&_h4]:mb-1.5 [&_ul]:my-1.5 [&_ul]:mx-0 [&_ul]:ps-5.5 [&_ol]:my-1.5 [&_ol]:mx-0 [&_ol]:ps-5.5 [&_li::marker]:text-primary [&_a]:text-primary [&_table]:border-collapse [&_table]:block [&_table]:w-max [&_table]:max-w-full [&_table]:text-sm [&_table]:my-2.5 [&_table]:mx-0 [&_table]:border [&_table]:border-border [&_table]:rounded-md [&_table]:overflow-x-auto [&_th]:border-b [&_th]:border-b-border-variant [&_th]:py-2 [&_th]:px-3.5 [&_th]:text-start [&_th]:text-text [&_th]:break-normal [&_th]:break-words [&_td]:border-b [&_td]:border-b-border-variant [&_td]:py-2 [&_td]:px-3.5 [&_td]:text-start [&_td]:text-text [&_td]:break-normal [&_td]:break-words [&_tr:last-child_td]:border-b-0 [&_thead_th]:bg-surface [&_thead_th]:font-medium [&_thead_th]:text-text [&_thead_th]:border-b [&_thead_th]:border-b-border [&_tbody_tr:hover_td]:bg-surface-bright [&_blockquote]:my-1.5 [&_blockquote]:mx-0 [&_blockquote]:pt-0.5 [&_blockquote]:pe-0 [&_blockquote]:pb-0.5 [&_blockquote]:ps-2.5 [&_blockquote]:border-s-[3px] [&_blockquote]:border-s-border [&_blockquote]:text-subtext [:is(&,_.openresearch-diff,_.file-view)_.token.comment]:italic [:is(&,_.openresearch-diff,_.file-view)_.token.prolog]:italic [:is(&,_.openresearch-diff,_.file-view)_.token.cdata]:italic [:is(&,_.openresearch-diff,_.file-view)_.token.operator]:text-syntax-cyan [:is(&,_.openresearch-diff,_.file-view)_.token.entity]:text-syntax-cyan [:is(&,_.openresearch-diff,_.file-view)_.token.url]:text-syntax-cyan [:is(&,_.openresearch-diff,_.file-view)_.token.comment]:text-syntax-comment [:is(&,_.openresearch-diff,_.file-view)_.token.prolog]:text-syntax-comment [:is(&,_.openresearch-diff,_.file-view)_.token.cdata]:text-syntax-comment [:is(&,_.openresearch-diff,_.file-view)_.token.punctuation]:text-syntax-text [:is(&,_.openresearch-diff,_.file-view)_.token.property]:text-syntax-red [:is(&,_.openresearch-diff,_.file-view)_.token.tag]:text-syntax-red [:is(&,_.openresearch-diff,_.file-view)_.token.deleted]:text-syntax-red [:is(&,_.openresearch-diff,_.file-view)_.token.constant]:text-syntax-orange [:is(&,_.openresearch-diff,_.file-view)_.token.symbol]:text-syntax-orange [:is(&,_.openresearch-diff,_.file-view)_.token.boolean]:text-syntax-orange [:is(&,_.openresearch-diff,_.file-view)_.token.number]:text-syntax-orange [:is(&,_.openresearch-diff,_.file-view)_.token.selector]:text-syntax-green [:is(&,_.openresearch-diff,_.file-view)_.token.attr-name]:text-syntax-green [:is(&,_.openresearch-diff,_.file-view)_.token.char]:text-syntax-green [:is(&,_.openresearch-diff,_.file-view)_.token.inserted]:text-syntax-green [:is(&,_.openresearch-diff,_.file-view)_.token.string]:text-syntax-green [:is(&,_.openresearch-diff,_.file-view)_.token.builtin]:text-syntax-yellow [:is(&,_.openresearch-diff,_.file-view)_.token.atrule]:text-syntax-orange [:is(&,_.openresearch-diff,_.file-view)_.token.attr-value]:text-syntax-orange [:is(&,_.openresearch-diff,_.file-view)_.token.keyword]:text-syntax-purple [:is(&,_.openresearch-diff,_.file-view)_.token.function]:text-syntax-blue [:is(&,_.openresearch-diff,_.file-view)_.token.decorator]:text-syntax-blue [:is(&,_.openresearch-diff,_.file-view)_.token.def]:text-syntax-blue [:is(&,_.openresearch-diff,_.file-view)_.token.class-name]:text-syntax-yellow [:is(&,_.openresearch-diff,_.file-view)_.token.namespace]:text-syntax-yellow [:is(&,_.openresearch-diff,_.file-view)_.token.regex]:text-syntax-green [:is(&,_.openresearch-diff,_.file-view)_.token.important]:text-syntax-red [:is(&,_.openresearch-diff,_.file-view)_.token.variable]:text-syntax-red [:is(&,_.openresearch-diff,_.file-view)_.token.parameter]:text-syntax-text",children:f.jsx(tCn,{content:OF(n,{predictMath:a}),processor:pzn,components:u,predict:a})})}),HA="prompt-actions plan-strip-actions flex flex-wrap justify-end gap-x-2 gap-y-1.5";function vzn({synthesized:e,agentLabel:n,onView:t,onApprove:r,showResumeModes:s,onReject:i,onRevise:a}){const[o,l]=A.useState(!1),u=A.useRef(null),[h,_]=A.useState(!1),[p,m]=A.useState(""),x=A.useRef(null);A.useEffect(()=>{if(!o)return;const v=b=>{u.current&&!u.current.contains(b.target)&&l(!1)};return window.addEventListener("pointerdown",v),()=>window.removeEventListener("pointerdown",v)},[o]),A.useEffect(()=>{var v;h&&((v=x.current)==null||v.focus())},[h]);const k=()=>{a(p.trim()||"no specific feedback — use your judgment"),m(""),_(!1)};return f.jsxs("div",{className:"plan-strip relative w-full mt-0 mx-0 mb-2.5 py-[11px] px-[13px] flex flex-col items-stretch gap-2.5 border border-border border-s-[3px] border-s-accent-blue rounded-md bg-surface shadow-plan",children:[f.jsxs("div",{className:"plan-strip-info flex items-baseline gap-2 min-w-0",children:[f.jsx(rS,{size:14,className:"plan-strip-icon text-accent-blue shrink-0 self-center"}),f.jsx("span",{dir:"auto",className:"plan-strip-title text-sm font-semibold whitespace-nowrap",children:e?i1t({agent:Ne(n)}):Zgt({agent:Ne(n)})}),f.jsx("button",{className:"plan-strip-open ms-auto p-0 border-0 bg-none bg-transparent text-accent-blue text-sm cursor-pointer whitespace-nowrap shrink-0 [&:hover]:underline",...qr(t),children:C1t()})]}),h?f.jsxs(f.Fragment,{children:[f.jsx("textarea",{dir:"auto",ref:x,className:"plan-strip-revise-input w-full resize-none border border-border rounded-md py-[9px] px-[11px] text-sm font-[inherit] bg-background text-text [&:focus]:border-accent-blue",placeholder:J1t(),rows:2,value:p,onChange:v=>m(v.target.value),onKeyDown:v=>{v.key==="Escape"?(v.preventDefault(),m(""),_(!1)):v.key==="Enter"&&!v.shiftKey&&(v.preventDefault(),k())}}),f.jsxs("div",{className:HA,children:[f.jsx(Me,{size:"small",onClick:()=>{m(""),_(!1)},children:ID()}),f.jsx("span",{className:"plan-strip-spacer flex-1"}),f.jsxs(Me,{size:"small",variant:"primary",onClick:k,children:[B1t(),f.jsx(pI,{size:13})]})]})]}):f.jsxs("div",{className:HA,children:[f.jsx(Me,{size:"small",onClick:i,children:R1t()}),f.jsx(Me,{size:"small",onClick:()=>_(!0),children:V1t()}),f.jsx("span",{className:"plan-strip-spacer flex-1"}),s?f.jsxs("div",{className:"plan-strip-approve relative flex",ref:u,children:[f.jsx(Me,{size:"small",variant:"primary",className:"rounded-e-none",onClick:()=>r("auto"),children:Agt()}),f.jsx(Me,{size:"small",variant:"primary",className:"rounded-s-none border-s-plan-caret px-1.5","aria-label":v1t(),onClick:()=>l(v=>!v),children:f.jsx(Zo,{size:13})}),o&&f.jsx("div",{className:"plan-strip-menu absolute end-0 bottom-[calc(100%_+_4px)] flex min-w-47.5 flex-col rounded-md border border-border bg-surface p-1 shadow-plan-menu z-6",children:f.jsx(nr,{onClick:()=>{l(!1),r("bypassPermissions")},children:$gt()})})]}):f.jsx(Me,{size:"small",variant:"primary",onClick:()=>r(),children:Ggt()})]})]})}function qA({save:e,onSaved:n,placeholder:t,createHref:r,createLabel:s}){const[i,a]=A.useState(""),[o,l]=A.useState(!1),[u,h]=A.useState(null);async function _(p){if(p.preventDefault(),!(o||!i.trim())){l(!0),h(null);try{n(await e(i.trim())),a("")}catch(m){h(m instanceof Error?m.message:String(m))}finally{l(!1)}}}return f.jsxs("form",{className:"onb-token-form flex items-center flex-wrap gap-2 mt-2 [&_input]:flex-1 [&_input]:min-w-55 [&_input]:text-sm [&_a]:text-sm [&_a]:text-subtext [&_a]:whitespace-nowrap [&_.error]:basis-full [&_.error]:text-accent-red [&_.error]:text-sm [&_.error]:whitespace-pre-wrap",onSubmit:_,children:[f.jsx("input",{type:"password",value:i,onChange:p=>a(p.target.value),placeholder:t,autoComplete:"off"}),f.jsx(Me,{type:"submit",disabled:o||!i.trim(),children:o?la():Yo()}),f.jsx("a",{href:r,target:"_blank",rel:"noreferrer",children:s??yqe()}),u&&f.jsx("div",{className:"error",children:u})]})}function PF({value:e,max:n,label:t,caption:r,fillColor:s}){const i=n>0?Math.min(100,Math.round(e/n*100)):0;return f.jsxs("div",{className:"progress mt-3 mx-0 mb-1",role:"progressbar","aria-valuenow":i,"aria-valuemin":0,"aria-valuemax":100,children:[f.jsx("div",{className:"progress-track h-2 rounded-full bg-surface border border-border overflow-hidden",children:f.jsx("div",{className:"progress-fill h-full bg-accent rounded-full transition-[width] duration-200 ease-standard",style:{width:`${i}%`,background:s}})}),(t!==void 0||r!==void 0)&&f.jsxs("div",{className:"progress-caption flex justify-between mt-1.5 text-sm text-muted",children:[f.jsx("span",{children:t??`${i}%`}),r]})]})}const Qo=["settings-card [&_>_.error]:text-accent-red [&_>_.error]:text-base","[&_>_.error]:whitespace-pre-wrap bg-background border border-border","rounded-lg py-4 px-4.5 mb-4 [&_h3]:mt-0 [&_h3]:mx-0 [&_h3]:mb-2.5","[&_h3]:text-base [&_h3]:font-semibold [&_h3]:text-text","[&_.settings-sub]:mb-3 [&_.kv]:gap-y-1.5 [&_.kv]:gap-x-4.5","[&_>_.project-default-row:first-child]:pt-0 [&_>_.project-default-row:first-child]:border-t-0"].join(" "),K_=["kv grid grid-cols-[auto_1fr] items-baseline gap-y-[3px] gap-x-3.5 text-base","[&_.k]:text-sm [&_.k]:text-subtext [&_.v]:text-base [&_.v]:text-text","[&_.v]:break-all"].join(" "),bzn=["grid grid-cols-[9rem_minmax(0,1fr)] items-center gap-x-5 gap-y-2.5 font-sans text-base text-text","[&_.k]:font-medium [&_.k]:text-sm [&_.k]:text-text","[&_.v]:min-w-0 [&_.v]:flex [&_.v]:items-center [&_.v]:flex-wrap [&_.v]:gap-2","[&_.v]:font-sans [&_.v]:text-base [&_.v]:text-text [&_.v]:break-words"].join(" "),vy="mt-3 mx-0 mb-0 ps-3 border-s-2 border-s-accent-red font-sans text-base leading-relaxed text-text whitespace-pre-wrap",Ta=["settings-note mt-2.5 mx-0 mb-0 text-base py-2 px-2.5","border border-accent-amber rounded-md bg-accent-amber-subtle","text-accent-amber font-medium"].join(" "),G6=["form font-sans text-sm text-text [&_.form-seg]:self-start [&_.form-seg]:mb-0.5","[&_.form-seg_button]:py-[5px] [&_.form-seg_button]:px-3","[&_.repo-hint]:font-normal [&_.repo-hint]:text-sm","[&_.repo-hint]:text-muted [&_.repo-hint.ok]:text-accent-teal","[&_.folder-picker-control]:flex [&_.folder-picker-control]:items-center","[&_.folder-picker-control]:gap-[9px] [&_.folder-picker-control]:w-full","[&_.folder-picker-control]:min-w-0 [&_.folder-picker-control]:py-2 [&_.folder-picker-control]:px-2.5","[&_.folder-picker-control]:overflow-hidden [&_.folder-picker-control]:bg-background","[&_.folder-picker-control]:border [&_.folder-picker-control]:border-border","[&_.folder-picker-control]:rounded-md [&_.folder-picker-control]:cursor-pointer","[&_.folder-picker-control]:text-start","[&_.folder-picker-control]:transition-[border-color,box-shadow] [&_.folder-picker-control]:duration-120 [&_.folder-picker-control]:ease-standard","[&_.folder-picker-control:hover:not(:disabled)]:border-muted","[&_.folder-picker-control:hover:not(:disabled)]:shadow-control-subtle","[&_.folder-picker-control:focus-visible]:outline-2 [&_.folder-picker-control:focus-visible]:outline-solid [&_.folder-picker-control:focus-visible]:outline-text","[&_.folder-picker-control:focus-visible]:outline-offset-2 [&_.folder-picker-control_span]:flex-1","[&_.folder-picker-control_span]:min-w-0 [&_.folder-picker-control_span]:overflow-hidden","[&_.folder-picker-control_span]:text-ellipsis [&_.folder-picker-control_span]:whitespace-nowrap","[&_.folder-picker-control_.placeholder]:text-muted [&_.folder-picker-icon]:flex-none","[&_.folder-picker-icon]:text-current [&_.folder-picker-chevron]:flex-none","[&_.folder-picker-chevron]:text-muted","[&_.folder-picker-control:hover:not(:disabled)_.folder-picker-chevron]:text-subtext","[&_.folder-picker-hint]:text-subtext [&_.folder-picker-hint]:text-sm","[&_.folder-picker-hint]:font-normal [&_.folder-picker-hint]:leading-[1.4]","[&_.project-location-field]:flex [&_.project-location-field]:flex-col","[&_.project-location-field]:gap-2 [&_.project-location-label]:text-text","[&_.project-location-label]:text-base","[&_.project-location-label]:font-medium [&_.project-field-label]:text-text","[&_.project-field-label]:text-base [&_.project-field-label]:font-medium","[&_.folder-picker-control:disabled]:cursor-default [&_.folder-picker-control:disabled]:opacity-65","[&_.paper-destination]:flex [&_.paper-destination]:items-center","[&_.paper-destination]:gap-2.5 [&_.paper-destination]:pt-2 [&_.paper-destination]:pe-2 [&_.paper-destination]:pb-2 [&_.paper-destination]:ps-3","[&_.paper-destination]:border [&_.paper-destination]:border-border [&_.paper-destination]:rounded-md","[&_.paper-destination]:bg-background [&_.paper-destination_code]:flex-1","[&_.paper-destination_code]:min-w-0 [&_.paper-destination_code]:overflow-hidden","[&_.paper-destination_code]:text-text [&_.paper-destination_code]:text-sm","[&_.paper-destination_code]:font-normal","[&_.paper-destination_code]:text-ellipsis [&_.paper-destination_code]:whitespace-nowrap","[&_.paper-destination_.btn]:flex-none [&_.project-path-notice]:py-[9px] [&_.project-path-notice]:px-[11px]","[&_.project-path-notice]:border [&_.project-path-notice]:border-border-variant","[&_.project-path-notice]:rounded-sm [&_.project-path-notice]:bg-surface","[&_.project-path-notice]:text-base [&_.project-path-notice]:leading-relaxed [&_.project-path-notice]:text-text","[&_.project-path-notice]:leading-[1.4]","[&_.project-path-notice.error]:border-danger-notice-border","[&_.paper-results]:flex [&_.paper-results]:flex-col","[&_.paper-results]:border [&_.paper-results]:border-border [&_.paper-results]:rounded-md","[&_.paper-results]:max-h-60 [&_.paper-results]:overflow-y-auto","[&_.paper-results_button]:flex [&_.paper-results_button]:flex-col","[&_.paper-results_button]:items-start [&_.paper-results_button]:gap-0.5","[&_.paper-results_button]:py-2 [&_.paper-results_button]:px-2.5 [&_.paper-results_button]:bg-none [&_.paper-results_button]:bg-transparent","[&_.paper-results_button]:border-0","[&_.paper-results_button]:border-b [&_.paper-results_button]:border-b-border-variant","[&_.paper-results_button]:text-start [&_.paper-results_button]:[font:inherit]","[&_.paper-results_button]:text-text [&_.paper-results_button]:cursor-pointer","[&_.paper-results_button:last-child]:border-b-0","[&_.paper-results_button:hover]:bg-surface [&_.paper-results_.title]:text-sm","[&_.paper-results_.title]:font-medium","[&_.paper-results_.id]:text-xs [&_.paper-results_.id]:text-muted","[&_.paper-pick_.id]:text-xs","[&_.paper-pick_.id]:text-muted [&_.paper-pick]:flex [&_.paper-pick]:items-center","[&_.paper-pick]:justify-between [&_.paper-pick]:gap-2.5 [&_.paper-pick]:py-2.5 [&_.paper-pick]:px-3","[&_.paper-pick]:border [&_.paper-pick]:border-border [&_.paper-pick]:rounded-md","[&_.paper-pick]:bg-surface [&_.paper-pick_.meta]:min-w-0","[&_.paper-pick_.title]:text-sm [&_.paper-pick_.title]:font-medium","flex flex-col gap-2.5 [&_label]:flex [&_label]:flex-col","[&_label]:gap-1 [&_label]:text-sm [&_label]:text-text","[&_label]:font-medium [&_.row2]:grid [&_.row2]:grid-cols-2","[&_input]:font-sans [&_input]:text-sm [&_input]:font-normal [&_input]:text-text [&_input::placeholder]:text-subtext","[&_select]:font-sans [&_select]:text-sm [&_select]:font-normal [&_select]:text-text","[&_.row2]:gap-2.5 [&_.actions]:flex [&_.actions]:justify-end","[&_.actions]:gap-2.5 [&_.actions]:mt-1.5 [&_.new-project-actions]:justify-start","[&_.new-project-actions]:mt-2.5","[&_.error]:text-accent-red [&_.error]:text-base [&_.error]:whitespace-pre-wrap","settings-form mt-3.5 pt-3.5 border-t border-t-border"].join(" "),Ql=["project-default-row flex items-center justify-between gap-6","pt-3.5 border-t border-t-border-variant [&_p]:mt-[3px] [&_p]:mx-0 [&_p]:mb-0","[&_.project-default-title]:text-base [&_p]:text-sm [&_p]:leading-relaxed [&_p]:text-text"].join(" "),z5=["settings-card [&_>_.error]:text-accent-red [&_>_.error]:text-base","[&_>_.error]:whitespace-pre-wrap bg-background border border-border","rounded-lg mb-4 [&_h3]:mt-0 [&_h3]:mx-0 [&_h3]:mb-2.5 [&_h3]:text-base","[&_h3]:font-semibold [&_h3]:text-text [&_.settings-sub]:mb-3","[&_>_.project-default-row:first-child]:pt-0 [&_>_.project-default-row:first-child]:border-t-0","git-settings-card py-3.5 px-4 [&_h3]:mb-3","[&_.kv]:grid-cols-[132px_minmax(0,_1fr)] [&_.kv]:items-center [&_.kv]:gap-y-[9px] [&_.kv]:gap-x-4.5","[&_.kv_.k]:text-sm [&_.kv_.v]:flex [&_.kv_.v]:items-center","[&_.kv_.v]:flex-wrap [&_.kv_.v]:gap-[7px] [&_.kv_.v]:min-w-0 [&_.kv_.v]:font-sans","[&_.kv_.v]:text-base [&_.kv_.v]:break-normal","[@media((max-width:_640px))]:[&_.kv]:grid-cols-1","[@media((max-width:_640px))]:[&_.kv]:gap-[3px] [@media((max-width:_640px))]:[&_.kv_.v_+_.k]:mt-[7px]"].join(" "),i0=["git-card-actions flex flex-wrap gap-2 mt-3.5 pt-3.5","border-t border-t-border-variant"].join(" "),ed=["settings-stack-section [&_+_.settings-stack-section]:mt-6 [&_>_:last-child]:mb-0","[&_>_h2]:mt-0 [&_>_h2]:mx-0 [&_>_h2]:mb-1.5 [&_>_h2]:text-xl"].join(" "),yzn=new Set(["gh auth login","hf auth login","claude auth status"]);function FF(e){return yzn.has(e)?`/api/settings/commands/run?command=${encodeURIComponent(e)}`:void 0}function by(){const[e,n]=A.useState(null);return{run:e,start:(r,s,i)=>n(a=>({command:r,path:s,owner:i,attempt:((a==null?void 0:a.attempt)??0)+1})),clear:()=>n(null)}}function V6({note:e,className:n,disabled:t,resolve:r=FF,onRun:s}){return e?f.jsx("p",{className:n,children:eh(e,{canRun:i=>!t&&r(i)!==void 0,onRun:i=>{const a=r(i);a&&s(i,a)}})}):null}function yy({run:e,onComplete:n,onClose:t}){return e?f.jsx(byn,{path:e.path,label:e.command,onComplete:n,onError:r=>Vn(r,"error"),onClose:t},`${e.command}-${e.attempt}`):null}function Yw(e){return e.agentReady&&!e.authenticated&&e.authMethod!=="local"?{cls:"warn",variant:"warning",label:TD()}:e.agentReady?{cls:"ok",variant:"success",label:e.authMethod==="local"?Lk():kGt()}:e.installed?e.installBroken?{cls:"warn",variant:"warning",label:CLt()}:e.authMethod==="local"?{cls:"warn",variant:"warning",label:AD()}:e.needsConfigRepair||e.authState==="unknown"?{cls:"warn",variant:"warning",label:a3()}:e.authState==="unsupported"?{cls:"warn",variant:"warning",label:IKt()}:{cls:"warn",variant:"warning",label:JD()}:{cls:"warn",variant:"warning",label:XPt()}}function xzn({h:e}){return e.id==="opencode"&&e.agentReady&&!e.authenticated&&!e.authMethod?f.jsx(f.Fragment,{children:a9t()}):e.authMethod?e.authMethod==="local"?f.jsx(f.Fragment,{children:vv()}):f.jsx(f.Fragment,{children:e.authMethod==="oauth"?dTt():Dk()}):f.jsx(f.Fragment,{children:"—"})}function wzn(e,n,t){if(!n)return;const r=n.installUrl!==void 0&&t.includes(n.installUrl),s=t===n.login?"login":t===n.install?"install":t===n.update?"update":r?"install":null;if(s&&!(s!=="install"&&(!e.installed||e.installBroken)))return`/api/harnesses/setup?${new URLSearchParams({harness:e.id,action:s,shell:"true"})}`}function kzn({remote:e}){const n=bu(),{data:t=null}=ft(n),[r,s]=A.useState(null),[i,a]=A.useState(!1),o=by(),[l,u]=A.useState(null),h=ft(OL()),_=(x,k=!1)=>{a(!0),Xd(x,k).catch(()=>{}).finally(()=>a(!1))},p=[...t??[]].sort((x,k)=>Number(k.agentReady)-Number(x.agentReady)),m=p.find(x=>x.id===r)??p[0];return f.jsxs(f.Fragment,{children:[f.jsx("h2",{children:i3()}),!e&&l&&h.data&&f.jsx(qI,{harness:l,commands:h.data[l.id],onClose:()=>u(null)}),f.jsx("div",{className:"mt-3 mb-3.5 w-fit max-w-full [&_.option-menu]:w-max",children:f.jsx(yu,{variant:"field",dropDown:!0,title:i3(),choices:p.map(x=>({id:x.id,label:x.name})),value:(m==null?void 0:m.id)??null,onSelect:x=>{const k=p.find(v=>v.id===x);k&&s(k.id)},renderIcon:x=>{const k=p.find(v=>v.id===x.id);return k&&f.jsx(w0,{harness:k.id})},renderLabel:x=>{const k=p.find(b=>b.id===x.id),v=k&&Yw(k);return f.jsxs("span",{className:"inline-flex items-center gap-2 whitespace-nowrap",children:[x.label,v&&f.jsxs(f.Fragment,{children:[f.jsx("span",{"aria-hidden":"true",className:`size-1.5 shrink-0 rounded-full bg-muted [&.ok]:bg-accent-green [&.err]:bg-accent-red [&.warn]:bg-accent-amber ${v.cls}`}),f.jsx("span",{className:"sr-only",children:v.label})]})]})}})}),t?m?f.jsxs("div",{className:Qo,children:[f.jsxs("div",{className:"settings-card-head flex items-center gap-2.5 mb-3",children:[f.jsx(Gt,{variant:Yw(m).variant,children:Yw(m).label}),f.jsx("div",{className:"spacer flex-1"}),!e&&m.installed&&!m.installBroken&&!m.authenticated&&!m.needsConfigRepair&&m.authMethod!=="local"&&m.authMethod!=="apiKey"&&m.authState!=="unsupported"&&f.jsxs(Me,{size:"small",onClick:()=>u(m),disabled:!h.data,"aria-haspopup":"dialog",children:[f.jsx(of,{size:14})," ",wD()]}),f.jsxs(Me,{size:"small",onClick:()=>_(!0,!0),disabled:i,children:[f.jsx(La,{size:12,className:i?"animate-[spin_0.9s_linear_infinite]":""})," ",_m()]})]}),f.jsxs("div",{className:vs(K_,"[&_.v]:text-sm"),children:[f.jsx("span",{className:"k",children:VAt()}),f.jsx("span",{className:"v",children:m.binPath??Pjt()}),f.jsx("span",{className:"k",children:iL()}),f.jsx("span",{className:"v",children:m.version??"—"}),f.jsx("span",{className:"k",children:dAt()}),f.jsx("span",{className:"v",children:f.jsx(xzn,{h:m})}),m.account&&f.jsxs(f.Fragment,{children:[f.jsx("span",{className:"k",children:m.id==="opencode"?qWt():Pk()}),f.jsx("span",{className:"v",children:m.account})]}),m.org&&f.jsxs(f.Fragment,{children:[f.jsx("span",{className:"k",children:cHt()}),f.jsx("span",{className:"v",children:m.org})]}),m.plan&&f.jsxs(f.Fragment,{children:[f.jsx("span",{className:"k",children:uqt()}),f.jsx("span",{className:"v",children:m.plan})]}),f.jsx("span",{className:"k",children:eAt()}),f.jsx("span",{className:"v",children:m.models.length>0?Mzt({count:Jt(m.models.length),models:new Intl.ListFormat(z()).format(m.models.slice(0,4).map(x=>Ne(I1(x))))}):Bk()})]}),f.jsx(V6,{note:m.agentNote,className:vs(Ta,"text-sm"),disabled:e,resolve:x=>{var k;return wzn(m,(k=h.data)==null?void 0:k[m.id],x)??FF(x)},onRun:(x,k)=>o.start(x,k,m.id)}),o.run&&f.jsx("div",{hidden:o.run.owner!==m.id,children:f.jsx(yy,{run:o.run,onComplete:()=>_(!0,!0),onClose:o.clear})}),m.id==="opencode"&&f.jsx(WI,{installed:m.installed})]}):null:f.jsxs(os,{children:[f.jsx(Rt,{})," ",POt()]})]})}function Szn({s:e}){const n=e.preflight;return n.kubectlFound?n.reachable?n.canCreateJobs?f.jsx(Gt,{variant:"success",children:vMt()}):f.jsx(Gt,{variant:"error",children:XBt()}):f.jsx(Gt,{variant:"error",children:ZRt()}):f.jsx(Gt,{variant:"error",children:fIt()})}function Czn({onEditState:e}){var T;const n=vn({mutationFn:o0n}),t=xz(),r=ft(t),s=r.data??null,i=j=>{Qr(t.queryKey,M=>(typeof j=="function"?j(M??null):j)??void 0)},a=s?null:((T=r.error)==null?void 0:T.message)??null,[o,l]=A.useState(""),[u,h]=A.useState(""),[_,p]=A.useState(!1),[m,x]=A.useState(!1),[k,v]=A.useState(null),b=j=>{i(j),l(j.context??""),h(j.namespace)},w=A.useRef(null);A.useEffect(()=>{const j=w.current;w.current=s,s&&(!j||o===(j.context??"")&&u.trim()===j.namespace)&&(l(s.context??""),h(s.namespace??""))},[s,o,u]);const y=s!==null&&o===(s.context??"")&&u.trim()===s.namespace,C=s!==null&&!y;A.useEffect(()=>{e==null||e({dirty:C,saving:_})},[C,_,e]);async function N(){if(!(m||_||!y)){x(!0);try{await rt.fetchQuery({...xz(),staleTime:0})}catch(j){Vn(j instanceof Error?j.message:String(j),"error")}finally{x(!1)}}}async function E(j){if(j.preventDefault(),!(_||m)){p(!0),v(null);try{b(await n.mutateAsync({context:o,namespace:u.trim()}))}catch(M){v(M instanceof Error?M.message:String(M))}finally{p(!1)}}}return f.jsx(f.Fragment,{children:a?f.jsx("p",{className:"m-0 text-sm text-accent-red whitespace-pre-wrap break-words",children:a}):s?f.jsxs(f.Fragment,{children:[f.jsxs("dl",{className:"m-0 flex items-center justify-between gap-4 text-sm",children:[f.jsx("dt",{className:"text-subtext",children:vh()}),f.jsx("dd",{className:"m-0",children:m||_?f.jsx(Gt,{children:sa()}):C?f.jsx(Gt,{children:vD()}):f.jsx(Szn,{s})})]}),y&&!m&&!_&&s.preflight.error&&f.jsx("p",{className:`${vy} break-words`,children:s.preflight.error}),f.jsxs("form",{className:"mt-5 flex flex-col gap-4",onSubmit:E,children:[f.jsxs("label",{className:"flex flex-col gap-2 text-sm font-medium text-subtext",children:[CMt(),f.jsx(yu,{choices:[{id:"",label:s.currentContext?gNt({context:Ne(s.currentContext)}):uNt()},...o&&!s.contexts.includes(o)?[{id:o,label:Kjt({context:Ne(o)})}]:[],...s.contexts.map(j=>({id:j,label:j}))],value:o,variant:"field",dropDown:!0,disabled:_||m,onSelect:l})]}),f.jsxs("label",{className:"flex flex-col gap-2 text-sm font-medium text-subtext",children:[tBt(),f.jsx(as,{type:"text",value:u,disabled:_||m,onChange:j=>h(j.target.value),placeholder:dOt(),autoComplete:"off",spellCheck:!1})]}),k&&f.jsx("p",{className:"m-0 text-sm text-accent-red whitespace-pre-wrap break-words",children:k}),f.jsxs("div",{className:"flex justify-end gap-2",children:[f.jsxs(Me,{type:"button",onClick:()=>void N(),disabled:_||m||!y,children:[f.jsx(La,{size:13})," ",m?sa():cm()]}),f.jsx(Me,{variant:"primary",type:"submit",disabled:_||m||y,children:_?la():Yo()})]})]})]}):f.jsxs(os,{children:[f.jsx(Rt,{})," ",bRt()]})})}function Ezn(){var y;const e=vn({mutationFn:C=>c0n(...C)}),n=wz(),t=ft(n),r=t.data??null,s=C=>{Qr(n.queryKey,N=>(typeof C=="function"?C(N??null):C)??void 0)},[i,a]=A.useState(null),o=i??((y=t.error)==null?void 0:y.message)??null,[l,u]=A.useState(""),[h,_]=A.useState(""),[p,m]=A.useState(!1),x=t.isPending||p,[k,v]=A.useState(!1);async function b(){if(!(x||k)){m(!0),a(null);try{await rt.fetchQuery({...wz(),staleTime:0})}catch(C){a(C instanceof Error?C.message:String(C))}finally{m(!1)}}}async function w(C){if(C.preventDefault(),!(!l.trim()||!h.trim()||x||k||r!=null&&r.processEnv)){v(!0),a(null);try{s(await e.mutateAsync([l.trim(),h.trim()])),u(""),_("")}catch(N){a(N instanceof Error?N.message:String(N))}finally{v(!1)}}}return f.jsxs(f.Fragment,{children:[!r&&x?f.jsxs(os,{children:[f.jsx(Rt,{})," ",ERt()]}):r&&f.jsxs("dl",{className:"m-0 flex items-center justify-between gap-4 text-sm",children:[f.jsx("dt",{className:"font-medium text-subtext",children:vh()}),f.jsx("dd",{className:"m-0",children:f.jsx(Gt,{variant:r.tokenConfigured?"success":"warning",children:r.tokenConfigured?Hk():vb()})})]}),(r==null?void 0:r.processEnv)&&f.jsx("p",{className:"mt-2 mb-0 text-sm text-subtext",children:GNt()}),f.jsxs("form",{className:"mt-5 flex flex-col gap-4",onSubmit:w,children:[f.jsxs("label",{className:"flex flex-col gap-2 text-sm font-medium text-subtext",children:[r!=null&&r.tokenConfigured?ZNt():bzt(),f.jsx(as,{type:"password",value:l,onChange:C=>u(C.target.value),placeholder:(r==null?void 0:r.maskedTokenId)??"ak-…",autoComplete:"new-password",disabled:r==null?void 0:r.processEnv})]}),f.jsxs("label",{className:"flex flex-col gap-2 text-sm font-medium text-subtext",children:[r!=null&&r.tokenConfigured?izt():Ezt(),f.jsx(as,{type:"password",value:h,onChange:C=>_(C.target.value),placeholder:(r==null?void 0:r.maskedTokenSecret)??"as-…",autoComplete:"new-password",disabled:r==null?void 0:r.processEnv})]}),f.jsx("a",{className:"self-start text-sm text-subtext underline",href:"https://modal.com/docs/sdk/py/latest/config",target:"_blank",rel:"noreferrer",children:fzt()}),o&&f.jsx("p",{className:"m-0 text-sm text-accent-red",children:o}),f.jsxs("div",{className:"flex justify-end gap-2",children:[f.jsxs(Me,{type:"button",disabled:x||k,onClick:()=>void b(),children:[f.jsx(La,{size:13})," ",_m()]}),f.jsx(Me,{variant:"primary",type:"submit",disabled:!l.trim()||!h.trim()||x||k||(r==null?void 0:r.processEnv),children:k?la():Yo()})]})]})]})}const HF="rounded-sm border-border-strong bg-surface text-subtext",qF="rounded-sm border-accent-blue bg-accent-blue-subtle text-accent-blue",Nzn=5e3;function UF(e){const n=Ra(),t=e.map(a=>kz(a)),r=SV({queries:t.map(a=>({...a,refetchInterval:Nzn}))});return[Object.fromEntries(e.flatMap((a,o)=>r[o].data?[[a,r[o].data.running]]:[])),a=>{$n(n)&&Qr(kz(a).queryKey,{running:!0})}]}function zzn({test:e,connecting:n,masterRunning:t}){if(n)return f.jsx("span",{role:"status",children:f.jsx(Gt,{className:qF,children:qD()})});if(e===void 0)return f.jsx(Gt,{className:HF,children:ZD()});const r=e.missingTools??[],s=e.reachable&&e.toolsFound&&t===!1,i=e.reachable?e.toolsFound?s?f.jsx(Gt,{className:"rounded-sm",variant:"warning",children:UD()}):f.jsx(Gt,{className:"rounded-sm",variant:"success",children:um()}):f.jsx(Gt,{className:"rounded-sm",variant:"error",children:r.length===1?Pzt({tool:Ne(r[0])}):Kzt()}):f.jsx(Gt,{className:"rounded-sm",variant:"error",children:Fk()});return f.jsxs("div",{className:"flex items-center gap-4",role:"status",children:[i,!s&&f.jsx("span",{className:"ssh-tested-at whitespace-nowrap text-xs text-subtext",children:Vo(e.testedAt)})]})}function jzn({remote:e=!1}){const n=ML(),t=ft(n),r=t.data??(t.isError?[]:null),[s,i]=A.useState(!1),[a,o]=A.useState({}),[l,u]=A.useState({}),[h,_]=A.useState(null),[p,m]=A.useState(!1),[x,k]=A.useState(0),v=e?[]:(r==null?void 0:r.filter(E=>{const T=a[E.host]??E.lastTest;return(T==null?void 0:T.reachable)&&T.toolsFound}).map(E=>E.host))??[],[b,w]=UF(v);function y(E){m(!1),k(T=>T+1),_(E),u(T=>({...T,[E]:!0}))}function C(){m(!1),_(null)}function N(E,T){u(j=>({...j,[E]:!T}))}return f.jsxs(f.Fragment,{children:[f.jsx("div",{className:"mb-3 flex justify-end",children:f.jsxs(Me,{variant:"ghost",onClick:()=>i(!0),children:[f.jsx(sS,{size:14})," ",_L()]})}),r===null?f.jsxs(os,{children:[f.jsx(Rt,{})," ",tL()]}):r.length===0?f.jsx("p",{className:"settings-empty mt-1 mx-0 mb-0 text-base text-subtext",children:qBt()}):f.jsx("div",{className:"border-y border-border-variant divide-y divide-border-variant",children:r.map(E=>{const T=a[E.host]??E.lastTest,j=h===E.host,M=l[E.host]??!1,D=!e&&(j||(T==null?void 0:T.reachable)===!1),I=`${E.user?`${E.user}@`:""}${E.hostname??E.host}${E.port?`:${E.port}`:""}`;return f.jsxs("div",{children:[f.jsxs("div",{className:"flex items-center gap-3 py-3 px-2",children:[f.jsxs("div",{className:"flex min-w-0 flex-1 items-center gap-2.5",children:[D?f.jsx("button",{type:"button",className:"flex-none inline-flex items-center p-0.5 rounded-sm [&:hover]:bg-panel","aria-expanded":M,"aria-label":M?DQ({name:Ne(E.host)}):xX({name:Ne(E.host)}),onClick:P=>{P.stopPropagation(),N(E.host,M)},children:f.jsx(Zo,{size:15,className:`text-muted transition-transform duration-120 ease-standard${M?" rotate-180":""}`})}):f.jsx("span",{className:"w-5 flex-none","aria-hidden":"true"}),f.jsxs("div",{className:"min-w-0",children:[f.jsx("div",{className:"truncate text-base font-medium text-text",title:E.host,children:E.host}),f.jsx("div",{className:"mt-1 truncate text-sm text-subtext",title:I,children:I})]})]}),!e&&f.jsxs("div",{className:"grid flex-none grid-cols-[8.5rem_5rem] items-center gap-x-12",children:[f.jsx("div",{className:"text-start",children:f.jsx(zzn,{test:T,connecting:j&&!p,masterRunning:b[E.host]})}),f.jsx(Me,{size:"small",type:"button",className:"justify-self-end",onClick:P=>{P.stopPropagation(),j&&!p?C():y(E.host)},disabled:!j&&h!==null&&!p,children:j?p?Vs():P_():(T==null?void 0:T.reachable)===!1?Vs():T?aL():Ik()})]})]}),D&&(M||j)&&f.jsxs("div",{className:`border-t border-t-border-variant py-3 pe-2 ps-10${M?"":" hidden"}`,children:[!j&&(T==null?void 0:T.error)&&f.jsx(yyn,{host:E.host,transcript:T.error}),j&&f.jsx(lS,{host:E.host,backend:"ssh",active:M,onComplete:P=>{P.backend==="ssh"&&(o(U=>({...U,[E.host]:P.result})),w(E.host),m(!1),_(null))},onError:P=>{m(!0),o(U=>({...U,[E.host]:{reachable:!1,toolsFound:!1,missingTools:[],error:P,testedAt:Date.now()}}))}},x)]})]},E.host)})}),s&&f.jsx(b$,{onClose:()=>i(!1)})]})}function Tzn({test:e,connecting:n,masterRunning:t}){return n?f.jsx(Gt,{className:qF,children:qD()}):e===null?f.jsx(Gt,{className:HF,children:ZD()}):e.reachable?e.slurmFound?e.toolsFound?t===!1?f.jsx(Gt,{className:"rounded-sm",variant:"warning",children:UD()}):f.jsx(Gt,{className:"rounded-sm",variant:"success",children:um()}):f.jsx(Gt,{className:"rounded-sm",variant:"error",children:N$t()}):f.jsx(Gt,{className:"rounded-sm",variant:"error",children:SPt()}):f.jsx(Gt,{className:"rounded-sm",variant:"error",children:Fk()})}function Azn({remote:e=!1}){var $;const n=vn({mutationFn:E0n}),t=jmn(),r=ft(t),s=r.data??null,i=L=>{Qr(t.queryKey,F=>(typeof L=="function"?L(F??null):L)??void 0)},a=s?null:(($=r.error)==null?void 0:$.message)??null,[o,l]=A.useState(""),[u,h]=A.useState(""),[_,p]=A.useState(""),[m,x]=A.useState(""),[k,v]=A.useState(!1),[b,w]=A.useState(null),[y,C]=A.useState(null),[N,E]=A.useState(!1),[T,j]=A.useState(!1),[M,D]=A.useState(0),I=!e&&o&&(y!=null&&y.reachable)&&y.slurmFound&&y.toolsFound?[o]:[],[P,U]=UF(I);function q(){j(!1),D(L=>L+1),E(!0)}const W=L=>{i(L),l(L.host??""),h(L.partition??""),p(L.account??""),x(L.timeLimit??"")},H=A.useRef(null);A.useEffect(()=>{const L=H.current;H.current=s,s&&(!L||o===(L.host??"")&&u.trim()===(L.partition??"")&&_.trim()===(L.account??"")&&m.trim()===(L.timeLimit??""))&&(l(s.host??""),h(s.partition??""),p(s.account??""),x(s.timeLimit??""))},[s,o,u,_,m]);const Y=s!==null&&o===(s.host??"")&&u.trim()===(s.partition??"")&&_.trim()===(s.account??"")&&m.trim()===(s.timeLimit??"");async function te(L){if(L.preventDefault(),!k){v(!0),w(null);try{W(await n.mutateAsync({host:o,partition:u.trim(),account:_.trim(),timeLimit:m.trim()}))}catch(F){w(F instanceof Error?F.message:String(F))}finally{v(!1)}}}return f.jsx(f.Fragment,{children:a?f.jsx("div",{className:"error",children:a}):s?f.jsxs(f.Fragment,{children:[!N&&(y==null?void 0:y.error)&&f.jsx("p",{className:vy,children:y.error}),f.jsxs("form",{className:G6,onSubmit:te,children:[f.jsx("div",{className:"max-w-xl",children:f.jsxs("label",{children:[d$t(),f.jsx(yu,{choices:[{id:"",label:gFt()},...o&&!s.hosts.some(L=>L.host===o)?[{id:o,label:`${o} (not in ~/.ssh/config)`}]:[],...s.hosts.map(L=>({id:L.host,label:L.host}))],value:o,variant:"field",dropDown:!0,disabled:k||N,onSelect:L=>{l(L),C(null),E(!1),j(!1)}})]})}),f.jsxs("div",{className:"actions",children:[!e&&f.jsx(Me,{type:"button",onClick:()=>{N&&!T?(j(!1),E(!1)):q()},disabled:!o,title:o?void 0:LWt(),children:N?T?Vs():P_():y?aL():Ik()}),f.jsx("span",{role:"status",children:f.jsx(Tzn,{test:y,connecting:N&&!T,masterRunning:P[o]})})]}),f.jsxs("div",{className:"mt-5 border-t border-border pt-5",children:[f.jsxs("div",{className:"row2",children:[f.jsxs("label",{children:[XHt(),f.jsx(as,{type:"text",list:"slurm-partitions",value:u,onChange:L=>h(L.target.value),placeholder:oz(),autoComplete:"off",spellCheck:!1}),f.jsx("datalist",{id:"slurm-partitions",children:y==null?void 0:y.partitions.map(L=>f.jsx("option",{value:L},L))})]}),f.jsxs("label",{children:[Pk(),f.jsx(as,{type:"text",value:_,onChange:L=>p(L.target.value),placeholder:oz(),autoComplete:"off",spellCheck:!1})]})]}),f.jsxs("label",{className:"mt-3 block max-w-xl",children:[vKt(),f.jsx(as,{type:"text",value:m,onChange:L=>x(L.target.value),placeholder:GRt(),autoComplete:"off",spellCheck:!1})]})]}),b&&f.jsx("div",{className:"error",children:b}),f.jsx("div",{className:"actions",children:f.jsx(Me,{variant:"primary",type:"submit",disabled:k||Y||N,children:k?la():Yo()})})]}),!e&&N&&f.jsx(lS,{host:o,backend:"slurm",onComplete:L=>{L.backend==="slurm"&&(C(L.result),U(o),j(!1),E(!1))},onError:L=>{j(!0),C({reachable:!1,slurmFound:!1,toolsFound:!1,partitions:[],error:L})}},M)]}):f.jsxs(os,{children:[f.jsx(Rt,{})," ",BIt()]})})}function Rzn(){var C;const e=vn({mutationFn:z0n}),n=Tmn(),t=ft(n),r=t.data??null,s=N=>{Qr(n.queryKey,E=>(typeof N=="function"?N(E??null):N)??void 0)},i=r?null:((C=t.error)==null?void 0:C.message)??null,[a,o]=A.useState(""),[l,u]=A.useState(!1),[h,_]=A.useState(null),[p,m]=A.useState(null),x=p!==null&&p!=="testing"?p:null,k=N=>{s(N),o(N.address??"")},v=A.useRef(null);A.useEffect(()=>{const N=v.current;v.current=r,r&&(!N||a===(N.address??""))&&o(r.address??"")},[r,a]);const b=r!==null&&a===(r.address??"");async function w(N){if(N.preventDefault(),!l){u(!0),_(null);try{k(await e.mutateAsync({address:a}))}catch(E){_(E instanceof Error?E.message:String(E))}finally{u(!1)}}}async function y(){m("testing");try{m(await j0n(a.trim()||void 0))}catch(N){m({reachable:!1,address:a.trim()||"(unknown)",rayVersion:null,error:N instanceof Error?N.message:String(N)})}}return f.jsx(f.Fragment,{children:i?f.jsx("div",{className:"error",children:i}):r?f.jsxs(f.Fragment,{children:[(x==null?void 0:x.error)&&f.jsx("p",{className:vy,children:x.error}),f.jsxs("form",{className:G6,onSubmit:w,children:[f.jsxs("label",{children:[iIt(),f.jsx(as,{type:"text",value:a,onChange:N=>{o(N.target.value),m(null)},placeholder:"http://127.0.0.1:8265",autoComplete:"off",spellCheck:!1})]}),f.jsxs("p",{className:"m-0 text-sm text-subtext",children:[eDt(),": ",Ne(r.resolvedAddress)," · ",nL(),": ",r.source]}),h&&f.jsx("div",{className:"error",children:h}),f.jsxs("div",{className:"actions",children:[f.jsx(Me,{variant:"primary",type:"submit",disabled:l||b,children:l?la():Yo()}),f.jsx(Me,{type:"button",onClick:()=>void y(),disabled:p==="testing",children:TVt()}),f.jsx(Mzn,{test:p})]}),(x==null?void 0:x.reachable)&&x.rayVersion&&f.jsxs("p",{className:"m-0 text-sm text-subtext",children:[Sqt(),": ",x.rayVersion]})]})]}):f.jsxs(os,{children:[f.jsx(Rt,{})," ",RIt()]})})}function Mzn({test:e}){return e===null?null:e==="testing"?f.jsx(Gt,{children:IVt()}):e.reachable?f.jsx(Gt,{variant:"success",children:Aqt()}):f.jsx(Gt,{variant:"error",children:Fk()})}function Ozn(e){const n=e.chip??`${e.os}/${e.arch}`,t=e.memBytes===null?null:Kl(e.memBytes),r=e.gpus.length===0?null:F9t({count:e.gpus.length});return[n,e.cpuCount>0?d8t({count:e.cpuCount}):null,t,r].filter(Boolean).join(" · ")}function Dzn({remote:e}){var p;const n=ft(Rmn()),t=n.data,r=(p=n.error)==null?void 0:p.message,s=n.isFetching,[i,a]=A.useState(0),[o,l]=A.useState(!0),[u,h]=A.useState(!1),_=()=>n.refetch();return f.jsxs(f.Fragment,{children:[r&&!t?f.jsx("div",{className:"error",children:r}):f.jsxs(f.Fragment,{children:[f.jsxs("div",{className:bzn,children:[f.jsx("span",{className:"k",children:vh()}),f.jsx("span",{className:"v",children:!t&&s||u?f.jsxs(Gt,{className:"gap-1.5",role:"status",children:[f.jsx(Rt,{}),u?NTt():sa()]}):r?f.jsx(Gt,{variant:"warning",children:a3()}):t?t.loggedIn?t.sshKeyStatus==="matched"?f.jsx(Gt,{variant:"success",children:um()}):t.sshKeyStatus==="unknown"?f.jsx(Gt,{variant:"warning",children:a3()}):f.jsx(Gt,{variant:"warning",children:vb()}):f.jsx(Gt,{variant:"warning",children:JD()}):null}),f.jsx("span",{className:"k",children:mHt()}),f.jsx("span",{className:"v",children:t!=null&&t.loggedIn&&t.orgs.length>0?t.orgs.join(", "):"—"}),f.jsx("span",{className:"k",children:LGt()}),f.jsx("span",{className:"v",children:t!=null&&t.loggedIn?t.sshKeyStatus==="matched"?f.jsx(Gt,{variant:"success",children:TFt()}):t.sshKeyStatus==="no_local_match"?f.jsx(Gt,{variant:"warning",children:uFt()}):t.sshKeyStatus==="none_registered"?f.jsx(Gt,{variant:"error",children:APt()}):f.jsx(Gt,{children:rL()}):"—"})]}),e&&t&&!t.loggedIn&&f.jsx("p",{className:"mt-4 mb-0 text-sm text-subtext",children:ANt({command:Ne("orx login")})}),!e&&i>0&&f.jsx(vyn,{login:o,onComplete:()=>{h(!1),a(0),_()},onError:m=>{h(!1),Vn(m,"error")}},i),e&&(t==null?void 0:t.loggedIn)&&t.sshKeyStatus==="none_registered"&&(t.sshKeyPath?f.jsxs("p",{dir:"auto",className:Ta,children:[PTt()," ",f.jsxs("code",{children:["orx ssh-key add ",t.sshKeyPath]}),"."]}):f.jsxs("p",{dir:"auto",className:Ta,children:[gPt()," ",f.jsx("code",{children:"ssh-keygen -t ed25519"}),UVt()," ",f.jsx("code",{children:"orx ssh-key add"}),"."]})),e&&(t==null?void 0:t.loggedIn)&&t.sshKeyStatus==="no_local_match"&&(t.sshKeyPath?f.jsx("p",{dir:"auto",className:Ta,children:nQt({register:Ne(`orx ssh-key add ${t.sshKeyPath}`),load:Ne("ssh-add")})}):f.jsxs("p",{dir:"auto",className:Ta,children:[uPt()," ",f.jsx("code",{children:"ssh-add"}),nHt()," ",f.jsx("code",{children:"ssh-keygen -t ed25519"}),"."]})),!s&&(r||(t==null?void 0:t.error))&&f.jsx("p",{dir:"auto",className:"mt-4 mb-0 text-sm text-accent-red whitespace-pre-wrap break-words",children:r||(t==null?void 0:t.error)})]}),f.jsxs("div",{className:"mt-4 flex justify-end gap-2",children:[f.jsxs(Me,{onClick:()=>void _(),disabled:s||u,children:[f.jsx(La,{size:13})," ",s?sa():cm()]}),!e&&t&&(!t.loggedIn||t.sshKeyStatus!=="matched")&&f.jsxs(Me,{variant:"primary",disabled:s||u,onClick:()=>{l(!t.loggedIn),h(!0),a(m=>m+1)},children:[u?f.jsx(Rt,{}):f.jsx(of,{size:13})," ",t.loggedIn?UXt():oL()]})]})]})}const Lzn={local:xNe,ssh:nze,tinker:cze,hf:oNe,modal:zNe,k8s:hNe,slurm:QNe,ray:HNe,openresearch:DNe},xy={local:"local_job",tinker:"tinker_job",hf:"hf_job",modal:"modal_job",k8s:"k8s_job",ssh:"ssh_job",slurm:"slurm_job",ray:"ray_job",openresearch:"openresearch_job"},UA=["hf","modal","slurm","ray","openresearch"],Zw=["hf","modal","openresearch"],GF={hf:["cpu-basic","t4-small","a10g-small","a10g-large","a100-large","h100","h200"],modal:["cpu","t4","l4","a10g","a100","a100-80gb","l40s","h100","h100:2"],slurm:["gpu","h100:1","h100:2","a100:4"],ray:["cpu","cpu:2","gpu","gpu:1","gpu:1,cpu:4","gpu:1,mem:8GiB"],openresearch:["h100_sxm","h100_sxm:2","cpu5c","cpu5g","cpu5m"]},j5=["tinker","hf","modal","ray","k8s"],Izn={tinker:Gje,hf:Sje,modal:Aje,openresearch:$je},GA="__custom__";function Mp(e,n){return!!(n&&!(GF[e]??[]).includes(n))}function $zn({settings:e,projectId:n,onSaved:t}){const r=vn({mutationFn:A0n}),s=e.configuredDefaultBackend??e.defaultBackend??"local",i=e.defaultFlavor??"",[a,o]=A.useState(s),[l,u]=A.useState(i),[h,_]=A.useState(Mp(s,i)),[p,m]=A.useState(!1),[x,k]=A.useState(null),v=e.targets.find(P=>P.id===a),b=e.targets.filter(P=>P.configured||P.id===s),w=UA.includes(a),y=Zw.includes(a),C=GF[a]??[],N=a===s&&(!w||l.trim()===i),E=G_[a](),T=Izn[a],j=p?YZt():y&&!l.trim()?F7t({destination:E}):a==="ssh"?ojt():ejt({destination:E});A.useEffect(()=>{o(s),u(i),_(Mp(s,i))},[s,i]);async function M(P,U){const q=UA.includes(P);if(!(p||Zw.includes(P)&&!U.trim())){m(!0),k(null);try{t(await r.mutateAsync({backend:P,flavor:q&&U.trim()||null,projectId:n}))}catch(W){k(W instanceof Error?W.message:String(W)),o(s),u(i),_(Mp(s,i))}finally{m(!1)}}}function D(P){const U=e.targets.find(W=>W.id===P);if(!U)return;o(U.id);const q=U.id===s?i:"";u(q),_(Mp(U.id,q)),Zw.includes(U.id)||M(U.id,q)}function I(P){if(P===GA){_(!0);return}_(!1),u(P),(!y||P)&&M(a,P)}return f.jsxs("section",{className:"mb-8",children:[f.jsx("h2",{className:"mt-0 mx-0 mb-2 text-lg",children:EOt()}),f.jsxs("div",{children:[f.jsxs("form",{className:"grid grid-cols-[minmax(12rem,18rem)_minmax(12rem,18rem)] items-start gap-3",onSubmit:P=>{P.preventDefault(),N||M(a,l)},children:[f.jsx(yu,{choices:b.map(P=>({id:P.id,label:G_[P.id]()})),value:a,variant:"field",dropDown:!0,disabled:p,renderIcon:P=>{const U=e.targets.find(q=>q.id===P.id);return U?f.jsx(xh,{kind:xy[U.id],size:16}):null},onSelect:D}),w&&f.jsx("div",{children:h?f.jsxs("div",{className:"relative",children:[f.jsx("input",{className:"h-9 w-full rounded-md border border-border bg-background py-0 pe-10 ps-3 font-sans text-sm text-text outline-none focus:border-text",type:"text",value:l,onChange:P=>u(P.target.value),onBlur:()=>{if(y&&!l.trim()){a===s&&(u(i),_(Mp(s,i)));return}N||M(a,l)},placeholder:VMt(),autoFocus:!0,autoComplete:"off",spellCheck:!1,disabled:p}),f.jsx("button",{type:"button",className:"absolute inset-y-0 end-0 inline-flex w-9 items-center justify-center text-muted hover:text-text","aria-label":az(),title:az(),onMouseDown:P=>P.preventDefault(),onClick:()=>_(!1),children:f.jsx(Zo,{size:12})})]}):f.jsx(yu,{choices:[{id:"",label:y?O7t():xjt()},...l&&!C.includes(l)?[{id:l,label:O8t({value:Ne(l)})}]:[],...C.map(P=>({id:P,label:P})),{id:GA,label:JMt()}],value:l,variant:"field",dropDown:!0,disabled:p,onSelect:I})})]}),x&&f.jsx("div",{className:"error mt-2.5",children:x}),v&&!v.configured&&f.jsx("p",{className:Ta,children:sKt()})]}),f.jsx("p",{className:"mt-2 mb-0 text-sm leading-relaxed text-subtext",children:j}),T&&f.jsx("p",{className:"mt-1 mb-0 text-sm leading-relaxed text-subtext",children:T()})]})}function Bzn({target:e,isDefault:n,summary:t,onOpen:r,onOpenEnvironment:s}){const i=`compute-${e.id}-summary`,a=e.unverified?y7t():e.id==="openresearch"?oL():e.id==="ray"?Ik():IXt();return f.jsxs("div",{className:`group relative flex min-h-41 w-full flex-col items-start rounded-lg border border-border bg-background p-5 text-start font-sans ${r&&e.enabled?"transition-colors duration-120 ease-standard hover:border-text hover:bg-surface":""} ${e.enabled?"":"opacity-52"}`,children:[r&&f.jsx("button",{type:"button",className:"absolute inset-0 z-10 rounded-lg focus-visible:outline-2 focus-visible:outline-text focus-visible:outline-offset-2 disabled:cursor-default",onClick:r,disabled:!e.enabled,"aria-label":G_[e.id](),"aria-describedby":i,"aria-haspopup":j5.includes(e.id)?"dialog":void 0}),f.jsx("span",{className:"flex h-16 w-40 flex-none items-center justify-start",children:f.jsx(xh,{kind:xy[e.id],size:48})}),f.jsx("span",{className:"mt-5 text-lg font-semibold text-text",children:G_[e.id]()}),f.jsx("span",{className:"mt-1 line-clamp-2 min-h-9 text-sm leading-normal text-text",children:Lzn[e.id]()}),f.jsx("span",{id:i,className:"mt-2 line-clamp-2 min-h-8 text-xs leading-normal text-subtext",children:e.fromEnvironmentTab?f.jsxs(f.Fragment,{children:[e.id==="tinker"?rNt():kZt()," ",f.jsx("button",{type:"button",className:"relative z-20 text-primary underline-offset-2 hover:text-primary-hover hover:underline",onClick:s,children:J8t()})]}):t??e.summary}),f.jsxs("span",{className:"mt-auto flex w-full items-center justify-between gap-3 pt-3 text-sm",children:[f.jsx("span",{className:n?"font-medium text-primary":"text-subtext",children:n?QD():e.configured?!r||j5.includes(e.id)?Hk():gJt():a}),r&&f.jsx("span",{className:"text-subtext transition-transform duration-120 ease-standard group-hover:translate-x-0.5","aria-hidden":"true",children:f.jsx(B1,{size:16})})]})]})}function Pzn({target:e,isDefault:n,onBack:t,remote:r}){return f.jsxs(f.Fragment,{children:[f.jsxs("button",{type:"button",className:"settings-back mb-6 inline-flex items-center gap-2 text-sm font-medium text-subtext hover:text-text",onClick:t,children:[f.jsx(b0,{size:16})," ",KD()]}),f.jsxs("div",{className:"flex items-center justify-between gap-6",children:[f.jsxs("div",{className:"flex min-w-0 items-center gap-3",children:[f.jsx("span",{className:"flex h-10 w-10 flex-none items-center justify-center",children:f.jsx(xh,{kind:xy[e.id],size:36})}),f.jsx("h1",{className:"m-0 min-w-0 text-2xl",children:G_[e.id]()})]}),n&&f.jsx(Gt,{className:"flex-none border-primary bg-primary-subtle text-primary",children:QD()})]}),f.jsxs("div",{className:"mt-6 font-sans text-base text-text [&_.settings-card]:mb-0 [&_.settings-form]:mt-6 [&_.settings-form]:border-t-0 [&_.settings-form]:pt-0 [&>.settings-form:first-child]:mt-0 [&>div:first-child]:border-t-0",children:[e.id==="ssh"&&f.jsx(jzn,{remote:r}),e.id==="slurm"&&f.jsx(Azn,{remote:r}),e.id==="openresearch"&&f.jsx(Dzn,{remote:r})]})]})}function Fzn({target:e,remote:n,onClose:t}){const r=A.useRef(null),[s,i]=A.useState({dirty:!1,saving:!1});A.useEffect(()=>{const o=r.current;return o==null||o.showModal(),()=>o==null?void 0:o.close()},[]);const a=()=>{s.saving||s.dirty&&!window.confirm(XEt())||t()};return f.jsxs("dialog",{ref:r,className:"m-auto w-140 max-w-[calc(100vw_-_40px)] max-h-[calc(100vh_-_40px)] overflow-y-auto rounded-xl border border-border bg-background p-5 text-text shadow-modal backdrop:bg-modal-backdrop-light","aria-labelledby":"compute-quick-setup-title",onKeyDown:o=>{o.key==="Escape"&&(o.preventDefault(),a())},onCancel:o=>{o.preventDefault(),a()},children:[f.jsxs("div",{className:"mb-5 flex items-center justify-between gap-4",children:[f.jsxs("div",{className:"flex min-w-0 items-center gap-3",children:[f.jsx(xh,{kind:xy[e.id],size:32}),f.jsx("h2",{id:"compute-quick-setup-title",className:"m-0 text-xl font-medium text-text",children:G_[e.id]()})]}),f.jsx(Ft,{title:p0(),"aria-label":p0(),onClick:a,disabled:s.saving,children:f.jsx(_r,{size:14})})]}),e.id==="tinker"&&f.jsx(qzn,{target:e}),e.id==="hf"&&f.jsx(Gzn,{remote:n}),e.id==="modal"&&f.jsx(Ezn,{}),e.id==="ray"&&f.jsx(Rzn,{}),e.id==="k8s"&&f.jsx(Czn,{onEditState:i})]})}function Hzn({project:e,onViewHistory:n,onOpenEnvironment:t,remote:r}){var M,D;const s=RL(e==null?void 0:e.id),i=ft(s),a=i.data??null,o=I=>{Qr(s.queryKey,P=>(typeof I=="function"?I(P??null):I)??void 0)},l=a?null:((M=i.error)==null?void 0:M.message)??null,[u,h]=A.useState(null),[_,p]=A.useState(null),m=Amn(),x=ft(m),k=x.data??null,v=((D=x.error)==null?void 0:D.message)??null;A.useEffect(()=>{h(null),p(null)},[e==null?void 0:e.id]);const b=I=>{o(I),p(null)},w=a?a.targets:null,y=(a==null?void 0:a.configuredDefaultBackend)??(a==null?void 0:a.defaultBackend),C=w?[...w].sort((I,P)=>+(P.id===y)-+(I.id===y)):null,N=(C==null?void 0:C.filter(I=>I.configured))??[],E=(C==null?void 0:C.filter(I=>!I.configured))??[],T=I=>f.jsx(Bzn,{target:I,isDefault:y===I.id,summary:I.id==="local"?k?Ozn(k):v??MOt():void 0,onOpen:I.id==="local"?void 0:()=>h(I.id),onOpenEnvironment:t},`${(e==null?void 0:e.id)??"none"}:${I.id}`),j=u?a==null?void 0:a.targets.find(I=>I.id===u):null;return j&&!j5.includes(j.id)?f.jsx(Pzn,{target:j,isDefault:y===j.id,onBack:()=>h(null),remote:r}):f.jsxs(f.Fragment,{children:[f.jsx("h1",{children:WD()}),f.jsx("p",{className:"settings-sub mt-0 mx-0 mb-4.5 text-base leading-relaxed text-text",children:_Mt()}),f.jsx(ljn,{projectId:e==null?void 0:e.id,onViewHistory:n}),l?f.jsx("div",{className:"error",children:l}):a?f.jsxs(f.Fragment,{children:[_&&f.jsx("div",{className:"error",children:_}),f.jsx($zn,{settings:a,projectId:e==null?void 0:e.id,onSaved:b}),f.jsxs("section",{className:"mb-8",children:[f.jsx("h2",{className:"mt-0 mx-0 mb-2 text-lg",children:Hk()}),f.jsx("div",{className:"grid grid-cols-1 gap-4 sm:grid-cols-2 lg:grid-cols-3",children:N.map(T)})]}),E.length>0&&f.jsxs("section",{className:"mb-3.5",children:[f.jsx("h2",{className:"mt-0 mx-0 mb-2 text-lg",children:O$t()}),f.jsx("div",{className:"grid grid-cols-1 gap-4 sm:grid-cols-2 lg:grid-cols-3",children:E.map(T)})]}),j&&f.jsx(Fzn,{target:j,remote:r,onClose:()=>h(null)})]}):f.jsxs(os,{children:[f.jsx(Rt,{})," ",fRt()]})]})}function qzn({target:e}){var w;const n=vn({mutationFn:e0n}),[t,r]=A.useState(""),[s,i]=A.useState(!1),[a,o]=A.useState(null),l=yz(),u=ft(l),h=u.data??null,_=a??((w=u.error)==null?void 0:w.message)??null,p=y=>{Qr(l.queryKey,C=>(typeof y=="function"?y(C??null):y)??void 0)},[m,x]=A.useState(!1),k=u.isPending||m;async function v(){if(!(k||s)){x(!0),o(null);try{await rt.fetchQuery({...yz(),staleTime:0})}catch(y){o(y instanceof Error?y.message:String(y))}finally{x(!1)}}}async function b(y){if(y.preventDefault(),!(!t.trim()||s||k)){i(!0),o(null);try{p(await n.mutateAsync(t.trim())),r("")}catch(C){o(C instanceof Error?C.message:String(C))}finally{i(!1)}}}return f.jsxs(f.Fragment,{children:[!h&&k?f.jsxs(os,{children:[f.jsx(Rt,{})," ",sa()]}):h&&f.jsxs("dl",{className:"m-0 flex items-center justify-between gap-4 text-sm",children:[f.jsx("dt",{className:"font-medium text-subtext",children:vh()}),f.jsx("dd",{className:"m-0",children:f.jsx(Gt,{variant:h.validationStatus==="valid"?"success":h.validationStatus==="invalid"?"error":"warning",children:h.validationStatus==="valid"?um():h.validationStatus==="invalid"?mZt():h.validationStatus==="billingRequired"?nZt():vb()})})]}),(h==null?void 0:h.validationStatus)==="billingRequired"&&f.jsx("p",{className:"mt-2 mb-0 text-sm text-subtext",children:f.jsx("a",{className:"underline",href:"https://tinker.thinkingmachines.ai/",target:"_blank",rel:"noreferrer",children:QYt()})}),(h==null?void 0:h.processEnv)&&f.jsx("p",{className:"mt-2 mb-0 text-sm text-subtext",children:cZt()}),f.jsxs("form",{className:"mt-5 flex flex-col gap-4",onSubmit:b,children:[f.jsxs("label",{className:"flex flex-col gap-2 text-sm font-medium text-subtext",children:[e.configured||h!==null&&h.validationStatus!=="missing"?XQt():Dk(),f.jsx(as,{type:"password",value:t,placeholder:(h==null?void 0:h.maskedKey)??"",onChange:y=>r(y.target.value),autoComplete:"new-password"})]}),_&&f.jsx("p",{className:"m-0 text-sm text-accent-red",children:_}),f.jsxs("div",{className:"flex justify-end gap-2",children:[f.jsxs(Me,{type:"button",disabled:s||k,onClick:()=>void v(),children:[f.jsx(La,{size:13})," ",k?sa():cm()]}),f.jsx(Me,{variant:"primary",type:"submit",disabled:!t.trim()||s||k,children:s?cL():Yo()})]})]})]})}function Uzn({settings:e}){return e.validationStatus==="missing"?f.jsx(Gt,{variant:"warning",children:vb()}):e.validationStatus==="invalid"?f.jsx(Gt,{variant:"error",children:ZLt()}):e.validationStatus!=="valid"?null:e.jobsWrite===!0?f.jsx(Gt,{variant:"success",children:um()}):e.jobsWrite===!1?f.jsxs("span",{className:"inline-flex items-center gap-2",children:[f.jsx(Gt,{variant:"warning",children:rPt()}),f.jsx(Yk,{content:lEt(),className:"text-subtext",children:f.jsx(eS,{size:15})})]}):null}function Gzn({remote:e}){var w;const n=vn({mutationFn:Zpn}),t=bz(),r=ft(t),s=r.data??null,i=y=>{Qr(t.queryKey,C=>(typeof y=="function"?y(C??null):y)??void 0)},a=s?null:((w=r.error)==null?void 0:w.message)??null,[o,l]=A.useState(""),[u,h]=A.useState(!1),[_,p]=A.useState(!1),[m,x]=A.useState(null),k=by();async function v(){if(!(u||_||!s&&!a)){p(!0),x(null);try{await rt.fetchQuery({...bz(),staleTime:0})}catch(y){x(y instanceof Error?y.message:String(y))}finally{p(!1)}}}async function b(y){if(y.preventDefault(),!(!o.trim()||u||_||!s&&!a)){h(!0),x(null);try{const C=await n.mutateAsync(o.trim());i(C),x(null),l("")}catch(C){x(C instanceof Error?C.message:String(C))}finally{h(!1)}}}return f.jsxs(f.Fragment,{children:[a?f.jsx("div",{className:"error",children:a}):s?f.jsxs(f.Fragment,{children:[f.jsxs("dl",{className:"m-0 flex flex-col gap-3 text-sm",children:[s.username&&f.jsxs("div",{className:"flex items-center justify-between gap-4",children:[f.jsx("dt",{className:"font-medium text-subtext",children:Pk()}),f.jsx("dd",{className:"m-0 text-text",children:s.username})]}),(s.validationStatus==="missing"||s.validationStatus==="invalid"||s.validationStatus==="valid"&&s.jobsWrite!==null)&&f.jsxs("div",{className:"flex items-center justify-between gap-4",children:[f.jsx("dt",{className:"font-medium text-subtext",children:vh()}),f.jsx("dd",{className:"m-0 text-text",children:f.jsx(Uzn,{settings:s})})]})]}),s.validationStatus==="unreachable"&&s.validationError&&f.jsx("p",{className:vy,children:s.validationError}),s.source==="env"&&f.jsx("p",{className:Ta,children:iLt()}),s.validationStatus==="valid"&&s.jobsWrite===null&&f.jsx(V6,{note:tEt({login:"`hf auth login`",url:Ne("huggingface.co/settings/tokens")}),className:Ta,disabled:e,onRun:k.start}),f.jsx(yy,{run:k.run,onComplete:()=>void r.refetch(),onClose:k.clear})]}):f.jsxs(os,{children:[f.jsx(Rt,{})," ",VIt()]}),f.jsxs("form",{className:"mt-5 flex flex-col gap-4",onSubmit:b,children:[f.jsxs("label",{className:"flex flex-col gap-2 text-sm font-medium text-subtext",children:[s!=null&&s.configured?rXt():hjt(),f.jsx(as,{type:"password",value:o,onChange:y=>l(y.target.value),placeholder:(s==null?void 0:s.maskedToken)??ZDt(),autoComplete:"off"})]}),m&&f.jsx("div",{className:"error",children:m}),f.jsxs("div",{className:"flex justify-end gap-2",children:[f.jsxs(Me,{type:"button",disabled:u||_||!s&&!a,onClick:()=>void v(),children:[f.jsx(La,{size:13})," ",_?sa():cm()]}),f.jsx(Me,{variant:"primary",type:"submit",disabled:!o.trim()||u||_||!s&&!a,children:u?cL():Yo()})]})]})]})}const VF=/^hf_[A-Za-z0-9]{10,}$/;function KF(){return f.jsx("tr",{children:f.jsx("td",{colSpan:3,children:f.jsxs("p",{dir:"auto",className:Ta,children:[_Kt()," ",f.jsx("code",{children:"HF_TOKEN"}),XUt()]})})})}const VA=["TINKER_API_KEY","HF_TOKEN","WANDB_API_KEY"];function T5(e,n){const t=n instanceof Error?n.message:String(n);Vn(t.includes(e)?t:`${e}: ${t}`,"error")}function Vzn({name:e,entry:n,onVars:t}){const r=vn({mutationFn:_=>kL(..._)}),s=vn({mutationFn:_0n}),[i,a]=A.useState(""),[o,l]=A.useState(!1);async function u(){if(!(!i.trim()||o)){l(!0);try{t(await r.mutateAsync([e,i.trim()])),a("")}catch(_){T5(e,_)}finally{l(!1)}}}async function h(){if(!o){l(!0);try{t(await s.mutateAsync(e))}catch(_){T5(e,_)}finally{l(!1)}}}return f.jsxs(f.Fragment,{children:[f.jsxs("tr",{children:[f.jsx("td",{className:"font-mono text-sm",children:e}),f.jsx("td",{className:"text-base text-subtext",children:n?f.jsxs(f.Fragment,{children:[n.maskedValue,n.inProcessEnv&&f.jsx(Gt,{children:qHt()})]}):f.jsx(as,{variant:"inline",className:"text-base",type:"password",value:i,onChange:_=>a(_.target.value),onKeyDown:_=>{_.key==="Enter"&&(_.preventDefault(),u()),_.key==="Escape"&&!o&&a("")},placeholder:sL(),"aria-label":gJ({name:Ne(e)}),autoComplete:"new-password",disabled:o})}),f.jsx("td",{children:n?f.jsx(Ft,{className:"[&:hover:not(:disabled)]:text-accent-red",title:Q4({name:Ne(e)}),"aria-label":Q4({name:Ne(e)}),onClick:()=>void h(),disabled:o,children:f.jsx(lf,{size:13})}):i.trim()&&f.jsx(Me,{size:"small",onClick:()=>void u(),disabled:o,children:o?la():Yo()})})]}),!n&&e!=="HF_TOKEN"&&VF.test(i.trim())&&f.jsx(KF,{})]})}function Kzn({onVars:e,onDone:n}){const t=vn({mutationFn:_=>kL(..._)}),[r,s]=A.useState(""),[i,a]=A.useState(""),[o,l]=A.useState(!1);async function u(){if(!(!r.trim()||!i.trim()||o)){l(!0);try{e(await t.mutateAsync([r.trim(),i.trim()])),n()}catch(_){T5(r.trim(),_)}finally{l(!1)}}}const h=_=>{_.key==="Enter"&&(_.preventDefault(),u()),_.key==="Escape"&&!o&&n()};return f.jsxs(f.Fragment,{children:[f.jsxs("tr",{children:[f.jsx("td",{children:f.jsx(as,{autoFocus:!0,variant:"inline",className:"font-mono text-sm",type:"text",value:r,onChange:_=>s(_.target.value),onKeyDown:h,placeholder:"MY_API_KEY","aria-label":wBt(),autoComplete:"off",spellCheck:!1,disabled:o})}),f.jsx("td",{children:f.jsx(as,{variant:"inline",className:"text-base",type:"password",value:i,onChange:_=>a(_.target.value),onKeyDown:h,placeholder:sL(),"aria-label":jBt(),autoComplete:"new-password",disabled:o})}),f.jsxs("td",{children:[f.jsx(Me,{size:"small",onClick:()=>void u(),disabled:o||!r.trim()||!i.trim(),children:o?la():Yo()}),f.jsx(Ft,{title:P_(),"aria-label":iRt(),onClick:n,disabled:o,children:f.jsx(_r,{size:13})})]})]}),r.trim()!=="HF_TOKEN"&&VF.test(i.trim())&&f.jsx(KF,{})]})}function Wzn(){var u;const e=Mmn(),n=ft(e),t=n.data??null,r=h=>{Qr(e.queryKey,_=>(typeof h=="function"?h(_??null):h)??void 0)},s=t?null:((u=n.error)==null?void 0:u.message)??null,[i,a]=A.useState(!1),o=t===null?[]:t.map(h=>h.key).filter(h=>!VA.includes(h)),l=[...VA,...o];return f.jsxs(f.Fragment,{children:[f.jsxs("div",{className:"mb-4.5 flex items-center justify-between gap-4",children:[f.jsx("p",{className:"m-0 text-base leading-relaxed text-text",children:cWt()}),f.jsxs(Me,{size:"small",className:"shrink-0",onClick:()=>a(!0),disabled:i||t===null,children:[f.jsx(yh,{size:12})," ",KTt()]})]}),f.jsx("div",{className:Qo,children:s?f.jsx("div",{className:"error",children:s}):t===null?f.jsxs(os,{children:[f.jsx(Rt,{})," ",zu()]}):f.jsx("table",{className:"env-table w-full table-fixed border-collapse text-base [&_td:first-child]:w-[32%] [&_td:first-child]:wrap-anywhere [&_.badge]:ms-2 [&_td]:h-12 [&_td]:pt-0 [&_td]:pe-2.5 [&_td]:pb-0 [&_td]:ps-0 [&_td]:align-middle [&_td]:border-b [&_td]:border-b-border-variant [&_td:last-child]:w-29 [&_td:last-child]:whitespace-nowrap [&_td:last-child]:text-end [&_td[colspan]]:whitespace-normal [&_td[colspan]]:text-start [&_.icon-btn]:ms-2 [&_.icon-btn]:align-middle",children:f.jsxs("tbody",{children:[l.map(h=>f.jsx(Vzn,{name:h,entry:t.find(_=>_.key===h),onVars:r},h)),i&&f.jsx(Kzn,{onVars:r,onDone:()=>a(!1)})]})})})]})}const Op=[{value:"system",label:HYt,icon:kbn},{value:"light",label:DYt,icon:Kbn},{value:"dark",label:wYt,icon:Cbn}],Qzn=[{id:"en",label:"English"},{id:"zh-CN",label:"简体中文"},{id:"fa",label:"فارسی"},{id:"ar",label:"العربية"},{id:"es",label:"Español"},{id:"hi",label:"हिन्दी"}];function Xzn(){const e=sf(),[n,t]=UL(),r=s=>{var h;const i=s.key==="ArrowRight"||s.key==="ArrowDown"?1:s.key==="ArrowLeft"||s.key==="ArrowUp"?-1:0;if(!i)return;s.preventDefault();const a=[...s.currentTarget.querySelectorAll('[role="radio"]')],o=a.findIndex(_=>_===document.activeElement),u=((o===-1?Op.findIndex(_=>_.value===n):o)+i+Op.length)%Op.length;t(Op[u].value),(h=a[u])==null||h.focus()};return f.jsxs(f.Fragment,{children:[f.jsx("h2",{children:P6t()}),f.jsxs("div",{className:`${Qo} mt-3`,children:[f.jsxs("div",{className:`${Ql} pb-3.5`,children:[f.jsx("div",{className:"project-default-title text-base font-medium",children:pz()}),f.jsx("div",{className:"theme-segmented inline-flex flex-none gap-0.5 p-0.5 border border-border rounded-md bg-surface",role:"radiogroup","aria-label":pz(),onKeyDown:r,children:Op.map(({value:s,label:i,icon:a})=>f.jsxs("button",{type:"button",role:"radio","aria-checked":n===s,tabIndex:n===s?0:-1,className:`theme-segment inline-flex items-center gap-1.5 py-[5px] px-2.5 rounded-sm text-subtext text-sm cursor-pointer transition-[background,color] duration-120 ease-standard [&:hover:not(.on)]:text-text [&:hover:not(.on)]:bg-highlight [&.on]:text-background [&.on]:bg-primary [&:focus-visible]:outline-2 [&:focus-visible]:outline-solid [&:focus-visible]:outline-text [&:focus-visible]:outline-offset-2 ${n===s?"on":""}`,onClick:()=>t(s),children:[f.jsx(a,{size:14}),i()]},s))})]}),f.jsxs("div",{className:Ql,children:[f.jsx("div",{className:"project-default-title text-base font-medium",children:SNt()}),f.jsx("div",{className:"w-52 flex-none",children:f.jsx(yu,{choices:Qzn,value:e,variant:"field",dropDown:!0,onSelect:s=>{VO(s)&&FL(s)}})})]})]})]})}const Yzn={installer:dfn,"app-bundle":V_n,portable:Nfn,cargo:J_n,homebrew:afn,nix:yfn,unknown:Ofn},Jw={cargo:Ffn,homebrew:Wfn,nix:tdn};function Zzn(){var _;const e=vn({mutationFn:p=>s0n(...p)}),{status:n,error:t,apply:r}=KS(),[s,i]=A.useState(null),[a,o]=A.useState(null),l=x$(n),u=s!==null||l.restarting;if(!n)return f.jsxs(f.Fragment,{children:[f.jsx("h2",{children:fz()}),t?f.jsx("div",{className:Qo,children:f.jsx("div",{className:"error",children:t})}):f.jsxs(os,{children:[f.jsx(Rt,{})," ",zu()]})]});const h=async(p,m)=>{i(p),o(null);try{await m()}catch(x){o(x instanceof Error?x.message:String(x))}finally{i(null)}};return f.jsxs(f.Fragment,{children:[f.jsx("h2",{children:fz()}),f.jsxs("div",{className:`${Qo} mt-3`,children:[f.jsxs("div",{className:`${K_} pb-3.5`,children:[f.jsx("div",{className:"k",children:iL()}),f.jsx("div",{className:"v",children:n.current}),f.jsx("div",{className:"k",children:bIt()}),f.jsx("div",{className:"v",children:n.latest??"—"}),f.jsx("div",{className:"k",children:YD()}),f.jsx("div",{className:"v",children:Yzn[n.channel]()})]}),n.restartRequired&&f.jsxs("div",{className:Ql,children:[f.jsxs("div",{children:[f.jsx("div",{className:"project-default-title text-base font-medium",children:jUt()}),f.jsx("p",{children:l.error?pL({error:l.error}):gXt({installed:Ne(n.installedVersion??"—"),current:Ne(n.current??n.installedVersion??"—")})})]}),n.canRestart&&f.jsx(Me,{size:"small",type:"button",disabled:u,onClick:l.restart,children:l.restarting?mL():hL()})]}),n.selfUpdates?f.jsxs(f.Fragment,{children:[f.jsxs("div",{className:Ql,children:[f.jsxs("div",{children:[f.jsx("div",{className:"project-default-title text-base font-medium",children:cz()}),f.jsxs("p",{children:[pBt(),n.envDisabled&&UZt()]})]}),f.jsx(Xk,{type:"button",checked:n.autoUpdate,"aria-label":cz(),disabled:u,onClick:()=>void h("auto",()=>e.mutateAsync([!n.autoUpdate]).then(r))})]}),f.jsxs("div",{className:Ql,children:[f.jsxs("div",{children:[f.jsx("div",{className:"project-default-title text-base font-medium",children:n.updateAvailable?IZt({version:Ne(n.latest??"—")}):a7t()}),f.jsx("p",{children:n.updateAvailable?qEt():N7t()})]}),f.jsx(Me,{size:"small",type:"button",disabled:u,onClick:()=>void h("apply",()=>n0n().then(r)),children:s==="apply"?Rk():n.updateAvailable?TZt():d7t()})]})]}):f.jsx("div",{className:Ql,children:f.jsxs("div",{children:[f.jsx("div",{className:"project-default-title text-base font-medium",children:kHt()}),f.jsx("p",{children:((_=Jw[n.channel])==null?void 0:_.call(Jw))??cQt()})]})}),n.channel==="app-bundle"&&f.jsx(ejn,{busy:s,disabled:u,run:h}),a&&f.jsx("div",{className:"error",children:a})]})]})}function Jzn(){var _;const e=vn({mutationFn:X0n}),n=Fmn(),t=ft(n),r=t.data??null,s=p=>{Qr(n.queryKey,m=>(typeof p=="function"?p(m??null):p)??void 0)},[i,a]=A.useState(!1),[o,l]=A.useState(null),u=o??((_=t.error)==null?void 0:_.message)??null,h=()=>{!r||i||(a(!0),l(null),e.mutateAsync(!r.preferenceEnabled).then(s).catch(p=>l(p instanceof Error?p.message:String(p))).finally(()=>a(!1)))};return f.jsxs(f.Fragment,{children:[f.jsx("h2",{children:XKt()}),r?f.jsxs("div",{className:`${Qo} mt-3`,children:[f.jsxs("div",{className:Ql,children:[f.jsxs("div",{children:[f.jsxs("div",{className:"project-default-title inline-flex items-center gap-1.5 text-base font-medium",children:[iz(),r.locked&&r.reason&&f.jsx(Yk,{content:`${BMt()} ${r.reason}.`,className:"text-subtext",children:f.jsx(eS,{size:15})})]}),f.jsx("p",{children:LBt()})]}),f.jsx(Xk,{type:"button",checked:r.enabled,"aria-label":iz(),disabled:i||r.locked,onClick:h})]}),u&&f.jsx("div",{className:"error",children:u})]}):u?f.jsx("div",{className:"error",children:u}):f.jsxs(os,{children:[f.jsx(Rt,{})," ",zu()]})]})}function ejn({busy:e,disabled:n,run:t}){const r=vn({mutationFn:i0n}),[s,i]=A.useState(null),[a,o]=A.useState(!1),l=u=>void t("cli",()=>r.mutateAsync(u).then(h=>{i(h),o(!1)}).catch(h=>{throw o(!u&&String((h==null?void 0:h.message)??h).includes("--force")),h}));return f.jsxs("div",{className:Ql,children:[f.jsxs("div",{children:[f.jsx("div",{className:"project-default-title text-base font-medium",children:jEt({command:Ne("orx")})}),s?f.jsxs("p",{children:[s.alreadyCurrent?tCt({link:Ne(s.link)}):lCt({link:Ne(s.link)}),!s.onPath&&M6t({directory:Ne(s.dir)})]}):f.jsx("p",{children:wEt({command:Ne("orx")})})]}),f.jsx(Me,{size:"small",type:"button",disabled:n,onClick:()=>l(a),children:e==="cli"?Rk():a?qQt():s?mQt():pEt()})]})}function tjn({remote:e}){var x;const n=vn({mutationFn:k=>zL(...k)}),t=Gk(),r=ft(t),s=r.data??null,i=k=>{Qr(t.queryKey,v=>(typeof k=="function"?k(v??null):k)??void 0)},[a,o]=A.useState(!1),[l,u]=A.useState(null),h=l??((x=r.error)==null?void 0:x.message)??null,_=async()=>{await r.refetch({cancelRefetch:!1})},p=by(),m=()=>{if(!s||a)return;const k=!s.githubForNewProjects;o(!0),u(null),n.mutateAsync([k,!0]).then(i).catch(v=>u(v instanceof Error?v.message:String(v))).finally(()=>o(!1))};return f.jsxs(f.Fragment,{children:[f.jsx("h2",{children:CDt()}),s?f.jsxs("div",{className:`${Qo} mt-3 project-defaults-card [&_.settings-card-head]:justify-between [&_.settings-card-head]:mb-0 [&_.settings-card-head]:pb-3 [&_.settings-card-head_h3]:m-0`,children:[f.jsxs("div",{className:"settings-card-head flex items-center gap-2.5 mb-3",children:[f.jsx("h3",{children:RDt()}),f.jsx(Gt,{variant:s.githubAuthenticated?"success":s.ghInstalled?"warning":"error",children:s.githubAuthenticated?HD():GD()})]}),f.jsxs("div",{className:Ql,children:[f.jsxs("div",{children:[f.jsx("div",{className:"project-default-title text-base font-medium",children:lz()}),f.jsx("p",{children:wWt()})]}),f.jsx(Xk,{type:"button",checked:s.githubForNewProjects,"aria-label":lz(),disabled:a||!s.githubAuthenticated&&!s.githubForNewProjects,onClick:m})]}),!s.githubAuthenticated&&f.jsx("div",{className:"mt-3.5 pt-3.5 border-t border-t-border-variant",children:f.jsx(WF,{ghInstalled:s.ghInstalled,remote:e,onCheck:_,onRun:p.start})}),f.jsx(yy,{run:p.run,onComplete:()=>void _(),onClose:p.clear}),h&&f.jsx("div",{className:"error",children:h})]}):h?f.jsx("div",{className:"error",children:h}):f.jsxs(os,{children:[f.jsx(Rt,{})," ",zu()]})]})}function WF({ghInstalled:e,remote:n,onCheck:t,onRun:r}){const[s,i]=A.useState(!1),a=()=>{i(!0),t().finally(()=>i(!1))};return f.jsxs(f.Fragment,{children:[f.jsx(V6,{note:e?SXt():LEt(),className:"git-card-helper m-0 text-sm leading-relaxed text-text",disabled:n||!e,onRun:r}),f.jsxs("div",{className:"flex flex-wrap gap-2 mt-2.5",children:[!e&&f.jsxs(Zd,{variant:"primary",href:"https://cli.github.com/",target:"_blank",rel:"noreferrer",children:[RLt()," ",f.jsx(H_,{size:12})]}),f.jsx(Me,{type:"button",variant:e?"warning":"default",disabled:s,onClick:a,children:s?sa():cm()})]})]})}function njn(){var m,x,k;const e=vn({mutationFn:$pn}),n=vn({mutationFn:Bpn}),t=k2n(),r=ft(t),s=((m=r.data)==null?void 0:m.hasToken)??null,i=((x=r.data)==null?void 0:x.hasSession)??null,a=v=>Qr(t.queryKey,{hasToken:s??!1,hasSession:i??!1,...v}),o=v=>a({hasToken:v}),[l,u]=A.useState(!1),[h,_]=A.useState(null),p=h??((k=r.error)==null?void 0:k.message);return f.jsxs("div",{className:z5,children:[f.jsx("h3",{children:eL()}),f.jsxs("div",{className:K_,children:[f.jsx("span",{className:"k",children:BDt()}),f.jsx("span",{className:"v",children:f.jsx(Gt,{variant:s?"success":"default",children:s===null?p?so():sa():s?hz():s3()})})]}),f.jsx("p",{className:"git-card-helper mt-3.5 mx-0 mb-0 text-sm leading-relaxed text-text",children:jWt()}),s?f.jsx("div",{className:i0,children:f.jsx(Me,{disabled:l,onClick:()=>{u(!0),_(null),e.mutateAsync().then(v=>o(v.hasToken)).catch(v=>_(v instanceof Error?v.message:String(v))).finally(()=>u(!1))},children:l?dz():TQt()})}):f.jsx(qA,{save:xL,onSaved:v=>o(v.hasToken),placeholder:LHt(),createHref:"https://www.overleaf.com/user/settings"}),f.jsxs("div",{className:K_,children:[f.jsx("span",{className:"k",children:rGt()}),f.jsx("span",{className:"v",children:f.jsx(Gt,{variant:i?"success":"default",children:i===null?p?so():sa():i?hz():s3()})})]}),f.jsx("p",{className:"git-card-helper mt-3.5 mx-0 mb-0 text-sm leading-relaxed text-text",children:uGt()}),i?f.jsx("div",{className:i0,children:f.jsx(Me,{disabled:l,onClick:()=>{u(!0),_(null),n.mutateAsync().then(v=>a({hasSession:v.hasSession})).catch(v=>_(v instanceof Error?v.message:String(v))).finally(()=>u(!1))},children:l?dz():kQt()})}):f.jsx(qA,{save:v=>wL(v),onSaved:v=>a({hasSession:v.hasSession}),placeholder:e3(),createHref:"https://www.overleaf.com/project",createLabel:spt()}),p&&f.jsx("div",{className:"error",children:p})]})}function rjn({project:e,onProjectUpdate:n,remote:t}){var M;const r=vn({mutationFn:D=>zL(...D)}),s={...Pmn((e==null?void 0:e.id)??""),enabled:!!e},i=ft(s),a=by(),o=i.data??null,l=D=>{Qr(s.queryKey,I=>(typeof D=="function"?D(I??null):D)??void 0)},[u,h]=A.useState(!1),[_,p]=A.useState(null),m=_??((M=i.error)==null?void 0:M.message)??null,[x,k]=A.useState(!1),[v,b]=A.useState(!1),[w,y]=A.useState(null),C=!!(o!=null&&o.github.owner&&o.github.repo),N=async()=>{await i.refetch({cancelRefetch:!1})},E=D=>{const I=D instanceof Error?D.message:String(D);return I.toLowerCase().includes("archived")?y9t():I.includes("(fetch first)")||I.includes("non-fast-forward")?N9t():I.includes("403")||I.toLowerCase().includes("permission denied")?O9t():I},T=()=>{e&&(h(!0),p(null),K0n(e.id).then(D=>{l(D.git),n(D.project),rt.fetchQuery(Gk()).then(I=>{!I.githubForNewProjects&&!I.githubDefaultPromptSeen&&k(!0)}).catch(()=>{})}).catch(D=>p(E(D))).finally(()=>h(!1)))},j=D=>{b(!0),y(null),r.mutateAsync([D,!0]).then(()=>k(!1)).catch(I=>y(I instanceof Error?I.message:String(I))).finally(()=>b(!1))};return f.jsxs(f.Fragment,{children:[f.jsx("h1",{children:wUt()}),f.jsx("p",{className:"settings-sub mt-0 mx-0 mb-4.5 text-base leading-relaxed text-text",children:uXt({project:(e==null?void 0:e.name)??N8t()})}),e?m&&!o?f.jsx("div",{className:"error",children:m}):o?f.jsxs(f.Fragment,{children:[f.jsxs("div",{className:z5,children:[f.jsx("h3",{children:a$t()}),f.jsxs("div",{className:K_,children:[f.jsx("span",{className:"k",children:rqt()}),f.jsx("span",{className:"v",children:o.path}),f.jsx("span",{className:"k",children:"Git"}),f.jsx("span",{className:"v",children:o.gitVersion??jD()}),f.jsx("span",{className:"k",children:XGt()}),f.jsx("span",{className:"v",children:o.initialized?d9t({branch:Ne(o.currentBranch??$k()),state:o.clean?W7t():W9t()}):eTt()}),f.jsx("span",{className:"k",children:BAt()}),f.jsx("span",{className:"v",children:o.baselineBranch}),f.jsx("span",{className:"k",children:pUt()}),f.jsx("span",{className:"v",children:o.remotes.length?o.remotes.map(D=>`${D.name}: ${D.url}`).join(" · "):Bk()})]}),!o.initialized&&f.jsx("div",{className:i0,children:f.jsx(Me,{variant:"primary",onClick:()=>void V0n(e.id).then(l).catch(D=>p(String(D))),children:fLt()})})]}),f.jsxs("div",{className:z5,children:[f.jsx("h3",{children:"GitHub"}),f.jsxs("div",{className:K_,children:[f.jsx("span",{className:"k",children:VD()}),f.jsx("span",{className:"v",children:f.jsx(Gt,{variant:o.github.authenticated?"success":o.github.ghInstalled?"warning":"error",children:o.github.authenticated?HD():GD()})}),f.jsx("span",{className:"k",children:gqt()}),f.jsx("span",{className:"v",children:C?f.jsxs(f.Fragment,{children:[f.jsxs("span",{children:[o.github.owner,"/",o.github.repo]}),!o.github.enabled&&f.jsx(Gt,{children:kVt()})]}):f.jsx(Gt,{children:JIt()})}),o.github.enabled&&f.jsxs(f.Fragment,{children:[f.jsx("span",{className:"k",children:mVt()}),f.jsx("span",{className:"v",children:o.github.syncStatus})]})]}),!o.github.authenticated&&f.jsx("div",{className:"mt-3.5 pt-3.5 border-t border-t-border-variant",children:f.jsx(WF,{ghInstalled:o.github.ghInstalled,remote:t,onCheck:()=>N(),onRun:a.start})}),f.jsx(yy,{run:a.run,onComplete:()=>void N(),onClose:a.clear}),o.github.authenticated&&!o.github.enabled&&f.jsxs(f.Fragment,{children:[f.jsx("p",{className:"git-card-helper mt-3.5 mx-0 mb-0 text-sm leading-relaxed text-text",children:C?sJt():y8t()}),f.jsxs("div",{className:i0,children:[C&&o.github.url&&f.jsxs(Zd,{href:o.github.url,target:"_blank",rel:"noreferrer",children:[_z()," ",f.jsx(H_,{size:12})]}),f.jsx(Me,{variant:"primary",disabled:u,onClick:T,children:u?Ykt():Ukt()})]})]}),o.github.enabled&&f.jsxs(f.Fragment,{children:[f.jsx("p",{className:"git-card-helper mt-3.5 mx-0 mb-0 text-sm leading-relaxed text-text",children:KOt()}),f.jsxs("div",{className:i0,children:[o.github.url&&f.jsxs(Zd,{href:o.github.url,target:"_blank",rel:"noreferrer",children:[_z()," ",f.jsx(H_,{size:12})]}),f.jsx(Me,{disabled:u,onClick:()=>{h(!0),W0n(e.id).then(D=>{l(D.git),n(D.project)}).catch(D=>p(D instanceof Error?D.message:String(D))).finally(()=>h(!1))},children:u?sSt():Ikt()})]})]})]}),f.jsx(njn,{}),m&&f.jsx("div",{className:"error",children:E(m)})]}):f.jsxs(os,{children:[f.jsx(Rt,{})," ",zu()]}):f.jsx("div",{className:Qo,children:f.jsx("p",{className:Ta,children:IFt()})}),x&&f.jsx("div",{className:"modal-backdrop fixed inset-0 bg-modal-backdrop-light flex items-start justify-center pt-[var(--modal-top)] px-4 pb-6 overflow-y-auto z-100",onClick:()=>j(!1),children:f.jsxs("div",{className:"modal max-w-[94vw] max-h-[calc(100vh_-_var(--modal-top)_-_48px)] overflow-y-auto bg-background border border-border rounded-xl shadow-modal p-6 [&_h2]:mt-0 [&_h2]:mx-0 [&_h2]:mb-3.5 [&_h2]:text-xl github-default-modal w-110 [&_>_p]:m-0 [&_>_p]:text-sm [&_>_p]:leading-relaxed [&_>_p]:text-text [&_>_.error]:mt-3.5",role:"dialog","aria-modal":"true","aria-labelledby":"github-default-title",onClick:D=>D.stopPropagation(),children:[f.jsx("h2",{id:"github-default-title",children:y$t()}),f.jsx("p",{children:YVt()}),w&&f.jsx("div",{className:"error",children:w}),f.jsxs("div",{className:"github-default-actions flex justify-end gap-2.5 mt-5.5",children:[f.jsx(Me,{disabled:v,onClick:()=>j(!1),children:rFt()}),f.jsx(Me,{variant:"primary",disabled:v,onClick:()=>j(!0),children:v?la():$Nt()})]})]})})]})}const sjn={env:Dan,config:Han,xdg:Qan,default:zan},e4={preparing:han,copying:Ein,verifying:non,finalizing:Min},ijn=e=>{var n;return((n=e4[e])==null?void 0:n.call(e4))??e};function ajn(){var y;const e=Omn(),n=ft(e),t=n.data??null,r=t?null:((y=n.error)==null?void 0:y.message)??null,[s,i]=A.useState(""),[a,o]=A.useState(!1),[l,u]=A.useState(null),[h,_]=A.useState({kind:"idle"}),[p,m]=A.useState(null);A.useEffect(()=>{t&&i(C=>C||t.current)},[t]),A.useEffect(()=>BL(C=>{C.type==="progress"?_(N=>{const E=N.kind==="moving"?N.total:0;return{kind:"moving",phase:C.phase,copied:C.copiedBytes,total:C.totalBytes||E}}):C.type==="done"?(_({kind:"done",oldPathLeft:C.oldPathLeft}),u(null),i("")):C.type==="error"&&_({kind:"error",message:C.error})}),[]);const x=(t==null?void 0:t.source)==="env",k=s.trim(),v=t!==null&&k===t.current;async function b(){if(!(a||!k)){o(!0),m(null),u(null);try{u(await d0n(k))}catch(C){m(C instanceof Error?C.message:String(C))}finally{o(!1)}}}async function w(C){if(C.preventDefault(),!(h.kind==="moving"||!k||v)&&(m(null),!!window.confirm(Kin({path:Ne(k)})))){_({kind:"moving",phase:"preparing",copied:0,total:(l==null?void 0:l.treeBytes)??0});try{await h0n(k)}catch(N){_({kind:"idle"}),m(N instanceof Error?N.message:String(N))}}}return f.jsxs(f.Fragment,{children:[f.jsx("h2",{children:cVt()}),f.jsx("p",{className:"settings-sub mt-0 mx-0 mb-4.5 text-sm leading-relaxed text-subtext",children:cYt()}),r?f.jsx("div",{className:Qo,children:f.jsx("div",{className:"error",children:r})}):t?f.jsxs("div",{className:Qo,children:[f.jsx("div",{className:"settings-card-head mb-3",children:f.jsx("h3",{children:aOt()})}),f.jsxs("div",{className:K_,children:[f.jsx("span",{className:"k",children:RMt()}),f.jsx("span",{className:"v",children:t.current}),f.jsx("span",{className:"k",children:nL()}),f.jsx("span",{className:"v",children:sjn[t.source]()})]}),!x&&f.jsxs("form",{className:G6,onSubmit:w,children:[f.jsxs("label",{children:[lBt(),f.jsx("input",{className:"text-sm",type:"text",value:s,onChange:C=>{i(C.target.value),u(null)},placeholder:"/absolute/path/to/openresearch",autoComplete:"off",spellCheck:!1,disabled:h.kind==="moving"})]}),l&&!l.error&&l.ok&&f.jsxs("p",{className:Ta,children:[Xqt()," ",Kl(l.treeBytes??0),l.freeBytes!=null&&` — ${Pin({size:Ne(Kl(l.freeBytes))})}`,l.sameFilesystem?xan():"","."]}),l&&l.ok===!1&&l.error&&f.jsx("div",{className:"error",children:l.error}),p&&f.jsx("div",{className:"error",children:p}),h.kind==="moving"&&f.jsx(PF,{value:h.copied,max:h.total,label:ijn(h.phase),caption:h.total>0?f.jsxs("span",{className:"text-sm",children:[Kl(h.copied)," / ",Kl(h.total)]}):void 0}),h.kind==="done"&&f.jsxs("p",{className:Ta,children:[W$t(),h.oldPathLeft&&f.jsxs(f.Fragment,{children:[" ",yTt({path:Ne(h.oldPathLeft)})]})]}),h.kind==="error"&&f.jsxs("div",{className:"error",children:[F$t()," ",h.message]}),f.jsxs("div",{className:"actions",children:[f.jsx(Me,{type:"button",onClick:b,disabled:a||!k||v||h.kind==="moving",children:a?sa():K6t()}),f.jsx(Me,{variant:"primary",type:"submit",disabled:!k||v||h.kind==="moving",children:h.kind==="moving"?oan():ean()})]})]})]}):f.jsxs(os,{children:[f.jsx(Rt,{})," ",zu()]})]})}const A5=e=>e==="running"||e==="starting";function ojn(e){return A5(e.status)?g0(Date.now()-e.createdAt):e.endedAt?g0(e.endedAt-e.createdAt):"—"}function QF({instances:e,emptyLabel:n}){return e.length===0?f.jsx("p",{className:"instances-empty m-0 rounded-lg border border-border bg-background py-3.5 px-4 text-base text-subtext",children:n}):f.jsx("div",{className:"instances-table-wrap overflow-x-auto",children:f.jsxs("table",{className:"runs-table w-full border-collapse bg-background text-base [&_th]:text-start [&_th]:text-text [&_th]:text-sm [&_th]:font-medium [&_th]:py-2 [&_th]:px-3 [&_th]:border-b [&_th]:border-b-border [&_th]:sticky [&_th]:top-0 [&_th]:bg-background [&_th]:z-1 [&_td]:py-2 [&_td]:px-3 [&_td]:border-b [&_td]:border-b-divider-faint [&_td]:whitespace-nowrap [&_tr:last-child_td]:border-b-0 [&_tr.clickable]:cursor-pointer [&_tr.clickable:hover_td]:bg-canvas",children:[f.jsx("thead",{children:f.jsxs("tr",{children:[f.jsx("th",{children:RAt()}),f.jsx("th",{children:vh()}),f.jsx("th",{children:qGt()}),f.jsx("th",{children:qUt()})]})}),f.jsx("tbody",{children:e.map(t=>{var s;const r=typeof((s=t.backend)==null?void 0:s.url)=="string"?t.backend.url:void 0;return f.jsxs("tr",{children:[f.jsx("td",{children:f.jsxs("span",{className:"backend-cell inline-flex items-center gap-0.5",children:[f.jsx(pS,{backend:t.backend}),r&&f.jsx(dm,{size:"small",href:r,target:"_blank",rel:"noreferrer",title:uz(),"aria-label":uz(),onClick:i=>i.stopPropagation(),children:f.jsx(H_,{size:12})})]})}),f.jsx("td",{children:f.jsx(Jl,{status:Zi(t)})}),f.jsx("td",{children:Vo(t.createdAt)}),f.jsx("td",{children:ojn(t)})]},t.id)})})]})})}function ljn({projectId:e,onViewHistory:n}){var _;const t=ft({..._u(e??""),enabled:!!e,subscribed:!!e}),r=e?t.data??(t.error?[]:null):[],s=(_=t.error)==null?void 0:_.message,i=t.isFetching,[,a]=A.useState(0);A.useEffect(()=>{const p=setInterval(()=>a(m=>m+1),3e4);return()=>clearInterval(p)},[]);const o=()=>{e&&t.refetch()},l=(p,m)=>m.createdAt-p.createdAt,u=r==null?void 0:r.filter(p=>A5(p.status)).sort(l),h=r==null?void 0:r.filter(p=>!A5(p.status)).sort(l);return f.jsxs("section",{className:"compute-activity [&_.count-badge]:inline-flex [&_.count-badge]:items-center [&_.count-badge]:justify-center [&_.count-badge]:min-w-4.5 [&_.count-badge]:h-4.5 [&_.count-badge]:py-0 [&_.count-badge]:px-[5px] [&_.count-badge]:rounded-md [&_.count-badge]:bg-canvas [&_.count-badge]:border [&_.count-badge]:border-border [&_.count-badge]:text-xs [&_.count-badge]:font-medium [&_.count-badge]:text-text mt-5.5 mx-0 mb-8",children:[f.jsxs("div",{className:"compute-activity-head flex items-start justify-between gap-5 mb-3.5 [&_h2]:flex [&_h2]:items-center [&_h2]:gap-2 [&_h2]:m-0 [&_h2]:text-lg [@media((max-width:_640px))]:items-stretch [@media((max-width:_640px))]:flex-col",children:[f.jsx("div",{children:f.jsxs("h2",{children:[LUt(),u&&u.length>0&&f.jsx("span",{className:"count-badge",children:u.length})]})}),f.jsxs("div",{className:"compute-activity-actions flex gap-2 flex-none [@media((max-width:_640px))]:justify-start",children:[f.jsxs(Me,{size:"small",onClick:o,disabled:i,children:[f.jsx(La,{size:12,className:i?"animate-[spin_0.9s_linear_infinite]":""})," ",_m()]}),f.jsx(Me,{size:"small",onClick:n,children:h!=null&&h.length?hWe({count:Jt(h.length)}):oWe()})]})]}),s&&f.jsx("div",{className:"error",children:s}),!u||!h?f.jsxs(os,{children:[f.jsx(Rt,{})," ",zu()]}):f.jsx(QF,{instances:u,emptyLabel:e?PKe():eWe()})]})}function cjn({projectId:e,onBack:n}){var l;const t=ft({..._u(e??""),enabled:!!e,subscribed:!!e}),r=e?t.data??(t.error?[]:null):[],s=(l=t.error)==null?void 0:l.message,i=t.isFetching,[,a]=A.useState(0);A.useEffect(()=>{const u=setInterval(()=>a(h=>h+1),3e4);return()=>clearInterval(u)},[]);const o=()=>{e&&t.refetch()};return f.jsxs(f.Fragment,{children:[f.jsxs("button",{type:"button",className:"settings-back inline-flex items-center gap-1.5 mt-0 mx-0 mb-4.5 text-subtext text-sm font-medium [&:hover]:text-text",onClick:n,children:[f.jsx(b0,{size:14})," ",KD()]}),f.jsxs("div",{className:"settings-head-row flex items-center justify-between gap-2.5 [&_h1]:m-0",children:[f.jsx("h1",{children:GLt()}),f.jsxs(Me,{size:"small",onClick:o,disabled:i,children:[f.jsx(La,{size:12,className:i?"animate-[spin_0.9s_linear_infinite]":""})," ",_m()]})]}),s&&f.jsx("div",{className:"error",children:s}),r?f.jsx(QF,{instances:[...r].sort((u,h)=>h.createdAt-u.createdAt),emptyLabel:e?MKe():KKe()}):f.jsxs(os,{children:[f.jsx(Rt,{})," ",zu()]})]})}const XF=["projects","harnesses","storage"],ujn=[{id:"compute",label:WD,icon:f.jsx(mI,{size:15}),activeTabs:["compute","instances"]},{id:"environment",label:XD,icon:f.jsx(of,{size:15}),activeTabs:["environment"]},{id:"settings",label:qk,icon:f.jsx(sS,{size:15}),activeTabs:["settings",...XF]}];function _jn(e){return XF.includes(e)}function fjn({tab:e,project:n,onProjectUpdate:t,onSelectTab:r,remote:s=!1}){const i=e==="settings"||_jn(e),a=A.useRef(null);return A.useLayoutEffect(()=>{const o=a.current,l=o==null?void 0:o.parentElement;if(!o||!l)return;const u=()=>o.scrollIntoView({block:"start"}),h=new ResizeObserver(u);h.observe(l),u();const _=()=>h.disconnect(),p=["wheel","touchstart","pointerdown","keydown"];for(const m of p)window.addEventListener(m,_,{passive:!0});return()=>{_();for(const m of p)window.removeEventListener(m,_)}},[e,n==null?void 0:n.id]),f.jsxs("div",{className:"settings-view max-w-readable my-0 mx-auto pt-6 px-8 pb-15 [&_h1]:mt-0 [&_h1]:mx-0 [&_h1]:mb-1.5 [&_h1]:text-3xl [&_>_.error]:text-accent-red [&_>_.error]:text-base [&_>_.error]:whitespace-pre-wrap [&_>_.error]:mt-0 [&_>_.error]:mx-0 [&_>_.error]:mb-3",children:[i&&f.jsxs(f.Fragment,{children:[f.jsx("h1",{children:qk()}),f.jsxs("div",{className:"settings-stack mt-4.5",children:[f.jsx("section",{className:ed,children:f.jsx(Xzn,{})}),f.jsx("section",{ref:e==="projects"?a:void 0,className:ed,children:f.jsx(tjn,{remote:s})}),f.jsx("section",{ref:e==="harnesses"?a:void 0,className:ed,children:f.jsx(kzn,{remote:s})}),!s&&f.jsx("section",{ref:e==="storage"?a:void 0,className:ed,children:f.jsx(ajn,{})}),f.jsx("section",{className:ed,children:f.jsx(Jzn,{})}),!s&&f.jsx("section",{className:ed,children:f.jsx(Zzn,{})})]})]}),e==="compute"&&f.jsx(Hzn,{project:n,onViewHistory:()=>r("instances"),onOpenEnvironment:()=>r("environment"),remote:s}),e==="instances"&&f.jsx(cjn,{projectId:n==null?void 0:n.id,onBack:()=>r("compute")}),e==="environment"&&f.jsxs(f.Fragment,{children:[f.jsx("h1",{children:XD()}),f.jsx(Wzn,{})]}),e==="git"&&f.jsx(rjn,{project:n,onProjectUpdate:t,remote:s})]})}function Wv(e){return e.charAt(0).toUpperCase()+e.slice(1).replaceAll("-"," ")}function R5(e){return`${e.plugin?`${Wv(e.plugin)}: `:""}${Wv(e.name)}`}const KA={name:"plan",get description(){return Sgt()},source:"command"};function t4(e,n){if(n<0||n>e.length)return null;let t=n;for(;t>0&&!/\s/.test(e[t-1]);)t-=1;if(e[t]!=="/")return null;let r=n;for(;r=r?h:s}${a.slice(h.length)}`:s+a}const o=((u=/^[ \t]+/.exec(a))==null?void 0:u[0].length)??0;return{text:`${i}/${t}${a}`,cursor:i.length+t.length+1+o}}function WA(e,n){let t=e.slice(0,n.start),r=e.slice(n.end);return t?r?/\s$/.test(t)&&/^\s/.test(r)&&(r=r.slice(1)):t=t.replace(/\s$/,""):r=r.replace(/^\s/,""),{text:t+r,cursor:t.length}}function pjn(e,n){const t=e.filter(r=>r.name.toLowerCase()!==KA.name);return n&&t.push(KA),t.sort((r,s)=>+(s.source==="command")-+(r.source==="command")||R5(r).localeCompare(R5(s),void 0,{sensitivity:"base"}))}function mjn(e,n){if(!n)return null;const t=/(^|\s)\/plan(?=\s|$)/gi;return t.test(e)?{prompt:e.replace(t,"").trim()}:null}function QA(e,n,t){if(e==="command")return n!==void 0?n:t??void 0}function gjn({skills:e,activeIndex:n,onPick:t,onHover:r}){const s=A.useRef(null);return A.useLayoutEffect(()=>{var i;(i=s.current)==null||i.scrollIntoView({block:"nearest"})},[n,e]),f.jsx("div",{className:"skill-menu absolute bottom-[calc(100%_+_8px)] start-0 w-full max-h-[min(18rem,40vh)] overflow-y-auto overscroll-contain p-1.5 bg-background border border-border-variant rounded-2xl shadow-control-subtle z-50",children:e.map((i,a)=>f.jsxs("button",{ref:a===n?s:void 0,type:"button",className:`skill-item flex items-center gap-2 w-full text-start py-1 px-2 rounded-full text-sm font-normal text-text/80 [&.active]:bg-hover-muted [&.active]:text-text ${a===n?"active":""}`,onMouseDown:o=>{o.preventDefault(),t(i)},onMouseEnter:()=>r(a),children:[i.source==="command"&&i.name==="plan"?f.jsx(xI,{size:16,strokeWidth:1.5,className:"shrink-0","aria-hidden":"true"}):f.jsx(NI,{size:16,strokeWidth:1.5,className:"shrink-0","aria-hidden":"true"}),f.jsx("span",{className:"skill-name shrink-0",children:R5(i)}),f.jsx("span",{className:"skill-desc min-w-0 truncate text-muted",children:i.description}),i.source==="user"&&f.jsx("span",{className:"ms-auto shrink-0 ps-2 text-muted",children:$Jt()})]},i.name))})}const vjn=["font-family","font-size","font-weight","font-style","font-variant","line-height","letter-spacing","word-spacing","text-transform","direction","unicode-bidi","tab-size","padding-top","padding-right","padding-bottom","padding-left","border-top-width","border-right-width","border-bottom-width","border-left-width"];let bjn=null;function M5(e,n){const t=bjn??(bjn=document.createElement("canvas").getContext("2d"));if(!t||!n)return 6;const r=getComputedStyle(n);t.font=`${r.fontStyle} ${r.fontWeight} ${r.fontSize} ${r.fontFamily}`;const s=20+t.measureText(Wv(e)).width-t.measureText(`/${e}`).width;return Math.max(2,Math.ceil((s+6)/t.measureText(" ").width))}function YF({name:e}){const n=e==="plan"?xI:NI;return f.jsxs(f.Fragment,{children:[f.jsx(n,{size:16,strokeWidth:1.5,className:"me-1 inline-block align-middle","aria-hidden":"true"}),Wv(e)]})}function ZF(e,n,t,r,s,i=!1){let a=0;return djn(e,n).map((o,l,u)=>{var m,x;const h=a+o.text.length;a=h;const _=o.text.slice(1).toLowerCase();if(o.command&&s)return s(o.text,_,h,l);let p=o.text;return i||((m=u[l-1])!=null&&m.command&&(p=p.replace(/^[ \t]+/," ")),(x=u[l+1])!=null&&x.command&&(p=p.replace(/[ \t]+$/," "))),o.command?f.jsx("span",{className:t,onMouseDown:void 0,children:f.jsx(YF,{name:_})},l):i?f.jsx("span",{"aria-hidden":"true",children:o.text},l):f.jsx(A.Fragment,{children:p},l)})}function yjn({label:e,name:n,end:t,skill:r,projectId:s,textareaRef:i}){const a=A.useRef(null),o=A.useRef(null),l=A.useRef(null),u=A.useId(),[h,_]=A.useState(!1),p=ft({...qmn(n,s,r.harness),enabled:h,subscribed:h}),m=p.data??null,x=p.isFetching,[k,v]=A.useState({}),b=()=>{l.current!==null&&window.clearTimeout(l.current),l.current=null},w=()=>{const N=a.current;if(!N)return;const E=N.getBoundingClientRect(),T=Math.min(420,window.innerWidth-32),j=Math.max(16,Math.min(E.left-4,window.innerWidth-T-16));v(E.top>300?{bottom:window.innerHeight-E.top+12,left:j,width:T}:{left:j,top:E.bottom+12,width:T})},y=()=>{b(),w(),_(!0)},C=()=>{b(),l.current=window.setTimeout(()=>_(!1),120)};return A.useEffect(()=>()=>b(),[]),A.useEffect(()=>{if(!h)return;const N=()=>w();return window.addEventListener("resize",N),window.addEventListener("scroll",N,!0),()=>{window.removeEventListener("resize",N),window.removeEventListener("scroll",N,!0)}},[h]),f.jsxs(A.Fragment,{children:[f.jsxs("span",{ref:a,role:"button",tabIndex:0,"aria-controls":u,"aria-expanded":h,"aria-label":nZ({name:n}),className:"composer-chip group/skill pointer-events-auto relative z-1 inline-grid align-baseline cursor-text rounded-md bg-background text-skill-blue",onMouseEnter:y,onMouseLeave:C,onFocus:y,onBlur:C,onKeyDown:N=>{var E,T;if(N.key==="Escape"){_(!1);return}if(N.key==="Enter"||N.key===" "){N.preventDefault(),y();return}h&&(N.key==="ArrowDown"||N.key==="PageDown")&&(N.preventDefault(),(E=o.current)==null||E.scrollBy({top:N.key==="PageDown"?240:48,behavior:"smooth"})),h&&(N.key==="ArrowUp"||N.key==="PageUp")&&(N.preventDefault(),(T=o.current)==null||T.scrollBy({top:N.key==="PageUp"?-240:-48,behavior:"smooth"}))},onMouseDown:N=>{var E,T;N.preventDefault(),(E=i.current)==null||E.focus(),(T=i.current)==null||T.setSelectionRange(t,t),b()},children:[f.jsx("span",{className:"pointer-events-none absolute -inset-[7px] z-0 rounded-md bg-skill-blue-subtle opacity-0 transition-opacity group-hover/skill:opacity-100"}),f.jsx("span",{className:"invisible col-start-1 row-start-1","aria-hidden":"true",children:e}),f.jsx("span",{className:"relative z-1 col-start-1 row-start-1 w-0 whitespace-nowrap",children:f.jsx("span",{className:"bg-background text-skill-blue",children:f.jsx(YF,{name:n})})})]}),h&&Oa.createPortal(f.jsxs("div",{id:u,ref:o,role:"dialog","aria-label":uJ({name:n}),style:{...k,maxHeight:"min(28rem, calc(100vh - 2rem))"},className:"fixed z-100 overflow-y-auto rounded-lg border border-border bg-background shadow-floating",onMouseEnter:b,onMouseLeave:C,onFocus:b,onBlur:C,onMouseDown:N=>N.stopPropagation(),children:[f.jsxs("div",{className:"sticky top-0 z-1 flex items-center gap-2 border-b border-border-variant bg-background px-4 py-3",children:[f.jsxs("span",{className:"text-sm font-medium text-muted",children:["/",n]}),f.jsx(Gt,{className:"h-5 border-border-variant bg-canvas px-1.5 tracking-[0.05em]",children:SJt()})]}),f.jsx("div",{className:"p-4 text-sm text-text",children:x&&m===null?f.jsx("span",{className:"text-muted",children:AJt()}):f.jsx(Wo,{text:m??r.description})})]}),document.body)]})}function xjn({text:e,isCommand:n}){return f.jsx(f.Fragment,{children:ZF(e,n,"skill-chip me-0.5 whitespace-nowrap font-normal text-skill-blue")})}function wjn({text:e,editingTokenEnd:n,isCommand:t,skills:r,projectId:s,textareaRef:i}){const a=A.useRef(null);return A.useLayoutEffect(()=>{const o=i.current,l=a.current;if(!o||!l)return;const u=()=>{const _=getComputedStyle(o);for(const p of vjn)l.style.setProperty(p,_.getPropertyValue(p));l.style.width=`${o.clientWidth+parseFloat(_.borderLeftWidth)+parseFloat(_.borderRightWidth)}px`};u();const h=new ResizeObserver(u);return h.observe(o),()=>h.disconnect()},[e,i]),A.useLayoutEffect(()=>{const o=i.current;if(!o)return;const l=()=>{a.current&&(a.current.scrollTop=o.scrollTop)};return l(),o.addEventListener("scroll",l),()=>o.removeEventListener("scroll",l)},[i,e]),f.jsxs("div",{ref:a,className:"composer-chips pointer-events-none absolute inset-y-0 start-0 z-2 box-border overflow-hidden whitespace-pre-wrap break-words border-solid border-transparent text-transparent select-none",children:[ZF(e,t,"",void 0,(o,l,u,h)=>{var x;const _=e.slice(u),p=((x=/^[ \t]+/.exec(_))==null?void 0:x[0].length)??0;if(u===n||_&&!_.startsWith(` -`)&&pk.name===l);return m&&m.source!=="command"?f.jsx(yjn,{label:o,name:l,end:u,skill:m,projectId:s,textareaRef:i},`${h}:${u}`):f.jsxs("span",{"aria-hidden":"true",className:"bg-background text-skill-blue",children:[f.jsx("span",{className:"text-skill-blue-slash",children:"/"}),o.slice(1)]},`${h}:${u}`)},!0),"​"]})}function kjn(e){return e>=95?"var(--accent-red)":e>=80?"var(--accent-amber)":"var(--accent)"}const O5=6.5,XA=2*Math.PI*O5;function Sjn({usage:e}){return!e||e.usedTokens<=0?null:f.jsx(Cjn,{usage:e})}function Cjn({usage:e}){const{open:n,setOpen:t,ref:r}=_o(),{usedTokens:s,contextWindow:i}=e,a=i&&i>0?Math.min(100,Math.round(s/i*100)):null,o=a===null?"var(--accent)":kjn(a),l=a===null?"":new Intl.NumberFormat(z(),{style:"percent"}).format(a/100);return f.jsxs("div",{className:"option-picker relative inline-flex shrink-0",ref:r,children:[f.jsx("button",{type:"button",className:`${a===null?"inline-flex h-8 items-center rounded-md px-1 transition-[background,color] duration-150 ease-standard hover:bg-surface":"inline-flex h-8 w-8 shrink-0 items-center justify-center rounded-md text-text transition-[background,color] duration-150 ease-standard hover:bg-surface"} composer-bare context-ring text-sm text-text`,title:iTe(),onClick:()=>t(u=>!u),children:a===null?Ug(s):f.jsxs("svg",{viewBox:"0 0 16 16",width:"16",height:"16","aria-hidden":"true",children:[f.jsx("circle",{cx:"8",cy:"8",r:O5,fill:"none",stroke:"var(--border)",strokeWidth:"2.5"}),f.jsx("circle",{cx:"8",cy:"8",r:O5,fill:"none",stroke:o,strokeWidth:"2.5",strokeLinecap:"round",strokeDasharray:`${XA*Math.max(a,2)/100} ${XA}`,transform:"rotate(-90 8 8)"})]})}),n&&f.jsxs("div",{className:"option-menu absolute bottom-[calc(100%_+_8px)] start-0 max-h-95 flex flex-col bg-background border border-border rounded-lg shadow-menu z-50 overflow-hidden min-w-47.5 [&.align-right]:start-auto [&.align-right]:end-0 [&.drop-down]:bottom-auto [&.drop-down]:top-[calc(100%_+_4px)] [&.session-menu]:start-auto [&.session-menu]:end-1.5 [&.session-menu]:top-[calc(100%_-_2px)] [&.session-menu]:min-w-35 align-right context-meter-menu w-70 pt-2.5 px-3 pb-3 [&_.progress]:mt-2 [&_.progress]:mx-0 [&_.progress]:mb-0 [&_.progress-track]:h-[5px] [&_.progress-track]:border-0 [&_.progress-track]:bg-border",children:[f.jsxs("div",{className:"context-meter-head flex justify-between items-baseline gap-3 text-sm text-muted",children:[f.jsx("span",{children:Zje()}),f.jsx("span",{className:"context-meter-value text-text tabular-nums",children:a===null?fTe({value:Ne(Ug(s))}):bTe({used:Ne(Ug(s)),total:Ne(Ug(i)),percent:Ne(l)})})]}),a!==null&&f.jsx(PF,{value:s,max:i,fillColor:o})]})]})}const Qv="!";function YA(e){return e.startsWith(Qv)?e.slice(Qv.length).trim():null}function Ejn(e){return e.startsWith(Qv)?e.slice(Qv.length):e}function Njn(e){return e.replace(/([\\`*_[\]<>$~])/g,"\\$1").replace(/(^|\n)(\s*)(#{1,6}|>|[-+]|\d+\.)\s/g,"$1$2\\$3 ").replace(/(^|\n)(\s*)(=+|-{1,2})(?=\s*(?:\n|$))/g,"$1$2\\$3").replace(/(^|\n)(\s*)(-{3,})(?=\s*(?:\n|$))/g,"$1$2\\$3")}function zjn(e){const n=Math.max(0,...Array.from(e.matchAll(/`+/g),s=>s[0].length)),t="`".repeat(n+1),r=/^[\s`]|[\s`]$/.test(e)?` ${e} `:e;return`${t}${r}${t}`}function jjn(e){const n=Math.max(0,...Array.from(e.matchAll(/`+/g),r=>r[0].length)),t="`".repeat(Math.max(3,n+1));return` +`,u+3),p=_===-1?e.length:_;/^[ \t]*$/.test(e.slice(h,u))&&/^[ \t\r]*$/.test(e.slice(u+3,p))&&a.push(u)}for(let u=0;u+1`$$${s}$$`).replace(/\\\(([\s\S]+?)\\\)/g,(r,s)=>`$$${s}$$`);return n.predictMath&&(t=t.replace(/\\\[([\s\S]*)$/,(r,s)=>`$$${s}`).replace(/\\\(([\s\S]*)$/,(r,s)=>`$$${s}`)),Fzn(t,n)}function LF(e,n={}){let t="",r=0,s=0;for(;ss!==n);return{order:e.order.filter(s=>s!==n),previewKey:e.previewKey===n?null:e.previewKey,fallbackKey:r[r.length-1]??null}}function Uzn(e){return e==="Enter"?"keepOpen":e===" "?"preview":null}function qr(e,n={}){const t=r=>{n.stopPropagation&&r.stopPropagation()};return{onClick:r=>{t(r),e("preview")},onDoubleClick:r=>{t(r),e("keepOpen")},onAuxClick:r=>{r.button===1&&(r.preventDefault(),t(r),e("keepOpen"))},onKeyDown:r=>{const s=Uzn(r.key);s&&(r.preventDefault(),t(r),e(s))}}}const IF=T.createContext(void 0);function $F({projectId:e,sessionId:n,children:t}){const r=T.useMemo(()=>(s,i=!1)=>{if(/^(https?:)?\/\//i.test(s))return s;const a=pB(s);return a?(a.source==="absolute"?wL(a.path):a.source==="artifact"&&!i?F_(e,a.path):c3(e,a.source==="artifact"?`artifacts/${a.path}`:a.path,{sessionId:n??void 0}))+a.hash:null},[e,n]);return f.jsx(IF,{value:r,children:t})}function Gzn({src:e,alt:n,name:t,onClose:r}){const s=T.useRef(null),i=T.useRef(null),[a,o]=T.useState(1),[l,u]=T.useState({width:0,height:0}),[h,_]=T.useState({width:0,height:0});T.useEffect(()=>{const m=s.current;m==null||m.showModal(),m==null||m.focus();const x=i.current,k=new ResizeObserver(([v])=>{u({width:v.contentRect.width,height:v.contentRect.height})});return x&&k.observe(x),()=>{k.disconnect(),m==null||m.close()}},[]);const p=h.width&&l.width?Math.min(1,l.width*.9/h.width,l.height*.9/h.height):1;return Oa.createPortal(f.jsxs("dialog",{ref:s,tabIndex:-1,"aria-label":n||aD(),onCancel:m=>{m.preventDefault(),r()},className:"fixed inset-0 m-0 max-w-none max-h-none w-full h-dvh border-0 outline-none bg-transparent p-0 text-text backdrop:bg-image-backdrop",onClick:m=>{m.stopPropagation(),m.target===m.currentTarget&&r()},children:[f.jsx("div",{ref:i,className:"absolute inset-x-4 sm:inset-x-12 top-16 bottom-32 overflow-auto overscroll-contain",onClick:m=>{m.target===m.currentTarget&&r()},children:f.jsx("div",{className:"flex min-h-full min-w-full w-max pointer-events-none",children:f.jsx("img",{src:e,alt:n,onLoad:m=>_({width:m.currentTarget.naturalWidth,height:m.currentTarget.naturalHeight}),style:h.width?{width:h.width*p*a,height:h.height*p*a}:void 0,className:`pointer-events-auto block m-auto shrink-0 max-w-none rounded-lg shadow-modal ${h.width&&l.width?"visible":"invisible"}`})})}),f.jsxs("div",{className:"absolute top-5 right-5 flex gap-2",children:[f.jsx(dm,{shape:"circle",href:e,download:t||!0,"aria-label":mv(),title:mv(),className:"bg-background shadow-popover",children:f.jsx(bI,{size:16})}),f.jsx(Ft,{shape:"circle",onClick:r,"aria-label":o3(),title:o3(),className:"bg-background shadow-popover",children:f.jsx(_r,{size:16})})]}),f.jsxs("div",{className:"absolute bottom-6 inset-x-6 flex flex-col items-center gap-3 pointer-events-none",children:[n&&f.jsx("div",{className:"max-w-xl line-clamp-2 rounded-xl bg-background px-4 py-2 text-center text-sm leading-snug shadow-popover",children:n}),f.jsxs("div",{className:"pointer-events-auto flex items-center gap-1 rounded-full bg-background p-1.5 shadow-popover",children:[f.jsx(Ft,{shape:"circle",disabled:a<=.25,onClick:()=>o(m=>Math.max(.25,m-.25)),"aria-label":zN(),title:zN(),children:f.jsx(iyn,{size:16})}),f.jsxs(Me,{variant:"ghost",className:"min-w-16 tabular-nums",onClick:()=>o(1),title:jN(),"aria-label":jN(),children:[Math.round(a*100),"%"]}),f.jsx(Ft,{shape:"circle",disabled:a>=4,onClick:()=>o(m=>Math.min(4,m+.25)),"aria-label":NN(),title:NN(),children:f.jsx(yh,{size:16})})]})]})]}),document.body)}function Vzn({src:e,fallbackSrc:n,downloadName:t,alt:r="",...s}){const[i,a]=T.useState(!1),[o,l]=T.useState(!1),u=i&&n?n:e;return f.jsxs(f.Fragment,{children:[f.jsx("img",{...s,src:u,alt:r,role:"button",tabIndex:0,"aria-haspopup":"dialog",onClick:h=>{h.preventDefault(),h.stopPropagation(),l(!0)},onKeyDown:h=>{(h.key==="Enter"||h.key===" ")&&(h.preventDefault(),h.stopPropagation(),l(!0))},onError:!i&&n&&n!==e?()=>a(!0):void 0}),o&&u&&f.jsx(Gzn,{src:u,alt:r,name:t,onClose:()=>l(!1)})]})}const Kzn=1e5;function Wzn({code:e,lang:n}){const[t,r]=T.useState(!1),s=()=>{var i;(i=navigator.clipboard)==null||i.writeText(e).then(()=>{r(!0),setTimeout(()=>r(!1),1500)})};return f.jsxs("div",{className:"md-code relative my-2.5 mx-0 [&_pre]:m-0 [&:hover_.md-code-copy]:opacity-100",children:[f.jsx(Ft,{size:"small",className:"md-code-copy absolute top-1.5 end-1.5 bg-background opacity-0",title:Ok(),"aria-label":QXe(),onClick:s,children:t?f.jsx(Ji,{size:13}):f.jsx(Sb,{size:13})}),f.jsx("pre",{children:f.jsx("code",{children:K2n(e,n,Kzn)})})]})}function Qzn(e){const n={};for(const t of e.matchAll(/([\w-]+)=(["'])(.*?)\2/g)){const r=t[1];r&&(n[r.toLowerCase()]=t[3]??"")}return n}function BA(e,n,t){let r=n.line,s=n.column;for(let i=0;i]*?)\/?>/gi,r=[];let s=0,i=!1;for(const a of n.matchAll(t)){const o=(a[1]??"").toLowerCase(),l=Qzn(a[2]??"");if(!l[o==="run"?"id":"path"])continue;i=!0,a.index>s&&r.push({type:"text",value:n.slice(s,a.index),position:Xw(e,s,a.index)});const h=a.index+a[0].length;r.push({children:[],data:{hName:o==="run"?"run-mention":"file-mention",hProperties:l},position:Xw(e,a.index,h),type:o==="run"?"runMention":"fileMention"}),s=h}return i?(sBF(e)}function Yzn(){return e=>{const n=t=>{var r;for(const s of["href","src"])if(t.properties&&Object.hasOwn(t.properties,s)){const i=String(t.properties[s]||"");t.properties[s]=s==="src"&&t.tagName==="img"&&c6(i)?i:iP(i)}(r=t.children)==null||r.forEach(n)};n(e)}}function FA({path:e,lines:n,exp:t,onOpenFile:r}){const s=e.split("/").pop()||e,i=n&&Number.parseInt(n,10)||void 0,a=i!=null?`${s}:${i}`:s;return f.jsxs("button",{className:"file-chip",title:r?gY({path:Ne(e)}):e,...qr(o=>r==null?void 0:r(e,i,t,void 0,o)),disabled:!r,children:[f.jsx(yI,{size:12}),f.jsx("span",{className:"file-chip-label",children:a}),f.jsx(EI,{className:"file-chip-open",size:12,"aria-hidden":"true"})]})}function Zzn({id:e,label:n,onOpenRun:t}){return f.jsxs("button",{className:"file-chip run-chip",title:t?UY({id:Ne(e)}):GZ({id:Ne(e)}),...qr(r=>t==null?void 0:t(e,r)),disabled:!t,children:[f.jsx(rS,{size:12}),f.jsx("span",{className:"file-chip-label",children:n||pL()}),f.jsx(EI,{className:"file-chip-open",size:12,"aria-hidden":"true"})]})}const PF={singleDollarTextMath:!0},Jzn=ny().use(sy).use(MF).use(OF,PF).use(Ozn).use(Xzn).use(Pv).use(Yzn).use(lF);function ejn(e){return!(/^[a-z][a-z0-9+.-]*:/i.test(e)||e.startsWith("#")||e.startsWith("//"))}const FF={code:({node:e,className:n,children:t,...r})=>{const s=n??"",i=/language-(\w+)/.exec(s),a=String(t??"").replace(/\n$/,"");if(!(i!=null||a.includes(` +`)))return f.jsx("code",{className:s,...r,children:t});const l=i?R3(i[1]):null;return f.jsx(Wzn,{code:a,lang:l})},pre:({children:e})=>f.jsx(f.Fragment,{children:e})};function tjn({children:e}){return f.jsx("figure",{className:"my-6 mx-auto max-w-full text-left [&_img]:mx-auto [&_img]:my-0 [&_img]:w-auto [&_img]:h-auto [&_img]:max-h-[min(480px,60vh)] [&_img]:object-contain [&_img]:border-0 [&_img]:rounded-none",children:e})}const Qo=T.memo(function({text:n,onOpenFile:t,onOpenRun:r,resolveFilePath:s,resolveImageSrc:i,predict:a=!1}){sf();const o=T.useContext(IF),l=i??o,u=T.useMemo(()=>({"file-mention":h=>f.jsx(FA,{path:h.path,lines:h.lines,exp:h.exp,onOpenFile:t}),"run-mention":h=>f.jsx(Zzn,{id:h.id,label:h.label,onOpenRun:r}),a:({node:h,href:_,children:p,"data-figure-src":m,...x})=>{const k=typeof m=="string"?pB(m):null;if(k&&t){const v=k.source==="artifact"?`artifacts/${k.path}`:k.path,b=s?s(v):v;if(b)return f.jsx("button",{type:"button",className:"text-primary underline cursor-pointer text-start",...qr(w=>t(b,void 0,void 0,void 0,w)),children:p})}if(_&&ejn(_)&&t){let v;try{v=decodeURI(_)}catch{return f.jsx("span",{children:p})}const b=s?s(v):v;return b?f.jsx(FA,{path:b,onOpenFile:t}):f.jsx("span",{children:p})}return f.jsx("a",{href:_,target:"_blank",rel:"noopener noreferrer",...x,children:p})},figure:({children:h})=>f.jsx(tjn,{children:h}),figcaption:({children:h})=>f.jsx("figcaption",{className:"mt-3 text-sm italic leading-relaxed text-text",children:h}),th:({node:h,..._})=>f.jsx("th",{dir:"auto",..._}),td:({node:h,..._})=>f.jsx("td",{dir:"auto",..._}),img:({node:h,src:_,alt:p,className:m,...x})=>{var v;if(!_||typeof _!="string")return null;const k=l?l(_):_;return k?T.createElement(Vzn,{...x,key:k,downloadName:(v=_.split(/[\\/]/).pop())==null?void 0:v.split(/[?#]/)[0],src:k,fallbackSrc:i?null:o==null?void 0:o(_,!0),alt:p??"",loading:"lazy",className:`block max-w-full h-auto my-3 rounded-sm border border-border cursor-zoom-in focus-visible:outline-2 focus-visible:outline-primary ${m??""}`}):null},...FF}),[t,r,s,i,o,l]);return f.jsx("div",{dir:"auto","data-streaming":a||void 0,className:"md min-w-0 wrap-anywhere text-text leading-[1.62] [&_>_*:first-child]:mt-0 [&_>_*:last-child]:mb-0 [&_p]:my-2.5 [&_p]:mx-0 [&_strong]:text-text [&_strong]:font-semibold [&_pre]:bg-surface [&_pre]:border [&_pre]:border-border-muted [&_pre]:rounded-md [&_pre]:py-2 [&_pre]:px-3 [&_pre]:overflow-x-auto [&_pre]:text-sm [&_pre]:text-text [&_code]:font-mono [&_code]:text-sm [&_code]:font-medium [&_code]:text-primary [&_code]:bg-panel [&_code]:border [&_code]:border-border-variant [&_code]:rounded-xs [&_code]:py-px [&_code]:px-[5px] [&_.katex]:text-prose-emphasis [&_.katex-display]:my-3 [&_.katex-display]:mx-0 [&_.katex-display]:overflow-x-auto [&_.katex-display]:overflow-y-hidden [&_.katex-display]:py-0.5 [&_.katex-display]:px-0 [&_.file-chip]:inline-flex [&_.file-chip]:items-center [&_.file-chip]:gap-1 [&_.file-chip]:max-w-full [&_.file-chip]:my-0 [&_.file-chip]:mx-px [&_.file-chip]:py-0 [&_.file-chip]:px-1.5 [&_.file-chip]:align-baseline [&_.file-chip]:font-mono [&_.file-chip]:text-sm [&_.file-chip]:font-medium [&_.file-chip]:text-text [&_.file-chip]:bg-panel [&_.file-chip]:border [&_.file-chip]:border-border-variant [&_.file-chip]:rounded-xs [&_.file-chip]:cursor-pointer [&_.file-chip:hover:not(:disabled)]:bg-surface [&_.file-chip:hover:not(:disabled)]:text-primary [&_.file-chip_svg]:flex-none [&_.file-chip_svg]:opacity-60 [&_.file-chip-label]:max-w-65 [&_.file-chip-label]:overflow-hidden [&_.file-chip-label]:text-ellipsis [&_.file-chip-label]:whitespace-nowrap [&_.run-chip_svg]:opacity-100 [&_.run-chip_svg]:text-primary [&_pre_code]:bg-none [&_pre_code]:bg-transparent [&_pre_code]:border-0 [&_pre_code]:text-inherit [&_pre_code]:p-0 [&_pre_code]:font-normal [&_h1]:text-text [&_h1]:text-prose-emphasis [&_h1]:font-semibold [&_h1]:mt-3 [&_h1]:mx-0 [&_h1]:mb-1.5 [&_h2]:text-text [&_h2]:text-prose-emphasis [&_h2]:font-semibold [&_h2]:mt-3 [&_h2]:mx-0 [&_h2]:mb-1.5 [&_h3]:text-text [&_h3]:text-prose-emphasis [&_h3]:font-semibold [&_h3]:mt-3 [&_h3]:mx-0 [&_h3]:mb-1.5 [&_h4]:text-text [&_h4]:text-prose-emphasis [&_h4]:font-semibold [&_h4]:mt-3 [&_h4]:mx-0 [&_h4]:mb-1.5 [&_ul]:my-1.5 [&_ul]:mx-0 [&_ul]:ps-5.5 [&_ol]:my-1.5 [&_ol]:mx-0 [&_ol]:ps-5.5 [&_li::marker]:text-primary [&_a]:text-primary [&_table]:border-collapse [&_table]:block [&_table]:w-max [&_table]:max-w-full [&_table]:text-sm [&_table]:my-2.5 [&_table]:mx-0 [&_table]:border [&_table]:border-border [&_table]:rounded-md [&_table]:overflow-x-auto [&_th]:border-b [&_th]:border-b-border-variant [&_th]:py-2 [&_th]:px-3.5 [&_th]:text-start [&_th]:text-text [&_th]:break-normal [&_th]:break-words [&_td]:border-b [&_td]:border-b-border-variant [&_td]:py-2 [&_td]:px-3.5 [&_td]:text-start [&_td]:text-text [&_td]:break-normal [&_td]:break-words [&_tr:last-child_td]:border-b-0 [&_thead_th]:bg-surface [&_thead_th]:font-medium [&_thead_th]:text-text [&_thead_th]:border-b [&_thead_th]:border-b-border [&_tbody_tr:hover_td]:bg-surface-bright [&_blockquote]:my-1.5 [&_blockquote]:mx-0 [&_blockquote]:pt-0.5 [&_blockquote]:pe-0 [&_blockquote]:pb-0.5 [&_blockquote]:ps-2.5 [&_blockquote]:border-s-[3px] [&_blockquote]:border-s-border [&_blockquote]:text-subtext [:is(&,_.openresearch-diff,_.file-view)_.token.comment]:italic [:is(&,_.openresearch-diff,_.file-view)_.token.prolog]:italic [:is(&,_.openresearch-diff,_.file-view)_.token.cdata]:italic [:is(&,_.openresearch-diff,_.file-view)_.token.operator]:text-syntax-cyan [:is(&,_.openresearch-diff,_.file-view)_.token.entity]:text-syntax-cyan [:is(&,_.openresearch-diff,_.file-view)_.token.url]:text-syntax-cyan [:is(&,_.openresearch-diff,_.file-view)_.token.comment]:text-syntax-comment [:is(&,_.openresearch-diff,_.file-view)_.token.prolog]:text-syntax-comment [:is(&,_.openresearch-diff,_.file-view)_.token.cdata]:text-syntax-comment [:is(&,_.openresearch-diff,_.file-view)_.token.punctuation]:text-syntax-text [:is(&,_.openresearch-diff,_.file-view)_.token.property]:text-syntax-red [:is(&,_.openresearch-diff,_.file-view)_.token.tag]:text-syntax-red [:is(&,_.openresearch-diff,_.file-view)_.token.deleted]:text-syntax-red [:is(&,_.openresearch-diff,_.file-view)_.token.constant]:text-syntax-orange [:is(&,_.openresearch-diff,_.file-view)_.token.symbol]:text-syntax-orange [:is(&,_.openresearch-diff,_.file-view)_.token.boolean]:text-syntax-orange [:is(&,_.openresearch-diff,_.file-view)_.token.number]:text-syntax-orange [:is(&,_.openresearch-diff,_.file-view)_.token.selector]:text-syntax-green [:is(&,_.openresearch-diff,_.file-view)_.token.attr-name]:text-syntax-green [:is(&,_.openresearch-diff,_.file-view)_.token.char]:text-syntax-green [:is(&,_.openresearch-diff,_.file-view)_.token.inserted]:text-syntax-green [:is(&,_.openresearch-diff,_.file-view)_.token.string]:text-syntax-green [:is(&,_.openresearch-diff,_.file-view)_.token.builtin]:text-syntax-yellow [:is(&,_.openresearch-diff,_.file-view)_.token.atrule]:text-syntax-orange [:is(&,_.openresearch-diff,_.file-view)_.token.attr-value]:text-syntax-orange [:is(&,_.openresearch-diff,_.file-view)_.token.keyword]:text-syntax-purple [:is(&,_.openresearch-diff,_.file-view)_.token.function]:text-syntax-blue [:is(&,_.openresearch-diff,_.file-view)_.token.decorator]:text-syntax-blue [:is(&,_.openresearch-diff,_.file-view)_.token.def]:text-syntax-blue [:is(&,_.openresearch-diff,_.file-view)_.token.class-name]:text-syntax-yellow [:is(&,_.openresearch-diff,_.file-view)_.token.namespace]:text-syntax-yellow [:is(&,_.openresearch-diff,_.file-view)_.token.regex]:text-syntax-green [:is(&,_.openresearch-diff,_.file-view)_.token.important]:text-syntax-red [:is(&,_.openresearch-diff,_.file-view)_.token.variable]:text-syntax-red [:is(&,_.openresearch-diff,_.file-view)_.token.parameter]:text-syntax-text",children:f.jsx(BCn,{content:LF(n,{predictMath:a}),processor:Jzn,components:u,predict:a})})}),HA="prompt-actions plan-strip-actions flex flex-wrap justify-end gap-x-2 gap-y-1.5";function njn({synthesized:e,agentLabel:n,onView:t,onApprove:r,showResumeModes:s,onReject:i,onRevise:a}){const[o,l]=T.useState(!1),u=T.useRef(null),[h,_]=T.useState(!1),[p,m]=T.useState(""),x=T.useRef(null);T.useEffect(()=>{if(!o)return;const v=b=>{u.current&&!u.current.contains(b.target)&&l(!1)};return window.addEventListener("pointerdown",v),()=>window.removeEventListener("pointerdown",v)},[o]),T.useEffect(()=>{var v;h&&((v=x.current)==null||v.focus())},[h]);const k=()=>{a(p.trim()||"no specific feedback — use your judgment"),m(""),_(!1)};return f.jsxs("div",{className:"plan-strip relative w-full mt-0 mx-0 mb-2.5 py-[11px] px-[13px] flex flex-col items-stretch gap-2.5 border border-border border-s-[3px] border-s-accent-blue rounded-md bg-surface shadow-plan",children:[f.jsxs("div",{className:"plan-strip-info flex items-baseline gap-2 min-w-0",children:[f.jsx(rS,{size:14,className:"plan-strip-icon text-accent-blue shrink-0 self-center"}),f.jsx("span",{dir:"auto",className:"plan-strip-title text-sm font-semibold whitespace-nowrap",children:e?a1t({agent:Ne(n)}):Jgt({agent:Ne(n)})}),f.jsx("button",{className:"plan-strip-open ms-auto p-0 border-0 bg-none bg-transparent text-accent-blue text-sm cursor-pointer whitespace-nowrap shrink-0 [&:hover]:underline",...qr(t),children:E1t()})]}),h?f.jsxs(f.Fragment,{children:[f.jsx("textarea",{dir:"auto",ref:x,className:"plan-strip-revise-input w-full resize-none border border-border rounded-md py-[9px] px-[11px] text-sm font-[inherit] bg-background text-text [&:focus]:border-accent-blue",placeholder:evt(),rows:2,value:p,onChange:v=>m(v.target.value),onKeyDown:v=>{v.key==="Escape"?(v.preventDefault(),m(""),_(!1)):v.key==="Enter"&&!v.shiftKey&&(v.preventDefault(),k())}}),f.jsxs("div",{className:HA,children:[f.jsx(Me,{size:"small",onClick:()=>{m(""),_(!1)},children:$D()}),f.jsx("span",{className:"plan-strip-spacer flex-1"}),f.jsxs(Me,{size:"small",variant:"primary",onClick:k,children:[P1t(),f.jsx(gI,{size:13})]})]})]}):f.jsxs("div",{className:HA,children:[f.jsx(Me,{size:"small",onClick:i,children:M1t()}),f.jsx(Me,{size:"small",onClick:()=>_(!0),children:K1t()}),f.jsx("span",{className:"plan-strip-spacer flex-1"}),s?f.jsxs("div",{className:"plan-strip-approve relative flex",ref:u,children:[f.jsx(Me,{size:"small",variant:"primary",className:"rounded-e-none",onClick:()=>r("auto"),children:Rgt()}),f.jsx(Me,{size:"small",variant:"primary",className:"rounded-s-none border-s-plan-caret px-1.5","aria-label":b1t(),onClick:()=>l(v=>!v),children:f.jsx(Jo,{size:13})}),o&&f.jsx("div",{className:"plan-strip-menu absolute end-0 bottom-[calc(100%_+_4px)] flex min-w-47.5 flex-col rounded-md border border-border bg-surface p-1 shadow-plan-menu z-6",children:f.jsx(nr,{onClick:()=>{l(!1),r("bypassPermissions")},children:Bgt()})})]}):f.jsx(Me,{size:"small",variant:"primary",onClick:()=>r(),children:Vgt()})]})]})}function qA({save:e,onSaved:n,placeholder:t,createHref:r,createLabel:s}){const[i,a]=T.useState(""),[o,l]=T.useState(!1),[u,h]=T.useState(null);async function _(p){if(p.preventDefault(),!(o||!i.trim())){l(!0),h(null);try{n(await e(i.trim())),a("")}catch(m){h(m instanceof Error?m.message:String(m))}finally{l(!1)}}}return f.jsxs("form",{className:"onb-token-form flex items-center flex-wrap gap-2 mt-2 [&_input]:flex-1 [&_input]:min-w-55 [&_input]:text-sm [&_a]:text-sm [&_a]:text-subtext [&_a]:whitespace-nowrap [&_.error]:basis-full [&_.error]:text-accent-red [&_.error]:text-sm [&_.error]:whitespace-pre-wrap",onSubmit:_,children:[f.jsx("input",{type:"password",value:i,onChange:p=>a(p.target.value),placeholder:t,autoComplete:"off"}),f.jsx(Me,{type:"submit",disabled:o||!i.trim(),children:o?la():Zo()}),f.jsx("a",{href:r,target:"_blank",rel:"noreferrer",children:s??wqe()}),u&&f.jsx("div",{className:"error",children:u})]})}function HF({value:e,max:n,label:t,caption:r,fillColor:s}){const i=n>0?Math.min(100,Math.round(e/n*100)):0;return f.jsxs("div",{className:"progress mt-3 mx-0 mb-1",role:"progressbar","aria-valuenow":i,"aria-valuemin":0,"aria-valuemax":100,children:[f.jsx("div",{className:"progress-track h-2 rounded-full bg-surface border border-border overflow-hidden",children:f.jsx("div",{className:"progress-fill h-full bg-accent rounded-full transition-[width] duration-200 ease-standard",style:{width:`${i}%`,background:s}})}),(t!==void 0||r!==void 0)&&f.jsxs("div",{className:"progress-caption flex justify-between mt-1.5 text-sm text-muted",children:[f.jsx("span",{children:t??`${i}%`}),r]})]})}function rjn({settings:e}){const[n,t]=T.useState(!1);return f.jsxs("label",{className:"inline-flex max-w-full flex-wrap items-center gap-2 text-sm text-subtext",children:[Rsn(),f.jsx("span",{className:"inline-block w-max max-w-full",children:f.jsx(Ko,{variant:"field",dropDown:!0,value:e.defaultHost??"",disabled:n,choices:[{id:"",label:eL()},...e.defaultHost&&!e.hosts.some(r=>r.host===e.defaultHost)?[{id:e.defaultHost,label:e.defaultHost}]:[],...e.hosts.map(r=>({id:r.host,label:r.host}))],onSelect:r=>{t(!0),Z0n(r||null).catch(s=>{Bn(s instanceof Error?s.message:String(s),"error")}).finally(()=>t(!1))}})})]})}function sjn({host:e,connecting:n,reference:t,onChange:r}){const s=T.useId(),i=hn({mutationFn:Y0n,scope:{id:`ssh-settings-${e.host}`}});function a(o){r(o),i.reset(),!(o!==null&&!o.trim())&&i.mutate({host:e.host,container:(o==null?void 0:o.trim())??null})}return f.jsxs("details",{className:"pb-3",children:[f.jsx("summary",{className:"w-fit cursor-pointer rounded-sm text-sm text-subtext focus-visible:outline-2 focus-visible:outline-text",children:jD()}),f.jsxs("div",{className:"mt-3 grid max-w-xl gap-3",children:[f.jsxs("label",{className:"text-sm text-subtext",children:[Jsn(),f.jsx(Ko,{variant:"field",dropDown:!0,value:t!==null?"container":"host",disabled:n,choices:[{id:"host",label:Bsn()},{id:"container",label:Vsn()}],onSelect:o=>a(o==="container"?"":null)})]}),t!==null&&f.jsxs("label",{className:"text-sm text-subtext",htmlFor:`${s}-container`,children:[Csn(),f.jsx(Qr,{id:`${s}-container`,value:t,disabled:n,required:!0,onChange:o=>a(o.target.value)})]}),i.error&&f.jsx("p",{className:"m-0 text-sm text-accent-red",role:"status",children:i.error.message})]})]})}const Xo=["settings-card [&_>_.error]:text-accent-red [&_>_.error]:text-base","[&_>_.error]:whitespace-pre-wrap bg-background border border-border","rounded-lg py-4 px-4.5 mb-4 [&_h3]:mt-0 [&_h3]:mx-0 [&_h3]:mb-2.5","[&_h3]:text-base [&_h3]:font-semibold [&_h3]:text-text","[&_.settings-sub]:mb-3 [&_.kv]:gap-y-1.5 [&_.kv]:gap-x-4.5","[&_>_.project-default-row:first-child]:pt-0 [&_>_.project-default-row:first-child]:border-t-0"].join(" "),K_=["kv grid grid-cols-[auto_1fr] items-baseline gap-y-[3px] gap-x-3.5 text-base","[&_.k]:text-sm [&_.k]:text-subtext [&_.v]:text-base [&_.v]:text-text","[&_.v]:break-all"].join(" "),ijn=["grid grid-cols-[9rem_minmax(0,1fr)] items-center gap-x-5 gap-y-2.5 font-sans text-base text-text","[&_.k]:font-medium [&_.k]:text-sm [&_.k]:text-text","[&_.v]:min-w-0 [&_.v]:flex [&_.v]:items-center [&_.v]:flex-wrap [&_.v]:gap-2","[&_.v]:font-sans [&_.v]:text-base [&_.v]:text-text [&_.v]:break-words"].join(" "),vy="mt-3 mx-0 mb-0 ps-3 border-s-2 border-s-accent-red font-sans text-base leading-relaxed text-text whitespace-pre-wrap",Ta=["settings-note mt-2.5 mx-0 mb-0 text-base py-2 px-2.5","border border-accent-amber rounded-md bg-accent-amber-subtle","text-accent-amber font-medium"].join(" "),G6=["form font-sans text-sm text-text [&_.form-seg]:self-start [&_.form-seg]:mb-0.5","[&_.form-seg_button]:py-[5px] [&_.form-seg_button]:px-3","[&_.repo-hint]:font-normal [&_.repo-hint]:text-sm","[&_.repo-hint]:text-muted [&_.repo-hint.ok]:text-accent-teal","[&_.folder-picker-control]:flex [&_.folder-picker-control]:items-center","[&_.folder-picker-control]:gap-[9px] [&_.folder-picker-control]:w-full","[&_.folder-picker-control]:min-w-0 [&_.folder-picker-control]:py-2 [&_.folder-picker-control]:px-2.5","[&_.folder-picker-control]:overflow-hidden [&_.folder-picker-control]:bg-background","[&_.folder-picker-control]:border [&_.folder-picker-control]:border-border","[&_.folder-picker-control]:rounded-md [&_.folder-picker-control]:cursor-pointer","[&_.folder-picker-control]:text-start","[&_.folder-picker-control]:transition-[border-color,box-shadow] [&_.folder-picker-control]:duration-120 [&_.folder-picker-control]:ease-standard","[&_.folder-picker-control:hover:not(:disabled)]:border-muted","[&_.folder-picker-control:hover:not(:disabled)]:shadow-control-subtle","[&_.folder-picker-control:focus-visible]:outline-2 [&_.folder-picker-control:focus-visible]:outline-solid [&_.folder-picker-control:focus-visible]:outline-text","[&_.folder-picker-control:focus-visible]:outline-offset-2 [&_.folder-picker-control_span]:flex-1","[&_.folder-picker-control_span]:min-w-0 [&_.folder-picker-control_span]:overflow-hidden","[&_.folder-picker-control_span]:text-ellipsis [&_.folder-picker-control_span]:whitespace-nowrap","[&_.folder-picker-control_.placeholder]:text-muted [&_.folder-picker-icon]:flex-none","[&_.folder-picker-icon]:text-current [&_.folder-picker-chevron]:flex-none","[&_.folder-picker-chevron]:text-muted","[&_.folder-picker-control:hover:not(:disabled)_.folder-picker-chevron]:text-subtext","[&_.folder-picker-hint]:text-subtext [&_.folder-picker-hint]:text-sm","[&_.folder-picker-hint]:font-normal [&_.folder-picker-hint]:leading-[1.4]","[&_.project-location-field]:flex [&_.project-location-field]:flex-col","[&_.project-location-field]:gap-2 [&_.project-location-label]:text-text","[&_.project-location-label]:text-base","[&_.project-location-label]:font-medium [&_.project-field-label]:text-text","[&_.project-field-label]:text-base [&_.project-field-label]:font-medium","[&_.folder-picker-control:disabled]:cursor-default [&_.folder-picker-control:disabled]:opacity-65","[&_.paper-destination]:flex [&_.paper-destination]:items-center","[&_.paper-destination]:gap-2.5 [&_.paper-destination]:pt-2 [&_.paper-destination]:pe-2 [&_.paper-destination]:pb-2 [&_.paper-destination]:ps-3","[&_.paper-destination]:border [&_.paper-destination]:border-border [&_.paper-destination]:rounded-md","[&_.paper-destination]:bg-background [&_.paper-destination_code]:flex-1","[&_.paper-destination_code]:min-w-0 [&_.paper-destination_code]:overflow-hidden","[&_.paper-destination_code]:text-text [&_.paper-destination_code]:text-sm","[&_.paper-destination_code]:font-normal","[&_.paper-destination_code]:text-ellipsis [&_.paper-destination_code]:whitespace-nowrap","[&_.paper-destination_.btn]:flex-none [&_.project-path-notice]:py-[9px] [&_.project-path-notice]:px-[11px]","[&_.project-path-notice]:border [&_.project-path-notice]:border-border-variant","[&_.project-path-notice]:rounded-sm [&_.project-path-notice]:bg-surface","[&_.project-path-notice]:text-base [&_.project-path-notice]:leading-relaxed [&_.project-path-notice]:text-text","[&_.project-path-notice]:leading-[1.4]","[&_.project-path-notice.error]:border-danger-notice-border","[&_.paper-results]:flex [&_.paper-results]:flex-col","[&_.paper-results]:border [&_.paper-results]:border-border [&_.paper-results]:rounded-md","[&_.paper-results]:max-h-60 [&_.paper-results]:overflow-y-auto","[&_.paper-results_button]:flex [&_.paper-results_button]:flex-col","[&_.paper-results_button]:items-start [&_.paper-results_button]:gap-0.5","[&_.paper-results_button]:py-2 [&_.paper-results_button]:px-2.5 [&_.paper-results_button]:bg-none [&_.paper-results_button]:bg-transparent","[&_.paper-results_button]:border-0","[&_.paper-results_button]:border-b [&_.paper-results_button]:border-b-border-variant","[&_.paper-results_button]:text-start [&_.paper-results_button]:[font:inherit]","[&_.paper-results_button]:text-text [&_.paper-results_button]:cursor-pointer","[&_.paper-results_button:last-child]:border-b-0","[&_.paper-results_button:hover]:bg-surface [&_.paper-results_.title]:text-sm","[&_.paper-results_.title]:font-medium","[&_.paper-results_.id]:text-xs [&_.paper-results_.id]:text-muted","[&_.paper-pick_.id]:text-xs","[&_.paper-pick_.id]:text-muted [&_.paper-pick]:flex [&_.paper-pick]:items-center","[&_.paper-pick]:justify-between [&_.paper-pick]:gap-2.5 [&_.paper-pick]:py-2.5 [&_.paper-pick]:px-3","[&_.paper-pick]:border [&_.paper-pick]:border-border [&_.paper-pick]:rounded-md","[&_.paper-pick]:bg-surface [&_.paper-pick_.meta]:min-w-0","[&_.paper-pick_.title]:text-sm [&_.paper-pick_.title]:font-medium","flex flex-col gap-2.5 [&_label]:flex [&_label]:flex-col","[&_label]:gap-1 [&_label]:text-sm [&_label]:text-text","[&_label]:font-medium [&_.row2]:grid [&_.row2]:grid-cols-2","[&_input]:font-sans [&_input]:text-sm [&_input]:font-normal [&_input]:text-text [&_input::placeholder]:text-subtext","[&_select]:font-sans [&_select]:text-sm [&_select]:font-normal [&_select]:text-text","[&_.row2]:gap-2.5 [&_.actions]:flex [&_.actions]:justify-end","[&_.actions]:gap-2.5 [&_.actions]:mt-1.5 [&_.new-project-actions]:justify-start","[&_.new-project-actions]:mt-2.5","[&_.error]:text-accent-red [&_.error]:text-base [&_.error]:whitespace-pre-wrap","settings-form mt-3.5 pt-3.5 border-t border-t-border"].join(" "),Xl=["project-default-row flex items-center justify-between gap-6","pt-3.5 border-t border-t-border-variant [&_p]:mt-[3px] [&_p]:mx-0 [&_p]:mb-0","[&_.project-default-title]:text-base [&_p]:text-sm [&_p]:leading-relaxed [&_p]:text-text"].join(" "),z5=["settings-card [&_>_.error]:text-accent-red [&_>_.error]:text-base","[&_>_.error]:whitespace-pre-wrap bg-background border border-border","rounded-lg mb-4 [&_h3]:mt-0 [&_h3]:mx-0 [&_h3]:mb-2.5 [&_h3]:text-base","[&_h3]:font-semibold [&_h3]:text-text [&_.settings-sub]:mb-3","[&_>_.project-default-row:first-child]:pt-0 [&_>_.project-default-row:first-child]:border-t-0","git-settings-card py-3.5 px-4 [&_h3]:mb-3","[&_.kv]:grid-cols-[132px_minmax(0,_1fr)] [&_.kv]:items-center [&_.kv]:gap-y-[9px] [&_.kv]:gap-x-4.5","[&_.kv_.k]:text-sm [&_.kv_.v]:flex [&_.kv_.v]:items-center","[&_.kv_.v]:flex-wrap [&_.kv_.v]:gap-[7px] [&_.kv_.v]:min-w-0 [&_.kv_.v]:font-sans","[&_.kv_.v]:text-base [&_.kv_.v]:break-normal","[@media((max-width:_640px))]:[&_.kv]:grid-cols-1","[@media((max-width:_640px))]:[&_.kv]:gap-[3px] [@media((max-width:_640px))]:[&_.kv_.v_+_.k]:mt-[7px]"].join(" "),i0=["git-card-actions flex flex-wrap gap-2 mt-3.5 pt-3.5","border-t border-t-border-variant"].join(" "),ed=["settings-stack-section [&_+_.settings-stack-section]:mt-6 [&_>_:last-child]:mb-0","[&_>_h2]:mt-0 [&_>_h2]:mx-0 [&_>_h2]:mb-1.5 [&_>_h2]:text-xl"].join(" "),ajn=new Set(["gh auth login","hf auth login","claude auth status"]);function qF(e){return ajn.has(e)?`/api/settings/commands/run?command=${encodeURIComponent(e)}`:void 0}function by(){const[e,n]=T.useState(null);return{run:e,start:(r,s,i)=>n(a=>({command:r,path:s,owner:i,attempt:((a==null?void 0:a.attempt)??0)+1})),clear:()=>n(null)}}function V6({note:e,className:n,disabled:t,resolve:r=qF,onRun:s}){return e?f.jsx("p",{className:n,children:eh(e,{canRun:i=>!t&&r(i)!==void 0,onRun:i=>{const a=r(i);a&&s(i,a)}})}):null}function yy({run:e,onComplete:n,onClose:t}){return e?f.jsx(rxn,{path:e.path,label:e.command,onComplete:n,onError:r=>Bn(r,"error"),onClose:t},`${e.command}-${e.attempt}`):null}function Yw(e){return e.agentReady&&!e.authenticated&&e.authMethod!=="local"?{cls:"warn",variant:"warning",label:AD()}:e.agentReady?{cls:"ok",variant:"success",label:e.authMethod==="local"?Lk():kGt()}:e.installed?e.installBroken?{cls:"warn",variant:"warning",label:ELt()}:e.authMethod==="local"?{cls:"warn",variant:"warning",label:RD()}:e.needsConfigRepair||e.authState==="unknown"?{cls:"warn",variant:"warning",label:a3()}:e.authState==="unsupported"?{cls:"warn",variant:"warning",label:IKt()}:{cls:"warn",variant:"warning",label:tL()}:{cls:"warn",variant:"warning",label:YPt()}}function ojn({h:e}){return e.id==="opencode"&&e.agentReady&&!e.authenticated&&!e.authMethod?f.jsx(f.Fragment,{children:o9t()}):e.authMethod?e.authMethod==="local"?f.jsx(f.Fragment,{children:vv()}):f.jsx(f.Fragment,{children:e.authMethod==="oauth"?hTt():Dk()}):f.jsx(f.Fragment,{children:"—"})}function ljn(e,n,t){if(!n)return;const r=n.installUrl!==void 0&&t.includes(n.installUrl),s=t===n.login?"login":t===n.install?"install":t===n.update?"update":r?"install":null;if(s&&!(s!=="install"&&(!e.installed||e.installBroken)))return`/api/harnesses/setup?${new URLSearchParams({harness:e.id,action:s,shell:"true"})}`}function cjn({remote:e}){const n=yu(),{data:t=null}=ft(n),[r,s]=T.useState(null),[i,a]=T.useState(!1),o=by(),[l,u]=T.useState(null),h=ft(LL()),_=(x,k=!1)=>{a(!0),Xd(x,k).catch(()=>{}).finally(()=>a(!1))},p=[...t??[]].sort((x,k)=>Number(k.agentReady)-Number(x.agentReady)),m=p.find(x=>x.id===r)??p[0];return f.jsxs(f.Fragment,{children:[f.jsx("h2",{children:i3()}),!e&&l&&h.data&&f.jsx(GI,{harness:l,commands:h.data[l.id],onClose:()=>u(null)}),f.jsx("div",{className:"mt-3 mb-3.5 w-fit max-w-full [&_.option-menu]:w-max",children:f.jsx(Ko,{variant:"field",dropDown:!0,title:i3(),choices:p.map(x=>({id:x.id,label:x.name})),value:(m==null?void 0:m.id)??null,onSelect:x=>{const k=p.find(v=>v.id===x);k&&s(k.id)},renderIcon:x=>{const k=p.find(v=>v.id===x.id);return k&&f.jsx(w0,{harness:k.id})},renderLabel:x=>{const k=p.find(b=>b.id===x.id),v=k&&Yw(k);return f.jsxs("span",{className:"inline-flex items-center gap-2 whitespace-nowrap",children:[x.label,v&&f.jsxs(f.Fragment,{children:[f.jsx("span",{"aria-hidden":"true",className:`size-1.5 shrink-0 rounded-full bg-muted [&.ok]:bg-accent-green [&.err]:bg-accent-red [&.warn]:bg-accent-amber ${v.cls}`}),f.jsx("span",{className:"sr-only",children:v.label})]})]})}})}),t?m?f.jsxs("div",{className:Xo,children:[f.jsxs("div",{className:"settings-card-head flex items-center gap-2.5 mb-3",children:[f.jsx(Gt,{variant:Yw(m).variant,children:Yw(m).label}),f.jsx("div",{className:"spacer flex-1"}),!e&&m.installed&&!m.installBroken&&!m.authenticated&&!m.needsConfigRepair&&m.authMethod!=="local"&&m.authMethod!=="apiKey"&&m.authState!=="unsupported"&&f.jsxs(Me,{size:"small",onClick:()=>u(m),disabled:!h.data,"aria-haspopup":"dialog",children:[f.jsx(of,{size:14})," ",wD()]}),f.jsxs(Me,{size:"small",onClick:()=>_(!0,!0),disabled:i,children:[f.jsx(La,{size:12,className:i?"animate-[spin_0.9s_linear_infinite]":""})," ",_m()]})]}),f.jsxs("div",{className:vs(K_,"[&_.v]:text-sm"),children:[f.jsx("span",{className:"k",children:KAt()}),f.jsx("span",{className:"v",children:m.binPath??Fjt()}),f.jsx("span",{className:"k",children:oL()}),f.jsx("span",{className:"v",children:m.version??"—"}),f.jsx("span",{className:"k",children:hAt()}),f.jsx("span",{className:"v",children:f.jsx(ojn,{h:m})}),m.account&&f.jsxs(f.Fragment,{children:[f.jsx("span",{className:"k",children:m.id==="opencode"?qWt():Pk()}),f.jsx("span",{className:"v",children:m.account})]}),m.org&&f.jsxs(f.Fragment,{children:[f.jsx("span",{className:"k",children:cHt()}),f.jsx("span",{className:"v",children:m.org})]}),m.plan&&f.jsxs(f.Fragment,{children:[f.jsx("span",{className:"k",children:uqt()}),f.jsx("span",{className:"v",children:m.plan})]}),f.jsx("span",{className:"k",children:tAt()}),f.jsx("span",{className:"v",children:m.models.length>0?Ozt({count:Jt(m.models.length),models:new Intl.ListFormat(z()).format(m.models.slice(0,4).map(x=>Ne(I1(x))))}):Bk()})]}),f.jsx(V6,{note:m.agentNote,className:vs(Ta,"text-sm"),disabled:e,resolve:x=>{var k;return ljn(m,(k=h.data)==null?void 0:k[m.id],x)??qF(x)},onRun:(x,k)=>o.start(x,k,m.id)}),o.run&&f.jsx("div",{hidden:o.run.owner!==m.id,children:f.jsx(yy,{run:o.run,onComplete:()=>_(!0,!0),onClose:o.clear})}),m.id==="opencode"&&f.jsx(XI,{installed:m.installed})]}):null:f.jsxs(os,{children:[f.jsx(Rt,{})," ",FOt()]})]})}function ujn({s:e}){const n=e.preflight;return n.kubectlFound?n.reachable?n.canCreateJobs?f.jsx(Gt,{variant:"success",children:bMt()}):f.jsx(Gt,{variant:"error",children:YBt()}):f.jsx(Gt,{variant:"error",children:JRt()}):f.jsx(Gt,{variant:"error",children:dIt()})}function _jn({onEditState:e}){var A;const n=hn({mutationFn:H0n}),t=xz(),r=ft(t),s=r.data??null,i=j=>{Xr(t.queryKey,M=>(typeof j=="function"?j(M??null):j)??void 0)},a=s?null:((A=r.error)==null?void 0:A.message)??null,[o,l]=T.useState(""),[u,h]=T.useState(""),[_,p]=T.useState(!1),[m,x]=T.useState(!1),[k,v]=T.useState(null),b=j=>{i(j),l(j.context??""),h(j.namespace)},w=T.useRef(null);T.useEffect(()=>{const j=w.current;w.current=s,s&&(!j||o===(j.context??"")&&u.trim()===j.namespace)&&(l(s.context??""),h(s.namespace??""))},[s,o,u]);const y=s!==null&&o===(s.context??"")&&u.trim()===s.namespace,C=s!==null&&!y;T.useEffect(()=>{e==null||e({dirty:C,saving:_})},[C,_,e]);async function E(){if(!(m||_||!y)){x(!0);try{await rt.fetchQuery({...xz(),staleTime:0})}catch(j){Bn(j instanceof Error?j.message:String(j),"error")}finally{x(!1)}}}async function N(j){if(j.preventDefault(),!(_||m)){p(!0),v(null);try{b(await n.mutateAsync({context:o,namespace:u.trim()}))}catch(M){v(M instanceof Error?M.message:String(M))}finally{p(!1)}}}return f.jsx(f.Fragment,{children:a?f.jsx("p",{className:"m-0 text-sm text-accent-red whitespace-pre-wrap break-words",children:a}):s?f.jsxs(f.Fragment,{children:[f.jsxs("dl",{className:"m-0 flex items-center justify-between gap-4 text-sm",children:[f.jsx("dt",{className:"text-subtext",children:vh()}),f.jsx("dd",{className:"m-0",children:m||_?f.jsx(Gt,{children:sa()}):C?f.jsx(Gt,{children:vD()}):f.jsx(ujn,{s})})]}),y&&!m&&!_&&s.preflight.error&&f.jsx("p",{className:`${vy} break-words`,children:s.preflight.error}),f.jsxs("form",{className:"mt-5 flex flex-col gap-4",onSubmit:N,children:[f.jsxs("label",{className:"flex flex-col gap-2 text-sm font-medium text-subtext",children:[EMt(),f.jsx(Ko,{choices:[{id:"",label:s.currentContext?vNt({context:Ne(s.currentContext)}):_Nt()},...o&&!s.contexts.includes(o)?[{id:o,label:Wjt({context:Ne(o)})}]:[],...s.contexts.map(j=>({id:j,label:j}))],value:o,variant:"field",dropDown:!0,disabled:_||m,onSelect:l})]}),f.jsxs("label",{className:"flex flex-col gap-2 text-sm font-medium text-subtext",children:[nBt(),f.jsx(Qr,{type:"text",value:u,disabled:_||m,onChange:j=>h(j.target.value),placeholder:hOt(),autoComplete:"off",spellCheck:!1})]}),k&&f.jsx("p",{className:"m-0 text-sm text-accent-red whitespace-pre-wrap break-words",children:k}),f.jsxs("div",{className:"flex justify-end gap-2",children:[f.jsxs(Me,{type:"button",onClick:()=>void E(),disabled:_||m||!y,children:[f.jsx(La,{size:13})," ",m?sa():cm()]}),f.jsx(Me,{variant:"primary",type:"submit",disabled:_||m||y,children:_?la():Zo()})]})]})]}):f.jsxs(os,{children:[f.jsx(Rt,{})," ",yRt()]})})}function fjn(){var y;const e=hn({mutationFn:C=>U0n(...C)}),n=wz(),t=ft(n),r=t.data??null,s=C=>{Xr(n.queryKey,E=>(typeof C=="function"?C(E??null):C)??void 0)},[i,a]=T.useState(null),o=i??((y=t.error)==null?void 0:y.message)??null,[l,u]=T.useState(""),[h,_]=T.useState(""),[p,m]=T.useState(!1),x=t.isPending||p,[k,v]=T.useState(!1);async function b(){if(!(x||k)){m(!0),a(null);try{await rt.fetchQuery({...wz(),staleTime:0})}catch(C){a(C instanceof Error?C.message:String(C))}finally{m(!1)}}}async function w(C){if(C.preventDefault(),!(!l.trim()||!h.trim()||x||k||r!=null&&r.processEnv)){v(!0),a(null);try{s(await e.mutateAsync([l.trim(),h.trim()])),u(""),_("")}catch(E){a(E instanceof Error?E.message:String(E))}finally{v(!1)}}}return f.jsxs(f.Fragment,{children:[!r&&x?f.jsxs(os,{children:[f.jsx(Rt,{})," ",NRt()]}):r&&f.jsxs("dl",{className:"m-0 flex items-center justify-between gap-4 text-sm",children:[f.jsx("dt",{className:"font-medium text-subtext",children:vh()}),f.jsx("dd",{className:"m-0",children:f.jsx(Gt,{variant:r.tokenConfigured?"success":"warning",children:r.tokenConfigured?Hk():vb()})})]}),(r==null?void 0:r.processEnv)&&f.jsx("p",{className:"mt-2 mb-0 text-sm text-subtext",children:VNt()}),f.jsxs("form",{className:"mt-5 flex flex-col gap-4",onSubmit:w,children:[f.jsxs("label",{className:"flex flex-col gap-2 text-sm font-medium text-subtext",children:[r!=null&&r.tokenConfigured?JNt():yzt(),f.jsx(Qr,{type:"password",value:l,onChange:C=>u(C.target.value),placeholder:(r==null?void 0:r.maskedTokenId)??"ak-…",autoComplete:"new-password",disabled:r==null?void 0:r.processEnv})]}),f.jsxs("label",{className:"flex flex-col gap-2 text-sm font-medium text-subtext",children:[r!=null&&r.tokenConfigured?azt():Nzt(),f.jsx(Qr,{type:"password",value:h,onChange:C=>_(C.target.value),placeholder:(r==null?void 0:r.maskedTokenSecret)??"as-…",autoComplete:"new-password",disabled:r==null?void 0:r.processEnv})]}),f.jsx("a",{className:"self-start text-sm text-subtext underline",href:"https://modal.com/docs/sdk/py/latest/config",target:"_blank",rel:"noreferrer",children:dzt()}),o&&f.jsx("p",{className:"m-0 text-sm text-accent-red",children:o}),f.jsxs("div",{className:"flex justify-end gap-2",children:[f.jsxs(Me,{type:"button",disabled:x||k,onClick:()=>void b(),children:[f.jsx(La,{size:13})," ",_m()]}),f.jsx(Me,{variant:"primary",type:"submit",disabled:!l.trim()||!h.trim()||x||k||(r==null?void 0:r.processEnv),children:k?la():Zo()})]})]})]})}const UF="rounded-sm border-border-strong bg-surface text-subtext",GF="rounded-sm border-accent-blue bg-accent-blue-subtle text-accent-blue",djn=5e3;function VF(e){const n=Ra(),t=e.map(a=>kz(a)),r=EV({queries:t.map(a=>({...a,refetchInterval:djn}))});return[Object.fromEntries(e.flatMap((a,o)=>r[o].data?[[a,r[o].data.running]]:[])),a=>{$n(n)&&Xr(kz(a).queryKey,{running:!0})}]}function hjn({test:e,connecting:n,masterRunning:t,containerFailed:r=!1}){if(n)return f.jsx("span",{role:"status",children:f.jsx(Gt,{className:GF,children:UD()})});if(e===void 0)return f.jsx(Gt,{className:UF,children:JD()});const s=e.missingTools??[],i=e.reachable&&e.toolsFound&&t===!1,a=!e.reachable||r?f.jsx(Gt,{className:"rounded-sm",variant:"error",children:Fk()}):e.toolsFound?i?f.jsx(Gt,{className:"rounded-sm",variant:"warning",children:GD()}):f.jsx(Gt,{className:"rounded-sm",variant:"success",children:um()}):f.jsx(Gt,{className:"rounded-sm",variant:"error",children:s.length===1?Fzt({tool:Ne(s[0])}):Wzt()});return f.jsxs("div",{className:"flex items-center gap-4",role:"status",children:[a,!i&&f.jsx("span",{className:"ssh-tested-at whitespace-nowrap text-xs text-subtext",children:Vo(e.testedAt)})]})}function pjn({remote:e=!1}){var I;const n=DL(),t=ft(n),r=((I=t.data)==null?void 0:I.hosts)??(t.isError?[]:null),[s,i]=T.useState(!1),[a,o]=T.useState({}),[l,u]=T.useState({}),h=T.useRef(0),[_,p]=T.useState(!1),[m,x]=T.useState({}),[k,v]=T.useState(null),[b,w]=T.useState(!1),[y,C]=T.useState(0),E=e?[]:(r==null?void 0:r.filter(B=>{const q=a[B.host]??B.lastTest;return(q==null?void 0:q.reachable)&&q.toolsFound}).map(B=>B.host))??[],[N,A]=VF(E);function j(B){h.current+=1,p(!1),w(!1),C(q=>q+1),v(B),x(q=>({...q,[B]:!0}))}function M(){h.current+=1,p(!1),w(!1),v(null)}function L(B,q){x(U=>({...U,[B]:!q}))}return f.jsxs(f.Fragment,{children:[t.error&&f.jsx("p",{className:"text-sm text-accent-red",children:t.error.message}),f.jsxs("div",{className:"mb-3 flex flex-wrap items-center justify-between gap-3",children:[!e&&t.data&&f.jsx(rjn,{settings:t.data}),f.jsxs(Me,{variant:"ghost",className:"ms-auto",onClick:()=>i(!0),children:[f.jsx(sS,{size:14})," ",dL()]})]}),r===null?f.jsxs(os,{children:[f.jsx(Rt,{})," ",rL()]}):r.length===0?f.jsx("p",{className:"settings-empty mt-1 mx-0 mb-0 text-base text-subtext",children:UBt()}):f.jsx("div",{className:"border-y border-border-variant divide-y divide-border-variant",children:r.map(B=>{var ee,ce,ae;const q=l[B.host]===void 0?B.container??null:l[B.host],U=a[B.host],W=q!==null&&((ee=U==null?void 0:U.container)==null?void 0:ee.reference)===q.trim()?U:void 0,H=q!==null?W:U!=null&&U.container?B.lastTest:U??B.lastTest,Y=(ce=W==null?void 0:W.container)==null?void 0:ce.error,te=((ae=W==null?void 0:W.container)==null?void 0:ae.ready)===!1,$=(H==null?void 0:H.error)||Y,D=k===B.host,F=m[B.host]??!1,G=!e&&(D||!!$),V=`${B.user?`${B.user}@`:""}${B.hostname??B.host}${B.port?`:${B.port}`:""}`;return f.jsxs("div",{children:[f.jsxs("div",{className:"flex items-center gap-3 py-3",children:[f.jsx("div",{className:"flex min-w-0 flex-1 items-center gap-2.5",children:f.jsxs("div",{className:"min-w-0",children:[f.jsx("div",{className:"truncate text-base font-medium text-text",title:B.host,children:B.host}),f.jsx("div",{className:"mt-1 truncate text-sm text-subtext",title:V,children:V})]})}),!e&&f.jsxs("div",{className:"grid flex-none grid-cols-[8.5rem_5rem] items-center gap-x-12",children:[f.jsxs("div",{className:"flex items-center gap-2 text-start",children:[f.jsx(hjn,{test:H,connecting:D&&!b,masterRunning:N[B.host],containerFailed:te}),G&&f.jsx("button",{type:"button",className:"flex-none inline-flex items-center p-0.5 rounded-sm [&:hover]:bg-panel","aria-expanded":F,"aria-label":F?IQ({name:Ne(B.host)}):kX({name:Ne(B.host)}),onClick:re=>{re.stopPropagation(),L(B.host,F)},children:f.jsx(Jo,{size:18,className:`text-muted transition-transform duration-120 ease-standard${F?" rotate-180":""}`})})]}),f.jsx(Me,{size:"small",type:"button",className:"justify-self-end",onClick:re=>{re.stopPropagation(),D&&!b?M():j(B.host)},disabled:!D&&(k!==null&&!b||q!==null&&!q.trim()),children:D?b?Vs():P_():(H==null?void 0:H.reachable)===!1||te?Vs():H?lL():Ik()})]})]}),!e&&f.jsx(sjn,{host:B,connecting:D&&!b,reference:q,onChange:re=>{D&&M(),u(X=>({...X,[B.host]:re})),o(X=>{const oe={...X};return delete oe[B.host],oe})}}),G&&(F||D)&&f.jsxs("div",{className:`border-t border-t-border-variant py-3${F?"":" hidden"}`,children:[!D&&$&&f.jsx(sxn,{host:B.host,transcript:$}),D&&!_&&f.jsx(lS,{host:B.host,backend:"ssh",active:F,onComplete:re=>{if(re.backend!=="ssh")return;A(B.host);const X=h.current;if(q===null){o(oe=>({...oe,[B.host]:{...re.result,container:null}})),w(!1),v(null);return}p(!0),J0n(B.host,q.trim()).then(oe=>{h.current===X&&o(le=>({...le,[B.host]:{...oe,container:oe.container??{reference:q.trim(),ready:!1,error:oe.error??null}}}))}).catch(oe=>{h.current===X&&o(le=>({...le,[B.host]:{...re.result,container:{reference:q.trim(),ready:!1,error:oe instanceof Error?oe.message:String(oe)}}}))}).finally(()=>{h.current===X&&(p(!1),w(!1),v(null))})},onError:re=>{w(!0),o(X=>({...X,[B.host]:{container:q===null?null:{reference:q.trim(),ready:!1,error:re},reachable:!1,toolsFound:!1,missingTools:[],error:re,testedAt:Date.now()}}))}},y)]})]},B.host)})}),s&&f.jsx(x$,{onClose:()=>i(!1)})]})}function mjn({test:e,connecting:n,masterRunning:t}){return n?f.jsx(Gt,{className:GF,children:UD()}):e===null?f.jsx(Gt,{className:UF,children:JD()}):e.reachable?e.slurmFound?e.toolsFound?t===!1?f.jsx(Gt,{className:"rounded-sm",variant:"warning",children:GD()}):f.jsx(Gt,{className:"rounded-sm",variant:"success",children:um()}):f.jsx(Gt,{className:"rounded-sm",variant:"error",children:z$t()}):f.jsx(Gt,{className:"rounded-sm",variant:"error",children:CPt()}):f.jsx(Gt,{className:"rounded-sm",variant:"error",children:Fk()})}function gjn({remote:e=!1}){var $;const n=hn({mutationFn:umn}),t=dgn(),r=ft(t),s=r.data??null,i=D=>{Xr(t.queryKey,F=>(typeof D=="function"?D(F??null):D)??void 0)},a=s?null:(($=r.error)==null?void 0:$.message)??null,[o,l]=T.useState(""),[u,h]=T.useState(""),[_,p]=T.useState(""),[m,x]=T.useState(""),[k,v]=T.useState(!1),[b,w]=T.useState(null),[y,C]=T.useState(null),[E,N]=T.useState(!1),[A,j]=T.useState(!1),[M,L]=T.useState(0),I=!e&&o&&(y!=null&&y.reachable)&&y.slurmFound&&y.toolsFound?[o]:[],[B,q]=VF(I);function U(){j(!1),L(D=>D+1),N(!0)}const W=D=>{i(D),l(D.host??""),h(D.partition??""),p(D.account??""),x(D.timeLimit??"")},H=T.useRef(null);T.useEffect(()=>{const D=H.current;H.current=s,s&&(!D||o===(D.host??"")&&u.trim()===(D.partition??"")&&_.trim()===(D.account??"")&&m.trim()===(D.timeLimit??""))&&(l(s.host??""),h(s.partition??""),p(s.account??""),x(s.timeLimit??""))},[s,o,u,_,m]);const Y=s!==null&&o===(s.host??"")&&u.trim()===(s.partition??"")&&_.trim()===(s.account??"")&&m.trim()===(s.timeLimit??"");async function te(D){if(D.preventDefault(),!k){v(!0),w(null);try{W(await n.mutateAsync({host:o,partition:u.trim(),account:_.trim(),timeLimit:m.trim()}))}catch(F){w(F instanceof Error?F.message:String(F))}finally{v(!1)}}}return f.jsx(f.Fragment,{children:a?f.jsx("div",{className:"error",children:a}):s?f.jsxs(f.Fragment,{children:[!E&&(y==null?void 0:y.error)&&f.jsx("p",{className:vy,children:y.error}),f.jsxs("form",{className:G6,onSubmit:te,children:[f.jsx("div",{className:"max-w-xl",children:f.jsxs("label",{children:[h$t(),f.jsx(Ko,{choices:[{id:"",label:eL()},...o&&!s.hosts.some(D=>D.host===o)?[{id:o,label:`${o} (not in ~/.ssh/config)`}]:[],...s.hosts.map(D=>({id:D.host,label:D.host}))],value:o,variant:"field",dropDown:!0,disabled:k||E,onSelect:D=>{l(D),C(null),N(!1),j(!1)}})]})}),f.jsxs("div",{className:"actions",children:[!e&&f.jsx(Me,{type:"button",onClick:()=>{E&&!A?(j(!1),N(!1)):U()},disabled:!o,title:o?void 0:LWt(),children:E?A?Vs():P_():y?lL():Ik()}),f.jsx("span",{role:"status",children:f.jsx(mjn,{test:y,connecting:E&&!A,masterRunning:B[o]})})]}),f.jsxs("div",{className:"mt-5 border-t border-border pt-5",children:[f.jsxs("div",{className:"row2",children:[f.jsxs("label",{children:[XHt(),f.jsx(Qr,{type:"text",list:"slurm-partitions",value:u,onChange:D=>h(D.target.value),placeholder:oz(),autoComplete:"off",spellCheck:!1}),f.jsx("datalist",{id:"slurm-partitions",children:y==null?void 0:y.partitions.map(D=>f.jsx("option",{value:D},D))})]}),f.jsxs("label",{children:[Pk(),f.jsx(Qr,{type:"text",value:_,onChange:D=>p(D.target.value),placeholder:oz(),autoComplete:"off",spellCheck:!1})]})]}),f.jsxs("label",{className:"mt-3 block max-w-xl",children:[vKt(),f.jsx(Qr,{type:"text",value:m,onChange:D=>x(D.target.value),placeholder:VRt(),autoComplete:"off",spellCheck:!1})]})]}),b&&f.jsx("div",{className:"error",children:b}),f.jsx("div",{className:"actions",children:f.jsx(Me,{variant:"primary",type:"submit",disabled:k||Y||E,children:k?la():Zo()})})]}),!e&&E&&f.jsx(lS,{host:o,backend:"slurm",onComplete:D=>{D.backend==="slurm"&&(C(D.result),q(o),j(!1),N(!1))},onError:D=>{j(!0),C({reachable:!1,slurmFound:!1,toolsFound:!1,partitions:[],error:D})}},M)]}):f.jsxs(os,{children:[f.jsx(Rt,{})," ",PIt()]})})}function vjn(){var C;const e=hn({mutationFn:fmn}),n=hgn(),t=ft(n),r=t.data??null,s=E=>{Xr(n.queryKey,N=>(typeof E=="function"?E(N??null):E)??void 0)},i=r?null:((C=t.error)==null?void 0:C.message)??null,[a,o]=T.useState(""),[l,u]=T.useState(!1),[h,_]=T.useState(null),[p,m]=T.useState(null),x=p!==null&&p!=="testing"?p:null,k=E=>{s(E),o(E.address??"")},v=T.useRef(null);T.useEffect(()=>{const E=v.current;v.current=r,r&&(!E||a===(E.address??""))&&o(r.address??"")},[r,a]);const b=r!==null&&a===(r.address??"");async function w(E){if(E.preventDefault(),!l){u(!0),_(null);try{k(await e.mutateAsync({address:a}))}catch(N){_(N instanceof Error?N.message:String(N))}finally{u(!1)}}}async function y(){m("testing");try{m(await dmn(a.trim()||void 0))}catch(E){m({reachable:!1,address:a.trim()||"(unknown)",rayVersion:null,error:E instanceof Error?E.message:String(E)})}}return f.jsx(f.Fragment,{children:i?f.jsx("div",{className:"error",children:i}):r?f.jsxs(f.Fragment,{children:[(x==null?void 0:x.error)&&f.jsx("p",{className:vy,children:x.error}),f.jsxs("form",{className:G6,onSubmit:w,children:[f.jsxs("label",{children:[aIt(),f.jsx(Qr,{type:"text",value:a,onChange:E=>{o(E.target.value),m(null)},placeholder:"http://127.0.0.1:8265",autoComplete:"off",spellCheck:!1})]}),f.jsxs("p",{className:"m-0 text-sm text-subtext",children:[tDt(),": ",Ne(r.resolvedAddress)," · ",sL(),": ",r.source]}),h&&f.jsx("div",{className:"error",children:h}),f.jsxs("div",{className:"actions",children:[f.jsx(Me,{variant:"primary",type:"submit",disabled:l||b,children:l?la():Zo()}),f.jsx(Me,{type:"button",onClick:()=>void y(),disabled:p==="testing",children:TVt()}),f.jsx(bjn,{test:p})]}),(x==null?void 0:x.reachable)&&x.rayVersion&&f.jsxs("p",{className:"m-0 text-sm text-subtext",children:[Sqt(),": ",x.rayVersion]})]})]}):f.jsxs(os,{children:[f.jsx(Rt,{})," ",MIt()]})})}function bjn({test:e}){return e===null?null:e==="testing"?f.jsx(Gt,{children:IVt()}):e.reachable?f.jsx(Gt,{variant:"success",children:Aqt()}):f.jsx(Gt,{variant:"error",children:Fk()})}function yjn(e){const n=e.chip??`${e.os}/${e.arch}`,t=e.memBytes===null?null:Wl(e.memBytes),r=e.gpus.length===0?null:H9t({count:e.gpus.length});return[n,e.cpuCount>0?h8t({count:e.cpuCount}):null,t,r].filter(Boolean).join(" · ")}function xjn({remote:e}){var p;const n=ft(mgn()),t=n.data,r=(p=n.error)==null?void 0:p.message,s=n.isFetching,[i,a]=T.useState(0),[o,l]=T.useState(!0),[u,h]=T.useState(!1),_=()=>n.refetch();return f.jsxs(f.Fragment,{children:[r&&!t?f.jsx("div",{className:"error",children:r}):f.jsxs(f.Fragment,{children:[f.jsxs("div",{className:ijn,children:[f.jsx("span",{className:"k",children:vh()}),f.jsx("span",{className:"v",children:!t&&s||u?f.jsxs(Gt,{className:"gap-1.5",role:"status",children:[f.jsx(Rt,{}),u?zTt():sa()]}):r?f.jsx(Gt,{variant:"warning",children:a3()}):t?t.loggedIn?t.sshKeyStatus==="matched"?f.jsx(Gt,{variant:"success",children:um()}):t.sshKeyStatus==="unknown"?f.jsx(Gt,{variant:"warning",children:a3()}):f.jsx(Gt,{variant:"warning",children:vb()}):f.jsx(Gt,{variant:"warning",children:tL()}):null}),f.jsx("span",{className:"k",children:mHt()}),f.jsx("span",{className:"v",children:t!=null&&t.loggedIn&&t.orgs.length>0?t.orgs.join(", "):"—"}),f.jsx("span",{className:"k",children:LGt()}),f.jsx("span",{className:"v",children:t!=null&&t.loggedIn?t.sshKeyStatus==="matched"?f.jsx(Gt,{variant:"success",children:TFt()}):t.sshKeyStatus==="no_local_match"?f.jsx(Gt,{variant:"warning",children:_Ft()}):t.sshKeyStatus==="none_registered"?f.jsx(Gt,{variant:"error",children:RPt()}):f.jsx(Gt,{children:iL()}):"—"})]}),e&&t&&!t.loggedIn&&f.jsx("p",{className:"mt-4 mb-0 text-sm text-subtext",children:RNt({command:Ne("orx login")})}),!e&&i>0&&f.jsx(nxn,{login:o,onComplete:()=>{h(!1),a(0),_()},onError:m=>{h(!1),Bn(m,"error")}},i),e&&(t==null?void 0:t.loggedIn)&&t.sshKeyStatus==="none_registered"&&(t.sshKeyPath?f.jsxs("p",{dir:"auto",className:Ta,children:[FTt()," ",f.jsxs("code",{children:["orx ssh-key add ",t.sshKeyPath]}),"."]}):f.jsxs("p",{dir:"auto",className:Ta,children:[vPt()," ",f.jsx("code",{children:"ssh-keygen -t ed25519"}),UVt()," ",f.jsx("code",{children:"orx ssh-key add"}),"."]})),e&&(t==null?void 0:t.loggedIn)&&t.sshKeyStatus==="no_local_match"&&(t.sshKeyPath?f.jsx("p",{dir:"auto",className:Ta,children:nQt({register:Ne(`orx ssh-key add ${t.sshKeyPath}`),load:Ne("ssh-add")})}):f.jsxs("p",{dir:"auto",className:Ta,children:[_Pt()," ",f.jsx("code",{children:"ssh-add"}),nHt()," ",f.jsx("code",{children:"ssh-keygen -t ed25519"}),"."]})),!s&&(r||(t==null?void 0:t.error))&&f.jsx("p",{dir:"auto",className:"mt-4 mb-0 text-sm text-accent-red whitespace-pre-wrap break-words",children:r||(t==null?void 0:t.error)})]}),f.jsxs("div",{className:"mt-4 flex justify-end gap-2",children:[f.jsxs(Me,{onClick:()=>void _(),disabled:s||u,children:[f.jsx(La,{size:13})," ",s?sa():cm()]}),!e&&t&&(!t.loggedIn||t.sshKeyStatus!=="matched")&&f.jsxs(Me,{variant:"primary",disabled:s||u,onClick:()=>{l(!t.loggedIn),h(!0),a(m=>m+1)},children:[u?f.jsx(Rt,{}):f.jsx(of,{size:13})," ",t.loggedIn?UXt():cL()]})]})]})}const wjn={local:kNe,ssh:sze,tinker:_ze,hf:cNe,modal:TNe,k8s:mNe,slurm:YNe,ray:UNe,openresearch:INe},xy={local:"local_job",tinker:"tinker_job",hf:"hf_job",modal:"modal_job",k8s:"k8s_job",ssh:"ssh_job",slurm:"slurm_job",ray:"ray_job",openresearch:"openresearch_job"},UA=["hf","modal","slurm","ray","openresearch"],Zw=["hf","modal","openresearch"],KF={hf:["cpu-basic","t4-small","a10g-small","a10g-large","a100-large","h100","h200"],modal:["cpu","t4","l4","a10g","a100","a100-80gb","l40s","h100","h100:2"],slurm:["gpu","h100:1","h100:2","a100:4"],ray:["cpu","cpu:2","gpu","gpu:1","gpu:1,cpu:4","gpu:1,mem:8GiB"],openresearch:["h100_sxm","h100_sxm:2","cpu5c","cpu5g","cpu5m"]},j5=["tinker","hf","modal","ray","k8s"],kjn={tinker:Kje,hf:Eje,modal:Mje,openresearch:Pje},GA="__custom__";function Mp(e,n){return!!(n&&!(KF[e]??[]).includes(n))}function Sjn({settings:e,projectId:n,onSaved:t}){const r=hn({mutationFn:pmn}),s=e.configuredDefaultBackend??e.defaultBackend??"local",i=e.defaultFlavor??"",[a,o]=T.useState(s),[l,u]=T.useState(i),[h,_]=T.useState(Mp(s,i)),[p,m]=T.useState(!1),[x,k]=T.useState(null),v=e.targets.find(B=>B.id===a),b=e.targets.filter(B=>B.configured||B.id===s),w=UA.includes(a),y=Zw.includes(a),C=KF[a]??[],E=a===s&&(!w||l.trim()===i),N=G_[a](),A=kjn[a],j=p?YZt():y&&!l.trim()?H7t({destination:N}):a==="ssh"?ljt():tjt({destination:N});T.useEffect(()=>{o(s),u(i),_(Mp(s,i))},[s,i]);async function M(B,q){const U=UA.includes(B);if(!(p||Zw.includes(B)&&!q.trim())){m(!0),k(null);try{t(await r.mutateAsync({backend:B,flavor:U&&q.trim()||null,projectId:n}))}catch(W){k(W instanceof Error?W.message:String(W)),o(s),u(i),_(Mp(s,i))}finally{m(!1)}}}function L(B){const q=e.targets.find(W=>W.id===B);if(!q)return;o(q.id);const U=q.id===s?i:"";u(U),_(Mp(q.id,U)),Zw.includes(q.id)||M(q.id,U)}function I(B){if(B===GA){_(!0);return}_(!1),u(B),(!y||B)&&M(a,B)}return f.jsxs("section",{className:"mb-8",children:[f.jsx("h2",{className:"mt-0 mx-0 mb-2 text-lg",children:NOt()}),f.jsxs("div",{children:[f.jsxs("form",{className:"grid grid-cols-[minmax(12rem,18rem)_minmax(12rem,18rem)] items-start gap-3",onSubmit:B=>{B.preventDefault(),E||M(a,l)},children:[f.jsx(Ko,{choices:b.map(B=>({id:B.id,label:G_[B.id]()})),value:a,variant:"field",dropDown:!0,disabled:p,renderIcon:B=>{const q=e.targets.find(U=>U.id===B.id);return q?f.jsx(xh,{kind:xy[q.id],size:16}):null},onSelect:L}),w&&f.jsx("div",{children:h?f.jsxs("div",{className:"relative",children:[f.jsx("input",{className:"h-9 w-full rounded-md border border-border bg-background py-0 pe-10 ps-3 font-sans text-sm text-text outline-none focus:border-text",type:"text",value:l,onChange:B=>u(B.target.value),onBlur:()=>{if(y&&!l.trim()){a===s&&(u(i),_(Mp(s,i)));return}E||M(a,l)},placeholder:KMt(),autoFocus:!0,autoComplete:"off",spellCheck:!1,disabled:p}),f.jsx("button",{type:"button",className:"absolute inset-y-0 end-0 inline-flex w-9 items-center justify-center text-muted hover:text-text","aria-label":az(),title:az(),onMouseDown:B=>B.preventDefault(),onClick:()=>_(!1),children:f.jsx(Jo,{size:12})})]}):f.jsx(Ko,{choices:[{id:"",label:y?D7t():wjt()},...l&&!C.includes(l)?[{id:l,label:D8t({value:Ne(l)})}]:[],...C.map(B=>({id:B,label:B})),{id:GA,label:eOt()}],value:l,variant:"field",dropDown:!0,disabled:p,onSelect:I})})]}),x&&f.jsx("div",{className:"error mt-2.5",children:x}),v&&!v.configured&&f.jsx("p",{className:Ta,children:sKt()})]}),f.jsx("p",{className:"mt-2 mb-0 text-sm leading-relaxed text-subtext",children:j}),A&&f.jsx("p",{className:"mt-1 mb-0 text-sm leading-relaxed text-subtext",children:A()})]})}function Cjn({target:e,isDefault:n,summary:t,onOpen:r,onOpenEnvironment:s}){const i=`compute-${e.id}-summary`,a=e.unverified?x7t():e.id==="openresearch"?cL():e.id==="ray"?Ik():IXt();return f.jsxs("div",{className:`group relative flex min-h-41 w-full flex-col items-start rounded-lg border border-border bg-background p-5 text-start font-sans ${r&&e.enabled?"transition-colors duration-120 ease-standard hover:border-text hover:bg-surface":""} ${e.enabled?"":"opacity-52"}`,children:[r&&f.jsx("button",{type:"button",className:"absolute inset-0 z-10 rounded-lg focus-visible:outline-2 focus-visible:outline-text focus-visible:outline-offset-2 disabled:cursor-default",onClick:r,disabled:!e.enabled,"aria-label":G_[e.id](),"aria-describedby":i,"aria-haspopup":j5.includes(e.id)?"dialog":void 0}),f.jsx("span",{className:"flex h-16 w-40 flex-none items-center justify-start",children:f.jsx(xh,{kind:xy[e.id],size:48})}),f.jsx("span",{className:"mt-5 text-lg font-semibold text-text",children:G_[e.id]()}),f.jsx("span",{className:"mt-1 line-clamp-2 min-h-9 text-sm leading-normal text-text",children:wjn[e.id]()}),f.jsx("span",{id:i,className:"mt-2 line-clamp-2 min-h-8 text-xs leading-normal text-subtext",children:e.fromEnvironmentTab?f.jsxs(f.Fragment,{children:[e.id==="tinker"?sNt():kZt()," ",f.jsx("button",{type:"button",className:"relative z-20 text-primary underline-offset-2 hover:text-primary-hover hover:underline",onClick:s,children:e9t()})]}):t??e.summary}),f.jsxs("span",{className:"mt-auto flex w-full items-center justify-between gap-3 pt-3 text-sm",children:[f.jsx("span",{className:n?"font-medium text-primary":"text-subtext",children:n?XD():e.configured?!r||j5.includes(e.id)?Hk():gJt():a}),r&&f.jsx("span",{className:"text-subtext transition-transform duration-120 ease-standard group-hover:translate-x-0.5","aria-hidden":"true",children:f.jsx(B1,{size:16})})]})]})}function Ejn({target:e,isDefault:n,onBack:t,remote:r}){return f.jsxs(f.Fragment,{children:[f.jsxs("button",{type:"button",className:"settings-back mb-6 inline-flex items-center gap-2 text-sm font-medium text-subtext hover:text-text",onClick:t,children:[f.jsx(b0,{size:16})," ",WD()]}),f.jsxs("div",{className:"flex items-center justify-between gap-6",children:[f.jsxs("div",{className:"flex min-w-0 items-center gap-3",children:[f.jsx("span",{className:"flex h-10 w-10 flex-none items-center justify-center",children:f.jsx(xh,{kind:xy[e.id],size:36})}),f.jsx("h1",{className:"m-0 min-w-0 text-2xl",children:G_[e.id]()})]}),n&&f.jsx(Gt,{className:"flex-none border-primary bg-primary-subtle text-primary",children:XD()})]}),f.jsxs("div",{className:"mt-6 font-sans text-base text-text [&_.settings-card]:mb-0 [&_.settings-form]:mt-6 [&_.settings-form]:border-t-0 [&_.settings-form]:pt-0 [&>.settings-form:first-child]:mt-0 [&>div:first-child]:border-t-0",children:[e.id==="ssh"&&f.jsx(pjn,{remote:r}),e.id==="slurm"&&f.jsx(gjn,{remote:r}),e.id==="openresearch"&&f.jsx(xjn,{remote:r})]})]})}function Njn({target:e,remote:n,onClose:t}){const r=T.useRef(null),[s,i]=T.useState({dirty:!1,saving:!1});T.useEffect(()=>{const o=r.current;return o==null||o.showModal(),()=>o==null?void 0:o.close()},[]);const a=()=>{s.saving||s.dirty&&!window.confirm(YEt())||t()};return f.jsxs("dialog",{ref:r,className:"m-auto w-140 max-w-[calc(100vw_-_40px)] max-h-[calc(100vh_-_40px)] overflow-y-auto rounded-xl border border-border bg-background p-5 text-text shadow-modal backdrop:bg-modal-backdrop-light","aria-labelledby":"compute-quick-setup-title",onKeyDown:o=>{o.key==="Escape"&&(o.preventDefault(),a())},onCancel:o=>{o.preventDefault(),a()},children:[f.jsxs("div",{className:"mb-5 flex items-center justify-between gap-4",children:[f.jsxs("div",{className:"flex min-w-0 items-center gap-3",children:[f.jsx(xh,{kind:xy[e.id],size:32}),f.jsx("h2",{id:"compute-quick-setup-title",className:"m-0 text-xl font-medium text-text",children:G_[e.id]()})]}),f.jsx(Ft,{title:p0(),"aria-label":p0(),onClick:a,disabled:s.saving,children:f.jsx(_r,{size:14})})]}),e.id==="tinker"&&f.jsx(jjn,{target:e}),e.id==="hf"&&f.jsx(Ajn,{remote:n}),e.id==="modal"&&f.jsx(fjn,{}),e.id==="ray"&&f.jsx(vjn,{}),e.id==="k8s"&&f.jsx(_jn,{onEditState:i})]})}function zjn({project:e,onViewHistory:n,onOpenEnvironment:t,remote:r}){var M,L;const s=OL(e==null?void 0:e.id),i=ft(s),a=i.data??null,o=I=>{Xr(s.queryKey,B=>(typeof I=="function"?I(B??null):I)??void 0)},l=a?null:((M=i.error)==null?void 0:M.message)??null,[u,h]=T.useState(null),[_,p]=T.useState(null),m=pgn(),x=ft(m),k=x.data??null,v=((L=x.error)==null?void 0:L.message)??null;T.useEffect(()=>{h(null),p(null)},[e==null?void 0:e.id]);const b=I=>{o(I),p(null)},w=a?a.targets:null,y=(a==null?void 0:a.configuredDefaultBackend)??(a==null?void 0:a.defaultBackend),C=w?[...w].sort((I,B)=>+(B.id===y)-+(I.id===y)):null,E=(C==null?void 0:C.filter(I=>I.configured))??[],N=(C==null?void 0:C.filter(I=>!I.configured))??[],A=I=>f.jsx(Cjn,{target:I,isDefault:y===I.id,summary:I.id==="local"?k?yjn(k):v??OOt():void 0,onOpen:I.id==="local"?void 0:()=>h(I.id),onOpenEnvironment:t},`${(e==null?void 0:e.id)??"none"}:${I.id}`),j=u?a==null?void 0:a.targets.find(I=>I.id===u):null;return j&&!j5.includes(j.id)?f.jsx(Ejn,{target:j,isDefault:y===j.id,onBack:()=>h(null),remote:r}):f.jsxs(f.Fragment,{children:[f.jsx("h1",{children:QD()}),f.jsx("p",{className:"settings-sub mt-0 mx-0 mb-4.5 text-base leading-relaxed text-text",children:fMt()}),f.jsx(Wjn,{projectId:e==null?void 0:e.id,onViewHistory:n}),l?f.jsx("div",{className:"error",children:l}):a?f.jsxs(f.Fragment,{children:[_&&f.jsx("div",{className:"error",children:_}),f.jsx(Sjn,{settings:a,projectId:e==null?void 0:e.id,onSaved:b}),f.jsxs("section",{className:"mb-8",children:[f.jsx("h2",{className:"mt-0 mx-0 mb-2 text-lg",children:Hk()}),f.jsx("div",{className:"grid grid-cols-1 gap-4 sm:grid-cols-2 lg:grid-cols-3",children:E.map(A)})]}),N.length>0&&f.jsxs("section",{className:"mb-3.5",children:[f.jsx("h2",{className:"mt-0 mx-0 mb-2 text-lg",children:D$t()}),f.jsx("div",{className:"grid grid-cols-1 gap-4 sm:grid-cols-2 lg:grid-cols-3",children:N.map(A)})]}),j&&f.jsx(Njn,{target:j,remote:r,onClose:()=>h(null)})]}):f.jsxs(os,{children:[f.jsx(Rt,{})," ",dRt()]})]})}function jjn({target:e}){var w;const n=hn({mutationFn:D0n}),[t,r]=T.useState(""),[s,i]=T.useState(!1),[a,o]=T.useState(null),l=yz(),u=ft(l),h=u.data??null,_=a??((w=u.error)==null?void 0:w.message)??null,p=y=>{Xr(l.queryKey,C=>(typeof y=="function"?y(C??null):y)??void 0)},[m,x]=T.useState(!1),k=u.isPending||m;async function v(){if(!(k||s)){x(!0),o(null);try{await rt.fetchQuery({...yz(),staleTime:0})}catch(y){o(y instanceof Error?y.message:String(y))}finally{x(!1)}}}async function b(y){if(y.preventDefault(),!(!t.trim()||s||k)){i(!0),o(null);try{p(await n.mutateAsync(t.trim())),r("")}catch(C){o(C instanceof Error?C.message:String(C))}finally{i(!1)}}}return f.jsxs(f.Fragment,{children:[!h&&k?f.jsxs(os,{children:[f.jsx(Rt,{})," ",sa()]}):h&&f.jsxs("dl",{className:"m-0 flex items-center justify-between gap-4 text-sm",children:[f.jsx("dt",{className:"font-medium text-subtext",children:vh()}),f.jsx("dd",{className:"m-0",children:f.jsx(Gt,{variant:h.validationStatus==="valid"?"success":h.validationStatus==="invalid"?"error":"warning",children:h.validationStatus==="valid"?um():h.validationStatus==="invalid"?mZt():h.validationStatus==="billingRequired"?nZt():vb()})})]}),(h==null?void 0:h.validationStatus)==="billingRequired"&&f.jsx("p",{className:"mt-2 mb-0 text-sm text-subtext",children:f.jsx("a",{className:"underline",href:"https://tinker.thinkingmachines.ai/",target:"_blank",rel:"noreferrer",children:QYt()})}),(h==null?void 0:h.processEnv)&&f.jsx("p",{className:"mt-2 mb-0 text-sm text-subtext",children:cZt()}),f.jsxs("form",{className:"mt-5 flex flex-col gap-4",onSubmit:b,children:[f.jsxs("label",{className:"flex flex-col gap-2 text-sm font-medium text-subtext",children:[e.configured||h!==null&&h.validationStatus!=="missing"?XQt():Dk(),f.jsx(Qr,{type:"password",value:t,placeholder:(h==null?void 0:h.maskedKey)??"",onChange:y=>r(y.target.value),autoComplete:"new-password"})]}),_&&f.jsx("p",{className:"m-0 text-sm text-accent-red",children:_}),f.jsxs("div",{className:"flex justify-end gap-2",children:[f.jsxs(Me,{type:"button",disabled:s||k,onClick:()=>void v(),children:[f.jsx(La,{size:13})," ",k?sa():cm()]}),f.jsx(Me,{variant:"primary",type:"submit",disabled:!t.trim()||s||k,children:s?_L():Zo()})]})]})]})}function Tjn({settings:e}){return e.validationStatus==="missing"?f.jsx(Gt,{variant:"warning",children:vb()}):e.validationStatus==="invalid"?f.jsx(Gt,{variant:"error",children:JLt()}):e.validationStatus!=="valid"?null:e.jobsWrite===!0?f.jsx(Gt,{variant:"success",children:um()}):e.jobsWrite===!1?f.jsxs("span",{className:"inline-flex items-center gap-2",children:[f.jsx(Gt,{variant:"warning",children:sPt()}),f.jsx(Yk,{content:cEt(),className:"text-subtext",children:f.jsx(eS,{size:15})})]}):null}function Ajn({remote:e}){var w;const n=hn({mutationFn:M0n}),t=bz(),r=ft(t),s=r.data??null,i=y=>{Xr(t.queryKey,C=>(typeof y=="function"?y(C??null):y)??void 0)},a=s?null:((w=r.error)==null?void 0:w.message)??null,[o,l]=T.useState(""),[u,h]=T.useState(!1),[_,p]=T.useState(!1),[m,x]=T.useState(null),k=by();async function v(){if(!(u||_||!s&&!a)){p(!0),x(null);try{await rt.fetchQuery({...bz(),staleTime:0})}catch(y){x(y instanceof Error?y.message:String(y))}finally{p(!1)}}}async function b(y){if(y.preventDefault(),!(!o.trim()||u||_||!s&&!a)){h(!0),x(null);try{const C=await n.mutateAsync(o.trim());i(C),x(null),l("")}catch(C){x(C instanceof Error?C.message:String(C))}finally{h(!1)}}}return f.jsxs(f.Fragment,{children:[a?f.jsx("div",{className:"error",children:a}):s?f.jsxs(f.Fragment,{children:[f.jsxs("dl",{className:"m-0 flex flex-col gap-3 text-sm",children:[s.username&&f.jsxs("div",{className:"flex items-center justify-between gap-4",children:[f.jsx("dt",{className:"font-medium text-subtext",children:Pk()}),f.jsx("dd",{className:"m-0 text-text",children:s.username})]}),(s.validationStatus==="missing"||s.validationStatus==="invalid"||s.validationStatus==="valid"&&s.jobsWrite!==null)&&f.jsxs("div",{className:"flex items-center justify-between gap-4",children:[f.jsx("dt",{className:"font-medium text-subtext",children:vh()}),f.jsx("dd",{className:"m-0 text-text",children:f.jsx(Tjn,{settings:s})})]})]}),s.validationStatus==="unreachable"&&s.validationError&&f.jsx("p",{className:vy,children:s.validationError}),s.source==="env"&&f.jsx("p",{className:Ta,children:aLt()}),s.validationStatus==="valid"&&s.jobsWrite===null&&f.jsx(V6,{note:nEt({login:"`hf auth login`",url:Ne("huggingface.co/settings/tokens")}),className:Ta,disabled:e,onRun:k.start}),f.jsx(yy,{run:k.run,onComplete:()=>void r.refetch(),onClose:k.clear})]}):f.jsxs(os,{children:[f.jsx(Rt,{})," ",KIt()]}),f.jsxs("form",{className:"mt-5 flex flex-col gap-4",onSubmit:b,children:[f.jsxs("label",{className:"flex flex-col gap-2 text-sm font-medium text-subtext",children:[s!=null&&s.configured?rXt():pjt(),f.jsx(Qr,{type:"password",value:o,onChange:y=>l(y.target.value),placeholder:(s==null?void 0:s.maskedToken)??JDt(),autoComplete:"off"})]}),m&&f.jsx("div",{className:"error",children:m}),f.jsxs("div",{className:"flex justify-end gap-2",children:[f.jsxs(Me,{type:"button",disabled:u||_||!s&&!a,onClick:()=>void v(),children:[f.jsx(La,{size:13})," ",_?sa():cm()]}),f.jsx(Me,{variant:"primary",type:"submit",disabled:!o.trim()||u||_||!s&&!a,children:u?_L():Zo()})]})]})]})}const WF=/^hf_[A-Za-z0-9]{10,}$/;function QF(){return f.jsx("tr",{children:f.jsx("td",{colSpan:3,children:f.jsxs("p",{dir:"auto",className:Ta,children:[_Kt()," ",f.jsx("code",{children:"HF_TOKEN"}),XUt()]})})})}const VA=["TINKER_API_KEY","HF_TOKEN","WANDB_API_KEY"];function T5(e,n){const t=n instanceof Error?n.message:String(n);Bn(t.includes(e)?t:`${e}: ${t}`,"error")}function Rjn({name:e,entry:n,onVars:t}){const r=hn({mutationFn:_=>CL(..._)}),s=hn({mutationFn:V0n}),[i,a]=T.useState(""),[o,l]=T.useState(!1);async function u(){if(!(!i.trim()||o)){l(!0);try{t(await r.mutateAsync([e,i.trim()])),a("")}catch(_){T5(e,_)}finally{l(!1)}}}async function h(){if(!o){l(!0);try{t(await s.mutateAsync(e))}catch(_){T5(e,_)}finally{l(!1)}}}return f.jsxs(f.Fragment,{children:[f.jsxs("tr",{children:[f.jsx("td",{className:"font-mono text-sm",children:e}),f.jsx("td",{className:"text-base text-subtext",children:n?f.jsxs(f.Fragment,{children:[n.maskedValue,n.inProcessEnv&&f.jsx(Gt,{children:qHt()})]}):f.jsx(Qr,{variant:"inline",className:"text-base",type:"password",value:i,onChange:_=>a(_.target.value),onKeyDown:_=>{_.key==="Enter"&&(_.preventDefault(),u()),_.key==="Escape"&&!o&&a("")},placeholder:aL(),"aria-label":bJ({name:Ne(e)}),autoComplete:"new-password",disabled:o})}),f.jsx("td",{children:n?f.jsx(Ft,{className:"[&:hover:not(:disabled)]:text-accent-red",title:Q4({name:Ne(e)}),"aria-label":Q4({name:Ne(e)}),onClick:()=>void h(),disabled:o,children:f.jsx(lf,{size:13})}):i.trim()&&f.jsx(Me,{size:"small",onClick:()=>void u(),disabled:o,children:o?la():Zo()})})]}),!n&&e!=="HF_TOKEN"&&WF.test(i.trim())&&f.jsx(QF,{})]})}function Mjn({onVars:e,onDone:n}){const t=hn({mutationFn:_=>CL(..._)}),[r,s]=T.useState(""),[i,a]=T.useState(""),[o,l]=T.useState(!1);async function u(){if(!(!r.trim()||!i.trim()||o)){l(!0);try{e(await t.mutateAsync([r.trim(),i.trim()])),n()}catch(_){T5(r.trim(),_)}finally{l(!1)}}}const h=_=>{_.key==="Enter"&&(_.preventDefault(),u()),_.key==="Escape"&&!o&&n()};return f.jsxs(f.Fragment,{children:[f.jsxs("tr",{children:[f.jsx("td",{children:f.jsx(Qr,{autoFocus:!0,variant:"inline",className:"font-mono text-sm",type:"text",value:r,onChange:_=>s(_.target.value),onKeyDown:h,placeholder:"MY_API_KEY","aria-label":kBt(),autoComplete:"off",spellCheck:!1,disabled:o})}),f.jsx("td",{children:f.jsx(Qr,{variant:"inline",className:"text-base",type:"password",value:i,onChange:_=>a(_.target.value),onKeyDown:h,placeholder:aL(),"aria-label":TBt(),autoComplete:"new-password",disabled:o})}),f.jsxs("td",{children:[f.jsx(Me,{size:"small",onClick:()=>void u(),disabled:o||!r.trim()||!i.trim(),children:o?la():Zo()}),f.jsx(Ft,{title:P_(),"aria-label":aRt(),onClick:n,disabled:o,children:f.jsx(_r,{size:13})})]})]}),r.trim()!=="HF_TOKEN"&&WF.test(i.trim())&&f.jsx(QF,{})]})}function Ojn(){var u;const e=ggn(),n=ft(e),t=n.data??null,r=h=>{Xr(e.queryKey,_=>(typeof h=="function"?h(_??null):h)??void 0)},s=t?null:((u=n.error)==null?void 0:u.message)??null,[i,a]=T.useState(!1),o=t===null?[]:t.map(h=>h.key).filter(h=>!VA.includes(h)),l=[...VA,...o];return f.jsxs(f.Fragment,{children:[f.jsxs("div",{className:"mb-4.5 flex items-center justify-between gap-4",children:[f.jsx("p",{className:"m-0 text-base leading-relaxed text-text",children:cWt()}),f.jsxs(Me,{size:"small",className:"shrink-0",onClick:()=>a(!0),disabled:i||t===null,children:[f.jsx(yh,{size:12})," ",WTt()]})]}),f.jsx("div",{className:Xo,children:s?f.jsx("div",{className:"error",children:s}):t===null?f.jsxs(os,{children:[f.jsx(Rt,{})," ",zu()]}):f.jsx("table",{className:"env-table w-full table-fixed border-collapse text-base [&_td:first-child]:w-[32%] [&_td:first-child]:wrap-anywhere [&_.badge]:ms-2 [&_td]:h-12 [&_td]:pt-0 [&_td]:pe-2.5 [&_td]:pb-0 [&_td]:ps-0 [&_td]:align-middle [&_td]:border-b [&_td]:border-b-border-variant [&_td:last-child]:w-29 [&_td:last-child]:whitespace-nowrap [&_td:last-child]:text-end [&_td[colspan]]:whitespace-normal [&_td[colspan]]:text-start [&_.icon-btn]:ms-2 [&_.icon-btn]:align-middle",children:f.jsxs("tbody",{children:[l.map(h=>f.jsx(Rjn,{name:h,entry:t.find(_=>_.key===h),onVars:r},h)),i&&f.jsx(Mjn,{onVars:r,onDone:()=>a(!1)})]})})})]})}const Op=[{value:"system",label:HYt,icon:oyn},{value:"light",label:DYt,icon:Ayn},{value:"dark",label:wYt,icon:cyn}],Djn=[{id:"en",label:"English"},{id:"zh-CN",label:"简体中文"},{id:"fa",label:"فارسی"},{id:"ar",label:"العربية"},{id:"es",label:"Español"},{id:"hi",label:"हिन्दी"}];function Ljn(){const e=sf(),[n,t]=VL(),r=s=>{var h;const i=s.key==="ArrowRight"||s.key==="ArrowDown"?1:s.key==="ArrowLeft"||s.key==="ArrowUp"?-1:0;if(!i)return;s.preventDefault();const a=[...s.currentTarget.querySelectorAll('[role="radio"]')],o=a.findIndex(_=>_===document.activeElement),u=((o===-1?Op.findIndex(_=>_.value===n):o)+i+Op.length)%Op.length;t(Op[u].value),(h=a[u])==null||h.focus()};return f.jsxs(f.Fragment,{children:[f.jsx("h2",{children:F6t()}),f.jsxs("div",{className:`${Xo} mt-3`,children:[f.jsxs("div",{className:`${Xl} pb-3.5`,children:[f.jsx("div",{className:"project-default-title text-base font-medium",children:pz()}),f.jsx("div",{className:"theme-segmented inline-flex flex-none gap-0.5 p-0.5 border border-border rounded-md bg-surface",role:"radiogroup","aria-label":pz(),onKeyDown:r,children:Op.map(({value:s,label:i,icon:a})=>f.jsxs("button",{type:"button",role:"radio","aria-checked":n===s,tabIndex:n===s?0:-1,className:`theme-segment inline-flex items-center gap-1.5 py-[5px] px-2.5 rounded-sm text-subtext text-sm cursor-pointer transition-[background,color] duration-120 ease-standard [&:hover:not(.on)]:text-text [&:hover:not(.on)]:bg-highlight [&.on]:text-background [&.on]:bg-primary [&:focus-visible]:outline-2 [&:focus-visible]:outline-solid [&:focus-visible]:outline-text [&:focus-visible]:outline-offset-2 ${n===s?"on":""}`,onClick:()=>t(s),children:[f.jsx(a,{size:14}),i()]},s))})]}),f.jsxs("div",{className:Xl,children:[f.jsx("div",{className:"project-default-title text-base font-medium",children:CNt()}),f.jsx("div",{className:"w-52 flex-none",children:f.jsx(Ko,{choices:Djn,value:e,variant:"field",dropDown:!0,onSelect:s=>{VO(s)&&qL(s)}})})]})]})]})}const Ijn={installer:Wfn,"app-bundle":Nfn,portable:ldn,cargo:Ofn,homebrew:Ffn,nix:tdn,unknown:pdn},Jw={cargo:wdn,homebrew:jdn,nix:Ldn};function $jn(){var _;const e=hn({mutationFn:p=>B0n(...p)}),{status:n,error:t,apply:r}=KS(),[s,i]=T.useState(null),[a,o]=T.useState(null),l=k$(n),u=s!==null||l.restarting;if(!n)return f.jsxs(f.Fragment,{children:[f.jsx("h2",{children:fz()}),t?f.jsx("div",{className:Xo,children:f.jsx("div",{className:"error",children:t})}):f.jsxs(os,{children:[f.jsx(Rt,{})," ",zu()]})]});const h=async(p,m)=>{i(p),o(null);try{await m()}catch(x){o(x instanceof Error?x.message:String(x))}finally{i(null)}};return f.jsxs(f.Fragment,{children:[f.jsx("h2",{children:fz()}),f.jsxs("div",{className:`${Xo} mt-3`,children:[f.jsxs("div",{className:`${K_} pb-3.5`,children:[f.jsx("div",{className:"k",children:oL()}),f.jsx("div",{className:"v",children:n.current}),f.jsx("div",{className:"k",children:yIt()}),f.jsx("div",{className:"v",children:n.latest??"—"}),f.jsx("div",{className:"k",children:ZD()}),f.jsx("div",{className:"v",children:Ijn[n.channel]()})]}),n.restartRequired&&f.jsxs("div",{className:Xl,children:[f.jsxs("div",{children:[f.jsx("div",{className:"project-default-title text-base font-medium",children:jUt()}),f.jsx("p",{children:l.error?gL({error:l.error}):gXt({installed:Ne(n.installedVersion??"—"),current:Ne(n.current??n.installedVersion??"—")})})]}),n.canRestart&&f.jsx(Me,{size:"small",type:"button",disabled:u,onClick:l.restart,children:l.restarting?vL():mL()})]}),n.selfUpdates?f.jsxs(f.Fragment,{children:[f.jsxs("div",{className:Xl,children:[f.jsxs("div",{children:[f.jsx("div",{className:"project-default-title text-base font-medium",children:cz()}),f.jsxs("p",{children:[mBt(),n.envDisabled&&UZt()]})]}),f.jsx(Xk,{type:"button",checked:n.autoUpdate,"aria-label":cz(),disabled:u,onClick:()=>void h("auto",()=>e.mutateAsync([!n.autoUpdate]).then(r))})]}),f.jsxs("div",{className:Xl,children:[f.jsxs("div",{children:[f.jsx("div",{className:"project-default-title text-base font-medium",children:n.updateAvailable?IZt({version:Ne(n.latest??"—")}):o7t()}),f.jsx("p",{children:n.updateAvailable?UEt():z7t()})]}),f.jsx(Me,{size:"small",type:"button",disabled:u,onClick:()=>void h("apply",()=>I0n().then(r)),children:s==="apply"?Rk():n.updateAvailable?TZt():h7t()})]})]}):f.jsx("div",{className:Xl,children:f.jsxs("div",{children:[f.jsx("div",{className:"project-default-title text-base font-medium",children:kHt()}),f.jsx("p",{children:((_=Jw[n.channel])==null?void 0:_.call(Jw))??cQt()})]})}),n.channel==="app-bundle"&&f.jsx(Pjn,{busy:s,disabled:u,run:h}),a&&f.jsx("div",{className:"error",children:a})]})]})}function Bjn(){var _;const e=hn({mutationFn:Omn}),n=Cgn(),t=ft(n),r=t.data??null,s=p=>{Xr(n.queryKey,m=>(typeof p=="function"?p(m??null):p)??void 0)},[i,a]=T.useState(!1),[o,l]=T.useState(null),u=o??((_=t.error)==null?void 0:_.message)??null,h=()=>{!r||i||(a(!0),l(null),e.mutateAsync(!r.preferenceEnabled).then(s).catch(p=>l(p instanceof Error?p.message:String(p))).finally(()=>a(!1)))};return f.jsxs(f.Fragment,{children:[f.jsx("h2",{children:XKt()}),r?f.jsxs("div",{className:`${Xo} mt-3`,children:[f.jsxs("div",{className:Xl,children:[f.jsxs("div",{children:[f.jsxs("div",{className:"project-default-title inline-flex items-center gap-1.5 text-base font-medium",children:[iz(),r.locked&&r.reason&&f.jsx(Yk,{content:`${PMt()} ${r.reason}.`,className:"text-subtext",children:f.jsx(eS,{size:15})})]}),f.jsx("p",{children:IBt()})]}),f.jsx(Xk,{type:"button",checked:r.enabled,"aria-label":iz(),disabled:i||r.locked,onClick:h})]}),u&&f.jsx("div",{className:"error",children:u})]}):u?f.jsx("div",{className:"error",children:u}):f.jsxs(os,{children:[f.jsx(Rt,{})," ",zu()]})]})}function Pjn({busy:e,disabled:n,run:t}){const r=hn({mutationFn:P0n}),[s,i]=T.useState(null),[a,o]=T.useState(!1),l=u=>void t("cli",()=>r.mutateAsync(u).then(h=>{i(h),o(!1)}).catch(h=>{throw o(!u&&String((h==null?void 0:h.message)??h).includes("--force")),h}));return f.jsxs("div",{className:Xl,children:[f.jsxs("div",{children:[f.jsx("div",{className:"project-default-title text-base font-medium",children:TEt({command:Ne("orx")})}),s?f.jsxs("p",{children:[s.alreadyCurrent?nCt({link:Ne(s.link)}):cCt({link:Ne(s.link)}),!s.onPath&&O6t({directory:Ne(s.dir)})]}):f.jsx("p",{children:kEt({command:Ne("orx")})})]}),f.jsx(Me,{size:"small",type:"button",disabled:n,onClick:()=>l(a),children:e==="cli"?Rk():a?qQt():s?mQt():mEt()})]})}function Fjn({remote:e}){var x;const n=hn({mutationFn:k=>TL(...k)}),t=Gk(),r=ft(t),s=r.data??null,i=k=>{Xr(t.queryKey,v=>(typeof k=="function"?k(v??null):k)??void 0)},[a,o]=T.useState(!1),[l,u]=T.useState(null),h=l??((x=r.error)==null?void 0:x.message)??null,_=async()=>{await r.refetch({cancelRefetch:!1})},p=by(),m=()=>{if(!s||a)return;const k=!s.githubForNewProjects;o(!0),u(null),n.mutateAsync([k,!0]).then(i).catch(v=>u(v instanceof Error?v.message:String(v))).finally(()=>o(!1))};return f.jsxs(f.Fragment,{children:[f.jsx("h2",{children:EDt()}),s?f.jsxs("div",{className:`${Xo} mt-3 project-defaults-card [&_.settings-card-head]:justify-between [&_.settings-card-head]:mb-0 [&_.settings-card-head]:pb-3 [&_.settings-card-head_h3]:m-0`,children:[f.jsxs("div",{className:"settings-card-head flex items-center gap-2.5 mb-3",children:[f.jsx("h3",{children:MDt()}),f.jsx(Gt,{variant:s.githubAuthenticated?"success":s.ghInstalled?"warning":"error",children:s.githubAuthenticated?qD():VD()})]}),f.jsxs("div",{className:Xl,children:[f.jsxs("div",{children:[f.jsx("div",{className:"project-default-title text-base font-medium",children:lz()}),f.jsx("p",{children:wWt()})]}),f.jsx(Xk,{type:"button",checked:s.githubForNewProjects,"aria-label":lz(),disabled:a||!s.githubAuthenticated&&!s.githubForNewProjects,onClick:m})]}),!s.githubAuthenticated&&f.jsx("div",{className:"mt-3.5 pt-3.5 border-t border-t-border-variant",children:f.jsx(XF,{ghInstalled:s.ghInstalled,remote:e,onCheck:_,onRun:p.start})}),f.jsx(yy,{run:p.run,onComplete:()=>void _(),onClose:p.clear}),h&&f.jsx("div",{className:"error",children:h})]}):h?f.jsx("div",{className:"error",children:h}):f.jsxs(os,{children:[f.jsx(Rt,{})," ",zu()]})]})}function XF({ghInstalled:e,remote:n,onCheck:t,onRun:r}){const[s,i]=T.useState(!1),a=()=>{i(!0),t().finally(()=>i(!1))};return f.jsxs(f.Fragment,{children:[f.jsx(V6,{note:e?SXt():IEt(),className:"git-card-helper m-0 text-sm leading-relaxed text-text",disabled:n||!e,onRun:r}),f.jsxs("div",{className:"flex flex-wrap gap-2 mt-2.5",children:[!e&&f.jsxs(Zd,{variant:"primary",href:"https://cli.github.com/",target:"_blank",rel:"noreferrer",children:[MLt()," ",f.jsx(H_,{size:12})]}),f.jsx(Me,{type:"button",variant:e?"warning":"default",disabled:s,onClick:a,children:s?sa():cm()})]})]})}function Hjn(){var m,x,k;const e=hn({mutationFn:b0n}),n=hn({mutationFn:y0n}),t=own(),r=ft(t),s=((m=r.data)==null?void 0:m.hasToken)??null,i=((x=r.data)==null?void 0:x.hasSession)??null,a=v=>Xr(t.queryKey,{hasToken:s??!1,hasSession:i??!1,...v}),o=v=>a({hasToken:v}),[l,u]=T.useState(!1),[h,_]=T.useState(null),p=h??((k=r.error)==null?void 0:k.message);return f.jsxs("div",{className:z5,children:[f.jsx("h3",{children:nL()}),f.jsxs("div",{className:K_,children:[f.jsx("span",{className:"k",children:PDt()}),f.jsx("span",{className:"v",children:f.jsx(Gt,{variant:s?"success":"default",children:s===null?p?so():sa():s?hz():s3()})})]}),f.jsx("p",{className:"git-card-helper mt-3.5 mx-0 mb-0 text-sm leading-relaxed text-text",children:jWt()}),s?f.jsx("div",{className:i0,children:f.jsx(Me,{disabled:l,onClick:()=>{u(!0),_(null),e.mutateAsync().then(v=>o(v.hasToken)).catch(v=>_(v instanceof Error?v.message:String(v))).finally(()=>u(!1))},children:l?dz():TQt()})}):f.jsx(qA,{save:kL,onSaved:v=>o(v.hasToken),placeholder:LHt(),createHref:"https://www.overleaf.com/user/settings"}),f.jsxs("div",{className:K_,children:[f.jsx("span",{className:"k",children:rGt()}),f.jsx("span",{className:"v",children:f.jsx(Gt,{variant:i?"success":"default",children:i===null?p?so():sa():i?hz():s3()})})]}),f.jsx("p",{className:"git-card-helper mt-3.5 mx-0 mb-0 text-sm leading-relaxed text-text",children:uGt()}),i?f.jsx("div",{className:i0,children:f.jsx(Me,{disabled:l,onClick:()=>{u(!0),_(null),n.mutateAsync().then(v=>a({hasSession:v.hasSession})).catch(v=>_(v instanceof Error?v.message:String(v))).finally(()=>u(!1))},children:l?dz():kQt()})}):f.jsx(qA,{save:v=>SL(v),onSaved:v=>a({hasSession:v.hasSession}),placeholder:e3(),createHref:"https://www.overleaf.com/project",createLabel:ipt()}),p&&f.jsx("div",{className:"error",children:p})]})}function qjn({project:e,onProjectUpdate:n,remote:t}){var M;const r=hn({mutationFn:L=>TL(...L)}),s={...Sgn((e==null?void 0:e.id)??""),enabled:!!e},i=ft(s),a=by(),o=i.data??null,l=L=>{Xr(s.queryKey,I=>(typeof L=="function"?L(I??null):L)??void 0)},[u,h]=T.useState(!1),[_,p]=T.useState(null),m=_??((M=i.error)==null?void 0:M.message)??null,[x,k]=T.useState(!1),[v,b]=T.useState(!1),[w,y]=T.useState(null),C=!!(o!=null&&o.github.owner&&o.github.repo),E=async()=>{await i.refetch({cancelRefetch:!1})},N=L=>{const I=L instanceof Error?L.message:String(L);return I.toLowerCase().includes("archived")?x9t():I.includes("(fetch first)")||I.includes("non-fast-forward")?z9t():I.includes("403")||I.toLowerCase().includes("permission denied")?D9t():I},A=()=>{e&&(h(!0),p(null),Amn(e.id).then(L=>{l(L.git),n(L.project),rt.fetchQuery(Gk()).then(I=>{!I.githubForNewProjects&&!I.githubDefaultPromptSeen&&k(!0)}).catch(()=>{})}).catch(L=>p(N(L))).finally(()=>h(!1)))},j=L=>{b(!0),y(null),r.mutateAsync([L,!0]).then(()=>k(!1)).catch(I=>y(I instanceof Error?I.message:String(I))).finally(()=>b(!1))};return f.jsxs(f.Fragment,{children:[f.jsx("h1",{children:wUt()}),f.jsx("p",{className:"settings-sub mt-0 mx-0 mb-4.5 text-base leading-relaxed text-text",children:uXt({project:(e==null?void 0:e.name)??z8t()})}),e?m&&!o?f.jsx("div",{className:"error",children:m}):o?f.jsxs(f.Fragment,{children:[f.jsxs("div",{className:z5,children:[f.jsx("h3",{children:o$t()}),f.jsxs("div",{className:K_,children:[f.jsx("span",{className:"k",children:rqt()}),f.jsx("span",{className:"v",children:o.path}),f.jsx("span",{className:"k",children:"Git"}),f.jsx("span",{className:"v",children:o.gitVersion??TD()}),f.jsx("span",{className:"k",children:XGt()}),f.jsx("span",{className:"v",children:o.initialized?h9t({branch:Ne(o.currentBranch??$k()),state:o.clean?Q7t():Q9t()}):tTt()}),f.jsx("span",{className:"k",children:PAt()}),f.jsx("span",{className:"v",children:o.baselineBranch}),f.jsx("span",{className:"k",children:pUt()}),f.jsx("span",{className:"v",children:o.remotes.length?o.remotes.map(L=>`${L.name}: ${L.url}`).join(" · "):Bk()})]}),!o.initialized&&f.jsx("div",{className:i0,children:f.jsx(Me,{variant:"primary",onClick:()=>void Tmn(e.id).then(l).catch(L=>p(String(L))),children:dLt()})})]}),f.jsxs("div",{className:z5,children:[f.jsx("h3",{children:"GitHub"}),f.jsxs("div",{className:K_,children:[f.jsx("span",{className:"k",children:KD()}),f.jsx("span",{className:"v",children:f.jsx(Gt,{variant:o.github.authenticated?"success":o.github.ghInstalled?"warning":"error",children:o.github.authenticated?qD():VD()})}),f.jsx("span",{className:"k",children:gqt()}),f.jsx("span",{className:"v",children:C?f.jsxs(f.Fragment,{children:[f.jsxs("span",{children:[o.github.owner,"/",o.github.repo]}),!o.github.enabled&&f.jsx(Gt,{children:kVt()})]}):f.jsx(Gt,{children:e$t()})}),o.github.enabled&&f.jsxs(f.Fragment,{children:[f.jsx("span",{className:"k",children:mVt()}),f.jsx("span",{className:"v",children:o.github.syncStatus})]})]}),!o.github.authenticated&&f.jsx("div",{className:"mt-3.5 pt-3.5 border-t border-t-border-variant",children:f.jsx(XF,{ghInstalled:o.github.ghInstalled,remote:t,onCheck:()=>E(),onRun:a.start})}),f.jsx(yy,{run:a.run,onComplete:()=>void E(),onClose:a.clear}),o.github.authenticated&&!o.github.enabled&&f.jsxs(f.Fragment,{children:[f.jsx("p",{className:"git-card-helper mt-3.5 mx-0 mb-0 text-sm leading-relaxed text-text",children:C?sJt():x8t()}),f.jsxs("div",{className:i0,children:[C&&o.github.url&&f.jsxs(Zd,{href:o.github.url,target:"_blank",rel:"noreferrer",children:[_z()," ",f.jsx(H_,{size:12})]}),f.jsx(Me,{variant:"primary",disabled:u,onClick:A,children:u?Zkt():Gkt()})]})]}),o.github.enabled&&f.jsxs(f.Fragment,{children:[f.jsx("p",{className:"git-card-helper mt-3.5 mx-0 mb-0 text-sm leading-relaxed text-text",children:WOt()}),f.jsxs("div",{className:i0,children:[o.github.url&&f.jsxs(Zd,{href:o.github.url,target:"_blank",rel:"noreferrer",children:[_z()," ",f.jsx(H_,{size:12})]}),f.jsx(Me,{disabled:u,onClick:()=>{h(!0),Rmn(e.id).then(L=>{l(L.git),n(L.project)}).catch(L=>p(L instanceof Error?L.message:String(L))).finally(()=>h(!1))},children:u?iSt():$kt()})]})]})]}),f.jsx(Hjn,{}),m&&f.jsx("div",{className:"error",children:N(m)})]}):f.jsxs(os,{children:[f.jsx(Rt,{})," ",zu()]}):f.jsx("div",{className:Xo,children:f.jsx("p",{className:Ta,children:IFt()})}),x&&f.jsx("div",{className:"modal-backdrop fixed inset-0 bg-modal-backdrop-light flex items-start justify-center pt-[var(--modal-top)] px-4 pb-6 overflow-y-auto z-100",onClick:()=>j(!1),children:f.jsxs("div",{className:"modal max-w-[94vw] max-h-[calc(100vh_-_var(--modal-top)_-_48px)] overflow-y-auto bg-background border border-border rounded-xl shadow-modal p-6 [&_h2]:mt-0 [&_h2]:mx-0 [&_h2]:mb-3.5 [&_h2]:text-xl github-default-modal w-110 [&_>_p]:m-0 [&_>_p]:text-sm [&_>_p]:leading-relaxed [&_>_p]:text-text [&_>_.error]:mt-3.5",role:"dialog","aria-modal":"true","aria-labelledby":"github-default-title",onClick:L=>L.stopPropagation(),children:[f.jsx("h2",{id:"github-default-title",children:x$t()}),f.jsx("p",{children:YVt()}),w&&f.jsx("div",{className:"error",children:w}),f.jsxs("div",{className:"github-default-actions flex justify-end gap-2.5 mt-5.5",children:[f.jsx(Me,{disabled:v,onClick:()=>j(!1),children:sFt()}),f.jsx(Me,{variant:"primary",disabled:v,onClick:()=>j(!0),children:v?la():BNt()})]})]})})]})}const Ujn={env:mon,config:kon,xdg:Ton,default:con},e4={preparing:Qan,copying:oan,verifying:Ion,finalizing:han},Gjn=e=>{var n;return((n=e4[e])==null?void 0:n.call(e4))??e};function Vjn(){var y;const e=vgn(),n=ft(e),t=n.data??null,r=t?null:((y=n.error)==null?void 0:y.message)??null,[s,i]=T.useState(""),[a,o]=T.useState(!1),[l,u]=T.useState(null),[h,_]=T.useState({kind:"idle"}),[p,m]=T.useState(null);T.useEffect(()=>{t&&i(C=>C||t.current)},[t]),T.useEffect(()=>FL(C=>{C.type==="progress"?_(E=>{const N=E.kind==="moving"?E.total:0;return{kind:"moving",phase:C.phase,copied:C.copiedBytes,total:C.totalBytes||N}}):C.type==="done"?(_({kind:"done",oldPathLeft:C.oldPathLeft}),u(null),i("")):C.type==="error"&&_({kind:"error",message:C.error})}),[]);const x=(t==null?void 0:t.source)==="env",k=s.trim(),v=t!==null&&k===t.current;async function b(){if(!(a||!k)){o(!0),m(null),u(null);try{u(await W0n(k))}catch(C){m(C instanceof Error?C.message:String(C))}finally{o(!1)}}}async function w(C){if(C.preventDefault(),!(h.kind==="moving"||!k||v)&&(m(null),!!window.confirm(zan({path:Ne(k)})))){_({kind:"moving",phase:"preparing",copied:0,total:(l==null?void 0:l.treeBytes)??0});try{await Q0n(k)}catch(E){_({kind:"idle"}),m(E instanceof Error?E.message:String(E))}}}return f.jsxs(f.Fragment,{children:[f.jsx("h2",{children:cVt()}),f.jsx("p",{className:"settings-sub mt-0 mx-0 mb-4.5 text-sm leading-relaxed text-subtext",children:cYt()}),r?f.jsx("div",{className:Xo,children:f.jsx("div",{className:"error",children:r})}):t?f.jsxs("div",{className:Xo,children:[f.jsx("div",{className:"settings-card-head mb-3",children:f.jsx("h3",{children:oOt()})}),f.jsxs("div",{className:K_,children:[f.jsx("span",{className:"k",children:MMt()}),f.jsx("span",{className:"v",children:t.current}),f.jsx("span",{className:"k",children:sL()}),f.jsx("span",{className:"v",children:Ujn[t.source]()})]}),!x&&f.jsxs("form",{className:G6,onSubmit:w,children:[f.jsxs("label",{children:[cBt(),f.jsx("input",{className:"text-sm",type:"text",value:s,onChange:C=>{i(C.target.value),u(null)},placeholder:"/absolute/path/to/openresearch",autoComplete:"off",spellCheck:!1,disabled:h.kind==="moving"})]}),l&&!l.error&&l.ok&&f.jsxs("p",{className:Ta,children:[Xqt()," ",Wl(l.treeBytes??0),l.freeBytes!=null&&` — ${xan({size:Ne(Wl(l.freeBytes))})}`,l.sameFilesystem?non():"","."]}),l&&l.ok===!1&&l.error&&f.jsx("div",{className:"error",children:l.error}),p&&f.jsx("div",{className:"error",children:p}),h.kind==="moving"&&f.jsx(HF,{value:h.copied,max:h.total,label:Gjn(h.phase),caption:h.total>0?f.jsxs("span",{className:"text-sm",children:[Wl(h.copied)," / ",Wl(h.total)]}):void 0}),h.kind==="done"&&f.jsxs("p",{className:Ta,children:[Q$t(),h.oldPathLeft&&f.jsxs(f.Fragment,{children:[" ",xTt({path:Ne(h.oldPathLeft)})]})]}),h.kind==="error"&&f.jsxs("div",{className:"error",children:[H$t()," ",h.message]}),f.jsxs("div",{className:"actions",children:[f.jsx(Me,{type:"button",onClick:b,disabled:a||!k||v||h.kind==="moving",children:a?sa():W6t()}),f.jsx(Me,{variant:"primary",type:"submit",disabled:!k||v||h.kind==="moving",children:h.kind==="moving"?Han():Dan()})]})]})]}):f.jsxs(os,{children:[f.jsx(Rt,{})," ",zu()]})]})}const A5=e=>e==="running"||e==="starting";function Kjn(e){return A5(e.status)?g0(Date.now()-e.createdAt):e.endedAt?g0(e.endedAt-e.createdAt):"—"}function YF({instances:e,emptyLabel:n}){return e.length===0?f.jsx("p",{className:"instances-empty m-0 rounded-lg border border-border bg-background py-3.5 px-4 text-base text-subtext",children:n}):f.jsx("div",{className:"instances-table-wrap overflow-x-auto",children:f.jsxs("table",{className:"runs-table w-full border-collapse bg-background text-base [&_th]:text-start [&_th]:text-text [&_th]:text-sm [&_th]:font-medium [&_th]:py-2 [&_th]:px-3 [&_th]:border-b [&_th]:border-b-border [&_th]:sticky [&_th]:top-0 [&_th]:bg-background [&_th]:z-1 [&_td]:py-2 [&_td]:px-3 [&_td]:border-b [&_td]:border-b-divider-faint [&_td]:whitespace-nowrap [&_tr:last-child_td]:border-b-0 [&_tr.clickable]:cursor-pointer [&_tr.clickable:hover_td]:bg-canvas",children:[f.jsx("thead",{children:f.jsxs("tr",{children:[f.jsx("th",{children:MAt()}),f.jsx("th",{children:vh()}),f.jsx("th",{children:qGt()}),f.jsx("th",{children:qUt()})]})}),f.jsx("tbody",{children:e.map(t=>{var s;const r=typeof((s=t.backend)==null?void 0:s.url)=="string"?t.backend.url:void 0;return f.jsxs("tr",{children:[f.jsx("td",{children:f.jsxs("span",{className:"backend-cell inline-flex items-center gap-0.5",children:[f.jsx(pS,{backend:t.backend}),r&&f.jsx(dm,{size:"small",href:r,target:"_blank",rel:"noreferrer",title:uz(),"aria-label":uz(),onClick:i=>i.stopPropagation(),children:f.jsx(H_,{size:12})})]})}),f.jsx("td",{children:f.jsx(ec,{status:Zi(t)})}),f.jsx("td",{children:Vo(t.createdAt)}),f.jsx("td",{children:Kjn(t)})]},t.id)})})]})})}function Wjn({projectId:e,onViewHistory:n}){var _;const t=ft({...fu(e??""),enabled:!!e,subscribed:!!e}),r=e?t.data??(t.error?[]:null):[],s=(_=t.error)==null?void 0:_.message,i=t.isFetching,[,a]=T.useState(0);T.useEffect(()=>{const p=setInterval(()=>a(m=>m+1),3e4);return()=>clearInterval(p)},[]);const o=()=>{e&&t.refetch()},l=(p,m)=>m.createdAt-p.createdAt,u=r==null?void 0:r.filter(p=>A5(p.status)).sort(l),h=r==null?void 0:r.filter(p=>!A5(p.status)).sort(l);return f.jsxs("section",{className:"compute-activity [&_.count-badge]:inline-flex [&_.count-badge]:items-center [&_.count-badge]:justify-center [&_.count-badge]:min-w-4.5 [&_.count-badge]:h-4.5 [&_.count-badge]:py-0 [&_.count-badge]:px-[5px] [&_.count-badge]:rounded-md [&_.count-badge]:bg-canvas [&_.count-badge]:border [&_.count-badge]:border-border [&_.count-badge]:text-xs [&_.count-badge]:font-medium [&_.count-badge]:text-text mt-5.5 mx-0 mb-8",children:[f.jsxs("div",{className:"compute-activity-head flex items-start justify-between gap-5 mb-3.5 [&_h2]:flex [&_h2]:items-center [&_h2]:gap-2 [&_h2]:m-0 [&_h2]:text-lg [@media((max-width:_640px))]:items-stretch [@media((max-width:_640px))]:flex-col",children:[f.jsx("div",{children:f.jsxs("h2",{children:[LUt(),u&&u.length>0&&f.jsx("span",{className:"count-badge",children:u.length})]})}),f.jsxs("div",{className:"compute-activity-actions flex gap-2 flex-none [@media((max-width:_640px))]:justify-start",children:[f.jsxs(Me,{size:"small",onClick:o,disabled:i,children:[f.jsx(La,{size:12,className:i?"animate-[spin_0.9s_linear_infinite]":""})," ",_m()]}),f.jsx(Me,{size:"small",onClick:n,children:h!=null&&h.length?mWe({count:Jt(h.length)}):cWe()})]})]}),s&&f.jsx("div",{className:"error",children:s}),!u||!h?f.jsxs(os,{children:[f.jsx(Rt,{})," ",zu()]}):f.jsx(YF,{instances:u,emptyLabel:e?HKe():nWe()})]})}function Qjn({projectId:e,onBack:n}){var l;const t=ft({...fu(e??""),enabled:!!e,subscribed:!!e}),r=e?t.data??(t.error?[]:null):[],s=(l=t.error)==null?void 0:l.message,i=t.isFetching,[,a]=T.useState(0);T.useEffect(()=>{const u=setInterval(()=>a(h=>h+1),3e4);return()=>clearInterval(u)},[]);const o=()=>{e&&t.refetch()};return f.jsxs(f.Fragment,{children:[f.jsxs("button",{type:"button",className:"settings-back inline-flex items-center gap-1.5 mt-0 mx-0 mb-4.5 text-subtext text-sm font-medium [&:hover]:text-text",onClick:n,children:[f.jsx(b0,{size:14})," ",WD()]}),f.jsxs("div",{className:"settings-head-row flex items-center justify-between gap-2.5 [&_h1]:m-0",children:[f.jsx("h1",{children:VLt()}),f.jsxs(Me,{size:"small",onClick:o,disabled:i,children:[f.jsx(La,{size:12,className:i?"animate-[spin_0.9s_linear_infinite]":""})," ",_m()]})]}),s&&f.jsx("div",{className:"error",children:s}),r?f.jsx(YF,{instances:[...r].sort((u,h)=>h.createdAt-u.createdAt),emptyLabel:e?DKe():QKe()}):f.jsxs(os,{children:[f.jsx(Rt,{})," ",zu()]})]})}const ZF=["projects","harnesses","storage"],Xjn=[{id:"compute",label:QD,icon:f.jsx(vI,{size:15}),activeTabs:["compute","instances"]},{id:"environment",label:YD,icon:f.jsx(of,{size:15}),activeTabs:["environment"]},{id:"settings",label:qk,icon:f.jsx(sS,{size:15}),activeTabs:["settings",...ZF]}];function Yjn(e){return ZF.includes(e)}function Zjn({tab:e,project:n,onProjectUpdate:t,onSelectTab:r,remote:s=!1}){const i=e==="settings"||Yjn(e),a=T.useRef(null);return T.useLayoutEffect(()=>{const o=a.current,l=o==null?void 0:o.parentElement;if(!o||!l)return;const u=()=>o.scrollIntoView({block:"start"}),h=new ResizeObserver(u);h.observe(l),u();const _=()=>h.disconnect(),p=["wheel","touchstart","pointerdown","keydown"];for(const m of p)window.addEventListener(m,_,{passive:!0});return()=>{_();for(const m of p)window.removeEventListener(m,_)}},[e,n==null?void 0:n.id]),f.jsxs("div",{className:"settings-view max-w-readable my-0 mx-auto pt-6 px-8 pb-15 [&_h1]:mt-0 [&_h1]:mx-0 [&_h1]:mb-1.5 [&_h1]:text-3xl [&_>_.error]:text-accent-red [&_>_.error]:text-base [&_>_.error]:whitespace-pre-wrap [&_>_.error]:mt-0 [&_>_.error]:mx-0 [&_>_.error]:mb-3",children:[i&&f.jsxs(f.Fragment,{children:[f.jsx("h1",{children:qk()}),f.jsxs("div",{className:"settings-stack mt-4.5",children:[f.jsx("section",{className:ed,children:f.jsx(Ljn,{})}),f.jsx("section",{ref:e==="projects"?a:void 0,className:ed,children:f.jsx(Fjn,{remote:s})}),f.jsx("section",{ref:e==="harnesses"?a:void 0,className:ed,children:f.jsx(cjn,{remote:s})}),!s&&f.jsx("section",{ref:e==="storage"?a:void 0,className:ed,children:f.jsx(Vjn,{})}),f.jsx("section",{className:ed,children:f.jsx(Bjn,{})}),!s&&f.jsx("section",{className:ed,children:f.jsx($jn,{})})]})]}),e==="compute"&&f.jsx(zjn,{project:n,onViewHistory:()=>r("instances"),onOpenEnvironment:()=>r("environment"),remote:s}),e==="instances"&&f.jsx(Qjn,{projectId:n==null?void 0:n.id,onBack:()=>r("compute")}),e==="environment"&&f.jsxs(f.Fragment,{children:[f.jsx("h1",{children:YD()}),f.jsx(Ojn,{})]}),e==="git"&&f.jsx(qjn,{project:n,onProjectUpdate:t,remote:s})]})}function Wv(e){return e.charAt(0).toUpperCase()+e.slice(1).replaceAll("-"," ")}function R5(e){return`${e.plugin?`${Wv(e.plugin)}: `:""}${Wv(e.name)}`}const KA={name:"plan",get description(){return Cgt()},source:"command"};function t4(e,n){if(n<0||n>e.length)return null;let t=n;for(;t>0&&!/\s/.test(e[t-1]);)t-=1;if(e[t]!=="/")return null;let r=n;for(;r=r?h:s}${a.slice(h.length)}`:s+a}const o=((u=/^[ \t]+/.exec(a))==null?void 0:u[0].length)??0;return{text:`${i}/${t}${a}`,cursor:i.length+t.length+1+o}}function WA(e,n){let t=e.slice(0,n.start),r=e.slice(n.end);return t?r?/\s$/.test(t)&&/^\s/.test(r)&&(r=r.slice(1)):t=t.replace(/\s$/,""):r=r.replace(/^\s/,""),{text:t+r,cursor:t.length}}function tTn(e,n){const t=e.filter(r=>r.name.toLowerCase()!==KA.name);return n&&t.push(KA),t.sort((r,s)=>+(s.source==="command")-+(r.source==="command")||R5(r).localeCompare(R5(s),void 0,{sensitivity:"base"}))}function nTn(e,n){if(!n)return null;const t=/(^|\s)\/plan(?=\s|$)/gi;return t.test(e)?{prompt:e.replace(t,"").trim()}:null}function QA(e,n,t){if(e==="command")return n!==void 0?n:t??void 0}function rTn({skills:e,activeIndex:n,onPick:t,onHover:r}){const s=T.useRef(null);return T.useLayoutEffect(()=>{var i;(i=s.current)==null||i.scrollIntoView({block:"nearest"})},[n,e]),f.jsx("div",{className:"skill-menu absolute bottom-[calc(100%_+_8px)] start-0 w-full max-h-[min(18rem,40vh)] overflow-y-auto overscroll-contain p-1.5 bg-background border border-border-variant rounded-2xl shadow-control-subtle z-50",children:e.map((i,a)=>f.jsxs("button",{ref:a===n?s:void 0,type:"button",className:`skill-item flex items-center gap-2 w-full text-start py-1 px-2 rounded-full text-sm font-normal text-text/80 [&.active]:bg-hover-muted [&.active]:text-text ${a===n?"active":""}`,onMouseDown:o=>{o.preventDefault(),t(i)},onMouseEnter:()=>r(a),children:[i.source==="command"&&i.name==="plan"?f.jsx(kI,{size:16,strokeWidth:1.5,className:"shrink-0","aria-hidden":"true"}):f.jsx(jI,{size:16,strokeWidth:1.5,className:"shrink-0","aria-hidden":"true"}),f.jsx("span",{className:"skill-name shrink-0",children:R5(i)}),f.jsx("span",{className:"skill-desc min-w-0 truncate text-muted",children:i.description}),i.source==="user"&&f.jsx("span",{className:"ms-auto shrink-0 ps-2 text-muted",children:$Jt()})]},i.name))})}const sTn=["font-family","font-size","font-weight","font-style","font-variant","line-height","letter-spacing","word-spacing","text-transform","direction","unicode-bidi","tab-size","padding-top","padding-right","padding-bottom","padding-left","border-top-width","border-right-width","border-bottom-width","border-left-width"];let iTn=null;function M5(e,n){const t=iTn??(iTn=document.createElement("canvas").getContext("2d"));if(!t||!n)return 6;const r=getComputedStyle(n);t.font=`${r.fontStyle} ${r.fontWeight} ${r.fontSize} ${r.fontFamily}`;const s=20+t.measureText(Wv(e)).width-t.measureText(`/${e}`).width;return Math.max(2,Math.ceil((s+6)/t.measureText(" ").width))}function JF({name:e}){const n=e==="plan"?kI:jI;return f.jsxs(f.Fragment,{children:[f.jsx(n,{size:16,strokeWidth:1.5,className:"me-1 inline-block align-middle","aria-hidden":"true"}),Wv(e)]})}function eH(e,n,t,r,s,i=!1){let a=0;return Jjn(e,n).map((o,l,u)=>{var m,x;const h=a+o.text.length;a=h;const _=o.text.slice(1).toLowerCase();if(o.command&&s)return s(o.text,_,h,l);let p=o.text;return i||((m=u[l-1])!=null&&m.command&&(p=p.replace(/^[ \t]+/," ")),(x=u[l+1])!=null&&x.command&&(p=p.replace(/[ \t]+$/," "))),o.command?f.jsx("span",{className:t,onMouseDown:void 0,children:f.jsx(JF,{name:_})},l):i?f.jsx("span",{"aria-hidden":"true",children:o.text},l):f.jsx(T.Fragment,{children:p},l)})}function aTn({label:e,name:n,end:t,skill:r,projectId:s,textareaRef:i}){const a=T.useRef(null),o=T.useRef(null),l=T.useRef(null),u=T.useId(),[h,_]=T.useState(!1),p=ft({...Ngn(n,s,r.harness),enabled:h,subscribed:h}),m=p.data??null,x=p.isFetching,[k,v]=T.useState({}),b=()=>{l.current!==null&&window.clearTimeout(l.current),l.current=null},w=()=>{const E=a.current;if(!E)return;const N=E.getBoundingClientRect(),A=Math.min(420,window.innerWidth-32),j=Math.max(16,Math.min(N.left-4,window.innerWidth-A-16));v(N.top>300?{bottom:window.innerHeight-N.top+12,left:j,width:A}:{left:j,top:N.bottom+12,width:A})},y=()=>{b(),w(),_(!0)},C=()=>{b(),l.current=window.setTimeout(()=>_(!1),120)};return T.useEffect(()=>()=>b(),[]),T.useEffect(()=>{if(!h)return;const E=()=>w();return window.addEventListener("resize",E),window.addEventListener("scroll",E,!0),()=>{window.removeEventListener("resize",E),window.removeEventListener("scroll",E,!0)}},[h]),f.jsxs(T.Fragment,{children:[f.jsxs("span",{ref:a,role:"button",tabIndex:0,"aria-controls":u,"aria-expanded":h,"aria-label":sZ({name:n}),className:"composer-chip group/skill pointer-events-auto relative z-1 inline-grid align-baseline cursor-text rounded-md bg-background text-skill-blue",onMouseEnter:y,onMouseLeave:C,onFocus:y,onBlur:C,onKeyDown:E=>{var N,A;if(E.key==="Escape"){_(!1);return}if(E.key==="Enter"||E.key===" "){E.preventDefault(),y();return}h&&(E.key==="ArrowDown"||E.key==="PageDown")&&(E.preventDefault(),(N=o.current)==null||N.scrollBy({top:E.key==="PageDown"?240:48,behavior:"smooth"})),h&&(E.key==="ArrowUp"||E.key==="PageUp")&&(E.preventDefault(),(A=o.current)==null||A.scrollBy({top:E.key==="PageUp"?-240:-48,behavior:"smooth"}))},onMouseDown:E=>{var N,A;E.preventDefault(),(N=i.current)==null||N.focus(),(A=i.current)==null||A.setSelectionRange(t,t),b()},children:[f.jsx("span",{className:"pointer-events-none absolute -inset-[7px] z-0 rounded-md bg-skill-blue-subtle opacity-0 transition-opacity group-hover/skill:opacity-100"}),f.jsx("span",{className:"invisible col-start-1 row-start-1","aria-hidden":"true",children:e}),f.jsx("span",{className:"relative z-1 col-start-1 row-start-1 w-0 whitespace-nowrap",children:f.jsx("span",{className:"bg-background text-skill-blue",children:f.jsx(JF,{name:n})})})]}),h&&Oa.createPortal(f.jsxs("div",{id:u,ref:o,role:"dialog","aria-label":fJ({name:n}),style:{...k,maxHeight:"min(28rem, calc(100vh - 2rem))"},className:"fixed z-100 overflow-y-auto rounded-lg border border-border bg-background shadow-floating",onMouseEnter:b,onMouseLeave:C,onFocus:b,onBlur:C,onMouseDown:E=>E.stopPropagation(),children:[f.jsxs("div",{className:"sticky top-0 z-1 flex items-center gap-2 border-b border-border-variant bg-background px-4 py-3",children:[f.jsxs("span",{className:"text-sm font-medium text-muted",children:["/",n]}),f.jsx(Gt,{className:"h-5 border-border-variant bg-canvas px-1.5 tracking-[0.05em]",children:SJt()})]}),f.jsx("div",{className:"p-4 text-sm text-text",children:x&&m===null?f.jsx("span",{className:"text-muted",children:AJt()}):f.jsx(Qo,{text:m??r.description})})]}),document.body)]})}function oTn({text:e,isCommand:n}){return f.jsx(f.Fragment,{children:eH(e,n,"skill-chip me-0.5 whitespace-nowrap font-normal text-skill-blue")})}function lTn({text:e,editingTokenEnd:n,isCommand:t,skills:r,projectId:s,textareaRef:i}){const a=T.useRef(null);return T.useLayoutEffect(()=>{const o=i.current,l=a.current;if(!o||!l)return;const u=()=>{const _=getComputedStyle(o);for(const p of sTn)l.style.setProperty(p,_.getPropertyValue(p));l.style.width=`${o.clientWidth+parseFloat(_.borderLeftWidth)+parseFloat(_.borderRightWidth)}px`};u();const h=new ResizeObserver(u);return h.observe(o),()=>h.disconnect()},[e,i]),T.useLayoutEffect(()=>{const o=i.current;if(!o)return;const l=()=>{a.current&&(a.current.scrollTop=o.scrollTop)};return l(),o.addEventListener("scroll",l),()=>o.removeEventListener("scroll",l)},[i,e]),f.jsxs("div",{ref:a,className:"composer-chips pointer-events-none absolute inset-y-0 start-0 z-2 box-border overflow-hidden whitespace-pre-wrap break-words border-solid border-transparent text-transparent select-none",children:[eH(e,t,"",void 0,(o,l,u,h)=>{var x;const _=e.slice(u),p=((x=/^[ \t]+/.exec(_))==null?void 0:x[0].length)??0;if(u===n||_&&!_.startsWith(` +`)&&pk.name===l);return m&&m.source!=="command"?f.jsx(aTn,{label:o,name:l,end:u,skill:m,projectId:s,textareaRef:i},`${h}:${u}`):f.jsxs("span",{"aria-hidden":"true",className:"bg-background text-skill-blue",children:[f.jsx("span",{className:"text-skill-blue-slash",children:"/"}),o.slice(1)]},`${h}:${u}`)},!0),"​"]})}function cTn(e){return e>=95?"var(--accent-red)":e>=80?"var(--accent-amber)":"var(--accent)"}const O5=6.5,XA=2*Math.PI*O5;function uTn({usage:e}){return!e||e.usedTokens<=0?null:f.jsx(_Tn,{usage:e})}function _Tn({usage:e}){const{open:n,setOpen:t,ref:r}=_o(),{usedTokens:s,contextWindow:i}=e,a=i&&i>0?Math.min(100,Math.round(s/i*100)):null,o=a===null?"var(--accent)":cTn(a),l=a===null?"":new Intl.NumberFormat(z(),{style:"percent"}).format(a/100);return f.jsxs("div",{className:"option-picker relative inline-flex shrink-0",ref:r,children:[f.jsx("button",{type:"button",className:`${a===null?"inline-flex h-8 items-center rounded-md px-1 transition-[background,color] duration-150 ease-standard hover:bg-surface":"inline-flex h-8 w-8 shrink-0 items-center justify-center rounded-md text-text transition-[background,color] duration-150 ease-standard hover:bg-surface"} composer-bare context-ring text-sm text-text`,title:oTe(),onClick:()=>t(u=>!u),children:a===null?Ug(s):f.jsxs("svg",{viewBox:"0 0 16 16",width:"16",height:"16","aria-hidden":"true",children:[f.jsx("circle",{cx:"8",cy:"8",r:O5,fill:"none",stroke:"var(--border)",strokeWidth:"2.5"}),f.jsx("circle",{cx:"8",cy:"8",r:O5,fill:"none",stroke:o,strokeWidth:"2.5",strokeLinecap:"round",strokeDasharray:`${XA*Math.max(a,2)/100} ${XA}`,transform:"rotate(-90 8 8)"})]})}),n&&f.jsxs("div",{className:"option-menu absolute bottom-[calc(100%_+_8px)] start-0 max-h-95 flex flex-col bg-background border border-border rounded-lg shadow-menu z-50 overflow-hidden min-w-47.5 [&.align-right]:start-auto [&.align-right]:end-0 [&.drop-down]:bottom-auto [&.drop-down]:top-[calc(100%_+_4px)] [&.session-menu]:start-auto [&.session-menu]:end-1.5 [&.session-menu]:top-[calc(100%_-_2px)] [&.session-menu]:min-w-35 align-right context-meter-menu w-70 pt-2.5 px-3 pb-3 [&_.progress]:mt-2 [&_.progress]:mx-0 [&_.progress]:mb-0 [&_.progress-track]:h-[5px] [&_.progress-track]:border-0 [&_.progress-track]:bg-border",children:[f.jsxs("div",{className:"context-meter-head flex justify-between items-baseline gap-3 text-sm text-muted",children:[f.jsx("span",{children:eTe()}),f.jsx("span",{className:"context-meter-value text-text tabular-nums",children:a===null?hTe({value:Ne(Ug(s))}):xTe({used:Ne(Ug(s)),total:Ne(Ug(i)),percent:Ne(l)})})]}),a!==null&&f.jsx(HF,{value:s,max:i,fillColor:o})]})]})}const Qv="!";function YA(e){return e.startsWith(Qv)?e.slice(Qv.length).trim():null}function fTn(e){return e.startsWith(Qv)?e.slice(Qv.length):e}function dTn(e){return e.replace(/([\\`*_[\]<>$~])/g,"\\$1").replace(/(^|\n)(\s*)(#{1,6}|>|[-+]|\d+\.)\s/g,"$1$2\\$3 ").replace(/(^|\n)(\s*)(=+|-{1,2})(?=\s*(?:\n|$))/g,"$1$2\\$3").replace(/(^|\n)(\s*)(-{3,})(?=\s*(?:\n|$))/g,"$1$2\\$3")}function hTn(e){const n=Math.max(0,...Array.from(e.matchAll(/`+/g),s=>s[0].length)),t="`".repeat(n+1),r=/^[\s`]|[\s`]$/.test(e)?` ${e} `:e;return`${t}${r}${t}`}function pTn(e){const n=Math.max(0,...Array.from(e.matchAll(/`+/g),r=>r[0].length)),t="`".repeat(Math.max(3,n+1));return` ${t} ${e.replace(/^\n|\n$/g,"")} @@ -1036,22 +1036,22 @@ ${t} ${e} \\] -`:`\\(${e}\\)`}function Tjn(e,n){const t=n.trim().split(` +`:`\\(${e}\\)`}function mTn(e,n){const t=n.trim().split(` `),r=" ".repeat(e.length+1);return[`${e} ${t[0]??""}`,...t.slice(1).map(s=>s?`${r}${s}`:"")].join(` -`)}function Ajn(e,n){if(e.length===0)return"";const t=Math.max(...e.map(a=>a.length)),r=a=>`| ${Array.from({length:t},(o,l)=>a[l]??"").join(" | ")} |`,s=n?e[0]:Array.from({length:t},()=>""),i=n?e.slice(1):e;return[r(s),r(Array.from({length:t},()=>"---")),...i.map(r)].join(` -`)}function Rjn(e,n){const t=Number(e.slice(1));return Number.isInteger(t)&&t>=1&&t<=6?`${"#".repeat(t)} ${n.trim()}`:void 0}function Mjn(e){return!e.includes("\\(")&&!e.includes("\\[")&&!e.includes("$$")}function Ojn(e,n){return Math.min(e.length,n.length)/Math.max(e.length,n.length)>=.8&&(e.includes(n)||n.includes(e))}const JF="tool-line flex-1 min-w-0 line-clamp-2 break-words text-base leading-6",K6="tool-output py-1.5 px-2.5 font-mono text-xs text-subtext whitespace-pre-wrap wrap-anywhere max-h-65 overflow-y-auto bg-background border border-border-variant rounded-sm",Eu=256,eH=1024,tH=2e4,n4=8,v1="chat-annotations";function m_(e){return e instanceof Element?e:e.parentElement}function ZA(e){const n=document.createRange();return n.setStart(e.container,e.offset),n.collapse(!0),n}function r4(e,n){return ZA(e).compareBoundaryPoints(Range.START_TO_START,ZA(n))<0}function JA(e,n){const t=document.createRange();return t.setStart(e.container,e.offset),t.setEnd(n.container,n.offset),t.cloneContents()}const Djn=new Set(["A","B","CODE","EM","I","STRONG"]);function Ljn(e,n){var s,i;const t=m_(e.endContainer);if(Array.from(n.childNodes).every(a=>a.nodeType===Node.TEXT_NODE)){let a=m_(e.startContainer);for(;a&&a.matches(".md *")&&a.contains(t);){if(Djn.has(a.tagName)){const o=a.cloneNode(!1);o instanceof HTMLElement&&(o.replaceChildren(...Array.from(n.childNodes)),n.replaceChildren(o))}a=a.parentElement}}const r=(s=m_(e.startContainer))==null?void 0:s.closest("pre");if(r!=null&&r.contains(t)){const a=(i=r.querySelector("code"))==null?void 0:i.cloneNode(!1),o=r.cloneNode(!1);o instanceof HTMLElement&&a instanceof HTMLElement&&(a.replaceChildren(...Array.from(n.childNodes)),o.replaceChildren(a),n.replaceChildren(o))}}function Ijn(e){e.querySelectorAll("button").forEach(n=>{n.replaceWith(document.createTextNode(n.textContent??""))}),e.querySelectorAll("script, style, iframe, object, embed, input, textarea, select").forEach(n=>n.remove()),e.querySelectorAll("*").forEach(n=>{for(const t of Array.from(n.attributes))(t.name.toLowerCase().startsWith("on")||t.name==="contenteditable"||t.name==="tabindex")&&n.removeAttribute(t.name)})}function $jn(e,n){const t=document.createElement("div"),r={container:e.endContainer,offset:e.endOffset};let s={container:e.startContainer,offset:e.startOffset};const i=Array.from(n.querySelectorAll(".katex")).filter(a=>e.intersectsNode(a));for(const a of i){const o=a.closest(".katex-display")??a,l=document.createRange();l.selectNode(o);const u={container:l.startContainer,offset:l.startOffset},h={container:l.endContainer,offset:l.endOffset};if(r4(s,u)&&t.append(JA(s,u)),t.append(o.cloneNode(!0)),s=h,!r4(s,r))break}return i.length===0?t.append(e.cloneContents()):r4(s,r)&&t.append(JA(s,r)),Ljn(e,t),Ijn(t),t}function Bjn(e){const n=Array.from(e.querySelectorAll("tr")).map(t=>Array.from(t.querySelectorAll(":scope > th, :scope > td")).map(r=>D0(r).trim().replaceAll("|","\\|"))).filter(t=>t.length>0);return n.length>0?` +`)}function gTn(e,n){if(e.length===0)return"";const t=Math.max(...e.map(a=>a.length)),r=a=>`| ${Array.from({length:t},(o,l)=>a[l]??"").join(" | ")} |`,s=n?e[0]:Array.from({length:t},()=>""),i=n?e.slice(1):e;return[r(s),r(Array.from({length:t},()=>"---")),...i.map(r)].join(` +`)}function vTn(e,n){const t=Number(e.slice(1));return Number.isInteger(t)&&t>=1&&t<=6?`${"#".repeat(t)} ${n.trim()}`:void 0}function bTn(e){return!e.includes("\\(")&&!e.includes("\\[")&&!e.includes("$$")}function yTn(e,n){return Math.min(e.length,n.length)/Math.max(e.length,n.length)>=.8&&(e.includes(n)||n.includes(e))}const tH="tool-line flex-1 min-w-0 line-clamp-2 break-words text-base leading-6",K6="tool-output py-1.5 px-2.5 font-mono text-xs text-subtext whitespace-pre-wrap wrap-anywhere max-h-65 overflow-y-auto bg-background border border-border-variant rounded-sm",Eu=256,nH=1024,rH=2e4,n4=8,v1="chat-annotations";function m_(e){return e instanceof Element?e:e.parentElement}function ZA(e){const n=document.createRange();return n.setStart(e.container,e.offset),n.collapse(!0),n}function r4(e,n){return ZA(e).compareBoundaryPoints(Range.START_TO_START,ZA(n))<0}function JA(e,n){const t=document.createRange();return t.setStart(e.container,e.offset),t.setEnd(n.container,n.offset),t.cloneContents()}const xTn=new Set(["A","B","CODE","EM","I","STRONG"]);function wTn(e,n){var s,i;const t=m_(e.endContainer);if(Array.from(n.childNodes).every(a=>a.nodeType===Node.TEXT_NODE)){let a=m_(e.startContainer);for(;a&&a.matches(".md *")&&a.contains(t);){if(xTn.has(a.tagName)){const o=a.cloneNode(!1);o instanceof HTMLElement&&(o.replaceChildren(...Array.from(n.childNodes)),n.replaceChildren(o))}a=a.parentElement}}const r=(s=m_(e.startContainer))==null?void 0:s.closest("pre");if(r!=null&&r.contains(t)){const a=(i=r.querySelector("code"))==null?void 0:i.cloneNode(!1),o=r.cloneNode(!1);o instanceof HTMLElement&&a instanceof HTMLElement&&(a.replaceChildren(...Array.from(n.childNodes)),o.replaceChildren(a),n.replaceChildren(o))}}function kTn(e){e.querySelectorAll("button").forEach(n=>{n.replaceWith(document.createTextNode(n.textContent??""))}),e.querySelectorAll("script, style, iframe, object, embed, input, textarea, select").forEach(n=>n.remove()),e.querySelectorAll("*").forEach(n=>{for(const t of Array.from(n.attributes))(t.name.toLowerCase().startsWith("on")||t.name==="contenteditable"||t.name==="tabindex")&&n.removeAttribute(t.name)})}function STn(e,n){const t=document.createElement("div"),r={container:e.endContainer,offset:e.endOffset};let s={container:e.startContainer,offset:e.startOffset};const i=Array.from(n.querySelectorAll(".katex")).filter(a=>e.intersectsNode(a));for(const a of i){const o=a.closest(".katex-display")??a,l=document.createRange();l.selectNode(o);const u={container:l.startContainer,offset:l.startOffset},h={container:l.endContainer,offset:l.endOffset};if(r4(s,u)&&t.append(JA(s,u)),t.append(o.cloneNode(!0)),s=h,!r4(s,r))break}return i.length===0?t.append(e.cloneContents()):r4(s,r)&&t.append(JA(s,r)),wTn(e,t),kTn(t),t}function CTn(e){const n=Array.from(e.querySelectorAll("tr")).map(t=>Array.from(t.querySelectorAll(":scope > th, :scope > td")).map(r=>D0(r).trim().replaceAll("|","\\|"))).filter(t=>t.length>0);return n.length>0?` -${Ajn(n,!!e.querySelector("tr:first-child th"))} +${gTn(n,!!e.querySelector("tr:first-child th"))} -`:""}function nH(e){const n=e.tagName==="OL",t=e.getAttribute("start"),r=t===null?1:Number(t);let s=Number.isFinite(r)?r:1;const i=[];for(const a of Array.from(e.children).filter(o=>o instanceof HTMLElement&&o.tagName==="LI")){const o=a.getAttribute("value"),l=o===null?s:Number(o),u=Number.isFinite(l)?l:s;s=u+1;const h=Array.from(a.childNodes).map(_=>_ instanceof HTMLElement&&_.matches("UL, OL")?` -${nH(_).trim()} -`:D0(_)).join("").trim();i.push(Tjn(n?`${u}.`:"-",h))}return` +`:""}function sH(e){const n=e.tagName==="OL",t=e.getAttribute("start"),r=t===null?1:Number(t);let s=Number.isFinite(r)?r:1;const i=[];for(const a of Array.from(e.children).filter(o=>o instanceof HTMLElement&&o.tagName==="LI")){const o=a.getAttribute("value"),l=o===null?s:Number(o),u=Number.isFinite(l)?l:s;s=u+1;const h=Array.from(a.childNodes).map(_=>_ instanceof HTMLElement&&_.matches("UL, OL")?` +${sH(_).trim()} +`:D0(_)).join("").trim();i.push(mTn(n?`${u}.`:"-",h))}return` ${i.join(` `)} -`}function D0(e){var r,s,i,a,o;if(e.nodeType===Node.TEXT_NODE)return Njn(e.textContent??"");if(!(e instanceof HTMLElement))return Array.from(e.childNodes).map(D0).join("");if(e.matches(".katex-display")){const l=(s=(r=e.querySelector("annotation[encoding='application/x-tex']"))==null?void 0:r.textContent)==null?void 0:s.trim();return l?D5(l,!0):""}if(e.matches(".katex")){const l=(a=(i=e.querySelector("annotation[encoding='application/x-tex']"))==null?void 0:i.textContent)==null?void 0:a.trim();return l?D5(l,!1):""}if(e.tagName==="BR")return` -`;if(e.tagName==="TABLE")return Bjn(e);if(e.matches("UL, OL"))return nH(e);if(e.tagName==="CODE"&&((o=e.parentElement)==null?void 0:o.tagName)!=="PRE")return zjn(e.textContent??"");if(e.tagName==="PRE")return jjn(e.textContent??"");const n=Array.from(e.childNodes).map(D0).join("");if(!n)return"";if(e.matches("strong, b"))return`**${n}**`;if(e.matches("em, i"))return`*${n}*`;if(e.tagName==="A"){const l=e.getAttribute("href");return l?`[${n}](${l})`:n}if(e.tagName==="LI")return`${n.trim()} +`}function D0(e){var r,s,i,a,o;if(e.nodeType===Node.TEXT_NODE)return dTn(e.textContent??"");if(!(e instanceof HTMLElement))return Array.from(e.childNodes).map(D0).join("");if(e.matches(".katex-display")){const l=(s=(r=e.querySelector("annotation[encoding='application/x-tex']"))==null?void 0:r.textContent)==null?void 0:s.trim();return l?D5(l,!0):""}if(e.matches(".katex")){const l=(a=(i=e.querySelector("annotation[encoding='application/x-tex']"))==null?void 0:i.textContent)==null?void 0:a.trim();return l?D5(l,!1):""}if(e.tagName==="BR")return` +`;if(e.tagName==="TABLE")return CTn(e);if(e.matches("UL, OL"))return sH(e);if(e.tagName==="CODE"&&((o=e.parentElement)==null?void 0:o.tagName)!=="PRE")return hTn(e.textContent??"");if(e.tagName==="PRE")return pTn(e.textContent??"");const n=Array.from(e.childNodes).map(D0).join("");if(!n)return"";if(e.matches("strong, b"))return`**${n}**`;if(e.matches("em, i"))return`*${n}*`;if(e.tagName==="A"){const l=e.getAttribute("href");return l?`[${n}](${l})`:n}if(e.tagName==="LI")return`${n.trim()} `;if(e.matches("TH, TD"))return`${n.trim()} | `;if(e.tagName==="TR")return`${n.replace(/ \| $/,"")} `;if(e.tagName==="BLOCKQUOTE")return` @@ -1059,7 +1059,7 @@ ${n.trim().split(` `).map(l=>`> ${l}`).join(` `)} -`;const t=Rjn(e.tagName,n);return t?` +`;const t=vTn(e.tagName,n);return t?` ${t} @@ -1067,35 +1067,35 @@ ${t} ${n.trim()} -`:n}function Pjn(e,n){return D0(e).replace(/\r\n?/g,` +`:n}function ETn(e,n){return D0(e).replace(/\r\n?/g,` `).replace(/[ \t]+\n/g,` `).replace(/\n{3,}/g,` -`).trim()||n}function eR(e){return e.normalize("NFKC").replace(/[\s\u200B-\u200D\u2060\uFEFF]/g,"").toLowerCase()}function Fjn(e,n){var s,i,a,o;if(!Mjn(e))return;const t=eR(e);if(t.length<8)return;let r;for(const l of n.querySelectorAll(".msg-assistant > .md .katex")){const h=[(s=l.querySelector(".katex-mathml"))==null?void 0:s.textContent,(i=l.querySelector(".katex-html"))==null?void 0:i.textContent,l.textContent].filter(x=>!!x).map(eR).find(x=>Ojn(x,t));if(!h)continue;const _=(o=(a=l.querySelector("annotation[encoding='application/x-tex']"))==null?void 0:a.textContent)==null?void 0:o.trim();if(!_)continue;const p=!!l.closest(".katex-display"),m={markdown:D5(_,p).trim(),delta:Math.abs(h.length-t.length)};(!r||m.delta .md .katex")){const h=[(s=l.querySelector(".katex-mathml"))==null?void 0:s.textContent,(i=l.querySelector(".katex-html"))==null?void 0:i.textContent,l.textContent].filter(x=>!!x).map(eR).find(x=>yTn(x,t));if(!h)continue;const _=(o=(a=l.querySelector("annotation[encoding='application/x-tex']"))==null?void 0:a.textContent)==null?void 0:o.trim();if(!_)continue;const p=!!l.closest(".katex-display"),m={markdown:D5(_,p).trim(),delta:Math.abs(h.length-t.length)};(!r||m.deltaj.width>0&&j.height>0),x=m[0]??t.getBoundingClientRect(),k=m.filter(j=>j.topx.top),v=k.length>0?k:[x],b=Math.min(...v.map(j=>j.left)),w=Math.max(...v.map(j=>j.right)),y=Math.min(...v.map(j=>j.top)),C=Math.max(...v.map(j=>j.bottom)),N=34,E=74,T=y>=N+n4?y-N-n4:C+n4;return{text:Pjn(p,_),range:t.cloneRange(),x:Math.min(window.innerWidth-E,Math.max(E,b+(w-b)/2)),top:T}}function qjn(e,n){const[t,r]=A.useState(null),s=A.useRef(!1),i=A.useCallback(()=>{const l=e.current;r(l?Hjn(l):null)},[e]);A.useEffect(()=>{let l=null;const u=()=>{s.current||i()},h=p=>{const m=e.current,x=p.target;!p.isPrimary||p.button!==0||!m||!(x instanceof Node)||!m.contains(x)||(s.current=!0,r(null))},_=p=>{!p.isPrimary||!s.current||(s.current=!1,l=window.requestAnimationFrame(i))};return document.addEventListener("selectionchange",u),document.addEventListener("pointerdown",h,!0),window.addEventListener("pointerup",_,!0),window.addEventListener("pointercancel",_,!0),()=>{document.removeEventListener("selectionchange",u),document.removeEventListener("pointerdown",h,!0),window.removeEventListener("pointerup",_,!0),window.removeEventListener("pointercancel",_,!0),l!==null&&window.cancelAnimationFrame(l),s.current=!1}},[i]),A.useEffect(()=>{if(!t)return;const l=u=>{const h=u.target;h instanceof Element&&h.closest(".chat-selection-action")||r(null)};return document.addEventListener("mousedown",l,!0),window.addEventListener("resize",i),()=>{document.removeEventListener("mousedown",l,!0),window.removeEventListener("resize",i)}},[t,i]);const a=A.useCallback(()=>{var l;t&&(n({text:t.text,range:t.range}),r(null),(l=window.getSelection())==null||l.removeAllRanges())},[t,n]),o=A.useCallback(()=>r(null),[]);return{action:t,add:a,dismiss:o}}function Ujn(e){A.useLayoutEffect(()=>{if(!("highlights"in CSS)||typeof Highlight>"u")return;const n=e.flatMap(r=>r.range?[r.range]:[]);if(n.length===0){CSS.highlights.delete(v1);return}const t=new Highlight(...n);return CSS.highlights.set(v1,t),()=>{CSS.highlights.get(v1)===t&&CSS.highlights.delete(v1)}},[e])}function Gjn({annotation:e}){const n=A.useRef(null),[t,r]=A.useState();return A.useLayoutEffect(()=>{var i;const s=(i=n.current)==null?void 0:i.closest(".chat-thread-inner");r(s?Fjn(e.text,s):void 0)},[e.id,e.text]),f.jsx("div",{ref:n,children:f.jsx(Wo,{text:t??e.text})})}function Vjn({annotations:e,onRemove:n}){return e.map((t,r)=>f.jsxs("div",{className:`annotation-item grid gap-2 py-2 px-1 [&+&]:border-t [&+&]:border-border-variant ${n?"grid-cols-[24px_minmax(0,_1fr)_28px]":"grid-cols-[24px_minmax(0,_1fr)]"}`,children:[f.jsxs("span",{className:"text-sm text-muted text-end",children:[r+1,"."]}),f.jsxs("div",{className:"min-w-0",children:[f.jsx("div",{className:"text-sm text-muted mb-1",children:K4e()}),f.jsx(Gjn,{annotation:t})]}),n&&f.jsx(Ft,{type:"button",size:"small","data-annotation-remove":!0,title:Xwe(),"aria-label":cZ({number:Jt(r+1)}),onClick:()=>n(t.id),children:f.jsx(_r,{size:13})})]},t.id))}function W6({annotations:e,variant:n,onClear:t,onRemove:r}){const s=A.useRef(null),i=A.useRef(null),a=A.useId(),o=_o(s),l=n==="sent",u=A.useRef(null),h=()=>{u.current!==null&&window.clearTimeout(u.current),u.current=null,o.setOpen(!0)},_=()=>{u.current=window.setTimeout(()=>{var x;(x=i.current)!=null&&x.contains(document.activeElement)||o.setOpen(!1)},160)},p=()=>{const x=l||!o.open;o.setOpen(x),x&&window.requestAnimationFrame(()=>{var k;return(k=i.current)==null?void 0:k.focus()})},m=x=>{r==null||r(x),window.requestAnimationFrame(()=>{var v,b;(b=((v=i.current)==null?void 0:v.querySelector("button[data-annotation-remove]"))??i.current??s.current)==null||b.focus()})};return A.useEffect(()=>()=>{u.current!==null&&window.clearTimeout(u.current)},[]),f.jsxs("div",{className:l?"sent-annotations relative flex w-fit":"composer-annotations relative flex w-fit pt-2 px-3 pb-0",ref:o.ref,onMouseEnter:l?h:void 0,onMouseLeave:l?_:void 0,children:[f.jsxs("div",{className:`inline-flex items-center border border-border bg-background overflow-hidden ${l?"rounded-full":"rounded-sm"}`,children:[f.jsxs("button",{ref:s,type:"button",className:`inline-flex items-center gap-1.5 py-1 text-sm font-medium text-text [&:hover]:bg-surface ${l?"px-2.5":"ps-2 pe-1.5"}`,"aria-expanded":o.open,"aria-haspopup":"dialog","aria-controls":a,onClick:p,children:[f.jsx(wI,{size:l?13:14,className:"text-muted"}),e.length===1?Fme():khe({count:Jt(e.length)})]}),t&&f.jsx("button",{type:"button",className:"inline-flex items-center justify-center self-stretch w-6.5 text-muted border-s border-border [&:hover]:bg-surface [&:hover]:text-text",title:VE(),"aria-label":VE(),onClick:t,children:f.jsx(_r,{size:13})})]}),o.open&&f.jsx("div",{id:a,ref:i,tabIndex:-1,className:`annotation-menu absolute bottom-[calc(100%_+_8px)] z-50 w-[min(440px,_calc(100vw_-_48px))] max-h-80 overflow-y-auto overscroll-contain bg-background border border-border rounded-lg shadow-popover p-2 text-start ${l?"end-0 after:absolute after:top-full after:start-0 after:end-0 after:h-2 after:content-['']":"start-3"}`,role:"dialog","aria-label":P4e(),children:f.jsx(Vjn,{annotations:e,onRemove:r?m:void 0})})]})}function Kjn(e){return f.jsx(W6,{...e,variant:"composer"})}const Wjn=["prompt-collapsed text-muted text-base font-[375] my-3.5 mx-0 [&_summary]:flex","[&_summary]:items-center [&_summary]:gap-2 [&_summary]:cursor-pointer","[&_summary]:list-none [&_summary]:select-none [&_summary::-webkit-details-marker]:hidden","[&_summary::after]:content-['›'] [&_summary::after]:text-muted","[&_summary::after]:transition-transform [&_summary::after]:duration-80 [&_summary::after]:ease-standard [&[open]_summary::after]:rotate-90"].join(" "),tR=["prompt-collapsed-body mt-1.5 ps-3 border-s-2 border-s-border","text-sm text-subtext"].join(" "),Qjn=["prompt-collapsed plan-resolved text-subtext my-3.5 mx-0","[&_summary]:flex [&_summary]:items-center [&_summary]:gap-2 [&_summary]:w-fit [&_summary]:max-w-full","[&_summary]:py-[3px] [&_summary]:px-1 [&_summary]:cursor-pointer [&_summary]:rounded-sm","[&_summary]:list-none [&_summary]:select-none [&_summary:hover]:bg-surface","[&_summary::-webkit-details-marker]:hidden","[&_summary_.plan-chevron]:transition-transform [&_summary_.plan-chevron]:duration-120","[&_summary_.plan-chevron]:ease-standard [&[open]_summary_.plan-chevron]:rotate-90"].join(" "),Xjn=["prompt-head text-sm font-medium text-text","[&_code]:font-mono [&_code]:text-sm [&_code]:text-text"].join(" "),L5="prompt-actions flex flex-wrap gap-2",nR=[],Yjn=[],Dp={};function __(e){const n=e.replace(/\/+$/,"");return n.slice(n.lastIndexOf("/")+1)||n}function s4(e){var t;const n=e.replace(/\\/g,"/").replace(/\/+$/,"").split("/").filter(Boolean);return((t=n.at(-1))==null?void 0:t.toLowerCase())!=="skill.md"?null:n.at(-2)??null}function Zjn(e,n){return/^orx-[a-z0-9]+(?:-[a-z0-9]+)*$/.test(n)?e==="Skill"?`.claude/skills/${n}/SKILL.md`:e==="skill"?`.opencode/skills/${n}/SKILL.md`:null:null}function qs(e,...n){for(const t of n){const r=e[t];if(typeof r=="string"&&r)return r}return null}function i4(e,n,t){const r=e[n];if(!Array.isArray(r))return null;for(const s of r){if(!s||typeof s!="object"||!(t in s))continue;const i=s[t];if(typeof i=="string"&&i)return i}return null}function a4(e,n){const t=e[n];if(!Array.isArray(t))return[];const r=[];for(let s=0;s=Eu));s++);return r}function Jjn(e,n){const t=e[n];if(!Array.isArray(t))return null;const r=[];for(const s of t){if(typeof s!="string")return null;r.push(s)}return r}function kd(...e){const n=new Set,t=new RegExp(`^${L_}$`,"i");let r=0;for(const s of e)for(const i of s){if(n.size>=Eu||r++>=eH)return[...n];t.test(i)&&n.add(i.toLowerCase())}return[...n]}function wy(e){return e.replace(/^Exit code \d+\s*/i,"").split(` +`).trim();if(!_)return null;const p=STn(t,e),m=Array.from(t.getClientRects()).filter(j=>j.width>0&&j.height>0),x=m[0]??t.getBoundingClientRect(),k=m.filter(j=>j.topx.top),v=k.length>0?k:[x],b=Math.min(...v.map(j=>j.left)),w=Math.max(...v.map(j=>j.right)),y=Math.min(...v.map(j=>j.top)),C=Math.max(...v.map(j=>j.bottom)),E=34,N=74,A=y>=E+n4?y-E-n4:C+n4;return{text:ETn(p,_),range:t.cloneRange(),x:Math.min(window.innerWidth-N,Math.max(N,b+(w-b)/2)),top:A}}function jTn(e,n){const[t,r]=T.useState(null),s=T.useRef(!1),i=T.useCallback(()=>{const l=e.current;r(l?zTn(l):null)},[e]);T.useEffect(()=>{let l=null;const u=()=>{s.current||i()},h=p=>{const m=e.current,x=p.target;!p.isPrimary||p.button!==0||!m||!(x instanceof Node)||!m.contains(x)||(s.current=!0,r(null))},_=p=>{!p.isPrimary||!s.current||(s.current=!1,l=window.requestAnimationFrame(i))};return document.addEventListener("selectionchange",u),document.addEventListener("pointerdown",h,!0),window.addEventListener("pointerup",_,!0),window.addEventListener("pointercancel",_,!0),()=>{document.removeEventListener("selectionchange",u),document.removeEventListener("pointerdown",h,!0),window.removeEventListener("pointerup",_,!0),window.removeEventListener("pointercancel",_,!0),l!==null&&window.cancelAnimationFrame(l),s.current=!1}},[i]),T.useEffect(()=>{if(!t)return;const l=u=>{const h=u.target;h instanceof Element&&h.closest(".chat-selection-action")||r(null)};return document.addEventListener("mousedown",l,!0),window.addEventListener("resize",i),()=>{document.removeEventListener("mousedown",l,!0),window.removeEventListener("resize",i)}},[t,i]);const a=T.useCallback(()=>{var l;t&&(n({text:t.text,range:t.range}),r(null),(l=window.getSelection())==null||l.removeAllRanges())},[t,n]),o=T.useCallback(()=>r(null),[]);return{action:t,add:a,dismiss:o}}function TTn(e){T.useLayoutEffect(()=>{if(!("highlights"in CSS)||typeof Highlight>"u")return;const n=e.flatMap(r=>r.range?[r.range]:[]);if(n.length===0){CSS.highlights.delete(v1);return}const t=new Highlight(...n);return CSS.highlights.set(v1,t),()=>{CSS.highlights.get(v1)===t&&CSS.highlights.delete(v1)}},[e])}function ATn({annotation:e}){const n=T.useRef(null),[t,r]=T.useState();return T.useLayoutEffect(()=>{var i;const s=(i=n.current)==null?void 0:i.closest(".chat-thread-inner");r(s?NTn(e.text,s):void 0)},[e.id,e.text]),f.jsx("div",{ref:n,children:f.jsx(Qo,{text:t??e.text})})}function RTn({annotations:e,onRemove:n}){return e.map((t,r)=>f.jsxs("div",{className:`annotation-item grid gap-2 py-2 px-1 [&+&]:border-t [&+&]:border-border-variant ${n?"grid-cols-[24px_minmax(0,_1fr)_28px]":"grid-cols-[24px_minmax(0,_1fr)]"}`,children:[f.jsxs("span",{className:"text-sm text-muted text-end",children:[r+1,"."]}),f.jsxs("div",{className:"min-w-0",children:[f.jsx("div",{className:"text-sm text-muted mb-1",children:Q4e()}),f.jsx(ATn,{annotation:t})]}),n&&f.jsx(Ft,{type:"button",size:"small","data-annotation-remove":!0,title:Zwe(),"aria-label":_Z({number:Jt(r+1)}),onClick:()=>n(t.id),children:f.jsx(_r,{size:13})})]},t.id))}function W6({annotations:e,variant:n,onClear:t,onRemove:r}){const s=T.useRef(null),i=T.useRef(null),a=T.useId(),o=_o(s),l=n==="sent",u=T.useRef(null),h=()=>{u.current!==null&&window.clearTimeout(u.current),u.current=null,o.setOpen(!0)},_=()=>{u.current=window.setTimeout(()=>{var x;(x=i.current)!=null&&x.contains(document.activeElement)||o.setOpen(!1)},160)},p=()=>{const x=l||!o.open;o.setOpen(x),x&&window.requestAnimationFrame(()=>{var k;return(k=i.current)==null?void 0:k.focus()})},m=x=>{r==null||r(x),window.requestAnimationFrame(()=>{var v,b;(b=((v=i.current)==null?void 0:v.querySelector("button[data-annotation-remove]"))??i.current??s.current)==null||b.focus()})};return T.useEffect(()=>()=>{u.current!==null&&window.clearTimeout(u.current)},[]),f.jsxs("div",{className:l?"sent-annotations relative flex w-fit":"composer-annotations relative flex w-fit pt-2 px-3 pb-0",ref:o.ref,onMouseEnter:l?h:void 0,onMouseLeave:l?_:void 0,children:[f.jsxs("div",{className:`inline-flex items-center border border-border bg-background overflow-hidden ${l?"rounded-full":"rounded-sm"}`,children:[f.jsxs("button",{ref:s,type:"button",className:`inline-flex items-center gap-1.5 py-1 text-sm font-medium text-text [&:hover]:bg-surface ${l?"px-2.5":"ps-2 pe-1.5"}`,"aria-expanded":o.open,"aria-haspopup":"dialog","aria-controls":a,onClick:p,children:[f.jsx(SI,{size:l?13:14,className:"text-muted"}),e.length===1?qme():Che({count:Jt(e.length)})]}),t&&f.jsx("button",{type:"button",className:"inline-flex items-center justify-center self-stretch w-6.5 text-muted border-s border-border [&:hover]:bg-surface [&:hover]:text-text",title:VE(),"aria-label":VE(),onClick:t,children:f.jsx(_r,{size:13})})]}),o.open&&f.jsx("div",{id:a,ref:i,tabIndex:-1,className:`annotation-menu absolute bottom-[calc(100%_+_8px)] z-50 w-[min(440px,_calc(100vw_-_48px))] max-h-80 overflow-y-auto overscroll-contain bg-background border border-border rounded-lg shadow-popover p-2 text-start ${l?"end-0 after:absolute after:top-full after:start-0 after:end-0 after:h-2 after:content-['']":"start-3"}`,role:"dialog","aria-label":H4e(),children:f.jsx(RTn,{annotations:e,onRemove:r?m:void 0})})]})}function MTn(e){return f.jsx(W6,{...e,variant:"composer"})}const OTn=["prompt-collapsed text-muted text-base font-[375] my-3.5 mx-0 [&_summary]:flex","[&_summary]:items-center [&_summary]:gap-2 [&_summary]:cursor-pointer","[&_summary]:list-none [&_summary]:select-none [&_summary::-webkit-details-marker]:hidden","[&_summary::after]:content-['›'] [&_summary::after]:text-muted","[&_summary::after]:transition-transform [&_summary::after]:duration-80 [&_summary::after]:ease-standard [&[open]_summary::after]:rotate-90"].join(" "),tR=["prompt-collapsed-body mt-1.5 ps-3 border-s-2 border-s-border","text-sm text-subtext"].join(" "),DTn=["prompt-collapsed plan-resolved text-subtext my-3.5 mx-0","[&_summary]:flex [&_summary]:items-center [&_summary]:gap-2 [&_summary]:w-fit [&_summary]:max-w-full","[&_summary]:py-[3px] [&_summary]:px-1 [&_summary]:cursor-pointer [&_summary]:rounded-sm","[&_summary]:list-none [&_summary]:select-none [&_summary:hover]:bg-surface","[&_summary::-webkit-details-marker]:hidden","[&_summary_.plan-chevron]:transition-transform [&_summary_.plan-chevron]:duration-120","[&_summary_.plan-chevron]:ease-standard [&[open]_summary_.plan-chevron]:rotate-90"].join(" "),LTn=["prompt-head text-sm font-medium text-text","[&_code]:font-mono [&_code]:text-sm [&_code]:text-text"].join(" "),L5="prompt-actions flex flex-wrap gap-2",nR=[],ITn=[],Dp={};function __(e){const n=e.replace(/\/+$/,"");return n.slice(n.lastIndexOf("/")+1)||n}function s4(e){var t;const n=e.replace(/\\/g,"/").replace(/\/+$/,"").split("/").filter(Boolean);return((t=n.at(-1))==null?void 0:t.toLowerCase())!=="skill.md"?null:n.at(-2)??null}function $Tn(e,n){return/^orx-[a-z0-9]+(?:-[a-z0-9]+)*$/.test(n)?e==="Skill"?`.claude/skills/${n}/SKILL.md`:e==="skill"?`.opencode/skills/${n}/SKILL.md`:null:null}function qs(e,...n){for(const t of n){const r=e[t];if(typeof r=="string"&&r)return r}return null}function i4(e,n,t){const r=e[n];if(!Array.isArray(r))return null;for(const s of r){if(!s||typeof s!="object"||!(t in s))continue;const i=s[t];if(typeof i=="string"&&i)return i}return null}function a4(e,n){const t=e[n];if(!Array.isArray(t))return[];const r=[];for(let s=0;s=Eu));s++);return r}function BTn(e,n){const t=e[n];if(!Array.isArray(t))return null;const r=[];for(const s of t){if(typeof s!="string")return null;r.push(s)}return r}function kd(...e){const n=new Set,t=new RegExp(`^${L_}$`,"i");let r=0;for(const s of e)for(const i of s){if(n.size>=Eu||r++>=nH)return[...n];t.test(i)&&n.add(i.toLowerCase())}return[...n]}function wy(e){return e.replace(/^Exit code \d+\s*/i,"").split(` `).filter(n=>!/^\s*\[orx-(?:run|experiment):[^\]]+\]\s*$/.test(n)).join(` -`).trim()}function eTn(e){const n=e.changes;if(!Array.isArray(n))return null;for(const t of n){if(!t||typeof t!="object"||!("path"in t)||typeof t.path!="string")continue;const r="kind"in t?t.kind:null,s=r&&typeof r=="object"&&"type"in r&&typeof r.type=="string"?r.type:null;return{path:t.path,type:s}}return null}function tTn(e){const n=e.trim(),t=n.match(/^\/bin\/(?:ba|z)?sh\s+-lc\s+([\s\S]+)$/);let r=((t==null?void 0:t[1])??n).trim();return r=k5n(r),rH(r)}function rH(e){return rTn(e).replace(/[\t\r ]+/g," ").trim()}function nTn(e){let n=null,t=!1;for(let r=0;r!i.startsWith("-")&&i.includes(":"));if(!n)return null;const t=n.indexOf(":"),r=n.slice(0,t),s=n.slice(t+1);return r&&iH(s)?{ref:r,path:s}:null}function aTn(e){const n=e.match(/\b(?:rg|grep)\b(?:\s+-[^\s]+)*\s+(?:"([^"]+)"|'([^']+)'|([^\s]+))/);return(n==null?void 0:n[1])??(n==null?void 0:n[2])??(n==null?void 0:n[3])??null}function rR(e,n){if(/[$`~]/.test(e)||/[$`~]/.test(n))return null;const t=n.startsWith("/")||!n.startsWith("/")&&e.startsWith("/"),r=n.startsWith("/")?[]:e.split("/").filter(Boolean);for(const i of n.split("/"))if(!(!i||i===".")){if(i===".."){r.length>0&&r[r.length-1]!==".."?r.pop():t||r.push(i);continue}r.push(i)}return`${t?"/":""}${r.join("/")}`||(t?"/":null)}function oTn(e,n,t,r){if(e.startsWith("/"))return e;let s=r??"";for(let i=0;i!u.startsWith("-"));if(!o)return null;const l=rR(s,o);if(!l)return null;s=l}return s?rR(s,e):e}const Ro="[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}",lTn=new RegExp(`\\bchat_(${Ro})\\b`,"gi"),L_=`(?:${Ro}|[0-9a-f]{8})`;function Sd(e){const n=[];let t="",r="",s=null,i=!1;const a=()=>{(t.trim()||r.trim())&&n.push({raw:t.trim(),code:r.trim()}),t="",r=""},o=u=>{let h=1,_=null,p=!1;for(let m=u;m{let h=!1;for(let _=u;_E5n(t.raw,n))}function Sa(e,n){return ky(e,n).length>0}function cTn(e){if(!e)return[];const n=new Set;for(const t of e.slice(0,tH).matchAll(lTn))if(n.add(t[0].toLowerCase()),n.size>=Eu)break;return[...n]}function I5(e,n){if(!e)return[];const t=new Set,r=e.slice(0,tH),s=n==="runs"?[new RegExp(`/runs/(${Ro})`,"gi"),new RegExp(`\\brun(?:_|\\s+)id:\\s*(${Ro})`,"gi"),new RegExp(`^\\s*RUN\\s+(${Ro})\\b`,"gim"),new RegExp(`={3,}\\s*(${Ro})\\s*={3,}`,"gi")]:[new RegExp(`/experiments/(${Ro})`,"gi"),new RegExp(`^\\s*id:\\s*(${Ro})`,"gim"),new RegExp(`={3,}\\s*(${Ro})\\s*={3,}`,"gi")];for(const a of s)for(const o of r.matchAll(a))if(t.add(o[1]),t.size>=Eu)return[...t];const i=new RegExp(`^\\s*(${Ro})(?:\\s|$)`,"gim");for(const a of r.matchAll(i))if(t.add(a[1]),t.size>=Eu)break;return[...t]}function oH(e,n){let t=0;return n.map(r=>{const s=e.indexOf(r.raw,t),i=s===-1?e.indexOf(r.raw):s;return t=Math.max(t,i+r.raw.length),{invocation:r,offset:Math.max(0,i)}})}function lH(e,n,t,r){const s=new RegExp(`(?:^|[\\s;])(?:export\\s+)?${n}\\s*=\\s*(?:"([^"]*)"|'([^']*)'|([^\\s;]+))`,"gi");let i="";for(const a of e.matchAll(s)){if((a.index??0)>=t)break;i=a[1]??a[2]??a[3]??""}return[...i.matchAll(new RegExp(r,"gi"))].map(a=>a[0])}function cH(e,n,t,r){const s=new RegExp(`\\bfor\\s+${n}\\s+in\\s+([\\s\\S]*?)(?:;|\\n)\\s*do\\b`,"gi");let i="";for(const a of e.matchAll(s)){const o=a.index??0;if(o>=t)break;const l=o+a[0].length;l<=t&&/\bdone\b/.test(e.slice(l,t))||(i=a[1])}return/\$\(|`/.test(i)?[]:[...i.matchAll(new RegExp(r,"gi"))].map(a=>a[0])}function uTn(e,n,t=[],r=[]){const s=ky(e,"logs"),i=new Set;if(s.length===0){if(!Sa(e,"logs"))return[];const o=t.length>0?[]:I5(n,"runs");for(const l of t.length>0?t:o.length>0?o:r)if(i.add(l),i.size>=Eu)break;return kd([...i])}let a=!1;for(const{invocation:o,offset:l}of oH(e,s)){const u=rh(o.raw);if((u==null?void 0:u[0])!=="logs")continue;const h=u.slice(1);let _=null;for(let v=0;v0?[]:I5(n,"runs"),l=t.length>0?t:o.length>0?o:r;for(const u of l)if(i.add(u),i.size>=Eu)break}return kd([...i])}function td(e,n,t=[],r=[]){const s=ky(e,"exp\\s+(?:status|desc)");if(s.length===0)return[];const i=new Set;let a=!1;for(const{invocation:o,offset:l}of oH(e,s)){const u=rh(o.raw),h=(u==null?void 0:u[0])==="exp"&&(u[1]==="status"||u[1]==="desc")?u[2]:null;let _=!1;h&&new RegExp(`^${L_}$`,"i").test(h)&&(i.add(h),_=!0);const p=h?/^\$\{?([A-Za-z_][A-Za-z0-9_]*)\}?$/.exec(h):null;if(p){const m=p[1],x=lH(e,m,l,L_);if(x.length>0){for(const v of x)i.add(v);_=!0}const k=cH(e,m,l,L_);for(const v of k)i.add(v);k.length>0&&(_=!0)}_||(a=!0)}if(i.size===0||a){const o=t.length>0?[]:I5(n,"experiments"),l=t.length>0?t:o.length>0?o:r;for(const u of l)if(i.add(u),i.size>=Eu)break}return kd([...i])}const sR=new WeakMap;function W_(e){const n=z(),t=sR.get(e);if((t==null?void 0:t.locale)===n)return t.activity;const r=_Tn(e);return sR.set(e,{locale:n,activity:r}),r}function _Tn(e){var b,w,y,C;const n=e.tool??"tool",t=((b=e.state)==null?void 0:b.input)??{},r=t.arguments,s=r&&typeof r=="object"&&!Array.isArray(r)?Object.fromEntries(Object.entries(r)):{},i={...t,...s},a=qs(i,"command","cmd"),o=Jjn(i,"commandArgv"),l=((w=e.state)==null?void 0:w.output)||((y=e.state)==null?void 0:y.error),u=kd(a4(i,"targetIds")),h=kd(a4(i,"runTargetIds")),_=kd(a4(i,"experimentTargetIds")),p=qs(i,"filePath","file_path","notebookPath","notebook_path","path"),m=qs(i,"description"),x=n.toLowerCase().split(/(?::|\.|__)+/),k=x.at(-1)??n.toLowerCase();if(k==="run"&&x.includes("web")){const N=i4(i,"search_query","q"),E=i4(i,"image_query","q"),T=i4(i,"find","pattern");return N?{kind:"web",label:TE({query:N})}:E?{kind:"web",label:rie({query:E})}:T?{kind:"web",label:Lie({pattern:T})}:Array.isArray(i.open)?{kind:"web",label:o2e()}:Array.isArray(i.weather)?{kind:"web",label:Fve()}:Array.isArray(i.finance)?{kind:"web",label:Nve()}:Array.isArray(i.sports)?{kind:"web",label:Ove()}:Array.isArray(i.time)?{kind:"web",label:yve()}:{kind:"web",label:UE()}}switch(new Map([["read_file","read"],["write_file","write"],["edit_file","edit"],["exec","bash"],["exec_command","bash"],["run_command","bash"],["agent","task"],["collabagenttoolcall","subagent"],["subagentactivity","subagent"]]).get(k)??k){case"bash":{if(!a&&!(o!=null&&o.length))return{kind:"command",label:twe()};const N=tTn(a??(o==null?void 0:o.join(" "))??""),E=Sd(N);let T=E.map(ae=>ae.raw);if(o!=null&&o.length){const ae=C5n(o);T=ae===null?[o]:Sd(rH(ae)).map(se=>se.raw)}let j=null;for(const ae of T)if(j=N5n(ae),j)break;const M=T.some(ae=>{const se=rh(ae);return se!==null&&se[0]!=="discover"&&se[0]!=="paper"});if(j&&!M){const ae=j.kind==="discover"?{keyword:Sse(),embedding:Ase(),openalex:kie(),biorxiv:$se()}[j.strategy]:null,se=j.kind==="discover"?j.query?hte({activity:ae??jE(),query:j.query}):ae??jE():j.id?kp({target:Ne(j.id)}):Ine();return{kind:j.kind==="paper"?"read":"search",label:se,litCall:j}}if(Sa(N,"agent\\s+spawn"))return{kind:"agent",label:ybe(),spawnedSessionIds:cTn(l),litCall:j??void 0};const D=E.map(ae=>aH(ae.raw)),I=Sa(N,"exp\\s+status"),P=Sa(N,"exp\\s+desc"),U=ky(N,"exp\\s+desc").some(ae=>(rh(ae.raw)??[]).some(X=>X==="--set"||X.startsWith("--set=")||X==="--stdin")),q=U?Aae():Tne(),W=U?GJ():Ure();if(Sa(N,"logs")){const ae=uTn(N,l,h,u);return{kind:"project",label:ae.length===1?Tre():Ire(),runIds:ae,litCall:j??void 0}}if(Sa(N,"exp\\s+run"))return{kind:"project",label:C3e(),litCall:j??void 0};if(Sa(N,"exp\\s+wait"))return{kind:"project",label:Nke(),litCall:j??void 0};if(Sa(N,"exp\\s+cancel"))return{kind:"project",label:P1e(),litCall:j??void 0};const H=Sa(N,"project\\s+view");if(H&&I&&P)return{kind:"project",label:W,experimentIds:td(N,l,_,u),litCall:j??void 0};if(H&&P)return{kind:"project",label:q,experimentIds:td(N,l,_,u),litCall:j??void 0};if(H&&I)return{kind:"project",label:GE(),experimentIds:td(N,l,_,u),litCall:j??void 0};if(H)return{kind:"project",label:jwe(),litCall:j??void 0};if(I&&P)return{kind:"project",label:W,experimentIds:td(N,l,_,u),litCall:j??void 0};if(I)return{kind:"project",label:GE(),experimentIds:td(N,l,_,u),litCall:j??void 0};if(P)return{kind:"project",label:q,experimentIds:td(N,l,_,u),litCall:j??void 0};if(Sa(N,"runs?"))return{kind:"project",label:yxe(),litCall:j??void 0};if(Sa(N,"projects"))return{kind:"project",label:Nxe(),litCall:j??void 0};if(Sa(N,"compute"))return{kind:"project",label:eve(),litCall:j??void 0};const Y=D.map(iTn).find(ae=>ae!=null);if(Y){const ae=s4(Y.path);return{kind:ae?"skill":"read",label:ae?B2({name:Ne(ae)}):kp({target:Ne(__(Y.path))}),filePath:Y.path,fileRef:Y.ref,labelTarget:ae?`${ae} skill`:__(Y.path)}}const te=D.findIndex(ae=>ae!=null&&["sed","cat","head","tail"].includes(ae.name)),$=te>=0?D[te]:null,L=$?sTn($):null,F=L?oTn(L,E,te,qs(i,"cwd","workdir")):null;if(L&&F){const ae=s4(F);return{kind:ae?"skill":"read",label:ae?B2({name:Ne(ae)}):kp({target:Ne(__(L))}),filePath:F,labelTarget:ae?`${ae} skill`:__(L)}}if(D.some(ae=>(ae==null?void 0:ae.name)==="find"||(ae==null?void 0:ae.name)==="ls"||(ae==null?void 0:ae.name)==="rg"&&ae.args.includes("--files")))return{kind:"search",label:eN()};const G=D.findIndex(ae=>(ae==null?void 0:ae.name)==="rg"||(ae==null?void 0:ae.name)==="grep");if(G>=0){const ae=aTn(E[G].raw);return{kind:"search",label:ae?F2({pattern:Ne(ae)}):P2(),searchPattern:ae??void 0}}const V=D.find(ae=>(ae==null?void 0:ae.name)==="git"),ee=V==null?void 0:V.args[0];if(ee==="grep"){const ae=V==null?void 0:V.args.slice(1).find(se=>!se.startsWith("-"));return{kind:"search",label:ae?F2({pattern:Ne(ae)}):P2(),searchPattern:ae}}if(ee==="status")return{kind:"command",label:dve()};if(ee==="diff")return{kind:"command",label:N4e()};if(ee==="log")return{kind:"command",label:wwe()};const ce=ae=>D.some(se=>!se||!["cargo","pnpm","npm","yarn"].includes(se.name)?!1:se.args[0]===ae||se.args[0]==="run"&&se.args[1]===ae);return ce("test")?{kind:"command",label:lwe()}:D.some(ae=>(ae==null?void 0:ae.name)==="tsc")||ce("typecheck")?{kind:"command",label:Wve()}:ce("lint")?{kind:"command",label:K1e()}:ce("build")?{kind:"command",label:E1e()}:{kind:"command",label:cne({command:Ne(N)})}}case"skill":{const N=qs(i,"skill","name"),E=N?Zjn(n,N):null;return{kind:"skill",label:N?Hte({name:Ne(N)}):Dte(),filePath:E??void 0,labelTarget:E&&N?`${N} skill`:void 0}}case"read":{const N=p?__(p):null,E=p?s4(p):null;return E?{kind:"skill",label:B2({name:Ne(E)}),filePath:p??void 0,labelTarget:`${E} skill`}:N?{kind:"read",label:kp({target:Ne(N)}),filePath:p??void 0,labelTarget:N}:{kind:"read",label:pwe()}}case"edit":case"write":case"notebookedit":{const N=eTn(i),E=p??(N==null?void 0:N.path)??null,T=E?__(E):null,j=T?(N==null?void 0:N.type)==="add"?bee({target:Ne(T)}):(N==null?void 0:N.type)==="delete"?Pee({target:Ne(T)}):ete({target:Ne(T)}):null;return T?{kind:"edit",label:j??XE(),filePath:E??void 0,labelTarget:T}:{kind:"edit",label:XE()}}case"grep":{const N=qs(i,"pattern");return{kind:"search",label:N?F2({pattern:Ne(N)}):P2(),searchPattern:N??void 0}}case"glob":{const N=qs(i,"pattern");return{kind:"search",label:N?xte({pattern:Ne(N)}):eN()}}case"websearch":{const N=qs(i,"query"),E=qs(i,"url"),T=qs(i,"pattern");return N?{kind:"web",label:TE({query:N})}:T&&E?{kind:"web",label:mie({pattern:T})}:E?{kind:"web",label:nne({target:Ne(E)})}:{kind:"web",label:m??UE()}}case"webfetch":{const N=qs(i,"url");return{kind:"web",label:N?kp({target:Ne(N)}):m??nre()}}case"task":return{kind:"agent",label:m??mne()};case"subagent":return{kind:"agent",label:fTn(i)};case"error":return{kind:"command",label:oke()};case"contextcompaction":return{kind:"command",label:iee(),progressLabel:fee()};default:{const N=m??p??a??((C=e.state)==null?void 0:C.title)??"";return{kind:"command",label:N?`${n}: ${N}`:n}}}}function fTn(e){const n=typeof e.nickname=="string"&&e.nickname?e.nickname.replace(/[_-]+/g," "):"",t=n&&n.charAt(0).toUpperCase()+n.slice(1);if(t)return t;switch(typeof e.tool=="string"?e.tool:""){case"spawnAgent":return rae();case"sendInput":return Xie();case"resumeAgent":return mre();case"wait":return $ae();case"closeAgent":return ZJ()}switch(typeof e.kind=="string"?e.kind:""){case"started":return Sae();case"interacted":return SJ();case"interrupted":return gae()}return uae()}function Xv({activity:e,className:n=""}){const t={size:16,strokeWidth:1.75,className:"tool-kind-icon"};let r=f.jsx(of,{...t});if(e.litCall)r=f.jsx(xB,{source:e.litCall.source,size:16,className:"tool-kind-icon"});else switch(e.kind){case"skill":r=f.jsx(uI,{...t});break;case"read":case"project":r=f.jsx(_I,{...t});break;case"search":r=f.jsx(CI,{...t});break;case"edit":r=f.jsx(nS,{...t});break;case"web":r=f.jsx(sbn,{...t});break;case"agent":r=f.jsx(aS,{...t});break}return f.jsx("span",{className:`flex h-6 shrink-0 items-center ${n}`,children:r})}function o4({items:e,onOpen:n,onSelect:t,targetType:r}){const[s,i]=A.useState(!1),a=A.useRef(null),o=A.useRef(!1);return A.useEffect(()=>{var l,u;!s||!o.current||(o.current=!1,(u=(l=a.current)==null?void 0:l.querySelector("button"))==null||u.focus())},[s]),f.jsxs("span",{className:"tool-target-overflow inline",children:[s&&f.jsx("span",{className:"tool-target-reveal",ref:a,children:e.map((l,u)=>f.jsxs("span",{children:[u>0&&", ",n||t?f.jsx("button",{className:"tool-target",...n?qr(h=>n(l.id,h),{stopPropagation:!0}):{onClick:h=>{h.stopPropagation(),t==null||t(l.id)}},children:l.label}):f.jsx("span",{children:l.label})]},l.id))}),s&&", ",f.jsx("button",{className:"tool-target-more","aria-expanded":s,"aria-label":s?zX({target:r}):rJ({count:Jt(e.length),target:r}),onClick:l=>{l.preventDefault(),l.stopPropagation(),o.current=!s&&l.detail===0,i(u=>!u)},children:s?fD():sEe({count:Jt(e.length)})})]})}function $5({activity:e,onOpenFile:n,onOpenRun:t,onOpenSpawnedSession:r,runExperimentName:s,onOpenExperiment:i,experimentName:a}){var o,l,u,h;if(e.searchPattern)return e.label;if(((o=e.litCall)==null?void 0:o.kind)==="paper"&&e.litCall.id)return f.jsxs("a",{className:"tool-target",href:M5n(e.litCall.source,e.litCall.id),target:"_blank",rel:"noopener noreferrer",children:[e.label,f.jsx(_vn,{className:"inline ms-1 opacity-50",size:13,"aria-hidden":"true"})]});if(e.filePath&&e.labelTarget&&n){const _=e.filePath;return f.jsx("span",{className:"tool-target",role:"button",tabIndex:0,...qr(p=>n(_,void 0,void 0,e.fileRef,p),{stopPropagation:!0}),children:e.label})}if((l=e.spawnedSessionIds)!=null&&l.length&&r){const _=e.spawnedSessionIds,p=_.slice(0,3),m=_.slice(p.length).map((x,k)=>({id:x,label:$E({number:Jt(p.length+k+1)})}));return f.jsxs(f.Fragment,{children:[e.label," — ",p.map((x,k)=>f.jsxs("span",{children:[k>0&&", ",f.jsx("button",{className:"tool-target",title:e2e(),onClick:v=>{v.preventDefault(),v.stopPropagation(),r(x)},children:$E({number:Jt(k+1)})})]},x)),m.length>0&&f.jsxs(f.Fragment,{children:[", ",f.jsx(o4,{items:m,onSelect:r,targetType:uhe()})]})]})}if((u=e.runIds)!=null&&u.length){const _=s?e.runIds.filter(x=>!!s(x)):e.runIds;if(_.length===0)return e.label;const p=_.slice(0,3),m=_.slice(p.length).map(x=>({id:x,label:(s==null?void 0:s(x))||Bl()}));return f.jsxs(f.Fragment,{children:[e.label," — ",p.map((x,k)=>f.jsxs("span",{children:[k>0&&", ",t?f.jsx("button",{className:"tool-target",title:jY({run:Ne(x)}),...qr(v=>t(x,v),{stopPropagation:!0}),children:(s==null?void 0:s(x))||Bl()}):f.jsx("span",{children:(s==null?void 0:s(x))||Bl()})]},x)),m.length>0&&f.jsxs(f.Fragment,{children:[", ",f.jsx(o4,{items:m,onOpen:t,targetType:O6e()})]})]})}if((h=e.experimentIds)!=null&&h.length){const _=a?e.experimentIds.filter(x=>!!a(x)):e.experimentIds;if(_.length===0)return e.label;const p=_.slice(0,3),m=_.slice(p.length).map(x=>({id:x,label:(a==null?void 0:a(x))||Bl()}));return f.jsxs(f.Fragment,{children:[e.label," — ",p.map((x,k)=>f.jsxs("span",{children:[k>0&&", ",i?f.jsx("button",{className:"tool-target",title:lY({name:(a==null?void 0:a(x))||Ne(x)}),...qr(v=>i(x,v),{stopPropagation:!0}),children:(a==null?void 0:a(x))||Bl()}):f.jsx("span",{children:(a==null?void 0:a(x))||Bl()})]},x)),m.length>0&&f.jsxs(f.Fragment,{children:[", ",f.jsx(o4,{items:m,onOpen:i,targetType:E0e()})]})]})}return e.label}function Q6(e){const n=e.progressLabel??{skill:Qte(),read:cre(),search:qie(),edit:ote(),project:Yre(),web:$J(),agent:Mee(),command:YO()}[e.kind];return{...e,label:n}}function uH(e,n){const t=W_({id:"permission-preview",type:"tool",tool:e,state:{status:"running",input:n}});return{skill:zte(),read:kne(),search:gse(),edit:Kee(),project:kre(),web:AJ(),agent:Eee(),command:sse()}[t.kind]}function dTn(e){return e==null?!0:typeof e=="object"&&!Array.isArray(e)&&Object.keys(e).length===0}const hTn=250;function pTn(e,n){const[t,r]=A.useState(e),s=A.useRef(Date.now()),i=A.useRef(e);return A.useEffect(()=>{if(i.current=e,(e==null?void 0:e.label)===(t==null?void 0:t.label)||n&&e!=null&&t!=null)return;if(e==null||t==null){s.current=Date.now(),r(e);return}const a=hTn-(Date.now()-s.current);if(a<=0){s.current=Date.now(),r(e);return}const o=window.setTimeout(()=>{s.current=Date.now(),r(i.current)},a);return()=>window.clearTimeout(o)},[e,t,n]),e!=null&&e.label===(t==null?void 0:t.label)?e:t}const mTn=160;function _H(e){const[n,t]=A.useState(!1);return A.useEffect(()=>{if(!e){t(!1);return}const r=window.setTimeout(()=>t(!0),mTn);return()=>window.clearTimeout(r)},[e]),e&&n}function gTn(e){const n=["skill","read","search","edit","project","web","command","agent"];for(const t of n){const r=e.find(s=>s.kind===t);if(r)return r}return e[0]??{kind:"command",label:iD()}}function vTn(e,n){var t,r;return((t=e.state)==null?void 0:t.status)!=="completed"?null:JSON.stringify([n.kind,n.label,n.filePath??null,n.fileRef??null,((r=n.litCall)==null?void 0:r.kind)==="paper"?n.litCall.id??null:null,n.runIds??null,n.experimentIds??null,n.spawnedSessionIds??null])}function bTn(e){const n=[];let t=null;for(const r of e){const s=W_(r),i=vTn(r,s),a=n[n.length-1];i&&a&&t===i?a.count++:n.push({part:r,activity:s,count:1}),t=i}return n}function fH({part:e,busy:n,recovering:t,onRecover:r,usageLimited:s=!1}){var x,k;const i=(x=e.state)==null?void 0:x.input,a=(i==null?void 0:i.nextRetryAt)??null,[o,l]=A.useState(Date.now());if(A.useEffect(()=>{if(typeof a!="number"||(l(Date.now()),a<=Date.now()))return;const v=window.setInterval(()=>{const b=Date.now();l(b),b>=a&&window.clearInterval(v)},1e3);return()=>window.clearInterval(v)},[a]),e.id==="turn-retry"){const v=g5n(i??{},o);return f.jsxs("div",{className:"turn-retry-row flex items-center gap-2 py-1 px-1 text-sm text-subtext",children:[f.jsx(Rt,{}),f.jsx("span",{children:v})]})}const u=bB(i==null?void 0:i.recoveryAction),h=i==null?void 0:i.turnId,_=vB(e)?eme():s?J6e():dN(),p=s?Jvn:iS,m=wy(((k=e.state)==null?void 0:k.error)||dN());return f.jsxs("details",{className:"turn-usage-limit group/limit text-base text-subtext",children:[f.jsxs("summary",{className:"flex w-fit max-w-full items-center gap-2 cursor-pointer list-none rounded-sm focus-visible:outline-2 focus-visible:outline-text [&::-webkit-details-marker]:hidden",children:[f.jsx(p,{size:18,className:"shrink-0 text-accent-red","aria-hidden":"true"}),f.jsx("span",{children:_}),f.jsx(Da,{size:16,className:"shrink-0 text-text transition-transform duration-120 ease-standard group-open/limit:rotate-90 motion-reduce:transition-none","aria-hidden":"true"})]}),f.jsx("pre",{className:"mt-2 rounded-md bg-surface p-2 text-sm font-mono whitespace-pre-wrap wrap-anywhere",children:m}),!s&&r&&h&&(u==="retry"||u==="continue")&&f.jsx(Me,{type:"button",size:"small",className:"mt-2",disabled:n||t,onClick:()=>r(h,u),children:t?N7e():u==="retry"?Vs():Gpe()})]})}function iR({part:e,activity:n,repeatCount:t=1,onOpenFile:r,onOpenRun:s,onOpenSpawnedSession:i,runExperimentName:a,onOpenExperiment:o,experimentName:l}){const u=e.state,h=(u==null?void 0:u.status)==="error",_=wy((u==null?void 0:u.error)||(u==null?void 0:u.output)||""),p=h&&!!_,[m,x]=A.useState(!1),k=`tool-error-${e.id.replace(/[^A-Za-z0-9_-]/g,"-")}`;if(e.tool==="error")return f.jsx(fH,{part:e,busy:!1,recovering:!1,usageLimited:X3(e)});const v=f.jsxs(f.Fragment,{children:[h&&f.jsxs("span",{className:"sr-only",children:[Ak()," "]}),h?f.jsx("span",{className:"flex h-6 shrink-0 items-center text-accent-red",children:f.jsx(hI,{size:16,strokeWidth:1.75,className:"tool-kind-icon","aria-hidden":"true"})}):f.jsx(Xv,{activity:n,className:"text-muted"}),f.jsxs("span",{className:`${JF} ${h?"text-accent-red":"text-subtext"}`,children:[f.jsx($5,{activity:n,onOpenFile:r,onOpenRun:s,onOpenSpawnedSession:i,runExperimentName:a,onOpenExperiment:o,experimentName:l}),t>1&&f.jsxs("span",{className:"tool-repeat-count ms-1 text-muted font-normal",title:HX({count:Jt(t)}),children:["×",t]})]})]});return p?f.jsxs("div",{className:"tool-row tool-row-error flex flex-col min-w-0",children:[f.jsxs("div",{className:"flex items-start gap-2 w-fit max-w-full py-[3px] px-1 min-w-0 rounded-sm",children:[v,f.jsx("button",{type:"button",className:"tool-row-detail-toggle inline-flex h-6 shrink-0 items-center justify-center p-0.5 rounded-sm cursor-pointer hover:bg-surface","aria-expanded":m,"aria-controls":k,"aria-label":m?DX({activity:n.label}):XZ({activity:n.label}),onClick:()=>x(b=>!b),children:f.jsx(Da,{size:16,className:`text-accent-red transition-transform duration-120 ease-standard ${m?"rotate-90":""}`})})]}),m&&f.jsx("div",{className:"tool-detail mt-1 me-0 mb-1 ms-6",id:k,children:f.jsx("div",{className:K6,children:_.slice(0,2e4)})})]}):f.jsx("div",{className:"tool-row flex items-start gap-2 min-w-0 py-[3px] px-1",children:v})}function yTn({parts:e,pendingTail:n,onOpenFile:t,onOpenRun:r,onOpenSpawnedSession:s,runExperimentName:i,onOpenExperiment:a,experimentName:o}){var j,M,D,I;const[l,u]=A.useState(!1),[h,_]=A.useState(!1),p=()=>{_(!0),u(P=>!P)},m=bTn(e),x=m.map(({activity:P})=>P),k=n?m.at(-1):void 0,v=k==null?void 0:k.part,b=k==null?void 0:k.activity,w=((j=v==null?void 0:v.state)==null?void 0:j.status)!=="error"?(b&&Q6(b))??null:null,y=!!v&&((M=v.state)==null?void 0:M.status)==="running"&&!(w!=null&&w.progressLabel)&&(dTn((D=v.state)==null?void 0:D.input)||(w==null?void 0:w.kind)==="command"&&!qs(((I=v.state)==null?void 0:I.input)??{},"command","cmd")),C=pTn(w,y),N=_H(C!=null),E=C??gTn(x),T=C?C.label:iD();return e.length===1?C?f.jsx("div",{className:"tool-group my-3.5 mx-0",children:f.jsxs("div",{className:"tool-row flex items-start gap-2 min-w-0 py-[3px] px-1 text-base leading-6 text-subtext",children:[f.jsx(Xv,{activity:C,className:N?"tool-running-shimmer-icon":"text-muted"}),f.jsx("span",{className:`${N?"tool-running-shimmer":""} min-w-0 line-clamp-2 break-words`,title:T,children:f.jsx($5,{activity:C,onOpenFile:t,onOpenRun:r,onOpenSpawnedSession:s,runExperimentName:i,onOpenExperiment:a,experimentName:o})})]})}):f.jsx("div",{className:"tool-group my-3.5 mx-0",children:f.jsx(iR,{part:e[0],activity:m[0].activity,onOpenFile:t,onOpenRun:r,onOpenSpawnedSession:s,runExperimentName:i,onOpenExperiment:a,experimentName:o})}):f.jsxs("div",{className:"tool-group my-3.5 mx-0",children:[f.jsxs("div",{className:"tool-group-summary flex items-start gap-2 w-fit max-w-full py-[3px] px-1 text-base leading-6 text-subtext text-start",children:[f.jsx(Xv,{activity:E,className:N?"tool-running-shimmer-icon":"text-muted"}),C?f.jsx("span",{className:`tool-group-label min-w-0 line-clamp-2 break-words ${N?"tool-running-shimmer":""}`,title:T,children:f.jsx($5,{activity:C,onOpenFile:t,onOpenRun:r,onOpenSpawnedSession:s,runExperimentName:i,onOpenExperiment:a,experimentName:o})}):f.jsx("button",{type:"button",className:"tool-group-label min-w-0 whitespace-normal break-words cursor-pointer text-start",onClick:p,"aria-expanded":l,children:T}),f.jsx("button",{type:"button",className:"tool-group-chevron-button inline-flex h-6 shrink-0 items-center justify-center p-px cursor-pointer rounded-sm",onClick:p,"aria-expanded":l,"aria-label":l?$pe():b0e(),children:f.jsx(Da,{size:16,className:`tool-chevron text-muted transition-[transform,color] duration-120 ease-standard [&.open]:rotate-90 ${l?"open":""}`})})]}),f.jsx("div",{className:`tool-group-disclosure ${l?"open":""}`,"aria-hidden":!l,inert:!l,children:f.jsx("div",{className:"tool-group-disclosure-inner",children:f.jsx("div",{className:"tool-group-rows flex flex-col gap-px mt-0.5 me-0 mb-1 ms-6",children:h&&m.map(({part:P,count:U,activity:q})=>f.jsx(iR,{part:P,repeatCount:U,activity:q,onOpenFile:t,onOpenRun:r,onOpenSpawnedSession:s,runExperimentName:i,onOpenExperiment:a,experimentName:o},P.id))})})})]})}function xTn({part:e,onRespond:n,onOpenFile:t,onOpenPlan:r}){var h;const s=e.prompt,[i,a]=A.useState([]),o=!n,l=_=>n==null?void 0:n({promptId:e.id,..._});if(s.resolved){if(s.kind==="permission")return null;if(s.kind==="plan"){const m=s.approved===!0?{label:x2e(),icon:Ji,iconClass:"text-accent-green"}:s.approved===!1&&s.note?{label:H2e(),icon:nS,iconClass:"text-accent-amber"}:s.approved===!1?{label:z2e(),icon:_r,iconClass:"text-accent-red"}:{label:D2e(),icon:Cb,iconClass:"text-muted"},x=m.icon;return f.jsxs("details",{className:Qjn,children:[f.jsxs("summary",{children:[f.jsx("span",{className:"plan-resolved-label text-base font-[375] wrap-anywhere",children:s.synthesized?oD():uN()}),f.jsx(x,{size:17,strokeWidth:1.8,className:`shrink-0 ${m.iconClass}`}),f.jsx("span",{className:"plan-resolved-label prompt-outcome text-base font-[375] wrap-anywhere",children:m.label}),f.jsx(Da,{size:12,className:"plan-chevron shrink-0 text-muted"})]}),f.jsxs("div",{className:`${tR} ms-6`,children:[f.jsx(Wo,{text:s.plan??"",onOpenFile:t}),s.note&&f.jsx("div",{className:"prompt-collapsed-note mt-1.5 italic",children:s.note})]})]})}const _=(s.answers??[]).join(", ")||s.note||"",p=(s.annotations??[]).map((m,x)=>({id:`${e.id}-annotation-${x}`,text:m.text}));return f.jsxs("div",{className:"flex flex-col items-end gap-1.5",children:[p.length>0&&f.jsx(W6,{annotations:p,variant:"sent"}),f.jsxs("details",{className:Wjn,children:[f.jsxs("summary",{children:[f.jsx("span",{className:"prompt-collapsed-title font-[375] wrap-anywhere",children:s.header||s.question||ESe()}),f.jsx("span",{className:`prompt-outcome font-[375] text-subtext wrap-anywhere [&.approved]:text-accent-green [&.chosen]:text-accent-green [&.approved::before]:content-['✓_'] [&.chosen::before]:content-['✓_'] [&.revised]:text-accent-amber [&.rejected]:text-accent-amber ${_?"chosen":""}`,children:_||y6e()})]}),f.jsxs("div",{className:tR,children:[s.header&&s.question&&f.jsx("div",{className:"prompt-q text-base font-semibold leading-normal text-text",children:s.question}),(s.options??[]).length>0&&f.jsx("ul",{className:"prompt-collapsed-options mt-1.5 mx-0 mb-0 ps-4.5 [&_.sel]:text-text [&_.sel]:font-medium",children:(s.options??[]).map(m=>{var x;return f.jsx("li",{className:(x=s.answers)!=null&&x.includes(m.label)?"sel":"",children:m.label},m.label)})}),s.note&&s.note!==_&&f.jsx("div",{className:"prompt-collapsed-note mt-1.5 italic",children:s.note})]})]})]})}if(s.kind==="plan"){const _=!!r;return f.jsxs("div",{className:`prompt-card my-2 mx-0 py-3 px-3.5 border border-border border-s-[3px] border-s-border rounded-sm bg-surface flex flex-col gap-[9px] [&.plan]:border-s-accent-blue [&.permission]:border-s-accent-amber [&.question]:border-s-accent-purple [&.readonly]:opacity-60 plan ${o?"readonly":""}`,children:[f.jsx("div",{className:"prompt-head text-base font-semibold text-text",children:s.synthesized?dSe():uN()}),f.jsx("div",{className:`prompt-plan text-base leading-[1.6] text-text max-h-85 overflow-y-auto [&.clamped]:max-h-[9.5em] [&.clamped]:overflow-hidden [&.clamped]:relative [&.clamped::after]:content-[''] [&.clamped::after]:absolute [&.clamped::after]:inset-x-0 [&.clamped::after]:bottom-0 [&.clamped::after]:top-auto [&.clamped::after]:h-8.5 [&.clamped::after]:bg-[linear-gradient(to_bottom,_transparent,_var(--surface))] [&.clamped::after]:pointer-events-none ${_?"clamped":""}`,children:f.jsx(Wo,{text:s.plan??"",onOpenFile:t})}),_&&f.jsx("button",{className:"prompt-plan-open self-start border-0 bg-transparent text-accent-blue text-sm p-0 cursor-pointer [&:hover]:underline",...qr(p=>r(s.plan??"",e.id,p)),children:yke()}),!o&&!_&&f.jsxs("div",{className:L5,children:[f.jsx(Me,{size:"small",variant:"primary",onClick:()=>l({approve:!0,resumeMode:"auto"}),children:oge()}),f.jsx(Me,{size:"small",onClick:()=>l({approve:!0,resumeMode:"bypassPermissions"}),children:hge()}),f.jsx(Me,{size:"small",onClick:()=>l({approve:!1}),children:Lwe()})]})]})}if(s.kind==="permission"){const _=s.toolInput??{},p=qs(_,"command","cmd","filePath","file_path","path")||"",m=typeof((h=s.toolInput)==null?void 0:h.reason)=="string"&&s.toolInput.reason||"",x=qs(_,"description")||"",k=m||x||uH(s.tool,_),v=`permission-heading-${e.id}`;return f.jsxs("div",{className:`prompt-card permission my-3 w-full max-w-2xl overflow-hidden rounded-md border border-border bg-background shadow-hairline [&.readonly]:opacity-60 ${o?"readonly":""}`,role:"group","aria-labelledby":v,children:[f.jsxs("div",{className:"flex items-center gap-2.5 px-3.5 pt-3 pb-0",children:[f.jsx("span",{className:"flex size-7 shrink-0 items-center justify-center rounded-md bg-accent-amber-subtle text-accent-amber",children:f.jsx(iS,{size:15,strokeWidth:1.8,"aria-hidden":"true"})}),f.jsx("span",{id:v,className:"text-base font-semibold text-text",children:Hge()})]}),f.jsxs("div",{className:"flex flex-col gap-3 px-3.5 py-3",children:[f.jsx("div",{className:"prompt-sub text-base font-normal leading-normal text-text wrap-anywhere",children:k}),p&&f.jsx("code",{className:"prompt-command block max-h-36 overflow-auto whitespace-pre-wrap wrap-anywhere rounded-md border border-border-variant bg-surface px-3 py-2 font-mono text-sm leading-relaxed text-text",children:p}),!o&&f.jsxs("div",{className:"prompt-actions flex items-center justify-end gap-2 pt-0.5",children:[f.jsx(Me,{size:"small",variant:"ghost",onClick:()=>l({approve:!1}),children:Zbe()}),f.jsx(Me,{size:"small",variant:"primary",onClick:()=>l({approve:!0}),children:Dge()})]})]})]})}const u=_=>a(p=>s.multiSelect?p.includes(_)?p.filter(m=>m!==_):[...p,_]:[_]);return f.jsxs("div",{className:`prompt-card my-2 mx-0 py-3 px-3.5 border border-border border-s-[3px] border-s-border rounded-sm bg-surface flex flex-col gap-[9px] [&.plan]:border-s-accent-blue [&.permission]:border-s-accent-amber [&.question]:border-s-accent-purple [&.readonly]:opacity-60 question ${o?"readonly":""}`,children:[s.header&&f.jsx("div",{className:Xjn,children:s.header}),s.question&&f.jsx("div",{className:"prompt-q text-base font-semibold leading-normal text-text",children:s.question}),f.jsx("div",{className:"prompt-options flex flex-col gap-1.5",children:(s.options??[]).map(_=>{const p=i.includes(_.label);return f.jsxs("button",{className:`prompt-option flex flex-col items-start gap-0.5 w-full py-2 px-[11px] text-start border border-border rounded-sm bg-background text-text cursor-pointer transition-[border-color,background] duration-80 ease-standard [&:hover:not(:disabled)]:border-border-strong [&:hover:not(:disabled)]:bg-surface [&.sel]:border-primary [&.sel]:bg-primary-subtle [&:disabled]:cursor-default ${p?"sel":""}`,disabled:o,onClick:()=>o?void 0:s.multiSelect?u(_.label):l({answers:[_.label]}),children:[f.jsx("span",{className:"prompt-option-label block text-sm font-medium",children:_.label}),_.description&&f.jsx("span",{className:"prompt-option-desc block text-sm font-normal leading-[1.45] text-subtext",children:_.description})]},_.label)})}),s.multiSelect&&!o&&f.jsx("div",{className:L5,children:f.jsx(Me,{size:"small",variant:"primary",disabled:i.length===0,onClick:()=>l({answers:i}),children:eke()})})]})}function wTn(e,n){return e.role==="user"?!0:e.parts.some(t=>nh(t,n))}function kTn(e){const n=e.text??"",t=n.startsWith("data:")?n:mmn(n),r=n.startsWith("data:")?"":n.includes("__")?n.slice(n.indexOf("__")+2):n,s=e.name||r||"attachment",i=n.startsWith("data:application/pdf")||/\.pdf$/i.test(s)||/\.pdf$/i.test(n);return{src:t,isPdf:i,name:s}}function STn({text:e,createdAt:n,count:t,index:r,prevId:s,nextId:i,onSelect:a,pagerDisabled:o,onEdit:l,editDisabled:u}){const h=t>1,_=new Date(n),p=async()=>{try{if(!navigator.clipboard)throw new Error(pD());await navigator.clipboard.writeText(e),Vn(m0(),"success")}catch(m){Vn(m instanceof Error?m.message:String(m),"error")}};return f.jsxs("div",{className:`fork-controls flex items-center gap-0.5 transition-opacity duration-80 ease-standard ${h?"opacity-100":"opacity-0 group-hover/turn:opacity-100 group-focus-within/turn:opacity-100"}`,children:[h&&f.jsxs(f.Fragment,{children:[f.jsx(Ft,{size:"small",title:nN(),"aria-label":nN(),disabled:o||!s,onClick:()=>s&&a(s),children:f.jsx(fI,{size:14})}),f.jsxs("span",{className:"fork-count text-xs text-subtext tabular-nums select-none",children:[r+1,"/",t]}),f.jsx(Ft,{size:"small",title:tN(),"aria-label":tN(),disabled:o||!i,onClick:()=>i&&a(i),children:f.jsx(Da,{size:14})})]}),f.jsxs("div",{className:"flex items-center gap-0.5 opacity-0 group-hover/turn:opacity-100 group-focus-within/turn:opacity-100 transition-opacity duration-80 ease-standard",children:[f.jsx("time",{dateTime:_.toISOString(),className:"text-xs text-subtext tabular-nums me-2",children:_.toLocaleTimeString(z(),{hour:"numeric",minute:"2-digit"})}),f.jsx(Ft,{size:"small","aria-label":Ok(),disabled:!e,onClick:p,children:f.jsx(Sb,{size:13})})]}),f.jsx(Ft,{size:"small",title:QE(),"aria-label":QE(),disabled:u,onClick:l,children:f.jsx(nS,{size:13})})]})}const CTn=A.memo(function({message:n,activePermissionId:t,pendingTailToolId:r,onOpenFile:s,onOpenRun:i,onOpenSpawnedSession:a,runExperimentName:o,onOpenExperiment:l,experimentName:u,onRespond:h,onOpenPlan:_,onOpenSubagent:p,busy:m=!1,recoveringTurnId:x,onRecover:k,skills:v,predictTextTail:b=!1,forkCount:w,forkIndex:y=0,forkPrevId:C,forkNextId:N,forkDisabled:E,branchDisabled:T,onFork:j,onSelectFork:M}){var H,Y;sf();const[D,I]=A.useState(null),P=NTn(n);if(P)return f.jsx(zTn,{part:P});if(n.role==="user"){const te=n.parts.filter(ee=>ee.type==="text").map(ee=>ee.text??"").join(` -`),$=ee=>!!(v!=null&&v.some(ce=>ce.name===ee)),L=n.parts.filter(ee=>ee.type==="image"&&ee.text).map(kTn),F=L.filter(ee=>!ee.isPdf),G=L.filter(ee=>ee.isPdf),V=n.parts.filter(ee=>ee.type==="annotation"&&ee.text).map(ee=>({id:ee.id,text:ee.text??""}));if(D!==null){const ee=()=>{const ce=D.trim();!ce||E||(I(null),j(n.id,ce))};return f.jsx("div",{className:"msg-user-group ms-auto self-end flex w-full max-w-[88%] flex-col items-end gap-1.5",children:f.jsxs("div",{className:"msg-user-edit w-full bg-surface rounded-[16px] py-2.5 px-[15px] flex flex-col gap-2",children:[f.jsx("textarea",{dir:"auto",className:"w-full bg-transparent text-base text-text resize-none outline-none field-sizing-content min-h-16","aria-label":gye(),value:D,autoFocus:!0,onChange:ce=>I(ce.target.value),onKeyDown:ce=>{ce.key==="Escape"?(ce.preventDefault(),I(null)):ce.key==="Enter"&&!ce.shiftKey&&!ce.nativeEvent.isComposing&&(ce.preventDefault(),ee())}}),f.jsxs("div",{className:`${L5} justify-end`,children:[f.jsx(Me,{size:"small",onClick:()=>I(null),children:M1e()}),f.jsx(Me,{size:"small",variant:"primary",onClick:ee,disabled:E||!D.trim(),children:Y4()})]})]})})}return f.jsxs("div",{className:"msg-user-group group/turn ms-auto self-end flex max-w-[88%] flex-col items-end gap-1.5",children:[V.length>0&&f.jsx(W6,{annotations:V,variant:"sent"}),f.jsxs("div",{dir:"auto",className:"msg-user max-w-full bg-surface rounded-[16px] py-2.5 px-[15px] text-base whitespace-pre-wrap wrap-anywhere [&_.skill-chip]:align-baseline",children:[f.jsx(xjn,{text:te,isCommand:$}),F.length>0&&f.jsx("div",{className:"msg-images flex flex-wrap gap-1.5 mt-2 [&_img]:max-w-55 [&_img]:max-h-40 [&_img]:border [&_img]:border-border-variant [&_img]:rounded-xs [&_img]:block",children:F.map((ee,ce)=>f.jsx("a",{href:ee.src,target:"_blank",rel:"noreferrer",children:f.jsx("img",{src:ee.src,alt:Yhe()})},ce))}),G.length>0&&f.jsx("div",{className:"msg-files flex flex-wrap gap-1.5 mt-2",children:G.map((ee,ce)=>f.jsxs("a",{className:"msg-file inline-flex items-center gap-1.5 max-w-60 py-1.5 px-2.5 border border-border-variant rounded-sm text-text no-underline [&:hover]:border-text [&_span]:overflow-hidden [&_span]:text-ellipsis [&_span]:whitespace-nowrap",href:ee.src,target:"_blank",rel:"noreferrer",children:[f.jsx(Cb,{size:15}),f.jsx("span",{children:ee.name})]},ce))})]}),w!==void 0&&f.jsx(STn,{text:te,createdAt:n.createdAt,count:w,index:y,prevId:C,nextId:N,onSelect:M,pagerDisabled:T,onEdit:()=>I(te),editDisabled:E})]})}const U=n.parts.find(te=>te.type==="tool"&&X3(te)),q=n.parts.find(bm)??U,W=n.parts.filter(te=>te!==q&&!(U&&X3(te)));return f.jsxs("div",{className:"msg-assistant group/turn text-base leading-[1.62] text-text min-w-0",children:[f.jsx(ETn,{message:n,parts:W,options:{activePermissionId:t,pendingTailToolId:r,onOpenFile:s,onOpenRun:i,onOpenSpawnedSession:a,runExperimentName:o,onOpenExperiment:l,experimentName:u,onRespond:h,onOpenPlan:_,onOpenSubagent:p,predictTextTail:b}}),q&&f.jsx(fH,{part:q,usageLimited:!!U,busy:m,recovering:x===((Y=(H=q.state)==null?void 0:H.input)==null?void 0:Y.turnId),onRecover:k})]})});function ETn({message:e,parts:n,options:t}){const r=t.predictTextTail??!1,{work:s,answer:i}=m5n(n,r),[a,o]=A.useState(!1),[,l]=A.useState(0);if(A.useEffect(()=>{if(!r||e.completedAt!=null||s.length===0)return;const p=window.setInterval(()=>l(m=>m+1),1e3);return()=>window.clearInterval(p)},[r,e.completedAt,s.length]),s.length===0)return f.jsx(f.Fragment,{children:Q1(i,t)});const u=e.completedAt??(r?Date.now():null),h=u===null?null:u-e.createdAt,_=h===null?null:h<6e4||h>=36e5?g0(h):o8e({minutes:Jt(Math.floor(h/6e4)),seconds:Jt(Math.floor(h/1e3)%60)});return f.jsxs(f.Fragment,{children:[f.jsxs("div",{className:"turn-work mb-4",children:[f.jsxs("button",{type:"button",className:"flex w-full items-center gap-1.5 border-b border-border/50 pb-2 text-start text-base text-subtext cursor-pointer hover:text-text focus-visible:outline-2 focus-visible:outline-primary","aria-expanded":a,"data-work-toggle":!0,onClick:()=>o(p=>!p),children:[f.jsx("span",{children:_===null?e8e():h8e({duration:_})}),f.jsx(Da,{size:16,className:`shrink-0 text-muted transition-transform duration-200 ease-standard motion-reduce:transition-none ${a?"rotate-90":""}`})]}),f.jsx("div",{className:`tool-group-disclosure ${a?"open":""}`,"aria-hidden":!a,inert:!a,children:f.jsx("div",{className:"tool-group-disclosure-inner",children:f.jsx("div",{className:"turn-work-content pt-4",children:Q1(s,{...t,predictTextTail:!1,pendingTailToolId:null})})})})]}),f.jsx("div",{className:"turn-answer",children:Q1(i,t)})]})}function NTn(e){const n=e.parts.length===1?e.parts[0]:void 0;return e.role==="user"&&(n==null?void 0:n.type)==="tool"&&n.tool===DL?n:null}function zTn({part:e}){var l;const n=e.state,t=qs((n==null?void 0:n.input)??{},"command")??"",r=(n==null?void 0:n.status)==="running",s=(n==null?void 0:n.status)==="error",i=typeof((l=n==null?void 0:n.input)==null?void 0:l.exitCode)=="number"?n.input.exitCode:null,a=[n==null?void 0:n.output,n==null?void 0:n.error].filter(Boolean).join(` -`),o=r?YO():s&&i!==null?Cpe({code:Jt(i)}):null;return f.jsx("div",{className:"msg-shell ms-auto self-end flex w-full max-w-[88%] flex-col items-stretch gap-1.5",children:f.jsxs("div",{dir:"ltr",className:"max-w-full bg-surface rounded-[16px] py-2.5 px-[15px] text-base",children:[f.jsxs("div",{className:"flex items-start gap-2 font-mono text-sm text-text whitespace-pre-wrap wrap-anywhere",children:[f.jsxs("span",{className:"sr-only",children:[nD()," "]}),f.jsx(of,{size:16,strokeWidth:1.6,className:`mt-0.5 shrink-0 ${s?"text-accent-red":"text-muted"}`,"aria-hidden":"true"}),f.jsx("span",{children:t})]}),a&&f.jsx("div",{className:`${K6} mt-2`,children:a.slice(0,2e4)}),o&&f.jsx("div",{className:`mt-1.5 text-xs ${s?"text-accent-red":"text-muted"}`,children:o})]})})}function Q1(e,n){var w,y;const{activePermissionId:t,pendingTailToolId:r,onOpenFile:s,onOpenRun:i,onOpenSpawnedSession:a,runExperimentName:o,onOpenExperiment:l,experimentName:u,onRespond:h,onOpenPlan:_,onOpenSubagent:p,predictTextTail:m=!1}=n,x=e.filter(C=>C.type!=="steer"&&nh(C,t)).at(-1),k=[];let v=[];const b=()=>{v.length!==0&&(k.push(f.jsx(yTn,{parts:v,pendingTail:v.some(C=>C.id===r),onOpenFile:s,onOpenRun:i,onOpenSpawnedSession:a,runExperimentName:o,onOpenExperiment:l,experimentName:u},`tg-${v[0].id}`)),v=[])};for(const C of e)if(nh(C,t)){if(C.type==="tool"&&(TTn(C.tool)||(((w=C.children)==null?void 0:w.length)??0)>0)){b(),k.push(f.jsx(RTn,{part:C,pendingTail:m&&((y=C.state)==null?void 0:y.status)==="running"||C.id===r,onOpenSubagent:p},C.id));continue}if(C.type==="tool"){v.push(C);continue}b(),C.type==="text"?k.push(f.jsx(Wo,{text:C.text,onOpenFile:s,onOpenRun:i,predict:m&&C.id===(x==null?void 0:x.id)},C.id)):C.type==="steer"?k.push(f.jsx("div",{dir:"auto",role:"note","aria-label":Wke(),className:"msg-steer my-2 ms-auto w-fit max-w-[88%] bg-surface rounded-[16px] py-2.5 px-[15px] text-base whitespace-pre-wrap wrap-anywhere",children:C.text},C.id)):C.type==="prompt"&&C.prompt&&k.push(f.jsx(xTn,{part:C,onRespond:h,onOpenFile:s,onOpenPlan:_},C.id))}return b(),k}function jTn(e){return W_(e).label}function TTn(e){const n=(e??"").toLowerCase();return n==="subagent"||n==="task"||n==="agent"}function dH(e){var t,r;const n=((t=e.state)==null?void 0:t.status)==="completed"?((r=e.state)==null?void 0:r.output)??"":"";return n.startsWith("Async agent launched")?"":n}function Yv(e,n){for(const t of e){if(t.id===n)return t;const r=t.children&&Yv(t.children,n);if(r)return r}return null}function ATn({spawn:e,onOpenFile:n,onOpenRun:t,runExperimentName:r,onOpenExperiment:s,experimentName:i,onOpenSubagent:a}){var x,k,v,b;const o=e.children??[],l=((x=e.state)==null?void 0:x.status)==="running",u=((k=e.state)==null?void 0:k.status)==="error",h=u?wy(((v=e.state)==null?void 0:v.error)||((b=e.state)==null?void 0:b.output)||""):"",_=Q1(o,{onOpenFile:n,onOpenRun:t,runExperimentName:r,onOpenExperiment:s,experimentName:i,onOpenSubagent:a,predictTextTail:l,pendingTailToolId:l?mB(o):null}),m=o.some(w=>w.type==="text"&&!!w.text)?"":dH(e);return f.jsxs("div",{className:"msg-assistant text-base leading-[1.62] text-text min-w-0",children:[u&&f.jsxs("span",{className:"sr-only",children:[Ak()," "]}),h&&f.jsx("div",{className:K6,children:h.slice(0,2e4)}),_.length===0&&!m&&!h?f.jsx("div",{className:"subagent-empty py-[3px] px-1 text-sm text-muted",children:l?Rk():yme()}):f.jsxs(f.Fragment,{children:[_,m&&f.jsx(Wo,{text:m,onOpenFile:n,onOpenRun:t})]})]})}function RTn({part:e,pendingTail:n,onOpenSubagent:t}){var u,h,_,p;const r=((u=e.state)==null?void 0:u.status)==="error",s=wy(((h=e.state)==null?void 0:h.error)||((_=e.state)==null?void 0:_.output)||""),i=n&&!r?Q6(W_(e)):W_(e),a=_H(!!(n&&!r)),o=(((p=e.children)==null?void 0:p.length)??0)===0&&!r&&!dH(e),l=f.jsxs(f.Fragment,{children:[r&&f.jsxs("span",{className:"sr-only",children:[Ak()," "]}),r?f.jsx("span",{className:"flex h-6 shrink-0 items-center text-accent-red",children:f.jsx(hI,{size:16,strokeWidth:1.75,className:"subagent-icon","aria-hidden":"true"})}):f.jsx(Xv,{activity:i,className:`subagent-icon ${a?"tool-running-shimmer-icon":"text-muted"}`}),f.jsx("span",{className:`${JF} ${a?"tool-running-shimmer":r?"text-accent-red":"text-subtext"}`,children:i.label})]});return o?f.jsx("div",{className:"subagent-row flex items-start gap-2 w-full my-3.5 mx-0 py-[3px] px-1 text-text text-base text-start rounded-sm",children:l}):f.jsxs("button",{className:"subagent-row flex items-start gap-2 w-full my-3.5 mx-0 py-[3px] px-1 cursor-pointer text-text text-base text-start rounded-sm [&:hover:not(:disabled)]:bg-surface [&:disabled]:cursor-default",title:r&&s?s:Wme(),...qr(m=>t==null?void 0:t(e.id,i.label,m)),disabled:!t,children:[l,f.jsx("span",{className:"subagent-row-chevron flex h-6 shrink-0 items-center text-muted",children:f.jsx(Da,{size:12})})]})}function MTn(e){const n=new Map;let t;for(let s=e.length-1;s>=0;s--)if(e[s].role==="assistant"){t=e[s];break}if(!t)return{messageId:"",states:n};const r=(s,i)=>{var a,o;for(const l of s){const u=`${i}/${l.id}`;l.type==="tool"&&((a=l.state)!=null&&a.status)&&n.set(u,{status:l.state.status,part:l}),(o=l.children)!=null&&o.length&&r(l.children,u)}};return r(t.parts,t.id),{messageId:t.id,states:n}}function X6(e){const n=(t,r)=>{var s;for(const i of t){const a=i.prompt;if(i.type==="prompt"&&(a==null?void 0:a.kind)==="permission"&&!a.resolved){const o=a.toolInput??{},u=qs(o,"reason","description")||uH(a.tool,o);return{id:i.id,path:`${r}/${i.id}`,label:u}}if((s=i.children)!=null&&s.length){const o=n(i.children,`${r}/${i.id}`);if(o)return o}}return null};for(const t of e){if(t.role!=="assistant")continue;const r=n(t.parts,t.id);if(r)return r}return null}function OTn(e){const[n,t]=A.useState({text:"",sequence:0}),r=A.useRef(null);return A.useEffect(()=>{var x,k,v,b,w;const s=((x=e[0])==null?void 0:x.id)??"",{messageId:i,states:a}=MTn(e),o=X6(e);if(!r.current||r.current.transcript!==s){r.current={transcript:s,messageId:i,states:a,permissionPath:(o==null?void 0:o.path)??null},t(y=>({text:o?AE({label:qo(o.label)}):"",sequence:y.sequence+1}));return}const l=r.current.messageId===i?r.current.states:new Map,u=r.current.permissionPath,h=[...a].filter(([y,C])=>{var N;return((N=l.get(y))==null?void 0:N.status)!==C.status});if(r.current={transcript:s,messageId:i,states:a,permissionPath:(o==null?void 0:o.path)??null},o&&o.path!==u){t(y=>({text:AE({label:qo(o.label)}),sequence:y.sequence+1}));return}const _=(k=h.find(([,y])=>bm(y.part)))==null?void 0:k[1].part;if((_==null?void 0:_.id)==="turn-recovery"){const y=bB((b=(v=_.state)==null?void 0:v.input)==null?void 0:b.recoveryAction);t(C=>({text:`${Voe()}${y?` ${y==="retry"?_oe():soe()}`:""}`,sequence:C.sequence+1}));return}if((_==null?void 0:_.id)==="turn-retry"){t(y=>({text:Yae(),sequence:y.sequence+1}));return}const p=h.filter(([,y])=>y.status==="error");if(p.length>0){const y=p.slice(0,2).map(([,C])=>W_(C.part).label).join(", ");t(C=>({text:p.length===1?Roe({labels:y}):Boe({count:Jt(p.length),labels:y}),sequence:C.sequence+1}));return}const m=h.filter(([,y])=>y.status==="running");if(m.length>0){const y=(w=m.at(-1))==null?void 0:w[1].part;t(C=>({text:y?Q6(W_(y)).label:voe(),sequence:C.sequence+1}));return}h.some(([,y])=>y.status==="completed")&&t(y=>({text:Coe(),sequence:y.sequence+1}))},[e]),n}const DTn=A.memo(function({messages:n,scrollRef:t,scrollToEndRef:r,stickToBottom:s,onPinToBottom:i,allMessages:a,canFork:o,onFork:l,onSelectFork:u,busy:h,onOpenFile:_,onOpenRun:p,onOpenSpawnedSession:m,runExperimentName:x,onOpenExperiment:k,experimentName:v,onRespond:b,onOpenPlan:w,onOpenSubagent:y,recoveringTurnId:C,onRecover:N,skills:E}){var $,L,F;sf();const T=(($=X6(n))==null?void 0:$.id)??null,j=A.useMemo(()=>n.filter(G=>wTn(G,T)),[n,T]),M=A.useMemo(()=>{const G=j.filter(V=>V.role==="user"&&!V.id.startsWith(M_));return f5n(a,n,G,V=>V.startsWith(M_))},[n,j,a]),D=A.useRef(new Set),[I,P]=A.useState(!1),U=A.useCallback(G=>j[G].id,[j]),q=A.useCallback(G=>{if(I)return j.map((ee,ce)=>ce);const V=new Set(hB(G));return j.forEach((ee,ce)=>{D.current.has(ee.id)&&V.add(ce)}),[...V].sort((ee,ce)=>ee-ce)},[j,I]),W=c5n({count:j.length,useFlushSync:!1,getScrollElement:()=>t.current,getItemKey:U,estimateSize:()=>400,overscan:1,initialRect:{width:((L=t.current)==null?void 0:L.clientWidth)??0,height:((F=t.current)==null?void 0:F.clientHeight)??0},initialOffset:()=>{var G;return Math.max(0,j.length*400-(((G=t.current)==null?void 0:G.clientHeight)??0))},anchorTo:s.current?"end":"start",followOnAppend:!0,scrollEndThreshold:60,rangeExtractor:q});A.useLayoutEffect(()=>{const G=()=>W.scrollToEnd();return r.current=G,i(),()=>{r.current=null}},[W,r,i]),A.useEffect(()=>{const G=()=>{var ce;const V=window.getSelection();if(!V||V.isCollapsed||!V.rangeCount)return;const ee=V.getRangeAt(0);for(const ae of((ce=t.current)==null?void 0:ce.querySelectorAll("[data-message-id]"))??[])ee.intersectsNode(ae)&&ae.dataset.messageId&&D.current.add(ae.dataset.messageId)};return document.addEventListener("selectionchange",G),()=>document.removeEventListener("selectionchange",G)},[t]);const H=j.at(-1),Y=OTn(n),te=h?gB(n):null;return f.jsxs(f.Fragment,{children:[f.jsx("span",{className:"sr-only",role:"status","aria-live":"polite",children:f.jsx("span",{children:Y.text},Y.sequence)}),f.jsx("button",{type:"button",className:"sr-only focus:not-sr-only","aria-pressed":I,onClick:()=>P(G=>!G),children:d7e()}),f.jsx("div",{className:"relative",style:{height:W.getTotalSize()},children:W.getVirtualItems().map(G=>{var se,X,oe,le,_e,pe;const V=j[G.index],ee=V.parts.find(bm),ce=(X=(se=ee==null?void 0:ee.state)==null?void 0:se.input)==null?void 0:X.turnId,ae=ee?h||C!==null:!1;return f.jsx("div",{"data-index":G.index,"data-message-id":V.id,ref:W.measureElement,className:"absolute left-0 w-full pb-4",style:{top:G.start},onClickCapture:Ee=>{!(Ee.target instanceof Element)||!Ee.target.closest("[data-work-toggle]")||(s.current=!1,W.setOptions({...W.options,anchorTo:"start"}))},onPointerDownCapture:()=>D.current.add(V.id),onFocusCapture:()=>D.current.add(V.id),children:f.jsx(CTn,{message:V,forkCount:(oe=M.get(V.id))==null?void 0:oe.count,forkIndex:(le=M.get(V.id))==null?void 0:le.index,forkPrevId:(_e=M.get(V.id))==null?void 0:_e.prevId,forkNextId:(pe=M.get(V.id))==null?void 0:pe.nextId,forkDisabled:!o,branchDisabled:h,onFork:l,onSelectFork:u,activePermissionId:T,pendingTailToolId:(te==null?void 0:te.messageId)===V.id?te.toolId:null,onOpenFile:_,onOpenRun:p,onOpenSpawnedSession:m,runExperimentName:x,onOpenExperiment:k,experimentName:v,onRespond:b,onOpenPlan:w,onOpenSubagent:y,busy:ae,recoveringTurnId:ce===C?C:null,onRecover:N,skills:E,predictTextTail:h&&V===H&&V.role==="assistant"})},V.id)})})]})}),LTn=(e,n)=>e==="all"?!0:e==="archived"?n:!n,hH=[{id:"active",label:xge,railLabel:lD},{id:"archived",label:HE,railLabel:HE},{id:"all",label:zge,railLabel:tD}];function ITn({value:e,onChange:n}){const{open:t,setOpen:r,ref:s}=_o();return f.jsxs("div",{className:"rail-filter relative inline-flex",ref:s,children:[f.jsx(Ft,{size:"small",className:"rail-filter-btn",active:e!=="active",title:JE(),"aria-label":JE(),onClick:()=>r(i=>!i),children:f.jsx(EI,{size:13})}),t&&f.jsx("div",{className:"option-menu absolute bottom-[calc(100%_+_8px)] start-0 max-h-95 flex flex-col bg-background border border-border rounded-lg shadow-menu z-50 overflow-hidden min-w-47.5 p-1.5 [&.align-right]:start-auto [&.align-right]:end-0 [&.drop-down]:bottom-auto [&.drop-down]:top-[calc(100%_+_4px)] [&.session-menu]:start-auto [&.session-menu]:end-1.5 [&.session-menu]:top-[calc(100%_-_2px)] [&.session-menu]:min-w-35 drop-down align-right",children:hH.map(i=>f.jsxs(nr,{onClick:()=>{n(i.id),r(!1)},children:[f.jsx("span",{children:i.label()}),e===i.id&&f.jsx(Ji,{size:13})]},i.id))})]})}const $Tn=14,BTn=500,PTn=1200;function pH({title:e,animate:n}){return n?f.jsx("span",{className:"title-reveal","aria-label":e,children:Array.from(e).map((t,r)=>t===" "?f.jsx("span",{"aria-hidden":!0,children:t},r):f.jsx("span",{"aria-hidden":!0,className:"title-reveal-char inline-block animate-[title-char-in_240ms_ease-out_both] [@media((prefers-reduced-motion:_reduce))]:animate-none",style:{animationDelay:`${Math.min(r*$Tn,BTn)}ms`},children:t},r))}):f.jsx(f.Fragment,{children:e})}function FTn({session:e,active:n,unread:t,busy:r,waiting:s,revealTitle:i,onOpen:a,onRename:o,onSetArchived:l,onDelete:u}){var N;const{open:h,setOpen:_,ref:p}=_o(),m=((N=e.title)==null?void 0:N.trim())||"Untitled",[x,k]=A.useState(!1),[v,b]=A.useState(""),w=A.useRef(null);function y(){var E;b(((E=e.title)==null?void 0:E.trim())||""),k(!0)}function C(){var T;const E=v.trim();k(!1),E&&E!==(((T=e.title)==null?void 0:T.trim())||"")&&o(E)}return A.useEffect(()=>{var E,T;x&&((E=w.current)==null||E.focus(),(T=w.current)==null||T.select())},[x]),f.jsxs("div",{ref:p,role:"button",tabIndex:0,className:`session-row relative flex items-center gap-2 w-full text-start py-[7px] px-2.5 rounded-md text-sm text-text cursor-pointer select-none [&:hover:not(.active)]:bg-surface [&.active]:bg-panel [&.active]:font-medium [&_.session-dot:empty]:hidden [&_.session-dot]:w-4 [&_.session-dot]:inline-flex [&_.session-dot]:items-center [&_.session-dot]:justify-center [&_.session-dot]:shrink-0 [&_.session-title]:flex-1 [&_.session-title]:min-w-0 [&_.session-title]:overflow-hidden [&_.session-title]:[mask-image:linear-gradient(to_right,black_calc(100%_-_16px),transparent)] [&_.session-title]:whitespace-nowrap [&_.session-menu-btn]:hidden [&_.session-menu-btn]:items-center [&_.session-menu-btn]:justify-center [&_.session-menu-btn]:w-4 [&_.session-menu-btn]:h-4 [&_.session-menu-btn]:-my-0.5 [&_.session-menu-btn]:mx-0 [&_.session-menu-btn]:rounded-sm [&_.session-menu-btn]:text-muted [&_.session-menu-btn]:shrink-0 [&_.session-menu-btn:hover]:text-text [&_.session-menu-btn:hover]:bg-panel [&:hover_.session-menu-btn]:inline-flex [&:focus-visible_.session-menu-btn]:inline-flex [&_.session-menu-btn:focus-visible]:inline-flex [&.menu-open_.session-menu-btn]:inline-flex [&:hover_.session-dot]:hidden [&:focus-visible_.session-dot]:hidden [&:has(.session-menu-btn:focus-visible)_.session-dot]:hidden [&.menu-open_.session-dot]:hidden [&_.busy-dot]:w-[7px] [&_.busy-dot]:h-[7px] [&_.busy-dot]:rounded-full [&_.busy-dot]:bg-primary [&_.busy-dot]:animate-[or-pulse_1.2s_infinite] [&_.busy-dot]:shrink-0 [&_.unread-dot]:w-[7px] [&_.unread-dot]:h-[7px] [&_.unread-dot]:rounded-full [&_.unread-dot]:bg-primary [&_.unread-dot]:shrink-0 [&_.busy-dot.waiting]:animate-none [&_.session-title-input]:flex-1 [&_.session-title-input]:min-w-0 [&_.session-title-input]:py-px [&_.session-title-input]:px-[5px] [&_.session-title-input]:-my-0.5 [&_.session-title-input]:mx-0 [&_.session-title-input]:[font:inherit] [&_.session-title-input]:text-text [&_.session-title-input]:bg-background [&_.session-title-input]:border [&_.session-title-input]:border-primary [&_.session-title-input]:rounded-sm [&_.session-title-input]:outline-none [&.editing]:bg-surface [&.editing]:cursor-default [&.editing_.session-menu-btn]:hidden [&.editing_.session-dot]:hidden ${n?"active":""} ${t?"unread":""} ${h?"menu-open":""} ${x?"editing":""}`,title:`${qp[e.harness]}${e.model?` · ${e.model}`:""}${e.parentSessionId?y7e():""}`,onClick:()=>{x||(h?_(!1):a())},onKeyDown:E=>{E.target===E.currentTarget&&(E.key==="Enter"||E.key===" ")&&(E.preventDefault(),h?_(!1):a())},children:[e.parentSessionId&&!x&&f.jsx(aS,{className:"text-muted shrink-0",size:12,"aria-hidden":!0}),x?f.jsx("input",{ref:w,className:"session-title-input","aria-label":f3e(),value:v,onChange:E=>b(E.target.value),onClick:E=>E.stopPropagation(),onBlur:C,onKeyDown:E=>{E.stopPropagation(),E.key==="Enter"?(E.preventDefault(),C()):E.key==="Escape"&&(E.preventDefault(),k(!1))}}):f.jsx("span",{className:"session-title",children:f.jsx(pH,{title:m,animate:i!==void 0},i??"static")}),f.jsx("span",{className:"session-dot",children:r?f.jsx("span",{className:`busy-dot ${s?"waiting":""}`}):t&&f.jsx("span",{className:"unread-dot"})}),f.jsx("button",{className:"session-menu-btn",title:oN(),"aria-label":oN(),onClick:E=>{E.stopPropagation(),_(T=>!T)},children:f.jsx(Jk,{size:14})}),h&&f.jsxs("div",{className:"option-menu absolute bottom-[calc(100%_+_8px)] start-0 max-h-95 flex flex-col bg-background border border-border rounded-lg shadow-menu z-50 overflow-hidden min-w-47.5 p-1.5 [&.align-right]:start-auto [&.align-right]:end-0 [&.drop-down]:bottom-auto [&.drop-down]:top-[calc(100%_+_4px)] [&.session-menu]:start-auto [&.session-menu]:end-1.5 [&.session-menu]:top-[calc(100%_-_2px)] [&.session-menu]:min-w-35 drop-down session-menu",children:[f.jsx(nr,{onClick:E=>{E.stopPropagation(),_(!1),y()},children:f.jsx("span",{children:sD()})}),f.jsx(nr,{onClick:E=>{E.stopPropagation(),_(!1),l(!e.archived)},children:f.jsx("span",{children:e.archived?OCe():The()})}),f.jsx(nr,{danger:!0,onClick:E=>{E.stopPropagation(),_(!1),u()},children:f.jsx("span",{children:rD()})})]})]})}const aR=[_I,CI,of,Jd],HTn=()=>[{title:B3e(),prompt:R3e()},{title:J3e(),prompt:V3e()},{title:d5e(),prompt:a5e()},{title:N5e(),prompt:y5e()}],l4=[{box:"border-accent-blue/45",icon:"text-accent-blue"},{box:"border-accent-green/45",icon:"text-accent-green"},{box:"border-accent-amber/45",icon:"text-accent-amber"},{box:"border-primary/45",icon:"text-primary"}],oR="mt-7 grid w-full max-w-readable grid-cols-1 gap-3 sm:grid-cols-2";function qTn({projectId:e,projectName:n,railHeader:t,railOpen:r,onShowRail:s,mainView:i,onSelectMainView:a,onOpenFile:o,onOpenRun:l,runExperimentName:u,onOpenExperiment:h,experimentName:_,onOpenPlan:p,onOpenSubagent:m,runtime:x,onOpenDemoWelcome:k,composerFocusNonce:v=0,demoRunningRunId:b=null,activeSessionId:w,onActiveSessionChange:y,preferredAgent:C,onPreferredAgentChange:N,children:E}){var Fu,Zr,ti,gi,Hu,Ua;const T=vn({mutationFn:ne=>fmn(...ne)}),j=vn({mutationFn:ne=>_mn(...ne)}),M=vn({mutationFn:ne=>omn(...ne)}),D=vn({mutationFn:ne=>cmn(...ne)}),I=vn({mutationFn:ne=>umn(...ne)}),P=vn({mutationFn:lmn}),U=A.useMemo(()=>Aa(e),[e]),{data:q=Yjn}=ft(U),W=A.useCallback(ne=>{Qr(U.queryKey,be=>{if(!be)return;const De=typeof ne=="function"?ne(be):ne,$e=new Map(be.map(Ke=>[Ke.id,Ke]));for(const Ke of De)$e.get(Ke.id)!==Ke&&Ja(rt,U.queryKey,Ke.id),$e.delete(Ke.id);for(const Ke of $e.keys())Ja(rt,U.queryKey,Ke);return De})},[U]),H=w,Y=A.useRef(y);Y.current=y;const te=A.useRef({projectId:e});te.current.projectId!==e&&(te.current={projectId:e});const[$,L]=A.useState(new Set),[F,G]=A.useState("active"),[V,ee]=A.useState(""),[ce,ae]=A.useState(!1),[se,X]=A.useState(!1),[oe,le]=A.useState([]),_e=A.useRef(0),pe=A.useRef({projectId:e,activeId:H,mainView:i});(pe.current.projectId!==e||pe.current.activeId!==H||pe.current.mainView!==i)&&(pe.current={projectId:e,activeId:H,mainView:i});const[Ee,Ie]=A.useState([]),[ze,He]=A.useState(null),Oe=H??"new",Xe=A.useRef(new Map),_t=A.useRef(dw);_t.current={draft:V,attachments:Ee,annotations:oe};const Vt=e===Sp&&q.length>0&&q.every(ne=>spn[ne.id]===ne.activeLeafId)?gz:null,$t=A.useRef(null);Vt!==null&&$t.current===null&&H!==null&&($t.current=Oe);const jt=Oe===$t.current?Vt:null;A.useLayoutEffect(()=>{const ne=Xe.current.get(Oe)??dw;return _t.current=ne,ee(ne.draft),Ie(ne.attachments),le(ne.annotations),()=>{const be=y5n(_t.current,jt);be?Xe.current.set(Oe,be):Xe.current.delete(Oe)}},[Oe,jt]);const[mt,we]=A.useState(null),ct=A.useRef(Promise.resolve()),ye=A.useRef(0),je=A.useRef(0),[qe,at]=A.useState(null),nt=A.useRef(null),Kt=A.useRef(!1),Qe=A.useRef(null),[wt,Tt,Yt]=Ymn(e,i==="chat"?H:null),{data:tn=GTn}=ft(bu()),[rr,rn]=A.useState(C);A.useEffect(()=>rn(C),[C]);const[ln,An]=A.useState({}),[qn,Yn]=A.useState(Dp),[fr,Xr]=A.useState(null),zr=A.useRef(!1),kt=A.useRef(null),[cn,jn]=A.useState(null),fn=A.useRef(!1),Dn=A.useRef(null),[pn,Un]=A.useState(new Map),Rn=A.useRef(new Map),yt=A.useRef(null),Dt=A.useRef(null),Ue=A.useRef(null),gt=A.useRef(!0),[ur,un]=A.useState(!0),Lt=A.useRef(null),Kn=_o(),mr=A.useCallback(ne=>{var be;_e.current+=1,le(De=>[...De,{id:`annotation-${_e.current}`,...ne}]),(be=Lt.current)==null||be.focus()},[]),gr=qjn(Dt,mr);Ujn(oe),A.useEffect(()=>{gr.dismiss()},[H,e,gr.dismiss]);const[ho,Qs]=A.useState(0),[Xs,xs]=A.useState(!1),[Ai,Ur]=A.useState(0),Ys=A.useRef(!1);function Zs(ne){if(!Ln)return;if(ne.source==="command"&&ne.name==="plan"){fc(V,Ln);return}const be=M5(ne.name,Lt.current),De=hjn(V,Ln,ne.name,be);ee(De.text),window.requestAnimationFrame(()=>{var $e,Ke;($e=Lt.current)==null||$e.focus(),(Ke=Lt.current)==null||Ke.setSelectionRange(De.cursor,De.cursor),Ur(De.cursor)})}function sr(ne){if(Mi)return!1;const be=ne.selectionStart;if(Ys.current||be!==ne.selectionEnd)return!1;const De=V.slice(0,be).replace(/[ \t]+$/,"").length,$e=t4(V,De);if(!$e||$e.end!==De||!$i($e.query)||be>De&&be-De!==M5($e.query,ne))return!1;const Ke=WA(V,{...$e,end:be});return ee(Ke.text),Ur(Ke.cursor),window.requestAnimationFrame(()=>ne.setSelectionRange(Ke.cursor,Ke.cursor)),!0}function fa(ne){He(null);let $e=Ee.reduce((Ke,Nn)=>Ke+Nn.size,0);for(const Ke of ne){if(!/^(image\/(png|jpeg|gif|webp)|application\/pdf)$/.test(Ke.type))continue;if(Ke.size>31457280){He(spe({name:Ne(Ke.name)}));continue}if($e+Ke.size>41943040){He(_pe());continue}$e+=Ke.size;const Nn=H,Tn=new FileReader;Tn.onload=()=>{const Tr={dataUrl:Tn.result,mediaType:Ke.type,name:Ke.name,size:Ke.size};if(pe.current.activeId===Nn){Ie(br=>[...br,Tr]);return}const xn=Xe.current.get(Nn??"new")??dw;Xe.current.set(Nn??"new",{...xn,attachments:[...xn.attachments,Tr]})},Tn.readAsDataURL(Ke)}}function il(ne){const be=Array.from(ne.clipboardData.items).filter(De=>De.kind==="file"&&(De.type.startsWith("image/")||De.type==="application/pdf")).map(De=>De.getAsFile()).filter(De=>De!==null);be.length>0&&(ne.preventDefault(),fa(be))}const Ut=q.find(ne=>ne.id===H),us=rr??kxn(tn),Dr=Ut?{harness:Ut.harness,model:ln.model??Ut.model,serviceTier:ln.serviceTier!==void 0?ln.serviceTier:Ut.serviceTier,permissionMode:ln.permissionMode??Ut.permissionMode,reasoningLevel:ln.reasoningLevel??Ut.reasoningLevel}:us?{...us,...ln}:null,{data:Ia=UTn}=ft(Hmn(Dr==null?void 0:Dr.harness)),ot=Dr?tn.find(ne=>ne.id===Dr.harness):void 0,Wt=ot==null?void 0:ot.options,Ri=A.useMemo(()=>pjn(Ia,Wt==null?void 0:Wt.planActivation),[Ia,Wt==null?void 0:Wt.planActivation]),da=YA(V),ws=da!==null,Ln=t4(V,Ai),hi=(Ln==null?void 0:Ln.query)??null,_c=hi===null?[]:Ri.filter(ne=>ne.name.startsWith(hi)||ne.plugin&&`${ne.plugin}:${ne.name}`.toLowerCase().startsWith(hi)),Mi=!ws&&hi!==null&&(Ln==null?void 0:Ln.end)===Ai&&_c.length>0,ks=Mi&&!Xs?_c:[],Oi=ks.length>0,Yr=Math.min(ho,Math.max(0,ks.length-1));A.useEffect(()=>Qs(0),[hi]);const vr=Dr&&ot&&ot.models.length>0&&!ot.models.some(ne=>ne.id===Dr.model)?ot.models[0].id:(Dr==null?void 0:Dr.model)??null,Qt=Dr&&{...Dr,model:vr,serviceTier:wv(ot,vr,Dr.serviceTier),reasoningLevel:TL(ot,vr,Dr.reasoningLevel)},Is=wb(ot,Qt==null?void 0:Qt.model),_s=ne=>{if(!Qt)return;const be={...Qt,...ne},De={};ne.model!==void 0&&ne.model!==Qt.model&&(De.model=ne.model),ne.serviceTier!==void 0&&ne.serviceTier!==Qt.serviceTier&&(De.serviceTier=ne.serviceTier),ne.permissionMode!==void 0&&ne.permissionMode!==Qt.permissionMode&&(De.permissionMode=ne.permissionMode),ne.reasoningLevel!==void 0&&ne.reasoningLevel!==Qt.reasoningLevel&&(De.reasoningLevel=ne.reasoningLevel),Yn($e=>({...$e,...De})),rn(be),N(be).catch(()=>{}),Ut?An($e=>({...$e,...ne})):ne.harness&&ne.harness!==Qt.harness&&An({})},Lr=A.useCallback(ne=>{const be=ct.current.catch(()=>{}).then(()=>{if(!$n(U.queryKey))throw new DOMException("Workspace changed","AbortError");return ne()});return ct.current=be.then(()=>{},()=>{}),be},[U]),ir=ne=>{if(ne==="plan"&&(ot==null?void 0:ot.id)==="claude-code"?(Yn($e=>({...$e,permissionMode:ne})),An($e=>({...$e,permissionMode:ne}))):(An($e=>{const Ke={...$e};return delete Ke.permissionMode,Ke}),_s({permissionMode:ne})),!Ut)return;const be=Ut.id,De=++ye.current;we(null),Lr(()=>T.mutateAsync([be,ne])).then($e=>{W(Ke=>Ke.map(Nn=>Nn.id===$e.id?$e:Nn)),ye.current===De&&An(Ke=>{const Nn={...Ke};return delete Nn.permissionMode,Nn})}).catch(()=>{ye.current===De&&(An($e=>{const Ke={...$e};return delete Ke.permissionMode,Ke}),we(KCe()))})},Js=ne=>_s({reasoningLevel:ne}),Gr=(Qt==null?void 0:Qt.harness)==="claude-code"?Qt.permissionMode==="plan":(Wt==null?void 0:Wt.planActivation)==="command"?qe??(Ut==null?void 0:Ut.planMode)??!1:!1;A.useEffect(()=>{qe===null||(Ut==null?void 0:Ut.planMode)!==qe||(nt.current=null,at(null))},[Ut==null?void 0:Ut.planMode,qe]);async function Ss(ne){if(Yn($e=>({...$e,planMode:ne})),nt.current=ne,at(ne),!Ut)return;const be=Ut.id,De=++je.current;we(null);try{const $e=await Lr(()=>j.mutateAsync([be,ne]));W(Ke=>Ke.map(Nn=>Nn.id===$e.id?$e:Nn)),je.current===De&&(nt.current=null,at(null),we(null))}catch($e){throw je.current===De&&(nt.current=null,at(null)),$e}}async function al(){if((Qt==null?void 0:Qt.harness)==="claude-code"){ir("auto");return}if(Ut)try{await Ss(!1)}catch{we(f0e())}}async function Ou(){const ne=!Gr;try{if((Qt==null?void 0:Qt.harness)==="claude-code")ir(ne?"plan":"auto");else if((Wt==null?void 0:Wt.planActivation)==="command")await Ss(ne);else throw new Error(q2())}catch{we(fN())}}function fc(ne,be){const De=WA(ne,be);ee(De.text),xs(!0),Ou(),window.requestAnimationFrame(()=>{var $e,Ke;($e=Lt.current)==null||$e.focus(),(Ke=Lt.current)==null||Ke.setSelectionRange(De.cursor,De.cursor),Ur(De.cursor)})}const Di=A.useCallback(async(ne=!1)=>{const be=te.current;if(be.projectId!==e||!$n(U.queryKey))return null;const De=(rt.getQueryData(U.queryKey)??[]).map($e=>$e.id);try{const $e=await rt.fetchQuery({...U,...ne?{staleTime:0}:{}});if(te.current!==be||!$n(U.queryKey))return null;const Ke=$e.filter(Tn=>!gu.has(Tn.id)),Nn=new Set(Ke.map(Tn=>Tn.id));for(const Tn of De)Nn.has(Tn)||yc(Tn);return Rn.current=new Map(Ke.map(Tn=>[Tn.id,Tn.title])),Ke}catch{return null}},[e]),po=A.useCallback(async ne=>{te.current.projectId!==e||!$n(U.queryKey)||await Promise.all([rt.fetchQuery({...Zl(ne),staleTime:0}),Di(!0)]).catch(()=>{})},[e,Di]);A.useEffect(()=>{const ne=PI();L(e===Sp?new Set([bb,yb].filter(De=>!ne.has(De))):new Set),ae(!1),X(!1),Un(new Map),Rn.current=new Map,Di();const be=te.current;return()=>{te.current===be&&(te.current={projectId:e})}},[e,Di]),A.useEffect(()=>{Yn(Dp),Dn.current=null},[H]),A.useEffect(()=>Sv(ne=>{switch(ne.type){case"session":{if(ne.session.projectId!==e||gu.has(ne.session.id))return;const be=Rn.current.has(ne.session.id),De=Rn.current.get(ne.session.id)!==ne.session.title;Rn.current.set(ne.session.id,ne.session.title),be&&De&&ne.session.titleSource==="generated"&&(Un($e=>{const Ke=new Map($e);return Ke.set(ne.session.id,($e.get(ne.session.id)??0)+1),Ke}),window.setTimeout(()=>{Un($e=>{if(!$e.has(ne.session.id))return $e;const Ke=new Map($e);return Ke.delete(ne.session.id),Ke})},PTn));break}case"sessionDeleted":yc(ne.sessionId);break}}),[e]),A.useEffect(()=>Sv(ne=>{ne.type==="reconnected"&&Di(!0)}),[Di]);const mo=H?wt.messagesBySession[H]??nR:nR,Ir=H?wt.activeLeafBySession[H]??null:null;kt.current=Ir;const js=A.useMemo(()=>u5n(mo,Ir),[mo,Ir]),$a=A.useRef({projectId:e,ids:wt.busySessions});A.useEffect(()=>{const ne=$a.current;$a.current={projectId:e,ids:wt.busySessions},ne.projectId===e&&L(be=>p5n(be,ne.ids,wt.busySessions,q,i==="chat"?H:null))},[e,wt.busySessions,q,H,i]);const Zn=H?wt.busySessions.has(H):!1,Ba=!Zn&&!!(ot!=null&&ot.agentReady),go=Zn&&gB(js)!=null,dc=Zn&&h5n(js),Li=H?wt.queuedBySession[H]??[]:[],Pa=Li.some(ne=>ne.dispatchState==="retrying"),pi=Li.findIndex(ne=>ne.dispatchState==="blocked"),vo=Li.reduce((ne,be)=>be.dispatchState!=="retrying"||typeof be.nextRetryAt!="number"?ne:ne===null?be.nextRetryAt:Math.min(ne,be.nextRetryAt),null),[bo,Ii]=A.useState(()=>Date.now());A.useEffect(()=>{if(!Pa||vo===null||(Ii(Date.now()),vo<=Date.now()))return;const ne=window.setInterval(()=>{const be=Date.now();Ii(be),be>=vo&&window.clearInterval(ne)},1e3);return()=>window.clearInterval(ne)},[Pa,vo]),A.useEffect(()=>{const ne=Li.reduce((be,De)=>De.planMode??be,void 0);ne!==void 0?(Kt.current=!0,nt.current=ne,at(ne)):Kt.current&&(Kt.current=!1,nt.current=null,at(null))},[Li]);const ol=!!H&&!(H in wt.messagesBySession)&&Yt.isPending,ll=A.useMemo(()=>{const ne=new Set;for(const be of wt.busySessions)(wt.messagesBySession[be]??[]).some(De=>De.parts.some($e=>$e.type==="prompt"&&$e.prompt&&!$e.prompt.resolved&&$e.prompt.nativeId))&&ne.add(be);return ne},[wt.busySessions,wt.messagesBySession]),hc=H?ll.has(H):!1,Wn=Ut,Fa=Wn?pn.get(Wn.id):void 0,Cs=A.useMemo(()=>{var ne;for(let be=js.length-1;be>=0;be--)for(const De of js[be].parts)if(De.type==="prompt"&&((ne=De.prompt)==null?void 0:ne.kind)==="plan"&&!De.prompt.resolved)return{promptId:De.id,plan:De.prompt.plan??"",synthesized:!!De.prompt.synthesized};return null},[js]),St=A.useMemo(()=>H?d5n(js,Wn==null?void 0:Wn.harness,wt.busySessions.has(H)):null,[js,Wn==null?void 0:Wn.harness,H,wt.busySessions]),jr=ws&&!St,$i=ne=>!St&&!ws&&Ri.some(be=>be.name===ne),[fs,pf]=A.useState(null),cl=fs&&fs.sessionId===H?fs:null;A.useEffect(()=>{if(!fs)return;const ne=wt.busySessions.has(fs.sessionId),be=fs.sessionId===H&&Cs&&Cs.promptId!==fs.promptId;(!ne||be)&&pf(null)},[fs,Cs,wt.busySessions,H]);const pc=A.useMemo(()=>X6(js),[js]),ha=Zn&&!!(ot!=null&&ot.supportsSteering)&&!!(ot!=null&&ot.agentReady)&&!Cs&&!St&&!pc&&Ee.length===0&&oe.length===0,Ha=A.useMemo(()=>p&&H?(ne,be,De)=>p(ne,H,be,De):void 0,[p,H]),mc=A.useMemo(()=>m&&H?(ne,be,De)=>m(H,ne,be,De):void 0,[m,H]),Ah=A.useMemo(()=>o&&((ne,be,De,$e,Ke)=>o(ne,H??void 0,be,De,$e,Ke)),[o,H]);A.useEffect(()=>{ye.current+=1,je.current+=1;const ne=(H?wt.queuedBySession[H]??[]:[]).reduce((be,De)=>De.planMode??be,void 0);Kt.current=ne!==void 0,nt.current=ne??null,at(ne??null),An({}),we(null)},[H]);const gc=i==="chat"&&(js.length>0||Zn),pa=(Qt==null?void 0:Qt.harness)??null,Du=(Qt==null?void 0:Qt.model)??null,ei=Yt.data?null:Yt.error,Lu=i==="chat"&&!gc&&!ol&&!ei,Iu=ft({...dgn(e,pa??"claude-code",Du,z()),enabled:Lu&&pa!==null,subscribed:Lu&&pa!==null}),qa=(Fu=Iu.data)!=null&&Fu.blank?HTn():((Zr=Iu.data)==null?void 0:Zr.prompts)??null,Rh=pa!==null&&Iu.isPending,ul=e===Sp?"demo":"project",mf=ne=>{ee(ne),xs(!1),window.requestAnimationFrame(()=>{const be=Lt.current;be&&(be.focus(),be.setSelectionRange(ne.length,ne.length),Ur(ne.length))})};A.useEffect(()=>{jt&&(ee(ne=>ne||jt),xs(!1),Ur(jt.length))},[jt]),A.useEffect(()=>{if(v===0)return;const ne=window.requestAnimationFrame(()=>{const be=Lt.current;be&&(be.focus(),be.setSelectionRange(be.value.length,be.value.length),be.scrollIntoView({block:"nearest"}))});return()=>window.cancelAnimationFrame(ne)},[v]);const $u=A.useId(),vc=e===Sp&&V===gz&&!ce,Mh=A.useCallback(ne=>{const be=ne.scrollHeight-ne.scrollTop-ne.clientHeight<60;gt.current=be,un(be)},[]),Es=A.useCallback(()=>{var ne;gt.current=!0,un(!0),(ne=Ue.current)==null||ne.call(Ue)},[]);A.useEffect(()=>{const ne=yt.current,be=Dt.current;if(!ne||!be)return;const De=new ResizeObserver(()=>{var $e;gt.current?($e=Ue.current)==null||$e.call(Ue):un(ne.scrollHeight-ne.scrollTop-ne.clientHeight<60)});return De.observe(ne),De.observe(be),()=>De.disconnect()},[gc]);const bc=A.useCallback(ne=>{ne.currentTarget.blur(),Es()},[Es]);async function _l({queue:ne=!1}={}){var Ht,Gn,$r,Vr,As,Bi;if(Jc({name:"first_action",surface:ul,action:"typed_prompt"}),fn.current)return;const be=V.trim(),De=St?null:mjn(be,Wt==null?void 0:Wt.planActivation),$e=!!De,Ke=!Gr,Nn=QA(Wt==null?void 0:Wt.planActivation,$e?Ke:void 0,nt.current),Tn=$e&&(ot==null?void 0:ot.id)==="claude-code"?Ke?"plan":"auto":void 0,Tr=De?De.prompt:be,xn=Ee,br=oe,Ga=br.map(_n=>({text:_n.text})),Bh=e,Ts=i;let Va=H;const ni=()=>{const _n=pe.current;return $n(U.queryKey)&&_n.projectId===Bh&&_n.activeId===Va&&_n.mainView===Ts},wo=()=>{ni()&&(ee(_n=>_n||be),Ie(_n=>_n.length?_n:xn),le(_n=>_n.length?_n:br))};if($e&&!Tr&&xn.length===0&&br.length===0){ee(""),xs(!1);try{if((ot==null?void 0:ot.id)==="claude-code")ir(Ke?"plan":"auto");else if((Wt==null?void 0:Wt.planActivation)==="command")await Ss(Ke);else throw new Error(q2())}catch{we(fN()),wo()}return}const Z=Qt?{...Qt,...Tn?{permissionMode:Tn}:{}}:null;Tn&&ir(Tn);let ge=null;const Te=nt.current;$e&&(Wt==null?void 0:Wt.planActivation)==="command"&&(ge=++je.current,nt.current=Ke,at(Ke));const Be=()=>{!ni()||ge===null||je.current!==ge||(nt.current=Te,at(Te))};if(!Tr&&xn.length===0&&br.length===0)return;if((Tr||br.length>0)&&St&&xn.length===0){ee(""),le([]),dl({promptId:St,answers:[],note:Tr||void 0,annotations:Ga}).then(_n=>{_n||wo()});return}const Re=JSON.stringify({text:Tr,images:xn.map(_n=>({mediaType:_n.mediaType,name:_n.name,dataUrl:_n.dataUrl})),annotations:Ga,settings:Z?{model:Z.model,serviceTier:Z.serviceTier,permissionMode:Z.permissionMode,planMode:Nn,reasoningLevel:Z.reasoningLevel}:null}),st=((Ht=Dn.current)==null?void 0:Ht.signature)===Re?Dn.current.id:`ct_${crypto.randomUUID()}`;if(Dn.current={signature:Re,id:st},Zn){if(!H||!(ot!=null&&ot.agentReady)){Be();return}const _n=H;ee(""),Ie([]),le([]),He(null);const $s=Z?{model:Z.model,serviceTier:Z.serviceTier,permissionMode:Z.permissionMode,planMode:(Wt==null?void 0:Wt.planActivation)==="command"?Nn??(Ut==null?void 0:Ut.planMode):Nn,reasoningLevel:Z.reasoningLevel}:{};ni()&&An({});const vi=xn.map(yr=>({mediaType:yr.mediaType,dataBase64:yr.dataUrl.slice(yr.dataUrl.indexOf(",")+1),name:yr.name}));try{(Gn=(await Lr(()=>vz(_n,Tr,$s,vi.length?vi:void 0,Ga,st,ha&&!ne&&!$e?"steer":void 0))).turn)!=null&&Gn.existing&&await po(_n),ni()&&Yn(Dp),(($r=Dn.current)==null?void 0:$r.id)===st&&(Dn.current=null)}catch{Be(),wo()}return}if(!(ot!=null&&ot.agentReady)){Be();return}if(!Z){Be();return}let it=H;try{ee(xr=>xr===V?"":xr),Ie(xr=>xr===xn?[]:xr),le(xr=>xr===br?[]:xr),He(null),fn.current=!0;try{if(!it){const Am=await gf(Z,Nn);it=Am.id,Va=Am.id}if(!$n(U.queryKey))return;const xr=Zl(it);await rt.fetchQuery({...xr,...((Vr=rt.getQueryState(xr.queryKey))==null?void 0:Vr.fetchStatus)==="fetching"?{staleTime:0}:{}})}finally{fn.current=!1}if(!$n(U.queryKey))return;Tt({type:"optimisticUser",sessionId:it,text:Tr||Uhe(),attachments:xn.map(xr=>({url:xr.dataUrl,mediaType:xr.mediaType,name:xr.name})),annotations:br}),Tt({type:"busy",sessionId:it,busy:!0}),ni()&&Es(),ni()&&F==="archived"&&G("active");const _n=Z?{model:Z.model,serviceTier:Z.serviceTier,permissionMode:Z.permissionMode,planMode:Nn,reasoningLevel:Z.reasoningLevel}:{};ni()&&An({});const $s=xn.map(xr=>({mediaType:xr.mediaType,dataBase64:xr.dataUrl.slice(xr.dataUrl.indexOf(",")+1),name:xr.name})),vi=it;if(!vi)throw new Error(a7e());(As=(await Lr(()=>vz(vi,Tr,_n,$s.length?$s:void 0,Ga,st))).turn)!=null&&As.existing&&await po(vi),ni()&&Yn(Dp),((Bi=Dn.current)==null?void 0:Bi.id)===st&&(Dn.current=null)}catch(_n){if(!$n(U.queryKey)||(wo(),Be(),!it))return;const $s=_n instanceof Error?_n.message:String(_n);if(!/session is busy/i.test($s)&&await rt.fetchQuery({...Aa(e),staleTime:0}).then(yr=>{var wf;return!!((wf=yr.find(xr=>xr.id===it))!=null&&wf.busy)}).catch(()=>!1)){ni()&&(ee(yr=>yr===Tr?"":yr),Ie(yr=>yr===xn?[]:yr),le(yr=>yr===br?[]:yr));return}Tt({type:"busy",sessionId:it,busy:!1}),Tt({type:"localError",sessionId:it,text:K0e({error:Ne($s)})})}}async function gf(ne,be){const De=pe.current,$e=te.current,Ke=await M.mutateAsync([e,ne.harness,{model:ne.model,serviceTier:ne.serviceTier,permissionMode:ne.permissionMode,planMode:be,reasoningLevel:ne.reasoningLevel}]);return te.current===$e&&(W(Nn=>[Ke,...Nn.filter(Tn=>Tn.id!==Ke.id)]),rt.getQueryData(U.queryKey)||Di(!0)),te.current===$e&&pe.current===De&&(Y.current(Ke.id,{replace:!0}),pe.current={...De,activeId:Ke.id}),Ke}function Bu(){const ne=Ejn(V);ee(ne),window.requestAnimationFrame(()=>{var be,De;(be=Lt.current)==null||be.focus(),(De=Lt.current)==null||De.setSelectionRange(ne.length,ne.length),Ur(ne.length)})}async function mi(){const ne=da;if(!ne)return;if(we(null),Zn){we(vpe());return}const be=V,De=pe.current;let $e=H;const Ke=()=>{const xn=pe.current;return xn.projectId===De.projectId&&xn.activeId===$e&&xn.mainView===De.mainView},Nn=()=>{Ke()&&ee(xn=>xn||be)};ee(""),xs(!1);let Tn=H;if(!Tn){if(!(ot!=null&&ot.agentReady)||!Qt){Nn(),we(q2());return}try{const xn=QA(Wt==null?void 0:Wt.planActivation,void 0,nt.current);Tn=(await gf(Qt,xn)).id,$e=Tn,Ke()&&An({})}catch(xn){Nn();const br=xn instanceof Error?xn.message:String(xn);Ke()&&we(BE({error:Ne(br)}));return}}Ke()&&F==="archived"&&G("active");const Tr=`${M_}shell-${Date.now()}`;Tt({type:"localShell",sessionId:Tn,id:Tr,command:ne}),Ke()&&Es();try{const{message:xn}=await gmn(Tn,ne);Tt({type:"upsertMessage",sessionId:Tn,message:xn})}catch(xn){const br=xn instanceof Error?xn.message:String(xn);Tt({type:"localShell",sessionId:Tn,id:Tr,command:ne,error:BE({error:Ne(br)})})}}function vf(){H&&xmn(H).catch(()=>{we(F7e())})}const Oh=A.useCallback(async(ne,be)=>{if(!(!H||zr.current)){zr.current=!0,we(null),Xr(ne);try{const De=b5n({model:qn.model,serviceTier:qn.serviceTier,permissionMode:qn.permissionMode,planMode:qn.planMode,reasoningLevel:qn.reasoningLevel}),$e=H;(await vmn($e,ne,be,De)).turn.existing&&await po($e),Yn(Dp)}catch{we(JSe())}finally{zr.current=!1,Xr(null)}}},[H,qn,po]),Dh=A.useCallback((ne,be)=>{if(!H||Zn||!(ot!=null&&ot.agentReady))return;const De=H;Tt({type:"busy",sessionId:De,busy:!0}),Es(),Lr(()=>bmn(De,ne,be)).catch($e=>{Tt({type:"busy",sessionId:De,busy:!1});const Ke=$e instanceof Error?$e.message:String($e);Tt({type:"localError",sessionId:De,text:d6e({error:Ne(Ke)})})})},[H,Zn,ot==null?void 0:ot.agentReady,Es,Lr]),Lh=A.useCallback(ne=>{if(!H||Zn)return;const be=H,De=kt.current;Tt({type:"activeLeaf",sessionId:be,leafId:ne}),Lr(()=>ymn(be,ne)).catch($e=>{Tt({type:"activeLeaf",sessionId:be,leafId:De});const Ke=$e instanceof Error?$e.message:String($e);Tt({type:"localError",sessionId:be,text:W7e({error:Ne(Ke)})})})},[H,Zn,Lr]);function Pu(ne){if(!H)return;const be=H;hmn(be,ne).then(({removed:De})=>{if(De)return po(be)}).catch(()=>we(a6e()))}async function Ih(ne){if(!H||cn)return;const be=H;we(null),jn(ne);try{await pmn(be,ne),await po(be)}catch{we(N6e())}finally{jn(null)}}A.useEffect(()=>{if(!Zn||i!=="chat")return;function ne(be){var De;be.key!=="Escape"||be.defaultPrevented||(be.preventDefault(),vf(),(De=Lt.current)==null||De.focus())}return document.addEventListener("keydown",ne),()=>document.removeEventListener("keydown",ne)},[Zn,H,i]);function yc(ne){gb(ne),Xe.current.delete(ne),$t.current===ne&&($t.current=null),pe.current.projectId===e&&pe.current.activeId===ne&&pe.current.mainView==="chat"&&(ee(""),Ie([]),le([]),Y.current(null,{replace:!0})),L(be=>{if(!be.has(ne))return be;const De=new Set(be);return De.delete(ne),De}),Rn.current.delete(ne)}function bf(ne,be){const De=ne.archived;W($e=>$e.map(Ke=>Ke.id===ne.id?{...Ke,archived:be}:Ke)),D.mutateAsync([ne.id,be]).catch(()=>{W($e=>$e.map(Ke=>Ke.id===ne.id?{...Ke,archived:De}:Ke))})}function fl(ne,be){const De=ne.title;W($e=>$e.map(Ke=>Ke.id===ne.id?{...Ke,title:be}:Ke)),I.mutateAsync([ne.id,be]).catch(()=>{W($e=>$e.map(Ke=>Ke.id===ne.id?{...Ke,title:De}:Ke))})}async function yo(ne){var De;const be=((De=ne.title)==null?void 0:De.trim())||Fg();if(window.confirm(Zpe({title:qo(be)}))){try{await P.mutateAsync(ne.id)}catch($e){Vn(i0e({title:qo(be),error:Ne($e instanceof Error?$e.message:String($e))}),"error");return}yc(ne.id)}}const dl=A.useCallback(ne=>{if(!H)return Promise.resolve(!1);const be=H;return Tt({type:"busy",sessionId:be,busy:!0}),Lr(()=>wmn(be,ne)).then(()=>!0).catch(()=>!1).finally(()=>{$n(U.queryKey)&&(rt.fetchQuery({...Zl(be),staleTime:0}).catch(()=>{}),rt.fetchQuery({...Aa(e),staleTime:0}).catch(()=>{}))})},[H,e,Lr,U]),xc=q.filter(ne=>LTn(F,ne.archived)),xo=/Mac|iPhone|iPad/.test(navigator.platform),yf=xo?"⌘ ⇧ ↵":"Ctrl + Shift + ↵",xf=xo?"⌘ Enter":"Ctrl + Enter",ds=A.useCallback(()=>{G("active"),y(null)},[y]),yn=A.useCallback(ne=>{G("all"),y(ne)},[y]);A.useEffect(()=>{const ne=be=>{be.repeat||be.key!=="Enter"||!be.metaKey&&!be.ctrlKey||be.altKey||!be.shiftKey||(be.preventDefault(),ds())};return document.addEventListener("keydown",ne),()=>document.removeEventListener("keydown",ne)},[ds]);const wc=f.jsxs("aside",{className:"session-rail w-68 shrink-0 flex flex-col mt-5 me-3.5 mb-5 ms-0 bg-background min-h-0 [&_.rail-body]:flex-1 [&_.rail-body]:min-h-0 [&_.rail-body]:overflow-y-auto [&_.rail-body]:pt-0 [&_.rail-body]:pb-1 [&_.rail-body]:px-2 border border-border rounded-lg overflow-visible shadow-elevated",children:[t,f.jsxs("nav",{className:"rail-nav flex flex-col gap-0.5 p-2 shrink-0",children:[f.jsxs("button",{className:"rail-nav-item flex items-center gap-2.5 py-[7px] px-2.5 text-base text-text rounded-md text-start hover:bg-surface [&[data-tip]::after]:top-auto [&[data-tip]::after]:bottom-[calc(100%_+_6px)]","data-onboarding":"new-session","data-tip":yf,"aria-keyshortcuts":"Meta+Shift+Enter Control+Shift+Enter",onClick:ds,children:[f.jsx(yh,{size:15}),Fxe()]}),f.jsxs("button",{className:`rail-nav-item flex items-center gap-2.5 py-[7px] px-2.5 text-base text-text rounded-md text-start [&:hover:not(.active)]:bg-surface [&.active]:bg-panel [&.active]:font-medium ${i==="skills"?"active":""}`,onClick:()=>a("skills"),children:[f.jsx(uI,{size:15}),obe()]}),ujn.map(ne=>f.jsxs("button",{className:`rail-nav-item flex items-center gap-2.5 py-[7px] px-2.5 text-base text-text rounded-md text-start [&:hover:not(.active)]:bg-surface [&.active]:bg-panel [&.active]:font-medium ${i!=="chat"&&i!=="skills"&&ne.activeTabs.includes(i)?"active":""}`,"data-onboarding":ne.id==="compute"?"nav-compute":void 0,onClick:()=>a(ne.id),children:[ne.icon,ne.label()]},ne.id))]}),f.jsxs("div",{className:"rail-section-head flex items-center justify-between shrink-0 pt-3.5 pe-2.5 pb-0 ps-4.5",children:[f.jsx("div",{className:"rail-section-label p-0 text-sm font-medium text-subtext",children:((ti=hH.find(ne=>ne.id===F))==null?void 0:ti.railLabel())??lD()}),f.jsx("div",{className:"rail-section-actions flex items-center gap-0.5",children:f.jsx(ITn,{value:F,onChange:G})})]}),f.jsxs("div",{className:"rail-body",children:[xc.map(ne=>f.jsx(FTn,{session:ne,active:ne.id===H&&i==="chat",unread:$.has(ne.id),busy:wt.busySessions.has(ne.id),waiting:ll.has(ne.id),revealTitle:pn.get(ne.id),onOpen:()=>{if(y(ne.id),e===Sp){Lyn(ne.id);const be=rpn[ne.id];be&&(Jc({name:"demo_experiment_started",kind:"curated",experiment:be}),Jc({name:"first_action",surface:"demo",action:"open_experiment"}))}},onRename:be=>fl(ne,be),onSetArchived:be=>bf(ne,be),onDelete:()=>void yo(ne)},ne.id)),xc.length===0&&f.jsx("div",{className:"rail-empty py-1.5 px-2.5 text-sm text-muted",children:F==="archived"?Nme():q.length>0?dme():Ome()})]}),f.jsx(y$,{runtime:x})]}),$h="chat-header flex items-center gap-2 py-0 px-4 bg-background shrink-0 h-12 relative z-4 w-full max-w-readable my-0 mx-auto [&::after]:content-[''] [&::after]:absolute [&::after]:top-full [&::after]:start-0 [&::after]:end-0 [&::after]:h-6 [&::after]:bg-[linear-gradient(to_bottom,_var(--base),_transparent)] [&::after]:pointer-events-none",hl=!r&&f.jsx(Ft,{title:lN(),"aria-label":lN(),onClick:s,children:f.jsx(kI,{size:20})});return i!=="chat"?f.jsxs(f.Fragment,{children:[r&&wc,f.jsxs("section",{className:"chat-pane flex-1 min-w-0 flex flex-col bg-background min-h-0",children:[!r&&f.jsx("div",{className:"flex h-12 shrink-0 items-center",children:hl}),f.jsx("div",{className:"settings-view-scroll flex-1 min-h-0 overflow-y-auto [scrollbar-gutter:stable_both-edges]",children:E})]})]}):f.jsxs(f.Fragment,{children:[r&&wc,f.jsxs("section",{className:"chat-pane flex-1 min-w-0 flex flex-col bg-background min-h-0 mt-5",children:[f.jsxs("div",{className:r?"contents":"grid shrink-0 grid-cols-[2rem_minmax(0,1fr)_2rem] items-center",children:[hl,f.jsxs("div",{className:$h,children:[f.jsx(k0,{variant:"header",title:Wn?((gi=Wn.title)==null?void 0:gi.trim())||Fg():PE(),children:Wn?f.jsx(pH,{title:((Hu=Wn.title)==null?void 0:Hu.trim())||Fg(),animate:Fa!==void 0},Fa??"static"):PE()}),k&&f.jsx(Ft,{"data-tip":FE(),"aria-label":FE(),onClick:k,children:f.jsx(Svn,{size:15})})]})]}),ei?f.jsxs("div",{className:"flex flex-1 flex-col items-center justify-center gap-3 p-5 text-subtext",role:"alert",children:[f.jsx("p",{children:ei.message}),f.jsx(Me,{onClick:()=>void Yt.refetch(),children:Vs()})]}):ol?f.jsxs("div",{className:"chat-loading flex-1 flex items-center justify-center gap-3 text-subtext text-xl p-5 [&_.spinner]:w-5.5 [&_.spinner]:h-5.5 [&_.spinner]:border-[3px]","aria-live":"polite","aria-busy":"true",children:[f.jsx(Rt,{}),f.jsx("span",{children:Oxe()})]}):gc?f.jsx("div",{className:"chat-thread flex-1 min-h-0 overflow-y-auto [scrollbar-gutter:stable_both-edges]",ref:yt,tabIndex:0,role:"region","aria-label":((Ua=Wn==null?void 0:Wn.title)==null?void 0:Ua.trim())||Fg(),onScroll:ne=>{Mh(ne.currentTarget),gr.dismiss()},children:f.jsxs("div",{className:"chat-thread-inner max-w-readable my-0 mx-auto pt-4 px-4 pb-8 flex flex-col gap-4",ref:Dt,children:[f.jsx(LF,{projectId:e,sessionId:H,children:f.jsx(DTn,{scrollRef:yt,scrollToEndRef:Ue,stickToBottom:gt,onPinToBottom:Es,messages:js,allMessages:mo,canFork:Ba,onFork:Dh,onSelectFork:Lh,busy:Zn,onOpenFile:Ah,onOpenRun:l,onOpenSpawnedSession:yn,runExperimentName:u,onOpenExperiment:h,experimentName:_,onRespond:dl,onOpenPlan:Ha,onOpenSubagent:mc,recoveringTurnId:fr,onRecover:Oh,skills:Ri},H)}),Zn&&hc&&f.jsx("div",{className:"flex items-center gap-2 text-subtext text-sm pt-0.5 px-0 pb-2 italic",children:Oke()}),Zn&&!hc&&!go&&!dc&&f.jsx("div",{className:"text-base pt-0.5 px-1 pb-2",children:f.jsx("span",{className:"tool-running-shimmer",children:lCe()})})]})}):f.jsxs("div",{className:"chat-empty flex-1 flex flex-col items-center justify-center text-text p-8 text-center [&_h2]:m-0 [&_h2]:text-5xl [&_h2]:font-medium [&_h2]:tracking-[-0.015em] [&_h2]:text-text",children:[f.jsx("div",{className:"chat-empty-mark w-10.5 h-10.5 mb-5.5 [&_svg]:block [&_svg]:w-full [&_svg]:h-full",children:f.jsx(hS,{})}),f.jsx("h2",{children:Fke()}),f.jsxs("div",{className:"chat-empty-project inline-flex items-center gap-[7px] mt-3 py-1.5 px-3 border border-border rounded-full text-subtext bg-surface text-lg font-medium",children:[f.jsx(q_,{size:19}),f.jsx("span",{children:n})]}),Rh&&f.jsx("div",{className:oR,role:"status","aria-live":"polite","aria-label":O5e(),"aria-busy":"true",children:aR.map((ne,be)=>f.jsxs("div",{className:`flex min-h-22 animate-pulse flex-col items-start justify-center gap-2.5 rounded-xl border bg-background px-5 py-4 ${l4[be].box}`,children:[f.jsxs("span",{className:`flex w-full items-center gap-2.5 ${l4[be].icon}`,children:[f.jsx(ne,{size:17}),f.jsx("span",{className:"h-3.5 w-2/5 rounded bg-surface-bright"})]}),f.jsx("span",{className:"h-3 w-4/5 rounded bg-surface"})]},be))}),qa&&qa.length>0&&f.jsx("div",{className:oR,role:"group","aria-label":F5e(),children:qa.map((ne,be)=>{const De=aR[be],$e=l4[be];return f.jsxs("button",{type:"button",className:`flex min-h-22 w-full min-w-0 cursor-pointer flex-col items-start justify-center gap-1.5 rounded-xl border bg-background px-5 py-4 text-start font-sans transition-colors duration-120 ease-standard hover:bg-surface ${$e.box}`,onClick:()=>{Jc({name:"project_starter_clicked",slot:be+1}),Jc({name:"first_action",surface:ul,action:"starter_click"}),mf(ne.prompt)},children:[f.jsxs("span",{className:"flex items-center gap-2.5 text-base font-medium text-text",children:[f.jsx(De,{size:17,className:$e.icon}),ne.title]}),f.jsx("span",{className:"w-full truncate text-sm text-subtext",children:ne.prompt})]},be)})})]}),gr.action&&f.jsxs(Me,{type:"button",size:"small",className:"chat-selection-action fixed z-50 shadow-control",style:{left:gr.action.x,top:gr.action.top,transform:"translateX(-50%)"},onMouseDown:ne=>ne.preventDefault(),onClick:gr.add,children:[f.jsx(wI,{size:14}),t1e()]}),f.jsxs("div",{className:"composer px-3 pb-5 shrink-0 relative z-4 bg-background w-full max-w-readable my-0 mx-auto [&_textarea]:border-0 [&_textarea]:bg-none [&_textarea]:bg-transparent [&_textarea]:resize-none [&_textarea]:pt-2.5 [&_textarea]:px-3 [&_textarea]:pb-1 [&_textarea]:text-base [&_textarea]:field-sizing-content [&_textarea]:min-h-18 [&_textarea]:max-h-45",children:[gc&&f.jsx(Ft,{className:`absolute bottom-full left-1/2 z-5 mb-6 h-9 w-9 -translate-x-1/2 rounded-full border border-border bg-background shadow-control transition-opacity duration-150 ease-standard ${ur?"opacity-0":"opacity-100"}`,title:_N(),"aria-label":_N(),inert:ur,onClick:bc,children:Zn&&!hc?f.jsx(Jk,{size:18,className:"tool-running-shimmer-icon"}):f.jsx(ovn,{size:16})}),Cs&&!(cl&&Cs.promptId===cl.promptId)&&f.jsx(vzn,{synthesized:Cs.synthesized,agentLabel:Wn?qp[Wn.harness]:tCe(),showResumeModes:(Wn==null?void 0:Wn.harness)==="claude-code",onView:ne=>Ha==null?void 0:Ha(Cs.plan,Cs.promptId,ne),onApprove:ne=>dl({promptId:Cs.promptId,approve:!0,...ne?{resumeMode:ne}:{}}),onReject:()=>dl({promptId:Cs.promptId,approve:!1}),onRevise:ne=>{H&&pf({sessionId:H,promptId:Cs.promptId}),dl({promptId:Cs.promptId,approve:!1,note:ne})}}),Li.length>0&&f.jsx("div",{className:"composer-queued flex flex-col gap-1 mb-1.5",children:Li.map((ne,be)=>f.jsxs("div",{className:"queued-chip flex flex-wrap items-center gap-x-2 gap-y-1 py-1.5 px-2.5 text-sm text-subtext bg-background border border-border rounded-sm",title:ne.error?`${ne.text} +`).trim()}function PTn(e){const n=e.changes;if(!Array.isArray(n))return null;for(const t of n){if(!t||typeof t!="object"||!("path"in t)||typeof t.path!="string")continue;const r="kind"in t?t.kind:null,s=r&&typeof r=="object"&&"type"in r&&typeof r.type=="string"?r.type:null;return{path:t.path,type:s}}return null}function FTn(e){const n=e.trim(),t=n.match(/^\/bin\/(?:ba|z)?sh\s+-lc\s+([\s\S]+)$/);let r=((t==null?void 0:t[1])??n).trim();return r=okn(r),iH(r)}function iH(e){return qTn(e).replace(/[\t\r ]+/g," ").trim()}function HTn(e){let n=null,t=!1;for(let r=0;r!i.startsWith("-")&&i.includes(":"));if(!n)return null;const t=n.indexOf(":"),r=n.slice(0,t),s=n.slice(t+1);return r&&oH(s)?{ref:r,path:s}:null}function VTn(e){const n=e.match(/\b(?:rg|grep)\b(?:\s+-[^\s]+)*\s+(?:"([^"]+)"|'([^']+)'|([^\s]+))/);return(n==null?void 0:n[1])??(n==null?void 0:n[2])??(n==null?void 0:n[3])??null}function rR(e,n){if(/[$`~]/.test(e)||/[$`~]/.test(n))return null;const t=n.startsWith("/")||!n.startsWith("/")&&e.startsWith("/"),r=n.startsWith("/")?[]:e.split("/").filter(Boolean);for(const i of n.split("/"))if(!(!i||i===".")){if(i===".."){r.length>0&&r[r.length-1]!==".."?r.pop():t||r.push(i);continue}r.push(i)}return`${t?"/":""}${r.join("/")}`||(t?"/":null)}function KTn(e,n,t,r){if(e.startsWith("/"))return e;let s=r??"";for(let i=0;i!u.startsWith("-"));if(!o)return null;const l=rR(s,o);if(!l)return null;s=l}return s?rR(s,e):e}const Ro="[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}",WTn=new RegExp(`\\bchat_(${Ro})\\b`,"gi"),L_=`(?:${Ro}|[0-9a-f]{8})`;function Sd(e){const n=[];let t="",r="",s=null,i=!1;const a=()=>{(t.trim()||r.trim())&&n.push({raw:t.trim(),code:r.trim()}),t="",r=""},o=u=>{let h=1,_=null,p=!1;for(let m=u;m{let h=!1;for(let _=u;_ukn(t.raw,n))}function Sa(e,n){return ky(e,n).length>0}function QTn(e){if(!e)return[];const n=new Set;for(const t of e.slice(0,rH).matchAll(WTn))if(n.add(t[0].toLowerCase()),n.size>=Eu)break;return[...n]}function I5(e,n){if(!e)return[];const t=new Set,r=e.slice(0,rH),s=n==="runs"?[new RegExp(`/runs/(${Ro})`,"gi"),new RegExp(`\\brun(?:_|\\s+)id:\\s*(${Ro})`,"gi"),new RegExp(`^\\s*RUN\\s+(${Ro})\\b`,"gim"),new RegExp(`={3,}\\s*(${Ro})\\s*={3,}`,"gi")]:[new RegExp(`/experiments/(${Ro})`,"gi"),new RegExp(`^\\s*id:\\s*(${Ro})`,"gim"),new RegExp(`={3,}\\s*(${Ro})\\s*={3,}`,"gi")];for(const a of s)for(const o of r.matchAll(a))if(t.add(o[1]),t.size>=Eu)return[...t];const i=new RegExp(`^\\s*(${Ro})(?:\\s|$)`,"gim");for(const a of r.matchAll(i))if(t.add(a[1]),t.size>=Eu)break;return[...t]}function cH(e,n){let t=0;return n.map(r=>{const s=e.indexOf(r.raw,t),i=s===-1?e.indexOf(r.raw):s;return t=Math.max(t,i+r.raw.length),{invocation:r,offset:Math.max(0,i)}})}function uH(e,n,t,r){const s=new RegExp(`(?:^|[\\s;])(?:export\\s+)?${n}\\s*=\\s*(?:"([^"]*)"|'([^']*)'|([^\\s;]+))`,"gi");let i="";for(const a of e.matchAll(s)){if((a.index??0)>=t)break;i=a[1]??a[2]??a[3]??""}return[...i.matchAll(new RegExp(r,"gi"))].map(a=>a[0])}function _H(e,n,t,r){const s=new RegExp(`\\bfor\\s+${n}\\s+in\\s+([\\s\\S]*?)(?:;|\\n)\\s*do\\b`,"gi");let i="";for(const a of e.matchAll(s)){const o=a.index??0;if(o>=t)break;const l=o+a[0].length;l<=t&&/\bdone\b/.test(e.slice(l,t))||(i=a[1])}return/\$\(|`/.test(i)?[]:[...i.matchAll(new RegExp(r,"gi"))].map(a=>a[0])}function XTn(e,n,t=[],r=[]){const s=ky(e,"logs"),i=new Set;if(s.length===0){if(!Sa(e,"logs"))return[];const o=t.length>0?[]:I5(n,"runs");for(const l of t.length>0?t:o.length>0?o:r)if(i.add(l),i.size>=Eu)break;return kd([...i])}let a=!1;for(const{invocation:o,offset:l}of cH(e,s)){const u=rh(o.raw);if((u==null?void 0:u[0])!=="logs")continue;const h=u.slice(1);let _=null;for(let v=0;v0?[]:I5(n,"runs"),l=t.length>0?t:o.length>0?o:r;for(const u of l)if(i.add(u),i.size>=Eu)break}return kd([...i])}function td(e,n,t=[],r=[]){const s=ky(e,"exp\\s+(?:status|desc)");if(s.length===0)return[];const i=new Set;let a=!1;for(const{invocation:o,offset:l}of cH(e,s)){const u=rh(o.raw),h=(u==null?void 0:u[0])==="exp"&&(u[1]==="status"||u[1]==="desc")?u[2]:null;let _=!1;h&&new RegExp(`^${L_}$`,"i").test(h)&&(i.add(h),_=!0);const p=h?/^\$\{?([A-Za-z_][A-Za-z0-9_]*)\}?$/.exec(h):null;if(p){const m=p[1],x=uH(e,m,l,L_);if(x.length>0){for(const v of x)i.add(v);_=!0}const k=_H(e,m,l,L_);for(const v of k)i.add(v);k.length>0&&(_=!0)}_||(a=!0)}if(i.size===0||a){const o=t.length>0?[]:I5(n,"experiments"),l=t.length>0?t:o.length>0?o:r;for(const u of l)if(i.add(u),i.size>=Eu)break}return kd([...i])}const sR=new WeakMap;function W_(e){const n=z(),t=sR.get(e);if((t==null?void 0:t.locale)===n)return t.activity;const r=YTn(e);return sR.set(e,{locale:n,activity:r}),r}function YTn(e){var b,w,y,C;const n=e.tool??"tool",t=((b=e.state)==null?void 0:b.input)??{},r=t.arguments,s=r&&typeof r=="object"&&!Array.isArray(r)?Object.fromEntries(Object.entries(r)):{},i={...t,...s},a=qs(i,"command","cmd"),o=BTn(i,"commandArgv"),l=((w=e.state)==null?void 0:w.output)||((y=e.state)==null?void 0:y.error),u=kd(a4(i,"targetIds")),h=kd(a4(i,"runTargetIds")),_=kd(a4(i,"experimentTargetIds")),p=qs(i,"filePath","file_path","notebookPath","notebook_path","path"),m=qs(i,"description"),x=n.toLowerCase().split(/(?::|\.|__)+/),k=x.at(-1)??n.toLowerCase();if(k==="run"&&x.includes("web")){const E=i4(i,"search_query","q"),N=i4(i,"image_query","q"),A=i4(i,"find","pattern");return E?{kind:"web",label:TE({query:E})}:N?{kind:"web",label:iie({query:N})}:A?{kind:"web",label:$ie({pattern:A})}:Array.isArray(i.open)?{kind:"web",label:c2e()}:Array.isArray(i.weather)?{kind:"web",label:qve()}:Array.isArray(i.finance)?{kind:"web",label:jve()}:Array.isArray(i.sports)?{kind:"web",label:Lve()}:Array.isArray(i.time)?{kind:"web",label:wve()}:{kind:"web",label:UE()}}switch(new Map([["read_file","read"],["write_file","write"],["edit_file","edit"],["exec","bash"],["exec_command","bash"],["run_command","bash"],["agent","task"],["collabagenttoolcall","subagent"],["subagentactivity","subagent"]]).get(k)??k){case"bash":{if(!a&&!(o!=null&&o.length))return{kind:"command",label:rwe()};const E=FTn(a??(o==null?void 0:o.join(" "))??""),N=Sd(E);let A=N.map(ae=>ae.raw);if(o!=null&&o.length){const ae=ckn(o);A=ae===null?[o]:Sd(iH(ae)).map(re=>re.raw)}let j=null;for(const ae of A)if(j=_kn(ae),j)break;const M=A.some(ae=>{const re=rh(ae);return re!==null&&re[0]!=="discover"&&re[0]!=="paper"});if(j&&!M){const ae=j.kind==="discover"?{keyword:Ese(),embedding:Mse(),openalex:Cie(),biorxiv:Pse()}[j.strategy]:null,re=j.kind==="discover"?j.query?mte({activity:ae??jE(),query:j.query}):ae??jE():j.id?kp({target:Ne(j.id)}):Bne();return{kind:j.kind==="paper"?"read":"search",label:re,litCall:j}}if(Sa(E,"agent\\s+spawn"))return{kind:"agent",label:wbe(),spawnedSessionIds:QTn(l),litCall:j??void 0};const L=N.map(ae=>lH(ae.raw)),I=Sa(E,"exp\\s+status"),B=Sa(E,"exp\\s+desc"),q=ky(E,"exp\\s+desc").some(ae=>(rh(ae.raw)??[]).some(X=>X==="--set"||X.startsWith("--set=")||X==="--stdin")),U=q?Mae():Rne(),W=q?KJ():Vre();if(Sa(E,"logs")){const ae=XTn(E,l,h,u);return{kind:"project",label:ae.length===1?Rre():Bre(),runIds:ae,litCall:j??void 0}}if(Sa(E,"exp\\s+run"))return{kind:"project",label:N3e(),litCall:j??void 0};if(Sa(E,"exp\\s+wait"))return{kind:"project",label:jke(),litCall:j??void 0};if(Sa(E,"exp\\s+cancel"))return{kind:"project",label:H1e(),litCall:j??void 0};const H=Sa(E,"project\\s+view");if(H&&I&&B)return{kind:"project",label:W,experimentIds:td(E,l,_,u),litCall:j??void 0};if(H&&B)return{kind:"project",label:U,experimentIds:td(E,l,_,u),litCall:j??void 0};if(H&&I)return{kind:"project",label:GE(),experimentIds:td(E,l,_,u),litCall:j??void 0};if(H)return{kind:"project",label:Awe(),litCall:j??void 0};if(I&&B)return{kind:"project",label:W,experimentIds:td(E,l,_,u),litCall:j??void 0};if(I)return{kind:"project",label:GE(),experimentIds:td(E,l,_,u),litCall:j??void 0};if(B)return{kind:"project",label:U,experimentIds:td(E,l,_,u),litCall:j??void 0};if(Sa(E,"runs?"))return{kind:"project",label:wxe(),litCall:j??void 0};if(Sa(E,"projects"))return{kind:"project",label:jxe(),litCall:j??void 0};if(Sa(E,"compute"))return{kind:"project",label:nve(),litCall:j??void 0};const Y=L.map(GTn).find(ae=>ae!=null);if(Y){const ae=s4(Y.path);return{kind:ae?"skill":"read",label:ae?B2({name:Ne(ae)}):kp({target:Ne(__(Y.path))}),filePath:Y.path,fileRef:Y.ref,labelTarget:ae?`${ae} skill`:__(Y.path)}}const te=L.findIndex(ae=>ae!=null&&["sed","cat","head","tail"].includes(ae.name)),$=te>=0?L[te]:null,D=$?UTn($):null,F=D?KTn(D,N,te,qs(i,"cwd","workdir")):null;if(D&&F){const ae=s4(F);return{kind:ae?"skill":"read",label:ae?B2({name:Ne(ae)}):kp({target:Ne(__(D))}),filePath:F,labelTarget:ae?`${ae} skill`:__(D)}}if(L.some(ae=>(ae==null?void 0:ae.name)==="find"||(ae==null?void 0:ae.name)==="ls"||(ae==null?void 0:ae.name)==="rg"&&ae.args.includes("--files")))return{kind:"search",label:eN()};const G=L.findIndex(ae=>(ae==null?void 0:ae.name)==="rg"||(ae==null?void 0:ae.name)==="grep");if(G>=0){const ae=VTn(N[G].raw);return{kind:"search",label:ae?F2({pattern:Ne(ae)}):P2(),searchPattern:ae??void 0}}const V=L.find(ae=>(ae==null?void 0:ae.name)==="git"),ee=V==null?void 0:V.args[0];if(ee==="grep"){const ae=V==null?void 0:V.args.slice(1).find(re=>!re.startsWith("-"));return{kind:"search",label:ae?F2({pattern:Ne(ae)}):P2(),searchPattern:ae}}if(ee==="status")return{kind:"command",label:pve()};if(ee==="diff")return{kind:"command",label:j4e()};if(ee==="log")return{kind:"command",label:Swe()};const ce=ae=>L.some(re=>!re||!["cargo","pnpm","npm","yarn"].includes(re.name)?!1:re.args[0]===ae||re.args[0]==="run"&&re.args[1]===ae);return ce("test")?{kind:"command",label:uwe()}:L.some(ae=>(ae==null?void 0:ae.name)==="tsc")||ce("typecheck")?{kind:"command",label:Xve()}:ce("lint")?{kind:"command",label:Q1e()}:ce("build")?{kind:"command",label:z1e()}:{kind:"command",label:_ne({command:Ne(E)})}}case"skill":{const E=qs(i,"skill","name"),N=E?$Tn(n,E):null;return{kind:"skill",label:E?Ute({name:Ne(E)}):Ite(),filePath:N??void 0,labelTarget:N&&E?`${E} skill`:void 0}}case"read":{const E=p?__(p):null,N=p?s4(p):null;return N?{kind:"skill",label:B2({name:Ne(N)}),filePath:p??void 0,labelTarget:`${N} skill`}:E?{kind:"read",label:kp({target:Ne(E)}),filePath:p??void 0,labelTarget:E}:{kind:"read",label:gwe()}}case"edit":case"write":case"notebookedit":{const E=PTn(i),N=p??(E==null?void 0:E.path)??null,A=N?__(N):null,j=A?(E==null?void 0:E.type)==="add"?xee({target:Ne(A)}):(E==null?void 0:E.type)==="delete"?Hee({target:Ne(A)}):nte({target:Ne(A)}):null;return A?{kind:"edit",label:j??XE(),filePath:N??void 0,labelTarget:A}:{kind:"edit",label:XE()}}case"grep":{const E=qs(i,"pattern");return{kind:"search",label:E?F2({pattern:Ne(E)}):P2(),searchPattern:E??void 0}}case"glob":{const E=qs(i,"pattern");return{kind:"search",label:E?kte({pattern:Ne(E)}):eN()}}case"websearch":{const E=qs(i,"query"),N=qs(i,"url"),A=qs(i,"pattern");return E?{kind:"web",label:TE({query:E})}:A&&N?{kind:"web",label:vie({pattern:A})}:N?{kind:"web",label:sne({target:Ne(N)})}:{kind:"web",label:m??UE()}}case"webfetch":{const E=qs(i,"url");return{kind:"web",label:E?kp({target:Ne(E)}):m??sre()}}case"task":return{kind:"agent",label:m??vne()};case"subagent":return{kind:"agent",label:ZTn(i)};case"error":return{kind:"command",label:cke()};case"contextcompaction":return{kind:"command",label:oee(),progressLabel:hee()};default:{const E=m??p??a??((C=e.state)==null?void 0:C.title)??"";return{kind:"command",label:E?`${n}: ${E}`:n}}}}function ZTn(e){const n=typeof e.nickname=="string"&&e.nickname?e.nickname.replace(/[_-]+/g," "):"",t=n&&n.charAt(0).toUpperCase()+n.slice(1);if(t)return t;switch(typeof e.tool=="string"?e.tool:""){case"spawnAgent":return iae();case"sendInput":return Zie();case"resumeAgent":return vre();case"wait":return Pae();case"closeAgent":return eee()}switch(typeof e.kind=="string"?e.kind:""){case"started":return Eae();case"interacted":return EJ();case"interrupted":return bae()}return fae()}function Xv({activity:e,className:n=""}){const t={size:16,strokeWidth:1.75,className:"tool-kind-icon"};let r=f.jsx(of,{...t});if(e.litCall)r=f.jsx(kB,{source:e.litCall.source,size:16,className:"tool-kind-icon"});else switch(e.kind){case"skill":r=f.jsx(fI,{...t});break;case"read":case"project":r=f.jsx(dI,{...t});break;case"search":r=f.jsx(NI,{...t});break;case"edit":r=f.jsx(nS,{...t});break;case"web":r=f.jsx(Hbn,{...t});break;case"agent":r=f.jsx(aS,{...t});break}return f.jsx("span",{className:`flex h-6 shrink-0 items-center ${n}`,children:r})}function o4({items:e,onOpen:n,onSelect:t,targetType:r}){const[s,i]=T.useState(!1),a=T.useRef(null),o=T.useRef(!1);return T.useEffect(()=>{var l,u;!s||!o.current||(o.current=!1,(u=(l=a.current)==null?void 0:l.querySelector("button"))==null||u.focus())},[s]),f.jsxs("span",{className:"tool-target-overflow inline",children:[s&&f.jsx("span",{className:"tool-target-reveal",ref:a,children:e.map((l,u)=>f.jsxs("span",{children:[u>0&&", ",n||t?f.jsx("button",{className:"tool-target",...n?qr(h=>n(l.id,h),{stopPropagation:!0}):{onClick:h=>{h.stopPropagation(),t==null||t(l.id)}},children:l.label}):f.jsx("span",{children:l.label})]},l.id))}),s&&", ",f.jsx("button",{className:"tool-target-more","aria-expanded":s,"aria-label":s?TX({target:r}):iJ({count:Jt(e.length),target:r}),onClick:l=>{l.preventDefault(),l.stopPropagation(),o.current=!s&&l.detail===0,i(u=>!u)},children:s?fD():aEe({count:Jt(e.length)})})]})}function $5({activity:e,onOpenFile:n,onOpenRun:t,onOpenSpawnedSession:r,runExperimentName:s,onOpenExperiment:i,experimentName:a}){var o,l,u,h;if(e.searchPattern)return e.label;if(((o=e.litCall)==null?void 0:o.kind)==="paper"&&e.litCall.id)return f.jsxs("a",{className:"tool-target",href:gkn(e.litCall.source,e.litCall.id),target:"_blank",rel:"noopener noreferrer",children:[e.label,f.jsx(Qvn,{className:"inline ms-1 opacity-50",size:13,"aria-hidden":"true"})]});if(e.filePath&&e.labelTarget&&n){const _=e.filePath;return f.jsx("span",{className:"tool-target",role:"button",tabIndex:0,...qr(p=>n(_,void 0,void 0,e.fileRef,p),{stopPropagation:!0}),children:e.label})}if((l=e.spawnedSessionIds)!=null&&l.length&&r){const _=e.spawnedSessionIds,p=_.slice(0,3),m=_.slice(p.length).map((x,k)=>({id:x,label:$E({number:Jt(p.length+k+1)})}));return f.jsxs(f.Fragment,{children:[e.label," — ",p.map((x,k)=>f.jsxs("span",{children:[k>0&&", ",f.jsx("button",{className:"tool-target",title:n2e(),onClick:v=>{v.preventDefault(),v.stopPropagation(),r(x)},children:$E({number:Jt(k+1)})})]},x)),m.length>0&&f.jsxs(f.Fragment,{children:[", ",f.jsx(o4,{items:m,onSelect:r,targetType:fhe()})]})]})}if((u=e.runIds)!=null&&u.length){const _=s?e.runIds.filter(x=>!!s(x)):e.runIds;if(_.length===0)return e.label;const p=_.slice(0,3),m=_.slice(p.length).map(x=>({id:x,label:(s==null?void 0:s(x))||Pl()}));return f.jsxs(f.Fragment,{children:[e.label," — ",p.map((x,k)=>f.jsxs("span",{children:[k>0&&", ",t?f.jsx("button",{className:"tool-target",title:AY({run:Ne(x)}),...qr(v=>t(x,v),{stopPropagation:!0}),children:(s==null?void 0:s(x))||Pl()}):f.jsx("span",{children:(s==null?void 0:s(x))||Pl()})]},x)),m.length>0&&f.jsxs(f.Fragment,{children:[", ",f.jsx(o4,{items:m,onOpen:t,targetType:L6e()})]})]})}if((h=e.experimentIds)!=null&&h.length){const _=a?e.experimentIds.filter(x=>!!a(x)):e.experimentIds;if(_.length===0)return e.label;const p=_.slice(0,3),m=_.slice(p.length).map(x=>({id:x,label:(a==null?void 0:a(x))||Pl()}));return f.jsxs(f.Fragment,{children:[e.label," — ",p.map((x,k)=>f.jsxs("span",{children:[k>0&&", ",i?f.jsx("button",{className:"tool-target",title:uY({name:(a==null?void 0:a(x))||Ne(x)}),...qr(v=>i(x,v),{stopPropagation:!0}),children:(a==null?void 0:a(x))||Pl()}):f.jsx("span",{children:(a==null?void 0:a(x))||Pl()})]},x)),m.length>0&&f.jsxs(f.Fragment,{children:[", ",f.jsx(o4,{items:m,onOpen:i,targetType:z0e()})]})]})}return e.label}function Q6(e){const n=e.progressLabel??{skill:Yte(),read:_re(),search:Gie(),edit:cte(),project:Jre(),web:PJ(),agent:Dee(),command:YO()}[e.kind];return{...e,label:n}}function fH(e,n){const t=W_({id:"permission-preview",type:"tool",tool:e,state:{status:"running",input:n}});return{skill:Tte(),read:Cne(),search:bse(),edit:Qee(),project:Cre(),web:MJ(),agent:zee(),command:ase()}[t.kind]}function JTn(e){return e==null?!0:typeof e=="object"&&!Array.isArray(e)&&Object.keys(e).length===0}const eAn=250;function tAn(e,n){const[t,r]=T.useState(e),s=T.useRef(Date.now()),i=T.useRef(e);return T.useEffect(()=>{if(i.current=e,(e==null?void 0:e.label)===(t==null?void 0:t.label)||n&&e!=null&&t!=null)return;if(e==null||t==null){s.current=Date.now(),r(e);return}const a=eAn-(Date.now()-s.current);if(a<=0){s.current=Date.now(),r(e);return}const o=window.setTimeout(()=>{s.current=Date.now(),r(i.current)},a);return()=>window.clearTimeout(o)},[e,t,n]),e!=null&&e.label===(t==null?void 0:t.label)?e:t}const nAn=160;function dH(e){const[n,t]=T.useState(!1);return T.useEffect(()=>{if(!e){t(!1);return}const r=window.setTimeout(()=>t(!0),nAn);return()=>window.clearTimeout(r)},[e]),e&&n}function rAn(e){const n=["skill","read","search","edit","project","web","command","agent"];for(const t of n){const r=e.find(s=>s.kind===t);if(r)return r}return e[0]??{kind:"command",label:iD()}}function sAn(e,n){var t,r;return((t=e.state)==null?void 0:t.status)!=="completed"?null:JSON.stringify([n.kind,n.label,n.filePath??null,n.fileRef??null,((r=n.litCall)==null?void 0:r.kind)==="paper"?n.litCall.id??null:null,n.runIds??null,n.experimentIds??null,n.spawnedSessionIds??null])}function iAn(e){const n=[];let t=null;for(const r of e){const s=W_(r),i=sAn(r,s),a=n[n.length-1];i&&a&&t===i?a.count++:n.push({part:r,activity:s,count:1}),t=i}return n}function hH({part:e,busy:n,recovering:t,onRecover:r,usageLimited:s=!1}){var x,k;const i=(x=e.state)==null?void 0:x.input,a=(i==null?void 0:i.nextRetryAt)??null,[o,l]=T.useState(Date.now());if(T.useEffect(()=>{if(typeof a!="number"||(l(Date.now()),a<=Date.now()))return;const v=window.setInterval(()=>{const b=Date.now();l(b),b>=a&&window.clearInterval(v)},1e3);return()=>window.clearInterval(v)},[a]),e.id==="turn-retry"){const v=tkn(i??{},o);return f.jsxs("div",{className:"turn-retry-row flex items-center gap-2 py-1 px-1 text-sm text-subtext",children:[f.jsx(Rt,{}),f.jsx("span",{children:v})]})}const u=xB(i==null?void 0:i.recoveryAction),h=i==null?void 0:i.turnId,_=yB(e)?nme():s?t7e():dN(),p=s?Ibn:iS,m=wy(((k=e.state)==null?void 0:k.error)||dN());return f.jsxs("details",{className:"turn-usage-limit group/limit text-base text-subtext",children:[f.jsxs("summary",{className:"flex w-fit max-w-full items-center gap-2 cursor-pointer list-none rounded-sm focus-visible:outline-2 focus-visible:outline-text [&::-webkit-details-marker]:hidden",children:[f.jsx(p,{size:18,className:"shrink-0 text-accent-red","aria-hidden":"true"}),f.jsx("span",{children:_}),f.jsx(Da,{size:16,className:"shrink-0 text-text transition-transform duration-120 ease-standard group-open/limit:rotate-90 motion-reduce:transition-none","aria-hidden":"true"})]}),f.jsx("pre",{className:"mt-2 rounded-md bg-surface p-2 text-sm font-mono whitespace-pre-wrap wrap-anywhere",children:m}),!s&&r&&h&&(u==="retry"||u==="continue")&&f.jsx(Me,{type:"button",size:"small",className:"mt-2",disabled:n||t,onClick:()=>r(h,u),children:t?j7e():u==="retry"?Vs():Kpe()})]})}function iR({part:e,activity:n,repeatCount:t=1,onOpenFile:r,onOpenRun:s,onOpenSpawnedSession:i,runExperimentName:a,onOpenExperiment:o,experimentName:l}){const u=e.state,h=(u==null?void 0:u.status)==="error",_=wy((u==null?void 0:u.error)||(u==null?void 0:u.output)||""),p=h&&!!_,[m,x]=T.useState(!1),k=`tool-error-${e.id.replace(/[^A-Za-z0-9_-]/g,"-")}`;if(e.tool==="error")return f.jsx(hH,{part:e,busy:!1,recovering:!1,usageLimited:X3(e)});const v=f.jsxs(f.Fragment,{children:[h&&f.jsxs("span",{className:"sr-only",children:[Ak()," "]}),h?f.jsx("span",{className:"flex h-6 shrink-0 items-center text-accent-red",children:f.jsx(mI,{size:16,strokeWidth:1.75,className:"tool-kind-icon","aria-hidden":"true"})}):f.jsx(Xv,{activity:n,className:"text-muted"}),f.jsxs("span",{className:`${tH} ${h?"text-accent-red":"text-subtext"}`,children:[f.jsx($5,{activity:n,onOpenFile:r,onOpenRun:s,onOpenSpawnedSession:i,runExperimentName:a,onOpenExperiment:o,experimentName:l}),t>1&&f.jsxs("span",{className:"tool-repeat-count ms-1 text-muted font-normal",title:UX({count:Jt(t)}),children:["×",t]})]})]});return p?f.jsxs("div",{className:"tool-row tool-row-error flex flex-col min-w-0",children:[f.jsxs("div",{className:"flex items-start gap-2 w-fit max-w-full py-[3px] px-1 min-w-0 rounded-sm",children:[v,f.jsx("button",{type:"button",className:"tool-row-detail-toggle inline-flex h-6 shrink-0 items-center justify-center p-0.5 rounded-sm cursor-pointer hover:bg-surface","aria-expanded":m,"aria-controls":k,"aria-label":m?IX({activity:n.label}):ZZ({activity:n.label}),onClick:()=>x(b=>!b),children:f.jsx(Da,{size:16,className:`text-accent-red transition-transform duration-120 ease-standard ${m?"rotate-90":""}`})})]}),m&&f.jsx("div",{className:"tool-detail mt-1 me-0 mb-1 ms-6",id:k,children:f.jsx("div",{className:K6,children:_.slice(0,2e4)})})]}):f.jsx("div",{className:"tool-row flex items-start gap-2 min-w-0 py-[3px] px-1",children:v})}function aAn({parts:e,pendingTail:n,onOpenFile:t,onOpenRun:r,onOpenSpawnedSession:s,runExperimentName:i,onOpenExperiment:a,experimentName:o}){var j,M,L,I;const[l,u]=T.useState(!1),[h,_]=T.useState(!1),p=()=>{_(!0),u(B=>!B)},m=iAn(e),x=m.map(({activity:B})=>B),k=n?m.at(-1):void 0,v=k==null?void 0:k.part,b=k==null?void 0:k.activity,w=((j=v==null?void 0:v.state)==null?void 0:j.status)!=="error"?(b&&Q6(b))??null:null,y=!!v&&((M=v.state)==null?void 0:M.status)==="running"&&!(w!=null&&w.progressLabel)&&(JTn((L=v.state)==null?void 0:L.input)||(w==null?void 0:w.kind)==="command"&&!qs(((I=v.state)==null?void 0:I.input)??{},"command","cmd")),C=tAn(w,y),E=dH(C!=null),N=C??rAn(x),A=C?C.label:iD();return e.length===1?C?f.jsx("div",{className:"tool-group my-3.5 mx-0",children:f.jsxs("div",{className:"tool-row flex items-start gap-2 min-w-0 py-[3px] px-1 text-base leading-6 text-subtext",children:[f.jsx(Xv,{activity:C,className:E?"tool-running-shimmer-icon":"text-muted"}),f.jsx("span",{className:`${E?"tool-running-shimmer":""} min-w-0 line-clamp-2 break-words`,title:A,children:f.jsx($5,{activity:C,onOpenFile:t,onOpenRun:r,onOpenSpawnedSession:s,runExperimentName:i,onOpenExperiment:a,experimentName:o})})]})}):f.jsx("div",{className:"tool-group my-3.5 mx-0",children:f.jsx(iR,{part:e[0],activity:m[0].activity,onOpenFile:t,onOpenRun:r,onOpenSpawnedSession:s,runExperimentName:i,onOpenExperiment:a,experimentName:o})}):f.jsxs("div",{className:"tool-group my-3.5 mx-0",children:[f.jsxs("div",{className:"tool-group-summary flex items-start gap-2 w-fit max-w-full py-[3px] px-1 text-base leading-6 text-subtext text-start",children:[f.jsx(Xv,{activity:N,className:E?"tool-running-shimmer-icon":"text-muted"}),C?f.jsx("span",{className:`tool-group-label min-w-0 line-clamp-2 break-words ${E?"tool-running-shimmer":""}`,title:A,children:f.jsx($5,{activity:C,onOpenFile:t,onOpenRun:r,onOpenSpawnedSession:s,runExperimentName:i,onOpenExperiment:a,experimentName:o})}):f.jsx("button",{type:"button",className:"tool-group-label min-w-0 whitespace-normal break-words cursor-pointer text-start",onClick:p,"aria-expanded":l,children:A}),f.jsx("button",{type:"button",className:"tool-group-chevron-button inline-flex h-6 shrink-0 items-center justify-center p-px cursor-pointer rounded-sm",onClick:p,"aria-expanded":l,"aria-label":l?Ppe():x0e(),children:f.jsx(Da,{size:16,className:`tool-chevron text-muted transition-[transform,color] duration-120 ease-standard [&.open]:rotate-90 ${l?"open":""}`})})]}),f.jsx("div",{className:`tool-group-disclosure ${l?"open":""}`,"aria-hidden":!l,inert:!l,children:f.jsx("div",{className:"tool-group-disclosure-inner",children:f.jsx("div",{className:"tool-group-rows flex flex-col gap-px mt-0.5 me-0 mb-1 ms-6",children:h&&m.map(({part:B,count:q,activity:U})=>f.jsx(iR,{part:B,repeatCount:q,activity:U,onOpenFile:t,onOpenRun:r,onOpenSpawnedSession:s,runExperimentName:i,onOpenExperiment:a,experimentName:o},B.id))})})})]})}function oAn({part:e,onRespond:n,onOpenFile:t,onOpenPlan:r}){var h;const s=e.prompt,[i,a]=T.useState([]),o=!n,l=_=>n==null?void 0:n({promptId:e.id,..._});if(s.resolved){if(s.kind==="permission")return null;if(s.kind==="plan"){const m=s.approved===!0?{label:k2e(),icon:Ji,iconClass:"text-accent-green"}:s.approved===!1&&s.note?{label:U2e(),icon:nS,iconClass:"text-accent-amber"}:s.approved===!1?{label:T2e(),icon:_r,iconClass:"text-accent-red"}:{label:I2e(),icon:Cb,iconClass:"text-muted"},x=m.icon;return f.jsxs("details",{className:DTn,children:[f.jsxs("summary",{children:[f.jsx("span",{className:"plan-resolved-label text-base font-[375] wrap-anywhere",children:s.synthesized?oD():uN()}),f.jsx(x,{size:17,strokeWidth:1.8,className:`shrink-0 ${m.iconClass}`}),f.jsx("span",{className:"plan-resolved-label prompt-outcome text-base font-[375] wrap-anywhere",children:m.label}),f.jsx(Da,{size:12,className:"plan-chevron shrink-0 text-muted"})]}),f.jsxs("div",{className:`${tR} ms-6`,children:[f.jsx(Qo,{text:s.plan??"",onOpenFile:t}),s.note&&f.jsx("div",{className:"prompt-collapsed-note mt-1.5 italic",children:s.note})]})]})}const _=(s.answers??[]).join(", ")||s.note||"",p=(s.annotations??[]).map((m,x)=>({id:`${e.id}-annotation-${x}`,text:m.text}));return f.jsxs("div",{className:"flex flex-col items-end gap-1.5",children:[p.length>0&&f.jsx(W6,{annotations:p,variant:"sent"}),f.jsxs("details",{className:OTn,children:[f.jsxs("summary",{children:[f.jsx("span",{className:"prompt-collapsed-title font-[375] wrap-anywhere",children:s.header||s.question||zSe()}),f.jsx("span",{className:`prompt-outcome font-[375] text-subtext wrap-anywhere [&.approved]:text-accent-green [&.chosen]:text-accent-green [&.approved::before]:content-['✓_'] [&.chosen::before]:content-['✓_'] [&.revised]:text-accent-amber [&.rejected]:text-accent-amber ${_?"chosen":""}`,children:_||w6e()})]}),f.jsxs("div",{className:tR,children:[s.header&&s.question&&f.jsx("div",{className:"prompt-q text-base font-semibold leading-normal text-text",children:s.question}),(s.options??[]).length>0&&f.jsx("ul",{className:"prompt-collapsed-options mt-1.5 mx-0 mb-0 ps-4.5 [&_.sel]:text-text [&_.sel]:font-medium",children:(s.options??[]).map(m=>{var x;return f.jsx("li",{className:(x=s.answers)!=null&&x.includes(m.label)?"sel":"",children:m.label},m.label)})}),s.note&&s.note!==_&&f.jsx("div",{className:"prompt-collapsed-note mt-1.5 italic",children:s.note})]})]})]})}if(s.kind==="plan"){const _=!!r;return f.jsxs("div",{className:`prompt-card my-2 mx-0 py-3 px-3.5 border border-border border-s-[3px] border-s-border rounded-sm bg-surface flex flex-col gap-[9px] [&.plan]:border-s-accent-blue [&.permission]:border-s-accent-amber [&.question]:border-s-accent-purple [&.readonly]:opacity-60 plan ${o?"readonly":""}`,children:[f.jsx("div",{className:"prompt-head text-base font-semibold text-text",children:s.synthesized?pSe():uN()}),f.jsx("div",{className:`prompt-plan text-base leading-[1.6] text-text max-h-85 overflow-y-auto [&.clamped]:max-h-[9.5em] [&.clamped]:overflow-hidden [&.clamped]:relative [&.clamped::after]:content-[''] [&.clamped::after]:absolute [&.clamped::after]:inset-x-0 [&.clamped::after]:bottom-0 [&.clamped::after]:top-auto [&.clamped::after]:h-8.5 [&.clamped::after]:bg-[linear-gradient(to_bottom,_transparent,_var(--surface))] [&.clamped::after]:pointer-events-none ${_?"clamped":""}`,children:f.jsx(Qo,{text:s.plan??"",onOpenFile:t})}),_&&f.jsx("button",{className:"prompt-plan-open self-start border-0 bg-transparent text-accent-blue text-sm p-0 cursor-pointer [&:hover]:underline",...qr(p=>r(s.plan??"",e.id,p)),children:wke()}),!o&&!_&&f.jsxs("div",{className:L5,children:[f.jsx(Me,{size:"small",variant:"primary",onClick:()=>l({approve:!0,resumeMode:"auto"}),children:cge()}),f.jsx(Me,{size:"small",onClick:()=>l({approve:!0,resumeMode:"bypassPermissions"}),children:mge()}),f.jsx(Me,{size:"small",onClick:()=>l({approve:!1}),children:$we()})]})]})}if(s.kind==="permission"){const _=s.toolInput??{},p=qs(_,"command","cmd","filePath","file_path","path")||"",m=typeof((h=s.toolInput)==null?void 0:h.reason)=="string"&&s.toolInput.reason||"",x=qs(_,"description")||"",k=m||x||fH(s.tool,_),v=`permission-heading-${e.id}`;return f.jsxs("div",{className:`prompt-card permission my-3 w-full max-w-2xl overflow-hidden rounded-md border border-border bg-background shadow-hairline [&.readonly]:opacity-60 ${o?"readonly":""}`,role:"group","aria-labelledby":v,children:[f.jsxs("div",{className:"flex items-center gap-2.5 px-3.5 pt-3 pb-0",children:[f.jsx("span",{className:"flex size-7 shrink-0 items-center justify-center rounded-md bg-accent-amber-subtle text-accent-amber",children:f.jsx(iS,{size:15,strokeWidth:1.8,"aria-hidden":"true"})}),f.jsx("span",{id:v,className:"text-base font-semibold text-text",children:Uge()})]}),f.jsxs("div",{className:"flex flex-col gap-3 px-3.5 py-3",children:[f.jsx("div",{className:"prompt-sub text-base font-normal leading-normal text-text wrap-anywhere",children:k}),p&&f.jsx("code",{className:"prompt-command block max-h-36 overflow-auto whitespace-pre-wrap wrap-anywhere rounded-md border border-border-variant bg-surface px-3 py-2 font-mono text-sm leading-relaxed text-text",children:p}),!o&&f.jsxs("div",{className:"prompt-actions flex items-center justify-end gap-2 pt-0.5",children:[f.jsx(Me,{size:"small",variant:"ghost",onClick:()=>l({approve:!1}),children:eye()}),f.jsx(Me,{size:"small",variant:"primary",onClick:()=>l({approve:!0}),children:Ige()})]})]})]})}const u=_=>a(p=>s.multiSelect?p.includes(_)?p.filter(m=>m!==_):[...p,_]:[_]);return f.jsxs("div",{className:`prompt-card my-2 mx-0 py-3 px-3.5 border border-border border-s-[3px] border-s-border rounded-sm bg-surface flex flex-col gap-[9px] [&.plan]:border-s-accent-blue [&.permission]:border-s-accent-amber [&.question]:border-s-accent-purple [&.readonly]:opacity-60 question ${o?"readonly":""}`,children:[s.header&&f.jsx("div",{className:LTn,children:s.header}),s.question&&f.jsx("div",{className:"prompt-q text-base font-semibold leading-normal text-text",children:s.question}),f.jsx("div",{className:"prompt-options flex flex-col gap-1.5",children:(s.options??[]).map(_=>{const p=i.includes(_.label);return f.jsxs("button",{className:`prompt-option flex flex-col items-start gap-0.5 w-full py-2 px-[11px] text-start border border-border rounded-sm bg-background text-text cursor-pointer transition-[border-color,background] duration-80 ease-standard [&:hover:not(:disabled)]:border-border-strong [&:hover:not(:disabled)]:bg-surface [&.sel]:border-primary [&.sel]:bg-primary-subtle [&:disabled]:cursor-default ${p?"sel":""}`,disabled:o,onClick:()=>o?void 0:s.multiSelect?u(_.label):l({answers:[_.label]}),children:[f.jsx("span",{className:"prompt-option-label block text-sm font-medium",children:_.label}),_.description&&f.jsx("span",{className:"prompt-option-desc block text-sm font-normal leading-[1.45] text-subtext",children:_.description})]},_.label)})}),s.multiSelect&&!o&&f.jsx("div",{className:L5,children:f.jsx(Me,{size:"small",variant:"primary",disabled:i.length===0,onClick:()=>l({answers:i}),children:nke()})})]})}function lAn(e,n){return e.role==="user"?!0:e.parts.some(t=>nh(t,n))}function cAn(e){const n=e.text??"",t=n.startsWith("data:")?n:egn(n),r=n.startsWith("data:")?"":n.includes("__")?n.slice(n.indexOf("__")+2):n,s=e.name||r||"attachment",i=n.startsWith("data:application/pdf")||/\.pdf$/i.test(s)||/\.pdf$/i.test(n);return{src:t,isPdf:i,name:s}}function uAn({text:e,createdAt:n,count:t,index:r,prevId:s,nextId:i,onSelect:a,pagerDisabled:o,onEdit:l,editDisabled:u}){const h=t>1,_=new Date(n),p=async()=>{try{if(!navigator.clipboard)throw new Error(pD());await navigator.clipboard.writeText(e),Bn(m0(),"success")}catch(m){Bn(m instanceof Error?m.message:String(m),"error")}};return f.jsxs("div",{className:`fork-controls flex items-center gap-0.5 transition-opacity duration-80 ease-standard ${h?"opacity-100":"opacity-0 group-hover/turn:opacity-100 group-focus-within/turn:opacity-100"}`,children:[h&&f.jsxs(f.Fragment,{children:[f.jsx(Ft,{size:"small",title:nN(),"aria-label":nN(),disabled:o||!s,onClick:()=>s&&a(s),children:f.jsx(hI,{size:14})}),f.jsxs("span",{className:"fork-count text-xs text-subtext tabular-nums select-none",children:[r+1,"/",t]}),f.jsx(Ft,{size:"small",title:tN(),"aria-label":tN(),disabled:o||!i,onClick:()=>i&&a(i),children:f.jsx(Da,{size:14})})]}),f.jsxs("div",{className:"flex items-center gap-0.5 opacity-0 group-hover/turn:opacity-100 group-focus-within/turn:opacity-100 transition-opacity duration-80 ease-standard",children:[f.jsx("time",{dateTime:_.toISOString(),className:"text-xs text-subtext tabular-nums me-2",children:_.toLocaleTimeString(z(),{hour:"numeric",minute:"2-digit"})}),f.jsx(Ft,{size:"small","aria-label":Ok(),disabled:!e,onClick:p,children:f.jsx(Sb,{size:13})})]}),f.jsx(Ft,{size:"small",title:QE(),"aria-label":QE(),disabled:u,onClick:l,children:f.jsx(nS,{size:13})})]})}const _An=T.memo(function({message:n,activePermissionId:t,pendingTailToolId:r,onOpenFile:s,onOpenRun:i,onOpenSpawnedSession:a,runExperimentName:o,onOpenExperiment:l,experimentName:u,onRespond:h,onOpenPlan:_,onOpenSubagent:p,busy:m=!1,recoveringTurnId:x,onRecover:k,skills:v,predictTextTail:b=!1,forkCount:w,forkIndex:y=0,forkPrevId:C,forkNextId:E,forkDisabled:N,branchDisabled:A,onFork:j,onSelectFork:M}){var H,Y;sf();const[L,I]=T.useState(null),B=dAn(n);if(B)return f.jsx(hAn,{part:B});if(n.role==="user"){const te=n.parts.filter(ee=>ee.type==="text").map(ee=>ee.text??"").join(` +`),$=ee=>!!(v!=null&&v.some(ce=>ce.name===ee)),D=n.parts.filter(ee=>ee.type==="image"&&ee.text).map(cAn),F=D.filter(ee=>!ee.isPdf),G=D.filter(ee=>ee.isPdf),V=n.parts.filter(ee=>ee.type==="annotation"&&ee.text).map(ee=>({id:ee.id,text:ee.text??""}));if(L!==null){const ee=()=>{const ce=L.trim();!ce||N||(I(null),j(n.id,ce))};return f.jsx("div",{className:"msg-user-group ms-auto self-end flex w-full max-w-[88%] flex-col items-end gap-1.5",children:f.jsxs("div",{className:"msg-user-edit w-full bg-surface rounded-[16px] py-2.5 px-[15px] flex flex-col gap-2",children:[f.jsx("textarea",{dir:"auto",className:"w-full bg-transparent text-base text-text resize-none outline-none field-sizing-content min-h-16","aria-label":bye(),value:L,autoFocus:!0,onChange:ce=>I(ce.target.value),onKeyDown:ce=>{ce.key==="Escape"?(ce.preventDefault(),I(null)):ce.key==="Enter"&&!ce.shiftKey&&!ce.nativeEvent.isComposing&&(ce.preventDefault(),ee())}}),f.jsxs("div",{className:`${L5} justify-end`,children:[f.jsx(Me,{size:"small",onClick:()=>I(null),children:D1e()}),f.jsx(Me,{size:"small",variant:"primary",onClick:ee,disabled:N||!L.trim(),children:Y4()})]})]})})}return f.jsxs("div",{className:"msg-user-group group/turn ms-auto self-end flex max-w-[88%] flex-col items-end gap-1.5",children:[V.length>0&&f.jsx(W6,{annotations:V,variant:"sent"}),f.jsxs("div",{dir:"auto",className:"msg-user max-w-full bg-surface rounded-[16px] py-2.5 px-[15px] text-base whitespace-pre-wrap wrap-anywhere [&_.skill-chip]:align-baseline",children:[f.jsx(oTn,{text:te,isCommand:$}),F.length>0&&f.jsx("div",{className:"msg-images flex flex-wrap gap-1.5 mt-2 [&_img]:max-w-55 [&_img]:max-h-40 [&_img]:border [&_img]:border-border-variant [&_img]:rounded-xs [&_img]:block",children:F.map((ee,ce)=>f.jsx("a",{href:ee.src,target:"_blank",rel:"noreferrer",children:f.jsx("img",{src:ee.src,alt:Jhe()})},ce))}),G.length>0&&f.jsx("div",{className:"msg-files flex flex-wrap gap-1.5 mt-2",children:G.map((ee,ce)=>f.jsxs("a",{className:"msg-file inline-flex items-center gap-1.5 max-w-60 py-1.5 px-2.5 border border-border-variant rounded-sm text-text no-underline [&:hover]:border-text [&_span]:overflow-hidden [&_span]:text-ellipsis [&_span]:whitespace-nowrap",href:ee.src,target:"_blank",rel:"noreferrer",children:[f.jsx(Cb,{size:15}),f.jsx("span",{children:ee.name})]},ce))})]}),w!==void 0&&f.jsx(uAn,{text:te,createdAt:n.createdAt,count:w,index:y,prevId:C,nextId:E,onSelect:M,pagerDisabled:A,onEdit:()=>I(te),editDisabled:N})]})}const q=n.parts.find(te=>te.type==="tool"&&X3(te)),U=n.parts.find(bm)??q,W=n.parts.filter(te=>te!==U&&!(q&&X3(te)));return f.jsxs("div",{className:"msg-assistant group/turn text-base leading-[1.62] text-text min-w-0",children:[f.jsx(fAn,{message:n,parts:W,options:{activePermissionId:t,pendingTailToolId:r,onOpenFile:s,onOpenRun:i,onOpenSpawnedSession:a,runExperimentName:o,onOpenExperiment:l,experimentName:u,onRespond:h,onOpenPlan:_,onOpenSubagent:p,predictTextTail:b}}),U&&f.jsx(hH,{part:U,usageLimited:!!q,busy:m,recovering:x===((Y=(H=U.state)==null?void 0:H.input)==null?void 0:Y.turnId),onRecover:k})]})});function fAn({message:e,parts:n,options:t}){const r=t.predictTextTail??!1,{work:s,answer:i}=ekn(n,r),[a,o]=T.useState(!1),[,l]=T.useState(0);if(T.useEffect(()=>{if(!r||e.completedAt!=null||s.length===0)return;const p=window.setInterval(()=>l(m=>m+1),1e3);return()=>window.clearInterval(p)},[r,e.completedAt,s.length]),s.length===0)return f.jsx(f.Fragment,{children:Q1(i,t)});const u=e.completedAt??(r?Date.now():null),h=u===null?null:u-e.createdAt,_=h===null?null:h<6e4||h>=36e5?g0(h):c8e({minutes:Jt(Math.floor(h/6e4)),seconds:Jt(Math.floor(h/1e3)%60)});return f.jsxs(f.Fragment,{children:[f.jsxs("div",{className:"turn-work mb-4",children:[f.jsxs("button",{type:"button",className:"flex w-full items-center gap-1.5 border-b border-border/50 pb-2 text-start text-base text-subtext cursor-pointer hover:text-text focus-visible:outline-2 focus-visible:outline-primary","aria-expanded":a,"data-work-toggle":!0,onClick:()=>o(p=>!p),children:[f.jsx("span",{children:_===null?n8e():m8e({duration:_})}),f.jsx(Da,{size:16,className:`shrink-0 text-muted transition-transform duration-200 ease-standard motion-reduce:transition-none ${a?"rotate-90":""}`})]}),f.jsx("div",{className:`tool-group-disclosure ${a?"open":""}`,"aria-hidden":!a,inert:!a,children:f.jsx("div",{className:"tool-group-disclosure-inner",children:f.jsx("div",{className:"turn-work-content pt-4",children:Q1(s,{...t,predictTextTail:!1,pendingTailToolId:null})})})})]}),f.jsx("div",{className:"turn-answer",children:Q1(i,t)})]})}function dAn(e){const n=e.parts.length===1?e.parts[0]:void 0;return e.role==="user"&&(n==null?void 0:n.type)==="tool"&&n.tool===IL?n:null}function hAn({part:e}){var l;const n=e.state,t=qs((n==null?void 0:n.input)??{},"command")??"",r=(n==null?void 0:n.status)==="running",s=(n==null?void 0:n.status)==="error",i=typeof((l=n==null?void 0:n.input)==null?void 0:l.exitCode)=="number"?n.input.exitCode:null,a=[n==null?void 0:n.output,n==null?void 0:n.error].filter(Boolean).join(` +`),o=r?YO():s&&i!==null?Npe({code:Jt(i)}):null;return f.jsx("div",{className:"msg-shell ms-auto self-end flex w-full max-w-[88%] flex-col items-stretch gap-1.5",children:f.jsxs("div",{dir:"ltr",className:"max-w-full bg-surface rounded-[16px] py-2.5 px-[15px] text-base",children:[f.jsxs("div",{className:"flex items-start gap-2 font-mono text-sm text-text whitespace-pre-wrap wrap-anywhere",children:[f.jsxs("span",{className:"sr-only",children:[nD()," "]}),f.jsx(of,{size:16,strokeWidth:1.6,className:`mt-0.5 shrink-0 ${s?"text-accent-red":"text-muted"}`,"aria-hidden":"true"}),f.jsx("span",{children:t})]}),a&&f.jsx("div",{className:`${K6} mt-2`,children:a.slice(0,2e4)}),o&&f.jsx("div",{className:`mt-1.5 text-xs ${s?"text-accent-red":"text-muted"}`,children:o})]})})}function Q1(e,n){var w,y;const{activePermissionId:t,pendingTailToolId:r,onOpenFile:s,onOpenRun:i,onOpenSpawnedSession:a,runExperimentName:o,onOpenExperiment:l,experimentName:u,onRespond:h,onOpenPlan:_,onOpenSubagent:p,predictTextTail:m=!1}=n,x=e.filter(C=>C.type!=="steer"&&nh(C,t)).at(-1),k=[];let v=[];const b=()=>{v.length!==0&&(k.push(f.jsx(aAn,{parts:v,pendingTail:v.some(C=>C.id===r),onOpenFile:s,onOpenRun:i,onOpenSpawnedSession:a,runExperimentName:o,onOpenExperiment:l,experimentName:u},`tg-${v[0].id}`)),v=[])};for(const C of e)if(nh(C,t)){if(C.type==="tool"&&(mAn(C.tool)||(((w=C.children)==null?void 0:w.length)??0)>0)){b(),k.push(f.jsx(vAn,{part:C,pendingTail:m&&((y=C.state)==null?void 0:y.status)==="running"||C.id===r,onOpenSubagent:p},C.id));continue}if(C.type==="tool"){v.push(C);continue}b(),C.type==="text"?k.push(f.jsx(Qo,{text:C.text,onOpenFile:s,onOpenRun:i,predict:m&&C.id===(x==null?void 0:x.id)},C.id)):C.type==="steer"?k.push(f.jsx("div",{dir:"auto",role:"note","aria-label":Xke(),className:"msg-steer my-2 ms-auto w-fit max-w-[88%] bg-surface rounded-[16px] py-2.5 px-[15px] text-base whitespace-pre-wrap wrap-anywhere",children:C.text},C.id)):C.type==="prompt"&&C.prompt&&k.push(f.jsx(oAn,{part:C,onRespond:h,onOpenFile:s,onOpenPlan:_},C.id))}return b(),k}function pAn(e){return W_(e).label}function mAn(e){const n=(e??"").toLowerCase();return n==="subagent"||n==="task"||n==="agent"}function pH(e){var t,r;const n=((t=e.state)==null?void 0:t.status)==="completed"?((r=e.state)==null?void 0:r.output)??"":"";return n.startsWith("Async agent launched")?"":n}function Yv(e,n){for(const t of e){if(t.id===n)return t;const r=t.children&&Yv(t.children,n);if(r)return r}return null}function gAn({spawn:e,onOpenFile:n,onOpenRun:t,runExperimentName:r,onOpenExperiment:s,experimentName:i,onOpenSubagent:a}){var x,k,v,b;const o=e.children??[],l=((x=e.state)==null?void 0:x.status)==="running",u=((k=e.state)==null?void 0:k.status)==="error",h=u?wy(((v=e.state)==null?void 0:v.error)||((b=e.state)==null?void 0:b.output)||""):"",_=Q1(o,{onOpenFile:n,onOpenRun:t,runExperimentName:r,onOpenExperiment:s,experimentName:i,onOpenSubagent:a,predictTextTail:l,pendingTailToolId:l?vB(o):null}),m=o.some(w=>w.type==="text"&&!!w.text)?"":pH(e);return f.jsxs("div",{className:"msg-assistant text-base leading-[1.62] text-text min-w-0",children:[u&&f.jsxs("span",{className:"sr-only",children:[Ak()," "]}),h&&f.jsx("div",{className:K6,children:h.slice(0,2e4)}),_.length===0&&!m&&!h?f.jsx("div",{className:"subagent-empty py-[3px] px-1 text-sm text-muted",children:l?Rk():wme()}):f.jsxs(f.Fragment,{children:[_,m&&f.jsx(Qo,{text:m,onOpenFile:n,onOpenRun:t})]})]})}function vAn({part:e,pendingTail:n,onOpenSubagent:t}){var u,h,_,p;const r=((u=e.state)==null?void 0:u.status)==="error",s=wy(((h=e.state)==null?void 0:h.error)||((_=e.state)==null?void 0:_.output)||""),i=n&&!r?Q6(W_(e)):W_(e),a=dH(!!(n&&!r)),o=(((p=e.children)==null?void 0:p.length)??0)===0&&!r&&!pH(e),l=f.jsxs(f.Fragment,{children:[r&&f.jsxs("span",{className:"sr-only",children:[Ak()," "]}),r?f.jsx("span",{className:"flex h-6 shrink-0 items-center text-accent-red",children:f.jsx(mI,{size:16,strokeWidth:1.75,className:"subagent-icon","aria-hidden":"true"})}):f.jsx(Xv,{activity:i,className:`subagent-icon ${a?"tool-running-shimmer-icon":"text-muted"}`}),f.jsx("span",{className:`${tH} ${a?"tool-running-shimmer":r?"text-accent-red":"text-subtext"}`,children:i.label})]});return o?f.jsx("div",{className:"subagent-row flex items-start gap-2 w-full my-3.5 mx-0 py-[3px] px-1 text-text text-base text-start rounded-sm",children:l}):f.jsxs("button",{className:"subagent-row flex items-start gap-2 w-full my-3.5 mx-0 py-[3px] px-1 cursor-pointer text-text text-base text-start rounded-sm [&:hover:not(:disabled)]:bg-surface [&:disabled]:cursor-default",title:r&&s?s:Xme(),...qr(m=>t==null?void 0:t(e.id,i.label,m)),disabled:!t,children:[l,f.jsx("span",{className:"subagent-row-chevron flex h-6 shrink-0 items-center text-muted",children:f.jsx(Da,{size:12})})]})}function bAn(e){const n=new Map;let t;for(let s=e.length-1;s>=0;s--)if(e[s].role==="assistant"){t=e[s];break}if(!t)return{messageId:"",states:n};const r=(s,i)=>{var a,o;for(const l of s){const u=`${i}/${l.id}`;l.type==="tool"&&((a=l.state)!=null&&a.status)&&n.set(u,{status:l.state.status,part:l}),(o=l.children)!=null&&o.length&&r(l.children,u)}};return r(t.parts,t.id),{messageId:t.id,states:n}}function X6(e){const n=(t,r)=>{var s;for(const i of t){const a=i.prompt;if(i.type==="prompt"&&(a==null?void 0:a.kind)==="permission"&&!a.resolved){const o=a.toolInput??{},u=qs(o,"reason","description")||fH(a.tool,o);return{id:i.id,path:`${r}/${i.id}`,label:u}}if((s=i.children)!=null&&s.length){const o=n(i.children,`${r}/${i.id}`);if(o)return o}}return null};for(const t of e){if(t.role!=="assistant")continue;const r=n(t.parts,t.id);if(r)return r}return null}function yAn(e){const[n,t]=T.useState({text:"",sequence:0}),r=T.useRef(null);return T.useEffect(()=>{var x,k,v,b,w;const s=((x=e[0])==null?void 0:x.id)??"",{messageId:i,states:a}=bAn(e),o=X6(e);if(!r.current||r.current.transcript!==s){r.current={transcript:s,messageId:i,states:a,permissionPath:(o==null?void 0:o.path)??null},t(y=>({text:o?AE({label:qo(o.label)}):"",sequence:y.sequence+1}));return}const l=r.current.messageId===i?r.current.states:new Map,u=r.current.permissionPath,h=[...a].filter(([y,C])=>{var E;return((E=l.get(y))==null?void 0:E.status)!==C.status});if(r.current={transcript:s,messageId:i,states:a,permissionPath:(o==null?void 0:o.path)??null},o&&o.path!==u){t(y=>({text:AE({label:qo(o.label)}),sequence:y.sequence+1}));return}const _=(k=h.find(([,y])=>bm(y.part)))==null?void 0:k[1].part;if((_==null?void 0:_.id)==="turn-recovery"){const y=xB((b=(v=_.state)==null?void 0:v.input)==null?void 0:b.recoveryAction);t(C=>({text:`${Woe()}${y?` ${y==="retry"?doe():aoe()}`:""}`,sequence:C.sequence+1}));return}if((_==null?void 0:_.id)==="turn-retry"){t(y=>({text:Jae(),sequence:y.sequence+1}));return}const p=h.filter(([,y])=>y.status==="error");if(p.length>0){const y=p.slice(0,2).map(([,C])=>W_(C.part).label).join(", ");t(C=>({text:p.length===1?Ooe({labels:y}):Foe({count:Jt(p.length),labels:y}),sequence:C.sequence+1}));return}const m=h.filter(([,y])=>y.status==="running");if(m.length>0){const y=(w=m.at(-1))==null?void 0:w[1].part;t(C=>({text:y?Q6(W_(y)).label:yoe(),sequence:C.sequence+1}));return}h.some(([,y])=>y.status==="completed")&&t(y=>({text:Noe(),sequence:y.sequence+1}))},[e]),n}const xAn=T.memo(function({messages:n,scrollRef:t,scrollToEndRef:r,stickToBottom:s,onPinToBottom:i,allMessages:a,canFork:o,onFork:l,onSelectFork:u,busy:h,onOpenFile:_,onOpenRun:p,onOpenSpawnedSession:m,runExperimentName:x,onOpenExperiment:k,experimentName:v,onRespond:b,onOpenPlan:w,onOpenSubagent:y,recoveringTurnId:C,onRecover:E,skills:N}){var $,D,F;sf();const A=(($=X6(n))==null?void 0:$.id)??null,j=T.useMemo(()=>n.filter(G=>lAn(G,A)),[n,A]),M=T.useMemo(()=>{const G=j.filter(V=>V.role==="user"&&!V.id.startsWith(M_));return X5n(a,n,G,V=>V.startsWith(M_))},[n,j,a]),L=T.useRef(new Set),[I,B]=T.useState(!1),q=T.useCallback(G=>j[G].id,[j]),U=T.useCallback(G=>{if(I)return j.map((ee,ce)=>ce);const V=new Set(mB(G));return j.forEach((ee,ce)=>{L.current.has(ee.id)&&V.add(ce)}),[...V].sort((ee,ce)=>ee-ce)},[j,I]),W=K5n({count:j.length,useFlushSync:!1,getScrollElement:()=>t.current,getItemKey:q,estimateSize:()=>400,overscan:1,initialRect:{width:((D=t.current)==null?void 0:D.clientWidth)??0,height:((F=t.current)==null?void 0:F.clientHeight)??0},initialOffset:()=>{var G;return Math.max(0,j.length*400-(((G=t.current)==null?void 0:G.clientHeight)??0))},anchorTo:s.current?"end":"start",followOnAppend:!0,scrollEndThreshold:60,rangeExtractor:U});T.useLayoutEffect(()=>{const G=()=>W.scrollToEnd();return r.current=G,i(),()=>{r.current=null}},[W,r,i]),T.useEffect(()=>{const G=()=>{var ce;const V=window.getSelection();if(!V||V.isCollapsed||!V.rangeCount)return;const ee=V.getRangeAt(0);for(const ae of((ce=t.current)==null?void 0:ce.querySelectorAll("[data-message-id]"))??[])ee.intersectsNode(ae)&&ae.dataset.messageId&&L.current.add(ae.dataset.messageId)};return document.addEventListener("selectionchange",G),()=>document.removeEventListener("selectionchange",G)},[t]);const H=j.at(-1),Y=yAn(n),te=h?bB(n):null;return f.jsxs(f.Fragment,{children:[f.jsx("span",{className:"sr-only",role:"status","aria-live":"polite",children:f.jsx("span",{children:Y.text},Y.sequence)}),f.jsx("button",{type:"button",className:"sr-only focus:not-sr-only","aria-pressed":I,onClick:()=>B(G=>!G),children:p7e()}),f.jsx("div",{className:"relative",style:{height:W.getTotalSize()},children:W.getVirtualItems().map(G=>{var re,X,oe,le,_e,pe;const V=j[G.index],ee=V.parts.find(bm),ce=(X=(re=ee==null?void 0:ee.state)==null?void 0:re.input)==null?void 0:X.turnId,ae=ee?h||C!==null:!1;return f.jsx("div",{"data-index":G.index,"data-message-id":V.id,ref:W.measureElement,className:"absolute left-0 w-full pb-4",style:{top:G.start},onClickCapture:Ee=>{!(Ee.target instanceof Element)||!Ee.target.closest("[data-work-toggle]")||(s.current=!1,W.setOptions({...W.options,anchorTo:"start"}))},onPointerDownCapture:()=>L.current.add(V.id),onFocusCapture:()=>L.current.add(V.id),children:f.jsx(_An,{message:V,forkCount:(oe=M.get(V.id))==null?void 0:oe.count,forkIndex:(le=M.get(V.id))==null?void 0:le.index,forkPrevId:(_e=M.get(V.id))==null?void 0:_e.prevId,forkNextId:(pe=M.get(V.id))==null?void 0:pe.nextId,forkDisabled:!o,branchDisabled:h,onFork:l,onSelectFork:u,activePermissionId:A,pendingTailToolId:(te==null?void 0:te.messageId)===V.id?te.toolId:null,onOpenFile:_,onOpenRun:p,onOpenSpawnedSession:m,runExperimentName:x,onOpenExperiment:k,experimentName:v,onRespond:b,onOpenPlan:w,onOpenSubagent:y,busy:ae,recoveringTurnId:ce===C?C:null,onRecover:E,skills:N,predictTextTail:h&&V===H&&V.role==="assistant"})},V.id)})})]})}),wAn=(e,n)=>e==="all"?!0:e==="archived"?n:!n,mH=[{id:"active",label:kge,railLabel:lD},{id:"archived",label:HE,railLabel:HE},{id:"all",label:Tge,railLabel:tD}];function kAn({value:e,onChange:n}){const{open:t,setOpen:r,ref:s}=_o();return f.jsxs("div",{className:"rail-filter relative inline-flex",ref:s,children:[f.jsx(Ft,{size:"small",className:"rail-filter-btn",active:e!=="active",title:JE(),"aria-label":JE(),onClick:()=>r(i=>!i),children:f.jsx(zI,{size:13})}),t&&f.jsx("div",{className:"option-menu absolute bottom-[calc(100%_+_8px)] start-0 max-h-95 flex flex-col bg-background border border-border rounded-lg shadow-menu z-50 overflow-hidden min-w-47.5 p-1.5 [&.align-right]:start-auto [&.align-right]:end-0 [&.drop-down]:bottom-auto [&.drop-down]:top-[calc(100%_+_4px)] [&.session-menu]:start-auto [&.session-menu]:end-1.5 [&.session-menu]:top-[calc(100%_-_2px)] [&.session-menu]:min-w-35 drop-down align-right",children:mH.map(i=>f.jsxs(nr,{onClick:()=>{n(i.id),r(!1)},children:[f.jsx("span",{children:i.label()}),e===i.id&&f.jsx(Ji,{size:13})]},i.id))})]})}const SAn=14,CAn=500,EAn=1200;function gH({title:e,animate:n}){return n?f.jsx("span",{className:"title-reveal","aria-label":e,children:Array.from(e).map((t,r)=>t===" "?f.jsx("span",{"aria-hidden":!0,children:t},r):f.jsx("span",{"aria-hidden":!0,className:"title-reveal-char inline-block animate-[title-char-in_240ms_ease-out_both] [@media((prefers-reduced-motion:_reduce))]:animate-none",style:{animationDelay:`${Math.min(r*SAn,CAn)}ms`},children:t},r))}):f.jsx(f.Fragment,{children:e})}function NAn({session:e,active:n,unread:t,busy:r,waiting:s,revealTitle:i,onOpen:a,onRename:o,onSetArchived:l,onDelete:u}){var E;const{open:h,setOpen:_,ref:p}=_o(),m=((E=e.title)==null?void 0:E.trim())||"Untitled",[x,k]=T.useState(!1),[v,b]=T.useState(""),w=T.useRef(null);function y(){var N;b(((N=e.title)==null?void 0:N.trim())||""),k(!0)}function C(){var A;const N=v.trim();k(!1),N&&N!==(((A=e.title)==null?void 0:A.trim())||"")&&o(N)}return T.useEffect(()=>{var N,A;x&&((N=w.current)==null||N.focus(),(A=w.current)==null||A.select())},[x]),f.jsxs("div",{ref:p,role:"button",tabIndex:0,className:`session-row relative flex items-center gap-2 w-full text-start py-[7px] px-2.5 rounded-md text-sm text-text cursor-pointer select-none [&:hover:not(.active)]:bg-surface [&.active]:bg-panel [&.active]:font-medium [&_.session-dot:empty]:hidden [&_.session-dot]:w-4 [&_.session-dot]:inline-flex [&_.session-dot]:items-center [&_.session-dot]:justify-center [&_.session-dot]:shrink-0 [&_.session-title]:flex-1 [&_.session-title]:min-w-0 [&_.session-title]:overflow-hidden [&_.session-title]:[mask-image:linear-gradient(to_right,black_calc(100%_-_16px),transparent)] [&_.session-title]:whitespace-nowrap [&_.session-menu-btn]:hidden [&_.session-menu-btn]:items-center [&_.session-menu-btn]:justify-center [&_.session-menu-btn]:w-4 [&_.session-menu-btn]:h-4 [&_.session-menu-btn]:-my-0.5 [&_.session-menu-btn]:mx-0 [&_.session-menu-btn]:rounded-sm [&_.session-menu-btn]:text-muted [&_.session-menu-btn]:shrink-0 [&_.session-menu-btn:hover]:text-text [&_.session-menu-btn:hover]:bg-panel [&:hover_.session-menu-btn]:inline-flex [&:focus-visible_.session-menu-btn]:inline-flex [&_.session-menu-btn:focus-visible]:inline-flex [&.menu-open_.session-menu-btn]:inline-flex [&:hover_.session-dot]:hidden [&:focus-visible_.session-dot]:hidden [&:has(.session-menu-btn:focus-visible)_.session-dot]:hidden [&.menu-open_.session-dot]:hidden [&_.busy-dot]:w-[7px] [&_.busy-dot]:h-[7px] [&_.busy-dot]:rounded-full [&_.busy-dot]:bg-primary [&_.busy-dot]:animate-[or-pulse_1.2s_infinite] [&_.busy-dot]:shrink-0 [&_.unread-dot]:w-[7px] [&_.unread-dot]:h-[7px] [&_.unread-dot]:rounded-full [&_.unread-dot]:bg-primary [&_.unread-dot]:shrink-0 [&_.busy-dot.waiting]:animate-none [&_.session-title-input]:flex-1 [&_.session-title-input]:min-w-0 [&_.session-title-input]:py-px [&_.session-title-input]:px-[5px] [&_.session-title-input]:-my-0.5 [&_.session-title-input]:mx-0 [&_.session-title-input]:[font:inherit] [&_.session-title-input]:text-text [&_.session-title-input]:bg-background [&_.session-title-input]:border [&_.session-title-input]:border-primary [&_.session-title-input]:rounded-sm [&_.session-title-input]:outline-none [&.editing]:bg-surface [&.editing]:cursor-default [&.editing_.session-menu-btn]:hidden [&.editing_.session-dot]:hidden ${n?"active":""} ${t?"unread":""} ${h?"menu-open":""} ${x?"editing":""}`,title:`${qp[e.harness]}${e.model?` · ${e.model}`:""}${e.parentSessionId?w7e():""}`,onClick:()=>{x||(h?_(!1):a())},onKeyDown:N=>{N.target===N.currentTarget&&(N.key==="Enter"||N.key===" ")&&(N.preventDefault(),h?_(!1):a())},children:[e.parentSessionId&&!x&&f.jsx(aS,{className:"text-muted shrink-0",size:12,"aria-hidden":!0}),x?f.jsx("input",{ref:w,className:"session-title-input","aria-label":h3e(),value:v,onChange:N=>b(N.target.value),onClick:N=>N.stopPropagation(),onBlur:C,onKeyDown:N=>{N.stopPropagation(),N.key==="Enter"?(N.preventDefault(),C()):N.key==="Escape"&&(N.preventDefault(),k(!1))}}):f.jsx("span",{className:"session-title",children:f.jsx(gH,{title:m,animate:i!==void 0},i??"static")}),f.jsx("span",{className:"session-dot",children:r?f.jsx("span",{className:`busy-dot ${s?"waiting":""}`}):t&&f.jsx("span",{className:"unread-dot"})}),f.jsx("button",{className:"session-menu-btn",title:oN(),"aria-label":oN(),onClick:N=>{N.stopPropagation(),_(A=>!A)},children:f.jsx(Jk,{size:14})}),h&&f.jsxs("div",{className:"option-menu absolute bottom-[calc(100%_+_8px)] start-0 max-h-95 flex flex-col bg-background border border-border rounded-lg shadow-menu z-50 overflow-hidden min-w-47.5 p-1.5 [&.align-right]:start-auto [&.align-right]:end-0 [&.drop-down]:bottom-auto [&.drop-down]:top-[calc(100%_+_4px)] [&.session-menu]:start-auto [&.session-menu]:end-1.5 [&.session-menu]:top-[calc(100%_-_2px)] [&.session-menu]:min-w-35 drop-down session-menu",children:[f.jsx(nr,{onClick:N=>{N.stopPropagation(),_(!1),y()},children:f.jsx("span",{children:sD()})}),f.jsx(nr,{onClick:N=>{N.stopPropagation(),_(!1),l(!e.archived)},children:f.jsx("span",{children:e.archived?LCe():Rhe()})}),f.jsx(nr,{danger:!0,onClick:N=>{N.stopPropagation(),_(!1),u()},children:f.jsx("span",{children:rD()})})]})]})}const aR=[dI,NI,of,Jd],zAn=()=>[{title:F3e(),prompt:O3e()},{title:t5e(),prompt:W3e()},{title:p5e(),prompt:l5e()},{title:j5e(),prompt:w5e()}],l4=[{box:"border-accent-blue/45",icon:"text-accent-blue"},{box:"border-accent-green/45",icon:"text-accent-green"},{box:"border-accent-amber/45",icon:"text-accent-amber"},{box:"border-primary/45",icon:"text-primary"}],oR="mt-7 grid w-full max-w-readable grid-cols-1 gap-3 sm:grid-cols-2";function jAn({projectId:e,projectName:n,railHeader:t,railOpen:r,onShowRail:s,mainView:i,onSelectMainView:a,onOpenFile:o,onOpenRun:l,runExperimentName:u,onOpenExperiment:h,experimentName:_,onOpenPlan:p,onOpenSubagent:m,runtime:x,onOpenDemoWelcome:k,composerFocusNonce:v=0,demoRunningRunId:b=null,activeSessionId:w,onActiveSessionChange:y,preferredAgent:C,onPreferredAgentChange:E,children:N}){var Fu,Jr,ti,gi,Hu,Ua;const A=hn({mutationFn:ne=>Xmn(...ne)}),j=hn({mutationFn:ne=>Qmn(...ne)}),M=hn({mutationFn:ne=>Gmn(...ne)}),L=hn({mutationFn:ne=>Kmn(...ne)}),I=hn({mutationFn:ne=>Wmn(...ne)}),B=hn({mutationFn:Vmn}),q=T.useMemo(()=>Aa(e),[e]),{data:U=ITn}=ft(q),W=T.useCallback(ne=>{Xr(q.queryKey,be=>{if(!be)return;const De=typeof ne=="function"?ne(be):ne,$e=new Map(be.map(Ke=>[Ke.id,Ke]));for(const Ke of De)$e.get(Ke.id)!==Ke&&Ja(rt,q.queryKey,Ke.id),$e.delete(Ke.id);for(const Ke of $e.keys())Ja(rt,q.queryKey,Ke);return De})},[q]),H=w,Y=T.useRef(y);Y.current=y;const te=T.useRef({projectId:e});te.current.projectId!==e&&(te.current={projectId:e});const[$,D]=T.useState(new Set),[F,G]=T.useState("active"),[V,ee]=T.useState(""),[ce,ae]=T.useState(!1),[re,X]=T.useState(!1),[oe,le]=T.useState([]),_e=T.useRef(0),pe=T.useRef({projectId:e,activeId:H,mainView:i});(pe.current.projectId!==e||pe.current.activeId!==H||pe.current.mainView!==i)&&(pe.current={projectId:e,activeId:H,mainView:i});const[Ee,Ie]=T.useState([]),[ze,He]=T.useState(null),Oe=H??"new",Xe=T.useRef(new Map),_t=T.useRef(dw);_t.current={draft:V,attachments:Ee,annotations:oe};const Vt=e===Sp&&U.length>0&&U.every(ne=>Bpn[ne.id]===ne.activeLeafId)?gz:null,$t=T.useRef(null);Vt!==null&&$t.current===null&&H!==null&&($t.current=Oe);const jt=Oe===$t.current?Vt:null;T.useLayoutEffect(()=>{const ne=Xe.current.get(Oe)??dw;return _t.current=ne,ee(ne.draft),Ie(ne.attachments),le(ne.annotations),()=>{const be=skn(_t.current,jt);be?Xe.current.set(Oe,be):Xe.current.delete(Oe)}},[Oe,jt]);const[mt,we]=T.useState(null),ct=T.useRef(Promise.resolve()),ye=T.useRef(0),je=T.useRef(0),[qe,at]=T.useState(null),nt=T.useRef(null),Kt=T.useRef(!1),Qe=T.useRef(null),[kt,Tt,Yt]=Dgn(e,i==="chat"?H:null),{data:tn=AAn}=ft(yu()),[rr,rn]=T.useState(C);T.useEffect(()=>rn(C),[C]);const[ln,An]=T.useState({}),[Un,Yn]=T.useState(Dp),[fr,Yr]=T.useState(null),zr=T.useRef(!1),St=T.useRef(null),[cn,jn]=T.useState(null),fn=T.useRef(!1),Dn=T.useRef(null),[mn,Gn]=T.useState(new Map),Rn=T.useRef(new Map),yt=T.useRef(null),Dt=T.useRef(null),Ue=T.useRef(null),gt=T.useRef(!0),[ur,un]=T.useState(!0),Lt=T.useRef(null),Kn=_o(),mr=T.useCallback(ne=>{var be;_e.current+=1,le(De=>[...De,{id:`annotation-${_e.current}`,...ne}]),(be=Lt.current)==null||be.focus()},[]),gr=jTn(Dt,mr);TTn(oe),T.useEffect(()=>{gr.dismiss()},[H,e,gr.dismiss]);const[ho,Qs]=T.useState(0),[Xs,xs]=T.useState(!1),[Ai,Ur]=T.useState(0),Ys=T.useRef(!1);function Zs(ne){if(!Ln)return;if(ne.source==="command"&&ne.name==="plan"){dc(V,Ln);return}const be=M5(ne.name,Lt.current),De=eTn(V,Ln,ne.name,be);ee(De.text),window.requestAnimationFrame(()=>{var $e,Ke;($e=Lt.current)==null||$e.focus(),(Ke=Lt.current)==null||Ke.setSelectionRange(De.cursor,De.cursor),Ur(De.cursor)})}function sr(ne){if(Mi)return!1;const be=ne.selectionStart;if(Ys.current||be!==ne.selectionEnd)return!1;const De=V.slice(0,be).replace(/[ \t]+$/,"").length,$e=t4(V,De);if(!$e||$e.end!==De||!$i($e.query)||be>De&&be-De!==M5($e.query,ne))return!1;const Ke=WA(V,{...$e,end:be});return ee(Ke.text),Ur(Ke.cursor),window.requestAnimationFrame(()=>ne.setSelectionRange(Ke.cursor,Ke.cursor)),!0}function fa(ne){He(null);let $e=Ee.reduce((Ke,Nn)=>Ke+Nn.size,0);for(const Ke of ne){if(!/^(image\/(png|jpeg|gif|webp)|application\/pdf)$/.test(Ke.type))continue;if(Ke.size>31457280){He(ape({name:Ne(Ke.name)}));continue}if($e+Ke.size>41943040){He(dpe());continue}$e+=Ke.size;const Nn=H,Tn=new FileReader;Tn.onload=()=>{const Tr={dataUrl:Tn.result,mediaType:Ke.type,name:Ke.name,size:Ke.size};if(pe.current.activeId===Nn){Ie(br=>[...br,Tr]);return}const xn=Xe.current.get(Nn??"new")??dw;Xe.current.set(Nn??"new",{...xn,attachments:[...xn.attachments,Tr]})},Tn.readAsDataURL(Ke)}}function al(ne){const be=Array.from(ne.clipboardData.items).filter(De=>De.kind==="file"&&(De.type.startsWith("image/")||De.type==="application/pdf")).map(De=>De.getAsFile()).filter(De=>De!==null);be.length>0&&(ne.preventDefault(),fa(be))}const Ut=U.find(ne=>ne.id===H),us=rr??o2n(tn),Dr=Ut?{harness:Ut.harness,model:ln.model??Ut.model,serviceTier:ln.serviceTier!==void 0?ln.serviceTier:Ut.serviceTier,permissionMode:ln.permissionMode??Ut.permissionMode,reasoningLevel:ln.reasoningLevel??Ut.reasoningLevel}:us?{...us,...ln}:null,{data:Ia=TAn}=ft(Egn(Dr==null?void 0:Dr.harness)),ot=Dr?tn.find(ne=>ne.id===Dr.harness):void 0,Wt=ot==null?void 0:ot.options,Ri=T.useMemo(()=>tTn(Ia,Wt==null?void 0:Wt.planActivation),[Ia,Wt==null?void 0:Wt.planActivation]),da=YA(V),ws=da!==null,Ln=t4(V,Ai),hi=(Ln==null?void 0:Ln.query)??null,fc=hi===null?[]:Ri.filter(ne=>ne.name.startsWith(hi)||ne.plugin&&`${ne.plugin}:${ne.name}`.toLowerCase().startsWith(hi)),Mi=!ws&&hi!==null&&(Ln==null?void 0:Ln.end)===Ai&&fc.length>0,ks=Mi&&!Xs?fc:[],Oi=ks.length>0,Zr=Math.min(ho,Math.max(0,ks.length-1));T.useEffect(()=>Qs(0),[hi]);const vr=Dr&&ot&&ot.models.length>0&&!ot.models.some(ne=>ne.id===Dr.model)?ot.models[0].id:(Dr==null?void 0:Dr.model)??null,Qt=Dr&&{...Dr,model:vr,serviceTier:wv(ot,vr,Dr.serviceTier),reasoningLevel:RL(ot,vr,Dr.reasoningLevel)},Is=wb(ot,Qt==null?void 0:Qt.model),_s=ne=>{if(!Qt)return;const be={...Qt,...ne},De={};ne.model!==void 0&&ne.model!==Qt.model&&(De.model=ne.model),ne.serviceTier!==void 0&&ne.serviceTier!==Qt.serviceTier&&(De.serviceTier=ne.serviceTier),ne.permissionMode!==void 0&&ne.permissionMode!==Qt.permissionMode&&(De.permissionMode=ne.permissionMode),ne.reasoningLevel!==void 0&&ne.reasoningLevel!==Qt.reasoningLevel&&(De.reasoningLevel=ne.reasoningLevel),Yn($e=>({...$e,...De})),rn(be),E(be).catch(()=>{}),Ut?An($e=>({...$e,...ne})):ne.harness&&ne.harness!==Qt.harness&&An({})},Lr=T.useCallback(ne=>{const be=ct.current.catch(()=>{}).then(()=>{if(!$n(q.queryKey))throw new DOMException("Workspace changed","AbortError");return ne()});return ct.current=be.then(()=>{},()=>{}),be},[q]),ir=ne=>{if(ne==="plan"&&(ot==null?void 0:ot.id)==="claude-code"?(Yn($e=>({...$e,permissionMode:ne})),An($e=>({...$e,permissionMode:ne}))):(An($e=>{const Ke={...$e};return delete Ke.permissionMode,Ke}),_s({permissionMode:ne})),!Ut)return;const be=Ut.id,De=++ye.current;we(null),Lr(()=>A.mutateAsync([be,ne])).then($e=>{W(Ke=>Ke.map(Nn=>Nn.id===$e.id?$e:Nn)),ye.current===De&&An(Ke=>{const Nn={...Ke};return delete Nn.permissionMode,Nn})}).catch(()=>{ye.current===De&&(An($e=>{const Ke={...$e};return delete Ke.permissionMode,Ke}),we(QCe()))})},Js=ne=>_s({reasoningLevel:ne}),Gr=(Qt==null?void 0:Qt.harness)==="claude-code"?Qt.permissionMode==="plan":(Wt==null?void 0:Wt.planActivation)==="command"?qe??(Ut==null?void 0:Ut.planMode)??!1:!1;T.useEffect(()=>{qe===null||(Ut==null?void 0:Ut.planMode)!==qe||(nt.current=null,at(null))},[Ut==null?void 0:Ut.planMode,qe]);async function Ss(ne){if(Yn($e=>({...$e,planMode:ne})),nt.current=ne,at(ne),!Ut)return;const be=Ut.id,De=++je.current;we(null);try{const $e=await Lr(()=>j.mutateAsync([be,ne]));W(Ke=>Ke.map(Nn=>Nn.id===$e.id?$e:Nn)),je.current===De&&(nt.current=null,at(null),we(null))}catch($e){throw je.current===De&&(nt.current=null,at(null)),$e}}async function ol(){if((Qt==null?void 0:Qt.harness)==="claude-code"){ir("auto");return}if(Ut)try{await Ss(!1)}catch{we(h0e())}}async function Ou(){const ne=!Gr;try{if((Qt==null?void 0:Qt.harness)==="claude-code")ir(ne?"plan":"auto");else if((Wt==null?void 0:Wt.planActivation)==="command")await Ss(ne);else throw new Error(q2())}catch{we(fN())}}function dc(ne,be){const De=WA(ne,be);ee(De.text),xs(!0),Ou(),window.requestAnimationFrame(()=>{var $e,Ke;($e=Lt.current)==null||$e.focus(),(Ke=Lt.current)==null||Ke.setSelectionRange(De.cursor,De.cursor),Ur(De.cursor)})}const Di=T.useCallback(async(ne=!1)=>{const be=te.current;if(be.projectId!==e||!$n(q.queryKey))return null;const De=(rt.getQueryData(q.queryKey)??[]).map($e=>$e.id);try{const $e=await rt.fetchQuery({...q,...ne?{staleTime:0}:{}});if(te.current!==be||!$n(q.queryKey))return null;const Ke=$e.filter(Tn=>!vu.has(Tn.id)),Nn=new Set(Ke.map(Tn=>Tn.id));for(const Tn of De)Nn.has(Tn)||xc(Tn);return Rn.current=new Map(Ke.map(Tn=>[Tn.id,Tn.title])),Ke}catch{return null}},[e]),po=T.useCallback(async ne=>{te.current.projectId!==e||!$n(q.queryKey)||await Promise.all([rt.fetchQuery({...Jl(ne),staleTime:0}),Di(!0)]).catch(()=>{})},[e,Di]);T.useEffect(()=>{const ne=HI();D(e===Sp?new Set([bb,yb].filter(De=>!ne.has(De))):new Set),ae(!1),X(!1),Gn(new Map),Rn.current=new Map,Di();const be=te.current;return()=>{te.current===be&&(te.current={projectId:e})}},[e,Di]),T.useEffect(()=>{Yn(Dp),Dn.current=null},[H]),T.useEffect(()=>Sv(ne=>{switch(ne.type){case"session":{if(ne.session.projectId!==e||vu.has(ne.session.id))return;const be=Rn.current.has(ne.session.id),De=Rn.current.get(ne.session.id)!==ne.session.title;Rn.current.set(ne.session.id,ne.session.title),be&&De&&ne.session.titleSource==="generated"&&(Gn($e=>{const Ke=new Map($e);return Ke.set(ne.session.id,($e.get(ne.session.id)??0)+1),Ke}),window.setTimeout(()=>{Gn($e=>{if(!$e.has(ne.session.id))return $e;const Ke=new Map($e);return Ke.delete(ne.session.id),Ke})},EAn));break}case"sessionDeleted":xc(ne.sessionId);break}}),[e]),T.useEffect(()=>Sv(ne=>{ne.type==="reconnected"&&Di(!0)}),[Di]);const mo=H?kt.messagesBySession[H]??nR:nR,Ir=H?kt.activeLeafBySession[H]??null:null;St.current=Ir;const js=T.useMemo(()=>W5n(mo,Ir),[mo,Ir]),$a=T.useRef({projectId:e,ids:kt.busySessions});T.useEffect(()=>{const ne=$a.current;$a.current={projectId:e,ids:kt.busySessions},ne.projectId===e&&D(be=>J5n(be,ne.ids,kt.busySessions,U,i==="chat"?H:null))},[e,kt.busySessions,U,H,i]);const Zn=H?kt.busySessions.has(H):!1,Ba=!Zn&&!!(ot!=null&&ot.agentReady),go=Zn&&bB(js)!=null,hc=Zn&&Z5n(js),Li=H?kt.queuedBySession[H]??[]:[],Pa=Li.some(ne=>ne.dispatchState==="retrying"),pi=Li.findIndex(ne=>ne.dispatchState==="blocked"),vo=Li.reduce((ne,be)=>be.dispatchState!=="retrying"||typeof be.nextRetryAt!="number"?ne:ne===null?be.nextRetryAt:Math.min(ne,be.nextRetryAt),null),[bo,Ii]=T.useState(()=>Date.now());T.useEffect(()=>{if(!Pa||vo===null||(Ii(Date.now()),vo<=Date.now()))return;const ne=window.setInterval(()=>{const be=Date.now();Ii(be),be>=vo&&window.clearInterval(ne)},1e3);return()=>window.clearInterval(ne)},[Pa,vo]),T.useEffect(()=>{const ne=Li.reduce((be,De)=>De.planMode??be,void 0);ne!==void 0?(Kt.current=!0,nt.current=ne,at(ne)):Kt.current&&(Kt.current=!1,nt.current=null,at(null))},[Li]);const ll=!!H&&!(H in kt.messagesBySession)&&Yt.isPending,cl=T.useMemo(()=>{const ne=new Set;for(const be of kt.busySessions)(kt.messagesBySession[be]??[]).some(De=>De.parts.some($e=>$e.type==="prompt"&&$e.prompt&&!$e.prompt.resolved&&$e.prompt.nativeId))&&ne.add(be);return ne},[kt.busySessions,kt.messagesBySession]),pc=H?cl.has(H):!1,Wn=Ut,Fa=Wn?mn.get(Wn.id):void 0,Cs=T.useMemo(()=>{var ne;for(let be=js.length-1;be>=0;be--)for(const De of js[be].parts)if(De.type==="prompt"&&((ne=De.prompt)==null?void 0:ne.kind)==="plan"&&!De.prompt.resolved)return{promptId:De.id,plan:De.prompt.plan??"",synthesized:!!De.prompt.synthesized};return null},[js]),Ct=T.useMemo(()=>H?Y5n(js,Wn==null?void 0:Wn.harness,kt.busySessions.has(H)):null,[js,Wn==null?void 0:Wn.harness,H,kt.busySessions]),jr=ws&&!Ct,$i=ne=>!Ct&&!ws&&Ri.some(be=>be.name===ne),[fs,pf]=T.useState(null),ul=fs&&fs.sessionId===H?fs:null;T.useEffect(()=>{if(!fs)return;const ne=kt.busySessions.has(fs.sessionId),be=fs.sessionId===H&&Cs&&Cs.promptId!==fs.promptId;(!ne||be)&&pf(null)},[fs,Cs,kt.busySessions,H]);const mc=T.useMemo(()=>X6(js),[js]),ha=Zn&&!!(ot!=null&&ot.supportsSteering)&&!!(ot!=null&&ot.agentReady)&&!Cs&&!Ct&&!mc&&Ee.length===0&&oe.length===0,Ha=T.useMemo(()=>p&&H?(ne,be,De)=>p(ne,H,be,De):void 0,[p,H]),gc=T.useMemo(()=>m&&H?(ne,be,De)=>m(H,ne,be,De):void 0,[m,H]),Ah=T.useMemo(()=>o&&((ne,be,De,$e,Ke)=>o(ne,H??void 0,be,De,$e,Ke)),[o,H]);T.useEffect(()=>{ye.current+=1,je.current+=1;const ne=(H?kt.queuedBySession[H]??[]:[]).reduce((be,De)=>De.planMode??be,void 0);Kt.current=ne!==void 0,nt.current=ne??null,at(ne??null),An({}),we(null)},[H]);const vc=i==="chat"&&(js.length>0||Zn),pa=(Qt==null?void 0:Qt.harness)??null,Du=(Qt==null?void 0:Qt.model)??null,ei=Yt.data?null:Yt.error,Lu=i==="chat"&&!vc&&!ll&&!ei,Iu=ft({...Ygn(e,pa??"claude-code",Du,z()),enabled:Lu&&pa!==null,subscribed:Lu&&pa!==null}),qa=(Fu=Iu.data)!=null&&Fu.blank?zAn():((Jr=Iu.data)==null?void 0:Jr.prompts)??null,Rh=pa!==null&&Iu.isPending,_l=e===Sp?"demo":"project",mf=ne=>{ee(ne),xs(!1),window.requestAnimationFrame(()=>{const be=Lt.current;be&&(be.focus(),be.setSelectionRange(ne.length,ne.length),Ur(ne.length))})};T.useEffect(()=>{jt&&(ee(ne=>ne||jt),xs(!1),Ur(jt.length))},[jt]),T.useEffect(()=>{if(v===0)return;const ne=window.requestAnimationFrame(()=>{const be=Lt.current;be&&(be.focus(),be.setSelectionRange(be.value.length,be.value.length),be.scrollIntoView({block:"nearest"}))});return()=>window.cancelAnimationFrame(ne)},[v]);const $u=T.useId(),bc=e===Sp&&V===gz&&!ce,Mh=T.useCallback(ne=>{const be=ne.scrollHeight-ne.scrollTop-ne.clientHeight<60;gt.current=be,un(be)},[]),Es=T.useCallback(()=>{var ne;gt.current=!0,un(!0),(ne=Ue.current)==null||ne.call(Ue)},[]);T.useEffect(()=>{const ne=yt.current,be=Dt.current;if(!ne||!be)return;const De=new ResizeObserver(()=>{var $e;gt.current?($e=Ue.current)==null||$e.call(Ue):un(ne.scrollHeight-ne.scrollTop-ne.clientHeight<60)});return De.observe(ne),De.observe(be),()=>De.disconnect()},[vc]);const yc=T.useCallback(ne=>{ne.currentTarget.blur(),Es()},[Es]);async function fl({queue:ne=!1}={}){var Ht,Vn,$r,Vr,As,Bi;if(eu({name:"first_action",surface:_l,action:"typed_prompt"}),fn.current)return;const be=V.trim(),De=Ct?null:nTn(be,Wt==null?void 0:Wt.planActivation),$e=!!De,Ke=!Gr,Nn=QA(Wt==null?void 0:Wt.planActivation,$e?Ke:void 0,nt.current),Tn=$e&&(ot==null?void 0:ot.id)==="claude-code"?Ke?"plan":"auto":void 0,Tr=De?De.prompt:be,xn=Ee,br=oe,Ga=br.map(_n=>({text:_n.text})),Bh=e,Ts=i;let Va=H;const ni=()=>{const _n=pe.current;return $n(q.queryKey)&&_n.projectId===Bh&&_n.activeId===Va&&_n.mainView===Ts},wo=()=>{ni()&&(ee(_n=>_n||be),Ie(_n=>_n.length?_n:xn),le(_n=>_n.length?_n:br))};if($e&&!Tr&&xn.length===0&&br.length===0){ee(""),xs(!1);try{if((ot==null?void 0:ot.id)==="claude-code")ir(Ke?"plan":"auto");else if((Wt==null?void 0:Wt.planActivation)==="command")await Ss(Ke);else throw new Error(q2())}catch{we(fN()),wo()}return}const Z=Qt?{...Qt,...Tn?{permissionMode:Tn}:{}}:null;Tn&&ir(Tn);let ge=null;const Te=nt.current;$e&&(Wt==null?void 0:Wt.planActivation)==="command"&&(ge=++je.current,nt.current=Ke,at(Ke));const Be=()=>{!ni()||ge===null||je.current!==ge||(nt.current=Te,at(Te))};if(!Tr&&xn.length===0&&br.length===0)return;if((Tr||br.length>0)&&Ct&&xn.length===0){ee(""),le([]),hl({promptId:Ct,answers:[],note:Tr||void 0,annotations:Ga}).then(_n=>{_n||wo()});return}const Re=JSON.stringify({text:Tr,images:xn.map(_n=>({mediaType:_n.mediaType,name:_n.name,dataUrl:_n.dataUrl})),annotations:Ga,settings:Z?{model:Z.model,serviceTier:Z.serviceTier,permissionMode:Z.permissionMode,planMode:Nn,reasoningLevel:Z.reasoningLevel}:null}),st=((Ht=Dn.current)==null?void 0:Ht.signature)===Re?Dn.current.id:`ct_${crypto.randomUUID()}`;if(Dn.current={signature:Re,id:st},Zn){if(!H||!(ot!=null&&ot.agentReady)){Be();return}const _n=H;ee(""),Ie([]),le([]),He(null);const $s=Z?{model:Z.model,serviceTier:Z.serviceTier,permissionMode:Z.permissionMode,planMode:(Wt==null?void 0:Wt.planActivation)==="command"?Nn??(Ut==null?void 0:Ut.planMode):Nn,reasoningLevel:Z.reasoningLevel}:{};ni()&&An({});const vi=xn.map(yr=>({mediaType:yr.mediaType,dataBase64:yr.dataUrl.slice(yr.dataUrl.indexOf(",")+1),name:yr.name}));try{(Vn=(await Lr(()=>vz(_n,Tr,$s,vi.length?vi:void 0,Ga,st,ha&&!ne&&!$e?"steer":void 0))).turn)!=null&&Vn.existing&&await po(_n),ni()&&Yn(Dp),(($r=Dn.current)==null?void 0:$r.id)===st&&(Dn.current=null)}catch{Be(),wo()}return}if(!(ot!=null&&ot.agentReady)){Be();return}if(!Z){Be();return}let it=H;try{ee(xr=>xr===V?"":xr),Ie(xr=>xr===xn?[]:xr),le(xr=>xr===br?[]:xr),He(null),fn.current=!0;try{if(!it){const Am=await gf(Z,Nn);it=Am.id,Va=Am.id}if(!$n(q.queryKey))return;const xr=Jl(it);await rt.fetchQuery({...xr,...((Vr=rt.getQueryState(xr.queryKey))==null?void 0:Vr.fetchStatus)==="fetching"?{staleTime:0}:{}})}finally{fn.current=!1}if(!$n(q.queryKey))return;Tt({type:"optimisticUser",sessionId:it,text:Tr||Vhe(),attachments:xn.map(xr=>({url:xr.dataUrl,mediaType:xr.mediaType,name:xr.name})),annotations:br}),Tt({type:"busy",sessionId:it,busy:!0}),ni()&&Es(),ni()&&F==="archived"&&G("active");const _n=Z?{model:Z.model,serviceTier:Z.serviceTier,permissionMode:Z.permissionMode,planMode:Nn,reasoningLevel:Z.reasoningLevel}:{};ni()&&An({});const $s=xn.map(xr=>({mediaType:xr.mediaType,dataBase64:xr.dataUrl.slice(xr.dataUrl.indexOf(",")+1),name:xr.name})),vi=it;if(!vi)throw new Error(l7e());(As=(await Lr(()=>vz(vi,Tr,_n,$s.length?$s:void 0,Ga,st))).turn)!=null&&As.existing&&await po(vi),ni()&&Yn(Dp),((Bi=Dn.current)==null?void 0:Bi.id)===st&&(Dn.current=null)}catch(_n){if(!$n(q.queryKey)||(wo(),Be(),!it))return;const $s=_n instanceof Error?_n.message:String(_n);if(!/session is busy/i.test($s)&&await rt.fetchQuery({...Aa(e),staleTime:0}).then(yr=>{var wf;return!!((wf=yr.find(xr=>xr.id===it))!=null&&wf.busy)}).catch(()=>!1)){ni()&&(ee(yr=>yr===Tr?"":yr),Ie(yr=>yr===xn?[]:yr),le(yr=>yr===br?[]:yr));return}Tt({type:"busy",sessionId:it,busy:!1}),Tt({type:"localError",sessionId:it,text:Q0e({error:Ne($s)})})}}async function gf(ne,be){const De=pe.current,$e=te.current,Ke=await M.mutateAsync([e,ne.harness,{model:ne.model,serviceTier:ne.serviceTier,permissionMode:ne.permissionMode,planMode:be,reasoningLevel:ne.reasoningLevel}]);return te.current===$e&&(W(Nn=>[Ke,...Nn.filter(Tn=>Tn.id!==Ke.id)]),rt.getQueryData(q.queryKey)||Di(!0)),te.current===$e&&pe.current===De&&(Y.current(Ke.id,{replace:!0}),pe.current={...De,activeId:Ke.id}),Ke}function Bu(){const ne=fTn(V);ee(ne),window.requestAnimationFrame(()=>{var be,De;(be=Lt.current)==null||be.focus(),(De=Lt.current)==null||De.setSelectionRange(ne.length,ne.length),Ur(ne.length)})}async function mi(){const ne=da;if(!ne)return;if(we(null),Zn){we(ype());return}const be=V,De=pe.current;let $e=H;const Ke=()=>{const xn=pe.current;return xn.projectId===De.projectId&&xn.activeId===$e&&xn.mainView===De.mainView},Nn=()=>{Ke()&&ee(xn=>xn||be)};ee(""),xs(!1);let Tn=H;if(!Tn){if(!(ot!=null&&ot.agentReady)||!Qt){Nn(),we(q2());return}try{const xn=QA(Wt==null?void 0:Wt.planActivation,void 0,nt.current);Tn=(await gf(Qt,xn)).id,$e=Tn,Ke()&&An({})}catch(xn){Nn();const br=xn instanceof Error?xn.message:String(xn);Ke()&&we(BE({error:Ne(br)}));return}}Ke()&&F==="archived"&&G("active");const Tr=`${M_}shell-${Date.now()}`;Tt({type:"localShell",sessionId:Tn,id:Tr,command:ne}),Ke()&&Es();try{const{message:xn}=await tgn(Tn,ne);Tt({type:"upsertMessage",sessionId:Tn,message:xn})}catch(xn){const br=xn instanceof Error?xn.message:String(xn);Tt({type:"localShell",sessionId:Tn,id:Tr,command:ne,error:BE({error:Ne(br)})})}}function vf(){H&&ign(H).catch(()=>{we(q7e())})}const Oh=T.useCallback(async(ne,be)=>{if(!(!H||zr.current)){zr.current=!0,we(null),Yr(ne);try{const De=rkn({model:Un.model,serviceTier:Un.serviceTier,permissionMode:Un.permissionMode,planMode:Un.planMode,reasoningLevel:Un.reasoningLevel}),$e=H;(await ngn($e,ne,be,De)).turn.existing&&await po($e),Yn(Dp)}catch{we(t6e())}finally{zr.current=!1,Yr(null)}}},[H,Un,po]),Dh=T.useCallback((ne,be)=>{if(!H||Zn||!(ot!=null&&ot.agentReady))return;const De=H;Tt({type:"busy",sessionId:De,busy:!0}),Es(),Lr(()=>rgn(De,ne,be)).catch($e=>{Tt({type:"busy",sessionId:De,busy:!1});const Ke=$e instanceof Error?$e.message:String($e);Tt({type:"localError",sessionId:De,text:p6e({error:Ne(Ke)})})})},[H,Zn,ot==null?void 0:ot.agentReady,Es,Lr]),Lh=T.useCallback(ne=>{if(!H||Zn)return;const be=H,De=St.current;Tt({type:"activeLeaf",sessionId:be,leafId:ne}),Lr(()=>sgn(be,ne)).catch($e=>{Tt({type:"activeLeaf",sessionId:be,leafId:De});const Ke=$e instanceof Error?$e.message:String($e);Tt({type:"localError",sessionId:be,text:X7e({error:Ne(Ke)})})})},[H,Zn,Lr]);function Pu(ne){if(!H)return;const be=H;Zmn(be,ne).then(({removed:De})=>{if(De)return po(be)}).catch(()=>we(l6e()))}async function Ih(ne){if(!H||cn)return;const be=H;we(null),jn(ne);try{await Jmn(be,ne),await po(be)}catch{we(j6e())}finally{jn(null)}}T.useEffect(()=>{if(!Zn||i!=="chat")return;function ne(be){var De;be.key!=="Escape"||be.defaultPrevented||(be.preventDefault(),vf(),(De=Lt.current)==null||De.focus())}return document.addEventListener("keydown",ne),()=>document.removeEventListener("keydown",ne)},[Zn,H,i]);function xc(ne){gb(ne),Xe.current.delete(ne),$t.current===ne&&($t.current=null),pe.current.projectId===e&&pe.current.activeId===ne&&pe.current.mainView==="chat"&&(ee(""),Ie([]),le([]),Y.current(null,{replace:!0})),D(be=>{if(!be.has(ne))return be;const De=new Set(be);return De.delete(ne),De}),Rn.current.delete(ne)}function bf(ne,be){const De=ne.archived;W($e=>$e.map(Ke=>Ke.id===ne.id?{...Ke,archived:be}:Ke)),L.mutateAsync([ne.id,be]).catch(()=>{W($e=>$e.map(Ke=>Ke.id===ne.id?{...Ke,archived:De}:Ke))})}function dl(ne,be){const De=ne.title;W($e=>$e.map(Ke=>Ke.id===ne.id?{...Ke,title:be}:Ke)),I.mutateAsync([ne.id,be]).catch(()=>{W($e=>$e.map(Ke=>Ke.id===ne.id?{...Ke,title:De}:Ke))})}async function yo(ne){var De;const be=((De=ne.title)==null?void 0:De.trim())||Fg();if(window.confirm(e0e({title:qo(be)}))){try{await B.mutateAsync(ne.id)}catch($e){Bn(o0e({title:qo(be),error:Ne($e instanceof Error?$e.message:String($e))}),"error");return}xc(ne.id)}}const hl=T.useCallback(ne=>{if(!H)return Promise.resolve(!1);const be=H;return Tt({type:"busy",sessionId:be,busy:!0}),Lr(()=>agn(be,ne)).then(()=>!0).catch(()=>!1).finally(()=>{$n(q.queryKey)&&(rt.fetchQuery({...Jl(be),staleTime:0}).catch(()=>{}),rt.fetchQuery({...Aa(e),staleTime:0}).catch(()=>{}))})},[H,e,Lr,q]),wc=U.filter(ne=>wAn(F,ne.archived)),xo=/Mac|iPhone|iPad/.test(navigator.platform),yf=xo?"⌘ ⇧ ↵":"Ctrl + Shift + ↵",xf=xo?"⌘ Enter":"Ctrl + Enter",ds=T.useCallback(()=>{G("active"),y(null)},[y]),yn=T.useCallback(ne=>{G("all"),y(ne)},[y]);T.useEffect(()=>{const ne=be=>{be.repeat||be.key!=="Enter"||!be.metaKey&&!be.ctrlKey||be.altKey||!be.shiftKey||(be.preventDefault(),ds())};return document.addEventListener("keydown",ne),()=>document.removeEventListener("keydown",ne)},[ds]);const kc=f.jsxs("aside",{className:"session-rail w-68 shrink-0 flex flex-col mt-5 me-3.5 mb-5 ms-0 bg-background min-h-0 [&_.rail-body]:flex-1 [&_.rail-body]:min-h-0 [&_.rail-body]:overflow-y-auto [&_.rail-body]:pt-0 [&_.rail-body]:pb-1 [&_.rail-body]:px-2 border border-border rounded-lg overflow-visible shadow-elevated",children:[t,f.jsxs("nav",{className:"rail-nav flex flex-col gap-0.5 p-2 shrink-0",children:[f.jsxs("button",{className:"rail-nav-item flex items-center gap-2.5 py-[7px] px-2.5 text-base text-text rounded-md text-start hover:bg-surface [&[data-tip]::after]:top-auto [&[data-tip]::after]:bottom-[calc(100%_+_6px)]","data-onboarding":"new-session","data-tip":yf,"aria-keyshortcuts":"Meta+Shift+Enter Control+Shift+Enter",onClick:ds,children:[f.jsx(yh,{size:15}),qxe()]}),f.jsxs("button",{className:`rail-nav-item flex items-center gap-2.5 py-[7px] px-2.5 text-base text-text rounded-md text-start [&:hover:not(.active)]:bg-surface [&.active]:bg-panel [&.active]:font-medium ${i==="skills"?"active":""}`,onClick:()=>a("skills"),children:[f.jsx(fI,{size:15}),cbe()]}),Xjn.map(ne=>f.jsxs("button",{className:`rail-nav-item flex items-center gap-2.5 py-[7px] px-2.5 text-base text-text rounded-md text-start [&:hover:not(.active)]:bg-surface [&.active]:bg-panel [&.active]:font-medium ${i!=="chat"&&i!=="skills"&&ne.activeTabs.includes(i)?"active":""}`,"data-onboarding":ne.id==="compute"?"nav-compute":void 0,onClick:()=>a(ne.id),children:[ne.icon,ne.label()]},ne.id))]}),f.jsxs("div",{className:"rail-section-head flex items-center justify-between shrink-0 pt-3.5 pe-2.5 pb-0 ps-4.5",children:[f.jsx("div",{className:"rail-section-label p-0 text-sm font-medium text-subtext",children:((ti=mH.find(ne=>ne.id===F))==null?void 0:ti.railLabel())??lD()}),f.jsx("div",{className:"rail-section-actions flex items-center gap-0.5",children:f.jsx(kAn,{value:F,onChange:G})})]}),f.jsxs("div",{className:"rail-body",children:[wc.map(ne=>f.jsx(NAn,{session:ne,active:ne.id===H&&i==="chat",unread:$.has(ne.id),busy:kt.busySessions.has(ne.id),waiting:cl.has(ne.id),revealTitle:mn.get(ne.id),onOpen:()=>{if(y(ne.id),e===Sp){yxn(ne.id);const be=$pn[ne.id];be&&(eu({name:"demo_experiment_started",kind:"curated",experiment:be}),eu({name:"first_action",surface:"demo",action:"open_experiment"}))}},onRename:be=>dl(ne,be),onSetArchived:be=>bf(ne,be),onDelete:()=>void yo(ne)},ne.id)),wc.length===0&&f.jsx("div",{className:"rail-empty py-1.5 px-2.5 text-sm text-muted",children:F==="archived"?jme():U.length>0?pme():Lme()})]}),f.jsx(w$,{runtime:x})]}),$h="chat-header flex items-center gap-2 py-0 px-4 bg-background shrink-0 h-12 relative z-4 w-full max-w-readable my-0 mx-auto [&::after]:content-[''] [&::after]:absolute [&::after]:top-full [&::after]:start-0 [&::after]:end-0 [&::after]:h-6 [&::after]:bg-[linear-gradient(to_bottom,_var(--base),_transparent)] [&::after]:pointer-events-none",pl=!r&&f.jsx(Ft,{title:lN(),"aria-label":lN(),onClick:s,children:f.jsx(CI,{size:20})});return i!=="chat"?f.jsxs(f.Fragment,{children:[r&&kc,f.jsxs("section",{className:"chat-pane flex-1 min-w-0 flex flex-col bg-background min-h-0",children:[!r&&f.jsx("div",{className:"flex h-12 shrink-0 items-center",children:pl}),f.jsx("div",{className:"settings-view-scroll flex-1 min-h-0 overflow-y-auto [scrollbar-gutter:stable_both-edges]",children:N})]})]}):f.jsxs(f.Fragment,{children:[r&&kc,f.jsxs("section",{className:"chat-pane flex-1 min-w-0 flex flex-col bg-background min-h-0 mt-5",children:[f.jsxs("div",{className:r?"contents":"grid shrink-0 grid-cols-[2rem_minmax(0,1fr)_2rem] items-center",children:[pl,f.jsxs("div",{className:$h,children:[f.jsx(k0,{variant:"header",title:Wn?((gi=Wn.title)==null?void 0:gi.trim())||Fg():PE(),children:Wn?f.jsx(gH,{title:((Hu=Wn.title)==null?void 0:Hu.trim())||Fg(),animate:Fa!==void 0},Fa??"static"):PE()}),k&&f.jsx(Ft,{"data-tip":FE(),"aria-label":FE(),onClick:k,children:f.jsx(lbn,{size:15})})]})]}),ei?f.jsxs("div",{className:"flex flex-1 flex-col items-center justify-center gap-3 p-5 text-subtext",role:"alert",children:[f.jsx("p",{children:ei.message}),f.jsx(Me,{onClick:()=>void Yt.refetch(),children:Vs()})]}):ll?f.jsxs("div",{className:"chat-loading flex-1 flex items-center justify-center gap-3 text-subtext text-xl p-5 [&_.spinner]:w-5.5 [&_.spinner]:h-5.5 [&_.spinner]:border-[3px]","aria-live":"polite","aria-busy":"true",children:[f.jsx(Rt,{}),f.jsx("span",{children:Lxe()})]}):vc?f.jsx("div",{className:"chat-thread flex-1 min-h-0 overflow-y-auto [scrollbar-gutter:stable_both-edges]",ref:yt,tabIndex:0,role:"region","aria-label":((Ua=Wn==null?void 0:Wn.title)==null?void 0:Ua.trim())||Fg(),onScroll:ne=>{Mh(ne.currentTarget),gr.dismiss()},children:f.jsxs("div",{className:"chat-thread-inner max-w-readable my-0 mx-auto pt-4 px-4 pb-8 flex flex-col gap-4",ref:Dt,children:[f.jsx($F,{projectId:e,sessionId:H,children:f.jsx(xAn,{scrollRef:yt,scrollToEndRef:Ue,stickToBottom:gt,onPinToBottom:Es,messages:js,allMessages:mo,canFork:Ba,onFork:Dh,onSelectFork:Lh,busy:Zn,onOpenFile:Ah,onOpenRun:l,onOpenSpawnedSession:yn,runExperimentName:u,onOpenExperiment:h,experimentName:_,onRespond:hl,onOpenPlan:Ha,onOpenSubagent:gc,recoveringTurnId:fr,onRecover:Oh,skills:Ri},H)}),Zn&&pc&&f.jsx("div",{className:"flex items-center gap-2 text-subtext text-sm pt-0.5 px-0 pb-2 italic",children:Lke()}),Zn&&!pc&&!go&&!hc&&f.jsx("div",{className:"text-base pt-0.5 px-1 pb-2",children:f.jsx("span",{className:"tool-running-shimmer",children:uCe()})})]})}):f.jsxs("div",{className:"chat-empty flex-1 flex flex-col items-center justify-center text-text p-8 text-center [&_h2]:m-0 [&_h2]:text-5xl [&_h2]:font-medium [&_h2]:tracking-[-0.015em] [&_h2]:text-text",children:[f.jsx("div",{className:"chat-empty-mark w-10.5 h-10.5 mb-5.5 [&_svg]:block [&_svg]:w-full [&_svg]:h-full",children:f.jsx(hS,{})}),f.jsx("h2",{children:qke()}),f.jsxs("div",{className:"chat-empty-project inline-flex items-center gap-[7px] mt-3 py-1.5 px-3 border border-border rounded-full text-subtext bg-surface text-lg font-medium",children:[f.jsx(q_,{size:19}),f.jsx("span",{children:n})]}),Rh&&f.jsx("div",{className:oR,role:"status","aria-live":"polite","aria-label":L5e(),"aria-busy":"true",children:aR.map((ne,be)=>f.jsxs("div",{className:`flex min-h-22 animate-pulse flex-col items-start justify-center gap-2.5 rounded-xl border bg-background px-5 py-4 ${l4[be].box}`,children:[f.jsxs("span",{className:`flex w-full items-center gap-2.5 ${l4[be].icon}`,children:[f.jsx(ne,{size:17}),f.jsx("span",{className:"h-3.5 w-2/5 rounded bg-surface-bright"})]}),f.jsx("span",{className:"h-3 w-4/5 rounded bg-surface"})]},be))}),qa&&qa.length>0&&f.jsx("div",{className:oR,role:"group","aria-label":q5e(),children:qa.map((ne,be)=>{const De=aR[be],$e=l4[be];return f.jsxs("button",{type:"button",className:`flex min-h-22 w-full min-w-0 cursor-pointer flex-col items-start justify-center gap-1.5 rounded-xl border bg-background px-5 py-4 text-start font-sans transition-colors duration-120 ease-standard hover:bg-surface ${$e.box}`,onClick:()=>{eu({name:"project_starter_clicked",slot:be+1}),eu({name:"first_action",surface:_l,action:"starter_click"}),mf(ne.prompt)},children:[f.jsxs("span",{className:"flex items-center gap-2.5 text-base font-medium text-text",children:[f.jsx(De,{size:17,className:$e.icon}),ne.title]}),f.jsx("span",{className:"w-full truncate text-sm text-subtext",children:ne.prompt})]},be)})})]}),gr.action&&f.jsxs(Me,{type:"button",size:"small",className:"chat-selection-action fixed z-50 shadow-control",style:{left:gr.action.x,top:gr.action.top,transform:"translateX(-50%)"},onMouseDown:ne=>ne.preventDefault(),onClick:gr.add,children:[f.jsx(SI,{size:14}),r1e()]}),f.jsxs("div",{className:"composer px-3 pb-5 shrink-0 relative z-4 bg-background w-full max-w-readable my-0 mx-auto [&_textarea]:border-0 [&_textarea]:bg-none [&_textarea]:bg-transparent [&_textarea]:resize-none [&_textarea]:pt-2.5 [&_textarea]:px-3 [&_textarea]:pb-1 [&_textarea]:text-base [&_textarea]:field-sizing-content [&_textarea]:min-h-18 [&_textarea]:max-h-45",children:[vc&&f.jsx(Ft,{className:`absolute bottom-full left-1/2 z-5 mb-6 h-9 w-9 -translate-x-1/2 rounded-full border border-border bg-background shadow-control transition-opacity duration-150 ease-standard ${ur?"opacity-0":"opacity-100"}`,title:_N(),"aria-label":_N(),inert:ur,onClick:yc,children:Zn&&!pc?f.jsx(Jk,{size:18,className:"tool-running-shimmer-icon"}):f.jsx(Gvn,{size:16})}),Cs&&!(ul&&Cs.promptId===ul.promptId)&&f.jsx(njn,{synthesized:Cs.synthesized,agentLabel:Wn?qp[Wn.harness]:rCe(),showResumeModes:(Wn==null?void 0:Wn.harness)==="claude-code",onView:ne=>Ha==null?void 0:Ha(Cs.plan,Cs.promptId,ne),onApprove:ne=>hl({promptId:Cs.promptId,approve:!0,...ne?{resumeMode:ne}:{}}),onReject:()=>hl({promptId:Cs.promptId,approve:!1}),onRevise:ne=>{H&&pf({sessionId:H,promptId:Cs.promptId}),hl({promptId:Cs.promptId,approve:!1,note:ne})}}),Li.length>0&&f.jsx("div",{className:"composer-queued flex flex-col gap-1 mb-1.5",children:Li.map((ne,be)=>f.jsxs("div",{className:"queued-chip flex flex-wrap items-center gap-x-2 gap-y-1 py-1.5 px-2.5 text-sm text-subtext bg-background border border-border rounded-sm",title:ne.error?`${ne.text} -${ne.error}`:ne.text,children:[ne.dispatchState==="blocked"?f.jsx(iS,{size:13,className:"shrink-0 text-accent-amber"}):f.jsx(Tvn,{size:13,className:"shrink-0 text-muted"}),f.jsx("span",{className:"flex-1 overflow-hidden text-ellipsis whitespace-nowrap text-text",children:ne.text}),ne.dispatchState!=="blocked"&&f.jsx("span",{className:"shrink-0 text-sm text-muted",children:ne.dispatchState==="retrying"?v5n(ne.nextRetryAt,bo):MSe()}),ne.dispatchState==="blocked"?f.jsxs(f.Fragment,{children:[f.jsx("button",{onClick:()=>void Ih(ne.id),"aria-label":TZ({text:ne.text}),disabled:cn!==null,className:"shrink-0 px-1.5 py-0.5 border border-border rounded-sm text-sm text-text bg-background cursor-pointer disabled:opacity-50 disabled:cursor-default [&:hover:not(:disabled)]:border-text",children:cn===ne.id?FD():Vs()}),f.jsx("button",{onClick:()=>Pu(ne.id),"aria-label":kZ({text:ne.text}),disabled:cn!==null,className:"shrink-0 px-1.5 py-0.5 border-0 text-sm text-muted bg-transparent cursor-pointer disabled:opacity-50 disabled:cursor-default [&:hover:not(:disabled)]:text-text",children:qwe()}),be===pi&&bePu(ne.id),className:"shrink-0 inline-flex items-center justify-center w-4 h-4 p-0 border-0 rounded-full text-muted cursor-pointer [&:hover]:bg-text [&:hover]:text-background",children:f.jsx(_r,{size:11})})]},ne.id))}),vc&&f.jsxs("div",{id:$u,role:"note",className:`composer-demo-hint ${lR}`,children:[f.jsx(Jd,{size:16,className:"shrink-0 text-primary"}),f.jsx("span",{className:"flex-1",dir:"auto",children:Mbe()}),f.jsx(Ft,{size:"small","aria-label":Pg(),title:Pg(),onClick:()=>{var ne;ae(!0),(ne=Lt.current)==null||ne.focus()},children:f.jsx(_r,{size:14})})]}),b&&!se&&l&&f.jsxs("div",{role:"note",className:`composer-demo-run-hint ${lR}`,children:[f.jsx(Jd,{size:16,className:"shrink-0 text-primary"}),f.jsxs("span",{className:"flex flex-1 flex-wrap items-center gap-x-1.5 gap-y-1",dir:"auto",children:[f.jsx("span",{children:WE()}),f.jsxs(Me,{size:"small",onClick:()=>l(b,"keepOpen"),children:[f.jsx(co,{size:14}),Z4()]}),f.jsx("span",{children:KE()})]}),f.jsx(Ft,{size:"small","aria-label":Pg(),title:Pg(),onClick:()=>{var ne;X(!0),(ne=Lt.current)==null||ne.focus()},children:f.jsx(_r,{size:14})})]}),f.jsx("span",{className:"sr-only",role:"status","aria-live":"polite",children:b?`${WE()} ${Z4()} ${KE()}`:""}),f.jsxs("div",{className:`composer-box relative flex flex-col border ${jr?"border-accent-amber":"border-border"} rounded-lg bg-background shadow-elevated`,"data-onboarding":"composer",children:[ot&&!ot.agentReady&&f.jsxs("div",{className:"composer-harness-warning py-2 px-3 text-subtext text-sm leading-normal border-b border-b-border-variant [&_strong]:text-accent-amber [&_strong]:font-medium [&_code]:font-mono [&_code]:text-text",children:[f.jsxs("strong",{children:[ot.name," ",exe()]})," ",ot.agentNote?eh(ot.agentNote):VSe()]}),Oi&&f.jsx(gjn,{skills:ks,activeIndex:Yr,onPick:Zs,onHover:Qs}),oe.length>0&&f.jsx(Kjn,{annotations:oe,onClear:()=>{le([]),window.requestAnimationFrame(()=>{var ne;return(ne=Lt.current)==null?void 0:ne.focus()})},onRemove:ne=>{const be=oe.filter(De=>De.id!==ne);le(be),be.length===0&&window.requestAnimationFrame(()=>{var De;return(De=Lt.current)==null?void 0:De.focus()})}}),Ee.length>0&&f.jsx("div",{className:"composer-attachments flex flex-wrap gap-1.5 pt-2 px-3 pb-0",children:Ee.map((ne,be)=>{const De=()=>Ie($e=>$e.filter((Ke,Nn)=>Nn!==be));return ne.mediaType==="application/pdf"?f.jsxs("div",{className:"attachment-file [&_button]:absolute [&_button]:-top-[5px] [&_button]:-right-[5px] [&_button]:inline-flex [&_button]:items-center [&_button]:justify-center [&_button]:w-4 [&_button]:h-4 [&_button]:p-0 [&_button]:border [&_button]:border-border [&_button]:rounded-full [&_button]:bg-surface [&_button]:text-text [&_button]:cursor-pointer [&_button:hover]:bg-text [&_button:hover]:text-background relative inline-flex items-center gap-2 max-w-55 py-2 px-2.5 border border-border rounded-sm text-text bg-surface [&_svg]:shrink-0 [&_svg]:text-muted",title:ne.name,children:[f.jsx(Cb,{size:22}),f.jsx("span",{className:"attachment-file-name overflow-hidden text-ellipsis whitespace-nowrap text-sm",children:ne.name??"document.pdf"}),f.jsx("button",{title:rN(),"aria-label":rN(),onClick:De,children:f.jsx(_r,{size:11})})]},be):f.jsxs("div",{className:"attachment-thumb relative [&_img]:w-13 [&_img]:h-13 [&_img]:object-cover [&_img]:border [&_img]:border-border [&_img]:rounded-sm [&_img]:block [&_button]:absolute [&_button]:-top-[5px] [&_button]:-right-[5px] [&_button]:inline-flex [&_button]:items-center [&_button]:justify-center [&_button]:w-4 [&_button]:h-4 [&_button]:p-0 [&_button]:border [&_button]:border-border [&_button]:rounded-full [&_button]:bg-surface [&_button]:text-text [&_button]:cursor-pointer [&_button:hover]:bg-text [&_button:hover]:text-background",children:[f.jsx("img",{src:ne.dataUrl,alt:aD()}),f.jsx("button",{title:sN(),"aria-label":sN(),onClick:De,children:f.jsx(_r,{size:11})})]},be)})}),ze&&f.jsx("div",{className:"composer-attach-error pt-1.5 px-3 pb-0 text-sm text-accent-red",role:"alert",children:ze}),mt&&f.jsx("div",{className:"composer-settings-error pt-1.5 px-3 pb-0 text-sm text-accent-red",role:"alert",children:mt}),f.jsxs("div",{className:`composer-input relative flex overflow-hidden [&_textarea]:flex-1 ${jr?"[&_textarea]:font-mono [&_textarea]:text-sm":""}`,children:[f.jsx("textarea",{dir:"auto",ref:Lt,"aria-describedby":vc?$u:void 0,className:"relative z-1 bg-transparent",value:V,placeholder:St?NCe():ha&&ot?O7e({harness:Ne(qp[ot.id]),shortcut:Ne(xf)}):Qt?ot!=null&&ot.agentReady?P0e({harness:Ne(qp[Qt.harness])}):M0e({harness:Ne(qp[Qt.harness])}):Ihe(),rows:2,onPaste:il,onDragOver:ne=>{ne.dataTransfer.types.includes("Files")&&ne.preventDefault()},onDrop:ne=>{ne.dataTransfer.files.length!==0&&(ne.preventDefault(),fa(Array.from(ne.dataTransfer.files)))},onChange:ne=>{const be=ne.target.value,De=ne.target.selectionStart;Ur(De);const $e=De>0&&/\s/.test(be[De-1])&&!St&&!Ys.current&&YA(be)===null?t4(be,De-1):null;if(($e==null?void 0:$e.query)==="plan"&&(Wt!=null&&Wt.planActivation)){fc(be,$e);return}ee(be),xs(!1)},onSelect:ne=>Ur(ne.currentTarget.selectionStart),onCompositionStart:()=>{Ys.current=!0},onCompositionEnd:()=>{Ys.current=!1},onKeyDown:ne=>{if(Oi){if(ne.key==="ArrowDown"||ne.key==="ArrowUp"){ne.preventDefault();const be=ne.key==="ArrowDown"?1:-1;Qs((Yr+be+ks.length)%ks.length);return}if(ne.key==="Tab"||ne.key==="Enter"){ne.preventDefault(),Zs(ks[Yr]);return}if(ne.key==="Escape"){ne.preventDefault(),xs(!0);return}}if(ne.key==="Backspace"&&sr(ne.currentTarget)){ne.preventDefault();return}if(ne.key==="Enter"&&!ne.shiftKey&&!ne.nativeEvent.isComposing){if(ne.preventDefault(),jr){mi();return}_l({queue:ne.metaKey||ne.ctrlKey})}}}),f.jsx(wjn,{text:V,editingTokenEnd:Ln==null?void 0:Ln.end,isCommand:$i,skills:Ri,projectId:e,textareaRef:Lt})]}),f.jsxs("div",{className:"composer-actions flex min-w-0 justify-end items-center gap-2 pt-1.5 px-2 pb-2",children:[f.jsxs("div",{className:"option-picker relative inline-flex shrink-0",ref:Kn.ref,children:[f.jsx(Ft,{type:"button",className:"composer-bare",title:H2(),"aria-label":H2(),"aria-haspopup":"dialog","aria-expanded":Kn.open,onClick:()=>Kn.setOpen(ne=>!ne),children:f.jsx(Xbn,{size:16})}),Kn.open&&f.jsxs("div",{className:"composer-sources-menu absolute bottom-[calc(100%_+_8px)] start-0 z-50 flex min-w-55 flex-col gap-1 rounded-md border border-border bg-background p-2 shadow-dropdown",children:[f.jsx("span",{className:"px-1 text-sm font-medium text-muted",children:H2()}),f.jsx(D5n,{})]})]}),f.jsx("input",{ref:Qe,type:"file",accept:"application/pdf,image/png,image/jpeg,image/gif,image/webp",multiple:!0,hidden:!0,onChange:ne=>{fa(Array.from(ne.target.files??[])),ne.target.value=""}}),f.jsx(Ft,{type:"button",className:"composer-attach",title:qE(),"aria-label":qE(),onClick:()=>{var ne;return(ne=Qe.current)==null?void 0:ne.click()},children:f.jsx(Rbn,{size:16})}),Gr&&f.jsxs(Me,{type:"button",variant:"ghost",active:!0,className:"group",title:ZE(),"aria-label":ZE(),onClick:()=>void al(),children:[f.jsxs("span",{className:"relative size-4","aria-hidden":"true",children:[f.jsx(_bn,{className:"absolute inset-0 transition-opacity group-hover:opacity-0 group-focus-visible:opacity-0",size:16,strokeWidth:1.6}),f.jsx(_r,{className:"absolute inset-0 opacity-0 transition-opacity group-hover:opacity-100 group-focus-visible:opacity-100",size:16,strokeWidth:1.8})]}),f.jsx("span",{children:h2e()})]}),jr&&f.jsxs(Me,{type:"button",variant:"ghost",active:!0,className:"group",title:YE(),"aria-label":YE(),onClick:Bu,children:[f.jsxs("span",{className:"relative size-4","aria-hidden":"true",children:[f.jsx(of,{className:"absolute inset-0 transition-opacity group-hover:opacity-0 group-focus-visible:opacity-0",size:16,strokeWidth:1.6}),f.jsx(_r,{className:"absolute inset-0 opacity-0 transition-opacity group-hover:opacity-100 group-focus-visible:opacity-100",size:16,strokeWidth:1.8})]}),f.jsx("span",{children:nD()})]}),f.jsx("div",{className:"min-w-0 flex-1"}),f.jsxs("div",{className:"flex min-w-0 items-center",children:[f.jsx(Sxn,{value:Qt,onSelect:_s,onOpenSettings:()=>a("harnesses"),permissionChoices:ot!=null&&ot.agentReady?(Wt==null?void 0:Wt.permissionModes)??[]:[],defaultPermissionId:(Wt==null?void 0:Wt.defaultPermissionMode)??null,onSelectPermission:ir,reasoningChoices:ot!=null&&ot.agentReady?Is.choices:[],defaultReasoningId:Is.defaultId,onSelectReasoning:Js,lockHarness:!!Ut}),f.jsx(Sjn,{usage:Ut==null?void 0:Ut.contextUsage})]}),Zn&&!St?f.jsx(Ft,{className:"send-btn",variant:"stop",title:cN(),"aria-label":cN(),onClick:vf,children:f.jsx(_r,{size:16})}):f.jsx(Ft,{className:`send-btn ${vc&&(ot!=null&&ot.agentReady)?"ring-2 ring-primary ring-offset-2 ring-offset-background":""}`,variant:"primary",title:jr?aN():Y4(),"aria-label":jr?aN():Y4(),onClick:()=>void(jr?mi():_l()),disabled:jr?!da||!H&&!(ot!=null&&ot.agentReady):!(ot!=null&&ot.agentReady)||!V.trim()&&Ee.length===0&&oe.length===0,children:f.jsx(pI,{size:16})})]})]})]})]})]})}const lR="flex items-center gap-2.5 mb-2.5 py-2 ps-3.5 pe-2 rounded-lg border border-border bg-surface text-text text-sm leading-normal",UTn=[],GTn=[];function Ea({className:e,...n}){return f.jsx("div",{className:vs("relative flex min-h-0 flex-1 flex-col",e),...n})}function Cd({className:e,...n}){return f.jsx("div",{className:vs("min-h-0 flex-1 overflow-auto bg-background",e),...n})}function Po({className:e,...n}){return f.jsx("div",{className:vs("shrink-0 border-b border-b-border-variant px-4 py-2 text-sm text-muted",e),...n})}const cR=["pane-content flex-1 min-h-0 relative subagent-tab-content overflow-y-auto","bg-background py-8 px-4"].join(" ");function VTn({projectId:e,sessionId:n,spawnPartId:t,onOpenFile:r,onOpenRun:s,runExperimentName:i,onOpenExperiment:a,experimentName:o,onOpenSubagent:l}){var k;const u=ft(Zl(n)),h=((k=u.data)==null?void 0:k.messages)??(u.isError?[]:null),_=A.useRef(null),p=A.useRef(null),m=A.useRef(!0);if(A.useLayoutEffect(()=>{m.current=!0;const v=_.current;v&&(v.scrollTop=v.scrollHeight)},[n,t]),A.useLayoutEffect(()=>{const v=_.current;v&&m.current&&(v.scrollTop=v.scrollHeight)},[h]),A.useEffect(()=>{const v=_.current,b=p.current;if(!v||!b)return;const w=new ResizeObserver(()=>{m.current&&(v.scrollTop=v.scrollHeight)});return w.observe(b),w.observe(v),()=>w.disconnect()},[h===null]),h===null)return f.jsx(Ea,{children:f.jsx("div",{className:cR,children:f.jsx("div",{className:"subagent-empty py-[3px] px-1 text-sm text-muted",children:con()})})});let x=null;for(const v of h)if(x=Yv(v.parts,t),x)break;return f.jsx(Ea,{children:f.jsx("div",{className:cR,ref:_,onScroll:v=>{const b=v.currentTarget;m.current=b.scrollHeight-b.scrollTop-b.clientHeight<60},children:f.jsx("div",{ref:p,children:x?f.jsx(LF,{projectId:e,sessionId:n,children:f.jsx(ATn,{spawn:x,onOpenFile:r,onOpenRun:s,runExperimentName:i,onOpenExperiment:a,experimentName:o,onOpenSubagent:l})}):f.jsx("div",{className:"subagent-empty py-[3px] px-1 text-sm text-muted",children:mon()})})})})}function KTn({experiment:e}){var s;const n=ft(S$(e.id)),t=n.data,r=(s=n.error)==null?void 0:s.message;return f.jsx(Cd,{className:"branch-changes [&_>_.changes-note]:mx-4 [&_>_.changes-note]:my-3.5 [&_>_.diff-explorer]:mx-4 [&_>_.diff-explorer]:mb-0 [&_>_.diff-explorer]:mt-3.5 [&_>_.openresearch-diff]:mx-4 [&_>_.openresearch-diff]:mb-0 [&_>_.openresearch-diff]:mt-3.5 [&_>_.truncated-notice]:mx-4 [&_>_.truncated-notice]:mb-0 [&_>_.truncated-notice]:mt-3.5",children:r&&!t?f.jsxs(Po,{children:[Ide()," ",Ne(r)]}):t?t.diff.trim()?f.jsxs(f.Fragment,{children:[t.truncated&&f.jsx(uB,{bytesRead:t.bytesRead,byteLimit:t.byteLimit}),f.jsx(fB,{diff:t.diff,partial:t.truncated})]}):f.jsx("div",{className:"changes-note text-sm text-muted",children:e.parentExperimentId?Yde():Tde()}):f.jsx(Po,{children:Ude()})})}function mH({view:e,onViewChange:n,showViewToggle:t=!0,branchLabel:r,branchTitle:s,githubHref:i,githubTitle:a,refreshing:o,onRefresh:l}){return f.jsxs("div",{className:"code-tab-header flex items-center gap-2 py-1.5 px-3 border-b border-b-border-variant shrink-0 [&_>_.seg]:p-0.5 [&_>_.seg]:rounded-sm [&_>_.seg_button]:py-0.5 [&_>_.seg_button]:px-2 [&_>_.seg_button]:text-sm [&_>_.seg_button]:font-medium",children:[t&&f.jsxs("div",{className:"seg inline-flex items-center gap-0.5 p-[3px] rounded-md bg-hover-subtle [&_button]:py-[3px] [&_button]:px-3 [&_button]:text-sm [&_button]:font-medium [&_button]:text-text [&_button]:rounded-sm [&_button:not(:disabled):hover]:text-text [&_button.active]:bg-background [&_button.active]:shadow-segment [&_button:disabled]:text-muted [&_button:disabled]:cursor-default",role:"group","aria-label":P8e(),children:[f.jsx("button",{type:"button",className:e==="files"?"active":"","aria-pressed":e==="files",onClick:()=>n("files"),children:K8e()}),f.jsx("button",{type:"button",className:e==="changes"?"active":"","aria-pressed":e==="changes",onClick:()=>n("changes"),children:cD()})]}),r&&f.jsxs("span",{className:"wt-branch-chip inline-flex items-center gap-1 min-w-0 py-0.5 px-2 rounded-full bg-hover-muted text-subtext text-xs [&_>_svg]:shrink-0",title:s,children:[f.jsx(hm,{size:12}),f.jsx("span",{className:"wt-branch-name overflow-hidden text-ellipsis whitespace-nowrap",children:r})]}),i&&f.jsx(dm,{href:i,target:"_blank",rel:"noopener noreferrer",title:a,"aria-label":a,children:f.jsx(Rb,{size:13})}),f.jsx("span",{className:"flex-1"}),f.jsx(Ft,{title:hN(),"aria-label":hN(),onClick:l,children:o?f.jsx(Rt,{}):f.jsx(Bbn,{size:13})})]})}const WTn=/\.(md|mdx|markdown)$/i,QTn=/\.tex$/i,XTn=/\.html?$/i,YTn=/\.(apng|avif|bmp|gif|heic|heif|ico|jpe?g|jfif|jxl|pbm|pgm|png|pnm|ppm|svg|tiff?|webp)$/i,ZTn=/\.(csv|tsv|xlsx?|ods)$/i,JTn=/\.(c|cc|cpp|css|go|html?|java|js|jsx|json|mjs|py|rs|sh|toml|ts|tsx|ya?ml)$/i,eAn=/\.(7z|bz2|gz|rar|tar|tgz|zip)$/i,tAn=/\.pdf$/i,nAn=/\.(docx?|log|rtf|txt)$/i;function rAn(e){return YTn.test(e)}function Y6(e){return WTn.test(e)}function gH(e){return QTn.test(e)}function sAn(e){return XTn.test(e)}function ch({name:e}){const n=Y6(e)?"markdown":rAn(e)?"image":ZTn.test(e)?"spreadsheet":JTn.test(e)?"code":eAn.test(e)?"archive":tAn.test(e)?"pdf":nAn.test(e)||gH(e)?"document":"file";let t;return n==="markdown"?t=f.jsxs(f.Fragment,{children:[f.jsx("path",{d:"M1 3h14v10H1z",fill:"currentColor",opacity:".18"}),f.jsx("path",{d:"M2.6 10.5v-5h1.2l1.6 2 1.6-2h1.2v5H6.8V7.6L5.4 9.3 4 7.6v2.9H2.6Zm8.5-5v2.4h1.3L10.5 10 8.6 7.9h1.3V5.5h1.2Z",fill:"currentColor"})]}):n==="image"?t=f.jsxs(f.Fragment,{children:[f.jsx("rect",{x:"1.5",y:"2",width:"13",height:"12",rx:"2",fill:"currentColor",opacity:".18"}),f.jsx("circle",{cx:"5",cy:"5.5",r:"1.4",fill:"currentColor"}),f.jsx("path",{d:"m2.8 12 3.3-3.5 2.2 2 2.1-2.5 2.8 4H2.8Z",fill:"currentColor"})]}):n==="spreadsheet"?t=f.jsxs(f.Fragment,{children:[f.jsx("rect",{x:"2",y:"1.5",width:"12",height:"13",rx:"1.5",fill:"currentColor",opacity:".2"}),f.jsx("path",{d:"M3.5 4.5h9M3.5 8h9M3.5 11.5h9M7 3v10M10.5 3v10",stroke:"currentColor",strokeWidth:"1.1"})]}):n==="code"?t=f.jsx("path",{d:"M6.2 3 1.8 8l4.4 5 1.3-1.2L4.2 8l3.3-3.8L6.2 3Zm3.6 0-1.3 1.2L11.8 8l-3.3 3.8 1.3 1.2 4.4-5-4.4-5Z",fill:"currentColor"}):n==="archive"?t=f.jsxs(f.Fragment,{children:[f.jsx("path",{d:"M2 2h12v12H2z",fill:"currentColor",opacity:".18"}),f.jsx("path",{d:"M7 2h2v2H7V2Zm0 3h2v2H7V5Zm0 3h2v2H7V8Zm-0.5 3h3v2h-3v-2Z",fill:"currentColor"})]}):t=f.jsxs(f.Fragment,{children:[f.jsx("path",{d:"M3 1.5h6l4 4v9H3v-13Z",fill:"currentColor",opacity:".2"}),f.jsx("path",{d:"M9 1.5v4h4",fill:"none",stroke:"currentColor",strokeWidth:"1.2"}),f.jsx("path",{d:"M5 8h6M5 10.5h6M5 13h4",stroke:"currentColor",strokeWidth:"1.2"})]}),f.jsx("svg",{className:`file-tree-icon w-[15px] h-[15px] shrink-0 text-muted overflow-visible [&.markdown]:text-accent-blue [&.image]:text-accent-purple [&.spreadsheet]:text-accent-green [&.code]:text-accent-orange [&.archive]:text-accent-amber [&.pdf]:text-accent-red [&.document]:text-subtext ${n}`,viewBox:"0 0 16 16","aria-hidden":"true",children:t})}function vH(e,n){const t=navigator.clipboard;if(!t){Vn(pD(),"error");return}t.writeText(`${e.replace(/[\\/]+$/,"")}/${n}`).then(()=>Vn(m0(),"success")).catch(r=>Vn(r instanceof Error?r.message:String(r),"error"))}function bH({name:e,onCommit:n,onCancel:t}){const[r,s]=A.useState(e),i=A.useRef(!1),a=()=>{if(i.current)return;i.current=!0;const o=r.trim();!o||o===e?t():n(o)};return f.jsx(as,{autoFocus:!0,variant:"inline",className:"min-w-0 flex-1",value:r,"aria-label":KDe({path:Ne(e)}),onFocus:o=>{const l=e.lastIndexOf(".");o.currentTarget.setSelectionRange(0,l>0?l:e.length)},onChange:o=>s(o.target.value),onClick:o=>o.stopPropagation(),onDoubleClick:o=>o.stopPropagation(),onBlur:a,onKeyDown:o=>{o.stopPropagation(),o.key==="Enter"?(o.preventDefault(),o.currentTarget.blur()):o.key==="Escape"&&(o.preventDefault(),i.current=!0,t())}})}function yH(e,n){const t=e.currentTarget.getBoundingClientRect(),r="clientX"in e?e.clientX:0,s="clientY"in e?e.clientY:0;return{path:n,x:r||t.left+16,y:s||t.top+t.height}}function xH({target:e,onOpen:n,onRename:t,onDuplicate:r,onCopyPath:s,onDelete:i,onClose:a}){const o=A.useRef(null),l=A.useRef(a);l.current=a;const[u,h]=A.useState({x:e.x,y:e.y});A.useLayoutEffect(()=>{var k;const m=o.current;if(!m)return;const x=document.activeElement instanceof HTMLElement?document.activeElement:null;return h({x:Math.max(8,Math.min(e.x,window.innerWidth-m.offsetWidth-8)),y:Math.max(8,Math.min(e.y,window.innerHeight-m.offsetHeight-8))}),(k=m.querySelector("button"))==null||k.focus(),()=>{m.contains(document.activeElement)&&(x==null||x.focus())}},[e]),A.useEffect(()=>{const m=()=>l.current(),x=v=>{var b;(b=o.current)!=null&&b.contains(v.target instanceof Node?v.target:null)||l.current()},k=v=>{if(v.key==="Tab"){v.preventDefault(),l.current();return}v.key==="Escape"&&(v.preventDefault(),v.stopPropagation(),l.current())};return document.addEventListener("pointerdown",x),window.addEventListener("blur",m),window.addEventListener("resize",m),window.addEventListener("scroll",m,!0),document.addEventListener("keydown",k,!0),()=>{document.removeEventListener("pointerdown",x),window.removeEventListener("blur",m),window.removeEventListener("resize",m),window.removeEventListener("scroll",m,!0),document.removeEventListener("keydown",k,!0)}},[]);const _=m=>{l.current(),m()},p=(m,x,k=!1)=>f.jsx(nr,{size:"compact",role:"menuitem",danger:k,onClick:()=>_(x),children:f.jsx("span",{children:m})});return Oa.createPortal(f.jsxs("div",{ref:o,role:"menu","aria-label":MDe({path:Ne(e.path)}),className:"option-menu fixed z-100 min-w-44 overflow-hidden rounded-md border border-border bg-background p-1 shadow-menu",style:{left:u.x,top:u.y},onContextMenu:m=>m.preventDefault(),onKeyDown:m=>{var b,w;if(m.key!=="ArrowDown"&&m.key!=="ArrowUp")return;m.preventDefault();const x=[...((b=o.current)==null?void 0:b.querySelectorAll("button"))??[]],k=x.indexOf(document.activeElement instanceof HTMLButtonElement?document.activeElement:x[0]),v=m.key==="ArrowDown"?1:-1;(w=x[(k+v+x.length)%x.length])==null||w.focus()},children:[p(PDe(),n),t&&p(sD(),t),r&&p(EDe(),r),p(j_e(),s),i&&p(rD(),i,!0)]}),document.body)}const B5=["file-tree-row flex items-center gap-1.5 w-full py-[3px] px-2.5 border-0","bg-transparent text-text text-start cursor-pointer font-[inherit]","[&:hover]:bg-panel [&_>_svg]:shrink-0","[&_>_svg]:text-subtext [&_>_svg.file-tree-chevron]:text-muted"].join(" "),uR=["file-tree-chevron text-muted shrink-0 [button&]:inline-flex","[button&]:items-center [button&]:justify-center [button&]:w-[13px]","[button&]:h-[13px] [button&]:p-0 [button&]:border-0 [button&]:bg-transparent","[button&_>_svg]:transition-transform [button&_>_svg]:duration-120 [button&_>_svg]:ease-standard [button&_>_svg.open]:rotate-90"].join(" ");function _R(){return{dirs:new Map,files:[]}}function wH(e){const n=_R();for(const t of e){const r=t.split("/");let s=n;for(let i=0;ii(t),title:t,children:[p?f.jsx(Zo,{size:13,className:uR}):f.jsx(Da,{size:13,className:uR}),f.jsx("span",{className:"file-tree-name flex-1 min-w-0 overflow-hidden text-ellipsis whitespace-nowrap",children:e})]}),p&&f.jsx(Z6,{node:n,parentPath:t,depth:r+1,toggled:s,onToggle:i,onOpenFile:a,renamingPath:o,onContextMenu:l,onRename:u,onCancelRename:h})]})}function Z6({node:e,parentPath:n,depth:t,toggled:r,onToggle:s,onOpenFile:i,renamingPath:a,onContextMenu:o,onRename:l,onCancelRename:u}){const h=[...e.dirs.keys()].sort((p,m)=>p.localeCompare(m)),_=[...e.files].sort((p,m)=>p.localeCompare(m));return f.jsxs(f.Fragment,{children:[h.map(p=>{const m=n?`${n}/${p}`:p;return f.jsx(iAn,{name:p,node:e.dirs.get(p),path:m,depth:t,toggled:r,onToggle:s,onOpenFile:i,renamingPath:a,onContextMenu:o,onRename:l,onCancelRename:u},`d:${m}`)}),_.map(p=>{const m=n?`${n}/${p}`:p;if(a===m&&l&&u)return f.jsxs("div",{className:B5,style:{paddingInlineStart:8+t*14},children:[f.jsx(ch,{name:p}),f.jsx(bH,{name:p,onCommit:k=>l(m,k),onCancel:u})]},`f:${m}`);const x=qr(k=>i(m,k));return f.jsxs("button",{type:"button",className:B5,style:{paddingInlineStart:8+t*14},...x,onContextMenu:k=>{o&&(k.preventDefault(),o(k,m))},onKeyDown:k=>{if(o&&(k.key==="ContextMenu"||k.shiftKey&&k.key==="F10")){k.preventDefault(),o(k,m);return}x.onKeyDown(k)},title:QX({name:Ne(m)}),children:[f.jsx(ch,{name:p}),f.jsx("span",{className:"file-tree-name flex-1 min-w-0 overflow-hidden text-ellipsis whitespace-nowrap",children:p})]},`f:${m}`)})]})}function aAn({projectId:e,project:n,experiment:t,view:r,toggled:s,onViewChange:i,onToggledChange:a,onOpenFile:o}){var N,E;const l=t.branchName,u=ft({...E$(e,{ref:l}),enabled:r==="files",subscribed:r==="files"}),h=ft({...Mv(t.chatSessionId??""),enabled:r==="files"&&!!t.chatSessionId,subscribed:r==="files"&&!!t.chatSessionId}),_=u.data,p=(N=u.error)==null?void 0:N.message,m=u.isFetching,x=S$(t.id),k=EV({queryKey:x.queryKey})>0,v=(E=h.data)!=null&&E.exists&&h.data.branch===l?t.chatSessionId??void 0:void 0,b=()=>{u.refetch()},w=A.useMemo(()=>_?wH(_.entries):null,[_]),y=r==="files"?m:k,C=A.useCallback(T=>{const j=new Set(s);j.has(T)?j.delete(T):j.add(T),a(j)},[s,a]);return f.jsxs("div",{className:"code-tab flex flex-col h-full min-h-0",children:[f.jsx(mH,{view:r,onViewChange:i,branchLabel:l,branchTitle:`Committed branch ${l}`,githubHref:n.githubEnabled?xb(n.githubOwner,n.githubRepo,l):void 0,githubTitle:XO({branch:Ne(l)}),refreshing:y,onRefresh:()=>r==="files"?b():void rt.invalidateQueries(x)}),r==="changes"?f.jsx(KTn,{experiment:t},t.id):f.jsxs(f.Fragment,{children:[(_==null?void 0:_.truncated)&&f.jsx(Po,{children:a9e()}),p&&w&&f.jsxs(Po,{children:[y9e()," ",Ne(p)]}),f.jsx(Cd,{children:w?w.dirs.size===0&&w.files.length===0?f.jsx(Po,{children:d9e()}):f.jsx("div",{className:"file-tree py-1.5 px-0 text-sm",children:f.jsx(Z6,{node:w,parentPath:"",depth:0,toggled:s,onToggle:C,onOpenFile:(T,j)=>v?o(T,v,void 0,j):o(T,void 0,l,j)})}):f.jsx(Po,{children:p?uD({error:Ne(p)}):_D()})})]})]})}function J6({icon:e,title:n,description:t}){return f.jsxs("div",{className:"flex h-full w-full min-w-0 flex-1 flex-col items-center justify-center gap-1.5 bg-background p-6 text-center text-muted",children:[f.jsx(e,{size:36,strokeWidth:1.5,className:"shrink-0"}),f.jsx("h3",{className:"mt-1.5 mb-0 max-w-full wrap-anywhere text-xl font-medium text-text",children:n}),t&&f.jsx("p",{className:"m-0 w-full max-w-105 wrap-anywhere text-base leading-[1.55] text-subtext",children:t})]})}function oAn({sessionId:e,project:n,view:t,toggled:r,onViewChange:s,onToggledChange:i,onOpenFile:a,canRenameFile:o}){var $,L,F;const l=n.id,h=(($=ft(Aa(l)).data)==null?void 0:$.some(G=>G.id===e&&G.busy))??!1,_=ft({...Mv(e??""),enabled:!!e,refetchInterval:h?5e3:!1}),p=_.data,m=e&&(p!=null&&p.exists)?{sessionId:e}:{ref:n.baselineBranch},x=ft({...E$(l,m),enabled:!e||_.isSuccess,refetchInterval:h?5e3:!1}),k=x.data,v=(L=_.error??x.error)==null?void 0:L.message,b=_.isFetching||x.isFetching,[w,y]=A.useState(null),[C,N]=A.useState(null),E=A.useCallback(()=>{e&&rt.invalidateQueries(Mv(e)),rt.invalidateQueries({queryKey:Et("getCodeTree",l),predicate:G=>!HO(G)})},[e,l]),T=A.useRef(h);A.useEffect(()=>{T.current&&!h&&E(),T.current=h},[h,E]);const j=A.useMemo(()=>k?wH(k.entries):null,[k]),M=A.useCallback(G=>{const V=new Set(r);V.has(G)?V.delete(G):V.add(G),i(V)},[r,i]),D=e&&(p!=null&&p.exists)?p:null,I=(D==null?void 0:D.branch)??(D!=null&&D.baselineBranch?xhn({branch:Ne(D.baselineBranch)}):$k()),P=((F=D==null?void 0:D.files)==null?void 0:F.length)??0,U=D?ohn({branch:Ne(`${I}${P>0?"*":""}`)}):hhn({branch:Ne(n.baselineBranch)}),q=D?D.branch:n.baselineBranch,W=(G,V)=>D?a(G,e,void 0,V):a(G,void 0,n.baselineBranch,V),H=(k==null?void 0:k.root)==="worktree",Y=async(G,V)=>{try{await Mpn(l,G,V,{sessionId:e}),E()}catch(ee){Vn(ee instanceof Error?ee.message:String(ee),"error")}},te=G=>{const V=(k==null?void 0:k.path)??n.repoPath;vH(V,G)};return f.jsxs("div",{className:"code-tab flex flex-col h-full min-h-0 wt-tab",children:[f.jsx(mH,{view:D?t:"files",onViewChange:s,showViewToggle:!!D,branchLabel:U,branchTitle:U,githubHref:n.githubEnabled&&q?xb(n.githubOwner,n.githubRepo,q):void 0,githubTitle:q?XO({branch:Ne(q)}):void 0,refreshing:b,onRefresh:E}),v&&(p||k)&&f.jsxs(Po,{children:[npn()," ",Ne(v)]}),!k||e&&!p?f.jsx(Cd,{children:f.jsx(Po,{children:v?uD({error:Ne(v)}):_D()})}):D&&t==="changes"?f.jsx(Cd,{className:"wt-changes px-4 pb-6 pt-0 [&_>_:first-child]:mt-3.5",children:P===0||!D.diff?f.jsx("div",{className:"changes-note text-sm text-muted",children:Hhn()}):f.jsxs(f.Fragment,{children:[D.diff.truncated&&f.jsx(uB,{bytesRead:D.diff.bytesRead,byteLimit:D.diff.byteLimit}),f.jsx(fB,{diff:D.diff.diff,partial:D.diff.truncated})]})}):f.jsxs(Cd,{children:[k.truncated&&f.jsx(Po,{children:zhn()}),j?j.dirs.size===0&&j.files.length===0?f.jsx(J6,{icon:q_,title:Qhn(),description:RFe()}):f.jsx("div",{className:"file-tree py-1.5 px-0 text-sm",children:f.jsx(Z6,{node:j,parentPath:"",depth:0,toggled:r,onToggle:M,onOpenFile:W,renamingPath:C,onContextMenu:(G,V)=>{y(yH(G,V))},onRename:(G,V)=>{N(null),Y(G,{action:"rename",newName:V})},onCancelRename:()=>N(null)})}):f.jsx(Po,{children:Dhn()})]}),w&&f.jsx(xH,{target:w,onOpen:()=>W(w.path,"keepOpen"),onRename:H&&o(w.path)?()=>N(w.path):void 0,onDuplicate:H?()=>void Y(w.path,{action:"duplicate"}):void 0,onCopyPath:()=>te(w.path),onDelete:H?()=>{window.confirm(bDe({path:Ne(w.path)}))&&Y(w.path,{action:"delete"})}:void 0,onClose:()=>y(null)})]})}function kH({text:e,path:n,highlightLine:t,scrollRequest:r,onScrollRequestHandled:s}){const i=A.useMemo(()=>{if(!e)return[];const h=e.replace(/\r\n?/g,` -`),_=m$(h,mS(n));return h.endsWith(` -`)?_.slice(0,-1):_},[e,n]),a=t&&i.length>0?Math.min(Math.max(Math.trunc(t),1),i.length):void 0,o=A.useRef(null);A.useEffect(()=>{var h;r!==void 0&&(a?((h=o.current)==null||h.scrollIntoView({block:"center"}),s==null||s()):i.length===0&&(s==null||s()))},[i.length,s,r,a]);const{ruleCh:l}=ZI(i.length),u=A.useMemo(()=>i.map((h,_)=>f.jsxs("div",{ref:_+1===a?o:void 0,className:`file-view-line flex items-stretch ${_+1===a?"file-view-line-highlight bg-accent-blue-subtle shadow-file-line":""}`,children:[f.jsx("span",{"data-line":_+1,className:`${YI} before:content-[attr(data-line)] shrink-0 pe-[1ch]`,style:{width:`${l}ch`},"aria-hidden":"true"}),f.jsx("code",{className:`file-view-code flex-1 min-w-0 ps-[2ch] pe-4 ${Av} ${XI}`,children:g$(h)?f.jsx("br",{}):h})]},_)),[i,l,a]);return f.jsxs("div",{className:`file-view-codewrap relative py-3.5 ${Av}`,children:[i.length>0&&f.jsx("div",{className:"absolute start-0 top-0 bottom-0 border-e border-e-border-variant pointer-events-none",style:{width:`${l}ch`},"aria-hidden":"true"}),u]})}function SH(e){return e==="image"||e==="audio"||e==="video"||e==="pdf"?e:null}function fR({url:e,name:n}){return f.jsxs("div",{className:"file-view-note py-2.5 px-4 text-sm text-muted",children:[aYe()," ",f.jsxs("a",{href:e,download:n,children:[mv()," ",Ne(n)]})]})}function P5({kind:e,url:n,name:t,downloadBar:r=!0}){const[s,i]=A.useState(!1);if(A.useEffect(()=>i(!1),[e,n]),s)return f.jsx(fR,{url:n,name:t});let a;return e==="image"?a=f.jsx("div",{className:"fpreview-image flex min-h-0 flex-1 items-start justify-center overflow-auto p-6 [&_img]:max-w-full [&_img]:h-auto [&_img]:border [&_img]:border-border [&_img]:rounded-sm",children:f.jsx("img",{src:n,alt:t,onError:()=>i(!0)})}):e==="audio"?a=f.jsx("div",{className:"flex min-h-0 flex-1 items-center justify-center p-6",children:f.jsx("audio",{className:"w-full max-w-160",controls:!0,preload:"metadata",src:n,"aria-label":t,onError:()=>i(!0)})}):e==="video"?a=f.jsx("div",{className:"flex min-h-0 flex-1 items-center justify-center p-6",children:f.jsx("video",{className:"max-h-full max-w-full rounded-sm border border-border",controls:!0,preload:"metadata",src:n,"aria-label":t,onError:()=>i(!0)})}):a=f.jsx("object",{className:"fpreview-pdf block min-h-0 flex-1 w-full border-0","aria-label":t,data:n,type:"application/pdf",onError:()=>i(!0),children:f.jsx(fR,{url:n,name:t})}),f.jsxs("div",{className:"flex h-full min-h-0 flex-col",children:[a,r&&f.jsx("div",{className:"shrink-0 border-t border-border-variant py-1.5 px-3 text-end text-sm",children:f.jsxs("a",{href:n,download:t,children:[mv()," ",t]})})]})}const lAn=e=>({queryKey:Et("fileVersion",e),staleTime:2e3,refetchOnMount:"always",refetchOnWindowFocus:"always",refetchInterval:2e3,queryFn:async({signal:n})=>{const t=await fetch(e,{method:"HEAD",cache:"no-store",signal:n});if(t.status===404)return"missing";if(!t.ok)throw new Error(`HTTP ${t.status}`);return t.headers.get("etag")??t.headers.get("content-length")}});function CH(e,n=!0){return ft({...lAn(e),enabled:n,subscribed:n}).data??null}function cAn(e){return/^[a-z][a-z0-9+.-]*:/i.test(e)||e.startsWith("//")}function uAn(e,n,t){const r=t.indexOf("#"),s=r===-1?t:t.slice(0,r),i=r===-1?"":t.slice(r),a=s.indexOf("?"),o=a===-1?s:s.slice(0,a),l=a===-1?"":s.slice(a+1),u=o.startsWith("/")?[]:n.split("/").filter(m=>m.length>0);for(const m of o.split("/"))if(!(!m||m==="."))if(m===".."){if(u.length===0)return null;u.pop()}else u.push(m);const h=u.join("/");if(!h)return null;const _=new URLSearchParams(l);_.delete("path");const p=_.toString();return{path:h,url:`${F_(e,h)}${p?`&${p}`:""}${i}`}}function _An(e){if(!e.startsWith("---"))return e;const n=e.indexOf(` ----`,3);return n===-1?e:e.slice(n+4).replace(/^\r?\n/,"")}const EH="orx:files-tree-width",NH="orx:artifacts-collapsed:",zH=180,jH=320,fAn=8,dAn=280;function hAn(){try{const e=Number(localStorage.getItem(EH));if(Number.isFinite(e)&&e>=zH&&e<=jH)return e}catch{}return dAn}function pAn(e){try{const n=localStorage.getItem(`${NH}${e}`);if(!n)return new Set;const t=JSON.parse(n);return Array.isArray(t)?new Set(t.filter(r=>typeof r=="string")):new Set}catch{return new Set}}function L0(e,n){for(const t of e){if(t.path===n)return t;if(t.isDir&&n.startsWith(t.path+"/")){const r=L0(t.children??[],n);if(r)return r}}return null}function TH({projectId:e,folder:n,markdown:t,entries:r}){const s=i=>{if(cAn(i))return i;const a=uAn(e,n,i);if(!a)return null;const o=L0(r,a.path);if(!o)return a.url;const l=a.url.indexOf("#"),u=l===-1?a.url:a.url.slice(0,l),h=l===-1?"":a.url.slice(l);return`${u}&v=${o.modifiedAt}:${o.size}${h}`};return f.jsx("div",{className:"md min-w-0 wrap-anywhere text-text leading-[1.62] [&_>_*:first-child]:mt-0 [&_>_*:last-child]:mb-0 [&_p]:my-2.5 [&_p]:mx-0 [&_strong]:text-text [&_strong]:font-semibold [&_pre]:bg-surface [&_pre]:border [&_pre]:border-border-muted [&_pre]:rounded-md [&_pre]:py-2 [&_pre]:px-3 [&_pre]:overflow-x-auto [&_pre]:text-sm [&_pre]:text-text [&_code]:font-mono [&_code]:text-sm [&_code]:font-medium [&_code]:text-primary [&_code]:bg-panel [&_code]:border [&_code]:border-border-variant [&_code]:rounded-xs [&_code]:py-px [&_code]:px-[5px] [&_.katex]:text-prose-emphasis [&_.katex-display]:my-3 [&_.katex-display]:mx-0 [&_.katex-display]:overflow-x-auto [&_.katex-display]:overflow-y-hidden [&_.katex-display]:py-0.5 [&_.katex-display]:px-0 [&_.file-chip]:inline-flex [&_.file-chip]:items-center [&_.file-chip]:gap-1 [&_.file-chip]:max-w-full [&_.file-chip]:my-0 [&_.file-chip]:mx-px [&_.file-chip]:py-0 [&_.file-chip]:px-1.5 [&_.file-chip]:align-baseline [&_.file-chip]:font-mono [&_.file-chip]:text-sm [&_.file-chip]:font-medium [&_.file-chip]:text-text [&_.file-chip]:bg-panel [&_.file-chip]:border [&_.file-chip]:border-border-variant [&_.file-chip]:rounded-xs [&_.file-chip]:cursor-pointer [&_.file-chip:hover:not(:disabled)]:bg-surface [&_.file-chip:hover:not(:disabled)]:text-primary [&_.file-chip_svg]:flex-none [&_.file-chip_svg]:opacity-60 [&_.file-chip-label]:max-w-65 [&_.file-chip-label]:overflow-hidden [&_.file-chip-label]:text-ellipsis [&_.file-chip-label]:whitespace-nowrap [&_.run-chip_svg]:opacity-100 [&_.run-chip_svg]:text-primary [&_pre_code]:bg-none [&_pre_code]:bg-transparent [&_pre_code]:border-0 [&_pre_code]:text-inherit [&_pre_code]:p-0 [&_pre_code]:font-normal [&_h1]:text-text [&_h1]:font-semibold [&_h2]:text-text [&_h2]:font-semibold [&_h3]:text-text [&_h3]:font-semibold [&_h4]:text-text [&_h4]:font-semibold [&_ul]:my-1.5 [&_ul]:mx-0 [&_ul]:ps-5.5 [&_ol]:my-1.5 [&_ol]:mx-0 [&_ol]:ps-5.5 [&_li::marker]:text-primary [&_a]:text-primary [&_table]:border-collapse [&_table]:text-sm [&_table]:my-2.5 [&_table]:mx-0 [&_table]:border [&_table]:border-border [&_table]:rounded-md [&_th]:border-b [&_th]:border-b-border-variant [&_th]:py-2 [&_th]:px-3.5 [&_th]:text-start [&_th]:text-text [&_th]:break-normal [&_th]:break-words [&_td]:border-b [&_td]:border-b-border-variant [&_td]:py-2 [&_td]:px-3.5 [&_td]:text-start [&_td]:text-text [&_td]:break-normal [&_td]:break-words [&_tr:last-child_td]:border-b-0 [&_thead_th]:bg-surface [&_thead_th]:font-medium [&_thead_th]:text-text [&_thead_th]:border-b [&_thead_th]:border-b-border [&_tbody_tr:hover_td]:bg-surface-bright [&_blockquote]:my-1.5 [&_blockquote]:mx-0 [&_blockquote]:pt-0.5 [&_blockquote]:pe-0 [&_blockquote]:pb-0.5 [&_blockquote]:ps-2.5 [&_blockquote]:border-s-[3px] [&_blockquote]:border-s-border [&_blockquote]:text-subtext [:is(&,_.openresearch-diff,_.file-view)_.token.comment]:italic [:is(&,_.openresearch-diff,_.file-view)_.token.prolog]:italic [:is(&,_.openresearch-diff,_.file-view)_.token.cdata]:italic [:is(&,_.openresearch-diff,_.file-view)_.token.operator]:text-syntax-cyan [:is(&,_.openresearch-diff,_.file-view)_.token.entity]:text-syntax-cyan [:is(&,_.openresearch-diff,_.file-view)_.token.url]:text-syntax-cyan [:is(&,_.openresearch-diff,_.file-view)_.token.comment]:text-syntax-comment [:is(&,_.openresearch-diff,_.file-view)_.token.prolog]:text-syntax-comment [:is(&,_.openresearch-diff,_.file-view)_.token.cdata]:text-syntax-comment [:is(&,_.openresearch-diff,_.file-view)_.token.punctuation]:text-syntax-text [:is(&,_.openresearch-diff,_.file-view)_.token.property]:text-syntax-red [:is(&,_.openresearch-diff,_.file-view)_.token.tag]:text-syntax-red [:is(&,_.openresearch-diff,_.file-view)_.token.deleted]:text-syntax-red [:is(&,_.openresearch-diff,_.file-view)_.token.constant]:text-syntax-orange [:is(&,_.openresearch-diff,_.file-view)_.token.symbol]:text-syntax-orange [:is(&,_.openresearch-diff,_.file-view)_.token.boolean]:text-syntax-orange [:is(&,_.openresearch-diff,_.file-view)_.token.number]:text-syntax-orange [:is(&,_.openresearch-diff,_.file-view)_.token.selector]:text-syntax-green [:is(&,_.openresearch-diff,_.file-view)_.token.attr-name]:text-syntax-green [:is(&,_.openresearch-diff,_.file-view)_.token.char]:text-syntax-green [:is(&,_.openresearch-diff,_.file-view)_.token.inserted]:text-syntax-green [:is(&,_.openresearch-diff,_.file-view)_.token.string]:text-syntax-green [:is(&,_.openresearch-diff,_.file-view)_.token.builtin]:text-syntax-yellow [:is(&,_.openresearch-diff,_.file-view)_.token.atrule]:text-syntax-orange [:is(&,_.openresearch-diff,_.file-view)_.token.attr-value]:text-syntax-orange [:is(&,_.openresearch-diff,_.file-view)_.token.keyword]:text-syntax-purple [:is(&,_.openresearch-diff,_.file-view)_.token.function]:text-syntax-blue [:is(&,_.openresearch-diff,_.file-view)_.token.decorator]:text-syntax-blue [:is(&,_.openresearch-diff,_.file-view)_.token.def]:text-syntax-blue [:is(&,_.openresearch-diff,_.file-view)_.token.class-name]:text-syntax-yellow [:is(&,_.openresearch-diff,_.file-view)_.token.namespace]:text-syntax-yellow [:is(&,_.openresearch-diff,_.file-view)_.token.regex]:text-syntax-green [:is(&,_.openresearch-diff,_.file-view)_.token.important]:text-syntax-red [:is(&,_.openresearch-diff,_.file-view)_.token.variable]:text-syntax-red [:is(&,_.openresearch-diff,_.file-view)_.token.parameter]:text-syntax-text artifact-md text-lg [&_h1]:text-4xl [&_h1]:leading-[1.18] [&_h1]:mt-7 [&_h1]:mx-0 [&_h1]:mb-3.5 [&_h2]:text-3xl [&_h2]:leading-tight [&_h2]:mt-7 [&_h2]:mx-0 [&_h2]:mb-2.5 [&_h3]:text-xl [&_h3]:leading-[1.35] [&_h3]:mt-5.5 [&_h3]:mx-0 [&_h3]:mb-2 [&_h4]:text-lg [&_h4]:leading-[1.4] [&_h4]:mt-4.5 [&_h4]:mx-0 [&_h4]:mb-1.5 [&_table]:block [&_table]:w-max [&_table]:max-w-full [&_table]:overflow-x-auto [&_.artifact-img]:block [&_.artifact-img]:my-3 [&_.artifact-img]:mx-0 [&_.artifact-img_img]:max-w-full [&_.artifact-img_img]:h-auto [&_.artifact-img_img]:border [&_.artifact-img_img]:border-border [&_.artifact-img_img]:rounded-sm [&_.artifact-img-caption]:block [&_.artifact-img-caption]:mt-1 [&_.artifact-img-caption]:text-center [&_.artifact-img-caption]:text-sm [&_.artifact-img-caption]:text-subtext",children:f.jsx(lCn,{remarkPlugins:[AF,[RF,$F]],rehypePlugins:[aF],components:{a:({href:i,children:a,...o})=>{const l=!i||i.startsWith("#"),u=l?i:s(i);return u?f.jsx("a",{...o,href:u,...l?{}:{target:"_blank",rel:"noopener noreferrer"},children:a}):f.jsx("span",{children:a})},img:({src:i,alt:a})=>{if(!i||typeof i!="string")return null;const o=s(i);return o?f.jsxs("a",{href:o,target:"_blank",rel:"noopener noreferrer",className:"artifact-img",children:[f.jsx("img",{src:o,alt:a??"",loading:"lazy"}),a&&f.jsx("span",{className:"artifact-img-caption",children:a})]}):null},...BF},children:OF(_An(t))})})}function mAn(e){return e.presentation==="text"&&Y6(e.name)?"markdown":SH(e.presentation)??(e.presentation==="text"||e.presentation==="unknown"?"text":"download")}function gAn(e,n,t,r){var u;const s=t==="markdown"||t==="text"&&n.size<=NL,i=XS(e,n.path),a=ft({...i,enabled:s,subscribed:s}),o=A.useRef({projectId:e,path:n.path,modifiedAt:n.modifiedAt,size:n.size,version:r});A.useEffect(()=>{const h=o.current;o.current={projectId:e,path:n.path,modifiedAt:n.modifiedAt,size:n.size,version:r},s&&h.projectId===e&&h.path===n.path&&(h.modifiedAt!==n.modifiedAt||h.size!==n.size||h.version!==null&&h.version!==r)&&rt.invalidateQueries({queryKey:i.queryKey,exact:!0})},[e,n.path,n.modifiedAt,n.size,r,s]);const l=a.data;return{text:l&&!l.binary?l.content:null,binary:(l==null?void 0:l.binary)??!1,truncated:(l==null?void 0:l.truncated)??!1,error:l?null:((u=a.error)==null?void 0:u.message)??(l===null?L_e():null),wantsText:s}}function vAn({projectId:e,entry:n,onDelete:t,artifactEntries:r}){const s=mAn(n),i=CH(F_(e,n.path)),{text:a,binary:o,truncated:l,error:u,wantsText:h}=gAn(e,n,s,i),[_,p]=A.useState(!1),m=s==="markdown",x=n.path.split("/").slice(0,-1).join("/"),k=`${F_(e,n.path)}&v=${encodeURIComponent(i??`${n.modifiedAt}:${n.size}`)}`;let v;return s==="image"||s==="audio"||s==="video"||s==="pdf"?v=f.jsx(P5,{kind:s,url:k,name:n.name}):s==="download"||!h||o?v=f.jsxs("div",{className:"file-view-note py-2.5 px-4 text-sm text-muted",children:[s==="download"||o?w_e():kde()," ",f.jsx("a",{href:k,...s==="download"||o?{download:n.name}:{target:"_blank",rel:"noopener noreferrer"},children:s==="download"||o?mD():q_e()})]}):u?v=f.jsxs("div",{className:"file-view-note py-2.5 px-4 text-sm text-muted",children:[mfe()," ",Ne(u)]}):a===null?v=f.jsxs(os,{children:[f.jsx(Rt,{})," ",eD()]}):m&&!_?v=f.jsx(TH,{projectId:e,folder:x,markdown:a,entries:r}):v=f.jsx(kH,{text:a,path:n.path}),f.jsxs("div",{className:"fpreview flex-1 min-w-0 bg-background file-view flex flex-col h-full min-h-0 [@container((max-width:_720px))]:hidden",children:[f.jsxs("div",{className:"fpreview-head flex w-full min-w-0 min-h-9 items-center gap-1 px-4 py-1 bg-background text-subtext shrink-0",children:[f.jsx(ch,{name:n.name}),f.jsx("span",{className:"fpreview-path flex-1 min-w-0 truncate text-sm text-subtext","data-tip":Ne(n.path),children:n.name}),f.jsxs("span",{dir:"auto",className:"fpreview-date text-xs text-muted whitespace-nowrap shrink-0",children:[Xfe()," ",new Date(n.modifiedAt).toLocaleString(z(),{dateStyle:"medium",timeStyle:"short"})]}),(s==="text"||s==="download")&&f.jsx("span",{className:"fpreview-size text-xs text-muted whitespace-nowrap shrink-0",children:Kl(n.size)}),m&&f.jsx(Ft,{size:"small",active:_,"data-tip":_?pv():ud(),"data-tip-align":"end","aria-label":_?pv():ud(),onClick:()=>p(b=>!b),children:f.jsx(E3,{size:13})}),f.jsx(dm,{size:"small",href:k,target:"_blank",rel:"noopener noreferrer","data-tip":IE(),"data-tip-align":"end","aria-label":IE(),children:f.jsx(H_,{size:13})}),f.jsx(Ft,{size:"small","data-tip":LE(),"data-tip-align":"end","aria-label":LE(),onClick:()=>{window.confirm(Tk({path:Ne(n.path)}))&&t(n.path)},children:f.jsx(lf,{size:13})})]}),f.jsxs("div",{className:`fpreview-body flex-1 min-h-0 overflow-auto [&.doc]:pt-4.5 [&.doc]:px-7 [&.doc]:pb-12 [&.doc_.artifact-md]:max-w-readable [&.doc_.artifact-md]:my-0 [&.doc_.artifact-md]:mx-auto ${m&&!_?"doc":""}`,children:[v,l&&f.jsx("div",{className:"file-view-note py-2.5 px-4 text-sm text-muted",children:kfe()})]})]})}function AH({entries:e,depth:n,collapsed:t,selected:r,onToggle:s,onSelect:i,onOpenFile:a,onDelete:o,renamingPath:l,onContextMenu:u,onRename:h,onCancelRename:_}){return f.jsx("div",{className:"flex w-full max-w-full min-w-0 flex-col items-stretch",children:e.map(p=>{var x;const m={paddingInlineStart:8+Math.min(n,fAn)*14};if(p.isDir){const k=!t.has(p.path);return f.jsxs("div",{className:"min-w-0 max-w-full",children:[f.jsxs("div",{className:"file-tree-row flex w-full min-w-0 items-center gap-1.5 py-[3px] px-2.5 border-0 bg-transparent text-text text-start cursor-pointer font-[inherit] [&:hover]:bg-panel [&_>_svg]:shrink-0 [&_>_svg]:text-subtext [&_>_svg.file-tree-chevron]:text-muted artifact-tree-row [&.selected]:bg-panel [&.selected:hover]:bg-panel [&:hover_.ft-row-delete]:opacity-100",style:m,onClick:()=>s(p.path),children:[f.jsx("button",{className:"file-tree-chevron text-muted shrink-0 [button&]:inline-flex [button&]:items-center [button&]:justify-center [button&]:w-[13px] [button&]:h-[13px] [button&]:p-0 [button&]:border-0 [button&]:bg-transparent [button&_>_svg]:transition-transform [button&_>_svg]:duration-120 [button&_>_svg]:ease-standard [button&_>_svg.open]:rotate-90","aria-label":k?Que({name:Ne(p.name)}):p_e({name:Ne(p.name)}),onClick:v=>{v.stopPropagation(),s(p.path)},children:f.jsx(Da,{size:13,className:k?"open":""})}),f.jsx("span",{className:"file-tree-name flex-1 min-w-0 overflow-hidden text-ellipsis whitespace-nowrap",children:p.name}),f.jsx(Ft,{size:"small",className:"ft-row-delete opacity-35 focus-visible:opacity-100","data-tip":cfe(),"data-tip-align":"end","aria-label":l_e({name:Ne(p.name)}),onClick:v=>{v.stopPropagation(),window.confirm(Tk({path:Ne(p.path)}))&&o(p.path)},children:f.jsx(lf,{size:12})})]}),k&&(((x=p.children)==null?void 0:x.length)??0)>0&&f.jsx(AH,{entries:p.children??[],depth:n+1,collapsed:t,selected:r,onToggle:s,onSelect:i,onOpenFile:a,onDelete:o,renamingPath:l,onContextMenu:u,onRename:h,onCancelRename:_})]},p.path)}return l===p.path?f.jsxs("div",{className:"file-tree-row flex w-full min-w-0 items-center gap-1.5 py-[3px] px-2.5 border-0 bg-transparent text-text text-start font-[inherit] artifact-tree-row",style:m,children:[f.jsx(ch,{name:p.name}),f.jsx(bH,{name:p.name,onCommit:k=>h(p.path,k),onCancel:_})]},p.path):f.jsxs("button",{type:"button",className:`file-tree-row flex w-full min-w-0 items-center gap-1.5 py-[3px] px-2.5 border-0 bg-transparent text-text text-start cursor-pointer font-[inherit] [&:hover]:bg-panel [&_>_svg]:shrink-0 [&_>_svg]:text-subtext [&_>_svg.file-tree-chevron]:text-muted artifact-tree-row [&.selected]:bg-panel [&.selected:hover]:bg-panel [&:hover_.ft-row-delete]:opacity-100 ${r===p.path?"selected":""}`,style:m,title:lQ({path:Ne(p.path)}),"aria-keyshortcuts":"Space Enter","aria-pressed":r===p.path,onClick:()=>i(p.path),onDoubleClick:()=>a(p.path),onContextMenu:k=>{k.preventDefault(),i(p.path),u(k,p.path)},onAuxClick:k=>{k.button===1&&(k.preventDefault(),i(p.path),a(p.path))},onKeyDown:k=>{if(k.key==="ContextMenu"||k.shiftKey&&k.key==="F10"){k.preventDefault(),i(p.path),u(k,p.path);return}if(k.key===" "){k.preventDefault(),k.stopPropagation(),i(p.path);return}k.key==="Enter"&&(k.preventDefault(),k.stopPropagation(),i(p.path),a(p.path))},children:[f.jsx(ch,{name:p.name}),f.jsx("span",{className:"file-tree-name flex-1 min-w-0 overflow-hidden text-ellipsis whitespace-nowrap",children:p.name})]},p.path)})})}function bAn({project:e,artifacts:n,onOpenFile:t,canRenameFile:r}){const[s,i]=A.useState(null),[a,o]=A.useState(()=>pAn(e.id)),[l,u]=A.useState(hAn),[h,_]=A.useState(null),[p,m]=A.useState(null),x=A.useRef(null);A.useEffect(()=>{try{localStorage.setItem(`${NH}${e.id}`,JSON.stringify([...a]))}catch{}},[e.id,a]);const k=E=>{var I;E.preventDefault(),E.currentTarget.setPointerCapture(E.pointerId);const T=(I=x.current)==null?void 0:I.getBoundingClientRect(),j=document.body.style.userSelect;document.body.style.userSelect="none";const M=P=>{const U=Math.round(P.clientX-((T==null?void 0:T.left)??0)),q=Math.min(Math.max(U,zH),jH);u(q);try{localStorage.setItem(EH,String(q))}catch{}},D=()=>{window.removeEventListener("pointermove",M),window.removeEventListener("pointerup",D),window.removeEventListener("pointercancel",D),document.body.style.userSelect=j};window.addEventListener("pointermove",M),window.addEventListener("pointerup",D),window.addEventListener("pointercancel",D)};A.useEffect(()=>{if(!s||!n)return;const E=L0(n.entries,s);(!E||E.isDir)&&i(null)},[s,n]);const v=E=>o(T=>{const j=new Set(T);return j.has(E)?j.delete(E):j.add(E),j}),b=E=>{(s===E||s!=null&&s.startsWith(E+"/"))&&i(null),D0n(e.id,E).catch(()=>{})},w=async(E,T)=>{try{await L0n(e.id,E,T),T.action==="rename"&&s===E&&i(null)}catch(j){Vn(j instanceof Error?j.message:String(j),"error")}},y=E=>{n&&vH(n.dir,E)};if(!n)return f.jsx("div",{className:"files-tab h-full min-h-0 flex bg-background",children:f.jsxs(os,{className:"p-5",children:[f.jsx(Rt,{})," ",qfe()]})});const C=E=>f.jsx(AH,{entries:E,depth:0,collapsed:a,selected:s,onToggle:v,onSelect:i,onOpenFile:t,onDelete:b,renamingPath:p,onContextMenu:(T,j)=>{_(yH(T,j))},onRename:(T,j)=>{m(null),w(T,{action:"rename",newName:j})},onCancelRename:()=>m(null)}),N=s?L0(n.entries,s):null;return n.entries.length===0?f.jsx(J6,{icon:tS,title:rde(),description:mde()}):f.jsxs("div",{className:"files-tab h-full min-h-0 flex bg-background @container",children:[f.jsxs("div",{className:"ftree-pane relative shrink-0 flex flex-col min-h-0 border-s border-s-border-variant border-e border-e-border-variant bg-background [@container((max-width:_720px))]:!w-full",ref:x,style:{width:l},children:[f.jsx("div",{className:"ftree-resizer absolute -end-[3px] top-0 bottom-0 w-1.5 cursor-col-resize z-30 [&:hover]:bg-resizer-hover [&:active]:bg-resizer-hover [@container((max-width:_720px))]:hidden",onPointerDown:k}),f.jsxs("div",{className:"ftree-scroll flex-1 min-h-0 overflow-y-auto file-tree py-1.5 px-0 text-sm",children:[C(n.entries),n.truncated&&f.jsx("p",{className:"files-truncated m-0 py-2 px-3.5 text-sm text-muted",children:Tfe()})]})]}),N?f.jsx(vAn,{projectId:e.id,entry:N,onDelete:b,artifactEntries:n.entries},N.path):f.jsxs("div",{className:"fpreview flex-1 min-w-0 flex flex-col min-h-0 bg-background fpreview-none items-center justify-center gap-2 text-sm text-muted [@container((max-width:_720px))]:hidden",children:[f.jsx(Nbn,{size:22,strokeWidth:1.5}),f.jsx("span",{children:X_e()})]}),h&&f.jsx(xH,{target:h,onOpen:()=>t(h.path),onRename:r(h.path)?()=>m(h.path):void 0,onDuplicate:()=>void w(h.path,{action:"duplicate"}),onCopyPath:()=>y(h.path),onDelete:()=>{window.confirm(Tk({path:Ne(h.path)}))&&b(h.path)},onClose:()=>_(null)})]})}const RH=20*1024*1024,MH="bg-background border border-border rounded-lg py-4 px-4.5 mb-4 [&_h3]:mt-0 [&_h3]:mx-0 [&_h3]:mb-2.5 [&_h3]:text-base [&_h3]:font-semibold [&_h3]:text-text",OH="mt-0 mx-0 mb-3 text-sm leading-relaxed text-text",yAn="flex items-start gap-3 py-2.5 border-t border-t-border first:border-t-0",xAn="text-sm font-normal text-text",wAn="mt-1 mb-0 text-sm leading-relaxed text-text";function DH(e){return new Promise((n,t)=>{const r=new FileReader;r.onload=()=>{const s=r.result;if(typeof s!="string"){t(new Error("could not read file"));return}const i=s.indexOf(",");n(i>=0?s.slice(i+1):s)},r.onerror=()=>t(r.error??new Error("could not read file")),r.readAsDataURL(e)})}function kAn(e){const n=e.toLowerCase();return n.endsWith(".md")||n.endsWith(".markdown")||n.endsWith(".zip")}function LH({accept:e,busy:n,prompt:t,onFile:r}){const[s,i]=A.useState(!1),a=A.useRef(null);return f.jsxs("div",{className:`flex flex-col items-center justify-center gap-2 py-6.5 px-4.5 border-[1.5px] border-dashed rounded-md text-center text-sm text-text transition-[border-color,background] duration-120 ${n?"cursor-default":"cursor-pointer"} ${s?"border-primary bg-surface text-text":"border-border-variant bg-surface [&:hover]:border-primary"}`,onDragOver:o=>{o.preventDefault(),i(!0)},onDragLeave:()=>i(!1),onDrop:o=>{var u;if(o.preventDefault(),i(!1),n)return;const l=(u=o.dataTransfer.files)==null?void 0:u[0];l&&r(l)},onClick:()=>{var o;n||(o=a.current)==null||o.click()},role:"button",tabIndex:0,"aria-disabled":n,"aria-busy":n,onKeyDown:o=>{var l;(o.key==="Enter"||o.key===" ")&&!n&&(o.preventDefault(),(l=a.current)==null||l.click())},children:[f.jsx("input",{ref:a,type:"file",accept:e,hidden:!0,onChange:o=>{var u;const l=(u=o.target.files)==null?void 0:u[0];l&&r(l),o.target.value=""}}),n?f.jsxs(f.Fragment,{children:[f.jsx(Rt,{}),f.jsx("span",{children:urn()})]}):f.jsxs(f.Fragment,{children:[f.jsx(eyn,{size:20,strokeWidth:1.5}),f.jsx("span",{children:t})]})]})}function IH({bytes:e,updatedAt:n}){return f.jsxs("div",{className:"shrink-0 text-end whitespace-nowrap pt-0.5 text-xs text-subtext",children:[Kl(e),n>0&&f.jsxs("span",{className:"text-muted",children:[" · ",Vo(n)]})]})}function SAn({skill:e,onError:n}){const t=vn({mutationFn:imn}),r=t.isPending;return f.jsxs("div",{className:"flex items-center gap-2 py-1 border-t border-t-border first:border-t-0",children:[f.jsxs("div",{className:"flex-1 min-w-0 flex items-center gap-2",children:[f.jsx("span",{className:xAn,children:e.name}),e.origin&&f.jsx(Gt,{size:"small",children:e.origin})]}),f.jsx(IH,{bytes:e.bytes,updatedAt:e.updatedAt}),f.jsx(Ft,{size:"small","data-tip":e.origin?dtn():lnn(),"data-tip-align":"end","aria-label":e.origin?Ntn({name:Ne(e.name)}):ien({name:Ne(e.name)}),disabled:r,onClick:()=>{window.confirm(e.origin?ytn({name:Ne(e.name)}):ZJt({name:Ne(e.name)}))&&t.mutateAsync(e.name).catch(s=>{n(s instanceof Error?s.message:String(s))})},children:f.jsx(lf,{size:13})})]})}function CAn({template:e,onError:n}){const t=vn({mutationFn:nmn}),r=t.isPending,s=e.supportFiles.length;return f.jsxs("div",{className:yAn,children:[f.jsxs("div",{className:"flex-1 min-w-0",children:[f.jsx("span",{className:"text-base font-medium text-text",children:e.name}),f.jsxs("p",{className:wAn,children:[e.entry,s>0&&(s===1?Jen():Otn({count:Jt(s)}))]})]}),f.jsx(IH,{bytes:e.bytes,updatedAt:e.updatedAt}),f.jsx(Ft,{"data-tip":pnn(),"data-tip-align":"end","aria-label":ben({name:Ne(e.name)}),disabled:r,onClick:()=>{window.confirm(fen({name:Ne(e.name)}))&&t.mutateAsync(e.name).catch(i=>{n(i instanceof Error?i.message:String(i))})},children:f.jsx(lf,{size:13})})]})}function EAn(){var w;const e=vn({mutationFn:smn}),n=ft(Gmn()),t=n.data,r=A.useRef(null),[s,i]=A.useState(!1),[a,o]=A.useState(!1),l=A.useCallback(()=>{const y=r.current;i(!!y&&y.scrollTop>1),o(!!y&&y.scrollHeight-y.scrollTop-y.clientHeight>1)},[]);A.useLayoutEffect(()=>{l();const y=r.current;if(!y)return;const C=new ResizeObserver(l);return C.observe(y),()=>C.disconnect()},[t,l]);const u=n.isFetching,h=(w=n.error)==null?void 0:w.message,[_,p]=A.useState(!1),[m,x]=A.useState(null),k=()=>{n.refetch()},v=A.useRef(!1),b=A.useCallback(async y=>{if(!v.current){if(x(null),!kAn(y.name)){x(Srn());return}if(y.size>RH){x(uL());return}v.current=!0,p(!0);try{await e.mutateAsync({filename:y.name,contentBase64:await DH(y)})}catch(C){x(C instanceof Error?C.message:String(C))}finally{v.current=!1,p(!1)}}},[]);return f.jsxs("section",{className:MH,children:[f.jsxs("div",{className:"flex items-baseline gap-2.5",children:[f.jsx("h3",{children:rrn()}),f.jsxs(Me,{className:"ms-auto",size:"small",onClick:k,disabled:u,children:[f.jsx(La,{size:12,className:u?"animate-[spin_0.9s_linear_infinite]":""})," ",_m()]})]}),f.jsx("p",{className:OH,children:Een()}),f.jsx(LH,{accept:".md,.markdown,.zip",busy:_,prompt:f.jsxs(f.Fragment,{children:[f.jsx("span",{children:Men()}),f.jsx("span",{className:"block ps-4 mt-1 text-text",children:GJt()})]}),onFile:y=>void b(y)}),m&&f.jsx("div",{role:"alert",className:"mt-2.5 text-base text-accent-red whitespace-pre-wrap",children:m}),h&&f.jsxs("div",{role:"alert",className:"pt-3 text-base text-accent-red",children:[Ftn()," ",h]}),t===void 0?h?null:f.jsxs("div",{className:"flex items-center gap-2 pt-3 text-sm text-subtext",children:[f.jsx(Rt,{})," ",jnn()]}):t.length===0?f.jsx("div",{className:"pt-3 text-sm text-subtext",children:qnn()}):f.jsxs("div",{className:"relative mt-1",children:[f.jsx("div",{ref:r,onScroll:l,className:"flex flex-col max-h-120 overflow-y-auto overscroll-contain",children:t.map(y=>f.jsx(SAn,{skill:y,onError:x},y.name))}),s&&f.jsx("div",{"aria-hidden":"true",className:"pointer-events-none absolute inset-x-0 top-0 h-10 bg-gradient-to-b from-background to-transparent"}),a&&f.jsx("div",{"aria-hidden":"true",className:"pointer-events-none absolute inset-x-0 bottom-0 h-10 bg-gradient-to-t from-background to-transparent"})]})]})}function NAn(){var h;const e=vn({mutationFn:tmn}),n=ft(Umn()),t=n.data,r=(h=n.error)==null?void 0:h.message,[s,i]=A.useState(!1),[a,o]=A.useState(null),l=A.useRef(!1),u=A.useCallback(async _=>{if(l.current)return;o(null);const p=_.name.toLowerCase();if(!p.endsWith(".tex")&&!p.endsWith(".zip")){o(Arn());return}if(_.size>RH){o(uL());return}l.current=!0,i(!0);try{await e.mutateAsync({filename:_.name,contentBase64:await DH(_)})}catch(m){o(m instanceof Error?m.message:String(m))}finally{l.current=!1,i(!1)}},[]);return f.jsxs("section",{className:MH,children:[f.jsx("h3",{children:wnn()}),f.jsx("p",{className:OH,children:grn()}),f.jsx(LH,{accept:".tex,.zip",busy:s,prompt:f.jsxs(f.Fragment,{children:[f.jsx("span",{children:Pen()}),f.jsx("span",{className:"block ps-4 mt-1 text-text",children:Ion()})]}),onFile:_=>void u(_)}),a&&f.jsx("div",{role:"alert",className:"mt-2.5 text-base text-accent-red whitespace-pre-wrap",children:a}),r&&f.jsxs("div",{role:"alert",className:"pt-3 text-base text-accent-red",children:[Wtn()," ",r]}),t===void 0?r?null:f.jsxs("div",{className:"flex items-center gap-2 pt-3 text-sm text-subtext",children:[f.jsx(Rt,{})," ",Lnn()]}):t.length===0?f.jsx("div",{className:"pt-3 text-sm text-subtext",children:Xnn()}):f.jsx("div",{className:"flex flex-col mt-1",children:t.map(_=>f.jsx(CAn,{template:_,onError:o},_.name))})]})}function zAn(){return f.jsxs("div",{className:"settings-view max-w-readable my-0 mx-auto pt-6 px-8 pb-15 [&_h1]:mt-0 [&_h1]:mx-0 [&_h1]:mb-1.5 [&_h1]:text-3xl",children:[f.jsx("h1",{children:tnn()}),f.jsx("p",{className:"mt-0 mx-0 mb-5 text-base leading-relaxed text-text",children:atn()}),f.jsx(EAn,{}),f.jsx(NAn,{})]})}const jAn="italic [&_.tab-label_>_span]:pe-1 [&_.tab-label::after]:pe-1";function Ol({active:e,label:n,icon:t,shimmer:r=!1,preview:s=!1,onSelect:i,onPromote:a,onClose:o}){return f.jsxs("button",{className:`tab [&.closable]:max-w-60 [&.closable]:pe-0.5 [&_.tab-label]:grid [&_.tab-label]:grid-cols-[minmax(0,_1fr)] [&_.tab-label]:min-w-0 [&_.tab-label]:overflow-hidden [&_.tab-label_>_span]:[grid-area:1_/_1] [&_.tab-label_>_span]:overflow-hidden [&_.tab-label_>_span]:text-ellipsis [&_.tab-label_>_span]:whitespace-nowrap [&_.tab-label::after]:[grid-area:1_/_1] [&_.tab-label::after]:overflow-hidden [&_.tab-label::after]:text-ellipsis [&_.tab-label::after]:whitespace-nowrap [&_.tab-label::after]:content-[attr(data-label)] [&_.tab-label::after]:invisible [&_.tab-label::after]:font-medium [&_.tab-close]:inline-flex [&_.tab-close]:items-center [&_.tab-close]:justify-center [&_.tab-close]:w-3.5 [&_.tab-close]:h-3.5 [&_.tab-close]:rounded-xs [&_.tab-close]:text-muted [&_.tab-close]:shrink-0 [&_.tab-close:hover]:bg-hover-strong [&_.tab-close:hover]:text-text relative inline-flex items-center gap-[5px] h-8 py-0 px-2 border border-transparent border-b-0 rounded-[var(--radius-md)_var(--radius-md)_0_0] text-sm font-normal text-subtext whitespace-nowrap select-none min-w-0 [&:hover]:bg-surface [&:hover]:text-text [&:not(.active)_+_.tab:not(.active)::before]:content-[''] [&:not(.active)_+_.tab:not(.active)::before]:absolute [&:not(.active)_+_.tab:not(.active)::before]:top-2.5 [&:not(.active)_+_.tab:not(.active)::before]:bottom-2.5 [&:not(.active)_+_.tab:not(.active)::before]:-start-px [&:not(.active)_+_.tab:not(.active)::before]:w-px [&:not(.active)_+_.tab:not(.active)::before]:bg-border [&.active]:border-border [&.active]:bg-background [&.active]:text-text [&.active]:font-medium [&.active::after]:content-[''] [&.active::after]:absolute [&.active::after]:end-0 [&.active::after]:-bottom-px [&.active::after]:start-0 [&.active::after]:h-px [&.active::after]:bg-background closable ${e?"active":""} ${s?jAn:""}`,onClick:i,onDoubleClick:a,title:s?Ton({label:n}):n,"aria-label":s?kon({label:n}):n,children:[t,f.jsx("span",{className:"tab-label","data-label":n,children:f.jsx("span",{className:r?"tool-running-shimmer":"",children:n})}),f.jsx("span",{role:"button",className:"tab-close",title:N8e(),onPointerDown:l=>l.preventDefault(),onClick:l=>{l.stopPropagation(),o()},children:f.jsx(_r,{size:12})})]})}const dR=["files-pill inline-flex items-center gap-2 min-w-0 border border-border","rounded-md py-[7px] px-[11px] bg-background text-text","no-underline [&_code]:font-mono [&_code]:text-sm","[&_code]:overflow-hidden [&_code]:text-ellipsis [&_code]:whitespace-nowrap","[&_>_svg]:shrink-0 [&_>_svg]:text-muted [a&:hover]:border-muted"].join(" ");function TAn({owner:e,repo:n,branch:t}){return!e||!n?f.jsx("span",{className:dR,children:f.jsx("code",{children:t})}):f.jsxs("a",{className:dR,href:xb(e,n,t),target:"_blank",rel:"noopener noreferrer",title:hv({name:Ne(t)}),children:[f.jsx("code",{children:t}),f.jsx(Rb,{size:12})]})}const c4=["experiment-overview-section mt-5.5 pt-4.5 border-t border-t-border-variant","[&_h2]:mt-0 [&_h2]:mx-0 [&_h2]:mb-3.5 [&_h2]:text-text [&_h2]:text-sm","[&_h2]:font-semibold"].join(" "),hR=["experiment-overview-command block mt-[13px] text-text text-sm","wrap-anywhere"].join(" ");function pR(e){return new Date(e).toLocaleString(z(),{month:"short",day:"numeric",year:"numeric",hour:"numeric",minute:"2-digit"})}function mR(e,n){return g0((e.endedAt??n)-e.createdAt)}function AAn({experiment:e,parentExperiment:n,project:t,runs:r,onOpenLogs:s,onOpenCode:i}){const a=r[0]??null,o=r.some(h=>h.status==="running"||h.status==="starting"),[l,u]=A.useState(()=>Date.now());return A.useEffect(()=>{if(!o)return;u(Date.now());const h=window.setInterval(()=>u(Date.now()),1e3);return()=>window.clearInterval(h)},[o]),f.jsx("div",{className:"experiment-overview absolute inset-0 overflow-y-auto bg-background [&_h1]:m-0 [&_h1]:text-text [&_h1]:text-xl [&_h1]:leading-tight",children:f.jsxs("div",{className:"experiment-overview-inner w-full max-w-230 my-0 mx-auto pt-6.5 px-7 pb-10 [@media((max-width:_720px))]:pt-5 [@media((max-width:_720px))]:px-4.5 [@media((max-width:_720px))]:pb-8",children:[f.jsxs("header",{className:"experiment-overview-head flex items-start justify-between gap-6",children:[f.jsxs("div",{className:"experiment-overview-heading min-w-0",children:[f.jsx("h1",{children:e.title||e.slug}),f.jsx("div",{className:"experiment-overview-slug mt-[5px] text-muted text-sm",children:e.slug})]}),f.jsx(Jl,{status:a?Zi(a):"idle"})]}),f.jsxs("div",{className:"experiment-overview-actions flex gap-[7px] mt-4.5 [@media((max-width:_720px))]:flex-wrap",children:[a&&f.jsxs(Me,{...qr(h=>s(a.id,h)),children:[f.jsx(co,{size:15}),XRe()]}),f.jsxs(Me,{...qr(i),children:[f.jsx(Eb,{size:15}),tRe()]})]}),e.description&&f.jsxs("section",{className:"experiment-overview-section mt-5.5 pt-4.5 border-t border-t-border-variant [&_h2]:mt-0 [&_h2]:mx-0 [&_h2]:mb-3.5 [&_h2]:text-text [&_h2]:text-sm [&_h2]:font-semibold overview-description [&_.md]:text-text [&_.md]:leading-[1.65]",children:[f.jsx("h2",{children:wRe()}),f.jsx(Wo,{text:e.description})]}),f.jsxs("section",{className:c4,children:[f.jsx("h2",{children:a?WAe():SMe()}),a&&f.jsxs(f.Fragment,{children:[f.jsxs("div",{className:"experiment-overview-meta flex items-center flex-wrap gap-y-2.5 gap-x-4.5 text-text text-sm [&_svg]:text-muted [&_.backend-badge]:text-text [&_.status-badge]:text-text [&_>_span]:inline-flex [&_>_span]:items-center [&_>_span]:gap-[5px] [&_code]:text-text [&_code]:text-xs",children:[f.jsx(Jl,{status:Zi(a)}),f.jsx(pS,{backend:a.backend}),f.jsxs("span",{title:gMe(),children:[f.jsx(pvn,{size:13}),pR(a.createdAt)]}),f.jsxs("span",{title:jRe(),children:[f.jsx(zvn,{size:13}),mR(a,l)]}),a.commitSha&&f.jsxs("span",{title:lRe(),children:[f.jsx(nbn,{size:14}),f.jsx("code",{children:a.commitSha.slice(0,7)})]}),a.exitCode!==null&&a.exitCode!==void 0&&a.exitCode!==0&&f.jsxs("span",{children:[LRe()," ",a.exitCode]})]}),a.command&&f.jsxs("code",{className:hR,children:["$ ",a.command]}),a.resultMarkdown&&f.jsx("div",{className:`experiment-overview-result mt-4 [&.failed]:text-accent-red ${a.status==="failed"?"failed":""}`,children:f.jsx(Wo,{text:a.resultMarkdown})})]})]}),f.jsxs("section",{className:c4,children:[f.jsx("h2",{children:"Git"}),f.jsxs("div",{className:"experiment-overview-meta flex items-center flex-wrap text-text text-sm [&_svg]:text-muted [&_.backend-badge]:text-text [&_.status-badge]:text-text [&_>_span]:inline-flex [&_>_span]:items-center [&_>_span]:gap-[5px] [&_code]:text-text [&_code]:text-xs experiment-overview-git-meta gap-y-[9px] gap-x-3.5 [&_.files-pill]:py-[5px] [&_.files-pill]:px-2 [&_.files-pill]:rounded-sm [&_.files-pill_code]:text-xs",children:[f.jsx(TAn,{owner:t.githubEnabled?t.githubOwner:"",repo:t.githubEnabled?t.githubRepo:"",branch:e.branchName}),n&&f.jsxs("span",{children:[qRe()," ",f.jsx("code",{children:n.slug})]}),f.jsxs("span",{title:pR(e.createdAt),children:[pRe()," ",Vo(e.createdAt)]})]}),e.runCommand!==(a==null?void 0:a.command)&&f.jsxs("code",{className:hR,children:["$ ",e.runCommand]})]}),r.length>0&&f.jsxs("section",{className:c4,children:[f.jsx("h2",{children:uMe()}),f.jsx("div",{className:"experiment-run-history border-t border-t-border-variant [&_button]:w-full [&_button]:grid [&_button]:grid-cols-[minmax(72px,_0.7fr)_minmax(100px,_1fr)_minmax(70px,_0.7fr)_60px_16px] [&_button]:items-center [&_button]:gap-3.5 [&_button]:py-[11px] [&_button]:px-0.5 [&_button]:border-b [&_button]:border-b-border-variant [&_button]:text-text [&_button]:text-start [&_button]:text-sm [&_button:hover]:bg-surface [@media((max-width:_720px))]:[&_button]:grid-cols-[65px_1fr_60px_16px] [@media((max-width:_720px))]:[&_button_>_:nth-child(3)]:hidden",children:r.map((h,_)=>f.jsxs("button",{...qr(p=>s(h.id,p)),children:[f.jsxs("span",{className:"experiment-run-number text-xs font-medium",children:[rMe()," ",r.length-_]}),f.jsx(Jl,{status:Zi(h)}),f.jsx("span",{children:Vo(h.createdAt)}),f.jsx("span",{children:mR(h,l)}),f.jsx(co,{size:13})]},h.id))})]})]})})}function gR(e){const n=atob(e),t=new Uint8Array(n.length);for(let r=0;r{const t=n.current;if(!t)return;const{terminal:r,dispose:s}=zb(t,!0);let i=!1,a=0,o=!1,l=!1;async function u(){if(o){l=!0;return}o=!0;try{for(;;){const _=await Npn(e,a);if(i)return;if(_.dataBase64&&r.write(gR(_.dataBase64)),a=_.nextOffset,_.eof)break}}catch{}finally{o=!1,l&&!i&&(l=!1,u())}}const h=Zmn(e,_=>{if(i)return;const p=gR(_.dataBase64);!o&&_.offset===a?(r.write(p),a+=p.length):_.offset+p.length>a&&u()});return u(),()=>{i=!0,h(),s()}},[e]),f.jsx("div",{ref:n,className:"h-full w-full"})}function MAn({experiment:e,project:n,view:t,runs:r,selectedRunId:s,onSelectRun:i,parentExperiment:a,onOpenView:o,onOpenCode:l}){const u=r.filter(h=>h.experimentId===e.id).sort((h,_)=>_.createdAt-h.createdAt);return t==="overview"?f.jsx(AAn,{experiment:e,parentExperiment:a,project:n,runs:u,onOpenLogs:(h,_)=>o("terminal",h,_),onOpenCode:h=>l("files",h)}):f.jsx(OAn,{experiment:e,expRuns:u,selectedRunId:s,onSelectRun:i})}function OAn({experiment:e,expRuns:n,selectedRunId:t,onSelectRun:r}){const[s,i]=A.useState(null),[a,o]=A.useState(null),[l,u]=A.useState(!1),h=A.useRef(null),_=t?n.find(v=>v.id===t)??null:n[0]??null,p=(_==null?void 0:_.status)==="running"||(_==null?void 0:_.status)==="starting",m=!!(_&&p&&(_.cancelRequested||a===_.id)),x=v=>{const b=n.findIndex(w=>w.id===v);return b===-1?n.length:n.length-b};A.useEffect(()=>{if(!l)return;const v=b=>{var w;(w=h.current)!=null&&w.contains(b.target)||u(!1)};return document.addEventListener("mousedown",v),()=>document.removeEventListener("mousedown",v)},[l]);async function k(){if(_){i(null),o(_.id);try{await bL(_.id)}catch(v){o(null),i(v instanceof Error?v.message:String(v))}}}return f.jsxs("div",{className:"term-view absolute inset-0 flex flex-col bg-background z-20",children:[f.jsxs("div",{className:"term-bar flex items-center gap-2 h-10 py-0 px-2.5 border-b border-b-border shrink-0 [&_.error]:text-sm [&_.error]:text-accent-red [&_.btn]:inline-flex [&_.btn]:items-center [&_.btn]:gap-[5px]",children:[f.jsx("div",{className:"term-title min-w-0 text-sm font-semibold text-text overflow-hidden text-ellipsis whitespace-nowrap",title:e.title||e.slug,children:e.title||e.slug}),f.jsx("span",{className:"flex-1"}),s&&f.jsx("span",{className:"error",role:"alert",children:s}),p&&f.jsxs(Me,{size:"small",variant:"ghost",disabled:m,onClick:()=>void k(),children:[f.jsx(dI,{size:13}),m?N9e():dD()]}),n.length>0&&_&&f.jsxs("div",{className:"run-history relative shrink-0",ref:h,children:[f.jsxs(Me,{title:BTe(),"aria-expanded":l,onClick:()=>u(v=>!v),children:[f.jsxs("span",{children:[pN()," ",x(_.id)]}),f.jsx(Jl,{status:m?"cancelling":Zi(_)}),f.jsx(Zo,{size:14,className:"run-picker-chev text-muted shrink-0"})]}),l&&f.jsx("div",{className:"history-menu absolute top-[calc(100%_+_6px)] end-0 min-w-57.5 max-h-80 overflow-y-auto bg-background border border-border rounded-lg shadow-menu p-[5px] z-50",children:n.map(v=>f.jsxs(nr,{className:"justify-start",active:v.id===(_==null?void 0:_.id),onClick:()=>{r(v.id),u(!1)},children:[f.jsxs("span",{className:"font-medium",children:[pN()," ",x(v.id)]}),f.jsx(Jl,{status:Zi(v)}),f.jsx("span",{className:"ms-auto text-xs text-muted",children:Vo(v.createdAt)})]},v.id))})]})]}),f.jsx("div",{className:"term-fill flex-1 min-h-0 bg-terminal pt-1 pe-0 pb-1 ps-1.5",children:_?f.jsx(RAn,{runId:_.id},_.id):f.jsx("div",{className:"term-empty h-full flex items-center justify-center p-6 text-center text-sm text-muted",children:t?so():ETe()})})]})}let F5=!1;function vR(e){F5=!0;try{return window.confirm(e)}finally{F5=!1}}const H5=e=>e.replace(/\r\n/g,` +${ne.error}`:ne.text,children:[ne.dispatchState==="blocked"?f.jsx(iS,{size:13,className:"shrink-0 text-accent-amber"}):f.jsx(hbn,{size:13,className:"shrink-0 text-muted"}),f.jsx("span",{className:"flex-1 overflow-hidden text-ellipsis whitespace-nowrap text-text",children:ne.text}),ne.dispatchState!=="blocked"&&f.jsx("span",{className:"shrink-0 text-sm text-muted",children:ne.dispatchState==="retrying"?nkn(ne.nextRetryAt,bo):DSe()}),ne.dispatchState==="blocked"?f.jsxs(f.Fragment,{children:[f.jsx("button",{onClick:()=>void Ih(ne.id),"aria-label":RZ({text:ne.text}),disabled:cn!==null,className:"shrink-0 px-1.5 py-0.5 border border-border rounded-sm text-sm text-text bg-background cursor-pointer disabled:opacity-50 disabled:cursor-default [&:hover:not(:disabled)]:border-text",children:cn===ne.id?HD():Vs()}),f.jsx("button",{onClick:()=>Pu(ne.id),"aria-label":CZ({text:ne.text}),disabled:cn!==null,className:"shrink-0 px-1.5 py-0.5 border-0 text-sm text-muted bg-transparent cursor-pointer disabled:opacity-50 disabled:cursor-default [&:hover:not(:disabled)]:text-text",children:Gwe()}),be===pi&&bePu(ne.id),className:"shrink-0 inline-flex items-center justify-center w-4 h-4 p-0 border-0 rounded-full text-muted cursor-pointer [&:hover]:bg-text [&:hover]:text-background",children:f.jsx(_r,{size:11})})]},ne.id))}),bc&&f.jsxs("div",{id:$u,role:"note",className:`composer-demo-hint ${lR}`,children:[f.jsx(Jd,{size:16,className:"shrink-0 text-primary"}),f.jsx("span",{className:"flex-1",dir:"auto",children:Dbe()}),f.jsx(Ft,{size:"small","aria-label":Pg(),title:Pg(),onClick:()=>{var ne;ae(!0),(ne=Lt.current)==null||ne.focus()},children:f.jsx(_r,{size:14})})]}),b&&!re&&l&&f.jsxs("div",{role:"note",className:`composer-demo-run-hint ${lR}`,children:[f.jsx(Jd,{size:16,className:"shrink-0 text-primary"}),f.jsxs("span",{className:"flex flex-1 flex-wrap items-center gap-x-1.5 gap-y-1",dir:"auto",children:[f.jsx("span",{children:WE()}),f.jsxs(Me,{size:"small",onClick:()=>l(b,"keepOpen"),children:[f.jsx(co,{size:14}),Z4()]}),f.jsx("span",{children:KE()})]}),f.jsx(Ft,{size:"small","aria-label":Pg(),title:Pg(),onClick:()=>{var ne;X(!0),(ne=Lt.current)==null||ne.focus()},children:f.jsx(_r,{size:14})})]}),f.jsx("span",{className:"sr-only",role:"status","aria-live":"polite",children:b?`${WE()} ${Z4()} ${KE()}`:""}),f.jsxs("div",{className:`composer-box relative flex flex-col border ${jr?"border-accent-amber":"border-border"} rounded-lg bg-background shadow-elevated`,"data-onboarding":"composer",children:[ot&&!ot.agentReady&&f.jsxs("div",{className:"composer-harness-warning py-2 px-3 text-subtext text-sm leading-normal border-b border-b-border-variant [&_strong]:text-accent-amber [&_strong]:font-medium [&_code]:font-mono [&_code]:text-text",children:[f.jsxs("strong",{children:[ot.name," ",nxe()]})," ",ot.agentNote?eh(ot.agentNote):WSe()]}),Oi&&f.jsx(rTn,{skills:ks,activeIndex:Zr,onPick:Zs,onHover:Qs}),oe.length>0&&f.jsx(MTn,{annotations:oe,onClear:()=>{le([]),window.requestAnimationFrame(()=>{var ne;return(ne=Lt.current)==null?void 0:ne.focus()})},onRemove:ne=>{const be=oe.filter(De=>De.id!==ne);le(be),be.length===0&&window.requestAnimationFrame(()=>{var De;return(De=Lt.current)==null?void 0:De.focus()})}}),Ee.length>0&&f.jsx("div",{className:"composer-attachments flex flex-wrap gap-1.5 pt-2 px-3 pb-0",children:Ee.map((ne,be)=>{const De=()=>Ie($e=>$e.filter((Ke,Nn)=>Nn!==be));return ne.mediaType==="application/pdf"?f.jsxs("div",{className:"attachment-file [&_button]:absolute [&_button]:-top-[5px] [&_button]:-right-[5px] [&_button]:inline-flex [&_button]:items-center [&_button]:justify-center [&_button]:w-4 [&_button]:h-4 [&_button]:p-0 [&_button]:border [&_button]:border-border [&_button]:rounded-full [&_button]:bg-surface [&_button]:text-text [&_button]:cursor-pointer [&_button:hover]:bg-text [&_button:hover]:text-background relative inline-flex items-center gap-2 max-w-55 py-2 px-2.5 border border-border rounded-sm text-text bg-surface [&_svg]:shrink-0 [&_svg]:text-muted",title:ne.name,children:[f.jsx(Cb,{size:22}),f.jsx("span",{className:"attachment-file-name overflow-hidden text-ellipsis whitespace-nowrap text-sm",children:ne.name??"document.pdf"}),f.jsx("button",{title:rN(),"aria-label":rN(),onClick:De,children:f.jsx(_r,{size:11})})]},be):f.jsxs("div",{className:"attachment-thumb relative [&_img]:w-13 [&_img]:h-13 [&_img]:object-cover [&_img]:border [&_img]:border-border [&_img]:rounded-sm [&_img]:block [&_button]:absolute [&_button]:-top-[5px] [&_button]:-right-[5px] [&_button]:inline-flex [&_button]:items-center [&_button]:justify-center [&_button]:w-4 [&_button]:h-4 [&_button]:p-0 [&_button]:border [&_button]:border-border [&_button]:rounded-full [&_button]:bg-surface [&_button]:text-text [&_button]:cursor-pointer [&_button:hover]:bg-text [&_button:hover]:text-background",children:[f.jsx("img",{src:ne.dataUrl,alt:aD()}),f.jsx("button",{title:sN(),"aria-label":sN(),onClick:De,children:f.jsx(_r,{size:11})})]},be)})}),ze&&f.jsx("div",{className:"composer-attach-error pt-1.5 px-3 pb-0 text-sm text-accent-red",role:"alert",children:ze}),mt&&f.jsx("div",{className:"composer-settings-error pt-1.5 px-3 pb-0 text-sm text-accent-red",role:"alert",children:mt}),f.jsxs("div",{className:`composer-input relative flex overflow-hidden [&_textarea]:flex-1 ${jr?"[&_textarea]:font-mono [&_textarea]:text-sm":""}`,children:[f.jsx("textarea",{dir:"auto",ref:Lt,"aria-describedby":bc?$u:void 0,className:"relative z-1 bg-transparent",value:V,placeholder:Ct?jCe():ha&&ot?L7e({harness:Ne(qp[ot.id]),shortcut:Ne(xf)}):Qt?ot!=null&&ot.agentReady?H0e({harness:Ne(qp[Qt.harness])}):D0e({harness:Ne(qp[Qt.harness])}):Bhe(),rows:2,onPaste:al,onDragOver:ne=>{ne.dataTransfer.types.includes("Files")&&ne.preventDefault()},onDrop:ne=>{ne.dataTransfer.files.length!==0&&(ne.preventDefault(),fa(Array.from(ne.dataTransfer.files)))},onChange:ne=>{const be=ne.target.value,De=ne.target.selectionStart;Ur(De);const $e=De>0&&/\s/.test(be[De-1])&&!Ct&&!Ys.current&&YA(be)===null?t4(be,De-1):null;if(($e==null?void 0:$e.query)==="plan"&&(Wt!=null&&Wt.planActivation)){dc(be,$e);return}ee(be),xs(!1)},onSelect:ne=>Ur(ne.currentTarget.selectionStart),onCompositionStart:()=>{Ys.current=!0},onCompositionEnd:()=>{Ys.current=!1},onKeyDown:ne=>{if(Oi){if(ne.key==="ArrowDown"||ne.key==="ArrowUp"){ne.preventDefault();const be=ne.key==="ArrowDown"?1:-1;Qs((Zr+be+ks.length)%ks.length);return}if(ne.key==="Tab"||ne.key==="Enter"){ne.preventDefault(),Zs(ks[Zr]);return}if(ne.key==="Escape"){ne.preventDefault(),xs(!0);return}}if(ne.key==="Backspace"&&sr(ne.currentTarget)){ne.preventDefault();return}if(ne.key==="Enter"&&!ne.shiftKey&&!ne.nativeEvent.isComposing){if(ne.preventDefault(),jr){mi();return}fl({queue:ne.metaKey||ne.ctrlKey})}}}),f.jsx(lTn,{text:V,editingTokenEnd:Ln==null?void 0:Ln.end,isCommand:$i,skills:Ri,projectId:e,textareaRef:Lt})]}),f.jsxs("div",{className:"composer-actions flex min-w-0 justify-end items-center gap-2 pt-1.5 px-2 pb-2",children:[f.jsxs("div",{className:"option-picker relative inline-flex shrink-0",ref:Kn.ref,children:[f.jsx(Ft,{type:"button",className:"composer-bare",title:H2(),"aria-label":H2(),"aria-haspopup":"dialog","aria-expanded":Kn.open,onClick:()=>Kn.setOpen(ne=>!ne),children:f.jsx(Oyn,{size:16})}),Kn.open&&f.jsxs("div",{className:"composer-sources-menu absolute bottom-[calc(100%_+_8px)] start-0 z-50 flex min-w-55 flex-col gap-1 rounded-md border border-border bg-background p-2 shadow-dropdown",children:[f.jsx("span",{className:"px-1 text-sm font-medium text-muted",children:H2()}),f.jsx(bkn,{})]})]}),f.jsx("input",{ref:Qe,type:"file",accept:"application/pdf,image/png,image/jpeg,image/gif,image/webp",multiple:!0,hidden:!0,onChange:ne=>{fa(Array.from(ne.target.files??[])),ne.target.value=""}}),f.jsx(Ft,{type:"button",className:"composer-attach",title:qE(),"aria-label":qE(),onClick:()=>{var ne;return(ne=Qe.current)==null?void 0:ne.click()},children:f.jsx(myn,{size:16})}),Gr&&f.jsxs(Me,{type:"button",variant:"ghost",active:!0,className:"group",title:ZE(),"aria-label":ZE(),onClick:()=>void ol(),children:[f.jsxs("span",{className:"relative size-4","aria-hidden":"true",children:[f.jsx(Qbn,{className:"absolute inset-0 transition-opacity group-hover:opacity-0 group-focus-visible:opacity-0",size:16,strokeWidth:1.6}),f.jsx(_r,{className:"absolute inset-0 opacity-0 transition-opacity group-hover:opacity-100 group-focus-visible:opacity-100",size:16,strokeWidth:1.8})]}),f.jsx("span",{children:m2e()})]}),jr&&f.jsxs(Me,{type:"button",variant:"ghost",active:!0,className:"group",title:YE(),"aria-label":YE(),onClick:Bu,children:[f.jsxs("span",{className:"relative size-4","aria-hidden":"true",children:[f.jsx(of,{className:"absolute inset-0 transition-opacity group-hover:opacity-0 group-focus-visible:opacity-0",size:16,strokeWidth:1.6}),f.jsx(_r,{className:"absolute inset-0 opacity-0 transition-opacity group-hover:opacity-100 group-focus-visible:opacity-100",size:16,strokeWidth:1.8})]}),f.jsx("span",{children:nD()})]}),f.jsx("div",{className:"min-w-0 flex-1"}),f.jsxs("div",{className:"flex min-w-0 items-center",children:[f.jsx(l2n,{value:Qt,onSelect:_s,onOpenSettings:()=>a("harnesses"),permissionChoices:ot!=null&&ot.agentReady?(Wt==null?void 0:Wt.permissionModes)??[]:[],defaultPermissionId:(Wt==null?void 0:Wt.defaultPermissionMode)??null,onSelectPermission:ir,reasoningChoices:ot!=null&&ot.agentReady?Is.choices:[],defaultReasoningId:Is.defaultId,onSelectReasoning:Js,lockHarness:!!Ut}),f.jsx(uTn,{usage:Ut==null?void 0:Ut.contextUsage})]}),Zn&&!Ct?f.jsx(Ft,{className:"send-btn",variant:"stop",title:cN(),"aria-label":cN(),onClick:vf,children:f.jsx(_r,{size:16})}):f.jsx(Ft,{className:`send-btn ${bc&&(ot!=null&&ot.agentReady)?"ring-2 ring-primary ring-offset-2 ring-offset-background":""}`,variant:"primary",title:jr?aN():Y4(),"aria-label":jr?aN():Y4(),onClick:()=>void(jr?mi():fl()),disabled:jr?!da||!H&&!(ot!=null&&ot.agentReady):!(ot!=null&&ot.agentReady)||!V.trim()&&Ee.length===0&&oe.length===0,children:f.jsx(gI,{size:16})})]})]})]})]})]})}const lR="flex items-center gap-2.5 mb-2.5 py-2 ps-3.5 pe-2 rounded-lg border border-border bg-surface text-text text-sm leading-normal",TAn=[],AAn=[];function Ea({className:e,...n}){return f.jsx("div",{className:vs("relative flex min-h-0 flex-1 flex-col",e),...n})}function Cd({className:e,...n}){return f.jsx("div",{className:vs("min-h-0 flex-1 overflow-auto bg-background",e),...n})}function Po({className:e,...n}){return f.jsx("div",{className:vs("shrink-0 border-b border-b-border-variant px-4 py-2 text-sm text-muted",e),...n})}const cR=["pane-content flex-1 min-h-0 relative subagent-tab-content overflow-y-auto","bg-background py-8 px-4"].join(" ");function RAn({projectId:e,sessionId:n,spawnPartId:t,onOpenFile:r,onOpenRun:s,runExperimentName:i,onOpenExperiment:a,experimentName:o,onOpenSubagent:l}){var k;const u=ft(Jl(n)),h=((k=u.data)==null?void 0:k.messages)??(u.isError?[]:null),_=T.useRef(null),p=T.useRef(null),m=T.useRef(!0);if(T.useLayoutEffect(()=>{m.current=!0;const v=_.current;v&&(v.scrollTop=v.scrollHeight)},[n,t]),T.useLayoutEffect(()=>{const v=_.current;v&&m.current&&(v.scrollTop=v.scrollHeight)},[h]),T.useEffect(()=>{const v=_.current,b=p.current;if(!v||!b)return;const w=new ResizeObserver(()=>{m.current&&(v.scrollTop=v.scrollHeight)});return w.observe(b),w.observe(v),()=>w.disconnect()},[h===null]),h===null)return f.jsx(Ea,{children:f.jsx("div",{className:cR,children:f.jsx("div",{className:"subagent-empty py-[3px] px-1 text-sm text-muted",children:Uon()})})});let x=null;for(const v of h)if(x=Yv(v.parts,t),x)break;return f.jsx(Ea,{children:f.jsx("div",{className:cR,ref:_,onScroll:v=>{const b=v.currentTarget;m.current=b.scrollHeight-b.scrollTop-b.clientHeight<60},children:f.jsx("div",{ref:p,children:x?f.jsx($F,{projectId:e,sessionId:n,children:f.jsx(gAn,{spawn:x,onOpenFile:r,onOpenRun:s,runExperimentName:i,onOpenExperiment:a,experimentName:o,onOpenSubagent:l})}):f.jsx("div",{className:"subagent-empty py-[3px] px-1 text-sm text-muted",children:Yon()})})})})}function MAn({experiment:e}){var s;const n=ft(E$(e.id)),t=n.data,r=(s=n.error)==null?void 0:s.message;return f.jsx(Cd,{className:"branch-changes [&_>_.changes-note]:mx-4 [&_>_.changes-note]:my-3.5 [&_>_.diff-explorer]:mx-4 [&_>_.diff-explorer]:mb-0 [&_>_.diff-explorer]:mt-3.5 [&_>_.openresearch-diff]:mx-4 [&_>_.openresearch-diff]:mb-0 [&_>_.openresearch-diff]:mt-3.5 [&_>_.truncated-notice]:mx-4 [&_>_.truncated-notice]:mb-0 [&_>_.truncated-notice]:mt-3.5",children:r&&!t?f.jsxs(Po,{children:[Bde()," ",Ne(r)]}):t?t.diff.trim()?f.jsxs(f.Fragment,{children:[t.truncated&&f.jsx(fB,{bytesRead:t.bytesRead,byteLimit:t.byteLimit}),f.jsx(hB,{diff:t.diff,partial:t.truncated})]}):f.jsx("div",{className:"changes-note text-sm text-muted",children:e.parentExperimentId?Jde():Rde()}):f.jsx(Po,{children:Vde()})})}function vH({view:e,onViewChange:n,showViewToggle:t=!0,branchLabel:r,branchTitle:s,githubHref:i,githubTitle:a,refreshing:o,onRefresh:l}){return f.jsxs("div",{className:"code-tab-header flex items-center gap-2 py-1.5 px-3 border-b border-b-border-variant shrink-0 [&_>_.seg]:p-0.5 [&_>_.seg]:rounded-sm [&_>_.seg_button]:py-0.5 [&_>_.seg_button]:px-2 [&_>_.seg_button]:text-sm [&_>_.seg_button]:font-medium",children:[t&&f.jsxs("div",{className:"seg inline-flex items-center gap-0.5 p-[3px] rounded-md bg-hover-subtle [&_button]:py-[3px] [&_button]:px-3 [&_button]:text-sm [&_button]:font-medium [&_button]:text-text [&_button]:rounded-sm [&_button:not(:disabled):hover]:text-text [&_button.active]:bg-background [&_button.active]:shadow-segment [&_button:disabled]:text-muted [&_button:disabled]:cursor-default",role:"group","aria-label":H8e(),children:[f.jsx("button",{type:"button",className:e==="files"?"active":"","aria-pressed":e==="files",onClick:()=>n("files"),children:Q8e()}),f.jsx("button",{type:"button",className:e==="changes"?"active":"","aria-pressed":e==="changes",onClick:()=>n("changes"),children:cD()})]}),r&&f.jsxs("span",{className:"wt-branch-chip inline-flex items-center gap-1 min-w-0 py-0.5 px-2 rounded-full bg-hover-muted text-subtext text-xs [&_>_svg]:shrink-0",title:s,children:[f.jsx(hm,{size:12}),f.jsx("span",{className:"wt-branch-name overflow-hidden text-ellipsis whitespace-nowrap",children:r})]}),i&&f.jsx(dm,{href:i,target:"_blank",rel:"noopener noreferrer",title:a,"aria-label":a,children:f.jsx(Rb,{size:13})}),f.jsx("span",{className:"flex-1"}),f.jsx(Ft,{title:hN(),"aria-label":hN(),onClick:l,children:o?f.jsx(Rt,{}):f.jsx(kyn,{size:13})})]})}const OAn=/\.(md|mdx|markdown)$/i,DAn=/\.tex$/i,LAn=/\.html?$/i,IAn=/\.(apng|avif|bmp|gif|heic|heif|ico|jpe?g|jfif|jxl|pbm|pgm|png|pnm|ppm|svg|tiff?|webp)$/i,$An=/\.(csv|tsv|xlsx?|ods)$/i,BAn=/\.(c|cc|cpp|css|go|html?|java|js|jsx|json|mjs|py|rs|sh|toml|ts|tsx|ya?ml)$/i,PAn=/\.(7z|bz2|gz|rar|tar|tgz|zip)$/i,FAn=/\.pdf$/i,HAn=/\.(docx?|log|rtf|txt)$/i;function qAn(e){return IAn.test(e)}function Y6(e){return OAn.test(e)}function bH(e){return DAn.test(e)}function UAn(e){return LAn.test(e)}function ch({name:e}){const n=Y6(e)?"markdown":qAn(e)?"image":$An.test(e)?"spreadsheet":BAn.test(e)?"code":PAn.test(e)?"archive":FAn.test(e)?"pdf":HAn.test(e)||bH(e)?"document":"file";let t;return n==="markdown"?t=f.jsxs(f.Fragment,{children:[f.jsx("path",{d:"M1 3h14v10H1z",fill:"currentColor",opacity:".18"}),f.jsx("path",{d:"M2.6 10.5v-5h1.2l1.6 2 1.6-2h1.2v5H6.8V7.6L5.4 9.3 4 7.6v2.9H2.6Zm8.5-5v2.4h1.3L10.5 10 8.6 7.9h1.3V5.5h1.2Z",fill:"currentColor"})]}):n==="image"?t=f.jsxs(f.Fragment,{children:[f.jsx("rect",{x:"1.5",y:"2",width:"13",height:"12",rx:"2",fill:"currentColor",opacity:".18"}),f.jsx("circle",{cx:"5",cy:"5.5",r:"1.4",fill:"currentColor"}),f.jsx("path",{d:"m2.8 12 3.3-3.5 2.2 2 2.1-2.5 2.8 4H2.8Z",fill:"currentColor"})]}):n==="spreadsheet"?t=f.jsxs(f.Fragment,{children:[f.jsx("rect",{x:"2",y:"1.5",width:"12",height:"13",rx:"1.5",fill:"currentColor",opacity:".2"}),f.jsx("path",{d:"M3.5 4.5h9M3.5 8h9M3.5 11.5h9M7 3v10M10.5 3v10",stroke:"currentColor",strokeWidth:"1.1"})]}):n==="code"?t=f.jsx("path",{d:"M6.2 3 1.8 8l4.4 5 1.3-1.2L4.2 8l3.3-3.8L6.2 3Zm3.6 0-1.3 1.2L11.8 8l-3.3 3.8 1.3 1.2 4.4-5-4.4-5Z",fill:"currentColor"}):n==="archive"?t=f.jsxs(f.Fragment,{children:[f.jsx("path",{d:"M2 2h12v12H2z",fill:"currentColor",opacity:".18"}),f.jsx("path",{d:"M7 2h2v2H7V2Zm0 3h2v2H7V5Zm0 3h2v2H7V8Zm-0.5 3h3v2h-3v-2Z",fill:"currentColor"})]}):t=f.jsxs(f.Fragment,{children:[f.jsx("path",{d:"M3 1.5h6l4 4v9H3v-13Z",fill:"currentColor",opacity:".2"}),f.jsx("path",{d:"M9 1.5v4h4",fill:"none",stroke:"currentColor",strokeWidth:"1.2"}),f.jsx("path",{d:"M5 8h6M5 10.5h6M5 13h4",stroke:"currentColor",strokeWidth:"1.2"})]}),f.jsx("svg",{className:`file-tree-icon w-[15px] h-[15px] shrink-0 text-muted overflow-visible [&.markdown]:text-accent-blue [&.image]:text-accent-purple [&.spreadsheet]:text-accent-green [&.code]:text-accent-orange [&.archive]:text-accent-amber [&.pdf]:text-accent-red [&.document]:text-subtext ${n}`,viewBox:"0 0 16 16","aria-hidden":"true",children:t})}function yH(e,n){const t=navigator.clipboard;if(!t){Bn(pD(),"error");return}t.writeText(`${e.replace(/[\\/]+$/,"")}/${n}`).then(()=>Bn(m0(),"success")).catch(r=>Bn(r instanceof Error?r.message:String(r),"error"))}function xH({name:e,onCommit:n,onCancel:t}){const[r,s]=T.useState(e),i=T.useRef(!1),a=()=>{if(i.current)return;i.current=!0;const o=r.trim();!o||o===e?t():n(o)};return f.jsx(Qr,{autoFocus:!0,variant:"inline",className:"min-w-0 flex-1",value:r,"aria-label":QDe({path:Ne(e)}),onFocus:o=>{const l=e.lastIndexOf(".");o.currentTarget.setSelectionRange(0,l>0?l:e.length)},onChange:o=>s(o.target.value),onClick:o=>o.stopPropagation(),onDoubleClick:o=>o.stopPropagation(),onBlur:a,onKeyDown:o=>{o.stopPropagation(),o.key==="Enter"?(o.preventDefault(),o.currentTarget.blur()):o.key==="Escape"&&(o.preventDefault(),i.current=!0,t())}})}function wH(e,n){const t=e.currentTarget.getBoundingClientRect(),r="clientX"in e?e.clientX:0,s="clientY"in e?e.clientY:0;return{path:n,x:r||t.left+16,y:s||t.top+t.height}}function kH({target:e,onOpen:n,onRename:t,onDuplicate:r,onCopyPath:s,onDelete:i,onClose:a}){const o=T.useRef(null),l=T.useRef(a);l.current=a;const[u,h]=T.useState({x:e.x,y:e.y});T.useLayoutEffect(()=>{var k;const m=o.current;if(!m)return;const x=document.activeElement instanceof HTMLElement?document.activeElement:null;return h({x:Math.max(8,Math.min(e.x,window.innerWidth-m.offsetWidth-8)),y:Math.max(8,Math.min(e.y,window.innerHeight-m.offsetHeight-8))}),(k=m.querySelector("button"))==null||k.focus(),()=>{m.contains(document.activeElement)&&(x==null||x.focus())}},[e]),T.useEffect(()=>{const m=()=>l.current(),x=v=>{var b;(b=o.current)!=null&&b.contains(v.target instanceof Node?v.target:null)||l.current()},k=v=>{if(v.key==="Tab"){v.preventDefault(),l.current();return}v.key==="Escape"&&(v.preventDefault(),v.stopPropagation(),l.current())};return document.addEventListener("pointerdown",x),window.addEventListener("blur",m),window.addEventListener("resize",m),window.addEventListener("scroll",m,!0),document.addEventListener("keydown",k,!0),()=>{document.removeEventListener("pointerdown",x),window.removeEventListener("blur",m),window.removeEventListener("resize",m),window.removeEventListener("scroll",m,!0),document.removeEventListener("keydown",k,!0)}},[]);const _=m=>{l.current(),m()},p=(m,x,k=!1)=>f.jsx(nr,{size:"compact",role:"menuitem",danger:k,onClick:()=>_(x),children:f.jsx("span",{children:m})});return Oa.createPortal(f.jsxs("div",{ref:o,role:"menu","aria-label":DDe({path:Ne(e.path)}),className:"option-menu fixed z-100 min-w-44 overflow-hidden rounded-md border border-border bg-background p-1 shadow-menu",style:{left:u.x,top:u.y},onContextMenu:m=>m.preventDefault(),onKeyDown:m=>{var b,w;if(m.key!=="ArrowDown"&&m.key!=="ArrowUp")return;m.preventDefault();const x=[...((b=o.current)==null?void 0:b.querySelectorAll("button"))??[]],k=x.indexOf(document.activeElement instanceof HTMLButtonElement?document.activeElement:x[0]),v=m.key==="ArrowDown"?1:-1;(w=x[(k+v+x.length)%x.length])==null||w.focus()},children:[p(HDe(),n),t&&p(sD(),t),r&&p(zDe(),r),p(A_e(),s),i&&p(rD(),i,!0)]}),document.body)}const B5=["file-tree-row flex items-center gap-1.5 w-full py-[3px] px-2.5 border-0","bg-transparent text-text text-start cursor-pointer font-[inherit]","[&:hover]:bg-panel [&_>_svg]:shrink-0","[&_>_svg]:text-subtext [&_>_svg.file-tree-chevron]:text-muted"].join(" "),uR=["file-tree-chevron text-muted shrink-0 [button&]:inline-flex","[button&]:items-center [button&]:justify-center [button&]:w-[13px]","[button&]:h-[13px] [button&]:p-0 [button&]:border-0 [button&]:bg-transparent","[button&_>_svg]:transition-transform [button&_>_svg]:duration-120 [button&_>_svg]:ease-standard [button&_>_svg.open]:rotate-90"].join(" ");function _R(){return{dirs:new Map,files:[]}}function SH(e){const n=_R();for(const t of e){const r=t.split("/");let s=n;for(let i=0;ii(t),title:t,children:[p?f.jsx(Jo,{size:13,className:uR}):f.jsx(Da,{size:13,className:uR}),f.jsx("span",{className:"file-tree-name flex-1 min-w-0 overflow-hidden text-ellipsis whitespace-nowrap",children:e})]}),p&&f.jsx(Z6,{node:n,parentPath:t,depth:r+1,toggled:s,onToggle:i,onOpenFile:a,renamingPath:o,onContextMenu:l,onRename:u,onCancelRename:h})]})}function Z6({node:e,parentPath:n,depth:t,toggled:r,onToggle:s,onOpenFile:i,renamingPath:a,onContextMenu:o,onRename:l,onCancelRename:u}){const h=[...e.dirs.keys()].sort((p,m)=>p.localeCompare(m)),_=[...e.files].sort((p,m)=>p.localeCompare(m));return f.jsxs(f.Fragment,{children:[h.map(p=>{const m=n?`${n}/${p}`:p;return f.jsx(GAn,{name:p,node:e.dirs.get(p),path:m,depth:t,toggled:r,onToggle:s,onOpenFile:i,renamingPath:a,onContextMenu:o,onRename:l,onCancelRename:u},`d:${m}`)}),_.map(p=>{const m=n?`${n}/${p}`:p;if(a===m&&l&&u)return f.jsxs("div",{className:B5,style:{paddingInlineStart:8+t*14},children:[f.jsx(ch,{name:p}),f.jsx(xH,{name:p,onCommit:k=>l(m,k),onCancel:u})]},`f:${m}`);const x=qr(k=>i(m,k));return f.jsxs("button",{type:"button",className:B5,style:{paddingInlineStart:8+t*14},...x,onContextMenu:k=>{o&&(k.preventDefault(),o(k,m))},onKeyDown:k=>{if(o&&(k.key==="ContextMenu"||k.shiftKey&&k.key==="F10")){k.preventDefault(),o(k,m);return}x.onKeyDown(k)},title:YX({name:Ne(m)}),children:[f.jsx(ch,{name:p}),f.jsx("span",{className:"file-tree-name flex-1 min-w-0 overflow-hidden text-ellipsis whitespace-nowrap",children:p})]},`f:${m}`)})]})}function VAn({projectId:e,project:n,experiment:t,view:r,toggled:s,onViewChange:i,onToggledChange:a,onOpenFile:o}){var E,N;const l=t.branchName,u=ft({...z$(e,{ref:l}),enabled:r==="files",subscribed:r==="files"}),h=ft({...Mv(t.chatSessionId??""),enabled:r==="files"&&!!t.chatSessionId,subscribed:r==="files"&&!!t.chatSessionId}),_=u.data,p=(E=u.error)==null?void 0:E.message,m=u.isFetching,x=E$(t.id),k=zV({queryKey:x.queryKey})>0,v=(N=h.data)!=null&&N.exists&&h.data.branch===l?t.chatSessionId??void 0:void 0,b=()=>{u.refetch()},w=T.useMemo(()=>_?SH(_.entries):null,[_]),y=r==="files"?m:k,C=T.useCallback(A=>{const j=new Set(s);j.has(A)?j.delete(A):j.add(A),a(j)},[s,a]);return f.jsxs("div",{className:"code-tab flex flex-col h-full min-h-0",children:[f.jsx(vH,{view:r,onViewChange:i,branchLabel:l,branchTitle:`Committed branch ${l}`,githubHref:n.githubEnabled?xb(n.githubOwner,n.githubRepo,l):void 0,githubTitle:XO({branch:Ne(l)}),refreshing:y,onRefresh:()=>r==="files"?b():void rt.invalidateQueries(x)}),r==="changes"?f.jsx(MAn,{experiment:t},t.id):f.jsxs(f.Fragment,{children:[(_==null?void 0:_.truncated)&&f.jsx(Po,{children:l9e()}),p&&w&&f.jsxs(Po,{children:[w9e()," ",Ne(p)]}),f.jsx(Cd,{children:w?w.dirs.size===0&&w.files.length===0?f.jsx(Po,{children:p9e()}):f.jsx("div",{className:"file-tree py-1.5 px-0 text-sm",children:f.jsx(Z6,{node:w,parentPath:"",depth:0,toggled:s,onToggle:C,onOpenFile:(A,j)=>v?o(A,v,void 0,j):o(A,void 0,l,j)})}):f.jsx(Po,{children:p?uD({error:Ne(p)}):_D()})})]})]})}function J6({icon:e,title:n,description:t}){return f.jsxs("div",{className:"flex h-full w-full min-w-0 flex-1 flex-col items-center justify-center gap-1.5 bg-background p-6 text-center text-muted",children:[f.jsx(e,{size:36,strokeWidth:1.5,className:"shrink-0"}),f.jsx("h3",{className:"mt-1.5 mb-0 max-w-full wrap-anywhere text-xl font-medium text-text",children:n}),t&&f.jsx("p",{className:"m-0 w-full max-w-105 wrap-anywhere text-base leading-[1.55] text-subtext",children:t})]})}function KAn({sessionId:e,project:n,view:t,toggled:r,onViewChange:s,onToggledChange:i,onOpenFile:a,canRenameFile:o}){var $,D,F;const l=n.id,h=(($=ft(Aa(l)).data)==null?void 0:$.some(G=>G.id===e&&G.busy))??!1,_=ft({...Mv(e??""),enabled:!!e,refetchInterval:h?5e3:!1}),p=_.data,m=e&&(p!=null&&p.exists)?{sessionId:e}:{ref:n.baselineBranch},x=ft({...z$(l,m),enabled:!e||_.isSuccess,refetchInterval:h?5e3:!1}),k=x.data,v=(D=_.error??x.error)==null?void 0:D.message,b=_.isFetching||x.isFetching,[w,y]=T.useState(null),[C,E]=T.useState(null),N=T.useCallback(()=>{e&&rt.invalidateQueries(Mv(e)),rt.invalidateQueries({queryKey:Nt("getCodeTree",l),predicate:G=>!HO(G)})},[e,l]),A=T.useRef(h);T.useEffect(()=>{A.current&&!h&&N(),A.current=h},[h,N]);const j=T.useMemo(()=>k?SH(k.entries):null,[k]),M=T.useCallback(G=>{const V=new Set(r);V.has(G)?V.delete(G):V.add(G),i(V)},[r,i]),L=e&&(p!=null&&p.exists)?p:null,I=(L==null?void 0:L.branch)??(L!=null&&L.baselineBranch?npn({branch:Ne(L.baselineBranch)}):$k()),B=((F=L==null?void 0:L.files)==null?void 0:F.length)??0,q=L?Hhn({branch:Ne(`${I}${B>0?"*":""}`)}):Qhn({branch:Ne(n.baselineBranch)}),U=L?L.branch:n.baselineBranch,W=(G,V)=>L?a(G,e,void 0,V):a(G,void 0,n.baselineBranch,V),H=(k==null?void 0:k.root)==="worktree",Y=async(G,V)=>{try{await h0n(l,G,V,{sessionId:e}),N()}catch(ee){Bn(ee instanceof Error?ee.message:String(ee),"error")}},te=G=>{const V=(k==null?void 0:k.path)??n.repoPath;yH(V,G)};return f.jsxs("div",{className:"code-tab flex flex-col h-full min-h-0 wt-tab",children:[f.jsx(vH,{view:L?t:"files",onViewChange:s,showViewToggle:!!L,branchLabel:q,branchTitle:q,githubHref:n.githubEnabled&&U?xb(n.githubOwner,n.githubRepo,U):void 0,githubTitle:U?XO({branch:Ne(U)}):void 0,refreshing:b,onRefresh:N}),v&&(p||k)&&f.jsxs(Po,{children:[Ipn()," ",Ne(v)]}),!k||e&&!p?f.jsx(Cd,{children:f.jsx(Po,{children:v?uD({error:Ne(v)}):_D()})}):L&&t==="changes"?f.jsx(Cd,{className:"wt-changes px-4 pb-6 pt-0 [&_>_:first-child]:mt-3.5",children:B===0||!L.diff?f.jsx("div",{className:"changes-note text-sm text-muted",children:kpn()}):f.jsxs(f.Fragment,{children:[L.diff.truncated&&f.jsx(fB,{bytesRead:L.diff.bytesRead,byteLimit:L.diff.byteLimit}),f.jsx(hB,{diff:L.diff.diff,partial:L.diff.truncated})]})}):f.jsxs(Cd,{children:[k.truncated&&f.jsx(Po,{children:cpn()}),j?j.dirs.size===0&&j.files.length===0?f.jsx(J6,{icon:q_,title:Tpn(),description:OFe()}):f.jsx("div",{className:"file-tree py-1.5 px-0 text-sm",children:f.jsx(Z6,{node:j,parentPath:"",depth:0,toggled:r,onToggle:M,onOpenFile:W,renamingPath:C,onContextMenu:(G,V)=>{y(wH(G,V))},onRename:(G,V)=>{E(null),Y(G,{action:"rename",newName:V})},onCancelRename:()=>E(null)})}):f.jsx(Po,{children:mpn()})]}),w&&f.jsx(kH,{target:w,onOpen:()=>W(w.path,"keepOpen"),onRename:H&&o(w.path)?()=>E(w.path):void 0,onDuplicate:H?()=>void Y(w.path,{action:"duplicate"}):void 0,onCopyPath:()=>te(w.path),onDelete:H?()=>{window.confirm(xDe({path:Ne(w.path)}))&&Y(w.path,{action:"delete"})}:void 0,onClose:()=>y(null)})]})}function CH({text:e,path:n,highlightLine:t,scrollRequest:r,onScrollRequestHandled:s}){const i=T.useMemo(()=>{if(!e)return[];const h=e.replace(/\r\n?/g,` +`),_=v$(h,mS(n));return h.endsWith(` +`)?_.slice(0,-1):_},[e,n]),a=t&&i.length>0?Math.min(Math.max(Math.trunc(t),1),i.length):void 0,o=T.useRef(null);T.useEffect(()=>{var h;r!==void 0&&(a?((h=o.current)==null||h.scrollIntoView({block:"center"}),s==null||s()):i.length===0&&(s==null||s()))},[i.length,s,r,a]);const{ruleCh:l}=e$(i.length),u=T.useMemo(()=>i.map((h,_)=>f.jsxs("div",{ref:_+1===a?o:void 0,className:`file-view-line flex items-stretch ${_+1===a?"file-view-line-highlight bg-accent-blue-subtle shadow-file-line":""}`,children:[f.jsx("span",{"data-line":_+1,className:`${JI} before:content-[attr(data-line)] shrink-0 pe-[1ch]`,style:{width:`${l}ch`},"aria-hidden":"true"}),f.jsx("code",{className:`file-view-code flex-1 min-w-0 ps-[2ch] pe-4 ${Av} ${ZI}`,children:b$(h)?f.jsx("br",{}):h})]},_)),[i,l,a]);return f.jsxs("div",{className:`file-view-codewrap relative py-3.5 ${Av}`,children:[i.length>0&&f.jsx("div",{className:"absolute start-0 top-0 bottom-0 border-e border-e-border-variant pointer-events-none",style:{width:`${l}ch`},"aria-hidden":"true"}),u]})}function EH(e){return e==="image"||e==="audio"||e==="video"||e==="pdf"?e:null}function fR({url:e,name:n}){return f.jsxs("div",{className:"file-view-note py-2.5 px-4 text-sm text-muted",children:[lYe()," ",f.jsxs("a",{href:e,download:n,children:[mv()," ",Ne(n)]})]})}function P5({kind:e,url:n,name:t,downloadBar:r=!0}){const[s,i]=T.useState(!1);if(T.useEffect(()=>i(!1),[e,n]),s)return f.jsx(fR,{url:n,name:t});let a;return e==="image"?a=f.jsx("div",{className:"fpreview-image flex min-h-0 flex-1 items-start justify-center overflow-auto p-6 [&_img]:max-w-full [&_img]:h-auto [&_img]:border [&_img]:border-border [&_img]:rounded-sm",children:f.jsx("img",{src:n,alt:t,onError:()=>i(!0)})}):e==="audio"?a=f.jsx("div",{className:"flex min-h-0 flex-1 items-center justify-center p-6",children:f.jsx("audio",{className:"w-full max-w-160",controls:!0,preload:"metadata",src:n,"aria-label":t,onError:()=>i(!0)})}):e==="video"?a=f.jsx("div",{className:"flex min-h-0 flex-1 items-center justify-center p-6",children:f.jsx("video",{className:"max-h-full max-w-full rounded-sm border border-border",controls:!0,preload:"metadata",src:n,"aria-label":t,onError:()=>i(!0)})}):a=f.jsx("object",{className:"fpreview-pdf block min-h-0 flex-1 w-full border-0","aria-label":t,data:n,type:"application/pdf",onError:()=>i(!0),children:f.jsx(fR,{url:n,name:t})}),f.jsxs("div",{className:"flex h-full min-h-0 flex-col",children:[a,r&&f.jsx("div",{className:"shrink-0 border-t border-border-variant py-1.5 px-3 text-end text-sm",children:f.jsxs("a",{href:n,download:t,children:[mv()," ",t]})})]})}const WAn=e=>({queryKey:Nt("fileVersion",e),staleTime:2e3,refetchOnMount:"always",refetchOnWindowFocus:"always",refetchInterval:2e3,queryFn:async({signal:n})=>{const t=await fetch(e,{method:"HEAD",cache:"no-store",signal:n});if(t.status===404)return"missing";if(!t.ok)throw new Error(`HTTP ${t.status}`);return t.headers.get("etag")??t.headers.get("content-length")}});function NH(e,n=!0){return ft({...WAn(e),enabled:n,subscribed:n}).data??null}function QAn(e){return/^[a-z][a-z0-9+.-]*:/i.test(e)||e.startsWith("//")}function XAn(e,n,t){const r=t.indexOf("#"),s=r===-1?t:t.slice(0,r),i=r===-1?"":t.slice(r),a=s.indexOf("?"),o=a===-1?s:s.slice(0,a),l=a===-1?"":s.slice(a+1),u=o.startsWith("/")?[]:n.split("/").filter(m=>m.length>0);for(const m of o.split("/"))if(!(!m||m==="."))if(m===".."){if(u.length===0)return null;u.pop()}else u.push(m);const h=u.join("/");if(!h)return null;const _=new URLSearchParams(l);_.delete("path");const p=_.toString();return{path:h,url:`${F_(e,h)}${p?`&${p}`:""}${i}`}}function YAn(e){if(!e.startsWith("---"))return e;const n=e.indexOf(` +---`,3);return n===-1?e:e.slice(n+4).replace(/^\r?\n/,"")}const zH="orx:files-tree-width",jH="orx:artifacts-collapsed:",TH=180,AH=320,ZAn=8,JAn=280;function eRn(){try{const e=Number(localStorage.getItem(zH));if(Number.isFinite(e)&&e>=TH&&e<=AH)return e}catch{}return JAn}function tRn(e){try{const n=localStorage.getItem(`${jH}${e}`);if(!n)return new Set;const t=JSON.parse(n);return Array.isArray(t)?new Set(t.filter(r=>typeof r=="string")):new Set}catch{return new Set}}function L0(e,n){for(const t of e){if(t.path===n)return t;if(t.isDir&&n.startsWith(t.path+"/")){const r=L0(t.children??[],n);if(r)return r}}return null}function RH({projectId:e,folder:n,markdown:t,entries:r}){const s=i=>{if(QAn(i))return i;const a=XAn(e,n,i);if(!a)return null;const o=L0(r,a.path);if(!o)return a.url;const l=a.url.indexOf("#"),u=l===-1?a.url:a.url.slice(0,l),h=l===-1?"":a.url.slice(l);return`${u}&v=${o.modifiedAt}:${o.size}${h}`};return f.jsx("div",{className:"md min-w-0 wrap-anywhere text-text leading-[1.62] [&_>_*:first-child]:mt-0 [&_>_*:last-child]:mb-0 [&_p]:my-2.5 [&_p]:mx-0 [&_strong]:text-text [&_strong]:font-semibold [&_pre]:bg-surface [&_pre]:border [&_pre]:border-border-muted [&_pre]:rounded-md [&_pre]:py-2 [&_pre]:px-3 [&_pre]:overflow-x-auto [&_pre]:text-sm [&_pre]:text-text [&_code]:font-mono [&_code]:text-sm [&_code]:font-medium [&_code]:text-primary [&_code]:bg-panel [&_code]:border [&_code]:border-border-variant [&_code]:rounded-xs [&_code]:py-px [&_code]:px-[5px] [&_.katex]:text-prose-emphasis [&_.katex-display]:my-3 [&_.katex-display]:mx-0 [&_.katex-display]:overflow-x-auto [&_.katex-display]:overflow-y-hidden [&_.katex-display]:py-0.5 [&_.katex-display]:px-0 [&_.file-chip]:inline-flex [&_.file-chip]:items-center [&_.file-chip]:gap-1 [&_.file-chip]:max-w-full [&_.file-chip]:my-0 [&_.file-chip]:mx-px [&_.file-chip]:py-0 [&_.file-chip]:px-1.5 [&_.file-chip]:align-baseline [&_.file-chip]:font-mono [&_.file-chip]:text-sm [&_.file-chip]:font-medium [&_.file-chip]:text-text [&_.file-chip]:bg-panel [&_.file-chip]:border [&_.file-chip]:border-border-variant [&_.file-chip]:rounded-xs [&_.file-chip]:cursor-pointer [&_.file-chip:hover:not(:disabled)]:bg-surface [&_.file-chip:hover:not(:disabled)]:text-primary [&_.file-chip_svg]:flex-none [&_.file-chip_svg]:opacity-60 [&_.file-chip-label]:max-w-65 [&_.file-chip-label]:overflow-hidden [&_.file-chip-label]:text-ellipsis [&_.file-chip-label]:whitespace-nowrap [&_.run-chip_svg]:opacity-100 [&_.run-chip_svg]:text-primary [&_pre_code]:bg-none [&_pre_code]:bg-transparent [&_pre_code]:border-0 [&_pre_code]:text-inherit [&_pre_code]:p-0 [&_pre_code]:font-normal [&_h1]:text-text [&_h1]:font-semibold [&_h2]:text-text [&_h2]:font-semibold [&_h3]:text-text [&_h3]:font-semibold [&_h4]:text-text [&_h4]:font-semibold [&_ul]:my-1.5 [&_ul]:mx-0 [&_ul]:ps-5.5 [&_ol]:my-1.5 [&_ol]:mx-0 [&_ol]:ps-5.5 [&_li::marker]:text-primary [&_a]:text-primary [&_table]:border-collapse [&_table]:text-sm [&_table]:my-2.5 [&_table]:mx-0 [&_table]:border [&_table]:border-border [&_table]:rounded-md [&_th]:border-b [&_th]:border-b-border-variant [&_th]:py-2 [&_th]:px-3.5 [&_th]:text-start [&_th]:text-text [&_th]:break-normal [&_th]:break-words [&_td]:border-b [&_td]:border-b-border-variant [&_td]:py-2 [&_td]:px-3.5 [&_td]:text-start [&_td]:text-text [&_td]:break-normal [&_td]:break-words [&_tr:last-child_td]:border-b-0 [&_thead_th]:bg-surface [&_thead_th]:font-medium [&_thead_th]:text-text [&_thead_th]:border-b [&_thead_th]:border-b-border [&_tbody_tr:hover_td]:bg-surface-bright [&_blockquote]:my-1.5 [&_blockquote]:mx-0 [&_blockquote]:pt-0.5 [&_blockquote]:pe-0 [&_blockquote]:pb-0.5 [&_blockquote]:ps-2.5 [&_blockquote]:border-s-[3px] [&_blockquote]:border-s-border [&_blockquote]:text-subtext [:is(&,_.openresearch-diff,_.file-view)_.token.comment]:italic [:is(&,_.openresearch-diff,_.file-view)_.token.prolog]:italic [:is(&,_.openresearch-diff,_.file-view)_.token.cdata]:italic [:is(&,_.openresearch-diff,_.file-view)_.token.operator]:text-syntax-cyan [:is(&,_.openresearch-diff,_.file-view)_.token.entity]:text-syntax-cyan [:is(&,_.openresearch-diff,_.file-view)_.token.url]:text-syntax-cyan [:is(&,_.openresearch-diff,_.file-view)_.token.comment]:text-syntax-comment [:is(&,_.openresearch-diff,_.file-view)_.token.prolog]:text-syntax-comment [:is(&,_.openresearch-diff,_.file-view)_.token.cdata]:text-syntax-comment [:is(&,_.openresearch-diff,_.file-view)_.token.punctuation]:text-syntax-text [:is(&,_.openresearch-diff,_.file-view)_.token.property]:text-syntax-red [:is(&,_.openresearch-diff,_.file-view)_.token.tag]:text-syntax-red [:is(&,_.openresearch-diff,_.file-view)_.token.deleted]:text-syntax-red [:is(&,_.openresearch-diff,_.file-view)_.token.constant]:text-syntax-orange [:is(&,_.openresearch-diff,_.file-view)_.token.symbol]:text-syntax-orange [:is(&,_.openresearch-diff,_.file-view)_.token.boolean]:text-syntax-orange [:is(&,_.openresearch-diff,_.file-view)_.token.number]:text-syntax-orange [:is(&,_.openresearch-diff,_.file-view)_.token.selector]:text-syntax-green [:is(&,_.openresearch-diff,_.file-view)_.token.attr-name]:text-syntax-green [:is(&,_.openresearch-diff,_.file-view)_.token.char]:text-syntax-green [:is(&,_.openresearch-diff,_.file-view)_.token.inserted]:text-syntax-green [:is(&,_.openresearch-diff,_.file-view)_.token.string]:text-syntax-green [:is(&,_.openresearch-diff,_.file-view)_.token.builtin]:text-syntax-yellow [:is(&,_.openresearch-diff,_.file-view)_.token.atrule]:text-syntax-orange [:is(&,_.openresearch-diff,_.file-view)_.token.attr-value]:text-syntax-orange [:is(&,_.openresearch-diff,_.file-view)_.token.keyword]:text-syntax-purple [:is(&,_.openresearch-diff,_.file-view)_.token.function]:text-syntax-blue [:is(&,_.openresearch-diff,_.file-view)_.token.decorator]:text-syntax-blue [:is(&,_.openresearch-diff,_.file-view)_.token.def]:text-syntax-blue [:is(&,_.openresearch-diff,_.file-view)_.token.class-name]:text-syntax-yellow [:is(&,_.openresearch-diff,_.file-view)_.token.namespace]:text-syntax-yellow [:is(&,_.openresearch-diff,_.file-view)_.token.regex]:text-syntax-green [:is(&,_.openresearch-diff,_.file-view)_.token.important]:text-syntax-red [:is(&,_.openresearch-diff,_.file-view)_.token.variable]:text-syntax-red [:is(&,_.openresearch-diff,_.file-view)_.token.parameter]:text-syntax-text artifact-md text-lg [&_h1]:text-4xl [&_h1]:leading-[1.18] [&_h1]:mt-7 [&_h1]:mx-0 [&_h1]:mb-3.5 [&_h2]:text-3xl [&_h2]:leading-tight [&_h2]:mt-7 [&_h2]:mx-0 [&_h2]:mb-2.5 [&_h3]:text-xl [&_h3]:leading-[1.35] [&_h3]:mt-5.5 [&_h3]:mx-0 [&_h3]:mb-2 [&_h4]:text-lg [&_h4]:leading-[1.4] [&_h4]:mt-4.5 [&_h4]:mx-0 [&_h4]:mb-1.5 [&_table]:block [&_table]:w-max [&_table]:max-w-full [&_table]:overflow-x-auto [&_.artifact-img]:block [&_.artifact-img]:my-3 [&_.artifact-img]:mx-0 [&_.artifact-img_img]:max-w-full [&_.artifact-img_img]:h-auto [&_.artifact-img_img]:border [&_.artifact-img_img]:border-border [&_.artifact-img_img]:rounded-sm [&_.artifact-img-caption]:block [&_.artifact-img-caption]:mt-1 [&_.artifact-img-caption]:text-center [&_.artifact-img-caption]:text-sm [&_.artifact-img-caption]:text-subtext",children:f.jsx(VCn,{remarkPlugins:[MF,[OF,PF]],rehypePlugins:[lF],components:{a:({href:i,children:a,...o})=>{const l=!i||i.startsWith("#"),u=l?i:s(i);return u?f.jsx("a",{...o,href:u,...l?{}:{target:"_blank",rel:"noopener noreferrer"},children:a}):f.jsx("span",{children:a})},img:({src:i,alt:a})=>{if(!i||typeof i!="string")return null;const o=s(i);return o?f.jsxs("a",{href:o,target:"_blank",rel:"noopener noreferrer",className:"artifact-img",children:[f.jsx("img",{src:o,alt:a??"",loading:"lazy"}),a&&f.jsx("span",{className:"artifact-img-caption",children:a})]}):null},...FF},children:LF(YAn(t))})})}function nRn(e){return e.presentation==="text"&&Y6(e.name)?"markdown":EH(e.presentation)??(e.presentation==="text"||e.presentation==="unknown"?"text":"download")}function rRn(e,n,t,r){var u;const s=t==="markdown"||t==="text"&&n.size<=jL,i=XS(e,n.path),a=ft({...i,enabled:s,subscribed:s}),o=T.useRef({projectId:e,path:n.path,modifiedAt:n.modifiedAt,size:n.size,version:r});T.useEffect(()=>{const h=o.current;o.current={projectId:e,path:n.path,modifiedAt:n.modifiedAt,size:n.size,version:r},s&&h.projectId===e&&h.path===n.path&&(h.modifiedAt!==n.modifiedAt||h.size!==n.size||h.version!==null&&h.version!==r)&&rt.invalidateQueries({queryKey:i.queryKey,exact:!0})},[e,n.path,n.modifiedAt,n.size,r,s]);const l=a.data;return{text:l&&!l.binary?l.content:null,binary:(l==null?void 0:l.binary)??!1,truncated:(l==null?void 0:l.truncated)??!1,error:l?null:((u=a.error)==null?void 0:u.message)??(l===null?$_e():null),wantsText:s}}function sRn({projectId:e,entry:n,onDelete:t,artifactEntries:r}){const s=nRn(n),i=NH(F_(e,n.path)),{text:a,binary:o,truncated:l,error:u,wantsText:h}=rRn(e,n,s,i),[_,p]=T.useState(!1),m=s==="markdown",x=n.path.split("/").slice(0,-1).join("/"),k=`${F_(e,n.path)}&v=${encodeURIComponent(i??`${n.modifiedAt}:${n.size}`)}`;let v;return s==="image"||s==="audio"||s==="video"||s==="pdf"?v=f.jsx(P5,{kind:s,url:k,name:n.name}):s==="download"||!h||o?v=f.jsxs("div",{className:"file-view-note py-2.5 px-4 text-sm text-muted",children:[s==="download"||o?S_e():Cde()," ",f.jsx("a",{href:k,...s==="download"||o?{download:n.name}:{target:"_blank",rel:"noopener noreferrer"},children:s==="download"||o?mD():G_e()})]}):u?v=f.jsxs("div",{className:"file-view-note py-2.5 px-4 text-sm text-muted",children:[vfe()," ",Ne(u)]}):a===null?v=f.jsxs(os,{children:[f.jsx(Rt,{})," ",eD()]}):m&&!_?v=f.jsx(RH,{projectId:e,folder:x,markdown:a,entries:r}):v=f.jsx(CH,{text:a,path:n.path}),f.jsxs("div",{className:"fpreview flex-1 min-w-0 bg-background file-view flex flex-col h-full min-h-0 [@container((max-width:_720px))]:hidden",children:[f.jsxs("div",{className:"fpreview-head flex w-full min-w-0 min-h-9 items-center gap-1 px-4 py-1 bg-background text-subtext shrink-0",children:[f.jsx(ch,{name:n.name}),f.jsx("span",{className:"fpreview-path flex-1 min-w-0 truncate text-sm text-subtext","data-tip":Ne(n.path),children:n.name}),f.jsxs("span",{dir:"auto",className:"fpreview-date text-xs text-muted whitespace-nowrap shrink-0",children:[Zfe()," ",new Date(n.modifiedAt).toLocaleString(z(),{dateStyle:"medium",timeStyle:"short"})]}),(s==="text"||s==="download")&&f.jsx("span",{className:"fpreview-size text-xs text-muted whitespace-nowrap shrink-0",children:Wl(n.size)}),m&&f.jsx(Ft,{size:"small",active:_,"data-tip":_?pv():ud(),"data-tip-align":"end","aria-label":_?pv():ud(),onClick:()=>p(b=>!b),children:f.jsx(E3,{size:13})}),f.jsx(dm,{size:"small",href:k,target:"_blank",rel:"noopener noreferrer","data-tip":IE(),"data-tip-align":"end","aria-label":IE(),children:f.jsx(H_,{size:13})}),f.jsx(Ft,{size:"small","data-tip":LE(),"data-tip-align":"end","aria-label":LE(),onClick:()=>{window.confirm(Tk({path:Ne(n.path)}))&&t(n.path)},children:f.jsx(lf,{size:13})})]}),f.jsxs("div",{className:`fpreview-body flex-1 min-h-0 overflow-auto [&.doc]:pt-4.5 [&.doc]:px-7 [&.doc]:pb-12 [&.doc_.artifact-md]:max-w-readable [&.doc_.artifact-md]:my-0 [&.doc_.artifact-md]:mx-auto ${m&&!_?"doc":""}`,children:[v,l&&f.jsx("div",{className:"file-view-note py-2.5 px-4 text-sm text-muted",children:Cfe()})]})]})}function MH({entries:e,depth:n,collapsed:t,selected:r,onToggle:s,onSelect:i,onOpenFile:a,onDelete:o,renamingPath:l,onContextMenu:u,onRename:h,onCancelRename:_}){return f.jsx("div",{className:"flex w-full max-w-full min-w-0 flex-col items-stretch",children:e.map(p=>{var x;const m={paddingInlineStart:8+Math.min(n,ZAn)*14};if(p.isDir){const k=!t.has(p.path);return f.jsxs("div",{className:"min-w-0 max-w-full",children:[f.jsxs("div",{className:"file-tree-row flex w-full min-w-0 items-center gap-1.5 py-[3px] px-2.5 border-0 bg-transparent text-text text-start cursor-pointer font-[inherit] [&:hover]:bg-panel [&_>_svg]:shrink-0 [&_>_svg]:text-subtext [&_>_svg.file-tree-chevron]:text-muted artifact-tree-row [&.selected]:bg-panel [&.selected:hover]:bg-panel [&:hover_.ft-row-delete]:opacity-100",style:m,onClick:()=>s(p.path),children:[f.jsx("button",{className:"file-tree-chevron text-muted shrink-0 [button&]:inline-flex [button&]:items-center [button&]:justify-center [button&]:w-[13px] [button&]:h-[13px] [button&]:p-0 [button&]:border-0 [button&]:bg-transparent [button&_>_svg]:transition-transform [button&_>_svg]:duration-120 [button&_>_svg]:ease-standard [button&_>_svg.open]:rotate-90","aria-label":k?Yue({name:Ne(p.name)}):g_e({name:Ne(p.name)}),onClick:v=>{v.stopPropagation(),s(p.path)},children:f.jsx(Da,{size:13,className:k?"open":""})}),f.jsx("span",{className:"file-tree-name flex-1 min-w-0 overflow-hidden text-ellipsis whitespace-nowrap",children:p.name}),f.jsx(Ft,{size:"small",className:"ft-row-delete opacity-35 focus-visible:opacity-100","data-tip":_fe(),"data-tip-align":"end","aria-label":u_e({name:Ne(p.name)}),onClick:v=>{v.stopPropagation(),window.confirm(Tk({path:Ne(p.path)}))&&o(p.path)},children:f.jsx(lf,{size:12})})]}),k&&(((x=p.children)==null?void 0:x.length)??0)>0&&f.jsx(MH,{entries:p.children??[],depth:n+1,collapsed:t,selected:r,onToggle:s,onSelect:i,onOpenFile:a,onDelete:o,renamingPath:l,onContextMenu:u,onRename:h,onCancelRename:_})]},p.path)}return l===p.path?f.jsxs("div",{className:"file-tree-row flex w-full min-w-0 items-center gap-1.5 py-[3px] px-2.5 border-0 bg-transparent text-text text-start font-[inherit] artifact-tree-row",style:m,children:[f.jsx(ch,{name:p.name}),f.jsx(xH,{name:p.name,onCommit:k=>h(p.path,k),onCancel:_})]},p.path):f.jsxs("button",{type:"button",className:`file-tree-row flex w-full min-w-0 items-center gap-1.5 py-[3px] px-2.5 border-0 bg-transparent text-text text-start cursor-pointer font-[inherit] [&:hover]:bg-panel [&_>_svg]:shrink-0 [&_>_svg]:text-subtext [&_>_svg.file-tree-chevron]:text-muted artifact-tree-row [&.selected]:bg-panel [&.selected:hover]:bg-panel [&:hover_.ft-row-delete]:opacity-100 ${r===p.path?"selected":""}`,style:m,title:uQ({path:Ne(p.path)}),"aria-keyshortcuts":"Space Enter","aria-pressed":r===p.path,onClick:()=>i(p.path),onDoubleClick:()=>a(p.path),onContextMenu:k=>{k.preventDefault(),i(p.path),u(k,p.path)},onAuxClick:k=>{k.button===1&&(k.preventDefault(),i(p.path),a(p.path))},onKeyDown:k=>{if(k.key==="ContextMenu"||k.shiftKey&&k.key==="F10"){k.preventDefault(),i(p.path),u(k,p.path);return}if(k.key===" "){k.preventDefault(),k.stopPropagation(),i(p.path);return}k.key==="Enter"&&(k.preventDefault(),k.stopPropagation(),i(p.path),a(p.path))},children:[f.jsx(ch,{name:p.name}),f.jsx("span",{className:"file-tree-name flex-1 min-w-0 overflow-hidden text-ellipsis whitespace-nowrap",children:p.name})]},p.path)})})}function iRn({project:e,artifacts:n,onOpenFile:t,canRenameFile:r}){const[s,i]=T.useState(null),[a,o]=T.useState(()=>tRn(e.id)),[l,u]=T.useState(eRn),[h,_]=T.useState(null),[p,m]=T.useState(null),x=T.useRef(null);T.useEffect(()=>{try{localStorage.setItem(`${jH}${e.id}`,JSON.stringify([...a]))}catch{}},[e.id,a]);const k=N=>{var I;N.preventDefault(),N.currentTarget.setPointerCapture(N.pointerId);const A=(I=x.current)==null?void 0:I.getBoundingClientRect(),j=document.body.style.userSelect;document.body.style.userSelect="none";const M=B=>{const q=Math.round(B.clientX-((A==null?void 0:A.left)??0)),U=Math.min(Math.max(q,TH),AH);u(U);try{localStorage.setItem(zH,String(U))}catch{}},L=()=>{window.removeEventListener("pointermove",M),window.removeEventListener("pointerup",L),window.removeEventListener("pointercancel",L),document.body.style.userSelect=j};window.addEventListener("pointermove",M),window.addEventListener("pointerup",L),window.addEventListener("pointercancel",L)};T.useEffect(()=>{if(!s||!n)return;const N=L0(n.entries,s);(!N||N.isDir)&&i(null)},[s,n]);const v=N=>o(A=>{const j=new Set(A);return j.has(N)?j.delete(N):j.add(N),j}),b=N=>{(s===N||s!=null&&s.startsWith(N+"/"))&&i(null),bmn(e.id,N).catch(()=>{})},w=async(N,A)=>{try{await ymn(e.id,N,A),A.action==="rename"&&s===N&&i(null)}catch(j){Bn(j instanceof Error?j.message:String(j),"error")}},y=N=>{n&&yH(n.dir,N)};if(!n)return f.jsx("div",{className:"files-tab h-full min-h-0 flex bg-background",children:f.jsxs(os,{className:"p-5",children:[f.jsx(Rt,{})," ",Gfe()]})});const C=N=>f.jsx(MH,{entries:N,depth:0,collapsed:a,selected:s,onToggle:v,onSelect:i,onOpenFile:t,onDelete:b,renamingPath:p,onContextMenu:(A,j)=>{_(wH(A,j))},onRename:(A,j)=>{m(null),w(A,{action:"rename",newName:j})},onCancelRename:()=>m(null)}),E=s?L0(n.entries,s):null;return n.entries.length===0?f.jsx(J6,{icon:tS,title:ide(),description:vde()}):f.jsxs("div",{className:"files-tab h-full min-h-0 flex bg-background @container",children:[f.jsxs("div",{className:"ftree-pane relative shrink-0 flex flex-col min-h-0 border-s border-s-border-variant border-e border-e-border-variant bg-background [@container((max-width:_720px))]:!w-full",ref:x,style:{width:l},children:[f.jsx("div",{className:"ftree-resizer absolute -end-[3px] top-0 bottom-0 w-1.5 cursor-col-resize z-30 [&:hover]:bg-resizer-hover [&:active]:bg-resizer-hover [@container((max-width:_720px))]:hidden",onPointerDown:k}),f.jsxs("div",{className:"ftree-scroll flex-1 min-h-0 overflow-y-auto file-tree py-1.5 px-0 text-sm",children:[C(n.entries),n.truncated&&f.jsx("p",{className:"files-truncated m-0 py-2 px-3.5 text-sm text-muted",children:Rfe()})]})]}),E?f.jsx(sRn,{projectId:e.id,entry:E,onDelete:b,artifactEntries:n.entries},E.path):f.jsxs("div",{className:"fpreview flex-1 min-w-0 flex flex-col min-h-0 bg-background fpreview-none items-center justify-center gap-2 text-sm text-muted [@container((max-width:_720px))]:hidden",children:[f.jsx(_yn,{size:22,strokeWidth:1.5}),f.jsx("span",{children:Z_e()})]}),h&&f.jsx(kH,{target:h,onOpen:()=>t(h.path),onRename:r(h.path)?()=>m(h.path):void 0,onDuplicate:()=>void w(h.path,{action:"duplicate"}),onCopyPath:()=>y(h.path),onDelete:()=>{window.confirm(Tk({path:Ne(h.path)}))&&b(h.path)},onClose:()=>_(null)})]})}const OH=20*1024*1024,DH="bg-background border border-border rounded-lg py-4 px-4.5 mb-4 [&_h3]:mt-0 [&_h3]:mx-0 [&_h3]:mb-2.5 [&_h3]:text-base [&_h3]:font-semibold [&_h3]:text-text",LH="mt-0 mx-0 mb-3 text-sm leading-relaxed text-text",aRn="flex items-start gap-3 py-2.5 border-t border-t-border first:border-t-0",oRn="text-sm font-normal text-text",lRn="mt-1 mb-0 text-sm leading-relaxed text-text";function IH(e){return new Promise((n,t)=>{const r=new FileReader;r.onload=()=>{const s=r.result;if(typeof s!="string"){t(new Error("could not read file"));return}const i=s.indexOf(",");n(i>=0?s.slice(i+1):s)},r.onerror=()=>t(r.error??new Error("could not read file")),r.readAsDataURL(e)})}function cRn(e){const n=e.toLowerCase();return n.endsWith(".md")||n.endsWith(".markdown")||n.endsWith(".zip")}function $H({accept:e,busy:n,prompt:t,onFile:r}){const[s,i]=T.useState(!1),a=T.useRef(null);return f.jsxs("div",{className:`flex flex-col items-center justify-center gap-2 py-6.5 px-4.5 border-[1.5px] border-dashed rounded-md text-center text-sm text-text transition-[border-color,background] duration-120 ${n?"cursor-default":"cursor-pointer"} ${s?"border-primary bg-surface text-text":"border-border-variant bg-surface [&:hover]:border-primary"}`,onDragOver:o=>{o.preventDefault(),i(!0)},onDragLeave:()=>i(!1),onDrop:o=>{var u;if(o.preventDefault(),i(!1),n)return;const l=(u=o.dataTransfer.files)==null?void 0:u[0];l&&r(l)},onClick:()=>{var o;n||(o=a.current)==null||o.click()},role:"button",tabIndex:0,"aria-disabled":n,"aria-busy":n,onKeyDown:o=>{var l;(o.key==="Enter"||o.key===" ")&&!n&&(o.preventDefault(),(l=a.current)==null||l.click())},children:[f.jsx("input",{ref:a,type:"file",accept:e,hidden:!0,onChange:o=>{var u;const l=(u=o.target.files)==null?void 0:u[0];l&&r(l),o.target.value=""}}),n?f.jsxs(f.Fragment,{children:[f.jsx(Rt,{}),f.jsx("span",{children:urn()})]}):f.jsxs(f.Fragment,{children:[f.jsx($yn,{size:20,strokeWidth:1.5}),f.jsx("span",{children:t})]})]})}function BH({bytes:e,updatedAt:n}){return f.jsxs("div",{className:"shrink-0 text-end whitespace-nowrap pt-0.5 text-xs text-subtext",children:[Wl(e),n>0&&f.jsxs("span",{className:"text-muted",children:[" · ",Vo(n)]})]})}function uRn({skill:e,onError:n}){const t=hn({mutationFn:qmn}),r=t.isPending;return f.jsxs("div",{className:"flex items-center gap-2 py-1 border-t border-t-border first:border-t-0",children:[f.jsxs("div",{className:"flex-1 min-w-0 flex items-center gap-2",children:[f.jsx("span",{className:oRn,children:e.name}),e.origin&&f.jsx(Gt,{size:"small",children:e.origin})]}),f.jsx(BH,{bytes:e.bytes,updatedAt:e.updatedAt}),f.jsx(Ft,{size:"small","data-tip":e.origin?dtn():lnn(),"data-tip-align":"end","aria-label":e.origin?Ntn({name:Ne(e.name)}):ien({name:Ne(e.name)}),disabled:r,onClick:()=>{window.confirm(e.origin?ytn({name:Ne(e.name)}):ZJt({name:Ne(e.name)}))&&t.mutateAsync(e.name).catch(s=>{n(s instanceof Error?s.message:String(s))})},children:f.jsx(lf,{size:13})})]})}function _Rn({template:e,onError:n}){const t=hn({mutationFn:Pmn}),r=t.isPending,s=e.supportFiles.length;return f.jsxs("div",{className:aRn,children:[f.jsxs("div",{className:"flex-1 min-w-0",children:[f.jsx("span",{className:"text-base font-medium text-text",children:e.name}),f.jsxs("p",{className:lRn,children:[e.entry,s>0&&(s===1?Jen():Otn({count:Jt(s)}))]})]}),f.jsx(BH,{bytes:e.bytes,updatedAt:e.updatedAt}),f.jsx(Ft,{"data-tip":pnn(),"data-tip-align":"end","aria-label":ben({name:Ne(e.name)}),disabled:r,onClick:()=>{window.confirm(fen({name:Ne(e.name)}))&&t.mutateAsync(e.name).catch(i=>{n(i instanceof Error?i.message:String(i))})},children:f.jsx(lf,{size:13})})]})}function fRn(){var w;const e=hn({mutationFn:Hmn}),n=ft(jgn()),t=n.data,r=T.useRef(null),[s,i]=T.useState(!1),[a,o]=T.useState(!1),l=T.useCallback(()=>{const y=r.current;i(!!y&&y.scrollTop>1),o(!!y&&y.scrollHeight-y.scrollTop-y.clientHeight>1)},[]);T.useLayoutEffect(()=>{l();const y=r.current;if(!y)return;const C=new ResizeObserver(l);return C.observe(y),()=>C.disconnect()},[t,l]);const u=n.isFetching,h=(w=n.error)==null?void 0:w.message,[_,p]=T.useState(!1),[m,x]=T.useState(null),k=()=>{n.refetch()},v=T.useRef(!1),b=T.useCallback(async y=>{if(!v.current){if(x(null),!cRn(y.name)){x(Srn());return}if(y.size>OH){x(fL());return}v.current=!0,p(!0);try{await e.mutateAsync({filename:y.name,contentBase64:await IH(y)})}catch(C){x(C instanceof Error?C.message:String(C))}finally{v.current=!1,p(!1)}}},[]);return f.jsxs("section",{className:DH,children:[f.jsxs("div",{className:"flex items-baseline gap-2.5",children:[f.jsx("h3",{children:rrn()}),f.jsxs(Me,{className:"ms-auto",size:"small",onClick:k,disabled:u,children:[f.jsx(La,{size:12,className:u?"animate-[spin_0.9s_linear_infinite]":""})," ",_m()]})]}),f.jsx("p",{className:LH,children:Een()}),f.jsx($H,{accept:".md,.markdown,.zip",busy:_,prompt:f.jsxs(f.Fragment,{children:[f.jsx("span",{children:Men()}),f.jsx("span",{className:"block ps-4 mt-1 text-text",children:GJt()})]}),onFile:y=>void b(y)}),m&&f.jsx("div",{role:"alert",className:"mt-2.5 text-base text-accent-red whitespace-pre-wrap",children:m}),h&&f.jsxs("div",{role:"alert",className:"pt-3 text-base text-accent-red",children:[Ftn()," ",h]}),t===void 0?h?null:f.jsxs("div",{className:"flex items-center gap-2 pt-3 text-sm text-subtext",children:[f.jsx(Rt,{})," ",jnn()]}):t.length===0?f.jsx("div",{className:"pt-3 text-sm text-subtext",children:qnn()}):f.jsxs("div",{className:"relative mt-1",children:[f.jsx("div",{ref:r,onScroll:l,className:"flex flex-col max-h-120 overflow-y-auto overscroll-contain",children:t.map(y=>f.jsx(uRn,{skill:y,onError:x},y.name))}),s&&f.jsx("div",{"aria-hidden":"true",className:"pointer-events-none absolute inset-x-0 top-0 h-10 bg-gradient-to-b from-background to-transparent"}),a&&f.jsx("div",{"aria-hidden":"true",className:"pointer-events-none absolute inset-x-0 bottom-0 h-10 bg-gradient-to-t from-background to-transparent"})]})]})}function dRn(){var h;const e=hn({mutationFn:Bmn}),n=ft(zgn()),t=n.data,r=(h=n.error)==null?void 0:h.message,[s,i]=T.useState(!1),[a,o]=T.useState(null),l=T.useRef(!1),u=T.useCallback(async _=>{if(l.current)return;o(null);const p=_.name.toLowerCase();if(!p.endsWith(".tex")&&!p.endsWith(".zip")){o(Arn());return}if(_.size>OH){o(fL());return}l.current=!0,i(!0);try{await e.mutateAsync({filename:_.name,contentBase64:await IH(_)})}catch(m){o(m instanceof Error?m.message:String(m))}finally{l.current=!1,i(!1)}},[]);return f.jsxs("section",{className:DH,children:[f.jsx("h3",{children:wnn()}),f.jsx("p",{className:LH,children:grn()}),f.jsx($H,{accept:".tex,.zip",busy:s,prompt:f.jsxs(f.Fragment,{children:[f.jsx("span",{children:Pen()}),f.jsx("span",{className:"block ps-4 mt-1 text-text",children:vln()})]}),onFile:_=>void u(_)}),a&&f.jsx("div",{role:"alert",className:"mt-2.5 text-base text-accent-red whitespace-pre-wrap",children:a}),r&&f.jsxs("div",{role:"alert",className:"pt-3 text-base text-accent-red",children:[Wtn()," ",r]}),t===void 0?r?null:f.jsxs("div",{className:"flex items-center gap-2 pt-3 text-sm text-subtext",children:[f.jsx(Rt,{})," ",Lnn()]}):t.length===0?f.jsx("div",{className:"pt-3 text-sm text-subtext",children:Xnn()}):f.jsx("div",{className:"flex flex-col mt-1",children:t.map(_=>f.jsx(_Rn,{template:_,onError:o},_.name))})]})}function hRn(){return f.jsxs("div",{className:"settings-view max-w-readable my-0 mx-auto pt-6 px-8 pb-15 [&_h1]:mt-0 [&_h1]:mx-0 [&_h1]:mb-1.5 [&_h1]:text-3xl",children:[f.jsx("h1",{children:tnn()}),f.jsx("p",{className:"mt-0 mx-0 mb-5 text-base leading-relaxed text-text",children:atn()}),f.jsx(fRn,{}),f.jsx(dRn,{})]})}const pRn="italic [&_.tab-label_>_span]:pe-1 [&_.tab-label::after]:pe-1";function Dl({active:e,label:n,icon:t,shimmer:r=!1,preview:s=!1,onSelect:i,onPromote:a,onClose:o}){return f.jsxs("button",{className:`tab [&.closable]:max-w-60 [&.closable]:pe-0.5 [&_.tab-label]:grid [&_.tab-label]:grid-cols-[minmax(0,_1fr)] [&_.tab-label]:min-w-0 [&_.tab-label]:overflow-hidden [&_.tab-label_>_span]:[grid-area:1_/_1] [&_.tab-label_>_span]:overflow-hidden [&_.tab-label_>_span]:text-ellipsis [&_.tab-label_>_span]:whitespace-nowrap [&_.tab-label::after]:[grid-area:1_/_1] [&_.tab-label::after]:overflow-hidden [&_.tab-label::after]:text-ellipsis [&_.tab-label::after]:whitespace-nowrap [&_.tab-label::after]:content-[attr(data-label)] [&_.tab-label::after]:invisible [&_.tab-label::after]:font-medium [&_.tab-close]:inline-flex [&_.tab-close]:items-center [&_.tab-close]:justify-center [&_.tab-close]:w-3.5 [&_.tab-close]:h-3.5 [&_.tab-close]:rounded-xs [&_.tab-close]:text-muted [&_.tab-close]:shrink-0 [&_.tab-close:hover]:bg-hover-strong [&_.tab-close:hover]:text-text relative inline-flex items-center gap-[5px] h-8 py-0 px-2 border border-transparent border-b-0 rounded-[var(--radius-md)_var(--radius-md)_0_0] text-sm font-normal text-subtext whitespace-nowrap select-none min-w-0 [&:hover]:bg-surface [&:hover]:text-text [&:not(.active)_+_.tab:not(.active)::before]:content-[''] [&:not(.active)_+_.tab:not(.active)::before]:absolute [&:not(.active)_+_.tab:not(.active)::before]:top-2.5 [&:not(.active)_+_.tab:not(.active)::before]:bottom-2.5 [&:not(.active)_+_.tab:not(.active)::before]:-start-px [&:not(.active)_+_.tab:not(.active)::before]:w-px [&:not(.active)_+_.tab:not(.active)::before]:bg-border [&.active]:border-border [&.active]:bg-background [&.active]:text-text [&.active]:font-medium [&.active::after]:content-[''] [&.active::after]:absolute [&.active::after]:end-0 [&.active::after]:-bottom-px [&.active::after]:start-0 [&.active::after]:h-px [&.active::after]:bg-background closable ${e?"active":""} ${s?pRn:""}`,onClick:i,onDoubleClick:a,title:s?_ln({label:n}):n,"aria-label":s?sln({label:n}):n,children:[t,f.jsx("span",{className:"tab-label","data-label":n,children:f.jsx("span",{className:r?"tool-running-shimmer":"",children:n})}),f.jsx("span",{role:"button",className:"tab-close",title:j8e(),onPointerDown:l=>l.preventDefault(),onClick:l=>{l.stopPropagation(),o()},children:f.jsx(_r,{size:12})})]})}const dR=["files-pill inline-flex items-center gap-2 min-w-0 border border-border","rounded-md py-[7px] px-[11px] bg-background text-text","no-underline [&_code]:font-mono [&_code]:text-sm","[&_code]:overflow-hidden [&_code]:text-ellipsis [&_code]:whitespace-nowrap","[&_>_svg]:shrink-0 [&_>_svg]:text-muted [a&:hover]:border-muted"].join(" ");function mRn({owner:e,repo:n,branch:t}){return!e||!n?f.jsx("span",{className:dR,children:f.jsx("code",{children:t})}):f.jsxs("a",{className:dR,href:xb(e,n,t),target:"_blank",rel:"noopener noreferrer",title:hv({name:Ne(t)}),children:[f.jsx("code",{children:t}),f.jsx(Rb,{size:12})]})}const c4=["experiment-overview-section mt-5.5 pt-4.5 border-t border-t-border-variant","[&_h2]:mt-0 [&_h2]:mx-0 [&_h2]:mb-3.5 [&_h2]:text-text [&_h2]:text-sm","[&_h2]:font-semibold"].join(" "),hR=["experiment-overview-command block mt-[13px] text-text text-sm","wrap-anywhere"].join(" ");function pR(e){return new Date(e).toLocaleString(z(),{month:"short",day:"numeric",year:"numeric",hour:"numeric",minute:"2-digit"})}function mR(e,n){return g0((e.endedAt??n)-e.createdAt)}function gRn({experiment:e,parentExperiment:n,project:t,runs:r,onOpenLogs:s,onOpenCode:i}){const a=r[0]??null,o=r.some(h=>h.status==="running"||h.status==="starting"),[l,u]=T.useState(()=>Date.now());return T.useEffect(()=>{if(!o)return;u(Date.now());const h=window.setInterval(()=>u(Date.now()),1e3);return()=>window.clearInterval(h)},[o]),f.jsx("div",{className:"experiment-overview absolute inset-0 overflow-y-auto bg-background [&_h1]:m-0 [&_h1]:text-text [&_h1]:text-xl [&_h1]:leading-tight",children:f.jsxs("div",{className:"experiment-overview-inner w-full max-w-230 my-0 mx-auto pt-6.5 px-7 pb-10 [@media((max-width:_720px))]:pt-5 [@media((max-width:_720px))]:px-4.5 [@media((max-width:_720px))]:pb-8",children:[f.jsxs("header",{className:"experiment-overview-head flex items-start justify-between gap-6",children:[f.jsxs("div",{className:"experiment-overview-heading min-w-0",children:[f.jsx("h1",{children:e.title||e.slug}),f.jsx("div",{className:"experiment-overview-slug mt-[5px] text-muted text-sm",children:e.slug})]}),f.jsx(ec,{status:a?Zi(a):"idle"})]}),f.jsxs("div",{className:"experiment-overview-actions flex gap-[7px] mt-4.5 [@media((max-width:_720px))]:flex-wrap",children:[a&&f.jsxs(Me,{...qr(h=>s(a.id,h)),children:[f.jsx(co,{size:15}),ZRe()]}),f.jsxs(Me,{...qr(i),children:[f.jsx(Eb,{size:15}),rRe()]})]}),e.description&&f.jsxs("section",{className:"experiment-overview-section mt-5.5 pt-4.5 border-t border-t-border-variant [&_h2]:mt-0 [&_h2]:mx-0 [&_h2]:mb-3.5 [&_h2]:text-text [&_h2]:text-sm [&_h2]:font-semibold overview-description [&_.md]:text-text [&_.md]:leading-[1.65]",children:[f.jsx("h2",{children:SRe()}),f.jsx(Qo,{text:e.description})]}),f.jsxs("section",{className:c4,children:[f.jsx("h2",{children:a?XAe():EMe()}),a&&f.jsxs(f.Fragment,{children:[f.jsxs("div",{className:"experiment-overview-meta flex items-center flex-wrap gap-y-2.5 gap-x-4.5 text-text text-sm [&_svg]:text-muted [&_.backend-badge]:text-text [&_.status-badge]:text-text [&_>_span]:inline-flex [&_>_span]:items-center [&_>_span]:gap-[5px] [&_code]:text-text [&_code]:text-xs",children:[f.jsx(ec,{status:Zi(a)}),f.jsx(pS,{backend:a.backend}),f.jsxs("span",{title:bMe(),children:[f.jsx(Jvn,{size:13}),pR(a.createdAt)]}),f.jsxs("span",{title:ARe(),children:[f.jsx(fbn,{size:13}),mR(a,l)]}),a.commitSha&&f.jsxs("span",{title:uRe(),children:[f.jsx(Pbn,{size:14}),f.jsx("code",{children:a.commitSha.slice(0,7)})]}),a.exitCode!==null&&a.exitCode!==void 0&&a.exitCode!==0&&f.jsxs("span",{children:[$Re()," ",a.exitCode]})]}),a.command&&f.jsxs("code",{className:hR,children:["$ ",a.command]}),a.resultMarkdown&&f.jsx("div",{className:`experiment-overview-result mt-4 [&.failed]:text-accent-red ${a.status==="failed"?"failed":""}`,children:f.jsx(Qo,{text:a.resultMarkdown})})]})]}),f.jsxs("section",{className:c4,children:[f.jsx("h2",{children:"Git"}),f.jsxs("div",{className:"experiment-overview-meta flex items-center flex-wrap text-text text-sm [&_svg]:text-muted [&_.backend-badge]:text-text [&_.status-badge]:text-text [&_>_span]:inline-flex [&_>_span]:items-center [&_>_span]:gap-[5px] [&_code]:text-text [&_code]:text-xs experiment-overview-git-meta gap-y-[9px] gap-x-3.5 [&_.files-pill]:py-[5px] [&_.files-pill]:px-2 [&_.files-pill]:rounded-sm [&_.files-pill_code]:text-xs",children:[f.jsx(mRn,{owner:t.githubEnabled?t.githubOwner:"",repo:t.githubEnabled?t.githubRepo:"",branch:e.branchName}),n&&f.jsxs("span",{children:[GRe()," ",f.jsx("code",{children:n.slug})]}),f.jsxs("span",{title:pR(e.createdAt),children:[gRe()," ",Vo(e.createdAt)]})]}),e.runCommand!==(a==null?void 0:a.command)&&f.jsxs("code",{className:hR,children:["$ ",e.runCommand]})]}),r.length>0&&f.jsxs("section",{className:c4,children:[f.jsx("h2",{children:fMe()}),f.jsx("div",{className:"experiment-run-history border-t border-t-border-variant [&_button]:w-full [&_button]:grid [&_button]:grid-cols-[minmax(72px,_0.7fr)_minmax(100px,_1fr)_minmax(70px,_0.7fr)_60px_16px] [&_button]:items-center [&_button]:gap-3.5 [&_button]:py-[11px] [&_button]:px-0.5 [&_button]:border-b [&_button]:border-b-border-variant [&_button]:text-text [&_button]:text-start [&_button]:text-sm [&_button:hover]:bg-surface [@media((max-width:_720px))]:[&_button]:grid-cols-[65px_1fr_60px_16px] [@media((max-width:_720px))]:[&_button_>_:nth-child(3)]:hidden",children:r.map((h,_)=>f.jsxs("button",{...qr(p=>s(h.id,p)),children:[f.jsxs("span",{className:"experiment-run-number text-xs font-medium",children:[iMe()," ",r.length-_]}),f.jsx(ec,{status:Zi(h)}),f.jsx("span",{children:Vo(h.createdAt)}),f.jsx("span",{children:mR(h,l)}),f.jsx(co,{size:13})]},h.id))})]})]})})}function gR(e){const n=atob(e),t=new Uint8Array(n.length);for(let r=0;r{const t=n.current;if(!t)return;const{terminal:r,dispose:s}=zb(t,!0);let i=!1,a=0,o=!1,l=!1;async function u(){if(o){l=!0;return}o=!0;try{for(;;){const _=await l0n(e,a);if(i)return;if(_.dataBase64&&r.write(gR(_.dataBase64)),a=_.nextOffset,_.eof)break}}catch{}finally{o=!1,l&&!i&&(l=!1,u())}}const h=Lgn(e,_=>{if(i)return;const p=gR(_.dataBase64);!o&&_.offset===a?(r.write(p),a+=p.length):_.offset+p.length>a&&u()});return u(),()=>{i=!0,h(),s()}},[e]),f.jsx("div",{ref:n,className:"h-full w-full"})}function bRn({experiment:e,project:n,view:t,runs:r,selectedRunId:s,onSelectRun:i,parentExperiment:a,onOpenView:o,onOpenCode:l}){const u=r.filter(h=>h.experimentId===e.id).sort((h,_)=>_.createdAt-h.createdAt);return t==="overview"?f.jsx(gRn,{experiment:e,parentExperiment:a,project:n,runs:u,onOpenLogs:(h,_)=>o("terminal",h,_),onOpenCode:h=>l("files",h)}):f.jsx(yRn,{experiment:e,expRuns:u,selectedRunId:s,onSelectRun:i})}function yRn({experiment:e,expRuns:n,selectedRunId:t,onSelectRun:r}){const[s,i]=T.useState(null),[a,o]=T.useState(null),[l,u]=T.useState(!1),h=T.useRef(null),_=t?n.find(v=>v.id===t)??null:n[0]??null,p=(_==null?void 0:_.status)==="running"||(_==null?void 0:_.status)==="starting",m=!!(_&&p&&(_.cancelRequested||a===_.id)),x=v=>{const b=n.findIndex(w=>w.id===v);return b===-1?n.length:n.length-b};T.useEffect(()=>{if(!l)return;const v=b=>{var w;(w=h.current)!=null&&w.contains(b.target)||u(!1)};return document.addEventListener("mousedown",v),()=>document.removeEventListener("mousedown",v)},[l]);async function k(){if(_){i(null),o(_.id);try{await xL(_.id)}catch(v){o(null),i(v instanceof Error?v.message:String(v))}}}return f.jsxs("div",{className:"term-view absolute inset-0 flex flex-col bg-background z-20",children:[f.jsxs("div",{className:"term-bar flex items-center gap-2 h-10 py-0 px-2.5 border-b border-b-border shrink-0 [&_.error]:text-sm [&_.error]:text-accent-red [&_.btn]:inline-flex [&_.btn]:items-center [&_.btn]:gap-[5px]",children:[f.jsx("div",{className:"term-title min-w-0 text-sm font-semibold text-text overflow-hidden text-ellipsis whitespace-nowrap",title:e.title||e.slug,children:e.title||e.slug}),f.jsx("span",{className:"flex-1"}),s&&f.jsx("span",{className:"error",role:"alert",children:s}),p&&f.jsxs(Me,{size:"small",variant:"ghost",disabled:m,onClick:()=>void k(),children:[f.jsx(pI,{size:13}),m?j9e():dD()]}),n.length>0&&_&&f.jsxs("div",{className:"run-history relative shrink-0",ref:h,children:[f.jsxs(Me,{title:FTe(),"aria-expanded":l,onClick:()=>u(v=>!v),children:[f.jsxs("span",{children:[pN()," ",x(_.id)]}),f.jsx(ec,{status:m?"cancelling":Zi(_)}),f.jsx(Jo,{size:14,className:"run-picker-chev text-muted shrink-0"})]}),l&&f.jsx("div",{className:"history-menu absolute top-[calc(100%_+_6px)] end-0 min-w-57.5 max-h-80 overflow-y-auto bg-background border border-border rounded-lg shadow-menu p-[5px] z-50",children:n.map(v=>f.jsxs(nr,{className:"justify-start",active:v.id===(_==null?void 0:_.id),onClick:()=>{r(v.id),u(!1)},children:[f.jsxs("span",{className:"font-medium",children:[pN()," ",x(v.id)]}),f.jsx(ec,{status:Zi(v)}),f.jsx("span",{className:"ms-auto text-xs text-muted",children:Vo(v.createdAt)})]},v.id))})]})]}),f.jsx("div",{className:"term-fill flex-1 min-h-0 bg-terminal pt-1 pe-0 pb-1 ps-1.5",children:_?f.jsx(vRn,{runId:_.id},_.id):f.jsx("div",{className:"term-empty h-full flex items-center justify-center p-6 text-center text-sm text-muted",children:t?so():zTe()})})]})}let F5=!1;function vR(e){F5=!0;try{return window.confirm(e)}finally{F5=!1}}const H5=e=>e.replace(/\r\n/g,` `),bR=(e,n,t)=>{const r=H5(n);return{path:e,draft:r,baseline:r,version:t,crlf:n.includes(`\r -`),conflict:null}},$l=e=>e.draft!==e.baseline,DAn=(e,n)=>({...e,draft:n,conflict:n===e.baseline?null:e.conflict}),LAn=e=>e.crlf?e.draft.replace(/\n/g,`\r -`):e.draft;function IAn(e,n,t){return!$l(e)||t&&n===e.version?null:{currentVersion:n,exists:t}}class $An{constructor(){Bs(this,"buffer",null);Bs(this,"listeners",new Set);Bs(this,"saving",!1);Bs(this,"saveError",null);Bs(this,"revision",0);Bs(this,"saveRevision",0);Bs(this,"getSnapshot",()=>this.buffer);Bs(this,"getRevision",()=>this.revision);Bs(this,"subscribe",n=>(this.listeners.add(n),()=>{this.listeners.delete(n)}));Bs(this,"set",n=>{this.buffer=n,this.notify()});Bs(this,"setSaving",n=>{this.saving=n,n&&this.saveRevision++,this.notify()});Bs(this,"saved",(n,t)=>{this.buffer&&this.set({...this.buffer,baseline:n,version:t,conflict:null})});Bs(this,"setSaveError",n=>{this.saveError=n,this.notify()})}notify(){this.revision++;for(const n of this.listeners)n()}get needsProtection(){return this.saving||this.buffer!==null&&($l(this.buffer)||this.buffer.conflict!==null)}}function BAn({projectId:e,filePath:n,sessionId:t,enabled:r,autoRun:s=!0,onManualAction:i,ready:a,source:o}){var Y,te,$;const l=ft({...w2n(),enabled:r,subscribed:r}),u=((Y=l.data)==null?void 0:Y.engine)??(l.isPending?void 0:null),h=((te=l.data)==null?void 0:te.hint)??null,_=(($=l.data)==null?void 0:$.installCommand)??null,[p,m]=A.useState(!1),[x,k]=A.useState(null),[v,b]=A.useState(null),[w,y]=A.useState(!1),[C,N]=A.useState(null),[E,T]=A.useState(null),[j,M]=A.useState(!1),[D,I]=A.useState(0),P=A.useCallback(L=>{M(L),L&&I(F=>F+1)},[]),U=A.useRef(o);U.current=o;const q=A.useRef(!1),W=A.useRef(null),H=A.useCallback(()=>{if(q.current)return;W.current=n,q.current=!0,m(!0);const L=U.current;T(null),b(null),N(null),Lpn(e,n,{sessionId:t}).then(F=>{var V,ee;const G=F.pdfPath;if(F.ok&&G){k(ce=>({path:G,version:((ce==null?void 0:ce.version)??0)+1,source:L})),y(F.hadErrors),N(F.note),F.hadErrors&&b(((V=F.log)==null?void 0:V.trim())||null),P(!0);return}k(null),y(!1),N(F.note),M(!1),b(((ee=F.log)==null?void 0:ee.trim())||xWe())}).catch(F=>{k(null),y(!1),N(null),M(!1),T(F instanceof Error?F.message:String(F))}).finally(()=>{q.current=!1,m(!1)})},[e,n,t,P]);return A.useEffect(()=>{!r||!s||!a||!u||W.current!==n&&H()},[r,s,a,u,n,H]),{engine:u,installHint:h,installCommand:_,compiling:p,compiled:x,stale:x!==null&&x.source!==o,log:v,builtWithErrors:w,note:C,error:E,showPdf:j,setShowPdf:P,viewNonce:D,compile:()=>{i==null||i(),H()},dismiss:()=>{T(null),b(null)}}}const PAn=3e4,FAn=3e4,HAn=5*6e4;function qAn({projectId:e,filePath:n,sessionId:t,enabled:r,autoRun:s=!0,onManualAction:i,savedSource:a,dirty:o,onPulled:l}){var ae,se,X,oe;const u=A.useMemo(()=>S2n(e,n,{sessionId:t}),[e,n,t]),h=ft({...u,enabled:r,subscribed:r}),_=((ae=h.data)==null?void 0:ae.hasToken)??!1,p=((se=h.data)==null?void 0:se.hasSession)??!1,m=((X=h.data)==null?void 0:X.link)??null,x=!h.isPending,[k,v]=A.useState(null),[b,w]=A.useState(0),[y,C]=A.useState(!1),[N,E]=A.useState(null),[T,j]=A.useState(null),[M,D]=A.useState(!1),I=A.useCallback(le=>{$n(u.queryKey)&&rt.setQueryData(u.queryKey,_e=>_e&&{..._e,hasSession:le})},[u]),P=A.useCallback(le=>{$n(u.queryKey)&&rt.setQueryData(u.queryKey,le)},[u]);A.useEffect(()=>{E(null),w(0),L.current=!1,j(null),D(!1),H.current=!1},[r,e,n,t]),A.useEffect(()=>{D(!1)},[a]);const U=A.useRef(!1),q=A.useRef(l);q.current=l;const W=A.useRef(o);W.current=o;const H=A.useRef(!1),Y=A.useCallback(le=>!_||!m||U.current||W.current?!1:(U.current=!0,C(!0),j(null),Vpn(e,n,{sessionId:t,resolve:le}).then(_e=>{H.current=!1,E(_e),_e.pulled.includes(n)&&(W.current?D(!0):q.current(_e.pulled))}).catch(_e=>{H.current=!0,E(null),j(_e instanceof Error?_e.message:String(_e))}).finally(()=>{U.current=!1,C(!1)}),!0),[e,n,t,_,m]),te=A.useRef(null),$=(k==null?void 0:k.state)==="live";A.useEffect(()=>{if(!r||!s||!x||!_||!m||o||$)return;const le=`${n}:${m.projectId}:${a}`;te.current!==le&&Y()&&(te.current=le)},[r,s,x,_,m,n,a,o,y,Y,$]);const L=A.useRef(!1);!y&&N&&N.conflicts.length===0&&!T&&(L.current=!0);const F=r&&x&&!!m&&_&&p&&L.current,G=A.useRef(null),V=A.useRef(Promise.resolve()),ee=A.useRef(!1);ee.current=(k==null?void 0:k.state)==="stopped"&&k.error!=null;const ce=A.useRef(!1);return A.useEffect(()=>{if(!F)return;let le=!1;const _e=()=>{const Ee=ce.current;ce.current=!1,!(!Ee&&ee.current)&&(V.current=V.current.then(()=>{if(!le)return Fpn(e,n,{sessionId:t,retry:Ee}).then(Ie=>{var ze;le||((G.current===null||((ze=Ie.status)==null?void 0:ze.state)==="stopped")&&v(Ie.status),G.current=Ie.key)}).catch(Ie=>{le||v({state:"stopped",error:Ie instanceof Error?Ie.message:String(Ie),needsSession:!1,note:null})})}))};_e();const pe=setInterval(_e,FAn);return()=>{le=!0,clearInterval(pe),G.current=null,v(null),V.current=V.current.then(()=>Hpn(e,n,{sessionId:t})).catch(()=>{})}},[F,b,e,n,t]),A.useEffect(()=>ngn(le=>{if(le.key===G.current){if(le.type==="live"){v(le.status);return}le.paths.includes(n)&&(W.current?D(!0):q.current(le.paths))}}),[n]),A.useEffect(()=>{if(!r||!s||!x||!_||!m||o||$)return;const le=setInterval(()=>{U.current||H.current||rt.fetchQuery({...C2n(e,n,{sessionId:t}),staleTime:0}).then(_e=>{_e.remoteChanged&&Y()}).catch(_e=>{H.current=!0,j(_e instanceof Error?_e.message:String(_e))})},PAn);return()=>clearInterval(le)},[r,s,x,_,m,o,e,n,t,Y,$]),A.useEffect(()=>{if(!r||!s||!x||!_||!m||!$)return;const le=setInterval(Y,HAn);return()=>clearInterval(le)},[r,s,x,_,m,$,Y]),{hasToken:_,hasSession:p,live:k,retryLive:()=>{ce.current=!0,w(le=>le+1)},link:m,loaded:x,syncing:y,last:N,error:T??((oe=h.error)==null?void 0:oe.message)??null,blocked:o,staleOnDisk:M,reloaded:()=>D(!1),uploadUrl:Wpn(e,n,{sessionId:t}),saveToken:async le=>{const _e=await xL(le);te.current=null,H.current=!1,j(null),$n(u.queryKey)&&rt.setQueryData(u.queryKey,pe=>pe&&{...pe,hasToken:_e.hasToken})},saveSession:async le=>{const _e=await wL(le,{host:m==null?void 0:m.host});I(_e.hasSession),ce.current=!0,w(pe=>pe+1)},importSession:async()=>{const le=await Ppn({host:m==null?void 0:m.host});return I(le.hasSession),ce.current=!0,w(_e=>_e+1),le.source},linkProject:async le=>{E(null),v(null),L.current=!1,te.current=null,P(await Upn(e,n,{project:le,sessionId:t})),i==null||i()},unlink:async()=>{P(await Gpn(e,n,{sessionId:t})),te.current=null,H.current=!1,E(null),j(null)},sync:le=>{H.current=!1,Y(le)&&(te.current=`${n}:${m==null?void 0:m.projectId}:${a}`,i==null||i())}}}const yR=[{selector:"img[src]",attribute:"src",typePrefixes:["image/"]},{selector:"source[src]",attribute:"src",typePrefixes:["image/","audio/","video/"]},{selector:"video[poster]",attribute:"poster",typePrefixes:["image/"]},{selector:"video[src]",attribute:"src",typePrefixes:["video/"]},{selector:"audio[src]",attribute:"src",typePrefixes:["audio/"]},{selector:'link[rel~="stylesheet"][href]',attribute:"href",typePrefixes:["text/css"]},{selector:"script[src]",attribute:"src",typePrefixes:["text/javascript"]}],UAn=4e6,GAn=200,xR=16e6,VAn=e=>new Promise(n=>{const t=new FileReader;t.onload=()=>n(typeof t.result=="string"?t.result:null),t.onerror=()=>n(null),t.readAsDataURL(e)}),wR=e=>e.startsWith("//")?`https:${e}`:e;async function KAn(e,n){var s;let t=UAn;const r=new Map;for(const{element:i,attribute:a,url:o,typePrefixes:l}of e){if(r.has(o)){const x=r.get(o);x&&i.setAttribute(a,x);continue}if(n.aborted)return;if(r.size>=GAn)continue;r.set(o,null);const u=await fetch(o,{signal:n}).catch(()=>null);if(!(u!=null&&u.ok))continue;const h=u.headers.get("content-type")??"",_=Number(u.headers.get("content-length"));if(!l.some(x=>h.startsWith(x))||!(Number.isFinite(_)&&_>0&&_<=t)){await((s=u.body)==null?void 0:s.cancel().catch(()=>{}));continue}const p=await u.blob().catch(()=>null),m=p&&await VAn(p);!p||!m||(t-=p.size,r.set(o,m),i.setAttribute(a,m))}}async function WAn(e,n,t){var a;const r=new DOMParser().parseFromString(e,"text/html"),s=[];for(const o of r.querySelectorAll(yR.map(l=>l.selector).join(", ")))for(const{selector:l,attribute:u,typePrefixes:h}of yR){if(!o.matches(l))continue;const _=o.getAttribute(u);if(!_)continue;const p=n(_);p&&(p===_?o.setAttribute(u,wR(_)):s.push({element:o,attribute:u,url:p,typePrefixes:h}))}await KAn(s,t);for(const o of r.querySelectorAll("a[href]")){const l=o.getAttribute("href");!l||!l6(l)||(o.setAttribute("href",wR(l)),o.setAttribute("target","_blank"),o.setAttribute("rel","noopener noreferrer"))}const i=((a=r.querySelector("base[href]"))==null?void 0:a.getAttribute("href"))??"";if(!/^https?:\/\//i.test(i)){const o=r.createElement("base");o.setAttribute("href","about:srcdoc"),r.head.prepend(o)}return`${r.doctype?``:""}${r.documentElement.outerHTML}`}async function QAn(e,n,t,r){var o;if(!n)return{text:e,partial:!1};const s=await fetch(t,{signal:r,headers:{Range:`bytes=0-${xR-1}`}}).catch(()=>null),i=s!=null&&s.ok?await s.text().catch(()=>null):null;if(i===null)return{text:e,partial:!0};const a=Number((o=s==null?void 0:s.headers.get("content-range"))==null?void 0:o.split("/").pop());return{text:i,partial:Number.isFinite(a)&&a>xR}}function XAn({html:e,truncated:n,url:t,name:r,resolveSrc:s}){const[i,a]=A.useState(null);return A.useEffect(()=>{let o=!1;const l=new AbortController;return a(null),QAn(e,n,t,l.signal).then(async({text:u,partial:h})=>({source:await WAn(u,s,l.signal),partial:h})).then(u=>{o||a(u)}),()=>{o=!0,l.abort()}},[e,n,t,s]),i===null?f.jsxs("div",{className:"file-view-note flex items-center gap-2 py-2.5 px-4 text-sm text-muted",children:[f.jsx(Rt,{})," ",gD()]}):f.jsxs("div",{className:"flex h-full min-h-0 flex-col",children:[i.partial&&f.jsx("div",{className:"file-view-note shrink-0 border-b border-b-border-variant py-2 px-4 text-sm text-muted",children:f$e()}),f.jsx("iframe",{className:"block min-h-0 flex-1 w-full border-0 bg-white",title:b$e({name:Ne(r)}),sandbox:"allow-scripts allow-popups allow-downloads",referrerPolicy:"no-referrer",srcDoc:i.source})]})}function YAn({overleaf:e}){var _;const n=A.useRef(null),{open:t,setOpen:r,ref:s}=_o(n),i=A.useId(),[a,o]=A.useState({top:0,left:0,maxHeight:0}),l=((_=e.last)==null?void 0:_.conflicts.length)??0,u=e.hasToken&&!!e.error,h=u?t3():l?udt():!e.hasToken||!e.link?Cmt():e.syncing?LD():e.blocked?DD():RD();return A.useEffect(()=>{l&&r(!0)},[l,r]),A.useEffect(()=>{u&&Vn(t3(),"error",{id:i,duration:5e3})},[u,e.error,i]),A.useLayoutEffect(()=>{if(!t||!n.current||!s.current)return;const p=n.current.getBoundingClientRect(),m=Math.min(384,window.innerWidth-16),x=Math.min(p.bottom+6,window.innerHeight-80);o({top:x,left:Math.max(8,Math.min(p.right-m,window.innerWidth-m-8)),maxHeight:window.innerHeight-x-8}),(s.current.querySelector("input")??s.current).focus();const k=()=>r(!1),v=b=>{var w;b.target instanceof Node&&!((w=s.current)!=null&&w.contains(b.target))&&k()};return window.addEventListener("resize",k),window.addEventListener("scroll",v,!0),()=>{window.removeEventListener("resize",k),window.removeEventListener("scroll",v,!0)}},[t,s,r]),f.jsxs(f.Fragment,{children:[f.jsx(Ft,{ref:n,size:"small",active:t,disabled:!e.loaded,"data-tip":h,"data-tip-align":"end","aria-label":QY({status:h}),"aria-haspopup":"dialog","aria-expanded":t,"aria-controls":t?i:void 0,onClick:()=>r(!t),children:e.syncing?f.jsx(Rt,{}):f.jsx(Rvn,{size:13,className:u||l?"text-accent-red":e.hasToken&&e.link?"text-accent-green":void 0})}),t&&Oa.createPortal(f.jsxs("div",{ref:s,id:i,role:"dialog","aria-label":eL(),tabIndex:-1,className:"fixed z-100 w-96 max-w-[calc(100vw-1rem)] overflow-auto rounded-lg border border-border bg-background p-4 text-text shadow-popover",style:a,onBlur:p=>{var m;p.relatedTarget instanceof Node&&!p.currentTarget.contains(p.relatedTarget)&&!((m=n.current)!=null&&m.contains(p.relatedTarget))&&r(!1)},children:[f.jsx("div",{className:"absolute end-3 top-3",children:f.jsx(Ft,{size:"small","aria-label":MIe(),onClick:()=>{var p;r(!1),(p=n.current)==null||p.focus()},children:f.jsx(_r,{size:13})})}),f.jsx(nRn,{overleaf:e})]}),document.body)]})}const b1=e=>qo(new Intl.ListFormat(z()).format(e.map(Ne)));function ZAn(e){if(e.error)return Xdt();if(e.syncing)return LD();if(e.blocked)return DD();const n=e.last;return n?n.pulled.length&&n.pushed.length?$0t({pulled:b1(n.pulled),pushed:b1(n.pushed)}):n.pulled.length?A0t({paths:b1(n.pulled)}):n.pushed.length?G0t({paths:b1(n.pushed)}):n.conflicts.length?Yht():RD():g0t()}function JAn({href:e}){return f.jsx("a",{className:"text-sm text-subtext whitespace-nowrap",href:e,target:"_blank",rel:"noreferrer",children:OD()})}function eRn(e){return e.state==="live"?ght():e.state==="connecting"?uht():e.error??Aht()}function kR({overleaf:e,replacing:n}){const[t,r]=A.useState(""),[s,i]=A.useState(!1),[a,o]=A.useState(!1),[l,u]=A.useState(null),h=p=>{s||(i(!0),u(null),p().then(()=>o(!1)).catch(m=>{u(m instanceof Error?m.message:String(m)),o(!0)}).finally(()=>i(!1)))},_=a?$mt():n?Z0t():Tdt();return f.jsxs("div",{className:"flex flex-col gap-1.5",children:[f.jsx("p",{className:"text-sm text-subtext",children:_}),a&&f.jsx(as,{className:"basis-full min-w-0","aria-label":e3(),type:"password",value:t,onChange:p=>r(p.target.value),placeholder:e3(),autoComplete:"off"}),f.jsxs("div",{className:"flex flex-wrap items-center gap-2",children:[s&&f.jsx(Rt,{}),a?f.jsx(Me,{type:"button",disabled:s||!t.trim(),onClick:()=>h(()=>e.saveSession(t.trim())),children:s?la():rdt()}):f.jsx(Me,{type:"button",disabled:s,onClick:()=>h(e.importSession),children:Idt()}),f.jsx(Me,{variant:"ghost",type:"button",disabled:s,onClick:()=>o(!a),children:a?MD():S0t()})]}),l&&f.jsx("div",{role:"alert",className:"text-sm text-accent-red whitespace-pre-wrap break-words",children:l})]})}function tRn({overleaf:e}){if(!e.hasSession)return f.jsx(kR,{overleaf:e});const n=e.live;if(!n)return f.jsx("p",{className:"text-sm text-subtext",children:$ht()});const t=n.state==="stopped"&&n.needsSession,r=n.state==="live"?"bg-accent-green":n.state==="connecting"?"bg-accent-amber":"bg-accent-red";return f.jsxs("div",{className:"flex flex-col gap-1.5",children:[f.jsxs("div",{role:n.error?"alert":"status",className:`flex items-center gap-2 text-sm ${n.error?"text-accent-red":"text-subtext"}`,children:[f.jsx("span",{className:`inline-block w-2 h-2 rounded-full shrink-0 ${r}`}),f.jsx("span",{className:"min-w-0 break-words",children:eRn(n)})]}),n.note&&f.jsx("p",{className:"text-sm text-accent-amber",children:n.note}),n.state==="stopped"&&!t&&f.jsx("div",{children:f.jsx(Me,{onClick:e.retryLive,children:Sht()})}),t&&f.jsx(kR,{overleaf:e,replacing:!0})]})}function nRn({overleaf:e}){var p,m,x;const[n,t]=A.useState(""),[r,s]=A.useState(!1),[i,a]=A.useState(null),[o,l]=A.useState(!1),u=()=>{t(""),a(null),l(!0)},h=!e.hasToken||o;async function _(k){k.preventDefault();const v=n.trim();if(!(r||!v)){s(!0),a(null);try{h?(await e.saveToken(v),l(!1)):await e.linkProject(v),t("")}catch(b){a(b instanceof Error?b.message:String(b))}finally{s(!1)}}}if(e.link&&!h){const k=((p=e.last)==null?void 0:p.conflicts)??[];return f.jsxs("div",{className:"flex flex-col gap-3",children:[f.jsxs("div",{className:"space-y-1.5 pe-8",role:e.error?"alert":"status",children:[f.jsxs("div",{className:`flex items-center gap-2 text-sm font-medium ${e.error?"text-accent-red":"text-text"}`,children:[e.syncing&&f.jsx(Rt,{}),e.error?t3():ZAn(e)]}),e.error&&f.jsx("p",{className:"text-sm text-text whitespace-pre-wrap break-words",children:e.error})]}),f.jsx(tRn,{overleaf:e}),f.jsxs("div",{className:"flex flex-wrap items-center gap-2",children:[f.jsx(Me,{variant:e.error?"primary":"default",disabled:e.syncing||e.blocked,"data-tip":e.blocked?imt():((m=e.live)==null?void 0:m.state)==="live"?Ymt():void 0,onClick:()=>e.sync(),children:e.error?Vs():Upt()}),f.jsxs(Zd,{variant:"ghost",href:e.link.url,target:"_blank",rel:"noreferrer",children:[Apt()," ",f.jsx(H_,{size:12})]})]}),k.map(v=>f.jsxs("div",{className:"space-y-2 text-sm",children:[f.jsxs("p",{className:"break-words text-accent-red",children:[f.jsx("code",{className:"font-mono",children:v})," ",gpt()]}),f.jsxs("div",{className:"flex flex-wrap gap-2",children:[f.jsx(Me,{disabled:e.syncing||e.blocked,onClick:()=>e.sync({[v]:"keep-local"}),children:Spt()}),f.jsx(Me,{disabled:e.syncing||e.blocked,onClick:()=>e.sync({[v]:"take-overleaf"}),children:u0t()})]})]},v)),((x=e.last)==null?void 0:x.note)&&f.jsx("div",{className:"text-sm text-accent-amber",children:e.last.note}),i&&f.jsx("div",{role:"alert",className:"text-sm text-accent-red whitespace-pre-wrap break-words",children:i}),f.jsxs("details",{className:"border-t border-border pt-3",children:[f.jsx("summary",{className:"cursor-pointer text-sm font-semibold text-text focus-visible:outline-2 focus-visible:outline-text",children:f.jsx("span",{className:"ms-2",children:qk()})}),f.jsxs("div",{className:"mt-2 flex flex-col items-start gap-1",children:[f.jsx(Me,{variant:"ghost",className:"font-normal",type:"button",onClick:u,children:QN()}),f.jsx(Zd,{variant:"ghost",className:"font-normal",href:e.uploadUrl,target:"_blank",rel:"noreferrer",children:OD()}),f.jsx(Me,{variant:"ghost",className:"font-normal",disabled:e.syncing,onClick:()=>void e.unlink().catch(v=>{a(v instanceof Error?v.message:String(v))}),children:Ypt()})]})]})]})}return f.jsxs("form",{className:"flex flex-col gap-1.5",onSubmit:_,children:[f.jsx("div",{className:"pe-8 text-sm text-subtext",children:h?ugt():ggt()}),f.jsxs("div",{className:"flex items-center flex-wrap gap-2",children:[f.jsx(as,{className:"basis-full min-w-0","aria-label":h?KN():WN(),"aria-invalid":!!i,type:h?"password":"text",value:n,onChange:k=>t(k.target.value),placeholder:h?KN():"https://www.overleaf.com/project/…",autoComplete:"off"}),f.jsx(Me,{type:"submit",disabled:r||!n.trim(),children:r?h?la():sa():h?vmt():rht()}),f.jsx("a",{className:"text-sm text-subtext whitespace-nowrap",href:h?"https://www.overleaf.com/user/settings":"https://www.overleaf.com/project",target:"_blank",rel:"noreferrer",children:h?gdt():WN()})]}),(i||e.error)&&f.jsx("div",{role:"alert",className:"text-sm text-accent-red whitespace-pre-wrap break-words",children:i||e.error}),f.jsxs("div",{className:"flex items-center flex-wrap gap-3",children:[f.jsx(JAn,{href:e.uploadUrl}),o?f.jsx(Me,{variant:"ghost",type:"button",onClick:()=>l(!1),children:MD()}):e.hasToken&&f.jsx(Me,{variant:"ghost",type:"button",onClick:u,children:QN()})]})]})}function rRn({command:e}){const[n,t]=A.useState("idle"),r=A.useRef(null),s=async()=>{try{await navigator.clipboard.writeText(e),t("copied"),setTimeout(()=>t("idle"),1500)}catch{const i=r.current;if(i){const a=document.createRange();a.selectNodeContents(i);const o=window.getSelection();o==null||o.removeAllRanges(),o==null||o.addRange(a)}t("select"),setTimeout(()=>t("idle"),4e3)}};return f.jsxs("div",{className:"mt-2 flex items-center gap-2",children:[f.jsx("code",{ref:r,className:"font-mono text-xs text-text bg-panel border border-border-variant rounded-xs py-1 px-2",children:e}),f.jsx(Ft,{"data-tip":n==="copied"?m0():n==="select"?EPe():PLe(),"aria-label":KLe(),onClick:()=>void s(),children:n==="copied"?f.jsx(Ji,{size:13}):f.jsx(Sb,{size:13})})]})}function sRn({projectId:e,path:n,source:t="repo",sessionId:r,gitRef:s,line:i,branchLabel:a,onOpenFile:o,scrollPosition:l,onScrollPositionChange:u,lineScrollRequest:h,onLineScrollRequestHandled:_,onEdit:p,artifactVersion:m,artifactEntries:x=[],bufferSession:k,remote:v=!1,restored:b=!1,onRestoreActivated:w,showSource:y=!1,onShowSourceChange:C}){var yt,Dt;const N=z$(e,n,t??"repo",r,s),E=ft({...N,enabled:!k.saving}),T=E.data??null,j=((yt=E.error)==null?void 0:yt.message)??null,M=Ue=>{Qr(N.queryKey,gt=>(typeof Ue=="function"?Ue(gt??null):Ue)??void 0)},[D,I]=A.useState(0),P=t==="artifacts",U=t==="abs",q=Y6(n),W=gH(n),H=sAn(n),Y=q||H,[te,$]=A.useState(!1),L=!b||te,F=()=>{$(!0),w==null||w()};A.useSyncExternalStore(k.subscribe,k.getRevision);const G=k.getSnapshot(),V=k.set,ee=k.saving,ce=k.setSaving,ae=k.saveRevision,se=k.saveError,X=k.setSaveError,oe=A.useRef(null),le=A.useRef(l),_e=(T==null?void 0:T.file)??null,pe=G&&$l(G)?G.path:(T==null?void 0:T.source)==="checkout"?T.file.path:n,Ee=pe.split("/").slice(0,-1).join("/"),Ie=(T==null?void 0:T.source)==="artifact",ze=A.useCallback(Ue=>{var gt;return((gt=Q3(Ee,Ue,U))==null?void 0:gt.path)??null},[U,Ee]),He=A.useCallback(Ue=>U?yL(Ue):Ie?F_(e,Ue):c3(e,Ue,{sessionId:r,ref:s}),[Ie,s,U,e,r]),Oe=A.useCallback(Ue=>{if(l6(Ue))return Ue;const gt=Q3(Ee,Ue,U);return gt?K3n(He(gt.path),gt):null},[U,Ee,He]),Xe=SH(_e==null?void 0:_e.presentation),_t=(T==null?void 0:T.source)==="artifact"&&!P,Vt=P&&(T==null?void 0:T.source)==="checkout",$t=!s&&(T==null?void 0:T.source)==="checkout"&&_e!=null&&!_e.notFound,jt=r!=null&&(T==null?void 0:T.source)==="checkout"&&T.file.root==="clone",mt=$t&&_e!=null&&!_e.binary&&!_e.truncated&&!Xe&&!jt,we=mt&&_e.version===void 0,ct=G!==null&&$l(G),ye=!we&&(mt&&typeof _e.version=="string"||ct),je=(G==null?void 0:G.draft)??H5((_e==null?void 0:_e.content)??""),qe=(G==null?void 0:G.baseline)??H5((_e==null?void 0:_e.content)??""),at=ye&&G!==null&&$l(G),nt=async Ue=>{const gt=k.getSnapshot();if(!ye||!gt||!$l(gt))return!0;if(k.saving)return!1;if(gt.conflict&&Ue===void 0)return X(gt.conflict.exists?mN():vN()),!1;const ur=gt.draft,un=LAn(gt);ce(!0),X(null);try{await rt.cancelQueries(N);const Lt=await Rpn(e,pe,un,{sessionId:r,expectedVersion:Ue??gt.version});return k.getSnapshot()?(k.saved(ur,Lt.version),M(mr=>mr&&mr.source==="checkout"?{source:"checkout",file:{...mr.file,content:un,version:Lt.version}}:mr),!0):!1}catch(Lt){if(Lt instanceof l3){const Kn=k.getSnapshot();return!Kn||!$l(Kn)||V({...Kn,conflict:{currentVersion:Lt.currentVersion,exists:Lt.exists}}),!1}return X(Lt instanceof Error?Lt.message:String(Lt)),!1}finally{ce(!1)}},Kt=W&&$t&&!jt,Qe=BAn({projectId:e,filePath:pe,sessionId:r,enabled:Kt,autoRun:L,onManualAction:F,ready:_e!=null&&!_e.notFound,source:ye?je:(_e==null?void 0:_e.content)??""}),wt=qAn({projectId:e,filePath:pe,sessionId:r,enabled:Kt,autoRun:L,onManualAction:F,savedSource:qe,dirty:at,onPulled:A.useCallback(Ue=>{Ue.includes(pe)&&I(gt=>gt+1)},[pe])}),Tt=W&&Qe.showPdf&&Qe.compiled!=null,Yt=we&&ct,tn=(ye||Yt)&&!(Y&&!y)&&!Tt,rr=Qe.compiled?`${c3(e,Qe.compiled.path,{sessionId:r})}&v=${Qe.compiled.version}`:null,rn=rr?`${rr}&view=${Qe.viewNonce}#toolbar=0&navpanes=0&statusbar=0`:null,ln=Qe.compiled?Qe.compiled.path.split("/").pop()??Qe.compiled.path:null,An=async()=>{at&&!await nt()||W&&Qe.engine&&Qe.compile()},qn=async()=>{at&&(L?await An():await nt())},[Yn,fr]=A.useState(!1),[Xr,zr]=A.useState(null),kt=async()=>{fr(!0),zr(null);try{await Opn(e,pe,{sessionId:r})}catch(Ue){zr(Ue instanceof Error?Ue.message:String(Ue))}finally{fr(!1)}},cn=A.useCallback(()=>{k.saving||I(Ue=>Ue+1)},[k]),jn=()=>{V(null),X(null),cn()},fn=CH(He(pe),!s&&!ee);A.useEffect(()=>{if(!j||s)return;const Ue=window.setInterval(()=>{document.visibilityState!=="hidden"&&cn()},2e3);return()=>window.clearInterval(Ue)},[j,s,cn]);const Dn=`${He(pe)}&v=${encodeURIComponent(fn??m??"")}&reload=${D}`;A.useEffect(()=>{var ur,un;if(!T||k.saving)return;const Ue=T,gt=k.getSnapshot();if(gt&&$l(gt)){const Lt=Ue.source==="checkout"?Ue.file:null,Kn=Lt!==null&&Lt.path===gt.path&&(!r||Lt.root==="worktree"),mr=IAn(gt,Kn&&typeof Lt.version=="string"?Lt.version:null,Kn&&!Lt.notFound);mr&&(mr.currentVersion!==((ur=gt.conflict)==null?void 0:ur.currentVersion)||mr.exists!==((un=gt.conflict)==null?void 0:un.exists))?V({...gt,conflict:mr}):!mr&>.conflict&&V({...gt,conflict:null})}(!gt||!$l(gt))&&Ue.source==="checkout"&&!Ue.file.notFound&&!Ue.file.binary&&!Ue.file.truncated&&typeof Ue.file.version=="string"&&(V(bR(Ue.file.path,Ue.file.content,Ue.file.version)),X(null))},[T,k,r,ee,ae]);const pn=JSON.stringify(N.queryKey),Un=A.useRef({sourceKey:pn,nonce:D,artifactVersion:m,diskVersion:fn});A.useEffect(()=>{const Ue=Un.current;Un.current={sourceKey:pn,nonce:D,artifactVersion:m,diskVersion:fn},Ue.sourceKey===pn&&(Ue.nonce!==D||Ue.diskVersion!==null&&Ue.diskVersion!==fn||Ue.artifactVersion!=null&&Ue.artifactVersion!==m)&&E2n(e,n,t??"repo",r,s)},[pn,D,m,fn,e,n,t,r,s]),A.useLayoutEffect(()=>{const Ue=oe.current,gt=le.current;!Ue||!_e||!gt||(Ue.scrollTop=gt.top,Ue.scrollLeft=gt.left)},[_e]);const Rn=Ue=>{if(Ue.source==="absolute")return J$e();if(P)return B$e({root:r?qg():Hg()});if(s)return V$e({branch:Ne(s)});if(r&&Ue.source==="checkout"&&Ue.file.root==="clone")return CFe();const gt=Ue.source==="checkout"?Ue.file.root:Ue.checkoutRoot;return aBe({root:gt==="worktree"?qg():Hg()})};return f.jsxs("div",{className:"file-view flex flex-col h-full min-h-0 min-w-0",children:[f.jsxs("div",{className:"file-view-header flex w-full min-w-0 min-h-9 items-center gap-1 px-4 py-1 bg-background text-text shrink-0",children:[f.jsx(ch,{name:pe}),f.jsx("span",{className:"file-view-path flex-1 min-w-0 truncate text-sm text-subtext","data-tip":Ne(pe),children:pe.split("/").pop()||pe}),a&&f.jsxs("span",{className:"file-view-branch inline-flex items-center gap-1 min-w-0 text-xs text-muted border border-border-variant rounded-sm py-px px-1.5 max-w-65 overflow-hidden text-ellipsis whitespace-nowrap shrink-0 [&_svg]:flex-none",title:pQ({branch:Ne(a)}),children:[f.jsx(hm,{size:11}),a]}),tn&&(ee||at||se)&&f.jsx("span",{className:`file-view-save-status inline-flex items-center gap-1 text-sm shrink-0 ${se?"text-accent-red":"text-muted"}`,title:se??(ee?la():_Fe()),children:ee?f.jsxs(f.Fragment,{children:[f.jsx(Rt,{})," ",bPe()]}):se?fPe():vD()}),W&&Qe.compiled&&f.jsx(Ft,{size:"small",active:!Qe.showPdf,"data-tip":Qe.stale&&Qe.showPdf?PBe():Qe.showPdf?ud():kN(),"data-tip-align":"end","aria-label":Qe.showPdf?ud():kN(),onClick:()=>Qe.setShowPdf(!Qe.showPdf),children:Qe.showPdf?f.jsx(E3,{size:13}):f.jsx(Cb,{size:13,className:Qe.stale?"text-accent-amber":void 0})}),W&&rr&&ln&&f.jsx(dm,{size:"small","data-tip":Qe.stale?VIe({name:Ne(ln)}):NE({name:Ne(ln)}),"data-tip-align":"end","aria-label":NE({name:Ne(ln)}),href:rr,download:ln,children:f.jsx(gI,{size:13,className:Qe.stale?"text-accent-amber":void 0})}),Kt&&f.jsx(YAn,{overleaf:wt}),W&&$t&&f.jsx(Ft,{size:"small","data-tip":Qe.compiled?wN():gN(),"data-tip-align":"end","aria-label":Qe.compiled?wN():gN(),disabled:Qe.compiling||!Qe.engine,onClick:()=>void An(),children:Qe.compiling?f.jsx(Rt,{}):f.jsx(Hvn,{size:13})}),Y&&f.jsx(Ft,{size:"small",active:y,"data-tip":y?pv():ud(),"data-tip-align":"end","aria-label":y?pv():ud(),onClick:()=>C==null?void 0:C(!y),children:f.jsx(E3,{size:13})}),$t&&!v&&f.jsx(Ft,{size:"small","data-tip":Xr??xN(),"data-tip-align":"end","aria-label":xN(),disabled:Yn,onClick:()=>void kt(),children:Yn?f.jsx(Rt,{}):f.jsx(H_,{size:13})})]}),!j&&Vt&&(T==null?void 0:T.source)==="checkout"&&f.jsx("div",{className:"file-view-note py-2.5 px-4 text-sm text-muted border-b border-b-border-variant shrink-0",children:dBe({root:T.file.root==="worktree"?qg():Hg()})}),we&&f.jsx("div",{className:"file-view-note shrink-0 border-b border-b-border-variant py-2.5 px-4 text-sm text-accent-amber",children:vFe()}),j&&_e!==null&&f.jsxs("div",{className:"file-view-note shrink-0 border-b border-b-border-variant py-2.5 px-4 text-sm text-accent-red",children:[yN()," ",Ne(j)]}),(G==null?void 0:G.conflict)&&f.jsxs("div",{className:"file-view-note shrink-0 border-b border-b-border-variant py-2.5 px-4 flex items-center flex-wrap gap-2 text-sm text-accent-amber",children:[f.jsx("span",{className:"flex-1 min-w-0",role:"status",children:G.conflict.exists?mN():vN()}),((Dt=G==null?void 0:G.conflict)==null?void 0:Dt.exists)&&G.conflict.currentVersion&&f.jsx(Me,{disabled:ee,onPointerDown:Ue=>Ue.preventDefault(),onClick:()=>{var Ue;return void nt(((Ue=G.conflict)==null?void 0:Ue.currentVersion)??void 0)},children:MBe()}),f.jsx(Me,{disabled:ee,onPointerDown:Ue=>Ue.preventDefault(),onClick:jn,children:iPe()})]}),(Qe.error||Qe.log)&&f.jsxs("div",{className:"file-view-note shrink-0 max-h-45 overflow-auto border-b border-b-border-variant py-2.5 px-4",children:[f.jsxs("div",{className:"flex items-start gap-2",children:[f.jsx("span",{className:`flex-1 min-w-0 text-sm ${Qe.builtWithErrors?"text-subtext":"text-accent-red"}`,children:Qe.error??(Qe.builtWithErrors?MLe():yLe())}),f.jsx(Ft,{"data-tip":bIe(),"data-tip-align":"end","aria-label":EIe(),onClick:Qe.dismiss,children:f.jsx(_r,{size:13})})]}),Qe.log&&f.jsx("pre",{className:"mt-1.5 mb-0 font-mono text-xs text-subtext whitespace-pre-wrap wrap-anywhere",children:Qe.log})]}),Kt&&wt.staleOnDisk&&f.jsxs("div",{className:"file-view-note shrink-0 border-b border-b-border-variant py-2.5 px-4 flex items-center flex-wrap gap-2 text-sm text-accent-amber",children:[f.jsx("span",{className:"flex-1 min-w-0",children:EBe()}),f.jsx(Me,{onClick:()=>{wt.reloaded(),I(Ue=>Ue+1)},children:aIe()})]}),W&&$t&&Qe.engine===null&&Qe.installHint&&f.jsxs("div",{className:"file-view-note shrink-0 border-b border-b-border-variant py-2.5 px-4 text-sm text-subtext",children:[Qe.installHint,Qe.installCommand&&f.jsx(rRn,{command:Qe.installCommand})]}),Qe.note&&f.jsx("div",{className:"file-view-note shrink-0 border-b border-b-border-variant py-2 px-4 text-sm text-accent-amber",children:Qe.note}),Tt&&Qe.stale&&f.jsx("div",{className:"file-view-note shrink-0 border-b border-b-border-variant py-2 px-4 text-sm text-subtext",children:GPe()}),f.jsxs("div",{ref:oe,className:"file-view-body flex-1 min-h-0 overflow-auto bg-background",onScroll:Ue=>{const gt={top:Math.max(0,Ue.currentTarget.scrollTop),left:Math.max(0,Ue.currentTarget.scrollLeft)};le.current=gt,u==null||u(gt)},children:[!tn&&!j&&!P&&(T==null?void 0:T.source)==="checkout"&&!T.file.notFound&&!s&&r&&T.file.root==="clone"&&f.jsx("div",{className:"file-view-note py-2.5 px-4 text-sm text-muted",children:ZPe()}),!tn&&!j&&(T==null?void 0:T.source)==="artifact"&&!T.file.notFound&&_t&&f.jsx("div",{className:"file-view-note py-2.5 px-4 text-sm text-muted",children:eLe({root:T.checkoutRoot==="worktree"?qg():Hg()})}),j&&_e===null?f.jsxs("div",{className:"file-view-note py-2.5 px-4 text-sm text-muted",children:[yN()," ",Ne(j)]}):_e===null?f.jsx("div",{className:"file-view-note py-2.5 px-4 text-sm text-muted",children:gD()}):tn?f.jsx(v$,{value:je,onChange:Ue=>{const gt=k.getSnapshot()??(_e&&typeof _e.version=="string"?bR(_e.path,_e.content,_e.version):null);gt&&V(DAn(gt,Ue)),p==null||p(),se&&X(null)},onSave:()=>void qn(),onBlur:()=>{F5||qn()},readOnly:Yt,path:n,highlightLine:i,scrollRequest:h,onScrollRequestHandled:_,scrollPosition:le.current,onScrollPositionChange:Ue=>{le.current=Ue,u==null||u(Ue)}}):_e.notFound?f.jsx("div",{className:"file-view-note py-2.5 px-4 text-sm text-muted",children:T?Rn(T):R$e()}):Xe?f.jsx(P5,{kind:Xe,url:Dn,name:n.split("/").pop()??n}):_e.binary?f.jsxs("div",{className:"file-view-note py-2.5 px-4 text-sm text-muted",children:[oLe()," ",f.jsx("a",{href:Dn,download:n.split("/").pop()??n,children:mD()})]}):Tt&&rn&&ln?f.jsx(P5,{kind:"pdf",url:rn,name:ln,downloadBar:!1},rn):q&&!y?f.jsx("div",{className:"file-view-md max-w-readable pt-4.5 px-5 pb-8 [&_.md]:text-base [&_.md_h1]:text-2xl [&_.md_h1]:mt-4.5 [&_.md_h1]:mx-0 [&_.md_h1]:mb-2 [&_.md_h2]:text-xl [&_.md_h2]:mt-4 [&_.md_h2]:mx-0 [&_.md_h2]:mb-2 [&_.md_h3]:text-lg",children:Ie?f.jsx(TH,{projectId:e,folder:Ee,markdown:_e.content,entries:x}):f.jsx(Wo,{text:_e.content,resolveFilePath:ze,resolveImageSrc:Oe,onOpenFile:o&&((Ue,gt,ur,un,Lt)=>o(Ue,r,s,Lt))})}):H&&!y?f.jsx(XAn,{html:_e.content,truncated:_e.truncated,url:Dn,name:pe,resolveSrc:Oe}):f.jsxs(f.Fragment,{children:[f.jsx(kH,{text:_e.content,path:n,highlightLine:i,scrollRequest:h,onScrollRequestHandled:_}),_e.truncated&&f.jsx("div",{className:"file-view-note py-2.5 px-4 text-sm text-muted",children:i$e()})]})]})]})}const u4=["project-menu-label inline-flex items-center gap-2 min-w-0 overflow-hidden","text-ellipsis whitespace-nowrap"].join(" ");function iRn({projectName:e,onHome:n,onNewProject:t,onRepository:r,onCollapse:s}){const{open:i,setOpen:a,ref:o}=_o(),l=A.useRef(null);return A.useEffect(()=>{if(!i)return;const u=h=>{var _;h.key==="Escape"&&((_=l.current)==null||_.focus())};return document.addEventListener("keydown",u,!0),()=>document.removeEventListener("keydown",u,!0)},[i]),f.jsx("div",{className:"rail-brand px-3 py-1.5 border-b border-border shrink-0",children:f.jsxs("div",{className:"project-switcher relative min-w-0",ref:o,children:[f.jsxs("div",{className:"flex h-7 items-center justify-between gap-1 px-0.5",children:[f.jsx(Ft,{size:"small",className:"project-back text-text","aria-label":CN(),onClick:n,children:f.jsx(b0,{size:18})}),f.jsx("span",{className:"brand-project-label flex-1 text-xs font-medium tracking-wide uppercase text-subtext",children:JGe()}),s&&f.jsx(Ft,{size:"small","data-tip":EN(),"data-tip-align":"end","aria-label":EN(),onClick:s,children:f.jsx(kI,{size:18})})]}),f.jsxs("button",{ref:l,className:`brand group flex h-8 w-full min-w-0 items-center gap-2 rounded-md px-2 text-start text-text hover:bg-surface focus-visible:outline-2 focus-visible:outline-text ${i?"open bg-surface":""}`,onClick:()=>a(u=>!u),"aria-expanded":i,children:[f.jsx("span",{className:"brand-project min-w-0 flex-1 truncate text-xl font-semibold",children:e}),f.jsx(Zo,{className:`project-chevron shrink-0 text-muted transition-opacity group-hover:opacity-100 group-focus-visible:opacity-100 ${i?"rotate-180 opacity-100":"opacity-0"}`,size:14})]}),i&&f.jsxs("div",{className:"option-menu absolute bottom-[calc(100%_+_8px)] start-0 max-h-95 flex flex-col bg-background border border-border rounded-lg shadow-menu overflow-hidden min-w-47.5 p-1.5 [&.align-right]:start-auto [&.align-right]:end-0 [&.drop-down]:bottom-auto [&.drop-down]:top-[calc(100%_+_4px)] [&.session-menu]:start-auto [&.session-menu]:end-1.5 [&.session-menu]:top-[calc(100%_-_2px)] [&.session-menu]:min-w-35 drop-down project-menu w-52.5 z-70",children:[f.jsx(nr,{onClick:()=>{a(!1),r()},children:f.jsxs("span",{className:u4,children:[f.jsx(bI,{size:14}),MGe()]})}),f.jsx(nr,{onClick:()=>{a(!1),n()},children:f.jsxs("span",{className:u4,children:[f.jsx(abn,{size:14}),CN()]})}),f.jsx(nr,{onClick:()=>{var u;(u=l.current)==null||u.focus(),a(!1),t()},children:f.jsxs("span",{className:u4,children:[f.jsx(Wvn,{size:14}),PGe()]})})]})]})})}function aRn({runs:e,experiments:n,emptyHint:t,onOpen:r,onOpenLogs:s,onOpenCode:i,onCancel:a}){const[o,l]=A.useState(new Set),[u,h]=A.useState(null),_=new Map;for(const x of e){const k=_.get(x.experimentId);k?k.push(x):_.set(x.experimentId,[x])}for(const x of _.values())x.sort((k,v)=>v.createdAt-k.createdAt);const p=[...n].sort((x,k)=>{var w,y,C,N;const v=((y=(w=_.get(x.id))==null?void 0:w[0])==null?void 0:y.createdAt)??x.createdAt;return(((N=(C=_.get(k.id))==null?void 0:C[0])==null?void 0:N.createdAt)??k.createdAt)-v});if(p.length===0)return f.jsx(J6,{icon:Jd,title:t??GMe(),description:t?void 0:AMe()});async function m(x){h(null),l(k=>new Set(k).add(x));try{await a(x)}catch(k){l(v=>{const b=new Set(v);return b.delete(x),b}),h(k instanceof Error?k.message:String(k))}}return f.jsxs("div",{className:"experiments-table-wrap absolute inset-0 overflow-auto bg-background @container",children:[u&&f.jsxs("div",{className:"experiments-table-error py-2 px-3 text-accent-red text-sm border-b border-b-border",role:"alert",children:[aDe()," ",u]}),f.jsx("div",{className:"experiments-table w-full text-sm bg-background",role:"list","aria-label":KOe(),children:p.map(x=>{const k=_.get(x.id)??[],v=k[0]??null,b=k.find(N=>N.status==="running"||N.status==="starting"),w=b??v,y=!!(b&&(b.cancelRequested||o.has(b.id))),C=b?y?"cancelling":Zi(b):v?Zi(v):"idle";return f.jsxs("div",{className:"experiment-table-group grid grid-cols-[minmax(0,_1fr)_auto] [grid-template-areas:'name_meta'_'actions_actions'] gap-x-8 items-center py-4 px-5 gap-y-[7px] border-b border-b-divider-subtle bg-background cursor-pointer [&:hover]:bg-canvas [&:last-child]:border-b-0 [@container((max-width:_560px))]:grid-cols-[minmax(0,_1fr)_auto] [@container((max-width:_560px))]:gap-x-3.5 [@container((max-width:_560px))]:gap-y-[9px] [@container((max-width:_400px))]:grid-cols-[minmax(0,_1fr)] [@container((max-width:_400px))]:[grid-template-areas:'name'_'meta'_'actions']",role:"listitem",onClick:()=>r(x,"preview"),onDoubleClick:()=>r(x,"keepOpen"),onAuxClick:N=>{N.button===1&&(N.preventDefault(),r(x,"keepOpen"))},children:[f.jsxs("div",{className:"experiment-table-name [grid-area:name] self-start min-w-0",children:[f.jsx("button",{type:"button",className:"experiment-table-title block w-full overflow-hidden text-text font-semibold text-start text-ellipsis whitespace-nowrap",...qr(N=>r(x,N),{stopPropagation:!0}),children:x.title||x.slug}),f.jsxs("span",{className:"experiment-table-subtitle flex items-center min-w-0 gap-1.5 mt-1 overflow-hidden text-subtext text-sm [&_>_svg]:shrink-0 [&_code]:min-w-0 [&_code]:overflow-hidden [&_code]:text-ellipsis [&_code]:whitespace-nowrap",title:x.branchName,children:[f.jsx(hm,{size:14,"aria-hidden":"true"}),f.jsx("code",{children:x.branchName})]})]}),f.jsxs("div",{className:"experiment-table-meta [grid-area:meta] self-start flex items-center justify-end gap-4.5 whitespace-nowrap [@container((max-width:_560px))]:flex-col [@container((max-width:_560px))]:items-end [@container((max-width:_560px))]:gap-1.5 [@container((max-width:_400px))]:!flex-row [@container((max-width:_400px))]:!items-center [@container((max-width:_400px))]:flex-wrap [@container((max-width:_400px))]:justify-start [@container((max-width:_400px))]:gap-3",children:[f.jsx("div",{className:"experiment-table-status flex items-center min-w-0",children:f.jsx(Jl,{status:C})}),f.jsx("div",{className:"experiment-run-summary flex items-center min-w-0 gap-2 text-subtext text-sm font-medium",children:f.jsx("span",{children:k.length===1?iOe():bOe({count:Jt(k.length)})})}),f.jsx("div",{className:"experiment-table-latest flex items-center gap-1.5 min-w-0 text-subtext text-sm font-medium whitespace-nowrap",children:f.jsx("span",{children:v?Vo(v.createdAt):ZMe()})})]}),f.jsxs("div",{className:"experiment-table-actions [grid-area:actions] flex flex-wrap items-center justify-start gap-2 mt-3",role:"group","aria-label":tQ({name:x.title||x.slug}),onClick:N=>N.stopPropagation(),onDoubleClick:N=>N.stopPropagation(),onAuxClick:N=>N.stopPropagation(),children:[f.jsxs(Me,{size:"small",disabled:!w,title:w?fOe():$Me(),...qr(N=>{w&&s(x.id,w.id,N)},{stopPropagation:!0}),children:[f.jsx(co,{size:15}),Z4()]}),f.jsxs(Me,{size:"small",title:QO({branch:Ne(x.branchName)}),...qr(N=>i(x.id,N),{stopPropagation:!0}),children:[f.jsx(Eb,{size:15}),POe()]}),b&&f.jsxs(Me,{size:"small",variant:"danger",className:"[@container((max-width:_560px))]:ms-auto",disabled:y,title:y?EOe():MOe(),onClick:()=>void m(b.id),children:[f.jsx(dI,{size:15}),y?WEe():dD()]})]})]},x.id)})})]})}function oRn({onClose:e,onCreateProject:n}){const[t,r]=A.useState(!1),[s,i]=A.useState(null),a=A.useRef(null),o=A.useCallback(l=>{t||(r(!0),i(null),l().catch(()=>i($ln())).finally(()=>r(!1)))},[t]);return A.useEffect(()=>{const l=u=>{u.key==="Escape"&&(u.preventDefault(),u.stopPropagation(),o(()=>e("dismiss")))};return document.addEventListener("keydown",l,!0),()=>document.removeEventListener("keydown",l,!0)},[e,o]),A.useEffect(()=>{const l=a.current;if(!l)return;const u=document.activeElement instanceof HTMLElement?document.activeElement:null,h=()=>[...l.querySelectorAll('button:not([disabled]), input:not([disabled]), select:not([disabled]), textarea:not([disabled]), a[href], [tabindex]:not([tabindex="-1"])')];(h()[0]??l).focus();const _=p=>{if(p.key!=="Tab")return;const m=h();if(m.length===0){p.preventDefault(),l.focus();return}const x=m[0],k=m[m.length-1];p.shiftKey&&document.activeElement===x?(p.preventDefault(),k.focus()):!p.shiftKey&&document.activeElement===k&&(p.preventDefault(),x.focus())};return document.addEventListener("keydown",_,!0),()=>{document.removeEventListener("keydown",_,!0),u==null||u.focus()}},[]),Oa.createPortal(f.jsx("div",{className:"fixed inset-0 z-200 flex items-center justify-center bg-modal-backdrop p-5",children:f.jsxs("div",{ref:a,className:"relative w-110 max-w-full rounded-xl border border-border bg-background p-6 shadow-modal",role:"dialog","aria-modal":"true","aria-labelledby":"demo-welcome-title",tabIndex:-1,children:[f.jsx(Ft,{className:"absolute end-3.5 top-3.5","aria-label":o3(),onClick:()=>o(()=>e("dismiss")),disabled:t,children:f.jsx(_r,{size:16})}),f.jsxs("div",{className:"mb-5 flex items-center gap-3 pe-8",children:[f.jsx("span",{className:"block h-9 w-9 shrink-0 [&_svg]:block [&_svg]:h-full [&_svg]:w-full",children:f.jsx(hS,{})}),f.jsxs("div",{children:[f.jsx("div",{className:"mb-0.5 text-xs font-medium tracking-[0.08em] text-primary uppercase",children:uln()}),f.jsx("h2",{id:"demo-welcome-title",className:"m-0 text-2xl leading-tight tracking-[-0.02em]",children:Zln()})]})]}),f.jsxs("div",{className:"text-base leading-relaxed text-text [&_p]:m-0 [&_p_+_p]:mt-3",children:[f.jsxs("p",{dir:"auto",children:[Gln()," ",f.jsx("a",{dir:"ltr",href:"https://github.com/karpathy/nanochat",target:"_blank",rel:"noreferrer",className:"font-medium text-primary underline decoration-border-strong underline-offset-3 hover:decoration-primary",children:Sln()}),Uon()]}),f.jsx("p",{dir:"auto",children:gln()})]}),s&&f.jsx("p",{className:"mt-3 mb-0 text-sm text-accent-red",children:s}),f.jsxs("div",{className:"mt-6 flex flex-wrap items-center justify-end gap-2.5",children:[f.jsx(Me,{onClick:()=>o(n),disabled:t,children:rln()}),f.jsx(Me,{variant:"primary",onClick:()=>o(()=>e("explore_demo")),disabled:t,children:t?la():Aln()})]})]})}),document.body)}function cs(e){if(typeof e=="string"||typeof e=="number")return""+e;let n="";if(Array.isArray(e))for(let t=0,r;t{}};function Sy(){for(var e=0,n=arguments.length,t={},r;e=0&&(r=t.slice(s+1),t=t.slice(0,s)),t&&!n.hasOwnProperty(t))throw new Error("unknown type: "+t);return{type:t,name:r}})}X1.prototype=Sy.prototype={constructor:X1,on:function(e,n){var t=this._,r=cRn(e+"",t),s,i=-1,a=r.length;if(arguments.length<2){for(;++i0)for(var t=new Array(s),r=0,s,i;r=0&&(n=e.slice(0,t))!=="xmlns"&&(e=e.slice(t+1)),CR.hasOwnProperty(n)?{space:CR[n],local:e}:e}function _Rn(e){return function(){var n=this.ownerDocument,t=this.namespaceURI;return t===q5&&n.documentElement.namespaceURI===q5?n.createElement(e):n.createElementNS(t,e)}}function fRn(e){return function(){return this.ownerDocument.createElementNS(e.space,e.local)}}function $H(e){var n=Cy(e);return(n.local?fRn:_Rn)(n)}function dRn(){}function e7(e){return e==null?dRn:function(){return this.querySelector(e)}}function hRn(e){typeof e!="function"&&(e=e7(e));for(var n=this._groups,t=n.length,r=new Array(t),s=0;s=y&&(y=w+1);!(N=v[y])&&++y=0;)(a=r[s])&&(i&&a.compareDocumentPosition(i)^4&&i.parentNode.insertBefore(a,i),i=a);return this}function BRn(e){e||(e=PRn);function n(_,p){return _&&p?e(_.__data__,p.__data__):!_-!p}for(var t=this._groups,r=t.length,s=new Array(r),i=0;in?1:e>=n?0:NaN}function FRn(){var e=arguments[0];return arguments[0]=this,e.apply(null,arguments),this}function HRn(){return Array.from(this)}function qRn(){for(var e=this._groups,n=0,t=e.length;n1?this.each((n==null?eMn:typeof n=="function"?nMn:tMn)(e,n,t??"")):uh(this.node(),e)}function uh(e,n){return e.style.getPropertyValue(n)||qH(e).getComputedStyle(e,null).getPropertyValue(n)}function sMn(e){return function(){delete this[e]}}function iMn(e,n){return function(){this[e]=n}}function aMn(e,n){return function(){var t=n.apply(this,arguments);t==null?delete this[e]:this[e]=t}}function oMn(e,n){return arguments.length>1?this.each((n==null?sMn:typeof n=="function"?aMn:iMn)(e,n)):this.node()[e]}function UH(e){return e.trim().split(/^|\s+/)}function t7(e){return e.classList||new GH(e)}function GH(e){this._node=e,this._names=UH(e.getAttribute("class")||"")}GH.prototype={add:function(e){var n=this._names.indexOf(e);n<0&&(this._names.push(e),this._node.setAttribute("class",this._names.join(" ")))},remove:function(e){var n=this._names.indexOf(e);n>=0&&(this._names.splice(n,1),this._node.setAttribute("class",this._names.join(" ")))},contains:function(e){return this._names.indexOf(e)>=0}};function VH(e,n){for(var t=t7(e),r=-1,s=n.length;++r=0&&(t=n.slice(r+1),n=n.slice(0,r)),{type:n,name:t}})}function DMn(e){return function(){var n=this.__on;if(n){for(var t=0,r=-1,s=n.length,i;t()=>e;function U5(e,{sourceEvent:n,subject:t,target:r,identifier:s,active:i,x:a,y:o,dx:l,dy:u,dispatch:h}){Object.defineProperties(this,{type:{value:e,enumerable:!0,configurable:!0},sourceEvent:{value:n,enumerable:!0,configurable:!0},subject:{value:t,enumerable:!0,configurable:!0},target:{value:r,enumerable:!0,configurable:!0},identifier:{value:s,enumerable:!0,configurable:!0},active:{value:i,enumerable:!0,configurable:!0},x:{value:a,enumerable:!0,configurable:!0},y:{value:o,enumerable:!0,configurable:!0},dx:{value:l,enumerable:!0,configurable:!0},dy:{value:u,enumerable:!0,configurable:!0},_:{value:h}})}U5.prototype.on=function(){var e=this._.on.apply(this._,arguments);return e===this._?this:e};function GMn(e){return!e.ctrlKey&&!e.button}function VMn(){return this.parentNode}function KMn(e,n){return n??{x:e.x,y:e.y}}function WMn(){return navigator.maxTouchPoints||"ontouchstart"in this}function ZH(){var e=GMn,n=VMn,t=KMn,r=WMn,s={},i=Sy("start","drag","end"),a=0,o,l,u,h,_=0;function p(C){C.on("mousedown.drag",m).filter(r).on("touchstart.drag",v).on("touchmove.drag",b,UMn).on("touchend.drag touchcancel.drag",w).style("touch-action","none").style("-webkit-tap-highlight-color","rgba(0,0,0,0)")}function m(C,N){if(!(h||!e.call(this,C,N))){var E=y(this,n.call(this,C,N),C,N,"mouse");E&&(Qi(C.view).on("mousemove.drag",x,I0).on("mouseup.drag",k,I0),XH(C.view),_4(C),u=!1,o=C.clientX,l=C.clientY,E("start",C))}}function x(C){if(Ed(C),!u){var N=C.clientX-o,E=C.clientY-l;u=N*N+E*E>_}s.mouse("drag",C)}function k(C){Qi(C.view).on("mousemove.drag mouseup.drag",null),YH(C.view,u),Ed(C),s.mouse("end",C)}function v(C,N){if(e.call(this,C,N)){var E=C.changedTouches,T=n.call(this,C,N),j=E.length,M,D;for(M=0;M>8&15|n>>4&240,n>>4&15|n&240,(n&15)<<4|n&15,1):t===8?x1(n>>24&255,n>>16&255,n>>8&255,(n&255)/255):t===4?x1(n>>12&15|n>>8&240,n>>8&15|n>>4&240,n>>4&15|n&240,((n&15)<<4|n&15)/255):null):(n=XMn.exec(e))?new ji(n[1],n[2],n[3],1):(n=YMn.exec(e))?new ji(n[1]*255/100,n[2]*255/100,n[3]*255/100,1):(n=ZMn.exec(e))?x1(n[1],n[2],n[3],n[4]):(n=JMn.exec(e))?x1(n[1]*255/100,n[2]*255/100,n[3]*255/100,n[4]):(n=eOn.exec(e))?RR(n[1],n[2]/100,n[3]/100,1):(n=tOn.exec(e))?RR(n[1],n[2]/100,n[3]/100,n[4]):ER.hasOwnProperty(e)?jR(ER[e]):e==="transparent"?new ji(NaN,NaN,NaN,0):null}function jR(e){return new ji(e>>16&255,e>>8&255,e&255,1)}function x1(e,n,t,r){return r<=0&&(e=n=t=NaN),new ji(e,n,t,r)}function sOn(e){return e instanceof Em||(e=Q_(e)),e?(e=e.rgb(),new ji(e.r,e.g,e.b,e.opacity)):new ji}function G5(e,n,t,r){return arguments.length===1?sOn(e):new ji(e,n,t,r??1)}function ji(e,n,t,r){this.r=+e,this.g=+n,this.b=+t,this.opacity=+r}n7(ji,G5,JH(Em,{brighter(e){return e=e==null?Jv:Math.pow(Jv,e),new ji(this.r*e,this.g*e,this.b*e,this.opacity)},darker(e){return e=e==null?$0:Math.pow($0,e),new ji(this.r*e,this.g*e,this.b*e,this.opacity)},rgb(){return this},clamp(){return new ji(I_(this.r),I_(this.g),I_(this.b),eb(this.opacity))},displayable(){return-.5<=this.r&&this.r<255.5&&-.5<=this.g&&this.g<255.5&&-.5<=this.b&&this.b<255.5&&0<=this.opacity&&this.opacity<=1},hex:TR,formatHex:TR,formatHex8:iOn,formatRgb:AR,toString:AR}));function TR(){return`#${g_(this.r)}${g_(this.g)}${g_(this.b)}`}function iOn(){return`#${g_(this.r)}${g_(this.g)}${g_(this.b)}${g_((isNaN(this.opacity)?1:this.opacity)*255)}`}function AR(){const e=eb(this.opacity);return`${e===1?"rgb(":"rgba("}${I_(this.r)}, ${I_(this.g)}, ${I_(this.b)}${e===1?")":`, ${e})`}`}function eb(e){return isNaN(e)?1:Math.max(0,Math.min(1,e))}function I_(e){return Math.max(0,Math.min(255,Math.round(e)||0))}function g_(e){return e=I_(e),(e<16?"0":"")+e.toString(16)}function RR(e,n,t,r){return r<=0?e=n=t=NaN:t<=0||t>=1?e=n=NaN:n<=0&&(e=NaN),new ro(e,n,t,r)}function eq(e){if(e instanceof ro)return new ro(e.h,e.s,e.l,e.opacity);if(e instanceof Em||(e=Q_(e)),!e)return new ro;if(e instanceof ro)return e;e=e.rgb();var n=e.r/255,t=e.g/255,r=e.b/255,s=Math.min(n,t,r),i=Math.max(n,t,r),a=NaN,o=i-s,l=(i+s)/2;return o?(n===i?a=(t-r)/o+(t0&&l<1?0:a,new ro(a,o,l,e.opacity)}function aOn(e,n,t,r){return arguments.length===1?eq(e):new ro(e,n,t,r??1)}function ro(e,n,t,r){this.h=+e,this.s=+n,this.l=+t,this.opacity=+r}n7(ro,aOn,JH(Em,{brighter(e){return e=e==null?Jv:Math.pow(Jv,e),new ro(this.h,this.s,this.l*e,this.opacity)},darker(e){return e=e==null?$0:Math.pow($0,e),new ro(this.h,this.s,this.l*e,this.opacity)},rgb(){var e=this.h%360+(this.h<0)*360,n=isNaN(e)||isNaN(this.s)?0:this.s,t=this.l,r=t+(t<.5?t:1-t)*n,s=2*t-r;return new ji(f4(e>=240?e-240:e+120,s,r),f4(e,s,r),f4(e<120?e+240:e-120,s,r),this.opacity)},clamp(){return new ro(MR(this.h),w1(this.s),w1(this.l),eb(this.opacity))},displayable(){return(0<=this.s&&this.s<=1||isNaN(this.s))&&0<=this.l&&this.l<=1&&0<=this.opacity&&this.opacity<=1},formatHsl(){const e=eb(this.opacity);return`${e===1?"hsl(":"hsla("}${MR(this.h)}, ${w1(this.s)*100}%, ${w1(this.l)*100}%${e===1?")":`, ${e})`}`}}));function MR(e){return e=(e||0)%360,e<0?e+360:e}function w1(e){return Math.max(0,Math.min(1,e||0))}function f4(e,n,t){return(e<60?n+(t-n)*e/60:e<180?t:e<240?n+(t-n)*(240-e)/60:n)*255}const r7=e=>()=>e;function oOn(e,n){return function(t){return e+t*n}}function lOn(e,n,t){return e=Math.pow(e,t),n=Math.pow(n,t)-e,t=1/t,function(r){return Math.pow(e+r*n,t)}}function cOn(e){return(e=+e)==1?tq:function(n,t){return t-n?lOn(n,t,e):r7(isNaN(n)?t:n)}}function tq(e,n){var t=n-e;return t?oOn(e,t):r7(isNaN(e)?n:e)}const tb=(function e(n){var t=cOn(n);function r(s,i){var a=t((s=G5(s)).r,(i=G5(i)).r),o=t(s.g,i.g),l=t(s.b,i.b),u=tq(s.opacity,i.opacity);return function(h){return s.r=a(h),s.g=o(h),s.b=l(h),s.opacity=u(h),s+""}}return r.gamma=e,r})(1);function uOn(e,n){n||(n=[]);var t=e?Math.min(n.length,e.length):0,r=n.slice(),s;return function(i){for(s=0;st&&(i=n.slice(t,i),o[a]?o[a]+=i:o[++a]=i),(r=r[0])===(s=s[0])?o[a]?o[a]+=s:o[++a]=s:(o[++a]=null,l.push({i:a,x:$o(r,s)})),t=d4.lastIndex;return t180?h+=360:h-u>180&&(u+=360),p.push({i:_.push(s(_)+"rotate(",null,r)-2,x:$o(u,h)})):h&&_.push(s(_)+"rotate("+h+r)}function o(u,h,_,p){u!==h?p.push({i:_.push(s(_)+"skewX(",null,r)-2,x:$o(u,h)}):h&&_.push(s(_)+"skewX("+h+r)}function l(u,h,_,p,m,x){if(u!==_||h!==p){var k=m.push(s(m)+"scale(",null,",",null,")");x.push({i:k-4,x:$o(u,_)},{i:k-2,x:$o(h,p)})}else(_!==1||p!==1)&&m.push(s(m)+"scale("+_+","+p+")")}return function(u,h){var _=[],p=[];return u=e(u),h=e(h),i(u.translateX,u.translateY,h.translateX,h.translateY,_,p),a(u.rotate,h.rotate,_,p),o(u.skewX,h.skewX,_,p),l(u.scaleX,u.scaleY,h.scaleX,h.scaleY,_,p),u=h=null,function(m){for(var x=-1,k=p.length,v;++x=0&&e._call.call(void 0,n),e=e._next;--_h}function LR(){X_=(rb=P0.now())+Ey,_h=Gp=0;try{COn()}finally{_h=0,NOn(),X_=0}}function EOn(){var e=P0.now(),n=e-rb;n>iq&&(Ey-=n,rb=e)}function NOn(){for(var e,n=nb,t,r=1/0;n;)n._call?(r>n._time&&(r=n._time),e=n,n=n._next):(t=n._next,n._next=null,n=e?e._next=t:nb=t);Vp=e,W5(r)}function W5(e){if(!_h){Gp&&(Gp=clearTimeout(Gp));var n=e-X_;n>24?(e<1/0&&(Gp=setTimeout(LR,e-P0.now()-Ey)),Lp&&(Lp=clearInterval(Lp))):(Lp||(rb=P0.now(),Lp=setInterval(EOn,iq)),_h=1,aq(LR))}}function IR(e,n,t){var r=new sb;return n=n==null?0:+n,r.restart(s=>{r.stop(),e(s+n)},n,t),r}var zOn=Sy("start","end","cancel","interrupt"),jOn=[],lq=0,$R=1,Q5=2,Z1=3,BR=4,X5=5,J1=6;function Ny(e,n,t,r,s,i){var a=e.__transition;if(!a)e.__transition={};else if(t in a)return;TOn(e,t,{name:n,index:r,group:s,on:zOn,tween:jOn,time:i.time,delay:i.delay,duration:i.duration,ease:i.ease,timer:null,state:lq})}function i7(e,n){var t=fo(e,n);if(t.state>lq)throw new Error("too late; already scheduled");return t}function sl(e,n){var t=fo(e,n);if(t.state>Z1)throw new Error("too late; already running");return t}function fo(e,n){var t=e.__transition;if(!t||!(t=t[n]))throw new Error("transition not found");return t}function TOn(e,n,t){var r=e.__transition,s;r[n]=t,t.timer=oq(i,0,t.time);function i(u){t.state=$R,t.timer.restart(a,t.delay,t.time),t.delay<=u&&a(u-t.delay)}function a(u){var h,_,p,m;if(t.state!==$R)return l();for(h in r)if(m=r[h],m.name===t.name){if(m.state===Z1)return IR(a);m.state===BR?(m.state=J1,m.timer.stop(),m.on.call("interrupt",e,e.__data__,m.index,m.group),delete r[h]):+hQ5&&r.state=0&&(n=n.slice(0,t)),!n||n==="start"})}function aDn(e,n,t){var r,s,i=iDn(n)?i7:sl;return function(){var a=i(this,e),o=a.on;o!==r&&(s=(r=o).copy()).on(n,t),a.on=s}}function oDn(e,n){var t=this._id;return arguments.length<2?fo(this.node(),t).on.on(e):this.each(aDn(t,e,n))}function lDn(e){return function(){var n=this.parentNode;for(var t in this.__transition)if(+t!==e)return;n&&n.removeChild(this)}}function cDn(){return this.on("end.remove",lDn(this._id))}function uDn(e){var n=this._name,t=this._id;typeof e!="function"&&(e=e7(e));for(var r=this._groups,s=r.length,i=new Array(s),a=0;a()=>e;function DDn(e,{sourceEvent:n,target:t,transform:r,dispatch:s}){Object.defineProperties(this,{type:{value:e,enumerable:!0,configurable:!0},sourceEvent:{value:n,enumerable:!0,configurable:!0},target:{value:t,enumerable:!0,configurable:!0},transform:{value:r,enumerable:!0,configurable:!0},_:{value:s}})}function Xl(e,n,t){this.k=e,this.x=n,this.y=t}Xl.prototype={constructor:Xl,scale:function(e){return e===1?this:new Xl(this.k*e,this.x,this.y)},translate:function(e,n){return e===0&n===0?this:new Xl(this.k,this.x+this.k*e,this.y+this.k*n)},apply:function(e){return[e[0]*this.k+this.x,e[1]*this.k+this.y]},applyX:function(e){return e*this.k+this.x},applyY:function(e){return e*this.k+this.y},invert:function(e){return[(e[0]-this.x)/this.k,(e[1]-this.y)/this.k]},invertX:function(e){return(e-this.x)/this.k},invertY:function(e){return(e-this.y)/this.k},rescaleX:function(e){return e.copy().domain(e.range().map(this.invertX,this).map(e.invert,e))},rescaleY:function(e){return e.copy().domain(e.range().map(this.invertY,this).map(e.invert,e))},toString:function(){return"translate("+this.x+","+this.y+") scale("+this.k+")"}};var zy=new Xl(1,0,0);fq.prototype=Xl.prototype;function fq(e){for(;!e.__zoom;)if(!(e=e.parentNode))return zy;return e.__zoom}function h4(e){e.stopImmediatePropagation()}function Ip(e){e.preventDefault(),e.stopImmediatePropagation()}function LDn(e){return(!e.ctrlKey||e.type==="wheel")&&!e.button}function IDn(){var e=this;return e instanceof SVGElement?(e=e.ownerSVGElement||e,e.hasAttribute("viewBox")?(e=e.viewBox.baseVal,[[e.x,e.y],[e.x+e.width,e.y+e.height]]):[[0,0],[e.width.baseVal.value,e.height.baseVal.value]]):[[0,0],[e.clientWidth,e.clientHeight]]}function PR(){return this.__zoom||zy}function $Dn(e){return-e.deltaY*(e.deltaMode===1?.05:e.deltaMode?1:.002)*(e.ctrlKey?10:1)}function BDn(){return navigator.maxTouchPoints||"ontouchstart"in this}function PDn(e,n,t){var r=e.invertX(n[0][0])-t[0][0],s=e.invertX(n[1][0])-t[1][0],i=e.invertY(n[0][1])-t[0][1],a=e.invertY(n[1][1])-t[1][1];return e.translate(s>r?(r+s)/2:Math.min(0,r)||Math.max(0,s),a>i?(i+a)/2:Math.min(0,i)||Math.max(0,a))}function dq(){var e=LDn,n=IDn,t=PDn,r=$Dn,s=BDn,i=[0,1/0],a=[[-1/0,-1/0],[1/0,1/0]],o=250,l=Y1,u=Sy("start","zoom","end"),h,_,p,m=500,x=150,k=0,v=10;function b(q){q.property("__zoom",PR).on("wheel.zoom",j,{passive:!1}).on("mousedown.zoom",M).on("dblclick.zoom",D).filter(s).on("touchstart.zoom",I).on("touchmove.zoom",P).on("touchend.zoom touchcancel.zoom",U).style("-webkit-tap-highlight-color","rgba(0,0,0,0)")}b.transform=function(q,W,H,Y){var te=q.selection?q.selection():q;te.property("__zoom",PR),q!==te?N(q,W,H,Y):te.interrupt().each(function(){E(this,arguments).event(Y).start().zoom(null,typeof W=="function"?W.apply(this,arguments):W).end()})},b.scaleBy=function(q,W,H,Y){b.scaleTo(q,function(){var te=this.__zoom.k,$=typeof W=="function"?W.apply(this,arguments):W;return te*$},H,Y)},b.scaleTo=function(q,W,H,Y){b.transform(q,function(){var te=n.apply(this,arguments),$=this.__zoom,L=H==null?C(te):typeof H=="function"?H.apply(this,arguments):H,F=$.invert(L),G=typeof W=="function"?W.apply(this,arguments):W;return t(y(w($,G),L,F),te,a)},H,Y)},b.translateBy=function(q,W,H,Y){b.transform(q,function(){return t(this.__zoom.translate(typeof W=="function"?W.apply(this,arguments):W,typeof H=="function"?H.apply(this,arguments):H),n.apply(this,arguments),a)},null,Y)},b.translateTo=function(q,W,H,Y,te){b.transform(q,function(){var $=n.apply(this,arguments),L=this.__zoom,F=Y==null?C($):typeof Y=="function"?Y.apply(this,arguments):Y;return t(zy.translate(F[0],F[1]).scale(L.k).translate(typeof W=="function"?-W.apply(this,arguments):-W,typeof H=="function"?-H.apply(this,arguments):-H),$,a)},Y,te)};function w(q,W){return W=Math.max(i[0],Math.min(i[1],W)),W===q.k?q:new Xl(W,q.x,q.y)}function y(q,W,H){var Y=W[0]-H[0]*q.k,te=W[1]-H[1]*q.k;return Y===q.x&&te===q.y?q:new Xl(q.k,Y,te)}function C(q){return[(+q[0][0]+ +q[1][0])/2,(+q[0][1]+ +q[1][1])/2]}function N(q,W,H,Y){q.on("start.zoom",function(){E(this,arguments).event(Y).start()}).on("interrupt.zoom end.zoom",function(){E(this,arguments).event(Y).end()}).tween("zoom",function(){var te=this,$=arguments,L=E(te,$).event(Y),F=n.apply(te,$),G=H==null?C(F):typeof H=="function"?H.apply(te,$):H,V=Math.max(F[1][0]-F[0][0],F[1][1]-F[0][1]),ee=te.__zoom,ce=typeof W=="function"?W.apply(te,$):W,ae=l(ee.invert(G).concat(V/ee.k),ce.invert(G).concat(V/ce.k));return function(se){if(se===1)se=ce;else{var X=ae(se),oe=V/X[2];se=new Xl(oe,G[0]-X[0]*oe,G[1]-X[1]*oe)}L.zoom(null,se)}})}function E(q,W,H){return!H&&q.__zooming||new T(q,W)}function T(q,W){this.that=q,this.args=W,this.active=0,this.sourceEvent=null,this.extent=n.apply(q,W),this.taps=0}T.prototype={event:function(q){return q&&(this.sourceEvent=q),this},start:function(){return++this.active===1&&(this.that.__zooming=this,this.emit("start")),this},zoom:function(q,W){return this.mouse&&q!=="mouse"&&(this.mouse[1]=W.invert(this.mouse[0])),this.touch0&&q!=="touch"&&(this.touch0[1]=W.invert(this.touch0[0])),this.touch1&&q!=="touch"&&(this.touch1[1]=W.invert(this.touch1[0])),this.that.__zoom=W,this.emit("zoom"),this},end:function(){return--this.active===0&&(delete this.that.__zooming,this.emit("end")),this},emit:function(q){var W=Qi(this.that).datum();u.call(q,this.that,new DDn(q,{sourceEvent:this.sourceEvent,target:b,transform:this.that.__zoom,dispatch:u}),W)}};function j(q,...W){if(!e.apply(this,arguments))return;var H=E(this,W).event(q),Y=this.__zoom,te=Math.max(i[0],Math.min(i[1],Y.k*Math.pow(2,r.apply(this,arguments)))),$=Za(q);if(H.wheel)(H.mouse[0][0]!==$[0]||H.mouse[0][1]!==$[1])&&(H.mouse[1]=Y.invert(H.mouse[0]=$)),clearTimeout(H.wheel);else{if(Y.k===te)return;H.mouse=[$,Y.invert($)],ev(this),H.start()}Ip(q),H.wheel=setTimeout(L,x),H.zoom("mouse",t(y(w(Y,te),H.mouse[0],H.mouse[1]),H.extent,a));function L(){H.wheel=null,H.end()}}function M(q,...W){if(p||!e.apply(this,arguments))return;var H=q.currentTarget,Y=E(this,W,!0).event(q),te=Qi(q.view).on("mousemove.zoom",G,!0).on("mouseup.zoom",V,!0),$=Za(q,H),L=q.clientX,F=q.clientY;XH(q.view),h4(q),Y.mouse=[$,this.__zoom.invert($)],ev(this),Y.start();function G(ee){if(Ip(ee),!Y.moved){var ce=ee.clientX-L,ae=ee.clientY-F;Y.moved=ce*ce+ae*ae>k}Y.event(ee).zoom("mouse",t(y(Y.that.__zoom,Y.mouse[0]=Za(ee,H),Y.mouse[1]),Y.extent,a))}function V(ee){te.on("mousemove.zoom mouseup.zoom",null),YH(ee.view,Y.moved),Ip(ee),Y.event(ee).end()}}function D(q,...W){if(e.apply(this,arguments)){var H=this.__zoom,Y=Za(q.changedTouches?q.changedTouches[0]:q,this),te=H.invert(Y),$=H.k*(q.shiftKey?.5:2),L=t(y(w(H,$),Y,te),n.apply(this,W),a);Ip(q),o>0?Qi(this).transition().duration(o).call(N,L,Y,q):Qi(this).call(b.transform,L,Y,q)}}function I(q,...W){if(e.apply(this,arguments)){var H=q.touches,Y=H.length,te=E(this,W,q.changedTouches.length===Y).event(q),$,L,F,G;for(h4(q),L=0;L`Seems like you have not used ${e==="svelte"?"SvelteFlowProvider":"ReactFlowProvider"} as an ancestor. Help: https://${e}flow.dev/error#001`,error002:()=>"It looks like you've created a new nodeTypes or edgeTypes object. If this wasn't on purpose please define the nodeTypes/edgeTypes outside of the component or memoize them.",error003:e=>`Node type "${e}" not found. Using fallback type "default".`,error004:()=>"The parent container needs a width and a height to render the graph.",error005:()=>"Only child nodes can use a parent extent.",error006:()=>"Can't create edge. An edge needs a source and a target.",error007:e=>`The old edge with id=${e} does not exist.`,error009:e=>`Marker type "${e}" doesn't exist.`,error008:(e,{id:n,sourceHandle:t,targetHandle:r})=>`Couldn't create edge for ${e} handle id: "${e==="source"?t:r}", edge id: ${n}.`,error010:()=>"Handle: No node id found. Make sure to only use a Handle inside a custom Node.",error011:e=>`Edge type "${e}" not found. Using fallback type "default".`,error012:e=>`Node with id "${e}" does not exist, it may have been removed. This can happen when a node is deleted before the "onNodeClick" handler is called.`,error013:(e="react")=>`It seems that you haven't loaded the styles. Please import '@xyflow/${e}/dist/style.css' or base.css to make sure everything is working properly.`,error014:()=>"useNodeConnections: No node ID found. Call useNodeConnections inside a custom Node or provide a node ID.",error015:()=>"It seems that you are trying to drag a node that is not initialized. Please use onNodesChange as explained in the docs.",error016:e=>`Edge with id "${e}" does not exist, it may have been removed. This can happen when an edge is deleted before the "onEdgeClick" handler is called.`},F0=[[Number.NEGATIVE_INFINITY,Number.NEGATIVE_INFINITY],[Number.POSITIVE_INFINITY,Number.POSITIVE_INFINITY]],hq=["Enter"," ","Escape"],pq={"node.a11yDescription.default":"Press enter or space to select a node. Press delete to remove it and escape to cancel.","node.a11yDescription.keyboardDisabled":"Press enter or space to select a node. You can then use the arrow keys to move the node around. Press delete to remove it and escape to cancel.","node.a11yDescription.ariaLiveMessage":({direction:e,x:n,y:t})=>`Moved selected node ${e}. New position, x: ${n}, y: ${t}`,"edge.a11yDescription.default":"Press enter or space to select an edge. You can then press delete to remove it or escape to cancel.","controls.ariaLabel":"Control Panel","controls.zoomIn.ariaLabel":"Zoom In","controls.zoomOut.ariaLabel":"Zoom Out","controls.fitView.ariaLabel":"Fit View","controls.interactive.ariaLabel":"Toggle Interactivity","minimap.ariaLabel":"Mini Map","handle.ariaLabel":"Handle"};var fh;(function(e){e.Strict="strict",e.Loose="loose"})(fh||(fh={}));var $_;(function(e){e.Free="free",e.Vertical="vertical",e.Horizontal="horizontal"})($_||($_={}));var H0;(function(e){e.Partial="partial",e.Full="full"})(H0||(H0={}));const mq={inProgress:!1,isValid:null,from:null,fromHandle:null,fromPosition:null,fromNode:null,to:null,toHandle:null,toPosition:null,toNode:null,pointer:null};var eu;(function(e){e.Bezier="default",e.Straight="straight",e.Step="step",e.SmoothStep="smoothstep",e.SimpleBezier="simplebezier"})(eu||(eu={}));var ib;(function(e){e.Arrow="arrow",e.ArrowClosed="arrowclosed"})(ib||(ib={}));var zt;(function(e){e.Left="left",e.Top="top",e.Right="right",e.Bottom="bottom"})(zt||(zt={}));const FR={[zt.Left]:zt.Right,[zt.Right]:zt.Left,[zt.Top]:zt.Bottom,[zt.Bottom]:zt.Top};function gq(e){return e===null?null:e?"valid":"invalid"}const vq=e=>"id"in e&&"source"in e&&"target"in e,FDn=e=>"id"in e&&"position"in e&&!("source"in e)&&!("target"in e),o7=e=>"id"in e&&"internals"in e&&!("source"in e)&&!("target"in e),Nm=(e,n=[0,0])=>{const{width:t,height:r}=uc(e),s=e.origin??n,i=t*s[0],a=r*s[1];return{x:e.position.x-i,y:e.position.y-a}},HDn=(e,n={nodeOrigin:[0,0]})=>{if(e.length===0)return{x:0,y:0,width:0,height:0};const t=e.reduce((r,s)=>{const i=typeof s=="string";let a=!n.nodeLookup&&!i?s:void 0;n.nodeLookup&&(a=i?n.nodeLookup.get(s):o7(s)?s:n.nodeLookup.get(s.id));const o=a?ab(a,n.nodeOrigin):{x:0,y:0,x2:0,y2:0};return jy(r,o)},{x:1/0,y:1/0,x2:-1/0,y2:-1/0});return Ty(t)},zm=(e,n={})=>{let t={x:1/0,y:1/0,x2:-1/0,y2:-1/0},r=!1;return e.forEach(s=>{(n.filter===void 0||n.filter(s))&&(t=jy(t,ab(s)),r=!0)}),r?Ty(t):{x:0,y:0,width:0,height:0}},l7=(e,n,[t,r,s]=[0,0,1],i=!1,a=!1)=>{const o=(n.x-t)/s,l=(n.y-r)/s,u=n.width/s,h=n.height/s,_=[];for(const p of e.values()){const{measured:m,selectable:x=!0,hidden:k=!1}=p;if(a&&!x||k)continue;const v=m.width??p.width??p.initialWidth??0,b=m.height??p.height??p.initialHeight??0,{x:w,y}=p.internals.positionAbsolute,C=wq(o,l,u,h,w,y,v,b),N=v*b,E=i&&C>0;(!p.internals.handleBounds||E||C>=N||p.dragging)&&_.push(p)}return _},qDn=(e,n)=>{const t=new Set;return e.forEach(r=>{t.add(r.id)}),n.filter(r=>t.has(r.source)||t.has(r.target))};function UDn(e,n){const t=new Map,r=n!=null&&n.nodes?new Set(n.nodes.map(s=>s.id)):null;return e.forEach(s=>{s.measured.width&&s.measured.height&&((n==null?void 0:n.includeHiddenNodes)||!s.hidden)&&(!r||r.has(s.id))&&t.set(s.id,s)}),t}async function GDn({nodes:e,width:n,height:t,panZoom:r,minZoom:s,maxZoom:i},a){if(e.size===0)return!0;const o=UDn(e,a),l=zm(o),u=u7(l,n,t,(a==null?void 0:a.minZoom)??s,(a==null?void 0:a.maxZoom)??i,(a==null?void 0:a.padding)??.1);return await r.setViewport(u,{duration:a==null?void 0:a.duration,ease:a==null?void 0:a.ease,interpolate:a==null?void 0:a.interpolate}),!0}function bq({nodeId:e,nextPosition:n,nodeLookup:t,nodeOrigin:r=[0,0],nodeExtent:s,onError:i}){const a=t.get(e),o=a.parentId?t.get(a.parentId):void 0,{x:l,y:u}=o?o.internals.positionAbsolute:{x:0,y:0},h=a.origin??r;let _=a.extent||s;if(a.extent==="parent"&&!a.expandParent)if(!o)i==null||i("005",uo.error005());else{const m=o.measured.width,x=o.measured.height;m&&x&&(_=[[l,u],[l+m,u+x]])}else o&&Z_(a.extent)&&(_=[[a.extent[0][0]+l,a.extent[0][1]+u],[a.extent[1][0]+l,a.extent[1][1]+u]]);const p=Z_(_)?Y_(n,_,a.measured):n;return(a.measured.width===void 0||a.measured.height===void 0)&&(i==null||i("015",uo.error015())),{position:{x:p.x-l+(a.measured.width??0)*h[0],y:p.y-u+(a.measured.height??0)*h[1]},positionAbsolute:p}}async function VDn({nodesToRemove:e=[],edgesToRemove:n=[],nodes:t,edges:r,onBeforeDelete:s}){const i=new Set(e.map(p=>p.id)),a=[];for(const p of t){if(p.deletable===!1)continue;const m=i.has(p.id),x=!m&&p.parentId&&a.find(k=>k.id===p.parentId);(m||x)&&a.push(p)}const o=new Set(n.map(p=>p.id)),l=r.filter(p=>p.deletable!==!1),h=qDn(a,l);for(const p of l)o.has(p.id)&&!h.find(x=>x.id===p.id)&&h.push(p);if(!s)return{edges:h,nodes:a};const _=await s({nodes:a,edges:h});return typeof _=="boolean"?_?{edges:h,nodes:a}:{edges:[],nodes:[]}:_}const dh=(e,n=0,t=1)=>Math.min(Math.max(e,n),t),Y_=(e={x:0,y:0},n,t)=>({x:dh(e.x,n[0][0],n[1][0]-((t==null?void 0:t.width)??0)),y:dh(e.y,n[0][1],n[1][1]-((t==null?void 0:t.height)??0))});function yq(e,n,t){const{width:r,height:s}=uc(t),{x:i,y:a}=t.internals.positionAbsolute;return Y_(e,[[i,a],[i+r,a+s]],n)}const HR=(e,n,t)=>et?-dh(Math.abs(e-t),1,n)/n:0,c7=(e,n,t=15,r=40)=>{const s=HR(e.x,r,n.width-r)*t,i=HR(e.y,r,n.height-r)*t;return[s,i]},jy=(e,n)=>({x:Math.min(e.x,n.x),y:Math.min(e.y,n.y),x2:Math.max(e.x2,n.x2),y2:Math.max(e.y2,n.y2)}),Y5=({x:e,y:n,width:t,height:r})=>({x:e,y:n,x2:e+t,y2:n+r}),Ty=({x:e,y:n,x2:t,y2:r})=>({x:e,y:n,width:t-e,height:r-n}),q0=(e,n=[0,0])=>{var s,i;const{x:t,y:r}=o7(e)?e.internals.positionAbsolute:Nm(e,n);return{x:t,y:r,width:((s=e.measured)==null?void 0:s.width)??e.width??e.initialWidth??0,height:((i=e.measured)==null?void 0:i.height)??e.height??e.initialHeight??0}},ab=(e,n=[0,0])=>{var s,i;const{x:t,y:r}=o7(e)?e.internals.positionAbsolute:Nm(e,n);return{x:t,y:r,x2:t+(((s=e.measured)==null?void 0:s.width)??e.width??e.initialWidth??0),y2:r+(((i=e.measured)==null?void 0:i.height)??e.height??e.initialHeight??0)}},xq=(e,n)=>Ty(jy(Y5(e),Y5(n))),wq=(e,n,t,r,s,i,a,o)=>{const l=Math.max(0,Math.min(e+t,s+a)-Math.max(e,s)),u=Math.max(0,Math.min(n+r,i+o)-Math.max(n,i));return Math.ceil(l*u)},ob=(e,n)=>wq(e.x,e.y,e.width,e.height,n.x,n.y,n.width,n.height),qR=e=>io(e.width)&&io(e.height)&&io(e.x)&&io(e.y),io=e=>!isNaN(e)&&isFinite(e),kq=(e,n)=>(t,r)=>{},jm=(e,n=[1,1])=>({x:n[0]*Math.round(e.x/n[0]),y:n[1]*Math.round(e.y/n[1])}),Tm=({x:e,y:n},[t,r,s],i=!1,a=[1,1])=>{const o={x:(e-t)/s,y:(n-r)/s};return i?jm(o,a):o},hh=({x:e,y:n},[t,r,s])=>({x:e*s+t,y:n*s+r});function nd(e,n){if(typeof e=="number")return Math.floor((n-n/(1+e))*.5);if(typeof e=="string"&&e.endsWith("px")){const t=parseFloat(e);if(!Number.isNaN(t))return Math.floor(t)}if(typeof e=="string"&&e.endsWith("%")){const t=parseFloat(e);if(!Number.isNaN(t))return Math.floor(n*t*.01)}return console.error(`The padding value "${e}" is invalid. Please provide a number or a string with a valid unit (px or %).`),0}function KDn(e,n,t){if(typeof e=="string"||typeof e=="number"){const r=nd(e,t),s=nd(e,n);return{top:r,right:s,bottom:r,left:s,x:s*2,y:r*2}}if(typeof e=="object"){const r=nd(e.top??e.y??0,t),s=nd(e.bottom??e.y??0,t),i=nd(e.left??e.x??0,n),a=nd(e.right??e.x??0,n);return{top:r,right:a,bottom:s,left:i,x:i+a,y:r+s}}return{top:0,right:0,bottom:0,left:0,x:0,y:0}}function WDn(e,n,t,r,s,i){const{x:a,y:o}=hh(e,[n,t,r]),{x:l,y:u}=hh({x:e.x+e.width,y:e.y+e.height},[n,t,r]),h=s-l,_=i-u;return{left:Math.floor(a),top:Math.floor(o),right:Math.floor(h),bottom:Math.floor(_)}}const u7=(e,n,t,r,s,i)=>{const a=KDn(i,n,t),o=(n-a.x)/e.width,l=(t-a.y)/e.height,u=Math.min(o,l),h=dh(u,r,s),_=e.x+e.width/2,p=e.y+e.height/2,m=n/2-_*h,x=t/2-p*h,k=WDn(e,m,x,h,n,t),v={left:Math.min(k.left-a.left,0),top:Math.min(k.top-a.top,0),right:Math.min(k.right-a.right,0),bottom:Math.min(k.bottom-a.bottom,0)};return{x:m-v.left+v.right,y:x-v.top+v.bottom,zoom:h}},U0=()=>{var e;return typeof navigator<"u"&&((e=navigator==null?void 0:navigator.userAgent)==null?void 0:e.indexOf("Mac"))>=0};function Z_(e){return e!=null&&e!=="parent"}function uc(e){var n,t;return{width:((n=e.measured)==null?void 0:n.width)??e.width??e.initialWidth??0,height:((t=e.measured)==null?void 0:t.height)??e.height??e.initialHeight??0}}function Sq(e){var n,t;return(((n=e.measured)==null?void 0:n.width)??e.width??e.initialWidth)!==void 0&&(((t=e.measured)==null?void 0:t.height)??e.height??e.initialHeight)!==void 0}function Cq(e,n={width:0,height:0},t,r,s){const i={...e},a=r.get(t);if(a){const o=a.origin||s;i.x+=a.internals.positionAbsolute.x-(n.width??0)*o[0],i.y+=a.internals.positionAbsolute.y-(n.height??0)*o[1]}return i}function UR(e,n){if(e.size!==n.size)return!1;for(const t of e)if(!n.has(t))return!1;return!0}function QDn(){let e,n;return{promise:new Promise((r,s)=>{e=r,n=s}),resolve:e,reject:n}}function XDn(e){return{...pq,...e||{}}}function o0(e,{snapGrid:n=[0,0],snapToGrid:t=!1,transform:r,containerBounds:s}){const{x:i,y:a}=ao(e),o=Tm({x:i-((s==null?void 0:s.left)??0),y:a-((s==null?void 0:s.top)??0)},r),{x:l,y:u}=t?jm(o,n):o;return{xSnapped:l,ySnapped:u,...o}}const _7=e=>({width:e.offsetWidth,height:e.offsetHeight}),Eq=e=>{var n;return((n=e==null?void 0:e.getRootNode)==null?void 0:n.call(e))||(window==null?void 0:window.document)},YDn=["INPUT","SELECT","TEXTAREA"];function Nq(e){var r,s;const n=((s=(r=e.composedPath)==null?void 0:r.call(e))==null?void 0:s[0])||e.target;return(n==null?void 0:n.nodeType)!==1?!1:YDn.includes(n.nodeName)||n.hasAttribute("contenteditable")||!!n.closest(".nokey")}const zq=e=>"clientX"in e,ao=(e,n)=>{var i,a;const t=zq(e),r=t?e.clientX:(i=e.touches)==null?void 0:i[0].clientX,s=t?e.clientY:(a=e.touches)==null?void 0:a[0].clientY;return{x:r-((n==null?void 0:n.left)??0),y:s-((n==null?void 0:n.top)??0)}},GR=(e,n,t,r,s)=>{const i=n.querySelectorAll(`.${e}`);return!i||!i.length?null:Array.from(i).map(a=>{const o=a.getBoundingClientRect();return{id:a.getAttribute("data-handleid"),type:e,nodeId:s,position:a.getAttribute("data-handlepos"),x:(o.left-t.left)/r,y:(o.top-t.top)/r,..._7(a)}})};function jq({sourceX:e,sourceY:n,targetX:t,targetY:r,sourceControlX:s,sourceControlY:i,targetControlX:a,targetControlY:o}){const l=e*.125+s*.375+a*.375+t*.125,u=n*.125+i*.375+o*.375+r*.125,h=Math.abs(l-e),_=Math.abs(u-n);return[l,u,h,_]}function C1(e,n){return e>=0?.5*e:n*25*Math.sqrt(-e)}function VR({pos:e,x1:n,y1:t,x2:r,y2:s,c:i}){switch(e){case zt.Left:return[n-C1(n-r,i),t];case zt.Right:return[n+C1(r-n,i),t];case zt.Top:return[n,t-C1(t-s,i)];case zt.Bottom:return[n,t+C1(s-t,i)]}}function Tq({sourceX:e,sourceY:n,sourcePosition:t=zt.Bottom,targetX:r,targetY:s,targetPosition:i=zt.Top,curvature:a=.25}){const[o,l]=VR({pos:t,x1:e,y1:n,x2:r,y2:s,c:a}),[u,h]=VR({pos:i,x1:r,y1:s,x2:e,y2:n,c:a}),[_,p,m,x]=jq({sourceX:e,sourceY:n,targetX:r,targetY:s,sourceControlX:o,sourceControlY:l,targetControlX:u,targetControlY:h});return[`M${e},${n} C${o},${l} ${u},${h} ${r},${s}`,_,p,m,x]}function Aq({sourceX:e,sourceY:n,targetX:t,targetY:r}){const s=Math.abs(t-e)/2,i=t0}const eLn=({source:e,sourceHandle:n,target:t,targetHandle:r})=>`xy-edge__${e}${n||""}-${t}${r||""}`,tLn=(e,n)=>n.some(t=>t.source===e.source&&t.target===e.target&&(t.sourceHandle===e.sourceHandle||!t.sourceHandle&&!e.sourceHandle)&&(t.targetHandle===e.targetHandle||!t.targetHandle&&!e.targetHandle)),nLn=(e,n,t={})=>{var i;if(!e.source||!e.target)return(i=t.onError)==null||i.call(t,"006",uo.error006()),n;const r=t.getEdgeId||eLn;let s;return vq(e)?s={...e}:s={...e,id:r(e)},tLn(s,n)?n:(s.sourceHandle===null&&delete s.sourceHandle,s.targetHandle===null&&delete s.targetHandle,n.concat(s))};function Rq({sourceX:e,sourceY:n,targetX:t,targetY:r}){const[s,i,a,o]=Aq({sourceX:e,sourceY:n,targetX:t,targetY:r});return[`M ${e},${n}L ${t},${r}`,s,i,a,o]}const KR={[zt.Left]:{x:-1,y:0},[zt.Right]:{x:1,y:0},[zt.Top]:{x:0,y:-1},[zt.Bottom]:{x:0,y:1}},rLn=({source:e,sourcePosition:n=zt.Bottom,target:t})=>n===zt.Left||n===zt.Right?e.xMath.sqrt(Math.pow(n.x-e.x,2)+Math.pow(n.y-e.y,2));function sLn({source:e,sourcePosition:n=zt.Bottom,target:t,targetPosition:r=zt.Top,center:s,offset:i,stepPosition:a}){const o=KR[n],l=KR[r],u={x:e.x+o.x*i,y:e.y+o.y*i},h={x:t.x+l.x*i,y:t.y+l.y*i},_=rLn({source:u,sourcePosition:n,target:h}),p=_.x!==0?"x":"y",m=_[p];let x=[],k,v;const b={x:0,y:0},w={x:0,y:0},[,,y,C]=Aq({sourceX:e.x,sourceY:e.y,targetX:t.x,targetY:t.y});if(o[p]*l[p]===-1){p==="x"?(k=s.x??u.x+(h.x-u.x)*a,v=s.y??(u.y+h.y)/2):(k=s.x??(u.x+h.x)/2,v=s.y??u.y+(h.y-u.y)*a);const j=[{x:k,y:u.y},{x:k,y:h.y}],M=[{x:u.x,y:v},{x:h.x,y:v}];o[p]===m?x=p==="x"?j:M:x=p==="x"?M:j}else{const j=[{x:u.x,y:h.y}],M=[{x:h.x,y:u.y}];if(p==="x"?x=o.x===m?M:j:x=o.y===m?j:M,n===r){const q=Math.abs(e[p]-t[p]);if(q<=i){const W=Math.min(i-1,i-q);o[p]===m?b[p]=(u[p]>e[p]?-1:1)*W:w[p]=(h[p]>t[p]?-1:1)*W}}if(n!==r){const q=p==="x"?"y":"x",W=o[p]===l[q],H=u[q]>h[q],Y=u[q]=U?(k=(D.x+I.x)/2,v=x[0].y):(k=x[0].x,v=(D.y+I.y)/2)}const N={x:u.x+b.x,y:u.y+b.y},E={x:h.x+w.x,y:h.y+w.y};return[[e,...N.x!==x[0].x||N.y!==x[0].y?[N]:[],...x,...E.x!==x[x.length-1].x||E.y!==x[x.length-1].y?[E]:[],t],k,v,y,C]}function iLn(e,n,t,r){const s=Math.min(WR(e,n)/2,WR(n,t)/2,r),{x:i,y:a}=n;if(e.x===i&&i===t.x||e.y===a&&a===t.y)return`L${i} ${a}`;if(e.y===a){const u=e.xt.id===n):e[0])||null}function J5(e,n){return e?typeof e=="string"?e:`${n?`${n}__`:""}${Object.keys(e).sort().map(r=>`${r}=${e[r]}`).join("&")}`:""}function oLn(e,{id:n,defaultColor:t,defaultMarkerStart:r,defaultMarkerEnd:s}){const i=new Set;return e.reduce((a,o)=>([o.markerStart||r,o.markerEnd||s].forEach(l=>{if(l&&typeof l=="object"){const u=J5(l,n);i.has(u)||(a.push({id:u,color:l.color||t,...l}),i.add(u))}}),a),[]).sort((a,o)=>a.id.localeCompare(o.id))}const Mq=1e3,lLn=10,f7={nodeOrigin:[0,0],nodeExtent:F0,elevateNodesOnSelect:!0,zIndexMode:"basic",defaults:{}},cLn={...f7,checkEquality:!0};function d7(e,n){const t={...e};for(const r in n)n[r]!==void 0&&(t[r]=n[r]);return t}function uLn(e,n,t){const r=d7(f7,t);for(const s of e.values())if(s.parentId)p7(s,e,n,r);else{const i=Nm(s,r.nodeOrigin),a=Z_(s.extent)?s.extent:r.nodeExtent,o=Y_(i,a,uc(s));s.internals.positionAbsolute=o}}function _Ln(e,n){if(!e.handles)return e.measured?n==null?void 0:n.internals.handleBounds:void 0;const t=[],r=[];for(const s of e.handles){const i={id:s.id,width:s.width??1,height:s.height??1,nodeId:e.id,x:s.x,y:s.y,position:s.position,type:s.type};s.type==="source"?t.push(i):s.type==="target"&&r.push(i)}return{source:t,target:r}}function h7(e){return e==="manual"}function ek(e,n,t,r={}){var h,_;const s=d7(cLn,r),i={i:0},a=new Map(n),o=s!=null&&s.elevateNodesOnSelect&&!h7(s.zIndexMode)?Mq:0;let l=e.length>0,u=!1;n.clear(),t.clear();for(const p of e){let m=a.get(p.id);if(s.checkEquality&&p===(m==null?void 0:m.internals.userNode))n.set(p.id,m);else{const x=Nm(p,s.nodeOrigin),k=Z_(p.extent)?p.extent:s.nodeExtent,v=Y_(x,k,uc(p));m={...s.defaults,...p,measured:{width:(h=p.measured)==null?void 0:h.width,height:(_=p.measured)==null?void 0:_.height},internals:{positionAbsolute:v,handleBounds:_Ln(p,m),z:Oq(p,o,s.zIndexMode),userNode:p}},n.set(p.id,m)}(m.measured===void 0||m.measured.width===void 0||m.measured.height===void 0)&&!m.hidden&&(l=!1),p.parentId&&p7(m,n,t,r,i),u||(u=p.selected??!1)}return{nodesInitialized:l,hasSelectedNodes:u}}function fLn(e,n){if(!e.parentId)return;const t=n.get(e.parentId);t?t.set(e.id,e):n.set(e.parentId,new Map([[e.id,e]]))}function p7(e,n,t,r,s){const{elevateNodesOnSelect:i,nodeOrigin:a,nodeExtent:o,zIndexMode:l}=d7(f7,r),u=e.parentId,h=n.get(u);if(!h){console.warn(`Parent node ${u} not found. Please make sure that parent nodes are in front of their child nodes in the nodes array.`);return}fLn(e,t),s&&!h.parentId&&h.internals.rootParentIndex===void 0&&l==="auto"&&(h.internals.rootParentIndex=++s.i,h.internals.z=h.internals.z+s.i*lLn),s&&h.internals.rootParentIndex!==void 0&&(s.i=h.internals.rootParentIndex);const _=i&&!h7(l)?Mq:0,{x:p,y:m,z:x}=dLn(e,h,a,o,_,l),{positionAbsolute:k}=e.internals,v=p!==k.x||m!==k.y;(v||x!==e.internals.z)&&n.set(e.id,{...e,internals:{...e.internals,positionAbsolute:v?{x:p,y:m}:k,z:x}})}function Oq(e,n,t){const r=io(e.zIndex)?e.zIndex:0;return h7(t)?r:r+(e.selected?n:0)}function dLn(e,n,t,r,s,i){const{x:a,y:o}=n.internals.positionAbsolute,l=uc(e),u=Nm(e,t),h=Z_(e.extent)?Y_(u,e.extent,l):u;let _=Y_({x:a+h.x,y:o+h.y},r,l);e.extent==="parent"&&(_=yq(_,l,n));const p=Oq(e,s,i),m=n.internals.z??0;return{x:_.x,y:_.y,z:m>=p?m+1:p}}function m7(e,n,t,r=[0,0]){var a;const s=[],i=new Map;for(const o of e){const l=n.get(o.parentId);if(!l)continue;const u=((a=i.get(o.parentId))==null?void 0:a.expandedRect)??q0(l),h=xq(u,o.rect);i.set(o.parentId,{expandedRect:h,parent:l})}return i.size>0&&i.forEach(({expandedRect:o,parent:l},u)=>{var y;const h=l.internals.positionAbsolute,_=uc(l),p=l.origin??r,m=o.x0||x>0||b||w)&&(s.push({id:u,type:"position",position:{x:l.position.x-m+b,y:l.position.y-x+w}}),(y=t.get(u))==null||y.forEach(C=>{e.some(N=>N.id===C.id)||s.push({id:C.id,type:"position",position:{x:C.position.x+m,y:C.position.y+x}})})),(_.width0){const m=m7(p,n,t,s);u.push(...m)}return{changes:u,updatedInternals:l}}async function pLn({delta:e,panZoom:n,transform:t,translateExtent:r,width:s,height:i}){if(!n||!e.x&&!e.y)return!1;const a=await n.setViewportConstrained({x:t[0]+e.x,y:t[1]+e.y,zoom:t[2]},[[0,0],[s,i]],r);return!!a&&(a.x!==t[0]||a.y!==t[1]||a.k!==t[2])}function ZR(e,n,t,r,s,i){let a=s;const o=r.get(a)||new Map;r.set(a,o.set(t,n)),a=`${s}-${e}`;const l=r.get(a)||new Map;if(r.set(a,l.set(t,n)),i){a=`${s}-${e}-${i}`;const u=r.get(a)||new Map;r.set(a,u.set(t,n))}}function Dq(e,n,t){e.clear(),n.clear();for(const r of t){const{source:s,target:i,sourceHandle:a=null,targetHandle:o=null}=r,l={edgeId:r.id,source:s,target:i,sourceHandle:a,targetHandle:o},u=`${s}-${a}--${i}-${o}`,h=`${i}-${o}--${s}-${a}`;ZR("source",l,h,e,s,a),ZR("target",l,u,e,i,o),n.set(r.id,r)}}function Lq(e,n){if(!e.parentId)return!1;const t=n.get(e.parentId);return t?t.selected?!0:Lq(t,n):!1}function JR(e,n,t){var s;let r=e;do{if((s=r==null?void 0:r.matches)!=null&&s.call(r,n))return!0;if(r===t)return!1;r=r==null?void 0:r.parentElement}while(r);return!1}function mLn(e,n,t,r){const s=new Map;for(const[i,a]of e)if((a.selected||a.id===r)&&(!a.parentId||!Lq(a,e))&&(a.draggable||n&&typeof a.draggable>"u")){const o=e.get(i);o&&s.set(i,{id:i,position:o.position||{x:0,y:0},distance:{x:t.x-o.internals.positionAbsolute.x,y:t.y-o.internals.positionAbsolute.y},extent:o.extent,parentId:o.parentId,origin:o.origin,expandParent:o.expandParent,internals:{positionAbsolute:o.internals.positionAbsolute||{x:0,y:0}},measured:{width:o.measured.width??0,height:o.measured.height??0}})}return s}function p4({nodeId:e,dragItems:n,nodeLookup:t,dragging:r=!0}){var a,o,l;const s=[];for(const[u,h]of n){const _=(a=t.get(u))==null?void 0:a.internals.userNode;_&&s.push({..._,position:h.position,dragging:r})}if(!e)return[s[0],s];const i=(o=t.get(e))==null?void 0:o.internals.userNode;return[i?{...i,position:((l=n.get(e))==null?void 0:l.position)||i.position,dragging:r}:s[0],s]}function gLn({dragItems:e,snapGrid:n,x:t,y:r}){const s=e.values().next().value;if(!s)return null;const i={x:t-s.distance.x,y:r-s.distance.y},a=jm(i,n);return{x:a.x-i.x,y:a.y-i.y}}function vLn({onNodeMouseDown:e,getStoreItems:n,onDragStart:t,onDrag:r,onDragStop:s}){let i={x:null,y:null},a=0,o=new Map,l=!1,u={x:0,y:0},h=null,_=!1,p=null,m=!1,x=!1,k=null;function v({noDragClassName:w,handleSelector:y,domNode:C,isSelectable:N,nodeId:E,nodeClickDistance:T=0}){p=Qi(C);function j({x:P,y:U}){const{nodeLookup:q,nodeExtent:W,snapGrid:H,snapToGrid:Y,nodeOrigin:te,onNodeDrag:$,onSelectionDrag:L,onError:F,updateNodePositions:G}=n();i={x:P,y:U};let V=!1;const ee=o.size>1,ce=ee&&W?Y5(zm(o)):null,ae=ee&&Y?gLn({dragItems:o,snapGrid:H,x:P,y:U}):null;for(const[se,X]of o){if(!q.has(se))continue;let oe={x:P-X.distance.x,y:U-X.distance.y};Y&&(oe=ae?{x:Math.round(oe.x+ae.x),y:Math.round(oe.y+ae.y)}:jm(oe,H));let le=null;if(ee&&W&&!X.extent&&ce){const{positionAbsolute:Ee}=X.internals,Ie=Ee.x-ce.x+W[0][0],ze=Ee.x+X.measured.width-ce.x2+W[1][0],He=Ee.y-ce.y+W[0][1],Oe=Ee.y+X.measured.height-ce.y2+W[1][1];le=[[Ie,He],[ze,Oe]]}const{position:_e,positionAbsolute:pe}=bq({nodeId:se,nextPosition:oe,nodeLookup:q,nodeExtent:le||W,nodeOrigin:te,onError:F});V=V||X.position.x!==_e.x||X.position.y!==_e.y,X.position=_e,X.internals.positionAbsolute=pe}if(x=x||V,!!V&&(G(o,!0),k&&(r||$||!E&&L))){const[se,X]=p4({nodeId:E,dragItems:o,nodeLookup:q});r==null||r(k,o,se,X),$==null||$(k,se,X),E||L==null||L(k,X)}}async function M(){if(!h)return;const{transform:P,panBy:U,autoPanSpeed:q,autoPanOnNodeDrag:W}=n();if(!W){l=!1,cancelAnimationFrame(a);return}const[H,Y]=c7(u,h,q);(H!==0||Y!==0)&&(i.x=(i.x??0)-H/P[2],i.y=(i.y??0)-Y/P[2],await U({x:H,y:Y})&&j(i)),a=requestAnimationFrame(M)}function D(P){var ee;const{nodeLookup:U,multiSelectionActive:q,nodesDraggable:W,transform:H,snapGrid:Y,snapToGrid:te,selectNodesOnDrag:$,onNodeDragStart:L,onSelectionDragStart:F,unselectNodesAndEdges:G}=n();_=!0,(!$||!N)&&!q&&E&&((ee=U.get(E))!=null&&ee.selected||G()),N&&$&&E&&(e==null||e(E));const V=o0(P.sourceEvent,{transform:H,snapGrid:Y,snapToGrid:te,containerBounds:h});if(i=V,o=mLn(U,W,V,E),o.size>0&&(t||L||!E&&F)){const[ce,ae]=p4({nodeId:E,dragItems:o,nodeLookup:U});t==null||t(P.sourceEvent,o,ce,ae),L==null||L(P.sourceEvent,ce,ae),E||F==null||F(P.sourceEvent,ae)}}const I=ZH().clickDistance(T).on("start",P=>{const{domNode:U,nodeDragThreshold:q,transform:W,snapGrid:H,snapToGrid:Y}=n();h=(U==null?void 0:U.getBoundingClientRect())||null,m=!1,x=!1,k=P.sourceEvent,q===0&&D(P),i=o0(P.sourceEvent,{transform:W,snapGrid:H,snapToGrid:Y,containerBounds:h}),u=ao(P.sourceEvent,h)}).on("drag",P=>{const{autoPanOnNodeDrag:U,transform:q,snapGrid:W,snapToGrid:H,nodeDragThreshold:Y,nodeLookup:te}=n(),$=o0(P.sourceEvent,{transform:q,snapGrid:W,snapToGrid:H,containerBounds:h});if(k=P.sourceEvent,(P.sourceEvent.type==="touchmove"&&P.sourceEvent.touches.length>1||E&&!te.has(E))&&(m=!0),!m){if(!l&&U&&_&&(l=!0,M()),!_){const L=ao(P.sourceEvent,h),F=L.x-u.x,G=L.y-u.y;Math.sqrt(F*F+G*G)>Y&&D(P)}(i.x!==$.xSnapped||i.y!==$.ySnapped)&&o&&_&&(u=ao(P.sourceEvent,h),j($))}}).on("end",P=>{if(!_||m){m&&o.size>0&&n().updateNodePositions(o,!1);return}if(l=!1,_=!1,cancelAnimationFrame(a),o.size>0){const{nodeLookup:U,updateNodePositions:q,onNodeDragStop:W,onSelectionDragStop:H}=n();if(x&&(q(o,!1),x=!1),s||W||!E&&H){const[Y,te]=p4({nodeId:E,dragItems:o,nodeLookup:U,dragging:!1});s==null||s(P.sourceEvent,o,Y,te),W==null||W(P.sourceEvent,Y,te),E||H==null||H(P.sourceEvent,te)}}}).filter(P=>{const U=P.target;return!P.button&&(!w||!JR(U,`.${w}`,C))&&(!y||JR(U,y,C))});p.call(I)}function b(){p==null||p.on(".drag",null)}return{update:v,destroy:b}}function bLn(e,n,t){const r=[],s={x:e.x-t,y:e.y-t,width:t*2,height:t*2};for(const i of n.values())ob(s,q0(i))>0&&r.push(i);return r}const yLn=250;function xLn(e,n,t,r){var o,l;let s=[],i=1/0;const a=bLn(e,t,n+yLn);for(const u of a){const h=[...((o=u.internals.handleBounds)==null?void 0:o.source)??[],...((l=u.internals.handleBounds)==null?void 0:l.target)??[]];for(const _ of h){if(r.nodeId===_.nodeId&&r.type===_.type&&r.id===_.id)continue;const{x:p,y:m}=J_(u,_,_.position,!0),x=Math.sqrt(Math.pow(p-e.x,2)+Math.pow(m-e.y,2));x>n||(x1){const u=r.type==="source"?"target":"source";return s.find(h=>h.type===u)??s[0]}return s[0]}function Iq(e,n,t,r,s,i=!1){var u,h,_;const a=r.get(e);if(!a)return null;const o=s==="strict"?(u=a.internals.handleBounds)==null?void 0:u[n]:[...((h=a.internals.handleBounds)==null?void 0:h.source)??[],...((_=a.internals.handleBounds)==null?void 0:_.target)??[]],l=(t?o==null?void 0:o.find(p=>p.id===t):o==null?void 0:o[0])??null;return l&&i?{...l,...J_(a,l,l.position,!0)}:l}function $q(e,n){return e||(n!=null&&n.classList.contains("target")?"target":n!=null&&n.classList.contains("source")?"source":null)}function wLn(e,n){let t=null;return n?t=!0:e&&!n&&(t=!1),t}const Bq=()=>!0;function kLn(e,{connectionMode:n,connectionRadius:t,handleId:r,nodeId:s,edgeUpdaterType:i,isTarget:a,domNode:o,nodeLookup:l,lib:u,autoPanOnConnect:h,flowId:_,panBy:p,cancelConnection:m,onConnectStart:x,onConnect:k,onConnectEnd:v,isValidConnection:b=Bq,onReconnectEnd:w,updateConnection:y,getTransform:C,getFromHandle:N,autoPanSpeed:E,dragThreshold:T=1,handleDomNode:j}){const M=Eq(e.target);let D=0,I;const{x:P,y:U}=ao(e),q=$q(i,j),W=o==null?void 0:o.getBoundingClientRect();let H=!1;if(!W||!q)return;const Y=Iq(s,q,r,l,n);if(!Y)return;let te=ao(e,W),$=!1,L=null,F=!1,G=null;function V(){if(!h||!W)return;const[_e,pe]=c7(te,W,E);p({x:_e,y:pe}),D=requestAnimationFrame(V)}const ee={...Y,nodeId:s,type:q,position:Y.position},ce=l.get(s);let se={inProgress:!0,isValid:null,from:J_(ce,ee,zt.Left,!0),fromHandle:ee,fromPosition:ee.position,fromNode:ce,to:te,toHandle:null,toPosition:FR[ee.position],toNode:null,pointer:te};function X(){H=!0,y(se),x==null||x(e,{nodeId:s,handleId:r,handleType:q})}T===0&&X();function oe(_e){if(!H){const{x:Oe,y:Xe}=ao(_e),_t=Oe-P,Vt=Xe-U;if(!(_t*_t+Vt*Vt>T*T))return;X()}if(!N()||!ee){le(_e);return}const pe=C();te=ao(_e,W),I=xLn(Tm(te,pe,!1,[1,1]),t,l,ee),$||(V(),$=!0);const Ee=Pq(_e,{handle:I,connectionMode:n,fromNodeId:s,fromHandleId:r,fromType:a?"target":"source",isValidConnection:b,doc:M,lib:u,flowId:_,nodeLookup:l});G=Ee.handleDomNode,L=Ee.connection,F=wLn(!!I,Ee.isValid);const Ie=l.get(s),ze=Ie?J_(Ie,ee,zt.Left,!0):se.from,He={...se,from:ze,isValid:F,to:Ee.toHandle&&F?hh({x:Ee.toHandle.x,y:Ee.toHandle.y},pe):te,toHandle:Ee.toHandle,toPosition:F&&Ee.toHandle?Ee.toHandle.position:FR[ee.position],toNode:Ee.toHandle?l.get(Ee.toHandle.nodeId):null,pointer:te};y(He),se=He}function le(_e){if(!("touches"in _e&&_e.touches.length>0)){if(H){(I||G)&&L&&F&&(k==null||k(L));const{inProgress:pe,...Ee}=se,Ie={...Ee,toPosition:se.toHandle?se.toPosition:null};v==null||v(_e,Ie),i&&(w==null||w(_e,Ie))}m(),cancelAnimationFrame(D),$=!1,F=!1,L=null,G=null,M.removeEventListener("mousemove",oe),M.removeEventListener("mouseup",le),M.removeEventListener("touchmove",oe),M.removeEventListener("touchend",le)}}M.addEventListener("mousemove",oe),M.addEventListener("mouseup",le),M.addEventListener("touchmove",oe),M.addEventListener("touchend",le)}function Pq(e,{handle:n,connectionMode:t,fromNodeId:r,fromHandleId:s,fromType:i,doc:a,lib:o,flowId:l,isValidConnection:u=Bq,nodeLookup:h}){const _=i==="target",p=n?a.querySelector(`.${o}-flow__handle[data-id="${l}-${n==null?void 0:n.nodeId}-${n==null?void 0:n.id}-${n==null?void 0:n.type}"]`):null,{x:m,y:x}=ao(e),k=a.elementFromPoint(m,x),v=k!=null&&k.classList.contains(`${o}-flow__handle`)?k:p,b={handleDomNode:v,isValid:!1,connection:null,toHandle:null};if(v){const w=$q(void 0,v),y=v.getAttribute("data-nodeid"),C=v.getAttribute("data-handleid"),N=v.classList.contains("connectable"),E=v.classList.contains("connectableend");if(!y||!w)return b;const T={source:_?y:r,sourceHandle:_?C:s,target:_?r:y,targetHandle:_?s:C};b.connection=T;const M=N&&E&&(t===fh.Strict?_&&w==="source"||!_&&w==="target":y!==r||C!==s);b.isValid=M&&u(T),b.toHandle=Iq(y,w,C,h,t,!0)}return b}const tk={onPointerDown:kLn,isValid:Pq};function SLn({domNode:e,panZoom:n,getTransform:t,getViewScale:r}){const s=Qi(e);function i({translateExtent:o,width:l,height:u,zoomStep:h=1,pannable:_=!0,zoomable:p=!0,inversePan:m=!1}){const x=y=>{if(y.sourceEvent.type!=="wheel"||!n)return;const C=t(),N=y.sourceEvent.ctrlKey&&U0()?10:1,E=-y.sourceEvent.deltaY*(y.sourceEvent.deltaMode===1?.05:y.sourceEvent.deltaMode?1:.002)*h,T=C[2]*Math.pow(2,E*N);n.scaleTo(T)};let k=[0,0];const v=y=>{(y.sourceEvent.type==="mousedown"||y.sourceEvent.type==="touchstart")&&(k=[y.sourceEvent.clientX??y.sourceEvent.touches[0].clientX,y.sourceEvent.clientY??y.sourceEvent.touches[0].clientY])},b=y=>{const C=t();if(y.sourceEvent.type!=="mousemove"&&y.sourceEvent.type!=="touchmove"||!n)return;const N=[y.sourceEvent.clientX??y.sourceEvent.touches[0].clientX,y.sourceEvent.clientY??y.sourceEvent.touches[0].clientY],E=[N[0]-k[0],N[1]-k[1]];k=N;const T=r()*Math.max(C[2],Math.log(C[2]))*(m?-1:1),j={x:C[0]-E[0]*T,y:C[1]-E[1]*T},M=[[0,0],[l,u]];n.setViewportConstrained({x:j.x,y:j.y,zoom:C[2]},M,o)},w=dq().on("start",v).on("zoom",_?b:null).on("zoom.wheel",p?x:null);s.call(w,{})}function a(){s.on("zoom",null)}return{update:i,destroy:a,pointer:Za}}const Ay=e=>({x:e.x,y:e.y,zoom:e.k}),m4=({x:e,y:n,zoom:t})=>zy.translate(e,n).scale(t),dd=(e,n)=>e.target.closest(`.${n}`),Fq=(e,n)=>n===2&&Array.isArray(e)&&e.includes(2),CLn=e=>((e*=2)<=1?e*e*e:(e-=2)*e*e+2)/2,g4=(e,n=0,t=CLn,r=()=>{})=>{const s=typeof n=="number"&&n>0;return s||r(),s?e.transition().duration(n).ease(t).on("end",r):e},Hq=e=>{const n=e.ctrlKey&&U0()?10:1;return-e.deltaY*(e.deltaMode===1?.05:e.deltaMode?1:.002)*n};function ELn({zoomPanValues:e,noWheelClassName:n,d3Selection:t,d3Zoom:r,panOnScrollMode:s,panOnScrollSpeed:i,zoomOnPinch:a,onPanZoomStart:o,onPanZoom:l,onPanZoomEnd:u}){return h=>{if(dd(h,n))return h.ctrlKey&&h.preventDefault(),!1;h.preventDefault(),h.stopImmediatePropagation();const _=t.property("__zoom").k||1;if(h.ctrlKey&&a){const v=Za(h),b=Hq(h),w=_*Math.pow(2,b);r.scaleTo(t,w,v,h);return}const p=h.deltaMode===1?20:1;let m=s===$_.Vertical?0:h.deltaX*p,x=s===$_.Horizontal?0:h.deltaY*p;!U0()&&h.shiftKey&&s!==$_.Vertical&&(m=h.deltaY*p,x=0),r.translateBy(t,-(m/_)*i,-(x/_)*i,{internal:!0});const k=Ay(t.property("__zoom"));clearTimeout(e.panScrollTimeout),e.isPanScrolling?(l==null||l(h,k),e.panScrollTimeout=setTimeout(()=>{u==null||u(h,k),e.isPanScrolling=!1},150)):(e.isPanScrolling=!0,o==null||o(h,k))}}function NLn({noWheelClassName:e,preventScrolling:n,d3ZoomHandler:t}){return function(r,s){const i=r.type==="wheel",a=!n&&i&&!r.ctrlKey,o=dd(r,e);if(r.ctrlKey&&i&&o&&r.preventDefault(),a||o)return null;r.preventDefault(),t.call(this,r,s)}}function zLn({zoomPanValues:e,onDraggingChange:n,onPanZoomStart:t}){return r=>{var i,a,o;if((i=r.sourceEvent)!=null&&i.internal)return;const s=Ay(r.transform);e.mouseButton=((a=r.sourceEvent)==null?void 0:a.button)||0,e.isZoomingOrPanning=!0,e.prevViewport=s,((o=r.sourceEvent)==null?void 0:o.type)==="mousedown"&&n(!0),t&&(t==null||t(r.sourceEvent,s))}}function jLn({zoomPanValues:e,panOnDrag:n,onPaneContextMenu:t,onTransformChange:r,onPanZoom:s}){return i=>{var a,o;e.usedRightMouseButton=!!(t&&Fq(n,e.mouseButton??0)),(a=i.sourceEvent)!=null&&a.sync||r([i.transform.x,i.transform.y,i.transform.k]),s&&!((o=i.sourceEvent)!=null&&o.internal)&&(s==null||s(i.sourceEvent,Ay(i.transform)))}}function TLn({zoomPanValues:e,panOnDrag:n,panOnScroll:t,onDraggingChange:r,onPanZoomEnd:s,onPaneContextMenu:i}){return a=>{var o;if(!((o=a.sourceEvent)!=null&&o.internal)&&(e.isZoomingOrPanning=!1,i&&Fq(n,e.mouseButton??0)&&!e.usedRightMouseButton&&a.sourceEvent&&i(a.sourceEvent),e.usedRightMouseButton=!1,r(!1),s)){const l=Ay(a.transform);e.prevViewport=l,clearTimeout(e.timerId),e.timerId=setTimeout(()=>{s==null||s(a.sourceEvent,l)},t?150:0)}}}function ALn({zoomActivationKeyPressed:e,zoomOnScroll:n,zoomOnPinch:t,panOnDrag:r,panOnScroll:s,zoomOnDoubleClick:i,userSelectionActive:a,noWheelClassName:o,noPanClassName:l,lib:u,connectionInProgress:h}){return _=>{var v;const p=e||n,m=t&&_.ctrlKey,x=_.type==="wheel";if(_.button===1&&_.type==="mousedown"&&(dd(_,`${u}-flow__node`)||dd(_,`${u}-flow__edge`)))return!0;if(!r&&!p&&!s&&!i&&!t||a||h&&!x||dd(_,o)&&x||dd(_,l)&&(!x||s&&x&&!e)||!t&&_.ctrlKey&&x)return!1;if(!t&&_.type==="touchstart"&&((v=_.touches)==null?void 0:v.length)>1)return _.preventDefault(),!1;if(!p&&!s&&!m&&x||!r&&(_.type==="mousedown"||_.type==="touchstart")||Array.isArray(r)&&!r.includes(_.button)&&_.type==="mousedown")return!1;const k=Array.isArray(r)&&r.includes(_.button)||!_.button||_.button<=1;return(!_.ctrlKey||x)&&k}}function RLn({domNode:e,minZoom:n,maxZoom:t,translateExtent:r,viewport:s,onPanZoom:i,onPanZoomStart:a,onPanZoomEnd:o,onDraggingChange:l}){const u={isZoomingOrPanning:!1,usedRightMouseButton:!1,prevViewport:{},mouseButton:0,timerId:void 0,panScrollTimeout:void 0,isPanScrolling:!1},h=e.getBoundingClientRect(),_=dq().scaleExtent([n,t]).translateExtent(r),p=Qi(e).call(_);w({x:s.x,y:s.y,zoom:dh(s.zoom,n,t)},[[0,0],[h.width,h.height]],r);const m=p.on("wheel.zoom"),x=p.on("dblclick.zoom");_.wheelDelta(Hq);async function k(I,P){return p?new Promise(U=>{_==null||_.interpolate((P==null?void 0:P.interpolate)==="linear"?a0:Y1).transform(g4(p,P==null?void 0:P.duration,P==null?void 0:P.ease,()=>U(!0)),I)}):!1}function v({noWheelClassName:I,noPanClassName:P,onPaneContextMenu:U,userSelectionActive:q,panOnScroll:W,panOnDrag:H,panOnScrollMode:Y,panOnScrollSpeed:te,preventScrolling:$,zoomOnPinch:L,zoomOnScroll:F,zoomOnDoubleClick:G,zoomActivationKeyPressed:V,lib:ee,onTransformChange:ce,connectionInProgress:ae,paneClickDistance:se,selectionOnDrag:X}){q&&!u.isZoomingOrPanning&&b();const oe=W&&!V&&!q;_.clickDistance(X?1/0:!io(se)||se<0?0:se);const le=oe?ELn({zoomPanValues:u,noWheelClassName:I,d3Selection:p,d3Zoom:_,panOnScrollMode:Y,panOnScrollSpeed:te,zoomOnPinch:L,onPanZoomStart:a,onPanZoom:i,onPanZoomEnd:o}):NLn({noWheelClassName:I,preventScrolling:$,d3ZoomHandler:m});p.on("wheel.zoom",le,{passive:!1});const _e=zLn({zoomPanValues:u,onDraggingChange:l,onPanZoomStart:a});_.on("start",_e);const pe=jLn({zoomPanValues:u,panOnDrag:H,onPaneContextMenu:!!U,onPanZoom:i,onTransformChange:ce});_.on("zoom",pe);const Ee=TLn({zoomPanValues:u,panOnDrag:H,panOnScroll:W,onPaneContextMenu:U,onPanZoomEnd:o,onDraggingChange:l});_.on("end",Ee);const Ie=ALn({zoomActivationKeyPressed:V,panOnDrag:H,zoomOnScroll:F,panOnScroll:W,zoomOnDoubleClick:G,zoomOnPinch:L,userSelectionActive:q,noPanClassName:P,noWheelClassName:I,lib:ee,connectionInProgress:ae});_.filter(Ie),G?p.on("dblclick.zoom",x):p.on("dblclick.zoom",null)}function b(){_.on("zoom",null)}async function w(I,P,U){const q=m4(I),W=_==null?void 0:_.constrain()(q,P,U);return W&&await k(W),W}async function y(I,P){const U=m4(I);return await k(U,P),U}function C(I){if(p){const P=m4(I),U=p.property("__zoom");(U.k!==I.zoom||U.x!==I.x||U.y!==I.y)&&(_==null||_.transform(p,P,null,{sync:!0}))}}function N(){const I=p?fq(p.node()):{x:0,y:0,k:1};return{x:I.x,y:I.y,zoom:I.k}}async function E(I,P){return p?new Promise(U=>{_==null||_.interpolate((P==null?void 0:P.interpolate)==="linear"?a0:Y1).scaleTo(g4(p,P==null?void 0:P.duration,P==null?void 0:P.ease,()=>U(!0)),I)}):!1}async function T(I,P){return p?new Promise(U=>{_==null||_.interpolate((P==null?void 0:P.interpolate)==="linear"?a0:Y1).scaleBy(g4(p,P==null?void 0:P.duration,P==null?void 0:P.ease,()=>U(!0)),I)}):!1}function j(I){_==null||_.scaleExtent(I)}function M(I){_==null||_.translateExtent(I)}function D(I){const P=!io(I)||I<0?0:I;_==null||_.clickDistance(P)}return{update:v,destroy:b,setViewport:y,setViewportConstrained:w,getViewport:N,scaleTo:E,scaleBy:T,setScaleExtent:j,setTranslateExtent:M,syncViewport:C,setClickDistance:D}}var ph;(function(e){e.Line="line",e.Handle="handle"})(ph||(ph={}));function MLn({width:e,prevWidth:n,height:t,prevHeight:r,affectsX:s,affectsY:i}){const a=e-n,o=t-r,l=[a>0?1:a<0?-1:0,o>0?1:o<0?-1:0];return a&&s&&(l[0]=l[0]*-1),o&&i&&(l[1]=l[1]*-1),l}function eM(e){const n=e.includes("right")||e.includes("left"),t=e.includes("bottom")||e.includes("top"),r=e.includes("left"),s=e.includes("top");return{isHorizontal:n,isVertical:t,affectsX:r,affectsY:s}}function Qc(e,n){return Math.max(0,n-e)}function Xc(e,n){return Math.max(0,e-n)}function E1(e,n,t){return Math.max(0,n-e,e-t)}function tM(e,n){return e?!n:n}function OLn(e,n,t,r,s,i,a,o){let{affectsX:l,affectsY:u}=n;const{isHorizontal:h,isVertical:_}=n,p=h&&_,{xSnapped:m,ySnapped:x}=t,{minWidth:k,maxWidth:v,minHeight:b,maxHeight:w}=r,{x:y,y:C,width:N,height:E,aspectRatio:T}=e;let j=Math.floor(h?m-e.pointerX:0),M=Math.floor(_?x-e.pointerY:0);const D=N+(l?-j:j),I=E+(u?-M:M),P=-i[0]*N,U=-i[1]*E;let q=E1(D,k,v),W=E1(I,b,w);if(a){let te=0,$=0;l&&j<0?te=Qc(y+j+P,a[0][0]):!l&&j>0&&(te=Xc(y+D+P,a[1][0])),u&&M<0?$=Qc(C+M+U,a[0][1]):!u&&M>0&&($=Xc(C+I+U,a[1][1])),q=Math.max(q,te),W=Math.max(W,$)}if(o){let te=0,$=0;l&&j>0?te=Xc(y+j,o[0][0]):!l&&j<0&&(te=Qc(y+D,o[1][0])),u&&M>0?$=Xc(C+M,o[0][1]):!u&&M<0&&($=Qc(C+I,o[1][1])),q=Math.max(q,te),W=Math.max(W,$)}if(s){if(h){const te=E1(D/T,b,w)*T;if(q=Math.max(q,te),a){let $=0;!l&&!u||l&&!u&&p?$=Xc(C+U+D/T,a[1][1])*T:$=Qc(C+U+(l?j:-j)/T,a[0][1])*T,q=Math.max(q,$)}if(o){let $=0;!l&&!u||l&&!u&&p?$=Qc(C+D/T,o[1][1])*T:$=Xc(C+(l?j:-j)/T,o[0][1])*T,q=Math.max(q,$)}}if(_){const te=E1(I*T,k,v)/T;if(W=Math.max(W,te),a){let $=0;!l&&!u||u&&!l&&p?$=Xc(y+I*T+P,a[1][0])/T:$=Qc(y+(u?M:-M)*T+P,a[0][0])/T,W=Math.max(W,$)}if(o){let $=0;!l&&!u||u&&!l&&p?$=Qc(y+I*T,o[1][0])/T:$=Xc(y+(u?M:-M)*T,o[0][0])/T,W=Math.max(W,$)}}}M=M+(M<0?W:-W),j=j+(j<0?q:-q),s&&(p?D>I*T?M=(tM(l,u)?-j:j)/T:j=(tM(l,u)?-M:M)*T:h?(M=j/T,u=l):(j=M*T,l=u));const H=l?y+j:y,Y=u?C+M:C;return{width:N+(l?-j:j),height:E+(u?-M:M),x:i[0]*j*(l?-1:1)+H,y:i[1]*M*(u?-1:1)+Y}}const qq={width:0,height:0,x:0,y:0},DLn={...qq,pointerX:0,pointerY:0,aspectRatio:1};function LLn(e,n,t){const r=n.position.x+e.position.x,s=n.position.y+e.position.y,i=e.measured.width??0,a=e.measured.height??0,o=t[0]*i,l=t[1]*a;return[[r-o,s-l],[r+i-o,s+a-l]]}function ILn({domNode:e,nodeId:n,getStoreItems:t,onChange:r,onEnd:s}){const i=Qi(e);let a={controlDirection:eM("bottom-right"),boundaries:{minWidth:0,minHeight:0,maxWidth:Number.MAX_VALUE,maxHeight:Number.MAX_VALUE},resizeDirection:void 0,keepAspectRatio:!1};function o({controlPosition:u,boundaries:h,keepAspectRatio:_,resizeDirection:p,onResizeStart:m,onResize:x,onResizeEnd:k,shouldResize:v}){let b={...qq},w={...DLn};a={boundaries:h,resizeDirection:p,keepAspectRatio:_,controlDirection:eM(u)};let y,C=null,N=[],E,T,j,M=!1;const D=ZH().on("start",I=>{const{nodeLookup:P,transform:U,snapGrid:q,snapToGrid:W,nodeOrigin:H,paneDomNode:Y}=t();if(y=P.get(n),!y)return;C=(Y==null?void 0:Y.getBoundingClientRect())??null;const{xSnapped:te,ySnapped:$}=o0(I.sourceEvent,{transform:U,snapGrid:q,snapToGrid:W,containerBounds:C});b={width:y.measured.width??0,height:y.measured.height??0,x:y.position.x??0,y:y.position.y??0},w={...b,pointerX:te,pointerY:$,aspectRatio:b.width/b.height},E=void 0,T=Z_(y.extent)?y.extent:void 0,y.parentId&&(y.extent==="parent"||y.expandParent)&&(E=P.get(y.parentId)),E&&y.extent==="parent"&&(T=[[0,0],[E.measured.width,E.measured.height]]),N=[],j=void 0;for(const[L,F]of P)if(F.parentId===n&&(N.push({id:L,position:{...F.position},extent:F.extent}),F.extent==="parent"||F.expandParent)){const G=LLn(F,y,F.origin??H);j?j=[[Math.min(G[0][0],j[0][0]),Math.min(G[0][1],j[0][1])],[Math.max(G[1][0],j[1][0]),Math.max(G[1][1],j[1][1])]]:j=G}m==null||m(I,{...b})}).on("drag",I=>{const{transform:P,snapGrid:U,snapToGrid:q,nodeOrigin:W}=t(),H=o0(I.sourceEvent,{transform:P,snapGrid:U,snapToGrid:q,containerBounds:C}),Y=[];if(!y)return;const{x:te,y:$,width:L,height:F}=b,G={},V=y.origin??W,{width:ee,height:ce,x:ae,y:se}=OLn(w,a.controlDirection,H,a.boundaries,a.keepAspectRatio,V,T,j),X=ee!==L,oe=ce!==F,le=ae!==te&&X,_e=se!==$&&oe;if(!le&&!_e&&!X&&!oe)return;if((le||_e||V[0]===1||V[1]===1)&&(G.x=le?ae:b.x,G.y=_e?se:b.y,b.x=G.x,b.y=G.y,N.length>0)){const ze=ae-te,He=se-$;for(const Oe of N)Oe.position={x:Oe.position.x-ze+V[0]*(ee-L),y:Oe.position.y-He+V[1]*(ce-F)},Y.push(Oe)}if((X||oe)&&(G.width=X&&(!a.resizeDirection||a.resizeDirection==="horizontal")?ee:b.width,G.height=oe&&(!a.resizeDirection||a.resizeDirection==="vertical")?ce:b.height,b.width=G.width,b.height=G.height),E&&y.expandParent){const ze=V[0]*(G.width??0);G.x&&G.x{M&&(k==null||k(I,{...b}),s==null||s({...b}),M=!1)});i.call(D)}function l(){i.on(".drag",null)}return{update:o,destroy:l}}const $Ln={},nM=e=>{let n;const t=new Set,r=(h,_)=>{const p=typeof h=="function"?h(n):h;if(!Object.is(p,n)){const m=n;n=_??(typeof p!="object"||p===null)?p:Object.assign({},n,p),t.forEach(x=>x(n,m))}},s=()=>n,l={setState:r,getState:s,getInitialState:()=>u,subscribe:h=>(t.add(h),()=>t.delete(h)),destroy:()=>{($Ln?"production":void 0)!=="production"&&console.warn("[DEPRECATED] The `destroy` method will be unsupported in a future version. Instead use unsubscribe function returned by subscribe. Everything will be garbage-collected if store is garbage-collected."),t.clear()}},u=n=e(r,s,l);return l},BLn=e=>e?nM(e):nM,{useDebugValue:PLn}=et,{useSyncExternalStoreWithSelector:FLn}=nW,HLn=e=>e;function Uq(e,n=HLn,t){const r=FLn(e.subscribe,e.getState,e.getServerState||e.getInitialState,n,t);return PLn(r),r}const rM=(e,n)=>{const t=BLn(e),r=(s,i=n)=>Uq(t,s,i);return Object.assign(r,t),r},qLn=(e,n)=>e?rM(e,n):rM;function Cr(e,n){if(Object.is(e,n))return!0;if(typeof e!="object"||e===null||typeof n!="object"||n===null)return!1;if(e instanceof Map&&n instanceof Map){if(e.size!==n.size)return!1;for(const[r,s]of e)if(!Object.is(s,n.get(r)))return!1;return!0}if(e instanceof Set&&n instanceof Set){if(e.size!==n.size)return!1;for(const r of e)if(!n.has(r))return!1;return!0}const t=Object.keys(e);if(t.length!==Object.keys(n).length)return!1;for(const r of t)if(!Object.prototype.hasOwnProperty.call(n,r)||!Object.is(e[r],n[r]))return!1;return!0}const Ry=A.createContext(null),ULn=Ry.Provider,Gq=uo.error001("react");function zn(e,n){const t=A.useContext(Ry);if(t===null)throw new Error(Gq);return Uq(t,e,n)}function Nr(){const e=A.useContext(Ry);if(e===null)throw new Error(Gq);return A.useMemo(()=>({getState:e.getState,setState:e.setState,subscribe:e.subscribe}),[e])}const sM={display:"none"},GLn={position:"absolute",width:1,height:1,margin:-1,border:0,padding:0,overflow:"hidden",clip:"rect(0px, 0px, 0px, 0px)",clipPath:"inset(100%)"},Vq="react-flow__node-desc",Kq="react-flow__edge-desc",VLn="react-flow__aria-live",KLn=e=>e.ariaLiveMessage,WLn=e=>e.ariaLabelConfig;function QLn({rfId:e}){const n=zn(KLn);return f.jsx("div",{id:`${VLn}-${e}`,"aria-live":"assertive","aria-atomic":"true",style:GLn,children:n})}function XLn({rfId:e,disableKeyboardA11y:n}){const t=zn(WLn);return f.jsxs(f.Fragment,{children:[f.jsx("div",{id:`${Vq}-${e}`,style:sM,children:n?t["node.a11yDescription.default"]:t["node.a11yDescription.keyboardDisabled"]}),f.jsx("div",{id:`${Kq}-${e}`,style:sM,children:t["edge.a11yDescription.default"]}),!n&&f.jsx(QLn,{rfId:e})]})}const My=A.forwardRef(({position:e="top-left",children:n,className:t,style:r,...s},i)=>{const a=`${e}`.split("-");return f.jsx("div",{className:cs(["react-flow__panel",t,...a]),style:r,ref:i,...s,children:n})});My.displayName="Panel";const iM="https://reactflow.dev?utm_source=attribution";function YLn({proOptions:e,position:n="bottom-right"}){return e!=null&&e.hideAttribution?null:f.jsx(My,{position:n,className:"react-flow__attribution","data-message":`Please only hide this attribution when you are subscribed to React Flow Pro: ${iM}`,children:f.jsx("a",{href:iM,target:"_blank",rel:"noopener noreferrer","aria-label":"React Flow attribution",children:"React Flow"})})}const ZLn=e=>{const n=[],t=[];for(const[,r]of e.nodeLookup)r.selected&&n.push(r.internals.userNode);for(const[,r]of e.edgeLookup)r.selected&&t.push(r);return{selectedNodes:n,selectedEdges:t}},N1=e=>e.id;function JLn(e,n){return Cr(e.selectedNodes.map(N1),n.selectedNodes.map(N1))&&Cr(e.selectedEdges.map(N1),n.selectedEdges.map(N1))}function eIn({onSelectionChange:e}){const n=Nr(),{selectedNodes:t,selectedEdges:r}=zn(ZLn,JLn);return A.useEffect(()=>{const s={nodes:t,edges:r};e==null||e(s),n.getState().onSelectionChangeHandlers.forEach(i=>i(s))},[t,r,e]),null}const tIn=e=>!!e.onSelectionChangeHandlers;function nIn({onSelectionChange:e}){const n=zn(tIn);return e||n?f.jsx(eIn,{onSelectionChange:e}):null}const Wq=[0,0],rIn={x:0,y:0,zoom:1},sIn=["nodes","edges","defaultNodes","defaultEdges","onConnect","onConnectStart","onConnectEnd","onClickConnectStart","onClickConnectEnd","nodesDraggable","autoPanOnNodeFocus","nodesConnectable","nodesFocusable","edgesFocusable","edgesReconnectable","elevateNodesOnSelect","elevateEdgesOnSelect","minZoom","maxZoom","nodeExtent","onNodesChange","onEdgesChange","elementsSelectable","connectionMode","snapGrid","snapToGrid","translateExtent","connectOnClick","defaultEdgeOptions","fitView","fitViewOptions","onNodesDelete","onEdgesDelete","onDelete","onNodeDrag","onNodeDragStart","onNodeDragStop","onSelectionDrag","onSelectionDragStart","onSelectionDragStop","onMoveStart","onMove","onMoveEnd","noPanClassName","nodeOrigin","autoPanOnConnect","autoPanOnNodeDrag","onError","connectionRadius","isValidConnection","selectNodesOnDrag","nodeDragThreshold","connectionDragThreshold","onBeforeDelete","debug","autoPanSpeed","ariaLabelConfig","zIndexMode"],aM=[...sIn,"rfId"],iIn=e=>({setNodes:e.setNodes,setEdges:e.setEdges,setMinZoom:e.setMinZoom,setMaxZoom:e.setMaxZoom,setTranslateExtent:e.setTranslateExtent,setNodeExtent:e.setNodeExtent,reset:e.reset,setDefaultNodesAndEdges:e.setDefaultNodesAndEdges}),oM={translateExtent:F0,nodeOrigin:Wq,minZoom:.5,maxZoom:2,elementsSelectable:!0,noPanClassName:"nopan",rfId:"1"};function aIn(e){const{setNodes:n,setEdges:t,setMinZoom:r,setMaxZoom:s,setTranslateExtent:i,setNodeExtent:a,reset:o,setDefaultNodesAndEdges:l}=zn(iIn,Cr),u=Nr();A.useEffect(()=>(l(e.defaultNodes,e.defaultEdges),()=>{h.current=oM,o()}),[]);const h=A.useRef(oM);return A.useEffect(()=>{for(const _ of aM){const p=e[_],m=h.current[_];p!==m&&(typeof e[_]>"u"||(_==="nodes"?n(p):_==="edges"?t(p):_==="minZoom"?r(p):_==="maxZoom"?s(p):_==="translateExtent"?i(p):_==="nodeExtent"?a(p):_==="ariaLabelConfig"?u.setState({ariaLabelConfig:XDn(p)}):_==="fitView"?u.setState({fitViewQueued:p}):_==="fitViewOptions"?u.setState({fitViewOptions:p}):u.setState({[_]:p})))}h.current=e},aM.map(_=>e[_])),null}function lM(){return typeof window>"u"||!window.matchMedia?null:window.matchMedia("(prefers-color-scheme: dark)")}function oIn(e){var r;const[n,t]=A.useState(e==="system"?null:e);return A.useEffect(()=>{if(e!=="system"){t(e);return}const s=lM(),i=()=>t(s!=null&&s.matches?"dark":"light");return i(),s==null||s.addEventListener("change",i),()=>{s==null||s.removeEventListener("change",i)}},[e]),n!==null?n:(r=lM())!=null&&r.matches?"dark":"light"}const cM=typeof document<"u"?document:null;function G0(e=null,n={target:cM,actInsideInputWithModifier:!0}){const[t,r]=A.useState(!1),s=A.useRef(!1),i=A.useRef(new Set([])),[a,o]=A.useMemo(()=>{if(e!==null){const u=(Array.isArray(e)?e:[e]).filter(_=>typeof _=="string").map(_=>_.replace("+",` +`),conflict:null}},Bl=e=>e.draft!==e.baseline,xRn=(e,n)=>({...e,draft:n,conflict:n===e.baseline?null:e.conflict}),wRn=e=>e.crlf?e.draft.replace(/\n/g,`\r +`):e.draft;function kRn(e,n,t){return!Bl(e)||t&&n===e.version?null:{currentVersion:n,exists:t}}class SRn{constructor(){Bs(this,"buffer",null);Bs(this,"listeners",new Set);Bs(this,"saving",!1);Bs(this,"saveError",null);Bs(this,"revision",0);Bs(this,"saveRevision",0);Bs(this,"getSnapshot",()=>this.buffer);Bs(this,"getRevision",()=>this.revision);Bs(this,"subscribe",n=>(this.listeners.add(n),()=>{this.listeners.delete(n)}));Bs(this,"set",n=>{this.buffer=n,this.notify()});Bs(this,"setSaving",n=>{this.saving=n,n&&this.saveRevision++,this.notify()});Bs(this,"saved",(n,t)=>{this.buffer&&this.set({...this.buffer,baseline:n,version:t,conflict:null})});Bs(this,"setSaveError",n=>{this.saveError=n,this.notify()})}notify(){this.revision++;for(const n of this.listeners)n()}get needsProtection(){return this.saving||this.buffer!==null&&(Bl(this.buffer)||this.buffer.conflict!==null)}}function CRn({projectId:e,filePath:n,sessionId:t,enabled:r,autoRun:s=!0,onManualAction:i,ready:a,source:o}){var Y,te,$;const l=ft({...awn(),enabled:r,subscribed:r}),u=((Y=l.data)==null?void 0:Y.engine)??(l.isPending?void 0:null),h=((te=l.data)==null?void 0:te.hint)??null,_=(($=l.data)==null?void 0:$.installCommand)??null,[p,m]=T.useState(!1),[x,k]=T.useState(null),[v,b]=T.useState(null),[w,y]=T.useState(!1),[C,E]=T.useState(null),[N,A]=T.useState(null),[j,M]=T.useState(!1),[L,I]=T.useState(0),B=T.useCallback(D=>{M(D),D&&I(F=>F+1)},[]),q=T.useRef(o);q.current=o;const U=T.useRef(!1),W=T.useRef(null),H=T.useCallback(()=>{if(U.current)return;W.current=n,U.current=!0,m(!0);const D=q.current;A(null),b(null),E(null),g0n(e,n,{sessionId:t}).then(F=>{var V,ee;const G=F.pdfPath;if(F.ok&&G){k(ce=>({path:G,version:((ce==null?void 0:ce.version)??0)+1,source:D})),y(F.hadErrors),E(F.note),F.hadErrors&&b(((V=F.log)==null?void 0:V.trim())||null),B(!0);return}k(null),y(!1),E(F.note),M(!1),b(((ee=F.log)==null?void 0:ee.trim())||kWe())}).catch(F=>{k(null),y(!1),E(null),M(!1),A(F instanceof Error?F.message:String(F))}).finally(()=>{U.current=!1,m(!1)})},[e,n,t,B]);return T.useEffect(()=>{!r||!s||!a||!u||W.current!==n&&H()},[r,s,a,u,n,H]),{engine:u,installHint:h,installCommand:_,compiling:p,compiled:x,stale:x!==null&&x.source!==o,log:v,builtWithErrors:w,note:C,error:N,showPdf:j,setShowPdf:B,viewNonce:L,compile:()=>{i==null||i(),H()},dismiss:()=>{A(null),b(null)}}}const ERn=3e4,NRn=3e4,zRn=5*6e4;function jRn({projectId:e,filePath:n,sessionId:t,enabled:r,autoRun:s=!0,onManualAction:i,savedSource:a,dirty:o,onPulled:l}){var ae,re,X,oe;const u=T.useMemo(()=>lwn(e,n,{sessionId:t}),[e,n,t]),h=ft({...u,enabled:r,subscribed:r}),_=((ae=h.data)==null?void 0:ae.hasToken)??!1,p=((re=h.data)==null?void 0:re.hasSession)??!1,m=((X=h.data)==null?void 0:X.link)??null,x=!h.isPending,[k,v]=T.useState(null),[b,w]=T.useState(0),[y,C]=T.useState(!1),[E,N]=T.useState(null),[A,j]=T.useState(null),[M,L]=T.useState(!1),I=T.useCallback(le=>{$n(u.queryKey)&&rt.setQueryData(u.queryKey,_e=>_e&&{..._e,hasSession:le})},[u]),B=T.useCallback(le=>{$n(u.queryKey)&&rt.setQueryData(u.queryKey,le)},[u]);T.useEffect(()=>{N(null),w(0),D.current=!1,j(null),L(!1),H.current=!1},[r,e,n,t]),T.useEffect(()=>{L(!1)},[a]);const q=T.useRef(!1),U=T.useRef(l);U.current=l;const W=T.useRef(o);W.current=o;const H=T.useRef(!1),Y=T.useCallback(le=>!_||!m||q.current||W.current?!1:(q.current=!0,C(!0),j(null),N0n(e,n,{sessionId:t,resolve:le}).then(_e=>{H.current=!1,N(_e),_e.pulled.includes(n)&&(W.current?L(!0):U.current(_e.pulled))}).catch(_e=>{H.current=!0,N(null),j(_e instanceof Error?_e.message:String(_e))}).finally(()=>{q.current=!1,C(!1)}),!0),[e,n,t,_,m]),te=T.useRef(null),$=(k==null?void 0:k.state)==="live";T.useEffect(()=>{if(!r||!s||!x||!_||!m||o||$)return;const le=`${n}:${m.projectId}:${a}`;te.current!==le&&Y()&&(te.current=le)},[r,s,x,_,m,n,a,o,y,Y,$]);const D=T.useRef(!1);!y&&E&&E.conflicts.length===0&&!A&&(D.current=!0);const F=r&&x&&!!m&&_&&p&&D.current,G=T.useRef(null),V=T.useRef(Promise.resolve()),ee=T.useRef(!1);ee.current=(k==null?void 0:k.state)==="stopped"&&k.error!=null;const ce=T.useRef(!1);return T.useEffect(()=>{if(!F)return;let le=!1;const _e=()=>{const Ee=ce.current;ce.current=!1,!(!Ee&&ee.current)&&(V.current=V.current.then(()=>{if(!le)return w0n(e,n,{sessionId:t,retry:Ee}).then(Ie=>{var ze;le||((G.current===null||((ze=Ie.status)==null?void 0:ze.state)==="stopped")&&v(Ie.status),G.current=Ie.key)}).catch(Ie=>{le||v({state:"stopped",error:Ie instanceof Error?Ie.message:String(Ie),needsSession:!1,note:null})})}))};_e();const pe=setInterval(_e,NRn);return()=>{le=!0,clearInterval(pe),G.current=null,v(null),V.current=V.current.then(()=>k0n(e,n,{sessionId:t})).catch(()=>{})}},[F,b,e,n,t]),T.useEffect(()=>Pgn(le=>{if(le.key===G.current){if(le.type==="live"){v(le.status);return}le.paths.includes(n)&&(W.current?L(!0):U.current(le.paths))}}),[n]),T.useEffect(()=>{if(!r||!s||!x||!_||!m||o||$)return;const le=setInterval(()=>{q.current||H.current||rt.fetchQuery({...cwn(e,n,{sessionId:t}),staleTime:0}).then(_e=>{_e.remoteChanged&&Y()}).catch(_e=>{H.current=!0,j(_e instanceof Error?_e.message:String(_e))})},ERn);return()=>clearInterval(le)},[r,s,x,_,m,o,e,n,t,Y,$]),T.useEffect(()=>{if(!r||!s||!x||!_||!m||!$)return;const le=setInterval(Y,zRn);return()=>clearInterval(le)},[r,s,x,_,m,$,Y]),{hasToken:_,hasSession:p,live:k,retryLive:()=>{ce.current=!0,w(le=>le+1)},link:m,loaded:x,syncing:y,last:E,error:A??((oe=h.error)==null?void 0:oe.message)??null,blocked:o,staleOnDisk:M,reloaded:()=>L(!1),uploadUrl:j0n(e,n,{sessionId:t}),saveToken:async le=>{const _e=await kL(le);te.current=null,H.current=!1,j(null),$n(u.queryKey)&&rt.setQueryData(u.queryKey,pe=>pe&&{...pe,hasToken:_e.hasToken})},saveSession:async le=>{const _e=await SL(le,{host:m==null?void 0:m.host});I(_e.hasSession),ce.current=!0,w(pe=>pe+1)},importSession:async()=>{const le=await x0n({host:m==null?void 0:m.host});return I(le.hasSession),ce.current=!0,w(_e=>_e+1),le.source},linkProject:async le=>{N(null),v(null),D.current=!1,te.current=null,B(await C0n(e,n,{project:le,sessionId:t})),i==null||i()},unlink:async()=>{B(await E0n(e,n,{sessionId:t})),te.current=null,H.current=!1,N(null),j(null)},sync:le=>{H.current=!1,Y(le)&&(te.current=`${n}:${m==null?void 0:m.projectId}:${a}`,i==null||i())}}}const yR=[{selector:"img[src]",attribute:"src",typePrefixes:["image/"]},{selector:"source[src]",attribute:"src",typePrefixes:["image/","audio/","video/"]},{selector:"video[poster]",attribute:"poster",typePrefixes:["image/"]},{selector:"video[src]",attribute:"src",typePrefixes:["video/"]},{selector:"audio[src]",attribute:"src",typePrefixes:["audio/"]},{selector:'link[rel~="stylesheet"][href]',attribute:"href",typePrefixes:["text/css"]},{selector:"script[src]",attribute:"src",typePrefixes:["text/javascript"]}],TRn=4e6,ARn=200,xR=16e6,RRn=e=>new Promise(n=>{const t=new FileReader;t.onload=()=>n(typeof t.result=="string"?t.result:null),t.onerror=()=>n(null),t.readAsDataURL(e)}),wR=e=>e.startsWith("//")?`https:${e}`:e;async function MRn(e,n){var s;let t=TRn;const r=new Map;for(const{element:i,attribute:a,url:o,typePrefixes:l}of e){if(r.has(o)){const x=r.get(o);x&&i.setAttribute(a,x);continue}if(n.aborted)return;if(r.size>=ARn)continue;r.set(o,null);const u=await fetch(o,{signal:n}).catch(()=>null);if(!(u!=null&&u.ok))continue;const h=u.headers.get("content-type")??"",_=Number(u.headers.get("content-length"));if(!l.some(x=>h.startsWith(x))||!(Number.isFinite(_)&&_>0&&_<=t)){await((s=u.body)==null?void 0:s.cancel().catch(()=>{}));continue}const p=await u.blob().catch(()=>null),m=p&&await RRn(p);!p||!m||(t-=p.size,r.set(o,m),i.setAttribute(a,m))}}async function ORn(e,n,t){var a;const r=new DOMParser().parseFromString(e,"text/html"),s=[];for(const o of r.querySelectorAll(yR.map(l=>l.selector).join(", ")))for(const{selector:l,attribute:u,typePrefixes:h}of yR){if(!o.matches(l))continue;const _=o.getAttribute(u);if(!_)continue;const p=n(_);p&&(p===_?o.setAttribute(u,wR(_)):s.push({element:o,attribute:u,url:p,typePrefixes:h}))}await MRn(s,t);for(const o of r.querySelectorAll("a[href]")){const l=o.getAttribute("href");!l||!l6(l)||(o.setAttribute("href",wR(l)),o.setAttribute("target","_blank"),o.setAttribute("rel","noopener noreferrer"))}const i=((a=r.querySelector("base[href]"))==null?void 0:a.getAttribute("href"))??"";if(!/^https?:\/\//i.test(i)){const o=r.createElement("base");o.setAttribute("href","about:srcdoc"),r.head.prepend(o)}return`${r.doctype?``:""}${r.documentElement.outerHTML}`}async function DRn(e,n,t,r){var o;if(!n)return{text:e,partial:!1};const s=await fetch(t,{signal:r,headers:{Range:`bytes=0-${xR-1}`}}).catch(()=>null),i=s!=null&&s.ok?await s.text().catch(()=>null):null;if(i===null)return{text:e,partial:!0};const a=Number((o=s==null?void 0:s.headers.get("content-range"))==null?void 0:o.split("/").pop());return{text:i,partial:Number.isFinite(a)&&a>xR}}function LRn({html:e,truncated:n,url:t,name:r,resolveSrc:s}){const[i,a]=T.useState(null);return T.useEffect(()=>{let o=!1;const l=new AbortController;return a(null),DRn(e,n,t,l.signal).then(async({text:u,partial:h})=>({source:await ORn(u,s,l.signal),partial:h})).then(u=>{o||a(u)}),()=>{o=!0,l.abort()}},[e,n,t,s]),i===null?f.jsxs("div",{className:"file-view-note flex items-center gap-2 py-2.5 px-4 text-sm text-muted",children:[f.jsx(Rt,{})," ",gD()]}):f.jsxs("div",{className:"flex h-full min-h-0 flex-col",children:[i.partial&&f.jsx("div",{className:"file-view-note shrink-0 border-b border-b-border-variant py-2 px-4 text-sm text-muted",children:h$e()}),f.jsx("iframe",{className:"block min-h-0 flex-1 w-full border-0 bg-white",title:x$e({name:Ne(r)}),sandbox:"allow-scripts allow-popups allow-downloads",referrerPolicy:"no-referrer",srcDoc:i.source})]})}function IRn({overleaf:e}){var _;const n=T.useRef(null),{open:t,setOpen:r,ref:s}=_o(n),i=T.useId(),[a,o]=T.useState({top:0,left:0,maxHeight:0}),l=((_=e.last)==null?void 0:_.conflicts.length)??0,u=e.hasToken&&!!e.error,h=u?t3():l?_dt():!e.hasToken||!e.link?Emt():e.syncing?ID():e.blocked?LD():MD();return T.useEffect(()=>{l&&r(!0)},[l,r]),T.useEffect(()=>{u&&Bn(t3(),"error",{id:i,duration:5e3})},[u,e.error,i]),T.useLayoutEffect(()=>{if(!t||!n.current||!s.current)return;const p=n.current.getBoundingClientRect(),m=Math.min(384,window.innerWidth-16),x=Math.min(p.bottom+6,window.innerHeight-80);o({top:x,left:Math.max(8,Math.min(p.right-m,window.innerWidth-m-8)),maxHeight:window.innerHeight-x-8}),(s.current.querySelector("input")??s.current).focus();const k=()=>r(!1),v=b=>{var w;b.target instanceof Node&&!((w=s.current)!=null&&w.contains(b.target))&&k()};return window.addEventListener("resize",k),window.addEventListener("scroll",v,!0),()=>{window.removeEventListener("resize",k),window.removeEventListener("scroll",v,!0)}},[t,s,r]),f.jsxs(f.Fragment,{children:[f.jsx(Ft,{ref:n,size:"small",active:t,disabled:!e.loaded,"data-tip":h,"data-tip-align":"end","aria-label":YY({status:h}),"aria-haspopup":"dialog","aria-expanded":t,"aria-controls":t?i:void 0,onClick:()=>r(!t),children:e.syncing?f.jsx(Rt,{}):f.jsx(mbn,{size:13,className:u||l?"text-accent-red":e.hasToken&&e.link?"text-accent-green":void 0})}),t&&Oa.createPortal(f.jsxs("div",{ref:s,id:i,role:"dialog","aria-label":nL(),tabIndex:-1,className:"fixed z-100 w-96 max-w-[calc(100vw-1rem)] overflow-auto rounded-lg border border-border bg-background p-4 text-text shadow-popover",style:a,onBlur:p=>{var m;p.relatedTarget instanceof Node&&!p.currentTarget.contains(p.relatedTarget)&&!((m=n.current)!=null&&m.contains(p.relatedTarget))&&r(!1)},children:[f.jsx("div",{className:"absolute end-3 top-3",children:f.jsx(Ft,{size:"small","aria-label":DIe(),onClick:()=>{var p;r(!1),(p=n.current)==null||p.focus()},children:f.jsx(_r,{size:13})})}),f.jsx(HRn,{overleaf:e})]}),document.body)]})}const b1=e=>qo(new Intl.ListFormat(z()).format(e.map(Ne)));function $Rn(e){if(e.error)return Ydt();if(e.syncing)return ID();if(e.blocked)return LD();const n=e.last;return n?n.pulled.length&&n.pushed.length?B0t({pulled:b1(n.pulled),pushed:b1(n.pushed)}):n.pulled.length?R0t({paths:b1(n.pulled)}):n.pushed.length?V0t({paths:b1(n.pushed)}):n.conflicts.length?Zht():MD():v0t()}function BRn({href:e}){return f.jsx("a",{className:"text-sm text-subtext whitespace-nowrap",href:e,target:"_blank",rel:"noreferrer",children:DD()})}function PRn(e){return e.state==="live"?vht():e.state==="connecting"?_ht():e.error??Rht()}function kR({overleaf:e,replacing:n}){const[t,r]=T.useState(""),[s,i]=T.useState(!1),[a,o]=T.useState(!1),[l,u]=T.useState(null),h=p=>{s||(i(!0),u(null),p().then(()=>o(!1)).catch(m=>{u(m instanceof Error?m.message:String(m)),o(!0)}).finally(()=>i(!1)))},_=a?Bmt():n?J0t():Adt();return f.jsxs("div",{className:"flex flex-col gap-1.5",children:[f.jsx("p",{className:"text-sm text-subtext",children:_}),a&&f.jsx(Qr,{className:"basis-full min-w-0","aria-label":e3(),type:"password",value:t,onChange:p=>r(p.target.value),placeholder:e3(),autoComplete:"off"}),f.jsxs("div",{className:"flex flex-wrap items-center gap-2",children:[s&&f.jsx(Rt,{}),a?f.jsx(Me,{type:"button",disabled:s||!t.trim(),onClick:()=>h(()=>e.saveSession(t.trim())),children:s?la():sdt()}):f.jsx(Me,{type:"button",disabled:s,onClick:()=>h(e.importSession),children:$dt()}),f.jsx(Me,{variant:"ghost",type:"button",disabled:s,onClick:()=>o(!a),children:a?OD():C0t()})]}),l&&f.jsx("div",{role:"alert",className:"text-sm text-accent-red whitespace-pre-wrap break-words",children:l})]})}function FRn({overleaf:e}){if(!e.hasSession)return f.jsx(kR,{overleaf:e});const n=e.live;if(!n)return f.jsx("p",{className:"text-sm text-subtext",children:Bht()});const t=n.state==="stopped"&&n.needsSession,r=n.state==="live"?"bg-accent-green":n.state==="connecting"?"bg-accent-amber":"bg-accent-red";return f.jsxs("div",{className:"flex flex-col gap-1.5",children:[f.jsxs("div",{role:n.error?"alert":"status",className:`flex items-center gap-2 text-sm ${n.error?"text-accent-red":"text-subtext"}`,children:[f.jsx("span",{className:`inline-block w-2 h-2 rounded-full shrink-0 ${r}`}),f.jsx("span",{className:"min-w-0 break-words",children:PRn(n)})]}),n.note&&f.jsx("p",{className:"text-sm text-accent-amber",children:n.note}),n.state==="stopped"&&!t&&f.jsx("div",{children:f.jsx(Me,{onClick:e.retryLive,children:Cht()})}),t&&f.jsx(kR,{overleaf:e,replacing:!0})]})}function HRn({overleaf:e}){var p,m,x;const[n,t]=T.useState(""),[r,s]=T.useState(!1),[i,a]=T.useState(null),[o,l]=T.useState(!1),u=()=>{t(""),a(null),l(!0)},h=!e.hasToken||o;async function _(k){k.preventDefault();const v=n.trim();if(!(r||!v)){s(!0),a(null);try{h?(await e.saveToken(v),l(!1)):await e.linkProject(v),t("")}catch(b){a(b instanceof Error?b.message:String(b))}finally{s(!1)}}}if(e.link&&!h){const k=((p=e.last)==null?void 0:p.conflicts)??[];return f.jsxs("div",{className:"flex flex-col gap-3",children:[f.jsxs("div",{className:"space-y-1.5 pe-8",role:e.error?"alert":"status",children:[f.jsxs("div",{className:`flex items-center gap-2 text-sm font-medium ${e.error?"text-accent-red":"text-text"}`,children:[e.syncing&&f.jsx(Rt,{}),e.error?t3():$Rn(e)]}),e.error&&f.jsx("p",{className:"text-sm text-text whitespace-pre-wrap break-words",children:e.error})]}),f.jsx(FRn,{overleaf:e}),f.jsxs("div",{className:"flex flex-wrap items-center gap-2",children:[f.jsx(Me,{variant:e.error?"primary":"default",disabled:e.syncing||e.blocked,"data-tip":e.blocked?amt():((m=e.live)==null?void 0:m.state)==="live"?Zmt():void 0,onClick:()=>e.sync(),children:e.error?Vs():Gpt()}),f.jsxs(Zd,{variant:"ghost",href:e.link.url,target:"_blank",rel:"noreferrer",children:[Rpt()," ",f.jsx(H_,{size:12})]})]}),k.map(v=>f.jsxs("div",{className:"space-y-2 text-sm",children:[f.jsxs("p",{className:"break-words text-accent-red",children:[f.jsx("code",{className:"font-mono",children:v})," ",vpt()]}),f.jsxs("div",{className:"flex flex-wrap gap-2",children:[f.jsx(Me,{disabled:e.syncing||e.blocked,onClick:()=>e.sync({[v]:"keep-local"}),children:Cpt()}),f.jsx(Me,{disabled:e.syncing||e.blocked,onClick:()=>e.sync({[v]:"take-overleaf"}),children:_0t()})]})]},v)),((x=e.last)==null?void 0:x.note)&&f.jsx("div",{className:"text-sm text-accent-amber",children:e.last.note}),i&&f.jsx("div",{role:"alert",className:"text-sm text-accent-red whitespace-pre-wrap break-words",children:i}),f.jsxs("details",{className:"border-t border-border pt-3",children:[f.jsx("summary",{className:"cursor-pointer text-sm font-semibold text-text focus-visible:outline-2 focus-visible:outline-text",children:f.jsx("span",{className:"ms-2",children:qk()})}),f.jsxs("div",{className:"mt-2 flex flex-col items-start gap-1",children:[f.jsx(Me,{variant:"ghost",className:"font-normal",type:"button",onClick:u,children:QN()}),f.jsx(Zd,{variant:"ghost",className:"font-normal",href:e.uploadUrl,target:"_blank",rel:"noreferrer",children:DD()}),f.jsx(Me,{variant:"ghost",className:"font-normal",disabled:e.syncing,onClick:()=>void e.unlink().catch(v=>{a(v instanceof Error?v.message:String(v))}),children:Zpt()})]})]})]})}return f.jsxs("form",{className:"flex flex-col gap-1.5",onSubmit:_,children:[f.jsx("div",{className:"pe-8 text-sm text-subtext",children:h?_gt():vgt()}),f.jsxs("div",{className:"flex items-center flex-wrap gap-2",children:[f.jsx(Qr,{className:"basis-full min-w-0","aria-label":h?KN():WN(),"aria-invalid":!!i,type:h?"password":"text",value:n,onChange:k=>t(k.target.value),placeholder:h?KN():"https://www.overleaf.com/project/…",autoComplete:"off"}),f.jsx(Me,{type:"submit",disabled:r||!n.trim(),children:r?h?la():sa():h?bmt():sht()}),f.jsx("a",{className:"text-sm text-subtext whitespace-nowrap",href:h?"https://www.overleaf.com/user/settings":"https://www.overleaf.com/project",target:"_blank",rel:"noreferrer",children:h?vdt():WN()})]}),(i||e.error)&&f.jsx("div",{role:"alert",className:"text-sm text-accent-red whitespace-pre-wrap break-words",children:i||e.error}),f.jsxs("div",{className:"flex items-center flex-wrap gap-3",children:[f.jsx(BRn,{href:e.uploadUrl}),o?f.jsx(Me,{variant:"ghost",type:"button",onClick:()=>l(!1),children:OD()}):e.hasToken&&f.jsx(Me,{variant:"ghost",type:"button",onClick:u,children:QN()})]})]})}function qRn({command:e}){const[n,t]=T.useState("idle"),r=T.useRef(null),s=async()=>{try{await navigator.clipboard.writeText(e),t("copied"),setTimeout(()=>t("idle"),1500)}catch{const i=r.current;if(i){const a=document.createRange();a.selectNodeContents(i);const o=window.getSelection();o==null||o.removeAllRanges(),o==null||o.addRange(a)}t("select"),setTimeout(()=>t("idle"),4e3)}};return f.jsxs("div",{className:"mt-2 flex items-center gap-2",children:[f.jsx("code",{ref:r,className:"font-mono text-xs text-text bg-panel border border-border-variant rounded-xs py-1 px-2",children:e}),f.jsx(Ft,{"data-tip":n==="copied"?m0():n==="select"?zPe():HLe(),"aria-label":QLe(),onClick:()=>void s(),children:n==="copied"?f.jsx(Ji,{size:13}):f.jsx(Sb,{size:13})})]})}function URn({projectId:e,path:n,source:t="repo",sessionId:r,gitRef:s,line:i,branchLabel:a,onOpenFile:o,scrollPosition:l,onScrollPositionChange:u,lineScrollRequest:h,onLineScrollRequestHandled:_,onEdit:p,artifactVersion:m,artifactEntries:x=[],bufferSession:k,remote:v=!1,restored:b=!1,onRestoreActivated:w,showSource:y=!1,onShowSourceChange:C}){var yt,Dt;const E=T$(e,n,t??"repo",r,s),N=ft({...E,enabled:!k.saving}),A=N.data??null,j=((yt=N.error)==null?void 0:yt.message)??null,M=Ue=>{Xr(E.queryKey,gt=>(typeof Ue=="function"?Ue(gt??null):Ue)??void 0)},[L,I]=T.useState(0),B=t==="artifacts",q=t==="abs",U=Y6(n),W=bH(n),H=UAn(n),Y=U||H,[te,$]=T.useState(!1),D=!b||te,F=()=>{$(!0),w==null||w()};T.useSyncExternalStore(k.subscribe,k.getRevision);const G=k.getSnapshot(),V=k.set,ee=k.saving,ce=k.setSaving,ae=k.saveRevision,re=k.saveError,X=k.setSaveError,oe=T.useRef(null),le=T.useRef(l),_e=(A==null?void 0:A.file)??null,pe=G&&Bl(G)?G.path:(A==null?void 0:A.source)==="checkout"?A.file.path:n,Ee=pe.split("/").slice(0,-1).join("/"),Ie=(A==null?void 0:A.source)==="artifact",ze=T.useCallback(Ue=>{var gt;return((gt=Q3(Ee,Ue,q))==null?void 0:gt.path)??null},[q,Ee]),He=T.useCallback(Ue=>q?wL(Ue):Ie?F_(e,Ue):c3(e,Ue,{sessionId:r,ref:s}),[Ie,s,q,e,r]),Oe=T.useCallback(Ue=>{if(l6(Ue))return Ue;const gt=Q3(Ee,Ue,q);return gt?A5n(He(gt.path),gt):null},[q,Ee,He]),Xe=EH(_e==null?void 0:_e.presentation),_t=(A==null?void 0:A.source)==="artifact"&&!B,Vt=B&&(A==null?void 0:A.source)==="checkout",$t=!s&&(A==null?void 0:A.source)==="checkout"&&_e!=null&&!_e.notFound,jt=r!=null&&(A==null?void 0:A.source)==="checkout"&&A.file.root==="clone",mt=$t&&_e!=null&&!_e.binary&&!_e.truncated&&!Xe&&!jt,we=mt&&_e.version===void 0,ct=G!==null&&Bl(G),ye=!we&&(mt&&typeof _e.version=="string"||ct),je=(G==null?void 0:G.draft)??H5((_e==null?void 0:_e.content)??""),qe=(G==null?void 0:G.baseline)??H5((_e==null?void 0:_e.content)??""),at=ye&&G!==null&&Bl(G),nt=async Ue=>{const gt=k.getSnapshot();if(!ye||!gt||!Bl(gt))return!0;if(k.saving)return!1;if(gt.conflict&&Ue===void 0)return X(gt.conflict.exists?mN():vN()),!1;const ur=gt.draft,un=wRn(gt);ce(!0),X(null);try{await rt.cancelQueries(E);const Lt=await d0n(e,pe,un,{sessionId:r,expectedVersion:Ue??gt.version});return k.getSnapshot()?(k.saved(ur,Lt.version),M(mr=>mr&&mr.source==="checkout"?{source:"checkout",file:{...mr.file,content:un,version:Lt.version}}:mr),!0):!1}catch(Lt){if(Lt instanceof l3){const Kn=k.getSnapshot();return!Kn||!Bl(Kn)||V({...Kn,conflict:{currentVersion:Lt.currentVersion,exists:Lt.exists}}),!1}return X(Lt instanceof Error?Lt.message:String(Lt)),!1}finally{ce(!1)}},Kt=W&&$t&&!jt,Qe=CRn({projectId:e,filePath:pe,sessionId:r,enabled:Kt,autoRun:D,onManualAction:F,ready:_e!=null&&!_e.notFound,source:ye?je:(_e==null?void 0:_e.content)??""}),kt=jRn({projectId:e,filePath:pe,sessionId:r,enabled:Kt,autoRun:D,onManualAction:F,savedSource:qe,dirty:at,onPulled:T.useCallback(Ue=>{Ue.includes(pe)&&I(gt=>gt+1)},[pe])}),Tt=W&&Qe.showPdf&&Qe.compiled!=null,Yt=we&&ct,tn=(ye||Yt)&&!(Y&&!y)&&!Tt,rr=Qe.compiled?`${c3(e,Qe.compiled.path,{sessionId:r})}&v=${Qe.compiled.version}`:null,rn=rr?`${rr}&view=${Qe.viewNonce}#toolbar=0&navpanes=0&statusbar=0`:null,ln=Qe.compiled?Qe.compiled.path.split("/").pop()??Qe.compiled.path:null,An=async()=>{at&&!await nt()||W&&Qe.engine&&Qe.compile()},Un=async()=>{at&&(D?await An():await nt())},[Yn,fr]=T.useState(!1),[Yr,zr]=T.useState(null),St=async()=>{fr(!0),zr(null);try{await p0n(e,pe,{sessionId:r})}catch(Ue){zr(Ue instanceof Error?Ue.message:String(Ue))}finally{fr(!1)}},cn=T.useCallback(()=>{k.saving||I(Ue=>Ue+1)},[k]),jn=()=>{V(null),X(null),cn()},fn=NH(He(pe),!s&&!ee);T.useEffect(()=>{if(!j||s)return;const Ue=window.setInterval(()=>{document.visibilityState!=="hidden"&&cn()},2e3);return()=>window.clearInterval(Ue)},[j,s,cn]);const Dn=`${He(pe)}&v=${encodeURIComponent(fn??m??"")}&reload=${L}`;T.useEffect(()=>{var ur,un;if(!A||k.saving)return;const Ue=A,gt=k.getSnapshot();if(gt&&Bl(gt)){const Lt=Ue.source==="checkout"?Ue.file:null,Kn=Lt!==null&&Lt.path===gt.path&&(!r||Lt.root==="worktree"),mr=kRn(gt,Kn&&typeof Lt.version=="string"?Lt.version:null,Kn&&!Lt.notFound);mr&&(mr.currentVersion!==((ur=gt.conflict)==null?void 0:ur.currentVersion)||mr.exists!==((un=gt.conflict)==null?void 0:un.exists))?V({...gt,conflict:mr}):!mr&>.conflict&&V({...gt,conflict:null})}(!gt||!Bl(gt))&&Ue.source==="checkout"&&!Ue.file.notFound&&!Ue.file.binary&&!Ue.file.truncated&&typeof Ue.file.version=="string"&&(V(bR(Ue.file.path,Ue.file.content,Ue.file.version)),X(null))},[A,k,r,ee,ae]);const mn=JSON.stringify(E.queryKey),Gn=T.useRef({sourceKey:mn,nonce:L,artifactVersion:m,diskVersion:fn});T.useEffect(()=>{const Ue=Gn.current;Gn.current={sourceKey:mn,nonce:L,artifactVersion:m,diskVersion:fn},Ue.sourceKey===mn&&(Ue.nonce!==L||Ue.diskVersion!==null&&Ue.diskVersion!==fn||Ue.artifactVersion!=null&&Ue.artifactVersion!==m)&&uwn(e,n,t??"repo",r,s)},[mn,L,m,fn,e,n,t,r,s]),T.useLayoutEffect(()=>{const Ue=oe.current,gt=le.current;!Ue||!_e||!gt||(Ue.scrollTop=gt.top,Ue.scrollLeft=gt.left)},[_e]);const Rn=Ue=>{if(Ue.source==="absolute")return tBe();if(B)return F$e({root:r?qg():Hg()});if(s)return W$e({branch:Ne(s)});if(r&&Ue.source==="checkout"&&Ue.file.root==="clone")return NFe();const gt=Ue.source==="checkout"?Ue.file.root:Ue.checkoutRoot;return lBe({root:gt==="worktree"?qg():Hg()})};return f.jsxs("div",{className:"file-view flex flex-col h-full min-h-0 min-w-0",children:[f.jsxs("div",{className:"file-view-header flex w-full min-w-0 min-h-9 items-center gap-1 px-4 py-1 bg-background text-text shrink-0",children:[f.jsx(ch,{name:pe}),f.jsx("span",{className:"file-view-path flex-1 min-w-0 truncate text-sm text-subtext","data-tip":Ne(pe),children:pe.split("/").pop()||pe}),a&&f.jsxs("span",{className:"file-view-branch inline-flex items-center gap-1 min-w-0 text-xs text-muted border border-border-variant rounded-sm py-px px-1.5 max-w-65 overflow-hidden text-ellipsis whitespace-nowrap shrink-0 [&_svg]:flex-none",title:gQ({branch:Ne(a)}),children:[f.jsx(hm,{size:11}),a]}),tn&&(ee||at||re)&&f.jsx("span",{className:`file-view-save-status inline-flex items-center gap-1 text-sm shrink-0 ${re?"text-accent-red":"text-muted"}`,title:re??(ee?la():dFe()),children:ee?f.jsxs(f.Fragment,{children:[f.jsx(Rt,{})," ",xPe()]}):re?hPe():vD()}),W&&Qe.compiled&&f.jsx(Ft,{size:"small",active:!Qe.showPdf,"data-tip":Qe.stale&&Qe.showPdf?HBe():Qe.showPdf?ud():kN(),"data-tip-align":"end","aria-label":Qe.showPdf?ud():kN(),onClick:()=>Qe.setShowPdf(!Qe.showPdf),children:Qe.showPdf?f.jsx(E3,{size:13}):f.jsx(Cb,{size:13,className:Qe.stale?"text-accent-amber":void 0})}),W&&rr&&ln&&f.jsx(dm,{size:"small","data-tip":Qe.stale?WIe({name:Ne(ln)}):NE({name:Ne(ln)}),"data-tip-align":"end","aria-label":NE({name:Ne(ln)}),href:rr,download:ln,children:f.jsx(bI,{size:13,className:Qe.stale?"text-accent-amber":void 0})}),Kt&&f.jsx(IRn,{overleaf:kt}),W&&$t&&f.jsx(Ft,{size:"small","data-tip":Qe.compiled?wN():gN(),"data-tip-align":"end","aria-label":Qe.compiled?wN():gN(),disabled:Qe.compiling||!Qe.engine,onClick:()=>void An(),children:Qe.compiling?f.jsx(Rt,{}):f.jsx(Ebn,{size:13})}),Y&&f.jsx(Ft,{size:"small",active:y,"data-tip":y?pv():ud(),"data-tip-align":"end","aria-label":y?pv():ud(),onClick:()=>C==null?void 0:C(!y),children:f.jsx(E3,{size:13})}),$t&&!v&&f.jsx(Ft,{size:"small","data-tip":Yr??xN(),"data-tip-align":"end","aria-label":xN(),disabled:Yn,onClick:()=>void St(),children:Yn?f.jsx(Rt,{}):f.jsx(H_,{size:13})})]}),!j&&Vt&&(A==null?void 0:A.source)==="checkout"&&f.jsx("div",{className:"file-view-note py-2.5 px-4 text-sm text-muted border-b border-b-border-variant shrink-0",children:pBe({root:A.file.root==="worktree"?qg():Hg()})}),we&&f.jsx("div",{className:"file-view-note shrink-0 border-b border-b-border-variant py-2.5 px-4 text-sm text-accent-amber",children:yFe()}),j&&_e!==null&&f.jsxs("div",{className:"file-view-note shrink-0 border-b border-b-border-variant py-2.5 px-4 text-sm text-accent-red",children:[yN()," ",Ne(j)]}),(G==null?void 0:G.conflict)&&f.jsxs("div",{className:"file-view-note shrink-0 border-b border-b-border-variant py-2.5 px-4 flex items-center flex-wrap gap-2 text-sm text-accent-amber",children:[f.jsx("span",{className:"flex-1 min-w-0",role:"status",children:G.conflict.exists?mN():vN()}),((Dt=G==null?void 0:G.conflict)==null?void 0:Dt.exists)&&G.conflict.currentVersion&&f.jsx(Me,{disabled:ee,onPointerDown:Ue=>Ue.preventDefault(),onClick:()=>{var Ue;return void nt(((Ue=G.conflict)==null?void 0:Ue.currentVersion)??void 0)},children:DBe()}),f.jsx(Me,{disabled:ee,onPointerDown:Ue=>Ue.preventDefault(),onClick:jn,children:oPe()})]}),(Qe.error||Qe.log)&&f.jsxs("div",{className:"file-view-note shrink-0 max-h-45 overflow-auto border-b border-b-border-variant py-2.5 px-4",children:[f.jsxs("div",{className:"flex items-start gap-2",children:[f.jsx("span",{className:`flex-1 min-w-0 text-sm ${Qe.builtWithErrors?"text-subtext":"text-accent-red"}`,children:Qe.error??(Qe.builtWithErrors?DLe():wLe())}),f.jsx(Ft,{"data-tip":xIe(),"data-tip-align":"end","aria-label":zIe(),onClick:Qe.dismiss,children:f.jsx(_r,{size:13})})]}),Qe.log&&f.jsx("pre",{className:"mt-1.5 mb-0 font-mono text-xs text-subtext whitespace-pre-wrap wrap-anywhere",children:Qe.log})]}),Kt&&kt.staleOnDisk&&f.jsxs("div",{className:"file-view-note shrink-0 border-b border-b-border-variant py-2.5 px-4 flex items-center flex-wrap gap-2 text-sm text-accent-amber",children:[f.jsx("span",{className:"flex-1 min-w-0",children:zBe()}),f.jsx(Me,{onClick:()=>{kt.reloaded(),I(Ue=>Ue+1)},children:lIe()})]}),W&&$t&&Qe.engine===null&&Qe.installHint&&f.jsxs("div",{className:"file-view-note shrink-0 border-b border-b-border-variant py-2.5 px-4 text-sm text-subtext",children:[Qe.installHint,Qe.installCommand&&f.jsx(qRn,{command:Qe.installCommand})]}),Qe.note&&f.jsx("div",{className:"file-view-note shrink-0 border-b border-b-border-variant py-2 px-4 text-sm text-accent-amber",children:Qe.note}),Tt&&Qe.stale&&f.jsx("div",{className:"file-view-note shrink-0 border-b border-b-border-variant py-2 px-4 text-sm text-subtext",children:KPe()}),f.jsxs("div",{ref:oe,className:"file-view-body flex-1 min-h-0 overflow-auto bg-background",onScroll:Ue=>{const gt={top:Math.max(0,Ue.currentTarget.scrollTop),left:Math.max(0,Ue.currentTarget.scrollLeft)};le.current=gt,u==null||u(gt)},children:[!tn&&!j&&!B&&(A==null?void 0:A.source)==="checkout"&&!A.file.notFound&&!s&&r&&A.file.root==="clone"&&f.jsx("div",{className:"file-view-note py-2.5 px-4 text-sm text-muted",children:eFe()}),!tn&&!j&&(A==null?void 0:A.source)==="artifact"&&!A.file.notFound&&_t&&f.jsx("div",{className:"file-view-note py-2.5 px-4 text-sm text-muted",children:nLe({root:A.checkoutRoot==="worktree"?qg():Hg()})}),j&&_e===null?f.jsxs("div",{className:"file-view-note py-2.5 px-4 text-sm text-muted",children:[yN()," ",Ne(j)]}):_e===null?f.jsx("div",{className:"file-view-note py-2.5 px-4 text-sm text-muted",children:gD()}):tn?f.jsx(y$,{value:je,onChange:Ue=>{const gt=k.getSnapshot()??(_e&&typeof _e.version=="string"?bR(_e.path,_e.content,_e.version):null);gt&&V(xRn(gt,Ue)),p==null||p(),re&&X(null)},onSave:()=>void Un(),onBlur:()=>{F5||Un()},readOnly:Yt,path:n,highlightLine:i,scrollRequest:h,onScrollRequestHandled:_,scrollPosition:le.current,onScrollPositionChange:Ue=>{le.current=Ue,u==null||u(Ue)}}):_e.notFound?f.jsx("div",{className:"file-view-note py-2.5 px-4 text-sm text-muted",children:A?Rn(A):O$e()}):Xe?f.jsx(P5,{kind:Xe,url:Dn,name:n.split("/").pop()??n}):_e.binary?f.jsxs("div",{className:"file-view-note py-2.5 px-4 text-sm text-muted",children:[cLe()," ",f.jsx("a",{href:Dn,download:n.split("/").pop()??n,children:mD()})]}):Tt&&rn&&ln?f.jsx(P5,{kind:"pdf",url:rn,name:ln,downloadBar:!1},rn):U&&!y?f.jsx("div",{className:"file-view-md max-w-readable pt-4.5 px-5 pb-8 [&_.md]:text-base [&_.md_h1]:text-2xl [&_.md_h1]:mt-4.5 [&_.md_h1]:mx-0 [&_.md_h1]:mb-2 [&_.md_h2]:text-xl [&_.md_h2]:mt-4 [&_.md_h2]:mx-0 [&_.md_h2]:mb-2 [&_.md_h3]:text-lg",children:Ie?f.jsx(RH,{projectId:e,folder:Ee,markdown:_e.content,entries:x}):f.jsx(Qo,{text:_e.content,resolveFilePath:ze,resolveImageSrc:Oe,onOpenFile:o&&((Ue,gt,ur,un,Lt)=>o(Ue,r,s,Lt))})}):H&&!y?f.jsx(LRn,{html:_e.content,truncated:_e.truncated,url:Dn,name:pe,resolveSrc:Oe}):f.jsxs(f.Fragment,{children:[f.jsx(CH,{text:_e.content,path:n,highlightLine:i,scrollRequest:h,onScrollRequestHandled:_}),_e.truncated&&f.jsx("div",{className:"file-view-note py-2.5 px-4 text-sm text-muted",children:o$e()})]})]})]})}const u4=["project-menu-label inline-flex items-center gap-2 min-w-0 overflow-hidden","text-ellipsis whitespace-nowrap"].join(" ");function GRn({projectName:e,onHome:n,onNewProject:t,onRepository:r,onCollapse:s}){const{open:i,setOpen:a,ref:o}=_o(),l=T.useRef(null);return T.useEffect(()=>{if(!i)return;const u=h=>{var _;h.key==="Escape"&&((_=l.current)==null||_.focus())};return document.addEventListener("keydown",u,!0),()=>document.removeEventListener("keydown",u,!0)},[i]),f.jsx("div",{className:"rail-brand px-3 py-1.5 border-b border-border shrink-0",children:f.jsxs("div",{className:"project-switcher relative min-w-0",ref:o,children:[f.jsxs("div",{className:"flex h-7 items-center justify-between gap-1 px-0.5",children:[f.jsx(Ft,{size:"small",className:"project-back text-text","aria-label":CN(),onClick:n,children:f.jsx(b0,{size:18})}),f.jsx("span",{className:"brand-project-label flex-1 text-xs font-medium tracking-wide uppercase text-subtext",children:tVe()}),s&&f.jsx(Ft,{size:"small","data-tip":EN(),"data-tip-align":"end","aria-label":EN(),onClick:s,children:f.jsx(CI,{size:18})})]}),f.jsxs("button",{ref:l,className:`brand group flex h-8 w-full min-w-0 items-center gap-2 rounded-md px-2 text-start text-text hover:bg-surface focus-visible:outline-2 focus-visible:outline-text ${i?"open bg-surface":""}`,onClick:()=>a(u=>!u),"aria-expanded":i,children:[f.jsx("span",{className:"brand-project min-w-0 flex-1 truncate text-xl font-semibold",children:e}),f.jsx(Jo,{className:`project-chevron shrink-0 text-muted transition-opacity group-hover:opacity-100 group-focus-visible:opacity-100 ${i?"rotate-180 opacity-100":"opacity-0"}`,size:14})]}),i&&f.jsxs("div",{className:"option-menu absolute bottom-[calc(100%_+_8px)] start-0 max-h-95 flex flex-col bg-background border border-border rounded-lg shadow-menu overflow-hidden min-w-47.5 p-1.5 [&.align-right]:start-auto [&.align-right]:end-0 [&.drop-down]:bottom-auto [&.drop-down]:top-[calc(100%_+_4px)] [&.session-menu]:start-auto [&.session-menu]:end-1.5 [&.session-menu]:top-[calc(100%_-_2px)] [&.session-menu]:min-w-35 drop-down project-menu w-52.5 z-70",children:[f.jsx(nr,{onClick:()=>{a(!1),r()},children:f.jsxs("span",{className:u4,children:[f.jsx(xI,{size:14}),DGe()]})}),f.jsx(nr,{onClick:()=>{a(!1),n()},children:f.jsxs("span",{className:u4,children:[f.jsx(Ubn,{size:14}),CN()]})}),f.jsx(nr,{onClick:()=>{var u;(u=l.current)==null||u.focus(),a(!1),t()},children:f.jsxs("span",{className:u4,children:[f.jsx(Rbn,{size:14}),HGe()]})})]})]})})}function VRn({runs:e,experiments:n,emptyHint:t,onOpen:r,onOpenLogs:s,onOpenCode:i,onCancel:a}){const[o,l]=T.useState(new Set),[u,h]=T.useState(null),_=new Map;for(const x of e){const k=_.get(x.experimentId);k?k.push(x):_.set(x.experimentId,[x])}for(const x of _.values())x.sort((k,v)=>v.createdAt-k.createdAt);const p=[...n].sort((x,k)=>{var w,y,C,E;const v=((y=(w=_.get(x.id))==null?void 0:w[0])==null?void 0:y.createdAt)??x.createdAt;return(((E=(C=_.get(k.id))==null?void 0:C[0])==null?void 0:E.createdAt)??k.createdAt)-v});if(p.length===0)return f.jsx(J6,{icon:Jd,title:t??KMe(),description:t?void 0:MMe()});async function m(x){h(null),l(k=>new Set(k).add(x));try{await a(x)}catch(k){l(v=>{const b=new Set(v);return b.delete(x),b}),h(k instanceof Error?k.message:String(k))}}return f.jsxs("div",{className:"experiments-table-wrap absolute inset-0 overflow-auto bg-background @container",children:[u&&f.jsxs("div",{className:"experiments-table-error py-2 px-3 text-accent-red text-sm border-b border-b-border",role:"alert",children:[lDe()," ",u]}),f.jsx("div",{className:"experiments-table w-full text-sm bg-background",role:"list","aria-label":QOe(),children:p.map(x=>{const k=_.get(x.id)??[],v=k[0]??null,b=k.find(E=>E.status==="running"||E.status==="starting"),w=b??v,y=!!(b&&(b.cancelRequested||o.has(b.id))),C=b?y?"cancelling":Zi(b):v?Zi(v):"idle";return f.jsxs("div",{className:"experiment-table-group grid grid-cols-[minmax(0,_1fr)_auto] [grid-template-areas:'name_meta'_'actions_actions'] gap-x-8 items-center py-4 px-5 gap-y-[7px] border-b border-b-divider-subtle bg-background cursor-pointer [&:hover]:bg-canvas [&:last-child]:border-b-0 [@container((max-width:_560px))]:grid-cols-[minmax(0,_1fr)_auto] [@container((max-width:_560px))]:gap-x-3.5 [@container((max-width:_560px))]:gap-y-[9px] [@container((max-width:_400px))]:grid-cols-[minmax(0,_1fr)] [@container((max-width:_400px))]:[grid-template-areas:'name'_'meta'_'actions']",role:"listitem",onClick:()=>r(x,"preview"),onDoubleClick:()=>r(x,"keepOpen"),onAuxClick:E=>{E.button===1&&(E.preventDefault(),r(x,"keepOpen"))},children:[f.jsxs("div",{className:"experiment-table-name [grid-area:name] self-start min-w-0",children:[f.jsx("button",{type:"button",className:"experiment-table-title block w-full overflow-hidden text-text font-semibold text-start text-ellipsis whitespace-nowrap",...qr(E=>r(x,E),{stopPropagation:!0}),children:x.title||x.slug}),f.jsxs("span",{className:"experiment-table-subtitle flex items-center min-w-0 gap-1.5 mt-1 overflow-hidden text-subtext text-sm [&_>_svg]:shrink-0 [&_code]:min-w-0 [&_code]:overflow-hidden [&_code]:text-ellipsis [&_code]:whitespace-nowrap",title:x.branchName,children:[f.jsx(hm,{size:14,"aria-hidden":"true"}),f.jsx("code",{children:x.branchName})]})]}),f.jsxs("div",{className:"experiment-table-meta [grid-area:meta] self-start flex items-center justify-end gap-4.5 whitespace-nowrap [@container((max-width:_560px))]:flex-col [@container((max-width:_560px))]:items-end [@container((max-width:_560px))]:gap-1.5 [@container((max-width:_400px))]:!flex-row [@container((max-width:_400px))]:!items-center [@container((max-width:_400px))]:flex-wrap [@container((max-width:_400px))]:justify-start [@container((max-width:_400px))]:gap-3",children:[f.jsx("div",{className:"experiment-table-status flex items-center min-w-0",children:f.jsx(ec,{status:C})}),f.jsx("div",{className:"experiment-run-summary flex items-center min-w-0 gap-2 text-subtext text-sm font-medium",children:f.jsx("span",{children:k.length===1?oOe():xOe({count:Jt(k.length)})})}),f.jsx("div",{className:"experiment-table-latest flex items-center gap-1.5 min-w-0 text-subtext text-sm font-medium whitespace-nowrap",children:f.jsx("span",{children:v?Vo(v.createdAt):eOe()})})]}),f.jsxs("div",{className:"experiment-table-actions [grid-area:actions] flex flex-wrap items-center justify-start gap-2 mt-3",role:"group","aria-label":rQ({name:x.title||x.slug}),onClick:E=>E.stopPropagation(),onDoubleClick:E=>E.stopPropagation(),onAuxClick:E=>E.stopPropagation(),children:[f.jsxs(Me,{size:"small",disabled:!w,title:w?hOe():PMe(),...qr(E=>{w&&s(x.id,w.id,E)},{stopPropagation:!0}),children:[f.jsx(co,{size:15}),Z4()]}),f.jsxs(Me,{size:"small",title:QO({branch:Ne(x.branchName)}),...qr(E=>i(x.id,E),{stopPropagation:!0}),children:[f.jsx(Eb,{size:15}),HOe()]}),b&&f.jsxs(Me,{size:"small",variant:"danger",className:"[@container((max-width:_560px))]:ms-auto",disabled:y,title:y?zOe():DOe(),onClick:()=>void m(b.id),children:[f.jsx(pI,{size:15}),y?XEe():dD()]})]})]},x.id)})})]})}function KRn({onClose:e,onCreateProject:n}){const[t,r]=T.useState(!1),[s,i]=T.useState(null),a=T.useRef(null),o=T.useCallback(l=>{t||(r(!0),i(null),l().catch(()=>i(bcn())).finally(()=>r(!1)))},[t]);return T.useEffect(()=>{const l=u=>{u.key==="Escape"&&(u.preventDefault(),u.stopPropagation(),o(()=>e("dismiss")))};return document.addEventListener("keydown",l,!0),()=>document.removeEventListener("keydown",l,!0)},[e,o]),T.useEffect(()=>{const l=a.current;if(!l)return;const u=document.activeElement instanceof HTMLElement?document.activeElement:null,h=()=>[...l.querySelectorAll('button:not([disabled]), input:not([disabled]), select:not([disabled]), textarea:not([disabled]), a[href], [tabindex]:not([tabindex="-1"])')];(h()[0]??l).focus();const _=p=>{if(p.key!=="Tab")return;const m=h();if(m.length===0){p.preventDefault(),l.focus();return}const x=m[0],k=m[m.length-1];p.shiftKey&&document.activeElement===x?(p.preventDefault(),k.focus()):!p.shiftKey&&document.activeElement===k&&(p.preventDefault(),x.focus())};return document.addEventListener("keydown",_,!0),()=>{document.removeEventListener("keydown",_,!0),u==null||u.focus()}},[]),Oa.createPortal(f.jsx("div",{className:"fixed inset-0 z-200 flex items-center justify-center bg-modal-backdrop p-5",children:f.jsxs("div",{ref:a,className:"relative w-110 max-w-full rounded-xl border border-border bg-background p-6 shadow-modal",role:"dialog","aria-modal":"true","aria-labelledby":"demo-welcome-title",tabIndex:-1,children:[f.jsx(Ft,{className:"absolute end-3.5 top-3.5","aria-label":o3(),onClick:()=>o(()=>e("dismiss")),disabled:t,children:f.jsx(_r,{size:16})}),f.jsxs("div",{className:"mb-5 flex items-center gap-3 pe-8",children:[f.jsx("span",{className:"block h-9 w-9 shrink-0 [&_svg]:block [&_svg]:h-full [&_svg]:w-full",children:f.jsx(hS,{})}),f.jsxs("div",{children:[f.jsx("div",{className:"mb-0.5 text-xs font-medium tracking-[0.08em] text-primary uppercase",children:Gln()}),f.jsx("h2",{id:"demo-welcome-title",className:"m-0 text-2xl leading-tight tracking-[-0.02em]",children:Mcn()})]})]}),f.jsxs("div",{className:"text-base leading-relaxed text-text [&_p]:m-0 [&_p_+_p]:mt-3",children:[f.jsxs("p",{dir:"auto",children:[Ecn()," ",f.jsx("a",{dir:"ltr",href:"https://github.com/karpathy/nanochat",target:"_blank",rel:"noreferrer",className:"font-medium text-primary underline decoration-border-strong underline-offset-3 hover:decoration-primary",children:icn()}),Cln()]}),f.jsx("p",{dir:"auto",children:Zln()})]}),s&&f.jsx("p",{className:"mt-3 mb-0 text-sm text-accent-red",children:s}),f.jsxs("div",{className:"mt-6 flex flex-wrap items-center justify-end gap-2.5",children:[f.jsx(Me,{onClick:()=>o(n),disabled:t,children:$ln()}),f.jsx(Me,{variant:"primary",onClick:()=>o(()=>e("explore_demo")),disabled:t,children:t?la():fcn()})]})]})}),document.body)}function cs(e){if(typeof e=="string"||typeof e=="number")return""+e;let n="";if(Array.isArray(e))for(let t=0,r;t{}};function Sy(){for(var e=0,n=arguments.length,t={},r;e=0&&(r=t.slice(s+1),t=t.slice(0,s)),t&&!n.hasOwnProperty(t))throw new Error("unknown type: "+t);return{type:t,name:r}})}X1.prototype=Sy.prototype={constructor:X1,on:function(e,n){var t=this._,r=QRn(e+"",t),s,i=-1,a=r.length;if(arguments.length<2){for(;++i0)for(var t=new Array(s),r=0,s,i;r=0&&(n=e.slice(0,t))!=="xmlns"&&(e=e.slice(t+1)),CR.hasOwnProperty(n)?{space:CR[n],local:e}:e}function YRn(e){return function(){var n=this.ownerDocument,t=this.namespaceURI;return t===q5&&n.documentElement.namespaceURI===q5?n.createElement(e):n.createElementNS(t,e)}}function ZRn(e){return function(){return this.ownerDocument.createElementNS(e.space,e.local)}}function PH(e){var n=Cy(e);return(n.local?ZRn:YRn)(n)}function JRn(){}function e7(e){return e==null?JRn:function(){return this.querySelector(e)}}function eMn(e){typeof e!="function"&&(e=e7(e));for(var n=this._groups,t=n.length,r=new Array(t),s=0;s=y&&(y=w+1);!(E=v[y])&&++y=0;)(a=r[s])&&(i&&a.compareDocumentPosition(i)^4&&i.parentNode.insertBefore(a,i),i=a);return this}function CMn(e){e||(e=EMn);function n(_,p){return _&&p?e(_.__data__,p.__data__):!_-!p}for(var t=this._groups,r=t.length,s=new Array(r),i=0;in?1:e>=n?0:NaN}function NMn(){var e=arguments[0];return arguments[0]=this,e.apply(null,arguments),this}function zMn(){return Array.from(this)}function jMn(){for(var e=this._groups,n=0,t=e.length;n1?this.each((n==null?PMn:typeof n=="function"?HMn:FMn)(e,n,t??"")):uh(this.node(),e)}function uh(e,n){return e.style.getPropertyValue(n)||GH(e).getComputedStyle(e,null).getPropertyValue(n)}function UMn(e){return function(){delete this[e]}}function GMn(e,n){return function(){this[e]=n}}function VMn(e,n){return function(){var t=n.apply(this,arguments);t==null?delete this[e]:this[e]=t}}function KMn(e,n){return arguments.length>1?this.each((n==null?UMn:typeof n=="function"?VMn:GMn)(e,n)):this.node()[e]}function VH(e){return e.trim().split(/^|\s+/)}function t7(e){return e.classList||new KH(e)}function KH(e){this._node=e,this._names=VH(e.getAttribute("class")||"")}KH.prototype={add:function(e){var n=this._names.indexOf(e);n<0&&(this._names.push(e),this._node.setAttribute("class",this._names.join(" ")))},remove:function(e){var n=this._names.indexOf(e);n>=0&&(this._names.splice(n,1),this._node.setAttribute("class",this._names.join(" ")))},contains:function(e){return this._names.indexOf(e)>=0}};function WH(e,n){for(var t=t7(e),r=-1,s=n.length;++r=0&&(t=n.slice(r+1),n=n.slice(0,r)),{type:n,name:t}})}function xOn(e){return function(){var n=this.__on;if(n){for(var t=0,r=-1,s=n.length,i;t()=>e;function U5(e,{sourceEvent:n,subject:t,target:r,identifier:s,active:i,x:a,y:o,dx:l,dy:u,dispatch:h}){Object.defineProperties(this,{type:{value:e,enumerable:!0,configurable:!0},sourceEvent:{value:n,enumerable:!0,configurable:!0},subject:{value:t,enumerable:!0,configurable:!0},target:{value:r,enumerable:!0,configurable:!0},identifier:{value:s,enumerable:!0,configurable:!0},active:{value:i,enumerable:!0,configurable:!0},x:{value:a,enumerable:!0,configurable:!0},y:{value:o,enumerable:!0,configurable:!0},dx:{value:l,enumerable:!0,configurable:!0},dy:{value:u,enumerable:!0,configurable:!0},_:{value:h}})}U5.prototype.on=function(){var e=this._.on.apply(this._,arguments);return e===this._?this:e};function AOn(e){return!e.ctrlKey&&!e.button}function ROn(){return this.parentNode}function MOn(e,n){return n??{x:e.x,y:e.y}}function OOn(){return navigator.maxTouchPoints||"ontouchstart"in this}function eq(){var e=AOn,n=ROn,t=MOn,r=OOn,s={},i=Sy("start","drag","end"),a=0,o,l,u,h,_=0;function p(C){C.on("mousedown.drag",m).filter(r).on("touchstart.drag",v).on("touchmove.drag",b,TOn).on("touchend.drag touchcancel.drag",w).style("touch-action","none").style("-webkit-tap-highlight-color","rgba(0,0,0,0)")}function m(C,E){if(!(h||!e.call(this,C,E))){var N=y(this,n.call(this,C,E),C,E,"mouse");N&&(Qi(C.view).on("mousemove.drag",x,I0).on("mouseup.drag",k,I0),ZH(C.view),_4(C),u=!1,o=C.clientX,l=C.clientY,N("start",C))}}function x(C){if(Ed(C),!u){var E=C.clientX-o,N=C.clientY-l;u=E*E+N*N>_}s.mouse("drag",C)}function k(C){Qi(C.view).on("mousemove.drag mouseup.drag",null),JH(C.view,u),Ed(C),s.mouse("end",C)}function v(C,E){if(e.call(this,C,E)){var N=C.changedTouches,A=n.call(this,C,E),j=N.length,M,L;for(M=0;M>8&15|n>>4&240,n>>4&15|n&240,(n&15)<<4|n&15,1):t===8?x1(n>>24&255,n>>16&255,n>>8&255,(n&255)/255):t===4?x1(n>>12&15|n>>8&240,n>>8&15|n>>4&240,n>>4&15|n&240,((n&15)<<4|n&15)/255):null):(n=LOn.exec(e))?new ji(n[1],n[2],n[3],1):(n=IOn.exec(e))?new ji(n[1]*255/100,n[2]*255/100,n[3]*255/100,1):(n=$On.exec(e))?x1(n[1],n[2],n[3],n[4]):(n=BOn.exec(e))?x1(n[1]*255/100,n[2]*255/100,n[3]*255/100,n[4]):(n=POn.exec(e))?RR(n[1],n[2]/100,n[3]/100,1):(n=FOn.exec(e))?RR(n[1],n[2]/100,n[3]/100,n[4]):ER.hasOwnProperty(e)?jR(ER[e]):e==="transparent"?new ji(NaN,NaN,NaN,0):null}function jR(e){return new ji(e>>16&255,e>>8&255,e&255,1)}function x1(e,n,t,r){return r<=0&&(e=n=t=NaN),new ji(e,n,t,r)}function UOn(e){return e instanceof Em||(e=Q_(e)),e?(e=e.rgb(),new ji(e.r,e.g,e.b,e.opacity)):new ji}function G5(e,n,t,r){return arguments.length===1?UOn(e):new ji(e,n,t,r??1)}function ji(e,n,t,r){this.r=+e,this.g=+n,this.b=+t,this.opacity=+r}n7(ji,G5,tq(Em,{brighter(e){return e=e==null?Jv:Math.pow(Jv,e),new ji(this.r*e,this.g*e,this.b*e,this.opacity)},darker(e){return e=e==null?$0:Math.pow($0,e),new ji(this.r*e,this.g*e,this.b*e,this.opacity)},rgb(){return this},clamp(){return new ji(I_(this.r),I_(this.g),I_(this.b),eb(this.opacity))},displayable(){return-.5<=this.r&&this.r<255.5&&-.5<=this.g&&this.g<255.5&&-.5<=this.b&&this.b<255.5&&0<=this.opacity&&this.opacity<=1},hex:TR,formatHex:TR,formatHex8:GOn,formatRgb:AR,toString:AR}));function TR(){return`#${g_(this.r)}${g_(this.g)}${g_(this.b)}`}function GOn(){return`#${g_(this.r)}${g_(this.g)}${g_(this.b)}${g_((isNaN(this.opacity)?1:this.opacity)*255)}`}function AR(){const e=eb(this.opacity);return`${e===1?"rgb(":"rgba("}${I_(this.r)}, ${I_(this.g)}, ${I_(this.b)}${e===1?")":`, ${e})`}`}function eb(e){return isNaN(e)?1:Math.max(0,Math.min(1,e))}function I_(e){return Math.max(0,Math.min(255,Math.round(e)||0))}function g_(e){return e=I_(e),(e<16?"0":"")+e.toString(16)}function RR(e,n,t,r){return r<=0?e=n=t=NaN:t<=0||t>=1?e=n=NaN:n<=0&&(e=NaN),new ro(e,n,t,r)}function nq(e){if(e instanceof ro)return new ro(e.h,e.s,e.l,e.opacity);if(e instanceof Em||(e=Q_(e)),!e)return new ro;if(e instanceof ro)return e;e=e.rgb();var n=e.r/255,t=e.g/255,r=e.b/255,s=Math.min(n,t,r),i=Math.max(n,t,r),a=NaN,o=i-s,l=(i+s)/2;return o?(n===i?a=(t-r)/o+(t0&&l<1?0:a,new ro(a,o,l,e.opacity)}function VOn(e,n,t,r){return arguments.length===1?nq(e):new ro(e,n,t,r??1)}function ro(e,n,t,r){this.h=+e,this.s=+n,this.l=+t,this.opacity=+r}n7(ro,VOn,tq(Em,{brighter(e){return e=e==null?Jv:Math.pow(Jv,e),new ro(this.h,this.s,this.l*e,this.opacity)},darker(e){return e=e==null?$0:Math.pow($0,e),new ro(this.h,this.s,this.l*e,this.opacity)},rgb(){var e=this.h%360+(this.h<0)*360,n=isNaN(e)||isNaN(this.s)?0:this.s,t=this.l,r=t+(t<.5?t:1-t)*n,s=2*t-r;return new ji(f4(e>=240?e-240:e+120,s,r),f4(e,s,r),f4(e<120?e+240:e-120,s,r),this.opacity)},clamp(){return new ro(MR(this.h),w1(this.s),w1(this.l),eb(this.opacity))},displayable(){return(0<=this.s&&this.s<=1||isNaN(this.s))&&0<=this.l&&this.l<=1&&0<=this.opacity&&this.opacity<=1},formatHsl(){const e=eb(this.opacity);return`${e===1?"hsl(":"hsla("}${MR(this.h)}, ${w1(this.s)*100}%, ${w1(this.l)*100}%${e===1?")":`, ${e})`}`}}));function MR(e){return e=(e||0)%360,e<0?e+360:e}function w1(e){return Math.max(0,Math.min(1,e||0))}function f4(e,n,t){return(e<60?n+(t-n)*e/60:e<180?t:e<240?n+(t-n)*(240-e)/60:n)*255}const r7=e=>()=>e;function KOn(e,n){return function(t){return e+t*n}}function WOn(e,n,t){return e=Math.pow(e,t),n=Math.pow(n,t)-e,t=1/t,function(r){return Math.pow(e+r*n,t)}}function QOn(e){return(e=+e)==1?rq:function(n,t){return t-n?WOn(n,t,e):r7(isNaN(n)?t:n)}}function rq(e,n){var t=n-e;return t?KOn(e,t):r7(isNaN(e)?n:e)}const tb=(function e(n){var t=QOn(n);function r(s,i){var a=t((s=G5(s)).r,(i=G5(i)).r),o=t(s.g,i.g),l=t(s.b,i.b),u=rq(s.opacity,i.opacity);return function(h){return s.r=a(h),s.g=o(h),s.b=l(h),s.opacity=u(h),s+""}}return r.gamma=e,r})(1);function XOn(e,n){n||(n=[]);var t=e?Math.min(n.length,e.length):0,r=n.slice(),s;return function(i){for(s=0;st&&(i=n.slice(t,i),o[a]?o[a]+=i:o[++a]=i),(r=r[0])===(s=s[0])?o[a]?o[a]+=s:o[++a]=s:(o[++a]=null,l.push({i:a,x:$o(r,s)})),t=d4.lastIndex;return t180?h+=360:h-u>180&&(u+=360),p.push({i:_.push(s(_)+"rotate(",null,r)-2,x:$o(u,h)})):h&&_.push(s(_)+"rotate("+h+r)}function o(u,h,_,p){u!==h?p.push({i:_.push(s(_)+"skewX(",null,r)-2,x:$o(u,h)}):h&&_.push(s(_)+"skewX("+h+r)}function l(u,h,_,p,m,x){if(u!==_||h!==p){var k=m.push(s(m)+"scale(",null,",",null,")");x.push({i:k-4,x:$o(u,_)},{i:k-2,x:$o(h,p)})}else(_!==1||p!==1)&&m.push(s(m)+"scale("+_+","+p+")")}return function(u,h){var _=[],p=[];return u=e(u),h=e(h),i(u.translateX,u.translateY,h.translateX,h.translateY,_,p),a(u.rotate,h.rotate,_,p),o(u.skewX,h.skewX,_,p),l(u.scaleX,u.scaleY,h.scaleX,h.scaleY,_,p),u=h=null,function(m){for(var x=-1,k=p.length,v;++x=0&&e._call.call(void 0,n),e=e._next;--_h}function LR(){X_=(rb=P0.now())+Ey,_h=Gp=0;try{_Dn()}finally{_h=0,dDn(),X_=0}}function fDn(){var e=P0.now(),n=e-rb;n>oq&&(Ey-=n,rb=e)}function dDn(){for(var e,n=nb,t,r=1/0;n;)n._call?(r>n._time&&(r=n._time),e=n,n=n._next):(t=n._next,n._next=null,n=e?e._next=t:nb=t);Vp=e,W5(r)}function W5(e){if(!_h){Gp&&(Gp=clearTimeout(Gp));var n=e-X_;n>24?(e<1/0&&(Gp=setTimeout(LR,e-P0.now()-Ey)),Lp&&(Lp=clearInterval(Lp))):(Lp||(rb=P0.now(),Lp=setInterval(fDn,oq)),_h=1,lq(LR))}}function IR(e,n,t){var r=new sb;return n=n==null?0:+n,r.restart(s=>{r.stop(),e(s+n)},n,t),r}var hDn=Sy("start","end","cancel","interrupt"),pDn=[],uq=0,$R=1,Q5=2,Z1=3,BR=4,X5=5,J1=6;function Ny(e,n,t,r,s,i){var a=e.__transition;if(!a)e.__transition={};else if(t in a)return;mDn(e,t,{name:n,index:r,group:s,on:hDn,tween:pDn,time:i.time,delay:i.delay,duration:i.duration,ease:i.ease,timer:null,state:uq})}function i7(e,n){var t=fo(e,n);if(t.state>uq)throw new Error("too late; already scheduled");return t}function il(e,n){var t=fo(e,n);if(t.state>Z1)throw new Error("too late; already running");return t}function fo(e,n){var t=e.__transition;if(!t||!(t=t[n]))throw new Error("transition not found");return t}function mDn(e,n,t){var r=e.__transition,s;r[n]=t,t.timer=cq(i,0,t.time);function i(u){t.state=$R,t.timer.restart(a,t.delay,t.time),t.delay<=u&&a(u-t.delay)}function a(u){var h,_,p,m;if(t.state!==$R)return l();for(h in r)if(m=r[h],m.name===t.name){if(m.state===Z1)return IR(a);m.state===BR?(m.state=J1,m.timer.stop(),m.on.call("interrupt",e,e.__data__,m.index,m.group),delete r[h]):+hQ5&&r.state=0&&(n=n.slice(0,t)),!n||n==="start"})}function VDn(e,n,t){var r,s,i=GDn(n)?i7:il;return function(){var a=i(this,e),o=a.on;o!==r&&(s=(r=o).copy()).on(n,t),a.on=s}}function KDn(e,n){var t=this._id;return arguments.length<2?fo(this.node(),t).on.on(e):this.each(VDn(t,e,n))}function WDn(e){return function(){var n=this.parentNode;for(var t in this.__transition)if(+t!==e)return;n&&n.removeChild(this)}}function QDn(){return this.on("end.remove",WDn(this._id))}function XDn(e){var n=this._name,t=this._id;typeof e!="function"&&(e=e7(e));for(var r=this._groups,s=r.length,i=new Array(s),a=0;a()=>e;function xLn(e,{sourceEvent:n,target:t,transform:r,dispatch:s}){Object.defineProperties(this,{type:{value:e,enumerable:!0,configurable:!0},sourceEvent:{value:n,enumerable:!0,configurable:!0},target:{value:t,enumerable:!0,configurable:!0},transform:{value:r,enumerable:!0,configurable:!0},_:{value:s}})}function Yl(e,n,t){this.k=e,this.x=n,this.y=t}Yl.prototype={constructor:Yl,scale:function(e){return e===1?this:new Yl(this.k*e,this.x,this.y)},translate:function(e,n){return e===0&n===0?this:new Yl(this.k,this.x+this.k*e,this.y+this.k*n)},apply:function(e){return[e[0]*this.k+this.x,e[1]*this.k+this.y]},applyX:function(e){return e*this.k+this.x},applyY:function(e){return e*this.k+this.y},invert:function(e){return[(e[0]-this.x)/this.k,(e[1]-this.y)/this.k]},invertX:function(e){return(e-this.x)/this.k},invertY:function(e){return(e-this.y)/this.k},rescaleX:function(e){return e.copy().domain(e.range().map(this.invertX,this).map(e.invert,e))},rescaleY:function(e){return e.copy().domain(e.range().map(this.invertY,this).map(e.invert,e))},toString:function(){return"translate("+this.x+","+this.y+") scale("+this.k+")"}};var zy=new Yl(1,0,0);hq.prototype=Yl.prototype;function hq(e){for(;!e.__zoom;)if(!(e=e.parentNode))return zy;return e.__zoom}function h4(e){e.stopImmediatePropagation()}function Ip(e){e.preventDefault(),e.stopImmediatePropagation()}function wLn(e){return(!e.ctrlKey||e.type==="wheel")&&!e.button}function kLn(){var e=this;return e instanceof SVGElement?(e=e.ownerSVGElement||e,e.hasAttribute("viewBox")?(e=e.viewBox.baseVal,[[e.x,e.y],[e.x+e.width,e.y+e.height]]):[[0,0],[e.width.baseVal.value,e.height.baseVal.value]]):[[0,0],[e.clientWidth,e.clientHeight]]}function PR(){return this.__zoom||zy}function SLn(e){return-e.deltaY*(e.deltaMode===1?.05:e.deltaMode?1:.002)*(e.ctrlKey?10:1)}function CLn(){return navigator.maxTouchPoints||"ontouchstart"in this}function ELn(e,n,t){var r=e.invertX(n[0][0])-t[0][0],s=e.invertX(n[1][0])-t[1][0],i=e.invertY(n[0][1])-t[0][1],a=e.invertY(n[1][1])-t[1][1];return e.translate(s>r?(r+s)/2:Math.min(0,r)||Math.max(0,s),a>i?(i+a)/2:Math.min(0,i)||Math.max(0,a))}function pq(){var e=wLn,n=kLn,t=ELn,r=SLn,s=CLn,i=[0,1/0],a=[[-1/0,-1/0],[1/0,1/0]],o=250,l=Y1,u=Sy("start","zoom","end"),h,_,p,m=500,x=150,k=0,v=10;function b(U){U.property("__zoom",PR).on("wheel.zoom",j,{passive:!1}).on("mousedown.zoom",M).on("dblclick.zoom",L).filter(s).on("touchstart.zoom",I).on("touchmove.zoom",B).on("touchend.zoom touchcancel.zoom",q).style("-webkit-tap-highlight-color","rgba(0,0,0,0)")}b.transform=function(U,W,H,Y){var te=U.selection?U.selection():U;te.property("__zoom",PR),U!==te?E(U,W,H,Y):te.interrupt().each(function(){N(this,arguments).event(Y).start().zoom(null,typeof W=="function"?W.apply(this,arguments):W).end()})},b.scaleBy=function(U,W,H,Y){b.scaleTo(U,function(){var te=this.__zoom.k,$=typeof W=="function"?W.apply(this,arguments):W;return te*$},H,Y)},b.scaleTo=function(U,W,H,Y){b.transform(U,function(){var te=n.apply(this,arguments),$=this.__zoom,D=H==null?C(te):typeof H=="function"?H.apply(this,arguments):H,F=$.invert(D),G=typeof W=="function"?W.apply(this,arguments):W;return t(y(w($,G),D,F),te,a)},H,Y)},b.translateBy=function(U,W,H,Y){b.transform(U,function(){return t(this.__zoom.translate(typeof W=="function"?W.apply(this,arguments):W,typeof H=="function"?H.apply(this,arguments):H),n.apply(this,arguments),a)},null,Y)},b.translateTo=function(U,W,H,Y,te){b.transform(U,function(){var $=n.apply(this,arguments),D=this.__zoom,F=Y==null?C($):typeof Y=="function"?Y.apply(this,arguments):Y;return t(zy.translate(F[0],F[1]).scale(D.k).translate(typeof W=="function"?-W.apply(this,arguments):-W,typeof H=="function"?-H.apply(this,arguments):-H),$,a)},Y,te)};function w(U,W){return W=Math.max(i[0],Math.min(i[1],W)),W===U.k?U:new Yl(W,U.x,U.y)}function y(U,W,H){var Y=W[0]-H[0]*U.k,te=W[1]-H[1]*U.k;return Y===U.x&&te===U.y?U:new Yl(U.k,Y,te)}function C(U){return[(+U[0][0]+ +U[1][0])/2,(+U[0][1]+ +U[1][1])/2]}function E(U,W,H,Y){U.on("start.zoom",function(){N(this,arguments).event(Y).start()}).on("interrupt.zoom end.zoom",function(){N(this,arguments).event(Y).end()}).tween("zoom",function(){var te=this,$=arguments,D=N(te,$).event(Y),F=n.apply(te,$),G=H==null?C(F):typeof H=="function"?H.apply(te,$):H,V=Math.max(F[1][0]-F[0][0],F[1][1]-F[0][1]),ee=te.__zoom,ce=typeof W=="function"?W.apply(te,$):W,ae=l(ee.invert(G).concat(V/ee.k),ce.invert(G).concat(V/ce.k));return function(re){if(re===1)re=ce;else{var X=ae(re),oe=V/X[2];re=new Yl(oe,G[0]-X[0]*oe,G[1]-X[1]*oe)}D.zoom(null,re)}})}function N(U,W,H){return!H&&U.__zooming||new A(U,W)}function A(U,W){this.that=U,this.args=W,this.active=0,this.sourceEvent=null,this.extent=n.apply(U,W),this.taps=0}A.prototype={event:function(U){return U&&(this.sourceEvent=U),this},start:function(){return++this.active===1&&(this.that.__zooming=this,this.emit("start")),this},zoom:function(U,W){return this.mouse&&U!=="mouse"&&(this.mouse[1]=W.invert(this.mouse[0])),this.touch0&&U!=="touch"&&(this.touch0[1]=W.invert(this.touch0[0])),this.touch1&&U!=="touch"&&(this.touch1[1]=W.invert(this.touch1[0])),this.that.__zoom=W,this.emit("zoom"),this},end:function(){return--this.active===0&&(delete this.that.__zooming,this.emit("end")),this},emit:function(U){var W=Qi(this.that).datum();u.call(U,this.that,new xLn(U,{sourceEvent:this.sourceEvent,target:b,transform:this.that.__zoom,dispatch:u}),W)}};function j(U,...W){if(!e.apply(this,arguments))return;var H=N(this,W).event(U),Y=this.__zoom,te=Math.max(i[0],Math.min(i[1],Y.k*Math.pow(2,r.apply(this,arguments)))),$=Za(U);if(H.wheel)(H.mouse[0][0]!==$[0]||H.mouse[0][1]!==$[1])&&(H.mouse[1]=Y.invert(H.mouse[0]=$)),clearTimeout(H.wheel);else{if(Y.k===te)return;H.mouse=[$,Y.invert($)],ev(this),H.start()}Ip(U),H.wheel=setTimeout(D,x),H.zoom("mouse",t(y(w(Y,te),H.mouse[0],H.mouse[1]),H.extent,a));function D(){H.wheel=null,H.end()}}function M(U,...W){if(p||!e.apply(this,arguments))return;var H=U.currentTarget,Y=N(this,W,!0).event(U),te=Qi(U.view).on("mousemove.zoom",G,!0).on("mouseup.zoom",V,!0),$=Za(U,H),D=U.clientX,F=U.clientY;ZH(U.view),h4(U),Y.mouse=[$,this.__zoom.invert($)],ev(this),Y.start();function G(ee){if(Ip(ee),!Y.moved){var ce=ee.clientX-D,ae=ee.clientY-F;Y.moved=ce*ce+ae*ae>k}Y.event(ee).zoom("mouse",t(y(Y.that.__zoom,Y.mouse[0]=Za(ee,H),Y.mouse[1]),Y.extent,a))}function V(ee){te.on("mousemove.zoom mouseup.zoom",null),JH(ee.view,Y.moved),Ip(ee),Y.event(ee).end()}}function L(U,...W){if(e.apply(this,arguments)){var H=this.__zoom,Y=Za(U.changedTouches?U.changedTouches[0]:U,this),te=H.invert(Y),$=H.k*(U.shiftKey?.5:2),D=t(y(w(H,$),Y,te),n.apply(this,W),a);Ip(U),o>0?Qi(this).transition().duration(o).call(E,D,Y,U):Qi(this).call(b.transform,D,Y,U)}}function I(U,...W){if(e.apply(this,arguments)){var H=U.touches,Y=H.length,te=N(this,W,U.changedTouches.length===Y).event(U),$,D,F,G;for(h4(U),D=0;D`Seems like you have not used ${e==="svelte"?"SvelteFlowProvider":"ReactFlowProvider"} as an ancestor. Help: https://${e}flow.dev/error#001`,error002:()=>"It looks like you've created a new nodeTypes or edgeTypes object. If this wasn't on purpose please define the nodeTypes/edgeTypes outside of the component or memoize them.",error003:e=>`Node type "${e}" not found. Using fallback type "default".`,error004:()=>"The parent container needs a width and a height to render the graph.",error005:()=>"Only child nodes can use a parent extent.",error006:()=>"Can't create edge. An edge needs a source and a target.",error007:e=>`The old edge with id=${e} does not exist.`,error009:e=>`Marker type "${e}" doesn't exist.`,error008:(e,{id:n,sourceHandle:t,targetHandle:r})=>`Couldn't create edge for ${e} handle id: "${e==="source"?t:r}", edge id: ${n}.`,error010:()=>"Handle: No node id found. Make sure to only use a Handle inside a custom Node.",error011:e=>`Edge type "${e}" not found. Using fallback type "default".`,error012:e=>`Node with id "${e}" does not exist, it may have been removed. This can happen when a node is deleted before the "onNodeClick" handler is called.`,error013:(e="react")=>`It seems that you haven't loaded the styles. Please import '@xyflow/${e}/dist/style.css' or base.css to make sure everything is working properly.`,error014:()=>"useNodeConnections: No node ID found. Call useNodeConnections inside a custom Node or provide a node ID.",error015:()=>"It seems that you are trying to drag a node that is not initialized. Please use onNodesChange as explained in the docs.",error016:e=>`Edge with id "${e}" does not exist, it may have been removed. This can happen when an edge is deleted before the "onEdgeClick" handler is called.`},F0=[[Number.NEGATIVE_INFINITY,Number.NEGATIVE_INFINITY],[Number.POSITIVE_INFINITY,Number.POSITIVE_INFINITY]],mq=["Enter"," ","Escape"],gq={"node.a11yDescription.default":"Press enter or space to select a node. Press delete to remove it and escape to cancel.","node.a11yDescription.keyboardDisabled":"Press enter or space to select a node. You can then use the arrow keys to move the node around. Press delete to remove it and escape to cancel.","node.a11yDescription.ariaLiveMessage":({direction:e,x:n,y:t})=>`Moved selected node ${e}. New position, x: ${n}, y: ${t}`,"edge.a11yDescription.default":"Press enter or space to select an edge. You can then press delete to remove it or escape to cancel.","controls.ariaLabel":"Control Panel","controls.zoomIn.ariaLabel":"Zoom In","controls.zoomOut.ariaLabel":"Zoom Out","controls.fitView.ariaLabel":"Fit View","controls.interactive.ariaLabel":"Toggle Interactivity","minimap.ariaLabel":"Mini Map","handle.ariaLabel":"Handle"};var fh;(function(e){e.Strict="strict",e.Loose="loose"})(fh||(fh={}));var $_;(function(e){e.Free="free",e.Vertical="vertical",e.Horizontal="horizontal"})($_||($_={}));var H0;(function(e){e.Partial="partial",e.Full="full"})(H0||(H0={}));const vq={inProgress:!1,isValid:null,from:null,fromHandle:null,fromPosition:null,fromNode:null,to:null,toHandle:null,toPosition:null,toNode:null,pointer:null};var tu;(function(e){e.Bezier="default",e.Straight="straight",e.Step="step",e.SmoothStep="smoothstep",e.SimpleBezier="simplebezier"})(tu||(tu={}));var ib;(function(e){e.Arrow="arrow",e.ArrowClosed="arrowclosed"})(ib||(ib={}));var zt;(function(e){e.Left="left",e.Top="top",e.Right="right",e.Bottom="bottom"})(zt||(zt={}));const FR={[zt.Left]:zt.Right,[zt.Right]:zt.Left,[zt.Top]:zt.Bottom,[zt.Bottom]:zt.Top};function bq(e){return e===null?null:e?"valid":"invalid"}const yq=e=>"id"in e&&"source"in e&&"target"in e,NLn=e=>"id"in e&&"position"in e&&!("source"in e)&&!("target"in e),o7=e=>"id"in e&&"internals"in e&&!("source"in e)&&!("target"in e),Nm=(e,n=[0,0])=>{const{width:t,height:r}=_c(e),s=e.origin??n,i=t*s[0],a=r*s[1];return{x:e.position.x-i,y:e.position.y-a}},zLn=(e,n={nodeOrigin:[0,0]})=>{if(e.length===0)return{x:0,y:0,width:0,height:0};const t=e.reduce((r,s)=>{const i=typeof s=="string";let a=!n.nodeLookup&&!i?s:void 0;n.nodeLookup&&(a=i?n.nodeLookup.get(s):o7(s)?s:n.nodeLookup.get(s.id));const o=a?ab(a,n.nodeOrigin):{x:0,y:0,x2:0,y2:0};return jy(r,o)},{x:1/0,y:1/0,x2:-1/0,y2:-1/0});return Ty(t)},zm=(e,n={})=>{let t={x:1/0,y:1/0,x2:-1/0,y2:-1/0},r=!1;return e.forEach(s=>{(n.filter===void 0||n.filter(s))&&(t=jy(t,ab(s)),r=!0)}),r?Ty(t):{x:0,y:0,width:0,height:0}},l7=(e,n,[t,r,s]=[0,0,1],i=!1,a=!1)=>{const o=(n.x-t)/s,l=(n.y-r)/s,u=n.width/s,h=n.height/s,_=[];for(const p of e.values()){const{measured:m,selectable:x=!0,hidden:k=!1}=p;if(a&&!x||k)continue;const v=m.width??p.width??p.initialWidth??0,b=m.height??p.height??p.initialHeight??0,{x:w,y}=p.internals.positionAbsolute,C=Sq(o,l,u,h,w,y,v,b),E=v*b,N=i&&C>0;(!p.internals.handleBounds||N||C>=E||p.dragging)&&_.push(p)}return _},jLn=(e,n)=>{const t=new Set;return e.forEach(r=>{t.add(r.id)}),n.filter(r=>t.has(r.source)||t.has(r.target))};function TLn(e,n){const t=new Map,r=n!=null&&n.nodes?new Set(n.nodes.map(s=>s.id)):null;return e.forEach(s=>{s.measured.width&&s.measured.height&&((n==null?void 0:n.includeHiddenNodes)||!s.hidden)&&(!r||r.has(s.id))&&t.set(s.id,s)}),t}async function ALn({nodes:e,width:n,height:t,panZoom:r,minZoom:s,maxZoom:i},a){if(e.size===0)return!0;const o=TLn(e,a),l=zm(o),u=u7(l,n,t,(a==null?void 0:a.minZoom)??s,(a==null?void 0:a.maxZoom)??i,(a==null?void 0:a.padding)??.1);return await r.setViewport(u,{duration:a==null?void 0:a.duration,ease:a==null?void 0:a.ease,interpolate:a==null?void 0:a.interpolate}),!0}function xq({nodeId:e,nextPosition:n,nodeLookup:t,nodeOrigin:r=[0,0],nodeExtent:s,onError:i}){const a=t.get(e),o=a.parentId?t.get(a.parentId):void 0,{x:l,y:u}=o?o.internals.positionAbsolute:{x:0,y:0},h=a.origin??r;let _=a.extent||s;if(a.extent==="parent"&&!a.expandParent)if(!o)i==null||i("005",uo.error005());else{const m=o.measured.width,x=o.measured.height;m&&x&&(_=[[l,u],[l+m,u+x]])}else o&&Z_(a.extent)&&(_=[[a.extent[0][0]+l,a.extent[0][1]+u],[a.extent[1][0]+l,a.extent[1][1]+u]]);const p=Z_(_)?Y_(n,_,a.measured):n;return(a.measured.width===void 0||a.measured.height===void 0)&&(i==null||i("015",uo.error015())),{position:{x:p.x-l+(a.measured.width??0)*h[0],y:p.y-u+(a.measured.height??0)*h[1]},positionAbsolute:p}}async function RLn({nodesToRemove:e=[],edgesToRemove:n=[],nodes:t,edges:r,onBeforeDelete:s}){const i=new Set(e.map(p=>p.id)),a=[];for(const p of t){if(p.deletable===!1)continue;const m=i.has(p.id),x=!m&&p.parentId&&a.find(k=>k.id===p.parentId);(m||x)&&a.push(p)}const o=new Set(n.map(p=>p.id)),l=r.filter(p=>p.deletable!==!1),h=jLn(a,l);for(const p of l)o.has(p.id)&&!h.find(x=>x.id===p.id)&&h.push(p);if(!s)return{edges:h,nodes:a};const _=await s({nodes:a,edges:h});return typeof _=="boolean"?_?{edges:h,nodes:a}:{edges:[],nodes:[]}:_}const dh=(e,n=0,t=1)=>Math.min(Math.max(e,n),t),Y_=(e={x:0,y:0},n,t)=>({x:dh(e.x,n[0][0],n[1][0]-((t==null?void 0:t.width)??0)),y:dh(e.y,n[0][1],n[1][1]-((t==null?void 0:t.height)??0))});function wq(e,n,t){const{width:r,height:s}=_c(t),{x:i,y:a}=t.internals.positionAbsolute;return Y_(e,[[i,a],[i+r,a+s]],n)}const HR=(e,n,t)=>et?-dh(Math.abs(e-t),1,n)/n:0,c7=(e,n,t=15,r=40)=>{const s=HR(e.x,r,n.width-r)*t,i=HR(e.y,r,n.height-r)*t;return[s,i]},jy=(e,n)=>({x:Math.min(e.x,n.x),y:Math.min(e.y,n.y),x2:Math.max(e.x2,n.x2),y2:Math.max(e.y2,n.y2)}),Y5=({x:e,y:n,width:t,height:r})=>({x:e,y:n,x2:e+t,y2:n+r}),Ty=({x:e,y:n,x2:t,y2:r})=>({x:e,y:n,width:t-e,height:r-n}),q0=(e,n=[0,0])=>{var s,i;const{x:t,y:r}=o7(e)?e.internals.positionAbsolute:Nm(e,n);return{x:t,y:r,width:((s=e.measured)==null?void 0:s.width)??e.width??e.initialWidth??0,height:((i=e.measured)==null?void 0:i.height)??e.height??e.initialHeight??0}},ab=(e,n=[0,0])=>{var s,i;const{x:t,y:r}=o7(e)?e.internals.positionAbsolute:Nm(e,n);return{x:t,y:r,x2:t+(((s=e.measured)==null?void 0:s.width)??e.width??e.initialWidth??0),y2:r+(((i=e.measured)==null?void 0:i.height)??e.height??e.initialHeight??0)}},kq=(e,n)=>Ty(jy(Y5(e),Y5(n))),Sq=(e,n,t,r,s,i,a,o)=>{const l=Math.max(0,Math.min(e+t,s+a)-Math.max(e,s)),u=Math.max(0,Math.min(n+r,i+o)-Math.max(n,i));return Math.ceil(l*u)},ob=(e,n)=>Sq(e.x,e.y,e.width,e.height,n.x,n.y,n.width,n.height),qR=e=>io(e.width)&&io(e.height)&&io(e.x)&&io(e.y),io=e=>!isNaN(e)&&isFinite(e),Cq=(e,n)=>(t,r)=>{},jm=(e,n=[1,1])=>({x:n[0]*Math.round(e.x/n[0]),y:n[1]*Math.round(e.y/n[1])}),Tm=({x:e,y:n},[t,r,s],i=!1,a=[1,1])=>{const o={x:(e-t)/s,y:(n-r)/s};return i?jm(o,a):o},hh=({x:e,y:n},[t,r,s])=>({x:e*s+t,y:n*s+r});function nd(e,n){if(typeof e=="number")return Math.floor((n-n/(1+e))*.5);if(typeof e=="string"&&e.endsWith("px")){const t=parseFloat(e);if(!Number.isNaN(t))return Math.floor(t)}if(typeof e=="string"&&e.endsWith("%")){const t=parseFloat(e);if(!Number.isNaN(t))return Math.floor(n*t*.01)}return console.error(`The padding value "${e}" is invalid. Please provide a number or a string with a valid unit (px or %).`),0}function MLn(e,n,t){if(typeof e=="string"||typeof e=="number"){const r=nd(e,t),s=nd(e,n);return{top:r,right:s,bottom:r,left:s,x:s*2,y:r*2}}if(typeof e=="object"){const r=nd(e.top??e.y??0,t),s=nd(e.bottom??e.y??0,t),i=nd(e.left??e.x??0,n),a=nd(e.right??e.x??0,n);return{top:r,right:a,bottom:s,left:i,x:i+a,y:r+s}}return{top:0,right:0,bottom:0,left:0,x:0,y:0}}function OLn(e,n,t,r,s,i){const{x:a,y:o}=hh(e,[n,t,r]),{x:l,y:u}=hh({x:e.x+e.width,y:e.y+e.height},[n,t,r]),h=s-l,_=i-u;return{left:Math.floor(a),top:Math.floor(o),right:Math.floor(h),bottom:Math.floor(_)}}const u7=(e,n,t,r,s,i)=>{const a=MLn(i,n,t),o=(n-a.x)/e.width,l=(t-a.y)/e.height,u=Math.min(o,l),h=dh(u,r,s),_=e.x+e.width/2,p=e.y+e.height/2,m=n/2-_*h,x=t/2-p*h,k=OLn(e,m,x,h,n,t),v={left:Math.min(k.left-a.left,0),top:Math.min(k.top-a.top,0),right:Math.min(k.right-a.right,0),bottom:Math.min(k.bottom-a.bottom,0)};return{x:m-v.left+v.right,y:x-v.top+v.bottom,zoom:h}},U0=()=>{var e;return typeof navigator<"u"&&((e=navigator==null?void 0:navigator.userAgent)==null?void 0:e.indexOf("Mac"))>=0};function Z_(e){return e!=null&&e!=="parent"}function _c(e){var n,t;return{width:((n=e.measured)==null?void 0:n.width)??e.width??e.initialWidth??0,height:((t=e.measured)==null?void 0:t.height)??e.height??e.initialHeight??0}}function Eq(e){var n,t;return(((n=e.measured)==null?void 0:n.width)??e.width??e.initialWidth)!==void 0&&(((t=e.measured)==null?void 0:t.height)??e.height??e.initialHeight)!==void 0}function Nq(e,n={width:0,height:0},t,r,s){const i={...e},a=r.get(t);if(a){const o=a.origin||s;i.x+=a.internals.positionAbsolute.x-(n.width??0)*o[0],i.y+=a.internals.positionAbsolute.y-(n.height??0)*o[1]}return i}function UR(e,n){if(e.size!==n.size)return!1;for(const t of e)if(!n.has(t))return!1;return!0}function DLn(){let e,n;return{promise:new Promise((r,s)=>{e=r,n=s}),resolve:e,reject:n}}function LLn(e){return{...gq,...e||{}}}function o0(e,{snapGrid:n=[0,0],snapToGrid:t=!1,transform:r,containerBounds:s}){const{x:i,y:a}=ao(e),o=Tm({x:i-((s==null?void 0:s.left)??0),y:a-((s==null?void 0:s.top)??0)},r),{x:l,y:u}=t?jm(o,n):o;return{xSnapped:l,ySnapped:u,...o}}const _7=e=>({width:e.offsetWidth,height:e.offsetHeight}),zq=e=>{var n;return((n=e==null?void 0:e.getRootNode)==null?void 0:n.call(e))||(window==null?void 0:window.document)},ILn=["INPUT","SELECT","TEXTAREA"];function jq(e){var r,s;const n=((s=(r=e.composedPath)==null?void 0:r.call(e))==null?void 0:s[0])||e.target;return(n==null?void 0:n.nodeType)!==1?!1:ILn.includes(n.nodeName)||n.hasAttribute("contenteditable")||!!n.closest(".nokey")}const Tq=e=>"clientX"in e,ao=(e,n)=>{var i,a;const t=Tq(e),r=t?e.clientX:(i=e.touches)==null?void 0:i[0].clientX,s=t?e.clientY:(a=e.touches)==null?void 0:a[0].clientY;return{x:r-((n==null?void 0:n.left)??0),y:s-((n==null?void 0:n.top)??0)}},GR=(e,n,t,r,s)=>{const i=n.querySelectorAll(`.${e}`);return!i||!i.length?null:Array.from(i).map(a=>{const o=a.getBoundingClientRect();return{id:a.getAttribute("data-handleid"),type:e,nodeId:s,position:a.getAttribute("data-handlepos"),x:(o.left-t.left)/r,y:(o.top-t.top)/r,..._7(a)}})};function Aq({sourceX:e,sourceY:n,targetX:t,targetY:r,sourceControlX:s,sourceControlY:i,targetControlX:a,targetControlY:o}){const l=e*.125+s*.375+a*.375+t*.125,u=n*.125+i*.375+o*.375+r*.125,h=Math.abs(l-e),_=Math.abs(u-n);return[l,u,h,_]}function C1(e,n){return e>=0?.5*e:n*25*Math.sqrt(-e)}function VR({pos:e,x1:n,y1:t,x2:r,y2:s,c:i}){switch(e){case zt.Left:return[n-C1(n-r,i),t];case zt.Right:return[n+C1(r-n,i),t];case zt.Top:return[n,t-C1(t-s,i)];case zt.Bottom:return[n,t+C1(s-t,i)]}}function Rq({sourceX:e,sourceY:n,sourcePosition:t=zt.Bottom,targetX:r,targetY:s,targetPosition:i=zt.Top,curvature:a=.25}){const[o,l]=VR({pos:t,x1:e,y1:n,x2:r,y2:s,c:a}),[u,h]=VR({pos:i,x1:r,y1:s,x2:e,y2:n,c:a}),[_,p,m,x]=Aq({sourceX:e,sourceY:n,targetX:r,targetY:s,sourceControlX:o,sourceControlY:l,targetControlX:u,targetControlY:h});return[`M${e},${n} C${o},${l} ${u},${h} ${r},${s}`,_,p,m,x]}function Mq({sourceX:e,sourceY:n,targetX:t,targetY:r}){const s=Math.abs(t-e)/2,i=t0}const PLn=({source:e,sourceHandle:n,target:t,targetHandle:r})=>`xy-edge__${e}${n||""}-${t}${r||""}`,FLn=(e,n)=>n.some(t=>t.source===e.source&&t.target===e.target&&(t.sourceHandle===e.sourceHandle||!t.sourceHandle&&!e.sourceHandle)&&(t.targetHandle===e.targetHandle||!t.targetHandle&&!e.targetHandle)),HLn=(e,n,t={})=>{var i;if(!e.source||!e.target)return(i=t.onError)==null||i.call(t,"006",uo.error006()),n;const r=t.getEdgeId||PLn;let s;return yq(e)?s={...e}:s={...e,id:r(e)},FLn(s,n)?n:(s.sourceHandle===null&&delete s.sourceHandle,s.targetHandle===null&&delete s.targetHandle,n.concat(s))};function Oq({sourceX:e,sourceY:n,targetX:t,targetY:r}){const[s,i,a,o]=Mq({sourceX:e,sourceY:n,targetX:t,targetY:r});return[`M ${e},${n}L ${t},${r}`,s,i,a,o]}const KR={[zt.Left]:{x:-1,y:0},[zt.Right]:{x:1,y:0},[zt.Top]:{x:0,y:-1},[zt.Bottom]:{x:0,y:1}},qLn=({source:e,sourcePosition:n=zt.Bottom,target:t})=>n===zt.Left||n===zt.Right?e.xMath.sqrt(Math.pow(n.x-e.x,2)+Math.pow(n.y-e.y,2));function ULn({source:e,sourcePosition:n=zt.Bottom,target:t,targetPosition:r=zt.Top,center:s,offset:i,stepPosition:a}){const o=KR[n],l=KR[r],u={x:e.x+o.x*i,y:e.y+o.y*i},h={x:t.x+l.x*i,y:t.y+l.y*i},_=qLn({source:u,sourcePosition:n,target:h}),p=_.x!==0?"x":"y",m=_[p];let x=[],k,v;const b={x:0,y:0},w={x:0,y:0},[,,y,C]=Mq({sourceX:e.x,sourceY:e.y,targetX:t.x,targetY:t.y});if(o[p]*l[p]===-1){p==="x"?(k=s.x??u.x+(h.x-u.x)*a,v=s.y??(u.y+h.y)/2):(k=s.x??(u.x+h.x)/2,v=s.y??u.y+(h.y-u.y)*a);const j=[{x:k,y:u.y},{x:k,y:h.y}],M=[{x:u.x,y:v},{x:h.x,y:v}];o[p]===m?x=p==="x"?j:M:x=p==="x"?M:j}else{const j=[{x:u.x,y:h.y}],M=[{x:h.x,y:u.y}];if(p==="x"?x=o.x===m?M:j:x=o.y===m?j:M,n===r){const U=Math.abs(e[p]-t[p]);if(U<=i){const W=Math.min(i-1,i-U);o[p]===m?b[p]=(u[p]>e[p]?-1:1)*W:w[p]=(h[p]>t[p]?-1:1)*W}}if(n!==r){const U=p==="x"?"y":"x",W=o[p]===l[U],H=u[U]>h[U],Y=u[U]=q?(k=(L.x+I.x)/2,v=x[0].y):(k=x[0].x,v=(L.y+I.y)/2)}const E={x:u.x+b.x,y:u.y+b.y},N={x:h.x+w.x,y:h.y+w.y};return[[e,...E.x!==x[0].x||E.y!==x[0].y?[E]:[],...x,...N.x!==x[x.length-1].x||N.y!==x[x.length-1].y?[N]:[],t],k,v,y,C]}function GLn(e,n,t,r){const s=Math.min(WR(e,n)/2,WR(n,t)/2,r),{x:i,y:a}=n;if(e.x===i&&i===t.x||e.y===a&&a===t.y)return`L${i} ${a}`;if(e.y===a){const u=e.xt.id===n):e[0])||null}function J5(e,n){return e?typeof e=="string"?e:`${n?`${n}__`:""}${Object.keys(e).sort().map(r=>`${r}=${e[r]}`).join("&")}`:""}function KLn(e,{id:n,defaultColor:t,defaultMarkerStart:r,defaultMarkerEnd:s}){const i=new Set;return e.reduce((a,o)=>([o.markerStart||r,o.markerEnd||s].forEach(l=>{if(l&&typeof l=="object"){const u=J5(l,n);i.has(u)||(a.push({id:u,color:l.color||t,...l}),i.add(u))}}),a),[]).sort((a,o)=>a.id.localeCompare(o.id))}const Dq=1e3,WLn=10,f7={nodeOrigin:[0,0],nodeExtent:F0,elevateNodesOnSelect:!0,zIndexMode:"basic",defaults:{}},QLn={...f7,checkEquality:!0};function d7(e,n){const t={...e};for(const r in n)n[r]!==void 0&&(t[r]=n[r]);return t}function XLn(e,n,t){const r=d7(f7,t);for(const s of e.values())if(s.parentId)p7(s,e,n,r);else{const i=Nm(s,r.nodeOrigin),a=Z_(s.extent)?s.extent:r.nodeExtent,o=Y_(i,a,_c(s));s.internals.positionAbsolute=o}}function YLn(e,n){if(!e.handles)return e.measured?n==null?void 0:n.internals.handleBounds:void 0;const t=[],r=[];for(const s of e.handles){const i={id:s.id,width:s.width??1,height:s.height??1,nodeId:e.id,x:s.x,y:s.y,position:s.position,type:s.type};s.type==="source"?t.push(i):s.type==="target"&&r.push(i)}return{source:t,target:r}}function h7(e){return e==="manual"}function ek(e,n,t,r={}){var h,_;const s=d7(QLn,r),i={i:0},a=new Map(n),o=s!=null&&s.elevateNodesOnSelect&&!h7(s.zIndexMode)?Dq:0;let l=e.length>0,u=!1;n.clear(),t.clear();for(const p of e){let m=a.get(p.id);if(s.checkEquality&&p===(m==null?void 0:m.internals.userNode))n.set(p.id,m);else{const x=Nm(p,s.nodeOrigin),k=Z_(p.extent)?p.extent:s.nodeExtent,v=Y_(x,k,_c(p));m={...s.defaults,...p,measured:{width:(h=p.measured)==null?void 0:h.width,height:(_=p.measured)==null?void 0:_.height},internals:{positionAbsolute:v,handleBounds:YLn(p,m),z:Lq(p,o,s.zIndexMode),userNode:p}},n.set(p.id,m)}(m.measured===void 0||m.measured.width===void 0||m.measured.height===void 0)&&!m.hidden&&(l=!1),p.parentId&&p7(m,n,t,r,i),u||(u=p.selected??!1)}return{nodesInitialized:l,hasSelectedNodes:u}}function ZLn(e,n){if(!e.parentId)return;const t=n.get(e.parentId);t?t.set(e.id,e):n.set(e.parentId,new Map([[e.id,e]]))}function p7(e,n,t,r,s){const{elevateNodesOnSelect:i,nodeOrigin:a,nodeExtent:o,zIndexMode:l}=d7(f7,r),u=e.parentId,h=n.get(u);if(!h){console.warn(`Parent node ${u} not found. Please make sure that parent nodes are in front of their child nodes in the nodes array.`);return}ZLn(e,t),s&&!h.parentId&&h.internals.rootParentIndex===void 0&&l==="auto"&&(h.internals.rootParentIndex=++s.i,h.internals.z=h.internals.z+s.i*WLn),s&&h.internals.rootParentIndex!==void 0&&(s.i=h.internals.rootParentIndex);const _=i&&!h7(l)?Dq:0,{x:p,y:m,z:x}=JLn(e,h,a,o,_,l),{positionAbsolute:k}=e.internals,v=p!==k.x||m!==k.y;(v||x!==e.internals.z)&&n.set(e.id,{...e,internals:{...e.internals,positionAbsolute:v?{x:p,y:m}:k,z:x}})}function Lq(e,n,t){const r=io(e.zIndex)?e.zIndex:0;return h7(t)?r:r+(e.selected?n:0)}function JLn(e,n,t,r,s,i){const{x:a,y:o}=n.internals.positionAbsolute,l=_c(e),u=Nm(e,t),h=Z_(e.extent)?Y_(u,e.extent,l):u;let _=Y_({x:a+h.x,y:o+h.y},r,l);e.extent==="parent"&&(_=wq(_,l,n));const p=Lq(e,s,i),m=n.internals.z??0;return{x:_.x,y:_.y,z:m>=p?m+1:p}}function m7(e,n,t,r=[0,0]){var a;const s=[],i=new Map;for(const o of e){const l=n.get(o.parentId);if(!l)continue;const u=((a=i.get(o.parentId))==null?void 0:a.expandedRect)??q0(l),h=kq(u,o.rect);i.set(o.parentId,{expandedRect:h,parent:l})}return i.size>0&&i.forEach(({expandedRect:o,parent:l},u)=>{var y;const h=l.internals.positionAbsolute,_=_c(l),p=l.origin??r,m=o.x0||x>0||b||w)&&(s.push({id:u,type:"position",position:{x:l.position.x-m+b,y:l.position.y-x+w}}),(y=t.get(u))==null||y.forEach(C=>{e.some(E=>E.id===C.id)||s.push({id:C.id,type:"position",position:{x:C.position.x+m,y:C.position.y+x}})})),(_.width0){const m=m7(p,n,t,s);u.push(...m)}return{changes:u,updatedInternals:l}}async function tIn({delta:e,panZoom:n,transform:t,translateExtent:r,width:s,height:i}){if(!n||!e.x&&!e.y)return!1;const a=await n.setViewportConstrained({x:t[0]+e.x,y:t[1]+e.y,zoom:t[2]},[[0,0],[s,i]],r);return!!a&&(a.x!==t[0]||a.y!==t[1]||a.k!==t[2])}function ZR(e,n,t,r,s,i){let a=s;const o=r.get(a)||new Map;r.set(a,o.set(t,n)),a=`${s}-${e}`;const l=r.get(a)||new Map;if(r.set(a,l.set(t,n)),i){a=`${s}-${e}-${i}`;const u=r.get(a)||new Map;r.set(a,u.set(t,n))}}function Iq(e,n,t){e.clear(),n.clear();for(const r of t){const{source:s,target:i,sourceHandle:a=null,targetHandle:o=null}=r,l={edgeId:r.id,source:s,target:i,sourceHandle:a,targetHandle:o},u=`${s}-${a}--${i}-${o}`,h=`${i}-${o}--${s}-${a}`;ZR("source",l,h,e,s,a),ZR("target",l,u,e,i,o),n.set(r.id,r)}}function $q(e,n){if(!e.parentId)return!1;const t=n.get(e.parentId);return t?t.selected?!0:$q(t,n):!1}function JR(e,n,t){var s;let r=e;do{if((s=r==null?void 0:r.matches)!=null&&s.call(r,n))return!0;if(r===t)return!1;r=r==null?void 0:r.parentElement}while(r);return!1}function nIn(e,n,t,r){const s=new Map;for(const[i,a]of e)if((a.selected||a.id===r)&&(!a.parentId||!$q(a,e))&&(a.draggable||n&&typeof a.draggable>"u")){const o=e.get(i);o&&s.set(i,{id:i,position:o.position||{x:0,y:0},distance:{x:t.x-o.internals.positionAbsolute.x,y:t.y-o.internals.positionAbsolute.y},extent:o.extent,parentId:o.parentId,origin:o.origin,expandParent:o.expandParent,internals:{positionAbsolute:o.internals.positionAbsolute||{x:0,y:0}},measured:{width:o.measured.width??0,height:o.measured.height??0}})}return s}function p4({nodeId:e,dragItems:n,nodeLookup:t,dragging:r=!0}){var a,o,l;const s=[];for(const[u,h]of n){const _=(a=t.get(u))==null?void 0:a.internals.userNode;_&&s.push({..._,position:h.position,dragging:r})}if(!e)return[s[0],s];const i=(o=t.get(e))==null?void 0:o.internals.userNode;return[i?{...i,position:((l=n.get(e))==null?void 0:l.position)||i.position,dragging:r}:s[0],s]}function rIn({dragItems:e,snapGrid:n,x:t,y:r}){const s=e.values().next().value;if(!s)return null;const i={x:t-s.distance.x,y:r-s.distance.y},a=jm(i,n);return{x:a.x-i.x,y:a.y-i.y}}function sIn({onNodeMouseDown:e,getStoreItems:n,onDragStart:t,onDrag:r,onDragStop:s}){let i={x:null,y:null},a=0,o=new Map,l=!1,u={x:0,y:0},h=null,_=!1,p=null,m=!1,x=!1,k=null;function v({noDragClassName:w,handleSelector:y,domNode:C,isSelectable:E,nodeId:N,nodeClickDistance:A=0}){p=Qi(C);function j({x:B,y:q}){const{nodeLookup:U,nodeExtent:W,snapGrid:H,snapToGrid:Y,nodeOrigin:te,onNodeDrag:$,onSelectionDrag:D,onError:F,updateNodePositions:G}=n();i={x:B,y:q};let V=!1;const ee=o.size>1,ce=ee&&W?Y5(zm(o)):null,ae=ee&&Y?rIn({dragItems:o,snapGrid:H,x:B,y:q}):null;for(const[re,X]of o){if(!U.has(re))continue;let oe={x:B-X.distance.x,y:q-X.distance.y};Y&&(oe=ae?{x:Math.round(oe.x+ae.x),y:Math.round(oe.y+ae.y)}:jm(oe,H));let le=null;if(ee&&W&&!X.extent&&ce){const{positionAbsolute:Ee}=X.internals,Ie=Ee.x-ce.x+W[0][0],ze=Ee.x+X.measured.width-ce.x2+W[1][0],He=Ee.y-ce.y+W[0][1],Oe=Ee.y+X.measured.height-ce.y2+W[1][1];le=[[Ie,He],[ze,Oe]]}const{position:_e,positionAbsolute:pe}=xq({nodeId:re,nextPosition:oe,nodeLookup:U,nodeExtent:le||W,nodeOrigin:te,onError:F});V=V||X.position.x!==_e.x||X.position.y!==_e.y,X.position=_e,X.internals.positionAbsolute=pe}if(x=x||V,!!V&&(G(o,!0),k&&(r||$||!N&&D))){const[re,X]=p4({nodeId:N,dragItems:o,nodeLookup:U});r==null||r(k,o,re,X),$==null||$(k,re,X),N||D==null||D(k,X)}}async function M(){if(!h)return;const{transform:B,panBy:q,autoPanSpeed:U,autoPanOnNodeDrag:W}=n();if(!W){l=!1,cancelAnimationFrame(a);return}const[H,Y]=c7(u,h,U);(H!==0||Y!==0)&&(i.x=(i.x??0)-H/B[2],i.y=(i.y??0)-Y/B[2],await q({x:H,y:Y})&&j(i)),a=requestAnimationFrame(M)}function L(B){var ee;const{nodeLookup:q,multiSelectionActive:U,nodesDraggable:W,transform:H,snapGrid:Y,snapToGrid:te,selectNodesOnDrag:$,onNodeDragStart:D,onSelectionDragStart:F,unselectNodesAndEdges:G}=n();_=!0,(!$||!E)&&!U&&N&&((ee=q.get(N))!=null&&ee.selected||G()),E&&$&&N&&(e==null||e(N));const V=o0(B.sourceEvent,{transform:H,snapGrid:Y,snapToGrid:te,containerBounds:h});if(i=V,o=nIn(q,W,V,N),o.size>0&&(t||D||!N&&F)){const[ce,ae]=p4({nodeId:N,dragItems:o,nodeLookup:q});t==null||t(B.sourceEvent,o,ce,ae),D==null||D(B.sourceEvent,ce,ae),N||F==null||F(B.sourceEvent,ae)}}const I=eq().clickDistance(A).on("start",B=>{const{domNode:q,nodeDragThreshold:U,transform:W,snapGrid:H,snapToGrid:Y}=n();h=(q==null?void 0:q.getBoundingClientRect())||null,m=!1,x=!1,k=B.sourceEvent,U===0&&L(B),i=o0(B.sourceEvent,{transform:W,snapGrid:H,snapToGrid:Y,containerBounds:h}),u=ao(B.sourceEvent,h)}).on("drag",B=>{const{autoPanOnNodeDrag:q,transform:U,snapGrid:W,snapToGrid:H,nodeDragThreshold:Y,nodeLookup:te}=n(),$=o0(B.sourceEvent,{transform:U,snapGrid:W,snapToGrid:H,containerBounds:h});if(k=B.sourceEvent,(B.sourceEvent.type==="touchmove"&&B.sourceEvent.touches.length>1||N&&!te.has(N))&&(m=!0),!m){if(!l&&q&&_&&(l=!0,M()),!_){const D=ao(B.sourceEvent,h),F=D.x-u.x,G=D.y-u.y;Math.sqrt(F*F+G*G)>Y&&L(B)}(i.x!==$.xSnapped||i.y!==$.ySnapped)&&o&&_&&(u=ao(B.sourceEvent,h),j($))}}).on("end",B=>{if(!_||m){m&&o.size>0&&n().updateNodePositions(o,!1);return}if(l=!1,_=!1,cancelAnimationFrame(a),o.size>0){const{nodeLookup:q,updateNodePositions:U,onNodeDragStop:W,onSelectionDragStop:H}=n();if(x&&(U(o,!1),x=!1),s||W||!N&&H){const[Y,te]=p4({nodeId:N,dragItems:o,nodeLookup:q,dragging:!1});s==null||s(B.sourceEvent,o,Y,te),W==null||W(B.sourceEvent,Y,te),N||H==null||H(B.sourceEvent,te)}}}).filter(B=>{const q=B.target;return!B.button&&(!w||!JR(q,`.${w}`,C))&&(!y||JR(q,y,C))});p.call(I)}function b(){p==null||p.on(".drag",null)}return{update:v,destroy:b}}function iIn(e,n,t){const r=[],s={x:e.x-t,y:e.y-t,width:t*2,height:t*2};for(const i of n.values())ob(s,q0(i))>0&&r.push(i);return r}const aIn=250;function oIn(e,n,t,r){var o,l;let s=[],i=1/0;const a=iIn(e,t,n+aIn);for(const u of a){const h=[...((o=u.internals.handleBounds)==null?void 0:o.source)??[],...((l=u.internals.handleBounds)==null?void 0:l.target)??[]];for(const _ of h){if(r.nodeId===_.nodeId&&r.type===_.type&&r.id===_.id)continue;const{x:p,y:m}=J_(u,_,_.position,!0),x=Math.sqrt(Math.pow(p-e.x,2)+Math.pow(m-e.y,2));x>n||(x1){const u=r.type==="source"?"target":"source";return s.find(h=>h.type===u)??s[0]}return s[0]}function Bq(e,n,t,r,s,i=!1){var u,h,_;const a=r.get(e);if(!a)return null;const o=s==="strict"?(u=a.internals.handleBounds)==null?void 0:u[n]:[...((h=a.internals.handleBounds)==null?void 0:h.source)??[],...((_=a.internals.handleBounds)==null?void 0:_.target)??[]],l=(t?o==null?void 0:o.find(p=>p.id===t):o==null?void 0:o[0])??null;return l&&i?{...l,...J_(a,l,l.position,!0)}:l}function Pq(e,n){return e||(n!=null&&n.classList.contains("target")?"target":n!=null&&n.classList.contains("source")?"source":null)}function lIn(e,n){let t=null;return n?t=!0:e&&!n&&(t=!1),t}const Fq=()=>!0;function cIn(e,{connectionMode:n,connectionRadius:t,handleId:r,nodeId:s,edgeUpdaterType:i,isTarget:a,domNode:o,nodeLookup:l,lib:u,autoPanOnConnect:h,flowId:_,panBy:p,cancelConnection:m,onConnectStart:x,onConnect:k,onConnectEnd:v,isValidConnection:b=Fq,onReconnectEnd:w,updateConnection:y,getTransform:C,getFromHandle:E,autoPanSpeed:N,dragThreshold:A=1,handleDomNode:j}){const M=zq(e.target);let L=0,I;const{x:B,y:q}=ao(e),U=Pq(i,j),W=o==null?void 0:o.getBoundingClientRect();let H=!1;if(!W||!U)return;const Y=Bq(s,U,r,l,n);if(!Y)return;let te=ao(e,W),$=!1,D=null,F=!1,G=null;function V(){if(!h||!W)return;const[_e,pe]=c7(te,W,N);p({x:_e,y:pe}),L=requestAnimationFrame(V)}const ee={...Y,nodeId:s,type:U,position:Y.position},ce=l.get(s);let re={inProgress:!0,isValid:null,from:J_(ce,ee,zt.Left,!0),fromHandle:ee,fromPosition:ee.position,fromNode:ce,to:te,toHandle:null,toPosition:FR[ee.position],toNode:null,pointer:te};function X(){H=!0,y(re),x==null||x(e,{nodeId:s,handleId:r,handleType:U})}A===0&&X();function oe(_e){if(!H){const{x:Oe,y:Xe}=ao(_e),_t=Oe-B,Vt=Xe-q;if(!(_t*_t+Vt*Vt>A*A))return;X()}if(!E()||!ee){le(_e);return}const pe=C();te=ao(_e,W),I=oIn(Tm(te,pe,!1,[1,1]),t,l,ee),$||(V(),$=!0);const Ee=Hq(_e,{handle:I,connectionMode:n,fromNodeId:s,fromHandleId:r,fromType:a?"target":"source",isValidConnection:b,doc:M,lib:u,flowId:_,nodeLookup:l});G=Ee.handleDomNode,D=Ee.connection,F=lIn(!!I,Ee.isValid);const Ie=l.get(s),ze=Ie?J_(Ie,ee,zt.Left,!0):re.from,He={...re,from:ze,isValid:F,to:Ee.toHandle&&F?hh({x:Ee.toHandle.x,y:Ee.toHandle.y},pe):te,toHandle:Ee.toHandle,toPosition:F&&Ee.toHandle?Ee.toHandle.position:FR[ee.position],toNode:Ee.toHandle?l.get(Ee.toHandle.nodeId):null,pointer:te};y(He),re=He}function le(_e){if(!("touches"in _e&&_e.touches.length>0)){if(H){(I||G)&&D&&F&&(k==null||k(D));const{inProgress:pe,...Ee}=re,Ie={...Ee,toPosition:re.toHandle?re.toPosition:null};v==null||v(_e,Ie),i&&(w==null||w(_e,Ie))}m(),cancelAnimationFrame(L),$=!1,F=!1,D=null,G=null,M.removeEventListener("mousemove",oe),M.removeEventListener("mouseup",le),M.removeEventListener("touchmove",oe),M.removeEventListener("touchend",le)}}M.addEventListener("mousemove",oe),M.addEventListener("mouseup",le),M.addEventListener("touchmove",oe),M.addEventListener("touchend",le)}function Hq(e,{handle:n,connectionMode:t,fromNodeId:r,fromHandleId:s,fromType:i,doc:a,lib:o,flowId:l,isValidConnection:u=Fq,nodeLookup:h}){const _=i==="target",p=n?a.querySelector(`.${o}-flow__handle[data-id="${l}-${n==null?void 0:n.nodeId}-${n==null?void 0:n.id}-${n==null?void 0:n.type}"]`):null,{x:m,y:x}=ao(e),k=a.elementFromPoint(m,x),v=k!=null&&k.classList.contains(`${o}-flow__handle`)?k:p,b={handleDomNode:v,isValid:!1,connection:null,toHandle:null};if(v){const w=Pq(void 0,v),y=v.getAttribute("data-nodeid"),C=v.getAttribute("data-handleid"),E=v.classList.contains("connectable"),N=v.classList.contains("connectableend");if(!y||!w)return b;const A={source:_?y:r,sourceHandle:_?C:s,target:_?r:y,targetHandle:_?s:C};b.connection=A;const M=E&&N&&(t===fh.Strict?_&&w==="source"||!_&&w==="target":y!==r||C!==s);b.isValid=M&&u(A),b.toHandle=Bq(y,w,C,h,t,!0)}return b}const tk={onPointerDown:cIn,isValid:Hq};function uIn({domNode:e,panZoom:n,getTransform:t,getViewScale:r}){const s=Qi(e);function i({translateExtent:o,width:l,height:u,zoomStep:h=1,pannable:_=!0,zoomable:p=!0,inversePan:m=!1}){const x=y=>{if(y.sourceEvent.type!=="wheel"||!n)return;const C=t(),E=y.sourceEvent.ctrlKey&&U0()?10:1,N=-y.sourceEvent.deltaY*(y.sourceEvent.deltaMode===1?.05:y.sourceEvent.deltaMode?1:.002)*h,A=C[2]*Math.pow(2,N*E);n.scaleTo(A)};let k=[0,0];const v=y=>{(y.sourceEvent.type==="mousedown"||y.sourceEvent.type==="touchstart")&&(k=[y.sourceEvent.clientX??y.sourceEvent.touches[0].clientX,y.sourceEvent.clientY??y.sourceEvent.touches[0].clientY])},b=y=>{const C=t();if(y.sourceEvent.type!=="mousemove"&&y.sourceEvent.type!=="touchmove"||!n)return;const E=[y.sourceEvent.clientX??y.sourceEvent.touches[0].clientX,y.sourceEvent.clientY??y.sourceEvent.touches[0].clientY],N=[E[0]-k[0],E[1]-k[1]];k=E;const A=r()*Math.max(C[2],Math.log(C[2]))*(m?-1:1),j={x:C[0]-N[0]*A,y:C[1]-N[1]*A},M=[[0,0],[l,u]];n.setViewportConstrained({x:j.x,y:j.y,zoom:C[2]},M,o)},w=pq().on("start",v).on("zoom",_?b:null).on("zoom.wheel",p?x:null);s.call(w,{})}function a(){s.on("zoom",null)}return{update:i,destroy:a,pointer:Za}}const Ay=e=>({x:e.x,y:e.y,zoom:e.k}),m4=({x:e,y:n,zoom:t})=>zy.translate(e,n).scale(t),dd=(e,n)=>e.target.closest(`.${n}`),qq=(e,n)=>n===2&&Array.isArray(e)&&e.includes(2),_In=e=>((e*=2)<=1?e*e*e:(e-=2)*e*e+2)/2,g4=(e,n=0,t=_In,r=()=>{})=>{const s=typeof n=="number"&&n>0;return s||r(),s?e.transition().duration(n).ease(t).on("end",r):e},Uq=e=>{const n=e.ctrlKey&&U0()?10:1;return-e.deltaY*(e.deltaMode===1?.05:e.deltaMode?1:.002)*n};function fIn({zoomPanValues:e,noWheelClassName:n,d3Selection:t,d3Zoom:r,panOnScrollMode:s,panOnScrollSpeed:i,zoomOnPinch:a,onPanZoomStart:o,onPanZoom:l,onPanZoomEnd:u}){return h=>{if(dd(h,n))return h.ctrlKey&&h.preventDefault(),!1;h.preventDefault(),h.stopImmediatePropagation();const _=t.property("__zoom").k||1;if(h.ctrlKey&&a){const v=Za(h),b=Uq(h),w=_*Math.pow(2,b);r.scaleTo(t,w,v,h);return}const p=h.deltaMode===1?20:1;let m=s===$_.Vertical?0:h.deltaX*p,x=s===$_.Horizontal?0:h.deltaY*p;!U0()&&h.shiftKey&&s!==$_.Vertical&&(m=h.deltaY*p,x=0),r.translateBy(t,-(m/_)*i,-(x/_)*i,{internal:!0});const k=Ay(t.property("__zoom"));clearTimeout(e.panScrollTimeout),e.isPanScrolling?(l==null||l(h,k),e.panScrollTimeout=setTimeout(()=>{u==null||u(h,k),e.isPanScrolling=!1},150)):(e.isPanScrolling=!0,o==null||o(h,k))}}function dIn({noWheelClassName:e,preventScrolling:n,d3ZoomHandler:t}){return function(r,s){const i=r.type==="wheel",a=!n&&i&&!r.ctrlKey,o=dd(r,e);if(r.ctrlKey&&i&&o&&r.preventDefault(),a||o)return null;r.preventDefault(),t.call(this,r,s)}}function hIn({zoomPanValues:e,onDraggingChange:n,onPanZoomStart:t}){return r=>{var i,a,o;if((i=r.sourceEvent)!=null&&i.internal)return;const s=Ay(r.transform);e.mouseButton=((a=r.sourceEvent)==null?void 0:a.button)||0,e.isZoomingOrPanning=!0,e.prevViewport=s,((o=r.sourceEvent)==null?void 0:o.type)==="mousedown"&&n(!0),t&&(t==null||t(r.sourceEvent,s))}}function pIn({zoomPanValues:e,panOnDrag:n,onPaneContextMenu:t,onTransformChange:r,onPanZoom:s}){return i=>{var a,o;e.usedRightMouseButton=!!(t&&qq(n,e.mouseButton??0)),(a=i.sourceEvent)!=null&&a.sync||r([i.transform.x,i.transform.y,i.transform.k]),s&&!((o=i.sourceEvent)!=null&&o.internal)&&(s==null||s(i.sourceEvent,Ay(i.transform)))}}function mIn({zoomPanValues:e,panOnDrag:n,panOnScroll:t,onDraggingChange:r,onPanZoomEnd:s,onPaneContextMenu:i}){return a=>{var o;if(!((o=a.sourceEvent)!=null&&o.internal)&&(e.isZoomingOrPanning=!1,i&&qq(n,e.mouseButton??0)&&!e.usedRightMouseButton&&a.sourceEvent&&i(a.sourceEvent),e.usedRightMouseButton=!1,r(!1),s)){const l=Ay(a.transform);e.prevViewport=l,clearTimeout(e.timerId),e.timerId=setTimeout(()=>{s==null||s(a.sourceEvent,l)},t?150:0)}}}function gIn({zoomActivationKeyPressed:e,zoomOnScroll:n,zoomOnPinch:t,panOnDrag:r,panOnScroll:s,zoomOnDoubleClick:i,userSelectionActive:a,noWheelClassName:o,noPanClassName:l,lib:u,connectionInProgress:h}){return _=>{var v;const p=e||n,m=t&&_.ctrlKey,x=_.type==="wheel";if(_.button===1&&_.type==="mousedown"&&(dd(_,`${u}-flow__node`)||dd(_,`${u}-flow__edge`)))return!0;if(!r&&!p&&!s&&!i&&!t||a||h&&!x||dd(_,o)&&x||dd(_,l)&&(!x||s&&x&&!e)||!t&&_.ctrlKey&&x)return!1;if(!t&&_.type==="touchstart"&&((v=_.touches)==null?void 0:v.length)>1)return _.preventDefault(),!1;if(!p&&!s&&!m&&x||!r&&(_.type==="mousedown"||_.type==="touchstart")||Array.isArray(r)&&!r.includes(_.button)&&_.type==="mousedown")return!1;const k=Array.isArray(r)&&r.includes(_.button)||!_.button||_.button<=1;return(!_.ctrlKey||x)&&k}}function vIn({domNode:e,minZoom:n,maxZoom:t,translateExtent:r,viewport:s,onPanZoom:i,onPanZoomStart:a,onPanZoomEnd:o,onDraggingChange:l}){const u={isZoomingOrPanning:!1,usedRightMouseButton:!1,prevViewport:{},mouseButton:0,timerId:void 0,panScrollTimeout:void 0,isPanScrolling:!1},h=e.getBoundingClientRect(),_=pq().scaleExtent([n,t]).translateExtent(r),p=Qi(e).call(_);w({x:s.x,y:s.y,zoom:dh(s.zoom,n,t)},[[0,0],[h.width,h.height]],r);const m=p.on("wheel.zoom"),x=p.on("dblclick.zoom");_.wheelDelta(Uq);async function k(I,B){return p?new Promise(q=>{_==null||_.interpolate((B==null?void 0:B.interpolate)==="linear"?a0:Y1).transform(g4(p,B==null?void 0:B.duration,B==null?void 0:B.ease,()=>q(!0)),I)}):!1}function v({noWheelClassName:I,noPanClassName:B,onPaneContextMenu:q,userSelectionActive:U,panOnScroll:W,panOnDrag:H,panOnScrollMode:Y,panOnScrollSpeed:te,preventScrolling:$,zoomOnPinch:D,zoomOnScroll:F,zoomOnDoubleClick:G,zoomActivationKeyPressed:V,lib:ee,onTransformChange:ce,connectionInProgress:ae,paneClickDistance:re,selectionOnDrag:X}){U&&!u.isZoomingOrPanning&&b();const oe=W&&!V&&!U;_.clickDistance(X?1/0:!io(re)||re<0?0:re);const le=oe?fIn({zoomPanValues:u,noWheelClassName:I,d3Selection:p,d3Zoom:_,panOnScrollMode:Y,panOnScrollSpeed:te,zoomOnPinch:D,onPanZoomStart:a,onPanZoom:i,onPanZoomEnd:o}):dIn({noWheelClassName:I,preventScrolling:$,d3ZoomHandler:m});p.on("wheel.zoom",le,{passive:!1});const _e=hIn({zoomPanValues:u,onDraggingChange:l,onPanZoomStart:a});_.on("start",_e);const pe=pIn({zoomPanValues:u,panOnDrag:H,onPaneContextMenu:!!q,onPanZoom:i,onTransformChange:ce});_.on("zoom",pe);const Ee=mIn({zoomPanValues:u,panOnDrag:H,panOnScroll:W,onPaneContextMenu:q,onPanZoomEnd:o,onDraggingChange:l});_.on("end",Ee);const Ie=gIn({zoomActivationKeyPressed:V,panOnDrag:H,zoomOnScroll:F,panOnScroll:W,zoomOnDoubleClick:G,zoomOnPinch:D,userSelectionActive:U,noPanClassName:B,noWheelClassName:I,lib:ee,connectionInProgress:ae});_.filter(Ie),G?p.on("dblclick.zoom",x):p.on("dblclick.zoom",null)}function b(){_.on("zoom",null)}async function w(I,B,q){const U=m4(I),W=_==null?void 0:_.constrain()(U,B,q);return W&&await k(W),W}async function y(I,B){const q=m4(I);return await k(q,B),q}function C(I){if(p){const B=m4(I),q=p.property("__zoom");(q.k!==I.zoom||q.x!==I.x||q.y!==I.y)&&(_==null||_.transform(p,B,null,{sync:!0}))}}function E(){const I=p?hq(p.node()):{x:0,y:0,k:1};return{x:I.x,y:I.y,zoom:I.k}}async function N(I,B){return p?new Promise(q=>{_==null||_.interpolate((B==null?void 0:B.interpolate)==="linear"?a0:Y1).scaleTo(g4(p,B==null?void 0:B.duration,B==null?void 0:B.ease,()=>q(!0)),I)}):!1}async function A(I,B){return p?new Promise(q=>{_==null||_.interpolate((B==null?void 0:B.interpolate)==="linear"?a0:Y1).scaleBy(g4(p,B==null?void 0:B.duration,B==null?void 0:B.ease,()=>q(!0)),I)}):!1}function j(I){_==null||_.scaleExtent(I)}function M(I){_==null||_.translateExtent(I)}function L(I){const B=!io(I)||I<0?0:I;_==null||_.clickDistance(B)}return{update:v,destroy:b,setViewport:y,setViewportConstrained:w,getViewport:E,scaleTo:N,scaleBy:A,setScaleExtent:j,setTranslateExtent:M,syncViewport:C,setClickDistance:L}}var ph;(function(e){e.Line="line",e.Handle="handle"})(ph||(ph={}));function bIn({width:e,prevWidth:n,height:t,prevHeight:r,affectsX:s,affectsY:i}){const a=e-n,o=t-r,l=[a>0?1:a<0?-1:0,o>0?1:o<0?-1:0];return a&&s&&(l[0]=l[0]*-1),o&&i&&(l[1]=l[1]*-1),l}function eM(e){const n=e.includes("right")||e.includes("left"),t=e.includes("bottom")||e.includes("top"),r=e.includes("left"),s=e.includes("top");return{isHorizontal:n,isVertical:t,affectsX:r,affectsY:s}}function Xc(e,n){return Math.max(0,n-e)}function Yc(e,n){return Math.max(0,e-n)}function E1(e,n,t){return Math.max(0,n-e,e-t)}function tM(e,n){return e?!n:n}function yIn(e,n,t,r,s,i,a,o){let{affectsX:l,affectsY:u}=n;const{isHorizontal:h,isVertical:_}=n,p=h&&_,{xSnapped:m,ySnapped:x}=t,{minWidth:k,maxWidth:v,minHeight:b,maxHeight:w}=r,{x:y,y:C,width:E,height:N,aspectRatio:A}=e;let j=Math.floor(h?m-e.pointerX:0),M=Math.floor(_?x-e.pointerY:0);const L=E+(l?-j:j),I=N+(u?-M:M),B=-i[0]*E,q=-i[1]*N;let U=E1(L,k,v),W=E1(I,b,w);if(a){let te=0,$=0;l&&j<0?te=Xc(y+j+B,a[0][0]):!l&&j>0&&(te=Yc(y+L+B,a[1][0])),u&&M<0?$=Xc(C+M+q,a[0][1]):!u&&M>0&&($=Yc(C+I+q,a[1][1])),U=Math.max(U,te),W=Math.max(W,$)}if(o){let te=0,$=0;l&&j>0?te=Yc(y+j,o[0][0]):!l&&j<0&&(te=Xc(y+L,o[1][0])),u&&M>0?$=Yc(C+M,o[0][1]):!u&&M<0&&($=Xc(C+I,o[1][1])),U=Math.max(U,te),W=Math.max(W,$)}if(s){if(h){const te=E1(L/A,b,w)*A;if(U=Math.max(U,te),a){let $=0;!l&&!u||l&&!u&&p?$=Yc(C+q+L/A,a[1][1])*A:$=Xc(C+q+(l?j:-j)/A,a[0][1])*A,U=Math.max(U,$)}if(o){let $=0;!l&&!u||l&&!u&&p?$=Xc(C+L/A,o[1][1])*A:$=Yc(C+(l?j:-j)/A,o[0][1])*A,U=Math.max(U,$)}}if(_){const te=E1(I*A,k,v)/A;if(W=Math.max(W,te),a){let $=0;!l&&!u||u&&!l&&p?$=Yc(y+I*A+B,a[1][0])/A:$=Xc(y+(u?M:-M)*A+B,a[0][0])/A,W=Math.max(W,$)}if(o){let $=0;!l&&!u||u&&!l&&p?$=Xc(y+I*A,o[1][0])/A:$=Yc(y+(u?M:-M)*A,o[0][0])/A,W=Math.max(W,$)}}}M=M+(M<0?W:-W),j=j+(j<0?U:-U),s&&(p?L>I*A?M=(tM(l,u)?-j:j)/A:j=(tM(l,u)?-M:M)*A:h?(M=j/A,u=l):(j=M*A,l=u));const H=l?y+j:y,Y=u?C+M:C;return{width:E+(l?-j:j),height:N+(u?-M:M),x:i[0]*j*(l?-1:1)+H,y:i[1]*M*(u?-1:1)+Y}}const Gq={width:0,height:0,x:0,y:0},xIn={...Gq,pointerX:0,pointerY:0,aspectRatio:1};function wIn(e,n,t){const r=n.position.x+e.position.x,s=n.position.y+e.position.y,i=e.measured.width??0,a=e.measured.height??0,o=t[0]*i,l=t[1]*a;return[[r-o,s-l],[r+i-o,s+a-l]]}function kIn({domNode:e,nodeId:n,getStoreItems:t,onChange:r,onEnd:s}){const i=Qi(e);let a={controlDirection:eM("bottom-right"),boundaries:{minWidth:0,minHeight:0,maxWidth:Number.MAX_VALUE,maxHeight:Number.MAX_VALUE},resizeDirection:void 0,keepAspectRatio:!1};function o({controlPosition:u,boundaries:h,keepAspectRatio:_,resizeDirection:p,onResizeStart:m,onResize:x,onResizeEnd:k,shouldResize:v}){let b={...Gq},w={...xIn};a={boundaries:h,resizeDirection:p,keepAspectRatio:_,controlDirection:eM(u)};let y,C=null,E=[],N,A,j,M=!1;const L=eq().on("start",I=>{const{nodeLookup:B,transform:q,snapGrid:U,snapToGrid:W,nodeOrigin:H,paneDomNode:Y}=t();if(y=B.get(n),!y)return;C=(Y==null?void 0:Y.getBoundingClientRect())??null;const{xSnapped:te,ySnapped:$}=o0(I.sourceEvent,{transform:q,snapGrid:U,snapToGrid:W,containerBounds:C});b={width:y.measured.width??0,height:y.measured.height??0,x:y.position.x??0,y:y.position.y??0},w={...b,pointerX:te,pointerY:$,aspectRatio:b.width/b.height},N=void 0,A=Z_(y.extent)?y.extent:void 0,y.parentId&&(y.extent==="parent"||y.expandParent)&&(N=B.get(y.parentId)),N&&y.extent==="parent"&&(A=[[0,0],[N.measured.width,N.measured.height]]),E=[],j=void 0;for(const[D,F]of B)if(F.parentId===n&&(E.push({id:D,position:{...F.position},extent:F.extent}),F.extent==="parent"||F.expandParent)){const G=wIn(F,y,F.origin??H);j?j=[[Math.min(G[0][0],j[0][0]),Math.min(G[0][1],j[0][1])],[Math.max(G[1][0],j[1][0]),Math.max(G[1][1],j[1][1])]]:j=G}m==null||m(I,{...b})}).on("drag",I=>{const{transform:B,snapGrid:q,snapToGrid:U,nodeOrigin:W}=t(),H=o0(I.sourceEvent,{transform:B,snapGrid:q,snapToGrid:U,containerBounds:C}),Y=[];if(!y)return;const{x:te,y:$,width:D,height:F}=b,G={},V=y.origin??W,{width:ee,height:ce,x:ae,y:re}=yIn(w,a.controlDirection,H,a.boundaries,a.keepAspectRatio,V,A,j),X=ee!==D,oe=ce!==F,le=ae!==te&&X,_e=re!==$&&oe;if(!le&&!_e&&!X&&!oe)return;if((le||_e||V[0]===1||V[1]===1)&&(G.x=le?ae:b.x,G.y=_e?re:b.y,b.x=G.x,b.y=G.y,E.length>0)){const ze=ae-te,He=re-$;for(const Oe of E)Oe.position={x:Oe.position.x-ze+V[0]*(ee-D),y:Oe.position.y-He+V[1]*(ce-F)},Y.push(Oe)}if((X||oe)&&(G.width=X&&(!a.resizeDirection||a.resizeDirection==="horizontal")?ee:b.width,G.height=oe&&(!a.resizeDirection||a.resizeDirection==="vertical")?ce:b.height,b.width=G.width,b.height=G.height),N&&y.expandParent){const ze=V[0]*(G.width??0);G.x&&G.x{M&&(k==null||k(I,{...b}),s==null||s({...b}),M=!1)});i.call(L)}function l(){i.on(".drag",null)}return{update:o,destroy:l}}const SIn={},nM=e=>{let n;const t=new Set,r=(h,_)=>{const p=typeof h=="function"?h(n):h;if(!Object.is(p,n)){const m=n;n=_??(typeof p!="object"||p===null)?p:Object.assign({},n,p),t.forEach(x=>x(n,m))}},s=()=>n,l={setState:r,getState:s,getInitialState:()=>u,subscribe:h=>(t.add(h),()=>t.delete(h)),destroy:()=>{(SIn?"production":void 0)!=="production"&&console.warn("[DEPRECATED] The `destroy` method will be unsupported in a future version. Instead use unsubscribe function returned by subscribe. Everything will be garbage-collected if store is garbage-collected."),t.clear()}},u=n=e(r,s,l);return l},CIn=e=>e?nM(e):nM,{useDebugValue:EIn}=et,{useSyncExternalStoreWithSelector:NIn}=sW,zIn=e=>e;function Vq(e,n=zIn,t){const r=NIn(e.subscribe,e.getState,e.getServerState||e.getInitialState,n,t);return EIn(r),r}const rM=(e,n)=>{const t=CIn(e),r=(s,i=n)=>Vq(t,s,i);return Object.assign(r,t),r},jIn=(e,n)=>e?rM(e,n):rM;function Cr(e,n){if(Object.is(e,n))return!0;if(typeof e!="object"||e===null||typeof n!="object"||n===null)return!1;if(e instanceof Map&&n instanceof Map){if(e.size!==n.size)return!1;for(const[r,s]of e)if(!Object.is(s,n.get(r)))return!1;return!0}if(e instanceof Set&&n instanceof Set){if(e.size!==n.size)return!1;for(const r of e)if(!n.has(r))return!1;return!0}const t=Object.keys(e);if(t.length!==Object.keys(n).length)return!1;for(const r of t)if(!Object.prototype.hasOwnProperty.call(n,r)||!Object.is(e[r],n[r]))return!1;return!0}const Ry=T.createContext(null),TIn=Ry.Provider,Kq=uo.error001("react");function zn(e,n){const t=T.useContext(Ry);if(t===null)throw new Error(Kq);return Vq(t,e,n)}function Nr(){const e=T.useContext(Ry);if(e===null)throw new Error(Kq);return T.useMemo(()=>({getState:e.getState,setState:e.setState,subscribe:e.subscribe}),[e])}const sM={display:"none"},AIn={position:"absolute",width:1,height:1,margin:-1,border:0,padding:0,overflow:"hidden",clip:"rect(0px, 0px, 0px, 0px)",clipPath:"inset(100%)"},Wq="react-flow__node-desc",Qq="react-flow__edge-desc",RIn="react-flow__aria-live",MIn=e=>e.ariaLiveMessage,OIn=e=>e.ariaLabelConfig;function DIn({rfId:e}){const n=zn(MIn);return f.jsx("div",{id:`${RIn}-${e}`,"aria-live":"assertive","aria-atomic":"true",style:AIn,children:n})}function LIn({rfId:e,disableKeyboardA11y:n}){const t=zn(OIn);return f.jsxs(f.Fragment,{children:[f.jsx("div",{id:`${Wq}-${e}`,style:sM,children:n?t["node.a11yDescription.default"]:t["node.a11yDescription.keyboardDisabled"]}),f.jsx("div",{id:`${Qq}-${e}`,style:sM,children:t["edge.a11yDescription.default"]}),!n&&f.jsx(DIn,{rfId:e})]})}const My=T.forwardRef(({position:e="top-left",children:n,className:t,style:r,...s},i)=>{const a=`${e}`.split("-");return f.jsx("div",{className:cs(["react-flow__panel",t,...a]),style:r,ref:i,...s,children:n})});My.displayName="Panel";const iM="https://reactflow.dev?utm_source=attribution";function IIn({proOptions:e,position:n="bottom-right"}){return e!=null&&e.hideAttribution?null:f.jsx(My,{position:n,className:"react-flow__attribution","data-message":`Please only hide this attribution when you are subscribed to React Flow Pro: ${iM}`,children:f.jsx("a",{href:iM,target:"_blank",rel:"noopener noreferrer","aria-label":"React Flow attribution",children:"React Flow"})})}const $In=e=>{const n=[],t=[];for(const[,r]of e.nodeLookup)r.selected&&n.push(r.internals.userNode);for(const[,r]of e.edgeLookup)r.selected&&t.push(r);return{selectedNodes:n,selectedEdges:t}},N1=e=>e.id;function BIn(e,n){return Cr(e.selectedNodes.map(N1),n.selectedNodes.map(N1))&&Cr(e.selectedEdges.map(N1),n.selectedEdges.map(N1))}function PIn({onSelectionChange:e}){const n=Nr(),{selectedNodes:t,selectedEdges:r}=zn($In,BIn);return T.useEffect(()=>{const s={nodes:t,edges:r};e==null||e(s),n.getState().onSelectionChangeHandlers.forEach(i=>i(s))},[t,r,e]),null}const FIn=e=>!!e.onSelectionChangeHandlers;function HIn({onSelectionChange:e}){const n=zn(FIn);return e||n?f.jsx(PIn,{onSelectionChange:e}):null}const Xq=[0,0],qIn={x:0,y:0,zoom:1},UIn=["nodes","edges","defaultNodes","defaultEdges","onConnect","onConnectStart","onConnectEnd","onClickConnectStart","onClickConnectEnd","nodesDraggable","autoPanOnNodeFocus","nodesConnectable","nodesFocusable","edgesFocusable","edgesReconnectable","elevateNodesOnSelect","elevateEdgesOnSelect","minZoom","maxZoom","nodeExtent","onNodesChange","onEdgesChange","elementsSelectable","connectionMode","snapGrid","snapToGrid","translateExtent","connectOnClick","defaultEdgeOptions","fitView","fitViewOptions","onNodesDelete","onEdgesDelete","onDelete","onNodeDrag","onNodeDragStart","onNodeDragStop","onSelectionDrag","onSelectionDragStart","onSelectionDragStop","onMoveStart","onMove","onMoveEnd","noPanClassName","nodeOrigin","autoPanOnConnect","autoPanOnNodeDrag","onError","connectionRadius","isValidConnection","selectNodesOnDrag","nodeDragThreshold","connectionDragThreshold","onBeforeDelete","debug","autoPanSpeed","ariaLabelConfig","zIndexMode"],aM=[...UIn,"rfId"],GIn=e=>({setNodes:e.setNodes,setEdges:e.setEdges,setMinZoom:e.setMinZoom,setMaxZoom:e.setMaxZoom,setTranslateExtent:e.setTranslateExtent,setNodeExtent:e.setNodeExtent,reset:e.reset,setDefaultNodesAndEdges:e.setDefaultNodesAndEdges}),oM={translateExtent:F0,nodeOrigin:Xq,minZoom:.5,maxZoom:2,elementsSelectable:!0,noPanClassName:"nopan",rfId:"1"};function VIn(e){const{setNodes:n,setEdges:t,setMinZoom:r,setMaxZoom:s,setTranslateExtent:i,setNodeExtent:a,reset:o,setDefaultNodesAndEdges:l}=zn(GIn,Cr),u=Nr();T.useEffect(()=>(l(e.defaultNodes,e.defaultEdges),()=>{h.current=oM,o()}),[]);const h=T.useRef(oM);return T.useEffect(()=>{for(const _ of aM){const p=e[_],m=h.current[_];p!==m&&(typeof e[_]>"u"||(_==="nodes"?n(p):_==="edges"?t(p):_==="minZoom"?r(p):_==="maxZoom"?s(p):_==="translateExtent"?i(p):_==="nodeExtent"?a(p):_==="ariaLabelConfig"?u.setState({ariaLabelConfig:LLn(p)}):_==="fitView"?u.setState({fitViewQueued:p}):_==="fitViewOptions"?u.setState({fitViewOptions:p}):u.setState({[_]:p})))}h.current=e},aM.map(_=>e[_])),null}function lM(){return typeof window>"u"||!window.matchMedia?null:window.matchMedia("(prefers-color-scheme: dark)")}function KIn(e){var r;const[n,t]=T.useState(e==="system"?null:e);return T.useEffect(()=>{if(e!=="system"){t(e);return}const s=lM(),i=()=>t(s!=null&&s.matches?"dark":"light");return i(),s==null||s.addEventListener("change",i),()=>{s==null||s.removeEventListener("change",i)}},[e]),n!==null?n:(r=lM())!=null&&r.matches?"dark":"light"}const cM=typeof document<"u"?document:null;function G0(e=null,n={target:cM,actInsideInputWithModifier:!0}){const[t,r]=T.useState(!1),s=T.useRef(!1),i=T.useRef(new Set([])),[a,o]=T.useMemo(()=>{if(e!==null){const u=(Array.isArray(e)?e:[e]).filter(_=>typeof _=="string").map(_=>_.replace("+",` `).replace(` `,` +`).split(` -`)),h=u.reduce((_,p)=>_.concat(...p),[]);return[u,h]}return[[],[]]},[e]);return A.useEffect(()=>{const l=(n==null?void 0:n.target)??cM,u=(n==null?void 0:n.actInsideInputWithModifier)??!0;if(e!==null){const h=m=>{var v,b;if(s.current=m.ctrlKey||m.metaKey||m.shiftKey||m.altKey,(!s.current||s.current&&!u)&&Nq(m))return!1;const k=_M(m.code,o);if(i.current.add(m[k]),uM(a,i.current,!1)){const w=((b=(v=m.composedPath)==null?void 0:v.call(m))==null?void 0:b[0])||m.target,y=(w==null?void 0:w.nodeName)==="BUTTON"||(w==null?void 0:w.nodeName)==="A";n.preventDefault!==!1&&(s.current||!y)&&m.preventDefault(),r(!0)}},_=m=>{const x=_M(m.code,o);uM(a,i.current,!0)?(r(!1),i.current.clear()):i.current.delete(m[x]),m.key==="Meta"&&i.current.clear(),s.current=!1},p=()=>{i.current.clear(),r(!1)};return l==null||l.addEventListener("keydown",h),l==null||l.addEventListener("keyup",_),window.addEventListener("blur",p),window.addEventListener("contextmenu",p),()=>{l==null||l.removeEventListener("keydown",h),l==null||l.removeEventListener("keyup",_),window.removeEventListener("blur",p),window.removeEventListener("contextmenu",p)}}},[e,r]),t}function uM(e,n,t){return e.filter(r=>t||r.length===n.size).some(r=>r.every(s=>n.has(s)))}function _M(e,n){return n.includes(e)?"code":"key"}const lIn=()=>{const e=Nr();return A.useMemo(()=>({zoomIn:async n=>{const{panZoom:t}=e.getState();return t?t.scaleBy(1.2,n):!1},zoomOut:async n=>{const{panZoom:t}=e.getState();return t?t.scaleBy(1/1.2,n):!1},zoomTo:async(n,t)=>{const{panZoom:r}=e.getState();return r?r.scaleTo(n,t):!1},getZoom:()=>e.getState().transform[2],setViewport:async(n,t)=>{const{transform:[r,s,i],panZoom:a}=e.getState();return a?(await a.setViewport({x:n.x??r,y:n.y??s,zoom:n.zoom??i},t),!0):!1},getViewport:()=>{const[n,t,r]=e.getState().transform;return{x:n,y:t,zoom:r}},setCenter:async(n,t,r)=>e.getState().setCenter(n,t,r),fitBounds:async(n,t)=>{const{width:r,height:s,minZoom:i,maxZoom:a,panZoom:o}=e.getState(),l=u7(n,r,s,i,a,(t==null?void 0:t.padding)??.1);return o?(await o.setViewport(l,{duration:t==null?void 0:t.duration,ease:t==null?void 0:t.ease,interpolate:t==null?void 0:t.interpolate}),!0):!1},screenToFlowPosition:(n,t={})=>{const{transform:r,snapGrid:s,snapToGrid:i,domNode:a}=e.getState();if(!a)return n;const{x:o,y:l}=a.getBoundingClientRect(),u={x:n.x-o,y:n.y-l},h=t.snapGrid??s,_=t.snapToGrid??i;return Tm(u,r,_,h)},flowToScreenPosition:n=>{const{transform:t,domNode:r}=e.getState();if(!r)return n;const{x:s,y:i}=r.getBoundingClientRect(),a=hh(n,t);return{x:a.x+s,y:a.y+i}}}),[])};function Qq(e,n){const t=[],r=new Map,s=[];for(const i of e)if(i.type==="add"){s.push(i);continue}else if(i.type==="remove"||i.type==="replace")r.set(i.id,[i]);else{const a=r.get(i.id);a?a.push(i):r.set(i.id,[i])}for(const i of n){const a=r.get(i.id);if(!a){t.push(i);continue}if(a[0].type==="remove")continue;if(a[0].type==="replace"){t.push({...a[0].item});continue}const o={...i};for(const l of a)cIn(l,o);t.push(o)}return s.length&&s.forEach(i=>{i.index!==void 0?t.splice(i.index,0,{...i.item}):t.push({...i.item})}),t}function cIn(e,n){switch(e.type){case"select":{n.selected=e.selected;break}case"position":{typeof e.position<"u"&&(n.position=e.position),typeof e.dragging<"u"&&(n.dragging=e.dragging);break}case"dimensions":{typeof e.dimensions<"u"&&(n.measured={...e.dimensions},e.setAttributes&&((e.setAttributes===!0||e.setAttributes==="width")&&(n.width=e.dimensions.width),(e.setAttributes===!0||e.setAttributes==="height")&&(n.height=e.dimensions.height))),typeof e.resizing=="boolean"&&(n.resizing=e.resizing);break}}}function uIn(e,n){return Qq(e,n)}function _In(e,n){return Qq(e,n)}function f_(e,n){return{id:e,type:"select",selected:n}}function hd(e,n=new Set,t=!1){const r=[];for(const[s,i]of e){const a=n.has(s);!(i.selected===void 0&&!a)&&i.selected!==a&&(t&&(i.selected=a),r.push(f_(i.id,a)))}return r}function fM({items:e=[],lookup:n}){var s;const t=[],r=new Map(e.map(i=>[i.id,i]));for(const[i,a]of e.entries()){const o=n.get(a.id),l=((s=o==null?void 0:o.internals)==null?void 0:s.userNode)??o;l!==void 0&&l!==a&&t.push({id:a.id,item:a,type:"replace"}),l===void 0&&t.push({item:a,type:"add",index:i})}for(const[i]of n)r.get(i)===void 0&&t.push({id:i,type:"remove"});return t}function dM(e){return{id:e.id,type:"remove"}}const fIn=kq();function dIn(e,n,t={}){return nLn(e,n,{...t,onError:t.onError??fIn})}const hM=e=>FDn(e),hIn=e=>vq(e);function Xq(e){return A.forwardRef(e)}const pIn=typeof window<"u"?A.useLayoutEffect:A.useEffect;function pM(e){const[n,t]=A.useState(BigInt(0)),[r]=A.useState(()=>mIn(()=>t(s=>s+BigInt(1))));return pIn(()=>{const s=r.get();s.length&&(e(s),r.reset())},[n]),r}function mIn(e){let n=[];return{get:()=>n,reset:()=>{n=[]},push:t=>{n.push(t),e()}}}const Yq=A.createContext(null);function gIn({children:e}){const n=Nr(),t=A.useCallback(o=>{const{nodes:l=[],setNodes:u,hasDefaultNodes:h,onNodesChange:_,nodeLookup:p,fitViewQueued:m,onNodesChangeMiddlewareMap:x}=n.getState();let k=l;for(const b of o)k=typeof b=="function"?b(k):b;let v=fM({items:k,lookup:p});for(const b of x.values())v=b(v);h&&u(k),v.length>0?_==null||_(v):m&&window.requestAnimationFrame(()=>{const{fitViewQueued:b,nodes:w,setNodes:y}=n.getState();b&&y(w)})},[]),r=pM(t),s=A.useCallback(o=>{const{edges:l=[],setEdges:u,hasDefaultEdges:h,onEdgesChange:_,edgeLookup:p}=n.getState();let m=l;for(const x of o)m=typeof x=="function"?x(m):x;h?u(m):_&&_(fM({items:m,lookup:p}))},[]),i=pM(s),a=A.useMemo(()=>({nodeQueue:r,edgeQueue:i}),[]);return f.jsx(Yq.Provider,{value:a,children:e})}function vIn(){const e=A.useContext(Yq);if(!e)throw new Error("useBatchContext must be used within a BatchProvider");return e}const bIn=e=>!!e.panZoom;function g7(){const e=lIn(),n=Nr(),t=vIn(),r=zn(bIn),s=A.useMemo(()=>{const i=_=>n.getState().nodeLookup.get(_),a=_=>{t.nodeQueue.push(_)},o=_=>{t.edgeQueue.push(_)},l=_=>{var b,w;const{nodeLookup:p,nodeOrigin:m}=n.getState(),x=hM(_)?_:p.get(_.id),k=x.parentId?Cq(x.position,x.measured,x.parentId,p,m):x.position,v={...x,position:k,width:((b=x.measured)==null?void 0:b.width)??x.width,height:((w=x.measured)==null?void 0:w.height)??x.height};return q0(v)},u=(_,p,m={replace:!1})=>{a(x=>x.map(k=>{if(k.id===_){const v=typeof p=="function"?p(k):p;return m.replace&&hM(v)?v:{...k,...v}}return k}))},h=(_,p,m={replace:!1})=>{o(x=>x.map(k=>{if(k.id===_){const v=typeof p=="function"?p(k):p;return m.replace&&hIn(v)?v:{...k,...v}}return k}))};return{getNodes:()=>n.getState().nodes.map(_=>({..._})),getNode:_=>{var p;return(p=i(_))==null?void 0:p.internals.userNode},getInternalNode:i,getEdges:()=>{const{edges:_=[]}=n.getState();return _.map(p=>({...p}))},getEdge:_=>n.getState().edgeLookup.get(_),setNodes:a,setEdges:o,addNodes:_=>{const p=Array.isArray(_)?_:[_];t.nodeQueue.push(m=>[...m,...p])},addEdges:_=>{const p=Array.isArray(_)?_:[_];t.edgeQueue.push(m=>[...m,...p])},toObject:()=>{const{nodes:_=[],edges:p=[],transform:m}=n.getState(),[x,k,v]=m;return{nodes:_.map(b=>({...b})),edges:p.map(b=>({...b})),viewport:{x,y:k,zoom:v}}},deleteElements:async({nodes:_=[],edges:p=[]})=>{const{nodes:m,edges:x,onNodesDelete:k,onEdgesDelete:v,triggerNodeChanges:b,triggerEdgeChanges:w,onDelete:y,onBeforeDelete:C}=n.getState(),{nodes:N,edges:E}=await VDn({nodesToRemove:_,edgesToRemove:p,nodes:m,edges:x,onBeforeDelete:C}),T=E.length>0,j=N.length>0;if(T){const M=E.map(dM);v==null||v(E),w(M)}if(j){const M=N.map(dM);k==null||k(N),b(M)}return(j||T)&&(y==null||y({nodes:N,edges:E})),{deletedNodes:N,deletedEdges:E}},getIntersectingNodes:(_,p=!0,m)=>{const x=qR(_),k=x?_:l(_),v=m!==void 0;return k?(m||n.getState().nodes).filter(b=>{const w=n.getState().nodeLookup.get(b.id);if(w&&!x&&(b.id===_.id||!w.internals.positionAbsolute))return!1;const y=q0(v?b:w),C=ob(y,k);return p&&C>0||C>=y.width*y.height||C>=k.width*k.height}):[]},isNodeIntersecting:(_,p,m=!0)=>{const k=qR(_)?_:l(_);if(!k)return!1;const v=ob(k,p);return m&&v>0||v>=p.width*p.height||v>=k.width*k.height},updateNode:u,updateNodeData:(_,p,m={replace:!1})=>{u(_,x=>{const k=typeof p=="function"?p(x):p;return m.replace?{...x,data:k}:{...x,data:{...x.data,...k}}},m)},updateEdge:h,updateEdgeData:(_,p,m={replace:!1})=>{h(_,x=>{const k=typeof p=="function"?p(x):p;return m.replace?{...x,data:k}:{...x,data:{...x.data,...k}}},m)},getNodesBounds:_=>{const{nodeLookup:p,nodeOrigin:m}=n.getState();return HDn(_,{nodeLookup:p,nodeOrigin:m})},getHandleConnections:({type:_,id:p,nodeId:m})=>{var x;return Array.from(((x=n.getState().connectionLookup.get(`${m}-${_}${p?`-${p}`:""}`))==null?void 0:x.values())??[])},getNodeConnections:({type:_,handleId:p,nodeId:m})=>{var x;return Array.from(((x=n.getState().connectionLookup.get(`${m}${_?p?`-${_}-${p}`:`-${_}`:""}`))==null?void 0:x.values())??[])},fitView:async _=>{const p=n.getState().fitViewResolver??QDn();return n.setState({fitViewQueued:!0,fitViewOptions:_,fitViewResolver:p}),t.nodeQueue.push(m=>[...m]),p.promise}}},[]);return A.useMemo(()=>({...s,...e,viewportInitialized:r}),[r])}const mM=e=>e.selected,yIn=typeof window<"u"?window:void 0;function xIn({deleteKeyCode:e,multiSelectionKeyCode:n}){const t=Nr(),{deleteElements:r}=g7(),s=G0(e,{actInsideInputWithModifier:!1}),i=G0(n,{target:yIn});A.useEffect(()=>{if(s){const{edges:a,nodes:o}=t.getState();r({nodes:o.filter(mM),edges:a.filter(mM)}),t.setState({nodesSelectionActive:!1})}},[s]),A.useEffect(()=>{t.setState({multiSelectionActive:i})},[i])}function wIn(e){const n=Nr();A.useEffect(()=>{const t=()=>{var s,i,a,o;if(!e.current||!(((i=(s=e.current).checkVisibility)==null?void 0:i.call(s))??!0))return!1;const r=_7(e.current);(r.height===0||r.width===0)&&((o=(a=n.getState()).onError)==null||o.call(a,"004",uo.error004())),n.setState({width:r.width||500,height:r.height||500})};if(e.current){t(),window.addEventListener("resize",t);const r=new ResizeObserver(()=>t());return r.observe(e.current),()=>{window.removeEventListener("resize",t),r&&e.current&&r.unobserve(e.current)}}},[])}const Oy={position:"absolute",width:"100%",height:"100%",top:0,left:0},kIn=e=>({userSelectionActive:e.userSelectionActive,lib:e.lib,connectionInProgress:e.connection.inProgress});function SIn({onPaneContextMenu:e,zoomOnScroll:n=!0,zoomOnPinch:t=!0,panOnScroll:r=!1,panOnScrollSpeed:s=.5,panOnScrollMode:i=$_.Free,zoomOnDoubleClick:a=!0,panOnDrag:o=!0,defaultViewport:l,translateExtent:u,minZoom:h,maxZoom:_,zoomActivationKeyCode:p,preventScrolling:m=!0,children:x,noWheelClassName:k,noPanClassName:v,onViewportChange:b,isControlledViewport:w,paneClickDistance:y,selectionOnDrag:C}){const N=Nr(),E=A.useRef(null),{userSelectionActive:T,lib:j,connectionInProgress:M}=zn(kIn,Cr),D=G0(p),I=A.useRef();wIn(E);const P=A.useCallback(U=>{b==null||b({x:U[0],y:U[1],zoom:U[2]}),w||N.setState({transform:U})},[b,w]);return A.useEffect(()=>{if(E.current){I.current=RLn({domNode:E.current,minZoom:h,maxZoom:_,translateExtent:u,viewport:l,onDraggingChange:H=>N.setState(Y=>Y.paneDragging===H?Y:{paneDragging:H}),onPanZoomStart:(H,Y)=>{const{onViewportChangeStart:te,onMoveStart:$}=N.getState();$==null||$(H,Y),te==null||te(Y)},onPanZoom:(H,Y)=>{const{onViewportChange:te,onMove:$}=N.getState();$==null||$(H,Y),te==null||te(Y)},onPanZoomEnd:(H,Y)=>{const{onViewportChangeEnd:te,onMoveEnd:$}=N.getState();$==null||$(H,Y),te==null||te(Y)}});const{x:U,y:q,zoom:W}=I.current.getViewport();return N.setState({panZoom:I.current,transform:[U,q,W],domNode:E.current.closest(".react-flow")}),()=>{var H;(H=I.current)==null||H.destroy()}}},[]),A.useEffect(()=>{var U;(U=I.current)==null||U.update({onPaneContextMenu:e,zoomOnScroll:n,zoomOnPinch:t,panOnScroll:r,panOnScrollSpeed:s,panOnScrollMode:i,zoomOnDoubleClick:a,panOnDrag:o,zoomActivationKeyPressed:D,preventScrolling:m,noPanClassName:v,userSelectionActive:T,noWheelClassName:k,lib:j,onTransformChange:P,connectionInProgress:M,selectionOnDrag:C,paneClickDistance:y})},[e,n,t,r,s,i,a,o,D,m,v,T,k,j,P,M,C,y]),f.jsx("div",{className:"react-flow__renderer",ref:E,style:Oy,children:x})}const CIn=e=>({userSelectionActive:e.userSelectionActive,userSelectionRect:e.userSelectionRect});function EIn(){const{userSelectionActive:e,userSelectionRect:n}=zn(CIn,Cr);return e&&n?f.jsx("div",{className:"react-flow__selection react-flow__container",style:{width:n.width,height:n.height,transform:`translate(${n.x}px, ${n.y}px)`}}):null}const v4=(e,n)=>t=>{t.target===n.current&&(e==null||e(t))},NIn=e=>({userSelectionActive:e.userSelectionActive,elementsSelectable:e.elementsSelectable,dragging:e.paneDragging,panBy:e.panBy,autoPanSpeed:e.autoPanSpeed});function zIn({isSelecting:e,selectionKeyPressed:n,selectionMode:t=H0.Full,panOnDrag:r,autoPanOnSelection:s,paneClickDistance:i,selectionOnDrag:a,onSelectionStart:o,onSelectionEnd:l,onPaneClick:u,onPaneContextMenu:h,onPaneScroll:_,onPaneMouseEnter:p,onPaneMouseMove:m,onPaneMouseLeave:x,children:k}){const v=A.useRef(0),b=Nr(),{userSelectionActive:w,elementsSelectable:y,dragging:C,panBy:N,autoPanSpeed:E}=zn(NIn,Cr),T=y&&(e||w),j=A.useRef(null),M=A.useRef(),D=A.useRef(new Set),I=A.useRef(new Set),P=A.useRef(!1),U=A.useRef(!1),q=A.useRef({x:0,y:0}),W=A.useRef(!1),H=X=>{if(U.current||P.current||b.getState().connection.inProgress){U.current=!1,P.current=!1;return}u==null||u(X),b.getState().resetSelectedElements(),b.setState({nodesSelectionActive:!1})},Y=X=>{if(Array.isArray(r)&&(r!=null&&r.includes(2))){X.preventDefault();return}h==null||h(X)},te=_?X=>_(X):void 0,$=X=>{U.current&&(X.stopPropagation(),U.current=!1)},L=X=>{var Oe,Xe;const{domNode:oe,transform:le}=b.getState();if(M.current=oe==null?void 0:oe.getBoundingClientRect(),!M.current)return;const _e=X.target===j.current;if(!_e&&!!X.target.closest(".nokey")||!e||!(a&&_e||n)||X.button!==0||!X.isPrimary)return;(Xe=(Oe=X.target)==null?void 0:Oe.setPointerCapture)==null||Xe.call(Oe,X.pointerId),U.current=!1;const{x:Ie,y:ze}=ao(X.nativeEvent,M.current),He=Tm({x:Ie,y:ze},le);b.setState({userSelectionRect:{width:0,height:0,startX:He.x,startY:He.y,x:Ie,y:ze}}),_e||(X.stopPropagation(),X.preventDefault())};function F(X,oe){const{userSelectionRect:le}=b.getState();if(!le)return;const{transform:_e,nodeLookup:pe,edgeLookup:Ee,connectionLookup:Ie,triggerNodeChanges:ze,triggerEdgeChanges:He,defaultEdgeOptions:Oe}=b.getState(),Xe={x:le.startX,y:le.startY},{x:_t,y:Vt}=hh(Xe,_e),$t={startX:Xe.x,startY:Xe.y,x:X<_t?X:_t,y:oect.id)),I.current=new Set;const we=(Oe==null?void 0:Oe.selectable)??!0;for(const ct of D.current){const ye=Ie.get(ct);if(ye)for(const{edgeId:je}of ye.values()){const qe=Ee.get(je);qe&&(qe.selectable??we)&&I.current.add(je)}}if(!UR(jt,D.current)){const ct=hd(pe,D.current,!0);ze(ct)}if(!UR(mt,I.current)){const ct=hd(Ee,I.current);He(ct)}b.setState({userSelectionRect:$t,userSelectionActive:!0,nodesSelectionActive:!1})}function G(){if(!s||!M.current)return;const[X,oe]=c7(q.current,M.current,E);N({x:X,y:oe}).then(le=>{if(!U.current||!le){v.current=requestAnimationFrame(G);return}const{x:_e,y:pe}=q.current;F(_e,pe),v.current=requestAnimationFrame(G)})}const V=()=>{cancelAnimationFrame(v.current),v.current=0,W.current=!1};A.useEffect(()=>()=>V(),[]);const ee=X=>{const{userSelectionRect:oe,transform:le,resetSelectedElements:_e}=b.getState();if(!M.current||!oe)return;const{x:pe,y:Ee}=ao(X.nativeEvent,M.current);q.current={x:pe,y:Ee};const Ie=hh({x:oe.startX,y:oe.startY},le);if(!U.current){const ze=n?0:i;if(Math.hypot(pe-Ie.x,Ee-Ie.y)<=ze)return;_e(),o==null||o(X)}U.current=!0,W.current||(G(),W.current=!0),F(pe,Ee)},ce=X=>{var oe,le;if(!T){X.target===j.current&&b.getState().connection.inProgress&&(P.current=!0);return}X.button===0&&((le=(oe=X.target)==null?void 0:oe.releasePointerCapture)==null||le.call(oe,X.pointerId),!w&&X.target===j.current&&b.getState().userSelectionRect&&(H==null||H(X)),b.setState({userSelectionActive:!1,userSelectionRect:null}),U.current&&(l==null||l(X),b.setState({nodesSelectionActive:D.current.size>0})),V())},ae=X=>{var oe,le;(le=(oe=X.target)==null?void 0:oe.releasePointerCapture)==null||le.call(oe,X.pointerId),V()},se=r===!0||Array.isArray(r)&&r.includes(0);return f.jsxs("div",{className:cs(["react-flow__pane",{draggable:se,dragging:C,selection:e}]),onClick:T?void 0:v4(H,j),onContextMenu:v4(Y,j),onWheel:v4(te,j),onPointerEnter:T?void 0:p,onPointerMove:T?ee:m,onPointerUp:ce,onPointerCancel:T?ae:void 0,onPointerDownCapture:T?L:void 0,onClickCapture:T?$:void 0,onPointerLeave:x,ref:j,style:Oy,children:[k,f.jsx(EIn,{})]})}function nk({id:e,store:n,unselect:t=!1,nodeRef:r}){const{addSelectedNodes:s,unselectNodesAndEdges:i,multiSelectionActive:a,nodeLookup:o,onError:l}=n.getState(),u=o.get(e);if(!u){l==null||l("012",uo.error012(e));return}n.setState({nodesSelectionActive:!1}),u.selected?(t||u.selected&&a)&&(i({nodes:[u],edges:[]}),requestAnimationFrame(()=>{var h;return(h=r==null?void 0:r.current)==null?void 0:h.blur()})):s([e])}function Zq({nodeRef:e,disabled:n=!1,noDragClassName:t,handleSelector:r,nodeId:s,isSelectable:i,nodeClickDistance:a}){const o=Nr(),[l,u]=A.useState(!1),h=A.useRef();return A.useEffect(()=>{h.current=vLn({getStoreItems:()=>o.getState(),onNodeMouseDown:_=>{nk({id:_,store:o,nodeRef:e})},onDragStart:()=>{u(!0)},onDragStop:()=>{u(!1)}})},[]),A.useEffect(()=>{if(!(n||!e.current||!h.current))return h.current.update({noDragClassName:t,handleSelector:r,domNode:e.current,isSelectable:i,nodeId:s,nodeClickDistance:a}),()=>{var _;(_=h.current)==null||_.destroy()}},[t,r,n,i,e,s,a]),l}const jIn=e=>n=>n.selected&&(n.draggable||e&&typeof n.draggable>"u");function Jq(){const e=Nr();return A.useCallback(t=>{const{nodeExtent:r,snapToGrid:s,snapGrid:i,nodesDraggable:a,onError:o,updateNodePositions:l,nodeLookup:u,nodeOrigin:h}=e.getState(),_=new Map,p=jIn(a),m=s?i[0]:5,x=s?i[1]:5,k=t.direction.x*m*t.factor,v=t.direction.y*x*t.factor;for(const[,b]of u){if(!p(b))continue;let w={x:b.internals.positionAbsolute.x+k,y:b.internals.positionAbsolute.y+v};s&&(w=jm(w,i));const{position:y,positionAbsolute:C}=bq({nodeId:b.id,nextPosition:w,nodeLookup:u,nodeExtent:r,nodeOrigin:h,onError:o});b.position=y,b.internals.positionAbsolute=C,_.set(b.id,b)}l(_)},[])}const v7=A.createContext(null),TIn=v7.Provider;v7.Consumer;const eU=()=>A.useContext(v7),AIn=e=>({connectOnClick:e.connectOnClick,noPanClassName:e.noPanClassName,rfId:e.rfId}),tU=A.createContext(null);function RIn({children:e}){const n=zn(AIn,Cr);return f.jsx(tU.Provider,{value:n,children:e})}function MIn(){const e=A.useContext(tU);if(!e)throw new Error("useHandleConfig must be used within a HandleConfigProvider");return e}const OIn={connectingFrom:!1,connectingTo:!1,clickConnecting:!1,isPossibleEndHandle:!0,connectionInProcess:!1,clickConnectionInProcess:!1,valid:!1},DIn=(e,n,t)=>r=>{const{connectionClickStartHandle:s,connectionMode:i,connection:a}=r,{fromHandle:o,toHandle:l,isValid:u}=a;if(!o&&!s)return OIn;const h=(l==null?void 0:l.nodeId)===e&&(l==null?void 0:l.id)===n&&(l==null?void 0:l.type)===t;return{connectingFrom:(o==null?void 0:o.nodeId)===e&&(o==null?void 0:o.id)===n&&(o==null?void 0:o.type)===t,connectingTo:h,clickConnecting:(s==null?void 0:s.nodeId)===e&&(s==null?void 0:s.id)===n&&(s==null?void 0:s.type)===t,isPossibleEndHandle:i===fh.Strict?(o==null?void 0:o.type)!==t:e!==(o==null?void 0:o.nodeId)||n!==(o==null?void 0:o.id),connectionInProcess:!!o,clickConnectionInProcess:!!s,valid:h&&u}};function LIn({type:e="source",position:n=zt.Top,isValidConnection:t,isConnectable:r=!0,isConnectableStart:s=!0,isConnectableEnd:i=!0,id:a,onConnect:o,children:l,className:u,onMouseDown:h,onTouchStart:_,...p},m){var W,H;const x=a||null,k=e==="target",v=Nr(),b=eU(),{connectOnClick:w,noPanClassName:y,rfId:C}=MIn(),{connectingFrom:N,connectingTo:E,clickConnecting:T,isPossibleEndHandle:j,connectionInProcess:M,clickConnectionInProcess:D,valid:I}=zn(DIn(b,x,e),Cr);b||(H=(W=v.getState()).onError)==null||H.call(W,"010",uo.error010());const P=Y=>{const{defaultEdgeOptions:te,onConnect:$,hasDefaultEdges:L}=v.getState(),F={...te,...Y};if(L){const{edges:G,setEdges:V,onError:ee}=v.getState();V(dIn(F,G,{onError:ee}))}$==null||$(F),o==null||o(F)},U=Y=>{if(!b)return;const te=zq(Y.nativeEvent);if(s&&(te&&Y.button===0||!te)){const $=v.getState();tk.onPointerDown(Y.nativeEvent,{handleDomNode:Y.currentTarget,autoPanOnConnect:$.autoPanOnConnect,connectionMode:$.connectionMode,connectionRadius:$.connectionRadius,domNode:$.domNode,nodeLookup:$.nodeLookup,lib:$.lib,isTarget:k,handleId:x,nodeId:b,flowId:$.rfId,panBy:$.panBy,cancelConnection:$.cancelConnection,onConnectStart:$.onConnectStart,onConnectEnd:(...L)=>{var F,G;return(G=(F=v.getState()).onConnectEnd)==null?void 0:G.call(F,...L)},updateConnection:$.updateConnection,onConnect:P,isValidConnection:t||((...L)=>{var F,G;return((G=(F=v.getState()).isValidConnection)==null?void 0:G.call(F,...L))??!0}),getTransform:()=>v.getState().transform,getFromHandle:()=>v.getState().connection.fromHandle,autoPanSpeed:$.autoPanSpeed,dragThreshold:$.connectionDragThreshold})}te?h==null||h(Y):_==null||_(Y)},q=Y=>{const{onClickConnectStart:te,onClickConnectEnd:$,connectionClickStartHandle:L,connectionMode:F,isValidConnection:G,lib:V,rfId:ee,nodeLookup:ce,connection:ae}=v.getState();if(!b||!L&&!s)return;if(!L){te==null||te(Y.nativeEvent,{nodeId:b,handleId:x,handleType:e}),v.setState({connectionClickStartHandle:{nodeId:b,type:e,id:x}});return}const se=Eq(Y.target),X=t||G,{connection:oe,isValid:le}=tk.isValid(Y.nativeEvent,{handle:{nodeId:b,id:x,type:e},connectionMode:F,fromNodeId:L.nodeId,fromHandleId:L.id||null,fromType:L.type,isValidConnection:X,flowId:ee,doc:se,lib:V,nodeLookup:ce});le&&oe&&P(oe);const _e=structuredClone(ae);delete _e.inProgress,_e.toPosition=_e.toHandle?_e.toHandle.position:null,$==null||$(Y,_e),v.setState({connectionClickStartHandle:null})};return f.jsx("div",{"data-handleid":x,"data-nodeid":b,"data-handlepos":n,"data-id":`${C}-${b}-${x}-${e}`,className:cs(["react-flow__handle",`react-flow__handle-${n}`,"nodrag",y,u,{source:!k,target:k,connectable:r,connectablestart:s,connectableend:i,clickconnecting:T,connectingfrom:N,connectingto:E,valid:I,connectionindicator:r&&(!M||j)&&(M||D?i:s)}]),onMouseDown:U,onTouchStart:U,onClick:w?q:void 0,ref:m,...p,children:l})}const Nu=A.memo(Xq(LIn));function IIn({data:e,isConnectable:n,sourcePosition:t=zt.Bottom}){return f.jsxs(f.Fragment,{children:[e==null?void 0:e.label,f.jsx(Nu,{type:"source",position:t,isConnectable:n})]})}function $In({data:e,isConnectable:n,targetPosition:t=zt.Top,sourcePosition:r=zt.Bottom}){return f.jsxs(f.Fragment,{children:[f.jsx(Nu,{type:"target",position:t,isConnectable:n}),e==null?void 0:e.label,f.jsx(Nu,{type:"source",position:r,isConnectable:n})]})}function BIn(){return null}function PIn({data:e,isConnectable:n,targetPosition:t=zt.Top}){return f.jsxs(f.Fragment,{children:[f.jsx(Nu,{type:"target",position:t,isConnectable:n}),e==null?void 0:e.label]})}const lb={ArrowUp:{x:0,y:-1},ArrowDown:{x:0,y:1},ArrowLeft:{x:-1,y:0},ArrowRight:{x:1,y:0}},gM={input:IIn,default:$In,output:PIn,group:BIn};function FIn(e){var n,t,r,s;return e.internals.handleBounds===void 0?{width:e.width??e.initialWidth??((n=e.style)==null?void 0:n.width),height:e.height??e.initialHeight??((t=e.style)==null?void 0:t.height)}:{width:e.width??((r=e.style)==null?void 0:r.width),height:e.height??((s=e.style)==null?void 0:s.height)}}const HIn=e=>{const{width:n,height:t,x:r,y:s}=zm(e.nodeLookup,{filter:i=>!!i.selected});return{width:io(n)?n:null,height:io(t)?t:null,userSelectionActive:e.userSelectionActive,transformString:`translate(${e.transform[0]}px,${e.transform[1]}px) scale(${e.transform[2]}) translate(${r}px,${s}px)`}};function qIn({onSelectionContextMenu:e,noPanClassName:n,disableKeyboardA11y:t}){const r=Nr(),{width:s,height:i,transformString:a,userSelectionActive:o}=zn(HIn,Cr),l=Jq(),u=A.useRef(null);A.useEffect(()=>{var m;t||(m=u.current)==null||m.focus({preventScroll:!0})},[t]);const h=!o&&s!==null&&i!==null;if(Zq({nodeRef:u,disabled:!h}),!h)return null;const _=e?m=>{const x=r.getState().nodes.filter(k=>k.selected);e(m,x)}:void 0,p=m=>{Object.prototype.hasOwnProperty.call(lb,m.key)&&(m.preventDefault(),l({direction:lb[m.key],factor:m.shiftKey?4:1}))};return f.jsx("div",{className:cs(["react-flow__nodesselection","react-flow__container",n]),style:{transform:a},children:f.jsx("div",{ref:u,className:"react-flow__nodesselection-rect",onContextMenu:_,tabIndex:t?void 0:-1,onKeyDown:t?void 0:p,style:{width:s,height:i}})})}const vM=typeof window<"u"?window:void 0,UIn=e=>({nodesSelectionActive:e.nodesSelectionActive,userSelectionActive:e.userSelectionActive});function nU({children:e,onPaneClick:n,onPaneMouseEnter:t,onPaneMouseMove:r,onPaneMouseLeave:s,onPaneContextMenu:i,onPaneScroll:a,paneClickDistance:o,deleteKeyCode:l,selectionKeyCode:u,selectionOnDrag:h,selectionMode:_,onSelectionStart:p,onSelectionEnd:m,multiSelectionKeyCode:x,panActivationKeyCode:k,zoomActivationKeyCode:v,elementsSelectable:b,zoomOnScroll:w,zoomOnPinch:y,panOnScroll:C,panOnScrollSpeed:N,panOnScrollMode:E,zoomOnDoubleClick:T,panOnDrag:j,autoPanOnSelection:M,defaultViewport:D,translateExtent:I,minZoom:P,maxZoom:U,preventScrolling:q,onSelectionContextMenu:W,noWheelClassName:H,noPanClassName:Y,disableKeyboardA11y:te,onViewportChange:$,isControlledViewport:L}){const{nodesSelectionActive:F,userSelectionActive:G}=zn(UIn,Cr),V=G0(u,{target:vM}),ee=G0(k,{target:vM}),ce=ee||j,ae=ee||C,se=h&&ce!==!0,X=V||G||se;return xIn({deleteKeyCode:l,multiSelectionKeyCode:x}),f.jsx(SIn,{onPaneContextMenu:i,elementsSelectable:b,zoomOnScroll:w,zoomOnPinch:y,panOnScroll:ae,panOnScrollSpeed:N,panOnScrollMode:E,zoomOnDoubleClick:T,panOnDrag:!V&&ce,defaultViewport:D,translateExtent:I,minZoom:P,maxZoom:U,zoomActivationKeyCode:v,preventScrolling:q,noWheelClassName:H,noPanClassName:Y,onViewportChange:$,isControlledViewport:L,paneClickDistance:o,selectionOnDrag:se,children:f.jsxs(zIn,{onSelectionStart:p,onSelectionEnd:m,onPaneClick:n,onPaneMouseEnter:t,onPaneMouseMove:r,onPaneMouseLeave:s,onPaneContextMenu:i,onPaneScroll:a,panOnDrag:ce,autoPanOnSelection:M,isSelecting:!!X,selectionMode:_,selectionKeyPressed:V,paneClickDistance:o,selectionOnDrag:se,children:[e,F&&f.jsx(qIn,{onSelectionContextMenu:W,noPanClassName:Y,disableKeyboardA11y:te})]})})}nU.displayName="FlowRenderer";const GIn=A.memo(nU),VIn=e=>n=>e?l7(n.nodeLookup,{x:0,y:0,width:n.width,height:n.height},n.transform,!0).map(t=>t.id):Array.from(n.nodeLookup.keys());function KIn(e){return zn(A.useCallback(VIn(e),[e]),Cr)}const WIn=e=>e.updateNodeInternals;function QIn(){const e=zn(WIn),[n]=A.useState(()=>typeof ResizeObserver>"u"?null:new ResizeObserver(t=>{const r=new Map;t.forEach(s=>{const i=s.target.getAttribute("data-id");r.set(i,{id:i,nodeElement:s.target,force:!0})}),e(r)}));return A.useEffect(()=>()=>{n==null||n.disconnect()},[n]),n}function XIn({node:e,nodeType:n,hasDimensions:t,resizeObserver:r}){const s=Nr(),i=A.useRef(null),a=A.useRef(null),o=A.useRef(e.sourcePosition),l=A.useRef(e.targetPosition),u=A.useRef(n),h=t&&!!e.internals.handleBounds;return A.useEffect(()=>{i.current&&!e.hidden&&(!h||a.current!==i.current)&&(a.current&&(r==null||r.unobserve(a.current)),r==null||r.observe(i.current),a.current=i.current)},[h,e.hidden]),A.useEffect(()=>()=>{a.current&&(r==null||r.unobserve(a.current),a.current=null)},[]),A.useEffect(()=>{if(i.current){const _=u.current!==n,p=o.current!==e.sourcePosition,m=l.current!==e.targetPosition;(_||p||m)&&(u.current=n,o.current=e.sourcePosition,l.current=e.targetPosition,s.getState().updateNodeInternals(new Map([[e.id,{id:e.id,nodeElement:i.current,force:!0}]])))}},[e.id,n,e.sourcePosition,e.targetPosition]),i}function YIn({id:e,onClick:n,onMouseEnter:t,onMouseMove:r,onMouseLeave:s,onContextMenu:i,onDoubleClick:a,nodesDraggable:o,elementsSelectable:l,nodesConnectable:u,nodesFocusable:h,resizeObserver:_,noDragClassName:p,noPanClassName:m,disableKeyboardA11y:x,rfId:k,nodeTypes:v,nodeClickDistance:b,onError:w}){const{node:y,internals:C,isParent:N}=zn(X=>{const oe=X.nodeLookup.get(e),le=X.parentLookup.has(e);return{node:oe,internals:oe.internals,isParent:le}},Cr);let E=y.type||"default",T=(v==null?void 0:v[E])||gM[E];T===void 0&&(w==null||w("003",uo.error003(E)),E="default",T=(v==null?void 0:v.default)||gM.default);const j=!!(y.draggable||o&&typeof y.draggable>"u"),M=!!(y.selectable||l&&typeof y.selectable>"u"),D=!!(y.connectable||u&&typeof y.connectable>"u"),I=!!(y.focusable||h&&typeof y.focusable>"u"),P=Nr(),U=Sq(y),q=XIn({node:y,nodeType:E,hasDimensions:U,resizeObserver:_}),W=Zq({nodeRef:q,disabled:y.hidden||!j,noDragClassName:p,handleSelector:y.dragHandle,nodeId:e,isSelectable:M,nodeClickDistance:b}),H=Jq();if(y.hidden)return null;const Y=uc(y),te=FIn(y),$=M||j||n||t||r||s,L=t?X=>t(X,{...C.userNode}):void 0,F=r?X=>r(X,{...C.userNode}):void 0,G=s?X=>s(X,{...C.userNode}):void 0,V=i?X=>i(X,{...C.userNode}):void 0,ee=a?X=>a(X,{...C.userNode}):void 0,ce=X=>{const{selectNodesOnDrag:oe,nodeDragThreshold:le}=P.getState();M&&(!oe||!j||le>0)&&nk({id:e,store:P,nodeRef:q}),n&&n(X,{...C.userNode})},ae=X=>{if(!(Nq(X.nativeEvent)||x)){if(hq.includes(X.key)&&M){const oe=X.key==="Escape";nk({id:e,store:P,unselect:oe,nodeRef:q})}else if(j&&y.selected&&Object.prototype.hasOwnProperty.call(lb,X.key)){X.preventDefault();const{ariaLabelConfig:oe}=P.getState();P.setState({ariaLiveMessage:oe["node.a11yDescription.ariaLiveMessage"]({direction:X.key.replace("Arrow","").toLowerCase(),x:~~C.positionAbsolute.x,y:~~C.positionAbsolute.y})}),H({direction:lb[X.key],factor:X.shiftKey?4:1})}}},se=()=>{var Ie;if(x||!((Ie=q.current)!=null&&Ie.matches(":focus-visible")))return;const{transform:X,width:oe,height:le,autoPanOnNodeFocus:_e,setCenter:pe}=P.getState();if(!_e)return;l7(new Map([[e,y]]),{x:0,y:0,width:oe,height:le},X,!0).length>0||pe(y.position.x+Y.width/2,y.position.y+Y.height/2,{zoom:X[2]})};return f.jsx("div",{className:cs(["react-flow__node",`react-flow__node-${E}`,{[m]:j},y.className,{selected:y.selected,selectable:M,parent:N,draggable:j,dragging:W}]),ref:q,style:{zIndex:C.z,transform:`translate(${C.positionAbsolute.x}px,${C.positionAbsolute.y}px)`,pointerEvents:$?"all":"none",visibility:U?"visible":"hidden",...y.style,...te},"data-id":e,"data-testid":`rf__node-${e}`,onMouseEnter:L,onMouseMove:F,onMouseLeave:G,onContextMenu:V,onClick:ce,onDoubleClick:ee,onKeyDown:I?ae:void 0,tabIndex:I?0:void 0,onFocus:I?se:void 0,role:y.ariaRole??(I?"group":void 0),"aria-roledescription":"node","aria-describedby":x?void 0:`${Vq}-${k}`,"aria-label":y.ariaLabel,...y.domAttributes,children:f.jsx(TIn,{value:e,children:f.jsx(T,{id:e,data:y.data,type:E,positionAbsoluteX:C.positionAbsolute.x,positionAbsoluteY:C.positionAbsolute.y,selected:y.selected??!1,selectable:M,draggable:j,deletable:y.deletable??!0,isConnectable:D,sourcePosition:y.sourcePosition,targetPosition:y.targetPosition,dragging:W,dragHandle:y.dragHandle,zIndex:C.z,parentId:y.parentId,...Y})})})}var ZIn=A.memo(YIn);const JIn=e=>({nodesDraggable:e.nodesDraggable,nodesConnectable:e.nodesConnectable,nodesFocusable:e.nodesFocusable,elementsSelectable:e.elementsSelectable,onError:e.onError});function rU(e){const{nodesDraggable:n,nodesConnectable:t,nodesFocusable:r,elementsSelectable:s,onError:i}=zn(JIn,Cr),a=KIn(e.onlyRenderVisibleElements),o=QIn();return f.jsx("div",{className:"react-flow__nodes",style:Oy,children:a.map(l=>f.jsx(ZIn,{id:l,nodeTypes:e.nodeTypes,nodeExtent:e.nodeExtent,onClick:e.onNodeClick,onMouseEnter:e.onNodeMouseEnter,onMouseMove:e.onNodeMouseMove,onMouseLeave:e.onNodeMouseLeave,onContextMenu:e.onNodeContextMenu,onDoubleClick:e.onNodeDoubleClick,noDragClassName:e.noDragClassName,noPanClassName:e.noPanClassName,rfId:e.rfId,disableKeyboardA11y:e.disableKeyboardA11y,resizeObserver:o,nodesDraggable:n,nodesConnectable:t,nodesFocusable:r,elementsSelectable:s,nodeClickDistance:e.nodeClickDistance,onError:i},l))})}rU.displayName="NodeRenderer";const e$n=A.memo(rU);function t$n(e){return zn(A.useCallback(t=>{if(!e)return t.edges.map(s=>s.id);const r=[];if(t.width&&t.height)for(const s of t.edges){const i=t.nodeLookup.get(s.source),a=t.nodeLookup.get(s.target);i&&a&&JDn({sourceNode:i,targetNode:a,width:t.width,height:t.height,transform:t.transform})&&r.push(s.id)}return r},[e]),Cr)}const n$n=({color:e="none",strokeWidth:n=1})=>{const t={strokeWidth:n,...e&&{stroke:e}};return f.jsx("polyline",{className:"arrow",style:t,strokeLinecap:"round",fill:"none",strokeLinejoin:"round",points:"-5,-4 0,0 -5,4"})},r$n=({color:e="none",strokeWidth:n=1})=>{const t={strokeWidth:n,...e&&{stroke:e,fill:e}};return f.jsx("polyline",{className:"arrowclosed",style:t,strokeLinecap:"round",strokeLinejoin:"round",points:"-5,-4 0,0 -5,4 -5,-4"})},bM={[ib.Arrow]:n$n,[ib.ArrowClosed]:r$n};function s$n(e){const n=Nr();return A.useMemo(()=>{var s,i;return Object.prototype.hasOwnProperty.call(bM,e)?bM[e]:((i=(s=n.getState()).onError)==null||i.call(s,"009",uo.error009(e)),null)},[e])}const i$n=({id:e,type:n,color:t,width:r=12.5,height:s=12.5,markerUnits:i="strokeWidth",strokeWidth:a,orient:o="auto-start-reverse"})=>{const l=s$n(n);return l?f.jsx("marker",{className:"react-flow__arrowhead",id:e,markerWidth:`${r}`,markerHeight:`${s}`,viewBox:"-10 -10 20 20",markerUnits:i,orient:o,refX:"0",refY:"0",children:f.jsx(l,{color:t,strokeWidth:a})}):null},sU=({defaultColor:e,rfId:n})=>{const t=zn(i=>i.edges),r=zn(i=>i.defaultEdgeOptions),s=A.useMemo(()=>oLn(t,{id:n,defaultColor:e,defaultMarkerStart:r==null?void 0:r.markerStart,defaultMarkerEnd:r==null?void 0:r.markerEnd}),[t,r,n,e]);return s.length?f.jsx("svg",{className:"react-flow__marker","aria-hidden":"true",children:f.jsx("defs",{children:s.map(i=>f.jsx(i$n,{id:i.id,type:i.type,color:i.color,width:i.width,height:i.height,markerUnits:i.markerUnits,strokeWidth:i.strokeWidth,orient:i.orient},i.id))})}):null};sU.displayName="MarkerDefinitions";var a$n=A.memo(sU);function iU({x:e,y:n,label:t,labelStyle:r,labelShowBg:s=!0,labelBgStyle:i,labelBgPadding:a=[2,4],labelBgBorderRadius:o=2,children:l,className:u,...h}){const[_,p]=A.useState({x:1,y:0,width:0,height:0}),m=cs(["react-flow__edge-textwrapper",u]),x=A.useRef(null);return A.useEffect(()=>{if(x.current){const k=x.current.getBBox();p({x:k.x,y:k.y,width:k.width,height:k.height})}},[t]),t?f.jsxs("g",{transform:`translate(${e-_.width/2} ${n-_.height/2})`,className:m,visibility:_.width?"visible":"hidden",...h,children:[s&&f.jsx("rect",{width:_.width+2*a[0],x:-a[0],y:-a[1],height:_.height+2*a[1],className:"react-flow__edge-textbg",style:i,rx:o,ry:o}),f.jsx("text",{className:"react-flow__edge-text",y:_.height/2,dy:"0.3em",ref:x,style:r,children:t}),l]}):null}iU.displayName="EdgeText";const o$n=A.memo(iU);function Dy({path:e,labelX:n,labelY:t,label:r,labelStyle:s,labelShowBg:i,labelBgStyle:a,labelBgPadding:o,labelBgBorderRadius:l,interactionWidth:u=20,...h}){return f.jsxs(f.Fragment,{children:[f.jsx("path",{...h,d:e,fill:"none",className:cs(["react-flow__edge-path",h.className])}),u?f.jsx("path",{d:e,fill:"none",strokeOpacity:0,strokeWidth:u,className:"react-flow__edge-interaction"}):null,r&&io(n)&&io(t)?f.jsx(o$n,{x:n,y:t,label:r,labelStyle:s,labelShowBg:i,labelBgStyle:a,labelBgPadding:o,labelBgBorderRadius:l}):null]})}function yM({pos:e,x1:n,y1:t,x2:r,y2:s}){return e===zt.Left||e===zt.Right?[.5*(n+r),t]:[n,.5*(t+s)]}function aU({sourceX:e,sourceY:n,sourcePosition:t=zt.Bottom,targetX:r,targetY:s,targetPosition:i=zt.Top}){const[a,o]=yM({pos:t,x1:e,y1:n,x2:r,y2:s}),[l,u]=yM({pos:i,x1:r,y1:s,x2:e,y2:n}),[h,_,p,m]=jq({sourceX:e,sourceY:n,targetX:r,targetY:s,sourceControlX:a,sourceControlY:o,targetControlX:l,targetControlY:u});return[`M${e},${n} C${a},${o} ${l},${u} ${r},${s}`,h,_,p,m]}function oU(e){return A.memo(({id:n,sourceX:t,sourceY:r,targetX:s,targetY:i,sourcePosition:a,targetPosition:o,label:l,labelStyle:u,labelShowBg:h,labelBgStyle:_,labelBgPadding:p,labelBgBorderRadius:m,style:x,markerEnd:k,markerStart:v,interactionWidth:b})=>{const[w,y,C]=aU({sourceX:t,sourceY:r,sourcePosition:a,targetX:s,targetY:i,targetPosition:o}),N=e.isInternal?void 0:n;return f.jsx(Dy,{id:N,path:w,labelX:y,labelY:C,label:l,labelStyle:u,labelShowBg:h,labelBgStyle:_,labelBgPadding:p,labelBgBorderRadius:m,style:x,markerEnd:k,markerStart:v,interactionWidth:b})})}const l$n=oU({isInternal:!1}),lU=oU({isInternal:!0});l$n.displayName="SimpleBezierEdge";lU.displayName="SimpleBezierEdgeInternal";function cU(e){return A.memo(({id:n,sourceX:t,sourceY:r,targetX:s,targetY:i,label:a,labelStyle:o,labelShowBg:l,labelBgStyle:u,labelBgPadding:h,labelBgBorderRadius:_,style:p,sourcePosition:m=zt.Bottom,targetPosition:x=zt.Top,markerEnd:k,markerStart:v,pathOptions:b,interactionWidth:w})=>{const[y,C,N]=Z5({sourceX:t,sourceY:r,sourcePosition:m,targetX:s,targetY:i,targetPosition:x,borderRadius:b==null?void 0:b.borderRadius,offset:b==null?void 0:b.offset,stepPosition:b==null?void 0:b.stepPosition}),E=e.isInternal?void 0:n;return f.jsx(Dy,{id:E,path:y,labelX:C,labelY:N,label:a,labelStyle:o,labelShowBg:l,labelBgStyle:u,labelBgPadding:h,labelBgBorderRadius:_,style:p,markerEnd:k,markerStart:v,interactionWidth:w})})}const uU=cU({isInternal:!1}),_U=cU({isInternal:!0});uU.displayName="SmoothStepEdge";_U.displayName="SmoothStepEdgeInternal";function fU(e){return A.memo(({id:n,...t})=>{var s;const r=e.isInternal?void 0:n;return f.jsx(uU,{...t,id:r,pathOptions:A.useMemo(()=>{var i;return{borderRadius:0,offset:(i=t.pathOptions)==null?void 0:i.offset}},[(s=t.pathOptions)==null?void 0:s.offset])})})}const c$n=fU({isInternal:!1}),dU=fU({isInternal:!0});c$n.displayName="StepEdge";dU.displayName="StepEdgeInternal";function hU(e){return A.memo(({id:n,sourceX:t,sourceY:r,targetX:s,targetY:i,label:a,labelStyle:o,labelShowBg:l,labelBgStyle:u,labelBgPadding:h,labelBgBorderRadius:_,style:p,markerEnd:m,markerStart:x,interactionWidth:k})=>{const[v,b,w]=Rq({sourceX:t,sourceY:r,targetX:s,targetY:i}),y=e.isInternal?void 0:n;return f.jsx(Dy,{id:y,path:v,labelX:b,labelY:w,label:a,labelStyle:o,labelShowBg:l,labelBgStyle:u,labelBgPadding:h,labelBgBorderRadius:_,style:p,markerEnd:m,markerStart:x,interactionWidth:k})})}const u$n=hU({isInternal:!1}),pU=hU({isInternal:!0});u$n.displayName="StraightEdge";pU.displayName="StraightEdgeInternal";function mU(e){return A.memo(({id:n,sourceX:t,sourceY:r,targetX:s,targetY:i,sourcePosition:a=zt.Bottom,targetPosition:o=zt.Top,label:l,labelStyle:u,labelShowBg:h,labelBgStyle:_,labelBgPadding:p,labelBgBorderRadius:m,style:x,markerEnd:k,markerStart:v,pathOptions:b,interactionWidth:w})=>{const[y,C,N]=Tq({sourceX:t,sourceY:r,sourcePosition:a,targetX:s,targetY:i,targetPosition:o,curvature:b==null?void 0:b.curvature}),E=e.isInternal?void 0:n;return f.jsx(Dy,{id:E,path:y,labelX:C,labelY:N,label:l,labelStyle:u,labelShowBg:h,labelBgStyle:_,labelBgPadding:p,labelBgBorderRadius:m,style:x,markerEnd:k,markerStart:v,interactionWidth:w})})}const _$n=mU({isInternal:!1}),gU=mU({isInternal:!0});_$n.displayName="BezierEdge";gU.displayName="BezierEdgeInternal";const xM={default:gU,straight:pU,step:dU,smoothstep:_U,simplebezier:lU},wM={sourceX:null,sourceY:null,targetX:null,targetY:null,sourcePosition:null,targetPosition:null,zIndex:void 0},f$n=(e,n,t)=>t===zt.Left?e-n:t===zt.Right?e+n:e,d$n=(e,n,t)=>t===zt.Top?e-n:t===zt.Bottom?e+n:e,kM="react-flow__edgeupdater";function SM({position:e,centerX:n,centerY:t,radius:r=10,onMouseDown:s,onMouseEnter:i,onMouseOut:a,type:o}){return f.jsx("circle",{onMouseDown:s,onMouseEnter:i,onMouseOut:a,className:cs([kM,`${kM}-${o}`]),cx:f$n(n,r,e),cy:d$n(t,r,e),r,stroke:"transparent",fill:"transparent"})}function h$n({isReconnectable:e,reconnectRadius:n,edge:t,sourceX:r,sourceY:s,targetX:i,targetY:a,sourcePosition:o,targetPosition:l,onReconnect:u,onReconnectStart:h,onReconnectEnd:_,setReconnecting:p,setUpdateHover:m}){const x=Nr(),k=(C,N)=>{if(C.button!==0)return;const{autoPanOnConnect:E,domNode:T,connectionMode:j,connectionRadius:M,lib:D,onConnectStart:I,cancelConnection:P,nodeLookup:U,rfId:q,panBy:W,updateConnection:H}=x.getState(),Y=N.type==="target",te=(F,G)=>{p(!1),_==null||_(F,t,N.type,G)},$=F=>u==null?void 0:u(t,F),L=(F,G)=>{p(!0),h==null||h(C,t,N.type),I==null||I(F,G)};tk.onPointerDown(C.nativeEvent,{autoPanOnConnect:E,connectionMode:j,connectionRadius:M,domNode:T,handleId:N.id,nodeId:N.nodeId,nodeLookup:U,isTarget:Y,edgeUpdaterType:N.type,lib:D,flowId:q,cancelConnection:P,panBy:W,isValidConnection:(...F)=>{var G,V;return((V=(G=x.getState()).isValidConnection)==null?void 0:V.call(G,...F))??!0},onConnect:$,onConnectStart:L,onConnectEnd:(...F)=>{var G,V;return(V=(G=x.getState()).onConnectEnd)==null?void 0:V.call(G,...F)},onReconnectEnd:te,updateConnection:H,getTransform:()=>x.getState().transform,getFromHandle:()=>x.getState().connection.fromHandle,dragThreshold:x.getState().connectionDragThreshold,handleDomNode:C.currentTarget})},v=C=>k(C,{nodeId:t.target,id:t.targetHandle??null,type:"target"}),b=C=>k(C,{nodeId:t.source,id:t.sourceHandle??null,type:"source"}),w=()=>m(!0),y=()=>m(!1);return f.jsxs(f.Fragment,{children:[(e===!0||e==="source")&&f.jsx(SM,{position:o,centerX:r,centerY:s,radius:n,onMouseDown:v,onMouseEnter:w,onMouseOut:y,type:"source"}),(e===!0||e==="target")&&f.jsx(SM,{position:l,centerX:i,centerY:a,radius:n,onMouseDown:b,onMouseEnter:w,onMouseOut:y,type:"target"})]})}function p$n({id:e,edgesFocusable:n,edgesReconnectable:t,elementsSelectable:r,onClick:s,onDoubleClick:i,onContextMenu:a,onMouseEnter:o,onMouseMove:l,onMouseLeave:u,reconnectRadius:h,onReconnect:_,onReconnectStart:p,onReconnectEnd:m,rfId:x,edgeTypes:k,noPanClassName:v,onError:b,disableKeyboardA11y:w}){let y=zn(pe=>pe.edgeLookup.get(e));const C=zn(pe=>pe.defaultEdgeOptions);y=C?{...C,...y}:y;let N=y.type||"default",E=(k==null?void 0:k[N])||xM[N];E===void 0&&(b==null||b("011",uo.error011(N)),N="default",E=(k==null?void 0:k.default)||xM.default);const T=!!(y.focusable||n&&typeof y.focusable>"u"),j=typeof _<"u"&&(y.reconnectable||t&&typeof y.reconnectable>"u"),M=!!(y.selectable||r&&typeof y.selectable>"u"),D=A.useRef(null),[I,P]=A.useState(!1),[U,q]=A.useState(!1),W=Nr(),{zIndex:H=y.zIndex,sourceX:Y,sourceY:te,targetX:$,targetY:L,sourcePosition:F,targetPosition:G}=zn(A.useCallback(pe=>{const Ee=pe.nodeLookup.get(y.source),Ie=pe.nodeLookup.get(y.target);if(!Ee||!Ie)return wM;const ze=aLn({id:e,sourceNode:Ee,targetNode:Ie,sourceHandle:y.sourceHandle||null,targetHandle:y.targetHandle||null,connectionMode:pe.connectionMode,onError:b}),He=ZDn({selected:y.selected,zIndex:y.zIndex,sourceNode:Ee,targetNode:Ie,elevateOnSelect:pe.elevateEdgesOnSelect,zIndexMode:pe.zIndexMode});return{...ze||wM,zIndex:He}},[y.source,y.target,y.sourceHandle,y.targetHandle,y.selected,y.zIndex]),Cr),V=A.useMemo(()=>y.markerStart?`url('#${J5(y.markerStart,x)}')`:void 0,[y.markerStart,x]),ee=A.useMemo(()=>y.markerEnd?`url('#${J5(y.markerEnd,x)}')`:void 0,[y.markerEnd,x]);if(y.hidden||Y===null||te===null||$===null||L===null)return null;const ce=pe=>{var He;const{addSelectedEdges:Ee,unselectNodesAndEdges:Ie,multiSelectionActive:ze}=W.getState();M&&(W.setState({nodesSelectionActive:!1}),y.selected&&ze?(Ie({nodes:[],edges:[y]}),(He=D.current)==null||He.blur()):Ee([e])),s&&s(pe,y)},ae=i?pe=>{i(pe,{...y})}:void 0,se=a?pe=>{a(pe,{...y})}:void 0,X=o?pe=>{o(pe,{...y})}:void 0,oe=l?pe=>{l(pe,{...y})}:void 0,le=u?pe=>{u(pe,{...y})}:void 0,_e=pe=>{var Ee;if(!w&&hq.includes(pe.key)&&M){const{unselectNodesAndEdges:Ie,addSelectedEdges:ze}=W.getState();pe.key==="Escape"?((Ee=D.current)==null||Ee.blur(),Ie({edges:[y]})):ze([e])}};return f.jsx("svg",{style:{zIndex:H},children:f.jsxs("g",{className:cs(["react-flow__edge",`react-flow__edge-${N}`,y.className,v,{selected:y.selected,animated:y.animated,inactive:!M&&!s,updating:I,selectable:M}]),onClick:ce,onDoubleClick:ae,onContextMenu:se,onMouseEnter:X,onMouseMove:oe,onMouseLeave:le,onKeyDown:T?_e:void 0,tabIndex:T?0:void 0,role:y.ariaRole??(T?"group":"img"),"aria-roledescription":"edge","data-id":e,"data-testid":`rf__edge-${e}`,"aria-label":y.ariaLabel===null?void 0:y.ariaLabel||`Edge from ${y.source} to ${y.target}`,"aria-describedby":T?`${Kq}-${x}`:void 0,ref:D,...y.domAttributes,children:[!U&&f.jsx(E,{id:e,source:y.source,target:y.target,type:y.type,selected:y.selected,animated:y.animated,selectable:M,deletable:y.deletable??!0,label:y.label,labelStyle:y.labelStyle,labelShowBg:y.labelShowBg,labelBgStyle:y.labelBgStyle,labelBgPadding:y.labelBgPadding,labelBgBorderRadius:y.labelBgBorderRadius,sourceX:Y,sourceY:te,targetX:$,targetY:L,sourcePosition:F,targetPosition:G,data:y.data,style:y.style,sourceHandleId:y.sourceHandle,targetHandleId:y.targetHandle,markerStart:V,markerEnd:ee,pathOptions:"pathOptions"in y?y.pathOptions:void 0,interactionWidth:y.interactionWidth}),j&&f.jsx(h$n,{edge:y,isReconnectable:j,reconnectRadius:h,onReconnect:_,onReconnectStart:p,onReconnectEnd:m,sourceX:Y,sourceY:te,targetX:$,targetY:L,sourcePosition:F,targetPosition:G,setUpdateHover:P,setReconnecting:q})]})})}var m$n=A.memo(p$n);const g$n=e=>({edgesFocusable:e.edgesFocusable,edgesReconnectable:e.edgesReconnectable,elementsSelectable:e.elementsSelectable,connectionMode:e.connectionMode,onError:e.onError});function vU({defaultMarkerColor:e,onlyRenderVisibleElements:n,rfId:t,edgeTypes:r,noPanClassName:s,onReconnect:i,onEdgeContextMenu:a,onEdgeMouseEnter:o,onEdgeMouseMove:l,onEdgeMouseLeave:u,onEdgeClick:h,reconnectRadius:_,onEdgeDoubleClick:p,onReconnectStart:m,onReconnectEnd:x,disableKeyboardA11y:k}){const{edgesFocusable:v,edgesReconnectable:b,elementsSelectable:w,onError:y}=zn(g$n,Cr),C=t$n(n);return f.jsxs("div",{className:"react-flow__edges",children:[f.jsx(a$n,{defaultColor:e,rfId:t}),C.map(N=>f.jsx(m$n,{id:N,edgesFocusable:v,edgesReconnectable:b,elementsSelectable:w,noPanClassName:s,onReconnect:i,onContextMenu:a,onMouseEnter:o,onMouseMove:l,onMouseLeave:u,onClick:h,reconnectRadius:_,onDoubleClick:p,onReconnectStart:m,onReconnectEnd:x,rfId:t,onError:y,edgeTypes:r,disableKeyboardA11y:k},N))]})}vU.displayName="EdgeRenderer";const v$n=A.memo(vU),b$n=e=>`translate(${e.transform[0]}px,${e.transform[1]}px) scale(${e.transform[2]})`;function y$n({children:e}){const n=zn(b$n);return f.jsx("div",{className:"react-flow__viewport xyflow__viewport react-flow__container",style:{transform:n},children:e})}function x$n(e){const n=g7(),t=A.useRef(!1);A.useEffect(()=>{!t.current&&n.viewportInitialized&&e&&(setTimeout(()=>e(n),1),t.current=!0)},[e,n.viewportInitialized])}const w$n=e=>{var n;return(n=e.panZoom)==null?void 0:n.syncViewport};function k$n(e){const n=zn(w$n),t=Nr();return A.useEffect(()=>{e&&(n==null||n(e),t.setState({transform:[e.x,e.y,e.zoom]}))},[e,n]),null}function S$n(e){return e.connection.inProgress?{...e.connection,to:Tm(e.connection.to,e.transform)}:{...e.connection}}function C$n(e){return S$n}function E$n(e){const n=C$n();return zn(n,Cr)}const N$n=e=>({nodesConnectable:e.nodesConnectable,isValid:e.connection.isValid,inProgress:e.connection.inProgress,width:e.width,height:e.height});function z$n({containerStyle:e,style:n,type:t,component:r}){const{nodesConnectable:s,width:i,height:a,isValid:o,inProgress:l}=zn(N$n,Cr);return!(i&&s&&l)?null:f.jsx("svg",{style:e,width:i,height:a,className:"react-flow__connectionline react-flow__container",children:f.jsx("g",{className:cs(["react-flow__connection",gq(o)]),children:f.jsx(bU,{style:n,type:t,CustomComponent:r,isValid:o})})})}const bU=({style:e,type:n=eu.Bezier,CustomComponent:t,isValid:r})=>{const{inProgress:s,from:i,fromNode:a,fromHandle:o,fromPosition:l,to:u,toNode:h,toHandle:_,toPosition:p,pointer:m}=E$n();if(!s)return;if(t)return f.jsx(t,{connectionLineType:n,connectionLineStyle:e,fromNode:a,fromHandle:o,fromX:i.x,fromY:i.y,toX:u.x,toY:u.y,fromPosition:l,toPosition:p,connectionStatus:gq(r),toNode:h,toHandle:_,pointer:m});let x="";const k={sourceX:i.x,sourceY:i.y,sourcePosition:l,targetX:u.x,targetY:u.y,targetPosition:p};switch(n){case eu.Bezier:[x]=Tq(k);break;case eu.SimpleBezier:[x]=aU(k);break;case eu.Step:[x]=Z5({...k,borderRadius:0});break;case eu.SmoothStep:[x]=Z5(k);break;default:[x]=Rq(k)}return f.jsx("path",{d:x,fill:"none",className:"react-flow__connection-path",style:e})};bU.displayName="ConnectionLine";const j$n={};function CM(e=j$n){A.useRef(e),Nr(),A.useEffect(()=>{},[e])}function T$n(){Nr(),A.useRef(!1),A.useEffect(()=>{},[])}function yU({nodeTypes:e,edgeTypes:n,onInit:t,onNodeClick:r,onEdgeClick:s,onNodeDoubleClick:i,onEdgeDoubleClick:a,onNodeMouseEnter:o,onNodeMouseMove:l,onNodeMouseLeave:u,onNodeContextMenu:h,onSelectionContextMenu:_,onSelectionStart:p,onSelectionEnd:m,connectionLineType:x,connectionLineStyle:k,connectionLineComponent:v,connectionLineContainerStyle:b,selectionKeyCode:w,selectionOnDrag:y,selectionMode:C,multiSelectionKeyCode:N,panActivationKeyCode:E,zoomActivationKeyCode:T,deleteKeyCode:j,onlyRenderVisibleElements:M,elementsSelectable:D,defaultViewport:I,translateExtent:P,minZoom:U,maxZoom:q,preventScrolling:W,defaultMarkerColor:H,zoomOnScroll:Y,zoomOnPinch:te,panOnScroll:$,panOnScrollSpeed:L,panOnScrollMode:F,zoomOnDoubleClick:G,panOnDrag:V,autoPanOnSelection:ee,onPaneClick:ce,onPaneMouseEnter:ae,onPaneMouseMove:se,onPaneMouseLeave:X,onPaneScroll:oe,onPaneContextMenu:le,paneClickDistance:_e,nodeClickDistance:pe,onEdgeContextMenu:Ee,onEdgeMouseEnter:Ie,onEdgeMouseMove:ze,onEdgeMouseLeave:He,reconnectRadius:Oe,onReconnect:Xe,onReconnectStart:_t,onReconnectEnd:Vt,noDragClassName:$t,noWheelClassName:jt,noPanClassName:mt,disableKeyboardA11y:we,nodeExtent:ct,rfId:ye,viewport:je,onViewportChange:qe}){return CM(e),CM(n),T$n(),x$n(t),k$n(je),f.jsx(GIn,{onPaneClick:ce,onPaneMouseEnter:ae,onPaneMouseMove:se,onPaneMouseLeave:X,onPaneContextMenu:le,onPaneScroll:oe,paneClickDistance:_e,deleteKeyCode:j,selectionKeyCode:w,selectionOnDrag:y,selectionMode:C,onSelectionStart:p,onSelectionEnd:m,multiSelectionKeyCode:N,panActivationKeyCode:E,zoomActivationKeyCode:T,elementsSelectable:D,zoomOnScroll:Y,zoomOnPinch:te,zoomOnDoubleClick:G,panOnScroll:$,panOnScrollSpeed:L,panOnScrollMode:F,panOnDrag:V,autoPanOnSelection:ee,defaultViewport:I,translateExtent:P,minZoom:U,maxZoom:q,onSelectionContextMenu:_,preventScrolling:W,noDragClassName:$t,noWheelClassName:jt,noPanClassName:mt,disableKeyboardA11y:we,onViewportChange:qe,isControlledViewport:!!je,children:f.jsxs(y$n,{children:[f.jsx(v$n,{edgeTypes:n,onEdgeClick:s,onEdgeDoubleClick:a,onReconnect:Xe,onReconnectStart:_t,onReconnectEnd:Vt,onlyRenderVisibleElements:M,onEdgeContextMenu:Ee,onEdgeMouseEnter:Ie,onEdgeMouseMove:ze,onEdgeMouseLeave:He,reconnectRadius:Oe,defaultMarkerColor:H,noPanClassName:mt,disableKeyboardA11y:we,rfId:ye}),f.jsx(z$n,{style:k,type:x,component:v,containerStyle:b}),f.jsx("div",{className:"react-flow__edgelabel-renderer"}),f.jsx(e$n,{nodeTypes:e,onNodeClick:r,onNodeDoubleClick:i,onNodeMouseEnter:o,onNodeMouseMove:l,onNodeMouseLeave:u,onNodeContextMenu:h,nodeClickDistance:pe,onlyRenderVisibleElements:M,noPanClassName:mt,noDragClassName:$t,disableKeyboardA11y:we,nodeExtent:ct,rfId:ye}),f.jsx("div",{className:"react-flow__viewport-portal"})]})})}yU.displayName="GraphView";const A$n=A.memo(yU),R$n=kq(),EM=({nodes:e,edges:n,defaultNodes:t,defaultEdges:r,width:s,height:i,fitView:a,fitViewOptions:o,minZoom:l=.5,maxZoom:u=2,nodeOrigin:h,nodeExtent:_,zIndexMode:p="basic"}={})=>{const m=new Map,x=new Map,k=new Map,v=new Map,b=r??n??[],w=t??e??[],y=h??[0,0],C=_??F0;Dq(k,v,b);const{nodesInitialized:N}=ek(w,m,x,{nodeOrigin:y,nodeExtent:C,zIndexMode:p});let E=[0,0,1];if(a&&s&&i){const T=zm(m,{filter:I=>!!((I.width||I.initialWidth)&&(I.height||I.initialHeight))}),{x:j,y:M,zoom:D}=u7(T,s,i,l,u,(o==null?void 0:o.padding)??.1);E=[j,M,D]}return{rfId:"1",width:s??0,height:i??0,transform:E,nodes:w,nodesInitialized:N,nodeLookup:m,parentLookup:x,edges:b,edgeLookup:v,connectionLookup:k,onNodesChange:null,onEdgesChange:null,hasDefaultNodes:t!==void 0,hasDefaultEdges:r!==void 0,panZoom:null,minZoom:l,maxZoom:u,translateExtent:F0,nodeExtent:C,nodesSelectionActive:!1,userSelectionActive:!1,userSelectionRect:null,connectionMode:fh.Strict,domNode:null,paneDragging:!1,noPanClassName:"nopan",nodeOrigin:y,nodeDragThreshold:1,connectionDragThreshold:1,snapGrid:[15,15],snapToGrid:!1,nodesDraggable:!0,nodesConnectable:!0,nodesFocusable:!0,edgesFocusable:!0,edgesReconnectable:!0,elementsSelectable:!0,elevateNodesOnSelect:!0,elevateEdgesOnSelect:!0,selectNodesOnDrag:!0,multiSelectionActive:!1,fitViewQueued:a??!1,fitViewOptions:o,fitViewResolver:null,connection:{...mq},connectionClickStartHandle:null,connectOnClick:!0,ariaLiveMessage:"",autoPanOnConnect:!0,autoPanOnNodeDrag:!0,autoPanOnNodeFocus:!0,autoPanSpeed:15,connectionRadius:20,onError:R$n,isValidConnection:void 0,onSelectionChangeHandlers:[],lib:"react",debug:!1,ariaLabelConfig:pq,zIndexMode:p,onNodesChangeMiddlewareMap:new Map,onEdgesChangeMiddlewareMap:new Map}},M$n=({nodes:e,edges:n,defaultNodes:t,defaultEdges:r,width:s,height:i,fitView:a,fitViewOptions:o,minZoom:l,maxZoom:u,nodeOrigin:h,nodeExtent:_,zIndexMode:p})=>qLn((m,x)=>{async function k(){const{nodeLookup:v,panZoom:b,fitViewOptions:w,fitViewResolver:y,width:C,height:N,minZoom:E,maxZoom:T}=x();b&&(await GDn({nodes:v,width:C,height:N,panZoom:b,minZoom:E,maxZoom:T},w),y==null||y.resolve(!0),m({fitViewResolver:null}))}return{...EM({nodes:e,edges:n,width:s,height:i,fitView:a,fitViewOptions:o,minZoom:l,maxZoom:u,nodeOrigin:h,nodeExtent:_,defaultNodes:t,defaultEdges:r,zIndexMode:p}),setNodes:v=>{const{nodeLookup:b,parentLookup:w,nodeOrigin:y,elevateNodesOnSelect:C,fitViewQueued:N,zIndexMode:E,nodesSelectionActive:T}=x(),{nodesInitialized:j,hasSelectedNodes:M}=ek(v,b,w,{nodeOrigin:y,nodeExtent:_,elevateNodesOnSelect:C,checkEquality:!0,zIndexMode:E}),D=T&&M;N&&j?(k(),m({nodes:v,nodesInitialized:j,fitViewQueued:!1,fitViewOptions:void 0,nodesSelectionActive:D})):m({nodes:v,nodesInitialized:j,nodesSelectionActive:D})},setEdges:v=>{const{connectionLookup:b,edgeLookup:w}=x();Dq(b,w,v),m({edges:v})},setDefaultNodesAndEdges:(v,b)=>{if(v){const{setNodes:w}=x();w(v),m({hasDefaultNodes:!0})}if(b){const{setEdges:w}=x();w(b),m({hasDefaultEdges:!0})}},updateNodeInternals:v=>{const{triggerNodeChanges:b,nodeLookup:w,parentLookup:y,domNode:C,nodeOrigin:N,nodeExtent:E,debug:T,fitViewQueued:j,zIndexMode:M}=x(),{changes:D,updatedInternals:I}=hLn(v,w,y,C,N,E,M);I&&(uLn(w,y,{nodeOrigin:N,nodeExtent:E,zIndexMode:M}),j?(k(),m({fitViewQueued:!1,fitViewOptions:void 0})):m({}),(D==null?void 0:D.length)>0&&(T&&console.log("React Flow: trigger node changes",D),b==null||b(D)))},updateNodePositions:(v,b=!1)=>{const w=[];let y=[];const{nodeLookup:C,triggerNodeChanges:N,connection:E,updateConnection:T,onNodesChangeMiddlewareMap:j}=x();for(const[M,D]of v){const I=C.get(M),P=!!(I!=null&&I.expandParent&&(I!=null&&I.parentId)&&(D!=null&&D.position)),U={id:M,type:"position",position:P?{x:Math.max(0,D.position.x),y:Math.max(0,D.position.y)}:D.position,dragging:b};if(I&&E.inProgress&&E.fromNode.id===I.id){const q=J_(I,E.fromHandle,zt.Left,!0);T({...E,from:q})}P&&I.parentId&&w.push({id:M,parentId:I.parentId,rect:{...D.internals.positionAbsolute,width:D.measured.width??0,height:D.measured.height??0}}),y.push(U)}if(w.length>0){const{parentLookup:M,nodeOrigin:D}=x(),I=m7(w,C,M,D);y.push(...I)}for(const M of j.values())y=M(y);N(y)},triggerNodeChanges:v=>{const{onNodesChange:b,setNodes:w,nodes:y,hasDefaultNodes:C,debug:N}=x();if(v!=null&&v.length){if(C){const E=uIn(v,y);w(E)}N&&console.log("React Flow: trigger node changes",v),b==null||b(v)}},triggerEdgeChanges:v=>{const{onEdgesChange:b,setEdges:w,edges:y,hasDefaultEdges:C,debug:N}=x();if(v!=null&&v.length){if(C){const E=_In(v,y);w(E)}N&&console.log("React Flow: trigger edge changes",v),b==null||b(v)}},addSelectedNodes:v=>{const{multiSelectionActive:b,edgeLookup:w,nodeLookup:y,triggerNodeChanges:C,triggerEdgeChanges:N}=x();if(b){const E=v.map(T=>f_(T,!0));C(E);return}C(hd(y,new Set([...v]),!0)),N(hd(w))},addSelectedEdges:v=>{const{multiSelectionActive:b,edgeLookup:w,nodeLookup:y,triggerNodeChanges:C,triggerEdgeChanges:N}=x();if(b){const E=v.map(T=>f_(T,!0));N(E);return}N(hd(w,new Set([...v]))),C(hd(y,new Set,!0))},unselectNodesAndEdges:({nodes:v,edges:b}={})=>{const{edges:w,nodes:y,nodeLookup:C,triggerNodeChanges:N,triggerEdgeChanges:E}=x(),T=v||y,j=b||w,M=[];for(const I of T){if(!I.selected)continue;const P=C.get(I.id);P&&(P.selected=!1),M.push(f_(I.id,!1))}const D=[];for(const I of j)I.selected&&D.push(f_(I.id,!1));N(M),E(D)},setMinZoom:v=>{const{panZoom:b,maxZoom:w}=x();b==null||b.setScaleExtent([v,w]),m({minZoom:v})},setMaxZoom:v=>{const{panZoom:b,minZoom:w}=x();b==null||b.setScaleExtent([w,v]),m({maxZoom:v})},setTranslateExtent:v=>{var b;(b=x().panZoom)==null||b.setTranslateExtent(v),m({translateExtent:v})},resetSelectedElements:()=>{const{edges:v,nodes:b,triggerNodeChanges:w,triggerEdgeChanges:y,elementsSelectable:C}=x();if(!C)return;const N=b.reduce((T,j)=>j.selected?[...T,f_(j.id,!1)]:T,[]),E=v.reduce((T,j)=>j.selected?[...T,f_(j.id,!1)]:T,[]);w(N),y(E)},setNodeExtent:v=>{const{nodes:b,nodeLookup:w,parentLookup:y,nodeOrigin:C,elevateNodesOnSelect:N,nodeExtent:E,zIndexMode:T}=x();v[0][0]===E[0][0]&&v[0][1]===E[0][1]&&v[1][0]===E[1][0]&&v[1][1]===E[1][1]||(ek(b,w,y,{nodeOrigin:C,nodeExtent:v,elevateNodesOnSelect:N,checkEquality:!1,zIndexMode:T}),m({nodeExtent:v}))},panBy:v=>{const{transform:b,width:w,height:y,panZoom:C,translateExtent:N}=x();return pLn({delta:v,panZoom:C,transform:b,translateExtent:N,width:w,height:y})},setCenter:async(v,b,w)=>{const{width:y,height:C,maxZoom:N,panZoom:E}=x();if(!E)return!1;const T=typeof(w==null?void 0:w.zoom)<"u"?w.zoom:N;return await E.setViewport({x:y/2-v*T,y:C/2-b*T,zoom:T},{duration:w==null?void 0:w.duration,ease:w==null?void 0:w.ease,interpolate:w==null?void 0:w.interpolate}),!0},cancelConnection:()=>{m({connection:{...mq}})},updateConnection:v=>{m({connection:v})},reset:()=>m({...EM()})}},Object.is);function O$n({initialNodes:e,initialEdges:n,defaultNodes:t,defaultEdges:r,initialWidth:s,initialHeight:i,initialMinZoom:a,initialMaxZoom:o,initialFitViewOptions:l,fitView:u,nodeOrigin:h,nodeExtent:_,zIndexMode:p,children:m}){const[x]=A.useState(()=>M$n({nodes:e,edges:n,defaultNodes:t,defaultEdges:r,width:s,height:i,fitView:u,minZoom:a,maxZoom:o,fitViewOptions:l,nodeOrigin:h,nodeExtent:_,zIndexMode:p}));return f.jsx(ULn,{value:x,children:f.jsx(gIn,{children:f.jsx(RIn,{children:m})})})}function D$n({children:e,nodes:n,edges:t,defaultNodes:r,defaultEdges:s,width:i,height:a,fitView:o,fitViewOptions:l,minZoom:u,maxZoom:h,nodeOrigin:_,nodeExtent:p,zIndexMode:m}){return A.useContext(Ry)?f.jsx(f.Fragment,{children:e}):f.jsx(O$n,{initialNodes:n,initialEdges:t,defaultNodes:r,defaultEdges:s,initialWidth:i,initialHeight:a,fitView:o,initialFitViewOptions:l,initialMinZoom:u,initialMaxZoom:h,nodeOrigin:_,nodeExtent:p,zIndexMode:m,children:e})}const L$n={width:"100%",height:"100%",overflow:"hidden",position:"relative",zIndex:0};function I$n({nodes:e,edges:n,defaultNodes:t,defaultEdges:r,className:s,nodeTypes:i,edgeTypes:a,onNodeClick:o,onEdgeClick:l,onInit:u,onMove:h,onMoveStart:_,onMoveEnd:p,onConnect:m,onConnectStart:x,onConnectEnd:k,onClickConnectStart:v,onClickConnectEnd:b,onNodeMouseEnter:w,onNodeMouseMove:y,onNodeMouseLeave:C,onNodeContextMenu:N,onNodeDoubleClick:E,onNodeDragStart:T,onNodeDrag:j,onNodeDragStop:M,onNodesDelete:D,onEdgesDelete:I,onDelete:P,onSelectionChange:U,onSelectionDragStart:q,onSelectionDrag:W,onSelectionDragStop:H,onSelectionContextMenu:Y,onSelectionStart:te,onSelectionEnd:$,onBeforeDelete:L,connectionMode:F,connectionLineType:G=eu.Bezier,connectionLineStyle:V,connectionLineComponent:ee,connectionLineContainerStyle:ce,deleteKeyCode:ae="Backspace",selectionKeyCode:se="Shift",selectionOnDrag:X=!1,selectionMode:oe=H0.Full,panActivationKeyCode:le="Space",multiSelectionKeyCode:_e=U0()?"Meta":"Control",zoomActivationKeyCode:pe=U0()?"Meta":"Control",snapToGrid:Ee,snapGrid:Ie,onlyRenderVisibleElements:ze=!1,selectNodesOnDrag:He,nodesDraggable:Oe,autoPanOnNodeFocus:Xe,nodesConnectable:_t,nodesFocusable:Vt,nodeOrigin:$t=Wq,edgesFocusable:jt,edgesReconnectable:mt,elementsSelectable:we=!0,defaultViewport:ct=rIn,minZoom:ye=.5,maxZoom:je=2,translateExtent:qe=F0,preventScrolling:at=!0,nodeExtent:nt,defaultMarkerColor:Kt="#b1b1b7",zoomOnScroll:Qe=!0,zoomOnPinch:wt=!0,panOnScroll:Tt=!1,panOnScrollSpeed:Yt=.5,panOnScrollMode:tn=$_.Free,zoomOnDoubleClick:rr=!0,panOnDrag:rn=!0,onPaneClick:ln,onPaneMouseEnter:An,onPaneMouseMove:qn,onPaneMouseLeave:Yn,onPaneScroll:fr,onPaneContextMenu:Xr,paneClickDistance:zr=1,nodeClickDistance:kt=0,children:cn,onReconnect:jn,onReconnectStart:fn,onReconnectEnd:Dn,onEdgeContextMenu:pn,onEdgeDoubleClick:Un,onEdgeMouseEnter:Rn,onEdgeMouseMove:yt,onEdgeMouseLeave:Dt,reconnectRadius:Ue=10,onNodesChange:gt,onEdgesChange:ur,noDragClassName:un="nodrag",noWheelClassName:Lt="nowheel",noPanClassName:Kn="nopan",fitView:mr,fitViewOptions:gr,connectOnClick:ho,attributionPosition:Qs,proOptions:Xs,defaultEdgeOptions:xs,elevateNodesOnSelect:Ai=!0,elevateEdgesOnSelect:Ur=!1,disableKeyboardA11y:Ys=!1,autoPanOnConnect:Zs,autoPanOnNodeDrag:sr,autoPanOnSelection:fa=!0,autoPanSpeed:il,connectionRadius:Ut,isValidConnection:us,onError:Dr,style:Ia,id:ot,nodeDragThreshold:Wt,connectionDragThreshold:Ri,viewport:da,onViewportChange:ws,width:Ln,height:hi,colorMode:_c="light",debug:Mi,onScroll:ks,ariaLabelConfig:Oi,zIndexMode:Yr="basic",...vr},Qt){const Is=ot||"1",_s=oIn(_c),Lr=A.useCallback(ir=>{ir.currentTarget.scrollTo({top:0,left:0,behavior:"instant"}),ks==null||ks(ir)},[ks]);return f.jsx("div",{"data-testid":"rf__wrapper",...vr,onScroll:Lr,style:{...Ia,...L$n},ref:Qt,className:cs(["react-flow",s,_s]),id:ot,role:"application",children:f.jsxs(D$n,{nodes:e,edges:n,width:Ln,height:hi,fitView:mr,fitViewOptions:gr,minZoom:ye,maxZoom:je,nodeOrigin:$t,nodeExtent:nt,zIndexMode:Yr,children:[f.jsx(aIn,{nodes:e,edges:n,defaultNodes:t,defaultEdges:r,onConnect:m,onConnectStart:x,onConnectEnd:k,onClickConnectStart:v,onClickConnectEnd:b,nodesDraggable:Oe,autoPanOnNodeFocus:Xe,nodesConnectable:_t,nodesFocusable:Vt,edgesFocusable:jt,edgesReconnectable:mt,elementsSelectable:we,elevateNodesOnSelect:Ai,elevateEdgesOnSelect:Ur,minZoom:ye,maxZoom:je,nodeExtent:nt,onNodesChange:gt,onEdgesChange:ur,snapToGrid:Ee,snapGrid:Ie,connectionMode:F,translateExtent:qe,connectOnClick:ho,defaultEdgeOptions:xs,fitView:mr,fitViewOptions:gr,onNodesDelete:D,onEdgesDelete:I,onDelete:P,onNodeDragStart:T,onNodeDrag:j,onNodeDragStop:M,onSelectionDrag:W,onSelectionDragStart:q,onSelectionDragStop:H,onMove:h,onMoveStart:_,onMoveEnd:p,noPanClassName:Kn,nodeOrigin:$t,rfId:Is,autoPanOnConnect:Zs,autoPanOnNodeDrag:sr,autoPanSpeed:il,onError:Dr,connectionRadius:Ut,isValidConnection:us,selectNodesOnDrag:He,nodeDragThreshold:Wt,connectionDragThreshold:Ri,onBeforeDelete:L,debug:Mi,ariaLabelConfig:Oi,zIndexMode:Yr}),f.jsx(A$n,{onInit:u,onNodeClick:o,onEdgeClick:l,onNodeMouseEnter:w,onNodeMouseMove:y,onNodeMouseLeave:C,onNodeContextMenu:N,onNodeDoubleClick:E,nodeTypes:i,edgeTypes:a,connectionLineType:G,connectionLineStyle:V,connectionLineComponent:ee,connectionLineContainerStyle:ce,selectionKeyCode:se,selectionOnDrag:X,selectionMode:oe,deleteKeyCode:ae,multiSelectionKeyCode:_e,panActivationKeyCode:le,zoomActivationKeyCode:pe,onlyRenderVisibleElements:ze,defaultViewport:ct,translateExtent:qe,minZoom:ye,maxZoom:je,preventScrolling:at,zoomOnScroll:Qe,zoomOnPinch:wt,zoomOnDoubleClick:rr,panOnScroll:Tt,panOnScrollSpeed:Yt,panOnScrollMode:tn,panOnDrag:rn,autoPanOnSelection:fa,onPaneClick:ln,onPaneMouseEnter:An,onPaneMouseMove:qn,onPaneMouseLeave:Yn,onPaneScroll:fr,onPaneContextMenu:Xr,paneClickDistance:zr,nodeClickDistance:kt,onSelectionContextMenu:Y,onSelectionStart:te,onSelectionEnd:$,onReconnect:jn,onReconnectStart:fn,onReconnectEnd:Dn,onEdgeContextMenu:pn,onEdgeDoubleClick:Un,onEdgeMouseEnter:Rn,onEdgeMouseMove:yt,onEdgeMouseLeave:Dt,reconnectRadius:Ue,defaultMarkerColor:Kt,noDragClassName:un,noWheelClassName:Lt,noPanClassName:Kn,rfId:Is,disableKeyboardA11y:Ys,nodeExtent:nt,viewport:da,onViewportChange:ws}),f.jsx(nIn,{onSelectionChange:U}),cn,f.jsx(YLn,{proOptions:Xs,position:Qs}),f.jsx(XLn,{rfId:Is,disableKeyboardA11y:Ys})]})})}var $$n=Xq(I$n);function B$n({dimensions:e,lineWidth:n,variant:t,className:r}){return f.jsx("path",{strokeWidth:n,d:`M${e[0]/2} 0 V${e[1]} M0 ${e[1]/2} H${e[0]}`,className:cs(["react-flow__background-pattern",t,r])})}function P$n({radius:e,className:n}){return f.jsx("circle",{cx:e,cy:e,r:e,className:cs(["react-flow__background-pattern","dots",n])})}var tc;(function(e){e.Lines="lines",e.Dots="dots",e.Cross="cross"})(tc||(tc={}));const F$n={[tc.Dots]:1,[tc.Lines]:1,[tc.Cross]:6},H$n=e=>({transform:e.transform,patternId:`pattern-${e.rfId}`});function xU({id:e,variant:n=tc.Dots,gap:t=20,size:r,lineWidth:s=1,offset:i=0,color:a,bgColor:o,style:l,className:u,patternClassName:h}){const _=A.useRef(null),{transform:p,patternId:m}=zn(H$n,Cr),x=r||F$n[n],k=n===tc.Dots,v=n===tc.Cross,b=Array.isArray(t)?t:[t,t],w=[b[0]*p[2]||1,b[1]*p[2]||1],y=x*p[2],C=Array.isArray(i)?i:[i,i],N=v?[y,y]:w,E=[C[0]*p[2]||1+N[0]/2,C[1]*p[2]||1+N[1]/2],T=`${m}${e||""}`;return f.jsxs("svg",{className:cs(["react-flow__background",u]),style:{...l,...Oy,"--xy-background-color-props":o,"--xy-background-pattern-color-props":a},ref:_,"data-testid":"rf__background",children:[f.jsx("pattern",{id:T,x:p[0]%w[0],y:p[1]%w[1],width:w[0],height:w[1],patternUnits:"userSpaceOnUse",patternTransform:`translate(-${E[0]},-${E[1]})`,children:k?f.jsx(P$n,{radius:y/2,className:h}):f.jsx(B$n,{dimensions:N,lineWidth:s,variant:n,className:h})}),f.jsx("rect",{x:"0",y:"0",width:"100%",height:"100%",fill:`url(#${T})`})]})}xU.displayName="Background";const q$n=A.memo(xU);function U$n(){return f.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 32",children:f.jsx("path",{d:"M32 18.133H18.133V32h-4.266V18.133H0v-4.266h13.867V0h4.266v13.867H32z"})})}function G$n(){return f.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 5",children:f.jsx("path",{d:"M0 0h32v4.2H0z"})})}function V$n(){return f.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 30",children:f.jsx("path",{d:"M3.692 4.63c0-.53.4-.938.939-.938h5.215V0H4.708C2.13 0 0 2.054 0 4.63v5.216h3.692V4.631zM27.354 0h-5.2v3.692h5.17c.53 0 .984.4.984.939v5.215H32V4.631A4.624 4.624 0 0027.354 0zm.954 24.83c0 .532-.4.94-.939.94h-5.215v3.768h5.215c2.577 0 4.631-2.13 4.631-4.707v-5.139h-3.692v5.139zm-23.677.94c-.531 0-.939-.4-.939-.94v-5.138H0v5.139c0 2.577 2.13 4.707 4.708 4.707h5.138V25.77H4.631z"})})}function K$n(){return f.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 25 32",children:f.jsx("path",{d:"M21.333 10.667H19.81V7.619C19.81 3.429 16.38 0 12.19 0 8 0 4.571 3.429 4.571 7.619v3.048H3.048A3.056 3.056 0 000 13.714v15.238A3.056 3.056 0 003.048 32h18.285a3.056 3.056 0 003.048-3.048V13.714a3.056 3.056 0 00-3.048-3.047zM12.19 24.533a3.056 3.056 0 01-3.047-3.047 3.056 3.056 0 013.047-3.048 3.056 3.056 0 013.048 3.048 3.056 3.056 0 01-3.048 3.047zm4.724-13.866H7.467V7.619c0-2.59 2.133-4.724 4.723-4.724 2.591 0 4.724 2.133 4.724 4.724v3.048z"})})}function W$n(){return f.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 25 32",children:f.jsx("path",{d:"M21.333 10.667H19.81V7.619C19.81 3.429 16.38 0 12.19 0c-4.114 1.828-1.37 2.133.305 2.438 1.676.305 4.42 2.59 4.42 5.181v3.048H3.047A3.056 3.056 0 000 13.714v15.238A3.056 3.056 0 003.048 32h18.285a3.056 3.056 0 003.048-3.048V13.714a3.056 3.056 0 00-3.048-3.047zM12.19 24.533a3.056 3.056 0 01-3.047-3.047 3.056 3.056 0 013.047-3.048 3.056 3.056 0 013.048 3.048 3.056 3.056 0 01-3.048 3.047z"})})}function z1({children:e,className:n,...t}){return f.jsx("button",{type:"button",className:cs(["react-flow__controls-button",n]),...t,children:e})}const Q$n=e=>({isInteractive:e.nodesDraggable||e.nodesConnectable||e.elementsSelectable,minZoomReached:e.transform[2]<=e.minZoom,maxZoomReached:e.transform[2]>=e.maxZoom,ariaLabelConfig:e.ariaLabelConfig});function wU({style:e,showZoom:n=!0,showFitView:t=!0,showInteractive:r=!0,fitViewOptions:s,onZoomIn:i,onZoomOut:a,onFitView:o,onInteractiveChange:l,className:u,children:h,position:_="bottom-left",orientation:p="vertical","aria-label":m}){const x=Nr(),{isInteractive:k,minZoomReached:v,maxZoomReached:b,ariaLabelConfig:w}=zn(Q$n,Cr),{zoomIn:y,zoomOut:C,fitView:N}=g7(),E=()=>{y(),i==null||i()},T=()=>{C(),a==null||a()},j=()=>{N(s),o==null||o()},M=()=>{x.setState({nodesDraggable:!k,nodesConnectable:!k,elementsSelectable:!k}),l==null||l(!k)},D=p==="horizontal"?"horizontal":"vertical";return f.jsxs(My,{className:cs(["react-flow__controls",D,u]),position:_,style:e,"data-testid":"rf__controls","aria-label":m??w["controls.ariaLabel"],children:[n&&f.jsxs(f.Fragment,{children:[f.jsx(z1,{onClick:E,className:"react-flow__controls-zoomin",title:w["controls.zoomIn.ariaLabel"],"aria-label":w["controls.zoomIn.ariaLabel"],disabled:b,children:f.jsx(U$n,{})}),f.jsx(z1,{onClick:T,className:"react-flow__controls-zoomout",title:w["controls.zoomOut.ariaLabel"],"aria-label":w["controls.zoomOut.ariaLabel"],disabled:v,children:f.jsx(G$n,{})})]}),t&&f.jsx(z1,{className:"react-flow__controls-fitview",onClick:j,title:w["controls.fitView.ariaLabel"],"aria-label":w["controls.fitView.ariaLabel"],children:f.jsx(V$n,{})}),r&&f.jsx(z1,{className:"react-flow__controls-interactive",onClick:M,title:w["controls.interactive.ariaLabel"],"aria-label":w["controls.interactive.ariaLabel"],children:k?f.jsx(W$n,{}):f.jsx(K$n,{})}),h]})}wU.displayName="Controls";A.memo(wU);function X$n({id:e,x:n,y:t,width:r,height:s,style:i,color:a,strokeColor:o,strokeWidth:l,className:u,borderRadius:h,shapeRendering:_,selected:p,onClick:m}){const{background:x,backgroundColor:k}=i||{},v=a||x||k;return f.jsx("rect",{className:cs(["react-flow__minimap-node",{selected:p},u]),x:n,y:t,rx:h,ry:h,width:r,height:s,style:{fill:v,stroke:o,strokeWidth:l},shapeRendering:_,onClick:m?b=>m(b,e):void 0})}const Y$n=A.memo(X$n),Z$n=e=>e.nodes.map(n=>n.id),b4=e=>e instanceof Function?e:()=>e;function J$n({nodeStrokeColor:e,nodeColor:n,nodeClassName:t="",nodeBorderRadius:r=5,nodeStrokeWidth:s,nodeComponent:i=Y$n,onClick:a}){const o=zn(Z$n,Cr),l=b4(n),u=b4(e),h=b4(t),_=typeof window>"u"||window.chrome?"crispEdges":"geometricPrecision";return f.jsx(f.Fragment,{children:o.map(p=>f.jsx(tBn,{id:p,nodeColorFunc:l,nodeStrokeColorFunc:u,nodeClassNameFunc:h,nodeBorderRadius:r,nodeStrokeWidth:s,NodeComponent:i,onClick:a,shapeRendering:_},p))})}function eBn({id:e,nodeColorFunc:n,nodeStrokeColorFunc:t,nodeClassNameFunc:r,nodeBorderRadius:s,nodeStrokeWidth:i,shapeRendering:a,NodeComponent:o,onClick:l}){const{node:u,x:h,y:_,width:p,height:m}=zn(x=>{const k=x.nodeLookup.get(e);if(!k)return{node:void 0,x:0,y:0,width:0,height:0};const v=k.internals.userNode,{x:b,y:w}=k.internals.positionAbsolute,{width:y,height:C}=uc(v);return{node:v,x:b,y:w,width:y,height:C}},Cr);return!u||u.hidden||!Sq(u)?null:f.jsx(o,{x:h,y:_,width:p,height:m,style:u.style,selected:!!u.selected,className:r(u),color:n(u),borderRadius:s,strokeColor:t(u),strokeWidth:i,shapeRendering:a,onClick:l,id:u.id})}const tBn=A.memo(eBn);var nBn=A.memo(J$n);const rBn=200,sBn=150,iBn=e=>!e.hidden,aBn=e=>{const n={x:-e.transform[0]/e.transform[2],y:-e.transform[1]/e.transform[2],width:e.width/e.transform[2],height:e.height/e.transform[2]};return{viewBB:n,boundingRect:e.nodeLookup.size>0?xq(zm(e.nodeLookup,{filter:iBn}),n):n,rfId:e.rfId,panZoom:e.panZoom,translateExtent:e.translateExtent,flowWidth:e.width,flowHeight:e.height,ariaLabelConfig:e.ariaLabelConfig}},oBn="react-flow__minimap-desc";function kU({style:e,className:n,nodeStrokeColor:t,nodeColor:r,nodeClassName:s="",nodeBorderRadius:i=5,nodeStrokeWidth:a,nodeComponent:o,bgColor:l,maskColor:u,maskStrokeColor:h,maskStrokeWidth:_,position:p="bottom-right",onClick:m,onNodeClick:x,pannable:k=!1,zoomable:v=!1,ariaLabel:b,inversePan:w,zoomStep:y=1,offsetScale:C=5}){const N=Nr(),E=A.useRef(null),{boundingRect:T,viewBB:j,rfId:M,panZoom:D,translateExtent:I,flowWidth:P,flowHeight:U,ariaLabelConfig:q}=zn(aBn,Cr),W=(e==null?void 0:e.width)??rBn,H=(e==null?void 0:e.height)??sBn,Y=T.width/W,te=T.height/H,$=Math.max(Y,te),L=$*W,F=$*H,G=C*$,V=T.x-(L-T.width)/2-G,ee=T.y-(F-T.height)/2-G,ce=L+G*2,ae=F+G*2,se=`${oBn}-${M}`,X=A.useRef(0),oe=A.useRef();X.current=$,A.useEffect(()=>{if(E.current&&D)return oe.current=SLn({domNode:E.current,panZoom:D,getTransform:()=>N.getState().transform,getViewScale:()=>X.current}),()=>{var Ee;(Ee=oe.current)==null||Ee.destroy()}},[D]),A.useEffect(()=>{var Ee;(Ee=oe.current)==null||Ee.update({translateExtent:I,width:P,height:U,inversePan:w,pannable:k,zoomStep:y,zoomable:v})},[k,v,w,y,I,P,U]);const le=m?Ee=>{var He;const[Ie,ze]=((He=oe.current)==null?void 0:He.pointer(Ee))||[0,0];m(Ee,{x:Ie,y:ze})}:void 0,_e=x?A.useCallback((Ee,Ie)=>{const ze=N.getState().nodeLookup.get(Ie).internals.userNode;x(Ee,ze)},[]):void 0,pe=b??q["minimap.ariaLabel"];return f.jsx(My,{position:p,style:{...e,"--xy-minimap-background-color-props":typeof l=="string"?l:void 0,"--xy-minimap-mask-background-color-props":typeof u=="string"?u:void 0,"--xy-minimap-mask-stroke-color-props":typeof h=="string"?h:void 0,"--xy-minimap-mask-stroke-width-props":typeof _=="number"?_*$:void 0,"--xy-minimap-node-background-color-props":typeof r=="string"?r:void 0,"--xy-minimap-node-stroke-color-props":typeof t=="string"?t:void 0,"--xy-minimap-node-stroke-width-props":typeof a=="number"?a:void 0},className:cs(["react-flow__minimap",n]),"data-testid":"rf__minimap",children:f.jsxs("svg",{width:W,height:H,viewBox:`${V} ${ee} ${ce} ${ae}`,className:"react-flow__minimap-svg",role:"img","aria-labelledby":se,ref:E,onClick:le,children:[pe&&f.jsx("title",{id:se,children:pe}),f.jsx(nBn,{onClick:_e,nodeColor:r,nodeStrokeColor:t,nodeBorderRadius:i,nodeClassName:s,nodeStrokeWidth:a,nodeComponent:o}),f.jsx("path",{className:"react-flow__minimap-mask",d:`M${V-G},${ee-G}h${ce+G*2}v${ae+G*2}h${-ce-G*2}z - M${j.x},${j.y}h${j.width}v${j.height}h${-j.width}z`,fillRule:"evenodd",pointerEvents:"none"})]})})}kU.displayName="MiniMap";A.memo(kU);const lBn=e=>n=>e?`${Math.max(1/n.transform[2],1)}`:void 0,cBn={[ph.Line]:"right",[ph.Handle]:"bottom-right"};function uBn({nodeId:e,position:n,variant:t=ph.Handle,className:r,style:s=void 0,children:i,color:a,minWidth:o=10,minHeight:l=10,maxWidth:u=Number.MAX_VALUE,maxHeight:h=Number.MAX_VALUE,keepAspectRatio:_=!1,resizeDirection:p,autoScale:m=!0,shouldResize:x,onResizeStart:k,onResize:v,onResizeEnd:b}){const w=eU(),y=typeof e=="string"?e:w,C=Nr(),N=A.useRef(null),E=t===ph.Handle,T=zn(A.useCallback(lBn(E&&m),[E,m]),Cr),j=A.useRef(null),M=n??cBn[t];A.useEffect(()=>{if(!(!N.current||!y))return j.current||(j.current=ILn({domNode:N.current,nodeId:y,getStoreItems:()=>{const{nodeLookup:I,transform:P,snapGrid:U,snapToGrid:q,nodeOrigin:W,domNode:H}=C.getState();return{nodeLookup:I,transform:P,snapGrid:U,snapToGrid:q,nodeOrigin:W,paneDomNode:H}},onChange:(I,P)=>{const{triggerNodeChanges:U,nodeLookup:q,parentLookup:W,nodeOrigin:H}=C.getState(),Y=[],te={x:I.x,y:I.y},$=q.get(y);if($&&$.expandParent&&$.parentId){const L=$.origin??H,F=I.width??$.measured.width??0,G=I.height??$.measured.height??0,V={id:$.id,parentId:$.parentId,rect:{width:F,height:G,...Cq({x:I.x??$.position.x,y:I.y??$.position.y},{width:F,height:G},$.parentId,q,L)}},ee=m7([V],q,W,H);Y.push(...ee),te.x=I.x?Math.max(L[0]*F,I.x):void 0,te.y=I.y?Math.max(L[1]*G,I.y):void 0}if(te.x!==void 0&&te.y!==void 0){const L={id:y,type:"position",position:{...te}};Y.push(L)}if(I.width!==void 0&&I.height!==void 0){const F={id:y,type:"dimensions",resizing:!0,setAttributes:p?p==="horizontal"?"width":"height":!0,dimensions:{width:I.width,height:I.height}};Y.push(F)}for(const L of P){const F={...L,type:"position"};Y.push(F)}U(Y)},onEnd:({width:I,height:P})=>{const U={id:y,type:"dimensions",resizing:!1,dimensions:{width:I,height:P}};C.getState().triggerNodeChanges([U])}})),j.current.update({controlPosition:M,boundaries:{minWidth:o,minHeight:l,maxWidth:u,maxHeight:h},keepAspectRatio:_,resizeDirection:p,onResizeStart:k,onResize:v,onResizeEnd:b,shouldResize:x}),()=>{var I;(I=j.current)==null||I.destroy()}},[M,o,l,u,h,_,k,v,b,x]);const D=M.split("-");return f.jsx("div",{className:cs(["react-flow__resize-control","nodrag",...D,t,r]),ref:N,style:{...s,scale:T,...a&&{[E?"backgroundColor":"borderColor"]:a}},children:i})}A.memo(uBn);function _Bn(){const[e,n]=A.useState(0),[t,r]=A.useState(0);return{ref:A.useCallback(i=>{if(!i)return;function a(){n(i.offsetWidth),r(i.offsetHeight)}const o=new ResizeObserver(a),l=new MutationObserver(a);return o.observe(i),l.observe(i,{childList:!0,subtree:!0,characterData:!0,attributes:!0}),a(),()=>{o.disconnect(),l.disconnect()}},[]),offsetWidth:e,offsetHeight:t}}const j1=8;function fBn(e,n){const{offsetWidth:t,offsetHeight:r}=n,[{viewHeight:s,viewWidth:i},a]=A.useState({viewWidth:0,viewHeight:0});A.useEffect(()=>{function h(){a({viewWidth:window.innerWidth,viewHeight:window.innerHeight})}return window.addEventListener("resize",h),h(),()=>window.removeEventListener("resize",h)},[]);let o=0,l=0,u=0;if(e){const{distance:h}=e;switch(e.anchor){case"left":o=e.x-t-h,l=e.y+e.height/2-r/2;break;case"right":o=e.x+e.width+h,l=e.y+e.height/2-r/2;break;case"below":o=e.x+e.width/2-t/2,l=e.y+e.height+h;break;case"above":o=e.x+e.width/2-t/2,l=e.y-r-h;break}const _=o,p=l;o=Math.min(Math.max(o,j1),i-t-j1),l=Math.min(Math.max(l,j1),s-r-j1),u=e.anchor==="left"||e.anchor==="right"?p-l:_-o}return{x:o,y:l,arrowAdjustment:u}}const y4=380,x4=12,dBn=350,hBn=150,rk=new EventTarget;function pBn(){rk.dispatchEvent(new Event("move"))}function mBn(e,n){const[t,r]=A.useState(null),s=A.useRef(void 0),i=A.useRef(void 0);A.useEffect(()=>{const u=()=>{window.clearTimeout(s.current),window.clearTimeout(i.current),r(null)};return rk.addEventListener("move",u),()=>{rk.removeEventListener("move",u),window.clearTimeout(s.current),window.clearTimeout(i.current)}},[]),A.useEffect(()=>{r(u=>{var _;if(!u)return u;const h=((_=e.current)==null?void 0:_.getBoundingClientRect())??null;return h&&u.x===h.x&&u.y===h.y&&u.width===h.width&&u.height===h.height?u:h})},[e,n]);const a=A.useCallback(()=>{window.clearTimeout(i.current),window.clearTimeout(s.current),s.current=window.setTimeout(()=>{var u;r(((u=e.current)==null?void 0:u.getBoundingClientRect())??null)},dBn)},[e]),o=A.useCallback(()=>{window.clearTimeout(s.current),window.clearTimeout(i.current),i.current=window.setTimeout(()=>r(null),hBn)},[]),l=A.useCallback(()=>window.clearTimeout(i.current),[]);return{rect:t,onMouseEnter:a,onMouseLeave:o,keepOpen:l}}function gBn(e){const n=new Date(e),t=n.getFullYear()===new Date().getFullYear()?{month:"short",day:"numeric"}:{month:"short",day:"numeric",year:"numeric"};return n.toLocaleDateString(z(),t)}function vBn({exp:e,runs:n,latestRun:t,parentSlug:r,anchor:s,onOpenLogs:i,onOpenCode:a,onMouseEnter:o,onMouseLeave:l}){const u=_Bn(),h=s.right+x4+y4<=window.innerWidth,_=s.x-x4-y4>=0,p=h?"right":_?"left":s.y>window.innerHeight/2?"above":"below",{x:m,y:x}=fBn({x:s.x,y:s.y,width:s.width,height:s.height,anchor:p,distance:x4},u),k=e.parentExperimentId&&(t!=null&&t.commitSha)?t.id:null,{data:v}=ft({...y2n(k??""),enabled:!!k,subscribed:!!k}),b=A.useMemo(()=>{if(!v)return null;const I=v;let P=I.diff;if(I.truncated){const H=P.lastIndexOf(` -diff --git `);P=H!==-1?P.slice(0,H+1):P.slice(0,P.lastIndexOf(` -`)+1)}let U=[];try{U=P.trim()?B3(P):[]}catch{return null}if(I.truncated&&U.every(H=>H.hunks.length===0))return null;let q=0,W=0;for(const H of U){const Y=Zb(H);q+=Y.additions,W+=Y.deletions}return{fileCount:U.length,additions:q,deletions:W,truncated:I.truncated}},[v]),w={done:0,failed:0,cancelled:0,live:0};for(const I of n)I.status==="done"?w.done+=1:I.status==="failed"?w.failed+=1:I.status==="cancelled"?w.cancelled+=1:w.live+=1;const y=t?g0((t.endedAt??Date.now())-t.createdAt):null,C=(t==null?void 0:t.status)==="failed"&&t.resultMarkdown?t.resultMarkdown:null,N=e.description||(C?null:t==null?void 0:t.resultMarkdown)||null,E=A.useRef(null),[T,j]=A.useState(!1),[M,D]=A.useState(!1);return A.useEffect(()=>{j(!1)},[N]),A.useEffect(()=>{const I=E.current;I&&D(I.scrollHeight>I.clientHeight+1)},[N,T]),Oa.createPortal(f.jsxs("div",{ref:u.ref,className:"exp-hover-card fixed z-60 bg-background border border-border rounded-lg shadow-menu py-3.5 px-4 text-sm text-text [&_.hc-head]:flex [&_.hc-head]:items-baseline [&_.hc-head]:justify-between [&_.hc-head]:gap-2.5 [&_.hc-slug]:text-sm [&_.hc-slug]:font-semibold [&_.hc-slug]:min-w-0 [&_.hc-slug]:overflow-hidden [&_.hc-slug]:text-ellipsis [&_.hc-slug]:whitespace-nowrap [&_.hc-title]:mt-[3px] [&_.hc-title]:text-text [&_.hc-actions]:flex [&_.hc-actions]:items-center [&_.hc-actions]:gap-1.5 [&_.hc-actions]:mt-2.5 [&_.hc-actions_button]:inline-flex [&_.hc-actions_button]:items-center [&_.hc-actions_button]:justify-center [&_.hc-actions_button]:gap-[5px] [&_.hc-actions_button]:min-w-21 [&_.hc-actions_button]:py-1.5 [&_.hc-actions_button]:px-2.5 [&_.hc-actions_button]:border [&_.hc-actions_button]:border-border [&_.hc-actions_button]:rounded-md [&_.hc-actions_button]:bg-background [&_.hc-actions_button]:text-text [&_.hc-actions_button]:text-sm [&_.hc-actions_button]:font-medium [&_.hc-actions_button:hover]:border-border-hover-strong [&_.hc-actions_button:hover]:bg-canvas [&_.hc-body]:mt-2.5 [&_.hc-body]:border-t [&_.hc-body]:border-t-border-variant [&_.hc-body]:pt-2.5 [&_.hc-body]:leading-[1.6] [&_.hc-body]:whitespace-pre-line [&_.hc-body]:line-clamp-10 [&_.hc-body.expanded]:block [&_.hc-body.expanded]:line-clamp-none [&_.hc-body.expanded]:max-h-[45vh] [&_.hc-body.expanded]:overflow-y-auto [&_.hc-body.expanded]:overflow-x-hidden [&_.hc-body.expanded]:pb-1 [&_.hc-toggle]:mt-1 [&_.hc-toggle]:text-sm [&_.hc-toggle]:font-medium [&_.hc-toggle]:text-muted [&_.hc-toggle:hover]:text-text [&_.hc-failure]:mt-2 [&_.hc-failure]:text-accent-red [&_.hc-failure]:line-clamp-3 [&_.hc-stats]:mt-2.5 [&_.hc-stats]:border-t [&_.hc-stats]:border-t-border-variant [&_.hc-stats]:pt-2.5 [&_.hc-stats]:flex [&_.hc-stats]:items-center [&_.hc-stats]:gap-3 [&_.hc-stats]:flex-wrap [&_.hc-stats]:text-xs [&_.hc-stats]:text-text [&_.hc-git]:mt-2.5 [&_.hc-git]:pt-2 [&_.hc-git]:border-t [&_.hc-git]:border-t-border-variant [&_.hc-git]:text-xs [&_.hc-git]:text-text [&_.hc-git]:flex [&_.hc-git]:flex-col [&_.hc-git]:gap-1 [&_.hc-git-row]:flex [&_.hc-git-row]:items-center [&_.hc-git-row]:gap-2.5 [&_.hc-git-row]:flex-wrap [&_.hc-git-row]:min-w-0 [&_.hc-branch]:inline-flex [&_.hc-branch]:items-center [&_.hc-branch]:gap-1 [&_.hc-branch]:min-w-0 [&_.hc-branch]:overflow-hidden [&_.hc-branch]:text-ellipsis [&_.hc-branch]:whitespace-nowrap [&_.hc-foot]:mt-2 [&_.hc-foot]:flex [&_.hc-foot]:items-center [&_.hc-foot]:justify-between [&_.hc-foot]:gap-2.5 [&_.hc-foot]:text-xs [&_.hc-foot]:text-muted [&_.hc-foot_.hc-command]:min-w-0 [&_.hc-foot_.hc-command]:overflow-hidden [&_.hc-foot_.hc-command]:text-ellipsis [&_.hc-foot_.hc-command]:whitespace-nowrap",style:{width:y4,left:m,top:x,visibility:u.offsetHeight===0?"hidden":void 0},onMouseEnter:o,onMouseLeave:l,children:[f.jsxs("div",{className:"hc-head",children:[f.jsx("span",{className:"hc-slug",children:e.slug}),f.jsx(Jl,{status:t?Zi(t):"idle"})]}),e.title&&f.jsx("div",{className:"hc-title",children:e.title}),f.jsxs("div",{className:"hc-actions",children:[i&&f.jsxs("button",{type:"button",...qr(i),children:[f.jsx(co,{size:13}),FAe()]}),f.jsxs("button",{type:"button",...qr(a),children:[f.jsx(Eb,{size:13}),yAe()]})]}),N&&f.jsx("div",{className:`hc-body${T?" expanded":""}`,ref:E,children:N}),N&&(M||T)&&f.jsx("button",{type:"button",className:"hc-toggle",onClick:()=>j(I=>!I),children:T?fD():DEe()}),C&&f.jsx("div",{className:"hc-failure",children:C}),f.jsxs("div",{className:"hc-stats",children:[f.jsx("span",{children:new Intl.ListFormat(z(),{style:"short"}).format([n.length===1?tKe():lKe({count:Jt(n.length)}),...w.done>0?[dVe({count:Jt(w.done)})]:[],...w.failed>0?[yVe({count:Jt(w.failed)})]:[],...w.cancelled>0?[aVe({count:Jt(w.cancelled)})]:[],...w.live>0?[FVe({count:Jt(w.live)})]:[]])}),t&&Uk(t.backend)&&f.jsx(pS,{backend:t.backend}),y&&f.jsx("span",{children:y}),t&&f.jsx("span",{children:Vo(t.createdAt)})]}),f.jsxs("div",{className:"hc-git",children:[f.jsxs("div",{className:"hc-git-row",children:[f.jsxs("span",{className:"hc-branch",title:e.branchName,children:[f.jsx(hm,{size:12}),e.branchName]}),r&&f.jsxs("span",{children:[OAe()," ",f.jsx("span",{children:r})]})]}),b&&b.fileCount>0&&f.jsx("div",{className:"hc-git-row",title:b.truncated?QQ({parent:Ne(r??"parent")}):HQ({parent:Ne(r??"parent")}),children:f.jsxs("span",{children:[b.truncated&&"≥ ",f.jsxs("span",{className:"diff-stat-add text-accent-green",children:["+",b.additions]})," ",f.jsxs("span",{className:"diff-stat-del text-accent-red",children:["−",b.deletions]})," · ",b.fileCount===1&&!b.truncated?WVe():b.truncated?OVe({count:Jt(b.fileCount)}):NVe({count:Jt(b.fileCount)})]})})]}),f.jsxs("div",{className:"hc-foot",children:[f.jsxs("span",{className:"hc-command font-mono",children:["$ ",e.runCommand]}),f.jsxs("span",{children:[NAe()," ",gBn(e.createdAt)]})]})]}),document.body)}const NM=["empty-state absolute inset-0 flex flex-col items-center","justify-center p-6 text-center text-subtext [&_p]:max-w-[46ch]","[&_p]:m-0 [&_p]:text-sm [&_p]:leading-normal [&_p]:text-balance","[&_p.empty-state-title]:text-2xl [&_p.empty-state-title]:font-normal","[&_p.empty-state-title]:text-text [&_p.empty-state-hint]:text-lg","[&_p.empty-state-hint]:text-subtext empty-state-cta gap-1.5"].join(" "),bBn=264,zM=132,tv=44,yBn=72,xBn=148,wBn=44;function kBn(e){const n=new Map(e.map(i=>[i.id,{exp:i,children:[]}])),t=[];for(const i of e){const a=n.get(i.id),o=i.parentExperimentId?n.get(i.parentExperimentId):void 0;o?o.children.push(a):t.push(a)}const r=(i,a)=>i.exp.createdAt-a.exp.createdAt,s=i=>{i.children.sort(r),i.children.forEach(s)};return t.sort(r),t.forEach(s),t}function SBn(e,n){const t=new Map,r=o=>{const l=t.get(o)??1+o.children.reduce((u,h)=>u+r(h),0);return t.set(o,l),l},s=new Map,i=o=>{const l=s.get(o)??(n(o)||o.children.some(i));return s.set(o,l),l};function a(o){if(n(o)){const h=[];let _=0;for(const p of o.children)i(p)?h.push(...a(p)):_+=r(p);return _>0&&h.push({kind:"elided",id:`el-${o.exp.id}`,count:_,children:[]}),[{kind:"exp",exp:o.exp,children:h}]}if(!i(o))return[];let l=0;const u=[];return(function h(_){l+=1;for(const p of _.children)n(p)?u.push(...a(p)):i(p)?h(p):l+=r(p)})(o),[{kind:"elided",id:`el-${o.exp.id}`,count:l,children:u}]}return e.flatMap(a)}function sk(e){return e.kind==="exp"?bBn:xBn}function T1(e){return e.kind==="exp"?e.exp.id:e.id}function nv(e){if(e.children.length===0)return sk(e);const n=e.children.reduce((t,r)=>t+nv(r),0)+tv*(e.children.length-1);return Math.max(sk(e),n)}function CBn(e){return e==="done"?"pass":e==="failed"?"fail":e==="running"||e==="starting"||e==="cancelling"?"live":"other"}const EBn=A.memo(function({data:n}){sf();const{exp:t,latestRun:r,runs:s,isBaseline:i,parentSlug:a,githubOwner:o,githubRepo:l,onOpenView:u,onOpenCode:h}=n,_=r?Zi(r):void 0,p=_==="running"||_==="starting"||_==="cancelling",m=i?icn():p?Rcn():Bl(),x=s.slice(-8),k=A.useRef(null),v=mBn(k,n);return f.jsxs("div",{ref:k,className:`exp-node w-66 border border-border rounded-md bg-background py-2.5 px-3 shadow-tree text-sm transition-[box-shadow] duration-120 ease-standard [&:hover]:shadow-tree-hover [&.live]:border-accent-teal [&.live]:shadow-tree-live [&_.node-overview-link]:block [&_.node-overview-link]:w-full [&_.node-overview-link]:p-0 [&_.node-overview-link]:border-0 [&_.node-overview-link]:bg-transparent [&_.node-overview-link]:text-inherit [&_.node-overview-link]:[font:inherit] [&_.node-overview-link]:text-start [&_.node-overview-link]:cursor-pointer [&_.node-overview-link:hover_.node-slug]:underline [&_.node-overview-link:hover_.node-slug]:underline-offset-[3px] [&_.node-overview-link:focus-visible]:outline-2 [&_.node-overview-link:focus-visible]:outline-solid [&_.node-overview-link:focus-visible]:outline-accent [&_.node-overview-link:focus-visible]:outline-offset-4 [&_.node-overview-link:focus-visible]:rounded-xs [&_.node-eyebrow]:flex [&_.node-eyebrow]:items-center [&_.node-eyebrow]:justify-between [&_.node-eyebrow]:gap-2 [&_.node-eyebrow]:mb-1.5 [&_.node-eyebrow]:text-xs [&_.node-eyebrow]:font-medium [&_.node-eyebrow]:text-muted [&_.node-head]:flex [&_.node-head]:items-center [&_.node-head]:gap-[7px] [&_.node-head]:min-w-0 [&_.node-status]:w-2 [&_.node-status]:h-2 [&_.node-status]:rounded-full [&_.node-status]:shrink-0 [&_.node-slug]:text-sm [&_.node-slug]:font-semibold [&_.node-slug]:text-text [&_.node-slug]:flex-1 [&_.node-slug]:min-w-0 [&_.node-slug]:overflow-hidden [&_.node-slug]:text-ellipsis [&_.node-slug]:whitespace-nowrap [&_.node-title]:mt-1 [&_.node-title]:text-text [&_.node-title]:text-sm [&_.node-title]:line-clamp-2 [&_.node-meta]:mt-2 [&_.node-meta]:flex [&_.node-meta]:items-center [&_.node-meta]:gap-2 [&_.node-meta]:text-xs [&_.node-meta]:text-muted [&_.node-actions]:mt-2 [&_.node-actions]:pt-1.5 [&_.node-actions]:border-t [&_.node-actions]:border-t-border-variant [&_.node-actions]:flex [&_.node-actions]:items-center [&_.node-actions]:gap-[3px] [&_.node-action]:inline-flex [&_.node-action]:items-center [&_.node-action]:gap-[5px] [&_.node-action]:py-[3px] [&_.node-action]:px-1.5 [&_.node-action]:text-sm [&_.node-action]:font-medium [&_.node-action]:text-text [&_.node-action]:rounded-sm [&_.node-action]:no-underline [&_.node-action:hover]:text-text [&_.node-action:hover]:bg-surface [&_.node-action-ext]:ms-auto [&_.node-action-ext]:py-[3px] [&_.node-action-ext]:px-[5px] ${p?"live":""}`,onMouseEnter:v.onMouseEnter,onMouseLeave:v.onMouseLeave,children:[f.jsx(Nu,{type:"target",position:zt.Top}),f.jsxs("div",{role:"button",tabIndex:0,className:"node-overview-link nodrag",...qr(b=>u(t.id,"overview",b)),children:[f.jsxs("div",{className:"node-eyebrow",children:[f.jsx("span",{children:m}),f.jsx(Jl,{status:_??"idle"})]}),f.jsx("div",{className:"node-head",children:f.jsx("span",{className:"node-slug",children:t.slug})}),(t.title||t.description)&&f.jsx("div",{className:"node-title",children:t.title||t.description}),f.jsxs("div",{className:"node-meta",children:[f.jsx("span",{children:Kun()}),x.length>0?f.jsx("span",{className:"run-squares flex items-center gap-[3px]",children:x.map(b=>f.jsx("span",{className:`run-sq w-[9px] h-[9px] shrink-0 [&.pass]:bg-accent-green [&.fail]:border-[1.5px] [&.fail]:border-danger-outline [&.live]:bg-accent-teal [&.live]:animate-[or-pulse_1.2s_ease-in-out_infinite] [&.other]:border-[1.5px] [&.other]:border-border ${CBn(Zi(b))}`,title:YS(Zi(b))},b.id))}):f.jsx("span",{children:Eun()}),f.jsx("span",{className:"flex-1"}),r&&f.jsx("span",{children:Vo(r.createdAt)})]})]}),f.jsxs("div",{className:"node-actions",onClick:b=>b.stopPropagation(),children:[s.length>0&&f.jsxs("button",{className:"node-action",title:Mun(),...qr(b=>u(t.id,"terminal",b)),children:[f.jsx(co,{size:13}),dL()]}),f.jsxs("button",{className:"node-action",title:QO({branch:Ne(t.branchName)}),...qr(b=>h(t.id,t.branchName,"files",b)),children:[f.jsx(Eb,{size:13}),Jcn()]}),o&&l&&f.jsx("a",{className:"node-action node-action-ext",title:hv({name:Ne(t.branchName)}),"aria-label":hv({name:Ne(t.branchName)}),href:xb(o,l,t.branchName),target:"_blank",rel:"noopener noreferrer",onClick:b=>b.stopPropagation(),children:f.jsx(Rb,{size:13})})]}),f.jsx(Nu,{type:"source",position:zt.Bottom}),v.rect&&f.jsx(vBn,{exp:t,runs:s,latestRun:r,parentSlug:a,anchor:v.rect,onOpenLogs:s.length>0?b=>u(t.id,"terminal",b):void 0,onOpenCode:b=>h(t.id,t.branchName,"files",b),onMouseEnter:v.keepOpen,onMouseLeave:v.onMouseLeave})]})}),NBn=A.memo(function({data:n}){sf();const{count:t,onShowProjectScope:r}=n;return f.jsxs("div",{className:"elided-node w-37 h-11 flex items-center gap-2 py-1.5 px-2.5 border border-dashed border-border rounded-md bg-hover-faint text-muted text-sm font-medium text-start transition-[border-color,color] duration-120 ease-standard [&:hover]:border-text [&:hover]:text-text [&_.elided-node-label]:flex [&_.elided-node-label]:flex-col [&_.elided-node-label]:leading-[1.3] [&_.elided-node-sub]:text-muted",role:"button",tabIndex:0,title:e_n(),onClick:r,onKeyDown:s=>{(s.key==="Enter"||s.key===" ")&&(s.preventDefault(),r())},children:[f.jsx(Nu,{type:"target",position:zt.Top}),f.jsx(Jk,{size:14}),f.jsxs("span",{className:"elided-node-label",children:[t===1?Ccn():vcn({count:Jt(t)}),f.jsx("span",{className:"elided-node-sub",children:Pun()})]}),f.jsx(Nu,{type:"source",position:zt.Bottom})]})}),zBn={exp:EBn,elided:NBn},SU={type:"default",style:{stroke:"var(--text)",strokeWidth:1.5,opacity:.3}},jBn={...SU.style,strokeDasharray:"4 4"};function TBn({experiments:e,runs:n,project:t,onOpenView:r,onOpenCode:s,agentSessionId:i,onShowProjectScope:a,viewport:o,onViewportChange:l}){const{nodes:u,edges:h}=A.useMemo(()=>{const _=new Map;for(const y of n){const C=_.get(y.experimentId);C?C.push(y):_.set(y.experimentId,[y])}for(const y of _.values())y.sort((C,N)=>C.createdAt-N.createdAt);const p=[],m=[],x=y=>!i||y.exp.chatSessionId===i,k=SBn(kBn(e),x),v=new Map(e.map(y=>[y.id,y.slug]));function b(y,C,N){const E=C-sk(y)/2;if(y.kind==="exp"){const M=_.get(y.exp.id)??[];p.push({id:y.exp.id,type:"exp",position:{x:E,y:N},data:{exp:y.exp,latestRun:M[M.length-1]??null,runs:M,isBaseline:!y.exp.parentExperimentId,parentSlug:y.exp.parentExperimentId?v.get(y.exp.parentExperimentId)??null:null,githubOwner:t.githubEnabled?t.githubOwner:"",githubRepo:t.githubEnabled?t.githubRepo:"",onOpenView:r,onOpenCode:s}})}else p.push({id:y.id,type:"elided",position:{x:E,y:N+(zM-wBn)/2},data:{count:y.count,onShowProjectScope:a}});if(y.children.length===0)return;const T=y.children.reduce((M,D)=>M+nv(D),0)+tv*(y.children.length-1);let j=C-T/2;for(const M of y.children){const D=nv(M),I=y.kind==="elided"||M.kind==="elided";m.push({id:`e-${T1(y)}-${T1(M)}`,source:T1(y),target:T1(M),...I?{style:jBn}:{}}),b(M,j+D/2,N+zM+yBn),j+=D+tv}}let w=0;for(const y of k){const C=nv(y);b(y,w+C/2,0),w+=C+tv}return{nodes:p,edges:m}},[e,n,r,s,t.githubOwner,t.githubRepo,t.githubEnabled,i,a]);return e.length===0?f.jsxs("div",{className:NM,children:[f.jsx("p",{className:"empty-state-title",children:bun()}),f.jsx("p",{className:"empty-state-hint",children:Vcn()})]}):u.length===0&&i?f.jsxs("div",{className:NM,children:[f.jsx("p",{className:"empty-state-title",children:fun()}),f.jsx("p",{className:"empty-state-hint",children:Bcn()})]}):f.jsx($$n,{className:"[&_.react-flow\\_\\_node.react-flow\\_\\_node-exp.selectable]:cursor-default [&_.react-flow\\_\\_node.react-flow\\_\\_node-elided.selectable]:cursor-pointer [&_.react-flow\\_\\_handle]:opacity-0 [&_.react-flow\\_\\_handle]:pointer-events-none [&_.react-flow\\_\\_attribution]:hidden!",nodes:u,edges:h,nodeTypes:zBn,defaultEdgeOptions:SU,nodesDraggable:!1,nodesConnectable:!1,nodesFocusable:!1,onMoveStart:pBn,onMoveEnd:(_,p)=>{_&&l(p)},minZoom:.15,defaultViewport:o??void 0,fitView:o===null,fitViewOptions:{padding:.25,maxZoom:1},children:f.jsx(q$n,{variant:tc.Dots,color:"var(--dots-strong)",gap:28,size:1.6})},i??"project")}const $p=["empty-state absolute inset-0 flex flex-col items-center","justify-center gap-2.5 p-6 text-center text-subtext","[&_p]:max-w-[46ch] [&_p]:m-0 [&_p]:text-sm [&_p]:leading-normal","[&_p]:text-balance [&_p.empty-state-title]:text-2xl","[&_p.empty-state-title]:font-normal [&_p.empty-state-title]:text-text","[&_p.empty-state-hint]:text-lg [&_p.empty-state-hint]:text-subtext"].join(" ");function ABn(e){return e.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}function RBn(e,n,t,r,s){let i=e,a;const o=n==null?void 0:n.replace(/\/+$/,""),l=r==null?void 0:r.replace(/\/+$/,"");if(i.startsWith("artifacts/"))return i=i.slice(10),i?{path:i,source:"artifacts"}:null;if(i==="~"||i.startsWith("~/")||c6(i))return{path:i,source:"abs"};const u=p=>{const m=v=>v.replace(/^\/private(?=\/(?:tmp|var)(?:\/|$))/,""),[x,k]=[m(i),m(p)];return x===k?"":x.startsWith(`${k}/`)?x.slice(k.length).replace(/^\/+/,""):null},h=i.startsWith("/")&&l?u(l):null,_=i.startsWith("/")&&o?u(o):null;if(!i.startsWith("/"))a=t;else{if(h!==null)return h?{path:h,source:"artifacts"}:null;if(_!==null)i=_;else{const p=s?ABn(s):"[^/]+",m=i.match(new RegExp(`/files/${p}/(.+)$`)),x=m?null:i.match(/\/openresearch\/worktrees\/[^/]+\/([^/]+)\/(.+)$/),k=m||x?null:i.match(/\/openresearch\/repos\/[^/]+\/[^/]+\/(.+)$/);if(m)return{path:m[1],source:"artifacts"};x?(a=x[1],i=x[2]):k&&(i=k[1])}}return i?i.startsWith("/")?{path:i,source:"abs"}:{path:i,sessionId:a}:null}function MBn(e,n){if(!(e.source==="artifacts"||e.source==="abs"))return e.ref??e.branchLabel??n}const OBn=10,jM=1448,DBn=80,LBn=48;function TM(e,n){const t=e.findIndex(s=>s.id===n.id);if(t<0)return[...e,n];const r=e.slice();return r[t]=n,r}function AM(e){const n=A.useRef(e);return n.current.size===e.size&&[...e].every(([r,s])=>n.current.get(r)===s)||(n.current=e),n.current}function IBn({runtime:e,projectId:n,pane:t}){var Va,ni,wo;const r=vn({mutationFn:_pn}),s=_i(),i=FO({select:Z=>Z.location}),a=U_(i.pathname),o=(a==null?void 0:a.kind)==="skills"?"skills":(a==null?void 0:a.kind)==="settings"?a.section??"settings":"chat",l=A.useRef(null),u=(a==null?void 0:a.kind)==="task"?a.sessionId??null:l.current;(a==null?void 0:a.kind)==="task"&&(l.current=u);const h=t!==void 0,_=(t==null?void 0:t.kind)==="experiment"?t.runId??null:null,[p,m]=A.useState(null),[x,k]=A.useState(0),v=A.useRef({href:"",jump:0,value:0});(v.current.href!==i.href||v.current.jump!==x)&&(v.current={href:i.href,jump:x,value:v.current.value+1});const b=A.useMemo(()=>{const Z=t?eo(t):"experiments";return typeof Z=="object"&&"path"in Z&&Z.line&&p!==v.current.value?{...Z,lineScrollRequest:v.current.value}:Z},[t,p,i.href,x]),w=ft(Aa(n)),y=A.useMemo(()=>{var Z;return((Z=w.data)==null?void 0:Z.map(ge=>ge.id))??null},[w.data]),C=A.useRef(new Set),N=A.useRef(new Set),E=A.useRef({}),[T,j]=A.useState(0),M=A.useRef({projectId:n,activeSessionId:u,pane:t,isTask:(a==null?void 0:a.kind)==="task"});M.current={projectId:n,activeSessionId:u,pane:t,isTask:(a==null?void 0:a.kind)==="task"};const D=A.useCallback((Z,ge=!1)=>{const Te=M.current;Te.projectId&&s.navigate({href:P1(Te.projectId,Te.activeSessionId,Z),replace:ge})},[s]),I=A.useCallback(Z=>{const ge=Wl(Z);D(ge.kind==="file"?{...ge,line:void 0}:ge)},[D]),P=A.useCallback(()=>D(void 0),[D]),U=A.useCallback(Z=>{(t==null?void 0:t.kind)==="experiment"&&D({...t,runId:Z??void 0})},[t,D]),q=A.useCallback(Z=>{s.navigate({href:Z?`/projects/${encodeURIComponent(Z)}`:"/projects"})},[s]),W=A.useCallback(Z=>{var ge;if(n)if(Z==="chat"){const Te=l.current;s.navigate({href:P1(n,Te,(ge=pu(go.current,Te??"new"))==null?void 0:ge.active)})}else s.navigate({href:`/projects/${encodeURIComponent(n)}/${Z==="skills"?"skills":`settings/${Z}`}`})},[s,n]),H=sf(),{status:Y}=KS(e.kind==="local"),te=A.useMemo(()=>v0(),[n]),$=ft(te),L=$.data??null,F=A.useCallback(Z=>{Qr(te.queryKey,ge=>(typeof Z=="function"?Z(ge??null):Z)??void 0)},[te]),G=A.useMemo(()=>fm(),[n]),V=ft(G),ee=V.data??null,ce=A.useCallback(Z=>{Qr(G.queryKey,ge=>(typeof Z=="function"?Z(ge??null):Z)??void 0)},[G]),ae=A.useRef(void 0);ae.current=ee==null?void 0:ee.tourCompleted;const se=[!w.data&&w.error?tD():null,!$.data&&$.error?Xp():null,!V.data&&V.error?hue():null].filter(Z=>Z!==null),X=se.length?xue({items:new Intl.ListFormat(H).format(se)}):null,oe=A.useRef(null),le=ft(x3(n)),_e=le.data??[],pe=!le.isPending,[Ee,Ie]=A.useState(!1),He=ft(_u(n)).data??[],Oe=A.useRef(He);Oe.current=He;const Xe=A.useRef(new Map),_t=A.useRef(new Set),Vt=A.useRef(null),$t=A.useRef(!1),jt=A.useRef(new Map),mt=A.useRef(new Map),we=A.useRef(0),ct=A.useRef(_e);ct.current=_e;const je=ft(x2n(n)).data??null,[qe,at]=A.useState("table"),[nt,Kt]=A.useState("project"),Qe=A.useRef(null),{open:wt,setOpen:Tt,ref:Yt}=_o(Qe),[tn,rr]=A.useState(!1),rn=_e.every(Z=>Z.chatSessionId),ln=u&&rn?nt:"project",An=A.useMemo(()=>ln!=="agent"?_e:_e.filter(Z=>Z.chatSessionId===u),[_e,ln,u]),qn=A.useMemo(()=>{if(ln!=="agent")return He;const Z=new Set(An.map(ge=>ge.id));return He.filter(ge=>Z.has(ge.experimentId))},[He,An,ln]),[Yn,fr]=A.useState([]),[Xr,zr]=A.useState(!1),[kt,cn]=A.useState(!1),[jn,fn]=A.useState(!1),[Dn,pn]=A.useState(!1),[Un,Rn]=A.useState(null),[yt,Dt]=A.useState([]),[Ue,gt]=A.useState([]),ur=A.useRef(new Map),un=A.useRef(new Map),Lt=Z=>{let ge=un.current.get(Z);return ge||(ge=new $An,un.current.set(Z,ge)),ge},[Kn,mr]=A.useState([]),[gr,ho]=A.useState([]),[Qs,Xs]=A.useState([]),[xs,Ai]=A.useState([]),[Ur,Ys]=A.useState(null),[Zs,sr]=A.useState("files"),[fa,il]=A.useState(new Set),[Ut,us]=A.useState(!1),[Dr,Ia]=A.useState(null),[ot,Wt]=A.useState(HI),[Ri,da]=A.useState(()=>window.innerWidth>=jM),ws=o==="chat"&&!h&&Ri,[Ln,hi]=A.useState(!0),[_c,Mi]=A.useState(!1),ks=A.useRef(_S()),Oi=A.useRef(u);Oi.current=u;const Yr=A.useRef(Yn);Yr.current=Yn;const vr=A.useRef(xs);vr.current=xs;const Qt=A.useRef(null),Is=A.useCallback(Z=>{const ge=[...Z];vr.current=ge,Ai(ge)},[]),_s=A.useCallback(Z=>{Qt.current=Z,Ys(Z)},[]),Lr=A.useCallback(Z=>{const ge=At(Z);Dt(Re=>Ep(Re,ge)),gt(Re=>Ep(Re,ge)),mr(Re=>Ep(Re,ge)),ho(Re=>Ep(Re,ge)),Xs(Re=>Ep(Re,ge));const Te=jr.current;if(Te&&"path"in Z){const Re=Ls(Te,Oi.current,Z);ur.current.delete(Re),un.current.delete(Re),N.current.delete(Re),C.current.delete(Re)}const Be=Yr.current.filter(Re=>At(Re)!==ge);Yr.current=Be,fr(Be)},[]),ir=A.useCallback(Z=>{const ge=At(Z),Te=[...Yr.current.filter(Be=>At(Be)!==ge),Zg(Z)];Yr.current=Te,fr(Te),I(Z)},[I]),Js=A.useCallback((Z,ge,Te)=>{const Be=At(Z),Re=Qt.current,st=szn({order:vr.current,previewKey:Re?At(Re):null},Be,ge);st.replacedKey&&Re&&typeof Re!="string"&&At(Re)===st.replacedKey&&Lr(Re),Is(st.order),st.previewKey===null?_s(null):st.previewKey===Be&&_s(Zg(Z));const it=[...Yr.current.filter(Ht=>At(Ht)!==Be),Zg(Z)];Yr.current=it,fr(it),D(Wl(Z,Te))},[Lr,Is,_s,D]),Gr=A.useCallback(Z=>{const ge=Qt.current;ge&&At(ge)===At(Z)&&_s(null)},[_s]);A.useEffect(()=>{let Z=!1;const ge=Be=>{const Re=Qt.current,st=Be.target;if(st instanceof Element&&st.closest("input, textarea, [contenteditable='true']")!==null){Z=!1;return}if(Re&&At(Re)===At(ks.current.rightTab)&&(Be.metaKey||Be.ctrlKey)&&!Be.altKey&&!Be.shiftKey&&Be.key.toLowerCase()==="k"){Be.preventDefault(),Z=!0;return}if(Z&&Be.key==="Enter"){Be.preventDefault(),Z=!1;const Ht=Qt.current;Ht&&Gr(Ht);return}Z=!1},Te=()=>{Z=!1};return window.addEventListener("keydown",ge),window.addEventListener("blur",Te),window.addEventListener("pointerdown",Te),()=>{window.removeEventListener("keydown",ge),window.removeEventListener("blur",Te),window.removeEventListener("pointerdown",Te)}},[Gr]);const Ss=A.useCallback((Z,ge)=>{const Te=At(Z),Be=Qt.current;Be&&At(Be)===Te&&_s(null);const Re=izn({order:vr.current,previewKey:Be?At(Be):null},Te,Yr.current.map(At));Is(Re.order);const st=Yr.current.filter(Ht=>At(Ht)!==Te);if(Yr.current=st,fr(st),!ge)return;const it=Re.fallbackKey?st.find(Ht=>At(Ht)===Re.fallbackKey):void 0;it?I(it):(P(),us(!1))},[Is,_s,I,P]),al=W,Ou=A.useMemo(()=>({rightTab:Zg(b),tabHistory:Yn,experimentsTabOpen:Xr,filesTabOpen:kt,artifactsTabOpen:jn,terminalTabOpen:Dn,expTabs:yt,fileTabs:Ue,planTabs:Kn,subagentTabs:gr,codeTabs:Qs,contentTabOrder:vr.current,previewTab:Qt.current,filesView:Zs,filesToggled:fa,selectedRunId:_,scope:nt,panelOpen:h,panelMax:Ut,treeViewport:Dr}),[b,Yn,Xr,kt,jn,Dn,yt,Ue,Kn,gr,Qs,xs,Ur,Zs,fa,_,nt,h,Ut,Dr]);ks.current=Ou;const fc=A.useCallback(()=>Object.fromEntries(ur.current),[]),Di=A.useRef(void 0),po=A.useCallback(()=>{clearTimeout(Di.current),Di.current=setTimeout(()=>j(Z=>Z+1),200)},[]);A.useEffect(()=>()=>clearTimeout(Di.current),[]);const mo=A.useCallback((Z,ge,Te)=>{if(fr(Z.tabHistory),Yr.current=Z.tabHistory,zr(Z.experimentsTabOpen),cn(Z.filesTabOpen),fn(Z.artifactsTabOpen),pn(Z.terminalTabOpen),Dt(Z.expTabs),gt(Z.fileTabs),mr(Re=>Re===Z.planTabs?Re:Z.planTabs.map(st=>{var it;return{...st,plan:((it=Re.find(Ht=>Ht.sessionId===st.sessionId&&Ht.promptId===st.promptId))==null?void 0:it.plan)??""}})),ho(Z.subagentTabs),Xs(Z.codeTabs),Is(Z.contentTabOrder),_s(Z.previewTab),sr(Z.filesView),il(Z.filesToggled),Kt(Z.scope),us(Z.panelMax),Ia(Z.treeViewport),rr(M.current.activeSessionId===bd&&Z.fileTabs.some(Re=>s_(Re,{path:Q2,source:"artifacts"}))),Te){for(const[Re,st]of Object.entries((ge==null?void 0:ge.scroll)??{}))ur.current.set(Re,st);Object.assign(E.current,ge==null?void 0:ge.sourceModes)}const Be=M.current;if(Be.projectId)for(const Re of Z.fileTabs){const st=Ls(Be.projectId,Be.activeSessionId,Re);N.current.has(st)||C.current.add(st)}},[Is,_s]),{ready:Ir,loaded:js,error:$a,retry:Zn,capture:Ba,workspace:go}=zyn({projectId:ee&&y!==null&&((a==null?void 0:a.kind)!=="task"||!u||y.includes(u))?n:null,taskKey:u??"new",location:i.href,pane:t,isTask:(a==null?void 0:a.kind)==="task",firstDemoOpen:(ee==null?void 0:ee.tourCompleted)===!1,state:Ou,apply:mo,getScroll:fc,sourceModes:E.current,revision:T}),dc=A.useRef(null);A.useLayoutEffect(()=>{if(!Ir||!pe||(a==null?void 0:a.kind)!=="task")return;const Z=dc.current;(Z==null?void 0:Z.projectId)===n&&Z.taskId===u&&Z.scope!==ln&&Ia(null),dc.current={projectId:n,taskId:u,scope:ln}},[Ir,pe,a==null?void 0:a.kind,n,u,ln]);const Li=A.useCallback((Z,ge)=>{var st;if(!n)return;Z&&ge!=null&&ge.replace&&u===null&&(Ba(),Eyn(n,Z));const Te=pu($I(n),Z??"new"),Be=Te?Te.active:Il(n)?(st=fS(Z??void 0,ae.current===!1))==null?void 0:st.active:void 0,Re=ge!=null&&ge.replace&&Z&&u===null?M.current.pane:Be;s.navigate({href:P1(n,Z,Re),replace:ge==null?void 0:ge.replace})},[s,n,u,Ba]);A.useEffect(()=>{Ir&&(a==null?void 0:a.kind)!=="task"&&!l.current&&go.current.lastTaskId&&(y!=null&&y.includes(go.current.lastTaskId))&&(l.current=go.current.lastTaskId,j(Z=>Z+1))},[Ir,a==null?void 0:a.kind,go,y]),AW({shouldBlockFn:({next:Z})=>{var ge;return((ge=U_(Z.pathname))==null?void 0:ge.projectId)!==n&&[...un.current.values()].some(Te=>Te.needsProtection)&&!vR(bN())},enableBeforeUnload:()=>[...un.current.values()].some(Z=>Z.needsProtection)});const Pa=A.useRef(null);A.useEffect(()=>{const Z=Nb(i.href);!ee||!Ir||!Z||(Tb.queue({lastLocation:Z,railOpen:Ln,panelWidth:ot,experimentsView:qe},Pa.current===Z?250:0),Pa.current=Z)},[i.href,ee,Ir,Ln,ot,qe]);const pi=(ee==null?void 0:ee.onboardingCompleted)??!1,[vo,bo]=A.useState(!1),[Ii,ol]=A.useState(null),[ll,hc]=A.useState(0),Wn=A.useCallback(()=>bo(!0),[]),Fa=A.useCallback(async Z=>{const ge=ae.current===!1,Te=await r.mutateAsync({tourCompleted:!0});ge&&Jc({name:"demo_welcome_choice",choice:Z}),ce(Be=>Be&&{...Be,tourCompleted:Te.tourCompleted}),bo(!1),Z==="explore_demo"&&hc(Be=>Be+1)},[]),Cs=A.useCallback(async()=>{await Fa("create_project"),Mi(!0)},[Fa]);A.useEffect(()=>{!n||!Il(n)||!pi||ee!=null&&ee.tourCompleted||Wn()},[n,pi,Wn,ee==null?void 0:ee.tourCompleted]);const St=(L==null?void 0:L.find(Z=>Z.id===n))??null;A.useEffect(()=>{const Z=X||ee===null?null:St==null?void 0:St.name;document.title=Z?`${qo(Z)} — OpenResearch`:"OpenResearch"},[X,ee,St]);const jr=A.useRef(n);jr.current=n;const $i=A.useCallback(Z=>{n&&Jc({name:"first_action",surface:Il(n)?"demo":"project",action:Z})},[n]);A.useEffect(()=>{o!=="chat"&&o!=="skills"&&$i("open_settings")},[o,$i]);const fs=A.useCallback((Z=!1)=>{Z&&(!M.current.isTask||M.current.pane)||($i("open_experiment"),zr(!0),D({kind:"home",view:"experiments"},Z))},[D,$i]),pf=()=>{$.refetch(),V.refetch(),w.refetch()},cl=A.useRef(!1);A.useEffect(()=>{if(!ee||cl.current)return;cl.current=!0,oe.current=ee.preferredAgent;const Z=cS()??ee.workspace;Z&&(hi(Z.railOpen),Wt(Math.min(Z.panelWidth,Hp())),at(Z.experimentsView))},[ee]),A.useEffect(()=>{y&&l.current&&!y.includes(l.current)&&(l.current=null)},[y]);const pc=A.useRef(Promise.resolve()),ha=A.useRef(0),Ha=A.useCallback(Z=>{const ge=++ha.current;ce(Be=>Be&&{...Be,preferredAgent:Z});const Te=pc.current.then(()=>r.mutateAsync({preferredAgent:Z})).then(Be=>{oe.current=Be.preferredAgent,ge===ha.current&&ce(Re=>Re&&{...Re,preferredAgent:Be.preferredAgent})}).catch(Be=>{throw ge===ha.current&&ce(Re=>Re&&{...Re,preferredAgent:oe.current}),Be});return pc.current=Te.catch(()=>{}),Te},[]);A.useEffect(()=>{const Z=()=>{Wt(ge=>Math.min(ge,Hp())),da(window.innerWidth>=jM)};return window.addEventListener("resize",Z),()=>window.removeEventListener("resize",Z)},[]);const mc=A.useCallback(Z=>{$t.current=!1,jt.current.clear(),mt.current.clear();const ge=++we.current;rt.fetchQuery(_u(Z)).then(Te=>{if(jr.current!==Z||Vt.current!==Z||we.current!==ge)return;jt.current=new Map(Te.map(Re=>[Re.id,Re]));const Be=[...mt.current.values()].some(Re=>{const st=jt.current.get(Re.id);return!st||st.status!=="running"&&st.updatedAt<=Re.updatedAt});mt.current.clear();for(const Re of Te){const st=Xe.current.get(Re.id);(!st||st.updatedAt{var st;return Te.some(it=>it.id===Re&&it.status==="running")?Re:((st=Te.find(it=>it.status==="running"))==null?void 0:st.id)??null}),Be&&fs(!0)}).catch(()=>{we.current===ge&&(mt.current.clear(),Ie(!0))})},[fs]);A.useEffect(()=>{if(n)return Vt.current=n,Xe.current.clear(),_t.current.clear(),kpn(n).catch(()=>{}),mc(n),()=>{we.current++}},[mc,n]);const Ah=A.useCallback(()=>{fn(!0),ir("artifacts")},[ir]),gc=A.useCallback(()=>{pn(!0),ir("terminal")},[ir]),pa=u??(n?`project:${n}`:null);A.useEffect(()=>{Rn(h?b==="terminal"?pa:Z=>Z===pa?Z:null:null)},[h,b,pa]),cgn({onReconnect:()=>{const Z=jr.current;Z&&(Vt.current=Z,Xe.current.clear(),_t.current.clear(),mc(Z))},onRun:Z=>{if(Z.projectId!==jr.current||Z.projectId!==Vt.current)return;const ge=Xe.current.get(Z.id),Te=_t.current.has(Z.id);if(ge&&ge.updatedAt>Z.updatedAt||(Xe.current.set(Z.id,Z),_t.current.add(Z.id),Il(Z.projectId)&&ol(st=>Z.status==="running"?st??Z.id:st===Z.id?null:st),Z.status!=="running"||(ge==null?void 0:ge.status)==="running"))return;const Be=jt.current.get(Z.id),Re=$t.current&&(!Be||Be.status!=="running"&&Be.updatedAt<=Z.updatedAt);Te&&ge||Re?fs(!0):$t.current||mt.current.set(Z.id,Z)}});const Du=A.useCallback(()=>Kt("project"),[]),ei=A.useCallback((Z,ge="overview",Te="preview",Be)=>{$i("open_experiment");const Re={id:Z,view:ge};Dt(st=>st.some(it=>nw(it,Re))?st:[...st,Re]),Js(Re,Te,Be)},[Js]),Lu=A.useCallback((Z,ge="preview")=>{const Te=Oe.current.filter(Re=>Re.id===Z||Re.id.startsWith(Z)),Be=Te.length===1?Te[0]:null;Be&&ei(Be.experimentId,"terminal",ge,Be.id)},[ei]),Iu=A.useMemo(()=>new Map(_e.map(Z=>{var ge;return[Z.id,((ge=Z.title)==null?void 0:ge.trim())||Z.slug||Bl()]})),[_e,H]),qa=AM(Iu),Rh=A.useMemo(()=>{const Z=new Map;for(const ge of He)Z.set(ge.id,qa.get(ge.experimentId)??Bl());return Z},[qa,He,H]),ul=AM(Rh),mf=A.useCallback(Z=>{const ge=ul.get(Z);if(ge)return ge;const Te=[...ul].filter(([Be])=>Be.startsWith(Z));return Te.length===1?Te[0][1]:""},[ul]),$u=A.useCallback(Z=>{const ge=qa.get(Z);if(ge)return ge;const Te=[...qa].filter(([Be])=>Be.startsWith(Z));return Te.length===1?Te[0][1]:""},[qa]),vc=A.useCallback((Z,ge="preview")=>{const Te=ct.current.filter(Be=>Be.id===Z||Be.id.startsWith(Z));Te.length===1&&ei(Te[0].id,"overview",ge)},[ei]),Mh=A.useCallback(Z=>{const ge=yt.findIndex(Te=>nw(Te,Z));ge!==-1&&(Dt(Te=>Te.filter((Be,Re)=>Re!==ge)),Ss(Z,At(b)===At(Z)))},[yt,Ss,b]),Es=A.useCallback((Z,ge="preview")=>{Z.line!=null&&k(Re=>Re+1);const Te=jr.current;if(Te){const Re=Ls(Te,Oi.current,Z);ks.current.fileTabs.some(st=>s_(st,Z))||C.current.delete(Re),N.current.add(Re)}const Be=LI(Z);gt(Re=>{const st=Re.findIndex(Ht=>s_(Ht,Z));if(st===-1)return[...Re,Be];const it=Re.slice();return it[st]=Be,it}),Js(Z,ge)},[Js]),bc=A.useCallback((Z,ge,Te,Be,Re,st)=>{const it=L==null?void 0:L.find(As=>As.id===n),Ht=RBn(Z,it==null?void 0:it.repoPath,ge,(it==null?void 0:it.artifactsDir)??(it==null?void 0:it.filesDir),it==null?void 0:it.slug);if(!Ht)return null;const Gn=Re?ct.current.find(As=>As.id===Re||Re.length>=6&&As.id.startsWith(Re)):void 0,$r=Te??(Gn==null?void 0:Gn.branchName),Vr=Ht.source==null||Ht.source==="repo";return $r&&Vr&&(Ht.ref=$r),st&&!Ht.ref&&Vr&&(Ht.branchLabel=st),Be!=null&&(Ht.line=Be),Ht},[L,n]),_l=A.useCallback((Z,ge,Te,Be,Re,st,it="preview")=>{const Ht=bc(Z,ge,Te,Be,Re,st);Ht&&Es(Ht,it)},[Es,bc]),gf=A.useCallback(Z=>Es({path:Z,source:"artifacts"},"keepOpen"),[Es]),Bu=A.useCallback((Z,ge,Te,Be,Re,st="preview")=>{const it=bc(Z,ge,Re,Te,Be);it&&Es(it,st)},[Es,bc]),mi=A.useCallback((Z,ge)=>{Gr(Z),ge()},[Gr]),vf=A.useCallback(Z=>{var Be;const ge=Ue.findIndex(Re=>s_(Re,Z));if(ge===-1)return;const Te=n?Ls(n,u,Z):null;Te&&((Be=un.current.get(Te))!=null&&Be.needsProtection)&&!vR(bN())||(gt(Re=>Re.filter((st,it)=>it!==ge)),Te&&(ur.current.delete(Te),un.current.delete(Te),N.current.delete(Te),C.current.delete(Te),delete E.current[Te]),u===bd&&s_(Z,{path:Q2,source:"artifacts"})&&rr(!1),Ss(Z,At(b)===At(Z)))},[u,Ue,Ss,n,b]),Oh=A.useCallback(Z=>{Z.lineScrollRequest!==void 0&&m(Z.lineScrollRequest)},[]),Dh=A.useCallback((Z,ge,Te,Be="preview")=>{const Re={kind:"plan",sessionId:ge,promptId:Te,plan:Z};mr(st=>{const it=st.findIndex(Gn=>Gn.promptId===Te);if(it===-1)return[...st,Re];const Ht=st.slice();return Ht[it]=Re,Ht}),Js(Re,Be)},[Js]),Lh=A.useCallback(Z=>{const ge=Kn.findIndex(Te=>Te.promptId===Z.promptId);ge!==-1&&(mr(Te=>Te.filter((Be,Re)=>Re!==ge)),Ss(Z,At(b)===At(Z)))},[Ss,Kn,b]),Pu=A.useCallback((Z,ge,Te,Be="preview")=>{const Re={kind:"subagent",sessionId:Z,spawnPartId:ge,label:Te};ho(st=>st.some(it=>it.spawnPartId===ge)?st:[...st,Re]),Js(Re,Be)},[Js]),Ih=A.useCallback(Z=>{const ge=gr.findIndex(Te=>Te.spawnPartId===Z.spawnPartId);ge!==-1&&(ho(Te=>Te.filter((Be,Re)=>Re!==ge)),Ss(Z,At(b)===At(Z)))},[Ss,b,gr]),[yc,bf]=A.useState({});A.useEffect(()=>{if(bf(it=>{const Ht=new Set(gr.map(Gn=>Gn.spawnPartId));return Object.keys(it).every(Gn=>Ht.has(Gn))?it:Object.fromEntries(Object.entries(it).filter(([Gn])=>Ht.has(Gn)))}),gr.length===0)return;let Z=!0;const ge=new Set,Te=(it,Ht,Gn)=>{bf($r=>{var As;let Vr=$r;for(const Bi of Ht)if(!(Gn&&ge.has(Bi.spawnPartId)))for(const _n of it){const $s=Yv(_n.parts,Bi.spawnPartId);if(!$s)continue;Gn||ge.add(Bi.spawnPartId);const vi={label:jTn($s),running:((As=$s.state)==null?void 0:As.status)==="running"},yr=Vr[Bi.spawnPartId];(!yr||yr.label!==vi.label||yr.running!==vi.running)&&(Vr===$r&&(Vr={...$r}),Vr[Bi.spawnPartId]=vi);break}return Vr})};let Be=0;const Re=()=>{const it=++Be;for(const Ht of new Set(gr.map(Gn=>Gn.sessionId)))rt.fetchQuery({...Zl(Ht),staleTime:0}).then(({messages:Gn})=>{Z&&it===Be&&Te(Gn,gr.filter($r=>$r.sessionId===Ht),!0)}).catch(()=>{})};Re();const st=Sv(it=>{if(it.type==="reconnected"){ge.clear(),Re();return}if(it.type!=="message")return;const Ht=gr.filter(Gn=>Gn.sessionId===it.sessionId);Ht.length&&Te([it.message],Ht,!1)});return()=>{Z=!1,st()}},[gr]);const fl=A.useCallback((Z,ge,Te="files",Be="preview")=>{const Re={code:!0,experimentId:Z,branch:ge,view:Te,toggled:new Set};Xs(st=>st.some(it=>Xf(it,Re))?st.map(it=>Xf(it,Re)?{...it,experimentId:Z,view:Te}:it):[...st,Re]),Js(Re,Be)},[Js]),yo=A.useCallback((Z,ge)=>{Xs(Te=>Te.map(Be=>Xf(Be,Z)?{...Be,...ge}:Be)),ge.view&&D(Wl({...Z,...ge}))},[]),dl=A.useCallback(Z=>{const ge=Qs.findIndex(Te=>Xf(Te,Z));ge!==-1&&(Xs(Te=>Te.filter((Be,Re)=>Re!==ge)),Ss(Z,At(b)===At(Z)))},[Qs,Ss,b]),xc=A.useCallback(()=>{cn(!0),ir("files")},[ir]),xo=A.useCallback(Z=>{Z==="experiments"?zr(!1):Z==="files"?cn(!1):Z==="terminal"?(pn(!1),Rn(null)):fn(!1),Ss(Z,b===Z)},[Ss,b]),yf=Z=>{Z.preventDefault(),Z.currentTarget.setPointerCapture(Z.pointerId);const Te=document.body.style.userSelect;document.body.style.userSelect="none";const Be=Ut,Re=Z.clientX,st=ot;let it=!1;function Ht(){window.removeEventListener("pointermove",Gn),window.removeEventListener("pointerup",Ht),window.removeEventListener("pointercancel",Ht),document.body.style.userSelect=Te}function Gn($r){if(Be){const _n=$r.clientX-Re;if(it||_nAs+DBn){us(!0);return}us(!1);const Bi=Math.min(Math.max(Vr,jv),As);Wt(Bi)}window.addEventListener("pointermove",Gn),window.addEventListener("pointerup",Ht),window.addEventListener("pointercancel",Ht)},xf=(Z,ge)=>{F(Te=>Te?TM(Te,Z):[Z]),s.navigate({href:`/projects/${encodeURIComponent(Z.id)}${ge?"/settings/git":""}`}),ge&&Vn(ge,"error")},ds=typeof b=="object"&&"id"in b?b:null,yn=typeof b=="object"&&"path"in b?b:null,wc=(yn==null?void 0:yn.source)==="artifacts"&&je?L0(je.entries,yn.path):null,$h=wc?`${wc.modifiedAt}:${wc.size}`:null,hl=u===bd&&tn?Ue.find(Z=>s_(Z,{path:Q2,source:"artifacts"})):void 0,Fu=hl?[hl]:[],Zr=typeof b=="object"&&"kind"in b&&b.kind==="plan"?b:null,ti=Zr==null?void 0:Zr.sessionId,gi=Zr==null?void 0:Zr.promptId,Hu=!!(ti&&gi&&(y!=null&&y.includes(ti))),Ua=ft({...Zl(ti??""),enabled:Hu,subscribed:Hu}),ne=A.useMemo(()=>{var ge;if(!ti||!gi||!Ua.data)return null;const Z=Ua.data.messages.flatMap(Te=>{const Be=Yv(Te.parts,gi);return Be?[Be]:[]})[0];return{key:`${ti}:${gi}`,text:((ge=Z==null?void 0:Z.prompt)==null?void 0:ge.plan)??null}},[ti,gi,Ua.data]),be=typeof b=="object"&&"kind"in b&&b.kind==="subagent"?b:null,De=typeof b=="object"&&"code"in b?b:null,$e=De?Qs.find(Z=>Xf(Z,De))??null:null,Ke=new Map;for(const Z of[...yt,...Ue,...Kn,...gr,...Qs])Ke.set(At(Z),Z);const Nn=hl?At(hl):null,Tn=xs.filter(Z=>Z!==Nn).map(Z=>Ke.get(Z)).filter(kyn),Tr=Z=>Ur!==null&&At(Ur)===At(Z),xn=Z=>f.jsx(Ol,{active:yn!==null&&s_(yn,Z),label:Z.path.split("/").pop()||Z.path,icon:f.jsx(vI,{size:12,className:"shrink-0"}),preview:Tr(Z),onSelect:()=>ir(Z),onPromote:()=>Gr(Z),onClose:()=>vf(Z)},`file:${uS(Z)}`),br=ds?_e.find(Z=>Z.id===ds.id)??null:null,Ga=$e?_e.find(Z=>Z.id===$e.experimentId&&Z.branchName===$e.branch)??null:null,Bh=Z=>{var Te,Be;if("path"in Z)return xn(Z);if("id"in Z){const Re=_e.find(st=>st.id===Z.id);return f.jsx(Ol,{active:ds!==null&&nw(ds,Z),label:Re?Re.title||Re.slug:"…",icon:Z.view==="overview"?f.jsx(gvn,{size:12,className:"shrink-0"}):f.jsx(co,{size:12,className:"shrink-0"}),preview:Tr(Z),onSelect:()=>ir(Z),onPromote:()=>Gr(Z),onClose:()=>Mh(Z)},At(Z))}if("kind"in Z&&Z.kind==="plan")return f.jsx(Ol,{active:Zr!==null&&Zr.promptId===Z.promptId,label:oD(),icon:f.jsx(rS,{size:12,className:"shrink-0"}),preview:Tr(Z),onSelect:()=>ir(Z),onPromote:()=>Gr(Z),onClose:()=>Lh(Z)},At(Z));if("kind"in Z)return f.jsx(Ol,{active:be!==null&&be.spawnPartId===Z.spawnPartId,label:((Te=yc[Z.spawnPartId])==null?void 0:Te.label)??Z.label??zue(),shimmer:((Be=yc[Z.spawnPartId])==null?void 0:Be.running)??!1,icon:f.jsx(aS,{size:12,className:"shrink-0"}),preview:Tr(Z),onSelect:()=>ir(Z),onPromote:()=>Gr(Z),onClose:()=>Ih(Z)},At(Z));const ge=_e.find(Re=>Re.id===Z.experimentId);return f.jsx(Ol,{active:$e!==null&&Xf($e,Z),label:(ge==null?void 0:ge.slug)??Z.branch,icon:f.jsx(q_,{size:12,className:"shrink-0"}),preview:Tr(Z),onSelect:()=>ir(Z),onPromote:()=>Gr(Z),onClose:()=>dl(Z)},At(Z))};if(!a||a.kind==="resume")return null;if(X)return f.jsxs("div",{className:"app flex flex-col h-full",children:[f.jsxs("div",{className:$p,children:[f.jsx("p",{children:X}),f.jsx(Me,{variant:"primary",onClick:pf,children:Vs()})]}),e.kind==="ssh"&&f.jsx(A3,{runtime:e,corner:!0})]});if(L&&!St)return f.jsxs("div",{className:$p,children:[so(),f.jsx(Me,{onClick:()=>q(null),children:Xp()})]});if($a&&!Ir)return f.jsxs("div",{className:$p,children:[f.jsx("p",{role:"alert",children:$a}),f.jsx(Me,{onClick:Zn,children:Vs()})]});if(L===null||ee===null||!js||y===null)return f.jsxs("div",{className:"app flex flex-col h-full",children:[f.jsx("div",{className:$p,children:f.jsx(Rt,{})}),e.kind==="ssh"&&f.jsx(A3,{runtime:e,corner:!0})]});if(!St||(a==null?void 0:a.kind)==="task"&&u&&!(y!=null&&y.includes(u)))return f.jsxs("div",{className:$p,children:[so(),f.jsx(Me,{onClick:()=>q(null),children:Xp()})]});const Ts=f.jsx(iRn,{projectName:((Va=L.find(Z=>Z.id===n))==null?void 0:Va.name)??"",onHome:()=>void s.navigate({to:"/projects"}),onNewProject:()=>Mi(!0),onRepository:()=>al("git"),onCollapse:()=>hi(!1)});return f.jsxs("div",{className:"app flex flex-col h-full",children:[e.kind==="local"&&f.jsx(VI,{}),e.kind==="local"&&f.jsx(w$,{status:Y}),$a&&f.jsxs("div",{role:"alert",className:"flex items-center gap-2 px-4 py-2 text-subtext",children:[f.jsx("span",{children:$a}),f.jsx(Me,{onClick:Zn,children:Vs()})]}),f.jsxs("div",{className:`app-body workspace-body relative flex flex-1 min-h-0 py-0 px-3.5 ${ws?"workspace-card-visible":""}`,children:[n&&f.jsx(qTn,{projectId:n,projectName:(St==null?void 0:St.name)??"",railHeader:Ts,railOpen:Ln,onShowRail:()=>hi(!0),mainView:o,onSelectMainView:al,onOpenFile:Bu,onOpenRun:Lu,runExperimentName:mf,onOpenExperiment:vc,experimentName:$u,onOpenPlan:Dh,onOpenSubagent:Pu,composerFocusNonce:ll,demoRunningRunId:Ii,runtime:e,onOpenDemoWelcome:St&&Il(St.id)?Wn:void 0,activeSessionId:u,onActiveSessionChange:Li,preferredAgent:ee.preferredAgent,onPreferredAgentChange:Ha,children:o==="skills"?f.jsx(zAn,{}):o!=="chat"?f.jsx(fjn,{remote:e.kind==="ssh",tab:o,project:St,onProjectUpdate:Z=>{F(ge=>ge?TM(ge,Z):[Z])},onSelectTab:al}):null}),o==="chat"&&f.jsx(U3n,{expanded:ws,experiments:_e,runs:He,onOpenExperiment:(Z,ge)=>ei(Z,"overview","preview",ge),rightOffset:h?ot+28:void 0,activeView:h&&(b==="files"||b==="artifacts"||b==="experiments"||b==="terminal")?b:null,projectId:St.id,onCompute:()=>al("compute"),sessionId:u,busy:((ni=w.data)==null?void 0:ni.some(Z=>Z.id===u&&Z.busy))??!1,onChanges:()=>{sr("changes"),xc()},onFiles:()=>{sr("files"),xc()},onTerminal:gc,onArtifacts:Ah,onExperiments:()=>fs()}),o==="chat"&&h&&f.jsxs("aside",{className:`right-pane relative shrink-0 min-w-0 flex flex-col mt-5 me-0 mb-5 ms-3.5 bg-canvas [&.max]:fixed [&.max]:inset-2.5 [&.max]:m-0 [&.max]:z-60 [&.max]:shadow-panel-max border border-border rounded-lg overflow-hidden shadow-elevated ${Ut?"max":""}`,style:Ut?void 0:{width:ot},"data-onboarding":"experiments",children:[f.jsx("div",{className:`panel-resizer absolute start-0 top-0 bottom-0 w-1.5 z-30 [&:hover]:bg-resizer-hover [&:active]:bg-resizer-hover ${Ut?"cursor-e-resize":"cursor-col-resize"}`,title:Ut?Sle():gle(),onPointerDown:yf}),f.jsxs("div",{className:"tabs flex items-end gap-0 pt-1 pe-1.5 pb-0 ps-2 h-10 border-b border-b-border bg-background shrink-0",children:[f.jsxs("div",{className:"tab-strip flex items-end gap-0.5 flex-1 min-w-0 overflow-x-auto [scrollbar-width:none] [&::-webkit-scrollbar]:hidden",children:[Fu.map(xn),kt&&f.jsx(Ol,{active:b==="files",label:X4(),icon:f.jsx(q_,{size:12,className:"shrink-0"}),onSelect:()=>ir("files"),onClose:()=>xo("files")}),Dn&&f.jsx(Ol,{active:b==="terminal",label:yv(),icon:f.jsx(co,{size:12,className:"shrink-0"}),onSelect:()=>ir("terminal"),onClose:()=>xo("terminal")}),jn&&f.jsx(Ol,{active:b==="artifacts",label:ZO(),icon:f.jsx(tS,{size:12,className:"shrink-0"}),onSelect:()=>ir("artifacts"),onClose:()=>xo("artifacts")}),Xr&&f.jsx(Ol,{active:b==="experiments",label:JO(),icon:f.jsx(Jd,{size:12,className:"shrink-0"}),onSelect:()=>ir("experiments"),onClose:()=>xo("experiments")}),Tn.map(Bh)]}),f.jsxs("div",{className:"panel-controls inline-flex items-center gap-0.5 self-center py-0 px-1.5 shrink-0",children:[f.jsx(Ft,{title:Ut?DE():OE(),"aria-label":Ut?DE():OE(),onClick:()=>us(Z=>!Z),children:Ut?f.jsx(bbn,{size:14}):f.jsx(mbn,{size:14})}),f.jsx(Ft,{title:p0(),"aria-label":p0(),onClick:()=>{P(),us(!1)},children:f.jsx(_r,{size:14})})]})]}),b==="terminal"&&Dn?null:!Ir||((t==null?void 0:t.kind)==="experiment"||(t==null?void 0:t.kind)==="code")&&!pe||(t==null?void 0:t.kind)==="experiment"&&t.runId&&!Ee?f.jsx(Ea,{children:f.jsx(Rt,{})}):ds&&(!br||_&&!He.some(Z=>Z.id===_&&Z.experimentId===ds.id))||De&&!Ga||t&&"sessionId"in t&&t.sessionId&&!(y!=null&&y.includes(t.sessionId))?f.jsx(Ea,{children:f.jsx("div",{className:"p-6 text-subtext",children:so()})}):b==="artifacts"?f.jsx(Ea,{children:St&&f.jsx(bAn,{project:St,artifacts:je,onOpenFile:gf,canRenameFile:Z=>{var ge;return!((ge=un.current.get(Ls(St.id,u,{path:Z,source:"artifacts"})))!=null&&ge.needsProtection)}},St.id)}):b==="experiments"?f.jsxs(Ea,{children:[f.jsxs("div",{className:"pane-toolbar flex shrink-0 flex-wrap items-center gap-2 bg-background px-3 pt-2.5 pb-2",children:[f.jsx("span",{className:"flex-1"}),f.jsxs("div",{className:"experiments-toolbar-controls inline-flex items-center gap-[5px]",children:[f.jsxs("div",{className:"option-picker relative inline-flex",ref:Yt,children:[f.jsx(Ft,{size:"small",ref:Qe,className:"experiment-scope-trigger",active:ln==="agent",title:qle({scope:ln==="agent"?RE():ME()}),"aria-label":pce(),"aria-expanded":wt,onClick:()=>Tt(Z=>!Z),children:f.jsx(Yvn,{size:16,strokeWidth:2.5})}),wt&&f.jsxs("div",{className:"option-menu absolute bottom-[calc(100%_+_8px)] start-0 max-h-95 flex flex-col bg-background border border-border rounded-lg shadow-menu z-50 overflow-hidden min-w-47.5 p-1.5 [&.align-right]:start-auto [&.align-right]:end-0 [&.drop-down]:bottom-auto [&.drop-down]:top-[calc(100%_+_4px)] [&.session-menu]:start-auto [&.session-menu]:end-1.5 [&.session-menu]:top-[calc(100%_-_2px)] [&.session-menu]:min-w-35 drop-down align-right experiment-scope-menu [&_.model-item]:whitespace-nowrap [&_.model-item:disabled]:text-muted [&_.model-item:disabled]:cursor-default [&_.model-item:disabled:hover]:bg-transparent",children:[f.jsxs(nr,{"aria-pressed":ln==="agent",disabled:!u||!rn,title:u?rn?void 0:wce():Lce(),onClick:()=>{Kt("agent"),Tt(!1)},children:[f.jsx("span",{children:RE()}),ln==="agent"&&f.jsx(Ji,{size:13})]}),f.jsxs(nr,{"aria-pressed":ln==="project",onClick:()=>{Kt("project"),Tt(!1)},children:[f.jsx("span",{children:ME()}),ln==="project"&&f.jsx(Ji,{size:13})]})]})]}),f.jsxs("div",{className:"seg inline-flex items-center gap-0.5 rounded-md bg-hover-subtle [&_button]:font-medium [&_button]:text-text [&_button]:rounded-sm [&_button:not(:disabled):hover]:text-text [&_button.active]:bg-background [&_button.active]:shadow-segment [&_button:disabled]:text-muted [&_button:disabled]:cursor-default experiments-view-toggle p-0.5 [&_button]:py-0.5 [&_button]:px-2 [&_button]:text-sm",role:"group","aria-label":Xle(),children:[f.jsx("button",{className:qe==="table"?"active":"","aria-pressed":qe==="table",onClick:()=>at("table"),children:Due()}),f.jsx("button",{className:qe==="tree"?"active":"","aria-pressed":qe==="tree",onClick:()=>at("tree"),children:Hue()})]})]})]}),f.jsx("div",{className:"pane-content flex-1 min-h-0 relative bg-background",children:qe==="tree"?St&&f.jsx(TBn,{experiments:_e,runs:qn,project:St,onOpenView:ei,onOpenCode:fl,agentSessionId:ln==="agent"?u:null,onShowProjectScope:Du,viewport:Dr,onViewportChange:Ia}):f.jsx(aRn,{runs:qn,emptyHint:ln==="agent"&&_e.length>0?jce():void 0,experiments:An,onOpen:(Z,ge)=>{ei(Z.id,"overview",ge)},onOpenLogs:(Z,ge,Te)=>{ei(Z,"terminal",Te,ge)},onOpenCode:(Z,ge)=>{const Te=_e.find(Be=>Be.id===Z);Te&&fl(Te.id,Te.branchName,"files",ge)},onCancel:bL})})]}):b==="files"?f.jsx(Ea,{children:St?f.jsx(oAn,{sessionId:u??void 0,project:St,view:Zs,toggled:fa,onViewChange:sr,onToggledChange:il,canRenameFile:Z=>{var ge;return!((ge=un.current.get(Ls(St.id,u,{path:Z,source:"repo",sessionId:u??void 0})))!=null&&ge.needsProtection)},onOpenFile:(Z,ge,Te,Be)=>_l(Z,ge,Te,void 0,void 0,void 0,Be)},`files:${u??`project:${St.id}`}`):f.jsx("div",{className:"code-tab flex flex-col h-full min-h-0 wt-tab",children:f.jsx(Cd,{children:f.jsxs("div",{className:"wt-empty flex flex-col items-center gap-2.5 py-12 px-6 text-center text-muted [&_>_svg]:text-subtext [&_p]:m-0 [&_p]:max-w-80 [&_p]:text-sm",children:[f.jsx(bI,{size:22}),f.jsx("p",{children:oue()})]})})})}):yn?f.jsx(Ea,{children:n&&f.jsx(sRn,{remote:e.kind==="ssh",restored:C.current.has(Ls(n,u,yn)),onRestoreActivated:()=>{const Z=Ls(n,u,yn);C.current.delete(Z),N.current.add(Z)},showSource:E.current[Ls(n,u,yn)]??!1,onShowSourceChange:Z=>{E.current[Ls(n,u,yn)]=Z,j(ge=>ge+1)},projectId:n,path:yn.path,source:yn.source,sessionId:yn.source==="artifacts"?u??void 0:yn.sessionId,gitRef:yn.ref,line:yn.line,branchLabel:MBn(yn,St==null?void 0:St.baselineBranch),artifactVersion:$h,artifactEntries:yn.source==="artifacts"?je==null?void 0:je.entries:void 0,bufferSession:Lt(Ls(n,u,yn)),onOpenFile:(Z,ge,Te,Be)=>mi(yn,()=>_l(Z,ge,Te,void 0,void 0,void 0,Be)),scrollPosition:ur.current.get(Ls(n,u,yn)),onScrollPositionChange:Z=>{ur.current.set(Ls(n,u,yn),Z),po()},lineScrollRequest:yn.lineScrollRequest,onLineScrollRequestHandled:()=>Oh(yn),onEdit:()=>Gr(yn)},Ls(n,u,yn))}):Zr?f.jsx(Ea,{children:f.jsx("div",{className:"pane-content flex-1 min-h-0 relative plan-tab-content overflow-y-auto bg-background py-4.5 px-6 [&_.md]:max-w-readable",children:f.jsx(Wo,{text:(ne==null?void 0:ne.key)===`${Zr.sessionId}:${Zr.promptId}`?ne.text??so():((wo=Kn.find(Z=>Z.promptId===Zr.promptId))==null?void 0:wo.plan)||eD(),onOpenFile:(Z,ge,Te,Be,Re)=>mi(Zr,()=>_l(Z,Zr.sessionId,Be,ge,Te,void 0,Re))})})}):be?f.jsx(VTn,{projectId:n,sessionId:be.sessionId,spawnPartId:be.spawnPartId,onOpenFile:(Z,ge,Te,Be,Re)=>mi(be,()=>Bu(Z,be.sessionId,ge,Te,Be,Re)),onOpenRun:(Z,ge)=>mi(be,()=>Lu(Z,ge)),runExperimentName:mf,onOpenExperiment:(Z,ge)=>mi(be,()=>vc(Z,ge)),experimentName:$u,onOpenSubagent:(Z,ge,Te)=>mi(be,()=>Pu(be.sessionId,Z,ge,Te))},be.spawnPartId):$e?f.jsx(Ea,{children:n&&St&&$e&&Ga&&f.jsx(aAn,{projectId:n,project:St,experiment:Ga,view:$e.view,toggled:$e.toggled,onViewChange:Z=>yo($e,{view:Z}),onToggledChange:Z=>yo($e,{toggled:Z}),onOpenFile:(Z,ge,Te,Be)=>mi($e,()=>_l(Z,ge,Te,void 0,void 0,Ga.branchName,Be))},`code:${$e.branch}`)}):f.jsx(Ea,{children:ds&&br&&St&&f.jsx(MAn,{experiment:br,project:St,view:ds.view,runs:He,selectedRunId:_,onSelectRun:U,parentExperiment:_e.find(Z=>Z.id===br.parentExperimentId)??null,onOpenView:(Z,ge,Te)=>{mi(ds,()=>ei(br.id,Z,Te,ge))},onOpenCode:(Z,ge)=>mi(ds,()=>fl(br.id,br.branchName,Z,ge))},`${ds.id}:${ds.view}`)}),Dn&&Un!==null&&Un===pa&&St&&f.jsx(Ea,{className:b==="terminal"?void 0:"hidden",children:f.jsx(V3n,{projectId:St.id,sessionId:u,active:b==="terminal"},pa)})]})]}),_c&&f.jsx(GI,{remote:e.kind==="ssh",onClose:()=>Mi(!1),onCreated:(Z,ge)=>{Mi(!1),xf(Z,ge)}}),vo&&St&&Il(St.id)&&f.jsx(oRn,{onClose:Fa,onCreateProject:Cs})]})}const ik=Xo()({validateSearch:e=>({pane:oS(e.pane)}),beforeLoad:({location:e})=>{if(!U_(e.pathname))throw sK()},component:$Bn});function $Bn(){const{projectId:e}=ik.useParams(),{pane:n}=ik.useSearch(),t=_i(),r=FO({select:s=>s.location});return A.useEffect(()=>{const s=BBn(r.searchStr);s!==null&&t.navigate({href:`${r.pathname}${s}${r.hash?`#${r.hash}`:""}`,replace:!0})},[r,t]),f.jsxs(f.Fragment,{children:[f.jsx(f0,{}),f.jsx(IBn,{projectId:e,pane:n,runtime:BI()},e)]})}function BBn(e){const n=new URLSearchParams(e);if(!n.has("pane"))return null;try{if(n.getAll("pane").length===1&&oS(JSON.parse(n.get("pane")??"")))return null}catch{}n.delete("pane");const t=n.toString();return t?`?${t}`:""}const CU=Xo()({component:PBn});function PBn(){const{projectId:e}=CU.useParams();return f.jsx(h2n,{projectId:e})}const FBn=Xo()({}),HBn=Xo()({}),qBn=Xo()({}),UBn=Xo()({}),GBn=m2n.update({id:"/",path:"/",getParentRoute:()=>Ab}),b7=g2n.update({id:"/projects",path:"/projects",getParentRoute:()=>Ab}),VBn=v2n.update({id:"/remote-launch",path:"/remote-launch",getParentRoute:()=>Ab}),KBn=b2n.update({id:"/",path:"/",getParentRoute:()=>b7}),Th=ik.update({id:"/$projectId",path:"/$projectId",getParentRoute:()=>b7}),WBn=CU.update({id:"/",path:"/",getParentRoute:()=>Th}),QBn=FBn.update({id:"/skills",path:"/skills",getParentRoute:()=>Th}),XBn=HBn.update({id:"/settings/$tab",path:"/settings/$tab",getParentRoute:()=>Th}),YBn=qBn.update({id:"/tasks/$sessionId",path:"/tasks/$sessionId",getParentRoute:()=>Th}),ZBn=UBn.update({id:"/tasks/new",path:"/tasks/new",getParentRoute:()=>Th}),JBn={ProjectsProjectIdSkillsRoute:QBn,ProjectsProjectIdIndexRoute:WBn,ProjectsProjectIdSettingsTabRoute:XBn,ProjectsProjectIdTasksSessionIdRoute:YBn,ProjectsProjectIdTasksNewRoute:ZBn},ePn=Th._addFileChildren(JBn),tPn={ProjectsProjectIdRoute:ePn,ProjectsIndexRoute:KBn},nPn=b7._addFileChildren(tPn),rPn={IndexRoute:GBn,ProjectsRoute:nPn,RemoteLaunchRoute:VBn},sPn=Ab._addFileChildren(rPn)._addFileTypes(),iPn=EW({routeTree:sPn,context:{queryClient:rt},trailingSlash:"never",defaultPendingComponent:WS,defaultErrorComponent:QS,defaultNotFoundComponent:f2n}),aPn=z();document.documentElement.lang=aPn;document.documentElement.dir="ltr";OV.createRoot(document.getElementById("root")).render(f.jsxs(A.StrictMode,{children:[f.jsx(WG,{client:rt,children:f.jsx(jW,{router:iPn})}),f.jsx(Z1n,{})]})); +`)),h=u.reduce((_,p)=>_.concat(...p),[]);return[u,h]}return[[],[]]},[e]);return T.useEffect(()=>{const l=(n==null?void 0:n.target)??cM,u=(n==null?void 0:n.actInsideInputWithModifier)??!0;if(e!==null){const h=m=>{var v,b;if(s.current=m.ctrlKey||m.metaKey||m.shiftKey||m.altKey,(!s.current||s.current&&!u)&&jq(m))return!1;const k=_M(m.code,o);if(i.current.add(m[k]),uM(a,i.current,!1)){const w=((b=(v=m.composedPath)==null?void 0:v.call(m))==null?void 0:b[0])||m.target,y=(w==null?void 0:w.nodeName)==="BUTTON"||(w==null?void 0:w.nodeName)==="A";n.preventDefault!==!1&&(s.current||!y)&&m.preventDefault(),r(!0)}},_=m=>{const x=_M(m.code,o);uM(a,i.current,!0)?(r(!1),i.current.clear()):i.current.delete(m[x]),m.key==="Meta"&&i.current.clear(),s.current=!1},p=()=>{i.current.clear(),r(!1)};return l==null||l.addEventListener("keydown",h),l==null||l.addEventListener("keyup",_),window.addEventListener("blur",p),window.addEventListener("contextmenu",p),()=>{l==null||l.removeEventListener("keydown",h),l==null||l.removeEventListener("keyup",_),window.removeEventListener("blur",p),window.removeEventListener("contextmenu",p)}}},[e,r]),t}function uM(e,n,t){return e.filter(r=>t||r.length===n.size).some(r=>r.every(s=>n.has(s)))}function _M(e,n){return n.includes(e)?"code":"key"}const WIn=()=>{const e=Nr();return T.useMemo(()=>({zoomIn:async n=>{const{panZoom:t}=e.getState();return t?t.scaleBy(1.2,n):!1},zoomOut:async n=>{const{panZoom:t}=e.getState();return t?t.scaleBy(1/1.2,n):!1},zoomTo:async(n,t)=>{const{panZoom:r}=e.getState();return r?r.scaleTo(n,t):!1},getZoom:()=>e.getState().transform[2],setViewport:async(n,t)=>{const{transform:[r,s,i],panZoom:a}=e.getState();return a?(await a.setViewport({x:n.x??r,y:n.y??s,zoom:n.zoom??i},t),!0):!1},getViewport:()=>{const[n,t,r]=e.getState().transform;return{x:n,y:t,zoom:r}},setCenter:async(n,t,r)=>e.getState().setCenter(n,t,r),fitBounds:async(n,t)=>{const{width:r,height:s,minZoom:i,maxZoom:a,panZoom:o}=e.getState(),l=u7(n,r,s,i,a,(t==null?void 0:t.padding)??.1);return o?(await o.setViewport(l,{duration:t==null?void 0:t.duration,ease:t==null?void 0:t.ease,interpolate:t==null?void 0:t.interpolate}),!0):!1},screenToFlowPosition:(n,t={})=>{const{transform:r,snapGrid:s,snapToGrid:i,domNode:a}=e.getState();if(!a)return n;const{x:o,y:l}=a.getBoundingClientRect(),u={x:n.x-o,y:n.y-l},h=t.snapGrid??s,_=t.snapToGrid??i;return Tm(u,r,_,h)},flowToScreenPosition:n=>{const{transform:t,domNode:r}=e.getState();if(!r)return n;const{x:s,y:i}=r.getBoundingClientRect(),a=hh(n,t);return{x:a.x+s,y:a.y+i}}}),[])};function Yq(e,n){const t=[],r=new Map,s=[];for(const i of e)if(i.type==="add"){s.push(i);continue}else if(i.type==="remove"||i.type==="replace")r.set(i.id,[i]);else{const a=r.get(i.id);a?a.push(i):r.set(i.id,[i])}for(const i of n){const a=r.get(i.id);if(!a){t.push(i);continue}if(a[0].type==="remove")continue;if(a[0].type==="replace"){t.push({...a[0].item});continue}const o={...i};for(const l of a)QIn(l,o);t.push(o)}return s.length&&s.forEach(i=>{i.index!==void 0?t.splice(i.index,0,{...i.item}):t.push({...i.item})}),t}function QIn(e,n){switch(e.type){case"select":{n.selected=e.selected;break}case"position":{typeof e.position<"u"&&(n.position=e.position),typeof e.dragging<"u"&&(n.dragging=e.dragging);break}case"dimensions":{typeof e.dimensions<"u"&&(n.measured={...e.dimensions},e.setAttributes&&((e.setAttributes===!0||e.setAttributes==="width")&&(n.width=e.dimensions.width),(e.setAttributes===!0||e.setAttributes==="height")&&(n.height=e.dimensions.height))),typeof e.resizing=="boolean"&&(n.resizing=e.resizing);break}}}function XIn(e,n){return Yq(e,n)}function YIn(e,n){return Yq(e,n)}function f_(e,n){return{id:e,type:"select",selected:n}}function hd(e,n=new Set,t=!1){const r=[];for(const[s,i]of e){const a=n.has(s);!(i.selected===void 0&&!a)&&i.selected!==a&&(t&&(i.selected=a),r.push(f_(i.id,a)))}return r}function fM({items:e=[],lookup:n}){var s;const t=[],r=new Map(e.map(i=>[i.id,i]));for(const[i,a]of e.entries()){const o=n.get(a.id),l=((s=o==null?void 0:o.internals)==null?void 0:s.userNode)??o;l!==void 0&&l!==a&&t.push({id:a.id,item:a,type:"replace"}),l===void 0&&t.push({item:a,type:"add",index:i})}for(const[i]of n)r.get(i)===void 0&&t.push({id:i,type:"remove"});return t}function dM(e){return{id:e.id,type:"remove"}}const ZIn=Cq();function JIn(e,n,t={}){return HLn(e,n,{...t,onError:t.onError??ZIn})}const hM=e=>NLn(e),e$n=e=>yq(e);function Zq(e){return T.forwardRef(e)}const t$n=typeof window<"u"?T.useLayoutEffect:T.useEffect;function pM(e){const[n,t]=T.useState(BigInt(0)),[r]=T.useState(()=>n$n(()=>t(s=>s+BigInt(1))));return t$n(()=>{const s=r.get();s.length&&(e(s),r.reset())},[n]),r}function n$n(e){let n=[];return{get:()=>n,reset:()=>{n=[]},push:t=>{n.push(t),e()}}}const Jq=T.createContext(null);function r$n({children:e}){const n=Nr(),t=T.useCallback(o=>{const{nodes:l=[],setNodes:u,hasDefaultNodes:h,onNodesChange:_,nodeLookup:p,fitViewQueued:m,onNodesChangeMiddlewareMap:x}=n.getState();let k=l;for(const b of o)k=typeof b=="function"?b(k):b;let v=fM({items:k,lookup:p});for(const b of x.values())v=b(v);h&&u(k),v.length>0?_==null||_(v):m&&window.requestAnimationFrame(()=>{const{fitViewQueued:b,nodes:w,setNodes:y}=n.getState();b&&y(w)})},[]),r=pM(t),s=T.useCallback(o=>{const{edges:l=[],setEdges:u,hasDefaultEdges:h,onEdgesChange:_,edgeLookup:p}=n.getState();let m=l;for(const x of o)m=typeof x=="function"?x(m):x;h?u(m):_&&_(fM({items:m,lookup:p}))},[]),i=pM(s),a=T.useMemo(()=>({nodeQueue:r,edgeQueue:i}),[]);return f.jsx(Jq.Provider,{value:a,children:e})}function s$n(){const e=T.useContext(Jq);if(!e)throw new Error("useBatchContext must be used within a BatchProvider");return e}const i$n=e=>!!e.panZoom;function g7(){const e=WIn(),n=Nr(),t=s$n(),r=zn(i$n),s=T.useMemo(()=>{const i=_=>n.getState().nodeLookup.get(_),a=_=>{t.nodeQueue.push(_)},o=_=>{t.edgeQueue.push(_)},l=_=>{var b,w;const{nodeLookup:p,nodeOrigin:m}=n.getState(),x=hM(_)?_:p.get(_.id),k=x.parentId?Nq(x.position,x.measured,x.parentId,p,m):x.position,v={...x,position:k,width:((b=x.measured)==null?void 0:b.width)??x.width,height:((w=x.measured)==null?void 0:w.height)??x.height};return q0(v)},u=(_,p,m={replace:!1})=>{a(x=>x.map(k=>{if(k.id===_){const v=typeof p=="function"?p(k):p;return m.replace&&hM(v)?v:{...k,...v}}return k}))},h=(_,p,m={replace:!1})=>{o(x=>x.map(k=>{if(k.id===_){const v=typeof p=="function"?p(k):p;return m.replace&&e$n(v)?v:{...k,...v}}return k}))};return{getNodes:()=>n.getState().nodes.map(_=>({..._})),getNode:_=>{var p;return(p=i(_))==null?void 0:p.internals.userNode},getInternalNode:i,getEdges:()=>{const{edges:_=[]}=n.getState();return _.map(p=>({...p}))},getEdge:_=>n.getState().edgeLookup.get(_),setNodes:a,setEdges:o,addNodes:_=>{const p=Array.isArray(_)?_:[_];t.nodeQueue.push(m=>[...m,...p])},addEdges:_=>{const p=Array.isArray(_)?_:[_];t.edgeQueue.push(m=>[...m,...p])},toObject:()=>{const{nodes:_=[],edges:p=[],transform:m}=n.getState(),[x,k,v]=m;return{nodes:_.map(b=>({...b})),edges:p.map(b=>({...b})),viewport:{x,y:k,zoom:v}}},deleteElements:async({nodes:_=[],edges:p=[]})=>{const{nodes:m,edges:x,onNodesDelete:k,onEdgesDelete:v,triggerNodeChanges:b,triggerEdgeChanges:w,onDelete:y,onBeforeDelete:C}=n.getState(),{nodes:E,edges:N}=await RLn({nodesToRemove:_,edgesToRemove:p,nodes:m,edges:x,onBeforeDelete:C}),A=N.length>0,j=E.length>0;if(A){const M=N.map(dM);v==null||v(N),w(M)}if(j){const M=E.map(dM);k==null||k(E),b(M)}return(j||A)&&(y==null||y({nodes:E,edges:N})),{deletedNodes:E,deletedEdges:N}},getIntersectingNodes:(_,p=!0,m)=>{const x=qR(_),k=x?_:l(_),v=m!==void 0;return k?(m||n.getState().nodes).filter(b=>{const w=n.getState().nodeLookup.get(b.id);if(w&&!x&&(b.id===_.id||!w.internals.positionAbsolute))return!1;const y=q0(v?b:w),C=ob(y,k);return p&&C>0||C>=y.width*y.height||C>=k.width*k.height}):[]},isNodeIntersecting:(_,p,m=!0)=>{const k=qR(_)?_:l(_);if(!k)return!1;const v=ob(k,p);return m&&v>0||v>=p.width*p.height||v>=k.width*k.height},updateNode:u,updateNodeData:(_,p,m={replace:!1})=>{u(_,x=>{const k=typeof p=="function"?p(x):p;return m.replace?{...x,data:k}:{...x,data:{...x.data,...k}}},m)},updateEdge:h,updateEdgeData:(_,p,m={replace:!1})=>{h(_,x=>{const k=typeof p=="function"?p(x):p;return m.replace?{...x,data:k}:{...x,data:{...x.data,...k}}},m)},getNodesBounds:_=>{const{nodeLookup:p,nodeOrigin:m}=n.getState();return zLn(_,{nodeLookup:p,nodeOrigin:m})},getHandleConnections:({type:_,id:p,nodeId:m})=>{var x;return Array.from(((x=n.getState().connectionLookup.get(`${m}-${_}${p?`-${p}`:""}`))==null?void 0:x.values())??[])},getNodeConnections:({type:_,handleId:p,nodeId:m})=>{var x;return Array.from(((x=n.getState().connectionLookup.get(`${m}${_?p?`-${_}-${p}`:`-${_}`:""}`))==null?void 0:x.values())??[])},fitView:async _=>{const p=n.getState().fitViewResolver??DLn();return n.setState({fitViewQueued:!0,fitViewOptions:_,fitViewResolver:p}),t.nodeQueue.push(m=>[...m]),p.promise}}},[]);return T.useMemo(()=>({...s,...e,viewportInitialized:r}),[r])}const mM=e=>e.selected,a$n=typeof window<"u"?window:void 0;function o$n({deleteKeyCode:e,multiSelectionKeyCode:n}){const t=Nr(),{deleteElements:r}=g7(),s=G0(e,{actInsideInputWithModifier:!1}),i=G0(n,{target:a$n});T.useEffect(()=>{if(s){const{edges:a,nodes:o}=t.getState();r({nodes:o.filter(mM),edges:a.filter(mM)}),t.setState({nodesSelectionActive:!1})}},[s]),T.useEffect(()=>{t.setState({multiSelectionActive:i})},[i])}function l$n(e){const n=Nr();T.useEffect(()=>{const t=()=>{var s,i,a,o;if(!e.current||!(((i=(s=e.current).checkVisibility)==null?void 0:i.call(s))??!0))return!1;const r=_7(e.current);(r.height===0||r.width===0)&&((o=(a=n.getState()).onError)==null||o.call(a,"004",uo.error004())),n.setState({width:r.width||500,height:r.height||500})};if(e.current){t(),window.addEventListener("resize",t);const r=new ResizeObserver(()=>t());return r.observe(e.current),()=>{window.removeEventListener("resize",t),r&&e.current&&r.unobserve(e.current)}}},[])}const Oy={position:"absolute",width:"100%",height:"100%",top:0,left:0},c$n=e=>({userSelectionActive:e.userSelectionActive,lib:e.lib,connectionInProgress:e.connection.inProgress});function u$n({onPaneContextMenu:e,zoomOnScroll:n=!0,zoomOnPinch:t=!0,panOnScroll:r=!1,panOnScrollSpeed:s=.5,panOnScrollMode:i=$_.Free,zoomOnDoubleClick:a=!0,panOnDrag:o=!0,defaultViewport:l,translateExtent:u,minZoom:h,maxZoom:_,zoomActivationKeyCode:p,preventScrolling:m=!0,children:x,noWheelClassName:k,noPanClassName:v,onViewportChange:b,isControlledViewport:w,paneClickDistance:y,selectionOnDrag:C}){const E=Nr(),N=T.useRef(null),{userSelectionActive:A,lib:j,connectionInProgress:M}=zn(c$n,Cr),L=G0(p),I=T.useRef();l$n(N);const B=T.useCallback(q=>{b==null||b({x:q[0],y:q[1],zoom:q[2]}),w||E.setState({transform:q})},[b,w]);return T.useEffect(()=>{if(N.current){I.current=vIn({domNode:N.current,minZoom:h,maxZoom:_,translateExtent:u,viewport:l,onDraggingChange:H=>E.setState(Y=>Y.paneDragging===H?Y:{paneDragging:H}),onPanZoomStart:(H,Y)=>{const{onViewportChangeStart:te,onMoveStart:$}=E.getState();$==null||$(H,Y),te==null||te(Y)},onPanZoom:(H,Y)=>{const{onViewportChange:te,onMove:$}=E.getState();$==null||$(H,Y),te==null||te(Y)},onPanZoomEnd:(H,Y)=>{const{onViewportChangeEnd:te,onMoveEnd:$}=E.getState();$==null||$(H,Y),te==null||te(Y)}});const{x:q,y:U,zoom:W}=I.current.getViewport();return E.setState({panZoom:I.current,transform:[q,U,W],domNode:N.current.closest(".react-flow")}),()=>{var H;(H=I.current)==null||H.destroy()}}},[]),T.useEffect(()=>{var q;(q=I.current)==null||q.update({onPaneContextMenu:e,zoomOnScroll:n,zoomOnPinch:t,panOnScroll:r,panOnScrollSpeed:s,panOnScrollMode:i,zoomOnDoubleClick:a,panOnDrag:o,zoomActivationKeyPressed:L,preventScrolling:m,noPanClassName:v,userSelectionActive:A,noWheelClassName:k,lib:j,onTransformChange:B,connectionInProgress:M,selectionOnDrag:C,paneClickDistance:y})},[e,n,t,r,s,i,a,o,L,m,v,A,k,j,B,M,C,y]),f.jsx("div",{className:"react-flow__renderer",ref:N,style:Oy,children:x})}const _$n=e=>({userSelectionActive:e.userSelectionActive,userSelectionRect:e.userSelectionRect});function f$n(){const{userSelectionActive:e,userSelectionRect:n}=zn(_$n,Cr);return e&&n?f.jsx("div",{className:"react-flow__selection react-flow__container",style:{width:n.width,height:n.height,transform:`translate(${n.x}px, ${n.y}px)`}}):null}const v4=(e,n)=>t=>{t.target===n.current&&(e==null||e(t))},d$n=e=>({userSelectionActive:e.userSelectionActive,elementsSelectable:e.elementsSelectable,dragging:e.paneDragging,panBy:e.panBy,autoPanSpeed:e.autoPanSpeed});function h$n({isSelecting:e,selectionKeyPressed:n,selectionMode:t=H0.Full,panOnDrag:r,autoPanOnSelection:s,paneClickDistance:i,selectionOnDrag:a,onSelectionStart:o,onSelectionEnd:l,onPaneClick:u,onPaneContextMenu:h,onPaneScroll:_,onPaneMouseEnter:p,onPaneMouseMove:m,onPaneMouseLeave:x,children:k}){const v=T.useRef(0),b=Nr(),{userSelectionActive:w,elementsSelectable:y,dragging:C,panBy:E,autoPanSpeed:N}=zn(d$n,Cr),A=y&&(e||w),j=T.useRef(null),M=T.useRef(),L=T.useRef(new Set),I=T.useRef(new Set),B=T.useRef(!1),q=T.useRef(!1),U=T.useRef({x:0,y:0}),W=T.useRef(!1),H=X=>{if(q.current||B.current||b.getState().connection.inProgress){q.current=!1,B.current=!1;return}u==null||u(X),b.getState().resetSelectedElements(),b.setState({nodesSelectionActive:!1})},Y=X=>{if(Array.isArray(r)&&(r!=null&&r.includes(2))){X.preventDefault();return}h==null||h(X)},te=_?X=>_(X):void 0,$=X=>{q.current&&(X.stopPropagation(),q.current=!1)},D=X=>{var Oe,Xe;const{domNode:oe,transform:le}=b.getState();if(M.current=oe==null?void 0:oe.getBoundingClientRect(),!M.current)return;const _e=X.target===j.current;if(!_e&&!!X.target.closest(".nokey")||!e||!(a&&_e||n)||X.button!==0||!X.isPrimary)return;(Xe=(Oe=X.target)==null?void 0:Oe.setPointerCapture)==null||Xe.call(Oe,X.pointerId),q.current=!1;const{x:Ie,y:ze}=ao(X.nativeEvent,M.current),He=Tm({x:Ie,y:ze},le);b.setState({userSelectionRect:{width:0,height:0,startX:He.x,startY:He.y,x:Ie,y:ze}}),_e||(X.stopPropagation(),X.preventDefault())};function F(X,oe){const{userSelectionRect:le}=b.getState();if(!le)return;const{transform:_e,nodeLookup:pe,edgeLookup:Ee,connectionLookup:Ie,triggerNodeChanges:ze,triggerEdgeChanges:He,defaultEdgeOptions:Oe}=b.getState(),Xe={x:le.startX,y:le.startY},{x:_t,y:Vt}=hh(Xe,_e),$t={startX:Xe.x,startY:Xe.y,x:X<_t?X:_t,y:oect.id)),I.current=new Set;const we=(Oe==null?void 0:Oe.selectable)??!0;for(const ct of L.current){const ye=Ie.get(ct);if(ye)for(const{edgeId:je}of ye.values()){const qe=Ee.get(je);qe&&(qe.selectable??we)&&I.current.add(je)}}if(!UR(jt,L.current)){const ct=hd(pe,L.current,!0);ze(ct)}if(!UR(mt,I.current)){const ct=hd(Ee,I.current);He(ct)}b.setState({userSelectionRect:$t,userSelectionActive:!0,nodesSelectionActive:!1})}function G(){if(!s||!M.current)return;const[X,oe]=c7(U.current,M.current,N);E({x:X,y:oe}).then(le=>{if(!q.current||!le){v.current=requestAnimationFrame(G);return}const{x:_e,y:pe}=U.current;F(_e,pe),v.current=requestAnimationFrame(G)})}const V=()=>{cancelAnimationFrame(v.current),v.current=0,W.current=!1};T.useEffect(()=>()=>V(),[]);const ee=X=>{const{userSelectionRect:oe,transform:le,resetSelectedElements:_e}=b.getState();if(!M.current||!oe)return;const{x:pe,y:Ee}=ao(X.nativeEvent,M.current);U.current={x:pe,y:Ee};const Ie=hh({x:oe.startX,y:oe.startY},le);if(!q.current){const ze=n?0:i;if(Math.hypot(pe-Ie.x,Ee-Ie.y)<=ze)return;_e(),o==null||o(X)}q.current=!0,W.current||(G(),W.current=!0),F(pe,Ee)},ce=X=>{var oe,le;if(!A){X.target===j.current&&b.getState().connection.inProgress&&(B.current=!0);return}X.button===0&&((le=(oe=X.target)==null?void 0:oe.releasePointerCapture)==null||le.call(oe,X.pointerId),!w&&X.target===j.current&&b.getState().userSelectionRect&&(H==null||H(X)),b.setState({userSelectionActive:!1,userSelectionRect:null}),q.current&&(l==null||l(X),b.setState({nodesSelectionActive:L.current.size>0})),V())},ae=X=>{var oe,le;(le=(oe=X.target)==null?void 0:oe.releasePointerCapture)==null||le.call(oe,X.pointerId),V()},re=r===!0||Array.isArray(r)&&r.includes(0);return f.jsxs("div",{className:cs(["react-flow__pane",{draggable:re,dragging:C,selection:e}]),onClick:A?void 0:v4(H,j),onContextMenu:v4(Y,j),onWheel:v4(te,j),onPointerEnter:A?void 0:p,onPointerMove:A?ee:m,onPointerUp:ce,onPointerCancel:A?ae:void 0,onPointerDownCapture:A?D:void 0,onClickCapture:A?$:void 0,onPointerLeave:x,ref:j,style:Oy,children:[k,f.jsx(f$n,{})]})}function nk({id:e,store:n,unselect:t=!1,nodeRef:r}){const{addSelectedNodes:s,unselectNodesAndEdges:i,multiSelectionActive:a,nodeLookup:o,onError:l}=n.getState(),u=o.get(e);if(!u){l==null||l("012",uo.error012(e));return}n.setState({nodesSelectionActive:!1}),u.selected?(t||u.selected&&a)&&(i({nodes:[u],edges:[]}),requestAnimationFrame(()=>{var h;return(h=r==null?void 0:r.current)==null?void 0:h.blur()})):s([e])}function eU({nodeRef:e,disabled:n=!1,noDragClassName:t,handleSelector:r,nodeId:s,isSelectable:i,nodeClickDistance:a}){const o=Nr(),[l,u]=T.useState(!1),h=T.useRef();return T.useEffect(()=>{h.current=sIn({getStoreItems:()=>o.getState(),onNodeMouseDown:_=>{nk({id:_,store:o,nodeRef:e})},onDragStart:()=>{u(!0)},onDragStop:()=>{u(!1)}})},[]),T.useEffect(()=>{if(!(n||!e.current||!h.current))return h.current.update({noDragClassName:t,handleSelector:r,domNode:e.current,isSelectable:i,nodeId:s,nodeClickDistance:a}),()=>{var _;(_=h.current)==null||_.destroy()}},[t,r,n,i,e,s,a]),l}const p$n=e=>n=>n.selected&&(n.draggable||e&&typeof n.draggable>"u");function tU(){const e=Nr();return T.useCallback(t=>{const{nodeExtent:r,snapToGrid:s,snapGrid:i,nodesDraggable:a,onError:o,updateNodePositions:l,nodeLookup:u,nodeOrigin:h}=e.getState(),_=new Map,p=p$n(a),m=s?i[0]:5,x=s?i[1]:5,k=t.direction.x*m*t.factor,v=t.direction.y*x*t.factor;for(const[,b]of u){if(!p(b))continue;let w={x:b.internals.positionAbsolute.x+k,y:b.internals.positionAbsolute.y+v};s&&(w=jm(w,i));const{position:y,positionAbsolute:C}=xq({nodeId:b.id,nextPosition:w,nodeLookup:u,nodeExtent:r,nodeOrigin:h,onError:o});b.position=y,b.internals.positionAbsolute=C,_.set(b.id,b)}l(_)},[])}const v7=T.createContext(null),m$n=v7.Provider;v7.Consumer;const nU=()=>T.useContext(v7),g$n=e=>({connectOnClick:e.connectOnClick,noPanClassName:e.noPanClassName,rfId:e.rfId}),rU=T.createContext(null);function v$n({children:e}){const n=zn(g$n,Cr);return f.jsx(rU.Provider,{value:n,children:e})}function b$n(){const e=T.useContext(rU);if(!e)throw new Error("useHandleConfig must be used within a HandleConfigProvider");return e}const y$n={connectingFrom:!1,connectingTo:!1,clickConnecting:!1,isPossibleEndHandle:!0,connectionInProcess:!1,clickConnectionInProcess:!1,valid:!1},x$n=(e,n,t)=>r=>{const{connectionClickStartHandle:s,connectionMode:i,connection:a}=r,{fromHandle:o,toHandle:l,isValid:u}=a;if(!o&&!s)return y$n;const h=(l==null?void 0:l.nodeId)===e&&(l==null?void 0:l.id)===n&&(l==null?void 0:l.type)===t;return{connectingFrom:(o==null?void 0:o.nodeId)===e&&(o==null?void 0:o.id)===n&&(o==null?void 0:o.type)===t,connectingTo:h,clickConnecting:(s==null?void 0:s.nodeId)===e&&(s==null?void 0:s.id)===n&&(s==null?void 0:s.type)===t,isPossibleEndHandle:i===fh.Strict?(o==null?void 0:o.type)!==t:e!==(o==null?void 0:o.nodeId)||n!==(o==null?void 0:o.id),connectionInProcess:!!o,clickConnectionInProcess:!!s,valid:h&&u}};function w$n({type:e="source",position:n=zt.Top,isValidConnection:t,isConnectable:r=!0,isConnectableStart:s=!0,isConnectableEnd:i=!0,id:a,onConnect:o,children:l,className:u,onMouseDown:h,onTouchStart:_,...p},m){var W,H;const x=a||null,k=e==="target",v=Nr(),b=nU(),{connectOnClick:w,noPanClassName:y,rfId:C}=b$n(),{connectingFrom:E,connectingTo:N,clickConnecting:A,isPossibleEndHandle:j,connectionInProcess:M,clickConnectionInProcess:L,valid:I}=zn(x$n(b,x,e),Cr);b||(H=(W=v.getState()).onError)==null||H.call(W,"010",uo.error010());const B=Y=>{const{defaultEdgeOptions:te,onConnect:$,hasDefaultEdges:D}=v.getState(),F={...te,...Y};if(D){const{edges:G,setEdges:V,onError:ee}=v.getState();V(JIn(F,G,{onError:ee}))}$==null||$(F),o==null||o(F)},q=Y=>{if(!b)return;const te=Tq(Y.nativeEvent);if(s&&(te&&Y.button===0||!te)){const $=v.getState();tk.onPointerDown(Y.nativeEvent,{handleDomNode:Y.currentTarget,autoPanOnConnect:$.autoPanOnConnect,connectionMode:$.connectionMode,connectionRadius:$.connectionRadius,domNode:$.domNode,nodeLookup:$.nodeLookup,lib:$.lib,isTarget:k,handleId:x,nodeId:b,flowId:$.rfId,panBy:$.panBy,cancelConnection:$.cancelConnection,onConnectStart:$.onConnectStart,onConnectEnd:(...D)=>{var F,G;return(G=(F=v.getState()).onConnectEnd)==null?void 0:G.call(F,...D)},updateConnection:$.updateConnection,onConnect:B,isValidConnection:t||((...D)=>{var F,G;return((G=(F=v.getState()).isValidConnection)==null?void 0:G.call(F,...D))??!0}),getTransform:()=>v.getState().transform,getFromHandle:()=>v.getState().connection.fromHandle,autoPanSpeed:$.autoPanSpeed,dragThreshold:$.connectionDragThreshold})}te?h==null||h(Y):_==null||_(Y)},U=Y=>{const{onClickConnectStart:te,onClickConnectEnd:$,connectionClickStartHandle:D,connectionMode:F,isValidConnection:G,lib:V,rfId:ee,nodeLookup:ce,connection:ae}=v.getState();if(!b||!D&&!s)return;if(!D){te==null||te(Y.nativeEvent,{nodeId:b,handleId:x,handleType:e}),v.setState({connectionClickStartHandle:{nodeId:b,type:e,id:x}});return}const re=zq(Y.target),X=t||G,{connection:oe,isValid:le}=tk.isValid(Y.nativeEvent,{handle:{nodeId:b,id:x,type:e},connectionMode:F,fromNodeId:D.nodeId,fromHandleId:D.id||null,fromType:D.type,isValidConnection:X,flowId:ee,doc:re,lib:V,nodeLookup:ce});le&&oe&&B(oe);const _e=structuredClone(ae);delete _e.inProgress,_e.toPosition=_e.toHandle?_e.toHandle.position:null,$==null||$(Y,_e),v.setState({connectionClickStartHandle:null})};return f.jsx("div",{"data-handleid":x,"data-nodeid":b,"data-handlepos":n,"data-id":`${C}-${b}-${x}-${e}`,className:cs(["react-flow__handle",`react-flow__handle-${n}`,"nodrag",y,u,{source:!k,target:k,connectable:r,connectablestart:s,connectableend:i,clickconnecting:A,connectingfrom:E,connectingto:N,valid:I,connectionindicator:r&&(!M||j)&&(M||L?i:s)}]),onMouseDown:q,onTouchStart:q,onClick:w?U:void 0,ref:m,...p,children:l})}const Nu=T.memo(Zq(w$n));function k$n({data:e,isConnectable:n,sourcePosition:t=zt.Bottom}){return f.jsxs(f.Fragment,{children:[e==null?void 0:e.label,f.jsx(Nu,{type:"source",position:t,isConnectable:n})]})}function S$n({data:e,isConnectable:n,targetPosition:t=zt.Top,sourcePosition:r=zt.Bottom}){return f.jsxs(f.Fragment,{children:[f.jsx(Nu,{type:"target",position:t,isConnectable:n}),e==null?void 0:e.label,f.jsx(Nu,{type:"source",position:r,isConnectable:n})]})}function C$n(){return null}function E$n({data:e,isConnectable:n,targetPosition:t=zt.Top}){return f.jsxs(f.Fragment,{children:[f.jsx(Nu,{type:"target",position:t,isConnectable:n}),e==null?void 0:e.label]})}const lb={ArrowUp:{x:0,y:-1},ArrowDown:{x:0,y:1},ArrowLeft:{x:-1,y:0},ArrowRight:{x:1,y:0}},gM={input:k$n,default:S$n,output:E$n,group:C$n};function N$n(e){var n,t,r,s;return e.internals.handleBounds===void 0?{width:e.width??e.initialWidth??((n=e.style)==null?void 0:n.width),height:e.height??e.initialHeight??((t=e.style)==null?void 0:t.height)}:{width:e.width??((r=e.style)==null?void 0:r.width),height:e.height??((s=e.style)==null?void 0:s.height)}}const z$n=e=>{const{width:n,height:t,x:r,y:s}=zm(e.nodeLookup,{filter:i=>!!i.selected});return{width:io(n)?n:null,height:io(t)?t:null,userSelectionActive:e.userSelectionActive,transformString:`translate(${e.transform[0]}px,${e.transform[1]}px) scale(${e.transform[2]}) translate(${r}px,${s}px)`}};function j$n({onSelectionContextMenu:e,noPanClassName:n,disableKeyboardA11y:t}){const r=Nr(),{width:s,height:i,transformString:a,userSelectionActive:o}=zn(z$n,Cr),l=tU(),u=T.useRef(null);T.useEffect(()=>{var m;t||(m=u.current)==null||m.focus({preventScroll:!0})},[t]);const h=!o&&s!==null&&i!==null;if(eU({nodeRef:u,disabled:!h}),!h)return null;const _=e?m=>{const x=r.getState().nodes.filter(k=>k.selected);e(m,x)}:void 0,p=m=>{Object.prototype.hasOwnProperty.call(lb,m.key)&&(m.preventDefault(),l({direction:lb[m.key],factor:m.shiftKey?4:1}))};return f.jsx("div",{className:cs(["react-flow__nodesselection","react-flow__container",n]),style:{transform:a},children:f.jsx("div",{ref:u,className:"react-flow__nodesselection-rect",onContextMenu:_,tabIndex:t?void 0:-1,onKeyDown:t?void 0:p,style:{width:s,height:i}})})}const vM=typeof window<"u"?window:void 0,T$n=e=>({nodesSelectionActive:e.nodesSelectionActive,userSelectionActive:e.userSelectionActive});function sU({children:e,onPaneClick:n,onPaneMouseEnter:t,onPaneMouseMove:r,onPaneMouseLeave:s,onPaneContextMenu:i,onPaneScroll:a,paneClickDistance:o,deleteKeyCode:l,selectionKeyCode:u,selectionOnDrag:h,selectionMode:_,onSelectionStart:p,onSelectionEnd:m,multiSelectionKeyCode:x,panActivationKeyCode:k,zoomActivationKeyCode:v,elementsSelectable:b,zoomOnScroll:w,zoomOnPinch:y,panOnScroll:C,panOnScrollSpeed:E,panOnScrollMode:N,zoomOnDoubleClick:A,panOnDrag:j,autoPanOnSelection:M,defaultViewport:L,translateExtent:I,minZoom:B,maxZoom:q,preventScrolling:U,onSelectionContextMenu:W,noWheelClassName:H,noPanClassName:Y,disableKeyboardA11y:te,onViewportChange:$,isControlledViewport:D}){const{nodesSelectionActive:F,userSelectionActive:G}=zn(T$n,Cr),V=G0(u,{target:vM}),ee=G0(k,{target:vM}),ce=ee||j,ae=ee||C,re=h&&ce!==!0,X=V||G||re;return o$n({deleteKeyCode:l,multiSelectionKeyCode:x}),f.jsx(u$n,{onPaneContextMenu:i,elementsSelectable:b,zoomOnScroll:w,zoomOnPinch:y,panOnScroll:ae,panOnScrollSpeed:E,panOnScrollMode:N,zoomOnDoubleClick:A,panOnDrag:!V&&ce,defaultViewport:L,translateExtent:I,minZoom:B,maxZoom:q,zoomActivationKeyCode:v,preventScrolling:U,noWheelClassName:H,noPanClassName:Y,onViewportChange:$,isControlledViewport:D,paneClickDistance:o,selectionOnDrag:re,children:f.jsxs(h$n,{onSelectionStart:p,onSelectionEnd:m,onPaneClick:n,onPaneMouseEnter:t,onPaneMouseMove:r,onPaneMouseLeave:s,onPaneContextMenu:i,onPaneScroll:a,panOnDrag:ce,autoPanOnSelection:M,isSelecting:!!X,selectionMode:_,selectionKeyPressed:V,paneClickDistance:o,selectionOnDrag:re,children:[e,F&&f.jsx(j$n,{onSelectionContextMenu:W,noPanClassName:Y,disableKeyboardA11y:te})]})})}sU.displayName="FlowRenderer";const A$n=T.memo(sU),R$n=e=>n=>e?l7(n.nodeLookup,{x:0,y:0,width:n.width,height:n.height},n.transform,!0).map(t=>t.id):Array.from(n.nodeLookup.keys());function M$n(e){return zn(T.useCallback(R$n(e),[e]),Cr)}const O$n=e=>e.updateNodeInternals;function D$n(){const e=zn(O$n),[n]=T.useState(()=>typeof ResizeObserver>"u"?null:new ResizeObserver(t=>{const r=new Map;t.forEach(s=>{const i=s.target.getAttribute("data-id");r.set(i,{id:i,nodeElement:s.target,force:!0})}),e(r)}));return T.useEffect(()=>()=>{n==null||n.disconnect()},[n]),n}function L$n({node:e,nodeType:n,hasDimensions:t,resizeObserver:r}){const s=Nr(),i=T.useRef(null),a=T.useRef(null),o=T.useRef(e.sourcePosition),l=T.useRef(e.targetPosition),u=T.useRef(n),h=t&&!!e.internals.handleBounds;return T.useEffect(()=>{i.current&&!e.hidden&&(!h||a.current!==i.current)&&(a.current&&(r==null||r.unobserve(a.current)),r==null||r.observe(i.current),a.current=i.current)},[h,e.hidden]),T.useEffect(()=>()=>{a.current&&(r==null||r.unobserve(a.current),a.current=null)},[]),T.useEffect(()=>{if(i.current){const _=u.current!==n,p=o.current!==e.sourcePosition,m=l.current!==e.targetPosition;(_||p||m)&&(u.current=n,o.current=e.sourcePosition,l.current=e.targetPosition,s.getState().updateNodeInternals(new Map([[e.id,{id:e.id,nodeElement:i.current,force:!0}]])))}},[e.id,n,e.sourcePosition,e.targetPosition]),i}function I$n({id:e,onClick:n,onMouseEnter:t,onMouseMove:r,onMouseLeave:s,onContextMenu:i,onDoubleClick:a,nodesDraggable:o,elementsSelectable:l,nodesConnectable:u,nodesFocusable:h,resizeObserver:_,noDragClassName:p,noPanClassName:m,disableKeyboardA11y:x,rfId:k,nodeTypes:v,nodeClickDistance:b,onError:w}){const{node:y,internals:C,isParent:E}=zn(X=>{const oe=X.nodeLookup.get(e),le=X.parentLookup.has(e);return{node:oe,internals:oe.internals,isParent:le}},Cr);let N=y.type||"default",A=(v==null?void 0:v[N])||gM[N];A===void 0&&(w==null||w("003",uo.error003(N)),N="default",A=(v==null?void 0:v.default)||gM.default);const j=!!(y.draggable||o&&typeof y.draggable>"u"),M=!!(y.selectable||l&&typeof y.selectable>"u"),L=!!(y.connectable||u&&typeof y.connectable>"u"),I=!!(y.focusable||h&&typeof y.focusable>"u"),B=Nr(),q=Eq(y),U=L$n({node:y,nodeType:N,hasDimensions:q,resizeObserver:_}),W=eU({nodeRef:U,disabled:y.hidden||!j,noDragClassName:p,handleSelector:y.dragHandle,nodeId:e,isSelectable:M,nodeClickDistance:b}),H=tU();if(y.hidden)return null;const Y=_c(y),te=N$n(y),$=M||j||n||t||r||s,D=t?X=>t(X,{...C.userNode}):void 0,F=r?X=>r(X,{...C.userNode}):void 0,G=s?X=>s(X,{...C.userNode}):void 0,V=i?X=>i(X,{...C.userNode}):void 0,ee=a?X=>a(X,{...C.userNode}):void 0,ce=X=>{const{selectNodesOnDrag:oe,nodeDragThreshold:le}=B.getState();M&&(!oe||!j||le>0)&&nk({id:e,store:B,nodeRef:U}),n&&n(X,{...C.userNode})},ae=X=>{if(!(jq(X.nativeEvent)||x)){if(mq.includes(X.key)&&M){const oe=X.key==="Escape";nk({id:e,store:B,unselect:oe,nodeRef:U})}else if(j&&y.selected&&Object.prototype.hasOwnProperty.call(lb,X.key)){X.preventDefault();const{ariaLabelConfig:oe}=B.getState();B.setState({ariaLiveMessage:oe["node.a11yDescription.ariaLiveMessage"]({direction:X.key.replace("Arrow","").toLowerCase(),x:~~C.positionAbsolute.x,y:~~C.positionAbsolute.y})}),H({direction:lb[X.key],factor:X.shiftKey?4:1})}}},re=()=>{var Ie;if(x||!((Ie=U.current)!=null&&Ie.matches(":focus-visible")))return;const{transform:X,width:oe,height:le,autoPanOnNodeFocus:_e,setCenter:pe}=B.getState();if(!_e)return;l7(new Map([[e,y]]),{x:0,y:0,width:oe,height:le},X,!0).length>0||pe(y.position.x+Y.width/2,y.position.y+Y.height/2,{zoom:X[2]})};return f.jsx("div",{className:cs(["react-flow__node",`react-flow__node-${N}`,{[m]:j},y.className,{selected:y.selected,selectable:M,parent:E,draggable:j,dragging:W}]),ref:U,style:{zIndex:C.z,transform:`translate(${C.positionAbsolute.x}px,${C.positionAbsolute.y}px)`,pointerEvents:$?"all":"none",visibility:q?"visible":"hidden",...y.style,...te},"data-id":e,"data-testid":`rf__node-${e}`,onMouseEnter:D,onMouseMove:F,onMouseLeave:G,onContextMenu:V,onClick:ce,onDoubleClick:ee,onKeyDown:I?ae:void 0,tabIndex:I?0:void 0,onFocus:I?re:void 0,role:y.ariaRole??(I?"group":void 0),"aria-roledescription":"node","aria-describedby":x?void 0:`${Wq}-${k}`,"aria-label":y.ariaLabel,...y.domAttributes,children:f.jsx(m$n,{value:e,children:f.jsx(A,{id:e,data:y.data,type:N,positionAbsoluteX:C.positionAbsolute.x,positionAbsoluteY:C.positionAbsolute.y,selected:y.selected??!1,selectable:M,draggable:j,deletable:y.deletable??!0,isConnectable:L,sourcePosition:y.sourcePosition,targetPosition:y.targetPosition,dragging:W,dragHandle:y.dragHandle,zIndex:C.z,parentId:y.parentId,...Y})})})}var $$n=T.memo(I$n);const B$n=e=>({nodesDraggable:e.nodesDraggable,nodesConnectable:e.nodesConnectable,nodesFocusable:e.nodesFocusable,elementsSelectable:e.elementsSelectable,onError:e.onError});function iU(e){const{nodesDraggable:n,nodesConnectable:t,nodesFocusable:r,elementsSelectable:s,onError:i}=zn(B$n,Cr),a=M$n(e.onlyRenderVisibleElements),o=D$n();return f.jsx("div",{className:"react-flow__nodes",style:Oy,children:a.map(l=>f.jsx($$n,{id:l,nodeTypes:e.nodeTypes,nodeExtent:e.nodeExtent,onClick:e.onNodeClick,onMouseEnter:e.onNodeMouseEnter,onMouseMove:e.onNodeMouseMove,onMouseLeave:e.onNodeMouseLeave,onContextMenu:e.onNodeContextMenu,onDoubleClick:e.onNodeDoubleClick,noDragClassName:e.noDragClassName,noPanClassName:e.noPanClassName,rfId:e.rfId,disableKeyboardA11y:e.disableKeyboardA11y,resizeObserver:o,nodesDraggable:n,nodesConnectable:t,nodesFocusable:r,elementsSelectable:s,nodeClickDistance:e.nodeClickDistance,onError:i},l))})}iU.displayName="NodeRenderer";const P$n=T.memo(iU);function F$n(e){return zn(T.useCallback(t=>{if(!e)return t.edges.map(s=>s.id);const r=[];if(t.width&&t.height)for(const s of t.edges){const i=t.nodeLookup.get(s.source),a=t.nodeLookup.get(s.target);i&&a&&BLn({sourceNode:i,targetNode:a,width:t.width,height:t.height,transform:t.transform})&&r.push(s.id)}return r},[e]),Cr)}const H$n=({color:e="none",strokeWidth:n=1})=>{const t={strokeWidth:n,...e&&{stroke:e}};return f.jsx("polyline",{className:"arrow",style:t,strokeLinecap:"round",fill:"none",strokeLinejoin:"round",points:"-5,-4 0,0 -5,4"})},q$n=({color:e="none",strokeWidth:n=1})=>{const t={strokeWidth:n,...e&&{stroke:e,fill:e}};return f.jsx("polyline",{className:"arrowclosed",style:t,strokeLinecap:"round",strokeLinejoin:"round",points:"-5,-4 0,0 -5,4 -5,-4"})},bM={[ib.Arrow]:H$n,[ib.ArrowClosed]:q$n};function U$n(e){const n=Nr();return T.useMemo(()=>{var s,i;return Object.prototype.hasOwnProperty.call(bM,e)?bM[e]:((i=(s=n.getState()).onError)==null||i.call(s,"009",uo.error009(e)),null)},[e])}const G$n=({id:e,type:n,color:t,width:r=12.5,height:s=12.5,markerUnits:i="strokeWidth",strokeWidth:a,orient:o="auto-start-reverse"})=>{const l=U$n(n);return l?f.jsx("marker",{className:"react-flow__arrowhead",id:e,markerWidth:`${r}`,markerHeight:`${s}`,viewBox:"-10 -10 20 20",markerUnits:i,orient:o,refX:"0",refY:"0",children:f.jsx(l,{color:t,strokeWidth:a})}):null},aU=({defaultColor:e,rfId:n})=>{const t=zn(i=>i.edges),r=zn(i=>i.defaultEdgeOptions),s=T.useMemo(()=>KLn(t,{id:n,defaultColor:e,defaultMarkerStart:r==null?void 0:r.markerStart,defaultMarkerEnd:r==null?void 0:r.markerEnd}),[t,r,n,e]);return s.length?f.jsx("svg",{className:"react-flow__marker","aria-hidden":"true",children:f.jsx("defs",{children:s.map(i=>f.jsx(G$n,{id:i.id,type:i.type,color:i.color,width:i.width,height:i.height,markerUnits:i.markerUnits,strokeWidth:i.strokeWidth,orient:i.orient},i.id))})}):null};aU.displayName="MarkerDefinitions";var V$n=T.memo(aU);function oU({x:e,y:n,label:t,labelStyle:r,labelShowBg:s=!0,labelBgStyle:i,labelBgPadding:a=[2,4],labelBgBorderRadius:o=2,children:l,className:u,...h}){const[_,p]=T.useState({x:1,y:0,width:0,height:0}),m=cs(["react-flow__edge-textwrapper",u]),x=T.useRef(null);return T.useEffect(()=>{if(x.current){const k=x.current.getBBox();p({x:k.x,y:k.y,width:k.width,height:k.height})}},[t]),t?f.jsxs("g",{transform:`translate(${e-_.width/2} ${n-_.height/2})`,className:m,visibility:_.width?"visible":"hidden",...h,children:[s&&f.jsx("rect",{width:_.width+2*a[0],x:-a[0],y:-a[1],height:_.height+2*a[1],className:"react-flow__edge-textbg",style:i,rx:o,ry:o}),f.jsx("text",{className:"react-flow__edge-text",y:_.height/2,dy:"0.3em",ref:x,style:r,children:t}),l]}):null}oU.displayName="EdgeText";const K$n=T.memo(oU);function Dy({path:e,labelX:n,labelY:t,label:r,labelStyle:s,labelShowBg:i,labelBgStyle:a,labelBgPadding:o,labelBgBorderRadius:l,interactionWidth:u=20,...h}){return f.jsxs(f.Fragment,{children:[f.jsx("path",{...h,d:e,fill:"none",className:cs(["react-flow__edge-path",h.className])}),u?f.jsx("path",{d:e,fill:"none",strokeOpacity:0,strokeWidth:u,className:"react-flow__edge-interaction"}):null,r&&io(n)&&io(t)?f.jsx(K$n,{x:n,y:t,label:r,labelStyle:s,labelShowBg:i,labelBgStyle:a,labelBgPadding:o,labelBgBorderRadius:l}):null]})}function yM({pos:e,x1:n,y1:t,x2:r,y2:s}){return e===zt.Left||e===zt.Right?[.5*(n+r),t]:[n,.5*(t+s)]}function lU({sourceX:e,sourceY:n,sourcePosition:t=zt.Bottom,targetX:r,targetY:s,targetPosition:i=zt.Top}){const[a,o]=yM({pos:t,x1:e,y1:n,x2:r,y2:s}),[l,u]=yM({pos:i,x1:r,y1:s,x2:e,y2:n}),[h,_,p,m]=Aq({sourceX:e,sourceY:n,targetX:r,targetY:s,sourceControlX:a,sourceControlY:o,targetControlX:l,targetControlY:u});return[`M${e},${n} C${a},${o} ${l},${u} ${r},${s}`,h,_,p,m]}function cU(e){return T.memo(({id:n,sourceX:t,sourceY:r,targetX:s,targetY:i,sourcePosition:a,targetPosition:o,label:l,labelStyle:u,labelShowBg:h,labelBgStyle:_,labelBgPadding:p,labelBgBorderRadius:m,style:x,markerEnd:k,markerStart:v,interactionWidth:b})=>{const[w,y,C]=lU({sourceX:t,sourceY:r,sourcePosition:a,targetX:s,targetY:i,targetPosition:o}),E=e.isInternal?void 0:n;return f.jsx(Dy,{id:E,path:w,labelX:y,labelY:C,label:l,labelStyle:u,labelShowBg:h,labelBgStyle:_,labelBgPadding:p,labelBgBorderRadius:m,style:x,markerEnd:k,markerStart:v,interactionWidth:b})})}const W$n=cU({isInternal:!1}),uU=cU({isInternal:!0});W$n.displayName="SimpleBezierEdge";uU.displayName="SimpleBezierEdgeInternal";function _U(e){return T.memo(({id:n,sourceX:t,sourceY:r,targetX:s,targetY:i,label:a,labelStyle:o,labelShowBg:l,labelBgStyle:u,labelBgPadding:h,labelBgBorderRadius:_,style:p,sourcePosition:m=zt.Bottom,targetPosition:x=zt.Top,markerEnd:k,markerStart:v,pathOptions:b,interactionWidth:w})=>{const[y,C,E]=Z5({sourceX:t,sourceY:r,sourcePosition:m,targetX:s,targetY:i,targetPosition:x,borderRadius:b==null?void 0:b.borderRadius,offset:b==null?void 0:b.offset,stepPosition:b==null?void 0:b.stepPosition}),N=e.isInternal?void 0:n;return f.jsx(Dy,{id:N,path:y,labelX:C,labelY:E,label:a,labelStyle:o,labelShowBg:l,labelBgStyle:u,labelBgPadding:h,labelBgBorderRadius:_,style:p,markerEnd:k,markerStart:v,interactionWidth:w})})}const fU=_U({isInternal:!1}),dU=_U({isInternal:!0});fU.displayName="SmoothStepEdge";dU.displayName="SmoothStepEdgeInternal";function hU(e){return T.memo(({id:n,...t})=>{var s;const r=e.isInternal?void 0:n;return f.jsx(fU,{...t,id:r,pathOptions:T.useMemo(()=>{var i;return{borderRadius:0,offset:(i=t.pathOptions)==null?void 0:i.offset}},[(s=t.pathOptions)==null?void 0:s.offset])})})}const Q$n=hU({isInternal:!1}),pU=hU({isInternal:!0});Q$n.displayName="StepEdge";pU.displayName="StepEdgeInternal";function mU(e){return T.memo(({id:n,sourceX:t,sourceY:r,targetX:s,targetY:i,label:a,labelStyle:o,labelShowBg:l,labelBgStyle:u,labelBgPadding:h,labelBgBorderRadius:_,style:p,markerEnd:m,markerStart:x,interactionWidth:k})=>{const[v,b,w]=Oq({sourceX:t,sourceY:r,targetX:s,targetY:i}),y=e.isInternal?void 0:n;return f.jsx(Dy,{id:y,path:v,labelX:b,labelY:w,label:a,labelStyle:o,labelShowBg:l,labelBgStyle:u,labelBgPadding:h,labelBgBorderRadius:_,style:p,markerEnd:m,markerStart:x,interactionWidth:k})})}const X$n=mU({isInternal:!1}),gU=mU({isInternal:!0});X$n.displayName="StraightEdge";gU.displayName="StraightEdgeInternal";function vU(e){return T.memo(({id:n,sourceX:t,sourceY:r,targetX:s,targetY:i,sourcePosition:a=zt.Bottom,targetPosition:o=zt.Top,label:l,labelStyle:u,labelShowBg:h,labelBgStyle:_,labelBgPadding:p,labelBgBorderRadius:m,style:x,markerEnd:k,markerStart:v,pathOptions:b,interactionWidth:w})=>{const[y,C,E]=Rq({sourceX:t,sourceY:r,sourcePosition:a,targetX:s,targetY:i,targetPosition:o,curvature:b==null?void 0:b.curvature}),N=e.isInternal?void 0:n;return f.jsx(Dy,{id:N,path:y,labelX:C,labelY:E,label:l,labelStyle:u,labelShowBg:h,labelBgStyle:_,labelBgPadding:p,labelBgBorderRadius:m,style:x,markerEnd:k,markerStart:v,interactionWidth:w})})}const Y$n=vU({isInternal:!1}),bU=vU({isInternal:!0});Y$n.displayName="BezierEdge";bU.displayName="BezierEdgeInternal";const xM={default:bU,straight:gU,step:pU,smoothstep:dU,simplebezier:uU},wM={sourceX:null,sourceY:null,targetX:null,targetY:null,sourcePosition:null,targetPosition:null,zIndex:void 0},Z$n=(e,n,t)=>t===zt.Left?e-n:t===zt.Right?e+n:e,J$n=(e,n,t)=>t===zt.Top?e-n:t===zt.Bottom?e+n:e,kM="react-flow__edgeupdater";function SM({position:e,centerX:n,centerY:t,radius:r=10,onMouseDown:s,onMouseEnter:i,onMouseOut:a,type:o}){return f.jsx("circle",{onMouseDown:s,onMouseEnter:i,onMouseOut:a,className:cs([kM,`${kM}-${o}`]),cx:Z$n(n,r,e),cy:J$n(t,r,e),r,stroke:"transparent",fill:"transparent"})}function eBn({isReconnectable:e,reconnectRadius:n,edge:t,sourceX:r,sourceY:s,targetX:i,targetY:a,sourcePosition:o,targetPosition:l,onReconnect:u,onReconnectStart:h,onReconnectEnd:_,setReconnecting:p,setUpdateHover:m}){const x=Nr(),k=(C,E)=>{if(C.button!==0)return;const{autoPanOnConnect:N,domNode:A,connectionMode:j,connectionRadius:M,lib:L,onConnectStart:I,cancelConnection:B,nodeLookup:q,rfId:U,panBy:W,updateConnection:H}=x.getState(),Y=E.type==="target",te=(F,G)=>{p(!1),_==null||_(F,t,E.type,G)},$=F=>u==null?void 0:u(t,F),D=(F,G)=>{p(!0),h==null||h(C,t,E.type),I==null||I(F,G)};tk.onPointerDown(C.nativeEvent,{autoPanOnConnect:N,connectionMode:j,connectionRadius:M,domNode:A,handleId:E.id,nodeId:E.nodeId,nodeLookup:q,isTarget:Y,edgeUpdaterType:E.type,lib:L,flowId:U,cancelConnection:B,panBy:W,isValidConnection:(...F)=>{var G,V;return((V=(G=x.getState()).isValidConnection)==null?void 0:V.call(G,...F))??!0},onConnect:$,onConnectStart:D,onConnectEnd:(...F)=>{var G,V;return(V=(G=x.getState()).onConnectEnd)==null?void 0:V.call(G,...F)},onReconnectEnd:te,updateConnection:H,getTransform:()=>x.getState().transform,getFromHandle:()=>x.getState().connection.fromHandle,dragThreshold:x.getState().connectionDragThreshold,handleDomNode:C.currentTarget})},v=C=>k(C,{nodeId:t.target,id:t.targetHandle??null,type:"target"}),b=C=>k(C,{nodeId:t.source,id:t.sourceHandle??null,type:"source"}),w=()=>m(!0),y=()=>m(!1);return f.jsxs(f.Fragment,{children:[(e===!0||e==="source")&&f.jsx(SM,{position:o,centerX:r,centerY:s,radius:n,onMouseDown:v,onMouseEnter:w,onMouseOut:y,type:"source"}),(e===!0||e==="target")&&f.jsx(SM,{position:l,centerX:i,centerY:a,radius:n,onMouseDown:b,onMouseEnter:w,onMouseOut:y,type:"target"})]})}function tBn({id:e,edgesFocusable:n,edgesReconnectable:t,elementsSelectable:r,onClick:s,onDoubleClick:i,onContextMenu:a,onMouseEnter:o,onMouseMove:l,onMouseLeave:u,reconnectRadius:h,onReconnect:_,onReconnectStart:p,onReconnectEnd:m,rfId:x,edgeTypes:k,noPanClassName:v,onError:b,disableKeyboardA11y:w}){let y=zn(pe=>pe.edgeLookup.get(e));const C=zn(pe=>pe.defaultEdgeOptions);y=C?{...C,...y}:y;let E=y.type||"default",N=(k==null?void 0:k[E])||xM[E];N===void 0&&(b==null||b("011",uo.error011(E)),E="default",N=(k==null?void 0:k.default)||xM.default);const A=!!(y.focusable||n&&typeof y.focusable>"u"),j=typeof _<"u"&&(y.reconnectable||t&&typeof y.reconnectable>"u"),M=!!(y.selectable||r&&typeof y.selectable>"u"),L=T.useRef(null),[I,B]=T.useState(!1),[q,U]=T.useState(!1),W=Nr(),{zIndex:H=y.zIndex,sourceX:Y,sourceY:te,targetX:$,targetY:D,sourcePosition:F,targetPosition:G}=zn(T.useCallback(pe=>{const Ee=pe.nodeLookup.get(y.source),Ie=pe.nodeLookup.get(y.target);if(!Ee||!Ie)return wM;const ze=VLn({id:e,sourceNode:Ee,targetNode:Ie,sourceHandle:y.sourceHandle||null,targetHandle:y.targetHandle||null,connectionMode:pe.connectionMode,onError:b}),He=$Ln({selected:y.selected,zIndex:y.zIndex,sourceNode:Ee,targetNode:Ie,elevateOnSelect:pe.elevateEdgesOnSelect,zIndexMode:pe.zIndexMode});return{...ze||wM,zIndex:He}},[y.source,y.target,y.sourceHandle,y.targetHandle,y.selected,y.zIndex]),Cr),V=T.useMemo(()=>y.markerStart?`url('#${J5(y.markerStart,x)}')`:void 0,[y.markerStart,x]),ee=T.useMemo(()=>y.markerEnd?`url('#${J5(y.markerEnd,x)}')`:void 0,[y.markerEnd,x]);if(y.hidden||Y===null||te===null||$===null||D===null)return null;const ce=pe=>{var He;const{addSelectedEdges:Ee,unselectNodesAndEdges:Ie,multiSelectionActive:ze}=W.getState();M&&(W.setState({nodesSelectionActive:!1}),y.selected&&ze?(Ie({nodes:[],edges:[y]}),(He=L.current)==null||He.blur()):Ee([e])),s&&s(pe,y)},ae=i?pe=>{i(pe,{...y})}:void 0,re=a?pe=>{a(pe,{...y})}:void 0,X=o?pe=>{o(pe,{...y})}:void 0,oe=l?pe=>{l(pe,{...y})}:void 0,le=u?pe=>{u(pe,{...y})}:void 0,_e=pe=>{var Ee;if(!w&&mq.includes(pe.key)&&M){const{unselectNodesAndEdges:Ie,addSelectedEdges:ze}=W.getState();pe.key==="Escape"?((Ee=L.current)==null||Ee.blur(),Ie({edges:[y]})):ze([e])}};return f.jsx("svg",{style:{zIndex:H},children:f.jsxs("g",{className:cs(["react-flow__edge",`react-flow__edge-${E}`,y.className,v,{selected:y.selected,animated:y.animated,inactive:!M&&!s,updating:I,selectable:M}]),onClick:ce,onDoubleClick:ae,onContextMenu:re,onMouseEnter:X,onMouseMove:oe,onMouseLeave:le,onKeyDown:A?_e:void 0,tabIndex:A?0:void 0,role:y.ariaRole??(A?"group":"img"),"aria-roledescription":"edge","data-id":e,"data-testid":`rf__edge-${e}`,"aria-label":y.ariaLabel===null?void 0:y.ariaLabel||`Edge from ${y.source} to ${y.target}`,"aria-describedby":A?`${Qq}-${x}`:void 0,ref:L,...y.domAttributes,children:[!q&&f.jsx(N,{id:e,source:y.source,target:y.target,type:y.type,selected:y.selected,animated:y.animated,selectable:M,deletable:y.deletable??!0,label:y.label,labelStyle:y.labelStyle,labelShowBg:y.labelShowBg,labelBgStyle:y.labelBgStyle,labelBgPadding:y.labelBgPadding,labelBgBorderRadius:y.labelBgBorderRadius,sourceX:Y,sourceY:te,targetX:$,targetY:D,sourcePosition:F,targetPosition:G,data:y.data,style:y.style,sourceHandleId:y.sourceHandle,targetHandleId:y.targetHandle,markerStart:V,markerEnd:ee,pathOptions:"pathOptions"in y?y.pathOptions:void 0,interactionWidth:y.interactionWidth}),j&&f.jsx(eBn,{edge:y,isReconnectable:j,reconnectRadius:h,onReconnect:_,onReconnectStart:p,onReconnectEnd:m,sourceX:Y,sourceY:te,targetX:$,targetY:D,sourcePosition:F,targetPosition:G,setUpdateHover:B,setReconnecting:U})]})})}var nBn=T.memo(tBn);const rBn=e=>({edgesFocusable:e.edgesFocusable,edgesReconnectable:e.edgesReconnectable,elementsSelectable:e.elementsSelectable,connectionMode:e.connectionMode,onError:e.onError});function yU({defaultMarkerColor:e,onlyRenderVisibleElements:n,rfId:t,edgeTypes:r,noPanClassName:s,onReconnect:i,onEdgeContextMenu:a,onEdgeMouseEnter:o,onEdgeMouseMove:l,onEdgeMouseLeave:u,onEdgeClick:h,reconnectRadius:_,onEdgeDoubleClick:p,onReconnectStart:m,onReconnectEnd:x,disableKeyboardA11y:k}){const{edgesFocusable:v,edgesReconnectable:b,elementsSelectable:w,onError:y}=zn(rBn,Cr),C=F$n(n);return f.jsxs("div",{className:"react-flow__edges",children:[f.jsx(V$n,{defaultColor:e,rfId:t}),C.map(E=>f.jsx(nBn,{id:E,edgesFocusable:v,edgesReconnectable:b,elementsSelectable:w,noPanClassName:s,onReconnect:i,onContextMenu:a,onMouseEnter:o,onMouseMove:l,onMouseLeave:u,onClick:h,reconnectRadius:_,onDoubleClick:p,onReconnectStart:m,onReconnectEnd:x,rfId:t,onError:y,edgeTypes:r,disableKeyboardA11y:k},E))]})}yU.displayName="EdgeRenderer";const sBn=T.memo(yU),iBn=e=>`translate(${e.transform[0]}px,${e.transform[1]}px) scale(${e.transform[2]})`;function aBn({children:e}){const n=zn(iBn);return f.jsx("div",{className:"react-flow__viewport xyflow__viewport react-flow__container",style:{transform:n},children:e})}function oBn(e){const n=g7(),t=T.useRef(!1);T.useEffect(()=>{!t.current&&n.viewportInitialized&&e&&(setTimeout(()=>e(n),1),t.current=!0)},[e,n.viewportInitialized])}const lBn=e=>{var n;return(n=e.panZoom)==null?void 0:n.syncViewport};function cBn(e){const n=zn(lBn),t=Nr();return T.useEffect(()=>{e&&(n==null||n(e),t.setState({transform:[e.x,e.y,e.zoom]}))},[e,n]),null}function uBn(e){return e.connection.inProgress?{...e.connection,to:Tm(e.connection.to,e.transform)}:{...e.connection}}function _Bn(e){return uBn}function fBn(e){const n=_Bn();return zn(n,Cr)}const dBn=e=>({nodesConnectable:e.nodesConnectable,isValid:e.connection.isValid,inProgress:e.connection.inProgress,width:e.width,height:e.height});function hBn({containerStyle:e,style:n,type:t,component:r}){const{nodesConnectable:s,width:i,height:a,isValid:o,inProgress:l}=zn(dBn,Cr);return!(i&&s&&l)?null:f.jsx("svg",{style:e,width:i,height:a,className:"react-flow__connectionline react-flow__container",children:f.jsx("g",{className:cs(["react-flow__connection",bq(o)]),children:f.jsx(xU,{style:n,type:t,CustomComponent:r,isValid:o})})})}const xU=({style:e,type:n=tu.Bezier,CustomComponent:t,isValid:r})=>{const{inProgress:s,from:i,fromNode:a,fromHandle:o,fromPosition:l,to:u,toNode:h,toHandle:_,toPosition:p,pointer:m}=fBn();if(!s)return;if(t)return f.jsx(t,{connectionLineType:n,connectionLineStyle:e,fromNode:a,fromHandle:o,fromX:i.x,fromY:i.y,toX:u.x,toY:u.y,fromPosition:l,toPosition:p,connectionStatus:bq(r),toNode:h,toHandle:_,pointer:m});let x="";const k={sourceX:i.x,sourceY:i.y,sourcePosition:l,targetX:u.x,targetY:u.y,targetPosition:p};switch(n){case tu.Bezier:[x]=Rq(k);break;case tu.SimpleBezier:[x]=lU(k);break;case tu.Step:[x]=Z5({...k,borderRadius:0});break;case tu.SmoothStep:[x]=Z5(k);break;default:[x]=Oq(k)}return f.jsx("path",{d:x,fill:"none",className:"react-flow__connection-path",style:e})};xU.displayName="ConnectionLine";const pBn={};function CM(e=pBn){T.useRef(e),Nr(),T.useEffect(()=>{},[e])}function mBn(){Nr(),T.useRef(!1),T.useEffect(()=>{},[])}function wU({nodeTypes:e,edgeTypes:n,onInit:t,onNodeClick:r,onEdgeClick:s,onNodeDoubleClick:i,onEdgeDoubleClick:a,onNodeMouseEnter:o,onNodeMouseMove:l,onNodeMouseLeave:u,onNodeContextMenu:h,onSelectionContextMenu:_,onSelectionStart:p,onSelectionEnd:m,connectionLineType:x,connectionLineStyle:k,connectionLineComponent:v,connectionLineContainerStyle:b,selectionKeyCode:w,selectionOnDrag:y,selectionMode:C,multiSelectionKeyCode:E,panActivationKeyCode:N,zoomActivationKeyCode:A,deleteKeyCode:j,onlyRenderVisibleElements:M,elementsSelectable:L,defaultViewport:I,translateExtent:B,minZoom:q,maxZoom:U,preventScrolling:W,defaultMarkerColor:H,zoomOnScroll:Y,zoomOnPinch:te,panOnScroll:$,panOnScrollSpeed:D,panOnScrollMode:F,zoomOnDoubleClick:G,panOnDrag:V,autoPanOnSelection:ee,onPaneClick:ce,onPaneMouseEnter:ae,onPaneMouseMove:re,onPaneMouseLeave:X,onPaneScroll:oe,onPaneContextMenu:le,paneClickDistance:_e,nodeClickDistance:pe,onEdgeContextMenu:Ee,onEdgeMouseEnter:Ie,onEdgeMouseMove:ze,onEdgeMouseLeave:He,reconnectRadius:Oe,onReconnect:Xe,onReconnectStart:_t,onReconnectEnd:Vt,noDragClassName:$t,noWheelClassName:jt,noPanClassName:mt,disableKeyboardA11y:we,nodeExtent:ct,rfId:ye,viewport:je,onViewportChange:qe}){return CM(e),CM(n),mBn(),oBn(t),cBn(je),f.jsx(A$n,{onPaneClick:ce,onPaneMouseEnter:ae,onPaneMouseMove:re,onPaneMouseLeave:X,onPaneContextMenu:le,onPaneScroll:oe,paneClickDistance:_e,deleteKeyCode:j,selectionKeyCode:w,selectionOnDrag:y,selectionMode:C,onSelectionStart:p,onSelectionEnd:m,multiSelectionKeyCode:E,panActivationKeyCode:N,zoomActivationKeyCode:A,elementsSelectable:L,zoomOnScroll:Y,zoomOnPinch:te,zoomOnDoubleClick:G,panOnScroll:$,panOnScrollSpeed:D,panOnScrollMode:F,panOnDrag:V,autoPanOnSelection:ee,defaultViewport:I,translateExtent:B,minZoom:q,maxZoom:U,onSelectionContextMenu:_,preventScrolling:W,noDragClassName:$t,noWheelClassName:jt,noPanClassName:mt,disableKeyboardA11y:we,onViewportChange:qe,isControlledViewport:!!je,children:f.jsxs(aBn,{children:[f.jsx(sBn,{edgeTypes:n,onEdgeClick:s,onEdgeDoubleClick:a,onReconnect:Xe,onReconnectStart:_t,onReconnectEnd:Vt,onlyRenderVisibleElements:M,onEdgeContextMenu:Ee,onEdgeMouseEnter:Ie,onEdgeMouseMove:ze,onEdgeMouseLeave:He,reconnectRadius:Oe,defaultMarkerColor:H,noPanClassName:mt,disableKeyboardA11y:we,rfId:ye}),f.jsx(hBn,{style:k,type:x,component:v,containerStyle:b}),f.jsx("div",{className:"react-flow__edgelabel-renderer"}),f.jsx(P$n,{nodeTypes:e,onNodeClick:r,onNodeDoubleClick:i,onNodeMouseEnter:o,onNodeMouseMove:l,onNodeMouseLeave:u,onNodeContextMenu:h,nodeClickDistance:pe,onlyRenderVisibleElements:M,noPanClassName:mt,noDragClassName:$t,disableKeyboardA11y:we,nodeExtent:ct,rfId:ye}),f.jsx("div",{className:"react-flow__viewport-portal"})]})})}wU.displayName="GraphView";const gBn=T.memo(wU),vBn=Cq(),EM=({nodes:e,edges:n,defaultNodes:t,defaultEdges:r,width:s,height:i,fitView:a,fitViewOptions:o,minZoom:l=.5,maxZoom:u=2,nodeOrigin:h,nodeExtent:_,zIndexMode:p="basic"}={})=>{const m=new Map,x=new Map,k=new Map,v=new Map,b=r??n??[],w=t??e??[],y=h??[0,0],C=_??F0;Iq(k,v,b);const{nodesInitialized:E}=ek(w,m,x,{nodeOrigin:y,nodeExtent:C,zIndexMode:p});let N=[0,0,1];if(a&&s&&i){const A=zm(m,{filter:I=>!!((I.width||I.initialWidth)&&(I.height||I.initialHeight))}),{x:j,y:M,zoom:L}=u7(A,s,i,l,u,(o==null?void 0:o.padding)??.1);N=[j,M,L]}return{rfId:"1",width:s??0,height:i??0,transform:N,nodes:w,nodesInitialized:E,nodeLookup:m,parentLookup:x,edges:b,edgeLookup:v,connectionLookup:k,onNodesChange:null,onEdgesChange:null,hasDefaultNodes:t!==void 0,hasDefaultEdges:r!==void 0,panZoom:null,minZoom:l,maxZoom:u,translateExtent:F0,nodeExtent:C,nodesSelectionActive:!1,userSelectionActive:!1,userSelectionRect:null,connectionMode:fh.Strict,domNode:null,paneDragging:!1,noPanClassName:"nopan",nodeOrigin:y,nodeDragThreshold:1,connectionDragThreshold:1,snapGrid:[15,15],snapToGrid:!1,nodesDraggable:!0,nodesConnectable:!0,nodesFocusable:!0,edgesFocusable:!0,edgesReconnectable:!0,elementsSelectable:!0,elevateNodesOnSelect:!0,elevateEdgesOnSelect:!0,selectNodesOnDrag:!0,multiSelectionActive:!1,fitViewQueued:a??!1,fitViewOptions:o,fitViewResolver:null,connection:{...vq},connectionClickStartHandle:null,connectOnClick:!0,ariaLiveMessage:"",autoPanOnConnect:!0,autoPanOnNodeDrag:!0,autoPanOnNodeFocus:!0,autoPanSpeed:15,connectionRadius:20,onError:vBn,isValidConnection:void 0,onSelectionChangeHandlers:[],lib:"react",debug:!1,ariaLabelConfig:gq,zIndexMode:p,onNodesChangeMiddlewareMap:new Map,onEdgesChangeMiddlewareMap:new Map}},bBn=({nodes:e,edges:n,defaultNodes:t,defaultEdges:r,width:s,height:i,fitView:a,fitViewOptions:o,minZoom:l,maxZoom:u,nodeOrigin:h,nodeExtent:_,zIndexMode:p})=>jIn((m,x)=>{async function k(){const{nodeLookup:v,panZoom:b,fitViewOptions:w,fitViewResolver:y,width:C,height:E,minZoom:N,maxZoom:A}=x();b&&(await ALn({nodes:v,width:C,height:E,panZoom:b,minZoom:N,maxZoom:A},w),y==null||y.resolve(!0),m({fitViewResolver:null}))}return{...EM({nodes:e,edges:n,width:s,height:i,fitView:a,fitViewOptions:o,minZoom:l,maxZoom:u,nodeOrigin:h,nodeExtent:_,defaultNodes:t,defaultEdges:r,zIndexMode:p}),setNodes:v=>{const{nodeLookup:b,parentLookup:w,nodeOrigin:y,elevateNodesOnSelect:C,fitViewQueued:E,zIndexMode:N,nodesSelectionActive:A}=x(),{nodesInitialized:j,hasSelectedNodes:M}=ek(v,b,w,{nodeOrigin:y,nodeExtent:_,elevateNodesOnSelect:C,checkEquality:!0,zIndexMode:N}),L=A&&M;E&&j?(k(),m({nodes:v,nodesInitialized:j,fitViewQueued:!1,fitViewOptions:void 0,nodesSelectionActive:L})):m({nodes:v,nodesInitialized:j,nodesSelectionActive:L})},setEdges:v=>{const{connectionLookup:b,edgeLookup:w}=x();Iq(b,w,v),m({edges:v})},setDefaultNodesAndEdges:(v,b)=>{if(v){const{setNodes:w}=x();w(v),m({hasDefaultNodes:!0})}if(b){const{setEdges:w}=x();w(b),m({hasDefaultEdges:!0})}},updateNodeInternals:v=>{const{triggerNodeChanges:b,nodeLookup:w,parentLookup:y,domNode:C,nodeOrigin:E,nodeExtent:N,debug:A,fitViewQueued:j,zIndexMode:M}=x(),{changes:L,updatedInternals:I}=eIn(v,w,y,C,E,N,M);I&&(XLn(w,y,{nodeOrigin:E,nodeExtent:N,zIndexMode:M}),j?(k(),m({fitViewQueued:!1,fitViewOptions:void 0})):m({}),(L==null?void 0:L.length)>0&&(A&&console.log("React Flow: trigger node changes",L),b==null||b(L)))},updateNodePositions:(v,b=!1)=>{const w=[];let y=[];const{nodeLookup:C,triggerNodeChanges:E,connection:N,updateConnection:A,onNodesChangeMiddlewareMap:j}=x();for(const[M,L]of v){const I=C.get(M),B=!!(I!=null&&I.expandParent&&(I!=null&&I.parentId)&&(L!=null&&L.position)),q={id:M,type:"position",position:B?{x:Math.max(0,L.position.x),y:Math.max(0,L.position.y)}:L.position,dragging:b};if(I&&N.inProgress&&N.fromNode.id===I.id){const U=J_(I,N.fromHandle,zt.Left,!0);A({...N,from:U})}B&&I.parentId&&w.push({id:M,parentId:I.parentId,rect:{...L.internals.positionAbsolute,width:L.measured.width??0,height:L.measured.height??0}}),y.push(q)}if(w.length>0){const{parentLookup:M,nodeOrigin:L}=x(),I=m7(w,C,M,L);y.push(...I)}for(const M of j.values())y=M(y);E(y)},triggerNodeChanges:v=>{const{onNodesChange:b,setNodes:w,nodes:y,hasDefaultNodes:C,debug:E}=x();if(v!=null&&v.length){if(C){const N=XIn(v,y);w(N)}E&&console.log("React Flow: trigger node changes",v),b==null||b(v)}},triggerEdgeChanges:v=>{const{onEdgesChange:b,setEdges:w,edges:y,hasDefaultEdges:C,debug:E}=x();if(v!=null&&v.length){if(C){const N=YIn(v,y);w(N)}E&&console.log("React Flow: trigger edge changes",v),b==null||b(v)}},addSelectedNodes:v=>{const{multiSelectionActive:b,edgeLookup:w,nodeLookup:y,triggerNodeChanges:C,triggerEdgeChanges:E}=x();if(b){const N=v.map(A=>f_(A,!0));C(N);return}C(hd(y,new Set([...v]),!0)),E(hd(w))},addSelectedEdges:v=>{const{multiSelectionActive:b,edgeLookup:w,nodeLookup:y,triggerNodeChanges:C,triggerEdgeChanges:E}=x();if(b){const N=v.map(A=>f_(A,!0));E(N);return}E(hd(w,new Set([...v]))),C(hd(y,new Set,!0))},unselectNodesAndEdges:({nodes:v,edges:b}={})=>{const{edges:w,nodes:y,nodeLookup:C,triggerNodeChanges:E,triggerEdgeChanges:N}=x(),A=v||y,j=b||w,M=[];for(const I of A){if(!I.selected)continue;const B=C.get(I.id);B&&(B.selected=!1),M.push(f_(I.id,!1))}const L=[];for(const I of j)I.selected&&L.push(f_(I.id,!1));E(M),N(L)},setMinZoom:v=>{const{panZoom:b,maxZoom:w}=x();b==null||b.setScaleExtent([v,w]),m({minZoom:v})},setMaxZoom:v=>{const{panZoom:b,minZoom:w}=x();b==null||b.setScaleExtent([w,v]),m({maxZoom:v})},setTranslateExtent:v=>{var b;(b=x().panZoom)==null||b.setTranslateExtent(v),m({translateExtent:v})},resetSelectedElements:()=>{const{edges:v,nodes:b,triggerNodeChanges:w,triggerEdgeChanges:y,elementsSelectable:C}=x();if(!C)return;const E=b.reduce((A,j)=>j.selected?[...A,f_(j.id,!1)]:A,[]),N=v.reduce((A,j)=>j.selected?[...A,f_(j.id,!1)]:A,[]);w(E),y(N)},setNodeExtent:v=>{const{nodes:b,nodeLookup:w,parentLookup:y,nodeOrigin:C,elevateNodesOnSelect:E,nodeExtent:N,zIndexMode:A}=x();v[0][0]===N[0][0]&&v[0][1]===N[0][1]&&v[1][0]===N[1][0]&&v[1][1]===N[1][1]||(ek(b,w,y,{nodeOrigin:C,nodeExtent:v,elevateNodesOnSelect:E,checkEquality:!1,zIndexMode:A}),m({nodeExtent:v}))},panBy:v=>{const{transform:b,width:w,height:y,panZoom:C,translateExtent:E}=x();return tIn({delta:v,panZoom:C,transform:b,translateExtent:E,width:w,height:y})},setCenter:async(v,b,w)=>{const{width:y,height:C,maxZoom:E,panZoom:N}=x();if(!N)return!1;const A=typeof(w==null?void 0:w.zoom)<"u"?w.zoom:E;return await N.setViewport({x:y/2-v*A,y:C/2-b*A,zoom:A},{duration:w==null?void 0:w.duration,ease:w==null?void 0:w.ease,interpolate:w==null?void 0:w.interpolate}),!0},cancelConnection:()=>{m({connection:{...vq}})},updateConnection:v=>{m({connection:v})},reset:()=>m({...EM()})}},Object.is);function yBn({initialNodes:e,initialEdges:n,defaultNodes:t,defaultEdges:r,initialWidth:s,initialHeight:i,initialMinZoom:a,initialMaxZoom:o,initialFitViewOptions:l,fitView:u,nodeOrigin:h,nodeExtent:_,zIndexMode:p,children:m}){const[x]=T.useState(()=>bBn({nodes:e,edges:n,defaultNodes:t,defaultEdges:r,width:s,height:i,fitView:u,minZoom:a,maxZoom:o,fitViewOptions:l,nodeOrigin:h,nodeExtent:_,zIndexMode:p}));return f.jsx(TIn,{value:x,children:f.jsx(r$n,{children:f.jsx(v$n,{children:m})})})}function xBn({children:e,nodes:n,edges:t,defaultNodes:r,defaultEdges:s,width:i,height:a,fitView:o,fitViewOptions:l,minZoom:u,maxZoom:h,nodeOrigin:_,nodeExtent:p,zIndexMode:m}){return T.useContext(Ry)?f.jsx(f.Fragment,{children:e}):f.jsx(yBn,{initialNodes:n,initialEdges:t,defaultNodes:r,defaultEdges:s,initialWidth:i,initialHeight:a,fitView:o,initialFitViewOptions:l,initialMinZoom:u,initialMaxZoom:h,nodeOrigin:_,nodeExtent:p,zIndexMode:m,children:e})}const wBn={width:"100%",height:"100%",overflow:"hidden",position:"relative",zIndex:0};function kBn({nodes:e,edges:n,defaultNodes:t,defaultEdges:r,className:s,nodeTypes:i,edgeTypes:a,onNodeClick:o,onEdgeClick:l,onInit:u,onMove:h,onMoveStart:_,onMoveEnd:p,onConnect:m,onConnectStart:x,onConnectEnd:k,onClickConnectStart:v,onClickConnectEnd:b,onNodeMouseEnter:w,onNodeMouseMove:y,onNodeMouseLeave:C,onNodeContextMenu:E,onNodeDoubleClick:N,onNodeDragStart:A,onNodeDrag:j,onNodeDragStop:M,onNodesDelete:L,onEdgesDelete:I,onDelete:B,onSelectionChange:q,onSelectionDragStart:U,onSelectionDrag:W,onSelectionDragStop:H,onSelectionContextMenu:Y,onSelectionStart:te,onSelectionEnd:$,onBeforeDelete:D,connectionMode:F,connectionLineType:G=tu.Bezier,connectionLineStyle:V,connectionLineComponent:ee,connectionLineContainerStyle:ce,deleteKeyCode:ae="Backspace",selectionKeyCode:re="Shift",selectionOnDrag:X=!1,selectionMode:oe=H0.Full,panActivationKeyCode:le="Space",multiSelectionKeyCode:_e=U0()?"Meta":"Control",zoomActivationKeyCode:pe=U0()?"Meta":"Control",snapToGrid:Ee,snapGrid:Ie,onlyRenderVisibleElements:ze=!1,selectNodesOnDrag:He,nodesDraggable:Oe,autoPanOnNodeFocus:Xe,nodesConnectable:_t,nodesFocusable:Vt,nodeOrigin:$t=Xq,edgesFocusable:jt,edgesReconnectable:mt,elementsSelectable:we=!0,defaultViewport:ct=qIn,minZoom:ye=.5,maxZoom:je=2,translateExtent:qe=F0,preventScrolling:at=!0,nodeExtent:nt,defaultMarkerColor:Kt="#b1b1b7",zoomOnScroll:Qe=!0,zoomOnPinch:kt=!0,panOnScroll:Tt=!1,panOnScrollSpeed:Yt=.5,panOnScrollMode:tn=$_.Free,zoomOnDoubleClick:rr=!0,panOnDrag:rn=!0,onPaneClick:ln,onPaneMouseEnter:An,onPaneMouseMove:Un,onPaneMouseLeave:Yn,onPaneScroll:fr,onPaneContextMenu:Yr,paneClickDistance:zr=1,nodeClickDistance:St=0,children:cn,onReconnect:jn,onReconnectStart:fn,onReconnectEnd:Dn,onEdgeContextMenu:mn,onEdgeDoubleClick:Gn,onEdgeMouseEnter:Rn,onEdgeMouseMove:yt,onEdgeMouseLeave:Dt,reconnectRadius:Ue=10,onNodesChange:gt,onEdgesChange:ur,noDragClassName:un="nodrag",noWheelClassName:Lt="nowheel",noPanClassName:Kn="nopan",fitView:mr,fitViewOptions:gr,connectOnClick:ho,attributionPosition:Qs,proOptions:Xs,defaultEdgeOptions:xs,elevateNodesOnSelect:Ai=!0,elevateEdgesOnSelect:Ur=!1,disableKeyboardA11y:Ys=!1,autoPanOnConnect:Zs,autoPanOnNodeDrag:sr,autoPanOnSelection:fa=!0,autoPanSpeed:al,connectionRadius:Ut,isValidConnection:us,onError:Dr,style:Ia,id:ot,nodeDragThreshold:Wt,connectionDragThreshold:Ri,viewport:da,onViewportChange:ws,width:Ln,height:hi,colorMode:fc="light",debug:Mi,onScroll:ks,ariaLabelConfig:Oi,zIndexMode:Zr="basic",...vr},Qt){const Is=ot||"1",_s=KIn(fc),Lr=T.useCallback(ir=>{ir.currentTarget.scrollTo({top:0,left:0,behavior:"instant"}),ks==null||ks(ir)},[ks]);return f.jsx("div",{"data-testid":"rf__wrapper",...vr,onScroll:Lr,style:{...Ia,...wBn},ref:Qt,className:cs(["react-flow",s,_s]),id:ot,role:"application",children:f.jsxs(xBn,{nodes:e,edges:n,width:Ln,height:hi,fitView:mr,fitViewOptions:gr,minZoom:ye,maxZoom:je,nodeOrigin:$t,nodeExtent:nt,zIndexMode:Zr,children:[f.jsx(VIn,{nodes:e,edges:n,defaultNodes:t,defaultEdges:r,onConnect:m,onConnectStart:x,onConnectEnd:k,onClickConnectStart:v,onClickConnectEnd:b,nodesDraggable:Oe,autoPanOnNodeFocus:Xe,nodesConnectable:_t,nodesFocusable:Vt,edgesFocusable:jt,edgesReconnectable:mt,elementsSelectable:we,elevateNodesOnSelect:Ai,elevateEdgesOnSelect:Ur,minZoom:ye,maxZoom:je,nodeExtent:nt,onNodesChange:gt,onEdgesChange:ur,snapToGrid:Ee,snapGrid:Ie,connectionMode:F,translateExtent:qe,connectOnClick:ho,defaultEdgeOptions:xs,fitView:mr,fitViewOptions:gr,onNodesDelete:L,onEdgesDelete:I,onDelete:B,onNodeDragStart:A,onNodeDrag:j,onNodeDragStop:M,onSelectionDrag:W,onSelectionDragStart:U,onSelectionDragStop:H,onMove:h,onMoveStart:_,onMoveEnd:p,noPanClassName:Kn,nodeOrigin:$t,rfId:Is,autoPanOnConnect:Zs,autoPanOnNodeDrag:sr,autoPanSpeed:al,onError:Dr,connectionRadius:Ut,isValidConnection:us,selectNodesOnDrag:He,nodeDragThreshold:Wt,connectionDragThreshold:Ri,onBeforeDelete:D,debug:Mi,ariaLabelConfig:Oi,zIndexMode:Zr}),f.jsx(gBn,{onInit:u,onNodeClick:o,onEdgeClick:l,onNodeMouseEnter:w,onNodeMouseMove:y,onNodeMouseLeave:C,onNodeContextMenu:E,onNodeDoubleClick:N,nodeTypes:i,edgeTypes:a,connectionLineType:G,connectionLineStyle:V,connectionLineComponent:ee,connectionLineContainerStyle:ce,selectionKeyCode:re,selectionOnDrag:X,selectionMode:oe,deleteKeyCode:ae,multiSelectionKeyCode:_e,panActivationKeyCode:le,zoomActivationKeyCode:pe,onlyRenderVisibleElements:ze,defaultViewport:ct,translateExtent:qe,minZoom:ye,maxZoom:je,preventScrolling:at,zoomOnScroll:Qe,zoomOnPinch:kt,zoomOnDoubleClick:rr,panOnScroll:Tt,panOnScrollSpeed:Yt,panOnScrollMode:tn,panOnDrag:rn,autoPanOnSelection:fa,onPaneClick:ln,onPaneMouseEnter:An,onPaneMouseMove:Un,onPaneMouseLeave:Yn,onPaneScroll:fr,onPaneContextMenu:Yr,paneClickDistance:zr,nodeClickDistance:St,onSelectionContextMenu:Y,onSelectionStart:te,onSelectionEnd:$,onReconnect:jn,onReconnectStart:fn,onReconnectEnd:Dn,onEdgeContextMenu:mn,onEdgeDoubleClick:Gn,onEdgeMouseEnter:Rn,onEdgeMouseMove:yt,onEdgeMouseLeave:Dt,reconnectRadius:Ue,defaultMarkerColor:Kt,noDragClassName:un,noWheelClassName:Lt,noPanClassName:Kn,rfId:Is,disableKeyboardA11y:Ys,nodeExtent:nt,viewport:da,onViewportChange:ws}),f.jsx(HIn,{onSelectionChange:q}),cn,f.jsx(IIn,{proOptions:Xs,position:Qs}),f.jsx(LIn,{rfId:Is,disableKeyboardA11y:Ys})]})})}var SBn=Zq(kBn);function CBn({dimensions:e,lineWidth:n,variant:t,className:r}){return f.jsx("path",{strokeWidth:n,d:`M${e[0]/2} 0 V${e[1]} M0 ${e[1]/2} H${e[0]}`,className:cs(["react-flow__background-pattern",t,r])})}function EBn({radius:e,className:n}){return f.jsx("circle",{cx:e,cy:e,r:e,className:cs(["react-flow__background-pattern","dots",n])})}var nc;(function(e){e.Lines="lines",e.Dots="dots",e.Cross="cross"})(nc||(nc={}));const NBn={[nc.Dots]:1,[nc.Lines]:1,[nc.Cross]:6},zBn=e=>({transform:e.transform,patternId:`pattern-${e.rfId}`});function kU({id:e,variant:n=nc.Dots,gap:t=20,size:r,lineWidth:s=1,offset:i=0,color:a,bgColor:o,style:l,className:u,patternClassName:h}){const _=T.useRef(null),{transform:p,patternId:m}=zn(zBn,Cr),x=r||NBn[n],k=n===nc.Dots,v=n===nc.Cross,b=Array.isArray(t)?t:[t,t],w=[b[0]*p[2]||1,b[1]*p[2]||1],y=x*p[2],C=Array.isArray(i)?i:[i,i],E=v?[y,y]:w,N=[C[0]*p[2]||1+E[0]/2,C[1]*p[2]||1+E[1]/2],A=`${m}${e||""}`;return f.jsxs("svg",{className:cs(["react-flow__background",u]),style:{...l,...Oy,"--xy-background-color-props":o,"--xy-background-pattern-color-props":a},ref:_,"data-testid":"rf__background",children:[f.jsx("pattern",{id:A,x:p[0]%w[0],y:p[1]%w[1],width:w[0],height:w[1],patternUnits:"userSpaceOnUse",patternTransform:`translate(-${N[0]},-${N[1]})`,children:k?f.jsx(EBn,{radius:y/2,className:h}):f.jsx(CBn,{dimensions:E,lineWidth:s,variant:n,className:h})}),f.jsx("rect",{x:"0",y:"0",width:"100%",height:"100%",fill:`url(#${A})`})]})}kU.displayName="Background";const jBn=T.memo(kU);function TBn(){return f.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 32",children:f.jsx("path",{d:"M32 18.133H18.133V32h-4.266V18.133H0v-4.266h13.867V0h4.266v13.867H32z"})})}function ABn(){return f.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 5",children:f.jsx("path",{d:"M0 0h32v4.2H0z"})})}function RBn(){return f.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 30",children:f.jsx("path",{d:"M3.692 4.63c0-.53.4-.938.939-.938h5.215V0H4.708C2.13 0 0 2.054 0 4.63v5.216h3.692V4.631zM27.354 0h-5.2v3.692h5.17c.53 0 .984.4.984.939v5.215H32V4.631A4.624 4.624 0 0027.354 0zm.954 24.83c0 .532-.4.94-.939.94h-5.215v3.768h5.215c2.577 0 4.631-2.13 4.631-4.707v-5.139h-3.692v5.139zm-23.677.94c-.531 0-.939-.4-.939-.94v-5.138H0v5.139c0 2.577 2.13 4.707 4.708 4.707h5.138V25.77H4.631z"})})}function MBn(){return f.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 25 32",children:f.jsx("path",{d:"M21.333 10.667H19.81V7.619C19.81 3.429 16.38 0 12.19 0 8 0 4.571 3.429 4.571 7.619v3.048H3.048A3.056 3.056 0 000 13.714v15.238A3.056 3.056 0 003.048 32h18.285a3.056 3.056 0 003.048-3.048V13.714a3.056 3.056 0 00-3.048-3.047zM12.19 24.533a3.056 3.056 0 01-3.047-3.047 3.056 3.056 0 013.047-3.048 3.056 3.056 0 013.048 3.048 3.056 3.056 0 01-3.048 3.047zm4.724-13.866H7.467V7.619c0-2.59 2.133-4.724 4.723-4.724 2.591 0 4.724 2.133 4.724 4.724v3.048z"})})}function OBn(){return f.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 25 32",children:f.jsx("path",{d:"M21.333 10.667H19.81V7.619C19.81 3.429 16.38 0 12.19 0c-4.114 1.828-1.37 2.133.305 2.438 1.676.305 4.42 2.59 4.42 5.181v3.048H3.047A3.056 3.056 0 000 13.714v15.238A3.056 3.056 0 003.048 32h18.285a3.056 3.056 0 003.048-3.048V13.714a3.056 3.056 0 00-3.048-3.047zM12.19 24.533a3.056 3.056 0 01-3.047-3.047 3.056 3.056 0 013.047-3.048 3.056 3.056 0 013.048 3.048 3.056 3.056 0 01-3.048 3.047z"})})}function z1({children:e,className:n,...t}){return f.jsx("button",{type:"button",className:cs(["react-flow__controls-button",n]),...t,children:e})}const DBn=e=>({isInteractive:e.nodesDraggable||e.nodesConnectable||e.elementsSelectable,minZoomReached:e.transform[2]<=e.minZoom,maxZoomReached:e.transform[2]>=e.maxZoom,ariaLabelConfig:e.ariaLabelConfig});function SU({style:e,showZoom:n=!0,showFitView:t=!0,showInteractive:r=!0,fitViewOptions:s,onZoomIn:i,onZoomOut:a,onFitView:o,onInteractiveChange:l,className:u,children:h,position:_="bottom-left",orientation:p="vertical","aria-label":m}){const x=Nr(),{isInteractive:k,minZoomReached:v,maxZoomReached:b,ariaLabelConfig:w}=zn(DBn,Cr),{zoomIn:y,zoomOut:C,fitView:E}=g7(),N=()=>{y(),i==null||i()},A=()=>{C(),a==null||a()},j=()=>{E(s),o==null||o()},M=()=>{x.setState({nodesDraggable:!k,nodesConnectable:!k,elementsSelectable:!k}),l==null||l(!k)},L=p==="horizontal"?"horizontal":"vertical";return f.jsxs(My,{className:cs(["react-flow__controls",L,u]),position:_,style:e,"data-testid":"rf__controls","aria-label":m??w["controls.ariaLabel"],children:[n&&f.jsxs(f.Fragment,{children:[f.jsx(z1,{onClick:N,className:"react-flow__controls-zoomin",title:w["controls.zoomIn.ariaLabel"],"aria-label":w["controls.zoomIn.ariaLabel"],disabled:b,children:f.jsx(TBn,{})}),f.jsx(z1,{onClick:A,className:"react-flow__controls-zoomout",title:w["controls.zoomOut.ariaLabel"],"aria-label":w["controls.zoomOut.ariaLabel"],disabled:v,children:f.jsx(ABn,{})})]}),t&&f.jsx(z1,{className:"react-flow__controls-fitview",onClick:j,title:w["controls.fitView.ariaLabel"],"aria-label":w["controls.fitView.ariaLabel"],children:f.jsx(RBn,{})}),r&&f.jsx(z1,{className:"react-flow__controls-interactive",onClick:M,title:w["controls.interactive.ariaLabel"],"aria-label":w["controls.interactive.ariaLabel"],children:k?f.jsx(OBn,{}):f.jsx(MBn,{})}),h]})}SU.displayName="Controls";T.memo(SU);function LBn({id:e,x:n,y:t,width:r,height:s,style:i,color:a,strokeColor:o,strokeWidth:l,className:u,borderRadius:h,shapeRendering:_,selected:p,onClick:m}){const{background:x,backgroundColor:k}=i||{},v=a||x||k;return f.jsx("rect",{className:cs(["react-flow__minimap-node",{selected:p},u]),x:n,y:t,rx:h,ry:h,width:r,height:s,style:{fill:v,stroke:o,strokeWidth:l},shapeRendering:_,onClick:m?b=>m(b,e):void 0})}const IBn=T.memo(LBn),$Bn=e=>e.nodes.map(n=>n.id),b4=e=>e instanceof Function?e:()=>e;function BBn({nodeStrokeColor:e,nodeColor:n,nodeClassName:t="",nodeBorderRadius:r=5,nodeStrokeWidth:s,nodeComponent:i=IBn,onClick:a}){const o=zn($Bn,Cr),l=b4(n),u=b4(e),h=b4(t),_=typeof window>"u"||window.chrome?"crispEdges":"geometricPrecision";return f.jsx(f.Fragment,{children:o.map(p=>f.jsx(FBn,{id:p,nodeColorFunc:l,nodeStrokeColorFunc:u,nodeClassNameFunc:h,nodeBorderRadius:r,nodeStrokeWidth:s,NodeComponent:i,onClick:a,shapeRendering:_},p))})}function PBn({id:e,nodeColorFunc:n,nodeStrokeColorFunc:t,nodeClassNameFunc:r,nodeBorderRadius:s,nodeStrokeWidth:i,shapeRendering:a,NodeComponent:o,onClick:l}){const{node:u,x:h,y:_,width:p,height:m}=zn(x=>{const k=x.nodeLookup.get(e);if(!k)return{node:void 0,x:0,y:0,width:0,height:0};const v=k.internals.userNode,{x:b,y:w}=k.internals.positionAbsolute,{width:y,height:C}=_c(v);return{node:v,x:b,y:w,width:y,height:C}},Cr);return!u||u.hidden||!Eq(u)?null:f.jsx(o,{x:h,y:_,width:p,height:m,style:u.style,selected:!!u.selected,className:r(u),color:n(u),borderRadius:s,strokeColor:t(u),strokeWidth:i,shapeRendering:a,onClick:l,id:u.id})}const FBn=T.memo(PBn);var HBn=T.memo(BBn);const qBn=200,UBn=150,GBn=e=>!e.hidden,VBn=e=>{const n={x:-e.transform[0]/e.transform[2],y:-e.transform[1]/e.transform[2],width:e.width/e.transform[2],height:e.height/e.transform[2]};return{viewBB:n,boundingRect:e.nodeLookup.size>0?kq(zm(e.nodeLookup,{filter:GBn}),n):n,rfId:e.rfId,panZoom:e.panZoom,translateExtent:e.translateExtent,flowWidth:e.width,flowHeight:e.height,ariaLabelConfig:e.ariaLabelConfig}},KBn="react-flow__minimap-desc";function CU({style:e,className:n,nodeStrokeColor:t,nodeColor:r,nodeClassName:s="",nodeBorderRadius:i=5,nodeStrokeWidth:a,nodeComponent:o,bgColor:l,maskColor:u,maskStrokeColor:h,maskStrokeWidth:_,position:p="bottom-right",onClick:m,onNodeClick:x,pannable:k=!1,zoomable:v=!1,ariaLabel:b,inversePan:w,zoomStep:y=1,offsetScale:C=5}){const E=Nr(),N=T.useRef(null),{boundingRect:A,viewBB:j,rfId:M,panZoom:L,translateExtent:I,flowWidth:B,flowHeight:q,ariaLabelConfig:U}=zn(VBn,Cr),W=(e==null?void 0:e.width)??qBn,H=(e==null?void 0:e.height)??UBn,Y=A.width/W,te=A.height/H,$=Math.max(Y,te),D=$*W,F=$*H,G=C*$,V=A.x-(D-A.width)/2-G,ee=A.y-(F-A.height)/2-G,ce=D+G*2,ae=F+G*2,re=`${KBn}-${M}`,X=T.useRef(0),oe=T.useRef();X.current=$,T.useEffect(()=>{if(N.current&&L)return oe.current=uIn({domNode:N.current,panZoom:L,getTransform:()=>E.getState().transform,getViewScale:()=>X.current}),()=>{var Ee;(Ee=oe.current)==null||Ee.destroy()}},[L]),T.useEffect(()=>{var Ee;(Ee=oe.current)==null||Ee.update({translateExtent:I,width:B,height:q,inversePan:w,pannable:k,zoomStep:y,zoomable:v})},[k,v,w,y,I,B,q]);const le=m?Ee=>{var He;const[Ie,ze]=((He=oe.current)==null?void 0:He.pointer(Ee))||[0,0];m(Ee,{x:Ie,y:ze})}:void 0,_e=x?T.useCallback((Ee,Ie)=>{const ze=E.getState().nodeLookup.get(Ie).internals.userNode;x(Ee,ze)},[]):void 0,pe=b??U["minimap.ariaLabel"];return f.jsx(My,{position:p,style:{...e,"--xy-minimap-background-color-props":typeof l=="string"?l:void 0,"--xy-minimap-mask-background-color-props":typeof u=="string"?u:void 0,"--xy-minimap-mask-stroke-color-props":typeof h=="string"?h:void 0,"--xy-minimap-mask-stroke-width-props":typeof _=="number"?_*$:void 0,"--xy-minimap-node-background-color-props":typeof r=="string"?r:void 0,"--xy-minimap-node-stroke-color-props":typeof t=="string"?t:void 0,"--xy-minimap-node-stroke-width-props":typeof a=="number"?a:void 0},className:cs(["react-flow__minimap",n]),"data-testid":"rf__minimap",children:f.jsxs("svg",{width:W,height:H,viewBox:`${V} ${ee} ${ce} ${ae}`,className:"react-flow__minimap-svg",role:"img","aria-labelledby":re,ref:N,onClick:le,children:[pe&&f.jsx("title",{id:re,children:pe}),f.jsx(HBn,{onClick:_e,nodeColor:r,nodeStrokeColor:t,nodeBorderRadius:i,nodeClassName:s,nodeStrokeWidth:a,nodeComponent:o}),f.jsx("path",{className:"react-flow__minimap-mask",d:`M${V-G},${ee-G}h${ce+G*2}v${ae+G*2}h${-ce-G*2}z + M${j.x},${j.y}h${j.width}v${j.height}h${-j.width}z`,fillRule:"evenodd",pointerEvents:"none"})]})})}CU.displayName="MiniMap";T.memo(CU);const WBn=e=>n=>e?`${Math.max(1/n.transform[2],1)}`:void 0,QBn={[ph.Line]:"right",[ph.Handle]:"bottom-right"};function XBn({nodeId:e,position:n,variant:t=ph.Handle,className:r,style:s=void 0,children:i,color:a,minWidth:o=10,minHeight:l=10,maxWidth:u=Number.MAX_VALUE,maxHeight:h=Number.MAX_VALUE,keepAspectRatio:_=!1,resizeDirection:p,autoScale:m=!0,shouldResize:x,onResizeStart:k,onResize:v,onResizeEnd:b}){const w=nU(),y=typeof e=="string"?e:w,C=Nr(),E=T.useRef(null),N=t===ph.Handle,A=zn(T.useCallback(WBn(N&&m),[N,m]),Cr),j=T.useRef(null),M=n??QBn[t];T.useEffect(()=>{if(!(!E.current||!y))return j.current||(j.current=kIn({domNode:E.current,nodeId:y,getStoreItems:()=>{const{nodeLookup:I,transform:B,snapGrid:q,snapToGrid:U,nodeOrigin:W,domNode:H}=C.getState();return{nodeLookup:I,transform:B,snapGrid:q,snapToGrid:U,nodeOrigin:W,paneDomNode:H}},onChange:(I,B)=>{const{triggerNodeChanges:q,nodeLookup:U,parentLookup:W,nodeOrigin:H}=C.getState(),Y=[],te={x:I.x,y:I.y},$=U.get(y);if($&&$.expandParent&&$.parentId){const D=$.origin??H,F=I.width??$.measured.width??0,G=I.height??$.measured.height??0,V={id:$.id,parentId:$.parentId,rect:{width:F,height:G,...Nq({x:I.x??$.position.x,y:I.y??$.position.y},{width:F,height:G},$.parentId,U,D)}},ee=m7([V],U,W,H);Y.push(...ee),te.x=I.x?Math.max(D[0]*F,I.x):void 0,te.y=I.y?Math.max(D[1]*G,I.y):void 0}if(te.x!==void 0&&te.y!==void 0){const D={id:y,type:"position",position:{...te}};Y.push(D)}if(I.width!==void 0&&I.height!==void 0){const F={id:y,type:"dimensions",resizing:!0,setAttributes:p?p==="horizontal"?"width":"height":!0,dimensions:{width:I.width,height:I.height}};Y.push(F)}for(const D of B){const F={...D,type:"position"};Y.push(F)}q(Y)},onEnd:({width:I,height:B})=>{const q={id:y,type:"dimensions",resizing:!1,dimensions:{width:I,height:B}};C.getState().triggerNodeChanges([q])}})),j.current.update({controlPosition:M,boundaries:{minWidth:o,minHeight:l,maxWidth:u,maxHeight:h},keepAspectRatio:_,resizeDirection:p,onResizeStart:k,onResize:v,onResizeEnd:b,shouldResize:x}),()=>{var I;(I=j.current)==null||I.destroy()}},[M,o,l,u,h,_,k,v,b,x]);const L=M.split("-");return f.jsx("div",{className:cs(["react-flow__resize-control","nodrag",...L,t,r]),ref:E,style:{...s,scale:A,...a&&{[N?"backgroundColor":"borderColor"]:a}},children:i})}T.memo(XBn);function YBn(){const[e,n]=T.useState(0),[t,r]=T.useState(0);return{ref:T.useCallback(i=>{if(!i)return;function a(){n(i.offsetWidth),r(i.offsetHeight)}const o=new ResizeObserver(a),l=new MutationObserver(a);return o.observe(i),l.observe(i,{childList:!0,subtree:!0,characterData:!0,attributes:!0}),a(),()=>{o.disconnect(),l.disconnect()}},[]),offsetWidth:e,offsetHeight:t}}const j1=8;function ZBn(e,n){const{offsetWidth:t,offsetHeight:r}=n,[{viewHeight:s,viewWidth:i},a]=T.useState({viewWidth:0,viewHeight:0});T.useEffect(()=>{function h(){a({viewWidth:window.innerWidth,viewHeight:window.innerHeight})}return window.addEventListener("resize",h),h(),()=>window.removeEventListener("resize",h)},[]);let o=0,l=0,u=0;if(e){const{distance:h}=e;switch(e.anchor){case"left":o=e.x-t-h,l=e.y+e.height/2-r/2;break;case"right":o=e.x+e.width+h,l=e.y+e.height/2-r/2;break;case"below":o=e.x+e.width/2-t/2,l=e.y+e.height+h;break;case"above":o=e.x+e.width/2-t/2,l=e.y-r-h;break}const _=o,p=l;o=Math.min(Math.max(o,j1),i-t-j1),l=Math.min(Math.max(l,j1),s-r-j1),u=e.anchor==="left"||e.anchor==="right"?p-l:_-o}return{x:o,y:l,arrowAdjustment:u}}const y4=380,x4=12,JBn=350,ePn=150,rk=new EventTarget;function tPn(){rk.dispatchEvent(new Event("move"))}function nPn(e,n){const[t,r]=T.useState(null),s=T.useRef(void 0),i=T.useRef(void 0);T.useEffect(()=>{const u=()=>{window.clearTimeout(s.current),window.clearTimeout(i.current),r(null)};return rk.addEventListener("move",u),()=>{rk.removeEventListener("move",u),window.clearTimeout(s.current),window.clearTimeout(i.current)}},[]),T.useEffect(()=>{r(u=>{var _;if(!u)return u;const h=((_=e.current)==null?void 0:_.getBoundingClientRect())??null;return h&&u.x===h.x&&u.y===h.y&&u.width===h.width&&u.height===h.height?u:h})},[e,n]);const a=T.useCallback(()=>{window.clearTimeout(i.current),window.clearTimeout(s.current),s.current=window.setTimeout(()=>{var u;r(((u=e.current)==null?void 0:u.getBoundingClientRect())??null)},JBn)},[e]),o=T.useCallback(()=>{window.clearTimeout(s.current),window.clearTimeout(i.current),i.current=window.setTimeout(()=>r(null),ePn)},[]),l=T.useCallback(()=>window.clearTimeout(i.current),[]);return{rect:t,onMouseEnter:a,onMouseLeave:o,keepOpen:l}}function rPn(e){const n=new Date(e),t=n.getFullYear()===new Date().getFullYear()?{month:"short",day:"numeric"}:{month:"short",day:"numeric",year:"numeric"};return n.toLocaleDateString(z(),t)}function sPn({exp:e,runs:n,latestRun:t,parentSlug:r,anchor:s,onOpenLogs:i,onOpenCode:a,onMouseEnter:o,onMouseLeave:l}){const u=YBn(),h=s.right+x4+y4<=window.innerWidth,_=s.x-x4-y4>=0,p=h?"right":_?"left":s.y>window.innerHeight/2?"above":"below",{x:m,y:x}=ZBn({x:s.x,y:s.y,width:s.width,height:s.height,anchor:p,distance:x4},u),k=e.parentExperimentId&&(t!=null&&t.commitSha)?t.id:null,{data:v}=ft({...swn(k??""),enabled:!!k,subscribed:!!k}),b=T.useMemo(()=>{if(!v)return null;const I=v;let B=I.diff;if(I.truncated){const H=B.lastIndexOf(` +diff --git `);B=H!==-1?B.slice(0,H+1):B.slice(0,B.lastIndexOf(` +`)+1)}let q=[];try{q=B.trim()?B3(B):[]}catch{return null}if(I.truncated&&q.every(H=>H.hunks.length===0))return null;let U=0,W=0;for(const H of q){const Y=Zb(H);U+=Y.additions,W+=Y.deletions}return{fileCount:q.length,additions:U,deletions:W,truncated:I.truncated}},[v]),w={done:0,failed:0,cancelled:0,live:0};for(const I of n)I.status==="done"?w.done+=1:I.status==="failed"?w.failed+=1:I.status==="cancelled"?w.cancelled+=1:w.live+=1;const y=t?g0((t.endedAt??Date.now())-t.createdAt):null,C=(t==null?void 0:t.status)==="failed"&&t.resultMarkdown?t.resultMarkdown:null,E=e.description||(C?null:t==null?void 0:t.resultMarkdown)||null,N=T.useRef(null),[A,j]=T.useState(!1),[M,L]=T.useState(!1);return T.useEffect(()=>{j(!1)},[E]),T.useEffect(()=>{const I=N.current;I&&L(I.scrollHeight>I.clientHeight+1)},[E,A]),Oa.createPortal(f.jsxs("div",{ref:u.ref,className:"exp-hover-card fixed z-60 bg-background border border-border rounded-lg shadow-menu py-3.5 px-4 text-sm text-text [&_.hc-head]:flex [&_.hc-head]:items-baseline [&_.hc-head]:justify-between [&_.hc-head]:gap-2.5 [&_.hc-slug]:text-sm [&_.hc-slug]:font-semibold [&_.hc-slug]:min-w-0 [&_.hc-slug]:overflow-hidden [&_.hc-slug]:text-ellipsis [&_.hc-slug]:whitespace-nowrap [&_.hc-title]:mt-[3px] [&_.hc-title]:text-text [&_.hc-actions]:flex [&_.hc-actions]:items-center [&_.hc-actions]:gap-1.5 [&_.hc-actions]:mt-2.5 [&_.hc-actions_button]:inline-flex [&_.hc-actions_button]:items-center [&_.hc-actions_button]:justify-center [&_.hc-actions_button]:gap-[5px] [&_.hc-actions_button]:min-w-21 [&_.hc-actions_button]:py-1.5 [&_.hc-actions_button]:px-2.5 [&_.hc-actions_button]:border [&_.hc-actions_button]:border-border [&_.hc-actions_button]:rounded-md [&_.hc-actions_button]:bg-background [&_.hc-actions_button]:text-text [&_.hc-actions_button]:text-sm [&_.hc-actions_button]:font-medium [&_.hc-actions_button:hover]:border-border-hover-strong [&_.hc-actions_button:hover]:bg-canvas [&_.hc-body]:mt-2.5 [&_.hc-body]:border-t [&_.hc-body]:border-t-border-variant [&_.hc-body]:pt-2.5 [&_.hc-body]:leading-[1.6] [&_.hc-body]:whitespace-pre-line [&_.hc-body]:line-clamp-10 [&_.hc-body.expanded]:block [&_.hc-body.expanded]:line-clamp-none [&_.hc-body.expanded]:max-h-[45vh] [&_.hc-body.expanded]:overflow-y-auto [&_.hc-body.expanded]:overflow-x-hidden [&_.hc-body.expanded]:pb-1 [&_.hc-toggle]:mt-1 [&_.hc-toggle]:text-sm [&_.hc-toggle]:font-medium [&_.hc-toggle]:text-muted [&_.hc-toggle:hover]:text-text [&_.hc-failure]:mt-2 [&_.hc-failure]:text-accent-red [&_.hc-failure]:line-clamp-3 [&_.hc-stats]:mt-2.5 [&_.hc-stats]:border-t [&_.hc-stats]:border-t-border-variant [&_.hc-stats]:pt-2.5 [&_.hc-stats]:flex [&_.hc-stats]:items-center [&_.hc-stats]:gap-3 [&_.hc-stats]:flex-wrap [&_.hc-stats]:text-xs [&_.hc-stats]:text-text [&_.hc-git]:mt-2.5 [&_.hc-git]:pt-2 [&_.hc-git]:border-t [&_.hc-git]:border-t-border-variant [&_.hc-git]:text-xs [&_.hc-git]:text-text [&_.hc-git]:flex [&_.hc-git]:flex-col [&_.hc-git]:gap-1 [&_.hc-git-row]:flex [&_.hc-git-row]:items-center [&_.hc-git-row]:gap-2.5 [&_.hc-git-row]:flex-wrap [&_.hc-git-row]:min-w-0 [&_.hc-branch]:inline-flex [&_.hc-branch]:items-center [&_.hc-branch]:gap-1 [&_.hc-branch]:min-w-0 [&_.hc-branch]:overflow-hidden [&_.hc-branch]:text-ellipsis [&_.hc-branch]:whitespace-nowrap [&_.hc-foot]:mt-2 [&_.hc-foot]:flex [&_.hc-foot]:items-center [&_.hc-foot]:justify-between [&_.hc-foot]:gap-2.5 [&_.hc-foot]:text-xs [&_.hc-foot]:text-muted [&_.hc-foot_.hc-command]:min-w-0 [&_.hc-foot_.hc-command]:overflow-hidden [&_.hc-foot_.hc-command]:text-ellipsis [&_.hc-foot_.hc-command]:whitespace-nowrap",style:{width:y4,left:m,top:x,visibility:u.offsetHeight===0?"hidden":void 0},onMouseEnter:o,onMouseLeave:l,children:[f.jsxs("div",{className:"hc-head",children:[f.jsx("span",{className:"hc-slug",children:e.slug}),f.jsx(ec,{status:t?Zi(t):"idle"})]}),e.title&&f.jsx("div",{className:"hc-title",children:e.title}),f.jsxs("div",{className:"hc-actions",children:[i&&f.jsxs("button",{type:"button",...qr(i),children:[f.jsx(co,{size:13}),qAe()]}),f.jsxs("button",{type:"button",...qr(a),children:[f.jsx(Eb,{size:13}),wAe()]})]}),E&&f.jsx("div",{className:`hc-body${A?" expanded":""}`,ref:N,children:E}),E&&(M||A)&&f.jsx("button",{type:"button",className:"hc-toggle",onClick:()=>j(I=>!I),children:A?fD():IEe()}),C&&f.jsx("div",{className:"hc-failure",children:C}),f.jsxs("div",{className:"hc-stats",children:[f.jsx("span",{children:new Intl.ListFormat(z(),{style:"short"}).format([n.length===1?rKe():uKe({count:Jt(n.length)}),...w.done>0?[pVe({count:Jt(w.done)})]:[],...w.failed>0?[wVe({count:Jt(w.failed)})]:[],...w.cancelled>0?[lVe({count:Jt(w.cancelled)})]:[],...w.live>0?[qVe({count:Jt(w.live)})]:[]])}),t&&Uk(t.backend)&&f.jsx(pS,{backend:t.backend}),y&&f.jsx("span",{children:y}),t&&f.jsx("span",{children:Vo(t.createdAt)})]}),f.jsxs("div",{className:"hc-git",children:[f.jsxs("div",{className:"hc-git-row",children:[f.jsxs("span",{className:"hc-branch",title:e.branchName,children:[f.jsx(hm,{size:12}),e.branchName]}),r&&f.jsxs("span",{children:[LAe()," ",f.jsx("span",{children:r})]})]}),b&&b.fileCount>0&&f.jsx("div",{className:"hc-git-row",title:b.truncated?YQ({parent:Ne(r??"parent")}):UQ({parent:Ne(r??"parent")}),children:f.jsxs("span",{children:[b.truncated&&"≥ ",f.jsxs("span",{className:"diff-stat-add text-accent-green",children:["+",b.additions]})," ",f.jsxs("span",{className:"diff-stat-del text-accent-red",children:["−",b.deletions]})," · ",b.fileCount===1&&!b.truncated?XVe():b.truncated?LVe({count:Jt(b.fileCount)}):jVe({count:Jt(b.fileCount)})]})})]}),f.jsxs("div",{className:"hc-foot",children:[f.jsxs("span",{className:"hc-command font-mono",children:["$ ",e.runCommand]}),f.jsxs("span",{children:[jAe()," ",rPn(e.createdAt)]})]})]}),document.body)}const NM=["empty-state absolute inset-0 flex flex-col items-center","justify-center p-6 text-center text-subtext [&_p]:max-w-[46ch]","[&_p]:m-0 [&_p]:text-sm [&_p]:leading-normal [&_p]:text-balance","[&_p.empty-state-title]:text-2xl [&_p.empty-state-title]:font-normal","[&_p.empty-state-title]:text-text [&_p.empty-state-hint]:text-lg","[&_p.empty-state-hint]:text-subtext empty-state-cta gap-1.5"].join(" "),iPn=264,zM=132,tv=44,aPn=72,oPn=148,lPn=44;function cPn(e){const n=new Map(e.map(i=>[i.id,{exp:i,children:[]}])),t=[];for(const i of e){const a=n.get(i.id),o=i.parentExperimentId?n.get(i.parentExperimentId):void 0;o?o.children.push(a):t.push(a)}const r=(i,a)=>i.exp.createdAt-a.exp.createdAt,s=i=>{i.children.sort(r),i.children.forEach(s)};return t.sort(r),t.forEach(s),t}function uPn(e,n){const t=new Map,r=o=>{const l=t.get(o)??1+o.children.reduce((u,h)=>u+r(h),0);return t.set(o,l),l},s=new Map,i=o=>{const l=s.get(o)??(n(o)||o.children.some(i));return s.set(o,l),l};function a(o){if(n(o)){const h=[];let _=0;for(const p of o.children)i(p)?h.push(...a(p)):_+=r(p);return _>0&&h.push({kind:"elided",id:`el-${o.exp.id}`,count:_,children:[]}),[{kind:"exp",exp:o.exp,children:h}]}if(!i(o))return[];let l=0;const u=[];return(function h(_){l+=1;for(const p of _.children)n(p)?u.push(...a(p)):i(p)?h(p):l+=r(p)})(o),[{kind:"elided",id:`el-${o.exp.id}`,count:l,children:u}]}return e.flatMap(a)}function sk(e){return e.kind==="exp"?iPn:oPn}function T1(e){return e.kind==="exp"?e.exp.id:e.id}function nv(e){if(e.children.length===0)return sk(e);const n=e.children.reduce((t,r)=>t+nv(r),0)+tv*(e.children.length-1);return Math.max(sk(e),n)}function _Pn(e){return e==="done"?"pass":e==="failed"?"fail":e==="running"||e==="starting"||e==="cancelling"?"live":"other"}const fPn=T.memo(function({data:n}){sf();const{exp:t,latestRun:r,runs:s,isBaseline:i,parentSlug:a,githubOwner:o,githubRepo:l,onOpenView:u,onOpenCode:h}=n,_=r?Zi(r):void 0,p=_==="running"||_==="starting"||_==="cancelling",m=i?Pcn():p?dun():Pl(),x=s.slice(-8),k=T.useRef(null),v=nPn(k,n);return f.jsxs("div",{ref:k,className:`exp-node w-66 border border-border rounded-md bg-background py-2.5 px-3 shadow-tree text-sm transition-[box-shadow] duration-120 ease-standard [&:hover]:shadow-tree-hover [&.live]:border-accent-teal [&.live]:shadow-tree-live [&_.node-overview-link]:block [&_.node-overview-link]:w-full [&_.node-overview-link]:p-0 [&_.node-overview-link]:border-0 [&_.node-overview-link]:bg-transparent [&_.node-overview-link]:text-inherit [&_.node-overview-link]:[font:inherit] [&_.node-overview-link]:text-start [&_.node-overview-link]:cursor-pointer [&_.node-overview-link:hover_.node-slug]:underline [&_.node-overview-link:hover_.node-slug]:underline-offset-[3px] [&_.node-overview-link:focus-visible]:outline-2 [&_.node-overview-link:focus-visible]:outline-solid [&_.node-overview-link:focus-visible]:outline-accent [&_.node-overview-link:focus-visible]:outline-offset-4 [&_.node-overview-link:focus-visible]:rounded-xs [&_.node-eyebrow]:flex [&_.node-eyebrow]:items-center [&_.node-eyebrow]:justify-between [&_.node-eyebrow]:gap-2 [&_.node-eyebrow]:mb-1.5 [&_.node-eyebrow]:text-xs [&_.node-eyebrow]:font-medium [&_.node-eyebrow]:text-muted [&_.node-head]:flex [&_.node-head]:items-center [&_.node-head]:gap-[7px] [&_.node-head]:min-w-0 [&_.node-status]:w-2 [&_.node-status]:h-2 [&_.node-status]:rounded-full [&_.node-status]:shrink-0 [&_.node-slug]:text-sm [&_.node-slug]:font-semibold [&_.node-slug]:text-text [&_.node-slug]:flex-1 [&_.node-slug]:min-w-0 [&_.node-slug]:overflow-hidden [&_.node-slug]:text-ellipsis [&_.node-slug]:whitespace-nowrap [&_.node-title]:mt-1 [&_.node-title]:text-text [&_.node-title]:text-sm [&_.node-title]:line-clamp-2 [&_.node-meta]:mt-2 [&_.node-meta]:flex [&_.node-meta]:items-center [&_.node-meta]:gap-2 [&_.node-meta]:text-xs [&_.node-meta]:text-muted [&_.node-actions]:mt-2 [&_.node-actions]:pt-1.5 [&_.node-actions]:border-t [&_.node-actions]:border-t-border-variant [&_.node-actions]:flex [&_.node-actions]:items-center [&_.node-actions]:gap-[3px] [&_.node-action]:inline-flex [&_.node-action]:items-center [&_.node-action]:gap-[5px] [&_.node-action]:py-[3px] [&_.node-action]:px-1.5 [&_.node-action]:text-sm [&_.node-action]:font-medium [&_.node-action]:text-text [&_.node-action]:rounded-sm [&_.node-action]:no-underline [&_.node-action:hover]:text-text [&_.node-action:hover]:bg-surface [&_.node-action-ext]:ms-auto [&_.node-action-ext]:py-[3px] [&_.node-action-ext]:px-[5px] ${p?"live":""}`,onMouseEnter:v.onMouseEnter,onMouseLeave:v.onMouseLeave,children:[f.jsx(Nu,{type:"target",position:zt.Top}),f.jsxs("div",{role:"button",tabIndex:0,className:"node-overview-link nodrag",...qr(b=>u(t.id,"overview",b)),children:[f.jsxs("div",{className:"node-eyebrow",children:[f.jsx("span",{children:m}),f.jsx(ec,{status:_??"idle"})]}),f.jsx("div",{className:"node-head",children:f.jsx("span",{className:"node-slug",children:t.slug})}),(t.title||t.description)&&f.jsx("div",{className:"node-title",children:t.title||t.description}),f.jsxs("div",{className:"node-meta",children:[f.jsx("span",{children:z_n()}),x.length>0?f.jsx("span",{className:"run-squares flex items-center gap-[3px]",children:x.map(b=>f.jsx("span",{className:`run-sq w-[9px] h-[9px] shrink-0 [&.pass]:bg-accent-green [&.fail]:border-[1.5px] [&.fail]:border-danger-outline [&.live]:bg-accent-teal [&.live]:animate-[or-pulse_1.2s_ease-in-out_infinite] [&.other]:border-[1.5px] [&.other]:border-border ${_Pn(Zi(b))}`,title:YS(Zi(b))},b.id))}):f.jsx("span",{children:o_n()}),f.jsx("span",{className:"flex-1"}),r&&f.jsx("span",{children:Vo(r.createdAt)})]})]}),f.jsxs("div",{className:"node-actions",onClick:b=>b.stopPropagation(),children:[s.length>0&&f.jsxs("button",{className:"node-action",title:h_n(),...qr(b=>u(t.id,"terminal",b)),children:[f.jsx(co,{size:13}),pL()]}),f.jsxs("button",{className:"node-action",title:QO({branch:Ne(t.branchName)}),...qr(b=>h(t.id,t.branchName,"files",b)),children:[f.jsx(Eb,{size:13}),Oun()]}),o&&l&&f.jsx("a",{className:"node-action node-action-ext",title:hv({name:Ne(t.branchName)}),"aria-label":hv({name:Ne(t.branchName)}),href:xb(o,l,t.branchName),target:"_blank",rel:"noopener noreferrer",onClick:b=>b.stopPropagation(),children:f.jsx(Rb,{size:13})})]}),f.jsx(Nu,{type:"source",position:zt.Bottom}),v.rect&&f.jsx(sPn,{exp:t,runs:s,latestRun:r,parentSlug:a,anchor:v.rect,onOpenLogs:s.length>0?b=>u(t.id,"terminal",b):void 0,onOpenCode:b=>h(t.id,t.branchName,"files",b),onMouseEnter:v.keepOpen,onMouseLeave:v.onMouseLeave})]})}),dPn=T.memo(function({data:n}){sf();const{count:t,onShowProjectScope:r}=n;return f.jsxs("div",{className:"elided-node w-37 h-11 flex items-center gap-2 py-1.5 px-2.5 border border-dashed border-border rounded-md bg-hover-faint text-muted text-sm font-medium text-start transition-[border-color,color] duration-120 ease-standard [&:hover]:border-text [&:hover]:text-text [&_.elided-node-label]:flex [&_.elided-node-label]:flex-col [&_.elided-node-label]:leading-[1.3] [&_.elided-node-sub]:text-muted",role:"button",tabIndex:0,title:D_n(),onClick:r,onKeyDown:s=>{(s.key==="Enter"||s.key===" ")&&(s.preventDefault(),r())},children:[f.jsx(Nu,{type:"target",position:zt.Top}),f.jsx(Jk,{size:14}),f.jsxs("span",{className:"elided-node-label",children:[t===1?aun():Jcn({count:Jt(t)}),f.jsx("span",{className:"elided-node-sub",children:x_n()})]}),f.jsx(Nu,{type:"source",position:zt.Bottom})]})}),hPn={exp:fPn,elided:dPn},EU={type:"default",style:{stroke:"var(--text)",strokeWidth:1.5,opacity:.3}},pPn={...EU.style,strokeDasharray:"4 4"};function mPn({experiments:e,runs:n,project:t,onOpenView:r,onOpenCode:s,agentSessionId:i,onShowProjectScope:a,viewport:o,onViewportChange:l}){const{nodes:u,edges:h}=T.useMemo(()=>{const _=new Map;for(const y of n){const C=_.get(y.experimentId);C?C.push(y):_.set(y.experimentId,[y])}for(const y of _.values())y.sort((C,E)=>C.createdAt-E.createdAt);const p=[],m=[],x=y=>!i||y.exp.chatSessionId===i,k=uPn(cPn(e),x),v=new Map(e.map(y=>[y.id,y.slug]));function b(y,C,E){const N=C-sk(y)/2;if(y.kind==="exp"){const M=_.get(y.exp.id)??[];p.push({id:y.exp.id,type:"exp",position:{x:N,y:E},data:{exp:y.exp,latestRun:M[M.length-1]??null,runs:M,isBaseline:!y.exp.parentExperimentId,parentSlug:y.exp.parentExperimentId?v.get(y.exp.parentExperimentId)??null:null,githubOwner:t.githubEnabled?t.githubOwner:"",githubRepo:t.githubEnabled?t.githubRepo:"",onOpenView:r,onOpenCode:s}})}else p.push({id:y.id,type:"elided",position:{x:N,y:E+(zM-lPn)/2},data:{count:y.count,onShowProjectScope:a}});if(y.children.length===0)return;const A=y.children.reduce((M,L)=>M+nv(L),0)+tv*(y.children.length-1);let j=C-A/2;for(const M of y.children){const L=nv(M),I=y.kind==="elided"||M.kind==="elided";m.push({id:`e-${T1(y)}-${T1(M)}`,source:T1(y),target:T1(M),...I?{style:pPn}:{}}),b(M,j+L/2,E+zM+aPn),j+=L+tv}}let w=0;for(const y of k){const C=nv(y);b(y,w+C/2,0),w+=C+tv}return{nodes:p,edges:m}},[e,n,r,s,t.githubOwner,t.githubRepo,t.githubEnabled,i,a]);return e.length===0?f.jsxs("div",{className:NM,children:[f.jsx("p",{className:"empty-state-title",children:e_n()}),f.jsx("p",{className:"empty-state-hint",children:Nun()})]}):u.length===0&&i?f.jsxs("div",{className:NM,children:[f.jsx("p",{className:"empty-state-title",children:Kun()}),f.jsx("p",{className:"empty-state-hint",children:yun()})]}):f.jsx(SBn,{className:"[&_.react-flow\\_\\_node.react-flow\\_\\_node-exp.selectable]:cursor-default [&_.react-flow\\_\\_node.react-flow\\_\\_node-elided.selectable]:cursor-pointer [&_.react-flow\\_\\_handle]:opacity-0 [&_.react-flow\\_\\_handle]:pointer-events-none [&_.react-flow\\_\\_attribution]:hidden!",nodes:u,edges:h,nodeTypes:hPn,defaultEdgeOptions:EU,nodesDraggable:!1,nodesConnectable:!1,nodesFocusable:!1,onMoveStart:tPn,onMoveEnd:(_,p)=>{_&&l(p)},minZoom:.15,defaultViewport:o??void 0,fitView:o===null,fitViewOptions:{padding:.25,maxZoom:1},children:f.jsx(jBn,{variant:nc.Dots,color:"var(--dots-strong)",gap:28,size:1.6})},i??"project")}const $p=["empty-state absolute inset-0 flex flex-col items-center","justify-center gap-2.5 p-6 text-center text-subtext","[&_p]:max-w-[46ch] [&_p]:m-0 [&_p]:text-sm [&_p]:leading-normal","[&_p]:text-balance [&_p.empty-state-title]:text-2xl","[&_p.empty-state-title]:font-normal [&_p.empty-state-title]:text-text","[&_p.empty-state-hint]:text-lg [&_p.empty-state-hint]:text-subtext"].join(" ");function gPn(e){return e.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}function vPn(e,n,t,r,s){let i=e,a;const o=n==null?void 0:n.replace(/\/+$/,""),l=r==null?void 0:r.replace(/\/+$/,"");if(i.startsWith("artifacts/"))return i=i.slice(10),i?{path:i,source:"artifacts"}:null;if(i==="~"||i.startsWith("~/")||c6(i))return{path:i,source:"abs"};const u=p=>{const m=v=>v.replace(/^\/private(?=\/(?:tmp|var)(?:\/|$))/,""),[x,k]=[m(i),m(p)];return x===k?"":x.startsWith(`${k}/`)?x.slice(k.length).replace(/^\/+/,""):null},h=i.startsWith("/")&&l?u(l):null,_=i.startsWith("/")&&o?u(o):null;if(!i.startsWith("/"))a=t;else{if(h!==null)return h?{path:h,source:"artifacts"}:null;if(_!==null)i=_;else{const p=s?gPn(s):"[^/]+",m=i.match(new RegExp(`/files/${p}/(.+)$`)),x=m?null:i.match(/\/openresearch\/worktrees\/[^/]+\/([^/]+)\/(.+)$/),k=m||x?null:i.match(/\/openresearch\/repos\/[^/]+\/[^/]+\/(.+)$/);if(m)return{path:m[1],source:"artifacts"};x?(a=x[1],i=x[2]):k&&(i=k[1])}}return i?i.startsWith("/")?{path:i,source:"abs"}:{path:i,sessionId:a}:null}function bPn(e,n){if(!(e.source==="artifacts"||e.source==="abs"))return e.ref??e.branchLabel??n}const yPn=10,jM=1448,xPn=80,wPn=48;function TM(e,n){const t=e.findIndex(s=>s.id===n.id);if(t<0)return[...e,n];const r=e.slice();return r[t]=n,r}function AM(e){const n=T.useRef(e);return n.current.size===e.size&&[...e].every(([r,s])=>n.current.get(r)===s)||(n.current=e),n.current}function kPn({runtime:e,projectId:n,pane:t}){var Va,ni,wo;const r=hn({mutationFn:Vpn}),s=_i(),i=FO({select:Z=>Z.location}),a=U_(i.pathname),o=(a==null?void 0:a.kind)==="skills"?"skills":(a==null?void 0:a.kind)==="settings"?a.section??"settings":"chat",l=T.useRef(null),u=(a==null?void 0:a.kind)==="task"?a.sessionId??null:l.current;(a==null?void 0:a.kind)==="task"&&(l.current=u);const h=t!==void 0,_=(t==null?void 0:t.kind)==="experiment"?t.runId??null:null,[p,m]=T.useState(null),[x,k]=T.useState(0),v=T.useRef({href:"",jump:0,value:0});(v.current.href!==i.href||v.current.jump!==x)&&(v.current={href:i.href,jump:x,value:v.current.value+1});const b=T.useMemo(()=>{const Z=t?eo(t):"experiments";return typeof Z=="object"&&"path"in Z&&Z.line&&p!==v.current.value?{...Z,lineScrollRequest:v.current.value}:Z},[t,p,i.href,x]),w=ft(Aa(n)),y=T.useMemo(()=>{var Z;return((Z=w.data)==null?void 0:Z.map(ge=>ge.id))??null},[w.data]),C=T.useRef(new Set),E=T.useRef(new Set),N=T.useRef({}),[A,j]=T.useState(0),M=T.useRef({projectId:n,activeSessionId:u,pane:t,isTask:(a==null?void 0:a.kind)==="task"});M.current={projectId:n,activeSessionId:u,pane:t,isTask:(a==null?void 0:a.kind)==="task"};const L=T.useCallback((Z,ge=!1)=>{const Te=M.current;Te.projectId&&s.navigate({href:P1(Te.projectId,Te.activeSessionId,Z),replace:ge})},[s]),I=T.useCallback(Z=>{const ge=Ql(Z);L(ge.kind==="file"?{...ge,line:void 0}:ge)},[L]),B=T.useCallback(()=>L(void 0),[L]),q=T.useCallback(Z=>{(t==null?void 0:t.kind)==="experiment"&&L({...t,runId:Z??void 0})},[t,L]),U=T.useCallback(Z=>{s.navigate({href:Z?`/projects/${encodeURIComponent(Z)}`:"/projects"})},[s]),W=T.useCallback(Z=>{var ge;if(n)if(Z==="chat"){const Te=l.current;s.navigate({href:P1(n,Te,(ge=mu(go.current,Te??"new"))==null?void 0:ge.active)})}else s.navigate({href:`/projects/${encodeURIComponent(n)}/${Z==="skills"?"skills":`settings/${Z}`}`})},[s,n]),H=sf(),{status:Y}=KS(e.kind==="local"),te=T.useMemo(()=>v0(),[n]),$=ft(te),D=$.data??null,F=T.useCallback(Z=>{Xr(te.queryKey,ge=>(typeof Z=="function"?Z(ge??null):Z)??void 0)},[te]),G=T.useMemo(()=>fm(),[n]),V=ft(G),ee=V.data??null,ce=T.useCallback(Z=>{Xr(G.queryKey,ge=>(typeof Z=="function"?Z(ge??null):Z)??void 0)},[G]),ae=T.useRef(void 0);ae.current=ee==null?void 0:ee.tourCompleted;const re=[!w.data&&w.error?tD():null,!$.data&&$.error?Xp():null,!V.data&&V.error?mue():null].filter(Z=>Z!==null),X=re.length?kue({items:new Intl.ListFormat(H).format(re)}):null,oe=T.useRef(null),le=ft(x3(n)),_e=le.data??[],pe=!le.isPending,[Ee,Ie]=T.useState(!1),He=ft(fu(n)).data??[],Oe=T.useRef(He);Oe.current=He;const Xe=T.useRef(new Map),_t=T.useRef(new Set),Vt=T.useRef(null),$t=T.useRef(!1),jt=T.useRef(new Map),mt=T.useRef(new Map),we=T.useRef(0),ct=T.useRef(_e);ct.current=_e;const je=ft(iwn(n)).data??null,[qe,at]=T.useState("table"),[nt,Kt]=T.useState("project"),Qe=T.useRef(null),{open:kt,setOpen:Tt,ref:Yt}=_o(Qe),[tn,rr]=T.useState(!1),rn=_e.every(Z=>Z.chatSessionId),ln=u&&rn?nt:"project",An=T.useMemo(()=>ln!=="agent"?_e:_e.filter(Z=>Z.chatSessionId===u),[_e,ln,u]),Un=T.useMemo(()=>{if(ln!=="agent")return He;const Z=new Set(An.map(ge=>ge.id));return He.filter(ge=>Z.has(ge.experimentId))},[He,An,ln]),[Yn,fr]=T.useState([]),[Yr,zr]=T.useState(!1),[St,cn]=T.useState(!1),[jn,fn]=T.useState(!1),[Dn,mn]=T.useState(!1),[Gn,Rn]=T.useState(null),[yt,Dt]=T.useState([]),[Ue,gt]=T.useState([]),ur=T.useRef(new Map),un=T.useRef(new Map),Lt=Z=>{let ge=un.current.get(Z);return ge||(ge=new SRn,un.current.set(Z,ge)),ge},[Kn,mr]=T.useState([]),[gr,ho]=T.useState([]),[Qs,Xs]=T.useState([]),[xs,Ai]=T.useState([]),[Ur,Ys]=T.useState(null),[Zs,sr]=T.useState("files"),[fa,al]=T.useState(new Set),[Ut,us]=T.useState(!1),[Dr,Ia]=T.useState(null),[ot,Wt]=T.useState(UI),[Ri,da]=T.useState(()=>window.innerWidth>=jM),ws=o==="chat"&&!h&&Ri,[Ln,hi]=T.useState(!0),[fc,Mi]=T.useState(!1),ks=T.useRef(_S()),Oi=T.useRef(u);Oi.current=u;const Zr=T.useRef(Yn);Zr.current=Yn;const vr=T.useRef(xs);vr.current=xs;const Qt=T.useRef(null),Is=T.useCallback(Z=>{const ge=[...Z];vr.current=ge,Ai(ge)},[]),_s=T.useCallback(Z=>{Qt.current=Z,Ys(Z)},[]),Lr=T.useCallback(Z=>{const ge=At(Z);Dt(Re=>Ep(Re,ge)),gt(Re=>Ep(Re,ge)),mr(Re=>Ep(Re,ge)),ho(Re=>Ep(Re,ge)),Xs(Re=>Ep(Re,ge));const Te=jr.current;if(Te&&"path"in Z){const Re=Ls(Te,Oi.current,Z);ur.current.delete(Re),un.current.delete(Re),E.current.delete(Re),C.current.delete(Re)}const Be=Zr.current.filter(Re=>At(Re)!==ge);Zr.current=Be,fr(Be)},[]),ir=T.useCallback(Z=>{const ge=At(Z),Te=[...Zr.current.filter(Be=>At(Be)!==ge),Zg(Z)];Zr.current=Te,fr(Te),I(Z)},[I]),Js=T.useCallback((Z,ge,Te)=>{const Be=At(Z),Re=Qt.current,st=Hzn({order:vr.current,previewKey:Re?At(Re):null},Be,ge);st.replacedKey&&Re&&typeof Re!="string"&&At(Re)===st.replacedKey&&Lr(Re),Is(st.order),st.previewKey===null?_s(null):st.previewKey===Be&&_s(Zg(Z));const it=[...Zr.current.filter(Ht=>At(Ht)!==Be),Zg(Z)];Zr.current=it,fr(it),L(Ql(Z,Te))},[Lr,Is,_s,L]),Gr=T.useCallback(Z=>{const ge=Qt.current;ge&&At(ge)===At(Z)&&_s(null)},[_s]);T.useEffect(()=>{let Z=!1;const ge=Be=>{const Re=Qt.current,st=Be.target;if(st instanceof Element&&st.closest("input, textarea, [contenteditable='true']")!==null){Z=!1;return}if(Re&&At(Re)===At(ks.current.rightTab)&&(Be.metaKey||Be.ctrlKey)&&!Be.altKey&&!Be.shiftKey&&Be.key.toLowerCase()==="k"){Be.preventDefault(),Z=!0;return}if(Z&&Be.key==="Enter"){Be.preventDefault(),Z=!1;const Ht=Qt.current;Ht&&Gr(Ht);return}Z=!1},Te=()=>{Z=!1};return window.addEventListener("keydown",ge),window.addEventListener("blur",Te),window.addEventListener("pointerdown",Te),()=>{window.removeEventListener("keydown",ge),window.removeEventListener("blur",Te),window.removeEventListener("pointerdown",Te)}},[Gr]);const Ss=T.useCallback((Z,ge)=>{const Te=At(Z),Be=Qt.current;Be&&At(Be)===Te&&_s(null);const Re=qzn({order:vr.current,previewKey:Be?At(Be):null},Te,Zr.current.map(At));Is(Re.order);const st=Zr.current.filter(Ht=>At(Ht)!==Te);if(Zr.current=st,fr(st),!ge)return;const it=Re.fallbackKey?st.find(Ht=>At(Ht)===Re.fallbackKey):void 0;it?I(it):(B(),us(!1))},[Is,_s,I,B]),ol=W,Ou=T.useMemo(()=>({rightTab:Zg(b),tabHistory:Yn,experimentsTabOpen:Yr,filesTabOpen:St,artifactsTabOpen:jn,terminalTabOpen:Dn,expTabs:yt,fileTabs:Ue,planTabs:Kn,subagentTabs:gr,codeTabs:Qs,contentTabOrder:vr.current,previewTab:Qt.current,filesView:Zs,filesToggled:fa,selectedRunId:_,scope:nt,panelOpen:h,panelMax:Ut,treeViewport:Dr}),[b,Yn,Yr,St,jn,Dn,yt,Ue,Kn,gr,Qs,xs,Ur,Zs,fa,_,nt,h,Ut,Dr]);ks.current=Ou;const dc=T.useCallback(()=>Object.fromEntries(ur.current),[]),Di=T.useRef(void 0),po=T.useCallback(()=>{clearTimeout(Di.current),Di.current=setTimeout(()=>j(Z=>Z+1),200)},[]);T.useEffect(()=>()=>clearTimeout(Di.current),[]);const mo=T.useCallback((Z,ge,Te)=>{if(fr(Z.tabHistory),Zr.current=Z.tabHistory,zr(Z.experimentsTabOpen),cn(Z.filesTabOpen),fn(Z.artifactsTabOpen),mn(Z.terminalTabOpen),Dt(Z.expTabs),gt(Z.fileTabs),mr(Re=>Re===Z.planTabs?Re:Z.planTabs.map(st=>{var it;return{...st,plan:((it=Re.find(Ht=>Ht.sessionId===st.sessionId&&Ht.promptId===st.promptId))==null?void 0:it.plan)??""}})),ho(Z.subagentTabs),Xs(Z.codeTabs),Is(Z.contentTabOrder),_s(Z.previewTab),sr(Z.filesView),al(Z.filesToggled),Kt(Z.scope),us(Z.panelMax),Ia(Z.treeViewport),rr(M.current.activeSessionId===bd&&Z.fileTabs.some(Re=>s_(Re,{path:Q2,source:"artifacts"}))),Te){for(const[Re,st]of Object.entries((ge==null?void 0:ge.scroll)??{}))ur.current.set(Re,st);Object.assign(N.current,ge==null?void 0:ge.sourceModes)}const Be=M.current;if(Be.projectId)for(const Re of Z.fileTabs){const st=Ls(Be.projectId,Be.activeSessionId,Re);E.current.has(st)||C.current.add(st)}},[Is,_s]),{ready:Ir,loaded:js,error:$a,retry:Zn,capture:Ba,workspace:go}=fxn({projectId:ee&&y!==null&&((a==null?void 0:a.kind)!=="task"||!u||y.includes(u))?n:null,taskKey:u??"new",location:i.href,pane:t,isTask:(a==null?void 0:a.kind)==="task",firstDemoOpen:(ee==null?void 0:ee.tourCompleted)===!1,state:Ou,apply:mo,getScroll:dc,sourceModes:N.current,revision:A}),hc=T.useRef(null);T.useLayoutEffect(()=>{if(!Ir||!pe||(a==null?void 0:a.kind)!=="task")return;const Z=hc.current;(Z==null?void 0:Z.projectId)===n&&Z.taskId===u&&Z.scope!==ln&&Ia(null),hc.current={projectId:n,taskId:u,scope:ln}},[Ir,pe,a==null?void 0:a.kind,n,u,ln]);const Li=T.useCallback((Z,ge)=>{var st;if(!n)return;Z&&ge!=null&&ge.replace&&u===null&&(Ba(),uxn(n,Z));const Te=mu(PI(n),Z??"new"),Be=Te?Te.active:$l(n)?(st=fS(Z??void 0,ae.current===!1))==null?void 0:st.active:void 0,Re=ge!=null&&ge.replace&&Z&&u===null?M.current.pane:Be;s.navigate({href:P1(n,Z,Re),replace:ge==null?void 0:ge.replace})},[s,n,u,Ba]);T.useEffect(()=>{Ir&&(a==null?void 0:a.kind)!=="task"&&!l.current&&go.current.lastTaskId&&(y!=null&&y.includes(go.current.lastTaskId))&&(l.current=go.current.lastTaskId,j(Z=>Z+1))},[Ir,a==null?void 0:a.kind,go,y]),MW({shouldBlockFn:({next:Z})=>{var ge;return((ge=U_(Z.pathname))==null?void 0:ge.projectId)!==n&&[...un.current.values()].some(Te=>Te.needsProtection)&&!vR(bN())},enableBeforeUnload:()=>[...un.current.values()].some(Z=>Z.needsProtection)});const Pa=T.useRef(null);T.useEffect(()=>{const Z=Nb(i.href);!ee||!Ir||!Z||(Tb.queue({lastLocation:Z,railOpen:Ln,panelWidth:ot,experimentsView:qe},Pa.current===Z?250:0),Pa.current=Z)},[i.href,ee,Ir,Ln,ot,qe]);const pi=(ee==null?void 0:ee.onboardingCompleted)??!1,[vo,bo]=T.useState(!1),[Ii,ll]=T.useState(null),[cl,pc]=T.useState(0),Wn=T.useCallback(()=>bo(!0),[]),Fa=T.useCallback(async Z=>{const ge=ae.current===!1,Te=await r.mutateAsync({tourCompleted:!0});ge&&eu({name:"demo_welcome_choice",choice:Z}),ce(Be=>Be&&{...Be,tourCompleted:Te.tourCompleted}),bo(!1),Z==="explore_demo"&&pc(Be=>Be+1)},[]),Cs=T.useCallback(async()=>{await Fa("create_project"),Mi(!0)},[Fa]);T.useEffect(()=>{!n||!$l(n)||!pi||ee!=null&&ee.tourCompleted||Wn()},[n,pi,Wn,ee==null?void 0:ee.tourCompleted]);const Ct=(D==null?void 0:D.find(Z=>Z.id===n))??null;T.useEffect(()=>{const Z=X||ee===null?null:Ct==null?void 0:Ct.name;document.title=Z?`${qo(Z)} — OpenResearch`:"OpenResearch"},[X,ee,Ct]);const jr=T.useRef(n);jr.current=n;const $i=T.useCallback(Z=>{n&&eu({name:"first_action",surface:$l(n)?"demo":"project",action:Z})},[n]);T.useEffect(()=>{o!=="chat"&&o!=="skills"&&$i("open_settings")},[o,$i]);const fs=T.useCallback((Z=!1)=>{Z&&(!M.current.isTask||M.current.pane)||($i("open_experiment"),zr(!0),L({kind:"home",view:"experiments"},Z))},[L,$i]),pf=()=>{$.refetch(),V.refetch(),w.refetch()},ul=T.useRef(!1);T.useEffect(()=>{if(!ee||ul.current)return;ul.current=!0,oe.current=ee.preferredAgent;const Z=cS()??ee.workspace;Z&&(hi(Z.railOpen),Wt(Math.min(Z.panelWidth,Hp())),at(Z.experimentsView))},[ee]),T.useEffect(()=>{y&&l.current&&!y.includes(l.current)&&(l.current=null)},[y]);const mc=T.useRef(Promise.resolve()),ha=T.useRef(0),Ha=T.useCallback(Z=>{const ge=++ha.current;ce(Be=>Be&&{...Be,preferredAgent:Z});const Te=mc.current.then(()=>r.mutateAsync({preferredAgent:Z})).then(Be=>{oe.current=Be.preferredAgent,ge===ha.current&&ce(Re=>Re&&{...Re,preferredAgent:Be.preferredAgent})}).catch(Be=>{throw ge===ha.current&&ce(Re=>Re&&{...Re,preferredAgent:oe.current}),Be});return mc.current=Te.catch(()=>{}),Te},[]);T.useEffect(()=>{const Z=()=>{Wt(ge=>Math.min(ge,Hp())),da(window.innerWidth>=jM)};return window.addEventListener("resize",Z),()=>window.removeEventListener("resize",Z)},[]);const gc=T.useCallback(Z=>{$t.current=!1,jt.current.clear(),mt.current.clear();const ge=++we.current;rt.fetchQuery(fu(Z)).then(Te=>{if(jr.current!==Z||Vt.current!==Z||we.current!==ge)return;jt.current=new Map(Te.map(Re=>[Re.id,Re]));const Be=[...mt.current.values()].some(Re=>{const st=jt.current.get(Re.id);return!st||st.status!=="running"&&st.updatedAt<=Re.updatedAt});mt.current.clear();for(const Re of Te){const st=Xe.current.get(Re.id);(!st||st.updatedAt{var st;return Te.some(it=>it.id===Re&&it.status==="running")?Re:((st=Te.find(it=>it.status==="running"))==null?void 0:st.id)??null}),Be&&fs(!0)}).catch(()=>{we.current===ge&&(mt.current.clear(),Ie(!0))})},[fs]);T.useEffect(()=>{if(n)return Vt.current=n,Xe.current.clear(),_t.current.clear(),s0n(n).catch(()=>{}),gc(n),()=>{we.current++}},[gc,n]);const Ah=T.useCallback(()=>{fn(!0),ir("artifacts")},[ir]),vc=T.useCallback(()=>{mn(!0),ir("terminal")},[ir]),pa=u??(n?`project:${n}`:null);T.useEffect(()=>{Rn(h?b==="terminal"?pa:Z=>Z===pa?Z:null:null)},[h,b,pa]),Kgn({onReconnect:()=>{const Z=jr.current;Z&&(Vt.current=Z,Xe.current.clear(),_t.current.clear(),gc(Z))},onRun:Z=>{if(Z.projectId!==jr.current||Z.projectId!==Vt.current)return;const ge=Xe.current.get(Z.id),Te=_t.current.has(Z.id);if(ge&&ge.updatedAt>Z.updatedAt||(Xe.current.set(Z.id,Z),_t.current.add(Z.id),$l(Z.projectId)&&ll(st=>Z.status==="running"?st??Z.id:st===Z.id?null:st),Z.status!=="running"||(ge==null?void 0:ge.status)==="running"))return;const Be=jt.current.get(Z.id),Re=$t.current&&(!Be||Be.status!=="running"&&Be.updatedAt<=Z.updatedAt);Te&&ge||Re?fs(!0):$t.current||mt.current.set(Z.id,Z)}});const Du=T.useCallback(()=>Kt("project"),[]),ei=T.useCallback((Z,ge="overview",Te="preview",Be)=>{$i("open_experiment");const Re={id:Z,view:ge};Dt(st=>st.some(it=>nw(it,Re))?st:[...st,Re]),Js(Re,Te,Be)},[Js]),Lu=T.useCallback((Z,ge="preview")=>{const Te=Oe.current.filter(Re=>Re.id===Z||Re.id.startsWith(Z)),Be=Te.length===1?Te[0]:null;Be&&ei(Be.experimentId,"terminal",ge,Be.id)},[ei]),Iu=T.useMemo(()=>new Map(_e.map(Z=>{var ge;return[Z.id,((ge=Z.title)==null?void 0:ge.trim())||Z.slug||Pl()]})),[_e,H]),qa=AM(Iu),Rh=T.useMemo(()=>{const Z=new Map;for(const ge of He)Z.set(ge.id,qa.get(ge.experimentId)??Pl());return Z},[qa,He,H]),_l=AM(Rh),mf=T.useCallback(Z=>{const ge=_l.get(Z);if(ge)return ge;const Te=[..._l].filter(([Be])=>Be.startsWith(Z));return Te.length===1?Te[0][1]:""},[_l]),$u=T.useCallback(Z=>{const ge=qa.get(Z);if(ge)return ge;const Te=[...qa].filter(([Be])=>Be.startsWith(Z));return Te.length===1?Te[0][1]:""},[qa]),bc=T.useCallback((Z,ge="preview")=>{const Te=ct.current.filter(Be=>Be.id===Z||Be.id.startsWith(Z));Te.length===1&&ei(Te[0].id,"overview",ge)},[ei]),Mh=T.useCallback(Z=>{const ge=yt.findIndex(Te=>nw(Te,Z));ge!==-1&&(Dt(Te=>Te.filter((Be,Re)=>Re!==ge)),Ss(Z,At(b)===At(Z)))},[yt,Ss,b]),Es=T.useCallback((Z,ge="preview")=>{Z.line!=null&&k(Re=>Re+1);const Te=jr.current;if(Te){const Re=Ls(Te,Oi.current,Z);ks.current.fileTabs.some(st=>s_(st,Z))||C.current.delete(Re),E.current.add(Re)}const Be=$I(Z);gt(Re=>{const st=Re.findIndex(Ht=>s_(Ht,Z));if(st===-1)return[...Re,Be];const it=Re.slice();return it[st]=Be,it}),Js(Z,ge)},[Js]),yc=T.useCallback((Z,ge,Te,Be,Re,st)=>{const it=D==null?void 0:D.find(As=>As.id===n),Ht=vPn(Z,it==null?void 0:it.repoPath,ge,(it==null?void 0:it.artifactsDir)??(it==null?void 0:it.filesDir),it==null?void 0:it.slug);if(!Ht)return null;const Vn=Re?ct.current.find(As=>As.id===Re||Re.length>=6&&As.id.startsWith(Re)):void 0,$r=Te??(Vn==null?void 0:Vn.branchName),Vr=Ht.source==null||Ht.source==="repo";return $r&&Vr&&(Ht.ref=$r),st&&!Ht.ref&&Vr&&(Ht.branchLabel=st),Be!=null&&(Ht.line=Be),Ht},[D,n]),fl=T.useCallback((Z,ge,Te,Be,Re,st,it="preview")=>{const Ht=yc(Z,ge,Te,Be,Re,st);Ht&&Es(Ht,it)},[Es,yc]),gf=T.useCallback(Z=>Es({path:Z,source:"artifacts"},"keepOpen"),[Es]),Bu=T.useCallback((Z,ge,Te,Be,Re,st="preview")=>{const it=yc(Z,ge,Re,Te,Be);it&&Es(it,st)},[Es,yc]),mi=T.useCallback((Z,ge)=>{Gr(Z),ge()},[Gr]),vf=T.useCallback(Z=>{var Be;const ge=Ue.findIndex(Re=>s_(Re,Z));if(ge===-1)return;const Te=n?Ls(n,u,Z):null;Te&&((Be=un.current.get(Te))!=null&&Be.needsProtection)&&!vR(bN())||(gt(Re=>Re.filter((st,it)=>it!==ge)),Te&&(ur.current.delete(Te),un.current.delete(Te),E.current.delete(Te),C.current.delete(Te),delete N.current[Te]),u===bd&&s_(Z,{path:Q2,source:"artifacts"})&&rr(!1),Ss(Z,At(b)===At(Z)))},[u,Ue,Ss,n,b]),Oh=T.useCallback(Z=>{Z.lineScrollRequest!==void 0&&m(Z.lineScrollRequest)},[]),Dh=T.useCallback((Z,ge,Te,Be="preview")=>{const Re={kind:"plan",sessionId:ge,promptId:Te,plan:Z};mr(st=>{const it=st.findIndex(Vn=>Vn.promptId===Te);if(it===-1)return[...st,Re];const Ht=st.slice();return Ht[it]=Re,Ht}),Js(Re,Be)},[Js]),Lh=T.useCallback(Z=>{const ge=Kn.findIndex(Te=>Te.promptId===Z.promptId);ge!==-1&&(mr(Te=>Te.filter((Be,Re)=>Re!==ge)),Ss(Z,At(b)===At(Z)))},[Ss,Kn,b]),Pu=T.useCallback((Z,ge,Te,Be="preview")=>{const Re={kind:"subagent",sessionId:Z,spawnPartId:ge,label:Te};ho(st=>st.some(it=>it.spawnPartId===ge)?st:[...st,Re]),Js(Re,Be)},[Js]),Ih=T.useCallback(Z=>{const ge=gr.findIndex(Te=>Te.spawnPartId===Z.spawnPartId);ge!==-1&&(ho(Te=>Te.filter((Be,Re)=>Re!==ge)),Ss(Z,At(b)===At(Z)))},[Ss,b,gr]),[xc,bf]=T.useState({});T.useEffect(()=>{if(bf(it=>{const Ht=new Set(gr.map(Vn=>Vn.spawnPartId));return Object.keys(it).every(Vn=>Ht.has(Vn))?it:Object.fromEntries(Object.entries(it).filter(([Vn])=>Ht.has(Vn)))}),gr.length===0)return;let Z=!0;const ge=new Set,Te=(it,Ht,Vn)=>{bf($r=>{var As;let Vr=$r;for(const Bi of Ht)if(!(Vn&&ge.has(Bi.spawnPartId)))for(const _n of it){const $s=Yv(_n.parts,Bi.spawnPartId);if(!$s)continue;Vn||ge.add(Bi.spawnPartId);const vi={label:pAn($s),running:((As=$s.state)==null?void 0:As.status)==="running"},yr=Vr[Bi.spawnPartId];(!yr||yr.label!==vi.label||yr.running!==vi.running)&&(Vr===$r&&(Vr={...$r}),Vr[Bi.spawnPartId]=vi);break}return Vr})};let Be=0;const Re=()=>{const it=++Be;for(const Ht of new Set(gr.map(Vn=>Vn.sessionId)))rt.fetchQuery({...Jl(Ht),staleTime:0}).then(({messages:Vn})=>{Z&&it===Be&&Te(Vn,gr.filter($r=>$r.sessionId===Ht),!0)}).catch(()=>{})};Re();const st=Sv(it=>{if(it.type==="reconnected"){ge.clear(),Re();return}if(it.type!=="message")return;const Ht=gr.filter(Vn=>Vn.sessionId===it.sessionId);Ht.length&&Te([it.message],Ht,!1)});return()=>{Z=!1,st()}},[gr]);const dl=T.useCallback((Z,ge,Te="files",Be="preview")=>{const Re={code:!0,experimentId:Z,branch:ge,view:Te,toggled:new Set};Xs(st=>st.some(it=>Xf(it,Re))?st.map(it=>Xf(it,Re)?{...it,experimentId:Z,view:Te}:it):[...st,Re]),Js(Re,Be)},[Js]),yo=T.useCallback((Z,ge)=>{Xs(Te=>Te.map(Be=>Xf(Be,Z)?{...Be,...ge}:Be)),ge.view&&L(Ql({...Z,...ge}))},[]),hl=T.useCallback(Z=>{const ge=Qs.findIndex(Te=>Xf(Te,Z));ge!==-1&&(Xs(Te=>Te.filter((Be,Re)=>Re!==ge)),Ss(Z,At(b)===At(Z)))},[Qs,Ss,b]),wc=T.useCallback(()=>{cn(!0),ir("files")},[ir]),xo=T.useCallback(Z=>{Z==="experiments"?zr(!1):Z==="files"?cn(!1):Z==="terminal"?(mn(!1),Rn(null)):fn(!1),Ss(Z,b===Z)},[Ss,b]),yf=Z=>{Z.preventDefault(),Z.currentTarget.setPointerCapture(Z.pointerId);const Te=document.body.style.userSelect;document.body.style.userSelect="none";const Be=Ut,Re=Z.clientX,st=ot;let it=!1;function Ht(){window.removeEventListener("pointermove",Vn),window.removeEventListener("pointerup",Ht),window.removeEventListener("pointercancel",Ht),document.body.style.userSelect=Te}function Vn($r){if(Be){const _n=$r.clientX-Re;if(it||_nAs+xPn){us(!0);return}us(!1);const Bi=Math.min(Math.max(Vr,jv),As);Wt(Bi)}window.addEventListener("pointermove",Vn),window.addEventListener("pointerup",Ht),window.addEventListener("pointercancel",Ht)},xf=(Z,ge)=>{F(Te=>Te?TM(Te,Z):[Z]),s.navigate({href:`/projects/${encodeURIComponent(Z.id)}${ge?"/settings/git":""}`}),ge&&Bn(ge,"error")},ds=typeof b=="object"&&"id"in b?b:null,yn=typeof b=="object"&&"path"in b?b:null,kc=(yn==null?void 0:yn.source)==="artifacts"&&je?L0(je.entries,yn.path):null,$h=kc?`${kc.modifiedAt}:${kc.size}`:null,pl=u===bd&&tn?Ue.find(Z=>s_(Z,{path:Q2,source:"artifacts"})):void 0,Fu=pl?[pl]:[],Jr=typeof b=="object"&&"kind"in b&&b.kind==="plan"?b:null,ti=Jr==null?void 0:Jr.sessionId,gi=Jr==null?void 0:Jr.promptId,Hu=!!(ti&&gi&&(y!=null&&y.includes(ti))),Ua=ft({...Jl(ti??""),enabled:Hu,subscribed:Hu}),ne=T.useMemo(()=>{var ge;if(!ti||!gi||!Ua.data)return null;const Z=Ua.data.messages.flatMap(Te=>{const Be=Yv(Te.parts,gi);return Be?[Be]:[]})[0];return{key:`${ti}:${gi}`,text:((ge=Z==null?void 0:Z.prompt)==null?void 0:ge.plan)??null}},[ti,gi,Ua.data]),be=typeof b=="object"&&"kind"in b&&b.kind==="subagent"?b:null,De=typeof b=="object"&&"code"in b?b:null,$e=De?Qs.find(Z=>Xf(Z,De))??null:null,Ke=new Map;for(const Z of[...yt,...Ue,...Kn,...gr,...Qs])Ke.set(At(Z),Z);const Nn=pl?At(pl):null,Tn=xs.filter(Z=>Z!==Nn).map(Z=>Ke.get(Z)).filter(oxn),Tr=Z=>Ur!==null&&At(Ur)===At(Z),xn=Z=>f.jsx(Dl,{active:yn!==null&&s_(yn,Z),label:Z.path.split("/").pop()||Z.path,icon:f.jsx(yI,{size:12,className:"shrink-0"}),preview:Tr(Z),onSelect:()=>ir(Z),onPromote:()=>Gr(Z),onClose:()=>vf(Z)},`file:${uS(Z)}`),br=ds?_e.find(Z=>Z.id===ds.id)??null:null,Ga=$e?_e.find(Z=>Z.id===$e.experimentId&&Z.branchName===$e.branch)??null:null,Bh=Z=>{var Te,Be;if("path"in Z)return xn(Z);if("id"in Z){const Re=_e.find(st=>st.id===Z.id);return f.jsx(Dl,{active:ds!==null&&nw(ds,Z),label:Re?Re.title||Re.slug:"…",icon:Z.view==="overview"?f.jsx(tbn,{size:12,className:"shrink-0"}):f.jsx(co,{size:12,className:"shrink-0"}),preview:Tr(Z),onSelect:()=>ir(Z),onPromote:()=>Gr(Z),onClose:()=>Mh(Z)},At(Z))}if("kind"in Z&&Z.kind==="plan")return f.jsx(Dl,{active:Jr!==null&&Jr.promptId===Z.promptId,label:oD(),icon:f.jsx(rS,{size:12,className:"shrink-0"}),preview:Tr(Z),onSelect:()=>ir(Z),onPromote:()=>Gr(Z),onClose:()=>Lh(Z)},At(Z));if("kind"in Z)return f.jsx(Dl,{active:be!==null&&be.spawnPartId===Z.spawnPartId,label:((Te=xc[Z.spawnPartId])==null?void 0:Te.label)??Z.label??Tue(),shimmer:((Be=xc[Z.spawnPartId])==null?void 0:Be.running)??!1,icon:f.jsx(aS,{size:12,className:"shrink-0"}),preview:Tr(Z),onSelect:()=>ir(Z),onPromote:()=>Gr(Z),onClose:()=>Ih(Z)},At(Z));const ge=_e.find(Re=>Re.id===Z.experimentId);return f.jsx(Dl,{active:$e!==null&&Xf($e,Z),label:(ge==null?void 0:ge.slug)??Z.branch,icon:f.jsx(q_,{size:12,className:"shrink-0"}),preview:Tr(Z),onSelect:()=>ir(Z),onPromote:()=>Gr(Z),onClose:()=>hl(Z)},At(Z))};if(!a||a.kind==="resume")return null;if(X)return f.jsxs("div",{className:"app flex flex-col h-full",children:[f.jsxs("div",{className:$p,children:[f.jsx("p",{children:X}),f.jsx(Me,{variant:"primary",onClick:pf,children:Vs()})]}),e.kind==="ssh"&&f.jsx(A3,{runtime:e,corner:!0})]});if(D&&!Ct)return f.jsxs("div",{className:$p,children:[so(),f.jsx(Me,{onClick:()=>U(null),children:Xp()})]});if($a&&!Ir)return f.jsxs("div",{className:$p,children:[f.jsx("p",{role:"alert",children:$a}),f.jsx(Me,{onClick:Zn,children:Vs()})]});if(D===null||ee===null||!js||y===null)return f.jsxs("div",{className:"app flex flex-col h-full",children:[f.jsx("div",{className:$p,children:f.jsx(Rt,{})}),e.kind==="ssh"&&f.jsx(A3,{runtime:e,corner:!0})]});if(!Ct||(a==null?void 0:a.kind)==="task"&&u&&!(y!=null&&y.includes(u)))return f.jsxs("div",{className:$p,children:[so(),f.jsx(Me,{onClick:()=>U(null),children:Xp()})]});const Ts=f.jsx(GRn,{projectName:((Va=D.find(Z=>Z.id===n))==null?void 0:Va.name)??"",onHome:()=>void s.navigate({to:"/projects"}),onNewProject:()=>Mi(!0),onRepository:()=>ol("git"),onCollapse:()=>hi(!1)});return f.jsxs("div",{className:"app flex flex-col h-full",children:[e.kind==="local"&&f.jsx(WI,{}),e.kind==="local"&&f.jsx(S$,{status:Y}),$a&&f.jsxs("div",{role:"alert",className:"flex items-center gap-2 px-4 py-2 text-subtext",children:[f.jsx("span",{children:$a}),f.jsx(Me,{onClick:Zn,children:Vs()})]}),f.jsxs("div",{className:`app-body workspace-body relative flex flex-1 min-h-0 py-0 px-3.5 ${ws?"workspace-card-visible":""}`,children:[n&&f.jsx(jAn,{projectId:n,projectName:(Ct==null?void 0:Ct.name)??"",railHeader:Ts,railOpen:Ln,onShowRail:()=>hi(!0),mainView:o,onSelectMainView:ol,onOpenFile:Bu,onOpenRun:Lu,runExperimentName:mf,onOpenExperiment:bc,experimentName:$u,onOpenPlan:Dh,onOpenSubagent:Pu,composerFocusNonce:cl,demoRunningRunId:Ii,runtime:e,onOpenDemoWelcome:Ct&&$l(Ct.id)?Wn:void 0,activeSessionId:u,onActiveSessionChange:Li,preferredAgent:ee.preferredAgent,onPreferredAgentChange:Ha,children:o==="skills"?f.jsx(hRn,{}):o!=="chat"?f.jsx(Zjn,{remote:e.kind==="ssh",tab:o,project:Ct,onProjectUpdate:Z=>{F(ge=>ge?TM(ge,Z):[Z])},onSelectTab:ol}):null}),o==="chat"&&f.jsx(z5n,{expanded:ws,experiments:_e,runs:He,onOpenExperiment:(Z,ge)=>ei(Z,"overview","preview",ge),rightOffset:h?ot+28:void 0,activeView:h&&(b==="files"||b==="artifacts"||b==="experiments"||b==="terminal")?b:null,projectId:Ct.id,onCompute:()=>ol("compute"),sessionId:u,busy:((ni=w.data)==null?void 0:ni.some(Z=>Z.id===u&&Z.busy))??!1,onChanges:()=>{sr("changes"),wc()},onFiles:()=>{sr("files"),wc()},onTerminal:vc,onArtifacts:Ah,onExperiments:()=>fs()}),o==="chat"&&h&&f.jsxs("aside",{className:`right-pane relative shrink-0 min-w-0 flex flex-col mt-5 me-0 mb-5 ms-3.5 bg-canvas [&.max]:fixed [&.max]:inset-2.5 [&.max]:m-0 [&.max]:z-60 [&.max]:shadow-panel-max border border-border rounded-lg overflow-hidden shadow-elevated ${Ut?"max":""}`,style:Ut?void 0:{width:ot},"data-onboarding":"experiments",children:[f.jsx("div",{className:`panel-resizer absolute start-0 top-0 bottom-0 w-1.5 z-30 [&:hover]:bg-resizer-hover [&:active]:bg-resizer-hover ${Ut?"cursor-e-resize":"cursor-col-resize"}`,title:Ut?Ele():ble(),onPointerDown:yf}),f.jsxs("div",{className:"tabs flex items-end gap-0 pt-1 pe-1.5 pb-0 ps-2 h-10 border-b border-b-border bg-background shrink-0",children:[f.jsxs("div",{className:"tab-strip flex items-end gap-0.5 flex-1 min-w-0 overflow-x-auto [scrollbar-width:none] [&::-webkit-scrollbar]:hidden",children:[Fu.map(xn),St&&f.jsx(Dl,{active:b==="files",label:X4(),icon:f.jsx(q_,{size:12,className:"shrink-0"}),onSelect:()=>ir("files"),onClose:()=>xo("files")}),Dn&&f.jsx(Dl,{active:b==="terminal",label:yv(),icon:f.jsx(co,{size:12,className:"shrink-0"}),onSelect:()=>ir("terminal"),onClose:()=>xo("terminal")}),jn&&f.jsx(Dl,{active:b==="artifacts",label:ZO(),icon:f.jsx(tS,{size:12,className:"shrink-0"}),onSelect:()=>ir("artifacts"),onClose:()=>xo("artifacts")}),Yr&&f.jsx(Dl,{active:b==="experiments",label:JO(),icon:f.jsx(Jd,{size:12,className:"shrink-0"}),onSelect:()=>ir("experiments"),onClose:()=>xo("experiments")}),Tn.map(Bh)]}),f.jsxs("div",{className:"panel-controls inline-flex items-center gap-0.5 self-center py-0 px-1.5 shrink-0",children:[f.jsx(Ft,{title:Ut?DE():OE(),"aria-label":Ut?DE():OE(),onClick:()=>us(Z=>!Z),children:Ut?f.jsx(ryn,{size:14}):f.jsx(eyn,{size:14})}),f.jsx(Ft,{title:p0(),"aria-label":p0(),onClick:()=>{B(),us(!1)},children:f.jsx(_r,{size:14})})]})]}),b==="terminal"&&Dn?null:!Ir||((t==null?void 0:t.kind)==="experiment"||(t==null?void 0:t.kind)==="code")&&!pe||(t==null?void 0:t.kind)==="experiment"&&t.runId&&!Ee?f.jsx(Ea,{children:f.jsx(Rt,{})}):ds&&(!br||_&&!He.some(Z=>Z.id===_&&Z.experimentId===ds.id))||De&&!Ga||t&&"sessionId"in t&&t.sessionId&&!(y!=null&&y.includes(t.sessionId))?f.jsx(Ea,{children:f.jsx("div",{className:"p-6 text-subtext",children:so()})}):b==="artifacts"?f.jsx(Ea,{children:Ct&&f.jsx(iRn,{project:Ct,artifacts:je,onOpenFile:gf,canRenameFile:Z=>{var ge;return!((ge=un.current.get(Ls(Ct.id,u,{path:Z,source:"artifacts"})))!=null&&ge.needsProtection)}},Ct.id)}):b==="experiments"?f.jsxs(Ea,{children:[f.jsxs("div",{className:"pane-toolbar flex shrink-0 flex-wrap items-center gap-2 bg-background px-3 pt-2.5 pb-2",children:[f.jsx("span",{className:"flex-1"}),f.jsxs("div",{className:"experiments-toolbar-controls inline-flex items-center gap-[5px]",children:[f.jsxs("div",{className:"option-picker relative inline-flex",ref:Yt,children:[f.jsx(Ft,{size:"small",ref:Qe,className:"experiment-scope-trigger",active:ln==="agent",title:Gle({scope:ln==="agent"?RE():ME()}),"aria-label":gce(),"aria-expanded":kt,onClick:()=>Tt(Z=>!Z),children:f.jsx(Dbn,{size:16,strokeWidth:2.5})}),kt&&f.jsxs("div",{className:"option-menu absolute bottom-[calc(100%_+_8px)] start-0 max-h-95 flex flex-col bg-background border border-border rounded-lg shadow-menu z-50 overflow-hidden min-w-47.5 p-1.5 [&.align-right]:start-auto [&.align-right]:end-0 [&.drop-down]:bottom-auto [&.drop-down]:top-[calc(100%_+_4px)] [&.session-menu]:start-auto [&.session-menu]:end-1.5 [&.session-menu]:top-[calc(100%_-_2px)] [&.session-menu]:min-w-35 drop-down align-right experiment-scope-menu [&_.model-item]:whitespace-nowrap [&_.model-item:disabled]:text-muted [&_.model-item:disabled]:cursor-default [&_.model-item:disabled:hover]:bg-transparent",children:[f.jsxs(nr,{"aria-pressed":ln==="agent",disabled:!u||!rn,title:u?rn?void 0:Sce():$ce(),onClick:()=>{Kt("agent"),Tt(!1)},children:[f.jsx("span",{children:RE()}),ln==="agent"&&f.jsx(Ji,{size:13})]}),f.jsxs(nr,{"aria-pressed":ln==="project",onClick:()=>{Kt("project"),Tt(!1)},children:[f.jsx("span",{children:ME()}),ln==="project"&&f.jsx(Ji,{size:13})]})]})]}),f.jsxs("div",{className:"seg inline-flex items-center gap-0.5 rounded-md bg-hover-subtle [&_button]:font-medium [&_button]:text-text [&_button]:rounded-sm [&_button:not(:disabled):hover]:text-text [&_button.active]:bg-background [&_button.active]:shadow-segment [&_button:disabled]:text-muted [&_button:disabled]:cursor-default experiments-view-toggle p-0.5 [&_button]:py-0.5 [&_button]:px-2 [&_button]:text-sm",role:"group","aria-label":Zle(),children:[f.jsx("button",{className:qe==="table"?"active":"","aria-pressed":qe==="table",onClick:()=>at("table"),children:Iue()}),f.jsx("button",{className:qe==="tree"?"active":"","aria-pressed":qe==="tree",onClick:()=>at("tree"),children:Uue()})]})]})]}),f.jsx("div",{className:"pane-content flex-1 min-h-0 relative bg-background",children:qe==="tree"?Ct&&f.jsx(mPn,{experiments:_e,runs:Un,project:Ct,onOpenView:ei,onOpenCode:dl,agentSessionId:ln==="agent"?u:null,onShowProjectScope:Du,viewport:Dr,onViewportChange:Ia}):f.jsx(VRn,{runs:Un,emptyHint:ln==="agent"&&_e.length>0?Ace():void 0,experiments:An,onOpen:(Z,ge)=>{ei(Z.id,"overview",ge)},onOpenLogs:(Z,ge,Te)=>{ei(Z,"terminal",Te,ge)},onOpenCode:(Z,ge)=>{const Te=_e.find(Be=>Be.id===Z);Te&&dl(Te.id,Te.branchName,"files",ge)},onCancel:xL})})]}):b==="files"?f.jsx(Ea,{children:Ct?f.jsx(KAn,{sessionId:u??void 0,project:Ct,view:Zs,toggled:fa,onViewChange:sr,onToggledChange:al,canRenameFile:Z=>{var ge;return!((ge=un.current.get(Ls(Ct.id,u,{path:Z,source:"repo",sessionId:u??void 0})))!=null&&ge.needsProtection)},onOpenFile:(Z,ge,Te,Be)=>fl(Z,ge,Te,void 0,void 0,void 0,Be)},`files:${u??`project:${Ct.id}`}`):f.jsx("div",{className:"code-tab flex flex-col h-full min-h-0 wt-tab",children:f.jsx(Cd,{children:f.jsxs("div",{className:"wt-empty flex flex-col items-center gap-2.5 py-12 px-6 text-center text-muted [&_>_svg]:text-subtext [&_p]:m-0 [&_p]:max-w-80 [&_p]:text-sm",children:[f.jsx(xI,{size:22}),f.jsx("p",{children:cue()})]})})})}):yn?f.jsx(Ea,{children:n&&f.jsx(URn,{remote:e.kind==="ssh",restored:C.current.has(Ls(n,u,yn)),onRestoreActivated:()=>{const Z=Ls(n,u,yn);C.current.delete(Z),E.current.add(Z)},showSource:N.current[Ls(n,u,yn)]??!1,onShowSourceChange:Z=>{N.current[Ls(n,u,yn)]=Z,j(ge=>ge+1)},projectId:n,path:yn.path,source:yn.source,sessionId:yn.source==="artifacts"?u??void 0:yn.sessionId,gitRef:yn.ref,line:yn.line,branchLabel:bPn(yn,Ct==null?void 0:Ct.baselineBranch),artifactVersion:$h,artifactEntries:yn.source==="artifacts"?je==null?void 0:je.entries:void 0,bufferSession:Lt(Ls(n,u,yn)),onOpenFile:(Z,ge,Te,Be)=>mi(yn,()=>fl(Z,ge,Te,void 0,void 0,void 0,Be)),scrollPosition:ur.current.get(Ls(n,u,yn)),onScrollPositionChange:Z=>{ur.current.set(Ls(n,u,yn),Z),po()},lineScrollRequest:yn.lineScrollRequest,onLineScrollRequestHandled:()=>Oh(yn),onEdit:()=>Gr(yn)},Ls(n,u,yn))}):Jr?f.jsx(Ea,{children:f.jsx("div",{className:"pane-content flex-1 min-h-0 relative plan-tab-content overflow-y-auto bg-background py-4.5 px-6 [&_.md]:max-w-readable",children:f.jsx(Qo,{text:(ne==null?void 0:ne.key)===`${Jr.sessionId}:${Jr.promptId}`?ne.text??so():((wo=Kn.find(Z=>Z.promptId===Jr.promptId))==null?void 0:wo.plan)||eD(),onOpenFile:(Z,ge,Te,Be,Re)=>mi(Jr,()=>fl(Z,Jr.sessionId,Be,ge,Te,void 0,Re))})})}):be?f.jsx(RAn,{projectId:n,sessionId:be.sessionId,spawnPartId:be.spawnPartId,onOpenFile:(Z,ge,Te,Be,Re)=>mi(be,()=>Bu(Z,be.sessionId,ge,Te,Be,Re)),onOpenRun:(Z,ge)=>mi(be,()=>Lu(Z,ge)),runExperimentName:mf,onOpenExperiment:(Z,ge)=>mi(be,()=>bc(Z,ge)),experimentName:$u,onOpenSubagent:(Z,ge,Te)=>mi(be,()=>Pu(be.sessionId,Z,ge,Te))},be.spawnPartId):$e?f.jsx(Ea,{children:n&&Ct&&$e&&Ga&&f.jsx(VAn,{projectId:n,project:Ct,experiment:Ga,view:$e.view,toggled:$e.toggled,onViewChange:Z=>yo($e,{view:Z}),onToggledChange:Z=>yo($e,{toggled:Z}),onOpenFile:(Z,ge,Te,Be)=>mi($e,()=>fl(Z,ge,Te,void 0,void 0,Ga.branchName,Be))},`code:${$e.branch}`)}):f.jsx(Ea,{children:ds&&br&&Ct&&f.jsx(bRn,{experiment:br,project:Ct,view:ds.view,runs:He,selectedRunId:_,onSelectRun:q,parentExperiment:_e.find(Z=>Z.id===br.parentExperimentId)??null,onOpenView:(Z,ge,Te)=>{mi(ds,()=>ei(br.id,Z,Te,ge))},onOpenCode:(Z,ge)=>mi(ds,()=>dl(br.id,br.branchName,Z,ge))},`${ds.id}:${ds.view}`)}),Dn&&Gn!==null&&Gn===pa&&Ct&&f.jsx(Ea,{className:b==="terminal"?void 0:"hidden",children:f.jsx(T5n,{projectId:Ct.id,sessionId:u,active:b==="terminal"},pa)})]})]}),fc&&f.jsx(KI,{remote:e.kind==="ssh",onClose:()=>Mi(!1),onCreated:(Z,ge)=>{Mi(!1),xf(Z,ge)}}),vo&&Ct&&$l(Ct.id)&&f.jsx(KRn,{onClose:Fa,onCreateProject:Cs})]})}const ik=Yo()({validateSearch:e=>({pane:oS(e.pane)}),beforeLoad:({location:e})=>{if(!U_(e.pathname))throw aK()},component:SPn});function SPn(){const{projectId:e}=ik.useParams(),{pane:n}=ik.useSearch(),t=_i(),r=FO({select:s=>s.location});return T.useEffect(()=>{const s=CPn(r.searchStr);s!==null&&t.navigate({href:`${r.pathname}${s}${r.hash?`#${r.hash}`:""}`,replace:!0})},[r,t]),f.jsxs(f.Fragment,{children:[f.jsx(f0,{}),f.jsx(kPn,{projectId:e,pane:n,runtime:FI()},e)]})}function CPn(e){const n=new URLSearchParams(e);if(!n.has("pane"))return null;try{if(n.getAll("pane").length===1&&oS(JSON.parse(n.get("pane")??"")))return null}catch{}n.delete("pane");const t=n.toString();return t?`?${t}`:""}const NU=Yo()({component:EPn});function EPn(){const{projectId:e}=NU.useParams();return f.jsx(Z2n,{projectId:e})}const NPn=Yo()({}),zPn=Yo()({}),jPn=Yo()({}),TPn=Yo()({}),APn=ewn.update({id:"/",path:"/",getParentRoute:()=>Ab}),b7=twn.update({id:"/projects",path:"/projects",getParentRoute:()=>Ab}),RPn=nwn.update({id:"/remote-launch",path:"/remote-launch",getParentRoute:()=>Ab}),MPn=rwn.update({id:"/",path:"/",getParentRoute:()=>b7}),Th=ik.update({id:"/$projectId",path:"/$projectId",getParentRoute:()=>b7}),OPn=NU.update({id:"/",path:"/",getParentRoute:()=>Th}),DPn=NPn.update({id:"/skills",path:"/skills",getParentRoute:()=>Th}),LPn=zPn.update({id:"/settings/$tab",path:"/settings/$tab",getParentRoute:()=>Th}),IPn=jPn.update({id:"/tasks/$sessionId",path:"/tasks/$sessionId",getParentRoute:()=>Th}),$Pn=TPn.update({id:"/tasks/new",path:"/tasks/new",getParentRoute:()=>Th}),BPn={ProjectsProjectIdSkillsRoute:DPn,ProjectsProjectIdIndexRoute:OPn,ProjectsProjectIdSettingsTabRoute:LPn,ProjectsProjectIdTasksSessionIdRoute:IPn,ProjectsProjectIdTasksNewRoute:$Pn},PPn=Th._addFileChildren(BPn),FPn={ProjectsProjectIdRoute:PPn,ProjectsIndexRoute:MPn},HPn=b7._addFileChildren(FPn),qPn={IndexRoute:APn,ProjectsRoute:HPn,RemoteLaunchRoute:RPn},UPn=Ab._addFileChildren(qPn)._addFileTypes(),GPn=zW({routeTree:UPn,context:{queryClient:rt},trailingSlash:"never",defaultPendingComponent:WS,defaultErrorComponent:QS,defaultNotFoundComponent:X2n}),VPn=z();document.documentElement.lang=VPn;document.documentElement.dir="ltr";LV.createRoot(document.getElementById("root")).render(f.jsxs(T.StrictMode,{children:[f.jsx(XG,{client:rt,children:f.jsx(AW,{router:GPn})}),f.jsx(Lvn,{})]})); diff --git a/ui/dist/index.html b/ui/dist/index.html index 9ba55c63..051f38da 100644 --- a/ui/dist/index.html +++ b/ui/dist/index.html @@ -49,7 +49,7 @@ html { background: #ffffff; } html[data-theme="dark"] { background: #0e0c0c; } - + diff --git a/ui/messages/ar.json b/ui/messages/ar.json index 2b66f364..a1e11d40 100644 --- a/ui/messages/ar.json +++ b/ui/messages/ar.json @@ -1187,5 +1187,10 @@ "onboarding_choose_another_agent": "اختيار وكيل برمجة آخر", "image_zoom_out": "تصغير", "image_zoom_in": "تكبير", - "image_zoom_reset": "إعادة ضبط التكبير للملاءمة" + "image_zoom_reset": "إعادة ضبط التكبير للملاءمة", + "ssh_default_host": "مضيف SSH الافتراضي", + "ssh_run_in": "التشغيل في", + "ssh_direct_host": "المضيف مباشرة", + "ssh_existing_container": "حاوية موجودة", + "ssh_container_reference": "اسم الحاوية أو معرّفها" } diff --git a/ui/messages/en.json b/ui/messages/en.json index 0969eb48..ecb2cb4c 100644 --- a/ui/messages/en.json +++ b/ui/messages/en.json @@ -1187,5 +1187,10 @@ "onboarding_choose_another_agent": "Choose another coding agent", "image_zoom_out": "Zoom out", "image_zoom_in": "Zoom in", - "image_zoom_reset": "Reset zoom to fit" + "image_zoom_reset": "Reset zoom to fit", + "ssh_default_host": "Default SSH host", + "ssh_run_in": "Run in", + "ssh_direct_host": "Direct host", + "ssh_existing_container": "Existing container", + "ssh_container_reference": "Container name or ID" } diff --git a/ui/messages/es.json b/ui/messages/es.json index 2686ead8..8dce99a1 100644 --- a/ui/messages/es.json +++ b/ui/messages/es.json @@ -1187,5 +1187,10 @@ "onboarding_choose_another_agent": "Elegir otro agente de programación", "image_zoom_out": "Alejar", "image_zoom_in": "Acercar", - "image_zoom_reset": "Restablecer zoom para ajustar" + "image_zoom_reset": "Restablecer zoom para ajustar", + "ssh_default_host": "Servidor SSH predeterminado", + "ssh_run_in": "Ejecutar en", + "ssh_direct_host": "Servidor directamente", + "ssh_existing_container": "Contenedor existente", + "ssh_container_reference": "Nombre o ID del contenedor" } diff --git a/ui/messages/fa.json b/ui/messages/fa.json index 0fcdf092..c2b75a89 100644 --- a/ui/messages/fa.json +++ b/ui/messages/fa.json @@ -1187,5 +1187,10 @@ "onboarding_choose_another_agent": "انتخاب یک عامل برنامه‌نویسی دیگر", "image_zoom_out": "کوچک‌نمایی", "image_zoom_in": "بزرگ‌نمایی", - "image_zoom_reset": "بازنشانی بزرگ‌نمایی برای جا شدن" + "image_zoom_reset": "بازنشانی بزرگ‌نمایی برای جا شدن", + "ssh_default_host": "میزبان پیش‌فرض SSH", + "ssh_run_in": "اجرا در", + "ssh_direct_host": "مستقیماً روی میزبان", + "ssh_existing_container": "کانتینر موجود", + "ssh_container_reference": "نام یا شناسهٔ کانتینر" } diff --git a/ui/messages/hi.json b/ui/messages/hi.json index 69252c30..be1f6f4b 100644 --- a/ui/messages/hi.json +++ b/ui/messages/hi.json @@ -1187,5 +1187,10 @@ "onboarding_choose_another_agent": "दूसरा कोडिंग एजेंट चुनें", "image_zoom_out": "ज़ूम आउट", "image_zoom_in": "ज़ूम इन", - "image_zoom_reset": "फ़िट करने के लिए ज़ूम रीसेट करें" + "image_zoom_reset": "फ़िट करने के लिए ज़ूम रीसेट करें", + "ssh_default_host": "डिफ़ॉल्ट SSH होस्ट", + "ssh_run_in": "यहाँ चलाएँ", + "ssh_direct_host": "सीधे होस्ट पर", + "ssh_existing_container": "मौजूदा कंटेनर", + "ssh_container_reference": "कंटेनर का नाम या ID" } diff --git a/ui/messages/zh-CN.json b/ui/messages/zh-CN.json index bea4751a..e12e340f 100644 --- a/ui/messages/zh-CN.json +++ b/ui/messages/zh-CN.json @@ -1187,5 +1187,10 @@ "onboarding_choose_another_agent": "选择其他编程智能体", "image_zoom_out": "缩小", "image_zoom_in": "放大", - "image_zoom_reset": "重置为适合窗口" + "image_zoom_reset": "重置为适合窗口", + "ssh_default_host": "默认 SSH 主机", + "ssh_run_in": "运行位置", + "ssh_direct_host": "直接在主机上", + "ssh_existing_container": "现有容器", + "ssh_container_reference": "容器名称或 ID" } diff --git a/ui/src/api.ts b/ui/src/api.ts index 986a6a8a..64ff78ad 100644 --- a/ui/src/api.ts +++ b/ui/src/api.ts @@ -953,6 +953,7 @@ export const moveDataDir = (path: string) => post<{ started: boolean }>("/api/settings/data-dir/move", { path }); export interface SshHost { + container?: string | null; host: string; hostname?: string; user?: string; @@ -962,8 +963,16 @@ export interface SshHost { lastTest?: SshPreflight; } -export const getSshHosts = (signal?: AbortSignal) => - get<{ hosts: SshHost[] }>("/api/settings/ssh", signal).then((r) => r.hosts); +export interface SshSettings { hosts: SshHost[]; defaultHost: string | null } +export const getSshSettings = (signal?: AbortSignal) => get("/api/settings/ssh", signal); +export const saveSshHost = (body: { host: string; container: string | null }) => + post<{ ok: boolean }>("/api/settings/ssh", body); +export const saveSshDefault = (host: string | null) => post<{ ok: boolean }>("/api/settings/ssh/default", { host }); +export interface SshExecutionPreflight extends SshPreflight { + container: { reference: string; ready: boolean; error: string | null } | null; +} +export const testSshExecution = (host: string, container: string | null) => + post("/api/settings/ssh/preflight", { host, container }); export interface SshConfigFile { path: string; @@ -2123,7 +2132,13 @@ export function backendDetail(backend: Run["backend"]): string { if (typeof backend.manifest === "string" && backend.manifest) return backend.manifest; // Ray's namespace is the whole Jobs URL — too long for a badge. if (backendKind(backend) === "ray_job") return ""; - if (typeof backend.namespace === "string" && backend.namespace) return backend.namespace; + if (typeof backend.namespace === "string" && backend.namespace) { + const container = backend.sshContainer; + if (container && typeof container === "object" && "reference" in container && typeof container.reference === "string") { + return `${backend.namespace} / ${container.reference}`; + } + return backend.namespace; + } return ""; } diff --git a/ui/src/components/RemoteHostDialog.tsx b/ui/src/components/RemoteHostDialog.tsx index 1fb58907..4089e114 100644 --- a/ui/src/components/RemoteHostDialog.tsx +++ b/ui/src/components/RemoteHostDialog.tsx @@ -5,7 +5,7 @@ import { createPortal } from "react-dom"; import { createRemoteSession } from "../api"; import { m } from "../paraglide/messages.js"; import { getLocale } from "../paraglide/runtime.js"; -import { getSshHostsQuery, listRemoteSessionsQuery } from "../queries/settings"; +import { getSshSettingsQuery, listRemoteSessionsQuery } from "../queries/settings"; import { getThemePreference } from "../theme"; import { useDialogFocus } from "./useDialogFocus"; import { Button, IconButton, Input, showAlert, Spinner } from "./ui"; @@ -19,9 +19,9 @@ export function RemoteHostDialog({ }) { const createRemoteSessionMutation = useMutation({ mutationFn: (args: Parameters) => createRemoteSession(...args) }); - const hostsQuery = useQuery(getSshHostsQuery()); + const hostsQuery = useQuery(getSshSettingsQuery()); const sessionsQuery = useQuery(listRemoteSessionsQuery()); - const hosts = hostsQuery.data ?? null; + const hosts = hostsQuery.data?.hosts ?? null; const sessions = sessionsQuery.data ?? []; const [query, setQuery] = useState(""); const loadError = !hosts ? hostsQuery.error?.message ?? sessionsQuery.error?.message ?? null : null; diff --git a/ui/src/components/SettingsPage.tsx b/ui/src/components/SettingsPage.tsx index fe40f749..0b27a8a1 100644 --- a/ui/src/components/SettingsPage.tsx +++ b/ui/src/components/SettingsPage.tsx @@ -16,7 +16,7 @@ import { getK8sSettingsQuery, getModalSettingsQuery, getSshMasterStatusQuery, - getSshHostsQuery, + getSshSettingsQuery, getSlurmSettingsQuery, getRaySettingsQuery, getOpenResearchSettingsQuery, @@ -103,6 +103,8 @@ import { type SlurmPreflight, type SlurmSettings, type SshPreflight, + type SshExecutionPreflight, + testSshExecution, applyUpdate, harnessModelLabel, installCli, @@ -126,6 +128,7 @@ import { HarnessLogo } from "./HarnessLogo"; import { LocalModelSetup } from "./LocalModelSetup"; import { StatusBadge } from "./StatusBadge"; import { OpenResearchSetupTerminal, SettingsCommandTerminal, SshConnectTerminal, SshTerminalTranscript } from "./SshConnectTerminal"; +import { SshExecutionSettings, SshDefaultHost } from "./SshExecutionSettings"; import { SshConfigDialog } from "./SshConfigDialog"; import { Badge, @@ -790,7 +793,7 @@ function useSshMasterStatuses(hosts: string[]) { return [statuses, markRunning] as const; } -function HostTestCell({ test, connecting, masterRunning }: { test: SshPreflight | undefined; connecting: boolean; masterRunning: boolean | null | undefined }) { +function HostTestCell({ test, connecting, masterRunning, containerFailed = false }: { test: SshPreflight | undefined; connecting: boolean; masterRunning: boolean | null | undefined; containerFailed?: boolean }) { if (connecting) return ( @@ -800,7 +803,7 @@ function HostTestCell({ test, connecting, masterRunning }: { test: SshPreflight if (test === undefined) return {m.settings_page_not_checked()}; const missingTools = test.missingTools ?? []; const disconnected = test.reachable && test.toolsFound && masterRunning === false; - const badge = !test.reachable ? ( + const badge = !test.reachable || containerFailed ? ( {m.settings_page_failed()} ) : !test.toolsFound ? ( @@ -822,11 +825,14 @@ function HostTestCell({ test, connecting, masterRunning }: { test: SshPreflight } function SshSection({ remote = false }: { remote?: boolean }) { - const hostsOptions = getSshHostsQuery(); + const hostsOptions = getSshSettingsQuery(); const hostsQuery = useQuery(hostsOptions); - const hosts = hostsQuery.data ?? (hostsQuery.isError ? [] : null); + const hosts = hostsQuery.data?.hosts ?? (hostsQuery.isError ? [] : null); const [configOpen, setConfigOpen] = useState(false); - const [tests, setTests] = useState>({}); + const [tests, setTests] = useState>({}); + const [drafts, setDrafts] = useState>({}); + const activeAttempt = useRef(0); + const [probing, setProbing] = useState(false); const [expandedHosts, setExpandedHosts] = useState>({}); const [connectingHost, setConnectingHost] = useState(null); const [connectionFailed, setConnectionFailed] = useState(false); @@ -840,6 +846,8 @@ function SshSection({ remote = false }: { remote?: boolean }) { const [masterRunning, markMasterRunning] = useSshMasterStatuses(checkedHosts); function connect(host: string) { + activeAttempt.current += 1; + setProbing(false); setConnectionFailed(false); setConnectionAttempt((attempt) => attempt + 1); setConnectingHost(host); @@ -847,6 +855,8 @@ function SshSection({ remote = false }: { remote?: boolean }) { } function cancelConnect() { + activeAttempt.current += 1; + setProbing(false); setConnectionFailed(false); setConnectingHost(null); } @@ -857,8 +867,10 @@ function SshSection({ remote = false }: { remote?: boolean }) { return ( <> -
-
@@ -872,45 +884,51 @@ function SshSection({ remote = false }: { remote?: boolean }) {
{hosts.map((h) => { // Session-local result wins; the persisted one covers restarts. - const hostTest = tests[h.host] ?? h.lastTest; + const reference = drafts[h.host] === undefined ? h.container ?? null : drafts[h.host]; + const executionTest = tests[h.host]; + const containerTest = reference !== null && executionTest?.container?.reference === reference.trim() + ? executionTest : undefined; + const hostTest = reference !== null ? containerTest + : executionTest?.container ? h.lastTest : executionTest ?? h.lastTest; + const containerError = containerTest?.container?.error; + const containerFailed = containerTest?.container?.ready === false; + const connectionError = hostTest?.error || containerError; const connecting = connectingHost === h.host; const open = expandedHosts[h.host] ?? false; - const hasTerminal = !remote && (connecting || hostTest?.reachable === false); + const hasTerminal = !remote && (connecting || Boolean(connectionError)); const address = `${h.user ? `${h.user}@` : ""}${h.hostname ?? h.host}${h.port ? `:${h.port}` : ""}`; return (
- {hasTerminal ? ( - - ) : ( -
{!remote &&
-
- +
+ + {hasTerminal && ( + + )}
}
+ {!remote && { + if (connecting) cancelConnect(); + setDrafts((drafts) => ({ ...drafts, [h.host]: value })); + setTests((tests) => { + const next = { ...tests }; + delete next[h.host]; + return next; + }); + }} />} {hasTerminal && (open || connecting) && ( -
- {!connecting && hostTest?.error && ( - +
+ {!connecting && connectionError && ( + )} - {connecting && ( + {connecting && !probing && ( { if (complete.backend !== "ssh") return; - setTests((tests) => ({ ...tests, [h.host]: complete.result })); markMasterRunning(h.host); - setConnectionFailed(false); - setConnectingHost(null); + const attempt = activeAttempt.current; + if (reference === null) { + setTests((tests) => ({ ...tests, [h.host]: { ...complete.result, container: null } })); + setConnectionFailed(false); + setConnectingHost(null); + return; + } + setProbing(true); + void testSshExecution(h.host, reference.trim()).then((result) => { + if (activeAttempt.current !== attempt) return; + setTests((tests) => ({ ...tests, [h.host]: { + ...result, + container: result.container ?? { reference: reference.trim(), ready: false, error: result.error ?? null }, + } })); + }).catch((error: unknown) => { + if (activeAttempt.current !== attempt) return; + setTests((tests) => ({ ...tests, [h.host]: { + ...complete.result, + container: { reference: reference.trim(), ready: false, error: error instanceof Error ? error.message : String(error) }, + } })); + }).finally(() => { + if (activeAttempt.current !== attempt) return; + setProbing(false); + setConnectionFailed(false); + setConnectingHost(null); + }); }} onError={(error) => { setConnectionFailed(true); setTests((tests) => ({ ...tests, [h.host]: { + container: reference === null ? null : { reference: reference.trim(), ready: false, error }, reachable: false, toolsFound: false, missingTools: [], diff --git a/ui/src/components/SshExecutionSettings.tsx b/ui/src/components/SshExecutionSettings.tsx new file mode 100644 index 00000000..135498e4 --- /dev/null +++ b/ui/src/components/SshExecutionSettings.tsx @@ -0,0 +1,65 @@ +import { useId, useState } from "react"; +import { useMutation } from "@tanstack/react-query"; +import { saveSshDefault, saveSshHost, type SshHost, type SshSettings } from "../api"; +import { m } from "../paraglide/messages.js"; +import { OptionPicker } from "./ModelPicker"; +import { Input, showAlert } from "./ui"; + +export function SshDefaultHost({ settings }: { settings: SshSettings }) { + const [saving, setSaving] = useState(false); + return ; +} + +export function SshExecutionSettings({ host, connecting, reference, onChange }: { + host: SshHost; + connecting: boolean; + reference: string | null; + onChange: (reference: string | null) => void; +}) { + const id = useId(); + const save = useMutation({ + mutationFn: saveSshHost, + scope: { id: `ssh-settings-${host.host}` }, + }); + function change(value: string | null) { + onChange(value); + save.reset(); + if (value !== null && !value.trim()) return; + save.mutate({ host: host.host, container: value?.trim() ?? null }); + } + + return
+ {m.new_project_advanced()} +
+ + {reference !== null && } + {save.error &&

{save.error.message}

} +
+
; +} diff --git a/ui/src/queries/invalidation.ts b/ui/src/queries/invalidation.ts index a1cd5b9b..1928d8df 100644 --- a/ui/src/queries/invalidation.ts +++ b/ui/src/queries/invalidation.ts @@ -67,7 +67,7 @@ const settingsFamilies: Record = { ray: ["getRaySettings", "getComputeSettings"], env: ["getEnvVars", "getHfSettings", "getTinkerSettings", "getModalSettings", "getSlurmSettings", "getRaySettings", "getK8sSettings", "getOpenResearchSettings", "getComputeSettings", "getHarnesses"], "data-dir": ["getDataDir"], - ssh: ["getSshHosts", "getSshConfig", "getSshMasterStatus", "getComputeSettings"], + ssh: ["getSshSettings", "getSshConfig", "getSshMasterStatus", "getComputeSettings"], compute: ["getComputeSettings"], git: ["githubAccount", "repoAccess", "getProjectGitStatus"], profile: ["getProfile"], diff --git a/ui/src/queries/settings.ts b/ui/src/queries/settings.ts index 411ba72a..6a365b2f 100644 --- a/ui/src/queries/settings.ts +++ b/ui/src/queries/settings.ts @@ -69,10 +69,10 @@ export const getDataDirQuery = () => queryOptions({ staleTime: 300_000, }); -export const getSshHostsQuery = () => queryOptions({ - queryKey: workspaceKey("getSshHosts"), - queryFn: ({ signal }) => api.getSshHosts(signal), - staleTime: 300_000, +export const getSshSettingsQuery = () => queryOptions({ + queryKey: workspaceKey("getSshSettings"), + queryFn: ({ signal }) => api.getSshSettings(signal), + staleTime: 30_000, }); export const getSshConfigQuery = () => queryOptions({ diff --git a/ui/tests/workspaceConnection.test.mjs b/ui/tests/workspaceConnection.test.mjs index bb08e970..7c67089a 100644 --- a/ui/tests/workspaceConnection.test.mjs +++ b/ui/tests/workspaceConnection.test.mjs @@ -119,7 +119,7 @@ for (const outcome of ["success", "failure", "popup-blocked"]) { react: state.react, "react-dom": { createPortal: (tree) => tree }, "@tanstack/react-query": { - useQuery: ({ kind }) => ({ data: kind === "hosts" ? [{ host: "research" }] : [] }), + useQuery: ({ kind }) => ({ data: kind === "hosts" ? { hosts: [{ host: "research" }], defaultHost: null } : [] }), useMutation: () => ({ mutateAsync: async (args) => { calls.push(["connect", ...args]); if (outcome === "failure") throw new Error("connection failed"); @@ -129,7 +129,7 @@ for (const outcome of ["success", "failure", "popup-blocked"]) { "lucide-react": { SlidersHorizontal: "Icon", X: "Icon" }, "../api": {}, "../paraglide/messages.js": messages, "../paraglide/runtime.js": { getLocale: () => "en" }, - "../queries/settings": { getSshHostsQuery: () => ({ kind: "hosts" }), listRemoteSessionsQuery: () => ({ kind: "sessions" }) }, + "../queries/settings": { getSshSettingsQuery: () => ({ kind: "hosts" }), listRemoteSessionsQuery: () => ({ kind: "sessions" }) }, "../theme": { getThemePreference: () => "dark" }, "./useDialogFocus": { useDialogFocus: () => {} }, "./ui": {