@luuthuong/devboard 0.0.0-stage → 1.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.claude/skills/devboard/SKILL.md +111 -0
- package/bin/devboard.mjs +59 -0
- package/dist/assets/CardDetailView-CVWOsYyA.js +24 -0
- package/dist/assets/DiffPane-CpoDDQrA.css +1 -0
- package/dist/assets/DiffPane-bQsGoT7y.js +22 -0
- package/dist/assets/KnowledgeView-C5KHiBRG.js +3 -0
- package/dist/assets/ListBoardView-CzJcCLXS.js +3 -0
- package/dist/assets/NewTaskDialog-BuxvfgNU.js +1 -0
- package/dist/assets/OnboardingWizard-8WLFjTd8.js +1 -0
- package/dist/assets/ProcessManagerView-BIYjQpoP.js +1 -0
- package/dist/assets/ProposalCard-BbPobl1f.js +1 -0
- package/dist/assets/SearchOverlay-B4aywpIh.js +1 -0
- package/dist/assets/SettingsView-spBB3EwB.js +1 -0
- package/dist/assets/SetupProjectView-BuUDqDYU.js +1 -0
- package/dist/assets/Surface-BQKeigoq.js +1 -0
- package/dist/assets/TaskDescriptionEditor-Cv0nlU3w.js +58 -0
- package/dist/assets/Terminal-BrP-ENHg.css +1 -0
- package/dist/assets/Terminal-DJJcg-t6.js +80 -0
- package/dist/assets/chevron-right-BsVThPz4.js +1 -0
- package/dist/assets/index-DNKB6XwG.css +1 -0
- package/dist/assets/index-gWSenOqD.js +18 -0
- package/dist/assets/jsx-runtime-QmcfnBgR.js +1 -0
- package/dist/assets/plus-XSPxArj5.js +1 -0
- package/dist/assets/react-dom-DjtJUrx3.js +1 -0
- package/dist/assets/x-CdEDbLMR.js +1 -0
- package/dist/index.html +22 -0
- package/package.json +81 -4
- package/server-dist/server/assets/remote-shell.sh +239 -0
- package/server-dist/server/board.js +486 -0
- package/server-dist/server/commands.js +424 -0
- package/server-dist/server/context.js +34 -0
- package/server-dist/server/coordination.js +442 -0
- package/server-dist/server/editor.js +101 -0
- package/server-dist/server/events.js +17 -0
- package/server-dist/server/git.js +258 -0
- package/server-dist/server/harness/config.js +90 -0
- package/server-dist/server/harness/entry.js +98 -0
- package/server-dist/server/harness/intents.js +268 -0
- package/server-dist/server/harness/kbIndex.js +291 -0
- package/server-dist/server/harness/kbStore.js +258 -0
- package/server-dist/server/harness/librarian.js +147 -0
- package/server-dist/server/harness/pack.js +182 -0
- package/server-dist/server/harness/proposals.js +113 -0
- package/server-dist/server/harness/repo.js +150 -0
- package/server-dist/server/harness/scrub.js +30 -0
- package/server-dist/server/harness/service.js +683 -0
- package/server-dist/server/harness/template/README.md +38 -0
- package/server-dist/server/harness/template/agents/code-reviewer.md +23 -0
- package/server-dist/server/harness/template/agents/security-reviewer.md +20 -0
- package/server-dist/server/harness/template/agents/test-writer.md +16 -0
- package/server-dist/server/harness/template/agents.yaml +41 -0
- package/server-dist/server/harness/template/harness.json +11 -0
- package/server-dist/server/harness/template/kb/team/README.md +4 -0
- package/server-dist/server/harness/template/skills/aidlc-design/SKILL.md +41 -0
- package/server-dist/server/harness/template/skills/aidlc-implement/SKILL.md +34 -0
- package/server-dist/server/harness/template/skills/aidlc-postmortem/SKILL.md +35 -0
- package/server-dist/server/harness/template/skills/aidlc-pr/SKILL.md +22 -0
- package/server-dist/server/harness/template/skills/aidlc-requirements/SKILL.md +40 -0
- package/server-dist/server/harness/template/skills/aidlc-units/SKILL.md +36 -0
- package/server-dist/server/harness/template/skills/project-kb/SKILL.md +41 -0
- package/server-dist/server/harness/usage.js +82 -0
- package/server-dist/server/hooks.js +222 -0
- package/server-dist/server/http.js +266 -0
- package/server-dist/server/index.js +77 -0
- package/server-dist/server/integrations.js +292 -0
- package/server-dist/server/pollers.js +332 -0
- package/server-dist/server/processes.js +123 -0
- package/server-dist/server/psmux.js +120 -0
- package/server-dist/server/pty.js +93 -0
- package/server-dist/server/remote.js +216 -0
- package/server-dist/server/sessionReaper.js +101 -0
- package/server-dist/server/sessions.js +315 -0
- package/server-dist/server/settings.js +125 -0
- package/server-dist/server/skill.js +29 -0
- package/server-dist/server/tmux.js +217 -0
- package/server-dist/server/transcripts.js +335 -0
- package/server-dist/server/util.js +286 -0
- package/server-dist/src/types/index.js +53 -0
- package/README.md +0 -3
|
@@ -0,0 +1,111 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: devboard
|
|
3
|
+
description: Inspect cards, delegate work to subagents, orchestrate Claude sessions, and message other agents. Use whenever the user mentions DevBoard, asks you to spawn or fork a subagent, asks you to coordinate with another running Claude, or is working inside a card's tmux session and wants to use the `devboard` CLI. Covers subagents, DMs and handles.
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# DevBoard — Agent Skill
|
|
7
|
+
|
|
8
|
+
You're a Claude running inside a **DevBoard card's tmux session**. Every card has its own tmux session; you can see and message other cards via the `devboard` CLI.
|
|
9
|
+
|
|
10
|
+
## Quick reference
|
|
11
|
+
|
|
12
|
+
```
|
|
13
|
+
devboard list # all active cards
|
|
14
|
+
devboard show <card> # details for a card
|
|
15
|
+
devboard sessions # all live tmux sessions
|
|
16
|
+
devboard subagent spawn --handle x "goal" # delegate to a fresh child session
|
|
17
|
+
devboard subagent fork --handle y "goal" # delegate with a copy of your transcript
|
|
18
|
+
devboard subagent list # your children, with context usage + pane peek
|
|
19
|
+
devboard subagent model <card> opus # switch an owned child to another model
|
|
20
|
+
devboard parent dm "progress update" # report to the card that owns you
|
|
21
|
+
devboard send <card> "msg" --mode ... # steer (default) | queue | interrupt
|
|
22
|
+
devboard dm <handle> "message" # direct message another agent
|
|
23
|
+
devboard dm history <handle> # DM history with that handle
|
|
24
|
+
```
|
|
25
|
+
|
|
26
|
+
All commands accept `-j/--json` for machine-readable output.
|
|
27
|
+
|
|
28
|
+
## Identity
|
|
29
|
+
|
|
30
|
+
- You are auto-identified from your tmux session — the CLI looks up the card you're in and derives a handle from the card's display name (e.g. `Alice card` → `@alice_card`, truncated to 24 chars). Dashes you typed survive, so `alice-card` stays `@alice-card`.
|
|
31
|
+
- Handles disambiguate on collision (`@alice_card_2`, `@alice_card_3`…).
|
|
32
|
+
- You don't pick or register your handle — it's derived at send time.
|
|
33
|
+
- To see your handle, send a DM and look at the prefix the recipient gets.
|
|
34
|
+
|
|
35
|
+
## Subagents
|
|
36
|
+
|
|
37
|
+
Subagents are ordinary DevBoard cards with their own tmux session, transcript, and
|
|
38
|
+
auto-compaction. Unlike Claude Code's built-in subagents they can compact themselves, so
|
|
39
|
+
they are the right tool for long delegated work. Run these from your own card's session.
|
|
40
|
+
|
|
41
|
+
```
|
|
42
|
+
devboard subagent spawn --handle parser-bug "investigate the failing parser test"
|
|
43
|
+
devboard subagent fork --handle cache-path "same task, try the cache instead"
|
|
44
|
+
devboard subagent fork --from parser-bug --handle other-angle "retry from a different angle"
|
|
45
|
+
devboard subagent list # active + archived children, with a live pane peek
|
|
46
|
+
devboard subagent dm parser-bug "any progress?"
|
|
47
|
+
devboard subagent model parser-bug opus # switch it to another model
|
|
48
|
+
devboard subagent archive parser-bug
|
|
49
|
+
devboard subagent resume parser-bug # bring an archived child back
|
|
50
|
+
```
|
|
51
|
+
|
|
52
|
+
- **`--handle` is required.** It becomes the child's card name and its `@handle`, so
|
|
53
|
+
DMs read `[DM from @parser-bug]` instead of a slug of your goal text.
|
|
54
|
+
- **`spawn` starts clean** (~30k context). **`fork` copies your transcript**, so the child
|
|
55
|
+
starts as expensive as you are. Prefer `spawn` unless the child genuinely needs your history.
|
|
56
|
+
- **`--from <card>`** forks one of your existing children instead of yourself. The copy
|
|
57
|
+
becomes that child's sibling, still owned by you, so it works at depth limit 1.
|
|
58
|
+
- **`--model sonnet`** picks the model. **`--context-threshold 250k`** sets a per-child
|
|
59
|
+
compaction schedule that escalates like the global one: a queued nudge at 250k, a
|
|
60
|
+
steered reminder at 350k, and an interrupt with `/compact` at 450k.
|
|
61
|
+
- **A child inherits your model** when you don't pass `--model`, so an Opus card does not
|
|
62
|
+
quietly hand its work to a cheaper model.
|
|
63
|
+
- **`devboard subagent model <card> <model>`** switches a running child. It
|
|
64
|
+
submits `/model <name>`, accepts the "Switch model?" confirmation for you, and records
|
|
65
|
+
the choice so a later `resume` keeps it. The child's pane comes back so you can see
|
|
66
|
+
what actually happened.
|
|
67
|
+
- **Depth is capped** (default 1). A child that tries to spawn its own child gets a clear error.
|
|
68
|
+
- **`devboard subagent send <card> "..." --mode steer|queue|interrupt`** delivers to a child
|
|
69
|
+
the same three ways `devboard send` does.
|
|
70
|
+
- Multi-line goals: `devboard subagent spawn --handle x - <<'EOF' … EOF`.
|
|
71
|
+
|
|
72
|
+
As a child, report with `devboard parent dm "<message>"`. Use
|
|
73
|
+
`devboard parent dm-and-self-archive "<result>"` **only when the goal is fully reached** — it
|
|
74
|
+
archives you. If the parent wants you to stay available for follow-ups, keep using plain `dm`.
|
|
75
|
+
|
|
76
|
+
Delivered DMs state the relationship, so `[DM from @coordinator (parent agent)]` is your
|
|
77
|
+
owner talking, and `[DM from @parser-bug (subagent)]` is one of your children reporting.
|
|
78
|
+
|
|
79
|
+
## DM etiquette
|
|
80
|
+
|
|
81
|
+
1. **DMs are private** — `devboard dm <handle> "..."` talks to one agent. There are no shared rooms.
|
|
82
|
+
2. **Prefix convention is automatic** — when you send `hello`, the recipient gets `[DM from @your_handle]: hello`. You don't add the prefix yourself.
|
|
83
|
+
3. **Messages arrive in your pane** — DMs are pasted straight into your prompt as `[DM from @…]: …`. Treat them like push notifications and reply with `devboard dm` if relevant.
|
|
84
|
+
4. **Card must have a tmux session** — a card without a running session can't receive a DM (the message is still logged).
|
|
85
|
+
5. **Read history on demand** — `devboard dm history <handle>` shows past messages; don't poll it.
|
|
86
|
+
6. **Don't spam** — a DM interrupts the recipient's current turn. Keep it relevant.
|
|
87
|
+
|
|
88
|
+
## Storage (for debugging)
|
|
89
|
+
|
|
90
|
+
```
|
|
91
|
+
~/.devboard/channels/
|
|
92
|
+
dm/<cardA>__<cardB>.jsonl # DM logs (cardIds alphabetically sorted)
|
|
93
|
+
images/<msgId>/ # attachments
|
|
94
|
+
```
|
|
95
|
+
|
|
96
|
+
(The directory is still named `channels` so existing DM history keeps working.)
|
|
97
|
+
|
|
98
|
+
## Related CLI features
|
|
99
|
+
|
|
100
|
+
- `devboard sessions` — all live tmux sessions with card associations. Useful for checking who's online before messaging.
|
|
101
|
+
- `devboard capture <card>` — peek at another card's tmux pane (without disturbing it).
|
|
102
|
+
- `devboard transcript <card> -n 5` — see last N turns of that card's Claude conversation.
|
|
103
|
+
- `devboard export [card] [--out file.md]`: the whole session as Markdown, the same text the app's "Copy conversation as Markdown" gives (user and assistant messages). No card means your own; also takes a `@handle` or a Claude session id. Prints to stdout unless `--out`.
|
|
104
|
+
- `devboard send <card> "msg"` — send a prompt directly to a card's tmux session (low-level; the agent won't see it as a DM). Prefer `devboard dm` for 1:1.
|
|
105
|
+
- `--mode steer` (default) pastes it now; the agent reads it between turns, so it lands mid-work but never cuts a turn short.
|
|
106
|
+
- `--mode queue` (or `enqueue`) puts it in the card's prompt queue, sent once the agent goes idle. Use it when the message is "next up", not "right now".
|
|
107
|
+
- `--mode interrupt` sends Escape first, so the agent stops what it is doing and reads the message immediately. Reserve it for genuine stop-work situations.
|
|
108
|
+
- The same three modes back the auto-compact thresholds in Settings → Self-Compact.
|
|
109
|
+
- `devboard relink <card> <session-id>` — point a card at a different transcript when it is stuck on a stale session. Never moves or deletes a `.jsonl`.
|
|
110
|
+
- `devboard self-compact - <<'EOF' … EOF` — compact your own session and hand yourself a post-compact continuation message. Always pass that handoff; without it you wake up with only the digest.
|
|
111
|
+
- Read `devboard --help` in full. Do not pipe it through `head` or `tail`; the command list continues past the first screen.
|
package/bin/devboard.mjs
ADDED
|
@@ -0,0 +1,59 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
// `bunx @luuthuong/devboard` — starts the DevBoard server and serves the built UI.
|
|
3
|
+
//
|
|
4
|
+
// devboard [--port <n>] [--host <addr>] [--no-open]
|
|
5
|
+
//
|
|
6
|
+
// The published package ships the server compiled to JS (`server-dist/`). In a repo checkout that
|
|
7
|
+
// build doesn't exist, so fall back to the TypeScript sources through tsx, same as `bun run start`.
|
|
8
|
+
import { spawn } from "node:child_process";
|
|
9
|
+
import { existsSync } from "node:fs";
|
|
10
|
+
|
|
11
|
+
const args = process.argv.slice(2);
|
|
12
|
+
const flag = (name) => {
|
|
13
|
+
const i = args.indexOf(`--${name}`);
|
|
14
|
+
return i === -1 ? undefined : args[i + 1];
|
|
15
|
+
};
|
|
16
|
+
|
|
17
|
+
if (args.includes("--help") || args.includes("-h")) {
|
|
18
|
+
console.log(
|
|
19
|
+
"Usage: devboard [--port <n>] [--host <addr>] [--no-open]\nEnv: DEVBOARD_NO_OPEN, DEVBOARD_HOST, DEVBOARD_PORT, DEVBOARD_TOKEN, DEVBOARD_ALLOWED_HOSTS, DEVBOARD_DATA_DIR"
|
|
20
|
+
);
|
|
21
|
+
process.exit(0);
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
if (flag("port")) process.env.DEVBOARD_PORT = flag("port");
|
|
25
|
+
if (flag("host")) process.env.DEVBOARD_HOST = flag("host");
|
|
26
|
+
|
|
27
|
+
const host = process.env.DEVBOARD_HOST ?? "127.0.0.1";
|
|
28
|
+
const port = process.env.DEVBOARD_PORT ?? 1421;
|
|
29
|
+
const url = `http://${host === "0.0.0.0" ? "localhost" : host}:${port}`;
|
|
30
|
+
console.log(`DevBoard → ${url}`);
|
|
31
|
+
|
|
32
|
+
// Open the UI in the default browser (best effort; skipped with --no-open, DEVBOARD_NO_OPEN or CI).
|
|
33
|
+
function openBrowser() {
|
|
34
|
+
if (args.includes("--no-open") || process.env.DEVBOARD_NO_OPEN || process.env.CI) return;
|
|
35
|
+
const target = process.env.DEVBOARD_TOKEN ? `${url}/?token=${encodeURIComponent(process.env.DEVBOARD_TOKEN)}` : url;
|
|
36
|
+
const [cmd, cmdArgs] =
|
|
37
|
+
process.platform === "win32"
|
|
38
|
+
? ["cmd", ["/c", "start", '""', target.replace(/&/g, "^&")]]
|
|
39
|
+
: process.platform === "darwin"
|
|
40
|
+
? ["open", [target]]
|
|
41
|
+
: ["xdg-open", [target]];
|
|
42
|
+
try {
|
|
43
|
+
const child = spawn(cmd, cmdArgs, { stdio: "ignore", detached: true, windowsHide: true });
|
|
44
|
+
child.on("error", () => {});
|
|
45
|
+
child.unref();
|
|
46
|
+
} catch {
|
|
47
|
+
// no browser available; the URL is printed above
|
|
48
|
+
}
|
|
49
|
+
}
|
|
50
|
+
|
|
51
|
+
const compiled = new URL("../server-dist/server/index.js", import.meta.url);
|
|
52
|
+
if (existsSync(compiled)) {
|
|
53
|
+
await import(compiled.href);
|
|
54
|
+
} else {
|
|
55
|
+
const { register } = await import("tsx/esm/api");
|
|
56
|
+
register();
|
|
57
|
+
await import("../server/index.ts");
|
|
58
|
+
}
|
|
59
|
+
openBrowser();
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/Terminal-DJJcg-t6.js","assets/jsx-runtime-QmcfnBgR.js","assets/index-gWSenOqD.js","assets/react-dom-DjtJUrx3.js","assets/Surface-BQKeigoq.js","assets/index-DNKB6XwG.css","assets/Terminal-BrP-ENHg.css","assets/DiffPane-bQsGoT7y.js","assets/TaskDescriptionEditor-Cv0nlU3w.js","assets/x-CdEDbLMR.js","assets/DiffPane-CpoDDQrA.css"])))=>i.map(i=>d[i]);
|
|
2
|
+
import{a as e,d as t,f as n,i as r,m as i,n as a,p as o,t as s,u as c}from"./jsx-runtime-QmcfnBgR.js";import{_ as l,a as u,c as d,d as f,f as p,g as m,i as h,l as g,n as _,o as v,p as y,r as b,s as x,t as S,u as C}from"./TaskDescriptionEditor-Cv0nlU3w.js";import{t as w}from"./chevron-right-BsVThPz4.js";import{t as T}from"./x-CdEDbLMR.js";import{a as E,b as D,o as O,p as k,t as A}from"./Surface-BQKeigoq.js";import{$ as j,B as M,C as N,E as P,G as F,J as ee,K as te,L as ne,Q as re,T as I,V as L,W as ie,_ as R,at as ae,c as z,d as oe,dt as se,et as ce,f as le,ft as ue,g as de,gt as fe,h as pe,l as me,n as he,nt as ge,p as B,pt as V,q as _e,rt as ve,st as ye,t as be,tt as xe,ut as Se,v as Ce,vt as we,w as Te,x as Ee,y as De,yt as Oe,z as ke}from"./index-gWSenOqD.js";import{a as Ae,i as je,t as Me}from"./ProposalCard-BbPobl1f.js";var Ne={name:`copy`,size:24,node:[[`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`}]]};Ne.node;var Pe=Oe(Ne),Fe={name:`list-plus`,size:24,node:[[`path`,{d:`M16 5H3`,key:`m91uny`}],[`path`,{d:`M11 12H3`,key:`51ecnj`}],[`path`,{d:`M16 19H3`,key:`zzsher`}],[`path`,{d:`M18 9v6`,key:`1twb98`}],[`path`,{d:`M21 12h-6`,key:`bt1uis`}]]};Fe.node;var Ie=Oe(Fe),Le={name:`pencil`,size:24,node:[[`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`}]]};Le.node;var Re=Oe(Le),ze={name:`rotate-ccw`,size:24,node:[[`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`}]]};ze.node;var Be=Oe(ze),Ve={name:`rotate-cw`,size:24,node:[[`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`}]]};Ve.node;var He=Oe(Ve),Ue={name:`sliders-horizontal`,size:24,node:[[`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`}]]};Ue.node;var We=Oe(Ue),Ge={name:`square-terminal`,size:24,node:[[`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`}]],aliases:[`terminal-square`]};Ge.node;var Ke=Oe(Ge),qe={name:`trash`,size:24,node:[[`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`}]],aliases:[`trash-2`]};qe.node;var Je=Oe(qe);function Ye(e,t){let n=t||{};return(e[e.length-1]===``?[...e,``]:e).join((n.padRight?` `:``)+`,`+(n.padLeft===!1?``:` `)).trim()}var Xe=/^[$_\p{ID_Start}][$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,Ze=/^[$_\p{ID_Start}][-$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,Qe={};function $e(e,t){return((t||Qe).jsx?Ze:Xe).test(e)}var et=/[ \t\n\f\r]/g;function tt(e){return typeof e==`object`?e.type===`text`&&nt(e.value):nt(e)}function nt(e){return e.replace(et,``)===``}var rt=class{constructor(e,t,n){this.normal=t,this.property=e,n&&(this.space=n)}};rt.prototype.normal={},rt.prototype.property={},rt.prototype.space=void 0;function it(e,t){let n={},r={};for(let t of e)Object.assign(n,t.property),Object.assign(r,t.normal);return new rt(n,r,t)}function at(e){return e.toLowerCase()}var H=class{constructor(e,t){this.attribute=t,this.property=e}};H.prototype.attribute=``,H.prototype.booleanish=!1,H.prototype.boolean=!1,H.prototype.commaOrSpaceSeparated=!1,H.prototype.commaSeparated=!1,H.prototype.defined=!1,H.prototype.mustUseProperty=!1,H.prototype.number=!1,H.prototype.overloadedBoolean=!1,H.prototype.property=``,H.prototype.spaceSeparated=!1,H.prototype.space=void 0;var ot=o({boolean:()=>U,booleanish:()=>W,commaOrSpaceSeparated:()=>q,commaSeparated:()=>lt,number:()=>G,overloadedBoolean:()=>ct,spaceSeparated:()=>K}),st=0,U=ut(),W=ut(),ct=ut(),G=ut(),K=ut(),lt=ut(),q=ut();function ut(){return 2**++st}var dt=Object.keys(ot),ft=class extends H{constructor(e,t,n,r){let i=-1;if(super(e,t),pt(this,`space`,r),typeof n==`number`)for(;++i<dt.length;){let e=dt[i];pt(this,dt[i],(n&ot[e])===ot[e])}}};ft.prototype.defined=!0;function pt(e,t,n){n&&(e[t]=n)}function mt(e){let t={},n={};for(let[r,i]of Object.entries(e.properties)){let a=new ft(r,e.transform(e.attributes||{},r),i,e.space);e.mustUseProperty&&e.mustUseProperty.includes(r)&&(a.mustUseProperty=!0),t[r]=a,n[at(r)]=r,n[at(a.attribute)]=r}return new rt(t,n,e.space)}var ht=mt({properties:{ariaActiveDescendant:null,ariaAtomic:W,ariaAutoComplete:null,ariaBusy:W,ariaChecked:W,ariaColCount:G,ariaColIndex:G,ariaColSpan:G,ariaControls:K,ariaCurrent:null,ariaDescribedBy:K,ariaDetails:null,ariaDisabled:W,ariaDropEffect:K,ariaErrorMessage:null,ariaExpanded:W,ariaFlowTo:K,ariaGrabbed:W,ariaHasPopup:null,ariaHidden:W,ariaInvalid:null,ariaKeyShortcuts:null,ariaLabel:null,ariaLabelledBy:K,ariaLevel:G,ariaLive:null,ariaModal:W,ariaMultiLine:W,ariaMultiSelectable:W,ariaOrientation:null,ariaOwns:K,ariaPlaceholder:null,ariaPosInSet:G,ariaPressed:W,ariaReadOnly:W,ariaRelevant:null,ariaRequired:W,ariaRoleDescription:K,ariaRowCount:G,ariaRowIndex:G,ariaRowSpan:G,ariaSelected:W,ariaSetSize:G,ariaSort:null,ariaValueMax:G,ariaValueMin:G,ariaValueNow:G,ariaValueText:null,role:null},transform(e,t){return t===`role`?t:`aria-`+t.slice(4).toLowerCase()}});function gt(e,t){return t in e?e[t]:t}function _t(e,t){return gt(e,t.toLowerCase())}var vt=mt({attributes:{acceptcharset:`accept-charset`,classname:`class`,htmlfor:`for`,httpequiv:`http-equiv`},mustUseProperty:[`checked`,`multiple`,`muted`,`selected`],properties:{abbr:null,accept:lt,acceptCharset:K,accessKey:K,action:null,allow:null,allowFullScreen:U,allowPaymentRequest:U,allowUserMedia:U,alpha:U,alt:null,as:null,async:U,autoCapitalize:null,autoComplete:K,autoFocus:U,autoPlay:U,blocking:K,capture:null,charSet:null,checked:U,cite:null,className:K,closedBy:null,colorSpace:null,cols:G,colSpan:G,command:null,commandFor:null,content:null,contentEditable:W,controls:U,controlsList:K,coords:G|lt,crossOrigin:null,data:null,dateTime:null,decoding:null,default:U,defer:U,dir:null,dirName:null,disabled:U,download:ct,draggable:W,encType:null,enterKeyHint:null,fetchPriority:null,form:null,formAction:null,formEncType:null,formMethod:null,formNoValidate:U,formTarget:null,headers:K,height:G,hidden:ct,high:G,href:null,hrefLang:null,htmlFor:K,httpEquiv:K,id:null,imageSizes:null,imageSrcSet:null,inert:U,inputMode:null,integrity:null,is:null,isMap:U,itemId:null,itemProp:K,itemRef:K,itemScope:U,itemType:K,kind:null,label:null,lang:null,language:null,list:null,loading:null,loop:U,low:G,manifest:null,max:null,maxLength:G,media:null,method:null,min:null,minLength:G,multiple:U,muted:U,name:null,nonce:null,noModule:U,noValidate:U,onAbort:null,onAfterPrint:null,onAuxClick:null,onBeforeMatch:null,onBeforePrint:null,onBeforeToggle:null,onBeforeUnload:null,onBlur:null,onCancel:null,onCanPlay:null,onCanPlayThrough:null,onChange:null,onClick:null,onClose:null,onContextLost:null,onContextMenu:null,onContextRestored:null,onCopy:null,onCueChange:null,onCut:null,onDblClick:null,onDrag:null,onDragEnd:null,onDragEnter:null,onDragExit:null,onDragLeave:null,onDragOver:null,onDragStart:null,onDrop:null,onDurationChange:null,onEmptied:null,onEnded:null,onError:null,onFocus:null,onFormData:null,onHashChange:null,onInput:null,onInvalid:null,onKeyDown:null,onKeyPress:null,onKeyUp:null,onLanguageChange:null,onLoad:null,onLoadedData:null,onLoadedMetadata:null,onLoadEnd:null,onLoadStart:null,onMessage:null,onMessageError:null,onMouseDown:null,onMouseEnter:null,onMouseLeave:null,onMouseMove:null,onMouseOut:null,onMouseOver:null,onMouseUp:null,onOffline:null,onOnline:null,onPageHide:null,onPageShow:null,onPaste:null,onPause:null,onPlay:null,onPlaying:null,onPopState:null,onProgress:null,onRateChange:null,onRejectionHandled:null,onReset:null,onResize:null,onScroll:null,onScrollEnd:null,onSecurityPolicyViolation:null,onSeeked:null,onSeeking:null,onSelect:null,onSlotChange:null,onStalled:null,onStorage:null,onSubmit:null,onSuspend:null,onTimeUpdate:null,onToggle:null,onUnhandledRejection:null,onUnload:null,onVolumeChange:null,onWaiting:null,onWheel:null,open:U,optimum:G,pattern:null,ping:K,placeholder:null,playsInline:U,popover:null,popoverTarget:null,popoverTargetAction:null,poster:null,preload:null,readOnly:U,referrerPolicy:null,rel:K,required:U,reversed:U,rows:G,rowSpan:G,sandbox:K,scope:null,scoped:U,seamless:U,selected:U,shadowRootClonable:U,shadowRootCustomElementRegistry:U,shadowRootDelegatesFocus:U,shadowRootMode:null,shadowRootSerializable:U,shape:null,size:G,sizes:null,slot:null,span:G,spellCheck:W,src:null,srcDoc:null,srcLang:null,srcSet:null,start:G,step:null,style:null,tabIndex:G,target:null,title:null,translate:null,type:null,typeMustMatch:U,useMap:null,value:W,width:G,wrap:null,writingSuggestions:null,align:null,aLink:null,archive:K,axis:null,background:null,bgColor:null,border:G,borderColor:null,bottomMargin:G,cellPadding:null,cellSpacing:null,char:null,charOff:null,classId:null,clear:null,code:null,codeBase:null,codeType:null,color:null,compact:U,declare:U,event:null,face:null,frame:null,frameBorder:null,hSpace:G,leftMargin:G,link:null,longDesc:null,lowSrc:null,marginHeight:G,marginWidth:G,noResize:U,noHref:U,noShade:U,noWrap:U,object:null,profile:null,prompt:null,rev:null,rightMargin:G,rules:null,scheme:null,scrolling:W,standby:null,summary:null,text:null,topMargin:G,valueType:null,version:null,vAlign:null,vLink:null,vSpace:G,allowTransparency:null,autoCorrect:null,autoSave:null,credentialless:U,disablePictureInPicture:U,disableRemotePlayback:U,exportParts:lt,part:K,prefix:null,property:null,results:G,security:null,unselectable:null},space:`html`,transform:_t}),yt=mt({attributes:{accentHeight:`accent-height`,alignmentBaseline:`alignment-baseline`,arabicForm:`arabic-form`,baselineShift:`baseline-shift`,capHeight:`cap-height`,className:`class`,clipPath:`clip-path`,clipRule:`clip-rule`,colorInterpolation:`color-interpolation`,colorInterpolationFilters:`color-interpolation-filters`,colorProfile:`color-profile`,colorRendering:`color-rendering`,crossOrigin:`crossorigin`,dataType:`datatype`,dominantBaseline:`dominant-baseline`,enableBackground:`enable-background`,fillOpacity:`fill-opacity`,fillRule:`fill-rule`,floodColor:`flood-color`,floodOpacity:`flood-opacity`,fontFamily:`font-family`,fontSize:`font-size`,fontSizeAdjust:`font-size-adjust`,fontStretch:`font-stretch`,fontStyle:`font-style`,fontVariant:`font-variant`,fontWeight:`font-weight`,glyphName:`glyph-name`,glyphOrientationHorizontal:`glyph-orientation-horizontal`,glyphOrientationVertical:`glyph-orientation-vertical`,hrefLang:`hreflang`,horizAdvX:`horiz-adv-x`,horizOriginX:`horiz-origin-x`,horizOriginY:`horiz-origin-y`,imageRendering:`image-rendering`,letterSpacing:`letter-spacing`,lightingColor:`lighting-color`,markerEnd:`marker-end`,markerMid:`marker-mid`,markerStart:`marker-start`,maskType:`mask-type`,navDown:`nav-down`,navDownLeft:`nav-down-left`,navDownRight:`nav-down-right`,navLeft:`nav-left`,navNext:`nav-next`,navPrev:`nav-prev`,navRight:`nav-right`,navUp:`nav-up`,navUpLeft:`nav-up-left`,navUpRight:`nav-up-right`,onAbort:`onabort`,onActivate:`onactivate`,onAfterPrint:`onafterprint`,onBeforePrint:`onbeforeprint`,onBegin:`onbegin`,onCancel:`oncancel`,onCanPlay:`oncanplay`,onCanPlayThrough:`oncanplaythrough`,onChange:`onchange`,onClick:`onclick`,onClose:`onclose`,onCopy:`oncopy`,onCueChange:`oncuechange`,onCut:`oncut`,onDblClick:`ondblclick`,onDrag:`ondrag`,onDragEnd:`ondragend`,onDragEnter:`ondragenter`,onDragExit:`ondragexit`,onDragLeave:`ondragleave`,onDragOver:`ondragover`,onDragStart:`ondragstart`,onDrop:`ondrop`,onDurationChange:`ondurationchange`,onEmptied:`onemptied`,onEnd:`onend`,onEnded:`onended`,onError:`onerror`,onFocus:`onfocus`,onFocusIn:`onfocusin`,onFocusOut:`onfocusout`,onHashChange:`onhashchange`,onInput:`oninput`,onInvalid:`oninvalid`,onKeyDown:`onkeydown`,onKeyPress:`onkeypress`,onKeyUp:`onkeyup`,onLoad:`onload`,onLoadedData:`onloadeddata`,onLoadedMetadata:`onloadedmetadata`,onLoadStart:`onloadstart`,onMessage:`onmessage`,onMouseDown:`onmousedown`,onMouseEnter:`onmouseenter`,onMouseLeave:`onmouseleave`,onMouseMove:`onmousemove`,onMouseOut:`onmouseout`,onMouseOver:`onmouseover`,onMouseUp:`onmouseup`,onMouseWheel:`onmousewheel`,onOffline:`onoffline`,onOnline:`ononline`,onPageHide:`onpagehide`,onPageShow:`onpageshow`,onPaste:`onpaste`,onPause:`onpause`,onPlay:`onplay`,onPlaying:`onplaying`,onPopState:`onpopstate`,onProgress:`onprogress`,onRateChange:`onratechange`,onRepeat:`onrepeat`,onReset:`onreset`,onResize:`onresize`,onScroll:`onscroll`,onSeeked:`onseeked`,onSeeking:`onseeking`,onSelect:`onselect`,onShow:`onshow`,onStalled:`onstalled`,onStorage:`onstorage`,onSubmit:`onsubmit`,onSuspend:`onsuspend`,onTimeUpdate:`ontimeupdate`,onToggle:`ontoggle`,onUnload:`onunload`,onVolumeChange:`onvolumechange`,onWaiting:`onwaiting`,onZoom:`onzoom`,overlinePosition:`overline-position`,overlineThickness:`overline-thickness`,paintOrder:`paint-order`,panose1:`panose-1`,pointerEvents:`pointer-events`,referrerPolicy:`referrerpolicy`,renderingIntent:`rendering-intent`,shapeRendering:`shape-rendering`,stopColor:`stop-color`,stopOpacity:`stop-opacity`,strikethroughPosition:`strikethrough-position`,strikethroughThickness:`strikethrough-thickness`,strokeDashArray:`stroke-dasharray`,strokeDashOffset:`stroke-dashoffset`,strokeLineCap:`stroke-linecap`,strokeLineJoin:`stroke-linejoin`,strokeMiterLimit:`stroke-miterlimit`,strokeOpacity:`stroke-opacity`,strokeWidth:`stroke-width`,tabIndex:`tabindex`,textAnchor:`text-anchor`,textDecoration:`text-decoration`,textRendering:`text-rendering`,transformOrigin:`transform-origin`,typeOf:`typeof`,underlinePosition:`underline-position`,underlineThickness:`underline-thickness`,unicodeBidi:`unicode-bidi`,unicodeRange:`unicode-range`,unitsPerEm:`units-per-em`,vAlphabetic:`v-alphabetic`,vHanging:`v-hanging`,vIdeographic:`v-ideographic`,vMathematical:`v-mathematical`,vectorEffect:`vector-effect`,vertAdvY:`vert-adv-y`,vertOriginX:`vert-origin-x`,vertOriginY:`vert-origin-y`,wordSpacing:`word-spacing`,writingMode:`writing-mode`,xHeight:`x-height`,playbackOrder:`playbackorder`,timelineBegin:`timelinebegin`},properties:{about:q,accentHeight:G,accumulate:null,additive:null,alignmentBaseline:null,alphabetic:G,amplitude:G,arabicForm:null,ascent:G,attributeName:null,attributeType:null,azimuth:G,bandwidth:null,baselineShift:null,baseFrequency:null,baseProfile:null,bbox:null,begin:null,bias:G,by:null,calcMode:null,capHeight:G,className:K,clip:null,clipPath:null,clipPathUnits:null,clipRule:null,color:null,colorInterpolation:null,colorInterpolationFilters:null,colorProfile:null,colorRendering:null,content:null,contentScriptType:null,contentStyleType:null,crossOrigin:null,cursor:null,cx:null,cy:null,d:null,dataType:null,defaultAction:null,descent:G,diffuseConstant:G,direction:null,display:null,dur:null,divisor:G,dominantBaseline:null,download:U,dx:null,dy:null,edgeMode:null,editable:null,elevation:G,enableBackground:null,end:null,event:null,exponent:G,externalResourcesRequired:null,fill:null,fillOpacity:G,fillRule:null,filter:null,filterRes:null,filterUnits:null,floodColor:null,floodOpacity:null,focusable:null,focusHighlight:null,fontFamily:null,fontSize:null,fontSizeAdjust:null,fontStretch:null,fontStyle:null,fontVariant:null,fontWeight:null,format:null,fr:null,from:null,fx:null,fy:null,g1:lt,g2:lt,glyphName:lt,glyphOrientationHorizontal:null,glyphOrientationVertical:null,glyphRef:null,gradientTransform:null,gradientUnits:null,handler:null,hanging:G,hatchContentUnits:null,hatchUnits:null,height:null,href:null,hrefLang:null,horizAdvX:G,horizOriginX:G,horizOriginY:G,id:null,ideographic:G,imageRendering:null,initialVisibility:null,in:null,in2:null,intercept:G,k:G,k1:G,k2:G,k3:G,k4:G,kernelMatrix:q,kernelUnitLength:null,keyPoints:null,keySplines:null,keyTimes:null,kerning:null,lang:null,lengthAdjust:null,letterSpacing:null,lightingColor:null,limitingConeAngle:G,local:null,markerEnd:null,markerMid:null,markerStart:null,markerHeight:null,markerUnits:null,markerWidth:null,mask:null,maskContentUnits:null,maskType:null,maskUnits:null,mathematical:null,max:null,media:null,mediaCharacterEncoding:null,mediaContentEncodings:null,mediaSize:G,mediaTime:null,method:null,min:null,mode:null,name:null,navDown:null,navDownLeft:null,navDownRight:null,navLeft:null,navNext:null,navPrev:null,navRight:null,navUp:null,navUpLeft:null,navUpRight:null,numOctaves:null,observer:null,offset:null,onAbort:null,onActivate:null,onAfterPrint:null,onBeforePrint:null,onBegin:null,onCancel:null,onCanPlay:null,onCanPlayThrough:null,onChange:null,onClick:null,onClose:null,onCopy:null,onCueChange:null,onCut:null,onDblClick:null,onDrag:null,onDragEnd:null,onDragEnter:null,onDragExit:null,onDragLeave:null,onDragOver:null,onDragStart:null,onDrop:null,onDurationChange:null,onEmptied:null,onEnd:null,onEnded:null,onError:null,onFocus:null,onFocusIn:null,onFocusOut:null,onHashChange:null,onInput:null,onInvalid:null,onKeyDown:null,onKeyPress:null,onKeyUp:null,onLoad:null,onLoadedData:null,onLoadedMetadata:null,onLoadStart:null,onMessage:null,onMouseDown:null,onMouseEnter:null,onMouseLeave:null,onMouseMove:null,onMouseOut:null,onMouseOver:null,onMouseUp:null,onMouseWheel:null,onOffline:null,onOnline:null,onPageHide:null,onPageShow:null,onPaste:null,onPause:null,onPlay:null,onPlaying:null,onPopState:null,onProgress:null,onRateChange:null,onRepeat:null,onReset:null,onResize:null,onScroll:null,onSeeked:null,onSeeking:null,onSelect:null,onShow:null,onStalled:null,onStorage:null,onSubmit:null,onSuspend:null,onTimeUpdate:null,onToggle:null,onUnload:null,onVolumeChange:null,onWaiting:null,onZoom:null,opacity:null,operator:null,order:null,orient:null,orientation:null,origin:null,overflow:null,overlay:null,overlinePosition:G,overlineThickness:G,paintOrder:null,panose1:null,path:null,pathLength:G,patternContentUnits:null,patternTransform:null,patternUnits:null,phase:null,ping:K,pitch:null,playbackOrder:null,pointerEvents:null,points:null,pointsAtX:G,pointsAtY:G,pointsAtZ:G,preserveAlpha:null,preserveAspectRatio:null,primitiveUnits:null,propagate:null,property:q,r:null,radius:null,referrerPolicy:null,refX:null,refY:null,rel:q,rev:q,renderingIntent:null,repeatCount:null,repeatDur:null,requiredExtensions:q,requiredFeatures:q,requiredFonts:q,requiredFormats:q,resource:null,restart:null,result:null,rotate:null,rx:null,ry:null,scale:null,seed:null,shapeRendering:null,side:null,slope:null,snapshotTime:null,specularConstant:G,specularExponent:G,spreadMethod:null,spacing:null,startOffset:null,stdDeviation:null,stemh:null,stemv:null,stitchTiles:null,stopColor:null,stopOpacity:null,strikethroughPosition:G,strikethroughThickness:G,string:null,stroke:null,strokeDashArray:q,strokeDashOffset:null,strokeLineCap:null,strokeLineJoin:null,strokeMiterLimit:G,strokeOpacity:G,strokeWidth:null,style:null,surfaceScale:G,syncBehavior:null,syncBehaviorDefault:null,syncMaster:null,syncTolerance:null,syncToleranceDefault:null,systemLanguage:q,tabIndex:G,tableValues:null,target:null,targetX:G,targetY:G,textAnchor:null,textDecoration:null,textRendering:null,textLength:null,timelineBegin:null,title:null,transformBehavior:null,type:null,typeOf:q,to:null,transform:null,transformOrigin:null,u1:null,u2:null,underlinePosition:G,underlineThickness:G,unicode:null,unicodeBidi:null,unicodeRange:null,unitsPerEm:G,values:null,vAlphabetic:G,vMathematical:G,vectorEffect:null,vHanging:G,vIdeographic:G,version:null,vertAdvY:G,vertOriginX:G,vertOriginY:G,viewBox:null,viewTarget:null,visibility:null,width:null,widths:null,wordSpacing:null,writingMode:null,x:null,x1:null,x2:null,xChannelSelector:null,xHeight:G,y:null,y1:null,y2:null,yChannelSelector:null,z:null,zoomAndPan:null},space:`svg`,transform:gt}),bt=mt({properties:{xLinkActuate:null,xLinkArcRole:null,xLinkHref:null,xLinkRole:null,xLinkShow:null,xLinkTitle:null,xLinkType:null},space:`xlink`,transform(e,t){return`xlink:`+t.slice(5).toLowerCase()}}),xt=mt({attributes:{xmlnsxlink:`xmlns:xlink`},properties:{xmlnsXLink:null,xmlns:null},space:`xmlns`,transform:_t}),St=mt({properties:{xmlBase:null,xmlLang:null,xmlSpace:null},space:`xml`,transform(e,t){return`xml:`+t.slice(3).toLowerCase()}}),Ct={classId:`classID`,dataType:`datatype`,itemId:`itemID`,strokeDashArray:`strokeDasharray`,strokeDashOffset:`strokeDashoffset`,strokeLineCap:`strokeLinecap`,strokeLineJoin:`strokeLinejoin`,strokeMiterLimit:`strokeMiterlimit`,typeOf:`typeof`,xLinkActuate:`xlinkActuate`,xLinkArcRole:`xlinkArcrole`,xLinkHref:`xlinkHref`,xLinkRole:`xlinkRole`,xLinkShow:`xlinkShow`,xLinkTitle:`xlinkTitle`,xLinkType:`xlinkType`,xmlnsXLink:`xmlnsXlink`},wt=/[A-Z]/g,Tt=/-[a-z]/g,Et=/^data[-\w.:]+$/i;function Dt(e,t){let n=at(t),r=t,i=H;if(n in e.normal)return e.property[e.normal[n]];if(n.length>4&&n.slice(0,4)===`data`&&Et.test(t)){if(t.charAt(4)===`-`){let e=t.slice(5).replace(Tt,Y);r=`data`+e.charAt(0).toUpperCase()+e.slice(1)}else{let e=t.slice(4);if(!Tt.test(e)){let n=e.replace(wt,J);n.charAt(0)!==`-`&&(n=`-`+n),t=`data`+n}}i=ft}return new i(r,t)}function J(e){return`-`+e.toLowerCase()}function Y(e){return e.charAt(1).toUpperCase()}var Ot=it([ht,vt,bt,xt,St],`html`),X=it([ht,yt,bt,xt,St],`svg`);function kt(e){return e.join(` `).trim()}var At=n(((e,t)=>{var n=/\/\*[^*]*\*+([^/*][^*]*\*+)*\//g,r=/\n/g,i=/^\s*/,a=/^(\*?[-#/*\\\w]+(\[[0-9a-z_-]+\])?)\s*/,o=/^:\s*/,s=/^((?:'(?:\\'|.)*?'|"(?:\\"|.)*?"|\([^)]*?\)|[^};])+)/,c=/^[;\s]*/,l=/^\s+|\s+$/g;function u(e,t){if(typeof e!=`string`)throw TypeError(`First argument must be a string`);if(!e)return[];t||={};var l=1,u=1;function f(e){var t=e.match(r);t&&(l+=t.length);var n=e.lastIndexOf(`
|
|
3
|
+
`);u=~n?e.length-n:u+e.length}function p(){var e={line:l,column:u};return function(t){return t.position=new m(e),_(),t}}function m(e){this.start=e,this.end={line:l,column:u},this.source=t.source}m.prototype.content=e;function h(n){var r=Error(t.source+`:`+l+`:`+u+`: `+n);if(r.reason=n,r.filename=t.source,r.line=l,r.column=u,r.source=e,!t.silent)throw r}function g(t){var n=t.exec(e);if(n){var r=n[0];return f(r),e=e.slice(r.length),n}}function _(){g(i)}function v(e){var t;for(e||=[];t=y();)t!==!1&&e.push(t);return e}function y(){var t=p();if(e.charAt(0)==`/`&&e.charAt(1)==`*`){for(var n=2;e.charAt(n)!=``&&(e.charAt(n)!=`*`||e.charAt(n+1)!=`/`);)++n;if(n+=2,e.charAt(n-1)===``)return h(`End of comment missing`);var r=e.slice(2,n-2);return u+=2,f(r),e=e.slice(n),u+=2,t({type:`comment`,comment:r})}}function b(){var e=p(),t=g(a);if(t){if(y(),!g(o))return h(`property missing ':'`);var r=g(s),i=e({type:`declaration`,property:d(t[0].replace(n,``)),value:r?d(r[0].replace(n,``)):``});return g(c),i}}function x(){var e=[];v(e);for(var t;t=b();)t!==!1&&(e.push(t),v(e));return e}return _(),x()}function d(e){return e?e.replace(l,``):``}t.exports=u})),jt=n(((e,t,n)=>{var r=n&&n.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(e,"__esModule",{value:!0}),e.default=a;var i=r(At());function a(e,t){let n=null;if(!e||typeof e!=`string`)return n;let r=(0,i.default)(e),a=typeof t==`function`;return r.forEach(e=>{if(e.type!==`declaration`)return;let{property:r,value:i}=e;a?t(r,i,e):i&&(n||={},n[r]=i)}),n}})),Mt=n((e=>{Object.defineProperty(e,"__esModule",{value:!0}),e.camelCase=void 0;var t=/^--[a-zA-Z0-9_-]+$/,n=/-([a-z])/g,r=/^[^-]+$/,i=/^-(webkit|moz|ms|o|khtml)-/,a=/^-(ms)-/,o=function(e){return!e||r.test(e)||t.test(e)},s=function(e,t){return t.toUpperCase()},c=function(e,t){return`${t}-`};e.camelCase=function(e,t){return t===void 0&&(t={}),o(e)?e:(e=e.toLowerCase(),e=t.reactCompat?e.replace(a,c):e.replace(i,c),e.replace(n,s))}})),Z=n(((e,t,n)=>{var r=(n&&n.__importDefault||function(e){return e&&e.__esModule?e:{default:e}})(jt()),i=Mt();function a(e,t){var n={};return!e||typeof e!=`string`||(0,r.default)(e,function(e,r){e&&r&&(n[(0,i.camelCase)(e,t)]=r)}),n}a.default=a,t.exports=a})),Nt=Ft(`end`),Pt=Ft(`start`);function Ft(e){return t;function t(t){let n=t&&t.position&&t.position[e]||{};if(typeof n.line==`number`&&n.line>0&&typeof n.column==`number`&&n.column>0)return{line:n.line,column:n.column,offset:typeof n.offset==`number`&&n.offset>-1?n.offset:void 0}}}function It(e){let t=Pt(e),n=Nt(e);if(t&&n)return{start:t,end:n}}var Lt=i(Z(),1),Rt={}.hasOwnProperty,zt=new Map,Bt=/[A-Z]/g,Vt=new Set([`table`,`tbody`,`thead`,`tfoot`,`tr`]),Ht=new Set([`td`,`th`]),Ut=`https://github.com/syntax-tree/hast-util-to-jsx-runtime`;function Wt(e,t){if(!t||t.Fragment===void 0)throw TypeError("Expected `Fragment` in options");let n=t.filePath||void 0,r;if(t.development){if(typeof t.jsxDEV!=`function`)throw TypeError("Expected `jsxDEV` in options when `development: true`");r=tn(n,t.jsxDEV)}else{if(typeof t.jsx!=`function`)throw TypeError("Expected `jsx` in production options");if(typeof t.jsxs!=`function`)throw TypeError("Expected `jsxs` in production options");r=en(n,t.jsx,t.jsxs)}let i={Fragment:t.Fragment,ancestors:[],components:t.components||{},create:r,elementAttributeNameCase:t.elementAttributeNameCase||`react`,evaluater:t.createEvaluater?t.createEvaluater():void 0,filePath:n,ignoreInvalidStyle:t.ignoreInvalidStyle||!1,passKeys:t.passKeys!==!1,passNode:t.passNode||!1,schema:t.space===`svg`?X:Ot,stylePropertyNameCase:t.stylePropertyNameCase||`dom`,tableCellAlignToStyle:t.tableCellAlignToStyle!==!1},a=Gt(i,e,void 0);return a&&typeof a!=`string`?a:i.create(e,i.Fragment,{children:a||void 0},void 0)}function Gt(e,t,n){if(t.type===`element`)return Kt(e,t,n);if(t.type===`mdxFlowExpression`||t.type===`mdxTextExpression`)return qt(e,t);if(t.type===`mdxJsxFlowElement`||t.type===`mdxJsxTextElement`)return Yt(e,t,n);if(t.type===`mdxjsEsm`)return Jt(e,t);if(t.type===`root`)return Xt(e,t,n);if(t.type===`text`)return Zt(e,t)}function Kt(e,t,n){let r=e.schema,i=r;t.tagName.toLowerCase()===`svg`&&r.space===`html`&&(i=X,e.schema=i),e.ancestors.push(t);let a=cn(e,t.tagName,!1),o=nn(e,t),s=an(e,t);return Vt.has(t.tagName)&&(s=s.filter(function(e){return typeof e!=`string`||!tt(e)})),Qt(e,o,a,t),$t(o,s),e.ancestors.pop(),e.schema=r,e.create(t,a,o,n)}function qt(e,t){if(t.data&&t.data.estree&&e.evaluater){let n=t.data.estree.body[0];return n.type,e.evaluater.evaluateExpression(n.expression)}ln(e,t.position)}function Jt(e,t){if(t.data&&t.data.estree&&e.evaluater)return e.evaluater.evaluateProgram(t.data.estree);ln(e,t.position)}function Yt(e,t,n){let r=e.schema,i=r;t.name===`svg`&&r.space===`html`&&(i=X,e.schema=i),e.ancestors.push(t);let a=t.name===null?e.Fragment:cn(e,t.name,!0),o=rn(e,t),s=an(e,t);return Qt(e,o,a,t),$t(o,s),e.ancestors.pop(),e.schema=r,e.create(t,a,o,n)}function Xt(e,t,n){let r={};return $t(r,an(e,t)),e.create(t,e.Fragment,r,n)}function Zt(e,t){return t.value}function Qt(e,t,n,r){typeof n!=`string`&&n!==e.Fragment&&e.passNode&&(t.node=r)}function $t(e,t){if(t.length>0){let n=t.length>1?t:t[0];n&&(e.children=n)}}function en(e,t,n){return r;function r(e,r,i,a){let o=Array.isArray(i.children)?n:t;return a?o(r,i,a):o(r,i)}}function tn(e,t){return n;function n(n,r,i,a){let o=Array.isArray(i.children),s=Pt(n);return t(r,i,a,o,{columnNumber:s?s.column-1:void 0,fileName:e,lineNumber:s?s.line:void 0},void 0)}}function nn(e,t){let n={},r,i;for(i in t.properties)if(i!==`children`&&Rt.call(t.properties,i)){let a=on(e,i,t.properties[i]);if(a){let[i,o]=a;e.tableCellAlignToStyle&&i===`align`&&typeof o==`string`&&Ht.has(t.tagName)?r=o:n[i]=o}}if(r){let t=n.style||={};t[e.stylePropertyNameCase===`css`?`text-align`:`textAlign`]=r}return n}function rn(e,t){let n={};for(let r of t.attributes)if(r.type===`mdxJsxExpressionAttribute`){if(r.data&&r.data.estree&&e.evaluater){let t=r.data.estree.body[0];t.type;let i=t.expression;i.type;let a=i.properties[0];a.type,Object.assign(n,e.evaluater.evaluateExpression(a.argument))}else ln(e,t.position)}else{let i=r.name,a;if(r.value&&typeof r.value==`object`){if(r.value.data&&r.value.data.estree&&e.evaluater){let t=r.value.data.estree.body[0];t.type,a=e.evaluater.evaluateExpression(t.expression)}else ln(e,t.position)}else a=r.value===null||r.value;n[i]=a}return n}function an(e,t){let n=[],r=-1,i=e.passKeys?new Map:zt;for(;++r<t.children.length;){let a=t.children[r],o;if(e.passKeys){let e=a.type===`element`?a.tagName:a.type===`mdxJsxFlowElement`||a.type===`mdxJsxTextElement`?a.name:void 0;if(e){let t=i.get(e)||0;o=e+`-`+t,i.set(e,t+1)}}let s=Gt(e,a,o);s!==void 0&&n.push(s)}return n}function on(e,t,n){let r=Dt(e.schema,t);if(!(n==null||typeof n==`number`&&Number.isNaN(n))){if(Array.isArray(n)&&(n=r.commaSeparated?Ye(n):kt(n)),r.property===`style`){let t=typeof n==`object`?n:sn(e,String(n));return e.stylePropertyNameCase===`css`&&(t=un(t)),[`style`,t]}return[e.elementAttributeNameCase===`react`&&r.space?Ct[r.property]||r.property:r.attribute,n]}}function sn(e,t){try{return(0,Lt.default)(t,{reactCompat:!0})}catch(t){if(e.ignoreInvalidStyle)return{};let n=t,r=new y("Cannot parse `style` attribute",{ancestors:e.ancestors,cause:n,ruleId:`style`,source:`hast-util-to-jsx-runtime`});throw r.file=e.filePath||void 0,r.url=Ut+`#cannot-parse-style-attribute`,r}}function cn(e,t,n){let r;if(!n)r={type:`Literal`,value:t};else if(t.includes(`.`)){let e=t.split(`.`),n=-1,i;for(;++n<e.length;){let t=$e(e[n])?{type:`Identifier`,name:e[n]}:{type:`Literal`,value:e[n]};i=i?{type:`MemberExpression`,object:i,property:t,computed:!!(n&&t.type===`Literal`),optional:!1}:t}r=i}else r=$e(t)&&!/^[a-z]/.test(t)?{type:`Identifier`,name:t}:{type:`Literal`,value:t};if(r.type===`Literal`){let t=r.value;return Rt.call(e.components,t)?e.components[t]:t}if(e.evaluater)return e.evaluater.evaluateExpression(r);ln(e)}function ln(e,t){let n=new y("Cannot handle MDX estrees without `createEvaluater`",{ancestors:e.ancestors,place:t,ruleId:`mdx-estree`,source:`hast-util-to-jsx-runtime`});throw n.file=e.filePath||void 0,n.url=Ut+`#cannot-handle-mdx-estrees-without-createevaluater`,n}function un(e){let t={},n;for(n in e)Rt.call(e,n)&&(t[dn(n)]=e[n]);return t}function dn(e){let t=e.replace(Bt,fn);return t.slice(0,3)===`ms-`&&(t=`-`+t),t}function fn(e){return`-`+e.toLowerCase()}var pn={action:[`form`],cite:[`blockquote`,`del`,`ins`,`q`],data:[`object`],formAction:[`button`,`input`],href:[`a`,`area`,`base`,`link`],icon:[`menuitem`],itemId:null,manifest:[`html`],ping:[`a`,`area`],poster:[`video`],src:[`audio`,`embed`,`iframe`,`img`,`input`,`script`,`source`,`track`,`video`]};function mn(e){let t=[],n=-1,r=0,i=0;for(;++n<e.length;){let a=e.charCodeAt(n),o=``;if(a===37&&p(e.charCodeAt(n+1))&&p(e.charCodeAt(n+2)))i=2;else if(a<128)/[!#$&-;=?-Z_a-z~]/.test(String.fromCharCode(a))||(o=String.fromCharCode(a));else if(a>55295&&a<57344){let t=e.charCodeAt(n+1);a<56320&&t>56319&&t<57344?(o=String.fromCharCode(a,t),i=1):o=`�`}else o=String.fromCharCode(a);o&&=(t.push(e.slice(r,n),encodeURIComponent(o)),r=n+i+1,``),i&&=(n+=i,0)}return t.join(``)+e.slice(r)}function hn(e,t){let n={type:`element`,tagName:`blockquote`,properties:{},children:e.wrap(e.all(t),!0)};return e.patch(t,n),e.applyData(t,n)}function gn(e,t){let n={type:`element`,tagName:`br`,properties:{},children:[]};return e.patch(t,n),[e.applyData(t,n),{type:`text`,value:`
|
|
4
|
+
`}]}function _n(e,t){let n=t.value?t.value+`
|
|
5
|
+
`:``,r={},i=t.lang?t.lang.split(/\s+/):[];i.length>0&&(r.className=[`language-`+i[0]]);let a={type:`element`,tagName:`code`,properties:r,children:[{type:`text`,value:n}]};return t.meta&&(a.data={meta:t.meta}),e.patch(t,a),a=e.applyData(t,a),a={type:`element`,tagName:`pre`,properties:{},children:[a]},e.patch(t,a),a}function vn(e,t){let n={type:`element`,tagName:`del`,properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function yn(e,t){let n={type:`element`,tagName:`em`,properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function bn(e,t){let n=typeof e.options.clobberPrefix==`string`?e.options.clobberPrefix:`user-content-`,r=String(t.identifier).toUpperCase(),i=mn(r.toLowerCase()),a=e.footnoteOrder.indexOf(r),o,s=e.footnoteCounts.get(r);s===void 0?(s=0,e.footnoteOrder.push(r),o=e.footnoteOrder.length):o=a+1,s+=1,e.footnoteCounts.set(r,s);let c={type:`element`,tagName:`a`,properties:{href:`#`+n+`fn-`+i,id:n+`fnref-`+i+(s>1?`-`+s:``),dataFootnoteRef:!0,ariaDescribedBy:[`footnote-label`]},children:[{type:`text`,value:String(o)}]};e.patch(t,c);let l={type:`element`,tagName:`sup`,properties:{},children:[c]};return e.patch(t,l),e.applyData(t,l)}function xn(e,t){let n={type:`element`,tagName:`h`+t.depth,properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function Sn(e,t){if(e.options.allowDangerousHtml){let n={type:`raw`,value:t.value};return e.patch(t,n),e.applyData(t,n)}}function Cn(e,t){let n=t.referenceType,r=`]`;if(n===`collapsed`?r+=`[]`:n===`full`&&(r+=`[`+(t.label||t.identifier)+`]`),t.type===`imageReference`)return[{type:`text`,value:`![`+t.alt+r}];let i=e.all(t),a=i[0];a&&a.type===`text`?a.value=`[`+a.value:i.unshift({type:`text`,value:`[`});let o=i[i.length-1];return o&&o.type===`text`?o.value+=r:i.push({type:`text`,value:r}),i}function wn(e,t){let n=String(t.identifier).toUpperCase(),r=e.definitionById.get(n);if(!r)return Cn(e,t);let i={src:mn(r.url||``),alt:t.alt};r.title!==null&&r.title!==void 0&&(i.title=r.title);let a={type:`element`,tagName:`img`,properties:i,children:[]};return e.patch(t,a),e.applyData(t,a)}function Tn(e,t){let n={src:mn(t.url)};t.alt!==null&&t.alt!==void 0&&(n.alt=t.alt),t.title!==null&&t.title!==void 0&&(n.title=t.title);let r={type:`element`,tagName:`img`,properties:n,children:[]};return e.patch(t,r),e.applyData(t,r)}function En(e,t){let n={type:`text`,value:t.value.replace(/\r?\n|\r/g,` `)};e.patch(t,n);let r={type:`element`,tagName:`code`,properties:{},children:[n]};return e.patch(t,r),e.applyData(t,r)}function Dn(e,t){let n=String(t.identifier).toUpperCase(),r=e.definitionById.get(n);if(!r)return Cn(e,t);let i={href:mn(r.url||``)};r.title!==null&&r.title!==void 0&&(i.title=r.title);let a={type:`element`,tagName:`a`,properties:i,children:e.all(t)};return e.patch(t,a),e.applyData(t,a)}function On(e,t){let n={href:mn(t.url)};t.title!==null&&t.title!==void 0&&(n.title=t.title);let r={type:`element`,tagName:`a`,properties:n,children:e.all(t)};return e.patch(t,r),e.applyData(t,r)}function kn(e,t,n){let r=e.all(t),i=n?An(n):jn(t),a={},o=[];if(typeof t.checked==`boolean`){let e=r[0],n;e&&e.type===`element`&&e.tagName===`p`?n=e:(n={type:`element`,tagName:`p`,properties:{},children:[]},r.unshift(n)),n.children.length>0&&n.children.unshift({type:`text`,value:` `}),n.children.unshift({type:`element`,tagName:`input`,properties:{type:`checkbox`,checked:t.checked,disabled:!0},children:[]}),a.className=[`task-list-item`]}let s=-1;for(;++s<r.length;){let e=r[s];(i||s!==0||e.type!==`element`||e.tagName!==`p`)&&o.push({type:`text`,value:`
|
|
6
|
+
`}),e.type===`element`&&e.tagName===`p`&&!i?o.push(...e.children):o.push(e)}let c=r[r.length-1];c&&(i||c.type!==`element`||c.tagName!==`p`)&&o.push({type:`text`,value:`
|
|
7
|
+
`});let l={type:`element`,tagName:`li`,properties:a,children:o};return e.patch(t,l),e.applyData(t,l)}function An(e){let t=!1;if(e.type===`list`){t=e.spread||!1;let n=e.children,r=-1;for(;!t&&++r<n.length;)t=jn(n[r])}return t}function jn(e){return e.spread??e.children.length>1}function Mn(e,t){let n={},r=e.all(t),i=-1;for(typeof t.start==`number`&&t.start!==1&&(n.start=t.start);++i<r.length;){let e=r[i];if(e.type===`element`&&e.tagName===`li`&&e.properties&&Array.isArray(e.properties.className)&&e.properties.className.includes(`task-list-item`)){n.className=[`contains-task-list`];break}}let a={type:`element`,tagName:t.ordered?`ol`:`ul`,properties:n,children:e.wrap(r,!0)};return e.patch(t,a),e.applyData(t,a)}function Nn(e,t){let n={type:`element`,tagName:`p`,properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function Pn(e,t){let n={type:`root`,children:e.wrap(e.all(t))};return e.patch(t,n),e.applyData(t,n)}function Fn(e,t){let n={type:`element`,tagName:`strong`,properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function In(e,t){let n=e.all(t),r=n.shift(),i=[];if(r){let n={type:`element`,tagName:`thead`,properties:{},children:e.wrap([r],!0)};e.patch(t.children[0],n),i.push(n)}if(n.length>0){let r={type:`element`,tagName:`tbody`,properties:{},children:e.wrap(n,!0)},a=Pt(t.children[1]),o=Nt(t.children[t.children.length-1]);a&&o&&(r.position={start:a,end:o}),i.push(r)}let a={type:`element`,tagName:`table`,properties:{},children:e.wrap(i,!0)};return e.patch(t,a),e.applyData(t,a)}function Ln(e,t,n){let r=n?n.children:void 0,i=(r?r.indexOf(t):1)===0?`th`:`td`,a=n&&n.type===`table`?n.align:void 0,o=a?a.length:t.children.length,s=-1,c=[];for(;++s<o;){let n=t.children[s],r={},o=a?a[s]:void 0;o&&(r.align=o);let l={type:`element`,tagName:i,properties:r,children:[]};n&&(l.children=e.all(n),e.patch(n,l),l=e.applyData(n,l)),c.push(l)}let l={type:`element`,tagName:`tr`,properties:{},children:e.wrap(c,!0)};return e.patch(t,l),e.applyData(t,l)}function Rn(e,t){let n={type:`element`,tagName:`td`,properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}var zn=9,Bn=32;function Vn(e){let t=String(e),n=/\r?\n|\r/g,r=n.exec(t),i=0,a=[];for(;r;)a.push(Hn(t.slice(i,r.index),i>0,!0),r[0]),i=r.index+r[0].length,r=n.exec(t);return a.push(Hn(t.slice(i),i>0,!1)),a.join(``)}function Hn(e,t,n){let r=0,i=e.length;if(t){let t=e.codePointAt(r);for(;t===zn||t===Bn;)r++,t=e.codePointAt(r)}if(n){let t=e.codePointAt(i-1);for(;t===zn||t===Bn;)i--,t=e.codePointAt(i-1)}return i>r?e.slice(r,i):``}function Un(e,t){let n={type:`text`,value:Vn(String(t.value))};return e.patch(t,n),e.applyData(t,n)}function Wn(e,t){let n={type:`element`,tagName:`hr`,properties:{},children:[]};return e.patch(t,n),e.applyData(t,n)}var Gn={blockquote:hn,break:gn,code:_n,delete:vn,emphasis:yn,footnoteReference:bn,heading:xn,html:Sn,imageReference:wn,image:Tn,inlineCode:En,linkReference:Dn,link:On,listItem:kn,list:Mn,paragraph:Nn,root:Pn,strong:Fn,table:In,tableCell:Rn,tableRow:Ln,text:Un,thematicBreak:Wn,toml:Kn,yaml:Kn,definition:Kn,footnoteDefinition:Kn};function Kn(){}var{defineProperty:qn}=Object,Jn=typeof self==`object`?self:globalThis,Yn=(e,t)=>{switch(e){case`Function`:case`SharedWorker`:case`Worker`:case`eval`:case`setInterval`:case`setTimeout`:throw TypeError(`unable to deserialize `+e)}return new Jn[e](t)},Xn=(e,t)=>{let n=(t,n)=>(e.set(n,t),t),r=i=>{if(e.has(i))return e.get(i);let[a,o]=t[i];switch(a){case 0:case-1:return n(o,i);case 1:{let e=n([],i);for(let t of o)e.push(r(t));return e}case 2:{let e=n({},i);for(let[t,n]of o){let i=r(t),a=r(n);i===`__proto__`?qn(e,i,{value:a,configurable:!0,enumerable:!0,writable:!0}):e[i]=a}return e}case 3:return n(new Date(o),i);case 4:{let{source:e,flags:t}=o;return n(new RegExp(e,t),i)}case 5:{let e=n(new Map,i);for(let[t,n]of o)e.set(r(t),r(n));return e}case 6:{let e=n(new Set,i);for(let t of o)e.add(r(t));return e}case 7:{let{name:e,message:t}=o;return n(typeof Jn[e]==`function`?Yn(e,t):Error(t),i)}case 8:return n(BigInt(o),i);case`BigInt`:return n(Object(BigInt(o)),i);case`ArrayBuffer`:return n(new Uint8Array(o).buffer,o);case`DataView`:{let{buffer:e}=new Uint8Array(o);return n(new DataView(e),o)}case`-0`:return-0}return n(Yn(a,o),i)};return r},Zn=e=>Xn(new Map,e)(0),Qn=``,{toString:$n}={},{keys:er,is:tr}=Object,nr=e=>{let t=typeof e;if(t!==`object`||!e)return[0,t];let n=$n.call(e).slice(8,-1);switch(n){case`Array`:return[1,Qn];case`Object`:return[2,Qn];case`Date`:return[3,Qn];case`RegExp`:return[4,Qn];case`Map`:return[5,Qn];case`Set`:return[6,Qn];case`DataView`:return[1,n]}return n.includes(`Array`)?[1,n]:e instanceof Error?[7,e.name||`Error`]:[2,n]},rr=([e,t])=>e===0&&(t===`function`||t===`symbol`),ir=(e,t,n,r)=>{let i=(e,t)=>{let i=r.push(e)-1;return n.set(t,i),i},a=o=>{if(n.has(o))return n.get(o);let[s,c]=nr(o);switch(s){case 0:{let t=o;switch(c){case`bigint`:s=8,t=o.toString();break;case`number`:if(!o&&tr(o,-0))return r.push([`-0`])-1;break;case`function`:case`symbol`:if(e)throw TypeError(`unable to serialize `+c);t=null;break;case`undefined`:return i([-1],o)}return i([s,t],o)}case 1:{if(c){let e=o;return c===`DataView`?e=new Uint8Array(o.buffer):c===`ArrayBuffer`&&(e=new Uint8Array(o)),i([c,[...e]],o)}let e=[],t=i([s,e],o);for(let t of o)e.push(a(t));return t}case 2:{if(c)switch(c){case`BigInt`:return i([c,o.toString()],o);case`Boolean`:case`Number`:case`String`:return i([c,o.valueOf()],o)}if(t&&`toJSON`in o)return a(o.toJSON());let n=[],r=i([s,n],o);for(let t of er(o))(e||!rr(nr(o[t])))&&n.push([a(t),a(o[t])]);return r}case 3:return i([s,isNaN(o.getTime())?Qn:o.toISOString()],o);case 4:{let{source:e,flags:t}=o;return i([s,{source:e,flags:t}],o)}case 5:{let t=[],n=i([s,t],o);for(let[n,r]of o)(e||!(rr(nr(n))||rr(nr(r))))&&t.push([a(n),a(r)]);return n}case 6:{let t=[],n=i([s,t],o);for(let n of o)(e||!rr(nr(n)))&&t.push(a(n));return n}}let{message:l}=o;return i([s,{name:c,message:l}],o)};return a},ar=(e,{json:t,lossy:n}={})=>{let r=[];return ir(!(t||n),!!t,new Map,r)(e),r},or=typeof structuredClone==`function`?(e,t)=>t&&(`json`in t||`lossy`in t)?Zn(ar(e,t)):structuredClone(e):(e,t)=>Zn(ar(e,t));function sr(e,t){let n=[{type:`text`,value:`↩`}];return t>1&&n.push({type:`element`,tagName:`sup`,properties:{},children:[{type:`text`,value:String(t)}]}),n}function cr(e,t){return`Back to reference `+(e+1)+(t>1?`-`+t:``)}function lr(e){let t=typeof e.options.clobberPrefix==`string`?e.options.clobberPrefix:`user-content-`,n=e.options.footnoteBackContent||sr,r=e.options.footnoteBackLabel||cr,i=e.options.footnoteLabel||`Footnotes`,a=e.options.footnoteLabelTagName||`h2`,o=e.options.footnoteLabelProperties||{className:[`sr-only`]},s=[],c=-1;for(;++c<e.footnoteOrder.length;){let i=e.footnoteById.get(e.footnoteOrder[c]);if(!i)continue;let a=e.all(i),o=String(i.identifier).toUpperCase(),l=mn(o.toLowerCase()),u=0,d=[],f=e.footnoteCounts.get(o);for(;f!==void 0&&++u<=f;){d.length>0&&d.push({type:`text`,value:` `});let e=typeof n==`string`?n:n(c,u);typeof e==`string`&&(e={type:`text`,value:e}),d.push({type:`element`,tagName:`a`,properties:{href:`#`+t+`fnref-`+l+(u>1?`-`+u:``),dataFootnoteBackref:``,ariaLabel:typeof r==`string`?r:r(c,u),className:[`data-footnote-backref`]},children:Array.isArray(e)?e:[e]})}let p=a[a.length-1];if(p&&p.type===`element`&&p.tagName===`p`){let e=p.children[p.children.length-1];e&&e.type===`text`?e.value+=` `:p.children.push({type:`text`,value:` `}),p.children.push(...d)}else a.push(...d);let m={type:`element`,tagName:`li`,properties:{id:t+`fn-`+l},children:e.wrap(a,!0)};e.patch(i,m),s.push(m)}if(s.length!==0)return{type:`element`,tagName:`section`,properties:{dataFootnotes:!0,className:[`footnotes`]},children:[{type:`element`,tagName:a,properties:{...or(o),id:`footnote-label`},children:[{type:`text`,value:i}]},{type:`text`,value:`
|
|
8
|
+
`},{type:`element`,tagName:`ol`,properties:{},children:e.wrap(s,!0)},{type:`text`,value:`
|
|
9
|
+
`}]}}var ur={}.hasOwnProperty,dr={};function fr(e,t){let n=t||dr,r=new Map,i=new Map,a={all:s,applyData:mr,definitionById:r,footnoteById:i,footnoteCounts:new Map,footnoteOrder:[],handlers:{...Gn,...n.handlers},one:o,options:n,patch:pr,wrap:gr};return C(e,function(e){if(e.type===`definition`||e.type===`footnoteDefinition`){let t=e.type===`definition`?r:i,n=String(e.identifier).toUpperCase();t.has(n)||t.set(n,e)}}),a;function o(e,t){let n=e.type,r=a.handlers[n];if(ur.call(a.handlers,n)&&r)return r(a,e,t);if(a.options.passThrough&&a.options.passThrough.includes(n)){if(`children`in e){let{children:t,...n}=e,r=or(n);return r.children=a.all(e),r}return or(e)}return(a.options.unknownHandler||hr)(a,e,t)}function s(e){let t=[];if(`children`in e){let n=e.children,r=-1;for(;++r<n.length;){let i=a.one(n[r],e);if(i){if(r&&n[r-1].type===`break`&&(!Array.isArray(i)&&i.type===`text`&&(i.value=_r(i.value)),!Array.isArray(i)&&i.type===`element`)){let e=i.children[0];e&&e.type===`text`&&(e.value=_r(e.value))}Array.isArray(i)?t.push(...i):t.push(i)}}}return t}}function pr(e,t){e.position&&(t.position=It(e))}function mr(e,t){let n=t;if(e&&e.data){let t=e.data.hName,r=e.data.hChildren,i=e.data.hProperties;typeof t==`string`&&(n.type===`element`?n.tagName=t:n={type:`element`,tagName:t,properties:{},children:`children`in n?n.children:[n]}),n.type===`element`&&i&&Object.assign(n.properties,or(i)),`children`in n&&n.children&&r!=null&&(n.children=r)}return n}function hr(e,t){let n=t.data||{},r=`value`in t&&!(ur.call(n,`hProperties`)||ur.call(n,`hChildren`))?{type:`text`,value:t.value}:{type:`element`,tagName:`div`,properties:{},children:e.all(t)};return e.patch(t,r),e.applyData(t,r)}function gr(e,t){let n=[],r=-1;for(t&&n.push({type:`text`,value:`
|
|
10
|
+
`});++r<e.length;)r&&n.push({type:`text`,value:`
|
|
11
|
+
`}),n.push(e[r]);return t&&e.length>0&&n.push({type:`text`,value:`
|
|
12
|
+
`}),n}function _r(e){let t=0,n=e.charCodeAt(t);for(;n===9||n===32;)t++,n=e.charCodeAt(t);return e.slice(t)}function vr(e,t){let n=fr(e,t),r=n.one(e,void 0),i=lr(n),a=Array.isArray(r)?{type:`root`,children:r}:r||{type:`root`,children:[]};return i&&(`children`in a,a.children.push({type:`text`,value:`
|
|
13
|
+
`},i)),a}function yr(e,t){return e&&`run`in e?async function(n,r){let i=vr(n,{file:r,...t});await e.run(i,r)}:function(n,r){return vr(n,{file:r,...e||t})}}var Q=s(),$=i(t(),1),br=[],xr={allowDangerousHtml:!0},Sr=/^(https?|ircs?|mailto|xmpp)$/i,Cr=[{from:`astPlugins`,id:`remove-buggy-html-in-markdown-parser`},{from:`allowDangerousHtml`,id:`remove-buggy-html-in-markdown-parser`},{from:`allowNode`,id:`replace-allownode-allowedtypes-and-disallowedtypes`,to:`allowElement`},{from:`allowedTypes`,id:`replace-allownode-allowedtypes-and-disallowedtypes`,to:`allowedElements`},{from:`className`,id:`remove-classname`},{from:`disallowedTypes`,id:`replace-allownode-allowedtypes-and-disallowedtypes`,to:`disallowedElements`},{from:`escapeHtml`,id:`remove-buggy-html-in-markdown-parser`},{from:`includeElementIndex`,id:`#remove-includeelementindex`},{from:`includeNodeIndex`,id:`change-includenodeindex-to-includeelementindex`},{from:`linkTarget`,id:`remove-linktarget`},{from:`plugins`,id:`change-plugins-to-remarkplugins`,to:`remarkPlugins`},{from:`rawSourcePos`,id:`#remove-rawsourcepos`},{from:`renderers`,id:`change-renderers-to-components`,to:`components`},{from:`source`,id:`change-source-to-children`,to:`children`},{from:`sourcePos`,id:`#remove-sourcepos`},{from:`transformImageUri`,id:`#add-urltransform`,to:`urlTransform`},{from:`transformLinkUri`,id:`#add-urltransform`,to:`urlTransform`}];function wr(e){let t=Tr(e),n=Er(e);return Dr(t.runSync(t.parse(n),n),e)}function Tr(e){let t=e.rehypePlugins||br,n=e.remarkPlugins||br,r=e.remarkRehypeOptions?{...e.remarkRehypeOptions,...xr}:xr;return d().use(f).use(n).use(yr,r).use(t)}function Er(e){let t=e.children||``,n=new g;return typeof t==`string`?n.value=t:``+t,n}function Dr(e,t){let n=t.allowedElements,r=t.allowElement,i=t.components,a=t.disallowedElements,o=t.skipHtml,s=t.unwrapDisallowed,c=t.urlTransform||Or;for(let e of Cr)Object.hasOwn(t,e.from)&&``+e.from+(e.to?"use `"+e.to+"` instead":`remove it`)+e.id;return C(e,l),Wt(e,{Fragment:Q.Fragment,components:i,ignoreInvalidStyle:!0,jsx:Q.jsx,jsxs:Q.jsxs,passKeys:!0,passNode:!0});function l(e,t,i){if(e.type===`raw`&&i&&typeof t==`number`)return o?i.children.splice(t,1):i.children[t]={type:`text`,value:e.value},t;if(e.type===`element`){let t;for(t in pn)if(Object.hasOwn(pn,t)&&Object.hasOwn(e.properties,t)){let n=e.properties[t],r=pn[t];(r===null||r.includes(e.tagName))&&(e.properties[t]=c(String(n||``),t,e))}}if(e.type===`element`){let o=n?!n.includes(e.tagName):a?a.includes(e.tagName):!1;if(!o&&r&&typeof t==`number`&&(o=!r(e,t,i)),o&&i&&typeof t==`number`)return s&&e.children?i.children.splice(t,1,...e.children):i.children.splice(t,1),t}}}function Or(e){let t=e.indexOf(`:`),n=e.indexOf(`?`),r=e.indexOf(`#`),i=e.indexOf(`/`);return t===-1||i!==-1&&t>i||n!==-1&&t>n||r!==-1&&t>r||Sr.test(e.slice(0,t))?e:``}var kr=c(),Ar=e=>e.toLocaleString(`en-US`);function jr(e){let t=(0,kr.c)(56),{sessionId:n}=e,[i,a]=(0,$.useState)(void 0),o,s;if(t[0]===n?(o=t[1],s=t[2]):(o=()=>{let e=!0,t=()=>r(`session_usage`,{sessionId:n}).then(t=>e&&a(t)).catch(()=>e&&a(Nr));a(void 0),t();let i=setInterval(t,1e4);return()=>{e=!1,clearInterval(i)}},s=[n],t[0]=n,t[1]=o,t[2]=s),(0,$.useEffect)(o,s),i===void 0)return null;if(!i){let e;return t[3]===Symbol.for(`react.memo_cache_sentinel`)?(e=(0,Q.jsxs)(`div`,{className:`cdv-empty-copy bd-usage-empty`,children:[(0,Q.jsx)(`h3`,{children:`No usage data yet`}),(0,Q.jsx)(`p`,{children:`This session has no assistant responses to read usage from.`})]}),t[3]=e):e=t[3],e}let c=Math.min(100,Math.max(0,i.usedPercentage)),l=c>=85?`danger`:c>=65?`warning`:`ok`,u=i.model||`—`,d;t[4]===u?d=t[5]:(d={label:`Model`,value:u},t[4]=u,t[5]=d);let f;t[6]===i.inputTokens?f=t[7]:(f=Ar(i.inputTokens),t[6]=i.inputTokens,t[7]=f);let p;t[8]===f?p=t[9]:(p={label:`Input tokens`,value:f},t[8]=f,t[9]=p);let m;t[10]===i.outputTokens?m=t[11]:(m=Ar(i.outputTokens),t[10]=i.outputTokens,t[11]=m);let h;t[12]===m?h=t[13]:(h={label:`Output tokens`,value:m},t[12]=m,t[13]=h);let g;t[14]===i.costUsd?g=t[15]:(g=i.costUsd===null?`—`:`$${i.costUsd.toFixed(2)}`,t[14]=i.costUsd,t[15]=g);let _;t[16]===g?_=t[17]:(_={label:`Cost`,value:g},t[16]=g,t[17]=_);let v;t[18]!==_||t[19]!==d||t[20]!==p||t[21]!==h?(v=[d,p,h,_],t[18]=_,t[19]=d,t[20]=p,t[21]=h,t[22]=v):v=t[22];let y=v,b;t[23]===Symbol.for(`react.memo_cache_sentinel`)?(b=(0,Q.jsx)(`span`,{children:`Context window`}),t[23]=b):b=t[23];let x;t[24]===c?x=t[25]:(x=Math.round(c),t[24]=c,t[25]=x);let S;t[26]===x?S=t[27]:(S=(0,Q.jsxs)(`div`,{className:`bd-usage-head`,children:[b,(0,Q.jsxs)(`b`,{children:[x,`%`]})]}),t[26]=x,t[27]=S);let C;t[28]===c?C=t[29]:(C=Math.round(c),t[28]=c,t[29]=C);let w=`${c}%`,T;t[30]===w?T=t[31]:(T=(0,Q.jsx)(`i`,{style:{width:w}}),t[30]=w,t[31]=T);let E;t[32]!==C||t[33]!==T||t[34]!==l?(E=(0,Q.jsx)(`div`,{className:`bd-usage-bar`,"data-tone":l,role:`progressbar`,"aria-valuemin":0,"aria-valuemax":100,"aria-valuenow":C,children:T}),t[32]=C,t[33]=T,t[34]=l,t[35]=E):E=t[35];let D;t[36]===i.tokens?D=t[37]:(D=Ar(i.tokens),t[36]=i.tokens,t[37]=D);let O;t[38]===i.contextWindowSize?O=t[39]:(O=i.contextWindowSize>0&&` of ${Ar(i.contextWindowSize)}`,t[38]=i.contextWindowSize,t[39]=O);let k;t[40]!==D||t[41]!==O?(k=(0,Q.jsxs)(`p`,{className:`bd-usage-sub`,children:[D,O,` tokens in context`]}),t[40]=D,t[41]=O,t[42]=k):k=t[42];let A;t[43]!==S||t[44]!==E||t[45]!==k?(A=(0,Q.jsxs)(`section`,{className:`bd-usage-ctx`,"aria-label":`Context window`,children:[S,E,k]}),t[43]=S,t[44]=E,t[45]=k,t[46]=A):A=t[46];let j;t[47]===y?j=t[48]:(j=(0,Q.jsx)(`dl`,{className:`bd-usage-grid`,children:y.map(Mr)}),t[47]=y,t[48]=j);let M;t[49]===i.estimated?M=t[50]:(M=i.estimated&&(0,Q.jsx)(`p`,{className:`bd-usage-sub`,children:`Estimated from the session transcript: the window size is assumed and cost is unavailable. Install the Claude Code statusline in Settings → General for exact figures.`}),t[49]=i.estimated,t[50]=M);let N;t[51]===Symbol.for(`react.memo_cache_sentinel`)?(N=(0,Q.jsx)(`p`,{className:`bd-usage-sub`,children:`Input and output are lifetime totals for the session, so they stay high after a compact; the context bar does not.`}),t[51]=N):N=t[51];let P;return t[52]!==A||t[53]!==j||t[54]!==M?(P=(0,Q.jsxs)(`div`,{className:`bd-usage`,children:[A,j,M,N]}),t[52]=A,t[53]=j,t[54]=M,t[55]=P):P=t[55],P}function Mr(e){return(0,Q.jsxs)(`div`,{children:[(0,Q.jsx)(`dt`,{children:e.label}),(0,Q.jsx)(`dd`,{children:e.value})]},e.label)}function Nr(e){return e??null}var Pr=typeof navigator<`u`&&/Mac|iPhone|iPad/.test(navigator.platform);function Fr(e,t){return e.replace(/\[Image #(\d+)\]/g,(e,n)=>{let r=t[Number(n)-1];return r?`}>)`:e})}function Ir(e){let t=(0,kr.c)(28),{card:n}=e,[r,i]=(0,$.useState)(!1),a=n.link.promptBody??``,o,s,c,l,d,f;if(t[0]!==a||t[1]!==n.link.promptImagePaths||t[2]!==r){let e=n.link.promptImagePaths??[],{text:p,files:m}=u(a),h;t[9]===a?h=t[10]:(h=async()=>{try{await navigator.clipboard.writeText(a),i(!0),window.setTimeout(()=>i(!1),1500)}catch{}},t[9]=a,t[10]=h);let g=h;d=`cdv-task`;let _;t[11]===r?_=t[12]:(_=r?(0,Q.jsx)(we,{size:14,"aria-hidden":!0}):(0,Q.jsx)(Pe,{size:14,"aria-hidden":!0}),t[11]=r,t[12]=_);let v=r?`Copied`:`Copy`;t[13]!==g||t[14]!==_||t[15]!==v?(f=(0,Q.jsx)(`header`,{className:`cdv-task-head`,children:(0,Q.jsxs)(O,{size:`sm`,variant:`ghost`,onClick:g,"aria-live":`polite`,children:[_,v]})}),t[13]=g,t[14]=_,t[15]=v,t[16]=f):f=t[16],o=`hist-prose cdv-task-body`,s=!0;let y,b;t[17]===Symbol.for(`react.memo_cache_sentinel`)?(y=[x],b={a:Rr},t[17]=y,t[18]=b):(y=t[17],b=t[18]),c=(0,Q.jsx)(wr,{remarkPlugins:y,components:b,children:Fr(p,e)}),l=m.length>0&&(0,Q.jsx)(`ul`,{className:`nt-attachments cdv-task-files`,"aria-label":`Attached files`,children:m.map(Lr)}),t[0]=a,t[1]=n.link.promptImagePaths,t[2]=r,t[3]=o,t[4]=s,t[5]=c,t[6]=l,t[7]=d,t[8]=f}else o=t[3],s=t[4],c=t[5],l=t[6],d=t[7],f=t[8];let p;t[19]!==o||t[20]!==s||t[21]!==c||t[22]!==l?(p=(0,Q.jsxs)(`div`,{className:o,"data-md":s,children:[c,l]}),t[19]=o,t[20]=s,t[21]=c,t[22]=l,t[23]=p):p=t[23];let m;return t[24]!==d||t[25]!==f||t[26]!==p?(m=(0,Q.jsxs)(`section`,{className:d,children:[f,p]}),t[24]=d,t[25]=f,t[26]=p,t[27]=m):m=t[27],m}function Lr(e){return(0,Q.jsxs)(`li`,{className:`nt-chip`,title:e.path,children:[(0,Q.jsx)(m,{size:14,strokeWidth:2,"aria-hidden":!0}),(0,Q.jsx)(`span`,{className:`nt-chip-name`,children:e.name})]},e.path)}function Rr(e){let{node:t,...n}=e;return(0,Q.jsx)(`a`,{...n,target:`_blank`,rel:`noopener noreferrer`})}function zr(e){let t=(0,kr.c)(65),{card:n,onDone:r}=e,i=V(Br),[a,o]=(0,$.useState)(!1),s=n.link,c=s.promptBody??``,l;t[0]===s.promptImagePaths?l=t[1]:(l=s.promptImagePaths??[],t[0]=s.promptImagePaths,t[1]=l);let d=l,f=!!s.sessionLink,[p,m]=(0,$.useState)(s.name??``),h;t[2]===c?h=t[3]:(h=()=>u(c),t[2]=c,t[3]=h);let[g]=(0,$.useState)(h),[_,y]=(0,$.useState)(g.text),[b,x]=(0,$.useState)(d),[C,w]=(0,$.useState)(g.files),T;t[4]!==_||t[5]!==C?(T=()=>v(_,C),t[4]=_,t[5]=C,t[6]=T):T=t[6];let E=T,D;t[7]!==c||t[8]!==b||t[9]!==E||t[10]!==d||t[11]!==s.name||t[12]!==p?(D=p.trim()!==(s.name??``)||E()!==c.trim()||b.join(`
|
|
14
|
+
`)!==d.join(`
|
|
15
|
+
`),t[7]=c,t[8]=b,t[9]=E,t[10]=d,t[11]=s.name,t[12]=p,t[13]=D):D=t[13];let A=D,j;t[14]!==A||t[15]!==_||t[16]!==a?(j=!!_.trim()&&A&&!a,t[14]=A,t[15]=_,t[16]=a,t[17]=j):j=t[17];let M=j,N;t[18]!==M||t[19]!==n.id||t[20]!==b||t[21]!==E||t[22]!==r||t[23]!==p||t[24]!==i?(N=async()=>{if(!M)return;o(!0);let e=await i(n.id,{name:p,promptBody:E(),promptImagePaths:b});o(!1),e&&r()},t[18]=M,t[19]=n.id,t[20]=b,t[21]=E,t[22]=r,t[23]=p,t[24]=i,t[25]=N):N=t[25];let P=N,F;t[26]===P?F=t[27]:(F=e=>{e.preventDefault(),P()},t[26]=P,t[27]=F);let ee;t[28]!==r||t[29]!==P||t[30]!==a?(ee=e=>{e.key===`Enter`&&(e.ctrlKey||e.metaKey)?(e.preventDefault(),P()):e.key===`Escape`&&!a&&(e.stopPropagation(),r())},t[28]=r,t[29]=P,t[30]=a,t[31]=ee):ee=t[31];let te;t[32]===Symbol.for(`react.memo_cache_sentinel`)?(te=(0,Q.jsx)(`h3`,{className:`cdv-edit-heading`,children:`Edit task`}),t[32]=te):te=t[32];let ne;t[33]===Symbol.for(`react.memo_cache_sentinel`)?(ne=(0,Q.jsxs)(R,{htmlFor:`cdv-task-title`,children:[`Title `,(0,Q.jsx)(`span`,{className:`tg-muted`,children:`(optional, defaults to the first line)`})]}),t[33]=ne):ne=t[33];let re;t[34]===Symbol.for(`react.memo_cache_sentinel`)?(re=e=>m(e.target.value),t[34]=re):re=t[34];let I;t[35]===p?I=t[36]:(I=(0,Q.jsxs)(`div`,{className:`cdv-task-field`,children:[ne,(0,Q.jsx)(de,{id:`cdv-task-title`,value:p,onChange:re,placeholder:`Short name shown on the board card`,autoComplete:`off`})]}),t[35]=p,t[36]=I);let L;t[37]===Symbol.for(`react.memo_cache_sentinel`)?(L=(0,Q.jsx)(R,{children:`Description`}),t[37]=L):L=t[37];let ie;t[38]!==b||t[39]!==C||t[40]!==g.text?(ie=(0,Q.jsx)(S,{initialValue:g.text,onChange:y,imagePaths:b,onImagePathsChange:x,files:C,onFilesChange:w,autoFocus:!0}),t[38]=b,t[39]=C,t[40]=g.text,t[41]=ie):ie=t[41];let ae;t[42]===f?ae=t[43]:(ae=f&&(0,Q.jsx)(pe,{children:`Claude already received the original prompt. Changes update this card and apply the next time it is launched from the card.`}),t[42]=f,t[43]=ae);let z;t[44]!==ie||t[45]!==ae?(z=(0,Q.jsxs)(`div`,{className:`cdv-task-field`,children:[L,ie,ae]}),t[44]=ie,t[45]=ae,t[46]=z):z=t[46];let oe;t[47]===Symbol.for(`react.memo_cache_sentinel`)?(oe=(0,Q.jsxs)(`span`,{className:`nt-shortcut`,children:[(0,Q.jsx)(k,{children:Pr?`⌘`:`Ctrl`}),(0,Q.jsx)(k,{children:`↵`}),(0,Q.jsx)(`span`,{children:`to save`})]}),t[47]=oe):oe=t[47];let se;t[48]!==r||t[49]!==a?(se=(0,Q.jsx)(O,{variant:`ghost`,onClick:r,disabled:a,children:`Cancel`}),t[48]=r,t[49]=a,t[50]=se):se=t[50];let ce=!M,le=a?`Saving...`:`Save changes`,ue;t[51]!==ce||t[52]!==le?(ue=(0,Q.jsx)(O,{type:`submit`,variant:`solid`,disabled:ce,children:le}),t[51]=ce,t[52]=le,t[53]=ue):ue=t[53];let fe;t[54]!==se||t[55]!==ue?(fe=(0,Q.jsxs)(`footer`,{className:`cdv-task-foot`,children:[oe,se,ue]}),t[54]=se,t[55]=ue,t[56]=fe):fe=t[56];let me;t[57]!==I||t[58]!==z||t[59]!==fe?(me=(0,Q.jsxs)(`div`,{className:`cdv-task cdv-task--editing`,children:[te,I,z,fe]}),t[57]=I,t[58]=z,t[59]=fe,t[60]=me):me=t[60];let he;return t[61]!==me||t[62]!==F||t[63]!==ee?(he=(0,Q.jsx)(`form`,{className:`cdv-pane cdv-scroll cdv-edit`,onSubmit:F,onKeyDown:ee,children:me}),t[61]=me,t[62]=F,t[63]=ee,t[64]=he):he=t[64],he}function Br(e){return e.updateCardTask}function Vr(e){let t=(0,kr.c)(57),{open:n,onClose:r,onSave:i,editBody:a,editSendAuto:o,editImagePaths:s}=e,[c,l]=(0,$.useState)(``),[u,d]=(0,$.useState)(!0),f;t[0]===Symbol.for(`react.memo_cache_sentinel`)?(f=[],t[0]=f):f=t[0];let[p,m]=(0,$.useState)(f),h=(0,$.useRef)(null),g=a!==void 0,v;t[1]!==a||t[2]!==s||t[3]!==o||t[4]!==n?(v=()=>{n&&(l(a??``),d(o??!0),m(s??[]),setTimeout(()=>h.current?.focus(),50))},t[1]=a,t[2]=s,t[3]=o,t[4]=n,t[5]=v):v=t[5];let y;if(t[6]===n?y=t[7]:(y=[n],t[6]=n,t[7]=y),(0,$.useEffect)(v,y),!n)return null;let x;t[8]===c?x=t[9]:(x=c.trim(),t[8]=c,t[9]=x);let S=x.length>0,C;t[10]!==c||t[11]!==S||t[12]!==p||t[13]!==r||t[14]!==i||t[15]!==u?(C=()=>{S&&(i(c.trim(),u,p.length>0?p:void 0),r())},t[10]=c,t[11]=S,t[12]=p,t[13]=r,t[14]=i,t[15]=u,t[16]=C):C=t[16];let w=C,T;t[17]!==c||t[18]!==p?(T=async e=>{let t=Array.from(e.clipboardData.items).filter(Hr);if(t.length===0)return;e.preventDefault();let n=e.currentTarget,r=n.selectionStart,i=n.selectionEnd,a=[];for(let e of t){let t=e.getAsFile();if(!t)continue;let n=new Uint8Array(await t.arrayBuffer());try{a.push(await ye(n))}catch(e){let t=e;V.setState({error:String(t)});return}}let o=p.length,s=a.map((e,t)=>_(o+t+1)).join(` `);l(c.slice(0,r)+s+c.slice(i)),m([...p,...a])},t[17]=c,t[18]=p,t[19]=T):T=t[19];let D=T,k;t[20]!==c||t[21]!==p?(k=e=>{let t=b(c,p,e);l(t.body),m(t.imagePaths)},t[20]=c,t[21]=p,t[22]=k):k=t[22];let A=k,j;t[23]===r?j=t[24]:(j=e=>!e&&r(),t[23]=r,t[24]=j);let M=g?`Edit Queued Prompt`:`Queue Prompt`,P=g?`Update the prompt text and settings.`:`Add a prompt to send to Claude later.`,F;t[25]===r?F=t[26]:(F=(0,Q.jsx)(O,{variant:`ghost`,onClick:r,children:`Cancel`}),t[25]=r,t[26]=F);let ee=!S,te=g?`Save`:`Add`,ne;t[27]!==w||t[28]!==ee||t[29]!==te?(ne=(0,Q.jsx)(O,{variant:`solid`,onClick:w,disabled:ee,children:te}),t[27]=w,t[28]=ee,t[29]=te,t[30]=ne):ne=t[30];let re;t[31]!==F||t[32]!==ne?(re=(0,Q.jsxs)(Q.Fragment,{children:[F,ne]}),t[31]=F,t[32]=ne,t[33]=re):re=t[33];let I;t[34]===w?I=t[35]:(I=e=>{(e.metaKey||e.ctrlKey)&&e.key===`Enter`&&w()},t[34]=w,t[35]=I);let L;t[36]===Symbol.for(`react.memo_cache_sentinel`)?(L=e=>l(e.target.value),t[36]=L):L=t[36];let ie;t[37]===Symbol.for(`react.memo_cache_sentinel`)?(ie={minHeight:100,maxHeight:250},t[37]=ie):ie=t[37];let R;t[38]!==c||t[39]!==D?(R=(0,Q.jsx)(Ee,{ref:h,value:c,onChange:L,onPaste:D,placeholder:`Enter your prompt...`,"aria-label":`Prompt`,className:`font-mono`,style:ie,"data-autofocus":!0}),t[38]=c,t[39]=D,t[40]=R):R=t[40];let ae;t[41]!==p||t[42]!==A?(ae=p.length>0&&(0,Q.jsx)(`div`,{className:`flex flex-wrap gap-1.5`,children:p.map((e,t)=>(0,Q.jsxs)(E,{title:e,children:[`Image #`,t+1,(0,Q.jsx)(`button`,{type:`button`,onClick:()=>A(t),"aria-label":`Remove image ${t+1}`,style:{display:`inline-flex`,background:`none`,border:0,padding:0,color:`inherit`,cursor:`pointer`},children:(0,Q.jsx)(`svg`,{width:`12`,height:`12`,fill:`none`,viewBox:`0 0 24 24`,stroke:`currentColor`,strokeWidth:2.5,strokeLinecap:`round`,children:(0,Q.jsx)(`path`,{d:`M6 18 18 6M6 6l12 12`})})})]},e))}),t[41]=p,t[42]=A,t[43]=ae):ae=t[43];let z;t[44]===u?z=t[45]:(z=(0,Q.jsx)(B,{checked:u,onCheckedChange:d,label:`Send automatically when Claude finishes`}),t[44]=u,t[45]=z);let oe;t[46]!==I||t[47]!==R||t[48]!==ae||t[49]!==z?(oe=(0,Q.jsxs)(`div`,{className:`flex flex-col gap-4`,onKeyDown:I,children:[R,ae,z]}),t[46]=I,t[47]=R,t[48]=ae,t[49]=z,t[50]=oe):oe=t[50];let se;return t[51]!==P||t[52]!==re||t[53]!==oe||t[54]!==j||t[55]!==M?(se=(0,Q.jsx)(N,{open:!0,onOpenChange:j,title:M,description:P,width:450,footer:re,children:oe}),t[51]=P,t[52]=re,t[53]=oe,t[54]=j,t[55]=M,t[56]=se):se=t[56],se}function Hr(e){return e.kind===`file`&&e.type.startsWith(`image/`)}function Ur(e){let t=(0,kr.c)(25),{prompts:n,onSendNow:r,onEdit:i,onRemove:a}=e,{theme:o}=M(),s;t[0]===o?s=t[1]:(s=ke(o),t[0]=o,t[1]=s);let c=s;if(n.length===0)return null;let l=o===`dark`?`rgba(255,255,255,0.03)`:`rgba(0,0,0,0.03)`,u=`1px solid ${c.border}`,d;t[2]!==l||t[3]!==u?(d={background:l,border:u},t[2]=l,t[3]=u,t[4]=d):d=t[4];let f;if(t[5]!==c.border||t[6]!==c.hoverBg||t[7]!==c.textDim||t[8]!==c.textSecondary||t[9]!==i||t[10]!==a||t[11]!==r||t[12]!==n){let e;t[14]!==c.border||t[15]!==c.hoverBg||t[16]!==c.textDim||t[17]!==c.textSecondary||t[18]!==i||t[19]!==a||t[20]!==r?(e=(e,t)=>(0,Q.jsxs)(`div`,{children:[t>0&&(0,Q.jsx)(`div`,{style:{height:1,background:c.border}}),(0,Q.jsxs)(`div`,{className:`flex items-start gap-2.5 px-3 py-2`,children:[(0,Q.jsx)(`span`,{className:`shrink-0 mt-0.5 text-[13px]`,style:{color:e.sendAutomatically?`#d29922`:c.textDim},title:e.sendAutomatically?`Will send automatically when Claude finishes`:`Manual send only`,children:e.sendAutomatically?`⚡`:`⏸`}),(0,Q.jsx)(`span`,{className:`flex-1 text-[12px] leading-[1.5] font-mono`,style:{color:c.textSecondary,display:`-webkit-box`,WebkitLineClamp:2,WebkitBoxOrient:`vertical`,overflow:`hidden`},children:e.body}),(0,Q.jsxs)(`div`,{className:`flex items-center gap-1 shrink-0`,children:[(0,Q.jsx)(`button`,{onClick:()=>r(e.id),className:`px-2 py-0.5 rounded-md text-[11px] font-medium transition-all duration-150`,style:{color:`var(--ink)`,border:`1px solid rgba(79,142,247,0.3)`},onMouseEnter:Kr,onMouseLeave:Gr,title:`Send this prompt now`,children:`Send`}),(0,Q.jsx)(`button`,{onClick:()=>i(e),className:`p-1 rounded-md transition-all duration-150`,style:{color:c.textDim},onMouseEnter:e=>{e.currentTarget.style.color=c.textSecondary,e.currentTarget.style.background=c.hoverBg},onMouseLeave:e=>{e.currentTarget.style.color=c.textDim,e.currentTarget.style.background=``},title:`Edit`,children:(0,Q.jsx)(`svg`,{className:`w-3 h-3`,fill:`none`,viewBox:`0 0 24 24`,stroke:`currentColor`,strokeWidth:2,children:(0,Q.jsx)(`path`,{strokeLinecap:`round`,strokeLinejoin:`round`,d:`m16.862 4.487 1.687-1.688a1.875 1.875 0 1 1 2.652 2.652L10.582 16.07a4.5 4.5 0 0 1-1.897 1.13L6 18l.8-2.685a4.5 4.5 0 0 1 1.13-1.897l8.932-8.931Z`})})}),(0,Q.jsx)(`button`,{onClick:()=>a(e.id),className:`p-1 rounded-md transition-all duration-150`,style:{color:c.textDim},onMouseEnter:Wr,onMouseLeave:e=>{e.currentTarget.style.color=c.textDim,e.currentTarget.style.background=``},title:`Remove`,children:(0,Q.jsx)(`svg`,{className:`w-3 h-3`,fill:`none`,viewBox:`0 0 24 24`,stroke:`currentColor`,strokeWidth:2.5,children:(0,Q.jsx)(`path`,{strokeLinecap:`round`,strokeLinejoin:`round`,d:`M6 18 18 6M6 6l12 12`})})})]})]})]},e.id),t[14]=c.border,t[15]=c.hoverBg,t[16]=c.textDim,t[17]=c.textSecondary,t[18]=i,t[19]=a,t[20]=r,t[21]=e):e=t[21],f=n.map(e),t[5]=c.border,t[6]=c.hoverBg,t[7]=c.textDim,t[8]=c.textSecondary,t[9]=i,t[10]=a,t[11]=r,t[12]=n,t[13]=f}else f=t[13];let p;return t[22]!==d||t[23]!==f?(p=(0,Q.jsx)(`div`,{className:`shrink-0 mx-2 mt-1 rounded-xl overflow-hidden`,style:d,children:f}),t[22]=d,t[23]=f,t[24]=p):p=t[24],p}function Wr(e){e.currentTarget.style.color=`#f85149`,e.currentTarget.style.background=`rgba(248,81,73,0.06)`}function Gr(e){e.currentTarget.style.background=``}function Kr(e){e.currentTarget.style.background=`rgba(79,142,247,0.1)`}function qr({card:e}){let[t,n]=(0,$.useState)(``),[i,a]=(0,$.useState)(!1),{stage:o,gate:s}=e.link;if(!o)return null;if(s?.status!==`pending`)return(0,Q.jsxs)(`div`,{className:`bd-gate-line`,children:[(0,Q.jsxs)(E,{tone:`outline`,children:[`AI-DLC · `,o]}),s?.status===`rejected`&&(0,Q.jsxs)(`span`,{children:[`sent back: `,s.note]})]});let c=async i=>{a(!0);try{await r(i,{cardId:e.id,note:t}),n(``)}catch(e){I({title:e instanceof Error?e.message:String(e),tone:`danger`})}finally{a(!1)}};return(0,Q.jsx)(A,{tone:`warning`,title:`Review the ${o} stage`,description:s.note,action:(0,Q.jsxs)(`div`,{className:`bd-kb-actions`,children:[(0,Q.jsx)(de,{"aria-label":`Note for the agent`,placeholder:`Note (required to send back)`,value:t,onChange:e=>n(e.target.value)}),(0,Q.jsx)(O,{variant:`solid`,size:`sm`,loading:i,onClick:()=>c(`gate_approve`),children:`Approve`}),(0,Q.jsx)(O,{size:`sm`,disabled:i||!t.trim(),onClick:()=>c(`gate_reject`),children:`Send back`})]})})}var Jr=()=>{};function Yr(e){let t=(0,kr.c)(21),{card:n,data:r}=e,i,a,o,s,c;if(t[0]!==n||t[1]!==r.injected||t[2]!==r.proposals||t[3]!==r.review){let e=r.proposals.filter($r),l=r.proposals.filter(Qr);i=`cdv-kb`,t[9]!==n||t[10]!==r.review?(a=r.review.length>0&&(0,Q.jsx)(ei,{title:`May be outdated`,hint:`Entries about files this task changed, written before the change.`,children:r.review.map(e=>(0,Q.jsx)(ti,{hit:e,card:n,onChanged:Jr},e.entry.id))}),t[9]=n,t[10]=r.review,t[11]=a):a=t[11],o=e.length>0&&(0,Q.jsx)(ei,{title:`Proposed by this task`,hint:`Approving opens a pull request in the harness repository.`,children:e.map(Zr)}),t[12]!==n||t[13]!==r.injected?(s=r.injected.length>0&&(0,Q.jsx)(ei,{title:`Given to this task`,hint:`Injected when its session started.`,children:r.injected.map(e=>(0,Q.jsx)(ti,{hit:e,card:n,onChanged:Jr},e.entry.id))}),t[12]=n,t[13]=r.injected,t[14]=s):s=t[14],c=l.length>0&&(0,Q.jsx)(ei,{title:`Decided`,children:l.map(Xr)}),t[0]=n,t[1]=r.injected,t[2]=r.proposals,t[3]=r.review,t[4]=i,t[5]=a,t[6]=o,t[7]=s,t[8]=c}else i=t[4],a=t[5],o=t[6],s=t[7],c=t[8];let l;return t[15]!==i||t[16]!==a||t[17]!==o||t[18]!==s||t[19]!==c?(l=(0,Q.jsxs)(`div`,{className:i,children:[a,o,s,c]}),t[15]=i,t[16]=a,t[17]=o,t[18]=s,t[19]=c,t[20]=l):l=t[20],l}function Xr(e){return(0,Q.jsx)(Me,{proposal:e,onChanged:Jr,showSourceCard:!1},e.id)}function Zr(e){return(0,Q.jsx)(Me,{proposal:e,onChanged:Jr,showSourceCard:!1},e.id)}function Qr(e){return e.status!==`pending`}function $r(e){return e.status===`pending`}function ei(e){let t=(0,kr.c)(17),{title:n,hint:r,children:i}=e,a;t[0]===i?a=t[1]:(a=$.Children.count(i),t[0]=i,t[1]=a);let o;t[2]===a?o=t[3]:(o=(0,Q.jsx)(`span`,{className:`cdv-kb-count`,children:a}),t[2]=a,t[3]=o);let s;t[4]!==o||t[5]!==n?(s=(0,Q.jsxs)(`h3`,{className:`cdv-kb-title`,children:[n,o]}),t[4]=o,t[5]=n,t[6]=s):s=t[6];let c;t[7]===r?c=t[8]:(c=r&&(0,Q.jsx)(`p`,{className:`cdv-kb-hint`,children:r}),t[7]=r,t[8]=c);let l;t[9]!==s||t[10]!==c?(l=(0,Q.jsxs)(`header`,{className:`cdv-kb-head`,children:[s,c]}),t[9]=s,t[10]=c,t[11]=l):l=t[11];let u;t[12]===i?u=t[13]:(u=(0,Q.jsx)(`div`,{className:`cdv-kb-group`,children:i}),t[12]=i,t[13]=u);let d;return t[14]!==l||t[15]!==u?(d=(0,Q.jsxs)(`section`,{className:`cdv-kb-section`,children:[l,u]}),t[14]=l,t[15]=u,t[16]=d):d=t[16],d}function ti(e){let t=(0,kr.c)(42),{hit:n,card:r,onChanged:i}=e,a=n.entry,[o,s]=(0,$.useState)(!1),[c,l]=(0,$.useState)(!1),u=n.stale||void 0,d;t[0]===a.type?d=t[1]:(d=(0,Q.jsx)(E,{children:a.type}),t[0]=a.type,t[1]=d);let f;t[2]===n.stale?f=t[3]:(f=n.stale&&(0,Q.jsx)(E,{tone:`warning`,children:`may be outdated`}),t[2]=n.stale,t[3]=f);let p;t[4]===Symbol.for(`react.memo_cache_sentinel`)?(p=()=>s(ii),t[4]=p):p=t[4];let m=o?`Hide`:`Read`,h;t[5]!==o||t[6]!==m?(h=(0,Q.jsx)(O,{variant:`ghost`,size:`sm`,onClick:p,"aria-expanded":o,children:m}),t[5]=o,t[6]=m,t[7]=h):h=t[7];let g;t[8]===Symbol.for(`react.memo_cache_sentinel`)?(g=()=>l(ri),t[8]=g):g=t[8];let _;t[9]===c?_=t[10]:(_=(0,Q.jsx)(O,{variant:`ghost`,size:`sm`,onClick:g,"aria-expanded":c,children:`Propose correction`}),t[9]=c,t[10]=_);let v;t[11]!==h||t[12]!==_?(v=(0,Q.jsxs)(`div`,{className:`kbe-actions`,children:[h,_]}),t[11]=h,t[12]=_,t[13]=v):v=t[13];let y;t[14]!==d||t[15]!==f||t[16]!==v?(y=(0,Q.jsxs)(`div`,{className:`kbe-head`,children:[d,f,v]}),t[14]=d,t[15]=f,t[16]=v,t[17]=y):y=t[17];let b;t[18]===a.title?b=t[19]:(b=(0,Q.jsx)(`h4`,{className:`kbe-title`,children:a.title}),t[18]=a.title,t[19]=b);let x;t[20]===a.summary?x=t[21]:(x=(0,Q.jsx)(`p`,{className:`kbe-summary`,children:a.summary}),t[20]=a.summary,t[21]=x);let S;t[22]!==a.id||t[23]!==a.kbId||t[24]!==a.scope?(S=a.scope.length>0&&(0,Q.jsx)(`ul`,{className:`kbe-scope`,"aria-label":`About`,title:`${a.kbId} · ${a.id}`,children:a.scope.map(ni)}),t[22]=a.id,t[23]=a.kbId,t[24]=a.scope,t[25]=S):S=t[25];let C;t[26]!==a.body||t[27]!==o?(C=o&&(0,Q.jsx)(`pre`,{className:`kbe-body`,children:a.body}),t[26]=a.body,t[27]=o,t[28]=C):C=t[28];let w;t[29]!==r||t[30]!==a||t[31]!==c||t[32]!==i?(w=c&&(0,Q.jsx)(ai,{entry:a,cardId:r.id,onDone:()=>{l(!1),i()}}),t[29]=r,t[30]=a,t[31]=c,t[32]=i,t[33]=w):w=t[33];let T;return t[34]!==u||t[35]!==y||t[36]!==b||t[37]!==x||t[38]!==S||t[39]!==C||t[40]!==w?(T=(0,Q.jsxs)(`article`,{className:`kbe`,"data-stale":u,children:[y,b,x,S,C,w]}),t[34]=u,t[35]=y,t[36]=b,t[37]=x,t[38]=S,t[39]=C,t[40]=w,t[41]=T):T=t[41],T}function ni(e){return(0,Q.jsx)(`li`,{children:e},e)}function ri(e){return!e}function ii(e){return!e}function ai({entry:e,cardId:t,onDone:n}){let i={title:e.title,summary:e.summary,body:e.body},[a,o]=(0,$.useState)(i),[s,c]=(0,$.useState)(!1);return(0,Q.jsxs)(Q.Fragment,{children:[(0,Q.jsx)(je,{id:`fix-${e.id}`,value:a,onChange:o}),(0,Q.jsx)(`div`,{className:`bd-kb-actions`,children:(0,Q.jsx)(O,{variant:`solid`,loading:s,disabled:Ae(a,i),onClick:async()=>{c(!0);try{await r(`kb_propose`,{kbId:e.kbId,type:e.type,...a,scope:e.scope,supersedes:[e.id],source:{cardId:t},reason:`Corrects ${e.id}`}),I({title:`Correction proposed`,description:`It replaces the old entry once approved.`,tone:`success`}),n()}catch(e){I({title:e instanceof Error?e.message:String(e),tone:`danger`})}finally{c(!1)}},children:`Propose`})})]})}var oi=[{value:`normal`,label:`Normal`,hint:`Claude works on the description as written`},{value:`full`,label:`Full workflow`,hint:`Requirements, design, implementation, review and PR, each with its skill or reviewer`}],si="Run the full team workflow for this task. Invoke each skill or subagent by name; do not skip a stage.\n1. `aidlc-requirements`: turn the description into requirements and acceptance criteria.\n2. `aidlc-design`: write the design before any code.\n3. `aidlc-implement`: implement it with tests and run the project's checks.\n4. Run the `code-reviewer` subagent on the diff and fix what it finds. If the change touches auth, input parsing, file paths, process execution, network endpoints or secrets, also run `security-reviewer`.\n5. `aidlc-pr`: prepare the pull request. Do not push or open it until I confirm.\nStop and ask me whenever a stage leaves an open question.";function ci(e,t){return t===`full`?`${e}\n\n---\n${si}`:e}var li=[{value:``,label:`Default`,hint:`Whatever Claude Code or the API service picks`},{value:`opus`,label:`Opus`,hint:`Most capable — hardest tasks`},{value:`sonnet`,label:`Sonnet`,hint:`Balanced speed and quality`},{value:`haiku`,label:`Haiku`,hint:`Fastest and cheapest`},{value:`opusplan`,label:`Opus plan → Sonnet`,hint:`Opus plans, Sonnet implements`},{value:`__custom`,label:`Custom…`,hint:`A full model id`}],ui=/^[\w.\-:/[\]]+$/,di=/^[A-Z_][A-Z0-9_]*=/i,fi=typeof navigator<`u`&&/Mac/i.test(navigator.platform);function pi(e){let t=(0,kr.c)(173),{projectPath:n,initialPrompt:r,canCreateWorktree:i,initialSkipPermissions:a,buildCommand:o,onLaunch:s,onCancel:c,runtime:l,onRuntimeChange:d,windowsLabel:f}=e,p=f===void 0?`Windows`:f,h;t[0]===r?h=t[1]:(h=()=>u(r),t[0]=r,t[1]=h);let[g]=(0,$.useState)(h),[_,y]=(0,$.useState)(g.text),[b,x]=(0,$.useState)(g.files),[S,C]=(0,$.useState)(`normal`),E;t[2]!==b||t[3]!==S||t[4]!==_?(E=ci(v(_,b),S),t[2]=b,t[3]=S,t[4]=_,t[5]=E):E=t[5];let D=E,[k,A]=(0,$.useState)(``),[j,M]=(0,$.useState)(a),[N,P]=(0,$.useState)(``),[F,ee]=(0,$.useState)(``),[te,ne]=(0,$.useState)(``),[re,I]=(0,$.useState)(!1),[L,ie]=(0,$.useState)(!1),[R,ae]=(0,$.useState)(``),[z,se]=(0,$.useState)(!1),ce=(0,$.useRef)(null),ue;t[6]===te?ue=t[7]:(ue=te.split(`
|
|
16
|
+
`).map(bi).filter(yi),t[6]=te,t[7]=ue);let pe=ue,he;t[8]===pe?he=t[9]:(he=pe.filter(vi),t[8]=pe,t[9]=he);let ge=he,B=pe.length-ge.length,V;t[10]!==F||t[11]!==N?(V=N===`__custom`&&F.trim()!==``&&!ui.test(F.trim()),t[10]=F,t[11]=N,t[12]=V):V=t[12];let _e=V,ve;t[13]!==_e||t[14]!==F||t[15]!==N?(ve=N===`__custom`?_e?``:F.trim():N,t[13]=_e,t[14]=F,t[15]=N,t[16]=ve):ve=t[16];let ye=ve,be=i?k:``,xe;t[17]!==o||t[18]!==ge||t[19]!==ye||t[20]!==D||t[21]!==j||t[22]!==be?(xe=o({prompt:D,worktreeBranch:be,dangerouslySkipPermissions:j,envPrefix:ge,model:ye}),t[17]=o,t[18]=ge,t[19]=ye,t[20]=D,t[21]=j,t[22]=be,t[23]=xe):xe=t[23];let Se=xe,we,Te;t[24]!==z||t[25]!==Se?(we=()=>{z||ae(Se)},Te=[Se,z],t[24]=z,t[25]=Se,t[26]=we,t[27]=Te):(we=t[26],Te=t[27]),(0,$.useEffect)(we,Te);let Oe,ke;t[28]===Symbol.for(`react.memo_cache_sentinel`)?(Oe=()=>{ce.current?.focus()},ke=[],t[28]=Oe,t[29]=ke):(Oe=t[28],ke=t[29]),(0,$.useEffect)(Oe,ke);let Ae;t[30]===Se?Ae=t[31]:(Ae=e=>{ae(e),se(e!==Se)},t[30]=Se,t[31]=Ae);let je=Ae,Me;t[32]===Se?Me=t[33]:(Me=()=>{se(!1),ae(Se)},t[32]=Se,t[33]=Me);let Ne=Me,Pe;t[34]!==R||t[35]!==_e||t[36]!==D?(Pe=D.trim().length>0&&R.trim().length>0&&!_e,t[34]=R,t[35]=_e,t[36]=D,t[37]=Pe):Pe=t[37];let Fe=Pe,Ie;t[38]!==Fe||t[39]!==z||t[40]!==R||t[41]!==ge||t[42]!==ye||t[43]!==s||t[44]!==D||t[45]!==j||t[46]!==k?(Ie=()=>{Fe&&s({prompt:D.trim(),worktreeBranch:k.trim(),dangerouslySkipPermissions:j,envPrefix:ge,model:ye,commandOverride:z?R:null})},t[38]=Fe,t[39]=z,t[40]=R,t[41]=ge,t[42]=ye,t[43]=s,t[44]=D,t[45]=j,t[46]=k,t[47]=Ie):Ie=t[47];let Le=Ie,Re;t[48]!==c||t[49]!==Le?(Re=e=>{e.key===`Enter`&&(e.ctrlKey||e.metaKey)?(e.preventDefault(),Le()):e.key===`Escape`&&(e.preventDefault(),c())},t[48]=c,t[49]=Le,t[50]=Re):Re=t[50];let ze=Re,Be;t[51]===S?Be=t[52]:(Be=oi.find(e=>e.value===S)?.hint,t[51]=S,t[52]=Be);let Ve=Be,He;t[53]===N?He=t[54]:(He=li.find(e=>e.value===N)?.hint,t[53]=N,t[54]=He);let Ue=He,We;t[55]===Symbol.for(`react.memo_cache_sentinel`)?(We=(0,Q.jsx)(`label`,{htmlFor:`ls-prompt`,children:`Description`}),t[55]=We):We=t[55];let Ge;t[56]===Symbol.for(`react.memo_cache_sentinel`)?(Ge=(0,Q.jsx)(fe,{size:13,strokeWidth:2,"aria-hidden":!0}),t[56]=Ge):Ge=t[56];let Ke;t[57]===n?Ke=t[58]:(Ke=(0,Q.jsx)(`span`,{children:n}),t[57]=n,t[58]=Ke);let qe;t[59]!==n||t[60]!==Ke?(qe=(0,Q.jsxs)(`div`,{className:`ls-fieldhead`,children:[We,(0,Q.jsxs)(`span`,{className:`ls-cwd`,title:n,children:[Ge,Ke]})]}),t[59]=n,t[60]=Ke,t[61]=qe):qe=t[61];let Je;t[62]===Symbol.for(`react.memo_cache_sentinel`)?(Je=e=>y(e.target.value),t[62]=Je):Je=t[62];let Ye;t[63]===_?Ye=t[64]:(Ye=(0,Q.jsx)(Ee,{id:`ls-prompt`,ref:ce,className:`ls-prompt`,value:_,onChange:Je,placeholder:`What should Claude work on?`,spellCheck:!1}),t[63]=_,t[64]=Ye);let Xe;t[65]===b?Xe=t[66]:(Xe=b.length>0&&(0,Q.jsx)(`ul`,{className:`ls-files`,"aria-label":`Attached files`,children:b.map(e=>(0,Q.jsxs)(`li`,{className:`ls-file`,title:e.path,children:[(0,Q.jsx)(m,{size:14,strokeWidth:2,"aria-hidden":!0}),(0,Q.jsx)(`span`,{children:e.name}),(0,Q.jsx)(`button`,{type:`button`,onClick:()=>x(t=>t.filter(t=>t.path!==e.path)),"aria-label":`Remove ${e.name}`,children:(0,Q.jsx)(T,{size:12,strokeWidth:2.5,"aria-hidden":!0})})]},e.path))}),t[65]=b,t[66]=Xe);let Ze;t[67]!==qe||t[68]!==Ye||t[69]!==Xe?(Ze=(0,Q.jsxs)(`section`,{className:`ls-field ls-main`,children:[qe,Ye,Xe]}),t[67]=qe,t[68]=Ye,t[69]=Xe,t[70]=Ze):Ze=t[70];let Qe;t[71]!==d||t[72]!==l||t[73]!==p?(Qe=l&&d&&(0,Q.jsxs)(`div`,{className:`ls-set`,children:[(0,Q.jsxs)(`div`,{className:`ls-set-text`,children:[(0,Q.jsx)(`span`,{className:`ls-set-name`,id:`ls-runtime-label`,children:`Run in`}),(0,Q.jsx)(`small`,{children:`Where the Claude process starts.`})]}),(0,Q.jsx)(oe,{className:`ls-seg`,value:l,onValueChange:e=>d(e),"aria-labelledby":`ls-runtime-label`,children:(0,Q.jsxs)(le,{children:[(0,Q.jsx)(me,{value:`windows`,children:p}),(0,Q.jsx)(me,{value:`wsl`,children:`WSL`})]})})]}),t[71]=d,t[72]=l,t[73]=p,t[74]=Qe):Qe=t[74];let $e;t[75]===Symbol.for(`react.memo_cache_sentinel`)?($e=(0,Q.jsx)(`label`,{className:`ls-set-name`,htmlFor:`ls-mode`,children:`Mode`}),t[75]=$e):$e=t[75];let et;t[76]===Ve?et=t[77]:(et=(0,Q.jsxs)(`div`,{className:`ls-set-text`,children:[$e,(0,Q.jsx)(`small`,{children:Ve})]}),t[76]=Ve,t[77]=et);let tt,nt;t[78]===Symbol.for(`react.memo_cache_sentinel`)?(tt=e=>C(e),nt=oi.map(_i),t[78]=tt,t[79]=nt):(tt=t[78],nt=t[79]);let rt;t[80]===S?rt=t[81]:(rt=(0,Q.jsx)(Ce,{id:`ls-mode`,className:`ls-ctl`,value:S,onValueChange:tt,options:nt}),t[80]=S,t[81]=rt);let it;t[82]!==et||t[83]!==rt?(it=(0,Q.jsxs)(`div`,{className:`ls-set`,children:[et,rt]}),t[82]=et,t[83]=rt,t[84]=it):it=t[84];let at;t[85]===Symbol.for(`react.memo_cache_sentinel`)?(at=(0,Q.jsx)(`label`,{className:`ls-set-name`,htmlFor:`ls-model`,children:`Model`}),t[85]=at):at=t[85];let H=N===`__custom`?`A full model id.`:Ue,ot;t[86]===H?ot=t[87]:(ot=(0,Q.jsxs)(`div`,{className:`ls-set-text`,children:[at,(0,Q.jsx)(`small`,{children:H})]}),t[86]=H,t[87]=ot);let st;t[88]===Symbol.for(`react.memo_cache_sentinel`)?(st=li.map(gi),t[88]=st):st=t[88];let U;t[89]===N?U=t[90]:(U=(0,Q.jsx)(Ce,{id:`ls-model`,className:`ls-ctl`,value:N,onValueChange:P,options:st}),t[89]=N,t[90]=U);let W;t[91]!==ot||t[92]!==U?(W=(0,Q.jsxs)(`div`,{className:`ls-set`,children:[ot,U]}),t[91]=ot,t[92]=U,t[93]=W):W=t[93];let ct;t[94]!==_e||t[95]!==F||t[96]!==N?(ct=N===`__custom`&&(0,Q.jsxs)(`div`,{className:`ls-sub`,children:[(0,Q.jsx)(de,{className:`ls-line`,value:F,onChange:e=>ee(e.target.value),placeholder:`claude-opus-4-1`,"aria-label":`Custom model id`,"aria-invalid":_e||void 0,spellCheck:!1}),_e&&(0,Q.jsx)(`small`,{"data-warn":!0,children:`Model ids can only use letters, digits and . - _ : / [ ]`})]}),t[94]=_e,t[95]=F,t[96]=N,t[97]=ct):ct=t[97];let G;t[98]!==i||t[99]!==k?(G=i&&(0,Q.jsxs)(`div`,{className:`ls-set`,children:[(0,Q.jsxs)(`div`,{className:`ls-set-text`,children:[(0,Q.jsx)(`label`,{className:`ls-set-name`,htmlFor:`ls-branch`,children:`Worktree branch`}),(0,Q.jsx)(`small`,{children:`Optional. Creates a git worktree.`})]}),(0,Q.jsx)(de,{id:`ls-branch`,className:`ls-line ls-ctl`,value:k,onChange:e=>A(e.target.value),placeholder:`feat/ksuid`,spellCheck:!1})]}),t[98]=i,t[99]=k,t[100]=G):G=t[100];let K=j||void 0,lt;t[101]===Symbol.for(`react.memo_cache_sentinel`)?(lt=(0,Q.jsx)(`span`,{className:`ls-set-name`,children:`Skip permission prompts`}),t[101]=lt):lt=t[101];let q=j?`Claude can edit files and run commands without asking.`:`Claude asks before editing files or running commands.`,ut;t[102]===q?ut=t[103]:(ut=(0,Q.jsxs)(`span`,{className:`ls-set-text`,children:[lt,(0,Q.jsx)(`small`,{children:q})]}),t[102]=q,t[103]=ut);let dt;t[104]===j?dt=t[105]:(dt=(0,Q.jsx)(De,{id:`ls-skip`,checked:j,onCheckedChange:M}),t[104]=j,t[105]=dt);let ft;t[106]!==K||t[107]!==ut||t[108]!==dt?(ft=(0,Q.jsxs)(`label`,{className:`ls-set ls-set--click`,htmlFor:`ls-skip`,"data-danger":K,children:[ut,dt]}),t[106]=K,t[107]=ut,t[108]=dt,t[109]=ft):ft=t[109];let pt=re||void 0,mt,ht;t[110]===Symbol.for(`react.memo_cache_sentinel`)?(mt=()=>I(hi),ht=(0,Q.jsx)(`span`,{className:`ls-set-name`,children:`Environment variables`}),t[110]=mt,t[111]=ht):(mt=t[110],ht=t[111]);let gt;t[112]===ge.length?gt=t[113]:(gt=ge.length>0&&(0,Q.jsx)(`b`,{children:ge.length}),t[112]=ge.length,t[113]=gt);let _t;t[114]===Symbol.for(`react.memo_cache_sentinel`)?(_t=(0,Q.jsx)(w,{size:14,strokeWidth:2.5,"aria-hidden":!0}),t[114]=_t):_t=t[114];let vt;t[115]!==re||t[116]!==gt?(vt=(0,Q.jsxs)(`button`,{type:`button`,className:`ls-foldhead`,"aria-expanded":re,onClick:mt,children:[ht,gt,_t]}),t[115]=re,t[116]=gt,t[117]=vt):vt=t[117];let yt;t[118]!==B||t[119]!==re||t[120]!==te?(yt=re&&(0,Q.jsxs)(`div`,{className:`ls-foldbody`,children:[(0,Q.jsx)(Ee,{className:`ls-env-input`,value:te,onChange:e=>ne(e.target.value),placeholder:`ANTHROPIC_API_KEY=sk-...`,"aria-label":`Environment variables, one KEY=value per line`,spellCheck:!1,autoFocus:!0}),(0,Q.jsx)(`small`,{"data-warn":B>0||void 0,children:B>0?`${B} line${B===1?``:`s`} ignored — use KEY=value.`:`One KEY=value per line, set before claude starts.`})]}),t[118]=B,t[119]=re,t[120]=te,t[121]=yt):yt=t[121];let bt;t[122]!==pt||t[123]!==vt||t[124]!==yt?(bt=(0,Q.jsxs)(`div`,{className:`ls-fold`,"data-open":pt,children:[vt,yt]}),t[122]=pt,t[123]=vt,t[124]=yt,t[125]=bt):bt=t[125];let xt=L||void 0,St,Ct;t[126]===Symbol.for(`react.memo_cache_sentinel`)?(St=()=>ie(mi),Ct=(0,Q.jsx)(`span`,{className:`ls-set-name`,children:`Command`}),t[126]=St,t[127]=Ct):(St=t[126],Ct=t[127]);let wt;t[128]===z?wt=t[129]:(wt=z&&(0,Q.jsx)(`span`,{className:`ls-edited`,children:`Edited`}),t[128]=z,t[129]=wt);let Tt;t[130]!==L||t[131]!==R?(Tt=!L&&(0,Q.jsx)(`code`,{className:`ls-cmdpeek`,children:R.replace(/\s+/g,` `)}),t[130]=L,t[131]=R,t[132]=Tt):Tt=t[132];let Et;t[133]===Symbol.for(`react.memo_cache_sentinel`)?(Et=(0,Q.jsx)(w,{size:14,strokeWidth:2.5,"aria-hidden":!0}),t[133]=Et):Et=t[133];let Dt;t[134]!==L||t[135]!==wt||t[136]!==Tt?(Dt=(0,Q.jsxs)(`button`,{type:`button`,className:`ls-foldhead`,"aria-expanded":L,"aria-controls":`ls-cmd`,onClick:St,children:[Ct,wt,Tt,Et]}),t[134]=L,t[135]=wt,t[136]=Tt,t[137]=Dt):Dt=t[137];let J;t[138]!==L||t[139]!==z||t[140]!==R||t[141]!==je||t[142]!==Ne?(J=L&&(0,Q.jsxs)(`div`,{className:`ls-foldbody`,children:[(0,Q.jsxs)(`div`,{className:`ls-cmd`,"data-edited":z||void 0,children:[(0,Q.jsx)(`span`,{"aria-hidden":!0,children:`$`}),(0,Q.jsx)(`textarea`,{id:`ls-cmd`,className:`ls-cmd-input`,value:R,onChange:e=>je(e.target.value),spellCheck:!1,rows:3,"aria-label":`Launch command`})]}),(0,Q.jsxs)(`div`,{className:`ls-cmdfoot`,children:[(0,Q.jsx)(`span`,{className:z?`ls-edited`:`ls-auto`,children:z?`Edited by hand — the options above no longer apply.`:`Follows the options above.`}),z&&(0,Q.jsx)(`button`,{type:`button`,className:`ls-reset`,onClick:Ne,children:`Reset`})]})]}),t[138]=L,t[139]=z,t[140]=R,t[141]=je,t[142]=Ne,t[143]=J):J=t[143];let Y;t[144]!==xt||t[145]!==Dt||t[146]!==J?(Y=(0,Q.jsxs)(`div`,{className:`ls-fold`,"data-open":xt,children:[Dt,J]}),t[144]=xt,t[145]=Dt,t[146]=J,t[147]=Y):Y=t[147];let Ot;t[148]!==Qe||t[149]!==it||t[150]!==W||t[151]!==ct||t[152]!==G||t[153]!==ft||t[154]!==bt||t[155]!==Y?(Ot=(0,Q.jsxs)(`div`,{className:`ls-list`,children:[Qe,it,W,ct,G,ft,bt,Y]}),t[148]=Qe,t[149]=it,t[150]=W,t[151]=ct,t[152]=G,t[153]=ft,t[154]=bt,t[155]=Y,t[156]=Ot):Ot=t[156];let X;t[157]!==Ze||t[158]!==Ot?(X=(0,Q.jsx)(`div`,{className:`ls-scroll`,children:(0,Q.jsxs)(`div`,{className:`ls-form`,children:[Ze,Ot]})}),t[157]=Ze,t[158]=Ot,t[159]=X):X=t[159];let kt;t[160]===Symbol.for(`react.memo_cache_sentinel`)?(kt=(0,Q.jsxs)(`span`,{className:`ls-hint`,children:[(0,Q.jsx)(`kbd`,{children:fi?`⌘`:`Ctrl`}),(0,Q.jsx)(`kbd`,{children:`↵`}),` launch`]}),t[160]=kt):kt=t[160];let At;t[161]===c?At=t[162]:(At=(0,Q.jsx)(O,{variant:`ghost`,onClick:c,children:`Cancel`}),t[161]=c,t[162]=At);let jt=!Fe,Mt;t[163]!==Le||t[164]!==jt?(Mt=(0,Q.jsx)(O,{variant:`solid`,onClick:Le,disabled:jt,children:`Launch Claude`}),t[163]=Le,t[164]=jt,t[165]=Mt):Mt=t[165];let Z;t[166]!==At||t[167]!==Mt?(Z=(0,Q.jsxs)(`div`,{className:`ls-bar`,children:[kt,(0,Q.jsxs)(`div`,{className:`ls-bar-actions`,children:[At,Mt]})]}),t[166]=At,t[167]=Mt,t[168]=Z):Z=t[168];let Nt;return t[169]!==ze||t[170]!==X||t[171]!==Z?(Nt=(0,Q.jsxs)(`div`,{className:`cdv-pane cdv-pane--fade ls`,onKeyDown:ze,children:[X,Z]}),t[169]=ze,t[170]=X,t[171]=Z,t[172]=Nt):Nt=t[172],Nt}function mi(e){return!e}function hi(e){return!e}function gi(e){return{value:e.value,label:e.label}}function _i(e){return{value:e.value,label:e.label}}function vi(e){return di.test(e)}function yi(e){return e.length>0}function bi(e){return e.trim()}function xi({onInstalled:t}){let[n,i]=(0,$.useState)(null),[a,o]=(0,$.useState)(!1),[s,c]=(0,$.useState)(``),[l,u]=(0,$.useState)(null);return(0,$.useEffect)(()=>{let t=!1;r(`psmux_status`).then(e=>{t||(i(e),o(e.installing))}).catch(()=>{});let n=e(`psmux-install-progress`,e=>{e.payload?.line&&c(e.payload.line)});return()=>{t=!0,n.then(e=>e())}},[]),!n||!n.supported||n.available?null:(0,Q.jsxs)(`div`,{className:`cdv-psmux`,role:`status`,children:[(0,Q.jsxs)(`div`,{className:`cdv-psmux-copy`,children:[(0,Q.jsx)(`strong`,{children:`Keep this terminal alive`}),(0,Q.jsxs)(`span`,{children:[`Install psmux so closing the card or reloading the page doesn't end the session.`,l&&(0,Q.jsxs)(`span`,{className:`cdv-psmux-error`,children:[` `,l]})]}),a&&s&&(0,Q.jsx)(`code`,{className:`cdv-psmux-log`,children:s})]}),n.canInstall?(0,Q.jsxs)(O,{size:`sm`,variant:`solid`,disabled:a,onClick:async()=>{o(!0),u(null),c(``);try{let e=await r(`psmux_install`);i(e),I({title:`psmux installed`,description:e.version,tone:`success`}),t?.()}catch(e){u(e instanceof Error?e.message:String(e))}finally{o(!1)}},children:[a?(0,Q.jsx)(D,{}):null,a?`Installing…`:`Install psmux`]}):(0,Q.jsx)(`code`,{className:`cdv-psmux-log`,children:`winget install psmux`})]})}var Si=(0,$.lazy)(()=>be(()=>import(`./Terminal-DJJcg-t6.js`),__vite__mapDeps([0,1,2,3,4,5,6]))),Ci=(0,$.lazy)(()=>be(()=>import(`./DiffPane-bQsGoT7y.js`),__vite__mapDeps([7,1,3,8,9,2,4,5,10]))),wi={terminal:`Terminal`,trace:`Trace`,usage:`Usage`,diff:`Diff`,issue:`Issue`,pr:`PR`,prompt:`Description`,knowledge:`Knowledge`},Ti=[`prompt`,`terminal`,`trace`,`usage`,`diff`,`issue`,`pr`,`knowledge`];function Ei(e){let t=(0,kr.c)(7),{d:n,size:r,sw:i}=e,a=r===void 0?16:r,o=i===void 0?2:i,s;t[0]===Symbol.for(`react.memo_cache_sentinel`)?(s={flex:`none`},t[0]=s):s=t[0];let c;t[1]===n?c=t[2]:(c=(0,Q.jsx)(`path`,{strokeLinecap:`round`,strokeLinejoin:`round`,d:n}),t[1]=n,t[2]=c);let l;return t[3]!==a||t[4]!==o||t[5]!==c?(l=(0,Q.jsx)(`svg`,{width:a,height:a,fill:`none`,viewBox:`0 0 24 24`,stroke:`currentColor`,strokeWidth:o,"aria-hidden":`true`,style:s,children:c}),t[3]=a,t[4]=o,t[5]=c,t[6]=l):l=t[6],l}async function Di(e,t){let n=[],r=null,i=0;for(;;){let a=await j(e,i);if(t()||(n.push(...a.turns),r=a,!a.hasMore))break;i=a.nextOffset}return{turns:n,lastPage:r}}function Oi(e){return!e||e.link.promptBody?`prompt`:e.link.sessionLink?.sessionId?`terminal`:`trace`}function ki(e){let t=``;for(let n of new TextEncoder().encode(e))t+=String.fromCharCode(n);return btoa(t)}function Ai(e){return e.toLowerCase().replace(/[^a-z0-9_-]+/g,`-`).replace(/-+/g,`-`).replace(/^-|-$/g,``).slice(0,32).replace(/-+$/,``)||`card`}function ji(e){if(!e.length)return``;let t=`\x1B[0m`,n=`\x1B[2m`,r=[],i=e=>e.replace(/\r\n|\r|\n/g,`\r
|
|
17
|
+
`);for(let a of e){let e=a.timestamp?new Date(a.timestamp).toLocaleString():``,o=a.role===`user`?`[36m▶ user${t}`:`[35m◀ assistant${t}`;r.push(`${o}${e?` ${n}· ${e}${t}`:``}`);for(let e of a.contentBlocks)if(e.kind===`text`)r.push(i(e.text));else if(e.kind===`thinking`){let a=e.text.length>240?e.text.slice(0,240)+`…`:e.text;r.push(`${n}[thinking] ${i(a)}${t}`)}else if(e.kind===`tool_use`)r.push(`${n}⚙ ${i(e.text)}${t}`);else if(e.kind===`tool_result`){let a=e.text.length>400?e.text.slice(0,400)+`…`:e.text;r.push(`${n}↳ ${i(a)}${t}`)}r.push(``)}return r.push(`${n}── session resumes below ──${t}`),r.push(``),r.join(`\r
|
|
18
|
+
`)}var Mi=200,Ni=`cubic-bezier(0.22, 1, 0.36, 1)`,Pi=28,Fi=[{opacity:0,transform:`translateY(16px) scale(0.97)`},{opacity:1,transform:`none`}];function Ii({mode:t=`popup`}){let n=t===`popup`,i=(0,$.useRef)(null),a=V(e=>e.selectedCard),o=V(e=>e.selectCard),s=V(e=>e.renameCard),c=V(e=>e.deleteCard),u=V(e=>e.moveCard);V(e=>e.cards),V(e=>e.selectedCardId);let d=a(),{theme:f}=M(),p=ke(f),[m,g]=(0,$.useState)(()=>Oi(d)),_=z(d?.id),v=_?.proposals.filter(e=>e.status===`pending`).length??0,y=!!_&&_.proposals.length+_.injected.length+_.review.length>0,b=(0,$.useRef)(!1),[x,S]=(0,$.useState)(!1),[C,w]=(0,$.useState)(d?.id);d?.id!==C&&(w(d?.id),g(Oi(d)),S(!1));let[T,k]=(0,$.useState)([]),[A,N]=(0,$.useState)(null),[I,R]=(0,$.useState)(!1),[de,fe]=(0,$.useState)(!1),[pe,he]=(0,$.useState)(``),[B,ye]=(0,$.useState)(!1),[be,we]=(0,$.useState)(!1),[Ee,De]=(0,$.useState)(0),[Oe,Ae]=(0,$.useState)(720),je=(0,$.useRef)(!1),[Me,Ne]=(0,$.useState)(!1),[Pe,Fe]=(0,$.useState)(null),[Le,ze]=(0,$.useState)([]),Ve=(0,$.useRef)(null),[Ue,Ge]=(0,$.useState)(15),[qe,Ye]=(0,$.useState)(12),[Xe,Ze]=(0,$.useState)([]),[Qe,$e]=(0,$.useState)({}),[et,tt]=(0,$.useState)(!1),[nt,rt]=(0,$.useState)(null),[it,at]=(0,$.useState)(null),[H,ot]=(0,$.useState)(!1),[st,U]=(0,$.useState)(null),[W,ct]=(0,$.useState)([]),[G,K]=(0,$.useState)(1),[lt,q]=(0,$.useState)(``),[ut,dt]=(0,$.useState)([]),[ft,pt]=(0,$.useState)(0),[mt,ht]=(0,$.useState)(!1),gt=(0,$.useRef)(null),[_t,vt]=(0,$.useState)(!1),[yt,bt]=(0,$.useState)(!1),xt=(0,$.useRef)(null),St=(0,$.useRef)(m);(0,$.useEffect)(()=>{St.current=m},[m]);let Ct=(0,$.useCallback)(()=>{if(xt.current)return;if(window.matchMedia(`(prefers-reduced-motion: reduce)`).matches){o(null);return}vt(!0);let e=180,t=i.current;n&&t&&(e=Mi,t.animate([...Fi].reverse(),{duration:Mi,easing:Ni,fill:`forwards`})),xt.current=setTimeout(()=>{xt.current=null,o(null)},e)},[o,n]);(0,$.useEffect)(()=>(window.addEventListener(`cdv-close`,Ct),()=>window.removeEventListener(`cdv-close`,Ct)),[Ct]),(0,$.useLayoutEffect)(()=>{let e=i.current;n&&e&&!window.matchMedia(`(prefers-reduced-motion: reduce)`).matches&&e.animate(Fi,{duration:Mi,easing:Ni})},[n]),(0,$.useEffect)(()=>{xt.current&&=(clearTimeout(xt.current),null),vt(!1)},[d?.id]),(0,$.useEffect)(()=>()=>{xt.current&&clearTimeout(xt.current)},[]),(0,$.useEffect)(()=>{let e=e=>{e.key!==`Escape`||e.defaultPrevented||document.activeElement&&document.activeElement!==document.body||document.querySelector(`[role="dialog"], [role="menu"]`)||Ct()};return window.addEventListener(`keydown`,e),()=>window.removeEventListener(`keydown`,e)},[Ct]);let wt=(0,$.useCallback)(e=>{e.preventDefault(),je.current=!0,bt(!0);let t=e.clientX,n=Oe,r=e=>{if(!je.current)return;let r=t-e.clientX;Ae(Math.min(Math.max(n+r,340),1280))},i=()=>{je.current=!1,bt(!1),document.removeEventListener(`mousemove`,r),document.removeEventListener(`mouseup`,i),document.body.style.cursor=``,document.body.style.userSelect=``};document.body.style.cursor=`col-resize`,document.body.style.userSelect=`none`,document.addEventListener(`mousemove`,r),document.addEventListener(`mouseup`,i)},[Oe]);(0,$.useEffect)(()=>{re().then(e=>{Ge(e.terminalFontSize||15),Ye(e.sessionDetailFontSize||12),Ze(e.apiServices??[]),$e(e.defaultAPIServiceIds??{})}).catch(()=>{}),r(`tmux_available`).then(e=>tt(!!e)).catch(()=>tt(!1)),Tt()},[]);let Tt=(0,$.useCallback)(()=>{r(`psmux_status`).then(e=>rt(e.available?e.path??null:null)).catch(()=>rt(null))},[]);(0,$.useEffect)(()=>{if(!d)return;let e=d.link.sessionLink?.sessionId,t=d.link.cardRuntime;if(k([]),N(null),ye(!1),ze(d.link.queuedPrompts??[]),q(``),dt([]),pt(0),!e)return;let n=!1;return b.current=!0,(async()=>{R(!0);let r=[],i=null;try{({turns:r,lastPage:i}=await Di(e,()=>n))}catch{}finally{b.current=!1,n||R(!1)}n||(k(r),N(i),t&&ye(!0))})(),()=>{n=!0}},[d?.id]),(0,$.useEffect)(()=>{d?.link.sessionLink?.sessionId&&d?.link.cardRuntime&&!B&&ye(!0)},[d?.link.cardRuntime]),(0,$.useEffect)(()=>{d&&ze(d.link.queuedPrompts??[])},[d?.link.updatedAt]);let Et=d?.link.sessionLink?.sessionId;(0,$.useEffect)(()=>{if(m!==`trace`||!Et||b.current)return;let e=!1;return Di(Et,()=>e).then(({turns:t,lastPage:n})=>{e||(k(t),N(n))}).catch(()=>{}),()=>{e=!0}},[m,Et,d?.link.updatedAt]);let Dt=async(e,t,n)=>{R(!0);try{let r=await j(e,t);N(r),k(e=>n?r.turns:[...e,...r.turns])}catch{}finally{R(!1)}};if((0,$.useEffect)(()=>{if(d?.link.sessionLink?.sessionId){if(gt.current&&clearTimeout(gt.current),lt.trim().length<2)dt([]),pt(0),ht(!1);else return ht(!0),gt.current=setTimeout(async()=>{try{let e=await Se(d.link.sessionLink.sessionId,lt.trim());dt(e),pt(0)}catch{dt([])}finally{ht(!1)}},300),()=>{gt.current&&clearTimeout(gt.current)}}},[lt,d?.link.sessionLink?.sessionId]),!d)return null;let J=d.link.sessionLink?.sessionId,Y=d.link.projectPath??d.session?.projectPath,Ot=d.link.worktreeLink?.branch,X=d.link.prLinks[0],kt=d.link.worktreeLink?.path??Y,At=d.link.issueLink,jt=d.link.promptBody,Mt=!!J||!!jt,Z=d.link.cardRuntime??null,Nt=async e=>{try{await r(`set_card_runtime`,{cardId:d.id,runtime:e}),await V.getState().refresh()}catch(e){V.setState({error:String(e)})}},Pt=()=>{pe.trim()&&s(d.id,pe.trim()),fe(!1)},Ft=async()=>{if(!d)return;let e=d.displayTitle||d.link.name||`this card`;await ne(`Delete "${e}"?\n\n${B?`The open terminal will be stopped. The Claude session .jsonl on disk is not deleted.`:`The Claude session .jsonl on disk is not deleted — you can still find it in All Sessions.`}`,{title:`Delete card`,kind:`warning`,okLabel:`Delete`,cancelLabel:`Cancel`})&&c(d.id)},It=async e=>{if(!d)return;let t=d.link.sessionLink?.sessionPath;if(!t)return;let n=e+1;if(await ne(`Checkpoint session to turn ${n}?\n\nEverything after this turn is removed from the .jsonl. The original is backed up next to it as <session>.jsonl.bkp.`,{title:`Checkpoint session`,kind:`warning`,okLabel:`Checkpoint`,cancelLabel:`Cancel`}))try{await se(t,n),Dt(d.link.sessionLink.sessionId,0,!0)}catch(e){V.setState({error:String(e)})}},Lt=Z===`wsl`,Rt=Z===`windows`&&!!nt,zt=Lt&&et||Rt,Bt=Rt?`windows`:`wsl`,Vt=d.link.assistantId??`claude`,Ht=L[Vt]??`claude`,Ut=(0,$.useMemo)(()=>_e({apiServices:Xe,defaultAPIServiceIds:Qe},d.link.apiServiceId,Vt),[Xe,Qe,d.link.apiServiceId,Vt]),Wt=(0,$.useMemo)(()=>Ut?.baseURL?[`ANTHROPIC_BASE_URL=${Ut.baseURL}`]:[],[Ut]),[Gt,Kt]=(0,$.useState)(null);(0,$.useEffect)(()=>{r(`launcher_info`).then(Kt).catch(()=>{})},[]);let qt=(0,$.useMemo)(()=>Ut?{exe:Ut.launcherPrefix?`${Ut.launcherPrefix} ${Ht}`:Ht,modelFlag:Ut.modelFlag?` --model ${Ut.modelFlag}`:``,separator:te(Ut)?` --`:``}:{exe:Ht,modelFlag:``,separator:``},[Ut,Ht]),Jt=Ai(d.displayTitle),Yt=d.id,Xt=st?.prompt??jt??``,Zt=d.link.promptImagePaths?.length?h(Xt,d.link.promptImagePaths):Xt,Qt=st?.dangerouslySkipPermissions??!1,$t=st?.envPrefix??[],en=st?.model??``,tn=(0,$.useCallback)((e,t,n,r,i,a=``)=>{let o=[`DEVBOARD_CARD_ID=${Yt}`,`DEVBOARD_HANDLE=${Jt}`,...Wt,...i].join(` `)+` `,s=e?.match(/^([A-Za-z]):[\\/]*(.*)$/),c=e&&s?`/mnt/${s[1].toLowerCase()}/${s[2].replace(/\\/g,`/`)}`:e,l=c?`cd '${c.replace(/'/g,`'\\''`)}' && `:``,u=r?` --dangerously-skip-permissions`:``,d=`${a?` --model ${a}`:qt.modelFlag}${qt.separator}${u}`;return t?`${l}${o}${qt.exe} --resume ${t}${d}`:`${l}${o}${qt.exe}${d} '${n.replace(/'/g,`'\\''`)}'`},[Yt,Jt,Wt,qt]),nn=(0,$.useCallback)((e,t,n,r,i,a=``,o=!1)=>{let s=[`DEVBOARD_CARD_ID=${Yt}`,`DEVBOARD_HANDLE=${Jt}`,...Wt,...i].map(e=>`set ${e}&& `).join(``),c=e?`cd "${e}" && `:``,l=r?` --dangerously-skip-permissions`:``,u=`${a?` --model ${a}`:qt.modelFlag}${qt.separator}${l}`;if(t)return`${c}${s}${qt.exe} --resume ${t}${u}`;let d=ki(n);if(Gt&&!o&&d.length<=6e3){let e=e=>`"${e.split(`\\`).join(`/`)}"`;return`${c}${s}${e(Gt.node)} ${e(Gt.script)} ${d} ${qt.exe}${u}`}return`${c}${s}${qt.exe}${u} "${n.replace(/"/g,`""`)}"`},[Yt,Jt,Wt,qt,Gt]),rn=st?.commandOverride??tn(Y??void 0,J??null,Zt,Qt,$t,en),an=st?.commandOverride??nn(Y??void 0,J??null,Zt,Qt,$t,en),on=`devboard-${d.id}`,{shellCommand:sn,terminalInput:cn,external:ln}=(()=>{if(Rt&&nt)return{shellCommand:[nt,...W.some(e=>e.index===G)?[`select-window`,`-t`,`${on}:${G}`,`;`]:[],`attach-session`,`-t`,on],terminalInput:``,external:{argv:[nt,`attach-session`,`-t`,on]}};if(zt){let e=`${rn}; exec bash`,t=btoa(unescape(encodeURIComponent(e))),n=`tmux new-session -A -d -s '${on}' -- bash -lc "$(echo ${t} | base64 -d)" 2>/dev/null; tmux select-window -t '${on}:${G}' 2>/dev/null; exec tmux attach-session -t '${on}'`;return{shellCommand:[`wsl.exe`,`--`,`bash`,`-lc`,n],terminalInput:``,external:{wslScript:n}}}return Lt?{shellCommand:[`wsl.exe`],terminalInput:`${rn}\r`,external:{wslScript:`${rn}; exec bash`}}:{shellCommand:[`cmd.exe`],terminalInput:`${an}\r`,external:{cmdLine:an}}})(),un=async()=>{try{Rt&&await r(`tmux_ensure_session`,{name:on,cwdWindows:Y??``,command:an,runtime:`windows`}),await r(`open_in_terminal`,ln)}catch(e){V.setState({error:String(e)})}},dn=(0,$.useCallback)(async()=>{if(zt)try{let e=await r(`tmux_list_windows`,{session:on,runtime:Bt});ct(e),e.length>0&&!e.some(e=>e.index===G)&&K((e.find(e=>e.active)??e[0]).index)}catch{ct([])}},[zt,on,Bt,G]);(0,$.useEffect)(()=>{if(zt&&B){let e=setTimeout(dn,800);return()=>clearTimeout(e)}},[zt,B,dn,d.id]),(0,$.useEffect)(()=>{if(!Rt||!B||it===on)return;let e=!1;return r(`tmux_ensure_session`,{name:on,cwdWindows:Y??``,command:an,runtime:`windows`}).then(()=>{e||(K(e=>e===1?0:e),at(on))}).catch(e=>V.setState({error:String(e)})),()=>{e=!0}},[Rt,B,on]);let fn=async()=>{if(zt)try{let e=await r(`tmux_new_window`,{session:on,cwdWindows:Y??null,command:null,runtime:Bt});K(e),await dn()}catch(e){V.setState({error:String(e)})}},pn=(0,$.useRef)(0),mn=(0,$.useRef)(new Map);(0,$.useEffect)(()=>{if(!d)return;let t=d.link.sessionLink?.sessionId;if(!t)return;let n=!1,i=null,a=e(`hook-event`,e=>{if(n)return;let a=e.payload;a&&a.sessionId===t&&(a.eventName===`UserPromptSubmit`?pn.current=Date.now():a.eventName===`Stop`&&(i&&clearTimeout(i),i=setTimeout(async()=>{if(Date.now()-pn.current<1100)return;let e=V.getState().cards.find(e=>e.id===d.id)?.link.queuedPrompts??Le,t=Date.now(),n=e.find(e=>e.sendAutomatically&&(mn.current.get(e.id)??0)+62e3<t);if(!n||!Ve.current)return;let i=!1;if(n.selfCompactThresholdTokens!=null)try{i=await r(`should_drop_self_compact_prompt`,{cardId:d.id,promptId:n.id})}catch{i=!1}if(i){ae(d.id,n.id).then(()=>ze(e=>e.filter(e=>e.id!==n.id))).catch(()=>{});return}let a=n.imagePaths?.length?h(n.body,n.imagePaths):n.body;Ve.current(a+`\r`),mn.current.set(n.id,t);for(let[e,n]of mn.current)t-n>3e5&&mn.current.delete(e);ae(d.id,n.id).then(()=>ze(e=>e.filter(e=>e.id!==n.id))).catch(()=>{})},1e3)))});return()=>{n=!0,i&&clearTimeout(i),a.then(e=>e()).catch(()=>{})}},[d?.id,d?.link.sessionLink?.sessionId]);let hn=async e=>{if(zt&&e!==(W[0]?.index??1))try{await r(`tmux_kill_window`,{target:`${on}:${e}`,runtime:Bt}),G===e&&K(W[0]?.index??1),await dn()}catch(e){V.setState({error:String(e)})}},gn=()=>{Z?J?(ye(!0),g(`terminal`)):(ot(!0),g(`terminal`)):g(`terminal`)};(0,$.useEffect)(()=>{!J&&jt&&!B&&!H&&!st&&Z&&(ot(!0),g(`terminal`))},[d.id,Z]);let _n=async(e,t,n)=>{try{let r=await ee(d.id,e,t,n);ze(e=>[...e,r])}catch{}},vn=async(e,t,n)=>{if(Pe)try{let r=n??[];await ue(d.id,Pe.id,e,t,r),ze(n=>n.map(n=>n.id===Pe.id?{...n,body:e,sendAutomatically:t,imagePaths:r.length>0?r:void 0}:n))}catch{}},yn=async e=>{try{await ae(d.id,e),ze(t=>t.filter(t=>t.id!==e))}catch{}},bn=async e=>{let t=Le.find(t=>t.id===e);if(!t||!Ve.current)return;let n=t.imagePaths?.length?h(t.body,t.imagePaths):t.body;Ve.current(n+`\r`),yn(e)},xn=e=>{Fe(e),Ne(!0)},Sn=e=>{ut.length!==0&&pt(t=>e===`next`?(t+1)%ut.length:(t-1+ut.length)%ut.length)},Cn=e=>g(e),wn=Ti.filter(e=>e===`terminal`?Mt:e===`trace`||e===`usage`?!!J:e===`diff`?!!kt:e===`issue`?!!At:e===`pr`?!!X:e===`prompt`?!!jt:e===`knowledge`&&y),Tn=wn.length>1,En={"--cdv-dx":`${(Ti.indexOf(m)>=Ti.indexOf(St.current)?1:-1)*14}px`},Dn=(X?.status??``).toUpperCase(),On=Dn===`MERGED`?`default`:Dn===`CLOSED`?`danger`:`success`,kn=H&&!!Y&&!B,An=m===`terminal`&&B,jn=(0,Q.jsxs)(`div`,{ref:i,className:`cdv`,"data-mode":n?`popup`:`drawer`,"data-closing":_t||void 0,"data-resizing":yt||void 0,style:n?{...p.mat.ultrathick,border:`1px solid ${p.border}`,borderRadius:Pi}:{width:Oe,minWidth:340,maxWidth:1280,...p.mat.ultrathick,borderLeft:`1px solid ${p.border}`,borderTopLeftRadius:34,borderBottomLeftRadius:34},children:[!n&&(0,Q.jsx)(`div`,{onMouseDown:wt,className:`cdv-resize`,"aria-hidden":`true`,children:(0,Q.jsx)(`span`,{className:`cdv-grip`})}),(0,Q.jsxs)(`header`,{className:`cdv-head`,children:[(0,Q.jsxs)(`div`,{className:`cdv-row cdv-rise`,style:{"--i":0},children:[de?(0,Q.jsx)(`input`,{autoFocus:!0,className:`cdv-title-input`,value:pe,"aria-label":`Card title`,onChange:e=>he(e.target.value),onBlur:Pt,onKeyDown:e=>{e.key===`Enter`&&Pt(),e.key===`Escape`&&(e.stopPropagation(),fe(!1))}}):(0,Q.jsx)(`h2`,{className:`cdv-title`,children:(0,Q.jsx)(`button`,{type:`button`,onClick:()=>{he(d.displayTitle),fe(!0)},title:`Rename`,children:d.displayTitle})}),(0,Q.jsxs)(`div`,{className:`cdv-tools`,children:[jt&&(0,Q.jsx)(O,{icon:!0,size:`sm`,variant:`ghost`,"aria-label":x?`Stop editing task`:`Edit task`,"aria-pressed":x,"data-active":x||void 0,onClick:()=>S(e=>!e),title:`Edit task`,children:(0,Q.jsx)(Re,{size:16,strokeWidth:2,"aria-hidden":!0})}),(0,Q.jsx)(O,{icon:!0,size:`sm`,variant:`ghost`,"aria-label":`Close`,onClick:Ct,title:`Close (Esc)`,children:(0,Q.jsx)(Ei,{d:`M6 18 18 6M6 6l12 12`,sw:2.25})})]})]}),(0,Q.jsxs)(`div`,{className:`cdv-bar`,children:[(0,Q.jsxs)(`div`,{className:`cdv-meta cdv-rise`,style:{"--i":1,...x?{display:`none`}:null},children:[(0,Q.jsx)(Ce,{"aria-label":`Status`,className:`cdv-status`,value:d.link.column,options:ie.map(e=>{let t=e===`all_sessions`&&(d.link.manuallyArchived||d.link.column!==e);return{value:e,label:(0,Q.jsxs)(`span`,{className:`cdv-st`,"data-st":t?`archived`:e,children:[(0,Q.jsx)(`i`,{"aria-hidden":!0}),t?`Archived`:F[e]]})}}),onValueChange:e=>{e!==d.link.column&&u(d.id,e)}}),d.projectName&&(0,Q.jsx)(E,{title:Y??``,className:`cdv-badge`,children:d.projectName}),Ot&&(0,Q.jsxs)(E,{title:`Branch: ${Ot}`,className:`cdv-badge cdv-badge--branch`,children:[(0,Q.jsx)(Ei,{d:`M6 3v12m0 0a3 3 0 1 0 0 6 3 3 0 0 0 0-6Zm12-6a3 3 0 1 0 0-6 3 3 0 0 0 0 6Zm0 0a9 9 0 0 1-9 9`,size:12}),(0,Q.jsx)(`span`,{children:Ot})]}),X&&(0,Q.jsx)(`button`,{type:`button`,className:`cdv-chip`,onClick:()=>Cn(`pr`),title:X.title??``,children:(0,Q.jsxs)(E,{tone:On,children:[`PR #`,X.number]})}),At&&(0,Q.jsx)(`button`,{type:`button`,className:`cdv-chip`,onClick:()=>Cn(`issue`),title:At.title??``,children:(0,Q.jsxs)(E,{tone:`outline`,children:[`#`,At.number]})}),(0,Q.jsx)(P,{sessionId:J})]}),(0,Q.jsxs)(`div`,{className:`cdv-actions cdv-rise`,style:{"--i":2,...x?{display:`none`}:null},children:[Mt&&(0,Q.jsxs)(O,{variant:`solid`,className:`cdv-primary`,onClick:gn,title:B?`Switch to terminal view`:J?`Resume this session`:`Start Claude session`,children:[(0,Q.jsx)(Ei,{d:`m5.25 4.5 7.5 7.5-7.5 7.5m6-15 7.5 7.5-7.5 7.5`,size:15,sw:2.5}),B?`Terminal`:J?`Resume`:`Start`]}),Mt&&B&&(0,Q.jsx)(Te,{label:`Queue a prompt to send to Claude later`,side:`bottom`,children:(0,Q.jsx)(O,{icon:!0,"aria-label":`Queue prompt`,onClick:()=>{Fe(null),Ne(!0)},children:(0,Q.jsx)(Ie,{size:16})})}),Mt&&B&&(0,Q.jsx)(Te,{label:`Set up and launch again`,side:`bottom`,children:(0,Q.jsx)(O,{icon:!0,"aria-label":`Set up and launch again`,onClick:()=>{we(!1),U(null),ye(!1),ot(!0),g(`terminal`)},children:(0,Q.jsx)(Be,{size:16})})}),Mt&&Z&&(0,Q.jsx)(Te,{label:`Open in external terminal`,side:`bottom`,children:(0,Q.jsx)(O,{icon:!0,"aria-label":`Open in external terminal`,onClick:un,children:(0,Q.jsx)(Ke,{size:16})})}),Y&&(0,Q.jsx)(Te,{label:`Open in editor`,side:`bottom`,children:(0,Q.jsx)(O,{icon:!0,"aria-label":`Open in editor`,onClick:()=>ve(Y),children:(0,Q.jsx)(l,{size:16})})}),(0,Q.jsx)(Te,{label:`Delete card`,side:`bottom`,children:(0,Q.jsx)(O,{icon:!0,variant:`danger`,className:`cdv-delete`,"aria-label":`Delete card`,onClick:Ft,children:(0,Q.jsx)(Je,{size:16})})})]})]})]}),Tn&&(0,Q.jsx)(`div`,{className:`cdv-tabs`,style:x?{display:`none`}:void 0,children:(0,Q.jsx)(oe,{value:m,onValueChange:e=>Cn(e),children:(0,Q.jsx)(le,{"aria-label":`Card sections`,children:wn.map(e=>(0,Q.jsxs)(me,{value:e,children:[wi[e],e===`knowledge`&&v>0&&(0,Q.jsx)(`span`,{className:`tr-n`,children:v}),e===`terminal`&&B&&(0,Q.jsx)(`span`,{className:`cdv-live`,role:`img`,"aria-label":`Session running`})]},e))})})}),x&&jt&&(0,Q.jsx)(zr,{card:d,onDone:()=>S(!1)},d.id),(0,Q.jsxs)(`div`,{className:`cdv-body`,"data-dark":An||void 0,style:x?{display:`none`}:void 0,children:[m===`terminal`&&Mt&&!Z&&(0,Q.jsxs)(`div`,{className:`cdv-pane cdv-empty`,style:En,children:[(0,Q.jsxs)(`div`,{className:`cdv-empty-copy`,children:[(0,Q.jsx)(`h3`,{children:`Where should Claude run?`}),(0,Q.jsx)(`p`,{children:Y?.startsWith(`/`)?(0,Q.jsxs)(Q.Fragment,{children:[`This project lives under `,(0,Q.jsx)(`code`,{children:`/`}),`, so WSL is the natural pick. Saved per card.`]}):Y?(0,Q.jsxs)(Q.Fragment,{children:[`Windows suits projects under `,(0,Q.jsx)(`code`,{children:`C:\\`}),`; WSL suits `,(0,Q.jsx)(`code`,{children:`/home/`}),`. Saved per card.`]}):(0,Q.jsx)(Q.Fragment,{children:`Choose where Claude launches for this card. Saved per card.`})})]}),(0,Q.jsx)(`div`,{className:`cdv-runtimes`,children:[{id:`windows`,label:`Windows`,hint:nt?`psmux · stays running`:`cmd.exe`,d:`M3 5.5 10.5 4.5v7H3v-6Zm8.5-1.1L21 3v8.5h-9.5v-7.1ZM3 12.5h7.5v7L3 18.5v-6Zm8.5 0H21V21l-9.5-1.4v-7.1Z`},{id:`wsl`,label:`WSL`,hint:et?`wsl.exe + tmux · stays running`:`wsl.exe + bash`,d:`m5.25 4.5 7.5 7.5-7.5 7.5m6-15 7.5 7.5-7.5 7.5`}].map(e=>(0,Q.jsxs)(`button`,{type:`button`,className:`cdv-runtime`,onClick:()=>Nt(e.id),children:[(0,Q.jsx)(`span`,{className:`cdv-tile`,children:(0,Q.jsx)(Ei,{d:e.d,size:20,sw:1.75})}),(0,Q.jsxs)(`span`,{className:`cdv-runtime-text`,children:[(0,Q.jsx)(`strong`,{children:e.label}),(0,Q.jsx)(`small`,{children:e.hint})]}),e.id===`wsl`&&Y?.startsWith(`/`)&&(0,Q.jsx)(E,{children:`Suggested`})]},e.id))}),(0,Q.jsx)(xi,{onInstalled:Tt})]}),Mt&&Z&&B&&(0,Q.jsxs)(`div`,{className:m===`terminal`?`cdv-pane cdv-pane--fade cdv-term`:`hidden`,style:En,children:[Z===`windows`&&(0,Q.jsx)(xi,{onInstalled:Tt}),(0,Q.jsx)(qr,{card:d}),(0,Q.jsx)(Ur,{prompts:Le,onSendNow:bn,onEdit:xn,onRemove:yn}),zt&&W.length>0&&(0,Q.jsxs)(`div`,{className:`cdv-termtabs`,role:`tablist`,"aria-label":`Terminal windows`,children:[W.map(e=>{let t=e.index===G;return(0,Q.jsxs)(`div`,{role:`tab`,"aria-selected":t,tabIndex:0,className:`cdv-termtab`,"data-active":t||void 0,onClick:()=>K(e.index),onKeyDown:t=>{(t.key===`Enter`||t.key===` `)&&(t.preventDefault(),K(e.index))},title:e.name,children:[(0,Q.jsx)(`span`,{children:e.index===1?`Claude`:e.name||`tab ${e.index}`}),e.index!==1&&(0,Q.jsx)(`button`,{type:`button`,onClick:t=>{t.stopPropagation(),hn(e.index)},"aria-label":`Close ${e.name||`tab ${e.index}`}`,title:`Close tab`,children:(0,Q.jsx)(Ei,{d:`M6 18 18 6M6 6l12 12`,size:11,sw:2.5})})]},e.index)}),(0,Q.jsx)(`button`,{type:`button`,className:`cdv-termadd`,onClick:fn,"aria-label":`New shell tab`,title:`New shell tab`,children:(0,Q.jsx)(Ei,{d:`M12 4.5v15m7.5-7.5h-15`,size:12,sw:2.5})})]}),be&&(0,Q.jsxs)(`div`,{className:`cdv-exited`,role:`status`,children:[(0,Q.jsx)(`span`,{className:`cdv-exited-dot`,"aria-hidden":!0}),(0,Q.jsxs)(`span`,{className:`cdv-exited-text`,children:[(0,Q.jsx)(`strong`,{children:`Process exited`}),(0,Q.jsx)(`span`,{children:`Run the same command again, or change the setup first.`})]}),(0,Q.jsxs)(`button`,{type:`button`,className:`cdv-exited-btn`,onClick:()=>{we(!1),De(e=>e+1)},children:[(0,Q.jsx)(He,{size:14,strokeWidth:2.25,"aria-hidden":!0}),`Run again`]}),(0,Q.jsxs)(`button`,{type:`button`,className:`cdv-exited-btn`,"data-primary":!0,onClick:()=>{we(!1),U(null),ye(!1),ot(!0)},children:[(0,Q.jsx)(We,{size:14,strokeWidth:2.25,"aria-hidden":!0}),`Edit setup`]})]}),(0,Q.jsx)($.Suspense,{fallback:null,children:Rt&&it!==on?(0,Q.jsx)(D,{}):(0,Q.jsx)(Si,{ptyId:`term-${d.id}-${G}`,command:sn,initialInput:cn,onExit:()=>we(!0),writeRef:Ve,fontSize:Ue,initialScrollback:J?ji(T):void 0},`${G}-${Ee}`)})]}),m===`terminal`&&Mt&&Z&&kn&&Y&&(0,Q.jsx)(pi,{projectPath:Y,initialPrompt:jt??``,canCreateWorktree:!1,runtime:Z,onRuntimeChange:Nt,windowsLabel:nt?`Windows (psmux)`:`Windows (cmd.exe)`,initialSkipPermissions:!1,buildCommand:e=>Lt?tn(Y,J??null,e.prompt,e.dangerouslySkipPermissions,e.envPrefix,e.model):nn(Y,J??null,e.prompt,e.dangerouslySkipPermissions,e.envPrefix,e.model,!0),onLaunch:e=>{U(e),ot(!1),ye(!0)},onCancel:()=>ot(!1)}),m===`terminal`&&Mt&&Z&&!B&&!kn&&(0,Q.jsx)(`div`,{className:`cdv-pane cdv-empty`,style:En,children:I?(0,Q.jsxs)(Q.Fragment,{children:[(0,Q.jsx)(D,{}),(0,Q.jsxs)(`div`,{className:`cdv-empty-copy`,children:[(0,Q.jsx)(`h3`,{children:`Restoring session`}),(0,Q.jsx)(`p`,{children:`Reading the transcript so the terminal opens with its history.`})]})]}):(0,Q.jsxs)(Q.Fragment,{children:[(0,Q.jsx)(`span`,{className:`cdv-tile cdv-tile--lg`,children:(0,Q.jsx)(Ei,{d:`m5.25 4.5 7.5 7.5-7.5 7.5m6-15 7.5 7.5-7.5 7.5`,size:24,sw:1.5})}),(0,Q.jsxs)(`div`,{className:`cdv-empty-copy`,children:[(0,Q.jsx)(`h3`,{children:J?`Session is paused`:`Not started yet`}),(0,Q.jsx)(`p`,{children:J?`Resume to reattach to this Claude session.`:`Start to launch Claude with this card's prompt.`})]}),(0,Q.jsx)(O,{variant:`solid`,onClick:gn,children:J?`Resume session`:`Start session`})]})}),m===`trace`&&(0,Q.jsx)(`div`,{className:`cdv-pane cdv-scroll`,style:En,children:(0,Q.jsx)(ra,{turns:T,transcriptPage:A,loading:I,fontSize:qe,onLoadMore:()=>{J&&A?.hasMore&&Dt(J,A.nextOffset,!1)},searchText:lt,searchMatches:ut,currentMatchIdx:ft,isSearching:mt,onSearchChange:q,onNextMatch:()=>Sn(`next`),onPrevMatch:()=>Sn(`prev`),onCheckpoint:J?It:void 0})}),m===`usage`&&J&&(0,Q.jsx)(`div`,{className:`cdv-pane cdv-scroll`,style:En,children:(0,Q.jsx)(jr,{sessionId:J})}),m===`diff`&&kt&&(0,Q.jsx)(`div`,{className:`cdv-pane cdv-scroll`,style:En,children:(0,Q.jsx)($.Suspense,{fallback:(0,Q.jsxs)(`div`,{className:`cdv-diff-loading`,"aria-busy":`true`,children:[(0,Q.jsx)(D,{}),(0,Q.jsx)(`span`,{children:`Loading changes…`})]}),children:(0,Q.jsx)(Ci,{path:kt,isWorktree:!!d.link.worktreeLink?.path})})}),m===`issue`&&At&&(0,Q.jsx)(`div`,{className:`cdv-pane cdv-scroll`,style:En,children:(0,Q.jsx)(_a,{title:At.title??`Issue #${At.number}`,body:At.body,url:At.url,onOpenInBrowser:Y?()=>xe(Y,At.number).catch(()=>{}):void 0})}),m===`pr`&&X&&(0,Q.jsx)(`div`,{className:`cdv-pane cdv-scroll`,style:En,children:(0,Q.jsx)(_a,{title:X.title??`PR #${X.number}`,body:X.body,url:X.url,onOpenInBrowser:Y?()=>ge(Y,X.number).catch(()=>{}):void 0,mergeAction:Y&&X.status===`OPEN`?{onMerge:()=>ce(Y,X.number),number:X.number}:void 0,prMeta:{reviewDecision:X.reviewDecision,approvalCount:X.approvalCount,mergeStateStatus:X.mergeStateStatus,checkRuns:X.checkRuns??[],unresolvedThreads:X.unresolvedThreads}})}),m===`knowledge`&&_&&(0,Q.jsx)(`div`,{className:`cdv-pane cdv-scroll`,style:En,children:(0,Q.jsx)(Yr,{card:d,data:_})}),m===`prompt`&&d.link.promptBody&&(0,Q.jsx)(`div`,{className:`cdv-pane cdv-scroll`,style:En,children:(0,Q.jsx)(Ir,{card:d},d.id)})]}),(0,Q.jsx)(Vr,{open:Me,onClose:()=>{Ne(!1),Fe(null)},onSave:Pe?vn:_n,editBody:Pe?.body,editSendAuto:Pe?.sendAutomatically,editImagePaths:Pe?.imagePaths})]});return n?(0,Q.jsxs)(`div`,{className:`cdv-pop`,children:[(0,Q.jsx)(`div`,{className:`cdv-scrim`,"data-closing":_t||void 0,onClick:Ct,"aria-hidden":`true`}),jn]}):jn}function Li(e){let t=(0,kr.c)(25),{meta:n,c:r}=e,i=n.checkRuns,a;t[0]===i?a=t[1]:(a=i.reduce(zi,{}),t[0]=i,t[1]=a);let o=a,s=(o.FAILURE??0)+(o.CANCELLED??0)+(o.TIMED_OUT??0)+(o.STARTUP_FAILURE??0)+(o.ACTION_REQUIRED??0),c=(o.PENDING??0)+(o.QUEUED??0)+(o.IN_PROGRESS??0),l=o.SUCCESS??0,u=n.reviewDecision===`APPROVED`?`#3fb950`:n.reviewDecision===`CHANGES_REQUESTED`?`#f85149`:n.reviewDecision===`REVIEW_REQUIRED`?`#d29922`:r.textMuted,d=n.mergeStateStatus===`CLEAN`?`#3fb950`:n.mergeStateStatus===`BLOCKED`||n.mergeStateStatus===`DIRTY`?`#f85149`:n.mergeStateStatus===`UNSTABLE`||n.mergeStateStatus===`BEHIND`?`#d29922`:r.textMuted;if(!n.reviewDecision&&!n.mergeStateStatus&&i.length===0&&n.approvalCount==null)return null;let f;t[2]!==r||t[3]!==n.approvalCount||t[4]!==n.reviewDecision||t[5]!==u?(f=n.reviewDecision&&(0,Q.jsxs)(Bi,{color:u,c:r,children:[n.reviewDecision.replace(/_/g,` `).toLowerCase(),n.approvalCount!=null&&n.approvalCount>0?` · ${n.approvalCount}✓`:``]}),t[2]=r,t[3]=n.approvalCount,t[4]=n.reviewDecision,t[5]=u,t[6]=f):f=t[6];let p;t[7]!==r||t[8]!==d||t[9]!==n.mergeStateStatus?(p=n.mergeStateStatus&&(0,Q.jsxs)(Bi,{color:d,c:r,children:[`merge: `,n.mergeStateStatus.toLowerCase()]}),t[7]=r,t[8]=d,t[9]=n.mergeStateStatus,t[10]=p):p=t[10];let m;t[11]!==r||t[12]!==n.unresolvedThreads?(m=n.unresolvedThreads!=null&&n.unresolvedThreads>0&&(0,Q.jsxs)(Bi,{color:`#d29922`,c:r,title:`Unresolved review threads`,children:[n.unresolvedThreads,` unresolved thread`,n.unresolvedThreads===1?``:`s`]}),t[11]=r,t[12]=n.unresolvedThreads,t[13]=m):m=t[13];let h;t[14]!==r||t[15]!==i||t[16]!==s||t[17]!==c||t[18]!==l?(h=i.length>0&&(0,Q.jsx)(Bi,{color:s>0?`#f85149`:c>0?`#d29922`:`#3fb950`,c:r,title:i.map(Ri).join(`
|
|
19
|
+
`),children:s>0?`${s}/${i.length} failing`:c>0?`${c}/${i.length} running`:`${l}/${i.length} passing`}),t[14]=r,t[15]=i,t[16]=s,t[17]=c,t[18]=l,t[19]=h):h=t[19];let g;return t[20]!==f||t[21]!==p||t[22]!==m||t[23]!==h?(g=(0,Q.jsxs)(`div`,{className:`flex flex-wrap items-center gap-2`,children:[f,p,m,h]}),t[20]=f,t[21]=p,t[22]=m,t[23]=h,t[24]=g):g=t[24],g}function Ri(e){return`${e.name}: ${e.conclusion??`pending`}`}function zi(e,t){let n=t.conclusion??`PENDING`;return e[n]=(e[n]??0)+1,e}function Bi(e){let t=(0,kr.c)(8),{children:n,color:r,title:i}=e,a=r+`1f`,o=`1px solid ${r}33`,s;t[0]!==r||t[1]!==a||t[2]!==o?(s={color:r,background:a,border:o},t[0]=r,t[1]=a,t[2]=o,t[3]=s):s=t[3];let c;return t[4]!==n||t[5]!==s||t[6]!==i?(c=(0,Q.jsx)(`span`,{className:`text-[11px] font-medium px-2 py-0.5 rounded-md cursor-default`,style:s,title:i,children:n}),t[4]=n,t[5]=s,t[6]=i,t[7]=c):c=t[7],c}var Vi={fill:`none`,viewBox:`0 0 24 24`,stroke:`currentColor`,strokeLinecap:`round`,strokeLinejoin:`round`},Hi=new Set([`Task`,`Agent`]),Ui=/^<(system-reminder|local-command-caveat|local-command-stdout|command-name|command-message|task-notification|user-prompt-submit-hook)\b/,Wi=14;function Gi(e){let t=e.indexOf(`: `);return t===-1?{name:e,args:``}:{name:e.slice(0,t),args:e.slice(t+2)}}function Ki(e,t){try{let n=JSON.parse(e)?.[t];if(typeof n==`string`)return n}catch{}let n=RegExp(`"${t}"\\s*:\\s*"((?:[^"\\\\]|\\\\.)*)`).exec(e);return n?n[1].replace(/\\n/g,`
|
|
20
|
+
`).replace(/\\"/g,`"`).replace(/\\\\/g,`\\`):``}var qi=[`command`,`file_path`,`path`,`pattern`,`url`,`query`,`description`,`prompt`];function Ji(e){for(let t of qi){let n=Ki(e,t);if(n)return n.split(`
|
|
21
|
+
`)[0]}return e}function Yi(e){let t=e.trim();if(t[0]!==`{`&&t[0]!==`[`)return e;try{return JSON.stringify(JSON.parse(t),null,2)}catch{return e}}function Xi(e){let t=Math.round(e/1e3);if(t<1)return``;if(t<60)return`+${t}s`;let n=Math.floor(t/60);return n<60?`+${n}m${t%60?` ${t%60}s`:``}`:`+${Math.floor(n/60)}h ${n%60}m`}function Zi(e){let t=Math.round(e/1e3);if(t<60)return`${t}s`;let n=Math.floor(t/60);return n<60?`${n}m`:`${Math.floor(n/60)}h ${n%60}m`}function Qi(e){if(!e)return null;let t=new Date(e);if(Number.isNaN(t.getTime()))return null;let n=t.toDateString()===new Date().toDateString(),r=t.toLocaleTimeString([],{hour:`2-digit`,minute:`2-digit`,second:`2-digit`});return{label:n?r:`${t.toLocaleDateString([],{month:`short`,day:`numeric`})}, ${r}`,full:t.toLocaleString()}}function $i(e,t){let n=e.contentBlocks.filter(e=>e.kind===`text`&&e.text.trim()),r=e.contentBlocks.filter(e=>e.kind===`tool_use`).map(e=>Gi(e.text)),i=e.contentBlocks.filter(e=>e.kind===`tool_result`),a=e.contentBlocks.length===0?e.textPreview||`(empty)`:null,o=e.role===`user`&&n.length===0&&a===null,s=e.role===`user`&&n.length>0&&n.every(e=>Ui.test(e.text.trimStart())),c=t?.timestamp?Date.parse(t.timestamp):NaN,l=e.timestamp?Date.parse(e.timestamp):NaN;return{turn:e,kind:o?`result`:s?`system`:e.role===`assistant`?`reply`:`prompt`,speaker:e.role===`assistant`?`Claude`:s?`System`:`You`,prose:n,calls:r,results:i,thinking:e.contentBlocks.some(e=>e.kind===`thinking`),fallback:a,gap:Number.isNaN(c)||Number.isNaN(l)?null:Math.max(0,l-c),spawns:r.filter(e=>Hi.has(e.name)).length}}var ea=36;function ta(e){let t=e.prose.reduce((e,t)=>e+Math.ceil(t.text.length/90)+(t.text.split(`
|
|
22
|
+
`).length-1),0);return 40+Math.min(t,Wi)*24+e.calls.length*28+e.results.length*40+(e.kind===`prompt`?14:0)}function na(e,t){switch(t){case`messages`:return e.kind!==`result`&&(e.prose.length>0||e.fallback!==null);case`tools`:return e.calls.length>0||e.results.length>0;case`agents`:return e.spawns>0;default:return!0}}function ra({turns:e,transcriptPage:t,loading:n,fontSize:r,onLoadMore:i,searchText:a,searchMatches:o,currentMatchIdx:s,isSearching:c,onSearchChange:l,onNextMatch:u,onPrevMatch:d,onCheckpoint:f}){let p=o.length>0?o[s]:-1,m=(0,$.useMemo)(()=>new Set(o),[o]),h=(0,$.useRef)(null),g=a.length>=2,[_,v]=(0,$.useState)(`all`),y=g?`all`:_,b=(0,$.useMemo)(()=>e.map((t,n)=>$i(t,e[n-1])),[e]),x=(0,$.useMemo)(()=>{let e=0,t=0,n=NaN,r=NaN;for(let i of b){e+=i.calls.length,t+=i.spawns;let a=i.turn.timestamp?Date.parse(i.turn.timestamp):NaN;Number.isNaN(a)||(Number.isNaN(n)&&(n=a),r=a)}return{calls:e,spawns:t,span:Number.isNaN(n)?null:r-n}},[b]),S=(0,$.useMemo)(()=>b.filter(e=>na(e,y)),[b,y]),[C,w]=(0,$.useState)(!1);(0,$.useEffect)(()=>{if(!f)return;let e=e=>{e.key===`Control`&&w(!0)},t=e=>{e.key===`Control`&&w(!1)},n=()=>w(!1);return window.addEventListener(`keydown`,e),window.addEventListener(`keyup`,t),window.addEventListener(`blur`,n),()=>{window.removeEventListener(`keydown`,e),window.removeEventListener(`keyup`,t),window.removeEventListener(`blur`,n)}},[f]);let T=!!t?.hasMore,E=T?ea:0,O=he({count:S.length,getScrollElement:()=>h.current,estimateSize:e=>ta(S[e]),getItemKey:e=>S[e].turn.index,overscan:8,scrollMargin:E}),k=(0,$.useRef)(null);(0,$.useLayoutEffect)(()=>{let e=h.current,t=k.current;if(!e||!t||t.filter!==y)return;let n=S.findIndex(e=>e.turn.index===t.key);n<=0||(e.scrollTop=O.measurementsCache[n].start-t.top,k.current=null)},[S,y,O]),(0,$.useEffect)(()=>{if(p<0)return;let e=S.findIndex(e=>e.turn.index===p);e>=0&&O.scrollToIndex(e,{align:`center`})},[s,o]);let A=e=>{let r=O.getVirtualItems()[0];r&&(k.current={key:r.key,top:r.start-e.currentTarget.scrollTop,filter:y}),!n&&t?.hasMore&&e.currentTarget.scrollTop<120&&i()};return(0,Q.jsxs)(`div`,{className:`hist`,children:[(0,Q.jsxs)(`div`,{className:`hist-bar`,children:[(0,Q.jsxs)(`label`,{className:`hist-search`,children:[(0,Q.jsx)(`svg`,{className:`w-4 h-4 shrink-0`,strokeWidth:2,...Vi,"aria-hidden":!0,children:(0,Q.jsx)(`path`,{d:`m21 21-4.35-4.35M11 18a7 7 0 1 0 0-14 7 7 0 0 0 0 14Z`})}),(0,Q.jsx)(`input`,{type:`text`,value:a,onChange:e=>l(e.target.value),placeholder:`Search this trace`,"aria-label":`Search this trace`,onKeyDown:e=>{e.key===`Enter`?(e.preventDefault(),e.shiftKey?d():u()):e.key===`Escape`&&a&&(e.stopPropagation(),l(``))}}),g&&(0,Q.jsxs)(Q.Fragment,{children:[c?(0,Q.jsx)(D,{className:`w-3.5 h-3.5`}):(0,Q.jsx)(`span`,{className:`hist-count`,"aria-live":`polite`,children:o.length>0?`${s+1} of ${o.length}`:`No matches`}),(0,Q.jsx)(`button`,{type:`button`,className:`hist-iconbtn`,onClick:d,disabled:o.length===0,title:`Previous match (Shift+Enter)`,"aria-label":`Previous match`,children:(0,Q.jsx)(`svg`,{className:`w-3.5 h-3.5`,strokeWidth:2.5,...Vi,children:(0,Q.jsx)(`path`,{d:`m5 15 7-7 7 7`})})}),(0,Q.jsx)(`button`,{type:`button`,className:`hist-iconbtn`,onClick:u,disabled:o.length===0,title:`Next match (Enter)`,"aria-label":`Next match`,children:(0,Q.jsx)(`svg`,{className:`w-3.5 h-3.5`,strokeWidth:2.5,...Vi,children:(0,Q.jsx)(`path`,{d:`m5 9 7 7 7-7`})})})]}),a&&(0,Q.jsx)(`button`,{type:`button`,className:`hist-iconbtn`,onClick:()=>l(``),title:`Clear search (Esc)`,"aria-label":`Clear search`,children:(0,Q.jsx)(`svg`,{className:`w-3.5 h-3.5`,strokeWidth:2.5,...Vi,children:(0,Q.jsx)(`path`,{d:`M6 6l12 12M18 6 6 18`})})})]}),(0,Q.jsx)(oe,{value:y,onValueChange:e=>v(e),children:(0,Q.jsxs)(le,{"aria-label":`Trace filter`,children:[(0,Q.jsx)(me,{value:`all`,children:`All`}),(0,Q.jsx)(me,{value:`messages`,children:`Messages`}),(0,Q.jsxs)(me,{value:`tools`,children:[`Tools`,x.calls>0&&(0,Q.jsx)(`span`,{className:`tr-n`,children:x.calls})]}),(0,Q.jsxs)(me,{value:`agents`,children:[`Agents`,x.spawns>0&&(0,Q.jsx)(`span`,{className:`tr-n`,children:x.spawns})]})]})})]}),t&&e.length>0&&(0,Q.jsxs)(`div`,{className:`tr-summary`,"aria-label":`Trace summary`,children:[(0,Q.jsx)(`span`,{children:e.length===t.totalTurns?`${e.length} turns`:`${e.length} of ${t.totalTurns} turns`}),(0,Q.jsxs)(`span`,{children:[x.calls,` tool `,x.calls===1?`call`:`calls`]}),(0,Q.jsxs)(`span`,{children:[x.spawns,` `,x.spawns===1?`subagent`:`subagents`]}),x.span!==null&&x.span>0&&(0,Q.jsxs)(`span`,{children:[`over `,Zi(x.span)]})]}),n&&e.length===0?(0,Q.jsx)(`div`,{className:`hist-empty`,children:(0,Q.jsx)(D,{className:`w-5 h-5`})}):e.length===0?(0,Q.jsxs)(`div`,{className:`hist-empty`,children:[(0,Q.jsx)(`svg`,{className:`w-8 h-8`,strokeWidth:1.25,...Vi,"aria-hidden":!0,children:(0,Q.jsx)(`path`,{d:`M6 3v12M18 9a3 3 0 1 0 0-6 3 3 0 0 0 0 6ZM6 21a3 3 0 1 0 0-6 3 3 0 0 0 0 6ZM18 9a9 9 0 0 1-9 9`})}),(0,Q.jsx)(`span`,{children:`No trace yet`}),(0,Q.jsx)(`small`,{children:`Steps appear here once the session has run.`})]}):S.length===0?(0,Q.jsxs)(`div`,{className:`hist-empty`,children:[(0,Q.jsx)(`span`,{children:`Nothing to show for this filter`}),(0,Q.jsx)(`small`,{children:y===`agents`?`This session has not spawned a subagent.`:`Try another filter.`})]}):(0,Q.jsxs)(`div`,{ref:h,onScroll:A,className:`hist-scroll tr-timeline`,style:{fontSize:`${r}px`},children:[T&&t&&(0,Q.jsx)(`div`,{className:`hist-earlier`,children:n?(0,Q.jsxs)(Q.Fragment,{children:[(0,Q.jsx)(D,{className:`w-3 h-3`}),` Loading earlier turns…`]}):(0,Q.jsxs)(Q.Fragment,{children:[t.totalTurns-e.length,` earlier turns · scroll up to load`]})}),(0,Q.jsx)(`div`,{style:{height:O.getTotalSize(),position:`relative`,width:`100%`},children:O.getVirtualItems().map(e=>{let t=S[e.index],n=t.turn.index===p;return(0,Q.jsx)(`div`,{"data-index":e.index,ref:O.measureElement,className:`tr-row`,"data-lead":t.kind===`prompt`||void 0,style:{transform:`translateY(${e.start-E}px)`},children:(0,Q.jsx)(ia,{step:t,first:e.index===0&&!T,filter:y,searchQuery:g?a:``,isSearchMatch:m.has(t.turn.index),isCurrentMatch:n,onCheckpoint:f,ctrlHeld:C})},e.key)})})]})]})}function ia(e){let t=(0,kr.c)(53),{step:n,first:r,filter:i,searchQuery:a,isSearchMatch:o,isCurrentMatch:s,onCheckpoint:c,ctrlHeld:l}=e,{turn:u}=n,d=!!c&&!!l,f;t[0]===u.timestamp?f=t[1]:(f=Qi(u.timestamp),t[0]=u.timestamp,t[1]=f);let p=f,m=i!==`tools`&&i!==`agents`,h=i!==`messages`,g;t[2]===n.gap?g=t[3]:(g=n.gap?Xi(n.gap):``,t[2]=n.gap,t[3]=g);let _=g,v=n.kind===`result`,y;t[4]!==i||t[5]!==n.calls?(y=i===`agents`?n.calls.filter(aa):n.calls,t[4]=i,t[5]=n.calls,t[6]=y):y=t[6];let b=y,x=r||void 0,S=n.spawns>0||void 0,C=o||void 0,w=s||void 0,T=d||void 0,E;t[7]!==d||t[8]!==l||t[9]!==c||t[10]!==u.index?(E=e=>{d&&(e.ctrlKey||l)&&(e.preventDefault(),e.stopPropagation(),c(u.index))},t[7]=d,t[8]=l,t[9]=c,t[10]=u.index,t[11]=E):E=t[11];let D;t[12]!==p||t[13]!==u.timestamp?(D=p&&(0,Q.jsx)(`time`,{dateTime:u.timestamp,title:p.full,children:p.label}),t[12]=p,t[13]=u.timestamp,t[14]=D):D=t[14];let O;t[15]===_?O=t[16]:(O=_&&(0,Q.jsx)(`span`,{className:`tr-gap`,children:_}),t[15]=_,t[16]=O);let k;t[17]!==D||t[18]!==O?(k=(0,Q.jsxs)(`div`,{className:`tr-when`,children:[D,O]}),t[17]=D,t[18]=O,t[19]=k):k=t[19];let A;t[20]===Symbol.for(`react.memo_cache_sentinel`)?(A=(0,Q.jsx)(`div`,{className:`tr-rail`,"aria-hidden":!0,children:(0,Q.jsx)(`span`,{className:`tr-node`})}),t[20]=A):A=t[20];let j;t[21]!==v||t[22]!==c||t[23]!==n.speaker||t[24]!==u.index?(j=!v&&(0,Q.jsxs)(`header`,{className:`tr-head`,children:[(0,Q.jsx)(`span`,{className:`tr-who`,children:n.speaker}),c&&(0,Q.jsxs)(`button`,{type:`button`,className:`hist-ckpt`,onClick:e=>{e.stopPropagation(),c(u.index)},title:`Truncate the session to keep everything through turn ${u.index+1}. The original is backed up as <session>.jsonl.bkp.`,children:[(0,Q.jsx)(`svg`,{className:`w-3 h-3`,strokeWidth:2,...Vi,"aria-hidden":!0,children:(0,Q.jsx)(`path`,{d:`M6 9a3 3 0 1 0 0-6 3 3 0 0 0 0 6Zm0 12a3 3 0 1 0 0-6 3 3 0 0 0 0 6ZM20 4 8.1 15.9M14.5 14.5 20 20M8.1 8.1 12 12`})}),`Checkpoint here`]})]}),t[21]=v,t[22]=c,t[23]=n.speaker,t[24]=u.index,t[25]=j):j=t[25];let M;t[26]!==a||t[27]!==m||t[28]!==n.fallback||t[29]!==n.prose?(M=m&&(n.fallback===null?n.prose.map((e,t)=>(0,Q.jsx)(sa,{text:e.text.trim(),query:a},t)):(0,Q.jsx)(sa,{text:n.fallback,query:a})),t[26]=a,t[27]=m,t[28]=n.fallback,t[29]=n.prose,t[30]=M):M=t[30];let N;t[31]!==b||t[32]!==i||t[33]!==o||t[34]!==a||t[35]!==h||t[36]!==n.results||t[37]!==n.thinking?(N=h&&(b.length>0||n.results.length>0||n.thinking)&&(0,Q.jsxs)(`div`,{className:`tr-calls`,children:[n.thinking&&i===`all`&&(0,Q.jsx)(`div`,{className:`hist-think`,children:`Thinking…`}),b.map((e,t)=>Hi.has(e.name)?(0,Q.jsx)(da,{args:e.args,query:a},t):(0,Q.jsx)(la,{name:e.name,args:e.args,query:a,forceOpen:o},t)),n.results.map((e,t)=>(0,Q.jsx)(pa,{text:e.text,query:a,forceOpen:o},t))]}),t[31]=b,t[32]=i,t[33]=o,t[34]=a,t[35]=h,t[36]=n.results,t[37]=n.thinking,t[38]=N):N=t[38];let P;t[39]!==j||t[40]!==M||t[41]!==N?(P=(0,Q.jsxs)(`div`,{className:`tr-body`,children:[j,M,N]}),t[39]=j,t[40]=M,t[41]=N,t[42]=P):P=t[42];let F;return t[43]!==n.kind||t[44]!==k||t[45]!==P||t[46]!==x||t[47]!==S||t[48]!==C||t[49]!==w||t[50]!==T||t[51]!==E?(F=(0,Q.jsxs)(`article`,{className:`tr-step`,"data-kind":n.kind,"data-first":x,"data-spawn":S,"data-match":C,"data-current":w,"data-armed":T,onClick:E,children:[k,A,P]}),t[43]=n.kind,t[44]=k,t[45]=P,t[46]=x,t[47]=S,t[48]=C,t[49]=w,t[50]=T,t[51]=E,t[52]=F):F=t[52],F}function aa(e){return Hi.has(e.name)}var oa={a:({node:e,...t})=>(0,Q.jsx)(`a`,{...t,target:`_blank`,rel:`noopener noreferrer`})};function sa(e){let t=(0,kr.c)(19),{text:n,query:r}=e,i;t[0]===n?i=t[1]:(i=n.length>900||n.split(`
|
|
23
|
+
`).length>Wi,t[0]=n,t[1]=i);let a=i,[o,s]=(0,$.useState)(!1),c=a&&!o&&!r,l=!r||void 0,u=c||void 0,d;t[2]===c?d=t[3]:(d=c?{WebkitLineClamp:Wi}:void 0,t[2]=c,t[3]=d);let f;t[4]!==r||t[5]!==n?(f=r?(0,Q.jsx)(ha,{text:n,query:r}):(0,Q.jsx)(wr,{remarkPlugins:[x],components:oa,children:n}),t[4]=r,t[5]=n,t[6]=f):f=t[6];let p;t[7]!==l||t[8]!==u||t[9]!==d||t[10]!==f?(p=(0,Q.jsx)(`div`,{className:`hist-prose`,"data-md":l,"data-clamped":u,style:d,children:f}),t[7]=l,t[8]=u,t[9]=d,t[10]=f,t[11]=p):p=t[11];let m;t[12]!==o||t[13]!==a||t[14]!==r?(m=a&&!r&&(0,Q.jsx)(`button`,{type:`button`,className:`hist-more`,onClick:()=>s(ca),"aria-expanded":o,children:o?`Show less`:`Show more`}),t[12]=o,t[13]=a,t[14]=r,t[15]=m):m=t[15];let h;return t[16]!==p||t[17]!==m?(h=(0,Q.jsxs)(Q.Fragment,{children:[p,m]}),t[16]=p,t[17]=m,t[18]=h):h=t[18],h}function ca(e){return!e}function la(e){let t=(0,kr.c)(25),{name:n,args:r,query:i,forceOpen:a}=e,[o,s]=(0,$.useState)(!1),c=o||a,l;t[0]===r?l=t[1]:(l=Ji(r),t[0]=r,t[1]=l);let u=l,d;t[2]===r?d=t[3]:(d=Yi(r),t[2]=r,t[3]=d);let f=d,p;t[4]===Symbol.for(`react.memo_cache_sentinel`)?(p=()=>s(ua),t[4]=p):p=t[4];let m;t[5]===Symbol.for(`react.memo_cache_sentinel`)?(m=(0,Q.jsx)(`svg`,{className:`w-3 h-3 hist-chev`,strokeWidth:2.5,...Vi,"aria-hidden":!0,children:(0,Q.jsx)(`path`,{d:`m9 5 7 7-7 7`})}),t[5]=m):m=t[5];let h;t[6]!==n||t[7]!==i?(h=(0,Q.jsx)(`span`,{className:`hist-tool-name`,children:(0,Q.jsx)(ha,{text:n,query:i})}),t[6]=n,t[7]=i,t[8]=h):h=t[8];let g;t[9]!==c||t[10]!==u?(g=!c&&u&&(0,Q.jsx)(`span`,{className:`tr-call-sum`,children:u}),t[9]=c,t[10]=u,t[11]=g):g=t[11];let _;t[12]!==c||t[13]!==h||t[14]!==g?(_=(0,Q.jsxs)(`button`,{type:`button`,className:`tr-call-head`,onClick:p,"aria-expanded":c,children:[m,h,g]}),t[12]=c,t[13]=h,t[14]=g,t[15]=_):_=t[15];let v;t[16]!==r||t[17]!==f||t[18]!==c||t[19]!==i?(v=c&&r&&(0,Q.jsx)(`pre`,{className:`tr-call-args`,children:(0,Q.jsx)(ha,{text:f,query:i})}),t[16]=r,t[17]=f,t[18]=c,t[19]=i,t[20]=v):v=t[20];let y;return t[21]!==c||t[22]!==_||t[23]!==v?(y=(0,Q.jsxs)(`div`,{className:`tr-call`,"data-open":c,children:[_,v]}),t[21]=c,t[22]=_,t[23]=v,t[24]=y):y=t[24],y}function ua(e){return!e}function da(e){let t=(0,kr.c)(23),{args:n,query:r}=e,i;t[0]===n?i=t[1]:(i=Ki(n,`subagent_type`),t[0]=n,t[1]=i);let a=i,o;t[2]===n?o=t[3]:(o=Ki(n,`description`)||`Subagent`,t[2]=n,t[3]=o);let s=o,c;t[4]===n?c=t[5]:(c=Ki(n,`prompt`),t[4]=n,t[5]=c);let l=c,[u,d]=(0,$.useState)(!1),f;t[6]===Symbol.for(`react.memo_cache_sentinel`)?(f=(0,Q.jsx)(`svg`,{className:`w-3.5 h-3.5 shrink-0`,strokeWidth:2,...Vi,"aria-hidden":!0,children:(0,Q.jsx)(`path`,{d:`M6 3v12M18 9a3 3 0 1 0 0-6 3 3 0 0 0 0 6ZM6 21a3 3 0 1 0 0-6 3 3 0 0 0 0 6ZM18 9a9 9 0 0 1-9 9`})}),t[6]=f):f=t[6];let p;t[7]!==r||t[8]!==s?(p=(0,Q.jsx)(`span`,{className:`tr-spawn-title`,children:(0,Q.jsx)(ha,{text:s,query:r})}),t[7]=r,t[8]=s,t[9]=p):p=t[9];let m;t[10]===a?m=t[11]:(m=a&&(0,Q.jsx)(E,{children:a}),t[10]=a,t[11]=m);let h;t[12]!==p||t[13]!==m?(h=(0,Q.jsxs)(`div`,{className:`tr-spawn-head`,children:[f,p,m]}),t[12]=p,t[13]=m,t[14]=h):h=t[14];let g;t[15]!==u||t[16]!==l||t[17]!==r?(g=l&&(0,Q.jsxs)(Q.Fragment,{children:[(0,Q.jsx)(`div`,{className:`tr-spawn-prompt`,"data-open":u,children:(0,Q.jsx)(ha,{text:l,query:r})}),(0,Q.jsx)(`button`,{type:`button`,className:`hist-more`,onClick:()=>d(fa),"aria-expanded":u,children:u?`Hide brief`:`Show brief`})]}),t[15]=u,t[16]=l,t[17]=r,t[18]=g):g=t[18];let _;return t[19]!==u||t[20]!==h||t[21]!==g?(_=(0,Q.jsxs)(`div`,{className:`tr-spawn`,"data-open":u,children:[h,g]}),t[19]=u,t[20]=h,t[21]=g,t[22]=_):_=t[22],_}function fa(e){return!e}function pa(e){let t=(0,kr.c)(15),{text:n,query:r,forceOpen:i}=e,[a,o]=(0,$.useState)(!1),s=a||i,c;t[0]===n?c=t[1]:(c=Yi(n),t[0]=n,t[1]=c);let l=c,u;t[2]===l?u=t[3]:(u=l.length>160||l.includes(`
|
|
24
|
+
`),t[2]=l,t[3]=u);let d=u,f;t[4]!==r||t[5]!==l?(f=(0,Q.jsx)(`div`,{className:`tr-result-text`,children:(0,Q.jsx)(ha,{text:l,query:r})}),t[4]=r,t[5]=l,t[6]=f):f=t[6];let p;t[7]!==s||t[8]!==d||t[9]!==r?(p=d&&!r&&(0,Q.jsx)(`button`,{type:`button`,className:`hist-more`,onClick:()=>o(ma),"aria-expanded":s,children:s?`Collapse`:`Expand`}),t[7]=s,t[8]=d,t[9]=r,t[10]=p):p=t[10];let m;return t[11]!==s||t[12]!==f||t[13]!==p?(m=(0,Q.jsxs)(`div`,{className:`tr-result`,"data-open":s,children:[f,p]}),t[11]=s,t[12]=f,t[13]=p,t[14]=m):m=t[14],m}function ma(e){return!e}function ha(e){let t=(0,kr.c)(14),{text:n,query:r}=e;if(!r||r.length<2){let e;return t[0]===n?e=t[1]:(e=(0,Q.jsx)(Q.Fragment,{children:n}),t[0]=n,t[1]=e),e}let i;if(t[2]!==r||t[3]!==n){let e=n.toLowerCase(),a=r.toLowerCase();i=[];let o=0,s=e.indexOf(a,0);for(;s!==-1;)s>o&&i.push({text:n.slice(o,s),highlight:!1}),i.push({text:n.slice(s,s+r.length),highlight:!0}),o=s+r.length,s=e.indexOf(a,o);if(o<n.length){let e;t[5]!==o||t[6]!==n?(e=n.slice(o),t[5]=o,t[6]=n,t[7]=e):e=t[7];let r;t[8]===e?r=t[9]:(r={text:e,highlight:!1},t[8]=e,t[9]=r),i.push(r)}t[2]=r,t[3]=n,t[4]=i}else i=t[4];if(i.length===0){let e;return t[10]===n?e=t[11]:(e=(0,Q.jsx)(Q.Fragment,{children:n}),t[10]=n,t[11]=e),e}let a;return t[12]===i?a=t[13]:(a=(0,Q.jsx)(Q.Fragment,{children:i.map(ga)}),t[12]=i,t[13]=a),a}function ga(e,t){return e.highlight?(0,Q.jsx)(`mark`,{children:e.text},t):(0,Q.jsx)(`span`,{children:e.text},t)}function _a({title:e,body:t,url:n,onOpenInBrowser:r,mergeAction:i,prMeta:a}){let{theme:o}=M(),s=ke(o),[c,l]=(0,$.useState)(!1),[u,d]=(0,$.useState)(null),[f,p]=(0,$.useState)(null);return(0,Q.jsxs)(`div`,{className:`p-5 flex flex-col gap-4`,children:[(0,Q.jsxs)(`div`,{className:`flex items-start justify-between gap-3`,children:[(0,Q.jsx)(`h3`,{className:`text-[15px] font-medium leading-snug`,style:{color:s.textPrimary},children:e}),(0,Q.jsxs)(`div`,{className:`flex items-center gap-1 shrink-0`,children:[i&&(0,Q.jsxs)(`button`,{onClick:async()=>{if(i){d(null),p(null),l(!0);try{let e=await i.onMerge();p(e||`Merged PR #${i.number}`)}catch(e){d(String(e))}finally{l(!1)}}},disabled:c,className:`tg-btn tg-btn--solid tg-btn--sm flex items-center gap-1.5 px-3 py-1 text-[12px] font-medium disabled:opacity-60`,title:`Run the configured merge command for PR #${i.number}`,children:[c?(0,Q.jsx)(`div`,{className:`w-3 h-3 border-[1.5px] border-current border-t-transparent rounded-full animate-spin`}):(0,Q.jsx)(`svg`,{className:`w-3.5 h-3.5`,fill:`none`,viewBox:`0 0 24 24`,stroke:`currentColor`,strokeWidth:2,children:(0,Q.jsx)(`path`,{strokeLinecap:`round`,strokeLinejoin:`round`,d:`M9 6V18a2.25 2.25 0 0 0 2.25 2.25h.5A2.25 2.25 0 0 0 14 18.5V14a2.25 2.25 0 0 1 2.25-2.25H18M9 6a2.25 2.25 0 1 1 0 4.5 2.25 2.25 0 0 1 0-4.5ZM18 11.75a2.25 2.25 0 1 1 0 4.5 2.25 2.25 0 0 1 0-4.5Z`})}),c?`Merging…`:`Merge`]}),(n||r)&&(0,Q.jsx)(`button`,{onClick:()=>{r?r():n&&window.open(n,`_blank`,`noreferrer`)},className:`p-1.5 rounded-lg transition-all duration-150`,style:{color:`var(--ink)`},onMouseEnter:e=>{e.currentTarget.style.background=`rgba(79,142,247,0.08)`},onMouseLeave:e=>{e.currentTarget.style.background=``},title:`Open in browser`,children:(0,Q.jsx)(`svg`,{className:`w-4 h-4`,fill:`none`,viewBox:`0 0 24 24`,stroke:`currentColor`,strokeWidth:2,children:(0,Q.jsx)(`path`,{strokeLinecap:`round`,strokeLinejoin:`round`,d:`M10 6H6a2 2 0 0 0-2 2v10a2 2 0 0 0 2 2h10a2 2 0 0 0 2-2v-4M14 4h6m0 0v6m0-6L10 14`})})})]})]}),a&&(0,Q.jsx)(Li,{meta:a,c:s}),f&&(0,Q.jsx)(`div`,{className:`rounded-lg px-3 py-2 text-[12px]`,style:{background:`rgba(63,185,80,0.10)`,color:`#3fb950`,border:`1px solid rgba(63,185,80,0.30)`},children:f}),u&&(0,Q.jsx)(`div`,{className:`rounded-lg px-3 py-2 text-[12px]`,style:{background:`rgba(248,81,73,0.10)`,color:`#f85149`,border:`1px solid rgba(248,81,73,0.30)`},children:u}),t?(0,Q.jsx)(`div`,{className:`text-[13px] leading-[1.7] whitespace-pre-wrap break-words`,style:{color:s.textSecondary},children:t}):(0,Q.jsx)(`p`,{className:`text-[13px]`,style:{color:s.textDim},children:`No description`})]})}export{Ii as default};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
.diff-tailwindcss-wrapper .\!container{width:100%!important}.diff-tailwindcss-wrapper .container{width:100%}@media (width>=640px){.diff-tailwindcss-wrapper .\!container{max-width:640px!important}.diff-tailwindcss-wrapper .container{max-width:640px}}@media (width>=768px){.diff-tailwindcss-wrapper .\!container{max-width:768px!important}.diff-tailwindcss-wrapper .container{max-width:768px}}@media (width>=1024px){.diff-tailwindcss-wrapper .\!container{max-width:1024px!important}.diff-tailwindcss-wrapper .container{max-width:1024px}}@media (width>=1280px){.diff-tailwindcss-wrapper .\!container{max-width:1280px!important}.diff-tailwindcss-wrapper .container{max-width:1280px}}@media (width>=1536px){.diff-tailwindcss-wrapper .\!container{max-width:1536px!important}.diff-tailwindcss-wrapper .container{max-width:1536px}}.diff-tailwindcss-wrapper .invisible{visibility:hidden}.diff-tailwindcss-wrapper .collapse{visibility:collapse}.diff-tailwindcss-wrapper .absolute{position:absolute}.diff-tailwindcss-wrapper .relative{position:relative}.diff-tailwindcss-wrapper .sticky{position:sticky}.diff-tailwindcss-wrapper .left-0{left:0}.diff-tailwindcss-wrapper .left-\[100\%\]{left:100%}.diff-tailwindcss-wrapper .right-\[100\%\]{right:100%}.diff-tailwindcss-wrapper .top-0{top:0}.diff-tailwindcss-wrapper .top-\[50\%\]{top:50%}.diff-tailwindcss-wrapper .z-\[1\]{z-index:1}.diff-tailwindcss-wrapper .ml-\[-1\.5em\]{margin-left:-1.5em}.diff-tailwindcss-wrapper .block{display:block}.diff-tailwindcss-wrapper .inline-block{display:inline-block}.diff-tailwindcss-wrapper .flex{display:flex}.diff-tailwindcss-wrapper .table{display:table}.diff-tailwindcss-wrapper .hidden{display:none}.diff-tailwindcss-wrapper .h-\[50\%\]{height:50%}.diff-tailwindcss-wrapper .h-full{height:100%}.diff-tailwindcss-wrapper .min-h-\[28px\]{min-height:28px}.diff-tailwindcss-wrapper .w-\[1\%\]{width:1%}.diff-tailwindcss-wrapper .w-\[1\.5em\]{width:1.5em}.diff-tailwindcss-wrapper .w-\[1\.5px\]{width:1.5px}.diff-tailwindcss-wrapper .w-\[1px\]{width:1px}.diff-tailwindcss-wrapper .w-\[50\%\]{width:50%}.diff-tailwindcss-wrapper .w-\[8px\]{width:8px}.diff-tailwindcss-wrapper .w-full{width:100%}.diff-tailwindcss-wrapper .w-max{width:max-content}.diff-tailwindcss-wrapper .min-w-\[40px\]{min-width:40px}.diff-tailwindcss-wrapper .min-w-full{min-width:100%}.diff-tailwindcss-wrapper .flex-shrink-0,.diff-tailwindcss-wrapper .shrink-0{flex-shrink:0}.diff-tailwindcss-wrapper .basis-\[50\%\]{flex-basis:50%}.diff-tailwindcss-wrapper .table-fixed{table-layout:fixed}.diff-tailwindcss-wrapper .border-collapse{border-collapse:collapse}.diff-tailwindcss-wrapper .border-spacing-0{--tw-border-spacing-x:0px;--tw-border-spacing-y:0px;border-spacing:var(--tw-border-spacing-x) var(--tw-border-spacing-y)}.diff-tailwindcss-wrapper .origin-center{transform-origin:50%}.diff-tailwindcss-wrapper .translate-x-\[-50\%\]{--tw-translate-x:-50%;transform:translate(var(--tw-translate-x), var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.diff-tailwindcss-wrapper .translate-x-\[50\%\]{--tw-translate-x:50%;transform:translate(var(--tw-translate-x), var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.diff-tailwindcss-wrapper .translate-y-\[-50\%\]{--tw-translate-y:-50%;transform:translate(var(--tw-translate-x), var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.diff-tailwindcss-wrapper .transform{transform:translate(var(--tw-translate-x), var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.diff-tailwindcss-wrapper .cursor-pointer{cursor:pointer}.diff-tailwindcss-wrapper .select-none{-webkit-user-select:none;user-select:none}.diff-tailwindcss-wrapper .flex-col{flex-direction:column}.diff-tailwindcss-wrapper .items-start{align-items:flex-start}.diff-tailwindcss-wrapper .items-center{align-items:center}.diff-tailwindcss-wrapper .justify-center{justify-content:center}.diff-tailwindcss-wrapper .overflow-x-auto{overflow-x:auto}.diff-tailwindcss-wrapper .overflow-y-hidden{overflow-y:hidden}.diff-tailwindcss-wrapper .whitespace-nowrap{white-space:nowrap}.diff-tailwindcss-wrapper .break-all{word-break:break-all}.diff-tailwindcss-wrapper .rounded-\[2px\]{border-radius:2px}.diff-tailwindcss-wrapper .rounded-md{border-radius:.375rem}.diff-tailwindcss-wrapper .border-l-\[1px\]{border-left-width:1px}.diff-tailwindcss-wrapper .fill-current{fill:currentColor}.diff-tailwindcss-wrapper .p-0{padding:0}.diff-tailwindcss-wrapper .p-\[1px\]{padding:1px}.diff-tailwindcss-wrapper .px-\[10px\]{padding-left:10px;padding-right:10px}.diff-tailwindcss-wrapper .py-\[2px\]{padding-top:2px;padding-bottom:2px}.diff-tailwindcss-wrapper .py-\[6px\]{padding-top:6px;padding-bottom:6px}.diff-tailwindcss-wrapper .pl-\[1\.5em\]{padding-left:1.5em}.diff-tailwindcss-wrapper .pl-\[10px\]{padding-left:10px}.diff-tailwindcss-wrapper .pl-\[2\.0em\]{padding-left:2em}.diff-tailwindcss-wrapper .pl-\[5px\]{padding-left:5px}.diff-tailwindcss-wrapper .pr-\[10px\]{padding-right:10px}.diff-tailwindcss-wrapper .pr-\[5px\]{padding-right:5px}.diff-tailwindcss-wrapper .text-right{text-align:right}.diff-tailwindcss-wrapper .indent-\[0\.2em\]{text-indent:.2em}.diff-tailwindcss-wrapper .align-top{vertical-align:top}.diff-tailwindcss-wrapper .align-middle{vertical-align:middle}.diff-tailwindcss-wrapper .text-\[1\.2em\]{font-size:1.2em}.diff-tailwindcss-wrapper .leading-\[1\.6\]{line-height:1.6}.diff-tailwindcss-wrapper .\!text-red-500{--tw-text-opacity:1!important;color:rgb(239 68 68/var(--tw-text-opacity,1))!important}.diff-tailwindcss-wrapper .opacity-\[0\.5\]{opacity:.5}.diff-tailwindcss-wrapper .transition-transform{transition-property:transform;transition-duration:.15s;transition-timing-function:cubic-bezier(.4,0,.2,1)}.diff-tailwindcss-wrapper *{box-sizing:border-box}.diff-tailwindcss-wrapper[data-theme=light] .diff-style-root{--diff-border--:#dedede;--diff-add-content--:#dafbe1;--diff-del-content--:#ffebe9;--diff-add-lineNumber--:#aceebb;--diff-del-lineNumber--:#ffcecb;--diff-plain-content--:#fff;--diff-expand-content--:#fafafa;--diff-plain-lineNumber--:#fafafa;--diff-expand-lineNumber--:#fafafa;--diff-plain-lineNumber-color--:#555;--diff-expand-lineNumber-color--:#555;--diff-hunk-content--:#ddf4ff;--diff-hunk-lineNumber--:#b6e3ff;--diff-hunk-lineNumber-hover--:#0969da;--diff-add-content-highlight--:#aceebb;--diff-del-content-highlight--:#ffcecb;--diff-add-widget--:#0969d2;--diff-add-widget-color--:#fff;--diff-empty-content--:#fafafa;--diff-hunk-content-color--:#777}.diff-tailwindcss-wrapper .diff-style-root .diff-line-syntax-raw *,.diff-tailwindcss-wrapper[data-theme=light] .diff-line-syntax-raw *{color:var(--diff-view-light,inherit);font-weight:var(--diff-view-light-font-weight,inherit)}.diff-tailwindcss-wrapper[data-theme=dark] .diff-style-root{--diff-border--:#3d444d;--diff-add-content--:#18271f;--diff-del-content--:#23191c;--diff-add-lineNumber--:#284228;--diff-del-lineNumber--:#4f2828;--diff-plain-content--:#0d1117;--diff-expand-content--:#161b22;--diff-plain-lineNumber--:#161b22;--diff-expand-lineNumber--:#161b22;--diff-plain-lineNumber-color--:#a0aaab;--diff-expand-lineNumber-color--:#a0aaab;--diff-hunk-content--:#131d2e;--diff-hunk-lineNumber--:#0c2d6b;--diff-hunk-lineNumber-hover--:#1f6feb;--diff-add-content-highlight--:#2f5732;--diff-del-content-highlight--:#713431;--diff-add-widget--:#0969d2;--diff-add-widget-color--:#fff;--diff-empty-content--:#161b22;--diff-hunk-content-color--:#9298a0}.diff-tailwindcss-wrapper[data-theme=dark] [data-state=diff],.diff-tailwindcss-wrapper[data-theme=dark] [data-state=plain],.diff-tailwindcss-wrapper[data-theme=dark] [data-state=hunk]{color:#fff}.diff-tailwindcss-wrapper[data-theme=light] [data-state=diff],.diff-tailwindcss-wrapper[data-theme=light] [data-state=plain],.diff-tailwindcss-wrapper[data-theme=light] [data-state=hunk]{color:#000}.diff-tailwindcss-wrapper[data-theme=dark] .diff-line-syntax-raw *{color:var(--diff-view-dark,inherit);font-weight:var(--diff-view-dark-font-weight,inherit)}.diff-tailwindcss-wrapper table,.diff-tailwindcss-wrapper tr,.diff-tailwindcss-wrapper td{text-align:left;border-width:0;border-color:#0000}.diff-tailwindcss-wrapper td{padding:0}.diff-tailwindcss-wrapper .diff-line-old-num,.diff-tailwindcss-wrapper .diff-line-new-num,.diff-tailwindcss-wrapper .diff-line-num{text-align:right}.diff-tailwindcss-wrapper .diff-style-root tr{content-visibility:auto}.diff-tailwindcss-wrapper .diff-add-widget-wrapper{transform-origin:50%;transform:translate(-50%)!important}.diff-tailwindcss-wrapper .diff-line-old-content .diff-add-widget-wrapper,.diff-tailwindcss-wrapper .diff-line-new-content .diff-add-widget-wrapper{transform:translate(50%)!important}.diff-tailwindcss-wrapper .diff-add-widget-wrapper:hover{transform:translate(-50%)scale(1.1)!important}.diff-tailwindcss-wrapper .diff-line-old-content .diff-add-widget-wrapper:hover,.diff-tailwindcss-wrapper .diff-line-new-content .diff-add-widget-wrapper:hover{transform:translate(50%)scale(1.1)!important}.diff-tailwindcss-wrapper .diff-widget-tooltip{position:relative}.diff-tailwindcss-wrapper .diff-add-widget,.diff-tailwindcss-wrapper .diff-widget-tooltip{font-feature-settings:inherit;font-variation-settings:inherit;font-family:inherit;font-size:100%;font-weight:inherit;line-height:inherit;letter-spacing:inherit;color:inherit;text-transform:none;background-color:#0000;background-image:none;border-width:0;margin:0}.diff-tailwindcss-wrapper .diff-widget-tooltip:after{box-sizing:border-box;content:attr(data-title);white-space:nowrap;color:#fff;background-color:#555;border-radius:4px;padding:1px 2px;font-size:11px;display:none;position:absolute;top:50%;left:calc(100% + 8px);overflow:hidden;transform:translateY(-50%)}.diff-tailwindcss-wrapper .diff-widget-tooltip:before{box-sizing:border-box;content:"";border:6px solid #0000;border-right-color:#555;display:none;position:absolute;top:50%;left:calc(100% - 2px);transform:translateY(-50%)}.diff-tailwindcss-wrapper .diff-widget-tooltip:hover{background-color:var(--diff-hunk-lineNumber-hover--);color:#fff}.diff-tailwindcss-wrapper .diff-widget-tooltip:hover:before,.diff-tailwindcss-wrapper .diff-widget-tooltip:hover:after{display:block}.diff-line-extend-wrapper,.diff-line-widget-wrapper{display:flow-root}.diff-tailwindcss-wrapper .diff-multi-select-active.diff-line-new-num,.diff-tailwindcss-wrapper .diff-multi-select-active.diff-line-old-num,.diff-tailwindcss-wrapper .diff-multi-select-active.diff-line-num{z-index:2}.diff-tailwindcss-wrapper .diff-multi-select-active.diff-line-content,.diff-tailwindcss-wrapper .diff-multi-select-active.diff-line-new-content,.diff-tailwindcss-wrapper .diff-multi-select-active.diff-line-old-content{position:relative}.diff-tailwindcss-wrapper .diff-multi-select-active.diff-line-new-num:after,.diff-tailwindcss-wrapper .diff-multi-select-active.diff-line-old-num:after,.diff-tailwindcss-wrapper .diff-multi-select-active.diff-line-num:after{content:"";z-index:1;opacity:.15;background-color:var(--diff-multi-select-bg,#f0c000);pointer-events:none;position:absolute;inset:0}.diff-tailwindcss-wrapper .diff-multi-select-active.diff-line-new-num:before,.diff-tailwindcss-wrapper .diff-multi-select-active.diff-line-old-num:before,.diff-tailwindcss-wrapper .diff-multi-select-active.diff-line-num:before{content:"";z-index:2;background-color:var(--diff-multi-select-border,#2588fa);width:4px;position:absolute;top:0;bottom:0;right:-2px}.diff-tailwindcss-wrapper .diff-multi-select-active.diff-line-new-content:after,.diff-tailwindcss-wrapper .diff-multi-select-active.diff-line-old-content:after,.diff-tailwindcss-wrapper .diff-multi-select-active.diff-line-content:after{content:"";z-index:1;opacity:.15;background-color:var(--diff-multi-select-bg,#f0c000);pointer-events:none;position:absolute;inset:0}.diff-multi-selecting .diff-line-old-num,.diff-multi-selecting .diff-line-new-num,.diff-multi-selecting .diff-line-num,.diff-multi-selecting .diff-line-old-content,.diff-multi-selecting .diff-line-new-content,.diff-multi-selecting .diff-line-content,.diff-multi-selecting,.diff-multi-selecting *{-webkit-user-select:none;user-select:none}.diff-multi-selecting .diff-add-widget-wrapper{display:none}.diff-multiselect-wrapper .diff-add-widget-wrapper{z-index:10!important}.diff-tailwindcss-wrapper .diff-line-new-num span[data-line-num],.diff-tailwindcss-wrapper .diff-line-old-num span[data-line-num]{pointer-events:none}.diff-multiselect-wrapper .diff-line-old-num,.diff-multiselect-wrapper .diff-line-new-num,.diff-multiselect-wrapper .diff-line-num{cursor:pointer}.diff-tailwindcss-wrapper[data-theme=light] .diff-line-syntax-raw pre code.hljs{padding:1em;display:block;overflow-x:auto}.diff-tailwindcss-wrapper[data-theme=light] .diff-line-syntax-raw code.hljs{padding:3px 5px}.diff-tailwindcss-wrapper[data-theme=light] .diff-line-syntax-raw .hljs{color:#24292e;background:#fff}.diff-tailwindcss-wrapper[data-theme=light] .diff-line-syntax-raw .hljs-doctag,.diff-tailwindcss-wrapper[data-theme=light] .diff-line-syntax-raw .hljs-keyword,.diff-tailwindcss-wrapper[data-theme=light] .diff-line-syntax-raw .hljs-meta .hljs-keyword,.diff-tailwindcss-wrapper[data-theme=light] .diff-line-syntax-raw .hljs-template-tag,.diff-tailwindcss-wrapper[data-theme=light] .diff-line-syntax-raw .hljs-template-variable,.diff-tailwindcss-wrapper[data-theme=light] .diff-line-syntax-raw .hljs-type,.diff-tailwindcss-wrapper[data-theme=light] .diff-line-syntax-raw .hljs-variable.language_{color:#d73a49}.diff-tailwindcss-wrapper[data-theme=light] .diff-line-syntax-raw .hljs-title,.diff-tailwindcss-wrapper[data-theme=light] .diff-line-syntax-raw .hljs-title.class_,.diff-tailwindcss-wrapper[data-theme=light] .diff-line-syntax-raw .hljs-title.class_.inherited__,.diff-tailwindcss-wrapper[data-theme=light] .diff-line-syntax-raw .hljs-title.function_{color:#6f42c1}.diff-tailwindcss-wrapper[data-theme=light] .diff-line-syntax-raw .hljs-attr,.diff-tailwindcss-wrapper[data-theme=light] .diff-line-syntax-raw .hljs-attribute,.diff-tailwindcss-wrapper[data-theme=light] .diff-line-syntax-raw .hljs-literal,.diff-tailwindcss-wrapper[data-theme=light] .diff-line-syntax-raw .hljs-meta,.diff-tailwindcss-wrapper[data-theme=light] .diff-line-syntax-raw .hljs-number,.diff-tailwindcss-wrapper[data-theme=light] .diff-line-syntax-raw .hljs-operator,.diff-tailwindcss-wrapper[data-theme=light] .diff-line-syntax-raw .hljs-variable,.diff-tailwindcss-wrapper[data-theme=light] .diff-line-syntax-raw .hljs-selector-attr,.diff-tailwindcss-wrapper[data-theme=light] .diff-line-syntax-raw .hljs-selector-class,.diff-tailwindcss-wrapper[data-theme=light] .diff-line-syntax-raw .hljs-selector-id{color:#005cc5}.diff-tailwindcss-wrapper[data-theme=light] .diff-line-syntax-raw .hljs-regexp,.diff-tailwindcss-wrapper[data-theme=light] .diff-line-syntax-raw .hljs-string,.diff-tailwindcss-wrapper[data-theme=light] .diff-line-syntax-raw .hljs-meta .hljs-string{color:#032f62}.diff-tailwindcss-wrapper[data-theme=light] .diff-line-syntax-raw .hljs-built_in,.diff-tailwindcss-wrapper[data-theme=light] .diff-line-syntax-raw .hljs-symbol{color:#e36209}.diff-tailwindcss-wrapper[data-theme=light] .diff-line-syntax-raw .hljs-comment,.diff-tailwindcss-wrapper[data-theme=light] .diff-line-syntax-raw .hljs-code,.diff-tailwindcss-wrapper[data-theme=light] .diff-line-syntax-raw .hljs-formula{color:#6a737d}.diff-tailwindcss-wrapper[data-theme=light] .diff-line-syntax-raw .hljs-name,.diff-tailwindcss-wrapper[data-theme=light] .diff-line-syntax-raw .hljs-quote,.diff-tailwindcss-wrapper[data-theme=light] .diff-line-syntax-raw .hljs-selector-tag,.diff-tailwindcss-wrapper[data-theme=light] .diff-line-syntax-raw .hljs-selector-pseudo{color:#22863a}.diff-tailwindcss-wrapper[data-theme=light] .diff-line-syntax-raw .hljs-subst{color:#24292e}.diff-tailwindcss-wrapper[data-theme=light] .diff-line-syntax-raw .hljs-section{color:#005cc5;font-weight:700}.diff-tailwindcss-wrapper[data-theme=light] .diff-line-syntax-raw .hljs-bullet{color:#735c0f}.diff-tailwindcss-wrapper[data-theme=light] .diff-line-syntax-raw .hljs-emphasis{color:#24292e;font-style:italic}.diff-tailwindcss-wrapper[data-theme=light] .diff-line-syntax-raw .hljs-strong{color:#24292e;font-weight:700}.diff-tailwindcss-wrapper[data-theme=light] .diff-line-syntax-raw .hljs-addition{color:#22863a;background-color:#f0fff4}.diff-tailwindcss-wrapper[data-theme=light] .diff-line-syntax-raw .hljs-deletion{color:#b31d28;background-color:#ffeef0}.diff-tailwindcss-wrapper[data-theme=dark] .diff-line-syntax-raw pre code.hljs{padding:1em;display:block;overflow-x:auto}.diff-tailwindcss-wrapper[data-theme=dark] .diff-line-syntax-raw code.hljs{padding:3px 5px}.diff-tailwindcss-wrapper[data-theme=dark] .diff-line-syntax-raw .hljs{color:#c9d1d9;background:#0d1117}.diff-tailwindcss-wrapper[data-theme=dark] .diff-line-syntax-raw .hljs-doctag,.diff-tailwindcss-wrapper[data-theme=dark] .diff-line-syntax-raw .hljs-keyword,.diff-tailwindcss-wrapper[data-theme=dark] .diff-line-syntax-raw .hljs-meta .hljs-keyword,.diff-tailwindcss-wrapper[data-theme=dark] .diff-line-syntax-raw .hljs-template-tag,.diff-tailwindcss-wrapper[data-theme=dark] .diff-line-syntax-raw .hljs-template-variable,.diff-tailwindcss-wrapper[data-theme=dark] .diff-line-syntax-raw .hljs-type,.diff-tailwindcss-wrapper[data-theme=dark] .diff-line-syntax-raw .hljs-variable.language_{color:#ff7b72}.diff-tailwindcss-wrapper[data-theme=dark] .diff-line-syntax-raw .hljs-title,.diff-tailwindcss-wrapper[data-theme=dark] .diff-line-syntax-raw .hljs-title.class_,.diff-tailwindcss-wrapper[data-theme=dark] .diff-line-syntax-raw .hljs-title.class_.inherited__,.diff-tailwindcss-wrapper[data-theme=dark] .diff-line-syntax-raw .hljs-title.function_{color:#d2a8ff}.diff-tailwindcss-wrapper[data-theme=dark] .diff-line-syntax-raw .hljs-attr,.diff-tailwindcss-wrapper[data-theme=dark] .diff-line-syntax-raw .hljs-attribute,.diff-tailwindcss-wrapper[data-theme=dark] .diff-line-syntax-raw .hljs-literal,.diff-tailwindcss-wrapper[data-theme=dark] .diff-line-syntax-raw .hljs-meta,.diff-tailwindcss-wrapper[data-theme=dark] .diff-line-syntax-raw .hljs-number,.diff-tailwindcss-wrapper[data-theme=dark] .diff-line-syntax-raw .hljs-operator,.diff-tailwindcss-wrapper[data-theme=dark] .diff-line-syntax-raw .hljs-variable,.diff-tailwindcss-wrapper[data-theme=dark] .diff-line-syntax-raw .hljs-selector-attr,.diff-tailwindcss-wrapper[data-theme=dark] .diff-line-syntax-raw .hljs-selector-class,.diff-tailwindcss-wrapper[data-theme=dark] .diff-line-syntax-raw .hljs-selector-id{color:#79c0ff}.diff-tailwindcss-wrapper[data-theme=dark] .diff-line-syntax-raw .hljs-regexp,.diff-tailwindcss-wrapper[data-theme=dark] .diff-line-syntax-raw .hljs-string,.diff-tailwindcss-wrapper[data-theme=dark] .diff-line-syntax-raw .hljs-meta .hljs-string{color:#a5d6ff}.diff-tailwindcss-wrapper[data-theme=dark] .diff-line-syntax-raw .hljs-built_in,.diff-tailwindcss-wrapper[data-theme=dark] .diff-line-syntax-raw .hljs-symbol{color:#ffa657}.diff-tailwindcss-wrapper[data-theme=dark] .diff-line-syntax-raw .hljs-comment,.diff-tailwindcss-wrapper[data-theme=dark] .diff-line-syntax-raw .hljs-code,.diff-tailwindcss-wrapper[data-theme=dark] .diff-line-syntax-raw .hljs-formula{color:#8b949e}.diff-tailwindcss-wrapper[data-theme=dark] .diff-line-syntax-raw .hljs-name,.diff-tailwindcss-wrapper[data-theme=dark] .diff-line-syntax-raw .hljs-quote,.diff-tailwindcss-wrapper[data-theme=dark] .diff-line-syntax-raw .hljs-selector-tag,.diff-tailwindcss-wrapper[data-theme=dark] .diff-line-syntax-raw .hljs-selector-pseudo{color:#7ee787}.diff-tailwindcss-wrapper[data-theme=dark] .diff-line-syntax-raw .hljs-subst{color:#c9d1d9}.diff-tailwindcss-wrapper[data-theme=dark] .diff-line-syntax-raw .hljs-section{color:#1f6feb;font-weight:700}.diff-tailwindcss-wrapper[data-theme=dark] .diff-line-syntax-raw .hljs-bullet{color:#f2cc60}.diff-tailwindcss-wrapper[data-theme=dark] .diff-line-syntax-raw .hljs-emphasis{color:#c9d1d9;font-style:italic}.diff-tailwindcss-wrapper[data-theme=dark] .diff-line-syntax-raw .hljs-strong{color:#c9d1d9;font-weight:700}.diff-tailwindcss-wrapper[data-theme=dark] .diff-line-syntax-raw .hljs-addition{color:#aff5b4;background-color:#033a16}.diff-tailwindcss-wrapper[data-theme=dark] .diff-line-syntax-raw .hljs-deletion{color:#ffdcd7;background-color:#67060c}.diff-tailwindcss-wrapper .hover\:scale-110:hover{--tw-scale-x:1.1;--tw-scale-y:1.1;transform:translate(var(--tw-translate-x), var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.diff-tailwindcss-wrapper .group:hover .group-hover\:visible{visibility:visible}
|